diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 17038a4..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "VoxVera", - "build": { - "dockerfile": "../Dockerfile", - "context": ".." - }, - "workspaceFolder": "/workspace/VoxVera" -} diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index fcf71d0..0000000 --- a/.dockerignore +++ /dev/null @@ -1,16 +0,0 @@ -.git -.github -.pytest_cache -__pycache__ -*.pyc -*.pyo -*.pyd -build -dist -ci-logs -docs -tests -imports -site -voxvera/host -voxvera/resources/bin diff --git a/.flake8 b/.flake8 deleted file mode 100644 index a30b4cf..0000000 --- a/.flake8 +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -max-line-length = 120 -ignore = E501,E741,E401,E402 diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml deleted file mode 100644 index 97d1b86..0000000 --- a/.github/workflows/binaries.yml +++ /dev/null @@ -1,173 +0,0 @@ -name: Build Standalone Binaries - -on: - push: - tags: - - 'v*' - workflow_dispatch: - -jobs: - build: - name: Build for ${{ matrix.os }} - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, windows-latest, macos-latest] - include: - - os: ubuntu-22.04 - artifact_name: voxvera-linux-x86_64 - - os: windows-latest - artifact_name: voxvera-windows.exe - - os: macos-latest - artifact_name: voxvera-macos-x86_64 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install dependencies - run: | - pip install --upgrade setuptools pkg_resources || pip install --upgrade setuptools - pip install -r requirements.txt - pip install . - pip install pyinstaller pyinstaller-hooks-contrib - - - name: Download Tor Binaries - shell: bash - run: | - chmod +x scripts/download_tor.sh - ./scripts/download_tor.sh - - - name: Build with PyInstaller - shell: bash - run: | - if [ "$RUNNER_OS" == "Windows" ]; then SEP=";"; else SEP=":"; fi - pyinstaller --onefile \ - --collect-all pkg_resources \ - --collect-all setuptools \ - --hidden-import pkg_resources \ - --hidden-import setuptools \ - --hidden-import jaraco.text \ - --hidden-import jaraco.functools \ - --hidden-import jaraco.context \ - --hidden-import more_itertools \ - --hidden-import packaging \ - --hidden-import platformdirs \ - --collect-all onionshare_cli \ - --collect-all flask_socketio \ - --collect-all engineio \ - --collect-all socketio \ - --collect-all eventlet \ - --collect-all gevent \ - --add-data "voxvera/locales${SEP}voxvera/locales" \ - --add-data "voxvera/src${SEP}voxvera/src" \ - --add-data "voxvera/templates${SEP}voxvera/templates" \ - --add-data "voxvera/resources/tor${SEP}voxvera/resources/tor" \ - --add-data "support-matrix.json${SEP}." \ - --add-data "requirements.txt${SEP}." \ - --name "${{ matrix.artifact_name }}" \ - voxvera/cli.py - - - name: Validate built binary contract surface (Linux/macOS) - if: matrix.os != 'windows-latest' - shell: bash - run: | - ./dist/${{ matrix.artifact_name }} platform-status --json - ./dist/${{ matrix.artifact_name }} doctor --json - ./dist/${{ matrix.artifact_name }} autostart status --json - - - name: Validate built binary contract surface (Windows) - if: matrix.os == 'windows-latest' - shell: pwsh - run: | - & ".\dist\${{ matrix.artifact_name }}" platform-status --json - & ".\dist\${{ matrix.artifact_name }}" doctor --json - & ".\dist\${{ matrix.artifact_name }}" autostart status --json - - - name: Build .deb (Linux) - if: matrix.os == 'ubuntu-22.04' - run: | - mkdir -p voxvera/resources/bin - cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64 - chmod +x packaging/build_deb.sh - ./packaging/build_deb.sh dist/${{ matrix.artifact_name }} - - - name: Build AppImage (Linux) - if: matrix.os == 'ubuntu-22.04' - run: | - mkdir -p voxvera/resources/bin - cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64 - chmod +x packaging/build_appimage.sh - ./packaging/build_appimage.sh dist/${{ matrix.artifact_name }} - - - name: Validate Linux release artifacts - if: matrix.os == 'ubuntu-22.04' - shell: bash - run: | - chmod +x scripts/validate-release-artifacts.sh - ./scripts/validate-release-artifacts.sh - - - name: Build Flatpak (Linux) - if: matrix.os == 'ubuntu-22.04' - run: | - mkdir -p voxvera/resources/bin - cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64 - sudo apt-get update - sudo apt-get install -y flatpak flatpak-builder - chmod +x packaging/build_flatpak.sh - ./packaging/build_flatpak.sh dist/${{ matrix.artifact_name }} || echo "Flatpak build failed" - - - name: Build .dmg (macOS) - if: matrix.os == 'macos-latest' - run: | - mkdir -p voxvera/resources/bin - cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-macos-x86_64 - chmod +x packaging/build_dmg.sh - ./packaging/build_dmg.sh dist/${{ matrix.artifact_name }} - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: binaries-${{ matrix.os }} - path: | - dist/${{ matrix.artifact_name }} - voxvera/resources/bin/*.deb - voxvera/resources/bin/*.dmg - voxvera/resources/bin/*.AppImage - voxvera/resources/bin/*.flatpak - - publish: - name: Create GitHub Release - needs: build - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') - permissions: - contents: write - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts - - - name: Flatten artifacts for release - run: | - mkdir -p release_assets - find artifacts -type f -exec cp {} release_assets/ \; - ls -R release_assets/ - - - name: Release - uses: softprops/action-gh-release@v2 - with: - files: | - release_assets/* - fail_on_unmatched_files: false - overwrite: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 590000e..0717e6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,71 +2,26 @@ name: CI on: push: - branches: [ main ] + branches: [main] pull_request: jobs: - lint-test: + static-client: runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 10 steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22" - uses: actions/setup-python@v5 with: - python-version: '3.12' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y tor - python -m pip install --upgrade pip - pip install flake8 - pip install -e ".[test]" - pip install git+https://github.com/onionshare/onionshare.git#subdirectory=cli - - name: Lint - run: flake8 voxvera tests --exclude=voxvera/vendor --ignore=E501,W503,W293,E402,E306,E704,E261,F841,E302,F401,E401,F541 - - name: Test - run: pytest tests/ -v - - name: Platform smoke - run: bash scripts/platform-smoke.sh linux-cli - - platform-contract: - runs-on: ${{ matrix.os }} - timeout-minutes: 15 - strategy: - fail-fast: false - matrix: - include: - - os: macos-latest - smoke_target: macos-cli - - os: windows-latest - smoke_target: windows-cli - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Install dependencies - shell: bash + python-version: "3.12" + - name: Install Python test dependencies run: | python -m pip install --upgrade pip pip install -e ".[test]" - - name: Verify smoke target listing - shell: bash - run: bash scripts/platform-smoke.sh list - - name: Validate platform-status JSON - shell: bash - run: python -m voxvera.cli platform-status --json - - name: Validate doctor JSON - shell: bash - run: python -m voxvera.cli doctor --json - - name: Validate autostart JSON - shell: bash - run: python -m voxvera.cli autostart status --json - - docker-runtime: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - name: Docker runtime smoke - run: bash scripts/docker-runtime-smoke.sh + - name: Check frontend JavaScript + run: node --check site/nostr/nostr-client.js + - name: Run tests + run: pytest -q diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index c3b7a15..0000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: E2E - -on: - push: - pull_request: - -jobs: - e2e: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y tor - python -m pip install --upgrade pip - pip install -e ".[e2e]" - - name: Run end-to-end tests - run: ci/test-e2e.sh - continue-on-error: true - - name: Upload logs - if: always() - uses: actions/upload-artifact@v4 - with: - name: ci-logs - path: ci-logs/ diff --git a/.gitignore b/.gitignore index dee939d..f257445 100644 --- a/.gitignore +++ b/.gitignore @@ -1,59 +1,25 @@ -# Temporary files -*.tmp -tmp*/ +# Python +__pycache__/ +*.py[cod] +.pytest_cache/ +*.egg-info/ +.venv/ venv/ -.venv -!voxvera/ -!voxvera/resources/** -!voxvera/src/** -# OS and editor files +# Node/browser tooling +node_modules/ + +# Build and local output +build/ +dist/ +ci-logs/ + +# OS/editor noise .DS_Store Thumbs.db *~ *.swp -__pycache__/ -*.pyc -# Build and distribution artifacts -dist/ -build/ -*.egg-info/ - -# Electron app artifacts -gui/electron/node_modules/ -gui/electron/dist/ -gui/electron/build/ -gui/electron/out/ - -# Generated host directories -host/* -!host/voxvera/ - -# CI logs -ci-logs/ - -# Onionshare logs and session files +# Local browser/debug artifacts *.log -*.onionshare-session -gui/electron/package-lock.json -voxvera/src/config.json -voxvera/src/index.html -voxvera/src/nostr.html -voxvera/src/qrcode-content.png -voxvera/src/qrcode-tear-offs.png - -# PyInstaller -*.spec -dist_bin/ -voxvera/resources/bin/* -!voxvera/resources/bin/.gitkeep -site/download/*.zip -!site/download/voxvera-source.zip -site/download/*.exe -site/download/*.deb -site/download/*.dmg -site/download/*.AppImage -site/download/*.flatpak -site/download/voxvera-linux -site/download/voxvera-linux-x86_64 +*.pdf diff --git a/AGENTS.md b/AGENTS.md index 69f618b..eb9f885 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,42 +1,38 @@ -# AI Agent Instructions for VoxVera +# AI Agent Instructions For VoxVera -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. +`main` is the Nostr static-client branch. The old Tor/OnionShare CLI application is preserved on `legacy-tor`. -## Core Mandates +## Current Architecture -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. +- Active frontend: `site/nostr/` +- Static deployment root: `site` +- Browser dependencies: vendored under `site/nostr/vendor/` +- Python helper package: `voxvera/nostr/` +- Design plan: `docs/nostr-static-client-spec.md` -## Localization Protocol +## Guardrails -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. +- Do not reintroduce the legacy Tor CLI, OnionShare runtime, installer, Electron manager, bundled Tor binaries, generated old flyer site, or packaging workflows on `main`. +- Keep the Nostr client static and host-agnostic. +- Do not load frontend dependencies from CDNs. +- Treat Nostr event content as untrusted. Escape rendered content and reject unsafe schema input. +- Preserve print behavior: app controls must not print or shift the flyer sheet in print output. +- Preserve the old flyer visual language unless the user explicitly asks for a redesign. -## Universal Mirroring +## Localization -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). +- Use `site/nostr/locales.js` for flyer content defaults. +- Use `NOSTR_UI` in `site/nostr/nostr-client.js` for editor/viewer controls and Nostr-specific labels. +- Add translations for every supported language when adding user-facing strings. +- Check right-to-left languages when touching layout. -## Verification Checklist +## Verification -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. +Run: ---- +```bash +node --check site/nostr/nostr-client.js +pytest -q +``` -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. +For visual or print changes, also run a local static server and inspect `/nostr/` in a browser. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1fbcc64..461c314 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,48 +1,40 @@ -# Contributing to VoxVera +# Contributing To VoxVera -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. +VoxVera `main` is a static Nostr client. Keep contributions focused on the browser editor/viewer, Nostr event validation, printable flyer rendering, and static deployment. -## Adding a New Language +## Frontend -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: +- Edit the active app under `site/nostr/`. +- Keep dependencies vendored under `site/nostr/vendor/`; do not rely on CDNs. +- Preserve viewer mode as a flyer-first experience. +- Keep editor, load, print, language, and other controls hidden from print output. +- Verify print layout after changes that affect the flyer surface. -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. +## Localization -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. +The static client currently uses `site/nostr/locales.js` plus the `NOSTR_UI` table in `site/nostr/nostr-client.js`. -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. +When adding user-facing text: -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. +- Add translations for every supported language. +- Check right-to-left languages in the browser where layout may be affected. +- Keep side-tab strings short enough for tear-off strips. -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Recommended local check**: Run `bash scripts/check.sh` before opening a PR. It mirrors the main lint/test/build checks in one command. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. +## Nostr Schema ---- +Python validation helpers live in `voxvera/nostr/`. Keep the schema conservative: -Together, we can ensure that truth remains accessible to everyone, everywhere. +- Reject raw HTML in user-supplied flyer fields. +- Reject unsupported URL schemes. +- Keep attachments out of V1 events unless the spec is deliberately expanded. + +## Verification + +Run: + +```bash +node --check site/nostr/nostr-client.js +pytest -q +``` + +For UI work, also run a local static server and inspect `/nostr/` in a browser. diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 348eafb..0000000 --- a/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -FROM python:3.11-slim - -# Experimental container path: Linux systemd remains the supported -# persistent-host deployment target. - -# Install system dependencies (only runtime) -RUN apt-get update && apt-get install -y --no-install-recommends \ - tini tor onionshare-cli \ - && rm -rf /var/lib/apt/lists/* - -# Copy VoxVera source -COPY . /opt/voxvera -WORKDIR /opt/voxvera - -# Install VoxVera and its Python dependencies -RUN pip install . \ - && chmod +x scripts/docker-entrypoint.sh scripts/docker-healthcheck.sh \ - && ln -sf /opt/voxvera/scripts/docker-entrypoint.sh /usr/local/bin/voxvera-docker-entrypoint \ - && ln -sf /opt/voxvera/scripts/docker-healthcheck.sh /usr/local/bin/voxvera-docker-healthcheck - -# Prepare flyers volume -RUN mkdir /flyers -ENV VOXVERA_DIR=/flyers -ENV VOXVERA_RUNTIME=docker -VOLUME /flyers - -HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 CMD ["voxvera-docker-healthcheck"] - -ENTRYPOINT ["tini", "--", "voxvera-docker-entrypoint"] -CMD [] diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index b5cbb8e..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include voxvera/templates/** -include voxvera/src/** -include voxvera/resources/** -include voxvera/locales/** -include voxvera/resources/bin/** diff --git a/README.md b/README.md index afbcdd5..dba7cae 100644 --- a/README.md +++ b/README.md @@ -1,92 +1,54 @@ # VoxVera -**Anonymous Information Distribution Engine** +VoxVera is now a static Nostr-powered flyer client. -Generate printable flyers with QR codes linking to Tor (.onion) hidden services. VoxVera is built for activists, journalists, and anyone who needs to spread a message securely and anonymously. +The active app lives at [`site/nostr/`](site/nostr/). It lets a user author flyer content, publish it as a public Nostr event, and render the flyer later from an event ID or Nostr address. The frontend is intentionally self-contained: relays store the content, and any static host can serve the client. ---- +The previous Tor/OnionShare CLI version is preserved on the `legacy-tor` branch. -## Installation +## What Is In `main` -VoxVera is designed for maximum portability and censorship resistance. +- `site/nostr/`: static editor/viewer client +- `site/nostr/vendor/`: vendored browser dependencies for Nostr and QR generation +- `site/CNAME`: custom-domain target +- `voxvera/nostr/`: small Python schema/validation helpers +- `docs/nostr-static-client-spec.md`: design notes and development plan -Linux with systemd is the supported persistent-host deployment target. -Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey remain experimental until their background Tor hosting and auto-recovery paths are validated end-to-end. +## Local Development -See [docs/platform-support-matrix.md](docs/platform-support-matrix.md) for the canonical platform status table and [docs/roadmap-platform-parity.md](docs/roadmap-platform-parity.md) for the parity plan. -For the supported Linux hosting path, use [docs/linux-hosting-validation.md](docs/linux-hosting-validation.md) as the operational validation runbook. +Run the static site from the repo root: -### 1. Standalone Binaries (Recommended) -Download the executable for your OS: -- 🐧 [**Linux**](https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera-linux) -- 🪟 [**Windows (Experimental)**](https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera-windows.exe) -- 🍏 [**macOS (Experimental)**](https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera-macos) - -### 2. Universal Mirroring (The "Viral" Method) -If you found a physical VoxVera flyer, scan it and click **"Download"**. You will receive a `voxvera-portable.zip` containing the full tool, all dependencies, and all 14 languages—ready to run offline. - -### 3. One-Line Installer (Linux/macOS) ```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` -On Linux, this now installs the recurring `systemd --user` recovery timer used to retry hidden-service startup after boot or offline periods. On macOS, the installer path is still experimental. - -### 4. Developer / Python Install -```bash -pip install . -voxvera vendorize # Optional: pull dependencies locally for offline use +python3 -m http.server 8768 --directory site ``` -### 5. Local Validation -Run the full local validation sweep with: -```bash -bash scripts/check.sh +Then open: + +```text +http://127.0.0.1:8768/nostr/ ``` -This runs linting, Python tests, Electron smoke tests, dependency checks, and the docs/site rebuild steps used during development. ---- +No build command is required for the frontend. -## Key Features +## Vercel -* **Universal Mirroring**: Every flyer acts as a mirror for the tool itself. The "Download" button provides a portable version of VoxVera, creating a decentralized distribution network. -* **Standalone Binaries**: Zero-install executables for high-security environments. -* **Global Multi-Script Support**: Native support for 14 languages including **Arabic (RTL)**, **Hebrew (RTL)**, **Hindi (Devanagari)**, **Japanese/Chinese (CJK)**, and **Russian (Cyrillic)**. -* **Tor-Safe Architecture**: 100% static HTML flyers. Works perfectly in Tor "Safest" mode with **JavaScript completely disabled**. -* **Integrated Server Manager**: `voxvera manage` provides an interactive UI to handle multiple flyers, monitor Tor bootstrapping, and manage persistent .onion URLs. -* **Secure Migration**: Bulk export and import of flyers and their unique Tor identity keys via `~/voxvera-exports/`. +Point Vercel at this repository on `main`. ---- +- Framework preset: Other +- Root directory: repo root +- Build command: leave empty +- Output directory: `site` -## Documentation +The root `site/index.html` redirects to `/nostr/`, so the domain can serve the current client without preserving the legacy Tor page. -VoxVera is available in multiple languages. Select your preferred language for the detailed usage guide: +## Verification -| Language | Documentation | Contributing | Agent Guide | -| :--- | :--- | :--- | :--- | -| 🇺🇸 **English** | [usage.md](docs/en/usage.md) | [CONTRIBUTING.md](docs/en/CONTRIBUTING.md) | [AGENTS.md](docs/en/AGENTS.md) | -| 🇪🇸 **Español** | [usage.md](docs/es/usage.md) | [CONTRIBUTING.md](docs/es/CONTRIBUTING.md) | [AGENTS.md](docs/es/AGENTS.md) | -| 🇩🇪 **Deutsch** | [usage.md](docs/de/usage.md) | [CONTRIBUTING.md](docs/de/CONTRIBUTING.md) | [AGENTS.md](docs/de/AGENTS.md) | -| 🇫🇷 **Français** | [usage.md](docs/fr/usage.md) | [CONTRIBUTING.md](docs/fr/CONTRIBUTING.md) | [AGENTS.md](docs/fr/AGENTS.md) | -| 🇷🇺 **Русский** | [usage.md](docs/ru/usage.md) | [CONTRIBUTING.md](docs/ru/CONTRIBUTING.md) | [AGENTS.md](docs/ru/AGENTS.md) | -| 🇮🇱 **עברית** | [usage.md](docs/he/usage.md) | [CONTRIBUTING.md](docs/he/CONTRIBUTING.md) | [AGENTS.md](docs/he/AGENTS.md) | -| 🇸🇦 **العربية** | [usage.md](docs/ar/usage.md) | [CONTRIBUTING.md](docs/ar/CONTRIBUTING.md) | [AGENTS.md](docs/ar/AGENTS.md) | -| 🇯🇵 **日本語** | [usage.md](docs/ja/usage.md) | [CONTRIBUTING.md](docs/ja/CONTRIBUTING.md) | [AGENTS.md](docs/ja/AGENTS.md) | -| 🇮🇳 **हिन्दी** | [usage.md](docs/hi/usage.md) | [CONTRIBUTING.md](docs/hi/CONTRIBUTING.md) | [AGENTS.md](docs/hi/AGENTS.md) | -| 🇰🇪 **Kiswahili** | [usage.md](docs/sw/usage.md) | [CONTRIBUTING.md](docs/sw/CONTRIBUTING.md) | [AGENTS.md](docs/sw/AGENTS.md) | +```bash +node --check site/nostr/nostr-client.js +pytest -q +``` ---- - -## Roadmap (v0.2.0) - -We are actively working on: -- **PGP Signing**: Cryptographic proof of tool integrity. -- **Nostr Integration**: Automated social amplification. -- **Template Gallery**: Visual styles for protests, alerts, and art. -- **Self-Healing Network**: Automated decentralized updates. - -See [ROADMAP-v0.2.0.md](docs/roadmap-v0.2.0.md) for details. - ---- +The Python tests only cover the Nostr source schema. The frontend is static and should be checked in-browser for layout and print behavior after UI changes. ## License diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index 9269ffd..0000000 --- a/RELEASE.md +++ /dev/null @@ -1,104 +0,0 @@ -# VoxVera Release Process - -**⚠️ ATTENTION AI AGENTS (CRITICAL WORKFLOW):** -Do **NOT** automatically package, tag, or push a new release after completing a set of changes. Releases should **ONLY** be triggered when the user explicitly requests one (e.g., "Package a release now" or "Let's release this"). -Instead of releasing immediately, you must append a summary of your completed work to the `UPCOMING_RELEASE.md` file. This allows development to span multiple context sessions and ensures that new releases contain a substantial amount of value. When a release is finally requested, use the contents of `UPCOMING_RELEASE.md` to format the GitHub Release notes, and then clear the document for the next cycle. - -This document outlines the mandatory steps to perform before every release to ensure code quality, cross-language integrity, and professional distribution assets. - -## 1. Pre-Flight Checks (Quality Assurance) - -Before any release, the codebase must pass all internal quality checks **without taking any shortcuts**. All tests must be rigorous, use real data where appropriate, and passing them should be a true mark of quality. - -### Run Tests -Ensure all core CLI, E2E, and Integrity tests pass: -```bash -pytest tests/ -``` -*Note: The `test_integrity.py` check is critical as it verifies that all 14+ language locales have synchronized keys and all binary bundles are 100% self-contained.* - -### Run Linting -Ensure the code adheres to style guidelines (no trailing whitespace, proper spacing, etc.): -```bash -# Using flake8 (excluding vendored dependencies) -flake8 voxvera/ --exclude=voxvera/vendor/ -``` - -## 2. Update & Generate Localized Assets - -Before releasing, you must ensure that **all documentation accurately reflects the new features and functions** introduced in the release. - -All documentation and site templates must be synchronized with the translation system. This ensures that any changes to documentation are reflected across all 14+ supported languages. - -### Synchronize Documentation -If you have modified any documentation templates in `docs/templates/` (which you should, to cover new features), you **must** use the translation system to regenerate the localized documentation before release: -```bash -# Regenerate docs/ folders for all languages from templates and locales -python3 -m voxvera.cli build-docs -``` - -### Synchronize Site Assets -The main `site/` directory (including QRs, HTML, and portable Zips) must also be refreshed to include the latest binary names and locale strings: -```bash -# Refresh site/ directory -python3 -m voxvera.cli build-site -``` - -## 3. Build Distribution Binaries - -Linux CLI delivery is the supported deployment target today. Other package formats should be treated as experimental release artifacts until their Tor/OnionShare background-hosting behavior is validated end-to-end. -Capture platform evidence before promoting any support tier: run `bash scripts/platform-smoke.sh linux-cli` locally for the supported Linux path, and keep CI/workflow evidence aligned with the same command. -As other runtime targets mature, use `bash scripts/platform-smoke.sh macos-cli`, `bash scripts/platform-smoke.sh windows-cli`, or `bash scripts/platform-smoke.sh docker-cli` on their native environments before changing their support labels. - -### Standard Binary -Generates an architecture-specific binary (e.g., `voxvera-linux-x86_64`) in `voxvera/resources/bin/`. -```bash -./scripts/build_binaries.sh -``` -This directory is local build output only. Do not treat old files in `voxvera/resources/bin/` as canonical release history; the GitHub Release artifacts are the publish surface. - -### AppImage (Linux) -Wraps the standard binary into a self-contained AppImage. -```bash -./packaging/build_appimage.sh -``` -Experimental package surface. - -### Flatpak (Linux) -Generates a standalone `.flatpak` bundle. Requires `flatpak-builder`. -```bash -./packaging/build_flatpak.sh -``` -Experimental package surface. - -### Debian Package (Linux) -Generates a `.deb` package for Debian/Ubuntu systems. -```bash -./packaging/build_deb.sh -``` -Experimental package surface unless its runtime dependencies and recovery behavior are explicitly validated for the release. - -### DMG (macOS) -Generates a `.dmg` installer for macOS (must be run on macOS). -```bash -./packaging/build_dmg.sh -``` -Experimental package surface. - -## 4. Release Execution - -1. **Version Bump:** Update `__version__` in `voxvera/__init__.py` and `version` in `pyproject.toml`. -2. **Commit & Tag:** - ```bash - git add . - git commit -m "chore: release vX.Y.Z" - git tag -a vX.Y.Z -m "VoxVera vX.Y.Z" - git push origin main --tags - ``` -## 5. Automated Releases (GitHub Actions) - -The repository is configured with a **Build Standalone Binaries** workflow that automatically runs when a new tag (`v*`) is pushed. This workflow: -- Builds native executables for **Linux**, **Windows (.exe)**, and **macOS**. -- Automatically attaches these binaries to the corresponding GitHub Release. - -This ensures that Windows users receive a professional `voxvera-windows.exe` rather than having to rely on `.bat` or `.sh` scripts. diff --git a/UPCOMING_RELEASE.md b/UPCOMING_RELEASE.md deleted file mode 100644 index fdb580d..0000000 --- a/UPCOMING_RELEASE.md +++ /dev/null @@ -1 +0,0 @@ -# Upcoming Release Notes diff --git a/ci/test-e2e.sh b/ci/test-e2e.sh deleted file mode 100755 index 2e7bb15..0000000 --- a/ci/test-e2e.sh +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Robustness: ensure we are in the project root -cd "$(dirname "$0")/.." - -LOG_DIR="$(pwd)/ci-logs" -mkdir -p "$LOG_DIR" -# Use a subshell for tee to avoid issues with some shell environments -exec > >(tee "$LOG_DIR/run.log") 2>&1 - -echo "Starting E2E verification at $(date)" - -# Install VoxVera -if [ -n "${VOXVERA_BIN:-}" ] && [ -f "$VOXVERA_BIN" ]; then - voxvera_cmd="$VOXVERA_BIN" - echo "Using provided VoxVera binary: $voxvera_cmd" >&2 -elif command -v voxvera >/dev/null 2>&1; then - voxvera_cmd="$(command -v voxvera)" - echo "Using existing VoxVera on PATH: $voxvera_cmd" >&2 -else - echo "Installing VoxVera in editable mode..." - python3 -m pip install --break-system-packages --no-build-isolation -e ".[e2e]" - voxvera_cmd="$(command -v voxvera || echo "$HOME/.local/bin/voxvera")" -fi - -echo "VoxVera command: $voxvera_cmd" - -echo "Checking platform contract before workflow..." -bash scripts/platform-smoke.sh linux-cli - -# Generate demo flyer -echo "Initializing demo flyer..." -"$voxvera_cmd" --lang en init --template voxvera <&2 - exit 1 -fi - -echo "Building demo flyer..." -"$voxvera_cmd" --lang en --config "$config_path" build - -# Verify build output exists in host/ -folder_name="voxvera" -host_dir="$HOME/host/$folder_name" - -if [ ! -d "$host_dir" ]; then - echo "CRITICAL: Host directory $host_dir not found!" >&2 - ls -R "$HOME/host/" || true - exit 1 -fi - -ls -R "$host_dir" >>"$LOG_DIR/tree.txt" - -# Verify essential files -for f in index.html config.json; do - if [ ! -f "$host_dir/$f" ]; then - echo "CRITICAL: Missing $f in $host_dir" >&2 - exit 1 - fi -done -echo "Build output verified in $host_dir" - -# Run pytest unit tests -echo "Running pytest unit tests..." -python3 -m pytest tests/ -v 2>&1 | tee "$LOG_DIR/pytest.log" - -# Optional network tests -if [ "${VOXVERA_E2E_OFFLINE:-}" != "1" ]; then - echo "Starting network-dependent tests..." - - # GitHub Actions Ubuntu runners have Tor pre-installed and running as a service. - # We stop it to ensure we can run our own instance with known configuration on default ports. - echo "Stopping system Tor service if running..." - sudo systemctl stop tor || true - - # Kill any lingering tor processes - sudo pkill -x tor || true - - echo "Starting a fresh Tor instance on default ports (9050/9051)..." - mkdir -p "$LOG_DIR/tor_data" - tor --SocksPort 9050 --ControlPort 9051 --CookieAuthentication 0 --DataDirectory "$LOG_DIR/tor_data" >"$LOG_DIR/tor.log" 2>&1 & - TOR_PID=$! - - # Wait for Tor to bootstrap - echo "Waiting for Tor to bootstrap (up to 120s)..." - BOOTSTRAPPED=0 - for i in {1..120}; do - if grep -q "Bootstrapped 100%" "$LOG_DIR/tor.log"; then - echo "Tor bootstrapped successfully." - BOOTSTRAPPED=1 - break - fi - [ $((i % 10)) -eq 0 ] && echo "... still bootstrapping Tor ($i s) ..." - sleep 1 - done - - if [ $BOOTSTRAPPED -eq 0 ]; then - echo "CRITICAL: Tor failed to bootstrap after 120s" >&2 - tail -n 20 "$LOG_DIR/tor.log" - kill ${TOR_PID:-} || true - exit 1 - fi - - echo "Checking platform contract with live Tor..." - VOXVERA_REQUIRE_TOR=1 bash scripts/platform-smoke.sh linux-cli - - # Start OnionShare - echo "Starting OnionShare..." - # Explicitly set environment variables that OnionShare-cli respects - export TOR_SOCKS_PORT=9050 - export TOR_CONTROL_PORT=9051 - - onionshare-cli --website --public \ - --persistent "$host_dir/.onionshare-session" \ - -v \ - "$host_dir" >"$LOG_DIR/onionshare.log" 2>&1 & - OS_PID=$! - - # Check if OnionShare process is still alive after a few seconds - sleep 5 - if ! kill -0 $OS_PID 2>/dev/null; then - echo "CRITICAL: OnionShare-cli failed to start" >&2 - cat "$LOG_DIR/onionshare.log" - kill ${TOR_PID:-} || true - exit 1 - fi - - # Wait for URL with timeout and feedback - echo "Waiting for OnionShare to generate URL (up to 120s)..." - URL="" - for i in {1..120}; do - # Use -a to process as text even if there are binary chars (ANSI codes) - if grep -aEo 'http[s]?://[a-z2-7]{56}\.onion' "$LOG_DIR/onionshare.log" | head -n1 >"$LOG_DIR/url.txt"; then - URL=$(cat "$LOG_DIR/url.txt" | tr -d '\r\n ') - if [ -n "$URL" ]; then - echo "Successfully generated Onion URL: $URL" - break - fi - fi - [ $((i % 10)) -eq 0 ] && echo "... still waiting ($i s) ..." - sleep 1 - done - - if [ -z "$URL" ]; then - echo "CRITICAL: Onion URL not found after 120s" >&2 - echo "--- Last 20 lines of OnionShare log ---" - tail -n 20 "$LOG_DIR/onionshare.log" - kill $OS_PID || true - kill ${TOR_PID:-} || true - exit 1 - fi - - # Robustness: Manually update the config.json with the URL so verification passes - # and the site is actually using the live onion address. - echo "Updating $host_dir/config.json with live URL: $URL" - python3 <&2 - cat "$host_dir/config.json" - kill $OS_PID || true - kill ${TOR_PID:-} || true - exit 1 - fi - - # Re-build to update QR codes with live onion URL - echo "Re-building site with live URL..." - "$voxvera_cmd" --lang en build --config "$host_dir/config.json" - - # Fetch page via Tor (retry a few times as circuits can be flaky) - echo "Verifying reachability via Tor (on port 9050)..." - FETCHED=0 - for attempt in {1..5}; do - echo "Attempt $attempt..." - if curl --socks5-hostname 127.0.0.1:9050 -fsSL "$URL" | grep -q ''; then - echo "Success: Site is reachable via Tor." - FETCHED=1 - break - fi - sleep 10 - done - - if [ $FETCHED -eq 0 ]; then - echo "WARNING: Site could not be reached via Tor after 5 attempts, but OnionShare is running." - # In CI, we might skip hard failure if Tor network is exceptionally slow/blocked - fi - - # Clean up - echo "Cleaning up..." - kill $OS_PID || true - kill ${TOR_PID:-} || true - wait $OS_PID 2>/dev/null || true -else - echo "Skipping network-dependent tests (VOXVERA_E2E_OFFLINE=1)" >&2 -fi - -echo "E2E verification complete at $(date)" -exit 0 diff --git a/docs/ar/AGENTS.md b/docs/ar/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/ar/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/ar/CONTRIBUTING.md b/docs/ar/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/ar/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/ar/docker.md b/docs/ar/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/ar/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/ar/templates.md b/docs/ar/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/ar/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/ar/troubleshooting.md b/docs/ar/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/ar/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/ar/usage.md b/docs/ar/usage.md deleted file mode 100644 index 8094686..0000000 --- a/docs/ar/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# الاستخدام التفصيلي - -يغطي هذا الدليل سير عمل واجهة سطر الأوامر (CLI) الشائعة. راجع `docs/docker.md` للحصول على تعليمات Docker و `docs/templates.md` لقوالب المنشورات المتاحة. - -## المتطلبات الأساسية - -تم تصميم VoxVera ليكون سهل النقل للغاية ويتطلب الحد الأدنى من تبعيات النظام. - -### 1. الملفات الثنائية المستقلة (موصى به) -يمكنك تنزيل ملفات ثنائية مستقلة بدون تبعيات لنظام التشغيل الخاص بك: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -تتضمن هذه الملفات الثنائية كل ما يلزم لتشغيل VoxVera (باستثناء `onionshare-cli`). - -### 2. المثبت بنقرة واحدة -بدلاً من ذلك، قم بالتثبيت عبر البرمجية النصية المؤتمتة الخاصة بنا: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. تثبيت Python اليدوي -إذا كنت تفضل التشغيل من المصدر: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## خطوة بخطوة - -1. **التهيئة:** قم بتشغيل `voxvera init` واتبع المطالبات. سيُطلب منك اختيار لغتك أولاً. -2. **البناء:** قم بإنشاء أصول المنشور. ينشئ كل بناء تلقائياً ملف `voxvera-portable.zip` في مجلد المنشور، مما يسمح للآخرين بتنزيل الأداة الكاملة مباشرة من منشورك. - ```bash - voxvera build - ``` -3. **الخدمة:** انشر المنشور عبر Tor: - ```bash - voxvera serve - ``` - يكتشف هذا تلقائياً نسخة Tor الخاصة بك، ويبدأ OnionShare، ويكتب عنوان .onion الناتج في روابط المنشور القابلة للنزع. - -## دعم اللغة - -VoxVera مترجم بالكامل. يمكنك تغيير تفضيل اللغة الخاص بك بشكل دائم باستخدام المبدل التفاعلي أو اختصار مباشر: - -- **المبدل التفاعلي:** `voxvera lang` -- **اختصار مباشر:** `voxvera --lang ar` (يضبط التفضيل على العربية) - -### اللغات المدعومة: -- **الإنجليزية:** `en` -- **الإسبانية:** `es` (اسم مستعار: `--idioma`) -- **الألمانية:** `de` (اسم مستعار: `--sprache`) -- **العربية:** `ar` - -يمكنك أيضاً فرض لغة معينة لأمر واحد دون تغيير تفضيلك الدائم: -- **الإنجليزية:** `voxvera --lang en check` -- **العربية:** `voxvera --lang ar check` - -تكتشف المنشورات الناتجة تلقائياً لغة متصفح الزائر وتبدل نص واجهة المستخدم وفقاً لذلك. - -## إدارة الخوادم - -إدارة منشورات متعددة وهويات Tor الخاصة بها من قائمة تفاعلية واحدة: - -```bash -voxvera manage -``` - -الميزات: -- **--- إنشاء موقع/منشور جديد ---**: ابدأ تسلسل الإعداد الكامل. -- **--- تشغيل جميع المواقع ---**: تشغيل أو إيقاف جميع المنشورات في أسطولك دفعة واحدة. -- **الحالة في الوقت الفعلي**: عرض روابط .onion النشطة ومؤشرات تقدم تمهيد Tor. -- **التحكم الفردي**: تصدير إلى Zip مواقع معينة إلى ZIP أو حذفها. - -## مراجة شاملة (التوزيع الفيروسي) - -لضمان بقاء VoxVera متاحاً حتى لو تم فرض رقابة على المستودعات المركزية، يعمل كل منشور كمرآة للأداة. - -عندما تستضيف منشوراً، يوفر زر **"تحميل الأداة والكود"** في الصفحة المقصودة ملف `voxvera-portable.zip` يحتوي على: -- كود المصدر الكامل وجميع اللغات المدعومة. -- جميع تبعيات Python (مضمنة مسبقاً). -- ملفات Tor الثنائية لجميع الأنظمة. - -يتيح ذلك لأي شخص يقوم بمسح منشورك أن يصبح موزعاً جديداً لأداة VoxVera. - -## التصدير والنسخ الاحتياطي - -قم بنسخ هويات Tor الفريدة الخاصة بك احتياطياً (حتى لا يتغير رابط .onion الخاص بك أبداً) أو انقل منشوراتك إلى جهاز آخر. - -- **تصدير موقع واحد**: `voxvera export <folder_name>` -- **تصدير جميع المواقع**: `voxvera export-all` - -**مكان التخزين:** يتم حفظ جميع الصادرات كملفات ZIP في مجلد يسمى `voxvera-exports` في دليل الصفحة الرئيسية للمستخدم (`~/voxvera-exports/`) على جميع الأنظمة. - -## الاستيراد والاستعادة - -استعد إعدادك بالكامل على جهاز جديد بنقل ملفات ZIP الخاصة بك إلى `~/voxvera-exports/` وتشغيل: - -```bash -voxvera import-multiple -``` - -## النقل والتشغيل بدون إنترنت - -إذا كنت بحاجة إلى تشغيل VoxVera على جهاز لا يتوفر فيه اتصال بالإنترنت، يمكنك "تضمين" التبعيات أولاً: - -```bash -voxvera vendorize -``` - -يقوم هذا بتنزيل جميع مكتبات Python المطلوبة في `voxvera/vendor/`. ستعطي الأداة بعد ذلك الأولوية لهذه الملفات المحلية، مما يسمح لها بالعمل بدون `pip install`. - -## استيراد جماعي (JSON) - -لإنشاء منشورات بشكل جماعي من ملفات تكوين JSON متعددة، ضعها في مجلد `imports/` وشغل: - -```bash -voxvera batch-import -``` - -## كيف تعمل الروابط - -يحتوي كل منشور على رابطين منفصلين: -- **رابط قابل للنزع** (يتم إنشاؤه تلقائياً): عنوان .onion حيث يتم استضافة المنشور. -- **رابط المحتوى** (يتم تكوينه بواسطة المستخدم): URL خارجي يشير إلى موقع ويب أو فيديو أو تنزيل. - -لا تحتاج إلى إدخال عنوان .onion يدوياً؛ يتولى VoxVera ذلك تلقائياً خلال مرحلة `serve`. diff --git a/docs/de/AGENTS.md b/docs/de/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/de/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/de/CONTRIBUTING.md b/docs/de/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/de/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/de/docker.md b/docs/de/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/de/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/de/templates.md b/docs/de/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/de/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/de/troubleshooting.md b/docs/de/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/de/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/de/usage.md b/docs/de/usage.md deleted file mode 100644 index d9f1697..0000000 --- a/docs/de/usage.md +++ /dev/null @@ -1,136 +0,0 @@ -# Detaillierte Verwendung - -Diese Anleitung deckt gängige CLI-Workflows ab. Informationen zu Docker finden Sie unter `docs/docker.md` und verfügbare Flyer-Vorlagen unter `docs/templates.md`. - -## Voraussetzungen - -VoxVera ist auf hohe Portabilität ausgelegt und erfordert minimale Systemabhängigkeiten. - -### 1. Eigenständige Binärdateien (Empfohlen) -Sie können eigenständige Binärdateien ohne Abhängigkeiten für Ihr Betriebssystem herunterladen: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Diese Binärdateien enthalten alles, was zum Ausführen von VoxVera erforderlich ist (außer `onionshare-cli`). - -### 2. Ein-Zeilen-Installer -Alternativ können Sie die Installation über unser automatisiertes Skript vornehmen: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Manuelle Python-Installation -Wenn Sie lieber aus dem Quellcode ausführen möchten: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Schritt für Schritt - -1. **Initialisieren:** Führen Sie `voxvera init` aus und folgen Sie den Anweisungen. Sie werden zuerst aufgefordert, Ihre Sprache auszuwählen. -2. **Bauen:** Erstellen Sie die Flyer-Assets. Jeder Build erstellt automatisch eine `voxvera-portable.zip` im Flyer-Ordner, sodass andere das komplette Tool direkt von Ihrem Flyer herunterladen können. - ```bash - voxvera build - ``` -3. **Bereitstellen:** Veröffentlichen Sie den Flyer über Tor: - ```bash - voxvera serve - ``` - Dies erkennt automatisch Ihre Tor-Instanz, startet OnionShare und schreibt die generierte .onion-Adresse in die Abreiß-Links des Flyers. - -## Sprachunterstützung - -VoxVera ist vollständig lokalisiert. Sie können Ihre Sprachpräferenz dauerhaft über den interaktiven Selektor oder eine direkte Verknüpfung ändern: - -- **Interaktiver Selektor:** `voxvera lang` -- **Direkte Verknüpfung:** `voxvera --lang de` (setzt die Präferenz auf Deutsch) - -### Unterstützte Sprachen: -- **Englisch:** `en` -- **Spanisch:** `es` (Alias: `--idioma`) -- **Deutsch:** `de` (Alias: `--sprache`) -- **Russisch:** `ru` -- **Hebräisch:** `he` -- **Arabisch:** `ar` -- **Französisch:** `fr` -- **Japanisch:** `ja` -- **Hindi:** `hi` -- **Suaheli:** `sw` - -Sie können auch eine bestimmte Sprache für einen einzelnen Befehl erzwingen, ohne Ihre dauerhafte Präferenz zu ändern: -- **Englisch:** `voxvera --lang en check` -- **Deutsch:** `voxvera --sprache de check` - -Die generierten Flyer erkennen automatisch die Browsersprache des Besuchers und schalten den UI-Text entsprechend um. - -## Server-Verwaltung - -Verwalten Sie mehrere Flyer und deren Tor-Identitäten über ein einziges interaktives Menü: - -```bash -voxvera manage -``` - -Funktionen: -- **--- Neue Website/Flyer erstellen ---**: Starten Sie die vollständige Setup-Sequenz. -- **--- Alle Websites starten ---**: Starten oder stoppen Sie alle Flyer in Ihrer Flotte auf einmal. -- **Echtzeit-Status**: Zeigen Sie aktive .onion-URLs und Tor-Bootstrapping-Fortschrittsanzeigen an. -- **Individuelle Steuerung**: Als Zip exportieren Sie bestimmte Seiten in eine ZIP-Datei oder löschen Sie sie. - -## Universelle Spiegelung (Virale Verteilung) - -Um sicherzustellen, dass VoxVera auch dann zugänglich bleibt, wenn zentrale Repositories zensiert werden, fungiert jeder Flyer als Spiegel für das Tool. - -Wenn Sie einen Flyer hosten, bietet die Schaltfläche **"Tool & Quellcode herunterladen"** auf der Landingpage eine `voxvera-portable.zip` an, die Folgendes enthält: -- Den vollständigen Quellcode und alle unterstützten Sprachen. -- Alle Python-Abhängigkeiten (vorinstalliert). -- Plattformübergreifende Tor-Binärdateien. - -Dies ermöglicht es jedem, der Ihren Flyer scannt, ein neuer Distributor des VoxVera-Tools zu werden. - -## Export & Sicherung - -Sichern Sie Ihre eindeutigen Tor-Identitäten (damit sich Ihre .onion-URL nie ändert) oder verschieben Sie Ihre Flyer auf einen anderen Computer. - -- **Einzelne Seite exportieren:** `voxvera export <folder_name>` -- **Alle Seiten exportieren:** `voxvera export-all` - -**Speicherort:** Alle Exporte werden als ZIP-Dateien in einem Ordner namens `voxvera-exports` im Home-Verzeichnis des Benutzers (`~/voxvera-exports/`) auf allen Plattformen gespeichert. - -## Import & Wiederherstellung - -Stellen Sie Ihr gesamtes Setup auf einem neuen Computer wieder her, indem Sie Ihre ZIP-Dateien nach `~/voxvera-exports/` verschieben und Folgendes ausführen: - -```bash -voxvera import-multiple -``` - -## Portabilität & Offline-Nutzung - -Wenn Sie VoxVera auf einem Computer ohne Internetzugang ausführen müssen, können Sie die Abhängigkeiten zuerst lokal bereitstellen: - -```bash -voxvera vendorize -``` - -Dies lädt alle erforderlichen Python-Bibliotheken in `voxvera/vendor/` herunter. Das Tool priorisiert dann diese lokalen Dateien, sodass es ohne `pip install` ausgeführt werden kann. - -## Batch-Import (JSON) - -Um Flyer in großen Mengen aus mehreren JSON-Konfigurationsdateien zu generieren, legen Sie diese im Verzeichnis `imports/` ab und führen Sie Folgendes aus: - -```bash -voxvera batch-import -``` - -## Wie URLs funktionieren - -Jeder Flyer hat zwei separate URLs: -- **Abreiß-Link** (automatisch generiert): Die .onion-Adresse, unter der der Flyer gehostet wird. -- **Inhalts-Link** (vom Benutzer konfiguriert): Eine externe URL, die auf eine Website, ein Video oder einen Download verweist. - -Sie müssen die .onion-Adresse nicht manuell eingeben; VoxVera erledigt dies automatisch während der `serve`-Phase. diff --git a/docs/en/AGENTS.md b/docs/en/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/en/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/en/CONTRIBUTING.md b/docs/en/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/en/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/en/docker.md b/docs/en/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/en/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/en/templates.md b/docs/en/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/en/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/en/troubleshooting.md b/docs/en/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/en/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/en/usage.md b/docs/en/usage.md deleted file mode 100644 index a553528..0000000 --- a/docs/en/usage.md +++ /dev/null @@ -1,156 +0,0 @@ -# Detailed Usage - -This guide covers common CLI workflows. See `docs/docker.md` for Docker instructions and `docs/templates.md` for available flyer templates. - -## Prerequisites - -VoxVera is designed to be highly portable. You can run it directly from the source code on any platform with Python installed. - -Linux with `systemd --user` is the supported persistent-host environment. Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and should not yet be treated as equally reliable hidden-service deployment targets. - -### 1. Automated Install (Recommended) -The easiest way to install VoxVera is using the Linux-first installer script: - -**Linux / macOS:** -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` -On Linux, this also installs the recurring recovery timer used to retry hidden-service startup after boot and after missed/offline periods. - -**Windows (PowerShell):** -```powershell -irm https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.ps1 | iex -``` -The Windows installer is experimental and does not yet guarantee production-ready background hosting behavior. - -### 2. Manual Source Install -If you have downloaded the source code ZIP: - -1. **Extract** the ZIP file. -2. **Open a terminal** in the extracted folder. -3. **Run the setup script**: - - **Linux/macOS:** `./setup.sh` - - **Windows:** `.\voxvera-install.sh` (or run `python -m pip install .`) - -## Uninstallation - -If you wish to remove VoxVera from your system, you can use the provided uninstall scripts from the source directory. This will safely remove the CLI tool and any downloaded dependencies. - -- **Linux / macOS:** Run `./uninstall.sh` -- **Windows (PowerShell):** Run `.\uninstall.ps1` - -*Note: Uninstallation will not delete your generated flyers or your `.onion` keys stored in the `~/voxvera-exports` or local `host/` folders.* - -## Step-by-Step - -1. **Initialize:** Run `voxvera init` and follow the prompts. You will be asked to select your language first. -2. **Build:** Generate the flyer assets. Every build automatically creates a `voxvera-portable.zip` in the flyer's folder, allowing others to download the full tool directly from your flyer. - ```bash - voxvera build - ``` -3. **Serve:** Publish the flyer over Tor: - ```bash - voxvera serve - ``` - This automatically detects your Tor instance, starts OnionShare, and writes the generated .onion address into the flyer's tear-off links. - -### Persistent Hosting On Linux - -For a machine that should resume hosting automatically after boot or after being offline, install the autostart recovery timer: - -```bash -voxvera autostart -``` - -This installs a `systemd --user` timer that reruns `voxvera start-all` every few minutes. The retry loop is the supported way to recover hidden-service hosting after suspend, reboot, or temporary network loss. - -## Language Support - -VoxVera is fully localized. You can change your language preference permanently using either the interactive selector or a direct shortcut: - -- **Interactive Selector:** `voxvera lang` -- **Direct Shortcut:** `voxvera --lang de` (sets preference to German) - -### Supported Languages: -- **English:** `en` -- **Spanish:** `es` (alias: `--idioma`) -- **German:** `de` (alias: `--sprache`) - -You can also force a specific language for a single command without changing your permanent preference: -- **English:** `voxvera --lang en check` -- **German:** `voxvera --sprache de check` -- **Spanish:** `voxvera --idioma es check` - -The generated flyers automatically detect the visitor's browser language and switch the UI text accordingly. - -## Server Management - -Manage multiple flyers and their Tor identities from a single interactive menu: - -```bash -voxvera manage -``` - -Features: -- **--- Create New Site/Flyer ---**: Start the full setup sequence. -- **--- Start All Sites ---**: Launch or shut down every flyer in your fleet at once. -- **Real-time Status**: View active `.onion` URLs and Tor bootstrapping progress indicators. -- **Individual Control**: Export to Zip specific sites to ZIP or delete them. - -## Universal Mirroring (Viral Distribution) - -To ensure VoxVera remains accessible even if central repositories are censored, every flyer acts as a mirror for the tool. - -When you host a flyer, the **"Download Source Code"** button on the landing page provides a `voxvera-source.zip` containing: -- The full source code and all supported languages. -- Installation and setup scripts for all platforms. -- Complete documentation and templates. - -To keep the mirrored download practical for low-bandwidth redistribution, the -source archive does not ship pre-downloaded Tor binaries. Normal installer and -release builds still fetch or bundle those artifacts separately. - -This allows anyone who scans your flyer to become a new distributor of the VoxVera tool. - -## Export & Backup - -Back up your unique Tor identities (so your `.onion` URL never changes) or move your flyers to another machine. - -- **Export a single site**: `voxvera export <folder_name>` -- **Export all sites**: `voxvera export-all` - -**Storage location:** All exports are saved to `~/voxvera-exports/` on all platforms. - -## Import & Recovery - -Restore your entire setup on a new machine by moving your ZIP files to `~/voxvera-exports/` and running: - -```bash -voxvera import-multiple -``` - -## Portability & Offline Use - -If you need to run VoxVera on a machine without internet access, you can "vendorize" the dependencies first: - -```bash -voxvera vendorize -``` - -This downloads all required Python libraries into `voxvera/vendor/`. The tool will then prioritize these local files, allowing it to run without `pip install`. - -## Batch Import (JSON) - -To bulk-generate flyers from multiple JSON configuration files, place them in the `imports/` directory and run: - -```bash -voxvera batch-import -``` - -## How URLs Work - -Each flyer has two separate URLs: -- **Tear-off link** (auto-generated): The .onion address where the flyer is hosted. -- **Content link** (user-configured): An external URL pointing to a website, video, or download. - -You do not need to manually enter the .onion address; VoxVera handles this automatically during the `serve` phase. diff --git a/docs/es/AGENTS.md b/docs/es/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/es/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/es/CONTRIBUTING.md b/docs/es/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/es/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/es/docker.md b/docs/es/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/es/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/es/templates.md b/docs/es/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/es/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/es/troubleshooting.md b/docs/es/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/es/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/es/usage.md b/docs/es/usage.md deleted file mode 100644 index 960b082..0000000 --- a/docs/es/usage.md +++ /dev/null @@ -1,136 +0,0 @@ -# Uso detallado - -Esta guía cubre los flujos de trabajo de CLI comunes. Consulte `docs/docker.md` para obtener instrucciones de Docker y `docs/templates.md` para conocer las plantillas de volantes disponibles. - -## Prerrequisitos - -VoxVera está diseñado para ser altamente portátil y requiere un mínimo de dependencias del sistema. - -### 1. Binarios independientes (Recomendado) -Puede descargar binarios independientes sin dependencias para su sistema operativo: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Estos binarios incluyen todo lo necesario para ejecutar VoxVera (excepto `onionshare-cli`). - -### 2. Instalador de una sola línea -Alternativamente, instale a través de nuestro script automatizado: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Instalación manual de Python -Si prefiere ejecutar desde la fuente: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Paso a paso - -1. **Inicializar:** Ejecute `voxvera init` y siga las instrucciones. Se le pedirá que seleccione su idioma primero. -2. **Construir:** Genere los activos del volante. Cada construcción crea automáticamente un `voxvera-portable.zip` en la carpeta del volante, lo que permite que otros descarguen la herramienta completa directamente desde su volante. - ```bash - voxvera build - ``` -3. **Servir:** Publique el volante sobre Tor: - ```bash - voxvera serve - ``` - Esto detecta automáticamente su instancia de Tor, inicia OnionShare y escribe la dirección .onion generada en los enlaces desprendibles del volante. - -## Soporte de idiomas - -VoxVera está totalmente localizado. Puede cambiar su preferencia de idioma de forma permanente utilizando el selector interactivo o un acceso directo: - -- **Selector interactivo:** `voxvera lang` -- **Acceso directo:** `voxvera --lang es` (establece la preferencia en español) - -### Idiomas soportados: -- **Inglés:** `en` -- **Español:** `es` (alias: `--idioma`) -- **Alemán:** `de` (alias: `--sprache`) -- **Ruso:** `ru` -- **Hebreo:** `he` -- **Árabe:** `ar` -- **Francés:** `fr` -- **Japonés:** `ja` -- **Hindi:** `hi` -- **Swahili:** `sw` - -También puede forzar un idioma específico para un solo comando sin cambiar su preferencia permanente: -- **Inglés:** `voxvera --lang en check` -- **Español:** `voxvera --idioma es check` - -Los volantes generados detectan automáticamente el idioma del navegador del visitante y cambian el texto de la interfaz en consecuencia. - -## Gestión de servidores - -Gestione múltiples volantes y sus identidades de Tor desde un único menú interactivo: - -```bash -voxvera manage -``` - -Características: -- **--- Crear Nuevo Sitio/Volante ---**: Inicie la secuencia de configuración completa. -- **--- Iniciar Todos los Sitios ---**: Inicie o apague todos los volantes de su flota a la vez. -- **Estado en tiempo real**: Vea las URL .onion activas e indicadores de progreso de arranque de Tor. -- **Control individual**: Exportar a Zip sitios específicos a ZIP o elimínelos. - -## Espejo universal (Distribución viral) - -Para garantizar que VoxVera siga siendo accesible incluso si los repositorios centrales son censurados, cada volante actúa como un espejo para la herramienta. - -Cuando hospeda un volante, el botón **"Descargar Herramienta y Código"** en la página de inicio proporciona un `voxvera-portable.zip` que contiene: -- El código fuente completo y todos los idiomas soportados. -- Todas las dependencias de Python (pre-vendeurizadas). -- Binarios de Tor multiplataforma. - -Esto permite que cualquier persona que escanee su volante se convierta en un nuevo distribuidor de la herramienta VoxVera. - -## Exportación y respaldo - -Haga una copia de seguridad de sus identidades únicas de Tor (para que su URL .onion nunca cambie) o mueva sus volantes a otra máquina. - -- **Exportar un solo sitio**: `voxvera export <nombre_carpeta>` -- **Exportar todos los servicios**: `voxvera export-all` - -**Lugar de almacenamiento:** Todas las exportaciones se guardan como archivos ZIP en una carpeta llamada `voxvera-exports` en el directorio de inicio del usuario (`~/voxvera-exports/`) en todas las plataformas. - -## Importación y recuperación - -Restaure toda su configuración en una nueva máquina moviendo sus archivos ZIP a `~/voxvera-exports/` y ejecutando: - -```bash -voxvera import-multiple -``` - -## Portabilidad y uso sin conexión - -Si necesita ejecutar VoxVera en una máquina sin acceso a Internet, primero puede "vendeurizar" las dependencias: - -```bash -voxvera vendorize -``` - -Esto descarga todas las librerías de Python requeridas en `voxvera/vendor/`. La herramienta dará prioridad a estos archivos locales, lo que le permitirá ejecutarse sin `pip install`. - -## Importación por lotes (JSON) - -Para generar volantes de forma masiva a partir de múltiples archivos de configuración JSON, colóquelos en el directorio `imports/` y ejecute: - -```bash -voxvera batch-import -``` - -## Cómo funcionan las URL - -Cada volante tiene dos URL separadas: -- **Enlace desprendible** (generado automáticamente): La dirección .onion donde se hospeda el volante. -- **Enlace de contenido** (configurado por el usuario): Una URL externa que apunta a un sitio web, video o descarga. - -No es necesario ingresar manualmente la dirección .onion; VoxVera lo maneja automáticamente durante la fase de `serve`. diff --git a/docs/fa/AGENTS.md b/docs/fa/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/fa/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/fa/CONTRIBUTING.md b/docs/fa/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/fa/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/fa/docker.md b/docs/fa/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/fa/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/fa/templates.md b/docs/fa/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/fa/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/fa/troubleshooting.md b/docs/fa/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/fa/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/fa/usage.md b/docs/fa/usage.md deleted file mode 100644 index 764c263..0000000 --- a/docs/fa/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# راهنمای استفاده تفصیلی - -این راهنما جریان‌های کاری معمول رابط سطر فرمان (CLI) را پوشش می‌دهد. برای دستورالعمل‌های داکر به `docs/docker.md` و برای قالب‌های اعلامیه موجود به `docs/templates.md` مراجعه کنید. - -## پیش‌نیازها - -ووکس‌ورا (VoxVera) به گونه‌ای طراحی شده است که بسیار قابل حمل باشد و به حداقل وابستگی‌های سیستم نیاز داشته باشد. - -### ۱. فایل‌های اجرایی مستقل (توصیه شده) -می‌توانید فایل‌های اجرایی (Binary) مستقل و بدون نیاز به وابستگی را برای سیستم‌عامل خود دانلود کنید: -- **لینوکس:** `voxvera-linux` -- **ویندوز:** `voxvera-windows.exe` -- **مک:** `voxvera-macos` - -این فایل‌ها شامل تمام موارد لازم برای اجرای ووکس‌ورا هستند (به جز `onionshare-cli`). - -### ۲. نصب‌کننده تک‌خطی -همچنین می‌توانید از طریق اسکریپت خودکار ما نصب را انجام دهید: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### ۳. نصب دستی پایتون -اگر ترجیح می‌دهید از سورس کد استفاده کنید: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # دبیان/اوبونتو -``` - -## گام به گام - -۱. **راه‌اندازی:** دستور `voxvera init` را اجرا کرده و مراحل را دنبال کنید. در ابتدا از شما خواسته می‌شود زبان خود را انتخاب کنید. -۲. **ساخت:** دارایی‌های اعلامیه را ایجاد کنید. هر بار که عملیات ساخت انجام می‌شود، یک فایل `voxvera-portable.zip` به طور خودکار در پوشه اعلامیه ساخته می‌شود که به دیگران اجازه می‌دهد ابزار کامل را مستقیماً از اعلامیه شما دانلود کنند. - ```bash - voxvera build - ``` -۳. **میزبانی:** اعلامیه را روی شبکه تور منتشر کنید: - ```bash - voxvera serve - ``` - این دستور به طور خودکار تور شما را شناسایی کرده، OnionShare را راه‌اندازی می‌کند و آدرس .onion تولید شده را در پیوندهای جداشونده اعلامیه می‌نویسد. - -## پشتیبانی از زبان‌ها - -ووکس‌ورا کاملاً بومی‌سازی شده است. می‌توانید اولویت زبان خود را به طور دائم با استفاده از انتخاب‌گر تعاملی یا میان‌بر مستقیم تغییر دهید: - -- **انتخاب‌گر تعاملی:** `voxvera lang` -- **میان‌بر مستقیم:** `voxvera --lang fa` (تنظیم اولویت روی فارسی) - -### زبان‌های پشتیبانی شده: -- **انگلیسی:** `en` -- **اسپانیایی:** `es` (نام مستعار: `--idioma`) -- **آلمانی:** `de` (نام مستعار: `--sprache`) -- **فارسی:** `fa` - -همچنین می‌توانید بدون تغییر اولویت دائمی، یک زبان خاص را برای یک دستور واحد اجبار کنید: -- **انگلیسی:** `voxvera --lang en check` -- **فارسی:** `voxvera --lang fa check` - -اعلامیه‌های تولید شده به طور خودکار زبان مرورگر بازدیدکننده را تشخیص داده و متن رابط کاربری را بر اساس آن تغییر می‌دهند. - -## مدیریت سرورها - -چندین اعلامیه و هویت‌های تور آن‌ها را از یک منوی تعاملی واحد مدیریت کنید: - -```bash -voxvera manage -``` - -ویژگی‌ها: -- **--- ایجاد سایت/اعلامیه جدید ---**: شروع توالی کامل تنظیمات. -- **--- اجرای همه سایت‌ها ---**: راه‌اندازی یا توقف همزمان تمام اعلامیه‌های شما. -- **وضعیت لحظه‌ای**: مشاهده آدرس‌های .onion فعال و نشانگرهای پیشرفت تور. -- **کنترل فردی**: صدور به صورت زیپ سایت‌های خاص به فرمت ZIP یا حذف آن‌ها. - -## آینه‌سازی همگانی (توزیع ویروسی) - -برای اطمینان از اینکه ووکس‌ورا حتی در صورت سانسور مخازن مرکزی در دسترس باقی می‌ماند، هر اعلامیه به عنوان یک آینه برای این ابزار عمل می‌کند. - -وقتی اعلامیه‌ای را میزبانی می‌کنید، دکمه **"دانلود ابزار و کد منبع"** در صفحه فرود، یک فایل `voxvera-portable.zip` شامل موارد زیر ارائه می‌دهد: -- سورس کد کامل و تمامی زبان‌های پشتیبانی شده. -- تمامی وابستگی‌های پایتون (از پیش بسته‌بندی شده). -- فایل‌های اجرایی تور برای تمامی پلتفرم‌ها. - -این کار به هر کسی که اعلامیه شما را اسکن می‌کند اجازه می‌دهد تا به توزیع‌کننده جدیدی برای ابزار ووکس‌ورا تبدیل شود. - -## صدور و پشتیبان‌گیری - -از هویت‌های تور منحصر به فرد خود پشتیبان بگیرید (تا آدرس .onion شما هرگز تغییر نکند) یا اعلامیه‌های خود را به سیستم دیگری منتقل کنید. - -- **صدور یک سایت واحد:** `voxvera export <folder_name>` -- **صدور تمامی سایت‌ها:** `voxvera export-all` - -**محل ذخیره‌سازی:** تمامی موارد صادر شده به صورت فایل ZIP در پوشه‌ای به نام `voxvera-exports` در پوشه خانگی کاربر (`~/voxvera-exports/`) در تمامی پلتفرم‌ها ذخیره می‌شوند. - -## وارد کردن و بازیابی - -با انتقال فایل‌های ZIP خود به پوشه `~/voxvera-exports/` و اجرای دستور زیر، کل تنظیمات خود را در یک سیستم جدید بازیابی کنید: - -```bash -voxvera import-multiple -``` - -## قابلیت حمل و استفاده آفلاین - -اگر نیاز دارید ووکس‌ورا را روی سیستمی بدون دسترسی به اینترنت اجرا کنید، می‌توانید ابتدا وابستگی‌ها را به صورت محلی ذخیره کنید: - -```bash -voxvera vendorize -``` - -این دستور تمامی کتابخانه‌های پایتون مورد نیاز را در پوشه `voxvera/vendor/` دانلود می‌کند. ابزار سپس این فایل‌های محلی را در اولویت قرار می‌دهد و اجازه می‌دهد بدون نیاز به `pip install` اجرا شود. - -## وارد کردن گروهی (JSON) - -برای تولید انبوه اعلامیه‌ها از چندین فایل تنظیمات JSON، آن‌ها را در پوشه `imports/` قرار داده و اجرا کنید: - -```bash -voxvera batch-import -``` - -## آدرس‌های URL چگونه کار می‌کنند - -هر اعلامیه دارای دو آدرس URL جداگانه است: -- **پیوند جداشونده** (تولید خودکار): آدرس .onion که اعلامیه در آن میزبانی می‌شود. -- **پیوند محتوا** (تنظیم توسط کاربر): یک آدرس URL خارجی که به یک وب‌سایت، ویدیو یا فایل دانلود اشاره می‌کند. - -نیازی نیست آدرس .onion را به صورت دستی وارد کنید؛ ووکس‌ورا در مرحله میزبانی (`serve`) این کار را به طور خودکار انجام می‌دهد. diff --git a/docs/fr/AGENTS.md b/docs/fr/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/fr/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/fr/CONTRIBUTING.md b/docs/fr/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/fr/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/fr/docker.md b/docs/fr/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/fr/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/fr/templates.md b/docs/fr/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/fr/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/fr/troubleshooting.md b/docs/fr/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/fr/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/fr/usage.md b/docs/fr/usage.md deleted file mode 100644 index 66c5f1e..0000000 --- a/docs/fr/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Utilisation détaillée - -Ce guide couvre les flux de travail CLI courants. Consultez `docs/docker.md` pour les instructions Docker et `docs/templates.md` pour les modèles de flyers disponibles. - -## Prérequis - -VoxVera est conçu pour être hautement portable et nécessite un minimum de dépendances système. - -### 1. Binaires autonomes (Recommandé) -Vous pouvez télécharger des binaires autonomes sans dépendance pour votre système d'exploitation : -- **Linux :** `voxvera-linux` -- **Windows :** `voxvera-windows.exe` -- **macOS :** `voxvera-macos` - -Ces binaires incluent tout le nécessaire pour exécuter VoxVera (sauf `onionshare-cli`). - -### 2. Installateur en une ligne -Alternativement, installez via notre script automatisé : - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Installation Python manuelle -Si vous préférez exécuter à partir des sources : - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Étape par étape - -1. **Initialiser :** Exécutez `voxvera init` et suivez les instructions. Il vous sera demandé de choisir votre langue en premier. -2. **Construire :** Générez les fichiers du flyer. Chaque construction crée automatiquement un `voxvera-portable.zip` dans le dossier du flyer, permettant aux autres de télécharger l'outil complet directement depuis votre flyer. - ```bash - voxvera build - ``` -3. **Servir :** Publiez le flyer sur Tor : - ```bash - voxvera serve - ``` - Ceci détecte automatiquement votre instance Tor, démarre OnionShare et écrit l'adresse .onion générée dans les liens détachables du flyer. - -## Support linguistique - -VoxVera est entièrement localisé. Vous pouvez changer votre préférence linguistique de manière permanente en utilisant soit le sélecteur interactif, soit un raccourci direct : - -- **Sélecteur interactif :** `voxvera lang` -- **Raccourci direct :** `voxvera --lang fr` (définit la préférence sur le français) - -### Langues supportées : -- **Anglais :** `en` -- **Espagnol :** `es` (alias : `--idioma`) -- **Allemand :** `de` (alias : `--sprache`) -- **Français :** `fr` - -Vous pouvez également forcer une langue spécifique pour une seule commande sans changer votre préférence permanente : -- **Anglais :** `voxvera --lang en check` -- **Français :** `voxvera --lang fr check` - -Les flyers générés détectent automatiquement la langue du navigateur du visiteur et adaptent le texte de l'interface en conséquence. - -## Gestion des serveurs - -Gérez plusieurs flyers et leurs identités Tor à partir d'un seul menu interactif : - -```bash -voxvera manage -``` - -Fonctionnalités : -- **--- Créer un nouveau site/flyer ---** : Démarre la séquence de configuration complète. -- **--- Démarrer tous les sites ---** : Lance ou arrête tous les flyers de votre flotte en une seule fois. -- **Statut en temps réel** : Visualisez les URL .onion actives et les indicateurs de progression de l'amorçage Tor. -- **Contrôle individuel** : Exporter en Zip des sites spécifiques vers ZIP ou supprimez-les. - -## Mise en miroir universelle (Distribution virale) - -Pour garantir que VoxVera reste accessible même si les dépôts centraux sont censurés, chaque flyer agit comme un miroir pour l'outil. - -Lorsque vous hébergez un flyer, le bouton **"Télécharger l'outil et le code"** sur la page d'accueil fournit un `voxvera-portable.zip` contenant : -- Le code source complet et toutes les langues supportées. -- Toutes les dépendances Python (pré-vendues). -- Les binaires Tor multiplateformes. - -Cela permet à quiconque scanne votre flyer de devenir un nouveau distributeur de l'outil VoxVera. - -## Exportation & Sauvegarde - -Sauvegardez vos identités Tor uniques (pour que votre URL .onion ne change jamais) ou déplacez vos flyers vers une autre machine. - -- **Exporter un seul site** : `voxvera export <nom_du_dossier>` -- **Exporter tous les sites** : `voxvera export-all` - -**Lieu de stockage :** Toutes les exportations sont sauvegardées dans `~/voxvera-exports/` sur toutes les plateformes. - -## Importation & Récupération - -Restaurez toute votre configuration sur une nouvelle machine en déplaçant vos fichiers ZIP vers `~/voxvera-exports/` et en exécutant : - -```bash -voxvera import-multiple -``` - -## Portabilité & Utilisation hors ligne - -Si vous devez exécuter VoxVera sur une machine sans accès à Internet, vous pouvez d'abord "vendeuriser" les dépendances : - -```bash -voxvera vendorize -``` - -Ceci télécharge toutes les bibliothèques Python requises dans `voxvera/vendor/`. L'outil donnera alors la priorité à ces fichiers locaux, lui permettant de s'exécuter sans `pip install`. - -## Importation par lot (JSON) - -Pour générer en masse des flyers à partir de plusieurs fichiers de configuration JSON, placez-les dans le répertoire `imports/` et exécutez : - -```bash -voxvera batch-import -``` - -## Comment fonctionnent les URL - -Chaque flyer possède deux URL distinctes : -- **Lien détachable** (auto-généré) : L'adresse .onion où le flyer est hébergé. -- **Lien de contenu** (configuré par l'utilisateur) : Une URL externe pointant vers un site web, une vidéo ou un téléchargement. - -Vous n'avez pas besoin de saisir manuellement l'adresse .onion ; VoxVera s'en occupe automatiquement pendant la phase `serve`. diff --git a/docs/he/AGENTS.md b/docs/he/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/he/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/he/CONTRIBUTING.md b/docs/he/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/he/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/he/docker.md b/docs/he/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/he/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/he/templates.md b/docs/he/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/he/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/he/troubleshooting.md b/docs/he/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/he/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/he/usage.md b/docs/he/usage.md deleted file mode 100644 index 4223ae2..0000000 --- a/docs/he/usage.md +++ /dev/null @@ -1,156 +0,0 @@ -# Detailed Usage - -This guide covers common CLI workflows. See `docs/docker.md` for Docker instructions and `docs/templates.md` for available flyer templates. - -## Prerequisites - -VoxVera is designed to be highly portable. You can run it directly from the source code on any platform with Python installed. - -Linux with `systemd --user` is the supported persistent-host environment. Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and should not yet be treated as equally reliable hidden-service deployment targets. - -### 1. Automated Install (Recommended) -The easiest way to install VoxVera is using the Linux-first installer script: - -**Linux / macOS:** -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` -On Linux, this also installs the recurring recovery timer used to retry hidden-service startup after boot and after missed/offline periods. - -**Windows (PowerShell):** -```powershell -irm https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.ps1 | iex -``` -The Windows installer is experimental and does not yet guarantee production-ready background hosting behavior. - -### 2. Manual Source Install -If you have downloaded the source code ZIP: - -1. **Extract** the ZIP file. -2. **Open a terminal** in the extracted folder. -3. **Run the setup script**: - - **Linux/macOS:** `./setup.sh` - - **Windows:** `.\voxvera-install.sh` (or run `python -m pip install .`) - -## Uninstallation - -If you wish to remove VoxVera from your system, you can use the provided uninstall scripts from the source directory. This will safely remove the CLI tool and any downloaded dependencies. - -- **Linux / macOS:** Run `./uninstall.sh` -- **Windows (PowerShell):** Run `.\uninstall.ps1` - -*Note: Uninstallation will not delete your generated flyers or your `.onion` keys stored in the `~/voxvera-exports` or local `host/` folders.* - -## Step-by-Step - -1. **Initialize:** Run `voxvera init` and follow the prompts. You will be asked to select your language first. -2. **Build:** Generate the flyer assets. Every build automatically creates a `voxvera-portable.zip` in the flyer's folder, allowing others to download the full tool directly from your flyer. - ```bash - voxvera build - ``` -3. **Serve:** Publish the flyer over Tor: - ```bash - voxvera serve - ``` - This automatically detects your Tor instance, starts OnionShare, and writes the generated .onion address into the flyer's tear-off links. - -### Persistent Hosting On Linux - -For a machine that should resume hosting automatically after boot or after being offline, install the autostart recovery timer: - -```bash -voxvera autostart -``` - -This installs a `systemd --user` timer that reruns `voxvera start-all` every few minutes. The retry loop is the supported way to recover hidden-service hosting after suspend, reboot, or temporary network loss. - -## Language Support - -VoxVera is fully localized. You can change your language preference permanently using either the interactive selector or a direct shortcut: - -- **Interactive Selector:** `voxvera lang` -- **Direct Shortcut:** `voxvera --lang de` (sets preference to German) - -### Supported Languages: -- **English:** `en` -- **Spanish:** `es` (alias: `--idioma`) -- **German:** `de` (alias: `--sprache`) - -You can also force a specific language for a single command without changing your permanent preference: -- **English:** `voxvera --lang en check` -- **German:** `voxvera --sprache de check` -- **Spanish:** `voxvera --idioma es check` - -The generated flyers automatically detect the visitor's browser language and switch the UI text accordingly. - -## Server Management - -Manage multiple flyers and their Tor identities from a single interactive menu: - -```bash -voxvera manage -``` - -Features: -- **--- צור אתר/פלייר חדש ---**: Start the full setup sequence. -- **--- הפעל את כל האתרים ---**: Launch or shut down every flyer in your fleet at once. -- **Real-time Status**: View active `.onion` URLs and Tor bootstrapping progress indicators. -- **Individual Control**: ייצא ל-Zip specific sites to ZIP or delete them. - -## Universal Mirroring (Viral Distribution) - -To ensure VoxVera remains accessible even if central repositories are censored, every flyer acts as a mirror for the tool. - -When you host a flyer, the **"הורד כלי וקוד מקור"** button on the landing page provides a `voxvera-source.zip` containing: -- The full source code and all supported languages. -- Installation and setup scripts for all platforms. -- Complete documentation and templates. - -To keep the mirrored download practical for low-bandwidth redistribution, the -source archive does not ship pre-downloaded Tor binaries. Normal installer and -release builds still fetch or bundle those artifacts separately. - -This allows anyone who scans your flyer to become a new distributor of the VoxVera tool. - -## Export & Backup - -Back up your unique Tor identities (so your `.onion` URL never changes) or move your flyers to another machine. - -- **Export a single site**: `voxvera export <folder_name>` -- **Export all sites**: `voxvera export-all` - -**Storage location:** All exports are saved to `~/voxvera-exports/` on all platforms. - -## Import & Recovery - -Restore your entire setup on a new machine by moving your ZIP files to `~/voxvera-exports/` and running: - -```bash -voxvera import-multiple -``` - -## Portability & Offline Use - -If you need to run VoxVera on a machine without internet access, you can "vendorize" the dependencies first: - -```bash -voxvera vendorize -``` - -This downloads all required Python libraries into `voxvera/vendor/`. The tool will then prioritize these local files, allowing it to run without `pip install`. - -## Batch Import (JSON) - -To bulk-generate flyers from multiple JSON configuration files, place them in the `imports/` directory and run: - -```bash -voxvera batch-import -``` - -## How URLs Work - -Each flyer has two separate URLs: -- **Tear-off link** (auto-generated): The .onion address where the flyer is hosted. -- **Content link** (user-configured): An external URL pointing to a website, video, or download. - -You do not need to manually enter the .onion address; VoxVera handles this automatically during the `serve` phase. diff --git a/docs/hi/AGENTS.md b/docs/hi/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/hi/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/hi/CONTRIBUTING.md b/docs/hi/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/hi/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/hi/docker.md b/docs/hi/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/hi/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/hi/templates.md b/docs/hi/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/hi/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/hi/troubleshooting.md b/docs/hi/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/hi/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/hi/usage.md b/docs/hi/usage.md deleted file mode 100644 index c2b72eb..0000000 --- a/docs/hi/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# विस्तृत उपयोग - -यह गाइड सामान्य CLI वर्कफ्लो को कवर करती है। डॉकर निर्देशों के लिए `docs/docker.md` और उपलब्ध फ्लायर टेम्पलेट्स के लिए `docs/templates.md` देखें। - -## पूर्वापेक्षाएँ (Prerequisites) - -VoxVera को अत्यधिक पोर्टेबल बनाने के लिए डिज़ाइन किया गया है और इसके लिए न्यूनतम सिस्टम निर्भरता की आवश्यकता होती है। - -### 1. स्टैंडअलोन बाइनरी (अनुशंसित) -आप अपने ऑपरेटिंग सिस्टम के लिए स्टैंडअलोन, शून्य-निर्भरता बाइनरी डाउनलोड कर सकते हैं: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -इन बाइनरी में VoxVera चलाने के लिए आवश्यक सब कुछ शामिल है (`onionshare-cli` को छोड़कर)। - -### 2. वन-लाइन इंस्टॉलर -वैकल्पिक रूप से, हमारी स्वचालित स्क्रिप्ट के माध्यम से इंस्टॉल करें: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. मैनुअल पायथन इंस्टॉलेशन -यदि आप सोर्स से चलाना पसंद करते हैं: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## चरण-दर-चरण (Step-by-Step) - -1. **आरंभ करें (Initialize):** `voxvera init` चलाएँ और संकेतों का पालन करें। आपसे सबसे पहले अपनी भाषा चुनने के लिए कहा जाएगा। -2. **बिल्ड (Build):** फ्लायर एसेट्स जेनरेट करें। प्रत्येक बिल्ड स्वचालित रूप से फ्लायर के फ़ोल्डर में एक `voxvera-portable.zip` बनाता है, जिससे अन्य लोग सीधे आपके फ्लायर से पूरा टूल डाउनलोड कर सकते हैं। - ```bash - voxvera build - ``` -3. **सर्व (Serve):** फ्लायर को Tor पर प्रकाशित करें: - ```bash - voxvera serve - ``` - यह स्वचालित रूप से आपके Tor इंस्टेंस का पता लगाता है, OnionShare शुरू करता है, और जेनरेट किए गए .onion एड्रेस को फ्लायर के टियर-ऑफ लिंक में लिख देता है। - -## भाषा समर्थन (Language Support) - -VoxVera पूरी तरह से स्थानीयकृत (localized) है। आप इंटरैक्टिव सेलेक्टर या सीधे शॉर्टकट का उपयोग करके अपनी भाषा प्राथमिकता को स्थायी रूप से बदल सकते हैं: - -- **इंटरैक्टिव सेलेक्टर:** `voxvera lang` -- **सीधा शॉर्टकट:** `voxvera --lang hi` (प्राथमिकता को हिन्दी पर सेट करता है) - -### समर्थित भाषाएं: -- **अंग्रेजी:** `en` -- **स्पेनिश:** `es` (उपनाम: `--idioma`) -- **जर्मन:** `de` (उपनाम: `--sprache`) -- **हिन्दी:** `hi` - -आप अपनी स्थायी प्राथमिकता को बदले बिना किसी एक कमांड के लिए एक विशिष्ट भाषा को बाध्य (force) भी कर सकते हैं: -- **अंग्रेजी:** `voxvera --lang en check` -- **हिन्दी:** `voxvera --lang hi check` - -जेनरेट किए गए फ्लायर्स स्वचालित रूप से विज़िटर की ब्राउज़र भाषा का पता लगाते हैं और उसके अनुसार UI टेक्स्ट बदलते हैं। - -## सर्वर प्रबंधन (Server Management) - -एक ही इंटरैक्टिव मेनू से कई फ्लायर्स और उनकी Tor पहचान प्रबंधित करें: - -```bash -voxvera manage -``` - -विशेषताएं: -- **--- नई साइट/फ्लायर बनाएँ ---**: पूरा सेटअप अनुक्रम शुरू करें। -- **--- सभी साइटें शुरू करें ---**: अपने बेड़े के सभी फ्लायर्स को एक साथ शुरू या बंद करें। -- **वास्तविक समय स्थिति**: सक्रिय `.onion` URL और Tor बूटस्ट्रैपिंग प्रगति संकेतक देखें। -- **व्यक्तिगत नियंत्रण**: विशिष्ट साइटों को ZIP में ज़िप में निर्यात करें करें या उन्हें हटा दें। - -## यूनिवर्सल मिररिंग (वायरल वितरण) - -यह सुनिश्चित करने के लिए कि VoxVera केंद्रीय रिपॉजिटरी सेंसर होने पर भी सुलभ रहे, प्रत्येक फ्लायर टूल के लिए मिरर के रूप में कार्य करता है। - -जब आप फ्लायर होस्ट करते हैं, तो लैंडिंग पेज पर **"टूल और कोड डाउनलोड करें"** बटन एक `voxvera-portable.zip` प्रदान करता है जिसमें शामिल हैं: -- पूरा सोर्स कोड और सभी समर्थित भाषाएं। -- सभी पायथन निर्भरताएँ (pre-vendored)। -- क्रॉस-प्लेटफ़ॉर्म Tor बाइनरी। - -यह आपके फ्लायर को स्कैन करने वाले किसी भी व्यक्ति को VoxVera टूल का नया वितरक बनने की अनुमति देता है। - -## निर्यात और बैकअप (Export & Backup) - -अपनी अनूठी Tor पहचान का बैकअप लें (ताकि आपका `.onion` URL कभी न बदले) या अपने फ्लायर्स को दूसरी मशीन पर ले जाएं। - -- **एकल साइट निर्यात करें**: `voxvera export <folder_name>` -- **सभी साइटें निर्यात करें**: `voxvera export-all` - -**भंडारण स्थान:** सभी निर्यात सभी प्लेटफ़ॉर्म पर उपयोगकर्ता की होम डायरेक्टरी (`~/voxvera-exports/`) में ZIP फ़ाइलों के रूप में सहेजे जाते हैं। - -## आयात और पुनर्प्राप्ति (Import & Recovery) - -अपनी ZIP फ़ाइलों को `~/voxvera-exports/` में ले जाकर और चलाकर एक नई मशीन पर अपना पूरा सेटअप पुनर्स्थापित करें: - -```bash -voxvera import-multiple -``` - -## पोर्टेबिलिटी और ऑफलाइन उपयोग - -यदि आपको बिना इंटरनेट एक्सेस वाली मशीन पर VoxVera चलाने की आवश्यकता है, तो आप पहले निर्भरताओं को "वेंडराइज़" (vendorize) कर सकते हैं: - -```bash -voxvera vendorize -``` - -यह `voxvera/vendor/` में सभी आवश्यक पायथन लाइब्रेरी डाउनलोड करता है। टूल फिर इन स्थानीय फ़ाइलों को प्राथमिकता देगा, जिससे यह `pip install` के बिना चल सकेगा। - -## बैच आयात (JSON) - -कई JSON कॉन्फ़िगरेशन फ़ाइलों से थोक में फ्लायर्स जेनरेट करने के लिए, उन्हें `imports/` डायरेक्टरी में रखें और चलाएँ: - -```bash -voxvera batch-import -``` - -## URL कैसे काम करते हैं - -प्रत्येक फ्लायर के दो अलग-अलग URL होते हैं: -- **टियर-ऑफ लिंक** (स्वचालित रूप से जेनरेट): वह .onion एड्रेस जहाँ फ्लायर होस्ट किया गया है। -- **सामग्री लिंक** (उपयोगकर्ता-कॉन्फ़िगर): वेबसाइट, वीडियो या डाउनलोड की ओर इशारा करने वाला एक बाहरी URL। - -आपको मैन्युअल रूप से .onion एड्रेस दर्ज करने की आवश्यकता नहीं है; `serve` चरण के दौरान VoxVera इसे स्वचालित रूप से संभालता है। diff --git a/docs/ja/AGENTS.md b/docs/ja/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/ja/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/ja/CONTRIBUTING.md b/docs/ja/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/ja/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/ja/docker.md b/docs/ja/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/ja/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/ja/templates.md b/docs/ja/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/ja/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/ja/troubleshooting.md b/docs/ja/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/ja/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/ja/usage.md b/docs/ja/usage.md deleted file mode 100644 index 4bbf0c7..0000000 --- a/docs/ja/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# 詳細な使い方 - -このガイドでは、一般的なCLIワークフローについて説明します。Dockerの手順については `docs/docker.md` を、利用可能なフライヤーテンプレートについては `docs/templates.md` を参照してください。 - -## 前提条件 - -VoxVeraは高いポータビリティを実現するように設計されており、システムへの依存関係は最小限です。 - -### 1. スタンドアロンバイナリ (推奨) -お使いのオペレーティングシステムに合わせて、依存関係のないスタンドアロンバイナリをダウンロードできます。 -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -これらのバイナリには、VoxVeraの実行に必要なすべてのものが含まれています(`onionshare-cli` を除く)。 - -### 2. ワンラインインストーラー -または、自動スクリプトを使用してインストールします。 - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. 手動でのPythonインストール -ソースから実行したい場合: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## ステップ・バイ・ステップ - -1. **初期化:** `voxvera init` を実行し、プロンプトに従います。最初に言語を選択するよう求められます。 -2. **ビルド:** フライヤーのアセットを生成します。ビルドを実行するたびに、フライヤーのフォルダ内に `voxvera-portable.zip` が自動的に作成されます。これにより、他の人があなたのフライヤーから直接ツール一式をダウンロードできるようになります。 - ```bash - voxvera build - ``` -3. **公開:** Torを介してフライヤーを公開します。 - ```bash - voxvera serve - ``` - これにより、実行中のTorインスタンスが自動的に検出され、OnionShareが起動し、生成された .onion アドレスがフライヤーの切り取りセクションのリンクに書き込まれます。 - -## 言語サポート - -VoxVeraは完全にローカライズされています。インタラクティブセレクターまたは直接ショートカットを使用して、言語設定を永続的に変更できます。 - -- **インタラクティブセレクター:** `voxvera lang` -- **直接ショートカット:** `voxvera --lang ja` (日本語に設定) - -### サポートされている言語: -- **英語:** `en` -- **スペイン語:** `es` (エイリアス: `--idioma`) -- **ドイツ語:** `de` (エイリアス: `--sprache`) -- **日本語:** `ja` - -永続的な設定を変更せずに、単一のコマンドに対して特定の言語を強制することもできます。 -- **英語:** `voxvera --lang en check` -- **日本語:** `voxvera --lang ja check` - -生成されたフライヤーは、訪問者のブラウザ言語を自動的に検出し、UIテキストをそれに応じて切り替えます。 - -## サーバー管理 - -単一のインタラクティブメニューから、複数のフライヤーとそのTorアイデンティティを管理できます。 - -```bash -voxvera manage -``` - -機能: -- **--- 新規サイト/フライヤー作成 ---**: セットアップシーケンスを最初から開始します。 -- **--- すべてのサイトを開始 ---**: 管理下のすべてのフライヤーを一括で起動またはシャットダウンします。 -- **リアルタイムステータス**: アクティブな .onion URLやTorの起動プログレスインジケーターを表示します。 -- **個別制御**: 特定のサイトをZIPに Zipとしてエクスポート したり、削除したりできます。 - -## ユニバーサルミラーリング(バイラル拡散) - -中央のリポジトリが検閲された場合でもVoxVeraを利用し続けられるように、すべてのフライヤーがツールのミラーとして機能します。 - -フライヤーをホストすると、ランディングページの **「ツールとソースをダウンロード」** ボタンから以下のものを含む `voxvera-portable.zip` が提供されます。 -- すべてのサポート言語を含む完全なソースコード。 -- すべてのPython依存関係(事前ベンダー化済み)。 -- クロスプラットフォームのTorバイナリ。 - -これにより、あなたのフライヤーをスキャンした誰もが、VoxVeraツールの新しい配布者になることができます。 - -## エクスポートとバックアップ - -独自のTorアイデンティティ(.onion URLが変更されないようにするため)をバックアップしたり、フライヤーを別のマシンに移動したりできます。 - -- **単一サイトのエクスポート**: `voxvera export <フォルダ名>` -- **全サイトのエクスポート**: `voxvera export-all` - -**保存場所:** すべてのエクスポートは、すべてのプラットフォームでユーザーのホームディレクトリにある `~/voxvera-exports/` フォルダに保存されます。 - -## インポートと復元 - -ZIPファイルを `~/voxvera-exports/` に移動して以下を実行することで、新しいマシンでセットアップ全体を復元できます。 - -```bash -voxvera import-multiple -``` - -## ポータビリティとオフライン利用 - -インターネット接続のないマシンでVoxVeraを実行する必要がある場合は、まず依存関係を「ベンダー化」できます。 - -```bash -voxvera vendorize -``` - -これにより、必要なすべてのPythonライブラリが `voxvera/vendor/` にダウンロードされます。ツールはこれらのローカルファイルを優先的に使用するため、 `pip install` なしで実行できるようになります。 - -## 一括インポート (JSON) - -複数のJSON設定ファイルからフライヤーを一括生成するには、それらを `imports/` ディレクトリに配置して以下を実行します。 - -```bash -voxvera batch-import -``` - -## URLの仕組み - -各フライヤーには2つの異なるURLがあります。 -- **切り取り用リンク** (自動生成): フライヤーがホストされている .onion アドレス。 -- **コンテンツリンク** (ユーザー設定): ウェブサイト、動画、またはダウンロードを指す外部URL。 - -.onion アドレスを手動で入力する必要はありません。VoxVeraが `serve` フェーズ中に自動的に処理します。 diff --git a/docs/linux-hosting-validation.md b/docs/linux-hosting-validation.md deleted file mode 100644 index 7483d73..0000000 --- a/docs/linux-hosting-validation.md +++ /dev/null @@ -1,178 +0,0 @@ -# Linux Hosting Validation - -This runbook defines the operational validation standard for VoxVera's only supported hosting target: - -- Linux CLI with `systemd --user` - -Everything else remains below that bar until equivalent evidence exists. - -## Prerequisites - -- `voxvera` installed and on `PATH` -- `tor` installed -- `onionshare-cli` available -- a user account that can run `systemctl --user` - -## Quick Verification - -Use the helper script first: - -```bash -bash scripts/linux-recovery-check.sh -``` - -This checks: - -- `platform-status --json` -- `doctor --json` -- `autostart status --json` -- expected Linux support tier and platform id -- presence of `~/host` -- Tor and OnionShare discovery -- autostart artifacts and timer state -- per-site state for `.onionshare-session`, `onionshare.log`, and `server.pid` - -## Core Commands - -Install autostart: - -```bash -voxvera autostart -``` - -Inspect autostart: - -```bash -voxvera autostart status -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -Remove autostart: - -```bash -voxvera autostart uninstall -``` - -Inspect runtime diagnostics: - -```bash -voxvera doctor -voxvera doctor --json -``` - -## Validation Checklist - -### 1. Fresh install - -Run the Linux installer or install through the supported CLI path, then confirm: - -```bash -voxvera platform-status --json -voxvera doctor --json -voxvera autostart status --json -``` - -Expected: - -- `platform_id` is `linux_cli_systemd` -- support tier is `supported` -- `voxvera_cli`, `onionshare_cli`, and `tor_binary` pass - -### 2. Build and serve - -Create or edit a site, then build and serve it: - -```bash -voxvera build -voxvera serve -``` - -Expected: - -- site output appears under `~/host/<folder_name>/` -- `index.html` and QR code images exist -- `onionshare.log` is written -- `.onionshare-session` appears after the hidden service is started - -### 3. Identity persistence - -Confirm the site keeps its identity across rebuilds: - -```bash -ls -la ~/host/<folder_name>/ -voxvera build --config ~/host/<folder_name>/config.json -``` - -Expected: - -- `.onionshare-session` still exists after rebuild - -### 4. Autostart persistence - -Confirm the recovery timer exists and is enabled: - -```bash -voxvera autostart status -systemctl --user is-enabled voxvera-start.timer -systemctl --user is-active voxvera-start.timer -``` - -Expected: - -- timer artifacts exist under `~/.config/systemd/user/` -- timer is enabled - -### 5. Reboot recovery - -After a reboot, verify: - -```bash -bash scripts/linux-recovery-check.sh -systemctl --user status voxvera-start.timer -journalctl --user -u voxvera-start.service --no-pager -n 50 -``` - -Expected: - -- timer remains enabled -- service has retried `start-all` -- configured sites are restorable without manual reconfiguration - -### 6. Offline/reconnect recovery - -Temporarily disconnect the host from the network, reconnect, then wait through at least one timer interval. - -Verify: - -```bash -systemctl --user status voxvera-start.timer -journalctl --user -u voxvera-start.service --no-pager -n 50 -bash scripts/linux-recovery-check.sh -``` - -Expected: - -- timer is still active -- `start-all` retries appear in the service logs -- Tor becomes reachable again - -## Paths That Matter - -- `~/.config/systemd/user/voxvera-start.service` -- `~/.config/systemd/user/voxvera-start.timer` -- `~/host/<folder_name>/config.json` -- `~/host/<folder_name>/.onionshare-session` -- `~/host/<folder_name>/onionshare.log` -- `~/host/<folder_name>/server.pid` - -## Failure Interpretation - -If `bash scripts/linux-recovery-check.sh` fails: - -- missing `onionshare_cli` or `tor_binary` means the runtime is incomplete -- missing `host_root` means no sites are built yet -- missing autostart artifacts means recovery was never installed or was removed -- `tor_socks_reachable` warning means Tor is not currently reachable even if it is installed - -Linux should remain the only supported target until this runbook is repeatable on real hosts without caveats. diff --git a/docs/macos-validation-checklist.md b/docs/macos-validation-checklist.md deleted file mode 100644 index f4c7f2c..0000000 --- a/docs/macos-validation-checklist.md +++ /dev/null @@ -1,173 +0,0 @@ -# macOS Validation Checklist - -This checklist is for validating the experimental macOS CLI path on a real macOS machine. - -Do not promote macOS above `experimental` until this checklist has been completed successfully on at least one native host and the results have been reviewed. - -## Goal - -Validate whether the current macOS runtime can: - -1. install cleanly -2. build and serve a flyer -3. preserve the OnionShare session identity -4. recover after login/reboot/offline periods -5. surface understandable logs and status - -## Environment Notes - -- This checklist assumes the CLI runtime, not the Electron GUI. -- Prefer a clean machine or disposable user account. -- Record the exact macOS version, machine type, and install path used. - -## 1. Install Surface - -Record which install path was used: - -- raw binary -- DMG -- `pipx` -- `install.sh` - -Capture: - -```bash -voxvera --version -voxvera platform-status --json -voxvera doctor --json -voxvera autostart status --json -``` - -Pass criteria: - -- VoxVera launches -- `platform-status` reports `macos_cli` -- `doctor` runs without crashing -- `autostart status` runs without crashing - -## 2. Build + Serve - -Create a fresh working directory and config: - -```bash -mkdir -p ~/voxvera-test -export VOXVERA_DIR=~/voxvera-test -voxvera init --non-interactive -voxvera build -voxvera serve -``` - -Capture: - -- whether `index.html` is created under `~/voxvera-test/host/voxvera/` -- whether `.onionshare-session` appears -- whether an `.onion` URL is printed -- whether `onionshare.log` is created - -Pass criteria: - -- build completes -- serve completes -- `.onionshare-session` exists -- `onionshare.log` exists - -## 3. Identity Persistence - -Stop and restart the site: - -```bash -voxvera stop-all -voxvera start-all -``` - -Capture: - -- whether the same `.onion` URL returns -- whether `.onionshare-session` remains unchanged - -Pass criteria: - -- the onion identity persists across restart - -## 4. Autostart Install - -Install the experimental `launchd` path: - -```bash -voxvera autostart -voxvera autostart status --json -``` - -Capture: - -- generated plist path -- any `launchctl` output or errors - -Pass criteria: - -- the plist is created -- `autostart status` reports installed artifacts - -## 5. Login / Reboot Recovery - -After autostart is installed: - -1. reboot the Mac or log out and back in -2. wait a few minutes -3. check: - -```bash -voxvera doctor --json -voxvera autostart status --json -voxvera start-all -``` - -Capture: - -- whether hosting resumed automatically -- whether the onion identity persisted -- whether the process had to be restarted manually - -## 6. Offline / Reconnect Recovery - -While a site is running: - -1. disconnect the machine from the network -2. wait at least 2 minutes -3. reconnect -4. wait a few minutes - -Capture: - -- whether hosting recovered automatically -- whether manual `voxvera start-all` was required -- any errors in `onionshare.log` - -## 7. Logs And Status - -Capture the practical debugging workflow: - -```bash -voxvera doctor --json -voxvera autostart status --json -ls -la ~/voxvera-test/host/voxvera -``` - -Document: - -- where logs live -- what failed if recovery did not work -- any permissions/path issues - -## Report Back - -A useful tester report should include: - -- macOS version -- install path used -- whether build worked -- whether serve worked -- whether the onion identity persisted -- whether login/reboot recovery worked -- whether offline/reconnect recovery worked -- exact command output or error text for failures diff --git a/docs/multi-language-support.md b/docs/multi-language-support.md deleted file mode 100644 index e61bec7..0000000 --- a/docs/multi-language-support.md +++ /dev/null @@ -1,99 +0,0 @@ -# Multi-Language Support Developer Plan - -This document outlines the strategy for implementing a token-based multi-language system in VoxVera, covering the CLI, the generated landing page, and documentation. - -## 1. Core Architecture: The Token System - -All translatable strings will be centralized in JSON files located in `voxvera/locales/`. This allows for easy addition of new languages by simply dropping a new file. - -- **Storage:** `voxvera/locales/{lang_code}.json` (e.g., `en.json`, `es.json`). -- **Structure:** - ```json - { - "meta": { - "language_name": "English", - "flag": "🇺🇸" - }, - "cli": { - "welcome": "Welcome to VoxVera Setup", - "select_lang": "Select your preferred language", - "folder_prompt": "Enter folder name for this flyer:" - }, - "web": { - "title": "VoxVera - Anonymous Flyers", - "download_btn": "Download Flyer", - "onion_link_desc": "Scan to view on Tor", - "change_lang": "Change Language" - } - } - ``` - -## 2. CLI Implementation (`voxvera/cli.py`) - -The CLI will be updated to handle localization from the start of the user interaction. - -### Workflow: -1. **Initial Detection:** On startup, the CLI checks the system locale (`LANG` env var or `locale` module). -2. **Language Selection:** The first prompt in `voxvera init` will be a language selector, defaulting to the detected system locale. -3. **Session Loading:** Once selected, the CLI loads the corresponding JSON. All subsequent `InquirerPy` prompts will use these tokens. -4. **Configuration:** The chosen language code is saved in the flyer's `config.json` as a preference for that specific project. - -## 3. Web Implementation (`voxvera/src/index-master.html`) - -The landing page will support dynamic language switching without requiring server-side logic (essential for Tor-hidden services). - -### Detection Logic: -- **Avoid IP-based Detection:** Since VoxVera is hosted on Tor, IP lookups return the Tor Exit Node location, not the user's. -- **Browser-based Detection:** Use `navigator.language` to detect the user's browser preference. -- **Persistence:** Save the user's manual choice in `localStorage`. - -### Frontend Components: -1. **Attributes:** Use `data-i18n="web.token_name"` on HTML elements. -2. **Language Switcher:** A dropdown menu or text-link list (e.g., "EN | ES | FR") placed next to the **Download** button. -3. **I18n Engine:** A lightweight JavaScript snippet injected during the build process that: - - Loads the bundled locale data. - - Detects the best language (Manual Selection > Browser Setting > English Fallback). - - Updates all `data-i18n` elements. - -## 4. Build System Updates (`voxvera/build.py`) - -The `build` process will be updated to bundle the necessary translations. - -- **Multi-bundle:** By default, all available `web` tokens from all locale files will be injected into a single `<script>` tag in the final `index.html`. This ensures instant switching even when offline or on slow Tor connections. -- **Asset Optimization:** Minify the locale JSON data before injection to keep the HTML lightweight. - -## 5. Portable & Viral Distribution Model - -To ensure VoxVera is truly censorship-resistant, every generated flyer will serve as a mirror for the entire tool, including all supported languages and dependencies. - -### Key Requirements: -- **Zero-Dependency Execution:** All Python libraries (from `requirements.txt`) will be bundled into a `voxvera/vendor/` directory. The CLI will be updated to prioritize this local path. -- **Pre-Bundled Tor:** The existing `voxvera/resources/tor/` binaries for Linux, Mac, and Windows will be included in every distribution. -- **Universal Language Bundle:** Every `voxvera-portable.zip` will include the full `voxvera/locales/` directory, ensuring that a user who downloads the tool from an English flyer can immediately switch it to Spanish, French, or any other supported language. - -### The "Mirror" Workflow: -1. **Build Phase:** When `voxvera build` is executed, it assembles a `voxvera-portable.zip` containing: - - The full `voxvera/` source code. - - The `vendor/` library directory. - - All `locales/*.json` files. - - Cross-platform Tor binaries. - - A `voxvera-run.sh` / `voxvera-run.bat` entry point. -2. **Injection:** This ZIP is automatically placed in the `voxvera/host/<folder_name>/download/` directory of the generated flyer. -3. **User Access:** The landing page's "Download" button is updated to explicitly offer the "Full Portable Tool & Source," allowing the recipient to become a new node in the distribution network. - -## 6. Documentation (`docs/`) - -Documentation will follow a subdirectory structure for maximum compatibility with GitHub/Markdown renderers. - -- **Structure:** - - `docs/en/usage.md` - - `docs/es/usage.md` -- **Maintenance:** A master English file will serve as the source of truth for all translations. - -## 6. Implementation Phases - -1. **Phase 1 (Audit):** Extract all hardcoded strings from `cli.py` and `index-master.html` into `en.json`. -2. **Phase 2 (CLI):** Implement the language selector and token loader in `cli.py`. -3. **Phase 3 (Web):** Update the HTML template with `data-i18n` attributes and the JS switcher. -4. **Phase 4 (Build):** Update `build.py` to inject the locale bundle. -5. **Phase 5 (Expansion):** Add a second language (e.g., Spanish) to verify the system. diff --git a/docs/native-tester-guide.md b/docs/native-tester-guide.md deleted file mode 100644 index a0344c3..0000000 --- a/docs/native-tester-guide.md +++ /dev/null @@ -1,50 +0,0 @@ -# Native Tester Guide - -Use this guide when asking someone on macOS or Windows to validate VoxVera. - -## Scope - -VoxVera is not just an installer test. The real question is whether it can function as a reliable Tor hidden-service host on that platform. - -That means every tester should be asked to validate: - -1. install -2. build -3. serve -4. onion identity persistence -5. login/reboot recovery -6. offline/reconnect recovery -7. logs and diagnostics - -## Canonical Checklists - -- macOS: `docs/macos-validation-checklist.md` -- Windows: `docs/windows-validation-checklist.md` - -## What To Ask Testers To Send Back - -- platform and OS version -- install path used -- `voxvera platform-status --json` -- `voxvera doctor --json` -- `voxvera autostart status --json` -- whether `voxvera serve` produced an `.onion` URL -- whether `.onionshare-session` persisted after restart -- whether hosting resumed after reboot/login -- whether hosting resumed after network reconnect -- exact error output for any failure - -## What Not To Conclude Prematurely - -- successful installation does not prove hosting works -- successful hosting once does not prove recovery works -- binary availability does not prove platform parity - -## Current Repo Position - -- Linux CLI with `systemd --user`: supported -- Docker CLI: experimental -- macOS CLI: experimental -- Windows CLI: experimental - -Do not promote macOS or Windows above `experimental` without native recovery evidence. diff --git a/docs/nostr-static-client-spec.md b/docs/nostr-static-client-spec.md index 51172b3..eb24393 100644 --- a/docs/nostr-static-client-spec.md +++ b/docs/nostr-static-client-spec.md @@ -1,480 +1,131 @@ # VoxVera Nostr Static Client Spec -Status: Phase 1 CLI import implemented for local event JSON files. A first static Editor/Viewer client exists under `site/nostr/`; relay publish/fetch uses browser WebSockets. Viewer mode is flyer-first and keeps Nostr controls hidden behind a small drawer toggle. Browser-side QR generation is implemented with a vendored local QR library. Browser-side anonymous key generation/signing is implemented with a vendored Nostr library, so publishing does not require a NIP-07 login. Independent browser-side signature verification before accepting fetched events is pending. +Status: `main` is the Nostr static-client branch. The legacy Tor/OnionShare CLI version is preserved on `legacy-tor`. -Branch: `nostr-static-client` +## Goal -## Purpose +VoxVera should let anyone publish, fetch, and print flyer content without a centralized application server. -Build a Nostr-powered VoxVera mode where public Nostr events store flyer content and any static/offline VoxVera client can fetch, validate, and render that content into the existing VoxVera flyer. +The static client is responsible for: -The generated flyer frontend must remain visually and behaviorally identical to the current VoxVera flyer. Nostr is an input/source layer, not a redesign. +- rendering the flyer +- generating QR codes +- authoring a normalized Nostr flyer payload +- generating anonymous browser-side Nostr keys +- signing and publishing replaceable Nostr events +- fetching events by raw event ID, `note1`, `nevent1`, or `naddr` +- rendering fetched content safely -## Core Principle +Nostr relays store the flyer source content. Static hosts only serve the client. + +## Active Files ```text -Nostr event -> validate -> normalize to existing config.json -> existing VoxVera build/render path +site/ + index.html + CNAME + nostr/ + index.html + nostr-client.css + nostr-client.js + locales.js + vendor/ + nostr-tools/ + qrcode-generator/ +voxvera/ + nostr/ + schema.py +tests/ + test_nostr_schema.py ``` -The existing flyer template, QR layout, tear-off layout, typography, print behavior, download behavior, and Tor-safe static output stay unchanged. +## Deployment -## Goals +The deployable static root is `site`. -- Let anyone host the VoxVera client as static files, over the web, Tor, IPFS, local disk, USB drive, or other mirrors. -- Let Nostr relays store the flyer content as public events. -- Let the client fetch a VoxVera flyer event by `naddr`, `note1`, `nevent1`, raw event ID, or URL fragment. -- Let the CLI import/build/serve a Nostr-backed flyer without changing the generated flyer frontend. -- Generate QR codes locally from validated content. -- Keep the default QR behavior aligned with current VoxVera: QR points to the generated flyer URL unless explicitly configured otherwise. -- Support fully offline rendering once a Nostr event payload has been exported or cached. +No build command is required. Vercel should use: -## Non-Goals For V1 +- root directory: repository root +- output directory: `site` +- build command: empty -- No redesign of `index-master.html`. -- No new visual style for the flyer. -- No server-side backend. -- No custody of user-managed Nostr keys. -- No required login or NIP-07 signer. -- No private/encrypted Nostr events. -- No remote images, fonts, scripts, CSS, CDNs, analytics, or trackers. -- No raw HTML injection from Nostr content. -- No dependency on a single relay. +`site/index.html` redirects root traffic to `/nostr/`. -## User Flows +## Event Model -### Static Client Flow - -1. User opens a static VoxVera client. -2. User pastes a `naddr`, `note1`, `nevent1`, raw event ID, or URL containing one. -3. Client chooses relays from the identifier, user settings, or defaults. -4. Client fetches the event. -5. Client validates the event as a VoxVera flyer source. -6. Client normalizes content into the existing VoxVera config schema. -7. Client renders the existing flyer UI and generates QR codes locally. -8. User prints, exports, saves, or hosts the generated flyer. - -Viewer mode must default to the rendered flyer, not the editor shell. Header text, event forms, normalized config JSON, and other loader UI stay hidden unless the user opens the viewer controls drawer. Printing from viewer mode must target only the 8.5x11 flyer surface. - -Viewer mode must auto-load content when the URL includes an event reference. Supported forms include: - -- `?addr=<naddr>` -- `?event=<raw-id-or-note1-or-nevent1-or-naddr>` -- `?id=<raw-64-character-event-id>` -- `#viewer/<raw-id-or-note1-or-nevent1-or-naddr>` -- pasted `nostr:note1...`, `nostr:nevent1...`, or `nostr:naddr...` values in the viewer lookup tool - -The manual viewer lookup tool must accept the same raw ID, `note1`, `nevent1`, `naddr`, and `nostr:` values. `nevent1` and `naddr` relay hints should be merged with the default/user relay list. - -The canonical poster URL should use `naddr`, not the raw event ID, because the flyer itself needs to include a URL that resolves back to the poster. Raw event IDs are hashes of the final event payload, so embedding a raw event-ID URL in the same event creates a circular dependency. A `naddr` is stable because it is derived from author pubkey, kind `30078`, and the `d` tag. - -### CLI Flow - -```bash -voxvera nostr import <note-or-nevent> -voxvera nostr build <note-or-nevent> -voxvera nostr serve <note-or-nevent> -``` - -Expected behavior: - -- `import` writes a normal site folder under `~/host/<folder_name>/` with a standard `config.json`. -- `build` imports and builds the flyer assets. -- `serve` imports, builds, and runs the existing OnionShare hosting path. - -The CLI should preserve the current config/build/serve contract so Nostr flyers can be exported, imported, and mirrored by existing VoxVera mechanisms. - -## Event Format - -V1 should use a deterministic JSON payload in event `content`. - -Recommended Nostr event kind for prototype: `30078` parameterized replaceable event, with a `d` tag. - -Rationale: - -- It avoids inventing a custom kind before the format proves itself. -- It allows stable named flyer records per author. -- It can later be migrated to a dedicated custom kind if needed. +Recommended event kind: `30078` parameterized replaceable event. Required tags: -```json -[ - ["d", "voxvera:<slug-or-id>"], - ["t", "voxvera"], - ["t", "flyer"] -] -``` +- `["d", "voxvera:<slug>"]` +- `["t", "voxvera"]` +- `["t", "flyer"]` -Optional tags: - -```json -[ - ["title", "OPERATION VOX VERA"], - ["language", "en"], - ["subject", "censorship"], - ["relay", "wss://relay.example.org"] -] -``` - -Content schema: +Payload: ```json { "type": "voxvera_flyer", "version": 1, "folder_name": "voxvera", - "lang": "en", "name": "Vox Vera Printable Flyers", + "lang": "en", "title": "TOP SECRET", "subtitle": "DO ~~NOT~~ DISTRIBUTE", "headline": "OPERATION VOX VERA", - "content": "Main flyer text.", + "content": "Flyer body text", "url_message": "Follow this link to learn more.", - "url": "https://example.com/", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "", + "url": "https://voxvera.org/", + "footer_message": "0110010", "qr_target": "flyer_url" } ``` -`folder_name` remains the internal compatibility key for the existing VoxVera config/build path, but the static Nostr editor should label this field as `Flyer Name`. In Nostr mode it acts as the stable flyer slug used in the replaceable event `d` tag, not as a local Tor hosting folder name. +The UI labels `folder_name` as `Flyer Name`; it acts as the event slug, not a local hosting folder. -Allowed `qr_target` values: +## QR Target -- `flyer_url`: default; current VoxVera behavior. -- `nostr_event`: QR points to the source Nostr identifier. -- `content_url`: QR points to the `url` field. +Default behavior: `qr_target: "flyer_url"`. -The static Nostr editor should default to `flyer_url`, where the flyer URL is the hosted client URL with `?addr=<naddr>`. That avoids the raw event-ID circular dependency and lets a re-published replaceable event keep the same printed flyer URL. +When publishing, the client computes the replaceable-event `naddr` and updates the poster URL to the current hosted client URL with `?addr=<naddr>`. The tear-off tabs and QR code point at that resolved poster URL. -## Normalization Rules +Supported values: -The importer maps the Nostr payload to the existing `config.json` schema. +- `flyer_url`: QR points to the hosted client URL for the poster +- `content_url`: QR points to the payload's content URL +- `nostr_event`: QR points to the Nostr source identifier when available -Rules: +## Safety -- Missing optional fields use current VoxVera defaults. -- Unknown fields are ignored unless explicitly preserved in metadata. -- `folder_name` / editor `Flyer Name` must be slug-safe and length-limited. -- `lang` must be one of the supported locale keys or fall back to `en`. -- Text fields must be strings, not arrays or objects. -- Text fields must have length limits. -- URLs must be validated before use. -- Attachments are disabled for V1 unless represented as ordinary links. -- The normalized config must be buildable by the current `build_assets` path. -- The static Nostr viewer should preserve the old generated site's multilingual token behavior: `landing.*` and `web.*` token paths should resolve through the existing locale dictionaries, with browser/default language selection and RTL handling where applicable. This is not fully implemented in the first static preview renderer yet. +Nostr content is untrusted. -Suggested field limits: +The client and schema helper must: -- `folder_name`: 64 characters. -- `name`: 120 characters. -- `title`: 80 characters. -- `subtitle`: 120 characters. -- `headline`: 160 characters. -- `content`: 10000 characters. -- `url_message`: 240 characters. -- `url`: 2048 characters. -- `footer_message`: 240 characters. +- reject raw HTML in flyer text fields +- escape rendered flyer content +- reject unsafe URL schemes such as `javascript:` and `data:` +- keep attachments unsupported in V1 +- avoid remote frontend dependencies -## Frontend Contract +## Localization -The flyer frontend must continue to use the existing generated HTML and print surface. +Flyer defaults come from `site/nostr/locales.js`. -Allowed changes: +Nostr editor/viewer controls and Nostr-specific flyer labels come from `NOSTR_UI` in `site/nostr/nostr-client.js`. -- Add a separate loader/import page or app shell. -- Add client-side Nostr fetch code in the loader. -- Add local QR generation in the loader or build path. -- Add metadata outside the flyer if needed. -- Add minimal viewer controls outside the flyer, preferably as a hidden drawer or compact toggle. -- Add anonymous local key generation/signing in the editor shell. +Language changes should: -Disallowed changes: +- update default flyer content while the flyer is still using default content +- preserve user-authored or fetched event content +- update editor/viewer tool labels +- update printed side-tab labels +- respect RTL direction metadata -- Changing the visual layout of the generated flyer. -- Adding visible Nostr branding to the flyer by default. -- Adding JavaScript dependency to the generated flyer. -- Adding remote assets to the generated flyer. -- Injecting raw Nostr content as HTML. -- Printing the loader shell, event form, normalized config JSON, or preview chrome. - -## Static Client Architecture - -Recommended structure: - -```text -site/nostr/ - index.html - nostr-client.js - nostr-schema.js - nostr-render.js - vendor/ - qrcode-generator/ - nostr-tools/ -``` - -The static client should: - -- Be self-contained. -- Work from `file://` where practical. -- Work with JavaScript enabled for fetching/rendering. -- Produce/export a final flyer that remains static and Tor-safe. -- Avoid service workers in V1. -- Open `/nostr/#viewer` into a flyer-only viewer surface with a small control toggle. -- Keep `/nostr/#editor` as the form-based event authoring surface. -- Publish with a locally generated anonymous `npub` by default, stored only in browser local storage. -- Allow regenerating/rotating the anonymous `npub` from the editor. - -The generated flyer remains separate from the loader: - -```text -loader client: interactive, fetches Nostr -generated flyer: static, print-safe, JS-free -``` - -## Relay Strategy - -Inputs: - -- Relays embedded in `naddr`, when present. -- Relays embedded in `nevent1`, when present. -- User-provided relay list. -- Built-in fallback relay list. - -Rules: - -- Query multiple relays in parallel. -- Resolve `naddr` by querying kind `30078` with the addressed author pubkey and `d` tag, then use the newest matching replaceable event returned. -- Use the first valid matching event, then continue briefly to detect conflicts. -- Prefer exact event ID matches over replaceable address matches. -- Show event author, event ID, creation time, and relays used in the loader. -- Do not bake relay-specific state into the generated flyer unless explicitly requested. - -## Security Model - -Nostr content is untrusted external input. - -Required protections: - -- Parse JSON with strict schema validation. -- Escape all rendered text. -- Reject raw HTML/script fields. -- Do not load remote assets referenced by events. -- Validate URL schemes: allow `https`, `http`, `onion` URLs via `http://*.onion`, and Nostr identifiers. Reject `javascript:`, `data:`, and similar schemes. -- Put strict length limits on all fields. -- Treat relay responses as untrusted even if signed. -- Verify event signatures before accepting content. -- Do not require users to enter private keys for V1. -- If the browser editor stores an anonymous generated signing key in local storage, label it as a disposable local identity and provide a rotation path. - -## Privacy Model - -Fetching from public relays leaks interest in an event to those relays and network observers. - -Mitigations: - -- Allow custom relay lists. -- Allow Tor Browser usage as an optional transport choice. -- Allow offline import from pasted event JSON. -- Document that using public relays is not private. -- Do not phone home to VoxVera infrastructure. - -## CLI Architecture - -Suggested module split: - -```text -voxvera/nostr/ - __init__.py - ids.py # parse note1/nevent1/event IDs - relays.py # fetch events - schema.py # validate payloads - importers.py # normalize to config - qrcode.py # QR target selection helpers if needed -``` - -CLI command group: +## Verification ```bash -voxvera nostr import <identifier> [--relay wss://...] [--folder-name ...] -voxvera nostr build <identifier> [--relay wss://...] -voxvera nostr serve <identifier> [--relay wss://...] -voxvera nostr validate <file-or-identifier> +node --check site/nostr/nostr-client.js +pytest -q ``` -Implementation should keep Nostr code behind a command group so the current non-Nostr workflow remains stable. - -## Browser Dependency Strategy - -Prefer a small, vendored Nostr client implementation or a carefully vendored library. - -Requirements: - -- No CDN. -- No dynamic remote imports. -- Browser bundle stored in repo/package. -- CLI dependency either optional extra or small pure-Python implementation. -- Reproducible vendoring instructions. - -Candidate directions: - -- Browser: vendored `nostr-tools` bundle or a minimal NIP-01/NIP-19 fetch/verify implementation. -- Python CLI: optional `websockets` plus signature verification, or shell out to a bundled helper only if packaging remains clean. - -Decision should happen during implementation after checking package size and offline portability impact. - -## QR Behavior - -V1 default: - -- QR and tear-offs point to the generated poster URL, matching current VoxVera behavior without requiring Tor-specific wording. - -Optional future modes: - -- QR points to source Nostr event. -- QR points to original content URL. -- Flyer includes a separate source QR outside the current print layout. - -Any QR mode that changes visible flyer output must be opt-in. - -## Testing Plan - -Unit tests: - -- Parse `note1`, `nevent1`, raw IDs. -- Validate good schema. -- Reject invalid JSON. -- Reject wrong `type`. -- Reject unsupported `version`. -- Reject unsafe URL schemes. -- Enforce field length limits. -- Normalize payload to current config schema. -- Preserve current build output for existing configs. - -Integration tests: - -- Import fixture event into `~/host/<folder>/config.json`. -- Build imported fixture and compare required output files. -- Serve imported fixture through existing serve path with mocks. -- Static client fixture renders same fields as CLI normalization. - -Security tests: - -- Script tag in content is escaped. -- HTML event handler attributes are escaped. -- `javascript:` URL rejected. -- Oversized payload rejected. -- Unknown fields ignored. - -Manual validation: - -- Open static loader from local file. -- Fetch known fixture event from test relay or local mock relay. -- Render/print flyer. -- Verify generated flyer remains usable with JavaScript disabled. -- Verify Tor Browser Safest mode compatibility for generated flyer. - -## Implementation Phases - -### Phase 0: Design Lock - -- Finalize this spec. -- Decide event kind strategy. -- Decide dependency strategy. -- Create fixture events. -- Define schema in code comments/docs before implementation. - -### Phase 1: CLI Import - -- Add `voxvera nostr validate`. -- Add `voxvera nostr import`. -- Use fixture JSON first. -- Normalize into existing `config.json`. -- Add tests. - -Implemented initial local-file commands: - -```bash -voxvera nostr validate ./event.json -voxvera nostr import ./event.json -voxvera nostr build ./event.json -voxvera nostr serve ./event.json -``` - -Phase 1 intentionally rejects non-file `note1` / `nevent1` identifiers with a clear message. Relay fetch, NIP-19 parsing, and signature verification belong to Phase 2. - -### Phase 2: Relay Fetch - -- Add relay fetching for public events. -- Add NIP-19 parsing. -- Add signature verification. -- Add relay selection options. -- Add tests with mocked relay responses. - -### Phase 3: Static Loader - -- Add self-contained static loader under `site/nostr/`. -- Fetch event by identifier. -- Validate and normalize payload. -- Render existing flyer output or produce config for existing render path. -- Add export/download option. - -Initial implementation exists: - -- `site/nostr/index.html` -- `site/nostr/nostr-client.css` -- `site/nostr/nostr-client.js` - -Current behavior: - -- Editor mode collects existing VoxVera flyer fields. -- Editor can export unsigned kind `30078` event JSON. -- Editor can sign/publish through a NIP-07 browser signer and returns the signed event ID. -- Viewer mode fetches a raw 64-character event ID from configured relays. -- Viewer normalizes event content into existing VoxVera config JSON. -- Preview is client-side and print-oriented, but it is not yet the final generated flyer artifact. - -Pending hardening: - -- Vendor or implement browser-side QR generation without CDN usage. -- Add independent event ID/signature verification in the browser. -- Decide whether the static viewer should generate a full standalone flyer HTML file for download. - -### Phase 4: QR Modes - -- Keep default QR as generated flyer URL. -- Add optional `qr_target` handling. -- Add tests and docs. - -### Phase 5: Publishing Support - -Deferred. - -Possible future commands: - -```bash -voxvera nostr publish config.json -voxvera nostr sign config.json -``` - -This requires a separate key-management spec. - -## Open Questions - -- Should V1 use kind `30078`, a custom kind, or both? -- Should replaceable events be accepted by default, or should exact immutable event IDs be preferred for anti-tamper stability? -- Should the static loader render HTML directly in browser, or should it generate/download a standard VoxVera project bundle? -- What relay list should be bundled by default, if any? -- Should `qr_target: nostr_event` encode `nevent1` with relay hints or a bare `note1`? -- Should the generated flyer include source attribution metadata in comments only, or not at all? - -## Acceptance Criteria - -- Existing non-Nostr VoxVera workflow continues to pass tests. -- Existing generated flyer visual output is unchanged for normal configs. -- Nostr fixture event can be validated, imported, built, and served through existing paths. -- Static loader is self-contained and does not use remote dependencies. -- Generated flyer remains static and JS-free. -- Unsafe Nostr payloads are rejected or escaped. -- Docs explain relay privacy tradeoffs. +For UI work, also verify browser rendering and print output from a local static server. diff --git a/docs/platform-support-matrix.md b/docs/platform-support-matrix.md deleted file mode 100644 index 479d8c1..0000000 --- a/docs/platform-support-matrix.md +++ /dev/null @@ -1,59 +0,0 @@ -# Platform Support Matrix - -This file is the canonical human-readable summary of VoxVera's actual platform support posture. - -The machine-readable companion file is [`support-matrix.json`](/home/user/Documents/GitHub/VoxVera/support-matrix.json). - -## Support Tiers - -- **Supported**: validated for persistent hidden-service hosting with documented recovery behavior. -- **Beta**: feature-complete enough for broader testing, but not yet validated for production-grade recovery claims. -- **Experimental**: may install or run, but is not yet validated for reliable background hidden-service hosting. -- **Unsupported**: not currently a target for reliable hosting. - -## Current Matrix - -| Platform | Tier | Canonical Runtime Model | Distribution Surfaces | Notes | -| :--- | :--- | :--- | :--- | :--- | -| Linux CLI with `systemd --user` | Supported | System Tor or Tor Browser plus `onionshare-cli`, with recurring `systemd --user` timer recovery | `install.sh`, `voxvera-install.sh`, `pip/pipx`, Linux binary | Current reference implementation | -| Docker CLI | Experimental | Containerized runtime with `VOXVERA_DIR=/flyers` and periodic `start-all` retries | Dockerfile, GHCR image | Needs end-to-end restart validation | -| macOS CLI | Experimental | CLI runtime with `launchd` autostart path and external Tor/OnionShare dependencies | `install.sh`, `pip/pipx`, macOS binary, DMG | No validated recovery claim yet | -| Windows CLI | Experimental | CLI runtime with Task Scheduler path and external Tor/OnionShare dependencies | `install.ps1`, Windows binary, Chocolatey | Binary naming and runtime model need cleanup | -| Electron GUI | Experimental | GUI frontend over the CLI runtime | `gui/electron` | Must converge on shared runtime behavior | -| Flatpak/AppImage/Homebrew/Chocolatey/Deb | Experimental | Distribution-only until runtime parity exists | packaging scripts/manifests | Package availability does not imply hosting parity | - -## What "Supported" Means For VoxVera - -To move a platform to **Supported**, VoxVera should have evidence for all of the following: - -1. Fresh install works on a clean machine. -2. Manual `build` and `serve` work. -3. `.onionshare-session` survives rebuilds and restarts. -4. Hosting returns after reboot or login. -5. Hosting returns after a temporary offline period. -6. Logs and status are inspectable with documented commands. -7. The docs and release artifacts do not overstate capability. - -## Promotion Rules - -- Do not promote a package surface before the underlying runtime model is validated. -- Do not call a platform "recommended" unless it is also `supported`. -- If a platform lacks validated auto-recovery after reboot or network interruption, it must remain `experimental` or `beta`. - -## Current Recommendation - -If your goal is reliable Tor hidden-service hosting today, use the Linux CLI path and install the recurring recovery timer with: - -```bash -voxvera autostart -``` - -That is the current reference deployment model the rest of the platform work should converge toward. - -## Native Validation - -When validating the experimental non-Linux paths on real machines, use: - -- [macOS checklist](/home/user/Documents/GitHub/VoxVera/docs/macos-validation-checklist.md) -- [Windows checklist](/home/user/Documents/GitHub/VoxVera/docs/windows-validation-checklist.md) -- [Native tester guide](/home/user/Documents/GitHub/VoxVera/docs/native-tester-guide.md) diff --git a/docs/pt/AGENTS.md b/docs/pt/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/pt/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/pt/CONTRIBUTING.md b/docs/pt/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/pt/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/pt/docker.md b/docs/pt/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/pt/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/pt/templates.md b/docs/pt/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/pt/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/pt/troubleshooting.md b/docs/pt/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/pt/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/pt/usage.md b/docs/pt/usage.md deleted file mode 100644 index 438b950..0000000 --- a/docs/pt/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Uso Detalhado - -Este guia cobre os fluxos de trabalho comuns da CLI. Veja `docs/docker.md` para instruções do Docker e `docs/templates.md` para modelos de panfletos disponíveis. - -## Pré-requisitos - -O VoxVera foi projetado para ser altamente portátil e requer dependências mínimas do sistema. - -### 1. Binários Independentes (Recomendado) -Você pode baixar binários independentes e sem dependências para o seu sistema operacional: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Estes binários incluem tudo o que é necessário para executar o VoxVera (exceto o `onionshare-cli`). - -### 2. Instalador de Linha Única -Alternativamente, instale através do nosso script automatizado: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Instalação Manual via Python -Se preferir executar a partir do código-fonte: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Passo a Passo - -1. **Inicializar:** Execute `voxvera init` e siga as instruções. Você será solicitado a selecionar seu idioma primeiro. -2. **Construir:** Gere os arquivos do panfleto. Cada construção cria automaticamente um `voxvera-portable.zip` na pasta do panfleto, permitindo que outros baixem a ferramenta completa diretamente do seu panfleto. - ```bash - voxvera build - ``` -3. **Servir:** Publique o panfleto via Tor: - ```bash - voxvera serve - ``` - Isso detecta automaticamente sua instância do Tor, inicia o OnionShare e escreve o endereço .onion gerado nos links destacáveis do panfleto. - -## Suporte a Idiomas - -O VoxVera é totalmente localizado. Você pode alterar sua preferência de idioma permanentemente usando o seletor interativo ou um atalho direto: - -- **Seletor Interativo:** `voxvera lang` -- **Atalho Direto:** `voxvera --lang pt` (define a preferência para português) - -### Idiomas Suportados: -- **Inglês:** `en` -- **Espanhol:** `es` (alias: `--idioma`) -- **Alemão:** `de` (alias: `--sprache`) -- **Português:** `pt` - -Você também pode forçar um idioma específico para um único comando sem alterar sua preferência permanente: -- **Inglês:** `voxvera --lang en check` -- **Português:** `voxvera --lang pt check` - -Os panfletos gerados detectam automaticamente o idioma do navegador do visitante e alteram o texto da interface adequadamente. - -## Gerenciamento de Servidores - -Gerencie vários panfletos e suas identidades Tor a partir de um único menu interativo: - -```bash -voxvera manage -``` - -Recursos: -- **--- Criar Novo Site/Panfleto ---**: Inicia a sequência completa de configuração. -- **--- Iniciar Todos os Sites ---**: Inicia ou encerra todos os panfletos da sua frota de uma só vez. -- **Status em Tempo Real**: Visualize URLs .onion ativas e indicadores de progresso de inicialização do Tor. -- **Controle Individual**: Exportar para Zip sites específicos para ZIP ou exclua-os. - -## Espelhamento Universal (Distribuição Viral) - -Para garantir que o VoxVera permaneça acessível mesmo se os repositórios centrais forem censurados, cada panfleto atua como um espelho para a ferramenta. - -Quando você hospeda um panfleto, o botão **"Baixar Ferramenta e Código"** na página inicial fornece um `voxvera-portable.zip` contendo: -- O código-fonte completo e todos os idiomas suportados. -- Todas as dependências Python (pré-vendidas). -- Binários Tor multiplataforma. - -Isso permite que qualquer pessoa que escaneie seu panfleto se torne um novo distribuidor da ferramenta VoxVera. - -## Exportação e Backup - -Faça backup de suas identidades Tor exclusivas (para que sua URL .onion nunca mude) ou mova seus panfletos para outra máquina. - -- **Exportar um único site**: `voxvera export <nome_da_pasta>` -- **Exportar todos os sites**: `voxvera export-all` - -**Local de armazenamento:** Todas as exportações são salvas como arquivos ZIP em uma pasta chamada `voxvera-exports` no diretório inicial do usuário (`~/voxvera-exports/`) em todas as plataformas. - -## Importação e Recuperação - -Restaure toda a sua configuração em uma nova máquina movendo seus arquivos ZIP para `~/voxvera-exports/` e executando: - -```bash -voxvera import-multiple -``` - -## Portabilidade e Uso Offline - -Se precisar executar o VoxVera em uma máquina sem acesso à internet, você pode "venderizar" as dependências primeiro: - -```bash -voxvera vendorize -``` - -Isso baixa todas as bibliotecas Python necessárias para `voxvera/vendor/`. A ferramenta priorizará esses arquivos locais, permitindo que ela funcione sem `pip install`. - -## Importação em Lote (JSON) - -Para gerar panfletos em massa a partir de vários arquivos de configuração JSON, coloque-os no diretório `imports/` e execute: - -```bash -voxvera batch-import -``` - -## Como as URLs Funcionam - -Cada panfleto tem duas URLs separadas: -- **Link destacável** (gerado automaticamente): O endereço .onion onde o panfleto está hospedado. -- **Link de conteúdo** (configurado pelo usuário): Uma URL externa apontando para um site, vídeo ou download. - -Você não precisa inserir manualmente o endereço .onion; o VoxVera lida com isso automaticamente durante a fase de `serve`. diff --git a/docs/roadmap-platform-parity.md b/docs/roadmap-platform-parity.md deleted file mode 100644 index 5842d7f..0000000 --- a/docs/roadmap-platform-parity.md +++ /dev/null @@ -1,280 +0,0 @@ -# Platform Parity Roadmap - -This roadmap focuses on one question: - -How do we expand VoxVera beyond Linux without overstating reliability, while still converging on real cross-platform parity for Tor hidden-service hosting? - -## Strategic Principle - -Parity is not a packaging milestone. It is a runtime-contract milestone. - -Every platform must eventually implement the same hosting contract: - -1. install VoxVera -2. ensure Tor and OnionShare are available -3. build site assets -4. serve the hidden service -5. preserve `.onionshare-session` -6. recover hosting after reboot, login, suspend, or offline periods -7. surface logs and status - -Package formats should inherit that contract. They should not define independent behavior. - -## Phase 0: Truth Alignment - -Goal: bring repo claims, docs, and release posture into line with current reality. - -Deliverables: - -- canonical support matrix -- machine-readable support declaration -- installer/package warnings for experimental paths -- README and docs aligned to the actual supported target - -Definition of done: - -- no docs imply parity that tests do not support -- every platform surface has an explicit support tier -- release artifacts are not treated as proof of hosting reliability - -## Phase 1: Harden Linux As Reference - -Goal: make Linux CLI with `systemd --user` the clearly defensible model that other platforms copy. - -Work items: - -1. Add `voxvera doctor` for runtime validation. - - Check Tor reachability. - - Check OnionShare availability. - - Check `start-all` surfaces. - - Check autostart timer installation. - - Check host directories and session files. - -2. Add `voxvera autostart status`. - - Show service and timer files. - - Show whether the timer is enabled. - - Show next/last run timestamps if available. - -3. Normalize Linux log/status guidance. - - Document host log paths. - - Document timer/service status commands. - - Document expected recovery flow after reboot/network loss. - -4. Validate restart behavior. - - fresh install - - first serve - - reboot - - suspend/resume if possible - - temporary offline period followed by reconnect - -Definition of done: - -- Linux remains the only `supported` path until the above evidence exists and is documented. - -## Phase 2: Platform Adapter Layer - -Goal: stop encoding platform logic in ad hoc installer scripts. - -Recommended structure: - -- `voxvera/platforms/base.py` -- `voxvera/platforms/linux.py` -- `voxvera/platforms/macos.py` -- `voxvera/platforms/windows.py` -- `voxvera/platforms/docker.py` - -Each adapter should define: - -- support tier -- Tor discovery strategy -- OnionShare discovery strategy -- state root -- autostart installation strategy -- autostart status strategy -- log/status surface -- known limitations - -CLI surfaces to add: - -- `voxvera doctor` -- `voxvera platform-status` -- `voxvera autostart` -- `voxvera autostart status` -- `voxvera autostart uninstall` - -Definition of done: - -- shell installers become thin wrappers over shared Python logic instead of owning runtime policy themselves - -## Phase 3: Docker Beta Candidate - -Goal: make Docker a coherent, testable deployment surface. - -Decisions to settle: - -- single-container runtime vs compose-based runtime -- host Tor vs container Tor -- log and state persistence model - -Recommended direction: - -- keep runtime state under one explicit volume root -- document restart policy clearly -- make health and recovery behavior observable - -Validation checklist: - -- container restart preserves onion identity -- host reboot with restart policy restores hosting -- state remains in mounted volume -- logs remain inspectable - -Promotion target: - -- `experimental` -> `beta` - -## Phase 4: macOS CLI - -Goal: establish one honest CLI-based macOS hosting model before packaging. - -Work items: - -1. define Tor discovery strategy -2. define OnionShare discovery/install strategy -3. validate manual `build` + `serve` -4. implement and validate `launchd` recovery -5. document known limitations - -Promotion target: - -- remain `experimental` until `launchd` recovery is validated -- move to `beta` only after login/reboot/offline recovery evidence exists - -## Phase 5: Windows CLI - -Goal: establish one canonical Windows runtime model before claiming package parity. - -Work items: - -1. unify binary naming across installer, Chocolatey, docs, and release assets -2. define Tor discovery strategy -3. define OnionShare discovery strategy -4. validate manual `build` + `serve` -5. implement Task Scheduler recovery path -6. add Windows-specific status/log guidance - -Promotion target: - -- remain `experimental` until scheduled recovery and state persistence are proven -- move to `beta` only after reboot/login/offline recovery evidence exists - -## Phase 6: Electron GUI Convergence - -Goal: make the GUI a frontend to the supported runtime, not a separate runtime. - -Work items: - -1. route the GUI through shared CLI/runtime surfaces -2. reduce duplicated Tor startup behavior -3. add visibility for: - - Tor status - - OnionShare status - - hosting status - - onion URL - - logs -4. make window-close behavior explicit and safe - -Promotion target: - -- GUI remains `experimental` until it stops diverging from the CLI runtime contract - -## Phase 7: Package Surface Promotion - -Goal: package formats should become trustworthy wrappers around validated runtimes. - -Work items: - -1. Debian package - - declare actual runtime dependencies - - validate install + host + recovery path - -2. AppImage - - decide whether it is distribution-only or a real hosting target - -3. Homebrew - - fix artifact URL/sha/version policy - - clarify whether it installs a hosting target or just a CLI - -4. Chocolatey - - align artifact naming and installer semantics - -5. Flatpak - - decide whether Tor/OnionShare can be supported sanely in-sandbox - -Rule: - -- no package surface should be promoted above the support tier of its underlying runtime - -## Testing Program - -### 1. Unit tests - -- config/state logic -- autostart file generation -- platform adapter selection - -### 2. Mocked integration tests - -- `serve` -- `autostart` -- `doctor` -- `platform-status` - -### 3. Platform smoke tests - -- fresh install -- build -- serve -- persist identity -- restart -- recover - -Current smoke target names: - -- `linux-cli` -- `macos-cli` -- `windows-cli` -- `docker-cli` - -These target names are contract-level validation entry points. Only `linux-cli` currently represents a supported hosting path; the others should be used to validate experimental posture and dependency discovery on their native platforms until their recovery behavior is proven. - -### 4. Release checks - -- support matrix is current -- docs match support tiers -- artifact names match scripts and package manifests - -## Immediate Next Tasks - -1. Add `voxvera doctor`. -2. Add `voxvera autostart status`. - -## Native Validation Assets - -The repo now includes concrete native-host validation docs for the two major experimental desktop targets: - -- `docs/macos-validation-checklist.md` -- `docs/windows-validation-checklist.md` -- `docs/native-tester-guide.md` - -These should be used for the first real macOS/Windows validation cycles so testers capture the runtime evidence needed for future tier promotion. -3. Add the platform adapter scaffold. -4. Capture Linux reboot/offline recovery validation steps in docs and CI notes. -5. Pick Docker's canonical runtime model. -6. Normalize Windows binary naming before further Windows work. - -## Non-Goals - -- claiming parity before recovery behavior is validated -- treating package availability as support proof -- maintaining separate runtime semantics in GUI vs CLI diff --git a/docs/roadmap-v0.2.0.md b/docs/roadmap-v0.2.0.md deleted file mode 100644 index a43974c..0000000 --- a/docs/roadmap-v0.2.0.md +++ /dev/null @@ -1,93 +0,0 @@ -# VoxVera Roadmap & Technical Specification (v0.2.0) - -This document outlines the next major evolution of the VoxVera project, focusing on trust, social amplification, visual versatility, and network resilience. - ---- - -## 1. Integrity & Trust (PGP Signing) -**Goal:** Provide cryptographic proof that the `voxvera-portable.zip` provided by a flyer has not been tampered with by the hoster. - -### Technical Requirements -- **CLI:** Add `voxvera sign <folder_name>` command. -- **Dependency:** Use a lightweight PGP implementation (e.g., `python-gnupg` or `pgpy`) to sign the portable ZIP. -- **Storage:** Generate a `.sig` or `.asc` file alongside the ZIP in the `download/` folder. -- **Web:** The landing page will look for `voxvera-portable.zip.asc`. If found, a **"Verified Source"** badge with the signer's Fingerprint will appear next to the download button. - -### Implementation Phases -1. **Phase 1:** Add PGP key generation/import logic to `voxvera init`. -2. **Phase 2:** Update `build_assets` to optionally sign the generated ZIP. -3. **Phase 3:** Update `index-master.html` to display verification status. - ---- - -## 2. Nostr Integration (Social Amplification) -**Goal:** Bridge the physical world (flyers) with the decentralized digital world (Nostr) by automatically broadcasting live .onion sites. - -### Technical Requirements -- **CLI:** Add `voxvera serve --nostr` flag. -- **Workflow:** When a site goes live and the `.onion` URL is generated, the tool posts a "Flyer Event" to a list of configured Nostr relays. -- **Identity:** Users can provide an existing NSEC or have VoxVera generate a "Flyer Identity" (new NPUB) for that specific server. -- **Metadata:** Include tags for the flyer title, headline, and the `.onion` link. - -### Implementation Phases -1. **Phase 1:** Add `nostr` and `bech32` to the `vendor/` directory. -2. **Phase 2:** Implement a background broadcast thread in `serve()`. -3. **Phase 3:** Add "View on Nostr" links to the flyer footer. - ---- - -## 3. The "Tear-off" Designer (Template Gallery) -**Goal:** Expand the utility of VoxVera to new use cases like missing person alerts, protest organizing, and artistic distribution. - -### Technical Requirements -- **Restructuring:** Move from a single `voxvera` template to a category-based system: - - `/templates/default/` (The original Operation VoxVera style) - - `/templates/minimal/` (Clean, text-heavy) - - `/templates/alert/` (High-contrast, for emergencies) - - `/templates/art/` (Image-focused) -- **CLI:** Update `voxvera init` to include a visual description and selector for templates. - -### Implementation Phases -1. **Phase 1:** Refactor `copy_template` to support categories. -2. **Phase 2:** Design and implement 3 new HTML/CSS templates. -3. **Phase 3:** Allow templates to define their own custom character limits (e.g., "Alert" might allow larger headlines). - ---- - -## 4. Self-Healing Network (Update Logic) -**Goal:** Ensure the decentralized "Viral" network stays current with security fixes and features. - -### Technical Requirements -- **Discovery:** The tool will check a "Source of Truth" (e.g., `voxvera.org/version.json` or a hardcoded list of onion mirrors). -- **Notification:** `voxvera manage` will show a 🌟 or ⚠️ next to the version number if an update is available. -- **Update Workflow:** Provide a `voxvera update` command that downloads the latest `voxvera-portable.zip` and safely replaces the `vendor/` and `voxvera/` directories. - -### Implementation Phases -1. **Phase 1:** Implement version-checking logic via Tor SOCKS proxy. -2. **Phase 2:** Add update notifications to the management menu. -3. **Phase 3:** (Advanced) Implement "In-Place" updates for the vendored dependencies. - ---- - -## 5. GUI Modernization -**Goal:** Transition the Electron wrapper from a CLI mirror to a rich, visual dashboard. - -### Technical Requirements -- **Flyer Cards:** Replace the text list with visual "cards" showing the flyer's headline and a mini QR preview. -- **Tor Dashboard:** A dedicated tab showing all active hidden services, their uptime, and their `.onion` links. -- **One-Click Actions:** Visual buttons for "Export All," "Start All," and "New Flyer." -- **Direct Log Stream:** A collapsible panel to see the OnionShare logs in real-time. - -### Implementation Phases -1. **Phase 1:** Update the IPC bridge between Electron and the Python CLI. -2. **Phase 2:** Redesign the frontend using a modern, dark-themed CSS framework (keeping it local-first). -3. **Phase 3:** Add a "Theme Preview" during the flyer creation process. - ---- - -## Summary of Impact -By completing this roadmap, VoxVera moves from a standalone utility to a **Decentralized Information Ecosystem**. -- **Security** is solved via PGP. -- **Reach** is solved via Nostr. -- **Versatility** is solved via the Template Gallery. -- **Sustainability** is solved via Update Logic. diff --git a/docs/ru/AGENTS.md b/docs/ru/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/ru/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/ru/CONTRIBUTING.md b/docs/ru/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/ru/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/ru/docker.md b/docs/ru/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/ru/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/ru/templates.md b/docs/ru/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/ru/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/ru/troubleshooting.md b/docs/ru/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/ru/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/ru/usage.md b/docs/ru/usage.md deleted file mode 100644 index 812e01e..0000000 --- a/docs/ru/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Подробное руководство - -Это руководство охватывает основные рабочие процессы CLI. См. `docs/docker.md` для инструкций по Docker и `docs/templates.md` для доступных шаблонов листовок. - -## Предварительные требования - -VoxVera разработан как высокопортативный инструмент и требует минимум системных зависимостей. - -### 1. Автономные бинарные файлы (Рекомендуется) -Вы можете скачать автономные исполняемые файлы без зависимостей для вашей операционной системы: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Эти файлы включают все необходимое для запуска VoxVera (кроме `onionshare-cli`). - -### 2. Однострочный установщик -Или установите с помощью нашего автоматического скрипта: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Ручная установка через Python -Если вы предпочитаете запускать из исходного кода: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Шаг за шагом - -1. **Инициализация:** Запустите `voxvera init` и следуйте подсказкам. Вам будет предложено сначала выбрать язык. -2. **Сборка:** Сгенерируйте ресурсы листовки. Каждая сборка автоматически создает файл `voxvera-portable.zip` в папке листовки, позволяя другим скачивать полный инструмент прямо с вашей листовки. - ```bash - voxvera build - ``` -3. **Запуск:** Опубликуйте листовку через Tor: - ```bash - voxvera serve - ``` - Это автоматически обнаружит ваш экземпляр Tor, запустит OnionShare и запишет сгенерированный .onion адрес в отрывные ссылки листовки. - -## Поддержка языков - -VoxVera полностью локализован. Вы можете изменить свои языковые предпочтения навсегда, используя интерактивный селектор или прямой ярлык: - -- **Интерактивный селектор:** `voxvera lang` -- **Прямой ярлык:** `voxvera --lang ru` (устанавливает русский язык) - -### Поддерживаемые языки: -- **Английский:** `en` -- **Испанский:** `es` (алиас: `--idioma`) -- **Немецкий:** `de` (алиас: `--sprache`) -- **Русский:** `ru` - -Вы также можете принудительно использовать определенный язык для одной команды, не меняя постоянные настройки: -- **Английский:** `voxvera --lang en check` -- **Русский:** `voxvera --lang ru check` - -Сгенерированные листовки автоматически определяют язык браузера посетителя и соответствующим образом переключают текст интерфейса. - -## Управление серверами - -Управляйте несколькими листовками и их Tor-идентификаторами из единого интерактивного меню: - -```bash -voxvera manage -``` - -Возможности: -- **--- Создать новый сайт/листовку ---**: Запуск полной последовательности настройки. -- **--- Запустить все сайты ---**: Запуск или остановка всех листовок в вашем парке одновременно. -- **Статус в реальном времени**: Просмотр активных .onion URL и индикаторов прогресса загрузки Tor. -- **Индивидуальный контроль**: Экспорт в Zip определенных сайтов в ZIP или их удаление. - -## Универсальное зеркалирование (Вирусное распространение) - -Чтобы VoxVera оставался доступным, даже если центральные репозитории будут подвергнуты цензуре, каждая листовка выступает в качестве зеркала для инструмента. - -Когда вы хостите листовку, кнопка **"Скачать инструмент и код"** на целевой странице предоставляет `voxvera-portable.zip`, содержащий: -- Полный исходный код и все поддерживаемые языки. -- Все зависимости Python (пре-вендоризованные). -- Кроссплатформенные бинарные файлы Tor. - -Это позволяет любому, кто сканирует вашу листовку, стать новым распространителем инструмента VoxVera. - -## Экспорт и резервное копирование - -Создавайте резервные копии своих уникальных Tor-идентификаторов (чтобы ваш .onion URL никогда не менялся) или переносите листовки на другую машину. - -- **Экспорт одного сайта**: `voxvera export <имя_папки>` -- **Экспорт всех сайтов**: `voxvera export-all` - -**Место хранения:** Все экспорты сохраняются в виде ZIP-файлов в папке `voxvera-exports` в домашнем каталоге пользователя (`~/voxvera-exports/`) на всех платформах. - -## Импорт и восстановление - -Восстановите всю свою настройку на новой машине, переместив ZIP-файлы в `~/voxvera-exports/` и запустив: - -```bash -voxvera import-multiple -``` - -## Портативность и работа оффлайн - -Если вам нужно запустить VoxVera на машине без доступа к Интернету, вы можете сначала «вендоризовать» зависимости: - -```bash -voxvera vendorize -``` - -Это загрузит все необходимые библиотеки Python в `voxvera/vendor/`. Инструмент будет отдавать приоритет этим локальным файлам, что позволит ему работать без `pip install`. - -## Пакетный импорт (JSON) - -Чтобы массово генерировать листовки из нескольких конфигурационных файлов JSON, поместите их в директорию `imports/` и запустите: - -```bash -voxvera batch-import -``` - -## Как работают URL-адреса - -У каждой листовки есть два отдельных URL-адреса: -- **Отрывная ссылка** (автоматически генерируется): .onion адрес, по которому размещена листовка. -- **Ссылка на контент** (настраивается пользователем): Внешний URL, указывающий на веб-сайт, видео или загрузку. - -Вам не нужно вручную вводить .onion адрес; VoxVera обрабатывает это автоматически на этапе `serve`. diff --git a/docs/sw/AGENTS.md b/docs/sw/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/sw/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/sw/CONTRIBUTING.md b/docs/sw/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/sw/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/sw/docker.md b/docs/sw/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/sw/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/sw/templates.md b/docs/sw/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/sw/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/sw/troubleshooting.md b/docs/sw/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/sw/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/sw/usage.md b/docs/sw/usage.md deleted file mode 100644 index 8434e90..0000000 --- a/docs/sw/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Maelezo ya Matumizi - -Mwongozo huu unashughulikia taratibu za kawaida za CLI. Angalia `docs/docker.md` kwa maelekezo ya Docker na `docs/templates.md` kwa violezo vya vipeperushi vinavyopatikana. - -## Mahitaji ya Awali - -VoxVera imeundwa kuwa rahisi kubebeka na inahitaji vitegemezi vichache vya mfumo. - -### 1. Programu Zinazojitegemea (Zinazopendekezwa) -Unaweza kupakua programu zinazojitegemea na zisizo na vitegemezi kwa mfumo wako wa uendeshaji: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Programu hizi zinajumuisha kila kitu kinachohitajika ili kuendesha VoxVera (isipokuwa `onionshare-cli`). - -### 2. Kisakinishi cha Mstari Mmoja -Vinginevyo, sakinisha kupitia hati yetu ya kiotomatiki: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Usakinishaji wa Mwongozo wa Python -Ikiwa unapendelea kuendesha kutoka kwenye chanzo: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Hatua kwa Hatua - -1. **Anzisha:** Endesha `voxvera init` na ufuate maelekezo. Utaulizwa kuchagua lugha yako kwanza. -2. **Jenga:** Tengeneza rasilimali za kipeperushi. Kila ujenzi huunda kiotomatiki faili ya `voxvera-portable.zip` kwenye folda ya kipeperushi, ikiruhusu wengine kupakua zana nzima moja kwa moja kutoka kwenye kipeperushi chako. - ```bash - voxvera build - ``` -3. **Tumia:** Chapisha kipeperushi kupitia Tor: - ```bash - voxvera serve - ``` - Hii hutambua kiotomatiki mfumo wako wa Tor, inaanzisha OnionShare, na kuandika anwani ya .onion iliyozalishwa kwenye viungo vya kipeperushi. - -## Usaidizi wa Lugha - -VoxVera imetafsiriwa kikamilifu. Unaweza kubadilisha upendeleo wako wa lugha kwa kudumu ukitumia kiteuzi shirikishi au njia ya mkato ya moja kwa moja: - -- **Kiteuzi Shirikishi:** `voxvera lang` -- **Njia ya Mkato ya Moja kwa Moja:** `voxvera --lang sw` (inaweka upendeleo kuwa Kiswahili) - -### Lugha Zinazotumika: -- **Kiingereza:** `en` -- **Kihispania:** `es` (jina mbadala: `--idioma`) -- **Kijerumani:** `de` (jina mbadala: `--sprache`) -- **Kiswahili:** `sw` - -Unaweza pia kulazimisha lugha maalum kwa amri moja bila kubadilisha upendeleo wako wa kudumu: -- **Kiingereza:** `voxvera --lang en check` -- **Kiswahili:** `voxvera --lang sw check` - -Vipeperushi vilivyozalishwa hutambua kiotomatiki lugha ya kivinjari cha mgeni na kubadilisha maandishi ya UI ipasavyo. - -## Usimamizi wa Seva - -Simamia vipeperushi vingi na utambulisho wao wa Tor kutoka kwenye menyu moja shirikishi: - -```bash -voxvera manage -``` - -Vipengele: -- **--- Unda Tovuti/Kipeperushi Kipya ---**: Anza mchakato mzima wa usanidi. -- **--- Anzisha Tovuti Zote ---**: Anzisha au simamisha vipeperushi vyote kwenye kundi lako kwa mpigo mmoja. -- **Hali ya Wakati Halisi**: Angalia URL za .onion zinazofanya kazi na viashiria vya maendeleo ya kuanza kwa Tor. -- **Udhibiti wa Kibinafsi**: Hamisha kama Zip tovuti maalum kwenye ZIP au uzifute. - -## Uakisi wa Ulimwengu (Usambazaji wa Virusi) - -Ili kuhakikisha VoxVera inaendelea kupatikana hata kama hifadhi kuu zitadhibitiwa, kila kipeperushi hufanya kazi kama kioo cha zana hiyo. - -Unapohifadhi kipeperushi, kitufe cha **"Pakua Zana na Chanzo"** kwenye ukurasa wa kutua hutoa `voxvera-portable.zip` iliyo na: -- Chanzo kamili na lugha zote zinazotumika. -- Vitegemezi vyote vya Python (vilivyowekwa mapema). -- Programu za Tor za mifumo mbalimbali. - -Hii inaruhusu kila mtu anayekagua kipeperushi chako kuwa msambazaji mpya wa zana ya VoxVera. - -## Hamisha na Hifadhi Nakala - -Hifadhi nakala za utambulisho wako wa kipekee wa Tor (ili URL yako ya .onion isibadilike kamwe) au hamisha vipeperushi vyako kwenye mashine nyingine. - -- **Hamisha tovuti moja**: `voxvera export <jina_la_folda>` -- **Hamisha tovuti zote**: `voxvera export-all` - -**Mahali pa kuhifadhi:** Hamisho zote zinahifadhiwa kwenye `~/voxvera-exports/` kwenye mifumo yote. - -## Ingiza na Rejesha - -Rejesha usanidi wako wote kwenye mashine mpya kwa kuhamisha faili zako za ZIP kwenda `~/voxvera-exports/` na uendeshe: - -```bash -voxvera import-multiple -``` - -## Uwezo wa Kubebeka na Matumizi ya Nje ya Mtandao - -Ikiwa unahitaji kuendesha VoxVera kwenye mashine isiyo na ufikiaji wa mtandao, unaweza kupakua vitegemezi kwanza: - -```bash -voxvera vendorize -``` - -Hii inapakua maktaba zote za Python zinazohitajika kwenye `voxvera/vendor/`. Kisha zana itatoa kipaumbele kwa faili hizi za kienyeji, ikiruhusu iendeshe bila `pip install`. - -## Ingiza kwa Wingi (JSON) - -Ili kuzalisha vipeperushi kwa wingi kutoka kwa faili nyingi za usanidi wa JSON, ziweke kwenye folda ya `imports/` na uendeshe: - -```bash -voxvera batch-import -``` - -## Jinsi URL Zinavyofanya Kazi - -Kila kipeperushi kina URL mbili tofauti: -- **Kiungo cha kutolewa** (kinachozalishwa kiotomatiki): Anwani ya .onion ambapo kipeperushi kinahifadhiwa. -- **Kiungo cha maudhui** (kilichosanidiwa na mtumiaji): URL ya nje inayoelekeza kwenye tovuti, video, au upakuaji. - -Huna haja ya kuingiza anwani ya .onion kwa mikono; VoxVera inashughulikia hili kiotomatiki wakati wa awamu ya `serve`. diff --git a/docs/templates/AGENTS.md b/docs/templates/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/templates/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/templates/CONTRIBUTING.md b/docs/templates/CONTRIBUTING.md deleted file mode 100644 index 6363399..0000000 --- a/docs/templates/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `{{t('cli.token_name')}}` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/templates/docker.md b/docs/templates/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/templates/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/templates/templates.md b/docs/templates/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/templates/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/templates/troubleshooting.md b/docs/templates/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/templates/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/templates/usage.md b/docs/templates/usage.md deleted file mode 100644 index 54e573e..0000000 --- a/docs/templates/usage.md +++ /dev/null @@ -1,156 +0,0 @@ -# Detailed Usage - -This guide covers common CLI workflows. See `docs/docker.md` for Docker instructions and `docs/templates.md` for available flyer templates. - -## Prerequisites - -VoxVera is designed to be highly portable. You can run it directly from the source code on any platform with Python installed. - -Linux with `systemd --user` is the supported persistent-host environment. Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and should not yet be treated as equally reliable hidden-service deployment targets. - -### 1. Automated Install (Recommended) -The easiest way to install VoxVera is using the Linux-first installer script: - -**Linux / macOS:** -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` -On Linux, this also installs the recurring recovery timer used to retry hidden-service startup after boot and after missed/offline periods. - -**Windows (PowerShell):** -```powershell -irm https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.ps1 | iex -``` -The Windows installer is experimental and does not yet guarantee production-ready background hosting behavior. - -### 2. Manual Source Install -If you have downloaded the source code ZIP: - -1. **Extract** the ZIP file. -2. **Open a terminal** in the extracted folder. -3. **Run the setup script**: - - **Linux/macOS:** `./setup.sh` - - **Windows:** `.\voxvera-install.sh` (or run `python -m pip install .`) - -## Uninstallation - -If you wish to remove VoxVera from your system, you can use the provided uninstall scripts from the source directory. This will safely remove the CLI tool and any downloaded dependencies. - -- **Linux / macOS:** Run `./uninstall.sh` -- **Windows (PowerShell):** Run `.\uninstall.ps1` - -*Note: Uninstallation will not delete your generated flyers or your `.onion` keys stored in the `~/voxvera-exports` or local `host/` folders.* - -## Step-by-Step - -1. **Initialize:** Run `voxvera init` and follow the prompts. You will be asked to select your language first. -2. **Build:** Generate the flyer assets. Every build automatically creates a `voxvera-portable.zip` in the flyer's folder, allowing others to download the full tool directly from your flyer. - ```bash - voxvera build - ``` -3. **Serve:** Publish the flyer over Tor: - ```bash - voxvera serve - ``` - This automatically detects your Tor instance, starts OnionShare, and writes the generated .onion address into the flyer's tear-off links. - -### Persistent Hosting On Linux - -For a machine that should resume hosting automatically after boot or after being offline, install the autostart recovery timer: - -```bash -voxvera autostart -``` - -This installs a `systemd --user` timer that reruns `voxvera start-all` every few minutes. The retry loop is the supported way to recover hidden-service hosting after suspend, reboot, or temporary network loss. - -## Language Support - -VoxVera is fully localized. You can change your language preference permanently using either the interactive selector or a direct shortcut: - -- **Interactive Selector:** `voxvera lang` -- **Direct Shortcut:** `voxvera --lang de` (sets preference to German) - -### Supported Languages: -- **English:** `en` -- **Spanish:** `es` (alias: `--idioma`) -- **German:** `de` (alias: `--sprache`) - -You can also force a specific language for a single command without changing your permanent preference: -- **English:** `voxvera --lang en check` -- **German:** `voxvera --sprache de check` -- **Spanish:** `voxvera --idioma es check` - -The generated flyers automatically detect the visitor's browser language and switch the UI text accordingly. - -## Server Management - -Manage multiple flyers and their Tor identities from a single interactive menu: - -```bash -voxvera manage -``` - -Features: -- **{{t('cli.manage_create_new')}}**: Start the full setup sequence. -- **{{t('cli.manage_start_all')}}**: Launch or shut down every flyer in your fleet at once. -- **Real-time Status**: View active `.onion` URLs and Tor bootstrapping progress indicators. -- **Individual Control**: {{t('cli.manage_action_export')}} specific sites to ZIP or delete them. - -## Universal Mirroring (Viral Distribution) - -To ensure VoxVera remains accessible even if central repositories are censored, every flyer acts as a mirror for the tool. - -When you host a flyer, the **"{{t('web.download_button')}}"** button on the landing page provides a `voxvera-source.zip` containing: -- The full source code and all supported languages. -- Installation and setup scripts for all platforms. -- Complete documentation and templates. - -To keep the mirrored download practical for low-bandwidth redistribution, the -source archive does not ship pre-downloaded Tor binaries. Normal installer and -release builds still fetch or bundle those artifacts separately. - -This allows anyone who scans your flyer to become a new distributor of the VoxVera tool. - -## Export & Backup - -Back up your unique Tor identities (so your `.onion` URL never changes) or move your flyers to another machine. - -- **Export a single site**: `voxvera export <folder_name>` -- **Export all sites**: `voxvera export-all` - -**Storage location:** All exports are saved to `~/voxvera-exports/` on all platforms. - -## Import & Recovery - -Restore your entire setup on a new machine by moving your ZIP files to `~/voxvera-exports/` and running: - -```bash -voxvera import-multiple -``` - -## Portability & Offline Use - -If you need to run VoxVera on a machine without internet access, you can "vendorize" the dependencies first: - -```bash -voxvera vendorize -``` - -This downloads all required Python libraries into `voxvera/vendor/`. The tool will then prioritize these local files, allowing it to run without `pip install`. - -## Batch Import (JSON) - -To bulk-generate flyers from multiple JSON configuration files, place them in the `imports/` directory and run: - -```bash -voxvera batch-import -``` - -## How URLs Work - -Each flyer has two separate URLs: -- **Tear-off link** (auto-generated): The .onion address where the flyer is hosted. -- **Content link** (user-configured): An external URL pointing to a website, video, or download. - -You do not need to manually enter the .onion address; VoxVera handles this automatically during the `serve` phase. diff --git a/docs/tr/AGENTS.md b/docs/tr/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/tr/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/tr/CONTRIBUTING.md b/docs/tr/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/tr/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/tr/docker.md b/docs/tr/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/tr/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/tr/templates.md b/docs/tr/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/tr/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/tr/troubleshooting.md b/docs/tr/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/tr/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/tr/usage.md b/docs/tr/usage.md deleted file mode 100644 index 6ce6a7d..0000000 --- a/docs/tr/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Detaylı Kullanım - -Bu kılavuz, yaygın CLI iş akışlarını kapsar. Docker talimatları için `docs/docker.md` ve mevcut ilan şablonları için `docs/templates.md` dosyalarına bakın. - -## Ön Koşullar - -VoxVera, yüksek taşınabilirlik için tasarlanmıştır ve minimum sistem bağımlılığı gerektirir. - -### 1. Bağımsız İkililer (Önerilen) -İşletim sisteminiz için bağımsız, bağımlılık gerektirmeyen ikili dosyaları (binaries) indirebilirsiniz: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Bu dosyalar, VoxVera'yı çalıştırmak için gereken her şeyi içerir (`onionshare-cli` hariç). - -### 2. Tek Satırlık Kurulum -Alternatif olarak, otomatik betiğimiz aracılığıyla kurulum yapın: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Manuel Python Kurulumu -Kaynaktan çalıştırmayı tercih ederseniz: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Adım Adım - -1. **Başlatma:** `voxvera init` komutunu çalıştırın ve istemleri takip edin. Önce dilinizi seçmeniz istenecektir. -2. **Oluşturma:** İlan varlıklarını oluşturun. Her oluşturma işlemi, ilan klasöründe otomatik olarak bir `voxvera-portable.zip` oluşturur; bu sayede başkaları tam aracı doğrudan ilanınızdan indirebilir. - ```bash - voxvera build - ``` -3. **Sunma:** İlanı Tor üzerinden yayınlayın: - ```bash - voxvera serve - ``` - bu komut mevcut Tor örneğinizi otomatik olarak algılar, OnionShare'i başlatır ve oluşturulan .onion adresini ilandaki yırtılabilir bağlantılara yazar. - -## Dil Desteği - -VoxVera tamamen yerelleştirilmiştir. Dil tercihinizi etkileşimli seçiciyi veya doğrudan kısayolu kullanarak kalıcı olarak değiştirebilirsiniz: - -- **Etkileşimli Seçici:** `voxvera lang` -- **Doğrudan Kısayol:** `voxvera --lang tr` (tercihi Türkçe olarak ayarlar) - -### Desteklenen Diller: -- **İngilizce:** `en` -- **İspanyolca:** `es` (takma ad: `--idioma`) -- **Almanca:** `de` (takma ad: `--sprache`) -- **Türkçe:** `tr` - -Kalıcı tercihinizi değiştirmeden tek bir komut için belirli bir dili de zorlayabilirsiniz: -- **İngilizce:** `voxvera --lang en check` -- **Türkçe:** `voxvera --lang tr check` - -Oluşturulan ilanlar, ziyaretçinin tarayıcı dilini otomatik olarak algılar ve kullanıcı arayüzü metnini buna göre değiştirir. - -## Sunucu Yönetimi - -Tek bir etkileşimli menüden birden fazla ilanı ve Tor kimliklerini yönetin: - -```bash -voxvera manage -``` - -Özellikler: -- **--- Yeni Site/İlan Oluştur ---**: Tam kurulum dizisini başlatın. -- **--- Tüm Siteleri Başlat ---**: Filonuzdaki tüm ilanları tek seferde başlatın veya kapatın. -- **Gerçek Zamanlı Durum**: Aktif .onion URL'lerini ve Tor başlatma ilerleme göstergelerini görüntüleyin. -- **Bireysel Kontrol**: Belirli siteleri ZIP olarak Zip Olarak Dışa Aktar veya silin. - -## Evrensel Aynalama (Viral Dağıtım) - -Merkezi depolar sansürlense bile VoxVera'nın erişilebilir kalmasını sağlamak için her ilan, araç için bir ayna görevi görür. - -Bir ilanı barındırdığınızda, açılış sayfasındaki **"Aracı ve Kaynak Kodunu İndir"** düğmesi şunları içeren bir `voxvera-portable.zip` sunar: -- Tam kaynak kodu ve desteklenen tüm diller. -- Tüm Python bağımlılıkları (önceden paketlenmiş). -- Platformlar arası Tor ikilileri. - -Bu, ilanınızı tarayan herkesin VoxVera aracının yeni bir dağıtıcısı olmasını sağlar. - -## Dışa Aktarma ve Yedekleme - -Benzersiz Tor kimliklerinizi yedekleyin (.onion URL'nizin hiç değişmemesi için) veya ilanlarınızı başka bir makineye taşıyın. - -- **Tek bir siteyi dışa aktar**: `voxvera export <klasör_adı>` -- **Tüm siteleri dışa aktar**: `voxvera export-all` - -**Depolama konumu:** Tüm dışa aktarmalar, tüm platformlarda kullanıcının ana dizinindeki `~/voxvera-exports/` klasörüne ZIP dosyası olarak kaydedilir. - -## İçe Aktarma ve Kurtarma - -ZIP dosyalarınızı `~/voxvera-exports/` dizinine taşıyıp şu komutu çalıştırarak tüm kurulumunuzu yeni bir makinede geri yükleyin: - -```bash -voxvera import-multiple -``` - -## Taşınabilirlik ve Çevrimdışı Kullanım - -VoxVera'yı internet erişimi olmayan bir makinede çalıştırmanız gerekirse, önce bağımlılıkları yerelleştirebilirsiniz: - -```bash -voxvera vendorize -``` - -Bu, gerekli tüm Python kütüphanelerini `voxvera/vendor/` dizinine indirir. Araç daha sonra bu yerel dosyalara öncelik vererek `pip install` olmadan çalışmasına olanak tanır. - -## Toplu İçe Aktarma (JSON) - -Birden fazla JSON yapılandırma dosyasından toplu ilan oluşturmak için bunları `imports/` dizinine yerleştirin ve çalıştırın: - -```bash -voxvera batch-import -``` - -## URL'ler Nasıl Çalışır? - -Her ilanın iki ayrı URL'si vardır: -- **Yırtılabilir bağlantı** (otomatik oluşturulur): İlanın barındırıldığı .onion adresi. -- **İçerik bağlantısı** (kullanıcı tarafından yapılandırılır): Bir web sitesine, videoya veya indirmeye işaret eden harici bir URL. - -.onion adresini manuel olarak girmenize gerek yoktur; VoxVera `serve` aşamasında bunu otomatik olarak halleder. diff --git a/docs/windows-validation-checklist.md b/docs/windows-validation-checklist.md deleted file mode 100644 index a3a486d..0000000 --- a/docs/windows-validation-checklist.md +++ /dev/null @@ -1,172 +0,0 @@ -# Windows Validation Checklist - -This checklist is for validating the experimental Windows CLI path on a real Windows machine. - -Do not promote Windows above `experimental` until this checklist has been completed successfully on at least one native host and the results have been reviewed. - -## Goal - -Validate whether the current Windows runtime can: - -1. install cleanly -2. build and serve a flyer -3. preserve the OnionShare session identity -4. recover after login/reboot/offline periods -5. surface understandable logs and status - -## Environment Notes - -- This checklist assumes the CLI runtime, not the Electron GUI. -- Prefer a clean Windows machine or VM snapshot. -- Record the exact Windows version and install path used. - -## 1. Install Surface - -Record which install path was used: - -- standalone `.exe` -- PowerShell installer -- Chocolatey - -Capture in PowerShell: - -```powershell -voxvera --version -voxvera platform-status --json -voxvera doctor --json -voxvera autostart status --json -``` - -Pass criteria: - -- VoxVera launches -- `platform-status` reports `windows_cli` -- `doctor` runs without crashing -- `autostart status` runs without crashing - -## 2. Build + Serve - -Create a fresh working directory and config: - -```powershell -$env:VOXVERA_DIR = "$HOME\\voxvera-test" -New-Item -ItemType Directory -Force $env:VOXVERA_DIR | Out-Null -voxvera init --non-interactive -voxvera build -voxvera serve -``` - -Capture: - -- whether `index.html` is created under `%USERPROFILE%\\voxvera-test\\host\\voxvera\\` -- whether `.onionshare-session` appears -- whether an `.onion` URL is printed -- whether `onionshare.log` is created - -Pass criteria: - -- build completes -- serve completes -- `.onionshare-session` exists -- `onionshare.log` exists - -## 3. Identity Persistence - -Stop and restart the site: - -```powershell -voxvera stop-all -voxvera start-all -``` - -Capture: - -- whether the same `.onion` URL returns -- whether `.onionshare-session` remains unchanged - -Pass criteria: - -- the onion identity persists across restart - -## 4. Autostart Install - -Install the experimental Task Scheduler path: - -```powershell -voxvera autostart -voxvera autostart status --json -``` - -Capture: - -- scheduled task name -- any `schtasks` output or errors - -Pass criteria: - -- scheduled task is created -- `autostart status` reports installed artifacts - -## 5. Login / Reboot Recovery - -After autostart is installed: - -1. reboot the machine or log out and back in -2. wait a few minutes -3. check: - -```powershell -voxvera doctor --json -voxvera autostart status --json -voxvera start-all -``` - -Capture: - -- whether hosting resumed automatically -- whether the onion identity persisted -- whether the process had to be restarted manually - -## 6. Offline / Reconnect Recovery - -While a site is running: - -1. disconnect the machine from the network -2. wait at least 2 minutes -3. reconnect -4. wait a few minutes - -Capture: - -- whether hosting recovered automatically -- whether manual `voxvera start-all` was required -- any errors in `onionshare.log` - -## 7. Logs And Status - -Capture the practical debugging workflow: - -```powershell -voxvera doctor --json -voxvera autostart status --json -Get-ChildItem "$HOME\\voxvera-test\\host\\voxvera" -Force -``` - -Document: - -- where logs live -- what failed if recovery did not work -- any permissions/path issues - -## Report Back - -A useful tester report should include: - -- Windows version -- install path used -- whether build worked -- whether serve worked -- whether the onion identity persisted -- whether login/reboot recovery worked -- whether offline/reconnect recovery worked -- exact command output or error text for failures diff --git a/docs/zh/AGENTS.md b/docs/zh/AGENTS.md deleted file mode 100644 index 69f618b..0000000 --- a/docs/zh/AGENTS.md +++ /dev/null @@ -1,42 +0,0 @@ -# AI Agent Instructions for VoxVera - -This guide is for AI agents (like Gemini, Claude, or GPT) contributing to the VoxVera project. Follow these protocols to maintain the architectural integrity and multi-language support. - -## Core Mandates - -1. **Security-First**: VoxVera is a Tor-based tool. Never suggest features that leak IP addresses or use non-Tor external resources (CDNs, etc.). -2. **Local-First**: All assets (fonts, dependencies, binaries) must be self-contained within the `voxvera/` package to support the Universal Mirroring model. -3. **Tokenized UI**: Never hardcode user-facing strings. Always add them to `voxvera/locales/en.json` and use the `t('cli.token')` helper. -4. **Markdown Redaction**: Use `~~text~~` in locale JSONs for strike-through effects. Both the build system and the JS engine handle the conversion to `<span class="redacted">` automatically. -5. **Visual Width Testing**: When modifying UI or adding languages, verify that long or complex strings (e.g., Hindi ligatures or CJK characters) do not exceed the visual unit limits defined in the CLI. - -## Localization Protocol - -When adding a new language or updating an existing one: -- **CLI/Flyers**: Update `voxvera/locales/{lang}.json`. Include `meta`, `cli`, `web`, and `landing` categories. -- **Landing Page**: - - Directly update the `const locales` object in `site/index.html`. - - **Crucial**: Run `voxvera build-site` to generate the latest portable bundle and refresh the pre-rendered HTML. -- **Documentation**: - - Master templates live in `docs/templates/`. - - Localized overrides live in `voxvera/locales/{lang}/docs/`. - - **Crucial**: After any change to locales or templates, you MUST run `voxvera build-docs` to synchronize the output in `docs/{en,es,de}/`. - -## Universal Mirroring - -VoxVera propagates through its own flyers. -- Every `voxvera build` and `voxvera build-site` generates `voxvera-portable.zip`. -- If you modify the core source code, ensure the `bundle_portable` function in `voxvera/cli.py` still correctly captures all necessary directories (especially `vendor/`, `locales/`, and `resources/`). - -## Verification Checklist - -Before finishing a task, ensure you have: -1. Run unit tests: `pytest tests/test_cli.py`. -2. Verified the localization: `voxvera --lang {lang} check`. -3. Rebuilt the documentation: `voxvera build-docs`. -4. Synchronized the public site: `voxvera build-site`. -5. Verified the portable bundle exists: `ls -l voxvera/host/*/download/voxvera-portable.zip` and `ls -l site/download/voxvera-portable.zip`. - ---- - -Follow these rules to ensure VoxVera remains a robust, viral, and decentralized tool for truth. diff --git a/docs/zh/CONTRIBUTING.md b/docs/zh/CONTRIBUTING.md deleted file mode 100644 index f1a1fdc..0000000 --- a/docs/zh/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing to VoxVera - -Thank you for your interest in contributing to VoxVera! This project aims to be a global, censorship-resistant tool, and your help—especially with translations—is vital. - -## Adding a New Language - -VoxVera uses a centralized token system for the CLI and Web components, and a template-based system for Documentation. To add a new language (e.g., French/`fr`), follow this checklist: - -### 1. The Token File -Create a new JSON file in `voxvera/locales/{lang_code}.json`. -- Use `en.json` as your master template. -- **`meta`**: Include the native language name and a flag emoji. -- **`cli`**: Translate all strings used in the terminal interface. -- **`web`**: Translate strings used on the generated landing pages and flyers. -- **`landing`**: Translate the specific content for the official VoxVera website. -- **Formatting**: You can use Markdown-style strike-throughs (`~~redacted text~~`) in any of these strings; they will be automatically converted to the stylized "redacted" effect on the flyers. - -### 2. The Landing Page -The main landing page is generated from the shared template and locale files. -- Add your language in `voxvera/locales/{lang_code}.json`. -- Do **not** edit `site/index.html` directly; it is generated output. -- Run `voxvera build-site` to refresh the public assets and inject your new locale into the generated HTML. - -### 3. Documentation -VoxVera uses the **Doc-Sync Engine** to keep manuals in sync. -- Create localized Markdown files in `voxvera/locales/{lang_code}/docs/`. -- Use the templates in `docs/templates/` as your guide. -- You can use `cli.token_name` to reference terminal commands automatically. - -### 4. Build and Verify -Run the following commands to verify your changes: -- `voxvera --lang {lang_code} check` (Verify CLI translation) -- `voxvera build-docs` (Generate localized manuals) -- `voxvera build-site` (Synchronize the public website and generate the latest portable bundle) -- Open the generated `site/index.html` in a browser and test the language switcher. - -## Code Contributions -- **Dependencies**: if you add a new Python library to `requirements.txt`, you MUST run `voxvera vendorize` to include it in the portable distribution. -- **Layout Integrity**: VoxVera uses visual width validation. If you add new UI elements, ensure they respect the physical boundaries of an 8.5"x11" flyer. -- **Tests**: Ensure all tests pass: `pytest tests/`. Run the integrity suite specifically when modifying locales: `pytest tests/test_integrity.py`. -- **Generated artifacts**: Treat `voxvera/resources/bin/` as local build output, not source files. Release binaries belong in GitHub Releases, not hand-edited repo state. -- **Style**: Follow the existing coding style (PEP 8 for Python). -- **Documentation**: If adding a new feature, update the master templates in `docs/templates/` and run `voxvera build-docs`. - ---- - -Together, we can ensure that truth remains accessible to everyone, everywhere. diff --git a/docs/zh/docker.md b/docs/zh/docker.md deleted file mode 100644 index 6eb3d1d..0000000 --- a/docs/zh/docker.md +++ /dev/null @@ -1,48 +0,0 @@ -# Docker Usage - -Experimental: the container path is not yet a production-grade hidden-service deployment target. Linux with `systemd --user` remains the supported persistent-host environment. - -A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to -`ghcr.io/voxvera/voxvera`. - -```bash -# pull the image -docker pull ghcr.io/voxvera/voxvera:latest - -# run the experimental container with flyers stored in ./flyers -mkdir -p flyers -docker run -d \ - --name voxvera \ - --restart unless-stopped \ - -v "$(pwd)/flyers:/flyers" \ - ghcr.io/voxvera/voxvera:latest -``` - -The container now uses a dedicated entrypoint that: -- stores runtime state under `/flyers` -- seeds `/flyers/config.json` if needed -- starts an in-container Tor daemon on `127.0.0.1:9050/9051` -- bootstraps a default site when `/flyers/host` is empty -- runs `voxvera start-all` on startup and retries it periodically -- exposes a container healthcheck based on `voxvera doctor --json` - -Useful commands: - -```bash -docker logs -f voxvera -docker exec -it voxvera voxvera doctor --json -docker exec -it voxvera voxvera autostart status --json -``` - -If you prefer Compose: - -```yaml -services: - voxvera: - image: ghcr.io/voxvera/voxvera:latest - restart: unless-stopped - volumes: - - ./flyers:/flyers -``` - -Use this path for testing only until the container runtime and background recovery behavior are validated end-to-end. diff --git a/docs/zh/templates.md b/docs/zh/templates.md deleted file mode 100644 index f299c24..0000000 --- a/docs/zh/templates.md +++ /dev/null @@ -1,14 +0,0 @@ -# Flyer Templates - -Pre-built flyer templates live in the `templates/` directory. Use the CLI to copy one with: - -```bash -voxvera init --template <name> -``` - -This will create a new folder under `dist/` named `<name>-<YYYYMMDD>` containing the template files. - -Available templates: - -- **blank** – minimal placeholder files, also used when extracting fields from a PDF. -- **voxvera** – example flyer showcasing the VoxVera project. diff --git a/docs/zh/troubleshooting.md b/docs/zh/troubleshooting.md deleted file mode 100644 index c582141..0000000 --- a/docs/zh/troubleshooting.md +++ /dev/null @@ -1,75 +0,0 @@ -# Troubleshooting - -This page collects common issues encountered when hosting or accessing flyers. - -## Tor connectivity -- Ensure Tor is allowed through your firewall. On systems using `ufw` you may need to run `sudo ufw allow tor`. -- Some networks block Tor entirely. If you cannot reach onion services, try connecting over a different network or use a Tor bridge. - -## Supported deployment target -- The supported persistent-host setup is Linux with `systemd --user`. -- Windows, macOS, Docker, Flatpak, AppImage, Homebrew, and Chocolatey are currently experimental and may not recover hosting automatically after reboot or network interruptions. - -## Tor port detection - -`voxvera serve` auto-detects Tor by probing common ports (9050/9150 for SOCKS, 9051/9151 for control). If detection fails -- for example when Tor runs on non-standard ports -- you can override with environment variables: - -```bash -TOR_SOCKS_PORT=19050 TOR_CONTROL_PORT=19051 voxvera serve -``` - -If no running Tor is found, the defaults (9050/9051) are used and OnionShare will attempt to connect on those ports. - -## Firewall rules -- If `voxvera serve` fails to start OnionShare, verify that outbound connections on ports 9001 and 80 are permitted. -- Corporate or university firewalls can block the hidden service ports required by Tor. - -## SELinux -- On SELinux-enabled distributions you may see `permission denied` errors when OnionShare writes to the `host` directory. -- Run `sudo chcon -Rt svirt_sandbox_file_t host` or disable SELinux enforcement for the folder. - -## OnionShare crashes -If `voxvera serve` prints "OnionShare exited unexpectedly", check the log file -`host/<folder_name>/onionshare.log` for details. Common causes: - -- Tor is not running (`sudo systemctl start tor`) -- A port conflict with another service -- Missing `onionshare-cli` (run `voxvera check`) - -## Onion URL changed unexpectedly -The onion URL is tied to the Ed25519 keypair stored in -`host/<folder_name>/.onionshare-session`. If this file is deleted, a new -keypair (and URL) will be generated on the next `voxvera serve`. The -`voxvera import` command preserves this file automatically, but manual -deletion of the `host/` directory will destroy it. - -## Hosting does not return after reboot or network loss -On Linux, install or verify the recovery timer: - -```bash -voxvera autostart -systemctl --user status voxvera-start.timer -systemctl --user status voxvera-start.service -``` - -The supported recovery path is the recurring `systemd --user` timer, which reruns `voxvera start-all` every few minutes. - -## QR codes not generated -If `voxvera build` reports "No URLs configured yet", this is expected before the first `voxvera serve`. QR codes for tear-off links are generated automatically once the .onion address is known. QR codes for the content link are generated if you provided a URL during `voxvera init`. - -## Electron GUI -If `npm start` fails with `spawn voxvera ENOENT`, the `voxvera` command is not in your `PATH`. Install it with `pipx install git+https://github.com/PR0M3TH3AN/VoxVera.git` or run `./install.sh` from the repository. - -## Missing dependencies -Run `voxvera check` to verify your setup. The command checks for required -Python packages (`qrcode`, `Pillow`, `jsmin`, `htmlmin`, `pypdf`) and -external tools (`onionshare-cli`), then prints a summary of anything -missing. To install everything: - -```bash -# Recommended: use the install script (handles Tor + OnionShare too) -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash - -# Or reinstall just the Python package -pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -``` diff --git a/docs/zh/usage.md b/docs/zh/usage.md deleted file mode 100644 index 144a1bc..0000000 --- a/docs/zh/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# 详细用法 - -本指南涵盖了常用的 CLI 工作流程。有关 Docker 指令请参阅 `docs/docker.md`,有关可用传单模板请参阅 `docs/templates.md`。 - -## 先决条件 - -VoxVera 旨在实现高度便携,且仅需极少的系统依赖。 - -### 1. 独立二进制文件(推荐) -您可以为您的操作系统下载独立的、无依赖的二进制文件: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -这些二进制文件包含了运行 VoxVera 所需的一切(`onionshare-cli` 除外)。 - -### 2. 一键安装 -或者,通过我们的自动化脚本进行安装: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. 手动 Python 安装 -如果您更喜欢从源代码运行: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## 分步指南 - -1. **初始化:** 运行 `voxvera init` 并按照提示操作。系统会首先要求您选择语言。 -2. **构建:** 生成传单资产。每次构建都会在传单文件夹中自动创建一个 `voxvera-portable.zip`,允许其他人直接从您的传单下载完整工具。 - ```bash - voxvera build - ``` -3. **发布:** 通过 Tor 发布传单: - ```bash - voxvera serve - ``` - 这会自动检测您的 Tor 实例,启动 OnionShare,并将生成的 .onion 地址写入传单的可撕下链接中。 - -## 语言支持 - -VoxVera 已完全本地化。您可以使用交互式选择器或直接快捷方式永久更改您的语言偏好: - -- **交互式选择器:** `voxvera lang` -- **直接快捷方式:** `voxvera --lang zh`(将偏好设置为简体中文) - -### 支持的语言: -- **英语:** `en` -- **西班牙语:** `es`(别名:`--idioma`) -- **德语:** `de`(别名:`--sprache`) -- **简体中文:** `zh` - -您也可以在不更改永久偏好的情况下,为单个命令强制指定特定语言: -- **英语:** `voxvera --lang en check` -- **简体中文:** `voxvera --lang zh check` - -生成的传单会自动检测访问者的浏览器语言并相应地切换 UI 文本。 - -## 服务器管理 - -通过单一的交互式菜单管理多个传单及其 Tor 身份: - -```bash -voxvera manage -``` - -功能: -- **--- 创建新站点/传单 ---**:开始完整的设置序列。 -- **--- 启动所有站点 ---**:一次性启动或关闭您旗下的所有传单。 -- **实时状态**:查看活跃的 .onion URL 和 Tor 引导进度指示器。 -- **个人控制**:将特定站点 导出为 Zip 到 ZIP 或删除它们。 - -## 通用镜像(病毒式传播) - -为了确保即使中央仓库被审查,VoxVera 仍然可用,每张传单都充当该工具的镜像。 - -当您托管传单时,落地页上的 **“下载工具与源码”** 按钮会提供一个 `voxvera-portable.zip`,其中包含: -- 完整的源代码和所有支持的语言。 -- 所有 Python 依赖项(预先打包)。 -- 跨平台的 Tor 二进制文件。 - -这允许任何扫描您传单的人成为 VoxVera 工具的新分发者。 - -## 导出与备份 - -备份您独特的 Tor 身份(这样您的 .onion URL 就永远不会改变)或将您的传单移动到另一台机器。 - -- **导出单个站点**:`voxvera export <文件夹名称>` -- **导出所有站点**:`voxvera export-all` - -**存储位置:** 在所有平台上,所有导出都会以 ZIP 文件的形式保存在用户主目录下的 `voxvera-exports` 文件夹中(`~/voxvera-exports/`)。 - -## 导入与恢复 - -通过将 ZIP 文件移动到 `~/voxvera-exports/` 并运行以下命令,在新机器上恢复您的整个设置: - -```bash -voxvera import-multiple -``` - -## 便携性与离线使用 - -如果您需要在没有互联网访问的机器上运行 VoxVera,您可以先“本地化”依赖项: - -```bash -voxvera vendorize -``` - -这将把所有所需的 Python 库下载到 `voxvera/vendor/` 中。该工具随后将优先使用这些本地文件,使其能够在没有 `pip install` 的情况下运行。 - -## 批量导入 (JSON) - -要从多个 JSON 配置文件批量生成传单,请将它们放在 `imports/` 目录中并运行: - -```bash -voxvera batch-import -``` - -## URL 如何工作 - -每张传单都有两个独立的 URL: -- **撕下链接**(自动生成):托管传单的 .onion 地址。 -- **内容链接**(用户配置):指向网站、视频或下载的外部 URL。 - -您无需手动输入 .onion 地址;VoxVera 会在 `serve` 阶段自动处理。 diff --git a/gui/README.md b/gui/README.md deleted file mode 100644 index be42932..0000000 --- a/gui/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# VoxVera GUI - -This directory contains a minimal Electron wrapper around the `voxvera` CLI. -It exposes a simple "Quickstart" button so non-technical users can generate -flyers without touching the command line. - -Status: experimental. The GUI is not the supported path for reliable background hidden-service hosting or automatic recovery after reboot/network loss. -The GUI now reads `voxvera platform-status --json`, `voxvera doctor --json`, and `voxvera autostart status --json` so its runtime messaging reflects the same platform contract as the CLI instead of inventing a separate compatibility story. - -## Development - -``` -cd gui/electron -npm install -npm start -``` - -The Electron app invokes the `voxvera` binary from your `PATH`. -Make sure it is installed before launching the GUI. - -Configuration is stored in your operating system's *user data* directory. -On Linux this defaults to `~/.config/voxvera-gui/config.json`. The first -launch copies a default `config.json` there and subsequent edits via the GUI -update that file. diff --git a/gui/electron/.npmrc b/gui/electron/.npmrc deleted file mode 100644 index cffe8cd..0000000 --- a/gui/electron/.npmrc +++ /dev/null @@ -1 +0,0 @@ -save-exact=true diff --git a/gui/electron/index.html b/gui/electron/index.html deleted file mode 100644 index fc372ed..0000000 --- a/gui/electron/index.html +++ /dev/null @@ -1,152 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="UTF-8"> - <title>VoxVera GUI - - - -

VoxVera

-
- Runtime status -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-

-

-  
-
-
diff --git a/gui/electron/main.js b/gui/electron/main.js
deleted file mode 100644
index 480eaf6..0000000
--- a/gui/electron/main.js
+++ /dev/null
@@ -1,166 +0,0 @@
-const { app, BrowserWindow, ipcMain, dialog } = require('electron');
-const { spawn } = require('child_process');
-const path = require('path');
-const which = require('which');
-const fs = require('fs');
-const { extractOnionUrl } = require('./runtime-utils');
-
-let mainWindow;
-let onionProc;
-
-function createWindow() {
-  mainWindow = new BrowserWindow({
-    width: 800,
-    height: 600,
-    webPreferences: {
-      preload: path.join(__dirname, 'preload.js')
-    }
-  });
-  mainWindow.loadFile('index.html');
-}
-
-function getVoxveraPath() {
-  const voxveraPath = which.sync('voxvera', { nothrow: true });
-  if (!voxveraPath) {
-    throw new Error('Install the voxvera CLI and ensure it is in your PATH.');
-  }
-  return voxveraPath;
-}
-
-function runJsonCommand(args) {
-  return new Promise((resolve, reject) => {
-    let stdout = '';
-    let stderr = '';
-    const proc = spawn(getVoxveraPath(), args);
-    proc.stdout.on('data', data => {
-      stdout += data.toString();
-    });
-    proc.stderr.on('data', data => {
-      stderr += data.toString();
-    });
-    proc.on('close', code => {
-      if (code !== 0) {
-        reject(new Error(stderr || `voxvera exited with code ${code}`));
-        return;
-      }
-      try {
-        resolve(JSON.parse(stdout));
-      } catch (err) {
-        reject(new Error(`Could not parse VoxVera JSON output: ${err.message}`));
-      }
-    });
-    proc.on('error', reject);
-  });
-}
-
-app.whenReady().then(() => {
-  createWindow();
-});
-
-function getConfigPath() {
-  const userDir = app.getPath('userData');
-  const cfgPath = path.join(userDir, 'config.json');
-  if (!fs.existsSync(cfgPath)) {
-    try {
-      fs.mkdirSync(userDir, { recursive: true });
-      const defaultCfg = path.join(__dirname, '..', '..', 'voxvera', 'src', 'config.json');
-      fs.copyFileSync(defaultCfg, cfgPath);
-    } catch (err) {
-      dialog.showErrorBox('Config error', err.message);
-    }
-  }
-  return cfgPath;
-}
-
-ipcMain.handle('load-config', async () => {
-  const p = getConfigPath();
-  const raw = fs.readFileSync(p, 'utf8');
-  const config = JSON.parse(raw);
-  if (config.footer_message === undefined && config.binary_message !== undefined) {
-    config.footer_message = config.binary_message;
-  }
-  delete config.binary_message;
-  return config;
-});
-
-ipcMain.handle('load-runtime-status', async () => {
-  try {
-    const platformStatus = await runJsonCommand(['platform-status', '--json']);
-    const doctor = await runJsonCommand(['doctor', '--json']);
-    let autostart = null;
-    try {
-      autostart = await runJsonCommand(['autostart', 'status', '--json']);
-    } catch (err) {
-      autostart = { error: err.message };
-    }
-    return {
-      ok: true,
-      platformStatus,
-      doctor,
-      autostart
-    };
-  } catch (err) {
-    return {
-      ok: false,
-      error: err.message
-    };
-  }
-});
-
-ipcMain.handle('run-quickstart', async (_, config) => {
-  const configPath = getConfigPath();
-  if (config && typeof config === 'object') {
-    fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
-  }
-  let voxveraPath;
-  try {
-    voxveraPath = getVoxveraPath();
-  } catch (err) {
-    dialog.showErrorBox('voxvera not found', err.message);
-    return -1;
-  }
-  return new Promise((resolve) => {
-    if (onionProc) {
-      onionProc.kill();
-      onionProc = null;
-    }
-    const args = ['--config', configPath, 'quickstart', '--non-interactive'];
-    const proc = spawn(voxveraPath, args);
-    proc.stdout.on('data', data => {
-      const line = data.toString();
-      process.stdout.write(line);
-      if (mainWindow) {
-        mainWindow.webContents.send('log', { text: line, isError: false });
-      }
-      const onionUrl = extractOnionUrl(line);
-      if (onionUrl && mainWindow) {
-        mainWindow.webContents.send('onion-url', onionUrl);
-      }
-    });
-    proc.stderr.on('data', data => {
-      const line = data.toString();
-      process.stderr.write(line);
-      if (mainWindow) {
-        mainWindow.webContents.send('log', { text: line, isError: true });
-      }
-    });
-    proc.on('close', code => {
-      if (code !== 0) {
-        dialog.showErrorBox('voxvera error', `voxvera exited with code ${code}.`);
-      }
-      resolve(code);
-    });
-    proc.on('error', err => {
-      dialog.showErrorBox('voxvera error', err.message);
-      resolve(-1);
-    });
-  });
-});
-
-app.on('window-all-closed', () => {
-  if (onionProc) {
-    onionProc.kill();
-    onionProc = null;
-  }
-  if (process.platform !== 'darwin') app.quit();
-});
diff --git a/gui/electron/package.json b/gui/electron/package.json
deleted file mode 100644
index e0aa096..0000000
--- a/gui/electron/package.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-  "name": "voxvera-gui",
-  "version": "0.1.0",
-  "main": "main.js",
-  "scripts": {
-    "start": "electron .",
-    "lint": "echo 'lint pass'",
-    "test": "node --test runtime-utils.test.js"
-  },
-  "devDependencies": {
-    "electron": "^29.0.0",
-    "which": "^3.0.0"
-  },
-  "dependencies": {
-    "get-port": "^6.1.2"
-  }
-}
diff --git a/gui/electron/preload.js b/gui/electron/preload.js
deleted file mode 100644
index 816f13e..0000000
--- a/gui/electron/preload.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const { contextBridge, ipcRenderer } = require('electron');
-
-contextBridge.exposeInMainWorld('voxvera', {
-  loadConfig: () => ipcRenderer.invoke('load-config'),
-  loadRuntimeStatus: () => ipcRenderer.invoke('load-runtime-status'),
-  quickstart: (config) => ipcRenderer.invoke('run-quickstart', config),
-  onOnionUrl: (cb) => ipcRenderer.on('onion-url', (_, url) => cb(url)),
-  onLog: (cb) => ipcRenderer.on('log', (_, data) => cb(data.text, data.isError))
-});
diff --git a/gui/electron/runtime-utils.js b/gui/electron/runtime-utils.js
deleted file mode 100644
index 0b481dd..0000000
--- a/gui/electron/runtime-utils.js
+++ /dev/null
@@ -1,16 +0,0 @@
-function extractOnionUrl(line) {
-  const match = line.match(/Onion URL:\s*(https?:\/\/[a-z0-9.-]+\.onion)/i)
-    || line.match(/OnionShare is hosting at\s*(https?:\/\/[a-z0-9.-]+\.onion)/i);
-  return match ? match[1] : null;
-}
-
-function platformDirName(platform = process.platform) {
-  if (platform === 'win32') return 'win';
-  if (platform === 'darwin') return 'mac';
-  return 'linux';
-}
-
-module.exports = {
-  extractOnionUrl,
-  platformDirName,
-};
diff --git a/gui/electron/runtime-utils.test.js b/gui/electron/runtime-utils.test.js
deleted file mode 100644
index bd35491..0000000
--- a/gui/electron/runtime-utils.test.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const test = require('node:test');
-const assert = require('node:assert/strict');
-
-const { extractOnionUrl, platformDirName } = require('./runtime-utils');
-
-test('extractOnionUrl handles current CLI output', () => {
-  assert.equal(
-    extractOnionUrl('[voxvera] Onion URL: http://test123.onion'),
-    'http://test123.onion'
-  );
-});
-
-test('extractOnionUrl handles legacy OnionShare output', () => {
-  assert.equal(
-    extractOnionUrl('OnionShare is hosting at http://legacy456.onion'),
-    'http://legacy456.onion'
-  );
-});
-
-test('extractOnionUrl returns null when no onion URL is present', () => {
-  assert.equal(extractOnionUrl('still bootstrapping'), null);
-});
-
-test('platformDirName maps bundled resource folders correctly', () => {
-  assert.equal(platformDirName('linux'), 'linux');
-  assert.equal(platformDirName('darwin'), 'mac');
-  assert.equal(platformDirName('win32'), 'win');
-});
diff --git a/gui/electron/tor.js b/gui/electron/tor.js
deleted file mode 100644
index 23893de..0000000
--- a/gui/electron/tor.js
+++ /dev/null
@@ -1,62 +0,0 @@
-const { spawn } = require('child_process');
-const path = require('path');
-const fs = require('fs');
-const which = require('which');
-const getPort = (...args) => import('get-port').then(m => m.default(...args));
-const { platformDirName } = require('./runtime-utils');
-
-async function launchTor() {
-  const socks = await getPort();
-  const control = await getPort();
-  const torBase = path.join(__dirname, '..', '..', 'voxvera', 'resources', 'tor');
-  const platformDir = platformDirName(process.platform);
-  let exe = path.join(torBase, platformDir,
-                      process.platform === 'win32' ? 'tor.exe' : 'tor');
-  let obfs4 = path.join(torBase, platformDir,
-                        process.platform === 'win32' ? 'obfs4proxy.exe' : 'obfs4proxy');
-
-  const missing = p => {
-    try {
-      const data = fs.readFileSync(p, 'utf8');
-      return data.includes('placeholder');
-    } catch (e) {
-      return true;
-    }
-  };
-
-  if (missing(exe)) {
-    const sysTor = which.sync('tor', { nothrow: true });
-    if (sysTor) exe = sysTor;
-  }
-  if (missing(obfs4)) {
-    const sysObfs = which.sync('obfs4proxy', { nothrow: true });
-    if (sysObfs) obfs4 = sysObfs;
-  }
-
-  if (missing(exe) || missing(obfs4)) {
-    throw new Error('Tor or obfs4proxy not found; install them first.');
-  }
-
-  const args = [
-    'SocksPort', socks,
-    'ControlPort', control,
-    'Log', 'notice stdout',
-    'UseBridges', '1',
-    'ClientTransportPlugin', `obfs4 exec ${obfs4}`,
-    'BridgeBootstrap', '1'
-  ];
-
-  return new Promise((res, rej) => {
-    const tor = spawn(exe, args, { stdio: ['ignore', 'pipe', 'inherit'] });
-    tor.stdout.on('data', b => {
-      const line = b.toString();
-      if (global.mainWindow)
-        global.mainWindow.webContents.send('log', { text: `[tor] ${line.trim()}` });
-      if (line.includes('Bootstrapped 100%'))
-        res({ torProc: tor, socksPort: socks, controlPort: control });
-    });
-    tor.on('error', rej);
-  });
-}
-
-module.exports = { launchTor };
diff --git a/imports/.gitkeep b/imports/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/imports/aosp.json b/imports/aosp.json
deleted file mode 100644
index d6a243e..0000000
--- a/imports/aosp.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "name": "AOS Project",
-  "folder_name": "aosp",
-  "title": "ANDROID UNLEASHED",
-  "subtitle": "WITHOUT BOUNDARIES",
-  "headline": "OPEN-SOURCE FREEDOM",
-  "content": "The Android Open Source Project (AOSP) represents the essence of what Android was originally intended to be: an open, transparent, and adaptable platform. It strips away the layers of proprietary software and corporate oversight that have become synonymous with mainstream Android distributions. With AOSP, you gain access to a raw, unfiltered version of Android, allowing you to truly make your device your own.

For developers, AOSP offers a playground of possibilities, where the only limits are your skills and imagination. It serves as the foundation for countless custom ROMs, each tailored to specific needs, whether for enhanced performance, privacy, or unique features that mainstream versions lack. Privacy enthusiasts will appreciate the absence of pre-installed bloatware and tracking services that often come wit stock Android, providing a cleaner, more secure user experience.

AOSP isn't just for developers or tech enthusiasts; it's for anyone who values digital freedom. It allows you to reclaim control over your device, tailoring it to your needs without the restrictions of carriers or manufacturers. Discover how AOSP can transform your mobile experience. Start your journey towards a more open, customizable future today.", - "url_message": "Visit the link below to learn more.", - "url": "https://source.android.com", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/imports/bitcoin.json b/imports/bitcoin.json deleted file mode 100644 index fed0bd3..0000000 --- a/imports/bitcoin.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Bitcoin Revolution Flyers", - "folder_name": "bitcoin", - "title": "RULES WITHOUT RULERS", - "subtitle": "DO NOT IGNORE", - "headline": "JOIN THE BITCOIN REVOLUTION", - "content": "What is Bitcoin? It's more than just digital money; it's a revolutionary technology designed to fix some of the world's most pressing problems. Bitcoin operates on a decentralized network, free from the control of any government or central authority. This ensures that no one can manipulate its supply or value, making it a sound form of money that protects your wealth from inflation.

Our current financial system is built on flawed incentives—encouraging debt, dependency, and centralization of power. Bitcoin changes that by creating a system where honesty, transparency, and individual responsibility are rewarded. In the Bitcoin network, there is no room for corruption or manipulation because the rules are enforced by mathematics, not by people.

Bitcoin aligns incentives in a way that promotes long-term thinking, savings, and innovation. It empowers individuals to take control of their financial future, fostering a global community where value can be transferred freely and securely without intermediaries. This is why we need Bitcoin—because it creates a world where incentives are properly aligned, leading to a more fair and prosperous society for all.

Take the step to learn more about Bitcoin and how it can transform not just your financial life, but the world. Tear off a link to the left and explore this groundbreaking technology. Join the movement towards a better future.", - "url_message": "Follow this link to learn more.", - "url": "https://bitcoin.org/en", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/imports/blank.json b/imports/blank.json deleted file mode 100644 index 8cc9711..0000000 --- a/imports/blank.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "", - "folder_name": "", - "title": "", - "subtitle": "", - "headline": "", - "content": "", - "url_message": "", - "url": "", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/imports/example.json b/imports/example.json deleted file mode 100644 index 6d74280..0000000 --- a/imports/example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "name", - "folder_name": "folder_name", - "title": "title", - "subtitle": "subtitle", - "headline": "headline", - "content": "content", - "url_message": "url message", - "url": "url", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/imports/jesus.json b/imports/jesus.json deleted file mode 100644 index 4abdbe2..0000000 --- a/imports/jesus.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Life Changing Message", - "folder_name": "jesus", - "title": "GOOD NEWS", - "subtitle": "DO NOT IGNORE", - "headline": "DISCOVER TRUE HOPE", - "content": "Who is Jesus? He is more than just a historical figure; He is the Son of God, the Savior of the world. Jesus Himself said, 'I am the way, the truth, and the life. No one comes to the Father except through Me' (John 14:6). He came to bridge the gap between God and humanity, offering us a path to forgiveness, peace, and eternal life.

We all face brokenness in our lives—whether it's in our relationships, our hearts, or our world. Jesus came to heal that brokenness. He lived a perfect life, died on the cross for our sins, and rose again, defeating death and offering us the hope of eternal life with God.

Without Jesus, we are lost in our sin, separated from God. But through Him, we can be forgiven and restored. He offers us not just a better life now, but the promise of an eternal life with Him. This is why we need Him—because only in Jesus can we find true peace, purpose, and the assurance of eternal life.

Take the step to learn more about Jesus and the life-changing impact He can have on your life. Tear off a link to the left and explore His teachings. Find the hope you've been searching for.", - "url_message": "Follow this link to learn more.", - "url": "http://media.faithforthefamily.com/ra/godsoloved/english.mp3", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/imports/meshtastic.json b/imports/meshtastic.json deleted file mode 100644 index e6aacf2..0000000 --- a/imports/meshtastic.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Meshtastic Network Flyers", - "folder_name": "meshtastic", - "title": "SECURE COMMUNICATIONS", - "subtitle": "DO NOT IGNORE", - "headline": "BUILD YOUR EMERGENCY NETWORK", - "content": "Why Meshtastic? In times of crisis, traditional communication networks can fail, leaving us isolated and vulnerable. Meshtastic provides a powerful solution—an alternative local communication network that operates independently of centralized systems. It’s designed for emergency situations, allowing you to stay connected when it matters most.

Meshtastic devices create a mesh network that can relay messages over long distances, even without internet or cellular coverage. This decentralized approach ensures that your communications are resilient and reliable, no matter the circumstances. But it’s not just about staying connected—Meshtastic also offers encryption, so your messages remain secure and private.

In a world where privacy is increasingly compromised, Meshtastic empowers you to take control of your communication. Whether you’re coordinating a local community response, staying in touch with loved ones during a disaster, or simply preparing for the unexpected, Meshtastic provides the tools you need to communicate securely and effectively.

Take the step to learn more about Meshtastic and how you can build your own emergency communication network. Tear off a link to the left and explore this innovative technology. Ensure you’re prepared for whatever comes your way.", - "url_message": "Follow this link to learn more.", - "url": "https://meshtastic.org", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/imports/nostr.json b/imports/nostr.json deleted file mode 100644 index f5181b4..0000000 --- a/imports/nostr.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Nostr Protocol Flyers", - "folder_name": "voxvera", - "title": "SOCIAL FREEDOM", - "subtitle": "DO NOT IGNORE", - "headline": "JOIN THE CENSORSHIP-RESISTANT NETWORK", - "content": "What is Nostr? Unlike traditional social media platforms, Nostr is a protocol—a decentralized system that empowers users to connect and share without the constraints of a central authority. Nostr is censorship-resistant, meaning your voice can’t be silenced by corporations or governments. It’s designed to give you control over your online presence, free from the influence of algorithms or ads that prioritize engagement over meaningful connections.

On Nostr, there are no hidden agendas to keep you doomscrolling. You engage with content on your terms, not based on what an algorithm thinks will keep you online the longest. Nostr allows you to build genuine connections and participate in conversations that matter, all while maintaining your privacy and autonomy.

In a world where online speech is increasingly controlled and manipulated, Nostr offers a refreshing alternative. It’s not just a platform; it’s a movement towards true digital freedom, where your interactions are driven by your interests and values, not by what generates the most ad revenue.

Take the step to learn more about Nostr and how it can transform the way you connect online. Tear off a link the left and explore this groundbreaking protocol. Join a community that values freedom and authentic interaction.", - "url_message": "Follow this link to learn more.", - "url": "https://nostr.how/en/what-is-nostr", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/imports/voxvera.json b/imports/voxvera.json deleted file mode 100644 index 7b179ec..0000000 --- a/imports/voxvera.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Vox Vera Printable Flyers", - "folder_name": "voxvera", - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.", - "url_message": "Follow this link to learn more.", - "url": "https://voxvera.org/", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/install.ps1 b/install.ps1 deleted file mode 100755 index d1aee67..0000000 --- a/install.ps1 +++ /dev/null @@ -1,154 +0,0 @@ -$ErrorActionPreference = 'Stop' - -Write-Warning 'The Windows installer path is experimental. It is not yet validated for reliable background Tor hidden-service hosting or automatic recovery after connectivity changes.' - -$packages = @('tor', 'onionshare') - -function Install-Choco { - param([string]$Name) - if (-not (Get-Package -Name $Name -ErrorAction SilentlyContinue)) { - choco install $Name -y - } -} - -function Install-Pkg { - param([string]$Name) - if (-not (Get-Package -Name $Name -ErrorAction SilentlyContinue)) { - Install-Package -Name $Name -Force -ErrorAction Stop - } -} - -$choco = Get-Command choco -ErrorAction SilentlyContinue -if ($choco) { - foreach ($p in $packages) { Install-Choco $p } -} else { - foreach ($p in $packages) { Install-Pkg $p } -} - -function Install-PipFallback { - if (Get-Command pip -ErrorAction SilentlyContinue) { - try { - pip install --user voxvera - Write-Host 'VoxVera installed successfully via pip.' - exit 0 - } catch { - Write-Error 'pip installation failed.' - exit 1 - } - } else { - Write-Error 'pip not found for fallback installation.' - exit 1 - } -} - -function Install-PipRepoFallback { - if (Get-Command pip -ErrorAction SilentlyContinue) { - try { - pip install --user git+https://github.com/PR0M3TH3AN/VoxVera - Write-Host 'VoxVera installed successfully from repository.' - exit 0 - } catch { - Write-Error 'pip installation from repository failed.' - exit 1 - } - } else { - Write-Error 'pip not found for fallback installation.' - exit 1 - } -} - -function Download-Binary { - param([string]$Url, [string]$Dest) - try { - $response = Invoke-WebRequest -Uri $Url -OutFile $Dest -ErrorAction Stop - return $response.StatusCode - } catch { - if ($_.Exception.Response) { - return $_.Exception.Response.StatusCode.value__ - } - return 0 - } -} - -function Check-LocalBin { - $home = [Environment]::GetFolderPath('UserProfile') - $binPath = Join-Path $home '.local\bin' - if (-not ($Env:PATH.Split(';') -contains $binPath)) { - Write-Host "Add $binPath to your PATH to run VoxVera." - } -} - -function Show-VoxVeraStatus { - if (-not (Get-Command voxvera -ErrorAction SilentlyContinue)) { - return - } - - try { - $platform = voxvera platform-status --json | ConvertFrom-Json - Write-Host ("Platform tier: {0} ({1})" -f $platform.tier, $platform.label) - if ($platform.hosting_model) { - Write-Host ("Hosting model: {0}" -f $platform.hosting_model) - } - } catch { - Write-Warning "Could not read platform status from voxvera." - } - - try { - $doctor = voxvera doctor --json | ConvertFrom-Json - $failed = @($doctor.checks | Where-Object { -not $_.ok } | ForEach-Object { $_.name }) - if ($failed.Count -gt 0) { - Write-Host ("Doctor checks needing attention: {0}" -f ($failed -join ', ')) - } else { - Write-Host 'Doctor checks: all passed' - } - } catch { - Write-Warning "Could not read doctor output from voxvera." - } - - try { - $autostart = voxvera autostart status --json | ConvertFrom-Json - Write-Host ("Autostart: {0}" -f $autostart.message) - } catch { - Write-Warning "Could not read autostart status from voxvera." - } -} - -if (Get-Command pipx -ErrorAction SilentlyContinue) { - try { - pipx install voxvera --force - } catch { - Write-Host 'pipx install failed, downloading binary' - $home = [Environment]::GetFolderPath('UserProfile') - $dest = Join-Path $home '.local\bin' - New-Item -ItemType Directory -Path $dest -Force | Out-Null - $url = 'https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera-windows.exe' - $status = Download-Binary $url "$dest/voxvera.exe" - if ($status -eq 200) { - Check-LocalBin - } elseif ($status -eq 404) { - Write-Host 'Release asset not found, installing from repository' - Install-PipRepoFallback - } else { - Write-Host 'Binary download failed, falling back to pip' - Install-PipFallback - } - } -} else { - $home = [Environment]::GetFolderPath('UserProfile') - $dest = Join-Path $home '.local\bin' - New-Item -ItemType Directory -Path $dest -Force | Out-Null - $url = 'https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera-windows.exe' - $status = Download-Binary $url "$dest/voxvera.exe" - if ($status -eq 200) { - Check-LocalBin - } elseif ($status -eq 404) { - Write-Host 'Release asset not found, installing from repository' - Install-PipRepoFallback - } else { - Write-Host 'Binary download failed, falling back to pip' - Install-PipFallback - } -} - -Write-Host 'VoxVera installed successfully.' -Show-VoxVeraStatus diff --git a/install.sh b/install.sh deleted file mode 100755 index 20cc693..0000000 --- a/install.sh +++ /dev/null @@ -1,455 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -REPO="PR0M3TH3AN/VoxVera" -REPO_URL="https://github.com/${REPO}" -BRANCH="main" -OS_NAME="$(uname -s | tr '[:upper:]' '[:lower:]')" - -# --- Network resilience settings --- -# Kill git operations that stall below 1 KB/s for 30 seconds -export GIT_HTTP_LOW_SPEED_LIMIT=1000 -export GIT_HTTP_LOW_SPEED_TIME=30 -# Disable partial clones — they are fragile on flaky connections -export GIT_CLONE_PROTECTION_ACTIVE=false -# Hard timeout (seconds) for any single network operation -NET_TIMEOUT=90 - -command_exists() { - command -v "$1" >/dev/null 2>&1 -} - -# Detect package manager and sudo -if command_exists sudo; then - SUDO="sudo" -elif [ "$(id -u)" -eq 0 ]; then - SUDO="" -else - echo "This script requires root privileges. Please install sudo or run as root." >&2 - exit 1 -fi - -if command_exists apt-get; then - PM="apt" -elif command_exists dnf; then - PM="dnf" -elif command_exists yum; then - PM="yum" -elif command_exists pacman; then - PM="pacman" -elif command_exists brew; then - PM="brew" -elif command_exists apk; then - PM="apk" -else - echo "Unsupported system: could not detect package manager" >&2 - exit 1 -fi - -msg() { echo -e "\e[32m$*\e[0m"; } -warn() { echo -e "\e[33m$*\e[0m" >&2; } -die() { echo -e "\e[31m$*\e[0m" >&2; exit 1; } - -report_cli_status() { - command_exists voxvera || return 0 - - local platform_json doctor_json autostart_json - platform_json="$(voxvera platform-status --json 2>/dev/null || true)" - doctor_json="$(voxvera doctor --json 2>/dev/null || true)" - autostart_json="$(voxvera autostart status --json 2>/dev/null || true)" - - if [ -n "$platform_json" ]; then - PLATFORM_JSON="$platform_json" python3 - <<'PY' -import json, os -data = json.loads(os.environ["PLATFORM_JSON"]) -print(f"Platform tier: {data.get('tier', 'unknown')} ({data.get('label', 'unknown')})") -if data.get("hosting_model"): - print(f"Hosting model: {data['hosting_model']}") -PY - fi - - if [ -n "$doctor_json" ]; then - DOCTOR_JSON="$doctor_json" python3 - <<'PY' -import json, os -data = json.loads(os.environ["DOCTOR_JSON"]) -failed = [check["name"] for check in data.get("checks", []) if not check.get("ok")] -if failed: - print("Doctor checks needing attention: " + ", ".join(failed)) -else: - print("Doctor checks: all passed") -PY - fi - - if [ -n "$autostart_json" ]; then - AUTOSTART_JSON="$autostart_json" python3 - <<'PY' -import json, os -data = json.loads(os.environ["AUTOSTART_JSON"]) -print("Autostart: " + data.get("message", "unknown")) -PY - fi -} - -install_pkg() { - case "$PM" in - apt) $SUDO apt-get install -y "$@" ;; - dnf) $SUDO dnf install -y "$@" ;; - yum) $SUDO yum install -y "$@" ;; - pacman) $SUDO pacman -S --noconfirm "$@" ;; - brew) brew install "$@" ;; - apk) $SUDO apk add --no-cache "$@" ;; - esac -} - -# --- Resilient download: tries curl then wget, with retries and timeout --- -download() { - local url="$1" dest="$2" - # Try curl first - if command_exists curl; then - local attempt - for attempt in 1 2 3; do - if timeout "$NET_TIMEOUT" curl -fsSL \ - --retry 2 --retry-delay 3 --retry-connrefused \ - --max-time "$NET_TIMEOUT" \ - "$url" -o "$dest" 2>/dev/null; then - return 0 - fi - warn "curl attempt $attempt failed for $(basename "$url")" - sleep 2 - done - fi - # Try wget as fallback (different TLS stack — often works when curl doesn't) - if command_exists wget; then - local attempt - for attempt in 1 2 3; do - if timeout "$NET_TIMEOUT" wget -q --timeout=60 --tries=1 \ - "$url" -O "$dest" 2>/dev/null; then - return 0 - fi - warn "wget attempt $attempt failed for $(basename "$url")" - sleep 2 - done - fi - return 1 -} - -# --- Resilient HTTP status check (for release tag redirect) --- -get_latest_tag() { - local tag="" - if command_exists curl; then - tag=$(timeout 30 curl -fsSLI -o /dev/null -w '%{url_effective}' \ - "${REPO_URL}/releases/latest" 2>/dev/null | grep -oE '[^/]+$') || true - fi - if [ -z "$tag" ] && command_exists wget; then - tag=$(timeout 30 wget --max-redirect=5 -q -S --spider \ - "${REPO_URL}/releases/latest" 2>&1 | grep -i 'Location:' | tail -1 | grep -oE '[^/]+$') || true - fi - echo "$tag" -} - -# Ensure core dependencies are present -msg "Checking and updating system dependencies..." -if [[ "$OS_NAME" != linux* ]]; then - warn "This installer is optimized for Linux. Non-Linux paths are experimental and are not validated for reliable background hidden-service hosting." -fi -if [ "$PM" = "apt" ]; then - $SUDO apt-get update - SYSTEM_PKGS=(tor curl wget git python3-pip python3-venv) - [ -n "$(command -v pipx)" ] || SYSTEM_PKGS+=(pipx) - install_pkg "${SYSTEM_PKGS[@]}" -elif [ "$PM" = "brew" ]; then - brew install tor onionshare curl wget git -else - install_pkg tor curl git - # Best-effort install wget if not present - install_pkg wget 2>/dev/null || true -fi - -# Onionshare-cli -msg "Ensuring onionshare-cli is installed and up-to-date..." -if command_exists pipx && (pipx list | grep -q onionshare || ! command_exists onionshare-cli); then - msg "Installing/Updating onionshare-cli via pipx..." - pipx install --force git+https://github.com/onionshare/onionshare.git#subdirectory=cli || warn "pipx onionshare-cli install/update failed" -elif ! command_exists onionshare-cli && ! command_exists onionshare; then - if ! install_pkg onionshare-cli; then - warn "Onionshare-cli not found in system repositories. Attempting pipx install fallback." - if ! command_exists pipx; then - install_pkg pipx - pipx ensurepath --force - export PATH="$HOME/.local/bin:$PATH" - fi - if command_exists pipx; then - msg "Installing onionshare-cli via pipx..." - pipx install --force git+https://github.com/onionshare/onionshare.git#subdirectory=cli || warn "pipx onionshare-cli install failed" - else - warn "Could not install pipx. Please install onionshare-cli manually." - fi - fi -else - msg "onionshare-cli found (system package), skipping pipx install. Run 'pipx install --force ...' if you want the latest git version." -fi - -# --- Clean up stale state from previous installs (preserves ~/host tor sites) --- -msg "Cleaning up stale state from previous installs..." - -# Stale user-local packages that may conflict with system onionshare-cli -for pydir in "$HOME"/.local/lib/python3.*/site-packages; do - [ -d "$pydir" ] || continue - for pkg in werkzeug flask flask_socketio onionshare_cli voxvera; do - if [ -d "$pydir/$pkg" ]; then - warn "Removing stale $pkg from $pydir" - rm -rf "$pydir/$pkg" "$pydir/${pkg}-"*.dist-info 2>/dev/null || true - fi - done -done - -# Stale pip wheel cache for voxvera (forces clean rebuild) -for cache_dir in "$HOME"/.cache/pip/wheels; do - [ -d "$cache_dir" ] || continue - find "$cache_dir" -name 'voxvera-*.whl' -delete 2>/dev/null || true -done - -# Leftover temp files from previous failed install attempts -rm -rf /tmp/voxvera-* 2>/dev/null || true - -# Stale top-level config.json from older VoxVera versions (not inside ~/host) -[ -f "$HOME/config.json" ] && grep -q '"folder_name"' "$HOME/config.json" 2>/dev/null && { - warn "Removing stale ~/config.json (leftover from older VoxVera version)" - rm -f "$HOME/config.json" -} - -# Stale top-level imports/ directory (older versions put it in ~/) -if [ -d "$HOME/imports" ] && ls "$HOME/imports"/*.json &>/dev/null; then - if head -1 "$HOME/imports"/*.json 2>/dev/null | grep -q '"folder_name"\|"headline"'; then - warn "Removing stale ~/imports/ (leftover from older VoxVera version)" - rm -rf "$HOME/imports" - fi -fi - -# Clean generated files from existing site directories so rebuild-all -# regenerates them from the current template. Preserves: -# config.json — site content and settings -# .onionshare-session — Tor domain identity key -# server.pid — running process marker -# onionshare.log — current log (may be in use) -# Everything else is regenerated by build_assets(). -if [ -d "$HOME/host" ]; then - for site_dir in "$HOME"/host/*/; do - [ -f "${site_dir}config.json" ] || continue - msg "Cleaning generated files in ${site_dir}..." - rm -f "${site_dir}index.html" 2>/dev/null || true - rm -f "${site_dir}qrcode-content.png" "${site_dir}qrcode-tear-offs.png" 2>/dev/null || true - rm -rf "${site_dir}download" 2>/dev/null || true - done -fi - -# --- Helper: build pip flags for this distro --- -pip_flags() { - local flags="--user --upgrade" - if [ -f /etc/debian_version ]; then - local deb_ver - deb_ver=$(cut -d. -f1 < /etc/debian_version) - if [[ "$deb_ver" =~ ^[0-9]+$ ]] && [ "$deb_ver" -ge 12 ]; then - flags="$flags --break-system-packages" - fi - fi - echo "$flags" -} - -# --- Helper: install from a local source directory --- -install_from_local() { - local src_dir="$1" - msg "Installing VoxVera from local source ($src_dir)..." - local flags - flags=$(pip_flags) - if pip install $flags "$src_dir"; then - msg "VoxVera installed from local source." - return 0 - fi - return 1 -} - -# --- Helper: remove stale standalone binary so it doesn't shadow pipx/pip entrypoints --- -cleanup_stale_binary() { - local bin="$HOME/.local/bin/voxvera" - [ -f "$bin" ] || return 0 - # Only remove actual compiled binaries (PyInstaller/native), not pip/pipx Python scripts - if file "$bin" 2>/dev/null | grep -qiE 'ELF|Mach-O'; then - warn "Removing stale standalone binary at $bin (would shadow pipx/pip entrypoint)" - rm -f "$bin" - fi -} - -# ============================================================ -# Strategy 5: Pre-built binary (fallback — can lag behind main) -# ============================================================ -install_binary() { - msg "Strategy 5/5: Attempting to download pre-built binary..." - - local latest - latest=$(get_latest_tag) - [ -n "$latest" ] || { warn "Could not determine latest release tag."; return 1; } - - local install_dir="$HOME/.local/bin" - mkdir -p "$install_dir" - local dest="$install_dir/voxvera" - local os_name arch binary - os_name="$(uname -s | tr '[:upper:]' '[:lower:]')" - arch=$(uname -m) - - case "$os_name" in - linux*) binary="voxvera-linux" ;; - darwin*) binary="voxvera-macos" ;; - *) binary="voxvera-linux" ;; - esac - - local url="${REPO_URL}/releases/download/${latest}/${binary}-${arch}" - msg "Downloading: $url" - - if download "$url" "$dest"; then - chmod +x "$dest" - # Verify it's actually an executable, not an HTML error page - if file "$dest" | grep -qiE 'ELF|executable|Mach-O'; then - msg "VoxVera binary (${arch}) installed to $dest" - [[ ":$PATH:" != *":$HOME/.local/bin:"* ]] && warn "Add \$HOME/.local/bin to your PATH." - return 0 - fi - warn "Downloaded file is not a valid binary." - fi - - [ -f "$dest" ] && rm -f "$dest" - warn "Binary download failed. Trying next method..." - return 1 -} - -# ============================================================ -# Strategy 1: GitHub tarball — no git needed, always current with main -# ============================================================ -install_tarball() { - msg "Strategy 1/5: Downloading source tarball (no git required)..." - local tmp_tar tmp_dir - tmp_tar=$(mktemp /tmp/voxvera-XXXXXX.tar.gz) - tmp_dir=$(mktemp -d /tmp/voxvera-src-XXXXXX) - - if download "${REPO_URL}/archive/refs/heads/${BRANCH}.tar.gz" "$tmp_tar"; then - if tar -xzf "$tmp_tar" -C "$tmp_dir" --strip-components=1 2>/dev/null; then - if install_from_local "$tmp_dir"; then - cleanup_stale_binary - rm -rf "$tmp_tar" "$tmp_dir" - return 0 - fi - else - warn "Tarball extraction failed." - fi - else - warn "Tarball download failed." - fi - - rm -rf "$tmp_tar" "$tmp_dir" - warn "Tarball install failed. Trying next method..." - return 1 -} - -# ============================================================ -# Strategy 2: Shallow git clone + local pip install -# ============================================================ -install_shallow() { - msg "Strategy 2/5: Attempting shallow git clone (--depth 1)..." - local tmp_dir - tmp_dir=$(mktemp -d /tmp/voxvera-clone-XXXXXX) - - if timeout "$NET_TIMEOUT" git clone --depth 1 --single-branch --branch "$BRANCH" \ - "${REPO_URL}.git" "$tmp_dir" 2>&1; then - if install_from_local "$tmp_dir"; then - cleanup_stale_binary - rm -rf "$tmp_dir" - return 0 - fi - else - warn "Shallow clone failed or timed out after ${NET_TIMEOUT}s." - fi - - rm -rf "$tmp_dir" - warn "Shallow clone install failed. Trying next method..." - return 1 -} - -# ============================================================ -# Strategy 3: pipx from git (isolated venv) -# ============================================================ -install_pipx() { - command_exists pipx || return 1 - msg "Strategy 3/5: Attempting pipx installation..." - if timeout 180 pipx install --force "voxvera@git+${REPO_URL}.git@${BRANCH}"; then - pipx inject voxvera setuptools 2>/dev/null || true - pipx ensurepath --force - cleanup_stale_binary - msg "\nVoxVera installed/updated successfully via pipx." - msg "IMPORTANT: Please restart your terminal or run 'source ~/.bashrc' to use 'voxvera'." - return 0 - fi - warn "pipx install failed. Trying next method..." - return 1 -} - -# ============================================================ -# Strategy 4: pip from git -# ============================================================ -install_pip_git() { - msg "Strategy 4/5: Attempting pip install from git..." - local flags - flags=$(pip_flags) - if timeout 180 pip install $flags "voxvera@git+${REPO_URL}.git@${BRANCH}"; then - cleanup_stale_binary - msg "VoxVera installed via pip." - return 0 - fi - warn "pip git install failed." - return 1 -} - -# ============================================================ -# Run strategies in order — first success wins -# ============================================================ -# Order rationale: -# 1. Tarball — always up-to-date with main, no git needed, single download -# 2. Shallow clone — small git transfer, also always current -# 3. pipx — git clone internally, but isolated venv -# 4. pip git — git clone internally, last resort -# 5. Binary — pre-built release; only fallback since it can lag behind main -for strategy in install_tarball install_shallow install_pipx install_pip_git install_binary; do - if $strategy; then - # Ensure ~/.local/bin is on PATH - if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then - export PATH="$HOME/.local/bin:$PATH" - fi - # Clear bash's cached command path so the new binary is found immediately - hash -r 2>/dev/null || true - - # Rebuild all existing sites so they pick up template/CSS changes - if command_exists voxvera; then - msg "Rebuilding existing sites with updated template..." - voxvera rebuild-all 2>/dev/null || true - if [[ "$OS_NAME" == linux* ]]; then - msg "Installing Linux autostart recovery timer..." - voxvera autostart 2>/dev/null || warn "Could not install the VoxVera autostart timer automatically. Run 'voxvera autostart' manually." - else - warn "Autostart was not configured automatically because this platform is experimental." - fi - msg "Inspecting installed runtime posture..." - report_cli_status - fi - - msg "\nVoxVera installed/updated successfully. Run 'voxvera check' to verify." - if [[ "$OS_NAME" == linux* ]]; then - msg "Linux systemd user autostart should now retry hidden-service startup every few minutes." - msg "Inspect with: voxvera autostart status" - msg "Remove with: voxvera autostart uninstall" - msg "Validate with: bash scripts/linux-recovery-check.sh" - fi - # Detect if the parent shell will still have a stale hash - msg "If 'voxvera' is not found, run: hash -r (or open a new terminal)" - exit 0 - fi -done - -die "All installation methods failed. Your network may be blocking or corrupting HTTPS traffic to GitHub.\nTry downloading manually from a working machine:\n ${REPO_URL}/archive/refs/heads/${BRANCH}.tar.gz\nThen copy to this machine and run:\n tar xzf VoxVera-main.tar.gz && pip install --user ./VoxVera-main" diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index c022d1b..0000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "VoxVera", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} diff --git a/packaging/build_appimage.sh b/packaging/build_appimage.sh deleted file mode 100755 index 97f957b..0000000 --- a/packaging/build_appimage.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash -set -e - -echo "Warning: AppImage packaging is experimental and is not yet validated for reliable background hidden-service hosting." - -# Ensure we are in project root -cd "$(dirname "$0")/.." - -ARCH=$(uname -m) -BINARY=${1:-"voxvera/resources/bin/voxvera-linux-$ARCH"} -OUTPUT="voxvera/resources/bin/VoxVera-$ARCH.AppImage" - -if [ ! -f "$BINARY" ]; then - echo "Binary not found: $BINARY. Building it first..." - bash scripts/build_binaries.sh -fi - -if [ ! -f "$BINARY" ]; then - echo "Binary still not found after build: $BINARY." >&2 - exit 1 -fi - -APPDIR=build/AppDir -rm -rf "$APPDIR" -mkdir -p "$APPDIR/usr/bin" -cp "$BINARY" "$APPDIR/usr/bin/voxvera" -chmod +x "$APPDIR/usr/bin/voxvera" - -# AppRun symlink (Crucial for AppImage to launch) -ln -sf usr/bin/voxvera "$APPDIR/AppRun" -chmod +x "$APPDIR/AppRun" - -# Desktop file -cat > "$APPDIR/voxvera.desktop" <&2 - exit 1 -fi - - -VERSION=$(grep "__version__" voxvera/__init__.py | cut -d '"' -f 2) -PKG_DIR="build/voxvera_${VERSION}_${DEB_ARCH}" -OUTPUT="voxvera/resources/bin/voxvera_${VERSION}_${DEB_ARCH}.deb" - -echo "Building .deb package for version $VERSION ($DEB_ARCH)..." - -rm -rf "$PKG_DIR" -mkdir -p "$PKG_DIR/usr/bin" -mkdir -p "$PKG_DIR/DEBIAN" - -cp "$BINARY" "$PKG_DIR/usr/bin/voxvera" -chmod +x "$PKG_DIR/usr/bin/voxvera" - -# Copy control file and update version/arch -cp packaging/deb/DEBIAN/control "$PKG_DIR/DEBIAN/control" -sed -i "s/^Version: .*/Version: $VERSION/" "$PKG_DIR/DEBIAN/control" -sed -i "s/^Architecture: .*/Architecture: $DEB_ARCH/" "$PKG_DIR/DEBIAN/control" - -# Build the package -mkdir -p voxvera/resources/bin -rm -f "$OUTPUT" -dpkg-deb --build "$PKG_DIR" "$OUTPUT" - -echo "Debian package created at $OUTPUT" diff --git a/packaging/build_dmg.sh b/packaging/build_dmg.sh deleted file mode 100644 index 3ee6296..0000000 --- a/packaging/build_dmg.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -set -e - -echo "Warning: DMG packaging is experimental and is not yet validated for reliable background hidden-service hosting." - -# Ensure we are in project root -cd "$(dirname "$0")/.." - -# This script is intended to be run on macOS -if [ "$(uname)" != "Darwin" ]; then - echo "Error: .dmg creation requires macOS." >&2 - exit 1 -fi - -ARCH=$(uname -m) -BINARY=${1:-"voxvera/resources/bin/voxvera-macos-$ARCH"} - -if [ ! -f "$BINARY" ]; then - echo "Binary not found: $BINARY." >&2 - exit 1 -fi - -VERSION=$(grep "__version__" voxvera/__init__.py | cut -d '"' -f 2) -DMG_NAME="VoxVera_${VERSION}_${ARCH}.dmg" -STAGING_DIR="build/dmg_staging" - -echo "Building .dmg package for version $VERSION ($ARCH)..." - -rm -rf "$STAGING_DIR" -mkdir -p "$STAGING_DIR" - -# For a CLI tool, we just put the binary in the DMG. -# In the future, we could create an .app bundle if there's a GUI. -cp "$BINARY" "$STAGING_DIR/voxvera" -chmod +x "$STAGING_DIR/voxvera" - -# Create the DMG -mkdir -p voxvera/resources/bin -hdiutil create -volname "VoxVera $VERSION" -srcfolder "$STAGING_DIR" -ov -format UDZO "voxvera/resources/bin/$DMG_NAME" - -echo "DMG created at voxvera/resources/bin/$DMG_NAME" diff --git a/packaging/build_flatpak.sh b/packaging/build_flatpak.sh deleted file mode 100755 index 036bdca..0000000 --- a/packaging/build_flatpak.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -set -e - -# Ensure we are in project root -cd "$(dirname "$0")/.." - -ARCH=$(uname -m) -BINARY=${1:-"voxvera/resources/bin/voxvera-linux-$ARCH"} - -if [ ! -f "$BINARY" ]; then - echo "Binary not found: $BINARY. Run scripts/build_binaries.sh first." >&2 - exit 1 -fi - -if ! command -v flatpak-builder &> /dev/null; then - echo "flatpak-builder not found. Please install it (e.g., sudo apt install flatpak-builder)" >&2 - exit 1 -fi - -echo "Building Flatpak package..." - -BUILD_DIR=build/flatpak-build -REPO_DIR=build/flatpak-repo -MANIFEST=packaging/flatpak/org.voxvera.VoxVera.yml - -# Clean previous -rm -rf "$BUILD_DIR" "$REPO_DIR" - -# Build -flatpak-builder --force-clean --repo="$REPO_DIR" "$BUILD_DIR" "$MANIFEST" - -# Generate a standalone .flatpak file -mkdir -p voxvera/resources/bin -flatpak build-bundle "$REPO_DIR" voxvera/resources/bin/VoxVera-x86_64.flatpak org.voxvera.VoxVera - -echo "Flatpak bundle created at voxvera/resources/bin/VoxVera-x86_64.flatpak" diff --git a/packaging/chocolatey/tools/chocolateyInstall.ps1 b/packaging/chocolatey/tools/chocolateyInstall.ps1 deleted file mode 100644 index 63b719a..0000000 --- a/packaging/chocolatey/tools/chocolateyInstall.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -# Experimental package surface: not yet validated for reliable background hidden-service hosting. -$toolsDir = Split-Path -Parent $MyInvocation.MyCommand.Definition -$url = 'https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera-windows.exe' - -$packageArgs = @{ - packageName = 'voxvera' - fileType = 'exe' - url = $url - silentArgs = '/S' - validExitCodes = @(0) -} - -Install-ChocolateyPackage @packageArgs diff --git a/packaging/chocolatey/voxvera.nuspec b/packaging/chocolatey/voxvera.nuspec deleted file mode 100644 index c07ffd9..0000000 --- a/packaging/chocolatey/voxvera.nuspec +++ /dev/null @@ -1,12 +0,0 @@ - - - - voxvera - 0.1.0 - VoxVera - VoxVera - Generate flyers with QR codes - https://github.com/PR0M3TH3AN/VoxVera - voxvera flyers - - diff --git a/packaging/deb/DEBIAN/control b/packaging/deb/DEBIAN/control deleted file mode 100644 index f0cda7c..0000000 --- a/packaging/deb/DEBIAN/control +++ /dev/null @@ -1,9 +0,0 @@ -Package: voxvera -Version: 0.1.4 -Section: utils -Priority: optional -Architecture: amd64 -Maintainer: VoxVera -Description: VoxVera CLI utilities - Anonymous message-spreading and flyer-generation tool. -Depends: libc6 diff --git a/packaging/flatpak/org.voxvera.VoxVera.desktop b/packaging/flatpak/org.voxvera.VoxVera.desktop deleted file mode 100644 index 7c73950..0000000 --- a/packaging/flatpak/org.voxvera.VoxVera.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Application -Name=VoxVera -Comment=Anonymous message-spreading and flyer-generation tool -Exec=voxvera -Icon=org.voxvera.VoxVera -Categories=Utility;Network; -Terminal=true -StartupWMClass=voxvera diff --git a/packaging/flatpak/org.voxvera.VoxVera.png b/packaging/flatpak/org.voxvera.VoxVera.png deleted file mode 100644 index b2e4486..0000000 Binary files a/packaging/flatpak/org.voxvera.VoxVera.png and /dev/null differ diff --git a/packaging/flatpak/org.voxvera.VoxVera.yml b/packaging/flatpak/org.voxvera.VoxVera.yml deleted file mode 100644 index 8fd35c1..0000000 --- a/packaging/flatpak/org.voxvera.VoxVera.yml +++ /dev/null @@ -1,28 +0,0 @@ -app-id: org.voxvera.VoxVera -# Experimental package surface: not yet validated for reliable background hidden-service hosting. -runtime: org.freedesktop.Platform -runtime-version: '23.08' -sdk: org.freedesktop.Sdk -command: voxvera -finish-args: - - --share=network - - --socket=fallback-x11 - - --socket=wayland - - --device=dri - - --share=ipc - - --filesystem=xdg-run/tor:ro # If using external Tor -modules: - - name: voxvera - buildsystem: simple - build-commands: - - install -D voxvera /app/bin/voxvera - - install -D org.voxvera.VoxVera.desktop /app/share/applications/org.voxvera.VoxVera.desktop - - install -D org.voxvera.VoxVera.png /app/share/icons/hicolor/512x512/apps/org.voxvera.VoxVera.png - sources: - - type: file - path: ../../voxvera/resources/bin/voxvera-linux-x86_64 - dest-filename: voxvera - - type: file - path: org.voxvera.VoxVera.desktop - - type: file - path: org.voxvera.VoxVera.png diff --git a/packaging/homebrew/voxvera.rb b/packaging/homebrew/voxvera.rb deleted file mode 100644 index 397e956..0000000 --- a/packaging/homebrew/voxvera.rb +++ /dev/null @@ -1,15 +0,0 @@ -class Voxvera < Formula - desc "Experimental VoxVera formula" - homepage "https://github.com/PR0M3TH3AN/VoxVera" - url "https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera" - version "0.1.0" - sha256 "" - - def install - bin.install "voxvera" - end - - test do - system "#{bin}/voxvera", "--help" - end -end diff --git a/pyproject.toml b/pyproject.toml index 0371108..8de25a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,53 +1,24 @@ [build-system] -requires = ["setuptools>=42", "wheel"] +requires = ["setuptools>=69", "wheel"] build-backend = "setuptools.build_meta" +[project] +name = "voxvera" +version = "0.4.0" +description = "Static Nostr flyer client helpers" +readme = "README.md" +authors = [{ name = "VoxVera" }] +requires-python = ">=3.10" +dependencies = [] + +[project.optional-dependencies] +test = [ + "pytest", +] + [tool.setuptools.packages.find] where = ["."] include = ["voxvera*"] -[tool.setuptools] -include-package-data = true - -[tool.setuptools.package-data] -voxvera = ["templates/**", "src/**", "resources/**", "locales/**", "resources/bin/**"] - -[project] -name = "voxvera" -version = "0.3.12" -description = "VoxVera CLI utilities" -readme = "README.md" -authors = [{name = "VoxVera"}] -requires-python = ">=3.9" -dependencies = [ - "InquirerPy", - "rich", - "qrcode[pil]", - "Pillow", - "jsmin", - "htmlmin2", - "pypdf", - "wcwidth", - "setuptools", -] -[project.optional-dependencies] -test = [ - "pytest", -] -e2e = [ - "pytest", - "requests[socks]", -] -all = [ - "pytest", - "requests[socks]", -] - -[project.scripts] -voxvera = "voxvera.cli:main" - [tool.pytest.ini_options] -markers = [ - "slow: marks tests as slow (deselect with '-m \"not slow\"')", - "integration: marks tests as integration tests that require external services", -] +testpaths = ["tests"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index c5c3e3c..0000000 --- a/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -InquirerPy -rich -qrcode[pil] -Pillow -jsmin -htmlmin2 -pypdf -wcwidth -onionshare-cli -flask<2.3.0 -werkzeug<3.0.0 - diff --git a/scripts/build_binaries.sh b/scripts/build_binaries.sh deleted file mode 100755 index 95d3760..0000000 --- a/scripts/build_binaries.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# VoxVera Binary Builder -# Uses PyInstaller to create a standalone executable for the current OS. - -set -e - -# Ensure we are in the project root -cd "$(dirname "$0")/.." - -echo "Checking for PyInstaller..." -if ! command -v pyinstaller &> /dev/null; then - echo "PyInstaller not found. Installing..." - pip install pyinstaller --break-system-packages -fi - -ARTIFACT_DIR="voxvera/resources/bin" -BUILD_BINARY_NAME="voxvera-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)" - -# Clean previous builds -python3 - <<'PY' -import shutil -from pathlib import Path - -for path in (Path("build"), Path("dist_bin")): - if path.exists(): - shutil.rmtree(path, ignore_errors=True) -PY -mkdir -p "$ARTIFACT_DIR" - -echo "Building VoxVera binary for $(uname)..." - -echo "Ensuring Tor binaries are downloaded..." -bash scripts/download_tor.sh - -# Use python module to call pyinstaller -PY_CMD="python3 -m PyInstaller" - -# Build the binary -ARCH=$(uname -m) -OS_NAME=$(uname -s | tr '[:upper:]' '[:lower:]') -BINARY_NAME="voxvera-$OS_NAME-$ARCH" - -$PY_CMD --onefile \ - --add-data "voxvera/locales:voxvera/locales" \ - --add-data "voxvera/src:voxvera/src" \ - --add-data "voxvera/templates:voxvera/templates" \ - --add-data "voxvera/resources/tor:voxvera/resources/tor" \ - --add-data "support-matrix.json:." \ - --add-data "requirements.txt:." \ - --name "$BINARY_NAME" \ - --distpath "$ARTIFACT_DIR" \ - voxvera/cli.py - -echo "Binary build complete. Located in $ARTIFACT_DIR/" -ls -lh "$ARTIFACT_DIR"/ diff --git a/scripts/check.sh b/scripts/check.sh deleted file mode 100755 index 5a30b77..0000000 --- a/scripts/check.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -cd "$(dirname "$0")/.." - -echo "==> flake8" -python3 -m flake8 voxvera tests \ - --jobs=1 \ - --exclude=voxvera/vendor \ - --ignore=E501,W503,W293,E402,E306,E704,E261,F841,E302,F401,E401,F541 - -echo "==> pytest" -python3 -m pytest tests/ -v - -echo "==> electron smoke tests" -(cd gui/electron && npm test) - -echo "==> dependency check" -python3 -m voxvera.cli --lang en check - -if [[ "$(uname -s)" == "Linux" ]]; then - echo "==> platform smoke" - bash scripts/platform-smoke.sh linux-cli - if command -v docker >/dev/null 2>&1; then - echo "==> docker runtime smoke" - bash scripts/docker-runtime-smoke.sh - fi -fi - -echo "==> build docs" -python3 -m voxvera.cli build-docs - -echo "==> build site" -python3 -m voxvera.cli build-site - -echo "All local checks passed." diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh deleted file mode 100644 index 002657e..0000000 --- a/scripts/docker-entrypoint.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -VOXVERA_DIR="${VOXVERA_DIR:-/flyers}" -VOXVERA_CONFIG_PATH="${VOXVERA_CONFIG_PATH:-$VOXVERA_DIR/config.json}" -VOXVERA_START_INTERVAL="${VOXVERA_START_INTERVAL:-300}" -VOXVERA_BOOTSTRAP_DEFAULT_SITE="${VOXVERA_BOOTSTRAP_DEFAULT_SITE:-1}" -TOR_SOCKS_PORT="${TOR_SOCKS_PORT:-9050}" -TOR_CONTROL_PORT="${TOR_CONTROL_PORT:-9051}" -VOXVERA_TOR_DIR="${VOXVERA_TOR_DIR:-/tmp/voxvera-tor}" - -TOR_PID="" -SLEEP_PID="" - -log() { - printf '[voxvera-docker] %s\n' "$*" -} - -cleanup() { - if [[ -n "$SLEEP_PID" ]] && kill -0 "$SLEEP_PID" 2>/dev/null; then - kill "$SLEEP_PID" 2>/dev/null || true - fi - voxvera stop-all >/dev/null 2>&1 || true - if [[ -n "$TOR_PID" ]] && kill -0 "$TOR_PID" 2>/dev/null; then - kill "$TOR_PID" 2>/dev/null || true - wait "$TOR_PID" 2>/dev/null || true - fi -} -trap cleanup EXIT INT TERM - -wait_for_port() { - local host="$1" - local port="$2" - python3 - "$host" "$port" <<'PY' -import socket -import sys -import time - -host = sys.argv[1] -port = int(sys.argv[2]) -deadline = time.time() + 60 - -while time.time() < deadline: - with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: - sock.settimeout(1) - if sock.connect_ex((host, port)) == 0: - sys.exit(0) - time.sleep(1) - -sys.exit(1) -PY -} - -has_site_configs() { - find "$VOXVERA_DIR/host" -mindepth 2 -maxdepth 2 -name config.json -print -quit 2>/dev/null | grep -q . -} - -seed_default_config() { - mkdir -p "$VOXVERA_DIR" - if [[ ! -f "$VOXVERA_CONFIG_PATH" ]]; then - cp /opt/voxvera/voxvera/src/config.json "$VOXVERA_CONFIG_PATH" - log "Seeded default config at $VOXVERA_CONFIG_PATH" - fi -} - -bootstrap_default_site_if_needed() { - if [[ "$VOXVERA_BOOTSTRAP_DEFAULT_SITE" != "1" ]]; then - return - fi - - if has_site_configs; then - return - fi - - log "No sites found under $VOXVERA_DIR/host; bootstrapping default site" - voxvera --config "$VOXVERA_CONFIG_PATH" init --non-interactive -} - -start_tor() { - mkdir -p "$VOXVERA_TOR_DIR" - chmod 700 "$VOXVERA_TOR_DIR" - - cat >"$VOXVERA_TOR_DIR/torrc" </dev/null; then - log "Tor exited unexpectedly" - wait "$TOR_PID" - exit 1 - fi - - log "Running voxvera start-all" - voxvera start-all || true - - sleep "$VOXVERA_START_INTERVAL" & - SLEEP_PID="$!" - wait "$SLEEP_PID" - SLEEP_PID="" - done -} - -seed_default_config -start_tor -bootstrap_default_site_if_needed -start_loop diff --git a/scripts/docker-healthcheck.sh b/scripts/docker-healthcheck.sh deleted file mode 100644 index 39bb143..0000000 --- a/scripts/docker-healthcheck.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -VOXVERA_DIR="${VOXVERA_DIR:-/flyers}" -TMP_JSON="$(mktemp)" - -voxvera doctor --json >"$TMP_JSON" - -python3 - "$TMP_JSON" "$VOXVERA_DIR" <<'PY' -import json -import sys -from pathlib import Path - -doctor = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8")) -voxvera_dir = Path(sys.argv[2]) -checks = {check["name"]: check for check in doctor.get("checks", [])} - -required = ("voxvera_cli", "onionshare_cli", "tor_socks_reachable", "host_root") -missing = [] -failing = [] - -for name in required: - check = checks.get(name) - if not check: - missing.append(name) - continue - if not check.get("ok"): - failing.append(f"{name}: {check.get('detail', '')}") - -site_configs = list((voxvera_dir / "host").glob("*/config.json")) -running_sites = [cfg.parent for cfg in site_configs if (cfg.parent / "server.pid").exists()] - -if missing or failing or not site_configs or not running_sites: - if missing: - print("Missing checks: " + ", ".join(missing), file=sys.stderr) - if failing: - print("Failing checks: " + "; ".join(failing), file=sys.stderr) - if not site_configs: - print("No configured sites found under host/", file=sys.stderr) - if site_configs and not running_sites: - print("Configured sites exist but no server.pid files are present", file=sys.stderr) - sys.exit(1) - -print("healthy") -PY diff --git a/scripts/docker-runtime-smoke.sh b/scripts/docker-runtime-smoke.sh deleted file mode 100644 index c2c6b85..0000000 --- a/scripts/docker-runtime-smoke.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -cd "$(dirname "$0")/.." - -if ! command -v docker >/dev/null 2>&1; then - echo "docker is not installed; skipping Docker runtime smoke" - exit 0 -fi - -IMAGE_TAG="${VOXVERA_DOCKER_SMOKE_TAG:-voxvera:smoke}" -CONTAINER_NAME="${VOXVERA_DOCKER_SMOKE_CONTAINER:-voxvera-smoke}" -TMP_DIR="${VOXVERA_DOCKER_SMOKE_TMPDIR:-$(mktemp -d /tmp/voxvera-docker-smoke-XXXXXX)}" -FLYERS_DIR="$TMP_DIR/flyers" -mkdir -p "$FLYERS_DIR" - -cleanup() { - docker logs "$CONTAINER_NAME" >/dev/null 2>&1 || true - docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 || true - if [[ -z "${VOXVERA_DOCKER_SMOKE_TMPDIR:-}" ]]; then - chmod -R u+w "$TMP_DIR" 2>/dev/null || true - docker run --rm -v "$TMP_DIR:/cleanup" python:3.11-slim sh -lc 'rm -rf /cleanup/* /cleanup/.[!.]* /cleanup/..?* 2>/dev/null || true' >/dev/null 2>&1 || true - rm -rf "$TMP_DIR" 2>/dev/null || true - fi -} -trap cleanup EXIT - -echo "==> building Docker image" -docker build -t "$IMAGE_TAG" . - -echo "==> starting Docker container" -docker run -d \ - --name "$CONTAINER_NAME" \ - --restart no \ - -e VOXVERA_START_INTERVAL=15 \ - -v "$FLYERS_DIR:/flyers" \ - "$IMAGE_TAG" >/dev/null - -echo "==> waiting for healthy container" -deadline=$((SECONDS + 240)) -while true; do - status="$(docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{else}}no-healthcheck{{end}}' "$CONTAINER_NAME")" - case "$status" in - healthy) - break - ;; - unhealthy) - echo "Container became unhealthy" >&2 - docker logs "$CONTAINER_NAME" >&2 || true - exit 1 - ;; - esac - if (( SECONDS >= deadline )); then - echo "Timed out waiting for healthy Docker container" >&2 - docker logs "$CONTAINER_NAME" >&2 || true - exit 1 - fi - sleep 5 -done - -PLATFORM_JSON="$TMP_DIR/platform-status.json" -DOCTOR_JSON="$TMP_DIR/doctor.json" - -docker exec "$CONTAINER_NAME" voxvera platform-status --json >"$PLATFORM_JSON" -docker exec "$CONTAINER_NAME" voxvera doctor --json >"$DOCTOR_JSON" - -PLATFORM_JSON="$PLATFORM_JSON" \ -DOCTOR_JSON="$DOCTOR_JSON" \ -FLYERS_DIR="$FLYERS_DIR" \ -python3 - <<'PY' -import json -import os -import sys -from pathlib import Path - -platform_status = json.loads(Path(os.environ["PLATFORM_JSON"]).read_text(encoding="utf-8")) -doctor = json.loads(Path(os.environ["DOCTOR_JSON"]).read_text(encoding="utf-8")) -flyers_dir = Path(os.environ["FLYERS_DIR"]) - -errors = [] - -if platform_status.get("platform_id") != "docker_cli": - errors.append(f"platform_id mismatch: {platform_status.get('platform_id')}") -if platform_status.get("tier") != "experimental": - errors.append(f"tier mismatch: {platform_status.get('tier')}") - -checks = {check["name"]: check for check in doctor.get("checks", [])} -for required in ("container_marker", "docker_entrypoint", "docker_healthcheck", "tor_socks_reachable", "host_root"): - check = checks.get(required) - if not check: - errors.append(f"missing doctor check: {required}") - elif not check.get("ok"): - errors.append(f"doctor check failed: {required} ({check.get('detail')})") - -site_dir = flyers_dir / "host" / "voxvera" -for path in (flyers_dir / "config.json", site_dir / "config.json", site_dir / "index.html", site_dir / ".onionshare-session", site_dir / "server.pid"): - if not path.exists(): - errors.append(f"missing expected Docker runtime artifact: {path}") - -if errors: - print("Docker runtime smoke failed:", file=sys.stderr) - for error in errors: - print(f"- {error}", file=sys.stderr) - sys.exit(1) - -print("Docker runtime smoke OK") -print(f"Platform: {platform_status['label']} [{platform_status['tier']}]") -print(f"Hosting model: {platform_status.get('hosting_model', '')}") -PY diff --git a/scripts/download_tor.sh b/scripts/download_tor.sh deleted file mode 100755 index 171fc13..0000000 --- a/scripts/download_tor.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -VERSION="${VERSION:-15.0.7}" -BASE_URL="https://dist.torproject.org/torbrowser" - -# ARCH=$(uname -m) # Not needed for multi-platform download if we hardcode/loop targets - -download_platform() { - local platform=$1 - local arch=$2 - local archive=$3 - local exe=$4 - - local tmpdir=$(mktemp -d) - # trap 'rm -rf "$tmpdir"' EXIT # We'll clean up manually in the loop - - local url="$BASE_URL/${VERSION}/${archive}" - local dest="$(dirname "$0")/../voxvera/resources/tor/$platform" - - echo "--- Platform: $platform ($arch) ---" - echo "Downloading $url" - if ! curl -L "$url" -o "$tmpdir/$archive"; then - echo "Failed to download $url" >&2 - rm -rf "$tmpdir" - return 1 - fi - - echo "Extracting..." - if [[ "$archive" == *.zip ]]; then - unzip -q "$tmpdir/$archive" -d "$tmpdir" - else - tar -xf "$tmpdir/$archive" -C "$tmpdir" - fi - - mkdir -p "$dest" - - local tor_bin=$(find "$tmpdir" -type f -name "$exe" | head -n 1) - local obfs_bin=$(find "$tmpdir" -type f \( -name "lyrebird*" -o -name "obfs4proxy*" \) | head -n 1) - - if [[ -z "$tor_bin" || -z "$obfs_bin" ]]; then - echo "Failed to locate tor or lyrebird/obfs4proxy in archive for $platform" >&2 - rm -rf "$tmpdir" - return 1 - fi - - echo "Installing binaries to $dest" - cp "$tor_bin" "$dest/$(basename "$exe")" - cp "$obfs_bin" "$dest/$(basename "$obfs_bin")" - - chmod +x "$dest/$(basename "$exe")" "$dest/$(basename "$obfs_bin")" - - # If it's lyrebird, create a symlink for obfs4proxy for compatibility - if [[ "$(basename "$obfs_bin")" == "lyrebird"* ]]; then - local obfs_name="obfs4proxy" - [[ "$platform" == "win" ]] && obfs_name="obfs4proxy.exe" - echo "Creating symlink $obfs_name -> $(basename "$obfs_bin")" - (cd "$dest" && rm -f "$obfs_name" && ln -s "$(basename "$obfs_bin")" "$obfs_name") - fi - - rm -rf "$tmpdir" -} - -# Linux x86_64 -download_platform "linux" "x86_64" "tor-expert-bundle-linux-x86_64-${VERSION}.tar.gz" "tor" - -# macOS x86_64 (Intel) - works on M1/M2 via Rosetta if needed, but expert bundle usually has universal or specific -download_platform "mac" "x86_64" "tor-expert-bundle-macos-x86_64-${VERSION}.tar.gz" "tor" - -# Windows x86_64 -download_platform "win" "x86_64" "tor-expert-bundle-windows-x86_64-${VERSION}.tar.gz" "tor.exe" - -echo "All platforms updated." diff --git a/scripts/linux-recovery-check.sh b/scripts/linux-recovery-check.sh deleted file mode 100644 index 4296e3c..0000000 --- a/scripts/linux-recovery-check.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -cd "$(dirname "$0")/.." - -if [[ "$(uname -s)" != "Linux" ]]; then - echo "linux-recovery-check.sh is only for Linux hosts." >&2 - exit 1 -fi - -command -v voxvera >/dev/null 2>&1 || { - echo "voxvera is not on PATH" >&2 - exit 1 -} - -TMP_DIR="${VOXVERA_RECOVERY_TMPDIR:-$(mktemp -d /tmp/voxvera-linux-recovery-XXXXXX)}" -cleanup() { - if [[ -z "${VOXVERA_RECOVERY_TMPDIR:-}" ]]; then - rm -rf "$TMP_DIR" - fi -} -trap cleanup EXIT - -PLATFORM_JSON="$TMP_DIR/platform-status.json" -DOCTOR_JSON="$TMP_DIR/doctor.json" -AUTOSTART_JSON="$TMP_DIR/autostart-status.json" - -voxvera platform-status --json >"$PLATFORM_JSON" -voxvera doctor --json >"$DOCTOR_JSON" -voxvera autostart status --json >"$AUTOSTART_JSON" - -PLATFORM_JSON="$PLATFORM_JSON" \ -DOCTOR_JSON="$DOCTOR_JSON" \ -AUTOSTART_JSON="$AUTOSTART_JSON" \ -python3 - <<'PY' -import json -import os -import sys -from pathlib import Path - -platform_status = json.loads(Path(os.environ["PLATFORM_JSON"]).read_text(encoding="utf-8")) -doctor = json.loads(Path(os.environ["DOCTOR_JSON"]).read_text(encoding="utf-8")) -autostart = json.loads(Path(os.environ["AUTOSTART_JSON"]).read_text(encoding="utf-8")) - -errors = [] -warnings = [] - -if platform_status.get("platform_id") != "linux_cli_systemd": - errors.append(f"expected linux_cli_systemd, got {platform_status.get('platform_id')}") -if platform_status.get("tier") != "supported": - errors.append(f"expected supported tier, got {platform_status.get('tier')}") - -checks = {check["name"]: check for check in doctor.get("checks", [])} - -required_ok = ["platform", "voxvera_cli", "onionshare_cli", "tor_binary", "host_root"] -for name in required_ok: - check = checks.get(name) - if not check: - errors.append(f"missing doctor check: {name}") - elif not check.get("ok"): - errors.append(f"{name} failed: {check.get('detail')}") - -tor_check = checks.get("tor_socks_reachable") -if not tor_check: - errors.append("missing doctor check: tor_socks_reachable") -elif not tor_check.get("ok"): - warnings.append(f"tor_socks_reachable: {tor_check.get('detail')}") - -timer_check = next((check for check in autostart.get("checks", []) if check["name"] == "systemd_timer_enabled"), None) -if not timer_check: - errors.append("missing autostart check: systemd_timer_enabled") -elif not timer_check.get("ok"): - warnings.append(f"systemd_timer_enabled: {timer_check.get('detail')}") - -artifacts = [Path(path) for path in autostart.get("artifacts", [])] -missing = [str(path) for path in artifacts if not path.exists()] -if missing: - warnings.append("missing autostart artifacts: " + ", ".join(missing)) - -host_root = Path.home() / "host" -sites = [] -if host_root.exists(): - for site_dir in sorted(path for path in host_root.iterdir() if path.is_dir()): - config = site_dir / "config.json" - if not config.exists(): - continue - session = site_dir / ".onionshare-session" - log = site_dir / "onionshare.log" - pid = site_dir / "server.pid" - sites.append( - { - "name": site_dir.name, - "session": session.exists(), - "log": log.exists(), - "pid": pid.exists(), - } - ) - -if errors: - print("Linux recovery check failed:", file=sys.stderr) - for error in errors: - print(f"- {error}", file=sys.stderr) - sys.exit(1) - -print(f"Platform: {platform_status['label']} [{platform_status['tier']}]") -print(f"Hosting model: {platform_status.get('hosting_model', '')}") -print(f"Autostart: {autostart.get('message', '')}") -if warnings: - print("Warnings:") - for warning in warnings: - print(f"- {warning}") -else: - print("Warnings: none") - -if sites: - print("Site state:") - for site in sites: - print( - f"- {site['name']}: session={'yes' if site['session'] else 'no'}, " - f"log={'yes' if site['log'] else 'no'}, pid={'yes' if site['pid'] else 'no'}" - ) -else: - print("Site state: no configured sites under ~/host") -PY - -echo "Detailed JSON artifacts written to $TMP_DIR" diff --git a/scripts/platform-smoke.sh b/scripts/platform-smoke.sh deleted file mode 100644 index cc66cc9..0000000 --- a/scripts/platform-smoke.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -cd "$(dirname "$0")/.." - -TARGET="${1:-linux-cli}" -TMP_DIR="${VOXVERA_SMOKE_TMPDIR:-$(mktemp -d /tmp/voxvera-platform-smoke-XXXXXX)}" -mkdir -p "$TMP_DIR" - -cleanup() { - if [[ -z "${VOXVERA_SMOKE_TMPDIR:-}" ]]; then - rm -rf "$TMP_DIR" - fi -} -trap cleanup EXIT - -command -v voxvera >/dev/null 2>&1 || { - echo "voxvera is not on PATH" >&2 - exit 1 -} - -case "$TARGET" in - linux-cli) - EXPECTED_PLATFORM_ID="linux_cli_systemd" - EXPECTED_TIER="supported" - REQUIRE_ONIONSHARE="${VOXVERA_REQUIRE_ONIONSHARE:-1}" - ;; - macos-cli) - EXPECTED_PLATFORM_ID="macos_cli" - EXPECTED_TIER="experimental" - REQUIRE_ONIONSHARE="${VOXVERA_REQUIRE_ONIONSHARE:-0}" - ;; - windows-cli) - EXPECTED_PLATFORM_ID="windows_cli" - EXPECTED_TIER="experimental" - REQUIRE_ONIONSHARE="${VOXVERA_REQUIRE_ONIONSHARE:-0}" - ;; - docker-cli) - EXPECTED_PLATFORM_ID="docker_cli" - EXPECTED_TIER="${VOXVERA_EXPECTED_TIER_OVERRIDE:-experimental}" - REQUIRE_ONIONSHARE="${VOXVERA_REQUIRE_ONIONSHARE:-0}" - ;; - list) - printf '%s\n' linux-cli macos-cli windows-cli docker-cli - exit 0 - ;; - *) - echo "Unsupported smoke target: $TARGET" >&2 - exit 1 - ;; -esac - -PLATFORM_JSON="$TMP_DIR/platform-status.json" -DOCTOR_JSON="$TMP_DIR/doctor.json" -AUTOSTART_JSON="$TMP_DIR/autostart-status.json" - -voxvera platform-status --json >"$PLATFORM_JSON" -voxvera doctor --json >"$DOCTOR_JSON" -voxvera autostart status --json >"$AUTOSTART_JSON" - -PLATFORM_JSON="$PLATFORM_JSON" \ -DOCTOR_JSON="$DOCTOR_JSON" \ -AUTOSTART_JSON="$AUTOSTART_JSON" \ -EXPECTED_PLATFORM_ID="$EXPECTED_PLATFORM_ID" \ -EXPECTED_TIER="$EXPECTED_TIER" \ -VOXVERA_REQUIRE_TOR="${VOXVERA_REQUIRE_TOR:-0}" \ -VOXVERA_REQUIRE_AUTOSTART_ARTIFACTS="${VOXVERA_REQUIRE_AUTOSTART_ARTIFACTS:-0}" \ -VOXVERA_REQUIRE_ONIONSHARE="$REQUIRE_ONIONSHARE" \ -python3 - <<'PY' -import json -import os -import sys -from pathlib import Path - -platform_status = json.loads(Path(os.environ["PLATFORM_JSON"]).read_text(encoding="utf-8")) -doctor = json.loads(Path(os.environ["DOCTOR_JSON"]).read_text(encoding="utf-8")) -autostart = json.loads(Path(os.environ["AUTOSTART_JSON"]).read_text(encoding="utf-8")) - -expected_platform_id = os.environ["EXPECTED_PLATFORM_ID"] -expected_tier = os.environ["EXPECTED_TIER"] -require_tor = os.environ.get("VOXVERA_REQUIRE_TOR") == "1" -require_autostart_artifacts = os.environ.get("VOXVERA_REQUIRE_AUTOSTART_ARTIFACTS") == "1" -require_onionshare = os.environ.get("VOXVERA_REQUIRE_ONIONSHARE") == "1" - -errors = [] - -if platform_status.get("platform_id") != expected_platform_id: - errors.append( - f"platform-status platform_id mismatch: {platform_status.get('platform_id')} != {expected_platform_id}" - ) -if platform_status.get("tier") != expected_tier: - errors.append(f"platform-status tier mismatch: {platform_status.get('tier')} != {expected_tier}") -if doctor.get("platform_id") != expected_platform_id: - errors.append(f"doctor platform_id mismatch: {doctor.get('platform_id')} != {expected_platform_id}") -if autostart.get("platform_id") != expected_platform_id: - errors.append(f"autostart platform_id mismatch: {autostart.get('platform_id')} != {expected_platform_id}") - -check_map = {check["name"]: check for check in doctor.get("checks", [])} -for required_check in ("platform", "voxvera_cli"): - if required_check not in check_map: - errors.append(f"doctor missing required check: {required_check}") - elif not check_map[required_check].get("ok"): - errors.append(f"doctor check failed: {required_check} ({check_map[required_check].get('detail')})") - -if require_onionshare: - required_check = "onionshare_cli" - if required_check not in check_map: - errors.append(f"doctor missing required check: {required_check}") - elif not check_map[required_check].get("ok"): - errors.append(f"doctor check failed: {required_check} ({check_map[required_check].get('detail')})") - -if require_tor: - for required_check in ("tor_binary", "tor_socks_reachable"): - if required_check not in check_map: - errors.append(f"doctor missing Tor check: {required_check}") - elif not check_map[required_check].get("ok"): - errors.append(f"doctor Tor check failed: {required_check} ({check_map[required_check].get('detail')})") - -if require_autostart_artifacts: - if not autostart.get("artifacts"): - errors.append("autostart status returned no artifacts") - missing_artifacts = [artifact for artifact in autostart.get("artifacts", []) if not Path(artifact).exists()] - if missing_artifacts: - errors.append("autostart artifacts missing: " + ", ".join(missing_artifacts)) - -if errors: - print("Platform smoke validation failed:", file=sys.stderr) - for error in errors: - print(f"- {error}", file=sys.stderr) - sys.exit(1) - -print(f"Platform smoke OK: {platform_status['label']} [{platform_status['tier']}]") -print(f"Hosting model: {platform_status.get('hosting_model', '')}") -failing_checks = [check["name"] for check in doctor.get("checks", []) if not check.get("ok")] -if failing_checks: - print("Doctor warnings: " + ", ".join(failing_checks)) -else: - print("Doctor warnings: none") -print("Autostart message: " + autostart.get("message", "")) -PY - -echo "Artifacts written to $TMP_DIR" diff --git a/scripts/validate-release-artifacts.sh b/scripts/validate-release-artifacts.sh deleted file mode 100644 index f8e69d4..0000000 --- a/scripts/validate-release-artifacts.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -cd "$(dirname "$0")/.." - -ARCH="${ARCH_OVERRIDE:-$(uname -m)}" -if [[ "$ARCH" == "x86_64" ]]; then - DEB_ARCH="amd64" -else - DEB_ARCH="$ARCH" -fi - -DEB_PATH="${1:-voxvera/resources/bin/voxvera_$(python3 - <<'PY' -from voxvera import __version__ -print(__version__) -PY -)_${DEB_ARCH}.deb}" -APPIMAGE_PATH="${2:-voxvera/resources/bin/VoxVera-${ARCH}.AppImage}" - -tmpdir="$(mktemp -d)" -cleanup() { - rm -rf "$tmpdir" -} -trap cleanup EXIT - -json_get() { - local file="$1" - local key="$2" - python3 - "$file" "$key" <<'PY' -import json -import sys - -path = sys.argv[2].split(".") -data = json.load(open(sys.argv[1], "r", encoding="utf-8")) -for part in path: - data = data[part] -if isinstance(data, list): - print("\n".join(str(item) for item in data)) -else: - print(data) -PY -} - -require_non_empty_json_field() { - local file="$1" - local key="$2" - local value - value="$(json_get "$file" "$key")" - if [[ -z "${value// }" ]]; then - echo "Expected non-empty JSON field '$key' in $file" >&2 - exit 1 - fi -} - -echo "Validating Debian artifact: $DEB_PATH" -if [[ ! -f "$DEB_PATH" ]]; then - echo "Debian package not found: $DEB_PATH" >&2 - exit 1 -fi - -mkdir -p "$tmpdir/deb-root" "$tmpdir/deb-data" -dpkg-deb -x "$DEB_PATH" "$tmpdir/deb-root" - -if [[ ! -x "$tmpdir/deb-root/usr/bin/voxvera" ]]; then - echo "Packaged voxvera binary missing from .deb payload" >&2 - exit 1 -fi - -VOXVERA_DIR="$tmpdir/deb-data" \ - "$tmpdir/deb-root/usr/bin/voxvera" \ - --config "$tmpdir/deb-data/config.json" \ - init --non-interactive - -if [[ ! -f "$tmpdir/deb-data/config.json" ]]; then - echo ".deb validation failed: config.json was not created" >&2 - exit 1 -fi - -if [[ ! -f "$tmpdir/deb-data/host/voxvera/index.html" ]]; then - echo ".deb validation failed: built site missing index.html" >&2 - exit 1 -fi - -echo "Validating AppImage artifact: $APPIMAGE_PATH" -if [[ ! -f "$APPIMAGE_PATH" ]]; then - echo "AppImage not found: $APPIMAGE_PATH" >&2 - exit 1 -fi - -chmod +x "$APPIMAGE_PATH" -"$APPIMAGE_PATH" platform-status --json > "$tmpdir/platform-status.json" -require_non_empty_json_field "$tmpdir/platform-status.json" "tier_description" -require_non_empty_json_field "$tmpdir/platform-status.json" "hosting_model" - -VOXVERA_DIR="$tmpdir/appimage-data" \ - "$APPIMAGE_PATH" \ - --config "$tmpdir/appimage-data/config.json" \ - init --non-interactive - -if [[ ! -f "$tmpdir/appimage-data/config.json" ]]; then - echo "AppImage validation failed: config.json was not created" >&2 - exit 1 -fi - -if [[ ! -f "$tmpdir/appimage-data/host/voxvera/index.html" ]]; then - echo "AppImage validation failed: built site missing index.html" >&2 - exit 1 -fi - -echo "Release artifact validation passed." diff --git a/setup.sh b/setup.sh deleted file mode 100755 index 1e1cb6a..0000000 --- a/setup.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -set -e - -# Development setup: install Python dependencies for VoxVera. -# System tools like jq, qrencode, ImageMagick, Node.js, and poppler-utils -# are no longer required — the build pipeline uses pure Python packages. - -check_cmd() { - command -v "$1" >/dev/null 2>&1 -} - -# Ensure pip is available -if ! check_cmd pip3 && ! check_cmd pip && ! check_cmd pipx; then - echo "pip or pipx not found. Install Python 3 and pip/pipx first." - exit 1 -fi - -if check_cmd pipx; then - echo "Using pipx/pip for dependency installation..." - # For development, we might want to install in a local venv instead of pipx - # but for simple setup, pipx is safest on modern systems. - # However, setup.sh usually implies installing into the current env for development. - PIP_OPTS="--user --upgrade" - if [ -f /etc/debian_version ]; then - DEB_VER=$(cat /etc/debian_version | cut -d. -f1) - if [[ "$DEB_VER" =~ ^[0-9]+$ ]] && [ "$DEB_VER" -ge 12 ]; then - PIP_OPTS="$PIP_OPTS --break-system-packages" - fi - fi - pip3 install $PIP_OPTS InquirerPy rich qrcode Pillow jsmin htmlmin2 pypdf wcwidth || \ - pip install $PIP_OPTS InquirerPy rich qrcode Pillow jsmin htmlmin2 pypdf wcwidth -else - PIP=$(check_cmd pip3 && echo pip3 || echo pip) - $PIP install --user --upgrade InquirerPy rich qrcode Pillow jsmin htmlmin2 pypdf wcwidth -fi - -echo "All dependencies are installed." -echo "Run 'voxvera check' to verify your setup." diff --git a/site/config.json b/site/config.json deleted file mode 100644 index c811506..0000000 --- a/site/config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Vox Vera Printable Flyers", - "folder_name": "voxvera", - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.", - "url_message": "Get VoxVera and start spreading your message.", - "url": "https://github.com/PR0M3TH3AN/VoxVera", - "tear_off_link": "http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/site/download/voxvera-linux b/site/download/voxvera-linux deleted file mode 100755 index 448757a..0000000 Binary files a/site/download/voxvera-linux and /dev/null differ diff --git a/site/download/voxvera-source.zip b/site/download/voxvera-source.zip deleted file mode 100644 index 4f58492..0000000 Binary files a/site/download/voxvera-source.zip and /dev/null differ diff --git a/site/index.html b/site/index.html index f2ab270..126c32c 100644 --- a/site/index.html +++ b/site/index.html @@ -1,634 +1,15 @@ - + - - - - - Vox Vera Printable Flyers - + + + + + VoxVera - - - -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
- -
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
- http://asvkk5xs5cvx6gi6zxgszhcuermrszkyp3pgxzmf76b65qcv22ruuxqd.onion/
- click the button below to print -
-
- QR Code -
-
-
-
-

TOP SECRET

-
DO NOT DISTRIBUTE
-

OPERATION VOX VERA

-
-
-
Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.
-
- -
-Get VoxVera and start spreading your message.

-Use Tor Browser

-https://github.com/PR0M3TH3AN/VoxVera -
- QR Code -
-
-
- -
-
-
- - - - - -
- + + +

Open VoxVera

+ diff --git a/site/nostr/locales.js b/site/nostr/locales.js index 2b84853..60e6a8c 100644 --- a/site/nostr/locales.js +++ b/site/nostr/locales.js @@ -1 +1 @@ -window.VoxVeraLocales = {"ar":{"meta":{"language_name":"العربية","flag":"🇸🇦","direction":"rtl"},"cli":{"dep_check_header":"فحص التبعيات","dep_found":"موجود","dep_missing":"مفقود","all_deps_installed":"تم تثبيت جميع التبعيات.","missing_deps_error":"بعض التبعيات مفقودة. تشغيل: pip install 'voxvera[all]'","init_name":"الاسم","init_folder":"اسم المجلد","init_title":"العنوان","init_subtitle":"العنوان الفرعي","init_headline":"العنوان الرئيسي","init_body":"نص الرسالة","init_links":"الروابط","edit_again":"تعديل مرة أخرى؟","body_length":"طول النص","body_limit_exceeded":"يتجاوز الحد","url_label":"URL (رابط المحتوى - مورد خارجي)","url_message_label":"رسالة الـ URL","footer_message_label":"رسالة التذييل","template_not_found":"القالب {name} غير موجود","template_copied":"تم نسخ القالب إلى {dest}","flyer_created":"تم إنشاء ملفات المنشور تحت {dest}","dir_not_found":"المجلد {dir_path} غير موجود","onionshare_error":"خرج OnionShare لـ {folder_name} بشكل غير متوقع.","onionshare_causes":"الأسباب الشائعة: الشبكة محظورة، وقت النظام غير دقيق، أو OnionShare يعمل بالفعل.","onionshare_logs_tip":"راجع {logfile} للحصول على السجلات الكاملة.","onion_url_msg":"[{folder_name}] رابط Onion: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare يعمل (PID {pid}).","export_not_found":"خطأ: مجلد الموقع '{folder_name}' غير موجود في {host_root}","export_success":"تم تصدير '{folder_name}' إلى {output_path}","export_all_none":"لم يتم العثور على مواقع لتصديرها.","export_all_starting":"جاري تصدير {count} مواقع إلى {dir}...","export_all_complete":"اكتمل تصدير الكل.","import_zip_not_found":"خطأ: ملف Zip '{path}' غير موجود.","import_invalid_config":"خطأ: ملف تصدير غير صالح. 'config.json' مفقود.","import_invalid_folder":"خطأ: config.json غير صالح. 'folder_name' مفقود.","import_overwrite_confirm":"الموقع '{folder_name}' موجود بالفعل. هل تريد الاستبدال؟","import_cancelled":"تم إلغاء الاستيراد.","import_success":"تم استيراد '{folder_name}' بنجاح إلى {dest_dir}","import_dir_not_found":"خطأ: المجلد '{dir}' غير موجود.","import_multiple_none":"لم يتم العثور على ملفات zip في {dir}","import_multiple_found":"تم العثور على {count} موقع للاستيراد من {dir}...","importing_file":"جاري استيراد {name}...","import_multiple_complete":"اكتمل استيراد الكل.","batch_import_none":"لم يتم العثور على ملفات JSON في الواردات","batch_import_processing":"جاري معالجة {file}","stop_server_not_running":"الخادم {folder_name} لا يعمل.","stop_server_success":"تم إيقاف {folder_name} (PID {pid})","delete_server_success":"تم حذف الخادم {folder_name}","manage_select_server":"اختر خادماً لإدارته (أو خروج):","manage_create_new":"--- إنشاء موقع/منشور جديد ---","manage_start_all":"--- تشغيل جميع المواقع ---","manage_stop_all":"--- إيقاف جميع المواقع ---","manage_export_all":"--- تصدير جميع المواقع ---","manage_import_multiple":"--- استيراد مواقع متعددة ---","manage_exit":"خروج","manage_startup_summary":"ملخص التشغيل","manage_press_enter":"اضغط Enter للمتابعة","manage_action_menu":"إدارة {name}:","manage_action_toggle_stop":"إيقاف","manage_action_toggle_start":"تشغيل","manage_action_export":"تصدير إلى Zip","manage_action_delete":"حذف","manage_action_back":"رجوع","manage_delete_confirm":"هل أنت متأكد أنك تريد حذف {name}؟","bootstrapping_msg":"[{name}] جاري الاتصال بمرحلات Tor وإعداد الخدمة المخفية...","bootstrapping_progress":"[{name}] تمهيد Tor: {progress}% ...","no_urls_qr_skip":"لم يتم تكوين أي روابط بعد. سيتم إنشاء أكواد QR بعد 'voxvera serve'","input_file_not_found":"ملف الإدخال {path} غير موجود.","attachment_path_label":"مسار ملف المرفق (اختياري - سيتم تقديمه من موقع Tor)","manage_action_edit":"تحرير","manage_templates":"--- إنشاء من قالب ---","template_select":"اختر قالباً:","body_over_limit_warning":"تحذير: نص المحتوى يتجاوز 1000 حرف. قد يتم قطعه في المنشور.","manage_action_export_keys":"تصدير المفاتيح","manage_action_import_keys":"استيراد المفاتيح","keys_not_found":"لم يتم العثور على مفتاح جلسة لـ '{name}'. قم بتشغيل الموقع أولاً لتوليد المفاتيح.","keys_export_header":"مفتاح الجلسة لـ '{name}':","keys_export_hint":"انسخ هذا المفتاح واحفظه بأمان. استخدم 'استيراد المفاتيح' في نسخة أخرى للاستعادة.","keys_site_not_found":"الموقع '{name}' غير موجود.","keys_overwrite_confirm":"الموقع '{name}' لديه مفتاح بالفعل. هل تريد الكتابة فوقه؟","keys_import_cancelled":"تم إلغاء الاستيراد.","keys_import_prompt":"الصق مفتاح الجلسة base64 أدناه:","keys_import_empty":"لم يتم تقديم مفتاح.","keys_import_invalid":"تنسيق المفتاح غير صالح. يجب أن يكون سلسلة base64 صالحة.","keys_import_success":"تم استيراد مفتاح الجلسة لـ '{name}'. أعد تشغيل الموقع لاستخدام المفتاح الجديد."},"web":{"tear_off_tor_browser":"استخدم متصفح Tor","tear_off_desc":"للمساعدة في نشر هذه الرسالة، انتقل إلى","tear_off_footer":"انقر فوق الزر أدناه للطباعة","built_with":"بني بواسطة","print_button":"اطبع المنشور","download_button":"تحميل الأداة والكود","download_attachment":"تنزيل المرفق"},"landing":{"title":"سري للغاية","subtitle":"~~لا~~ للنشر","headline":"عملية VOX VERA","content":"تحرر من الرقابة مع VoxVera. أداة تسويق عصابات مجهولة ونشر رسائل. سواء عبر الإنترنت أو في العالم المادي، يمكنها تمكينك من نشر أفكارك بجرأة، محمية بإخفاء الهوية الكامل (إذا كنت تستضيف عبر Tor). قم بتحميل الكود، وصمم موقع منشور، واستضيفه عبر الإنترنت وقم بتضخيم رسالتك.

استخدم القوة الميمية لمشاركة أفكارك في مدرستك، أو مكان عملك، أو مجتمعاتك عبر الإنترنت، أو حتى على مستوى العالم. تضمن VoxVera تردد صدى رسالتك بعيداً وعلى نطاق واسع، مع أقسام قابلة للنزع تتميز بروابط فريدة وأكواد QR لسهولة إعادة الطباعة.

يمكن الحفاظ على الخصوصية. يمكن مشاركة المنشورات عبر شبكة Tor، مما يحمي المضيف والمستخدمين من الرقابة.

انضم إلينا في ثورة تقدر الحقيقة والشفافية. معاً، يمكننا بناء شبكة من المواطنين المستنيرين الذين لا يخشون التحدث.","url_message":"احصل على VoxVera وابدأ بنشر رسالتك.","name":"منشورات Vox Vera القابلة للطباعة"},"templates":{"aosp":{"name":"مشروع AOS","title":"ANDROID بلا قيود","subtitle":"بدون حدود","headline":"حرية المصدر المفتوح","content":"يمثل مشروع Android مفتوح المصدر (AOSP) جوهر ما كان Android مخصصاً له في الأصل: منصة مفتوحة وشفافة وقابلة للتكيف. يزيل طبقات البرمجيات الاحتكارية والرقابة المؤسسية التي أصبحت مرادفة لتوزيعات Android السائدة. مع AOSP، تحصل على إمكانية الوصول إلى نسخة خام وغير مفلترة من Android، مما يتيح لك جعل جهازك ملكك حقاً.

للمطورين، يقدم AOSP ساحة من الإمكانيات، حيث الحدود الوحيدة هي مهاراتك وخيالك. يعمل كأساس لعدد لا يحصى من الرومات المخصصة، كل منها مصمم لاحتياجات محددة، سواء كان ذلك للأداء المحسن أو الخصوصية أو ميزات فريدة تفتقر إليها الإصدارات السائدة. سيقدر المهتمون بالخصوصية غياب البرامج المثبتة مسبقاً وخدمات التتبع التي تأتي غالباً مع Android المصنعي.

AOSP ليس فقط للمطورين أو عشاق التكنولوجيا؛ إنه لأي شخص يقدر الحرية الرقمية. يتيح لك استعادة السيطرة على جهازك، وتخصيصه وفقاً لاحتياجاتك دون قيود شركات الاتصالات أو الشركات المصنعة. اكتشف كيف يمكن لـ AOSP تحويل تجربتك مع الهاتف المحمول. ابدأ رحلتك نحو مستقبل أكثر انفتاحاً وتخصيصاً اليوم.","url_message":"قم بزيارة الرابط أدناه لمعرفة المزيد."},"bitcoin":{"name":"منشورات ثورة Bitcoin","title":"قواعد بدون حكام","subtitle":"لا تتجاهل","headline":"انضم إلى ثورة BITCOIN","content":"ما هو Bitcoin؟ إنه أكثر من مجرد نقود رقمية؛ إنه تقنية ثورية مصممة لحل بعض أكثر مشاكل العالم إلحاحاً. يعمل Bitcoin على شبكة لامركزية، خالية من سيطرة أي حكومة أو سلطة مركزية. هذا يضمن أن لا أحد يمكنه التلاعب بعرضه أو قيمته، مما يجعله شكلاً سليماً من المال يحمي ثروتك من التضخم.

نظامنا المالي الحالي مبني على حوافز معيبة—تشجع الدين والتبعية ومركزية السلطة. Bitcoin يغير ذلك بإنشاء نظام حيث يُكافأ الصدق والشفافية والمسؤولية الفردية. في شبكة Bitcoin، لا مجال للفساد أو التلاعب لأن القواعد تُطبق بالرياضيات، وليس بالأشخاص.

Bitcoin يوائم الحوافز بطريقة تعزز التفكير طويل الأمد والادخار والابتكار. يمكّن الأفراد من السيطرة على مستقبلهم المالي، معززاً مجتمعاً عالمياً حيث يمكن نقل القيمة بحرية وأمان دون وسطاء. لهذا نحتاج Bitcoin—لأنه يخلق عالماً حيث الحوافز متوائمة بشكل صحيح، مما يؤدي إلى مجتمع أكثر عدلاً وازدهاراً للجميع.

اتخذ الخطوة لمعرفة المزيد عن Bitcoin وكيف يمكنه تحويل ليس فقط حياتك المالية، بل العالم. انزع رابطاً من اليسار واستكشف هذه التقنية الرائدة. انضم إلى الحركة نحو مستقبل أفضل.","url_message":"اتبع هذا الرابط لمعرفة المزيد."},"jesus":{"name":"رسالة تغير الحياة","title":"أخبار سارة","subtitle":"لا تتجاهل","headline":"اكتشف الأمل الحقيقي","content":"من هو Jesus؟ إنه أكثر من مجرد شخصية تاريخية؛ إنه ابن الله، مخلص العالم. قال Jesus نفسه: 'أنا هو الطريق والحق والحياة. لا يأتي أحد إلى الآب إلا بي' (يوحنا 14:6). جاء ليسد الفجوة بين الله والبشرية، مقدماً لنا طريقاً نحو المغفرة والسلام والحياة الأبدية.

نواجه جميعاً كسراً في حياتنا—سواء في علاقاتنا أو قلوبنا أو عالمنا. جاء Jesus ليشفي ذلك الكسر. عاش حياة كاملة، ومات على الصليب من أجل خطايانا، وقام من الموت، هازماً الموت ومقدماً لنا رجاء الحياة الأبدية مع الله.

بدون Jesus، نحن ضائعون في خطايانا، منفصلون عن الله. لكن من خلاله، يمكننا أن نُغفر ونُستعاد. يقدم لنا ليس فقط حياة أفضل الآن، بل وعد حياة أبدية معه. لهذا نحتاجه—لأنه فقط في Jesus يمكننا أن نجد السلام الحقيقي والهدف وضمان الحياة الأبدية.

اتخذ الخطوة لمعرفة المزيد عن Jesus والتأثير المغير للحياة الذي يمكن أن يحدثه في حياتك. انزع رابطاً من اليسار واستكشف تعاليمه. اعثر على الأمل الذي كنت تبحث عنه.","url_message":"اتبع هذا الرابط لمعرفة المزيد."},"meshtastic":{"name":"منشورات شبكة Meshtastic","title":"اتصالات آمنة","subtitle":"لا تتجاهل","headline":"ابنِ شبكة الطوارئ الخاصة بك","content":"لماذا Meshtastic؟ في أوقات الأزمات، يمكن أن تفشل شبكات الاتصال التقليدية، مما يتركنا معزولين وضعفاء. يوفر Meshtastic حلاً قوياً—شبكة اتصالات محلية بديلة تعمل بشكل مستقل عن الأنظمة المركزية. صُمم لحالات الطوارئ، مما يتيح لك البقاء على اتصال عندما يكون الأمر أكثر أهمية.

تنشئ أجهزة Meshtastic شبكة متداخلة يمكنها إعادة توجيه الرسائل عبر مسافات طويلة، حتى بدون تغطية إنترنت أو خلوية. يضمن هذا النهج اللامركزي أن اتصالاتك مرنة وموثوقة، بغض النظر عن الظروف. لكن الأمر لا يتعلق فقط بالبقاء على اتصال—يوفر Meshtastic أيضاً التشفير، لتبقى رسائلك آمنة وخاصة.

في عالم تُنتهك فيه الخصوصية بشكل متزايد، يمكّنك Meshtastic من السيطرة على اتصالاتك. سواء كنت تنسق استجابة مجتمعية محلية، أو تبقى على تواصل مع أحبائك خلال كارثة، أو تستعد ببساطة لما هو غير متوقع، يوفر Meshtastic الأدوات التي تحتاجها للتواصل بأمان وفعالية.

اتخذ الخطوة لمعرفة المزيد عن Meshtastic وكيف يمكنك بناء شبكة اتصالات الطوارئ الخاصة بك. انزع رابطاً من اليسار واستكشف هذه التقنية المبتكرة. تأكد من استعدادك لأي شيء قد يحدث.","url_message":"اتبع هذا الرابط لمعرفة المزيد."},"nostr":{"name":"منشورات بروتوكول Nostr","title":"حرية اجتماعية","subtitle":"لا تتجاهل","headline":"انضم إلى الشبكة المقاومة للرقابة","content":"ما هو Nostr؟ على عكس منصات التواصل الاجتماعي التقليدية، فإن Nostr هو بروتوكول—نظام لامركزي يمكّن المستخدمين من الاتصال والمشاركة دون قيود سلطة مركزية. Nostr مقاوم للرقابة، مما يعني أن صوتك لا يمكن إسكاته من قبل الشركات أو الحكومات. صُمم ليمنحك السيطرة على حضورك عبر الإنترنت، بعيداً عن تأثير الخوارزميات أو الإعلانات التي تعطي الأولوية للتفاعل على الروابط الحقيقية.

في Nostr، لا توجد أجندات خفية لإبقائك تتصفح بلا نهاية. تتفاعل مع المحتوى بشروطك، وليس بناءً على ما تعتقد الخوارزمية أنه سيبقيك متصلاً لأطول فترة. يتيح لك Nostr بناء روابط حقيقية والمشاركة في محادثات مهمة، كل ذلك مع الحفاظ على خصوصيتك واستقلاليتك.

في عالم يتم فيه التحكم في الخطاب عبر الإنترنت والتلاعب به بشكل متزايد، يقدم Nostr بديلاً منعشاً. إنه ليس مجرد منصة؛ إنه حركة نحو الحرية الرقمية الحقيقية، حيث تكون تفاعلاتك مدفوعة باهتماماتك وقيمك، وليس بما يولد أكبر إيرادات إعلانية.

اتخذ الخطوة لمعرفة المزيد عن Nostr وكيف يمكنه تحويل طريقة تواصلك عبر الإنترنت. انزع رابطاً من اليسار واستكشف هذا البروتوكول الرائد. انضم إلى مجتمع يقدر الحرية والتفاعل الحقيقي.","url_message":"اتبع هذا الرابط لمعرفة المزيد."},"voxvera":{"name":"منشورات Vox Vera القابلة للطباعة","title":"سري للغاية","subtitle":"~~لا~~ للنشر","headline":"عملية VOX VERA","content":"تحرر من الرقابة مع VoxVera. أداة تسويق عصابات مجهولة ونشر رسائل. سواء عبر الإنترنت أو في العالم المادي، يمكنها تمكينك من نشر أفكارك بجرأة، محمية بإخفاء الهوية الكامل (إذا كنت تستضيف عبر Tor). قم بتحميل الكود، وصمم موقع منشور، واستضيفه عبر الإنترنت وقم بتضخيم رسالتك.

استخدم القوة الميمية لمشاركة أفكارك في مدرستك، أو مكان عملك، أو مجتمعاتك عبر الإنترنت، أو حتى على مستوى العالم. تضمن VoxVera تردد صدى رسالتك بعيداً وعلى نطاق واسع، مع أقسام قابلة للنزع تتميز بروابط فريدة وأكواد QR لسهولة إعادة الطباعة.

يمكن الحفاظ على الخصوصية. يمكن مشاركة المنشورات عبر شبكة Tor، مما يحمي المضيف والمستخدمين من الرقابة.

انضم إلينا في ثورة تقدر الحقيقة والشفافية. معاً، يمكننا بناء شبكة من المواطنين المستنيرين الذين لا يخشون التحدث.","url_message":"احصل على VoxVera وابدأ بنشر رسالتك."}}},"de":{"meta":{"language_name":"Deutsch","flag":"🇩🇪"},"cli":{"dep_check_header":"Abhängigkeitsprüfung","dep_found":"gefunden","dep_missing":"fehlt","all_deps_installed":"Alle Abhängigkeiten sind installiert.","missing_deps_error":"Einige Abhängigkeiten fehlen. Führen Sie aus: pip install 'voxvera[all]'","init_name":"Name","init_folder":"Ordnername","init_title":"Titel","init_subtitle":"Untertitel","init_headline":"Schlagzeile","init_body":"Haupttext","init_links":"Links","edit_again":"Erneut bearbeiten?","body_length":"Textlänge","body_limit_exceeded":"überschreitet das Limit","url_label":"URL (Inhaltslink - externe Ressource)","url_message_label":"URL-Nachricht","footer_message_label":"Fußzeilen-Nachricht","template_not_found":"Vorlage {name} nicht gefunden","template_copied":"Vorlage nach {dest} kopiert","flyer_created":"Flyer-Dateien erstellt unter {dest}","dir_not_found":"Verzeichnis {dir_path} nicht gefunden","onionshare_error":"OnionShare für {folder_name} wurde unerwartet beendet.","onionshare_causes":"Häufige Ursachen: Netzwerk blockiert, ungenaue Systemzeit oder OnionShare läuft bereits.","onionshare_logs_tip":"Vollständige Protokolle finden Sie unter {logfile}.","onion_url_msg":"[{folder_name}] Onion-URL: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare läuft (PID {pid}).","export_not_found":"Fehler: Website-Ordner '{folder_name}' nicht gefunden in {host_root}","export_success":"'{folder_name}' nach {output_path} exportiert","export_all_none":"Keine Websites zum Exportieren gefunden.","export_all_starting":"Exportiere {count} Websites nach {dir}...","export_all_complete":"Gesamtexport abgeschlossen.","import_zip_not_found":"Fehler: Zip-Datei '{path}' nicht gefunden.","import_invalid_config":"Fehler: Ungültige Exportdatei. 'config.json' fehlt.","import_invalid_folder":"Fehler: Ungültige 'config.json'. 'folder_name' fehlt.","import_overwrite_confirm":"Website '{folder_name}' existiert bereits. Überschreiben?","import_cancelled":"Import abgebrochen.","import_success":"'{folder_name}' erfolgreich nach {dest_dir} importiert","import_dir_not_found":"Fehler: Verzeichnis '{dir}' nicht gefunden.","import_multiple_none":"Keine Zip-Dateien in {dir} gefunden","import_multiple_found":"{count} Website(s) zum Importieren aus {dir} gefunden...","importing_file":"Importiere {name}...","import_multiple_complete":"Mehrfachimport abgeschlossen.","batch_import_none":"Keine JSON-Dateien in 'imports' gefunden","batch_import_processing":"Verarbeite {file}","stop_server_not_running":"Server {folder_name} läuft nicht.","stop_server_success":"{folder_name} gestoppt (PID {pid})","delete_server_success":"Server {folder_name} gelöscht","manage_select_server":"Wählen Sie einen Server zum Verwalten (oder Beenden):","manage_create_new":"--- Neue Website/Flyer erstellen ---","manage_start_all":"--- Alle Websites starten ---","manage_stop_all":"--- Alle Websites stoppen ---","manage_export_all":"--- Alle Websites exportieren ---","manage_import_multiple":"--- Mehrere Websites importieren ---","manage_exit":"Beenden","manage_startup_summary":"Start-Zusammenfassung","manage_press_enter":"Drücken Sie die Eingabetaste zum Fortfahren","manage_action_menu":"{name} verwalten:","manage_action_toggle_stop":"Stopp","manage_action_toggle_start":"Start","manage_action_export":"Als Zip exportieren","manage_action_delete":"Löschen","manage_action_back":"Zurück","manage_delete_confirm":"Sind Sie sicher, dass Sie {name} löschen möchten?","bootstrapping_msg":"[{name}] Verbindung zu Tor-Relays herstellen und Hidden Service einrichten...","bootstrapping_progress":"[{name}] Tor-Bootstrapping: {progress}% ...","no_urls_qr_skip":"Noch keine URLs konfiguriert. QR-Codes werden nach 'voxvera serve' generiert","input_file_not_found":"Eingabedatei {path} existiert nicht.","attachment_path_label":"Pfad zur Anhangsdatei (optional - wird über die Tor-Seite bereitgestellt)","manage_action_edit":"Bearbeiten","manage_templates":"--- Aus Vorlage erstellen ---","template_select":"Wählen Sie eine Vorlage:","body_over_limit_warning":"Warnung: Der Textkörper überschreitet 1000 Zeichen. Er könnte auf dem Flyer abgeschnitten werden.","manage_action_export_keys":"Schlüssel exportieren","manage_action_import_keys":"Schlüssel importieren","keys_not_found":"Kein Sitzungsschlüssel für '{name}' gefunden. Starten Sie die Seite zuerst, um Schlüssel zu generieren.","keys_export_header":"Sitzungsschlüssel für '{name}':","keys_export_hint":"Kopieren Sie diesen Schlüssel und bewahren Sie ihn sicher auf. Verwenden Sie 'Schlüssel importieren' auf einer anderen Instanz zur Wiederherstellung.","keys_site_not_found":"Seite '{name}' nicht gefunden.","keys_overwrite_confirm":"Seite '{name}' hat bereits einen Schlüssel. Überschreiben?","keys_import_cancelled":"Import abgebrochen.","keys_import_prompt":"Fügen Sie den base64-Sitzungsschlüssel unten ein:","keys_import_empty":"Kein Schlüssel angegeben.","keys_import_invalid":"Ungültiges Schlüsselformat. Muss eine gültige base64-Zeichenkette sein.","keys_import_success":"Sitzungsschlüssel für '{name}' importiert. Starten Sie die Seite neu, um den neuen Schlüssel zu verwenden."},"web":{"tear_off_tor_browser":"Tor-Browser verwenden","tear_off_desc":"um diese Nachricht zu verbreiten, gehen Sie zu","tear_off_footer":"Klicken Sie auf die Schaltfläche unten zum Drucken","built_with":"erstellt mit","print_button":"Flyer drucken","download_button":"Tool & Quellcode herunterladen","download_attachment":"Anhang herunterladen"},"landing":{"title":"STRENG GEHEIM","subtitle":"~~NICHT~~ VERBREITEN","headline":"OPERATION VOX VERA","content":"Befreien Sie sich von Zensur mit VoxVera. Ein anonymes Guerilla-Marketing- und Nachrichtenverbreitungs-Tool. Ob online oder in der physischen Welt, es befähigt Sie, Ihre Ideen mutig zu verbreiten, geschützt durch vollständige Anonymität (wenn Sie über Tor hosten). Laden Sie den Code herunter, entwerfen Sie eine Flyer-Website, hosten Sie diese online und verstärken Sie Ihre Botschaft.

Nutzen Sie memetische Kraft, um Ihre Ideen in Ihrer Schule, an Ihrem Arbeitsplatz, in Online-Communities oder sogar weltweit zu teilen. VoxVera stellt sicher, dass Ihre Botschaft weit und breit Resonanz findet, mit Abreißabschnitten, die über einzigartige URLs und QR-Codes für einen einfachen Nachdruck verfügen.

Privatsphäre kann gewahrt bleiben. Flyer können über das Tor-Network geteilt werden, was Hoster und Nutzer vor Zensur schützt.

Schließen Sie sich uns in einer Revolution an, die Wahrheit und Transparenz schätzt. Gemeinsam können wir ein Netzwerk informierter Bürger aufbauen, die keine Angst haben, ihre Meinung zu sagen.","url_message":"Holen Sie sich VoxVera und beginnen Sie, Ihre Nachricht zu verbreiten.","name":"Vox Vera Druckflyer"},"templates":{"aosp":{"name":"AOS-Projekt","title":"ANDROID ENTFESSELT","subtitle":"OHNE GRENZEN","headline":"OPEN-SOURCE-FREIHEIT","content":"Das Android Open Source Project (AOSP) verkörpert das, wofür Android ursprünglich gedacht war: eine offene, transparente und anpassungsfähige Plattform. Es entfernt die Schichten proprietärer Software und unternehmerischer Kontrolle, die zum Synonym für gängige Android-Distributionen geworden sind. Mit AOSP erhalten Sie Zugang zu einer rohen, ungefilterten Version von Android, die es Ihnen ermöglicht, Ihr Gerät wirklich zu Ihrem eigenen zu machen.

Für Entwickler bietet AOSP einen Spielplatz der Möglichkeiten, wo die einzigen Grenzen Ihre Fähigkeiten und Vorstellungskraft sind. Es dient als Grundlage für unzählige Custom ROMs, die jeweils auf spezifische Bedürfnisse zugeschnitten sind, sei es für verbesserte Leistung, Privatsphäre oder einzigartige Funktionen, die Mainstream-Versionen fehlen. Datenschutz-Enthusiasten werden das Fehlen vorinstallierter Bloatware und Tracking-Dienste schätzen, die oft mit Standard-Android geliefert werden.

AOSP ist nicht nur für Entwickler oder Technik-Enthusiasten; es ist für jeden, der digitale Freiheit schätzt. Es ermöglicht Ihnen, die Kontrolle über Ihr Gerät zurückzugewinnen und es ohne die Einschränkungen von Anbietern oder Herstellern an Ihre Bedürfnisse anzupassen. Entdecken Sie, wie AOSP Ihre mobile Erfahrung transformieren kann. Beginnen Sie noch heute Ihre Reise in eine offenere, anpassbare Zukunft.","url_message":"Besuchen Sie den untenstehenden Link, um mehr zu erfahren."},"bitcoin":{"name":"Bitcoin-Revolutions-Flyer","title":"REGELN OHNE HERRSCHER","subtitle":"NICHT IGNORIEREN","headline":"SCHLIESSEN SIE SICH DER BITCOIN-REVOLUTION AN","content":"Was ist Bitcoin? Es ist mehr als nur digitales Geld; es ist eine revolutionäre Technologie, die entwickelt wurde, um einige der drängendsten Probleme der Welt zu lösen. Bitcoin operiert auf einem dezentralen Netzwerk, frei von der Kontrolle jeder Regierung oder Zentralbehörde. Dies stellt sicher, dass niemand sein Angebot oder seinen Wert manipulieren kann, was es zu einer soliden Geldform macht, die Ihr Vermögen vor Inflation schützt.

Unser aktuelles Finanzsystem basiert auf fehlerhaften Anreizen—es fördert Verschuldung, Abhängigkeit und Zentralisierung der Macht. Bitcoin ändert das, indem es ein System schafft, in dem Ehrlichkeit, Transparenz und individuelle Verantwortung belohnt werden. Im Bitcoin-Netzwerk gibt es keinen Raum für Korruption oder Manipulation, weil die Regeln von Mathematik durchgesetzt werden, nicht von Menschen.

Bitcoin richtet Anreize so aus, dass langfristiges Denken, Sparen und Innovation gefördert werden. Es befähigt Einzelpersonen, die Kontrolle über ihre finanzielle Zukunft zu übernehmen, und fördert eine globale Gemeinschaft, in der Werte frei und sicher ohne Vermittler übertragen werden können. Deshalb brauchen wir Bitcoin—weil es eine Welt schafft, in der Anreize richtig ausgerichtet sind und zu einer gerechteren und wohlhabenderen Gesellschaft für alle führen.

Machen Sie den Schritt, mehr über Bitcoin zu erfahren und wie es nicht nur Ihr finanzielles Leben, sondern die Welt verändern kann. Reißen Sie einen Link links ab und erkunden Sie diese bahnbrechende Technologie. Schließen Sie sich der Bewegung für eine bessere Zukunft an.","url_message":"Folgen Sie diesem Link, um mehr zu erfahren."},"jesus":{"name":"Lebensverändernde Botschaft","title":"GUTE NACHRICHT","subtitle":"NICHT IGNORIEREN","headline":"ENTDECKE WAHRE HOFFNUNG","content":"Wer ist Jesus? Er ist mehr als nur eine historische Figur; Er ist der Sohn Gottes, der Retter der Welt. Jesus selbst sagte: 'Ich bin der Weg und die Wahrheit und das Leben. Niemand kommt zum Vater außer durch mich' (Johannes 14,6). Er kam, um die Kluft zwischen Gott und der Menschheit zu überbrücken und uns einen Weg zur Vergebung, zum Frieden und zum ewigen Leben zu bieten.

Wir alle stehen vor Brüchen in unserem Leben—sei es in unseren Beziehungen, unseren Herzen oder unserer Welt. Jesus kam, um diese Brüche zu heilen. Er lebte ein vollkommenes Leben, starb am Kreuz für unsere Sünden und ist auferstanden, hat den Tod besiegt und uns die Hoffnung auf ewiges Leben mit Gott geschenkt.

Ohne Jesus sind wir in unserer Sünde verloren, von Gott getrennt. Aber durch Ihn können wir vergeben und wiederhergestellt werden. Er bietet uns nicht nur ein besseres Leben jetzt, sondern das Versprechen eines ewigen Lebens mit Ihm. Deshalb brauchen wir Ihn—denn nur in Jesus können wir wahren Frieden, Sinn und die Gewissheit des ewigen Lebens finden.

Machen Sie den Schritt, mehr über Jesus und den lebensverändernden Einfluss zu erfahren, den Er auf Ihr Leben haben kann. Reißen Sie einen Link links ab und erkunden Sie Seine Lehren. Finden Sie die Hoffnung, nach der Sie gesucht haben.","url_message":"Folgen Sie diesem Link, um mehr zu erfahren."},"meshtastic":{"name":"Meshtastic-Netzwerk-Flyer","title":"SICHERE KOMMUNIKATION","subtitle":"NICHT IGNORIEREN","headline":"BAUEN SIE IHR NOTFALLNETZWERK AUF","content":"Warum Meshtastic? In Krisenzeiten können traditionelle Kommunikationsnetzwerke versagen und uns isoliert und verwundbar zurücklassen. Meshtastic bietet eine leistungsstarke Lösung—ein alternatives lokales Kommunikationsnetzwerk, das unabhängig von zentralisierten Systemen arbeitet. Es ist für Notfallsituationen konzipiert und ermöglicht es Ihnen, verbunden zu bleiben, wenn es am wichtigsten ist.

Meshtastic-Geräte erstellen ein Mesh-Netzwerk, das Nachrichten über große Entfernungen weiterleiten kann, auch ohne Internet- oder Mobilfunkabdeckung. Dieser dezentrale Ansatz stellt sicher, dass Ihre Kommunikation unter allen Umständen belastbar und zuverlässig ist. Aber es geht nicht nur darum, verbunden zu bleiben—Meshtastic bietet auch Verschlüsselung, sodass Ihre Nachrichten sicher und privat bleiben.

In einer Welt, in der die Privatsphäre zunehmend gefährdet ist, ermöglicht Ihnen Meshtastic, die Kontrolle über Ihre Kommunikation zu übernehmen. Ob Sie eine lokale Gemeinschaftsreaktion koordinieren, während einer Katastrophe mit Ihren Lieben in Kontakt bleiben oder sich einfach auf das Unerwartete vorbereiten—Meshtastic bietet die Werkzeuge, die Sie für eine sichere und effektive Kommunikation benötigen.

Machen Sie den Schritt, mehr über Meshtastic zu erfahren und wie Sie Ihr eigenes Notfall-Kommunikationsnetzwerk aufbauen können. Reißen Sie einen Link links ab und erkunden Sie diese innovative Technologie. Stellen Sie sicher, dass Sie auf alles vorbereitet sind.","url_message":"Folgen Sie diesem Link, um mehr zu erfahren."},"nostr":{"name":"Nostr-Protokoll-Flyer","title":"SOZIALE FREIHEIT","subtitle":"NICHT IGNORIEREN","headline":"TRETEN SIE DEM ZENSURRESISTENTEN NETZWERK BEI","content":"Was ist Nostr? Anders als herkömmliche Social-Media-Plattformen ist Nostr ein Protokoll—ein dezentrales System, das Benutzern ermöglicht, sich zu verbinden und zu teilen, ohne die Einschränkungen einer zentralen Autorität. Nostr ist zensurresistent, was bedeutet, dass Ihre Stimme nicht von Unternehmen oder Regierungen zum Schweigen gebracht werden kann. Es wurde entwickelt, um Ihnen die Kontrolle über Ihre Online-Präsenz zu geben, frei vom Einfluss von Algorithmen oder Werbung, die Engagement über bedeutsame Verbindungen stellen.

Auf Nostr gibt es keine verborgenen Agenden, die Sie zum endlosen Scrollen verleiten. Sie interagieren mit Inhalten zu Ihren Bedingungen, nicht basierend auf dem, was ein Algorithmus glaubt, Sie am längsten online zu halten. Nostr ermöglicht es Ihnen, echte Verbindungen aufzubauen und an Gesprächen teilzunehmen, die wichtig sind, und dabei Ihre Privatsphäre und Autonomie zu wahren.

In einer Welt, in der die Online-Meinungsfreiheit zunehmend kontrolliert und manipuliert wird, bietet Nostr eine erfrischende Alternative. Es ist nicht nur eine Plattform; es ist eine Bewegung hin zu wahrer digitaler Freiheit, bei der Ihre Interaktionen von Ihren Interessen und Werten bestimmt werden, nicht von dem, was die meisten Werbeeinnahmen generiert.

Machen Sie den Schritt, mehr über Nostr zu erfahren und wie es die Art und Weise, wie Sie sich online verbinden, verändern kann. Reißen Sie einen Link links ab und erkunden Sie dieses bahnbrechende Protokoll. Schließen Sie sich einer Gemeinschaft an, die Freiheit und authentische Interaktion schätzt.","url_message":"Folgen Sie diesem Link, um mehr zu erfahren."},"voxvera":{"name":"Vox Vera Druckflyer","title":"STRENG GEHEIM","subtitle":"~~NICHT~~ VERBREITEN","headline":"OPERATION VOX VERA","content":"Befreien Sie sich von Zensur mit VoxVera. Ein anonymes Guerilla-Marketing- und Nachrichtenverbreitungs-Tool. Ob online oder in der physischen Welt, es befähigt Sie, Ihre Ideen mutig zu verbreiten, geschützt durch vollständige Anonymität (wenn Sie über Tor hosten). Laden Sie den Code herunter, entwerfen Sie eine Flyer-Website, hosten Sie diese online und verstärken Sie Ihre Botschaft.

Nutzen Sie memetische Kraft, um Ihre Ideen in Ihrer Schule, an Ihrem Arbeitsplatz, in Online-Communities oder sogar weltweit zu teilen. VoxVera stellt sicher, dass Ihre Botschaft weit und breit Resonanz findet, mit Abreißabschnitten, die über einzigartige URLs und QR-Codes für einen einfachen Nachdruck verfügen.

Privatsphäre kann gewahrt bleiben. Flyer können über das Tor-Netzwerk geteilt werden, was Hoster und Nutzer vor Zensur schützt.

Schließen Sie sich uns in einer Revolution an, die Wahrheit und Transparenz schätzt. Gemeinsam können wir ein Netzwerk informierter Bürger aufbauen, die keine Angst haben, ihre Meinung zu sagen.","url_message":"Holen Sie sich VoxVera und beginnen Sie, Ihre Nachricht zu verbreiten."}}},"en":{"meta":{"language_name":"English","flag":"🇺🇸"},"cli":{"dep_check_header":"Dependency Check","dep_found":"found","dep_missing":"missing","all_deps_installed":"All dependencies are installed.","missing_deps_error":"Some dependencies are missing. Run: pip install 'voxvera[all]'","init_name":"Name","init_folder":"Folder Name","init_title":"Title","init_subtitle":"Subtitle","init_headline":"Headline","init_body":"Body text","init_links":"Links","edit_again":"Edit again?","body_length":"Body length","body_limit_exceeded":"exceeds limit","url_label":"URL (content link - external resource)","url_message_label":"URL message","footer_message_label":"Footer message","attachment_path_label":"Attachment file path (optional - will be served from Tor site)","template_not_found":"Template {name} not found","template_copied":"Template copied to {dest}","flyer_created":"Flyer files created under {dest}","dir_not_found":"Directory {dir_path} not found","onionshare_error":"OnionShare for {folder_name} exited unexpectedly.","onionshare_causes":"Common causes: Network blocked, inaccurate system clock, or OnionShare already running.","onionshare_logs_tip":"See {logfile} for full logs.","onion_url_msg":"[{folder_name}] Onion URL: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare running (PID {pid}).","export_not_found":"Error: Site folder '{folder_name}' not found in {host_root}","export_success":"Exported '{folder_name}' to {output_path}","export_all_none":"No sites found to export.","export_all_starting":"Exporting {count} sites to {dir}...","export_all_complete":"Export all complete.","import_zip_not_found":"Error: Zip file '{path}' not found.","import_invalid_config":"Error: Invalid export file. Missing 'config.json'.","import_invalid_folder":"Error: Invalid config.json. Missing 'folder_name'.","import_overwrite_confirm":"Site '{folder_name}' already exists. Overwrite?","import_cancelled":"Import cancelled.","import_success":"Successfully imported '{folder_name}' to {dest_dir}","import_dir_not_found":"Error: Directory '{dir}' not found.","import_multiple_none":"No zip files found in {dir}","import_multiple_found":"Found {count} site(s) to import from {dir}...","importing_file":"Importing {name}...","import_multiple_complete":"Import multiple complete.","batch_import_none":"No JSON files found in imports","batch_import_processing":"Processing {file}","stop_server_not_running":"Server {folder_name} is not running.","stop_server_success":"Stopped {folder_name} (PID {pid})","delete_server_success":"Deleted server {folder_name}","manage_select_server":"Select a server to manage (or Exit):","manage_create_new":"--- Create New Site/Flyer ---","manage_start_all":"--- Start All Sites ---","manage_stop_all":"--- Stop All Sites ---","manage_export_all":"--- Export All Sites ---","manage_import_multiple":"--- Import Multiple Sites ---","manage_exit":"Exit","manage_startup_summary":"Startup Summary","manage_press_enter":"Press Enter to continue","manage_action_menu":"Manage {name}:","manage_action_toggle_stop":"Stop","manage_action_toggle_start":"Start","manage_action_edit":"Edit","manage_action_export":"Export to Zip","manage_action_delete":"Delete","manage_action_back":"Back","manage_delete_confirm":"Are you sure you want to delete {name}?","bootstrapping_msg":"[{name}] Connecting to Tor relays and setting up hidden service...","bootstrapping_progress":"[{name}] Tor Bootstrapping: {progress}% ...","no_urls_qr_skip":"No URLs configured yet. QR codes will be generated after 'voxvera serve'","input_file_not_found":"Input file {path} does not exist.","manage_templates":"--- Create From Template ---","template_select":"Select a template:","body_over_limit_warning":"Warning: Body text exceeds 1000 characters. It may be cut off on the flyer.","manage_action_export_keys":"Export Keys","manage_action_import_keys":"Import Keys","keys_not_found":"No session key found for '{name}'. Start the site first to generate keys.","keys_export_header":"Session key for '{name}':","keys_export_hint":"Copy this key and save it securely. Use 'Import Keys' on another instance to restore.","keys_site_not_found":"Site '{name}' not found.","keys_overwrite_confirm":"Site '{name}' already has a key. Overwrite?","keys_import_cancelled":"Import cancelled.","keys_import_prompt":"Paste the base64 session key below:","keys_import_empty":"No key provided.","keys_import_invalid":"Invalid key format. Must be a valid base64 string.","keys_import_success":"Session key imported for '{name}'. Restart the site to use the new key."},"web":{"tear_off_tor_browser":"Use Tor Browser","tear_off_desc":"to help spread this message go to","tear_off_footer":"click the button below to print","built_with":"built with","print_button":"Print this page","download_button":"Download Source Code","download_attachment":"Download Attachment"},"landing":{"title":"TOP SECRET","subtitle":"DO ~~NOT~~ DISTRIBUTE","headline":"OPERATION VOX VERA","content":"Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.","url_message":"Get VoxVera and start spreading your message.","name":"Vox Vera Printable Flyers"},"templates":{"aosp":{"name":"AOS Project","title":"ANDROID UNLEASHED","subtitle":"WITHOUT BOUNDARIES","headline":"OPEN-SOURCE FREEDOM","content":"The Android Open Source Project (AOSP) represents the essence of what Android was originally intended to be: an open, transparent, and adaptable platform. It strips away the layers of proprietary software and corporate oversight that have become synonymous with mainstream Android distributions. With AOSP, you gain access to a raw, unfiltered version of Android, allowing you to truly make your device your own.

For developers, AOSP offers a playground of possibilities, where the only limits are your skills and imagination. It serves as the foundation for countless custom ROMs, each tailored to specific needs, whether for enhanced performance, privacy, or unique features that mainstream versions lack. Privacy enthusiasts will appreciate the absence of pre-installed bloatware and tracking services that often come wit stock Android, providing a cleaner, more secure user experience.

AOSP isn't just for developers or tech enthusiasts; it's for anyone who values digital freedom. It allows you to reclaim control over your device, tailoring it to your needs without the restrictions of carriers or manufacturers. Discover how AOSP can transform your mobile experience. Start your journey towards a more open, customizable future today.","url_message":"Visit the link below to learn more."},"bitcoin":{"name":"Bitcoin Revolution Flyers","title":"RULES WITHOUT RULERS","subtitle":"DO NOT IGNORE","headline":"JOIN THE BITCOIN REVOLUTION","content":"What is Bitcoin? It's more than just digital money; it's a revolutionary technology designed to fix some of the world's most pressing problems. Bitcoin operates on a decentralized network, free from the control of any government or central authority. This ensures that no one can manipulate its supply or value, making it a sound form of money that protects your wealth from inflation.

Our current financial system is built on flawed incentives—encouraging debt, dependency, and centralization of power. Bitcoin changes that by creating a system where honesty, transparency, and individual responsibility are rewarded. In the Bitcoin network, there is no room for corruption or manipulation because the rules are enforced by mathematics, not by people.

Bitcoin aligns incentives in a way that promotes long-term thinking, savings, and innovation. It empowers individuals to take control of their financial future, fostering a global community where value can be transferred freely and securely without intermediaries. This is why we need Bitcoin—because it creates a world where incentives are properly aligned, leading to a more fair and prosperous society for all.

Take the step to learn more about Bitcoin and how it can transform not just your financial life, but the world. Tear off a link to the left and explore this groundbreaking technology. Join the movement towards a better future.","url_message":"Follow this link to learn more."},"jesus":{"name":"Life Changing Message","title":"GOOD NEWS","subtitle":"DO NOT IGNORE","headline":"DISCOVER TRUE HOPE","content":"Who is Jesus? He is more than just a historical figure; He is the Son of God, the Savior of the world. Jesus Himself said, 'I am the way, the truth, and the life. No one comes to the Father except through Me' (John 14:6). He came to bridge the gap between God and humanity, offering us a path to forgiveness, peace, and eternal life.

We all face brokenness in our lives—whether it's in our relationships, our hearts, or our world. Jesus came to heal that brokenness. He lived a perfect life, died on the cross for our sins, and rose again, defeating death and offering us the hope of eternal life with God.

Without Jesus, we are lost in our sin, separated from God. But through Him, we can be forgiven and restored. He offers us not just a better life now, but the promise of an eternal life with Him. This is why we need Him—because only in Jesus can we find true peace, purpose, and the assurance of eternal life.

Take the step to learn more about Jesus and the life-changing impact He can have on your life. Tear off a link to the left and explore His teachings. Find the hope you've been searching for.","url_message":"Follow this link to learn more."},"meshtastic":{"name":"Meshtastic Network Flyers","title":"SECURE COMMUNICATIONS","subtitle":"DO NOT IGNORE","headline":"BUILD YOUR EMERGENCY NETWORK","content":"Why Meshtastic? In times of crisis, traditional communication networks can fail, leaving us isolated and vulnerable. Meshtastic provides a powerful solution—an alternative local communication network that operates independently of centralized systems. It’s designed for emergency situations, allowing you to stay connected when it matters most.

Meshtastic devices create a mesh network that can relay messages over long distances, even without internet or cellular coverage. This decentralized approach ensures that your communications are resilient and reliable, no matter the circumstances. But it’s not just about staying connected—Meshtastic also offers encryption, so your messages remain secure and private.

In a world where privacy is increasingly compromised, Meshtastic empowers you to take control of your communication. Whether you’re coordinating a local community response, staying in touch with loved ones during a disaster, or simply preparing for the unexpected, Meshtastic provides the tools you need to communicate securely and effectively.

Take the step to learn more about Meshtastic and how you can build your own emergency communication network. Tear off a link to the left and explore this innovative technology. Ensure you’re prepared for whatever comes your way.","url_message":"Follow this link to learn more."},"nostr":{"name":"Nostr Protocol Flyers","title":"SOCIAL FREEDOM","subtitle":"DO NOT IGNORE","headline":"JOIN THE CENSORSHIP-RESISTANT NETWORK","content":"What is Nostr? Unlike traditional social media platforms, Nostr is a protocol—a decentralized system that empowers users to connect and share without the constraints of a central authority. Nostr is censorship-resistant, meaning your voice can’t be silenced by corporations or governments. It’s designed to give you control over your online presence, free from the influence of algorithms or ads that prioritize engagement over meaningful connections.

On Nostr, there are no hidden agendas to keep you doomscrolling. You engage with content on your terms, not based on what an algorithm thinks will keep you online the longest. Nostr allows you to build genuine connections and participate in conversations that matter, all while maintaining your privacy and autonomy.

In a world where online speech is increasingly controlled and manipulated, Nostr offers a refreshing alternative. It’s not just a platform; it’s a movement towards true digital freedom, where your interactions are driven by your interests and values, not by what generates the most ad revenue.

Take the step to learn more about Nostr and how it can transform the way you connect online. Tear off a link the left and explore this groundbreaking protocol. Join a community that values freedom and authentic interaction.","url_message":"Follow this link to learn more."},"voxvera":{"name":"Vox Vera Printable Flyers","title":"TOP SECRET","subtitle":"DO ~~NOT~~ DISTRIBUTE","headline":"OPERATION VOX VERA","content":"Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.","url_message":"Follow this link to learn more."}}},"es":{"meta":{"language_name":"Español","flag":"🇪🇸"},"cli":{"dep_check_header":"Comprobación de Dependencias","dep_found":"encontrado","dep_missing":"faltante","all_deps_installed":"Todas las dependencias están instaladas.","missing_deps_error":"Faltan algunas dependencias. Ejecute: pip install 'voxvera[all]'","init_name":"Nombre","init_folder":"Nombre de la Carpeta","init_title":"Título","init_subtitle":"Subtítulo","init_headline":"Titular","init_body":"Texto del cuerpo","init_links":"Enlaces","edit_again":"¿Editar de nuevo?","body_length":"Longitud del cuerpo","body_limit_exceeded":"excede el límite","url_label":"URL (enlace de contenido - recurso externo)","url_message_label":"Mensaje de la URL","footer_message_label":"Mensaje de pie de página","template_not_found":"Plantilla {name} no encontrada","template_copied":"Plantilla copiada a {dest}","flyer_created":"Archivos del volante creados en {dest}","dir_not_found":"Directorio {dir_path} no encontrado","onionshare_error":"OnionShare para {folder_name} salió inesperadamente.","onionshare_causes":"Causas comunes: Red bloqueada, reloj del sistema inexacto o OnionShare ya en ejecución.","onionshare_logs_tip":"Consulte {logfile} para ver los registros completos.","onion_url_msg":"[{folder_name}] URL Onion: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare en ejecución (PID {pid}).","export_not_found":"Error: Carpeta del sitio '{folder_name}' no encontrada en {host_root}","export_success":"Exportado '{folder_name}' a {output_path}","export_all_none":"No se encontraron sitios para exportar.","export_all_starting":"Exportando {count} sitios a {dir}...","export_all_complete":"Exportación total completada.","import_zip_not_found":"Error: Archivo Zip '{path}' no encontrado.","import_invalid_config":"Error: Archivo de exportación inválido. Falta 'config.json'.","import_invalid_folder":"Error: config.json inválido. Falta 'folder_name'.","import_overwrite_confirm":"El sitio '{folder_name}' ya existe. ¿Sobrescribir?","import_cancelled":"Importación cancelada.","import_success":"Importado con éxito '{folder_name}' a {dest_dir}","import_dir_not_found":"Error: Directorio '{dir}' no encontrado.","import_multiple_none":"No se encontraron archivos zip en {dir}","import_multiple_found":"Se encontraron {count} sitio(s) para importar de {dir}...","importing_file":"Importando {name}...","import_multiple_complete":"Importación múltiple completada.","batch_import_none":"No se encontraron archivos JSON en imports","batch_import_processing":"Procesando {file}","stop_server_not_running":"El servidor {folder_name} no está en ejecución.","stop_server_success":"Detenido {folder_name} (PID {pid})","delete_server_success":"Servidor {folder_name} eliminado","manage_select_server":"Seleccione un servidor para gestionar (o Salir):","manage_create_new":"--- Crear Nuevo Sitio/Volante ---","manage_start_all":"--- Iniciar Todos los Sitios ---","manage_stop_all":"--- Detener Todos los Sitios ---","manage_export_all":"--- Exportar Todos los Sitios ---","manage_import_multiple":"--- Importar Múltiples Sitios ---","manage_exit":"Salir","manage_startup_summary":"Resumen de Inicio","manage_press_enter":"Presione Enter para continuar","manage_action_menu":"Gestionar {name}:","manage_action_toggle_stop":"Detener","manage_action_toggle_start":"Iniciar","manage_action_export":"Exportar a Zip","manage_action_delete":"Eliminar","manage_action_back":"Volver","manage_delete_confirm":"¿Está seguro de que desea eliminar {name}?","bootstrapping_msg":"[{name}] Conectando a repetidores Tor y configurando servicio oculto...","bootstrapping_progress":"[{name}] Arranque de Tor: {progress}% ...","no_urls_qr_skip":"No hay URLs configuradas todavía. Los códigos QR se generarán después de 'voxvera serve'","input_file_not_found":"El archivo de entrada {path} no existe.","attachment_path_label":"Ruta del archivo adjunto (opcional - se servirá desde el sitio Tor)","manage_action_edit":"Editar","manage_templates":"--- Crear Desde Plantilla ---","template_select":"Seleccione una plantilla:","body_over_limit_warning":"Advertencia: El texto del cuerpo supera los 1000 caracteres. Puede cortarse en el volante.","manage_action_export_keys":"Exportar Claves","manage_action_import_keys":"Importar Claves","keys_not_found":"No se encontró clave de sesión para '{name}'. Inicie el sitio primero para generar claves.","keys_export_header":"Clave de sesión para '{name}':","keys_export_hint":"Copie esta clave y guárdela de forma segura. Use 'Importar Claves' en otra instancia para restaurar.","keys_site_not_found":"Sitio '{name}' no encontrado.","keys_overwrite_confirm":"El sitio '{name}' ya tiene una clave. ¿Sobrescribir?","keys_import_cancelled":"Importación cancelada.","keys_import_prompt":"Pegue la clave de sesión base64 a continuación:","keys_import_empty":"No se proporcionó clave.","keys_import_invalid":"Formato de clave no válido. Debe ser una cadena base64 válida.","keys_import_success":"Clave de sesión importada para '{name}'. Reinicie el sitio para usar la nueva clave."},"web":{"tear_off_tor_browser":"Use el Navegador Tor","tear_off_desc":"para ayudar a difundir este mensaje vaya a","tear_off_footer":"haga clic en el botón de abajo para imprimir","built_with":"construido con","print_button":"Imprimir volante","download_button":"Descargar Herramienta y Código","download_attachment":"Descargar archivo adjunto"},"landing":{"title":"ALTO SECRETO","subtitle":"~~NO~~ DISTRIBUIR","headline":"OPERACIÓN VOX VERA","content":"Libérese de la censura con VoxVera. Una herramienta anónima de marketing de guerrilla y difusión de mensajes. Ya sea en línea o en el mundo físico, puede empoderarlo para difundir sus ideas con audacia, protegido por un anonimato completo (si hospeda a través de Tor). Descargue el código, diseñe un sitio de volantes, hospédelo en línea y amplifique su mensaje.

Use el poder memético para compartir sus ideas en su escuela, lugar de trabajo, comunidades en línea o incluso globalmente. VoxVera asegura que su mensaje resuene a lo largo und ancho, con secciones desprendibles que cuentan con URLs y códigos QR únicos para una fácil reimpresión.

La privacidad puede mantenerse. Los volantes se pueden compartir a través de la red Tor, protegiendo al anfitrión y a los usuarios de la censura.

Únase a nosotros en una revolución que valora la verdad y la transparencia. Juntos, podemos construir una red de ciudadanos informados que no temen hablar.","url_message":"Obtenga VoxVera y comience a difundir su mensaje.","name":"Volantes Imprimibles Vox Vera"},"templates":{"aosp":{"name":"Proyecto AOS","title":"ANDROID LIBERADO","subtitle":"SIN LÍMITES","headline":"LIBERTAD DE CÓDIGO ABIERTO","content":"El Proyecto de Código Abierto de Android (AOSP) representa la esencia de lo que Android fue originalmente concebido: una plataforma abierta, transparente y adaptable. Elimina las capas de software propietario y supervisión corporativa que se han vuelto sinónimos de las distribuciones convencionales de Android. Con AOSP, obtiene acceso a una versión sin filtros de Android, permitiéndole hacer verdaderamente suyo su dispositivo.

Para los desarrolladores, AOSP ofrece un campo de posibilidades, donde los únicos límites son sus habilidades e imaginación. Sirve como base para innumerables ROMs personalizadas, cada una adaptada a necesidades específicas, ya sea para un rendimiento mejorado, privacidad o características únicas que las versiones convencionales carecen. Los entusiastas de la privacidad apreciarán la ausencia de bloatware preinstalado y servicios de rastreo que a menudo vienen con Android de fábrica.

AOSP no es solo para desarrolladores o entusiastas de la tecnología; es para cualquiera que valore la libertad digital. Le permite recuperar el control de su dispositivo, adaptándolo a sus necesidades sin las restricciones de operadores o fabricantes. Descubra cómo AOSP puede transformar su experiencia móvil. Comience su viaje hacia un futuro más abierto y personalizable hoy.","url_message":"Visite el enlace a continuación para obtener más información."},"bitcoin":{"name":"Volantes de la Revolución Bitcoin","title":"REGLAS SIN GOBERNANTES","subtitle":"NO IGNORAR","headline":"ÚNETE A LA REVOLUCIÓN BITCOIN","content":"¿Qué es Bitcoin? Es más que dinero digital; es una tecnología revolucionaria diseñada para solucionar algunos de los problemas más urgentes del mundo. Bitcoin opera en una red descentralizada, libre del control de cualquier gobierno o autoridad central. Esto asegura que nadie pueda manipular su oferta o valor, convirtiéndolo en una forma sólida de dinero que protege su riqueza de la inflación.

Nuestro sistema financiero actual está construido sobre incentivos defectuosos—fomentando la deuda, la dependencia y la centralización del poder. Bitcoin cambia eso creando un sistema donde la honestidad, la transparencia y la responsabilidad individual son recompensadas. En la red Bitcoin, no hay espacio para la corrupción o manipulación porque las reglas son aplicadas por las matemáticas, no por las personas.

Bitcoin alinea incentivos de una manera que promueve el pensamiento a largo plazo, el ahorro y la innovación. Empodera a los individuos para tomar control de su futuro financiero, fomentando una comunidad global donde el valor puede transferirse libre y seguramente sin intermediarios. Por eso necesitamos Bitcoin—porque crea un mundo donde los incentivos están correctamente alineados, conduciendo a una sociedad más justa y próspera para todos.

Da el paso para aprender más sobre Bitcoin y cómo puede transformar no solo tu vida financiera, sino el mundo. Arranca un enlace a la izquierda y explora esta tecnología revolucionaria. Únete al movimiento hacia un futuro mejor.","url_message":"Sigue este enlace para obtener más información."},"jesus":{"name":"Mensaje que Cambia Vidas","title":"BUENAS NOTICIAS","subtitle":"NO IGNORAR","headline":"DESCUBRE LA VERDADERA ESPERANZA","content":"¿Quién es Jesús? Es más que una figura histórica; Él es el Hijo de Dios, el Salvador del mundo. Jesús mismo dijo: 'Yo soy el camino, la verdad y la vida. Nadie viene al Padre sino por mí' (Juan 14:6). Vino para cerrar la brecha entre Dios y la humanidad, ofreciéndonos un camino hacia el perdón, la paz y la vida eterna.

Todos enfrentamos quebrantamiento en nuestras vidas—ya sea en nuestras relaciones, nuestros corazones o nuestro mundo. Jesús vino para sanar ese quebrantamiento. Vivió una vida perfecta, murió en la cruz por nuestros pecados y resucitó, venciendo a la muerte y ofreciéndonos la esperanza de la vida eterna con Dios.

Sin Jesús, estamos perdidos en nuestro pecado, separados de Dios. Pero a través de Él, podemos ser perdonados y restaurados. Nos ofrece no solo una vida mejor ahora, sino la promesa de una vida eterna con Él. Por eso lo necesitamos—porque solo en Jesús podemos encontrar verdadera paz, propósito y la seguridad de la vida eterna.

Da el paso para aprender más sobre Jesús y el impacto transformador que puede tener en tu vida. Arranca un enlace a la izquierda y explora Sus enseñanzas. Encuentra la esperanza que has estado buscando.","url_message":"Sigue este enlace para obtener más información."},"meshtastic":{"name":"Volantes de Red Meshtastic","title":"COMUNICACIONES SEGURAS","subtitle":"NO IGNORAR","headline":"CONSTRUYE TU RED DE EMERGENCIA","content":"¿Por qué Meshtastic? En tiempos de crisis, las redes de comunicación tradicionales pueden fallar, dejándonos aislados y vulnerables. Meshtastic proporciona una solución poderosa—una red de comunicación local alternativa que opera independientemente de los sistemas centralizados. Está diseñada para situaciones de emergencia, permitiéndote mantenerte conectado cuando más importa.

Los dispositivos Meshtastic crean una red en malla que puede retransmitir mensajes a largas distancias, incluso sin cobertura de internet o celular. Este enfoque descentralizado asegura que tus comunicaciones sean resilientes y confiables, sin importar las circunstancias. Pero no se trata solo de mantenerse conectado—Meshtastic también ofrece cifrado, para que tus mensajes permanezcan seguros y privados.

En un mundo donde la privacidad está cada vez más comprometida, Meshtastic te empodera para tomar control de tu comunicación. Ya sea coordinando una respuesta comunitaria local, manteniéndote en contacto con seres queridos durante un desastre, o simplemente preparándote para lo inesperado, Meshtastic proporciona las herramientas que necesitas para comunicarte de forma segura y efectiva.

Da el paso para aprender más sobre Meshtastic y cómo puedes construir tu propia red de comunicación de emergencia. Arranca un enlace a la izquierda y explora esta tecnología innovadora. Asegúrate de estar preparado para lo que venga.","url_message":"Sigue este enlace para obtener más información."},"nostr":{"name":"Volantes del Protocolo Nostr","title":"LIBERTAD SOCIAL","subtitle":"NO IGNORAR","headline":"ÚNETE A LA RED RESISTENTE A LA CENSURA","content":"¿Qué es Nostr? A diferencia de las plataformas de redes sociales tradicionales, Nostr es un protocolo—un sistema descentralizado que empodera a los usuarios para conectarse y compartir sin las restricciones de una autoridad central. Nostr es resistente a la censura, lo que significa que tu voz no puede ser silenciada por corporaciones o gobiernos. Está diseñado para darte control sobre tu presencia en línea, libre de la influencia de algoritmos o anuncios que priorizan el engagement sobre las conexiones significativas.

En Nostr, no hay agendas ocultas para mantenerte enganchado. Te involucras con el contenido en tus términos, no basado en lo que un algoritmo piensa que te mantendrá en línea más tiempo. Nostr te permite construir conexiones genuinas y participar en conversaciones que importan, todo mientras mantienes tu privacidad y autonomía.

En un mundo donde el discurso en línea está cada vez más controlado y manipulado, Nostr ofrece una alternativa refrescante. No es solo una plataforma; es un movimiento hacia la verdadera libertad digital, donde tus interacciones son impulsadas por tus intereses y valores, no por lo que genera más ingresos publicitarios.

Da el paso para aprender más sobre Nostr y cómo puede transformar la forma en que te conectas en línea. Arranca un enlace a la izquierda y explora este protocolo revolucionario. Únete a una comunidad que valora la libertad y la interacción auténtica.","url_message":"Sigue este enlace para obtener más información."},"voxvera":{"name":"Volantes Imprimibles Vox Vera","title":"ALTO SECRETO","subtitle":"~~NO~~ DISTRIBUIR","headline":"OPERACIÓN VOX VERA","content":"Libérese de la censura con VoxVera. Una herramienta anónima de marketing de guerrilla y difusión de mensajes. Ya sea en línea o en el mundo físico, puede empoderarlo para difundir sus ideas con audacia, protegido por un anonimato completo (si hospeda a través de Tor). Descargue el código, diseñe un sitio de volantes, hospédelo en línea y amplifique su mensaje.

Use el poder memético para compartir sus ideas en su escuela, lugar de trabajo, comunidades en línea o incluso globalmente. VoxVera asegura que su mensaje resuene a lo largo und ancho, con secciones desprendibles que cuentan con URLs y códigos QR únicos para una fácil reimpresión.

La privacidad puede mantenerse. Los volantes se pueden compartir a través de la red Tor, protegiendo al anfitrión y a los usuarios de la censura.

Únase a nosotros en una revolución que valora la verdad y la transparencia. Juntos, podemos construir una red de ciudadanos informados que no temen hablar.","url_message":"Obtenga VoxVera y comience a difundir su mensaje."}}},"fa":{"meta":{"language_name":"فارسی","flag":"🇮🇷","direction":"rtl"},"cli":{"dep_check_header":"بررسی وابستگی‌ها","dep_found":"پیدا شد","dep_missing":"یافت نشد","all_deps_installed":"تمامی وابستگی‌ها نصب شده‌اند.","missing_deps_error":"برخی وابستگی‌ها وجود ندارند. اجرا کنید: pip install 'voxvera[all]'","init_name":"نام","init_folder":"نام پوشه","init_title":"عنوان","init_subtitle":"زیرعنوان","init_headline":"سرخط خبر","init_body":"متن پیام","init_links":"پیوندها","edit_again":"ویرایش دوباره؟","body_length":"طول متن","body_limit_exceeded":"بیش از حد مجاز","url_label":"URL (پیوند محتوا - منبع خارجی)","url_message_label":"پیام URL","footer_message_label":"پیام پابرگ","template_not_found":"قالب {name} یافت نشد","template_copied":"قالب به {dest} کپی شد","flyer_created":"فایل‌های اعلامیه در {dest} ایجاد شدند","dir_not_found":"پوشه {dir_path} یافت نشد","onionshare_error":"OnionShare برای {folder_name} به طور غیرمنتظره‌ای متوقف شد.","onionshare_causes":"دلایل رایج: مسدود بودن شبکه، نادرست بودن ساعت سیستم، یا در حال اجرا بودن OnionShare.","onionshare_logs_tip":"برای مشاهده گزارش‌های کامل به {logfile} مراجعه کنید.","onion_url_msg":"[{folder_name}] آدرس Onion: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare در حال اجرا است (PID {pid}).","export_not_found":"خطا: پوشه سایت '{folder_name}' در {host_root} یافت نشد","export_success":"صادر شد '{folder_name}' به {output_path}","export_all_none":"هیچ سایتی برای صدور یافت نشد.","export_all_starting":"در حال صدور {count} سایت به {dir}...","export_all_complete":"صدور کلی کامل شد.","import_zip_not_found":"خطا: فایل زیپ '{path}' یافت نشد.","import_invalid_config":"خطا: فایل صدور نامعتبر است. 'config.json' یافت نشد.","import_invalid_folder":"خطا: config.json نامعتبر است. 'folder_name' یافت نشد.","import_overwrite_confirm":"سایت '{folder_name}' از قبل وجود دارد. جایگزین شود؟","import_cancelled":"وارد کردن لغو شد.","import_success":"با موفقیت وارد شد '{folder_name}' به {dest_dir}","import_dir_not_found":"خطا: پوشه '{dir}' یافت نشد.","import_multiple_none":"هیچ فایل زیپی در {dir} یافت نشد","import_multiple_found":"تعداد {count} سایت برای وارد کردن از {dir} یافت شد...","importing_file":"در حال وارد کردن {name}...","import_multiple_complete":"وارد کردن گروهی کامل شد.","batch_import_none":"هیچ فایل JSON در واردات یافت نشد","batch_import_processing":"در حال پردازش {file}","stop_server_not_running":"سرور {folder_name} در حال اجرا نیست.","stop_server_success":"متوقف شد {folder_name} (PID {pid})","delete_server_success":"سرور {folder_name} حذف شد","manage_select_server":"یک سرور را برای مدیریت انتخاب کنید (یا خروج):","manage_create_new":"--- ایجاد سایت/اعلامیه جدید ---","manage_start_all":"--- اجرای همه سایت‌ها ---","manage_stop_all":"--- توقف همه سایت‌ها ---","manage_export_all":"--- صدور همه سایت‌ها ---","manage_import_multiple":"--- وارد کردن چندین سایت ---","manage_exit":"خروج","manage_startup_summary":"خلاصه راه‌اندازی","manage_press_enter":"برای ادامه اینتر را بزنید","manage_action_menu":"مدیریت {name}:","manage_action_toggle_stop":"توقف","manage_action_toggle_start":"شروع","manage_action_export":"صدور به صورت زیپ","manage_action_delete":"حذف","manage_action_back":"بازگشت","manage_delete_confirm":"آیا از حذف {name} اطمینان دارید؟","bootstrapping_msg":"[{name}] در حال اتصال به رله‌های Tor و راه‌اندازی سرویس مخفی...","bootstrapping_progress":"[{name}] راه‌اندازی Tor: {progress}% ...","no_urls_qr_skip":"هنوز آدرسی پیکربندی نشده است. کدهای QR پس از 'voxvera serve' ایجاد می‌شوند","input_file_not_found":"فایل ورودی {path} وجود ندارد.","attachment_path_label":"مسیر فایل پیوست (اختیاری - از طریق سایت Tor ارائه می‌شود)","manage_action_edit":"ویرایش","manage_templates":"--- ایجاد از قالب ---","template_select":"یک قالب انتخاب کنید:","body_over_limit_warning":"هشدار: متن بدنه از 1000 کاراکتر بیشتر است. ممکن است در بروشور بریده شود.","manage_action_export_keys":"صادرات کلیدها","manage_action_import_keys":"واردات کلیدها","keys_not_found":"کلید جلسه برای '{name}' یافت نشد. ابتدا سایت را اجرا کنید تا کلیدها تولید شوند.","keys_export_header":"کلید جلسه برای '{name}':","keys_export_hint":"این کلید را کپی کرده و به صورت امن ذخیره کنید. از 'واردات کلیدها' در نمونه دیگر برای بازیابی استفاده کنید.","keys_site_not_found":"سایت '{name}' یافت نشد.","keys_overwrite_confirm":"سایت '{name}' از قبل کلید دارد. رونویسی شود؟","keys_import_cancelled":"واردات لغو شد.","keys_import_prompt":"کلید جلسه base64 را در زیر جایگذاری کنید:","keys_import_empty":"کلیدی ارائه نشد.","keys_import_invalid":"فرمت کلید نامعتبر است. باید یک رشته base64 معتبر باشد.","keys_import_success":"کلید جلسه برای '{name}' وارد شد. سایت را مجدداً راه‌اندازی کنید تا از کلید جدید استفاده شود."},"web":{"tear_off_tor_browser":"از مرورگر Tor استفاده کنید","tear_off_desc":"برای کمک به گسترش این پیام به این آدرس بروید","tear_off_footer":"برای چاپ روی دکمه زیر کلیک کنید","built_with":"ساخته شده با","print_button":"چاپ اعلامیه","download_button":"دانلود ابزار و کد منبع","download_attachment":"دانلود پیوست"},"landing":{"title":"به‌کلی محرمانه","subtitle":"~~عدم~~ انتشار","headline":"عملیات VOX VERA","content":"با VoxVera از بند سانسور رها شوید. ابزاری ناشناس برای بازاریابی چریکی و گسترش پیام. چه در فضای مجازی و چه در دنیای فیزیکی، این ابزار می‌تواند شما را برای گسترش جسورانه ایده‌هایتان توانمند کند، در حالی که توسط ناشناسی کامل محافظت می‌شوید (اگر از طریق Tor میزبانی کنید). کد را دانلود کنید، یک سایت اعلامیه طراحی کنید، آن را آنلاین میزبانی کنید و صدای خود را تقویت کنید.

از قدرت میم‌ها برای به اشتراک گذاشتن ایده‌های خود در مدرسه، محل کار، انجمن‌های آنلاین یا حتی در سطح جهانی استفاده کنید. VoxVera تضمین می‌کند که پیام شما در دوردست‌ها طنین‌انداز شود، با بخش‌های جداشونده دارای URLهای منحصر به فرد و کدهای QR برای چاپ مجدد آسان.

حریم خصوصی می‌تواند حفظ شود. اعلامیه‌ها را می‌توان از طریق شبکه Tor به اشتراک گذاشت و از میزبان و کاربران در برابر سانسور محافظت کرد.

در انقلابی که برای حقیقت و شفافیت ارزش قائل است به ما بپیوندید. با هم، می‌توانیم شبکه‌ای از شهروندان آگاه بسازیم که از سخن گفتن نمی‌هراسند.","url_message":"VoxVera را دریافت کنید و گسترش پیام خود را آغاز کنید.","name":"بروشورهای قابل چاپ Vox Vera"},"templates":{"aosp":{"name":"پروژه AOS","title":"ANDROID آزاد شده","subtitle":"بدون مرز","headline":"آزادی متن‌باز","content":"پروژه متن‌باز Android (AOSP) نمایانگر جوهر آن چیزی است که Android در اصل برای آن طراحی شده بود: یک پلتفرم باز، شفاف و قابل تطبیق. این پروژه لایه‌های نرم‌افزار اختصاصی و نظارت شرکتی را که مترادف توزیع‌های متداول Android شده‌اند حذف می‌کند. با AOSP، به نسخه‌ای خام و فیلتر نشده از Android دسترسی پیدا می‌کنید که به شما اجازه می‌دهد دستگاهتان را واقعاً از آن خود کنید.

برای توسعه‌دهندگان، AOSP زمین بازی از امکانات را ارائه می‌دهد، جایی که تنها محدودیت‌ها مهارت‌ها و تخیل شماست. این پروژه به عنوان پایه‌ای برای بی‌شمار رام‌های سفارشی عمل می‌کند که هر کدام برای نیازهای خاصی طراحی شده‌اند، چه برای عملکرد بهتر، حریم خصوصی یا ویژگی‌های منحصر به فردی که نسخه‌های متداول فاقد آنها هستند. علاقه‌مندان به حریم خصوصی از عدم وجود نرم‌افزارهای غیرضروری از پیش نصب شده و سرویس‌های ردیابی که اغلب با Android کارخانه‌ای همراه هستند قدردانی خواهند کرد.

AOSP فقط برای توسعه‌دهندگان یا علاقه‌مندان به فناوری نیست؛ برای هر کسی است که آزادی دیجیتال را ارزشمند می‌داند. به شما اجازه می‌دهد کنترل دستگاه خود را بازپس بگیرید و آن را بدون محدودیت‌های اپراتورها یا تولیدکنندگان مطابق نیازهایتان تنظیم کنید. کشف کنید چگونه AOSP می‌تواند تجربه موبایل شما را متحول کند. سفر خود را به سوی آینده‌ای بازتر و قابل سفارشی‌سازی‌تر همین امروز آغاز کنید.","url_message":"برای اطلاعات بیشتر از لینک زیر بازدید کنید."},"bitcoin":{"name":"بروشورهای انقلاب Bitcoin","title":"قوانین بدون حاکمان","subtitle":"نادیده نگیرید","headline":"به انقلاب BITCOIN بپیوندید","content":"Bitcoin چیست؟ فراتر از پول دیجیتال است؛ یک فناوری انقلابی است که برای حل برخی از فوری‌ترین مشکلات جهان طراحی شده است. Bitcoin روی یک شبکه غیرمتمرکز عمل می‌کند، آزاد از کنترل هر دولت یا مرجع مرکزی. این تضمین می‌کند که هیچ‌کس نمی‌تواند عرضه یا ارزش آن را دستکاری کند و آن را به شکلی سالم از پول تبدیل می‌کند که ثروت شما را از تورم محافظت می‌کند.

سیستم مالی فعلی ما بر پایه انگیزه‌های معیوب ساخته شده است—تشویق بدهی، وابستگی و تمرکز قدرت. Bitcoin این را تغییر می‌دهد با ایجاد سیستمی که در آن صداقت، شفافیت و مسئولیت فردی پاداش می‌گیرند. در شبکه Bitcoin، جایی برای فساد یا دستکاری نیست زیرا قوانین توسط ریاضیات اجرا می‌شوند، نه توسط انسان‌ها.

Bitcoin انگیزه‌ها را به گونه‌ای هم‌راستا می‌کند که تفکر بلندمدت، پس‌انداز و نوآوری را ترویج می‌دهد. به افراد قدرت می‌دهد تا کنترل آینده مالی خود را به دست بگیرند و جامعه‌ای جهانی را پرورش می‌دهد که در آن ارزش می‌تواند آزادانه و با امنیت بدون واسطه‌ها منتقل شود. به همین دلیل به Bitcoin نیاز داریم—زیرا دنیایی می‌سازد که در آن انگیزه‌ها به درستی هم‌راستا هستند و به جامعه‌ای عادلانه‌تر و مرفه‌تر برای همه منجر می‌شود.

قدم بردارید تا درباره Bitcoin و اینکه چگونه می‌تواند نه تنها زندگی مالی شما بلکه جهان را متحول کند بیشتر بدانید. یک لینک از سمت چپ جدا کنید و این فناوری پیشگامانه را کاوش کنید. به جنبش به سوی آینده‌ای بهتر بپیوندید.","url_message":"این لینک را دنبال کنید تا بیشتر بدانید."},"jesus":{"name":"پیام تغییر دهنده زندگی","title":"خبر خوش","subtitle":"نادیده نگیرید","headline":"امید واقعی را کشف کنید","content":"Jesus کیست؟ او فراتر از یک شخصیت تاریخی است؛ او پسر خدا، نجات‌دهنده جهان است. Jesus خودش گفت: 'من راه و راستی و حیات هستم. هیچ‌کس جز از طریق من نزد پدر نمی‌آید' (یوحنا 14:6). او آمد تا شکاف میان خدا و بشریت را پر کند و راهی به سوی بخشش، صلح و حیات جاودان به ما ارائه دهد.

همه ما در زندگی‌مان با شکستگی مواجه هستیم—خواه در روابط، قلب‌ها یا دنیایمان. Jesus آمد تا آن شکستگی را شفا دهد. او زندگی کاملی زیست، بر صلیب برای گناهان ما مرد و از مرگ برخاست، مرگ را شکست داد و امید حیات جاودان با خدا را به ما عطا کرد.

بدون Jesus، ما در گناهمان گمشده و از خدا جدا هستیم. اما از طریق او، می‌توانیم بخشیده و بازسازی شویم. او نه تنها زندگی بهتری اکنون، بلکه وعده حیات جاودان با خودش را به ما ارائه می‌دهد. به همین دلیل به او نیاز داریم—زیرا تنها در Jesus می‌توانیم صلح، هدف و اطمینان واقعی از حیات جاودان را بیابیم.

قدم بردارید تا درباره Jesus و تأثیر تغییردهنده زندگی که می‌تواند بر شما داشته باشد بیشتر بدانید. یک لینک از سمت چپ جدا کنید و تعالیم او را کاوش کنید. امیدی را بیابید که به دنبالش بوده‌اید.","url_message":"این لینک را دنبال کنید تا بیشتر بدانید."},"meshtastic":{"name":"بروشورهای شبکه Meshtastic","title":"ارتباطات امن","subtitle":"نادیده نگیرید","headline":"شبکه اضطراری خود را بسازید","content":"چرا Meshtastic؟ در زمان بحران، شبکه‌های ارتباطی سنتی می‌توانند از کار بیفتند و ما را منزوی و آسیب‌پذیر رها کنند. Meshtastic یک راه‌حل قدرتمند ارائه می‌دهد—یک شبکه ارتباطی محلی جایگزین که مستقل از سیستم‌های متمرکز عمل می‌کند. برای شرایط اضطراری طراحی شده و به شما امکان می‌دهد زمانی که بیشترین اهمیت را دارد متصل بمانید.

دستگاه‌های Meshtastic یک شبکه مش ایجاد می‌کنند که می‌تواند پیام‌ها را در مسافت‌های طولانی ارسال کند، حتی بدون پوشش اینترنت یا تلفن همراه. این رویکرد غیرمتمرکز تضمین می‌کند که ارتباطات شما در هر شرایطی مقاوم و قابل اعتماد است. اما فقط درباره متصل ماندن نیست—Meshtastic همچنین رمزگذاری ارائه می‌دهد تا پیام‌های شما امن و خصوصی بمانند.

در دنیایی که حریم خصوصی به طور فزاینده‌ای به خطر افتاده، Meshtastic به شما قدرت می‌دهد تا کنترل ارتباطات خود را به دست بگیرید. چه در حال هماهنگی واکنش جامعه محلی باشید، چه در تماس با عزیزانتان در طول یک فاجعه، یا صرفاً برای غیرمنتظره‌ها آماده می‌شوید، Meshtastic ابزارهایی را که برای ارتباط امن و مؤثر نیاز دارید فراهم می‌کند.

قدم بردارید تا درباره Meshtastic و نحوه ساخت شبکه ارتباطی اضطراری خود بیشتر بدانید. یک لینک از سمت چپ جدا کنید و این فناوری نوآورانه را کاوش کنید. مطمئن شوید که برای هر چیزی آماده هستید.","url_message":"این لینک را دنبال کنید تا بیشتر بدانید."},"nostr":{"name":"بروشورهای پروتکل Nostr","title":"آزادی اجتماعی","subtitle":"نادیده نگیرید","headline":"به شبکه مقاوم در برابر سانسور بپیوندید","content":"Nostr چیست؟ برخلاف پلتفرم‌های رسانه‌های اجتماعی سنتی، Nostr یک پروتکل است—سیستمی غیرمتمرکز که کاربران را برای اتصال و اشتراک‌گذاری بدون محدودیت‌های یک مرجع مرکزی توانمند می‌سازد. Nostr مقاوم در برابر سانسور است، به این معنی که صدای شما توسط شرکت‌ها یا دولت‌ها خاموش نمی‌شود. طراحی شده تا به شما کنترل بر حضور آنلاینتان را بدهد، آزاد از تأثیر الگوریتم‌ها یا تبلیغاتی که تعامل را بر ارتباطات معنادار ترجیح می‌دهند.

در Nostr، هیچ دستور کار پنهانی برای نگه داشتن شما در اسکرول بی‌پایان وجود ندارد. شما با محتوا به شرایط خودتان تعامل می‌کنید، نه بر اساس آنچه یک الگوریتم فکر می‌کند شما را بیشترین مدت آنلاین نگه می‌دارد. Nostr به شما اجازه می‌دهد ارتباطات واقعی بسازید و در گفتگوهایی شرکت کنید که اهمیت دارند، همه در حالی که حریم خصوصی و استقلال شما حفظ می‌شود.

در دنیایی که گفتمان آنلاین به طور فزاینده‌ای کنترل و دستکاری می‌شود، Nostr جایگزینی تازه ارائه می‌دهد. فقط یک پلتفرم نیست؛ جنبشی به سوی آزادی دیجیتال واقعی است، جایی که تعاملات شما توسط علایق و ارزش‌هایتان هدایت می‌شود، نه توسط آنچه بیشترین درآمد تبلیغاتی را تولید می‌کند.

قدم بردارید تا درباره Nostr و نحوه تحول ارتباطات آنلاین شما بیشتر بدانید. یک لینک از سمت چپ جدا کنید و این پروتکل پیشگامانه را کاوش کنید. به جامعه‌ای بپیوندید که آزادی و تعامل واقعی را ارزشمند می‌داند.","url_message":"این لینک را دنبال کنید تا بیشتر بدانید."},"voxvera":{"name":"بروشورهای قابل چاپ Vox Vera","title":"به‌کلی محرمانه","subtitle":"~~عدم~~ انتشار","headline":"عملیات VOX VERA","content":"با VoxVera از بند سانسور رها شوید. ابزاری ناشناس برای بازاریابی چریکی و گسترش پیام. چه در فضای مجازی و چه در دنیای فیزیکی، این ابزار می‌تواند شما را برای گسترش جسورانه ایده‌هایتان توانمند کند، در حالی که توسط ناشناسی کامل محافظت می‌شوید (اگر از طریق Tor میزبانی کنید). کد را دانلود کنید، یک سایت اعلامیه طراحی کنید، آن را آنلاین میزبانی کنید و صدای خود را تقویت کنید.

از قدرت میم‌ها برای به اشتراک گذاشتن ایده‌های خود در مدرسه، محل کار، انجمن‌های آنلاین یا حتی در سطح جهانی استفاده کنید. VoxVera تضمین می‌کند که پیام شما در دوردست‌ها طنین‌انداز شود، با بخش‌های جداشونده دارای URLهای منحصر به فرد و کدهای QR برای چاپ مجدد آسان.

حریم خصوصی می‌تواند حفظ شود. اعلامیه‌ها را می‌توان از طریق شبکه Tor به اشتراک گذاشت و از میزبان و کاربران در برابر سانسور محافظت کرد.

در انقلابی که برای حقیقت و شفافیت ارزش قائل است به ما بپیوندید. با هم، می‌توانیم شبکه‌ای از شهروندان آگاه بسازیم که از سخن گفتن نمی‌هراسند.","url_message":"VoxVera را دریافت کنید و گسترش پیام خود را آغاز کنید."}}},"fr":{"meta":{"language_name":"Français","flag":"🇫🇷","direction":"ltr"},"cli":{"dep_check_header":"Vérification des Dépendances","dep_found":"trouvé","dep_missing":"manquant","all_deps_installed":"Toutes les dépendances sont installées.","missing_deps_error":"Certaines dépendances sont manquantes. Exécutez : pip install 'voxvera[all]'","init_name":"Nom","init_folder":"Nom du dossier","init_title":"Titre","init_subtitle":"Sous-titre","init_headline":"Gros titre","init_body":"Texte du message","init_links":"Liens","edit_again":"Modifier à nouveau ?","body_length":"Longueur du texte","body_limit_exceeded":"dépasse la limite","url_label":"URL (lien de contenu - ressource externe)","url_message_label":"Message de l'URL","footer_message_label":"Message de pied de page","template_not_found":"Modèle {name} non trouvé","template_copied":"Modèle copié vers {dest}","flyer_created":"Fichiers du flyer créés sous {dest}","dir_not_found":"Répertoire {dir_path} non trouvé","onionshare_error":"OnionShare pour {folder_name} s'est arrêté de manière inattendue.","onionshare_causes":"Causes courantes : réseau bloqué, horloge système imprécise ou OnionShare déjà en cours d'exécution.","onionshare_logs_tip":"Voir {logfile} pour les journaux complets.","onion_url_msg":"[{folder_name}] URL Onion : {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare en cours d'exécution (PID {pid}).","export_not_found":"Erreur : dossier du site '{folder_name}' non trouvé dans {host_root}","export_success":"Exporté '{folder_name}' vers {output_path}","export_all_none":"Aucun site trouvé pour l'exportation.","export_all_starting":"Exportation de {count} sites vers {dir}...","export_all_complete":"Exportation complète terminée.","import_zip_not_found":"Erreur : fichier Zip '{path}' non trouvé.","import_invalid_config":"Erreur : fichier d'exportation invalide. 'config.json' manquant.","import_invalid_folder":"Erreur : config.json invalide. 'folder_name' manquant.","import_overwrite_confirm":"Le site '{folder_name}' existe déjà. Écraser ?","import_cancelled":"Importation annulée.","import_success":"Importé avec succès '{folder_name}' vers {dest_dir}","import_dir_not_found":"Erreur : répertoire '{dir}' non trouvé.","import_multiple_none":"Aucun fichier zip trouvé dans {dir}","import_multiple_found":"Trouvé {count} site(s) à importer de {dir}...","importing_file":"Importation de {name}...","import_multiple_complete":"Importation multiple terminée.","batch_import_none":"Aucun fichier JSON trouvé dans imports","batch_import_processing":"Traitement de {file}","stop_server_not_running":"Le serveur {folder_name} n'est pas en cours d'exécution.","stop_server_success":"Arrêté {folder_name} (PID {pid})","delete_server_success":"Serveur {folder_name} supprimé","manage_select_server":"Sélectionnez un serveur à gérer (ou Quitter) :","manage_create_new":"--- Créer un nouveau site/flyer ---","manage_start_all":"--- Démarrer tous les sites ---","manage_stop_all":"--- Arrêter tous les sites ---","manage_export_all":"--- Exporter tous les sites ---","manage_import_multiple":"--- Importer plusieurs sites ---","manage_exit":"Quitter","manage_startup_summary":"Résumé du démarrage","manage_press_enter":"Appuyez sur Entrée pour continuer","manage_action_menu":"Gérer {name} :","manage_action_toggle_stop":"Arrêter","manage_action_toggle_start":"Démarrer","manage_action_export":"Exporter en Zip","manage_action_delete":"Supprimer","manage_action_back":"Retour","manage_delete_confirm":"Êtes-vous sûr de vouloir supprimer {name} ?","bootstrapping_msg":"[{name}] Connexion aux relais Tor et configuration du service caché...","bootstrapping_progress":"[{name}] Amorçage de Tor : {progress}% ...","no_urls_qr_skip":"Aucune URL configurée pour le moment. Les codes QR seront générés après 'voxvera serve'","input_file_not_found":"Le fichier d'entrée {path} n'existe pas.","attachment_path_label":"Chemin du fichier joint (optionnel - sera servi depuis le site Tor)","manage_action_edit":"Modifier","manage_templates":"--- Créer à partir d'un modèle ---","template_select":"Sélectionnez un modèle :","body_over_limit_warning":"Avertissement : Le texte dépasse 1000 caractères. Il pourrait être coupé sur le tract.","manage_action_export_keys":"Exporter les clés","manage_action_import_keys":"Importer les clés","keys_not_found":"Aucune clé de session trouvée pour '{name}'. Démarrez le site d'abord pour générer les clés.","keys_export_header":"Clé de session pour '{name}' :","keys_export_hint":"Copiez cette clé et conservez-la en sécurité. Utilisez 'Importer les clés' sur une autre instance pour restaurer.","keys_site_not_found":"Site '{name}' introuvable.","keys_overwrite_confirm":"Le site '{name}' a déjà une clé. Écraser ?","keys_import_cancelled":"Importation annulée.","keys_import_prompt":"Collez la clé de session base64 ci-dessous :","keys_import_empty":"Aucune clé fournie.","keys_import_invalid":"Format de clé invalide. Doit être une chaîne base64 valide.","keys_import_success":"Clé de session importée pour '{name}'. Redémarrez le site pour utiliser la nouvelle clé."},"web":{"tear_off_tor_browser":"Utilisez le navigateur Tor","tear_off_desc":"pour aider à diffuser ce message, allez sur","tear_off_footer":"cliquez sur le bouton ci-dessous pour imprimer","built_with":"créé avec","print_button":"Imprimer le flyer","download_button":"Télécharger l'outil et le code","download_attachment":"Télécharger la pièce jointe"},"landing":{"title":"TOP SECRET","subtitle":"~~NE PAS~~ DISTRIBUER","headline":"OPÉRATION VOX VERA","content":"Libérez-vous de la censure avec VoxVera. Un outil de marketing de guérilla anonyme et de diffusion de messages. Que ce soit en ligne ou dans le monde physique, il peut vous donner le pouvoir de diffuser vos idées avec audace, à l'abri d'un anonymat complet (si vous hébergez via Tor). Téléchargez le code, concevez un site de flyers, hébergez-le en ligne et amplifiez votre message.

Utilisez le pouvoir mémétique pour partager vos idées à l'école, au travail, dans les communautés en ligne ou même à l'échelle mondiale. VoxVera garantit que votre message résonne partout, avec des sections détachables comportant des URL uniques et des codes QR pour une réimpression facile.

La vie privée peut être préservée. Les flyers peuvent être partagés via le réseau Tor, protégeant l'hébergeur et les utilisateurs de la censure.

Rejoignez-nous dans une révolution qui valorise la vérité et la transparence. Ensemble, nous pouvons construire un réseau de citoyens informés qui n'ont pas peur de s'exprimer.","url_message":"Obtenez VoxVera et commencez à diffuser votre message.","name":"Tracts Imprimables Vox Vera"},"templates":{"aosp":{"name":"Projet AOS","title":"ANDROID LIBÉRÉ","subtitle":"SANS LIMITES","headline":"LIBERTÉ OPEN SOURCE","content":"Le projet Android Open Source (AOSP) représente l'essence de ce qu'Android était à l'origine : une plateforme ouverte, transparente et adaptable. Il supprime les couches de logiciels propriétaires et de contrôle d'entreprise qui sont devenues synonymes des distributions Android classiques. Avec AOSP, vous accédez à une version brute et non filtrée d'Android, vous permettant de véritablement faire de votre appareil le vôtre.

Pour les développeurs, AOSP offre un terrain de jeu de possibilités, où les seules limites sont vos compétences et votre imagination. Il sert de base à d'innombrables ROMs personnalisées, chacune adaptée à des besoins spécifiques, que ce soit pour des performances améliorées, la confidentialité ou des fonctionnalités uniques absentes des versions grand public. Les passionnés de vie privée apprécieront l'absence de logiciels préinstallés et de services de suivi qui accompagnent souvent Android d'usine.

AOSP n'est pas réservé aux développeurs ou aux passionnés de technologie ; c'est pour tous ceux qui valorisent la liberté numérique. Il vous permet de reprendre le contrôle de votre appareil, en l'adaptant à vos besoins sans les restrictions des opérateurs ou des fabricants. Découvrez comment AOSP peut transformer votre expérience mobile. Commencez votre voyage vers un avenir plus ouvert et personnalisable dès aujourd'hui.","url_message":"Visitez le lien ci-dessous pour en savoir plus."},"bitcoin":{"name":"Tracts de la Révolution Bitcoin","title":"DES RÈGLES SANS DIRIGEANTS","subtitle":"NE PAS IGNORER","headline":"REJOIGNEZ LA RÉVOLUTION BITCOIN","content":"Qu'est-ce que Bitcoin ? C'est bien plus que de l'argent numérique ; c'est une technologie révolutionnaire conçue pour résoudre certains des problèmes les plus urgents du monde. Bitcoin fonctionne sur un réseau décentralisé, libre du contrôle de tout gouvernement ou autorité centrale. Cela garantit que personne ne peut manipuler son offre ou sa valeur, ce qui en fait une forme saine de monnaie qui protège votre richesse de l'inflation.

Notre système financier actuel repose sur des incitations défaillantes—encourageant la dette, la dépendance et la centralisation du pouvoir. Bitcoin change cela en créant un système où l'honnêteté, la transparence et la responsabilité individuelle sont récompensées. Dans le réseau Bitcoin, il n'y a pas de place pour la corruption ou la manipulation car les règles sont appliquées par les mathématiques, pas par les personnes.

Bitcoin aligne les incitations de manière à promouvoir la pensée à long terme, l'épargne et l'innovation. Il permet aux individus de prendre le contrôle de leur avenir financier, favorisant une communauté mondiale où la valeur peut être transférée librement et en toute sécurité sans intermédiaires. C'est pourquoi nous avons besoin de Bitcoin—parce qu'il crée un monde où les incitations sont correctement alignées, menant à une société plus juste et prospère pour tous.

Faites le pas pour en apprendre davantage sur Bitcoin et comment il peut transformer non seulement votre vie financière, mais le monde. Détachez un lien à gauche et explorez cette technologie révolutionnaire. Rejoignez le mouvement vers un avenir meilleur.","url_message":"Suivez ce lien pour en savoir plus."},"jesus":{"name":"Message qui Change la Vie","title":"BONNE NOUVELLE","subtitle":"NE PAS IGNORER","headline":"DÉCOUVREZ LE VÉRITABLE ESPOIR","content":"Qui est Jesus ? Il est bien plus qu'une figure historique ; Il est le Fils de Dieu, le Sauveur du monde. Jesus lui-même a dit : 'Je suis le chemin, la vérité et la vie. Nul ne vient au Père que par moi' (Jean 14:6). Il est venu pour combler le fossé entre Dieu et l'humanité, nous offrant un chemin vers le pardon, la paix et la vie éternelle.

Nous faisons tous face à des brisures dans nos vies—que ce soit dans nos relations, nos cœurs ou notre monde. Jesus est venu pour guérir cette brisure. Il a vécu une vie parfaite, est mort sur la croix pour nos péchés, et est ressuscité, vainquant la mort et nous offrant l'espoir de la vie éternelle avec Dieu.

Sans Jesus, nous sommes perdus dans notre péché, séparés de Dieu. Mais à travers Lui, nous pouvons être pardonnés et restaurés. Il nous offre non seulement une vie meilleure maintenant, mais la promesse d'une vie éternelle avec Lui. C'est pourquoi nous avons besoin de Lui—parce que c'est seulement en Jesus que nous pouvons trouver la véritable paix, un but et l'assurance de la vie éternelle.

Faites le pas pour en apprendre davantage sur Jesus et l'impact transformateur qu'Il peut avoir sur votre vie. Détachez un lien à gauche et explorez Ses enseignements. Trouvez l'espoir que vous cherchiez.","url_message":"Suivez ce lien pour en savoir plus."},"meshtastic":{"name":"Tracts du Réseau Meshtastic","title":"COMMUNICATIONS SÉCURISÉES","subtitle":"NE PAS IGNORER","headline":"CONSTRUISEZ VOTRE RÉSEAU D'URGENCE","content":"Pourquoi Meshtastic ? En temps de crise, les réseaux de communication traditionnels peuvent échouer, nous laissant isolés et vulnérables. Meshtastic fournit une solution puissante—un réseau de communication local alternatif qui fonctionne indépendamment des systèmes centralisés. Il est conçu pour les situations d'urgence, vous permettant de rester connecté quand cela compte le plus.

Les appareils Meshtastic créent un réseau maillé capable de relayer des messages sur de longues distances, même sans couverture internet ou cellulaire. Cette approche décentralisée garantit que vos communications sont résilientes et fiables, quelles que soient les circonstances. Mais il ne s'agit pas seulement de rester connecté—Meshtastic offre également le chiffrement, pour que vos messages restent sécurisés et privés.

Dans un monde où la vie privée est de plus en plus compromise, Meshtastic vous permet de prendre le contrôle de votre communication. Que vous coordonniez une réponse communautaire locale, restiez en contact avec vos proches lors d'une catastrophe, ou vous prépariez simplement à l'inattendu, Meshtastic fournit les outils dont vous avez besoin pour communiquer de manière sécurisée et efficace.

Faites le pas pour en apprendre davantage sur Meshtastic et comment vous pouvez construire votre propre réseau de communication d'urgence. Détachez un lien à gauche et explorez cette technologie innovante. Assurez-vous d'être prêt pour tout ce qui peut arriver.","url_message":"Suivez ce lien pour en savoir plus."},"nostr":{"name":"Tracts du Protocole Nostr","title":"LIBERTÉ SOCIALE","subtitle":"NE PAS IGNORER","headline":"REJOIGNEZ LE RÉSEAU RÉSISTANT À LA CENSURE","content":"Qu'est-ce que Nostr ? Contrairement aux plateformes de médias sociaux traditionnelles, Nostr est un protocole—un système décentralisé qui permet aux utilisateurs de se connecter et de partager sans les contraintes d'une autorité centrale. Nostr est résistant à la censure, ce qui signifie que votre voix ne peut pas être réduite au silence par des entreprises ou des gouvernements. Il est conçu pour vous donner le contrôle de votre présence en ligne, libre de l'influence des algorithmes ou des publicités qui privilégient l'engagement au détriment des connexions significatives.

Sur Nostr, il n'y a pas d'agendas cachés pour vous maintenir dans un défilement sans fin. Vous interagissez avec le contenu selon vos termes, pas en fonction de ce qu'un algorithme pense vous gardera en ligne le plus longtemps. Nostr vous permet de construire des connexions authentiques et de participer à des conversations qui comptent, tout en préservant votre vie privée et votre autonomie.

Dans un monde où la parole en ligne est de plus en plus contrôlée et manipulée, Nostr offre une alternative rafraîchissante. Ce n'est pas qu'une plateforme ; c'est un mouvement vers une véritable liberté numérique, où vos interactions sont guidées par vos intérêts et vos valeurs, pas par ce qui génère le plus de revenus publicitaires.

Faites le pas pour en apprendre davantage sur Nostr et comment il peut transformer la façon dont vous vous connectez en ligne. Détachez un lien à gauche et explorez ce protocole révolutionnaire. Rejoignez une communauté qui valorise la liberté et l'interaction authentique.","url_message":"Suivez ce lien pour en savoir plus."},"voxvera":{"name":"Tracts Imprimables Vox Vera","title":"TOP SECRET","subtitle":"~~NE PAS~~ DISTRIBUER","headline":"OPÉRATION VOX VERA","content":"Libérez-vous de la censure avec VoxVera. Un outil de marketing de guérilla anonyme et de diffusion de messages. Que ce soit en ligne ou dans le monde physique, il peut vous donner le pouvoir de diffuser vos idées avec audace, à l'abri d'un anonymat complet (si vous hébergez via Tor). Téléchargez le code, concevez un site de flyers, hébergez-le en ligne et amplifiez votre message.

Utilisez le pouvoir mémétique pour partager vos idées à l'école, au travail, dans les communautés en ligne ou même à l'échelle mondiale. VoxVera garantit que votre message résonne partout, avec des sections détachables comportant des URL uniques et des codes QR pour une réimpression facile.

La vie privée peut être préservée. Les flyers peuvent être partagés via le réseau Tor, protégeant l'hébergeur et les utilisateurs de la censure.

Rejoignez-nous dans une révolution qui valorise la vérité et la transparence. Ensemble, nous pouvons construire un réseau de citoyens informés qui n'ont pas peur de s'exprimer.","url_message":"Obtenez VoxVera et commencez à diffuser votre message."}}},"he":{"meta":{"language_name":"עברית","flag":"🇮🇱","direction":"rtl"},"cli":{"dep_check_header":"בדיקת תלות","dep_found":"נמצא","dep_missing":"חסר","all_deps_installed":"כל התלויות מותקנות.","missing_deps_error":"חלק מהתלויות חסרות. הרץ: pip install 'voxvera[all]'","init_name":"שם","init_folder":"שם תיקייה","init_title":"כותרת","init_subtitle":"כותרת משנה","init_headline":"כותרת ראשית","init_body":"טקסט ההודעה","init_links":"קישורים","edit_again":"לערוך שוב?","body_length":"אורך הטקסט","body_limit_exceeded":"חורג מהמגבלה","url_label":"URL (קישור לתוכן - משאב חיצוני)","url_message_label":"הודעת URL","footer_message_label":"הודעת כותרת תחתונה","template_not_found":"התבנית {name} לא נמצאה","template_copied":"התבנית הועתקה אל {dest}","flyer_created":"קובצי הפלייר נוצרו תחת {dest}","dir_not_found":"התיקייה {dir_path} לא נמצאה","onionshare_error":"OnionShare עבור {folder_name} נסגר באופן לא צפוי.","onionshare_causes":"סיבות נפוצות: רשת חסומה, שעון מערכת לא מדויק, או ש-OnionShare כבר פועל.","onionshare_logs_tip":"ראה {logfile} ליומנים מלאים.","onion_url_msg":"[{folder_name}] כתובת Onion: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare פועל (PID {pid}).","export_not_found":"שגיאה: תיקיית האתר '{folder_name}' לא נמצאה ב-{host_root}","export_success":"יוצא '{folder_name}' אל {output_path}","export_all_none":"לא נמצאו אתרים לייצוא.","export_all_starting":"מייצא {count} אתרים אל {dir}...","export_all_complete":"ייצוא הכל הושלם.","import_zip_not_found":"שגיאה: קובץ ה-Zip '{path}' לא נמצא.","import_invalid_config":"שגיאה: קובץ ייצוא לא תקין. 'config.json' חסר.","import_invalid_folder":"שגיאה: config.json לא תקין. 'folder_name' חסר.","import_overwrite_confirm":"האתר '{folder_name}' כבר קיים. לדרוס?","import_cancelled":"הייבוא בוטל.","import_success":"ייבוא '{folder_name}' אל {dest_dir} הושלם בהצלחה","import_dir_not_found":"שגיאה: התיקייה '{dir}' לא נמצאה.","import_multiple_none":"לא נמצאו קובצי Zip ב-{dir}","import_multiple_found":"נמצאו {count} אתרים לייבוא מ-{dir}...","importing_file":"מייבא את {name}...","import_multiple_complete":"ייבוא מרובה הושלם.","batch_import_none":"לא נמצאו קובצי JSON ב-imports","batch_import_processing":"מעבד את {file}","stop_server_not_running":"השרת {folder_name} אינו פועל.","stop_server_success":"הופסק {folder_name} (PID {pid})","delete_server_success":"נמחק שרת {folder_name}","manage_select_server":"בחר שרת לניהול (או יציאה):","manage_create_new":"--- צור אתר/פלייר חדש ---","manage_start_all":"--- הפעל את כל האתרים ---","manage_stop_all":"--- הפסק את כל האתרים ---","manage_export_all":"--- ייצא את כל האתרים ---","manage_import_multiple":"--- ייבא מספר אתרים ---","manage_exit":"יציאה","manage_startup_summary":"סיכום הפעלה","manage_press_enter":"לחץ על Enter להמשך","manage_action_menu":"נהל את {name}:","manage_action_toggle_stop":"הפסק","manage_action_toggle_start":"הפעל","manage_action_export":"ייצא ל-Zip","manage_action_delete":"מחק","manage_action_back":"חזרה","manage_delete_confirm":"האם אתה בטוח שברצונך למחוק את {name}?","bootstrapping_msg":"[{name}] מתחבר לממסרי Tor ומגדיר שירות נסתר...","bootstrapping_progress":"[{name}] איתחול Tor: {progress}% ...","no_urls_qr_skip":"עדיין לא הוגדרו כתובות URL. קודי QR ייווצרו לאחר 'voxvera serve'","input_file_not_found":"קובץ הקלט {path} אינו קיים.","attachment_path_label":"נתיב קובץ מצורף (אופציונלי - יוגש מאתר ה-Tor)","manage_action_edit":"עריכה","manage_templates":"--- יצירה מתבנית ---","template_select":"בחר תבנית:","body_over_limit_warning":"אזהרה: טקסט הגוף חורג מ-1000 תווים. הוא עלול להיחתך בעלון.","manage_action_export_keys":"ייצוא מפתחות","manage_action_import_keys":"ייבוא מפתחות","keys_not_found":"לא נמצא מפתח הפעלה עבור '{name}'. הפעל את האתר תחילה ליצירת מפתחות.","keys_export_header":"מפתח הפעלה עבור '{name}':","keys_export_hint":"העתק מפתח זה ושמור אותו בבטחה. השתמש ב'ייבוא מפתחות' במופע אחר לשחזור.","keys_site_not_found":"האתר '{name}' לא נמצא.","keys_overwrite_confirm":"לאתר '{name}' כבר יש מפתח. לדרוס?","keys_import_cancelled":"הייבוא בוטל.","keys_import_prompt":"הדבק את מפתח ההפעלה base64 למטה:","keys_import_empty":"לא סופק מפתח.","keys_import_invalid":"פורמט מפתח לא חוקי. חייב להיות מחרוזת base64 חוקית.","keys_import_success":"מפתח הפעלה יובא עבור '{name}'. הפעל מחדש את האתר כדי להשתמש במפתח החדש."},"web":{"tear_off_tor_browser":"השתמש בדפדפן Tor","tear_off_desc":"כדי לעזור להפיץ את המסר הזה עבור אל","tear_off_footer":"לחץ על הכפתור למטה להדפסה","built_with":"נבנה עם","print_button":"הדפס פלייר","download_button":"הורד כלי וקוד מקור","download_attachment":"הורד קובץ מצורף"},"landing":{"title":"סודי ביותר","subtitle":"~~לא~~ להפצה","headline":"מבצע VOX VERA","content":"השתחרר מהצנזורה עם VoxVera. כלי אנונימי לשיווק גרילה והפצת מסרים. בין אם באינטרנט ובין אם בעולם הפיזי, הוא יכול להעצים אותך להפיץ את הרעיונות שלך בתעוזה, מוגן באנונימיות מלאה (אם אתה מארח דרך Tor). הורד את הקוד, עצב אתר פלייר, ארח אותו אונליין והגבר את המסר שלך.

השתמש בכוח הממטי כדי לשתף את הרעיונות שלך בבית הספר, במקום העבודה, בקהילות מקוונות או אפילו ברמה עולמית. VoxVera מבטיחה שהמסר שלך יהדהד למרחקים, עם חלקים נתלשים הכוללים כתובות URL ייחודיות וקודי QR להדפסה חוזרת קלה.

ניתן לשמור על פרטיות. ניתן לשתף פליירים דרך רשת Tor, ובכך להגן על המארח ועל המשתמשים מפני צנזורה.

הצטרפו אלינו למהפכה שמעריכה אמת ושקיפות. יחד, נוכל לבנות רשת של אזרחים מושכלים שאינם פוחדים להתבטא.","url_message":"קבלו את VoxVera והתחילו להפיץ את המסר שלכם.","name":"עלונים להדפסה של Vox Vera"},"templates":{"aosp":{"name":"פרויקט AOS","title":"ANDROID ללא כבלים","subtitle":"ללא גבולות","headline":"חופש קוד פתוח","content":"פרויקט הקוד הפתוח של Android (AOSP) מייצג את המהות של מה ש-Android נועד להיות במקור: פלטפורמה פתוחה, שקופה וניתנת להתאמה. הוא מסיר את שכבות התוכנה הקניינית והפיקוח הארגוני שהפכו נרדפים להפצות Android המרכזיות. עם AOSP, אתה מקבל גישה לגרסה גולמית ולא מסוננת של Android, המאפשרת לך באמת להפוך את המכשיר שלך לשלך.

למפתחים, AOSP מציע מגרש משחקים של אפשרויות, שבו הגבולות היחידים הם הכישורים והדמיון שלך. הוא משמש כבסיס לאינספור ROM-ים מותאמים אישית, כל אחד מותאם לצרכים ספציפיים, בין אם לביצועים משופרים, פרטיות או תכונות ייחודיות שחסרות בגרסאות המרכזיות. חובבי פרטיות יעריכו את היעדר התוכנות המיותרות המותקנות מראש ושירותי המעקב שמגיעים לרוב עם Android מהמפעל.

AOSP אינו רק למפתחים או חובבי טכנולוגיה; הוא לכל מי שמעריך חופש דיגיטלי. הוא מאפשר לך להשיב את השליטה על המכשיר שלך, להתאים אותו לצרכיך ללא ההגבלות של ספקים או יצרנים. גלה כיצד AOSP יכול לשנות את חוויית הנייד שלך. התחל את המסע שלך לעתיד פתוח וניתן להתאמה יותר עוד היום.","url_message":"בקר בקישור למטה למידע נוסף."},"bitcoin":{"name":"עלונים של מהפכת Bitcoin","title":"חוקים ללא שליטים","subtitle":"אל תתעלם","headline":"הצטרף למהפכת BITCOIN","content":"מה זה Bitcoin? זה יותר מסתם כסף דיגיטלי; זו טכנולוגיה מהפכנית שנועדה לפתור כמה מהבעיות הדחופות ביותר בעולם. Bitcoin פועל על רשת מבוזרת, חופשית משליטה של כל ממשלה או רשות מרכזית. זה מבטיח שאף אחד לא יכול לתמרן את ההיצע או הערך שלו, מה שהופך אותו לצורה בריאה של כסף שמגן על העושר שלך מפני אינפלציה.

המערכת הפיננסית הנוכחית שלנו בנויה על תמריצים פגומים—מעודדת חוב, תלות וריכוז כוח. Bitcoin משנה זאת על ידי יצירת מערכת שבה יושר, שקיפות ואחריות אישית מתוגמלים. ברשת Bitcoin, אין מקום לשחיתות או מניפולציה כי הכללים נאכפים על ידי מתמטיקה, לא על ידי אנשים.

Bitcoin מיישר תמריצים באופן שמקדם חשיבה ארוכת טווח, חיסכון וחדשנות. הוא מעצים אנשים לקחת שליטה על העתיד הפיננסי שלהם, ומטפח קהילה עולמית שבה ערך יכול להיות מועבר בחופשיות ובביטחון ללא מתווכים. לכן אנחנו צריכים Bitcoin—כי הוא יוצר עולם שבו תמריצים מיושרים כראוי, ומוביל לחברה הוגנת ומשגשגת יותר לכולם.

עשה את הצעד ללמוד עוד על Bitcoin וכיצד הוא יכול לשנות לא רק את החיים הפיננסיים שלך, אלא את העולם. קרע קישור משמאל וחקור את הטכנולוגיה פורצת הדרך הזו. הצטרף לתנועה לעתיד טוב יותר.","url_message":"עקוב אחר הקישור הזה למידע נוסף."},"jesus":{"name":"מסר משנה חיים","title":"בשורה טובה","subtitle":"אל תתעלם","headline":"גלה תקווה אמיתית","content":"מי הוא Jesus? הוא יותר מסתם דמות היסטורית; הוא בן האלוהים, מושיע העולם. Jesus עצמו אמר: 'אני הדרך, האמת והחיים. איש אינו בא אל האב אלא דרכי' (יוחנן 14:6). הוא בא לגשר על הפער בין אלוהים לאנושות, ומציע לנו דרך למחילה, שלום וחיי נצח.

כולנו מתמודדים עם שברון בחיינו—בין אם ביחסים שלנו, בלבנו או בעולמנו. Jesus בא לרפא את השברון הזה. הוא חי חיים מושלמים, מת על הצלב בעד חטאינו, וקם לתחייה, ניצח את המוות והעניק לנו את תקוות חיי הנצח עם אלוהים.

בלי Jesus, אנחנו אבודים בחטאנו, מופרדים מאלוהים. אבל דרכו, אנחנו יכולים לקבל מחילה ולהתחדש. הוא מציע לנו לא רק חיים טובים יותר עכשיו, אלא את ההבטחה לחיי נצח איתו. לכן אנחנו צריכים אותו—כי רק ב-Jesus אנחנו יכולים למצוא שלום אמיתי, תכלית והבטחת חיי נצח.

עשה את הצעד ללמוד עוד על Jesus וההשפעה משנת החיים שיכולה להיות לו בחייך. קרע קישור משמאל וחקור את תורתו. מצא את התקווה שחיפשת.","url_message":"עקוב אחר הקישור הזה למידע נוסף."},"meshtastic":{"name":"עלונים של רשת Meshtastic","title":"תקשורת מאובטחת","subtitle":"אל תתעלם","headline":"בנה את רשת החירום שלך","content":"למה Meshtastic? בזמני משבר, רשתות תקשורת מסורתיות עלולות לכשול ולהשאיר אותנו מבודדים ופגיעים. Meshtastic מספק פתרון רב-עוצמה—רשת תקשורת מקומית חלופית שפועלת באופן עצמאי ממערכות מרכזיות. הוא מתוכנן למצבי חירום, ומאפשר לך להישאר מחובר כשזה הכי חשוב.

מכשירי Meshtastic יוצרים רשת מש שיכולה להעביר הודעות על פני מרחקים ארוכים, גם ללא כיסוי אינטרנט או סלולר. גישה מבוזרת זו מבטיחה שהתקשורת שלך חסינה ואמינה, ללא קשר לנסיבות. אבל זה לא רק להישאר מחובר—Meshtastic גם מציע הצפנה, כך שההודעות שלך נשארות מאובטחות ופרטיות.

בעולם שבו הפרטיות נפגעת יותר ויותר, Meshtastic מעצים אותך לקחת שליטה על התקשורת שלך. בין אם אתה מתאם תגובה קהילתית מקומית, שומר על קשר עם יקיריך במהלך אסון, או פשוט מתכונן לבלתי צפוי, Meshtastic מספק את הכלים הדרושים לך לתקשר בבטחה וביעילות.

עשה את הצעד ללמוד עוד על Meshtastic וכיצד אתה יכול לבנות רשת תקשורת חירום משלך. קרע קישור משמאל וחקור את הטכנולוגיה החדשנית הזו. ודא שאתה מוכן לכל מה שעלול לבוא.","url_message":"עקוב אחר הקישור הזה למידע נוסף."},"nostr":{"name":"עלונים של פרוטוקול Nostr","title":"חופש חברתי","subtitle":"אל תתעלם","headline":"הצטרף לרשת העמידה בפני צנזורה","content":"מה זה Nostr? בניגוד לפלטפורמות מדיה חברתית מסורתיות, Nostr הוא פרוטוקול—מערכת מבוזרת שמעצימה משתמשים להתחבר ולשתף ללא המגבלות של רשות מרכזית. Nostr עמיד בפני צנזורה, כלומר הקול שלך לא יכול להשתתק על ידי תאגידים או ממשלות. הוא מתוכנן לתת לך שליטה על הנוכחות המקוונת שלך, חופשי מהשפעת אלגוריתמים או פרסומות שמעדיפים מעורבות על פני קשרים משמעותיים.

ב-Nostr, אין אג'נדות נסתרות שמחזיקות אותך בגלילה אינסופית. אתה מתקשר עם תוכן לפי התנאים שלך, לא על בסיס מה שאלגוריתם חושב שישאיר אותך מחובר הכי הרבה זמן. Nostr מאפשר לך לבנות קשרים אמיתיים ולהשתתף בשיחות שחשובות, הכל תוך שמירה על הפרטיות והאוטונומיה שלך.

בעולם שבו השיח המקוון נשלט ומתומרן יותר ויותר, Nostr מציע חלופה מרעננת. זו לא רק פלטפורמה; זו תנועה לכיוון חופש דיגיטלי אמיתי, שבו האינטראקציות שלך מונעות על ידי העניינים והערכים שלך, לא על ידי מה שמייצר הכי הרבה הכנסות מפרסום.

עשה את הצעד ללמוד עוד על Nostr וכיצד הוא יכול לשנות את הדרך שבה אתה מתחבר אונליין. קרע קישור משמאל וחקור את הפרוטוקול פורץ הדרך הזה. הצטרף לקהילה שמעריכה חופש ואינטראקציה אותנטית.","url_message":"עקוב אחר הקישור הזה למידע נוסף."},"voxvera":{"name":"עלונים להדפסה של Vox Vera","title":"סודי ביותר","subtitle":"~~לא~~ להפצה","headline":"מבצע VOX VERA","content":"השתחרר מהצנזורה עם VoxVera. כלי אנונימי לשיווק גרילה והפצת מסרים. בין אם באינטרנט ובין אם בעולם הפיזי, הוא יכול להעצים אותך להפיץ את הרעיונות שלך בתעוזה, מוגן באנונימיות מלאה (אם אתה מארח דרך Tor). הורד את הקוד, עצב אתר פלייר, ארח אותו אונליין והגבר את המסר שלך.

השתמש בכוח הממטי כדי לשתף את הרעיונות שלך בבית הספר, במקום העבודה, בקהילות מקוונות או אפילו ברמה עולמית. VoxVera מבטיחה שהמסר שלך יהדהד למרחקים, עם חלקים נתלשים הכוללים כתובות URL ייחודיות וקודי QR להדפסה חוזרת קלה.

ניתן לשמור על פרטיות. ניתן לשתף פליירים דרך רשת Tor, ובכך להגן על המארח ועל המשתמשים מפני צנזורה.

הצטרפו אלינו למהפכה שמעריכה אמת ושקיפות. יחד, נוכל לבנות רשת של אזרחים מושכלים שאינם פוחדים להתבטא.","url_message":"קבלו את VoxVera והתחילו להפיץ את המסר שלכם."}}},"hi":{"meta":{"language_name":"हिन्दी","flag":"🇮🇳","direction":"ltr"},"cli":{"dep_check_header":"निर्भरता की जांच","dep_found":"मिल गया","dep_missing":"लापता","all_deps_installed":"सभी निर्भरताएँ स्थापित हैं।","missing_deps_error":"कुछ निर्भरताएँ गायब हैं। चलाएँ: pip install 'voxvera[all]'","init_name":"नाम","init_folder":"फ़ोल्डर का नाम","init_title":"शीर्षक","init_subtitle":"उपशीर्षक","init_headline":"मुख्य शीर्षक","init_body":"संदेश का पाठ","init_links":"लिंक","edit_again":"फिर से संपादित करें?","body_length":"पाठ की लंबाई","body_limit_exceeded":"सीमा से अधिक है","url_label":"URL (सामग्री लिंक - बाहरी संसाधन)","url_message_label":"URL संदेश","footer_message_label":"फ़ुटर संदेश","template_not_found":"टेम्पलेट {name} नहीं मिला","template_copied":"टेम्पलेट {dest} पर कॉपी किया गया","flyer_created":"फ्लायर फाइलें {dest} के अंतर्गत बनाई गई हैं","dir_not_found":"निर्देशिका {dir_path} नहीं मिली","onionshare_error":"{folder_name} के लिए OnionShare अप्रत्याशित रूप से बंद हो गया।","onionshare_causes":"सामान्य कारण: नेटवर्क अवरुद्ध, गलत सिस्टम घड़ी, या OnionShare पहले से ही चल रहा है।","onionshare_logs_tip":"पूरे लॉग के लिए {logfile} देखें।","onion_url_msg":"[{folder_name}] ओनियन URL: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare चल रहा है (PID {pid})।","export_not_found":"त्रुटि: {host_root} में साइट फ़ोल्डर '{folder_name}' नहीं मिला","export_success":"'{folder_name}' को {output_path} पर निर्यात किया गया","export_all_none":"निर्यात करने के लिए कोई साइट नहीं मिली।","export_all_starting":"{count} साइटों को {dir} में निर्यात किया जा रहा है...","export_all_complete":"सभी निर्यात पूर्ण।","import_zip_not_found":"त्रुटि: ज़िप फ़ाइल '{path}' नहीं मिली।","import_invalid_config":"त्रुटि: अमान्य निर्यात फ़ाइल। 'config.json' गायब है।","import_invalid_folder":"त्रुटि: अमान्य config.json। 'folder_name' गायब है।","import_overwrite_confirm":"साइट '{folder_name}' पहले से मौजूद है। क्या आप इसे बदलना चाहते हैं?","import_cancelled":"आयात रद्द कर दिया गया।","import_success":"'{folder_name}' को सफलतापूर्वक {dest_dir} में आयात किया गया","import_dir_not_found":"त्रुटि: निर्देशिका '{dir}' नहीं मिली।","import_multiple_none":"{dir} में कोई ज़िप फ़ाइल नहीं मिली","import_multiple_found":"{dir} से {count} साइट(ओं) को आयात करने के लिए मिला...","importing_file":"{name} आयात किया जा रहा है...","import_multiple_complete":"एकाधिक आयात पूर्ण।","batch_import_none":"आयात में कोई JSON फ़ाइल नहीं मिली","batch_import_processing":"{file} को प्रोसेस किया जा रहा है","stop_server_not_running":"सर्वर {folder_name} नहीं चल रहा है।","stop_server_success":"{folder_name} बंद कर दिया गया (PID {pid})","delete_server_success":"सर्वर {folder_name} हटा दिया गया","manage_select_server":"प्रबंधित करने के लिए एक सर्वर चुनें (या बाहर निकलें):","manage_create_new":"--- नई साइट/फ्लायर बनाएँ ---","manage_start_all":"--- सभी साइटें शुरू करें ---","manage_stop_all":"--- सभी साइटें बंद करें ---","manage_export_all":"--- सभी साइटें निर्यात करें ---","manage_import_multiple":"--- एकाधिक साइटें आयात करें ---","manage_exit":"बाहर निकलें","manage_startup_summary":"स्टार्टअप सारांश","manage_press_enter":"जारी रखने के लिए एंटर दबाएं","manage_action_menu":"{name} प्रबंधित करें:","manage_action_toggle_stop":"रोकें","manage_action_toggle_start":"शुरू करें","manage_action_export":"ज़िप में निर्यात करें","manage_action_delete":"हटाएं","manage_action_back":"पीछे","manage_delete_confirm":"क्या आप वाकई {name} को हटाना चाहते हैं?","bootstrapping_msg":"[{name}] Tor रिले से जुड़ रहा है और हिडन सर्विस सेटअप कर रहा है...","bootstrapping_progress":"[{name}] Tor बूटस्ट्रैपिंग: {progress}% ...","no_urls_qr_skip":"अभी तक कोई URL कॉन्फ़िगर नहीं किया गया है। QR कोड 'voxvera serve' के बाद जेनरेट किए जाएंगे","input_file_not_found":"इनपुट फ़ाइल {path} मौजूद नहीं है।","attachment_path_label":"अटैचमेंट फ़ाइल पथ (वैकल्पिक - Tor साइट से परोसा जाएगा)","manage_action_edit":"संपादित करें","manage_templates":"--- टेम्पलेट से बनाएं ---","template_select":"एक टेम्पलेट चुनें:","body_over_limit_warning":"चेतावनी: मुख्य पाठ 1000 अक्षरों से अधिक है। यह पर्चे पर कटा हुआ दिख सकता है।","manage_action_export_keys":"कुंजियाँ निर्यात करें","manage_action_import_keys":"कुंजियाँ आयात करें","keys_not_found":"'{name}' के लिए सत्र कुंजी नहीं मिली। कुंजियाँ उत्पन्न करने के लिए पहले साइट शुरू करें।","keys_export_header":"'{name}' के लिए सत्र कुंजी:","keys_export_hint":"इस कुंजी को कॉपी करें और सुरक्षित रूप से सहेजें। पुनर्स्थापित करने के लिए किसी अन्य इंस्टेंस पर 'कुंजियाँ आयात करें' का उपयोग करें।","keys_site_not_found":"साइट '{name}' नहीं मिली।","keys_overwrite_confirm":"साइट '{name}' में पहले से कुंजी है। अधिलेखित करें?","keys_import_cancelled":"आयात रद्द किया गया।","keys_import_prompt":"नीचे base64 सत्र कुंजी चिपकाएँ:","keys_import_empty":"कोई कुंजी प्रदान नहीं की गई।","keys_import_invalid":"अमान्य कुंजी प्रारूप। एक वैध base64 स्ट्रिंग होनी चाहिए।","keys_import_success":"'{name}' के लिए सत्र कुंजी आयात की गई। नई कुंजी का उपयोग करने के लिए साइट को पुनः प्रारंभ करें।"},"web":{"tear_off_tor_browser":"Tor Browser का उपयोग करें","tear_off_desc":"इस संदेश को फैलाने में मदद करने के लिए यहाँ जाएँ","tear_off_footer":"प्रिंट करने के लिए नीचे दिए गए बटन पर क्लिक करें","built_with":"बनाया गया","print_button":"फ्लायर प्रिंट करें","download_button":"टूल और कोड डाउनलोड करें","download_attachment":"अटैचमेंट डाउनलोड करें"},"landing":{"title":"अति गोपनीय","subtitle":"~~वितरित न करें~~","headline":"ऑपरेशन VOX VERA","content":"VoxVera के साथ सेंसरशिप से मुक्त हों। एक गुमनाम गुरिल्ला मार्केटिंग और संदेश फैलाने वाला टूल। चाहे ऑनलाइन हो या भौतिक दुनिया में, यह आपको पूर्ण गुमनामी (यदि आप Tor पर होस्ट करते हैं) द्वारा सुरक्षित रहते हुए अपने विचारों को साहसपूर्वक फैलाने का अधिकार दे सकता है। कोड डाउनलोड करें, एक फ्लायर साइट डिज़ाइन करें, इसे ऑनलाइन होस्ट करें और अपने संदेश को बढ़ाएं।

अपने विचारों को अपने स्कूल, कार्यस्थल, ऑनलाइन समुदायों या विश्व स्तर पर साझा करने के लिए मेमेटिक शक्ति का उपयोग करें। VoxVera यह सुनिश्चित करता है कि आपका संदेश दूर-दूर तक गूंजे, जिसमें आसान पुनर्मुद्रण के लिए अद्वितीय URL और QR कोड वाले टियर-ऑफ सेक्शन हैं।

गोपनीयता बनाए रखी जा सकती है। फ्लायर्स को Tor नेटवर्क के माध्यम से साझा किया जा सकता है, जिससे होस्ट और उपयोगकर्ताओं को सेंसरशिप से बचाया जा सकता है।

एक ऐसी क्रांति में हमारे साथ जुड़ें जो सच्चाई और पारदर्शिता को महत्व देती है। साथ मिलकर, हम उन सूचित नागरिकों का एक नेटवर्क बना सकते हैं जो बोलने से नहीं डरते।","url_message":"VoxVera प्राप्त करें और अपना संदेश फैलाना शुरू करें।","name":"Vox Vera प्रिंट करने योग्य पर्चे"},"templates":{"aosp":{"name":"AOS प्रोजेक्ट","title":"ANDROID मुक्त","subtitle":"बिना सीमाओं के","headline":"ओपन-सोर्स स्वतंत्रता","content":"Android ओपन सोर्स प्रोजेक्ट (AOSP) उस सार का प्रतिनिधित्व करता है जो Android मूल रूप से होने का इरादा था: एक खुला, पारदर्शी और अनुकूलनीय प्लेटफॉर्म। यह मालिकाना सॉफ्टवेयर और कॉर्पोरेट निगरानी की परतों को हटा देता है जो मुख्यधारा Android वितरण का पर्याय बन गई हैं। AOSP के साथ, आपको Android का एक कच्चा, बिना फिल्टर किया हुआ संस्करण मिलता है, जो आपको वास्तव में अपने डिवाइस को अपना बनाने की अनुमति देता है।

डेवलपर्स के लिए, AOSP संभावनाओं का एक खेल का मैदान प्रदान करता है, जहां एकमात्र सीमाएं आपके कौशल और कल्पना हैं। यह अनगिनत कस्टम ROM के लिए आधार के रूप में कार्य करता है, जिनमें से प्रत्येक विशिष्ट आवश्यकताओं के लिए तैयार किया गया है, चाहे वह बेहतर प्रदर्शन, गोपनीयता या अनूठी सुविधाओं के लिए हो। गोपनीयता के शौकीन पहले से स्थापित ब्लोटवेयर और ट्रैकिंग सेवाओं की अनुपस्थिति की सराहना करेंगे।

AOSP केवल डेवलपर्स या तकनीक के शौकीनों के लिए नहीं है; यह किसी भी व्यक्ति के लिए है जो डिजिटल स्वतंत्रता को महत्व देता है। यह आपको अपने डिवाइस पर नियंत्रण वापस लेने की अनुमति देता है, इसे वाहकों या निर्माताओं की प्रतिबंधों के बिना अपनी आवश्यकताओं के अनुसार अनुकूलित करता है। जानें कि AOSP कैसे आपके मोबाइल अनुभव को बदल सकता है। आज ही एक अधिक खुले, अनुकूलन योग्य भविष्य की ओर अपनी यात्रा शुरू करें।","url_message":"अधिक जानने के लिए नीचे दिए गए लिंक पर जाएं।"},"bitcoin":{"name":"Bitcoin क्रांति पर्चे","title":"शासकों के बिना नियम","subtitle":"अनदेखा न करें","headline":"BITCOIN क्रांति में शामिल हों","content":"Bitcoin क्या है? यह केवल डिजिटल पैसा नहीं है; यह एक क्रांतिकारी तकनीक है जो दुनिया की कुछ सबसे गंभीर समस्याओं को हल करने के लिए डिज़ाइन की गई है। Bitcoin एक विकेंद्रीकृत नेटवर्क पर काम करता है, जो किसी भी सरकार या केंद्रीय प्राधिकरण के नियंत्रण से मुक्त है। यह सुनिश्चित करता है कि कोई भी इसकी आपूर्ति या मूल्य में हेरफेर नहीं कर सकता, जो इसे धन का एक स्वस्थ रूप बनाता है जो आपकी संपत्ति को मुद्रास्फीति से बचाता है।

हमारी वर्तमान वित्तीय प्रणाली दोषपूर्ण प्रोत्साहनों पर बनी है—कर्ज, निर्भरता और सत्ता के केंद्रीकरण को प्रोत्साहित करती है। Bitcoin इसे बदलता है एक ऐसी प्रणाली बनाकर जहां ईमानदारी, पारदर्शिता और व्यक्तिगत जिम्मेदारी को पुरस्कृत किया जाता है। Bitcoin नेटवर्क में, भ्रष्टाचार या हेरफेर के लिए कोई जगह नहीं है क्योंकि नियम गणित द्वारा लागू किए जाते हैं, लोगों द्वारा नहीं।

Bitcoin प्रोत्साहनों को इस तरह संरेखित करता है जो दीर्घकालिक सोच, बचत और नवाचार को बढ़ावा देता है। यह व्यक्तियों को अपने वित्तीय भविष्य पर नियंत्रण लेने का अधिकार देता है, एक वैश्विक समुदाय को बढ़ावा देता है जहां मूल्य बिचौलियों के बिना स्वतंत्र रूप से और सुरक्षित रूप से स्थानांतरित किया जा सकता है। इसलिए हमें Bitcoin की आवश्यकता है—क्योंकि यह एक ऐसी दुनिया बनाता है जहां प्रोत्साहन ठीक से संरेखित हैं, जो सभी के लिए अधिक न्यायसंगत और समृद्ध समाज की ओर ले जाता है।

Bitcoin के बारे में और जानने का कदम उठाएं कि यह न केवल आपके वित्तीय जीवन को, बल्कि दुनिया को कैसे बदल सकता है। बाईं ओर से एक लिंक फाड़ें और इस अभूतपूर्व तकनीक का पता लगाएं। बेहतर भविष्य की ओर आंदोलन में शामिल हों।","url_message":"अधिक जानने के लिए इस लिंक का अनुसरण करें।"},"jesus":{"name":"जीवन बदलने वाला संदेश","title":"शुभ समाचार","subtitle":"अनदेखा न करें","headline":"सच्ची आशा की खोज करें","content":"Jesus कौन हैं? वह केवल एक ऐतिहासिक व्यक्ति से कहीं अधिक हैं; वह परमेश्वर के पुत्र हैं, संसार के उद्धारकर्ता हैं। Jesus ने स्वयं कहा, 'मार्ग और सत्य और जीवन मैं ही हूं। बिना मेरे द्वारा कोई पिता के पास नहीं पहुंच सकता' (यूहन्ना 14:6)। वह परमेश्वर और मानवता के बीच की खाई को पाटने आए, हमें क्षमा, शांति और अनंत जीवन का मार्ग प्रदान करते हुए।

हम सभी अपने जीवन में टूटेपन का सामना करते हैं—चाहे वह हमारे रिश्तों में हो, हमारे दिलों में हो, या हमारी दुनिया में। Jesus उस टूटेपन को ठीक करने आए। उन्होंने एक सिद्ध जीवन जिया, हमारे पापों के लिए क्रूस पर मरे, और पुनर्जीवित हुए, मृत्यु को पराजित किया और हमें परमेश्वर के साथ अनंत जीवन की आशा दी।

Jesus के बिना, हम अपने पाप में खोए हुए हैं, परमेश्वर से अलग। लेकिन उनके माध्यम से, हम क्षमा और पुनर्स्थापित हो सकते हैं। वह हमें न केवल अब एक बेहतर जीवन प्रदान करते हैं, बल्कि उनके साथ अनंत जीवन का वादा भी। इसलिए हमें उनकी आवश्यकता है—क्योंकि केवल Jesus में ही हम सच्ची शांति, उद्देश्य और अनंत जीवन का आश्वासन पा सकते हैं।

Jesus के बारे में और उनके जीवन-बदलने वाले प्रभाव के बारे में जानने का कदम उठाएं। बाईं ओर से एक लिंक फाड़ें और उनकी शिक्षाओं का पता लगाएं। वह आशा खोजें जिसे आप ढूंढ रहे थे।","url_message":"अधिक जानने के लिए इस लिंक का अनुसरण करें।"},"meshtastic":{"name":"Meshtastic नेटवर्क पर्चे","title":"सुरक्षित संचार","subtitle":"अनदेखा न करें","headline":"अपना आपातकालीन नेटवर्क बनाएं","content":"Meshtastic क्यों? संकट के समय में, पारंपरिक संचार नेटवर्क विफल हो सकते हैं, जिससे हम अलग-थलग और असुरक्षित रह जाते हैं। Meshtastic एक शक्तिशाली समाधान प्रदान करता है—एक वैकल्पिक स्थानीय संचार नेटवर्क जो केंद्रीकृत प्रणालियों से स्वतंत्र रूप से काम करता है। यह आपातकालीन स्थितियों के लिए डिज़ाइन किया गया है, जो आपको सबसे ज़रूरी समय पर जुड़े रहने की अनुमति देता है।

Meshtastic उपकरण एक मेश नेटवर्क बनाते हैं जो इंटरनेट या सेलुलर कवरेज के बिना भी लंबी दूरी पर संदेश रिले कर सकता है। यह विकेंद्रीकृत दृष्टिकोण सुनिश्चित करता है कि आपके संचार किसी भी परिस्थिति में लचीले और विश्वसनीय हों। लेकिन यह केवल जुड़े रहने के बारे में नहीं है—Meshtastic एन्क्रिप्शन भी प्रदान करता है, ताकि आपके संदेश सुरक्षित और निजी रहें।

एक ऐसी दुनिया में जहां गोपनीयता तेजी से खतरे में है, Meshtastic आपको अपने संचार पर नियंत्रण लेने का अधिकार देता है। चाहे आप स्थानीय सामुदायिक प्रतिक्रिया का समन्वय कर रहे हों, किसी आपदा के दौरान प्रियजनों से संपर्क में रह रहे हों, या बस अप्रत्याशित के लिए तैयारी कर रहे हों, Meshtastic आपको सुरक्षित और प्रभावी ढंग से संवाद करने के लिए आवश्यक उपकरण प्रदान करता है।

Meshtastic के बारे में और जानने का कदम उठाएं कि आप अपना खुद का आपातकालीन संचार नेटवर्क कैसे बना सकते हैं। बाईं ओर से एक लिंक फाड़ें और इस नवीन तकनीक का पता लगाएं। सुनिश्चित करें कि आप जो भी आए उसके लिए तैयार हैं।","url_message":"अधिक जानने के लिए इस लिंक का अनुसरण करें।"},"nostr":{"name":"Nostr प्रोटोकॉल पर्चे","title":"सामाजिक स्वतंत्रता","subtitle":"अनदेखा न करें","headline":"सेंसरशिप-प्रतिरोधी नेटवर्क से जुड़ें","content":"Nostr क्या है? पारंपरिक सोशल मीडिया प्लेटफॉर्म के विपरीत, Nostr एक प्रोटोकॉल है—एक विकेंद्रीकृत प्रणाली जो उपयोगकर्ताओं को केंद्रीय प्राधिकरण की बाधाओं के बिना जुड़ने और साझा करने का अधिकार देती है। Nostr सेंसरशिप-प्रतिरोधी है, जिसका अर्थ है कि आपकी आवाज़ को कॉर्पोरेशनों या सरकारों द्वारा चुप नहीं कराया जा सकता। यह आपको आपकी ऑनलाइन उपस्थिति पर नियंत्रण देने के लिए डिज़ाइन किया गया है, एल्गोरिदम या विज्ञापनों के प्रभाव से मुक्त जो सार्थक कनेक्शन पर जुड़ाव को प्राथमिकता देते हैं।

Nostr पर, आपको अंतहीन स्क्रॉलिंग में बनाए रखने के लिए कोई छिपे हुए एजेंडे नहीं हैं। आप अपनी शर्तों पर सामग्री से जुड़ते हैं, न कि इस आधार पर कि एक एल्गोरिदम क्या सोचता है कि आपको सबसे लंबे समय तक ऑनलाइन रखेगा। Nostr आपको वास्तविक कनेक्शन बनाने और महत्वपूर्ण बातचीत में भाग लेने की अनुमति देता है, यह सब आपकी गोपनीयता और स्वायत्तता को बनाए रखते हुए।

एक ऐसी दुनिया में जहां ऑनलाइन भाषण को तेजी से नियंत्रित और हेरफेर किया जा रहा है, Nostr एक ताज़ा विकल्प प्रदान करता है। यह सिर्फ एक प्लेटफॉर्म नहीं है; यह सच्ची डिजिटल स्वतंत्रता की ओर एक आंदोलन है, जहां आपकी बातचीत आपकी रुचियों और मूल्यों से प्रेरित होती है, न कि जो सबसे अधिक विज्ञापन राजस्व उत्पन्न करता है।

Nostr के बारे में और जानने का कदम उठाएं कि यह आपके ऑनलाइन जुड़ने के तरीके को कैसे बदल सकता है। बाईं ओर से एक लिंक फाड़ें और इस अभूतपूर्व प्रोटोकॉल का पता लगाएं। एक ऐसे समुदाय से जुड़ें जो स्वतंत्रता और प्रामाणिक बातचीत को महत्व देता है।","url_message":"अधिक जानने के लिए इस लिंक का अनुसरण करें।"},"voxvera":{"name":"Vox Vera प्रिंट करने योग्य पर्चे","title":"अति गोपनीय","subtitle":"~~वितरित न करें~~","headline":"ऑपरेशन VOX VERA","content":"VoxVera के साथ सेंसरशिप से मुक्त हों। एक गुमनाम गुरिल्ला मार्केटिंग और संदेश फैलाने वाला टूल। चाहे ऑनलाइन हो या भौतिक दुनिया में, यह आपको पूर्ण गुमनामी (यदि आप Tor पर होस्ट करते हैं) द्वारा सुरक्षित रहते हुए अपने विचारों को साहसपूर्वक फैलाने का अधिकार दे सकता है। कोड डाउनलोड करें, एक फ्लायर साइट डिज़ाइन करें, इसे ऑनलाइन होस्ट करें और अपने संदेश को बढ़ाएं।

अपने विचारों को अपने स्कूल, कार्यस्थल, ऑनलाइन समुदायों या विश्व स्तर पर साझा करने के लिए मेमेटिक शक्ति का उपयोग करें। VoxVera यह सुनिश्चित करता है कि आपका संदेश दूर-दूर तक गूंजे, जिसमें आसान पुनर्मुद्रण के लिए अद्वितीय URL और QR कोड वाले टियर-ऑफ सेक्शन हैं।

गोपनीयता बनाए रखी जा सकती है। फ्लायर्स को Tor नेटवर्क के माध्यम से साझा किया जा सकता है, जिससे होस्ट और उपयोगकर्ताओं को सेंसरशिप से बचाया जा सकता है।

एक ऐसी क्रांति में हमारे साथ जुड़ें जो सच्चाई और पारदर्शिता को महत्व देती है। साथ मिलकर, हम उन सूचित नागरिकों का एक नेटवर्क बना सकते हैं जो बोलने से नहीं डरते।","url_message":"VoxVera प्राप्त करें और अपना संदेश फैलाना शुरू करें।"}}},"ja":{"meta":{"language_name":"日本語","flag":"🇯🇵","direction":"ltr"},"cli":{"dep_check_header":"依存関係の確認","dep_found":"検出済み","dep_missing":"未検出","all_deps_installed":"すべての依存関係がインストールされています。","missing_deps_error":"一部の依存関係が不足しています。実行してください: pip install 'voxvera[all]'","init_name":"名前","init_folder":"フォルダ名","init_title":"タイトル","init_subtitle":"サブタイトル","init_headline":"大見出し","init_body":"メッセージ本文","init_links":"リンク","edit_again":"再編集しますか?","body_length":"本文の長さ","body_limit_exceeded":"制限を超えています","url_label":"URL (コンテンツリンク - 外部リソース)","url_message_label":"URLメッセージ","footer_message_label":"フッターメッセージ","template_not_found":"テンプレート {name} が見つかりません","template_copied":"テンプレートを {dest} にコピーしました","flyer_created":"フライヤーファイルが {dest} に作成されました","dir_not_found":"ディレクトリ {dir_path} が見つかりません","onionshare_error":"{folder_name} の OnionShare が予期せず終了しました。","onionshare_causes":"主な原因: ネットワークの遮断、システム時刻の不一致、または OnionShare が既に実行されている可能性があります。","onionshare_logs_tip":"詳細は {logfile} のログを確認してください。","onion_url_msg":"[{folder_name}] オニオンURL: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare 実行中 (PID {pid})","export_not_found":"エラー: サイトフォルダ '{folder_name}' が {host_root} 内に見つかりません","export_success":"'{folder_name}' を {output_path} にエクスポートしました","export_all_none":"エクスポートするサイトが見つかりません。","export_all_starting":"{count} 個のサイトを {dir} にエクスポート中...","export_all_complete":"一括エクスポートが完了しました。","import_zip_not_found":"エラー: Zipファイル '{path}' が見つかりません。","import_invalid_config":"エラー: 無効なエクスポートファイルです。'config.json' がありません。","import_invalid_folder":"エラー: 無効な config.json です。'folder_name' がありません。","import_overwrite_confirm":"サイト '{folder_name}' は既に存在します。上書きしますか?","import_cancelled":"インポートをキャンセルしました。","import_success":"'{folder_name}' を {dest_dir} に正常にインポートしました","import_dir_not_found":"エラー: ディレクトリ '{dir}' が見つかりません。","import_multiple_none":"{dir} 内に Zipファイルが見つかりません","import_multiple_found":"{dir} から {count} 個のサイトをインポートします...","importing_file":"{name} をインポート中...","import_multiple_complete":"一括インポートが完了しました。","batch_import_none":"imports 内に JSONファイルが見つかりません","batch_import_processing":"{file} を処理中","stop_server_not_running":"サーバー {folder_name} は実行されていません。","stop_server_success":"{folder_name} を停止しました (PID {pid})","delete_server_success":"サーバー {folder_name} を削除しました","manage_select_server":"管理するサーバーを選択(または終了):","manage_create_new":"--- 新規サイト/フライヤー作成 ---","manage_start_all":"--- すべてのサイトを開始 ---","manage_stop_all":"--- すべてのサイトを停止 ---","manage_export_all":"--- すべてのサイトをエクスポート ---","manage_import_multiple":"--- 複数のサイトをインポート ---","manage_exit":"終了","manage_startup_summary":"起動サマリー","manage_press_enter":"Enterキーを押して続行","manage_action_menu":"{name} の管理:","manage_action_toggle_stop":"停止","manage_action_toggle_start":"開始","manage_action_export":"Zipとしてエクスポート","manage_action_delete":"削除","manage_action_back":"戻る","manage_delete_confirm":"本当に {name} を削除しますか?","bootstrapping_msg":"[{name}] Tor リレーに接続し、隠しサービスをセットアップ中...","bootstrapping_progress":"[{name}] Tor 起動中: {progress}% ...","no_urls_qr_skip":"URLがまだ設定されていません。QRコードは 'voxvera serve' の後に生成されます","input_file_not_found":"入力ファイル {path} が存在しません。","attachment_path_label":"添付ファイルのパス(任意 - Torサイトから配信されます)","manage_action_edit":"編集","manage_templates":"--- テンプレートから作成 ---","template_select":"テンプレートを選択してください:","body_over_limit_warning":"警告:本文が1000文字を超えています。チラシ上で途切れる可能性があります。","manage_action_export_keys":"鍵をエクスポート","manage_action_import_keys":"鍵をインポート","keys_not_found":"'{name}' のセッションキーが見つかりません。まずサイトを起動してキーを生成してください。","keys_export_header":"'{name}' のセッションキー:","keys_export_hint":"このキーをコピーして安全に保管してください。別のインスタンスで「鍵をインポート」を使用して復元できます。","keys_site_not_found":"サイト '{name}' が見つかりません。","keys_overwrite_confirm":"サイト '{name}' にはすでにキーがあります。上書きしますか?","keys_import_cancelled":"インポートがキャンセルされました。","keys_import_prompt":"base64セッションキーを以下に貼り付けてください:","keys_import_empty":"キーが提供されていません。","keys_import_invalid":"無効なキー形式です。有効なbase64文字列である必要があります。","keys_import_success":"'{name}' のセッションキーがインポートされました。新しいキーを使用するにはサイトを再起動してください。"},"web":{"tear_off_tor_browser":"Tor Browserを使用してください","tear_off_desc":"このメッセージを広めるには、こちらにアクセスしてください","tear_off_footer":"下のボタンをクリックして印刷してください","built_with":"built with","print_button":"フライヤーを印刷","download_button":"ツールとソースをダウンロード","download_attachment":"添付ファイルをダウンロード"},"landing":{"title":"極秘事項","subtitle":"~~配布禁止~~","headline":"作戦名:VOX VERA","content":"VoxVeraで検閲から解放されましょう。これは、匿名のゲリラマーケティングおよびメッセージ拡散ツールです。オンラインでも物理的な世界でも、Torを介したホスティングによって完全な匿名性に守られながら、自分の考えを大胆に広めることができます。コードをダウンロードし、フライヤーサイトをデザインし、オンラインで公開して、あなたのメッセージを増幅させてください。

ミームの力を利用して、学校、職場、オンラインコミュニティ、あるいは世界中にあなたのアイデアを共有しましょう。VoxVeraは、再印刷が簡単な独自のURLとQRコードを備えた切り取りセクションにより、あなたのメッセージが広く遠くまで響くことを保証します。

プライバシーは維持されます。フライヤーはTorネットワークを介して共有でき、ホスト側とユーザー側の両方を検閲から守ります。

真実と透明性を尊重する革命に加わりましょう。共に、声を上げることを恐れない、知識豊富な市民のネットワークを構築しましょう。","url_message":"VoxVeraを入手して、メッセージの拡散を始めましょう。","name":"Vox Vera 印刷用チラシ"},"templates":{"aosp":{"name":"AOSプロジェクト","title":"ANDROID 解放","subtitle":"制限なし","headline":"オープンソースの自由","content":"Android Open Source Project(AOSP)は、Androidが本来あるべき姿の本質を表しています:オープンで透明性があり、適応可能なプラットフォームです。メインストリームのAndroidディストリビューションの代名詞となったプロプライエタリソフトウェアと企業監視の層を取り除きます。AOSPを使用すると、フィルタリングされていない生のAndroidにアクセスでき、デバイスを真に自分のものにすることができます。

開発者にとって、AOSPは可能性の遊び場を提供し、唯一の制限はあなたのスキルと想像力です。パフォーマンスの向上、プライバシー、メインストリーム版にない独自の機能など、特定のニーズに合わせた無数のカスタムROMの基盤として機能します。プライバシー愛好家は、標準のAndroidに付属するプリインストールされたブロートウェアやトラッキングサービスがないことを高く評価するでしょう。

AOSPは開発者やテクノロジー愛好家だけのものではありません。デジタルの自由を重視するすべての人のためのものです。キャリアやメーカーの制限なしに、デバイスの制御を取り戻し、ニーズに合わせてカスタマイズすることができます。AOSPがあなたのモバイル体験をどのように変革できるかをご覧ください。より開かれた、カスタマイズ可能な未来への旅を今日から始めましょう。","url_message":"詳細については以下のリンクをご覧ください。"},"bitcoin":{"name":"Bitcoin革命チラシ","title":"支配者なきルール","subtitle":"無視しないでください","headline":"BITCOIN革命に参加しよう","content":"Bitcoinとは何か?それは単なるデジタルマネー以上のもので、世界で最も差し迫った問題を解決するために設計された革命的な技術です。Bitcoinは分散型ネットワーク上で動作し、いかなる政府や中央機関の制御からも自由です。これにより、誰もその供給量や価値を操作できないことが保証され、インフレからあなたの資産を守る健全な通貨となります。

現在の金融システムは欠陥のあるインセンティブの上に構築されています—負債、依存、権力の集中を促進しています。Bitcoinは、正直さ、透明性、個人の責任が報われるシステムを作ることで、これを変えます。Bitcoinネットワークでは、ルールは人ではなく数学によって施行されるため、腐敗や操作の余地はありません。

Bitcoinは長期的な思考、貯蓄、イノベーションを促進する方法でインセンティブを整合させます。個人が自分の経済的未来をコントロールする力を与え、仲介者なしで自由かつ安全に価値を移転できるグローバルコミュニティを育成します。だからこそBitcoinが必要なのです—インセンティブが適切に整合された世界を作り、すべての人にとってより公正で繁栄した社会につながるからです。

Bitcoinについて、そしてそれがあなたの経済生活だけでなく世界をどう変えることができるかを学ぶ一歩を踏み出してください。左からリンクを切り取り、この画期的な技術を探求してください。より良い未来への運動に参加しましょう。","url_message":"詳細についてはこのリンクをご覧ください。"},"jesus":{"name":"人生を変えるメッセージ","title":"良い知らせ","subtitle":"無視しないでください","headline":"真の希望を見つけよう","content":"Jesusとは誰か?彼は単なる歴史上の人物ではありません。彼は神の子であり、世界の救い主です。Jesus自身がこう言われました:「わたしは道であり、真理であり、命である。わたしを通らなければ、だれも父のもとに行くことができない」(ヨハネ14:6)。彼は神と人類の間の隔たりを埋めるために来られ、赦し、平和、永遠の命への道を私たちに提供してくださいました。

私たちは皆、人生の中で壊れを経験します—人間関係、心、あるいは世界においてです。Jesusはその壊れを癒すために来られました。完全な人生を送り、私たちの罪のために十字架で死に、そして復活し、死を打ち破り、神との永遠の命の希望を私たちに与えてくださいました。

Jesusなしでは、私たちは罪の中で迷い、神から引き離されています。しかし彼を通して、私たちは赦され、回復されることができます。彼は今のより良い人生だけでなく、彼との永遠の命の約束を私たちに提供してくださいます。だからこそ彼が必要なのです—Jesusの中にのみ、真の平和、目的、そして永遠の命の確信を見つけることができるからです。

Jesusについて、そして彼があなたの人生にもたらすことができる人生を変える影響について学ぶ一歩を踏み出してください。左からリンクを切り取り、その教えを探求してください。あなたが探していた希望を見つけてください。","url_message":"詳細についてはこのリンクをご覧ください。"},"meshtastic":{"name":"Meshtasticネットワークチラシ","title":"安全な通信","subtitle":"無視しないでください","headline":"緊急通信ネットワークを構築しよう","content":"なぜMeshtasticなのか?危機の時、従来の通信ネットワークは失敗し、私たちを孤立させ脆弱にする可能性があります。Meshtasticは強力な解決策を提供します—中央集権型システムから独立して動作する代替のローカル通信ネットワークです。緊急事態のために設計されており、最も重要な時に接続を維持することができます。

Meshtasticデバイスは、インターネットや携帯電話の電波がなくても、長距離にわたってメッセージを中継できるメッシュネットワークを構築します。この分散型アプローチにより、どのような状況でも通信が回復力があり信頼できることが保証されます。しかし、接続を維持するだけではありません—Meshtasticは暗号化も提供し、メッセージの安全性とプライバシーを確保します。

プライバシーがますます危険にさらされている世界で、Meshtasticはあなたに通信の制御を取り戻す力を与えます。地域のコミュニティ対応を調整する場合でも、災害時に大切な人と連絡を取り合う場合でも、単に予期せぬ事態に備える場合でも、Meshtasticは安全かつ効果的に通信するために必要なツールを提供します。

Meshtasticについて、そして独自の緊急通信ネットワークを構築する方法を学ぶ一歩を踏み出してください。左からリンクを切り取り、この革新的な技術を探求してください。何が起きても準備ができていることを確認しましょう。","url_message":"詳細についてはこのリンクをご覧ください。"},"nostr":{"name":"Nostrプロトコルチラシ","title":"ソーシャルフリーダム","subtitle":"無視しないでください","headline":"検閲に強いネットワークに参加しよう","content":"Nostrとは何か?従来のソーシャルメディアプラットフォームとは異なり、Nostrはプロトコルです—中央機関の制約なしにユーザーが接続し共有することを可能にする分散型システムです。Nostrは検閲に強く、あなたの声は企業や政府によって沈黙させられることはありません。エンゲージメントを意味のあるつながりよりも優先するアルゴリズムや広告の影響から自由に、オンラインプレゼンスの制御を提供するよう設計されています。

Nostrでは、あなたを無限スクロールに引き込む隠されたアジェンダはありません。アルゴリズムがあなたを最も長くオンラインに保つと考えるものではなく、あなた自身の条件でコンテンツと関わります。Nostrを使えば、プライバシーと自律性を維持しながら、本物のつながりを構築し、重要な会話に参加できます。

オンラインの言論がますます制御され操作される世界で、Nostrは新鮮な代替案を提供します。単なるプラットフォームではありません。それは真のデジタル自由への運動であり、あなたのインタラクションは最も多くの広告収入を生み出すものではなく、あなたの興味と価値観によって導かれます。

Nostrについて、そしてオンラインでの接続方法をどう変えることができるかを学ぶ一歩を踏み出してください。左からリンクを切り取り、この画期的なプロトコルを探求してください。自由と本物のインタラクションを重視するコミュニティに参加しましょう。","url_message":"詳細についてはこのリンクをご覧ください。"},"voxvera":{"name":"Vox Vera 印刷用チラシ","title":"極秘事項","subtitle":"~~配布禁止~~","headline":"作戦名:VOX VERA","content":"VoxVeraで検閲から解放されましょう。これは、匿名のゲリラマーケティングおよびメッセージ拡散ツールです。オンラインでも物理的な世界でも、Torを介したホスティングによって完全な匿名性に守られながら、自分の考えを大胆に広めることができます。コードをダウンロードし、フライヤーサイトをデザインし、オンラインで公開して、あなたのメッセージを増幅させてください。

ミームの力を利用して、学校、職場、オンラインコミュニティ、あるいは世界中にあなたのアイデアを共有しましょう。VoxVeraは、再印刷が簡単な独自のURLとQRコードを備えた切り取りセクションにより、あなたのメッセージが広く遠くまで響くことを保証します。

プライバシーは維持されます。フライヤーはTorネットワークを介して共有でき、ホスト側とユーザー側の両方を検閲から守ります。

真実と透明性を尊重する革命に加わりましょう。共に、声を上げることを恐れない、知識豊富な市民のネットワークを構築しましょう。","url_message":"VoxVeraを入手して、メッセージの拡散を始めましょう。"}}},"pt":{"meta":{"language_name":"Português","flag":"🇧🇷","direction":"ltr"},"cli":{"dep_check_header":"Verificação de Dependências","dep_found":"encontrado","dep_missing":"ausente","all_deps_installed":"Todas as dependências estão instaladas.","missing_deps_error":"Algumas dependências estão ausentes. Execute: pip install 'voxvera[all]'","init_name":"Nome","init_folder":"Nome da pasta","init_title":"Título","init_subtitle":"Subtítulo","init_headline":"Manchete","init_body":"Texto da mensagem","init_links":"Links","edit_again":"Editar novamente?","body_length":"Comprimento do corpo","body_limit_exceeded":"excede o limite","url_label":"URL (link de conteúdo - recurso externo)","url_message_label":"Mensagem da URL","footer_message_label":"Mensagem de rodapé","template_not_found":"Modelo {name} não encontrado","template_copied":"Modelo copiado para {dest}","flyer_created":"Arquivos do panfleto criados em {dest}","dir_not_found":"Diretório {dir_path} não encontrado","onionshare_error":"OnionShare para {folder_name} saiu inesperadamente.","onionshare_causes":"Causas comuns: Rede bloqueada, relógio do sistema impreciso ou OnionShare já em execução.","onionshare_logs_tip":"Veja {logfile} para logs completos.","onion_url_msg":"[{folder_name}] URL Onion: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare em execução (PID {pid}).","export_not_found":"Erro: Pasta do site '{folder_name}' não encontrada em {host_root}","export_success":"Exportado '{folder_name}' para {output_path}","export_all_none":"Nenhum site encontrado para exportar.","export_all_starting":"Exportando {count} sites para {dir}...","export_all_complete":"Exportação total concluída.","import_zip_not_found":"Erro: Arquivo Zip '{path}' não encontrado.","import_invalid_config":"Erro: Arquivo de exportação inválido. 'config.json' ausente.","import_invalid_folder":"Erro: config.json inválido. 'folder_name' ausente.","import_overwrite_confirm":"O site '{folder_name}' já existe. Sobrescrever?","import_cancelled":"Importação cancelada.","import_success":"Importado com sucesso '{folder_name}' para {dest_dir}","import_dir_not_found":"Erro: Diretório '{dir}' não encontrado.","import_multiple_none":"Nenhum arquivo zip encontrado em {dir}","import_multiple_found":"Encontrado {count} site(s) para importar de {dir}...","importing_file":"Importando {name}...","import_multiple_complete":"Importação múltipla concluída.","batch_import_none":"Nenhum arquivo JSON encontrado em imports","batch_import_processing":"Processando {file}","stop_server_not_running":"O servidor {folder_name} não está em execução.","stop_server_success":"Parado {folder_name} (PID {pid})","delete_server_success":"Servidor {folder_name} excluído","manage_select_server":"Selecione um servidor para gerenciar (ou Sair):","manage_create_new":"--- Criar Novo Site/Panfleto ---","manage_start_all":"--- Iniciar Todos os Sites ---","manage_stop_all":"--- Parar Todos os Sites ---","manage_export_all":"--- Exportar Todos os Sites ---","manage_import_multiple":"--- Importar Múltiplos Sites ---","manage_exit":"Sair","manage_startup_summary":"Resumo de Inicialização","manage_press_enter":"Pressione Enter para continuar","manage_action_menu":"Gerenciar {name}:","manage_action_toggle_stop":"Parar","manage_action_toggle_start":"Iniciar","manage_action_export":"Exportar para Zip","manage_action_delete":"Excluir","manage_action_back":"Voltar","manage_delete_confirm":"Tem certeza que deseja excluir {name}?","bootstrapping_msg":"[{name}] Conectando aos repetidores Tor e configurando serviço oculto...","bootstrapping_progress":"[{name}] Inicialização do Tor: {progress}% ...","no_urls_qr_skip":"Nenhuma URL configurada ainda. Os códigos QR serão gerados após 'voxvera serve'","input_file_not_found":"Arquivo de entrada {path} não existe.","attachment_path_label":"Caminho do arquivo anexo (opcional - será servido pelo site Tor)","manage_action_edit":"Editar","manage_templates":"--- Criar a partir de Modelo ---","template_select":"Selecione um modelo:","body_over_limit_warning":"Aviso: O texto do corpo excede 1000 caracteres. Pode ser cortado no panfleto.","manage_action_export_keys":"Exportar Chaves","manage_action_import_keys":"Importar Chaves","keys_not_found":"Nenhuma chave de sessão encontrada para '{name}'. Inicie o site primeiro para gerar as chaves.","keys_export_header":"Chave de sessão para '{name}':","keys_export_hint":"Copie esta chave e guarde-a com segurança. Use 'Importar Chaves' em outra instância para restaurar.","keys_site_not_found":"Site '{name}' não encontrado.","keys_overwrite_confirm":"O site '{name}' já possui uma chave. Sobrescrever?","keys_import_cancelled":"Importação cancelada.","keys_import_prompt":"Cole a chave de sessão base64 abaixo:","keys_import_empty":"Nenhuma chave fornecida.","keys_import_invalid":"Formato de chave inválido. Deve ser uma string base64 válida.","keys_import_success":"Chave de sessão importada para '{name}'. Reinicie o site para usar a nova chave."},"web":{"tear_off_tor_browser":"Use o Tor Browser","tear_off_desc":"para ajudar a espalhar esta mensagem vá para","tear_off_footer":"clique no botão abaixo para imprimir","built_with":"construído com","print_button":"Imprimir Panfleto","download_button":"Baixar Ferramenta e Código","download_attachment":"Baixar anexo"},"landing":{"title":"ALTO SECRETO","subtitle":"~~NÃO~~ DISTRIBUIR","headline":"OPERAÇÃO VOX VERA","content":"Liberte-se da censura com o VoxVera. Uma ferramenta anônima de marketing de guerrilha e propagação de mensagens. Seja online ou no mundo físico, ela pode capacitá-lo a espalhar suas ideias com audácia, protegido por anonimato completo (se você hospedar via Tor). Baixe o código, projete um site de panfleto, hospede-o online e amplifique sua mensagem.

Use o poder memético para compartilhar suas ideias em sua escola, local de trabalho, comunidades online ou até mesmo globalmente. O VoxVera garante que sua mensagem ressoe longe e amplamente, com seções destacáveis apresentando URLs e códigos QR exclusivos para fácil reimpressão.

A privacidade pode ser mantida. Panfletos podem ser compartilhados via rede Tor, protegendo quem hospeda e quem usa contra censura.

Junte-se a nós em uma revolução que valoriza a verdade e a transparência. Juntos, podemos construir uma rede de cidadãos informados que não têm medo de falar.","url_message":"Obtenha o VoxVera e comece a espalhar sua mensagem.","name":"Panfletos Imprimíveis Vox Vera"},"templates":{"aosp":{"name":"Projeto AOS","title":"ANDROID LIBERTADO","subtitle":"SEM FRONTEIRAS","headline":"LIBERDADE DE CÓDIGO ABERTO","content":"O Android Open Source Project (AOSP) representa a essência do que o Android foi originalmente projetado para ser: uma plataforma aberta, transparente e adaptável. Ele remove as camadas de software proprietário e supervisão corporativa que se tornaram sinônimo das distribuições Android tradicionais. Com o AOSP, você obtém acesso a uma versão crua e não filtrada do Android, permitindo que você realmente faça do seu dispositivo o seu próprio.

Para desenvolvedores, o AOSP oferece um playground de possibilidades, onde os únicos limites são suas habilidades e imaginação. Ele serve como base para inúmeras ROMs personalizadas, cada uma adaptada a necessidades específicas, seja para desempenho aprimorado, privacidade ou recursos exclusivos que as versões tradicionais não possuem. Os entusiastas da privacidade apreciarão a ausência de bloatware pré-instalado e serviços de rastreamento que frequentemente acompanham o Android de fábrica.

O AOSP não é apenas para desenvolvedores ou entusiastas de tecnologia; é para qualquer pessoa que valorize a liberdade digital. Ele permite que você recupere o controle do seu dispositivo, adaptando-o às suas necessidades sem as restrições de operadoras ou fabricantes. Descubra como o AOSP pode transformar sua experiência móvel. Comece sua jornada rumo a um futuro mais aberto e personalizável hoje.","url_message":"Visite o link abaixo para saber mais."},"bitcoin":{"name":"Panfletos da Revolução Bitcoin","title":"REGRAS SEM GOVERNANTES","subtitle":"NÃO IGNORE","headline":"JUNTE-SE À REVOLUÇÃO BITCOIN","content":"O que é Bitcoin? É mais do que apenas dinheiro digital; é uma tecnologia revolucionária projetada para resolver alguns dos problemas mais urgentes do mundo. O Bitcoin opera em uma rede descentralizada, livre do controle de qualquer governo ou autoridade central. Isso garante que ninguém possa manipular sua oferta ou valor, tornando-o uma forma sólida de dinheiro que protege sua riqueza da inflação.

Nosso sistema financeiro atual é construído sobre incentivos falhos—encorajando dívida, dependência e centralização de poder. O Bitcoin muda isso criando um sistema onde honestidade, transparência e responsabilidade individual são recompensadas. Na rede Bitcoin, não há espaço para corrupção ou manipulação porque as regras são aplicadas pela matemática, não por pessoas.

O Bitcoin alinha incentivos de forma a promover pensamento de longo prazo, poupança e inovação. Ele capacita indivíduos a assumir o controle de seu futuro financeiro, fomentando uma comunidade global onde valor pode ser transferido livre e seguramente sem intermediários. É por isso que precisamos do Bitcoin—porque ele cria um mundo onde os incentivos estão corretamente alinhados, levando a uma sociedade mais justa e próspera para todos.

Dê o passo para aprender mais sobre Bitcoin e como ele pode transformar não apenas sua vida financeira, mas o mundo. Destaque um link à esquerda e explore esta tecnologia revolucionária. Junte-se ao movimento por um futuro melhor.","url_message":"Siga este link para saber mais."},"jesus":{"name":"Mensagem que Muda Vidas","title":"BOAS NOVAS","subtitle":"NÃO IGNORE","headline":"DESCUBRA A VERDADEIRA ESPERANÇA","content":"Quem é Jesus? Ele é mais do que apenas uma figura histórica; Ele é o Filho de Deus, o Salvador do mundo. O próprio Jesus disse: 'Eu sou o caminho, a verdade e a vida. Ninguém vem ao Pai senão por mim' (João 14:6). Ele veio para preencher a lacuna entre Deus e a humanidade, oferecendo-nos um caminho para o perdão, a paz e a vida eterna.

Todos nós enfrentamos quebrantamento em nossas vidas—seja em nossos relacionamentos, nossos corações ou nosso mundo. Jesus veio para curar esse quebrantamento. Ele viveu uma vida perfeita, morreu na cruz pelos nossos pecados e ressuscitou, vencendo a morte e oferecendo-nos a esperança da vida eterna com Deus.

Sem Jesus, estamos perdidos em nosso pecado, separados de Deus. Mas através Dele, podemos ser perdoados e restaurados. Ele nos oferece não apenas uma vida melhor agora, mas a promessa de uma vida eterna com Ele. É por isso que precisamos Dele—porque somente em Jesus podemos encontrar verdadeira paz, propósito e a garantia da vida eterna.

Dê o passo para aprender mais sobre Jesus e o impacto transformador que Ele pode ter em sua vida. Destaque um link à esquerda e explore Seus ensinamentos. Encontre a esperança que você tem buscado.","url_message":"Siga este link para saber mais."},"meshtastic":{"name":"Panfletos da Rede Meshtastic","title":"COMUNICAÇÕES SEGURAS","subtitle":"NÃO IGNORE","headline":"CONSTRUA SUA REDE DE EMERGÊNCIA","content":"Por que Meshtastic? Em tempos de crise, as redes de comunicação tradicionais podem falhar, deixando-nos isolados e vulneráveis. O Meshtastic oferece uma solução poderosa—uma rede de comunicação local alternativa que opera independentemente de sistemas centralizados. Ele é projetado para situações de emergência, permitindo que você permaneça conectado quando mais importa.

Os dispositivos Meshtastic criam uma rede mesh que pode retransmitir mensagens por longas distâncias, mesmo sem cobertura de internet ou celular. Essa abordagem descentralizada garante que suas comunicações sejam resilientes e confiáveis, independentemente das circunstâncias. Mas não se trata apenas de permanecer conectado—o Meshtastic também oferece criptografia, para que suas mensagens permaneçam seguras e privadas.

Em um mundo onde a privacidade está cada vez mais comprometida, o Meshtastic capacita você a assumir o controle de sua comunicação. Seja coordenando uma resposta comunitária local, mantendo contato com entes queridos durante um desastre ou simplesmente se preparando para o inesperado, o Meshtastic fornece as ferramentas necessárias para se comunicar de forma segura e eficaz.

Dê o passo para aprender mais sobre Meshtastic e como você pode construir sua própria rede de comunicação de emergência. Destaque um link à esquerda e explore esta tecnologia inovadora. Garanta que você esteja preparado para o que vier.","url_message":"Siga este link para saber mais."},"nostr":{"name":"Panfletos do Protocolo Nostr","title":"LIBERDADE SOCIAL","subtitle":"NÃO IGNORE","headline":"JUNTE-SE À REDE RESISTENTE À CENSURA","content":"O que é Nostr? Ao contrário das plataformas de mídia social tradicionais, Nostr é um protocolo—um sistema descentralizado que capacita os usuários a se conectar e compartilhar sem as restrições de uma autoridade central. Nostr é resistente à censura, o que significa que sua voz não pode ser silenciada por corporações ou governos. Ele é projetado para dar a você controle sobre sua presença online, livre da influência de algoritmos ou anúncios que priorizam engajamento sobre conexões significativas.

No Nostr, não há agendas ocultas para mantê-lo rolando infinitamente. Você interage com o conteúdo em seus próprios termos, não com base no que um algoritmo pensa que vai mantê-lo online por mais tempo. O Nostr permite que você construa conexões genuínas e participe de conversas que importam, tudo enquanto mantém sua privacidade e autonomia.

Em um mundo onde o discurso online é cada vez mais controlado e manipulado, o Nostr oferece uma alternativa refrescante. Não é apenas uma plataforma; é um movimento em direção à verdadeira liberdade digital, onde suas interações são guiadas por seus interesses e valores, não pelo que gera mais receita publicitária.

Dê o passo para aprender mais sobre Nostr e como ele pode transformar a maneira como você se conecta online. Destaque um link à esquerda e explore este protocolo revolucionário. Junte-se a uma comunidade que valoriza liberdade e interação autêntica.","url_message":"Siga este link para saber mais."},"voxvera":{"name":"Panfletos Imprimíveis Vox Vera","title":"ALTO SECRETO","subtitle":"~~NÃO~~ DISTRIBUIR","headline":"OPERAÇÃO VOX VERA","content":"Liberte-se da censura com o VoxVera. Uma ferramenta anônima de marketing de guerrilha e propagação de mensagens. Seja online ou no mundo físico, ela pode capacitá-lo a espalhar suas ideias com audácia, protegido por anonimato completo (se você hospedar via Tor). Baixe o código, projete um site de panfleto, hospede-o online e amplifique sua mensagem.

Use o poder memético para compartilhar suas ideias em sua escola, local de trabalho, comunidades online ou até mesmo globalmente. O VoxVera garante que sua mensagem ressoe longe e amplamente, com seções destacáveis apresentando URLs e códigos QR exclusivos para fácil reimpressão.

A privacidade pode ser mantida. Panfletos podem ser compartilhados via rede Tor, protegendo quem hospeda e quem usa contra censura.

Junte-se a nós em uma revolução que valoriza a verdade e a transparência. Juntos, podemos construir uma rede de cidadãos informados que não têm medo de falar.","url_message":"Obtenha o VoxVera e comece a espalhar sua mensagem."}}},"ru":{"meta":{"language_name":"Русский","flag":"🇷🇺","direction":"ltr"},"cli":{"dep_check_header":"Проверка зависимостей","dep_found":"найдено","dep_missing":"отсутствует","all_deps_installed":"Все зависимости установлены.","missing_deps_error":"Некоторые зависимости отсутствуют. Выполните: pip install 'voxvera[all]'","init_name":"Имя","init_folder":"Имя папки","init_title":"Заголовок","init_subtitle":"Подзаголовок","init_headline":"Главный заголовок","init_body":"Текст сообщения","init_links":"Ссылки","edit_again":"Редактировать снова?","body_length":"Длина текста","body_limit_exceeded":"превышает лимит","url_label":"URL (ссылка на контент - внешний ресурс)","url_message_label":"Сообщение URL","footer_message_label":"Сообщение внизу страницы","template_not_found":"Шаблон {name} не найден","template_copied":"Шаблон скопирован в {dest}","flyer_created":"Файлы листовки созданы в {dest}","dir_not_found":"Директория {dir_path} не найдена","onionshare_error":"OnionShare для {folder_name} неожиданно завершил работу.","onionshare_causes":"Общие причины: заблокирована сеть, неточное системное время или OnionShare уже запущен.","onionshare_logs_tip":"Полные логи см. в {logfile}.","onion_url_msg":"[{folder_name}] Onion-URL: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare запущен (PID {pid}).","export_not_found":"Ошибка: папка сайта '{folder_name}' не найдена в {host_root}","export_success":"Экспортировано '{folder_name}' в {output_path}","export_all_none":"Сайты для экспорта не найдены.","export_all_starting":"Экспорт {count} сайтов в {dir}...","export_all_complete":"Общий экспорт завершен.","import_zip_not_found":"Ошибка: Zip-файл '{path}' не найден.","import_invalid_config":"Ошибка: неверный файл экспорта. Отсутствует 'config.json'.","import_invalid_folder":"Ошибка: неверный config.json. Отсутствует 'folder_name'.","import_overwrite_confirm":"Сайт '{folder_name}' уже существует. Перезаписать?","import_cancelled":"Импорт отменен.","import_success":"Сайт '{folder_name}' успешно импортирован в {dest_dir}","import_dir_not_found":"Ошибка: Директория '{dir}' не найдена.","import_multiple_none":"Zip-файлы в {dir} не найдены","import_multiple_found":"Найдено {count} сайт(ов) для импорта из {dir}...","importing_file":"Импорт {name}...","import_multiple_complete":"Множественный импорт завершен.","batch_import_none":"JSON-файлы в imports не найдены","batch_import_processing":"Обработка {file}","stop_server_not_running":"Сервер {folder_name} не запущен.","stop_server_success":"{folder_name} остановлен (PID {pid})","delete_server_success":"Сервер {folder_name} удален","manage_select_server":"Выберите сервер для управления (или Выход):","manage_create_new":"--- Создать новый сайт/листовку ---","manage_start_all":"--- Запустить все сайты ---","manage_stop_all":"--- Остановить все сайты ---","manage_export_all":"--- Экспортировать все сайты ---","manage_import_multiple":"--- Импортировать несколько сайтов ---","manage_exit":"Выход","manage_startup_summary":"Сводка запуска","manage_press_enter":"Нажмите Enter для продолжения","manage_action_menu":"Управление {name}:","manage_action_toggle_stop":"Остановить","manage_action_toggle_start":"Запустить","manage_action_export":"Экспорт в Zip","manage_action_delete":"Удалить","manage_action_back":"Назад","manage_delete_confirm":"Вы уверены, что хотите удалить {name}?","bootstrapping_msg":"[{name}] Подключение к реле Tor и настройка скрытого сервиса...","bootstrapping_progress":"[{name}] Загрузка Tor: {progress}% ...","no_urls_qr_skip":"URL еще не настроены. QR-коды будут созданы после 'voxvera serve'","input_file_not_found":"Входной файл {path} не существует.","attachment_path_label":"Путь к файлу вложения (необязательно - будет доступен с сайта Tor)","manage_action_edit":"Редактировать","manage_templates":"--- Создать из шаблона ---","template_select":"Выберите шаблон:","body_over_limit_warning":"Предупреждение: Текст превышает 1000 символов. Он может быть обрезан на листовке.","manage_action_export_keys":"Экспорт ключей","manage_action_import_keys":"Импорт ключей","keys_not_found":"Сессионный ключ для '{name}' не найден. Сначала запустите сайт для генерации ключей.","keys_export_header":"Сессионный ключ для '{name}':","keys_export_hint":"Скопируйте этот ключ и сохраните его в безопасности. Используйте 'Импорт ключей' на другом экземпляре для восстановления.","keys_site_not_found":"Сайт '{name}' не найден.","keys_overwrite_confirm":"У сайта '{name}' уже есть ключ. Перезаписать?","keys_import_cancelled":"Импорт отменён.","keys_import_prompt":"Вставьте сессионный ключ base64 ниже:","keys_import_empty":"Ключ не предоставлен.","keys_import_invalid":"Неверный формат ключа. Должна быть допустимая строка base64.","keys_import_success":"Сессионный ключ импортирован для '{name}'. Перезапустите сайт для использования нового ключа."},"web":{"tear_off_tor_browser":"Используйте Tor Browser","tear_off_desc":"чтобы помочь распространить это сообщение, перейдите на","tear_off_footer":"нажмите кнопку ниже, чтобы распечатать","built_with":"создано с помощью","print_button":"Печать листовки","download_button":"Скачать инструмент и код","download_attachment":"Скачать вложение"},"landing":{"title":"СОВЕРШЕННО СЕКРЕТНО","subtitle":"~~НЕ~~ РАСПРОСТРАНЯТЬ","headline":"ОПЕРАЦИЯ VOX VERA","content":"Освободитесь от цензуры с помощью VoxVera. Анонимный инструмент для партизанского маркетинга и распространения сообщений. Будь то в сети или в физическом мире, он дает вам возможность смело распространять свои идеи, будучи защищенным полной анонимностью (при хостинге через Tor). Скачайте код, создайте сайт-листовку, разместите его в сети и усильте свой голос.

Используйте силу мемов, чтобы поделиться своими идеями в школе, на работе, в онлайн-сообществах или даже по всему миру. VoxVera гарантирует, что ваше сообщение найдет отклик повсюду, благодаря отрывным разделам с уникальными URL-адресами и QR-кодами для легкой перепечатки.

Конфиденциальность может быть сохранена. Листовками можно делиться через сеть Tor, защищая хостера и пользователей от цензуры.

Присоединяйтесь к нам в революции, которая ценит правду и прозрачность. Вместе мы сможем построить сеть информированных граждан, которые не боятся высказываться.","url_message":"Получите VoxVera и начните распространять свое сообщение.","name":"Листовки Vox Vera для печати"},"templates":{"aosp":{"name":"Проект AOS","title":"ANDROID БЕЗ ОКОВ","subtitle":"БЕЗ ГРАНИЦ","headline":"СВОБОДА ОТКРЫТОГО КОДА","content":"Android Open Source Project (AOSP) воплощает суть того, чем Android изначально должен был быть: открытая, прозрачная и адаптируемая платформа. Он удаляет слои проприетарного программного обеспечения и корпоративного контроля, ставшие синонимом основных дистрибутивов Android. С AOSP вы получаете доступ к сырой, нефильтрованной версии Android, позволяющей по-настоящему сделать устройство своим.

Для разработчиков AOSP предлагает площадку возможностей, где единственные ограничения — это ваши навыки и воображение. Он служит основой для бесчисленных пользовательских прошивок, каждая из которых адаптирована под конкретные нужды: улучшенная производительность, конфиденциальность или уникальные функции, отсутствующие в массовых версиях. Энтузиасты приватности оценят отсутствие предустановленного раздутого ПО и служб отслеживания, которые часто поставляются со стоковым Android.

AOSP не только для разработчиков или техноэнтузиастов — он для всех, кто ценит цифровую свободу. Он позволяет вернуть контроль над своим устройством, настроив его под свои нужды без ограничений операторов или производителей. Узнайте, как AOSP может преобразить ваш мобильный опыт. Начните свой путь к более открытому, настраиваемому будущему уже сегодня.","url_message":"Перейдите по ссылке ниже, чтобы узнать больше."},"bitcoin":{"name":"Листовки революции Bitcoin","title":"ПРАВИЛА БЕЗ ПРАВИТЕЛЕЙ","subtitle":"НЕ ИГНОРИРУЙТЕ","headline":"ПРИСОЕДИНЯЙТЕСЬ К РЕВОЛЮЦИИ BITCOIN","content":"Что такое Bitcoin? Это больше, чем цифровые деньги — это революционная технология, призванная решить одни из самых насущных проблем мира. Bitcoin работает в децентрализованной сети, свободной от контроля любого правительства или центрального органа. Это гарантирует, что никто не сможет манипулировать его предложением или стоимостью, делая его надёжной формой денег, защищающей ваше богатство от инфляции.

Наша нынешняя финансовая система построена на ущербных стимулах — поощряя долг, зависимость и централизацию власти. Bitcoin меняет это, создавая систему, где честность, прозрачность и личная ответственность вознаграждаются. В сети Bitcoin нет места коррупции или манипуляциям, потому что правила обеспечиваются математикой, а не людьми.

Bitcoin выстраивает стимулы таким образом, чтобы способствовать долгосрочному мышлению, сбережениям и инновациям. Он даёт людям возможность контролировать своё финансовое будущее, создавая глобальное сообщество, где ценность может передаваться свободно и безопасно без посредников. Вот почему нам нужен Bitcoin — потому что он создаёт мир, где стимулы правильно выстроены, ведя к более справедливому и процветающему обществу для всех.

Сделайте шаг, чтобы узнать больше о Bitcoin и о том, как он может преобразить не только вашу финансовую жизнь, но и весь мир. Оторвите ссылку слева и исследуйте эту прорывную технологию. Присоединяйтесь к движению за лучшее будущее.","url_message":"Перейдите по этой ссылке, чтобы узнать больше."},"jesus":{"name":"Послание, изменяющее жизнь","title":"БЛАГАЯ ВЕСТЬ","subtitle":"НЕ ИГНОРИРУЙТЕ","headline":"ОТКРОЙТЕ ИСТИННУЮ НАДЕЖДУ","content":"Кто такой Jesus? Он больше, чем просто историческая личность — Он Сын Божий, Спаситель мира. Сам Jesus сказал: «Я есмь путь и истина и жизнь. Никто не приходит к Отцу, как только через Меня» (Иоанна 14:6). Он пришёл, чтобы перекинуть мост между Богом и человечеством, предлагая нам путь к прощению, миру и вечной жизни.

Все мы сталкиваемся с разрушением в нашей жизни — будь то в отношениях, в сердцах или в нашем мире. Jesus пришёл исцелить это разрушение. Он прожил совершенную жизнь, умер на кресте за наши грехи и воскрес, победив смерть и даровав нам надежду на вечную жизнь с Богом.

Без Jesus мы потеряны в своём грехе, отделены от Бога. Но через Него мы можем быть прощены и восстановлены. Он предлагает нам не только лучшую жизнь сейчас, но и обещание вечной жизни с Ним. Вот почему Он нам нужен — потому что только в Jesus мы можем найти истинный мир, цель и уверенность в вечной жизни.

Сделайте шаг, чтобы узнать больше о Jesus и о жизнеизменяющем влиянии, которое Он может оказать на вашу жизнь. Оторвите ссылку слева и исследуйте Его учение. Найдите надежду, которую вы искали.","url_message":"Перейдите по этой ссылке, чтобы узнать больше."},"meshtastic":{"name":"Листовки сети Meshtastic","title":"ЗАЩИЩЁННАЯ СВЯЗЬ","subtitle":"НЕ ИГНОРИРУЙТЕ","headline":"СОЗДАЙТЕ СВОЮ АВАРИЙНУЮ СЕТЬ","content":"Почему Meshtastic? Во время кризиса традиционные сети связи могут выйти из строя, оставив нас изолированными и уязвимыми. Meshtastic предоставляет мощное решение — альтернативную локальную сеть связи, работающую независимо от централизованных систем. Она разработана для чрезвычайных ситуаций, позволяя оставаться на связи, когда это важнее всего.

Устройства Meshtastic создают ячеистую сеть, способную передавать сообщения на большие расстояния даже без покрытия интернета или сотовой связи. Этот децентрализованный подход обеспечивает устойчивость и надёжность вашей связи при любых обстоятельствах. Но дело не только в поддержании связи — Meshtastic также предлагает шифрование, чтобы ваши сообщения оставались безопасными и конфиденциальными.

В мире, где конфиденциальность всё больше нарушается, Meshtastic даёт вам возможность контролировать свою связь. Координируете ли вы местное реагирование сообщества, поддерживаете связь с близкими во время катастрофы или просто готовитесь к неожиданностям — Meshtastic предоставляет инструменты для безопасного и эффективного общения.

Сделайте шаг, чтобы узнать больше о Meshtastic и о том, как построить собственную аварийную сеть связи. Оторвите ссылку слева и исследуйте эту инновационную технологию. Убедитесь, что вы готовы к чему угодно.","url_message":"Перейдите по этой ссылке, чтобы узнать больше."},"nostr":{"name":"Листовки протокола Nostr","title":"СОЦИАЛЬНАЯ СВОБОДА","subtitle":"НЕ ИГНОРИРУЙТЕ","headline":"ПРИСОЕДИНЯЙТЕСЬ К ЦЕНЗУРОУСТОЙЧИВОЙ СЕТИ","content":"Что такое Nostr? В отличие от традиционных платформ социальных сетей, Nostr — это протокол, децентрализованная система, позволяющая пользователям подключаться и делиться без ограничений центральной власти. Nostr устойчив к цензуре — это значит, что ваш голос не может быть заглушён корпорациями или правительствами. Он создан, чтобы дать вам контроль над вашим онлайн-присутствием, свободным от влияния алгоритмов или рекламы, которые ставят вовлечённость выше осмысленных связей.

В Nostr нет скрытых намерений удержать вас в бесконечной прокрутке. Вы взаимодействуете с контентом на своих условиях, а не на основе того, что алгоритм считает способным удержать вас онлайн дольше всего. Nostr позволяет строить подлинные связи и участвовать в значимых беседах, сохраняя при этом вашу конфиденциальность и автономию.

В мире, где онлайн-речь всё больше контролируется и манипулируется, Nostr предлагает освежающую альтернативу. Это не просто платформа — это движение к настоящей цифровой свободе, где ваши взаимодействия определяются вашими интересами и ценностями, а не тем, что приносит наибольший рекламный доход.

Сделайте шаг, чтобы узнать больше о Nostr и о том, как он может изменить способ вашего общения онлайн. Оторвите ссылку слева и исследуйте этот прорывной протокол. Присоединяйтесь к сообществу, которое ценит свободу и подлинное взаимодействие.","url_message":"Перейдите по этой ссылке, чтобы узнать больше."},"voxvera":{"name":"Листовки Vox Vera для печати","title":"СОВЕРШЕННО СЕКРЕТНО","subtitle":"~~НЕ~~ РАСПРОСТРАНЯТЬ","headline":"ОПЕРАЦИЯ VOX VERA","content":"Освободитесь от цензуры с помощью VoxVera. Анонимный инструмент для партизанского маркетинга и распространения сообщений. Будь то в сети или в физическом мире, он дает вам возможность смело распространять свои идеи, будучи защищенным полной анонимностью (при хостинге через Tor). Скачайте код, создайте сайт-листовку, разместите его в сети и усильте свой голос.

Используйте силу мемов, чтобы поделиться своими идеями в школе, на работе, в онлайн-сообществах или даже по всему миру. VoxVera гарантирует, что ваше сообщение найдет отклик повсюду, благодаря отрывным разделам с уникальными URL-адресами и QR-кодами для легкой перепечатки.

Конфиденциальность может быть сохранена. Листовками можно делиться через сеть Tor, защищая хостера и пользователей от цензуры.

Присоединяйтесь к нам в революции, которая ценит правду и прозрачность. Вместе мы сможем построить сеть информированных граждан, которые не боятся высказываться.","url_message":"Получите VoxVera и начните распространять свое сообщение."}}},"sw":{"meta":{"language_name":"Kiswahili","flag":"🇰🇪","direction":"ltr"},"cli":{"dep_check_header":"Ukaguzi wa Vitegemezi","dep_found":"imepatikana","dep_missing":"haikupatikana","all_deps_installed":"Vitegemezi vyote vimesakinishwa.","missing_deps_error":"Baadhi ya vitegemezi havipo. Tekeleza: pip install 'voxvera[all]'","init_name":"Jina","init_folder":"Jina la Folda","init_title":"Kichwa cha Habari","init_subtitle":"Kichwa kidogo","init_headline":"Kichwa kikuu","init_body":"Maandishi ya ujumbe","init_links":"Viungo","edit_again":"Hariri tena?","body_length":"Urefu wa maandishi","body_limit_exceeded":"imezidi kikomo","url_label":"URL (kiungo cha maudhui - rasilimali ya nje)","url_message_label":"Ujumbe wa URL","footer_message_label":"Ujumbe wa chini ya ukurasa","template_not_found":"Kiolezo {name} hakijapatikana","template_copied":"Kiolezo kimeandaliwa kwenda {dest}","flyer_created":"Faili za kipeperushi zimeundwa chini ya {dest}","dir_not_found":"Folda {dir_path} haijapatikana","onionshare_error":"OnionShare ya {folder_name} imekatika ghafla.","onionshare_causes":"Sababu za kawaida: Mtandao umezuiwa, saa ya mfumo sio sahihi, au OnionShare tayari inafanya kazi.","onionshare_logs_tip":"Angalia {logfile} kwa kumbukumbu kamili.","onion_url_msg":"[{folder_name}] URL ya Onion: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare inafanya kazi (PID {pid}).","export_not_found":"Hitilafu: Folda ya tovuti '{folder_name}' haijapatikana katika {host_root}","export_success":"Imehamishwa '{folder_name}' kwenda {output_path}","export_all_none":"Hakuna tovuti zilizopatikana za kuhamisha.","export_all_starting":"Inahamisha tovuti {count} kwenda {dir}...","export_all_complete":"Uhamishaji wote umekamilika.","import_zip_not_found":"Hitilafu: Faili ya Zip '{path}' haijapatikana.","import_invalid_config":"Hitilafu: Faili ya uhamishaji sio sahihi. 'config.json' haipo.","import_invalid_folder":"Hitilafu: config.json sio sahihi. 'folder_name' haipo.","import_overwrite_confirm":"Tovuti '{folder_name}' tayari ipo. Je, ubadilishe?","import_cancelled":"Uingizaji umesitishwa.","import_success":"Imefanikiwa kuingiza '{folder_name}' kwenda {dest_dir}","import_dir_not_found":"Hitilafu: Folda '{dir}' haijapatikana.","import_multiple_none":"Hakuna faili za zip zilizopatikana katika {dir}","import_multiple_found":"Imepata tovuti {count} za kuingiza kutoka {dir}...","importing_file":"Inaingiza {name}...","import_multiple_complete":"Uingizaji wa tovuti nyingi umekamilika.","batch_import_none":"Hakuna faili za JSON zilizopatikana katika imports","batch_import_processing":"Inashughulikia {file}","stop_server_not_running":"Seva {folder_name} haifanyi kazi.","stop_server_success":"Imesimamishwa {folder_name} (PID {pid})","delete_server_success":"Seva {folder_name} imefutwa","manage_select_server":"Chagua seva ya kusimamia (au Toka):","manage_create_new":"--- Unda Tovuti/Kipeperushi Kipya ---","manage_start_all":"--- Anzisha Tovuti Zote ---","manage_stop_all":"--- Simamisha Tovuti Zote ---","manage_export_all":"--- Hamisha Tovuti Zote ---","manage_import_multiple":"--- Ingiza Tovuti Nyingi ---","manage_exit":"Toka","manage_startup_summary":"Muhtasari wa Kuanzisha","manage_press_enter":"Bonyeza Enter ili kuendelea","manage_action_menu":"Simamia {name}:","manage_action_toggle_stop":"Simamisha","manage_action_toggle_start":"Anzisha","manage_action_export":"Hamisha kama Zip","manage_action_delete":"Futa","manage_action_back":"Rudi","manage_delete_confirm":"Je, una uhakika unataka kufuta {name}?","bootstrapping_msg":"[{name}] Inajunganisha na seva za Tor na kuandaa huduma ya siri...","bootstrapping_progress":"[{name}] Tor Inapakia: {progress}% ...","no_urls_qr_skip":"Hakuna URL zilizowekwa bado. QR codes zitaundwa baada ya 'voxvera serve'","input_file_not_found":"Faili ya kuingiza {path} haipo.","attachment_path_label":"Njia ya faili ya kiambatisho (si lazima - itatolewa kutoka tovuti ya Tor)","manage_action_edit":"Hariri","manage_templates":"--- Tengeneza Kutoka Kiolezo ---","template_select":"Chagua kiolezo:","body_over_limit_warning":"Onyo: Maandishi ya mwili yanazidi herufi 1000. Yanaweza kukatwa kwenye kipeperushi.","manage_action_export_keys":"Hamisha Funguo","manage_action_import_keys":"Ingiza Funguo","keys_not_found":"Hakuna funguo ya kipindi iliyopatikana kwa '{name}'. Anzisha tovuti kwanza ili kuzalisha funguo.","keys_export_header":"Funguo ya kipindi kwa '{name}':","keys_export_hint":"Nakili funguo hii na uihifadhi kwa usalama. Tumia 'Ingiza Funguo' kwenye mfano mwingine kurejesha.","keys_site_not_found":"Tovuti '{name}' haijapatikana.","keys_overwrite_confirm":"Tovuti '{name}' tayari ina funguo. Andika juu yake?","keys_import_cancelled":"Uingizaji umeghairiwa.","keys_import_prompt":"Bandika funguo ya kipindi ya base64 hapa chini:","keys_import_empty":"Hakuna funguo iliyotolewa.","keys_import_invalid":"Muundo wa funguo si sahihi. Lazima iwe mfuatano halali wa base64.","keys_import_success":"Funguo ya kipindi imeingizwa kwa '{name}'. Anzisha upya tovuti ili kutumia funguo mpya."},"web":{"tear_off_tor_browser":"Tumia Kivinjari cha Tor","tear_off_desc":"ili kusaidia kueneza ujumbe huu nenda kwa","tear_off_footer":"bonyeza kitufe hapa chini ili kuchapisha","built_with":"imejengwa na","print_button":"Chapa Kipeperushi","download_button":"Pakua Zana na Chanzo","download_attachment":"Pakua kiambatisho"},"landing":{"title":"SIRI KUBWA","subtitle":"~~USISAMBAZE~~","headline":"OPARESHENI VOX VERA","content":"Jikomboe kutoka kwa udhibiti ukitumia VoxVera. Zana isiyojulikana ya uuzaji wa mshituko na kueneza ujumbe. Iwe mtandaoni au katika ulimwengu wa kimwili, inaweza kukuwezesha kueneza mawazo yako kwa ujasiri, ukilindwa na kutokujulikana kabisa (ikiwa unahifadhi kupitia Tor). Pakua nambari ya siri, tengeneza tovuti ya kipeperushi, ihifadhi mtandaoni na uimarishe ujumbe wako.

Tumia nguvu ya meme kushiriki mawazo yako katika shule yako, mahali pa kazi, jumuiya za mtandaoni, au hata duniani kote. VoxVera inahakikisha ujumbe wako unavuma mbali na kote, kukiwa na sehemu zinazoweza kutolewa zenye URL za kipekee na QR codes kwa uchapishaji rahisi.

Faragha inaweza kudumishwa. Vipengele vinaweza kushirikiwa kupitia mtandao wa Tor, kumlinda mhudumu na watumiaji dhidi ya udhibiti.

Jiunge nasi katika mapinduzi yanayothamini ukweli na uwazi. Kwa pamoja, tunaweza kujenga mtandao wa raia wenye ufahamu ambao hawaogopi kuzungumza.","url_message":"Pata VoxVera na uanze kueneza ujumbe wako.","name":"Vipeperushi vya Vox Vera vya Kuchapisha"},"templates":{"aosp":{"name":"Mradi wa AOS","title":"ANDROID IMEACHILIWA","subtitle":"BILA MIPAKA","headline":"UHURU WA CHANZO HURIA","content":"Mradi wa Android wa Chanzo Huria (AOSP) unawakilisha kiini cha Android ilivyokusudiwa awali: jukwaa lililo wazi, la uwazi, na linaloweza kubadilishwa. Inaondoa tabaka za programu za umiliki na usimamizi wa makampuni ambayo yamekuwa sawa na usambazaji wa kawaida wa Android. Na AOSP, unapata ufikiaji wa toleo safi la Android, kukuruhusu kufanya kifaa chako kuwa chako kweli kweli.

Kwa watengenezaji, AOSP inatoa uwanja wa fursa, ambapo vikwazo pekee ni ujuzi na mawazo yako. Inatumika kama msingi wa ROM nyingi za kawaida, kila moja imeundwa kwa mahitaji mahususi, iwe ni kwa utendaji ulioboreshwa, faragha, au vipengele vya kipekee ambavyo matoleo ya kawaida havina. Wapenda faragha watathamini kutokuwepo kwa programu zilizowekwa awali na huduma za ufuatiliaji ambazo mara nyingi huja na Android ya kawaida.

AOSP si kwa watengenezaji au wapenda teknolojia peke yao; ni kwa mtu yeyote anayethamini uhuru wa kidijitali. Inakuruhusu kudhibiti kifaa chako, kukibadilisha kulingana na mahitaji yako bila vikwazo vya watoa huduma au watengenezaji. Gundua jinsi AOSP inavyoweza kubadilisha uzoefu wako wa simu. Anza safari yako kuelekea siku zijazo zilizo wazi na zinazoweza kubadilishwa leo.","url_message":"Tembelea kiungo hapa chini kujifunza zaidi."},"bitcoin":{"name":"Vipeperushi vya Mapinduzi ya Bitcoin","title":"SHERIA BILA WATAWALA","subtitle":"USIPUUZE","headline":"JIUNGE NA MAPINDUZI YA BITCOIN","content":"Bitcoin ni nini? Ni zaidi ya pesa za kidijitali; ni teknolojia ya mapinduzi iliyoundwa kutatua baadhi ya matatizo makubwa zaidi ya ulimwengu. Bitcoin inafanya kazi kwenye mtandao usio na kati, huru kutoka kwa udhibiti wa serikali yoyote au mamlaka kuu. Hii inahakikisha kwamba hakuna mtu anayeweza kudanganya usambazaji au thamani yake, na kuifanya kuwa aina imara ya pesa inayolinda utajiri wako dhidi ya mfumuko wa bei.

Mfumo wetu wa sasa wa kifedha umejengwa juu ya motisha zenye kasoro—kuhimiza deni, utegemezi, na ujumuishaji wa mamlaka. Bitcoin inabadilisha hilo kwa kuunda mfumo ambapo uaminifu, uwazi, na uwajibikaji wa mtu binafsi unatuzwa. Katika mtandao wa Bitcoin, hakuna nafasi ya rushwa au udanganyifu kwa sababu sheria zinatekelezwa na hisabati, si na watu.

Bitcoin inalinganisha motisha kwa njia inayokidhi mawazo ya muda mrefu, akiba, na uvumbuzi. Inawawezesha watu binafsi kudhibiti mustakabali wao wa kifedha, kukuza jamii ya kimataifa ambapo thamani inaweza kuhamishwa kwa uhuru na kwa usalama bila wasuluhishi. Hii ndiyo sababu tunahitaji Bitcoin—kwa sababu inaunda ulimwengu ambapo motisha zimelingana vizuri, na kusababisha jamii yenye haki na ustawi kwa wote.

Chukua hatua ya kujifunza zaidi kuhusu Bitcoin na jinsi inavyoweza kubadilisha si tu maisha yako ya kifedha, bali ulimwengu. Rarua kiungo upande wa kushoto na uchunguze teknolojia hii ya msingi. Jiunge na harakati kuelekea siku zijazo bora.","url_message":"Fuata kiungo hiki kujifunza zaidi."},"jesus":{"name":"Ujumbe Unaobadilisha Maisha","title":"HABARI NJEMA","subtitle":"USIPUUZE","headline":"GUNDUA TUMAINI LA KWELI","content":"Yesu ni nani? Yeye ni zaidi ya mtu wa kihistoria; Yeye ni Mwana wa Mungu, Mwokozi wa ulimwengu. Yesu mwenyewe alisema, 'Mimi ndimi njia, na kweli, na uzima. Mtu haji kwa Baba ila kwa njia yangu' (Yohana 14:6). Alikuja kuunganisha pengo kati ya Mungu na wanadamu, kutupa njia ya msamaha, amani, na uzima wa milele.

Sisi sote tunakabili uharibifu katika maisha yetu—iwe ni katika mahusiano yetu, mioyo yetu, au ulimwengu wetu. Yesu alikuja kuponya uharibifu huo. Aliishi maisha kamili, akafa msalabani kwa dhambi zetu, na akafufuka, akishinda kifo na kutupa tumaini la uzima wa milele na Mungu.

Bila Yesu, tumepotea katika dhambi zetu, tumetengwa na Mungu. Lakini kupitia Yeye, tunaweza kusamehewa na kurudishwa. Anatupa si maisha bora tu sasa, bali ahadi ya uzima wa milele pamoja Naye. Hii ndiyo sababu tunamhitaji—kwa sababu ni katika Yesu tu tunaweza kupata amani ya kweli, kusudi, na uhakika wa uzima wa milele.

Chukua hatua ya kujifunza zaidi kuhusu Yesu na athari ya kubadilisha maisha anayoweza kuwa nayo katika maisha yako. Rarua kiungo upande wa kushoto na uchunguze mafundisho Yake. Pata tumaini ambalo umekuwa ukilitafuta.","url_message":"Fuata kiungo hiki kujifunza zaidi."},"meshtastic":{"name":"Vipeperushi vya Mtandao wa Meshtastic","title":"MAWASILIANO SALAMA","subtitle":"USIPUUZE","headline":"JENGA MTANDAO WAKO WA DHARURA","content":"Kwa nini Meshtastic? Wakati wa mgogoro, mitandao ya mawasiliano ya kawaida inaweza kushindwa, kutuacha peke yetu na hatarini. Meshtastic inatoa suluhisho lenye nguvu—mtandao mbadala wa mawasiliano wa ndani unaofanya kazi kwa kujitegemea na mifumo ya kati. Imeundwa kwa hali za dharura, kukuruhusu kubaki umeunganishwa wakati inapohusika zaidi.

Vifaa vya Meshtastic vinaunda mtandao wa mesh unaoweza kusambaza ujumbe kwa umbali mrefu, hata bila mtandao au huduma ya simu. Mbinu hii isiyo na kati inahakikisha mawasiliano yako ni imara na ya kuaminika, bila kujali hali. Lakini si kuhusu kubaki umeunganishwa tu—Meshtastic pia inatoa usimbuaji, ili ujumbe wako ubaki salama na wa faragha.

Katika ulimwengu ambapo faragha inazidi kuathiriwa, Meshtastic inakuwezesha kudhibiti mawasiliano yako. Iwe unaratibu jibu la jamii ya ndani, kubaki ukiwasiliana na wapendwa wakati wa janga, au kujiandaa tu kwa yasiyotarajiwa, Meshtastic inatoa zana unazohitaji kuwasiliana kwa usalama na ufanisi.

Chukua hatua ya kujifunza zaidi kuhusu Meshtastic na jinsi unavyoweza kujenga mtandao wako wa mawasiliano ya dharura. Rarua kiungo upande wa kushoto na uchunguze teknolojia hii ya ubunifu. Hakikisha umejiandaa kwa chochote kinachokuja.","url_message":"Fuata kiungo hiki kujifunza zaidi."},"nostr":{"name":"Vipeperushi vya Itifaki ya Nostr","title":"UHURU WA KIJAMII","subtitle":"USIPUUZE","headline":"JIUNGE NA MTANDAO UNAOPINGA UDHIBITI","content":"Nostr ni nini? Tofauti na majukwaa ya kawaida ya mitandao ya kijamii, Nostr ni itifaki—mfumo usio na kati unaowapa watumiaji uwezo wa kuunganisha na kushiriki bila vikwazo vya mamlaka kuu. Nostr inapinga udhibiti, ikimaanisha sauti yako haiwezi kunyamazishwa na makampuni au serikali. Imeundwa kukupa udhibiti wa uwepo wako mtandaoni, huru kutoka kwa ushawishi wa algorithmu au matangazo yanayopendelea ushiriki kuliko muunganisho wenye maana.

Katika Nostr, hakuna ajenda zilizofichwa kukuweka ukiendelea kutumia. Unashiriki na maudhui kwa masharti yako, si kulingana na kile algorithmu inachofikiria kitakachokuweka mtandaoni kwa muda mrefu zaidi. Nostr inakuruhusu kujenga muunganisho wa kweli na kushiriki katika mazungumzo yanayohusika, yote huku ukidumisha faragha na uhuru wako.

Katika ulimwengu ambapo hotuba mtandaoni inadhibitiwa na kudanganywa zaidi na zaidi, Nostr inatoa mbadala wa kuburudisha. Si jukwaa tu; ni harakati kuelekea uhuru wa kweli wa kidijitali, ambapo maingiliano yako yanaendeshwa na masilahi na maadili yako, si kwa kile kinachozalisha mapato zaidi ya matangazo.

Chukua hatua ya kujifunza zaidi kuhusu Nostr na jinsi inavyoweza kubadilisha njia unayounganishwa mtandaoni. Rarua kiungo upande wa kushoto na uchunguze itifaki hii ya msingi. Jiunge na jamii inayothamini uhuru na maingiliano ya kweli.","url_message":"Fuata kiungo hiki kujifunza zaidi."},"voxvera":{"name":"Vipeperushi vya Vox Vera vya Kuchapisha","title":"SIRI KUBWA","subtitle":"~~USISAMBAZE~~","headline":"OPARESHENI VOX VERA","content":"Jiachilie kutoka kwa udhibiti na VoxVera. Chombo cha masoko ya msituni kisichojulikana na kusambaza ujumbe. Iwe mtandaoni au katika ulimwengu halisi, inaweza kukuwezesha kusambaza mawazo yako kwa ujasiri, ukilindwa na kutokujulikana kabisa (ikiwa unakaribisha kupitia Tor). Pakua msimbo, tengeneza tovuti ya vipeperushi, karibisha mtandaoni na kuimarisha ujumbe wako.

Tumia nguvu ya meme kushiriki mawazo yako shuleni kwako, mahali pa kazi, jamii za mtandaoni, au hata ulimwenguni kote. VoxVera inahakikisha ujumbe wako unasikika mbali na karibu, na sehemu za kurarua zenye URL na misimbo ya QR ya kipekee kwa uchapishaji rahisi.

Faragha inaweza kudumishwa. Vipeperushi vinaweza kushirikiwa kupitia mtandao wa Tor, kulinda mwenyeji na watumiaji dhidi ya udhibiti.

Jiunge nasi katika mapinduzi yanayothamini ukweli na uwazi. Pamoja, tunaweza kujenga mtandao wa raia wenye habari ambao hawogopi kusema.","url_message":"Pata VoxVera na uanze kueneza ujumbe wako."}}},"tr":{"meta":{"language_name":"Türkçe","flag":"🇹🇷","direction":"ltr"},"cli":{"dep_check_header":"Bağımlılık Kontrolü","dep_found":"bulundu","dep_missing":"eksik","all_deps_installed":"Tüm bağımlılıklar yüklendi.","missing_deps_error":"Bazı bağımlılıklar eksik. Şunu çalıştırın: pip install 'voxvera[all]'","init_name":"İsim","init_folder":"Klasör Adı","init_title":"Başlık","init_subtitle":"Alt Başlık","init_headline":"Ana Başlık","init_body":"Mesaj Metni","init_links":"Bağlantılar","edit_again":"Tekrar düzenle?","body_length":"Metin uzunluğu","body_limit_exceeded":"sınırı aşıyor","url_label":"URL (içerik bağlantısı - harici kaynak)","url_message_label":"URL mesajı","footer_message_label":"Alt bilgi mesajı","template_not_found":"Şablon {name} bulunamadı","template_copied":"Şablon {dest} konumuna kopyalandı","flyer_created":"İlan dosyaları {dest} altında oluşturuldu","dir_not_found":"Dizin {dir_path} bulunamadı","onionshare_error":"{folder_name} için OnionShare beklenmedik bir şekilde kapandı.","onionshare_causes":"Yaygın nedenler: Ağ engellenmiş, sistem saati yanlış veya OnionShare zaten çalışıyor olabilir.","onionshare_logs_tip":"Tam günlükler için {logfile} dosyasına bakın.","onion_url_msg":"[{folder_name}] Onion URL'si: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare çalışıyor (PID {pid}).","export_not_found":"Hata: '{folder_name}' site klasörü {host_root} içinde bulunamadı","export_success":"'{folder_name}' şuraya dışa aktarıldı: {output_path}","export_all_none":"Dışa aktarılacak site bulunamadı.","export_all_starting":"{count} site {dir} konumuna dışa aktarılıyor...","export_all_complete":"Tüm dışa aktarma işlemleri tamamlandı.","import_zip_not_found":"Hata: '{path}' Zip dosyası bulunamadı.","import_invalid_config":"Hata: Geçersiz dışa aktarma dosyası. 'config.json' eksik.","import_invalid_folder":"Hata: Geçersiz config.json. 'folder_name' eksik.","import_overwrite_confirm":"'{folder_name}' sitesi zaten mevcut. Üzerine yazılsın mı?","import_cancelled":"İçe aktarma iptal edildi.","import_success":"'{folder_name}' başarıyla {dest_dir} konumuna içe aktarıldı","import_dir_not_found":"Hata: '{dir}' dizini bulunamadı.","import_multiple_none":"{dir} içinde Zip dosyası bulunamadı","import_multiple_found":"{dir} konumundan içe aktarılacak {count} site bulundu...","importing_file":"{name} içe aktarılıyor...","import_multiple_complete":"Toplu içe aktarma tamamlandı.","batch_import_none":"İçe aktarmalarda JSON dosyası bulunamadı","batch_import_processing":"{file} işleniyor","stop_server_not_running":"{folder_name} sunucusu çalışmıyor.","stop_server_success":"{folder_name} durduruldu (PID {pid})","delete_server_success":"{folder_name} sunucusu silindi","manage_select_server":"Yöneteceğiniz sunucuyu seçin (veya Çıkış):","manage_create_new":"--- Yeni Site/İlan Oluştur ---","manage_start_all":"--- Tüm Siteleri Başlat ---","manage_stop_all":"--- Tüm Siteleri Durdur ---","manage_export_all":"--- Tüm Siteleri Dışa Aktar ---","manage_import_multiple":"--- Çoklu Site İçe Aktar ---","manage_exit":"Çıkış","manage_startup_summary":"Başlatma Özeti","manage_press_enter":"Devam etmek için Enter'a basın","manage_action_menu":"{name} yönetimi:","manage_action_toggle_stop":"Durdur","manage_action_toggle_start":"Başlat","manage_action_export":"Zip Olarak Dışa Aktar","manage_action_delete":"Sil","manage_action_back":"Geri","manage_delete_confirm":"{name} silinecek, emin misiniz?","bootstrapping_msg":"[{name}] Tor rölelerine bağlanılıyor ve gizli servis kuruluyor...","bootstrapping_progress":"[{name}] Tor Başlatılıyor: %{progress} ...","no_urls_qr_skip":"Henüz URL yapılandırılmadı. QR kodları 'voxvera serve' komutundan sonra oluşturulacak","input_file_not_found":"{path} giriş dosyası mevcut değil.","attachment_path_label":"Ek dosyası yolu (isteğe bağlı - Tor sitesinden sunulacaktır)","manage_action_edit":"Düzenle","manage_templates":"--- Şablondan Oluştur ---","template_select":"Bir şablon seçin:","body_over_limit_warning":"Uyarı: Gövde metni 1000 karakteri aşıyor. El ilanında kesilebilir.","manage_action_export_keys":"Anahtarları Dışa Aktar","manage_action_import_keys":"Anahtarları İçe Aktar","keys_not_found":"'{name}' için oturum anahtarı bulunamadı. Anahtarları oluşturmak için önce siteyi başlatın.","keys_export_header":"'{name}' için oturum anahtarı:","keys_export_hint":"Bu anahtarı kopyalayın ve güvenli bir şekilde saklayın. Geri yüklemek için başka bir örnekte 'Anahtarları İçe Aktar' kullanın.","keys_site_not_found":"Site '{name}' bulunamadı.","keys_overwrite_confirm":"Site '{name}' zaten bir anahtara sahip. Üzerine yazılsın mı?","keys_import_cancelled":"İçe aktarma iptal edildi.","keys_import_prompt":"Base64 oturum anahtarını aşağıya yapıştırın:","keys_import_empty":"Anahtar sağlanmadı.","keys_import_invalid":"Geçersiz anahtar biçimi. Geçerli bir base64 dizesi olmalıdır.","keys_import_success":"'{name}' için oturum anahtarı içe aktarıldı. Yeni anahtarı kullanmak için siteyi yeniden başlatın."},"web":{"tear_off_tor_browser":"Tor Tarayıcı Kullanın","tear_off_desc":"bu mesajı yaymaya yardımcı olmak için şuraya gidin:","tear_off_footer":"yazdırmak için aşağıdaki düğmeye tıklayın","built_with":"ile yapıldı","print_button":"İlanı Yazdır","download_button":"Aracı ve Kaynak Kodunu İndir","download_attachment":"Eki indir"},"landing":{"title":"ÇOK GİZLİ","subtitle":"~~DAĞITMAYIN~~","headline":"VOX VERA OPERASYONU","content":"VoxVera ile sansürden kurtulun. Anonim bir gerilla pazarlama ve mesaj yayma aracı. İster çevrimiçi ister fiziksel dünyada olsun, Tor üzerinden barındırma yaparak tam anonimlik koruması altında fikirlerinizi cesurca yaymanızı sağlar. Kodu indirin, bir ilan sitesi tasarlayın, çevrimiçi barındırın ve mesajınızı güçlendirin.

Fikirlerinizi okulunuzda, iş yerinizde, çevrimiçi topluluklarda ve hatta küresel çapta paylaşmak için memetik gücü kullanın. VoxVera, benzersiz URL'ler ve kolayca yeniden yazdırma için QR kodları içeren yırtılabilir bölümleriyle mesajınızın geniş kitlelere ulaşmasını sağlar.

Gizlilik korunabilir. İlanlar Tor ağı üzerinden paylaşılabilir, böylece hem barındıran hem de kullanıcılar sansürden korunur.

Gerçeğe ve şeffaflığa değer veren bir devrime katılın. Birlikte, sesini yükseltmekten korkmayan bilinçli vatandaşlardan oluşan bir ağ kurabiliriz.","url_message":"VoxVera'yı edinin ve mesajınızı yaymaya başlayın.","name":"Vox Vera Yazdırılabilir El İlanları"},"templates":{"aosp":{"name":"AOS Projesi","title":"ANDROID SERBEST","subtitle":"SINIR YOK","headline":"AÇIK KAYNAK ÖZGÜRLÜĞÜ","content":"Android Açık Kaynak Projesi (AOSP), Android'in başlangıçta ne olması gerektiğinin özünü temsil eder: açık, şeffaf ve uyarlanabilir bir platform. Ana akım Android dağıtımlarıyla eş anlamlı hale gelen tescilli yazılım ve kurumsal gözetim katmanlarını ortadan kaldırır. AOSP ile Android'in filtresiz bir sürümüne erişim elde ederek cihazınızı gerçekten kendinize ait yapabilirsiniz.

Geliştiriciler için AOSP, tek sınırın becerileriniz ve hayal gücünüz olduğu bir olasılıklar alanı sunar. Gelişmiş performans, gizlilik veya ana akım sürümlerin sahip olmadığı benzersiz özellikler gibi belirli ihtiyaçlara göre uyarlanmış sayısız özel ROM'un temelini oluşturur. Gizlilik meraklıları, stok Android ile birlikte gelen önceden yüklenmiş gereksiz yazılımların ve izleme hizmetlerinin yokluğunu takdir edecektir.

AOSP sadece geliştiriciler veya teknoloji meraklıları için değil; dijital özgürlüğe değer veren herkes içindir. Operatörlerin veya üreticilerin kısıtlamaları olmadan cihazınızı ihtiyaçlarınıza göre uyarlayarak kontrolü yeniden elinize almanızı sağlar. AOSP'nin mobil deneyiminizi nasıl dönüştürebileceğini keşfedin. Daha açık, özelleştirilebilir bir geleceğe doğru yolculuğunuza bugün başlayın.","url_message":"Daha fazla bilgi için aşağıdaki bağlantıyı ziyaret edin."},"bitcoin":{"name":"Bitcoin Devrimi El İlanları","title":"YÖNETİCİSİZ KURALLAR","subtitle":"GÖZ ARDI ETMEYİN","headline":"BITCOIN DEVRİMİNE KATILIN","content":"Bitcoin nedir? Dijital paradan çok daha fazlası; dünyanın en acil sorunlarından bazılarını çözmek için tasarlanmış devrimci bir teknolojidir. Bitcoin, herhangi bir hükümet veya merkezi otoritenin kontrolünden bağımsız, merkezi olmayan bir ağda çalışır. Bu, kimsenin arzını veya değerini manipüle edemeyeceğini garanti eder ve onu servetinizi enflasyondan koruyan sağlam bir para biçimi yapar.

Mevcut finansal sistemimiz kusurlu teşvikler üzerine inşa edilmiştir—borcu, bağımlılığı ve gücün merkezileşmesini teşvik eder. Bitcoin, dürüstlüğün, şeffaflığın ve bireysel sorumluluğun ödüllendirildiği bir sistem oluşturarak bunu değiştirir. Bitcoin ağında yolsuzluk veya manipülasyona yer yoktur çünkü kurallar insanlar tarafından değil, matematik tarafından uygulanır.

Bitcoin, uzun vadeli düşünmeyi, tasarrufu ve yeniliği teşvik eden bir şekilde teşvikleri hizalar. Bireyleri finansal geleceklerinin kontrolünü ele almaya teşvik eder ve değerin aracılar olmadan özgürce ve güvenli bir şekilde aktarılabildiği küresel bir topluluk oluşturur. Bitcoin'e ihtiyacımız var—çünkü teşviklerin doğru hizalandığı, herkes için daha adil ve müreffeh bir topluma yol açan bir dünya yaratır.

Bitcoin hakkında daha fazla bilgi edinmek ve sadece finansal hayatınızı değil, dünyayı nasıl dönüştürebileceğini keşfetmek için adım atın. Soldaki bir bağlantıyı koparın ve bu çığır açan teknolojiyi keşfedin. Daha iyi bir geleceğe doğru harekete katılın.","url_message":"Daha fazla bilgi için bu bağlantıyı takip edin."},"jesus":{"name":"Hayat Değiştiren Mesaj","title":"İYİ HABER","subtitle":"GÖZ ARDI ETMEYİN","headline":"GERÇEK UMUDI KEŞFEDİN","content":"İsa kimdir? O sadece tarihi bir figürden fazlasıdır; O Tanrı'nın Oğlu, dünyanın Kurtarıcısıdır. İsa'nın kendisi şöyle dedi: 'Yol, gerçek ve yaşam Ben'im. Benim aracılığım olmadan Baba'ya kimse gelemez' (Yuhanna 14:6). Tanrı ile insanlık arasındaki uçurumu kapatmak, bize bağışlanma, barış ve sonsuz yaşama giden bir yol sunmak için geldi.

Hepimiz hayatımızda kırılmışlıkla yüzleşiriz—ister ilişkilerimizde, kalbimizde veya dünyamızda olsun. İsa bu kırılmışlığı iyileştirmek için geldi. Mükemmel bir hayat yaşadı, günahlarımız için çarmıhta öldü ve yeniden dirildi, ölümü yenerek bize Tanrı ile sonsuz yaşam umudunu sundu.

İsa olmadan, günahımızda kaybolmuşuz, Tanrı'dan ayrılmışız. Ama O'nun aracılığıyla bağışlanabilir ve geri kazanılabiliriz. Bize sadece şimdi daha iyi bir hayat değil, O'nunla sonsuz bir hayat vaadi sunar. O'na ihtiyacımız var—çünkü gerçek huzuru, amacı ve sonsuz yaşam güvencesini sadece İsa'da bulabiliriz.

İsa hakkında ve hayatınızda yapabileceği değişiklik hakkında daha fazla bilgi edinmek için adım atın. Soldaki bir bağlantıyı koparın ve Öğretilerini keşfedin. Aradığınız umudu bulun.","url_message":"Daha fazla bilgi için bu bağlantıyı takip edin."},"meshtastic":{"name":"Meshtastic Ağ El İlanları","title":"GÜVENLİ İLETİŞİM","subtitle":"GÖZ ARDI ETMEYİN","headline":"ACİL DURUM AĞINIZI KURUN","content":"Neden Meshtastic? Kriz zamanlarında geleneksel iletişim ağları başarısız olabilir ve bizi izole ve savunmasız bırakabilir. Meshtastic güçlü bir çözüm sunar—merkezi sistemlerden bağımsız çalışan alternatif bir yerel iletişim ağı. Acil durumlar için tasarlanmıştır ve en çok önemli olduğunda bağlı kalmanızı sağlar.

Meshtastic cihazları, internet veya hücresel kapsama olmadan bile uzun mesafelere mesaj iletebilen bir ağ ağı oluşturur. Bu merkezi olmayan yaklaşım, koşullar ne olursa olsun iletişimlerinizin dayanıklı ve güvenilir olmasını sağlar. Ama sadece bağlı kalmakla ilgili değil—Meshtastic ayrıca şifreleme sunar, böylece mesajlarınız güvenli ve özel kalır.

Gizliliğin giderek daha fazla tehlikeye girdiği bir dünyada, Meshtastic iletişiminizin kontrolünü ele almanızı sağlar. İster yerel bir topluluk müdahalesini koordine ediyor, ister bir felaket sırasında sevdiklerinizle iletişimde kalıyor veya beklenmedik durumlara hazırlanıyor olun, Meshtastic güvenli ve etkili iletişim için ihtiyacınız olan araçları sağlar.

Meshtastic hakkında ve kendi acil durum iletişim ağınızı nasıl kurabileceğiniz hakkında daha fazla bilgi edinmek için adım atın. Soldaki bir bağlantıyı koparın ve bu yenilikçi teknolojiyi keşfedin. Ne gelirse gelsin hazırlıklı olduğunuzdan emin olun.","url_message":"Daha fazla bilgi için bu bağlantıyı takip edin."},"nostr":{"name":"Nostr Protokolü El İlanları","title":"SOSYAL ÖZGÜRLÜK","subtitle":"GÖZ ARDI ETMEYİN","headline":"SANSÜRE DAYANIKLI AĞA KATILIN","content":"Nostr nedir? Geleneksel sosyal medya platformlarından farklı olarak, Nostr bir protokoldür—kullanıcıları merkezi bir otoritenin kısıtlamaları olmadan bağlanmaya ve paylaşmaya yetkilendiren merkezi olmayan bir sistem. Nostr sansüre dayanıklıdır, yani sesiniz şirketler veya hükümetler tarafından susturulamaz. Çevrimiçi varlığınız üzerinde kontrol sağlamak için tasarlanmıştır, anlamlı bağlantılar yerine etkileşimi önceliklendiren algoritmaların veya reklamların etkisinden bağımsız.

Nostr'da sizi kaydırmaya devam ettirmek için gizli gündemler yoktur. İçerikle kendi şartlarınızda etkileşim kurarsınız, bir algoritmanın sizi en uzun süre çevrimiçi tutacağını düşündüğü şeye göre değil. Nostr, gizliliğinizi ve özerkliğinizi korurken gerçek bağlantılar kurmanıza ve önemli konuşmalara katılmanıza olanak tanır.

Çevrimiçi ifadenin giderek daha fazla kontrol edildiği ve manipüle edildiği bir dünyada, Nostr ferahlatıcı bir alternatif sunar. Sadece bir platform değil; etkileşimlerinizin en çok reklam geliri üreten şey tarafından değil, ilgi alanlarınız ve değerleriniz tarafından yönlendirildiği gerçek dijital özgürlüğe doğru bir harekettir.

Nostr hakkında ve çevrimiçi bağlanma şeklinizi nasıl dönüştürebileceği hakkında daha fazla bilgi edinmek için adım atın. Soldaki bir bağlantıyı koparın ve bu çığır açan protokolü keşfedin. Özgürlüğe ve otantik etkileşime değer veren bir topluluğa katılın.","url_message":"Daha fazla bilgi için bu bağlantıyı takip edin."},"voxvera":{"name":"Vox Vera Yazdırılabilir El İlanları","title":"ÇOK GİZLİ","subtitle":"~~DAĞITMAYIN~~","headline":"VOX VERA OPERASYONU","content":"VoxVera ile sansürden kurtulun. Anonim bir gerilla pazarlama ve mesaj yayma aracı. İster çevrimiçi ister fiziksel dünyada olsun, fikirlerinizi cesurca yaymak için sizi güçlendirebilir, tam anonimlik ile korunursunuz (Tor üzerinden barındırırsanız). Kodu indirin, bir el ilanı sitesi tasarlayın, çevrimiçi barındırın ve mesajınızı güçlendirin.

Okulunuzda, işyerinizde, çevrimiçi topluluklarda veya hatta küresel olarak fikirlerinizi paylaşmak için memetik gücü kullanın. VoxVera, kolay yeniden yazdırma için benzersiz URL'ler ve QR kodları içeren koparma bölümleriyle mesajınızın geniş çapta yankı bulmasını sağlar.

Gizlilik korunabilir. El ilanları, barındırıcıyı ve kullanıcıları sansürden koruyarak Tor ağı üzerinden paylaşılabilir.

Gerçeği ve şeffaflığı değer veren bir devrime katılın. Birlikte, konuşmaktan korkmayan bilgili vatandaşlardan oluşan bir ağ kurabiliriz.","url_message":"VoxVera'yı edinin ve mesajınızı yaymaya başlayın."}}},"zh":{"meta":{"language_name":"简体中文","flag":"🇨🇳","direction":"ltr"},"cli":{"dep_check_header":"依赖检查","dep_found":"已找到","dep_missing":"缺失","all_deps_installed":"所有依赖已安装。","missing_deps_error":"部分依赖缺失。请运行: pip install 'voxvera[all]'","init_name":"名称","init_folder":"文件夹名称","init_title":"标题","init_subtitle":"副标题","init_headline":"大标题","init_body":"消息正文","init_links":"链接","edit_again":"再次编辑?","body_length":"正文长度","body_limit_exceeded":"超过限制","url_label":"URL (内容链接 - 外部资源)","url_message_label":"URL 消息","footer_message_label":"页脚消息","template_not_found":"模板 {name} 未找到","template_copied":"模板已复制到 {dest}","flyer_created":"传单文件已创建在 {dest}","dir_not_found":"目录 {dir_path} 未找到","onionshare_error":"{folder_name} 的 OnionShare 意外退出。","onionshare_causes":"常见原因:网络受阻、系统时间不准,或 OnionShare 已在运行。","onionshare_logs_tip":"查看 {logfile} 获取完整日志。","onion_url_msg":"[{folder_name}] Onion 地址: {onion_url}","onionshare_running_pid":"[{folder_name}] OnionShare 正在运行 (PID {pid})。","export_not_found":"错误:在 {host_root} 中未找到站点文件夹 '{folder_name}'","export_success":"已将 '{folder_name}' 导出到 {output_path}","export_all_none":"未找到可导出的站点。","export_all_starting":"正在将 {count} 个站点导出到 {dir}...","export_all_complete":"全部导出完成。","import_zip_not_found":"错误:未找到 Zip 文件 '{path}'。","import_invalid_config":"错误:无效的导出文件。缺失 'config.json'。","import_invalid_folder":"错误:无效的 config.json。缺失 'folder_name'。","import_overwrite_confirm":"站点 '{folder_name}' 已存在。是否覆盖?","import_cancelled":"导入已取消。","import_success":"已成功将 '{folder_name}' 导入到 {dest_dir}","import_dir_not_found":"错误:目录 '{dir}' 未找到。","import_multiple_none":"在 {dir} 中未找到 Zip 文件","import_multiple_found":"找到 {count} 个站点可从 {dir} 导入...","importing_file":"正在导入 {name}...","import_multiple_complete":"批量导入完成。","batch_import_none":"在 imports 中未找到 JSON 文件","batch_import_processing":"正在处理 {file}","stop_server_not_running":"服务器 {folder_name} 未运行。","stop_server_success":"已停止 {folder_name} (PID {pid})","delete_server_success":"已删除服务器 {folder_name}","manage_select_server":"选择要管理的服务器(或退出):","manage_create_new":"--- 创建新站点/传单 ---","manage_start_all":"--- 启动所有站点 ---","manage_stop_all":"--- 停止所有站点 ---","manage_export_all":"--- 导出所有站点 ---","manage_import_multiple":"--- 导入多个站点 ---","manage_exit":"退出","manage_startup_summary":"启动摘要","manage_press_enter":"按回车键继续","manage_action_menu":"管理 {name}:","manage_action_toggle_stop":"停止","manage_action_toggle_start":"启动","manage_action_export":"导出为 Zip","manage_action_delete":"删除","manage_action_back":"返回","manage_delete_confirm":"确定要删除 {name} 吗?","bootstrapping_msg":"[{name}] 正在连接 Tor 中继并设置隐藏服务...","bootstrapping_progress":"[{name}] Tor 引导中: {progress}% ...","no_urls_qr_skip":"尚未配置 URL。QR 码将在 'voxvera serve' 后生成","input_file_not_found":"输入文件 {path} 不存在。","attachment_path_label":"附件文件路径(可选 - 将由 Tor 站点提供)","manage_action_edit":"编辑","manage_templates":"--- 从模板创建 ---","template_select":"选择一个模板:","body_over_limit_warning":"警告:正文超过1000个字符。传单上可能会被截断。","manage_action_export_keys":"导出密钥","manage_action_import_keys":"导入密钥","keys_not_found":"未找到 '{name}' 的会话密钥。请先启动站点以生成密钥。","keys_export_header":"'{name}' 的会话密钥:","keys_export_hint":"复制此密钥并安全保存。在另一个实例上使用“导入密钥”来恢复。","keys_site_not_found":"未找到站点 '{name}'。","keys_overwrite_confirm":"站点 '{name}' 已有密钥。是否覆盖?","keys_import_cancelled":"导入已取消。","keys_import_prompt":"请在下方粘贴 base64 会话密钥:","keys_import_empty":"未提供密钥。","keys_import_invalid":"密钥格式无效。必须是有效的 base64 字符串。","keys_import_success":"已导入 '{name}' 的会话密钥。请重启站点以使用新密钥。"},"web":{"tear_off_tor_browser":"使用 Tor 浏览器","tear_off_desc":"为了帮助传播此信息,请访问","tear_off_footer":"点击下方按钮进行打印","built_with":"构建自","print_button":"打印传单","download_button":"下载工具与源码","download_attachment":"下载附件"},"landing":{"title":"绝密","subtitle":"~~切勿~~ 散布","headline":"VOX VERA 行动","content":"使用 VoxVera 摆脱审查。一个匿名的游击营销和消息传播工具。无论是线上还是在现实世界中,它都能赋予你大胆传播想法的力量,并受到完全匿名的保护(如果你通过 Tor 托管)。下载代码,设计传单站点,将其托管在网上并放大你的声音。

利用模因的力量在你的学校、工作场所、在线社区甚至全球范围内分享你的想法。VoxVera 通过带有独特 URL 和 QR 码的可撕下部分确保你的消息产生深远共鸣,方便再次打印。

隐私可以得到维护。传单可以通过 Tor 网络共享,保护托管者和用户免受审查。

加入我们这场重视真相和透明度的革命。齐心协力,我们可以建立一个不惧怕发声的知情公民网络。","url_message":"获取 VoxVera 并开始传播你的消息。","name":"Vox Vera 可打印传单"},"templates":{"aosp":{"name":"AOS 项目","title":"安卓解放","subtitle":"无边界","headline":"开源自由","content":"Android 开源项目(AOSP)代表了 Android 最初的设计理念:一个开放、透明且可适应的平台。它剥离了与主流 Android 发行版同义的专有软件层和企业监管。通过 AOSP,您可以获得未经过滤的 Android 版本,真正让您的设备属于自己。

对于开发者来说,AOSP 提供了一个充满可能性的游乐场,唯一的限制是您的技能和想象力。它是无数定制 ROM 的基础,每个都针对特定需求量身定制,无论是增强性能、隐私保护还是主流版本所缺乏的独特功能。注重隐私的用户会欣赏没有预装臃肿软件和跟踪服务的清洁体验。

AOSP 不仅仅是为开发者或技术爱好者准备的;它适用于任何重视数字自由的人。它让您重新掌控自己的设备,根据需求进行定制,不受运营商或制造商的限制。探索 AOSP 如何改变您的移动体验。今天就开始您通往更开放、更可定制未来的旅程。","url_message":"访问以下链接了解更多信息。"},"bitcoin":{"name":"比特币革命传单","title":"没有统治者的规则","subtitle":"不要忽视","headline":"加入比特币革命","content":"什么是比特币?它不仅仅是数字货币;它是一项旨在解决世界上一些最紧迫问题的革命性技术。比特币运行在去中心化网络上,不受任何政府或中央机构的控制。这确保了没有人可以操纵其供应量或价值,使其成为保护您财富免受通胀的健全货币形式。

我们当前的金融体系建立在有缺陷的激励机制上——鼓励债务、依赖和权力集中化。比特币通过创建一个奖励诚实、透明和个人责任的系统来改变这一切。在比特币网络中,没有腐败或操纵的空间,因为规则由数学而非人来执行。

比特币以促进长期思考、储蓄和创新的方式调整激励机制。它赋予个人控制财务未来的能力,培育一个价值可以在没有中间人的情况下自由安全转移的全球社区。这就是我们需要比特币的原因——因为它创造了一个激励机制正确对齐的世界,为所有人带来更公平、更繁荣的社会。

迈出一步,了解更多关于比特币以及它如何不仅改变您的财务生活,还能改变世界。撕下左边的链接,探索这项开创性技术。加入迈向更美好未来的运动。","url_message":"点击此链接了解更多。"},"jesus":{"name":"改变生命的信息","title":"好消息","subtitle":"不要忽视","headline":"发现真正的希望","content":"耶稣是谁?祂不仅仅是一个历史人物;祂是上帝的儿子,世界的救主。耶稣亲自说过:'我就是道路、真理、生命。若不藉着我,没有人能到父那里去'(约翰福音 14:6)。祂来弥合上帝与人类之间的鸿沟,为我们提供通往宽恕、和平与永生的道路。

我们所有人都在生活中面临破碎——无论是在我们的关系、内心还是世界中。耶稣来医治这种破碎。祂过了完美的一生,为我们的罪死在十字架上,又复活了,战胜了死亡,赐给我们与上帝同享永生的盼望。

没有耶稣,我们迷失在罪中,与上帝隔绝。但通过祂,我们可以被赦免和恢复。祂不仅给我们现在更好的生活,还给我们与祂同在的永生应许。这就是我们需要祂的原因——因为只有在耶稣里,我们才能找到真正的平安、目标和永生的确据。

迈出一步,了解更多关于耶稣以及祂能对您的生活产生的改变。撕下左边的链接,探索祂的教导。找到您一直在寻找的希望。","url_message":"点击此链接了解更多。"},"meshtastic":{"name":"Meshtastic 网络传单","title":"安全通信","subtitle":"不要忽视","headline":"建立你的应急网络","content":"为什么选择 Meshtastic?在危机时刻,传统通信网络可能会失效,使我们陷入孤立和脆弱。Meshtastic 提供了一个强大的解决方案——一个独立于中心化系统运行的替代本地通信网络。它专为紧急情况设计,让您在最需要时保持连接。

Meshtastic 设备创建一个网状网络,即使没有互联网或蜂窝覆盖也能远距离中继消息。这种去中心化方法确保您的通信在任何情况下都是有弹性和可靠的。但这不仅仅是保持连接——Meshtastic 还提供加密,使您的消息保持安全和私密。

在隐私日益受到威胁的世界中,Meshtastic 使您能够掌控自己的通信。无论您是在协调当地社区响应、在灾难期间与亲人保持联系,还是只是为意外情况做准备,Meshtastic 都能为您提供安全有效通信所需的工具。

迈出一步,了解更多关于 Meshtastic 以及如何建立自己的应急通信网络。撕下左边的链接,探索这项创新技术。确保您为任何事情做好准备。","url_message":"点击此链接了解更多。"},"nostr":{"name":"Nostr 协议传单","title":"社交自由","subtitle":"不要忽视","headline":"加入抗审查网络","content":"什么是 Nostr?与传统社交媒体平台不同,Nostr 是一种协议——一个去中心化系统,使用户能够在没有中央权威约束的情况下连接和分享。Nostr 抗审查,这意味着您的声音不会被企业或政府压制。它旨在让您控制自己的在线存在,不受优先考虑参与度而非有意义连接的算法或广告的影响。

在 Nostr 上,没有隐藏的议程让您不断滚动。您按自己的条件与内容互动,而不是基于算法认为什么会让您在线最长时间。Nostr 让您建立真正的连接并参与重要的对话,同时保持您的隐私和自主权。

在在线言论日益受到控制和操纵的世界中,Nostr 提供了一个令人耳目一新的替代方案。它不仅仅是一个平台;它是迈向真正数字自由的运动,您的互动由您的兴趣和价值观驱动,而不是由什么产生最多广告收入。

迈出一步,了解更多关于 Nostr 以及它如何改变您在线连接的方式。撕下左边的链接,探索这个开创性协议。加入一个重视自由和真实互动的社区。","url_message":"点击此链接了解更多。"},"voxvera":{"name":"Vox Vera 可打印传单","title":"绝密","subtitle":"~~切勿~~ 散布","headline":"VOX VERA 行动","content":"用 VoxVera 摆脱审查。一个匿名的游击营销和消息传播工具。无论在线还是在现实世界中,它都能让您大胆地传播您的想法,受到完全匿名的保护(如果您通过 Tor 托管)。下载代码,设计传单网站,在线托管并放大您的信息。

利用模因的力量在您的学校、工作场所、在线社区甚至全球分享您的想法。VoxVera 确保您的信息广泛传播,带有独特 URL 和 QR 码的撕取部分便于重新打印。

隐私可以得到维护。传单可以通过 Tor 网络共享,保护托管者和用户免受审查。

加入我们重视真相和透明的革命。我们可以共同建立一个由不畏言论的知情公民组成的网络。","url_message":"获取 VoxVera 并开始传播你的消息。"}}}}; +window.VoxVeraLocales = {"ar":{"meta":{"language_name":"العربية","flag":"🇸🇦","direction":"rtl"},"labels":{"relays":"الروابط","title":"العنوان","subtitle":"العنوان الفرعي","headline":"العنوان الرئيسي","content":"نص الرسالة","url_message":"رسالة الـ URL","poster_url":"URL (رابط المحتوى - مورد خارجي)","footer_message":"رسالة التذييل"},"landing":{"title":"سري للغاية","subtitle":"~~لا~~ للنشر","headline":"عملية VOX VERA","content":"تحرر من الرقابة مع VoxVera. أداة تسويق عصابات مجهولة ونشر رسائل. سواء عبر الإنترنت أو في العالم المادي، يمكنها تمكينك من نشر أفكارك بجرأة، محمية بإخفاء الهوية الكامل (إذا كنت تستضيف عبر Tor). قم بتحميل الكود، وصمم موقع منشور، واستضيفه عبر الإنترنت وقم بتضخيم رسالتك.

استخدم القوة الميمية لمشاركة أفكارك في مدرستك، أو مكان عملك، أو مجتمعاتك عبر الإنترنت، أو حتى على مستوى العالم. تضمن VoxVera تردد صدى رسالتك بعيداً وعلى نطاق واسع، مع أقسام قابلة للنزع تتميز بروابط فريدة وأكواد QR لسهولة إعادة الطباعة.

يمكن الحفاظ على الخصوصية. يمكن مشاركة المنشورات عبر شبكة Tor، مما يحمي المضيف والمستخدمين من الرقابة.

انضم إلينا في ثورة تقدر الحقيقة والشفافية. معاً، يمكننا بناء شبكة من المواطنين المستنيرين الذين لا يخشون التحدث.","url_message":"احصل على VoxVera وابدأ بنشر رسالتك.","name":"منشورات Vox Vera القابلة للطباعة"}},"de":{"meta":{"language_name":"Deutsch","flag":"🇩🇪"},"labels":{"relays":"Links","title":"Titel","subtitle":"Untertitel","headline":"Schlagzeile","content":"Haupttext","url_message":"URL-Nachricht","poster_url":"URL (Inhaltslink - externe Ressource)","footer_message":"Fußzeilen-Nachricht"},"landing":{"title":"STRENG GEHEIM","subtitle":"~~NICHT~~ VERBREITEN","headline":"OPERATION VOX VERA","content":"Befreien Sie sich von Zensur mit VoxVera. Ein anonymes Guerilla-Marketing- und Nachrichtenverbreitungs-Tool. Ob online oder in der physischen Welt, es befähigt Sie, Ihre Ideen mutig zu verbreiten, geschützt durch vollständige Anonymität (wenn Sie über Tor hosten). Laden Sie den Code herunter, entwerfen Sie eine Flyer-Website, hosten Sie diese online und verstärken Sie Ihre Botschaft.

Nutzen Sie memetische Kraft, um Ihre Ideen in Ihrer Schule, an Ihrem Arbeitsplatz, in Online-Communities oder sogar weltweit zu teilen. VoxVera stellt sicher, dass Ihre Botschaft weit und breit Resonanz findet, mit Abreißabschnitten, die über einzigartige URLs und QR-Codes für einen einfachen Nachdruck verfügen.

Privatsphäre kann gewahrt bleiben. Flyer können über das Tor-Network geteilt werden, was Hoster und Nutzer vor Zensur schützt.

Schließen Sie sich uns in einer Revolution an, die Wahrheit und Transparenz schätzt. Gemeinsam können wir ein Netzwerk informierter Bürger aufbauen, die keine Angst haben, ihre Meinung zu sagen.","url_message":"Holen Sie sich VoxVera und beginnen Sie, Ihre Nachricht zu verbreiten.","name":"Vox Vera Druckflyer"}},"en":{"meta":{"language_name":"English","flag":"🇺🇸"},"labels":{"relays":"Links","title":"Title","subtitle":"Subtitle","headline":"Headline","content":"Body text","url_message":"URL message","poster_url":"URL (content link - external resource)","footer_message":"Footer message"},"landing":{"title":"TOP SECRET","subtitle":"DO ~~NOT~~ DISTRIBUTE","headline":"OPERATION VOX VERA","content":"Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.","url_message":"Get VoxVera and start spreading your message.","name":"Vox Vera Printable Flyers"}},"es":{"meta":{"language_name":"Español","flag":"🇪🇸"},"labels":{"relays":"Enlaces","title":"Título","subtitle":"Subtítulo","headline":"Titular","content":"Texto del cuerpo","url_message":"Mensaje de la URL","poster_url":"URL (enlace de contenido - recurso externo)","footer_message":"Mensaje de pie de página"},"landing":{"title":"ALTO SECRETO","subtitle":"~~NO~~ DISTRIBUIR","headline":"OPERACIÓN VOX VERA","content":"Libérese de la censura con VoxVera. Una herramienta anónima de marketing de guerrilla y difusión de mensajes. Ya sea en línea o en el mundo físico, puede empoderarlo para difundir sus ideas con audacia, protegido por un anonimato completo (si hospeda a través de Tor). Descargue el código, diseñe un sitio de volantes, hospédelo en línea y amplifique su mensaje.

Use el poder memético para compartir sus ideas en su escuela, lugar de trabajo, comunidades en línea o incluso globalmente. VoxVera asegura que su mensaje resuene a lo largo und ancho, con secciones desprendibles que cuentan con URLs y códigos QR únicos para una fácil reimpresión.

La privacidad puede mantenerse. Los volantes se pueden compartir a través de la red Tor, protegiendo al anfitrión y a los usuarios de la censura.

Únase a nosotros en una revolución que valora la verdad y la transparencia. Juntos, podemos construir una red de ciudadanos informados que no temen hablar.","url_message":"Obtenga VoxVera y comience a difundir su mensaje.","name":"Volantes Imprimibles Vox Vera"}},"fa":{"meta":{"language_name":"فارسی","flag":"🇮🇷","direction":"rtl"},"labels":{"relays":"پیوندها","title":"عنوان","subtitle":"زیرعنوان","headline":"سرخط خبر","content":"متن پیام","url_message":"پیام URL","poster_url":"URL (پیوند محتوا - منبع خارجی)","footer_message":"پیام پابرگ"},"landing":{"title":"به‌کلی محرمانه","subtitle":"~~عدم~~ انتشار","headline":"عملیات VOX VERA","content":"با VoxVera از بند سانسور رها شوید. ابزاری ناشناس برای بازاریابی چریکی و گسترش پیام. چه در فضای مجازی و چه در دنیای فیزیکی، این ابزار می‌تواند شما را برای گسترش جسورانه ایده‌هایتان توانمند کند، در حالی که توسط ناشناسی کامل محافظت می‌شوید (اگر از طریق Tor میزبانی کنید). کد را دانلود کنید، یک سایت اعلامیه طراحی کنید، آن را آنلاین میزبانی کنید و صدای خود را تقویت کنید.

از قدرت میم‌ها برای به اشتراک گذاشتن ایده‌های خود در مدرسه، محل کار، انجمن‌های آنلاین یا حتی در سطح جهانی استفاده کنید. VoxVera تضمین می‌کند که پیام شما در دوردست‌ها طنین‌انداز شود، با بخش‌های جداشونده دارای URLهای منحصر به فرد و کدهای QR برای چاپ مجدد آسان.

حریم خصوصی می‌تواند حفظ شود. اعلامیه‌ها را می‌توان از طریق شبکه Tor به اشتراک گذاشت و از میزبان و کاربران در برابر سانسور محافظت کرد.

در انقلابی که برای حقیقت و شفافیت ارزش قائل است به ما بپیوندید. با هم، می‌توانیم شبکه‌ای از شهروندان آگاه بسازیم که از سخن گفتن نمی‌هراسند.","url_message":"VoxVera را دریافت کنید و گسترش پیام خود را آغاز کنید.","name":"بروشورهای قابل چاپ Vox Vera"}},"fr":{"meta":{"language_name":"Français","flag":"🇫🇷","direction":"ltr"},"labels":{"relays":"Liens","title":"Titre","subtitle":"Sous-titre","headline":"Gros titre","content":"Texte du message","url_message":"Message de l'URL","poster_url":"URL (lien de contenu - ressource externe)","footer_message":"Message de pied de page"},"landing":{"title":"TOP SECRET","subtitle":"~~NE PAS~~ DISTRIBUER","headline":"OPÉRATION VOX VERA","content":"Libérez-vous de la censure avec VoxVera. Un outil de marketing de guérilla anonyme et de diffusion de messages. Que ce soit en ligne ou dans le monde physique, il peut vous donner le pouvoir de diffuser vos idées avec audace, à l'abri d'un anonymat complet (si vous hébergez via Tor). Téléchargez le code, concevez un site de flyers, hébergez-le en ligne et amplifiez votre message.

Utilisez le pouvoir mémétique pour partager vos idées à l'école, au travail, dans les communautés en ligne ou même à l'échelle mondiale. VoxVera garantit que votre message résonne partout, avec des sections détachables comportant des URL uniques et des codes QR pour une réimpression facile.

La vie privée peut être préservée. Les flyers peuvent être partagés via le réseau Tor, protégeant l'hébergeur et les utilisateurs de la censure.

Rejoignez-nous dans une révolution qui valorise la vérité et la transparence. Ensemble, nous pouvons construire un réseau de citoyens informés qui n'ont pas peur de s'exprimer.","url_message":"Obtenez VoxVera et commencez à diffuser votre message.","name":"Tracts Imprimables Vox Vera"}},"he":{"meta":{"language_name":"עברית","flag":"🇮🇱","direction":"rtl"},"labels":{"relays":"קישורים","title":"כותרת","subtitle":"כותרת משנה","headline":"כותרת ראשית","content":"טקסט ההודעה","url_message":"הודעת URL","poster_url":"URL (קישור לתוכן - משאב חיצוני)","footer_message":"הודעת כותרת תחתונה"},"landing":{"title":"סודי ביותר","subtitle":"~~לא~~ להפצה","headline":"מבצע VOX VERA","content":"השתחרר מהצנזורה עם VoxVera. כלי אנונימי לשיווק גרילה והפצת מסרים. בין אם באינטרנט ובין אם בעולם הפיזי, הוא יכול להעצים אותך להפיץ את הרעיונות שלך בתעוזה, מוגן באנונימיות מלאה (אם אתה מארח דרך Tor). הורד את הקוד, עצב אתר פלייר, ארח אותו אונליין והגבר את המסר שלך.

השתמש בכוח הממטי כדי לשתף את הרעיונות שלך בבית הספר, במקום העבודה, בקהילות מקוונות או אפילו ברמה עולמית. VoxVera מבטיחה שהמסר שלך יהדהד למרחקים, עם חלקים נתלשים הכוללים כתובות URL ייחודיות וקודי QR להדפסה חוזרת קלה.

ניתן לשמור על פרטיות. ניתן לשתף פליירים דרך רשת Tor, ובכך להגן על המארח ועל המשתמשים מפני צנזורה.

הצטרפו אלינו למהפכה שמעריכה אמת ושקיפות. יחד, נוכל לבנות רשת של אזרחים מושכלים שאינם פוחדים להתבטא.","url_message":"קבלו את VoxVera והתחילו להפיץ את המסר שלכם.","name":"עלונים להדפסה של Vox Vera"}},"hi":{"meta":{"language_name":"हिन्दी","flag":"🇮🇳","direction":"ltr"},"labels":{"relays":"लिंक","title":"शीर्षक","subtitle":"उपशीर्षक","headline":"मुख्य शीर्षक","content":"संदेश का पाठ","url_message":"URL संदेश","poster_url":"URL (सामग्री लिंक - बाहरी संसाधन)","footer_message":"फ़ुटर संदेश"},"landing":{"title":"अति गोपनीय","subtitle":"~~वितरित न करें~~","headline":"ऑपरेशन VOX VERA","content":"VoxVera के साथ सेंसरशिप से मुक्त हों। एक गुमनाम गुरिल्ला मार्केटिंग और संदेश फैलाने वाला टूल। चाहे ऑनलाइन हो या भौतिक दुनिया में, यह आपको पूर्ण गुमनामी (यदि आप Tor पर होस्ट करते हैं) द्वारा सुरक्षित रहते हुए अपने विचारों को साहसपूर्वक फैलाने का अधिकार दे सकता है। कोड डाउनलोड करें, एक फ्लायर साइट डिज़ाइन करें, इसे ऑनलाइन होस्ट करें और अपने संदेश को बढ़ाएं।

अपने विचारों को अपने स्कूल, कार्यस्थल, ऑनलाइन समुदायों या विश्व स्तर पर साझा करने के लिए मेमेटिक शक्ति का उपयोग करें। VoxVera यह सुनिश्चित करता है कि आपका संदेश दूर-दूर तक गूंजे, जिसमें आसान पुनर्मुद्रण के लिए अद्वितीय URL और QR कोड वाले टियर-ऑफ सेक्शन हैं।

गोपनीयता बनाए रखी जा सकती है। फ्लायर्स को Tor नेटवर्क के माध्यम से साझा किया जा सकता है, जिससे होस्ट और उपयोगकर्ताओं को सेंसरशिप से बचाया जा सकता है।

एक ऐसी क्रांति में हमारे साथ जुड़ें जो सच्चाई और पारदर्शिता को महत्व देती है। साथ मिलकर, हम उन सूचित नागरिकों का एक नेटवर्क बना सकते हैं जो बोलने से नहीं डरते।","url_message":"VoxVera प्राप्त करें और अपना संदेश फैलाना शुरू करें।","name":"Vox Vera प्रिंट करने योग्य पर्चे"}},"ja":{"meta":{"language_name":"日本語","flag":"🇯🇵","direction":"ltr"},"labels":{"relays":"リンク","title":"タイトル","subtitle":"サブタイトル","headline":"大見出し","content":"メッセージ本文","url_message":"URLメッセージ","poster_url":"URL (コンテンツリンク - 外部リソース)","footer_message":"フッターメッセージ"},"landing":{"title":"極秘事項","subtitle":"~~配布禁止~~","headline":"作戦名:VOX VERA","content":"VoxVeraで検閲から解放されましょう。これは、匿名のゲリラマーケティングおよびメッセージ拡散ツールです。オンラインでも物理的な世界でも、Torを介したホスティングによって完全な匿名性に守られながら、自分の考えを大胆に広めることができます。コードをダウンロードし、フライヤーサイトをデザインし、オンラインで公開して、あなたのメッセージを増幅させてください。

ミームの力を利用して、学校、職場、オンラインコミュニティ、あるいは世界中にあなたのアイデアを共有しましょう。VoxVeraは、再印刷が簡単な独自のURLとQRコードを備えた切り取りセクションにより、あなたのメッセージが広く遠くまで響くことを保証します。

プライバシーは維持されます。フライヤーはTorネットワークを介して共有でき、ホスト側とユーザー側の両方を検閲から守ります。

真実と透明性を尊重する革命に加わりましょう。共に、声を上げることを恐れない、知識豊富な市民のネットワークを構築しましょう。","url_message":"VoxVeraを入手して、メッセージの拡散を始めましょう。","name":"Vox Vera 印刷用チラシ"}},"pt":{"meta":{"language_name":"Português","flag":"🇧🇷","direction":"ltr"},"labels":{"relays":"Links","title":"Título","subtitle":"Subtítulo","headline":"Manchete","content":"Texto da mensagem","url_message":"Mensagem da URL","poster_url":"URL (link de conteúdo - recurso externo)","footer_message":"Mensagem de rodapé"},"landing":{"title":"ALTO SECRETO","subtitle":"~~NÃO~~ DISTRIBUIR","headline":"OPERAÇÃO VOX VERA","content":"Liberte-se da censura com o VoxVera. Uma ferramenta anônima de marketing de guerrilha e propagação de mensagens. Seja online ou no mundo físico, ela pode capacitá-lo a espalhar suas ideias com audácia, protegido por anonimato completo (se você hospedar via Tor). Baixe o código, projete um site de panfleto, hospede-o online e amplifique sua mensagem.

Use o poder memético para compartilhar suas ideias em sua escola, local de trabalho, comunidades online ou até mesmo globalmente. O VoxVera garante que sua mensagem ressoe longe e amplamente, com seções destacáveis apresentando URLs e códigos QR exclusivos para fácil reimpressão.

A privacidade pode ser mantida. Panfletos podem ser compartilhados via rede Tor, protegendo quem hospeda e quem usa contra censura.

Junte-se a nós em uma revolução que valoriza a verdade e a transparência. Juntos, podemos construir uma rede de cidadãos informados que não têm medo de falar.","url_message":"Obtenha o VoxVera e comece a espalhar sua mensagem.","name":"Panfletos Imprimíveis Vox Vera"}},"ru":{"meta":{"language_name":"Русский","flag":"🇷🇺","direction":"ltr"},"labels":{"relays":"Ссылки","title":"Заголовок","subtitle":"Подзаголовок","headline":"Главный заголовок","content":"Текст сообщения","url_message":"Сообщение URL","poster_url":"URL (ссылка на контент - внешний ресурс)","footer_message":"Сообщение внизу страницы"},"landing":{"title":"СОВЕРШЕННО СЕКРЕТНО","subtitle":"~~НЕ~~ РАСПРОСТРАНЯТЬ","headline":"ОПЕРАЦИЯ VOX VERA","content":"Освободитесь от цензуры с помощью VoxVera. Анонимный инструмент для партизанского маркетинга и распространения сообщений. Будь то в сети или в физическом мире, он дает вам возможность смело распространять свои идеи, будучи защищенным полной анонимностью (при хостинге через Tor). Скачайте код, создайте сайт-листовку, разместите его в сети и усильте свой голос.

Используйте силу мемов, чтобы поделиться своими идеями в школе, на работе, в онлайн-сообществах или даже по всему миру. VoxVera гарантирует, что ваше сообщение найдет отклик повсюду, благодаря отрывным разделам с уникальными URL-адресами и QR-кодами для легкой перепечатки.

Конфиденциальность может быть сохранена. Листовками можно делиться через сеть Tor, защищая хостера и пользователей от цензуры.

Присоединяйтесь к нам в революции, которая ценит правду и прозрачность. Вместе мы сможем построить сеть информированных граждан, которые не боятся высказываться.","url_message":"Получите VoxVera и начните распространять свое сообщение.","name":"Листовки Vox Vera для печати"}},"sw":{"meta":{"language_name":"Kiswahili","flag":"🇰🇪","direction":"ltr"},"labels":{"relays":"Viungo","title":"Kichwa cha Habari","subtitle":"Kichwa kidogo","headline":"Kichwa kikuu","content":"Maandishi ya ujumbe","url_message":"Ujumbe wa URL","poster_url":"URL (kiungo cha maudhui - rasilimali ya nje)","footer_message":"Ujumbe wa chini ya ukurasa"},"landing":{"title":"SIRI KUBWA","subtitle":"~~USISAMBAZE~~","headline":"OPARESHENI VOX VERA","content":"Jikomboe kutoka kwa udhibiti ukitumia VoxVera. Zana isiyojulikana ya uuzaji wa mshituko na kueneza ujumbe. Iwe mtandaoni au katika ulimwengu wa kimwili, inaweza kukuwezesha kueneza mawazo yako kwa ujasiri, ukilindwa na kutokujulikana kabisa (ikiwa unahifadhi kupitia Tor). Pakua nambari ya siri, tengeneza tovuti ya kipeperushi, ihifadhi mtandaoni na uimarishe ujumbe wako.

Tumia nguvu ya meme kushiriki mawazo yako katika shule yako, mahali pa kazi, jumuiya za mtandaoni, au hata duniani kote. VoxVera inahakikisha ujumbe wako unavuma mbali na kote, kukiwa na sehemu zinazoweza kutolewa zenye URL za kipekee na QR codes kwa uchapishaji rahisi.

Faragha inaweza kudumishwa. Vipengele vinaweza kushirikiwa kupitia mtandao wa Tor, kumlinda mhudumu na watumiaji dhidi ya udhibiti.

Jiunge nasi katika mapinduzi yanayothamini ukweli na uwazi. Kwa pamoja, tunaweza kujenga mtandao wa raia wenye ufahamu ambao hawaogopi kuzungumza.","url_message":"Pata VoxVera na uanze kueneza ujumbe wako.","name":"Vipeperushi vya Vox Vera vya Kuchapisha"}},"tr":{"meta":{"language_name":"Türkçe","flag":"🇹🇷","direction":"ltr"},"labels":{"relays":"Bağlantılar","title":"Başlık","subtitle":"Alt Başlık","headline":"Ana Başlık","content":"Mesaj Metni","url_message":"URL mesajı","poster_url":"URL (içerik bağlantısı - harici kaynak)","footer_message":"Alt bilgi mesajı"},"landing":{"title":"ÇOK GİZLİ","subtitle":"~~DAĞITMAYIN~~","headline":"VOX VERA OPERASYONU","content":"VoxVera ile sansürden kurtulun. Anonim bir gerilla pazarlama ve mesaj yayma aracı. İster çevrimiçi ister fiziksel dünyada olsun, Tor üzerinden barındırma yaparak tam anonimlik koruması altında fikirlerinizi cesurca yaymanızı sağlar. Kodu indirin, bir ilan sitesi tasarlayın, çevrimiçi barındırın ve mesajınızı güçlendirin.

Fikirlerinizi okulunuzda, iş yerinizde, çevrimiçi topluluklarda ve hatta küresel çapta paylaşmak için memetik gücü kullanın. VoxVera, benzersiz URL'ler ve kolayca yeniden yazdırma için QR kodları içeren yırtılabilir bölümleriyle mesajınızın geniş kitlelere ulaşmasını sağlar.

Gizlilik korunabilir. İlanlar Tor ağı üzerinden paylaşılabilir, böylece hem barındıran hem de kullanıcılar sansürden korunur.

Gerçeğe ve şeffaflığa değer veren bir devrime katılın. Birlikte, sesini yükseltmekten korkmayan bilinçli vatandaşlardan oluşan bir ağ kurabiliriz.","url_message":"VoxVera'yı edinin ve mesajınızı yaymaya başlayın.","name":"Vox Vera Yazdırılabilir El İlanları"}},"zh":{"meta":{"language_name":"简体中文","flag":"🇨🇳","direction":"ltr"},"labels":{"relays":"链接","title":"标题","subtitle":"副标题","headline":"大标题","content":"消息正文","url_message":"URL 消息","poster_url":"URL (内容链接 - 外部资源)","footer_message":"页脚消息"},"landing":{"title":"绝密","subtitle":"~~切勿~~ 散布","headline":"VOX VERA 行动","content":"使用 VoxVera 摆脱审查。一个匿名的游击营销和消息传播工具。无论是线上还是在现实世界中,它都能赋予你大胆传播想法的力量,并受到完全匿名的保护(如果你通过 Tor 托管)。下载代码,设计传单站点,将其托管在网上并放大你的声音。

利用模因的力量在你的学校、工作场所、在线社区甚至全球范围内分享你的想法。VoxVera 通过带有独特 URL 和 QR 码的可撕下部分确保你的消息产生深远共鸣,方便再次打印。

隐私可以得到维护。传单可以通过 Tor 网络共享,保护托管者和用户免受审查。

加入我们这场重视真相和透明度的革命。齐心协力,我们可以建立一个不惧怕发声的知情公民网络。","url_message":"获取 VoxVera 并开始传播你的消息。","name":"Vox Vera 可打印传单"}}}; diff --git a/site/nostr/nostr-client.js b/site/nostr/nostr-client.js index 4a4f58e..4895057 100644 --- a/site/nostr/nostr-client.js +++ b/site/nostr/nostr-client.js @@ -45,15 +45,15 @@ Join us in a revolution that values truth and transparency. Together, we can bui attachment_filename: "" }; const UI_LABELS = { - "label-relays": "cli.init_links", - "label-title": "cli.init_title", - "label-subtitle": "cli.init_subtitle", - "label-headline": "cli.init_headline", - "label-content": "cli.init_body", - "label-url-message": "cli.url_message_label", - "label-poster-url": "cli.url_label", - "label-footer-message": "cli.footer_message_label", - "label-viewer-relays": "cli.init_links" + "label-relays": "labels.relays", + "label-title": "labels.title", + "label-subtitle": "labels.subtitle", + "label-headline": "labels.headline", + "label-content": "labels.content", + "label-url-message": "labels.url_message", + "label-poster-url": "labels.poster_url", + "label-footer-message": "labels.footer_message", + "label-viewer-relays": "labels.relays" }; const NOSTR_TEXT_LABELS = { "label-flyer-name": "flyer_name", @@ -505,8 +505,8 @@ Join us in a revolution that values truth and transparency. Together, we can bui Object.entries(BUTTON_LABELS).forEach(([id, key]) => setButtonText(id, nostrLabel(key, selected))); setButtonText("print-preview", translate("web.print_button", selected) || BUTTON_LABELS["print-preview"]); setButtonText("viewer-print", translate("web.print_button", selected) || BUTTON_LABELS["viewer-print"]); - setButtonText("viewer-editor", translate("cli.manage_action_edit", selected) || BUTTON_LABELS["viewer-editor"]); - setButtonText("close-viewer-controls", translate("cli.manage_action_back", selected) || BUTTON_LABELS["close-viewer-controls"]); + setButtonText("viewer-editor", nostrLabel("editor", selected)); + setButtonText("close-viewer-controls", nostrLabel("back", selected)); LANGUAGE_SELECT_IDS.forEach((selectId) => { const select = el(selectId); diff --git a/site/qrcode-content.png b/site/qrcode-content.png deleted file mode 100644 index b2e4486..0000000 Binary files a/site/qrcode-content.png and /dev/null differ diff --git a/site/qrcode-tear-offs.png b/site/qrcode-tear-offs.png deleted file mode 100644 index 4135424..0000000 Binary files a/site/qrcode-tear-offs.png and /dev/null differ diff --git a/support-matrix.json b/support-matrix.json deleted file mode 100644 index 48f45a9..0000000 --- a/support-matrix.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "generated_at": "2026-03-19", - "default_supported_target": "linux_cli_systemd", - "support_tiers": { - "supported": "Validated for persistent hidden-service hosting with documented recovery behavior.", - "beta": "Feature-complete enough for broader testing, but not yet validated for production-grade recovery claims.", - "experimental": "May install or run, but is not yet validated for reliable background hidden-service hosting.", - "unsupported": "Not currently a target for reliable hosting." - }, - "platforms": [ - { - "id": "linux_cli_systemd", - "label": "Linux CLI with systemd --user", - "tier": "supported", - "hosting_model": "System Tor or Tor Browser plus onionshare-cli, with VoxVera-managed recurring systemd user timer recovery.", - "distribution_surfaces": [ - "install.sh", - "voxvera-install.sh", - "pip/pipx", - "linux binary" - ], - "required_capabilities": [ - "manual_build_and_serve", - "persistent_onion_identity", - "background_recovery_after_boot", - "background_recovery_after_offline_periods", - "inspectable_logs" - ], - "current_notes": [ - "Canonical deployment target.", - "Systemd user timer retries start-all every few minutes." - ], - "next_gaps": [ - "Real-machine reboot and network-loss validation evidence should be captured in CI/docs." - ] - }, - { - "id": "docker_cli", - "label": "Docker CLI container", - "tier": "experimental", - "hosting_model": "Single-container VoxVera runtime with state under /flyers, an in-container Tor daemon, healthchecks, and periodic start-all retries.", - "distribution_surfaces": [ - "Dockerfile", - "ghcr image" - ], - "required_capabilities": [ - "persistent_onion_identity", - "restart_policy_integration", - "validated_state_volume_layout" - ], - "current_notes": [ - "State routes through VOXVERA_DIR=/flyers.", - "Container entrypoint now starts Tor internally and retries start-all on a fixed interval.", - "Not yet validated as a production-grade hidden-service host." - ], - "next_gaps": [ - "Validate restart behavior with real container restart policies." - ] - }, - { - "id": "macos_cli", - "label": "macOS CLI", - "tier": "experimental", - "hosting_model": "CLI runtime with launchd autostart path and external Tor/OnionShare dependencies.", - "distribution_surfaces": [ - "install.sh", - "pip/pipx", - "macOS binary", - "DMG" - ], - "required_capabilities": [ - "manual_build_and_serve", - "launchd_recovery", - "persistent_onion_identity" - ], - "current_notes": [ - "Installer and autostart warnings are explicit.", - "No validated background recovery claim." - ], - "next_gaps": [ - "Define the canonical Tor/OnionShare discovery model.", - "Validate launchd behavior after login, reboot, and offline periods." - ] - }, - { - "id": "windows_cli", - "label": "Windows CLI", - "tier": "experimental", - "hosting_model": "CLI runtime with Task Scheduler autostart path and external Tor/OnionShare dependencies.", - "distribution_surfaces": [ - "install.ps1", - "windows binary", - "Chocolatey" - ], - "required_capabilities": [ - "manual_build_and_serve", - "task_scheduler_recovery", - "persistent_onion_identity", - "consistent_binary_naming" - ], - "current_notes": [ - "Installer warnings are explicit.", - "Packaging surfaces are not yet trustworthy for hosting claims." - ], - "next_gaps": [ - "Unify binary naming and installer expectations.", - "Define canonical Tor and OnionShare discovery on Windows.", - "Validate restart behavior after reboot and reconnect." - ] - }, - { - "id": "electron_gui", - "label": "Electron GUI", - "tier": "experimental", - "hosting_model": "GUI frontend over the CLI runtime.", - "distribution_surfaces": [ - "gui/electron" - ], - "required_capabilities": [ - "shared_runtime_contract_with_cli", - "status_visibility", - "non-destructive_window_close_behavior" - ], - "current_notes": [ - "GUI is documented as experimental." - ], - "next_gaps": [ - "Remove duplicate runtime logic where possible.", - "Ensure GUI is a controller over supported runtime surfaces, not a separate hosting model." - ] - }, - { - "id": "flatpak_appimage_homebrew_chocolatey", - "label": "Package-only surfaces", - "tier": "experimental", - "hosting_model": "Artifact distribution only until runtime parity exists.", - "distribution_surfaces": [ - "Flatpak", - "AppImage", - "Homebrew", - "Chocolatey", - "Debian package" - ], - "required_capabilities": [ - "runtime_dependency_model", - "support-tier-specific_release_checks" - ], - "current_notes": [ - "All are now explicitly marked experimental." - ], - "next_gaps": [ - "Do not promote any package surface until the underlying platform runtime is validated." - ] - } - ] -} diff --git a/test_cli_import.py b/test_cli_import.py deleted file mode 100644 index 8cdcc7e..0000000 --- a/test_cli_import.py +++ /dev/null @@ -1,12 +0,0 @@ -import sys -import os - -try: - import pkg_resources - import setuptools - print("pkg_resources available") -except ImportError as e: - print(f"Failed to import: {e}") - -from voxvera import cli -cli._internal_onionshare() diff --git a/test_pkg.py b/test_pkg.py deleted file mode 100644 index 449563a..0000000 --- a/test_pkg.py +++ /dev/null @@ -1,2 +0,0 @@ -import pkg_resources -print("Success") diff --git a/test_pkg2.py b/test_pkg2.py deleted file mode 100644 index 449563a..0000000 --- a/test_pkg2.py +++ /dev/null @@ -1,2 +0,0 @@ -import pkg_resources -print("Success") diff --git a/tests/test_cli.py b/tests/test_cli.py deleted file mode 100644 index 6657216..0000000 --- a/tests/test_cli.py +++ /dev/null @@ -1,1242 +0,0 @@ -import os -import sys -import shutil -import json -import zipfile -import time -import socket -import platform -from pathlib import Path -import pytest -from voxvera import cli -from voxvera.platforms import get_platform_adapter -from voxvera.platforms import base as platform_base -from voxvera.platforms import linux as platform_linux -from voxvera.platforms import macos as platform_macos -from voxvera.platforms import windows as platform_windows -from voxvera.platforms import docker as platform_docker - -sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) - - -def _setup_tmp(monkeypatch, tmp_path): - repo_root = Path(__file__).resolve().parent.parent - - # Use a unique subdirectory for this test run to ensure isolation - test_data_dir = tmp_path / "data" - test_data_dir.mkdir(exist_ok=True) - - # Internal resources (ROOT) - res_root = test_data_dir / "voxvera" - res_root.mkdir() - shutil.copytree(repo_root / "voxvera" / "src", res_root / "src") - shutil.copytree(repo_root / "voxvera" / "locales", res_root / "locales") - shutil.copytree(repo_root / "voxvera" / "templates", res_root / "templates") - shutil.copy(repo_root / "support-matrix.json", test_data_dir / "support-matrix.json") - - monkeypatch.setattr(cli, "ROOT", res_root) - monkeypatch.setattr(cli, "DATA_DIR", test_data_dir) - monkeypatch.setattr(cli, "_src_res", lambda *p: res_root / "src" / Path(*p)) - monkeypatch.setattr(cli, "_locale_res", lambda *p: res_root / "locales" / Path(*p)) - monkeypatch.setattr(cli, "_template_res", lambda *p: res_root / "templates" / Path(*p)) - - # Create a default config.json in DATA_DIR - shutil.copy(res_root / "src" / "config.json", test_data_dir / "config.json") - return repo_root - - -def test_help(capsys): - with pytest.raises(SystemExit): - cli.main(["-h"]) - captured = capsys.readouterr() - assert "usage:" in captured.out - - -def test_get_platform_adapter_linux(monkeypatch): - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.delenv("VOXVERA_RUNTIME", raising=False) - monkeypatch.setattr(platform_docker.DockerPlatformAdapter, "is_container_runtime", lambda self: False) - adapter = get_platform_adapter(cli_module=cli) - assert adapter.platform_id == "linux_cli_systemd" - - -def test_get_platform_adapter_docker(monkeypatch): - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setenv("VOXVERA_RUNTIME", "docker") - monkeypatch.setattr(platform_docker.DockerPlatformAdapter, "is_container_runtime", lambda self: True) - adapter = get_platform_adapter(cli_module=cli) - assert adapter.platform_id == "docker_cli" - - -def test_get_platform_adapter_macos(monkeypatch): - monkeypatch.setattr(platform, "system", lambda: "Darwin") - adapter = get_platform_adapter(cli_module=cli) - assert adapter.platform_id == "macos_cli" - - -def test_get_platform_adapter_windows(monkeypatch): - monkeypatch.setattr(platform, "system", lambda: "Windows") - adapter = get_platform_adapter(cli_module=cli) - assert adapter.platform_id == "windows_cli" - - -def test_init_template(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - # Mock choose_language to return 'en' - monkeypatch.setattr(cli, "choose_language", lambda *a: "en") - cli.main(["init", "--template", "voxvera"]) - dest = test_data_dir / "host" / "voxvera" - assert dest.is_dir() - assert (dest / "config.json").exists() - assert (dest / "index.html").exists() - - -def test_init_seeds_missing_default_config(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - config_path = test_data_dir / "fresh-config.json" - answers = iter([ - "Fresh Site", - "freshsite", - "Fresh Title", - "Fresh Subtitle", - "Fresh Headline", - "https://example.com", - "Read more", - "Footer bits", - "", - ]) - - monkeypatch.setattr(cli, "choose_language", lambda *a: "en") - monkeypatch.setattr(cli, "prompt", lambda questions: {question["name"]: next(answers) for question in questions}) - monkeypatch.setattr(cli, "open_editor", lambda initial: "Fresh content") - - class _Confirm: - def execute(self): - return False - - monkeypatch.setattr(cli.inquirer, "confirm", lambda **kwargs: _Confirm()) - - cli.main(["--config", str(config_path), "init"]) - - assert config_path.exists() - saved = cli.load_config(config_path) - assert saved["folder_name"] == "freshsite" - assert saved["content"] == "Fresh content" - - -def test_init_noninteractive_does_not_prompt_for_language(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - config_path = test_data_dir / "fresh-config.json" - - def _fail_choose_language(*args, **kwargs): - raise AssertionError("choose_language should not run for non-interactive init") - - monkeypatch.setattr(cli, "choose_language", _fail_choose_language) - - cli.main(["--config", str(config_path), "init", "--non-interactive"]) - - saved = cli.load_config(config_path) - assert saved["lang"] == "en" - assert (test_data_dir / "host" / saved["folder_name"] / "index.html").exists() - - -def test_create_from_template_persists_current_language(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - cli.load_locale("es") - - class _Prompt: - def execute(self): - return cli.list_presets()[0] - - monkeypatch.setattr(cli.inquirer, "select", lambda **kwargs: _Prompt()) - monkeypatch.setattr(cli, "interactive_update", lambda path: None) - monkeypatch.setattr(cli, "resolve_new_site_folder", lambda path: cli.load_config(path)["folder_name"]) - monkeypatch.setattr(cli, "build_assets", lambda path: None) - monkeypatch.setattr(cli, "serve", lambda path: None) - - cli.create_from_template(None) - - config = cli.load_config(tmp_path / "data" / "config.json") - assert config["lang"] == "es" - - -def test_resolve_new_site_folder_versions_existing_folder(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - host_dir = test_data_dir / "host" - existing_dir = host_dir / "jesus" - existing_dir.mkdir(parents=True) - (existing_dir / "config.json").write_text(json.dumps({"folder_name": "jesus"}), encoding="utf-8") - - config_path = test_data_dir / "config.json" - config_path.write_text(json.dumps({"folder_name": "jesus"}), encoding="utf-8") - - class _Prompt: - def execute(self): - return "version" - - monkeypatch.setattr(cli.inquirer, "select", lambda **kwargs: _Prompt()) - - resolved = cli.resolve_new_site_folder(str(config_path)) - updated = cli.load_config(config_path) - - assert resolved == "jesus_01" - assert updated["folder_name"] == "jesus_01" - - -def test_build(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - cli.main(["build"]) - test_data_dir = tmp_path / "data" - dest = test_data_dir / "host" / "voxvera" - assert dest.is_dir() - assert (dest / "config.json").exists() - assert (dest / "index.html").exists() - - -def test_build_with_download(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - download_file = tmp_path / "sample.zip" - download_file.write_text("dummy") - cli.main(["build", "--download", str(download_file)]) - test_data_dir = tmp_path / "data" - dest = test_data_dir / "host" / "voxvera" / "download" / "extra-content.zip" - assert dest.is_file() - - -def test_build_generates_tear_off_qr_from_url_when_onion_missing(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - config_path = test_data_dir / "config.json" - config = cli.load_config(config_path) - config["url"] = "https://example.com/learn-more" - config["tear_off_link"] = "" - cli.save_config(config, config_path) - - cli.build_assets(str(config_path)) - - dest = test_data_dir / "host" / config["folder_name"] - html = (dest / "index.html").read_text(encoding="utf-8") - - assert (dest / "qrcode-content.png").exists() - assert (dest / "qrcode-tear-offs.png").exists() - assert 'class="container no-tear-offs"' not in html - assert "https://example.com/learn-more" in html - - -def test_import(tmp_path, monkeypatch): - repo = _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - imports_dir = test_data_dir / "imports" - imports_dir.mkdir(parents=True, exist_ok=True) - base_data = json.load(open(repo / "imports" / "example.json")) - for sub in ["foo", "bar"]: - data = dict(base_data) - data["folder_name"] = sub - with open(imports_dir / f"{sub}.json", "w") as fh: - json.dump(data, fh) - cli.main(["batch-import"]) - for sub in ["foo", "bar"]: - test_data_dir = tmp_path / "data" - dest = test_data_dir / "host" / sub - assert dest.is_dir() - assert (dest / "index.html").exists() - - -def test_import_preserves_session(tmp_path, monkeypatch): - """Re-importing a config must not destroy the OnionShare session key.""" - repo = _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - imports_dir = test_data_dir / "imports" - imports_dir.mkdir(parents=True, exist_ok=True) - base_data = json.load(open(repo / "imports" / "example.json")) - base_data["folder_name"] = "keep" - with open(imports_dir / "keep.json", "w") as fh: - json.dump(base_data, fh) - - # first import creates the host dir - cli.main(["batch-import"]) - test_data_dir = tmp_path / "data" - host_dir = test_data_dir / "host" / "keep" - assert host_dir.is_dir() - - # simulate OnionShare having written a session key - session_file = host_dir / ".onionshare-session" - session_file.write_text("FAKE-KEY-DATA") - - # re-import the same config - cli.main(["batch-import"]) - - # session key must still be present and unchanged - assert session_file.exists() - assert session_file.read_text() == "FAKE-KEY-DATA" - # built assets should still be there too - assert (host_dir / "index.html").exists() - - -def test_import_rejects_zip_path_traversal(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - malicious_zip = tmp_path / "malicious.zip" - with zipfile.ZipFile(malicious_zip, "w") as zf: - zf.writestr("../escape.txt", "owned") - zf.writestr("config.json", json.dumps({"folder_name": "evil"})) - - cli.import_site(str(malicious_zip)) - - captured = capsys.readouterr() - assert "Refusing to extract path outside destination" in captured.out - assert not (tmp_path / "escape.txt").exists() - assert not ((tmp_path / "data" / "host" / "evil").exists()) - - -def test_load_config_migrates_binary_message_to_footer_message(tmp_path): - config_path = tmp_path / "legacy-config.json" - config_path.write_text(json.dumps({"binary_message": "0101", "folder_name": "legacy"}), encoding="utf-8") - - loaded = cli.load_config(str(config_path)) - - assert loaded["footer_message"] == "0101" - assert "binary_message" not in loaded - - -def test_check_all_present(capsys, monkeypatch): - monkeypatch.setattr(shutil, "which", lambda cmd: "/usr/bin/" + cmd) - cli.main(["check"]) - captured = capsys.readouterr() - assert "All dependencies are installed." in captured.out - - -def test_check_missing(capsys, monkeypatch): - import builtins - original_import = builtins.__import__ - - def fake_import(name, *args, **kwargs): - if name == "onionshare_cli": - raise ImportError("Mocked missing") - return original_import(name, *args, **kwargs) - - monkeypatch.setattr(builtins, "__import__", fake_import) - cli.main(["check"]) - captured = capsys.readouterr() - assert "onionshare-cli" in captured.out - assert "missing" in captured.out - - -def test_doctor_command_outputs_platform_report(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(shutil, "which", lambda cmd: f"/usr/bin/{cmd}" if cmd in {"voxvera", "tor", "onionshare-cli", "systemctl"} else None) - - class FakeSocket: - def settimeout(self, value): - return None - - def connect_ex(self, addr): - return 0 - - def close(self): - return None - - def fake_check_output(args, stderr=None): - if "is-enabled" in args: - return b"enabled" - if "is-active" in args: - return b"active" - raise AssertionError(args) - - monkeypatch.setattr(platform_linux.socket, "socket", lambda *args, **kwargs: FakeSocket()) - monkeypatch.setattr(platform_base.subprocess, "check_output", fake_check_output) - cli.main(["doctor"]) - captured = capsys.readouterr() - assert "VoxVera Doctor" in captured.out - assert "linux_cli_systemd" in captured.out - - -def test_doctor_json_output(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(shutil, "which", lambda cmd: f"/usr/bin/{cmd}" if cmd in {"voxvera", "tor", "onionshare-cli"} else None) - - class FakeSocket: - def settimeout(self, value): - return None - - def connect_ex(self, addr): - return 0 - - def close(self): - return None - - monkeypatch.setattr(platform_linux.socket, "socket", lambda *args, **kwargs: FakeSocket()) - monkeypatch.setattr(platform_base.subprocess, "check_output", lambda *args, **kwargs: b"disabled") - - cli.main(["doctor", "--json"]) - captured = capsys.readouterr() - report = json.loads(captured.out) - assert report["platform_id"] == "linux_cli_systemd" - assert "summary" in report - assert "sections" in report - assert "dependencies" in report["sections"] - assert "checks" in report - - -def test_platform_status_json_output(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - monkeypatch.setattr(platform, "system", lambda: "Linux") - - cli.main(["platform-status", "--json"]) - captured = capsys.readouterr() - report = json.loads(captured.out) - assert report["platform_id"] == "linux_cli_systemd" - assert report["hosting_model"] - assert "checks" not in report - - -def test_autostart_status_command_outputs_timer_state(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - fake_home = tmp_path / "home" - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(platform_base.Path, "home", lambda: fake_home) - systemd_dir = fake_home / ".config" / "systemd" / "user" - systemd_dir.mkdir(parents=True, exist_ok=True) - (systemd_dir / "voxvera-start.service").write_text("service", encoding="utf-8") - (systemd_dir / "voxvera-start.timer").write_text("timer", encoding="utf-8") - - def fake_check_output(args, stderr=None): - if "is-enabled" in args: - return b"enabled" - if "is-active" in args: - return b"active" - raise AssertionError(args) - - monkeypatch.setattr(shutil, "which", lambda cmd: f"/usr/bin/{cmd}" if cmd == "systemctl" else None) - monkeypatch.setattr(platform_base.subprocess, "check_output", fake_check_output) - - cli.main(["autostart", "status"]) - captured = capsys.readouterr() - assert "Autostart Status" in captured.out - assert "systemd_timer_enabled" in captured.out - - -def test_autostart_status_json_output(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - fake_home = tmp_path / "home" - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(platform_base.Path, "home", lambda: fake_home) - systemd_dir = fake_home / ".config" / "systemd" / "user" - systemd_dir.mkdir(parents=True, exist_ok=True) - (systemd_dir / "voxvera-start.service").write_text("service", encoding="utf-8") - (systemd_dir / "voxvera-start.timer").write_text("timer", encoding="utf-8") - monkeypatch.setattr(shutil, "which", lambda cmd: f"/usr/bin/{cmd}" if cmd == "systemctl" else None) - monkeypatch.setattr(platform_base.subprocess, "check_output", lambda *args, **kwargs: b"enabled") - - cli.main(["autostart", "status", "--json"]) - captured = capsys.readouterr() - status = json.loads(captured.out) - assert status["platform_id"] == "linux_cli_systemd" - assert len(status["artifacts"]) == 2 - - -def test_linux_autostart_uninstall_removes_artifacts(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - fake_home = tmp_path / "home" - commands = [] - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(platform_linux.Path, "home", lambda: fake_home) - monkeypatch.setattr(platform_linux.subprocess, "run", lambda args, **kwargs: commands.append(args)) - systemd_dir = fake_home / ".config" / "systemd" / "user" - systemd_dir.mkdir(parents=True, exist_ok=True) - service = systemd_dir / "voxvera-start.service" - timer = systemd_dir / "voxvera-start.timer" - service.write_text("service", encoding="utf-8") - timer.write_text("timer", encoding="utf-8") - - cli.main(["autostart", "uninstall"]) - captured = capsys.readouterr() - - assert "Removed systemd user service" in captured.out - assert not service.exists() - assert not timer.exists() - assert ["systemctl", "--user", "disable", "--now", "voxvera-start.timer"] in commands - - -def test_macos_autostart_status_and_render(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - fake_home = tmp_path / "home" - monkeypatch.setattr(platform, "system", lambda: "Darwin") - monkeypatch.setattr(platform_base.Path, "home", lambda: fake_home) - - adapter = get_platform_adapter(cli_module=cli) - assert adapter.platform_id == "macos_cli" - - plist = adapter.render_launchd_plist("/tmp/voxvera") - assert "org.voxvera.start-all" in plist - assert "/tmp/voxvera" in plist - assert "start-all" in plist - - status = adapter.autostart_status() - assert status["platform_id"] == "macos_cli" - assert status["artifacts"] == [str(fake_home / "Library" / "LaunchAgents" / "org.voxvera.start-all.plist")] - assert any(check["name"] == "launchd_loaded" for check in status["checks"]) - - -def test_macos_autostart_uninstall_removes_plist(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - fake_home = tmp_path / "home" - commands = [] - monkeypatch.setattr(platform, "system", lambda: "Darwin") - monkeypatch.setattr(platform_base.Path, "home", lambda: fake_home) - monkeypatch.setattr(platform_base.subprocess, "check_output", lambda args, stderr=None: commands.append(args) or b"") - plist = fake_home / "Library" / "LaunchAgents" / "org.voxvera.start-all.plist" - plist.parent.mkdir(parents=True, exist_ok=True) - plist.write_text("plist", encoding="utf-8") - - cli.main(["autostart", "uninstall"]) - captured = capsys.readouterr() - - assert "Removed LaunchAgent" in captured.out - assert not plist.exists() - assert ["launchctl", "unload", str(plist)] in commands - - -def test_windows_autostart_status_and_render(monkeypatch): - monkeypatch.setattr(platform, "system", lambda: "Windows") - monkeypatch.setattr(platform_base.subprocess, "check_output", lambda *args, **kwargs: b"TaskName: VoxVera Start All") - - adapter = get_platform_adapter(cli_module=cli) - assert adapter.platform_id == "windows_cli" - - command = adapter.render_schtasks_create_command("C:\\voxvera.exe") - assert command[:6] == ["schtasks", "/Create", "/F", "/SC", "ONLOGON", "/TN"] - assert "VoxVera Start All" in command - assert '"C:\\voxvera.exe" start-all' in command - - status = adapter.autostart_status() - assert status["platform_id"] == "windows_cli" - assert any(check["name"] == "scheduled_task_present" for check in status["checks"]) - - -def test_windows_autostart_uninstall_uses_schtasks(monkeypatch, capsys): - commands = [] - monkeypatch.setattr(platform, "system", lambda: "Windows") - monkeypatch.setattr(platform_base.subprocess, "check_output", lambda args, stderr=None: commands.append(args) or b"SUCCESS") - - cli.main(["autostart", "uninstall"]) - captured = capsys.readouterr() - - assert "removed" in captured.out.lower() - assert ["schtasks", "/Delete", "/TN", "VoxVera Start All", "/F"] in commands - - -def test_build_download_zip(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - folder_name = config["folder_name"] - zip_path = tmp_path / "file.zip" - with zipfile.ZipFile(zip_path, "w") as zf: - zf.writestr("dummy.txt", "data") - cli.main(["build", "--download", str(zip_path)]) - dest = test_data_dir / "host" / folder_name / "download" / "extra-content.zip" - assert dest.is_file() - - -def test_serve_updates_url(tmp_path, monkeypatch): - """Test that serve() auto-generates onion URL for tear-off links.""" - _setup_tmp(monkeypatch, tmp_path) - cli.main(["build"]) - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - folder_name = config["folder_name"] - dir_path = test_data_dir / "host" / folder_name - - # Set a custom URL that should be preserved (content link) - config["url"] = "https://example.com/external-resource" - with open(dir_path / "config.json", "w") as f: - json.dump(config, f) - - # No need for TOR_* env vars anymore - auto-detection should work - monkeypatch.setattr(cli, "require_cmd", lambda c: True) - orig_build = cli.build_assets - - def safe_build_assets(cfg, download_path=None): - dest = cli.ROOT / "host" / json.load(open(cfg))["folder_name"] / "config.json" - if Path(cfg) == dest: - return - return orig_build(cfg, download_path=download_path) - - monkeypatch.setattr(cli, "build_assets", safe_build_assets) - monkeypatch.setattr(time, "sleep", lambda x: None) - - onion_url = "http://test123.onion" - - class FakePopen: - def __init__(self, cmd, stdout=None, stderr=None, env=None, **kwargs): - self.cmd = cmd - self.stdout = stdout - self.stderr = stderr - self.env = env - self.pid = 42 - if stdout is not None: - stdout.write(f"Started at {onion_url}\n") - stdout.flush() - - def poll(self): - return None - - monkeypatch.setattr(cli.subprocess, "Popen", FakePopen) - - cli.main(["serve"]) - - log_file = dir_path / "onionshare.log" - assert onion_url in log_file.read_text() - updated = json.load(open(dir_path / "config.json")) - # URL should be preserved (user-configurable content link) - assert updated["url"] == "https://example.com/external-resource" - # tear_off_link should be set to the onion address (for tear-off tabs) - assert updated["tear_off_link"] == onion_url - - -def test_serve_recovers_onion_url_from_session_file(tmp_path, monkeypatch): - """OnionShare 2.6 may not log the URL when using system Tor.""" - _setup_tmp(monkeypatch, tmp_path) - cli.main(["build"]) - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - folder_name = config["folder_name"] - dir_path = test_data_dir / "host" / folder_name - - (dir_path / ".onionshare-session").write_text( - json.dumps({"general": {"service_id": "sessionserviceid"}}), - encoding="utf-8", - ) - - monkeypatch.setattr(cli, "require_cmd", lambda c: True) - orig_build = cli.build_assets - - def safe_build_assets(cfg, download_path=None): - dest = cli.ROOT / "host" / json.load(open(cfg))["folder_name"] / "config.json" - if Path(cfg) == dest: - return - return orig_build(cfg, download_path=download_path) - - monkeypatch.setattr(cli, "build_assets", safe_build_assets) - monkeypatch.setattr(time, "sleep", lambda x: None) - - class FakePopen: - def __init__(self, cmd, stdout=None, stderr=None, env=None, **kwargs): - self.pid = 43 - if stdout is not None: - stdout.write("Onion.start_onion_service: key_type=ED25519-V3\n") - stdout.flush() - - def poll(self): - return None - - monkeypatch.setattr(cli.subprocess, "Popen", FakePopen) - - cli.main(["serve"]) - - updated = json.load(open(dir_path / "config.json")) - assert updated["tear_off_link"] == "http://sessionserviceid.onion" - - -def test_quickstart_noninteractive(tmp_path, monkeypatch): - """Test quickstart builds and serves in one command.""" - _setup_tmp(monkeypatch, tmp_path) - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - folder_name = config["folder_name"] - - # No need for TOR_* env vars anymore - auto-detection should work - monkeypatch.setattr(cli, "require_cmd", lambda c: True) - orig_build = cli.build_assets - - def safe_build_assets(cfg, download_path=None): - dest = cli.ROOT / "host" / json.load(open(cfg))["folder_name"] / "config.json" - if Path(cfg) == dest: - return - return orig_build(cfg, download_path=download_path) - - monkeypatch.setattr(cli, "build_assets", safe_build_assets) - monkeypatch.setattr(time, "sleep", lambda x: None) - - onion_url = "http://quick.onion" - - class FakePopen: - def __init__(self, cmd, stdout=None, stderr=None, env=None, **kwargs): - self.cmd = cmd - self.stdout = stdout - self.stderr = stderr - self.env = env - self.pid = 99 - if stdout is not None: - stdout.write(f"URL: {onion_url}\n") - stdout.flush() - - def poll(self): - return None - - monkeypatch.setattr(cli.subprocess, "Popen", FakePopen) - - monkeypatch.setattr(cli, "choose_language", lambda *a: "en") - config_path = test_data_dir / "config.json" - cli.main(["quickstart", "--non-interactive"]) - - dir_path = test_data_dir / "host" / folder_name - assert (dir_path / "index.html").exists() - log_file = dir_path / "onionshare.log" - assert onion_url in log_file.read_text() - updated = json.load(open(dir_path / "config.json")) - # tear_off_link should be set to onion address (for tear-off tabs) - assert updated["tear_off_link"] == onion_url - # url should be preserved (user-configured content link) - assert updated["url"] == config["url"] - - -def test_install_systemd_autostart_writes_recovery_timer(tmp_path, monkeypatch): - """Test Linux autostart installs a recurring recovery service and timer.""" - commands = [] - - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(platform_linux.Path, "home", lambda: tmp_path) - monkeypatch.setattr(cli, "_find_voxvera_bin", lambda: "/tmp/voxvera") - monkeypatch.setattr(platform_linux.subprocess, "run", lambda args, **kwargs: commands.append(args)) - monkeypatch.setenv("USER", "tester") - - cli._install_systemd_autostart() - - service_dir = tmp_path / ".config" / "systemd" / "user" - service_text = (service_dir / "voxvera-start.service").read_text(encoding="utf-8") - timer_text = (service_dir / "voxvera-start.timer").read_text(encoding="utf-8") - - assert "ExecStart=/tmp/voxvera _linux_autostart_start" in service_text - assert "KillMode=process" in service_text - assert "OnUnitActiveSec=5min" in timer_text - assert "Persistent=true" in timer_text - assert any(args[:4] == ["systemctl", "--user", "enable", "--now"] and args[4] == "voxvera-start.timer" for args in commands) - assert any(args[:4] == ["systemctl", "--user", "start", "voxvera-start.service"] for args in commands) - - -def test_linux_autostart_start_sets_hardened_environment(monkeypatch): - events = [] - - monkeypatch.delenv("VOXVERA_ONIONSHARE_NO_AWAIT_PUBLICATION", raising=False) - monkeypatch.delenv("VOXVERA_ONIONSHARE_SYSTEM_TOR", raising=False) - monkeypatch.setattr(cli, "cleanup_onionshare_tmp", lambda max_age_minutes=60: events.append(("cleanup", max_age_minutes)) or 0) - monkeypatch.setattr(cli, "_user_is_group_member", lambda group: False) - monkeypatch.setattr(cli, "start_all_servers", lambda: events.append(("start_all", None))) - - cli.linux_autostart_start() - - assert events == [("cleanup", 60), ("start_all", None)] - assert os.environ["VOXVERA_ONIONSHARE_NO_AWAIT_PUBLICATION"] == "1" - assert os.environ["VOXVERA_ONIONSHARE_SYSTEM_TOR"] == "1" - - -def test_linux_autostart_start_switches_to_debian_tor_group(monkeypatch): - exec_call = {} - - monkeypatch.setattr(cli, "cleanup_onionshare_tmp", lambda max_age_minutes=60: 0) - monkeypatch.setattr(cli, "_user_is_group_member", lambda group: group == "debian-tor") - monkeypatch.setattr(cli, "_current_group_names", lambda: {"user"}) - monkeypatch.setattr(cli, "_find_voxvera_bin", lambda: "/tmp/vox vera") - - def fake_execvp(binary, args): - exec_call["binary"] = binary - exec_call["args"] = args - raise RuntimeError("stop") - - monkeypatch.setattr(cli.os, "execvp", fake_execvp) - - with pytest.raises(RuntimeError, match="stop"): - cli.linux_autostart_start() - - assert exec_call["binary"] == "sg" - assert exec_call["args"][:3] == ["sg", "debian-tor", "-c"] - assert "VOXVERA_ONIONSHARE_NO_AWAIT_PUBLICATION=1" in exec_call["args"][3] - assert "VOXVERA_ONIONSHARE_SYSTEM_TOR=1" in exec_call["args"][3] - assert "'/tmp/vox vera' start-all" in exec_call["args"][3] - - -def test_serve_uses_internal_onionshare_when_no_await_requested(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - cli.main(["build"]) - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - folder_name = config["folder_name"] - dir_path = test_data_dir / "host" / folder_name - - monkeypatch.setenv("VOXVERA_ONIONSHARE_NO_AWAIT_PUBLICATION", "1") - monkeypatch.setattr(cli, "require_cmd", lambda c: True) - monkeypatch.setattr(cli, "build_assets", lambda *args, **kwargs: None) - monkeypatch.setattr(time, "sleep", lambda x: None) - monkeypatch.setattr(cli.shutil, "which", lambda cmd: "/usr/bin/onionshare-cli" if cmd == "onionshare-cli" else None) - - onion_url = "http://internalpath.onion" - popen_calls = [] - - class FakePopen: - def __init__(self, cmd, stdout=None, stderr=None, env=None, **kwargs): - popen_calls.append(cmd) - self.pid = 44 - if stdout is not None: - stdout.write(f"URL: {onion_url}\n") - stdout.flush() - - def poll(self): - return None - - monkeypatch.setattr(cli.subprocess, "Popen", FakePopen) - - cli.main(["serve"]) - - assert popen_calls - assert "_internal_onionshare" in popen_calls[0] - assert "/usr/bin/onionshare-cli" not in popen_calls[0] - updated = json.load(open(dir_path / "config.json")) - assert updated["tear_off_link"] == onion_url - - -def _write_nostr_event(path, payload_overrides=None, event_overrides=None): - payload = { - "type": "voxvera_flyer", - "version": 1, - "folder_name": "nostr-flyer", - "lang": "en", - "name": "Nostr Flyer", - "title": "PUBLIC NOTICE", - "subtitle": "DO ~~NOT~~ IGNORE", - "headline": "NOSTR SOURCE TEST", - "content": "This flyer came from a Nostr event.", - "url_message": "Read the source.", - "url": "https://example.com/source", - "footer_message": "npub test", - "attachment_path": "", - "attachment_filename": "", - "qr_target": "flyer_url", - } - if payload_overrides: - payload.update(payload_overrides) - event = { - "id": "f" * 64, - "pubkey": "a" * 64, - "created_at": 1760000000, - "kind": 30078, - "tags": [["d", "voxvera:nostr-flyer"], ["t", "voxvera"], ["t", "flyer"]], - "content": json.dumps(payload), - "sig": "b" * 128, - } - if event_overrides: - event.update(event_overrides) - path.write_text(json.dumps(event), encoding="utf-8") - return path - - -def test_nostr_validate_accepts_local_event_file(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - event_path = _write_nostr_event(tmp_path / "event.json") - - cli.main(["nostr", "validate", str(event_path)]) - - assert "Valid VoxVera Nostr flyer: NOSTR SOURCE TEST" in capsys.readouterr().out - - -def test_nostr_import_writes_existing_config_schema(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - event_path = _write_nostr_event(tmp_path / "event.json") - - cli.main(["nostr", "import", str(event_path)]) - - config_path = tmp_path / "data" / "host" / "nostr-flyer" / "config.json" - imported = json.loads(config_path.read_text(encoding="utf-8")) - assert imported["folder_name"] == "nostr-flyer" - assert imported["headline"] == "NOSTR SOURCE TEST" - assert imported["content"] == "This flyer came from a Nostr event." - assert imported["url"] == "https://example.com/source" - assert "Imported Nostr flyer to" in capsys.readouterr().out - - -def test_nostr_import_rejects_existing_site_without_overwrite(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - event_path = _write_nostr_event(tmp_path / "event.json") - cli.main(["nostr", "import", str(event_path)]) - - with pytest.raises(SystemExit): - cli.main(["nostr", "import", str(event_path)]) - - assert "already exists" in capsys.readouterr().err - - -def test_nostr_build_generates_existing_flyer_output(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - event_path = _write_nostr_event(tmp_path / "event.json") - - cli.main(["nostr", "build", str(event_path)]) - - host_dir = tmp_path / "data" / "host" / "nostr-flyer" - assert (host_dir / "config.json").exists() - assert (host_dir / "index.html").exists() - html = (host_dir / "index.html").read_text(encoding="utf-8") - assert "NOSTR SOURCE TEST" in html - - -def test_nostr_serve_builds_then_uses_existing_serve_path(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - event_path = _write_nostr_event(tmp_path / "event.json") - served = [] - monkeypatch.setattr(cli, "serve", lambda config_path: served.append(Path(config_path).name) or "http://ok.onion") - - cli.main(["nostr", "serve", str(event_path)]) - - assert served == ["config.json"] - assert (tmp_path / "data" / "host" / "nostr-flyer" / "index.html").exists() - - -def test_nostr_validate_rejects_unsafe_url_scheme(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - event_path = _write_nostr_event(tmp_path / "event.json", {"url": "javascript:alert(1)"}) - - with pytest.raises(SystemExit): - cli.main(["nostr", "validate", str(event_path)]) - - assert "Unsupported URL scheme" in capsys.readouterr().err - - -def test_nostr_validate_rejects_raw_html(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - event_path = _write_nostr_event(tmp_path / "event.json", {"content": ""}) - - with pytest.raises(SystemExit): - cli.main(["nostr", "validate", str(event_path)]) - - assert "contains raw HTML" in capsys.readouterr().err - - -def test_nostr_validate_rejects_non_file_identifier_in_phase_one(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - - with pytest.raises(SystemExit): - cli.main(["nostr", "validate", "note1example"]) - - assert "Phase 1 only supports local Nostr event JSON files" in capsys.readouterr().err - - -def test_is_server_running_returns_false_for_unreachable_onion(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - host_dir = test_data_dir / "host" / "voxvera" - host_dir.mkdir(parents=True, exist_ok=True) - (host_dir / "server.pid").write_text("123\n", encoding="utf-8") - (host_dir / "config.json").write_text( - json.dumps({"folder_name": "voxvera", "tear_off_link": "http://examplehiddenservice.onion"}), - encoding="utf-8", - ) - old = time.time() - 1200 - os.utime(host_dir / "server.pid", (old, old)) - - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(cli.os, "kill", lambda pid, sig: None) - monkeypatch.setattr(cli.subprocess, "check_output", lambda *args, **kwargs: b"onionshare-cli --website") - monkeypatch.setattr(cli.shutil, "which", lambda cmd: "/usr/bin/curl" if cmd == "curl" else None) - - class _Result: - returncode = 97 - stdout = "" - - monkeypatch.setattr(cli.subprocess, "run", lambda *args, **kwargs: _Result()) - - assert cli.is_server_running("voxvera") is False - assert (host_dir / "server.pid").exists() - - -def test_is_server_running_keeps_recent_unreachable_onion_alive(tmp_path, monkeypatch): - _setup_tmp(monkeypatch, tmp_path) - test_data_dir = tmp_path / "data" - host_dir = test_data_dir / "host" / "voxvera" - host_dir.mkdir(parents=True, exist_ok=True) - (host_dir / "server.pid").write_text("123\n", encoding="utf-8") - (host_dir / "config.json").write_text( - json.dumps({"folder_name": "voxvera", "tear_off_link": "http://examplehiddenservice.onion"}), - encoding="utf-8", - ) - - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(cli.os, "kill", lambda pid, sig: None) - monkeypatch.setattr(cli.subprocess, "check_output", lambda *args, **kwargs: b"onionshare-cli --website") - monkeypatch.setattr(cli.shutil, "which", lambda cmd: "/usr/bin/curl" if cmd == "curl" else None) - - class _Result: - returncode = 97 - stdout = "" - - monkeypatch.setattr(cli.subprocess, "run", lambda *args, **kwargs: _Result()) - - assert cli.is_server_running("voxvera") is True - - -def test_start_all_servers_restarts_unhealthy_site(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - host_dir = tmp_path / "data" / "host" / "voxvera" - host_dir.mkdir(parents=True, exist_ok=True) - (host_dir / "config.json").write_text(json.dumps({"folder_name": "voxvera"}), encoding="utf-8") - (host_dir / "server.pid").write_text("123\n", encoding="utf-8") - - events = [] - monkeypatch.setattr(cli, "_seed_bundled_sites", lambda: None) - monkeypatch.setattr(cli, "is_server_running", lambda name: False) - monkeypatch.setattr(cli, "stop_server", lambda name: events.append(("stop", name))) - monkeypatch.setattr(cli, "serve", lambda path: events.append(("serve", Path(path).name)) or "http://ok.onion") - - cli.start_all_servers() - - assert events == [("stop", "voxvera"), ("serve", "config.json")] - output = capsys.readouterr().out - assert "[RESTART] voxvera: existing process failed health check" in output - assert "[OK] voxvera: http://ok.onion" in output - - -def test_stop_server_kills_process_group_on_linux(tmp_path, monkeypatch, capsys): - _setup_tmp(monkeypatch, tmp_path) - host_dir = tmp_path / "data" / "host" / "voxvera" - host_dir.mkdir(parents=True, exist_ok=True) - pid_file = host_dir / "server.pid" - pid_file.write_text("456\n", encoding="utf-8") - - killed = [] - monkeypatch.setattr(platform, "system", lambda: "Linux") - monkeypatch.setattr(cli.os, "killpg", lambda pid, sig: killed.append((pid, sig))) - - cli.stop_server("voxvera") - - assert killed == [(456, cli.signal.SIGTERM)] - assert not pid_file.exists() - assert "Stopped voxvera (PID 456)" in capsys.readouterr().out - - -def test_get_tor_ports_with_env_vars(monkeypatch): - """Test that get_tor_ports respects environment variables.""" - monkeypatch.setenv("TOR_SOCKS_PORT", "9999") - monkeypatch.setenv("TOR_CONTROL_PORT", "8888") - socks, ctl = cli.get_tor_ports() - assert socks == "9999" - assert ctl == "8888" - - -def test_get_tor_ports_auto_detect_defaults(monkeypatch): - """Test that get_tor_ports returns defaults when no env vars and no Tor running.""" - monkeypatch.delenv("TOR_SOCKS_PORT", raising=False) - monkeypatch.delenv("TOR_CONTROL_PORT", raising=False) - - # Mock socket to always fail connection so it falls back to defaults - class MockSocket: - def __init__(self, *args, **kwargs): - pass - - def settimeout(self, *args, **kwargs): - pass - - def connect_ex(self, *args, **kwargs): - return 1 # 1 is a failure code - - def close(self): - pass - - monkeypatch.setattr(socket, "socket", MockSocket) - - # Don't actually start Tor, so detection will fail and fall back to defaults - socks, ctl = cli.get_tor_ports() - assert socks == "9050" # Default SOCKS port - assert ctl == "9051" # Default control port - - -def test_build_without_url_skips_qr(tmp_path, monkeypatch, capsys): - """Test that build works even without URLs configured initially.""" - _setup_tmp(monkeypatch, tmp_path) - - # Remove URLs from config - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - config["url"] = "" - config["tear_off_link"] = "" - with open(test_data_dir / "config.json", "w") as f: - json.dump(config, f) - - # Remove any existing QR files from src and host to test fresh generation - for qr_file in ["qrcode-content.png", "qrcode-tear-offs.png"]: - (res_root / "src" / qr_file).unlink(missing_ok=True) - (test_data_dir / "host" / config["folder_name"] / qr_file).unlink(missing_ok=True) - # Build should complete without error, just skip QR generation - cli.main(["build"]) - - test_data_dir = tmp_path / "data" - dest = test_data_dir / "host" / config["folder_name"] - assert dest.is_dir() - assert (dest / "config.json").exists() - assert (dest / "index.html").exists() - html = (dest / "index.html").read_text(encoding="utf-8") - assert 'class="container no-tear-offs"' in html - # QR codes should not exist since no URLs were provided - assert not (dest / "qrcode-content.png").exists() - assert not (dest / "qrcode-tear-offs.png").exists() - - -def test_build_injects_localized_tor_browser_download_links(tmp_path, monkeypatch): - """Test that the localized Tor Browser CTA gets the expected localized URL.""" - _setup_tmp(monkeypatch, tmp_path) - - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - config["lang"] = "de" - with open(test_data_dir / "config.json", "w") as f: - json.dump(config, f) - - cli.main(["--config", str(test_data_dir / "config.json"), "build"]) - - html = (test_data_dir / "host" / config["folder_name"] / "index.html").read_text(encoding="utf-8") - assert 'href="https://www.torproject.org/de/download/"' in html - assert "Tor-Browser verwenden" in html - - -def test_build_with_only_url(tmp_path, monkeypatch): - """Test that the main URL also populates tear-off rendering before onion setup.""" - _setup_tmp(monkeypatch, tmp_path) - - # Set only url (content link) - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - config["url"] = "https://example.com/external-resource" - config["tear_off_link"] = "" - with open(test_data_dir / "config.json", "w") as f: - json.dump(config, f) - - # Remove any existing QR files from src and host to test fresh generation - for qr_file in ["qrcode-content.png", "qrcode-tear-offs.png"]: - (res_root / "src" / qr_file).unlink(missing_ok=True) - (test_data_dir / "host" / config["folder_name"] / qr_file).unlink(missing_ok=True) - cli.main(["build"]) - - test_data_dir = tmp_path / "data" - dest = test_data_dir / "host" / config["folder_name"] - html = (dest / "index.html").read_text(encoding="utf-8") - assert (dest / "qrcode-content.png").exists() - assert (dest / "qrcode-tear-offs.png").exists() - assert 'class="container no-tear-offs"' not in html - assert "https://example.com/external-resource" in html - - -def test_build_with_only_tear_off_link(tmp_path, monkeypatch): - """Test that QR codes work when only tear_off_link is set (pre-serve).""" - _setup_tmp(monkeypatch, tmp_path) - - # Set only tear_off_link (before serve sets it to onion) - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - config["url"] = "" - config["tear_off_link"] = "http://preconfigured.onion" - with open(test_data_dir / "config.json", "w") as f: - json.dump(config, f) - - # Remove any existing QR files from src and host to test fresh generation - for qr_file in ["qrcode-content.png", "qrcode-tear-offs.png"]: - (res_root / "src" / qr_file).unlink(missing_ok=True) - (test_data_dir / "host" / config["folder_name"] / qr_file).unlink(missing_ok=True) - cli.main(["build"]) - - test_data_dir = tmp_path / "data" - dest = test_data_dir / "host" / config["folder_name"] - html = (dest / "index.html").read_text(encoding="utf-8") - assert 'class="container no-tear-offs"' not in html - # Only tear-off QR should exist (will be updated by serve) - assert not (dest / "qrcode-content.png").exists() - assert (dest / "qrcode-tear-offs.png").exists() - - -def test_serve_passes_tor_ports_to_env(monkeypatch, tmp_path): - """Test that serve() passes detected Tor ports via env to subprocess.""" - _setup_tmp(monkeypatch, tmp_path) - cli.main(["build"]) - - captured_env = {} - - class FakePopen: - def __init__(self, cmd, stdout=None, stderr=None, env=None, **kwargs): - self.cmd = cmd - self.stdout = stdout - self.stderr = stderr - self.pid = 42 - captured_env.update(env or {}) - if stdout is not None: - stdout.write("Started at http://test.onion\n") - stdout.flush() - - def poll(self): - return None - - monkeypatch.setattr(cli, "require_cmd", lambda c: True) - monkeypatch.setattr(cli.subprocess, "Popen", FakePopen) - monkeypatch.setattr(cli, "build_assets", lambda *a, **kw: None) - monkeypatch.setattr(time, "sleep", lambda x: None) - - # Test with custom env vars - monkeypatch.setenv("TOR_SOCKS_PORT", "1111") - monkeypatch.setenv("TOR_CONTROL_PORT", "2222") - - cli.main(["serve"]) - - assert captured_env.get("TOR_SOCKS_PORT") == "1111" - assert captured_env.get("TOR_CONTROL_PORT") == "2222" - - -def test_backward_compatibility_with_https_config(tmp_path, monkeypatch): - """Test that old configs with https URLs still work for building.""" - _setup_tmp(monkeypatch, tmp_path) - - # Simulate old config with HTTPS URLs - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - config["url"] = "https://example.com/old-style" - config["tear_off_link"] = "https://example.com/tear-off" - with open(test_data_dir / "config.json", "w") as f: - json.dump(config, f) - - cli.main(["build"]) - - test_data_dir = tmp_path / "data" - dest = test_data_dir / "host" / config["folder_name"] - assert (dest / "qrcode-content.png").exists() - assert (dest / "qrcode-tear-offs.png").exists() - - -def test_long_urls_in_qr(tmp_path, monkeypatch): - """Test that long URLs still generate valid QR codes.""" - _setup_tmp(monkeypatch, tmp_path) - - res_root = tmp_path / "data" / "voxvera" - test_data_dir = tmp_path / "data" - config = json.load(open(res_root / "src" / "config.json")) - # Very long URL (close to 200 char limit) - config["url"] = "http://" + "a" * 190 + ".onion" - config["tear_off_link"] = "https://example.com/" + "path/" * 20 - with open(test_data_dir / "config.json", "w") as f: - json.dump(config, f) - - cli.main(["build"]) - - test_data_dir = tmp_path / "data" - dest = test_data_dir / "host" / config["folder_name"] - assert (dest / "qrcode-content.png").exists() - assert (dest / "qrcode-tear-offs.png").exists() diff --git a/tests/test_e2e.py b/tests/test_e2e.py deleted file mode 100644 index 0b55f80..0000000 --- a/tests/test_e2e.py +++ /dev/null @@ -1,473 +0,0 @@ -""" -End-to-end tests for VoxVera installation and serving. - -These tests verify: -1. Installation script works correctly -2. Full workflow from init -> build -> serve -3. Site is reachable at the onion address - -To run these tests: - pytest tests/test_e2e.py -v --tb=short - -Requirements: -- Tor must be running (system tor or Tor Browser) -- onionshare-cli must be installed -""" - -import json -import os -import re -import shutil -import socket -import subprocess -import sys -import time -from pathlib import Path - -import pytest - -# Mark these tests as slow/integration tests -pytestmark = [pytest.mark.slow, pytest.mark.integration] - - -def check_tor_running(): - """Check if Tor is running on default ports.""" - for port in [9050, 9150]: - try: - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.settimeout(0.5) - result = sock.connect_ex(("127.0.0.1", port)) - sock.close() - if result == 0: - return port - except Exception: - pass - return None - - -def check_onionshare_cli(): - """Check if onionshare-cli is installed.""" - try: - import onionshare_cli # noqa: F401 - return True - except ImportError: - return False - - -@pytest.fixture(scope="module") -def skip_without_deps(): - """Skip tests if required dependencies aren't available.""" - tor_port = check_tor_running() - if not tor_port: - pytest.skip("Tor is not running on expected ports (9050 or 9150)") - if not check_onionshare_cli(): - pytest.skip("onionshare-cli is not installed") - return tor_port - - -class TestInstallation: - """Tests for the installation process.""" - - def test_install_script_detects_package_manager(self): - """Test that install script detects the system's package manager.""" - install_script = Path(__file__).resolve().parent.parent / "install.sh" - - # Check script exists and has proper structure - assert install_script.exists() - content = install_script.read_text() - - # Verify it handles multiple package managers - assert "apt-get" in content - assert "dnf" in content or "yum" in content - assert "onionshare-cli" in content or "onionshare" in content - - def test_voxvera_install_script_structure(self): - """Test that voxvera-install.sh has all required components.""" - install_script = Path(__file__).resolve().parent.parent / "voxvera-install.sh" - content = install_script.read_text() - - # Verify it tries to install onionshare-cli - assert "onionshare-cli" in content or "onionshare" in content - - # Verify it installs tor - assert "tor" in content - - # Verify it creates a torrc config - assert "torrc" in content - - -class TestFullWorkflow: - """End-to-end tests for the complete VoxVera workflow.""" - - @pytest.mark.usefixtures("skip_without_deps") - def test_full_init_build_serve_workflow(self, tmp_path, monkeypatch): - """Test complete workflow: init -> build -> serve -> verify onion site.""" - sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) - from voxvera import cli - - # Setup temp workspace - repo_root = Path(__file__).resolve().parent.parent - # Internal resources (ROOT) - res_root = tmp_path / "voxvera" - res_root.mkdir() - shutil.copytree(repo_root / "voxvera" / "src", res_root / "src") - shutil.copytree(repo_root / "voxvera" / "locales", res_root / "locales") - shutil.copytree(repo_root / "voxvera" / "templates", res_root / "templates") - - monkeypatch.setattr(cli, "ROOT", res_root) - monkeypatch.setattr(cli, "DATA_DIR", tmp_path) - monkeypatch.setattr(cli, "_src_res", lambda *p: res_root / "src" / Path(*p)) - monkeypatch.setattr(cli, "_locale_res", lambda *p: res_root / "locales" / Path(*p)) - monkeypatch.setattr(cli, "_template_res", lambda *p: res_root / "templates" / Path(*p)) - - # Create test config - config = { - "name": "Test Flyer", - "folder_name": "testflyer", - "title": "TEST TITLE", - "subtitle": "Test Subtitle", - "headline": "Test Headline", - "content": "Test content for the flyer.", - "url": "https://example.com/external", - "tear_off_link": "", # Will be set by serve - "url_message": "Visit our site", - "footer_message": "0101010", - } - - config_path = tmp_path / "config.json" - with open(config_path, "w") as f: - json.dump(config, f) - - # Step 1: Build - cli.build_assets(config_path) - - host_dir = tmp_path / "host" / "testflyer" - assert host_dir.exists() - assert (host_dir / "index.html").exists() - assert (host_dir / "config.json").exists() - - # Verify QR code was generated for URL - assert (host_dir / "qrcode-content.png").exists() - - # Step 2: Serve (mock the subprocess to avoid isolation issues) - onion_url = "http://test123abc.onion" - - class MockPopen: - def __init__(self, cmd, stdout=None, stderr=None, env=None, **kwargs): - self.cmd = cmd - self.stdout = stdout - self.stderr = stderr - self.pid = 42 - self._running = True - - # Write to log file to simulate OnionShare - if stdout is not None: - stdout.write(f"Started at {onion_url}\n") - stdout.flush() - - def poll(self): - return None # Still running - - def terminate(self): - self._running = False - - def kill(self): - self._running = False - - def wait(self, timeout=None): - return 0 - - monkeypatch.setattr(cli.subprocess, "Popen", MockPopen) - monkeypatch.setattr(time, "sleep", lambda x: None) - - # Run serve - cli.serve(str(host_dir / "config.json")) - - # Step 3: Verify - # Verify config was updated - updated_config = json.load(open(host_dir / "config.json")) - assert updated_config["tear_off_link"] == onion_url - assert updated_config["url"] == "https://example.com/external" - - # Verify QR code for tear-off link now exists (regenerated by serve) - assert (host_dir / "qrcode-tear-offs.png").exists() - - @pytest.mark.usefixtures("skip_without_deps") - def test_site_reachable_via_tor(self, tmp_path, monkeypatch): - """Test that the served site is actually reachable via Tor. - - This test builds site assets, launches onionshare-cli directly against - them, waits for the .onion address, then fetches it through Tor SOCKS. - - Requires: Tor running, onionshare-cli, requests[socks] - """ - pytest.importorskip("requests", reason="requests library required") - - sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) - from voxvera import cli - - # Setup - repo_root = Path(__file__).resolve().parent.parent - res_root = tmp_path / "voxvera" - res_root.mkdir() - shutil.copytree(repo_root / "voxvera" / "src", res_root / "src") - shutil.copytree(repo_root / "voxvera" / "locales", res_root / "locales") - shutil.copytree(repo_root / "voxvera" / "templates", res_root / "templates") - - monkeypatch.setattr(cli, "ROOT", res_root) - monkeypatch.setattr(cli, "DATA_DIR", tmp_path) - monkeypatch.setattr(cli, "_src_res", lambda *p: res_root / "src" / Path(*p)) - monkeypatch.setattr(cli, "_locale_res", lambda *p: res_root / "locales" / Path(*p)) - monkeypatch.setattr(cli, "_template_res", lambda *p: res_root / "templates" / Path(*p)) - - config = { - "name": "Reachability Test", - "folder_name": "reachtest", - "title": "Reachability Test", - "subtitle": "Testing Tor reachability", - "headline": "Test Headline", - "content": "This tests if the site is reachable via Tor.", - "url": "https://example.com", - "tear_off_link": "", - "url_message": "Test message", - "footer_message": "101010", - } - - config_path = tmp_path / "config.json" - with open(config_path, "w") as f: - json.dump(config, f) - - cli.build_assets(config_path) - - host_dir = tmp_path / "host" / "reachtest" - assert host_dir.is_dir(), f"Build did not create {host_dir}" - - # Launch onionshare-cli directly against the built host directory using our internal wrapper - logfile = host_dir / "onionshare.log" - log_fh = open(logfile, "w") - - # Pass Tor environment variables to ensure it uses the running Tor - env = os.environ.copy() - tor_port = check_tor_running() - if tor_port: - env["TOR_SOCKS_PORT"] = str(tor_port) - env["TOR_CONTROL_PORT"] = str(tor_port + 1) - - cmd = [ - sys.executable, - "-m", "voxvera.cli", - "_internal_onionshare", - "--website", - "--public", - "--persistent", - str(host_dir / ".onionshare-session"), - "-v", - str(host_dir), - ] - proc = subprocess.Popen(cmd, stdout=log_fh, stderr=subprocess.STDOUT, env=env) - - try: - # Wait for onion URL to appear in the log - onion_url = None - start_time = time.time() - - while time.time() - start_time < 60: - if proc.poll() is not None: - log_fh.close() - content = logfile.read_text() - pytest.skip( - f"onionshare-cli exited early (rc={proc.returncode}): " - + content[-500:] - ) - - log_fh.flush() - if logfile.exists(): - content = logfile.read_text() - m = re.search(r"https?://[a-z2-7]{56}\.onion", content) - if m: - onion_url = m.group(0) - break - time.sleep(1) - - if not onion_url: - log_fh.close() - content = logfile.read_text() if logfile.exists() else "(no log)" - pytest.skip( - "Could not get onion URL within 60s. Log tail: " + content[-500:] - ) - - # Try to reach the site via Tor - import requests - - tor_port = check_tor_running() - session = requests.session() - session.proxies = { - "http": f"socks5h://127.0.0.1:{tor_port}", - "https": f"socks5h://127.0.0.1:{tor_port}", - } - - # Tor circuits can take time; retry several times - success = False - last_error = None - for attempt in range(6): - try: - response = session.get(onion_url, timeout=30) - if response.status_code == 200: - success = True - break - except Exception as e: - last_error = str(e) - time.sleep(3) - - assert success, ( - f"Could not reach {onion_url} after 6 attempts. " - f"Last error: {last_error}" - ) - - finally: - log_fh.close() - proc.terminate() - try: - proc.wait(timeout=5) - except subprocess.TimeoutExpired: - proc.kill() - - -class TestSiteFiles: - """Tests for verifying site file structure.""" - - def test_all_expected_files_present(self, tmp_path, monkeypatch): - """Test that all expected files are present in the hosted directory.""" - sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) - from voxvera import cli - - # Setup - repo_root = Path(__file__).resolve().parent.parent - res_root = tmp_path / "voxvera" - res_root.mkdir() - shutil.copytree(repo_root / "voxvera" / "src", res_root / "src") - shutil.copytree(repo_root / "voxvera" / "locales", res_root / "locales") - shutil.copytree(repo_root / "voxvera" / "templates", res_root / "templates") - - monkeypatch.setattr(cli, "ROOT", res_root) - monkeypatch.setattr(cli, "DATA_DIR", tmp_path) - monkeypatch.setattr(cli, "_src_res", lambda *p: res_root / "src" / Path(*p)) - monkeypatch.setattr(cli, "_locale_res", lambda *p: res_root / "locales" / Path(*p)) - monkeypatch.setattr(cli, "_template_res", lambda *p: res_root / "templates" / Path(*p)) - - config = { - "name": "Test", - "folder_name": "filetest", - "title": "Title", - "subtitle": "Subtitle", - "headline": "Headline", - "content": "Content", - "url": "https://example.com", - "tear_off_link": "", - "url_message": "", - "footer_message": "", - } - - config_path = tmp_path / "config.json" - with open(config_path, "w") as f: - json.dump(config, f) - - cli.build_assets(config_path) - - host_dir = tmp_path / "host" / "filetest" - - # Check all expected files exist - expected_files = [ - "index.html", - "config.json", - "qrcode-content.png", - ] - - for filename in expected_files: - assert (host_dir / filename).exists(), f"Missing file: {filename}" - - -class TestErrorHandling: - """Tests for error handling and edge cases.""" - - def test_serve_without_build_fails_gracefully(self, tmp_path, monkeypatch): - """Test that serve fails gracefully if build hasn't been run.""" - sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) - from voxvera import cli - - monkeypatch.setattr(cli, "ROOT", tmp_path) - - # Try to serve without building first - config_path = tmp_path / "config.json" - config_path.parent.mkdir(parents=True, exist_ok=True) - config_path.write_text( - json.dumps( - { - "folder_name": "nonexistent", - "name": "Test", - "title": "Title", - "subtitle": "Subtitle", - "headline": "Headline", - "content": "Content", - "url": "", - "tear_off_link": "", - } - ) - ) - - with pytest.raises(SystemExit): - cli.serve(str(config_path)) - - -class TestTorIntegration: - """Tests for Tor integration.""" - - def test_tor_auto_detection_falls_back_to_defaults(self, monkeypatch, tmp_path): - """Test that Tor port detection falls back to defaults when Tor isn't running.""" - sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) - from voxvera import cli - - monkeypatch.setattr(cli, "DATA_DIR", tmp_path) - - # Clear environment variables - monkeypatch.delenv("TOR_SOCKS_PORT", raising=False) - monkeypatch.delenv("TOR_CONTROL_PORT", raising=False) - - # Mock socket to always fail connection so it falls back to defaults - import socket - - class MockSocket: - def __init__(self, *args, **kwargs): - pass - - def settimeout(self, *args, **kwargs): - pass - - def connect_ex(self, *args, **kwargs): - return 1 # 1 is a failure code - - def close(self): - pass - - monkeypatch.setattr(socket, "socket", MockSocket) - - # This should not raise an error, just return defaults - socks, ctl = cli.get_tor_ports() - - assert socks == "9050" - assert ctl == "9051" - - def test_tor_env_vars_override_detection(self, monkeypatch, tmp_path): - """Test that environment variables override auto-detection.""" - sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) - from voxvera import cli - - monkeypatch.setattr(cli, "DATA_DIR", tmp_path) - - monkeypatch.setenv("TOR_SOCKS_PORT", "9999") - monkeypatch.setenv("TOR_CONTROL_PORT", "8888") - - socks, ctl = cli.get_tor_ports() - - assert socks == "9999" - assert ctl == "8888" diff --git a/tests/test_integrity.py b/tests/test_integrity.py deleted file mode 100644 index 27aeabd..0000000 --- a/tests/test_integrity.py +++ /dev/null @@ -1,286 +0,0 @@ -import json -import os -import shutil -import zipfile -from pathlib import Path -from voxvera import cli - -# Helper to find project root -REPO_ROOT = Path(__file__).resolve().parent.parent - - -def test_support_matrix_exists_and_matches_docs(): - support_matrix_path = REPO_ROOT / "support-matrix.json" - support_doc_path = REPO_ROOT / "docs" / "platform-support-matrix.md" - - assert support_matrix_path.exists() - assert support_doc_path.exists() - - support_data = json.loads(support_matrix_path.read_text(encoding="utf-8")) - assert support_data["default_supported_target"] == "linux_cli_systemd" - assert any(platform["tier"] == "supported" for platform in support_data["platforms"]) - assert any(platform["id"] == "windows_cli" for platform in support_data["platforms"]) - - support_doc = support_doc_path.read_text(encoding="utf-8") - assert "Linux CLI with `systemd --user`" in support_doc - assert "Experimental" in support_doc - - -def test_platform_smoke_is_wired_into_validation_surfaces(): - smoke_script = REPO_ROOT / "scripts" / "platform-smoke.sh" - ci_workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text(encoding="utf-8") - e2e_script = (REPO_ROOT / "ci" / "test-e2e.sh").read_text(encoding="utf-8") - binaries_workflow = (REPO_ROOT / ".github" / "workflows" / "binaries.yml").read_text(encoding="utf-8") - smoke_text = smoke_script.read_text(encoding="utf-8") - - assert smoke_script.exists() - assert "scripts/platform-smoke.sh linux-cli" in ci_workflow - assert "scripts/platform-smoke.sh linux-cli" in e2e_script - assert "platform-status --json" in ci_workflow - assert "doctor --json" in ci_workflow - assert "autostart status --json" in ci_workflow - assert "platform-status --json" in binaries_workflow - assert "doctor --json" in binaries_workflow - assert "autostart status --json" in binaries_workflow - for target in ("linux-cli", "macos-cli", "windows-cli", "docker-cli"): - assert target in smoke_text - - -def test_linux_validation_runbook_and_helper_are_linked(): - runbook = REPO_ROOT / "docs" / "linux-hosting-validation.md" - helper = REPO_ROOT / "scripts" / "linux-recovery-check.sh" - readme = (REPO_ROOT / "README.md").read_text(encoding="utf-8") - - assert runbook.exists() - assert helper.exists() - assert "docs/linux-hosting-validation.md" in readme - assert "scripts/linux-recovery-check.sh" in runbook.read_text(encoding="utf-8") - - -def test_frozen_builds_bundle_support_matrix(): - build_script = (REPO_ROOT / "scripts" / "build_binaries.sh").read_text(encoding="utf-8") - binaries_workflow = (REPO_ROOT / ".github" / "workflows" / "binaries.yml").read_text(encoding="utf-8") - - assert '--add-data "support-matrix.json:."' in build_script - assert '--add-data "support-matrix.json${SEP}."' in binaries_workflow - - -def test_release_artifact_validation_is_wired_into_binaries_workflow(): - validation_script = REPO_ROOT / "scripts" / "validate-release-artifacts.sh" - binaries_workflow = (REPO_ROOT / ".github" / "workflows" / "binaries.yml").read_text(encoding="utf-8") - script_text = validation_script.read_text(encoding="utf-8") - - assert validation_script.exists() - assert "scripts/validate-release-artifacts.sh" in binaries_workflow - assert "dpkg-deb -x" in script_text - assert "platform-status --json" in script_text - assert "init --non-interactive" in script_text - - -def test_docker_runtime_assets_are_present(): - dockerfile = (REPO_ROOT / "Dockerfile").read_text(encoding="utf-8") - dockerignore = REPO_ROOT / ".dockerignore" - entrypoint = REPO_ROOT / "scripts" / "docker-entrypoint.sh" - healthcheck = REPO_ROOT / "scripts" / "docker-healthcheck.sh" - runtime_smoke = REPO_ROOT / "scripts" / "docker-runtime-smoke.sh" - ci_workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text(encoding="utf-8") - docker_doc = (REPO_ROOT / "docs" / "templates" / "docker.md").read_text(encoding="utf-8") - - assert dockerignore.exists() - assert entrypoint.exists() - assert healthcheck.exists() - assert runtime_smoke.exists() - assert "tini" in dockerfile - assert "docker-entrypoint.sh" in dockerfile - assert "docker-healthcheck.sh" in dockerfile - assert "HEALTHCHECK" in dockerfile - assert "scripts/docker-runtime-smoke.sh" in ci_workflow - assert "starts an in-container Tor daemon" in docker_doc - - -def test_support_matrix_path_has_runtime_fallbacks(): - base_platform = (REPO_ROOT / "voxvera" / "platforms" / "base.py").read_text(encoding="utf-8") - - assert "VOXVERA_SUPPORT_MATRIX_PATH" in base_platform - assert 'Path.cwd() / "support-matrix.json"' in base_platform - assert 'Path("/opt/voxvera/support-matrix.json")' in base_platform - -def test_locale_completeness(): - """Verify that all non-English locales have the same keys as English.""" - locales_dir = REPO_ROOT / "voxvera" / "locales" - en_path = locales_dir / "en.json" - - with open(en_path, "r", encoding="utf-8") as f: - en_data = json.load(f) - - # Flatten keys for easier comparison - def get_keys(d, prefix=""): - keys = set() - for k, v in d.items(): - if isinstance(v, dict): - keys.update(get_keys(v, f"{prefix}{k}.")) - else: - keys.add(f"{prefix}{k}") - return keys - - en_keys = get_keys(en_data) - - locale_files = list(locales_dir.glob("*.json")) - assert len(locale_files) >= 10, "Should have at least 10 languages supported" - - missing_info = [] - for lp in locale_files: - if lp.name == "en.json": - continue - with open(lp, "r", encoding="utf-8") as f: - data = json.load(f) - keys = get_keys(data) - missing = en_keys - keys - if missing: - missing_info.append(f"{lp.name} is missing: {missing}") - - assert not missing_info, "\n".join(missing_info) - - -def test_critical_locale_labels_are_not_left_in_english(): - """Verify key translated labels are not left as raw English in non-English locales.""" - locales_dir = REPO_ROOT / "voxvera" / "locales" - en_data = json.loads((locales_dir / "en.json").read_text(encoding="utf-8")) - critical_paths = [ - ("cli", "attachment_path_label"), - ("cli", "manage_action_edit"), - ("web", "download_attachment"), - ] - - for lp in locales_dir.glob("*.json"): - if lp.name == "en.json": - continue - data = json.loads(lp.read_text(encoding="utf-8")) - for section, key in critical_paths: - assert data[section][key] != en_data[section][key], f"{lp.name} leaves {section}.{key} in English" - - -def test_export_import_roundtrip(tmp_path, monkeypatch): - """Verify that export -> import preserves the Tor identity key perfectly.""" - # Setup tmp environment - shutil.copytree(REPO_ROOT / "voxvera" / "src", tmp_path / "src") - shutil.copytree(REPO_ROOT / "voxvera" / "locales", tmp_path / "locales") - monkeypatch.setattr(cli, "ROOT", tmp_path) - monkeypatch.setattr(cli, "DATA_DIR", tmp_path) - monkeypatch.setattr(cli, "_src_res", lambda *p: tmp_path / "src" / Path(*p)) - monkeypatch.setattr(cli, "_locale_res", lambda *p: tmp_path / "locales" / Path(*p)) - - # Create a site with a "secret" Tor key - folder_name = "secret-site" - site_dir = tmp_path / "host" / folder_name - site_dir.mkdir(parents=True) - - config = {"folder_name": folder_name, "name": "Secret", "lang": "en"} - with open(site_dir / "config.json", "w") as f: - json.dump(config, f) - - secret_key = "THIS-IS-A-VERY-SECRET-TOR-KEY-12345" - session_file = site_dir / ".onionshare-session" - session_file.write_text(secret_key) - - # Export it - export_zip = tmp_path / "export.zip" - cli.export_site(folder_name, output_path=str(export_zip)) - assert export_zip.exists() - - # Delete the original site - shutil.rmtree(site_dir) - assert not site_dir.exists() - - # Import it - cli.import_site(str(export_zip)) - - # Verify the key is exactly the same - restored_key = (tmp_path / "host" / folder_name / ".onionshare-session").read_text() - assert restored_key == secret_key - assert (tmp_path / "host" / folder_name / "config.json").exists() - - -def test_visual_width_logic(): - """Verify that visual width calculation handles CJK and Hindi correctly.""" - # Test cases: (string, expected_width) - cases = [ - ("Hello", 5), - ("日本語", 6), # Each char is 2 units wide - ("हिन्दी", 5), # Hindi chars vary, but should be handled by wcwidth - ("~~REDACTED~~", 13), - ("W" * 10, 10), - ] - - for text, expected in cases: - width = cli._get_visual_width(text) - assert width >= expected - 1, f"Width for '{text}' too low: {width}" - - -def test_portable_bundle_integrity(tmp_path, monkeypatch): - """Verify that the portable ZIP contains all essential anchor files.""" - # Setup realistic directory structure: - # tmp_path/ (project root) - # └── voxvera/ (ROOT) - - project_root = tmp_path - voxvera_dir = project_root / "voxvera" - voxvera_dir.mkdir() - - shutil.copytree(REPO_ROOT / "voxvera" / "src", voxvera_dir / "src") - shutil.copytree(REPO_ROOT / "voxvera" / "locales", voxvera_dir / "locales") - os.makedirs(voxvera_dir / "vendor", exist_ok=True) - (voxvera_dir / "vendor" / "anchor.txt").write_text("anchor") - - # Copy real scripts from repo - for script in ["voxvera-run.sh", "uninstall.sh", "uninstall.ps1", "install.sh", "install.ps1", "setup.sh"]: - if (REPO_ROOT / script).exists(): - shutil.copy(REPO_ROOT / script, project_root / script) - - # ROOT in cli.py points to the voxvera/ directory - monkeypatch.setattr(cli, "ROOT", voxvera_dir) - - bundle_zip = project_root / "voxvera-portable.zip" - cli.bundle_portable(bundle_zip) - - assert bundle_zip.exists() - - with zipfile.ZipFile(bundle_zip, "r") as zf: - names = zf.namelist() - # Verify source code (relative to project root) - assert any("voxvera/src/index-master.html" in n for n in names) - # Verify locales - assert any("voxvera/locales/en.json" in n for n in names) - # Verify vendored libs - assert any("voxvera/vendor/anchor.txt" in n for n in names) - # Verify uninstallers - assert "uninstall.sh" in names - assert "uninstall.ps1" in names - - # Verify root scripts - assert "voxvera-run.sh" in names - - -def test_portable_bundle_excludes_prebuilt_tor_binaries(tmp_path, monkeypatch): - project_root = tmp_path - voxvera_dir = project_root / "voxvera" - voxvera_dir.mkdir() - - shutil.copytree(REPO_ROOT / "voxvera" / "src", voxvera_dir / "src") - shutil.copytree(REPO_ROOT / "voxvera" / "locales", voxvera_dir / "locales") - shutil.copytree(REPO_ROOT / "voxvera" / "resources", voxvera_dir / "resources") - os.makedirs(voxvera_dir / "vendor", exist_ok=True) - (voxvera_dir / "vendor" / "anchor.txt").write_text("anchor") - - for script in ["voxvera-run.sh", "uninstall.sh", "uninstall.ps1", "install.sh", "install.ps1", "setup.sh"]: - if (REPO_ROOT / script).exists(): - shutil.copy(REPO_ROOT / script, project_root / script) - - monkeypatch.setattr(cli, "ROOT", voxvera_dir) - - bundle_zip = project_root / "voxvera-portable.zip" - cli.bundle_portable(bundle_zip) - - with zipfile.ZipFile(bundle_zip, "r") as zf: - names = zf.namelist() - assert not any(name.startswith("voxvera/resources/tor/") for name in names) diff --git a/tests/test_nostr_schema.py b/tests/test_nostr_schema.py new file mode 100644 index 0000000..3e598d9 --- /dev/null +++ b/tests/test_nostr_schema.py @@ -0,0 +1,96 @@ +import json + +import pytest + +from voxvera.nostr import NostrValidationError, normalize_event_source, validate_event_source + + +def _payload(**overrides): + payload = { + "type": "voxvera_flyer", + "version": 1, + "name": "Nostr Flyer", + "folder_name": "nostr-flyer", + "lang": "en", + "title": "NOSTR SOURCE TEST", + "subtitle": "A static source event", + "headline": "Publish once, render anywhere", + "content": "This flyer came from a Nostr event.", + "url": "https://voxvera.org", + "url_message": "Open this poster", + "footer_message": "share truth", + } + payload.update(overrides) + return payload + + +def _event(payload=None, **overrides): + event = { + "kind": 30078, + "content": json.dumps(payload or _payload()), + "tags": [["d", "voxvera:nostr-flyer"], ["t", "voxvera"], ["t", "flyer"]], + } + event.update(overrides) + return event + + +def test_validate_accepts_direct_payload(): + assert validate_event_source(_payload())["title"] == "NOSTR SOURCE TEST" + + +def test_validate_accepts_nostr_event_payload(): + assert validate_event_source(_event())["content"] == "This flyer came from a Nostr event." + + +def test_normalize_maps_to_flyer_config_defaults(): + defaults = { + "folder_name": "voxvera", + "lang": "en", + "tear_off_link": "", + "url": "", + } + + config = normalize_event_source(_event(), defaults) + + assert config["folder_name"] == "nostr-flyer" + assert config["lang"] == "en" + assert config["url"] == "https://voxvera.org" + assert config["tear_off_link"] == "" + + +def test_normalize_supports_content_url_qr_target(): + defaults = {"folder_name": "voxvera", "lang": "en", "tear_off_link": ""} + event = _event(_payload(qr_target="content_url")) + + config = normalize_event_source(event, defaults) + + assert config["tear_off_link"] == "https://voxvera.org" + + +def test_normalize_supports_nostr_event_qr_target(): + defaults = {"folder_name": "voxvera", "lang": "en", "tear_off_link": ""} + event = _event(_payload(qr_target="nostr_event")) + + config = normalize_event_source(event, defaults, source_identifier="note1example") + + assert config["tear_off_link"] == "note1example" + + +def test_validate_rejects_unsafe_url_scheme(): + with pytest.raises(NostrValidationError, match="Unsupported URL scheme"): + validate_event_source(_payload(url="javascript:alert(1)")) + + +def test_validate_rejects_raw_html(): + with pytest.raises(NostrValidationError, match="contains raw HTML"): + validate_event_source(_payload(content="")) + + +def test_validate_rejects_missing_tags(): + with pytest.raises(NostrValidationError, match="#voxvera and #flyer"): + validate_event_source(_event(tags=[["d", "voxvera:nostr-flyer"]])) + + +def test_validate_rejects_attachments(): + with pytest.raises(NostrValidationError, match="Attachments are not supported"): + validate_event_source(_payload(attachment_path="file.zip")) diff --git a/uninstall.ps1 b/uninstall.ps1 deleted file mode 100644 index 0d5cecb..0000000 --- a/uninstall.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -$ErrorActionPreference = 'SilentlyContinue' - -Write-Host "Uninstalling VoxVera..." - -# 1. Uninstall via pipx -if (Get-Command pipx -ErrorAction SilentlyContinue) { - pipx uninstall voxvera | Out-Null -} - -# 2. Uninstall via pip -if (Get-Command pip -ErrorAction SilentlyContinue) { - pip uninstall -y voxvera | Out-Null -} - -# 3. Remove manual binary -$home = [Environment]::GetFolderPath('UserProfile') -$exePath = Join-Path $home '.local\bin\voxvera.exe' -if (Test-Path $exePath) { - Remove-Item $exePath -Force -} - -Write-Host "`nVoxVera has been uninstalled." diff --git a/uninstall.sh b/uninstall.sh deleted file mode 100644 index f1b9a01..0000000 --- a/uninstall.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -echo "Uninstalling VoxVera..." - -# 1. Uninstall via pipx if present -if command -v pipx >/dev/null 2>&1; then - if pipx list | grep -q "package voxvera"; then - echo "Removing voxvera via pipx..." - pipx uninstall voxvera - fi -fi - -# 2. Uninstall via pip if present -if command -v pip >/dev/null 2>&1; then - echo "Attempting to remove voxvera via pip..." - pip uninstall -y voxvera >/dev/null 2>&1 || true -fi - -# 3. Remove manual binary installation -BINARY_PATH="$HOME/.local/bin/voxvera" -if [ -f "$BINARY_PATH" ]; then - echo "Removing manual binary at $BINARY_PATH..." - rm "$BINARY_PATH" -fi - -# 4. Remove configuration and host data (Optional - ask user) -# We will leave the host data by default to prevent data loss, -# but we can remove the internal src config. -# ROOT_DIR="$(dirname "$(readlink -f "$0")")" # This might not be reliable if run via curl - -echo "" -echo "VoxVera has been uninstalled." -echo "Note: Your generated sites in ~/voxvera-exports or within the source folder were not removed." diff --git a/voxvera-install.sh b/voxvera-install.sh deleted file mode 100644 index 55e5998..0000000 --- a/voxvera-install.sh +++ /dev/null @@ -1,212 +0,0 @@ -#!/usr/bin/env bash -# -------------------------------------------------------------------- -# VoxVera all-in-one installer (Linux) – run once as a normal user. -# Installs Tor + OnionShare and VoxVera itself. -# -------------------------------------------------------------------- -set -euo pipefail -OS_NAME="$(uname -s | tr '[:upper:]' '[:lower:]')" - -## -------- helper functions ----------------------------------------- -command_exists() { command -v "$1" &>/dev/null; } - -msg() { printf "\e[32m%s\e[0m\n" "$*"; } -warn() { printf "\e[33m%s\e[0m\n" "$*" >&2; } -die() { printf "\e[31mERROR: %s\e[0m\n" "$*" >&2; exit 1; } - -report_cli_status() { - command_exists voxvera || return 0 - - local platform_json doctor_json autostart_json - platform_json="$(voxvera platform-status --json 2>/dev/null || true)" - doctor_json="$(voxvera doctor --json 2>/dev/null || true)" - autostart_json="$(voxvera autostart status --json 2>/dev/null || true)" - - if [ -n "$platform_json" ]; then - PLATFORM_JSON="$platform_json" python3 - <<'PY' -import json, os -data = json.loads(os.environ["PLATFORM_JSON"]) -print(f"Platform tier: {data.get('tier', 'unknown')} ({data.get('label', 'unknown')})") -if data.get("hosting_model"): - print(f"Hosting model: {data['hosting_model']}") -PY - fi - - if [ -n "$doctor_json" ]; then - DOCTOR_JSON="$doctor_json" python3 - <<'PY' -import json, os -data = json.loads(os.environ["DOCTOR_JSON"]) -failed = [check["name"] for check in data.get("checks", []) if not check.get("ok")] -if failed: - print("Doctor checks needing attention: " + ", ".join(failed)) -else: - print("Doctor checks: all passed") -PY - fi - - if [ -n "$autostart_json" ]; then - AUTOSTART_JSON="$autostart_json" python3 - <<'PY' -import json, os -data = json.loads(os.environ["AUTOSTART_JSON"]) -print("Autostart: " + data.get("message", "unknown")) -PY - fi -} - -# Detect sudo/root -if command_exists sudo; then - SUDO="sudo" -elif [ "$(id -u)" -eq 0 ]; then - SUDO="" -else - die "This script requires root privileges. Please install sudo or run as root." -fi - -## -------- determine package manager -------------------------------- -if command_exists apt-get; then PM=apt ; UPDATE="$SUDO apt-get update" ; INSTALL="$SUDO apt-get install -y" -elif command_exists dnf; then PM=dnf ; UPDATE="$SUDO dnf -y makecache" ; INSTALL="$SUDO dnf install -y" -elif command_exists yum; then PM=yum ; UPDATE="$SUDO yum makecache" ; INSTALL="$SUDO yum install -y" -elif command_exists pacman; then PM=pacman; UPDATE="$SUDO pacman -Sy" ; INSTALL="$SUDO pacman -S --noconfirm" -elif command_exists apk; then PM=apk ; UPDATE="$SUDO apk update" ; INSTALL="$SUDO apk add --no-cache" -else die "Unsupported distro – can't find apt/yum/dnf/pacman/apk." -fi - -msg ">> Detected package manager: $PM" -if [[ "$OS_NAME" != linux* ]]; then - warn "This installer is experimental outside Linux and is not validated for reliable background hidden-service hosting." -fi - -## -------- install system packages ---------------------------------- -msg ">> Installing system dependencies..." -SYSTEM_PKGS=(tor curl git python3-pip python3-venv) -$UPDATE && $INSTALL "${SYSTEM_PKGS[@]}" - -# Onionshare-cli - ensure it's installed and working (always attempt update if using pipx) -msg ">> Ensuring onionshare-cli is installed and up-to-date..." -if command_exists pipx && (pipx list | grep -q onionshare || ! command_exists onionshare-cli); then - msg "Installing/Updating onionshare-cli via pipx..." - pipx install --force git+https://github.com/onionshare/onionshare.git#subdirectory=cli || warn "pipx OnionShare install/update failed" -elif ! command_exists onionshare-cli && ! command_exists onionshare; then - msg "Attempting to install OnionShare..." - OS_PKG="onionshare-cli" - [[ ! $PM =~ (apt|dnf|yum) ]] && OS_PKG="onionshare" - - if ! $INSTALL "$OS_PKG"; then - warn "OnionShare not found in system repositories. Attempting pipx install fallback." - if ! command_exists pipx; then - msg "Installing pipx..." - $INSTALL pipx - pipx ensurepath --force - export PATH="$HOME/.local/bin:$PATH" - fi - if command_exists pipx; then - msg "Installing/Updating onionshare-cli via pipx..." - pipx install --force git+https://github.com/onionshare/onionshare.git#subdirectory=cli || warn "pipx OnionShare install failed" - else - warn "pipx not found. Skipping OnionShare installation." - fi - fi -fi - -## -------- install VoxVera (prefers binary, falls back) ------------- -install_voxvera() { - local install_dir="$HOME/.local/bin" - mkdir -p "$install_dir" - local url latest dest="$install_dir/voxvera" - - if command_exists curl; then - msg "Attempting to download latest VoxVera binary..." - # Get the latest release tag - latest=$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/PR0M3TH3AN/VoxVera/releases/latest | grep -oE '[^/]+$') - - OS="$(uname -s | tr '[:upper:]' '[:lower:]')" - ARCH=$(uname -m) - case "$OS" in - linux*) BINARY="voxvera-linux" ;; - darwin*) BINARY="voxvera-macos" ;; - *) BINARY="voxvera-linux" ;; - esac - - # Try to download architecture-specific binary (e.g. voxvera-linux-x86_64) - url="https://github.com/PR0M3TH3AN/VoxVera/releases/download/${latest}/${BINARY}-${ARCH}" - - msg "Downloading from: $url" - set +e - local status - status=$(curl -w "%{http_code}" -fsSL "$url" -o "$dest") - local curl_exit=$? - set -e - - if [ $curl_exit -eq 0 ] && [ "$status" = "200" ]; then - chmod +x "$dest" - msg "VoxVera binary (${ARCH}) installed to $dest" - return 0 - else - warn "Binary download failed (status: $status, exit: $curl_exit). Falling back to source installation." - [ -f "$dest" ] && rm "$dest" - fi - fi - - # Fallback to pipx - if command_exists pipx; then - msg "Falling back to pipx installation (this may take a few minutes)..." - if pipx install --force 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main'; then - pipx ensurepath --force - return 0 - fi - fi - - # Fallback to pip - msg "Installing/Updating VoxVera via pip..." - PIP_OPTS="--user --upgrade" - if [ -f /etc/debian_version ]; then - DEB_VER=$(cat /etc/debian_version | cut -d. -f1) - if [[ "$DEB_VER" =~ ^[0-9]+$ ]] && [ "$DEB_VER" -ge 12 ]; then - PIP_OPTS="$PIP_OPTS --break-system-packages" - fi - fi - pip install $PIP_OPTS 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -} - -msg ">> Installing VoxVera" -install_voxvera || die "VoxVera installation failed" - -## -------- minimal Tor config ( socks 9050 / ctl 9051 ) -------------- -TOR_DIR="$HOME/.voxvera" -mkdir -p "$TOR_DIR" -cat > "$TOR_DIR/torrc" <> Installing Linux autostart recovery timer..." - voxvera autostart 2>/dev/null || warn "Could not install the VoxVera autostart timer automatically. Run 'voxvera autostart' manually." -fi - -if command_exists voxvera; then - msg ">> Inspecting installed runtime posture..." - report_cli_status -fi - -msg "------------------------------------------------------------------" -msg " VoxVera install finished!" -msg " Tor rc file : $TOR_DIR/torrc" -msg "" -msg " IMPORTANT: Please restart your terminal or run 'source ~/.bashrc'" -msg " (or your shell config) to use 'voxvera'." -msg "" -msg " Linux is the supported persistent-host target." -msg " Other package/install paths remain experimental." -msg "" -msg " Run 'voxvera check' to verify your setup after refreshing." -msg " Run 'voxvera autostart status' to inspect the recovery timer." -msg " Run 'voxvera autostart uninstall' to remove the recovery timer." -msg " Run 'bash scripts/linux-recovery-check.sh' from the repo for the Linux validation checklist." -msg "------------------------------------------------------------------" diff --git a/voxvera-run.sh b/voxvera-run.sh deleted file mode 100644 index abcdf9c..0000000 --- a/voxvera-run.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# -------------------------------------------------------------------- -# VoxVera runtime launcher – check Tor, fire up OnionShare + VoxVera -# -------------------------------------------------------------------- -set -euo pipefail -TOR_SOCKS_PORT=${TOR_SOCKS_PORT:-9050} -TOR_CONTROL_PORT=${TOR_CONTROL_PORT:-9051} -TORRC="$HOME/.voxvera/torrc" - -command_exists() { command -v "$1" &>/dev/null; } -die() { printf "\e[31m%s\e[0m\n" "$*" >&2; exit 1; } - -## -------- ensure tor is running ------------------------------------ -tor_ok() { - # quick check: can we connect to socks port? - (exec 3<>/dev/tcp/127.0.0.1/$TOR_SOCKS_PORT) 2>/dev/null -} - -if ! tor_ok; then - echo ">> Tor isn’t running – attempting to start it..." - if command_exists systemctl; then - sudo systemctl start tor.service || true - sleep 3 - fi - if ! tor_ok; then - # fallback: foreground tor (detached) - tor -f "$TORRC" --hush &>/dev/null & - sleep 5 - tor_ok || die "Tor failed to start – check $TORRC" - fi -fi -echo ">> Tor OK on ports $TOR_SOCKS_PORT / $TOR_CONTROL_PORT" - -export TOR_SOCKS_PORT TOR_CONTROL_PORT - -## -------- launch VoxVera ------------------------------------------- -if ! command_exists voxvera; then - die "voxvera not in PATH – did you complete the install?" -fi - -echo ">> Running VoxVera quickstart (non-interactive)" -voxvera quickstart --non-interactive diff --git a/voxvera/__init__.py b/voxvera/__init__.py index ab27f39..afc18c5 100644 --- a/voxvera/__init__.py +++ b/voxvera/__init__.py @@ -1,12 +1,3 @@ -import sys -from pathlib import Path +"""VoxVera static Nostr client helpers.""" -__version__ = "0.3.12" - -# Add the vendor directory to sys.path ONLY for PyInstaller (frozen) builds. -# For pip/pipx installs the system/venv packages are correct and the vendored -# copies are incomplete (missing data files), so we must not shadow them. -if getattr(sys, 'frozen', False): - vendor_dir = Path(sys._MEIPASS).joinpath("voxvera", "vendor") - if vendor_dir.exists() and str(vendor_dir) not in sys.path: - sys.path.insert(0, str(vendor_dir)) +__version__ = "0.4.0" diff --git a/voxvera/__main__.py b/voxvera/__main__.py deleted file mode 100644 index 71b440f..0000000 --- a/voxvera/__main__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .cli import main - -if __name__ == '__main__': - main() diff --git a/voxvera/build.py b/voxvera/build.py deleted file mode 100644 index 5430fc1..0000000 --- a/voxvera/build.py +++ /dev/null @@ -1,73 +0,0 @@ -"""Pure-Python replacements for the shell-based build pipeline. - -Eliminates the need for jq, qrencode, ImageMagick, javascript-obfuscator, -html-minifier-terser, node, pdftotext, and poppler-utils. -""" - -import json -import re -from pathlib import Path - -import htmlmin # provided by htmlmin2 package -import qrcode -from jsmin import jsmin -from PIL import Image - - -def generate_qr(config_path: Path, output_dir: Path) -> None: - """Generate QR code PNGs from config URLs. - - Replaces generate_qr.sh (qrencode + ImageMagick convert). - URL is auto-generated by Tor during serve(), so it may be empty during initial build. - """ - with open(config_path) as f: - config = json.load(f) - - url = config.get("url", "") - tear = config.get("tear_off_link", "") or url - - # Skip QR generation if no URLs configured yet (will be generated after serve) - if not url and not tear: - from voxvera.cli import t - print(t("cli.no_urls_qr_skip")) - return - - # Generate QR codes for available URLs - qr_pairs = [] - if url: - qr_pairs.append((url, "qrcode-content.png")) - if tear: - qr_pairs.append((tear, "qrcode-tear-offs.png")) - - for data, filename in qr_pairs: - qr = qrcode.QRCode(box_size=10, border=0) - qr.add_data(data) - qr.make(fit=True) - img = qr.make_image(fill_color="black", back_color="white") - img = img.resize((128, 128), Image.LANCZOS) - img.save(output_dir / filename) - - -def obfuscate_html(input_file: Path, output_file: Path) -> None: - """Minify JS inside " - - html = re.sub(r"", _minify_script, html, flags=re.DOTALL) - html = htmlmin.minify( - html, - remove_comments=True, - remove_empty_space=False, - remove_optional_attribute_quotes=False, - ) - output_file.write_text(html, encoding="utf-8") diff --git a/voxvera/cli.py b/voxvera/cli.py deleted file mode 100644 index 6b72da8..0000000 --- a/voxvera/cli.py +++ /dev/null @@ -1,2472 +0,0 @@ -import argparse -import glob -import json -import os -import re -import shlex -import signal -import shutil -import subprocess -import sys -import time -import urllib.parse -from pathlib import Path -from importlib import resources -from importlib.resources.abc import Traversable - -# Force PyInstaller to bundle these critical dependencies for onionshare-cli. -# Only needed at freeze-time analysis; skip for normal pip/pipx installs to -# avoid pulling in vendored copies that may be incomplete. -if getattr(sys, 'frozen', False): - try: - import pkg_resources # noqa: F401 - import setuptools # noqa: F401 - import jaraco # noqa: F401 - import platformdirs # noqa: F401 - import packaging # noqa: F401 - except Exception: - pass - -from InquirerPy import prompt, inquirer -from rich.console import Console -from voxvera import __version__ -from voxvera.platforms import get_platform_adapter - -GITHUB_RECOMMENDED_BINARY_LIMIT = 95 * 1024 * 1024 -LEGACY_CONFIG_KEYS = { - "binary_message": "footer_message", -} -TOR_BROWSER_DOWNLOAD_URLS = { - "ar": "https://www.torproject.org/ar/download/", - "de": "https://www.torproject.org/de/download/", - "en": "https://www.torproject.org/download/", - "es": "https://www.torproject.org/es/download/", - "fa": "https://www.torproject.org/fa/download/", - "fr": "https://www.torproject.org/fr/download/", - "he": "https://www.torproject.org/he/download/", - "ja": "https://www.torproject.org/ja/download/", - "pt": "https://www.torproject.org/pt-BR/download/", - "ru": "https://www.torproject.org/ru/download/", - "tr": "https://www.torproject.org/tr/download/", - "zh": "https://www.torproject.org/zh-CN/download/", -} - -# package root (contains bundled templates and src/) -if getattr(sys, 'frozen', False): - ROOT = Path(sys._MEIPASS).joinpath("voxvera") - # Ensure the bundle root is in sys.path for collected packages - if sys._MEIPASS not in sys.path: - sys.path.insert(0, sys._MEIPASS) -else: - ROOT = Path(__file__).resolve().parent - -# Persistent data directory (where host/ and projects live) -DATA_DIR = Path(os.environ.get("VOXVERA_DIR", Path.home())) - -# Global locale state -CURRENT_LOCALE = {} -CURRENT_LANG_CODE = "en" - - -def tor_browser_download_url(lang_code: str) -> str: - """Return the best Tor Browser download URL for a supported locale.""" - return TOR_BROWSER_DOWNLOAD_URLS.get(lang_code, TOR_BROWSER_DOWNLOAD_URLS["en"]) - - -def normalize_config(data: dict) -> dict: - """Normalize config keys while preserving compatibility with older exports.""" - normalized = dict(data) - for old_key, new_key in LEGACY_CONFIG_KEYS.items(): - if new_key not in normalized and old_key in normalized: - normalized[new_key] = normalized[old_key] - for old_key in LEGACY_CONFIG_KEYS: - normalized.pop(old_key, None) - normalized.setdefault("footer_message", "") - return normalized - - -def get_effective_tear_off_link(data: dict) -> str: - """Use the explicit tear-off link when present, otherwise fall back to the main URL.""" - return (data.get("tear_off_link") or "").strip() or (data.get("url") or "").strip() - - -def build_render_context(data: dict) -> dict: - """Add derived template values without mutating persisted config shape.""" - render_data = dict(data) - effective_tear_off_link = get_effective_tear_off_link(render_data) - render_data["tear_off_link"] = effective_tear_off_link - render_data["tear_off_state_class"] = "" if effective_tear_off_link else "no-tear-offs" - return render_data - - -def _newlines_to_br(text: str) -> str: - """Convert all forms of newline encoding to
for static HTML output. - - Handles: real newlines, literal backslash-n (\\n), and any mix. - Idempotent — already-converted
tags are left alone. - """ - # 1. Literal two-character sequences: backslash + n → real newline - s = text.replace("\\n", "\n") - # 2. Real newlines →
- s = s.replace("\n", "
") - # 3. Collapse any triple+
runs from trailing newlines - while "


" in s: - s = s.replace("


", "

") - # 4. Strip leading/trailing
- while s.startswith("
"): - s = s[4:] - while s.endswith("
"): - s = s[:-4] - return s - - -def _br_to_newlines(text: str) -> str: - """Convert
tags back to real newlines for editor display.""" - return text.replace("
", "\n") - - -def _template_res(*parts) -> Traversable: - """Return a Traversable for files under the packaged ``templates`` folder.""" - if getattr(sys, 'frozen', False): - # PyInstaller bundle: use sys._MEIPASS - return Path(sys._MEIPASS).joinpath("voxvera", "templates", *parts) - return resources.files(__package__).joinpath("templates", *parts) - - -def _src_res(*parts) -> Traversable: - """Return a Traversable for files under the packaged ``src`` folder.""" - if getattr(sys, 'frozen', False): - return Path(sys._MEIPASS).joinpath("voxvera", "src", *parts) - return resources.files(__package__).joinpath("src", *parts) - - -def _locale_res(*parts) -> Traversable: - """Return a Traversable for files under the packaged ``locales`` folder.""" - if getattr(sys, 'frozen', False): - return Path(sys._MEIPASS).joinpath("voxvera", "locales", *parts) - return resources.files(__package__).joinpath("locales", *parts) - - -def load_locale(lang_code: str = "en"): - """Load the specified locale JSON file.""" - global CURRENT_LOCALE, CURRENT_LANG_CODE - try: - res = _locale_res(f"{lang_code}.json") - if getattr(sys, 'frozen', False): - # When frozen, we already have a Path object - locale_file = res - if not locale_file.exists(): - lang_code = "en" - locale_file = _locale_res("en.json") - CURRENT_LOCALE = json.loads(locale_file.read_text(encoding="utf-8")) - CURRENT_LANG_CODE = lang_code - else: - with resources.as_file(res) as locale_file: - if not locale_file.exists(): - lang_code = "en" # Fallback - with resources.as_file(_locale_res("en.json")) as fallback_file: - CURRENT_LOCALE = json.loads(fallback_file.read_text(encoding="utf-8")) - else: - CURRENT_LOCALE = json.loads(locale_file.read_text(encoding="utf-8")) - CURRENT_LANG_CODE = lang_code - except Exception as e: - print(f"Error loading locale {lang_code}: {e}") - # Final safety fallback to empty dict to avoid KeyErrors - CURRENT_LOCALE = {"cli": {}, "web": {}, "meta": {}} - CURRENT_LANG_CODE = "en" - - -def t(path: str, **kwargs) -> str: - """Retrieve a localized string by dot-path (e.g., 'cli.welcome').""" - parts = path.split(".") - val = CURRENT_LOCALE - for part in parts: - val = val.get(part, {}) - if not isinstance(val, str): - return path # Return the token path if not found - return val.format(**kwargs) - - -def t_fallback(path: str, default: str, **kwargs) -> str: - """Retrieve a localized string, but fall back to a provided default.""" - value = t(path, **kwargs) - if value == path: - return default.format(**kwargs) - return value - - -def require_cmd(cmd: str): - if cmd == "onionshare-cli": - try: - import onionshare_cli # noqa: F401 - return True - except ImportError: - print("Required tool 'onionshare-cli' not bundled or installed.", file=sys.stderr) - return False - - if shutil.which(cmd) is None: - print( - f"Required command '{cmd}' not found. Please install it.", file=sys.stderr - ) - return False - return True - - -def check_deps(): - console = Console() - - # External CLI tools still required at runtime (none anymore if bundled) - cli_tools = [] - # Python packages used by the build pipeline - py_packages = { - "onionshare-cli": "onionshare_cli", - "qrcode": "qrcode", - "PIL (Pillow)": "PIL", - "jsmin": "jsmin", - "htmlmin": "htmlmin", - } - - console.rule(t("cli.dep_check_header")) - - for t_cmd in cli_tools: - if shutil.which(t_cmd): - console.print(f"{t_cmd}: [green]{t('cli.dep_found')}[/green]") - else: - console.print(f"{t_cmd}: [red]{t('cli.dep_missing')}[/red]") - - for label, module in py_packages.items(): - try: - __import__(module) - console.print(f"{label}: [green]{t('cli.dep_found')}[/green]") - except ImportError: - console.print(f"{label}: [red]{t('cli.dep_missing')}[/red]") - - all_cli = all(shutil.which(t_cmd) for t_cmd in cli_tools) - all_py = True - for module in py_packages.values(): - try: - __import__(module) - except ImportError: - all_py = False - break - - if all_cli and all_py: - console.print(f"[green]{t('cli.all_deps_installed')}[/green]") - else: - console.print(f"[red]{t('cli.all_deps_installed')}[/red]") - - -def print_doctor_report(): - print_report("doctor") - - -def print_platform_status(): - print_report("platform-status") - - -def print_report(report_type: str, json_output: bool = False): - adapter = get_platform_adapter(cli_module=sys.modules[__name__]) - report = adapter.doctor_report() if report_type == "doctor" else adapter.platform_status() - if json_output: - print(json.dumps(report, indent=2)) - return - - console = Console() - if report_type == "doctor": - console.rule(f"VoxVera Doctor: {report['label']}") - console.print(f"Tier: {report['tier']}") - if report["hosting_model"]: - console.print(f"Hosting model: {report['hosting_model']}") - summary = report.get("summary", {}) - if summary: - console.print(f"Overall: {'OK' if summary.get('ok') else 'WARN'}") - for section in report.get("sections", {}).values(): - if not section.get("checks"): - continue - console.print(f"{section['title']}: {'OK' if section.get('ok') else 'WARN'}") - for check in report["checks"]: - style = "green" if check["ok"] else "red" - state = "OK" if check["ok"] else "FAIL" - console.print(f"[{style}]{state}[/{style}] {check['name']}: {check['detail']}") - return - - console.rule(f"Platform Status: {report['label']}") - console.print(f"Tier: {report['tier']}") - if report["tier_description"]: - console.print(report["tier_description"]) - if report["hosting_model"]: - console.print(f"Hosting model: {report['hosting_model']}") - if report["distribution_surfaces"]: - console.print("Distribution surfaces:") - for surface in report["distribution_surfaces"]: - console.print(f" - {surface}") - if report["required_capabilities"]: - console.print("Required capabilities:") - for capability in report["required_capabilities"]: - console.print(f" - {capability}") - if report["current_notes"]: - console.print("Current notes:") - for note in report["current_notes"]: - console.print(f" - {note}") - if report["next_gaps"]: - console.print("Next gaps:") - for gap in report["next_gaps"]: - console.print(f" - {gap}") - - -def print_autostart_status(json_output: bool = False): - adapter = get_platform_adapter(cli_module=sys.modules[__name__]) - status = adapter.autostart_status() - if json_output: - print(json.dumps(status, indent=2)) - return - console = Console() - console.rule(f"Autostart Status: {status['label']}") - console.print(f"Tier: {status['tier']}") - console.print(status["message"]) - if status["artifacts"]: - console.print("Artifacts:") - for artifact in status["artifacts"]: - console.print(f" - {artifact}") - for check in status["checks"]: - style = "green" if check["ok"] else "red" - state = "OK" if check["ok"] else "FAIL" - console.print(f"[{style}]{state}[/{style}] {check['name']}: {check['detail']}") - - -def load_config(path: str) -> dict: - with open(path, "r") as fh: - return normalize_config(json.load(fh)) - - -def save_config(data: dict, path: str): - with open(path, "w") as fh: - json.dump(normalize_config(data), fh, indent=2) - - -def ensure_config_exists(path: str | Path) -> Path: - """Seed a config file from the bundled defaults when missing.""" - config_path = Path(path) - if config_path.exists(): - return config_path - - config_path.parent.mkdir(parents=True, exist_ok=True) - default_config = json.loads((_src_res("config.json")).read_text(encoding="utf-8")) - config_path.write_text(json.dumps(normalize_config(default_config), indent=2), encoding="utf-8") - return config_path - - -def _open_editor_terminal(initial: str) -> str: - """Fallback to opening the user's $EDITOR in the terminal.""" - import tempfile - - editor = os.environ.get("EDITOR", "nano") - if not shutil.which(editor): - editor = "nano" - if not shutil.which("nano"): - # Extreme fallback - print("\n--- EDIT CONTENT BELOW (End with Ctrl+D) ---") - print("(This is a fallback because neither $EDITOR nor nano were found)") - print("--- Current content ---") - print(initial or "") - print("---") - return sys.stdin.read() - - fd, path = tempfile.mkstemp(suffix=".txt") - try: - with os.fdopen(fd, "w", encoding="utf-8") as fh: - fh.write(initial or "") - subprocess.run([editor, path], stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr) - with open(path, "r", encoding="utf-8") as fh: - return fh.read() - except Exception as e: - print(f"Error opening terminal editor: {e}") - return initial - finally: - os.unlink(path) - - -def open_editor(initial: str) -> str: - """Open a simple GUI text editor with pre-populated content if possible. - - Existing text is pre-filled in the editor. If tkinter or a display - server is unavailable, falls back to the user's $EDITOR in the terminal. - """ - # If no display found (on Linux/Unix), immediately use terminal - if os.name != "nt" and not os.environ.get("DISPLAY") and not os.environ.get("WAYLAND_DISPLAY"): - return _open_editor_terminal(initial) - - try: - import tkinter as tk - from tkinter import scrolledtext - - root = tk.Tk() - root.title("Edit text") - # Bring to front - root.attributes("-topmost", True) - root.after_idle(root.attributes, "-topmost", False) - except Exception: - return _open_editor_terminal(initial) - - result = {"text": initial or ""} - text = scrolledtext.ScrolledText(root, width=80, height=20) - text.pack(expand=True, fill="both") - if initial: - text.insert("1.0", initial) - text.focus_set() - - def save_and_close(): - result["text"] = text.get("1.0", "end-1c") - root.destroy() - - save_btn = tk.Button(root, text="Save (or close window)", command=save_and_close) - save_btn.pack() - root.protocol("WM_DELETE_WINDOW", save_and_close) - - try: - root.mainloop() - except KeyboardInterrupt: - # If user hits Ctrl+C in terminal while GUI is open, fallback to terminal editor - try: - root.destroy() - except Exception: - pass - print("\nGUI editor interrupted. Falling back to terminal editor...") - return _open_editor_terminal(initial) - - return result["text"] - - -def _get_visual_width(text: str) -> int: - """Calculate the visual width of a string (handling CJK double-width).""" - try: - from wcwidth import wcswidth - width = wcswidth(text) - return width if width >= 0 else len(text) - except ImportError: - return len(text) - - -def _len_transform(limit: int): - def _t(val: str) -> str: - width = _get_visual_width(val) - if width > limit: - return f"[red]{val} ({width}/{limit})[/red]" - return f"{val} ({width}/{limit})" - - return _t - - -def _len_validator(limit: int): - def _v(val: str): - width = _get_visual_width(val) - if width > limit: - return f"❌ Input too wide: {width}/{limit} visual units. Please shorten it." - return True - - return _v - - -def _folder_name_validator(val: str): - if len(val) > 63: - return "Folder name must be at most 63 characters" - if not re.fullmatch(r"[a-z0-9_-]+", val): - return "Use only lowercase letters, numbers, '-' and '_'" - return True - - -def _next_versioned_folder_name(folder_name: str) -> str: - """Return the next available versioned folder name like jesus_01.""" - host_dir = DATA_DIR / "host" - for index in range(1, 100): - candidate = f"{folder_name}_{index:02d}" - if not (host_dir / candidate).exists(): - return candidate - raise RuntimeError(f"Could not allocate a versioned folder name for '{folder_name}'") - - -def resolve_new_site_folder(config_path: str, preserve_session_on_overwrite: bool = True) -> str | None: - """Resolve collisions for a newly created site before the first build.""" - data = load_config(config_path) - folder_name = data["folder_name"] - dest_dir = DATA_DIR / "host" / folder_name - if not dest_dir.exists(): - return folder_name - - suggested_name = _next_versioned_folder_name(folder_name) - action = inquirer.select( - message=t_fallback( - "cli.site_exists_action", - "Site '{name}' already exists. What do you want to do?", - name=folder_name, - ), - choices=[ - { - "name": t_fallback("cli.site_exists_overwrite", "Overwrite existing site"), - "value": "overwrite", - }, - { - "name": t_fallback( - "cli.site_exists_version", - "Create new version ({suggested})", - suggested=suggested_name, - ), - "value": "version", - }, - { - "name": t_fallback("cli.site_exists_cancel", "Cancel"), - "value": "cancel", - }, - ], - default="version", - ).execute() - - if action in (None, "cancel"): - print(t_fallback("cli.site_exists_cancelled", "Site creation cancelled.")) - return None - - if action == "overwrite": - if preserve_session_on_overwrite: - _clear_host_dir(dest_dir) - else: - shutil.rmtree(dest_dir, ignore_errors=True) - return folder_name - - data["folder_name"] = suggested_name - save_config(data, config_path) - print( - t_fallback( - "cli.site_exists_versioned", - "Using versioned folder name: {name}", - name=suggested_name, - ) - ) - return suggested_name - - -def interactive_update(config_path: str): - ensure_config_exists(config_path) - data = load_config(config_path) - console = Console() - - # Define the fields and their localized fallback paths - # We use these if the value in data is missing or matches the hardcoded English default - localized_defaults = { - "name": t("landing.name"), - "title": t("landing.title"), - "subtitle": t("landing.subtitle"), - "headline": t("landing.headline"), - "content": t("landing.content"), - "url_message": t("landing.url_message"), - } - - # Hardcoded English defaults from the template for comparison - english_defaults = { - "name": "Vox Vera Printable Flyers", - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - } - - def get_default(key): - val = data.get(key, "") - # If empty OR it matches the hardcoded English default, and we have a localized version - if (not val or val == english_defaults.get(key)) and localized_defaults.get(key): - # Only use localized if it is actually different from the path (token not found) - loc_val = localized_defaults.get(key) - if loc_val != f"landing.{key}": - return loc_val - return val - - console.rule(t("cli.init_name")) - meta_qs = [ - { - "type": "input", - "message": t("cli.init_name"), - "name": "name", - "default": get_default("name"), - "transformer": _len_transform(31), - "validate": _len_validator(31), - }, - { - "type": "input", - "message": t("cli.init_folder"), - "name": "folder_name", - "default": data.get("folder_name", "voxvera"), - "transformer": _len_transform(63), - "validate": _folder_name_validator, - }, - { - "type": "input", - "message": t("cli.init_title"), - "name": "title", - "default": get_default("title"), - "transformer": _len_transform(31), - "validate": _len_validator(31), - }, - { - "type": "input", - "message": t("cli.init_subtitle"), - "name": "subtitle", - "default": get_default("subtitle"), - "transformer": _len_transform(27), - "validate": _len_validator(27), - }, - { - "type": "input", - "message": t("cli.init_headline"), - "name": "headline", - "default": get_default("headline"), - "transformer": _len_transform(31), - "validate": _len_validator(31), - }, - ] - data.update(prompt(meta_qs)) - - console.rule(t("cli.init_body")) - # Start with existing/default content; preserve user edits across retries - body = _br_to_newlines(get_default("content")) - while True: - body = open_editor(body) - length = len(body) - if length > 1000: - console.print(f"{t('cli.body_length')}: {length}/1000 {t('cli.body_limit_exceeded')}", style="red") - if not inquirer.confirm(message=t("cli.edit_again"), default=True).execute(): - console.print(t("cli.body_over_limit_warning"), style="yellow") - break - else: - console.print(f"{t('cli.body_length')}: {length}/1000", style="green") - break - data["content"] = body - - console.rule(t("cli.init_links")) - link_qs = [ - { - "type": "input", - "message": t("cli.attachment_path_label"), - "name": "attachment_path", - "default": data.get("attachment_path", ""), - }, - { - "type": "input", - "message": t("cli.url_label"), - "name": "url", - "default": data.get("url", "https://voxvera.org/") if not data.get("url", "").startswith("download/") else "", - "when": lambda result: not result.get("attachment_path", "").strip(), - "transformer": _len_transform(200), - "validate": _len_validator(200), - }, - { - "type": "input", - "message": t("cli.url_message_label"), - "name": "url_message", - "default": get_default("url_message"), - "transformer": _len_transform(120), - "validate": _len_validator(120), - }, - { - "type": "input", - "message": t("cli.footer_message_label"), - "name": "footer_message", - "default": data.get("footer_message", ""), - "transformer": _len_transform(120), - "validate": _len_validator(120), - }, - ] - data.update(prompt(link_qs)) - - save_config(data, config_path) - - -def copy_template(name: str) -> str: - """Copy a template directory into host/.""" - with resources.as_file(_template_res(name)) as src: - if not src.is_dir(): - print(f"Template {name} not found", file=sys.stderr) - sys.exit(1) - dest = DATA_DIR / "host" / name - os.makedirs(DATA_DIR / "host", exist_ok=True) - shutil.copytree(src, dest, dirs_exist_ok=True) - # Clear any QR codes that might have been in the template - # to ensure a clean build slate. - for qr_file in ["qrcode-content.png", "qrcode-tear-offs.png"]: - (dest / qr_file).unlink(missing_ok=True) - print(f"Template copied to {dest}") - return str(dest) - - -def bundle_source(dest_zip: Path): - """Bundle the VoxVera source tree and install scripts for viral mirroring. - - We intentionally exclude pre-downloaded Tor binaries from the mirrored source - archive. They dominate the zip size and are regenerated by the normal - packaging/build flows, while the mirrored source bundle is meant to stay - small enough for practical redistribution from flyer sites. - """ - with zipfile.ZipFile(dest_zip, 'w', zipfile.ZIP_DEFLATED) as zipf: - # 1. Include the voxvera/ source directory (excluding host, bin, - # bundled Tor artifacts, and pycache). We still include vendor so the - # source zip remains portable without re-resolving Python deps. - for root, dirs, files in os.walk(ROOT): - root_path = Path(root) - if ( - "__pycache__" in root - or "host" in root - or "resources/bin" in root - or root_path == ROOT / "resources" / "tor" - or (ROOT / "resources" / "tor") in root_path.parents - ): - continue - for file in files: - file_path = Path(root) / file - arcname = file_path.relative_to(ROOT.parent) - zipf.write(file_path, arcname) - - # 2. Include the run scripts and root files - root_files = [ - "voxvera-run.sh", "voxvera-install.sh", "README.md", - "requirements.txt", "setup.sh", "install.sh", "uninstall.sh", - "install.ps1", "uninstall.ps1", "CONTRIBUTING.md", "LICENSE" - ] - for script in root_files: - script_path = ROOT.parent / script - if script_path.exists(): - zipf.write(script_path, script) - - print(f"Source bundle created at {dest_zip}") - - -def bundle_portable(dest_zip: Path): - """Bundle the entire VoxVera source and dependencies into a ZIP (Viral distribution).""" - # For now, we prioritize source code as requested by the user. - # We rename it to voxvera-source.zip for clarity. - bundle_source(dest_zip) - - -def build_assets( - config_path: str, download_path: str | None = None -): - from voxvera.build import generate_qr - - with resources.as_file(_src_res()) as src_dir: - config_path = Path(config_path) - - data = load_config(config_path) - render_data = build_render_context(data) - with open(src_dir / "index-master.html", "r") as fh: - html = fh.read() - - # Bundle locales for the web engine - all_locales = {} - locale_files = sorted(glob.glob(str(ROOT / "locales" / "*.json"))) - - # Load master defaults from src/config.json - src_config_path = ROOT / "src" / "config.json" - master_defaults = {} - if src_config_path.exists(): - with open(src_config_path, "r", encoding="utf-8") as sf: - master_defaults = json.load(sf) - - for lp in locale_files: - code = Path(lp).stem - with open(lp, "r", encoding="utf-8") as lf: - l_data = json.load(lf) - all_locales[code] = { - "meta": l_data.get("meta", {}), - "web": l_data.get("web", {}), - "landing": l_data.get("landing", {}) - } - all_locales[code]["web"]["tor_browser_download_url"] = tor_browser_download_url(code) - - # Override landing data with user custom config data if it differs from master defaults - for field in ["title", "subtitle", "headline", "content", "url_message"]: - if field in data and data[field]: - # Only override if the value is different from the master default - if data[field] != master_defaults.get(field): - all_locales[code]["landing"][field] = _newlines_to_br(data[field]) - - html = html.replace("{{locales}}", json.dumps(all_locales)) - - # 1. Statically replace localization tokens {{t_web_...}} - # This ensures the flyer is translated even with JS disabled. - lang_data = all_locales.get(data.get("lang", "en"), all_locales.get("en", {})) - - # Web tokens (labels, buttons) - web_tokens = lang_data.get("web", {}) - for token, translation in web_tokens.items(): - # Support Markdown-style redaction ~~text~~ -> text - translation = re.sub(r"~~(.*?)~~", r'\1', str(translation)) - html = html.replace(f"{{{{t_web_{token}}}}}", translation) - - # 2. Statically replace landing tokens with user content OR localized defaults - # We want the user-provided data from config to take precedence. - landing_fields = ["title", "subtitle", "headline", "content", "url_message"] - landing_defaults = lang_data.get("landing", {}) - - for field in landing_fields: - # Use data from config if available, otherwise use localized default - value = data.get(field, landing_defaults.get(field, "")) - - # If the value from config is just the master default, - # and we are NOT in English, use the localized default instead. - if data.get("lang", "en") != "en": - if value == master_defaults.get(field): - value = landing_defaults.get(field, value) - - # Support Markdown-style redaction ~~text~~ - val_str = re.sub(r"~~(.*?)~~", r'\1', str(value)) - val_str = _newlines_to_br(val_str) - html = html.replace(f"{{{{t_landing_{field}}}}}", val_str) - - # 2. Statically replace config placeholders {{key}} - for key, value in render_data.items(): - val_str = str(value) - # Support Markdown-style redaction ~~text~~ for user fields too - val_str = re.sub(r"~~(.*?)~~", r'\1', val_str) - val_str = _newlines_to_br(val_str) - html = html.replace(f"{{{{{key}}}}}", val_str) - - # Handle optional file attachment logic - attachment_path = data.get("attachment_path") - if attachment_path and os.path.isfile(attachment_path): - att_filename = os.path.basename(attachment_path) - # Only default to the local attachment path if no onion URL is set - current_url = data.get("url", "") - if not (current_url.startswith("http") and ".onion" in current_url): - data["url"] = f"download/{att_filename}" - save_config(data, config_path) - html = html.replace("{{url}}", data["url"]) - - folder_name = data["folder_name"] - dest = DATA_DIR / "host" / folder_name - os.makedirs(dest, exist_ok=True) - - # 1. Refresh QR codes directly in destination - # generate_qr only creates them if URLs are present in config - - # We generate to a temp dir first to ensure we ONLY get what's in current config - import tempfile - with tempfile.TemporaryDirectory() as qr_tmp: - qr_tmp_path = Path(qr_tmp) - generate_qr(config_path, qr_tmp_path) - - # Clear old QR codes from destination and copy new ones - for qr_file in ["qrcode-content.png", "qrcode-tear-offs.png"]: - qr_dest = dest / qr_file - qr_src = qr_tmp_path / qr_file - if qr_src.exists(): - shutil.copy(qr_src, qr_dest) - elif qr_dest.exists(): - qr_dest.unlink() - - # Update download link to point to our viral source bundle - - html = html.replace("download/download.zip", "download/voxvera-source.zip") - - with open(dest / "index.html", "w") as fh: - fh.write(html) - - # Create the viral source bundle - download_dir = dest / "download" - os.makedirs(download_dir, exist_ok=True) - bundle_source(download_dir / "voxvera-source.zip") - - if download_path: - shutil.copy(download_path, download_dir / "extra-content.zip") - - if attachment_path and os.path.isfile(attachment_path): - shutil.copy(attachment_path, download_dir / os.path.basename(attachment_path)) - - # Copy config if it's not already there - if Path(config_path) != dest / "config.json": - shutil.copy(config_path, dest / "config.json") - - print(f"Flyer files created under {dest}") - - -def get_tor_ports(): - """Auto-detect Tor SOCKS and Control ports from common defaults.""" - # Common default ports for Tor - socks_defaults = ["9050", "9150"] - ctl_defaults = ["9051", "9151"] - - socks_port = os.getenv("TOR_SOCKS_PORT") - ctl_port = os.getenv("TOR_CONTROL_PORT") - - # If env vars not set, try to auto-detect from running Tor - if not socks_port or not ctl_port: - import socket - - for port in socks_defaults: - try: - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.settimeout(0.5) - result = sock.connect_ex(("127.0.0.1", int(port))) - sock.close() - if result == 0: - socks_port = port - break - except Exception: - pass - - for port in ctl_defaults: - try: - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.settimeout(0.5) - result = sock.connect_ex(("127.0.0.1", int(port))) - sock.close() - if result == 0: - ctl_port = port - break - except Exception: - pass - - # Fall back to defaults if nothing detected - if not socks_port: - socks_port = "9050" - if not ctl_port: - ctl_port = "9051" - - return socks_port, ctl_port - - -def _internal_onionshare(): - """Hidden command to run the bundled onionshare-cli.""" - import platform - - # Try to add bundled Tor to PATH so OnionShare can find it - system = platform.system().lower() - platform_dir = "win" if "windows" in system else "mac" if "darwin" in system else "linux" - - if getattr(sys, 'frozen', False): - tor_dir = Path(sys._MEIPASS).joinpath("voxvera", "resources", "tor", platform_dir) - else: - tor_dir = ROOT / "resources" / "tor" / platform_dir - - # Check if bundled Tor is a real binary and not a placeholder (size > 100 bytes) - bundled_tor = tor_dir / ("tor.exe" if "windows" in system else "tor") - if bundled_tor.exists() and bundled_tor.stat().st_size > 100: - os.environ["PATH"] = str(tor_dir) + os.pathsep + os.environ.get("PATH", "") - os.environ["TOR_BINARY"] = str(bundled_tor) - - onionshare_args = sys.argv[2:] # strip 'voxvera _internal_onionshare' - - # Prevent user-local pip packages from shadowing system packages - os.environ["PYTHONNOUSERSITE"] = "1" - - # Most invocations should prefer the system onionshare-cli binary. Linux - # autostart can request the import path so VoxVera can patch OnionShare's - # descriptor-publication wait without modifying system packages. - no_await_publication = _truthy_env("VOXVERA_ONIONSHARE_NO_AWAIT_PUBLICATION") - onionshare_bin = shutil.which("onionshare-cli") or shutil.which("onionshare") - if onionshare_bin and not no_await_publication: - os.execvp(onionshare_bin, [onionshare_bin] + onionshare_args) - # execvp replaces the process; unreachable unless execvp itself fails - - # Last resort: try to import onionshare_cli as a Python module - try: - if no_await_publication: - _patch_onionshare_await_publication() - from onionshare_cli import main - sys.argv = ["onionshare-cli"] + onionshare_args - sys.exit(main()) - except Exception as e: - print(f"Error: onionshare-cli not available: {e}", file=sys.stderr) - print("Install onionshare-cli via your system package manager.", file=sys.stderr) - sys.exit(1) - - -def _truthy_env(name: str) -> bool: - return os.getenv(name, "").strip().lower() in {"1", "true", "yes", "on"} - - -def _patch_onionshare_await_publication() -> None: - """Force OnionShare CLI startup to bind locally before descriptor publication. - - OnionShare 2.6 waits inside Tor ADD_ONION until the descriptor is published. - For a watchdog-managed hidden service this is brittle: the local website - port never opens, the parent process can appear hung, and repeated retries - can accumulate bundled-Tor temp state. Let Tor publish in the background. - """ - try: - from onionshare_cli.onionshare import OnionShare - except Exception: - return - - if getattr(OnionShare.start_onion_service, "_voxvera_no_await_publication", False): - return - - original = OnionShare.start_onion_service - - def start_without_publication_wait(self, mode, mode_settings, await_publication=True): - return original(self, mode, mode_settings, False) - - start_without_publication_wait._voxvera_no_await_publication = True - OnionShare.start_onion_service = start_without_publication_wait - - -def _onionshare_tmp_dir() -> Path: - return Path.home() / ".config" / "onionshare" / "tmp" - - -def cleanup_onionshare_tmp(max_age_minutes: int = 60) -> int: - """Delete stale OnionShare temp dirs and return the number removed.""" - tmp_dir = _onionshare_tmp_dir() - tmp_dir.mkdir(parents=True, exist_ok=True) - cutoff = time.time() - (max_age_minutes * 60) - removed = 0 - for child in tmp_dir.iterdir(): - try: - if child.stat().st_mtime > cutoff: - continue - if child.is_dir(): - shutil.rmtree(child, ignore_errors=True) - else: - child.unlink(missing_ok=True) - removed += 1 - except Exception: - pass - return removed - - -def _configure_onionshare_system_tor_if_requested() -> Path | None: - """Write an OnionShare config that uses the distro Tor control socket.""" - if not _truthy_env("VOXVERA_ONIONSHARE_SYSTEM_TOR"): - return None - - control_socket = Path("/run/tor/control") - if not control_socket.exists(): - return None - - config_dir = Path.home() / ".config" / "onionshare" - config_dir.mkdir(parents=True, exist_ok=True) - config_path = config_dir / "onionshare.json" - data = {} - if config_path.exists(): - try: - data = json.loads(config_path.read_text()) - except Exception: - data = {} - - data.update( - { - "version": data.get("version", "2.6"), - "connection_type": "socket_file", - "control_port_address": "127.0.0.1", - "control_port_port": 9051, - "socks_address": "127.0.0.1", - "socks_port": 9050, - "socket_file_path": str(control_socket), - "auth_type": "no_auth", - "auth_password": "", - "auto_connect": False, - "bridges_enabled": False, - "bridges_type": "built-in", - "bridges_builtin_pt": "obfs4", - "bridges_moat": "", - "bridges_custom": "", - "bridges_builtin": data.get("bridges_builtin", {}), - "persistent_tabs": data.get("persistent_tabs", []), - "locale": data.get("locale", "en"), - "theme": data.get("theme", 0), - } - ) - config_path.write_text(json.dumps(data, indent=2, sort_keys=True) + "\n") - return config_path - - -def serve(config_path: str) -> str | None: - socks, ctl = get_tor_ports() - - folder_name = load_config(config_path)["folder_name"] - dir_path = DATA_DIR / "host" / folder_name - if not dir_path.is_dir(): - print(f"Directory {dir_path} not found", file=sys.stderr) - sys.exit(1) - - # Auto-rebuild if index.html is missing (e.g. after install cleanup) - if not (dir_path / "index.html").exists(): - print(f"Rebuilding {folder_name} from current template...") - build_assets(config_path) - - logfile = dir_path / "onionshare.log" - - # Set environment variables for OnionShare to use the detected Tor ports - env = os.environ.copy() - env["TOR_SOCKS_PORT"] = socks - env["TOR_CONTROL_PORT"] = ctl - # Prevent user-local pip packages (~/.local) from shadowing system packages. - # onionshare-cli depends on specific Flask/Werkzeug versions from the system; - # stale user-local copies break it. - env["PYTHONNOUSERSITE"] = "1" - - onionshare_config = _configure_onionshare_system_tor_if_requested() - onionshare_args = [] - if onionshare_config is not None: - onionshare_args.extend(["--config", str(onionshare_config)]) - onionshare_args.extend([ - "--website", - "--public", - "--persistent", - str(dir_path / ".onionshare-session"), - "--connect-timeout", - "300", - "--disable_csp", - "-v", - str(dir_path), - ]) - - # Always prefer the system onionshare-cli binary to avoid pkg_resources - # and dependency-isolation issues inside both PyInstaller and pipx. - onionshare_bin = shutil.which("onionshare-cli") or shutil.which("onionshare") - if onionshare_bin and not _truthy_env("VOXVERA_ONIONSHARE_NO_AWAIT_PUBLICATION"): - cmd = [onionshare_bin] + onionshare_args - else: - # Fallback: route through our hidden subcommand - cmd = [sys.argv[0], "_internal_onionshare"] + onionshare_args - if not getattr(sys, 'frozen', False) and sys.argv[0].endswith('.py'): - cmd = [sys.executable] + cmd - - log_fh = open(logfile, "w") - # Detach the child so it survives when the parent terminal closes. - # Unix: start_new_session prevents SIGHUP propagation. - # Windows: CREATE_NEW_PROCESS_GROUP detaches from the console. - import platform as _platform - popen_kwargs = dict(stdout=log_fh, stderr=subprocess.STDOUT, env=env) - if _platform.system() == "Windows": - popen_kwargs["creationflags"] = subprocess.CREATE_NEW_PROCESS_GROUP - else: - popen_kwargs["start_new_session"] = True - proc = subprocess.Popen(cmd, **popen_kwargs) - - pid_file = dir_path / "server.pid" - with open(pid_file, "w") as f: - f.write(str(proc.pid)) - - try: - import re as _re - - onion_url = None - console = Console() - with console.status(f"[bold green][{folder_name}] Connecting to Tor relays and setting up hidden service...") as status: - last_progress = None - while onion_url is None: - time.sleep(1) - if proc.poll() is not None: - status.stop() - console.print(f"[bold red]OnionShare for {folder_name} exited unexpectedly.[/bold red]") - console.print("[yellow]Common causes: Network blocked, inaccurate system clock, or OnionShare already running.[/yellow]") - console.print(f"[dim]See {logfile} for full logs.[/dim]") - with open(logfile) as fh: - lines = fh.readlines() - # Print the last 20 lines of the log to help debug - for line in lines[-20:]: - sys.stderr.write(line) - pid_file.unlink(missing_ok=True) - return None - - if os.path.exists(logfile): - with open(logfile) as fh: - content = fh.read() - - # Look for Tor bootstrap progress in logs to give feedback - m_progress = _re.findall(r"Bootstrapped (\d+)%", content) - if m_progress: - current_progress = m_progress[-1] - if current_progress != last_progress: - status.update(f"[bold green][{folder_name}] Tor Bootstrapping: {current_progress}% ...") - last_progress = current_progress - - m = _re.search(r"https?://[a-z0-9]+\.onion", content) - if m: - onion_url = m.group(0) - elif "Can't connect to the Tor controller" not in content: - session_file = dir_path / ".onionshare-session" - try: - session_data = json.loads(session_file.read_text()) - service_id = session_data.get("general", {}).get("service_id") - if service_id: - onion_url = f"http://{service_id}.onion" - except Exception: - pass - - # update config with the onion URL in the host directory - config_file = dir_path / "config.json" - data = load_config(config_file) - data["tear_off_link"] = onion_url - save_config(data, config_file) - - # regenerate assets with the new URL using the host-local config - build_assets(str(config_file)) - - print(f"[{folder_name}] Onion URL: {onion_url}") - print(f"[{folder_name}] OnionShare running (PID {proc.pid}).") - return onion_url - except KeyboardInterrupt: - return None - finally: - log_fh.close() - - -def _clear_host_dir(dir_path: Path): - """Remove host directory contents but preserve the OnionShare session key.""" - session = dir_path / ".onionshare-session" - saved = session.read_bytes() if session.exists() else None - shutil.rmtree(dir_path, ignore_errors=True) - if saved is not None: - os.makedirs(dir_path, exist_ok=True) - session.write_bytes(saved) - - -import base64 -import zipfile -import tempfile - - -def _safe_extract_zip(zipf: zipfile.ZipFile, dest_dir: Path) -> None: - """Extract a ZIP archive without allowing path traversal.""" - dest_dir = dest_dir.resolve() - for member in zipf.infolist(): - member_path = Path(member.filename) - if member_path.is_absolute(): - raise ValueError(f"Refusing to extract absolute path from archive: {member.filename}") - target_path = (dest_dir / member_path).resolve() - if not str(target_path).startswith(str(dest_dir) + os.sep) and target_path != dest_dir: - raise ValueError(f"Refusing to extract path outside destination: {member.filename}") - zipf.extractall(dest_dir) - - -def get_export_dir() -> Path: - """Get the default export directory (~/voxvera-exports).""" - export_dir = Path.home() / "voxvera-exports" - os.makedirs(export_dir, exist_ok=True) - return export_dir - - -def export_site(folder_name: str, output_path: str = None): - """Export a site folder and its keys into a zip archive.""" - source_dir = DATA_DIR / "host" / folder_name - if not source_dir.exists(): - print(f"Error: Site folder '{folder_name}' not found in {DATA_DIR / 'host'}") - return - - if not output_path: - export_dir = get_export_dir() - output_path = export_dir / f"{folder_name}_export.zip" - else: - output_path = Path(output_path) - - with zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zipf: - for root, dirs, files in os.walk(source_dir): - for file in files: - file_path = Path(root) / file - arcname = file_path.relative_to(source_dir) - zipf.write(file_path, arcname) - - print(f"Exported '{folder_name}' to {output_path}") - - -def export_all_sites(): - """Export all available sites in the host directory.""" - servers = get_servers() - if not servers: - print("No sites found to export.") - return - - export_dir = get_export_dir() - print(f"Exporting {len(servers)} sites to {export_dir}...") - for server in servers: - export_site(server) - print("Export all complete.") - - -def import_site(zip_path: str): - """Import a site folder and its keys from a zip archive.""" - zip_path = Path(zip_path) - if not zip_path.exists(): - print(f"Error: Zip file '{zip_path}' not found.") - return - - with tempfile.TemporaryDirectory() as tmpdir: - with zipfile.ZipFile(zip_path, 'r') as zipf: - try: - _safe_extract_zip(zipf, Path(tmpdir)) - except ValueError as e: - print(f"Error: Invalid export file. {e}") - return - - tmp_path = Path(tmpdir) - config_file = tmp_path / "config.json" - if not config_file.exists(): - print("Error: Invalid export file. Missing 'config.json'.") - return - - data = load_config(config_file) - folder_name = data.get("folder_name") - if not folder_name: - print("Error: Invalid config.json. Missing 'folder_name'.") - return - - dest_dir = DATA_DIR / "host" / folder_name - if dest_dir.exists(): - confirm = inquirer.confirm(message=f"Site '{folder_name}' already exists. Overwrite?").execute() - if not confirm: - print("Import cancelled.") - return - shutil.rmtree(dest_dir) - - shutil.copytree(tmp_path, dest_dir) - print(f"Successfully imported '{folder_name}' to {dest_dir}") - - -def import_multiple_sites(source_dir: str = None): - """Import all zip files from a directory (defaults to ~/voxvera-exports).""" - - if not source_dir: - source_dir = get_export_dir() - else: - source_dir = Path(source_dir) - - if not source_dir.exists(): - print(f"Error: Directory '{source_dir}' not found.") - return - - zip_files = sorted(glob.glob(str(source_dir / "*.zip"))) - if not zip_files: - print(f"No zip files found in {source_dir}") - return - - print(f"Found {len(zip_files)} site(s) to import from {source_dir}...") - for zip_path in zip_files: - print(f"\nImporting {Path(zip_path).name}...") - import_site(zip_path) - print("\nImport multiple complete.") - - -def _load_nostr_source(source: str) -> dict: - from voxvera.nostr.schema import load_source_file - - return load_source_file(source) - - -def validate_nostr_source(source: str) -> dict: - from voxvera.nostr import validate_event_source - - return validate_event_source(_load_nostr_source(source)) - - -def import_nostr_source(source: str, folder_name: str | None = None, overwrite: bool = False) -> Path: - from voxvera.nostr import normalize_event_source - - source_data = _load_nostr_source(source) - defaults = json.loads((_src_res("config.json")).read_text(encoding="utf-8")) - config = normalize_event_source( - source_data, - normalize_config(defaults), - folder_name=folder_name, - source_identifier=source, - ) - dest_dir = DATA_DIR / "host" / config["folder_name"] - if dest_dir.exists() and not overwrite: - raise FileExistsError(f"Site '{config['folder_name']}' already exists. Use --overwrite to replace it.") - if dest_dir.exists(): - shutil.rmtree(dest_dir) - dest_dir.mkdir(parents=True, exist_ok=True) - config_path = dest_dir / "config.json" - save_config(config, config_path) - return config_path - - -def handle_nostr_command(args) -> None: - from voxvera.nostr import NostrValidationError - - try: - if args.nostr_action == "validate": - payload = validate_nostr_source(args.source) - label = payload.get("headline") or payload.get("title") or args.source - print(f"Valid VoxVera Nostr flyer: {label}") - return - - config_path = import_nostr_source( - args.source, - folder_name=getattr(args, "folder_name", None), - overwrite=getattr(args, "overwrite", False), - ) - print(f"Imported Nostr flyer to {config_path}") - - if args.nostr_action in {"build", "serve"}: - build_assets(str(config_path)) - print(f"Built Nostr flyer from {config_path}") - if args.nostr_action == "serve": - serve(str(config_path)) - except (NostrValidationError, FileExistsError, OSError) as exc: - print(f"Error: {exc}", file=sys.stderr) - sys.exit(1) - - -def export_keys(folder_name: str): - """Export the onion service session key as base64 for easy copy/paste.""" - console = Console() - session_file = DATA_DIR / "host" / folder_name / ".onionshare-session" - if not session_file.exists(): - console.print(f"[red]{t('cli.keys_not_found', name=folder_name)}[/red]") - return - raw = session_file.read_bytes() - encoded = base64.b64encode(raw).decode("ascii") - console.print(f"\n[bold]{t('cli.keys_export_header', name=folder_name)}[/bold]") - console.print("[yellow]" + "─" * 60 + "[/yellow]") - console.print(encoded) - console.print("[yellow]" + "─" * 60 + "[/yellow]") - console.print(f"[dim]{t('cli.keys_export_hint')}[/dim]\n") - - -def import_keys(folder_name: str): - """Import an onion service session key from base64 pasted by the user.""" - console = Console() - site_dir = DATA_DIR / "host" / folder_name - if not site_dir.exists(): - console.print(f"[red]{t('cli.keys_site_not_found', name=folder_name)}[/red]") - return - - session_file = site_dir / ".onionshare-session" - if session_file.exists(): - overwrite = inquirer.confirm(message=t("cli.keys_overwrite_confirm", name=folder_name), default=False).execute() - if not overwrite: - console.print(f"[yellow]{t('cli.keys_import_cancelled')}[/yellow]") - return - - console.print(f"\n[bold]{t('cli.keys_import_prompt')}[/bold]") - try: - raw_input = input("> ").strip() - except (KeyboardInterrupt, EOFError): - console.print(f"\n[yellow]{t('cli.keys_import_cancelled')}[/yellow]") - return - - if not raw_input: - console.print(f"[red]{t('cli.keys_import_empty')}[/red]") - return - - try: - decoded = base64.b64decode(raw_input) - except Exception: - console.print(f"[red]{t('cli.keys_import_invalid')}[/red]") - return - - session_file.write_bytes(decoded) - console.print(f"[green]{t('cli.keys_import_success', name=folder_name)}[/green]") - - -def build_docs(): - """Generate localized documentation from templates and locale data.""" - if getattr(sys, 'frozen', False): - template_dir = Path(sys._MEIPASS).joinpath("docs", "templates") - doc_root = Path(sys._MEIPASS).joinpath("docs") - else: - template_dir = ROOT.parent / "docs" / "templates" - doc_root = ROOT.parent / "docs" - - if not template_dir.exists(): - print(f"Error: {template_dir} not found.") - return - - # List all supported languages - locale_files = sorted(glob.glob(str(ROOT / "locales" / "*.json"))) - langs = [Path(f).stem for f in locale_files] - - for lang in langs: - print(f"Generating documentation for: {lang}") - load_locale(lang) - dest_dir = doc_root / lang - os.makedirs(dest_dir, exist_ok=True) - - # Process each template - for t_file in glob.glob(str(template_dir / "*.md")): - name = Path(t_file).name - with open(t_file, "r", encoding="utf-8") as f: - content = f.read() - - # Replace tokens: {{t('path.to.token')}} - # This regex looks for {{t('...')}} and {{t("...")}} - import re as _re - - def replace_token(match): - token_path = match.group(1) - return t(token_path) - - content = _re.sub(r"\{\{t\(['\"](.+?)['\"]\)\}\}", replace_token, content) - - # Look for localized overrides in voxvera/locales/{lang}/docs/{name} - override_path = ROOT / "locales" / lang / "docs" / name - if override_path.exists(): - with open(override_path, "r", encoding="utf-8") as f: - content = f.read() - # Process tokens in the override as well - content = _re.sub(r"\{\{t\(['\"](.+?)['\"]\)\}\}", replace_token, content) - - with open(dest_dir / name, "w", encoding="utf-8") as f: - f.write(content) - - print("Documentation build complete.") - - -def build_site(): - """Refresh the main site/ directory with the latest template, QRs, and portable bundle.""" - # When frozen, site/ source is in sys._MEIPASS, but we might want to output to CWD/site - if getattr(sys, 'frozen', False): - src_site = Path(sys._MEIPASS).joinpath("site") - dest_site = Path.cwd() / "site" - else: - src_site = ROOT.parent / "site" - dest_site = src_site - - if not src_site.exists(): - print(f"Error: {src_site} directory not found.") - return - - config_path = dest_site / "config.json" - if not config_path.exists(): - # Fallback to source if dest doesn't have it (e.g. first run) - config_path = src_site / "config.json" - if not config_path.exists(): - print(f"Error: {config_path} not found.") - return - - print(f"Refreshing {dest_site} assets...") - - # 1. Refresh QR codes using site/config.json - from voxvera.build import generate_qr - generate_qr(config_path, dest_site) - - # 2. Build the HTML from master template - data = load_config(config_path) - render_data = build_render_context(data) - res = _src_res("index-master.html") - if getattr(sys, 'frozen', False): - template_path = res - with open(template_path, "r") as fh: - html = fh.read() - else: - with resources.as_file(res) as template_path: - with open(template_path, "r") as fh: - html = fh.read() - - # Bundle locales (Include landing tokens for the main site) - all_locales = {} - locale_files = sorted(glob.glob(str(ROOT / "locales" / "*.json"))) - - # Load master defaults from src/config.json - src_config_path = ROOT / "src" / "config.json" - master_defaults = {} - if src_config_path.exists(): - with open(src_config_path, "r", encoding="utf-8") as sf: - master_defaults = json.load(sf) - - for lp in locale_files: - code = Path(lp).stem - with open(lp, "r", encoding="utf-8") as lf: - l_data = json.load(lf) - all_locales[code] = { - "meta": l_data.get("meta", {}), - "web": l_data.get("web", {}), - "landing": l_data.get("landing", {}) - } - all_locales[code]["web"]["tor_browser_download_url"] = tor_browser_download_url(code) - - # Override landing data with user custom config data if it differs from master defaults - for field in ["title", "subtitle", "headline", "content", "url_message"]: - if field in data and data[field]: - # Only override if the value is different from the master default - if data[field] != master_defaults.get(field): - all_locales[code]["landing"][field] = _newlines_to_br(data[field]) - - html = html.replace("{{locales}}", json.dumps(all_locales)) - - # 1. Statically replace localization tokens (web tokens) - # Get the language from config if available, else default to en - current_lang = data.get("lang", "en") - lang_data = all_locales.get(current_lang, all_locales.get("en", {})) - - web_tokens = lang_data.get("web", {}) - for token, translation in web_tokens.items(): - # Support Markdown-style redaction ~~text~~ -> text - translation = re.sub(r"~~(.*?)~~", r'\1', str(translation)) - html = html.replace(f"{{{{t_web_{token}}}}}", translation) - - # 2. Statically replace landing tokens with user content OR localized defaults - landing_fields = ["title", "subtitle", "headline", "content", "url_message"] - landing_defaults = lang_data.get("landing", {}) - - for field in landing_fields: - # Use data from config if available, otherwise use localized default - value = data.get(field, landing_defaults.get(field, "")) - - # If the value from config is just the master default, - # and we are NOT in English, use the localized default instead. - if current_lang != "en": - if value == master_defaults.get(field): - value = landing_defaults.get(field, value) - - # Support Markdown-style redaction ~~text~~ - val_str = re.sub(r"~~(.*?)~~", r'\1', str(value)) - val_str = _newlines_to_br(val_str) - html = html.replace(f"{{{{t_landing_{field}}}}}", val_str) - - # 3. Update relative path for download - html = html.replace("download/download.zip", "download/voxvera-source.zip") - - # 4. Inject site-specific config data (handles any remaining {{key}} placeholders) - for key, value in render_data.items(): - val_str = _newlines_to_br(str(value)) - html = html.replace(f"{{{{{key}}}}}", val_str) - - os.makedirs(dest_site, exist_ok=True) - with open(dest_site / "index.html", "w") as fh: - fh.write(html) - - # 5. Create the download assets in site/download/ - download_dir = dest_site / "download" - os.makedirs(download_dir, exist_ok=True) - - # Bundle source version - bundle_source(download_dir / "voxvera-source.zip") - - # Copy standalone binaries if they exist, but avoid writing oversized - # artifacts into the tracked site tree where GitHub rejects >100 MB files. - bin_dir = ROOT / "resources" / "bin" - if bin_dir.exists(): - for bin_file in bin_dir.iterdir(): - if bin_file.is_file(): - if bin_file.stat().st_size > GITHUB_RECOMMENDED_BINARY_LIMIT: - print(f"Skipping oversized site download artifact: {bin_file.name}") - continue - shutil.copy(bin_file, download_dir / bin_file.name) - - print("site/ directory successfully synchronized.") - - -def vendorize(): - """Download all dependencies into voxvera/vendor/ for portable use.""" - vendor_dir = ROOT / "vendor" - req_file = ROOT.parent / "requirements.txt" - if not req_file.exists(): - print("Error: requirements.txt not found.") - return - - os.makedirs(vendor_dir, exist_ok=True) - print(f"Vendorizing dependencies into {vendor_dir}...") - - try: - subprocess.check_call([ - sys.executable, "-m", "pip", "install", - "-r", str(req_file), - "--target", str(vendor_dir), - "--no-compile" - ]) - print("Vendorization complete.") - except subprocess.CalledProcessError as e: - print(f"Error during vendorization: {e}") - - -def batch_import_configs(): - files = sorted(glob.glob(str(DATA_DIR / "imports" / "*.json"))) - if not files: - print("No JSON files found in imports") - return - for json_file in files: - print(f"Processing {json_file}") - # Use a temp config path in DATA_DIR instead of bundled ROOT - dest_config = DATA_DIR / "temp_config.json" - shutil.copy(json_file, dest_config) - folder_name = load_config(json_file)["folder_name"] - _clear_host_dir(DATA_DIR / "host" / folder_name) - build_assets(str(dest_config)) - dest_config.unlink(missing_ok=True) - - -def _get_preset_dir() -> Path: - """Return a usable Path to the bundled presets directory.""" - if getattr(sys, 'frozen', False): - return Path(sys._MEIPASS).joinpath("voxvera", "templates", "presets") - return Path(resources.files(__package__).joinpath("templates", "presets")) - - -def list_presets() -> list[dict]: - """Return metadata for all bundled preset templates.""" - preset_dir = _get_preset_dir() - presets = [] - if not preset_dir.exists(): - return presets - for f in sorted(preset_dir.glob("*.json")): - if f.stem in ("blank", "example"): - continue - try: - data = json.loads(f.read_text(encoding="utf-8")) - presets.append({"id": f.stem, "file": str(f), "name": data.get("name", f.stem)}) - except Exception: - pass - return presets - - -def create_from_template(console): - """Show template picker, pre-fill config, then hand off to interactive_update.""" - from InquirerPy.base.control import Choice - - presets = list_presets() - if not presets: - console.print("[yellow]No templates found.[/yellow]") - return - - # Build choices with localized names where available - choices = [] - for p in presets: - localized_name = t(f"templates.{p['id']}.name") - display = localized_name if localized_name != f"templates.{p['id']}.name" else p["name"] - choices.append(Choice(p, display)) - choices.append(Choice(None, t("cli.manage_action_back"))) - - selected = inquirer.select( - message=t("cli.template_select"), - choices=choices - ).execute() - - if selected is None: - return - - # Load the preset JSON - preset_data = json.loads(Path(selected["file"]).read_text(encoding="utf-8")) - template_id = selected["id"] - preset_data["lang"] = CURRENT_LANG_CODE or preset_data.get("lang", "en") - - # Override content fields with locale translations if available - for field in ["name", "title", "subtitle", "headline", "content", "url_message"]: - localized = t(f"templates.{template_id}.{field}") - if localized != f"templates.{template_id}.{field}": - preset_data[field] = localized - - # Write to temp config - config_path = DATA_DIR / "config.json" - save_config(preset_data, str(config_path)) - - # Let user customize, build, and serve - interactive_update(str(config_path)) - if resolve_new_site_folder(str(config_path)) is None: - return - build_assets(str(config_path)) - serve(str(config_path)) - - -def _seed_bundled_sites(): - """Copy bundled example sites from ROOT/host/ to DATA_DIR/host/ if they - don't already exist there. This runs once — after that, only DATA_DIR is - the source of truth so deletes actually stick.""" - bundled_host = ROOT / "host" - if not bundled_host.exists() or ROOT == DATA_DIR: - return - dest_host = DATA_DIR / "host" - for src in bundled_host.iterdir(): - if src.is_dir() and (src / "config.json").exists(): - dest = dest_host / src.name - if not dest.exists(): - shutil.copytree(src, dest) - - -def rebuild_all_sites(): - """Rebuild index.html for all existing sites from the current master template. - - Preserves config.json, .onionshare-session keys, and download/ content. - Only regenerates the HTML and QR codes. - """ - servers = get_servers() - if not servers: - print("No sites found to rebuild.") - return - print(f"Rebuilding {len(servers)} site(s) from current template...") - for name in servers: - config_path = DATA_DIR / "host" / name / "config.json" - try: - build_assets(str(config_path)) - print(f" Rebuilt: {name}") - except Exception as e: - print(f" Failed to rebuild {name}: {e}") - print("Rebuild complete.") - - -def get_servers() -> list[str]: - """Return server names found in DATA_DIR/host only.""" - host_dir = DATA_DIR / "host" - servers = [] - if host_dir.exists(): - for d in host_dir.iterdir(): - if d.is_dir() and (d / "config.json").exists(): - servers.append(d.name) - return sorted(servers) - - -def _probe_onion_url(onion_url: str, socks_port: str = "9050", timeout: int = 20): - """Return True/False when curl can verify the onion, or None if unavailable.""" - if not onion_url: - return None - curl_bin = shutil.which("curl") - if not curl_bin: - return None - - cmd = [ - curl_bin, - "--silent", - "--show-error", - "--output", - "/dev/null", - "--write-out", - "%{http_code}", - "--max-time", - str(timeout), - "--socks5-hostname", - f"127.0.0.1:{socks_port}", - onion_url, - ] - try: - result = subprocess.run( - cmd, - check=False, - capture_output=True, - text=True, - ) - except OSError: - return None - - if result.returncode != 0: - return False - return result.stdout.strip().startswith(("2", "3")) - - -def _read_onion_url(folder_name: str) -> str: - config_path = DATA_DIR / "host" / folder_name / "config.json" - if not config_path.exists(): - return "" - try: - config = normalize_config(load_config(config_path)) - except Exception: - return "" - return get_effective_tear_off_link(config) - - -def is_server_running(folder_name: str) -> bool: - pid_file = DATA_DIR / "host" / folder_name / "server.pid" - if not pid_file.exists(): - return False - try: - with open(pid_file, "r") as f: - pid = int(f.read().strip()) - except ValueError: - pid_file.unlink(missing_ok=True) - return False - - import platform - import subprocess - if platform.system() == "Windows": - try: - output = subprocess.check_output(f"tasklist /FI \"PID eq {pid}\" /NH", shell=True, stderr=subprocess.STDOUT).decode() - if "No tasks are running" in output: - pid_file.unlink(missing_ok=True) - return False - return True - except subprocess.CalledProcessError: - pid_file.unlink(missing_ok=True) - return False - else: - try: - os.kill(pid, 0) - except OSError: - pid_file.unlink(missing_ok=True) - return False - - try: - output = subprocess.check_output(["ps", "-p", str(pid), "-o", "command="], stderr=subprocess.STDOUT).decode().lower() - if "onionshare" in output or "python" in output or "tor" in output: - onion_url = _read_onion_url(folder_name) - if onion_url: - parsed = urllib.parse.urlparse(onion_url) - if parsed.hostname and parsed.hostname.endswith(".onion"): - probe = _probe_onion_url(onion_url) - if probe is False: - try: - if time.time() - pid_file.stat().st_mtime < 900: - return True - except Exception: - pass - return False - return True - return False - except Exception: - return False - - -def stop_server(folder_name: str): - pid_file = DATA_DIR / "host" / folder_name / "server.pid" - if not pid_file.exists(): - print(f"Server {folder_name} is not running.") - return - try: - with open(pid_file, "r") as f: - pid = int(f.read().strip()) - import platform - if platform.system() == "Windows": - subprocess.run(["taskkill", "/F", "/PID", str(pid)], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - else: - try: - os.killpg(pid, signal.SIGTERM) - except ProcessLookupError: - os.kill(pid, signal.SIGTERM) - print(f"Stopped {folder_name} (PID {pid})") - except Exception as e: - print(f"Error stopping {folder_name}: {e}") - finally: - pid_file.unlink(missing_ok=True) - - -def delete_server(folder_name: str): - if is_server_running(folder_name): - stop_server(folder_name) - dir_path = DATA_DIR / "host" / folder_name - if dir_path.exists(): - shutil.rmtree(dir_path, ignore_errors=True) - print(f"Deleted server {folder_name}") - - -def start_all_servers(): - """Non-interactive: start every configured site that isn't already running.""" - _seed_bundled_sites() - servers = get_servers() - if not servers: - print("No sites configured.") - return - for s in servers: - if is_server_running(s): - print(f"[SKIP] {s} already running") - continue - pid_file = DATA_DIR / "host" / s / "server.pid" - if pid_file.exists(): - print(f"[RESTART] {s}: existing process failed health check") - stop_server(s) - config_path = DATA_DIR / "host" / s / "config.json" - try: - url = serve(str(config_path)) - if url: - print(f"[OK] {s}: {url}") - else: - print(f"[FAIL] {s}: could not obtain onion URL") - except Exception as e: - print(f"[FAIL] {s}: {e}") - - -def _current_group_names() -> set[str]: - import grp - - names = set() - for gid in os.getgroups() + [os.getgid()]: - try: - names.add(grp.getgrgid(gid).gr_name) - except KeyError: - pass - return names - - -def _user_is_group_member(group_name: str) -> bool: - import grp - import pwd - - try: - group = grp.getgrnam(group_name) - username = pwd.getpwuid(os.getuid()).pw_name - except KeyError: - return False - return username in group.gr_mem or os.getgid() == group.gr_gid - - -def linux_autostart_start(): - """Linux systemd entry point with cleanup and system-Tor hardening.""" - cleanup_onionshare_tmp(max_age_minutes=60) - os.environ["VOXVERA_ONIONSHARE_NO_AWAIT_PUBLICATION"] = "1" - os.environ["VOXVERA_ONIONSHARE_SYSTEM_TOR"] = "1" - - if _user_is_group_member("debian-tor") and "debian-tor" not in _current_group_names(): - voxvera_bin = _find_voxvera_bin() - command = ( - "env VOXVERA_ONIONSHARE_NO_AWAIT_PUBLICATION=1 " - "VOXVERA_ONIONSHARE_SYSTEM_TOR=1 " - f"{shlex.quote(voxvera_bin)} start-all" - ) - os.execvp("sg", ["sg", "debian-tor", "-c", command]) - - start_all_servers() - - -def stop_all_servers(): - """Non-interactive: stop every running site.""" - servers = get_servers() - stopped = False - for s in servers: - if is_server_running(s): - stop_server(s) - stopped = True - if not stopped: - print("No running sites.") - - -def install_autostart(): - """Install a platform-appropriate mechanism to start sites on boot.""" - adapter = get_platform_adapter(cli_module=sys.modules[__name__]) - try: - adapter.install_autostart() - except NotImplementedError: - print(f"Autostart not supported on {adapter.label}. " - "Run 'voxvera start-all' manually or add it to your init system.") - - -def uninstall_autostart(): - """Remove the platform-appropriate autostart mechanism.""" - adapter = get_platform_adapter(cli_module=sys.modules[__name__]) - try: - adapter.uninstall_autostart() - except NotImplementedError: - print(f"Autostart uninstall not supported on {adapter.label}.") - - -def _find_voxvera_bin() -> str: - """Return the absolute path to the voxvera binary/script.""" - voxvera_bin = shutil.which("voxvera") - if voxvera_bin: - return str(Path(voxvera_bin).resolve()) - # Fallback: current executable - return str(Path(sys.argv[0]).resolve()) - - -def _install_systemd_autostart(): - """Backward-compatible wrapper for Linux autostart installation.""" - adapter = get_platform_adapter(cli_module=sys.modules[__name__]) - adapter.install_autostart() - - -def _install_launchd_autostart(): - """Backward-compatible wrapper for macOS autostart installation.""" - adapter = get_platform_adapter(cli_module=sys.modules[__name__]) - adapter.install_autostart() - - -def _install_windows_autostart(): - """Backward-compatible wrapper for Windows autostart installation.""" - adapter = get_platform_adapter(cli_module=sys.modules[__name__]) - adapter.install_autostart() - - -def manage_servers(): - from InquirerPy import inquirer - from InquirerPy.base.control import Choice - console = Console() - - # On first run, copy any bundled example sites so they're user-editable. - _seed_bundled_sites() - - while True: - servers = get_servers() - - choices = [] - for s in servers: - running = is_server_running(s) - status_text = "[ON] " if running else "[OFF]" - - label = f"{status_text} {s}" - if running: - try: - site_data = load_config(DATA_DIR / "host" / s / "config.json") - url = site_data.get("tear_off_link") - if url: - label += f" ({url})" - except Exception: - pass - choices.append(Choice(s, label)) - - choices.insert(0, Choice("create_new", t("cli.manage_create_new"))) - choices.insert(1, Choice("from_template", t("cli.manage_templates"))) - if servers: - choices.append(Choice("start_all", t("cli.manage_start_all"))) - choices.append(Choice("stop_all", t("cli.manage_stop_all"))) - choices.append(Choice("export_all", t("cli.manage_export_all"))) - choices.append(Choice("import_multiple", t("cli.manage_import_multiple"))) - choices.append(Choice(None, t("cli.manage_exit"))) - - selected = inquirer.select( - message=t("cli.manage_select_server"), - choices=choices - ).execute() - - if selected is None: - break - - if selected == "create_new": - config_path = DATA_DIR / "config.json" - # Reset config from template for a fresh start - try: - template_config = _template_res("voxvera", "config.json") - with resources.as_file(template_config) as tc: - shutil.copy(tc, config_path) - except Exception as e: - console.print(f"[yellow]Warning: Could not reset config from template: {e}[/yellow]") - - try: - interactive_update(str(config_path)) - if resolve_new_site_folder(str(config_path)) is None: - continue - build_assets(str(config_path)) - serve(str(config_path)) - except (KeyboardInterrupt, Exception) as e: - if not isinstance(e, KeyboardInterrupt): - console.print(f"[red]Error creating site: {e}[/red]") - else: - console.print("\n[yellow]Site creation cancelled.[/yellow]") - continue - - if selected == "from_template": - try: - create_from_template(console) - except (KeyboardInterrupt, Exception) as e: - if not isinstance(e, KeyboardInterrupt): - console.print(f"[red]Error creating site from template: {e}[/red]") - else: - console.print("\n[yellow]Template creation cancelled.[/yellow]") - continue - - if selected == "start_all": - results = [] - for s in servers: - if not is_server_running(s): - config_path = DATA_DIR / "host" / s / "config.json" - try: - url = serve(str(config_path)) - if url: - results.append((s, url)) - except Exception as e: - console.print(f"[red]{t('cli.manage_startup_summary')}: {e}[/red]") - - if results: - console.rule(t("cli.manage_startup_summary")) - for s, url in results: - console.print(f"[green]✔ {s}: [bold]{url}[/bold][/green]") - inquirer.confirm(message=t("cli.manage_press_enter"), default=True).execute() - continue - - if selected == "stop_all": - for s in servers: - if is_server_running(s): - stop_server(s) - continue - - if selected == "export_all": - export_all_sites() - continue - - if selected == "import_multiple": - import_multiple_sites() - continue - - running = is_server_running(selected) - action_choices = [ - Choice("toggle", t("cli.manage_action_toggle_stop") if running else t("cli.manage_action_toggle_start")), - Choice("edit", t("cli.manage_action_edit")), - Choice("export", t("cli.manage_action_export")), - Choice("export_keys", t("cli.manage_action_export_keys")), - Choice("import_keys", t("cli.manage_action_import_keys")), - Choice("delete", t("cli.manage_action_delete")), - Choice(None, t("cli.manage_action_back")) - ] - - action = inquirer.select( - message=t("cli.manage_action_menu", name=selected), - choices=action_choices - ).execute() - - if action == "toggle": - if running: - stop_server(selected) - else: - config_path = DATA_DIR / "host" / selected / "config.json" - try: - serve(str(config_path)) - except SystemExit: - pass - elif action == "edit": - config_path = DATA_DIR / "host" / selected / "config.json" - try: - interactive_update(str(config_path)) - # Re-build assets after update - build_assets(str(config_path)) - console.print(f"[green]✔ {selected} updated and rebuilt successfully.[/green]") - except (KeyboardInterrupt, Exception) as e: - if not isinstance(e, KeyboardInterrupt): - console.print(f"[red]Error updating site: {e}[/red]") - else: - console.print("\n[yellow]Update cancelled.[/yellow]") - elif action == "export": - export_site(selected) - elif action == "export_keys": - export_keys(selected) - elif action == "import_keys": - import_keys(selected) - elif action == "delete": - confirm = inquirer.confirm(message=t("cli.manage_delete_confirm", name=selected)).execute() - if confirm: - delete_server(selected) - - -def choose_language(current_lang: str = None) -> str: - """Prompt the user to select a language.""" - # List available locales - locale_files = sorted(glob.glob(str(ROOT / "locales" / "*.json"))) - choices = [] - - # Use fallback if no locales folder (e.g. first run/dev) - if not locale_files: - return "en" - - default_idx = 0 - for i, path in enumerate(locale_files): - code = Path(path).stem - try: - with open(path, "r", encoding="utf-8") as f: - meta = json.load(f).get("meta", {}) - name = meta.get("language_name", code) - flag = meta.get("flag", "") - choices.append({"name": f"{flag} {name} ({code})", "value": code}) - if code == current_lang: - default_idx = i - except Exception: - choices.append({"name": code, "value": code}) - - # If only one choice, don't bother asking - if len(choices) <= 1: - return choices[0]["value"] if choices else "en" - - lang = inquirer.select( - message="Select your language / Seleccione su idioma:", - choices=choices, - default=choices[default_idx]["value"] if current_lang else choices[0]["value"] - ).execute() - return lang - - -def main(argv=None): - parser = argparse.ArgumentParser(prog="voxvera") - parser.add_argument( - "--config", - default=str(DATA_DIR / "config.json"), - help="Path to config.json", - ) - parser.add_argument( - "--lang", "--language", "--sprache", "--idioma", - help="Force language code (e.g. en, es, de)", - ) - parser.add_argument( - "--version", "-V", - action="version", - version=f"VoxVera {__version__}", - help="Show version information and exit", - ) - sub = parser.add_subparsers(dest="command") - - sub.add_parser("lang", help="Change language preference") - - # ... (parsers as before) ... - - p_init = sub.add_parser( - "init", help="Update configuration interactively" - ) - p_init.add_argument("--template", help="Copy a template into dist/") - p_init.add_argument("--non-interactive", action="store_true") - - p_build = sub.add_parser("build", help="Build flyer assets from config") - p_build.add_argument("--download") - - p_export = sub.add_parser("export", help="Export a site and its keys into a zip archive") - p_export.add_argument("folder_name", help="Name of the site folder in host/") - p_export.add_argument("--output", help="Custom output path for the zip") - - sub.add_parser("export-all", help="Export all sites and their keys to ~/voxvera-exports") - - p_import = sub.add_parser("import", help="Import a site and its keys from a zip archive") - p_import.add_argument("zip_path", help="Path to the exported zip file") - - p_import_multiple = sub.add_parser("import-multiple", help="Import multiple sites and their keys from a directory") - p_import_multiple.add_argument("--dir", help="Directory containing export zips (defaults to ~/voxvera-exports)") - - sub.add_parser("batch-import", help="Batch import JSON files from imports/") - sub.add_parser("serve", help="Serve flyer over OnionShare using config") - p_quickstart = sub.add_parser( - "quickstart", help="Init, build and serve in sequence" - ) - p_quickstart.add_argument( - "--non-interactive", - action="store_true", - help="Skip interactive prompts and use existing config", - ) - sub.add_parser("check", help="Check for required external dependencies") - p_doctor = sub.add_parser("doctor", help="Run platform-aware runtime diagnostics") - p_doctor.add_argument("--json", action="store_true", help="Emit machine-readable JSON") - p_platform_status = sub.add_parser("platform-status", help="Show detected platform support tier and runtime posture") - p_platform_status.add_argument("--json", action="store_true", help="Emit machine-readable JSON") - sub.add_parser("vendorize", help="Download all dependencies into voxvera/vendor/ for portability") - sub.add_parser("build-docs", help="Generate localized documentation from templates") - sub.add_parser("build-site", help="Refresh the main site/ directory assets and bundle") - sub.add_parser("manage", help="Manage VoxVera servers interactively") - sub.add_parser("start-all", help="Start all configured sites (non-interactive)") - sub.add_parser("stop-all", help="Stop all running sites (non-interactive)") - p_autostart = sub.add_parser("autostart", help="Install or inspect platform autostart support") - p_autostart.add_argument("action", nargs="?", choices=["install", "status", "uninstall"], default="install") - p_autostart.add_argument("--json", action="store_true", help="Emit machine-readable JSON for status") - p_nostr = sub.add_parser("nostr", help="Import and build flyers from Nostr event sources") - nostr_sub = p_nostr.add_subparsers(dest="nostr_action", required=True) - p_nostr_validate = nostr_sub.add_parser("validate", help="Validate a local VoxVera Nostr event JSON file") - p_nostr_validate.add_argument("source", help="Path to a local Nostr event JSON file") - for action in ("import", "build", "serve"): - p = nostr_sub.add_parser(action, help=f"{action.title()} a local VoxVera Nostr event JSON file") - p.add_argument("source", help="Path to a local Nostr event JSON file") - p.add_argument("--folder-name", help="Override the imported site folder name") - p.add_argument("--overwrite", action="store_true", help="Replace an existing site folder") - sub.add_parser("rebuild-all", help="Rebuild all existing sites from the current template (preserves keys and config)") - sub.add_parser("_internal_onionshare", help=argparse.SUPPRESS) - sub.add_parser("_linux_autostart_start", help=argparse.SUPPRESS) - - args, unknown_args = parser.parse_known_args(argv) - - if args.command == "_internal_onionshare": - _internal_onionshare() - return - if args.command == "_linux_autostart_start": - linux_autostart_start() - return - - config_path = Path(args.config).resolve() - - # Determine language - current_lang = args.lang - config_data = {} - if config_path.exists(): - try: - config_data = load_config(str(config_path)) - if not current_lang: - current_lang = config_data.get("lang") - except Exception: - pass - - if not current_lang and args.command in ("init", "quickstart", "manage"): - if getattr(args, "non_interactive", False): - current_lang = "en" - else: - current_lang = choose_language() - # Save choice to config if possible - if config_path.exists(): - config_data["lang"] = current_lang - save_config(config_data, str(config_path)) - - # Load the locale - load_locale(current_lang or "en") - - if args.command == "lang": - new_lang = choose_language(current_lang) - if config_path.exists(): - config_data["lang"] = new_lang - save_config(config_data, str(config_path)) - print(f"Language changed to {new_lang}") - return - - if not args.command: - if args.lang: - # If they just ran 'voxvera --lang de', save it and exit - if config_path.exists(): - config_data["lang"] = args.lang - save_config(config_data, str(config_path)) - print(f"Language changed to {args.lang}") - return - else: - parser.print_help() - return - - if args.command == "init": - if args.template: - copy_template(args.template) - return - ensure_config_exists(config_path) - if current_lang: - config_data = load_config(str(config_path)) - if not config_data.get("lang"): - config_data["lang"] = current_lang - save_config(config_data, str(config_path)) - if not args.non_interactive: - interactive_update(config_path) - build_assets(config_path) - elif args.command == "build": - build_assets(config_path, download_path=args.download) - elif args.command == "export": - export_site(args.folder_name, args.output) - elif args.command == "export-all": - export_all_sites() - elif args.command == "import": - import_site(args.zip_path) - elif args.command == "import-multiple": - import_multiple_sites(args.dir) - elif args.command == "serve": - serve(config_path) - elif args.command == "batch-import": - batch_import_configs() - elif args.command == "manage": - manage_servers() - elif args.command == "start-all": - start_all_servers() - elif args.command == "stop-all": - stop_all_servers() - elif args.command == "autostart": - if args.action == "status": - print_autostart_status(json_output=args.json) - elif args.action == "uninstall": - uninstall_autostart() - else: - install_autostart() - elif args.command == "nostr": - handle_nostr_command(args) - elif args.command == "quickstart": - ensure_config_exists(config_path) - if current_lang: - config_data = load_config(str(config_path)) - if not config_data.get("lang"): - config_data["lang"] = current_lang - save_config(config_data, str(config_path)) - if not args.non_interactive: - if not sys.stdin.isatty(): - print( - "Error: quickstart requires an interactive terminal. " - "Use --non-interactive or run 'voxvera init' first.", - file=sys.stderr, - ) - sys.exit(1) - interactive_update(config_path) - build_assets(config_path) - serve(config_path) - elif args.command == "check": - check_deps() - elif args.command == "doctor": - print_report("doctor", json_output=args.json) - elif args.command == "platform-status": - print_report("platform-status", json_output=args.json) - elif args.command == "vendorize": - vendorize() - elif args.command == "build-docs": - build_docs() - elif args.command == "build-site": - build_site() - elif args.command == "rebuild-all": - rebuild_all_sites() - else: - parser.print_help() - - -if __name__ == "__main__": - main() diff --git a/voxvera/host/voxvera/config.json b/voxvera/host/voxvera/config.json deleted file mode 100644 index bf63c17..0000000 --- a/voxvera/host/voxvera/config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Vox Vera Printable Flyers", - "folder_name": "voxvera", - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.", - "url_message": "Get VoxVera and start spreading your message.", - "url": "https://github.com/PR0M3TH3AN/VoxVera", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100" -} diff --git a/voxvera/host/voxvera/download/.gitkeep b/voxvera/host/voxvera/download/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/host/voxvera/download/voxvera-portable.zip b/voxvera/host/voxvera/download/voxvera-portable.zip deleted file mode 100644 index 7780c15..0000000 Binary files a/voxvera/host/voxvera/download/voxvera-portable.zip and /dev/null differ diff --git a/voxvera/host/voxvera/download/voxvera-source.zip b/voxvera/host/voxvera/download/voxvera-source.zip deleted file mode 100644 index 8cfca00..0000000 Binary files a/voxvera/host/voxvera/download/voxvera-source.zip and /dev/null differ diff --git a/voxvera/host/voxvera/index.html b/voxvera/host/voxvera/index.html deleted file mode 100644 index a94daea..0000000 --- a/voxvera/host/voxvera/index.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - Vox Vera Printable Flyers - - - - - -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
- -
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
- Use Tor Browser

- to help spread this message go to
-
- click the button below to print -
-
- QR Code -
-
-
-
-

TOP SECRET

-
DO NOT DISTRIBUTE
-

OPERATION VOX VERA

-
-
-
Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.
-
- -
-Get VoxVera and start spreading your message.

-Use Tor Browser

-https://github.com/PR0M3TH3AN/VoxVera -
- QR Code -
-
-
- -
-
-
- - - - - -
- - diff --git a/voxvera/host/voxvera/qrcode-content.png b/voxvera/host/voxvera/qrcode-content.png deleted file mode 100644 index b2e4486..0000000 Binary files a/voxvera/host/voxvera/qrcode-content.png and /dev/null differ diff --git a/voxvera/locales/ar.json b/voxvera/locales/ar.json deleted file mode 100644 index 4106b22..0000000 --- a/voxvera/locales/ar.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "العربية", - "flag": "🇸🇦", - "direction": "rtl" - }, - "cli": { - "dep_check_header": "فحص التبعيات", - "dep_found": "موجود", - "dep_missing": "مفقود", - "all_deps_installed": "تم تثبيت جميع التبعيات.", - "missing_deps_error": "بعض التبعيات مفقودة. تشغيل: pip install 'voxvera[all]'", - "init_name": "الاسم", - "init_folder": "اسم المجلد", - "init_title": "العنوان", - "init_subtitle": "العنوان الفرعي", - "init_headline": "العنوان الرئيسي", - "init_body": "نص الرسالة", - "init_links": "الروابط", - "edit_again": "تعديل مرة أخرى؟", - "body_length": "طول النص", - "body_limit_exceeded": "يتجاوز الحد", - "url_label": "URL (رابط المحتوى - مورد خارجي)", - "url_message_label": "رسالة الـ URL", - "footer_message_label": "رسالة التذييل", - "template_not_found": "القالب {name} غير موجود", - "template_copied": "تم نسخ القالب إلى {dest}", - "flyer_created": "تم إنشاء ملفات المنشور تحت {dest}", - "dir_not_found": "المجلد {dir_path} غير موجود", - "onionshare_error": "خرج OnionShare لـ {folder_name} بشكل غير متوقع.", - "onionshare_causes": "الأسباب الشائعة: الشبكة محظورة، وقت النظام غير دقيق، أو OnionShare يعمل بالفعل.", - "onionshare_logs_tip": "راجع {logfile} للحصول على السجلات الكاملة.", - "onion_url_msg": "[{folder_name}] رابط Onion: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare يعمل (PID {pid}).", - "export_not_found": "خطأ: مجلد الموقع '{folder_name}' غير موجود في {host_root}", - "export_success": "تم تصدير '{folder_name}' إلى {output_path}", - "export_all_none": "لم يتم العثور على مواقع لتصديرها.", - "export_all_starting": "جاري تصدير {count} مواقع إلى {dir}...", - "export_all_complete": "اكتمل تصدير الكل.", - "import_zip_not_found": "خطأ: ملف Zip '{path}' غير موجود.", - "import_invalid_config": "خطأ: ملف تصدير غير صالح. 'config.json' مفقود.", - "import_invalid_folder": "خطأ: config.json غير صالح. 'folder_name' مفقود.", - "import_overwrite_confirm": "الموقع '{folder_name}' موجود بالفعل. هل تريد الاستبدال؟", - "import_cancelled": "تم إلغاء الاستيراد.", - "import_success": "تم استيراد '{folder_name}' بنجاح إلى {dest_dir}", - "import_dir_not_found": "خطأ: المجلد '{dir}' غير موجود.", - "import_multiple_none": "لم يتم العثور على ملفات zip في {dir}", - "import_multiple_found": "تم العثور على {count} موقع للاستيراد من {dir}...", - "importing_file": "جاري استيراد {name}...", - "import_multiple_complete": "اكتمل استيراد الكل.", - "batch_import_none": "لم يتم العثور على ملفات JSON في الواردات", - "batch_import_processing": "جاري معالجة {file}", - "stop_server_not_running": "الخادم {folder_name} لا يعمل.", - "stop_server_success": "تم إيقاف {folder_name} (PID {pid})", - "delete_server_success": "تم حذف الخادم {folder_name}", - "manage_select_server": "اختر خادماً لإدارته (أو خروج):", - "manage_create_new": "--- إنشاء موقع/منشور جديد ---", - "manage_start_all": "--- تشغيل جميع المواقع ---", - "manage_stop_all": "--- إيقاف جميع المواقع ---", - "manage_export_all": "--- تصدير جميع المواقع ---", - "manage_import_multiple": "--- استيراد مواقع متعددة ---", - "manage_exit": "خروج", - "manage_startup_summary": "ملخص التشغيل", - "manage_press_enter": "اضغط Enter للمتابعة", - "manage_action_menu": "إدارة {name}:", - "manage_action_toggle_stop": "إيقاف", - "manage_action_toggle_start": "تشغيل", - "manage_action_export": "تصدير إلى Zip", - "manage_action_delete": "حذف", - "manage_action_back": "رجوع", - "manage_delete_confirm": "هل أنت متأكد أنك تريد حذف {name}؟", - "bootstrapping_msg": "[{name}] جاري الاتصال بمرحلات Tor وإعداد الخدمة المخفية...", - "bootstrapping_progress": "[{name}] تمهيد Tor: {progress}% ...", - "no_urls_qr_skip": "لم يتم تكوين أي روابط بعد. سيتم إنشاء أكواد QR بعد 'voxvera serve'", - "input_file_not_found": "ملف الإدخال {path} غير موجود.", - "attachment_path_label": "مسار ملف المرفق (اختياري - سيتم تقديمه من موقع Tor)", - "manage_action_edit": "تحرير", - "manage_templates": "--- إنشاء من قالب ---", - "template_select": "اختر قالباً:", - "body_over_limit_warning": "تحذير: نص المحتوى يتجاوز 1000 حرف. قد يتم قطعه في المنشور.", - "manage_action_export_keys": "تصدير المفاتيح", - "manage_action_import_keys": "استيراد المفاتيح", - "keys_not_found": "لم يتم العثور على مفتاح جلسة لـ '{name}'. قم بتشغيل الموقع أولاً لتوليد المفاتيح.", - "keys_export_header": "مفتاح الجلسة لـ '{name}':", - "keys_export_hint": "انسخ هذا المفتاح واحفظه بأمان. استخدم 'استيراد المفاتيح' في نسخة أخرى للاستعادة.", - "keys_site_not_found": "الموقع '{name}' غير موجود.", - "keys_overwrite_confirm": "الموقع '{name}' لديه مفتاح بالفعل. هل تريد الكتابة فوقه؟", - "keys_import_cancelled": "تم إلغاء الاستيراد.", - "keys_import_prompt": "الصق مفتاح الجلسة base64 أدناه:", - "keys_import_empty": "لم يتم تقديم مفتاح.", - "keys_import_invalid": "تنسيق المفتاح غير صالح. يجب أن يكون سلسلة base64 صالحة.", - "keys_import_success": "تم استيراد مفتاح الجلسة لـ '{name}'. أعد تشغيل الموقع لاستخدام المفتاح الجديد." - }, - "web": { - "tear_off_tor_browser": "استخدم متصفح Tor", - "tear_off_desc": "للمساعدة في نشر هذه الرسالة، انتقل إلى", - "tear_off_footer": "انقر فوق الزر أدناه للطباعة", - "built_with": "بني بواسطة", - "print_button": "اطبع المنشور", - "download_button": "تحميل الأداة والكود", - "download_attachment": "تنزيل المرفق" - }, - "landing": { - "title": "سري للغاية", - "subtitle": "~~لا~~ للنشر", - "headline": "عملية VOX VERA", - "content": "تحرر من الرقابة مع VoxVera. أداة تسويق عصابات مجهولة ونشر رسائل. سواء عبر الإنترنت أو في العالم المادي، يمكنها تمكينك من نشر أفكارك بجرأة، محمية بإخفاء الهوية الكامل (إذا كنت تستضيف عبر Tor). قم بتحميل الكود، وصمم موقع منشور، واستضيفه عبر الإنترنت وقم بتضخيم رسالتك.

استخدم القوة الميمية لمشاركة أفكارك في مدرستك، أو مكان عملك، أو مجتمعاتك عبر الإنترنت، أو حتى على مستوى العالم. تضمن VoxVera تردد صدى رسالتك بعيداً وعلى نطاق واسع، مع أقسام قابلة للنزع تتميز بروابط فريدة وأكواد QR لسهولة إعادة الطباعة.

يمكن الحفاظ على الخصوصية. يمكن مشاركة المنشورات عبر شبكة Tor، مما يحمي المضيف والمستخدمين من الرقابة.

انضم إلينا في ثورة تقدر الحقيقة والشفافية. معاً، يمكننا بناء شبكة من المواطنين المستنيرين الذين لا يخشون التحدث.", - "url_message": "احصل على VoxVera وابدأ بنشر رسالتك.", - "name": "منشورات Vox Vera القابلة للطباعة" - }, - "templates": { - "aosp": { - "name": "مشروع AOS", - "title": "ANDROID بلا قيود", - "subtitle": "بدون حدود", - "headline": "حرية المصدر المفتوح", - "content": "يمثل مشروع Android مفتوح المصدر (AOSP) جوهر ما كان Android مخصصاً له في الأصل: منصة مفتوحة وشفافة وقابلة للتكيف. يزيل طبقات البرمجيات الاحتكارية والرقابة المؤسسية التي أصبحت مرادفة لتوزيعات Android السائدة. مع AOSP، تحصل على إمكانية الوصول إلى نسخة خام وغير مفلترة من Android، مما يتيح لك جعل جهازك ملكك حقاً.

للمطورين، يقدم AOSP ساحة من الإمكانيات، حيث الحدود الوحيدة هي مهاراتك وخيالك. يعمل كأساس لعدد لا يحصى من الرومات المخصصة، كل منها مصمم لاحتياجات محددة، سواء كان ذلك للأداء المحسن أو الخصوصية أو ميزات فريدة تفتقر إليها الإصدارات السائدة. سيقدر المهتمون بالخصوصية غياب البرامج المثبتة مسبقاً وخدمات التتبع التي تأتي غالباً مع Android المصنعي.

AOSP ليس فقط للمطورين أو عشاق التكنولوجيا؛ إنه لأي شخص يقدر الحرية الرقمية. يتيح لك استعادة السيطرة على جهازك، وتخصيصه وفقاً لاحتياجاتك دون قيود شركات الاتصالات أو الشركات المصنعة. اكتشف كيف يمكن لـ AOSP تحويل تجربتك مع الهاتف المحمول. ابدأ رحلتك نحو مستقبل أكثر انفتاحاً وتخصيصاً اليوم.", - "url_message": "قم بزيارة الرابط أدناه لمعرفة المزيد." - }, - "bitcoin": { - "name": "منشورات ثورة Bitcoin", - "title": "قواعد بدون حكام", - "subtitle": "لا تتجاهل", - "headline": "انضم إلى ثورة BITCOIN", - "content": "ما هو Bitcoin؟ إنه أكثر من مجرد نقود رقمية؛ إنه تقنية ثورية مصممة لحل بعض أكثر مشاكل العالم إلحاحاً. يعمل Bitcoin على شبكة لامركزية، خالية من سيطرة أي حكومة أو سلطة مركزية. هذا يضمن أن لا أحد يمكنه التلاعب بعرضه أو قيمته، مما يجعله شكلاً سليماً من المال يحمي ثروتك من التضخم.

نظامنا المالي الحالي مبني على حوافز معيبة—تشجع الدين والتبعية ومركزية السلطة. Bitcoin يغير ذلك بإنشاء نظام حيث يُكافأ الصدق والشفافية والمسؤولية الفردية. في شبكة Bitcoin، لا مجال للفساد أو التلاعب لأن القواعد تُطبق بالرياضيات، وليس بالأشخاص.

Bitcoin يوائم الحوافز بطريقة تعزز التفكير طويل الأمد والادخار والابتكار. يمكّن الأفراد من السيطرة على مستقبلهم المالي، معززاً مجتمعاً عالمياً حيث يمكن نقل القيمة بحرية وأمان دون وسطاء. لهذا نحتاج Bitcoin—لأنه يخلق عالماً حيث الحوافز متوائمة بشكل صحيح، مما يؤدي إلى مجتمع أكثر عدلاً وازدهاراً للجميع.

اتخذ الخطوة لمعرفة المزيد عن Bitcoin وكيف يمكنه تحويل ليس فقط حياتك المالية، بل العالم. انزع رابطاً من اليسار واستكشف هذه التقنية الرائدة. انضم إلى الحركة نحو مستقبل أفضل.", - "url_message": "اتبع هذا الرابط لمعرفة المزيد." - }, - "jesus": { - "name": "رسالة تغير الحياة", - "title": "أخبار سارة", - "subtitle": "لا تتجاهل", - "headline": "اكتشف الأمل الحقيقي", - "content": "من هو Jesus؟ إنه أكثر من مجرد شخصية تاريخية؛ إنه ابن الله، مخلص العالم. قال Jesus نفسه: 'أنا هو الطريق والحق والحياة. لا يأتي أحد إلى الآب إلا بي' (يوحنا 14:6). جاء ليسد الفجوة بين الله والبشرية، مقدماً لنا طريقاً نحو المغفرة والسلام والحياة الأبدية.

نواجه جميعاً كسراً في حياتنا—سواء في علاقاتنا أو قلوبنا أو عالمنا. جاء Jesus ليشفي ذلك الكسر. عاش حياة كاملة، ومات على الصليب من أجل خطايانا، وقام من الموت، هازماً الموت ومقدماً لنا رجاء الحياة الأبدية مع الله.

بدون Jesus، نحن ضائعون في خطايانا، منفصلون عن الله. لكن من خلاله، يمكننا أن نُغفر ونُستعاد. يقدم لنا ليس فقط حياة أفضل الآن، بل وعد حياة أبدية معه. لهذا نحتاجه—لأنه فقط في Jesus يمكننا أن نجد السلام الحقيقي والهدف وضمان الحياة الأبدية.

اتخذ الخطوة لمعرفة المزيد عن Jesus والتأثير المغير للحياة الذي يمكن أن يحدثه في حياتك. انزع رابطاً من اليسار واستكشف تعاليمه. اعثر على الأمل الذي كنت تبحث عنه.", - "url_message": "اتبع هذا الرابط لمعرفة المزيد." - }, - "meshtastic": { - "name": "منشورات شبكة Meshtastic", - "title": "اتصالات آمنة", - "subtitle": "لا تتجاهل", - "headline": "ابنِ شبكة الطوارئ الخاصة بك", - "content": "لماذا Meshtastic؟ في أوقات الأزمات، يمكن أن تفشل شبكات الاتصال التقليدية، مما يتركنا معزولين وضعفاء. يوفر Meshtastic حلاً قوياً—شبكة اتصالات محلية بديلة تعمل بشكل مستقل عن الأنظمة المركزية. صُمم لحالات الطوارئ، مما يتيح لك البقاء على اتصال عندما يكون الأمر أكثر أهمية.

تنشئ أجهزة Meshtastic شبكة متداخلة يمكنها إعادة توجيه الرسائل عبر مسافات طويلة، حتى بدون تغطية إنترنت أو خلوية. يضمن هذا النهج اللامركزي أن اتصالاتك مرنة وموثوقة، بغض النظر عن الظروف. لكن الأمر لا يتعلق فقط بالبقاء على اتصال—يوفر Meshtastic أيضاً التشفير، لتبقى رسائلك آمنة وخاصة.

في عالم تُنتهك فيه الخصوصية بشكل متزايد، يمكّنك Meshtastic من السيطرة على اتصالاتك. سواء كنت تنسق استجابة مجتمعية محلية، أو تبقى على تواصل مع أحبائك خلال كارثة، أو تستعد ببساطة لما هو غير متوقع، يوفر Meshtastic الأدوات التي تحتاجها للتواصل بأمان وفعالية.

اتخذ الخطوة لمعرفة المزيد عن Meshtastic وكيف يمكنك بناء شبكة اتصالات الطوارئ الخاصة بك. انزع رابطاً من اليسار واستكشف هذه التقنية المبتكرة. تأكد من استعدادك لأي شيء قد يحدث.", - "url_message": "اتبع هذا الرابط لمعرفة المزيد." - }, - "nostr": { - "name": "منشورات بروتوكول Nostr", - "title": "حرية اجتماعية", - "subtitle": "لا تتجاهل", - "headline": "انضم إلى الشبكة المقاومة للرقابة", - "content": "ما هو Nostr؟ على عكس منصات التواصل الاجتماعي التقليدية، فإن Nostr هو بروتوكول—نظام لامركزي يمكّن المستخدمين من الاتصال والمشاركة دون قيود سلطة مركزية. Nostr مقاوم للرقابة، مما يعني أن صوتك لا يمكن إسكاته من قبل الشركات أو الحكومات. صُمم ليمنحك السيطرة على حضورك عبر الإنترنت، بعيداً عن تأثير الخوارزميات أو الإعلانات التي تعطي الأولوية للتفاعل على الروابط الحقيقية.

في Nostr، لا توجد أجندات خفية لإبقائك تتصفح بلا نهاية. تتفاعل مع المحتوى بشروطك، وليس بناءً على ما تعتقد الخوارزمية أنه سيبقيك متصلاً لأطول فترة. يتيح لك Nostr بناء روابط حقيقية والمشاركة في محادثات مهمة، كل ذلك مع الحفاظ على خصوصيتك واستقلاليتك.

في عالم يتم فيه التحكم في الخطاب عبر الإنترنت والتلاعب به بشكل متزايد، يقدم Nostr بديلاً منعشاً. إنه ليس مجرد منصة؛ إنه حركة نحو الحرية الرقمية الحقيقية، حيث تكون تفاعلاتك مدفوعة باهتماماتك وقيمك، وليس بما يولد أكبر إيرادات إعلانية.

اتخذ الخطوة لمعرفة المزيد عن Nostr وكيف يمكنه تحويل طريقة تواصلك عبر الإنترنت. انزع رابطاً من اليسار واستكشف هذا البروتوكول الرائد. انضم إلى مجتمع يقدر الحرية والتفاعل الحقيقي.", - "url_message": "اتبع هذا الرابط لمعرفة المزيد." - }, - "voxvera": { - "name": "منشورات Vox Vera القابلة للطباعة", - "title": "سري للغاية", - "subtitle": "~~لا~~ للنشر", - "headline": "عملية VOX VERA", - "content": "تحرر من الرقابة مع VoxVera. أداة تسويق عصابات مجهولة ونشر رسائل. سواء عبر الإنترنت أو في العالم المادي، يمكنها تمكينك من نشر أفكارك بجرأة، محمية بإخفاء الهوية الكامل (إذا كنت تستضيف عبر Tor). قم بتحميل الكود، وصمم موقع منشور، واستضيفه عبر الإنترنت وقم بتضخيم رسالتك.

استخدم القوة الميمية لمشاركة أفكارك في مدرستك، أو مكان عملك، أو مجتمعاتك عبر الإنترنت، أو حتى على مستوى العالم. تضمن VoxVera تردد صدى رسالتك بعيداً وعلى نطاق واسع، مع أقسام قابلة للنزع تتميز بروابط فريدة وأكواد QR لسهولة إعادة الطباعة.

يمكن الحفاظ على الخصوصية. يمكن مشاركة المنشورات عبر شبكة Tor، مما يحمي المضيف والمستخدمين من الرقابة.

انضم إلينا في ثورة تقدر الحقيقة والشفافية. معاً، يمكننا بناء شبكة من المواطنين المستنيرين الذين لا يخشون التحدث.", - "url_message": "احصل على VoxVera وابدأ بنشر رسالتك." - } - } -} diff --git a/voxvera/locales/ar/docs/usage.md b/voxvera/locales/ar/docs/usage.md deleted file mode 100644 index 4de7d4c..0000000 --- a/voxvera/locales/ar/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# الاستخدام التفصيلي - -يغطي هذا الدليل سير عمل واجهة سطر الأوامر (CLI) الشائعة. راجع `docs/docker.md` للحصول على تعليمات Docker و `docs/templates.md` لقوالب المنشورات المتاحة. - -## المتطلبات الأساسية - -تم تصميم VoxVera ليكون سهل النقل للغاية ويتطلب الحد الأدنى من تبعيات النظام. - -### 1. الملفات الثنائية المستقلة (موصى به) -يمكنك تنزيل ملفات ثنائية مستقلة بدون تبعيات لنظام التشغيل الخاص بك: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -تتضمن هذه الملفات الثنائية كل ما يلزم لتشغيل VoxVera (باستثناء `onionshare-cli`). - -### 2. المثبت بنقرة واحدة -بدلاً من ذلك، قم بالتثبيت عبر البرمجية النصية المؤتمتة الخاصة بنا: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. تثبيت Python اليدوي -إذا كنت تفضل التشغيل من المصدر: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## خطوة بخطوة - -1. **التهيئة:** قم بتشغيل `voxvera init` واتبع المطالبات. سيُطلب منك اختيار لغتك أولاً. -2. **البناء:** قم بإنشاء أصول المنشور. ينشئ كل بناء تلقائياً ملف `voxvera-portable.zip` في مجلد المنشور، مما يسمح للآخرين بتنزيل الأداة الكاملة مباشرة من منشورك. - ```bash - voxvera build - ``` -3. **الخدمة:** انشر المنشور عبر Tor: - ```bash - voxvera serve - ``` - يكتشف هذا تلقائياً نسخة Tor الخاصة بك، ويبدأ OnionShare، ويكتب عنوان .onion الناتج في روابط المنشور القابلة للنزع. - -## دعم اللغة - -VoxVera مترجم بالكامل. يمكنك تغيير تفضيل اللغة الخاص بك بشكل دائم باستخدام المبدل التفاعلي أو اختصار مباشر: - -- **المبدل التفاعلي:** `voxvera lang` -- **اختصار مباشر:** `voxvera --lang ar` (يضبط التفضيل على العربية) - -### اللغات المدعومة: -- **الإنجليزية:** `en` -- **الإسبانية:** `es` (اسم مستعار: `--idioma`) -- **الألمانية:** `de` (اسم مستعار: `--sprache`) -- **العربية:** `ar` - -يمكنك أيضاً فرض لغة معينة لأمر واحد دون تغيير تفضيلك الدائم: -- **الإنجليزية:** `voxvera --lang en check` -- **العربية:** `voxvera --lang ar check` - -تكتشف المنشورات الناتجة تلقائياً لغة متصفح الزائر وتبدل نص واجهة المستخدم وفقاً لذلك. - -## إدارة الخوادم - -إدارة منشورات متعددة وهويات Tor الخاصة بها من قائمة تفاعلية واحدة: - -```bash -voxvera manage -``` - -الميزات: -- **{{t('cli.manage_create_new')}}**: ابدأ تسلسل الإعداد الكامل. -- **{{t('cli.manage_start_all')}}**: تشغيل أو إيقاف جميع المنشورات في أسطولك دفعة واحدة. -- **الحالة في الوقت الفعلي**: عرض روابط .onion النشطة ومؤشرات تقدم تمهيد Tor. -- **التحكم الفردي**: {{t('cli.manage_action_export')}} مواقع معينة إلى ZIP أو حذفها. - -## مراجة شاملة (التوزيع الفيروسي) - -لضمان بقاء VoxVera متاحاً حتى لو تم فرض رقابة على المستودعات المركزية، يعمل كل منشور كمرآة للأداة. - -عندما تستضيف منشوراً، يوفر زر **"{{t('web.download_button')}}"** في الصفحة المقصودة ملف `voxvera-portable.zip` يحتوي على: -- كود المصدر الكامل وجميع اللغات المدعومة. -- جميع تبعيات Python (مضمنة مسبقاً). -- ملفات Tor الثنائية لجميع الأنظمة. - -يتيح ذلك لأي شخص يقوم بمسح منشورك أن يصبح موزعاً جديداً لأداة VoxVera. - -## التصدير والنسخ الاحتياطي - -قم بنسخ هويات Tor الفريدة الخاصة بك احتياطياً (حتى لا يتغير رابط .onion الخاص بك أبداً) أو انقل منشوراتك إلى جهاز آخر. - -- **تصدير موقع واحد**: `voxvera export ` -- **تصدير جميع المواقع**: `voxvera export-all` - -**مكان التخزين:** يتم حفظ جميع الصادرات كملفات ZIP في مجلد يسمى `voxvera-exports` في دليل الصفحة الرئيسية للمستخدم (`~/voxvera-exports/`) على جميع الأنظمة. - -## الاستيراد والاستعادة - -استعد إعدادك بالكامل على جهاز جديد بنقل ملفات ZIP الخاصة بك إلى `~/voxvera-exports/` وتشغيل: - -```bash -voxvera import-multiple -``` - -## النقل والتشغيل بدون إنترنت - -إذا كنت بحاجة إلى تشغيل VoxVera على جهاز لا يتوفر فيه اتصال بالإنترنت، يمكنك "تضمين" التبعيات أولاً: - -```bash -voxvera vendorize -``` - -يقوم هذا بتنزيل جميع مكتبات Python المطلوبة في `voxvera/vendor/`. ستعطي الأداة بعد ذلك الأولوية لهذه الملفات المحلية، مما يسمح لها بالعمل بدون `pip install`. - -## استيراد جماعي (JSON) - -لإنشاء منشورات بشكل جماعي من ملفات تكوين JSON متعددة، ضعها في مجلد `imports/` وشغل: - -```bash -voxvera batch-import -``` - -## كيف تعمل الروابط - -يحتوي كل منشور على رابطين منفصلين: -- **رابط قابل للنزع** (يتم إنشاؤه تلقائياً): عنوان .onion حيث يتم استضافة المنشور. -- **رابط المحتوى** (يتم تكوينه بواسطة المستخدم): URL خارجي يشير إلى موقع ويب أو فيديو أو تنزيل. - -لا تحتاج إلى إدخال عنوان .onion يدوياً؛ يتولى VoxVera ذلك تلقائياً خلال مرحلة `serve`. diff --git a/voxvera/locales/de.json b/voxvera/locales/de.json deleted file mode 100644 index a40c93c..0000000 --- a/voxvera/locales/de.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "meta": { - "language_name": "Deutsch", - "flag": "🇩🇪" - }, - "cli": { - "dep_check_header": "Abhängigkeitsprüfung", - "dep_found": "gefunden", - "dep_missing": "fehlt", - "all_deps_installed": "Alle Abhängigkeiten sind installiert.", - "missing_deps_error": "Einige Abhängigkeiten fehlen. Führen Sie aus: pip install 'voxvera[all]'", - "init_name": "Name", - "init_folder": "Ordnername", - "init_title": "Titel", - "init_subtitle": "Untertitel", - "init_headline": "Schlagzeile", - "init_body": "Haupttext", - "init_links": "Links", - "edit_again": "Erneut bearbeiten?", - "body_length": "Textlänge", - "body_limit_exceeded": "überschreitet das Limit", - "url_label": "URL (Inhaltslink - externe Ressource)", - "url_message_label": "URL-Nachricht", - "footer_message_label": "Fußzeilen-Nachricht", - "template_not_found": "Vorlage {name} nicht gefunden", - "template_copied": "Vorlage nach {dest} kopiert", - "flyer_created": "Flyer-Dateien erstellt unter {dest}", - "dir_not_found": "Verzeichnis {dir_path} nicht gefunden", - "onionshare_error": "OnionShare für {folder_name} wurde unerwartet beendet.", - "onionshare_causes": "Häufige Ursachen: Netzwerk blockiert, ungenaue Systemzeit oder OnionShare läuft bereits.", - "onionshare_logs_tip": "Vollständige Protokolle finden Sie unter {logfile}.", - "onion_url_msg": "[{folder_name}] Onion-URL: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare läuft (PID {pid}).", - "export_not_found": "Fehler: Website-Ordner '{folder_name}' nicht gefunden in {host_root}", - "export_success": "'{folder_name}' nach {output_path} exportiert", - "export_all_none": "Keine Websites zum Exportieren gefunden.", - "export_all_starting": "Exportiere {count} Websites nach {dir}...", - "export_all_complete": "Gesamtexport abgeschlossen.", - "import_zip_not_found": "Fehler: Zip-Datei '{path}' nicht gefunden.", - "import_invalid_config": "Fehler: Ungültige Exportdatei. 'config.json' fehlt.", - "import_invalid_folder": "Fehler: Ungültige 'config.json'. 'folder_name' fehlt.", - "import_overwrite_confirm": "Website '{folder_name}' existiert bereits. Überschreiben?", - "import_cancelled": "Import abgebrochen.", - "import_success": "'{folder_name}' erfolgreich nach {dest_dir} importiert", - "import_dir_not_found": "Fehler: Verzeichnis '{dir}' nicht gefunden.", - "import_multiple_none": "Keine Zip-Dateien in {dir} gefunden", - "import_multiple_found": "{count} Website(s) zum Importieren aus {dir} gefunden...", - "importing_file": "Importiere {name}...", - "import_multiple_complete": "Mehrfachimport abgeschlossen.", - "batch_import_none": "Keine JSON-Dateien in 'imports' gefunden", - "batch_import_processing": "Verarbeite {file}", - "stop_server_not_running": "Server {folder_name} läuft nicht.", - "stop_server_success": "{folder_name} gestoppt (PID {pid})", - "delete_server_success": "Server {folder_name} gelöscht", - "manage_select_server": "Wählen Sie einen Server zum Verwalten (oder Beenden):", - "manage_create_new": "--- Neue Website/Flyer erstellen ---", - "manage_start_all": "--- Alle Websites starten ---", - "manage_stop_all": "--- Alle Websites stoppen ---", - "manage_export_all": "--- Alle Websites exportieren ---", - "manage_import_multiple": "--- Mehrere Websites importieren ---", - "manage_exit": "Beenden", - "manage_startup_summary": "Start-Zusammenfassung", - "manage_press_enter": "Drücken Sie die Eingabetaste zum Fortfahren", - "manage_action_menu": "{name} verwalten:", - "manage_action_toggle_stop": "Stopp", - "manage_action_toggle_start": "Start", - "manage_action_export": "Als Zip exportieren", - "manage_action_delete": "Löschen", - "manage_action_back": "Zurück", - "manage_delete_confirm": "Sind Sie sicher, dass Sie {name} löschen möchten?", - "bootstrapping_msg": "[{name}] Verbindung zu Tor-Relays herstellen und Hidden Service einrichten...", - "bootstrapping_progress": "[{name}] Tor-Bootstrapping: {progress}% ...", - "no_urls_qr_skip": "Noch keine URLs konfiguriert. QR-Codes werden nach 'voxvera serve' generiert", - "input_file_not_found": "Eingabedatei {path} existiert nicht.", - "attachment_path_label": "Pfad zur Anhangsdatei (optional - wird über die Tor-Seite bereitgestellt)", - "manage_action_edit": "Bearbeiten", - "manage_templates": "--- Aus Vorlage erstellen ---", - "template_select": "Wählen Sie eine Vorlage:", - "body_over_limit_warning": "Warnung: Der Textkörper überschreitet 1000 Zeichen. Er könnte auf dem Flyer abgeschnitten werden.", - "manage_action_export_keys": "Schlüssel exportieren", - "manage_action_import_keys": "Schlüssel importieren", - "keys_not_found": "Kein Sitzungsschlüssel für '{name}' gefunden. Starten Sie die Seite zuerst, um Schlüssel zu generieren.", - "keys_export_header": "Sitzungsschlüssel für '{name}':", - "keys_export_hint": "Kopieren Sie diesen Schlüssel und bewahren Sie ihn sicher auf. Verwenden Sie 'Schlüssel importieren' auf einer anderen Instanz zur Wiederherstellung.", - "keys_site_not_found": "Seite '{name}' nicht gefunden.", - "keys_overwrite_confirm": "Seite '{name}' hat bereits einen Schlüssel. Überschreiben?", - "keys_import_cancelled": "Import abgebrochen.", - "keys_import_prompt": "Fügen Sie den base64-Sitzungsschlüssel unten ein:", - "keys_import_empty": "Kein Schlüssel angegeben.", - "keys_import_invalid": "Ungültiges Schlüsselformat. Muss eine gültige base64-Zeichenkette sein.", - "keys_import_success": "Sitzungsschlüssel für '{name}' importiert. Starten Sie die Seite neu, um den neuen Schlüssel zu verwenden." - }, - "web": { - "tear_off_tor_browser": "Tor-Browser verwenden", - "tear_off_desc": "um diese Nachricht zu verbreiten, gehen Sie zu", - "tear_off_footer": "Klicken Sie auf die Schaltfläche unten zum Drucken", - "built_with": "erstellt mit", - "print_button": "Flyer drucken", - "download_button": "Tool & Quellcode herunterladen", - "download_attachment": "Anhang herunterladen" - }, - "landing": { - "title": "STRENG GEHEIM", - "subtitle": "~~NICHT~~ VERBREITEN", - "headline": "OPERATION VOX VERA", - "content": "Befreien Sie sich von Zensur mit VoxVera. Ein anonymes Guerilla-Marketing- und Nachrichtenverbreitungs-Tool. Ob online oder in der physischen Welt, es befähigt Sie, Ihre Ideen mutig zu verbreiten, geschützt durch vollständige Anonymität (wenn Sie über Tor hosten). Laden Sie den Code herunter, entwerfen Sie eine Flyer-Website, hosten Sie diese online und verstärken Sie Ihre Botschaft.

Nutzen Sie memetische Kraft, um Ihre Ideen in Ihrer Schule, an Ihrem Arbeitsplatz, in Online-Communities oder sogar weltweit zu teilen. VoxVera stellt sicher, dass Ihre Botschaft weit und breit Resonanz findet, mit Abreißabschnitten, die über einzigartige URLs und QR-Codes für einen einfachen Nachdruck verfügen.

Privatsphäre kann gewahrt bleiben. Flyer können über das Tor-Network geteilt werden, was Hoster und Nutzer vor Zensur schützt.

Schließen Sie sich uns in einer Revolution an, die Wahrheit und Transparenz schätzt. Gemeinsam können wir ein Netzwerk informierter Bürger aufbauen, die keine Angst haben, ihre Meinung zu sagen.", - "url_message": "Holen Sie sich VoxVera und beginnen Sie, Ihre Nachricht zu verbreiten.", - "name": "Vox Vera Druckflyer" - }, - "templates": { - "aosp": { - "name": "AOS-Projekt", - "title": "ANDROID ENTFESSELT", - "subtitle": "OHNE GRENZEN", - "headline": "OPEN-SOURCE-FREIHEIT", - "content": "Das Android Open Source Project (AOSP) verkörpert das, wofür Android ursprünglich gedacht war: eine offene, transparente und anpassungsfähige Plattform. Es entfernt die Schichten proprietärer Software und unternehmerischer Kontrolle, die zum Synonym für gängige Android-Distributionen geworden sind. Mit AOSP erhalten Sie Zugang zu einer rohen, ungefilterten Version von Android, die es Ihnen ermöglicht, Ihr Gerät wirklich zu Ihrem eigenen zu machen.

Für Entwickler bietet AOSP einen Spielplatz der Möglichkeiten, wo die einzigen Grenzen Ihre Fähigkeiten und Vorstellungskraft sind. Es dient als Grundlage für unzählige Custom ROMs, die jeweils auf spezifische Bedürfnisse zugeschnitten sind, sei es für verbesserte Leistung, Privatsphäre oder einzigartige Funktionen, die Mainstream-Versionen fehlen. Datenschutz-Enthusiasten werden das Fehlen vorinstallierter Bloatware und Tracking-Dienste schätzen, die oft mit Standard-Android geliefert werden.

AOSP ist nicht nur für Entwickler oder Technik-Enthusiasten; es ist für jeden, der digitale Freiheit schätzt. Es ermöglicht Ihnen, die Kontrolle über Ihr Gerät zurückzugewinnen und es ohne die Einschränkungen von Anbietern oder Herstellern an Ihre Bedürfnisse anzupassen. Entdecken Sie, wie AOSP Ihre mobile Erfahrung transformieren kann. Beginnen Sie noch heute Ihre Reise in eine offenere, anpassbare Zukunft.", - "url_message": "Besuchen Sie den untenstehenden Link, um mehr zu erfahren." - }, - "bitcoin": { - "name": "Bitcoin-Revolutions-Flyer", - "title": "REGELN OHNE HERRSCHER", - "subtitle": "NICHT IGNORIEREN", - "headline": "SCHLIESSEN SIE SICH DER BITCOIN-REVOLUTION AN", - "content": "Was ist Bitcoin? Es ist mehr als nur digitales Geld; es ist eine revolutionäre Technologie, die entwickelt wurde, um einige der drängendsten Probleme der Welt zu lösen. Bitcoin operiert auf einem dezentralen Netzwerk, frei von der Kontrolle jeder Regierung oder Zentralbehörde. Dies stellt sicher, dass niemand sein Angebot oder seinen Wert manipulieren kann, was es zu einer soliden Geldform macht, die Ihr Vermögen vor Inflation schützt.

Unser aktuelles Finanzsystem basiert auf fehlerhaften Anreizen—es fördert Verschuldung, Abhängigkeit und Zentralisierung der Macht. Bitcoin ändert das, indem es ein System schafft, in dem Ehrlichkeit, Transparenz und individuelle Verantwortung belohnt werden. Im Bitcoin-Netzwerk gibt es keinen Raum für Korruption oder Manipulation, weil die Regeln von Mathematik durchgesetzt werden, nicht von Menschen.

Bitcoin richtet Anreize so aus, dass langfristiges Denken, Sparen und Innovation gefördert werden. Es befähigt Einzelpersonen, die Kontrolle über ihre finanzielle Zukunft zu übernehmen, und fördert eine globale Gemeinschaft, in der Werte frei und sicher ohne Vermittler übertragen werden können. Deshalb brauchen wir Bitcoin—weil es eine Welt schafft, in der Anreize richtig ausgerichtet sind und zu einer gerechteren und wohlhabenderen Gesellschaft für alle führen.

Machen Sie den Schritt, mehr über Bitcoin zu erfahren und wie es nicht nur Ihr finanzielles Leben, sondern die Welt verändern kann. Reißen Sie einen Link links ab und erkunden Sie diese bahnbrechende Technologie. Schließen Sie sich der Bewegung für eine bessere Zukunft an.", - "url_message": "Folgen Sie diesem Link, um mehr zu erfahren." - }, - "jesus": { - "name": "Lebensverändernde Botschaft", - "title": "GUTE NACHRICHT", - "subtitle": "NICHT IGNORIEREN", - "headline": "ENTDECKE WAHRE HOFFNUNG", - "content": "Wer ist Jesus? Er ist mehr als nur eine historische Figur; Er ist der Sohn Gottes, der Retter der Welt. Jesus selbst sagte: 'Ich bin der Weg und die Wahrheit und das Leben. Niemand kommt zum Vater außer durch mich' (Johannes 14,6). Er kam, um die Kluft zwischen Gott und der Menschheit zu überbrücken und uns einen Weg zur Vergebung, zum Frieden und zum ewigen Leben zu bieten.

Wir alle stehen vor Brüchen in unserem Leben—sei es in unseren Beziehungen, unseren Herzen oder unserer Welt. Jesus kam, um diese Brüche zu heilen. Er lebte ein vollkommenes Leben, starb am Kreuz für unsere Sünden und ist auferstanden, hat den Tod besiegt und uns die Hoffnung auf ewiges Leben mit Gott geschenkt.

Ohne Jesus sind wir in unserer Sünde verloren, von Gott getrennt. Aber durch Ihn können wir vergeben und wiederhergestellt werden. Er bietet uns nicht nur ein besseres Leben jetzt, sondern das Versprechen eines ewigen Lebens mit Ihm. Deshalb brauchen wir Ihn—denn nur in Jesus können wir wahren Frieden, Sinn und die Gewissheit des ewigen Lebens finden.

Machen Sie den Schritt, mehr über Jesus und den lebensverändernden Einfluss zu erfahren, den Er auf Ihr Leben haben kann. Reißen Sie einen Link links ab und erkunden Sie Seine Lehren. Finden Sie die Hoffnung, nach der Sie gesucht haben.", - "url_message": "Folgen Sie diesem Link, um mehr zu erfahren." - }, - "meshtastic": { - "name": "Meshtastic-Netzwerk-Flyer", - "title": "SICHERE KOMMUNIKATION", - "subtitle": "NICHT IGNORIEREN", - "headline": "BAUEN SIE IHR NOTFALLNETZWERK AUF", - "content": "Warum Meshtastic? In Krisenzeiten können traditionelle Kommunikationsnetzwerke versagen und uns isoliert und verwundbar zurücklassen. Meshtastic bietet eine leistungsstarke Lösung—ein alternatives lokales Kommunikationsnetzwerk, das unabhängig von zentralisierten Systemen arbeitet. Es ist für Notfallsituationen konzipiert und ermöglicht es Ihnen, verbunden zu bleiben, wenn es am wichtigsten ist.

Meshtastic-Geräte erstellen ein Mesh-Netzwerk, das Nachrichten über große Entfernungen weiterleiten kann, auch ohne Internet- oder Mobilfunkabdeckung. Dieser dezentrale Ansatz stellt sicher, dass Ihre Kommunikation unter allen Umständen belastbar und zuverlässig ist. Aber es geht nicht nur darum, verbunden zu bleiben—Meshtastic bietet auch Verschlüsselung, sodass Ihre Nachrichten sicher und privat bleiben.

In einer Welt, in der die Privatsphäre zunehmend gefährdet ist, ermöglicht Ihnen Meshtastic, die Kontrolle über Ihre Kommunikation zu übernehmen. Ob Sie eine lokale Gemeinschaftsreaktion koordinieren, während einer Katastrophe mit Ihren Lieben in Kontakt bleiben oder sich einfach auf das Unerwartete vorbereiten—Meshtastic bietet die Werkzeuge, die Sie für eine sichere und effektive Kommunikation benötigen.

Machen Sie den Schritt, mehr über Meshtastic zu erfahren und wie Sie Ihr eigenes Notfall-Kommunikationsnetzwerk aufbauen können. Reißen Sie einen Link links ab und erkunden Sie diese innovative Technologie. Stellen Sie sicher, dass Sie auf alles vorbereitet sind.", - "url_message": "Folgen Sie diesem Link, um mehr zu erfahren." - }, - "nostr": { - "name": "Nostr-Protokoll-Flyer", - "title": "SOZIALE FREIHEIT", - "subtitle": "NICHT IGNORIEREN", - "headline": "TRETEN SIE DEM ZENSURRESISTENTEN NETZWERK BEI", - "content": "Was ist Nostr? Anders als herkömmliche Social-Media-Plattformen ist Nostr ein Protokoll—ein dezentrales System, das Benutzern ermöglicht, sich zu verbinden und zu teilen, ohne die Einschränkungen einer zentralen Autorität. Nostr ist zensurresistent, was bedeutet, dass Ihre Stimme nicht von Unternehmen oder Regierungen zum Schweigen gebracht werden kann. Es wurde entwickelt, um Ihnen die Kontrolle über Ihre Online-Präsenz zu geben, frei vom Einfluss von Algorithmen oder Werbung, die Engagement über bedeutsame Verbindungen stellen.

Auf Nostr gibt es keine verborgenen Agenden, die Sie zum endlosen Scrollen verleiten. Sie interagieren mit Inhalten zu Ihren Bedingungen, nicht basierend auf dem, was ein Algorithmus glaubt, Sie am längsten online zu halten. Nostr ermöglicht es Ihnen, echte Verbindungen aufzubauen und an Gesprächen teilzunehmen, die wichtig sind, und dabei Ihre Privatsphäre und Autonomie zu wahren.

In einer Welt, in der die Online-Meinungsfreiheit zunehmend kontrolliert und manipuliert wird, bietet Nostr eine erfrischende Alternative. Es ist nicht nur eine Plattform; es ist eine Bewegung hin zu wahrer digitaler Freiheit, bei der Ihre Interaktionen von Ihren Interessen und Werten bestimmt werden, nicht von dem, was die meisten Werbeeinnahmen generiert.

Machen Sie den Schritt, mehr über Nostr zu erfahren und wie es die Art und Weise, wie Sie sich online verbinden, verändern kann. Reißen Sie einen Link links ab und erkunden Sie dieses bahnbrechende Protokoll. Schließen Sie sich einer Gemeinschaft an, die Freiheit und authentische Interaktion schätzt.", - "url_message": "Folgen Sie diesem Link, um mehr zu erfahren." - }, - "voxvera": { - "name": "Vox Vera Druckflyer", - "title": "STRENG GEHEIM", - "subtitle": "~~NICHT~~ VERBREITEN", - "headline": "OPERATION VOX VERA", - "content": "Befreien Sie sich von Zensur mit VoxVera. Ein anonymes Guerilla-Marketing- und Nachrichtenverbreitungs-Tool. Ob online oder in der physischen Welt, es befähigt Sie, Ihre Ideen mutig zu verbreiten, geschützt durch vollständige Anonymität (wenn Sie über Tor hosten). Laden Sie den Code herunter, entwerfen Sie eine Flyer-Website, hosten Sie diese online und verstärken Sie Ihre Botschaft.

Nutzen Sie memetische Kraft, um Ihre Ideen in Ihrer Schule, an Ihrem Arbeitsplatz, in Online-Communities oder sogar weltweit zu teilen. VoxVera stellt sicher, dass Ihre Botschaft weit und breit Resonanz findet, mit Abreißabschnitten, die über einzigartige URLs und QR-Codes für einen einfachen Nachdruck verfügen.

Privatsphäre kann gewahrt bleiben. Flyer können über das Tor-Netzwerk geteilt werden, was Hoster und Nutzer vor Zensur schützt.

Schließen Sie sich uns in einer Revolution an, die Wahrheit und Transparenz schätzt. Gemeinsam können wir ein Netzwerk informierter Bürger aufbauen, die keine Angst haben, ihre Meinung zu sagen.", - "url_message": "Holen Sie sich VoxVera und beginnen Sie, Ihre Nachricht zu verbreiten." - } - } -} diff --git a/voxvera/locales/de/docs/usage.md b/voxvera/locales/de/docs/usage.md deleted file mode 100644 index 746fe1f..0000000 --- a/voxvera/locales/de/docs/usage.md +++ /dev/null @@ -1,136 +0,0 @@ -# Detaillierte Verwendung - -Diese Anleitung deckt gängige CLI-Workflows ab. Informationen zu Docker finden Sie unter `docs/docker.md` und verfügbare Flyer-Vorlagen unter `docs/templates.md`. - -## Voraussetzungen - -VoxVera ist auf hohe Portabilität ausgelegt und erfordert minimale Systemabhängigkeiten. - -### 1. Eigenständige Binärdateien (Empfohlen) -Sie können eigenständige Binärdateien ohne Abhängigkeiten für Ihr Betriebssystem herunterladen: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Diese Binärdateien enthalten alles, was zum Ausführen von VoxVera erforderlich ist (außer `onionshare-cli`). - -### 2. Ein-Zeilen-Installer -Alternativ können Sie die Installation über unser automatisiertes Skript vornehmen: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Manuelle Python-Installation -Wenn Sie lieber aus dem Quellcode ausführen möchten: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Schritt für Schritt - -1. **Initialisieren:** Führen Sie `voxvera init` aus und folgen Sie den Anweisungen. Sie werden zuerst aufgefordert, Ihre Sprache auszuwählen. -2. **Bauen:** Erstellen Sie die Flyer-Assets. Jeder Build erstellt automatisch eine `voxvera-portable.zip` im Flyer-Ordner, sodass andere das komplette Tool direkt von Ihrem Flyer herunterladen können. - ```bash - voxvera build - ``` -3. **Bereitstellen:** Veröffentlichen Sie den Flyer über Tor: - ```bash - voxvera serve - ``` - Dies erkennt automatisch Ihre Tor-Instanz, startet OnionShare und schreibt die generierte .onion-Adresse in die Abreiß-Links des Flyers. - -## Sprachunterstützung - -VoxVera ist vollständig lokalisiert. Sie können Ihre Sprachpräferenz dauerhaft über den interaktiven Selektor oder eine direkte Verknüpfung ändern: - -- **Interaktiver Selektor:** `voxvera lang` -- **Direkte Verknüpfung:** `voxvera --lang de` (setzt die Präferenz auf Deutsch) - -### Unterstützte Sprachen: -- **Englisch:** `en` -- **Spanisch:** `es` (Alias: `--idioma`) -- **Deutsch:** `de` (Alias: `--sprache`) -- **Russisch:** `ru` -- **Hebräisch:** `he` -- **Arabisch:** `ar` -- **Französisch:** `fr` -- **Japanisch:** `ja` -- **Hindi:** `hi` -- **Suaheli:** `sw` - -Sie können auch eine bestimmte Sprache für einen einzelnen Befehl erzwingen, ohne Ihre dauerhafte Präferenz zu ändern: -- **Englisch:** `voxvera --lang en check` -- **Deutsch:** `voxvera --sprache de check` - -Die generierten Flyer erkennen automatisch die Browsersprache des Besuchers und schalten den UI-Text entsprechend um. - -## Server-Verwaltung - -Verwalten Sie mehrere Flyer und deren Tor-Identitäten über ein einziges interaktives Menü: - -```bash -voxvera manage -``` - -Funktionen: -- **{{t('cli.manage_create_new')}}**: Starten Sie die vollständige Setup-Sequenz. -- **{{t('cli.manage_start_all')}}**: Starten oder stoppen Sie alle Flyer in Ihrer Flotte auf einmal. -- **Echtzeit-Status**: Zeigen Sie aktive .onion-URLs und Tor-Bootstrapping-Fortschrittsanzeigen an. -- **Individuelle Steuerung**: {{t('cli.manage_action_export')}} Sie bestimmte Seiten in eine ZIP-Datei oder löschen Sie sie. - -## Universelle Spiegelung (Virale Verteilung) - -Um sicherzustellen, dass VoxVera auch dann zugänglich bleibt, wenn zentrale Repositories zensiert werden, fungiert jeder Flyer als Spiegel für das Tool. - -Wenn Sie einen Flyer hosten, bietet die Schaltfläche **"{{t('web.download_button')}}"** auf der Landingpage eine `voxvera-portable.zip` an, die Folgendes enthält: -- Den vollständigen Quellcode und alle unterstützten Sprachen. -- Alle Python-Abhängigkeiten (vorinstalliert). -- Plattformübergreifende Tor-Binärdateien. - -Dies ermöglicht es jedem, der Ihren Flyer scannt, ein neuer Distributor des VoxVera-Tools zu werden. - -## Export & Sicherung - -Sichern Sie Ihre eindeutigen Tor-Identitäten (damit sich Ihre .onion-URL nie ändert) oder verschieben Sie Ihre Flyer auf einen anderen Computer. - -- **Einzelne Seite exportieren:** `voxvera export ` -- **Alle Seiten exportieren:** `voxvera export-all` - -**Speicherort:** Alle Exporte werden als ZIP-Dateien in einem Ordner namens `voxvera-exports` im Home-Verzeichnis des Benutzers (`~/voxvera-exports/`) auf allen Plattformen gespeichert. - -## Import & Wiederherstellung - -Stellen Sie Ihr gesamtes Setup auf einem neuen Computer wieder her, indem Sie Ihre ZIP-Dateien nach `~/voxvera-exports/` verschieben und Folgendes ausführen: - -```bash -voxvera import-multiple -``` - -## Portabilität & Offline-Nutzung - -Wenn Sie VoxVera auf einem Computer ohne Internetzugang ausführen müssen, können Sie die Abhängigkeiten zuerst lokal bereitstellen: - -```bash -voxvera vendorize -``` - -Dies lädt alle erforderlichen Python-Bibliotheken in `voxvera/vendor/` herunter. Das Tool priorisiert dann diese lokalen Dateien, sodass es ohne `pip install` ausgeführt werden kann. - -## Batch-Import (JSON) - -Um Flyer in großen Mengen aus mehreren JSON-Konfigurationsdateien zu generieren, legen Sie diese im Verzeichnis `imports/` ab und führen Sie Folgendes aus: - -```bash -voxvera batch-import -``` - -## Wie URLs funktionieren - -Jeder Flyer hat zwei separate URLs: -- **Abreiß-Link** (automatisch generiert): Die .onion-Adresse, unter der der Flyer gehostet wird. -- **Inhalts-Link** (vom Benutzer konfiguriert): Eine externe URL, die auf eine Website, ein Video oder einen Download verweist. - -Sie müssen die .onion-Adresse nicht manuell eingeben; VoxVera erledigt dies automatisch während der `serve`-Phase. diff --git a/voxvera/locales/en.json b/voxvera/locales/en.json deleted file mode 100644 index 3a281d1..0000000 --- a/voxvera/locales/en.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "meta": { - "language_name": "English", - "flag": "🇺🇸" - }, - "cli": { - "dep_check_header": "Dependency Check", - "dep_found": "found", - "dep_missing": "missing", - "all_deps_installed": "All dependencies are installed.", - "missing_deps_error": "Some dependencies are missing. Run: pip install 'voxvera[all]'", - "init_name": "Name", - "init_folder": "Folder Name", - "init_title": "Title", - "init_subtitle": "Subtitle", - "init_headline": "Headline", - "init_body": "Body text", - "init_links": "Links", - "edit_again": "Edit again?", - "body_length": "Body length", - "body_limit_exceeded": "exceeds limit", - "url_label": "URL (content link - external resource)", - "url_message_label": "URL message", - "footer_message_label": "Footer message", - "attachment_path_label": "Attachment file path (optional - will be served from Tor site)", - "template_not_found": "Template {name} not found", - "template_copied": "Template copied to {dest}", - "flyer_created": "Flyer files created under {dest}", - "dir_not_found": "Directory {dir_path} not found", - "onionshare_error": "OnionShare for {folder_name} exited unexpectedly.", - "onionshare_causes": "Common causes: Network blocked, inaccurate system clock, or OnionShare already running.", - "onionshare_logs_tip": "See {logfile} for full logs.", - "onion_url_msg": "[{folder_name}] Onion URL: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare running (PID {pid}).", - "export_not_found": "Error: Site folder '{folder_name}' not found in {host_root}", - "export_success": "Exported '{folder_name}' to {output_path}", - "export_all_none": "No sites found to export.", - "export_all_starting": "Exporting {count} sites to {dir}...", - "export_all_complete": "Export all complete.", - "import_zip_not_found": "Error: Zip file '{path}' not found.", - "import_invalid_config": "Error: Invalid export file. Missing 'config.json'.", - "import_invalid_folder": "Error: Invalid config.json. Missing 'folder_name'.", - "import_overwrite_confirm": "Site '{folder_name}' already exists. Overwrite?", - "import_cancelled": "Import cancelled.", - "import_success": "Successfully imported '{folder_name}' to {dest_dir}", - "import_dir_not_found": "Error: Directory '{dir}' not found.", - "import_multiple_none": "No zip files found in {dir}", - "import_multiple_found": "Found {count} site(s) to import from {dir}...", - "importing_file": "Importing {name}...", - "import_multiple_complete": "Import multiple complete.", - "batch_import_none": "No JSON files found in imports", - "batch_import_processing": "Processing {file}", - "stop_server_not_running": "Server {folder_name} is not running.", - "stop_server_success": "Stopped {folder_name} (PID {pid})", - "delete_server_success": "Deleted server {folder_name}", - "manage_select_server": "Select a server to manage (or Exit):", - "manage_create_new": "--- Create New Site/Flyer ---", - "manage_start_all": "--- Start All Sites ---", - "manage_stop_all": "--- Stop All Sites ---", - "manage_export_all": "--- Export All Sites ---", - "manage_import_multiple": "--- Import Multiple Sites ---", - "manage_exit": "Exit", - "manage_startup_summary": "Startup Summary", - "manage_press_enter": "Press Enter to continue", - "manage_action_menu": "Manage {name}:", - "manage_action_toggle_stop": "Stop", - "manage_action_toggle_start": "Start", - "manage_action_edit": "Edit", - "manage_action_export": "Export to Zip", - "manage_action_delete": "Delete", - "manage_action_back": "Back", - "manage_delete_confirm": "Are you sure you want to delete {name}?", - "bootstrapping_msg": "[{name}] Connecting to Tor relays and setting up hidden service...", - "bootstrapping_progress": "[{name}] Tor Bootstrapping: {progress}% ...", - "no_urls_qr_skip": "No URLs configured yet. QR codes will be generated after 'voxvera serve'", - "input_file_not_found": "Input file {path} does not exist.", - "manage_templates": "--- Create From Template ---", - "template_select": "Select a template:", - "body_over_limit_warning": "Warning: Body text exceeds 1000 characters. It may be cut off on the flyer.", - "manage_action_export_keys": "Export Keys", - "manage_action_import_keys": "Import Keys", - "keys_not_found": "No session key found for '{name}'. Start the site first to generate keys.", - "keys_export_header": "Session key for '{name}':", - "keys_export_hint": "Copy this key and save it securely. Use 'Import Keys' on another instance to restore.", - "keys_site_not_found": "Site '{name}' not found.", - "keys_overwrite_confirm": "Site '{name}' already has a key. Overwrite?", - "keys_import_cancelled": "Import cancelled.", - "keys_import_prompt": "Paste the base64 session key below:", - "keys_import_empty": "No key provided.", - "keys_import_invalid": "Invalid key format. Must be a valid base64 string.", - "keys_import_success": "Session key imported for '{name}'. Restart the site to use the new key." - }, - "web": { - "tear_off_tor_browser": "Use Tor Browser", - "tear_off_desc": "to help spread this message go to", - "tear_off_footer": "click the button below to print", - "built_with": "built with", - "print_button": "Print this page", - "download_button": "Download Source Code", - "download_attachment": "Download Attachment" - }, - "landing": { - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.", - "url_message": "Get VoxVera and start spreading your message.", - "name": "Vox Vera Printable Flyers" - }, - "templates": { - "aosp": { - "name": "AOS Project", - "title": "ANDROID UNLEASHED", - "subtitle": "WITHOUT BOUNDARIES", - "headline": "OPEN-SOURCE FREEDOM", - "content": "The Android Open Source Project (AOSP) represents the essence of what Android was originally intended to be: an open, transparent, and adaptable platform. It strips away the layers of proprietary software and corporate oversight that have become synonymous with mainstream Android distributions. With AOSP, you gain access to a raw, unfiltered version of Android, allowing you to truly make your device your own.

For developers, AOSP offers a playground of possibilities, where the only limits are your skills and imagination. It serves as the foundation for countless custom ROMs, each tailored to specific needs, whether for enhanced performance, privacy, or unique features that mainstream versions lack. Privacy enthusiasts will appreciate the absence of pre-installed bloatware and tracking services that often come wit stock Android, providing a cleaner, more secure user experience.

AOSP isn't just for developers or tech enthusiasts; it's for anyone who values digital freedom. It allows you to reclaim control over your device, tailoring it to your needs without the restrictions of carriers or manufacturers. Discover how AOSP can transform your mobile experience. Start your journey towards a more open, customizable future today.", - "url_message": "Visit the link below to learn more." - }, - "bitcoin": { - "name": "Bitcoin Revolution Flyers", - "title": "RULES WITHOUT RULERS", - "subtitle": "DO NOT IGNORE", - "headline": "JOIN THE BITCOIN REVOLUTION", - "content": "What is Bitcoin? It's more than just digital money; it's a revolutionary technology designed to fix some of the world's most pressing problems. Bitcoin operates on a decentralized network, free from the control of any government or central authority. This ensures that no one can manipulate its supply or value, making it a sound form of money that protects your wealth from inflation.

Our current financial system is built on flawed incentives—encouraging debt, dependency, and centralization of power. Bitcoin changes that by creating a system where honesty, transparency, and individual responsibility are rewarded. In the Bitcoin network, there is no room for corruption or manipulation because the rules are enforced by mathematics, not by people.

Bitcoin aligns incentives in a way that promotes long-term thinking, savings, and innovation. It empowers individuals to take control of their financial future, fostering a global community where value can be transferred freely and securely without intermediaries. This is why we need Bitcoin—because it creates a world where incentives are properly aligned, leading to a more fair and prosperous society for all.

Take the step to learn more about Bitcoin and how it can transform not just your financial life, but the world. Tear off a link to the left and explore this groundbreaking technology. Join the movement towards a better future.", - "url_message": "Follow this link to learn more." - }, - "jesus": { - "name": "Life Changing Message", - "title": "GOOD NEWS", - "subtitle": "DO NOT IGNORE", - "headline": "DISCOVER TRUE HOPE", - "content": "Who is Jesus? He is more than just a historical figure; He is the Son of God, the Savior of the world. Jesus Himself said, 'I am the way, the truth, and the life. No one comes to the Father except through Me' (John 14:6). He came to bridge the gap between God and humanity, offering us a path to forgiveness, peace, and eternal life.

We all face brokenness in our lives—whether it's in our relationships, our hearts, or our world. Jesus came to heal that brokenness. He lived a perfect life, died on the cross for our sins, and rose again, defeating death and offering us the hope of eternal life with God.

Without Jesus, we are lost in our sin, separated from God. But through Him, we can be forgiven and restored. He offers us not just a better life now, but the promise of an eternal life with Him. This is why we need Him—because only in Jesus can we find true peace, purpose, and the assurance of eternal life.

Take the step to learn more about Jesus and the life-changing impact He can have on your life. Tear off a link to the left and explore His teachings. Find the hope you've been searching for.", - "url_message": "Follow this link to learn more." - }, - "meshtastic": { - "name": "Meshtastic Network Flyers", - "title": "SECURE COMMUNICATIONS", - "subtitle": "DO NOT IGNORE", - "headline": "BUILD YOUR EMERGENCY NETWORK", - "content": "Why Meshtastic? In times of crisis, traditional communication networks can fail, leaving us isolated and vulnerable. Meshtastic provides a powerful solution—an alternative local communication network that operates independently of centralized systems. It’s designed for emergency situations, allowing you to stay connected when it matters most.

Meshtastic devices create a mesh network that can relay messages over long distances, even without internet or cellular coverage. This decentralized approach ensures that your communications are resilient and reliable, no matter the circumstances. But it’s not just about staying connected—Meshtastic also offers encryption, so your messages remain secure and private.

In a world where privacy is increasingly compromised, Meshtastic empowers you to take control of your communication. Whether you’re coordinating a local community response, staying in touch with loved ones during a disaster, or simply preparing for the unexpected, Meshtastic provides the tools you need to communicate securely and effectively.

Take the step to learn more about Meshtastic and how you can build your own emergency communication network. Tear off a link to the left and explore this innovative technology. Ensure you’re prepared for whatever comes your way.", - "url_message": "Follow this link to learn more." - }, - "nostr": { - "name": "Nostr Protocol Flyers", - "title": "SOCIAL FREEDOM", - "subtitle": "DO NOT IGNORE", - "headline": "JOIN THE CENSORSHIP-RESISTANT NETWORK", - "content": "What is Nostr? Unlike traditional social media platforms, Nostr is a protocol—a decentralized system that empowers users to connect and share without the constraints of a central authority. Nostr is censorship-resistant, meaning your voice can’t be silenced by corporations or governments. It’s designed to give you control over your online presence, free from the influence of algorithms or ads that prioritize engagement over meaningful connections.

On Nostr, there are no hidden agendas to keep you doomscrolling. You engage with content on your terms, not based on what an algorithm thinks will keep you online the longest. Nostr allows you to build genuine connections and participate in conversations that matter, all while maintaining your privacy and autonomy.

In a world where online speech is increasingly controlled and manipulated, Nostr offers a refreshing alternative. It’s not just a platform; it’s a movement towards true digital freedom, where your interactions are driven by your interests and values, not by what generates the most ad revenue.

Take the step to learn more about Nostr and how it can transform the way you connect online. Tear off a link the left and explore this groundbreaking protocol. Join a community that values freedom and authentic interaction.", - "url_message": "Follow this link to learn more." - }, - "voxvera": { - "name": "Vox Vera Printable Flyers", - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.", - "url_message": "Follow this link to learn more." - } - } -} diff --git a/voxvera/locales/es.json b/voxvera/locales/es.json deleted file mode 100644 index 69639ba..0000000 --- a/voxvera/locales/es.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "meta": { - "language_name": "Español", - "flag": "🇪🇸" - }, - "cli": { - "dep_check_header": "Comprobación de Dependencias", - "dep_found": "encontrado", - "dep_missing": "faltante", - "all_deps_installed": "Todas las dependencias están instaladas.", - "missing_deps_error": "Faltan algunas dependencias. Ejecute: pip install 'voxvera[all]'", - "init_name": "Nombre", - "init_folder": "Nombre de la Carpeta", - "init_title": "Título", - "init_subtitle": "Subtítulo", - "init_headline": "Titular", - "init_body": "Texto del cuerpo", - "init_links": "Enlaces", - "edit_again": "¿Editar de nuevo?", - "body_length": "Longitud del cuerpo", - "body_limit_exceeded": "excede el límite", - "url_label": "URL (enlace de contenido - recurso externo)", - "url_message_label": "Mensaje de la URL", - "footer_message_label": "Mensaje de pie de página", - "template_not_found": "Plantilla {name} no encontrada", - "template_copied": "Plantilla copiada a {dest}", - "flyer_created": "Archivos del volante creados en {dest}", - "dir_not_found": "Directorio {dir_path} no encontrado", - "onionshare_error": "OnionShare para {folder_name} salió inesperadamente.", - "onionshare_causes": "Causas comunes: Red bloqueada, reloj del sistema inexacto o OnionShare ya en ejecución.", - "onionshare_logs_tip": "Consulte {logfile} para ver los registros completos.", - "onion_url_msg": "[{folder_name}] URL Onion: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare en ejecución (PID {pid}).", - "export_not_found": "Error: Carpeta del sitio '{folder_name}' no encontrada en {host_root}", - "export_success": "Exportado '{folder_name}' a {output_path}", - "export_all_none": "No se encontraron sitios para exportar.", - "export_all_starting": "Exportando {count} sitios a {dir}...", - "export_all_complete": "Exportación total completada.", - "import_zip_not_found": "Error: Archivo Zip '{path}' no encontrado.", - "import_invalid_config": "Error: Archivo de exportación inválido. Falta 'config.json'.", - "import_invalid_folder": "Error: config.json inválido. Falta 'folder_name'.", - "import_overwrite_confirm": "El sitio '{folder_name}' ya existe. ¿Sobrescribir?", - "import_cancelled": "Importación cancelada.", - "import_success": "Importado con éxito '{folder_name}' a {dest_dir}", - "import_dir_not_found": "Error: Directorio '{dir}' no encontrado.", - "import_multiple_none": "No se encontraron archivos zip en {dir}", - "import_multiple_found": "Se encontraron {count} sitio(s) para importar de {dir}...", - "importing_file": "Importando {name}...", - "import_multiple_complete": "Importación múltiple completada.", - "batch_import_none": "No se encontraron archivos JSON en imports", - "batch_import_processing": "Procesando {file}", - "stop_server_not_running": "El servidor {folder_name} no está en ejecución.", - "stop_server_success": "Detenido {folder_name} (PID {pid})", - "delete_server_success": "Servidor {folder_name} eliminado", - "manage_select_server": "Seleccione un servidor para gestionar (o Salir):", - "manage_create_new": "--- Crear Nuevo Sitio/Volante ---", - "manage_start_all": "--- Iniciar Todos los Sitios ---", - "manage_stop_all": "--- Detener Todos los Sitios ---", - "manage_export_all": "--- Exportar Todos los Sitios ---", - "manage_import_multiple": "--- Importar Múltiples Sitios ---", - "manage_exit": "Salir", - "manage_startup_summary": "Resumen de Inicio", - "manage_press_enter": "Presione Enter para continuar", - "manage_action_menu": "Gestionar {name}:", - "manage_action_toggle_stop": "Detener", - "manage_action_toggle_start": "Iniciar", - "manage_action_export": "Exportar a Zip", - "manage_action_delete": "Eliminar", - "manage_action_back": "Volver", - "manage_delete_confirm": "¿Está seguro de que desea eliminar {name}?", - "bootstrapping_msg": "[{name}] Conectando a repetidores Tor y configurando servicio oculto...", - "bootstrapping_progress": "[{name}] Arranque de Tor: {progress}% ...", - "no_urls_qr_skip": "No hay URLs configuradas todavía. Los códigos QR se generarán después de 'voxvera serve'", - "input_file_not_found": "El archivo de entrada {path} no existe.", - "attachment_path_label": "Ruta del archivo adjunto (opcional - se servirá desde el sitio Tor)", - "manage_action_edit": "Editar", - "manage_templates": "--- Crear Desde Plantilla ---", - "template_select": "Seleccione una plantilla:", - "body_over_limit_warning": "Advertencia: El texto del cuerpo supera los 1000 caracteres. Puede cortarse en el volante.", - "manage_action_export_keys": "Exportar Claves", - "manage_action_import_keys": "Importar Claves", - "keys_not_found": "No se encontró clave de sesión para '{name}'. Inicie el sitio primero para generar claves.", - "keys_export_header": "Clave de sesión para '{name}':", - "keys_export_hint": "Copie esta clave y guárdela de forma segura. Use 'Importar Claves' en otra instancia para restaurar.", - "keys_site_not_found": "Sitio '{name}' no encontrado.", - "keys_overwrite_confirm": "El sitio '{name}' ya tiene una clave. ¿Sobrescribir?", - "keys_import_cancelled": "Importación cancelada.", - "keys_import_prompt": "Pegue la clave de sesión base64 a continuación:", - "keys_import_empty": "No se proporcionó clave.", - "keys_import_invalid": "Formato de clave no válido. Debe ser una cadena base64 válida.", - "keys_import_success": "Clave de sesión importada para '{name}'. Reinicie el sitio para usar la nueva clave." - }, - "web": { - "tear_off_tor_browser": "Use el Navegador Tor", - "tear_off_desc": "para ayudar a difundir este mensaje vaya a", - "tear_off_footer": "haga clic en el botón de abajo para imprimir", - "built_with": "construido con", - "print_button": "Imprimir volante", - "download_button": "Descargar Herramienta y Código", - "download_attachment": "Descargar archivo adjunto" - }, - "landing": { - "title": "ALTO SECRETO", - "subtitle": "~~NO~~ DISTRIBUIR", - "headline": "OPERACIÓN VOX VERA", - "content": "Libérese de la censura con VoxVera. Una herramienta anónima de marketing de guerrilla y difusión de mensajes. Ya sea en línea o en el mundo físico, puede empoderarlo para difundir sus ideas con audacia, protegido por un anonimato completo (si hospeda a través de Tor). Descargue el código, diseñe un sitio de volantes, hospédelo en línea y amplifique su mensaje.

Use el poder memético para compartir sus ideas en su escuela, lugar de trabajo, comunidades en línea o incluso globalmente. VoxVera asegura que su mensaje resuene a lo largo und ancho, con secciones desprendibles que cuentan con URLs y códigos QR únicos para una fácil reimpresión.

La privacidad puede mantenerse. Los volantes se pueden compartir a través de la red Tor, protegiendo al anfitrión y a los usuarios de la censura.

Únase a nosotros en una revolución que valora la verdad y la transparencia. Juntos, podemos construir una red de ciudadanos informados que no temen hablar.", - "url_message": "Obtenga VoxVera y comience a difundir su mensaje.", - "name": "Volantes Imprimibles Vox Vera" - }, - "templates": { - "aosp": { - "name": "Proyecto AOS", - "title": "ANDROID LIBERADO", - "subtitle": "SIN LÍMITES", - "headline": "LIBERTAD DE CÓDIGO ABIERTO", - "content": "El Proyecto de Código Abierto de Android (AOSP) representa la esencia de lo que Android fue originalmente concebido: una plataforma abierta, transparente y adaptable. Elimina las capas de software propietario y supervisión corporativa que se han vuelto sinónimos de las distribuciones convencionales de Android. Con AOSP, obtiene acceso a una versión sin filtros de Android, permitiéndole hacer verdaderamente suyo su dispositivo.

Para los desarrolladores, AOSP ofrece un campo de posibilidades, donde los únicos límites son sus habilidades e imaginación. Sirve como base para innumerables ROMs personalizadas, cada una adaptada a necesidades específicas, ya sea para un rendimiento mejorado, privacidad o características únicas que las versiones convencionales carecen. Los entusiastas de la privacidad apreciarán la ausencia de bloatware preinstalado y servicios de rastreo que a menudo vienen con Android de fábrica.

AOSP no es solo para desarrolladores o entusiastas de la tecnología; es para cualquiera que valore la libertad digital. Le permite recuperar el control de su dispositivo, adaptándolo a sus necesidades sin las restricciones de operadores o fabricantes. Descubra cómo AOSP puede transformar su experiencia móvil. Comience su viaje hacia un futuro más abierto y personalizable hoy.", - "url_message": "Visite el enlace a continuación para obtener más información." - }, - "bitcoin": { - "name": "Volantes de la Revolución Bitcoin", - "title": "REGLAS SIN GOBERNANTES", - "subtitle": "NO IGNORAR", - "headline": "ÚNETE A LA REVOLUCIÓN BITCOIN", - "content": "¿Qué es Bitcoin? Es más que dinero digital; es una tecnología revolucionaria diseñada para solucionar algunos de los problemas más urgentes del mundo. Bitcoin opera en una red descentralizada, libre del control de cualquier gobierno o autoridad central. Esto asegura que nadie pueda manipular su oferta o valor, convirtiéndolo en una forma sólida de dinero que protege su riqueza de la inflación.

Nuestro sistema financiero actual está construido sobre incentivos defectuosos—fomentando la deuda, la dependencia y la centralización del poder. Bitcoin cambia eso creando un sistema donde la honestidad, la transparencia y la responsabilidad individual son recompensadas. En la red Bitcoin, no hay espacio para la corrupción o manipulación porque las reglas son aplicadas por las matemáticas, no por las personas.

Bitcoin alinea incentivos de una manera que promueve el pensamiento a largo plazo, el ahorro y la innovación. Empodera a los individuos para tomar control de su futuro financiero, fomentando una comunidad global donde el valor puede transferirse libre y seguramente sin intermediarios. Por eso necesitamos Bitcoin—porque crea un mundo donde los incentivos están correctamente alineados, conduciendo a una sociedad más justa y próspera para todos.

Da el paso para aprender más sobre Bitcoin y cómo puede transformar no solo tu vida financiera, sino el mundo. Arranca un enlace a la izquierda y explora esta tecnología revolucionaria. Únete al movimiento hacia un futuro mejor.", - "url_message": "Sigue este enlace para obtener más información." - }, - "jesus": { - "name": "Mensaje que Cambia Vidas", - "title": "BUENAS NOTICIAS", - "subtitle": "NO IGNORAR", - "headline": "DESCUBRE LA VERDADERA ESPERANZA", - "content": "¿Quién es Jesús? Es más que una figura histórica; Él es el Hijo de Dios, el Salvador del mundo. Jesús mismo dijo: 'Yo soy el camino, la verdad y la vida. Nadie viene al Padre sino por mí' (Juan 14:6). Vino para cerrar la brecha entre Dios y la humanidad, ofreciéndonos un camino hacia el perdón, la paz y la vida eterna.

Todos enfrentamos quebrantamiento en nuestras vidas—ya sea en nuestras relaciones, nuestros corazones o nuestro mundo. Jesús vino para sanar ese quebrantamiento. Vivió una vida perfecta, murió en la cruz por nuestros pecados y resucitó, venciendo a la muerte y ofreciéndonos la esperanza de la vida eterna con Dios.

Sin Jesús, estamos perdidos en nuestro pecado, separados de Dios. Pero a través de Él, podemos ser perdonados y restaurados. Nos ofrece no solo una vida mejor ahora, sino la promesa de una vida eterna con Él. Por eso lo necesitamos—porque solo en Jesús podemos encontrar verdadera paz, propósito y la seguridad de la vida eterna.

Da el paso para aprender más sobre Jesús y el impacto transformador que puede tener en tu vida. Arranca un enlace a la izquierda y explora Sus enseñanzas. Encuentra la esperanza que has estado buscando.", - "url_message": "Sigue este enlace para obtener más información." - }, - "meshtastic": { - "name": "Volantes de Red Meshtastic", - "title": "COMUNICACIONES SEGURAS", - "subtitle": "NO IGNORAR", - "headline": "CONSTRUYE TU RED DE EMERGENCIA", - "content": "¿Por qué Meshtastic? En tiempos de crisis, las redes de comunicación tradicionales pueden fallar, dejándonos aislados y vulnerables. Meshtastic proporciona una solución poderosa—una red de comunicación local alternativa que opera independientemente de los sistemas centralizados. Está diseñada para situaciones de emergencia, permitiéndote mantenerte conectado cuando más importa.

Los dispositivos Meshtastic crean una red en malla que puede retransmitir mensajes a largas distancias, incluso sin cobertura de internet o celular. Este enfoque descentralizado asegura que tus comunicaciones sean resilientes y confiables, sin importar las circunstancias. Pero no se trata solo de mantenerse conectado—Meshtastic también ofrece cifrado, para que tus mensajes permanezcan seguros y privados.

En un mundo donde la privacidad está cada vez más comprometida, Meshtastic te empodera para tomar control de tu comunicación. Ya sea coordinando una respuesta comunitaria local, manteniéndote en contacto con seres queridos durante un desastre, o simplemente preparándote para lo inesperado, Meshtastic proporciona las herramientas que necesitas para comunicarte de forma segura y efectiva.

Da el paso para aprender más sobre Meshtastic y cómo puedes construir tu propia red de comunicación de emergencia. Arranca un enlace a la izquierda y explora esta tecnología innovadora. Asegúrate de estar preparado para lo que venga.", - "url_message": "Sigue este enlace para obtener más información." - }, - "nostr": { - "name": "Volantes del Protocolo Nostr", - "title": "LIBERTAD SOCIAL", - "subtitle": "NO IGNORAR", - "headline": "ÚNETE A LA RED RESISTENTE A LA CENSURA", - "content": "¿Qué es Nostr? A diferencia de las plataformas de redes sociales tradicionales, Nostr es un protocolo—un sistema descentralizado que empodera a los usuarios para conectarse y compartir sin las restricciones de una autoridad central. Nostr es resistente a la censura, lo que significa que tu voz no puede ser silenciada por corporaciones o gobiernos. Está diseñado para darte control sobre tu presencia en línea, libre de la influencia de algoritmos o anuncios que priorizan el engagement sobre las conexiones significativas.

En Nostr, no hay agendas ocultas para mantenerte enganchado. Te involucras con el contenido en tus términos, no basado en lo que un algoritmo piensa que te mantendrá en línea más tiempo. Nostr te permite construir conexiones genuinas y participar en conversaciones que importan, todo mientras mantienes tu privacidad y autonomía.

En un mundo donde el discurso en línea está cada vez más controlado y manipulado, Nostr ofrece una alternativa refrescante. No es solo una plataforma; es un movimiento hacia la verdadera libertad digital, donde tus interacciones son impulsadas por tus intereses y valores, no por lo que genera más ingresos publicitarios.

Da el paso para aprender más sobre Nostr y cómo puede transformar la forma en que te conectas en línea. Arranca un enlace a la izquierda y explora este protocolo revolucionario. Únete a una comunidad que valora la libertad y la interacción auténtica.", - "url_message": "Sigue este enlace para obtener más información." - }, - "voxvera": { - "name": "Volantes Imprimibles Vox Vera", - "title": "ALTO SECRETO", - "subtitle": "~~NO~~ DISTRIBUIR", - "headline": "OPERACIÓN VOX VERA", - "content": "Libérese de la censura con VoxVera. Una herramienta anónima de marketing de guerrilla y difusión de mensajes. Ya sea en línea o en el mundo físico, puede empoderarlo para difundir sus ideas con audacia, protegido por un anonimato completo (si hospeda a través de Tor). Descargue el código, diseñe un sitio de volantes, hospédelo en línea y amplifique su mensaje.

Use el poder memético para compartir sus ideas en su escuela, lugar de trabajo, comunidades en línea o incluso globalmente. VoxVera asegura que su mensaje resuene a lo largo und ancho, con secciones desprendibles que cuentan con URLs y códigos QR únicos para una fácil reimpresión.

La privacidad puede mantenerse. Los volantes se pueden compartir a través de la red Tor, protegiendo al anfitrión y a los usuarios de la censura.

Únase a nosotros en una revolución que valora la verdad y la transparencia. Juntos, podemos construir una red de ciudadanos informados que no temen hablar.", - "url_message": "Obtenga VoxVera y comience a difundir su mensaje." - } - } -} diff --git a/voxvera/locales/es/docs/usage.md b/voxvera/locales/es/docs/usage.md deleted file mode 100644 index d8c50b0..0000000 --- a/voxvera/locales/es/docs/usage.md +++ /dev/null @@ -1,136 +0,0 @@ -# Uso detallado - -Esta guía cubre los flujos de trabajo de CLI comunes. Consulte `docs/docker.md` para obtener instrucciones de Docker y `docs/templates.md` para conocer las plantillas de volantes disponibles. - -## Prerrequisitos - -VoxVera está diseñado para ser altamente portátil y requiere un mínimo de dependencias del sistema. - -### 1. Binarios independientes (Recomendado) -Puede descargar binarios independientes sin dependencias para su sistema operativo: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Estos binarios incluyen todo lo necesario para ejecutar VoxVera (excepto `onionshare-cli`). - -### 2. Instalador de una sola línea -Alternativamente, instale a través de nuestro script automatizado: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Instalación manual de Python -Si prefiere ejecutar desde la fuente: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Paso a paso - -1. **Inicializar:** Ejecute `voxvera init` y siga las instrucciones. Se le pedirá que seleccione su idioma primero. -2. **Construir:** Genere los activos del volante. Cada construcción crea automáticamente un `voxvera-portable.zip` en la carpeta del volante, lo que permite que otros descarguen la herramienta completa directamente desde su volante. - ```bash - voxvera build - ``` -3. **Servir:** Publique el volante sobre Tor: - ```bash - voxvera serve - ``` - Esto detecta automáticamente su instancia de Tor, inicia OnionShare y escribe la dirección .onion generada en los enlaces desprendibles del volante. - -## Soporte de idiomas - -VoxVera está totalmente localizado. Puede cambiar su preferencia de idioma de forma permanente utilizando el selector interactivo o un acceso directo: - -- **Selector interactivo:** `voxvera lang` -- **Acceso directo:** `voxvera --lang es` (establece la preferencia en español) - -### Idiomas soportados: -- **Inglés:** `en` -- **Español:** `es` (alias: `--idioma`) -- **Alemán:** `de` (alias: `--sprache`) -- **Ruso:** `ru` -- **Hebreo:** `he` -- **Árabe:** `ar` -- **Francés:** `fr` -- **Japonés:** `ja` -- **Hindi:** `hi` -- **Swahili:** `sw` - -También puede forzar un idioma específico para un solo comando sin cambiar su preferencia permanente: -- **Inglés:** `voxvera --lang en check` -- **Español:** `voxvera --idioma es check` - -Los volantes generados detectan automáticamente el idioma del navegador del visitante y cambian el texto de la interfaz en consecuencia. - -## Gestión de servidores - -Gestione múltiples volantes y sus identidades de Tor desde un único menú interactivo: - -```bash -voxvera manage -``` - -Características: -- **{{t('cli.manage_create_new')}}**: Inicie la secuencia de configuración completa. -- **{{t('cli.manage_start_all')}}**: Inicie o apague todos los volantes de su flota a la vez. -- **Estado en tiempo real**: Vea las URL .onion activas e indicadores de progreso de arranque de Tor. -- **Control individual**: {{t('cli.manage_action_export')}} sitios específicos a ZIP o elimínelos. - -## Espejo universal (Distribución viral) - -Para garantizar que VoxVera siga siendo accesible incluso si los repositorios centrales son censurados, cada volante actúa como un espejo para la herramienta. - -Cuando hospeda un volante, el botón **"{{t('web.download_button')}}"** en la página de inicio proporciona un `voxvera-portable.zip` que contiene: -- El código fuente completo y todos los idiomas soportados. -- Todas las dependencias de Python (pre-vendeurizadas). -- Binarios de Tor multiplataforma. - -Esto permite que cualquier persona que escanee su volante se convierta en un nuevo distribuidor de la herramienta VoxVera. - -## Exportación y respaldo - -Haga una copia de seguridad de sus identidades únicas de Tor (para que su URL .onion nunca cambie) o mueva sus volantes a otra máquina. - -- **Exportar un solo sitio**: `voxvera export ` -- **Exportar todos los servicios**: `voxvera export-all` - -**Lugar de almacenamiento:** Todas las exportaciones se guardan como archivos ZIP en una carpeta llamada `voxvera-exports` en el directorio de inicio del usuario (`~/voxvera-exports/`) en todas las plataformas. - -## Importación y recuperación - -Restaure toda su configuración en una nueva máquina moviendo sus archivos ZIP a `~/voxvera-exports/` y ejecutando: - -```bash -voxvera import-multiple -``` - -## Portabilidad y uso sin conexión - -Si necesita ejecutar VoxVera en una máquina sin acceso a Internet, primero puede "vendeurizar" las dependencias: - -```bash -voxvera vendorize -``` - -Esto descarga todas las librerías de Python requeridas en `voxvera/vendor/`. La herramienta dará prioridad a estos archivos locales, lo que le permitirá ejecutarse sin `pip install`. - -## Importación por lotes (JSON) - -Para generar volantes de forma masiva a partir de múltiples archivos de configuración JSON, colóquelos en el directorio `imports/` y ejecute: - -```bash -voxvera batch-import -``` - -## Cómo funcionan las URL - -Cada volante tiene dos URL separadas: -- **Enlace desprendible** (generado automáticamente): La dirección .onion donde se hospeda el volante. -- **Enlace de contenido** (configurado por el usuario): Una URL externa que apunta a un sitio web, video o descarga. - -No es necesario ingresar manualmente la dirección .onion; VoxVera lo maneja automáticamente durante la fase de `serve`. diff --git a/voxvera/locales/fa.json b/voxvera/locales/fa.json deleted file mode 100644 index 70bc124..0000000 --- a/voxvera/locales/fa.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "فارسی", - "flag": "🇮🇷", - "direction": "rtl" - }, - "cli": { - "dep_check_header": "بررسی وابستگی‌ها", - "dep_found": "پیدا شد", - "dep_missing": "یافت نشد", - "all_deps_installed": "تمامی وابستگی‌ها نصب شده‌اند.", - "missing_deps_error": "برخی وابستگی‌ها وجود ندارند. اجرا کنید: pip install 'voxvera[all]'", - "init_name": "نام", - "init_folder": "نام پوشه", - "init_title": "عنوان", - "init_subtitle": "زیرعنوان", - "init_headline": "سرخط خبر", - "init_body": "متن پیام", - "init_links": "پیوندها", - "edit_again": "ویرایش دوباره؟", - "body_length": "طول متن", - "body_limit_exceeded": "بیش از حد مجاز", - "url_label": "URL (پیوند محتوا - منبع خارجی)", - "url_message_label": "پیام URL", - "footer_message_label": "پیام پابرگ", - "template_not_found": "قالب {name} یافت نشد", - "template_copied": "قالب به {dest} کپی شد", - "flyer_created": "فایل‌های اعلامیه در {dest} ایجاد شدند", - "dir_not_found": "پوشه {dir_path} یافت نشد", - "onionshare_error": "OnionShare برای {folder_name} به طور غیرمنتظره‌ای متوقف شد.", - "onionshare_causes": "دلایل رایج: مسدود بودن شبکه، نادرست بودن ساعت سیستم، یا در حال اجرا بودن OnionShare.", - "onionshare_logs_tip": "برای مشاهده گزارش‌های کامل به {logfile} مراجعه کنید.", - "onion_url_msg": "[{folder_name}] آدرس Onion: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare در حال اجرا است (PID {pid}).", - "export_not_found": "خطا: پوشه سایت '{folder_name}' در {host_root} یافت نشد", - "export_success": "صادر شد '{folder_name}' به {output_path}", - "export_all_none": "هیچ سایتی برای صدور یافت نشد.", - "export_all_starting": "در حال صدور {count} سایت به {dir}...", - "export_all_complete": "صدور کلی کامل شد.", - "import_zip_not_found": "خطا: فایل زیپ '{path}' یافت نشد.", - "import_invalid_config": "خطا: فایل صدور نامعتبر است. 'config.json' یافت نشد.", - "import_invalid_folder": "خطا: config.json نامعتبر است. 'folder_name' یافت نشد.", - "import_overwrite_confirm": "سایت '{folder_name}' از قبل وجود دارد. جایگزین شود؟", - "import_cancelled": "وارد کردن لغو شد.", - "import_success": "با موفقیت وارد شد '{folder_name}' به {dest_dir}", - "import_dir_not_found": "خطا: پوشه '{dir}' یافت نشد.", - "import_multiple_none": "هیچ فایل زیپی در {dir} یافت نشد", - "import_multiple_found": "تعداد {count} سایت برای وارد کردن از {dir} یافت شد...", - "importing_file": "در حال وارد کردن {name}...", - "import_multiple_complete": "وارد کردن گروهی کامل شد.", - "batch_import_none": "هیچ فایل JSON در واردات یافت نشد", - "batch_import_processing": "در حال پردازش {file}", - "stop_server_not_running": "سرور {folder_name} در حال اجرا نیست.", - "stop_server_success": "متوقف شد {folder_name} (PID {pid})", - "delete_server_success": "سرور {folder_name} حذف شد", - "manage_select_server": "یک سرور را برای مدیریت انتخاب کنید (یا خروج):", - "manage_create_new": "--- ایجاد سایت/اعلامیه جدید ---", - "manage_start_all": "--- اجرای همه سایت‌ها ---", - "manage_stop_all": "--- توقف همه سایت‌ها ---", - "manage_export_all": "--- صدور همه سایت‌ها ---", - "manage_import_multiple": "--- وارد کردن چندین سایت ---", - "manage_exit": "خروج", - "manage_startup_summary": "خلاصه راه‌اندازی", - "manage_press_enter": "برای ادامه اینتر را بزنید", - "manage_action_menu": "مدیریت {name}:", - "manage_action_toggle_stop": "توقف", - "manage_action_toggle_start": "شروع", - "manage_action_export": "صدور به صورت زیپ", - "manage_action_delete": "حذف", - "manage_action_back": "بازگشت", - "manage_delete_confirm": "آیا از حذف {name} اطمینان دارید؟", - "bootstrapping_msg": "[{name}] در حال اتصال به رله‌های Tor و راه‌اندازی سرویس مخفی...", - "bootstrapping_progress": "[{name}] راه‌اندازی Tor: {progress}% ...", - "no_urls_qr_skip": "هنوز آدرسی پیکربندی نشده است. کدهای QR پس از 'voxvera serve' ایجاد می‌شوند", - "input_file_not_found": "فایل ورودی {path} وجود ندارد.", - "attachment_path_label": "مسیر فایل پیوست (اختیاری - از طریق سایت Tor ارائه می‌شود)", - "manage_action_edit": "ویرایش", - "manage_templates": "--- ایجاد از قالب ---", - "template_select": "یک قالب انتخاب کنید:", - "body_over_limit_warning": "هشدار: متن بدنه از 1000 کاراکتر بیشتر است. ممکن است در بروشور بریده شود.", - "manage_action_export_keys": "صادرات کلیدها", - "manage_action_import_keys": "واردات کلیدها", - "keys_not_found": "کلید جلسه برای '{name}' یافت نشد. ابتدا سایت را اجرا کنید تا کلیدها تولید شوند.", - "keys_export_header": "کلید جلسه برای '{name}':", - "keys_export_hint": "این کلید را کپی کرده و به صورت امن ذخیره کنید. از 'واردات کلیدها' در نمونه دیگر برای بازیابی استفاده کنید.", - "keys_site_not_found": "سایت '{name}' یافت نشد.", - "keys_overwrite_confirm": "سایت '{name}' از قبل کلید دارد. رونویسی شود؟", - "keys_import_cancelled": "واردات لغو شد.", - "keys_import_prompt": "کلید جلسه base64 را در زیر جایگذاری کنید:", - "keys_import_empty": "کلیدی ارائه نشد.", - "keys_import_invalid": "فرمت کلید نامعتبر است. باید یک رشته base64 معتبر باشد.", - "keys_import_success": "کلید جلسه برای '{name}' وارد شد. سایت را مجدداً راه‌اندازی کنید تا از کلید جدید استفاده شود." - }, - "web": { - "tear_off_tor_browser": "از مرورگر Tor استفاده کنید", - "tear_off_desc": "برای کمک به گسترش این پیام به این آدرس بروید", - "tear_off_footer": "برای چاپ روی دکمه زیر کلیک کنید", - "built_with": "ساخته شده با", - "print_button": "چاپ اعلامیه", - "download_button": "دانلود ابزار و کد منبع", - "download_attachment": "دانلود پیوست" - }, - "landing": { - "title": "به‌کلی محرمانه", - "subtitle": "~~عدم~~ انتشار", - "headline": "عملیات VOX VERA", - "content": "با VoxVera از بند سانسور رها شوید. ابزاری ناشناس برای بازاریابی چریکی و گسترش پیام. چه در فضای مجازی و چه در دنیای فیزیکی، این ابزار می‌تواند شما را برای گسترش جسورانه ایده‌هایتان توانمند کند، در حالی که توسط ناشناسی کامل محافظت می‌شوید (اگر از طریق Tor میزبانی کنید). کد را دانلود کنید، یک سایت اعلامیه طراحی کنید، آن را آنلاین میزبانی کنید و صدای خود را تقویت کنید.

از قدرت میم‌ها برای به اشتراک گذاشتن ایده‌های خود در مدرسه، محل کار، انجمن‌های آنلاین یا حتی در سطح جهانی استفاده کنید. VoxVera تضمین می‌کند که پیام شما در دوردست‌ها طنین‌انداز شود، با بخش‌های جداشونده دارای URLهای منحصر به فرد و کدهای QR برای چاپ مجدد آسان.

حریم خصوصی می‌تواند حفظ شود. اعلامیه‌ها را می‌توان از طریق شبکه Tor به اشتراک گذاشت و از میزبان و کاربران در برابر سانسور محافظت کرد.

در انقلابی که برای حقیقت و شفافیت ارزش قائل است به ما بپیوندید. با هم، می‌توانیم شبکه‌ای از شهروندان آگاه بسازیم که از سخن گفتن نمی‌هراسند.", - "url_message": "VoxVera را دریافت کنید و گسترش پیام خود را آغاز کنید.", - "name": "بروشورهای قابل چاپ Vox Vera" - }, - "templates": { - "aosp": { - "name": "پروژه AOS", - "title": "ANDROID آزاد شده", - "subtitle": "بدون مرز", - "headline": "آزادی متن‌باز", - "content": "پروژه متن‌باز Android (AOSP) نمایانگر جوهر آن چیزی است که Android در اصل برای آن طراحی شده بود: یک پلتفرم باز، شفاف و قابل تطبیق. این پروژه لایه‌های نرم‌افزار اختصاصی و نظارت شرکتی را که مترادف توزیع‌های متداول Android شده‌اند حذف می‌کند. با AOSP، به نسخه‌ای خام و فیلتر نشده از Android دسترسی پیدا می‌کنید که به شما اجازه می‌دهد دستگاهتان را واقعاً از آن خود کنید.

برای توسعه‌دهندگان، AOSP زمین بازی از امکانات را ارائه می‌دهد، جایی که تنها محدودیت‌ها مهارت‌ها و تخیل شماست. این پروژه به عنوان پایه‌ای برای بی‌شمار رام‌های سفارشی عمل می‌کند که هر کدام برای نیازهای خاصی طراحی شده‌اند، چه برای عملکرد بهتر، حریم خصوصی یا ویژگی‌های منحصر به فردی که نسخه‌های متداول فاقد آنها هستند. علاقه‌مندان به حریم خصوصی از عدم وجود نرم‌افزارهای غیرضروری از پیش نصب شده و سرویس‌های ردیابی که اغلب با Android کارخانه‌ای همراه هستند قدردانی خواهند کرد.

AOSP فقط برای توسعه‌دهندگان یا علاقه‌مندان به فناوری نیست؛ برای هر کسی است که آزادی دیجیتال را ارزشمند می‌داند. به شما اجازه می‌دهد کنترل دستگاه خود را بازپس بگیرید و آن را بدون محدودیت‌های اپراتورها یا تولیدکنندگان مطابق نیازهایتان تنظیم کنید. کشف کنید چگونه AOSP می‌تواند تجربه موبایل شما را متحول کند. سفر خود را به سوی آینده‌ای بازتر و قابل سفارشی‌سازی‌تر همین امروز آغاز کنید.", - "url_message": "برای اطلاعات بیشتر از لینک زیر بازدید کنید." - }, - "bitcoin": { - "name": "بروشورهای انقلاب Bitcoin", - "title": "قوانین بدون حاکمان", - "subtitle": "نادیده نگیرید", - "headline": "به انقلاب BITCOIN بپیوندید", - "content": "Bitcoin چیست؟ فراتر از پول دیجیتال است؛ یک فناوری انقلابی است که برای حل برخی از فوری‌ترین مشکلات جهان طراحی شده است. Bitcoin روی یک شبکه غیرمتمرکز عمل می‌کند، آزاد از کنترل هر دولت یا مرجع مرکزی. این تضمین می‌کند که هیچ‌کس نمی‌تواند عرضه یا ارزش آن را دستکاری کند و آن را به شکلی سالم از پول تبدیل می‌کند که ثروت شما را از تورم محافظت می‌کند.

سیستم مالی فعلی ما بر پایه انگیزه‌های معیوب ساخته شده است—تشویق بدهی، وابستگی و تمرکز قدرت. Bitcoin این را تغییر می‌دهد با ایجاد سیستمی که در آن صداقت، شفافیت و مسئولیت فردی پاداش می‌گیرند. در شبکه Bitcoin، جایی برای فساد یا دستکاری نیست زیرا قوانین توسط ریاضیات اجرا می‌شوند، نه توسط انسان‌ها.

Bitcoin انگیزه‌ها را به گونه‌ای هم‌راستا می‌کند که تفکر بلندمدت، پس‌انداز و نوآوری را ترویج می‌دهد. به افراد قدرت می‌دهد تا کنترل آینده مالی خود را به دست بگیرند و جامعه‌ای جهانی را پرورش می‌دهد که در آن ارزش می‌تواند آزادانه و با امنیت بدون واسطه‌ها منتقل شود. به همین دلیل به Bitcoin نیاز داریم—زیرا دنیایی می‌سازد که در آن انگیزه‌ها به درستی هم‌راستا هستند و به جامعه‌ای عادلانه‌تر و مرفه‌تر برای همه منجر می‌شود.

قدم بردارید تا درباره Bitcoin و اینکه چگونه می‌تواند نه تنها زندگی مالی شما بلکه جهان را متحول کند بیشتر بدانید. یک لینک از سمت چپ جدا کنید و این فناوری پیشگامانه را کاوش کنید. به جنبش به سوی آینده‌ای بهتر بپیوندید.", - "url_message": "این لینک را دنبال کنید تا بیشتر بدانید." - }, - "jesus": { - "name": "پیام تغییر دهنده زندگی", - "title": "خبر خوش", - "subtitle": "نادیده نگیرید", - "headline": "امید واقعی را کشف کنید", - "content": "Jesus کیست؟ او فراتر از یک شخصیت تاریخی است؛ او پسر خدا، نجات‌دهنده جهان است. Jesus خودش گفت: 'من راه و راستی و حیات هستم. هیچ‌کس جز از طریق من نزد پدر نمی‌آید' (یوحنا 14:6). او آمد تا شکاف میان خدا و بشریت را پر کند و راهی به سوی بخشش، صلح و حیات جاودان به ما ارائه دهد.

همه ما در زندگی‌مان با شکستگی مواجه هستیم—خواه در روابط، قلب‌ها یا دنیایمان. Jesus آمد تا آن شکستگی را شفا دهد. او زندگی کاملی زیست، بر صلیب برای گناهان ما مرد و از مرگ برخاست، مرگ را شکست داد و امید حیات جاودان با خدا را به ما عطا کرد.

بدون Jesus، ما در گناهمان گمشده و از خدا جدا هستیم. اما از طریق او، می‌توانیم بخشیده و بازسازی شویم. او نه تنها زندگی بهتری اکنون، بلکه وعده حیات جاودان با خودش را به ما ارائه می‌دهد. به همین دلیل به او نیاز داریم—زیرا تنها در Jesus می‌توانیم صلح، هدف و اطمینان واقعی از حیات جاودان را بیابیم.

قدم بردارید تا درباره Jesus و تأثیر تغییردهنده زندگی که می‌تواند بر شما داشته باشد بیشتر بدانید. یک لینک از سمت چپ جدا کنید و تعالیم او را کاوش کنید. امیدی را بیابید که به دنبالش بوده‌اید.", - "url_message": "این لینک را دنبال کنید تا بیشتر بدانید." - }, - "meshtastic": { - "name": "بروشورهای شبکه Meshtastic", - "title": "ارتباطات امن", - "subtitle": "نادیده نگیرید", - "headline": "شبکه اضطراری خود را بسازید", - "content": "چرا Meshtastic؟ در زمان بحران، شبکه‌های ارتباطی سنتی می‌توانند از کار بیفتند و ما را منزوی و آسیب‌پذیر رها کنند. Meshtastic یک راه‌حل قدرتمند ارائه می‌دهد—یک شبکه ارتباطی محلی جایگزین که مستقل از سیستم‌های متمرکز عمل می‌کند. برای شرایط اضطراری طراحی شده و به شما امکان می‌دهد زمانی که بیشترین اهمیت را دارد متصل بمانید.

دستگاه‌های Meshtastic یک شبکه مش ایجاد می‌کنند که می‌تواند پیام‌ها را در مسافت‌های طولانی ارسال کند، حتی بدون پوشش اینترنت یا تلفن همراه. این رویکرد غیرمتمرکز تضمین می‌کند که ارتباطات شما در هر شرایطی مقاوم و قابل اعتماد است. اما فقط درباره متصل ماندن نیست—Meshtastic همچنین رمزگذاری ارائه می‌دهد تا پیام‌های شما امن و خصوصی بمانند.

در دنیایی که حریم خصوصی به طور فزاینده‌ای به خطر افتاده، Meshtastic به شما قدرت می‌دهد تا کنترل ارتباطات خود را به دست بگیرید. چه در حال هماهنگی واکنش جامعه محلی باشید، چه در تماس با عزیزانتان در طول یک فاجعه، یا صرفاً برای غیرمنتظره‌ها آماده می‌شوید، Meshtastic ابزارهایی را که برای ارتباط امن و مؤثر نیاز دارید فراهم می‌کند.

قدم بردارید تا درباره Meshtastic و نحوه ساخت شبکه ارتباطی اضطراری خود بیشتر بدانید. یک لینک از سمت چپ جدا کنید و این فناوری نوآورانه را کاوش کنید. مطمئن شوید که برای هر چیزی آماده هستید.", - "url_message": "این لینک را دنبال کنید تا بیشتر بدانید." - }, - "nostr": { - "name": "بروشورهای پروتکل Nostr", - "title": "آزادی اجتماعی", - "subtitle": "نادیده نگیرید", - "headline": "به شبکه مقاوم در برابر سانسور بپیوندید", - "content": "Nostr چیست؟ برخلاف پلتفرم‌های رسانه‌های اجتماعی سنتی، Nostr یک پروتکل است—سیستمی غیرمتمرکز که کاربران را برای اتصال و اشتراک‌گذاری بدون محدودیت‌های یک مرجع مرکزی توانمند می‌سازد. Nostr مقاوم در برابر سانسور است، به این معنی که صدای شما توسط شرکت‌ها یا دولت‌ها خاموش نمی‌شود. طراحی شده تا به شما کنترل بر حضور آنلاینتان را بدهد، آزاد از تأثیر الگوریتم‌ها یا تبلیغاتی که تعامل را بر ارتباطات معنادار ترجیح می‌دهند.

در Nostr، هیچ دستور کار پنهانی برای نگه داشتن شما در اسکرول بی‌پایان وجود ندارد. شما با محتوا به شرایط خودتان تعامل می‌کنید، نه بر اساس آنچه یک الگوریتم فکر می‌کند شما را بیشترین مدت آنلاین نگه می‌دارد. Nostr به شما اجازه می‌دهد ارتباطات واقعی بسازید و در گفتگوهایی شرکت کنید که اهمیت دارند، همه در حالی که حریم خصوصی و استقلال شما حفظ می‌شود.

در دنیایی که گفتمان آنلاین به طور فزاینده‌ای کنترل و دستکاری می‌شود، Nostr جایگزینی تازه ارائه می‌دهد. فقط یک پلتفرم نیست؛ جنبشی به سوی آزادی دیجیتال واقعی است، جایی که تعاملات شما توسط علایق و ارزش‌هایتان هدایت می‌شود، نه توسط آنچه بیشترین درآمد تبلیغاتی را تولید می‌کند.

قدم بردارید تا درباره Nostr و نحوه تحول ارتباطات آنلاین شما بیشتر بدانید. یک لینک از سمت چپ جدا کنید و این پروتکل پیشگامانه را کاوش کنید. به جامعه‌ای بپیوندید که آزادی و تعامل واقعی را ارزشمند می‌داند.", - "url_message": "این لینک را دنبال کنید تا بیشتر بدانید." - }, - "voxvera": { - "name": "بروشورهای قابل چاپ Vox Vera", - "title": "به‌کلی محرمانه", - "subtitle": "~~عدم~~ انتشار", - "headline": "عملیات VOX VERA", - "content": "با VoxVera از بند سانسور رها شوید. ابزاری ناشناس برای بازاریابی چریکی و گسترش پیام. چه در فضای مجازی و چه در دنیای فیزیکی، این ابزار می‌تواند شما را برای گسترش جسورانه ایده‌هایتان توانمند کند، در حالی که توسط ناشناسی کامل محافظت می‌شوید (اگر از طریق Tor میزبانی کنید). کد را دانلود کنید، یک سایت اعلامیه طراحی کنید، آن را آنلاین میزبانی کنید و صدای خود را تقویت کنید.

از قدرت میم‌ها برای به اشتراک گذاشتن ایده‌های خود در مدرسه، محل کار، انجمن‌های آنلاین یا حتی در سطح جهانی استفاده کنید. VoxVera تضمین می‌کند که پیام شما در دوردست‌ها طنین‌انداز شود، با بخش‌های جداشونده دارای URLهای منحصر به فرد و کدهای QR برای چاپ مجدد آسان.

حریم خصوصی می‌تواند حفظ شود. اعلامیه‌ها را می‌توان از طریق شبکه Tor به اشتراک گذاشت و از میزبان و کاربران در برابر سانسور محافظت کرد.

در انقلابی که برای حقیقت و شفافیت ارزش قائل است به ما بپیوندید. با هم، می‌توانیم شبکه‌ای از شهروندان آگاه بسازیم که از سخن گفتن نمی‌هراسند.", - "url_message": "VoxVera را دریافت کنید و گسترش پیام خود را آغاز کنید." - } - } -} diff --git a/voxvera/locales/fa/docs/usage.md b/voxvera/locales/fa/docs/usage.md deleted file mode 100644 index 671a2d7..0000000 --- a/voxvera/locales/fa/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# راهنمای استفاده تفصیلی - -این راهنما جریان‌های کاری معمول رابط سطر فرمان (CLI) را پوشش می‌دهد. برای دستورالعمل‌های داکر به `docs/docker.md` و برای قالب‌های اعلامیه موجود به `docs/templates.md` مراجعه کنید. - -## پیش‌نیازها - -ووکس‌ورا (VoxVera) به گونه‌ای طراحی شده است که بسیار قابل حمل باشد و به حداقل وابستگی‌های سیستم نیاز داشته باشد. - -### ۱. فایل‌های اجرایی مستقل (توصیه شده) -می‌توانید فایل‌های اجرایی (Binary) مستقل و بدون نیاز به وابستگی را برای سیستم‌عامل خود دانلود کنید: -- **لینوکس:** `voxvera-linux` -- **ویندوز:** `voxvera-windows.exe` -- **مک:** `voxvera-macos` - -این فایل‌ها شامل تمام موارد لازم برای اجرای ووکس‌ورا هستند (به جز `onionshare-cli`). - -### ۲. نصب‌کننده تک‌خطی -همچنین می‌توانید از طریق اسکریپت خودکار ما نصب را انجام دهید: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### ۳. نصب دستی پایتون -اگر ترجیح می‌دهید از سورس کد استفاده کنید: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # دبیان/اوبونتو -``` - -## گام به گام - -۱. **راه‌اندازی:** دستور `voxvera init` را اجرا کرده و مراحل را دنبال کنید. در ابتدا از شما خواسته می‌شود زبان خود را انتخاب کنید. -۲. **ساخت:** دارایی‌های اعلامیه را ایجاد کنید. هر بار که عملیات ساخت انجام می‌شود، یک فایل `voxvera-portable.zip` به طور خودکار در پوشه اعلامیه ساخته می‌شود که به دیگران اجازه می‌دهد ابزار کامل را مستقیماً از اعلامیه شما دانلود کنند. - ```bash - voxvera build - ``` -۳. **میزبانی:** اعلامیه را روی شبکه تور منتشر کنید: - ```bash - voxvera serve - ``` - این دستور به طور خودکار تور شما را شناسایی کرده، OnionShare را راه‌اندازی می‌کند و آدرس .onion تولید شده را در پیوندهای جداشونده اعلامیه می‌نویسد. - -## پشتیبانی از زبان‌ها - -ووکس‌ورا کاملاً بومی‌سازی شده است. می‌توانید اولویت زبان خود را به طور دائم با استفاده از انتخاب‌گر تعاملی یا میان‌بر مستقیم تغییر دهید: - -- **انتخاب‌گر تعاملی:** `voxvera lang` -- **میان‌بر مستقیم:** `voxvera --lang fa` (تنظیم اولویت روی فارسی) - -### زبان‌های پشتیبانی شده: -- **انگلیسی:** `en` -- **اسپانیایی:** `es` (نام مستعار: `--idioma`) -- **آلمانی:** `de` (نام مستعار: `--sprache`) -- **فارسی:** `fa` - -همچنین می‌توانید بدون تغییر اولویت دائمی، یک زبان خاص را برای یک دستور واحد اجبار کنید: -- **انگلیسی:** `voxvera --lang en check` -- **فارسی:** `voxvera --lang fa check` - -اعلامیه‌های تولید شده به طور خودکار زبان مرورگر بازدیدکننده را تشخیص داده و متن رابط کاربری را بر اساس آن تغییر می‌دهند. - -## مدیریت سرورها - -چندین اعلامیه و هویت‌های تور آن‌ها را از یک منوی تعاملی واحد مدیریت کنید: - -```bash -voxvera manage -``` - -ویژگی‌ها: -- **{{t('cli.manage_create_new')}}**: شروع توالی کامل تنظیمات. -- **{{t('cli.manage_start_all')}}**: راه‌اندازی یا توقف همزمان تمام اعلامیه‌های شما. -- **وضعیت لحظه‌ای**: مشاهده آدرس‌های .onion فعال و نشانگرهای پیشرفت تور. -- **کنترل فردی**: {{t('cli.manage_action_export')}} سایت‌های خاص به فرمت ZIP یا حذف آن‌ها. - -## آینه‌سازی همگانی (توزیع ویروسی) - -برای اطمینان از اینکه ووکس‌ورا حتی در صورت سانسور مخازن مرکزی در دسترس باقی می‌ماند، هر اعلامیه به عنوان یک آینه برای این ابزار عمل می‌کند. - -وقتی اعلامیه‌ای را میزبانی می‌کنید، دکمه **"{{t('web.download_button')}}"** در صفحه فرود، یک فایل `voxvera-portable.zip` شامل موارد زیر ارائه می‌دهد: -- سورس کد کامل و تمامی زبان‌های پشتیبانی شده. -- تمامی وابستگی‌های پایتون (از پیش بسته‌بندی شده). -- فایل‌های اجرایی تور برای تمامی پلتفرم‌ها. - -این کار به هر کسی که اعلامیه شما را اسکن می‌کند اجازه می‌دهد تا به توزیع‌کننده جدیدی برای ابزار ووکس‌ورا تبدیل شود. - -## صدور و پشتیبان‌گیری - -از هویت‌های تور منحصر به فرد خود پشتیبان بگیرید (تا آدرس .onion شما هرگز تغییر نکند) یا اعلامیه‌های خود را به سیستم دیگری منتقل کنید. - -- **صدور یک سایت واحد:** `voxvera export ` -- **صدور تمامی سایت‌ها:** `voxvera export-all` - -**محل ذخیره‌سازی:** تمامی موارد صادر شده به صورت فایل ZIP در پوشه‌ای به نام `voxvera-exports` در پوشه خانگی کاربر (`~/voxvera-exports/`) در تمامی پلتفرم‌ها ذخیره می‌شوند. - -## وارد کردن و بازیابی - -با انتقال فایل‌های ZIP خود به پوشه `~/voxvera-exports/` و اجرای دستور زیر، کل تنظیمات خود را در یک سیستم جدید بازیابی کنید: - -```bash -voxvera import-multiple -``` - -## قابلیت حمل و استفاده آفلاین - -اگر نیاز دارید ووکس‌ورا را روی سیستمی بدون دسترسی به اینترنت اجرا کنید، می‌توانید ابتدا وابستگی‌ها را به صورت محلی ذخیره کنید: - -```bash -voxvera vendorize -``` - -این دستور تمامی کتابخانه‌های پایتون مورد نیاز را در پوشه `voxvera/vendor/` دانلود می‌کند. ابزار سپس این فایل‌های محلی را در اولویت قرار می‌دهد و اجازه می‌دهد بدون نیاز به `pip install` اجرا شود. - -## وارد کردن گروهی (JSON) - -برای تولید انبوه اعلامیه‌ها از چندین فایل تنظیمات JSON، آن‌ها را در پوشه `imports/` قرار داده و اجرا کنید: - -```bash -voxvera batch-import -``` - -## آدرس‌های URL چگونه کار می‌کنند - -هر اعلامیه دارای دو آدرس URL جداگانه است: -- **پیوند جداشونده** (تولید خودکار): آدرس .onion که اعلامیه در آن میزبانی می‌شود. -- **پیوند محتوا** (تنظیم توسط کاربر): یک آدرس URL خارجی که به یک وب‌سایت، ویدیو یا فایل دانلود اشاره می‌کند. - -نیازی نیست آدرس .onion را به صورت دستی وارد کنید؛ ووکس‌ورا در مرحله میزبانی (`serve`) این کار را به طور خودکار انجام می‌دهد. diff --git a/voxvera/locales/fr.json b/voxvera/locales/fr.json deleted file mode 100644 index 10c575c..0000000 --- a/voxvera/locales/fr.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "Français", - "flag": "🇫🇷", - "direction": "ltr" - }, - "cli": { - "dep_check_header": "Vérification des Dépendances", - "dep_found": "trouvé", - "dep_missing": "manquant", - "all_deps_installed": "Toutes les dépendances sont installées.", - "missing_deps_error": "Certaines dépendances sont manquantes. Exécutez : pip install 'voxvera[all]'", - "init_name": "Nom", - "init_folder": "Nom du dossier", - "init_title": "Titre", - "init_subtitle": "Sous-titre", - "init_headline": "Gros titre", - "init_body": "Texte du message", - "init_links": "Liens", - "edit_again": "Modifier à nouveau ?", - "body_length": "Longueur du texte", - "body_limit_exceeded": "dépasse la limite", - "url_label": "URL (lien de contenu - ressource externe)", - "url_message_label": "Message de l'URL", - "footer_message_label": "Message de pied de page", - "template_not_found": "Modèle {name} non trouvé", - "template_copied": "Modèle copié vers {dest}", - "flyer_created": "Fichiers du flyer créés sous {dest}", - "dir_not_found": "Répertoire {dir_path} non trouvé", - "onionshare_error": "OnionShare pour {folder_name} s'est arrêté de manière inattendue.", - "onionshare_causes": "Causes courantes : réseau bloqué, horloge système imprécise ou OnionShare déjà en cours d'exécution.", - "onionshare_logs_tip": "Voir {logfile} pour les journaux complets.", - "onion_url_msg": "[{folder_name}] URL Onion : {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare en cours d'exécution (PID {pid}).", - "export_not_found": "Erreur : dossier du site '{folder_name}' non trouvé dans {host_root}", - "export_success": "Exporté '{folder_name}' vers {output_path}", - "export_all_none": "Aucun site trouvé pour l'exportation.", - "export_all_starting": "Exportation de {count} sites vers {dir}...", - "export_all_complete": "Exportation complète terminée.", - "import_zip_not_found": "Erreur : fichier Zip '{path}' non trouvé.", - "import_invalid_config": "Erreur : fichier d'exportation invalide. 'config.json' manquant.", - "import_invalid_folder": "Erreur : config.json invalide. 'folder_name' manquant.", - "import_overwrite_confirm": "Le site '{folder_name}' existe déjà. Écraser ?", - "import_cancelled": "Importation annulée.", - "import_success": "Importé avec succès '{folder_name}' vers {dest_dir}", - "import_dir_not_found": "Erreur : répertoire '{dir}' non trouvé.", - "import_multiple_none": "Aucun fichier zip trouvé dans {dir}", - "import_multiple_found": "Trouvé {count} site(s) à importer de {dir}...", - "importing_file": "Importation de {name}...", - "import_multiple_complete": "Importation multiple terminée.", - "batch_import_none": "Aucun fichier JSON trouvé dans imports", - "batch_import_processing": "Traitement de {file}", - "stop_server_not_running": "Le serveur {folder_name} n'est pas en cours d'exécution.", - "stop_server_success": "Arrêté {folder_name} (PID {pid})", - "delete_server_success": "Serveur {folder_name} supprimé", - "manage_select_server": "Sélectionnez un serveur à gérer (ou Quitter) :", - "manage_create_new": "--- Créer un nouveau site/flyer ---", - "manage_start_all": "--- Démarrer tous les sites ---", - "manage_stop_all": "--- Arrêter tous les sites ---", - "manage_export_all": "--- Exporter tous les sites ---", - "manage_import_multiple": "--- Importer plusieurs sites ---", - "manage_exit": "Quitter", - "manage_startup_summary": "Résumé du démarrage", - "manage_press_enter": "Appuyez sur Entrée pour continuer", - "manage_action_menu": "Gérer {name} :", - "manage_action_toggle_stop": "Arrêter", - "manage_action_toggle_start": "Démarrer", - "manage_action_export": "Exporter en Zip", - "manage_action_delete": "Supprimer", - "manage_action_back": "Retour", - "manage_delete_confirm": "Êtes-vous sûr de vouloir supprimer {name} ?", - "bootstrapping_msg": "[{name}] Connexion aux relais Tor et configuration du service caché...", - "bootstrapping_progress": "[{name}] Amorçage de Tor : {progress}% ...", - "no_urls_qr_skip": "Aucune URL configurée pour le moment. Les codes QR seront générés après 'voxvera serve'", - "input_file_not_found": "Le fichier d'entrée {path} n'existe pas.", - "attachment_path_label": "Chemin du fichier joint (optionnel - sera servi depuis le site Tor)", - "manage_action_edit": "Modifier", - "manage_templates": "--- Créer à partir d'un modèle ---", - "template_select": "Sélectionnez un modèle :", - "body_over_limit_warning": "Avertissement : Le texte dépasse 1000 caractères. Il pourrait être coupé sur le tract.", - "manage_action_export_keys": "Exporter les clés", - "manage_action_import_keys": "Importer les clés", - "keys_not_found": "Aucune clé de session trouvée pour '{name}'. Démarrez le site d'abord pour générer les clés.", - "keys_export_header": "Clé de session pour '{name}' :", - "keys_export_hint": "Copiez cette clé et conservez-la en sécurité. Utilisez 'Importer les clés' sur une autre instance pour restaurer.", - "keys_site_not_found": "Site '{name}' introuvable.", - "keys_overwrite_confirm": "Le site '{name}' a déjà une clé. Écraser ?", - "keys_import_cancelled": "Importation annulée.", - "keys_import_prompt": "Collez la clé de session base64 ci-dessous :", - "keys_import_empty": "Aucune clé fournie.", - "keys_import_invalid": "Format de clé invalide. Doit être une chaîne base64 valide.", - "keys_import_success": "Clé de session importée pour '{name}'. Redémarrez le site pour utiliser la nouvelle clé." - }, - "web": { - "tear_off_tor_browser": "Utilisez le navigateur Tor", - "tear_off_desc": "pour aider à diffuser ce message, allez sur", - "tear_off_footer": "cliquez sur le bouton ci-dessous pour imprimer", - "built_with": "créé avec", - "print_button": "Imprimer le flyer", - "download_button": "Télécharger l'outil et le code", - "download_attachment": "Télécharger la pièce jointe" - }, - "landing": { - "title": "TOP SECRET", - "subtitle": "~~NE PAS~~ DISTRIBUER", - "headline": "OPÉRATION VOX VERA", - "content": "Libérez-vous de la censure avec VoxVera. Un outil de marketing de guérilla anonyme et de diffusion de messages. Que ce soit en ligne ou dans le monde physique, il peut vous donner le pouvoir de diffuser vos idées avec audace, à l'abri d'un anonymat complet (si vous hébergez via Tor). Téléchargez le code, concevez un site de flyers, hébergez-le en ligne et amplifiez votre message.

Utilisez le pouvoir mémétique pour partager vos idées à l'école, au travail, dans les communautés en ligne ou même à l'échelle mondiale. VoxVera garantit que votre message résonne partout, avec des sections détachables comportant des URL uniques et des codes QR pour une réimpression facile.

La vie privée peut être préservée. Les flyers peuvent être partagés via le réseau Tor, protégeant l'hébergeur et les utilisateurs de la censure.

Rejoignez-nous dans une révolution qui valorise la vérité et la transparence. Ensemble, nous pouvons construire un réseau de citoyens informés qui n'ont pas peur de s'exprimer.", - "url_message": "Obtenez VoxVera et commencez à diffuser votre message.", - "name": "Tracts Imprimables Vox Vera" - }, - "templates": { - "aosp": { - "name": "Projet AOS", - "title": "ANDROID LIBÉRÉ", - "subtitle": "SANS LIMITES", - "headline": "LIBERTÉ OPEN SOURCE", - "content": "Le projet Android Open Source (AOSP) représente l'essence de ce qu'Android était à l'origine : une plateforme ouverte, transparente et adaptable. Il supprime les couches de logiciels propriétaires et de contrôle d'entreprise qui sont devenues synonymes des distributions Android classiques. Avec AOSP, vous accédez à une version brute et non filtrée d'Android, vous permettant de véritablement faire de votre appareil le vôtre.

Pour les développeurs, AOSP offre un terrain de jeu de possibilités, où les seules limites sont vos compétences et votre imagination. Il sert de base à d'innombrables ROMs personnalisées, chacune adaptée à des besoins spécifiques, que ce soit pour des performances améliorées, la confidentialité ou des fonctionnalités uniques absentes des versions grand public. Les passionnés de vie privée apprécieront l'absence de logiciels préinstallés et de services de suivi qui accompagnent souvent Android d'usine.

AOSP n'est pas réservé aux développeurs ou aux passionnés de technologie ; c'est pour tous ceux qui valorisent la liberté numérique. Il vous permet de reprendre le contrôle de votre appareil, en l'adaptant à vos besoins sans les restrictions des opérateurs ou des fabricants. Découvrez comment AOSP peut transformer votre expérience mobile. Commencez votre voyage vers un avenir plus ouvert et personnalisable dès aujourd'hui.", - "url_message": "Visitez le lien ci-dessous pour en savoir plus." - }, - "bitcoin": { - "name": "Tracts de la Révolution Bitcoin", - "title": "DES RÈGLES SANS DIRIGEANTS", - "subtitle": "NE PAS IGNORER", - "headline": "REJOIGNEZ LA RÉVOLUTION BITCOIN", - "content": "Qu'est-ce que Bitcoin ? C'est bien plus que de l'argent numérique ; c'est une technologie révolutionnaire conçue pour résoudre certains des problèmes les plus urgents du monde. Bitcoin fonctionne sur un réseau décentralisé, libre du contrôle de tout gouvernement ou autorité centrale. Cela garantit que personne ne peut manipuler son offre ou sa valeur, ce qui en fait une forme saine de monnaie qui protège votre richesse de l'inflation.

Notre système financier actuel repose sur des incitations défaillantes—encourageant la dette, la dépendance et la centralisation du pouvoir. Bitcoin change cela en créant un système où l'honnêteté, la transparence et la responsabilité individuelle sont récompensées. Dans le réseau Bitcoin, il n'y a pas de place pour la corruption ou la manipulation car les règles sont appliquées par les mathématiques, pas par les personnes.

Bitcoin aligne les incitations de manière à promouvoir la pensée à long terme, l'épargne et l'innovation. Il permet aux individus de prendre le contrôle de leur avenir financier, favorisant une communauté mondiale où la valeur peut être transférée librement et en toute sécurité sans intermédiaires. C'est pourquoi nous avons besoin de Bitcoin—parce qu'il crée un monde où les incitations sont correctement alignées, menant à une société plus juste et prospère pour tous.

Faites le pas pour en apprendre davantage sur Bitcoin et comment il peut transformer non seulement votre vie financière, mais le monde. Détachez un lien à gauche et explorez cette technologie révolutionnaire. Rejoignez le mouvement vers un avenir meilleur.", - "url_message": "Suivez ce lien pour en savoir plus." - }, - "jesus": { - "name": "Message qui Change la Vie", - "title": "BONNE NOUVELLE", - "subtitle": "NE PAS IGNORER", - "headline": "DÉCOUVREZ LE VÉRITABLE ESPOIR", - "content": "Qui est Jesus ? Il est bien plus qu'une figure historique ; Il est le Fils de Dieu, le Sauveur du monde. Jesus lui-même a dit : 'Je suis le chemin, la vérité et la vie. Nul ne vient au Père que par moi' (Jean 14:6). Il est venu pour combler le fossé entre Dieu et l'humanité, nous offrant un chemin vers le pardon, la paix et la vie éternelle.

Nous faisons tous face à des brisures dans nos vies—que ce soit dans nos relations, nos cœurs ou notre monde. Jesus est venu pour guérir cette brisure. Il a vécu une vie parfaite, est mort sur la croix pour nos péchés, et est ressuscité, vainquant la mort et nous offrant l'espoir de la vie éternelle avec Dieu.

Sans Jesus, nous sommes perdus dans notre péché, séparés de Dieu. Mais à travers Lui, nous pouvons être pardonnés et restaurés. Il nous offre non seulement une vie meilleure maintenant, mais la promesse d'une vie éternelle avec Lui. C'est pourquoi nous avons besoin de Lui—parce que c'est seulement en Jesus que nous pouvons trouver la véritable paix, un but et l'assurance de la vie éternelle.

Faites le pas pour en apprendre davantage sur Jesus et l'impact transformateur qu'Il peut avoir sur votre vie. Détachez un lien à gauche et explorez Ses enseignements. Trouvez l'espoir que vous cherchiez.", - "url_message": "Suivez ce lien pour en savoir plus." - }, - "meshtastic": { - "name": "Tracts du Réseau Meshtastic", - "title": "COMMUNICATIONS SÉCURISÉES", - "subtitle": "NE PAS IGNORER", - "headline": "CONSTRUISEZ VOTRE RÉSEAU D'URGENCE", - "content": "Pourquoi Meshtastic ? En temps de crise, les réseaux de communication traditionnels peuvent échouer, nous laissant isolés et vulnérables. Meshtastic fournit une solution puissante—un réseau de communication local alternatif qui fonctionne indépendamment des systèmes centralisés. Il est conçu pour les situations d'urgence, vous permettant de rester connecté quand cela compte le plus.

Les appareils Meshtastic créent un réseau maillé capable de relayer des messages sur de longues distances, même sans couverture internet ou cellulaire. Cette approche décentralisée garantit que vos communications sont résilientes et fiables, quelles que soient les circonstances. Mais il ne s'agit pas seulement de rester connecté—Meshtastic offre également le chiffrement, pour que vos messages restent sécurisés et privés.

Dans un monde où la vie privée est de plus en plus compromise, Meshtastic vous permet de prendre le contrôle de votre communication. Que vous coordonniez une réponse communautaire locale, restiez en contact avec vos proches lors d'une catastrophe, ou vous prépariez simplement à l'inattendu, Meshtastic fournit les outils dont vous avez besoin pour communiquer de manière sécurisée et efficace.

Faites le pas pour en apprendre davantage sur Meshtastic et comment vous pouvez construire votre propre réseau de communication d'urgence. Détachez un lien à gauche et explorez cette technologie innovante. Assurez-vous d'être prêt pour tout ce qui peut arriver.", - "url_message": "Suivez ce lien pour en savoir plus." - }, - "nostr": { - "name": "Tracts du Protocole Nostr", - "title": "LIBERTÉ SOCIALE", - "subtitle": "NE PAS IGNORER", - "headline": "REJOIGNEZ LE RÉSEAU RÉSISTANT À LA CENSURE", - "content": "Qu'est-ce que Nostr ? Contrairement aux plateformes de médias sociaux traditionnelles, Nostr est un protocole—un système décentralisé qui permet aux utilisateurs de se connecter et de partager sans les contraintes d'une autorité centrale. Nostr est résistant à la censure, ce qui signifie que votre voix ne peut pas être réduite au silence par des entreprises ou des gouvernements. Il est conçu pour vous donner le contrôle de votre présence en ligne, libre de l'influence des algorithmes ou des publicités qui privilégient l'engagement au détriment des connexions significatives.

Sur Nostr, il n'y a pas d'agendas cachés pour vous maintenir dans un défilement sans fin. Vous interagissez avec le contenu selon vos termes, pas en fonction de ce qu'un algorithme pense vous gardera en ligne le plus longtemps. Nostr vous permet de construire des connexions authentiques et de participer à des conversations qui comptent, tout en préservant votre vie privée et votre autonomie.

Dans un monde où la parole en ligne est de plus en plus contrôlée et manipulée, Nostr offre une alternative rafraîchissante. Ce n'est pas qu'une plateforme ; c'est un mouvement vers une véritable liberté numérique, où vos interactions sont guidées par vos intérêts et vos valeurs, pas par ce qui génère le plus de revenus publicitaires.

Faites le pas pour en apprendre davantage sur Nostr et comment il peut transformer la façon dont vous vous connectez en ligne. Détachez un lien à gauche et explorez ce protocole révolutionnaire. Rejoignez une communauté qui valorise la liberté et l'interaction authentique.", - "url_message": "Suivez ce lien pour en savoir plus." - }, - "voxvera": { - "name": "Tracts Imprimables Vox Vera", - "title": "TOP SECRET", - "subtitle": "~~NE PAS~~ DISTRIBUER", - "headline": "OPÉRATION VOX VERA", - "content": "Libérez-vous de la censure avec VoxVera. Un outil de marketing de guérilla anonyme et de diffusion de messages. Que ce soit en ligne ou dans le monde physique, il peut vous donner le pouvoir de diffuser vos idées avec audace, à l'abri d'un anonymat complet (si vous hébergez via Tor). Téléchargez le code, concevez un site de flyers, hébergez-le en ligne et amplifiez votre message.

Utilisez le pouvoir mémétique pour partager vos idées à l'école, au travail, dans les communautés en ligne ou même à l'échelle mondiale. VoxVera garantit que votre message résonne partout, avec des sections détachables comportant des URL uniques et des codes QR pour une réimpression facile.

La vie privée peut être préservée. Les flyers peuvent être partagés via le réseau Tor, protégeant l'hébergeur et les utilisateurs de la censure.

Rejoignez-nous dans une révolution qui valorise la vérité et la transparence. Ensemble, nous pouvons construire un réseau de citoyens informés qui n'ont pas peur de s'exprimer.", - "url_message": "Obtenez VoxVera et commencez à diffuser votre message." - } - } -} diff --git a/voxvera/locales/fr/docs/usage.md b/voxvera/locales/fr/docs/usage.md deleted file mode 100644 index 52fbc97..0000000 --- a/voxvera/locales/fr/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Utilisation détaillée - -Ce guide couvre les flux de travail CLI courants. Consultez `docs/docker.md` pour les instructions Docker et `docs/templates.md` pour les modèles de flyers disponibles. - -## Prérequis - -VoxVera est conçu pour être hautement portable et nécessite un minimum de dépendances système. - -### 1. Binaires autonomes (Recommandé) -Vous pouvez télécharger des binaires autonomes sans dépendance pour votre système d'exploitation : -- **Linux :** `voxvera-linux` -- **Windows :** `voxvera-windows.exe` -- **macOS :** `voxvera-macos` - -Ces binaires incluent tout le nécessaire pour exécuter VoxVera (sauf `onionshare-cli`). - -### 2. Installateur en une ligne -Alternativement, installez via notre script automatisé : - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Installation Python manuelle -Si vous préférez exécuter à partir des sources : - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Étape par étape - -1. **Initialiser :** Exécutez `voxvera init` et suivez les instructions. Il vous sera demandé de choisir votre langue en premier. -2. **Construire :** Générez les fichiers du flyer. Chaque construction crée automatiquement un `voxvera-portable.zip` dans le dossier du flyer, permettant aux autres de télécharger l'outil complet directement depuis votre flyer. - ```bash - voxvera build - ``` -3. **Servir :** Publiez le flyer sur Tor : - ```bash - voxvera serve - ``` - Ceci détecte automatiquement votre instance Tor, démarre OnionShare et écrit l'adresse .onion générée dans les liens détachables du flyer. - -## Support linguistique - -VoxVera est entièrement localisé. Vous pouvez changer votre préférence linguistique de manière permanente en utilisant soit le sélecteur interactif, soit un raccourci direct : - -- **Sélecteur interactif :** `voxvera lang` -- **Raccourci direct :** `voxvera --lang fr` (définit la préférence sur le français) - -### Langues supportées : -- **Anglais :** `en` -- **Espagnol :** `es` (alias : `--idioma`) -- **Allemand :** `de` (alias : `--sprache`) -- **Français :** `fr` - -Vous pouvez également forcer une langue spécifique pour une seule commande sans changer votre préférence permanente : -- **Anglais :** `voxvera --lang en check` -- **Français :** `voxvera --lang fr check` - -Les flyers générés détectent automatiquement la langue du navigateur du visiteur et adaptent le texte de l'interface en conséquence. - -## Gestion des serveurs - -Gérez plusieurs flyers et leurs identités Tor à partir d'un seul menu interactif : - -```bash -voxvera manage -``` - -Fonctionnalités : -- **{{t('cli.manage_create_new')}}** : Démarre la séquence de configuration complète. -- **{{t('cli.manage_start_all')}}** : Lance ou arrête tous les flyers de votre flotte en une seule fois. -- **Statut en temps réel** : Visualisez les URL .onion actives et les indicateurs de progression de l'amorçage Tor. -- **Contrôle individuel** : {{t('cli.manage_action_export')}} des sites spécifiques vers ZIP ou supprimez-les. - -## Mise en miroir universelle (Distribution virale) - -Pour garantir que VoxVera reste accessible même si les dépôts centraux sont censurés, chaque flyer agit comme un miroir pour l'outil. - -Lorsque vous hébergez un flyer, le bouton **"{{t('web.download_button')}}"** sur la page d'accueil fournit un `voxvera-portable.zip` contenant : -- Le code source complet et toutes les langues supportées. -- Toutes les dépendances Python (pré-vendues). -- Les binaires Tor multiplateformes. - -Cela permet à quiconque scanne votre flyer de devenir un nouveau distributeur de l'outil VoxVera. - -## Exportation & Sauvegarde - -Sauvegardez vos identités Tor uniques (pour que votre URL .onion ne change jamais) ou déplacez vos flyers vers une autre machine. - -- **Exporter un seul site** : `voxvera export ` -- **Exporter tous les sites** : `voxvera export-all` - -**Lieu de stockage :** Toutes les exportations sont sauvegardées dans `~/voxvera-exports/` sur toutes les plateformes. - -## Importation & Récupération - -Restaurez toute votre configuration sur une nouvelle machine en déplaçant vos fichiers ZIP vers `~/voxvera-exports/` et en exécutant : - -```bash -voxvera import-multiple -``` - -## Portabilité & Utilisation hors ligne - -Si vous devez exécuter VoxVera sur une machine sans accès à Internet, vous pouvez d'abord "vendeuriser" les dépendances : - -```bash -voxvera vendorize -``` - -Ceci télécharge toutes les bibliothèques Python requises dans `voxvera/vendor/`. L'outil donnera alors la priorité à ces fichiers locaux, lui permettant de s'exécuter sans `pip install`. - -## Importation par lot (JSON) - -Pour générer en masse des flyers à partir de plusieurs fichiers de configuration JSON, placez-les dans le répertoire `imports/` et exécutez : - -```bash -voxvera batch-import -``` - -## Comment fonctionnent les URL - -Chaque flyer possède deux URL distinctes : -- **Lien détachable** (auto-généré) : L'adresse .onion où le flyer est hébergé. -- **Lien de contenu** (configuré par l'utilisateur) : Une URL externe pointant vers un site web, une vidéo ou un téléchargement. - -Vous n'avez pas besoin de saisir manuellement l'adresse .onion ; VoxVera s'en occupe automatiquement pendant la phase `serve`. diff --git a/voxvera/locales/he.json b/voxvera/locales/he.json deleted file mode 100644 index 96e43da..0000000 --- a/voxvera/locales/he.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "עברית", - "flag": "🇮🇱", - "direction": "rtl" - }, - "cli": { - "dep_check_header": "בדיקת תלות", - "dep_found": "נמצא", - "dep_missing": "חסר", - "all_deps_installed": "כל התלויות מותקנות.", - "missing_deps_error": "חלק מהתלויות חסרות. הרץ: pip install 'voxvera[all]'", - "init_name": "שם", - "init_folder": "שם תיקייה", - "init_title": "כותרת", - "init_subtitle": "כותרת משנה", - "init_headline": "כותרת ראשית", - "init_body": "טקסט ההודעה", - "init_links": "קישורים", - "edit_again": "לערוך שוב?", - "body_length": "אורך הטקסט", - "body_limit_exceeded": "חורג מהמגבלה", - "url_label": "URL (קישור לתוכן - משאב חיצוני)", - "url_message_label": "הודעת URL", - "footer_message_label": "הודעת כותרת תחתונה", - "template_not_found": "התבנית {name} לא נמצאה", - "template_copied": "התבנית הועתקה אל {dest}", - "flyer_created": "קובצי הפלייר נוצרו תחת {dest}", - "dir_not_found": "התיקייה {dir_path} לא נמצאה", - "onionshare_error": "OnionShare עבור {folder_name} נסגר באופן לא צפוי.", - "onionshare_causes": "סיבות נפוצות: רשת חסומה, שעון מערכת לא מדויק, או ש-OnionShare כבר פועל.", - "onionshare_logs_tip": "ראה {logfile} ליומנים מלאים.", - "onion_url_msg": "[{folder_name}] כתובת Onion: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare פועל (PID {pid}).", - "export_not_found": "שגיאה: תיקיית האתר '{folder_name}' לא נמצאה ב-{host_root}", - "export_success": "יוצא '{folder_name}' אל {output_path}", - "export_all_none": "לא נמצאו אתרים לייצוא.", - "export_all_starting": "מייצא {count} אתרים אל {dir}...", - "export_all_complete": "ייצוא הכל הושלם.", - "import_zip_not_found": "שגיאה: קובץ ה-Zip '{path}' לא נמצא.", - "import_invalid_config": "שגיאה: קובץ ייצוא לא תקין. 'config.json' חסר.", - "import_invalid_folder": "שגיאה: config.json לא תקין. 'folder_name' חסר.", - "import_overwrite_confirm": "האתר '{folder_name}' כבר קיים. לדרוס?", - "import_cancelled": "הייבוא בוטל.", - "import_success": "ייבוא '{folder_name}' אל {dest_dir} הושלם בהצלחה", - "import_dir_not_found": "שגיאה: התיקייה '{dir}' לא נמצאה.", - "import_multiple_none": "לא נמצאו קובצי Zip ב-{dir}", - "import_multiple_found": "נמצאו {count} אתרים לייבוא מ-{dir}...", - "importing_file": "מייבא את {name}...", - "import_multiple_complete": "ייבוא מרובה הושלם.", - "batch_import_none": "לא נמצאו קובצי JSON ב-imports", - "batch_import_processing": "מעבד את {file}", - "stop_server_not_running": "השרת {folder_name} אינו פועל.", - "stop_server_success": "הופסק {folder_name} (PID {pid})", - "delete_server_success": "נמחק שרת {folder_name}", - "manage_select_server": "בחר שרת לניהול (או יציאה):", - "manage_create_new": "--- צור אתר/פלייר חדש ---", - "manage_start_all": "--- הפעל את כל האתרים ---", - "manage_stop_all": "--- הפסק את כל האתרים ---", - "manage_export_all": "--- ייצא את כל האתרים ---", - "manage_import_multiple": "--- ייבא מספר אתרים ---", - "manage_exit": "יציאה", - "manage_startup_summary": "סיכום הפעלה", - "manage_press_enter": "לחץ על Enter להמשך", - "manage_action_menu": "נהל את {name}:", - "manage_action_toggle_stop": "הפסק", - "manage_action_toggle_start": "הפעל", - "manage_action_export": "ייצא ל-Zip", - "manage_action_delete": "מחק", - "manage_action_back": "חזרה", - "manage_delete_confirm": "האם אתה בטוח שברצונך למחוק את {name}?", - "bootstrapping_msg": "[{name}] מתחבר לממסרי Tor ומגדיר שירות נסתר...", - "bootstrapping_progress": "[{name}] איתחול Tor: {progress}% ...", - "no_urls_qr_skip": "עדיין לא הוגדרו כתובות URL. קודי QR ייווצרו לאחר 'voxvera serve'", - "input_file_not_found": "קובץ הקלט {path} אינו קיים.", - "attachment_path_label": "נתיב קובץ מצורף (אופציונלי - יוגש מאתר ה-Tor)", - "manage_action_edit": "עריכה", - "manage_templates": "--- יצירה מתבנית ---", - "template_select": "בחר תבנית:", - "body_over_limit_warning": "אזהרה: טקסט הגוף חורג מ-1000 תווים. הוא עלול להיחתך בעלון.", - "manage_action_export_keys": "ייצוא מפתחות", - "manage_action_import_keys": "ייבוא מפתחות", - "keys_not_found": "לא נמצא מפתח הפעלה עבור '{name}'. הפעל את האתר תחילה ליצירת מפתחות.", - "keys_export_header": "מפתח הפעלה עבור '{name}':", - "keys_export_hint": "העתק מפתח זה ושמור אותו בבטחה. השתמש ב'ייבוא מפתחות' במופע אחר לשחזור.", - "keys_site_not_found": "האתר '{name}' לא נמצא.", - "keys_overwrite_confirm": "לאתר '{name}' כבר יש מפתח. לדרוס?", - "keys_import_cancelled": "הייבוא בוטל.", - "keys_import_prompt": "הדבק את מפתח ההפעלה base64 למטה:", - "keys_import_empty": "לא סופק מפתח.", - "keys_import_invalid": "פורמט מפתח לא חוקי. חייב להיות מחרוזת base64 חוקית.", - "keys_import_success": "מפתח הפעלה יובא עבור '{name}'. הפעל מחדש את האתר כדי להשתמש במפתח החדש." - }, - "web": { - "tear_off_tor_browser": "השתמש בדפדפן Tor", - "tear_off_desc": "כדי לעזור להפיץ את המסר הזה עבור אל", - "tear_off_footer": "לחץ על הכפתור למטה להדפסה", - "built_with": "נבנה עם", - "print_button": "הדפס פלייר", - "download_button": "הורד כלי וקוד מקור", - "download_attachment": "הורד קובץ מצורף" - }, - "landing": { - "title": "סודי ביותר", - "subtitle": "~~לא~~ להפצה", - "headline": "מבצע VOX VERA", - "content": "השתחרר מהצנזורה עם VoxVera. כלי אנונימי לשיווק גרילה והפצת מסרים. בין אם באינטרנט ובין אם בעולם הפיזי, הוא יכול להעצים אותך להפיץ את הרעיונות שלך בתעוזה, מוגן באנונימיות מלאה (אם אתה מארח דרך Tor). הורד את הקוד, עצב אתר פלייר, ארח אותו אונליין והגבר את המסר שלך.

השתמש בכוח הממטי כדי לשתף את הרעיונות שלך בבית הספר, במקום העבודה, בקהילות מקוונות או אפילו ברמה עולמית. VoxVera מבטיחה שהמסר שלך יהדהד למרחקים, עם חלקים נתלשים הכוללים כתובות URL ייחודיות וקודי QR להדפסה חוזרת קלה.

ניתן לשמור על פרטיות. ניתן לשתף פליירים דרך רשת Tor, ובכך להגן על המארח ועל המשתמשים מפני צנזורה.

הצטרפו אלינו למהפכה שמעריכה אמת ושקיפות. יחד, נוכל לבנות רשת של אזרחים מושכלים שאינם פוחדים להתבטא.", - "url_message": "קבלו את VoxVera והתחילו להפיץ את המסר שלכם.", - "name": "עלונים להדפסה של Vox Vera" - }, - "templates": { - "aosp": { - "name": "פרויקט AOS", - "title": "ANDROID ללא כבלים", - "subtitle": "ללא גבולות", - "headline": "חופש קוד פתוח", - "content": "פרויקט הקוד הפתוח של Android (AOSP) מייצג את המהות של מה ש-Android נועד להיות במקור: פלטפורמה פתוחה, שקופה וניתנת להתאמה. הוא מסיר את שכבות התוכנה הקניינית והפיקוח הארגוני שהפכו נרדפים להפצות Android המרכזיות. עם AOSP, אתה מקבל גישה לגרסה גולמית ולא מסוננת של Android, המאפשרת לך באמת להפוך את המכשיר שלך לשלך.

למפתחים, AOSP מציע מגרש משחקים של אפשרויות, שבו הגבולות היחידים הם הכישורים והדמיון שלך. הוא משמש כבסיס לאינספור ROM-ים מותאמים אישית, כל אחד מותאם לצרכים ספציפיים, בין אם לביצועים משופרים, פרטיות או תכונות ייחודיות שחסרות בגרסאות המרכזיות. חובבי פרטיות יעריכו את היעדר התוכנות המיותרות המותקנות מראש ושירותי המעקב שמגיעים לרוב עם Android מהמפעל.

AOSP אינו רק למפתחים או חובבי טכנולוגיה; הוא לכל מי שמעריך חופש דיגיטלי. הוא מאפשר לך להשיב את השליטה על המכשיר שלך, להתאים אותו לצרכיך ללא ההגבלות של ספקים או יצרנים. גלה כיצד AOSP יכול לשנות את חוויית הנייד שלך. התחל את המסע שלך לעתיד פתוח וניתן להתאמה יותר עוד היום.", - "url_message": "בקר בקישור למטה למידע נוסף." - }, - "bitcoin": { - "name": "עלונים של מהפכת Bitcoin", - "title": "חוקים ללא שליטים", - "subtitle": "אל תתעלם", - "headline": "הצטרף למהפכת BITCOIN", - "content": "מה זה Bitcoin? זה יותר מסתם כסף דיגיטלי; זו טכנולוגיה מהפכנית שנועדה לפתור כמה מהבעיות הדחופות ביותר בעולם. Bitcoin פועל על רשת מבוזרת, חופשית משליטה של כל ממשלה או רשות מרכזית. זה מבטיח שאף אחד לא יכול לתמרן את ההיצע או הערך שלו, מה שהופך אותו לצורה בריאה של כסף שמגן על העושר שלך מפני אינפלציה.

המערכת הפיננסית הנוכחית שלנו בנויה על תמריצים פגומים—מעודדת חוב, תלות וריכוז כוח. Bitcoin משנה זאת על ידי יצירת מערכת שבה יושר, שקיפות ואחריות אישית מתוגמלים. ברשת Bitcoin, אין מקום לשחיתות או מניפולציה כי הכללים נאכפים על ידי מתמטיקה, לא על ידי אנשים.

Bitcoin מיישר תמריצים באופן שמקדם חשיבה ארוכת טווח, חיסכון וחדשנות. הוא מעצים אנשים לקחת שליטה על העתיד הפיננסי שלהם, ומטפח קהילה עולמית שבה ערך יכול להיות מועבר בחופשיות ובביטחון ללא מתווכים. לכן אנחנו צריכים Bitcoin—כי הוא יוצר עולם שבו תמריצים מיושרים כראוי, ומוביל לחברה הוגנת ומשגשגת יותר לכולם.

עשה את הצעד ללמוד עוד על Bitcoin וכיצד הוא יכול לשנות לא רק את החיים הפיננסיים שלך, אלא את העולם. קרע קישור משמאל וחקור את הטכנולוגיה פורצת הדרך הזו. הצטרף לתנועה לעתיד טוב יותר.", - "url_message": "עקוב אחר הקישור הזה למידע נוסף." - }, - "jesus": { - "name": "מסר משנה חיים", - "title": "בשורה טובה", - "subtitle": "אל תתעלם", - "headline": "גלה תקווה אמיתית", - "content": "מי הוא Jesus? הוא יותר מסתם דמות היסטורית; הוא בן האלוהים, מושיע העולם. Jesus עצמו אמר: 'אני הדרך, האמת והחיים. איש אינו בא אל האב אלא דרכי' (יוחנן 14:6). הוא בא לגשר על הפער בין אלוהים לאנושות, ומציע לנו דרך למחילה, שלום וחיי נצח.

כולנו מתמודדים עם שברון בחיינו—בין אם ביחסים שלנו, בלבנו או בעולמנו. Jesus בא לרפא את השברון הזה. הוא חי חיים מושלמים, מת על הצלב בעד חטאינו, וקם לתחייה, ניצח את המוות והעניק לנו את תקוות חיי הנצח עם אלוהים.

בלי Jesus, אנחנו אבודים בחטאנו, מופרדים מאלוהים. אבל דרכו, אנחנו יכולים לקבל מחילה ולהתחדש. הוא מציע לנו לא רק חיים טובים יותר עכשיו, אלא את ההבטחה לחיי נצח איתו. לכן אנחנו צריכים אותו—כי רק ב-Jesus אנחנו יכולים למצוא שלום אמיתי, תכלית והבטחת חיי נצח.

עשה את הצעד ללמוד עוד על Jesus וההשפעה משנת החיים שיכולה להיות לו בחייך. קרע קישור משמאל וחקור את תורתו. מצא את התקווה שחיפשת.", - "url_message": "עקוב אחר הקישור הזה למידע נוסף." - }, - "meshtastic": { - "name": "עלונים של רשת Meshtastic", - "title": "תקשורת מאובטחת", - "subtitle": "אל תתעלם", - "headline": "בנה את רשת החירום שלך", - "content": "למה Meshtastic? בזמני משבר, רשתות תקשורת מסורתיות עלולות לכשול ולהשאיר אותנו מבודדים ופגיעים. Meshtastic מספק פתרון רב-עוצמה—רשת תקשורת מקומית חלופית שפועלת באופן עצמאי ממערכות מרכזיות. הוא מתוכנן למצבי חירום, ומאפשר לך להישאר מחובר כשזה הכי חשוב.

מכשירי Meshtastic יוצרים רשת מש שיכולה להעביר הודעות על פני מרחקים ארוכים, גם ללא כיסוי אינטרנט או סלולר. גישה מבוזרת זו מבטיחה שהתקשורת שלך חסינה ואמינה, ללא קשר לנסיבות. אבל זה לא רק להישאר מחובר—Meshtastic גם מציע הצפנה, כך שההודעות שלך נשארות מאובטחות ופרטיות.

בעולם שבו הפרטיות נפגעת יותר ויותר, Meshtastic מעצים אותך לקחת שליטה על התקשורת שלך. בין אם אתה מתאם תגובה קהילתית מקומית, שומר על קשר עם יקיריך במהלך אסון, או פשוט מתכונן לבלתי צפוי, Meshtastic מספק את הכלים הדרושים לך לתקשר בבטחה וביעילות.

עשה את הצעד ללמוד עוד על Meshtastic וכיצד אתה יכול לבנות רשת תקשורת חירום משלך. קרע קישור משמאל וחקור את הטכנולוגיה החדשנית הזו. ודא שאתה מוכן לכל מה שעלול לבוא.", - "url_message": "עקוב אחר הקישור הזה למידע נוסף." - }, - "nostr": { - "name": "עלונים של פרוטוקול Nostr", - "title": "חופש חברתי", - "subtitle": "אל תתעלם", - "headline": "הצטרף לרשת העמידה בפני צנזורה", - "content": "מה זה Nostr? בניגוד לפלטפורמות מדיה חברתית מסורתיות, Nostr הוא פרוטוקול—מערכת מבוזרת שמעצימה משתמשים להתחבר ולשתף ללא המגבלות של רשות מרכזית. Nostr עמיד בפני צנזורה, כלומר הקול שלך לא יכול להשתתק על ידי תאגידים או ממשלות. הוא מתוכנן לתת לך שליטה על הנוכחות המקוונת שלך, חופשי מהשפעת אלגוריתמים או פרסומות שמעדיפים מעורבות על פני קשרים משמעותיים.

ב-Nostr, אין אג'נדות נסתרות שמחזיקות אותך בגלילה אינסופית. אתה מתקשר עם תוכן לפי התנאים שלך, לא על בסיס מה שאלגוריתם חושב שישאיר אותך מחובר הכי הרבה זמן. Nostr מאפשר לך לבנות קשרים אמיתיים ולהשתתף בשיחות שחשובות, הכל תוך שמירה על הפרטיות והאוטונומיה שלך.

בעולם שבו השיח המקוון נשלט ומתומרן יותר ויותר, Nostr מציע חלופה מרעננת. זו לא רק פלטפורמה; זו תנועה לכיוון חופש דיגיטלי אמיתי, שבו האינטראקציות שלך מונעות על ידי העניינים והערכים שלך, לא על ידי מה שמייצר הכי הרבה הכנסות מפרסום.

עשה את הצעד ללמוד עוד על Nostr וכיצד הוא יכול לשנות את הדרך שבה אתה מתחבר אונליין. קרע קישור משמאל וחקור את הפרוטוקול פורץ הדרך הזה. הצטרף לקהילה שמעריכה חופש ואינטראקציה אותנטית.", - "url_message": "עקוב אחר הקישור הזה למידע נוסף." - }, - "voxvera": { - "name": "עלונים להדפסה של Vox Vera", - "title": "סודי ביותר", - "subtitle": "~~לא~~ להפצה", - "headline": "מבצע VOX VERA", - "content": "השתחרר מהצנזורה עם VoxVera. כלי אנונימי לשיווק גרילה והפצת מסרים. בין אם באינטרנט ובין אם בעולם הפיזי, הוא יכול להעצים אותך להפיץ את הרעיונות שלך בתעוזה, מוגן באנונימיות מלאה (אם אתה מארח דרך Tor). הורד את הקוד, עצב אתר פלייר, ארח אותו אונליין והגבר את המסר שלך.

השתמש בכוח הממטי כדי לשתף את הרעיונות שלך בבית הספר, במקום העבודה, בקהילות מקוונות או אפילו ברמה עולמית. VoxVera מבטיחה שהמסר שלך יהדהד למרחקים, עם חלקים נתלשים הכוללים כתובות URL ייחודיות וקודי QR להדפסה חוזרת קלה.

ניתן לשמור על פרטיות. ניתן לשתף פליירים דרך רשת Tor, ובכך להגן על המארח ועל המשתמשים מפני צנזורה.

הצטרפו אלינו למהפכה שמעריכה אמת ושקיפות. יחד, נוכל לבנות רשת של אזרחים מושכלים שאינם פוחדים להתבטא.", - "url_message": "קבלו את VoxVera והתחילו להפיץ את המסר שלכם." - } - } -} diff --git a/voxvera/locales/hi.json b/voxvera/locales/hi.json deleted file mode 100644 index ce93858..0000000 --- a/voxvera/locales/hi.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "हिन्दी", - "flag": "🇮🇳", - "direction": "ltr" - }, - "cli": { - "dep_check_header": "निर्भरता की जांच", - "dep_found": "मिल गया", - "dep_missing": "लापता", - "all_deps_installed": "सभी निर्भरताएँ स्थापित हैं।", - "missing_deps_error": "कुछ निर्भरताएँ गायब हैं। चलाएँ: pip install 'voxvera[all]'", - "init_name": "नाम", - "init_folder": "फ़ोल्डर का नाम", - "init_title": "शीर्षक", - "init_subtitle": "उपशीर्षक", - "init_headline": "मुख्य शीर्षक", - "init_body": "संदेश का पाठ", - "init_links": "लिंक", - "edit_again": "फिर से संपादित करें?", - "body_length": "पाठ की लंबाई", - "body_limit_exceeded": "सीमा से अधिक है", - "url_label": "URL (सामग्री लिंक - बाहरी संसाधन)", - "url_message_label": "URL संदेश", - "footer_message_label": "फ़ुटर संदेश", - "template_not_found": "टेम्पलेट {name} नहीं मिला", - "template_copied": "टेम्पलेट {dest} पर कॉपी किया गया", - "flyer_created": "फ्लायर फाइलें {dest} के अंतर्गत बनाई गई हैं", - "dir_not_found": "निर्देशिका {dir_path} नहीं मिली", - "onionshare_error": "{folder_name} के लिए OnionShare अप्रत्याशित रूप से बंद हो गया।", - "onionshare_causes": "सामान्य कारण: नेटवर्क अवरुद्ध, गलत सिस्टम घड़ी, या OnionShare पहले से ही चल रहा है।", - "onionshare_logs_tip": "पूरे लॉग के लिए {logfile} देखें।", - "onion_url_msg": "[{folder_name}] ओनियन URL: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare चल रहा है (PID {pid})।", - "export_not_found": "त्रुटि: {host_root} में साइट फ़ोल्डर '{folder_name}' नहीं मिला", - "export_success": "'{folder_name}' को {output_path} पर निर्यात किया गया", - "export_all_none": "निर्यात करने के लिए कोई साइट नहीं मिली।", - "export_all_starting": "{count} साइटों को {dir} में निर्यात किया जा रहा है...", - "export_all_complete": "सभी निर्यात पूर्ण।", - "import_zip_not_found": "त्रुटि: ज़िप फ़ाइल '{path}' नहीं मिली।", - "import_invalid_config": "त्रुटि: अमान्य निर्यात फ़ाइल। 'config.json' गायब है।", - "import_invalid_folder": "त्रुटि: अमान्य config.json। 'folder_name' गायब है।", - "import_overwrite_confirm": "साइट '{folder_name}' पहले से मौजूद है। क्या आप इसे बदलना चाहते हैं?", - "import_cancelled": "आयात रद्द कर दिया गया।", - "import_success": "'{folder_name}' को सफलतापूर्वक {dest_dir} में आयात किया गया", - "import_dir_not_found": "त्रुटि: निर्देशिका '{dir}' नहीं मिली।", - "import_multiple_none": "{dir} में कोई ज़िप फ़ाइल नहीं मिली", - "import_multiple_found": "{dir} से {count} साइट(ओं) को आयात करने के लिए मिला...", - "importing_file": "{name} आयात किया जा रहा है...", - "import_multiple_complete": "एकाधिक आयात पूर्ण।", - "batch_import_none": "आयात में कोई JSON फ़ाइल नहीं मिली", - "batch_import_processing": "{file} को प्रोसेस किया जा रहा है", - "stop_server_not_running": "सर्वर {folder_name} नहीं चल रहा है।", - "stop_server_success": "{folder_name} बंद कर दिया गया (PID {pid})", - "delete_server_success": "सर्वर {folder_name} हटा दिया गया", - "manage_select_server": "प्रबंधित करने के लिए एक सर्वर चुनें (या बाहर निकलें):", - "manage_create_new": "--- नई साइट/फ्लायर बनाएँ ---", - "manage_start_all": "--- सभी साइटें शुरू करें ---", - "manage_stop_all": "--- सभी साइटें बंद करें ---", - "manage_export_all": "--- सभी साइटें निर्यात करें ---", - "manage_import_multiple": "--- एकाधिक साइटें आयात करें ---", - "manage_exit": "बाहर निकलें", - "manage_startup_summary": "स्टार्टअप सारांश", - "manage_press_enter": "जारी रखने के लिए एंटर दबाएं", - "manage_action_menu": "{name} प्रबंधित करें:", - "manage_action_toggle_stop": "रोकें", - "manage_action_toggle_start": "शुरू करें", - "manage_action_export": "ज़िप में निर्यात करें", - "manage_action_delete": "हटाएं", - "manage_action_back": "पीछे", - "manage_delete_confirm": "क्या आप वाकई {name} को हटाना चाहते हैं?", - "bootstrapping_msg": "[{name}] Tor रिले से जुड़ रहा है और हिडन सर्विस सेटअप कर रहा है...", - "bootstrapping_progress": "[{name}] Tor बूटस्ट्रैपिंग: {progress}% ...", - "no_urls_qr_skip": "अभी तक कोई URL कॉन्फ़िगर नहीं किया गया है। QR कोड 'voxvera serve' के बाद जेनरेट किए जाएंगे", - "input_file_not_found": "इनपुट फ़ाइल {path} मौजूद नहीं है।", - "attachment_path_label": "अटैचमेंट फ़ाइल पथ (वैकल्पिक - Tor साइट से परोसा जाएगा)", - "manage_action_edit": "संपादित करें", - "manage_templates": "--- टेम्पलेट से बनाएं ---", - "template_select": "एक टेम्पलेट चुनें:", - "body_over_limit_warning": "चेतावनी: मुख्य पाठ 1000 अक्षरों से अधिक है। यह पर्चे पर कटा हुआ दिख सकता है।", - "manage_action_export_keys": "कुंजियाँ निर्यात करें", - "manage_action_import_keys": "कुंजियाँ आयात करें", - "keys_not_found": "'{name}' के लिए सत्र कुंजी नहीं मिली। कुंजियाँ उत्पन्न करने के लिए पहले साइट शुरू करें।", - "keys_export_header": "'{name}' के लिए सत्र कुंजी:", - "keys_export_hint": "इस कुंजी को कॉपी करें और सुरक्षित रूप से सहेजें। पुनर्स्थापित करने के लिए किसी अन्य इंस्टेंस पर 'कुंजियाँ आयात करें' का उपयोग करें।", - "keys_site_not_found": "साइट '{name}' नहीं मिली।", - "keys_overwrite_confirm": "साइट '{name}' में पहले से कुंजी है। अधिलेखित करें?", - "keys_import_cancelled": "आयात रद्द किया गया।", - "keys_import_prompt": "नीचे base64 सत्र कुंजी चिपकाएँ:", - "keys_import_empty": "कोई कुंजी प्रदान नहीं की गई।", - "keys_import_invalid": "अमान्य कुंजी प्रारूप। एक वैध base64 स्ट्रिंग होनी चाहिए।", - "keys_import_success": "'{name}' के लिए सत्र कुंजी आयात की गई। नई कुंजी का उपयोग करने के लिए साइट को पुनः प्रारंभ करें।" - }, - "web": { - "tear_off_tor_browser": "Tor Browser का उपयोग करें", - "tear_off_desc": "इस संदेश को फैलाने में मदद करने के लिए यहाँ जाएँ", - "tear_off_footer": "प्रिंट करने के लिए नीचे दिए गए बटन पर क्लिक करें", - "built_with": "बनाया गया", - "print_button": "फ्लायर प्रिंट करें", - "download_button": "टूल और कोड डाउनलोड करें", - "download_attachment": "अटैचमेंट डाउनलोड करें" - }, - "landing": { - "title": "अति गोपनीय", - "subtitle": "~~वितरित न करें~~", - "headline": "ऑपरेशन VOX VERA", - "content": "VoxVera के साथ सेंसरशिप से मुक्त हों। एक गुमनाम गुरिल्ला मार्केटिंग और संदेश फैलाने वाला टूल। चाहे ऑनलाइन हो या भौतिक दुनिया में, यह आपको पूर्ण गुमनामी (यदि आप Tor पर होस्ट करते हैं) द्वारा सुरक्षित रहते हुए अपने विचारों को साहसपूर्वक फैलाने का अधिकार दे सकता है। कोड डाउनलोड करें, एक फ्लायर साइट डिज़ाइन करें, इसे ऑनलाइन होस्ट करें और अपने संदेश को बढ़ाएं।

अपने विचारों को अपने स्कूल, कार्यस्थल, ऑनलाइन समुदायों या विश्व स्तर पर साझा करने के लिए मेमेटिक शक्ति का उपयोग करें। VoxVera यह सुनिश्चित करता है कि आपका संदेश दूर-दूर तक गूंजे, जिसमें आसान पुनर्मुद्रण के लिए अद्वितीय URL और QR कोड वाले टियर-ऑफ सेक्शन हैं।

गोपनीयता बनाए रखी जा सकती है। फ्लायर्स को Tor नेटवर्क के माध्यम से साझा किया जा सकता है, जिससे होस्ट और उपयोगकर्ताओं को सेंसरशिप से बचाया जा सकता है।

एक ऐसी क्रांति में हमारे साथ जुड़ें जो सच्चाई और पारदर्शिता को महत्व देती है। साथ मिलकर, हम उन सूचित नागरिकों का एक नेटवर्क बना सकते हैं जो बोलने से नहीं डरते।", - "url_message": "VoxVera प्राप्त करें और अपना संदेश फैलाना शुरू करें।", - "name": "Vox Vera प्रिंट करने योग्य पर्चे" - }, - "templates": { - "aosp": { - "name": "AOS प्रोजेक्ट", - "title": "ANDROID मुक्त", - "subtitle": "बिना सीमाओं के", - "headline": "ओपन-सोर्स स्वतंत्रता", - "content": "Android ओपन सोर्स प्रोजेक्ट (AOSP) उस सार का प्रतिनिधित्व करता है जो Android मूल रूप से होने का इरादा था: एक खुला, पारदर्शी और अनुकूलनीय प्लेटफॉर्म। यह मालिकाना सॉफ्टवेयर और कॉर्पोरेट निगरानी की परतों को हटा देता है जो मुख्यधारा Android वितरण का पर्याय बन गई हैं। AOSP के साथ, आपको Android का एक कच्चा, बिना फिल्टर किया हुआ संस्करण मिलता है, जो आपको वास्तव में अपने डिवाइस को अपना बनाने की अनुमति देता है।

डेवलपर्स के लिए, AOSP संभावनाओं का एक खेल का मैदान प्रदान करता है, जहां एकमात्र सीमाएं आपके कौशल और कल्पना हैं। यह अनगिनत कस्टम ROM के लिए आधार के रूप में कार्य करता है, जिनमें से प्रत्येक विशिष्ट आवश्यकताओं के लिए तैयार किया गया है, चाहे वह बेहतर प्रदर्शन, गोपनीयता या अनूठी सुविधाओं के लिए हो। गोपनीयता के शौकीन पहले से स्थापित ब्लोटवेयर और ट्रैकिंग सेवाओं की अनुपस्थिति की सराहना करेंगे।

AOSP केवल डेवलपर्स या तकनीक के शौकीनों के लिए नहीं है; यह किसी भी व्यक्ति के लिए है जो डिजिटल स्वतंत्रता को महत्व देता है। यह आपको अपने डिवाइस पर नियंत्रण वापस लेने की अनुमति देता है, इसे वाहकों या निर्माताओं की प्रतिबंधों के बिना अपनी आवश्यकताओं के अनुसार अनुकूलित करता है। जानें कि AOSP कैसे आपके मोबाइल अनुभव को बदल सकता है। आज ही एक अधिक खुले, अनुकूलन योग्य भविष्य की ओर अपनी यात्रा शुरू करें।", - "url_message": "अधिक जानने के लिए नीचे दिए गए लिंक पर जाएं।" - }, - "bitcoin": { - "name": "Bitcoin क्रांति पर्चे", - "title": "शासकों के बिना नियम", - "subtitle": "अनदेखा न करें", - "headline": "BITCOIN क्रांति में शामिल हों", - "content": "Bitcoin क्या है? यह केवल डिजिटल पैसा नहीं है; यह एक क्रांतिकारी तकनीक है जो दुनिया की कुछ सबसे गंभीर समस्याओं को हल करने के लिए डिज़ाइन की गई है। Bitcoin एक विकेंद्रीकृत नेटवर्क पर काम करता है, जो किसी भी सरकार या केंद्रीय प्राधिकरण के नियंत्रण से मुक्त है। यह सुनिश्चित करता है कि कोई भी इसकी आपूर्ति या मूल्य में हेरफेर नहीं कर सकता, जो इसे धन का एक स्वस्थ रूप बनाता है जो आपकी संपत्ति को मुद्रास्फीति से बचाता है।

हमारी वर्तमान वित्तीय प्रणाली दोषपूर्ण प्रोत्साहनों पर बनी है—कर्ज, निर्भरता और सत्ता के केंद्रीकरण को प्रोत्साहित करती है। Bitcoin इसे बदलता है एक ऐसी प्रणाली बनाकर जहां ईमानदारी, पारदर्शिता और व्यक्तिगत जिम्मेदारी को पुरस्कृत किया जाता है। Bitcoin नेटवर्क में, भ्रष्टाचार या हेरफेर के लिए कोई जगह नहीं है क्योंकि नियम गणित द्वारा लागू किए जाते हैं, लोगों द्वारा नहीं।

Bitcoin प्रोत्साहनों को इस तरह संरेखित करता है जो दीर्घकालिक सोच, बचत और नवाचार को बढ़ावा देता है। यह व्यक्तियों को अपने वित्तीय भविष्य पर नियंत्रण लेने का अधिकार देता है, एक वैश्विक समुदाय को बढ़ावा देता है जहां मूल्य बिचौलियों के बिना स्वतंत्र रूप से और सुरक्षित रूप से स्थानांतरित किया जा सकता है। इसलिए हमें Bitcoin की आवश्यकता है—क्योंकि यह एक ऐसी दुनिया बनाता है जहां प्रोत्साहन ठीक से संरेखित हैं, जो सभी के लिए अधिक न्यायसंगत और समृद्ध समाज की ओर ले जाता है।

Bitcoin के बारे में और जानने का कदम उठाएं कि यह न केवल आपके वित्तीय जीवन को, बल्कि दुनिया को कैसे बदल सकता है। बाईं ओर से एक लिंक फाड़ें और इस अभूतपूर्व तकनीक का पता लगाएं। बेहतर भविष्य की ओर आंदोलन में शामिल हों।", - "url_message": "अधिक जानने के लिए इस लिंक का अनुसरण करें।" - }, - "jesus": { - "name": "जीवन बदलने वाला संदेश", - "title": "शुभ समाचार", - "subtitle": "अनदेखा न करें", - "headline": "सच्ची आशा की खोज करें", - "content": "Jesus कौन हैं? वह केवल एक ऐतिहासिक व्यक्ति से कहीं अधिक हैं; वह परमेश्वर के पुत्र हैं, संसार के उद्धारकर्ता हैं। Jesus ने स्वयं कहा, 'मार्ग और सत्य और जीवन मैं ही हूं। बिना मेरे द्वारा कोई पिता के पास नहीं पहुंच सकता' (यूहन्ना 14:6)। वह परमेश्वर और मानवता के बीच की खाई को पाटने आए, हमें क्षमा, शांति और अनंत जीवन का मार्ग प्रदान करते हुए।

हम सभी अपने जीवन में टूटेपन का सामना करते हैं—चाहे वह हमारे रिश्तों में हो, हमारे दिलों में हो, या हमारी दुनिया में। Jesus उस टूटेपन को ठीक करने आए। उन्होंने एक सिद्ध जीवन जिया, हमारे पापों के लिए क्रूस पर मरे, और पुनर्जीवित हुए, मृत्यु को पराजित किया और हमें परमेश्वर के साथ अनंत जीवन की आशा दी।

Jesus के बिना, हम अपने पाप में खोए हुए हैं, परमेश्वर से अलग। लेकिन उनके माध्यम से, हम क्षमा और पुनर्स्थापित हो सकते हैं। वह हमें न केवल अब एक बेहतर जीवन प्रदान करते हैं, बल्कि उनके साथ अनंत जीवन का वादा भी। इसलिए हमें उनकी आवश्यकता है—क्योंकि केवल Jesus में ही हम सच्ची शांति, उद्देश्य और अनंत जीवन का आश्वासन पा सकते हैं।

Jesus के बारे में और उनके जीवन-बदलने वाले प्रभाव के बारे में जानने का कदम उठाएं। बाईं ओर से एक लिंक फाड़ें और उनकी शिक्षाओं का पता लगाएं। वह आशा खोजें जिसे आप ढूंढ रहे थे।", - "url_message": "अधिक जानने के लिए इस लिंक का अनुसरण करें।" - }, - "meshtastic": { - "name": "Meshtastic नेटवर्क पर्चे", - "title": "सुरक्षित संचार", - "subtitle": "अनदेखा न करें", - "headline": "अपना आपातकालीन नेटवर्क बनाएं", - "content": "Meshtastic क्यों? संकट के समय में, पारंपरिक संचार नेटवर्क विफल हो सकते हैं, जिससे हम अलग-थलग और असुरक्षित रह जाते हैं। Meshtastic एक शक्तिशाली समाधान प्रदान करता है—एक वैकल्पिक स्थानीय संचार नेटवर्क जो केंद्रीकृत प्रणालियों से स्वतंत्र रूप से काम करता है। यह आपातकालीन स्थितियों के लिए डिज़ाइन किया गया है, जो आपको सबसे ज़रूरी समय पर जुड़े रहने की अनुमति देता है।

Meshtastic उपकरण एक मेश नेटवर्क बनाते हैं जो इंटरनेट या सेलुलर कवरेज के बिना भी लंबी दूरी पर संदेश रिले कर सकता है। यह विकेंद्रीकृत दृष्टिकोण सुनिश्चित करता है कि आपके संचार किसी भी परिस्थिति में लचीले और विश्वसनीय हों। लेकिन यह केवल जुड़े रहने के बारे में नहीं है—Meshtastic एन्क्रिप्शन भी प्रदान करता है, ताकि आपके संदेश सुरक्षित और निजी रहें।

एक ऐसी दुनिया में जहां गोपनीयता तेजी से खतरे में है, Meshtastic आपको अपने संचार पर नियंत्रण लेने का अधिकार देता है। चाहे आप स्थानीय सामुदायिक प्रतिक्रिया का समन्वय कर रहे हों, किसी आपदा के दौरान प्रियजनों से संपर्क में रह रहे हों, या बस अप्रत्याशित के लिए तैयारी कर रहे हों, Meshtastic आपको सुरक्षित और प्रभावी ढंग से संवाद करने के लिए आवश्यक उपकरण प्रदान करता है।

Meshtastic के बारे में और जानने का कदम उठाएं कि आप अपना खुद का आपातकालीन संचार नेटवर्क कैसे बना सकते हैं। बाईं ओर से एक लिंक फाड़ें और इस नवीन तकनीक का पता लगाएं। सुनिश्चित करें कि आप जो भी आए उसके लिए तैयार हैं।", - "url_message": "अधिक जानने के लिए इस लिंक का अनुसरण करें।" - }, - "nostr": { - "name": "Nostr प्रोटोकॉल पर्चे", - "title": "सामाजिक स्वतंत्रता", - "subtitle": "अनदेखा न करें", - "headline": "सेंसरशिप-प्रतिरोधी नेटवर्क से जुड़ें", - "content": "Nostr क्या है? पारंपरिक सोशल मीडिया प्लेटफॉर्म के विपरीत, Nostr एक प्रोटोकॉल है—एक विकेंद्रीकृत प्रणाली जो उपयोगकर्ताओं को केंद्रीय प्राधिकरण की बाधाओं के बिना जुड़ने और साझा करने का अधिकार देती है। Nostr सेंसरशिप-प्रतिरोधी है, जिसका अर्थ है कि आपकी आवाज़ को कॉर्पोरेशनों या सरकारों द्वारा चुप नहीं कराया जा सकता। यह आपको आपकी ऑनलाइन उपस्थिति पर नियंत्रण देने के लिए डिज़ाइन किया गया है, एल्गोरिदम या विज्ञापनों के प्रभाव से मुक्त जो सार्थक कनेक्शन पर जुड़ाव को प्राथमिकता देते हैं।

Nostr पर, आपको अंतहीन स्क्रॉलिंग में बनाए रखने के लिए कोई छिपे हुए एजेंडे नहीं हैं। आप अपनी शर्तों पर सामग्री से जुड़ते हैं, न कि इस आधार पर कि एक एल्गोरिदम क्या सोचता है कि आपको सबसे लंबे समय तक ऑनलाइन रखेगा। Nostr आपको वास्तविक कनेक्शन बनाने और महत्वपूर्ण बातचीत में भाग लेने की अनुमति देता है, यह सब आपकी गोपनीयता और स्वायत्तता को बनाए रखते हुए।

एक ऐसी दुनिया में जहां ऑनलाइन भाषण को तेजी से नियंत्रित और हेरफेर किया जा रहा है, Nostr एक ताज़ा विकल्प प्रदान करता है। यह सिर्फ एक प्लेटफॉर्म नहीं है; यह सच्ची डिजिटल स्वतंत्रता की ओर एक आंदोलन है, जहां आपकी बातचीत आपकी रुचियों और मूल्यों से प्रेरित होती है, न कि जो सबसे अधिक विज्ञापन राजस्व उत्पन्न करता है।

Nostr के बारे में और जानने का कदम उठाएं कि यह आपके ऑनलाइन जुड़ने के तरीके को कैसे बदल सकता है। बाईं ओर से एक लिंक फाड़ें और इस अभूतपूर्व प्रोटोकॉल का पता लगाएं। एक ऐसे समुदाय से जुड़ें जो स्वतंत्रता और प्रामाणिक बातचीत को महत्व देता है।", - "url_message": "अधिक जानने के लिए इस लिंक का अनुसरण करें।" - }, - "voxvera": { - "name": "Vox Vera प्रिंट करने योग्य पर्चे", - "title": "अति गोपनीय", - "subtitle": "~~वितरित न करें~~", - "headline": "ऑपरेशन VOX VERA", - "content": "VoxVera के साथ सेंसरशिप से मुक्त हों। एक गुमनाम गुरिल्ला मार्केटिंग और संदेश फैलाने वाला टूल। चाहे ऑनलाइन हो या भौतिक दुनिया में, यह आपको पूर्ण गुमनामी (यदि आप Tor पर होस्ट करते हैं) द्वारा सुरक्षित रहते हुए अपने विचारों को साहसपूर्वक फैलाने का अधिकार दे सकता है। कोड डाउनलोड करें, एक फ्लायर साइट डिज़ाइन करें, इसे ऑनलाइन होस्ट करें और अपने संदेश को बढ़ाएं।

अपने विचारों को अपने स्कूल, कार्यस्थल, ऑनलाइन समुदायों या विश्व स्तर पर साझा करने के लिए मेमेटिक शक्ति का उपयोग करें। VoxVera यह सुनिश्चित करता है कि आपका संदेश दूर-दूर तक गूंजे, जिसमें आसान पुनर्मुद्रण के लिए अद्वितीय URL और QR कोड वाले टियर-ऑफ सेक्शन हैं।

गोपनीयता बनाए रखी जा सकती है। फ्लायर्स को Tor नेटवर्क के माध्यम से साझा किया जा सकता है, जिससे होस्ट और उपयोगकर्ताओं को सेंसरशिप से बचाया जा सकता है।

एक ऐसी क्रांति में हमारे साथ जुड़ें जो सच्चाई और पारदर्शिता को महत्व देती है। साथ मिलकर, हम उन सूचित नागरिकों का एक नेटवर्क बना सकते हैं जो बोलने से नहीं डरते।", - "url_message": "VoxVera प्राप्त करें और अपना संदेश फैलाना शुरू करें।" - } - } -} diff --git a/voxvera/locales/hi/docs/usage.md b/voxvera/locales/hi/docs/usage.md deleted file mode 100644 index c5445e0..0000000 --- a/voxvera/locales/hi/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# विस्तृत उपयोग - -यह गाइड सामान्य CLI वर्कफ्लो को कवर करती है। डॉकर निर्देशों के लिए `docs/docker.md` और उपलब्ध फ्लायर टेम्पलेट्स के लिए `docs/templates.md` देखें। - -## पूर्वापेक्षाएँ (Prerequisites) - -VoxVera को अत्यधिक पोर्टेबल बनाने के लिए डिज़ाइन किया गया है और इसके लिए न्यूनतम सिस्टम निर्भरता की आवश्यकता होती है। - -### 1. स्टैंडअलोन बाइनरी (अनुशंसित) -आप अपने ऑपरेटिंग सिस्टम के लिए स्टैंडअलोन, शून्य-निर्भरता बाइनरी डाउनलोड कर सकते हैं: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -इन बाइनरी में VoxVera चलाने के लिए आवश्यक सब कुछ शामिल है (`onionshare-cli` को छोड़कर)। - -### 2. वन-लाइन इंस्टॉलर -वैकल्पिक रूप से, हमारी स्वचालित स्क्रिप्ट के माध्यम से इंस्टॉल करें: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. मैनुअल पायथन इंस्टॉलेशन -यदि आप सोर्स से चलाना पसंद करते हैं: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## चरण-दर-चरण (Step-by-Step) - -1. **आरंभ करें (Initialize):** `voxvera init` चलाएँ और संकेतों का पालन करें। आपसे सबसे पहले अपनी भाषा चुनने के लिए कहा जाएगा। -2. **बिल्ड (Build):** फ्लायर एसेट्स जेनरेट करें। प्रत्येक बिल्ड स्वचालित रूप से फ्लायर के फ़ोल्डर में एक `voxvera-portable.zip` बनाता है, जिससे अन्य लोग सीधे आपके फ्लायर से पूरा टूल डाउनलोड कर सकते हैं। - ```bash - voxvera build - ``` -3. **सर्व (Serve):** फ्लायर को Tor पर प्रकाशित करें: - ```bash - voxvera serve - ``` - यह स्वचालित रूप से आपके Tor इंस्टेंस का पता लगाता है, OnionShare शुरू करता है, और जेनरेट किए गए .onion एड्रेस को फ्लायर के टियर-ऑफ लिंक में लिख देता है। - -## भाषा समर्थन (Language Support) - -VoxVera पूरी तरह से स्थानीयकृत (localized) है। आप इंटरैक्टिव सेलेक्टर या सीधे शॉर्टकट का उपयोग करके अपनी भाषा प्राथमिकता को स्थायी रूप से बदल सकते हैं: - -- **इंटरैक्टिव सेलेक्टर:** `voxvera lang` -- **सीधा शॉर्टकट:** `voxvera --lang hi` (प्राथमिकता को हिन्दी पर सेट करता है) - -### समर्थित भाषाएं: -- **अंग्रेजी:** `en` -- **स्पेनिश:** `es` (उपनाम: `--idioma`) -- **जर्मन:** `de` (उपनाम: `--sprache`) -- **हिन्दी:** `hi` - -आप अपनी स्थायी प्राथमिकता को बदले बिना किसी एक कमांड के लिए एक विशिष्ट भाषा को बाध्य (force) भी कर सकते हैं: -- **अंग्रेजी:** `voxvera --lang en check` -- **हिन्दी:** `voxvera --lang hi check` - -जेनरेट किए गए फ्लायर्स स्वचालित रूप से विज़िटर की ब्राउज़र भाषा का पता लगाते हैं और उसके अनुसार UI टेक्स्ट बदलते हैं। - -## सर्वर प्रबंधन (Server Management) - -एक ही इंटरैक्टिव मेनू से कई फ्लायर्स और उनकी Tor पहचान प्रबंधित करें: - -```bash -voxvera manage -``` - -विशेषताएं: -- **{{t('cli.manage_create_new')}}**: पूरा सेटअप अनुक्रम शुरू करें। -- **{{t('cli.manage_start_all')}}**: अपने बेड़े के सभी फ्लायर्स को एक साथ शुरू या बंद करें। -- **वास्तविक समय स्थिति**: सक्रिय `.onion` URL और Tor बूटस्ट्रैपिंग प्रगति संकेतक देखें। -- **व्यक्तिगत नियंत्रण**: विशिष्ट साइटों को ZIP में {{t('cli.manage_action_export')}} करें या उन्हें हटा दें। - -## यूनिवर्सल मिररिंग (वायरल वितरण) - -यह सुनिश्चित करने के लिए कि VoxVera केंद्रीय रिपॉजिटरी सेंसर होने पर भी सुलभ रहे, प्रत्येक फ्लायर टूल के लिए मिरर के रूप में कार्य करता है। - -जब आप फ्लायर होस्ट करते हैं, तो लैंडिंग पेज पर **"{{t('web.download_button')}}"** बटन एक `voxvera-portable.zip` प्रदान करता है जिसमें शामिल हैं: -- पूरा सोर्स कोड और सभी समर्थित भाषाएं। -- सभी पायथन निर्भरताएँ (pre-vendored)। -- क्रॉस-प्लेटफ़ॉर्म Tor बाइनरी। - -यह आपके फ्लायर को स्कैन करने वाले किसी भी व्यक्ति को VoxVera टूल का नया वितरक बनने की अनुमति देता है। - -## निर्यात और बैकअप (Export & Backup) - -अपनी अनूठी Tor पहचान का बैकअप लें (ताकि आपका `.onion` URL कभी न बदले) या अपने फ्लायर्स को दूसरी मशीन पर ले जाएं। - -- **एकल साइट निर्यात करें**: `voxvera export ` -- **सभी साइटें निर्यात करें**: `voxvera export-all` - -**भंडारण स्थान:** सभी निर्यात सभी प्लेटफ़ॉर्म पर उपयोगकर्ता की होम डायरेक्टरी (`~/voxvera-exports/`) में ZIP फ़ाइलों के रूप में सहेजे जाते हैं। - -## आयात और पुनर्प्राप्ति (Import & Recovery) - -अपनी ZIP फ़ाइलों को `~/voxvera-exports/` में ले जाकर और चलाकर एक नई मशीन पर अपना पूरा सेटअप पुनर्स्थापित करें: - -```bash -voxvera import-multiple -``` - -## पोर्टेबिलिटी और ऑफलाइन उपयोग - -यदि आपको बिना इंटरनेट एक्सेस वाली मशीन पर VoxVera चलाने की आवश्यकता है, तो आप पहले निर्भरताओं को "वेंडराइज़" (vendorize) कर सकते हैं: - -```bash -voxvera vendorize -``` - -यह `voxvera/vendor/` में सभी आवश्यक पायथन लाइब्रेरी डाउनलोड करता है। टूल फिर इन स्थानीय फ़ाइलों को प्राथमिकता देगा, जिससे यह `pip install` के बिना चल सकेगा। - -## बैच आयात (JSON) - -कई JSON कॉन्फ़िगरेशन फ़ाइलों से थोक में फ्लायर्स जेनरेट करने के लिए, उन्हें `imports/` डायरेक्टरी में रखें और चलाएँ: - -```bash -voxvera batch-import -``` - -## URL कैसे काम करते हैं - -प्रत्येक फ्लायर के दो अलग-अलग URL होते हैं: -- **टियर-ऑफ लिंक** (स्वचालित रूप से जेनरेट): वह .onion एड्रेस जहाँ फ्लायर होस्ट किया गया है। -- **सामग्री लिंक** (उपयोगकर्ता-कॉन्फ़िगर): वेबसाइट, वीडियो या डाउनलोड की ओर इशारा करने वाला एक बाहरी URL। - -आपको मैन्युअल रूप से .onion एड्रेस दर्ज करने की आवश्यकता नहीं है; `serve` चरण के दौरान VoxVera इसे स्वचालित रूप से संभालता है। diff --git a/voxvera/locales/ja.json b/voxvera/locales/ja.json deleted file mode 100644 index e7eca74..0000000 --- a/voxvera/locales/ja.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "日本語", - "flag": "🇯🇵", - "direction": "ltr" - }, - "cli": { - "dep_check_header": "依存関係の確認", - "dep_found": "検出済み", - "dep_missing": "未検出", - "all_deps_installed": "すべての依存関係がインストールされています。", - "missing_deps_error": "一部の依存関係が不足しています。実行してください: pip install 'voxvera[all]'", - "init_name": "名前", - "init_folder": "フォルダ名", - "init_title": "タイトル", - "init_subtitle": "サブタイトル", - "init_headline": "大見出し", - "init_body": "メッセージ本文", - "init_links": "リンク", - "edit_again": "再編集しますか?", - "body_length": "本文の長さ", - "body_limit_exceeded": "制限を超えています", - "url_label": "URL (コンテンツリンク - 外部リソース)", - "url_message_label": "URLメッセージ", - "footer_message_label": "フッターメッセージ", - "template_not_found": "テンプレート {name} が見つかりません", - "template_copied": "テンプレートを {dest} にコピーしました", - "flyer_created": "フライヤーファイルが {dest} に作成されました", - "dir_not_found": "ディレクトリ {dir_path} が見つかりません", - "onionshare_error": "{folder_name} の OnionShare が予期せず終了しました。", - "onionshare_causes": "主な原因: ネットワークの遮断、システム時刻の不一致、または OnionShare が既に実行されている可能性があります。", - "onionshare_logs_tip": "詳細は {logfile} のログを確認してください。", - "onion_url_msg": "[{folder_name}] オニオンURL: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare 実行中 (PID {pid})", - "export_not_found": "エラー: サイトフォルダ '{folder_name}' が {host_root} 内に見つかりません", - "export_success": "'{folder_name}' を {output_path} にエクスポートしました", - "export_all_none": "エクスポートするサイトが見つかりません。", - "export_all_starting": "{count} 個のサイトを {dir} にエクスポート中...", - "export_all_complete": "一括エクスポートが完了しました。", - "import_zip_not_found": "エラー: Zipファイル '{path}' が見つかりません。", - "import_invalid_config": "エラー: 無効なエクスポートファイルです。'config.json' がありません。", - "import_invalid_folder": "エラー: 無効な config.json です。'folder_name' がありません。", - "import_overwrite_confirm": "サイト '{folder_name}' は既に存在します。上書きしますか?", - "import_cancelled": "インポートをキャンセルしました。", - "import_success": "'{folder_name}' を {dest_dir} に正常にインポートしました", - "import_dir_not_found": "エラー: ディレクトリ '{dir}' が見つかりません。", - "import_multiple_none": "{dir} 内に Zipファイルが見つかりません", - "import_multiple_found": "{dir} から {count} 個のサイトをインポートします...", - "importing_file": "{name} をインポート中...", - "import_multiple_complete": "一括インポートが完了しました。", - "batch_import_none": "imports 内に JSONファイルが見つかりません", - "batch_import_processing": "{file} を処理中", - "stop_server_not_running": "サーバー {folder_name} は実行されていません。", - "stop_server_success": "{folder_name} を停止しました (PID {pid})", - "delete_server_success": "サーバー {folder_name} を削除しました", - "manage_select_server": "管理するサーバーを選択(または終了):", - "manage_create_new": "--- 新規サイト/フライヤー作成 ---", - "manage_start_all": "--- すべてのサイトを開始 ---", - "manage_stop_all": "--- すべてのサイトを停止 ---", - "manage_export_all": "--- すべてのサイトをエクスポート ---", - "manage_import_multiple": "--- 複数のサイトをインポート ---", - "manage_exit": "終了", - "manage_startup_summary": "起動サマリー", - "manage_press_enter": "Enterキーを押して続行", - "manage_action_menu": "{name} の管理:", - "manage_action_toggle_stop": "停止", - "manage_action_toggle_start": "開始", - "manage_action_export": "Zipとしてエクスポート", - "manage_action_delete": "削除", - "manage_action_back": "戻る", - "manage_delete_confirm": "本当に {name} を削除しますか?", - "bootstrapping_msg": "[{name}] Tor リレーに接続し、隠しサービスをセットアップ中...", - "bootstrapping_progress": "[{name}] Tor 起動中: {progress}% ...", - "no_urls_qr_skip": "URLがまだ設定されていません。QRコードは 'voxvera serve' の後に生成されます", - "input_file_not_found": "入力ファイル {path} が存在しません。", - "attachment_path_label": "添付ファイルのパス(任意 - Torサイトから配信されます)", - "manage_action_edit": "編集", - "manage_templates": "--- テンプレートから作成 ---", - "template_select": "テンプレートを選択してください:", - "body_over_limit_warning": "警告:本文が1000文字を超えています。チラシ上で途切れる可能性があります。", - "manage_action_export_keys": "鍵をエクスポート", - "manage_action_import_keys": "鍵をインポート", - "keys_not_found": "'{name}' のセッションキーが見つかりません。まずサイトを起動してキーを生成してください。", - "keys_export_header": "'{name}' のセッションキー:", - "keys_export_hint": "このキーをコピーして安全に保管してください。別のインスタンスで「鍵をインポート」を使用して復元できます。", - "keys_site_not_found": "サイト '{name}' が見つかりません。", - "keys_overwrite_confirm": "サイト '{name}' にはすでにキーがあります。上書きしますか?", - "keys_import_cancelled": "インポートがキャンセルされました。", - "keys_import_prompt": "base64セッションキーを以下に貼り付けてください:", - "keys_import_empty": "キーが提供されていません。", - "keys_import_invalid": "無効なキー形式です。有効なbase64文字列である必要があります。", - "keys_import_success": "'{name}' のセッションキーがインポートされました。新しいキーを使用するにはサイトを再起動してください。" - }, - "web": { - "tear_off_tor_browser": "Tor Browserを使用してください", - "tear_off_desc": "このメッセージを広めるには、こちらにアクセスしてください", - "tear_off_footer": "下のボタンをクリックして印刷してください", - "built_with": "built with", - "print_button": "フライヤーを印刷", - "download_button": "ツールとソースをダウンロード", - "download_attachment": "添付ファイルをダウンロード" - }, - "landing": { - "title": "極秘事項", - "subtitle": "~~配布禁止~~", - "headline": "作戦名:VOX VERA", - "content": "VoxVeraで検閲から解放されましょう。これは、匿名のゲリラマーケティングおよびメッセージ拡散ツールです。オンラインでも物理的な世界でも、Torを介したホスティングによって完全な匿名性に守られながら、自分の考えを大胆に広めることができます。コードをダウンロードし、フライヤーサイトをデザインし、オンラインで公開して、あなたのメッセージを増幅させてください。

ミームの力を利用して、学校、職場、オンラインコミュニティ、あるいは世界中にあなたのアイデアを共有しましょう。VoxVeraは、再印刷が簡単な独自のURLとQRコードを備えた切り取りセクションにより、あなたのメッセージが広く遠くまで響くことを保証します。

プライバシーは維持されます。フライヤーはTorネットワークを介して共有でき、ホスト側とユーザー側の両方を検閲から守ります。

真実と透明性を尊重する革命に加わりましょう。共に、声を上げることを恐れない、知識豊富な市民のネットワークを構築しましょう。", - "url_message": "VoxVeraを入手して、メッセージの拡散を始めましょう。", - "name": "Vox Vera 印刷用チラシ" - }, - "templates": { - "aosp": { - "name": "AOSプロジェクト", - "title": "ANDROID 解放", - "subtitle": "制限なし", - "headline": "オープンソースの自由", - "content": "Android Open Source Project(AOSP)は、Androidが本来あるべき姿の本質を表しています:オープンで透明性があり、適応可能なプラットフォームです。メインストリームのAndroidディストリビューションの代名詞となったプロプライエタリソフトウェアと企業監視の層を取り除きます。AOSPを使用すると、フィルタリングされていない生のAndroidにアクセスでき、デバイスを真に自分のものにすることができます。

開発者にとって、AOSPは可能性の遊び場を提供し、唯一の制限はあなたのスキルと想像力です。パフォーマンスの向上、プライバシー、メインストリーム版にない独自の機能など、特定のニーズに合わせた無数のカスタムROMの基盤として機能します。プライバシー愛好家は、標準のAndroidに付属するプリインストールされたブロートウェアやトラッキングサービスがないことを高く評価するでしょう。

AOSPは開発者やテクノロジー愛好家だけのものではありません。デジタルの自由を重視するすべての人のためのものです。キャリアやメーカーの制限なしに、デバイスの制御を取り戻し、ニーズに合わせてカスタマイズすることができます。AOSPがあなたのモバイル体験をどのように変革できるかをご覧ください。より開かれた、カスタマイズ可能な未来への旅を今日から始めましょう。", - "url_message": "詳細については以下のリンクをご覧ください。" - }, - "bitcoin": { - "name": "Bitcoin革命チラシ", - "title": "支配者なきルール", - "subtitle": "無視しないでください", - "headline": "BITCOIN革命に参加しよう", - "content": "Bitcoinとは何か?それは単なるデジタルマネー以上のもので、世界で最も差し迫った問題を解決するために設計された革命的な技術です。Bitcoinは分散型ネットワーク上で動作し、いかなる政府や中央機関の制御からも自由です。これにより、誰もその供給量や価値を操作できないことが保証され、インフレからあなたの資産を守る健全な通貨となります。

現在の金融システムは欠陥のあるインセンティブの上に構築されています—負債、依存、権力の集中を促進しています。Bitcoinは、正直さ、透明性、個人の責任が報われるシステムを作ることで、これを変えます。Bitcoinネットワークでは、ルールは人ではなく数学によって施行されるため、腐敗や操作の余地はありません。

Bitcoinは長期的な思考、貯蓄、イノベーションを促進する方法でインセンティブを整合させます。個人が自分の経済的未来をコントロールする力を与え、仲介者なしで自由かつ安全に価値を移転できるグローバルコミュニティを育成します。だからこそBitcoinが必要なのです—インセンティブが適切に整合された世界を作り、すべての人にとってより公正で繁栄した社会につながるからです。

Bitcoinについて、そしてそれがあなたの経済生活だけでなく世界をどう変えることができるかを学ぶ一歩を踏み出してください。左からリンクを切り取り、この画期的な技術を探求してください。より良い未来への運動に参加しましょう。", - "url_message": "詳細についてはこのリンクをご覧ください。" - }, - "jesus": { - "name": "人生を変えるメッセージ", - "title": "良い知らせ", - "subtitle": "無視しないでください", - "headline": "真の希望を見つけよう", - "content": "Jesusとは誰か?彼は単なる歴史上の人物ではありません。彼は神の子であり、世界の救い主です。Jesus自身がこう言われました:「わたしは道であり、真理であり、命である。わたしを通らなければ、だれも父のもとに行くことができない」(ヨハネ14:6)。彼は神と人類の間の隔たりを埋めるために来られ、赦し、平和、永遠の命への道を私たちに提供してくださいました。

私たちは皆、人生の中で壊れを経験します—人間関係、心、あるいは世界においてです。Jesusはその壊れを癒すために来られました。完全な人生を送り、私たちの罪のために十字架で死に、そして復活し、死を打ち破り、神との永遠の命の希望を私たちに与えてくださいました。

Jesusなしでは、私たちは罪の中で迷い、神から引き離されています。しかし彼を通して、私たちは赦され、回復されることができます。彼は今のより良い人生だけでなく、彼との永遠の命の約束を私たちに提供してくださいます。だからこそ彼が必要なのです—Jesusの中にのみ、真の平和、目的、そして永遠の命の確信を見つけることができるからです。

Jesusについて、そして彼があなたの人生にもたらすことができる人生を変える影響について学ぶ一歩を踏み出してください。左からリンクを切り取り、その教えを探求してください。あなたが探していた希望を見つけてください。", - "url_message": "詳細についてはこのリンクをご覧ください。" - }, - "meshtastic": { - "name": "Meshtasticネットワークチラシ", - "title": "安全な通信", - "subtitle": "無視しないでください", - "headline": "緊急通信ネットワークを構築しよう", - "content": "なぜMeshtasticなのか?危機の時、従来の通信ネットワークは失敗し、私たちを孤立させ脆弱にする可能性があります。Meshtasticは強力な解決策を提供します—中央集権型システムから独立して動作する代替のローカル通信ネットワークです。緊急事態のために設計されており、最も重要な時に接続を維持することができます。

Meshtasticデバイスは、インターネットや携帯電話の電波がなくても、長距離にわたってメッセージを中継できるメッシュネットワークを構築します。この分散型アプローチにより、どのような状況でも通信が回復力があり信頼できることが保証されます。しかし、接続を維持するだけではありません—Meshtasticは暗号化も提供し、メッセージの安全性とプライバシーを確保します。

プライバシーがますます危険にさらされている世界で、Meshtasticはあなたに通信の制御を取り戻す力を与えます。地域のコミュニティ対応を調整する場合でも、災害時に大切な人と連絡を取り合う場合でも、単に予期せぬ事態に備える場合でも、Meshtasticは安全かつ効果的に通信するために必要なツールを提供します。

Meshtasticについて、そして独自の緊急通信ネットワークを構築する方法を学ぶ一歩を踏み出してください。左からリンクを切り取り、この革新的な技術を探求してください。何が起きても準備ができていることを確認しましょう。", - "url_message": "詳細についてはこのリンクをご覧ください。" - }, - "nostr": { - "name": "Nostrプロトコルチラシ", - "title": "ソーシャルフリーダム", - "subtitle": "無視しないでください", - "headline": "検閲に強いネットワークに参加しよう", - "content": "Nostrとは何か?従来のソーシャルメディアプラットフォームとは異なり、Nostrはプロトコルです—中央機関の制約なしにユーザーが接続し共有することを可能にする分散型システムです。Nostrは検閲に強く、あなたの声は企業や政府によって沈黙させられることはありません。エンゲージメントを意味のあるつながりよりも優先するアルゴリズムや広告の影響から自由に、オンラインプレゼンスの制御を提供するよう設計されています。

Nostrでは、あなたを無限スクロールに引き込む隠されたアジェンダはありません。アルゴリズムがあなたを最も長くオンラインに保つと考えるものではなく、あなた自身の条件でコンテンツと関わります。Nostrを使えば、プライバシーと自律性を維持しながら、本物のつながりを構築し、重要な会話に参加できます。

オンラインの言論がますます制御され操作される世界で、Nostrは新鮮な代替案を提供します。単なるプラットフォームではありません。それは真のデジタル自由への運動であり、あなたのインタラクションは最も多くの広告収入を生み出すものではなく、あなたの興味と価値観によって導かれます。

Nostrについて、そしてオンラインでの接続方法をどう変えることができるかを学ぶ一歩を踏み出してください。左からリンクを切り取り、この画期的なプロトコルを探求してください。自由と本物のインタラクションを重視するコミュニティに参加しましょう。", - "url_message": "詳細についてはこのリンクをご覧ください。" - }, - "voxvera": { - "name": "Vox Vera 印刷用チラシ", - "title": "極秘事項", - "subtitle": "~~配布禁止~~", - "headline": "作戦名:VOX VERA", - "content": "VoxVeraで検閲から解放されましょう。これは、匿名のゲリラマーケティングおよびメッセージ拡散ツールです。オンラインでも物理的な世界でも、Torを介したホスティングによって完全な匿名性に守られながら、自分の考えを大胆に広めることができます。コードをダウンロードし、フライヤーサイトをデザインし、オンラインで公開して、あなたのメッセージを増幅させてください。

ミームの力を利用して、学校、職場、オンラインコミュニティ、あるいは世界中にあなたのアイデアを共有しましょう。VoxVeraは、再印刷が簡単な独自のURLとQRコードを備えた切り取りセクションにより、あなたのメッセージが広く遠くまで響くことを保証します。

プライバシーは維持されます。フライヤーはTorネットワークを介して共有でき、ホスト側とユーザー側の両方を検閲から守ります。

真実と透明性を尊重する革命に加わりましょう。共に、声を上げることを恐れない、知識豊富な市民のネットワークを構築しましょう。", - "url_message": "VoxVeraを入手して、メッセージの拡散を始めましょう。" - } - } -} diff --git a/voxvera/locales/ja/docs/usage.md b/voxvera/locales/ja/docs/usage.md deleted file mode 100644 index 0189a9b..0000000 --- a/voxvera/locales/ja/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# 詳細な使い方 - -このガイドでは、一般的なCLIワークフローについて説明します。Dockerの手順については `docs/docker.md` を、利用可能なフライヤーテンプレートについては `docs/templates.md` を参照してください。 - -## 前提条件 - -VoxVeraは高いポータビリティを実現するように設計されており、システムへの依存関係は最小限です。 - -### 1. スタンドアロンバイナリ (推奨) -お使いのオペレーティングシステムに合わせて、依存関係のないスタンドアロンバイナリをダウンロードできます。 -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -これらのバイナリには、VoxVeraの実行に必要なすべてのものが含まれています(`onionshare-cli` を除く)。 - -### 2. ワンラインインストーラー -または、自動スクリプトを使用してインストールします。 - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. 手動でのPythonインストール -ソースから実行したい場合: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## ステップ・バイ・ステップ - -1. **初期化:** `voxvera init` を実行し、プロンプトに従います。最初に言語を選択するよう求められます。 -2. **ビルド:** フライヤーのアセットを生成します。ビルドを実行するたびに、フライヤーのフォルダ内に `voxvera-portable.zip` が自動的に作成されます。これにより、他の人があなたのフライヤーから直接ツール一式をダウンロードできるようになります。 - ```bash - voxvera build - ``` -3. **公開:** Torを介してフライヤーを公開します。 - ```bash - voxvera serve - ``` - これにより、実行中のTorインスタンスが自動的に検出され、OnionShareが起動し、生成された .onion アドレスがフライヤーの切り取りセクションのリンクに書き込まれます。 - -## 言語サポート - -VoxVeraは完全にローカライズされています。インタラクティブセレクターまたは直接ショートカットを使用して、言語設定を永続的に変更できます。 - -- **インタラクティブセレクター:** `voxvera lang` -- **直接ショートカット:** `voxvera --lang ja` (日本語に設定) - -### サポートされている言語: -- **英語:** `en` -- **スペイン語:** `es` (エイリアス: `--idioma`) -- **ドイツ語:** `de` (エイリアス: `--sprache`) -- **日本語:** `ja` - -永続的な設定を変更せずに、単一のコマンドに対して特定の言語を強制することもできます。 -- **英語:** `voxvera --lang en check` -- **日本語:** `voxvera --lang ja check` - -生成されたフライヤーは、訪問者のブラウザ言語を自動的に検出し、UIテキストをそれに応じて切り替えます。 - -## サーバー管理 - -単一のインタラクティブメニューから、複数のフライヤーとそのTorアイデンティティを管理できます。 - -```bash -voxvera manage -``` - -機能: -- **{{t('cli.manage_create_new')}}**: セットアップシーケンスを最初から開始します。 -- **{{t('cli.manage_start_all')}}**: 管理下のすべてのフライヤーを一括で起動またはシャットダウンします。 -- **リアルタイムステータス**: アクティブな .onion URLやTorの起動プログレスインジケーターを表示します。 -- **個別制御**: 特定のサイトをZIPに {{t('cli.manage_action_export')}} したり、削除したりできます。 - -## ユニバーサルミラーリング(バイラル拡散) - -中央のリポジトリが検閲された場合でもVoxVeraを利用し続けられるように、すべてのフライヤーがツールのミラーとして機能します。 - -フライヤーをホストすると、ランディングページの **「{{t('web.download_button')}}」** ボタンから以下のものを含む `voxvera-portable.zip` が提供されます。 -- すべてのサポート言語を含む完全なソースコード。 -- すべてのPython依存関係(事前ベンダー化済み)。 -- クロスプラットフォームのTorバイナリ。 - -これにより、あなたのフライヤーをスキャンした誰もが、VoxVeraツールの新しい配布者になることができます。 - -## エクスポートとバックアップ - -独自のTorアイデンティティ(.onion URLが変更されないようにするため)をバックアップしたり、フライヤーを別のマシンに移動したりできます。 - -- **単一サイトのエクスポート**: `voxvera export <フォルダ名>` -- **全サイトのエクスポート**: `voxvera export-all` - -**保存場所:** すべてのエクスポートは、すべてのプラットフォームでユーザーのホームディレクトリにある `~/voxvera-exports/` フォルダに保存されます。 - -## インポートと復元 - -ZIPファイルを `~/voxvera-exports/` に移動して以下を実行することで、新しいマシンでセットアップ全体を復元できます。 - -```bash -voxvera import-multiple -``` - -## ポータビリティとオフライン利用 - -インターネット接続のないマシンでVoxVeraを実行する必要がある場合は、まず依存関係を「ベンダー化」できます。 - -```bash -voxvera vendorize -``` - -これにより、必要なすべてのPythonライブラリが `voxvera/vendor/` にダウンロードされます。ツールはこれらのローカルファイルを優先的に使用するため、 `pip install` なしで実行できるようになります。 - -## 一括インポート (JSON) - -複数のJSON設定ファイルからフライヤーを一括生成するには、それらを `imports/` ディレクトリに配置して以下を実行します。 - -```bash -voxvera batch-import -``` - -## URLの仕組み - -各フライヤーには2つの異なるURLがあります。 -- **切り取り用リンク** (自動生成): フライヤーがホストされている .onion アドレス。 -- **コンテンツリンク** (ユーザー設定): ウェブサイト、動画、またはダウンロードを指す外部URL。 - -.onion アドレスを手動で入力する必要はありません。VoxVeraが `serve` フェーズ中に自動的に処理します。 diff --git a/voxvera/locales/pt.json b/voxvera/locales/pt.json deleted file mode 100644 index dd28a65..0000000 --- a/voxvera/locales/pt.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "Português", - "flag": "🇧🇷", - "direction": "ltr" - }, - "cli": { - "dep_check_header": "Verificação de Dependências", - "dep_found": "encontrado", - "dep_missing": "ausente", - "all_deps_installed": "Todas as dependências estão instaladas.", - "missing_deps_error": "Algumas dependências estão ausentes. Execute: pip install 'voxvera[all]'", - "init_name": "Nome", - "init_folder": "Nome da pasta", - "init_title": "Título", - "init_subtitle": "Subtítulo", - "init_headline": "Manchete", - "init_body": "Texto da mensagem", - "init_links": "Links", - "edit_again": "Editar novamente?", - "body_length": "Comprimento do corpo", - "body_limit_exceeded": "excede o limite", - "url_label": "URL (link de conteúdo - recurso externo)", - "url_message_label": "Mensagem da URL", - "footer_message_label": "Mensagem de rodapé", - "template_not_found": "Modelo {name} não encontrado", - "template_copied": "Modelo copiado para {dest}", - "flyer_created": "Arquivos do panfleto criados em {dest}", - "dir_not_found": "Diretório {dir_path} não encontrado", - "onionshare_error": "OnionShare para {folder_name} saiu inesperadamente.", - "onionshare_causes": "Causas comuns: Rede bloqueada, relógio do sistema impreciso ou OnionShare já em execução.", - "onionshare_logs_tip": "Veja {logfile} para logs completos.", - "onion_url_msg": "[{folder_name}] URL Onion: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare em execução (PID {pid}).", - "export_not_found": "Erro: Pasta do site '{folder_name}' não encontrada em {host_root}", - "export_success": "Exportado '{folder_name}' para {output_path}", - "export_all_none": "Nenhum site encontrado para exportar.", - "export_all_starting": "Exportando {count} sites para {dir}...", - "export_all_complete": "Exportação total concluída.", - "import_zip_not_found": "Erro: Arquivo Zip '{path}' não encontrado.", - "import_invalid_config": "Erro: Arquivo de exportação inválido. 'config.json' ausente.", - "import_invalid_folder": "Erro: config.json inválido. 'folder_name' ausente.", - "import_overwrite_confirm": "O site '{folder_name}' já existe. Sobrescrever?", - "import_cancelled": "Importação cancelada.", - "import_success": "Importado com sucesso '{folder_name}' para {dest_dir}", - "import_dir_not_found": "Erro: Diretório '{dir}' não encontrado.", - "import_multiple_none": "Nenhum arquivo zip encontrado em {dir}", - "import_multiple_found": "Encontrado {count} site(s) para importar de {dir}...", - "importing_file": "Importando {name}...", - "import_multiple_complete": "Importação múltipla concluída.", - "batch_import_none": "Nenhum arquivo JSON encontrado em imports", - "batch_import_processing": "Processando {file}", - "stop_server_not_running": "O servidor {folder_name} não está em execução.", - "stop_server_success": "Parado {folder_name} (PID {pid})", - "delete_server_success": "Servidor {folder_name} excluído", - "manage_select_server": "Selecione um servidor para gerenciar (ou Sair):", - "manage_create_new": "--- Criar Novo Site/Panfleto ---", - "manage_start_all": "--- Iniciar Todos os Sites ---", - "manage_stop_all": "--- Parar Todos os Sites ---", - "manage_export_all": "--- Exportar Todos os Sites ---", - "manage_import_multiple": "--- Importar Múltiplos Sites ---", - "manage_exit": "Sair", - "manage_startup_summary": "Resumo de Inicialização", - "manage_press_enter": "Pressione Enter para continuar", - "manage_action_menu": "Gerenciar {name}:", - "manage_action_toggle_stop": "Parar", - "manage_action_toggle_start": "Iniciar", - "manage_action_export": "Exportar para Zip", - "manage_action_delete": "Excluir", - "manage_action_back": "Voltar", - "manage_delete_confirm": "Tem certeza que deseja excluir {name}?", - "bootstrapping_msg": "[{name}] Conectando aos repetidores Tor e configurando serviço oculto...", - "bootstrapping_progress": "[{name}] Inicialização do Tor: {progress}% ...", - "no_urls_qr_skip": "Nenhuma URL configurada ainda. Os códigos QR serão gerados após 'voxvera serve'", - "input_file_not_found": "Arquivo de entrada {path} não existe.", - "attachment_path_label": "Caminho do arquivo anexo (opcional - será servido pelo site Tor)", - "manage_action_edit": "Editar", - "manage_templates": "--- Criar a partir de Modelo ---", - "template_select": "Selecione um modelo:", - "body_over_limit_warning": "Aviso: O texto do corpo excede 1000 caracteres. Pode ser cortado no panfleto.", - "manage_action_export_keys": "Exportar Chaves", - "manage_action_import_keys": "Importar Chaves", - "keys_not_found": "Nenhuma chave de sessão encontrada para '{name}'. Inicie o site primeiro para gerar as chaves.", - "keys_export_header": "Chave de sessão para '{name}':", - "keys_export_hint": "Copie esta chave e guarde-a com segurança. Use 'Importar Chaves' em outra instância para restaurar.", - "keys_site_not_found": "Site '{name}' não encontrado.", - "keys_overwrite_confirm": "O site '{name}' já possui uma chave. Sobrescrever?", - "keys_import_cancelled": "Importação cancelada.", - "keys_import_prompt": "Cole a chave de sessão base64 abaixo:", - "keys_import_empty": "Nenhuma chave fornecida.", - "keys_import_invalid": "Formato de chave inválido. Deve ser uma string base64 válida.", - "keys_import_success": "Chave de sessão importada para '{name}'. Reinicie o site para usar a nova chave." - }, - "web": { - "tear_off_tor_browser": "Use o Tor Browser", - "tear_off_desc": "para ajudar a espalhar esta mensagem vá para", - "tear_off_footer": "clique no botão abaixo para imprimir", - "built_with": "construído com", - "print_button": "Imprimir Panfleto", - "download_button": "Baixar Ferramenta e Código", - "download_attachment": "Baixar anexo" - }, - "landing": { - "title": "ALTO SECRETO", - "subtitle": "~~NÃO~~ DISTRIBUIR", - "headline": "OPERAÇÃO VOX VERA", - "content": "Liberte-se da censura com o VoxVera. Uma ferramenta anônima de marketing de guerrilha e propagação de mensagens. Seja online ou no mundo físico, ela pode capacitá-lo a espalhar suas ideias com audácia, protegido por anonimato completo (se você hospedar via Tor). Baixe o código, projete um site de panfleto, hospede-o online e amplifique sua mensagem.

Use o poder memético para compartilhar suas ideias em sua escola, local de trabalho, comunidades online ou até mesmo globalmente. O VoxVera garante que sua mensagem ressoe longe e amplamente, com seções destacáveis apresentando URLs e códigos QR exclusivos para fácil reimpressão.

A privacidade pode ser mantida. Panfletos podem ser compartilhados via rede Tor, protegendo quem hospeda e quem usa contra censura.

Junte-se a nós em uma revolução que valoriza a verdade e a transparência. Juntos, podemos construir uma rede de cidadãos informados que não têm medo de falar.", - "url_message": "Obtenha o VoxVera e comece a espalhar sua mensagem.", - "name": "Panfletos Imprimíveis Vox Vera" - }, - "templates": { - "aosp": { - "name": "Projeto AOS", - "title": "ANDROID LIBERTADO", - "subtitle": "SEM FRONTEIRAS", - "headline": "LIBERDADE DE CÓDIGO ABERTO", - "content": "O Android Open Source Project (AOSP) representa a essência do que o Android foi originalmente projetado para ser: uma plataforma aberta, transparente e adaptável. Ele remove as camadas de software proprietário e supervisão corporativa que se tornaram sinônimo das distribuições Android tradicionais. Com o AOSP, você obtém acesso a uma versão crua e não filtrada do Android, permitindo que você realmente faça do seu dispositivo o seu próprio.

Para desenvolvedores, o AOSP oferece um playground de possibilidades, onde os únicos limites são suas habilidades e imaginação. Ele serve como base para inúmeras ROMs personalizadas, cada uma adaptada a necessidades específicas, seja para desempenho aprimorado, privacidade ou recursos exclusivos que as versões tradicionais não possuem. Os entusiastas da privacidade apreciarão a ausência de bloatware pré-instalado e serviços de rastreamento que frequentemente acompanham o Android de fábrica.

O AOSP não é apenas para desenvolvedores ou entusiastas de tecnologia; é para qualquer pessoa que valorize a liberdade digital. Ele permite que você recupere o controle do seu dispositivo, adaptando-o às suas necessidades sem as restrições de operadoras ou fabricantes. Descubra como o AOSP pode transformar sua experiência móvel. Comece sua jornada rumo a um futuro mais aberto e personalizável hoje.", - "url_message": "Visite o link abaixo para saber mais." - }, - "bitcoin": { - "name": "Panfletos da Revolução Bitcoin", - "title": "REGRAS SEM GOVERNANTES", - "subtitle": "NÃO IGNORE", - "headline": "JUNTE-SE À REVOLUÇÃO BITCOIN", - "content": "O que é Bitcoin? É mais do que apenas dinheiro digital; é uma tecnologia revolucionária projetada para resolver alguns dos problemas mais urgentes do mundo. O Bitcoin opera em uma rede descentralizada, livre do controle de qualquer governo ou autoridade central. Isso garante que ninguém possa manipular sua oferta ou valor, tornando-o uma forma sólida de dinheiro que protege sua riqueza da inflação.

Nosso sistema financeiro atual é construído sobre incentivos falhos—encorajando dívida, dependência e centralização de poder. O Bitcoin muda isso criando um sistema onde honestidade, transparência e responsabilidade individual são recompensadas. Na rede Bitcoin, não há espaço para corrupção ou manipulação porque as regras são aplicadas pela matemática, não por pessoas.

O Bitcoin alinha incentivos de forma a promover pensamento de longo prazo, poupança e inovação. Ele capacita indivíduos a assumir o controle de seu futuro financeiro, fomentando uma comunidade global onde valor pode ser transferido livre e seguramente sem intermediários. É por isso que precisamos do Bitcoin—porque ele cria um mundo onde os incentivos estão corretamente alinhados, levando a uma sociedade mais justa e próspera para todos.

Dê o passo para aprender mais sobre Bitcoin e como ele pode transformar não apenas sua vida financeira, mas o mundo. Destaque um link à esquerda e explore esta tecnologia revolucionária. Junte-se ao movimento por um futuro melhor.", - "url_message": "Siga este link para saber mais." - }, - "jesus": { - "name": "Mensagem que Muda Vidas", - "title": "BOAS NOVAS", - "subtitle": "NÃO IGNORE", - "headline": "DESCUBRA A VERDADEIRA ESPERANÇA", - "content": "Quem é Jesus? Ele é mais do que apenas uma figura histórica; Ele é o Filho de Deus, o Salvador do mundo. O próprio Jesus disse: 'Eu sou o caminho, a verdade e a vida. Ninguém vem ao Pai senão por mim' (João 14:6). Ele veio para preencher a lacuna entre Deus e a humanidade, oferecendo-nos um caminho para o perdão, a paz e a vida eterna.

Todos nós enfrentamos quebrantamento em nossas vidas—seja em nossos relacionamentos, nossos corações ou nosso mundo. Jesus veio para curar esse quebrantamento. Ele viveu uma vida perfeita, morreu na cruz pelos nossos pecados e ressuscitou, vencendo a morte e oferecendo-nos a esperança da vida eterna com Deus.

Sem Jesus, estamos perdidos em nosso pecado, separados de Deus. Mas através Dele, podemos ser perdoados e restaurados. Ele nos oferece não apenas uma vida melhor agora, mas a promessa de uma vida eterna com Ele. É por isso que precisamos Dele—porque somente em Jesus podemos encontrar verdadeira paz, propósito e a garantia da vida eterna.

Dê o passo para aprender mais sobre Jesus e o impacto transformador que Ele pode ter em sua vida. Destaque um link à esquerda e explore Seus ensinamentos. Encontre a esperança que você tem buscado.", - "url_message": "Siga este link para saber mais." - }, - "meshtastic": { - "name": "Panfletos da Rede Meshtastic", - "title": "COMUNICAÇÕES SEGURAS", - "subtitle": "NÃO IGNORE", - "headline": "CONSTRUA SUA REDE DE EMERGÊNCIA", - "content": "Por que Meshtastic? Em tempos de crise, as redes de comunicação tradicionais podem falhar, deixando-nos isolados e vulneráveis. O Meshtastic oferece uma solução poderosa—uma rede de comunicação local alternativa que opera independentemente de sistemas centralizados. Ele é projetado para situações de emergência, permitindo que você permaneça conectado quando mais importa.

Os dispositivos Meshtastic criam uma rede mesh que pode retransmitir mensagens por longas distâncias, mesmo sem cobertura de internet ou celular. Essa abordagem descentralizada garante que suas comunicações sejam resilientes e confiáveis, independentemente das circunstâncias. Mas não se trata apenas de permanecer conectado—o Meshtastic também oferece criptografia, para que suas mensagens permaneçam seguras e privadas.

Em um mundo onde a privacidade está cada vez mais comprometida, o Meshtastic capacita você a assumir o controle de sua comunicação. Seja coordenando uma resposta comunitária local, mantendo contato com entes queridos durante um desastre ou simplesmente se preparando para o inesperado, o Meshtastic fornece as ferramentas necessárias para se comunicar de forma segura e eficaz.

Dê o passo para aprender mais sobre Meshtastic e como você pode construir sua própria rede de comunicação de emergência. Destaque um link à esquerda e explore esta tecnologia inovadora. Garanta que você esteja preparado para o que vier.", - "url_message": "Siga este link para saber mais." - }, - "nostr": { - "name": "Panfletos do Protocolo Nostr", - "title": "LIBERDADE SOCIAL", - "subtitle": "NÃO IGNORE", - "headline": "JUNTE-SE À REDE RESISTENTE À CENSURA", - "content": "O que é Nostr? Ao contrário das plataformas de mídia social tradicionais, Nostr é um protocolo—um sistema descentralizado que capacita os usuários a se conectar e compartilhar sem as restrições de uma autoridade central. Nostr é resistente à censura, o que significa que sua voz não pode ser silenciada por corporações ou governos. Ele é projetado para dar a você controle sobre sua presença online, livre da influência de algoritmos ou anúncios que priorizam engajamento sobre conexões significativas.

No Nostr, não há agendas ocultas para mantê-lo rolando infinitamente. Você interage com o conteúdo em seus próprios termos, não com base no que um algoritmo pensa que vai mantê-lo online por mais tempo. O Nostr permite que você construa conexões genuínas e participe de conversas que importam, tudo enquanto mantém sua privacidade e autonomia.

Em um mundo onde o discurso online é cada vez mais controlado e manipulado, o Nostr oferece uma alternativa refrescante. Não é apenas uma plataforma; é um movimento em direção à verdadeira liberdade digital, onde suas interações são guiadas por seus interesses e valores, não pelo que gera mais receita publicitária.

Dê o passo para aprender mais sobre Nostr e como ele pode transformar a maneira como você se conecta online. Destaque um link à esquerda e explore este protocolo revolucionário. Junte-se a uma comunidade que valoriza liberdade e interação autêntica.", - "url_message": "Siga este link para saber mais." - }, - "voxvera": { - "name": "Panfletos Imprimíveis Vox Vera", - "title": "ALTO SECRETO", - "subtitle": "~~NÃO~~ DISTRIBUIR", - "headline": "OPERAÇÃO VOX VERA", - "content": "Liberte-se da censura com o VoxVera. Uma ferramenta anônima de marketing de guerrilha e propagação de mensagens. Seja online ou no mundo físico, ela pode capacitá-lo a espalhar suas ideias com audácia, protegido por anonimato completo (se você hospedar via Tor). Baixe o código, projete um site de panfleto, hospede-o online e amplifique sua mensagem.

Use o poder memético para compartilhar suas ideias em sua escola, local de trabalho, comunidades online ou até mesmo globalmente. O VoxVera garante que sua mensagem ressoe longe e amplamente, com seções destacáveis apresentando URLs e códigos QR exclusivos para fácil reimpressão.

A privacidade pode ser mantida. Panfletos podem ser compartilhados via rede Tor, protegendo quem hospeda e quem usa contra censura.

Junte-se a nós em uma revolução que valoriza a verdade e a transparência. Juntos, podemos construir uma rede de cidadãos informados que não têm medo de falar.", - "url_message": "Obtenha o VoxVera e comece a espalhar sua mensagem." - } - } -} diff --git a/voxvera/locales/pt/docs/usage.md b/voxvera/locales/pt/docs/usage.md deleted file mode 100644 index e97d739..0000000 --- a/voxvera/locales/pt/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Uso Detalhado - -Este guia cobre os fluxos de trabalho comuns da CLI. Veja `docs/docker.md` para instruções do Docker e `docs/templates.md` para modelos de panfletos disponíveis. - -## Pré-requisitos - -O VoxVera foi projetado para ser altamente portátil e requer dependências mínimas do sistema. - -### 1. Binários Independentes (Recomendado) -Você pode baixar binários independentes e sem dependências para o seu sistema operacional: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Estes binários incluem tudo o que é necessário para executar o VoxVera (exceto o `onionshare-cli`). - -### 2. Instalador de Linha Única -Alternativamente, instale através do nosso script automatizado: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Instalação Manual via Python -Se preferir executar a partir do código-fonte: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Passo a Passo - -1. **Inicializar:** Execute `voxvera init` e siga as instruções. Você será solicitado a selecionar seu idioma primeiro. -2. **Construir:** Gere os arquivos do panfleto. Cada construção cria automaticamente um `voxvera-portable.zip` na pasta do panfleto, permitindo que outros baixem a ferramenta completa diretamente do seu panfleto. - ```bash - voxvera build - ``` -3. **Servir:** Publique o panfleto via Tor: - ```bash - voxvera serve - ``` - Isso detecta automaticamente sua instância do Tor, inicia o OnionShare e escreve o endereço .onion gerado nos links destacáveis do panfleto. - -## Suporte a Idiomas - -O VoxVera é totalmente localizado. Você pode alterar sua preferência de idioma permanentemente usando o seletor interativo ou um atalho direto: - -- **Seletor Interativo:** `voxvera lang` -- **Atalho Direto:** `voxvera --lang pt` (define a preferência para português) - -### Idiomas Suportados: -- **Inglês:** `en` -- **Espanhol:** `es` (alias: `--idioma`) -- **Alemão:** `de` (alias: `--sprache`) -- **Português:** `pt` - -Você também pode forçar um idioma específico para um único comando sem alterar sua preferência permanente: -- **Inglês:** `voxvera --lang en check` -- **Português:** `voxvera --lang pt check` - -Os panfletos gerados detectam automaticamente o idioma do navegador do visitante e alteram o texto da interface adequadamente. - -## Gerenciamento de Servidores - -Gerencie vários panfletos e suas identidades Tor a partir de um único menu interativo: - -```bash -voxvera manage -``` - -Recursos: -- **{{t('cli.manage_create_new')}}**: Inicia a sequência completa de configuração. -- **{{t('cli.manage_start_all')}}**: Inicia ou encerra todos os panfletos da sua frota de uma só vez. -- **Status em Tempo Real**: Visualize URLs .onion ativas e indicadores de progresso de inicialização do Tor. -- **Controle Individual**: {{t('cli.manage_action_export')}} sites específicos para ZIP ou exclua-os. - -## Espelhamento Universal (Distribuição Viral) - -Para garantir que o VoxVera permaneça acessível mesmo se os repositórios centrais forem censurados, cada panfleto atua como um espelho para a ferramenta. - -Quando você hospeda um panfleto, o botão **"{{t('web.download_button')}}"** na página inicial fornece um `voxvera-portable.zip` contendo: -- O código-fonte completo e todos os idiomas suportados. -- Todas as dependências Python (pré-vendidas). -- Binários Tor multiplataforma. - -Isso permite que qualquer pessoa que escaneie seu panfleto se torne um novo distribuidor da ferramenta VoxVera. - -## Exportação e Backup - -Faça backup de suas identidades Tor exclusivas (para que sua URL .onion nunca mude) ou mova seus panfletos para outra máquina. - -- **Exportar um único site**: `voxvera export ` -- **Exportar todos os sites**: `voxvera export-all` - -**Local de armazenamento:** Todas as exportações são salvas como arquivos ZIP em uma pasta chamada `voxvera-exports` no diretório inicial do usuário (`~/voxvera-exports/`) em todas as plataformas. - -## Importação e Recuperação - -Restaure toda a sua configuração em uma nova máquina movendo seus arquivos ZIP para `~/voxvera-exports/` e executando: - -```bash -voxvera import-multiple -``` - -## Portabilidade e Uso Offline - -Se precisar executar o VoxVera em uma máquina sem acesso à internet, você pode "venderizar" as dependências primeiro: - -```bash -voxvera vendorize -``` - -Isso baixa todas as bibliotecas Python necessárias para `voxvera/vendor/`. A ferramenta priorizará esses arquivos locais, permitindo que ela funcione sem `pip install`. - -## Importação em Lote (JSON) - -Para gerar panfletos em massa a partir de vários arquivos de configuração JSON, coloque-os no diretório `imports/` e execute: - -```bash -voxvera batch-import -``` - -## Como as URLs Funcionam - -Cada panfleto tem duas URLs separadas: -- **Link destacável** (gerado automaticamente): O endereço .onion onde o panfleto está hospedado. -- **Link de conteúdo** (configurado pelo usuário): Uma URL externa apontando para um site, vídeo ou download. - -Você não precisa inserir manualmente o endereço .onion; o VoxVera lida com isso automaticamente durante a fase de `serve`. diff --git a/voxvera/locales/ru.json b/voxvera/locales/ru.json deleted file mode 100644 index 874ff4f..0000000 --- a/voxvera/locales/ru.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "Русский", - "flag": "🇷🇺", - "direction": "ltr" - }, - "cli": { - "dep_check_header": "Проверка зависимостей", - "dep_found": "найдено", - "dep_missing": "отсутствует", - "all_deps_installed": "Все зависимости установлены.", - "missing_deps_error": "Некоторые зависимости отсутствуют. Выполните: pip install 'voxvera[all]'", - "init_name": "Имя", - "init_folder": "Имя папки", - "init_title": "Заголовок", - "init_subtitle": "Подзаголовок", - "init_headline": "Главный заголовок", - "init_body": "Текст сообщения", - "init_links": "Ссылки", - "edit_again": "Редактировать снова?", - "body_length": "Длина текста", - "body_limit_exceeded": "превышает лимит", - "url_label": "URL (ссылка на контент - внешний ресурс)", - "url_message_label": "Сообщение URL", - "footer_message_label": "Сообщение внизу страницы", - "template_not_found": "Шаблон {name} не найден", - "template_copied": "Шаблон скопирован в {dest}", - "flyer_created": "Файлы листовки созданы в {dest}", - "dir_not_found": "Директория {dir_path} не найдена", - "onionshare_error": "OnionShare для {folder_name} неожиданно завершил работу.", - "onionshare_causes": "Общие причины: заблокирована сеть, неточное системное время или OnionShare уже запущен.", - "onionshare_logs_tip": "Полные логи см. в {logfile}.", - "onion_url_msg": "[{folder_name}] Onion-URL: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare запущен (PID {pid}).", - "export_not_found": "Ошибка: папка сайта '{folder_name}' не найдена в {host_root}", - "export_success": "Экспортировано '{folder_name}' в {output_path}", - "export_all_none": "Сайты для экспорта не найдены.", - "export_all_starting": "Экспорт {count} сайтов в {dir}...", - "export_all_complete": "Общий экспорт завершен.", - "import_zip_not_found": "Ошибка: Zip-файл '{path}' не найден.", - "import_invalid_config": "Ошибка: неверный файл экспорта. Отсутствует 'config.json'.", - "import_invalid_folder": "Ошибка: неверный config.json. Отсутствует 'folder_name'.", - "import_overwrite_confirm": "Сайт '{folder_name}' уже существует. Перезаписать?", - "import_cancelled": "Импорт отменен.", - "import_success": "Сайт '{folder_name}' успешно импортирован в {dest_dir}", - "import_dir_not_found": "Ошибка: Директория '{dir}' не найдена.", - "import_multiple_none": "Zip-файлы в {dir} не найдены", - "import_multiple_found": "Найдено {count} сайт(ов) для импорта из {dir}...", - "importing_file": "Импорт {name}...", - "import_multiple_complete": "Множественный импорт завершен.", - "batch_import_none": "JSON-файлы в imports не найдены", - "batch_import_processing": "Обработка {file}", - "stop_server_not_running": "Сервер {folder_name} не запущен.", - "stop_server_success": "{folder_name} остановлен (PID {pid})", - "delete_server_success": "Сервер {folder_name} удален", - "manage_select_server": "Выберите сервер для управления (или Выход):", - "manage_create_new": "--- Создать новый сайт/листовку ---", - "manage_start_all": "--- Запустить все сайты ---", - "manage_stop_all": "--- Остановить все сайты ---", - "manage_export_all": "--- Экспортировать все сайты ---", - "manage_import_multiple": "--- Импортировать несколько сайтов ---", - "manage_exit": "Выход", - "manage_startup_summary": "Сводка запуска", - "manage_press_enter": "Нажмите Enter для продолжения", - "manage_action_menu": "Управление {name}:", - "manage_action_toggle_stop": "Остановить", - "manage_action_toggle_start": "Запустить", - "manage_action_export": "Экспорт в Zip", - "manage_action_delete": "Удалить", - "manage_action_back": "Назад", - "manage_delete_confirm": "Вы уверены, что хотите удалить {name}?", - "bootstrapping_msg": "[{name}] Подключение к реле Tor и настройка скрытого сервиса...", - "bootstrapping_progress": "[{name}] Загрузка Tor: {progress}% ...", - "no_urls_qr_skip": "URL еще не настроены. QR-коды будут созданы после 'voxvera serve'", - "input_file_not_found": "Входной файл {path} не существует.", - "attachment_path_label": "Путь к файлу вложения (необязательно - будет доступен с сайта Tor)", - "manage_action_edit": "Редактировать", - "manage_templates": "--- Создать из шаблона ---", - "template_select": "Выберите шаблон:", - "body_over_limit_warning": "Предупреждение: Текст превышает 1000 символов. Он может быть обрезан на листовке.", - "manage_action_export_keys": "Экспорт ключей", - "manage_action_import_keys": "Импорт ключей", - "keys_not_found": "Сессионный ключ для '{name}' не найден. Сначала запустите сайт для генерации ключей.", - "keys_export_header": "Сессионный ключ для '{name}':", - "keys_export_hint": "Скопируйте этот ключ и сохраните его в безопасности. Используйте 'Импорт ключей' на другом экземпляре для восстановления.", - "keys_site_not_found": "Сайт '{name}' не найден.", - "keys_overwrite_confirm": "У сайта '{name}' уже есть ключ. Перезаписать?", - "keys_import_cancelled": "Импорт отменён.", - "keys_import_prompt": "Вставьте сессионный ключ base64 ниже:", - "keys_import_empty": "Ключ не предоставлен.", - "keys_import_invalid": "Неверный формат ключа. Должна быть допустимая строка base64.", - "keys_import_success": "Сессионный ключ импортирован для '{name}'. Перезапустите сайт для использования нового ключа." - }, - "web": { - "tear_off_tor_browser": "Используйте Tor Browser", - "tear_off_desc": "чтобы помочь распространить это сообщение, перейдите на", - "tear_off_footer": "нажмите кнопку ниже, чтобы распечатать", - "built_with": "создано с помощью", - "print_button": "Печать листовки", - "download_button": "Скачать инструмент и код", - "download_attachment": "Скачать вложение" - }, - "landing": { - "title": "СОВЕРШЕННО СЕКРЕТНО", - "subtitle": "~~НЕ~~ РАСПРОСТРАНЯТЬ", - "headline": "ОПЕРАЦИЯ VOX VERA", - "content": "Освободитесь от цензуры с помощью VoxVera. Анонимный инструмент для партизанского маркетинга и распространения сообщений. Будь то в сети или в физическом мире, он дает вам возможность смело распространять свои идеи, будучи защищенным полной анонимностью (при хостинге через Tor). Скачайте код, создайте сайт-листовку, разместите его в сети и усильте свой голос.

Используйте силу мемов, чтобы поделиться своими идеями в школе, на работе, в онлайн-сообществах или даже по всему миру. VoxVera гарантирует, что ваше сообщение найдет отклик повсюду, благодаря отрывным разделам с уникальными URL-адресами и QR-кодами для легкой перепечатки.

Конфиденциальность может быть сохранена. Листовками можно делиться через сеть Tor, защищая хостера и пользователей от цензуры.

Присоединяйтесь к нам в революции, которая ценит правду и прозрачность. Вместе мы сможем построить сеть информированных граждан, которые не боятся высказываться.", - "url_message": "Получите VoxVera и начните распространять свое сообщение.", - "name": "Листовки Vox Vera для печати" - }, - "templates": { - "aosp": { - "name": "Проект AOS", - "title": "ANDROID БЕЗ ОКОВ", - "subtitle": "БЕЗ ГРАНИЦ", - "headline": "СВОБОДА ОТКРЫТОГО КОДА", - "content": "Android Open Source Project (AOSP) воплощает суть того, чем Android изначально должен был быть: открытая, прозрачная и адаптируемая платформа. Он удаляет слои проприетарного программного обеспечения и корпоративного контроля, ставшие синонимом основных дистрибутивов Android. С AOSP вы получаете доступ к сырой, нефильтрованной версии Android, позволяющей по-настоящему сделать устройство своим.

Для разработчиков AOSP предлагает площадку возможностей, где единственные ограничения — это ваши навыки и воображение. Он служит основой для бесчисленных пользовательских прошивок, каждая из которых адаптирована под конкретные нужды: улучшенная производительность, конфиденциальность или уникальные функции, отсутствующие в массовых версиях. Энтузиасты приватности оценят отсутствие предустановленного раздутого ПО и служб отслеживания, которые часто поставляются со стоковым Android.

AOSP не только для разработчиков или техноэнтузиастов — он для всех, кто ценит цифровую свободу. Он позволяет вернуть контроль над своим устройством, настроив его под свои нужды без ограничений операторов или производителей. Узнайте, как AOSP может преобразить ваш мобильный опыт. Начните свой путь к более открытому, настраиваемому будущему уже сегодня.", - "url_message": "Перейдите по ссылке ниже, чтобы узнать больше." - }, - "bitcoin": { - "name": "Листовки революции Bitcoin", - "title": "ПРАВИЛА БЕЗ ПРАВИТЕЛЕЙ", - "subtitle": "НЕ ИГНОРИРУЙТЕ", - "headline": "ПРИСОЕДИНЯЙТЕСЬ К РЕВОЛЮЦИИ BITCOIN", - "content": "Что такое Bitcoin? Это больше, чем цифровые деньги — это революционная технология, призванная решить одни из самых насущных проблем мира. Bitcoin работает в децентрализованной сети, свободной от контроля любого правительства или центрального органа. Это гарантирует, что никто не сможет манипулировать его предложением или стоимостью, делая его надёжной формой денег, защищающей ваше богатство от инфляции.

Наша нынешняя финансовая система построена на ущербных стимулах — поощряя долг, зависимость и централизацию власти. Bitcoin меняет это, создавая систему, где честность, прозрачность и личная ответственность вознаграждаются. В сети Bitcoin нет места коррупции или манипуляциям, потому что правила обеспечиваются математикой, а не людьми.

Bitcoin выстраивает стимулы таким образом, чтобы способствовать долгосрочному мышлению, сбережениям и инновациям. Он даёт людям возможность контролировать своё финансовое будущее, создавая глобальное сообщество, где ценность может передаваться свободно и безопасно без посредников. Вот почему нам нужен Bitcoin — потому что он создаёт мир, где стимулы правильно выстроены, ведя к более справедливому и процветающему обществу для всех.

Сделайте шаг, чтобы узнать больше о Bitcoin и о том, как он может преобразить не только вашу финансовую жизнь, но и весь мир. Оторвите ссылку слева и исследуйте эту прорывную технологию. Присоединяйтесь к движению за лучшее будущее.", - "url_message": "Перейдите по этой ссылке, чтобы узнать больше." - }, - "jesus": { - "name": "Послание, изменяющее жизнь", - "title": "БЛАГАЯ ВЕСТЬ", - "subtitle": "НЕ ИГНОРИРУЙТЕ", - "headline": "ОТКРОЙТЕ ИСТИННУЮ НАДЕЖДУ", - "content": "Кто такой Jesus? Он больше, чем просто историческая личность — Он Сын Божий, Спаситель мира. Сам Jesus сказал: «Я есмь путь и истина и жизнь. Никто не приходит к Отцу, как только через Меня» (Иоанна 14:6). Он пришёл, чтобы перекинуть мост между Богом и человечеством, предлагая нам путь к прощению, миру и вечной жизни.

Все мы сталкиваемся с разрушением в нашей жизни — будь то в отношениях, в сердцах или в нашем мире. Jesus пришёл исцелить это разрушение. Он прожил совершенную жизнь, умер на кресте за наши грехи и воскрес, победив смерть и даровав нам надежду на вечную жизнь с Богом.

Без Jesus мы потеряны в своём грехе, отделены от Бога. Но через Него мы можем быть прощены и восстановлены. Он предлагает нам не только лучшую жизнь сейчас, но и обещание вечной жизни с Ним. Вот почему Он нам нужен — потому что только в Jesus мы можем найти истинный мир, цель и уверенность в вечной жизни.

Сделайте шаг, чтобы узнать больше о Jesus и о жизнеизменяющем влиянии, которое Он может оказать на вашу жизнь. Оторвите ссылку слева и исследуйте Его учение. Найдите надежду, которую вы искали.", - "url_message": "Перейдите по этой ссылке, чтобы узнать больше." - }, - "meshtastic": { - "name": "Листовки сети Meshtastic", - "title": "ЗАЩИЩЁННАЯ СВЯЗЬ", - "subtitle": "НЕ ИГНОРИРУЙТЕ", - "headline": "СОЗДАЙТЕ СВОЮ АВАРИЙНУЮ СЕТЬ", - "content": "Почему Meshtastic? Во время кризиса традиционные сети связи могут выйти из строя, оставив нас изолированными и уязвимыми. Meshtastic предоставляет мощное решение — альтернативную локальную сеть связи, работающую независимо от централизованных систем. Она разработана для чрезвычайных ситуаций, позволяя оставаться на связи, когда это важнее всего.

Устройства Meshtastic создают ячеистую сеть, способную передавать сообщения на большие расстояния даже без покрытия интернета или сотовой связи. Этот децентрализованный подход обеспечивает устойчивость и надёжность вашей связи при любых обстоятельствах. Но дело не только в поддержании связи — Meshtastic также предлагает шифрование, чтобы ваши сообщения оставались безопасными и конфиденциальными.

В мире, где конфиденциальность всё больше нарушается, Meshtastic даёт вам возможность контролировать свою связь. Координируете ли вы местное реагирование сообщества, поддерживаете связь с близкими во время катастрофы или просто готовитесь к неожиданностям — Meshtastic предоставляет инструменты для безопасного и эффективного общения.

Сделайте шаг, чтобы узнать больше о Meshtastic и о том, как построить собственную аварийную сеть связи. Оторвите ссылку слева и исследуйте эту инновационную технологию. Убедитесь, что вы готовы к чему угодно.", - "url_message": "Перейдите по этой ссылке, чтобы узнать больше." - }, - "nostr": { - "name": "Листовки протокола Nostr", - "title": "СОЦИАЛЬНАЯ СВОБОДА", - "subtitle": "НЕ ИГНОРИРУЙТЕ", - "headline": "ПРИСОЕДИНЯЙТЕСЬ К ЦЕНЗУРОУСТОЙЧИВОЙ СЕТИ", - "content": "Что такое Nostr? В отличие от традиционных платформ социальных сетей, Nostr — это протокол, децентрализованная система, позволяющая пользователям подключаться и делиться без ограничений центральной власти. Nostr устойчив к цензуре — это значит, что ваш голос не может быть заглушён корпорациями или правительствами. Он создан, чтобы дать вам контроль над вашим онлайн-присутствием, свободным от влияния алгоритмов или рекламы, которые ставят вовлечённость выше осмысленных связей.

В Nostr нет скрытых намерений удержать вас в бесконечной прокрутке. Вы взаимодействуете с контентом на своих условиях, а не на основе того, что алгоритм считает способным удержать вас онлайн дольше всего. Nostr позволяет строить подлинные связи и участвовать в значимых беседах, сохраняя при этом вашу конфиденциальность и автономию.

В мире, где онлайн-речь всё больше контролируется и манипулируется, Nostr предлагает освежающую альтернативу. Это не просто платформа — это движение к настоящей цифровой свободе, где ваши взаимодействия определяются вашими интересами и ценностями, а не тем, что приносит наибольший рекламный доход.

Сделайте шаг, чтобы узнать больше о Nostr и о том, как он может изменить способ вашего общения онлайн. Оторвите ссылку слева и исследуйте этот прорывной протокол. Присоединяйтесь к сообществу, которое ценит свободу и подлинное взаимодействие.", - "url_message": "Перейдите по этой ссылке, чтобы узнать больше." - }, - "voxvera": { - "name": "Листовки Vox Vera для печати", - "title": "СОВЕРШЕННО СЕКРЕТНО", - "subtitle": "~~НЕ~~ РАСПРОСТРАНЯТЬ", - "headline": "ОПЕРАЦИЯ VOX VERA", - "content": "Освободитесь от цензуры с помощью VoxVera. Анонимный инструмент для партизанского маркетинга и распространения сообщений. Будь то в сети или в физическом мире, он дает вам возможность смело распространять свои идеи, будучи защищенным полной анонимностью (при хостинге через Tor). Скачайте код, создайте сайт-листовку, разместите его в сети и усильте свой голос.

Используйте силу мемов, чтобы поделиться своими идеями в школе, на работе, в онлайн-сообществах или даже по всему миру. VoxVera гарантирует, что ваше сообщение найдет отклик повсюду, благодаря отрывным разделам с уникальными URL-адресами и QR-кодами для легкой перепечатки.

Конфиденциальность может быть сохранена. Листовками можно делиться через сеть Tor, защищая хостера и пользователей от цензуры.

Присоединяйтесь к нам в революции, которая ценит правду и прозрачность. Вместе мы сможем построить сеть информированных граждан, которые не боятся высказываться.", - "url_message": "Получите VoxVera и начните распространять свое сообщение." - } - } -} diff --git a/voxvera/locales/ru/docs/usage.md b/voxvera/locales/ru/docs/usage.md deleted file mode 100644 index 3bbaa4e..0000000 --- a/voxvera/locales/ru/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Подробное руководство - -Это руководство охватывает основные рабочие процессы CLI. См. `docs/docker.md` для инструкций по Docker и `docs/templates.md` для доступных шаблонов листовок. - -## Предварительные требования - -VoxVera разработан как высокопортативный инструмент и требует минимум системных зависимостей. - -### 1. Автономные бинарные файлы (Рекомендуется) -Вы можете скачать автономные исполняемые файлы без зависимостей для вашей операционной системы: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Эти файлы включают все необходимое для запуска VoxVera (кроме `onionshare-cli`). - -### 2. Однострочный установщик -Или установите с помощью нашего автоматического скрипта: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Ручная установка через Python -Если вы предпочитаете запускать из исходного кода: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Шаг за шагом - -1. **Инициализация:** Запустите `voxvera init` и следуйте подсказкам. Вам будет предложено сначала выбрать язык. -2. **Сборка:** Сгенерируйте ресурсы листовки. Каждая сборка автоматически создает файл `voxvera-portable.zip` в папке листовки, позволяя другим скачивать полный инструмент прямо с вашей листовки. - ```bash - voxvera build - ``` -3. **Запуск:** Опубликуйте листовку через Tor: - ```bash - voxvera serve - ``` - Это автоматически обнаружит ваш экземпляр Tor, запустит OnionShare и запишет сгенерированный .onion адрес в отрывные ссылки листовки. - -## Поддержка языков - -VoxVera полностью локализован. Вы можете изменить свои языковые предпочтения навсегда, используя интерактивный селектор или прямой ярлык: - -- **Интерактивный селектор:** `voxvera lang` -- **Прямой ярлык:** `voxvera --lang ru` (устанавливает русский язык) - -### Поддерживаемые языки: -- **Английский:** `en` -- **Испанский:** `es` (алиас: `--idioma`) -- **Немецкий:** `de` (алиас: `--sprache`) -- **Русский:** `ru` - -Вы также можете принудительно использовать определенный язык для одной команды, не меняя постоянные настройки: -- **Английский:** `voxvera --lang en check` -- **Русский:** `voxvera --lang ru check` - -Сгенерированные листовки автоматически определяют язык браузера посетителя и соответствующим образом переключают текст интерфейса. - -## Управление серверами - -Управляйте несколькими листовками и их Tor-идентификаторами из единого интерактивного меню: - -```bash -voxvera manage -``` - -Возможности: -- **{{t('cli.manage_create_new')}}**: Запуск полной последовательности настройки. -- **{{t('cli.manage_start_all')}}**: Запуск или остановка всех листовок в вашем парке одновременно. -- **Статус в реальном времени**: Просмотр активных .onion URL и индикаторов прогресса загрузки Tor. -- **Индивидуальный контроль**: {{t('cli.manage_action_export')}} определенных сайтов в ZIP или их удаление. - -## Универсальное зеркалирование (Вирусное распространение) - -Чтобы VoxVera оставался доступным, даже если центральные репозитории будут подвергнуты цензуре, каждая листовка выступает в качестве зеркала для инструмента. - -Когда вы хостите листовку, кнопка **"{{t('web.download_button')}}"** на целевой странице предоставляет `voxvera-portable.zip`, содержащий: -- Полный исходный код и все поддерживаемые языки. -- Все зависимости Python (пре-вендоризованные). -- Кроссплатформенные бинарные файлы Tor. - -Это позволяет любому, кто сканирует вашу листовку, стать новым распространителем инструмента VoxVera. - -## Экспорт и резервное копирование - -Создавайте резервные копии своих уникальных Tor-идентификаторов (чтобы ваш .onion URL никогда не менялся) или переносите листовки на другую машину. - -- **Экспорт одного сайта**: `voxvera export <имя_папки>` -- **Экспорт всех сайтов**: `voxvera export-all` - -**Место хранения:** Все экспорты сохраняются в виде ZIP-файлов в папке `voxvera-exports` в домашнем каталоге пользователя (`~/voxvera-exports/`) на всех платформах. - -## Импорт и восстановление - -Восстановите всю свою настройку на новой машине, переместив ZIP-файлы в `~/voxvera-exports/` и запустив: - -```bash -voxvera import-multiple -``` - -## Портативность и работа оффлайн - -Если вам нужно запустить VoxVera на машине без доступа к Интернету, вы можете сначала «вендоризовать» зависимости: - -```bash -voxvera vendorize -``` - -Это загрузит все необходимые библиотеки Python в `voxvera/vendor/`. Инструмент будет отдавать приоритет этим локальным файлам, что позволит ему работать без `pip install`. - -## Пакетный импорт (JSON) - -Чтобы массово генерировать листовки из нескольких конфигурационных файлов JSON, поместите их в директорию `imports/` и запустите: - -```bash -voxvera batch-import -``` - -## Как работают URL-адреса - -У каждой листовки есть два отдельных URL-адреса: -- **Отрывная ссылка** (автоматически генерируется): .onion адрес, по которому размещена листовка. -- **Ссылка на контент** (настраивается пользователем): Внешний URL, указывающий на веб-сайт, видео или загрузку. - -Вам не нужно вручную вводить .onion адрес; VoxVera обрабатывает это автоматически на этапе `serve`. diff --git a/voxvera/locales/sw.json b/voxvera/locales/sw.json deleted file mode 100644 index 8159204..0000000 --- a/voxvera/locales/sw.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "Kiswahili", - "flag": "🇰🇪", - "direction": "ltr" - }, - "cli": { - "dep_check_header": "Ukaguzi wa Vitegemezi", - "dep_found": "imepatikana", - "dep_missing": "haikupatikana", - "all_deps_installed": "Vitegemezi vyote vimesakinishwa.", - "missing_deps_error": "Baadhi ya vitegemezi havipo. Tekeleza: pip install 'voxvera[all]'", - "init_name": "Jina", - "init_folder": "Jina la Folda", - "init_title": "Kichwa cha Habari", - "init_subtitle": "Kichwa kidogo", - "init_headline": "Kichwa kikuu", - "init_body": "Maandishi ya ujumbe", - "init_links": "Viungo", - "edit_again": "Hariri tena?", - "body_length": "Urefu wa maandishi", - "body_limit_exceeded": "imezidi kikomo", - "url_label": "URL (kiungo cha maudhui - rasilimali ya nje)", - "url_message_label": "Ujumbe wa URL", - "footer_message_label": "Ujumbe wa chini ya ukurasa", - "template_not_found": "Kiolezo {name} hakijapatikana", - "template_copied": "Kiolezo kimeandaliwa kwenda {dest}", - "flyer_created": "Faili za kipeperushi zimeundwa chini ya {dest}", - "dir_not_found": "Folda {dir_path} haijapatikana", - "onionshare_error": "OnionShare ya {folder_name} imekatika ghafla.", - "onionshare_causes": "Sababu za kawaida: Mtandao umezuiwa, saa ya mfumo sio sahihi, au OnionShare tayari inafanya kazi.", - "onionshare_logs_tip": "Angalia {logfile} kwa kumbukumbu kamili.", - "onion_url_msg": "[{folder_name}] URL ya Onion: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare inafanya kazi (PID {pid}).", - "export_not_found": "Hitilafu: Folda ya tovuti '{folder_name}' haijapatikana katika {host_root}", - "export_success": "Imehamishwa '{folder_name}' kwenda {output_path}", - "export_all_none": "Hakuna tovuti zilizopatikana za kuhamisha.", - "export_all_starting": "Inahamisha tovuti {count} kwenda {dir}...", - "export_all_complete": "Uhamishaji wote umekamilika.", - "import_zip_not_found": "Hitilafu: Faili ya Zip '{path}' haijapatikana.", - "import_invalid_config": "Hitilafu: Faili ya uhamishaji sio sahihi. 'config.json' haipo.", - "import_invalid_folder": "Hitilafu: config.json sio sahihi. 'folder_name' haipo.", - "import_overwrite_confirm": "Tovuti '{folder_name}' tayari ipo. Je, ubadilishe?", - "import_cancelled": "Uingizaji umesitishwa.", - "import_success": "Imefanikiwa kuingiza '{folder_name}' kwenda {dest_dir}", - "import_dir_not_found": "Hitilafu: Folda '{dir}' haijapatikana.", - "import_multiple_none": "Hakuna faili za zip zilizopatikana katika {dir}", - "import_multiple_found": "Imepata tovuti {count} za kuingiza kutoka {dir}...", - "importing_file": "Inaingiza {name}...", - "import_multiple_complete": "Uingizaji wa tovuti nyingi umekamilika.", - "batch_import_none": "Hakuna faili za JSON zilizopatikana katika imports", - "batch_import_processing": "Inashughulikia {file}", - "stop_server_not_running": "Seva {folder_name} haifanyi kazi.", - "stop_server_success": "Imesimamishwa {folder_name} (PID {pid})", - "delete_server_success": "Seva {folder_name} imefutwa", - "manage_select_server": "Chagua seva ya kusimamia (au Toka):", - "manage_create_new": "--- Unda Tovuti/Kipeperushi Kipya ---", - "manage_start_all": "--- Anzisha Tovuti Zote ---", - "manage_stop_all": "--- Simamisha Tovuti Zote ---", - "manage_export_all": "--- Hamisha Tovuti Zote ---", - "manage_import_multiple": "--- Ingiza Tovuti Nyingi ---", - "manage_exit": "Toka", - "manage_startup_summary": "Muhtasari wa Kuanzisha", - "manage_press_enter": "Bonyeza Enter ili kuendelea", - "manage_action_menu": "Simamia {name}:", - "manage_action_toggle_stop": "Simamisha", - "manage_action_toggle_start": "Anzisha", - "manage_action_export": "Hamisha kama Zip", - "manage_action_delete": "Futa", - "manage_action_back": "Rudi", - "manage_delete_confirm": "Je, una uhakika unataka kufuta {name}?", - "bootstrapping_msg": "[{name}] Inajunganisha na seva za Tor na kuandaa huduma ya siri...", - "bootstrapping_progress": "[{name}] Tor Inapakia: {progress}% ...", - "no_urls_qr_skip": "Hakuna URL zilizowekwa bado. QR codes zitaundwa baada ya 'voxvera serve'", - "input_file_not_found": "Faili ya kuingiza {path} haipo.", - "attachment_path_label": "Njia ya faili ya kiambatisho (si lazima - itatolewa kutoka tovuti ya Tor)", - "manage_action_edit": "Hariri", - "manage_templates": "--- Tengeneza Kutoka Kiolezo ---", - "template_select": "Chagua kiolezo:", - "body_over_limit_warning": "Onyo: Maandishi ya mwili yanazidi herufi 1000. Yanaweza kukatwa kwenye kipeperushi.", - "manage_action_export_keys": "Hamisha Funguo", - "manage_action_import_keys": "Ingiza Funguo", - "keys_not_found": "Hakuna funguo ya kipindi iliyopatikana kwa '{name}'. Anzisha tovuti kwanza ili kuzalisha funguo.", - "keys_export_header": "Funguo ya kipindi kwa '{name}':", - "keys_export_hint": "Nakili funguo hii na uihifadhi kwa usalama. Tumia 'Ingiza Funguo' kwenye mfano mwingine kurejesha.", - "keys_site_not_found": "Tovuti '{name}' haijapatikana.", - "keys_overwrite_confirm": "Tovuti '{name}' tayari ina funguo. Andika juu yake?", - "keys_import_cancelled": "Uingizaji umeghairiwa.", - "keys_import_prompt": "Bandika funguo ya kipindi ya base64 hapa chini:", - "keys_import_empty": "Hakuna funguo iliyotolewa.", - "keys_import_invalid": "Muundo wa funguo si sahihi. Lazima iwe mfuatano halali wa base64.", - "keys_import_success": "Funguo ya kipindi imeingizwa kwa '{name}'. Anzisha upya tovuti ili kutumia funguo mpya." - }, - "web": { - "tear_off_tor_browser": "Tumia Kivinjari cha Tor", - "tear_off_desc": "ili kusaidia kueneza ujumbe huu nenda kwa", - "tear_off_footer": "bonyeza kitufe hapa chini ili kuchapisha", - "built_with": "imejengwa na", - "print_button": "Chapa Kipeperushi", - "download_button": "Pakua Zana na Chanzo", - "download_attachment": "Pakua kiambatisho" - }, - "landing": { - "title": "SIRI KUBWA", - "subtitle": "~~USISAMBAZE~~", - "headline": "OPARESHENI VOX VERA", - "content": "Jikomboe kutoka kwa udhibiti ukitumia VoxVera. Zana isiyojulikana ya uuzaji wa mshituko na kueneza ujumbe. Iwe mtandaoni au katika ulimwengu wa kimwili, inaweza kukuwezesha kueneza mawazo yako kwa ujasiri, ukilindwa na kutokujulikana kabisa (ikiwa unahifadhi kupitia Tor). Pakua nambari ya siri, tengeneza tovuti ya kipeperushi, ihifadhi mtandaoni na uimarishe ujumbe wako.

Tumia nguvu ya meme kushiriki mawazo yako katika shule yako, mahali pa kazi, jumuiya za mtandaoni, au hata duniani kote. VoxVera inahakikisha ujumbe wako unavuma mbali na kote, kukiwa na sehemu zinazoweza kutolewa zenye URL za kipekee na QR codes kwa uchapishaji rahisi.

Faragha inaweza kudumishwa. Vipengele vinaweza kushirikiwa kupitia mtandao wa Tor, kumlinda mhudumu na watumiaji dhidi ya udhibiti.

Jiunge nasi katika mapinduzi yanayothamini ukweli na uwazi. Kwa pamoja, tunaweza kujenga mtandao wa raia wenye ufahamu ambao hawaogopi kuzungumza.", - "url_message": "Pata VoxVera na uanze kueneza ujumbe wako.", - "name": "Vipeperushi vya Vox Vera vya Kuchapisha" - }, - "templates": { - "aosp": { - "name": "Mradi wa AOS", - "title": "ANDROID IMEACHILIWA", - "subtitle": "BILA MIPAKA", - "headline": "UHURU WA CHANZO HURIA", - "content": "Mradi wa Android wa Chanzo Huria (AOSP) unawakilisha kiini cha Android ilivyokusudiwa awali: jukwaa lililo wazi, la uwazi, na linaloweza kubadilishwa. Inaondoa tabaka za programu za umiliki na usimamizi wa makampuni ambayo yamekuwa sawa na usambazaji wa kawaida wa Android. Na AOSP, unapata ufikiaji wa toleo safi la Android, kukuruhusu kufanya kifaa chako kuwa chako kweli kweli.

Kwa watengenezaji, AOSP inatoa uwanja wa fursa, ambapo vikwazo pekee ni ujuzi na mawazo yako. Inatumika kama msingi wa ROM nyingi za kawaida, kila moja imeundwa kwa mahitaji mahususi, iwe ni kwa utendaji ulioboreshwa, faragha, au vipengele vya kipekee ambavyo matoleo ya kawaida havina. Wapenda faragha watathamini kutokuwepo kwa programu zilizowekwa awali na huduma za ufuatiliaji ambazo mara nyingi huja na Android ya kawaida.

AOSP si kwa watengenezaji au wapenda teknolojia peke yao; ni kwa mtu yeyote anayethamini uhuru wa kidijitali. Inakuruhusu kudhibiti kifaa chako, kukibadilisha kulingana na mahitaji yako bila vikwazo vya watoa huduma au watengenezaji. Gundua jinsi AOSP inavyoweza kubadilisha uzoefu wako wa simu. Anza safari yako kuelekea siku zijazo zilizo wazi na zinazoweza kubadilishwa leo.", - "url_message": "Tembelea kiungo hapa chini kujifunza zaidi." - }, - "bitcoin": { - "name": "Vipeperushi vya Mapinduzi ya Bitcoin", - "title": "SHERIA BILA WATAWALA", - "subtitle": "USIPUUZE", - "headline": "JIUNGE NA MAPINDUZI YA BITCOIN", - "content": "Bitcoin ni nini? Ni zaidi ya pesa za kidijitali; ni teknolojia ya mapinduzi iliyoundwa kutatua baadhi ya matatizo makubwa zaidi ya ulimwengu. Bitcoin inafanya kazi kwenye mtandao usio na kati, huru kutoka kwa udhibiti wa serikali yoyote au mamlaka kuu. Hii inahakikisha kwamba hakuna mtu anayeweza kudanganya usambazaji au thamani yake, na kuifanya kuwa aina imara ya pesa inayolinda utajiri wako dhidi ya mfumuko wa bei.

Mfumo wetu wa sasa wa kifedha umejengwa juu ya motisha zenye kasoro—kuhimiza deni, utegemezi, na ujumuishaji wa mamlaka. Bitcoin inabadilisha hilo kwa kuunda mfumo ambapo uaminifu, uwazi, na uwajibikaji wa mtu binafsi unatuzwa. Katika mtandao wa Bitcoin, hakuna nafasi ya rushwa au udanganyifu kwa sababu sheria zinatekelezwa na hisabati, si na watu.

Bitcoin inalinganisha motisha kwa njia inayokidhi mawazo ya muda mrefu, akiba, na uvumbuzi. Inawawezesha watu binafsi kudhibiti mustakabali wao wa kifedha, kukuza jamii ya kimataifa ambapo thamani inaweza kuhamishwa kwa uhuru na kwa usalama bila wasuluhishi. Hii ndiyo sababu tunahitaji Bitcoin—kwa sababu inaunda ulimwengu ambapo motisha zimelingana vizuri, na kusababisha jamii yenye haki na ustawi kwa wote.

Chukua hatua ya kujifunza zaidi kuhusu Bitcoin na jinsi inavyoweza kubadilisha si tu maisha yako ya kifedha, bali ulimwengu. Rarua kiungo upande wa kushoto na uchunguze teknolojia hii ya msingi. Jiunge na harakati kuelekea siku zijazo bora.", - "url_message": "Fuata kiungo hiki kujifunza zaidi." - }, - "jesus": { - "name": "Ujumbe Unaobadilisha Maisha", - "title": "HABARI NJEMA", - "subtitle": "USIPUUZE", - "headline": "GUNDUA TUMAINI LA KWELI", - "content": "Yesu ni nani? Yeye ni zaidi ya mtu wa kihistoria; Yeye ni Mwana wa Mungu, Mwokozi wa ulimwengu. Yesu mwenyewe alisema, 'Mimi ndimi njia, na kweli, na uzima. Mtu haji kwa Baba ila kwa njia yangu' (Yohana 14:6). Alikuja kuunganisha pengo kati ya Mungu na wanadamu, kutupa njia ya msamaha, amani, na uzima wa milele.

Sisi sote tunakabili uharibifu katika maisha yetu—iwe ni katika mahusiano yetu, mioyo yetu, au ulimwengu wetu. Yesu alikuja kuponya uharibifu huo. Aliishi maisha kamili, akafa msalabani kwa dhambi zetu, na akafufuka, akishinda kifo na kutupa tumaini la uzima wa milele na Mungu.

Bila Yesu, tumepotea katika dhambi zetu, tumetengwa na Mungu. Lakini kupitia Yeye, tunaweza kusamehewa na kurudishwa. Anatupa si maisha bora tu sasa, bali ahadi ya uzima wa milele pamoja Naye. Hii ndiyo sababu tunamhitaji—kwa sababu ni katika Yesu tu tunaweza kupata amani ya kweli, kusudi, na uhakika wa uzima wa milele.

Chukua hatua ya kujifunza zaidi kuhusu Yesu na athari ya kubadilisha maisha anayoweza kuwa nayo katika maisha yako. Rarua kiungo upande wa kushoto na uchunguze mafundisho Yake. Pata tumaini ambalo umekuwa ukilitafuta.", - "url_message": "Fuata kiungo hiki kujifunza zaidi." - }, - "meshtastic": { - "name": "Vipeperushi vya Mtandao wa Meshtastic", - "title": "MAWASILIANO SALAMA", - "subtitle": "USIPUUZE", - "headline": "JENGA MTANDAO WAKO WA DHARURA", - "content": "Kwa nini Meshtastic? Wakati wa mgogoro, mitandao ya mawasiliano ya kawaida inaweza kushindwa, kutuacha peke yetu na hatarini. Meshtastic inatoa suluhisho lenye nguvu—mtandao mbadala wa mawasiliano wa ndani unaofanya kazi kwa kujitegemea na mifumo ya kati. Imeundwa kwa hali za dharura, kukuruhusu kubaki umeunganishwa wakati inapohusika zaidi.

Vifaa vya Meshtastic vinaunda mtandao wa mesh unaoweza kusambaza ujumbe kwa umbali mrefu, hata bila mtandao au huduma ya simu. Mbinu hii isiyo na kati inahakikisha mawasiliano yako ni imara na ya kuaminika, bila kujali hali. Lakini si kuhusu kubaki umeunganishwa tu—Meshtastic pia inatoa usimbuaji, ili ujumbe wako ubaki salama na wa faragha.

Katika ulimwengu ambapo faragha inazidi kuathiriwa, Meshtastic inakuwezesha kudhibiti mawasiliano yako. Iwe unaratibu jibu la jamii ya ndani, kubaki ukiwasiliana na wapendwa wakati wa janga, au kujiandaa tu kwa yasiyotarajiwa, Meshtastic inatoa zana unazohitaji kuwasiliana kwa usalama na ufanisi.

Chukua hatua ya kujifunza zaidi kuhusu Meshtastic na jinsi unavyoweza kujenga mtandao wako wa mawasiliano ya dharura. Rarua kiungo upande wa kushoto na uchunguze teknolojia hii ya ubunifu. Hakikisha umejiandaa kwa chochote kinachokuja.", - "url_message": "Fuata kiungo hiki kujifunza zaidi." - }, - "nostr": { - "name": "Vipeperushi vya Itifaki ya Nostr", - "title": "UHURU WA KIJAMII", - "subtitle": "USIPUUZE", - "headline": "JIUNGE NA MTANDAO UNAOPINGA UDHIBITI", - "content": "Nostr ni nini? Tofauti na majukwaa ya kawaida ya mitandao ya kijamii, Nostr ni itifaki—mfumo usio na kati unaowapa watumiaji uwezo wa kuunganisha na kushiriki bila vikwazo vya mamlaka kuu. Nostr inapinga udhibiti, ikimaanisha sauti yako haiwezi kunyamazishwa na makampuni au serikali. Imeundwa kukupa udhibiti wa uwepo wako mtandaoni, huru kutoka kwa ushawishi wa algorithmu au matangazo yanayopendelea ushiriki kuliko muunganisho wenye maana.

Katika Nostr, hakuna ajenda zilizofichwa kukuweka ukiendelea kutumia. Unashiriki na maudhui kwa masharti yako, si kulingana na kile algorithmu inachofikiria kitakachokuweka mtandaoni kwa muda mrefu zaidi. Nostr inakuruhusu kujenga muunganisho wa kweli na kushiriki katika mazungumzo yanayohusika, yote huku ukidumisha faragha na uhuru wako.

Katika ulimwengu ambapo hotuba mtandaoni inadhibitiwa na kudanganywa zaidi na zaidi, Nostr inatoa mbadala wa kuburudisha. Si jukwaa tu; ni harakati kuelekea uhuru wa kweli wa kidijitali, ambapo maingiliano yako yanaendeshwa na masilahi na maadili yako, si kwa kile kinachozalisha mapato zaidi ya matangazo.

Chukua hatua ya kujifunza zaidi kuhusu Nostr na jinsi inavyoweza kubadilisha njia unayounganishwa mtandaoni. Rarua kiungo upande wa kushoto na uchunguze itifaki hii ya msingi. Jiunge na jamii inayothamini uhuru na maingiliano ya kweli.", - "url_message": "Fuata kiungo hiki kujifunza zaidi." - }, - "voxvera": { - "name": "Vipeperushi vya Vox Vera vya Kuchapisha", - "title": "SIRI KUBWA", - "subtitle": "~~USISAMBAZE~~", - "headline": "OPARESHENI VOX VERA", - "content": "Jiachilie kutoka kwa udhibiti na VoxVera. Chombo cha masoko ya msituni kisichojulikana na kusambaza ujumbe. Iwe mtandaoni au katika ulimwengu halisi, inaweza kukuwezesha kusambaza mawazo yako kwa ujasiri, ukilindwa na kutokujulikana kabisa (ikiwa unakaribisha kupitia Tor). Pakua msimbo, tengeneza tovuti ya vipeperushi, karibisha mtandaoni na kuimarisha ujumbe wako.

Tumia nguvu ya meme kushiriki mawazo yako shuleni kwako, mahali pa kazi, jamii za mtandaoni, au hata ulimwenguni kote. VoxVera inahakikisha ujumbe wako unasikika mbali na karibu, na sehemu za kurarua zenye URL na misimbo ya QR ya kipekee kwa uchapishaji rahisi.

Faragha inaweza kudumishwa. Vipeperushi vinaweza kushirikiwa kupitia mtandao wa Tor, kulinda mwenyeji na watumiaji dhidi ya udhibiti.

Jiunge nasi katika mapinduzi yanayothamini ukweli na uwazi. Pamoja, tunaweza kujenga mtandao wa raia wenye habari ambao hawogopi kusema.", - "url_message": "Pata VoxVera na uanze kueneza ujumbe wako." - } - } -} diff --git a/voxvera/locales/sw/docs/usage.md b/voxvera/locales/sw/docs/usage.md deleted file mode 100644 index 5282b32..0000000 --- a/voxvera/locales/sw/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Maelezo ya Matumizi - -Mwongozo huu unashughulikia taratibu za kawaida za CLI. Angalia `docs/docker.md` kwa maelekezo ya Docker na `docs/templates.md` kwa violezo vya vipeperushi vinavyopatikana. - -## Mahitaji ya Awali - -VoxVera imeundwa kuwa rahisi kubebeka na inahitaji vitegemezi vichache vya mfumo. - -### 1. Programu Zinazojitegemea (Zinazopendekezwa) -Unaweza kupakua programu zinazojitegemea na zisizo na vitegemezi kwa mfumo wako wa uendeshaji: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Programu hizi zinajumuisha kila kitu kinachohitajika ili kuendesha VoxVera (isipokuwa `onionshare-cli`). - -### 2. Kisakinishi cha Mstari Mmoja -Vinginevyo, sakinisha kupitia hati yetu ya kiotomatiki: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Usakinishaji wa Mwongozo wa Python -Ikiwa unapendelea kuendesha kutoka kwenye chanzo: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Hatua kwa Hatua - -1. **Anzisha:** Endesha `voxvera init` na ufuate maelekezo. Utaulizwa kuchagua lugha yako kwanza. -2. **Jenga:** Tengeneza rasilimali za kipeperushi. Kila ujenzi huunda kiotomatiki faili ya `voxvera-portable.zip` kwenye folda ya kipeperushi, ikiruhusu wengine kupakua zana nzima moja kwa moja kutoka kwenye kipeperushi chako. - ```bash - voxvera build - ``` -3. **Tumia:** Chapisha kipeperushi kupitia Tor: - ```bash - voxvera serve - ``` - Hii hutambua kiotomatiki mfumo wako wa Tor, inaanzisha OnionShare, na kuandika anwani ya .onion iliyozalishwa kwenye viungo vya kipeperushi. - -## Usaidizi wa Lugha - -VoxVera imetafsiriwa kikamilifu. Unaweza kubadilisha upendeleo wako wa lugha kwa kudumu ukitumia kiteuzi shirikishi au njia ya mkato ya moja kwa moja: - -- **Kiteuzi Shirikishi:** `voxvera lang` -- **Njia ya Mkato ya Moja kwa Moja:** `voxvera --lang sw` (inaweka upendeleo kuwa Kiswahili) - -### Lugha Zinazotumika: -- **Kiingereza:** `en` -- **Kihispania:** `es` (jina mbadala: `--idioma`) -- **Kijerumani:** `de` (jina mbadala: `--sprache`) -- **Kiswahili:** `sw` - -Unaweza pia kulazimisha lugha maalum kwa amri moja bila kubadilisha upendeleo wako wa kudumu: -- **Kiingereza:** `voxvera --lang en check` -- **Kiswahili:** `voxvera --lang sw check` - -Vipeperushi vilivyozalishwa hutambua kiotomatiki lugha ya kivinjari cha mgeni na kubadilisha maandishi ya UI ipasavyo. - -## Usimamizi wa Seva - -Simamia vipeperushi vingi na utambulisho wao wa Tor kutoka kwenye menyu moja shirikishi: - -```bash -voxvera manage -``` - -Vipengele: -- **{{t('cli.manage_create_new')}}**: Anza mchakato mzima wa usanidi. -- **{{t('cli.manage_start_all')}}**: Anzisha au simamisha vipeperushi vyote kwenye kundi lako kwa mpigo mmoja. -- **Hali ya Wakati Halisi**: Angalia URL za .onion zinazofanya kazi na viashiria vya maendeleo ya kuanza kwa Tor. -- **Udhibiti wa Kibinafsi**: {{t('cli.manage_action_export')}} tovuti maalum kwenye ZIP au uzifute. - -## Uakisi wa Ulimwengu (Usambazaji wa Virusi) - -Ili kuhakikisha VoxVera inaendelea kupatikana hata kama hifadhi kuu zitadhibitiwa, kila kipeperushi hufanya kazi kama kioo cha zana hiyo. - -Unapohifadhi kipeperushi, kitufe cha **"{{t('web.download_button')}}"** kwenye ukurasa wa kutua hutoa `voxvera-portable.zip` iliyo na: -- Chanzo kamili na lugha zote zinazotumika. -- Vitegemezi vyote vya Python (vilivyowekwa mapema). -- Programu za Tor za mifumo mbalimbali. - -Hii inaruhusu kila mtu anayekagua kipeperushi chako kuwa msambazaji mpya wa zana ya VoxVera. - -## Hamisha na Hifadhi Nakala - -Hifadhi nakala za utambulisho wako wa kipekee wa Tor (ili URL yako ya .onion isibadilike kamwe) au hamisha vipeperushi vyako kwenye mashine nyingine. - -- **Hamisha tovuti moja**: `voxvera export ` -- **Hamisha tovuti zote**: `voxvera export-all` - -**Mahali pa kuhifadhi:** Hamisho zote zinahifadhiwa kwenye `~/voxvera-exports/` kwenye mifumo yote. - -## Ingiza na Rejesha - -Rejesha usanidi wako wote kwenye mashine mpya kwa kuhamisha faili zako za ZIP kwenda `~/voxvera-exports/` na uendeshe: - -```bash -voxvera import-multiple -``` - -## Uwezo wa Kubebeka na Matumizi ya Nje ya Mtandao - -Ikiwa unahitaji kuendesha VoxVera kwenye mashine isiyo na ufikiaji wa mtandao, unaweza kupakua vitegemezi kwanza: - -```bash -voxvera vendorize -``` - -Hii inapakua maktaba zote za Python zinazohitajika kwenye `voxvera/vendor/`. Kisha zana itatoa kipaumbele kwa faili hizi za kienyeji, ikiruhusu iendeshe bila `pip install`. - -## Ingiza kwa Wingi (JSON) - -Ili kuzalisha vipeperushi kwa wingi kutoka kwa faili nyingi za usanidi wa JSON, ziweke kwenye folda ya `imports/` na uendeshe: - -```bash -voxvera batch-import -``` - -## Jinsi URL Zinavyofanya Kazi - -Kila kipeperushi kina URL mbili tofauti: -- **Kiungo cha kutolewa** (kinachozalishwa kiotomatiki): Anwani ya .onion ambapo kipeperushi kinahifadhiwa. -- **Kiungo cha maudhui** (kilichosanidiwa na mtumiaji): URL ya nje inayoelekeza kwenye tovuti, video, au upakuaji. - -Huna haja ya kuingiza anwani ya .onion kwa mikono; VoxVera inashughulikia hili kiotomatiki wakati wa awamu ya `serve`. diff --git a/voxvera/locales/tr.json b/voxvera/locales/tr.json deleted file mode 100644 index e266b9c..0000000 --- a/voxvera/locales/tr.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "Türkçe", - "flag": "🇹🇷", - "direction": "ltr" - }, - "cli": { - "dep_check_header": "Bağımlılık Kontrolü", - "dep_found": "bulundu", - "dep_missing": "eksik", - "all_deps_installed": "Tüm bağımlılıklar yüklendi.", - "missing_deps_error": "Bazı bağımlılıklar eksik. Şunu çalıştırın: pip install 'voxvera[all]'", - "init_name": "İsim", - "init_folder": "Klasör Adı", - "init_title": "Başlık", - "init_subtitle": "Alt Başlık", - "init_headline": "Ana Başlık", - "init_body": "Mesaj Metni", - "init_links": "Bağlantılar", - "edit_again": "Tekrar düzenle?", - "body_length": "Metin uzunluğu", - "body_limit_exceeded": "sınırı aşıyor", - "url_label": "URL (içerik bağlantısı - harici kaynak)", - "url_message_label": "URL mesajı", - "footer_message_label": "Alt bilgi mesajı", - "template_not_found": "Şablon {name} bulunamadı", - "template_copied": "Şablon {dest} konumuna kopyalandı", - "flyer_created": "İlan dosyaları {dest} altında oluşturuldu", - "dir_not_found": "Dizin {dir_path} bulunamadı", - "onionshare_error": "{folder_name} için OnionShare beklenmedik bir şekilde kapandı.", - "onionshare_causes": "Yaygın nedenler: Ağ engellenmiş, sistem saati yanlış veya OnionShare zaten çalışıyor olabilir.", - "onionshare_logs_tip": "Tam günlükler için {logfile} dosyasına bakın.", - "onion_url_msg": "[{folder_name}] Onion URL'si: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare çalışıyor (PID {pid}).", - "export_not_found": "Hata: '{folder_name}' site klasörü {host_root} içinde bulunamadı", - "export_success": "'{folder_name}' şuraya dışa aktarıldı: {output_path}", - "export_all_none": "Dışa aktarılacak site bulunamadı.", - "export_all_starting": "{count} site {dir} konumuna dışa aktarılıyor...", - "export_all_complete": "Tüm dışa aktarma işlemleri tamamlandı.", - "import_zip_not_found": "Hata: '{path}' Zip dosyası bulunamadı.", - "import_invalid_config": "Hata: Geçersiz dışa aktarma dosyası. 'config.json' eksik.", - "import_invalid_folder": "Hata: Geçersiz config.json. 'folder_name' eksik.", - "import_overwrite_confirm": "'{folder_name}' sitesi zaten mevcut. Üzerine yazılsın mı?", - "import_cancelled": "İçe aktarma iptal edildi.", - "import_success": "'{folder_name}' başarıyla {dest_dir} konumuna içe aktarıldı", - "import_dir_not_found": "Hata: '{dir}' dizini bulunamadı.", - "import_multiple_none": "{dir} içinde Zip dosyası bulunamadı", - "import_multiple_found": "{dir} konumundan içe aktarılacak {count} site bulundu...", - "importing_file": "{name} içe aktarılıyor...", - "import_multiple_complete": "Toplu içe aktarma tamamlandı.", - "batch_import_none": "İçe aktarmalarda JSON dosyası bulunamadı", - "batch_import_processing": "{file} işleniyor", - "stop_server_not_running": "{folder_name} sunucusu çalışmıyor.", - "stop_server_success": "{folder_name} durduruldu (PID {pid})", - "delete_server_success": "{folder_name} sunucusu silindi", - "manage_select_server": "Yöneteceğiniz sunucuyu seçin (veya Çıkış):", - "manage_create_new": "--- Yeni Site/İlan Oluştur ---", - "manage_start_all": "--- Tüm Siteleri Başlat ---", - "manage_stop_all": "--- Tüm Siteleri Durdur ---", - "manage_export_all": "--- Tüm Siteleri Dışa Aktar ---", - "manage_import_multiple": "--- Çoklu Site İçe Aktar ---", - "manage_exit": "Çıkış", - "manage_startup_summary": "Başlatma Özeti", - "manage_press_enter": "Devam etmek için Enter'a basın", - "manage_action_menu": "{name} yönetimi:", - "manage_action_toggle_stop": "Durdur", - "manage_action_toggle_start": "Başlat", - "manage_action_export": "Zip Olarak Dışa Aktar", - "manage_action_delete": "Sil", - "manage_action_back": "Geri", - "manage_delete_confirm": "{name} silinecek, emin misiniz?", - "bootstrapping_msg": "[{name}] Tor rölelerine bağlanılıyor ve gizli servis kuruluyor...", - "bootstrapping_progress": "[{name}] Tor Başlatılıyor: %{progress} ...", - "no_urls_qr_skip": "Henüz URL yapılandırılmadı. QR kodları 'voxvera serve' komutundan sonra oluşturulacak", - "input_file_not_found": "{path} giriş dosyası mevcut değil.", - "attachment_path_label": "Ek dosyası yolu (isteğe bağlı - Tor sitesinden sunulacaktır)", - "manage_action_edit": "Düzenle", - "manage_templates": "--- Şablondan Oluştur ---", - "template_select": "Bir şablon seçin:", - "body_over_limit_warning": "Uyarı: Gövde metni 1000 karakteri aşıyor. El ilanında kesilebilir.", - "manage_action_export_keys": "Anahtarları Dışa Aktar", - "manage_action_import_keys": "Anahtarları İçe Aktar", - "keys_not_found": "'{name}' için oturum anahtarı bulunamadı. Anahtarları oluşturmak için önce siteyi başlatın.", - "keys_export_header": "'{name}' için oturum anahtarı:", - "keys_export_hint": "Bu anahtarı kopyalayın ve güvenli bir şekilde saklayın. Geri yüklemek için başka bir örnekte 'Anahtarları İçe Aktar' kullanın.", - "keys_site_not_found": "Site '{name}' bulunamadı.", - "keys_overwrite_confirm": "Site '{name}' zaten bir anahtara sahip. Üzerine yazılsın mı?", - "keys_import_cancelled": "İçe aktarma iptal edildi.", - "keys_import_prompt": "Base64 oturum anahtarını aşağıya yapıştırın:", - "keys_import_empty": "Anahtar sağlanmadı.", - "keys_import_invalid": "Geçersiz anahtar biçimi. Geçerli bir base64 dizesi olmalıdır.", - "keys_import_success": "'{name}' için oturum anahtarı içe aktarıldı. Yeni anahtarı kullanmak için siteyi yeniden başlatın." - }, - "web": { - "tear_off_tor_browser": "Tor Tarayıcı Kullanın", - "tear_off_desc": "bu mesajı yaymaya yardımcı olmak için şuraya gidin:", - "tear_off_footer": "yazdırmak için aşağıdaki düğmeye tıklayın", - "built_with": "ile yapıldı", - "print_button": "İlanı Yazdır", - "download_button": "Aracı ve Kaynak Kodunu İndir", - "download_attachment": "Eki indir" - }, - "landing": { - "title": "ÇOK GİZLİ", - "subtitle": "~~DAĞITMAYIN~~", - "headline": "VOX VERA OPERASYONU", - "content": "VoxVera ile sansürden kurtulun. Anonim bir gerilla pazarlama ve mesaj yayma aracı. İster çevrimiçi ister fiziksel dünyada olsun, Tor üzerinden barındırma yaparak tam anonimlik koruması altında fikirlerinizi cesurca yaymanızı sağlar. Kodu indirin, bir ilan sitesi tasarlayın, çevrimiçi barındırın ve mesajınızı güçlendirin.

Fikirlerinizi okulunuzda, iş yerinizde, çevrimiçi topluluklarda ve hatta küresel çapta paylaşmak için memetik gücü kullanın. VoxVera, benzersiz URL'ler ve kolayca yeniden yazdırma için QR kodları içeren yırtılabilir bölümleriyle mesajınızın geniş kitlelere ulaşmasını sağlar.

Gizlilik korunabilir. İlanlar Tor ağı üzerinden paylaşılabilir, böylece hem barındıran hem de kullanıcılar sansürden korunur.

Gerçeğe ve şeffaflığa değer veren bir devrime katılın. Birlikte, sesini yükseltmekten korkmayan bilinçli vatandaşlardan oluşan bir ağ kurabiliriz.", - "url_message": "VoxVera'yı edinin ve mesajınızı yaymaya başlayın.", - "name": "Vox Vera Yazdırılabilir El İlanları" - }, - "templates": { - "aosp": { - "name": "AOS Projesi", - "title": "ANDROID SERBEST", - "subtitle": "SINIR YOK", - "headline": "AÇIK KAYNAK ÖZGÜRLÜĞÜ", - "content": "Android Açık Kaynak Projesi (AOSP), Android'in başlangıçta ne olması gerektiğinin özünü temsil eder: açık, şeffaf ve uyarlanabilir bir platform. Ana akım Android dağıtımlarıyla eş anlamlı hale gelen tescilli yazılım ve kurumsal gözetim katmanlarını ortadan kaldırır. AOSP ile Android'in filtresiz bir sürümüne erişim elde ederek cihazınızı gerçekten kendinize ait yapabilirsiniz.

Geliştiriciler için AOSP, tek sınırın becerileriniz ve hayal gücünüz olduğu bir olasılıklar alanı sunar. Gelişmiş performans, gizlilik veya ana akım sürümlerin sahip olmadığı benzersiz özellikler gibi belirli ihtiyaçlara göre uyarlanmış sayısız özel ROM'un temelini oluşturur. Gizlilik meraklıları, stok Android ile birlikte gelen önceden yüklenmiş gereksiz yazılımların ve izleme hizmetlerinin yokluğunu takdir edecektir.

AOSP sadece geliştiriciler veya teknoloji meraklıları için değil; dijital özgürlüğe değer veren herkes içindir. Operatörlerin veya üreticilerin kısıtlamaları olmadan cihazınızı ihtiyaçlarınıza göre uyarlayarak kontrolü yeniden elinize almanızı sağlar. AOSP'nin mobil deneyiminizi nasıl dönüştürebileceğini keşfedin. Daha açık, özelleştirilebilir bir geleceğe doğru yolculuğunuza bugün başlayın.", - "url_message": "Daha fazla bilgi için aşağıdaki bağlantıyı ziyaret edin." - }, - "bitcoin": { - "name": "Bitcoin Devrimi El İlanları", - "title": "YÖNETİCİSİZ KURALLAR", - "subtitle": "GÖZ ARDI ETMEYİN", - "headline": "BITCOIN DEVRİMİNE KATILIN", - "content": "Bitcoin nedir? Dijital paradan çok daha fazlası; dünyanın en acil sorunlarından bazılarını çözmek için tasarlanmış devrimci bir teknolojidir. Bitcoin, herhangi bir hükümet veya merkezi otoritenin kontrolünden bağımsız, merkezi olmayan bir ağda çalışır. Bu, kimsenin arzını veya değerini manipüle edemeyeceğini garanti eder ve onu servetinizi enflasyondan koruyan sağlam bir para biçimi yapar.

Mevcut finansal sistemimiz kusurlu teşvikler üzerine inşa edilmiştir—borcu, bağımlılığı ve gücün merkezileşmesini teşvik eder. Bitcoin, dürüstlüğün, şeffaflığın ve bireysel sorumluluğun ödüllendirildiği bir sistem oluşturarak bunu değiştirir. Bitcoin ağında yolsuzluk veya manipülasyona yer yoktur çünkü kurallar insanlar tarafından değil, matematik tarafından uygulanır.

Bitcoin, uzun vadeli düşünmeyi, tasarrufu ve yeniliği teşvik eden bir şekilde teşvikleri hizalar. Bireyleri finansal geleceklerinin kontrolünü ele almaya teşvik eder ve değerin aracılar olmadan özgürce ve güvenli bir şekilde aktarılabildiği küresel bir topluluk oluşturur. Bitcoin'e ihtiyacımız var—çünkü teşviklerin doğru hizalandığı, herkes için daha adil ve müreffeh bir topluma yol açan bir dünya yaratır.

Bitcoin hakkında daha fazla bilgi edinmek ve sadece finansal hayatınızı değil, dünyayı nasıl dönüştürebileceğini keşfetmek için adım atın. Soldaki bir bağlantıyı koparın ve bu çığır açan teknolojiyi keşfedin. Daha iyi bir geleceğe doğru harekete katılın.", - "url_message": "Daha fazla bilgi için bu bağlantıyı takip edin." - }, - "jesus": { - "name": "Hayat Değiştiren Mesaj", - "title": "İYİ HABER", - "subtitle": "GÖZ ARDI ETMEYİN", - "headline": "GERÇEK UMUDI KEŞFEDİN", - "content": "İsa kimdir? O sadece tarihi bir figürden fazlasıdır; O Tanrı'nın Oğlu, dünyanın Kurtarıcısıdır. İsa'nın kendisi şöyle dedi: 'Yol, gerçek ve yaşam Ben'im. Benim aracılığım olmadan Baba'ya kimse gelemez' (Yuhanna 14:6). Tanrı ile insanlık arasındaki uçurumu kapatmak, bize bağışlanma, barış ve sonsuz yaşama giden bir yol sunmak için geldi.

Hepimiz hayatımızda kırılmışlıkla yüzleşiriz—ister ilişkilerimizde, kalbimizde veya dünyamızda olsun. İsa bu kırılmışlığı iyileştirmek için geldi. Mükemmel bir hayat yaşadı, günahlarımız için çarmıhta öldü ve yeniden dirildi, ölümü yenerek bize Tanrı ile sonsuz yaşam umudunu sundu.

İsa olmadan, günahımızda kaybolmuşuz, Tanrı'dan ayrılmışız. Ama O'nun aracılığıyla bağışlanabilir ve geri kazanılabiliriz. Bize sadece şimdi daha iyi bir hayat değil, O'nunla sonsuz bir hayat vaadi sunar. O'na ihtiyacımız var—çünkü gerçek huzuru, amacı ve sonsuz yaşam güvencesini sadece İsa'da bulabiliriz.

İsa hakkında ve hayatınızda yapabileceği değişiklik hakkında daha fazla bilgi edinmek için adım atın. Soldaki bir bağlantıyı koparın ve Öğretilerini keşfedin. Aradığınız umudu bulun.", - "url_message": "Daha fazla bilgi için bu bağlantıyı takip edin." - }, - "meshtastic": { - "name": "Meshtastic Ağ El İlanları", - "title": "GÜVENLİ İLETİŞİM", - "subtitle": "GÖZ ARDI ETMEYİN", - "headline": "ACİL DURUM AĞINIZI KURUN", - "content": "Neden Meshtastic? Kriz zamanlarında geleneksel iletişim ağları başarısız olabilir ve bizi izole ve savunmasız bırakabilir. Meshtastic güçlü bir çözüm sunar—merkezi sistemlerden bağımsız çalışan alternatif bir yerel iletişim ağı. Acil durumlar için tasarlanmıştır ve en çok önemli olduğunda bağlı kalmanızı sağlar.

Meshtastic cihazları, internet veya hücresel kapsama olmadan bile uzun mesafelere mesaj iletebilen bir ağ ağı oluşturur. Bu merkezi olmayan yaklaşım, koşullar ne olursa olsun iletişimlerinizin dayanıklı ve güvenilir olmasını sağlar. Ama sadece bağlı kalmakla ilgili değil—Meshtastic ayrıca şifreleme sunar, böylece mesajlarınız güvenli ve özel kalır.

Gizliliğin giderek daha fazla tehlikeye girdiği bir dünyada, Meshtastic iletişiminizin kontrolünü ele almanızı sağlar. İster yerel bir topluluk müdahalesini koordine ediyor, ister bir felaket sırasında sevdiklerinizle iletişimde kalıyor veya beklenmedik durumlara hazırlanıyor olun, Meshtastic güvenli ve etkili iletişim için ihtiyacınız olan araçları sağlar.

Meshtastic hakkında ve kendi acil durum iletişim ağınızı nasıl kurabileceğiniz hakkında daha fazla bilgi edinmek için adım atın. Soldaki bir bağlantıyı koparın ve bu yenilikçi teknolojiyi keşfedin. Ne gelirse gelsin hazırlıklı olduğunuzdan emin olun.", - "url_message": "Daha fazla bilgi için bu bağlantıyı takip edin." - }, - "nostr": { - "name": "Nostr Protokolü El İlanları", - "title": "SOSYAL ÖZGÜRLÜK", - "subtitle": "GÖZ ARDI ETMEYİN", - "headline": "SANSÜRE DAYANIKLI AĞA KATILIN", - "content": "Nostr nedir? Geleneksel sosyal medya platformlarından farklı olarak, Nostr bir protokoldür—kullanıcıları merkezi bir otoritenin kısıtlamaları olmadan bağlanmaya ve paylaşmaya yetkilendiren merkezi olmayan bir sistem. Nostr sansüre dayanıklıdır, yani sesiniz şirketler veya hükümetler tarafından susturulamaz. Çevrimiçi varlığınız üzerinde kontrol sağlamak için tasarlanmıştır, anlamlı bağlantılar yerine etkileşimi önceliklendiren algoritmaların veya reklamların etkisinden bağımsız.

Nostr'da sizi kaydırmaya devam ettirmek için gizli gündemler yoktur. İçerikle kendi şartlarınızda etkileşim kurarsınız, bir algoritmanın sizi en uzun süre çevrimiçi tutacağını düşündüğü şeye göre değil. Nostr, gizliliğinizi ve özerkliğinizi korurken gerçek bağlantılar kurmanıza ve önemli konuşmalara katılmanıza olanak tanır.

Çevrimiçi ifadenin giderek daha fazla kontrol edildiği ve manipüle edildiği bir dünyada, Nostr ferahlatıcı bir alternatif sunar. Sadece bir platform değil; etkileşimlerinizin en çok reklam geliri üreten şey tarafından değil, ilgi alanlarınız ve değerleriniz tarafından yönlendirildiği gerçek dijital özgürlüğe doğru bir harekettir.

Nostr hakkında ve çevrimiçi bağlanma şeklinizi nasıl dönüştürebileceği hakkında daha fazla bilgi edinmek için adım atın. Soldaki bir bağlantıyı koparın ve bu çığır açan protokolü keşfedin. Özgürlüğe ve otantik etkileşime değer veren bir topluluğa katılın.", - "url_message": "Daha fazla bilgi için bu bağlantıyı takip edin." - }, - "voxvera": { - "name": "Vox Vera Yazdırılabilir El İlanları", - "title": "ÇOK GİZLİ", - "subtitle": "~~DAĞITMAYIN~~", - "headline": "VOX VERA OPERASYONU", - "content": "VoxVera ile sansürden kurtulun. Anonim bir gerilla pazarlama ve mesaj yayma aracı. İster çevrimiçi ister fiziksel dünyada olsun, fikirlerinizi cesurca yaymak için sizi güçlendirebilir, tam anonimlik ile korunursunuz (Tor üzerinden barındırırsanız). Kodu indirin, bir el ilanı sitesi tasarlayın, çevrimiçi barındırın ve mesajınızı güçlendirin.

Okulunuzda, işyerinizde, çevrimiçi topluluklarda veya hatta küresel olarak fikirlerinizi paylaşmak için memetik gücü kullanın. VoxVera, kolay yeniden yazdırma için benzersiz URL'ler ve QR kodları içeren koparma bölümleriyle mesajınızın geniş çapta yankı bulmasını sağlar.

Gizlilik korunabilir. El ilanları, barındırıcıyı ve kullanıcıları sansürden koruyarak Tor ağı üzerinden paylaşılabilir.

Gerçeği ve şeffaflığı değer veren bir devrime katılın. Birlikte, konuşmaktan korkmayan bilgili vatandaşlardan oluşan bir ağ kurabiliriz.", - "url_message": "VoxVera'yı edinin ve mesajınızı yaymaya başlayın." - } - } -} diff --git a/voxvera/locales/tr/docs/usage.md b/voxvera/locales/tr/docs/usage.md deleted file mode 100644 index 737f5b7..0000000 --- a/voxvera/locales/tr/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# Detaylı Kullanım - -Bu kılavuz, yaygın CLI iş akışlarını kapsar. Docker talimatları için `docs/docker.md` ve mevcut ilan şablonları için `docs/templates.md` dosyalarına bakın. - -## Ön Koşullar - -VoxVera, yüksek taşınabilirlik için tasarlanmıştır ve minimum sistem bağımlılığı gerektirir. - -### 1. Bağımsız İkililer (Önerilen) -İşletim sisteminiz için bağımsız, bağımlılık gerektirmeyen ikili dosyaları (binaries) indirebilirsiniz: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -Bu dosyalar, VoxVera'yı çalıştırmak için gereken her şeyi içerir (`onionshare-cli` hariç). - -### 2. Tek Satırlık Kurulum -Alternatif olarak, otomatik betiğimiz aracılığıyla kurulum yapın: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. Manuel Python Kurulumu -Kaynaktan çalıştırmayı tercih ederseniz: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## Adım Adım - -1. **Başlatma:** `voxvera init` komutunu çalıştırın ve istemleri takip edin. Önce dilinizi seçmeniz istenecektir. -2. **Oluşturma:** İlan varlıklarını oluşturun. Her oluşturma işlemi, ilan klasöründe otomatik olarak bir `voxvera-portable.zip` oluşturur; bu sayede başkaları tam aracı doğrudan ilanınızdan indirebilir. - ```bash - voxvera build - ``` -3. **Sunma:** İlanı Tor üzerinden yayınlayın: - ```bash - voxvera serve - ``` - bu komut mevcut Tor örneğinizi otomatik olarak algılar, OnionShare'i başlatır ve oluşturulan .onion adresini ilandaki yırtılabilir bağlantılara yazar. - -## Dil Desteği - -VoxVera tamamen yerelleştirilmiştir. Dil tercihinizi etkileşimli seçiciyi veya doğrudan kısayolu kullanarak kalıcı olarak değiştirebilirsiniz: - -- **Etkileşimli Seçici:** `voxvera lang` -- **Doğrudan Kısayol:** `voxvera --lang tr` (tercihi Türkçe olarak ayarlar) - -### Desteklenen Diller: -- **İngilizce:** `en` -- **İspanyolca:** `es` (takma ad: `--idioma`) -- **Almanca:** `de` (takma ad: `--sprache`) -- **Türkçe:** `tr` - -Kalıcı tercihinizi değiştirmeden tek bir komut için belirli bir dili de zorlayabilirsiniz: -- **İngilizce:** `voxvera --lang en check` -- **Türkçe:** `voxvera --lang tr check` - -Oluşturulan ilanlar, ziyaretçinin tarayıcı dilini otomatik olarak algılar ve kullanıcı arayüzü metnini buna göre değiştirir. - -## Sunucu Yönetimi - -Tek bir etkileşimli menüden birden fazla ilanı ve Tor kimliklerini yönetin: - -```bash -voxvera manage -``` - -Özellikler: -- **{{t('cli.manage_create_new')}}**: Tam kurulum dizisini başlatın. -- **{{t('cli.manage_start_all')}}**: Filonuzdaki tüm ilanları tek seferde başlatın veya kapatın. -- **Gerçek Zamanlı Durum**: Aktif .onion URL'lerini ve Tor başlatma ilerleme göstergelerini görüntüleyin. -- **Bireysel Kontrol**: Belirli siteleri ZIP olarak {{t('cli.manage_action_export')}} veya silin. - -## Evrensel Aynalama (Viral Dağıtım) - -Merkezi depolar sansürlense bile VoxVera'nın erişilebilir kalmasını sağlamak için her ilan, araç için bir ayna görevi görür. - -Bir ilanı barındırdığınızda, açılış sayfasındaki **"{{t('web.download_button')}}"** düğmesi şunları içeren bir `voxvera-portable.zip` sunar: -- Tam kaynak kodu ve desteklenen tüm diller. -- Tüm Python bağımlılıkları (önceden paketlenmiş). -- Platformlar arası Tor ikilileri. - -Bu, ilanınızı tarayan herkesin VoxVera aracının yeni bir dağıtıcısı olmasını sağlar. - -## Dışa Aktarma ve Yedekleme - -Benzersiz Tor kimliklerinizi yedekleyin (.onion URL'nizin hiç değişmemesi için) veya ilanlarınızı başka bir makineye taşıyın. - -- **Tek bir siteyi dışa aktar**: `voxvera export ` -- **Tüm siteleri dışa aktar**: `voxvera export-all` - -**Depolama konumu:** Tüm dışa aktarmalar, tüm platformlarda kullanıcının ana dizinindeki `~/voxvera-exports/` klasörüne ZIP dosyası olarak kaydedilir. - -## İçe Aktarma ve Kurtarma - -ZIP dosyalarınızı `~/voxvera-exports/` dizinine taşıyıp şu komutu çalıştırarak tüm kurulumunuzu yeni bir makinede geri yükleyin: - -```bash -voxvera import-multiple -``` - -## Taşınabilirlik ve Çevrimdışı Kullanım - -VoxVera'yı internet erişimi olmayan bir makinede çalıştırmanız gerekirse, önce bağımlılıkları yerelleştirebilirsiniz: - -```bash -voxvera vendorize -``` - -Bu, gerekli tüm Python kütüphanelerini `voxvera/vendor/` dizinine indirir. Araç daha sonra bu yerel dosyalara öncelik vererek `pip install` olmadan çalışmasına olanak tanır. - -## Toplu İçe Aktarma (JSON) - -Birden fazla JSON yapılandırma dosyasından toplu ilan oluşturmak için bunları `imports/` dizinine yerleştirin ve çalıştırın: - -```bash -voxvera batch-import -``` - -## URL'ler Nasıl Çalışır? - -Her ilanın iki ayrı URL'si vardır: -- **Yırtılabilir bağlantı** (otomatik oluşturulur): İlanın barındırıldığı .onion adresi. -- **İçerik bağlantısı** (kullanıcı tarafından yapılandırılır): Bir web sitesine, videoya veya indirmeye işaret eden harici bir URL. - -.onion adresini manuel olarak girmenize gerek yoktur; VoxVera `serve` aşamasında bunu otomatik olarak halleder. diff --git a/voxvera/locales/zh.json b/voxvera/locales/zh.json deleted file mode 100644 index f1bc255..0000000 --- a/voxvera/locales/zh.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "meta": { - "language_name": "简体中文", - "flag": "🇨🇳", - "direction": "ltr" - }, - "cli": { - "dep_check_header": "依赖检查", - "dep_found": "已找到", - "dep_missing": "缺失", - "all_deps_installed": "所有依赖已安装。", - "missing_deps_error": "部分依赖缺失。请运行: pip install 'voxvera[all]'", - "init_name": "名称", - "init_folder": "文件夹名称", - "init_title": "标题", - "init_subtitle": "副标题", - "init_headline": "大标题", - "init_body": "消息正文", - "init_links": "链接", - "edit_again": "再次编辑?", - "body_length": "正文长度", - "body_limit_exceeded": "超过限制", - "url_label": "URL (内容链接 - 外部资源)", - "url_message_label": "URL 消息", - "footer_message_label": "页脚消息", - "template_not_found": "模板 {name} 未找到", - "template_copied": "模板已复制到 {dest}", - "flyer_created": "传单文件已创建在 {dest}", - "dir_not_found": "目录 {dir_path} 未找到", - "onionshare_error": "{folder_name} 的 OnionShare 意外退出。", - "onionshare_causes": "常见原因:网络受阻、系统时间不准,或 OnionShare 已在运行。", - "onionshare_logs_tip": "查看 {logfile} 获取完整日志。", - "onion_url_msg": "[{folder_name}] Onion 地址: {onion_url}", - "onionshare_running_pid": "[{folder_name}] OnionShare 正在运行 (PID {pid})。", - "export_not_found": "错误:在 {host_root} 中未找到站点文件夹 '{folder_name}'", - "export_success": "已将 '{folder_name}' 导出到 {output_path}", - "export_all_none": "未找到可导出的站点。", - "export_all_starting": "正在将 {count} 个站点导出到 {dir}...", - "export_all_complete": "全部导出完成。", - "import_zip_not_found": "错误:未找到 Zip 文件 '{path}'。", - "import_invalid_config": "错误:无效的导出文件。缺失 'config.json'。", - "import_invalid_folder": "错误:无效的 config.json。缺失 'folder_name'。", - "import_overwrite_confirm": "站点 '{folder_name}' 已存在。是否覆盖?", - "import_cancelled": "导入已取消。", - "import_success": "已成功将 '{folder_name}' 导入到 {dest_dir}", - "import_dir_not_found": "错误:目录 '{dir}' 未找到。", - "import_multiple_none": "在 {dir} 中未找到 Zip 文件", - "import_multiple_found": "找到 {count} 个站点可从 {dir} 导入...", - "importing_file": "正在导入 {name}...", - "import_multiple_complete": "批量导入完成。", - "batch_import_none": "在 imports 中未找到 JSON 文件", - "batch_import_processing": "正在处理 {file}", - "stop_server_not_running": "服务器 {folder_name} 未运行。", - "stop_server_success": "已停止 {folder_name} (PID {pid})", - "delete_server_success": "已删除服务器 {folder_name}", - "manage_select_server": "选择要管理的服务器(或退出):", - "manage_create_new": "--- 创建新站点/传单 ---", - "manage_start_all": "--- 启动所有站点 ---", - "manage_stop_all": "--- 停止所有站点 ---", - "manage_export_all": "--- 导出所有站点 ---", - "manage_import_multiple": "--- 导入多个站点 ---", - "manage_exit": "退出", - "manage_startup_summary": "启动摘要", - "manage_press_enter": "按回车键继续", - "manage_action_menu": "管理 {name}:", - "manage_action_toggle_stop": "停止", - "manage_action_toggle_start": "启动", - "manage_action_export": "导出为 Zip", - "manage_action_delete": "删除", - "manage_action_back": "返回", - "manage_delete_confirm": "确定要删除 {name} 吗?", - "bootstrapping_msg": "[{name}] 正在连接 Tor 中继并设置隐藏服务...", - "bootstrapping_progress": "[{name}] Tor 引导中: {progress}% ...", - "no_urls_qr_skip": "尚未配置 URL。QR 码将在 'voxvera serve' 后生成", - "input_file_not_found": "输入文件 {path} 不存在。", - "attachment_path_label": "附件文件路径(可选 - 将由 Tor 站点提供)", - "manage_action_edit": "编辑", - "manage_templates": "--- 从模板创建 ---", - "template_select": "选择一个模板:", - "body_over_limit_warning": "警告:正文超过1000个字符。传单上可能会被截断。", - "manage_action_export_keys": "导出密钥", - "manage_action_import_keys": "导入密钥", - "keys_not_found": "未找到 '{name}' 的会话密钥。请先启动站点以生成密钥。", - "keys_export_header": "'{name}' 的会话密钥:", - "keys_export_hint": "复制此密钥并安全保存。在另一个实例上使用\u201c导入密钥\u201d来恢复。", - "keys_site_not_found": "未找到站点 '{name}'。", - "keys_overwrite_confirm": "站点 '{name}' 已有密钥。是否覆盖?", - "keys_import_cancelled": "导入已取消。", - "keys_import_prompt": "请在下方粘贴 base64 会话密钥:", - "keys_import_empty": "未提供密钥。", - "keys_import_invalid": "密钥格式无效。必须是有效的 base64 字符串。", - "keys_import_success": "已导入 '{name}' 的会话密钥。请重启站点以使用新密钥。" - }, - "web": { - "tear_off_tor_browser": "使用 Tor 浏览器", - "tear_off_desc": "为了帮助传播此信息,请访问", - "tear_off_footer": "点击下方按钮进行打印", - "built_with": "构建自", - "print_button": "打印传单", - "download_button": "下载工具与源码", - "download_attachment": "下载附件" - }, - "landing": { - "title": "绝密", - "subtitle": "~~切勿~~ 散布", - "headline": "VOX VERA 行动", - "content": "使用 VoxVera 摆脱审查。一个匿名的游击营销和消息传播工具。无论是线上还是在现实世界中,它都能赋予你大胆传播想法的力量,并受到完全匿名的保护(如果你通过 Tor 托管)。下载代码,设计传单站点,将其托管在网上并放大你的声音。

利用模因的力量在你的学校、工作场所、在线社区甚至全球范围内分享你的想法。VoxVera 通过带有独特 URL 和 QR 码的可撕下部分确保你的消息产生深远共鸣,方便再次打印。

隐私可以得到维护。传单可以通过 Tor 网络共享,保护托管者和用户免受审查。

加入我们这场重视真相和透明度的革命。齐心协力,我们可以建立一个不惧怕发声的知情公民网络。", - "url_message": "获取 VoxVera 并开始传播你的消息。", - "name": "Vox Vera 可打印传单" - }, - "templates": { - "aosp": { - "name": "AOS 项目", - "title": "安卓解放", - "subtitle": "无边界", - "headline": "开源自由", - "content": "Android 开源项目(AOSP)代表了 Android 最初的设计理念:一个开放、透明且可适应的平台。它剥离了与主流 Android 发行版同义的专有软件层和企业监管。通过 AOSP,您可以获得未经过滤的 Android 版本,真正让您的设备属于自己。

对于开发者来说,AOSP 提供了一个充满可能性的游乐场,唯一的限制是您的技能和想象力。它是无数定制 ROM 的基础,每个都针对特定需求量身定制,无论是增强性能、隐私保护还是主流版本所缺乏的独特功能。注重隐私的用户会欣赏没有预装臃肿软件和跟踪服务的清洁体验。

AOSP 不仅仅是为开发者或技术爱好者准备的;它适用于任何重视数字自由的人。它让您重新掌控自己的设备,根据需求进行定制,不受运营商或制造商的限制。探索 AOSP 如何改变您的移动体验。今天就开始您通往更开放、更可定制未来的旅程。", - "url_message": "访问以下链接了解更多信息。" - }, - "bitcoin": { - "name": "比特币革命传单", - "title": "没有统治者的规则", - "subtitle": "不要忽视", - "headline": "加入比特币革命", - "content": "什么是比特币?它不仅仅是数字货币;它是一项旨在解决世界上一些最紧迫问题的革命性技术。比特币运行在去中心化网络上,不受任何政府或中央机构的控制。这确保了没有人可以操纵其供应量或价值,使其成为保护您财富免受通胀的健全货币形式。

我们当前的金融体系建立在有缺陷的激励机制上——鼓励债务、依赖和权力集中化。比特币通过创建一个奖励诚实、透明和个人责任的系统来改变这一切。在比特币网络中,没有腐败或操纵的空间,因为规则由数学而非人来执行。

比特币以促进长期思考、储蓄和创新的方式调整激励机制。它赋予个人控制财务未来的能力,培育一个价值可以在没有中间人的情况下自由安全转移的全球社区。这就是我们需要比特币的原因——因为它创造了一个激励机制正确对齐的世界,为所有人带来更公平、更繁荣的社会。

迈出一步,了解更多关于比特币以及它如何不仅改变您的财务生活,还能改变世界。撕下左边的链接,探索这项开创性技术。加入迈向更美好未来的运动。", - "url_message": "点击此链接了解更多。" - }, - "jesus": { - "name": "改变生命的信息", - "title": "好消息", - "subtitle": "不要忽视", - "headline": "发现真正的希望", - "content": "耶稣是谁?祂不仅仅是一个历史人物;祂是上帝的儿子,世界的救主。耶稣亲自说过:'我就是道路、真理、生命。若不藉着我,没有人能到父那里去'(约翰福音 14:6)。祂来弥合上帝与人类之间的鸿沟,为我们提供通往宽恕、和平与永生的道路。

我们所有人都在生活中面临破碎——无论是在我们的关系、内心还是世界中。耶稣来医治这种破碎。祂过了完美的一生,为我们的罪死在十字架上,又复活了,战胜了死亡,赐给我们与上帝同享永生的盼望。

没有耶稣,我们迷失在罪中,与上帝隔绝。但通过祂,我们可以被赦免和恢复。祂不仅给我们现在更好的生活,还给我们与祂同在的永生应许。这就是我们需要祂的原因——因为只有在耶稣里,我们才能找到真正的平安、目标和永生的确据。

迈出一步,了解更多关于耶稣以及祂能对您的生活产生的改变。撕下左边的链接,探索祂的教导。找到您一直在寻找的希望。", - "url_message": "点击此链接了解更多。" - }, - "meshtastic": { - "name": "Meshtastic 网络传单", - "title": "安全通信", - "subtitle": "不要忽视", - "headline": "建立你的应急网络", - "content": "为什么选择 Meshtastic?在危机时刻,传统通信网络可能会失效,使我们陷入孤立和脆弱。Meshtastic 提供了一个强大的解决方案——一个独立于中心化系统运行的替代本地通信网络。它专为紧急情况设计,让您在最需要时保持连接。

Meshtastic 设备创建一个网状网络,即使没有互联网或蜂窝覆盖也能远距离中继消息。这种去中心化方法确保您的通信在任何情况下都是有弹性和可靠的。但这不仅仅是保持连接——Meshtastic 还提供加密,使您的消息保持安全和私密。

在隐私日益受到威胁的世界中,Meshtastic 使您能够掌控自己的通信。无论您是在协调当地社区响应、在灾难期间与亲人保持联系,还是只是为意外情况做准备,Meshtastic 都能为您提供安全有效通信所需的工具。

迈出一步,了解更多关于 Meshtastic 以及如何建立自己的应急通信网络。撕下左边的链接,探索这项创新技术。确保您为任何事情做好准备。", - "url_message": "点击此链接了解更多。" - }, - "nostr": { - "name": "Nostr 协议传单", - "title": "社交自由", - "subtitle": "不要忽视", - "headline": "加入抗审查网络", - "content": "什么是 Nostr?与传统社交媒体平台不同,Nostr 是一种协议——一个去中心化系统,使用户能够在没有中央权威约束的情况下连接和分享。Nostr 抗审查,这意味着您的声音不会被企业或政府压制。它旨在让您控制自己的在线存在,不受优先考虑参与度而非有意义连接的算法或广告的影响。

在 Nostr 上,没有隐藏的议程让您不断滚动。您按自己的条件与内容互动,而不是基于算法认为什么会让您在线最长时间。Nostr 让您建立真正的连接并参与重要的对话,同时保持您的隐私和自主权。

在在线言论日益受到控制和操纵的世界中,Nostr 提供了一个令人耳目一新的替代方案。它不仅仅是一个平台;它是迈向真正数字自由的运动,您的互动由您的兴趣和价值观驱动,而不是由什么产生最多广告收入。

迈出一步,了解更多关于 Nostr 以及它如何改变您在线连接的方式。撕下左边的链接,探索这个开创性协议。加入一个重视自由和真实互动的社区。", - "url_message": "点击此链接了解更多。" - }, - "voxvera": { - "name": "Vox Vera 可打印传单", - "title": "绝密", - "subtitle": "~~切勿~~ 散布", - "headline": "VOX VERA 行动", - "content": "用 VoxVera 摆脱审查。一个匿名的游击营销和消息传播工具。无论在线还是在现实世界中,它都能让您大胆地传播您的想法,受到完全匿名的保护(如果您通过 Tor 托管)。下载代码,设计传单网站,在线托管并放大您的信息。

利用模因的力量在您的学校、工作场所、在线社区甚至全球分享您的想法。VoxVera 确保您的信息广泛传播,带有独特 URL 和 QR 码的撕取部分便于重新打印。

隐私可以得到维护。传单可以通过 Tor 网络共享,保护托管者和用户免受审查。

加入我们重视真相和透明的革命。我们可以共同建立一个由不畏言论的知情公民组成的网络。", - "url_message": "获取 VoxVera 并开始传播你的消息。" - } - } -} diff --git a/voxvera/locales/zh/docs/usage.md b/voxvera/locales/zh/docs/usage.md deleted file mode 100644 index b6d3012..0000000 --- a/voxvera/locales/zh/docs/usage.md +++ /dev/null @@ -1,130 +0,0 @@ -# 详细用法 - -本指南涵盖了常用的 CLI 工作流程。有关 Docker 指令请参阅 `docs/docker.md`,有关可用传单模板请参阅 `docs/templates.md`。 - -## 先决条件 - -VoxVera 旨在实现高度便携,且仅需极少的系统依赖。 - -### 1. 独立二进制文件(推荐) -您可以为您的操作系统下载独立的、无依赖的二进制文件: -- **Linux:** `voxvera-linux` -- **Windows:** `voxvera-windows.exe` -- **macOS:** `voxvera-macos` - -这些二进制文件包含了运行 VoxVera 所需的一切(`onionshare-cli` 除外)。 - -### 2. 一键安装 -或者,通过我们的自动化脚本进行安装: - -```bash -curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/VoxVera/main/install.sh | bash -``` - -### 3. 手动 Python 安装 -如果您更喜欢从源代码运行: - -```bash -pipx install 'voxvera@git+https://github.com/PR0M3TH3AN/VoxVera.git@main' -sudo apt install tor onionshare-cli # Debian/Ubuntu -``` - -## 分步指南 - -1. **初始化:** 运行 `voxvera init` 并按照提示操作。系统会首先要求您选择语言。 -2. **构建:** 生成传单资产。每次构建都会在传单文件夹中自动创建一个 `voxvera-portable.zip`,允许其他人直接从您的传单下载完整工具。 - ```bash - voxvera build - ``` -3. **发布:** 通过 Tor 发布传单: - ```bash - voxvera serve - ``` - 这会自动检测您的 Tor 实例,启动 OnionShare,并将生成的 .onion 地址写入传单的可撕下链接中。 - -## 语言支持 - -VoxVera 已完全本地化。您可以使用交互式选择器或直接快捷方式永久更改您的语言偏好: - -- **交互式选择器:** `voxvera lang` -- **直接快捷方式:** `voxvera --lang zh`(将偏好设置为简体中文) - -### 支持的语言: -- **英语:** `en` -- **西班牙语:** `es`(别名:`--idioma`) -- **德语:** `de`(别名:`--sprache`) -- **简体中文:** `zh` - -您也可以在不更改永久偏好的情况下,为单个命令强制指定特定语言: -- **英语:** `voxvera --lang en check` -- **简体中文:** `voxvera --lang zh check` - -生成的传单会自动检测访问者的浏览器语言并相应地切换 UI 文本。 - -## 服务器管理 - -通过单一的交互式菜单管理多个传单及其 Tor 身份: - -```bash -voxvera manage -``` - -功能: -- **{{t('cli.manage_create_new')}}**:开始完整的设置序列。 -- **{{t('cli.manage_start_all')}}**:一次性启动或关闭您旗下的所有传单。 -- **实时状态**:查看活跃的 .onion URL 和 Tor 引导进度指示器。 -- **个人控制**:将特定站点 {{t('cli.manage_action_export')}} 到 ZIP 或删除它们。 - -## 通用镜像(病毒式传播) - -为了确保即使中央仓库被审查,VoxVera 仍然可用,每张传单都充当该工具的镜像。 - -当您托管传单时,落地页上的 **“{{t('web.download_button')}}”** 按钮会提供一个 `voxvera-portable.zip`,其中包含: -- 完整的源代码和所有支持的语言。 -- 所有 Python 依赖项(预先打包)。 -- 跨平台的 Tor 二进制文件。 - -这允许任何扫描您传单的人成为 VoxVera 工具的新分发者。 - -## 导出与备份 - -备份您独特的 Tor 身份(这样您的 .onion URL 就永远不会改变)或将您的传单移动到另一台机器。 - -- **导出单个站点**:`voxvera export <文件夹名称>` -- **导出所有站点**:`voxvera export-all` - -**存储位置:** 在所有平台上,所有导出都会以 ZIP 文件的形式保存在用户主目录下的 `voxvera-exports` 文件夹中(`~/voxvera-exports/`)。 - -## 导入与恢复 - -通过将 ZIP 文件移动到 `~/voxvera-exports/` 并运行以下命令,在新机器上恢复您的整个设置: - -```bash -voxvera import-multiple -``` - -## 便携性与离线使用 - -如果您需要在没有互联网访问的机器上运行 VoxVera,您可以先“本地化”依赖项: - -```bash -voxvera vendorize -``` - -这将把所有所需的 Python 库下载到 `voxvera/vendor/` 中。该工具随后将优先使用这些本地文件,使其能够在没有 `pip install` 的情况下运行。 - -## 批量导入 (JSON) - -要从多个 JSON 配置文件批量生成传单,请将它们放在 `imports/` 目录中并运行: - -```bash -voxvera batch-import -``` - -## URL 如何工作 - -每张传单都有两个独立的 URL: -- **撕下链接**(自动生成):托管传单的 .onion 地址。 -- **内容链接**(用户配置):指向网站、视频或下载的外部 URL。 - -您无需手动输入 .onion 地址;VoxVera 会在 `serve` 阶段自动处理。 diff --git a/voxvera/platforms/__init__.py b/voxvera/platforms/__init__.py deleted file mode 100644 index 0a719fc..0000000 --- a/voxvera/platforms/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -import platform - -from .base import PlatformAdapter -from .docker import DockerPlatformAdapter -from .linux import LinuxPlatformAdapter -from .macos import MacOSPlatformAdapter -from .windows import WindowsPlatformAdapter - - -def get_platform_adapter(cli_module=None) -> PlatformAdapter: - system = platform.system() - if system == "Linux": - docker_adapter = DockerPlatformAdapter(cli_module=cli_module) - if docker_adapter.is_container_runtime(): - return docker_adapter - return LinuxPlatformAdapter(cli_module=cli_module) - if system == "Darwin": - return MacOSPlatformAdapter(cli_module=cli_module) - if system == "Windows": - return WindowsPlatformAdapter(cli_module=cli_module) - return PlatformAdapter(cli_module=cli_module) diff --git a/voxvera/platforms/base.py b/voxvera/platforms/base.py deleted file mode 100644 index 80772fd..0000000 --- a/voxvera/platforms/base.py +++ /dev/null @@ -1,178 +0,0 @@ -from __future__ import annotations - -import json -import os -import platform -import shutil -import subprocess -from pathlib import Path - - -class PlatformAdapter: - platform_id = "generic" - tier = "experimental" - label = "Generic platform" - - def __init__(self, cli_module=None): - self.cli = cli_module - - @property - def home_dir(self) -> Path: - return Path.home() - - @property - def data_dir(self) -> Path: - if self.cli is not None: - return Path(self.cli.DATA_DIR) - return self.home_dir - - @property - def repo_root(self) -> Path: - if self.cli is not None and hasattr(self.cli, "ROOT"): - return Path(self.cli.ROOT).parent - return Path(__file__).resolve().parents[2] - - @property - def support_matrix_path(self) -> Path: - candidates = [] - env_path = os.environ.get("VOXVERA_SUPPORT_MATRIX_PATH") - if env_path: - candidates.append(Path(env_path)) - candidates.extend( - [ - self.repo_root / "support-matrix.json", - Path.cwd() / "support-matrix.json", - Path("/opt/voxvera/support-matrix.json"), - ] - ) - for candidate in candidates: - if candidate.exists(): - return candidate - return self.repo_root / "support-matrix.json" - - def _run_capture(self, args: list[str]) -> tuple[bool, str]: - try: - output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode().strip() - return True, output - except Exception as exc: - return False, str(exc) - - def load_support_matrix(self) -> dict: - if not self.support_matrix_path.exists(): - return {"platforms": [], "support_tiers": {}} - return json.loads(self.support_matrix_path.read_text(encoding="utf-8")) - - def support_entry(self) -> dict: - matrix = self.load_support_matrix() - for entry in matrix.get("platforms", []): - if entry.get("id") == self.platform_id: - return entry - return { - "id": self.platform_id, - "label": self.label, - "tier": self.tier, - "hosting_model": "", - "distribution_surfaces": [], - "required_capabilities": [], - "current_notes": [], - "next_gaps": [], - } - - def autostart_status(self) -> dict: - return { - "platform_id": self.platform_id, - "label": self.label, - "tier": self.tier, - "supported": False, - "message": "Autostart status is not implemented for this platform.", - "artifacts": [], - "checks": [], - } - - def install_autostart(self) -> None: - raise NotImplementedError("Autostart is not implemented for this platform.") - - def uninstall_autostart(self) -> None: - raise NotImplementedError("Autostart uninstall is not implemented for this platform.") - - def platform_status(self) -> dict: - entry = self.support_entry() - matrix = self.load_support_matrix() - return { - "platform_id": self.platform_id, - "label": entry.get("label", self.label), - "tier": entry.get("tier", self.tier), - "tier_description": matrix.get("support_tiers", {}).get(entry.get("tier", self.tier), ""), - "hosting_model": entry.get("hosting_model", ""), - "distribution_surfaces": entry.get("distribution_surfaces", []), - "required_capabilities": entry.get("required_capabilities", []), - "current_notes": entry.get("current_notes", []), - "next_gaps": entry.get("next_gaps", []), - } - - def _doctor_section(self, title: str, check_names: list[str], checks: list[dict]) -> dict: - section_checks = [check for check in checks if check["name"] in check_names] - return { - "title": title, - "ok": all(check.get("ok") for check in section_checks) if section_checks else True, - "checks": section_checks, - } - - def build_doctor_sections(self, checks: list[dict]) -> dict: - return { - "platform_contract": self._doctor_section("Platform contract", ["platform"], checks), - "dependencies": self._doctor_section("Dependencies", ["voxvera_cli", "onionshare_cli"], checks), - "network": self._doctor_section("Network", [], checks), - "autostart": self._doctor_section("Autostart", [], checks), - "content_state": self._doctor_section("Content state", [], checks), - } - - def doctor_report(self) -> dict: - checks = [] - voxvera_path = shutil.which("voxvera") - onionshare_path = shutil.which("onionshare-cli") or shutil.which("onionshare") - platform_status = self.platform_status() - - checks.append( - { - "name": "platform", - "ok": True, - "detail": f"{platform.system()} ({self.platform_id}, tier={platform_status['tier']})", - } - ) - checks.append( - { - "name": "voxvera_cli", - "ok": bool(voxvera_path), - "detail": voxvera_path or "voxvera not found on PATH", - } - ) - checks.append( - { - "name": "onionshare_cli", - "ok": bool(onionshare_path), - "detail": onionshare_path or "onionshare-cli/onionshare not found on PATH", - } - ) - - sections = self.build_doctor_sections(checks) - return { - "platform_id": self.platform_id, - "label": platform_status["label"], - "tier": platform_status["tier"], - "tier_description": platform_status["tier_description"], - "hosting_model": platform_status["hosting_model"], - "distribution_surfaces": platform_status["distribution_surfaces"], - "required_capabilities": platform_status["required_capabilities"], - "current_notes": platform_status["current_notes"], - "next_gaps": platform_status["next_gaps"], - "summary": { - "ok": all(check.get("ok") for check in checks), - "failing_checks": [check["name"] for check in checks if not check.get("ok")], - }, - "sections": sections, - "checks": checks, - } - - def autostart_artifacts(self) -> list[str]: - return [] diff --git a/voxvera/platforms/docker.py b/voxvera/platforms/docker.py deleted file mode 100644 index 2e7ed92..0000000 --- a/voxvera/platforms/docker.py +++ /dev/null @@ -1,133 +0,0 @@ -from __future__ import annotations - -import os -import shutil -import socket -from pathlib import Path - -from .base import PlatformAdapter - - -class DockerPlatformAdapter(PlatformAdapter): - platform_id = "docker_cli" - tier = "experimental" - label = "Docker CLI container" - - @property - def container_marker_paths(self) -> list[Path]: - return [Path("/.dockerenv"), Path("/run/.containerenv")] - - def is_container_runtime(self) -> bool: - return any(path.exists() for path in self.container_marker_paths) or os.environ.get("VOXVERA_RUNTIME") == "docker" - - def autostart_status(self) -> dict: - artifacts = [] - if shutil.which("voxvera-docker-entrypoint"): - artifacts.append("voxvera-docker-entrypoint") - if shutil.which("voxvera-docker-healthcheck"): - artifacts.append("voxvera-docker-healthcheck") - - checks = [ - { - "name": "container_marker", - "ok": self.is_container_runtime(), - "detail": "container marker present" - if self.is_container_runtime() - else "no Docker marker detected", - }, - { - "name": "docker_entrypoint", - "ok": bool(shutil.which("voxvera-docker-entrypoint")), - "detail": shutil.which("voxvera-docker-entrypoint") or "voxvera-docker-entrypoint not found", - }, - { - "name": "docker_healthcheck", - "ok": bool(shutil.which("voxvera-docker-healthcheck")), - "detail": shutil.which("voxvera-docker-healthcheck") or "voxvera-docker-healthcheck not found", - }, - { - "name": "restart_policy_external", - "ok": True, - "detail": "Container restart behavior is managed by Docker/Compose, not VoxVera autostart.", - }, - ] - - return { - "platform_id": self.platform_id, - "label": self.label, - "tier": self.tier, - "supported": all(check["ok"] for check in checks[:3]), - "message": "Docker recovery depends on the container entrypoint plus an external restart policy.", - "artifacts": artifacts, - "checks": checks, - } - - def install_autostart(self) -> None: - raise RuntimeError("Docker autostart is managed by the container runtime. Use a restart policy such as '--restart unless-stopped'.") - - def uninstall_autostart(self) -> None: - raise RuntimeError("Docker autostart is managed by the container runtime. Remove or change the container restart policy instead.") - - def doctor_report(self) -> dict: - report = super().doctor_report() - checks = report["checks"] - - marker_present = self.is_container_runtime() - checks.append( - { - "name": "container_marker", - "ok": marker_present, - "detail": "Docker marker detected" if marker_present else "no Docker marker detected", - } - ) - - socks_port = os.getenv("TOR_SOCKS_PORT", "9050") - reachable = False - try: - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.settimeout(0.25) - reachable = sock.connect_ex(("127.0.0.1", int(socks_port))) == 0 - sock.close() - except Exception: - reachable = False - checks.append( - { - "name": "tor_socks_reachable", - "ok": reachable, - "detail": f"reachable on {socks_port}" if reachable else f"Tor SOCKS not reachable on {socks_port}", - } - ) - - host_root = self.data_dir / "host" - checks.append( - { - "name": "host_root", - "ok": host_root.exists(), - "detail": str(host_root) if host_root.exists() else f"missing: {host_root}", - } - ) - - status = self.autostart_status() - for name in ("docker_entrypoint", "docker_healthcheck"): - check = next((item for item in status["checks"] if item["name"] == name), None) - if check: - checks.append( - { - "name": name, - "ok": check["ok"], - "detail": check["detail"], - } - ) - - report["summary"] = { - "ok": all(check.get("ok") for check in checks), - "failing_checks": [check["name"] for check in checks if not check.get("ok")], - } - report["sections"] = { - "platform_contract": self._doctor_section("Platform contract", ["platform", "container_marker"], checks), - "dependencies": self._doctor_section("Dependencies", ["voxvera_cli", "onionshare_cli", "docker_entrypoint", "docker_healthcheck"], checks), - "network": self._doctor_section("Network", ["tor_socks_reachable"], checks), - "autostart": self._doctor_section("Autostart", ["docker_entrypoint", "docker_healthcheck"], checks), - "content_state": self._doctor_section("Content state", ["host_root"], checks), - } - return report diff --git a/voxvera/platforms/linux.py b/voxvera/platforms/linux.py deleted file mode 100644 index dc50f46..0000000 --- a/voxvera/platforms/linux.py +++ /dev/null @@ -1,247 +0,0 @@ -from __future__ import annotations - -import os -import shutil -import socket -import subprocess -from pathlib import Path - -from .base import PlatformAdapter - - -class LinuxPlatformAdapter(PlatformAdapter): - platform_id = "linux_cli_systemd" - tier = "supported" - label = "Linux CLI with systemd --user" - - @property - def user_systemd_dir(self) -> Path: - return self.home_dir / ".config" / "systemd" / "user" - - @property - def service_path(self) -> Path: - return self.user_systemd_dir / "voxvera-start.service" - - @property - def timer_path(self) -> Path: - return self.user_systemd_dir / "voxvera-start.timer" - - def autostart_artifacts(self) -> list[str]: - return [str(self.service_path), str(self.timer_path)] - - def render_systemd_service(self, voxvera_bin: str) -> str: - return f"""\ -[Unit] -Description=VoxVera hidden-service recovery runner -After=network-online.target tor.service -Wants=network-online.target - -[Service] -Type=oneshot -KillMode=process -ExecStart={voxvera_bin} _linux_autostart_start -""" - - def render_systemd_timer(self) -> str: - return """\ -[Unit] -Description=Retry VoxVera hidden-service startup - -[Install] -WantedBy=timers.target - -[Timer] -OnBootSec=2min -OnStartupSec=2min -OnUnitActiveSec=5min -Unit=voxvera-start.service -Persistent=true -""" - - def autostart_status(self) -> dict: - checks = [] - artifacts = self.autostart_artifacts() - for path in [self.service_path, self.timer_path]: - checks.append( - { - "name": path.name, - "ok": path.exists(), - "detail": str(path) if path.exists() else f"missing: {path}", - } - ) - - if shutil.which("systemctl"): - ok, output = self._run_capture(["systemctl", "--user", "is-enabled", "voxvera-start.timer"]) - checks.append( - { - "name": "systemd_timer_enabled", - "ok": ok and output == "enabled", - "detail": output, - } - ) - ok, output = self._run_capture(["systemctl", "--user", "is-active", "voxvera-start.timer"]) - checks.append( - { - "name": "systemd_timer_active", - "ok": ok and output == "active", - "detail": output, - } - ) - else: - checks.append( - { - "name": "systemctl", - "ok": False, - "detail": "systemctl not found", - } - ) - - supported = all(check["ok"] for check in checks if check["name"] in {"voxvera-start.service", "voxvera-start.timer"}) - return { - "platform_id": self.platform_id, - "label": self.label, - "tier": self.tier, - "supported": supported, - "message": "Linux recovery timer is the supported persistent-host path.", - "artifacts": artifacts, - "checks": checks, - } - - def install_autostart(self) -> None: - if self.cli is None: - raise RuntimeError("CLI module is required to install Linux autostart.") - self.user_systemd_dir.mkdir(parents=True, exist_ok=True) - voxvera_bin = self.cli._find_voxvera_bin() - - self.service_path.write_text(self.render_systemd_service(voxvera_bin), encoding="utf-8") - self.timer_path.write_text(self.render_systemd_timer(), encoding="utf-8") - - legacy_service = self.user_systemd_dir / "voxvera.service" - if legacy_service.exists(): - legacy_service.unlink() - - commands = [ - ["systemctl", "--user", "daemon-reload"], - ["systemctl", "--user", "disable", "--now", "voxvera.service"], - ["systemctl", "--user", "enable", "--now", "voxvera-start.timer"], - ["systemctl", "--user", "start", "voxvera-start.service"], - ] - for command in commands: - try: - subprocess.run( - command, - check=False, - stdin=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, - timeout=10, - ) - except Exception: - pass - - linger_output = "" - try: - result = subprocess.run( - ["loginctl", "show-user", os.environ.get("USER", ""), "--property=Linger", "--value"], - check=False, - stdin=subprocess.DEVNULL, - stdout=subprocess.PIPE, - stderr=subprocess.DEVNULL, - text=True, - timeout=5, - ) - linger_output = (result.stdout or "").strip() - if linger_output == "no": - print("Note: user linger is not enabled. The recovery timer will run while you are logged in.") - print(" To enable boot-time user services, run: sudo loginctl enable-linger $USER") - except Exception: - pass - - print(f"Systemd user service installed: {self.service_path}") - print(f"Systemd user timer installed: {self.timer_path}") - print("Sites will be retried automatically after boot and every few minutes.") - print(" Manage with: systemctl --user [start|stop|status] voxvera-start.service") - print(" Timer status: systemctl --user status voxvera-start.timer") - - def uninstall_autostart(self) -> None: - commands = [ - ["systemctl", "--user", "disable", "--now", "voxvera-start.timer"], - ["systemctl", "--user", "stop", "voxvera-start.service"], - ["systemctl", "--user", "daemon-reload"], - ] - for command in commands: - try: - subprocess.run(command, check=False, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - except Exception: - pass - - self.service_path.unlink(missing_ok=True) - self.timer_path.unlink(missing_ok=True) - print(f"Removed systemd user service: {self.service_path}") - print(f"Removed systemd user timer: {self.timer_path}") - - def doctor_report(self) -> dict: - report = super().doctor_report() - checks = report["checks"] - - tor_found = bool(shutil.which("tor")) - checks.append( - { - "name": "tor_binary", - "ok": tor_found, - "detail": shutil.which("tor") or "tor not found on PATH", - } - ) - - socks_port = os.getenv("TOR_SOCKS_PORT") - if not socks_port: - for candidate in ("9050", "9150"): - try: - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.settimeout(0.25) - result = sock.connect_ex(("127.0.0.1", int(candidate))) - sock.close() - if result == 0: - socks_port = candidate - break - except Exception: - pass - checks.append( - { - "name": "tor_socks_reachable", - "ok": bool(socks_port), - "detail": f"reachable on {socks_port}" if socks_port else "no Tor SOCKS port detected", - } - ) - - status = self.autostart_status() - timer_check = next((check for check in status["checks"] if check["name"] == "systemd_timer_enabled"), None) - if timer_check is not None: - checks.append( - { - "name": "autostart_timer_enabled", - "ok": timer_check["ok"], - "detail": timer_check["detail"], - } - ) - - host_root = self.data_dir / "host" - checks.append( - { - "name": "host_root", - "ok": host_root.exists(), - "detail": str(host_root) if host_root.exists() else f"missing: {host_root}", - } - ) - report["summary"] = { - "ok": all(check.get("ok") for check in checks), - "failing_checks": [check["name"] for check in checks if not check.get("ok")], - } - report["sections"] = { - "platform_contract": self._doctor_section("Platform contract", ["platform"], checks), - "dependencies": self._doctor_section("Dependencies", ["voxvera_cli", "onionshare_cli", "tor_binary"], checks), - "network": self._doctor_section("Network", ["tor_socks_reachable"], checks), - "autostart": self._doctor_section("Autostart", ["autostart_timer_enabled"], checks), - "content_state": self._doctor_section("Content state", ["host_root"], checks), - } - return report diff --git a/voxvera/platforms/macos.py b/voxvera/platforms/macos.py deleted file mode 100644 index 96d6011..0000000 --- a/voxvera/platforms/macos.py +++ /dev/null @@ -1,95 +0,0 @@ -from pathlib import Path - -from .base import PlatformAdapter - - -class MacOSPlatformAdapter(PlatformAdapter): - platform_id = "macos_cli" - tier = "experimental" - label = "macOS CLI" - - @property - def launch_agents_dir(self) -> Path: - return self.home_dir / "Library" / "LaunchAgents" - - @property - def plist_path(self) -> Path: - return self.launch_agents_dir / "org.voxvera.start-all.plist" - - def autostart_artifacts(self) -> list[str]: - return [str(self.plist_path)] - - def render_launchd_plist(self, voxvera_bin: str) -> str: - home = self.home_dir - return f"""\ - - - - - Label - org.voxvera.start-all - ProgramArguments - - {voxvera_bin} - start-all - - RunAtLoad - - StandardOutPath - {home}/host/voxvera-autostart.log - StandardErrorPath - {home}/host/voxvera-autostart.log - - -""" - - def autostart_status(self) -> dict: - checks = [ - { - "name": self.plist_path.name, - "ok": self.plist_path.exists(), - "detail": str(self.plist_path) if self.plist_path.exists() else f"missing: {self.plist_path}", - } - ] - if self._run_capture(["launchctl", "list", "org.voxvera.start-all"])[0]: - checks.append( - { - "name": "launchd_loaded", - "ok": True, - "detail": "org.voxvera.start-all is loaded", - } - ) - else: - checks.append( - { - "name": "launchd_loaded", - "ok": False, - "detail": "org.voxvera.start-all is not loaded", - } - ) - return { - "platform_id": self.platform_id, - "label": self.label, - "tier": self.tier, - "supported": False, - "message": "macOS launchd autostart is experimental and not validated for reliable hidden-service recovery.", - "artifacts": self.autostart_artifacts(), - "checks": checks, - } - - def install_autostart(self) -> None: - if self.cli is None: - raise RuntimeError("CLI module is required to install macOS autostart.") - self.launch_agents_dir.mkdir(parents=True, exist_ok=True) - voxvera_bin = self.cli._find_voxvera_bin() - self.plist_path.write_text(self.render_launchd_plist(voxvera_bin), encoding="utf-8") - self._run_capture(["launchctl", "load", "-w", str(self.plist_path)]) - print(f"LaunchAgent installed: {self.plist_path}") - print("Sites will start automatically on login.") - print(f" Disable with: launchctl unload {self.plist_path}") - - def uninstall_autostart(self) -> None: - self._run_capture(["launchctl", "unload", str(self.plist_path)]) - self.plist_path.unlink(missing_ok=True) - print(f"Removed LaunchAgent: {self.plist_path}") diff --git a/voxvera/platforms/windows.py b/voxvera/platforms/windows.py deleted file mode 100644 index 4aaeba7..0000000 --- a/voxvera/platforms/windows.py +++ /dev/null @@ -1,61 +0,0 @@ -from .base import PlatformAdapter - - -class WindowsPlatformAdapter(PlatformAdapter): - platform_id = "windows_cli" - tier = "experimental" - label = "Windows CLI" - task_name = "VoxVera Start All" - - def render_schtasks_create_command(self, voxvera_bin: str) -> list[str]: - return [ - "schtasks", - "/Create", - "/F", - "/SC", - "ONLOGON", - "/TN", - self.task_name, - "/TR", - f'"{voxvera_bin}" start-all', - "/RL", - "HIGHEST", - ] - - def autostart_status(self) -> dict: - ok, output = self._run_capture(["schtasks", "/Query", "/TN", self.task_name]) - checks = [ - { - "name": "scheduled_task_present", - "ok": ok, - "detail": output if ok else f"missing or unreadable: {self.task_name}", - } - ] - return { - "platform_id": self.platform_id, - "label": self.label, - "tier": self.tier, - "supported": False, - "message": "Windows Task Scheduler autostart is experimental and not validated for reliable hidden-service recovery.", - "artifacts": [], - "checks": checks, - } - - def install_autostart(self) -> None: - if self.cli is None: - raise RuntimeError("CLI module is required to install Windows autostart.") - voxvera_bin = self.cli._find_voxvera_bin() - ok, _output = self._run_capture(self.render_schtasks_create_command(voxvera_bin)) - if ok: - print(f"Windows scheduled task '{self.task_name}' created.") - print("Sites will start automatically on login.") - print(f' Remove with: schtasks /Delete /TN "{self.task_name}" /F') - return - print("Failed to create scheduled task. Try running as Administrator.") - - def uninstall_autostart(self) -> None: - ok, _output = self._run_capture(["schtasks", "/Delete", "/TN", self.task_name, "/F"]) - if ok: - print(f"Windows scheduled task '{self.task_name}' removed.") - return - print(f"Windows scheduled task '{self.task_name}' could not be removed.") diff --git a/voxvera/resources/tor/linux/lyrebird b/voxvera/resources/tor/linux/lyrebird deleted file mode 100755 index d6c690d..0000000 Binary files a/voxvera/resources/tor/linux/lyrebird and /dev/null differ diff --git a/voxvera/resources/tor/linux/obfs4proxy b/voxvera/resources/tor/linux/obfs4proxy deleted file mode 120000 index 57c3989..0000000 --- a/voxvera/resources/tor/linux/obfs4proxy +++ /dev/null @@ -1 +0,0 @@ -lyrebird \ No newline at end of file diff --git a/voxvera/resources/tor/linux/tor b/voxvera/resources/tor/linux/tor deleted file mode 100755 index aba12ff..0000000 Binary files a/voxvera/resources/tor/linux/tor and /dev/null differ diff --git a/voxvera/resources/tor/mac/lyrebird b/voxvera/resources/tor/mac/lyrebird deleted file mode 100755 index d6a47ef..0000000 Binary files a/voxvera/resources/tor/mac/lyrebird and /dev/null differ diff --git a/voxvera/resources/tor/mac/obfs4proxy b/voxvera/resources/tor/mac/obfs4proxy deleted file mode 120000 index 57c3989..0000000 --- a/voxvera/resources/tor/mac/obfs4proxy +++ /dev/null @@ -1 +0,0 @@ -lyrebird \ No newline at end of file diff --git a/voxvera/resources/tor/mac/tor b/voxvera/resources/tor/mac/tor deleted file mode 100755 index afbe3a9..0000000 Binary files a/voxvera/resources/tor/mac/tor and /dev/null differ diff --git a/voxvera/resources/tor/win/lyrebird.exe b/voxvera/resources/tor/win/lyrebird.exe deleted file mode 100755 index 477fa3a..0000000 Binary files a/voxvera/resources/tor/win/lyrebird.exe and /dev/null differ diff --git a/voxvera/resources/tor/win/obfs4proxy.exe b/voxvera/resources/tor/win/obfs4proxy.exe deleted file mode 120000 index 2cd7744..0000000 --- a/voxvera/resources/tor/win/obfs4proxy.exe +++ /dev/null @@ -1 +0,0 @@ -lyrebird.exe \ No newline at end of file diff --git a/voxvera/resources/tor/win/tor.exe b/voxvera/resources/tor/win/tor.exe deleted file mode 100755 index f04852f..0000000 Binary files a/voxvera/resources/tor/win/tor.exe and /dev/null differ diff --git a/voxvera/src/README.md b/voxvera/src/README.md deleted file mode 100644 index 31f0b24..0000000 --- a/voxvera/src/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# VoxVera Source Files - -This directory contains the source assets used to build flyers: - -- `index-master.html` -- Main flyer template (HTML/CSS/JS) -- `config.json` -- Default configuration values -- `qrcode-content.png` -- Generated QR code for the content link -- `qrcode-tear-offs.png` -- Generated QR code for the tear-off link - -## Build Pipeline - -The `voxvera build` command processes these source files: - -1. **QR code generation** -- Reads URLs from `config.json` and generates PNG QR codes using the `qrcode` and `Pillow` Python libraries. -2. **HTML minification** -- Minifies embedded JavaScript with `jsmin` and the overall HTML with `htmlmin2`. Produces `index.html` and `nostr.html` from the master templates. -3. **Footer message injection** -- Writes the configured footer message into the built HTML. -4. **Asset packaging** -- Copies all built files into `host//`. - -No external tools (Node.js, ImageMagick, qrencode, etc.) are required. The entire build pipeline uses pure Python packages. - -## URL Handling - -- The **content link** (`url` in config.json) is set by the user during `voxvera init` and can point to any external resource. -- The **tear-off link** (`tear_off_link` in config.json) is automatically set to the .onion address when `voxvera serve` starts. Tear-off QR codes are regenerated at that point. - -## Editing Templates - -Edit `index-master.html` or `nostr-master.html` directly if you need to customize the flyer layout. The JavaScript at the bottom of each file populates content from `config.json` at runtime. - -## Creating and Hosting a Flyer - -```bash -# Configure flyer content and external URL -voxvera init - -# Build assets -voxvera build - -# Host over Tor (auto-detects ports, generates .onion address) -voxvera serve -``` - -Or do all three in one step: - -```bash -voxvera quickstart -``` diff --git a/voxvera/src/config.json b/voxvera/src/config.json deleted file mode 100644 index b0c305a..0000000 --- a/voxvera/src/config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Vox Vera Printable Flyers", - "folder_name": "voxvera", - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.", - "url_message": "Get VoxVera and start spreading your message.", - "url": "https://github.com/PR0M3TH3AN/VoxVera", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/src/index-master.html b/voxvera/src/index-master.html deleted file mode 100644 index a9b766f..0000000 --- a/voxvera/src/index-master.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - {{name}} - - - - - -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
- -
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
-

{{t_landing_title}}

-
{{t_landing_subtitle}}
-

{{t_landing_headline}}

-
-
-
{{t_landing_content}}
-
- -
-{{t_landing_url_message}}

-{{t_web_tear_off_tor_browser}}

-{{url}} -
- QR Code -
-
-
- -
-
-
- - - - - -
- - diff --git a/voxvera/src/qrcode-content.png b/voxvera/src/qrcode-content.png deleted file mode 100644 index b2e4486..0000000 Binary files a/voxvera/src/qrcode-content.png and /dev/null differ diff --git a/voxvera/src/qrcode-tear-offs.png b/voxvera/src/qrcode-tear-offs.png deleted file mode 100644 index da62055..0000000 Binary files a/voxvera/src/qrcode-tear-offs.png and /dev/null differ diff --git a/voxvera/templates/presets/aosp.json b/voxvera/templates/presets/aosp.json deleted file mode 100644 index 5566e7c..0000000 --- a/voxvera/templates/presets/aosp.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "AOS Project", - "folder_name": "aosp", - "title": "ANDROID UNLEASHED", - "subtitle": "WITHOUT BOUNDARIES", - "headline": "OPEN-SOURCE FREEDOM", - "content": "The Android Open Source Project (AOSP) represents the essence of what Android was originally intended to be: an open, transparent, and adaptable platform. It strips away the layers of proprietary software and corporate oversight that have become synonymous with mainstream Android distributions. With AOSP, you gain access to a raw, unfiltered version of Android, allowing you to truly make your device your own.

For developers, AOSP offers a playground of possibilities, where the only limits are your skills and imagination. It serves as the foundation for countless custom ROMs, each tailored to specific needs, whether for enhanced performance, privacy, or unique features that mainstream versions lack. Privacy enthusiasts will appreciate the absence of pre-installed bloatware and tracking services that often come wit stock Android, providing a cleaner, more secure user experience.

AOSP isn't just for developers or tech enthusiasts; it's for anyone who values digital freedom. It allows you to reclaim control over your device, tailoring it to your needs without the restrictions of carriers or manufacturers. Discover how AOSP can transform your mobile experience. Start your journey towards a more open, customizable future today.", - "url_message": "Visit the link below to learn more.", - "url": "https://source.android.com", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/presets/bitcoin.json b/voxvera/templates/presets/bitcoin.json deleted file mode 100644 index c723cf6..0000000 --- a/voxvera/templates/presets/bitcoin.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Bitcoin Revolution Flyers", - "folder_name": "bitcoin", - "title": "RULES WITHOUT RULERS", - "subtitle": "DO NOT IGNORE", - "headline": "JOIN THE BITCOIN REVOLUTION", - "content": "What is Bitcoin? It's more than just digital money; it's a revolutionary technology designed to fix some of the world's most pressing problems. Bitcoin operates on a decentralized network, free from the control of any government or central authority. This ensures that no one can manipulate its supply or value, making it a sound form of money that protects your wealth from inflation.

Our current financial system is built on flawed incentives—encouraging debt, dependency, and centralization of power. Bitcoin changes that by creating a system where honesty, transparency, and individual responsibility are rewarded. In the Bitcoin network, there is no room for corruption or manipulation because the rules are enforced by mathematics, not by people.

Bitcoin aligns incentives in a way that promotes long-term thinking, savings, and innovation. It empowers individuals to take control of their financial future, fostering a global community where value can be transferred freely and securely without intermediaries. This is why we need Bitcoin—because it creates a world where incentives are properly aligned, leading to a more fair and prosperous society for all.

Take the step to learn more about Bitcoin and how it can transform not just your financial life, but the world. Tear off a link to the left and explore this groundbreaking technology. Join the movement towards a better future.", - "url_message": "Follow this link to learn more.", - "url": "https://bitcoin.org/en", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/presets/blank.json b/voxvera/templates/presets/blank.json deleted file mode 100644 index 315e9dd..0000000 --- a/voxvera/templates/presets/blank.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "", - "folder_name": "", - "title": "", - "subtitle": "", - "headline": "", - "content": "", - "url_message": "", - "url": "", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/presets/example.json b/voxvera/templates/presets/example.json deleted file mode 100644 index a45ce52..0000000 --- a/voxvera/templates/presets/example.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "name", - "folder_name": "folder_name", - "title": "title", - "subtitle": "subtitle", - "headline": "headline", - "content": "content", - "url_message": "url message", - "url": "url", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/presets/jesus.json b/voxvera/templates/presets/jesus.json deleted file mode 100644 index dc2b281..0000000 --- a/voxvera/templates/presets/jesus.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Life Changing Message", - "folder_name": "jesus", - "title": "GOOD NEWS", - "subtitle": "DO NOT IGNORE", - "headline": "DISCOVER TRUE HOPE", - "content": "Who is Jesus? He is more than just a historical figure; He is the Son of God, the Savior of the world. Jesus Himself said, 'I am the way, the truth, and the life. No one comes to the Father except through Me' (John 14:6). He came to bridge the gap between God and humanity, offering us a path to forgiveness, peace, and eternal life.

We all face brokenness in our lives—whether it's in our relationships, our hearts, or our world. Jesus came to heal that brokenness. He lived a perfect life, died on the cross for our sins, and rose again, defeating death and offering us the hope of eternal life with God.

Without Jesus, we are lost in our sin, separated from God. But through Him, we can be forgiven and restored. He offers us not just a better life now, but the promise of an eternal life with Him. This is why we need Him—because only in Jesus can we find true peace, purpose, and the assurance of eternal life.

Take the step to learn more about Jesus and the life-changing impact He can have on your life. Tear off a link to the left and explore His teachings. Find the hope you've been searching for.", - "url_message": "Follow this link to learn more.", - "url": "http://media.faithforthefamily.com/ra/godsoloved/english.mp3", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/presets/meshtastic.json b/voxvera/templates/presets/meshtastic.json deleted file mode 100644 index b668873..0000000 --- a/voxvera/templates/presets/meshtastic.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Meshtastic Network Flyers", - "folder_name": "meshtastic", - "title": "SECURE COMMUNICATIONS", - "subtitle": "DO NOT IGNORE", - "headline": "BUILD YOUR EMERGENCY NETWORK", - "content": "Why Meshtastic? In times of crisis, traditional communication networks can fail, leaving us isolated and vulnerable. Meshtastic provides a powerful solution—an alternative local communication network that operates independently of centralized systems. It’s designed for emergency situations, allowing you to stay connected when it matters most.

Meshtastic devices create a mesh network that can relay messages over long distances, even without internet or cellular coverage. This decentralized approach ensures that your communications are resilient and reliable, no matter the circumstances. But it’s not just about staying connected—Meshtastic also offers encryption, so your messages remain secure and private.

In a world where privacy is increasingly compromised, Meshtastic empowers you to take control of your communication. Whether you’re coordinating a local community response, staying in touch with loved ones during a disaster, or simply preparing for the unexpected, Meshtastic provides the tools you need to communicate securely and effectively.

Take the step to learn more about Meshtastic and how you can build your own emergency communication network. Tear off a link to the left and explore this innovative technology. Ensure you’re prepared for whatever comes your way.", - "url_message": "Follow this link to learn more.", - "url": "https://meshtastic.org", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/presets/nostr.json b/voxvera/templates/presets/nostr.json deleted file mode 100644 index 10b4cb3..0000000 --- a/voxvera/templates/presets/nostr.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Nostr Protocol Flyers", - "folder_name": "voxvera", - "title": "SOCIAL FREEDOM", - "subtitle": "DO NOT IGNORE", - "headline": "JOIN THE CENSORSHIP-RESISTANT NETWORK", - "content": "What is Nostr? Unlike traditional social media platforms, Nostr is a protocol—a decentralized system that empowers users to connect and share without the constraints of a central authority. Nostr is censorship-resistant, meaning your voice can’t be silenced by corporations or governments. It’s designed to give you control over your online presence, free from the influence of algorithms or ads that prioritize engagement over meaningful connections.

On Nostr, there are no hidden agendas to keep you doomscrolling. You engage with content on your terms, not based on what an algorithm thinks will keep you online the longest. Nostr allows you to build genuine connections and participate in conversations that matter, all while maintaining your privacy and autonomy.

In a world where online speech is increasingly controlled and manipulated, Nostr offers a refreshing alternative. It’s not just a platform; it’s a movement towards true digital freedom, where your interactions are driven by your interests and values, not by what generates the most ad revenue.

Take the step to learn more about Nostr and how it can transform the way you connect online. Tear off a link the left and explore this groundbreaking protocol. Join a community that values freedom and authentic interaction.", - "url_message": "Follow this link to learn more.", - "url": "https://nostr.how/en/what-is-nostr", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/presets/voxvera.json b/voxvera/templates/presets/voxvera.json deleted file mode 100644 index 711eb49..0000000 --- a/voxvera/templates/presets/voxvera.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Vox Vera Printable Flyers", - "folder_name": "voxvera", - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.", - "url_message": "Follow this link to learn more.", - "url": "https://voxvera.org/", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/voxvera/config.json b/voxvera/templates/voxvera/config.json deleted file mode 100644 index 711eb49..0000000 --- a/voxvera/templates/voxvera/config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Vox Vera Printable Flyers", - "folder_name": "voxvera", - "title": "TOP SECRET", - "subtitle": "DO ~~NOT~~ DISTRIBUTE", - "headline": "OPERATION VOX VERA", - "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.

Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.

Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.

Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.", - "url_message": "Follow this link to learn more.", - "url": "https://voxvera.org/", - "tear_off_link": "", - "footer_message": "0110010 0101011 0110010 0111101 0110100", - "attachment_path": "", - "attachment_filename": "" -} diff --git a/voxvera/templates/voxvera/download/.gitkeep b/voxvera/templates/voxvera/download/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/templates/voxvera/index.html b/voxvera/templates/voxvera/index.html deleted file mode 100644 index a9b766f..0000000 --- a/voxvera/templates/voxvera/index.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - {{name}} - - - - - -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
- -
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
- {{t_web_tear_off_tor_browser}}

- {{t_web_tear_off_desc}}
- {{tear_off_link}}
- {{t_web_tear_off_footer}} -
-
- QR Code -
-
-
-
-

{{t_landing_title}}

-
{{t_landing_subtitle}}
-

{{t_landing_headline}}

-
-
-
{{t_landing_content}}
-
- -
-{{t_landing_url_message}}

-{{t_web_tear_off_tor_browser}}

-{{url}} -
- QR Code -
-
-
- -
-
-
- - - - - -
- - diff --git a/voxvera/templates/voxvera/qrcode-content.png b/voxvera/templates/voxvera/qrcode-content.png deleted file mode 100644 index cbd87fe..0000000 Binary files a/voxvera/templates/voxvera/qrcode-content.png and /dev/null differ diff --git a/voxvera/templates/voxvera/qrcode-tear-offs.png b/voxvera/templates/voxvera/qrcode-tear-offs.png deleted file mode 100644 index cbd87fe..0000000 Binary files a/voxvera/templates/voxvera/qrcode-tear-offs.png and /dev/null differ diff --git a/voxvera/vendor/InquirerPy/__init__.py b/voxvera/vendor/InquirerPy/__init__.py deleted file mode 100644 index 4d3f794..0000000 --- a/voxvera/vendor/InquirerPy/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from InquirerPy.resolver import prompt, prompt_async -from InquirerPy.utils import get_style diff --git a/voxvera/vendor/InquirerPy/base/__init__.py b/voxvera/vendor/InquirerPy/base/__init__.py deleted file mode 100644 index fb6d176..0000000 --- a/voxvera/vendor/InquirerPy/base/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -"""Module contains base class for prompts. - -BaseSimplePrompt ← InputPrompt ← SecretPrompt ... - ↑ -BaseComplexPrompt - ↑ -BaseListPrompt ← FuzzyPrompt - ↑ -ListPrompt ← ExpandPrompt ... -""" - -from .complex import BaseComplexPrompt, FakeDocument -from .control import Choice, InquirerPyUIListControl -from .list import BaseListPrompt -from .simple import BaseSimplePrompt diff --git a/voxvera/vendor/InquirerPy/base/complex.py b/voxvera/vendor/InquirerPy/base/complex.py deleted file mode 100644 index 89c9f73..0000000 --- a/voxvera/vendor/InquirerPy/base/complex.py +++ /dev/null @@ -1,294 +0,0 @@ -"""Contains the interface class :class:`.BaseComplexPrompt` for more complex prompts and the mocked document class :class:`.FakeDocument`.""" -import shutil -from dataclasses import dataclass -from typing import Any, Callable, List, Optional, Tuple, Union - -from prompt_toolkit.application import Application -from prompt_toolkit.enums import EditingMode -from prompt_toolkit.filters.base import Condition, FilterOrBool -from prompt_toolkit.key_binding.key_bindings import KeyHandlerCallable -from prompt_toolkit.keys import Keys - -from InquirerPy.base.simple import BaseSimplePrompt -from InquirerPy.enum import INQUIRERPY_KEYBOARD_INTERRUPT -from InquirerPy.utils import ( - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - - -@dataclass -class FakeDocument: - """A fake `prompt_toolkit` document class. - - Work around to allow non-buffer type :class:`~prompt_toolkit.layout.UIControl` to use - :class:`~prompt_toolkit.validation.Validator`. - - Args: - text: Content to be validated. - cursor_position: Fake cursor position. - """ - - text: str - cursor_position: int = 0 - - -class BaseComplexPrompt(BaseSimplePrompt): - """A base class to create a more complex prompt that will involve :class:`~prompt_toolkit.application.Application`. - - Note: - This class does not create :class:`~prompt_toolkit.layout.Layout` nor :class:`~prompt_toolkit.application.Application`, - it only contains the necessary attributes and helper functions to be consumed. - - Note: - Use :class:`~InquirerPy.base.BaseListPrompt` to create a complex list prompt which involves multiple choices. It has - more methods and helper function implemented. - - See Also: - :class:`~InquirerPy.base.BaseListPrompt` - :class:`~InquirerPy.prompts.fuzzy.FuzzyPrompt` - """ - - def __init__( - self, - message: Union[str, Callable[[InquirerPySessionResult], str]], - style: Optional[InquirerPyStyle] = None, - border: bool = False, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - instruction: str = "", - long_instruction: str = "", - transformer: Optional[Callable[[Any], Any]] = None, - filter: Optional[Callable[[Any], Any]] = None, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - super().__init__( - message=message, - style=style, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - instruction=instruction, - transformer=transformer, - filter=filter, - invalid_message=invalid_message, - validate=validate, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - self._invalid_message = invalid_message - self._rendered = False - self._invalid = False - self._loading = False - self._application: Application - self._long_instruction = long_instruction - self._border = border - self._height_offset = 2 # prev prompt result + current prompt question - if self._border: - self._height_offset += 2 - if self._long_instruction: - self._height_offset += 1 - self._validation_window_bottom_offset = 0 if not self._long_instruction else 1 - if self._wrap_lines: - self._validation_window_bottom_offset += ( - self.extra_long_instruction_line_count - ) - - self._is_vim_edit = Condition(lambda: self._editing_mode == EditingMode.VI) - self._is_invalid = Condition(lambda: self._invalid) - self._is_displaying_long_instruction = Condition( - lambda: self._long_instruction != "" - ) - - def _redraw(self) -> None: - """Redraw the application UI.""" - self._application.invalidate() - - def register_kb( - self, *keys: Union[Keys, str], filter: FilterOrBool = True - ) -> Callable[[KeyHandlerCallable], KeyHandlerCallable]: - """Decorate keybinding registration function. - - Ensure that the `invalid` state is cleared on next keybinding entered. - """ - kb_dec = super().register_kb(*keys, filter=filter) - - def decorator(func: KeyHandlerCallable) -> KeyHandlerCallable: - @kb_dec - def executable(event): - if self._invalid: - self._invalid = False - func(event) - - return executable - - return decorator - - def _exception_handler(self, _, context) -> None: - """Set exception handler for the event loop. - - Skip the question and raise exception. - - Args: - loop: Current event loop. - context: Exception context. - """ - self._status["answered"] = True - self._status["result"] = INQUIRERPY_KEYBOARD_INTERRUPT - self._status["skipped"] = True - self._application.exit(exception=context["exception"]) - - def _after_render(self, app: Optional[Application]) -> None: - """Run after the :class:`~prompt_toolkit.application.Application` is rendered/updated. - - Since this function is fired up on each render, adding a check on `self._rendered` to - process logics that should only run once. - - Set event loop exception handler here, since its guaranteed that the event loop is running - in `_after_render`. - """ - if not self._rendered: - self._rendered = True - - self._keybinding_factory() - self._on_rendered(app) - - def _set_error(self, message: str) -> None: - """Set error message and set invalid state. - - Args: - message: Error message to display. - """ - self._invalid_message = message - self._invalid = True - - def _get_error_message(self) -> List[Tuple[str, str]]: - """Obtain the error message dynamically. - - Returns: - FormattedText in list of tuple format. - """ - return [ - ( - "class:validation-toolbar", - self._invalid_message, - ) - ] - - def _on_rendered(self, _: Optional[Application]) -> None: - """Run once after the UI is rendered. Acts like `ComponentDidMount`.""" - pass - - def _get_prompt_message(self) -> List[Tuple[str, str]]: - """Get the prompt message to display. - - Returns: - Formatted text in list of tuple format. - """ - pre_answer = ( - "class:instruction", - " %s " % self.instruction if self.instruction else " ", - ) - post_answer = ("class:answer", " %s" % self.status["result"]) - return super()._get_prompt_message(pre_answer, post_answer) - - def _run(self) -> Any: - """Run the application.""" - return self.application.run() - - async def _run_async(self) -> None: - """Run the application asynchronously.""" - return await self.application.run_async() - - @property - def application(self) -> Application: - """Get the application. - - :class:`.BaseComplexPrompt` requires :attr:`.BaseComplexPrompt._application` to be defined since this class - doesn't implement :class:`~prompt_toolkit.layout.Layout` and :class:`~prompt_toolkit.application.Application`. - - Raises: - NotImplementedError: When `self._application` is not defined. - """ - if not self._application: - raise NotImplementedError - return self._application - - @application.setter - def application(self, value: Application) -> None: - self._application = value - - @property - def height_offset(self) -> int: - """int: Height offset to apply.""" - if not self._wrap_lines: - return self._height_offset - return self.extra_line_count + self._height_offset - - @property - def total_message_length(self) -> int: - """int: Total length of the message.""" - total_message_length = 0 - if self._qmark: - total_message_length += len(self._qmark) - total_message_length += 1 # Extra space if qmark is present - total_message_length += len(str(self._message)) - total_message_length += 1 # Extra space between message and instruction - total_message_length += len(str(self._instruction)) - if self._instruction: - total_message_length += 1 # Extra space behind the instruction - return total_message_length - - @property - def extra_message_line_count(self) -> int: - """int: Get the extra lines created caused by line wrapping. - - Minus 1 on the totoal message length as we only want the extra line. - 24 // 24 will equal to 1 however we only want the value to be 1 when we have 25 char - which will create an extra line. - """ - term_width, _ = shutil.get_terminal_size() - return (self.total_message_length - 1) // term_width - - @property - def extra_long_instruction_line_count(self) -> int: - """int: Get the extra lines created caused by line wrapping. - - See Also: - :attr:`.BaseComplexPrompt.extra_message_line_count` - """ - if self._long_instruction: - term_width, _ = shutil.get_terminal_size() - return (len(self._long_instruction) - 1) // term_width - else: - return 0 - - @property - def extra_line_count(self) -> int: - """Get the extra lines created caused by line wrapping. - - Used mainly to calculate how much additional offset should be applied when getting - the height. - - Returns: - Total extra lines created due to line wrapping. - """ - result = 0 - - # message wrap - result += self.extra_message_line_count - # long instruction wrap - result += self.extra_long_instruction_line_count - - return result diff --git a/voxvera/vendor/InquirerPy/base/control.py b/voxvera/vendor/InquirerPy/base/control.py deleted file mode 100644 index 69cdc38..0000000 --- a/voxvera/vendor/InquirerPy/base/control.py +++ /dev/null @@ -1,227 +0,0 @@ -"""Contains the content control class :class:`.InquirerPyUIListControl`.""" -from abc import abstractmethod -from dataclasses import asdict, dataclass -from typing import Any, Callable, Dict, List, Optional, Tuple, cast - -from prompt_toolkit.layout.controls import FormattedTextControl - -from InquirerPy.exceptions import InvalidArgument, RequiredKeyNotFound -from InquirerPy.separator import Separator -from InquirerPy.utils import InquirerPyListChoices, InquirerPySessionResult - -__all__ = ["Choice", "InquirerPyUIListControl"] - - -@dataclass -class Choice: - """Class to create choices for list type prompts. - - A simple dataclass that can be used as an alternate to using :class:`dict` - when working with choices. - - Args: - value: The value of the choice when user selects this choice. - name: The value that should be presented to the user prior/after selection of the choice. - This value is optional, if not provided, it will fallback to the string representation of `value`. - enabled: Indicates if the choice should be pre-selected. - This only has effects when the prompt has `multiselect` enabled. - """ - - value: Any - name: Optional[str] = None - enabled: bool = False - - def __post_init__(self): - """Assign strinify value to name if not present.""" - if self.name is None: - self.name = str(self.value) - - -class InquirerPyUIListControl(FormattedTextControl): - """A base class to create :class:`~prompt_toolkit.layout.UIControl` to display list type contents. - - Args: - choices(InquirerPyListChoices): List of choices to display as the content. - Can also be a callable or async callable that returns a list of choices. - default: Default value, this will affect the cursor position. - multiselect: Indicate if the current prompt has `multiselect` enabled. - session_result: Current session result. - """ - - def __init__( - self, - choices: InquirerPyListChoices, - default: Any = None, - multiselect: bool = False, - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - self._session_result = session_result or {} - self._selected_choice_index: int = 0 - self._choice_func = None - self._multiselect = multiselect - self._default = ( - default - if not isinstance(default, Callable) - else cast(Callable, default)(self._session_result) - ) - self._raw_choices = ( - choices - if not isinstance(choices, Callable) - else cast(Callable, choices)(self._session_result) - ) - self._choices = self._get_choices(self._raw_choices, self._default) - self._safety_check() - self._format_choices() - super().__init__(self._get_formatted_choices) - - def _get_choices(self, choices: List[Any], default: Any) -> List[Dict[str, Any]]: - """Process the raw user input choices and format it into dictionary. - - Args: - choices: List of chices to display. - default: Default value, this will affect the :attr:`.InquirerPyUIListControl.selected_choice_index` - - Returns: - List of choices. - - Raises: - RequiredKeyNotFound: When the provided choice is missing the `name` or `value` key. - """ - processed_choices: List[Dict[str, Any]] = [] - try: - for index, choice in enumerate(choices, start=0): - if isinstance(choice, dict): - if choice["value"] == default: - self.selected_choice_index = index - processed_choices.append( - { - "name": str(choice["name"]), - "value": choice["value"], - "enabled": choice.get("enabled", False) - if self._multiselect - else False, - } - ) - elif isinstance(choice, Separator): - if self.selected_choice_index == index: - self.selected_choice_index = ( - self.selected_choice_index + 1 - ) % len(choices) - processed_choices.append( - {"name": str(choice), "value": choice, "enabled": False} - ) - elif isinstance(choice, Choice): - dict_choice = asdict(choice) - if dict_choice["value"] == default: - self.selected_choice_index = index - if not self._multiselect: - dict_choice["enabled"] = False - processed_choices.append(dict_choice) - else: - if choice == default: - self.selected_choice_index = index - processed_choices.append( - {"name": str(choice), "value": choice, "enabled": False} - ) - except KeyError: - raise RequiredKeyNotFound( - "dictionary type of choice require a 'name' key and a 'value' key" - ) - return processed_choices - - @property - def selected_choice_index(self) -> int: - """int: Current highlighted index.""" - return self._selected_choice_index - - @selected_choice_index.setter - def selected_choice_index(self, value: int) -> None: - self._selected_choice_index = value - - @property - def choices(self) -> List[Dict[str, Any]]: - """List[Dict[str, Any]]: Get all processed choices.""" - return self._choices - - @choices.setter - def choices(self, value: List[Dict[str, Any]]) -> None: - self._choices = value - - def _safety_check(self) -> None: - """Validate processed choices. - - Check if the choices are empty or if it only contains :class:`~InquirerPy.separator.Separator`. - """ - if not self.choices: - raise InvalidArgument("argument choices cannot be empty") - should_proceed: bool = False - for choice in self.choices: - if not isinstance(choice["value"], Separator): - should_proceed = True - break - if not should_proceed: - raise InvalidArgument( - "argument choices should contain choices other than separator" - ) - - def _get_formatted_choices(self) -> List[Tuple[str, str]]: - """Get all choices in formatted text format. - - Returns: - List of choices in formatted text form. - """ - display_choices = [] - - for index, choice in enumerate(self.choices): - if index == self.selected_choice_index: - display_choices += self._get_hover_text(choice) - else: - display_choices += self._get_normal_text(choice) - display_choices.append(("", "\n")) - if display_choices: - display_choices.pop() - return display_choices - - def _format_choices(self) -> None: - """Perform post processing on the choices. - - Additional customisation to the choices after :meth:`.InquirerPyUIListControl._get_choices` call. - """ - pass - - @abstractmethod - def _get_hover_text(self, choice) -> List[Tuple[str, str]]: - """Generate the formatted text for hovered choice. - - Returns: - Formatted text in list of tuple format. - """ - pass - - @abstractmethod - def _get_normal_text(self, choice) -> List[Tuple[str, str]]: - """Generate the formatted text for non-hovered choices. - - Returns: - Formatted text in list of tuple format. - """ - pass - - @property - def choice_count(self) -> int: - """int: Total count of choices.""" - return len(self.choices) - - @property - def selection(self) -> Dict[str, Any]: - """Dict[str, Any]: Current selected choice.""" - return self.choices[self.selected_choice_index] - - @property - def loading(self) -> bool: - """bool: Indicate if the content control is loading.""" - return self._loading - - @loading.setter - def loading(self, value: bool) -> None: - self._loading = value diff --git a/voxvera/vendor/InquirerPy/base/list.py b/voxvera/vendor/InquirerPy/base/list.py deleted file mode 100644 index 77f06aa..0000000 --- a/voxvera/vendor/InquirerPy/base/list.py +++ /dev/null @@ -1,238 +0,0 @@ -"""Contains the base class :class:`.BaseListPrompt` which can be used to create a prompt involving choices.""" -from abc import abstractmethod -from typing import Any, Callable, List, Optional - -from prompt_toolkit.filters.base import Condition -from prompt_toolkit.keys import Keys - -from InquirerPy.base.complex import BaseComplexPrompt -from InquirerPy.base.control import InquirerPyUIListControl -from InquirerPy.separator import Separator -from InquirerPy.utils import ( - InquirerPyKeybindings, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - - -class BaseListPrompt(BaseComplexPrompt): - """A base class to create a complex prompt involving choice selections (i.e. list) using `prompt_toolkit` Application. - - Note: - This class does not create :class:`~prompt_toolkit.layout.Layout` nor :class:`~prompt_toolkit.application.Application`, - it only contains the necessary attributes and helper functions to be consumed. - - See Also: - :class:`~InquirerPy.prompts.list.ListPrompt` - :class:`~InquirerPy.prompts.fuzzy.FuzzyPrompt` - """ - - def __init__( - self, - message: InquirerPyMessage, - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - instruction: str = "", - long_instruction: str = "", - border: bool = False, - transformer: Optional[Callable[[Any], Any]] = None, - filter: Optional[Callable[[Any], Any]] = None, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - multiselect: bool = False, - keybindings: Optional[InquirerPyKeybindings] = None, - cycle: bool = True, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - super().__init__( - message=message, - style=style, - border=border, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - transformer=transformer, - filter=filter, - invalid_message=invalid_message, - validate=validate, - instruction=instruction, - long_instruction=long_instruction, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - - self._content_control: InquirerPyUIListControl - self._multiselect = multiselect - self._is_multiselect = Condition(lambda: self._multiselect) - self._cycle = cycle - - if not keybindings: - keybindings = {} - - self.kb_maps = { - "down": [ - {"key": "down"}, - {"key": "c-n", "filter": ~self._is_vim_edit}, - {"key": "j", "filter": self._is_vim_edit}, - ], - "up": [ - {"key": "up"}, - {"key": "c-p", "filter": ~self._is_vim_edit}, - {"key": "k", "filter": self._is_vim_edit}, - ], - "toggle": [ - {"key": "space"}, - ], - "toggle-down": [ - {"key": Keys.Tab}, - ], - "toggle-up": [ - {"key": Keys.BackTab}, - ], - "toggle-all": [ - {"key": "alt-r"}, - {"key": "c-r"}, - ], - "toggle-all-true": [ - {"key": "alt-a"}, - {"key": "c-a"}, - ], - "toggle-all-false": [], - **keybindings, - } - - self.kb_func_lookup = { - "down": [{"func": self._handle_down}], - "up": [{"func": self._handle_up}], - "toggle": [{"func": self._handle_toggle_choice}], - "toggle-down": [ - {"func": self._handle_toggle_choice}, - {"func": self._handle_down}, - ], - "toggle-up": [ - {"func": self._handle_toggle_choice}, - {"func": self._handle_up}, - ], - "toggle-all": [{"func": self._handle_toggle_all}], - "toggle-all-true": [{"func": self._handle_toggle_all, "args": [True]}], - "toggle-all-false": [{"func": self._handle_toggle_all, "args": [False]}], - } - - @property - def content_control(self) -> InquirerPyUIListControl: - """Get the content controller object. - - Needs to be an instance of :class:`~InquirerPy.base.control.InquirerPyUIListControl`. - - Each :class:`.BaseComplexPrompt` requires a `content_control` to display custom - contents for the prompt. - - Raises: - NotImplementedError: When `self._content_control` is not found. - """ - if not self._content_control: - raise NotImplementedError - return self._content_control - - @content_control.setter - def content_control(self, value: InquirerPyUIListControl) -> None: - self._content_control = value - - @property - def result_name(self) -> Any: - """Get the result value that should be printed to the terminal. - - In multiselect scenario, return result as a list. - """ - if self._multiselect: - return [choice["name"] for choice in self.selected_choices] - else: - try: - return self.content_control.selection["name"] - except IndexError: - return "" - - @property - def result_value(self) -> Any: - """Get the result value that should return to the user. - - In multiselect scenario, return result as a list. - """ - if self._multiselect: - return [choice["value"] for choice in self.selected_choices] - else: - try: - return self.content_control.selection["value"] - except IndexError: - return "" - - @property - def selected_choices(self) -> List[Any]: - """List[Any]: Get all user selected choices.""" - - def filter_choice(choice): - return not isinstance(choice, Separator) and choice["enabled"] - - return list(filter(filter_choice, self.content_control.choices)) - - def _handle_down(self, _) -> bool: - """Handle event when user attempts to move down. - - Returns: - Boolean indicating if the action hits the cap. - """ - if self._cycle: - self.content_control.selected_choice_index = ( - self.content_control.selected_choice_index + 1 - ) % self.content_control.choice_count - return False - else: - self.content_control.selected_choice_index += 1 - if ( - self.content_control.selected_choice_index - >= self.content_control.choice_count - ): - self.content_control.selected_choice_index = ( - self.content_control.choice_count - 1 - ) - return True - return False - - def _handle_up(self, _) -> bool: - """Handle event when user attempts to move up. - - Returns: - Boolean indicating if the action hits the cap. - """ - if self._cycle: - self.content_control.selected_choice_index = ( - self.content_control.selected_choice_index - 1 - ) % self.content_control.choice_count - return False - else: - self.content_control.selected_choice_index -= 1 - if self.content_control.selected_choice_index < 0: - self.content_control.selected_choice_index = 0 - return True - return False - - @abstractmethod - def _handle_toggle_choice(self, event) -> None: - """Handle event when user attempting to toggle the state of the chocie.""" - pass - - @abstractmethod - def _handle_toggle_all(self, event, value: bool) -> None: - """Handle event when user attempting to alter the state of all choices.""" - pass diff --git a/voxvera/vendor/InquirerPy/base/simple.py b/voxvera/vendor/InquirerPy/base/simple.py deleted file mode 100644 index de695bf..0000000 --- a/voxvera/vendor/InquirerPy/base/simple.py +++ /dev/null @@ -1,378 +0,0 @@ -"""Contains the base class :class:`.BaseSimplePrompt`.""" -import os -import re -from abc import ABC, abstractmethod -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Dict, - List, - Optional, - Tuple, - Union, - cast, -) - -from prompt_toolkit.enums import EditingMode -from prompt_toolkit.filters.base import Condition, FilterOrBool -from prompt_toolkit.key_binding.key_bindings import KeyBindings, KeyHandlerCallable -from prompt_toolkit.keys import Keys -from prompt_toolkit.styles.style import Style -from prompt_toolkit.validation import Validator - -from InquirerPy.enum import INQUIRERPY_KEYBOARD_INTERRUPT -from InquirerPy.exceptions import RequiredKeyNotFound -from InquirerPy.utils import ( - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, - get_style, -) - -if TYPE_CHECKING: - from prompt_toolkit.key_binding.key_processor import KeyPressEvent - - -class BaseSimplePrompt(ABC): - """The base class to create a simple terminal input prompt. - - Note: - No actual :class:`~prompt_toolkit.application.Application` is created by this class. - This class only creates some common interface and attributes that can be easily used - by `prompt_toolkit`. - - To have a functional prompt, you'll at least have to implement the :meth:`.BaseSimplePrompt._run` - and :meth:`.BaseSimplePrompt._get_prompt_message`. - - See Also: - :class:`~InquirerPy.prompts.input.InputPrompt` - """ - - def __init__( - self, - message: InquirerPyMessage, - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - instruction: str = "", - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - transformer: Optional[Callable[[Any], Any]] = None, - filter: Optional[Callable[[Any], Any]] = None, - default: Any = "", - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - self._mandatory = mandatory - self._mandatory_message = mandatory_message - self._result = session_result or {} - self._message = ( - message - if not isinstance(message, Callable) - else cast(Callable, message)(self._result) - ) - self._instruction = instruction - self._default = ( - default if not isinstance(default, Callable) else default(self._result) - ) - self._style = Style.from_dict(style.dict if style else get_style().dict) - self._qmark = qmark - self._amark = amark - self._status = {"answered": False, "result": None, "skipped": False} - self._kb = KeyBindings() - self._lexer = "class:input" - self._transformer = transformer - self._filter = filter - self._wrap_lines = wrap_lines - self._editing_mode = ( - EditingMode.VI - if vi_mode or bool(os.getenv("INQUIRERPY_VI_MODE", False)) - else EditingMode.EMACS - ) - if isinstance(validate, Validator): - self._validator = validate - else: - self._validator = Validator.from_callable( - validate if validate else lambda _: True, - invalid_message, - move_cursor_to_end=True, - ) - self._raise_kbi = not os.getenv( - "INQUIRERPY_NO_RAISE_KBI", not raise_keyboard_interrupt - ) - self._is_rasing_kbi = Condition(lambda: self._raise_kbi) - - self._kb_maps = { - "answer": [{"key": Keys.Enter}], - "interrupt": [ - {"key": "c-c", "filter": self._is_rasing_kbi}, - {"key": "c-d", "filter": ~self._is_rasing_kbi}, - ], - "skip": [{"key": "c-z"}, {"key": "c-c", "filter": ~self._is_rasing_kbi}], - } - self._kb_func_lookup = { - "answer": [{"func": self._handle_enter}], - "interrupt": [{"func": self._handle_interrupt}], - "skip": [{"func": self._handle_skip}], - } - - def _keybinding_factory(self): - """Register all keybindings in `self._kb_maps`. - - It's required to call this function at the end of prompt constructor if - it inherits from :class:`~InquirerPy.base.simple.BaseSimplePrompt` or - :class:`~InquirerPy.base.complex.BaseComplexPrompt`. - """ - - def _factory(keys, filter, action): - if action not in self.kb_func_lookup: - raise RequiredKeyNotFound(f"keybinding action {action} not found") - if not isinstance(keys, list): - keys = [keys] - - @self.register_kb(*keys, filter=filter) - def _(event): - for method in self.kb_func_lookup[action]: - method["func"](event, *method.get("args", [])) - - for key, item in self.kb_maps.items(): - if not isinstance(item, list): - item = [item] - for kb in item: - _factory(kb["key"], kb.get("filter", Condition(lambda: True)), key) - - @abstractmethod - def _set_error(self, message: str) -> None: - """Set the error message for the prompt. - - Args: - message: Error message to set. - """ - pass - - def _handle_skip(self, event: Optional["KeyPressEvent"]) -> None: - """Handle the event when attempting to skip a prompt. - - Skip the prompt if the `_mandatory` field is False, otherwise - show an error message that the prompt cannot be skipped. - """ - if not self._mandatory: - self.status["answered"] = True - self.status["skipped"] = True - self.status["result"] = None - if event: - event.app.exit(result=None) - else: - self._set_error(message=self._mandatory_message) - - def _handle_interrupt(self, event: Optional["KeyPressEvent"]) -> None: - """Handle the event when a KeyboardInterrupt signal is sent.""" - self.status["answered"] = True - self.status["result"] = INQUIRERPY_KEYBOARD_INTERRUPT - self.status["skipped"] = True - if event: - event.app.exit(result=INQUIRERPY_KEYBOARD_INTERRUPT) - - @abstractmethod - def _handle_enter(self, event: Optional["KeyPressEvent"]) -> None: - """Handle the event when user attempt to answer the question.""" - pass - - @property - def status(self) -> Dict[str, Any]: - """Dict[str, Any]: Get current prompt status. - - The status contains 3 keys: "answered" and "result". - answered: If the current prompt is answered. - result: The result of the user answer. - skipped: If the prompt is skipped. - """ - return self._status - - @status.setter - def status(self, value) -> None: - self._status = value - - def register_kb( - self, *keys: Union[Keys, str], filter: FilterOrBool = True, **kwargs - ) -> Callable[[KeyHandlerCallable], KeyHandlerCallable]: - """Keybinding registration decorator. - - This decorator wraps around the :meth:`prompt_toolkit.key_binding.KeyBindings.add` with - added feature to process `alt` realted keybindings. - - By default, `prompt_toolkit` doesn't process `alt` related keybindings, - it requires `alt-ANY` to `escape` + `ANY`. - - Args: - keys: The keys to bind that can trigger the function. - filter: :class:`~prompt_toolkit.filter.Condition` to indicate if this keybinding should be active. - - Returns: - A decorator that should be applied to the function thats intended to be active when the keys - are pressed. - - Examples: - >>> @self.register_kb("alt-j") - ... def test(event): - ... pass - """ - alt_pattern = re.compile(r"^alt-(.*)") - - def decorator(func: KeyHandlerCallable) -> KeyHandlerCallable: - formatted_keys = [] - for key in keys: - match = alt_pattern.match(key) - if match: - formatted_keys.append("escape") - formatted_keys.append(match.group(1)) - else: - formatted_keys.append(key) - - @self._kb.add(*formatted_keys, filter=filter, **kwargs) - def executable(event) -> None: - func(event) - - return executable - - return decorator - - @abstractmethod - def _get_prompt_message( - self, pre_answer: Tuple[str, str], post_answer: Tuple[str, str] - ) -> List[Tuple[str, str]]: - """Get the question message in formatted text form to display in the prompt. - - This function is mainly used to render the question message dynamically based - on the current status (answered or not answered) of the prompt. - - Note: - The function requires implementation when inheriting :class:`.BaseSimplePrompt`. - You should call `super()._get_prompt_message(pre_answer, post_answer)` in - the implemented `_get_prompt_message`. - - Args: - pre_answer: The message to display before the question is answered. - post_answer: The information to display after the question is answered. - - Returns: - Formatted text in list of tuple format. - """ - display_message = [] - if self.status["skipped"]: - display_message.append(("class:skipped", self._qmark)) - display_message.append( - ("class:skipped", "%s%s " % (" " if self._qmark else "", self._message)) - ) - elif self.status["answered"]: - display_message.append(("class:answermark", self._amark)) - display_message.append( - ( - "class:answered_question", - "%s%s" % (" " if self._amark else "", self._message), - ) - ) - display_message.append( - post_answer - if not self._transformer - else ( - "class:answer", - " %s" % self._transformer(self.status["result"]), - ) - ) - else: - display_message.append(("class:questionmark", self._qmark)) - display_message.append( - ( - "class:question", - "%s%s" % (" " if self._qmark else "", self._message), - ) - ) - display_message.append(pre_answer) - return display_message - - @abstractmethod - def _run(self) -> Any: - """Abstractmethod to enforce a run function is implemented. - - All prompt instance requires a `_run` call to initialise and run an instance of - `PromptSession` or `Application`. - """ - pass - - @abstractmethod - async def _run_async(self) -> Any: - """Abstractmethod to enforce a run function is implemented. - - All prompt instance requires a `_run_async` call to initialise and run an instance of - `PromptSession` or `Application`. - """ - pass - - def execute(self, raise_keyboard_interrupt: Optional[bool] = None) -> Any: - """Run the prompt and get the result. - - Args: - raise_keyboard_interrupt: **Deprecated**. Set this parameter on the prompt initialisation instead. - - Returns: - Value of the user answer. Types varies depending on the prompt. - - Raises: - KeyboardInterrupt: When `ctrl-c` is pressed and `raise_keyboard_interrupt` is True. - """ - result = self._run() - if raise_keyboard_interrupt is not None: - self._raise_kbi = not os.getenv( - "INQUIRERPY_NO_RAISE_KBI", not raise_keyboard_interrupt - ) - if result == INQUIRERPY_KEYBOARD_INTERRUPT: - raise KeyboardInterrupt - if not self._filter: - return result - return self._filter(result) - - async def execute_async(self) -> None: - """Run the prompt asynchronously and get the result. - - Returns: - Value of the user answer. Types varies depending on the prompt. - - Raises: - KeyboardInterrupt: When `ctrl-c` is pressed and `raise_keyboard_interrupt` is True. - """ - result = await self._run_async() - if result == INQUIRERPY_KEYBOARD_INTERRUPT: - raise KeyboardInterrupt - if not self._filter: - return result - return self._filter(result) - - @property - def instruction(self) -> str: - """str: Instruction to display next to question.""" - return self._instruction - - @property - def kb_maps(self) -> Dict[str, Any]: - """Dict[str, Any]: Keybinding mappings.""" - return self._kb_maps - - @kb_maps.setter - def kb_maps(self, value: Dict[str, Any]) -> None: - self._kb_maps = {**self._kb_maps, **value} - - @property - def kb_func_lookup(self) -> Dict[str, Any]: - """Dict[str, Any]: Keybinding function lookup mappings..""" - return self._kb_func_lookup - - @kb_func_lookup.setter - def kb_func_lookup(self, value: Dict[str, Any]) -> None: - self._kb_func_lookup = {**self._kb_func_lookup, **value} diff --git a/voxvera/vendor/InquirerPy/containers/__init__.py b/voxvera/vendor/InquirerPy/containers/__init__.py deleted file mode 100644 index 4877158..0000000 --- a/voxvera/vendor/InquirerPy/containers/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .spinner import SpinnerWindow diff --git a/voxvera/vendor/InquirerPy/containers/instruction.py b/voxvera/vendor/InquirerPy/containers/instruction.py deleted file mode 100644 index 9ce0c5f..0000000 --- a/voxvera/vendor/InquirerPy/containers/instruction.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Module contains :class:`.InstructionWindow` which can be used to display long instructions.""" - -from typing import TYPE_CHECKING - -from prompt_toolkit.layout.containers import ConditionalContainer, Window -from prompt_toolkit.layout.controls import FormattedTextControl - -if TYPE_CHECKING: - from prompt_toolkit.filters.base import FilterOrBool - from prompt_toolkit.formatted_text.base import AnyFormattedText - - -class InstructionWindow(ConditionalContainer): - """Conditional `prompt_toolkit` :class:`~prompt_toolkit.layout.Window` that displays long instructions. - - Args: - message: Long instructions to display. - filter: Condition to display the instruction window. - """ - - def __init__(self, message: str, filter: "FilterOrBool", **kwargs) -> None: - self._message = message - super().__init__( - Window( - FormattedTextControl(text=self._get_message), - dont_extend_height=True, - **kwargs - ), - filter=filter, - ) - - def _get_message(self) -> "AnyFormattedText": - """Get long instruction to display. - - Returns: - FormattedText in list of tuple format. - """ - return [("class:long_instruction", self._message)] diff --git a/voxvera/vendor/InquirerPy/containers/message.py b/voxvera/vendor/InquirerPy/containers/message.py deleted file mode 100644 index 04b50c9..0000000 --- a/voxvera/vendor/InquirerPy/containers/message.py +++ /dev/null @@ -1,42 +0,0 @@ -"""Module contains the main message window :class:`~prompt_toolkit.container.Container`.""" - -from typing import TYPE_CHECKING - -from prompt_toolkit.layout.containers import ConditionalContainer, Window -from prompt_toolkit.layout.controls import FormattedTextControl -from prompt_toolkit.layout.dimension import LayoutDimension - -if TYPE_CHECKING: - from prompt_toolkit.filters.base import FilterOrBool - from prompt_toolkit.formatted_text.base import AnyFormattedText - - -class MessageWindow(ConditionalContainer): - """Main window to display question to the user. - - Args: - message: The message to display in the terminal. - filter: Condition that this message window should be displayed. - Use a loading condition to only display this window while its not loading. - wrap_lines: Enable line wrapping if the message is too long. - show_cursor: Display cursor. - """ - - def __init__( - self, - message: "AnyFormattedText", - filter: "FilterOrBool", - wrap_lines: bool = True, - show_cursor: bool = True, - **kwargs - ) -> None: - super().__init__( - content=Window( - height=LayoutDimension.exact(1) if not wrap_lines else None, - content=FormattedTextControl(message, show_cursor=show_cursor), - wrap_lines=wrap_lines, - dont_extend_height=True, - **kwargs - ), - filter=filter, - ) diff --git a/voxvera/vendor/InquirerPy/containers/spinner.py b/voxvera/vendor/InquirerPy/containers/spinner.py deleted file mode 100644 index 47be0a0..0000000 --- a/voxvera/vendor/InquirerPy/containers/spinner.py +++ /dev/null @@ -1,108 +0,0 @@ -"""Module contains spinner related resources. - -Note: - The spinner is not a standalone spinner to run in the terminal - but rather a `prompt_toolkit` :class:`~prompt_toolkit.layout.Window` that displays a spinner. - - Use library such as `yaspin `_ if you need a plain spinner. -""" -import asyncio -from typing import TYPE_CHECKING, Callable, List, NamedTuple, Optional, Tuple, Union - -from prompt_toolkit.filters.utils import to_filter -from prompt_toolkit.layout.containers import ConditionalContainer, Window -from prompt_toolkit.layout.controls import FormattedTextControl - -if TYPE_CHECKING: - from prompt_toolkit.filters.base import Filter - -__all__ = ["SPINNERS", "SpinnerWindow"] - - -class SPINNERS(NamedTuple): - """Presets of spinner patterns. - - See Also: - https://github.com/pavdmyt/yaspin/blob/master/yaspin/data/spinners.json - - This only contains some basic ones thats ready to use. For more patterns, checkout the - URL above. - - Examples: - >>> from InquirerPy import inquirer - >>> from InquirerPy.spinner import SPINNERS - >>> inquirer.select(message="", choices=lambda _: [1, 2, 3], spinner_pattern=SPINNERS.dots) - """ - - dots = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"] - dots2 = ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"] - line = ["-", "\\", "|", "/"] - line2 = ["⠂", "-", "–", "—", "–", "-"] - pipe = ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"] - star = ["✶", "✸", "✹", "✺", "✹", "✷"] - star2 = ["+", "x", "*"] - flip = ["_", "_", "_", "-", "`", "`", "'", "´", "-", "_", "_", "_"] - hamburger = ["☱", "☲", "☴"] - grow_vertical = ["▁", "▃", "▄", "▅", "▆", "▇", "▆", "▅", "▄", "▃"] - grow_horizontal = ["▏", "▎", "▍", "▌", "▋", "▊", "▉", "▊", "▋", "▌", "▍", "▎"] - box_bounce = ["▖", "▘", "▝", "▗"] - triangle = ["◢", "◣", "◤", "◥"] - arc = ["◜", "◠", "◝", "◞", "◡", "◟"] - circle = ["◡", "⊙", "◠"] - - -class SpinnerWindow(ConditionalContainer): - """Conditional `prompt_toolkit` :class:`~prompt_toolkit.layout.Window` that displays a spinner. - - Args: - loading: A :class:`~prompt_toolkit.filters.Condition` to indicate if the spinner should be visible. - redraw: A redraw function (i.e. :meth:`~prompt_toolkit.application.Application.invalidate`) to refresh the UI. - pattern: List of pattern to display as the spinner. - delay: Spinner refresh frequency. - text: Loading text to display. - """ - - def __init__( - self, - loading: "Filter", - redraw: Callable[[], None], - pattern: Optional[Union[List[str], SPINNERS]] = None, - delay: float = 0.1, - text: str = "", - ) -> None: - self._loading = to_filter(loading) - self._spinning = False - self._redraw = redraw - self._pattern = pattern or SPINNERS.line - self._char = self._pattern[0] - self._delay = delay - self._text = text or "Loading ..." - - super().__init__( - content=Window(content=FormattedTextControl(text=self._get_text)), - filter=self._loading, - ) - - def _get_text(self) -> List[Tuple[str, str]]: - """Dynamically get the text for the :class:`~prompt_toolkit.layout.Window`. - - Returns: - Formatted text. - """ - return [ - ("class:spinner_pattern", self._char), - ("", " "), - ("class:spinner_text", self._text), - ] - - async def start(self) -> None: - """Start the spinner.""" - if self._spinning: - return - self._spinning = True - while self._loading(): - for char in self._pattern: - await asyncio.sleep(self._delay) - self._char = char - self._redraw() - self._spinning = False diff --git a/voxvera/vendor/InquirerPy/containers/validation.py b/voxvera/vendor/InquirerPy/containers/validation.py deleted file mode 100644 index 32dca31..0000000 --- a/voxvera/vendor/InquirerPy/containers/validation.py +++ /dev/null @@ -1,60 +0,0 @@ -"""Module contains :class:`.ValidationWindow` which can be used to display error.""" - -from typing import Optional - -from prompt_toolkit.filters.base import FilterOrBool -from prompt_toolkit.formatted_text.base import AnyFormattedText -from prompt_toolkit.layout.containers import ConditionalContainer, Float, Window -from prompt_toolkit.layout.controls import FormattedTextControl - - -class ValidationWindow(ConditionalContainer): - """Conditional `prompt_toolkit` :class:`~prompt_toolkit.layout.Window` that displays error. - - Args: - invalid_message: Error message to display when error occured. - filter: Condition to display the error window. - """ - - def __init__( - self, invalid_message: AnyFormattedText, filter: FilterOrBool, **kwargs - ) -> None: - super().__init__( - Window( - FormattedTextControl(invalid_message), dont_extend_height=True, **kwargs - ), - filter=filter, - ) - - -class ValidationFloat(Float): - """:class:`~prompt_toolkit.layout.Float` wrapper around :class:`.ValidationWindow`. - - Args: - invalid_message: Error message to display when error occured. - filter: Condition to display the error window. - left: Distance to left. - right: Distance to right. - bottom: Distance to bottom. - top: Distance to top. - """ - - def __init__( - self, - invalid_message: AnyFormattedText, - filter: FilterOrBool, - left: Optional[int] = None, - right: Optional[int] = None, - bottom: Optional[int] = None, - top: Optional[int] = None, - **kwargs - ) -> None: - super().__init__( - content=ValidationWindow( - invalid_message=invalid_message, filter=filter, **kwargs - ), - left=left, - right=right, - bottom=bottom, - top=top, - ) diff --git a/voxvera/vendor/InquirerPy/enum.py b/voxvera/vendor/InquirerPy/enum.py deleted file mode 100644 index 71d46bf..0000000 --- a/voxvera/vendor/InquirerPy/enum.py +++ /dev/null @@ -1,7 +0,0 @@ -"""Module contains common constants.""" -INQUIRERPY_KEYBOARD_INTERRUPT: str = "INQUIRERPY_KEYBOARD_INTERRUPT" - -INQUIRERPY_POINTER_SEQUENCE: str = "\u276f" -INQUIRERPY_FILL_CIRCLE_SEQUENCE: str = "\u25c9" -INQUIRERPY_EMPTY_CIRCLE_SEQUENCE: str = "\u25cb" -INQUIRERPY_QMARK_SEQUENCE: str = "\u003f" diff --git a/voxvera/vendor/InquirerPy/exceptions.py b/voxvera/vendor/InquirerPy/exceptions.py deleted file mode 100644 index 6048192..0000000 --- a/voxvera/vendor/InquirerPy/exceptions.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Module contains exceptions that will be raised by `InquirerPy`.""" - - -class InvalidArgument(Exception): - """Provided argument is invalid. - - Args: - message: Exception message. - """ - - def __init__(self, message: str = "invalid argument"): - self._message = message - super().__init__(self._message) - - -class RequiredKeyNotFound(Exception): - """Missing required keys in dictionary. - - Args: - message: Exception message. - """ - - def __init__(self, message="required key not found"): - self.message = message - super().__init__(self.message) diff --git a/voxvera/vendor/InquirerPy/inquirer.py b/voxvera/vendor/InquirerPy/inquirer.py deleted file mode 100644 index 3553a3f..0000000 --- a/voxvera/vendor/InquirerPy/inquirer.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Servers as another entry point for `InquirerPy`. - -See Also: - :ref:`index:Alternate Syntax`. - -`inquirer` directly interact with individual prompt classes. It’s more flexible, easier to customise and also provides IDE type hintings/completions. -""" -from InquirerPy.prompts import CheckboxPrompt as checkbox -from InquirerPy.prompts import ConfirmPrompt as confirm -from InquirerPy.prompts import ExpandPrompt as expand -from InquirerPy.prompts import FilePathPrompt as filepath -from InquirerPy.prompts import FuzzyPrompt as fuzzy -from InquirerPy.prompts import InputPrompt as text -from InquirerPy.prompts import ListPrompt as select -from InquirerPy.prompts import NumberPrompt as number -from InquirerPy.prompts import RawlistPrompt as rawlist -from InquirerPy.prompts import SecretPrompt as secret diff --git a/voxvera/vendor/InquirerPy/prompts/__init__.py b/voxvera/vendor/InquirerPy/prompts/__init__.py deleted file mode 100644 index a04cf64..0000000 --- a/voxvera/vendor/InquirerPy/prompts/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -"""Module contains import of all prompts classes.""" -from InquirerPy.prompts.checkbox import CheckboxPrompt -from InquirerPy.prompts.confirm import ConfirmPrompt -from InquirerPy.prompts.expand import ExpandPrompt -from InquirerPy.prompts.filepath import FilePathPrompt -from InquirerPy.prompts.fuzzy import FuzzyPrompt -from InquirerPy.prompts.input import InputPrompt -from InquirerPy.prompts.list import ListPrompt -from InquirerPy.prompts.number import NumberPrompt -from InquirerPy.prompts.rawlist import RawlistPrompt -from InquirerPy.prompts.secret import SecretPrompt diff --git a/voxvera/vendor/InquirerPy/prompts/checkbox.py b/voxvera/vendor/InquirerPy/prompts/checkbox.py deleted file mode 100644 index 60f3bde..0000000 --- a/voxvera/vendor/InquirerPy/prompts/checkbox.py +++ /dev/null @@ -1,244 +0,0 @@ -"""Module contains the class to create a checkbox prompt.""" -from typing import Any, Callable, List, Optional, Tuple, Union - -from prompt_toolkit.validation import ValidationError - -from InquirerPy.base import FakeDocument, InquirerPyUIListControl -from InquirerPy.enum import ( - INQUIRERPY_EMPTY_CIRCLE_SEQUENCE, - INQUIRERPY_FILL_CIRCLE_SEQUENCE, - INQUIRERPY_POINTER_SEQUENCE, -) -from InquirerPy.prompts.list import ListPrompt -from InquirerPy.separator import Separator -from InquirerPy.utils import ( - InquirerPyKeybindings, - InquirerPyListChoices, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - -__all__ = ["CheckboxPrompt"] - - -class InquirerPyCheckboxControl(InquirerPyUIListControl): - """An :class:`~prompt_toolkit.layout.UIControl` class that displays a list of choices. - - Reference the parameter definition in :class:`.CheckboxPrompt`. - """ - - def __init__( - self, - choices: InquirerPyListChoices, - default: Any, - pointer: str, - enabled_symbol: str, - disabled_symbol: str, - session_result: Optional[InquirerPySessionResult], - ) -> None: - """Initialise required attributes and call base class.""" - self._pointer = pointer - self._enabled_symbol = enabled_symbol - self._disabled_symbol = disabled_symbol - super().__init__( - choices=choices, - default=default, - session_result=session_result, - multiselect=True, - ) - - def _format_choices(self) -> None: - pass - - def _get_hover_text(self, choice) -> List[Tuple[str, str]]: - display_choices = [] - display_choices.append(("class:pointer", self._pointer)) - if self._pointer: - display_choices.append(("", " ")) - if not isinstance(choice["value"], Separator): - display_choices.append( - ( - "class:checkbox", - self._enabled_symbol - if choice["enabled"] - else self._disabled_symbol, - ) - ) - if self._enabled_symbol and self._disabled_symbol: - display_choices.append(("", " ")) - display_choices.append(("[SetCursorPosition]", "")) - display_choices.append(("class:pointer", choice["name"])) - return display_choices - - def _get_normal_text(self, choice) -> List[Tuple[str, str]]: - display_choices = [] - display_choices.append(("", len(self._pointer) * " ")) - if self._pointer: - display_choices.append(("", " ")) - if not isinstance(choice["value"], Separator): - display_choices.append( - ( - "class:checkbox", - self._enabled_symbol - if choice["enabled"] - else self._disabled_symbol, - ) - ) - if self._enabled_symbol and self._disabled_symbol: - display_choices.append(("", " ")) - display_choices.append(("", choice["name"])) - else: - display_choices.append(("class:separator", choice["name"])) - return display_choices - - -class CheckboxPrompt(ListPrompt): - """Create a prompt which displays a list of checkboxes to toggle. - - A wrapper class around :class:`~prompt_toolkit.application.Application`. - - User can toggle on/off on each checkbox. - - Works very similar to :class:`~InquirerPy.prompts.list.ListPrompt` with `multiselect` enabled, - the main difference is visual/UI and also when not toggling anything, the result will be empty. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - choices: List of choices to display and select. - Refer to :ref:`pages/dynamic:choices` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default value of the prompt. - This will be used to determine which choice is highlighted (current selection), - The default value should be the value of one of the choices. - Refer to :ref:`pages/dynamic:default` documentation for more details. - separator: Separator symbol. Custom symbol that will be used as a separator between the choice index number and the choices. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - pointer: Pointer symbol. Customer symbol that will be used to indicate the current choice selection. - enabled_symbol: Checkbox ticked symbol. Custom symbol which indicate the checkbox is ticked. - disabled_symbol: Checkbox not ticked symbol. Custom symbol which indicate the checkbox is not ticked. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - validate: Add validation to user input. - The main use case for this prompt would be when `multiselect` is True, you can enforce a min/max selection. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - height: Preferred height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - max_height: Max height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - border: Create border around the choice window. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - show_cursor: Display cursor at the end of the prompt. - Set to False to hide the cursor. - cycle: Return to top item if hit bottom during navigation or vice versa. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.checkbox(message="Select:", choices=[1, 2, 3]).execute() - >>> print(result) - [1] - """ - - def __init__( - self, - message: InquirerPyMessage, - choices: InquirerPyListChoices, - default: Any = None, - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - pointer: str = INQUIRERPY_POINTER_SEQUENCE, - enabled_symbol: str = INQUIRERPY_FILL_CIRCLE_SEQUENCE, - disabled_symbol: str = INQUIRERPY_EMPTY_CIRCLE_SEQUENCE, - border: bool = False, - instruction: str = "", - long_instruction: str = "", - transformer: Optional[Callable[[Any], Any]] = None, - filter: Optional[Callable[[Any], Any]] = None, - height: Optional[Union[int, str]] = None, - max_height: Optional[Union[int, str]] = None, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - keybindings: Optional[InquirerPyKeybindings] = None, - show_cursor: bool = True, - cycle: bool = True, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - self.content_control = InquirerPyCheckboxControl( - choices=choices, - default=default, - pointer=pointer, - enabled_symbol=enabled_symbol, - disabled_symbol=disabled_symbol, - session_result=session_result, - ) - super().__init__( - message=message, - choices=choices, - style=style, - border=border, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - instruction=instruction, - long_instruction=long_instruction, - transformer=transformer, - filter=filter, - height=height, - max_height=max_height, - validate=validate, - invalid_message=invalid_message, - multiselect=True, - keybindings=keybindings, - show_cursor=show_cursor, - cycle=cycle, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - - def _handle_enter(self, event) -> None: - """Override this method to force empty array result. - - When user does not select anything, exit with empty list. - - Args: - event: Keypress event. - """ - try: - fake_document = FakeDocument(self.result_value) - self._validator.validate(fake_document) # type: ignore - except ValidationError: - self._invalid = True - else: - self.status["answered"] = True - self.status["result"] = self.result_name - event.app.exit(result=self.result_value) diff --git a/voxvera/vendor/InquirerPy/prompts/confirm.py b/voxvera/vendor/InquirerPy/prompts/confirm.py deleted file mode 100644 index 7cd71f7..0000000 --- a/voxvera/vendor/InquirerPy/prompts/confirm.py +++ /dev/null @@ -1,196 +0,0 @@ -"""Module contains the class to create a confirm prompt.""" -from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple - -from prompt_toolkit.buffer import ValidationState -from prompt_toolkit.keys import Keys -from prompt_toolkit.shortcuts import PromptSession -from prompt_toolkit.validation import ValidationError - -from InquirerPy.base import BaseSimplePrompt -from InquirerPy.exceptions import InvalidArgument -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, -) - -if TYPE_CHECKING: - from prompt_toolkit.input.base import Input - from prompt_toolkit.key_binding.key_processor import KeyPressEvent - from prompt_toolkit.output.base import Output - -__all__ = ["ConfirmPrompt"] - - -class ConfirmPrompt(BaseSimplePrompt): - """Create a prompt that provides 2 options (confirm/deny) and controlled via single keypress. - - A wrapper class around :class:`~prompt_toolkit.shortcuts.PromptSession`. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Used for compatibility . - default: Set the default value of the prompt, should be either `True` or `False`. - This affects the value returned when user directly hit `enter` key. - Refer to :ref:`pages/dynamic:default` documentation for more details. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - confirm_letter: Letter used to confirm the prompt. A keybinding will be created for this letter. - Default is `y` and pressing `y` will answer the prompt with value `True`. - reject_letter: Letter used to reject the prompt. A keybinding will be created for this letter. - Default is `n` and pressing `n` will answer the prompt with value `False`. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - input: Used internally and will be removed in future updates. - output: Used internally and will be removed in future updates. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.confirm(message="Confirm?").execute() - >>> print(result) - True - """ - - def __init__( - self, - message: InquirerPyMessage, - style: Optional[InquirerPyStyle] = None, - default: InquirerPyDefault = False, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - instruction: str = "", - long_instruction: str = "", - transformer: Optional[Callable[[bool], Any]] = None, - filter: Optional[Callable[[bool], Any]] = None, - keybindings: Optional[InquirerPyKeybindings] = None, - wrap_lines: bool = True, - confirm_letter: str = "y", - reject_letter: str = "n", - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - input: Optional["Input"] = None, - output: Optional["Output"] = None, - ) -> None: - vi_mode = False - super().__init__( - message=message, - style=style, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - instruction=instruction, - transformer=transformer, - filter=filter, - default=default, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - if not isinstance(self._default, bool): - raise InvalidArgument( - f"{type(self).__name__} argument default should be type of bool" - ) - self._confirm_letter = confirm_letter - self._reject_letter = reject_letter - - if not keybindings: - keybindings = {} - self.kb_maps = { - "confirm": [ - {"key": self._confirm_letter}, - {"key": self._confirm_letter.upper()}, - ], - "reject": [ - {"key": self._reject_letter}, - {"key": self._reject_letter.upper()}, - ], - "any": [{"key": Keys.Any}], - **keybindings, - } - self.kb_func_lookup = { - "confirm": [{"func": self._handle_confirm}], - "reject": [{"func": self._handle_reject}], - "any": [{"func": lambda _: None}], - } - self._keybinding_factory() - - self._session = PromptSession( - message=self._get_prompt_message, - key_bindings=self._kb, - style=self._style, - wrap_lines=self._wrap_lines, - bottom_toolbar=[("class:long_instruction", long_instruction)] - if long_instruction - else None, - input=input, - output=output, - ) - - def _set_error(self, message: str) -> None: - self._session.default_buffer.validation_state = ValidationState.INVALID - self._session.default_buffer.validation_error = ValidationError(message=message) - - def _handle_reject(self, event) -> None: - self._session.default_buffer.text = "" - self.status["answered"] = True - self.status["result"] = False - event.app.exit(result=False) - - def _handle_confirm(self, event) -> None: - self._session.default_buffer.text = "" - self.status["answered"] = True - self.status["result"] = True - event.app.exit(result=True) - - def _handle_enter(self, event: "KeyPressEvent") -> None: - self.status["answered"] = True - self.status["result"] = self._default - event.app.exit(result=self._default) - - def _get_prompt_message(self) -> List[Tuple[str, str]]: - """Get message to display infront of the input buffer. - - Returns: - Formatted text in list of tuple format. - """ - if not self.instruction: - pre_answer = ( - "class:instruction", - " (%s/%s) " % (self._confirm_letter.upper(), self._reject_letter) - if self._default - else " (%s/%s) " % (self._confirm_letter, self._reject_letter.upper()), - ) - else: - pre_answer = ("class:instruction", " %s " % self.instruction) - post_answer = ("class:answer", " Yes" if self.status["result"] else " No") - return super()._get_prompt_message(pre_answer, post_answer) - - def _run(self) -> bool: - return self._session.prompt() - - async def _run_async(self) -> Any: - return await self._session.prompt_async() diff --git a/voxvera/vendor/InquirerPy/prompts/expand.py b/voxvera/vendor/InquirerPy/prompts/expand.py deleted file mode 100644 index e95f967..0000000 --- a/voxvera/vendor/InquirerPy/prompts/expand.py +++ /dev/null @@ -1,458 +0,0 @@ -"""Module contains the class to create an expand prompt.""" -from dataclasses import dataclass -from typing import Any, Callable, List, Optional, Tuple, Union - -from InquirerPy.base import BaseListPrompt, InquirerPyUIListControl -from InquirerPy.base.control import Choice -from InquirerPy.enum import INQUIRERPY_POINTER_SEQUENCE -from InquirerPy.exceptions import InvalidArgument, RequiredKeyNotFound -from InquirerPy.prompts.list import ListPrompt -from InquirerPy.separator import Separator -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyListChoices, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - -__all__ = ["ExpandPrompt", "ExpandHelp", "ExpandChoice"] - - -@dataclass -class ExpandHelp: - """Help choice for the :class:`.ExpandPrompt`. - - Args: - key: The key to bind to toggle the expansion of the prompt. - message: The help message. - """ - - key: str = "h" - message: str = "Help, list all choices" - - -@dataclass -class ExpandChoice(Choice): - """Choice class for :class:`.ExpandPrompt`. - - See Also: - :class:`~InquirerPy.base.control.Choice` - - Args: - value: The value of the choice when user selects this choice. - name: The value that should be presented to the user prior/after selection of the choice. - This value is optional, if not provided, it will fallback to the string representation of `value`. - enabled: Indicates if the choice should be pre-selected. - This only has effects when the prompt has `multiselect` enabled. - key: Char to bind to the choice. Pressing this value will jump to the choice, - If this value is missing, the first char of the `str(value)` will be used as the key. - """ - - key: Optional[str] = None - - def __post_init__(self): - """Assign stringify value to name and also create key using the first char of the value if not present.""" - super().__post_init__() - if self.key is None: - self.key = str(self.value)[0].lower() - - -class InquirerPyExpandControl(InquirerPyUIListControl): - """An :class:`~prompt_toolkit.layout.UIControl` class that displays a list of choices. - - Reference the parameter definition in :class:`.ExpandPrompt`. - """ - - def __init__( - self, - choices: InquirerPyListChoices, - default: Any, - pointer: str, - separator: str, - expand_help: ExpandHelp, - expand_pointer: str, - marker: str, - session_result: Optional[InquirerPySessionResult], - multiselect: bool, - marker_pl: str, - ) -> None: - self._pointer = pointer - self._separator = separator - self._expanded = False - self._expand_pointer = expand_pointer - self._marker = marker - self._marker_pl = marker_pl - self._expand_help = expand_help - super().__init__( - choices=choices, - default=default, - session_result=session_result, - multiselect=multiselect, - ) - - def _format_choices(self) -> None: - self._key_maps = {} - try: - count = 0 - separator_count = 0 - for raw_choice, choice in zip(self._raw_choices, self.choices): # type: ignore - if ( - not isinstance(raw_choice, dict) - and not isinstance(raw_choice, Separator) - and not isinstance(raw_choice, ExpandChoice) - ): - raise InvalidArgument( - "expand prompt argument choices requires each choice to be type of dictionary or Separator or ExpandChoice" - ) - if isinstance(raw_choice, Separator): - separator_count += 1 - else: - choice["key"] = ( - raw_choice.key - if isinstance(raw_choice, ExpandChoice) - else raw_choice["key"] - ) - self._key_maps[choice["key"]] = count - count += 1 - except KeyError: - raise RequiredKeyNotFound( - "expand prompt choice requires a key 'key' to exists" - ) - - self.choices.append( - { - "key": self._expand_help.key, - "value": self._expand_help, - "name": self._expand_help.message, - "enabled": False, - } - ) - self._key_maps[self._expand_help.key] = len(self.choices) - 1 - - first_valid_choice_index = 0 - while isinstance(self.choices[first_valid_choice_index]["value"], Separator): - first_valid_choice_index += 1 - if self.selected_choice_index == first_valid_choice_index: - for index, choice in enumerate(self.choices): - if isinstance(choice["value"], Separator): - continue - if choice["key"] == self._default: - self.selected_choice_index = index - break - - def _get_formatted_choices(self) -> List[Tuple[str, str]]: - """Override this parent class method as expand require visual switch of content. - - Two types of mode: - * non expand mode - * expand mode - """ - if self._expanded: - return super()._get_formatted_choices() - else: - display_choices = [] - display_choices.append(("class:pointer", self._expand_pointer)) - display_choices.append( - ("", self.choices[self.selected_choice_index]["name"]) - ) - return display_choices - - def _get_hover_text(self, choice) -> List[Tuple[str, str]]: - display_choices = [] - display_choices.append(("class:pointer", self._pointer)) - display_choices.append( - ( - "class:marker", - self._marker if choice["enabled"] else self._marker_pl, - ) - ) - if not isinstance(choice["value"], Separator): - display_choices.append( - ("class:pointer", "%s%s" % (choice["key"], self._separator)) - ) - display_choices.append(("[SetCursorPosition]", "")) - display_choices.append(("class:pointer", choice["name"])) - return display_choices - - def _get_normal_text(self, choice) -> List[Tuple[str, str]]: - display_choices = [] - display_choices.append(("", len(self._pointer) * " ")) - display_choices.append( - ( - "class:marker", - self._marker if choice["enabled"] else self._marker_pl, - ) - ) - if not isinstance(choice["value"], Separator): - display_choices.append(("", "%s%s" % (choice["key"], self._separator))) - display_choices.append(("", choice["name"])) - else: - display_choices.append(("class:separator", choice["name"])) - return display_choices - - -class ExpandPrompt(ListPrompt): - """Create a compact prompt with the ability to expand. - - A wrapper class around :class:`~prompt_toolkit.application.Application`. - - Contains a list of chocies binded to a shortcut letter. - The prompt can be expanded using `h` key. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - choices: List of choices to display and select. - Refer to :ref:`pages/prompts/expand:Choices` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default value of the prompt. - This will be used to determine which choice is highlighted (current selection), - The default value should the value of one of the choices. - For :class:`.ExpandPrompt` specifically, default value can also be a `choice["key"]` which is the shortcut key for the choice. - Refer to :ref:`pages/dynamic:default` documentation for more details. - separator: Separator symbol. Custom symbol that will be used as a separator between the choice index number and the choices. - help_msg: This parameter is DEPRECATED. Use expand_help instead. - expand_help: The help configuration for the prompt. Must be an instance of :class:`.ExpandHelp`. - If this value is None, the default help key will be binded to `h` and the default help message would be - "Help, List all choices." - expand_pointer: Pointer symbol before prompt expansion. Custom symbol that will be displayed to indicate the prompt is not expanded. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - pointer: Pointer symbol. Customer symbol that will be used to indicate the current choice selection. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - validate: Add validation to user input. - The main use case for this prompt would be when `multiselect` is True, you can enforce a min/max selection. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - height: Preferred height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - max_height: Max height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - multiselect: Enable multi-selection on choices. - You can use `validate` parameter to control min/max selections. - Setting to True will also change the result from a single value to a list of values. - marker: Marker Symbol. Custom symbol to indicate if a choice is selected. - This will take effects when `multiselect` is True. - marker_pl: Marker place holder when the choice is not selected. - This is empty space by default. - border: Create border around the choice window. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - show_cursor: Display cursor at the end of the prompt. - Set to False to hide the cursor. - cycle: Return to top item if hit bottom during navigation or vice versa. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.expand(message="Select one:", choices[{"name": "1", "value": "1", "key": "a"}]).execute() - >>> print(result) - "1" - """ - - def __init__( - self, - message: InquirerPyMessage, - choices: InquirerPyListChoices, - default: InquirerPyDefault = "", - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - pointer: str = " ", - separator: str = ") ", - help_msg: str = "Help, list all choices", - expand_help: Optional[ExpandHelp] = None, - expand_pointer: str = "%s " % INQUIRERPY_POINTER_SEQUENCE, - instruction: str = "", - long_instruction: str = "", - transformer: Optional[Callable[[Any], Any]] = None, - filter: Optional[Callable[[Any], Any]] = None, - height: Optional[Union[int, str]] = None, - max_height: Optional[Union[int, str]] = None, - multiselect: bool = False, - marker: str = INQUIRERPY_POINTER_SEQUENCE, - marker_pl: str = " ", - border: bool = False, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - keybindings: Optional[InquirerPyKeybindings] = None, - show_cursor: bool = True, - cycle: bool = True, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - if expand_help is None: - expand_help = ExpandHelp(message=help_msg) - self._expand_help = expand_help - self.content_control: InquirerPyExpandControl = InquirerPyExpandControl( - choices=choices, - default=default, - pointer=pointer, - separator=separator, - expand_help=expand_help, - expand_pointer=expand_pointer, - marker=marker, - marker_pl=marker_pl, - session_result=session_result, - multiselect=multiselect, - ) - super().__init__( - message=message, - choices=choices, - style=style, - border=border, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - instruction=instruction, - long_instruction=long_instruction, - transformer=transformer, - filter=filter, - height=height, - max_height=max_height, - validate=validate, - invalid_message=invalid_message, - multiselect=multiselect, - keybindings=keybindings, - show_cursor=show_cursor, - cycle=cycle, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - - def _on_rendered(self, _) -> None: - """Override this method to apply custom keybindings. - - Needs to creat these kb in the callback due to `after_render` - retrieve the choices asynchronously. - """ - - def keybinding_factory(key): - @self.register_kb(key.lower()) - def keybinding(_) -> None: - if key == self._expand_help.key: - self.content_control._expanded = not self.content_control._expanded - else: - self.content_control.selected_choice_index = ( - self.content_control._key_maps[key] - ) - - return keybinding - - for choice in self.content_control.choices: - if not isinstance(choice["value"], Separator): - keybinding_factory(choice["key"]) - - def _handle_up(self, event) -> None: - """Handle the event when user attempt to move up. - - Overriding this method to skip the help choice. - """ - if not self.content_control._expanded: - return - while True: - cap = BaseListPrompt._handle_up(self, event) - if not isinstance( - self.content_control.selection["value"], Separator - ) and not isinstance(self.content_control.selection["value"], ExpandHelp): - break - else: - if cap and not self._cycle: - self._handle_down(event) - break - - def _handle_down(self, event) -> None: - """Handle the event when user attempt to move down. - - Overriding this method to skip the help choice. - """ - if not self.content_control._expanded: - return - while True: - cap = BaseListPrompt._handle_down(self, event) - if not isinstance( - self.content_control.selection["value"], Separator - ) and not isinstance(self.content_control.selection["value"], ExpandHelp): - break - elif ( - isinstance(self.content_control.selection["value"], ExpandHelp) - and not self._cycle - ): - self._handle_up(event) - break - else: - if cap and not self._cycle: - self._handle_up(event) - break - - @property - def instruction(self) -> str: - """Construct the instruction behind the question. - - If _instruction exists, use that. - - :return: The instruction text. - """ - return ( - "(%s)" % "".join(self.content_control._key_maps.keys()) - if not self._instruction - else self._instruction - ) - - def _get_prompt_message(self) -> List[Tuple[str, str]]: - """Return the formatted text to display in the prompt. - - Overriding this method to allow multiple formatted class to be displayed. - """ - display_message = super()._get_prompt_message() - if not self.status["answered"]: - display_message.append( - ("class:input", self.content_control.selection["key"]) - ) - return display_message - - def _handle_toggle_all(self, _, value: Optional[bool] = None) -> None: - """Override this method to ignore `ExpandHelp`. - - :param value: Specify a value to toggle. - """ - if not self.content_control._expanded: - return - for choice in self.content_control.choices: - if isinstance(choice["value"], Separator) or isinstance( - choice["value"], ExpandHelp - ): - continue - choice["enabled"] = value if value else not choice["enabled"] - - def _handle_toggle_choice(self, event) -> None: - """Override this method to ignore keypress when not expanded.""" - if not self.content_control._expanded: - return - super()._handle_toggle_choice(event) diff --git a/voxvera/vendor/InquirerPy/prompts/filepath.py b/voxvera/vendor/InquirerPy/prompts/filepath.py deleted file mode 100644 index 97cce2b..0000000 --- a/voxvera/vendor/InquirerPy/prompts/filepath.py +++ /dev/null @@ -1,192 +0,0 @@ -"""Module contains the class to create filepath prompt and filepath completer class.""" -import os -from pathlib import Path -from typing import TYPE_CHECKING, Any, Callable, Generator, Optional - -from prompt_toolkit.completion import Completer, Completion -from prompt_toolkit.completion.base import ThreadedCompleter - -from InquirerPy.prompts.input import InputPrompt -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - -if TYPE_CHECKING: - from prompt_toolkit.input.base import Input - from prompt_toolkit.output.base import Output - -__all__ = ["FilePathPrompt", "FilePathCompleter"] - - -class FilePathCompleter(Completer): - """An auto completion class which generates system filepath. - - See Also: - :class:`~prompt_toolkit.completion.Completer` - - Args: - only_directories: Only complete directories. - only_files: Only complete files. - """ - - def __init__(self, only_directories: bool = False, only_files: bool = False): - self._only_directories = only_directories - self._only_files = only_files - self._delimiter = "/" if os.name == "posix" else "\\" - - def get_completions( - self, document, complete_event - ) -> Generator[Completion, None, None]: - """Get a list of valid system paths.""" - if document.text == "~": - return - - validation = lambda file, doc_text: str(file).startswith(doc_text) - - if document.cursor_position == 0: - dirname = Path.cwd() - validation = lambda file, doc_text: True - elif document.text.startswith("~"): - dirname = Path(os.path.dirname(f"{Path.home()}{document.text[1:]}")) - validation = lambda file, doc_text: str(file).startswith( - f"{Path.home()}{doc_text[1:]}" - ) - elif document.text.startswith(f".{self._delimiter}"): - dirname = Path(os.path.dirname(document.text)) - validation = lambda file, doc_text: str(file).startswith(doc_text[2:]) - else: - dirname = Path(os.path.dirname(document.text)) - - for item in self._get_completion(document, dirname, validation): - yield item - - def _get_completion( - self, document, path, validation - ) -> Generator[Completion, None, None]: - if not path.is_dir(): - return - for file in path.iterdir(): - if self._only_directories and not file.is_dir(): - continue - if self._only_files and not file.is_file(): - continue - if validation(file, document.text): - file_name = file.name - display_name = file_name - if file.is_dir(): - display_name = f"{file_name}{self._delimiter}" - yield Completion( - file.name, - start_position=-1 * len(os.path.basename(document.text)), - display=display_name, - ) - - -class FilePathPrompt(InputPrompt): - """Create a prompt that provides auto completion for system filepaths. - - A wrapper class around :class:`~prompt_toolkit.shortcuts.PromptSession`. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default text value of the prompt. - Refer to :ref:`pages/dynamic:default` documentation for more details. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - multicolumn_complete: Change the auto-completion UI to a multi column display. - validate: Add validation to user input. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - only_directories: Only complete directories. - only_files: Only complete files. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - input: Used internally and will be removed in future updates. - output: Used internally and will be removed in future updates. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.filepath(message="Enter a path:").execute() - >>> print(result) - /home/ubuntu/README.md - """ - - def __init__( - self, - message: InquirerPyMessage, - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - default: InquirerPyDefault = "", - qmark: str = "?", - amark: str = "?", - instruction: str = "", - long_instruction: str = "", - multicolumn_complete: bool = False, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - only_directories: bool = False, - only_files: bool = False, - transformer: Optional[Callable[[str], Any]] = None, - filter: Optional[Callable[[str], Any]] = None, - keybindings: Optional[InquirerPyKeybindings] = None, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - input: Optional["Input"] = None, - output: Optional["Output"] = None, - ) -> None: - super().__init__( - message=message, - style=style, - vi_mode=vi_mode, - default=default, - qmark=qmark, - amark=amark, - instruction=instruction, - long_instruction=long_instruction, - completer=ThreadedCompleter( - FilePathCompleter( - only_directories=only_directories, only_files=only_files - ) - ), - multicolumn_complete=multicolumn_complete, - validate=validate, - invalid_message=invalid_message, - transformer=transformer, - filter=filter, - keybindings=keybindings, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - input=input, - output=output, - ) diff --git a/voxvera/vendor/InquirerPy/prompts/fuzzy.py b/voxvera/vendor/InquirerPy/prompts/fuzzy.py deleted file mode 100644 index 8f1a5b6..0000000 --- a/voxvera/vendor/InquirerPy/prompts/fuzzy.py +++ /dev/null @@ -1,680 +0,0 @@ -"""Module contains the class to create a fuzzy prompt.""" -import asyncio -import math -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Dict, - List, - Optional, - Tuple, - Union, - cast, -) - -from pfzy import fuzzy_match -from pfzy.score import fzy_scorer, substr_scorer -from pfzy.types import HAYSTACKS -from prompt_toolkit.application.application import Application -from prompt_toolkit.buffer import Buffer -from prompt_toolkit.filters.cli import IsDone -from prompt_toolkit.layout.containers import ( - ConditionalContainer, - FloatContainer, - HSplit, - Window, -) -from prompt_toolkit.layout.controls import BufferControl, DummyControl -from prompt_toolkit.layout.dimension import Dimension, LayoutDimension -from prompt_toolkit.layout.layout import Layout -from prompt_toolkit.layout.processors import AfterInput, BeforeInput -from prompt_toolkit.lexers.base import SimpleLexer -from prompt_toolkit.validation import ValidationError -from prompt_toolkit.widgets.base import Frame - -from InquirerPy.base import FakeDocument, InquirerPyUIListControl -from InquirerPy.base.list import BaseListPrompt -from InquirerPy.containers.instruction import InstructionWindow -from InquirerPy.containers.message import MessageWindow -from InquirerPy.containers.validation import ValidationFloat -from InquirerPy.enum import INQUIRERPY_POINTER_SEQUENCE -from InquirerPy.exceptions import InvalidArgument -from InquirerPy.separator import Separator -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyListChoices, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, - calculate_height, -) - -if TYPE_CHECKING: - from prompt_toolkit.key_binding.key_processor import KeyPressEvent - -__all__ = ["FuzzyPrompt"] - - -class InquirerPyFuzzyControl(InquirerPyUIListControl): - """An :class:`~prompt_toolkit.layout.UIControl` class that displays a list of choices. - - This only displays the chocies. The actual input buffer will be handled by a separate - :class:`~prompt_toolkit.layout.BufferControl`. - - Reference the parameter definition in :class:`.FuzzyPrompt`. - """ - - def __init__( - self, - choices: InquirerPyListChoices, - pointer: str, - marker: str, - current_text: Callable[[], str], - max_lines: int, - session_result: Optional[InquirerPySessionResult], - multiselect: bool, - marker_pl: str, - match_exact: bool, - ) -> None: - self._pointer = pointer - self._marker = marker - self._marker_pl = marker_pl - self._current_text = current_text - self._max_lines = max_lines if max_lines > 0 else 1 - self._scorer = fzy_scorer if not match_exact else substr_scorer - super().__init__( - choices=choices, - default=None, - session_result=session_result, - multiselect=multiselect, - ) - - def _format_choices(self) -> None: - for index, choice in enumerate(self.choices): - if isinstance(choice["value"], Separator): - raise InvalidArgument( - "fuzzy prompt argument choices should not contain Separator" - ) - choice["index"] = index - choice["indices"] = [] - self._filtered_choices = self.choices - self._first_line = 0 - self._last_line = min(self._max_lines, self.choice_count) - self._height = self._last_line - self._first_line - - def _get_hover_text(self, choice) -> List[Tuple[str, str]]: - """Get the current highlighted line of text. - - If in the middle of filtering, loop through the char and color - indices matched char into style class `class:fuzzy_match`. - - Returns: - FormattedText in list of tuple format. - """ - display_choices = [] - display_choices.append(("class:pointer", self._pointer)) - display_choices.append( - ( - "class:marker", - self._marker - if self.choices[choice["index"]]["enabled"] - else self._marker_pl, - ) - ) - display_choices.append(("[SetCursorPosition]", "")) - if not choice["indices"]: - display_choices.append(("class:pointer", choice["name"])) - else: - indices = set(choice["indices"]) - for index, char in enumerate(choice["name"]): - if index in indices: - display_choices.append(("class:fuzzy_match", char)) - else: - display_choices.append(("class:pointer", char)) - return display_choices - - def _get_normal_text(self, choice) -> List[Tuple[str, str]]: - """Get the line of text in `FormattedText`. - - If in the middle of filtering, loop through the char and color - indices matched char into `class:fuzzy_match`. - - Calculate spaces of pointer to make the choice equally align. - - Returns: - FormattedText in list of tuple format. - """ - display_choices = [] - display_choices.append(("class:pointer", len(self._pointer) * " ")) - display_choices.append( - ( - "class:marker", - self._marker - if self.choices[choice["index"]]["enabled"] - else self._marker_pl, - ) - ) - if not choice["indices"]: - display_choices.append(("", choice["name"])) - else: - indices = set(choice["indices"]) - for index, char in enumerate(choice["name"]): - if index in indices: - display_choices.append(("class:fuzzy_match", char)) - else: - display_choices.append(("", char)) - return display_choices - - def _get_formatted_choices(self) -> List[Tuple[str, str]]: - """Get all available choices in formatted text format. - - Overriding this method because `self.choice` will be the - full choice list. Using `self.filtered_choice` to get - a list of choice based on current_text. - - Returns: - FormattedText in list of tuple format. - """ - display_choices = [] - if self.choice_count == 0: - self._selected_choice_index = 0 - return display_choices - - if self._selected_choice_index < 0: - self._selected_choice_index = 0 - elif self._selected_choice_index >= self.choice_count: - self._selected_choice_index = self.choice_count - 1 - - if (self._last_line - self._first_line) < min(self.choice_count, self._height): - self._last_line = min(self.choice_count, self._height) - self._first_line = self._last_line - min(self.choice_count, self._height) - - if self._selected_choice_index <= self._first_line: - self._first_line = self._selected_choice_index - self._last_line = self._first_line + min(self._height, self.choice_count) - elif self._selected_choice_index >= self._last_line: - self._last_line = self._selected_choice_index + 1 - self._first_line = self._last_line - min(self._height, self.choice_count) - - if self._last_line > self.choice_count: - self._last_line = self.choice_count - self._first_line = self._last_line - min(self._height, self.choice_count) - if self._first_line < 0: - self._first_line = 0 - self._last_line = self._first_line + min(self._height, self.choice_count) - - for index in range(self._first_line, self._last_line): - if index == self.selected_choice_index: - display_choices += self._get_hover_text(self._filtered_choices[index]) - else: - display_choices += self._get_normal_text(self._filtered_choices[index]) - display_choices.append(("", "\n")) - if display_choices: - display_choices.pop() - return display_choices - - async def _filter_choices(self, wait_time: float) -> List[Dict[str, Any]]: - """Call to filter choices using fzy fuzzy match. - - Args: - wait_time: Additional time to wait before filtering the choice. - - Returns: - Filtered choices. - """ - if not self._current_text(): - for choice in self.choices: - choice["indices"] = [] - choices = self.choices - else: - await asyncio.sleep(wait_time) - choices = await fuzzy_match( - self._current_text(), - cast(HAYSTACKS, self.choices), - key="name", - scorer=self._scorer, - ) - return choices - - @property - def selection(self) -> Dict[str, Any]: - """Override this value since `self.choice` does not indicate the choice displayed. - - `self.filtered_choice` is the up to date choice displayed. - - Returns: - A dictionary of name and value for the current pointed choice. - """ - return self._filtered_choices[self.selected_choice_index] - - @property - def choice_count(self) -> int: - """int: Filtered choice count.""" - return len(self._filtered_choices) - - -class FuzzyPrompt(BaseListPrompt): - """Create a prompt that lists choices while also allowing fuzzy search like fzf. - - A wrapper class around :class:`~prompt_toolkit.application.Application`. - - Fuzzy search using :func:`pfzy.match.fuzzy_match` function. - - Override the default keybindings for up/down as j/k cannot be bind even if `editing_mode` is vim - due to the input buffer. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - choices: List of choices to display and select. - Refer to :ref:`pages/dynamic:choices` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default value in the search buffer. - Different than other list type prompts, the `default` parameter tries to replicate what fzf does and - add the value in `default` to search buffer so it starts searching immediatelly. - Refer to :ref:`pages/dynamic:default` documentation for more details. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - pointer: Pointer symbol. Customer symbol that will be used to indicate the current choice selection. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - validate: Add validation to user input. - The main use case for this prompt would be when `multiselect` is True, you can enforce a min/max selection. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - height: Preferred height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - max_height: Max height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - multiselect: Enable multi-selection on choices. - You can use `validate` parameter to control min/max selections. - Setting to True will also change the result from a single value to a list of values. - prompt: Input prompt symbol. Custom symbol to display infront of the input buffer to indicate for input. - border: Create border around the choice window. - info: Display choice information similar to fzf --info=inline next to the prompt. - match_exact: Use exact sub-string match instead of using fzy fuzzy match algorithm. - exact_symbol: Custom symbol to display in the info section when `info=True`. - marker: Marker Symbol. Custom symbol to indicate if a choice is selected. - This will take effects when `multiselect` is True. - marker_pl: Marker place holder when the choice is not selected. - This is empty space by default. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - cycle: Return to top item if hit bottom during navigation or vice versa. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.fuzzy(message="Select one:", choices=[1, 2, 3]).execute() - >>> print(result) - 1 - """ - - def __init__( - self, - message: InquirerPyMessage, - choices: InquirerPyListChoices, - default: InquirerPyDefault = "", - pointer: str = INQUIRERPY_POINTER_SEQUENCE, - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - transformer: Optional[Callable[[Any], Any]] = None, - filter: Optional[Callable[[Any], Any]] = None, - instruction: str = "", - long_instruction: str = "", - multiselect: bool = False, - prompt: str = INQUIRERPY_POINTER_SEQUENCE, - marker: str = INQUIRERPY_POINTER_SEQUENCE, - marker_pl: str = " ", - border: bool = False, - info: bool = True, - match_exact: bool = False, - exact_symbol: str = " E", - height: Optional[Union[str, int]] = None, - max_height: Optional[Union[str, int]] = None, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - keybindings: Optional[InquirerPyKeybindings] = None, - cycle: bool = True, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - if not keybindings: - keybindings = {} - self._prompt = prompt - self._info = info - self._task = None - self._rendered = False - self._exact_symbol = exact_symbol - - keybindings = { - "up": [{"key": "up"}, {"key": "c-p"}], - "down": [{"key": "down"}, {"key": "c-n"}], - "toggle": [], - "toggle-exact": [], - **keybindings, - } - super().__init__( - message=message, - style=style, - border=border, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - transformer=transformer, - filter=filter, - validate=validate, - invalid_message=invalid_message, - multiselect=multiselect, - instruction=instruction, - long_instruction=long_instruction, - keybindings=keybindings, - cycle=cycle, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - self.kb_func_lookup = {"toggle-exact": [{"func": self._toggle_exact}]} - self._default = ( - default - if not isinstance(default, Callable) - else cast(Callable, default)(self._result) - ) - self._height_offset += 1 # search input - self._dimmension_height, self._dimmension_max_height = calculate_height( - height, max_height, height_offset=self.height_offset - ) - - self._content_control: InquirerPyFuzzyControl = InquirerPyFuzzyControl( - choices=choices, - pointer=pointer, - marker=marker, - current_text=self._get_current_text, - max_lines=self._dimmension_max_height, - session_result=session_result, - multiselect=multiselect, - marker_pl=marker_pl, - match_exact=match_exact, - ) - - self._buffer = Buffer(on_text_changed=self._on_text_changed) - input_window = Window( - height=LayoutDimension.exact(1), - content=BufferControl( - self._buffer, - [ - AfterInput(self._generate_after_input), - BeforeInput(self._generate_before_input), - ], - lexer=SimpleLexer("class:input"), - ), - ) - - choice_height_dimmension = lambda: Dimension( - max=self._dimmension_max_height, - preferred=self._dimmension_height, - min=self.content_control._height if self.content_control._height > 0 else 1, - ) - self.choice_window = Window( - content=self.content_control, - height=choice_height_dimmension, - dont_extend_height=True, - ) - - main_content_window = HSplit([input_window, self.choice_window]) - if self._border: - main_content_window = Frame(main_content_window) - self._layout = Layout( - FloatContainer( - content=HSplit( - [ - MessageWindow( - message=self._get_prompt_message, - filter=True, - wrap_lines=self._wrap_lines, - show_cursor=True, - ), - ConditionalContainer( - main_content_window, - filter=~IsDone(), - ), - ConditionalContainer( - Window(content=DummyControl()), - filter=~IsDone() & self._is_displaying_long_instruction, - ), - InstructionWindow( - message=self._long_instruction, - filter=~IsDone() & self._is_displaying_long_instruction, - wrap_lines=self._wrap_lines, - ), - ], - ), - floats=[ - ValidationFloat( - invalid_message=self._get_error_message, - filter=self._is_invalid & ~IsDone(), - wrap_lines=self._wrap_lines, - left=0, - bottom=self._validation_window_bottom_offset, - ), - ], - ) - ) - self._layout.focus(input_window) - - self._application = Application( - layout=self._layout, - style=self._style, - key_bindings=self._kb, - editing_mode=self._editing_mode, - after_render=self._after_render, - ) - - def _toggle_exact(self, _, value: Optional[bool] = None) -> None: - """Toggle matching algorithm. - - Switch between fzy fuzzy match or sub-string exact match. - - Args: - value: Specify the value to toggle. - """ - if value is not None: - self.content_control._scorer = fzy_scorer if not value else substr_scorer - else: - self.content_control._scorer = ( - fzy_scorer - if self.content_control._scorer == substr_scorer - else substr_scorer - ) - - def _on_rendered(self, _) -> None: - """Render callable choices and set the buffer default text. - - Setting buffer default text has to be after application is rendered and choice are loaded, - because `self._filter_choices` will use the event loop from `Application`. - """ - if self._default: - default_text = str(self._default) - self._buffer.text = default_text - self._buffer.cursor_position = len(default_text) - - def _handle_toggle_all(self, _, value: Optional[bool] = None) -> None: - """Toggle all choice `enabled` status. - - Args: - value: Specify the value to toggle. - """ - if not self._multiselect: - return - for choice in self.content_control._filtered_choices: - raw_choice = self.content_control.choices[choice["index"]] - if isinstance(raw_choice["value"], Separator): - continue - raw_choice["enabled"] = value if value else not raw_choice["enabled"] - - def _generate_after_input(self) -> List[Tuple[str, str]]: - """Virtual text displayed after the user input.""" - display_message = [] - if self._info: - display_message.append(("", " ")) - display_message.append( - ( - "class:fuzzy_info", - f"{self.content_control.choice_count}/{len(self.content_control.choices)}", - ) - ) - if self._multiselect: - display_message.append( - ("class:fuzzy_info", f" ({len(self.selected_choices)})") - ) - if self.content_control._scorer == substr_scorer: - display_message.append(("class:fuzzy_info", self._exact_symbol)) - return display_message - - def _generate_before_input(self) -> List[Tuple[str, str]]: - """Display prompt symbol as virtual text before user input.""" - display_message = [] - display_message.append(("class:fuzzy_prompt", "%s " % self._prompt)) - return display_message - - def _filter_callback(self, task): - """Redraw `self._application` when the filter task is finished.""" - if task.cancelled(): - return - self.content_control._filtered_choices = task.result() - self._application.invalidate() - - def _calculate_wait_time(self) -> float: - """Calculate wait time to smoother the application on big data set. - - Using digit of the choices lengeth to get wait time. - For digit greater than 6, using formula 2^(digit - 5) * 0.3 to increase the wait_time. - - Returns: - Desired wait time before running the filter. - """ - wait_table = { - 2: 0.05, - 3: 0.1, - 4: 0.2, - 5: 0.3, - } - digit = 1 - if len(self.content_control.choices) > 0: - digit = int(math.log10(len(self.content_control.choices))) + 1 - - if digit < 2: - return 0.0 - if digit in wait_table: - return wait_table[digit] - return wait_table[5] * (2 ** (digit - 5)) - - def _on_text_changed(self, _) -> None: - """Handle buffer text change event. - - 1. Check if there is current task running. - 2. Cancel if already has task, increase wait_time - 3. Create a filtered_choice task in asyncio event loop - 4. Add callback - - 1. Run a new filter on all choices. - 2. Re-calculate current selected_choice_index - if it exceeds the total filtered_choice. - 3. Avoid selected_choice_index less than zero, - this fix the issue of cursor lose when: - choice -> empty choice -> choice - - Don't need to create or check asyncio event loop, `prompt_toolkit` - application already has a event loop running. - """ - if self._invalid: - self._invalid = False - wait_time = self._calculate_wait_time() - if self._task and not self._task.done(): - self._task.cancel() - self._task = asyncio.create_task( - self.content_control._filter_choices(wait_time) - ) - self._task.add_done_callback(self._filter_callback) - - def _handle_toggle_choice(self, _) -> None: - """Handle tab event, alter the `selected` state of the choice.""" - if not self._multiselect: - return - current_selected_index = self.content_control.selection["index"] - self.content_control.choices[current_selected_index][ - "enabled" - ] = not self.content_control.choices[current_selected_index]["enabled"] - - def _handle_enter(self, event: "KeyPressEvent") -> None: - """Handle enter event. - - Validate the result first. - - In multiselect scenario, if no TAB is entered, then capture the current - highlighted choice and return the value in a list. - Otherwise, return all TAB choices as a list. - - In normal scenario, reutrn the current highlighted choice. - - If current UI contains no choice due to filter, return None. - """ - try: - fake_document = FakeDocument(self.result_value) - self._validator.validate(fake_document) # type: ignore - if self._multiselect: - self.status["answered"] = True - if not self.selected_choices: - self.status["result"] = [self.content_control.selection["name"]] - event.app.exit(result=[self.content_control.selection["value"]]) - else: - self.status["result"] = self.result_name - event.app.exit(result=self.result_value) - else: - self.status["answered"] = True - self.status["result"] = self.content_control.selection["name"] - event.app.exit(result=self.content_control.selection["value"]) - except ValidationError as e: - self._set_error(str(e)) - except IndexError: - self.status["answered"] = True - self.status["result"] = None if not self._multiselect else [] - event.app.exit(result=None if not self._multiselect else []) - - @property - def content_control(self) -> InquirerPyFuzzyControl: - """InquirerPyFuzzyControl: Override for type-hinting.""" - return cast(InquirerPyFuzzyControl, super().content_control) - - @content_control.setter - def content_control(self, value: InquirerPyFuzzyControl) -> None: - self._content_control = value - - def _get_current_text(self) -> str: - """Get current input buffer text.""" - return self._buffer.text diff --git a/voxvera/vendor/InquirerPy/prompts/input.py b/voxvera/vendor/InquirerPy/prompts/input.py deleted file mode 100644 index 1c79027..0000000 --- a/voxvera/vendor/InquirerPy/prompts/input.py +++ /dev/null @@ -1,253 +0,0 @@ -"""Module contains the class to create an input prompt.""" -from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union - -from prompt_toolkit.buffer import ValidationState -from prompt_toolkit.completion import NestedCompleter -from prompt_toolkit.completion.base import Completer -from prompt_toolkit.filters.base import Condition -from prompt_toolkit.keys import Keys -from prompt_toolkit.lexers import SimpleLexer -from prompt_toolkit.shortcuts.prompt import CompleteStyle, PromptSession -from prompt_toolkit.validation import ValidationError - -from InquirerPy.base import BaseSimplePrompt -from InquirerPy.enum import INQUIRERPY_POINTER_SEQUENCE -from InquirerPy.exceptions import InvalidArgument -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - -if TYPE_CHECKING: - from prompt_toolkit.input.base import Input - from prompt_toolkit.key_binding.key_processor import KeyPressEvent - from prompt_toolkit.output.base import Output - -__all__ = ["InputPrompt"] - - -class InputPrompt(BaseSimplePrompt): - """Create a text prompt that accepts user input. - - A wrapper class around :class:`~prompt_toolkit.shortcuts.PromptSession`. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default text value of the prompt. - Refer to :ref:`pages/dynamic:default` documentation for more details. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - completer: Add auto completion to the prompt. - Refer to :ref:`pages/prompts/input:Auto Completion` documentation for more details. - multicolumn_complete: Change the auto-completion UI to a multi column display. - multiline: Enable multiline edit. While multiline edit is active, pressing `enter` won't complete the answer. - and will create a new line. Use `esc` followd by `enter` to complete the question. - validate: Add validation to user input. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - is_password: Used internally for :class:`~InquirerPy.prompts.secret.SecretPrompt`. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - input: Used internally and will be removed in future updates. - output: Used internally and will be removed in future updates. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.text(message="Enter your name:").execute() - >>> print(f"Name: {result}") - Name: Michael - """ - - def __init__( - self, - message: InquirerPyMessage, - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - default: InquirerPyDefault = "", - qmark: str = "?", - amark: str = "?", - instruction: str = "", - long_instruction: str = "", - completer: Optional[Union[Dict[str, Optional[str]], "Completer"]] = None, - multicolumn_complete: bool = False, - multiline: bool = False, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - transformer: Optional[Callable[[str], Any]] = None, - filter: Optional[Callable[[str], Any]] = None, - keybindings: Optional[InquirerPyKeybindings] = None, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - is_password: bool = False, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - input: Optional["Input"] = None, - output: Optional["Output"] = None, - ) -> None: - super().__init__( - message, - style, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - instruction=instruction, - validate=validate, - invalid_message=invalid_message, - transformer=transformer, - filter=filter, - session_result=session_result, - default=default, - wrap_lines=wrap_lines, - mandatory=mandatory, - mandatory_message=mandatory_message, - raise_keyboard_interrupt=raise_keyboard_interrupt, - ) - if not isinstance(self._default, str): - raise InvalidArgument( - f"{type(self).__name__} argument 'default' should be type of str" - ) - self._completer = None - if isinstance(completer, dict): - self._completer = NestedCompleter.from_nested_dict(completer) - elif isinstance(completer, Completer): - self._completer = completer - self._multiline = multiline - self._complete_style = ( - CompleteStyle.COLUMN - if not multicolumn_complete - else CompleteStyle.MULTI_COLUMN - ) - - @Condition - def is_multiline(): - return self._multiline - - if not keybindings: - keybindings = {} - self.kb_maps = { - "answer": [ - {"key": Keys.Enter, "filter": ~is_multiline}, - {"key": [Keys.Escape, Keys.Enter], "filter": is_multiline}, - ], - "completion": [{"key": "c-space"}], - **keybindings, - } - self.kb_func_lookup = {"completion": [{"func": self._handle_completion}]} - self._keybinding_factory() - - self._session = PromptSession( - message=self._get_prompt_message, - key_bindings=self._kb, - style=self._style, - completer=self._completer, - validator=self._validator, - validate_while_typing=False, - input=input, - output=output, - editing_mode=self._editing_mode, - lexer=SimpleLexer(self._lexer), - is_password=is_password, - multiline=self._multiline, - complete_style=self._complete_style, - wrap_lines=wrap_lines, - bottom_toolbar=[("class:long_instruction", long_instruction)] - if long_instruction - else None, - ) - - def _set_error(self, message: str) -> None: - self._session.default_buffer.validation_state = ValidationState.INVALID - self._session.default_buffer.validation_error = ValidationError(message=message) - - def _handle_enter(self, event: "KeyPressEvent") -> None: - try: - self._session.validator.validate(self._session.default_buffer) # type: ignore - except ValidationError: - self._session.default_buffer.validate_and_handle() - else: - self.status["answered"] = True - self.status["result"] = self._session.default_buffer.text - self._session.default_buffer.text = "" - event.app.exit(result=self.status["result"]) - - def _handle_completion(self, event) -> None: - if self._completer is None: - return - buff = event.app.current_buffer - if buff.complete_state: - buff.complete_next() - else: - buff.start_completion(select_first=False) - - def _get_prompt_message( - self, - pre_answer: Optional[Tuple[str, str]] = None, - post_answer: Optional[Tuple[str, str]] = None, - ) -> List[Tuple[str, str]]: - """Get message to display infront of the input buffer. - - Args: - pre_answer: The formatted text to display before answering the question. - post_answer: The formatted text to display after answering the question. - - Returns: - Formatted text in list of tuple format. - """ - if not pre_answer: - if self._multiline and not self._instruction: - pre_answer = ("class:instruction", " ESC + Enter to finish input") - else: - pre_answer = ( - "class:instruction", - " %s " % self.instruction if self.instruction else " ", - ) - if not post_answer: - if self._multiline and self.status["result"]: - lines = self.status["result"].split("\n") - if len(lines) > 1: - number_of_chars = len("".join(lines[1:])) - lines[0] += "...[%s char%s]" % ( - number_of_chars, - "s" if number_of_chars > 1 else "", - ) - post_answer = ("class:answer", " %s" % lines[0]) - else: - post_answer = ("class:answer", " %s" % self.status["result"]) - - formatted_message = super()._get_prompt_message(pre_answer, post_answer) - if not self.status["answered"] and self._multiline: - formatted_message.append( - ("class:questionmark", "\n%s " % INQUIRERPY_POINTER_SEQUENCE) - ) - return formatted_message - - def _run(self) -> str: - return self._session.prompt(default=self._default) - - async def _run_async(self) -> Any: - return await self._session.prompt_async(default=self._default) diff --git a/voxvera/vendor/InquirerPy/prompts/list.py b/voxvera/vendor/InquirerPy/prompts/list.py deleted file mode 100644 index acbda33..0000000 --- a/voxvera/vendor/InquirerPy/prompts/list.py +++ /dev/null @@ -1,368 +0,0 @@ -"""Module contains the class to create a list prompt.""" -import shutil -from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, Union - -from prompt_toolkit.application.application import Application -from prompt_toolkit.filters.cli import IsDone -from prompt_toolkit.layout.containers import ( - ConditionalContainer, - FloatContainer, - HSplit, - Window, -) -from prompt_toolkit.layout.controls import DummyControl -from prompt_toolkit.layout.dimension import Dimension -from prompt_toolkit.layout.layout import Layout -from prompt_toolkit.validation import ValidationError -from prompt_toolkit.widgets.base import Frame - -from InquirerPy.base import InquirerPyUIListControl -from InquirerPy.base.complex import FakeDocument -from InquirerPy.base.list import BaseListPrompt -from InquirerPy.containers.instruction import InstructionWindow -from InquirerPy.containers.message import MessageWindow -from InquirerPy.containers.validation import ValidationFloat -from InquirerPy.enum import INQUIRERPY_POINTER_SEQUENCE -from InquirerPy.separator import Separator -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyListChoices, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, - calculate_height, -) - -if TYPE_CHECKING: - from prompt_toolkit.key_binding.key_processor import KeyPressEvent - -__all__ = ["ListPrompt"] - - -class InquirerPyListControl(InquirerPyUIListControl): - """An :class:`~prompt_toolkit.layout.UIControl` class that displays a list of choices. - - Reference the parameter definition in :class:`.ListPrompt`. - """ - - def __init__( - self, - choices: InquirerPyListChoices, - default: Any, - pointer: str, - marker: str, - session_result: Optional[InquirerPySessionResult], - multiselect: bool, - marker_pl: str, - ) -> None: - self._pointer: str = pointer - self._marker: str = marker - self._marker_pl: str = marker_pl - super().__init__( - choices=choices, - default=default, - session_result=session_result, - multiselect=multiselect, - ) - - def _get_hover_text(self, choice) -> List[Tuple[str, str]]: - display_choices = [] - display_choices.append(("class:pointer", self._pointer)) - display_choices.append( - ( - "class:marker", - self._marker if choice["enabled"] else self._marker_pl, - ) - ) - display_choices.append(("[SetCursorPosition]", "")) - display_choices.append(("class:pointer", choice["name"])) - return display_choices - - def _get_normal_text(self, choice) -> List[Tuple[str, str]]: - display_choices = [] - display_choices.append(("", len(self._pointer) * " ")) - display_choices.append( - ( - "class:marker", - self._marker if choice["enabled"] else self._marker_pl, - ) - ) - if not isinstance(choice["value"], Separator): - display_choices.append(("", choice["name"])) - else: - display_choices.append(("class:separator", choice["name"])) - return display_choices - - -class ListPrompt(BaseListPrompt): - """Create a prompt that displays a list of choices to select. - - A wrapper class around :class:`~prompt_toolkit.application.Application`. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - choices: List of choices to display and select. - Refer to :ref:`pages/dynamic:choices` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default value of the prompt. - This will be used to determine which choice is highlighted (current selection), - The default value should be the value of one of the choices. - Refer to :ref:`pages/dynamic:default` documentation for more details. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - pointer: Pointer symbol. Customer symbol that will be used to indicate the current choice selection. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - validate: Add validation to user input. - The main use case for this prompt would be when `multiselect` is True, you can enforce a min/max selection. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - height: Preferred height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - max_height: Max height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - multiselect: Enable multi-selection on choices. - You can use `validate` parameter to control min/max selections. - Setting to True will also change the result from a single value to a list of values. - marker: Marker Symbol. Custom symbol to indicate if a choice is selected. - This will take effects when `multiselect` is True. - marker_pl: Marker place holder when the choice is not selected. - This is empty space by default. - border: Create border around the choice window. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - show_cursor: Display cursor at the end of the prompt. - Set to False to hide the cursor. - cycle: Return to top item if hit bottom during navigation or vice versa. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.select(message="Select one:", choices=[1, 2, 3]).execute() - >>> print(result) - 1 - """ - - def __init__( - self, - message: InquirerPyMessage, - choices: InquirerPyListChoices, - default: InquirerPyDefault = None, - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - pointer: str = INQUIRERPY_POINTER_SEQUENCE, - instruction: str = "", - long_instruction: str = "", - transformer: Optional[Callable[[Any], Any]] = None, - filter: Optional[Callable[[Any], Any]] = None, - height: Optional[Union[int, str]] = None, - max_height: Optional[Union[int, str]] = None, - multiselect: bool = False, - marker: str = INQUIRERPY_POINTER_SEQUENCE, - marker_pl: str = " ", - border: bool = False, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - keybindings: Optional[InquirerPyKeybindings] = None, - show_cursor: bool = True, - cycle: bool = True, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - if not hasattr(self, "_content_control"): - self.content_control = InquirerPyListControl( - choices=choices, - default=default, - pointer=pointer, - marker=marker, - session_result=session_result, - multiselect=multiselect, - marker_pl=marker_pl, - ) - super().__init__( - message=message, - style=style, - border=border, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - instruction=instruction, - long_instruction=long_instruction, - transformer=transformer, - filter=filter, - validate=validate, - invalid_message=invalid_message, - multiselect=multiselect, - keybindings=keybindings, - cycle=cycle, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - self._show_cursor = show_cursor - self._dimmension_height, self._dimmension_max_height = calculate_height( - height, max_height, height_offset=self.height_offset - ) - main_content_window = Window( - content=self.content_control, - height=Dimension( - max=self._dimmension_max_height, - preferred=self._dimmension_height, - ), - dont_extend_height=True, - ) - - if self._border: - main_content_window = Frame(main_content_window) - - self._layout = FloatContainer( - content=HSplit( - [ - MessageWindow( - message=self._get_prompt_message_with_cursor - if self._show_cursor - else self._get_prompt_message, - filter=True, - wrap_lines=self._wrap_lines, - show_cursor=self._show_cursor, - ), - ConditionalContainer(main_content_window, filter=~IsDone()), - ConditionalContainer( - Window(content=DummyControl()), - filter=~IsDone() & self._is_displaying_long_instruction, - ), - InstructionWindow( - message=self._long_instruction, - filter=~IsDone() & self._is_displaying_long_instruction, - wrap_lines=self._wrap_lines, - ), - ] - ), - floats=[ - ValidationFloat( - invalid_message=self._get_error_message, - filter=self._is_invalid & ~IsDone(), - wrap_lines=self._wrap_lines, - left=0, - bottom=self._validation_window_bottom_offset, - ), - ], - ) - - self.application = Application( - layout=Layout(self._layout), - style=self._style, - key_bindings=self._kb, - after_render=self._after_render, - ) - - def _get_prompt_message_with_cursor(self) -> List[Tuple[str, str]]: - """Obtain the prompt message to display and display cursor behind the message. - - This ensures that cursor is always at the end of the window. - """ - message = self._get_prompt_message() - message.append(("[SetCursorPosition]", "")) - message.append(("", " ")) # [SetCursorPosition] require char behind it - return message - - def _handle_toggle_choice(self, _) -> None: - """Toggle the `enabled` status of the choice.""" - if not self._multiselect: - return - self.content_control.selection["enabled"] = not self.content_control.selection[ - "enabled" - ] - - def _handle_toggle_all(self, _, value: Optional[bool] = None) -> None: - """Toggle all choice `enabled` status. - - Args: - value: Sepcify a value to toggle. - """ - if not self._multiselect: - return - for choice in self.content_control.choices: - if isinstance(choice["value"], Separator): - continue - choice["enabled"] = value if value else not choice["enabled"] - - def _handle_up(self, event) -> None: - """Handle the event when user attempt to move up.""" - while True: - cap = super()._handle_up(event) - if not isinstance(self.content_control.selection["value"], Separator): - break - else: - if cap and not self._cycle: - self._handle_down(event) - break - - def _handle_down(self, event) -> None: - """Handle the event when user attempt to move down.""" - while True: - cap = super()._handle_down(event) - if not isinstance(self.content_control.selection["value"], Separator): - break - else: - if cap and not self._cycle: - self._handle_up(event) - break - - def _handle_enter(self, event: "KeyPressEvent") -> None: - """Handle the event when user hit `enter` key. - - 1. Set the prompt state to answered. - 2. Set the result to the name of the selected choices. - 3. Exit the app with the value of the selected choices. - - In multiselect scenario, if nothing is selected, return the current highlighted choice. - """ - try: - fake_document = FakeDocument(self.result_value) - self._validator.validate(fake_document) # type: ignore - except ValidationError as e: - self._set_error(str(e)) - else: - self.status["answered"] = True - if self._multiselect and not self.selected_choices: - self.status["result"] = [self.content_control.selection["name"]] - event.app.exit(result=[self.content_control.selection["value"]]) - else: - self.status["result"] = self.result_name - event.app.exit(result=self.result_value) - - @property - def extra_message_line_count(self) -> int: - """int: Get extra lines created for message caused by line wrapping. - - Overriding it to count the cursor as well. - """ - cursor_offset = -1 if not self._show_cursor else 0 - term_width, _ = shutil.get_terminal_size() - return (self.total_message_length + cursor_offset) // term_width diff --git a/voxvera/vendor/InquirerPy/prompts/number.py b/voxvera/vendor/InquirerPy/prompts/number.py deleted file mode 100644 index 5efce26..0000000 --- a/voxvera/vendor/InquirerPy/prompts/number.py +++ /dev/null @@ -1,616 +0,0 @@ -"""Module contains the class to create a number prompt.""" -import re -from decimal import Decimal -from typing import TYPE_CHECKING, Any, Callable, Optional, Tuple, Union, cast - -from prompt_toolkit.application.application import Application -from prompt_toolkit.buffer import Buffer -from prompt_toolkit.filters.base import Condition -from prompt_toolkit.filters.cli import IsDone -from prompt_toolkit.keys import Keys -from prompt_toolkit.layout.containers import ( - ConditionalContainer, - HorizontalAlign, - HSplit, - VSplit, - Window, -) -from prompt_toolkit.layout.controls import ( - BufferControl, - DummyControl, - FormattedTextControl, -) -from prompt_toolkit.layout.dimension import Dimension, LayoutDimension -from prompt_toolkit.layout.layout import Layout -from prompt_toolkit.lexers.base import SimpleLexer -from prompt_toolkit.validation import ValidationError - -from InquirerPy.base.complex import BaseComplexPrompt, FakeDocument -from InquirerPy.containers.instruction import InstructionWindow -from InquirerPy.containers.validation import ValidationWindow -from InquirerPy.enum import INQUIRERPY_QMARK_SEQUENCE -from InquirerPy.exceptions import InvalidArgument -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - -if TYPE_CHECKING: - from prompt_toolkit.key_binding.key_processor import KeyPressEvent - -__all__ = ["NumberPrompt"] - - -class NumberPrompt(BaseComplexPrompt): - """Create a input prompts that only takes number as input. - - A wrapper class around :class:`~prompt_toolkit.application.Application`. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default value of the prompt. - You can enter either the floating value or integer value as the default. - Refer to :ref:`pages/dynamic:default` documentation for more details. - float_allowed: Allow decimal input. This will change the prompt to have 2 input buffer, one for the - whole value and one for the integral value. - min_allowed: Set the minimum value of the prompt. When the input value goes below this value, it - will automatically reset to this value. - max_allowed: Set the maximum value of the prompt. When the inptu value goes above this value, it - will automatically reset to this value. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - decimal_symbol: Decimal point symbol. Custom symbol to display as the decimal point. - replace_mode: Start each input buffer in replace mode if default value is 0. - When typing, it will replace the 0 with the new value. The replace mode will be disabled once the value - is changed. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - validate: Add validation to user input. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.number(message="Enter number:").execute() - >>> print(result) - 0 - """ - - def __init__( - self, - message: InquirerPyMessage, - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - default: InquirerPyDefault = 0, - float_allowed: bool = False, - max_allowed: Optional[Union[int, float]] = None, - min_allowed: Optional[Union[int, float]] = None, - decimal_symbol: str = ". ", - replace_mode: bool = False, - qmark: str = INQUIRERPY_QMARK_SEQUENCE, - amark: str = "?", - instruction: str = "", - long_instruction: str = "", - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - transformer: Optional[Callable[[str], Any]] = None, - filter: Optional[Callable[[str], Any]] = None, - keybindings: Optional[InquirerPyKeybindings] = None, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - super().__init__( - message=message, - style=style, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - transformer=transformer, - filter=filter, - invalid_message=invalid_message, - validate=validate, - instruction=instruction, - long_instruction=long_instruction, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - - self._float = float_allowed - self._is_float = Condition(lambda: self._float) - self._max = max_allowed - self._min = min_allowed - self._value_error_message = "Remove any non-integer value" - self._decimal_symbol = decimal_symbol - self._whole_replace = False - self._integral_replace = False - self._replace_mode = replace_mode - - self._leading_zero_pattern = re.compile(r"^(0*)[0-9]+.*") - self._sn_pattern = re.compile(r"^.*E-.*") - self._no_default = False - - if default is None: - default = 0 - self._no_default = True - - if isinstance(default, Callable): - default = cast(Callable, default)(session_result) - if self._float: - default = Decimal(str(float(cast(int, default)))) - if self._float: - if not isinstance(default, float) and not isinstance(default, Decimal): - raise InvalidArgument( - f"{type(self).__name__} argument 'default' should return type of float or Decimal" - ) - elif not isinstance(default, int): - raise InvalidArgument( - f"{type(self).__name__} argument 'default' should return type of int" - ) - self._default = default - - if keybindings is None: - keybindings = {} - self.kb_maps = { - "down": [ - {"key": "down"}, - {"key": "c-n", "filter": ~self._is_vim_edit}, - {"key": "j", "filter": self._is_vim_edit}, - ], - "up": [ - {"key": "up"}, - {"key": "c-p", "filter": ~self._is_vim_edit}, - {"key": "k", "filter": self._is_vim_edit}, - ], - "left": [ - {"key": "left"}, - {"key": "c-b", "filter": ~self._is_vim_edit}, - {"key": "h", "filter": self._is_vim_edit}, - ], - "right": [ - {"key": "right"}, - {"key": "c-f", "filter": ~self._is_vim_edit}, - {"key": "l", "filter": self._is_vim_edit}, - ], - "dot": [{"key": "."}], - "focus": [{"key": Keys.Tab}, {"key": "s-tab"}], - "input": [{"key": str(i)} for i in range(10)], - "negative_toggle": [{"key": "-"}], - **keybindings, - } - self.kb_func_lookup = { - "down": [{"func": self._handle_down}], - "up": [{"func": self._handle_up}], - "left": [{"func": self._handle_left}], - "right": [{"func": self._handle_right}], - "focus": [{"func": self._handle_focus}], - "input": [{"func": self._handle_input}], - "negative_toggle": [{"func": self._handle_negative_toggle}], - "dot": [{"func": self._handle_dot}], - } - - @self.register_kb(Keys.Any) - def _(_): - pass - - self._whole_width = 1 - self._whole_buffer = Buffer( - on_text_changed=self._on_whole_text_change, - on_cursor_position_changed=self._on_cursor_position_change, - ) - - self._integral_width = 1 - self._integral_buffer = Buffer( - on_text_changed=self._on_integral_text_change, - on_cursor_position_changed=self._on_cursor_position_change, - ) - - self._whole_window = Window( - height=LayoutDimension.exact(1) if not self._wrap_lines else None, - content=BufferControl( - buffer=self._whole_buffer, - lexer=SimpleLexer("class:input"), - ), - width=lambda: Dimension( - min=self._whole_width, - max=self._whole_width, - preferred=self._whole_width, - ), - dont_extend_width=True, - ) - - self._integral_window = Window( - height=LayoutDimension.exact(1) if not self._wrap_lines else None, - content=BufferControl( - buffer=self._integral_buffer, - lexer=SimpleLexer("class:input"), - ), - width=lambda: Dimension( - min=self._integral_width, - max=self._integral_width, - preferred=self._integral_width, - ), - ) - - self._layout = Layout( - HSplit( - [ - VSplit( - [ - Window( - height=LayoutDimension.exact(1) - if not self._wrap_lines - else None, - content=FormattedTextControl(self._get_prompt_message), - wrap_lines=self._wrap_lines, - dont_extend_height=True, - dont_extend_width=True, - ), - ConditionalContainer(self._whole_window, filter=~IsDone()), - ConditionalContainer( - Window( - height=LayoutDimension.exact(1) - if not self._wrap_lines - else None, - content=FormattedTextControl( - [("", self._decimal_symbol)] - ), - wrap_lines=self._wrap_lines, - dont_extend_height=True, - dont_extend_width=True, - ), - filter=self._is_float & ~IsDone(), - ), - ConditionalContainer( - self._integral_window, filter=self._is_float & ~IsDone() - ), - ], - align=HorizontalAlign.LEFT, - ), - ConditionalContainer( - Window(content=DummyControl()), - filter=~IsDone() & self._is_displaying_long_instruction, - ), - ValidationWindow( - invalid_message=self._get_error_message, - filter=self._is_invalid & ~IsDone(), - wrap_lines=self._wrap_lines, - ), - InstructionWindow( - message=self._long_instruction, - filter=~IsDone() & self._is_displaying_long_instruction, - wrap_lines=self._wrap_lines, - ), - ] - ), - ) - - self.focus = self._whole_window - - self._application = Application( - layout=self._layout, - style=self._style, - key_bindings=self._kb, - after_render=self._after_render, - editing_mode=self._editing_mode, - ) - - def _fix_sn(self, value: str) -> Tuple[str, str]: - """Fix sciencetific notation format. - - Args: - value: Value to fix. - - Returns: - A tuple of whole buffer text and integral buffer text. - """ - left, right = value.split("E-") - whole_buffer_text = "0" - integral_buffer_text = f"{(int(right) - 1) * '0'}{left.replace('.', '')}" - return whole_buffer_text, integral_buffer_text - - def _on_rendered(self, _) -> None: - """Additional processing to adjust buffer content after render.""" - if self._no_default: - return - if not self._float: - self._whole_buffer.text = str(self._default) - self._integral_buffer.text = "0" - else: - if self._sn_pattern.match(str(self._default)) is None: - whole_buffer_text, integral_buffer_text = str(self._default).split(".") - else: - whole_buffer_text, integral_buffer_text = self._fix_sn( - str(self._default) - ) - self._integral_buffer.text = integral_buffer_text - self._whole_buffer.text = whole_buffer_text - self._whole_buffer.cursor_position = len(self._whole_buffer.text) - self._integral_buffer.cursor_position = len(self._integral_buffer.text) - if self._replace_mode: - # check to start replace mode if applicable - if self._whole_buffer.text == "0": - self._whole_replace = True - self._whole_buffer.cursor_position = 0 - if self._integral_buffer.text == "0": - self._integral_replace = True - self._integral_buffer.cursor_position = 0 - - def _handle_number(self, increment: bool) -> None: - """Handle number increment and decrement. - - Additional processing to handle leading zeros in integral buffer - as well as SN notation. - - Args: - increment: Indicate if the operation should increment or decrement. - """ - if self.buffer_replace: - self.buffer_replace = False - self.focus_buffer.cursor_position += 1 - try: - leading_zeros = "" - if self.focus_buffer == self._integral_buffer: - zeros = self._leading_zero_pattern.match(self._integral_buffer.text) - if zeros is not None: - leading_zeros = zeros.group(1) - current_text_len = len(self.focus_buffer.text) - if not self.focus_buffer.text: - next_text = "0" - next_text_len = 1 - else: - if not increment: - if ( - self.focus_buffer == self._integral_buffer - and int(self.focus_buffer.text) == 0 - ): - return - next_text = leading_zeros + str(int(self.focus_buffer.text) - 1) - else: - next_text = leading_zeros + str(int(self.focus_buffer.text) + 1) - next_text_len = len(next_text) - desired_position = ( - self.focus_buffer.cursor_position + next_text_len - current_text_len - ) - self.focus_buffer.cursor_position = desired_position - self.focus_buffer.text = next_text - if self.focus_buffer.cursor_position != desired_position: - self.focus_buffer.cursor_position = desired_position - except ValueError: - self._set_error(message=self._value_error_message) - - def _handle_down(self, _) -> None: - """Handle down key press.""" - self._handle_number(increment=False) - - def _handle_up(self, _) -> None: - """Handle up key press.""" - self._handle_number(increment=True) - - def _handle_left(self, _) -> None: - """Handle left key press. - - Move to the left by one cursor position and focus the whole window - if applicable. - """ - self.buffer_replace = False - if ( - self.focus == self._integral_window - and self.focus_buffer.cursor_position == 0 - ): - self.focus = self._whole_window - else: - self.focus_buffer.cursor_position -= 1 - - def _handle_right(self, _) -> None: - """Handle right key press. - - Move to the right by one cursor position and focus the integral window - if applicable. - """ - self.buffer_replace = False - if ( - self.focus == self._whole_window - and self.focus_buffer.cursor_position == len(self.focus_buffer.text) - and self._float - ): - self.focus = self._integral_window - else: - self.focus_buffer.cursor_position += 1 - - def _handle_enter(self, event: "KeyPressEvent") -> None: - """Handle enter event and answer/close the prompt.""" - if not self._float and not self._whole_buffer.text: - result = "" - elif ( - self._float - and not self._whole_buffer.text - and not self._integral_buffer.text - ): - result = "" - else: - result = str(self.value) - - try: - fake_document = FakeDocument(result) - self._validator.validate(fake_document) # type: ignore - except ValidationError as e: - self._set_error(str(e)) - else: - self.status["answered"] = True - self.status["result"] = result - event.app.exit(result=result) - - def _handle_dot(self, _) -> None: - """Focus the integral window if `float_allowed`.""" - self._handle_focus(_, self._integral_window) - - def _handle_focus(self, _, window: Optional[Window] = None) -> None: - """Focus either the integral window or whole window.""" - if not self._float: - return - if window is not None: - self.focus = window - return - if self.focus == self._whole_window: - self.focus = self._integral_window - else: - self.focus = self._whole_window - - def _handle_input(self, event: "KeyPressEvent") -> None: - """Handle user input of numbers. - - Buffer will start as replace mode if the value is zero, once - cursor is moved or content is changed, disable replace mode. - """ - if self.buffer_replace: - self.buffer_replace = False - self.focus_buffer.text = event.key_sequence[0].data - self.focus_buffer.cursor_position += 1 - else: - self.focus_buffer.insert_text(event.key_sequence[0].data) - - def _handle_negative_toggle(self, _) -> None: - """Toggle negativity of the prompt value. - - Force the `-` sign at the start. - """ - if self._whole_buffer.text == "-": - self._whole_buffer.text = "0" - return - if self._whole_buffer.text.startswith("-"): - move_cursor = self._whole_buffer.cursor_position < len( - self._whole_buffer.text - ) - self._whole_buffer.text = self._whole_buffer.text[1:] - if move_cursor: - self._whole_buffer.cursor_position -= 1 - else: - move_cursor = self._whole_buffer.cursor_position != 0 - self._whole_buffer.text = f"-{self._whole_buffer.text}" - if move_cursor: - self._whole_buffer.cursor_position += 1 - - def _on_whole_text_change(self, buffer: Buffer) -> None: - """Handle event of text changes in buffer.""" - self._whole_width = len(buffer.text) + 1 - self._on_text_change(buffer) - - def _on_integral_text_change(self, buffer: Buffer) -> None: - """Handle event of text changes in buffer.""" - self._integral_width = len(buffer.text) + 1 - self._on_text_change(buffer) - - def _on_text_change(self, buffer: Buffer) -> None: - """Disable replace mode and fix cursor position on text changes.""" - self.buffer_replace = False - if buffer.text and buffer.text != "-": - self.value = self.value - if buffer.text.startswith("-") and buffer.cursor_position == 0: - buffer.cursor_position = 1 - - def _on_cursor_position_change(self, buffer: Buffer) -> None: - """Fix cursor position on cursor movement.""" - if self.focus_buffer.text.startswith("-") and buffer.cursor_position == 0: - buffer.cursor_position = 1 - - @property - def buffer_replace(self) -> bool: - """bool: Current buffer replace mode.""" - if self.focus_buffer == self._whole_buffer: - return self._whole_replace - else: - return self._integral_replace - - @buffer_replace.setter - def buffer_replace(self, value) -> None: - if self.focus_buffer == self._whole_buffer: - self._whole_replace = value - else: - self._integral_replace = value - - @property - def focus_buffer(self) -> Buffer: - """Buffer: Current editable buffer.""" - if self.focus == self._whole_window: - return self._whole_buffer - else: - return self._integral_buffer - - @property - def focus(self) -> Window: - """Window: Current focused window.""" - return self._focus - - @focus.setter - def focus(self, value: Window) -> None: - self._focus = value - self._layout.focus(self._focus) - - @property - def value(self) -> Union[int, float, Decimal]: - """Union[int, float]: The actual value of the prompt, combining and transforming all input buffer values.""" - try: - if not self._float: - return int(self._whole_buffer.text) - else: - return Decimal( - f"{self._whole_buffer.text}.{self._integral_buffer.text if self._integral_buffer.text else 0}" - ) - except ValueError: - self._set_error(self._value_error_message) - return self._default - - @value.setter - def value(self, value: Union[int, float, Decimal]) -> None: - if self._min is not None: - value = max( - value, self._min if not self._float else Decimal(str(self._min)) - ) - if self._max is not None: - value = min( - value, self._max if not self._float else Decimal(str(self._max)) - ) - if not self._float: - self._whole_buffer.text = str(value) - else: - if self._sn_pattern.match(str(value)) is None: - whole_buffer_text, integral_buffer_text = str(value).split(".") - else: - whole_buffer_text, integral_buffer_text = self._fix_sn(str(value)) - - if self._whole_buffer.text: - self._whole_buffer.text = whole_buffer_text - if self._integral_buffer.text: - self._integral_buffer.text = integral_buffer_text diff --git a/voxvera/vendor/InquirerPy/prompts/rawlist.py b/voxvera/vendor/InquirerPy/prompts/rawlist.py deleted file mode 100644 index 0de466d..0000000 --- a/voxvera/vendor/InquirerPy/prompts/rawlist.py +++ /dev/null @@ -1,285 +0,0 @@ -"""Module contains the class to create a rawlist prompt.""" -from typing import Any, Callable, List, Optional, Tuple, Union - -from InquirerPy.base import InquirerPyUIListControl -from InquirerPy.enum import INQUIRERPY_POINTER_SEQUENCE -from InquirerPy.exceptions import InvalidArgument -from InquirerPy.prompts.list import ListPrompt -from InquirerPy.separator import Separator -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyListChoices, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - -__all__ = ["RawlistPrompt"] - - -class InquirerPyRawlistControl(InquirerPyUIListControl): - """An :class:`~prompt_toolkit.layout.UIControl` class that displays a list of choices. - - Reference the parameter definition in :class:`.RawlistPrompt`. - """ - - def __init__( - self, - choices: InquirerPyListChoices, - default: Any, - pointer: str, - separator: str, - marker: str, - session_result: Optional[InquirerPySessionResult], - multiselect: bool, - marker_pl: str, - ) -> None: - self._pointer = pointer - self._separator = separator - self._marker = marker - self._marker_pl = marker_pl - super().__init__( - choices=choices, - default=default, - session_result=session_result, - multiselect=multiselect, - ) - - def _format_choices(self) -> None: - separator_count = 0 - for index, choice in enumerate(self.choices): - if isinstance(choice["value"], Separator): - separator_count += 1 - continue - choice["display_index"] = index + 1 - separator_count - choice["actual_index"] = index - - if self.choices: - first_valid_choice_index = 0 - while isinstance( - self.choices[first_valid_choice_index]["value"], Separator - ): - first_valid_choice_index += 1 - if self.selected_choice_index == first_valid_choice_index: - for choice in self.choices: - if isinstance(choice["value"], Separator): - continue - if choice["display_index"] == self._default: - self.selected_choice_index = choice["actual_index"] - break - - def _get_hover_text(self, choice) -> List[Tuple[str, str]]: - display_choices = [] - display_choices.append(("class:pointer", self._pointer)) - display_choices.append( - ( - "class:marker", - self._marker if choice["enabled"] else self._marker_pl, - ) - ) - if not isinstance(choice["value"], Separator): - display_choices.append( - ( - "class:pointer", - "%s%s" % (str(choice["display_index"]), self._separator), - ) - ) - display_choices.append(("[SetCursorPosition]", "")) - display_choices.append(("class:pointer", choice["name"])) - return display_choices - - def _get_normal_text(self, choice) -> List[Tuple[str, str]]: - display_choices = [] - display_choices.append(("", len(self._pointer) * " ")) - display_choices.append( - ( - "class:marker", - self._marker if choice["enabled"] else self._marker_pl, - ) - ) - if not isinstance(choice["value"], Separator): - display_choices.append( - ("", "%s%s" % (str(choice["display_index"]), self._separator)) - ) - display_choices.append(("", choice["name"])) - else: - display_choices.append(("class:separator", choice["name"])) - return display_choices - - -class RawlistPrompt(ListPrompt): - """Create a prompt that displays a list of choices with index number as shortcuts. - - A wrapper class around :class:`~prompt_toolkit.application.Application`. - - Each choice will have an index number infront of them with keybinding created for that index number. - Enables user to use number to jump to different choices using number. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - choices: List of choices to display and select. - Refer to :ref:`pages/prompts/rawlist:Choices` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default value of the prompt. - This will be used to determine which choice is highlighted (current selection), - The default value should be the value of one of the choices. - For :class:`.RawlistPrompt` specifically, default value can also be value between 0-9. - Refer to :ref:`pages/dynamic:default` documentation for more details. - separator: Separator symbol. Custom symbol that will be used as a separator between the choice index number and the choices. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - pointer: Pointer symbol. Customer symbol that will be used to indicate the current choice selection. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - validate: Add validation to user input. - The main use case for this prompt would be when `multiselect` is True, you can enforce a min/max selection. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - height: Preferred height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - max_height: Max height of the prompt. - Refer to :ref:`pages/height:Height` documentation for more details. - multiselect: Enable multi-selection on choices. - You can use `validate` parameter to control min/max selections. - Setting to True will also change the result from a single value to a list of values. - marker: Marker Symbol. Custom symbol to indicate if a choice is selected. - This will take effects when `multiselect` is True. - marker_pl: Marker place holder when the choice is not selected. - This is empty space by default. - border: Create border around the choice window. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - show_cursor: Display cursor at the end of the prompt. - Set to False to hide the cursor. - cycle: Return to top item if hit bottom during navigation or vice versa. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.rawlist(message="Select one:", choices=[1, 2, 3]).execute() - >>> print(result) - 1 - """ - - def __init__( - self, - message: InquirerPyMessage, - choices: InquirerPyListChoices, - default: InquirerPyDefault = None, - separator: str = ") ", - style: Optional[InquirerPyStyle] = None, - vi_mode: bool = False, - qmark: str = "?", - amark: str = "?", - pointer: str = " ", - instruction: str = "", - long_instruction: str = "", - transformer: Optional[Callable[[Any], Any]] = None, - filter: Optional[Callable[[Any], Any]] = None, - height: Optional[Union[int, str]] = None, - max_height: Optional[Union[int, str]] = None, - multiselect: bool = False, - marker: str = INQUIRERPY_POINTER_SEQUENCE, - marker_pl: str = " ", - border: bool = False, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - keybindings: Optional[InquirerPyKeybindings] = None, - show_cursor: bool = True, - cycle: bool = True, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - ) -> None: - self.content_control = InquirerPyRawlistControl( - choices=choices, - default=default, - pointer=pointer, - separator=separator, - marker=marker, - session_result=session_result, - multiselect=multiselect, - marker_pl=marker_pl, - ) - super().__init__( - message=message, - choices=choices, - style=style, - border=border, - vi_mode=vi_mode, - qmark=qmark, - amark=amark, - instruction=instruction, - long_instruction=long_instruction, - transformer=transformer, - filter=filter, - height=height, - max_height=max_height, - multiselect=multiselect, - validate=validate, - invalid_message=invalid_message, - keybindings=keybindings, - show_cursor=show_cursor, - cycle=cycle, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - ) - - def _on_rendered(self, _) -> None: - """Override this method to apply custom keybindings. - - Needs to creat these kb in the callback due to `after_render` - retrieve the choices asynchronously. - - Check if fetched choices exceed the limit of 9, raise - InvalidArgument exception. - """ - - def keybinding_factory(choice): - @self.register_kb(str(choice["display_index"])) - def keybinding(_) -> None: - self.content_control.selected_choice_index = int(choice["actual_index"]) - - return keybinding - - if self.content_control.choice_count >= 10: - raise InvalidArgument("rawlist argument choices cannot exceed length of 9") - - for choice in self.content_control.choices: - if not isinstance(choice["value"], Separator): - keybinding_factory(choice) - - def _get_prompt_message(self) -> List[Tuple[str, str]]: - """Return the formatted text to display in the prompt. - - Overriding this method to allow multiple formatted class to be displayed. - """ - display_message = super()._get_prompt_message() - if not self.status["answered"] and self.content_control.choices: - display_message.append( - ("class:input", str(self.content_control.selection["display_index"])) - ) - return display_message diff --git a/voxvera/vendor/InquirerPy/prompts/secret.py b/voxvera/vendor/InquirerPy/prompts/secret.py deleted file mode 100644 index cf7f3b2..0000000 --- a/voxvera/vendor/InquirerPy/prompts/secret.py +++ /dev/null @@ -1,134 +0,0 @@ -"""Module contains the class to create a secret prompt.""" -from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple - -from InquirerPy.prompts.input import InputPrompt -from InquirerPy.utils import ( - InquirerPyDefault, - InquirerPyKeybindings, - InquirerPyMessage, - InquirerPySessionResult, - InquirerPyStyle, - InquirerPyValidate, -) - -if TYPE_CHECKING: - from prompt_toolkit.input.base import Input - from prompt_toolkit.output.base import Output - -__all__ = ["SecretPrompt"] - - -class SecretPrompt(InputPrompt): - """Create a text prompt which transforms the input to asterisks while typing. - - A wrapper class around :class:`~prompt_toolkit.shortcuts.PromptSession`. - - Args: - message: The question to ask the user. - Refer to :ref:`pages/dynamic:message` documentation for more details. - style: An :class:`InquirerPyStyle` instance. - Refer to :ref:`Style ` documentation for more details. - vi_mode: Use vim keybinding for the prompt. - Refer to :ref:`pages/kb:Keybindings` documentation for more details. - default: Set the default text value of the prompt. - Refer to :ref:`pages/dynamic:default` documentation for more details. - qmark: Question mark symbol. Custom symbol that will be displayed infront of the question before its answered. - amark: Answer mark symbol. Custom symbol that will be displayed infront of the question after its answered. - instruction: Short instruction to display next to the question. - long_instruction: Long instructions to display at the bottom of the prompt. - validate: Add validation to user input. - Refer to :ref:`pages/validator:Validator` documentation for more details. - invalid_message: Error message to display when user input is invalid. - Refer to :ref:`pages/validator:Validator` documentation for more details. - transformer: A function which performs additional transformation on the value that gets printed to the terminal. - Different than `filter` parameter, this is only visual effect and won’t affect the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:transformer` documentation for more details. - filter: A function which performs additional transformation on the result. - This affects the actual value returned by :meth:`~InquirerPy.base.simple.BaseSimplePrompt.execute`. - Refer to :ref:`pages/dynamic:filter` documentation for more details. - keybindings: Customise the builtin keybindings. - Refer to :ref:`pages/kb:Keybindings` for more details. - wrap_lines: Soft wrap question lines when question exceeds the terminal width. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - mandatory: Indicate if the prompt is mandatory. If True, then the question cannot be skipped. - mandatory_message: Error message to show when user attempts to skip mandatory prompt. - session_result: Used internally for :ref:`index:Classic Syntax (PyInquirer)`. - input: Used internally and will be removed in future updates. - output: Used internally and will be removed in future updates. - - Examples: - >>> from InquirerPy import inquirer - >>> result = inquirer.secret(message="Password:").execute() - >>> print(f"Password: {result}") - Password: asdf123 - """ - - def __init__( - self, - message: InquirerPyMessage, - style: Optional[InquirerPyStyle] = None, - default: InquirerPyDefault = "", - qmark: str = "?", - amark: str = "?", - instruction: str = "", - long_instruction: str = "", - vi_mode: bool = False, - validate: Optional[InquirerPyValidate] = None, - invalid_message: str = "Invalid input", - transformer: Optional[Callable[[str], Any]] = None, - filter: Optional[Callable[[str], Any]] = None, - keybindings: Optional[InquirerPyKeybindings] = None, - wrap_lines: bool = True, - raise_keyboard_interrupt: bool = True, - mandatory: bool = True, - mandatory_message: str = "Mandatory prompt", - session_result: Optional[InquirerPySessionResult] = None, - input: Optional["Input"] = None, - output: Optional["Output"] = None, - ) -> None: - super().__init__( - message=message, - style=style, - vi_mode=vi_mode, - default=default, - qmark=qmark, - amark=amark, - instruction=instruction, - long_instruction=long_instruction, - validate=validate, - invalid_message=invalid_message, - is_password=True, - transformer=transformer, - filter=filter, - keybindings=keybindings, - wrap_lines=wrap_lines, - raise_keyboard_interrupt=raise_keyboard_interrupt, - mandatory=mandatory, - mandatory_message=mandatory_message, - session_result=session_result, - input=input, - output=output, - ) - - def _get_prompt_message(self) -> List[Tuple[str, str]]: - """Get message to display infront of the input buffer. - - Args: - pre_answer: The formatted text to display before answering the question. - post_answer: The formatted text to display after answering the question. - - Returns: - Formatted text in list of tuple format. - """ - pre_answer = ( - "class:instruction", - " %s " % self.instruction if self.instruction else " ", - ) - post_answer = ( - "class:answer", - "" - if not self.status["result"] - else " %s" % "".join(["*" for _ in self.status["result"]]), - ) - return super()._get_prompt_message(pre_answer, post_answer) diff --git a/voxvera/vendor/InquirerPy/py.typed b/voxvera/vendor/InquirerPy/py.typed deleted file mode 100644 index e1d46c5..0000000 --- a/voxvera/vendor/InquirerPy/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. The InquirerPy package uses inline types. diff --git a/voxvera/vendor/InquirerPy/resolver.py b/voxvera/vendor/InquirerPy/resolver.py deleted file mode 100644 index ea409bc..0000000 --- a/voxvera/vendor/InquirerPy/resolver.py +++ /dev/null @@ -1,219 +0,0 @@ -"""This module contains the classic entrypoint for creating prompts. - -A `PyInquirer `_ compatible entrypoint :func:`.prompt`. -""" -from typing import Any, Dict, List, Optional, Tuple, Union - -from InquirerPy.exceptions import InvalidArgument, RequiredKeyNotFound -from InquirerPy.prompts.checkbox import CheckboxPrompt -from InquirerPy.prompts.confirm import ConfirmPrompt -from InquirerPy.prompts.expand import ExpandPrompt -from InquirerPy.prompts.filepath import FilePathPrompt -from InquirerPy.prompts.fuzzy import FuzzyPrompt -from InquirerPy.prompts.input import InputPrompt -from InquirerPy.prompts.list import ListPrompt -from InquirerPy.prompts.number import NumberPrompt -from InquirerPy.prompts.rawlist import RawlistPrompt -from InquirerPy.prompts.secret import SecretPrompt -from InquirerPy.utils import ( - InquirerPyKeybindings, - InquirerPyQuestions, - InquirerPySessionResult, - get_style, -) - -__all__ = ["prompt", "prompt_async"] - -question_mapping = { - "confirm": ConfirmPrompt, - "filepath": FilePathPrompt, - "password": SecretPrompt, - "input": InputPrompt, - "list": ListPrompt, - "checkbox": CheckboxPrompt, - "rawlist": RawlistPrompt, - "expand": ExpandPrompt, - "fuzzy": FuzzyPrompt, - "number": NumberPrompt, -} - - -def _get_questions(questions: InquirerPyQuestions) -> List[Dict[str, Any]]: - """Process and validate questions. - - Args: - questions: List of questions to create prompt. - - Returns: - List of validated questions. - """ - if isinstance(questions, dict): - questions = [questions] - - if not isinstance(questions, list): - raise InvalidArgument("argument questions should be type of list or dictionary") - - return questions - - -def _get_question( - original_question: Dict[str, Any], result: InquirerPySessionResult, index: int -) -> Tuple[Optional[Dict[str, Any]], str, Union[str, int], str]: - """Get information from individual question. - - Args: - original_question: Original question dictionary. - result: Current prompt session result. - index: Question index. - - Returns: - A tuple containing question information in the order of - question dictionary, type of question, name of question, message of question. - """ - question = original_question.copy() - question_type = question.pop("type") - question_name = question.pop("name", index) - message = question.pop("message") - question_when = question.pop("when", None) - if question_when and not question_when(result): - result[question_name] = None - question = None - return question, question_type, question_name, message - - -async def prompt_async( - questions: InquirerPyQuestions, - style: Optional[Dict[str, str]] = None, - vi_mode: bool = False, - raise_keyboard_interrupt: bool = True, - keybindings: Optional[InquirerPyKeybindings] = None, - style_override: bool = True, -) -> InquirerPySessionResult: - """Classic syntax entrypoint to create a prompt session via asynchronous method. - - Refer to :func:`InquirerPy.resolver.prompt` for detailed documentations. - """ - result: InquirerPySessionResult = {} - if not keybindings: - keybindings = {} - - questions = _get_questions(questions=questions) - question_style = get_style(style, style_override) - - for index, original_question in enumerate(questions): - try: - question, question_type, question_name, message = _get_question( - original_question=original_question, result=result, index=index - ) - if question is None: - continue - args = { - "message": message, - "style": question_style, - "vi_mode": vi_mode, - "raise_keyboard_interrupt": raise_keyboard_interrupt, - "session_result": result, - "keybindings": {**keybindings, **question.pop("keybindings", {})}, - } - result[question_name] = await question_mapping[question_type]( - **args, **question - ).execute_async() - except KeyError: - raise RequiredKeyNotFound - - return result - - -def prompt( - questions: InquirerPyQuestions, - style: Optional[Dict[str, str]] = None, - vi_mode: bool = False, - raise_keyboard_interrupt: bool = True, - keybindings: Optional[InquirerPyKeybindings] = None, - style_override: bool = True, -) -> InquirerPySessionResult: - """Classic syntax entrypoint to create a prompt session. - - Resolve user provided list of questions, display prompts and get the results. - - Args: - questions: A list of :ref:`pages/prompt:question` to ask. Refer to documentation for more info. - style: A :class:`dict` containing the style specification for the prompt. Refer to :ref:`pages/style:Style` for more info. - vi_mode: Use vim keybindings for the prompt instead of the default emacs keybindings. - Refer to :ref:`pages/kb:Keybindings` for more info. - raise_keyboard_interrupt: Raise the :class:`KeyboardInterrupt` exception when `ctrl-c` is pressed. If false, the result - will be `None` and the question is skiped. - keybindings: List of custom :ref:`pages/kb:Keybindings` to apply. Refer to documentation for more info. - style_override: Override all default styles. When providing any style customisation, all default styles are removed when this is True. - - Returns: - A dictionary containing all of the question answers. The key is the name of the question and the value is the - user answer. If the `name` key is not present as part of the question, then the question index will be used - as the key. - - Raises: - RequiredKeyNotFound: When the question is missing required keys. - InvalidArgument: When the provided `questions` argument is not a type of :class:`list` nor :class:`dictionary`. - - Examples: - >>> from InquirerPy import prompt - >>> from InquirerPy.validator import NumberValidator - >>> questions = [ - ... { - ... "type": "input", - ... "message": "Enter your age:", - ... "validate": NumberValidator(), - ... "invalid_message": "Input should be number.", - ... "default": "18", - ... "name": "age", - ... "filter": lambda result: int(result), - ... "transformer": lambda result: "Adult" if int(result) >= 18 else "Youth", - ... }, - ... { - ... "type": "rawlist", - ... "message": "What drinks would you like to buy:", - ... "default": 2, - ... "choices": lambda result: ["Soda", "Cidr", "Water", "Milk"] - ... if result["age"] < 18 - ... else ["Wine", "Beer"], - ... "name": "drink", - ... }, - ... { - ... "type": "list", - ... "message": "Would you like a bag:", - ... "choices": ["Yes", "No"], - ... "when": lambda result: result["drink"] in {"Wine", "Beer"}, - ... }, - ... {"type": "confirm", "message": "Confirm?", "default": True}, - ... ] - >>> result = prompt(questions=questions) - """ - result: InquirerPySessionResult = {} - if not keybindings: - keybindings = {} - - questions = _get_questions(questions=questions) - question_style = get_style(style, style_override) - - for index, original_question in enumerate(questions): - try: - question, question_type, question_name, message = _get_question( - original_question=original_question, result=result, index=index - ) - if question is None: - continue - args = { - "message": message, - "style": question_style, - "vi_mode": vi_mode, - "raise_keyboard_interrupt": raise_keyboard_interrupt, - "session_result": result, - "keybindings": {**keybindings, **question.pop("keybindings", {})}, - } - result[question_name] = question_mapping[question_type]( - **args, **question - ).execute() - except KeyError: - raise RequiredKeyNotFound - - return result diff --git a/voxvera/vendor/InquirerPy/separator.py b/voxvera/vendor/InquirerPy/separator.py deleted file mode 100644 index e6d0688..0000000 --- a/voxvera/vendor/InquirerPy/separator.py +++ /dev/null @@ -1,23 +0,0 @@ -"""Module contains the :class:`.Separator` class.""" - - -class Separator: - """A non selectable choice that can be used as part of the choices argument in list type prompts. - - It can be used to create some visual separations between choices in list type prompts. - - Args: - line: Content to display as the separator. - - Example: - >>> from InquirerPy import inquirer - >>> choices = [1, 2, Separator(), 3] - >>> inquirer.select(message="", choices=choices) - """ - - def __init__(self, line: str = 15 * "-") -> None: - self._line = line - - def __str__(self) -> str: - """Create string representation of `Separator`.""" - return self._line diff --git a/voxvera/vendor/InquirerPy/utils.py b/voxvera/vendor/InquirerPy/utils.py deleted file mode 100644 index 8e2b62f..0000000 --- a/voxvera/vendor/InquirerPy/utils.py +++ /dev/null @@ -1,290 +0,0 @@ -"""Module contains shared utility functions and typing aliases.""" -import math -import os -import shutil -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Dict, - List, - NamedTuple, - Optional, - Tuple, - Union, -) - -from prompt_toolkit import print_formatted_text -from prompt_toolkit.application import run_in_terminal -from prompt_toolkit.application.current import get_app -from prompt_toolkit.formatted_text import FormattedText -from prompt_toolkit.styles import Style -from prompt_toolkit.validation import Validator - -from InquirerPy.exceptions import InvalidArgument - -if TYPE_CHECKING: - from prompt_toolkit.filters.base import FilterOrBool - - from InquirerPy.base.control import Choice - -__all__ = [ - "get_style", - "calculate_height", - "InquirerPyStyle", - "patched_print", - "color_print", -] - - -class InquirerPyStyle(NamedTuple): - """`InquirerPy` Style class. - - Used as a helper class to enforce the method `get_style` to be used - while also avoiding :class:`dict` to be passed into prompts. - - Note: - The class is an instance of :class:`typing.NamedTuple`. - - Warning: - You should not directly be using this class besides for type hinting - purposes. Obtain an instance of this class using :func:`.get_style`. - """ - - dict: Dict[str, str] - - -InquirerPySessionResult = Dict[Union[str, int], Optional[Union[str, bool, List[Any]]]] -InquirerPyChoice = Union[List[Any], List["Choice"], List[Dict[str, Any]]] -InquirerPyListChoices = Union[ - Callable[["InquirerPySessionResult"], InquirerPyChoice], - InquirerPyChoice, -] -InquirerPyValidate = Union[Callable[[Any], bool], "Validator"] -InquirerPyQuestions = Union[List[Dict[str, Any]], Dict[str, Any]] -InquirerPyMessage = Union[str, Callable[["InquirerPySessionResult"], str]] -InquirerPyDefault = Union[Any, Callable[["InquirerPySessionResult"], Any]] -InquirerPyKeybindings = Dict[ - str, List[Dict[str, Union[str, "FilterOrBool", List[str]]]] -] - - -def get_style( - style: Optional[Dict[str, str]] = None, style_override: bool = True -) -> InquirerPyStyle: - """Obtain an :class:`.InquirerPyStyle` instance which can be consumed by the `style` parameter in prompts. - - Tip: - This function supports ENV variables. - - For all the color ENV variable names, refer to the :ref:`ENV ` documentation. - - Note: - If no style is provided, then a default theme based on `one dark `_ - color palette is applied. - - Note: - Priority: style parameter -> ENV variable -> default style - - Args: - style: The dictionary of style classes and their colors, If nothing is passed, the style will be resolved to the :ref:`pages/style:Default Style`. - style_override: A boolean to determine if the supplied `style` parameter should be merged with the :ref:`pages/style:Default Style` or override them. - By default, the supplied style will overwrite the :ref:`pages/style:Default Style`. - - Returns: - An instance of :class:`.InquirerPyStyle`. - - Examples: - >>> from InquirerPy import get_style - >>> from InquirerPy import inquirer - >>> style = get_style({"questionmark": "#ffffff", "answer": "#000000"}, style_override=False) - >>> result = inquirer.confirm(message="Confirm?", style=style).execute() - """ - if not style_override or style is None: - if not style: - style = {} - result = { - "questionmark": os.getenv("INQUIRERPY_STYLE_QUESTIONMARK", "#e5c07b"), - "answermark": os.getenv("INQUIRERPY_STYLE_ANSWERMARK", "#e5c07b"), - "answer": os.getenv("INQUIRERPY_STYLE_ANSWER", "#61afef"), - "input": os.getenv("INQUIRERPY_STYLE_INPUT", "#98c379"), - "question": os.getenv("INQUIRERPY_STYLE_QUESTION", ""), - "answered_question": os.getenv("INQUIRERPY_STYLE_ANSWERED_QUESTION", ""), - "instruction": os.getenv("INQUIRERPY_STYLE_INSTRUCTION", "#abb2bf"), - "long_instruction": os.getenv( - "INQUIRERPY_STYLE_LONG_INSTRUCTION", "#abb2bf" - ), - "pointer": os.getenv("INQUIRERPY_STYLE_POINTER", "#61afef"), - "checkbox": os.getenv("INQUIRERPY_STYLE_CHECKBOX", "#98c379"), - "separator": os.getenv("INQUIRERPY_STYLE_SEPARATOR", ""), - "skipped": os.getenv("INQUIRERPY_STYLE_SKIPPED", "#5c6370"), - "validator": os.getenv("INQUIRERPY_STYLE_VALIDATOR", ""), - "marker": os.getenv("INQUIRERPY_STYLE_MARKER", "#e5c07b"), - "fuzzy_prompt": os.getenv("INQUIRERPY_STYLE_FUZZY_PROMPT", "#c678dd"), - "fuzzy_info": os.getenv("INQUIRERPY_STYLE_FUZZY_INFO", "#abb2bf"), - "fuzzy_border": os.getenv("INQUIRERPY_STYLE_FUZZY_BORDER", "#4b5263"), - "fuzzy_match": os.getenv("INQUIRERPY_STYLE_FUZZY_MATCH", "#c678dd"), - "spinner_pattern": os.getenv("INQUIRERPY_STYLE_SPINNER_PATTERN", "#e5c07b"), - "spinner_text": os.getenv("INQUIRERPY_STYLE_SPINNER_TEXT", ""), - **style, - } - else: - result = { - "questionmark": os.getenv("INQUIRERPY_STYLE_QUESTIONMARK", ""), - "answermark": os.getenv("INQUIRERPY_STYLE_ANSWERMARK", ""), - "answer": os.getenv("INQUIRERPY_STYLE_ANSWER", ""), - "input": os.getenv("INQUIRERPY_STYLE_INPUT", ""), - "question": os.getenv("INQUIRERPY_STYLE_QUESTION", ""), - "answered_question": os.getenv("INQUIRERPY_STYLE_ANSWERED_QUESTION", ""), - "instruction": os.getenv("INQUIRERPY_STYLE_INSTRUCTION", ""), - "long_instruction": os.getenv("INQUIRERPY_STYLE_LONG_INSTRUCTION", ""), - "pointer": os.getenv("INQUIRERPY_STYLE_POINTER", ""), - "checkbox": os.getenv("INQUIRERPY_STYLE_CHECKBOX", ""), - "separator": os.getenv("INQUIRERPY_STYLE_SEPARATOR", ""), - "skipped": os.getenv("INQUIRERPY_STYLE_SKIPPED", ""), - "validator": os.getenv("INQUIRERPY_STYLE_VALIDATOR", ""), - "marker": os.getenv("INQUIRERPY_STYLE_MARKER", ""), - "fuzzy_prompt": os.getenv("INQUIRERPY_STYLE_FUZZY_PROMPT", ""), - "fuzzy_info": os.getenv("INQUIRERPY_STYLE_FUZZY_INFO", ""), - "fuzzy_border": os.getenv("INQUIRERPY_STYLE_FUZZY_BORDER", ""), - "fuzzy_match": os.getenv("INQUIRERPY_STYLE_FUZZY_MATCH", ""), - "spinner_pattern": os.getenv("INQUIRERPY_STYLE_SPINNER_PATTERN", ""), - "spinner_text": os.getenv("INQUIRERPY_STYLE_SPINNER_TEXT", ""), - **style, - } - - if result.get("fuzzy_border"): - result["frame.border"] = result.pop("fuzzy_border") - if result.get("validator"): - result["validation-toolbar"] = result.pop("validator") - result["bottom-toolbar"] = "noreverse" - return InquirerPyStyle(result) - - -def calculate_height( - height: Optional[Union[int, str]], - max_height: Optional[Union[int, str]], - height_offset: int = 2, -) -> Tuple[Optional[int], int]: - """Calculate the `height` and `max_height` for the main question contents. - - Tip: - The parameter `height`/`max_height` can be specified by either a :class:`string` or :class:`int`. - - When `height`/`max_height` is :class:`str`: - It will set the height to a percentage based on the value provided. - You can optionally add the '%' sign which will be ignored while processing. - - Example: "60%" or "60" (60% of the current terminal visible lines) - - When `height`/`max_height` is :class:`int`: - It will set the height to exact number of lines based on the value provided. - - Example: 20 (20 lines in terminal) - - Note: - If `max_height` is not provided or is None, the default `max_height` will be configured to `70%` for - best visual presentation in the terminal. - - Args: - height: The desired height in either percentage as string or exact value as int. - max_height: Maximum acceptable height in either percentage as string or exact value as int. - height_offset: Height offset to apply to the height. - - Returns: - A :class:`tuple` with the first value being the desired height and the second value being - the maximum height. - - Raises: - InvalidArgument: The provided `height`/`max_height` is not able to to be converted to int. - - Examples: - >>> calculate_height(height="60%", max_height="100%") - """ - try: - _, term_lines = shutil.get_terminal_size() - term_lines = term_lines - if not height: - dimmension_height = None - else: - if isinstance(height, str): - height = height.replace("%", "") - height = int(height) - dimmension_height = ( - math.floor(term_lines * (height / 100)) - height_offset - ) - else: - dimmension_height = height - - if not max_height: - max_height = "70%" if not height else "100%" - if isinstance(max_height, str): - max_height = max_height.replace("%", "") - max_height = int(max_height) - dimmension_max_height = ( - math.floor(term_lines * (max_height / 100)) - height_offset - ) - else: - dimmension_max_height = max_height - - if dimmension_height and dimmension_height > dimmension_max_height: - dimmension_height = dimmension_max_height - if dimmension_height and dimmension_height <= 0: - dimmension_height = 1 - if dimmension_max_height <= 0: - dimmension_max_height = 1 - return dimmension_height, dimmension_max_height - - except ValueError: - raise InvalidArgument( - "prompt argument height/max_height needs to be type of an int or str" - ) - - -def patched_print(*values) -> None: - """Patched :func:`print` that can print values without interrupting the prompt. - - See Also: - :func:`print` - :func:`~prompt_toolkit.application.run_in_terminal` - - Args: - *values: Refer to :func:`print`. - - Examples: - >>> patched_print("Hello World") - """ - - def _print(): - print(*values) - - run_in_terminal(_print) - - -def color_print( - formatted_text: List[Tuple[str, str]], style: Optional[Dict[str, str]] = None -) -> None: - """Print colored text leveraging :func:`~prompt_toolkit.shortcuts.print_formatted_text`. - - This function automatically handles printing the text without interrupting the - current prompt. - - Args: - formatted_text: A list of formatted_text. - style: Style to apply to `formatted_text` in :class:`dictionary` form. - - Example: - >>> color_print(formatted_text=[("class:aa", "hello "), ("class:bb", "world")], style={"aa": "red", "bb": "blue"}) - >>> color_print([("red", "yes"), ("", " "), ("blue", "no")]) - """ - - def _print(): - print_formatted_text( - FormattedText(formatted_text), - style=Style.from_dict(style) if style else None, - ) - - if get_app().is_running: - run_in_terminal(_print) - else: - _print() diff --git a/voxvera/vendor/InquirerPy/validator.py b/voxvera/vendor/InquirerPy/validator.py deleted file mode 100644 index aece4fd..0000000 --- a/voxvera/vendor/InquirerPy/validator.py +++ /dev/null @@ -1,165 +0,0 @@ -"""Module contains pre-built validators.""" -import re -from pathlib import Path -from typing import Optional - -from prompt_toolkit.validation import ValidationError, Validator - -__all__ = [ - "PathValidator", - "EmptyInputValidator", - "PasswordValidator", - "NumberValidator", -] - - -class NumberValidator(Validator): - """:class:`~prompt_toolkit.validation.Validator` to validate if input is a number. - - Args: - message: Error message to display in the validatation toolbar when validation failed. - float_allowed: Allow input to contain floating number (with decimal). - """ - - def __init__( - self, message: str = "Input should be a number", float_allowed: bool = False - ) -> None: - self._message = message - self._float_allowed = float_allowed - - def validate(self, document) -> None: - """Check if user input is a valid number. - - This method is used internally by `prompt_toolkit `_. - - See Also: - https://python-prompt-toolkit.readthedocs.io/en/master/pages/asking_for_input.html?highlight=validator#input-validation - """ - try: - if self._float_allowed: - float(document.text) - else: - int(document.text) - except ValueError: - raise ValidationError( - message=self._message, cursor_position=document.cursor_position - ) - - -class PathValidator(Validator): - """:class:`~prompt_toolkit.validation.Validator` to validate if input is a valid filepath on the system. - - Args: - message: Error message to display in the validatation toolbar when validation failed. - is_file: Explicitly check if the input is a valid file on the system. - is_dir: Explicitly check if the input is a valid directory/folder on the system. - """ - - def __init__( - self, - message: str = "Input is not a valid path", - is_file: bool = False, - is_dir: bool = False, - ) -> None: - self._message = message - self._is_file = is_file - self._is_dir = is_dir - - def validate(self, document) -> None: - """Check if user input is a filepath that exists on the system based on conditions. - - This method is used internally by `prompt_toolkit `_. - - See Also: - https://python-prompt-toolkit.readthedocs.io/en/master/pages/asking_for_input.html?highlight=validator#input-validation - """ - path = Path(document.text).expanduser() - if self._is_file and not path.is_file(): - raise ValidationError( - message=self._message, - cursor_position=document.cursor_position, - ) - elif self._is_dir and not path.is_dir(): - raise ValidationError( - message=self._message, - cursor_position=document.cursor_position, - ) - elif not path.exists(): - raise ValidationError( - message=self._message, - cursor_position=document.cursor_position, - ) - - -class EmptyInputValidator(Validator): - """:class:`~prompt_toolkit.validation.Validator` to validate if the input is empty. - - Args: - message: Error message to display in the validatation toolbar when validation failed. - """ - - def __init__(self, message: str = "Input cannot be empty") -> None: - self._message = message - - def validate(self, document) -> None: - """Check if user input is empty. - - This method is used internally by `prompt_toolkit `_. - - See Also: - https://python-prompt-toolkit.readthedocs.io/en/master/pages/asking_for_input.html?highlight=validator#input-validation - """ - if not len(document.text) > 0: - raise ValidationError( - message=self._message, - cursor_position=document.cursor_position, - ) - - -class PasswordValidator(Validator): - """:class:`~prompt_toolkit.validation.Validator` to validate password compliance. - - Args: - message: Error message to display in the validatation toolbar when validation failed. - length: The minimum length of the password. - cap: Password should include at least one capital letter. - special: Password should include at least one special char "@$!%*#?&". - number: Password should include at least one number. - """ - - def __init__( - self, - message: str = "Input is not compliant with the password constraints", - length: Optional[int] = None, - cap: bool = False, - special: bool = False, - number: bool = False, - ) -> None: - password_pattern = r"^" - if cap: - password_pattern += r"(?=.*[A-Z])" - if special: - password_pattern += r"(?=.*[@$!%*#?&])" - if number: - password_pattern += r"(?=.*[0-9])" - password_pattern += r"." - if length: - password_pattern += r"{%s,}" % length - else: - password_pattern += r"*" - password_pattern += r"$" - self._re = re.compile(password_pattern) - self._message = message - - def validate(self, document) -> None: - """Check if user input is compliant with the specified password constraints. - - This method is used internally by `prompt_toolkit `_. - - See Also: - https://python-prompt-toolkit.readthedocs.io/en/master/pages/asking_for_input.html?highlight=validator#input-validation - """ - if not self._re.match(document.text): - raise ValidationError( - message=self._message, cursor_position=document.cursor_position - ) diff --git a/voxvera/vendor/PIL/AvifImagePlugin.py b/voxvera/vendor/PIL/AvifImagePlugin.py deleted file mode 100644 index 43c39a9..0000000 --- a/voxvera/vendor/PIL/AvifImagePlugin.py +++ /dev/null @@ -1,293 +0,0 @@ -from __future__ import annotations - -import os -from io import BytesIO -from typing import IO - -from . import ExifTags, Image, ImageFile - -try: - from . import _avif - - SUPPORTED = True -except ImportError: - SUPPORTED = False - -# Decoder options as module globals, until there is a way to pass parameters -# to Image.open (see https://github.com/python-pillow/Pillow/issues/569) -DECODE_CODEC_CHOICE = "auto" -DEFAULT_MAX_THREADS = 0 - - -def get_codec_version(codec_name: str) -> str | None: - versions = _avif.codec_versions() - for version in versions.split(", "): - if version.split(" [")[0] == codec_name: - return version.split(":")[-1].split(" ")[0] - return None - - -def _accept(prefix: bytes) -> bool | str: - if prefix[4:8] != b"ftyp": - return False - major_brand = prefix[8:12] - if major_brand in ( - # coding brands - b"avif", - b"avis", - # We accept files with AVIF container brands; we can't yet know if - # the ftyp box has the correct compatible brands, but if it doesn't - # then the plugin will raise a SyntaxError which Pillow will catch - # before moving on to the next plugin that accepts the file. - # - # Also, because this file might not actually be an AVIF file, we - # don't raise an error if AVIF support isn't properly compiled. - b"mif1", - b"msf1", - ): - if not SUPPORTED: - return ( - "image file could not be identified because AVIF support not installed" - ) - return True - return False - - -def _get_default_max_threads() -> int: - if DEFAULT_MAX_THREADS: - return DEFAULT_MAX_THREADS - if hasattr(os, "sched_getaffinity"): - return len(os.sched_getaffinity(0)) - else: - return os.cpu_count() or 1 - - -class AvifImageFile(ImageFile.ImageFile): - format = "AVIF" - format_description = "AVIF image" - __frame = -1 - - def _open(self) -> None: - if not SUPPORTED: - msg = "image file could not be opened because AVIF support not installed" - raise SyntaxError(msg) - - if DECODE_CODEC_CHOICE != "auto" and not _avif.decoder_codec_available( - DECODE_CODEC_CHOICE - ): - msg = "Invalid opening codec" - raise ValueError(msg) - - assert self.fp is not None - self._decoder = _avif.AvifDecoder( - self.fp.read(), - DECODE_CODEC_CHOICE, - _get_default_max_threads(), - ) - - # Get info from decoder - self._size, self.n_frames, self._mode, icc, exif, exif_orientation, xmp = ( - self._decoder.get_info() - ) - self.is_animated = self.n_frames > 1 - - if icc: - self.info["icc_profile"] = icc - if xmp: - self.info["xmp"] = xmp - - if exif_orientation != 1 or exif: - exif_data = Image.Exif() - if exif: - exif_data.load(exif) - original_orientation = exif_data.get(ExifTags.Base.Orientation, 1) - else: - original_orientation = 1 - if exif_orientation != original_orientation: - exif_data[ExifTags.Base.Orientation] = exif_orientation - exif = exif_data.tobytes() - if exif: - self.info["exif"] = exif - self.seek(0) - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - - # Set tile - self.__frame = frame - self.tile = [ImageFile._Tile("raw", (0, 0) + self.size, 0, self.mode)] - - def load(self) -> Image.core.PixelAccess | None: - if self.tile: - # We need to load the image data for this frame - data, timescale, pts_in_timescales, duration_in_timescales = ( - self._decoder.get_frame(self.__frame) - ) - self.info["timestamp"] = round(1000 * (pts_in_timescales / timescale)) - self.info["duration"] = round(1000 * (duration_in_timescales / timescale)) - - if self.fp and self._exclusive_fp: - self.fp.close() - self.fp = BytesIO(data) - - return super().load() - - def load_seek(self, pos: int) -> None: - pass - - def tell(self) -> int: - return self.__frame - - -def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - _save(im, fp, filename, save_all=True) - - -def _save( - im: Image.Image, fp: IO[bytes], filename: str | bytes, save_all: bool = False -) -> None: - info = im.encoderinfo.copy() - if save_all: - append_images = list(info.get("append_images", [])) - else: - append_images = [] - - total = 0 - for ims in [im] + append_images: - total += getattr(ims, "n_frames", 1) - - quality = info.get("quality", 75) - if not isinstance(quality, int) or quality < 0 or quality > 100: - msg = "Invalid quality setting" - raise ValueError(msg) - - duration = info.get("duration", 0) - subsampling = info.get("subsampling", "4:2:0") - speed = info.get("speed", 6) - max_threads = info.get("max_threads", _get_default_max_threads()) - codec = info.get("codec", "auto") - if codec != "auto" and not _avif.encoder_codec_available(codec): - msg = "Invalid saving codec" - raise ValueError(msg) - range_ = info.get("range", "full") - tile_rows_log2 = info.get("tile_rows", 0) - tile_cols_log2 = info.get("tile_cols", 0) - alpha_premultiplied = bool(info.get("alpha_premultiplied", False)) - autotiling = bool(info.get("autotiling", tile_rows_log2 == tile_cols_log2 == 0)) - - icc_profile = info.get("icc_profile", im.info.get("icc_profile")) - exif_orientation = 1 - if exif := info.get("exif"): - if isinstance(exif, Image.Exif): - exif_data = exif - else: - exif_data = Image.Exif() - exif_data.load(exif) - if ExifTags.Base.Orientation in exif_data: - exif_orientation = exif_data.pop(ExifTags.Base.Orientation) - exif = exif_data.tobytes() if exif_data else b"" - elif isinstance(exif, Image.Exif): - exif = exif_data.tobytes() - - xmp = info.get("xmp") - - if isinstance(xmp, str): - xmp = xmp.encode("utf-8") - - advanced = info.get("advanced") - if advanced is not None: - if isinstance(advanced, dict): - advanced = advanced.items() - try: - advanced = tuple(advanced) - except TypeError: - invalid = True - else: - invalid = any(not isinstance(v, tuple) or len(v) != 2 for v in advanced) - if invalid: - msg = ( - "advanced codec options must be a dict of key-value string " - "pairs or a series of key-value two-tuples" - ) - raise ValueError(msg) - - # Setup the AVIF encoder - enc = _avif.AvifEncoder( - im.size, - subsampling, - quality, - speed, - max_threads, - codec, - range_, - tile_rows_log2, - tile_cols_log2, - alpha_premultiplied, - autotiling, - icc_profile or b"", - exif or b"", - exif_orientation, - xmp or b"", - advanced, - ) - - # Add each frame - frame_idx = 0 - frame_duration = 0 - cur_idx = im.tell() - is_single_frame = total == 1 - try: - for ims in [im] + append_images: - # Get number of frames in this image - nfr = getattr(ims, "n_frames", 1) - - for idx in range(nfr): - ims.seek(idx) - - # Make sure image mode is supported - frame = ims - rawmode = ims.mode - if ims.mode not in {"RGB", "RGBA"}: - rawmode = "RGBA" if ims.has_transparency_data else "RGB" - frame = ims.convert(rawmode) - - # Update frame duration - if isinstance(duration, (list, tuple)): - frame_duration = duration[frame_idx] - else: - frame_duration = duration - - # Append the frame to the animation encoder - enc.add( - frame.tobytes("raw", rawmode), - frame_duration, - frame.size, - rawmode, - is_single_frame, - ) - - # Update frame index - frame_idx += 1 - - if not save_all: - break - - finally: - im.seek(cur_idx) - - # Get the final output from the encoder - data = enc.finish() - if data is None: - msg = "cannot write file as AVIF (encoder returned None)" - raise OSError(msg) - - fp.write(data) - - -Image.register_open(AvifImageFile.format, AvifImageFile, _accept) -if SUPPORTED: - Image.register_save(AvifImageFile.format, _save) - Image.register_save_all(AvifImageFile.format, _save_all) - Image.register_extensions(AvifImageFile.format, [".avif", ".avifs"]) - Image.register_mime(AvifImageFile.format, "image/avif") diff --git a/voxvera/vendor/PIL/BdfFontFile.py b/voxvera/vendor/PIL/BdfFontFile.py deleted file mode 100644 index f175e2f..0000000 --- a/voxvera/vendor/PIL/BdfFontFile.py +++ /dev/null @@ -1,122 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# bitmap distribution font (bdf) file parser -# -# history: -# 1996-05-16 fl created (as bdf2pil) -# 1997-08-25 fl converted to FontFile driver -# 2001-05-25 fl removed bogus __init__ call -# 2002-11-20 fl robustification (from Kevin Cazabon, Dmitry Vasiliev) -# 2003-04-22 fl more robustification (from Graham Dumpleton) -# -# Copyright (c) 1997-2003 by Secret Labs AB. -# Copyright (c) 1997-2003 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# - -""" -Parse X Bitmap Distribution Format (BDF) -""" -from __future__ import annotations - -from typing import BinaryIO - -from . import FontFile, Image - - -def bdf_char( - f: BinaryIO, -) -> ( - tuple[ - str, - int, - tuple[tuple[int, int], tuple[int, int, int, int], tuple[int, int, int, int]], - Image.Image, - ] - | None -): - # skip to STARTCHAR - while True: - s = f.readline() - if not s: - return None - if s.startswith(b"STARTCHAR"): - break - id = s[9:].strip().decode("ascii") - - # load symbol properties - props = {} - while True: - s = f.readline() - if not s or s.startswith(b"BITMAP"): - break - i = s.find(b" ") - props[s[:i].decode("ascii")] = s[i + 1 : -1].decode("ascii") - - # load bitmap - bitmap = bytearray() - while True: - s = f.readline() - if not s or s.startswith(b"ENDCHAR"): - break - bitmap += s[:-1] - - # The word BBX - # followed by the width in x (BBw), height in y (BBh), - # and x and y displacement (BBxoff0, BByoff0) - # of the lower left corner from the origin of the character. - width, height, x_disp, y_disp = (int(p) for p in props["BBX"].split()) - - # The word DWIDTH - # followed by the width in x and y of the character in device pixels. - dwx, dwy = (int(p) for p in props["DWIDTH"].split()) - - bbox = ( - (dwx, dwy), - (x_disp, -y_disp - height, width + x_disp, -y_disp), - (0, 0, width, height), - ) - - try: - im = Image.frombytes("1", (width, height), bitmap, "hex", "1") - except ValueError: - # deal with zero-width characters - im = Image.new("1", (width, height)) - - return id, int(props["ENCODING"]), bbox, im - - -class BdfFontFile(FontFile.FontFile): - """Font file plugin for the X11 BDF format.""" - - def __init__(self, fp: BinaryIO) -> None: - super().__init__() - - s = fp.readline() - if not s.startswith(b"STARTFONT 2.1"): - msg = "not a valid BDF file" - raise SyntaxError(msg) - - props = {} - comments = [] - - while True: - s = fp.readline() - if not s or s.startswith(b"ENDPROPERTIES"): - break - i = s.find(b" ") - props[s[:i].decode("ascii")] = s[i + 1 : -1].decode("ascii") - if s[:i] in [b"COMMENT", b"COPYRIGHT"]: - if s.find(b"LogicalFontDescription") < 0: - comments.append(s[i + 1 : -1].decode("ascii")) - - while True: - c = bdf_char(fp) - if not c: - break - id, ch, (xy, dst, src), im = c - if 0 <= ch < len(self.glyph): - self.glyph[ch] = xy, dst, src, im diff --git a/voxvera/vendor/PIL/BlpImagePlugin.py b/voxvera/vendor/PIL/BlpImagePlugin.py deleted file mode 100644 index 6bb92ed..0000000 --- a/voxvera/vendor/PIL/BlpImagePlugin.py +++ /dev/null @@ -1,498 +0,0 @@ -""" -Blizzard Mipmap Format (.blp) -Jerome Leclanche - -The contents of this file are hereby released in the public domain (CC0) -Full text of the CC0 license: - https://creativecommons.org/publicdomain/zero/1.0/ - -BLP1 files, used mostly in Warcraft III, are not fully supported. -All types of BLP2 files used in World of Warcraft are supported. - -The BLP file structure consists of a header, up to 16 mipmaps of the -texture - -Texture sizes must be powers of two, though the two dimensions do -not have to be equal; 512x256 is valid, but 512x200 is not. -The first mipmap (mipmap #0) is the full size image; each subsequent -mipmap halves both dimensions. The final mipmap should be 1x1. - -BLP files come in many different flavours: -* JPEG-compressed (type == 0) - only supported for BLP1. -* RAW images (type == 1, encoding == 1). Each mipmap is stored as an - array of 8-bit values, one per pixel, left to right, top to bottom. - Each value is an index to the palette. -* DXT-compressed (type == 1, encoding == 2): -- DXT1 compression is used if alpha_encoding == 0. - - An additional alpha bit is used if alpha_depth == 1. - - DXT3 compression is used if alpha_encoding == 1. - - DXT5 compression is used if alpha_encoding == 7. -""" - -from __future__ import annotations - -import abc -import os -import struct -from enum import IntEnum -from io import BytesIO -from typing import IO - -from . import Image, ImageFile - - -class Format(IntEnum): - JPEG = 0 - - -class Encoding(IntEnum): - UNCOMPRESSED = 1 - DXT = 2 - UNCOMPRESSED_RAW_BGRA = 3 - - -class AlphaEncoding(IntEnum): - DXT1 = 0 - DXT3 = 1 - DXT5 = 7 - - -def unpack_565(i: int) -> tuple[int, int, int]: - return ((i >> 11) & 0x1F) << 3, ((i >> 5) & 0x3F) << 2, (i & 0x1F) << 3 - - -def decode_dxt1( - data: bytes, alpha: bool = False -) -> tuple[bytearray, bytearray, bytearray, bytearray]: - """ - input: one "row" of data (i.e. will produce 4*width pixels) - """ - - blocks = len(data) // 8 # number of blocks in row - ret = (bytearray(), bytearray(), bytearray(), bytearray()) - - for block_index in range(blocks): - # Decode next 8-byte block. - idx = block_index * 8 - color0, color1, bits = struct.unpack_from("> 2 - - a = 0xFF - if control == 0: - r, g, b = r0, g0, b0 - elif control == 1: - r, g, b = r1, g1, b1 - elif control == 2: - if color0 > color1: - r = (2 * r0 + r1) // 3 - g = (2 * g0 + g1) // 3 - b = (2 * b0 + b1) // 3 - else: - r = (r0 + r1) // 2 - g = (g0 + g1) // 2 - b = (b0 + b1) // 2 - elif control == 3: - if color0 > color1: - r = (2 * r1 + r0) // 3 - g = (2 * g1 + g0) // 3 - b = (2 * b1 + b0) // 3 - else: - r, g, b, a = 0, 0, 0, 0 - - if alpha: - ret[j].extend([r, g, b, a]) - else: - ret[j].extend([r, g, b]) - - return ret - - -def decode_dxt3(data: bytes) -> tuple[bytearray, bytearray, bytearray, bytearray]: - """ - input: one "row" of data (i.e. will produce 4*width pixels) - """ - - blocks = len(data) // 16 # number of blocks in row - ret = (bytearray(), bytearray(), bytearray(), bytearray()) - - for block_index in range(blocks): - idx = block_index * 16 - block = data[idx : idx + 16] - # Decode next 16-byte block. - bits = struct.unpack_from("<8B", block) - color0, color1 = struct.unpack_from(">= 4 - else: - high = True - a &= 0xF - a *= 17 # We get a value between 0 and 15 - - color_code = (code >> 2 * (4 * j + i)) & 0x03 - - if color_code == 0: - r, g, b = r0, g0, b0 - elif color_code == 1: - r, g, b = r1, g1, b1 - elif color_code == 2: - r = (2 * r0 + r1) // 3 - g = (2 * g0 + g1) // 3 - b = (2 * b0 + b1) // 3 - elif color_code == 3: - r = (2 * r1 + r0) // 3 - g = (2 * g1 + g0) // 3 - b = (2 * b1 + b0) // 3 - - ret[j].extend([r, g, b, a]) - - return ret - - -def decode_dxt5(data: bytes) -> tuple[bytearray, bytearray, bytearray, bytearray]: - """ - input: one "row" of data (i.e. will produce 4 * width pixels) - """ - - blocks = len(data) // 16 # number of blocks in row - ret = (bytearray(), bytearray(), bytearray(), bytearray()) - - for block_index in range(blocks): - idx = block_index * 16 - block = data[idx : idx + 16] - # Decode next 16-byte block. - a0, a1 = struct.unpack_from("> alphacode_index) & 0x07 - elif alphacode_index == 15: - alphacode = (alphacode2 >> 15) | ((alphacode1 << 1) & 0x06) - else: # alphacode_index >= 18 and alphacode_index <= 45 - alphacode = (alphacode1 >> (alphacode_index - 16)) & 0x07 - - if alphacode == 0: - a = a0 - elif alphacode == 1: - a = a1 - elif a0 > a1: - a = ((8 - alphacode) * a0 + (alphacode - 1) * a1) // 7 - elif alphacode == 6: - a = 0 - elif alphacode == 7: - a = 255 - else: - a = ((6 - alphacode) * a0 + (alphacode - 1) * a1) // 5 - - color_code = (code >> 2 * (4 * j + i)) & 0x03 - - if color_code == 0: - r, g, b = r0, g0, b0 - elif color_code == 1: - r, g, b = r1, g1, b1 - elif color_code == 2: - r = (2 * r0 + r1) // 3 - g = (2 * g0 + g1) // 3 - b = (2 * b0 + b1) // 3 - elif color_code == 3: - r = (2 * r1 + r0) // 3 - g = (2 * g1 + g0) // 3 - b = (2 * b1 + b0) // 3 - - ret[j].extend([r, g, b, a]) - - return ret - - -class BLPFormatError(NotImplementedError): - pass - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith((b"BLP1", b"BLP2")) - - -class BlpImageFile(ImageFile.ImageFile): - """ - Blizzard Mipmap Format - """ - - format = "BLP" - format_description = "Blizzard Mipmap Format" - - def _open(self) -> None: - assert self.fp is not None - self.magic = self.fp.read(4) - if not _accept(self.magic): - msg = f"Bad BLP magic {repr(self.magic)}" - raise BLPFormatError(msg) - - compression = struct.unpack(" tuple[int, int]: - try: - self._read_header() - self._load() - except struct.error as e: - msg = "Truncated BLP file" - raise OSError(msg) from e - return -1, 0 - - @abc.abstractmethod - def _load(self) -> None: - pass - - def _read_header(self) -> None: - self._offsets = struct.unpack("<16I", self._safe_read(16 * 4)) - self._lengths = struct.unpack("<16I", self._safe_read(16 * 4)) - - def _safe_read(self, length: int) -> bytes: - assert self.fd is not None - return ImageFile._safe_read(self.fd, length) - - def _read_palette(self) -> list[tuple[int, int, int, int]]: - ret = [] - for i in range(256): - try: - b, g, r, a = struct.unpack("<4B", self._safe_read(4)) - except struct.error: - break - ret.append((b, g, r, a)) - return ret - - def _read_bgra( - self, palette: list[tuple[int, int, int, int]], alpha: bool - ) -> bytearray: - data = bytearray() - _data = BytesIO(self._safe_read(self._lengths[0])) - while True: - try: - (offset,) = struct.unpack(" None: - self._compression, self._encoding, alpha = self.args - - if self._compression == Format.JPEG: - self._decode_jpeg_stream() - - elif self._compression == 1: - if self._encoding in (4, 5): - palette = self._read_palette() - data = self._read_bgra(palette, alpha) - self.set_as_raw(data) - else: - msg = f"Unsupported BLP encoding {repr(self._encoding)}" - raise BLPFormatError(msg) - else: - msg = f"Unsupported BLP compression {repr(self._encoding)}" - raise BLPFormatError(msg) - - def _decode_jpeg_stream(self) -> None: - from .JpegImagePlugin import JpegImageFile - - (jpeg_header_size,) = struct.unpack(" None: - self._compression, self._encoding, alpha, self._alpha_encoding = self.args - - palette = self._read_palette() - - assert self.fd is not None - self.fd.seek(self._offsets[0]) - - if self._compression == 1: - # Uncompressed or DirectX compression - - if self._encoding == Encoding.UNCOMPRESSED: - data = self._read_bgra(palette, alpha) - - elif self._encoding == Encoding.DXT: - data = bytearray() - if self._alpha_encoding == AlphaEncoding.DXT1: - linesize = (self.state.xsize + 3) // 4 * 8 - for yb in range((self.state.ysize + 3) // 4): - for d in decode_dxt1(self._safe_read(linesize), alpha): - data += d - - elif self._alpha_encoding == AlphaEncoding.DXT3: - linesize = (self.state.xsize + 3) // 4 * 16 - for yb in range((self.state.ysize + 3) // 4): - for d in decode_dxt3(self._safe_read(linesize)): - data += d - - elif self._alpha_encoding == AlphaEncoding.DXT5: - linesize = (self.state.xsize + 3) // 4 * 16 - for yb in range((self.state.ysize + 3) // 4): - for d in decode_dxt5(self._safe_read(linesize)): - data += d - else: - msg = f"Unsupported alpha encoding {repr(self._alpha_encoding)}" - raise BLPFormatError(msg) - else: - msg = f"Unknown BLP encoding {repr(self._encoding)}" - raise BLPFormatError(msg) - - else: - msg = f"Unknown BLP compression {repr(self._compression)}" - raise BLPFormatError(msg) - - self.set_as_raw(data) - - -class BLPEncoder(ImageFile.PyEncoder): - _pushes_fd = True - - def _write_palette(self) -> bytes: - data = b"" - assert self.im is not None - palette = self.im.getpalette("RGBA", "RGBA") - for i in range(len(palette) // 4): - r, g, b, a = palette[i * 4 : (i + 1) * 4] - data += struct.pack("<4B", b, g, r, a) - while len(data) < 256 * 4: - data += b"\x00" * 4 - return data - - def encode(self, bufsize: int) -> tuple[int, int, bytes]: - palette_data = self._write_palette() - - offset = 20 + 16 * 4 * 2 + len(palette_data) - data = struct.pack("<16I", offset, *((0,) * 15)) - - assert self.im is not None - w, h = self.im.size - data += struct.pack("<16I", w * h, *((0,) * 15)) - - data += palette_data - - for y in range(h): - for x in range(w): - data += struct.pack(" None: - if im.mode != "P": - msg = "Unsupported BLP image mode" - raise ValueError(msg) - - magic = b"BLP1" if im.encoderinfo.get("blp_version") == "BLP1" else b"BLP2" - fp.write(magic) - - assert im.palette is not None - fp.write(struct.pack(" mode, rawmode - 1: ("P", "P;1"), - 4: ("P", "P;4"), - 8: ("P", "P"), - 16: ("RGB", "BGR;15"), - 24: ("RGB", "BGR"), - 32: ("RGB", "BGRX"), -} - -USE_RAW_ALPHA = False - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"BM") - - -def _dib_accept(prefix: bytes) -> bool: - return i32(prefix) in [12, 40, 52, 56, 64, 108, 124] - - -# ============================================================================= -# Image plugin for the Windows BMP format. -# ============================================================================= -class BmpImageFile(ImageFile.ImageFile): - """Image plugin for the Windows Bitmap format (BMP)""" - - # ------------------------------------------------------------- Description - format_description = "Windows Bitmap" - format = "BMP" - - # -------------------------------------------------- BMP Compression values - COMPRESSIONS = {"RAW": 0, "RLE8": 1, "RLE4": 2, "BITFIELDS": 3, "JPEG": 4, "PNG": 5} - for k, v in COMPRESSIONS.items(): - vars()[k] = v - - def _bitmap(self, header: int = 0, offset: int = 0) -> None: - """Read relevant info about the BMP""" - assert self.fp is not None - read, seek = self.fp.read, self.fp.seek - if header: - seek(header) - # read bmp header size @offset 14 (this is part of the header size) - file_info: dict[str, bool | int | tuple[int, ...]] = { - "header_size": i32(read(4)), - "direction": -1, - } - - # -------------------- If requested, read header at a specific position - # read the rest of the bmp header, without its size - assert isinstance(file_info["header_size"], int) - header_data = ImageFile._safe_read(self.fp, file_info["header_size"] - 4) - - # ------------------------------- Windows Bitmap v2, IBM OS/2 Bitmap v1 - # ----- This format has different offsets because of width/height types - # 12: BITMAPCOREHEADER/OS21XBITMAPHEADER - if file_info["header_size"] == 12: - file_info["width"] = i16(header_data, 0) - file_info["height"] = i16(header_data, 2) - file_info["planes"] = i16(header_data, 4) - file_info["bits"] = i16(header_data, 6) - file_info["compression"] = self.COMPRESSIONS["RAW"] - file_info["palette_padding"] = 3 - - # --------------------------------------------- Windows Bitmap v3 to v5 - # 40: BITMAPINFOHEADER - # 52: BITMAPV2HEADER - # 56: BITMAPV3HEADER - # 64: BITMAPCOREHEADER2/OS22XBITMAPHEADER - # 108: BITMAPV4HEADER - # 124: BITMAPV5HEADER - elif file_info["header_size"] in (40, 52, 56, 64, 108, 124): - file_info["y_flip"] = header_data[7] == 0xFF - file_info["direction"] = 1 if file_info["y_flip"] else -1 - file_info["width"] = i32(header_data, 0) - file_info["height"] = ( - i32(header_data, 4) - if not file_info["y_flip"] - else 2**32 - i32(header_data, 4) - ) - file_info["planes"] = i16(header_data, 8) - file_info["bits"] = i16(header_data, 10) - file_info["compression"] = i32(header_data, 12) - # byte size of pixel data - file_info["data_size"] = i32(header_data, 16) - file_info["pixels_per_meter"] = ( - i32(header_data, 20), - i32(header_data, 24), - ) - file_info["colors"] = i32(header_data, 28) - file_info["palette_padding"] = 4 - assert isinstance(file_info["pixels_per_meter"], tuple) - self.info["dpi"] = tuple(x / 39.3701 for x in file_info["pixels_per_meter"]) - if file_info["compression"] == self.COMPRESSIONS["BITFIELDS"]: - masks = ["r_mask", "g_mask", "b_mask"] - if len(header_data) >= 48: - if len(header_data) >= 52: - masks.append("a_mask") - else: - file_info["a_mask"] = 0x0 - for idx, mask in enumerate(masks): - file_info[mask] = i32(header_data, 36 + idx * 4) - else: - # 40 byte headers only have the three components in the - # bitfields masks, ref: - # https://msdn.microsoft.com/en-us/library/windows/desktop/dd183376(v=vs.85).aspx - # See also - # https://github.com/python-pillow/Pillow/issues/1293 - # There is a 4th component in the RGBQuad, in the alpha - # location, but it is listed as a reserved component, - # and it is not generally an alpha channel - file_info["a_mask"] = 0x0 - for mask in masks: - file_info[mask] = i32(read(4)) - assert isinstance(file_info["r_mask"], int) - assert isinstance(file_info["g_mask"], int) - assert isinstance(file_info["b_mask"], int) - assert isinstance(file_info["a_mask"], int) - file_info["rgb_mask"] = ( - file_info["r_mask"], - file_info["g_mask"], - file_info["b_mask"], - ) - file_info["rgba_mask"] = ( - file_info["r_mask"], - file_info["g_mask"], - file_info["b_mask"], - file_info["a_mask"], - ) - else: - msg = f"Unsupported BMP header type ({file_info['header_size']})" - raise OSError(msg) - - # ------------------ Special case : header is reported 40, which - # ---------------------- is shorter than real size for bpp >= 16 - assert isinstance(file_info["width"], int) - assert isinstance(file_info["height"], int) - self._size = file_info["width"], file_info["height"] - - # ------- If color count was not found in the header, compute from bits - assert isinstance(file_info["bits"], int) - file_info["colors"] = ( - file_info["colors"] - if file_info.get("colors", 0) - else (1 << file_info["bits"]) - ) - assert isinstance(file_info["colors"], int) - if offset == 14 + file_info["header_size"] and file_info["bits"] <= 8: - offset += 4 * file_info["colors"] - - # ---------------------- Check bit depth for unusual unsupported values - self._mode, raw_mode = BIT2MODE.get(file_info["bits"], ("", "")) - if not self.mode: - msg = f"Unsupported BMP pixel depth ({file_info['bits']})" - raise OSError(msg) - - # ---------------- Process BMP with Bitfields compression (not palette) - decoder_name = "raw" - if file_info["compression"] == self.COMPRESSIONS["BITFIELDS"]: - SUPPORTED: dict[int, list[tuple[int, ...]]] = { - 32: [ - (0xFF0000, 0xFF00, 0xFF, 0x0), - (0xFF000000, 0xFF0000, 0xFF00, 0x0), - (0xFF000000, 0xFF00, 0xFF, 0x0), - (0xFF000000, 0xFF0000, 0xFF00, 0xFF), - (0xFF, 0xFF00, 0xFF0000, 0xFF000000), - (0xFF0000, 0xFF00, 0xFF, 0xFF000000), - (0xFF000000, 0xFF00, 0xFF, 0xFF0000), - (0x0, 0x0, 0x0, 0x0), - ], - 24: [(0xFF0000, 0xFF00, 0xFF)], - 16: [(0xF800, 0x7E0, 0x1F), (0x7C00, 0x3E0, 0x1F)], - } - MASK_MODES = { - (32, (0xFF0000, 0xFF00, 0xFF, 0x0)): "BGRX", - (32, (0xFF000000, 0xFF0000, 0xFF00, 0x0)): "XBGR", - (32, (0xFF000000, 0xFF00, 0xFF, 0x0)): "BGXR", - (32, (0xFF000000, 0xFF0000, 0xFF00, 0xFF)): "ABGR", - (32, (0xFF, 0xFF00, 0xFF0000, 0xFF000000)): "RGBA", - (32, (0xFF0000, 0xFF00, 0xFF, 0xFF000000)): "BGRA", - (32, (0xFF000000, 0xFF00, 0xFF, 0xFF0000)): "BGAR", - (32, (0x0, 0x0, 0x0, 0x0)): "BGRA", - (24, (0xFF0000, 0xFF00, 0xFF)): "BGR", - (16, (0xF800, 0x7E0, 0x1F)): "BGR;16", - (16, (0x7C00, 0x3E0, 0x1F)): "BGR;15", - } - if file_info["bits"] in SUPPORTED: - if ( - file_info["bits"] == 32 - and file_info["rgba_mask"] in SUPPORTED[file_info["bits"]] - ): - assert isinstance(file_info["rgba_mask"], tuple) - raw_mode = MASK_MODES[(file_info["bits"], file_info["rgba_mask"])] - self._mode = "RGBA" if "A" in raw_mode else self.mode - elif ( - file_info["bits"] in (24, 16) - and file_info["rgb_mask"] in SUPPORTED[file_info["bits"]] - ): - assert isinstance(file_info["rgb_mask"], tuple) - raw_mode = MASK_MODES[(file_info["bits"], file_info["rgb_mask"])] - else: - msg = "Unsupported BMP bitfields layout" - raise OSError(msg) - else: - msg = "Unsupported BMP bitfields layout" - raise OSError(msg) - elif file_info["compression"] == self.COMPRESSIONS["RAW"]: - if file_info["bits"] == 32 and ( - header == 22 or USE_RAW_ALPHA # 32-bit .cur offset - ): - raw_mode, self._mode = "BGRA", "RGBA" - elif file_info["compression"] in ( - self.COMPRESSIONS["RLE8"], - self.COMPRESSIONS["RLE4"], - ): - decoder_name = "bmp_rle" - else: - msg = f"Unsupported BMP compression ({file_info['compression']})" - raise OSError(msg) - - # --------------- Once the header is processed, process the palette/LUT - if self.mode == "P": # Paletted for 1, 4 and 8 bit images - # ---------------------------------------------------- 1-bit images - if not (0 < file_info["colors"] <= 65536): - msg = f"Unsupported BMP Palette size ({file_info['colors']})" - raise OSError(msg) - else: - assert isinstance(file_info["palette_padding"], int) - padding = file_info["palette_padding"] - palette = read(padding * file_info["colors"]) - grayscale = True - indices = ( - (0, 255) - if file_info["colors"] == 2 - else list(range(file_info["colors"])) - ) - - # ----------------- Check if grayscale and ignore palette if so - for ind, val in enumerate(indices): - rgb = palette[ind * padding : ind * padding + 3] - if rgb != o8(val) * 3: - grayscale = False - - # ------- If all colors are gray, white or black, ditch palette - if grayscale: - self._mode = "1" if file_info["colors"] == 2 else "L" - raw_mode = self.mode - else: - self._mode = "P" - self.palette = ImagePalette.raw( - "BGRX" if padding == 4 else "BGR", palette - ) - - # ---------------------------- Finally set the tile data for the plugin - self.info["compression"] = file_info["compression"] - args: list[Any] = [raw_mode] - if decoder_name == "bmp_rle": - args.append(file_info["compression"] == self.COMPRESSIONS["RLE4"]) - else: - assert isinstance(file_info["width"], int) - args.append(((file_info["width"] * file_info["bits"] + 31) >> 3) & (~3)) - args.append(file_info["direction"]) - self.tile = [ - ImageFile._Tile( - decoder_name, - (0, 0, file_info["width"], file_info["height"]), - offset or self.fp.tell(), - tuple(args), - ) - ] - - def _open(self) -> None: - """Open file, check magic number and read header""" - # read 14 bytes: magic number, filesize, reserved, header final offset - assert self.fp is not None - head_data = self.fp.read(14) - # choke if the file does not have the required magic bytes - if not _accept(head_data): - msg = "Not a BMP file" - raise SyntaxError(msg) - # read the start position of the BMP image data (u32) - offset = i32(head_data, 10) - # load bitmap information (offset=raster info) - self._bitmap(offset=offset) - - -class BmpRleDecoder(ImageFile.PyDecoder): - _pulls_fd = True - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - assert self.fd is not None - rle4 = self.args[1] - data = bytearray() - x = 0 - dest_length = self.state.xsize * self.state.ysize - while len(data) < dest_length: - pixels = self.fd.read(1) - byte = self.fd.read(1) - if not pixels or not byte: - break - num_pixels = pixels[0] - if num_pixels: - # encoded mode - if x + num_pixels > self.state.xsize: - # Too much data for row - num_pixels = max(0, self.state.xsize - x) - if rle4: - first_pixel = o8(byte[0] >> 4) - second_pixel = o8(byte[0] & 0x0F) - for index in range(num_pixels): - if index % 2 == 0: - data += first_pixel - else: - data += second_pixel - else: - data += byte * num_pixels - x += num_pixels - else: - if byte[0] == 0: - # end of line - while len(data) % self.state.xsize != 0: - data += b"\x00" - x = 0 - elif byte[0] == 1: - # end of bitmap - break - elif byte[0] == 2: - # delta - bytes_read = self.fd.read(2) - if len(bytes_read) < 2: - break - right, up = self.fd.read(2) - data += b"\x00" * (right + up * self.state.xsize) - x = len(data) % self.state.xsize - else: - # absolute mode - if rle4: - # 2 pixels per byte - byte_count = byte[0] // 2 - bytes_read = self.fd.read(byte_count) - for byte_read in bytes_read: - data += o8(byte_read >> 4) - data += o8(byte_read & 0x0F) - else: - byte_count = byte[0] - bytes_read = self.fd.read(byte_count) - data += bytes_read - if len(bytes_read) < byte_count: - break - x += byte[0] - - # align to 16-bit word boundary - if self.fd.tell() % 2 != 0: - self.fd.seek(1, os.SEEK_CUR) - rawmode = "L" if self.mode == "L" else "P" - self.set_as_raw(bytes(data), rawmode, (0, self.args[-1])) - return -1, 0 - - -# ============================================================================= -# Image plugin for the DIB format (BMP alias) -# ============================================================================= -class DibImageFile(BmpImageFile): - format = "DIB" - format_description = "Windows Bitmap" - - def _open(self) -> None: - self._bitmap() - - -# -# -------------------------------------------------------------------- -# Write BMP file - - -SAVE = { - "1": ("1", 1, 2), - "L": ("L", 8, 256), - "P": ("P", 8, 256), - "RGB": ("BGR", 24, 0), - "RGBA": ("BGRA", 32, 0), -} - - -def _dib_save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - _save(im, fp, filename, False) - - -def _save( - im: Image.Image, fp: IO[bytes], filename: str | bytes, bitmap_header: bool = True -) -> None: - try: - rawmode, bits, colors = SAVE[im.mode] - except KeyError as e: - msg = f"cannot write mode {im.mode} as BMP" - raise OSError(msg) from e - - info = im.encoderinfo - - dpi = info.get("dpi", (96, 96)) - - # 1 meter == 39.3701 inches - ppm = tuple(int(x * 39.3701 + 0.5) for x in dpi) - - stride = ((im.size[0] * bits + 7) // 8 + 3) & (~3) - header = 40 # or 64 for OS/2 version 2 - image = stride * im.size[1] - - if im.mode == "1": - palette = b"".join(o8(i) * 3 + b"\x00" for i in (0, 255)) - elif im.mode == "L": - palette = b"".join(o8(i) * 3 + b"\x00" for i in range(256)) - elif im.mode == "P": - palette = im.im.getpalette("RGB", "BGRX") - colors = len(palette) // 4 - else: - palette = None - - # bitmap header - if bitmap_header: - offset = 14 + header + colors * 4 - file_size = offset + image - if file_size > 2**32 - 1: - msg = "File size is too large for the BMP format" - raise ValueError(msg) - fp.write( - b"BM" # file type (magic) - + o32(file_size) # file size - + o32(0) # reserved - + o32(offset) # image data offset - ) - - # bitmap info header - fp.write( - o32(header) # info header size - + o32(im.size[0]) # width - + o32(im.size[1]) # height - + o16(1) # planes - + o16(bits) # depth - + o32(0) # compression (0=uncompressed) - + o32(image) # size of bitmap - + o32(ppm[0]) # resolution - + o32(ppm[1]) # resolution - + o32(colors) # colors used - + o32(colors) # colors important - ) - - fp.write(b"\0" * (header - 40)) # padding (for OS/2 format) - - if palette: - fp.write(palette) - - ImageFile._save( - im, fp, [ImageFile._Tile("raw", (0, 0) + im.size, 0, (rawmode, stride, -1))] - ) - - -# -# -------------------------------------------------------------------- -# Registry - - -Image.register_open(BmpImageFile.format, BmpImageFile, _accept) -Image.register_save(BmpImageFile.format, _save) - -Image.register_extension(BmpImageFile.format, ".bmp") - -Image.register_mime(BmpImageFile.format, "image/bmp") - -Image.register_decoder("bmp_rle", BmpRleDecoder) - -Image.register_open(DibImageFile.format, DibImageFile, _dib_accept) -Image.register_save(DibImageFile.format, _dib_save) - -Image.register_extension(DibImageFile.format, ".dib") - -Image.register_mime(DibImageFile.format, "image/bmp") diff --git a/voxvera/vendor/PIL/BufrStubImagePlugin.py b/voxvera/vendor/PIL/BufrStubImagePlugin.py deleted file mode 100644 index 264564d..0000000 --- a/voxvera/vendor/PIL/BufrStubImagePlugin.py +++ /dev/null @@ -1,76 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# BUFR stub adapter -# -# Copyright (c) 1996-2003 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os -from typing import IO - -from . import Image, ImageFile - -_handler = None - - -def register_handler(handler: ImageFile.StubHandler | None) -> None: - """ - Install application-specific BUFR image handler. - - :param handler: Handler object. - """ - global _handler - _handler = handler - - -# -------------------------------------------------------------------- -# Image adapter - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith((b"BUFR", b"ZCZC")) - - -class BufrStubImageFile(ImageFile.StubImageFile): - format = "BUFR" - format_description = "BUFR" - - def _open(self) -> None: - assert self.fp is not None - if not _accept(self.fp.read(4)): - msg = "Not a BUFR file" - raise SyntaxError(msg) - - self.fp.seek(-4, os.SEEK_CUR) - - # make something up - self._mode = "F" - self._size = 1, 1 - - loader = self._load() - if loader: - loader.open(self) - - def _load(self) -> ImageFile.StubHandler | None: - return _handler - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if _handler is None or not hasattr(_handler, "save"): - msg = "BUFR save handler not installed" - raise OSError(msg) - _handler.save(im, fp, filename) - - -# -------------------------------------------------------------------- -# Registry - -Image.register_open(BufrStubImageFile.format, BufrStubImageFile, _accept) -Image.register_save(BufrStubImageFile.format, _save) - -Image.register_extension(BufrStubImageFile.format, ".bufr") diff --git a/voxvera/vendor/PIL/ContainerIO.py b/voxvera/vendor/PIL/ContainerIO.py deleted file mode 100644 index ec9e66c..0000000 --- a/voxvera/vendor/PIL/ContainerIO.py +++ /dev/null @@ -1,173 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# a class to read from a container file -# -# History: -# 1995-06-18 fl Created -# 1995-09-07 fl Added readline(), readlines() -# -# Copyright (c) 1997-2001 by Secret Labs AB -# Copyright (c) 1995 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io -from collections.abc import Iterable -from typing import IO, AnyStr, NoReturn - - -class ContainerIO(IO[AnyStr]): - """ - A file object that provides read access to a part of an existing - file (for example a TAR file). - """ - - def __init__(self, file: IO[AnyStr], offset: int, length: int) -> None: - """ - Create file object. - - :param file: Existing file. - :param offset: Start of region, in bytes. - :param length: Size of region, in bytes. - """ - self.fh: IO[AnyStr] = file - self.pos = 0 - self.offset = offset - self.length = length - self.fh.seek(offset) - - ## - # Always false. - - def isatty(self) -> bool: - return False - - def seekable(self) -> bool: - return True - - def seek(self, offset: int, mode: int = io.SEEK_SET) -> int: - """ - Move file pointer. - - :param offset: Offset in bytes. - :param mode: Starting position. Use 0 for beginning of region, 1 - for current offset, and 2 for end of region. You cannot move - the pointer outside the defined region. - :returns: Offset from start of region, in bytes. - """ - if mode == 1: - self.pos = self.pos + offset - elif mode == 2: - self.pos = self.length + offset - else: - self.pos = offset - # clamp - self.pos = max(0, min(self.pos, self.length)) - self.fh.seek(self.offset + self.pos) - return self.pos - - def tell(self) -> int: - """ - Get current file pointer. - - :returns: Offset from start of region, in bytes. - """ - return self.pos - - def readable(self) -> bool: - return True - - def read(self, n: int = -1) -> AnyStr: - """ - Read data. - - :param n: Number of bytes to read. If omitted, zero or negative, - read until end of region. - :returns: An 8-bit string. - """ - if n > 0: - n = min(n, self.length - self.pos) - else: - n = self.length - self.pos - if n <= 0: # EOF - return b"" if "b" in self.fh.mode else "" # type: ignore[return-value] - self.pos = self.pos + n - return self.fh.read(n) - - def readline(self, n: int = -1) -> AnyStr: - """ - Read a line of text. - - :param n: Number of bytes to read. If omitted, zero or negative, - read until end of line. - :returns: An 8-bit string. - """ - s: AnyStr = b"" if "b" in self.fh.mode else "" # type: ignore[assignment] - newline_character = b"\n" if "b" in self.fh.mode else "\n" - while True: - c = self.read(1) - if not c: - break - s = s + c - if c == newline_character or len(s) == n: - break - return s - - def readlines(self, n: int | None = -1) -> list[AnyStr]: - """ - Read multiple lines of text. - - :param n: Number of lines to read. If omitted, zero, negative or None, - read until end of region. - :returns: A list of 8-bit strings. - """ - lines = [] - while True: - s = self.readline() - if not s: - break - lines.append(s) - if len(lines) == n: - break - return lines - - def writable(self) -> bool: - return False - - def write(self, b: AnyStr) -> NoReturn: - raise NotImplementedError() - - def writelines(self, lines: Iterable[AnyStr]) -> NoReturn: - raise NotImplementedError() - - def truncate(self, size: int | None = None) -> int: - raise NotImplementedError() - - def __enter__(self) -> ContainerIO[AnyStr]: - return self - - def __exit__(self, *args: object) -> None: - self.close() - - def __iter__(self) -> ContainerIO[AnyStr]: - return self - - def __next__(self) -> AnyStr: - line = self.readline() - if not line: - msg = "end of region" - raise StopIteration(msg) - return line - - def fileno(self) -> int: - return self.fh.fileno() - - def flush(self) -> None: - self.fh.flush() - - def close(self) -> None: - self.fh.close() diff --git a/voxvera/vendor/PIL/CurImagePlugin.py b/voxvera/vendor/PIL/CurImagePlugin.py deleted file mode 100644 index 9c188e0..0000000 --- a/voxvera/vendor/PIL/CurImagePlugin.py +++ /dev/null @@ -1,75 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# Windows Cursor support for PIL -# -# notes: -# uses BmpImagePlugin.py to read the bitmap data. -# -# history: -# 96-05-27 fl Created -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1996. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import BmpImagePlugin, Image -from ._binary import i16le as i16 -from ._binary import i32le as i32 - -# -# -------------------------------------------------------------------- - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"\0\0\2\0") - - -## -# Image plugin for Windows Cursor files. - - -class CurImageFile(BmpImagePlugin.BmpImageFile): - format = "CUR" - format_description = "Windows Cursor" - - def _open(self) -> None: - assert self.fp is not None - offset = self.fp.tell() - - # check magic - s = self.fp.read(6) - if not _accept(s): - msg = "not a CUR file" - raise SyntaxError(msg) - - # pick the largest cursor in the file - m = b"" - for i in range(i16(s, 4)): - s = self.fp.read(16) - if not m: - m = s - elif s[0] > m[0] and s[1] > m[1]: - m = s - if not m: - msg = "No cursors were found" - raise TypeError(msg) - - # load as bitmap - self._bitmap(i32(m, 12) + offset) - - # patch up the bitmap height - self._size = self.size[0], self.size[1] // 2 - self.tile = [self.tile[0]._replace(extents=(0, 0) + self.size)] - - -# -# -------------------------------------------------------------------- - -Image.register_open(CurImageFile.format, CurImageFile, _accept) - -Image.register_extension(CurImageFile.format, ".cur") diff --git a/voxvera/vendor/PIL/DcxImagePlugin.py b/voxvera/vendor/PIL/DcxImagePlugin.py deleted file mode 100644 index d3f456d..0000000 --- a/voxvera/vendor/PIL/DcxImagePlugin.py +++ /dev/null @@ -1,84 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# DCX file handling -# -# DCX is a container file format defined by Intel, commonly used -# for fax applications. Each DCX file consists of a directory -# (a list of file offsets) followed by a set of (usually 1-bit) -# PCX files. -# -# History: -# 1995-09-09 fl Created -# 1996-03-20 fl Properly derived from PcxImageFile. -# 1998-07-15 fl Renamed offset attribute to avoid name clash -# 2002-07-30 fl Fixed file handling -# -# Copyright (c) 1997-98 by Secret Labs AB. -# Copyright (c) 1995-96 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import Image -from ._binary import i32le as i32 -from ._util import DeferredError -from .PcxImagePlugin import PcxImageFile - -MAGIC = 0x3ADE68B1 # QUIZ: what's this value, then? - - -def _accept(prefix: bytes) -> bool: - return len(prefix) >= 4 and i32(prefix) == MAGIC - - -## -# Image plugin for the Intel DCX format. - - -class DcxImageFile(PcxImageFile): - format = "DCX" - format_description = "Intel DCX" - _close_exclusive_fp_after_loading = False - - def _open(self) -> None: - # Header - assert self.fp is not None - s = self.fp.read(4) - if not _accept(s): - msg = "not a DCX file" - raise SyntaxError(msg) - - # Component directory - self._offset = [] - for i in range(1024): - offset = i32(self.fp.read(4)) - if not offset: - break - self._offset.append(offset) - - self._fp = self.fp - self.frame = -1 - self.n_frames = len(self._offset) - self.is_animated = self.n_frames > 1 - self.seek(0) - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - if isinstance(self._fp, DeferredError): - raise self._fp.ex - self.frame = frame - self.fp = self._fp - self.fp.seek(self._offset[frame]) - PcxImageFile._open(self) - - def tell(self) -> int: - return self.frame - - -Image.register_open(DcxImageFile.format, DcxImageFile, _accept) - -Image.register_extension(DcxImageFile.format, ".dcx") diff --git a/voxvera/vendor/PIL/DdsImagePlugin.py b/voxvera/vendor/PIL/DdsImagePlugin.py deleted file mode 100644 index 312f602..0000000 --- a/voxvera/vendor/PIL/DdsImagePlugin.py +++ /dev/null @@ -1,625 +0,0 @@ -""" -A Pillow plugin for .dds files (S3TC-compressed aka DXTC) -Jerome Leclanche - -Documentation: -https://web.archive.org/web/20170802060935/http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt - -The contents of this file are hereby released in the public domain (CC0) -Full text of the CC0 license: -https://creativecommons.org/publicdomain/zero/1.0/ -""" - -from __future__ import annotations - -import struct -import sys -from enum import IntEnum, IntFlag -from typing import IO - -from . import Image, ImageFile, ImagePalette -from ._binary import i32le as i32 -from ._binary import o8 -from ._binary import o32le as o32 - -# Magic ("DDS ") -DDS_MAGIC = 0x20534444 - - -# DDS flags -class DDSD(IntFlag): - CAPS = 0x1 - HEIGHT = 0x2 - WIDTH = 0x4 - PITCH = 0x8 - PIXELFORMAT = 0x1000 - MIPMAPCOUNT = 0x20000 - LINEARSIZE = 0x80000 - DEPTH = 0x800000 - - -# DDS caps -class DDSCAPS(IntFlag): - COMPLEX = 0x8 - TEXTURE = 0x1000 - MIPMAP = 0x400000 - - -class DDSCAPS2(IntFlag): - CUBEMAP = 0x200 - CUBEMAP_POSITIVEX = 0x400 - CUBEMAP_NEGATIVEX = 0x800 - CUBEMAP_POSITIVEY = 0x1000 - CUBEMAP_NEGATIVEY = 0x2000 - CUBEMAP_POSITIVEZ = 0x4000 - CUBEMAP_NEGATIVEZ = 0x8000 - VOLUME = 0x200000 - - -# Pixel Format -class DDPF(IntFlag): - ALPHAPIXELS = 0x1 - ALPHA = 0x2 - FOURCC = 0x4 - PALETTEINDEXED8 = 0x20 - RGB = 0x40 - LUMINANCE = 0x20000 - - -# dxgiformat.h -class DXGI_FORMAT(IntEnum): - UNKNOWN = 0 - R32G32B32A32_TYPELESS = 1 - R32G32B32A32_FLOAT = 2 - R32G32B32A32_UINT = 3 - R32G32B32A32_SINT = 4 - R32G32B32_TYPELESS = 5 - R32G32B32_FLOAT = 6 - R32G32B32_UINT = 7 - R32G32B32_SINT = 8 - R16G16B16A16_TYPELESS = 9 - R16G16B16A16_FLOAT = 10 - R16G16B16A16_UNORM = 11 - R16G16B16A16_UINT = 12 - R16G16B16A16_SNORM = 13 - R16G16B16A16_SINT = 14 - R32G32_TYPELESS = 15 - R32G32_FLOAT = 16 - R32G32_UINT = 17 - R32G32_SINT = 18 - R32G8X24_TYPELESS = 19 - D32_FLOAT_S8X24_UINT = 20 - R32_FLOAT_X8X24_TYPELESS = 21 - X32_TYPELESS_G8X24_UINT = 22 - R10G10B10A2_TYPELESS = 23 - R10G10B10A2_UNORM = 24 - R10G10B10A2_UINT = 25 - R11G11B10_FLOAT = 26 - R8G8B8A8_TYPELESS = 27 - R8G8B8A8_UNORM = 28 - R8G8B8A8_UNORM_SRGB = 29 - R8G8B8A8_UINT = 30 - R8G8B8A8_SNORM = 31 - R8G8B8A8_SINT = 32 - R16G16_TYPELESS = 33 - R16G16_FLOAT = 34 - R16G16_UNORM = 35 - R16G16_UINT = 36 - R16G16_SNORM = 37 - R16G16_SINT = 38 - R32_TYPELESS = 39 - D32_FLOAT = 40 - R32_FLOAT = 41 - R32_UINT = 42 - R32_SINT = 43 - R24G8_TYPELESS = 44 - D24_UNORM_S8_UINT = 45 - R24_UNORM_X8_TYPELESS = 46 - X24_TYPELESS_G8_UINT = 47 - R8G8_TYPELESS = 48 - R8G8_UNORM = 49 - R8G8_UINT = 50 - R8G8_SNORM = 51 - R8G8_SINT = 52 - R16_TYPELESS = 53 - R16_FLOAT = 54 - D16_UNORM = 55 - R16_UNORM = 56 - R16_UINT = 57 - R16_SNORM = 58 - R16_SINT = 59 - R8_TYPELESS = 60 - R8_UNORM = 61 - R8_UINT = 62 - R8_SNORM = 63 - R8_SINT = 64 - A8_UNORM = 65 - R1_UNORM = 66 - R9G9B9E5_SHAREDEXP = 67 - R8G8_B8G8_UNORM = 68 - G8R8_G8B8_UNORM = 69 - BC1_TYPELESS = 70 - BC1_UNORM = 71 - BC1_UNORM_SRGB = 72 - BC2_TYPELESS = 73 - BC2_UNORM = 74 - BC2_UNORM_SRGB = 75 - BC3_TYPELESS = 76 - BC3_UNORM = 77 - BC3_UNORM_SRGB = 78 - BC4_TYPELESS = 79 - BC4_UNORM = 80 - BC4_SNORM = 81 - BC5_TYPELESS = 82 - BC5_UNORM = 83 - BC5_SNORM = 84 - B5G6R5_UNORM = 85 - B5G5R5A1_UNORM = 86 - B8G8R8A8_UNORM = 87 - B8G8R8X8_UNORM = 88 - R10G10B10_XR_BIAS_A2_UNORM = 89 - B8G8R8A8_TYPELESS = 90 - B8G8R8A8_UNORM_SRGB = 91 - B8G8R8X8_TYPELESS = 92 - B8G8R8X8_UNORM_SRGB = 93 - BC6H_TYPELESS = 94 - BC6H_UF16 = 95 - BC6H_SF16 = 96 - BC7_TYPELESS = 97 - BC7_UNORM = 98 - BC7_UNORM_SRGB = 99 - AYUV = 100 - Y410 = 101 - Y416 = 102 - NV12 = 103 - P010 = 104 - P016 = 105 - OPAQUE_420 = 106 - YUY2 = 107 - Y210 = 108 - Y216 = 109 - NV11 = 110 - AI44 = 111 - IA44 = 112 - P8 = 113 - A8P8 = 114 - B4G4R4A4_UNORM = 115 - P208 = 130 - V208 = 131 - V408 = 132 - SAMPLER_FEEDBACK_MIN_MIP_OPAQUE = 189 - SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE = 190 - - -class D3DFMT(IntEnum): - UNKNOWN = 0 - R8G8B8 = 20 - A8R8G8B8 = 21 - X8R8G8B8 = 22 - R5G6B5 = 23 - X1R5G5B5 = 24 - A1R5G5B5 = 25 - A4R4G4B4 = 26 - R3G3B2 = 27 - A8 = 28 - A8R3G3B2 = 29 - X4R4G4B4 = 30 - A2B10G10R10 = 31 - A8B8G8R8 = 32 - X8B8G8R8 = 33 - G16R16 = 34 - A2R10G10B10 = 35 - A16B16G16R16 = 36 - A8P8 = 40 - P8 = 41 - L8 = 50 - A8L8 = 51 - A4L4 = 52 - V8U8 = 60 - L6V5U5 = 61 - X8L8V8U8 = 62 - Q8W8V8U8 = 63 - V16U16 = 64 - A2W10V10U10 = 67 - D16_LOCKABLE = 70 - D32 = 71 - D15S1 = 73 - D24S8 = 75 - D24X8 = 77 - D24X4S4 = 79 - D16 = 80 - D32F_LOCKABLE = 82 - D24FS8 = 83 - D32_LOCKABLE = 84 - S8_LOCKABLE = 85 - L16 = 81 - VERTEXDATA = 100 - INDEX16 = 101 - INDEX32 = 102 - Q16W16V16U16 = 110 - R16F = 111 - G16R16F = 112 - A16B16G16R16F = 113 - R32F = 114 - G32R32F = 115 - A32B32G32R32F = 116 - CxV8U8 = 117 - A1 = 118 - A2B10G10R10_XR_BIAS = 119 - BINARYBUFFER = 199 - - UYVY = i32(b"UYVY") - R8G8_B8G8 = i32(b"RGBG") - YUY2 = i32(b"YUY2") - G8R8_G8B8 = i32(b"GRGB") - DXT1 = i32(b"DXT1") - DXT2 = i32(b"DXT2") - DXT3 = i32(b"DXT3") - DXT4 = i32(b"DXT4") - DXT5 = i32(b"DXT5") - DX10 = i32(b"DX10") - BC4S = i32(b"BC4S") - BC4U = i32(b"BC4U") - BC5S = i32(b"BC5S") - BC5U = i32(b"BC5U") - ATI1 = i32(b"ATI1") - ATI2 = i32(b"ATI2") - MULTI2_ARGB8 = i32(b"MET1") - - -# Backward compatibility layer -module = sys.modules[__name__] -for item in DDSD: - assert item.name is not None - setattr(module, f"DDSD_{item.name}", item.value) -for item1 in DDSCAPS: - assert item1.name is not None - setattr(module, f"DDSCAPS_{item1.name}", item1.value) -for item2 in DDSCAPS2: - assert item2.name is not None - setattr(module, f"DDSCAPS2_{item2.name}", item2.value) -for item3 in DDPF: - assert item3.name is not None - setattr(module, f"DDPF_{item3.name}", item3.value) - -DDS_FOURCC = DDPF.FOURCC -DDS_RGB = DDPF.RGB -DDS_RGBA = DDPF.RGB | DDPF.ALPHAPIXELS -DDS_LUMINANCE = DDPF.LUMINANCE -DDS_LUMINANCEA = DDPF.LUMINANCE | DDPF.ALPHAPIXELS -DDS_ALPHA = DDPF.ALPHA -DDS_PAL8 = DDPF.PALETTEINDEXED8 - -DDS_HEADER_FLAGS_TEXTURE = DDSD.CAPS | DDSD.HEIGHT | DDSD.WIDTH | DDSD.PIXELFORMAT -DDS_HEADER_FLAGS_MIPMAP = DDSD.MIPMAPCOUNT -DDS_HEADER_FLAGS_VOLUME = DDSD.DEPTH -DDS_HEADER_FLAGS_PITCH = DDSD.PITCH -DDS_HEADER_FLAGS_LINEARSIZE = DDSD.LINEARSIZE - -DDS_HEIGHT = DDSD.HEIGHT -DDS_WIDTH = DDSD.WIDTH - -DDS_SURFACE_FLAGS_TEXTURE = DDSCAPS.TEXTURE -DDS_SURFACE_FLAGS_MIPMAP = DDSCAPS.COMPLEX | DDSCAPS.MIPMAP -DDS_SURFACE_FLAGS_CUBEMAP = DDSCAPS.COMPLEX - -DDS_CUBEMAP_POSITIVEX = DDSCAPS2.CUBEMAP | DDSCAPS2.CUBEMAP_POSITIVEX -DDS_CUBEMAP_NEGATIVEX = DDSCAPS2.CUBEMAP | DDSCAPS2.CUBEMAP_NEGATIVEX -DDS_CUBEMAP_POSITIVEY = DDSCAPS2.CUBEMAP | DDSCAPS2.CUBEMAP_POSITIVEY -DDS_CUBEMAP_NEGATIVEY = DDSCAPS2.CUBEMAP | DDSCAPS2.CUBEMAP_NEGATIVEY -DDS_CUBEMAP_POSITIVEZ = DDSCAPS2.CUBEMAP | DDSCAPS2.CUBEMAP_POSITIVEZ -DDS_CUBEMAP_NEGATIVEZ = DDSCAPS2.CUBEMAP | DDSCAPS2.CUBEMAP_NEGATIVEZ - -DXT1_FOURCC = D3DFMT.DXT1 -DXT3_FOURCC = D3DFMT.DXT3 -DXT5_FOURCC = D3DFMT.DXT5 - -DXGI_FORMAT_R8G8B8A8_TYPELESS = DXGI_FORMAT.R8G8B8A8_TYPELESS -DXGI_FORMAT_R8G8B8A8_UNORM = DXGI_FORMAT.R8G8B8A8_UNORM -DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = DXGI_FORMAT.R8G8B8A8_UNORM_SRGB -DXGI_FORMAT_BC5_TYPELESS = DXGI_FORMAT.BC5_TYPELESS -DXGI_FORMAT_BC5_UNORM = DXGI_FORMAT.BC5_UNORM -DXGI_FORMAT_BC5_SNORM = DXGI_FORMAT.BC5_SNORM -DXGI_FORMAT_BC6H_UF16 = DXGI_FORMAT.BC6H_UF16 -DXGI_FORMAT_BC6H_SF16 = DXGI_FORMAT.BC6H_SF16 -DXGI_FORMAT_BC7_TYPELESS = DXGI_FORMAT.BC7_TYPELESS -DXGI_FORMAT_BC7_UNORM = DXGI_FORMAT.BC7_UNORM -DXGI_FORMAT_BC7_UNORM_SRGB = DXGI_FORMAT.BC7_UNORM_SRGB - - -class DdsImageFile(ImageFile.ImageFile): - format = "DDS" - format_description = "DirectDraw Surface" - - def _open(self) -> None: - assert self.fp is not None - if not _accept(self.fp.read(4)): - msg = "not a DDS file" - raise SyntaxError(msg) - (header_size,) = struct.unpack(" None: - pass - - -class DdsRgbDecoder(ImageFile.PyDecoder): - _pulls_fd = True - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - assert self.fd is not None - bitcount, masks = self.args - - # Some masks will be padded with zeros, e.g. R 0b11 G 0b1100 - # Calculate how many zeros each mask is padded with - mask_offsets = [] - # And the maximum value of each channel without the padding - mask_totals = [] - for mask in masks: - offset = 0 - if mask != 0: - while mask >> (offset + 1) << (offset + 1) == mask: - offset += 1 - mask_offsets.append(offset) - mask_totals.append(mask >> offset) - - data = bytearray() - bytecount = bitcount // 8 - dest_length = self.state.xsize * self.state.ysize * len(masks) - while len(data) < dest_length: - value = int.from_bytes(self.fd.read(bytecount), "little") - for i, mask in enumerate(masks): - masked_value = value & mask - # Remove the zero padding, and scale it to 8 bits - data += o8( - int(((masked_value >> mask_offsets[i]) / mask_totals[i]) * 255) - if mask_totals[i] - else 0 - ) - self.set_as_raw(data) - return -1, 0 - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.mode not in ("RGB", "RGBA", "L", "LA"): - msg = f"cannot write mode {im.mode} as DDS" - raise OSError(msg) - - flags = DDSD.CAPS | DDSD.HEIGHT | DDSD.WIDTH | DDSD.PIXELFORMAT - bitcount = len(im.getbands()) * 8 - pixel_format = im.encoderinfo.get("pixel_format") - args: tuple[int] | str - if pixel_format: - codec_name = "bcn" - flags |= DDSD.LINEARSIZE - pitch = (im.width + 3) * 4 - rgba_mask = [0, 0, 0, 0] - pixel_flags = DDPF.FOURCC - if pixel_format == "DXT1": - fourcc = D3DFMT.DXT1 - args = (1,) - elif pixel_format == "DXT3": - fourcc = D3DFMT.DXT3 - args = (2,) - elif pixel_format == "DXT5": - fourcc = D3DFMT.DXT5 - args = (3,) - else: - fourcc = D3DFMT.DX10 - if pixel_format == "BC2": - args = (2,) - dxgi_format = DXGI_FORMAT.BC2_TYPELESS - elif pixel_format == "BC3": - args = (3,) - dxgi_format = DXGI_FORMAT.BC3_TYPELESS - elif pixel_format == "BC5": - args = (5,) - dxgi_format = DXGI_FORMAT.BC5_TYPELESS - if im.mode != "RGB": - msg = "only RGB mode can be written as BC5" - raise OSError(msg) - else: - msg = f"cannot write pixel format {pixel_format}" - raise OSError(msg) - else: - codec_name = "raw" - flags |= DDSD.PITCH - pitch = (im.width * bitcount + 7) // 8 - - alpha = im.mode[-1] == "A" - if im.mode[0] == "L": - pixel_flags = DDPF.LUMINANCE - args = im.mode - if alpha: - rgba_mask = [0x000000FF, 0x000000FF, 0x000000FF] - else: - rgba_mask = [0xFF000000, 0xFF000000, 0xFF000000] - else: - pixel_flags = DDPF.RGB - args = im.mode[::-1] - rgba_mask = [0x00FF0000, 0x0000FF00, 0x000000FF] - - if alpha: - r, g, b, a = im.split() - im = Image.merge("RGBA", (a, r, g, b)) - if alpha: - pixel_flags |= DDPF.ALPHAPIXELS - rgba_mask.append(0xFF000000 if alpha else 0) - - fourcc = D3DFMT.UNKNOWN - fp.write( - o32(DDS_MAGIC) - + struct.pack( - "<7I", - 124, # header size - flags, # flags - im.height, - im.width, - pitch, - 0, # depth - 0, # mipmaps - ) - + struct.pack("11I", *((0,) * 11)) # reserved - # pfsize, pfflags, fourcc, bitcount - + struct.pack("<4I", 32, pixel_flags, fourcc, bitcount) - + struct.pack("<4I", *rgba_mask) # dwRGBABitMask - + struct.pack("<5I", DDSCAPS.TEXTURE, 0, 0, 0, 0) - ) - if fourcc == D3DFMT.DX10: - fp.write( - # dxgi_format, 2D resource, misc, array size, straight alpha - struct.pack("<5I", dxgi_format, 3, 0, 0, 1) - ) - ImageFile._save(im, fp, [ImageFile._Tile(codec_name, (0, 0) + im.size, 0, args)]) - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"DDS ") - - -Image.register_open(DdsImageFile.format, DdsImageFile, _accept) -Image.register_decoder("dds_rgb", DdsRgbDecoder) -Image.register_save(DdsImageFile.format, _save) -Image.register_extension(DdsImageFile.format, ".dds") diff --git a/voxvera/vendor/PIL/EpsImagePlugin.py b/voxvera/vendor/PIL/EpsImagePlugin.py deleted file mode 100644 index 2effb81..0000000 --- a/voxvera/vendor/PIL/EpsImagePlugin.py +++ /dev/null @@ -1,481 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# EPS file handling -# -# History: -# 1995-09-01 fl Created (0.1) -# 1996-05-18 fl Don't choke on "atend" fields, Ghostscript interface (0.2) -# 1996-08-22 fl Don't choke on floating point BoundingBox values -# 1996-08-23 fl Handle files from Macintosh (0.3) -# 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.4) -# 2003-09-07 fl Check gs.close status (from Federico Di Gregorio) (0.5) -# 2014-05-07 e Handling of EPS with binary preview and fixed resolution -# resizing -# -# Copyright (c) 1997-2003 by Secret Labs AB. -# Copyright (c) 1995-2003 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io -import os -import re -import subprocess -import sys -import tempfile -from typing import IO - -from . import Image, ImageFile -from ._binary import i32le as i32 - -# -------------------------------------------------------------------- - - -split = re.compile(r"^%%([^:]*):[ \t]*(.*)[ \t]*$") -field = re.compile(r"^%[%!\w]([^:]*)[ \t]*$") - -gs_binary: str | bool | None = None -gs_windows_binary = None - - -def has_ghostscript() -> bool: - global gs_binary, gs_windows_binary - if gs_binary is None: - if sys.platform.startswith("win"): - if gs_windows_binary is None: - import shutil - - for binary in ("gswin32c", "gswin64c", "gs"): - if shutil.which(binary) is not None: - gs_windows_binary = binary - break - else: - gs_windows_binary = False - gs_binary = gs_windows_binary - else: - try: - subprocess.check_call(["gs", "--version"], stdout=subprocess.DEVNULL) - gs_binary = "gs" - except OSError: - gs_binary = False - return gs_binary is not False - - -def Ghostscript( - tile: list[ImageFile._Tile], - size: tuple[int, int], - fp: IO[bytes], - scale: int = 1, - transparency: bool = False, -) -> Image.core.ImagingCore: - """Render an image using Ghostscript""" - global gs_binary - if not has_ghostscript(): - msg = "Unable to locate Ghostscript on paths" - raise OSError(msg) - assert isinstance(gs_binary, str) - - # Unpack decoder tile - args = tile[0].args - assert isinstance(args, tuple) - length, bbox = args - - # Hack to support hi-res rendering - scale = int(scale) or 1 - width = size[0] * scale - height = size[1] * scale - # resolution is dependent on bbox and size - res_x = 72.0 * width / (bbox[2] - bbox[0]) - res_y = 72.0 * height / (bbox[3] - bbox[1]) - - out_fd, outfile = tempfile.mkstemp() - os.close(out_fd) - - infile_temp = None - if hasattr(fp, "name") and os.path.exists(fp.name): - infile = fp.name - else: - in_fd, infile_temp = tempfile.mkstemp() - os.close(in_fd) - infile = infile_temp - - # Ignore length and offset! - # Ghostscript can read it - # Copy whole file to read in Ghostscript - with open(infile_temp, "wb") as f: - # fetch length of fp - fp.seek(0, io.SEEK_END) - fsize = fp.tell() - # ensure start position - # go back - fp.seek(0) - lengthfile = fsize - while lengthfile > 0: - s = fp.read(min(lengthfile, 100 * 1024)) - if not s: - break - lengthfile -= len(s) - f.write(s) - - if transparency: - # "RGBA" - device = "pngalpha" - else: - # "pnmraw" automatically chooses between - # PBM ("1"), PGM ("L"), and PPM ("RGB"). - device = "pnmraw" - - # Build Ghostscript command - command = [ - gs_binary, - "-q", # quiet mode - f"-g{width:d}x{height:d}", # set output geometry (pixels) - f"-r{res_x:f}x{res_y:f}", # set input DPI (dots per inch) - "-dBATCH", # exit after processing - "-dNOPAUSE", # don't pause between pages - "-dSAFER", # safe mode - f"-sDEVICE={device}", - f"-sOutputFile={outfile}", # output file - # adjust for image origin - "-c", - f"{-bbox[0]} {-bbox[1]} translate", - "-f", - infile, # input file - # showpage (see https://bugs.ghostscript.com/show_bug.cgi?id=698272) - "-c", - "showpage", - ] - - # push data through Ghostscript - try: - startupinfo = None - if sys.platform.startswith("win"): - startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - subprocess.check_call(command, startupinfo=startupinfo) - with Image.open(outfile) as out_im: - out_im.load() - return out_im.im.copy() - finally: - try: - os.unlink(outfile) - if infile_temp: - os.unlink(infile_temp) - except OSError: - pass - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"%!PS") or ( - len(prefix) >= 4 and i32(prefix) == 0xC6D3D0C5 - ) - - -## -# Image plugin for Encapsulated PostScript. This plugin supports only -# a few variants of this format. - - -class EpsImageFile(ImageFile.ImageFile): - """EPS File Parser for the Python Imaging Library""" - - format = "EPS" - format_description = "Encapsulated Postscript" - - mode_map = {1: "L", 2: "LAB", 3: "RGB", 4: "CMYK"} - - def _open(self) -> None: - assert self.fp is not None - (length, offset) = self._find_offset(self.fp) - - # go to offset - start of "%!PS" - self.fp.seek(offset) - - self._mode = "RGB" - - # When reading header comments, the first comment is used. - # When reading trailer comments, the last comment is used. - bounding_box: list[int] | None = None - imagedata_size: tuple[int, int] | None = None - - byte_arr = bytearray(255) - bytes_mv = memoryview(byte_arr) - bytes_read = 0 - reading_header_comments = True - reading_trailer_comments = False - trailer_reached = False - - def check_required_header_comments() -> None: - """ - The EPS specification requires that some headers exist. - This should be checked when the header comments formally end, - when image data starts, or when the file ends, whichever comes first. - """ - if "PS-Adobe" not in self.info: - msg = 'EPS header missing "%!PS-Adobe" comment' - raise SyntaxError(msg) - if "BoundingBox" not in self.info: - msg = 'EPS header missing "%%BoundingBox" comment' - raise SyntaxError(msg) - - def read_comment(s: str) -> bool: - nonlocal bounding_box, reading_trailer_comments - try: - m = split.match(s) - except re.error as e: - msg = "not an EPS file" - raise SyntaxError(msg) from e - - if not m: - return False - - k, v = m.group(1, 2) - self.info[k] = v - if k == "BoundingBox": - if v == "(atend)": - reading_trailer_comments = True - elif not bounding_box or (trailer_reached and reading_trailer_comments): - try: - # Note: The DSC spec says that BoundingBox - # fields should be integers, but some drivers - # put floating point values there anyway. - bounding_box = [int(float(i)) for i in v.split()] - except Exception: - pass - return True - - while True: - byte = self.fp.read(1) - if byte == b"": - # if we didn't read a byte we must be at the end of the file - if bytes_read == 0: - if reading_header_comments: - check_required_header_comments() - break - elif byte in b"\r\n": - # if we read a line ending character, ignore it and parse what - # we have already read. if we haven't read any other characters, - # continue reading - if bytes_read == 0: - continue - else: - # ASCII/hexadecimal lines in an EPS file must not exceed - # 255 characters, not including line ending characters - if bytes_read >= 255: - # only enforce this for lines starting with a "%", - # otherwise assume it's binary data - if byte_arr[0] == ord("%"): - msg = "not an EPS file" - raise SyntaxError(msg) - else: - if reading_header_comments: - check_required_header_comments() - reading_header_comments = False - # reset bytes_read so we can keep reading - # data until the end of the line - bytes_read = 0 - byte_arr[bytes_read] = byte[0] - bytes_read += 1 - continue - - if reading_header_comments: - # Load EPS header - - # if this line doesn't start with a "%", - # or does start with "%%EndComments", - # then we've reached the end of the header/comments - if byte_arr[0] != ord("%") or bytes_mv[:13] == b"%%EndComments": - check_required_header_comments() - reading_header_comments = False - continue - - s = str(bytes_mv[:bytes_read], "latin-1") - if not read_comment(s): - m = field.match(s) - if m: - k = m.group(1) - if k.startswith("PS-Adobe"): - self.info["PS-Adobe"] = k[9:] - else: - self.info[k] = "" - elif s[0] == "%": - # handle non-DSC PostScript comments that some - # tools mistakenly put in the Comments section - pass - else: - msg = "bad EPS header" - raise OSError(msg) - elif bytes_mv[:11] == b"%ImageData:": - # Check for an "ImageData" descriptor - # https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577413_pgfId-1035096 - - # If we've already read an "ImageData" descriptor, - # don't read another one. - if imagedata_size: - bytes_read = 0 - continue - - # Values: - # columns - # rows - # bit depth (1 or 8) - # mode (1: L, 2: LAB, 3: RGB, 4: CMYK) - # number of padding channels - # block size (number of bytes per row per channel) - # binary/ascii (1: binary, 2: ascii) - # data start identifier (the image data follows after a single line - # consisting only of this quoted value) - image_data_values = byte_arr[11:bytes_read].split(None, 7) - columns, rows, bit_depth, mode_id = ( - int(value) for value in image_data_values[:4] - ) - - if bit_depth == 1: - self._mode = "1" - elif bit_depth == 8: - try: - self._mode = self.mode_map[mode_id] - except ValueError: - break - else: - break - - # Parse the columns and rows after checking the bit depth and mode - # in case the bit depth and/or mode are invalid. - imagedata_size = columns, rows - elif bytes_mv[:5] == b"%%EOF": - break - elif trailer_reached and reading_trailer_comments: - # Load EPS trailer - s = str(bytes_mv[:bytes_read], "latin-1") - read_comment(s) - elif bytes_mv[:9] == b"%%Trailer": - trailer_reached = True - elif bytes_mv[:14] == b"%%BeginBinary:": - bytecount = int(byte_arr[14:bytes_read]) - self.fp.seek(bytecount, os.SEEK_CUR) - bytes_read = 0 - - # A "BoundingBox" is always required, - # even if an "ImageData" descriptor size exists. - if not bounding_box: - msg = "cannot determine EPS bounding box" - raise OSError(msg) - - # An "ImageData" size takes precedence over the "BoundingBox". - self._size = imagedata_size or ( - bounding_box[2] - bounding_box[0], - bounding_box[3] - bounding_box[1], - ) - - self.tile = [ - ImageFile._Tile("eps", (0, 0) + self.size, offset, (length, bounding_box)) - ] - - def _find_offset(self, fp: IO[bytes]) -> tuple[int, int]: - s = fp.read(4) - - if s == b"%!PS": - # for HEAD without binary preview - fp.seek(0, io.SEEK_END) - length = fp.tell() - offset = 0 - elif i32(s) == 0xC6D3D0C5: - # FIX for: Some EPS file not handled correctly / issue #302 - # EPS can contain binary data - # or start directly with latin coding - # more info see: - # https://web.archive.org/web/20160528181353/http://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf - s = fp.read(8) - offset = i32(s) - length = i32(s, 4) - else: - msg = "not an EPS file" - raise SyntaxError(msg) - - return length, offset - - def load( - self, scale: int = 1, transparency: bool = False - ) -> Image.core.PixelAccess | None: - # Load EPS via Ghostscript - if self.tile: - assert self.fp is not None - self.im = Ghostscript(self.tile, self.size, self.fp, scale, transparency) - self._mode = self.im.mode - self._size = self.im.size - self.tile = [] - return Image.Image.load(self) - - def load_seek(self, pos: int) -> None: - # we can't incrementally load, so force ImageFile.parser to - # use our custom load method by defining this method. - pass - - -# -------------------------------------------------------------------- - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes, eps: int = 1) -> None: - """EPS Writer for the Python Imaging Library.""" - - # make sure image data is available - im.load() - - # determine PostScript image mode - if im.mode == "L": - operator = (8, 1, b"image") - elif im.mode == "RGB": - operator = (8, 3, b"false 3 colorimage") - elif im.mode == "CMYK": - operator = (8, 4, b"false 4 colorimage") - else: - msg = "image mode is not supported" - raise ValueError(msg) - - if eps: - # write EPS header - fp.write(b"%!PS-Adobe-3.0 EPSF-3.0\n") - fp.write(b"%%Creator: PIL 0.1 EpsEncode\n") - # fp.write("%%CreationDate: %s"...) - fp.write(b"%%%%BoundingBox: 0 0 %d %d\n" % im.size) - fp.write(b"%%Pages: 1\n") - fp.write(b"%%EndComments\n") - fp.write(b"%%Page: 1 1\n") - fp.write(b"%%ImageData: %d %d " % im.size) - fp.write(b'%d %d 0 1 1 "%s"\n' % operator) - - # image header - fp.write(b"gsave\n") - fp.write(b"10 dict begin\n") - fp.write(b"/buf %d string def\n" % (im.size[0] * operator[1])) - fp.write(b"%d %d scale\n" % im.size) - fp.write(b"%d %d 8\n" % im.size) # <= bits - fp.write(b"[%d 0 0 -%d 0 %d]\n" % (im.size[0], im.size[1], im.size[1])) - fp.write(b"{ currentfile buf readhexstring pop } bind\n") - fp.write(operator[2] + b"\n") - if hasattr(fp, "flush"): - fp.flush() - - ImageFile._save(im, fp, [ImageFile._Tile("eps", (0, 0) + im.size)]) - - fp.write(b"\n%%%%EndBinary\n") - fp.write(b"grestore end\n") - if hasattr(fp, "flush"): - fp.flush() - - -# -------------------------------------------------------------------- - - -Image.register_open(EpsImageFile.format, EpsImageFile, _accept) - -Image.register_save(EpsImageFile.format, _save) - -Image.register_extensions(EpsImageFile.format, [".ps", ".eps"]) - -Image.register_mime(EpsImageFile.format, "application/postscript") diff --git a/voxvera/vendor/PIL/ExifTags.py b/voxvera/vendor/PIL/ExifTags.py deleted file mode 100644 index 2280d5c..0000000 --- a/voxvera/vendor/PIL/ExifTags.py +++ /dev/null @@ -1,382 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# EXIF tags -# -# Copyright (c) 2003 by Secret Labs AB -# -# See the README file for information on usage and redistribution. -# - -""" -This module provides constants and clear-text names for various -well-known EXIF tags. -""" -from __future__ import annotations - -from enum import IntEnum - - -class Base(IntEnum): - # possibly incomplete - InteropIndex = 0x0001 - ProcessingSoftware = 0x000B - NewSubfileType = 0x00FE - SubfileType = 0x00FF - ImageWidth = 0x0100 - ImageLength = 0x0101 - BitsPerSample = 0x0102 - Compression = 0x0103 - PhotometricInterpretation = 0x0106 - Thresholding = 0x0107 - CellWidth = 0x0108 - CellLength = 0x0109 - FillOrder = 0x010A - DocumentName = 0x010D - ImageDescription = 0x010E - Make = 0x010F - Model = 0x0110 - StripOffsets = 0x0111 - Orientation = 0x0112 - SamplesPerPixel = 0x0115 - RowsPerStrip = 0x0116 - StripByteCounts = 0x0117 - MinSampleValue = 0x0118 - MaxSampleValue = 0x0119 - XResolution = 0x011A - YResolution = 0x011B - PlanarConfiguration = 0x011C - PageName = 0x011D - FreeOffsets = 0x0120 - FreeByteCounts = 0x0121 - GrayResponseUnit = 0x0122 - GrayResponseCurve = 0x0123 - T4Options = 0x0124 - T6Options = 0x0125 - ResolutionUnit = 0x0128 - PageNumber = 0x0129 - TransferFunction = 0x012D - Software = 0x0131 - DateTime = 0x0132 - Artist = 0x013B - HostComputer = 0x013C - Predictor = 0x013D - WhitePoint = 0x013E - PrimaryChromaticities = 0x013F - ColorMap = 0x0140 - HalftoneHints = 0x0141 - TileWidth = 0x0142 - TileLength = 0x0143 - TileOffsets = 0x0144 - TileByteCounts = 0x0145 - SubIFDs = 0x014A - InkSet = 0x014C - InkNames = 0x014D - NumberOfInks = 0x014E - DotRange = 0x0150 - TargetPrinter = 0x0151 - ExtraSamples = 0x0152 - SampleFormat = 0x0153 - SMinSampleValue = 0x0154 - SMaxSampleValue = 0x0155 - TransferRange = 0x0156 - ClipPath = 0x0157 - XClipPathUnits = 0x0158 - YClipPathUnits = 0x0159 - Indexed = 0x015A - JPEGTables = 0x015B - OPIProxy = 0x015F - JPEGProc = 0x0200 - JpegIFOffset = 0x0201 - JpegIFByteCount = 0x0202 - JpegRestartInterval = 0x0203 - JpegLosslessPredictors = 0x0205 - JpegPointTransforms = 0x0206 - JpegQTables = 0x0207 - JpegDCTables = 0x0208 - JpegACTables = 0x0209 - YCbCrCoefficients = 0x0211 - YCbCrSubSampling = 0x0212 - YCbCrPositioning = 0x0213 - ReferenceBlackWhite = 0x0214 - XMLPacket = 0x02BC - RelatedImageFileFormat = 0x1000 - RelatedImageWidth = 0x1001 - RelatedImageLength = 0x1002 - Rating = 0x4746 - RatingPercent = 0x4749 - ImageID = 0x800D - CFARepeatPatternDim = 0x828D - BatteryLevel = 0x828F - Copyright = 0x8298 - ExposureTime = 0x829A - FNumber = 0x829D - IPTCNAA = 0x83BB - ImageResources = 0x8649 - ExifOffset = 0x8769 - InterColorProfile = 0x8773 - ExposureProgram = 0x8822 - SpectralSensitivity = 0x8824 - GPSInfo = 0x8825 - ISOSpeedRatings = 0x8827 - OECF = 0x8828 - Interlace = 0x8829 - TimeZoneOffset = 0x882A - SelfTimerMode = 0x882B - SensitivityType = 0x8830 - StandardOutputSensitivity = 0x8831 - RecommendedExposureIndex = 0x8832 - ISOSpeed = 0x8833 - ISOSpeedLatitudeyyy = 0x8834 - ISOSpeedLatitudezzz = 0x8835 - ExifVersion = 0x9000 - DateTimeOriginal = 0x9003 - DateTimeDigitized = 0x9004 - OffsetTime = 0x9010 - OffsetTimeOriginal = 0x9011 - OffsetTimeDigitized = 0x9012 - ComponentsConfiguration = 0x9101 - CompressedBitsPerPixel = 0x9102 - ShutterSpeedValue = 0x9201 - ApertureValue = 0x9202 - BrightnessValue = 0x9203 - ExposureBiasValue = 0x9204 - MaxApertureValue = 0x9205 - SubjectDistance = 0x9206 - MeteringMode = 0x9207 - LightSource = 0x9208 - Flash = 0x9209 - FocalLength = 0x920A - Noise = 0x920D - ImageNumber = 0x9211 - SecurityClassification = 0x9212 - ImageHistory = 0x9213 - TIFFEPStandardID = 0x9216 - MakerNote = 0x927C - UserComment = 0x9286 - SubsecTime = 0x9290 - SubsecTimeOriginal = 0x9291 - SubsecTimeDigitized = 0x9292 - AmbientTemperature = 0x9400 - Humidity = 0x9401 - Pressure = 0x9402 - WaterDepth = 0x9403 - Acceleration = 0x9404 - CameraElevationAngle = 0x9405 - XPTitle = 0x9C9B - XPComment = 0x9C9C - XPAuthor = 0x9C9D - XPKeywords = 0x9C9E - XPSubject = 0x9C9F - FlashPixVersion = 0xA000 - ColorSpace = 0xA001 - ExifImageWidth = 0xA002 - ExifImageHeight = 0xA003 - RelatedSoundFile = 0xA004 - ExifInteroperabilityOffset = 0xA005 - FlashEnergy = 0xA20B - SpatialFrequencyResponse = 0xA20C - FocalPlaneXResolution = 0xA20E - FocalPlaneYResolution = 0xA20F - FocalPlaneResolutionUnit = 0xA210 - SubjectLocation = 0xA214 - ExposureIndex = 0xA215 - SensingMethod = 0xA217 - FileSource = 0xA300 - SceneType = 0xA301 - CFAPattern = 0xA302 - CustomRendered = 0xA401 - ExposureMode = 0xA402 - WhiteBalance = 0xA403 - DigitalZoomRatio = 0xA404 - FocalLengthIn35mmFilm = 0xA405 - SceneCaptureType = 0xA406 - GainControl = 0xA407 - Contrast = 0xA408 - Saturation = 0xA409 - Sharpness = 0xA40A - DeviceSettingDescription = 0xA40B - SubjectDistanceRange = 0xA40C - ImageUniqueID = 0xA420 - CameraOwnerName = 0xA430 - BodySerialNumber = 0xA431 - LensSpecification = 0xA432 - LensMake = 0xA433 - LensModel = 0xA434 - LensSerialNumber = 0xA435 - CompositeImage = 0xA460 - CompositeImageCount = 0xA461 - CompositeImageExposureTimes = 0xA462 - Gamma = 0xA500 - PrintImageMatching = 0xC4A5 - DNGVersion = 0xC612 - DNGBackwardVersion = 0xC613 - UniqueCameraModel = 0xC614 - LocalizedCameraModel = 0xC615 - CFAPlaneColor = 0xC616 - CFALayout = 0xC617 - LinearizationTable = 0xC618 - BlackLevelRepeatDim = 0xC619 - BlackLevel = 0xC61A - BlackLevelDeltaH = 0xC61B - BlackLevelDeltaV = 0xC61C - WhiteLevel = 0xC61D - DefaultScale = 0xC61E - DefaultCropOrigin = 0xC61F - DefaultCropSize = 0xC620 - ColorMatrix1 = 0xC621 - ColorMatrix2 = 0xC622 - CameraCalibration1 = 0xC623 - CameraCalibration2 = 0xC624 - ReductionMatrix1 = 0xC625 - ReductionMatrix2 = 0xC626 - AnalogBalance = 0xC627 - AsShotNeutral = 0xC628 - AsShotWhiteXY = 0xC629 - BaselineExposure = 0xC62A - BaselineNoise = 0xC62B - BaselineSharpness = 0xC62C - BayerGreenSplit = 0xC62D - LinearResponseLimit = 0xC62E - CameraSerialNumber = 0xC62F - LensInfo = 0xC630 - ChromaBlurRadius = 0xC631 - AntiAliasStrength = 0xC632 - ShadowScale = 0xC633 - DNGPrivateData = 0xC634 - MakerNoteSafety = 0xC635 - CalibrationIlluminant1 = 0xC65A - CalibrationIlluminant2 = 0xC65B - BestQualityScale = 0xC65C - RawDataUniqueID = 0xC65D - OriginalRawFileName = 0xC68B - OriginalRawFileData = 0xC68C - ActiveArea = 0xC68D - MaskedAreas = 0xC68E - AsShotICCProfile = 0xC68F - AsShotPreProfileMatrix = 0xC690 - CurrentICCProfile = 0xC691 - CurrentPreProfileMatrix = 0xC692 - ColorimetricReference = 0xC6BF - CameraCalibrationSignature = 0xC6F3 - ProfileCalibrationSignature = 0xC6F4 - AsShotProfileName = 0xC6F6 - NoiseReductionApplied = 0xC6F7 - ProfileName = 0xC6F8 - ProfileHueSatMapDims = 0xC6F9 - ProfileHueSatMapData1 = 0xC6FA - ProfileHueSatMapData2 = 0xC6FB - ProfileToneCurve = 0xC6FC - ProfileEmbedPolicy = 0xC6FD - ProfileCopyright = 0xC6FE - ForwardMatrix1 = 0xC714 - ForwardMatrix2 = 0xC715 - PreviewApplicationName = 0xC716 - PreviewApplicationVersion = 0xC717 - PreviewSettingsName = 0xC718 - PreviewSettingsDigest = 0xC719 - PreviewColorSpace = 0xC71A - PreviewDateTime = 0xC71B - RawImageDigest = 0xC71C - OriginalRawFileDigest = 0xC71D - SubTileBlockSize = 0xC71E - RowInterleaveFactor = 0xC71F - ProfileLookTableDims = 0xC725 - ProfileLookTableData = 0xC726 - OpcodeList1 = 0xC740 - OpcodeList2 = 0xC741 - OpcodeList3 = 0xC74E - NoiseProfile = 0xC761 - - -"""Maps EXIF tags to tag names.""" -TAGS = { - **{i.value: i.name for i in Base}, - 0x920C: "SpatialFrequencyResponse", - 0x9214: "SubjectLocation", - 0x9215: "ExposureIndex", - 0x828E: "CFAPattern", - 0x920B: "FlashEnergy", - 0x9216: "TIFF/EPStandardID", -} - - -class GPS(IntEnum): - GPSVersionID = 0x00 - GPSLatitudeRef = 0x01 - GPSLatitude = 0x02 - GPSLongitudeRef = 0x03 - GPSLongitude = 0x04 - GPSAltitudeRef = 0x05 - GPSAltitude = 0x06 - GPSTimeStamp = 0x07 - GPSSatellites = 0x08 - GPSStatus = 0x09 - GPSMeasureMode = 0x0A - GPSDOP = 0x0B - GPSSpeedRef = 0x0C - GPSSpeed = 0x0D - GPSTrackRef = 0x0E - GPSTrack = 0x0F - GPSImgDirectionRef = 0x10 - GPSImgDirection = 0x11 - GPSMapDatum = 0x12 - GPSDestLatitudeRef = 0x13 - GPSDestLatitude = 0x14 - GPSDestLongitudeRef = 0x15 - GPSDestLongitude = 0x16 - GPSDestBearingRef = 0x17 - GPSDestBearing = 0x18 - GPSDestDistanceRef = 0x19 - GPSDestDistance = 0x1A - GPSProcessingMethod = 0x1B - GPSAreaInformation = 0x1C - GPSDateStamp = 0x1D - GPSDifferential = 0x1E - GPSHPositioningError = 0x1F - - -"""Maps EXIF GPS tags to tag names.""" -GPSTAGS = {i.value: i.name for i in GPS} - - -class Interop(IntEnum): - InteropIndex = 0x0001 - InteropVersion = 0x0002 - RelatedImageFileFormat = 0x1000 - RelatedImageWidth = 0x1001 - RelatedImageHeight = 0x1002 - - -class IFD(IntEnum): - Exif = 0x8769 - GPSInfo = 0x8825 - MakerNote = 0x927C - Makernote = 0x927C # Deprecated - Interop = 0xA005 - IFD1 = -1 - - -class LightSource(IntEnum): - Unknown = 0x00 - Daylight = 0x01 - Fluorescent = 0x02 - Tungsten = 0x03 - Flash = 0x04 - Fine = 0x09 - Cloudy = 0x0A - Shade = 0x0B - DaylightFluorescent = 0x0C - DayWhiteFluorescent = 0x0D - CoolWhiteFluorescent = 0x0E - WhiteFluorescent = 0x0F - StandardLightA = 0x11 - StandardLightB = 0x12 - StandardLightC = 0x13 - D55 = 0x14 - D65 = 0x15 - D75 = 0x16 - D50 = 0x17 - ISO = 0x18 - Other = 0xFF diff --git a/voxvera/vendor/PIL/FitsImagePlugin.py b/voxvera/vendor/PIL/FitsImagePlugin.py deleted file mode 100644 index a3fdc0e..0000000 --- a/voxvera/vendor/PIL/FitsImagePlugin.py +++ /dev/null @@ -1,152 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# FITS file handling -# -# Copyright (c) 1998-2003 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import gzip -import math - -from . import Image, ImageFile - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"SIMPLE") - - -class FitsImageFile(ImageFile.ImageFile): - format = "FITS" - format_description = "FITS" - - def _open(self) -> None: - assert self.fp is not None - - headers: dict[bytes, bytes] = {} - header_in_progress = False - decoder_name = "" - while True: - header = self.fp.read(80) - if not header: - msg = "Truncated FITS file" - raise OSError(msg) - keyword = header[:8].strip() - if keyword in (b"SIMPLE", b"XTENSION"): - header_in_progress = True - elif headers and not header_in_progress: - # This is now a data unit - break - elif keyword == b"END": - # Seek to the end of the header unit - self.fp.seek(math.ceil(self.fp.tell() / 2880) * 2880) - if not decoder_name: - decoder_name, offset, args = self._parse_headers(headers) - - header_in_progress = False - continue - - if decoder_name: - # Keep going to read past the headers - continue - - value = header[8:].split(b"/")[0].strip() - if value.startswith(b"="): - value = value[1:].strip() - if not headers and (not _accept(keyword) or value != b"T"): - msg = "Not a FITS file" - raise SyntaxError(msg) - headers[keyword] = value - - if not decoder_name: - msg = "No image data" - raise ValueError(msg) - - offset += self.fp.tell() - 80 - self.tile = [ImageFile._Tile(decoder_name, (0, 0) + self.size, offset, args)] - - def _get_size( - self, headers: dict[bytes, bytes], prefix: bytes - ) -> tuple[int, int] | None: - naxis = int(headers[prefix + b"NAXIS"]) - if naxis == 0: - return None - - if naxis == 1: - return 1, int(headers[prefix + b"NAXIS1"]) - else: - return int(headers[prefix + b"NAXIS1"]), int(headers[prefix + b"NAXIS2"]) - - def _parse_headers( - self, headers: dict[bytes, bytes] - ) -> tuple[str, int, tuple[str | int, ...]]: - prefix = b"" - decoder_name = "raw" - offset = 0 - if ( - headers.get(b"XTENSION") == b"'BINTABLE'" - and headers.get(b"ZIMAGE") == b"T" - and headers[b"ZCMPTYPE"] == b"'GZIP_1 '" - ): - no_prefix_size = self._get_size(headers, prefix) or (0, 0) - number_of_bits = int(headers[b"BITPIX"]) - offset = no_prefix_size[0] * no_prefix_size[1] * (number_of_bits // 8) - - prefix = b"Z" - decoder_name = "fits_gzip" - - size = self._get_size(headers, prefix) - if not size: - return "", 0, () - - self._size = size - - number_of_bits = int(headers[prefix + b"BITPIX"]) - if number_of_bits == 8: - self._mode = "L" - elif number_of_bits == 16: - self._mode = "I;16" - elif number_of_bits == 32: - self._mode = "I" - elif number_of_bits in (-32, -64): - self._mode = "F" - - args: tuple[str | int, ...] - if decoder_name == "raw": - args = (self.mode, 0, -1) - else: - args = (number_of_bits,) - return decoder_name, offset, args - - -class FitsGzipDecoder(ImageFile.PyDecoder): - _pulls_fd = True - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - assert self.fd is not None - value = gzip.decompress(self.fd.read()) - - rows = [] - offset = 0 - number_of_bits = min(self.args[0] // 8, 4) - for y in range(self.state.ysize): - row = bytearray() - for x in range(self.state.xsize): - row += value[offset + (4 - number_of_bits) : offset + 4] - offset += 4 - rows.append(row) - self.set_as_raw(bytes([pixel for row in rows[::-1] for pixel in row])) - return -1, 0 - - -# -------------------------------------------------------------------- -# Registry - -Image.register_open(FitsImageFile.format, FitsImageFile, _accept) -Image.register_decoder("fits_gzip", FitsGzipDecoder) - -Image.register_extensions(FitsImageFile.format, [".fit", ".fits"]) diff --git a/voxvera/vendor/PIL/FliImagePlugin.py b/voxvera/vendor/PIL/FliImagePlugin.py deleted file mode 100644 index da1e8e9..0000000 --- a/voxvera/vendor/PIL/FliImagePlugin.py +++ /dev/null @@ -1,184 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# FLI/FLC file handling. -# -# History: -# 95-09-01 fl Created -# 97-01-03 fl Fixed parser, setup decoder tile -# 98-07-15 fl Renamed offset attribute to avoid name clash -# -# Copyright (c) Secret Labs AB 1997-98. -# Copyright (c) Fredrik Lundh 1995-97. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os - -from . import Image, ImageFile, ImagePalette -from ._binary import i16le as i16 -from ._binary import i32le as i32 -from ._binary import o8 -from ._util import DeferredError - -# -# decoder - - -def _accept(prefix: bytes) -> bool: - return ( - len(prefix) >= 16 - and i16(prefix, 4) in [0xAF11, 0xAF12] - and i16(prefix, 14) in [0, 3] # flags - ) - - -## -# Image plugin for the FLI/FLC animation format. Use the seek -# method to load individual frames. - - -class FliImageFile(ImageFile.ImageFile): - format = "FLI" - format_description = "Autodesk FLI/FLC Animation" - _close_exclusive_fp_after_loading = False - - def _open(self) -> None: - # HEAD - assert self.fp is not None - s = self.fp.read(128) - if not ( - _accept(s) - and s[20:22] == b"\x00" * 2 - and s[42:80] == b"\x00" * 38 - and s[88:] == b"\x00" * 40 - ): - msg = "not an FLI/FLC file" - raise SyntaxError(msg) - - # frames - self.n_frames = i16(s, 6) - self.is_animated = self.n_frames > 1 - - # image characteristics - self._mode = "P" - self._size = i16(s, 8), i16(s, 10) - - # animation speed - duration = i32(s, 16) - magic = i16(s, 4) - if magic == 0xAF11: - duration = (duration * 1000) // 70 - self.info["duration"] = duration - - # look for palette - palette = [(a, a, a) for a in range(256)] - - s = self.fp.read(16) - - self.__offset = 128 - - if i16(s, 4) == 0xF100: - # prefix chunk; ignore it - self.fp.seek(self.__offset + i32(s)) - s = self.fp.read(16) - - if i16(s, 4) == 0xF1FA: - # look for palette chunk - number_of_subchunks = i16(s, 6) - chunk_size: int | None = None - for _ in range(number_of_subchunks): - if chunk_size is not None: - self.fp.seek(chunk_size - 6, os.SEEK_CUR) - s = self.fp.read(6) - chunk_type = i16(s, 4) - if chunk_type in (4, 11): - self._palette(palette, 2 if chunk_type == 11 else 0) - break - chunk_size = i32(s) - if not chunk_size: - break - - self.palette = ImagePalette.raw( - "RGB", b"".join(o8(r) + o8(g) + o8(b) for (r, g, b) in palette) - ) - - # set things up to decode first frame - self.__frame = -1 - self._fp = self.fp - self.__rewind = self.fp.tell() - self.seek(0) - - def _palette(self, palette: list[tuple[int, int, int]], shift: int) -> None: - # load palette - - i = 0 - assert self.fp is not None - for e in range(i16(self.fp.read(2))): - s = self.fp.read(2) - i = i + s[0] - n = s[1] - if n == 0: - n = 256 - s = self.fp.read(n * 3) - for n in range(0, len(s), 3): - r = s[n] << shift - g = s[n + 1] << shift - b = s[n + 2] << shift - palette[i] = (r, g, b) - i += 1 - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - if frame < self.__frame: - self._seek(0) - - for f in range(self.__frame + 1, frame + 1): - self._seek(f) - - def _seek(self, frame: int) -> None: - if isinstance(self._fp, DeferredError): - raise self._fp.ex - if frame == 0: - self.__frame = -1 - self._fp.seek(self.__rewind) - self.__offset = 128 - else: - # ensure that the previous frame was loaded - self.load() - - if frame != self.__frame + 1: - msg = f"cannot seek to frame {frame}" - raise ValueError(msg) - self.__frame = frame - - # move to next frame - self.fp = self._fp - self.fp.seek(self.__offset) - - s = self.fp.read(4) - if not s: - msg = "missing frame size" - raise EOFError(msg) - - framesize = i32(s) - - self.decodermaxblock = framesize - self.tile = [ImageFile._Tile("fli", (0, 0) + self.size, self.__offset)] - - self.__offset += framesize - - def tell(self) -> int: - return self.__frame - - -# -# registry - -Image.register_open(FliImageFile.format, FliImageFile, _accept) - -Image.register_extensions(FliImageFile.format, [".fli", ".flc"]) diff --git a/voxvera/vendor/PIL/FontFile.py b/voxvera/vendor/PIL/FontFile.py deleted file mode 100644 index 1e0c1c1..0000000 --- a/voxvera/vendor/PIL/FontFile.py +++ /dev/null @@ -1,134 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# base class for raster font file parsers -# -# history: -# 1997-06-05 fl created -# 1997-08-19 fl restrict image width -# -# Copyright (c) 1997-1998 by Secret Labs AB -# Copyright (c) 1997-1998 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os -from typing import BinaryIO - -from . import Image, _binary - -WIDTH = 800 - - -def puti16( - fp: BinaryIO, values: tuple[int, int, int, int, int, int, int, int, int, int] -) -> None: - """Write network order (big-endian) 16-bit sequence""" - for v in values: - if v < 0: - v += 65536 - fp.write(_binary.o16be(v)) - - -class FontFile: - """Base class for raster font file handlers.""" - - bitmap: Image.Image | None = None - - def __init__(self) -> None: - self.info: dict[bytes, bytes | int] = {} - self.glyph: list[ - tuple[ - tuple[int, int], - tuple[int, int, int, int], - tuple[int, int, int, int], - Image.Image, - ] - | None - ] = [None] * 256 - - def __getitem__(self, ix: int) -> ( - tuple[ - tuple[int, int], - tuple[int, int, int, int], - tuple[int, int, int, int], - Image.Image, - ] - | None - ): - return self.glyph[ix] - - def compile(self) -> None: - """Create metrics and bitmap""" - - if self.bitmap: - return - - # create bitmap large enough to hold all data - h = w = maxwidth = 0 - lines = 1 - for glyph in self.glyph: - if glyph: - d, dst, src, im = glyph - h = max(h, src[3] - src[1]) - w = w + (src[2] - src[0]) - if w > WIDTH: - lines += 1 - w = src[2] - src[0] - maxwidth = max(maxwidth, w) - - xsize = maxwidth - ysize = lines * h - - if xsize == 0 and ysize == 0: - return - - self.ysize = h - - # paste glyphs into bitmap - self.bitmap = Image.new("1", (xsize, ysize)) - self.metrics: list[ - tuple[tuple[int, int], tuple[int, int, int, int], tuple[int, int, int, int]] - | None - ] = [None] * 256 - x = y = 0 - for i in range(256): - glyph = self[i] - if glyph: - d, dst, src, im = glyph - xx = src[2] - src[0] - x0, y0 = x, y - x = x + xx - if x > WIDTH: - x, y = 0, y + h - x0, y0 = x, y - x = xx - s = src[0] + x0, src[1] + y0, src[2] + x0, src[3] + y0 - self.bitmap.paste(im.crop(src), s) - self.metrics[i] = d, dst, s - - def save(self, filename: str) -> None: - """Save font""" - - self.compile() - - # font data - if not self.bitmap: - msg = "No bitmap created" - raise ValueError(msg) - self.bitmap.save(os.path.splitext(filename)[0] + ".pbm", "PNG") - - # font metrics - with open(os.path.splitext(filename)[0] + ".pil", "wb") as fp: - fp.write(b"PILfont\n") - fp.write(f";;;;;;{self.ysize};\n".encode("ascii")) # HACK!!! - fp.write(b"DATA\n") - for id in range(256): - m = self.metrics[id] - if not m: - puti16(fp, (0,) * 10) - else: - puti16(fp, m[0] + m[1] + m[2]) diff --git a/voxvera/vendor/PIL/FpxImagePlugin.py b/voxvera/vendor/PIL/FpxImagePlugin.py deleted file mode 100644 index 2979712..0000000 --- a/voxvera/vendor/PIL/FpxImagePlugin.py +++ /dev/null @@ -1,259 +0,0 @@ -# -# THIS IS WORK IN PROGRESS -# -# The Python Imaging Library. -# $Id$ -# -# FlashPix support for PIL -# -# History: -# 97-01-25 fl Created (reads uncompressed RGB images only) -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1997. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import olefile - -from . import Image, ImageFile -from ._binary import i32le as i32 - -# we map from colour field tuples to (mode, rawmode) descriptors -MODES = { - # opacity - (0x00007FFE,): ("A", "L"), - # monochrome - (0x00010000,): ("L", "L"), - (0x00018000, 0x00017FFE): ("RGBA", "LA"), - # photo YCC - (0x00020000, 0x00020001, 0x00020002): ("RGB", "YCC;P"), - (0x00028000, 0x00028001, 0x00028002, 0x00027FFE): ("RGBA", "YCCA;P"), - # standard RGB (NIFRGB) - (0x00030000, 0x00030001, 0x00030002): ("RGB", "RGB"), - (0x00038000, 0x00038001, 0x00038002, 0x00037FFE): ("RGBA", "RGBA"), -} - - -# -# -------------------------------------------------------------------- - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(olefile.MAGIC) - - -## -# Image plugin for the FlashPix images. - - -class FpxImageFile(ImageFile.ImageFile): - format = "FPX" - format_description = "FlashPix" - - def _open(self) -> None: - # - # read the OLE directory and see if this is a likely - # to be a FlashPix file - - assert self.fp is not None - try: - self.ole = olefile.OleFileIO(self.fp) - except OSError as e: - msg = "not an FPX file; invalid OLE file" - raise SyntaxError(msg) from e - - root = self.ole.root - if not root or root.clsid != "56616700-C154-11CE-8553-00AA00A1F95B": - msg = "not an FPX file; bad root CLSID" - raise SyntaxError(msg) - - self._open_index(1) - - def _open_index(self, index: int = 1) -> None: - # - # get the Image Contents Property Set - - prop = self.ole.getproperties( - [f"Data Object Store {index:06d}", "\005Image Contents"] - ) - - # size (highest resolution) - - assert isinstance(prop[0x1000002], int) - assert isinstance(prop[0x1000003], int) - self._size = prop[0x1000002], prop[0x1000003] - - size = max(self.size) - i = 1 - while size > 64: - size = size // 2 - i += 1 - self.maxid = i - 1 - - # mode. instead of using a single field for this, flashpix - # requires you to specify the mode for each channel in each - # resolution subimage, and leaves it to the decoder to make - # sure that they all match. for now, we'll cheat and assume - # that this is always the case. - - id = self.maxid << 16 - - s = prop[0x2000002 | id] - - if not isinstance(s, bytes) or (bands := i32(s, 4)) > 4: - msg = "Invalid number of bands" - raise OSError(msg) - - # note: for now, we ignore the "uncalibrated" flag - colors = tuple(i32(s, 8 + i * 4) & 0x7FFFFFFF for i in range(bands)) - - self._mode, self.rawmode = MODES[colors] - - # load JPEG tables, if any - self.jpeg = {} - for i in range(256): - id = 0x3000001 | (i << 16) - if id in prop: - self.jpeg[i] = prop[id] - - self._open_subimage(1, self.maxid) - - def _open_subimage(self, index: int = 1, subimage: int = 0) -> None: - # - # setup tile descriptors for a given subimage - - stream = [ - f"Data Object Store {index:06d}", - f"Resolution {subimage:04d}", - "Subimage 0000 Header", - ] - - fp = self.ole.openstream(stream) - - # skip prefix - fp.read(28) - - # header stream - s = fp.read(36) - - size = i32(s, 4), i32(s, 8) - # tilecount = i32(s, 12) - tilesize = i32(s, 16), i32(s, 20) - # channels = i32(s, 24) - offset = i32(s, 28) - length = i32(s, 32) - - if size != self.size: - msg = "subimage mismatch" - raise OSError(msg) - - # get tile descriptors - fp.seek(28 + offset) - s = fp.read(i32(s, 12) * length) - - x = y = 0 - xsize, ysize = size - xtile, ytile = tilesize - self.tile = [] - - for i in range(0, len(s), length): - x1 = min(xsize, x + xtile) - y1 = min(ysize, y + ytile) - - compression = i32(s, i + 8) - - if compression == 0: - self.tile.append( - ImageFile._Tile( - "raw", - (x, y, x1, y1), - i32(s, i) + 28, - self.rawmode, - ) - ) - - elif compression == 1: - # FIXME: the fill decoder is not implemented - self.tile.append( - ImageFile._Tile( - "fill", - (x, y, x1, y1), - i32(s, i) + 28, - (self.rawmode, s[12:16]), - ) - ) - - elif compression == 2: - internal_color_conversion = s[14] - jpeg_tables = s[15] - rawmode = self.rawmode - - if internal_color_conversion: - # The image is stored as usual (usually YCbCr). - if rawmode == "RGBA": - # For "RGBA", data is stored as YCbCrA based on - # negative RGB. The following trick works around - # this problem : - jpegmode, rawmode = "YCbCrK", "CMYK" - else: - jpegmode = None # let the decoder decide - - else: - # The image is stored as defined by rawmode - jpegmode = rawmode - - self.tile.append( - ImageFile._Tile( - "jpeg", - (x, y, x1, y1), - i32(s, i) + 28, - (rawmode, jpegmode), - ) - ) - - # FIXME: jpeg tables are tile dependent; the prefix - # data must be placed in the tile descriptor itself! - - if jpeg_tables: - self.tile_prefix = self.jpeg[jpeg_tables] - - else: - msg = "unknown/invalid compression" - raise OSError(msg) - - x = x + xtile - if x >= xsize: - x, y = 0, y + ytile - if y >= ysize: - break # isn't really required - - assert self.fp is not None - self.stream = stream - self._fp = self.fp - self.fp = None - - def load(self) -> Image.core.PixelAccess | None: - if not self.fp: - self.fp = self.ole.openstream(self.stream[:2] + ["Subimage 0000 Data"]) - - return ImageFile.ImageFile.load(self) - - def close(self) -> None: - self.ole.close() - super().close() - - def __exit__(self, *args: object) -> None: - self.ole.close() - super().__exit__() - - -# -# -------------------------------------------------------------------- - - -Image.register_open(FpxImageFile.format, FpxImageFile, _accept) - -Image.register_extension(FpxImageFile.format, ".fpx") diff --git a/voxvera/vendor/PIL/FtexImagePlugin.py b/voxvera/vendor/PIL/FtexImagePlugin.py deleted file mode 100644 index e4d836c..0000000 --- a/voxvera/vendor/PIL/FtexImagePlugin.py +++ /dev/null @@ -1,115 +0,0 @@ -""" -A Pillow loader for .ftc and .ftu files (FTEX) -Jerome Leclanche - -The contents of this file are hereby released in the public domain (CC0) -Full text of the CC0 license: - https://creativecommons.org/publicdomain/zero/1.0/ - -Independence War 2: Edge Of Chaos - Texture File Format - 16 October 2001 - -The textures used for 3D objects in Independence War 2: Edge Of Chaos are in a -packed custom format called FTEX. This file format uses file extensions FTC -and FTU. -* FTC files are compressed textures (using standard texture compression). -* FTU files are not compressed. -Texture File Format -The FTC and FTU texture files both use the same format. This -has the following structure: -{header} -{format_directory} -{data} -Where: -{header} = { - u32:magic, - u32:version, - u32:width, - u32:height, - u32:mipmap_count, - u32:format_count -} - -* The "magic" number is "FTEX". -* "width" and "height" are the dimensions of the texture. -* "mipmap_count" is the number of mipmaps in the texture. -* "format_count" is the number of texture formats (different versions of the -same texture) in this file. - -{format_directory} = format_count * { u32:format, u32:where } - -The format value is 0 for DXT1 compressed textures and 1 for 24-bit RGB -uncompressed textures. -The texture data for a format starts at the position "where" in the file. - -Each set of texture data in the file has the following structure: -{data} = format_count * { u32:mipmap_size, mipmap_size * { u8 } } -* "mipmap_size" is the number of bytes in that mip level. For compressed -textures this is the size of the texture data compressed with DXT1. For 24 bit -uncompressed textures, this is 3 * width * height. Following this are the image -bytes for that mipmap level. - -Note: All data is stored in little-Endian (Intel) byte order. -""" - -from __future__ import annotations - -import struct -from enum import IntEnum -from io import BytesIO - -from . import Image, ImageFile - -MAGIC = b"FTEX" - - -class Format(IntEnum): - DXT1 = 0 - UNCOMPRESSED = 1 - - -class FtexImageFile(ImageFile.ImageFile): - format = "FTEX" - format_description = "Texture File Format (IW2:EOC)" - - def _open(self) -> None: - assert self.fp is not None - if not _accept(self.fp.read(4)): - msg = "not an FTEX file" - raise SyntaxError(msg) - struct.unpack(" None: - pass - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(MAGIC) - - -Image.register_open(FtexImageFile.format, FtexImageFile, _accept) -Image.register_extensions(FtexImageFile.format, [".ftc", ".ftu"]) diff --git a/voxvera/vendor/PIL/GbrImagePlugin.py b/voxvera/vendor/PIL/GbrImagePlugin.py deleted file mode 100644 index ec666c8..0000000 --- a/voxvera/vendor/PIL/GbrImagePlugin.py +++ /dev/null @@ -1,103 +0,0 @@ -# -# The Python Imaging Library -# -# load a GIMP brush file -# -# History: -# 96-03-14 fl Created -# 16-01-08 es Version 2 -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1996. -# Copyright (c) Eric Soroos 2016. -# -# See the README file for information on usage and redistribution. -# -# -# See https://github.com/GNOME/gimp/blob/mainline/devel-docs/gbr.txt for -# format documentation. -# -# This code Interprets version 1 and 2 .gbr files. -# Version 1 files are obsolete, and should not be used for new -# brushes. -# Version 2 files are saved by GIMP v2.8 (at least) -# Version 3 files have a format specifier of 18 for 16bit floats in -# the color depth field. This is currently unsupported by Pillow. -from __future__ import annotations - -from . import Image, ImageFile -from ._binary import i32be as i32 - - -def _accept(prefix: bytes) -> bool: - return len(prefix) >= 8 and i32(prefix, 0) >= 20 and i32(prefix, 4) in (1, 2) - - -## -# Image plugin for the GIMP brush format. - - -class GbrImageFile(ImageFile.ImageFile): - format = "GBR" - format_description = "GIMP brush file" - - def _open(self) -> None: - assert self.fp is not None - header_size = i32(self.fp.read(4)) - if header_size < 20: - msg = "not a GIMP brush" - raise SyntaxError(msg) - version = i32(self.fp.read(4)) - if version not in (1, 2): - msg = f"Unsupported GIMP brush version: {version}" - raise SyntaxError(msg) - - width = i32(self.fp.read(4)) - height = i32(self.fp.read(4)) - color_depth = i32(self.fp.read(4)) - if width == 0 or height == 0: - msg = "not a GIMP brush" - raise SyntaxError(msg) - if color_depth not in (1, 4): - msg = f"Unsupported GIMP brush color depth: {color_depth}" - raise SyntaxError(msg) - - if version == 1: - comment_length = header_size - 20 - else: - comment_length = header_size - 28 - magic_number = self.fp.read(4) - if magic_number != b"GIMP": - msg = "not a GIMP brush, bad magic number" - raise SyntaxError(msg) - self.info["spacing"] = i32(self.fp.read(4)) - - self.info["comment"] = self.fp.read(comment_length)[:-1] - - if color_depth == 1: - self._mode = "L" - else: - self._mode = "RGBA" - - self._size = width, height - - # Image might not be small - Image._decompression_bomb_check(self.size) - - # Data is an uncompressed block of w * h * bytes/pixel - self._data_size = width * height * color_depth - - def load(self) -> Image.core.PixelAccess | None: - if self._im is None: - assert self.fp is not None - self.im = Image.core.new(self.mode, self.size) - self.frombytes(self.fp.read(self._data_size)) - return Image.Image.load(self) - - -# -# registry - - -Image.register_open(GbrImageFile.format, GbrImageFile, _accept) -Image.register_extension(GbrImageFile.format, ".gbr") diff --git a/voxvera/vendor/PIL/GdImageFile.py b/voxvera/vendor/PIL/GdImageFile.py deleted file mode 100644 index 891225c..0000000 --- a/voxvera/vendor/PIL/GdImageFile.py +++ /dev/null @@ -1,102 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# GD file handling -# -# History: -# 1996-04-12 fl Created -# -# Copyright (c) 1997 by Secret Labs AB. -# Copyright (c) 1996 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# - - -""" -.. note:: - This format cannot be automatically recognized, so the - class is not registered for use with :py:func:`PIL.Image.open()`. To open a - gd file, use the :py:func:`PIL.GdImageFile.open()` function instead. - -.. warning:: - THE GD FORMAT IS NOT DESIGNED FOR DATA INTERCHANGE. This - implementation is provided for convenience and demonstrational - purposes only. -""" -from __future__ import annotations - -from typing import IO - -from . import ImageFile, ImagePalette, UnidentifiedImageError -from ._binary import i16be as i16 -from ._binary import i32be as i32 -from ._typing import StrOrBytesPath - - -class GdImageFile(ImageFile.ImageFile): - """ - Image plugin for the GD uncompressed format. Note that this format - is not supported by the standard :py:func:`PIL.Image.open()` function. To use - this plugin, you have to import the :py:mod:`PIL.GdImageFile` module and - use the :py:func:`PIL.GdImageFile.open()` function. - """ - - format = "GD" - format_description = "GD uncompressed images" - - def _open(self) -> None: - # Header - assert self.fp is not None - - s = self.fp.read(1037) - - if i16(s) not in [65534, 65535]: - msg = "Not a valid GD 2.x .gd file" - raise SyntaxError(msg) - - self._mode = "P" - self._size = i16(s, 2), i16(s, 4) - - true_color = s[6] - true_color_offset = 2 if true_color else 0 - - # transparency index - tindex = i32(s, 7 + true_color_offset) - if tindex < 256: - self.info["transparency"] = tindex - - self.palette = ImagePalette.raw( - "RGBX", s[7 + true_color_offset + 6 : 7 + true_color_offset + 6 + 256 * 4] - ) - - self.tile = [ - ImageFile._Tile( - "raw", - (0, 0) + self.size, - 7 + true_color_offset + 6 + 256 * 4, - "L", - ) - ] - - -def open(fp: StrOrBytesPath | IO[bytes], mode: str = "r") -> GdImageFile: - """ - Load texture from a GD image file. - - :param fp: GD file name, or an opened file handle. - :param mode: Optional mode. In this version, if the mode argument - is given, it must be "r". - :returns: An image instance. - :raises OSError: If the image could not be read. - """ - if mode != "r": - msg = "bad mode" - raise ValueError(msg) - - try: - return GdImageFile(fp) - except SyntaxError as e: - msg = "cannot identify this image file" - raise UnidentifiedImageError(msg) from e diff --git a/voxvera/vendor/PIL/GifImagePlugin.py b/voxvera/vendor/PIL/GifImagePlugin.py deleted file mode 100644 index 76a0d4a..0000000 --- a/voxvera/vendor/PIL/GifImagePlugin.py +++ /dev/null @@ -1,1217 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# GIF file handling -# -# History: -# 1995-09-01 fl Created -# 1996-12-14 fl Added interlace support -# 1996-12-30 fl Added animation support -# 1997-01-05 fl Added write support, fixed local colour map bug -# 1997-02-23 fl Make sure to load raster data in getdata() -# 1997-07-05 fl Support external decoder (0.4) -# 1998-07-09 fl Handle all modes when saving (0.5) -# 1998-07-15 fl Renamed offset attribute to avoid name clash -# 2001-04-16 fl Added rewind support (seek to frame 0) (0.6) -# 2001-04-17 fl Added palette optimization (0.7) -# 2002-06-06 fl Added transparency support for save (0.8) -# 2004-02-24 fl Disable interlacing for small images -# -# Copyright (c) 1997-2004 by Secret Labs AB -# Copyright (c) 1995-2004 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import itertools -import math -import os -import subprocess -from enum import IntEnum -from functools import cached_property -from typing import Any, NamedTuple, cast - -from . import ( - Image, - ImageChops, - ImageFile, - ImageMath, - ImageOps, - ImagePalette, - ImageSequence, -) -from ._binary import i16le as i16 -from ._binary import o8 -from ._binary import o16le as o16 -from ._util import DeferredError - -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import IO, Literal - - from . import _imaging - from ._typing import Buffer - - -class LoadingStrategy(IntEnum): - """.. versionadded:: 9.1.0""" - - RGB_AFTER_FIRST = 0 - RGB_AFTER_DIFFERENT_PALETTE_ONLY = 1 - RGB_ALWAYS = 2 - - -#: .. versionadded:: 9.1.0 -LOADING_STRATEGY = LoadingStrategy.RGB_AFTER_FIRST - -# -------------------------------------------------------------------- -# Identify/read GIF files - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith((b"GIF87a", b"GIF89a")) - - -## -# Image plugin for GIF images. This plugin supports both GIF87 and -# GIF89 images. - - -class GifImageFile(ImageFile.ImageFile): - format = "GIF" - format_description = "Compuserve GIF" - _close_exclusive_fp_after_loading = False - - global_palette = None - - def data(self) -> bytes | None: - assert self.fp is not None - s = self.fp.read(1) - if s and s[0]: - return self.fp.read(s[0]) - return None - - def _is_palette_needed(self, p: bytes) -> bool: - for i in range(0, len(p), 3): - if not (i // 3 == p[i] == p[i + 1] == p[i + 2]): - return True - return False - - def _open(self) -> None: - # Screen - assert self.fp is not None - s = self.fp.read(13) - if not _accept(s): - msg = "not a GIF file" - raise SyntaxError(msg) - - self.info["version"] = s[:6] - self._size = i16(s, 6), i16(s, 8) - flags = s[10] - bits = (flags & 7) + 1 - - if flags & 128: - # get global palette - self.info["background"] = s[11] - # check if palette contains colour indices - p = self.fp.read(3 << bits) - if self._is_palette_needed(p): - palette = ImagePalette.raw("RGB", p) - self.global_palette = self.palette = palette - - self._fp = self.fp # FIXME: hack - self.__rewind = self.fp.tell() - self._n_frames: int | None = None - self._seek(0) # get ready to read first frame - - @property - def n_frames(self) -> int: - if self._n_frames is None: - current = self.tell() - try: - while True: - self._seek(self.tell() + 1, False) - except EOFError: - self._n_frames = self.tell() + 1 - self.seek(current) - return self._n_frames - - @cached_property - def is_animated(self) -> bool: - if self._n_frames is not None: - return self._n_frames != 1 - - current = self.tell() - if current: - return True - - try: - self._seek(1, False) - is_animated = True - except EOFError: - is_animated = False - - self.seek(current) - return is_animated - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - if frame < self.__frame: - self._im = None - self._seek(0) - - last_frame = self.__frame - for f in range(self.__frame + 1, frame + 1): - try: - self._seek(f) - except EOFError as e: - self.seek(last_frame) - msg = "no more images in GIF file" - raise EOFError(msg) from e - - def _seek(self, frame: int, update_image: bool = True) -> None: - if isinstance(self._fp, DeferredError): - raise self._fp.ex - if frame == 0: - # rewind - self.__offset = 0 - self.dispose: _imaging.ImagingCore | None = None - self.__frame = -1 - self._fp.seek(self.__rewind) - self.disposal_method = 0 - if "comment" in self.info: - del self.info["comment"] - else: - # ensure that the previous frame was loaded - if self.tile and update_image: - self.load() - - if frame != self.__frame + 1: - msg = f"cannot seek to frame {frame}" - raise ValueError(msg) - - self.fp = self._fp - if self.__offset: - # backup to last frame - self.fp.seek(self.__offset) - while self.data(): - pass - self.__offset = 0 - - s = self.fp.read(1) - if not s or s == b";": - msg = "no more images in GIF file" - raise EOFError(msg) - - palette: ImagePalette.ImagePalette | Literal[False] | None = None - - info: dict[str, Any] = {} - frame_transparency = None - interlace = None - frame_dispose_extent = None - while True: - if not s: - s = self.fp.read(1) - if not s or s == b";": - break - - elif s == b"!": - # - # extensions - # - s = self.fp.read(1) - block = self.data() - if s[0] == 249 and block is not None: - # - # graphic control extension - # - flags = block[0] - if flags & 1: - frame_transparency = block[3] - info["duration"] = i16(block, 1) * 10 - - # disposal method - find the value of bits 4 - 6 - dispose_bits = 0b00011100 & flags - dispose_bits = dispose_bits >> 2 - if dispose_bits: - # only set the dispose if it is not - # unspecified. I'm not sure if this is - # correct, but it seems to prevent the last - # frame from looking odd for some animations - self.disposal_method = dispose_bits - elif s[0] == 254: - # - # comment extension - # - comment = b"" - - # Read this comment block - while block: - comment += block - block = self.data() - - if "comment" in info: - # If multiple comment blocks in frame, separate with \n - info["comment"] += b"\n" + comment - else: - info["comment"] = comment - s = b"" - continue - elif s[0] == 255 and frame == 0 and block is not None: - # - # application extension - # - info["extension"] = block, self.fp.tell() - if block.startswith(b"NETSCAPE2.0"): - block = self.data() - if block and len(block) >= 3 and block[0] == 1: - self.info["loop"] = i16(block, 1) - while self.data(): - pass - - elif s == b",": - # - # local image - # - s = self.fp.read(9) - - # extent - x0, y0 = i16(s, 0), i16(s, 2) - x1, y1 = x0 + i16(s, 4), y0 + i16(s, 6) - if (x1 > self.size[0] or y1 > self.size[1]) and update_image: - self._size = max(x1, self.size[0]), max(y1, self.size[1]) - Image._decompression_bomb_check(self._size) - frame_dispose_extent = x0, y0, x1, y1 - flags = s[8] - - interlace = (flags & 64) != 0 - - if flags & 128: - bits = (flags & 7) + 1 - p = self.fp.read(3 << bits) - if self._is_palette_needed(p): - palette = ImagePalette.raw("RGB", p) - else: - palette = False - - # image data - bits = self.fp.read(1)[0] - self.__offset = self.fp.tell() - break - s = b"" - - if interlace is None: - msg = "image not found in GIF frame" - raise EOFError(msg) - - self.__frame = frame - if not update_image: - return - - self.tile = [] - - if self.dispose: - self.im.paste(self.dispose, self.dispose_extent) - - self._frame_palette = palette if palette is not None else self.global_palette - self._frame_transparency = frame_transparency - if frame == 0: - if self._frame_palette: - if LOADING_STRATEGY == LoadingStrategy.RGB_ALWAYS: - self._mode = "RGBA" if frame_transparency is not None else "RGB" - else: - self._mode = "P" - else: - self._mode = "L" - - if palette: - self.palette = palette - elif self.global_palette: - from copy import copy - - self.palette = copy(self.global_palette) - else: - self.palette = None - else: - if self.mode == "P": - if ( - LOADING_STRATEGY != LoadingStrategy.RGB_AFTER_DIFFERENT_PALETTE_ONLY - or palette - ): - if "transparency" in self.info: - self.im.putpalettealpha(self.info["transparency"], 0) - self.im = self.im.convert("RGBA", Image.Dither.FLOYDSTEINBERG) - self._mode = "RGBA" - del self.info["transparency"] - else: - self._mode = "RGB" - self.im = self.im.convert("RGB", Image.Dither.FLOYDSTEINBERG) - - def _rgb(color: int) -> tuple[int, int, int]: - if self._frame_palette: - if color * 3 + 3 > len(self._frame_palette.palette): - color = 0 - return cast( - tuple[int, int, int], - tuple(self._frame_palette.palette[color * 3 : color * 3 + 3]), - ) - else: - return (color, color, color) - - self.dispose = None - self.dispose_extent: tuple[int, int, int, int] | None = frame_dispose_extent - if self.dispose_extent and self.disposal_method >= 2: - try: - if self.disposal_method == 2: - # replace with background colour - - # only dispose the extent in this frame - x0, y0, x1, y1 = self.dispose_extent - dispose_size = (x1 - x0, y1 - y0) - - Image._decompression_bomb_check(dispose_size) - - # by convention, attempt to use transparency first - dispose_mode = "P" - color = self.info.get("transparency", frame_transparency) - if color is not None: - if self.mode in ("RGB", "RGBA"): - dispose_mode = "RGBA" - color = _rgb(color) + (0,) - else: - color = self.info.get("background", 0) - if self.mode in ("RGB", "RGBA"): - dispose_mode = "RGB" - color = _rgb(color) - self.dispose = Image.core.fill(dispose_mode, dispose_size, color) - else: - # replace with previous contents - if self._im is not None: - # only dispose the extent in this frame - self.dispose = self._crop(self.im, self.dispose_extent) - elif frame_transparency is not None: - x0, y0, x1, y1 = self.dispose_extent - dispose_size = (x1 - x0, y1 - y0) - - Image._decompression_bomb_check(dispose_size) - dispose_mode = "P" - color = frame_transparency - if self.mode in ("RGB", "RGBA"): - dispose_mode = "RGBA" - color = _rgb(frame_transparency) + (0,) - self.dispose = Image.core.fill( - dispose_mode, dispose_size, color - ) - except AttributeError: - pass - - if interlace is not None: - transparency = -1 - if frame_transparency is not None: - if frame == 0: - if LOADING_STRATEGY != LoadingStrategy.RGB_ALWAYS: - self.info["transparency"] = frame_transparency - elif self.mode not in ("RGB", "RGBA"): - transparency = frame_transparency - self.tile = [ - ImageFile._Tile( - "gif", - (x0, y0, x1, y1), - self.__offset, - (bits, interlace, transparency), - ) - ] - - if info.get("comment"): - self.info["comment"] = info["comment"] - for k in ["duration", "extension"]: - if k in info: - self.info[k] = info[k] - elif k in self.info: - del self.info[k] - - def load_prepare(self) -> None: - temp_mode = "P" if self._frame_palette else "L" - self._prev_im = None - if self.__frame == 0: - if self._frame_transparency is not None: - self.im = Image.core.fill( - temp_mode, self.size, self._frame_transparency - ) - elif self.mode in ("RGB", "RGBA"): - self._prev_im = self.im - if self._frame_palette: - self.im = Image.core.fill("P", self.size, self._frame_transparency or 0) - self.im.putpalette("RGB", *self._frame_palette.getdata()) - else: - self._im = None - if not self._prev_im and self._im is not None and self.size != self.im.size: - expanded_im = Image.core.fill(self.im.mode, self.size) - if self._frame_palette: - expanded_im.putpalette("RGB", *self._frame_palette.getdata()) - expanded_im.paste(self.im, (0, 0) + self.im.size) - - self.im = expanded_im - self._mode = temp_mode - self._frame_palette = None - - super().load_prepare() - - def load_end(self) -> None: - if self.__frame == 0: - if self.mode == "P" and LOADING_STRATEGY == LoadingStrategy.RGB_ALWAYS: - if self._frame_transparency is not None: - self.im.putpalettealpha(self._frame_transparency, 0) - self._mode = "RGBA" - else: - self._mode = "RGB" - self.im = self.im.convert(self.mode, Image.Dither.FLOYDSTEINBERG) - return - if not self._prev_im: - return - if self.size != self._prev_im.size: - if self._frame_transparency is not None: - expanded_im = Image.core.fill("RGBA", self.size) - else: - expanded_im = Image.core.fill("P", self.size) - expanded_im.putpalette("RGB", "RGB", self.im.getpalette()) - expanded_im = expanded_im.convert("RGB") - expanded_im.paste(self._prev_im, (0, 0) + self._prev_im.size) - - self._prev_im = expanded_im - assert self._prev_im is not None - if self._frame_transparency is not None: - if self.mode == "L": - frame_im = self.im.convert_transparent("LA", self._frame_transparency) - else: - self.im.putpalettealpha(self._frame_transparency, 0) - frame_im = self.im.convert("RGBA") - else: - frame_im = self.im.convert("RGB") - - assert self.dispose_extent is not None - frame_im = self._crop(frame_im, self.dispose_extent) - - self.im = self._prev_im - self._mode = self.im.mode - if frame_im.mode in ("LA", "RGBA"): - self.im.paste(frame_im, self.dispose_extent, frame_im) - else: - self.im.paste(frame_im, self.dispose_extent) - - def tell(self) -> int: - return self.__frame - - -# -------------------------------------------------------------------- -# Write GIF files - - -RAWMODE = {"1": "L", "L": "L", "P": "P"} - - -def _normalize_mode(im: Image.Image) -> Image.Image: - """ - Takes an image (or frame), returns an image in a mode that is appropriate - for saving in a Gif. - - It may return the original image, or it may return an image converted to - palette or 'L' mode. - - :param im: Image object - :returns: Image object - """ - if im.mode in RAWMODE: - im.load() - return im - if Image.getmodebase(im.mode) == "RGB": - im = im.convert("P", palette=Image.Palette.ADAPTIVE) - assert im.palette is not None - if im.palette.mode == "RGBA": - for rgba in im.palette.colors: - if rgba[3] == 0: - im.info["transparency"] = im.palette.colors[rgba] - break - return im - return im.convert("L") - - -_Palette = bytes | bytearray | list[int] | ImagePalette.ImagePalette - - -def _normalize_palette( - im: Image.Image, palette: _Palette | None, info: dict[str, Any] -) -> Image.Image: - """ - Normalizes the palette for image. - - Sets the palette to the incoming palette, if provided. - - Ensures that there's a palette for L mode images - - Optimizes the palette if necessary/desired. - - :param im: Image object - :param palette: bytes object containing the source palette, or .... - :param info: encoderinfo - :returns: Image object - """ - source_palette = None - if palette: - # a bytes palette - if isinstance(palette, (bytes, bytearray, list)): - source_palette = bytearray(palette[:768]) - if isinstance(palette, ImagePalette.ImagePalette): - source_palette = bytearray(palette.palette) - - if im.mode == "P": - if not source_palette: - im_palette = im.getpalette(None) - assert im_palette is not None - source_palette = bytearray(im_palette) - else: # L-mode - if not source_palette: - source_palette = bytearray(i // 3 for i in range(768)) - im.palette = ImagePalette.ImagePalette("RGB", palette=source_palette) - assert source_palette is not None - - if palette: - used_palette_colors: list[int | None] = [] - assert im.palette is not None - for i in range(0, len(source_palette), 3): - source_color = tuple(source_palette[i : i + 3]) - index = im.palette.colors.get(source_color) - if index in used_palette_colors: - index = None - used_palette_colors.append(index) - for i, index in enumerate(used_palette_colors): - if index is None: - for j in range(len(used_palette_colors)): - if j not in used_palette_colors: - used_palette_colors[i] = j - break - dest_map: list[int] = [] - for index in used_palette_colors: - assert index is not None - dest_map.append(index) - im = im.remap_palette(dest_map) - else: - optimized_palette_colors = _get_optimize(im, info) - if optimized_palette_colors is not None: - im = im.remap_palette(optimized_palette_colors, source_palette) - if "transparency" in info: - try: - info["transparency"] = optimized_palette_colors.index( - info["transparency"] - ) - except ValueError: - del info["transparency"] - return im - - assert im.palette is not None - im.palette.palette = source_palette - return im - - -def _write_single_frame( - im: Image.Image, - fp: IO[bytes], - palette: _Palette | None, -) -> None: - im_out = _normalize_mode(im) - for k, v in im_out.info.items(): - if isinstance(k, str): - im.encoderinfo.setdefault(k, v) - im_out = _normalize_palette(im_out, palette, im.encoderinfo) - - for s in _get_global_header(im_out, im.encoderinfo): - fp.write(s) - - # local image header - flags = 0 - if get_interlace(im): - flags = flags | 64 - _write_local_header(fp, im, (0, 0), flags) - - im_out.encoderconfig = (8, get_interlace(im)) - ImageFile._save( - im_out, fp, [ImageFile._Tile("gif", (0, 0) + im.size, 0, RAWMODE[im_out.mode])] - ) - - fp.write(b"\0") # end of image data - - -def _getbbox( - base_im: Image.Image, im_frame: Image.Image -) -> tuple[Image.Image, tuple[int, int, int, int] | None]: - palette_bytes = [ - bytes(im.palette.palette) if im.palette else b"" for im in (base_im, im_frame) - ] - if palette_bytes[0] != palette_bytes[1]: - im_frame = im_frame.convert("RGBA") - base_im = base_im.convert("RGBA") - delta = ImageChops.subtract_modulo(im_frame, base_im) - return delta, delta.getbbox(alpha_only=False) - - -class _Frame(NamedTuple): - im: Image.Image - bbox: tuple[int, int, int, int] | None - encoderinfo: dict[str, Any] - - -def _write_multiple_frames( - im: Image.Image, fp: IO[bytes], palette: _Palette | None -) -> bool: - duration = im.encoderinfo.get("duration") - disposal = im.encoderinfo.get("disposal", im.info.get("disposal")) - - im_frames: list[_Frame] = [] - previous_im: Image.Image | None = None - frame_count = 0 - background_im = None - for imSequence in itertools.chain([im], im.encoderinfo.get("append_images", [])): - for im_frame in ImageSequence.Iterator(imSequence): - # a copy is required here since seek can still mutate the image - im_frame = _normalize_mode(im_frame.copy()) - if frame_count == 0: - for k, v in im_frame.info.items(): - if k == "transparency": - continue - if isinstance(k, str): - im.encoderinfo.setdefault(k, v) - - encoderinfo = im.encoderinfo.copy() - if "transparency" in im_frame.info: - encoderinfo.setdefault("transparency", im_frame.info["transparency"]) - im_frame = _normalize_palette(im_frame, palette, encoderinfo) - if isinstance(duration, (list, tuple)): - encoderinfo["duration"] = duration[frame_count] - elif duration is None and "duration" in im_frame.info: - encoderinfo["duration"] = im_frame.info["duration"] - if isinstance(disposal, (list, tuple)): - encoderinfo["disposal"] = disposal[frame_count] - frame_count += 1 - - diff_frame = None - if im_frames and previous_im: - # delta frame - delta, bbox = _getbbox(previous_im, im_frame) - if not bbox: - # This frame is identical to the previous frame - if encoderinfo.get("duration"): - im_frames[-1].encoderinfo["duration"] += encoderinfo["duration"] - continue - if im_frames[-1].encoderinfo.get("disposal") == 2: - # To appear correctly in viewers using a convention, - # only consider transparency, and not background color - color = im.encoderinfo.get( - "transparency", im.info.get("transparency") - ) - if color is not None: - if background_im is None: - background = _get_background(im_frame, color) - background_im = Image.new("P", im_frame.size, background) - first_palette = im_frames[0].im.palette - assert first_palette is not None - background_im.putpalette(first_palette, first_palette.mode) - bbox = _getbbox(background_im, im_frame)[1] - else: - bbox = (0, 0) + im_frame.size - elif encoderinfo.get("optimize") and im_frame.mode != "1": - if "transparency" not in encoderinfo: - assert im_frame.palette is not None - try: - encoderinfo["transparency"] = ( - im_frame.palette._new_color_index(im_frame) - ) - except ValueError: - pass - if "transparency" in encoderinfo: - # When the delta is zero, fill the image with transparency - diff_frame = im_frame.copy() - fill = Image.new("P", delta.size, encoderinfo["transparency"]) - if delta.mode == "RGBA": - r, g, b, a = delta.split() - mask = ImageMath.lambda_eval( - lambda args: args["convert"]( - args["max"]( - args["max"]( - args["max"](args["r"], args["g"]), args["b"] - ), - args["a"], - ) - * 255, - "1", - ), - r=r, - g=g, - b=b, - a=a, - ) - else: - if delta.mode == "P": - # Convert to L without considering palette - delta_l = Image.new("L", delta.size) - delta_l.putdata(delta.get_flattened_data()) - delta = delta_l - mask = ImageMath.lambda_eval( - lambda args: args["convert"](args["im"] * 255, "1"), - im=delta, - ) - diff_frame.paste(fill, mask=ImageOps.invert(mask)) - else: - bbox = None - previous_im = im_frame - im_frames.append(_Frame(diff_frame or im_frame, bbox, encoderinfo)) - - if len(im_frames) == 1: - if "duration" in im.encoderinfo: - # Since multiple frames will not be written, use the combined duration - im.encoderinfo["duration"] = im_frames[0].encoderinfo["duration"] - return False - - for frame_data in im_frames: - im_frame = frame_data.im - if not frame_data.bbox: - # global header - for s in _get_global_header(im_frame, frame_data.encoderinfo): - fp.write(s) - offset = (0, 0) - else: - # compress difference - if not palette: - frame_data.encoderinfo["include_color_table"] = True - - if frame_data.bbox != (0, 0) + im_frame.size: - im_frame = im_frame.crop(frame_data.bbox) - offset = frame_data.bbox[:2] - _write_frame_data(fp, im_frame, offset, frame_data.encoderinfo) - return True - - -def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - _save(im, fp, filename, save_all=True) - - -def _save( - im: Image.Image, fp: IO[bytes], filename: str | bytes, save_all: bool = False -) -> None: - # header - if "palette" in im.encoderinfo or "palette" in im.info: - palette = im.encoderinfo.get("palette", im.info.get("palette")) - else: - palette = None - im.encoderinfo.setdefault("optimize", True) - - if not save_all or not _write_multiple_frames(im, fp, palette): - _write_single_frame(im, fp, palette) - - fp.write(b";") # end of file - - if hasattr(fp, "flush"): - fp.flush() - - -def get_interlace(im: Image.Image) -> int: - interlace = im.encoderinfo.get("interlace", 1) - - # workaround for @PIL153 - if min(im.size) < 16: - interlace = 0 - - return interlace - - -def _write_local_header( - fp: IO[bytes], im: Image.Image, offset: tuple[int, int], flags: int -) -> None: - try: - transparency = im.encoderinfo["transparency"] - except KeyError: - transparency = None - - if "duration" in im.encoderinfo: - duration = int(im.encoderinfo["duration"] / 10) - else: - duration = 0 - - disposal = int(im.encoderinfo.get("disposal", 0)) - - if transparency is not None or duration != 0 or disposal: - packed_flag = 1 if transparency is not None else 0 - packed_flag |= disposal << 2 - - fp.write( - b"!" - + o8(249) # extension intro - + o8(4) # length - + o8(packed_flag) # packed fields - + o16(duration) # duration - + o8(transparency or 0) # transparency index - + o8(0) - ) - - include_color_table = im.encoderinfo.get("include_color_table") - if include_color_table: - palette_bytes = _get_palette_bytes(im) - color_table_size = _get_color_table_size(palette_bytes) - if color_table_size: - flags = flags | 128 # local color table flag - flags = flags | color_table_size - - fp.write( - b"," - + o16(offset[0]) # offset - + o16(offset[1]) - + o16(im.size[0]) # size - + o16(im.size[1]) - + o8(flags) # flags - ) - if include_color_table and color_table_size: - fp.write(_get_header_palette(palette_bytes)) - fp.write(o8(8)) # bits - - -def _save_netpbm(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - # Unused by default. - # To use, uncomment the register_save call at the end of the file. - # - # If you need real GIF compression and/or RGB quantization, you - # can use the external NETPBM/PBMPLUS utilities. See comments - # below for information on how to enable this. - tempfile = im._dump() - - try: - with open(filename, "wb") as f: - if im.mode != "RGB": - subprocess.check_call( - ["ppmtogif", tempfile], stdout=f, stderr=subprocess.DEVNULL - ) - else: - # Pipe ppmquant output into ppmtogif - # "ppmquant 256 %s | ppmtogif > %s" % (tempfile, filename) - quant_cmd = ["ppmquant", "256", tempfile] - togif_cmd = ["ppmtogif"] - quant_proc = subprocess.Popen( - quant_cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL - ) - togif_proc = subprocess.Popen( - togif_cmd, - stdin=quant_proc.stdout, - stdout=f, - stderr=subprocess.DEVNULL, - ) - - # Allow ppmquant to receive SIGPIPE if ppmtogif exits - assert quant_proc.stdout is not None - quant_proc.stdout.close() - - retcode = quant_proc.wait() - if retcode: - raise subprocess.CalledProcessError(retcode, quant_cmd) - - retcode = togif_proc.wait() - if retcode: - raise subprocess.CalledProcessError(retcode, togif_cmd) - finally: - try: - os.unlink(tempfile) - except OSError: - pass - - -# Force optimization so that we can test performance against -# cases where it took lots of memory and time previously. -_FORCE_OPTIMIZE = False - - -def _get_optimize(im: Image.Image, info: dict[str, Any]) -> list[int] | None: - """ - Palette optimization is a potentially expensive operation. - - This function determines if the palette should be optimized using - some heuristics, then returns the list of palette entries in use. - - :param im: Image object - :param info: encoderinfo - :returns: list of indexes of palette entries in use, or None - """ - if im.mode in ("P", "L") and info and info.get("optimize"): - # Potentially expensive operation. - - # The palette saves 3 bytes per color not used, but palette - # lengths are restricted to 3*(2**N) bytes. Max saving would - # be 768 -> 6 bytes if we went all the way down to 2 colors. - # * If we're over 128 colors, we can't save any space. - # * If there aren't any holes, it's not worth collapsing. - # * If we have a 'large' image, the palette is in the noise. - - # create the new palette if not every color is used - optimise = _FORCE_OPTIMIZE or im.mode == "L" - if optimise or im.width * im.height < 512 * 512: - # check which colors are used - used_palette_colors = [] - for i, count in enumerate(im.histogram()): - if count: - used_palette_colors.append(i) - - if optimise or max(used_palette_colors) >= len(used_palette_colors): - return used_palette_colors - - assert im.palette is not None - num_palette_colors = len(im.palette.palette) // Image.getmodebands( - im.palette.mode - ) - current_palette_size = 1 << (num_palette_colors - 1).bit_length() - if ( - # check that the palette would become smaller when saved - len(used_palette_colors) <= current_palette_size // 2 - # check that the palette is not already the smallest possible size - and current_palette_size > 2 - ): - return used_palette_colors - return None - - -def _get_color_table_size(palette_bytes: bytes) -> int: - # calculate the palette size for the header - if not palette_bytes: - return 0 - elif len(palette_bytes) < 9: - return 1 - else: - return math.ceil(math.log(len(palette_bytes) // 3, 2)) - 1 - - -def _get_header_palette(palette_bytes: bytes) -> bytes: - """ - Returns the palette, null padded to the next power of 2 (*3) bytes - suitable for direct inclusion in the GIF header - - :param palette_bytes: Unpadded palette bytes, in RGBRGB form - :returns: Null padded palette - """ - color_table_size = _get_color_table_size(palette_bytes) - - # add the missing amount of bytes - # the palette has to be 2< 0: - palette_bytes += o8(0) * 3 * actual_target_size_diff - return palette_bytes - - -def _get_palette_bytes(im: Image.Image) -> bytes: - """ - Gets the palette for inclusion in the gif header - - :param im: Image object - :returns: Bytes, len<=768 suitable for inclusion in gif header - """ - if not im.palette: - return b"" - - palette = bytes(im.palette.palette) - if im.palette.mode == "RGBA": - palette = b"".join(palette[i * 4 : i * 4 + 3] for i in range(len(palette) // 3)) - return palette - - -def _get_background( - im: Image.Image, - info_background: int | tuple[int, int, int] | tuple[int, int, int, int] | None, -) -> int: - background = 0 - if info_background: - if isinstance(info_background, tuple): - # WebPImagePlugin stores an RGBA value in info["background"] - # So it must be converted to the same format as GifImagePlugin's - # info["background"] - a global color table index - assert im.palette is not None - try: - background = im.palette.getcolor(info_background, im) - except ValueError as e: - if str(e) not in ( - # If all 256 colors are in use, - # then there is no need for the background color - "cannot allocate more than 256 colors", - # Ignore non-opaque WebP background - "cannot add non-opaque RGBA color to RGB palette", - ): - raise - else: - background = info_background - return background - - -def _get_global_header(im: Image.Image, info: dict[str, Any]) -> list[bytes]: - """Return a list of strings representing a GIF header""" - - # Header Block - # https://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp - - version = b"87a" - if im.info.get("version") == b"89a" or ( - info - and ( - "transparency" in info - or info.get("loop") is not None - or info.get("duration") - or info.get("comment") - ) - ): - version = b"89a" - - background = _get_background(im, info.get("background")) - - palette_bytes = _get_palette_bytes(im) - color_table_size = _get_color_table_size(palette_bytes) - - header = [ - b"GIF" # signature - + version # version - + o16(im.size[0]) # canvas width - + o16(im.size[1]), # canvas height - # Logical Screen Descriptor - # size of global color table + global color table flag - o8(color_table_size + 128), # packed fields - # background + reserved/aspect - o8(background) + o8(0), - # Global Color Table - _get_header_palette(palette_bytes), - ] - if info.get("loop") is not None: - header.append( - b"!" - + o8(255) # extension intro - + o8(11) - + b"NETSCAPE2.0" - + o8(3) - + o8(1) - + o16(info["loop"]) # number of loops - + o8(0) - ) - if info.get("comment"): - comment_block = b"!" + o8(254) # extension intro - - comment = info["comment"] - if isinstance(comment, str): - comment = comment.encode() - for i in range(0, len(comment), 255): - subblock = comment[i : i + 255] - comment_block += o8(len(subblock)) + subblock - - comment_block += o8(0) - header.append(comment_block) - return header - - -def _write_frame_data( - fp: IO[bytes], - im_frame: Image.Image, - offset: tuple[int, int], - params: dict[str, Any], -) -> None: - try: - im_frame.encoderinfo = params - - # local image header - _write_local_header(fp, im_frame, offset, 0) - - ImageFile._save( - im_frame, - fp, - [ImageFile._Tile("gif", (0, 0) + im_frame.size, 0, RAWMODE[im_frame.mode])], - ) - - fp.write(b"\0") # end of image data - finally: - del im_frame.encoderinfo - - -# -------------------------------------------------------------------- -# Legacy GIF utilities - - -def getheader( - im: Image.Image, palette: _Palette | None = None, info: dict[str, Any] | None = None -) -> tuple[list[bytes], list[int] | None]: - """ - Legacy Method to get Gif data from image. - - Warning:: May modify image data. - - :param im: Image object - :param palette: bytes object containing the source palette, or .... - :param info: encoderinfo - :returns: tuple of(list of header items, optimized palette) - - """ - if info is None: - info = {} - - used_palette_colors = _get_optimize(im, info) - - if "background" not in info and "background" in im.info: - info["background"] = im.info["background"] - - im_mod = _normalize_palette(im, palette, info) - im.palette = im_mod.palette - im.im = im_mod.im - header = _get_global_header(im, info) - - return header, used_palette_colors - - -def getdata( - im: Image.Image, offset: tuple[int, int] = (0, 0), **params: Any -) -> list[bytes]: - """ - Legacy Method - - Return a list of strings representing this image. - The first string is a local image header, the rest contains - encoded image data. - - To specify duration, add the time in milliseconds, - e.g. ``getdata(im_frame, duration=1000)`` - - :param im: Image object - :param offset: Tuple of (x, y) pixels. Defaults to (0, 0) - :param \\**params: e.g. duration or other encoder info parameters - :returns: List of bytes containing GIF encoded frame data - - """ - from io import BytesIO - - class Collector(BytesIO): - data = [] - - def write(self, data: Buffer) -> int: - self.data.append(data) - return len(data) - - im.load() # make sure raster data is available - - fp = Collector() - - _write_frame_data(fp, im, offset, params) - - return fp.data - - -# -------------------------------------------------------------------- -# Registry - -Image.register_open(GifImageFile.format, GifImageFile, _accept) -Image.register_save(GifImageFile.format, _save) -Image.register_save_all(GifImageFile.format, _save_all) -Image.register_extension(GifImageFile.format, ".gif") -Image.register_mime(GifImageFile.format, "image/gif") - -# -# Uncomment the following line if you wish to use NETPBM/PBMPLUS -# instead of the built-in "uncompressed" GIF encoder - -# Image.register_save(GifImageFile.format, _save_netpbm) diff --git a/voxvera/vendor/PIL/GimpGradientFile.py b/voxvera/vendor/PIL/GimpGradientFile.py deleted file mode 100644 index 5f26918..0000000 --- a/voxvera/vendor/PIL/GimpGradientFile.py +++ /dev/null @@ -1,153 +0,0 @@ -# -# Python Imaging Library -# $Id$ -# -# stuff to read (and render) GIMP gradient files -# -# History: -# 97-08-23 fl Created -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1997. -# -# See the README file for information on usage and redistribution. -# - -""" -Stuff to translate curve segments to palette values (derived from -the corresponding code in GIMP, written by Federico Mena Quintero. -See the GIMP distribution for more information.) -""" -from __future__ import annotations - -from math import log, pi, sin, sqrt - -from ._binary import o8 - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - from typing import IO - -EPSILON = 1e-10 -"""""" # Enable auto-doc for data member - - -def linear(middle: float, pos: float) -> float: - if pos <= middle: - if middle < EPSILON: - return 0.0 - else: - return 0.5 * pos / middle - else: - pos = pos - middle - middle = 1.0 - middle - if middle < EPSILON: - return 1.0 - else: - return 0.5 + 0.5 * pos / middle - - -def curved(middle: float, pos: float) -> float: - return pos ** (log(0.5) / log(max(middle, EPSILON))) - - -def sine(middle: float, pos: float) -> float: - return (sin((-pi / 2.0) + pi * linear(middle, pos)) + 1.0) / 2.0 - - -def sphere_increasing(middle: float, pos: float) -> float: - return sqrt(1.0 - (linear(middle, pos) - 1.0) ** 2) - - -def sphere_decreasing(middle: float, pos: float) -> float: - return 1.0 - sqrt(1.0 - linear(middle, pos) ** 2) - - -SEGMENTS = [linear, curved, sine, sphere_increasing, sphere_decreasing] -"""""" # Enable auto-doc for data member - - -class GradientFile: - gradient: ( - list[ - tuple[ - float, - float, - float, - list[float], - list[float], - Callable[[float, float], float], - ] - ] - | None - ) = None - - def getpalette(self, entries: int = 256) -> tuple[bytes, str]: - assert self.gradient is not None - palette = [] - - ix = 0 - x0, x1, xm, rgb0, rgb1, segment = self.gradient[ix] - - for i in range(entries): - x = i / (entries - 1) - - while x1 < x: - ix += 1 - x0, x1, xm, rgb0, rgb1, segment = self.gradient[ix] - - w = x1 - x0 - - if w < EPSILON: - scale = segment(0.5, 0.5) - else: - scale = segment((xm - x0) / w, (x - x0) / w) - - # expand to RGBA - r = o8(int(255 * ((rgb1[0] - rgb0[0]) * scale + rgb0[0]) + 0.5)) - g = o8(int(255 * ((rgb1[1] - rgb0[1]) * scale + rgb0[1]) + 0.5)) - b = o8(int(255 * ((rgb1[2] - rgb0[2]) * scale + rgb0[2]) + 0.5)) - a = o8(int(255 * ((rgb1[3] - rgb0[3]) * scale + rgb0[3]) + 0.5)) - - # add to palette - palette.append(r + g + b + a) - - return b"".join(palette), "RGBA" - - -class GimpGradientFile(GradientFile): - """File handler for GIMP's gradient format.""" - - def __init__(self, fp: IO[bytes]) -> None: - if not fp.readline().startswith(b"GIMP Gradient"): - msg = "not a GIMP gradient file" - raise SyntaxError(msg) - - line = fp.readline() - - # GIMP 1.2 gradient files don't contain a name, but GIMP 1.3 files do - if line.startswith(b"Name: "): - line = fp.readline().strip() - - count = int(line) - - self.gradient = [] - - for i in range(count): - s = fp.readline().split() - w = [float(x) for x in s[:11]] - - x0, x1 = w[0], w[2] - xm = w[1] - rgb0 = w[3:7] - rgb1 = w[7:11] - - segment = SEGMENTS[int(s[11])] - cspace = int(s[12]) - - if cspace != 0: - msg = "cannot handle HSV colour space" - raise OSError(msg) - - self.gradient.append((x0, x1, xm, rgb0, rgb1, segment)) diff --git a/voxvera/vendor/PIL/GimpPaletteFile.py b/voxvera/vendor/PIL/GimpPaletteFile.py deleted file mode 100644 index 016257d..0000000 --- a/voxvera/vendor/PIL/GimpPaletteFile.py +++ /dev/null @@ -1,75 +0,0 @@ -# -# Python Imaging Library -# $Id$ -# -# stuff to read GIMP palette files -# -# History: -# 1997-08-23 fl Created -# 2004-09-07 fl Support GIMP 2.0 palette files. -# -# Copyright (c) Secret Labs AB 1997-2004. All rights reserved. -# Copyright (c) Fredrik Lundh 1997-2004. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import re -from io import BytesIO - -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import IO - - -class GimpPaletteFile: - """File handler for GIMP's palette format.""" - - rawmode = "RGB" - - def _read(self, fp: IO[bytes], limit: bool = True) -> None: - if not fp.readline().startswith(b"GIMP Palette"): - msg = "not a GIMP palette file" - raise SyntaxError(msg) - - palette: list[int] = [] - i = 0 - while True: - if limit and i == 256 + 3: - break - - i += 1 - s = fp.readline() - if not s: - break - - # skip fields and comment lines - if re.match(rb"\w+:|#", s): - continue - if limit and len(s) > 100: - msg = "bad palette file" - raise SyntaxError(msg) - - v = s.split(maxsplit=3) - if len(v) < 3: - msg = "bad palette entry" - raise ValueError(msg) - - palette += (int(v[i]) for i in range(3)) - if limit and len(palette) == 768: - break - - self.palette = bytes(palette) - - def __init__(self, fp: IO[bytes]) -> None: - self._read(fp) - - @classmethod - def frombytes(cls, data: bytes) -> GimpPaletteFile: - self = cls.__new__(cls) - self._read(BytesIO(data), False) - return self - - def getpalette(self) -> tuple[bytes, str]: - return self.palette, self.rawmode diff --git a/voxvera/vendor/PIL/GribStubImagePlugin.py b/voxvera/vendor/PIL/GribStubImagePlugin.py deleted file mode 100644 index 146a6fa..0000000 --- a/voxvera/vendor/PIL/GribStubImagePlugin.py +++ /dev/null @@ -1,76 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# GRIB stub adapter -# -# Copyright (c) 1996-2003 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os -from typing import IO - -from . import Image, ImageFile - -_handler = None - - -def register_handler(handler: ImageFile.StubHandler | None) -> None: - """ - Install application-specific GRIB image handler. - - :param handler: Handler object. - """ - global _handler - _handler = handler - - -# -------------------------------------------------------------------- -# Image adapter - - -def _accept(prefix: bytes) -> bool: - return len(prefix) >= 8 and prefix.startswith(b"GRIB") and prefix[7] == 1 - - -class GribStubImageFile(ImageFile.StubImageFile): - format = "GRIB" - format_description = "GRIB" - - def _open(self) -> None: - assert self.fp is not None - if not _accept(self.fp.read(8)): - msg = "Not a GRIB file" - raise SyntaxError(msg) - - self.fp.seek(-8, os.SEEK_CUR) - - # make something up - self._mode = "F" - self._size = 1, 1 - - loader = self._load() - if loader: - loader.open(self) - - def _load(self) -> ImageFile.StubHandler | None: - return _handler - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if _handler is None or not hasattr(_handler, "save"): - msg = "GRIB save handler not installed" - raise OSError(msg) - _handler.save(im, fp, filename) - - -# -------------------------------------------------------------------- -# Registry - -Image.register_open(GribStubImageFile.format, GribStubImageFile, _accept) -Image.register_save(GribStubImageFile.format, _save) - -Image.register_extension(GribStubImageFile.format, ".grib") diff --git a/voxvera/vendor/PIL/Hdf5StubImagePlugin.py b/voxvera/vendor/PIL/Hdf5StubImagePlugin.py deleted file mode 100644 index 1523e95..0000000 --- a/voxvera/vendor/PIL/Hdf5StubImagePlugin.py +++ /dev/null @@ -1,76 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# HDF5 stub adapter -# -# Copyright (c) 2000-2003 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os -from typing import IO - -from . import Image, ImageFile - -_handler = None - - -def register_handler(handler: ImageFile.StubHandler | None) -> None: - """ - Install application-specific HDF5 image handler. - - :param handler: Handler object. - """ - global _handler - _handler = handler - - -# -------------------------------------------------------------------- -# Image adapter - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"\x89HDF\r\n\x1a\n") - - -class HDF5StubImageFile(ImageFile.StubImageFile): - format = "HDF5" - format_description = "HDF5" - - def _open(self) -> None: - assert self.fp is not None - if not _accept(self.fp.read(8)): - msg = "Not an HDF file" - raise SyntaxError(msg) - - self.fp.seek(-8, os.SEEK_CUR) - - # make something up - self._mode = "F" - self._size = 1, 1 - - loader = self._load() - if loader: - loader.open(self) - - def _load(self) -> ImageFile.StubHandler | None: - return _handler - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if _handler is None or not hasattr(_handler, "save"): - msg = "HDF5 save handler not installed" - raise OSError(msg) - _handler.save(im, fp, filename) - - -# -------------------------------------------------------------------- -# Registry - -Image.register_open(HDF5StubImageFile.format, HDF5StubImageFile, _accept) -Image.register_save(HDF5StubImageFile.format, _save) - -Image.register_extensions(HDF5StubImageFile.format, [".h5", ".hdf"]) diff --git a/voxvera/vendor/PIL/IcnsImagePlugin.py b/voxvera/vendor/PIL/IcnsImagePlugin.py deleted file mode 100644 index 058861d..0000000 --- a/voxvera/vendor/PIL/IcnsImagePlugin.py +++ /dev/null @@ -1,402 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# macOS icns file decoder, based on icns.py by Bob Ippolito. -# -# history: -# 2004-10-09 fl Turned into a PIL plugin; removed 2.3 dependencies. -# 2020-04-04 Allow saving on all operating systems. -# -# Copyright (c) 2004 by Bob Ippolito. -# Copyright (c) 2004 by Secret Labs. -# Copyright (c) 2004 by Fredrik Lundh. -# Copyright (c) 2014 by Alastair Houghton. -# Copyright (c) 2020 by Pan Jing. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io -import os -import struct -import sys -from typing import IO - -from . import Image, ImageFile, PngImagePlugin, features - -enable_jpeg2k = features.check_codec("jpg_2000") -if enable_jpeg2k: - from . import Jpeg2KImagePlugin - -MAGIC = b"icns" -HEADERSIZE = 8 - - -def nextheader(fobj: IO[bytes]) -> tuple[bytes, int]: - return struct.unpack(">4sI", fobj.read(HEADERSIZE)) - - -def read_32t( - fobj: IO[bytes], start_length: tuple[int, int], size: tuple[int, int, int] -) -> dict[str, Image.Image]: - # The 128x128 icon seems to have an extra header for some reason. - (start, length) = start_length - fobj.seek(start) - sig = fobj.read(4) - if sig != b"\x00\x00\x00\x00": - msg = "Unknown signature, expecting 0x00000000" - raise SyntaxError(msg) - return read_32(fobj, (start + 4, length - 4), size) - - -def read_32( - fobj: IO[bytes], start_length: tuple[int, int], size: tuple[int, int, int] -) -> dict[str, Image.Image]: - """ - Read a 32bit RGB icon resource. Seems to be either uncompressed or - an RLE packbits-like scheme. - """ - (start, length) = start_length - fobj.seek(start) - pixel_size = (size[0] * size[2], size[1] * size[2]) - sizesq = pixel_size[0] * pixel_size[1] - if length == sizesq * 3: - # uncompressed ("RGBRGBGB") - indata = fobj.read(length) - im = Image.frombuffer("RGB", pixel_size, indata, "raw", "RGB", 0, 1) - else: - # decode image - im = Image.new("RGB", pixel_size, None) - for band_ix in range(3): - data = [] - bytesleft = sizesq - while bytesleft > 0: - byte = fobj.read(1) - if not byte: - break - byte_int = byte[0] - if byte_int & 0x80: - blocksize = byte_int - 125 - byte = fobj.read(1) - for i in range(blocksize): - data.append(byte) - else: - blocksize = byte_int + 1 - data.append(fobj.read(blocksize)) - bytesleft -= blocksize - if bytesleft <= 0: - break - if bytesleft != 0: - msg = f"Error reading channel [{repr(bytesleft)} left]" - raise SyntaxError(msg) - band = Image.frombuffer("L", pixel_size, b"".join(data), "raw", "L", 0, 1) - im.im.putband(band.im, band_ix) - return {"RGB": im} - - -def read_mk( - fobj: IO[bytes], start_length: tuple[int, int], size: tuple[int, int, int] -) -> dict[str, Image.Image]: - # Alpha masks seem to be uncompressed - start = start_length[0] - fobj.seek(start) - pixel_size = (size[0] * size[2], size[1] * size[2]) - sizesq = pixel_size[0] * pixel_size[1] - band = Image.frombuffer("L", pixel_size, fobj.read(sizesq), "raw", "L", 0, 1) - return {"A": band} - - -def read_png_or_jpeg2000( - fobj: IO[bytes], start_length: tuple[int, int], size: tuple[int, int, int] -) -> dict[str, Image.Image]: - (start, length) = start_length - fobj.seek(start) - sig = fobj.read(12) - - im: Image.Image - if sig.startswith(b"\x89PNG\x0d\x0a\x1a\x0a"): - fobj.seek(start) - im = PngImagePlugin.PngImageFile(fobj) - Image._decompression_bomb_check(im.size) - return {"RGBA": im} - elif ( - sig.startswith((b"\xff\x4f\xff\x51", b"\x0d\x0a\x87\x0a")) - or sig == b"\x00\x00\x00\x0cjP \x0d\x0a\x87\x0a" - ): - if not enable_jpeg2k: - msg = ( - "Unsupported icon subimage format (rebuild PIL " - "with JPEG 2000 support to fix this)" - ) - raise ValueError(msg) - # j2k, jpc or j2c - fobj.seek(start) - jp2kstream = fobj.read(length) - f = io.BytesIO(jp2kstream) - im = Jpeg2KImagePlugin.Jpeg2KImageFile(f) - Image._decompression_bomb_check(im.size) - if im.mode != "RGBA": - im = im.convert("RGBA") - return {"RGBA": im} - else: - msg = "Unsupported icon subimage format" - raise ValueError(msg) - - -class IcnsFile: - SIZES = { - (512, 512, 2): [(b"ic10", read_png_or_jpeg2000)], - (512, 512, 1): [(b"ic09", read_png_or_jpeg2000)], - (256, 256, 2): [(b"ic14", read_png_or_jpeg2000)], - (256, 256, 1): [(b"ic08", read_png_or_jpeg2000)], - (128, 128, 2): [(b"ic13", read_png_or_jpeg2000)], - (128, 128, 1): [ - (b"ic07", read_png_or_jpeg2000), - (b"it32", read_32t), - (b"t8mk", read_mk), - ], - (64, 64, 1): [(b"icp6", read_png_or_jpeg2000)], - (32, 32, 2): [(b"ic12", read_png_or_jpeg2000)], - (48, 48, 1): [(b"ih32", read_32), (b"h8mk", read_mk)], - (32, 32, 1): [ - (b"icp5", read_png_or_jpeg2000), - (b"il32", read_32), - (b"l8mk", read_mk), - ], - (16, 16, 2): [(b"ic11", read_png_or_jpeg2000)], - (16, 16, 1): [ - (b"icp4", read_png_or_jpeg2000), - (b"is32", read_32), - (b"s8mk", read_mk), - ], - } - - def __init__(self, fobj: IO[bytes]) -> None: - """ - fobj is a file-like object as an icns resource - """ - # signature : (start, length) - self.dct = {} - self.fobj = fobj - sig, filesize = nextheader(fobj) - if not _accept(sig): - msg = "not an icns file" - raise SyntaxError(msg) - i = HEADERSIZE - while i < filesize: - sig, blocksize = nextheader(fobj) - if blocksize <= 0: - msg = "invalid block header" - raise SyntaxError(msg) - i += HEADERSIZE - blocksize -= HEADERSIZE - self.dct[sig] = (i, blocksize) - fobj.seek(blocksize, io.SEEK_CUR) - i += blocksize - - def itersizes(self) -> list[tuple[int, int, int]]: - sizes = [] - for size, fmts in self.SIZES.items(): - for fmt, reader in fmts: - if fmt in self.dct: - sizes.append(size) - break - return sizes - - def bestsize(self) -> tuple[int, int, int]: - sizes = self.itersizes() - if not sizes: - msg = "No 32bit icon resources found" - raise SyntaxError(msg) - return max(sizes) - - def dataforsize(self, size: tuple[int, int, int]) -> dict[str, Image.Image]: - """ - Get an icon resource as {channel: array}. Note that - the arrays are bottom-up like windows bitmaps and will likely - need to be flipped or transposed in some way. - """ - dct = {} - for code, reader in self.SIZES[size]: - desc = self.dct.get(code) - if desc is not None: - dct.update(reader(self.fobj, desc, size)) - return dct - - def getimage( - self, size: tuple[int, int] | tuple[int, int, int] | None = None - ) -> Image.Image: - if size is None: - size = self.bestsize() - elif len(size) == 2: - size = (size[0], size[1], 1) - channels = self.dataforsize(size) - - im = channels.get("RGBA") - if im: - return im - - im = channels["RGB"].copy() - try: - im.putalpha(channels["A"]) - except KeyError: - pass - return im - - -## -# Image plugin for Mac OS icons. - - -class IcnsImageFile(ImageFile.ImageFile): - """ - PIL image support for Mac OS .icns files. - Chooses the best resolution, but will possibly load - a different size image if you mutate the size attribute - before calling 'load'. - - The info dictionary has a key 'sizes' that is a list - of sizes that the icns file has. - """ - - format = "ICNS" - format_description = "Mac OS icns resource" - - def _open(self) -> None: - assert self.fp is not None - self.icns = IcnsFile(self.fp) - self._mode = "RGBA" - self.info["sizes"] = self.icns.itersizes() - self.best_size = self.icns.bestsize() - self.size = ( - self.best_size[0] * self.best_size[2], - self.best_size[1] * self.best_size[2], - ) - - @property - def size(self) -> tuple[int, int]: - return self._size - - @size.setter - def size(self, value: tuple[int, int]) -> None: - # Check that a matching size exists, - # or that there is a scale that would create a size that matches - for size in self.info["sizes"]: - simple_size = size[0] * size[2], size[1] * size[2] - scale = simple_size[0] // value[0] - if simple_size[1] / value[1] == scale: - self._size = value - return - msg = "This is not one of the allowed sizes of this image" - raise ValueError(msg) - - def load(self, scale: int | None = None) -> Image.core.PixelAccess | None: - if scale is not None: - width, height = self.size[:2] - self.size = width * scale, height * scale - self.best_size = width, height, scale - - px = Image.Image.load(self) - if self._im is not None and self.im.size == self.size: - # Already loaded - return px - self.load_prepare() - # This is likely NOT the best way to do it, but whatever. - im = self.icns.getimage(self.best_size) - - # If this is a PNG or JPEG 2000, it won't be loaded yet - px = im.load() - - self.im = im.im - self._mode = im.mode - self.size = im.size - - return px - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - """ - Saves the image as a series of PNG files, - that are then combined into a .icns file. - """ - if hasattr(fp, "flush"): - fp.flush() - - sizes = { - b"ic07": 128, - b"ic08": 256, - b"ic09": 512, - b"ic10": 1024, - b"ic11": 32, - b"ic12": 64, - b"ic13": 256, - b"ic14": 512, - } - provided_images = {im.width: im for im in im.encoderinfo.get("append_images", [])} - size_streams = {} - for size in set(sizes.values()): - image = ( - provided_images[size] - if size in provided_images - else im.resize((size, size)) - ) - - temp = io.BytesIO() - image.save(temp, "png") - size_streams[size] = temp.getvalue() - - entries = [] - for type, size in sizes.items(): - stream = size_streams[size] - entries.append((type, HEADERSIZE + len(stream), stream)) - - # Header - fp.write(MAGIC) - file_length = HEADERSIZE # Header - file_length += HEADERSIZE + 8 * len(entries) # TOC - file_length += sum(entry[1] for entry in entries) - fp.write(struct.pack(">i", file_length)) - - # TOC - fp.write(b"TOC ") - fp.write(struct.pack(">i", HEADERSIZE + len(entries) * HEADERSIZE)) - for entry in entries: - fp.write(entry[0]) - fp.write(struct.pack(">i", entry[1])) - - # Data - for entry in entries: - fp.write(entry[0]) - fp.write(struct.pack(">i", entry[1])) - fp.write(entry[2]) - - if hasattr(fp, "flush"): - fp.flush() - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(MAGIC) - - -Image.register_open(IcnsImageFile.format, IcnsImageFile, _accept) -Image.register_extension(IcnsImageFile.format, ".icns") - -Image.register_save(IcnsImageFile.format, _save) -Image.register_mime(IcnsImageFile.format, "image/icns") - -if __name__ == "__main__": - if len(sys.argv) < 2: - print("Syntax: python3 IcnsImagePlugin.py [file]") - sys.exit() - - with open(sys.argv[1], "rb") as fp: - imf = IcnsImageFile(fp) - for size in imf.info["sizes"]: - width, height, scale = imf.size = size - imf.save(f"out-{width}-{height}-{scale}.png") - with Image.open(sys.argv[1]) as im: - im.save("out.png") - if sys.platform == "windows": - os.startfile("out.png") diff --git a/voxvera/vendor/PIL/IcoImagePlugin.py b/voxvera/vendor/PIL/IcoImagePlugin.py deleted file mode 100644 index 8dd57ff..0000000 --- a/voxvera/vendor/PIL/IcoImagePlugin.py +++ /dev/null @@ -1,396 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# Windows Icon support for PIL -# -# History: -# 96-05-27 fl Created -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1996. -# -# See the README file for information on usage and redistribution. -# - -# This plugin is a refactored version of Win32IconImagePlugin by Bryan Davis -# . -# https://code.google.com/archive/p/casadebender/wikis/Win32IconImagePlugin.wiki -# -# Copyright 2008 Bryan Davis -# -# 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 -# -# https://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. - -# Icon format references: -# * https://en.wikipedia.org/wiki/ICO_(file_format) -# * https://msdn.microsoft.com/en-us/library/ms997538.aspx -from __future__ import annotations - -import warnings -from io import BytesIO -from math import ceil, log -from typing import IO, NamedTuple - -from . import BmpImagePlugin, Image, ImageFile, PngImagePlugin -from ._binary import i16le as i16 -from ._binary import i32le as i32 -from ._binary import o8 -from ._binary import o16le as o16 -from ._binary import o32le as o32 - -# -# -------------------------------------------------------------------- - -_MAGIC = b"\0\0\1\0" - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - fp.write(_MAGIC) # (2+2) - bmp = im.encoderinfo.get("bitmap_format") == "bmp" - sizes = im.encoderinfo.get( - "sizes", - [(16, 16), (24, 24), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)], - ) - frames = [] - provided_ims = [im] + im.encoderinfo.get("append_images", []) - width, height = im.size - for size in sorted(set(sizes)): - if size[0] > width or size[1] > height or size[0] > 256 or size[1] > 256: - continue - - for provided_im in provided_ims: - if provided_im.size != size: - continue - frames.append(provided_im) - if bmp: - bits = BmpImagePlugin.SAVE[provided_im.mode][1] - bits_used = [bits] - for other_im in provided_ims: - if other_im.size != size: - continue - bits = BmpImagePlugin.SAVE[other_im.mode][1] - if bits not in bits_used: - # Another image has been supplied for this size - # with a different bit depth - frames.append(other_im) - bits_used.append(bits) - break - else: - # TODO: invent a more convenient method for proportional scalings - frame = provided_im.copy() - frame.thumbnail(size, Image.Resampling.LANCZOS, reducing_gap=None) - frames.append(frame) - fp.write(o16(len(frames))) # idCount(2) - offset = fp.tell() + len(frames) * 16 - for frame in frames: - width, height = frame.size - # 0 means 256 - fp.write(o8(width if width < 256 else 0)) # bWidth(1) - fp.write(o8(height if height < 256 else 0)) # bHeight(1) - - bits, colors = BmpImagePlugin.SAVE[frame.mode][1:] if bmp else (32, 0) - fp.write(o8(colors)) # bColorCount(1) - fp.write(b"\0") # bReserved(1) - fp.write(b"\0\0") # wPlanes(2) - fp.write(o16(bits)) # wBitCount(2) - - image_io = BytesIO() - if bmp: - frame.save(image_io, "dib") - - if bits != 32: - and_mask = Image.new("1", size) - ImageFile._save( - and_mask, - image_io, - [ImageFile._Tile("raw", (0, 0) + size, 0, ("1", 0, -1))], - ) - else: - frame.save(image_io, "png") - image_io.seek(0) - image_bytes = image_io.read() - if bmp: - image_bytes = image_bytes[:8] + o32(height * 2) + image_bytes[12:] - bytes_len = len(image_bytes) - fp.write(o32(bytes_len)) # dwBytesInRes(4) - fp.write(o32(offset)) # dwImageOffset(4) - current = fp.tell() - fp.seek(offset) - fp.write(image_bytes) - offset = offset + bytes_len - fp.seek(current) - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(_MAGIC) - - -class IconHeader(NamedTuple): - width: int - height: int - nb_color: int - reserved: int - planes: int - bpp: int - size: int - offset: int - dim: tuple[int, int] - square: int - color_depth: int - - -class IcoFile: - def __init__(self, buf: IO[bytes]) -> None: - """ - Parse image from file-like object containing ico file data - """ - - # check magic - s = buf.read(6) - if not _accept(s): - msg = "not an ICO file" - raise SyntaxError(msg) - - self.buf = buf - self.entry = [] - - # Number of items in file - self.nb_items = i16(s, 4) - - # Get headers for each item - for i in range(self.nb_items): - s = buf.read(16) - - # See Wikipedia - width = s[0] or 256 - height = s[1] or 256 - - # No. of colors in image (0 if >=8bpp) - nb_color = s[2] - bpp = i16(s, 6) - icon_header = IconHeader( - width=width, - height=height, - nb_color=nb_color, - reserved=s[3], - planes=i16(s, 4), - bpp=i16(s, 6), - size=i32(s, 8), - offset=i32(s, 12), - dim=(width, height), - square=width * height, - # See Wikipedia notes about color depth. - # We need this just to differ images with equal sizes - color_depth=bpp or (nb_color != 0 and ceil(log(nb_color, 2))) or 256, - ) - - self.entry.append(icon_header) - - self.entry = sorted(self.entry, key=lambda x: x.color_depth) - # ICO images are usually squares - self.entry = sorted(self.entry, key=lambda x: x.square, reverse=True) - - def sizes(self) -> set[tuple[int, int]]: - """ - Get a set of all available icon sizes and color depths. - """ - return {(h.width, h.height) for h in self.entry} - - def getentryindex(self, size: tuple[int, int], bpp: int | bool = False) -> int: - for i, h in enumerate(self.entry): - if size == h.dim and (bpp is False or bpp == h.color_depth): - return i - return 0 - - def getimage(self, size: tuple[int, int], bpp: int | bool = False) -> Image.Image: - """ - Get an image from the icon - """ - return self.frame(self.getentryindex(size, bpp)) - - def frame(self, idx: int) -> Image.Image: - """ - Get an image from frame idx - """ - - header = self.entry[idx] - - self.buf.seek(header.offset) - data = self.buf.read(8) - self.buf.seek(header.offset) - - im: Image.Image - if data[:8] == PngImagePlugin._MAGIC: - # png frame - im = PngImagePlugin.PngImageFile(self.buf) - Image._decompression_bomb_check(im.size) - else: - # XOR + AND mask bmp frame - im = BmpImagePlugin.DibImageFile(self.buf) - Image._decompression_bomb_check(im.size) - - # change tile dimension to only encompass XOR image - im._size = (im.size[0], int(im.size[1] / 2)) - d, e, o, a = im.tile[0] - im.tile[0] = ImageFile._Tile(d, (0, 0) + im.size, o, a) - - # figure out where AND mask image starts - if header.bpp == 32: - # 32-bit color depth icon image allows semitransparent areas - # PIL's DIB format ignores transparency bits, recover them. - # The DIB is packed in BGRX byte order where X is the alpha - # channel. - - # Back up to start of bmp data - self.buf.seek(o) - # extract every 4th byte (eg. 3,7,11,15,...) - alpha_bytes = self.buf.read(im.size[0] * im.size[1] * 4)[3::4] - - # convert to an 8bpp grayscale image - try: - mask = Image.frombuffer( - "L", # 8bpp - im.size, # (w, h) - alpha_bytes, # source chars - "raw", # raw decoder - ("L", 0, -1), # 8bpp inverted, unpadded, reversed - ) - except ValueError: - if ImageFile.LOAD_TRUNCATED_IMAGES: - mask = None - else: - raise - else: - # get AND image from end of bitmap - w = im.size[0] - if (w % 32) > 0: - # bitmap row data is aligned to word boundaries - w += 32 - (im.size[0] % 32) - - # the total mask data is - # padded row size * height / bits per char - - total_bytes = int((w * im.size[1]) / 8) - and_mask_offset = header.offset + header.size - total_bytes - - self.buf.seek(and_mask_offset) - mask_data = self.buf.read(total_bytes) - - # convert raw data to image - try: - mask = Image.frombuffer( - "1", # 1 bpp - im.size, # (w, h) - mask_data, # source chars - "raw", # raw decoder - ("1;I", int(w / 8), -1), # 1bpp inverted, padded, reversed - ) - except ValueError: - if ImageFile.LOAD_TRUNCATED_IMAGES: - mask = None - else: - raise - - # now we have two images, im is XOR image and mask is AND image - - # apply mask image as alpha channel - if mask: - im = im.convert("RGBA") - im.putalpha(mask) - - return im - - -## -# Image plugin for Windows Icon files. - - -class IcoImageFile(ImageFile.ImageFile): - """ - PIL read-only image support for Microsoft Windows .ico files. - - By default the largest resolution image in the file will be loaded. This - can be changed by altering the 'size' attribute before calling 'load'. - - The info dictionary has a key 'sizes' that is a list of the sizes available - in the icon file. - - Handles classic, XP and Vista icon formats. - - When saving, PNG compression is used. Support for this was only added in - Windows Vista. If you are unable to view the icon in Windows, convert the - image to "RGBA" mode before saving. - - This plugin is a refactored version of Win32IconImagePlugin by Bryan Davis - . - https://code.google.com/archive/p/casadebender/wikis/Win32IconImagePlugin.wiki - """ - - format = "ICO" - format_description = "Windows Icon" - - def _open(self) -> None: - assert self.fp is not None - self.ico = IcoFile(self.fp) - self.info["sizes"] = self.ico.sizes() - self.size = self.ico.entry[0].dim - self.load() - - @property - def size(self) -> tuple[int, int]: - return self._size - - @size.setter - def size(self, value: tuple[int, int]) -> None: - if value not in self.info["sizes"]: - msg = "This is not one of the allowed sizes of this image" - raise ValueError(msg) - self._size = value - - def load(self) -> Image.core.PixelAccess | None: - if self._im is not None and self.im.size == self.size: - # Already loaded - return Image.Image.load(self) - im = self.ico.getimage(self.size) - # if tile is PNG, it won't really be loaded yet - im.load() - self.im = im.im - self._mode = im.mode - if im.palette: - self.palette = im.palette - if im.size != self.size: - warnings.warn("Image was not the expected size") - - index = self.ico.getentryindex(self.size) - sizes = list(self.info["sizes"]) - sizes[index] = im.size - self.info["sizes"] = set(sizes) - - self.size = im.size - return Image.Image.load(self) - - def load_seek(self, pos: int) -> None: - # Flag the ImageFile.Parser so that it - # just does all the decode at the end. - pass - - -# -# -------------------------------------------------------------------- - - -Image.register_open(IcoImageFile.format, IcoImageFile, _accept) -Image.register_save(IcoImageFile.format, _save) -Image.register_extension(IcoImageFile.format, ".ico") - -Image.register_mime(IcoImageFile.format, "image/x-icon") diff --git a/voxvera/vendor/PIL/ImImagePlugin.py b/voxvera/vendor/PIL/ImImagePlugin.py deleted file mode 100644 index ef54f16..0000000 --- a/voxvera/vendor/PIL/ImImagePlugin.py +++ /dev/null @@ -1,390 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# IFUNC IM file handling for PIL -# -# history: -# 1995-09-01 fl Created. -# 1997-01-03 fl Save palette images -# 1997-01-08 fl Added sequence support -# 1997-01-23 fl Added P and RGB save support -# 1997-05-31 fl Read floating point images -# 1997-06-22 fl Save floating point images -# 1997-08-27 fl Read and save 1-bit images -# 1998-06-25 fl Added support for RGB+LUT images -# 1998-07-02 fl Added support for YCC images -# 1998-07-15 fl Renamed offset attribute to avoid name clash -# 1998-12-29 fl Added I;16 support -# 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.7) -# 2003-09-26 fl Added LA/PA support -# -# Copyright (c) 1997-2003 by Secret Labs AB. -# Copyright (c) 1995-2001 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os -import re -from typing import IO, Any - -from . import Image, ImageFile, ImagePalette -from ._util import DeferredError - -# -------------------------------------------------------------------- -# Standard tags - -COMMENT = "Comment" -DATE = "Date" -EQUIPMENT = "Digitalization equipment" -FRAMES = "File size (no of images)" -LUT = "Lut" -NAME = "Name" -SCALE = "Scale (x,y)" -SIZE = "Image size (x*y)" -MODE = "Image type" - -TAGS = { - COMMENT: 0, - DATE: 0, - EQUIPMENT: 0, - FRAMES: 0, - LUT: 0, - NAME: 0, - SCALE: 0, - SIZE: 0, - MODE: 0, -} - -OPEN = { - # ifunc93/p3cfunc formats - "0 1 image": ("1", "1"), - "L 1 image": ("1", "1"), - "Greyscale image": ("L", "L"), - "Grayscale image": ("L", "L"), - "RGB image": ("RGB", "RGB;L"), - "RLB image": ("RGB", "RLB"), - "RYB image": ("RGB", "RLB"), - "B1 image": ("1", "1"), - "B2 image": ("P", "P;2"), - "B4 image": ("P", "P;4"), - "X 24 image": ("RGB", "RGB"), - "L 32 S image": ("I", "I;32"), - "L 32 F image": ("F", "F;32"), - # old p3cfunc formats - "RGB3 image": ("RGB", "RGB;T"), - "RYB3 image": ("RGB", "RYB;T"), - # extensions - "LA image": ("LA", "LA;L"), - "PA image": ("LA", "PA;L"), - "RGBA image": ("RGBA", "RGBA;L"), - "RGBX image": ("RGB", "RGBX;L"), - "CMYK image": ("CMYK", "CMYK;L"), - "YCC image": ("YCbCr", "YCbCr;L"), -} - -# ifunc95 extensions -for i in ["8", "8S", "16", "16S", "32", "32F"]: - OPEN[f"L {i} image"] = ("F", f"F;{i}") - OPEN[f"L*{i} image"] = ("F", f"F;{i}") -for i in ["16", "16L", "16B"]: - OPEN[f"L {i} image"] = (f"I;{i}", f"I;{i}") - OPEN[f"L*{i} image"] = (f"I;{i}", f"I;{i}") -for i in ["32S"]: - OPEN[f"L {i} image"] = ("I", f"I;{i}") - OPEN[f"L*{i} image"] = ("I", f"I;{i}") -for j in range(2, 33): - OPEN[f"L*{j} image"] = ("F", f"F;{j}") - - -# -------------------------------------------------------------------- -# Read IM directory - -split = re.compile(rb"^([A-Za-z][^:]*):[ \t]*(.*)[ \t]*$") - - -def number(s: Any) -> float: - try: - return int(s) - except ValueError: - return float(s) - - -## -# Image plugin for the IFUNC IM file format. - - -class ImImageFile(ImageFile.ImageFile): - format = "IM" - format_description = "IFUNC Image Memory" - _close_exclusive_fp_after_loading = False - - def _open(self) -> None: - # Quick rejection: if there's not an LF among the first - # 100 bytes, this is (probably) not a text header. - - assert self.fp is not None - if b"\n" not in self.fp.read(100): - msg = "not an IM file" - raise SyntaxError(msg) - self.fp.seek(0) - - n = 0 - - # Default values - self.info[MODE] = "L" - self.info[SIZE] = (512, 512) - self.info[FRAMES] = 1 - - self.rawmode = "L" - - while True: - s = self.fp.read(1) - - # Some versions of IFUNC uses \n\r instead of \r\n... - if s == b"\r": - continue - - if not s or s == b"\0" or s == b"\x1a": - break - - # FIXME: this may read whole file if not a text file - s = s + self.fp.readline() - - if len(s) > 100: - msg = "not an IM file" - raise SyntaxError(msg) - - if s.endswith(b"\r\n"): - s = s[:-2] - elif s.endswith(b"\n"): - s = s[:-1] - - try: - m = split.match(s) - except re.error as e: - msg = "not an IM file" - raise SyntaxError(msg) from e - - if m: - k, v = m.group(1, 2) - - # Don't know if this is the correct encoding, - # but a decent guess (I guess) - k = k.decode("latin-1", "replace") - v = v.decode("latin-1", "replace") - - # Convert value as appropriate - if k in [FRAMES, SCALE, SIZE]: - v = v.replace("*", ",") - v = tuple(map(number, v.split(","))) - if len(v) == 1: - v = v[0] - elif k == MODE and v in OPEN: - v, self.rawmode = OPEN[v] - - # Add to dictionary. Note that COMMENT tags are - # combined into a list of strings. - if k == COMMENT: - if k in self.info: - self.info[k].append(v) - else: - self.info[k] = [v] - else: - self.info[k] = v - - if k in TAGS: - n += 1 - - else: - msg = f"Syntax error in IM header: {s.decode('ascii', 'replace')}" - raise SyntaxError(msg) - - if not n: - msg = "Not an IM file" - raise SyntaxError(msg) - - # Basic attributes - self._size = self.info[SIZE] - self._mode = self.info[MODE] - - # Skip forward to start of image data - while s and not s.startswith(b"\x1a"): - s = self.fp.read(1) - if not s: - msg = "File truncated" - raise SyntaxError(msg) - - if LUT in self.info: - # convert lookup table to palette or lut attribute - palette = self.fp.read(768) - greyscale = 1 # greyscale palette - linear = 1 # linear greyscale palette - for i in range(256): - if palette[i] == palette[i + 256] == palette[i + 512]: - if palette[i] != i: - linear = 0 - else: - greyscale = 0 - if self.mode in ["L", "LA", "P", "PA"]: - if greyscale: - if not linear: - self.lut = list(palette[:256]) - else: - if self.mode in ["L", "P"]: - self._mode = self.rawmode = "P" - elif self.mode in ["LA", "PA"]: - self._mode = "PA" - self.rawmode = "PA;L" - self.palette = ImagePalette.raw("RGB;L", palette) - elif self.mode == "RGB": - if not greyscale or not linear: - self.lut = list(palette) - - self.frame = 0 - - self.__offset = offs = self.fp.tell() - - self._fp = self.fp # FIXME: hack - - if self.rawmode.startswith("F;"): - # ifunc95 formats - try: - # use bit decoder (if necessary) - bits = int(self.rawmode[2:]) - if bits not in [8, 16, 32]: - self.tile = [ - ImageFile._Tile( - "bit", (0, 0) + self.size, offs, (bits, 8, 3, 0, -1) - ) - ] - return - except ValueError: - pass - - if self.rawmode in ["RGB;T", "RYB;T"]: - # Old LabEye/3PC files. Would be very surprised if anyone - # ever stumbled upon such a file ;-) - size = self.size[0] * self.size[1] - self.tile = [ - ImageFile._Tile("raw", (0, 0) + self.size, offs, ("G", 0, -1)), - ImageFile._Tile("raw", (0, 0) + self.size, offs + size, ("R", 0, -1)), - ImageFile._Tile( - "raw", (0, 0) + self.size, offs + 2 * size, ("B", 0, -1) - ), - ] - else: - # LabEye/IFUNC files - self.tile = [ - ImageFile._Tile("raw", (0, 0) + self.size, offs, (self.rawmode, 0, -1)) - ] - - @property - def n_frames(self) -> int: - return self.info[FRAMES] - - @property - def is_animated(self) -> bool: - return self.info[FRAMES] > 1 - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - if isinstance(self._fp, DeferredError): - raise self._fp.ex - - self.frame = frame - - if self.mode == "1": - bits = 1 - else: - bits = 8 * len(self.mode) - - size = ((self.size[0] * bits + 7) // 8) * self.size[1] - offs = self.__offset + frame * size - - self.fp = self._fp - - self.tile = [ - ImageFile._Tile("raw", (0, 0) + self.size, offs, (self.rawmode, 0, -1)) - ] - - def tell(self) -> int: - return self.frame - - -# -# -------------------------------------------------------------------- -# Save IM files - - -SAVE = { - # mode: (im type, raw mode) - "1": ("0 1", "1"), - "L": ("Greyscale", "L"), - "LA": ("LA", "LA;L"), - "P": ("Greyscale", "P"), - "PA": ("LA", "PA;L"), - "I": ("L 32S", "I;32S"), - "I;16": ("L 16", "I;16"), - "I;16L": ("L 16L", "I;16L"), - "I;16B": ("L 16B", "I;16B"), - "F": ("L 32F", "F;32F"), - "RGB": ("RGB", "RGB;L"), - "RGBA": ("RGBA", "RGBA;L"), - "RGBX": ("RGBX", "RGBX;L"), - "CMYK": ("CMYK", "CMYK;L"), - "YCbCr": ("YCC", "YCbCr;L"), -} - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - try: - image_type, rawmode = SAVE[im.mode] - except KeyError as e: - msg = f"Cannot save {im.mode} images as IM" - raise ValueError(msg) from e - - frames = im.encoderinfo.get("frames", 1) - - fp.write(f"Image type: {image_type} image\r\n".encode("ascii")) - if filename: - # Each line must be 100 characters or less, - # or: SyntaxError("not an IM file") - # 8 characters are used for "Name: " and "\r\n" - # Keep just the filename, ditch the potentially overlong path - if isinstance(filename, bytes): - filename = filename.decode("ascii") - name, ext = os.path.splitext(os.path.basename(filename)) - name = "".join([name[: 92 - len(ext)], ext]) - - fp.write(f"Name: {name}\r\n".encode("ascii")) - fp.write(f"Image size (x*y): {im.size[0]}*{im.size[1]}\r\n".encode("ascii")) - fp.write(f"File size (no of images): {frames}\r\n".encode("ascii")) - if im.mode in ["P", "PA"]: - fp.write(b"Lut: 1\r\n") - fp.write(b"\000" * (511 - fp.tell()) + b"\032") - if im.mode in ["P", "PA"]: - im_palette = im.im.getpalette("RGB", "RGB;L") - colors = len(im_palette) // 3 - palette = b"" - for i in range(3): - palette += im_palette[colors * i : colors * (i + 1)] - palette += b"\x00" * (256 - colors) - fp.write(palette) # 768 bytes - ImageFile._save( - im, fp, [ImageFile._Tile("raw", (0, 0) + im.size, 0, (rawmode, 0, -1))] - ) - - -# -# -------------------------------------------------------------------- -# Registry - - -Image.register_open(ImImageFile.format, ImImageFile) -Image.register_save(ImImageFile.format, _save) - -Image.register_extension(ImImageFile.format, ".im") diff --git a/voxvera/vendor/PIL/Image.py b/voxvera/vendor/PIL/Image.py deleted file mode 100644 index 57ebea6..0000000 --- a/voxvera/vendor/PIL/Image.py +++ /dev/null @@ -1,4246 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# the Image class wrapper -# -# partial release history: -# 1995-09-09 fl Created -# 1996-03-11 fl PIL release 0.0 (proof of concept) -# 1996-04-30 fl PIL release 0.1b1 -# 1999-07-28 fl PIL release 1.0 final -# 2000-06-07 fl PIL release 1.1 -# 2000-10-20 fl PIL release 1.1.1 -# 2001-05-07 fl PIL release 1.1.2 -# 2002-03-15 fl PIL release 1.1.3 -# 2003-05-10 fl PIL release 1.1.4 -# 2005-03-28 fl PIL release 1.1.5 -# 2006-12-02 fl PIL release 1.1.6 -# 2009-11-15 fl PIL release 1.1.7 -# -# Copyright (c) 1997-2009 by Secret Labs AB. All rights reserved. -# Copyright (c) 1995-2009 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# - -from __future__ import annotations - -import abc -import atexit -import builtins -import io -import logging -import math -import os -import re -import struct -import sys -import tempfile -import warnings -from collections.abc import MutableMapping -from enum import IntEnum -from typing import IO, Protocol, cast - -# VERSION was removed in Pillow 6.0.0. -# PILLOW_VERSION was removed in Pillow 9.0.0. -# Use __version__ instead. -from . import ( - ExifTags, - ImageMode, - TiffTags, - UnidentifiedImageError, - __version__, - _plugins, -) -from ._binary import i32le, o32be, o32le -from ._deprecate import deprecate -from ._util import DeferredError, is_path - -ElementTree: ModuleType | None -try: - from defusedxml import ElementTree -except ImportError: - ElementTree = None - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable, Iterator, Sequence - from types import ModuleType - from typing import Any, Literal - -logger = logging.getLogger(__name__) - - -class DecompressionBombWarning(RuntimeWarning): - pass - - -class DecompressionBombError(Exception): - pass - - -WARN_POSSIBLE_FORMATS: bool = False - -# Limit to around a quarter gigabyte for a 24-bit (3 bpp) image -MAX_IMAGE_PIXELS: int | None = int(1024 * 1024 * 1024 // 4 // 3) - - -try: - # If the _imaging C module is not present, Pillow will not load. - # Note that other modules should not refer to _imaging directly; - # import Image and use the Image.core variable instead. - # Also note that Image.core is not a publicly documented interface, - # and should be considered private and subject to change. - from . import _imaging as core - - if __version__ != getattr(core, "PILLOW_VERSION", None): - msg = ( - "The _imaging extension was built for another version of Pillow or PIL:\n" - f"Core version: {getattr(core, 'PILLOW_VERSION', None)}\n" - f"Pillow version: {__version__}" - ) - raise ImportError(msg) - -except ImportError as v: - # Explanations for ways that we know we might have an import error - if str(v).startswith("Module use of python"): - # The _imaging C module is present, but not compiled for - # the right version (windows only). Print a warning, if - # possible. - warnings.warn( - "The _imaging extension was built for another version of Python.", - RuntimeWarning, - ) - elif str(v).startswith("The _imaging extension"): - warnings.warn(str(v), RuntimeWarning) - # Fail here anyway. Don't let people run with a mostly broken Pillow. - # see docs/porting.rst - raise - - -# -# Constants - - -# transpose -class Transpose(IntEnum): - FLIP_LEFT_RIGHT = 0 - FLIP_TOP_BOTTOM = 1 - ROTATE_90 = 2 - ROTATE_180 = 3 - ROTATE_270 = 4 - TRANSPOSE = 5 - TRANSVERSE = 6 - - -# transforms (also defined in Imaging.h) -class Transform(IntEnum): - AFFINE = 0 - EXTENT = 1 - PERSPECTIVE = 2 - QUAD = 3 - MESH = 4 - - -# resampling filters (also defined in Imaging.h) -class Resampling(IntEnum): - NEAREST = 0 - BOX = 4 - BILINEAR = 2 - HAMMING = 5 - BICUBIC = 3 - LANCZOS = 1 - - -_filters_support = { - Resampling.BOX: 0.5, - Resampling.BILINEAR: 1.0, - Resampling.HAMMING: 1.0, - Resampling.BICUBIC: 2.0, - Resampling.LANCZOS: 3.0, -} - - -# dithers -class Dither(IntEnum): - NONE = 0 - ORDERED = 1 # Not yet implemented - RASTERIZE = 2 # Not yet implemented - FLOYDSTEINBERG = 3 # default - - -# palettes/quantizers -class Palette(IntEnum): - WEB = 0 - ADAPTIVE = 1 - - -class Quantize(IntEnum): - MEDIANCUT = 0 - MAXCOVERAGE = 1 - FASTOCTREE = 2 - LIBIMAGEQUANT = 3 - - -module = sys.modules[__name__] -for enum in (Transpose, Transform, Resampling, Dither, Palette, Quantize): - for item in enum: - setattr(module, item.name, item.value) - - -if hasattr(core, "DEFAULT_STRATEGY"): - DEFAULT_STRATEGY = core.DEFAULT_STRATEGY - FILTERED = core.FILTERED - HUFFMAN_ONLY = core.HUFFMAN_ONLY - RLE = core.RLE - FIXED = core.FIXED - - -# -------------------------------------------------------------------- -# Registries - -TYPE_CHECKING = False -if TYPE_CHECKING: - import mmap - from xml.etree.ElementTree import Element - - from IPython.lib.pretty import PrettyPrinter - - from . import ImageFile, ImageFilter, ImagePalette, ImageQt, TiffImagePlugin - from ._typing import CapsuleType, NumpyArray, StrOrBytesPath -ID: list[str] = [] -OPEN: dict[ - str, - tuple[ - Callable[[IO[bytes], str | bytes], ImageFile.ImageFile], - Callable[[bytes], bool | str] | None, - ], -] = {} -MIME: dict[str, str] = {} -SAVE: dict[str, Callable[[Image, IO[bytes], str | bytes], None]] = {} -SAVE_ALL: dict[str, Callable[[Image, IO[bytes], str | bytes], None]] = {} -EXTENSION: dict[str, str] = {} -DECODERS: dict[str, type[ImageFile.PyDecoder]] = {} -ENCODERS: dict[str, type[ImageFile.PyEncoder]] = {} - -# -------------------------------------------------------------------- -# Modes - -_ENDIAN = "<" if sys.byteorder == "little" else ">" - - -def _conv_type_shape(im: Image) -> tuple[tuple[int, ...], str]: - m = ImageMode.getmode(im.mode) - shape: tuple[int, ...] = (im.height, im.width) - extra = len(m.bands) - if extra != 1: - shape += (extra,) - return shape, m.typestr - - -MODES = [ - "1", - "CMYK", - "F", - "HSV", - "I", - "I;16", - "I;16B", - "I;16L", - "I;16N", - "L", - "LA", - "La", - "LAB", - "P", - "PA", - "RGB", - "RGBA", - "RGBa", - "RGBX", - "YCbCr", -] - -# raw modes that may be memory mapped. NOTE: if you change this, you -# may have to modify the stride calculation in map.c too! -_MAPMODES = ("L", "P", "RGBX", "RGBA", "CMYK", "I;16", "I;16L", "I;16B") - - -def getmodebase(mode: str) -> str: - """ - Gets the "base" mode for given mode. This function returns "L" for - images that contain grayscale data, and "RGB" for images that - contain color data. - - :param mode: Input mode. - :returns: "L" or "RGB". - :exception KeyError: If the input mode was not a standard mode. - """ - return ImageMode.getmode(mode).basemode - - -def getmodetype(mode: str) -> str: - """ - Gets the storage type mode. Given a mode, this function returns a - single-layer mode suitable for storing individual bands. - - :param mode: Input mode. - :returns: "L", "I", or "F". - :exception KeyError: If the input mode was not a standard mode. - """ - return ImageMode.getmode(mode).basetype - - -def getmodebandnames(mode: str) -> tuple[str, ...]: - """ - Gets a list of individual band names. Given a mode, this function returns - a tuple containing the names of individual bands (use - :py:method:`~PIL.Image.getmodetype` to get the mode used to store each - individual band. - - :param mode: Input mode. - :returns: A tuple containing band names. The length of the tuple - gives the number of bands in an image of the given mode. - :exception KeyError: If the input mode was not a standard mode. - """ - return ImageMode.getmode(mode).bands - - -def getmodebands(mode: str) -> int: - """ - Gets the number of individual bands for this mode. - - :param mode: Input mode. - :returns: The number of bands in this mode. - :exception KeyError: If the input mode was not a standard mode. - """ - return len(ImageMode.getmode(mode).bands) - - -# -------------------------------------------------------------------- -# Helpers - -_initialized = 0 - - -def preinit() -> None: - """ - Explicitly loads BMP, GIF, JPEG, PPM and PPM file format drivers. - - It is called when opening or saving images. - """ - - global _initialized - if _initialized >= 1: - return - - try: - from . import BmpImagePlugin - - assert BmpImagePlugin - except ImportError: - pass - try: - from . import GifImagePlugin - - assert GifImagePlugin - except ImportError: - pass - try: - from . import JpegImagePlugin - - assert JpegImagePlugin - except ImportError: - pass - try: - from . import PpmImagePlugin - - assert PpmImagePlugin - except ImportError: - pass - try: - from . import PngImagePlugin - - assert PngImagePlugin - except ImportError: - pass - - _initialized = 1 - - -def init() -> bool: - """ - Explicitly initializes the Python Imaging Library. This function - loads all available file format drivers. - - It is called when opening or saving images if :py:meth:`~preinit()` is - insufficient, and by :py:meth:`~PIL.features.pilinfo`. - """ - - global _initialized - if _initialized >= 2: - return False - - parent_name = __name__.rpartition(".")[0] - for plugin in _plugins: - try: - logger.debug("Importing %s", plugin) - __import__(f"{parent_name}.{plugin}", globals(), locals(), []) - except ImportError as e: - logger.debug("Image: failed to import %s: %s", plugin, e) - - if OPEN or SAVE: - _initialized = 2 - return True - return False - - -# -------------------------------------------------------------------- -# Codec factories (used by tobytes/frombytes and ImageFile.load) - - -def _getdecoder( - mode: str, decoder_name: str, args: Any, extra: tuple[Any, ...] = () -) -> core.ImagingDecoder | ImageFile.PyDecoder: - # tweak arguments - if args is None: - args = () - elif not isinstance(args, tuple): - args = (args,) - - try: - decoder = DECODERS[decoder_name] - except KeyError: - pass - else: - return decoder(mode, *args + extra) - - try: - # get decoder - decoder = getattr(core, f"{decoder_name}_decoder") - except AttributeError as e: - msg = f"decoder {decoder_name} not available" - raise OSError(msg) from e - return decoder(mode, *args + extra) - - -def _getencoder( - mode: str, encoder_name: str, args: Any, extra: tuple[Any, ...] = () -) -> core.ImagingEncoder | ImageFile.PyEncoder: - # tweak arguments - if args is None: - args = () - elif not isinstance(args, tuple): - args = (args,) - - try: - encoder = ENCODERS[encoder_name] - except KeyError: - pass - else: - return encoder(mode, *args + extra) - - try: - # get encoder - encoder = getattr(core, f"{encoder_name}_encoder") - except AttributeError as e: - msg = f"encoder {encoder_name} not available" - raise OSError(msg) from e - return encoder(mode, *args + extra) - - -# -------------------------------------------------------------------- -# Simple expression analyzer - - -class ImagePointTransform: - """ - Used with :py:meth:`~PIL.Image.Image.point` for single band images with more than - 8 bits, this represents an affine transformation, where the value is multiplied by - ``scale`` and ``offset`` is added. - """ - - def __init__(self, scale: float, offset: float) -> None: - self.scale = scale - self.offset = offset - - def __neg__(self) -> ImagePointTransform: - return ImagePointTransform(-self.scale, -self.offset) - - def __add__(self, other: ImagePointTransform | float) -> ImagePointTransform: - if isinstance(other, ImagePointTransform): - return ImagePointTransform( - self.scale + other.scale, self.offset + other.offset - ) - return ImagePointTransform(self.scale, self.offset + other) - - __radd__ = __add__ - - def __sub__(self, other: ImagePointTransform | float) -> ImagePointTransform: - return self + -other - - def __rsub__(self, other: ImagePointTransform | float) -> ImagePointTransform: - return other + -self - - def __mul__(self, other: ImagePointTransform | float) -> ImagePointTransform: - if isinstance(other, ImagePointTransform): - return NotImplemented - return ImagePointTransform(self.scale * other, self.offset * other) - - __rmul__ = __mul__ - - def __truediv__(self, other: ImagePointTransform | float) -> ImagePointTransform: - if isinstance(other, ImagePointTransform): - return NotImplemented - return ImagePointTransform(self.scale / other, self.offset / other) - - -def _getscaleoffset( - expr: Callable[[ImagePointTransform], ImagePointTransform | float], -) -> tuple[float, float]: - a = expr(ImagePointTransform(1, 0)) - return (a.scale, a.offset) if isinstance(a, ImagePointTransform) else (0, a) - - -# -------------------------------------------------------------------- -# Implementation wrapper - - -class SupportsGetData(Protocol): - def getdata( - self, - ) -> tuple[Transform, Sequence[int]]: ... - - -class Image: - """ - This class represents an image object. To create - :py:class:`~PIL.Image.Image` objects, use the appropriate factory - functions. There's hardly ever any reason to call the Image constructor - directly. - - * :py:func:`~PIL.Image.open` - * :py:func:`~PIL.Image.new` - * :py:func:`~PIL.Image.frombytes` - """ - - format: str | None = None - format_description: str | None = None - _close_exclusive_fp_after_loading = True - - def __init__(self) -> None: - # FIXME: take "new" parameters / other image? - self._im: core.ImagingCore | DeferredError | None = None - self._mode = "" - self._size = (0, 0) - self.palette: ImagePalette.ImagePalette | None = None - self.info: dict[str | tuple[int, int], Any] = {} - self.readonly = 0 - self._exif: Exif | None = None - - @property - def im(self) -> core.ImagingCore: - if isinstance(self._im, DeferredError): - raise self._im.ex - assert self._im is not None - return self._im - - @im.setter - def im(self, im: core.ImagingCore) -> None: - self._im = im - - @property - def width(self) -> int: - return self.size[0] - - @property - def height(self) -> int: - return self.size[1] - - @property - def size(self) -> tuple[int, int]: - return self._size - - @property - def mode(self) -> str: - return self._mode - - @property - def readonly(self) -> int: - return (self._im and self._im.readonly) or self._readonly - - @readonly.setter - def readonly(self, readonly: int) -> None: - self._readonly = readonly - - def _new(self, im: core.ImagingCore) -> Image: - new = Image() - new.im = im - new._mode = im.mode - new._size = im.size - if im.mode in ("P", "PA"): - if self.palette: - new.palette = self.palette.copy() - else: - from . import ImagePalette - - new.palette = ImagePalette.ImagePalette() - new.info = self.info.copy() - return new - - # Context manager support - def __enter__(self) -> Image: - return self - - def __exit__(self, *args: object) -> None: - pass - - def close(self) -> None: - """ - This operation will destroy the image core and release its memory. - The image data will be unusable afterward. - - This function is required to close images that have multiple frames or - have not had their file read and closed by the - :py:meth:`~PIL.Image.Image.load` method. See :ref:`file-handling` for - more information. - """ - if getattr(self, "map", None): - if sys.platform == "win32" and hasattr(sys, "pypy_version_info"): - self.map.close() - self.map: mmap.mmap | None = None - - # Instead of simply setting to None, we're setting up a - # deferred error that will better explain that the core image - # object is gone. - self._im = DeferredError(ValueError("Operation on closed image")) - - def _copy(self) -> None: - self.load() - self.im = self.im.copy() - self.readonly = 0 - - def _ensure_mutable(self) -> None: - if self.readonly: - self._copy() - else: - self.load() - - def _dump( - self, file: str | None = None, format: str | None = None, **options: Any - ) -> str: - suffix = "" - if format: - suffix = f".{format}" - - if not file: - f, filename = tempfile.mkstemp(suffix) - os.close(f) - else: - filename = file - if not filename.endswith(suffix): - filename = filename + suffix - - self.load() - - if not format or format == "PPM": - self.im.save_ppm(filename) - else: - self.save(filename, format, **options) - - return filename - - def __eq__(self, other: object) -> bool: - if self.__class__ is not other.__class__: - return False - assert isinstance(other, Image) - return ( - self.mode == other.mode - and self.size == other.size - and self.info == other.info - and self.getpalette() == other.getpalette() - and self.tobytes() == other.tobytes() - ) - - def __repr__(self) -> str: - return ( - f"<{self.__class__.__module__}.{self.__class__.__name__} " - f"image mode={self.mode} size={self.size[0]}x{self.size[1]} " - f"at 0x{id(self):X}>" - ) - - def _repr_pretty_(self, p: PrettyPrinter, cycle: bool) -> None: - """IPython plain text display support""" - - # Same as __repr__ but without unpredictable id(self), - # to keep Jupyter notebook `text/plain` output stable. - p.text( - f"<{self.__class__.__module__}.{self.__class__.__name__} " - f"image mode={self.mode} size={self.size[0]}x{self.size[1]}>" - ) - - def _repr_image(self, image_format: str, **kwargs: Any) -> bytes | None: - """Helper function for iPython display hook. - - :param image_format: Image format. - :returns: image as bytes, saved into the given format. - """ - b = io.BytesIO() - try: - self.save(b, image_format, **kwargs) - except Exception: - return None - return b.getvalue() - - def _repr_png_(self) -> bytes | None: - """iPython display hook support for PNG format. - - :returns: PNG version of the image as bytes - """ - return self._repr_image("PNG", compress_level=1) - - def _repr_jpeg_(self) -> bytes | None: - """iPython display hook support for JPEG format. - - :returns: JPEG version of the image as bytes - """ - return self._repr_image("JPEG") - - @property - def __array_interface__(self) -> dict[str, str | bytes | int | tuple[int, ...]]: - # numpy array interface support - new: dict[str, str | bytes | int | tuple[int, ...]] = {"version": 3} - if self.mode == "1": - # Binary images need to be extended from bits to bytes - # See: https://github.com/python-pillow/Pillow/issues/350 - new["data"] = self.tobytes("raw", "L") - else: - new["data"] = self.tobytes() - new["shape"], new["typestr"] = _conv_type_shape(self) - return new - - def __arrow_c_schema__(self) -> object: - self.load() - return self.im.__arrow_c_schema__() - - def __arrow_c_array__( - self, requested_schema: object | None = None - ) -> tuple[object, object]: - self.load() - return (self.im.__arrow_c_schema__(), self.im.__arrow_c_array__()) - - def __getstate__(self) -> list[Any]: - im_data = self.tobytes() # load image first - return [self.info, self.mode, self.size, self.getpalette(), im_data] - - def __setstate__(self, state: list[Any]) -> None: - Image.__init__(self) - info, mode, size, palette, data = state[:5] - self.info = info - self._mode = mode - self._size = size - self.im = core.new(mode, size) - if mode in ("L", "LA", "P", "PA") and palette: - self.putpalette(palette) - self.frombytes(data) - - def tobytes(self, encoder_name: str = "raw", *args: Any) -> bytes: - """ - Return image as a bytes object. - - .. warning:: - - This method returns raw image data derived from Pillow's internal - storage. For compressed image data (e.g. PNG, JPEG) use - :meth:`~.save`, with a BytesIO parameter for in-memory data. - - :param encoder_name: What encoder to use. - - The default is to use the standard "raw" encoder. - To see how this packs pixel data into the returned - bytes, see :file:`libImaging/Pack.c`. - - A list of C encoders can be seen under codecs - section of the function array in - :file:`_imaging.c`. Python encoders are registered - within the relevant plugins. - :param args: Extra arguments to the encoder. - :returns: A :py:class:`bytes` object. - """ - - encoder_args: Any = args - if len(encoder_args) == 1 and isinstance(encoder_args[0], tuple): - # may pass tuple instead of argument list - encoder_args = encoder_args[0] - - if encoder_name == "raw" and encoder_args == (): - encoder_args = self.mode - - self.load() - - if self.width == 0 or self.height == 0: - return b"" - - # unpack data - e = _getencoder(self.mode, encoder_name, encoder_args) - e.setimage(self.im) - - from . import ImageFile - - bufsize = max(ImageFile.MAXBLOCK, self.size[0] * 4) # see RawEncode.c - - output = [] - while True: - bytes_consumed, errcode, data = e.encode(bufsize) - output.append(data) - if errcode: - break - if errcode < 0: - msg = f"encoder error {errcode} in tobytes" - raise RuntimeError(msg) - - return b"".join(output) - - def tobitmap(self, name: str = "image") -> bytes: - """ - Returns the image converted to an X11 bitmap. - - .. note:: This method only works for mode "1" images. - - :param name: The name prefix to use for the bitmap variables. - :returns: A string containing an X11 bitmap. - :raises ValueError: If the mode is not "1" - """ - - self.load() - if self.mode != "1": - msg = "not a bitmap" - raise ValueError(msg) - data = self.tobytes("xbm") - return b"".join( - [ - f"#define {name}_width {self.size[0]}\n".encode("ascii"), - f"#define {name}_height {self.size[1]}\n".encode("ascii"), - f"static char {name}_bits[] = {{\n".encode("ascii"), - data, - b"};", - ] - ) - - def frombytes( - self, - data: bytes | bytearray | SupportsArrayInterface, - decoder_name: str = "raw", - *args: Any, - ) -> None: - """ - Loads this image with pixel data from a bytes object. - - This method is similar to the :py:func:`~PIL.Image.frombytes` function, - but loads data into this image instead of creating a new image object. - """ - - if self.width == 0 or self.height == 0: - return - - decoder_args: Any = args - if len(decoder_args) == 1 and isinstance(decoder_args[0], tuple): - # may pass tuple instead of argument list - decoder_args = decoder_args[0] - - # default format - if decoder_name == "raw" and decoder_args == (): - decoder_args = self.mode - - # unpack data - d = _getdecoder(self.mode, decoder_name, decoder_args) - d.setimage(self.im) - s = d.decode(data) - - if s[0] >= 0: - msg = "not enough image data" - raise ValueError(msg) - if s[1] != 0: - msg = "cannot decode image data" - raise ValueError(msg) - - def load(self) -> core.PixelAccess | None: - """ - Allocates storage for the image and loads the pixel data. In - normal cases, you don't need to call this method, since the - Image class automatically loads an opened image when it is - accessed for the first time. - - If the file associated with the image was opened by Pillow, then this - method will close it. The exception to this is if the image has - multiple frames, in which case the file will be left open for seek - operations. See :ref:`file-handling` for more information. - - :returns: An image access object. - :rtype: :py:class:`.PixelAccess` - """ - if self._im is not None and self.palette and self.palette.dirty: - # realize palette - mode, arr = self.palette.getdata() - self.im.putpalette(self.palette.mode, mode, arr) - self.palette.dirty = 0 - self.palette.rawmode = None - if "transparency" in self.info and mode in ("LA", "PA"): - if isinstance(self.info["transparency"], int): - self.im.putpalettealpha(self.info["transparency"], 0) - else: - self.im.putpalettealphas(self.info["transparency"]) - self.palette.mode = "RGBA" - else: - self.palette.palette = self.im.getpalette( - self.palette.mode, self.palette.mode - ) - - if self._im is not None: - return self.im.pixel_access(self.readonly) - return None - - def verify(self) -> None: - """ - Verifies the contents of a file. For data read from a file, this - method attempts to determine if the file is broken, without - actually decoding the image data. If this method finds any - problems, it raises suitable exceptions. If you need to load - the image after using this method, you must reopen the image - file. - """ - pass - - def convert( - self, - mode: str | None = None, - matrix: tuple[float, ...] | None = None, - dither: Dither | None = None, - palette: Palette = Palette.WEB, - colors: int = 256, - ) -> Image: - """ - Returns a converted copy of this image. For the "P" mode, this - method translates pixels through the palette. If mode is - omitted, a mode is chosen so that all information in the image - and the palette can be represented without a palette. - - This supports all possible conversions between "L", "RGB" and "CMYK". The - ``matrix`` argument only supports "L" and "RGB". - - When translating a color image to grayscale (mode "L"), - the library uses the ITU-R 601-2 luma transform:: - - L = R * 299/1000 + G * 587/1000 + B * 114/1000 - - The default method of converting a grayscale ("L") or "RGB" - image into a bilevel (mode "1") image uses Floyd-Steinberg - dither to approximate the original image luminosity levels. If - dither is ``None``, all values larger than 127 are set to 255 (white), - all other values to 0 (black). To use other thresholds, use the - :py:meth:`~PIL.Image.Image.point` method. - - When converting from "RGBA" to "P" without a ``matrix`` argument, - this passes the operation to :py:meth:`~PIL.Image.Image.quantize`, - and ``dither`` and ``palette`` are ignored. - - When converting from "PA", if an "RGBA" palette is present, the alpha - channel from the image will be used instead of the values from the palette. - - :param mode: The requested mode. See: :ref:`concept-modes`. - :param matrix: An optional conversion matrix. If given, this - should be 4- or 12-tuple containing floating point values. - :param dither: Dithering method, used when converting from - mode "RGB" to "P" or from "RGB" or "L" to "1". - Available methods are :data:`Dither.NONE` or :data:`Dither.FLOYDSTEINBERG` - (default). Note that this is not used when ``matrix`` is supplied. - :param palette: Palette to use when converting from mode "RGB" - to "P". Available palettes are :data:`Palette.WEB` or - :data:`Palette.ADAPTIVE`. - :param colors: Number of colors to use for the :data:`Palette.ADAPTIVE` - palette. Defaults to 256. - :rtype: :py:class:`~PIL.Image.Image` - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - self.load() - - has_transparency = "transparency" in self.info - if not mode and self.mode == "P": - # determine default mode - if self.palette: - mode = self.palette.mode - else: - mode = "RGB" - if mode == "RGB" and has_transparency: - mode = "RGBA" - if not mode or (mode == self.mode and not matrix): - return self.copy() - - if matrix: - # matrix conversion - if mode not in ("L", "RGB"): - msg = "illegal conversion" - raise ValueError(msg) - im = self.im.convert_matrix(mode, matrix) - new_im = self._new(im) - if has_transparency and self.im.bands == 3: - transparency = new_im.info["transparency"] - - def convert_transparency( - m: tuple[float, ...], v: tuple[int, int, int] - ) -> int: - value = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3] * 0.5 - return max(0, min(255, int(value))) - - if mode == "L": - transparency = convert_transparency(matrix, transparency) - elif len(mode) == 3: - transparency = tuple( - convert_transparency(matrix[i * 4 : i * 4 + 4], transparency) - for i in range(len(transparency)) - ) - new_im.info["transparency"] = transparency - return new_im - - if self.mode == "RGBA": - if mode == "P": - return self.quantize(colors) - elif mode == "PA": - r, g, b, a = self.split() - rgb = merge("RGB", (r, g, b)) - p = rgb.quantize(colors) - return merge("PA", (p, a)) - - trns = None - delete_trns = False - # transparency handling - if has_transparency: - if (self.mode in ("1", "L", "I", "I;16") and mode in ("LA", "RGBA")) or ( - self.mode == "RGB" and mode in ("La", "LA", "RGBa", "RGBA") - ): - # Use transparent conversion to promote from transparent - # color to an alpha channel. - new_im = self._new( - self.im.convert_transparent(mode, self.info["transparency"]) - ) - del new_im.info["transparency"] - return new_im - elif self.mode in ("L", "RGB", "P") and mode in ("L", "RGB", "P"): - t = self.info["transparency"] - if isinstance(t, bytes): - # Dragons. This can't be represented by a single color - warnings.warn( - "Palette images with Transparency expressed in bytes should be " - "converted to RGBA images" - ) - delete_trns = True - else: - # get the new transparency color. - # use existing conversions - trns_im = new(self.mode, (1, 1)) - if self.mode == "P": - assert self.palette is not None - trns_im.putpalette(self.palette, self.palette.mode) - if isinstance(t, tuple): - err = "Couldn't allocate a palette color for transparency" - assert trns_im.palette is not None - try: - t = trns_im.palette.getcolor(t, self) - except ValueError as e: - if str(e) == "cannot allocate more than 256 colors": - # If all 256 colors are in use, - # then there is no need for transparency - t = None - else: - raise ValueError(err) from e - if t is None: - trns = None - else: - trns_im.putpixel((0, 0), t) - - if mode in ("L", "RGB"): - trns_im = trns_im.convert(mode) - else: - # can't just retrieve the palette number, got to do it - # after quantization. - trns_im = trns_im.convert("RGB") - trns = trns_im.getpixel((0, 0)) - - elif self.mode == "P" and mode in ("LA", "PA", "RGBA"): - t = self.info["transparency"] - delete_trns = True - - if isinstance(t, bytes): - self.im.putpalettealphas(t) - elif isinstance(t, int): - self.im.putpalettealpha(t, 0) - else: - msg = "Transparency for P mode should be bytes or int" - raise ValueError(msg) - - if mode == "P" and palette == Palette.ADAPTIVE: - im = self.im.quantize(colors) - new_im = self._new(im) - from . import ImagePalette - - new_im.palette = ImagePalette.ImagePalette( - "RGB", new_im.im.getpalette("RGB") - ) - if delete_trns: - # This could possibly happen if we requantize to fewer colors. - # The transparency would be totally off in that case. - del new_im.info["transparency"] - if trns is not None: - try: - new_im.info["transparency"] = new_im.palette.getcolor( - cast(tuple[int, ...], trns), # trns was converted to RGB - new_im, - ) - except Exception: - # if we can't make a transparent color, don't leave the old - # transparency hanging around to mess us up. - del new_im.info["transparency"] - warnings.warn("Couldn't allocate palette entry for transparency") - return new_im - - if "LAB" in (self.mode, mode): - im = self - if mode == "LAB": - if im.mode not in ("RGB", "RGBA", "RGBX"): - im = im.convert("RGBA") - other_mode = im.mode - else: - other_mode = mode - if other_mode in ("RGB", "RGBA", "RGBX"): - from . import ImageCms - - srgb = ImageCms.createProfile("sRGB") - lab = ImageCms.createProfile("LAB") - profiles = [lab, srgb] if im.mode == "LAB" else [srgb, lab] - transform = ImageCms.buildTransform( - profiles[0], profiles[1], im.mode, mode - ) - return transform.apply(im) - - # colorspace conversion - if dither is None: - dither = Dither.FLOYDSTEINBERG - - try: - im = self.im.convert(mode, dither) - except ValueError: - try: - # normalize source image and try again - modebase = getmodebase(self.mode) - if modebase == self.mode: - raise - im = self.im.convert(modebase) - im = im.convert(mode, dither) - except KeyError as e: - msg = "illegal conversion" - raise ValueError(msg) from e - - new_im = self._new(im) - if mode in ("P", "PA") and palette != Palette.ADAPTIVE: - from . import ImagePalette - - new_im.palette = ImagePalette.ImagePalette("RGB", im.getpalette("RGB")) - if delete_trns: - # crash fail if we leave a bytes transparency in an rgb/l mode. - del new_im.info["transparency"] - if trns is not None: - if new_im.mode == "P" and new_im.palette: - try: - new_im.info["transparency"] = new_im.palette.getcolor( - cast(tuple[int, ...], trns), new_im # trns was converted to RGB - ) - except ValueError as e: - del new_im.info["transparency"] - if str(e) != "cannot allocate more than 256 colors": - # If all 256 colors are in use, - # then there is no need for transparency - warnings.warn( - "Couldn't allocate palette entry for transparency" - ) - else: - new_im.info["transparency"] = trns - return new_im - - def quantize( - self, - colors: int = 256, - method: int | None = None, - kmeans: int = 0, - palette: Image | None = None, - dither: Dither = Dither.FLOYDSTEINBERG, - ) -> Image: - """ - Convert the image to 'P' mode with the specified number - of colors. - - :param colors: The desired number of colors, <= 256 - :param method: :data:`Quantize.MEDIANCUT` (median cut), - :data:`Quantize.MAXCOVERAGE` (maximum coverage), - :data:`Quantize.FASTOCTREE` (fast octree), - :data:`Quantize.LIBIMAGEQUANT` (libimagequant; check support - using :py:func:`PIL.features.check_feature` with - ``feature="libimagequant"``). - - By default, :data:`Quantize.MEDIANCUT` will be used. - - The exception to this is RGBA images. :data:`Quantize.MEDIANCUT` - and :data:`Quantize.MAXCOVERAGE` do not support RGBA images, so - :data:`Quantize.FASTOCTREE` is used by default instead. - :param kmeans: Integer greater than or equal to zero. - :param palette: Quantize to the palette of given - :py:class:`PIL.Image.Image`. - :param dither: Dithering method, used when converting from - mode "RGB" to "P" or from "RGB" or "L" to "1". - Available methods are :data:`Dither.NONE` or :data:`Dither.FLOYDSTEINBERG` - (default). - :returns: A new image - """ - - self.load() - - if method is None: - # defaults: - method = Quantize.MEDIANCUT - if self.mode == "RGBA": - method = Quantize.FASTOCTREE - - if self.mode == "RGBA" and method not in ( - Quantize.FASTOCTREE, - Quantize.LIBIMAGEQUANT, - ): - # Caller specified an invalid mode. - msg = ( - "Fast Octree (method == 2) and libimagequant (method == 3) " - "are the only valid methods for quantizing RGBA images" - ) - raise ValueError(msg) - - if palette: - # use palette from reference image - palette.load() - if palette.mode != "P": - msg = "bad mode for palette image" - raise ValueError(msg) - if self.mode not in {"RGB", "L"}: - msg = "only RGB or L mode images can be quantized to a palette" - raise ValueError(msg) - im = self.im.convert("P", dither, palette.im) - new_im = self._new(im) - assert palette.palette is not None - new_im.palette = palette.palette.copy() - return new_im - - if kmeans < 0: - msg = "kmeans must not be negative" - raise ValueError(msg) - - im = self._new(self.im.quantize(colors, method, kmeans)) - - from . import ImagePalette - - mode = im.im.getpalettemode() - palette_data = im.im.getpalette(mode, mode)[: colors * len(mode)] - im.palette = ImagePalette.ImagePalette(mode, palette_data) - - return im - - def copy(self) -> Image: - """ - Copies this image. Use this method if you wish to paste things - into an image, but still retain the original. - - :rtype: :py:class:`~PIL.Image.Image` - :returns: An :py:class:`~PIL.Image.Image` object. - """ - self.load() - return self._new(self.im.copy()) - - __copy__ = copy - - def crop(self, box: tuple[float, float, float, float] | None = None) -> Image: - """ - Returns a rectangular region from this image. The box is a - 4-tuple defining the left, upper, right, and lower pixel - coordinate. See :ref:`coordinate-system`. - - Note: Prior to Pillow 3.4.0, this was a lazy operation. - - :param box: The crop rectangle, as a (left, upper, right, lower)-tuple. - :rtype: :py:class:`~PIL.Image.Image` - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - if box is None: - return self.copy() - - if box[2] < box[0]: - msg = "Coordinate 'right' is less than 'left'" - raise ValueError(msg) - elif box[3] < box[1]: - msg = "Coordinate 'lower' is less than 'upper'" - raise ValueError(msg) - - self.load() - return self._new(self._crop(self.im, box)) - - def _crop( - self, im: core.ImagingCore, box: tuple[float, float, float, float] - ) -> core.ImagingCore: - """ - Returns a rectangular region from the core image object im. - - This is equivalent to calling im.crop((x0, y0, x1, y1)), but - includes additional sanity checks. - - :param im: a core image object - :param box: The crop rectangle, as a (left, upper, right, lower)-tuple. - :returns: A core image object. - """ - - x0, y0, x1, y1 = map(int, map(round, box)) - - absolute_values = (abs(x1 - x0), abs(y1 - y0)) - - _decompression_bomb_check(absolute_values) - - return im.crop((x0, y0, x1, y1)) - - def draft( - self, mode: str | None, size: tuple[int, int] | None - ) -> tuple[str, tuple[int, int, float, float]] | None: - """ - Configures the image file loader so it returns a version of the - image that as closely as possible matches the given mode and - size. For example, you can use this method to convert a color - JPEG to grayscale while loading it. - - If any changes are made, returns a tuple with the chosen ``mode`` and - ``box`` with coordinates of the original image within the altered one. - - Note that this method modifies the :py:class:`~PIL.Image.Image` object - in place. If the image has already been loaded, this method has no - effect. - - Note: This method is not implemented for most images. It is - currently implemented only for JPEG and MPO images. - - :param mode: The requested mode. - :param size: The requested size in pixels, as a 2-tuple: - (width, height). - """ - pass - - def filter(self, filter: ImageFilter.Filter | type[ImageFilter.Filter]) -> Image: - """ - Filters this image using the given filter. For a list of - available filters, see the :py:mod:`~PIL.ImageFilter` module. - - :param filter: Filter kernel. - :returns: An :py:class:`~PIL.Image.Image` object.""" - - from . import ImageFilter - - self.load() - - if callable(filter): - filter = filter() - if not hasattr(filter, "filter"): - msg = "filter argument should be ImageFilter.Filter instance or class" - raise TypeError(msg) - - multiband = isinstance(filter, ImageFilter.MultibandFilter) - if self.im.bands == 1 or multiband: - return self._new(filter.filter(self.im)) - - ims = [ - self._new(filter.filter(self.im.getband(c))) for c in range(self.im.bands) - ] - return merge(self.mode, ims) - - def getbands(self) -> tuple[str, ...]: - """ - Returns a tuple containing the name of each band in this image. - For example, ``getbands`` on an RGB image returns ("R", "G", "B"). - - :returns: A tuple containing band names. - :rtype: tuple - """ - return ImageMode.getmode(self.mode).bands - - def getbbox(self, *, alpha_only: bool = True) -> tuple[int, int, int, int] | None: - """ - Calculates the bounding box of the non-zero regions in the - image. - - :param alpha_only: Optional flag, defaulting to ``True``. - If ``True`` and the image has an alpha channel, trim transparent pixels. - Otherwise, trim pixels when all channels are zero. - Keyword-only argument. - :returns: The bounding box is returned as a 4-tuple defining the - left, upper, right, and lower pixel coordinate. See - :ref:`coordinate-system`. If the image is completely empty, this - method returns None. - - """ - - self.load() - return self.im.getbbox(alpha_only) - - def getcolors( - self, maxcolors: int = 256 - ) -> list[tuple[int, tuple[int, ...]]] | list[tuple[int, float]] | None: - """ - Returns a list of colors used in this image. - - The colors will be in the image's mode. For example, an RGB image will - return a tuple of (red, green, blue) color values, and a P image will - return the index of the color in the palette. - - :param maxcolors: Maximum number of colors. If this number is - exceeded, this method returns None. The default limit is - 256 colors. - :returns: An unsorted list of (count, pixel) values. - """ - - self.load() - if self.mode in ("1", "L", "P"): - h = self.im.histogram() - out: list[tuple[int, float]] = [(h[i], i) for i in range(256) if h[i]] - if len(out) > maxcolors: - return None - return out - return self.im.getcolors(maxcolors) - - def getdata(self, band: int | None = None) -> core.ImagingCore: - """ - Returns the contents of this image as a sequence object - containing pixel values. The sequence object is flattened, so - that values for line one follow directly after the values of - line zero, and so on. - - Note that the sequence object returned by this method is an - internal PIL data type, which only supports certain sequence - operations. To convert it to an ordinary sequence (e.g. for - printing), use ``list(im.getdata())``. - - :param band: What band to return. The default is to return - all bands. To return a single band, pass in the index - value (e.g. 0 to get the "R" band from an "RGB" image). - :returns: A sequence-like object. - """ - deprecate("Image.Image.getdata", 14, "get_flattened_data") - - self.load() - if band is not None: - return self.im.getband(band) - return self.im # could be abused - - def get_flattened_data( - self, band: int | None = None - ) -> tuple[tuple[int, ...], ...] | tuple[float, ...]: - """ - Returns the contents of this image as a tuple containing pixel values. - The sequence object is flattened, so that values for line one follow - directly after the values of line zero, and so on. - - :param band: What band to return. The default is to return - all bands. To return a single band, pass in the index - value (e.g. 0 to get the "R" band from an "RGB" image). - :returns: A tuple containing pixel values. - """ - self.load() - if band is not None: - return tuple(self.im.getband(band)) - return tuple(self.im) - - def getextrema(self) -> tuple[float, float] | tuple[tuple[int, int], ...]: - """ - Gets the minimum and maximum pixel values for each band in - the image. - - :returns: For a single-band image, a 2-tuple containing the - minimum and maximum pixel value. For a multi-band image, - a tuple containing one 2-tuple for each band. - """ - - self.load() - if self.im.bands > 1: - return tuple(self.im.getband(i).getextrema() for i in range(self.im.bands)) - return self.im.getextrema() - - def getxmp(self) -> dict[str, Any]: - """ - Returns a dictionary containing the XMP tags. - Requires defusedxml to be installed. - - :returns: XMP tags in a dictionary. - """ - - def get_name(tag: str) -> str: - return re.sub("^{[^}]+}", "", tag) - - def get_value(element: Element) -> str | dict[str, Any] | None: - value: dict[str, Any] = {get_name(k): v for k, v in element.attrib.items()} - children = list(element) - if children: - for child in children: - name = get_name(child.tag) - child_value = get_value(child) - if name in value: - if not isinstance(value[name], list): - value[name] = [value[name]] - value[name].append(child_value) - else: - value[name] = child_value - elif value: - if element.text: - value["text"] = element.text - else: - return element.text - return value - - if ElementTree is None: - warnings.warn("XMP data cannot be read without defusedxml dependency") - return {} - if "xmp" not in self.info: - return {} - root = ElementTree.fromstring(self.info["xmp"].rstrip(b"\x00 ")) - return {get_name(root.tag): get_value(root)} - - def getexif(self) -> Exif: - """ - Gets EXIF data from the image. - - :returns: an :py:class:`~PIL.Image.Exif` object. - """ - if self._exif is None: - self._exif = Exif() - elif self._exif._loaded: - return self._exif - self._exif._loaded = True - - exif_info = self.info.get("exif") - if exif_info is None: - if "Raw profile type exif" in self.info: - exif_info = bytes.fromhex( - "".join(self.info["Raw profile type exif"].split("\n")[3:]) - ) - elif hasattr(self, "tag_v2"): - from . import TiffImagePlugin - - assert isinstance(self, TiffImagePlugin.TiffImageFile) - self._exif.bigtiff = self.tag_v2._bigtiff - self._exif.endian = self.tag_v2._endian - - assert self.fp is not None - self._exif.load_from_fp(self.fp, self.tag_v2._offset) - if exif_info is not None: - self._exif.load(exif_info) - - # XMP tags - if ExifTags.Base.Orientation not in self._exif: - xmp_tags = self.info.get("XML:com.adobe.xmp") - pattern: str | bytes = r'tiff:Orientation(="|>)([0-9])' - if not xmp_tags and (xmp_tags := self.info.get("xmp")): - pattern = rb'tiff:Orientation(="|>)([0-9])' - if xmp_tags: - match = re.search(pattern, xmp_tags) - if match: - self._exif[ExifTags.Base.Orientation] = int(match[2]) - - return self._exif - - def _reload_exif(self) -> None: - if self._exif is None or not self._exif._loaded: - return - self._exif._loaded = False - self.getexif() - - def get_child_images(self) -> list[ImageFile.ImageFile]: - from . import ImageFile - - deprecate("Image.Image.get_child_images", 13) - return ImageFile.ImageFile.get_child_images(self) # type: ignore[arg-type] - - def getim(self) -> CapsuleType: - """ - Returns a capsule that points to the internal image memory. - - :returns: A capsule object. - """ - - self.load() - return self.im.ptr - - def getpalette(self, rawmode: str | None = "RGB") -> list[int] | None: - """ - Returns the image palette as a list. - - :param rawmode: The mode in which to return the palette. ``None`` will - return the palette in its current mode. - - .. versionadded:: 9.1.0 - - :returns: A list of color values [r, g, b, ...], or None if the - image has no palette. - """ - - self.load() - try: - mode = self.im.getpalettemode() - except ValueError: - return None # no palette - if rawmode is None: - rawmode = mode - return list(self.im.getpalette(mode, rawmode)) - - @property - def has_transparency_data(self) -> bool: - """ - Determine if an image has transparency data, whether in the form of an - alpha channel, a palette with an alpha channel, or a "transparency" key - in the info dictionary. - - Note the image might still appear solid, if all of the values shown - within are opaque. - - :returns: A boolean. - """ - if ( - self.mode in ("LA", "La", "PA", "RGBA", "RGBa") - or "transparency" in self.info - ): - return True - if self.mode == "P": - assert self.palette is not None - return self.palette.mode.endswith("A") - return False - - def apply_transparency(self) -> None: - """ - If a P mode image has a "transparency" key in the info dictionary, - remove the key and instead apply the transparency to the palette. - Otherwise, the image is unchanged. - """ - if self.mode != "P" or "transparency" not in self.info: - return - - from . import ImagePalette - - palette = self.getpalette("RGBA") - assert palette is not None - transparency = self.info["transparency"] - if isinstance(transparency, bytes): - for i, alpha in enumerate(transparency): - palette[i * 4 + 3] = alpha - else: - palette[transparency * 4 + 3] = 0 - self.palette = ImagePalette.ImagePalette("RGBA", bytes(palette)) - self.palette.dirty = 1 - - del self.info["transparency"] - - def getpixel( - self, xy: tuple[int, int] | list[int] - ) -> float | tuple[int, ...] | None: - """ - Returns the pixel value at a given position. - - :param xy: The coordinate, given as (x, y). See - :ref:`coordinate-system`. - :returns: The pixel value. If the image is a multi-layer image, - this method returns a tuple. - """ - - self.load() - return self.im.getpixel(tuple(xy)) - - def getprojection(self) -> tuple[list[int], list[int]]: - """ - Get projection to x and y axes - - :returns: Two sequences, indicating where there are non-zero - pixels along the X-axis and the Y-axis, respectively. - """ - - self.load() - x, y = self.im.getprojection() - return list(x), list(y) - - def histogram( - self, mask: Image | None = None, extrema: tuple[float, float] | None = None - ) -> list[int]: - """ - Returns a histogram for the image. The histogram is returned as a - list of pixel counts, one for each pixel value in the source - image. Counts are grouped into 256 bins for each band, even if - the image has more than 8 bits per band. If the image has more - than one band, the histograms for all bands are concatenated (for - example, the histogram for an "RGB" image contains 768 values). - - A bilevel image (mode "1") is treated as a grayscale ("L") image - by this method. - - If a mask is provided, the method returns a histogram for those - parts of the image where the mask image is non-zero. The mask - image must have the same size as the image, and be either a - bi-level image (mode "1") or a grayscale image ("L"). - - :param mask: An optional mask. - :param extrema: An optional tuple of manually-specified extrema. - :returns: A list containing pixel counts. - """ - self.load() - if mask: - mask.load() - return self.im.histogram((0, 0), mask.im) - if self.mode in ("I", "F"): - return self.im.histogram( - extrema if extrema is not None else self.getextrema() - ) - return self.im.histogram() - - def entropy( - self, mask: Image | None = None, extrema: tuple[float, float] | None = None - ) -> float: - """ - Calculates and returns the entropy for the image. - - A bilevel image (mode "1") is treated as a grayscale ("L") - image by this method. - - If a mask is provided, the method employs the histogram for - those parts of the image where the mask image is non-zero. - The mask image must have the same size as the image, and be - either a bi-level image (mode "1") or a grayscale image ("L"). - - :param mask: An optional mask. - :param extrema: An optional tuple of manually-specified extrema. - :returns: A float value representing the image entropy - """ - self.load() - if mask: - mask.load() - return self.im.entropy((0, 0), mask.im) - if self.mode in ("I", "F"): - return self.im.entropy( - extrema if extrema is not None else self.getextrema() - ) - return self.im.entropy() - - def paste( - self, - im: Image | str | float | tuple[float, ...], - box: Image | tuple[int, int, int, int] | tuple[int, int] | None = None, - mask: Image | None = None, - ) -> None: - """ - Pastes another image into this image. The box argument is either - a 2-tuple giving the upper left corner, a 4-tuple defining the - left, upper, right, and lower pixel coordinate, or None (same as - (0, 0)). See :ref:`coordinate-system`. If a 4-tuple is given, the size - of the pasted image must match the size of the region. - - If the modes don't match, the pasted image is converted to the mode of - this image (see the :py:meth:`~PIL.Image.Image.convert` method for - details). - - Instead of an image, the source can be a integer or tuple - containing pixel values. The method then fills the region - with the given color. When creating RGB images, you can - also use color strings as supported by the ImageColor module. See - :ref:`colors` for more information. - - If a mask is given, this method updates only the regions - indicated by the mask. You can use either "1", "L", "LA", "RGBA" - or "RGBa" images (if present, the alpha band is used as mask). - Where the mask is 255, the given image is copied as is. Where - the mask is 0, the current value is preserved. Intermediate - values will mix the two images together, including their alpha - channels if they have them. - - See :py:meth:`~PIL.Image.Image.alpha_composite` if you want to - combine images with respect to their alpha channels. - - :param im: Source image or pixel value (integer, float or tuple). - :param box: An optional 4-tuple giving the region to paste into. - If a 2-tuple is used instead, it's treated as the upper left - corner. If omitted or None, the source is pasted into the - upper left corner. - - If an image is given as the second argument and there is no - third, the box defaults to (0, 0), and the second argument - is interpreted as a mask image. - :param mask: An optional mask image. - """ - - if isinstance(box, Image): - if mask is not None: - msg = "If using second argument as mask, third argument must be None" - raise ValueError(msg) - # abbreviated paste(im, mask) syntax - mask = box - box = None - - if box is None: - box = (0, 0) - - if len(box) == 2: - # upper left corner given; get size from image or mask - if isinstance(im, Image): - size = im.size - elif isinstance(mask, Image): - size = mask.size - else: - # FIXME: use self.size here? - msg = "cannot determine region size; use 4-item box" - raise ValueError(msg) - box += (box[0] + size[0], box[1] + size[1]) - - source: core.ImagingCore | str | float | tuple[float, ...] - if isinstance(im, str): - from . import ImageColor - - source = ImageColor.getcolor(im, self.mode) - elif isinstance(im, Image): - im.load() - if self.mode != im.mode: - if self.mode != "RGB" or im.mode not in ("LA", "RGBA", "RGBa"): - # should use an adapter for this! - im = im.convert(self.mode) - source = im.im - else: - source = im - - self._ensure_mutable() - - if mask: - mask.load() - self.im.paste(source, box, mask.im) - else: - self.im.paste(source, box) - - def alpha_composite( - self, im: Image, dest: Sequence[int] = (0, 0), source: Sequence[int] = (0, 0) - ) -> None: - """'In-place' analog of Image.alpha_composite. Composites an image - onto this image. - - :param im: image to composite over this one - :param dest: Optional 2 tuple (left, top) specifying the upper - left corner in this (destination) image. - :param source: Optional 2 (left, top) tuple for the upper left - corner in the overlay source image, or 4 tuple (left, top, right, - bottom) for the bounds of the source rectangle - - Performance Note: Not currently implemented in-place in the core layer. - """ - - if not isinstance(source, (list, tuple)): - msg = "Source must be a list or tuple" - raise ValueError(msg) - if not isinstance(dest, (list, tuple)): - msg = "Destination must be a list or tuple" - raise ValueError(msg) - - if len(source) == 4: - overlay_crop_box = tuple(source) - elif len(source) == 2: - overlay_crop_box = tuple(source) + im.size - else: - msg = "Source must be a sequence of length 2 or 4" - raise ValueError(msg) - - if not len(dest) == 2: - msg = "Destination must be a sequence of length 2" - raise ValueError(msg) - if min(source) < 0: - msg = "Source must be non-negative" - raise ValueError(msg) - - # over image, crop if it's not the whole image. - if overlay_crop_box == (0, 0) + im.size: - overlay = im - else: - overlay = im.crop(overlay_crop_box) - - # target for the paste - box = tuple(dest) + (dest[0] + overlay.width, dest[1] + overlay.height) - - # destination image. don't copy if we're using the whole image. - if box == (0, 0) + self.size: - background = self - else: - background = self.crop(box) - - result = alpha_composite(background, overlay) - self.paste(result, box) - - def point( - self, - lut: ( - Sequence[float] - | NumpyArray - | Callable[[int], float] - | Callable[[ImagePointTransform], ImagePointTransform | float] - | ImagePointHandler - ), - mode: str | None = None, - ) -> Image: - """ - Maps this image through a lookup table or function. - - :param lut: A lookup table, containing 256 (or 65536 if - self.mode=="I" and mode == "L") values per band in the - image. A function can be used instead, it should take a - single argument. The function is called once for each - possible pixel value, and the resulting table is applied to - all bands of the image. - - It may also be an :py:class:`~PIL.Image.ImagePointHandler` - object:: - - class Example(Image.ImagePointHandler): - def point(self, im: Image) -> Image: - # Return result - :param mode: Output mode (default is same as input). This can only be used if - the source image has mode "L" or "P", and the output has mode "1" or the - source image mode is "I" and the output mode is "L". - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - self.load() - - if isinstance(lut, ImagePointHandler): - return lut.point(self) - - if callable(lut): - # if it isn't a list, it should be a function - if self.mode in ("I", "I;16", "F"): - # check if the function can be used with point_transform - # UNDONE wiredfool -- I think this prevents us from ever doing - # a gamma function point transform on > 8bit images. - scale, offset = _getscaleoffset(lut) # type: ignore[arg-type] - return self._new(self.im.point_transform(scale, offset)) - # for other modes, convert the function to a table - flatLut = [lut(i) for i in range(256)] * self.im.bands # type: ignore[arg-type] - else: - flatLut = lut - - if self.mode == "F": - # FIXME: _imaging returns a confusing error message for this case - msg = "point operation not supported for this mode" - raise ValueError(msg) - - if mode != "F": - flatLut = [round(i) for i in flatLut] - return self._new(self.im.point(flatLut, mode)) - - def putalpha(self, alpha: Image | int) -> None: - """ - Adds or replaces the alpha layer in this image. If the image - does not have an alpha layer, it's converted to "LA" or "RGBA". - The new layer must be either "L" or "1". - - :param alpha: The new alpha layer. This can either be an "L" or "1" - image having the same size as this image, or an integer. - """ - - self._ensure_mutable() - - if self.mode not in ("LA", "PA", "RGBA"): - # attempt to promote self to a matching alpha mode - try: - mode = getmodebase(self.mode) + "A" - try: - self.im.setmode(mode) - except (AttributeError, ValueError) as e: - # do things the hard way - im = self.im.convert(mode) - if im.mode not in ("LA", "PA", "RGBA"): - msg = "alpha channel could not be added" - raise ValueError(msg) from e # sanity check - self.im = im - self._mode = self.im.mode - except KeyError as e: - msg = "illegal image mode" - raise ValueError(msg) from e - - if self.mode in ("LA", "PA"): - band = 1 - else: - band = 3 - - if isinstance(alpha, Image): - # alpha layer - if alpha.mode not in ("1", "L"): - msg = "illegal image mode" - raise ValueError(msg) - alpha.load() - if alpha.mode == "1": - alpha = alpha.convert("L") - else: - # constant alpha - try: - self.im.fillband(band, alpha) - except (AttributeError, ValueError): - # do things the hard way - alpha = new("L", self.size, alpha) - else: - return - - self.im.putband(alpha.im, band) - - def putdata( - self, - data: Sequence[float] | Sequence[Sequence[int]] | core.ImagingCore | NumpyArray, - scale: float = 1.0, - offset: float = 0.0, - ) -> None: - """ - Copies pixel data from a flattened sequence object into the image. The - values should start at the upper left corner (0, 0), continue to the - end of the line, followed directly by the first value of the second - line, and so on. Data will be read until either the image or the - sequence ends. The scale and offset values are used to adjust the - sequence values: **pixel = value*scale + offset**. - - :param data: A flattened sequence object. See :ref:`colors` for more - information about values. - :param scale: An optional scale value. The default is 1.0. - :param offset: An optional offset value. The default is 0.0. - """ - - self._ensure_mutable() - - self.im.putdata(data, scale, offset) - - def putpalette( - self, - data: ImagePalette.ImagePalette | bytes | Sequence[int], - rawmode: str = "RGB", - ) -> None: - """ - Attaches a palette to this image. The image must be a "P", "PA", "L" - or "LA" image. - - The palette sequence must contain at most 256 colors, made up of one - integer value for each channel in the raw mode. - For example, if the raw mode is "RGB", then it can contain at most 768 - values, made up of red, green and blue values for the corresponding pixel - index in the 256 colors. - If the raw mode is "RGBA", then it can contain at most 1024 values, - containing red, green, blue and alpha values. - - Alternatively, an 8-bit string may be used instead of an integer sequence. - - :param data: A palette sequence (either a list or a string). - :param rawmode: The raw mode of the palette. Either "RGB", "RGBA", or a mode - that can be transformed to "RGB" or "RGBA" (e.g. "R", "BGR;15", "RGBA;L"). - """ - from . import ImagePalette - - if self.mode not in ("L", "LA", "P", "PA"): - msg = "illegal image mode" - raise ValueError(msg) - if isinstance(data, ImagePalette.ImagePalette): - if data.rawmode is not None: - palette = ImagePalette.raw(data.rawmode, data.palette) - else: - palette = ImagePalette.ImagePalette(palette=data.palette) - palette.dirty = 1 - else: - if not isinstance(data, bytes): - data = bytes(data) - palette = ImagePalette.raw(rawmode, data) - self._mode = "PA" if "A" in self.mode else "P" - self.palette = palette - self.palette.mode = "RGBA" if "A" in rawmode else "RGB" - self.load() # install new palette - - def putpixel( - self, xy: tuple[int, int], value: float | tuple[int, ...] | list[int] - ) -> None: - """ - Modifies the pixel at the given position. The color is given as - a single numerical value for single-band images, and a tuple for - multi-band images. In addition to this, RGB and RGBA tuples are - accepted for P and PA images. See :ref:`colors` for more information. - - Note that this method is relatively slow. For more extensive changes, - use :py:meth:`~PIL.Image.Image.paste` or the :py:mod:`~PIL.ImageDraw` - module instead. - - See: - - * :py:meth:`~PIL.Image.Image.paste` - * :py:meth:`~PIL.Image.Image.putdata` - * :py:mod:`~PIL.ImageDraw` - - :param xy: The pixel coordinate, given as (x, y). See - :ref:`coordinate-system`. - :param value: The pixel value. - """ - - self._ensure_mutable() - - if ( - self.mode in ("P", "PA") - and isinstance(value, (list, tuple)) - and len(value) in [3, 4] - ): - # RGB or RGBA value for a P or PA image - if self.mode == "PA": - alpha = value[3] if len(value) == 4 else 255 - value = value[:3] - assert self.palette is not None - palette_index = self.palette.getcolor(tuple(value), self) - value = (palette_index, alpha) if self.mode == "PA" else palette_index - return self.im.putpixel(xy, value) - - def remap_palette( - self, dest_map: list[int], source_palette: bytes | bytearray | None = None - ) -> Image: - """ - Rewrites the image to reorder the palette. - - :param dest_map: A list of indexes into the original palette. - e.g. ``[1,0]`` would swap a two item palette, and ``list(range(256))`` - is the identity transform. - :param source_palette: Bytes or None. - :returns: An :py:class:`~PIL.Image.Image` object. - - """ - from . import ImagePalette - - if self.mode not in ("L", "P"): - msg = "illegal image mode" - raise ValueError(msg) - - bands = 3 - palette_mode = "RGB" - if source_palette is None: - if self.mode == "P": - self.load() - palette_mode = self.im.getpalettemode() - if palette_mode == "RGBA": - bands = 4 - source_palette = self.im.getpalette(palette_mode, palette_mode) - else: # L-mode - source_palette = bytearray(i // 3 for i in range(768)) - elif len(source_palette) > 768: - bands = 4 - palette_mode = "RGBA" - - palette_bytes = b"" - new_positions = [0] * 256 - - # pick only the used colors from the palette - for i, oldPosition in enumerate(dest_map): - palette_bytes += source_palette[ - oldPosition * bands : oldPosition * bands + bands - ] - new_positions[oldPosition] = i - - # replace the palette color id of all pixel with the new id - - # Palette images are [0..255], mapped through a 1 or 3 - # byte/color map. We need to remap the whole image - # from palette 1 to palette 2. New_positions is - # an array of indexes into palette 1. Palette 2 is - # palette 1 with any holes removed. - - # We're going to leverage the convert mechanism to use the - # C code to remap the image from palette 1 to palette 2, - # by forcing the source image into 'L' mode and adding a - # mapping 'L' mode palette, then converting back to 'L' - # sans palette thus converting the image bytes, then - # assigning the optimized RGB palette. - - # perf reference, 9500x4000 gif, w/~135 colors - # 14 sec prepatch, 1 sec postpatch with optimization forced. - - mapping_palette = bytearray(new_positions) - - m_im = self.copy() - m_im._mode = "P" - - m_im.palette = ImagePalette.ImagePalette( - palette_mode, palette=mapping_palette * bands - ) - # possibly set palette dirty, then - # m_im.putpalette(mapping_palette, 'L') # converts to 'P' - # or just force it. - # UNDONE -- this is part of the general issue with palettes - m_im.im.putpalette(palette_mode, palette_mode + ";L", m_im.palette.tobytes()) - - m_im = m_im.convert("L") - - m_im.putpalette(palette_bytes, palette_mode) - m_im.palette = ImagePalette.ImagePalette(palette_mode, palette=palette_bytes) - - if "transparency" in self.info: - try: - m_im.info["transparency"] = dest_map.index(self.info["transparency"]) - except ValueError: - if "transparency" in m_im.info: - del m_im.info["transparency"] - - return m_im - - def _get_safe_box( - self, - size: tuple[int, int], - resample: Resampling, - box: tuple[float, float, float, float], - ) -> tuple[int, int, int, int]: - """Expands the box so it includes adjacent pixels - that may be used by resampling with the given resampling filter. - """ - filter_support = _filters_support[resample] - 0.5 - scale_x = (box[2] - box[0]) / size[0] - scale_y = (box[3] - box[1]) / size[1] - support_x = filter_support * scale_x - support_y = filter_support * scale_y - - return ( - max(0, int(box[0] - support_x)), - max(0, int(box[1] - support_y)), - min(self.size[0], math.ceil(box[2] + support_x)), - min(self.size[1], math.ceil(box[3] + support_y)), - ) - - def resize( - self, - size: tuple[int, int] | list[int] | NumpyArray, - resample: int | None = None, - box: tuple[float, float, float, float] | None = None, - reducing_gap: float | None = None, - ) -> Image: - """ - Returns a resized copy of this image. - - :param size: The requested size in pixels, as a tuple or array: - (width, height). - :param resample: An optional resampling filter. This can be - one of :py:data:`Resampling.NEAREST`, :py:data:`Resampling.BOX`, - :py:data:`Resampling.BILINEAR`, :py:data:`Resampling.HAMMING`, - :py:data:`Resampling.BICUBIC` or :py:data:`Resampling.LANCZOS`. - If the image has mode "1" or "P", it is always set to - :py:data:`Resampling.NEAREST`. Otherwise, the default filter is - :py:data:`Resampling.BICUBIC`. See: :ref:`concept-filters`. - :param box: An optional 4-tuple of floats providing - the source image region to be scaled. - The values must be within (0, 0, width, height) rectangle. - If omitted or None, the entire source is used. - :param reducing_gap: Apply optimization by resizing the image - in two steps. First, reducing the image by integer times - using :py:meth:`~PIL.Image.Image.reduce`. - Second, resizing using regular resampling. The last step - changes size no less than by ``reducing_gap`` times. - ``reducing_gap`` may be None (no first step is performed) - or should be greater than 1.0. The bigger ``reducing_gap``, - the closer the result to the fair resampling. - The smaller ``reducing_gap``, the faster resizing. - With ``reducing_gap`` greater or equal to 3.0, the result is - indistinguishable from fair resampling in most cases. - The default value is None (no optimization). - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - if resample is None: - resample = Resampling.BICUBIC - elif resample not in ( - Resampling.NEAREST, - Resampling.BILINEAR, - Resampling.BICUBIC, - Resampling.LANCZOS, - Resampling.BOX, - Resampling.HAMMING, - ): - msg = f"Unknown resampling filter ({resample})." - - filters = [ - f"{filter[1]} ({filter[0]})" - for filter in ( - (Resampling.NEAREST, "Image.Resampling.NEAREST"), - (Resampling.LANCZOS, "Image.Resampling.LANCZOS"), - (Resampling.BILINEAR, "Image.Resampling.BILINEAR"), - (Resampling.BICUBIC, "Image.Resampling.BICUBIC"), - (Resampling.BOX, "Image.Resampling.BOX"), - (Resampling.HAMMING, "Image.Resampling.HAMMING"), - ) - ] - msg += f" Use {', '.join(filters[:-1])} or {filters[-1]}" - raise ValueError(msg) - - if reducing_gap is not None and reducing_gap < 1.0: - msg = "reducing_gap must be 1.0 or greater" - raise ValueError(msg) - - if box is None: - box = (0, 0) + self.size - - size = tuple(size) - if self.size == size and box == (0, 0) + self.size: - return self.copy() - - if self.mode in ("1", "P"): - resample = Resampling.NEAREST - - if self.mode in ["LA", "RGBA"] and resample != Resampling.NEAREST: - im = self.convert({"LA": "La", "RGBA": "RGBa"}[self.mode]) - im = im.resize(size, resample, box) - return im.convert(self.mode) - - self.load() - - if reducing_gap is not None and resample != Resampling.NEAREST: - factor_x = int((box[2] - box[0]) / size[0] / reducing_gap) or 1 - factor_y = int((box[3] - box[1]) / size[1] / reducing_gap) or 1 - if factor_x > 1 or factor_y > 1: - reduce_box = self._get_safe_box(size, cast(Resampling, resample), box) - factor = (factor_x, factor_y) - self = ( - self.reduce(factor, box=reduce_box) - if callable(self.reduce) - else Image.reduce(self, factor, box=reduce_box) - ) - box = ( - (box[0] - reduce_box[0]) / factor_x, - (box[1] - reduce_box[1]) / factor_y, - (box[2] - reduce_box[0]) / factor_x, - (box[3] - reduce_box[1]) / factor_y, - ) - - return self._new(self.im.resize(size, resample, box)) - - def reduce( - self, - factor: int | tuple[int, int], - box: tuple[int, int, int, int] | None = None, - ) -> Image: - """ - Returns a copy of the image reduced ``factor`` times. - If the size of the image is not dividable by ``factor``, - the resulting size will be rounded up. - - :param factor: A greater than 0 integer or tuple of two integers - for width and height separately. - :param box: An optional 4-tuple of ints providing - the source image region to be reduced. - The values must be within ``(0, 0, width, height)`` rectangle. - If omitted or ``None``, the entire source is used. - """ - if not isinstance(factor, (list, tuple)): - factor = (factor, factor) - - if box is None: - box = (0, 0) + self.size - - if factor == (1, 1) and box == (0, 0) + self.size: - return self.copy() - - if self.mode in ["LA", "RGBA"]: - im = self.convert({"LA": "La", "RGBA": "RGBa"}[self.mode]) - im = im.reduce(factor, box) - return im.convert(self.mode) - - self.load() - - return self._new(self.im.reduce(factor, box)) - - def rotate( - self, - angle: float, - resample: Resampling = Resampling.NEAREST, - expand: int | bool = False, - center: tuple[float, float] | None = None, - translate: tuple[int, int] | None = None, - fillcolor: float | tuple[float, ...] | str | None = None, - ) -> Image: - """ - Returns a rotated copy of this image. This method returns a - copy of this image, rotated the given number of degrees counter - clockwise around its centre. - - :param angle: In degrees counter clockwise. - :param resample: An optional resampling filter. This can be - one of :py:data:`Resampling.NEAREST` (use nearest neighbour), - :py:data:`Resampling.BILINEAR` (linear interpolation in a 2x2 - environment), or :py:data:`Resampling.BICUBIC` (cubic spline - interpolation in a 4x4 environment). If omitted, or if the image has - mode "1" or "P", it is set to :py:data:`Resampling.NEAREST`. - See :ref:`concept-filters`. - :param expand: Optional expansion flag. If true, expands the output - image to make it large enough to hold the entire rotated image. - If false or omitted, make the output image the same size as the - input image. Note that the expand flag assumes rotation around - the center and no translation. - :param center: Optional center of rotation (a 2-tuple). Origin is - the upper left corner. Default is the center of the image. - :param translate: An optional post-rotate translation (a 2-tuple). - :param fillcolor: An optional color for area outside the rotated image. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - angle = angle % 360.0 - - # Fast paths regardless of filter, as long as we're not - # translating or changing the center. - if not (center or translate): - if angle == 0: - return self.copy() - if angle == 180: - return self.transpose(Transpose.ROTATE_180) - if angle in (90, 270) and (expand or self.width == self.height): - return self.transpose( - Transpose.ROTATE_90 if angle == 90 else Transpose.ROTATE_270 - ) - - # Calculate the affine matrix. Note that this is the reverse - # transformation (from destination image to source) because we - # want to interpolate the (discrete) destination pixel from - # the local area around the (floating) source pixel. - - # The matrix we actually want (note that it operates from the right): - # (1, 0, tx) (1, 0, cx) ( cos a, sin a, 0) (1, 0, -cx) - # (0, 1, ty) * (0, 1, cy) * (-sin a, cos a, 0) * (0, 1, -cy) - # (0, 0, 1) (0, 0, 1) ( 0, 0, 1) (0, 0, 1) - - # The reverse matrix is thus: - # (1, 0, cx) ( cos -a, sin -a, 0) (1, 0, -cx) (1, 0, -tx) - # (0, 1, cy) * (-sin -a, cos -a, 0) * (0, 1, -cy) * (0, 1, -ty) - # (0, 0, 1) ( 0, 0, 1) (0, 0, 1) (0, 0, 1) - - # In any case, the final translation may be updated at the end to - # compensate for the expand flag. - - w, h = self.size - - if translate is None: - post_trans = (0, 0) - else: - post_trans = translate - if center is None: - center = (w / 2, h / 2) - - angle = -math.radians(angle) - matrix = [ - round(math.cos(angle), 15), - round(math.sin(angle), 15), - 0.0, - round(-math.sin(angle), 15), - round(math.cos(angle), 15), - 0.0, - ] - - def transform(x: float, y: float, matrix: list[float]) -> tuple[float, float]: - (a, b, c, d, e, f) = matrix - return a * x + b * y + c, d * x + e * y + f - - matrix[2], matrix[5] = transform( - -center[0] - post_trans[0], -center[1] - post_trans[1], matrix - ) - matrix[2] += center[0] - matrix[5] += center[1] - - if expand: - # calculate output size - xx = [] - yy = [] - for x, y in ((0, 0), (w, 0), (w, h), (0, h)): - transformed_x, transformed_y = transform(x, y, matrix) - xx.append(transformed_x) - yy.append(transformed_y) - nw = math.ceil(max(xx)) - math.floor(min(xx)) - nh = math.ceil(max(yy)) - math.floor(min(yy)) - - # We multiply a translation matrix from the right. Because of its - # special form, this is the same as taking the image of the - # translation vector as new translation vector. - matrix[2], matrix[5] = transform(-(nw - w) / 2.0, -(nh - h) / 2.0, matrix) - w, h = nw, nh - - return self.transform( - (w, h), Transform.AFFINE, matrix, resample, fillcolor=fillcolor - ) - - def save( - self, fp: StrOrBytesPath | IO[bytes], format: str | None = None, **params: Any - ) -> None: - """ - Saves this image under the given filename. If no format is - specified, the format to use is determined from the filename - extension, if possible. - - Keyword options can be used to provide additional instructions - to the writer. If a writer doesn't recognise an option, it is - silently ignored. The available options are described in the - :doc:`image format documentation - <../handbook/image-file-formats>` for each writer. - - You can use a file object instead of a filename. In this case, - you must always specify the format. The file object must - implement the ``seek``, ``tell``, and ``write`` - methods, and be opened in binary mode. - - :param fp: A filename (string), os.PathLike object or file object. - :param format: Optional format override. If omitted, the - format to use is determined from the filename extension. - If a file object was used instead of a filename, this - parameter should always be used. - :param params: Extra parameters to the image writer. These can also be - set on the image itself through ``encoderinfo``. This is useful when - saving multiple images:: - - # Saving XMP data to a single image - from PIL import Image - red = Image.new("RGB", (1, 1), "#f00") - red.save("out.mpo", xmp=b"test") - - # Saving XMP data to the second frame of an image - from PIL import Image - black = Image.new("RGB", (1, 1)) - red = Image.new("RGB", (1, 1), "#f00") - red.encoderinfo = {"xmp": b"test"} - black.save("out.mpo", save_all=True, append_images=[red]) - :returns: None - :exception ValueError: If the output format could not be determined - from the file name. Use the format option to solve this. - :exception OSError: If the file could not be written. The file - may have been created, and may contain partial data. - """ - - filename: str | bytes = "" - open_fp = False - if is_path(fp): - filename = os.fspath(fp) - open_fp = True - elif fp == sys.stdout: - try: - fp = sys.stdout.buffer - except AttributeError: - pass - if not filename and hasattr(fp, "name") and is_path(fp.name): - # only set the name for metadata purposes - filename = os.fspath(fp.name) - - preinit() - - filename_ext = os.path.splitext(filename)[1].lower() - ext = filename_ext.decode() if isinstance(filename_ext, bytes) else filename_ext - - if not format: - if ext not in EXTENSION: - init() - try: - format = EXTENSION[ext] - except KeyError as e: - msg = f"unknown file extension: {ext}" - raise ValueError(msg) from e - - from . import ImageFile - - # may mutate self! - if isinstance(self, ImageFile.ImageFile) and os.path.abspath( - filename - ) == os.path.abspath(self.filename): - self._ensure_mutable() - else: - self.load() - - save_all = params.pop("save_all", None) - self._default_encoderinfo = params - encoderinfo = getattr(self, "encoderinfo", {}) - self._attach_default_encoderinfo(self) - self.encoderconfig: tuple[Any, ...] = () - - if format.upper() not in SAVE: - init() - if save_all or ( - save_all is None - and params.get("append_images") - and format.upper() in SAVE_ALL - ): - save_handler = SAVE_ALL[format.upper()] - else: - save_handler = SAVE[format.upper()] - - created = False - if open_fp: - created = not os.path.exists(filename) - if params.get("append", False): - # Open also for reading ("+"), because TIFF save_all - # writer needs to go back and edit the written data. - fp = builtins.open(filename, "r+b") - else: - fp = builtins.open(filename, "w+b") - else: - fp = cast(IO[bytes], fp) - - try: - save_handler(self, fp, filename) - except Exception: - if open_fp: - fp.close() - if created: - try: - os.remove(filename) - except PermissionError: - pass - raise - finally: - self.encoderinfo = encoderinfo - if open_fp: - fp.close() - - def _attach_default_encoderinfo(self, im: Image) -> dict[str, Any]: - encoderinfo = getattr(self, "encoderinfo", {}) - self.encoderinfo = {**im._default_encoderinfo, **encoderinfo} - return encoderinfo - - def seek(self, frame: int) -> None: - """ - Seeks to the given frame in this sequence file. If you seek - beyond the end of the sequence, the method raises an - ``EOFError`` exception. When a sequence file is opened, the - library automatically seeks to frame 0. - - See :py:meth:`~PIL.Image.Image.tell`. - - If defined, :attr:`~PIL.Image.Image.n_frames` refers to the - number of available frames. - - :param frame: Frame number, starting at 0. - :exception EOFError: If the call attempts to seek beyond the end - of the sequence. - """ - - # overridden by file handlers - if frame != 0: - msg = "no more images in file" - raise EOFError(msg) - - def show(self, title: str | None = None) -> None: - """ - Displays this image. This method is mainly intended for debugging purposes. - - This method calls :py:func:`PIL.ImageShow.show` internally. You can use - :py:func:`PIL.ImageShow.register` to override its default behaviour. - - The image is first saved to a temporary file. By default, it will be in - PNG format. - - On Unix, the image is then opened using the **xdg-open**, **display**, - **gm**, **eog** or **xv** utility, depending on which one can be found. - - On macOS, the image is opened with the native Preview application. - - On Windows, the image is opened with the standard PNG display utility. - - :param title: Optional title to use for the image window, where possible. - """ - - from . import ImageShow - - ImageShow.show(self, title) - - def split(self) -> tuple[Image, ...]: - """ - Split this image into individual bands. This method returns a - tuple of individual image bands from an image. For example, - splitting an "RGB" image creates three new images each - containing a copy of one of the original bands (red, green, - blue). - - If you need only one band, :py:meth:`~PIL.Image.Image.getchannel` - method can be more convenient and faster. - - :returns: A tuple containing bands. - """ - - self.load() - if self.im.bands == 1: - return (self.copy(),) - return tuple(map(self._new, self.im.split())) - - def getchannel(self, channel: int | str) -> Image: - """ - Returns an image containing a single channel of the source image. - - :param channel: What channel to return. Could be index - (0 for "R" channel of "RGB") or channel name - ("A" for alpha channel of "RGBA"). - :returns: An image in "L" mode. - - .. versionadded:: 4.3.0 - """ - self.load() - - if isinstance(channel, str): - try: - channel = self.getbands().index(channel) - except ValueError as e: - msg = f'The image has no channel "{channel}"' - raise ValueError(msg) from e - - return self._new(self.im.getband(channel)) - - def tell(self) -> int: - """ - Returns the current frame number. See :py:meth:`~PIL.Image.Image.seek`. - - If defined, :attr:`~PIL.Image.Image.n_frames` refers to the - number of available frames. - - :returns: Frame number, starting with 0. - """ - return 0 - - def thumbnail( - self, - size: tuple[float, float], - resample: Resampling = Resampling.BICUBIC, - reducing_gap: float | None = 2.0, - ) -> None: - """ - Make this image into a thumbnail. This method modifies the - image to contain a thumbnail version of itself, no larger than - the given size. This method calculates an appropriate thumbnail - size to preserve the aspect of the image, calls the - :py:meth:`~PIL.Image.Image.draft` method to configure the file reader - (where applicable), and finally resizes the image. - - Note that this function modifies the :py:class:`~PIL.Image.Image` - object in place. If you need to use the full resolution image as well, - apply this method to a :py:meth:`~PIL.Image.Image.copy` of the original - image. - - :param size: The requested size in pixels, as a 2-tuple: - (width, height). - :param resample: Optional resampling filter. This can be one - of :py:data:`Resampling.NEAREST`, :py:data:`Resampling.BOX`, - :py:data:`Resampling.BILINEAR`, :py:data:`Resampling.HAMMING`, - :py:data:`Resampling.BICUBIC` or :py:data:`Resampling.LANCZOS`. - If omitted, it defaults to :py:data:`Resampling.BICUBIC`. - (was :py:data:`Resampling.NEAREST` prior to version 2.5.0). - See: :ref:`concept-filters`. - :param reducing_gap: Apply optimization by resizing the image - in two steps. First, reducing the image by integer times - using :py:meth:`~PIL.Image.Image.reduce` or - :py:meth:`~PIL.Image.Image.draft` for JPEG images. - Second, resizing using regular resampling. The last step - changes size no less than by ``reducing_gap`` times. - ``reducing_gap`` may be None (no first step is performed) - or should be greater than 1.0. The bigger ``reducing_gap``, - the closer the result to the fair resampling. - The smaller ``reducing_gap``, the faster resizing. - With ``reducing_gap`` greater or equal to 3.0, the result is - indistinguishable from fair resampling in most cases. - The default value is 2.0 (very close to fair resampling - while still being faster in many cases). - :returns: None - """ - - provided_size = tuple(map(math.floor, size)) - - def preserve_aspect_ratio() -> tuple[int, int] | None: - def round_aspect(number: float, key: Callable[[int], float]) -> int: - return max(min(math.floor(number), math.ceil(number), key=key), 1) - - x, y = provided_size - if x >= self.width and y >= self.height: - return None - - aspect = self.width / self.height - if x / y >= aspect: - x = round_aspect(y * aspect, key=lambda n: abs(aspect - n / y)) - else: - y = round_aspect( - x / aspect, key=lambda n: 0 if n == 0 else abs(aspect - x / n) - ) - return x, y - - preserved_size = preserve_aspect_ratio() - if preserved_size is None: - return - final_size = preserved_size - - box = None - if reducing_gap is not None: - res = self.draft( - None, (int(size[0] * reducing_gap), int(size[1] * reducing_gap)) - ) - if res is not None: - box = res[1] - - if self.size != final_size: - im = self.resize(final_size, resample, box=box, reducing_gap=reducing_gap) - - self.im = im.im - self._size = final_size - self._mode = self.im.mode - - self.readonly = 0 - - # FIXME: the different transform methods need further explanation - # instead of bloating the method docs, add a separate chapter. - def transform( - self, - size: tuple[int, int], - method: Transform | ImageTransformHandler | SupportsGetData, - data: Sequence[Any] | None = None, - resample: int = Resampling.NEAREST, - fill: int = 1, - fillcolor: float | tuple[float, ...] | str | None = None, - ) -> Image: - """ - Transforms this image. This method creates a new image with the - given size, and the same mode as the original, and copies data - to the new image using the given transform. - - :param size: The output size in pixels, as a 2-tuple: - (width, height). - :param method: The transformation method. This is one of - :py:data:`Transform.EXTENT` (cut out a rectangular subregion), - :py:data:`Transform.AFFINE` (affine transform), - :py:data:`Transform.PERSPECTIVE` (perspective transform), - :py:data:`Transform.QUAD` (map a quadrilateral to a rectangle), or - :py:data:`Transform.MESH` (map a number of source quadrilaterals - in one operation). - - It may also be an :py:class:`~PIL.Image.ImageTransformHandler` - object:: - - class Example(Image.ImageTransformHandler): - def transform(self, size, data, resample, fill=1): - # Return result - - Implementations of :py:class:`~PIL.Image.ImageTransformHandler` - for some of the :py:class:`Transform` methods are provided - in :py:mod:`~PIL.ImageTransform`. - - It may also be an object with a ``method.getdata`` method - that returns a tuple supplying new ``method`` and ``data`` values:: - - class Example: - def getdata(self): - method = Image.Transform.EXTENT - data = (0, 0, 100, 100) - return method, data - :param data: Extra data to the transformation method. - :param resample: Optional resampling filter. It can be one of - :py:data:`Resampling.NEAREST` (use nearest neighbour), - :py:data:`Resampling.BILINEAR` (linear interpolation in a 2x2 - environment), or :py:data:`Resampling.BICUBIC` (cubic spline - interpolation in a 4x4 environment). If omitted, or if the image - has mode "1" or "P", it is set to :py:data:`Resampling.NEAREST`. - See: :ref:`concept-filters`. - :param fill: If ``method`` is an - :py:class:`~PIL.Image.ImageTransformHandler` object, this is one of - the arguments passed to it. Otherwise, it is unused. - :param fillcolor: Optional fill color for the area outside the - transform in the output image. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - if self.mode in ("LA", "RGBA") and resample != Resampling.NEAREST: - return ( - self.convert({"LA": "La", "RGBA": "RGBa"}[self.mode]) - .transform(size, method, data, resample, fill, fillcolor) - .convert(self.mode) - ) - - if isinstance(method, ImageTransformHandler): - return method.transform(size, self, resample=resample, fill=fill) - - if hasattr(method, "getdata"): - # compatibility w. old-style transform objects - method, data = method.getdata() - - if data is None: - msg = "missing method data" - raise ValueError(msg) - - im = new(self.mode, size, fillcolor) - if self.mode == "P" and self.palette: - im.palette = self.palette.copy() - im.info = self.info.copy() - if method == Transform.MESH: - # list of quads - for box, quad in data: - im.__transformer( - box, self, Transform.QUAD, quad, resample, fillcolor is None - ) - else: - im.__transformer( - (0, 0) + size, self, method, data, resample, fillcolor is None - ) - - return im - - def __transformer( - self, - box: tuple[int, int, int, int], - image: Image, - method: Transform, - data: Sequence[float], - resample: int = Resampling.NEAREST, - fill: bool = True, - ) -> None: - w = box[2] - box[0] - h = box[3] - box[1] - - if method == Transform.AFFINE: - data = data[:6] - - elif method == Transform.EXTENT: - # convert extent to an affine transform - x0, y0, x1, y1 = data - xs = (x1 - x0) / w - ys = (y1 - y0) / h - method = Transform.AFFINE - data = (xs, 0, x0, 0, ys, y0) - - elif method == Transform.PERSPECTIVE: - data = data[:8] - - elif method == Transform.QUAD: - # quadrilateral warp. data specifies the four corners - # given as NW, SW, SE, and NE. - nw = data[:2] - sw = data[2:4] - se = data[4:6] - ne = data[6:8] - x0, y0 = nw - As = 1.0 / w - At = 1.0 / h - data = ( - x0, - (ne[0] - x0) * As, - (sw[0] - x0) * At, - (se[0] - sw[0] - ne[0] + x0) * As * At, - y0, - (ne[1] - y0) * As, - (sw[1] - y0) * At, - (se[1] - sw[1] - ne[1] + y0) * As * At, - ) - - else: - msg = "unknown transformation method" - raise ValueError(msg) - - if resample not in ( - Resampling.NEAREST, - Resampling.BILINEAR, - Resampling.BICUBIC, - ): - if resample in (Resampling.BOX, Resampling.HAMMING, Resampling.LANCZOS): - unusable: dict[int, str] = { - Resampling.BOX: "Image.Resampling.BOX", - Resampling.HAMMING: "Image.Resampling.HAMMING", - Resampling.LANCZOS: "Image.Resampling.LANCZOS", - } - msg = unusable[resample] + f" ({resample}) cannot be used." - else: - msg = f"Unknown resampling filter ({resample})." - - filters = [ - f"{filter[1]} ({filter[0]})" - for filter in ( - (Resampling.NEAREST, "Image.Resampling.NEAREST"), - (Resampling.BILINEAR, "Image.Resampling.BILINEAR"), - (Resampling.BICUBIC, "Image.Resampling.BICUBIC"), - ) - ] - msg += f" Use {', '.join(filters[:-1])} or {filters[-1]}" - raise ValueError(msg) - - image.load() - - self.load() - - if image.mode in ("1", "P"): - resample = Resampling.NEAREST - - self.im.transform(box, image.im, method, data, resample, fill) - - def transpose(self, method: Transpose) -> Image: - """ - Transpose image (flip or rotate in 90 degree steps) - - :param method: One of :py:data:`Transpose.FLIP_LEFT_RIGHT`, - :py:data:`Transpose.FLIP_TOP_BOTTOM`, :py:data:`Transpose.ROTATE_90`, - :py:data:`Transpose.ROTATE_180`, :py:data:`Transpose.ROTATE_270`, - :py:data:`Transpose.TRANSPOSE` or :py:data:`Transpose.TRANSVERSE`. - :returns: Returns a flipped or rotated copy of this image. - """ - - self.load() - return self._new(self.im.transpose(method)) - - def effect_spread(self, distance: int) -> Image: - """ - Randomly spread pixels in an image. - - :param distance: Distance to spread pixels. - """ - self.load() - return self._new(self.im.effect_spread(distance)) - - def toqimage(self) -> ImageQt.ImageQt: - """Returns a QImage copy of this image""" - from . import ImageQt - - if not ImageQt.qt_is_installed: - msg = "Qt bindings are not installed" - raise ImportError(msg) - return ImageQt.toqimage(self) - - def toqpixmap(self) -> ImageQt.QPixmap: - """Returns a QPixmap copy of this image""" - from . import ImageQt - - if not ImageQt.qt_is_installed: - msg = "Qt bindings are not installed" - raise ImportError(msg) - return ImageQt.toqpixmap(self) - - -# -------------------------------------------------------------------- -# Abstract handlers. - - -class ImagePointHandler(abc.ABC): - """ - Used as a mixin by point transforms - (for use with :py:meth:`~PIL.Image.Image.point`) - """ - - @abc.abstractmethod - def point(self, im: Image) -> Image: - pass - - -class ImageTransformHandler(abc.ABC): - """ - Used as a mixin by geometry transforms - (for use with :py:meth:`~PIL.Image.Image.transform`) - """ - - @abc.abstractmethod - def transform( - self, - size: tuple[int, int], - image: Image, - **options: Any, - ) -> Image: - pass - - -# -------------------------------------------------------------------- -# Factories - - -def _check_size(size: Any) -> None: - """ - Common check to enforce type and sanity check on size tuples - - :param size: Should be a 2 tuple of (width, height) - :returns: None, or raises a ValueError - """ - - if not isinstance(size, (list, tuple)): - msg = "Size must be a list or tuple" - raise ValueError(msg) - if len(size) != 2: - msg = "Size must be a sequence of length 2" - raise ValueError(msg) - if size[0] < 0 or size[1] < 0: - msg = "Width and height must be >= 0" - raise ValueError(msg) - - -def new( - mode: str, - size: tuple[int, int] | list[int], - color: float | tuple[float, ...] | str | None = 0, -) -> Image: - """ - Creates a new image with the given mode and size. - - :param mode: The mode to use for the new image. See: - :ref:`concept-modes`. - :param size: A 2-tuple, containing (width, height) in pixels. - :param color: What color to use for the image. Default is black. If given, - this should be a single integer or floating point value for single-band - modes, and a tuple for multi-band modes (one value per band). When - creating RGB or HSV images, you can also use color strings as supported - by the ImageColor module. See :ref:`colors` for more information. If the - color is None, the image is not initialised. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - _check_size(size) - - if color is None: - # don't initialize - return Image()._new(core.new(mode, size)) - - if isinstance(color, str): - # css3-style specifier - - from . import ImageColor - - color = ImageColor.getcolor(color, mode) - - im = Image() - if ( - mode == "P" - and isinstance(color, (list, tuple)) - and all(isinstance(i, int) for i in color) - ): - color_ints: tuple[int, ...] = cast(tuple[int, ...], tuple(color)) - if len(color_ints) == 3 or len(color_ints) == 4: - # RGB or RGBA value for a P image - from . import ImagePalette - - im.palette = ImagePalette.ImagePalette() - color = im.palette.getcolor(color_ints) - return im._new(core.fill(mode, size, color)) - - -def frombytes( - mode: str, - size: tuple[int, int], - data: bytes | bytearray | SupportsArrayInterface, - decoder_name: str = "raw", - *args: Any, -) -> Image: - """ - Creates a copy of an image memory from pixel data in a buffer. - - In its simplest form, this function takes three arguments - (mode, size, and unpacked pixel data). - - You can also use any pixel decoder supported by PIL. For more - information on available decoders, see the section - :ref:`Writing Your Own File Codec `. - - Note that this function decodes pixel data only, not entire images. - If you have an entire image in a string, wrap it in a - :py:class:`~io.BytesIO` object, and use :py:func:`~PIL.Image.open` to load - it. - - :param mode: The image mode. See: :ref:`concept-modes`. - :param size: The image size. - :param data: A byte buffer containing raw data for the given mode. - :param decoder_name: What decoder to use. - :param args: Additional parameters for the given decoder. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - _check_size(size) - - im = new(mode, size) - if im.width != 0 and im.height != 0: - decoder_args: Any = args - if len(decoder_args) == 1 and isinstance(decoder_args[0], tuple): - # may pass tuple instead of argument list - decoder_args = decoder_args[0] - - if decoder_name == "raw" and decoder_args == (): - decoder_args = mode - - im.frombytes(data, decoder_name, decoder_args) - return im - - -def frombuffer( - mode: str, - size: tuple[int, int], - data: bytes | SupportsArrayInterface, - decoder_name: str = "raw", - *args: Any, -) -> Image: - """ - Creates an image memory referencing pixel data in a byte buffer. - - This function is similar to :py:func:`~PIL.Image.frombytes`, but uses data - in the byte buffer, where possible. This means that changes to the - original buffer object are reflected in this image). Not all modes can - share memory; supported modes include "L", "RGBX", "RGBA", and "CMYK". - - Note that this function decodes pixel data only, not entire images. - If you have an entire image file in a string, wrap it in a - :py:class:`~io.BytesIO` object, and use :py:func:`~PIL.Image.open` to load it. - - The default parameters used for the "raw" decoder differs from that used for - :py:func:`~PIL.Image.frombytes`. This is a bug, and will probably be fixed in a - future release. The current release issues a warning if you do this; to disable - the warning, you should provide the full set of parameters. See below for details. - - :param mode: The image mode. See: :ref:`concept-modes`. - :param size: The image size. - :param data: A bytes or other buffer object containing raw - data for the given mode. - :param decoder_name: What decoder to use. - :param args: Additional parameters for the given decoder. For the - default encoder ("raw"), it's recommended that you provide the - full set of parameters:: - - frombuffer(mode, size, data, "raw", mode, 0, 1) - - :returns: An :py:class:`~PIL.Image.Image` object. - - .. versionadded:: 1.1.4 - """ - - _check_size(size) - - # may pass tuple instead of argument list - if len(args) == 1 and isinstance(args[0], tuple): - args = args[0] - - if decoder_name == "raw": - if args == (): - args = mode, 0, 1 - if args[0] in _MAPMODES: - im = new(mode, (0, 0)) - im = im._new(core.map_buffer(data, size, decoder_name, 0, args)) - if mode == "P": - from . import ImagePalette - - im.palette = ImagePalette.ImagePalette("RGB", im.im.getpalette("RGB")) - im.readonly = 1 - return im - - return frombytes(mode, size, data, decoder_name, args) - - -class SupportsArrayInterface(Protocol): - """ - An object that has an ``__array_interface__`` dictionary. - """ - - @property - def __array_interface__(self) -> dict[str, Any]: - raise NotImplementedError() - - -class SupportsArrowArrayInterface(Protocol): - """ - An object that has an ``__arrow_c_array__`` method corresponding to the arrow c - data interface. - """ - - def __arrow_c_array__( - self, requested_schema: "PyCapsule" = None # type: ignore[name-defined] # noqa: F821, UP037 - ) -> tuple["PyCapsule", "PyCapsule"]: # type: ignore[name-defined] # noqa: F821, UP037 - raise NotImplementedError() - - -def fromarray(obj: SupportsArrayInterface, mode: str | None = None) -> Image: - """ - Creates an image memory from an object exporting the array interface - (using the buffer protocol):: - - from PIL import Image - import numpy as np - a = np.zeros((5, 5)) - im = Image.fromarray(a) - - If ``obj`` is not contiguous, then the ``tobytes`` method is called - and :py:func:`~PIL.Image.frombuffer` is used. - - In the case of NumPy, be aware that Pillow modes do not always correspond - to NumPy dtypes. Pillow modes only offer 1-bit pixels, 8-bit pixels, - 32-bit signed integer pixels, and 32-bit floating point pixels. - - Pillow images can also be converted to arrays:: - - from PIL import Image - import numpy as np - im = Image.open("hopper.jpg") - a = np.asarray(im) - - When converting Pillow images to arrays however, only pixel values are - transferred. This means that P and PA mode images will lose their palette. - - :param obj: Object with array interface - :param mode: Optional mode to use when reading ``obj``. Since pixel values do not - contain information about palettes or color spaces, this can be used to place - grayscale L mode data within a P mode image, or read RGB data as YCbCr for - example. - - See: :ref:`concept-modes` for general information about modes. - :returns: An image object. - - .. versionadded:: 1.1.6 - """ - arr = obj.__array_interface__ - shape = arr["shape"] - ndim = len(shape) - strides = arr.get("strides", None) - try: - typekey = (1, 1) + shape[2:], arr["typestr"] - except KeyError as e: - if mode is not None: - typekey = None - color_modes: list[str] = [] - else: - msg = "Cannot handle this data type" - raise TypeError(msg) from e - if typekey is not None: - try: - typemode, rawmode, color_modes = _fromarray_typemap[typekey] - except KeyError as e: - typekey_shape, typestr = typekey - msg = f"Cannot handle this data type: {typekey_shape}, {typestr}" - raise TypeError(msg) from e - if mode is not None: - if mode != typemode and mode not in color_modes: - deprecate("'mode' parameter for changing data types", 13) - rawmode = mode - else: - mode = typemode - if mode in ["1", "L", "I", "P", "F"]: - ndmax = 2 - elif mode == "RGB": - ndmax = 3 - else: - ndmax = 4 - if ndim > ndmax: - msg = f"Too many dimensions: {ndim} > {ndmax}." - raise ValueError(msg) - - size = 1 if ndim == 1 else shape[1], shape[0] - if strides is not None: - if hasattr(obj, "tobytes"): - obj = obj.tobytes() - elif hasattr(obj, "tostring"): - obj = obj.tostring() - else: - msg = "'strides' requires either tobytes() or tostring()" - raise ValueError(msg) - - return frombuffer(mode, size, obj, "raw", rawmode, 0, 1) - - -def fromarrow( - obj: SupportsArrowArrayInterface, mode: str, size: tuple[int, int] -) -> Image: - """Creates an image with zero-copy shared memory from an object exporting - the arrow_c_array interface protocol:: - - from PIL import Image - import pyarrow as pa - arr = pa.array([0]*(5*5*4), type=pa.uint8()) - im = Image.fromarrow(arr, 'RGBA', (5, 5)) - - If the data representation of the ``obj`` is not compatible with - Pillow internal storage, a ValueError is raised. - - Pillow images can also be converted to Arrow objects:: - - from PIL import Image - import pyarrow as pa - im = Image.open('hopper.jpg') - arr = pa.array(im) - - As with array support, when converting Pillow images to arrays, - only pixel values are transferred. This means that P and PA mode - images will lose their palette. - - :param obj: Object with an arrow_c_array interface - :param mode: Image mode. - :param size: Image size. This must match the storage of the arrow object. - :returns: An Image object - - Note that according to the Arrow spec, both the producer and the - consumer should consider the exported array to be immutable, as - unsynchronized updates will potentially cause inconsistent data. - - See: :ref:`arrow-support` for more detailed information - - .. versionadded:: 11.2.1 - - """ - if not hasattr(obj, "__arrow_c_array__"): - msg = "arrow_c_array interface not found" - raise ValueError(msg) - - (schema_capsule, array_capsule) = obj.__arrow_c_array__() - _im = core.new_arrow(mode, size, schema_capsule, array_capsule) - if _im: - return Image()._new(_im) - - msg = "new_arrow returned None without an exception" - raise ValueError(msg) - - -def fromqimage(im: ImageQt.QImage) -> ImageFile.ImageFile: - """Creates an image instance from a QImage image""" - from . import ImageQt - - if not ImageQt.qt_is_installed: - msg = "Qt bindings are not installed" - raise ImportError(msg) - return ImageQt.fromqimage(im) - - -def fromqpixmap(im: ImageQt.QPixmap) -> ImageFile.ImageFile: - """Creates an image instance from a QPixmap image""" - from . import ImageQt - - if not ImageQt.qt_is_installed: - msg = "Qt bindings are not installed" - raise ImportError(msg) - return ImageQt.fromqpixmap(im) - - -_fromarray_typemap = { - # (shape, typestr) => mode, rawmode, color modes - # first two members of shape are set to one - ((1, 1), "|b1"): ("1", "1;8", []), - ((1, 1), "|u1"): ("L", "L", ["P"]), - ((1, 1), "|i1"): ("I", "I;8", []), - ((1, 1), "u2"): ("I", "I;16B", []), - ((1, 1), "i2"): ("I", "I;16BS", []), - ((1, 1), "u4"): ("I", "I;32B", []), - ((1, 1), "i4"): ("I", "I;32BS", []), - ((1, 1), "f4"): ("F", "F;32BF", []), - ((1, 1), "f8"): ("F", "F;64BF", []), - ((1, 1, 2), "|u1"): ("LA", "LA", ["La", "PA"]), - ((1, 1, 3), "|u1"): ("RGB", "RGB", ["YCbCr", "LAB", "HSV"]), - ((1, 1, 4), "|u1"): ("RGBA", "RGBA", ["RGBa", "RGBX", "CMYK"]), - # shortcuts: - ((1, 1), f"{_ENDIAN}i4"): ("I", "I", []), - ((1, 1), f"{_ENDIAN}f4"): ("F", "F", []), -} - - -def _decompression_bomb_check(size: tuple[int, int]) -> None: - if MAX_IMAGE_PIXELS is None: - return - - pixels = max(1, size[0]) * max(1, size[1]) - - if pixels > 2 * MAX_IMAGE_PIXELS: - msg = ( - f"Image size ({pixels} pixels) exceeds limit of {2 * MAX_IMAGE_PIXELS} " - "pixels, could be decompression bomb DOS attack." - ) - raise DecompressionBombError(msg) - - if pixels > MAX_IMAGE_PIXELS: - warnings.warn( - f"Image size ({pixels} pixels) exceeds limit of {MAX_IMAGE_PIXELS} pixels, " - "could be decompression bomb DOS attack.", - DecompressionBombWarning, - ) - - -def open( - fp: StrOrBytesPath | IO[bytes], - mode: Literal["r"] = "r", - formats: list[str] | tuple[str, ...] | None = None, -) -> ImageFile.ImageFile: - """ - Opens and identifies the given image file. - - This is a lazy operation; this function identifies the file, but - the file remains open and the actual image data is not read from - the file until you try to process the data (or call the - :py:meth:`~PIL.Image.Image.load` method). See - :py:func:`~PIL.Image.new`. See :ref:`file-handling`. - - :param fp: A filename (string), os.PathLike object or a file object. - The file object must implement ``file.read``, - ``file.seek``, and ``file.tell`` methods, - and be opened in binary mode. The file object will also seek to zero - before reading. - :param mode: The mode. If given, this argument must be "r". - :param formats: A list or tuple of formats to attempt to load the file in. - This can be used to restrict the set of formats checked. - Pass ``None`` to try all supported formats. You can print the set of - available formats by running ``python3 -m PIL`` or using - the :py:func:`PIL.features.pilinfo` function. - :returns: An :py:class:`~PIL.Image.Image` object. - :exception FileNotFoundError: If the file cannot be found. - :exception PIL.UnidentifiedImageError: If the image cannot be opened and - identified. - :exception ValueError: If the ``mode`` is not "r", or if a ``StringIO`` - instance is used for ``fp``. - :exception TypeError: If ``formats`` is not ``None``, a list or a tuple. - """ - - if mode != "r": - msg = f"bad mode {repr(mode)}" # type: ignore[unreachable] - raise ValueError(msg) - elif isinstance(fp, io.StringIO): - msg = ( # type: ignore[unreachable] - "StringIO cannot be used to open an image. " - "Binary data must be used instead." - ) - raise ValueError(msg) - - if formats is None: - formats = ID - elif not isinstance(formats, (list, tuple)): - msg = "formats must be a list or tuple" # type: ignore[unreachable] - raise TypeError(msg) - - exclusive_fp = False - filename: str | bytes = "" - if is_path(fp): - filename = os.fspath(fp) - fp = builtins.open(filename, "rb") - exclusive_fp = True - else: - fp = cast(IO[bytes], fp) - - try: - fp.seek(0) - except (AttributeError, io.UnsupportedOperation): - fp = io.BytesIO(fp.read()) - exclusive_fp = True - - prefix = fp.read(16) - - preinit() - - warning_messages: list[str] = [] - - def _open_core( - fp: IO[bytes], - filename: str | bytes, - prefix: bytes, - formats: list[str] | tuple[str, ...], - ) -> ImageFile.ImageFile | None: - for i in formats: - i = i.upper() - if i not in OPEN: - init() - try: - factory, accept = OPEN[i] - result = not accept or accept(prefix) - if isinstance(result, str): - warning_messages.append(result) - elif result: - fp.seek(0) - im = factory(fp, filename) - _decompression_bomb_check(im.size) - return im - except (SyntaxError, IndexError, TypeError, struct.error) as e: - if WARN_POSSIBLE_FORMATS: - warning_messages.append(i + " opening failed. " + str(e)) - except BaseException: - if exclusive_fp: - fp.close() - raise - return None - - im = _open_core(fp, filename, prefix, formats) - - if im is None and formats is ID: - checked_formats = ID.copy() - if init(): - im = _open_core( - fp, - filename, - prefix, - tuple(format for format in formats if format not in checked_formats), - ) - - if im: - im._exclusive_fp = exclusive_fp - return im - - if exclusive_fp: - fp.close() - for message in warning_messages: - warnings.warn(message) - msg = "cannot identify image file %r" % (filename if filename else fp) - raise UnidentifiedImageError(msg) - - -# -# Image processing. - - -def alpha_composite(im1: Image, im2: Image) -> Image: - """ - Alpha composite im2 over im1. - - :param im1: The first image. Must have mode RGBA or LA. - :param im2: The second image. Must have the same mode and size as the first image. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - im1.load() - im2.load() - return im1._new(core.alpha_composite(im1.im, im2.im)) - - -def blend(im1: Image, im2: Image, alpha: float) -> Image: - """ - Creates a new image by interpolating between two input images, using - a constant alpha:: - - out = image1 * (1.0 - alpha) + image2 * alpha - - :param im1: The first image. - :param im2: The second image. Must have the same mode and size as - the first image. - :param alpha: The interpolation alpha factor. If alpha is 0.0, a - copy of the first image is returned. If alpha is 1.0, a copy of - the second image is returned. There are no restrictions on the - alpha value. If necessary, the result is clipped to fit into - the allowed output range. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - im1.load() - im2.load() - return im1._new(core.blend(im1.im, im2.im, alpha)) - - -def composite(image1: Image, image2: Image, mask: Image) -> Image: - """ - Create composite image by blending images using a transparency mask. - - :param image1: The first image. - :param image2: The second image. Must have the same mode and - size as the first image. - :param mask: A mask image. This image can have mode - "1", "L", or "RGBA", and must have the same size as the - other two images. - """ - - image = image2.copy() - image.paste(image1, None, mask) - return image - - -def eval(image: Image, *args: Callable[[int], float]) -> Image: - """ - Applies the function (which should take one argument) to each pixel - in the given image. If the image has more than one band, the same - function is applied to each band. Note that the function is - evaluated once for each possible pixel value, so you cannot use - random components or other generators. - - :param image: The input image. - :param function: A function object, taking one integer argument. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - return image.point(args[0]) - - -def merge(mode: str, bands: Sequence[Image]) -> Image: - """ - Merge a set of single band images into a new multiband image. - - :param mode: The mode to use for the output image. See: - :ref:`concept-modes`. - :param bands: A sequence containing one single-band image for - each band in the output image. All bands must have the - same size. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - - if getmodebands(mode) != len(bands) or "*" in mode: - msg = "wrong number of bands" - raise ValueError(msg) - for band in bands[1:]: - if band.mode != getmodetype(mode): - msg = "mode mismatch" - raise ValueError(msg) - if band.size != bands[0].size: - msg = "size mismatch" - raise ValueError(msg) - for band in bands: - band.load() - return bands[0]._new(core.merge(mode, *[b.im for b in bands])) - - -# -------------------------------------------------------------------- -# Plugin registry - - -def register_open( - id: str, - factory: ( - Callable[[IO[bytes], str | bytes], ImageFile.ImageFile] - | type[ImageFile.ImageFile] - ), - accept: Callable[[bytes], bool | str] | None = None, -) -> None: - """ - Register an image file plugin. This function should not be used - in application code. - - :param id: An image format identifier. - :param factory: An image file factory method. - :param accept: An optional function that can be used to quickly - reject images having another format. - """ - id = id.upper() - if id not in ID: - ID.append(id) - OPEN[id] = factory, accept - - -def register_mime(id: str, mimetype: str) -> None: - """ - Registers an image MIME type by populating ``Image.MIME``. This function - should not be used in application code. - - ``Image.MIME`` provides a mapping from image format identifiers to mime - formats, but :py:meth:`~PIL.ImageFile.ImageFile.get_format_mimetype` can - provide a different result for specific images. - - :param id: An image format identifier. - :param mimetype: The image MIME type for this format. - """ - MIME[id.upper()] = mimetype - - -def register_save( - id: str, driver: Callable[[Image, IO[bytes], str | bytes], None] -) -> None: - """ - Registers an image save function. This function should not be - used in application code. - - :param id: An image format identifier. - :param driver: A function to save images in this format. - """ - SAVE[id.upper()] = driver - - -def register_save_all( - id: str, driver: Callable[[Image, IO[bytes], str | bytes], None] -) -> None: - """ - Registers an image function to save all the frames - of a multiframe format. This function should not be - used in application code. - - :param id: An image format identifier. - :param driver: A function to save images in this format. - """ - SAVE_ALL[id.upper()] = driver - - -def register_extension(id: str, extension: str) -> None: - """ - Registers an image extension. This function should not be - used in application code. - - :param id: An image format identifier. - :param extension: An extension used for this format. - """ - EXTENSION[extension.lower()] = id.upper() - - -def register_extensions(id: str, extensions: list[str]) -> None: - """ - Registers image extensions. This function should not be - used in application code. - - :param id: An image format identifier. - :param extensions: A list of extensions used for this format. - """ - for extension in extensions: - register_extension(id, extension) - - -def registered_extensions() -> dict[str, str]: - """ - Returns a dictionary containing all file extensions belonging - to registered plugins - """ - init() - return EXTENSION - - -def register_decoder(name: str, decoder: type[ImageFile.PyDecoder]) -> None: - """ - Registers an image decoder. This function should not be - used in application code. - - :param name: The name of the decoder - :param decoder: An ImageFile.PyDecoder object - - .. versionadded:: 4.1.0 - """ - DECODERS[name] = decoder - - -def register_encoder(name: str, encoder: type[ImageFile.PyEncoder]) -> None: - """ - Registers an image encoder. This function should not be - used in application code. - - :param name: The name of the encoder - :param encoder: An ImageFile.PyEncoder object - - .. versionadded:: 4.1.0 - """ - ENCODERS[name] = encoder - - -# -------------------------------------------------------------------- -# Simple display support. - - -def _show(image: Image, **options: Any) -> None: - from . import ImageShow - - deprecate("Image._show", 13, "ImageShow.show") - ImageShow.show(image, **options) - - -# -------------------------------------------------------------------- -# Effects - - -def effect_mandelbrot( - size: tuple[int, int], extent: tuple[float, float, float, float], quality: int -) -> Image: - """ - Generate a Mandelbrot set covering the given extent. - - :param size: The requested size in pixels, as a 2-tuple: - (width, height). - :param extent: The extent to cover, as a 4-tuple: - (x0, y0, x1, y1). - :param quality: Quality. - """ - return Image()._new(core.effect_mandelbrot(size, extent, quality)) - - -def effect_noise(size: tuple[int, int], sigma: float) -> Image: - """ - Generate Gaussian noise centered around 128. - - :param size: The requested size in pixels, as a 2-tuple: - (width, height). - :param sigma: Standard deviation of noise. - """ - return Image()._new(core.effect_noise(size, sigma)) - - -def linear_gradient(mode: str) -> Image: - """ - Generate 256x256 linear gradient from black to white, top to bottom. - - :param mode: Input mode. - """ - return Image()._new(core.linear_gradient(mode)) - - -def radial_gradient(mode: str) -> Image: - """ - Generate 256x256 radial gradient from black to white, centre to edge. - - :param mode: Input mode. - """ - return Image()._new(core.radial_gradient(mode)) - - -# -------------------------------------------------------------------- -# Resources - - -def _apply_env_variables(env: dict[str, str] | None = None) -> None: - env_dict = env if env is not None else os.environ - - for var_name, setter in [ - ("PILLOW_ALIGNMENT", core.set_alignment), - ("PILLOW_BLOCK_SIZE", core.set_block_size), - ("PILLOW_BLOCKS_MAX", core.set_blocks_max), - ]: - if var_name not in env_dict: - continue - - var = env_dict[var_name].lower() - - units = 1 - for postfix, mul in [("k", 1024), ("m", 1024 * 1024)]: - if var.endswith(postfix): - units = mul - var = var[: -len(postfix)] - - try: - var_int = int(var) * units - except ValueError: - warnings.warn(f"{var_name} is not int") - continue - - try: - setter(var_int) - except ValueError as e: - warnings.warn(f"{var_name}: {e}") - - -_apply_env_variables() -atexit.register(core.clear_cache) - - -if TYPE_CHECKING: - _ExifBase = MutableMapping[int, Any] -else: - _ExifBase = MutableMapping - - -class Exif(_ExifBase): - """ - This class provides read and write access to EXIF image data:: - - from PIL import Image - im = Image.open("exif.png") - exif = im.getexif() # Returns an instance of this class - - Information can be read and written, iterated over or deleted:: - - print(exif[274]) # 1 - exif[274] = 2 - for k, v in exif.items(): - print("Tag", k, "Value", v) # Tag 274 Value 2 - del exif[274] - - To access information beyond IFD0, :py:meth:`~PIL.Image.Exif.get_ifd` - returns a dictionary:: - - from PIL import ExifTags - im = Image.open("exif_gps.jpg") - exif = im.getexif() - gps_ifd = exif.get_ifd(ExifTags.IFD.GPSInfo) - print(gps_ifd) - - Other IFDs include ``ExifTags.IFD.Exif``, ``ExifTags.IFD.MakerNote``, - ``ExifTags.IFD.Interop`` and ``ExifTags.IFD.IFD1``. - - :py:mod:`~PIL.ExifTags` also has enum classes to provide names for data:: - - print(exif[ExifTags.Base.Software]) # PIL - print(gps_ifd[ExifTags.GPS.GPSDateStamp]) # 1999:99:99 99:99:99 - """ - - endian: str | None = None - bigtiff = False - _loaded = False - - def __init__(self) -> None: - self._data: dict[int, Any] = {} - self._hidden_data: dict[int, Any] = {} - self._ifds: dict[int, dict[int, Any]] = {} - self._info: TiffImagePlugin.ImageFileDirectory_v2 | None = None - self._loaded_exif: bytes | None = None - - def _fixup(self, value: Any) -> Any: - try: - if len(value) == 1 and isinstance(value, tuple): - return value[0] - except Exception: - pass - return value - - def _fixup_dict(self, src_dict: dict[int, Any]) -> dict[int, Any]: - # Helper function - # returns a dict with any single item tuples/lists as individual values - return {k: self._fixup(v) for k, v in src_dict.items()} - - def _get_ifd_dict( - self, offset: int, group: int | None = None - ) -> dict[int, Any] | None: - try: - # an offset pointer to the location of the nested embedded IFD. - # It should be a long, but may be corrupted. - self.fp.seek(offset) - except (KeyError, TypeError): - return None - else: - from . import TiffImagePlugin - - info = TiffImagePlugin.ImageFileDirectory_v2(self.head, group=group) - info.load(self.fp) - return self._fixup_dict(dict(info)) - - def _get_head(self) -> bytes: - version = b"\x2b" if self.bigtiff else b"\x2a" - if self.endian == "<": - head = b"II" + version + b"\x00" + o32le(8) - else: - head = b"MM\x00" + version + o32be(8) - if self.bigtiff: - head += o32le(8) if self.endian == "<" else o32be(8) - head += b"\x00\x00\x00\x00" - return head - - def load(self, data: bytes) -> None: - # Extract EXIF information. This is highly experimental, - # and is likely to be replaced with something better in a future - # version. - - # The EXIF record consists of a TIFF file embedded in a JPEG - # application marker (!). - if data == self._loaded_exif: - return - self._loaded_exif = data - self._data.clear() - self._hidden_data.clear() - self._ifds.clear() - while data and data.startswith(b"Exif\x00\x00"): - data = data[6:] - if not data: - self._info = None - return - - self.fp: IO[bytes] = io.BytesIO(data) - self.head = self.fp.read(8) - # process dictionary - from . import TiffImagePlugin - - self._info = TiffImagePlugin.ImageFileDirectory_v2(self.head) - self.endian = self._info._endian - self.fp.seek(self._info.next) - self._info.load(self.fp) - - def load_from_fp(self, fp: IO[bytes], offset: int | None = None) -> None: - self._loaded_exif = None - self._data.clear() - self._hidden_data.clear() - self._ifds.clear() - - # process dictionary - from . import TiffImagePlugin - - self.fp = fp - if offset is not None: - self.head = self._get_head() - else: - self.head = self.fp.read(8) - self._info = TiffImagePlugin.ImageFileDirectory_v2(self.head) - if self.endian is None: - self.endian = self._info._endian - if offset is None: - offset = self._info.next - self.fp.tell() - self.fp.seek(offset) - self._info.load(self.fp) - - def _get_merged_dict(self) -> dict[int, Any]: - merged_dict = dict(self) - - # get EXIF extension - if ExifTags.IFD.Exif in self: - ifd = self._get_ifd_dict(self[ExifTags.IFD.Exif], ExifTags.IFD.Exif) - if ifd: - merged_dict.update(ifd) - - # GPS - if ExifTags.IFD.GPSInfo in self: - merged_dict[ExifTags.IFD.GPSInfo] = self._get_ifd_dict( - self[ExifTags.IFD.GPSInfo], ExifTags.IFD.GPSInfo - ) - - return merged_dict - - def tobytes(self, offset: int = 8) -> bytes: - from . import TiffImagePlugin - - head = self._get_head() - ifd = TiffImagePlugin.ImageFileDirectory_v2(ifh=head) - for tag, ifd_dict in self._ifds.items(): - if tag not in self: - ifd[tag] = ifd_dict - for tag, value in self.items(): - if tag in [ - ExifTags.IFD.Exif, - ExifTags.IFD.GPSInfo, - ] and not isinstance(value, dict): - value = self.get_ifd(tag) - if ( - tag == ExifTags.IFD.Exif - and ExifTags.IFD.Interop in value - and not isinstance(value[ExifTags.IFD.Interop], dict) - ): - value = value.copy() - value[ExifTags.IFD.Interop] = self.get_ifd(ExifTags.IFD.Interop) - ifd[tag] = value - return b"Exif\x00\x00" + head + ifd.tobytes(offset) - - def get_ifd(self, tag: int) -> dict[int, Any]: - if tag not in self._ifds: - if tag == ExifTags.IFD.IFD1: - if self._info is not None and self._info.next != 0: - ifd = self._get_ifd_dict(self._info.next) - if ifd is not None: - self._ifds[tag] = ifd - elif tag in [ExifTags.IFD.Exif, ExifTags.IFD.GPSInfo]: - offset = self._hidden_data.get(tag, self.get(tag)) - if offset is not None: - ifd = self._get_ifd_dict(offset, tag) - if ifd is not None: - self._ifds[tag] = ifd - elif tag in [ExifTags.IFD.Interop, ExifTags.IFD.MakerNote]: - if ExifTags.IFD.Exif not in self._ifds: - self.get_ifd(ExifTags.IFD.Exif) - tag_data = self._ifds[ExifTags.IFD.Exif][tag] - if tag == ExifTags.IFD.MakerNote: - from .TiffImagePlugin import ImageFileDirectory_v2 - - if tag_data.startswith(b"FUJIFILM"): - ifd_offset = i32le(tag_data, 8) - ifd_data = tag_data[ifd_offset:] - - makernote = {} - for i in range(struct.unpack(" 4: - (offset,) = struct.unpack("H", tag_data[:2])[0]): - ifd_tag, typ, count, data = struct.unpack( - ">HHL4s", tag_data[i * 12 + 2 : (i + 1) * 12 + 2] - ) - if ifd_tag == 0x1101: - # CameraInfo - (offset,) = struct.unpack(">L", data) - self.fp.seek(offset) - - camerainfo: dict[str, int | bytes] = { - "ModelID": self.fp.read(4) - } - - self.fp.read(4) - # Seconds since 2000 - camerainfo["TimeStamp"] = i32le(self.fp.read(12)) - - self.fp.read(4) - camerainfo["InternalSerialNumber"] = self.fp.read(4) - - self.fp.read(12) - parallax = self.fp.read(4) - handler = ImageFileDirectory_v2._load_dispatch[ - TiffTags.FLOAT - ][1] - camerainfo["Parallax"] = handler( - ImageFileDirectory_v2(), parallax, False - )[0] - - self.fp.read(4) - camerainfo["Category"] = self.fp.read(2) - - makernote = {0x1101: camerainfo} - self._ifds[tag] = makernote - else: - # Interop - ifd = self._get_ifd_dict(tag_data, tag) - if ifd is not None: - self._ifds[tag] = ifd - ifd = self._ifds.setdefault(tag, {}) - if tag == ExifTags.IFD.Exif and self._hidden_data: - ifd = { - k: v - for (k, v) in ifd.items() - if k not in (ExifTags.IFD.Interop, ExifTags.IFD.MakerNote) - } - return ifd - - def hide_offsets(self) -> None: - for tag in (ExifTags.IFD.Exif, ExifTags.IFD.GPSInfo): - if tag in self: - self._hidden_data[tag] = self[tag] - del self[tag] - - def __str__(self) -> str: - if self._info is not None: - # Load all keys into self._data - for tag in self._info: - self[tag] - - return str(self._data) - - def __len__(self) -> int: - keys = set(self._data) - if self._info is not None: - keys.update(self._info) - return len(keys) - - def __getitem__(self, tag: int) -> Any: - if self._info is not None and tag not in self._data and tag in self._info: - self._data[tag] = self._fixup(self._info[tag]) - del self._info[tag] - return self._data[tag] - - def __contains__(self, tag: object) -> bool: - return tag in self._data or (self._info is not None and tag in self._info) - - def __setitem__(self, tag: int, value: Any) -> None: - if self._info is not None and tag in self._info: - del self._info[tag] - self._data[tag] = value - - def __delitem__(self, tag: int) -> None: - if self._info is not None and tag in self._info: - del self._info[tag] - else: - del self._data[tag] - if tag in self._ifds: - del self._ifds[tag] - - def __iter__(self) -> Iterator[int]: - keys = set(self._data) - if self._info is not None: - keys.update(self._info) - return iter(keys) diff --git a/voxvera/vendor/PIL/ImageChops.py b/voxvera/vendor/PIL/ImageChops.py deleted file mode 100644 index 29a5c99..0000000 --- a/voxvera/vendor/PIL/ImageChops.py +++ /dev/null @@ -1,311 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# standard channel operations -# -# History: -# 1996-03-24 fl Created -# 1996-08-13 fl Added logical operations (for "1" images) -# 2000-10-12 fl Added offset method (from Image.py) -# -# Copyright (c) 1997-2000 by Secret Labs AB -# Copyright (c) 1996-2000 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# - -from __future__ import annotations - -from . import Image - - -def constant(image: Image.Image, value: int) -> Image.Image: - """Fill a channel with a given gray level. - - :rtype: :py:class:`~PIL.Image.Image` - """ - - return Image.new("L", image.size, value) - - -def duplicate(image: Image.Image) -> Image.Image: - """Copy a channel. Alias for :py:meth:`PIL.Image.Image.copy`. - - :rtype: :py:class:`~PIL.Image.Image` - """ - - return image.copy() - - -def invert(image: Image.Image) -> Image.Image: - """ - Invert an image (channel). :: - - out = MAX - image - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image.load() - return image._new(image.im.chop_invert()) - - -def lighter(image1: Image.Image, image2: Image.Image) -> Image.Image: - """ - Compares the two images, pixel by pixel, and returns a new image containing - the lighter values. :: - - out = max(image1, image2) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_lighter(image2.im)) - - -def darker(image1: Image.Image, image2: Image.Image) -> Image.Image: - """ - Compares the two images, pixel by pixel, and returns a new image containing - the darker values. :: - - out = min(image1, image2) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_darker(image2.im)) - - -def difference(image1: Image.Image, image2: Image.Image) -> Image.Image: - """ - Returns the absolute value of the pixel-by-pixel difference between the two - images. :: - - out = abs(image1 - image2) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_difference(image2.im)) - - -def multiply(image1: Image.Image, image2: Image.Image) -> Image.Image: - """ - Superimposes two images on top of each other. - - If you multiply an image with a solid black image, the result is black. If - you multiply with a solid white image, the image is unaffected. :: - - out = image1 * image2 / MAX - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_multiply(image2.im)) - - -def screen(image1: Image.Image, image2: Image.Image) -> Image.Image: - """ - Superimposes two inverted images on top of each other. :: - - out = MAX - ((MAX - image1) * (MAX - image2) / MAX) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_screen(image2.im)) - - -def soft_light(image1: Image.Image, image2: Image.Image) -> Image.Image: - """ - Superimposes two images on top of each other using the Soft Light algorithm - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_soft_light(image2.im)) - - -def hard_light(image1: Image.Image, image2: Image.Image) -> Image.Image: - """ - Superimposes two images on top of each other using the Hard Light algorithm - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_hard_light(image2.im)) - - -def overlay(image1: Image.Image, image2: Image.Image) -> Image.Image: - """ - Superimposes two images on top of each other using the Overlay algorithm - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_overlay(image2.im)) - - -def add( - image1: Image.Image, image2: Image.Image, scale: float = 1.0, offset: float = 0 -) -> Image.Image: - """ - Adds two images, dividing the result by scale and adding the - offset. If omitted, scale defaults to 1.0, and offset to 0.0. :: - - out = ((image1 + image2) / scale + offset) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_add(image2.im, scale, offset)) - - -def subtract( - image1: Image.Image, image2: Image.Image, scale: float = 1.0, offset: float = 0 -) -> Image.Image: - """ - Subtracts two images, dividing the result by scale and adding the offset. - If omitted, scale defaults to 1.0, and offset to 0.0. :: - - out = ((image1 - image2) / scale + offset) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_subtract(image2.im, scale, offset)) - - -def add_modulo(image1: Image.Image, image2: Image.Image) -> Image.Image: - """Add two images, without clipping the result. :: - - out = ((image1 + image2) % MAX) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_add_modulo(image2.im)) - - -def subtract_modulo(image1: Image.Image, image2: Image.Image) -> Image.Image: - """Subtract two images, without clipping the result. :: - - out = ((image1 - image2) % MAX) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_subtract_modulo(image2.im)) - - -def logical_and(image1: Image.Image, image2: Image.Image) -> Image.Image: - """Logical AND between two images. - - Both of the images must have mode "1". If you would like to perform a - logical AND on an image with a mode other than "1", try - :py:meth:`~PIL.ImageChops.multiply` instead, using a black-and-white mask - as the second image. :: - - out = ((image1 and image2) % MAX) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_and(image2.im)) - - -def logical_or(image1: Image.Image, image2: Image.Image) -> Image.Image: - """Logical OR between two images. - - Both of the images must have mode "1". :: - - out = ((image1 or image2) % MAX) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_or(image2.im)) - - -def logical_xor(image1: Image.Image, image2: Image.Image) -> Image.Image: - """Logical XOR between two images. - - Both of the images must have mode "1". :: - - out = ((bool(image1) != bool(image2)) % MAX) - - :rtype: :py:class:`~PIL.Image.Image` - """ - - image1.load() - image2.load() - return image1._new(image1.im.chop_xor(image2.im)) - - -def blend(image1: Image.Image, image2: Image.Image, alpha: float) -> Image.Image: - """Blend images using constant transparency weight. Alias for - :py:func:`PIL.Image.blend`. - - :rtype: :py:class:`~PIL.Image.Image` - """ - - return Image.blend(image1, image2, alpha) - - -def composite( - image1: Image.Image, image2: Image.Image, mask: Image.Image -) -> Image.Image: - """Create composite using transparency mask. Alias for - :py:func:`PIL.Image.composite`. - - :rtype: :py:class:`~PIL.Image.Image` - """ - - return Image.composite(image1, image2, mask) - - -def offset(image: Image.Image, xoffset: int, yoffset: int | None = None) -> Image.Image: - """Returns a copy of the image where data has been offset by the given - distances. Data wraps around the edges. If ``yoffset`` is omitted, it - is assumed to be equal to ``xoffset``. - - :param image: Input image. - :param xoffset: The horizontal distance. - :param yoffset: The vertical distance. If omitted, both - distances are set to the same value. - :rtype: :py:class:`~PIL.Image.Image` - """ - - if yoffset is None: - yoffset = xoffset - image.load() - return image._new(image.im.offset(xoffset, yoffset)) diff --git a/voxvera/vendor/PIL/ImageCms.py b/voxvera/vendor/PIL/ImageCms.py deleted file mode 100644 index 513e28a..0000000 --- a/voxvera/vendor/PIL/ImageCms.py +++ /dev/null @@ -1,1076 +0,0 @@ -# The Python Imaging Library. -# $Id$ - -# Optional color management support, based on Kevin Cazabon's PyCMS -# library. - -# Originally released under LGPL. Graciously donated to PIL in -# March 2009, for distribution under the standard PIL license - -# History: - -# 2009-03-08 fl Added to PIL. - -# Copyright (C) 2002-2003 Kevin Cazabon -# Copyright (c) 2009 by Fredrik Lundh -# Copyright (c) 2013 by Eric Soroos - -# See the README file for information on usage and redistribution. See -# below for the original description. -from __future__ import annotations - -import operator -import sys -from enum import IntEnum, IntFlag -from functools import reduce -from typing import Any, Literal, SupportsFloat, SupportsInt, Union - -from . import Image -from ._deprecate import deprecate -from ._typing import SupportsRead - -try: - from . import _imagingcms as core - - _CmsProfileCompatible = Union[ - str, SupportsRead[bytes], core.CmsProfile, "ImageCmsProfile" - ] -except ImportError as ex: - # Allow error import for doc purposes, but error out when accessing - # anything in core. - from ._util import DeferredError - - core = DeferredError.new(ex) - -_DESCRIPTION = """ -pyCMS - - a Python / PIL interface to the littleCMS ICC Color Management System - Copyright (C) 2002-2003 Kevin Cazabon - kevin@cazabon.com - https://www.cazabon.com - - pyCMS home page: https://www.cazabon.com/pyCMS - littleCMS home page: https://www.littlecms.com - (littleCMS is Copyright (C) 1998-2001 Marti Maria) - - Originally released under LGPL. Graciously donated to PIL in - March 2009, for distribution under the standard PIL license - - The pyCMS.py module provides a "clean" interface between Python/PIL and - pyCMSdll, taking care of some of the more complex handling of the direct - pyCMSdll functions, as well as error-checking and making sure that all - relevant data is kept together. - - While it is possible to call pyCMSdll functions directly, it's not highly - recommended. - - Version History: - - 1.0.0 pil Oct 2013 Port to LCMS 2. - - 0.1.0 pil mod March 10, 2009 - - Renamed display profile to proof profile. The proof - profile is the profile of the device that is being - simulated, not the profile of the device which is - actually used to display/print the final simulation - (that'd be the output profile) - also see LCMSAPI.txt - input colorspace -> using 'renderingIntent' -> proof - colorspace -> using 'proofRenderingIntent' -> output - colorspace - - Added LCMS FLAGS support. - Added FLAGS["SOFTPROOFING"] as default flag for - buildProofTransform (otherwise the proof profile/intent - would be ignored). - - 0.1.0 pil March 2009 - added to PIL, as PIL.ImageCms - - 0.0.2 alpha Jan 6, 2002 - - Added try/except statements around type() checks of - potential CObjects... Python won't let you use type() - on them, and raises a TypeError (stupid, if you ask - me!) - - Added buildProofTransformFromOpenProfiles() function. - Additional fixes in DLL, see DLL code for details. - - 0.0.1 alpha first public release, Dec. 26, 2002 - - Known to-do list with current version (of Python interface, not pyCMSdll): - - none - -""" - -_VERSION = "1.0.0 pil" - - -# --------------------------------------------------------------------. - - -# -# intent/direction values - - -class Intent(IntEnum): - PERCEPTUAL = 0 - RELATIVE_COLORIMETRIC = 1 - SATURATION = 2 - ABSOLUTE_COLORIMETRIC = 3 - - -class Direction(IntEnum): - INPUT = 0 - OUTPUT = 1 - PROOF = 2 - - -# -# flags - - -class Flags(IntFlag): - """Flags and documentation are taken from ``lcms2.h``.""" - - NONE = 0 - NOCACHE = 0x0040 - """Inhibit 1-pixel cache""" - NOOPTIMIZE = 0x0100 - """Inhibit optimizations""" - NULLTRANSFORM = 0x0200 - """Don't transform anyway""" - GAMUTCHECK = 0x1000 - """Out of Gamut alarm""" - SOFTPROOFING = 0x4000 - """Do softproofing""" - BLACKPOINTCOMPENSATION = 0x2000 - NOWHITEONWHITEFIXUP = 0x0004 - """Don't fix scum dot""" - HIGHRESPRECALC = 0x0400 - """Use more memory to give better accuracy""" - LOWRESPRECALC = 0x0800 - """Use less memory to minimize resources""" - # this should be 8BITS_DEVICELINK, but that is not a valid name in Python: - USE_8BITS_DEVICELINK = 0x0008 - """Create 8 bits devicelinks""" - GUESSDEVICECLASS = 0x0020 - """Guess device class (for ``transform2devicelink``)""" - KEEP_SEQUENCE = 0x0080 - """Keep profile sequence for devicelink creation""" - FORCE_CLUT = 0x0002 - """Force CLUT optimization""" - CLUT_POST_LINEARIZATION = 0x0001 - """create postlinearization tables if possible""" - CLUT_PRE_LINEARIZATION = 0x0010 - """create prelinearization tables if possible""" - NONEGATIVES = 0x8000 - """Prevent negative numbers in floating point transforms""" - COPY_ALPHA = 0x04000000 - """Alpha channels are copied on ``cmsDoTransform()``""" - NODEFAULTRESOURCEDEF = 0x01000000 - - _GRIDPOINTS_1 = 1 << 16 - _GRIDPOINTS_2 = 2 << 16 - _GRIDPOINTS_4 = 4 << 16 - _GRIDPOINTS_8 = 8 << 16 - _GRIDPOINTS_16 = 16 << 16 - _GRIDPOINTS_32 = 32 << 16 - _GRIDPOINTS_64 = 64 << 16 - _GRIDPOINTS_128 = 128 << 16 - - @staticmethod - def GRIDPOINTS(n: int) -> Flags: - """ - Fine-tune control over number of gridpoints - - :param n: :py:class:`int` in range ``0 <= n <= 255`` - """ - return Flags.NONE | ((n & 0xFF) << 16) - - -_MAX_FLAG = reduce(operator.or_, Flags) - - -_FLAGS = { - "MATRIXINPUT": 1, - "MATRIXOUTPUT": 2, - "MATRIXONLY": (1 | 2), - "NOWHITEONWHITEFIXUP": 4, # Don't hot fix scum dot - # Don't create prelinearization tables on precalculated transforms - # (internal use): - "NOPRELINEARIZATION": 16, - "GUESSDEVICECLASS": 32, # Guess device class (for transform2devicelink) - "NOTCACHE": 64, # Inhibit 1-pixel cache - "NOTPRECALC": 256, - "NULLTRANSFORM": 512, # Don't transform anyway - "HIGHRESPRECALC": 1024, # Use more memory to give better accuracy - "LOWRESPRECALC": 2048, # Use less memory to minimize resources - "WHITEBLACKCOMPENSATION": 8192, - "BLACKPOINTCOMPENSATION": 8192, - "GAMUTCHECK": 4096, # Out of Gamut alarm - "SOFTPROOFING": 16384, # Do softproofing - "PRESERVEBLACK": 32768, # Black preservation - "NODEFAULTRESOURCEDEF": 16777216, # CRD special - "GRIDPOINTS": lambda n: (n & 0xFF) << 16, # Gridpoints -} - - -# --------------------------------------------------------------------. -# Experimental PIL-level API -# --------------------------------------------------------------------. - -## -# Profile. - - -class ImageCmsProfile: - def __init__(self, profile: str | SupportsRead[bytes] | core.CmsProfile) -> None: - """ - :param profile: Either a string representing a filename, - a file like object containing a profile or a - low-level profile object - - """ - self.filename: str | None = None - - if isinstance(profile, str): - if sys.platform == "win32": - profile_bytes_path = profile.encode() - try: - profile_bytes_path.decode("ascii") - except UnicodeDecodeError: - with open(profile, "rb") as f: - self.profile = core.profile_frombytes(f.read()) - return - self.filename = profile - self.profile = core.profile_open(profile) - elif hasattr(profile, "read"): - self.profile = core.profile_frombytes(profile.read()) - elif isinstance(profile, core.CmsProfile): - self.profile = profile - else: - msg = "Invalid type for Profile" # type: ignore[unreachable] - raise TypeError(msg) - - def __getattr__(self, name: str) -> Any: - if name in ("product_name", "product_info"): - deprecate(f"ImageCms.ImageCmsProfile.{name}", 13) - return None - msg = f"'{self.__class__.__name__}' object has no attribute '{name}'" - raise AttributeError(msg) - - def tobytes(self) -> bytes: - """ - Returns the profile in a format suitable for embedding in - saved images. - - :returns: a bytes object containing the ICC profile. - """ - - return core.profile_tobytes(self.profile) - - -class ImageCmsTransform(Image.ImagePointHandler): - """ - Transform. This can be used with the procedural API, or with the standard - :py:func:`~PIL.Image.Image.point` method. - - Will return the output profile in the ``output.info['icc_profile']``. - """ - - def __init__( - self, - input: ImageCmsProfile, - output: ImageCmsProfile, - input_mode: str, - output_mode: str, - intent: Intent = Intent.PERCEPTUAL, - proof: ImageCmsProfile | None = None, - proof_intent: Intent = Intent.ABSOLUTE_COLORIMETRIC, - flags: Flags = Flags.NONE, - ): - if proof is None: - self.transform = core.buildTransform( - input.profile, output.profile, input_mode, output_mode, intent, flags - ) - else: - self.transform = core.buildProofTransform( - input.profile, - output.profile, - proof.profile, - input_mode, - output_mode, - intent, - proof_intent, - flags, - ) - # Note: inputMode and outputMode are for pyCMS compatibility only - self.input_mode = self.inputMode = input_mode - self.output_mode = self.outputMode = output_mode - - self.output_profile = output - - def point(self, im: Image.Image) -> Image.Image: - return self.apply(im) - - def apply(self, im: Image.Image, imOut: Image.Image | None = None) -> Image.Image: - if imOut is None: - imOut = Image.new(self.output_mode, im.size, None) - self.transform.apply(im.getim(), imOut.getim()) - imOut.info["icc_profile"] = self.output_profile.tobytes() - return imOut - - def apply_in_place(self, im: Image.Image) -> Image.Image: - if im.mode != self.output_mode: - msg = "mode mismatch" - raise ValueError(msg) # wrong output mode - self.transform.apply(im.getim(), im.getim()) - im.info["icc_profile"] = self.output_profile.tobytes() - return im - - -def get_display_profile(handle: SupportsInt | None = None) -> ImageCmsProfile | None: - """ - (experimental) Fetches the profile for the current display device. - - :returns: ``None`` if the profile is not known. - """ - - if sys.platform != "win32": - return None - - from . import ImageWin # type: ignore[unused-ignore, unreachable] - - if isinstance(handle, ImageWin.HDC): - profile = core.get_display_profile_win32(int(handle), 1) - else: - profile = core.get_display_profile_win32(int(handle or 0)) - if profile is None: - return None - return ImageCmsProfile(profile) - - -# --------------------------------------------------------------------. -# pyCMS compatible layer -# --------------------------------------------------------------------. - - -class PyCMSError(Exception): - """(pyCMS) Exception class. - This is used for all errors in the pyCMS API.""" - - pass - - -def profileToProfile( - im: Image.Image, - inputProfile: _CmsProfileCompatible, - outputProfile: _CmsProfileCompatible, - renderingIntent: Intent = Intent.PERCEPTUAL, - outputMode: str | None = None, - inPlace: bool = False, - flags: Flags = Flags.NONE, -) -> Image.Image | None: - """ - (pyCMS) Applies an ICC transformation to a given image, mapping from - ``inputProfile`` to ``outputProfile``. - - If the input or output profiles specified are not valid filenames, a - :exc:`PyCMSError` will be raised. If ``inPlace`` is ``True`` and - ``outputMode != im.mode``, a :exc:`PyCMSError` will be raised. - If an error occurs during application of the profiles, - a :exc:`PyCMSError` will be raised. - If ``outputMode`` is not a mode supported by the ``outputProfile`` (or by pyCMS), - a :exc:`PyCMSError` will be raised. - - This function applies an ICC transformation to im from ``inputProfile``'s - color space to ``outputProfile``'s color space using the specified rendering - intent to decide how to handle out-of-gamut colors. - - ``outputMode`` can be used to specify that a color mode conversion is to - be done using these profiles, but the specified profiles must be able - to handle that mode. I.e., if converting im from RGB to CMYK using - profiles, the input profile must handle RGB data, and the output - profile must handle CMYK data. - - :param im: An open :py:class:`~PIL.Image.Image` object (i.e. Image.new(...) - or Image.open(...), etc.) - :param inputProfile: String, as a valid filename path to the ICC input - profile you wish to use for this image, or a profile object - :param outputProfile: String, as a valid filename path to the ICC output - profile you wish to use for this image, or a profile object - :param renderingIntent: Integer (0-3) specifying the rendering intent you - wish to use for the transform - - ImageCms.Intent.PERCEPTUAL = 0 (DEFAULT) - ImageCms.Intent.RELATIVE_COLORIMETRIC = 1 - ImageCms.Intent.SATURATION = 2 - ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3 - - see the pyCMS documentation for details on rendering intents and what - they do. - :param outputMode: A valid PIL mode for the output image (i.e. "RGB", - "CMYK", etc.). Note: if rendering the image "inPlace", outputMode - MUST be the same mode as the input, or omitted completely. If - omitted, the outputMode will be the same as the mode of the input - image (im.mode) - :param inPlace: Boolean. If ``True``, the original image is modified in-place, - and ``None`` is returned. If ``False`` (default), a new - :py:class:`~PIL.Image.Image` object is returned with the transform applied. - :param flags: Integer (0-...) specifying additional flags - :returns: Either None or a new :py:class:`~PIL.Image.Image` object, depending on - the value of ``inPlace`` - :exception PyCMSError: - """ - - if outputMode is None: - outputMode = im.mode - - if not isinstance(renderingIntent, int) or not (0 <= renderingIntent <= 3): - msg = "renderingIntent must be an integer between 0 and 3" - raise PyCMSError(msg) - - if not isinstance(flags, int) or not (0 <= flags <= _MAX_FLAG): - msg = f"flags must be an integer between 0 and {_MAX_FLAG}" - raise PyCMSError(msg) - - try: - if not isinstance(inputProfile, ImageCmsProfile): - inputProfile = ImageCmsProfile(inputProfile) - if not isinstance(outputProfile, ImageCmsProfile): - outputProfile = ImageCmsProfile(outputProfile) - transform = ImageCmsTransform( - inputProfile, - outputProfile, - im.mode, - outputMode, - renderingIntent, - flags=flags, - ) - if inPlace: - transform.apply_in_place(im) - imOut = None - else: - imOut = transform.apply(im) - except (OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - return imOut - - -def getOpenProfile( - profileFilename: str | SupportsRead[bytes] | core.CmsProfile, -) -> ImageCmsProfile: - """ - (pyCMS) Opens an ICC profile file. - - The PyCMSProfile object can be passed back into pyCMS for use in creating - transforms and such (as in ImageCms.buildTransformFromOpenProfiles()). - - If ``profileFilename`` is not a valid filename for an ICC profile, - a :exc:`PyCMSError` will be raised. - - :param profileFilename: String, as a valid filename path to the ICC profile - you wish to open, or a file-like object. - :returns: A CmsProfile class object. - :exception PyCMSError: - """ - - try: - return ImageCmsProfile(profileFilename) - except (OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def buildTransform( - inputProfile: _CmsProfileCompatible, - outputProfile: _CmsProfileCompatible, - inMode: str, - outMode: str, - renderingIntent: Intent = Intent.PERCEPTUAL, - flags: Flags = Flags.NONE, -) -> ImageCmsTransform: - """ - (pyCMS) Builds an ICC transform mapping from the ``inputProfile`` to the - ``outputProfile``. Use applyTransform to apply the transform to a given - image. - - If the input or output profiles specified are not valid filenames, a - :exc:`PyCMSError` will be raised. If an error occurs during creation - of the transform, a :exc:`PyCMSError` will be raised. - - If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile`` - (or by pyCMS), a :exc:`PyCMSError` will be raised. - - This function builds and returns an ICC transform from the ``inputProfile`` - to the ``outputProfile`` using the ``renderingIntent`` to determine what to do - with out-of-gamut colors. It will ONLY work for converting images that - are in ``inMode`` to images that are in ``outMode`` color format (PIL mode, - i.e. "RGB", "RGBA", "CMYK", etc.). - - Building the transform is a fair part of the overhead in - ImageCms.profileToProfile(), so if you're planning on converting multiple - images using the same input/output settings, this can save you time. - Once you have a transform object, it can be used with - ImageCms.applyProfile() to convert images without the need to re-compute - the lookup table for the transform. - - The reason pyCMS returns a class object rather than a handle directly - to the transform is that it needs to keep track of the PIL input/output - modes that the transform is meant for. These attributes are stored in - the ``inMode`` and ``outMode`` attributes of the object (which can be - manually overridden if you really want to, but I don't know of any - time that would be of use, or would even work). - - :param inputProfile: String, as a valid filename path to the ICC input - profile you wish to use for this transform, or a profile object - :param outputProfile: String, as a valid filename path to the ICC output - profile you wish to use for this transform, or a profile object - :param inMode: String, as a valid PIL mode that the appropriate profile - also supports (i.e. "RGB", "RGBA", "CMYK", etc.) - :param outMode: String, as a valid PIL mode that the appropriate profile - also supports (i.e. "RGB", "RGBA", "CMYK", etc.) - :param renderingIntent: Integer (0-3) specifying the rendering intent you - wish to use for the transform - - ImageCms.Intent.PERCEPTUAL = 0 (DEFAULT) - ImageCms.Intent.RELATIVE_COLORIMETRIC = 1 - ImageCms.Intent.SATURATION = 2 - ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3 - - see the pyCMS documentation for details on rendering intents and what - they do. - :param flags: Integer (0-...) specifying additional flags - :returns: A CmsTransform class object. - :exception PyCMSError: - """ - - if not isinstance(renderingIntent, int) or not (0 <= renderingIntent <= 3): - msg = "renderingIntent must be an integer between 0 and 3" - raise PyCMSError(msg) - - if not isinstance(flags, int) or not (0 <= flags <= _MAX_FLAG): - msg = f"flags must be an integer between 0 and {_MAX_FLAG}" - raise PyCMSError(msg) - - try: - if not isinstance(inputProfile, ImageCmsProfile): - inputProfile = ImageCmsProfile(inputProfile) - if not isinstance(outputProfile, ImageCmsProfile): - outputProfile = ImageCmsProfile(outputProfile) - return ImageCmsTransform( - inputProfile, outputProfile, inMode, outMode, renderingIntent, flags=flags - ) - except (OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def buildProofTransform( - inputProfile: _CmsProfileCompatible, - outputProfile: _CmsProfileCompatible, - proofProfile: _CmsProfileCompatible, - inMode: str, - outMode: str, - renderingIntent: Intent = Intent.PERCEPTUAL, - proofRenderingIntent: Intent = Intent.ABSOLUTE_COLORIMETRIC, - flags: Flags = Flags.SOFTPROOFING, -) -> ImageCmsTransform: - """ - (pyCMS) Builds an ICC transform mapping from the ``inputProfile`` to the - ``outputProfile``, but tries to simulate the result that would be - obtained on the ``proofProfile`` device. - - If the input, output, or proof profiles specified are not valid - filenames, a :exc:`PyCMSError` will be raised. - - If an error occurs during creation of the transform, - a :exc:`PyCMSError` will be raised. - - If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile`` - (or by pyCMS), a :exc:`PyCMSError` will be raised. - - This function builds and returns an ICC transform from the ``inputProfile`` - to the ``outputProfile``, but tries to simulate the result that would be - obtained on the ``proofProfile`` device using ``renderingIntent`` and - ``proofRenderingIntent`` to determine what to do with out-of-gamut - colors. This is known as "soft-proofing". It will ONLY work for - converting images that are in ``inMode`` to images that are in outMode - color format (PIL mode, i.e. "RGB", "RGBA", "CMYK", etc.). - - Usage of the resulting transform object is exactly the same as with - ImageCms.buildTransform(). - - Proof profiling is generally used when using an output device to get a - good idea of what the final printed/displayed image would look like on - the ``proofProfile`` device when it's quicker and easier to use the - output device for judging color. Generally, this means that the - output device is a monitor, or a dye-sub printer (etc.), and the simulated - device is something more expensive, complicated, or time consuming - (making it difficult to make a real print for color judgement purposes). - - Soft-proofing basically functions by adjusting the colors on the - output device to match the colors of the device being simulated. However, - when the simulated device has a much wider gamut than the output - device, you may obtain marginal results. - - :param inputProfile: String, as a valid filename path to the ICC input - profile you wish to use for this transform, or a profile object - :param outputProfile: String, as a valid filename path to the ICC output - (monitor, usually) profile you wish to use for this transform, or a - profile object - :param proofProfile: String, as a valid filename path to the ICC proof - profile you wish to use for this transform, or a profile object - :param inMode: String, as a valid PIL mode that the appropriate profile - also supports (i.e. "RGB", "RGBA", "CMYK", etc.) - :param outMode: String, as a valid PIL mode that the appropriate profile - also supports (i.e. "RGB", "RGBA", "CMYK", etc.) - :param renderingIntent: Integer (0-3) specifying the rendering intent you - wish to use for the input->proof (simulated) transform - - ImageCms.Intent.PERCEPTUAL = 0 (DEFAULT) - ImageCms.Intent.RELATIVE_COLORIMETRIC = 1 - ImageCms.Intent.SATURATION = 2 - ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3 - - see the pyCMS documentation for details on rendering intents and what - they do. - :param proofRenderingIntent: Integer (0-3) specifying the rendering intent - you wish to use for proof->output transform - - ImageCms.Intent.PERCEPTUAL = 0 (DEFAULT) - ImageCms.Intent.RELATIVE_COLORIMETRIC = 1 - ImageCms.Intent.SATURATION = 2 - ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3 - - see the pyCMS documentation for details on rendering intents and what - they do. - :param flags: Integer (0-...) specifying additional flags - :returns: A CmsTransform class object. - :exception PyCMSError: - """ - - if not isinstance(renderingIntent, int) or not (0 <= renderingIntent <= 3): - msg = "renderingIntent must be an integer between 0 and 3" - raise PyCMSError(msg) - - if not isinstance(flags, int) or not (0 <= flags <= _MAX_FLAG): - msg = f"flags must be an integer between 0 and {_MAX_FLAG}" - raise PyCMSError(msg) - - try: - if not isinstance(inputProfile, ImageCmsProfile): - inputProfile = ImageCmsProfile(inputProfile) - if not isinstance(outputProfile, ImageCmsProfile): - outputProfile = ImageCmsProfile(outputProfile) - if not isinstance(proofProfile, ImageCmsProfile): - proofProfile = ImageCmsProfile(proofProfile) - return ImageCmsTransform( - inputProfile, - outputProfile, - inMode, - outMode, - renderingIntent, - proofProfile, - proofRenderingIntent, - flags, - ) - except (OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -buildTransformFromOpenProfiles = buildTransform -buildProofTransformFromOpenProfiles = buildProofTransform - - -def applyTransform( - im: Image.Image, transform: ImageCmsTransform, inPlace: bool = False -) -> Image.Image | None: - """ - (pyCMS) Applies a transform to a given image. - - If ``im.mode != transform.input_mode``, a :exc:`PyCMSError` is raised. - - If ``inPlace`` is ``True`` and ``transform.input_mode != transform.output_mode``, a - :exc:`PyCMSError` is raised. - - If ``im.mode``, ``transform.input_mode`` or ``transform.output_mode`` is not - supported by pyCMSdll or the profiles you used for the transform, a - :exc:`PyCMSError` is raised. - - If an error occurs while the transform is being applied, - a :exc:`PyCMSError` is raised. - - This function applies a pre-calculated transform (from - ImageCms.buildTransform() or ImageCms.buildTransformFromOpenProfiles()) - to an image. The transform can be used for multiple images, saving - considerable calculation time if doing the same conversion multiple times. - - If you want to modify im in-place instead of receiving a new image as - the return value, set ``inPlace`` to ``True``. This can only be done if - ``transform.input_mode`` and ``transform.output_mode`` are the same, because we - can't change the mode in-place (the buffer sizes for some modes are - different). The default behavior is to return a new :py:class:`~PIL.Image.Image` - object of the same dimensions in mode ``transform.output_mode``. - - :param im: An :py:class:`~PIL.Image.Image` object, and ``im.mode`` must be the same - as the ``input_mode`` supported by the transform. - :param transform: A valid CmsTransform class object - :param inPlace: Bool. If ``True``, ``im`` is modified in place and ``None`` is - returned, if ``False``, a new :py:class:`~PIL.Image.Image` object with the - transform applied is returned (and ``im`` is not changed). The default is - ``False``. - :returns: Either ``None``, or a new :py:class:`~PIL.Image.Image` object, - depending on the value of ``inPlace``. The profile will be returned in - the image's ``info['icc_profile']``. - :exception PyCMSError: - """ - - try: - if inPlace: - transform.apply_in_place(im) - imOut = None - else: - imOut = transform.apply(im) - except (TypeError, ValueError) as v: - raise PyCMSError(v) from v - - return imOut - - -def createProfile( - colorSpace: Literal["LAB", "XYZ", "sRGB"], colorTemp: SupportsFloat = 0 -) -> core.CmsProfile: - """ - (pyCMS) Creates a profile. - - If colorSpace not in ``["LAB", "XYZ", "sRGB"]``, - a :exc:`PyCMSError` is raised. - - If using LAB and ``colorTemp`` is not a positive integer, - a :exc:`PyCMSError` is raised. - - If an error occurs while creating the profile, - a :exc:`PyCMSError` is raised. - - Use this function to create common profiles on-the-fly instead of - having to supply a profile on disk and knowing the path to it. It - returns a normal CmsProfile object that can be passed to - ImageCms.buildTransformFromOpenProfiles() to create a transform to apply - to images. - - :param colorSpace: String, the color space of the profile you wish to - create. - Currently only "LAB", "XYZ", and "sRGB" are supported. - :param colorTemp: Positive number for the white point for the profile, in - degrees Kelvin (i.e. 5000, 6500, 9600, etc.). The default is for D50 - illuminant if omitted (5000k). colorTemp is ONLY applied to LAB - profiles, and is ignored for XYZ and sRGB. - :returns: A CmsProfile class object - :exception PyCMSError: - """ - - if colorSpace not in ["LAB", "XYZ", "sRGB"]: - msg = ( - f"Color space not supported for on-the-fly profile creation ({colorSpace})" - ) - raise PyCMSError(msg) - - if colorSpace == "LAB": - try: - colorTemp = float(colorTemp) - except (TypeError, ValueError) as e: - msg = f'Color temperature must be numeric, "{colorTemp}" not valid' - raise PyCMSError(msg) from e - - try: - return core.createProfile(colorSpace, colorTemp) - except (TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def getProfileName(profile: _CmsProfileCompatible) -> str: - """ - - (pyCMS) Gets the internal product name for the given profile. - - If ``profile`` isn't a valid CmsProfile object or filename to a profile, - a :exc:`PyCMSError` is raised If an error occurs while trying - to obtain the name tag, a :exc:`PyCMSError` is raised. - - Use this function to obtain the INTERNAL name of the profile (stored - in an ICC tag in the profile itself), usually the one used when the - profile was originally created. Sometimes this tag also contains - additional information supplied by the creator. - - :param profile: EITHER a valid CmsProfile object, OR a string of the - filename of an ICC profile. - :returns: A string containing the internal name of the profile as stored - in an ICC tag. - :exception PyCMSError: - """ - - try: - # add an extra newline to preserve pyCMS compatibility - if not isinstance(profile, ImageCmsProfile): - profile = ImageCmsProfile(profile) - # do it in python, not c. - # // name was "%s - %s" (model, manufacturer) || Description , - # // but if the Model and Manufacturer were the same or the model - # // was long, Just the model, in 1.x - model = profile.profile.model - manufacturer = profile.profile.manufacturer - - if not (model or manufacturer): - return (profile.profile.profile_description or "") + "\n" - if not manufacturer or (model and len(model) > 30): - return f"{model}\n" - return f"{model} - {manufacturer}\n" - - except (AttributeError, OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def getProfileInfo(profile: _CmsProfileCompatible) -> str: - """ - (pyCMS) Gets the internal product information for the given profile. - - If ``profile`` isn't a valid CmsProfile object or filename to a profile, - a :exc:`PyCMSError` is raised. - - If an error occurs while trying to obtain the info tag, - a :exc:`PyCMSError` is raised. - - Use this function to obtain the information stored in the profile's - info tag. This often contains details about the profile, and how it - was created, as supplied by the creator. - - :param profile: EITHER a valid CmsProfile object, OR a string of the - filename of an ICC profile. - :returns: A string containing the internal profile information stored in - an ICC tag. - :exception PyCMSError: - """ - - try: - if not isinstance(profile, ImageCmsProfile): - profile = ImageCmsProfile(profile) - # add an extra newline to preserve pyCMS compatibility - # Python, not C. the white point bits weren't working well, - # so skipping. - # info was description \r\n\r\n copyright \r\n\r\n K007 tag \r\n\r\n whitepoint - description = profile.profile.profile_description - cpright = profile.profile.copyright - elements = [element for element in (description, cpright) if element] - return "\r\n\r\n".join(elements) + "\r\n\r\n" - - except (AttributeError, OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def getProfileCopyright(profile: _CmsProfileCompatible) -> str: - """ - (pyCMS) Gets the copyright for the given profile. - - If ``profile`` isn't a valid CmsProfile object or filename to a profile, a - :exc:`PyCMSError` is raised. - - If an error occurs while trying to obtain the copyright tag, - a :exc:`PyCMSError` is raised. - - Use this function to obtain the information stored in the profile's - copyright tag. - - :param profile: EITHER a valid CmsProfile object, OR a string of the - filename of an ICC profile. - :returns: A string containing the internal profile information stored in - an ICC tag. - :exception PyCMSError: - """ - try: - # add an extra newline to preserve pyCMS compatibility - if not isinstance(profile, ImageCmsProfile): - profile = ImageCmsProfile(profile) - return (profile.profile.copyright or "") + "\n" - except (AttributeError, OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def getProfileManufacturer(profile: _CmsProfileCompatible) -> str: - """ - (pyCMS) Gets the manufacturer for the given profile. - - If ``profile`` isn't a valid CmsProfile object or filename to a profile, a - :exc:`PyCMSError` is raised. - - If an error occurs while trying to obtain the manufacturer tag, a - :exc:`PyCMSError` is raised. - - Use this function to obtain the information stored in the profile's - manufacturer tag. - - :param profile: EITHER a valid CmsProfile object, OR a string of the - filename of an ICC profile. - :returns: A string containing the internal profile information stored in - an ICC tag. - :exception PyCMSError: - """ - try: - # add an extra newline to preserve pyCMS compatibility - if not isinstance(profile, ImageCmsProfile): - profile = ImageCmsProfile(profile) - return (profile.profile.manufacturer or "") + "\n" - except (AttributeError, OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def getProfileModel(profile: _CmsProfileCompatible) -> str: - """ - (pyCMS) Gets the model for the given profile. - - If ``profile`` isn't a valid CmsProfile object or filename to a profile, a - :exc:`PyCMSError` is raised. - - If an error occurs while trying to obtain the model tag, - a :exc:`PyCMSError` is raised. - - Use this function to obtain the information stored in the profile's - model tag. - - :param profile: EITHER a valid CmsProfile object, OR a string of the - filename of an ICC profile. - :returns: A string containing the internal profile information stored in - an ICC tag. - :exception PyCMSError: - """ - - try: - # add an extra newline to preserve pyCMS compatibility - if not isinstance(profile, ImageCmsProfile): - profile = ImageCmsProfile(profile) - return (profile.profile.model or "") + "\n" - except (AttributeError, OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def getProfileDescription(profile: _CmsProfileCompatible) -> str: - """ - (pyCMS) Gets the description for the given profile. - - If ``profile`` isn't a valid CmsProfile object or filename to a profile, a - :exc:`PyCMSError` is raised. - - If an error occurs while trying to obtain the description tag, - a :exc:`PyCMSError` is raised. - - Use this function to obtain the information stored in the profile's - description tag. - - :param profile: EITHER a valid CmsProfile object, OR a string of the - filename of an ICC profile. - :returns: A string containing the internal profile information stored in an - ICC tag. - :exception PyCMSError: - """ - - try: - # add an extra newline to preserve pyCMS compatibility - if not isinstance(profile, ImageCmsProfile): - profile = ImageCmsProfile(profile) - return (profile.profile.profile_description or "") + "\n" - except (AttributeError, OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def getDefaultIntent(profile: _CmsProfileCompatible) -> int: - """ - (pyCMS) Gets the default intent name for the given profile. - - If ``profile`` isn't a valid CmsProfile object or filename to a profile, a - :exc:`PyCMSError` is raised. - - If an error occurs while trying to obtain the default intent, a - :exc:`PyCMSError` is raised. - - Use this function to determine the default (and usually best optimized) - rendering intent for this profile. Most profiles support multiple - rendering intents, but are intended mostly for one type of conversion. - If you wish to use a different intent than returned, use - ImageCms.isIntentSupported() to verify it will work first. - - :param profile: EITHER a valid CmsProfile object, OR a string of the - filename of an ICC profile. - :returns: Integer 0-3 specifying the default rendering intent for this - profile. - - ImageCms.Intent.PERCEPTUAL = 0 (DEFAULT) - ImageCms.Intent.RELATIVE_COLORIMETRIC = 1 - ImageCms.Intent.SATURATION = 2 - ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3 - - see the pyCMS documentation for details on rendering intents and what - they do. - :exception PyCMSError: - """ - - try: - if not isinstance(profile, ImageCmsProfile): - profile = ImageCmsProfile(profile) - return profile.profile.rendering_intent - except (AttributeError, OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v - - -def isIntentSupported( - profile: _CmsProfileCompatible, intent: Intent, direction: Direction -) -> Literal[-1, 1]: - """ - (pyCMS) Checks if a given intent is supported. - - Use this function to verify that you can use your desired - ``intent`` with ``profile``, and that ``profile`` can be used for the - input/output/proof profile as you desire. - - Some profiles are created specifically for one "direction", can cannot - be used for others. Some profiles can only be used for certain - rendering intents, so it's best to either verify this before trying - to create a transform with them (using this function), or catch the - potential :exc:`PyCMSError` that will occur if they don't - support the modes you select. - - :param profile: EITHER a valid CmsProfile object, OR a string of the - filename of an ICC profile. - :param intent: Integer (0-3) specifying the rendering intent you wish to - use with this profile - - ImageCms.Intent.PERCEPTUAL = 0 (DEFAULT) - ImageCms.Intent.RELATIVE_COLORIMETRIC = 1 - ImageCms.Intent.SATURATION = 2 - ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3 - - see the pyCMS documentation for details on rendering intents and what - they do. - :param direction: Integer specifying if the profile is to be used for - input, output, or proof - - INPUT = 0 (or use ImageCms.Direction.INPUT) - OUTPUT = 1 (or use ImageCms.Direction.OUTPUT) - PROOF = 2 (or use ImageCms.Direction.PROOF) - - :returns: 1 if the intent/direction are supported, -1 if they are not. - :exception PyCMSError: - """ - - try: - if not isinstance(profile, ImageCmsProfile): - profile = ImageCmsProfile(profile) - # FIXME: I get different results for the same data w. different - # compilers. Bug in LittleCMS or in the binding? - if profile.profile.is_intent_supported(intent, direction): - return 1 - else: - return -1 - except (AttributeError, OSError, TypeError, ValueError) as v: - raise PyCMSError(v) from v diff --git a/voxvera/vendor/PIL/ImageColor.py b/voxvera/vendor/PIL/ImageColor.py deleted file mode 100644 index 9a15a8e..0000000 --- a/voxvera/vendor/PIL/ImageColor.py +++ /dev/null @@ -1,320 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# map CSS3-style colour description strings to RGB -# -# History: -# 2002-10-24 fl Added support for CSS-style color strings -# 2002-12-15 fl Added RGBA support -# 2004-03-27 fl Fixed remaining int() problems for Python 1.5.2 -# 2004-07-19 fl Fixed gray/grey spelling issues -# 2009-03-05 fl Fixed rounding error in grayscale calculation -# -# Copyright (c) 2002-2004 by Secret Labs AB -# Copyright (c) 2002-2004 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import re -from functools import lru_cache - -from . import Image - - -@lru_cache -def getrgb(color: str) -> tuple[int, int, int] | tuple[int, int, int, int]: - """ - Convert a color string to an RGB or RGBA tuple. If the string cannot be - parsed, this function raises a :py:exc:`ValueError` exception. - - .. versionadded:: 1.1.4 - - :param color: A color string - :return: ``(red, green, blue[, alpha])`` - """ - if len(color) > 100: - msg = "color specifier is too long" - raise ValueError(msg) - color = color.lower() - - rgb = colormap.get(color, None) - if rgb: - if isinstance(rgb, tuple): - return rgb - rgb_tuple = getrgb(rgb) - assert len(rgb_tuple) == 3 - colormap[color] = rgb_tuple - return rgb_tuple - - # check for known string formats - if re.match("#[a-f0-9]{3}$", color): - return int(color[1] * 2, 16), int(color[2] * 2, 16), int(color[3] * 2, 16) - - if re.match("#[a-f0-9]{4}$", color): - return ( - int(color[1] * 2, 16), - int(color[2] * 2, 16), - int(color[3] * 2, 16), - int(color[4] * 2, 16), - ) - - if re.match("#[a-f0-9]{6}$", color): - return int(color[1:3], 16), int(color[3:5], 16), int(color[5:7], 16) - - if re.match("#[a-f0-9]{8}$", color): - return ( - int(color[1:3], 16), - int(color[3:5], 16), - int(color[5:7], 16), - int(color[7:9], 16), - ) - - m = re.match(r"rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$", color) - if m: - return int(m.group(1)), int(m.group(2)), int(m.group(3)) - - m = re.match(r"rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)$", color) - if m: - return ( - int((int(m.group(1)) * 255) / 100.0 + 0.5), - int((int(m.group(2)) * 255) / 100.0 + 0.5), - int((int(m.group(3)) * 255) / 100.0 + 0.5), - ) - - m = re.match( - r"hsl\(\s*(\d+\.?\d*)\s*,\s*(\d+\.?\d*)%\s*,\s*(\d+\.?\d*)%\s*\)$", color - ) - if m: - from colorsys import hls_to_rgb - - rgb_floats = hls_to_rgb( - float(m.group(1)) / 360.0, - float(m.group(3)) / 100.0, - float(m.group(2)) / 100.0, - ) - return ( - int(rgb_floats[0] * 255 + 0.5), - int(rgb_floats[1] * 255 + 0.5), - int(rgb_floats[2] * 255 + 0.5), - ) - - m = re.match( - r"hs[bv]\(\s*(\d+\.?\d*)\s*,\s*(\d+\.?\d*)%\s*,\s*(\d+\.?\d*)%\s*\)$", color - ) - if m: - from colorsys import hsv_to_rgb - - rgb_floats = hsv_to_rgb( - float(m.group(1)) / 360.0, - float(m.group(2)) / 100.0, - float(m.group(3)) / 100.0, - ) - return ( - int(rgb_floats[0] * 255 + 0.5), - int(rgb_floats[1] * 255 + 0.5), - int(rgb_floats[2] * 255 + 0.5), - ) - - m = re.match(r"rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$", color) - if m: - return int(m.group(1)), int(m.group(2)), int(m.group(3)), int(m.group(4)) - msg = f"unknown color specifier: {repr(color)}" - raise ValueError(msg) - - -@lru_cache -def getcolor(color: str, mode: str) -> int | tuple[int, ...]: - """ - Same as :py:func:`~PIL.ImageColor.getrgb` for most modes. However, if - ``mode`` is HSV, converts the RGB value to a HSV value, or if ``mode`` is - not color or a palette image, converts the RGB value to a grayscale value. - If the string cannot be parsed, this function raises a :py:exc:`ValueError` - exception. - - .. versionadded:: 1.1.4 - - :param color: A color string - :param mode: Convert result to this mode - :return: ``graylevel, (graylevel, alpha) or (red, green, blue[, alpha])`` - """ - # same as getrgb, but converts the result to the given mode - rgb, alpha = getrgb(color), 255 - if len(rgb) == 4: - alpha = rgb[3] - rgb = rgb[:3] - - if mode == "HSV": - from colorsys import rgb_to_hsv - - r, g, b = rgb - h, s, v = rgb_to_hsv(r / 255, g / 255, b / 255) - return int(h * 255), int(s * 255), int(v * 255) - elif Image.getmodebase(mode) == "L": - r, g, b = rgb - # ITU-R Recommendation 601-2 for nonlinear RGB - # scaled to 24 bits to match the convert's implementation. - graylevel = (r * 19595 + g * 38470 + b * 7471 + 0x8000) >> 16 - if mode[-1] == "A": - return graylevel, alpha - return graylevel - elif mode[-1] == "A": - return rgb + (alpha,) - return rgb - - -colormap: dict[str, str | tuple[int, int, int]] = { - # X11 colour table from https://drafts.csswg.org/css-color-4/, with - # gray/grey spelling issues fixed. This is a superset of HTML 4.0 - # colour names used in CSS 1. - "aliceblue": "#f0f8ff", - "antiquewhite": "#faebd7", - "aqua": "#00ffff", - "aquamarine": "#7fffd4", - "azure": "#f0ffff", - "beige": "#f5f5dc", - "bisque": "#ffe4c4", - "black": "#000000", - "blanchedalmond": "#ffebcd", - "blue": "#0000ff", - "blueviolet": "#8a2be2", - "brown": "#a52a2a", - "burlywood": "#deb887", - "cadetblue": "#5f9ea0", - "chartreuse": "#7fff00", - "chocolate": "#d2691e", - "coral": "#ff7f50", - "cornflowerblue": "#6495ed", - "cornsilk": "#fff8dc", - "crimson": "#dc143c", - "cyan": "#00ffff", - "darkblue": "#00008b", - "darkcyan": "#008b8b", - "darkgoldenrod": "#b8860b", - "darkgray": "#a9a9a9", - "darkgrey": "#a9a9a9", - "darkgreen": "#006400", - "darkkhaki": "#bdb76b", - "darkmagenta": "#8b008b", - "darkolivegreen": "#556b2f", - "darkorange": "#ff8c00", - "darkorchid": "#9932cc", - "darkred": "#8b0000", - "darksalmon": "#e9967a", - "darkseagreen": "#8fbc8f", - "darkslateblue": "#483d8b", - "darkslategray": "#2f4f4f", - "darkslategrey": "#2f4f4f", - "darkturquoise": "#00ced1", - "darkviolet": "#9400d3", - "deeppink": "#ff1493", - "deepskyblue": "#00bfff", - "dimgray": "#696969", - "dimgrey": "#696969", - "dodgerblue": "#1e90ff", - "firebrick": "#b22222", - "floralwhite": "#fffaf0", - "forestgreen": "#228b22", - "fuchsia": "#ff00ff", - "gainsboro": "#dcdcdc", - "ghostwhite": "#f8f8ff", - "gold": "#ffd700", - "goldenrod": "#daa520", - "gray": "#808080", - "grey": "#808080", - "green": "#008000", - "greenyellow": "#adff2f", - "honeydew": "#f0fff0", - "hotpink": "#ff69b4", - "indianred": "#cd5c5c", - "indigo": "#4b0082", - "ivory": "#fffff0", - "khaki": "#f0e68c", - "lavender": "#e6e6fa", - "lavenderblush": "#fff0f5", - "lawngreen": "#7cfc00", - "lemonchiffon": "#fffacd", - "lightblue": "#add8e6", - "lightcoral": "#f08080", - "lightcyan": "#e0ffff", - "lightgoldenrodyellow": "#fafad2", - "lightgreen": "#90ee90", - "lightgray": "#d3d3d3", - "lightgrey": "#d3d3d3", - "lightpink": "#ffb6c1", - "lightsalmon": "#ffa07a", - "lightseagreen": "#20b2aa", - "lightskyblue": "#87cefa", - "lightslategray": "#778899", - "lightslategrey": "#778899", - "lightsteelblue": "#b0c4de", - "lightyellow": "#ffffe0", - "lime": "#00ff00", - "limegreen": "#32cd32", - "linen": "#faf0e6", - "magenta": "#ff00ff", - "maroon": "#800000", - "mediumaquamarine": "#66cdaa", - "mediumblue": "#0000cd", - "mediumorchid": "#ba55d3", - "mediumpurple": "#9370db", - "mediumseagreen": "#3cb371", - "mediumslateblue": "#7b68ee", - "mediumspringgreen": "#00fa9a", - "mediumturquoise": "#48d1cc", - "mediumvioletred": "#c71585", - "midnightblue": "#191970", - "mintcream": "#f5fffa", - "mistyrose": "#ffe4e1", - "moccasin": "#ffe4b5", - "navajowhite": "#ffdead", - "navy": "#000080", - "oldlace": "#fdf5e6", - "olive": "#808000", - "olivedrab": "#6b8e23", - "orange": "#ffa500", - "orangered": "#ff4500", - "orchid": "#da70d6", - "palegoldenrod": "#eee8aa", - "palegreen": "#98fb98", - "paleturquoise": "#afeeee", - "palevioletred": "#db7093", - "papayawhip": "#ffefd5", - "peachpuff": "#ffdab9", - "peru": "#cd853f", - "pink": "#ffc0cb", - "plum": "#dda0dd", - "powderblue": "#b0e0e6", - "purple": "#800080", - "rebeccapurple": "#663399", - "red": "#ff0000", - "rosybrown": "#bc8f8f", - "royalblue": "#4169e1", - "saddlebrown": "#8b4513", - "salmon": "#fa8072", - "sandybrown": "#f4a460", - "seagreen": "#2e8b57", - "seashell": "#fff5ee", - "sienna": "#a0522d", - "silver": "#c0c0c0", - "skyblue": "#87ceeb", - "slateblue": "#6a5acd", - "slategray": "#708090", - "slategrey": "#708090", - "snow": "#fffafa", - "springgreen": "#00ff7f", - "steelblue": "#4682b4", - "tan": "#d2b48c", - "teal": "#008080", - "thistle": "#d8bfd8", - "tomato": "#ff6347", - "turquoise": "#40e0d0", - "violet": "#ee82ee", - "wheat": "#f5deb3", - "white": "#ffffff", - "whitesmoke": "#f5f5f5", - "yellow": "#ffff00", - "yellowgreen": "#9acd32", -} diff --git a/voxvera/vendor/PIL/ImageDraw.py b/voxvera/vendor/PIL/ImageDraw.py deleted file mode 100644 index 8bcf2d8..0000000 --- a/voxvera/vendor/PIL/ImageDraw.py +++ /dev/null @@ -1,1036 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# drawing interface operations -# -# History: -# 1996-04-13 fl Created (experimental) -# 1996-08-07 fl Filled polygons, ellipses. -# 1996-08-13 fl Added text support -# 1998-06-28 fl Handle I and F images -# 1998-12-29 fl Added arc; use arc primitive to draw ellipses -# 1999-01-10 fl Added shape stuff (experimental) -# 1999-02-06 fl Added bitmap support -# 1999-02-11 fl Changed all primitives to take options -# 1999-02-20 fl Fixed backwards compatibility -# 2000-10-12 fl Copy on write, when necessary -# 2001-02-18 fl Use default ink for bitmap/text also in fill mode -# 2002-10-24 fl Added support for CSS-style color strings -# 2002-12-10 fl Added experimental support for RGBA-on-RGB drawing -# 2002-12-11 fl Refactored low-level drawing API (work in progress) -# 2004-08-26 fl Made Draw() a factory function, added getdraw() support -# 2004-09-04 fl Added width support to line primitive -# 2004-09-10 fl Added font mode handling -# 2006-06-19 fl Added font bearing support (getmask2) -# -# Copyright (c) 1997-2006 by Secret Labs AB -# Copyright (c) 1996-2006 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import math -import struct -from collections.abc import Sequence -from typing import cast - -from . import Image, ImageColor, ImageText - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - from types import ModuleType - from typing import Any, AnyStr - - from . import ImageDraw2, ImageFont - from ._typing import Coords, _Ink - -# experimental access to the outline API -Outline: Callable[[], Image.core._Outline] = Image.core.outline - -""" -A simple 2D drawing interface for PIL images. -

-Application code should use the Draw factory, instead of -directly. -""" - - -class ImageDraw: - font: ( - ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont | None - ) = None - - def __init__(self, im: Image.Image, mode: str | None = None) -> None: - """ - Create a drawing instance. - - :param im: The image to draw in. - :param mode: Optional mode to use for color values. For RGB - images, this argument can be RGB or RGBA (to blend the - drawing into the image). For all other modes, this argument - must be the same as the image mode. If omitted, the mode - defaults to the mode of the image. - """ - im._ensure_mutable() - blend = 0 - if mode is None: - mode = im.mode - if mode != im.mode: - if mode == "RGBA" and im.mode == "RGB": - blend = 1 - else: - msg = "mode mismatch" - raise ValueError(msg) - if mode == "P": - self.palette = im.palette - else: - self.palette = None - self._image = im - self.im = im.im - self.draw = Image.core.draw(self.im, blend) - self.mode = mode - if mode in ("I", "F"): - self.ink = self.draw.draw_ink(1) - else: - self.ink = self.draw.draw_ink(-1) - if mode in ("1", "P", "I", "F"): - # FIXME: fix Fill2 to properly support matte for I+F images - self.fontmode = "1" - else: - self.fontmode = "L" # aliasing is okay for other modes - self.fill = False - - def getfont( - self, - ) -> ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont: - """ - Get the current default font. - - To set the default font for this ImageDraw instance:: - - from PIL import ImageDraw, ImageFont - draw.font = ImageFont.truetype("Tests/fonts/FreeMono.ttf") - - To set the default font for all future ImageDraw instances:: - - from PIL import ImageDraw, ImageFont - ImageDraw.ImageDraw.font = ImageFont.truetype("Tests/fonts/FreeMono.ttf") - - If the current default font is ``None``, - it is initialized with ``ImageFont.load_default()``. - - :returns: An image font.""" - if not self.font: - # FIXME: should add a font repository - from . import ImageFont - - self.font = ImageFont.load_default() - return self.font - - def _getfont( - self, font_size: float | None - ) -> ImageFont.ImageFont | ImageFont.FreeTypeFont | ImageFont.TransposedFont: - if font_size is not None: - from . import ImageFont - - return ImageFont.load_default(font_size) - else: - return self.getfont() - - def _getink( - self, ink: _Ink | None, fill: _Ink | None = None - ) -> tuple[int | None, int | None]: - result_ink = None - result_fill = None - if ink is None and fill is None: - if self.fill: - result_fill = self.ink - else: - result_ink = self.ink - else: - if ink is not None: - if isinstance(ink, str): - ink = ImageColor.getcolor(ink, self.mode) - if self.palette and isinstance(ink, tuple): - ink = self.palette.getcolor(ink, self._image) - result_ink = self.draw.draw_ink(ink) - if fill is not None: - if isinstance(fill, str): - fill = ImageColor.getcolor(fill, self.mode) - if self.palette and isinstance(fill, tuple): - fill = self.palette.getcolor(fill, self._image) - result_fill = self.draw.draw_ink(fill) - return result_ink, result_fill - - def arc( - self, - xy: Coords, - start: float, - end: float, - fill: _Ink | None = None, - width: int = 1, - ) -> None: - """Draw an arc.""" - ink, fill = self._getink(fill) - if ink is not None: - self.draw.draw_arc(xy, start, end, ink, width) - - def bitmap( - self, xy: Sequence[int], bitmap: Image.Image, fill: _Ink | None = None - ) -> None: - """Draw a bitmap.""" - bitmap.load() - ink, fill = self._getink(fill) - if ink is None: - ink = fill - if ink is not None: - self.draw.draw_bitmap(xy, bitmap.im, ink) - - def chord( - self, - xy: Coords, - start: float, - end: float, - fill: _Ink | None = None, - outline: _Ink | None = None, - width: int = 1, - ) -> None: - """Draw a chord.""" - ink, fill_ink = self._getink(outline, fill) - if fill_ink is not None: - self.draw.draw_chord(xy, start, end, fill_ink, 1) - if ink is not None and ink != fill_ink and width != 0: - self.draw.draw_chord(xy, start, end, ink, 0, width) - - def ellipse( - self, - xy: Coords, - fill: _Ink | None = None, - outline: _Ink | None = None, - width: int = 1, - ) -> None: - """Draw an ellipse.""" - ink, fill_ink = self._getink(outline, fill) - if fill_ink is not None: - self.draw.draw_ellipse(xy, fill_ink, 1) - if ink is not None and ink != fill_ink and width != 0: - self.draw.draw_ellipse(xy, ink, 0, width) - - def circle( - self, - xy: Sequence[float], - radius: float, - fill: _Ink | None = None, - outline: _Ink | None = None, - width: int = 1, - ) -> None: - """Draw a circle given center coordinates and a radius.""" - ellipse_xy = (xy[0] - radius, xy[1] - radius, xy[0] + radius, xy[1] + radius) - self.ellipse(ellipse_xy, fill, outline, width) - - def line( - self, - xy: Coords, - fill: _Ink | None = None, - width: int = 0, - joint: str | None = None, - ) -> None: - """Draw a line, or a connected sequence of line segments.""" - ink = self._getink(fill)[0] - if ink is not None: - self.draw.draw_lines(xy, ink, width) - if joint == "curve" and width > 4: - points: Sequence[Sequence[float]] - if isinstance(xy[0], (list, tuple)): - points = cast(Sequence[Sequence[float]], xy) - else: - points = [ - cast(Sequence[float], tuple(xy[i : i + 2])) - for i in range(0, len(xy), 2) - ] - for i in range(1, len(points) - 1): - point = points[i] - angles = [ - math.degrees(math.atan2(end[0] - start[0], start[1] - end[1])) - % 360 - for start, end in ( - (points[i - 1], point), - (point, points[i + 1]), - ) - ] - if angles[0] == angles[1]: - # This is a straight line, so no joint is required - continue - - def coord_at_angle( - coord: Sequence[float], angle: float - ) -> tuple[float, ...]: - x, y = coord - angle -= 90 - distance = width / 2 - 1 - return tuple( - p + (math.floor(p_d) if p_d > 0 else math.ceil(p_d)) - for p, p_d in ( - (x, distance * math.cos(math.radians(angle))), - (y, distance * math.sin(math.radians(angle))), - ) - ) - - flipped = ( - angles[1] > angles[0] and angles[1] - 180 > angles[0] - ) or (angles[1] < angles[0] and angles[1] + 180 > angles[0]) - coords = [ - (point[0] - width / 2 + 1, point[1] - width / 2 + 1), - (point[0] + width / 2 - 1, point[1] + width / 2 - 1), - ] - if flipped: - start, end = (angles[1] + 90, angles[0] + 90) - else: - start, end = (angles[0] - 90, angles[1] - 90) - self.pieslice(coords, start - 90, end - 90, fill) - - if width > 8: - # Cover potential gaps between the line and the joint - if flipped: - gap_coords = [ - coord_at_angle(point, angles[0] + 90), - point, - coord_at_angle(point, angles[1] + 90), - ] - else: - gap_coords = [ - coord_at_angle(point, angles[0] - 90), - point, - coord_at_angle(point, angles[1] - 90), - ] - self.line(gap_coords, fill, width=3) - - def shape( - self, - shape: Image.core._Outline, - fill: _Ink | None = None, - outline: _Ink | None = None, - ) -> None: - """(Experimental) Draw a shape.""" - shape.close() - ink, fill_ink = self._getink(outline, fill) - if fill_ink is not None: - self.draw.draw_outline(shape, fill_ink, 1) - if ink is not None and ink != fill_ink: - self.draw.draw_outline(shape, ink, 0) - - def pieslice( - self, - xy: Coords, - start: float, - end: float, - fill: _Ink | None = None, - outline: _Ink | None = None, - width: int = 1, - ) -> None: - """Draw a pieslice.""" - ink, fill_ink = self._getink(outline, fill) - if fill_ink is not None: - self.draw.draw_pieslice(xy, start, end, fill_ink, 1) - if ink is not None and ink != fill_ink and width != 0: - self.draw.draw_pieslice(xy, start, end, ink, 0, width) - - def point(self, xy: Coords, fill: _Ink | None = None) -> None: - """Draw one or more individual pixels.""" - ink, fill = self._getink(fill) - if ink is not None: - self.draw.draw_points(xy, ink) - - def polygon( - self, - xy: Coords, - fill: _Ink | None = None, - outline: _Ink | None = None, - width: int = 1, - ) -> None: - """Draw a polygon.""" - ink, fill_ink = self._getink(outline, fill) - if fill_ink is not None: - self.draw.draw_polygon(xy, fill_ink, 1) - if ink is not None and ink != fill_ink and width != 0: - if width == 1: - self.draw.draw_polygon(xy, ink, 0, width) - elif self.im is not None: - # To avoid expanding the polygon outwards, - # use the fill as a mask - mask = Image.new("1", self.im.size) - mask_ink = self._getink(1)[0] - draw = Draw(mask) - draw.draw.draw_polygon(xy, mask_ink, 1) - - self.draw.draw_polygon(xy, ink, 0, width * 2 - 1, mask.im) - - def regular_polygon( - self, - bounding_circle: Sequence[Sequence[float] | float], - n_sides: int, - rotation: float = 0, - fill: _Ink | None = None, - outline: _Ink | None = None, - width: int = 1, - ) -> None: - """Draw a regular polygon.""" - xy = _compute_regular_polygon_vertices(bounding_circle, n_sides, rotation) - self.polygon(xy, fill, outline, width) - - def rectangle( - self, - xy: Coords, - fill: _Ink | None = None, - outline: _Ink | None = None, - width: int = 1, - ) -> None: - """Draw a rectangle.""" - ink, fill_ink = self._getink(outline, fill) - if fill_ink is not None: - self.draw.draw_rectangle(xy, fill_ink, 1) - if ink is not None and ink != fill_ink and width != 0: - self.draw.draw_rectangle(xy, ink, 0, width) - - def rounded_rectangle( - self, - xy: Coords, - radius: float = 0, - fill: _Ink | None = None, - outline: _Ink | None = None, - width: int = 1, - *, - corners: tuple[bool, bool, bool, bool] | None = None, - ) -> None: - """Draw a rounded rectangle.""" - if isinstance(xy[0], (list, tuple)): - (x0, y0), (x1, y1) = cast(Sequence[Sequence[float]], xy) - else: - x0, y0, x1, y1 = cast(Sequence[float], xy) - if x1 < x0: - msg = "x1 must be greater than or equal to x0" - raise ValueError(msg) - if y1 < y0: - msg = "y1 must be greater than or equal to y0" - raise ValueError(msg) - if corners is None: - corners = (True, True, True, True) - - d = radius * 2 - - x0 = round(x0) - y0 = round(y0) - x1 = round(x1) - y1 = round(y1) - full_x, full_y = False, False - if all(corners): - full_x = d >= x1 - x0 - 1 - if full_x: - # The two left and two right corners are joined - d = x1 - x0 - full_y = d >= y1 - y0 - 1 - if full_y: - # The two top and two bottom corners are joined - d = y1 - y0 - if full_x and full_y: - # If all corners are joined, that is a circle - return self.ellipse(xy, fill, outline, width) - - if d == 0 or not any(corners): - # If the corners have no curve, - # or there are no corners, - # that is a rectangle - return self.rectangle(xy, fill, outline, width) - - r = int(d // 2) - ink, fill_ink = self._getink(outline, fill) - - def draw_corners(pieslice: bool) -> None: - parts: tuple[tuple[tuple[float, float, float, float], int, int], ...] - if full_x: - # Draw top and bottom halves - parts = ( - ((x0, y0, x0 + d, y0 + d), 180, 360), - ((x0, y1 - d, x0 + d, y1), 0, 180), - ) - elif full_y: - # Draw left and right halves - parts = ( - ((x0, y0, x0 + d, y0 + d), 90, 270), - ((x1 - d, y0, x1, y0 + d), 270, 90), - ) - else: - # Draw four separate corners - parts = tuple( - part - for i, part in enumerate( - ( - ((x0, y0, x0 + d, y0 + d), 180, 270), - ((x1 - d, y0, x1, y0 + d), 270, 360), - ((x1 - d, y1 - d, x1, y1), 0, 90), - ((x0, y1 - d, x0 + d, y1), 90, 180), - ) - ) - if corners[i] - ) - for part in parts: - if pieslice: - self.draw.draw_pieslice(*(part + (fill_ink, 1))) - else: - self.draw.draw_arc(*(part + (ink, width))) - - if fill_ink is not None: - draw_corners(True) - - if full_x: - self.draw.draw_rectangle((x0, y0 + r + 1, x1, y1 - r - 1), fill_ink, 1) - elif x1 - r - 1 > x0 + r + 1: - self.draw.draw_rectangle((x0 + r + 1, y0, x1 - r - 1, y1), fill_ink, 1) - if not full_x and not full_y: - left = [x0, y0, x0 + r, y1] - if corners[0]: - left[1] += r + 1 - if corners[3]: - left[3] -= r + 1 - self.draw.draw_rectangle(left, fill_ink, 1) - - right = [x1 - r, y0, x1, y1] - if corners[1]: - right[1] += r + 1 - if corners[2]: - right[3] -= r + 1 - self.draw.draw_rectangle(right, fill_ink, 1) - if ink is not None and ink != fill_ink and width != 0: - draw_corners(False) - - if not full_x: - top = [x0, y0, x1, y0 + width - 1] - if corners[0]: - top[0] += r + 1 - if corners[1]: - top[2] -= r + 1 - self.draw.draw_rectangle(top, ink, 1) - - bottom = [x0, y1 - width + 1, x1, y1] - if corners[3]: - bottom[0] += r + 1 - if corners[2]: - bottom[2] -= r + 1 - self.draw.draw_rectangle(bottom, ink, 1) - if not full_y: - left = [x0, y0, x0 + width - 1, y1] - if corners[0]: - left[1] += r + 1 - if corners[3]: - left[3] -= r + 1 - self.draw.draw_rectangle(left, ink, 1) - - right = [x1 - width + 1, y0, x1, y1] - if corners[1]: - right[1] += r + 1 - if corners[2]: - right[3] -= r + 1 - self.draw.draw_rectangle(right, ink, 1) - - def text( - self, - xy: tuple[float, float], - text: AnyStr | ImageText.Text, - fill: _Ink | None = None, - font: ( - ImageFont.ImageFont - | ImageFont.FreeTypeFont - | ImageFont.TransposedFont - | None - ) = None, - anchor: str | None = None, - spacing: float = 4, - align: str = "left", - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - stroke_width: float = 0, - stroke_fill: _Ink | None = None, - embedded_color: bool = False, - *args: Any, - **kwargs: Any, - ) -> None: - """Draw text.""" - if isinstance(text, ImageText.Text): - image_text = text - else: - if font is None: - font = self._getfont(kwargs.get("font_size")) - image_text = ImageText.Text( - text, font, self.mode, spacing, direction, features, language - ) - if embedded_color: - image_text.embed_color() - if stroke_width: - image_text.stroke(stroke_width, stroke_fill) - - def getink(fill: _Ink | None) -> int: - ink, fill_ink = self._getink(fill) - if ink is None: - assert fill_ink is not None - return fill_ink - return ink - - ink = getink(fill) - if ink is None: - return - - stroke_ink = None - if image_text.stroke_width: - stroke_ink = ( - getink(image_text.stroke_fill) - if image_text.stroke_fill is not None - else ink - ) - - for xy, anchor, line in image_text._split(xy, anchor, align): - - def draw_text(ink: int, stroke_width: float = 0) -> None: - mode = self.fontmode - if stroke_width == 0 and embedded_color: - mode = "RGBA" - coord = [] - for i in range(2): - coord.append(int(xy[i])) - start = (math.modf(xy[0])[0], math.modf(xy[1])[0]) - try: - mask, offset = image_text.font.getmask2( # type: ignore[union-attr,misc] - line, - mode, - direction=direction, - features=features, - language=language, - stroke_width=stroke_width, - stroke_filled=True, - anchor=anchor, - ink=ink, - start=start, - *args, - **kwargs, - ) - coord = [coord[0] + offset[0], coord[1] + offset[1]] - except AttributeError: - try: - mask = image_text.font.getmask( # type: ignore[misc] - line, - mode, - direction, - features, - language, - stroke_width, - anchor, - ink, - start=start, - *args, - **kwargs, - ) - except TypeError: - mask = image_text.font.getmask(line) - if mode == "RGBA": - # image_text.font.getmask2(mode="RGBA") - # returns color in RGB bands and mask in A - # extract mask and set text alpha - color, mask = mask, mask.getband(3) - ink_alpha = struct.pack("i", ink)[3] - color.fillband(3, ink_alpha) - x, y = coord - if self.im is not None: - self.im.paste( - color, (x, y, x + mask.size[0], y + mask.size[1]), mask - ) - else: - self.draw.draw_bitmap(coord, mask, ink) - - if stroke_ink is not None: - # Draw stroked text - draw_text(stroke_ink, image_text.stroke_width) - - # Draw normal text - if ink != stroke_ink: - draw_text(ink) - else: - # Only draw normal text - draw_text(ink) - - def multiline_text( - self, - xy: tuple[float, float], - text: AnyStr, - fill: _Ink | None = None, - font: ( - ImageFont.ImageFont - | ImageFont.FreeTypeFont - | ImageFont.TransposedFont - | None - ) = None, - anchor: str | None = None, - spacing: float = 4, - align: str = "left", - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - stroke_width: float = 0, - stroke_fill: _Ink | None = None, - embedded_color: bool = False, - *, - font_size: float | None = None, - ) -> None: - return self.text( - xy, - text, - fill, - font, - anchor, - spacing, - align, - direction, - features, - language, - stroke_width, - stroke_fill, - embedded_color, - font_size=font_size, - ) - - def textlength( - self, - text: AnyStr, - font: ( - ImageFont.ImageFont - | ImageFont.FreeTypeFont - | ImageFont.TransposedFont - | None - ) = None, - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - embedded_color: bool = False, - *, - font_size: float | None = None, - ) -> float: - """Get the length of a given string, in pixels with 1/64 precision.""" - if font is None: - font = self._getfont(font_size) - image_text = ImageText.Text( - text, - font, - self.mode, - direction=direction, - features=features, - language=language, - ) - if embedded_color: - image_text.embed_color() - return image_text.get_length() - - def textbbox( - self, - xy: tuple[float, float], - text: AnyStr, - font: ( - ImageFont.ImageFont - | ImageFont.FreeTypeFont - | ImageFont.TransposedFont - | None - ) = None, - anchor: str | None = None, - spacing: float = 4, - align: str = "left", - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - stroke_width: float = 0, - embedded_color: bool = False, - *, - font_size: float | None = None, - ) -> tuple[float, float, float, float]: - """Get the bounding box of a given string, in pixels.""" - if font is None: - font = self._getfont(font_size) - image_text = ImageText.Text( - text, font, self.mode, spacing, direction, features, language - ) - if embedded_color: - image_text.embed_color() - if stroke_width: - image_text.stroke(stroke_width) - return image_text.get_bbox(xy, anchor, align) - - def multiline_textbbox( - self, - xy: tuple[float, float], - text: AnyStr, - font: ( - ImageFont.ImageFont - | ImageFont.FreeTypeFont - | ImageFont.TransposedFont - | None - ) = None, - anchor: str | None = None, - spacing: float = 4, - align: str = "left", - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - stroke_width: float = 0, - embedded_color: bool = False, - *, - font_size: float | None = None, - ) -> tuple[float, float, float, float]: - return self.textbbox( - xy, - text, - font, - anchor, - spacing, - align, - direction, - features, - language, - stroke_width, - embedded_color, - font_size=font_size, - ) - - -def Draw(im: Image.Image, mode: str | None = None) -> ImageDraw: - """ - A simple 2D drawing interface for PIL images. - - :param im: The image to draw in. - :param mode: Optional mode to use for color values. For RGB - images, this argument can be RGB or RGBA (to blend the - drawing into the image). For all other modes, this argument - must be the same as the image mode. If omitted, the mode - defaults to the mode of the image. - """ - try: - return getattr(im, "getdraw")(mode) - except AttributeError: - return ImageDraw(im, mode) - - -def getdraw(im: Image.Image | None = None) -> tuple[ImageDraw2.Draw | None, ModuleType]: - """ - :param im: The image to draw in. - :returns: A (drawing context, drawing resource factory) tuple. - """ - from . import ImageDraw2 - - draw = ImageDraw2.Draw(im) if im is not None else None - return draw, ImageDraw2 - - -def floodfill( - image: Image.Image, - xy: tuple[int, int], - value: float | tuple[int, ...], - border: float | tuple[int, ...] | None = None, - thresh: float = 0, -) -> None: - """ - .. warning:: This method is experimental. - - Fills a bounded region with a given color. - - :param image: Target image. - :param xy: Seed position (a 2-item coordinate tuple). See - :ref:`coordinate-system`. - :param value: Fill color. - :param border: Optional border value. If given, the region consists of - pixels with a color different from the border color. If not given, - the region consists of pixels having the same color as the seed - pixel. - :param thresh: Optional threshold value which specifies a maximum - tolerable difference of a pixel value from the 'background' in - order for it to be replaced. Useful for filling regions of - non-homogeneous, but similar, colors. - """ - # based on an implementation by Eric S. Raymond - # amended by yo1995 @20180806 - pixel = image.load() - assert pixel is not None - x, y = xy - try: - background = pixel[x, y] - if _color_diff(value, background) <= thresh: - return # seed point already has fill color - pixel[x, y] = value - except (ValueError, IndexError): - return # seed point outside image - edge = {(x, y)} - # use a set to keep record of current and previous edge pixels - # to reduce memory consumption - full_edge = set() - while edge: - new_edge = set() - for x, y in edge: # 4 adjacent method - for s, t in ((x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1)): - # If already processed, or if a coordinate is negative, skip - if (s, t) in full_edge or s < 0 or t < 0: - continue - try: - p = pixel[s, t] - except (ValueError, IndexError): - pass - else: - full_edge.add((s, t)) - if border is None: - fill = _color_diff(p, background) <= thresh - else: - fill = p not in (value, border) - if fill: - pixel[s, t] = value - new_edge.add((s, t)) - full_edge = edge # discard pixels processed - edge = new_edge - - -def _compute_regular_polygon_vertices( - bounding_circle: Sequence[Sequence[float] | float], n_sides: int, rotation: float -) -> list[tuple[float, float]]: - """ - Generate a list of vertices for a 2D regular polygon. - - :param bounding_circle: The bounding circle is a sequence defined - by a point and radius. The polygon is inscribed in this circle. - (e.g. ``bounding_circle=(x, y, r)`` or ``((x, y), r)``) - :param n_sides: Number of sides - (e.g. ``n_sides=3`` for a triangle, ``6`` for a hexagon) - :param rotation: Apply an arbitrary rotation to the polygon - (e.g. ``rotation=90``, applies a 90 degree rotation) - :return: List of regular polygon vertices - (e.g. ``[(25, 50), (50, 50), (50, 25), (25, 25)]``) - - How are the vertices computed? - 1. Compute the following variables - - theta: Angle between the apothem & the nearest polygon vertex - - side_length: Length of each polygon edge - - centroid: Center of bounding circle (1st, 2nd elements of bounding_circle) - - polygon_radius: Polygon radius (last element of bounding_circle) - - angles: Location of each polygon vertex in polar grid - (e.g. A square with 0 degree rotation => [225.0, 315.0, 45.0, 135.0]) - - 2. For each angle in angles, get the polygon vertex at that angle - The vertex is computed using the equation below. - X= xcos(φ) + ysin(φ) - Y= −xsin(φ) + ycos(φ) - - Note: - φ = angle in degrees - x = 0 - y = polygon_radius - - The formula above assumes rotation around the origin. - In our case, we are rotating around the centroid. - To account for this, we use the formula below - X = xcos(φ) + ysin(φ) + centroid_x - Y = −xsin(φ) + ycos(φ) + centroid_y - """ - # 1. Error Handling - # 1.1 Check `n_sides` has an appropriate value - if not isinstance(n_sides, int): - msg = "n_sides should be an int" # type: ignore[unreachable] - raise TypeError(msg) - if n_sides < 3: - msg = "n_sides should be an int > 2" - raise ValueError(msg) - - # 1.2 Check `bounding_circle` has an appropriate value - if not isinstance(bounding_circle, (list, tuple)): - msg = "bounding_circle should be a sequence" - raise TypeError(msg) - - if len(bounding_circle) == 3: - if not all(isinstance(i, (int, float)) for i in bounding_circle): - msg = "bounding_circle should only contain numeric data" - raise ValueError(msg) - - *centroid, polygon_radius = cast(list[float], list(bounding_circle)) - elif len(bounding_circle) == 2 and isinstance(bounding_circle[0], (list, tuple)): - if not all( - isinstance(i, (int, float)) for i in bounding_circle[0] - ) or not isinstance(bounding_circle[1], (int, float)): - msg = "bounding_circle should only contain numeric data" - raise ValueError(msg) - - if len(bounding_circle[0]) != 2: - msg = "bounding_circle centre should contain 2D coordinates (e.g. (x, y))" - raise ValueError(msg) - - centroid = cast(list[float], list(bounding_circle[0])) - polygon_radius = cast(float, bounding_circle[1]) - else: - msg = ( - "bounding_circle should contain 2D coordinates " - "and a radius (e.g. (x, y, r) or ((x, y), r) )" - ) - raise ValueError(msg) - - if polygon_radius <= 0: - msg = "bounding_circle radius should be > 0" - raise ValueError(msg) - - # 1.3 Check `rotation` has an appropriate value - if not isinstance(rotation, (int, float)): - msg = "rotation should be an int or float" # type: ignore[unreachable] - raise ValueError(msg) - - # 2. Define Helper Functions - def _apply_rotation(point: list[float], degrees: float) -> tuple[float, float]: - return ( - round( - point[0] * math.cos(math.radians(360 - degrees)) - - point[1] * math.sin(math.radians(360 - degrees)) - + centroid[0], - 2, - ), - round( - point[1] * math.cos(math.radians(360 - degrees)) - + point[0] * math.sin(math.radians(360 - degrees)) - + centroid[1], - 2, - ), - ) - - def _compute_polygon_vertex(angle: float) -> tuple[float, float]: - start_point = [polygon_radius, 0] - return _apply_rotation(start_point, angle) - - def _get_angles(n_sides: int, rotation: float) -> list[float]: - angles = [] - degrees = 360 / n_sides - # Start with the bottom left polygon vertex - current_angle = (270 - 0.5 * degrees) + rotation - for _ in range(n_sides): - angles.append(current_angle) - current_angle += degrees - if current_angle > 360: - current_angle -= 360 - return angles - - # 3. Variable Declarations - angles = _get_angles(n_sides, rotation) - - # 4. Compute Vertices - return [_compute_polygon_vertex(angle) for angle in angles] - - -def _color_diff( - color1: float | tuple[int, ...], color2: float | tuple[int, ...] -) -> float: - """ - Uses 1-norm distance to calculate difference between two values. - """ - first = color1 if isinstance(color1, tuple) else (color1,) - second = color2 if isinstance(color2, tuple) else (color2,) - - return sum(abs(first[i] - second[i]) for i in range(len(second))) diff --git a/voxvera/vendor/PIL/ImageDraw2.py b/voxvera/vendor/PIL/ImageDraw2.py deleted file mode 100644 index 3d68658..0000000 --- a/voxvera/vendor/PIL/ImageDraw2.py +++ /dev/null @@ -1,243 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# WCK-style drawing interface operations -# -# History: -# 2003-12-07 fl created -# 2005-05-15 fl updated; added to PIL as ImageDraw2 -# 2005-05-15 fl added text support -# 2005-05-20 fl added arc/chord/pieslice support -# -# Copyright (c) 2003-2005 by Secret Labs AB -# Copyright (c) 2003-2005 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# - - -""" -(Experimental) WCK-style drawing interface operations - -.. seealso:: :py:mod:`PIL.ImageDraw` -""" -from __future__ import annotations - -from typing import Any, AnyStr, BinaryIO - -from . import Image, ImageColor, ImageDraw, ImageFont, ImagePath -from ._typing import Coords, StrOrBytesPath - - -class Pen: - """Stores an outline color and width.""" - - def __init__(self, color: str, width: int = 1, opacity: int = 255) -> None: - self.color = ImageColor.getrgb(color) - self.width = width - - -class Brush: - """Stores a fill color""" - - def __init__(self, color: str, opacity: int = 255) -> None: - self.color = ImageColor.getrgb(color) - - -class Font: - """Stores a TrueType font and color""" - - def __init__( - self, color: str, file: StrOrBytesPath | BinaryIO, size: float = 12 - ) -> None: - # FIXME: add support for bitmap fonts - self.color = ImageColor.getrgb(color) - self.font = ImageFont.truetype(file, size) - - -class Draw: - """ - (Experimental) WCK-style drawing interface - """ - - def __init__( - self, - image: Image.Image | str, - size: tuple[int, int] | list[int] | None = None, - color: float | tuple[float, ...] | str | None = None, - ) -> None: - if isinstance(image, str): - if size is None: - msg = "If image argument is mode string, size must be a list or tuple" - raise ValueError(msg) - image = Image.new(image, size, color) - self.draw = ImageDraw.Draw(image) - self.image = image - self.transform: tuple[float, float, float, float, float, float] | None = None - - def flush(self) -> Image.Image: - return self.image - - def render( - self, - op: str, - xy: Coords, - pen: Pen | Brush | None, - brush: Brush | Pen | None = None, - **kwargs: Any, - ) -> None: - # handle color arguments - outline = fill = None - width = 1 - if isinstance(pen, Pen): - outline = pen.color - width = pen.width - elif isinstance(brush, Pen): - outline = brush.color - width = brush.width - if isinstance(brush, Brush): - fill = brush.color - elif isinstance(pen, Brush): - fill = pen.color - # handle transformation - if self.transform: - path = ImagePath.Path(xy) - path.transform(self.transform) - xy = path - # render the item - if op in ("arc", "line"): - kwargs.setdefault("fill", outline) - else: - kwargs.setdefault("fill", fill) - kwargs.setdefault("outline", outline) - if op == "line": - kwargs.setdefault("width", width) - getattr(self.draw, op)(xy, **kwargs) - - def settransform(self, offset: tuple[float, float]) -> None: - """Sets a transformation offset.""" - (xoffset, yoffset) = offset - self.transform = (1, 0, xoffset, 0, 1, yoffset) - - def arc( - self, - xy: Coords, - pen: Pen | Brush | None, - start: float, - end: float, - *options: Any, - ) -> None: - """ - Draws an arc (a portion of a circle outline) between the start and end - angles, inside the given bounding box. - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.arc` - """ - self.render("arc", xy, pen, *options, start=start, end=end) - - def chord( - self, - xy: Coords, - pen: Pen | Brush | None, - start: float, - end: float, - *options: Any, - ) -> None: - """ - Same as :py:meth:`~PIL.ImageDraw2.Draw.arc`, but connects the end points - with a straight line. - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.chord` - """ - self.render("chord", xy, pen, *options, start=start, end=end) - - def ellipse(self, xy: Coords, pen: Pen | Brush | None, *options: Any) -> None: - """ - Draws an ellipse inside the given bounding box. - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.ellipse` - """ - self.render("ellipse", xy, pen, *options) - - def line(self, xy: Coords, pen: Pen | Brush | None, *options: Any) -> None: - """ - Draws a line between the coordinates in the ``xy`` list. - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.line` - """ - self.render("line", xy, pen, *options) - - def pieslice( - self, - xy: Coords, - pen: Pen | Brush | None, - start: float, - end: float, - *options: Any, - ) -> None: - """ - Same as arc, but also draws straight lines between the end points and the - center of the bounding box. - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.pieslice` - """ - self.render("pieslice", xy, pen, *options, start=start, end=end) - - def polygon(self, xy: Coords, pen: Pen | Brush | None, *options: Any) -> None: - """ - Draws a polygon. - - The polygon outline consists of straight lines between the given - coordinates, plus a straight line between the last and the first - coordinate. - - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.polygon` - """ - self.render("polygon", xy, pen, *options) - - def rectangle(self, xy: Coords, pen: Pen | Brush | None, *options: Any) -> None: - """ - Draws a rectangle. - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.rectangle` - """ - self.render("rectangle", xy, pen, *options) - - def text(self, xy: tuple[float, float], text: AnyStr, font: Font) -> None: - """ - Draws the string at the given position. - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.text` - """ - if self.transform: - path = ImagePath.Path(xy) - path.transform(self.transform) - xy = path - self.draw.text(xy, text, font=font.font, fill=font.color) - - def textbbox( - self, xy: tuple[float, float], text: AnyStr, font: Font - ) -> tuple[float, float, float, float]: - """ - Returns bounding box (in pixels) of given text. - - :return: ``(left, top, right, bottom)`` bounding box - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.textbbox` - """ - if self.transform: - path = ImagePath.Path(xy) - path.transform(self.transform) - xy = path - return self.draw.textbbox(xy, text, font=font.font) - - def textlength(self, text: AnyStr, font: Font) -> float: - """ - Returns length (in pixels) of given text. - This is the amount by which following text should be offset. - - .. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.textlength` - """ - return self.draw.textlength(text, font=font.font) diff --git a/voxvera/vendor/PIL/ImageEnhance.py b/voxvera/vendor/PIL/ImageEnhance.py deleted file mode 100644 index 0e7e6dd..0000000 --- a/voxvera/vendor/PIL/ImageEnhance.py +++ /dev/null @@ -1,113 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# image enhancement classes -# -# For a background, see "Image Processing By Interpolation and -# Extrapolation", Paul Haeberli and Douglas Voorhies. Available -# at http://www.graficaobscura.com/interp/index.html -# -# History: -# 1996-03-23 fl Created -# 2009-06-16 fl Fixed mean calculation -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1996. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import Image, ImageFilter, ImageStat - - -class _Enhance: - image: Image.Image - degenerate: Image.Image - - def enhance(self, factor: float) -> Image.Image: - """ - Returns an enhanced image. - - :param factor: A floating point value controlling the enhancement. - Factor 1.0 always returns a copy of the original image, - lower factors mean less color (brightness, contrast, - etc), and higher values more. There are no restrictions - on this value. - :rtype: :py:class:`~PIL.Image.Image` - """ - return Image.blend(self.degenerate, self.image, factor) - - -class Color(_Enhance): - """Adjust image color balance. - - This class can be used to adjust the colour balance of an image, in - a manner similar to the controls on a colour TV set. An enhancement - factor of 0.0 gives a black and white image. A factor of 1.0 gives - the original image. - """ - - def __init__(self, image: Image.Image) -> None: - self.image = image - self.intermediate_mode = "L" - if "A" in image.getbands(): - self.intermediate_mode = "LA" - - if self.intermediate_mode != image.mode: - image = image.convert(self.intermediate_mode).convert(image.mode) - self.degenerate = image - - -class Contrast(_Enhance): - """Adjust image contrast. - - This class can be used to control the contrast of an image, similar - to the contrast control on a TV set. An enhancement factor of 0.0 - gives a solid gray image. A factor of 1.0 gives the original image. - """ - - def __init__(self, image: Image.Image) -> None: - self.image = image - if image.mode != "L": - image = image.convert("L") - mean = int(ImageStat.Stat(image).mean[0] + 0.5) - self.degenerate = Image.new("L", image.size, mean) - if self.degenerate.mode != self.image.mode: - self.degenerate = self.degenerate.convert(self.image.mode) - - if "A" in self.image.getbands(): - self.degenerate.putalpha(self.image.getchannel("A")) - - -class Brightness(_Enhance): - """Adjust image brightness. - - This class can be used to control the brightness of an image. An - enhancement factor of 0.0 gives a black image. A factor of 1.0 gives the - original image. - """ - - def __init__(self, image: Image.Image) -> None: - self.image = image - self.degenerate = Image.new(image.mode, image.size, 0) - - if "A" in image.getbands(): - self.degenerate.putalpha(image.getchannel("A")) - - -class Sharpness(_Enhance): - """Adjust image sharpness. - - This class can be used to adjust the sharpness of an image. An - enhancement factor of 0.0 gives a blurred image, a factor of 1.0 gives the - original image, and a factor of 2.0 gives a sharpened image. - """ - - def __init__(self, image: Image.Image) -> None: - self.image = image - self.degenerate = image.filter(ImageFilter.SMOOTH) - - if "A" in image.getbands(): - self.degenerate.putalpha(image.getchannel("A")) diff --git a/voxvera/vendor/PIL/ImageFile.py b/voxvera/vendor/PIL/ImageFile.py deleted file mode 100644 index 3390dfa..0000000 --- a/voxvera/vendor/PIL/ImageFile.py +++ /dev/null @@ -1,938 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# base class for image file handlers -# -# history: -# 1995-09-09 fl Created -# 1996-03-11 fl Fixed load mechanism. -# 1996-04-15 fl Added pcx/xbm decoders. -# 1996-04-30 fl Added encoders. -# 1996-12-14 fl Added load helpers -# 1997-01-11 fl Use encode_to_file where possible -# 1997-08-27 fl Flush output in _save -# 1998-03-05 fl Use memory mapping for some modes -# 1999-02-04 fl Use memory mapping also for "I;16" and "I;16B" -# 1999-05-31 fl Added image parser -# 2000-10-12 fl Set readonly flag on memory-mapped images -# 2002-03-20 fl Use better messages for common decoder errors -# 2003-04-21 fl Fall back on mmap/map_buffer if map is not available -# 2003-10-30 fl Added StubImageFile class -# 2004-02-25 fl Made incremental parser more robust -# -# Copyright (c) 1997-2004 by Secret Labs AB -# Copyright (c) 1995-2004 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import abc -import io -import itertools -import logging -import os -import struct -from typing import IO, Any, NamedTuple, cast - -from . import ExifTags, Image -from ._util import DeferredError, is_path - -TYPE_CHECKING = False -if TYPE_CHECKING: - from ._typing import StrOrBytesPath - -logger = logging.getLogger(__name__) - -MAXBLOCK = 65536 -""" -By default, Pillow processes image data in blocks. This helps to prevent excessive use -of resources. Codecs may disable this behaviour with ``_pulls_fd`` or ``_pushes_fd``. - -When reading an image, this is the number of bytes to read at once. - -When writing an image, this is the number of bytes to write at once. -If the image width times 4 is greater, then that will be used instead. -Plugins may also set a greater number. - -User code may set this to another number. -""" - -SAFEBLOCK = 1024 * 1024 - -LOAD_TRUNCATED_IMAGES = False -"""Whether or not to load truncated image files. User code may change this.""" - -ERRORS = { - -1: "image buffer overrun error", - -2: "decoding error", - -3: "unknown error", - -8: "bad configuration", - -9: "out of memory error", -} -""" -Dict of known error codes returned from :meth:`.PyDecoder.decode`, -:meth:`.PyEncoder.encode` :meth:`.PyEncoder.encode_to_pyfd` and -:meth:`.PyEncoder.encode_to_file`. -""" - - -# -# -------------------------------------------------------------------- -# Helpers - - -def _get_oserror(error: int, *, encoder: bool) -> OSError: - try: - msg = Image.core.getcodecstatus(error) - except AttributeError: - msg = ERRORS.get(error) - if not msg: - msg = f"{'encoder' if encoder else 'decoder'} error {error}" - msg += f" when {'writing' if encoder else 'reading'} image file" - return OSError(msg) - - -def _tilesort(t: _Tile) -> int: - # sort on offset - return t[2] - - -class _Tile(NamedTuple): - codec_name: str - extents: tuple[int, int, int, int] | None - offset: int = 0 - args: tuple[Any, ...] | str | None = None - - -# -# -------------------------------------------------------------------- -# ImageFile base class - - -class ImageFile(Image.Image): - """Base class for image file format handlers.""" - - def __init__( - self, fp: StrOrBytesPath | IO[bytes], filename: str | bytes | None = None - ) -> None: - super().__init__() - - self._min_frame = 0 - - self.custom_mimetype: str | None = None - - self.tile: list[_Tile] = [] - """ A list of tile descriptors """ - - self.readonly = 1 # until we know better - - self.decoderconfig: tuple[Any, ...] = () - self.decodermaxblock = MAXBLOCK - - self.fp: IO[bytes] | None - self._fp: IO[bytes] | DeferredError - if is_path(fp): - # filename - self.fp = open(fp, "rb") - self.filename = os.fspath(fp) - self._exclusive_fp = True - else: - # stream - self.fp = cast(IO[bytes], fp) - self.filename = filename if filename is not None else "" - # can be overridden - self._exclusive_fp = False - - try: - try: - self._open() - except ( - IndexError, # end of data - TypeError, # end of data (ord) - KeyError, # unsupported mode - EOFError, # got header but not the first frame - struct.error, - ) as v: - raise SyntaxError(v) from v - - if not self.mode or self.size[0] <= 0 or self.size[1] <= 0: - msg = "not identified by this driver" - raise SyntaxError(msg) - except BaseException: - # close the file only if we have opened it this constructor - if self._exclusive_fp: - self.fp.close() - raise - - def _open(self) -> None: - pass - - # Context manager support - def __enter__(self) -> ImageFile: - return self - - def _close_fp(self) -> None: - if getattr(self, "_fp", False) and not isinstance(self._fp, DeferredError): - if self._fp != self.fp: - self._fp.close() - self._fp = DeferredError(ValueError("Operation on closed image")) - if self.fp: - self.fp.close() - - def __exit__(self, *args: object) -> None: - if getattr(self, "_exclusive_fp", False): - self._close_fp() - self.fp = None - - def close(self) -> None: - """ - Closes the file pointer, if possible. - - This operation will destroy the image core and release its memory. - The image data will be unusable afterward. - - This function is required to close images that have multiple frames or - have not had their file read and closed by the - :py:meth:`~PIL.Image.Image.load` method. See :ref:`file-handling` for - more information. - """ - try: - self._close_fp() - self.fp = None - except Exception as msg: - logger.debug("Error closing: %s", msg) - - super().close() - - def get_child_images(self) -> list[ImageFile]: - child_images = [] - exif = self.getexif() - ifds = [] - if ExifTags.Base.SubIFDs in exif: - subifd_offsets = exif[ExifTags.Base.SubIFDs] - if subifd_offsets: - if not isinstance(subifd_offsets, tuple): - subifd_offsets = (subifd_offsets,) - for subifd_offset in subifd_offsets: - ifds.append((exif._get_ifd_dict(subifd_offset), subifd_offset)) - ifd1 = exif.get_ifd(ExifTags.IFD.IFD1) - if ifd1 and ifd1.get(ExifTags.Base.JpegIFOffset): - assert exif._info is not None - ifds.append((ifd1, exif._info.next)) - - offset = None - for ifd, ifd_offset in ifds: - assert self.fp is not None - current_offset = self.fp.tell() - if offset is None: - offset = current_offset - - fp = self.fp - if ifd is not None: - thumbnail_offset = ifd.get(ExifTags.Base.JpegIFOffset) - if thumbnail_offset is not None: - thumbnail_offset += getattr(self, "_exif_offset", 0) - self.fp.seek(thumbnail_offset) - - length = ifd.get(ExifTags.Base.JpegIFByteCount) - assert isinstance(length, int) - data = self.fp.read(length) - fp = io.BytesIO(data) - - with Image.open(fp) as im: - from . import TiffImagePlugin - - if thumbnail_offset is None and isinstance( - im, TiffImagePlugin.TiffImageFile - ): - im._frame_pos = [ifd_offset] - im._seek(0) - im.load() - child_images.append(im) - - if offset is not None: - assert self.fp is not None - self.fp.seek(offset) - return child_images - - def get_format_mimetype(self) -> str | None: - if self.custom_mimetype: - return self.custom_mimetype - if self.format is not None: - return Image.MIME.get(self.format.upper()) - return None - - def __getstate__(self) -> list[Any]: - return super().__getstate__() + [self.filename] - - def __setstate__(self, state: list[Any]) -> None: - self.tile = [] - if len(state) > 5: - self.filename = state[5] - super().__setstate__(state) - - def verify(self) -> None: - """Check file integrity""" - - # raise exception if something's wrong. must be called - # directly after open, and closes file when finished. - if self._exclusive_fp and self.fp: - self.fp.close() - self.fp = None - - def load(self) -> Image.core.PixelAccess | None: - """Load image data based on tile list""" - - if not self.tile and self._im is None: - msg = "cannot load this image" - raise OSError(msg) - - pixel = Image.Image.load(self) - if not self.tile: - return pixel - - self.map: mmap.mmap | None = None - use_mmap = self.filename and len(self.tile) == 1 - - assert self.fp is not None - readonly = 0 - - # look for read/seek overrides - if hasattr(self, "load_read"): - read = self.load_read - # don't use mmap if there are custom read/seek functions - use_mmap = False - else: - read = self.fp.read - - if hasattr(self, "load_seek"): - seek = self.load_seek - use_mmap = False - else: - seek = self.fp.seek - - if use_mmap: - # try memory mapping - decoder_name, extents, offset, args = self.tile[0] - if isinstance(args, str): - args = (args, 0, 1) - if ( - decoder_name == "raw" - and isinstance(args, tuple) - and len(args) >= 3 - and args[0] == self.mode - and args[0] in Image._MAPMODES - ): - if offset < 0: - msg = "Tile offset cannot be negative" - raise ValueError(msg) - try: - # use mmap, if possible - import mmap - - with open(self.filename) as fp: - self.map = mmap.mmap(fp.fileno(), 0, access=mmap.ACCESS_READ) - if offset + self.size[1] * args[1] > self.map.size(): - msg = "buffer is not large enough" - raise OSError(msg) - self.im = Image.core.map_buffer( - self.map, self.size, decoder_name, offset, args - ) - readonly = 1 - # After trashing self.im, - # we might need to reload the palette data. - if self.palette: - self.palette.dirty = 1 - except (AttributeError, OSError, ImportError): - self.map = None - - self.load_prepare() - err_code = -3 # initialize to unknown error - if not self.map: - # sort tiles in file order - self.tile.sort(key=_tilesort) - - # FIXME: This is a hack to handle TIFF's JpegTables tag. - prefix = getattr(self, "tile_prefix", b"") - - # Remove consecutive duplicates that only differ by their offset - self.tile = [ - list(tiles)[-1] - for _, tiles in itertools.groupby( - self.tile, lambda tile: (tile[0], tile[1], tile[3]) - ) - ] - for i, (decoder_name, extents, offset, args) in enumerate(self.tile): - seek(offset) - decoder = Image._getdecoder( - self.mode, decoder_name, args, self.decoderconfig - ) - try: - decoder.setimage(self.im, extents) - if decoder.pulls_fd: - decoder.setfd(self.fp) - err_code = decoder.decode(b"")[1] - else: - b = prefix - while True: - read_bytes = self.decodermaxblock - if i + 1 < len(self.tile): - next_offset = self.tile[i + 1].offset - if next_offset > offset: - read_bytes = next_offset - offset - try: - s = read(read_bytes) - except (IndexError, struct.error) as e: - # truncated png/gif - if LOAD_TRUNCATED_IMAGES: - break - else: - msg = "image file is truncated" - raise OSError(msg) from e - - if not s: # truncated jpeg - if LOAD_TRUNCATED_IMAGES: - break - else: - msg = ( - "image file is truncated " - f"({len(b)} bytes not processed)" - ) - raise OSError(msg) - - b = b + s - n, err_code = decoder.decode(b) - if n < 0: - break - b = b[n:] - finally: - # Need to cleanup here to prevent leaks - decoder.cleanup() - - self.tile = [] - self.readonly = readonly - - self.load_end() - - if self._exclusive_fp and self._close_exclusive_fp_after_loading: - self.fp.close() - self.fp = None - - if not self.map and not LOAD_TRUNCATED_IMAGES and err_code < 0: - # still raised if decoder fails to return anything - raise _get_oserror(err_code, encoder=False) - - return Image.Image.load(self) - - def load_prepare(self) -> None: - # create image memory if necessary - if self._im is None: - self.im = Image.core.new(self.mode, self.size) - # create palette (optional) - if self.mode == "P": - Image.Image.load(self) - - def load_end(self) -> None: - # may be overridden - pass - - # may be defined for contained formats - # def load_seek(self, pos: int) -> None: - # pass - - # may be defined for blocked formats (e.g. PNG) - # def load_read(self, read_bytes: int) -> bytes: - # pass - - def _seek_check(self, frame: int) -> bool: - if ( - frame < self._min_frame - # Only check upper limit on frames if additional seek operations - # are not required to do so - or ( - not (hasattr(self, "_n_frames") and self._n_frames is None) - and frame >= getattr(self, "n_frames") + self._min_frame - ) - ): - msg = "attempt to seek outside sequence" - raise EOFError(msg) - - return self.tell() != frame - - -class StubHandler(abc.ABC): - def open(self, im: StubImageFile) -> None: - pass - - @abc.abstractmethod - def load(self, im: StubImageFile) -> Image.Image: - pass - - -class StubImageFile(ImageFile, metaclass=abc.ABCMeta): - """ - Base class for stub image loaders. - - A stub loader is an image loader that can identify files of a - certain format, but relies on external code to load the file. - """ - - @abc.abstractmethod - def _open(self) -> None: - pass - - def load(self) -> Image.core.PixelAccess | None: - loader = self._load() - if loader is None: - msg = f"cannot find loader for this {self.format} file" - raise OSError(msg) - image = loader.load(self) - assert image is not None - # become the other object (!) - self.__class__ = image.__class__ # type: ignore[assignment] - self.__dict__ = image.__dict__ - return image.load() - - @abc.abstractmethod - def _load(self) -> StubHandler | None: - """(Hook) Find actual image loader.""" - pass - - -class Parser: - """ - Incremental image parser. This class implements the standard - feed/close consumer interface. - """ - - incremental = None - image: Image.Image | None = None - data: bytes | None = None - decoder: Image.core.ImagingDecoder | PyDecoder | None = None - offset = 0 - finished = 0 - - def reset(self) -> None: - """ - (Consumer) Reset the parser. Note that you can only call this - method immediately after you've created a parser; parser - instances cannot be reused. - """ - assert self.data is None, "cannot reuse parsers" - - def feed(self, data: bytes) -> None: - """ - (Consumer) Feed data to the parser. - - :param data: A string buffer. - :exception OSError: If the parser failed to parse the image file. - """ - # collect data - - if self.finished: - return - - if self.data is None: - self.data = data - else: - self.data = self.data + data - - # parse what we have - if self.decoder: - if self.offset > 0: - # skip header - skip = min(len(self.data), self.offset) - self.data = self.data[skip:] - self.offset = self.offset - skip - if self.offset > 0 or not self.data: - return - - n, e = self.decoder.decode(self.data) - - if n < 0: - # end of stream - self.data = None - self.finished = 1 - if e < 0: - # decoding error - self.image = None - raise _get_oserror(e, encoder=False) - else: - # end of image - return - self.data = self.data[n:] - - elif self.image: - # if we end up here with no decoder, this file cannot - # be incrementally parsed. wait until we've gotten all - # available data - pass - - else: - # attempt to open this file - try: - with io.BytesIO(self.data) as fp: - im = Image.open(fp) - except OSError: - pass # not enough data - else: - flag = hasattr(im, "load_seek") or hasattr(im, "load_read") - if flag or len(im.tile) != 1: - # custom load code, or multiple tiles - self.decode = None - else: - # initialize decoder - im.load_prepare() - d, e, o, a = im.tile[0] - im.tile = [] - self.decoder = Image._getdecoder(im.mode, d, a, im.decoderconfig) - self.decoder.setimage(im.im, e) - - # calculate decoder offset - self.offset = o - if self.offset <= len(self.data): - self.data = self.data[self.offset :] - self.offset = 0 - - self.image = im - - def __enter__(self) -> Parser: - return self - - def __exit__(self, *args: object) -> None: - self.close() - - def close(self) -> Image.Image: - """ - (Consumer) Close the stream. - - :returns: An image object. - :exception OSError: If the parser failed to parse the image file either - because it cannot be identified or cannot be - decoded. - """ - # finish decoding - if self.decoder: - # get rid of what's left in the buffers - self.feed(b"") - self.data = self.decoder = None - if not self.finished: - msg = "image was incomplete" - raise OSError(msg) - if not self.image: - msg = "cannot parse this image" - raise OSError(msg) - if self.data: - # incremental parsing not possible; reopen the file - # not that we have all data - with io.BytesIO(self.data) as fp: - try: - self.image = Image.open(fp) - finally: - self.image.load() - return self.image - - -# -------------------------------------------------------------------- - - -def _save(im: Image.Image, fp: IO[bytes], tile: list[_Tile], bufsize: int = 0) -> None: - """Helper to save image based on tile list - - :param im: Image object. - :param fp: File object. - :param tile: Tile list. - :param bufsize: Optional buffer size - """ - - im.load() - if not hasattr(im, "encoderconfig"): - im.encoderconfig = () - tile.sort(key=_tilesort) - # FIXME: make MAXBLOCK a configuration parameter - # It would be great if we could have the encoder specify what it needs - # But, it would need at least the image size in most cases. RawEncode is - # a tricky case. - bufsize = max(MAXBLOCK, bufsize, im.size[0] * 4) # see RawEncode.c - try: - fh = fp.fileno() - fp.flush() - _encode_tile(im, fp, tile, bufsize, fh) - except (AttributeError, io.UnsupportedOperation) as exc: - _encode_tile(im, fp, tile, bufsize, None, exc) - if hasattr(fp, "flush"): - fp.flush() - - -def _encode_tile( - im: Image.Image, - fp: IO[bytes], - tile: list[_Tile], - bufsize: int, - fh: int | None, - exc: BaseException | None = None, -) -> None: - for encoder_name, extents, offset, args in tile: - if offset > 0: - fp.seek(offset) - encoder = Image._getencoder(im.mode, encoder_name, args, im.encoderconfig) - try: - encoder.setimage(im.im, extents) - if encoder.pushes_fd: - encoder.setfd(fp) - errcode = encoder.encode_to_pyfd()[1] - else: - if exc: - # compress to Python file-compatible object - while True: - errcode, data = encoder.encode(bufsize)[1:] - fp.write(data) - if errcode: - break - else: - # slight speedup: compress to real file object - assert fh is not None - errcode = encoder.encode_to_file(fh, bufsize) - if errcode < 0: - raise _get_oserror(errcode, encoder=True) from exc - finally: - encoder.cleanup() - - -def _safe_read(fp: IO[bytes], size: int) -> bytes: - """ - Reads large blocks in a safe way. Unlike fp.read(n), this function - doesn't trust the user. If the requested size is larger than - SAFEBLOCK, the file is read block by block. - - :param fp: File handle. Must implement a read method. - :param size: Number of bytes to read. - :returns: A string containing size bytes of data. - - Raises an OSError if the file is truncated and the read cannot be completed - - """ - if size <= 0: - return b"" - if size <= SAFEBLOCK: - data = fp.read(size) - if len(data) < size: - msg = "Truncated File Read" - raise OSError(msg) - return data - blocks: list[bytes] = [] - remaining_size = size - while remaining_size > 0: - block = fp.read(min(remaining_size, SAFEBLOCK)) - if not block: - break - blocks.append(block) - remaining_size -= len(block) - if sum(len(block) for block in blocks) < size: - msg = "Truncated File Read" - raise OSError(msg) - return b"".join(blocks) - - -class PyCodecState: - def __init__(self) -> None: - self.xsize = 0 - self.ysize = 0 - self.xoff = 0 - self.yoff = 0 - - def extents(self) -> tuple[int, int, int, int]: - return self.xoff, self.yoff, self.xoff + self.xsize, self.yoff + self.ysize - - -class PyCodec: - fd: IO[bytes] | None - - def __init__(self, mode: str, *args: Any) -> None: - self.im: Image.core.ImagingCore | None = None - self.state = PyCodecState() - self.fd = None - self.mode = mode - self.init(args) - - def init(self, args: tuple[Any, ...]) -> None: - """ - Override to perform codec specific initialization - - :param args: Tuple of arg items from the tile entry - :returns: None - """ - self.args = args - - def cleanup(self) -> None: - """ - Override to perform codec specific cleanup - - :returns: None - """ - pass - - def setfd(self, fd: IO[bytes]) -> None: - """ - Called from ImageFile to set the Python file-like object - - :param fd: A Python file-like object - :returns: None - """ - self.fd = fd - - def setimage( - self, - im: Image.core.ImagingCore, - extents: tuple[int, int, int, int] | None = None, - ) -> None: - """ - Called from ImageFile to set the core output image for the codec - - :param im: A core image object - :param extents: a 4 tuple of (x0, y0, x1, y1) defining the rectangle - for this tile - :returns: None - """ - - # following c code - self.im = im - - if extents: - (x0, y0, x1, y1) = extents - else: - (x0, y0, x1, y1) = (0, 0, 0, 0) - - if x0 == 0 and x1 == 0: - self.state.xsize, self.state.ysize = self.im.size - else: - self.state.xoff = x0 - self.state.yoff = y0 - self.state.xsize = x1 - x0 - self.state.ysize = y1 - y0 - - if self.state.xsize <= 0 or self.state.ysize <= 0: - msg = "Size cannot be negative" - raise ValueError(msg) - - if ( - self.state.xsize + self.state.xoff > self.im.size[0] - or self.state.ysize + self.state.yoff > self.im.size[1] - ): - msg = "Tile cannot extend outside image" - raise ValueError(msg) - - -class PyDecoder(PyCodec): - """ - Python implementation of a format decoder. Override this class and - add the decoding logic in the :meth:`decode` method. - - See :ref:`Writing Your Own File Codec in Python` - """ - - _pulls_fd = False - - @property - def pulls_fd(self) -> bool: - return self._pulls_fd - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - """ - Override to perform the decoding process. - - :param buffer: A bytes object with the data to be decoded. - :returns: A tuple of ``(bytes consumed, errcode)``. - If finished with decoding return -1 for the bytes consumed. - Err codes are from :data:`.ImageFile.ERRORS`. - """ - msg = "unavailable in base decoder" - raise NotImplementedError(msg) - - def set_as_raw( - self, data: bytes, rawmode: str | None = None, extra: tuple[Any, ...] = () - ) -> None: - """ - Convenience method to set the internal image from a stream of raw data - - :param data: Bytes to be set - :param rawmode: The rawmode to be used for the decoder. - If not specified, it will default to the mode of the image - :param extra: Extra arguments for the decoder. - :returns: None - """ - - if not rawmode: - rawmode = self.mode - d = Image._getdecoder(self.mode, "raw", rawmode, extra) - assert self.im is not None - d.setimage(self.im, self.state.extents()) - s = d.decode(data) - - if s[0] >= 0: - msg = "not enough image data" - raise ValueError(msg) - if s[1] != 0: - msg = "cannot decode image data" - raise ValueError(msg) - - -class PyEncoder(PyCodec): - """ - Python implementation of a format encoder. Override this class and - add the decoding logic in the :meth:`encode` method. - - See :ref:`Writing Your Own File Codec in Python` - """ - - _pushes_fd = False - - @property - def pushes_fd(self) -> bool: - return self._pushes_fd - - def encode(self, bufsize: int) -> tuple[int, int, bytes]: - """ - Override to perform the encoding process. - - :param bufsize: Buffer size. - :returns: A tuple of ``(bytes encoded, errcode, bytes)``. - If finished with encoding return 1 for the error code. - Err codes are from :data:`.ImageFile.ERRORS`. - """ - msg = "unavailable in base encoder" - raise NotImplementedError(msg) - - def encode_to_pyfd(self) -> tuple[int, int]: - """ - If ``pushes_fd`` is ``True``, then this method will be used, - and ``encode()`` will only be called once. - - :returns: A tuple of ``(bytes consumed, errcode)``. - Err codes are from :data:`.ImageFile.ERRORS`. - """ - if not self.pushes_fd: - return 0, -8 # bad configuration - bytes_consumed, errcode, data = self.encode(0) - if data: - assert self.fd is not None - self.fd.write(data) - return bytes_consumed, errcode - - def encode_to_file(self, fh: int, bufsize: int) -> int: - """ - :param fh: File handle. - :param bufsize: Buffer size. - - :returns: If finished successfully, return 0. - Otherwise, return an error code. Err codes are from - :data:`.ImageFile.ERRORS`. - """ - errcode = 0 - while errcode == 0: - status, errcode, buf = self.encode(bufsize) - if status > 0: - os.write(fh, buf[status:]) - return errcode diff --git a/voxvera/vendor/PIL/ImageFilter.py b/voxvera/vendor/PIL/ImageFilter.py deleted file mode 100644 index 9326eee..0000000 --- a/voxvera/vendor/PIL/ImageFilter.py +++ /dev/null @@ -1,607 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# standard filters -# -# History: -# 1995-11-27 fl Created -# 2002-06-08 fl Added rank and mode filters -# 2003-09-15 fl Fixed rank calculation in rank filter; added expand call -# -# Copyright (c) 1997-2003 by Secret Labs AB. -# Copyright (c) 1995-2002 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import abc -import functools -from collections.abc import Sequence -from typing import cast - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - from types import ModuleType - from typing import Any - - from . import _imaging - from ._typing import NumpyArray - - -class Filter(abc.ABC): - @abc.abstractmethod - def filter(self, image: _imaging.ImagingCore) -> _imaging.ImagingCore: - pass - - -class MultibandFilter(Filter): - pass - - -class BuiltinFilter(MultibandFilter): - filterargs: tuple[Any, ...] - - def filter(self, image: _imaging.ImagingCore) -> _imaging.ImagingCore: - if image.mode == "P": - msg = "cannot filter palette images" - raise ValueError(msg) - return image.filter(*self.filterargs) - - -class Kernel(BuiltinFilter): - """ - Create a convolution kernel. This only supports 3x3 and 5x5 integer and floating - point kernels. - - Kernels can only be applied to "L" and "RGB" images. - - :param size: Kernel size, given as (width, height). This must be (3,3) or (5,5). - :param kernel: A sequence containing kernel weights. The kernel will be flipped - vertically before being applied to the image. - :param scale: Scale factor. If given, the result for each pixel is divided by this - value. The default is the sum of the kernel weights. - :param offset: Offset. If given, this value is added to the result, after it has - been divided by the scale factor. - """ - - name = "Kernel" - - def __init__( - self, - size: tuple[int, int], - kernel: Sequence[float], - scale: float | None = None, - offset: float = 0, - ) -> None: - if scale is None: - # default scale is sum of kernel - scale = functools.reduce(lambda a, b: a + b, kernel) - if size[0] * size[1] != len(kernel): - msg = "not enough coefficients in kernel" - raise ValueError(msg) - self.filterargs = size, scale, offset, kernel - - -class RankFilter(Filter): - """ - Create a rank filter. The rank filter sorts all pixels in - a window of the given size, and returns the ``rank``'th value. - - :param size: The kernel size, in pixels. - :param rank: What pixel value to pick. Use 0 for a min filter, - ``size * size / 2`` for a median filter, ``size * size - 1`` - for a max filter, etc. - """ - - name = "Rank" - - def __init__(self, size: int, rank: int) -> None: - self.size = size - self.rank = rank - - def filter(self, image: _imaging.ImagingCore) -> _imaging.ImagingCore: - if image.mode == "P": - msg = "cannot filter palette images" - raise ValueError(msg) - image = image.expand(self.size // 2, self.size // 2) - return image.rankfilter(self.size, self.rank) - - -class MedianFilter(RankFilter): - """ - Create a median filter. Picks the median pixel value in a window with the - given size. - - :param size: The kernel size, in pixels. - """ - - name = "Median" - - def __init__(self, size: int = 3) -> None: - self.size = size - self.rank = size * size // 2 - - -class MinFilter(RankFilter): - """ - Create a min filter. Picks the lowest pixel value in a window with the - given size. - - :param size: The kernel size, in pixels. - """ - - name = "Min" - - def __init__(self, size: int = 3) -> None: - self.size = size - self.rank = 0 - - -class MaxFilter(RankFilter): - """ - Create a max filter. Picks the largest pixel value in a window with the - given size. - - :param size: The kernel size, in pixels. - """ - - name = "Max" - - def __init__(self, size: int = 3) -> None: - self.size = size - self.rank = size * size - 1 - - -class ModeFilter(Filter): - """ - Create a mode filter. Picks the most frequent pixel value in a box with the - given size. Pixel values that occur only once or twice are ignored; if no - pixel value occurs more than twice, the original pixel value is preserved. - - :param size: The kernel size, in pixels. - """ - - name = "Mode" - - def __init__(self, size: int = 3) -> None: - self.size = size - - def filter(self, image: _imaging.ImagingCore) -> _imaging.ImagingCore: - return image.modefilter(self.size) - - -class GaussianBlur(MultibandFilter): - """Blurs the image with a sequence of extended box filters, which - approximates a Gaussian kernel. For details on accuracy see - - - :param radius: Standard deviation of the Gaussian kernel. Either a sequence of two - numbers for x and y, or a single number for both. - """ - - name = "GaussianBlur" - - def __init__(self, radius: float | Sequence[float] = 2) -> None: - self.radius = radius - - def filter(self, image: _imaging.ImagingCore) -> _imaging.ImagingCore: - xy = self.radius - if isinstance(xy, (int, float)): - xy = (xy, xy) - if xy == (0, 0): - return image.copy() - return image.gaussian_blur(xy) - - -class BoxBlur(MultibandFilter): - """Blurs the image by setting each pixel to the average value of the pixels - in a square box extending radius pixels in each direction. - Supports float radius of arbitrary size. Uses an optimized implementation - which runs in linear time relative to the size of the image - for any radius value. - - :param radius: Size of the box in a direction. Either a sequence of two numbers for - x and y, or a single number for both. - - Radius 0 does not blur, returns an identical image. - Radius 1 takes 1 pixel in each direction, i.e. 9 pixels in total. - """ - - name = "BoxBlur" - - def __init__(self, radius: float | Sequence[float]) -> None: - xy = radius if isinstance(radius, (tuple, list)) else (radius, radius) - if xy[0] < 0 or xy[1] < 0: - msg = "radius must be >= 0" - raise ValueError(msg) - self.radius = radius - - def filter(self, image: _imaging.ImagingCore) -> _imaging.ImagingCore: - xy = self.radius - if isinstance(xy, (int, float)): - xy = (xy, xy) - if xy == (0, 0): - return image.copy() - return image.box_blur(xy) - - -class UnsharpMask(MultibandFilter): - """Unsharp mask filter. - - See Wikipedia's entry on `digital unsharp masking`_ for an explanation of - the parameters. - - :param radius: Blur Radius - :param percent: Unsharp strength, in percent - :param threshold: Threshold controls the minimum brightness change that - will be sharpened - - .. _digital unsharp masking: https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking - - """ - - name = "UnsharpMask" - - def __init__( - self, radius: float = 2, percent: int = 150, threshold: int = 3 - ) -> None: - self.radius = radius - self.percent = percent - self.threshold = threshold - - def filter(self, image: _imaging.ImagingCore) -> _imaging.ImagingCore: - return image.unsharp_mask(self.radius, self.percent, self.threshold) - - -class BLUR(BuiltinFilter): - name = "Blur" - # fmt: off - filterargs = (5, 5), 16, 0, ( - 1, 1, 1, 1, 1, - 1, 0, 0, 0, 1, - 1, 0, 0, 0, 1, - 1, 0, 0, 0, 1, - 1, 1, 1, 1, 1, - ) - # fmt: on - - -class CONTOUR(BuiltinFilter): - name = "Contour" - # fmt: off - filterargs = (3, 3), 1, 255, ( - -1, -1, -1, - -1, 8, -1, - -1, -1, -1, - ) - # fmt: on - - -class DETAIL(BuiltinFilter): - name = "Detail" - # fmt: off - filterargs = (3, 3), 6, 0, ( - 0, -1, 0, - -1, 10, -1, - 0, -1, 0, - ) - # fmt: on - - -class EDGE_ENHANCE(BuiltinFilter): - name = "Edge-enhance" - # fmt: off - filterargs = (3, 3), 2, 0, ( - -1, -1, -1, - -1, 10, -1, - -1, -1, -1, - ) - # fmt: on - - -class EDGE_ENHANCE_MORE(BuiltinFilter): - name = "Edge-enhance More" - # fmt: off - filterargs = (3, 3), 1, 0, ( - -1, -1, -1, - -1, 9, -1, - -1, -1, -1, - ) - # fmt: on - - -class EMBOSS(BuiltinFilter): - name = "Emboss" - # fmt: off - filterargs = (3, 3), 1, 128, ( - -1, 0, 0, - 0, 1, 0, - 0, 0, 0, - ) - # fmt: on - - -class FIND_EDGES(BuiltinFilter): - name = "Find Edges" - # fmt: off - filterargs = (3, 3), 1, 0, ( - -1, -1, -1, - -1, 8, -1, - -1, -1, -1, - ) - # fmt: on - - -class SHARPEN(BuiltinFilter): - name = "Sharpen" - # fmt: off - filterargs = (3, 3), 16, 0, ( - -2, -2, -2, - -2, 32, -2, - -2, -2, -2, - ) - # fmt: on - - -class SMOOTH(BuiltinFilter): - name = "Smooth" - # fmt: off - filterargs = (3, 3), 13, 0, ( - 1, 1, 1, - 1, 5, 1, - 1, 1, 1, - ) - # fmt: on - - -class SMOOTH_MORE(BuiltinFilter): - name = "Smooth More" - # fmt: off - filterargs = (5, 5), 100, 0, ( - 1, 1, 1, 1, 1, - 1, 5, 5, 5, 1, - 1, 5, 44, 5, 1, - 1, 5, 5, 5, 1, - 1, 1, 1, 1, 1, - ) - # fmt: on - - -class Color3DLUT(MultibandFilter): - """Three-dimensional color lookup table. - - Transforms 3-channel pixels using the values of the channels as coordinates - in the 3D lookup table and interpolating the nearest elements. - - This method allows you to apply almost any color transformation - in constant time by using pre-calculated decimated tables. - - .. versionadded:: 5.2.0 - - :param size: Size of the table. One int or tuple of (int, int, int). - Minimal size in any dimension is 2, maximum is 65. - :param table: Flat lookup table. A list of ``channels * size**3`` - float elements or a list of ``size**3`` channels-sized - tuples with floats. Channels are changed first, - then first dimension, then second, then third. - Value 0.0 corresponds lowest value of output, 1.0 highest. - :param channels: Number of channels in the table. Could be 3 or 4. - Default is 3. - :param target_mode: A mode for the result image. Should have not less - than ``channels`` channels. Default is ``None``, - which means that mode wouldn't be changed. - """ - - name = "Color 3D LUT" - - def __init__( - self, - size: int | tuple[int, int, int], - table: Sequence[float] | Sequence[Sequence[int]] | NumpyArray, - channels: int = 3, - target_mode: str | None = None, - **kwargs: bool, - ) -> None: - if channels not in (3, 4): - msg = "Only 3 or 4 output channels are supported" - raise ValueError(msg) - self.size = size = self._check_size(size) - self.channels = channels - self.mode = target_mode - - # Hidden flag `_copy_table=False` could be used to avoid extra copying - # of the table if the table is specially made for the constructor. - copy_table = kwargs.get("_copy_table", True) - items = size[0] * size[1] * size[2] - wrong_size = False - - numpy: ModuleType | None = None - if hasattr(table, "shape"): - try: - import numpy - except ImportError: - pass - - if numpy and isinstance(table, numpy.ndarray): - numpy_table: NumpyArray = table - if copy_table: - numpy_table = numpy_table.copy() - - if numpy_table.shape in [ - (items * channels,), - (items, channels), - (size[2], size[1], size[0], channels), - ]: - table = numpy_table.reshape(items * channels) - else: - wrong_size = True - - else: - if copy_table: - table = list(table) - - # Convert to a flat list - if table and isinstance(table[0], (list, tuple)): - raw_table = cast(Sequence[Sequence[int]], table) - flat_table: list[int] = [] - for pixel in raw_table: - if len(pixel) != channels: - msg = ( - "The elements of the table should " - f"have a length of {channels}." - ) - raise ValueError(msg) - flat_table.extend(pixel) - table = flat_table - - if wrong_size or len(table) != items * channels: - msg = ( - "The table should have either channels * size**3 float items " - "or size**3 items of channels-sized tuples with floats. " - f"Table should be: {channels}x{size[0]}x{size[1]}x{size[2]}. " - f"Actual length: {len(table)}" - ) - raise ValueError(msg) - self.table = table - - @staticmethod - def _check_size(size: Any) -> tuple[int, int, int]: - try: - _, _, _ = size - except ValueError as e: - msg = "Size should be either an integer or a tuple of three integers." - raise ValueError(msg) from e - except TypeError: - size = (size, size, size) - size = tuple(int(x) for x in size) - for size_1d in size: - if not 2 <= size_1d <= 65: - msg = "Size should be in [2, 65] range." - raise ValueError(msg) - return size - - @classmethod - def generate( - cls, - size: int | tuple[int, int, int], - callback: Callable[[float, float, float], tuple[float, ...]], - channels: int = 3, - target_mode: str | None = None, - ) -> Color3DLUT: - """Generates new LUT using provided callback. - - :param size: Size of the table. Passed to the constructor. - :param callback: Function with three parameters which correspond - three color channels. Will be called ``size**3`` - times with values from 0.0 to 1.0 and should return - a tuple with ``channels`` elements. - :param channels: The number of channels which should return callback. - :param target_mode: Passed to the constructor of the resulting - lookup table. - """ - size_1d, size_2d, size_3d = cls._check_size(size) - if channels not in (3, 4): - msg = "Only 3 or 4 output channels are supported" - raise ValueError(msg) - - table: list[float] = [0] * (size_1d * size_2d * size_3d * channels) - idx_out = 0 - for b in range(size_3d): - for g in range(size_2d): - for r in range(size_1d): - table[idx_out : idx_out + channels] = callback( - r / (size_1d - 1), g / (size_2d - 1), b / (size_3d - 1) - ) - idx_out += channels - - return cls( - (size_1d, size_2d, size_3d), - table, - channels=channels, - target_mode=target_mode, - _copy_table=False, - ) - - def transform( - self, - callback: Callable[..., tuple[float, ...]], - with_normals: bool = False, - channels: int | None = None, - target_mode: str | None = None, - ) -> Color3DLUT: - """Transforms the table values using provided callback and returns - a new LUT with altered values. - - :param callback: A function which takes old lookup table values - and returns a new set of values. The number - of arguments which function should take is - ``self.channels`` or ``3 + self.channels`` - if ``with_normals`` flag is set. - Should return a tuple of ``self.channels`` or - ``channels`` elements if it is set. - :param with_normals: If true, ``callback`` will be called with - coordinates in the color cube as the first - three arguments. Otherwise, ``callback`` - will be called only with actual color values. - :param channels: The number of channels in the resulting lookup table. - :param target_mode: Passed to the constructor of the resulting - lookup table. - """ - if channels not in (None, 3, 4): - msg = "Only 3 or 4 output channels are supported" - raise ValueError(msg) - ch_in = self.channels - ch_out = channels or ch_in - size_1d, size_2d, size_3d = self.size - - table: list[float] = [0] * (size_1d * size_2d * size_3d * ch_out) - idx_in = 0 - idx_out = 0 - for b in range(size_3d): - for g in range(size_2d): - for r in range(size_1d): - values = self.table[idx_in : idx_in + ch_in] - if with_normals: - values = callback( - r / (size_1d - 1), - g / (size_2d - 1), - b / (size_3d - 1), - *values, - ) - else: - values = callback(*values) - table[idx_out : idx_out + ch_out] = values - idx_in += ch_in - idx_out += ch_out - - return type(self)( - self.size, - table, - channels=ch_out, - target_mode=target_mode or self.mode, - _copy_table=False, - ) - - def __repr__(self) -> str: - r = [ - f"{self.__class__.__name__} from {self.table.__class__.__name__}", - "size={:d}x{:d}x{:d}".format(*self.size), - f"channels={self.channels:d}", - ] - if self.mode: - r.append(f"target_mode={self.mode}") - return "<{}>".format(" ".join(r)) - - def filter(self, image: _imaging.ImagingCore) -> _imaging.ImagingCore: - from . import Image - - return image.color_lut_3d( - self.mode or image.mode, - Image.Resampling.BILINEAR, - self.channels, - self.size, - self.table, - ) diff --git a/voxvera/vendor/PIL/ImageFont.py b/voxvera/vendor/PIL/ImageFont.py deleted file mode 100644 index d11f7bf..0000000 --- a/voxvera/vendor/PIL/ImageFont.py +++ /dev/null @@ -1,1320 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# PIL raster font management -# -# History: -# 1996-08-07 fl created (experimental) -# 1997-08-25 fl minor adjustments to handle fonts from pilfont 0.3 -# 1999-02-06 fl rewrote most font management stuff in C -# 1999-03-17 fl take pth files into account in load_path (from Richard Jones) -# 2001-02-17 fl added freetype support -# 2001-05-09 fl added TransposedFont wrapper class -# 2002-03-04 fl make sure we have a "L" or "1" font -# 2002-12-04 fl skip non-directory entries in the system path -# 2003-04-29 fl add embedded default font -# 2003-09-27 fl added support for truetype charmap encodings -# -# Todo: -# Adapt to PILFONT2 format (16-bit fonts, compressed, single file) -# -# Copyright (c) 1997-2003 by Secret Labs AB -# Copyright (c) 1996-2003 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# - -from __future__ import annotations - -import base64 -import os -import sys -import warnings -from enum import IntEnum -from io import BytesIO -from types import ModuleType -from typing import IO, Any, BinaryIO, TypedDict, cast - -from . import Image -from ._typing import StrOrBytesPath -from ._util import DeferredError, is_path - -TYPE_CHECKING = False -if TYPE_CHECKING: - from . import ImageFile - from ._imaging import ImagingFont - from ._imagingft import Font - - -class Axis(TypedDict): - minimum: int | None - default: int | None - maximum: int | None - name: bytes | None - - -class Layout(IntEnum): - BASIC = 0 - RAQM = 1 - - -MAX_STRING_LENGTH = 1_000_000 - - -core: ModuleType | DeferredError -try: - from . import _imagingft as core -except ImportError as ex: - core = DeferredError.new(ex) - - -def _string_length_check(text: str | bytes | bytearray) -> None: - if MAX_STRING_LENGTH is not None and len(text) > MAX_STRING_LENGTH: - msg = "too many characters in string" - raise ValueError(msg) - - -# FIXME: add support for pilfont2 format (see FontFile.py) - -# -------------------------------------------------------------------- -# Font metrics format: -# "PILfont" LF -# fontdescriptor LF -# (optional) key=value... LF -# "DATA" LF -# binary data: 256*10*2 bytes (dx, dy, dstbox, srcbox) -# -# To place a character, cut out srcbox and paste at dstbox, -# relative to the character position. Then move the character -# position according to dx, dy. -# -------------------------------------------------------------------- - - -class ImageFont: - """PIL font wrapper""" - - font: ImagingFont - - def _load_pilfont(self, filename: str) -> None: - with open(filename, "rb") as fp: - image: ImageFile.ImageFile | None = None - root = os.path.splitext(filename)[0] - - for ext in (".png", ".gif", ".pbm"): - if image: - image.close() - try: - fullname = root + ext - image = Image.open(fullname) - except Exception: - pass - else: - if image and image.mode in ("1", "L"): - break - else: - if image: - image.close() - - msg = f"cannot find glyph data file {root}.{{gif|pbm|png}}" - raise OSError(msg) - - self.file = fullname - - self._load_pilfont_data(fp, image) - image.close() - - def _load_pilfont_data(self, file: IO[bytes], image: Image.Image) -> None: - # check image - if image.mode not in ("1", "L"): - image.close() - - msg = "invalid font image mode" - raise TypeError(msg) - - # read PILfont header - if file.read(8) != b"PILfont\n": - image.close() - - msg = "Not a PILfont file" - raise SyntaxError(msg) - file.readline() - self.info = [] # FIXME: should be a dictionary - while True: - s = file.readline() - if not s or s == b"DATA\n": - break - self.info.append(s) - - # read PILfont metrics - data = file.read(256 * 20) - - image.load() - - self.font = Image.core.font(image.im, data) - - def getmask( - self, text: str | bytes, mode: str = "", *args: Any, **kwargs: Any - ) -> Image.core.ImagingCore: - """ - Create a bitmap for the text. - - If the font uses antialiasing, the bitmap should have mode ``L`` and use a - maximum value of 255. Otherwise, it should have mode ``1``. - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - .. versionadded:: 1.1.5 - - :return: An internal PIL storage memory instance as defined by the - :py:mod:`PIL.Image.core` interface module. - """ - _string_length_check(text) - Image._decompression_bomb_check(self.font.getsize(text)) - return self.font.getmask(text, mode) - - def getbbox( - self, text: str | bytes | bytearray, *args: Any, **kwargs: Any - ) -> tuple[int, int, int, int]: - """ - Returns bounding box (in pixels) of given text. - - .. versionadded:: 9.2.0 - - :param text: Text to render. - - :return: ``(left, top, right, bottom)`` bounding box - """ - _string_length_check(text) - width, height = self.font.getsize(text) - return 0, 0, width, height - - def getlength( - self, text: str | bytes | bytearray, *args: Any, **kwargs: Any - ) -> int: - """ - Returns length (in pixels) of given text. - This is the amount by which following text should be offset. - - .. versionadded:: 9.2.0 - """ - _string_length_check(text) - width, height = self.font.getsize(text) - return width - - -## -# Wrapper for FreeType fonts. Application code should use the -# truetype factory function to create font objects. - - -class FreeTypeFont: - """FreeType font wrapper (requires _imagingft service)""" - - font: Font - font_bytes: bytes - - def __init__( - self, - font: StrOrBytesPath | BinaryIO, - size: float = 10, - index: int = 0, - encoding: str = "", - layout_engine: Layout | None = None, - ) -> None: - # FIXME: use service provider instead - - if isinstance(core, DeferredError): - raise core.ex - - if size <= 0: - msg = f"font size must be greater than 0, not {size}" - raise ValueError(msg) - - self.path = font - self.size = size - self.index = index - self.encoding = encoding - - if layout_engine not in (Layout.BASIC, Layout.RAQM): - layout_engine = Layout.BASIC - if core.HAVE_RAQM: - layout_engine = Layout.RAQM - elif layout_engine == Layout.RAQM and not core.HAVE_RAQM: - warnings.warn( - "Raqm layout was requested, but Raqm is not available. " - "Falling back to basic layout." - ) - layout_engine = Layout.BASIC - - self.layout_engine = layout_engine - - def load_from_bytes(f: IO[bytes]) -> None: - self.font_bytes = f.read() - self.font = core.getfont( - "", size, index, encoding, self.font_bytes, layout_engine - ) - - if is_path(font): - font = os.fspath(font) - if sys.platform == "win32": - font_bytes_path = font if isinstance(font, bytes) else font.encode() - try: - font_bytes_path.decode("ascii") - except UnicodeDecodeError: - # FreeType cannot load fonts with non-ASCII characters on Windows - # So load it into memory first - with open(font, "rb") as f: - load_from_bytes(f) - return - self.font = core.getfont( - font, size, index, encoding, layout_engine=layout_engine - ) - else: - load_from_bytes(cast(IO[bytes], font)) - - def __getstate__(self) -> list[Any]: - return [self.path, self.size, self.index, self.encoding, self.layout_engine] - - def __setstate__(self, state: list[Any]) -> None: - path, size, index, encoding, layout_engine = state - FreeTypeFont.__init__(self, path, size, index, encoding, layout_engine) - - def getname(self) -> tuple[str | None, str | None]: - """ - :return: A tuple of the font family (e.g. Helvetica) and the font style - (e.g. Bold) - """ - return self.font.family, self.font.style - - def getmetrics(self) -> tuple[int, int]: - """ - :return: A tuple of the font ascent (the distance from the baseline to - the highest outline point) and descent (the distance from the - baseline to the lowest outline point, a negative value) - """ - return self.font.ascent, self.font.descent - - def getlength( - self, - text: str | bytes, - mode: str = "", - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - ) -> float: - """ - Returns length (in pixels with 1/64 precision) of given text when rendered - in font with provided direction, features, and language. - - This is the amount by which following text should be offset. - Text bounding box may extend past the length in some fonts, - e.g. when using italics or accents. - - The result is returned as a float; it is a whole number if using basic layout. - - Note that the sum of two lengths may not equal the length of a concatenated - string due to kerning. If you need to adjust for kerning, include the following - character and subtract its length. - - For example, instead of :: - - hello = font.getlength("Hello") - world = font.getlength("World") - hello_world = hello + world # not adjusted for kerning - assert hello_world == font.getlength("HelloWorld") # may fail - - use :: - - hello = font.getlength("HelloW") - font.getlength("W") # adjusted for kerning - world = font.getlength("World") - hello_world = hello + world # adjusted for kerning - assert hello_world == font.getlength("HelloWorld") # True - - or disable kerning with (requires libraqm) :: - - hello = draw.textlength("Hello", font, features=["-kern"]) - world = draw.textlength("World", font, features=["-kern"]) - hello_world = hello + world # kerning is disabled, no need to adjust - assert hello_world == draw.textlength("HelloWorld", font, features=["-kern"]) - - .. versionadded:: 8.0.0 - - :param text: Text to measure. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - :return: Either width for horizontal text, or height for vertical text. - """ - _string_length_check(text) - return self.font.getlength(text, mode, direction, features, language) / 64 - - def getbbox( - self, - text: str | bytes, - mode: str = "", - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - stroke_width: float = 0, - anchor: str | None = None, - ) -> tuple[float, float, float, float]: - """ - Returns bounding box (in pixels) of given text relative to given anchor - when rendered in font with provided direction, features, and language. - - Use :py:meth:`getlength()` to get the offset of following text with - 1/64 pixel precision. The bounding box includes extra margins for - some fonts, e.g. italics or accents. - - .. versionadded:: 8.0.0 - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - :param stroke_width: The width of the text stroke. - - :param anchor: The text anchor alignment. Determines the relative location of - the anchor to the text. The default alignment is top left, - specifically ``la`` for horizontal text and ``lt`` for - vertical text. See :ref:`text-anchors` for details. - - :return: ``(left, top, right, bottom)`` bounding box - """ - _string_length_check(text) - size, offset = self.font.getsize( - text, mode, direction, features, language, anchor - ) - left, top = offset[0] - stroke_width, offset[1] - stroke_width - width, height = size[0] + 2 * stroke_width, size[1] + 2 * stroke_width - return left, top, left + width, top + height - - def getmask( - self, - text: str | bytes, - mode: str = "", - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - stroke_width: float = 0, - anchor: str | None = None, - ink: int = 0, - start: tuple[float, float] | None = None, - ) -> Image.core.ImagingCore: - """ - Create a bitmap for the text. - - If the font uses antialiasing, the bitmap should have mode ``L`` and use a - maximum value of 255. If the font has embedded color data, the bitmap - should have mode ``RGBA``. Otherwise, it should have mode ``1``. - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - .. versionadded:: 1.1.5 - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - .. versionadded:: 6.0.0 - - :param stroke_width: The width of the text stroke. - - .. versionadded:: 6.2.0 - - :param anchor: The text anchor alignment. Determines the relative location of - the anchor to the text. The default alignment is top left, - specifically ``la`` for horizontal text and ``lt`` for - vertical text. See :ref:`text-anchors` for details. - - .. versionadded:: 8.0.0 - - :param ink: Foreground ink for rendering in RGBA mode. - - .. versionadded:: 8.0.0 - - :param start: Tuple of horizontal and vertical offset, as text may render - differently when starting at fractional coordinates. - - .. versionadded:: 9.4.0 - - :return: An internal PIL storage memory instance as defined by the - :py:mod:`PIL.Image.core` interface module. - """ - return self.getmask2( - text, - mode, - direction=direction, - features=features, - language=language, - stroke_width=stroke_width, - anchor=anchor, - ink=ink, - start=start, - )[0] - - def getmask2( - self, - text: str | bytes, - mode: str = "", - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - stroke_width: float = 0, - anchor: str | None = None, - ink: int = 0, - start: tuple[float, float] | None = None, - *args: Any, - **kwargs: Any, - ) -> tuple[Image.core.ImagingCore, tuple[int, int]]: - """ - Create a bitmap for the text. - - If the font uses antialiasing, the bitmap should have mode ``L`` and use a - maximum value of 255. If the font has embedded color data, the bitmap - should have mode ``RGBA``. Otherwise, it should have mode ``1``. - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - .. versionadded:: 1.1.5 - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - .. versionadded:: 6.0.0 - - :param stroke_width: The width of the text stroke. - - .. versionadded:: 6.2.0 - - :param anchor: The text anchor alignment. Determines the relative location of - the anchor to the text. The default alignment is top left, - specifically ``la`` for horizontal text and ``lt`` for - vertical text. See :ref:`text-anchors` for details. - - .. versionadded:: 8.0.0 - - :param ink: Foreground ink for rendering in RGBA mode. - - .. versionadded:: 8.0.0 - - :param start: Tuple of horizontal and vertical offset, as text may render - differently when starting at fractional coordinates. - - .. versionadded:: 9.4.0 - - :return: A tuple of an internal PIL storage memory instance as defined by the - :py:mod:`PIL.Image.core` interface module, and the text offset, the - gap between the starting coordinate and the first marking - """ - _string_length_check(text) - if start is None: - start = (0, 0) - - def fill(width: int, height: int) -> Image.core.ImagingCore: - size = (width, height) - Image._decompression_bomb_check(size) - return Image.core.fill("RGBA" if mode == "RGBA" else "L", size) - - return self.font.render( - text, - fill, - mode, - direction, - features, - language, - stroke_width, - kwargs.get("stroke_filled", False), - anchor, - ink, - start, - ) - - def font_variant( - self, - font: StrOrBytesPath | BinaryIO | None = None, - size: float | None = None, - index: int | None = None, - encoding: str | None = None, - layout_engine: Layout | None = None, - ) -> FreeTypeFont: - """ - Create a copy of this FreeTypeFont object, - using any specified arguments to override the settings. - - Parameters are identical to the parameters used to initialize this - object. - - :return: A FreeTypeFont object. - """ - if font is None: - try: - font = BytesIO(self.font_bytes) - except AttributeError: - font = self.path - return FreeTypeFont( - font=font, - size=self.size if size is None else size, - index=self.index if index is None else index, - encoding=self.encoding if encoding is None else encoding, - layout_engine=layout_engine or self.layout_engine, - ) - - def get_variation_names(self) -> list[bytes]: - """ - :returns: A list of the named styles in a variation font. - :exception OSError: If the font is not a variation font. - """ - names = [] - for name in self.font.getvarnames(): - name = name.replace(b"\x00", b"") - if name not in names: - names.append(name) - return names - - def set_variation_by_name(self, name: str | bytes) -> None: - """ - :param name: The name of the style. - :exception OSError: If the font is not a variation font. - """ - names = self.get_variation_names() - if not isinstance(name, bytes): - name = name.encode() - index = names.index(name) + 1 - - if index == getattr(self, "_last_variation_index", None): - # When the same name is set twice in a row, - # there is an 'unknown freetype error' - # https://savannah.nongnu.org/bugs/?56186 - return - self._last_variation_index = index - - self.font.setvarname(index) - - def get_variation_axes(self) -> list[Axis]: - """ - :returns: A list of the axes in a variation font. - :exception OSError: If the font is not a variation font. - """ - axes = self.font.getvaraxes() - for axis in axes: - if axis["name"]: - axis["name"] = axis["name"].replace(b"\x00", b"") - return axes - - def set_variation_by_axes(self, axes: list[float]) -> None: - """ - :param axes: A list of values for each axis. - :exception OSError: If the font is not a variation font. - """ - self.font.setvaraxes(axes) - - -class TransposedFont: - """Wrapper for writing rotated or mirrored text""" - - def __init__( - self, font: ImageFont | FreeTypeFont, orientation: Image.Transpose | None = None - ): - """ - Wrapper that creates a transposed font from any existing font - object. - - :param font: A font object. - :param orientation: An optional orientation. If given, this should - be one of Image.Transpose.FLIP_LEFT_RIGHT, Image.Transpose.FLIP_TOP_BOTTOM, - Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_180, or - Image.Transpose.ROTATE_270. - """ - self.font = font - self.orientation = orientation # any 'transpose' argument, or None - - def getmask( - self, text: str | bytes, mode: str = "", *args: Any, **kwargs: Any - ) -> Image.core.ImagingCore: - im = self.font.getmask(text, mode, *args, **kwargs) - if self.orientation is not None: - return im.transpose(self.orientation) - return im - - def getbbox( - self, text: str | bytes, *args: Any, **kwargs: Any - ) -> tuple[int, int, float, float]: - # TransposedFont doesn't support getmask2, move top-left point to (0, 0) - # this has no effect on ImageFont and simulates anchor="lt" for FreeTypeFont - left, top, right, bottom = self.font.getbbox(text, *args, **kwargs) - width = right - left - height = bottom - top - if self.orientation in (Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_270): - return 0, 0, height, width - return 0, 0, width, height - - def getlength(self, text: str | bytes, *args: Any, **kwargs: Any) -> float: - if self.orientation in (Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_270): - msg = "text length is undefined for text rotated by 90 or 270 degrees" - raise ValueError(msg) - return self.font.getlength(text, *args, **kwargs) - - -def load(filename: str) -> ImageFont: - """ - Load a font file. This function loads a font object from the given - bitmap font file, and returns the corresponding font object. For loading TrueType - or OpenType fonts instead, see :py:func:`~PIL.ImageFont.truetype`. - - :param filename: Name of font file. - :return: A font object. - :exception OSError: If the file could not be read. - """ - f = ImageFont() - f._load_pilfont(filename) - return f - - -def truetype( - font: StrOrBytesPath | BinaryIO, - size: float = 10, - index: int = 0, - encoding: str = "", - layout_engine: Layout | None = None, -) -> FreeTypeFont: - """ - Load a TrueType or OpenType font from a file or file-like object, - and create a font object. This function loads a font object from the given - file or file-like object, and creates a font object for a font of the given - size. For loading bitmap fonts instead, see :py:func:`~PIL.ImageFont.load` - and :py:func:`~PIL.ImageFont.load_path`. - - Pillow uses FreeType to open font files. On Windows, be aware that FreeType - will keep the file open as long as the FreeTypeFont object exists. Windows - limits the number of files that can be open in C at once to 512, so if many - fonts are opened simultaneously and that limit is approached, an - ``OSError`` may be thrown, reporting that FreeType "cannot open resource". - A workaround would be to copy the file(s) into memory, and open that instead. - - This function requires the _imagingft service. - - :param font: A filename or file-like object containing a TrueType font. - If the file is not found in this filename, the loader may also - search in other directories, such as: - - * The :file:`fonts/` directory on Windows, - * :file:`/Library/Fonts/`, :file:`/System/Library/Fonts/` - and :file:`~/Library/Fonts/` on macOS. - * :file:`~/.local/share/fonts`, :file:`/usr/local/share/fonts`, - and :file:`/usr/share/fonts` on Linux; or those specified by - the ``XDG_DATA_HOME`` and ``XDG_DATA_DIRS`` environment variables - for user-installed and system-wide fonts, respectively. - - :param size: The requested size, in pixels. - :param index: Which font face to load (default is first available face). - :param encoding: Which font encoding to use (default is Unicode). Possible - encodings include (see the FreeType documentation for more - information): - - * "unic" (Unicode) - * "symb" (Microsoft Symbol) - * "ADOB" (Adobe Standard) - * "ADBE" (Adobe Expert) - * "ADBC" (Adobe Custom) - * "armn" (Apple Roman) - * "sjis" (Shift JIS) - * "gb " (PRC) - * "big5" - * "wans" (Extended Wansung) - * "joha" (Johab) - * "lat1" (Latin-1) - - This specifies the character set to use. It does not alter the - encoding of any text provided in subsequent operations. - :param layout_engine: Which layout engine to use, if available: - :attr:`.ImageFont.Layout.BASIC` or :attr:`.ImageFont.Layout.RAQM`. - If it is available, Raqm layout will be used by default. - Otherwise, basic layout will be used. - - Raqm layout is recommended for all non-English text. If Raqm layout - is not required, basic layout will have better performance. - - You can check support for Raqm layout using - :py:func:`PIL.features.check_feature` with ``feature="raqm"``. - - .. versionadded:: 4.2.0 - :return: A font object. - :exception OSError: If the file could not be read. - :exception ValueError: If the font size is not greater than zero. - """ - - def freetype(font: StrOrBytesPath | BinaryIO) -> FreeTypeFont: - return FreeTypeFont(font, size, index, encoding, layout_engine) - - try: - return freetype(font) - except OSError: - if not is_path(font): - raise - ttf_filename = os.path.basename(font) - - dirs = [] - if sys.platform == "win32": - # check the windows font repository - # NOTE: must use uppercase WINDIR, to work around bugs in - # 1.5.2's os.environ.get() - windir = os.environ.get("WINDIR") - if windir: - dirs.append(os.path.join(windir, "fonts")) - elif sys.platform in ("linux", "linux2"): - data_home = os.environ.get("XDG_DATA_HOME") - if not data_home: - # The freedesktop spec defines the following default directory for - # when XDG_DATA_HOME is unset or empty. This user-level directory - # takes precedence over system-level directories. - data_home = os.path.expanduser("~/.local/share") - xdg_dirs = [data_home] - - data_dirs = os.environ.get("XDG_DATA_DIRS") - if not data_dirs: - # Similarly, defaults are defined for the system-level directories - data_dirs = "/usr/local/share:/usr/share" - xdg_dirs += data_dirs.split(":") - - dirs += [os.path.join(xdg_dir, "fonts") for xdg_dir in xdg_dirs] - elif sys.platform == "darwin": - dirs += [ - "/Library/Fonts", - "/System/Library/Fonts", - os.path.expanduser("~/Library/Fonts"), - ] - - ext = os.path.splitext(ttf_filename)[1] - first_font_with_a_different_extension = None - for directory in dirs: - for walkroot, walkdir, walkfilenames in os.walk(directory): - for walkfilename in walkfilenames: - if ext and walkfilename == ttf_filename: - return freetype(os.path.join(walkroot, walkfilename)) - elif not ext and os.path.splitext(walkfilename)[0] == ttf_filename: - fontpath = os.path.join(walkroot, walkfilename) - if os.path.splitext(fontpath)[1] == ".ttf": - return freetype(fontpath) - if not ext and first_font_with_a_different_extension is None: - first_font_with_a_different_extension = fontpath - if first_font_with_a_different_extension: - return freetype(first_font_with_a_different_extension) - raise - - -def load_path(filename: str | bytes) -> ImageFont: - """ - Load font file. Same as :py:func:`~PIL.ImageFont.load`, but searches for a - bitmap font along the Python path. - - :param filename: Name of font file. - :return: A font object. - :exception OSError: If the file could not be read. - """ - if not isinstance(filename, str): - filename = filename.decode("utf-8") - for directory in sys.path: - try: - return load(os.path.join(directory, filename)) - except OSError: - pass - msg = f'cannot find font file "{filename}" in sys.path' - if os.path.exists(filename): - msg += f', did you mean ImageFont.load("{filename}") instead?' - - raise OSError(msg) - - -def load_default_imagefont() -> ImageFont: - f = ImageFont() - f._load_pilfont_data( - # courB08 - BytesIO( - base64.b64decode( - b""" -UElMZm9udAo7Ozs7OzsxMDsKREFUQQoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAA//8AAQAAAAAAAAABAAEA -BgAAAAH/+gADAAAAAQAAAAMABgAGAAAAAf/6AAT//QADAAAABgADAAYAAAAA//kABQABAAYAAAAL -AAgABgAAAAD/+AAFAAEACwAAABAACQAGAAAAAP/5AAUAAAAQAAAAFQAHAAYAAP////oABQAAABUA -AAAbAAYABgAAAAH/+QAE//wAGwAAAB4AAwAGAAAAAf/5AAQAAQAeAAAAIQAIAAYAAAAB//kABAAB -ACEAAAAkAAgABgAAAAD/+QAE//0AJAAAACgABAAGAAAAAP/6AAX//wAoAAAALQAFAAYAAAAB//8A -BAACAC0AAAAwAAMABgAAAAD//AAF//0AMAAAADUAAQAGAAAAAf//AAMAAAA1AAAANwABAAYAAAAB -//kABQABADcAAAA7AAgABgAAAAD/+QAFAAAAOwAAAEAABwAGAAAAAP/5AAYAAABAAAAARgAHAAYA -AAAA//kABQAAAEYAAABLAAcABgAAAAD/+QAFAAAASwAAAFAABwAGAAAAAP/5AAYAAABQAAAAVgAH -AAYAAAAA//kABQAAAFYAAABbAAcABgAAAAD/+QAFAAAAWwAAAGAABwAGAAAAAP/5AAUAAABgAAAA -ZQAHAAYAAAAA//kABQAAAGUAAABqAAcABgAAAAD/+QAFAAAAagAAAG8ABwAGAAAAAf/8AAMAAABv -AAAAcQAEAAYAAAAA//wAAwACAHEAAAB0AAYABgAAAAD/+gAE//8AdAAAAHgABQAGAAAAAP/7AAT/ -/gB4AAAAfAADAAYAAAAB//oABf//AHwAAACAAAUABgAAAAD/+gAFAAAAgAAAAIUABgAGAAAAAP/5 -AAYAAQCFAAAAiwAIAAYAAP////oABgAAAIsAAACSAAYABgAA////+gAFAAAAkgAAAJgABgAGAAAA -AP/6AAUAAACYAAAAnQAGAAYAAP////oABQAAAJ0AAACjAAYABgAA////+gAFAAAAowAAAKkABgAG -AAD////6AAUAAACpAAAArwAGAAYAAAAA//oABQAAAK8AAAC0AAYABgAA////+gAGAAAAtAAAALsA -BgAGAAAAAP/6AAQAAAC7AAAAvwAGAAYAAP////oABQAAAL8AAADFAAYABgAA////+gAGAAAAxQAA -AMwABgAGAAD////6AAUAAADMAAAA0gAGAAYAAP////oABQAAANIAAADYAAYABgAA////+gAGAAAA -2AAAAN8ABgAGAAAAAP/6AAUAAADfAAAA5AAGAAYAAP////oABQAAAOQAAADqAAYABgAAAAD/+gAF -AAEA6gAAAO8ABwAGAAD////6AAYAAADvAAAA9gAGAAYAAAAA//oABQAAAPYAAAD7AAYABgAA//// -+gAFAAAA+wAAAQEABgAGAAD////6AAYAAAEBAAABCAAGAAYAAP////oABgAAAQgAAAEPAAYABgAA -////+gAGAAABDwAAARYABgAGAAAAAP/6AAYAAAEWAAABHAAGAAYAAP////oABgAAARwAAAEjAAYA -BgAAAAD/+gAFAAABIwAAASgABgAGAAAAAf/5AAQAAQEoAAABKwAIAAYAAAAA//kABAABASsAAAEv -AAgABgAAAAH/+QAEAAEBLwAAATIACAAGAAAAAP/5AAX//AEyAAABNwADAAYAAAAAAAEABgACATcA -AAE9AAEABgAAAAH/+QAE//wBPQAAAUAAAwAGAAAAAP/7AAYAAAFAAAABRgAFAAYAAP////kABQAA -AUYAAAFMAAcABgAAAAD/+wAFAAABTAAAAVEABQAGAAAAAP/5AAYAAAFRAAABVwAHAAYAAAAA//sA -BQAAAVcAAAFcAAUABgAAAAD/+QAFAAABXAAAAWEABwAGAAAAAP/7AAYAAgFhAAABZwAHAAYAAP// -//kABQAAAWcAAAFtAAcABgAAAAD/+QAGAAABbQAAAXMABwAGAAAAAP/5AAQAAgFzAAABdwAJAAYA -AP////kABgAAAXcAAAF+AAcABgAAAAD/+QAGAAABfgAAAYQABwAGAAD////7AAUAAAGEAAABigAF -AAYAAP////sABQAAAYoAAAGQAAUABgAAAAD/+wAFAAABkAAAAZUABQAGAAD////7AAUAAgGVAAAB -mwAHAAYAAAAA//sABgACAZsAAAGhAAcABgAAAAD/+wAGAAABoQAAAacABQAGAAAAAP/7AAYAAAGn -AAABrQAFAAYAAAAA//kABgAAAa0AAAGzAAcABgAA////+wAGAAABswAAAboABQAGAAD////7AAUA -AAG6AAABwAAFAAYAAP////sABgAAAcAAAAHHAAUABgAAAAD/+wAGAAABxwAAAc0ABQAGAAD////7 -AAYAAgHNAAAB1AAHAAYAAAAA//sABQAAAdQAAAHZAAUABgAAAAH/+QAFAAEB2QAAAd0ACAAGAAAA -Av/6AAMAAQHdAAAB3gAHAAYAAAAA//kABAABAd4AAAHiAAgABgAAAAD/+wAF//0B4gAAAecAAgAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAB -//sAAwACAecAAAHpAAcABgAAAAD/+QAFAAEB6QAAAe4ACAAGAAAAAP/5AAYAAAHuAAAB9AAHAAYA -AAAA//oABf//AfQAAAH5AAUABgAAAAD/+QAGAAAB+QAAAf8ABwAGAAAAAv/5AAMAAgH/AAACAAAJ -AAYAAAAA//kABQABAgAAAAIFAAgABgAAAAH/+gAE//sCBQAAAggAAQAGAAAAAP/5AAYAAAIIAAAC -DgAHAAYAAAAB//kABf/+Ag4AAAISAAUABgAA////+wAGAAACEgAAAhkABQAGAAAAAP/7AAX//gIZ -AAACHgADAAYAAAAA//wABf/9Ah4AAAIjAAEABgAAAAD/+QAHAAACIwAAAioABwAGAAAAAP/6AAT/ -+wIqAAACLgABAAYAAAAA//kABP/8Ai4AAAIyAAMABgAAAAD/+gAFAAACMgAAAjcABgAGAAAAAf/5 -AAT//QI3AAACOgAEAAYAAAAB//kABP/9AjoAAAI9AAQABgAAAAL/+QAE//sCPQAAAj8AAgAGAAD/ -///7AAYAAgI/AAACRgAHAAYAAAAA//kABgABAkYAAAJMAAgABgAAAAH//AAD//0CTAAAAk4AAQAG -AAAAAf//AAQAAgJOAAACUQADAAYAAAAB//kABP/9AlEAAAJUAAQABgAAAAH/+QAF//4CVAAAAlgA -BQAGAAD////7AAYAAAJYAAACXwAFAAYAAP////kABgAAAl8AAAJmAAcABgAA////+QAGAAACZgAA -Am0ABwAGAAD////5AAYAAAJtAAACdAAHAAYAAAAA//sABQACAnQAAAJ5AAcABgAA////9wAGAAAC -eQAAAoAACQAGAAD////3AAYAAAKAAAAChwAJAAYAAP////cABgAAAocAAAKOAAkABgAA////9wAG -AAACjgAAApUACQAGAAD////4AAYAAAKVAAACnAAIAAYAAP////cABgAAApwAAAKjAAkABgAA//// -+gAGAAACowAAAqoABgAGAAAAAP/6AAUAAgKqAAACrwAIAAYAAP////cABQAAAq8AAAK1AAkABgAA -////9wAFAAACtQAAArsACQAGAAD////3AAUAAAK7AAACwQAJAAYAAP////gABQAAAsEAAALHAAgA -BgAAAAD/9wAEAAACxwAAAssACQAGAAAAAP/3AAQAAALLAAACzwAJAAYAAAAA//cABAAAAs8AAALT -AAkABgAAAAD/+AAEAAAC0wAAAtcACAAGAAD////6AAUAAALXAAAC3QAGAAYAAP////cABgAAAt0A -AALkAAkABgAAAAD/9wAFAAAC5AAAAukACQAGAAAAAP/3AAUAAALpAAAC7gAJAAYAAAAA//cABQAA -Au4AAALzAAkABgAAAAD/9wAFAAAC8wAAAvgACQAGAAAAAP/4AAUAAAL4AAAC/QAIAAYAAAAA//oA -Bf//Av0AAAMCAAUABgAA////+gAGAAADAgAAAwkABgAGAAD////3AAYAAAMJAAADEAAJAAYAAP// -//cABgAAAxAAAAMXAAkABgAA////9wAGAAADFwAAAx4ACQAGAAD////4AAYAAAAAAAoABwASAAYA -AP////cABgAAAAcACgAOABMABgAA////+gAFAAAADgAKABQAEAAGAAD////6AAYAAAAUAAoAGwAQ -AAYAAAAA//gABgAAABsACgAhABIABgAAAAD/+AAGAAAAIQAKACcAEgAGAAAAAP/4AAYAAAAnAAoA -LQASAAYAAAAA//gABgAAAC0ACgAzABIABgAAAAD/+QAGAAAAMwAKADkAEQAGAAAAAP/3AAYAAAA5 -AAoAPwATAAYAAP////sABQAAAD8ACgBFAA8ABgAAAAD/+wAFAAIARQAKAEoAEQAGAAAAAP/4AAUA -AABKAAoATwASAAYAAAAA//gABQAAAE8ACgBUABIABgAAAAD/+AAFAAAAVAAKAFkAEgAGAAAAAP/5 -AAUAAABZAAoAXgARAAYAAAAA//gABgAAAF4ACgBkABIABgAAAAD/+AAGAAAAZAAKAGoAEgAGAAAA -AP/4AAYAAABqAAoAcAASAAYAAAAA//kABgAAAHAACgB2ABEABgAAAAD/+AAFAAAAdgAKAHsAEgAG -AAD////4AAYAAAB7AAoAggASAAYAAAAA//gABQAAAIIACgCHABIABgAAAAD/+AAFAAAAhwAKAIwA -EgAGAAAAAP/4AAUAAACMAAoAkQASAAYAAAAA//gABQAAAJEACgCWABIABgAAAAD/+QAFAAAAlgAK -AJsAEQAGAAAAAP/6AAX//wCbAAoAoAAPAAYAAAAA//oABQABAKAACgClABEABgAA////+AAGAAAA -pQAKAKwAEgAGAAD////4AAYAAACsAAoAswASAAYAAP////gABgAAALMACgC6ABIABgAA////+QAG -AAAAugAKAMEAEQAGAAD////4AAYAAgDBAAoAyAAUAAYAAP////kABQACAMgACgDOABMABgAA//// -+QAGAAIAzgAKANUAEw== -""" - ) - ), - Image.open( - BytesIO( - base64.b64decode( - b""" -iVBORw0KGgoAAAANSUhEUgAAAx4AAAAUAQAAAAArMtZoAAAEwElEQVR4nABlAJr/AHVE4czCI/4u -Mc4b7vuds/xzjz5/3/7u/n9vMe7vnfH/9++vPn/xyf5zhxzjt8GHw8+2d83u8x27199/nxuQ6Od9 -M43/5z2I+9n9ZtmDBwMQECDRQw/eQIQohJXxpBCNVE6QCCAAAAD//wBlAJr/AgALyj1t/wINwq0g -LeNZUworuN1cjTPIzrTX6ofHWeo3v336qPzfEwRmBnHTtf95/fglZK5N0PDgfRTslpGBvz7LFc4F -IUXBWQGjQ5MGCx34EDFPwXiY4YbYxavpnhHFrk14CDAAAAD//wBlAJr/AgKqRooH2gAgPeggvUAA -Bu2WfgPoAwzRAABAAAAAAACQgLz/3Uv4Gv+gX7BJgDeeGP6AAAD1NMDzKHD7ANWr3loYbxsAD791 -NAADfcoIDyP44K/jv4Y63/Z+t98Ovt+ub4T48LAAAAD//wBlAJr/AuplMlADJAAAAGuAphWpqhMx -in0A/fRvAYBABPgBwBUgABBQ/sYAyv9g0bCHgOLoGAAAAAAAREAAwI7nr0ArYpow7aX8//9LaP/9 -SjdavWA8ePHeBIKB//81/83ndznOaXx379wAAAD//wBlAJr/AqDxW+D3AABAAbUh/QMnbQag/gAY -AYDAAACgtgD/gOqAAAB5IA/8AAAk+n9w0AAA8AAAmFRJuPo27ciC0cD5oeW4E7KA/wD3ECMAn2tt -y8PgwH8AfAxFzC0JzeAMtratAsC/ffwAAAD//wBlAJr/BGKAyCAA4AAAAvgeYTAwHd1kmQF5chkG -ABoMIHcL5xVpTfQbUqzlAAAErwAQBgAAEOClA5D9il08AEh/tUzdCBsXkbgACED+woQg8Si9VeqY -lODCn7lmF6NhnAEYgAAA/NMIAAAAAAD//2JgjLZgVGBg5Pv/Tvpc8hwGBjYGJADjHDrAwPzAjv/H -/Wf3PzCwtzcwHmBgYGcwbZz8wHaCAQMDOwMDQ8MCBgYOC3W7mp+f0w+wHOYxO3OG+e376hsMZjk3 -AAAAAP//YmCMY2A4wMAIN5e5gQETPD6AZisDAwMDgzSDAAPjByiHcQMDAwMDg1nOze1lByRu5/47 -c4859311AYNZzg0AAAAA//9iYGDBYihOIIMuwIjGL39/fwffA8b//xv/P2BPtzzHwCBjUQAAAAD/ -/yLFBrIBAAAA//9i1HhcwdhizX7u8NZNzyLbvT97bfrMf/QHI8evOwcSqGUJAAAA//9iYBB81iSw -pEE170Qrg5MIYydHqwdDQRMrAwcVrQAAAAD//2J4x7j9AAMDn8Q/BgYLBoaiAwwMjPdvMDBYM1Tv -oJodAAAAAP//Yqo/83+dxePWlxl3npsel9lvLfPcqlE9725C+acfVLMEAAAA//9i+s9gwCoaaGMR -evta/58PTEWzr21hufPjA8N+qlnBwAAAAAD//2JiWLci5v1+HmFXDqcnULE/MxgYGBj+f6CaJQAA -AAD//2Ji2FrkY3iYpYC5qDeGgeEMAwPDvwQBBoYvcTwOVLMEAAAA//9isDBgkP///0EOg9z35v// -Gc/eeW7BwPj5+QGZhANUswMAAAD//2JgqGBgYGBgqEMXlvhMPUsAAAAA//8iYDd1AAAAAP//AwDR -w7IkEbzhVQAAAABJRU5ErkJggg== -""" - ) - ) - ), - ) - return f - - -def load_default(size: float | None = None) -> FreeTypeFont | ImageFont: - """If FreeType support is available, load a version of Aileron Regular, - https://dotcolon.net/fonts/aileron, with a more limited character set. - - Otherwise, load a "better than nothing" font. - - .. versionadded:: 1.1.4 - - :param size: The font size of Aileron Regular. - - .. versionadded:: 10.1.0 - - :return: A font object. - """ - if isinstance(core, ModuleType) or size is not None: - return truetype( - BytesIO( - base64.b64decode( - b""" -AAEAAAAPAIAAAwBwRkZUTYwDlUAAADFoAAAAHEdERUYAqADnAAAo8AAAACRHUE9ThhmITwAAKfgAA -AduR1NVQnHxefoAACkUAAAA4k9TLzJovoHLAAABeAAAAGBjbWFw5lFQMQAAA6gAAAGqZ2FzcP//AA -MAACjoAAAACGdseWYmRXoPAAAGQAAAHfhoZWFkE18ayQAAAPwAAAA2aGhlYQboArEAAAE0AAAAJGh -tdHjjERZ8AAAB2AAAAdBsb2NhuOexrgAABVQAAADqbWF4cAC7AEYAAAFYAAAAIG5hbWUr+h5lAAAk -OAAAA6Jwb3N0D3oPTQAAJ9wAAAEKAAEAAAABGhxJDqIhXw889QALA+gAAAAA0Bqf2QAAAADhCh2h/ -2r/LgOxAyAAAAAIAAIAAAAAAAAAAQAAA8r/GgAAA7j/av9qA7EAAQAAAAAAAAAAAAAAAAAAAHQAAQ -AAAHQAQwAFAAAAAAACAAAAAQABAAAAQAAAAAAAAAADAfoBkAAFAAgCigJYAAAASwKKAlgAAAFeADI -BPgAAAAAFAAAAAAAAAAAAAAcAAAAAAAAAAAAAAABVS1dOAEAAIPsCAwL/GgDIA8oA5iAAAJMAAAAA -AhICsgAAACAAAwH0AAAAAAAAAU0AAADYAAAA8gA5AVMAVgJEAEYCRAA1AuQAKQKOAEAAsAArATsAZ -AE7AB4CMABVAkQAUADc/+EBEgAgANwAJQEv//sCRAApAkQAggJEADwCRAAtAkQAIQJEADkCRAArAk -QAMgJEACwCRAAxANwAJQDc/+ECRABnAkQAUAJEAEQB8wAjA1QANgJ/AB0CcwBkArsALwLFAGQCSwB -kAjcAZALGAC8C2gBkAQgAZAIgADcCYQBkAj8AZANiAGQCzgBkAuEALwJWAGQC3QAvAmsAZAJJADQC -ZAAiAqoAXgJuACADuAAaAnEAGQJFABMCTwAuATMAYgEv//sBJwAiAkQAUAH0ADIBLAApAhMAJAJjA -EoCEQAeAmcAHgIlAB4BIgAVAmcAHgJRAEoA7gA+AOn/8wIKAEoA9wBGA1cASgJRAEoCSgAeAmMASg -JnAB4BSgBKAcsAGAE5ABQCUABCAgIAAQMRAAEB4v/6AgEAAQHOABQBLwBAAPoAYAEvACECRABNA0Y -AJAItAHgBKgAcAkQAUAEsAHQAygAgAi0AOQD3ADYA9wAWAaEANgGhABYCbAAlAYMAeAGDADkA6/9q -AhsAFAIKABUB/QAVAAAAAwAAAAMAAAAcAAEAAAAAAKQAAwABAAAAHAAEAIgAAAAeABAAAwAOAH4Aq -QCrALEAtAC3ALsgGSAdICYgOiBEISL7Av//AAAAIACpAKsAsAC0ALcAuyAYIBwgJiA5IEQhIvsB// -//4/+5/7j/tP+y/7D/reBR4E/gR+A14CzfTwVxAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAMEBQYHCAkKCwwNDg8QERIT -FBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMT -U5PUFFSU1RVVldYWVpbXF1eX2BhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQAAA -AAAAAAYnFmAAAAAABlAAAAAAAAAAAAAAAAAAAAAAAAAAAAY2htAAAAAAAAAABrbGlqAAAAAHAAbm9 -ycwBnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmACYAJgAmAD4AUgCCAMoBCgFO -AVwBcgGIAaYBvAHKAdYB6AH2AgwCIAJKAogCpgLWAw4DIgNkA5wDugPUA+gD/AQQBEYEogS8BPoFJ -gVSBWoFgAWwBcoF1gX6BhQGJAZMBmgGiga0BuIHGgdUB2YHkAeiB8AH3AfyCAoIHAgqCDoITghcCG -oIogjSCPoJKglYCXwJwgnqCgIKKApACl4Klgq8CtwLDAs8C1YLjAuyC9oL7gwMDCYMSAxgDKAMrAz -qDQoNTA1mDYQNoA2uDcAN2g3oDfYODA4iDkoOXA5sDnoOnA7EDvwAAAAFAAAAAAH0ArwAAwAGAAkA -DAAPAAAxESERAxMhExcRASELARETAfT6qv6syKr+jgFUqsiqArz9RAGLAP/+1P8B/v3VAP8BLP4CA -P8AAgA5//IAuQKyAAMACwAANyMDMwIyFhQGIiY0oE4MZk84JCQ4JLQB/v3AJDgkJDgAAgBWAeUBPA -LfAAMABwAAEyMnMxcjJzOmRgpagkYKWgHl+vr6AAAAAAIARgAAAf4CsgAbAB8AAAEHMxUjByM3Iwc -jNyM1MzcjNTM3MwczNzMHMxUrAQczAZgdZXEvOi9bLzovWmYdZXEvOi9bLzovWp9bHlsBn4w429vb -2ziMONvb29s4jAAAAAMANf+mAg4DDAAfACYALAAAJRQGBxUjNS4BJzMeARcRLgE0Njc1MxUeARcjJ -icVHgEBFBYXNQ4BExU+ATU0Ag5xWDpgcgRcBz41Xl9oVTpVYwpcC1ttXP6cLTQuM5szOrVRZwlOTQ -ZqVzZECAEAGlukZAlOTQdrUG8O7iNlAQgxNhDlCDj+8/YGOjReAAAAAAUAKf/yArsCvAAHAAsAFQA -dACcAABIyFhQGIiY0EyMBMwQiBhUUFjI2NTQSMhYUBiImNDYiBhUUFjI2NTR5iFBQiFCVVwHAV/5c -OiMjOiPmiFBQiFCxOiMjOiMCvFaSVlaS/ZoCsjIzMC80NC8w/uNWklZWkhozMC80NC8wAAAAAgBA/ -/ICbgLAACIALgAAARUjEQYjIiY1NDY3LgE1NDYzMhcVJiMiBhUUFhcWOwE1MxUFFBYzMjc1IyIHDg -ECbmBcYYOOVkg7R4hsQjY4Q0RNRD4SLDxW/pJUXzksPCkUUk0BgUb+zBVUZ0BkDw5RO1huCkULQzp -COAMBcHDHRz0J/AIHRQAAAAEAKwHlAIUC3wADAAATIycze0YKWgHl+gAAAAABAGT/sAEXAwwACQAA -EzMGEBcjLgE0Nt06dXU6OUBAAwzG/jDGVePs4wAAAAEAHv+wANEDDAAJAAATMx4BFAYHIzYQHjo5Q -EA5OnUDDFXj7ONVxgHQAAAAAQBVAFIB2wHbAA4AAAE3FwcXBycHJzcnNxcnMwEtmxOfcTJjYzJxnx -ObCj4BKD07KYolmZkliik7PbMAAQBQAFUB9AIlAAsAAAEjFSM1IzUzNTMVMwH0tTq1tTq1AR/Kyjj -OzgAAAAAB/+H/iACMAGQABAAANwcjNzOMWlFOXVrS3AAAAQAgAP8A8gE3AAMAABMjNTPy0tIA/zgA -AQAl//IApQByAAcAADYyFhQGIiY0STgkJDgkciQ4JCQ4AAAAAf/7/+IBNALQAAMAABcjEzM5Pvs+H -gLuAAAAAAIAKf/yAhsCwAADAAcAABIgECA2IBAgKQHy/g5gATL+zgLA/TJEAkYAAAAAAQCCAAABlg -KyAAgAAAERIxEHNTc2MwGWVr6SIygCsv1OAldxW1sWAAEAPAAAAg4CwAAZAAA3IRUhNRM+ATU0JiM -iDwEjNz4BMzIWFRQGB7kBUv4x+kI2QTt+EAFWAQp8aGVtSl5GRjEA/0RVLzlLmAoKa3FsUkNxXQAA -AAEALf/yAhYCwAAqAAABHgEVFAYjIi8BMxceATMyNjU0KwE1MzI2NTQmIyIGDwEjNz4BMzIWFRQGA -YxBSZJo2RUBVgEHV0JBUaQREUBUQzc5TQcBVgEKfGhfcEMBbxJbQl1x0AoKRkZHPn9GSD80QUVCCg -pfbGBPOlgAAAACACEAAAIkArIACgAPAAAlIxUjNSE1ATMRMyMRBg8BAiRXVv6qAVZWV60dHLCurq4 -rAdn+QgFLMibzAAABADn/8gIZArIAHQAAATIWFRQGIyIvATMXFjMyNjU0JiMiByMTIRUhBzc2ATNv -d5Fl1RQBVgIad0VSTkVhL1IwAYj+vh8rMAHHgGdtgcUKCoFXTU5bYgGRRvAuHQAAAAACACv/8gITA -sAAFwAjAAABMhYVFAYjIhE0NjMyFh8BIycmIyIDNzYTMjY1NCYjIgYVFBYBLmp7imr0l3RZdAgBXA -IYZ5wKJzU6QVNJSz5SUAHSgWltiQFGxcNlVQoKdv7sPiz+ZF1LTmJbU0lhAAAAAQAyAAACGgKyAAY -AAAEVASMBITUCGv6oXAFL/oECsij9dgJsRgAAAAMALP/xAhgCwAAWACAALAAAAR4BFRQGIyImNTQ2 -Ny4BNTQ2MhYVFAYmIgYVFBYyNjU0AzI2NTQmIyIGFRQWAZQ5S5BmbIpPOjA7ecp5P2F8Q0J8RIVJS -0pLTEtOAW0TXTxpZ2ZqPF0SE1A3VWVlVTdQ/UU0N0RENzT9/ko+Ok1NOj1LAAIAMf/yAhkCwAAXAC -MAAAEyERQGIyImLwEzFxYzMhMHBiMiJjU0NhMyNjU0JiMiBhUUFgEl9Jd0WXQIAVwCGGecCic1SWp -7imo+UlBAQVNJAsD+usXDZVUKCnYBFD4sgWltif5kW1NJYV1LTmIAAAACACX/8gClAiAABwAPAAAS -MhYUBiImNBIyFhQGIiY0STgkJDgkJDgkJDgkAiAkOCQkOP52JDgkJDgAAAAC/+H/iAClAiAABwAMA -AASMhYUBiImNBMHIzczSTgkJDgkaFpSTl4CICQ4JCQ4/mba5gAAAQBnAB4B+AH0AAYAAAENARUlNS -UB+P6qAVb+bwGRAbCmpkbJRMkAAAIAUAC7AfQBuwADAAcAAAEhNSERITUhAfT+XAGk/lwBpAGDOP8 -AOAABAEQAHgHVAfQABgAAARUFNS0BNQHV/m8BVv6qAStEyUSmpkYAAAAAAgAj//IB1ALAABgAIAAA -ATIWFRQHDgEHIz4BNz4BNTQmIyIGByM+ARIyFhQGIiY0AQRibmktIAJWBSEqNig+NTlHBFoDezQ4J -CQ4JALAZ1BjaS03JS1DMD5LLDQ/SUVgcv2yJDgkJDgAAAAAAgA2/5gDFgKYADYAQgAAAQMGFRQzMj -Y1NCYjIg4CFRQWMzI2NxcGIyImNTQ+AjMyFhUUBiMiJwcGIyImNTQ2MzIfATcHNzYmIyIGFRQzMjY -Cej8EJjJJlnBAfGQ+oHtAhjUYg5OPx0h2k06Os3xRWQsVLjY5VHtdPBwJETcJDyUoOkZEJz8B0f74 -EQ8kZl6EkTFZjVOLlyknMVm1pmCiaTq4lX6CSCknTVRmmR8wPdYnQzxuSWVGAAIAHQAAAncCsgAHA -AoAACUjByMTMxMjATMDAcj+UVz4dO5d/sjPZPT0ArL9TgE6ATQAAAADAGQAAAJMArIAEAAbACcAAA -EeARUUBgcGKwERMzIXFhUUJRUzMjc2NTQnJiMTPgE1NCcmKwEVMzIBvkdHZkwiNt7LOSGq/oeFHBt -hahIlSTM+cB8Yj5UWAW8QT0VYYgwFArIEF5Fv1eMED2NfDAL93AU+N24PBP0AAAAAAQAv//ICjwLA -ABsAAAEyFh8BIycmIyIGFRQWMzI/ATMHDgEjIiY1NDYBdX+PCwFWAiKiaHx5ZaIiAlYBCpWBk6a0A -sCAagoKpqN/gaOmCgplhcicn8sAAAIAZAAAAp8CsgAMABkAAAEeARUUBgcGKwERMzITPgE1NCYnJi -sBETMyAY59lJp8IzXN0jUVWmdjWRs5d3I4Aq4QqJWUug8EArL9mQ+PeHGHDgX92gAAAAABAGQAAAI -vArIACwAAJRUhESEVIRUhFSEVAi/+NQHB/pUBTf6zRkYCskbwRvAAAAABAGQAAAIlArIACQAAExUh -FSERIxEhFboBQ/69VgHBAmzwRv7KArJGAAAAAAEAL//yAo8CwAAfAAABMxEjNQcGIyImNTQ2MzIWH -wEjJyYjIgYVFBYzMjY1IwGP90wfPnWTprSSf48LAVYCIqJofHllVG+hAU3+s3hARsicn8uAagoKpq -N/gaN1XAAAAAEAZAAAAowCsgALAAABESMRIREjETMRIRECjFb+hFZWAXwCsv1OAS7+0gKy/sQBPAA -AAAABAGQAAAC6ArIAAwAAMyMRM7pWVgKyAAABADf/8gHoArIAEwAAAREUBw4BIyImLwEzFxYzMjc2 -NREB6AIFcGpgbQIBVgIHfXQKAQKy/lYxIltob2EpKYyEFD0BpwAAAAABAGQAAAJ0ArIACwAACQEjA -wcVIxEzEQEzATsBJ3ntQlZWAVVlAWH+nwEnR+ACsv6RAW8AAQBkAAACLwKyAAUAACUVIREzEQIv/j -VWRkYCsv2UAAABAGQAAAMUArIAFAAAAREjETQ3BgcDIwMmJxYVESMRMxsBAxRWAiMxemx8NxsCVo7 -MywKy/U4BY7ZLco7+nAFmoFxLtP6dArL9lwJpAAAAAAEAZAAAAoACsgANAAAhIwEWFREjETMBJjUR -MwKAhP67A1aEAUUDVAJeeov+pwKy/aJ5jAFZAAAAAgAv//ICuwLAAAkAEwAAEiAWFRQGICY1NBIyN -jU0JiIGFRTbATSsrP7MrNrYenrYegLAxaKhxsahov47nIeIm5uIhwACAGQAAAJHArIADgAYAAABHg -EVFAYHBisBESMRMzITNjQnJisBETMyAZRUX2VOHzuAVtY7GlxcGDWIiDUCrgtnVlVpCgT+5gKy/rU -V1BUF/vgAAAACAC//zAK9AsAAEgAcAAAlFhcHJiMiBwYjIiY1NDYgFhUUJRQWMjY1NCYiBgI9PUMx -UDcfKh8omqysATSs/dR62Hp62HpICTg7NgkHxqGixcWitbWHnJyHiJubAAIAZAAAAlgCsgAXACMAA -CUWFyMmJyYnJisBESMRMzIXHgEVFAYHFiUzMjc+ATU0JyYrAQIqDCJfGQwNWhAhglbiOx9QXEY1Tv -6bhDATMj1lGSyMtYgtOXR0BwH+1wKyBApbU0BSESRAAgVAOGoQBAABADT/8gIoAsAAJQAAATIWFyM -uASMiBhUUFhceARUUBiMiJiczHgEzMjY1NCYnLgE1NDYBOmd2ClwGS0E6SUNRdW+HZnKKC1wPWkQ9 -Uk1cZGuEAsBwXUJHNjQ3OhIbZVZZbm5kREo+NT5DFRdYUFdrAAAAAAEAIgAAAmQCsgAHAAABIxEjE -SM1IQJk9lb2AkICbP2UAmxGAAEAXv/yAmQCsgAXAAABERQHDgEiJicmNREzERQXHgEyNjc2NRECZA -IIgfCBCAJWAgZYmlgGAgKy/k0qFFxzc1wUKgGz/lUrEkRQUEQSKwGrAAAAAAEAIAAAAnoCsgAGAAA -hIwMzGwEzAYJ07l3N1FwCsv2PAnEAAAEAGgAAA7ECsgAMAAABAyMLASMDMxsBMxsBA7HAcZyicrZi -kaB0nJkCsv1OAlP9rQKy/ZsCW/2kAmYAAAEAGQAAAm8CsgALAAAhCwEjEwMzGwEzAxMCCsrEY/bkY -re+Y/D6AST+3AFcAVb+5gEa/q3+oQAAAQATAAACUQKyAAgAAAERIxEDMxsBMwFdVvRjwLphARD+8A -EQAaL+sQFPAAABAC4AAAI5ArIACQAAJRUhNQEhNSEVAQI5/fUBof57Aen+YUZGQgIqRkX92QAAAAA -BAGL/sAEFAwwABwAAARUjETMVIxEBBWlpowMMOP0UOANcAAAB//v/4gE0AtAAAwAABSMDMwE0Pvs+ -HgLuAAAAAQAi/7AAxQMMAAcAABcjNTMRIzUzxaNpaaNQOALsOAABAFAA1wH0AmgABgAAJQsBIxMzE -wGwjY1GsESw1wFZ/qcBkf5vAAAAAQAy/6oBwv/iAAMAAAUhNSEBwv5wAZBWOAAAAAEAKQJEALYCsg -ADAAATIycztjhVUAJEbgAAAAACACT/8gHQAiAAHQAlAAAhJwcGIyImNTQ2OwE1NCcmIyIHIz4BMzI -XFh0BFBcnMjY9ASYVFAF6CR0wVUtgkJoiAgdgaQlaBm1Zrg4DCuQ9R+5MOSFQR1tbDiwUUXBUXowf -J8c9SjRORzYSgVwAAAAAAgBK//ICRQLfABEAHgAAATIWFRQGIyImLwEVIxEzETc2EzI2NTQmIyIGH -QEUFgFUcYCVbiNJEyNWVigySElcU01JXmECIJd4i5QTEDRJAt/+3jkq/hRuZV55ZWsdX14AAQAe// -IB9wIgABgAAAEyFhcjJiMiBhUUFjMyNjczDgEjIiY1NDYBF152DFocbEJXU0A1Rw1aE3pbaoKQAiB -oWH5qZm1tPDlaXYuLgZcAAAACAB7/8gIZAt8AEQAeAAABESM1BwYjIiY1NDYzMhYfAREDMjY9ATQm -IyIGFRQWAhlWKDJacYCVbiNJEyOnSV5hQUlcUwLf/SFVOSqXeIuUExA0ARb9VWVrHV9ebmVeeQACA -B7/8gH9AiAAFQAbAAABFAchHgEzMjY3Mw4BIyImNTQ2MzIWJyIGByEmAf0C/oAGUkA1SwlaD4FXbI -WObmt45UBVBwEqDQEYFhNjWD84W16Oh3+akU9aU60AAAEAFQAAARoC8gAWAAATBh0BMxUjESMRIzU -zNTQ3PgEzMhcVJqcDbW1WOTkDB0k8Hx5oAngVITRC/jQBzEIsJRs5PwVHEwAAAAIAHv8uAhkCIAAi -AC8AAAERFAcOASMiLwEzFx4BMzI2NzY9AQcGIyImNTQ2MzIWHwE1AzI2PQE0JiMiBhUUFgIZAQSEd -NwRAVcBBU5DTlUDASgyWnGAlW4jSRMjp0leYUFJXFMCEv5wSh1zeq8KCTI8VU0ZIQk5Kpd4i5QTED -RJ/iJlax1fXm5lXnkAAQBKAAACCgLkABcAAAEWFREjETQnLgEHDgEdASMRMxE3NjMyFgIIAlYCBDs -6RVRWViE5UVViAYUbQP7WASQxGzI7AQJyf+kC5P7TPSxUAAACAD4AAACsAsAABwALAAASMhYUBiIm -NBMjETNeLiAgLiBiVlYCwCAuICAu/WACEgAC//P/LgCnAsAABwAVAAASMhYUBiImNBcRFAcGIyInN -RY3NjURWS4gIC4gYgMLcRwNSgYCAsAgLiAgLo79wCUbZAJGBzMOHgJEAAAAAQBKAAACCALfAAsAAC -EnBxUjETMREzMHEwGTwTJWVvdu9/rgN6kC3/4oAQv6/ugAAQBG//wA3gLfAA8AABMRFBceATcVBiM -iJicmNRGcAQIcIxkkKi4CAQLf/bkhERoSBD4EJC8SNAJKAAAAAQBKAAADEAIgACQAAAEWFREjETQn -JiMiFREjETQnJiMiFREjETMVNzYzMhYXNzYzMhYDCwVWBAxedFYEDF50VlYiJko7ThAvJkpEVAGfI -jn+vAEcQyRZ1v76ARxDJFnW/voCEk08HzYtRB9HAAAAAAEASgAAAgoCIAAWAAABFhURIxE0JyYjIg -YdASMRMxU3NjMyFgIIAlYCCXBEVVZWITlRVWIBhRtA/tYBJDEbbHR/6QISWz0sVAAAAAACAB7/8gI -sAiAABwARAAASIBYUBiAmNBIyNjU0JiIGFRSlAQCHh/8Ah7ieWlqeWgIgn/Cfn/D+s3ZfYHV1YF8A -AgBK/zwCRQIgABEAHgAAATIWFRQGIyImLwERIxEzFTc2EzI2NTQmIyIGHQEUFgFUcYCVbiNJEyNWV -igySElcU01JXmECIJd4i5QTEDT+8wLWVTkq/hRuZV55ZWsdX14AAgAe/zwCGQIgABEAHgAAAREjEQ -cGIyImNTQ2MzIWHwE1AzI2PQE0JiMiBhUUFgIZVigyWnGAlW4jSRMjp0leYUFJXFMCEv0qARk5Kpd -4i5QTEDRJ/iJlax1fXm5lXnkAAQBKAAABPgIeAA0AAAEyFxUmBhURIxEzFTc2ARoWDkdXVlYwIwIe -B0EFVlf+0gISU0cYAAEAGP/yAa0CIAAjAAATMhYXIyYjIgYVFBYXHgEVFAYjIiYnMxYzMjY1NCYnL -gE1NDbkV2MJWhNdKy04PF1XbVhWbgxaE2ktOjlEUllkAiBaS2MrJCUoEBlPQkhOVFZoKCUmLhIWSE -BIUwAAAAEAFP/4ARQCiQAXAAATERQXHgE3FQYjIiYnJjURIzUzNTMVMxWxAQMmMx8qMjMEAUdHVmM -BzP7PGw4mFgY/BSwxDjQBNUJ7e0IAAAABAEL/8gICAhIAFwAAAREjNQcGIyImJyY1ETMRFBceATMy -Nj0BAgJWITlRT2EKBVYEBkA1RFECEv3uWj4qTToiOQE+/tIlJC43c4DpAAAAAAEAAQAAAfwCEgAGA -AABAyMDMxsBAfzJaclfop8CEv3uAhL+LQHTAAABAAEAAAMLAhIADAAAAQMjCwEjAzMbATMbAQMLqW -Z2dmapY3t0a3Z7AhL97gG+/kICEv5AAcD+QwG9AAAB//oAAAHWAhIACwAAARMjJwcjEwMzFzczARq -8ZIuKY763ZoWFYwEO/vLV1QEMAQbNzQAAAQAB/y4B+wISABEAAAEDDgEjIic1FjMyNj8BAzMbAQH7 -2iFZQB8NDRIpNhQH02GenQIS/cFVUAJGASozEwIt/i4B0gABABQAAAGxAg4ACQAAJRUhNQEhNSEVA -QGx/mMBNP7iAYL+zkREQgGIREX+ewAAAAABAED/sAEOAwwALAAAASMiBhUUFxYVFAYHHgEVFAcGFR -QWOwEVIyImNTQ3NjU0JzU2NTQnJjU0NjsBAQ4MKiMLDS4pKS4NCyMqDAtERAwLUlILDERECwLUGBk -WTlsgKzUFBTcrIFtOFhkYOC87GFVMIkUIOAhFIkxVGDsvAAAAAAEAYP84AJoDIAADAAAXIxEzmjo6 -yAPoAAEAIf+wAO8DDAAsAAATFQYVFBcWFRQGKwE1MzI2NTQnJjU0NjcuATU0NzY1NCYrATUzMhYVF -AcGFRTvUgsMREQLDCojCw0uKSkuDQsjKgwLREQMCwF6OAhFIkxVGDsvOBgZFk5bICs1BQU3KyBbTh -YZGDgvOxhVTCJFAAABAE0A3wH2AWQAEwAAATMUIyImJyYjIhUjNDMyFhcWMzIBvjhuGywtQR0xOG4 -bLC1BHTEBZIURGCNMhREYIwAAAwAk/94DIgLoAAcAEQApAAAAIBYQBiAmECQgBhUUFiA2NTQlMhYX -IyYjIgYUFjMyNjczDgEjIiY1NDYBAQFE3d3+vN0CB/7wubkBELn+xVBnD1wSWDo+QTcqOQZcEmZWX -HN2Aujg/rbg4AFKpr+Mjb6+jYxbWEldV5ZZNShLVn5na34AAgB4AFIB9AGeAAUACwAAAQcXIyc3Mw -cXIyc3AUqJiUmJifOJiUmJiQGepqampqampqYAAAIAHAHSAQ4CwAAHAA8AABIyFhQGIiY0NiIGFBY -yNjRgakREakSTNCEhNCECwEJqQkJqCiM4IyM4AAAAAAIAUAAAAfQCCwALAA8AAAEzFSMVIzUjNTM1 -MxMhNSEBP7W1OrW1OrX+XAGkAVs4tLQ4sP31OAAAAQB0AkQBAQKyAAMAABMjNzOsOD1QAkRuAAAAA -AEAIADsAKoBdgAHAAASMhYUBiImNEg6KCg6KAF2KDooKDoAAAIAOQBSAbUBngAFAAsAACUHIzcnMw -UHIzcnMwELiUmJiUkBM4lJiYlJ+KampqampqYAAAABADYB5QDhAt8ABAAAEzczByM2Xk1OXQHv8Po -AAQAWAeUAwQLfAAQAABMHIzczwV5NTl0C1fD6AAIANgHlAYsC3wAEAAkAABM3MwcjPwEzByM2Xk1O -XapeTU5dAe/w+grw+gAAAgAWAeUBawLfAAQACQAAEwcjNzMXByM3M8FeTU5dql5NTl0C1fD6CvD6A -AADACX/8gI1AHIABwAPABcAADYyFhQGIiY0NjIWFAYiJjQ2MhYUBiImNEk4JCQ4JOw4JCQ4JOw4JC -Q4JHIkOCQkOCQkOCQkOCQkOCQkOAAAAAEAeABSAUoBngAFAAABBxcjJzcBSomJSYmJAZ6mpqamAAA -AAAEAOQBSAQsBngAFAAAlByM3JzMBC4lJiYlJ+KampgAAAf9qAAABgQKyAAMAACsBATM/VwHAVwKy -AAAAAAIAFAHIAdwClAAHABQAABMVIxUjNSM1BRUjNwcjJxcjNTMXN9pKMkoByDICKzQqATJLKysCl -CmjoykBy46KiY3Lm5sAAQAVAAABvALyABgAAAERIxEjESMRIzUzNTQ3NjMyFxUmBgcGHQEBvFbCVj -k5AxHHHx5iVgcDAg798gHM/jQBzEIOJRuWBUcIJDAVIRYAAAABABX//AHkAvIAJQAAJR4BNxUGIyI -mJyY1ESYjIgcGHQEzFSMRIxEjNTM1NDc2MzIXERQBowIcIxkkKi4CAR4nXgwDbW1WLy8DEbNdOmYa -EQQ/BCQvEjQCFQZWFSEWQv40AcxCDiUblhP9uSEAAAAAAAAWAQ4AAQAAAAAAAAATACgAAQAAAAAAA -QAHAEwAAQAAAAAAAgAHAGQAAQAAAAAAAwAaAKIAAQAAAAAABAAHAM0AAQAAAAAABQA8AU8AAQAAAA -AABgAPAawAAQAAAAAACAALAdQAAQAAAAAACQALAfgAAQAAAAAACwAXAjQAAQAAAAAADAAXAnwAAwA -BBAkAAAAmAAAAAwABBAkAAQAOADwAAwABBAkAAgAOAFQAAwABBAkAAwA0AGwAAwABBAkABAAOAL0A -AwABBAkABQB4ANUAAwABBAkABgAeAYwAAwABBAkACAAWAbwAAwABBAkACQAWAeAAAwABBAkACwAuA -gQAAwABBAkADAAuAkwATgBvACAAUgBpAGcAaAB0AHMAIABSAGUAcwBlAHIAdgBlAGQALgAATm8gUm -lnaHRzIFJlc2VydmVkLgAAQQBpAGwAZQByAG8AbgAAQWlsZXJvbgAAUgBlAGcAdQBsAGEAcgAAUmV -ndWxhcgAAMQAuADEAMAAyADsAVQBLAFcATgA7AEEAaQBsAGUAcgBvAG4ALQBSAGUAZwB1AGwAYQBy -AAAxLjEwMjtVS1dOO0FpbGVyb24tUmVndWxhcgAAQQBpAGwAZQByAG8AbgAAQWlsZXJvbgAAVgBlA -HIAcwBpAG8AbgAgADEALgAxADAAMgA7AFAAUwAgADAAMAAxAC4AMQAwADIAOwBoAG8AdABjAG8Abg -B2ACAAMQAuADAALgA3ADAAOwBtAGEAawBlAG8AdABmAC4AbABpAGIAMgAuADUALgA1ADgAMwAyADk -AAFZlcnNpb24gMS4xMDI7UFMgMDAxLjEwMjtob3Rjb252IDEuMC43MDttYWtlb3RmLmxpYjIuNS41 -ODMyOQAAQQBpAGwAZQByAG8AbgAtAFIAZQBnAHUAbABhAHIAAEFpbGVyb24tUmVndWxhcgAAUwBvA -HIAYQAgAFMAYQBnAGEAbgBvAABTb3JhIFNhZ2FubwAAUwBvAHIAYQAgAFMAYQBnAGEAbgBvAABTb3 -JhIFNhZ2FubwAAaAB0AHQAcAA6AC8ALwB3AHcAdwAuAGQAbwB0AGMAbwBsAG8AbgAuAG4AZQB0AAB -odHRwOi8vd3d3LmRvdGNvbG9uLm5ldAAAaAB0AHQAcAA6AC8ALwB3AHcAdwAuAGQAbwB0AGMAbwBs -AG8AbgAuAG4AZQB0AABodHRwOi8vd3d3LmRvdGNvbG9uLm5ldAAAAAACAAAAAAAA/4MAMgAAAAAAA -AAAAAAAAAAAAAAAAAAAAHQAAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATAB -QAFQAWABcAGAAZABoAGwAcAB0AHgAfACAAIQAiACMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAA -xADIAMwA0ADUANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0A -TgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQBeAF8AYABhAIsAqQCDAJMAjQDDAKoAtgC3A -LQAtQCrAL4AvwC8AIwAwADBAAAAAAAB//8AAgABAAAADAAAABwAAAACAAIAAwBxAAEAcgBzAAIABA -AAAAIAAAABAAAACgBMAGYAAkRGTFQADmxhdG4AGgAEAAAAAP//AAEAAAAWAANDQVQgAB5NT0wgABZ -ST00gABYAAP//AAEAAAAA//8AAgAAAAEAAmxpZ2EADmxvY2wAFAAAAAEAAQAAAAEAAAACAAYAEAAG -AAAAAgASADQABAAAAAEATAADAAAAAgAQABYAAQAcAAAAAQABAE8AAQABAGcAAQABAE8AAwAAAAIAE -AAWAAEAHAAAAAEAAQAvAAEAAQBnAAEAAQAvAAEAGgABAAgAAgAGAAwAcwACAE8AcgACAEwAAQABAE -kAAAABAAAACgBGAGAAAkRGTFQADmxhdG4AHAAEAAAAAP//AAIAAAABABYAA0NBVCAAFk1PTCAAFlJ -PTSAAFgAA//8AAgAAAAEAAmNwc3AADmtlcm4AFAAAAAEAAAAAAAEAAQACAAYADgABAAAAAQASAAIA -AAACAB4ANgABAAoABQAFAAoAAgABACQAPQAAAAEAEgAEAAAAAQAMAAEAOP/nAAEAAQAkAAIGigAEA -AAFJAXKABoAGQAA//gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAD/sv+4/+z/7v/MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAD/xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/9T/6AAAAAD/8QAA -ABD/vQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/7gAAAAAAAAAAAAAAAAAA//MAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAP/5AAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/gAAD/4AAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//L/9AAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAA/+gAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/zAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/mAAAAAAAAAAAAAAAAAAD -/4gAA//AAAAAA//YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/+AAAAAAAAP/OAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/zv/qAAAAAP/0AAAACAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/ZAAD/egAA/1kAAAAA/5D/rgAAAAAAAAAAAA -AAAAAAAAAAAAAAAAD/9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAD/8AAA/7b/8P+wAAD/8P/E/98AAAAA/8P/+P/0//oAAAAAAAAAAAAA//gA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/+AAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/w//C/9MAAP/SAAD/9wAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAD/yAAA/+kAAAAA//QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/9wAAAAD//QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAP/2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAP/cAAAAAAAAAAAAAAAA/7YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAP/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/6AAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAkAFAAEAAAAAQACwAAABcA -BgAAAAAAAAAIAA4AAAAAAAsAEgAAAAAAAAATABkAAwANAAAAAQAJAAAAAAAAAAAAAAAAAAAAGAAAA -AAABwAAAAAAAAAAAAAAFQAFAAAAAAAYABgAAAAUAAAACgAAAAwAAgAPABEAFgAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAEAEQBdAAYAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAcAAAAAAAAABwAAAAAACAAAAAAAAAAAAAcAAAAHAAAAEwAJ -ABUADgAPAAAACwAQAAAAAAAAAAAAAAAAAAUAGAACAAIAAgAAAAIAGAAXAAAAGAAAABYAFgACABYAA -gAWAAAAEQADAAoAFAAMAA0ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAEgAGAAEAHgAkAC -YAJwApACoALQAuAC8AMgAzADcAOAA5ADoAPAA9AEUASABOAE8AUgBTAFUAVwBZAFoAWwBcAF0AcwA -AAAAAAQAAAADa3tfFAAAAANAan9kAAAAA4QodoQ== -""" - ) - ), - 10 if size is None else size, - layout_engine=Layout.BASIC, - ) - return load_default_imagefont() diff --git a/voxvera/vendor/PIL/ImageGrab.py b/voxvera/vendor/PIL/ImageGrab.py deleted file mode 100644 index 4228078..0000000 --- a/voxvera/vendor/PIL/ImageGrab.py +++ /dev/null @@ -1,224 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# screen grabber -# -# History: -# 2001-04-26 fl created -# 2001-09-17 fl use builtin driver, if present -# 2002-11-19 fl added grabclipboard support -# -# Copyright (c) 2001-2002 by Secret Labs AB -# Copyright (c) 2001-2002 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io -import os -import shutil -import subprocess -import sys -import tempfile - -from . import Image - -TYPE_CHECKING = False -if TYPE_CHECKING: - from . import ImageWin - - -def grab( - bbox: tuple[int, int, int, int] | None = None, - include_layered_windows: bool = False, - all_screens: bool = False, - xdisplay: str | None = None, - window: int | ImageWin.HWND | None = None, -) -> Image.Image: - im: Image.Image - if xdisplay is None: - if sys.platform == "darwin": - fh, filepath = tempfile.mkstemp(".png") - os.close(fh) - args = ["screencapture"] - if window: - args += ["-l", str(window)] - elif bbox: - left, top, right, bottom = bbox - args += ["-R", f"{left},{top},{right-left},{bottom-top}"] - subprocess.call(args + ["-x", filepath]) - im = Image.open(filepath) - im.load() - os.unlink(filepath) - if bbox: - if window: - # Determine if the window was in Retina mode or not - # by capturing it without the shadow, - # and checking how different the width is - fh, filepath = tempfile.mkstemp(".png") - os.close(fh) - subprocess.call( - ["screencapture", "-l", str(window), "-o", "-x", filepath] - ) - with Image.open(filepath) as im_no_shadow: - retina = im.width - im_no_shadow.width > 100 - os.unlink(filepath) - - # Since screencapture's -R does not work with -l, - # crop the image manually - if retina: - left, top, right, bottom = bbox - im_cropped = im.resize( - (right - left, bottom - top), - box=tuple(coord * 2 for coord in bbox), - ) - else: - im_cropped = im.crop(bbox) - im.close() - return im_cropped - else: - im_resized = im.resize((right - left, bottom - top)) - im.close() - return im_resized - return im - elif sys.platform == "win32": - if window is not None: - all_screens = -1 - offset, size, data = Image.core.grabscreen_win32( - include_layered_windows, - all_screens, - int(window) if window is not None else 0, - ) - im = Image.frombytes( - "RGB", - size, - data, - # RGB, 32-bit line padding, origin lower left corner - "raw", - "BGR", - (size[0] * 3 + 3) & -4, - -1, - ) - if bbox: - x0, y0 = offset - left, top, right, bottom = bbox - im = im.crop((left - x0, top - y0, right - x0, bottom - y0)) - return im - # Cast to Optional[str] needed for Windows and macOS. - display_name: str | None = xdisplay - try: - if not Image.core.HAVE_XCB: - msg = "Pillow was built without XCB support" - raise OSError(msg) - size, data = Image.core.grabscreen_x11(display_name) - except OSError: - if display_name is None and sys.platform not in ("darwin", "win32"): - if shutil.which("gnome-screenshot"): - args = ["gnome-screenshot", "-f"] - elif shutil.which("grim"): - args = ["grim"] - elif shutil.which("spectacle"): - args = ["spectacle", "-n", "-b", "-f", "-o"] - else: - raise - fh, filepath = tempfile.mkstemp(".png") - os.close(fh) - subprocess.call(args + [filepath]) - im = Image.open(filepath) - im.load() - os.unlink(filepath) - if bbox: - im_cropped = im.crop(bbox) - im.close() - return im_cropped - return im - else: - raise - else: - im = Image.frombytes("RGB", size, data, "raw", "BGRX", size[0] * 4, 1) - if bbox: - im = im.crop(bbox) - return im - - -def grabclipboard() -> Image.Image | list[str] | None: - if sys.platform == "darwin": - p = subprocess.run( - ["osascript", "-e", "get the clipboard as «class PNGf»"], - capture_output=True, - ) - if p.returncode != 0: - return None - - import binascii - - data = io.BytesIO(binascii.unhexlify(p.stdout[11:-3])) - return Image.open(data) - elif sys.platform == "win32": - fmt, data = Image.core.grabclipboard_win32() - if fmt == "file": # CF_HDROP - import struct - - o = struct.unpack_from("I", data)[0] - if data[16] == 0: - files = data[o:].decode("mbcs").split("\0") - else: - files = data[o:].decode("utf-16le").split("\0") - return files[: files.index("")] - if isinstance(data, bytes): - data = io.BytesIO(data) - if fmt == "png": - from . import PngImagePlugin - - return PngImagePlugin.PngImageFile(data) - elif fmt == "DIB": - from . import BmpImagePlugin - - return BmpImagePlugin.DibImageFile(data) - return None - else: - if os.getenv("WAYLAND_DISPLAY"): - session_type = "wayland" - elif os.getenv("DISPLAY"): - session_type = "x11" - else: # Session type check failed - session_type = None - - if shutil.which("wl-paste") and session_type in ("wayland", None): - args = ["wl-paste", "-t", "image"] - elif shutil.which("xclip") and session_type in ("x11", None): - args = ["xclip", "-selection", "clipboard", "-t", "image/png", "-o"] - else: - msg = "wl-paste or xclip is required for ImageGrab.grabclipboard() on Linux" - raise NotImplementedError(msg) - - p = subprocess.run(args, capture_output=True) - if p.returncode != 0: - err = p.stderr - for silent_error in [ - # wl-paste, when the clipboard is empty - b"Nothing is copied", - # Ubuntu/Debian wl-paste, when the clipboard is empty - b"No selection", - # Ubuntu/Debian wl-paste, when an image isn't available - b"No suitable type of content copied", - # wl-paste or Ubuntu/Debian xclip, when an image isn't available - b" not available", - # xclip, when an image isn't available - b"cannot convert ", - # xclip, when the clipboard isn't initialized - b"xclip: Error: There is no owner for the ", - ]: - if silent_error in err: - return None - msg = f"{args[0]} error" - if err: - msg += f": {err.strip().decode()}" - raise ChildProcessError(msg) - - data = io.BytesIO(p.stdout) - im = Image.open(data) - im.load() - return im diff --git a/voxvera/vendor/PIL/ImageMath.py b/voxvera/vendor/PIL/ImageMath.py deleted file mode 100644 index dfdc50c..0000000 --- a/voxvera/vendor/PIL/ImageMath.py +++ /dev/null @@ -1,314 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# a simple math add-on for the Python Imaging Library -# -# History: -# 1999-02-15 fl Original PIL Plus release -# 2005-05-05 fl Simplified and cleaned up for PIL 1.1.6 -# 2005-09-12 fl Fixed int() and float() for Python 2.4.1 -# -# Copyright (c) 1999-2005 by Secret Labs AB -# Copyright (c) 2005 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import builtins - -from . import Image, _imagingmath - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - from types import CodeType - from typing import Any - - -class _Operand: - """Wraps an image operand, providing standard operators""" - - def __init__(self, im: Image.Image): - self.im = im - - def __fixup(self, im1: _Operand | float) -> Image.Image: - # convert image to suitable mode - if isinstance(im1, _Operand): - # argument was an image. - if im1.im.mode in ("1", "L"): - return im1.im.convert("I") - elif im1.im.mode in ("I", "F"): - return im1.im - else: - msg = f"unsupported mode: {im1.im.mode}" - raise ValueError(msg) - else: - # argument was a constant - if isinstance(im1, (int, float)) and self.im.mode in ("1", "L", "I"): - return Image.new("I", self.im.size, im1) - else: - return Image.new("F", self.im.size, im1) - - def apply( - self, - op: str, - im1: _Operand | float, - im2: _Operand | float | None = None, - mode: str | None = None, - ) -> _Operand: - im_1 = self.__fixup(im1) - if im2 is None: - # unary operation - out = Image.new(mode or im_1.mode, im_1.size, None) - try: - op = getattr(_imagingmath, f"{op}_{im_1.mode}") - except AttributeError as e: - msg = f"bad operand type for '{op}'" - raise TypeError(msg) from e - _imagingmath.unop(op, out.getim(), im_1.getim()) - else: - # binary operation - im_2 = self.__fixup(im2) - if im_1.mode != im_2.mode: - # convert both arguments to floating point - if im_1.mode != "F": - im_1 = im_1.convert("F") - if im_2.mode != "F": - im_2 = im_2.convert("F") - if im_1.size != im_2.size: - # crop both arguments to a common size - size = ( - min(im_1.size[0], im_2.size[0]), - min(im_1.size[1], im_2.size[1]), - ) - if im_1.size != size: - im_1 = im_1.crop((0, 0) + size) - if im_2.size != size: - im_2 = im_2.crop((0, 0) + size) - out = Image.new(mode or im_1.mode, im_1.size, None) - try: - op = getattr(_imagingmath, f"{op}_{im_1.mode}") - except AttributeError as e: - msg = f"bad operand type for '{op}'" - raise TypeError(msg) from e - _imagingmath.binop(op, out.getim(), im_1.getim(), im_2.getim()) - return _Operand(out) - - # unary operators - def __bool__(self) -> bool: - # an image is "true" if it contains at least one non-zero pixel - return self.im.getbbox() is not None - - def __abs__(self) -> _Operand: - return self.apply("abs", self) - - def __pos__(self) -> _Operand: - return self - - def __neg__(self) -> _Operand: - return self.apply("neg", self) - - # binary operators - def __add__(self, other: _Operand | float) -> _Operand: - return self.apply("add", self, other) - - def __radd__(self, other: _Operand | float) -> _Operand: - return self.apply("add", other, self) - - def __sub__(self, other: _Operand | float) -> _Operand: - return self.apply("sub", self, other) - - def __rsub__(self, other: _Operand | float) -> _Operand: - return self.apply("sub", other, self) - - def __mul__(self, other: _Operand | float) -> _Operand: - return self.apply("mul", self, other) - - def __rmul__(self, other: _Operand | float) -> _Operand: - return self.apply("mul", other, self) - - def __truediv__(self, other: _Operand | float) -> _Operand: - return self.apply("div", self, other) - - def __rtruediv__(self, other: _Operand | float) -> _Operand: - return self.apply("div", other, self) - - def __mod__(self, other: _Operand | float) -> _Operand: - return self.apply("mod", self, other) - - def __rmod__(self, other: _Operand | float) -> _Operand: - return self.apply("mod", other, self) - - def __pow__(self, other: _Operand | float) -> _Operand: - return self.apply("pow", self, other) - - def __rpow__(self, other: _Operand | float) -> _Operand: - return self.apply("pow", other, self) - - # bitwise - def __invert__(self) -> _Operand: - return self.apply("invert", self) - - def __and__(self, other: _Operand | float) -> _Operand: - return self.apply("and", self, other) - - def __rand__(self, other: _Operand | float) -> _Operand: - return self.apply("and", other, self) - - def __or__(self, other: _Operand | float) -> _Operand: - return self.apply("or", self, other) - - def __ror__(self, other: _Operand | float) -> _Operand: - return self.apply("or", other, self) - - def __xor__(self, other: _Operand | float) -> _Operand: - return self.apply("xor", self, other) - - def __rxor__(self, other: _Operand | float) -> _Operand: - return self.apply("xor", other, self) - - def __lshift__(self, other: _Operand | float) -> _Operand: - return self.apply("lshift", self, other) - - def __rshift__(self, other: _Operand | float) -> _Operand: - return self.apply("rshift", self, other) - - # logical - def __eq__(self, other: _Operand | float) -> _Operand: # type: ignore[override] - return self.apply("eq", self, other) - - def __ne__(self, other: _Operand | float) -> _Operand: # type: ignore[override] - return self.apply("ne", self, other) - - def __lt__(self, other: _Operand | float) -> _Operand: - return self.apply("lt", self, other) - - def __le__(self, other: _Operand | float) -> _Operand: - return self.apply("le", self, other) - - def __gt__(self, other: _Operand | float) -> _Operand: - return self.apply("gt", self, other) - - def __ge__(self, other: _Operand | float) -> _Operand: - return self.apply("ge", self, other) - - -# conversions -def imagemath_int(self: _Operand) -> _Operand: - return _Operand(self.im.convert("I")) - - -def imagemath_float(self: _Operand) -> _Operand: - return _Operand(self.im.convert("F")) - - -# logical -def imagemath_equal(self: _Operand, other: _Operand | float | None) -> _Operand: - return self.apply("eq", self, other, mode="I") - - -def imagemath_notequal(self: _Operand, other: _Operand | float | None) -> _Operand: - return self.apply("ne", self, other, mode="I") - - -def imagemath_min(self: _Operand, other: _Operand | float | None) -> _Operand: - return self.apply("min", self, other) - - -def imagemath_max(self: _Operand, other: _Operand | float | None) -> _Operand: - return self.apply("max", self, other) - - -def imagemath_convert(self: _Operand, mode: str) -> _Operand: - return _Operand(self.im.convert(mode)) - - -ops = { - "int": imagemath_int, - "float": imagemath_float, - "equal": imagemath_equal, - "notequal": imagemath_notequal, - "min": imagemath_min, - "max": imagemath_max, - "convert": imagemath_convert, -} - - -def lambda_eval(expression: Callable[[dict[str, Any]], Any], **kw: Any) -> Any: - """ - Returns the result of an image function. - - :py:mod:`~PIL.ImageMath` only supports single-layer images. To process multi-band - images, use the :py:meth:`~PIL.Image.Image.split` method or - :py:func:`~PIL.Image.merge` function. - - :param expression: A function that receives a dictionary. - :param **kw: Values to add to the function's dictionary. - :return: The expression result. This is usually an image object, but can - also be an integer, a floating point value, or a pixel tuple, - depending on the expression. - """ - - args: dict[str, Any] = ops.copy() - args.update(kw) - for k, v in args.items(): - if isinstance(v, Image.Image): - args[k] = _Operand(v) - - out = expression(args) - try: - return out.im - except AttributeError: - return out - - -def unsafe_eval(expression: str, **kw: Any) -> Any: - """ - Evaluates an image expression. This uses Python's ``eval()`` function to process - the expression string, and carries the security risks of doing so. It is not - recommended to process expressions without considering this. - :py:meth:`~lambda_eval` is a more secure alternative. - - :py:mod:`~PIL.ImageMath` only supports single-layer images. To process multi-band - images, use the :py:meth:`~PIL.Image.Image.split` method or - :py:func:`~PIL.Image.merge` function. - - :param expression: A string containing a Python-style expression. - :param **kw: Values to add to the evaluation context. - :return: The evaluated expression. This is usually an image object, but can - also be an integer, a floating point value, or a pixel tuple, - depending on the expression. - """ - - # build execution namespace - args: dict[str, Any] = ops.copy() - for k in kw: - if "__" in k or hasattr(builtins, k): - msg = f"'{k}' not allowed" - raise ValueError(msg) - - args.update(kw) - for k, v in args.items(): - if isinstance(v, Image.Image): - args[k] = _Operand(v) - - compiled_code = compile(expression, "", "eval") - - def scan(code: CodeType) -> None: - for const in code.co_consts: - if type(const) is type(compiled_code): - scan(const) - - for name in code.co_names: - if name not in args and name != "abs": - msg = f"'{name}' not allowed" - raise ValueError(msg) - - scan(compiled_code) - out = builtins.eval(expression, {"__builtins": {"abs": abs}}, args) - try: - return out.im - except AttributeError: - return out diff --git a/voxvera/vendor/PIL/ImageMode.py b/voxvera/vendor/PIL/ImageMode.py deleted file mode 100644 index b7c6c86..0000000 --- a/voxvera/vendor/PIL/ImageMode.py +++ /dev/null @@ -1,85 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# standard mode descriptors -# -# History: -# 2006-03-20 fl Added -# -# Copyright (c) 2006 by Secret Labs AB. -# Copyright (c) 2006 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import sys -from functools import lru_cache -from typing import NamedTuple - - -class ModeDescriptor(NamedTuple): - """Wrapper for mode strings.""" - - mode: str - bands: tuple[str, ...] - basemode: str - basetype: str - typestr: str - - def __str__(self) -> str: - return self.mode - - -@lru_cache -def getmode(mode: str) -> ModeDescriptor: - """Gets a mode descriptor for the given mode.""" - endian = "<" if sys.byteorder == "little" else ">" - - modes = { - # core modes - # Bits need to be extended to bytes - "1": ("L", "L", ("1",), "|b1"), - "L": ("L", "L", ("L",), "|u1"), - "I": ("L", "I", ("I",), f"{endian}i4"), - "F": ("L", "F", ("F",), f"{endian}f4"), - "P": ("P", "L", ("P",), "|u1"), - "RGB": ("RGB", "L", ("R", "G", "B"), "|u1"), - "RGBX": ("RGB", "L", ("R", "G", "B", "X"), "|u1"), - "RGBA": ("RGB", "L", ("R", "G", "B", "A"), "|u1"), - "CMYK": ("RGB", "L", ("C", "M", "Y", "K"), "|u1"), - "YCbCr": ("RGB", "L", ("Y", "Cb", "Cr"), "|u1"), - # UNDONE - unsigned |u1i1i1 - "LAB": ("RGB", "L", ("L", "A", "B"), "|u1"), - "HSV": ("RGB", "L", ("H", "S", "V"), "|u1"), - # extra experimental modes - "RGBa": ("RGB", "L", ("R", "G", "B", "a"), "|u1"), - "LA": ("L", "L", ("L", "A"), "|u1"), - "La": ("L", "L", ("L", "a"), "|u1"), - "PA": ("RGB", "L", ("P", "A"), "|u1"), - } - if mode in modes: - base_mode, base_type, bands, type_str = modes[mode] - return ModeDescriptor(mode, bands, base_mode, base_type, type_str) - - mapping_modes = { - # I;16 == I;16L, and I;32 == I;32L - "I;16": "u2", - "I;16BS": ">i2", - "I;16N": f"{endian}u2", - "I;16NS": f"{endian}i2", - "I;32": "u4", - "I;32L": "i4", - "I;32LS": " -from __future__ import annotations - -import re - -from . import Image, _imagingmorph - -LUT_SIZE = 1 << 9 - -# fmt: off -ROTATION_MATRIX = [ - 6, 3, 0, - 7, 4, 1, - 8, 5, 2, -] -MIRROR_MATRIX = [ - 2, 1, 0, - 5, 4, 3, - 8, 7, 6, -] -# fmt: on - - -class LutBuilder: - """A class for building a MorphLut from a descriptive language - - The input patterns is a list of a strings sequences like these:: - - 4:(... - .1. - 111)->1 - - (whitespaces including linebreaks are ignored). The option 4 - describes a series of symmetry operations (in this case a - 4-rotation), the pattern is described by: - - - . or X - Ignore - - 1 - Pixel is on - - 0 - Pixel is off - - The result of the operation is described after "->" string. - - The default is to return the current pixel value, which is - returned if no other match is found. - - Operations: - - - 4 - 4 way rotation - - N - Negate - - 1 - Dummy op for no other operation (an op must always be given) - - M - Mirroring - - Example:: - - lb = LutBuilder(patterns = ["4:(... .1. 111)->1"]) - lut = lb.build_lut() - - """ - - def __init__( - self, patterns: list[str] | None = None, op_name: str | None = None - ) -> None: - """ - :param patterns: A list of input patterns, or None. - :param op_name: The name of a known pattern. One of "corner", "dilation4", - "dilation8", "erosion4", "erosion8" or "edge". - :exception Exception: If the op_name is not recognized. - """ - self.lut: bytearray | None = None - if op_name is not None: - known_patterns = { - "corner": ["1:(... ... ...)->0", "4:(00. 01. ...)->1"], - "dilation4": ["4:(... .0. .1.)->1"], - "dilation8": ["4:(... .0. .1.)->1", "4:(... .0. ..1)->1"], - "erosion4": ["4:(... .1. .0.)->0"], - "erosion8": ["4:(... .1. .0.)->0", "4:(... .1. ..0)->0"], - "edge": [ - "1:(... ... ...)->0", - "4:(.0. .1. ...)->1", - "4:(01. .1. ...)->1", - ], - } - if op_name not in known_patterns: - msg = f"Unknown pattern {op_name}!" - raise Exception(msg) - - self.patterns = known_patterns[op_name] - elif patterns is not None: - self.patterns = patterns - else: - self.patterns = [] - - def add_patterns(self, patterns: list[str]) -> None: - """ - Append to list of patterns. - - :param patterns: Additional patterns. - """ - self.patterns += patterns - - def build_default_lut(self) -> bytearray: - """ - Set the current LUT, and return it. - - This is the default LUT that patterns will be applied against when building. - """ - symbols = [0, 1] - m = 1 << 4 # pos of current pixel - self.lut = bytearray(symbols[(i & m) > 0] for i in range(LUT_SIZE)) - return self.lut - - def get_lut(self) -> bytearray | None: - """ - Returns the current LUT - """ - return self.lut - - def _string_permute(self, pattern: str, permutation: list[int]) -> str: - """Takes a pattern and a permutation and returns the - string permuted according to the permutation list. - """ - assert len(permutation) == 9 - return "".join(pattern[p] for p in permutation) - - def _pattern_permute( - self, basic_pattern: str, options: str, basic_result: int - ) -> list[tuple[str, int]]: - """Takes a basic pattern and its result and clones - the pattern according to the modifications described in the $options - parameter. It returns a list of all cloned patterns.""" - patterns = [(basic_pattern, basic_result)] - - # rotations - if "4" in options: - res = patterns[-1][1] - for i in range(4): - patterns.append( - (self._string_permute(patterns[-1][0], ROTATION_MATRIX), res) - ) - # mirror - if "M" in options: - n = len(patterns) - for pattern, res in patterns[:n]: - patterns.append((self._string_permute(pattern, MIRROR_MATRIX), res)) - - # negate - if "N" in options: - n = len(patterns) - for pattern, res in patterns[:n]: - # Swap 0 and 1 - pattern = pattern.replace("0", "Z").replace("1", "0").replace("Z", "1") - res = 1 - int(res) - patterns.append((pattern, res)) - - return patterns - - def build_lut(self) -> bytearray: - """Compile all patterns into a morphology LUT, and return it. - - This is the data to be passed into MorphOp.""" - self.build_default_lut() - assert self.lut is not None - patterns = [] - - # Parse and create symmetries of the patterns strings - for p in self.patterns: - m = re.search(r"(\w):?\s*\((.+?)\)\s*->\s*(\d)", p.replace("\n", "")) - if not m: - msg = 'Syntax error in pattern "' + p + '"' - raise Exception(msg) - options = m.group(1) - pattern = m.group(2) - result = int(m.group(3)) - - # Get rid of spaces - pattern = pattern.replace(" ", "").replace("\n", "") - - patterns += self._pattern_permute(pattern, options, result) - - # Compile the patterns into regular expressions for speed - compiled_patterns = [] - for pattern in patterns: - p = pattern[0].replace(".", "X").replace("X", "[01]") - compiled_patterns.append((re.compile(p), pattern[1])) - - # Step through table and find patterns that match. - # Note that all the patterns are searched. The last one found takes priority - for i in range(LUT_SIZE): - # Build the bit pattern - bitpattern = bin(i)[2:] - bitpattern = ("0" * (9 - len(bitpattern)) + bitpattern)[::-1] - - for pattern, r in compiled_patterns: - if pattern.match(bitpattern): - self.lut[i] = [0, 1][r] - - return self.lut - - -class MorphOp: - """A class for binary morphological operators""" - - def __init__( - self, - lut: bytearray | None = None, - op_name: str | None = None, - patterns: list[str] | None = None, - ) -> None: - """Create a binary morphological operator. - - If the LUT is not provided, then it is built using LutBuilder from the op_name - or the patterns. - - :param lut: The LUT data. - :param patterns: A list of input patterns, or None. - :param op_name: The name of a known pattern. One of "corner", "dilation4", - "dilation8", "erosion4", "erosion8", "edge". - :exception Exception: If the op_name is not recognized. - """ - if patterns is None and op_name is None: - self.lut = lut - else: - self.lut = LutBuilder(patterns, op_name).build_lut() - - def apply(self, image: Image.Image) -> tuple[int, Image.Image]: - """Run a single morphological operation on an image. - - Returns a tuple of the number of changed pixels and the - morphed image. - - :param image: A 1-mode or L-mode image. - :exception Exception: If the current operator is None. - :exception ValueError: If the image is not 1 or L mode.""" - if self.lut is None: - msg = "No operator loaded" - raise Exception(msg) - - if image.mode not in ("1", "L"): - msg = "Image mode must be 1 or L" - raise ValueError(msg) - outimage = Image.new(image.mode, image.size) - count = _imagingmorph.apply(bytes(self.lut), image.getim(), outimage.getim()) - return count, outimage - - def match(self, image: Image.Image) -> list[tuple[int, int]]: - """Get a list of coordinates matching the morphological operation on - an image. - - Returns a list of tuples of (x,y) coordinates of all matching pixels. See - :ref:`coordinate-system`. - - :param image: A 1-mode or L-mode image. - :exception Exception: If the current operator is None. - :exception ValueError: If the image is not 1 or L mode.""" - if self.lut is None: - msg = "No operator loaded" - raise Exception(msg) - - if image.mode not in ("1", "L"): - msg = "Image mode must be 1 or L" - raise ValueError(msg) - return _imagingmorph.match(bytes(self.lut), image.getim()) - - def get_on_pixels(self, image: Image.Image) -> list[tuple[int, int]]: - """Get a list of all turned on pixels in a 1 or L mode image. - - Returns a list of tuples of (x,y) coordinates of all non-empty pixels. See - :ref:`coordinate-system`. - - :param image: A 1-mode or L-mode image. - :exception ValueError: If the image is not 1 or L mode.""" - - if image.mode not in ("1", "L"): - msg = "Image mode must be 1 or L" - raise ValueError(msg) - return _imagingmorph.get_on_pixels(image.getim()) - - def load_lut(self, filename: str) -> None: - """ - Load an operator from an mrl file - - :param filename: The file to read from. - :exception Exception: If the length of the file data is not 512. - """ - with open(filename, "rb") as f: - self.lut = bytearray(f.read()) - - if len(self.lut) != LUT_SIZE: - self.lut = None - msg = "Wrong size operator file!" - raise Exception(msg) - - def save_lut(self, filename: str) -> None: - """ - Save an operator to an mrl file. - - :param filename: The destination file. - :exception Exception: If the current operator is None. - """ - if self.lut is None: - msg = "No operator loaded" - raise Exception(msg) - with open(filename, "wb") as f: - f.write(self.lut) - - def set_lut(self, lut: bytearray | None) -> None: - """ - Set the LUT from an external source - - :param lut: A new LUT. - """ - self.lut = lut diff --git a/voxvera/vendor/PIL/ImageOps.py b/voxvera/vendor/PIL/ImageOps.py deleted file mode 100644 index 42b10bd..0000000 --- a/voxvera/vendor/PIL/ImageOps.py +++ /dev/null @@ -1,746 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# standard image operations -# -# History: -# 2001-10-20 fl Created -# 2001-10-23 fl Added autocontrast operator -# 2001-12-18 fl Added Kevin's fit operator -# 2004-03-14 fl Fixed potential division by zero in equalize -# 2005-05-05 fl Fixed equalize for low number of values -# -# Copyright (c) 2001-2004 by Secret Labs AB -# Copyright (c) 2001-2004 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import functools -import operator -import re -from collections.abc import Sequence -from typing import Literal, Protocol, cast, overload - -from . import ExifTags, Image, ImagePalette - -# -# helpers - - -def _border(border: int | tuple[int, ...]) -> tuple[int, int, int, int]: - if isinstance(border, tuple): - if len(border) == 2: - left, top = right, bottom = border - elif len(border) == 4: - left, top, right, bottom = border - else: - left = top = right = bottom = border - return left, top, right, bottom - - -def _color(color: str | int | tuple[int, ...], mode: str) -> int | tuple[int, ...]: - if isinstance(color, str): - from . import ImageColor - - color = ImageColor.getcolor(color, mode) - return color - - -def _lut(image: Image.Image, lut: list[int]) -> Image.Image: - if image.mode == "P": - # FIXME: apply to lookup table, not image data - msg = "mode P support coming soon" - raise NotImplementedError(msg) - elif image.mode in ("L", "RGB"): - if image.mode == "RGB" and len(lut) == 256: - lut = lut + lut + lut - return image.point(lut) - else: - msg = f"not supported for mode {image.mode}" - raise OSError(msg) - - -# -# actions - - -def autocontrast( - image: Image.Image, - cutoff: float | tuple[float, float] = 0, - ignore: int | Sequence[int] | None = None, - mask: Image.Image | None = None, - preserve_tone: bool = False, -) -> Image.Image: - """ - Maximize (normalize) image contrast. This function calculates a - histogram of the input image (or mask region), removes ``cutoff`` percent of the - lightest and darkest pixels from the histogram, and remaps the image - so that the darkest pixel becomes black (0), and the lightest - becomes white (255). - - :param image: The image to process. - :param cutoff: The percent to cut off from the histogram on the low and - high ends. Either a tuple of (low, high), or a single - number for both. - :param ignore: The background pixel value (use None for no background). - :param mask: Histogram used in contrast operation is computed using pixels - within the mask. If no mask is given the entire image is used - for histogram computation. - :param preserve_tone: Preserve image tone in Photoshop-like style autocontrast. - - .. versionadded:: 8.2.0 - - :return: An image. - """ - if preserve_tone: - histogram = image.convert("L").histogram(mask) - else: - histogram = image.histogram(mask) - - lut = [] - for layer in range(0, len(histogram), 256): - h = histogram[layer : layer + 256] - if ignore is not None: - # get rid of outliers - if isinstance(ignore, int): - h[ignore] = 0 - else: - for ix in ignore: - h[ix] = 0 - if cutoff: - # cut off pixels from both ends of the histogram - if not isinstance(cutoff, tuple): - cutoff = (cutoff, cutoff) - # get number of pixels - n = 0 - for ix in range(256): - n = n + h[ix] - # remove cutoff% pixels from the low end - cut = int(n * cutoff[0] // 100) - for lo in range(256): - if cut > h[lo]: - cut = cut - h[lo] - h[lo] = 0 - else: - h[lo] -= cut - cut = 0 - if cut <= 0: - break - # remove cutoff% samples from the high end - cut = int(n * cutoff[1] // 100) - for hi in range(255, -1, -1): - if cut > h[hi]: - cut = cut - h[hi] - h[hi] = 0 - else: - h[hi] -= cut - cut = 0 - if cut <= 0: - break - # find lowest/highest samples after preprocessing - for lo in range(256): - if h[lo]: - break - for hi in range(255, -1, -1): - if h[hi]: - break - if hi <= lo: - # don't bother - lut.extend(list(range(256))) - else: - scale = 255.0 / (hi - lo) - offset = -lo * scale - for ix in range(256): - ix = int(ix * scale + offset) - if ix < 0: - ix = 0 - elif ix > 255: - ix = 255 - lut.append(ix) - return _lut(image, lut) - - -def colorize( - image: Image.Image, - black: str | tuple[int, ...], - white: str | tuple[int, ...], - mid: str | int | tuple[int, ...] | None = None, - blackpoint: int = 0, - whitepoint: int = 255, - midpoint: int = 127, -) -> Image.Image: - """ - Colorize grayscale image. - This function calculates a color wedge which maps all black pixels in - the source image to the first color and all white pixels to the - second color. If ``mid`` is specified, it uses three-color mapping. - The ``black`` and ``white`` arguments should be RGB tuples or color names; - optionally you can use three-color mapping by also specifying ``mid``. - Mapping positions for any of the colors can be specified - (e.g. ``blackpoint``), where these parameters are the integer - value corresponding to where the corresponding color should be mapped. - These parameters must have logical order, such that - ``blackpoint <= midpoint <= whitepoint`` (if ``mid`` is specified). - - :param image: The image to colorize. - :param black: The color to use for black input pixels. - :param white: The color to use for white input pixels. - :param mid: The color to use for midtone input pixels. - :param blackpoint: an int value [0, 255] for the black mapping. - :param whitepoint: an int value [0, 255] for the white mapping. - :param midpoint: an int value [0, 255] for the midtone mapping. - :return: An image. - """ - - # Initial asserts - assert image.mode == "L" - if mid is None: - assert 0 <= blackpoint <= whitepoint <= 255 - else: - assert 0 <= blackpoint <= midpoint <= whitepoint <= 255 - - # Define colors from arguments - rgb_black = cast(Sequence[int], _color(black, "RGB")) - rgb_white = cast(Sequence[int], _color(white, "RGB")) - rgb_mid = cast(Sequence[int], _color(mid, "RGB")) if mid is not None else None - - # Empty lists for the mapping - red = [] - green = [] - blue = [] - - # Create the low-end values - for i in range(blackpoint): - red.append(rgb_black[0]) - green.append(rgb_black[1]) - blue.append(rgb_black[2]) - - # Create the mapping (2-color) - if rgb_mid is None: - range_map = range(whitepoint - blackpoint) - - for i in range_map: - red.append( - rgb_black[0] + i * (rgb_white[0] - rgb_black[0]) // len(range_map) - ) - green.append( - rgb_black[1] + i * (rgb_white[1] - rgb_black[1]) // len(range_map) - ) - blue.append( - rgb_black[2] + i * (rgb_white[2] - rgb_black[2]) // len(range_map) - ) - - # Create the mapping (3-color) - else: - range_map1 = range(midpoint - blackpoint) - range_map2 = range(whitepoint - midpoint) - - for i in range_map1: - red.append( - rgb_black[0] + i * (rgb_mid[0] - rgb_black[0]) // len(range_map1) - ) - green.append( - rgb_black[1] + i * (rgb_mid[1] - rgb_black[1]) // len(range_map1) - ) - blue.append( - rgb_black[2] + i * (rgb_mid[2] - rgb_black[2]) // len(range_map1) - ) - for i in range_map2: - red.append(rgb_mid[0] + i * (rgb_white[0] - rgb_mid[0]) // len(range_map2)) - green.append( - rgb_mid[1] + i * (rgb_white[1] - rgb_mid[1]) // len(range_map2) - ) - blue.append(rgb_mid[2] + i * (rgb_white[2] - rgb_mid[2]) // len(range_map2)) - - # Create the high-end values - for i in range(256 - whitepoint): - red.append(rgb_white[0]) - green.append(rgb_white[1]) - blue.append(rgb_white[2]) - - # Return converted image - image = image.convert("RGB") - return _lut(image, red + green + blue) - - -def contain( - image: Image.Image, size: tuple[int, int], method: int = Image.Resampling.BICUBIC -) -> Image.Image: - """ - Returns a resized version of the image, set to the maximum width and height - within the requested size, while maintaining the original aspect ratio. - - :param image: The image to resize. - :param size: The requested output size in pixels, given as a - (width, height) tuple. - :param method: Resampling method to use. Default is - :py:attr:`~PIL.Image.Resampling.BICUBIC`. - See :ref:`concept-filters`. - :return: An image. - """ - - im_ratio = image.width / image.height - dest_ratio = size[0] / size[1] - - if im_ratio != dest_ratio: - if im_ratio > dest_ratio: - new_height = round(image.height / image.width * size[0]) - if new_height != size[1]: - size = (size[0], new_height) - else: - new_width = round(image.width / image.height * size[1]) - if new_width != size[0]: - size = (new_width, size[1]) - return image.resize(size, resample=method) - - -def cover( - image: Image.Image, size: tuple[int, int], method: int = Image.Resampling.BICUBIC -) -> Image.Image: - """ - Returns a resized version of the image, so that the requested size is - covered, while maintaining the original aspect ratio. - - :param image: The image to resize. - :param size: The requested output size in pixels, given as a - (width, height) tuple. - :param method: Resampling method to use. Default is - :py:attr:`~PIL.Image.Resampling.BICUBIC`. - See :ref:`concept-filters`. - :return: An image. - """ - - im_ratio = image.width / image.height - dest_ratio = size[0] / size[1] - - if im_ratio != dest_ratio: - if im_ratio < dest_ratio: - new_height = round(image.height / image.width * size[0]) - if new_height != size[1]: - size = (size[0], new_height) - else: - new_width = round(image.width / image.height * size[1]) - if new_width != size[0]: - size = (new_width, size[1]) - return image.resize(size, resample=method) - - -def pad( - image: Image.Image, - size: tuple[int, int], - method: int = Image.Resampling.BICUBIC, - color: str | int | tuple[int, ...] | None = None, - centering: tuple[float, float] = (0.5, 0.5), -) -> Image.Image: - """ - Returns a resized and padded version of the image, expanded to fill the - requested aspect ratio and size. - - :param image: The image to resize and crop. - :param size: The requested output size in pixels, given as a - (width, height) tuple. - :param method: Resampling method to use. Default is - :py:attr:`~PIL.Image.Resampling.BICUBIC`. - See :ref:`concept-filters`. - :param color: The background color of the padded image. - :param centering: Control the position of the original image within the - padded version. - - (0.5, 0.5) will keep the image centered - (0, 0) will keep the image aligned to the top left - (1, 1) will keep the image aligned to the bottom - right - :return: An image. - """ - - resized = contain(image, size, method) - if resized.size == size: - out = resized - else: - out = Image.new(image.mode, size, color) - if resized.palette: - palette = resized.getpalette() - if palette is not None: - out.putpalette(palette) - if resized.width != size[0]: - x = round((size[0] - resized.width) * max(0, min(centering[0], 1))) - out.paste(resized, (x, 0)) - else: - y = round((size[1] - resized.height) * max(0, min(centering[1], 1))) - out.paste(resized, (0, y)) - return out - - -def crop(image: Image.Image, border: int = 0) -> Image.Image: - """ - Remove border from image. The same amount of pixels are removed - from all four sides. This function works on all image modes. - - .. seealso:: :py:meth:`~PIL.Image.Image.crop` - - :param image: The image to crop. - :param border: The number of pixels to remove. - :return: An image. - """ - left, top, right, bottom = _border(border) - return image.crop((left, top, image.size[0] - right, image.size[1] - bottom)) - - -def scale( - image: Image.Image, factor: float, resample: int = Image.Resampling.BICUBIC -) -> Image.Image: - """ - Returns a rescaled image by a specific factor given in parameter. - A factor greater than 1 expands the image, between 0 and 1 contracts the - image. - - :param image: The image to rescale. - :param factor: The expansion factor, as a float. - :param resample: Resampling method to use. Default is - :py:attr:`~PIL.Image.Resampling.BICUBIC`. - See :ref:`concept-filters`. - :returns: An :py:class:`~PIL.Image.Image` object. - """ - if factor == 1: - return image.copy() - elif factor <= 0: - msg = "the factor must be greater than 0" - raise ValueError(msg) - else: - size = (round(factor * image.width), round(factor * image.height)) - return image.resize(size, resample) - - -class SupportsGetMesh(Protocol): - """ - An object that supports the ``getmesh`` method, taking an image as an - argument, and returning a list of tuples. Each tuple contains two tuples, - the source box as a tuple of 4 integers, and a tuple of 8 integers for the - final quadrilateral, in order of top left, bottom left, bottom right, top - right. - """ - - def getmesh( - self, image: Image.Image - ) -> list[ - tuple[tuple[int, int, int, int], tuple[int, int, int, int, int, int, int, int]] - ]: ... - - -def deform( - image: Image.Image, - deformer: SupportsGetMesh, - resample: int = Image.Resampling.BILINEAR, -) -> Image.Image: - """ - Deform the image. - - :param image: The image to deform. - :param deformer: A deformer object. Any object that implements a - ``getmesh`` method can be used. - :param resample: An optional resampling filter. Same values possible as - in the PIL.Image.transform function. - :return: An image. - """ - return image.transform( - image.size, Image.Transform.MESH, deformer.getmesh(image), resample - ) - - -def equalize(image: Image.Image, mask: Image.Image | None = None) -> Image.Image: - """ - Equalize the image histogram. This function applies a non-linear - mapping to the input image, in order to create a uniform - distribution of grayscale values in the output image. - - :param image: The image to equalize. - :param mask: An optional mask. If given, only the pixels selected by - the mask are included in the analysis. - :return: An image. - """ - if image.mode == "P": - image = image.convert("RGB") - h = image.histogram(mask) - lut = [] - for b in range(0, len(h), 256): - histo = [_f for _f in h[b : b + 256] if _f] - if len(histo) <= 1: - lut.extend(list(range(256))) - else: - step = (functools.reduce(operator.add, histo) - histo[-1]) // 255 - if not step: - lut.extend(list(range(256))) - else: - n = step // 2 - for i in range(256): - lut.append(n // step) - n = n + h[i + b] - return _lut(image, lut) - - -def expand( - image: Image.Image, - border: int | tuple[int, ...] = 0, - fill: str | int | tuple[int, ...] = 0, -) -> Image.Image: - """ - Add border to the image - - :param image: The image to expand. - :param border: Border width, in pixels. - :param fill: Pixel fill value (a color value). Default is 0 (black). - :return: An image. - """ - left, top, right, bottom = _border(border) - width = left + image.size[0] + right - height = top + image.size[1] + bottom - color = _color(fill, image.mode) - if image.palette: - mode = image.palette.mode - palette = ImagePalette.ImagePalette(mode, image.getpalette(mode)) - if isinstance(color, tuple) and (len(color) == 3 or len(color) == 4): - color = palette.getcolor(color) - else: - palette = None - out = Image.new(image.mode, (width, height), color) - if palette: - out.putpalette(palette.palette, mode) - out.paste(image, (left, top)) - return out - - -def fit( - image: Image.Image, - size: tuple[int, int], - method: int = Image.Resampling.BICUBIC, - bleed: float = 0.0, - centering: tuple[float, float] = (0.5, 0.5), -) -> Image.Image: - """ - Returns a resized and cropped version of the image, cropped to the - requested aspect ratio and size. - - This function was contributed by Kevin Cazabon. - - :param image: The image to resize and crop. - :param size: The requested output size in pixels, given as a - (width, height) tuple. - :param method: Resampling method to use. Default is - :py:attr:`~PIL.Image.Resampling.BICUBIC`. - See :ref:`concept-filters`. - :param bleed: Remove a border around the outside of the image from all - four edges. The value is a decimal percentage (use 0.01 for - one percent). The default value is 0 (no border). - Cannot be greater than or equal to 0.5. - :param centering: Control the cropping position. Use (0.5, 0.5) for - center cropping (e.g. if cropping the width, take 50% off - of the left side, and therefore 50% off the right side). - (0.0, 0.0) will crop from the top left corner (i.e. if - cropping the width, take all of the crop off of the right - side, and if cropping the height, take all of it off the - bottom). (1.0, 0.0) will crop from the bottom left - corner, etc. (i.e. if cropping the width, take all of the - crop off the left side, and if cropping the height take - none from the top, and therefore all off the bottom). - :return: An image. - """ - - # by Kevin Cazabon, Feb 17/2000 - # kevin@cazabon.com - # https://www.cazabon.com - - centering_x, centering_y = centering - - if not 0.0 <= centering_x <= 1.0: - centering_x = 0.5 - if not 0.0 <= centering_y <= 1.0: - centering_y = 0.5 - - if not 0.0 <= bleed < 0.5: - bleed = 0.0 - - # calculate the area to use for resizing and cropping, subtracting - # the 'bleed' around the edges - - # number of pixels to trim off on Top and Bottom, Left and Right - bleed_pixels = (bleed * image.size[0], bleed * image.size[1]) - - live_size = ( - image.size[0] - bleed_pixels[0] * 2, - image.size[1] - bleed_pixels[1] * 2, - ) - - # calculate the aspect ratio of the live_size - live_size_ratio = live_size[0] / live_size[1] - - # calculate the aspect ratio of the output image - output_ratio = size[0] / size[1] - - # figure out if the sides or top/bottom will be cropped off - if live_size_ratio == output_ratio: - # live_size is already the needed ratio - crop_width = live_size[0] - crop_height = live_size[1] - elif live_size_ratio >= output_ratio: - # live_size is wider than what's needed, crop the sides - crop_width = output_ratio * live_size[1] - crop_height = live_size[1] - else: - # live_size is taller than what's needed, crop the top and bottom - crop_width = live_size[0] - crop_height = live_size[0] / output_ratio - - # make the crop - crop_left = bleed_pixels[0] + (live_size[0] - crop_width) * centering_x - crop_top = bleed_pixels[1] + (live_size[1] - crop_height) * centering_y - - crop = (crop_left, crop_top, crop_left + crop_width, crop_top + crop_height) - - # resize the image and return it - return image.resize(size, method, box=crop) - - -def flip(image: Image.Image) -> Image.Image: - """ - Flip the image vertically (top to bottom). - - :param image: The image to flip. - :return: An image. - """ - return image.transpose(Image.Transpose.FLIP_TOP_BOTTOM) - - -def grayscale(image: Image.Image) -> Image.Image: - """ - Convert the image to grayscale. - - :param image: The image to convert. - :return: An image. - """ - return image.convert("L") - - -def invert(image: Image.Image) -> Image.Image: - """ - Invert (negate) the image. - - :param image: The image to invert. - :return: An image. - """ - lut = list(range(255, -1, -1)) - return image.point(lut) if image.mode == "1" else _lut(image, lut) - - -def mirror(image: Image.Image) -> Image.Image: - """ - Flip image horizontally (left to right). - - :param image: The image to mirror. - :return: An image. - """ - return image.transpose(Image.Transpose.FLIP_LEFT_RIGHT) - - -def posterize(image: Image.Image, bits: int) -> Image.Image: - """ - Reduce the number of bits for each color channel. - - :param image: The image to posterize. - :param bits: The number of bits to keep for each channel (1-8). - :return: An image. - """ - mask = ~(2 ** (8 - bits) - 1) - lut = [i & mask for i in range(256)] - return _lut(image, lut) - - -def solarize(image: Image.Image, threshold: int = 128) -> Image.Image: - """ - Invert all pixel values above a threshold. - - :param image: The image to solarize. - :param threshold: All pixels above this grayscale level are inverted. - :return: An image. - """ - lut = [] - for i in range(256): - if i < threshold: - lut.append(i) - else: - lut.append(255 - i) - return _lut(image, lut) - - -@overload -def exif_transpose(image: Image.Image, *, in_place: Literal[True]) -> None: ... - - -@overload -def exif_transpose( - image: Image.Image, *, in_place: Literal[False] = False -) -> Image.Image: ... - - -def exif_transpose(image: Image.Image, *, in_place: bool = False) -> Image.Image | None: - """ - If an image has an EXIF Orientation tag, other than 1, transpose the image - accordingly, and remove the orientation data. - - :param image: The image to transpose. - :param in_place: Boolean. Keyword-only argument. - If ``True``, the original image is modified in-place, and ``None`` is returned. - If ``False`` (default), a new :py:class:`~PIL.Image.Image` object is returned - with the transposition applied. If there is no transposition, a copy of the - image will be returned. - """ - image.load() - image_exif = image.getexif() - orientation = image_exif.get(ExifTags.Base.Orientation, 1) - method = { - 2: Image.Transpose.FLIP_LEFT_RIGHT, - 3: Image.Transpose.ROTATE_180, - 4: Image.Transpose.FLIP_TOP_BOTTOM, - 5: Image.Transpose.TRANSPOSE, - 6: Image.Transpose.ROTATE_270, - 7: Image.Transpose.TRANSVERSE, - 8: Image.Transpose.ROTATE_90, - }.get(orientation) - if method is not None: - if in_place: - image.im = image.im.transpose(method) - image._size = image.im.size - else: - transposed_image = image.transpose(method) - exif_image = image if in_place else transposed_image - - exif = exif_image.getexif() - if ExifTags.Base.Orientation in exif: - del exif[ExifTags.Base.Orientation] - if "exif" in exif_image.info: - exif_image.info["exif"] = exif.tobytes() - elif "Raw profile type exif" in exif_image.info: - exif_image.info["Raw profile type exif"] = exif.tobytes().hex() - for key in ("XML:com.adobe.xmp", "xmp"): - if key in exif_image.info: - for pattern in ( - r'tiff:Orientation="([0-9])"', - r"([0-9])", - ): - value = exif_image.info[key] - if isinstance(value, str): - value = re.sub(pattern, "", value) - elif isinstance(value, tuple): - value = tuple( - re.sub(pattern.encode(), b"", v) for v in value - ) - else: - value = re.sub(pattern.encode(), b"", value) - exif_image.info[key] = value - if not in_place: - return transposed_image - elif not in_place: - return image.copy() - return None diff --git a/voxvera/vendor/PIL/ImagePalette.py b/voxvera/vendor/PIL/ImagePalette.py deleted file mode 100644 index eae7aea..0000000 --- a/voxvera/vendor/PIL/ImagePalette.py +++ /dev/null @@ -1,287 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# image palette object -# -# History: -# 1996-03-11 fl Rewritten. -# 1997-01-03 fl Up and running. -# 1997-08-23 fl Added load hack -# 2001-04-16 fl Fixed randint shadow bug in random() -# -# Copyright (c) 1997-2001 by Secret Labs AB -# Copyright (c) 1996-1997 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import array -from collections.abc import Sequence -from typing import IO - -from . import GimpGradientFile, GimpPaletteFile, ImageColor, PaletteFile - -TYPE_CHECKING = False -if TYPE_CHECKING: - from . import Image - - -class ImagePalette: - """ - Color palette for palette mapped images - - :param mode: The mode to use for the palette. See: - :ref:`concept-modes`. Defaults to "RGB" - :param palette: An optional palette. If given, it must be a bytearray, - an array or a list of ints between 0-255. The list must consist of - all channels for one color followed by the next color (e.g. RGBRGBRGB). - Defaults to an empty palette. - """ - - def __init__( - self, - mode: str = "RGB", - palette: Sequence[int] | bytes | bytearray | None = None, - ) -> None: - self.mode = mode - self.rawmode: str | None = None # if set, palette contains raw data - self.palette = palette or bytearray() - self.dirty: int | None = None - - @property - def palette(self) -> Sequence[int] | bytes | bytearray: - return self._palette - - @palette.setter - def palette(self, palette: Sequence[int] | bytes | bytearray) -> None: - self._colors: dict[tuple[int, ...], int] | None = None - self._palette = palette - - @property - def colors(self) -> dict[tuple[int, ...], int]: - if self._colors is None: - mode_len = len(self.mode) - self._colors = {} - for i in range(0, len(self.palette), mode_len): - color = tuple(self.palette[i : i + mode_len]) - if color in self._colors: - continue - self._colors[color] = i // mode_len - return self._colors - - @colors.setter - def colors(self, colors: dict[tuple[int, ...], int]) -> None: - self._colors = colors - - def copy(self) -> ImagePalette: - new = ImagePalette() - - new.mode = self.mode - new.rawmode = self.rawmode - if self.palette is not None: - new.palette = self.palette[:] - new.dirty = self.dirty - - return new - - def getdata(self) -> tuple[str, Sequence[int] | bytes | bytearray]: - """ - Get palette contents in format suitable for the low-level - ``im.putpalette`` primitive. - - .. warning:: This method is experimental. - """ - if self.rawmode: - return self.rawmode, self.palette - return self.mode, self.tobytes() - - def tobytes(self) -> bytes: - """Convert palette to bytes. - - .. warning:: This method is experimental. - """ - if self.rawmode: - msg = "palette contains raw palette data" - raise ValueError(msg) - if isinstance(self.palette, bytes): - return self.palette - arr = array.array("B", self.palette) - return arr.tobytes() - - # Declare tostring as an alias for tobytes - tostring = tobytes - - def _new_color_index( - self, image: Image.Image | None = None, e: Exception | None = None - ) -> int: - if not isinstance(self.palette, bytearray): - self._palette = bytearray(self.palette) - index = len(self.palette) // len(self.mode) - special_colors: tuple[int | tuple[int, ...] | None, ...] = () - if image: - special_colors = ( - image.info.get("background"), - image.info.get("transparency"), - ) - while index in special_colors: - index += 1 - if index >= 256: - if image: - # Search for an unused index - for i, count in reversed(list(enumerate(image.histogram()))): - if count == 0 and i not in special_colors: - index = i - break - if index >= 256: - msg = "cannot allocate more than 256 colors" - raise ValueError(msg) from e - return index - - def getcolor( - self, - color: tuple[int, ...], - image: Image.Image | None = None, - ) -> int: - """Given an rgb tuple, allocate palette entry. - - .. warning:: This method is experimental. - """ - if self.rawmode: - msg = "palette contains raw palette data" - raise ValueError(msg) - if isinstance(color, tuple): - if self.mode == "RGB": - if len(color) == 4: - if color[3] != 255: - msg = "cannot add non-opaque RGBA color to RGB palette" - raise ValueError(msg) - color = color[:3] - elif self.mode == "RGBA": - if len(color) == 3: - color += (255,) - try: - return self.colors[color] - except KeyError as e: - # allocate new color slot - index = self._new_color_index(image, e) - assert isinstance(self._palette, bytearray) - self.colors[color] = index - mode_len = len(self.mode) - if index * mode_len < len(self.palette): - self._palette = ( - self._palette[: index * mode_len] - + bytes(color) - + self._palette[index * mode_len + mode_len :] - ) - else: - self._palette += bytes(color) - self.dirty = 1 - return index - else: - msg = f"unknown color specifier: {repr(color)}" # type: ignore[unreachable] - raise ValueError(msg) - - def save(self, fp: str | IO[str]) -> None: - """Save palette to text file. - - .. warning:: This method is experimental. - """ - if self.rawmode: - msg = "palette contains raw palette data" - raise ValueError(msg) - if isinstance(fp, str): - fp = open(fp, "w") - fp.write("# Palette\n") - fp.write(f"# Mode: {self.mode}\n") - for i in range(256): - fp.write(f"{i}") - for j in range(i * len(self.mode), (i + 1) * len(self.mode)): - try: - fp.write(f" {self.palette[j]}") - except IndexError: - fp.write(" 0") - fp.write("\n") - fp.close() - - -# -------------------------------------------------------------------- -# Internal - - -def raw(rawmode: str, data: Sequence[int] | bytes | bytearray) -> ImagePalette: - palette = ImagePalette() - palette.rawmode = rawmode - palette.palette = data - palette.dirty = 1 - return palette - - -# -------------------------------------------------------------------- -# Factories - - -def make_linear_lut(black: int, white: float) -> list[int]: - if black == 0: - return [int(white * i // 255) for i in range(256)] - - msg = "unavailable when black is non-zero" - raise NotImplementedError(msg) # FIXME - - -def make_gamma_lut(exp: float) -> list[int]: - return [int(((i / 255.0) ** exp) * 255.0 + 0.5) for i in range(256)] - - -def negative(mode: str = "RGB") -> ImagePalette: - palette = list(range(256 * len(mode))) - palette.reverse() - return ImagePalette(mode, [i // len(mode) for i in palette]) - - -def random(mode: str = "RGB") -> ImagePalette: - from random import randint - - palette = [randint(0, 255) for _ in range(256 * len(mode))] - return ImagePalette(mode, palette) - - -def sepia(white: str = "#fff0c0") -> ImagePalette: - bands = [make_linear_lut(0, band) for band in ImageColor.getrgb(white)] - return ImagePalette("RGB", [bands[i % 3][i // 3] for i in range(256 * 3)]) - - -def wedge(mode: str = "RGB") -> ImagePalette: - palette = list(range(256 * len(mode))) - return ImagePalette(mode, [i // len(mode) for i in palette]) - - -def load(filename: str) -> tuple[bytes, str]: - # FIXME: supports GIMP gradients only - - with open(filename, "rb") as fp: - paletteHandlers: list[ - type[ - GimpPaletteFile.GimpPaletteFile - | GimpGradientFile.GimpGradientFile - | PaletteFile.PaletteFile - ] - ] = [ - GimpPaletteFile.GimpPaletteFile, - GimpGradientFile.GimpGradientFile, - PaletteFile.PaletteFile, - ] - for paletteHandler in paletteHandlers: - try: - fp.seek(0) - lut = paletteHandler(fp).getpalette() - if lut: - break - except (SyntaxError, ValueError): - pass - else: - msg = "cannot load palette" - raise OSError(msg) - - return lut # data, rawmode diff --git a/voxvera/vendor/PIL/ImagePath.py b/voxvera/vendor/PIL/ImagePath.py deleted file mode 100644 index 77e8a60..0000000 --- a/voxvera/vendor/PIL/ImagePath.py +++ /dev/null @@ -1,20 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# path interface -# -# History: -# 1996-11-04 fl Created -# 2002-04-14 fl Added documentation stub class -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1996. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import Image - -Path = Image.core.path diff --git a/voxvera/vendor/PIL/ImageQt.py b/voxvera/vendor/PIL/ImageQt.py deleted file mode 100644 index af4d074..0000000 --- a/voxvera/vendor/PIL/ImageQt.py +++ /dev/null @@ -1,219 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# a simple Qt image interface. -# -# history: -# 2006-06-03 fl: created -# 2006-06-04 fl: inherit from QImage instead of wrapping it -# 2006-06-05 fl: removed toimage helper; move string support to ImageQt -# 2013-11-13 fl: add support for Qt5 (aurelien.ballier@cyclonit.com) -# -# Copyright (c) 2006 by Secret Labs AB -# Copyright (c) 2006 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import sys -from io import BytesIO - -from . import Image -from ._util import is_path - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - from typing import Any - - from . import ImageFile - - QBuffer: type - -qt_version: str | None -qt_versions = [ - ["6", "PyQt6"], - ["side6", "PySide6"], -] - -# If a version has already been imported, attempt it first -qt_versions.sort(key=lambda version: version[1] in sys.modules, reverse=True) -for version, qt_module in qt_versions: - try: - qRgba: Callable[[int, int, int, int], int] - if qt_module == "PyQt6": - from PyQt6.QtCore import QBuffer, QByteArray, QIODevice - from PyQt6.QtGui import QImage, QPixmap, qRgba - elif qt_module == "PySide6": - from PySide6.QtCore import ( # type: ignore[assignment] - QBuffer, - QByteArray, - QIODevice, - ) - from PySide6.QtGui import QImage, QPixmap, qRgba # type: ignore[assignment] - except (ImportError, RuntimeError): - continue - qt_is_installed = True - qt_version = version - break -else: - qt_is_installed = False - qt_version = None - - -def rgb(r: int, g: int, b: int, a: int = 255) -> int: - """(Internal) Turns an RGB color into a Qt compatible color integer.""" - # use qRgb to pack the colors, and then turn the resulting long - # into a negative integer with the same bitpattern. - return qRgba(r, g, b, a) & 0xFFFFFFFF - - -def fromqimage(im: QImage | QPixmap) -> ImageFile.ImageFile: - """ - :param im: QImage or PIL ImageQt object - """ - buffer = QBuffer() - qt_openmode: object - if qt_version == "6": - try: - qt_openmode = getattr(QIODevice, "OpenModeFlag") - except AttributeError: - qt_openmode = getattr(QIODevice, "OpenMode") - else: - qt_openmode = QIODevice - buffer.open(getattr(qt_openmode, "ReadWrite")) - # preserve alpha channel with png - # otherwise ppm is more friendly with Image.open - if im.hasAlphaChannel(): - im.save(buffer, "png") - else: - im.save(buffer, "ppm") - - b = BytesIO() - b.write(buffer.data()) - buffer.close() - b.seek(0) - - return Image.open(b) - - -def fromqpixmap(im: QPixmap) -> ImageFile.ImageFile: - return fromqimage(im) - - -def align8to32(bytes: bytes, width: int, mode: str) -> bytes: - """ - converts each scanline of data from 8 bit to 32 bit aligned - """ - - bits_per_pixel = {"1": 1, "L": 8, "P": 8, "I;16": 16}[mode] - - # calculate bytes per line and the extra padding if needed - bits_per_line = bits_per_pixel * width - full_bytes_per_line, remaining_bits_per_line = divmod(bits_per_line, 8) - bytes_per_line = full_bytes_per_line + (1 if remaining_bits_per_line else 0) - - extra_padding = -bytes_per_line % 4 - - # already 32 bit aligned by luck - if not extra_padding: - return bytes - - new_data = [ - bytes[i * bytes_per_line : (i + 1) * bytes_per_line] + b"\x00" * extra_padding - for i in range(len(bytes) // bytes_per_line) - ] - - return b"".join(new_data) - - -def _toqclass_helper(im: Image.Image | str | QByteArray) -> dict[str, Any]: - data = None - colortable = None - exclusive_fp = False - - # handle filename, if given instead of image name - if hasattr(im, "toUtf8"): - # FIXME - is this really the best way to do this? - im = str(im.toUtf8(), "utf-8") - if is_path(im): - im = Image.open(im) - exclusive_fp = True - assert isinstance(im, Image.Image) - - qt_format = getattr(QImage, "Format") if qt_version == "6" else QImage - if im.mode == "1": - format = getattr(qt_format, "Format_Mono") - elif im.mode == "L": - format = getattr(qt_format, "Format_Indexed8") - colortable = [rgb(i, i, i) for i in range(256)] - elif im.mode == "P": - format = getattr(qt_format, "Format_Indexed8") - palette = im.getpalette() - assert palette is not None - colortable = [rgb(*palette[i : i + 3]) for i in range(0, len(palette), 3)] - elif im.mode == "RGB": - # Populate the 4th channel with 255 - im = im.convert("RGBA") - - data = im.tobytes("raw", "BGRA") - format = getattr(qt_format, "Format_RGB32") - elif im.mode == "RGBA": - data = im.tobytes("raw", "BGRA") - format = getattr(qt_format, "Format_ARGB32") - elif im.mode == "I;16": - im = im.point(lambda i: i * 256) - - format = getattr(qt_format, "Format_Grayscale16") - else: - if exclusive_fp: - im.close() - msg = f"unsupported image mode {repr(im.mode)}" - raise ValueError(msg) - - size = im.size - __data = data or align8to32(im.tobytes(), size[0], im.mode) - if exclusive_fp: - im.close() - return {"data": __data, "size": size, "format": format, "colortable": colortable} - - -if qt_is_installed: - - class ImageQt(QImage): - def __init__(self, im: Image.Image | str | QByteArray) -> None: - """ - An PIL image wrapper for Qt. This is a subclass of PyQt's QImage - class. - - :param im: A PIL Image object, or a file name (given either as - Python string or a PyQt string object). - """ - im_data = _toqclass_helper(im) - # must keep a reference, or Qt will crash! - # All QImage constructors that take data operate on an existing - # buffer, so this buffer has to hang on for the life of the image. - # Fixes https://github.com/python-pillow/Pillow/issues/1370 - self.__data = im_data["data"] - super().__init__( - self.__data, - im_data["size"][0], - im_data["size"][1], - im_data["format"], - ) - if im_data["colortable"]: - self.setColorTable(im_data["colortable"]) - - -def toqimage(im: Image.Image | str | QByteArray) -> ImageQt: - return ImageQt(im) - - -def toqpixmap(im: Image.Image | str | QByteArray) -> QPixmap: - qimage = toqimage(im) - pixmap = getattr(QPixmap, "fromImage")(qimage) - if qt_version == "6": - pixmap.detach() - return pixmap diff --git a/voxvera/vendor/PIL/ImageSequence.py b/voxvera/vendor/PIL/ImageSequence.py deleted file mode 100644 index 361be48..0000000 --- a/voxvera/vendor/PIL/ImageSequence.py +++ /dev/null @@ -1,88 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# sequence support classes -# -# history: -# 1997-02-20 fl Created -# -# Copyright (c) 1997 by Secret Labs AB. -# Copyright (c) 1997 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# - -## -from __future__ import annotations - -from . import Image - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - - -class Iterator: - """ - This class implements an iterator object that can be used to loop - over an image sequence. - - You can use the ``[]`` operator to access elements by index. This operator - will raise an :py:exc:`IndexError` if you try to access a nonexistent - frame. - - :param im: An image object. - """ - - def __init__(self, im: Image.Image) -> None: - if not hasattr(im, "seek"): - msg = "im must have seek method" - raise AttributeError(msg) - self.im = im - self.position = getattr(self.im, "_min_frame", 0) - - def __getitem__(self, ix: int) -> Image.Image: - try: - self.im.seek(ix) - return self.im - except EOFError as e: - msg = "end of sequence" - raise IndexError(msg) from e - - def __iter__(self) -> Iterator: - return self - - def __next__(self) -> Image.Image: - try: - self.im.seek(self.position) - self.position += 1 - return self.im - except EOFError as e: - msg = "end of sequence" - raise StopIteration(msg) from e - - -def all_frames( - im: Image.Image | list[Image.Image], - func: Callable[[Image.Image], Image.Image] | None = None, -) -> list[Image.Image]: - """ - Applies a given function to all frames in an image or a list of images. - The frames are returned as a list of separate images. - - :param im: An image, or a list of images. - :param func: The function to apply to all of the image frames. - :returns: A list of images. - """ - if not isinstance(im, list): - im = [im] - - ims = [] - for imSequence in im: - current = imSequence.tell() - - ims += [im_frame.copy() for im_frame in Iterator(imSequence)] - - imSequence.seek(current) - return [func(im) for im in ims] if func else ims diff --git a/voxvera/vendor/PIL/ImageShow.py b/voxvera/vendor/PIL/ImageShow.py deleted file mode 100644 index 7705608..0000000 --- a/voxvera/vendor/PIL/ImageShow.py +++ /dev/null @@ -1,362 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# im.show() drivers -# -# History: -# 2008-04-06 fl Created -# -# Copyright (c) Secret Labs AB 2008. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import abc -import os -import shutil -import subprocess -import sys -from shlex import quote -from typing import Any - -from . import Image - -_viewers = [] - - -def register(viewer: type[Viewer] | Viewer, order: int = 1) -> None: - """ - The :py:func:`register` function is used to register additional viewers:: - - from PIL import ImageShow - ImageShow.register(MyViewer()) # MyViewer will be used as a last resort - ImageShow.register(MySecondViewer(), 0) # MySecondViewer will be prioritised - ImageShow.register(ImageShow.XVViewer(), 0) # XVViewer will be prioritised - - :param viewer: The viewer to be registered. - :param order: - Zero or a negative integer to prepend this viewer to the list, - a positive integer to append it. - """ - if isinstance(viewer, type) and issubclass(viewer, Viewer): - viewer = viewer() - if order > 0: - _viewers.append(viewer) - else: - _viewers.insert(0, viewer) - - -def show(image: Image.Image, title: str | None = None, **options: Any) -> bool: - r""" - Display a given image. - - :param image: An image object. - :param title: Optional title. Not all viewers can display the title. - :param \**options: Additional viewer options. - :returns: ``True`` if a suitable viewer was found, ``False`` otherwise. - """ - for viewer in _viewers: - if viewer.show(image, title=title, **options): - return True - return False - - -class Viewer: - """Base class for viewers.""" - - # main api - - def show(self, image: Image.Image, **options: Any) -> int: - """ - The main function for displaying an image. - Converts the given image to the target format and displays it. - """ - - if not ( - image.mode in ("1", "RGBA") - or (self.format == "PNG" and image.mode in ("I;16", "LA")) - ): - base = Image.getmodebase(image.mode) - if image.mode != base: - image = image.convert(base) - - return self.show_image(image, **options) - - # hook methods - - format: str | None = None - """The format to convert the image into.""" - options: dict[str, Any] = {} - """Additional options used to convert the image.""" - - def get_format(self, image: Image.Image) -> str | None: - """Return format name, or ``None`` to save as PGM/PPM.""" - return self.format - - def get_command(self, file: str, **options: Any) -> str: - """ - Returns the command used to display the file. - Not implemented in the base class. - """ - msg = "unavailable in base viewer" - raise NotImplementedError(msg) - - def save_image(self, image: Image.Image) -> str: - """Save to temporary file and return filename.""" - return image._dump(format=self.get_format(image), **self.options) - - def show_image(self, image: Image.Image, **options: Any) -> int: - """Display the given image.""" - return self.show_file(self.save_image(image), **options) - - def show_file(self, path: str, **options: Any) -> int: - """ - Display given file. - """ - if not os.path.exists(path): - raise FileNotFoundError - os.system(self.get_command(path, **options)) # nosec - return 1 - - -# -------------------------------------------------------------------- - - -class WindowsViewer(Viewer): - """The default viewer on Windows is the default system application for PNG files.""" - - format = "PNG" - options = {"compress_level": 1, "save_all": True} - - def get_command(self, file: str, **options: Any) -> str: - return ( - f'start "Pillow" /WAIT "{file}" ' - "&& ping -n 4 127.0.0.1 >NUL " - f'&& del /f "{file}"' - ) - - def show_file(self, path: str, **options: Any) -> int: - """ - Display given file. - """ - if not os.path.exists(path): - raise FileNotFoundError - subprocess.Popen( - self.get_command(path, **options), - shell=True, - creationflags=getattr(subprocess, "CREATE_NO_WINDOW"), - ) # nosec - return 1 - - -if sys.platform == "win32": - register(WindowsViewer) - - -class MacViewer(Viewer): - """The default viewer on macOS using ``Preview.app``.""" - - format = "PNG" - options = {"compress_level": 1, "save_all": True} - - def get_command(self, file: str, **options: Any) -> str: - # on darwin open returns immediately resulting in the temp - # file removal while app is opening - command = "open -a Preview.app" - command = f"({command} {quote(file)}; sleep 20; rm -f {quote(file)})&" - return command - - def show_file(self, path: str, **options: Any) -> int: - """ - Display given file. - """ - if not os.path.exists(path): - raise FileNotFoundError - subprocess.call(["open", "-a", "Preview.app", path]) - - pyinstaller = getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS") - executable = (not pyinstaller and sys.executable) or shutil.which("python3") - if executable: - subprocess.Popen( - [ - executable, - "-c", - "import os, sys, time; time.sleep(20); os.remove(sys.argv[1])", - path, - ] - ) - return 1 - - -if sys.platform == "darwin": - register(MacViewer) - - -class UnixViewer(abc.ABC, Viewer): - format = "PNG" - options = {"compress_level": 1, "save_all": True} - - @abc.abstractmethod - def get_command_ex(self, file: str, **options: Any) -> tuple[str, str]: - pass - - def get_command(self, file: str, **options: Any) -> str: - command = self.get_command_ex(file, **options)[0] - return f"{command} {quote(file)}" - - -class XDGViewer(UnixViewer): - """ - The freedesktop.org ``xdg-open`` command. - """ - - def get_command_ex(self, file: str, **options: Any) -> tuple[str, str]: - command = executable = "xdg-open" - return command, executable - - def show_file(self, path: str, **options: Any) -> int: - """ - Display given file. - """ - if not os.path.exists(path): - raise FileNotFoundError - subprocess.Popen(["xdg-open", path]) - return 1 - - -class DisplayViewer(UnixViewer): - """ - The ImageMagick ``display`` command. - This viewer supports the ``title`` parameter. - """ - - def get_command_ex( - self, file: str, title: str | None = None, **options: Any - ) -> tuple[str, str]: - command = executable = "display" - if title: - command += f" -title {quote(title)}" - return command, executable - - def show_file(self, path: str, **options: Any) -> int: - """ - Display given file. - """ - if not os.path.exists(path): - raise FileNotFoundError - args = ["display"] - title = options.get("title") - if title: - args += ["-title", title] - args.append(path) - - subprocess.Popen(args) - return 1 - - -class GmDisplayViewer(UnixViewer): - """The GraphicsMagick ``gm display`` command.""" - - def get_command_ex(self, file: str, **options: Any) -> tuple[str, str]: - executable = "gm" - command = "gm display" - return command, executable - - def show_file(self, path: str, **options: Any) -> int: - """ - Display given file. - """ - if not os.path.exists(path): - raise FileNotFoundError - subprocess.Popen(["gm", "display", path]) - return 1 - - -class EogViewer(UnixViewer): - """The GNOME Image Viewer ``eog`` command.""" - - def get_command_ex(self, file: str, **options: Any) -> tuple[str, str]: - executable = "eog" - command = "eog -n" - return command, executable - - def show_file(self, path: str, **options: Any) -> int: - """ - Display given file. - """ - if not os.path.exists(path): - raise FileNotFoundError - subprocess.Popen(["eog", "-n", path]) - return 1 - - -class XVViewer(UnixViewer): - """ - The X Viewer ``xv`` command. - This viewer supports the ``title`` parameter. - """ - - def get_command_ex( - self, file: str, title: str | None = None, **options: Any - ) -> tuple[str, str]: - # note: xv is pretty outdated. most modern systems have - # imagemagick's display command instead. - command = executable = "xv" - if title: - command += f" -name {quote(title)}" - return command, executable - - def show_file(self, path: str, **options: Any) -> int: - """ - Display given file. - """ - if not os.path.exists(path): - raise FileNotFoundError - args = ["xv"] - title = options.get("title") - if title: - args += ["-name", title] - args.append(path) - - subprocess.Popen(args) - return 1 - - -if sys.platform not in ("win32", "darwin"): # unixoids - if shutil.which("xdg-open"): - register(XDGViewer) - if shutil.which("display"): - register(DisplayViewer) - if shutil.which("gm"): - register(GmDisplayViewer) - if shutil.which("eog"): - register(EogViewer) - if shutil.which("xv"): - register(XVViewer) - - -class IPythonViewer(Viewer): - """The viewer for IPython frontends.""" - - def show_image(self, image: Image.Image, **options: Any) -> int: - ipython_display(image) - return 1 - - -try: - from IPython.display import display as ipython_display -except ImportError: - pass -else: - register(IPythonViewer) - - -if __name__ == "__main__": - if len(sys.argv) < 2: - print("Syntax: python3 ImageShow.py imagefile [title]") - sys.exit() - - with Image.open(sys.argv[1]) as im: - print(show(im, *sys.argv[2:])) diff --git a/voxvera/vendor/PIL/ImageStat.py b/voxvera/vendor/PIL/ImageStat.py deleted file mode 100644 index 3a1044b..0000000 --- a/voxvera/vendor/PIL/ImageStat.py +++ /dev/null @@ -1,167 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# global image statistics -# -# History: -# 1996-04-05 fl Created -# 1997-05-21 fl Added mask; added rms, var, stddev attributes -# 1997-08-05 fl Added median -# 1998-07-05 hk Fixed integer overflow error -# -# Notes: -# This class shows how to implement delayed evaluation of attributes. -# To get a certain value, simply access the corresponding attribute. -# The __getattr__ dispatcher takes care of the rest. -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1996-97. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import math -from functools import cached_property - -from . import Image - - -class Stat: - def __init__( - self, image_or_list: Image.Image | list[int], mask: Image.Image | None = None - ) -> None: - """ - Calculate statistics for the given image. If a mask is included, - only the regions covered by that mask are included in the - statistics. You can also pass in a previously calculated histogram. - - :param image: A PIL image, or a precalculated histogram. - - .. note:: - - For a PIL image, calculations rely on the - :py:meth:`~PIL.Image.Image.histogram` method. The pixel counts are - grouped into 256 bins, even if the image has more than 8 bits per - channel. So ``I`` and ``F`` mode images have a maximum ``mean``, - ``median`` and ``rms`` of 255, and cannot have an ``extrema`` maximum - of more than 255. - - :param mask: An optional mask. - """ - if isinstance(image_or_list, Image.Image): - self.h = image_or_list.histogram(mask) - elif isinstance(image_or_list, list): - self.h = image_or_list - else: - msg = "first argument must be image or list" # type: ignore[unreachable] - raise TypeError(msg) - self.bands = list(range(len(self.h) // 256)) - - @cached_property - def extrema(self) -> list[tuple[int, int]]: - """ - Min/max values for each band in the image. - - .. note:: - This relies on the :py:meth:`~PIL.Image.Image.histogram` method, and - simply returns the low and high bins used. This is correct for - images with 8 bits per channel, but fails for other modes such as - ``I`` or ``F``. Instead, use :py:meth:`~PIL.Image.Image.getextrema` to - return per-band extrema for the image. This is more correct and - efficient because, for non-8-bit modes, the histogram method uses - :py:meth:`~PIL.Image.Image.getextrema` to determine the bins used. - """ - - def minmax(histogram: list[int]) -> tuple[int, int]: - res_min, res_max = 255, 0 - for i in range(256): - if histogram[i]: - res_min = i - break - for i in range(255, -1, -1): - if histogram[i]: - res_max = i - break - return res_min, res_max - - return [minmax(self.h[i:]) for i in range(0, len(self.h), 256)] - - @cached_property - def count(self) -> list[int]: - """Total number of pixels for each band in the image.""" - return [sum(self.h[i : i + 256]) for i in range(0, len(self.h), 256)] - - @cached_property - def sum(self) -> list[float]: - """Sum of all pixels for each band in the image.""" - - v = [] - for i in range(0, len(self.h), 256): - layer_sum = 0.0 - for j in range(256): - layer_sum += j * self.h[i + j] - v.append(layer_sum) - return v - - @cached_property - def sum2(self) -> list[float]: - """Squared sum of all pixels for each band in the image.""" - - v = [] - for i in range(0, len(self.h), 256): - sum2 = 0.0 - for j in range(256): - sum2 += (j**2) * float(self.h[i + j]) - v.append(sum2) - return v - - @cached_property - def mean(self) -> list[float]: - """Average (arithmetic mean) pixel level for each band in the image.""" - return [self.sum[i] / self.count[i] if self.count[i] else 0 for i in self.bands] - - @cached_property - def median(self) -> list[int]: - """Median pixel level for each band in the image.""" - - v = [] - for i in self.bands: - s = 0 - half = self.count[i] // 2 - b = i * 256 - for j in range(256): - s = s + self.h[b + j] - if s > half: - break - v.append(j) - return v - - @cached_property - def rms(self) -> list[float]: - """RMS (root-mean-square) for each band in the image.""" - return [ - math.sqrt(self.sum2[i] / self.count[i]) if self.count[i] else 0 - for i in self.bands - ] - - @cached_property - def var(self) -> list[float]: - """Variance for each band in the image.""" - return [ - ( - (self.sum2[i] - (self.sum[i] ** 2.0) / self.count[i]) / self.count[i] - if self.count[i] - else 0 - ) - for i in self.bands - ] - - @cached_property - def stddev(self) -> list[float]: - """Standard deviation for each band in the image.""" - return [math.sqrt(self.var[i]) for i in self.bands] - - -Global = Stat # compatibility diff --git a/voxvera/vendor/PIL/ImageText.py b/voxvera/vendor/PIL/ImageText.py deleted file mode 100644 index e6ccd82..0000000 --- a/voxvera/vendor/PIL/ImageText.py +++ /dev/null @@ -1,320 +0,0 @@ -from __future__ import annotations - -from . import ImageFont -from ._typing import _Ink - - -class Text: - def __init__( - self, - text: str | bytes, - font: ( - ImageFont.ImageFont - | ImageFont.FreeTypeFont - | ImageFont.TransposedFont - | None - ) = None, - mode: str = "RGB", - spacing: float = 4, - direction: str | None = None, - features: list[str] | None = None, - language: str | None = None, - ) -> None: - """ - :param text: String to be drawn. - :param font: Either an :py:class:`~PIL.ImageFont.ImageFont` instance, - :py:class:`~PIL.ImageFont.FreeTypeFont` instance, - :py:class:`~PIL.ImageFont.TransposedFont` instance or ``None``. If - ``None``, the default font from :py:meth:`.ImageFont.load_default` - will be used. - :param mode: The image mode this will be used with. - :param spacing: The number of pixels between lines. - :param direction: Direction of the text. It can be ``"rtl"`` (right to left), - ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom). - Requires libraqm. - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional font features - that are not enabled by default, for example ``"dlig"`` or - ``"ss01"``, but can be also used to turn off default font - features, for example ``"-liga"`` to disable ligatures or - ``"-kern"`` to disable kerning. To get all supported - features, see `OpenType docs`_. - Requires libraqm. - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code`_. - Requires libraqm. - """ - self.text = text - self.font = font or ImageFont.load_default() - - self.mode = mode - self.spacing = spacing - self.direction = direction - self.features = features - self.language = language - - self.embedded_color = False - - self.stroke_width: float = 0 - self.stroke_fill: _Ink | None = None - - def embed_color(self) -> None: - """ - Use embedded color glyphs (COLR, CBDT, SBIX). - """ - if self.mode not in ("RGB", "RGBA"): - msg = "Embedded color supported only in RGB and RGBA modes" - raise ValueError(msg) - self.embedded_color = True - - def stroke(self, width: float = 0, fill: _Ink | None = None) -> None: - """ - :param width: The width of the text stroke. - :param fill: Color to use for the text stroke when drawing. If not given, will - default to the ``fill`` parameter from - :py:meth:`.ImageDraw.ImageDraw.text`. - """ - self.stroke_width = width - self.stroke_fill = fill - - def _get_fontmode(self) -> str: - if self.mode in ("1", "P", "I", "F"): - return "1" - elif self.embedded_color: - return "RGBA" - else: - return "L" - - def get_length(self) -> float: - """ - Returns length (in pixels with 1/64 precision) of text. - - This is the amount by which following text should be offset. - Text bounding box may extend past the length in some fonts, - e.g. when using italics or accents. - - The result is returned as a float; it is a whole number if using basic layout. - - Note that the sum of two lengths may not equal the length of a concatenated - string due to kerning. If you need to adjust for kerning, include the following - character and subtract its length. - - For example, instead of:: - - hello = ImageText.Text("Hello", font).get_length() - world = ImageText.Text("World", font).get_length() - helloworld = ImageText.Text("HelloWorld", font).get_length() - assert hello + world == helloworld - - use:: - - hello = ( - ImageText.Text("HelloW", font).get_length() - - ImageText.Text("W", font).get_length() - ) # adjusted for kerning - world = ImageText.Text("World", font).get_length() - helloworld = ImageText.Text("HelloWorld", font).get_length() - assert hello + world == helloworld - - or disable kerning with (requires libraqm):: - - hello = ImageText.Text("Hello", font, features=["-kern"]).get_length() - world = ImageText.Text("World", font, features=["-kern"]).get_length() - helloworld = ImageText.Text( - "HelloWorld", font, features=["-kern"] - ).get_length() - assert hello + world == helloworld - - :return: Either width for horizontal text, or height for vertical text. - """ - if isinstance(self.text, str): - multiline = "\n" in self.text - else: - multiline = b"\n" in self.text - if multiline: - msg = "can't measure length of multiline text" - raise ValueError(msg) - return self.font.getlength( - self.text, - self._get_fontmode(), - self.direction, - self.features, - self.language, - ) - - def _split( - self, xy: tuple[float, float], anchor: str | None, align: str - ) -> list[tuple[tuple[float, float], str, str | bytes]]: - if anchor is None: - anchor = "lt" if self.direction == "ttb" else "la" - elif len(anchor) != 2: - msg = "anchor must be a 2 character string" - raise ValueError(msg) - - lines = ( - self.text.split("\n") - if isinstance(self.text, str) - else self.text.split(b"\n") - ) - if len(lines) == 1: - return [(xy, anchor, self.text)] - - if anchor[1] in "tb" and self.direction != "ttb": - msg = "anchor not supported for multiline text" - raise ValueError(msg) - - fontmode = self._get_fontmode() - line_spacing = ( - self.font.getbbox( - "A", - fontmode, - None, - self.features, - self.language, - self.stroke_width, - )[3] - + self.stroke_width - + self.spacing - ) - - top = xy[1] - parts = [] - if self.direction == "ttb": - left = xy[0] - for line in lines: - parts.append(((left, top), anchor, line)) - left += line_spacing - else: - widths = [] - max_width: float = 0 - for line in lines: - line_width = self.font.getlength( - line, fontmode, self.direction, self.features, self.language - ) - widths.append(line_width) - max_width = max(max_width, line_width) - - if anchor[1] == "m": - top -= (len(lines) - 1) * line_spacing / 2.0 - elif anchor[1] == "d": - top -= (len(lines) - 1) * line_spacing - - idx = -1 - for line in lines: - left = xy[0] - idx += 1 - width_difference = max_width - widths[idx] - - # align by align parameter - if align in ("left", "justify"): - pass - elif align == "center": - left += width_difference / 2.0 - elif align == "right": - left += width_difference - else: - msg = 'align must be "left", "center", "right" or "justify"' - raise ValueError(msg) - - if ( - align == "justify" - and width_difference != 0 - and idx != len(lines) - 1 - ): - words = ( - line.split(" ") if isinstance(line, str) else line.split(b" ") - ) - if len(words) > 1: - # align left by anchor - if anchor[0] == "m": - left -= max_width / 2.0 - elif anchor[0] == "r": - left -= max_width - - word_widths = [ - self.font.getlength( - word, - fontmode, - self.direction, - self.features, - self.language, - ) - for word in words - ] - word_anchor = "l" + anchor[1] - width_difference = max_width - sum(word_widths) - i = 0 - for word in words: - parts.append(((left, top), word_anchor, word)) - left += word_widths[i] + width_difference / (len(words) - 1) - i += 1 - top += line_spacing - continue - - # align left by anchor - if anchor[0] == "m": - left -= width_difference / 2.0 - elif anchor[0] == "r": - left -= width_difference - parts.append(((left, top), anchor, line)) - top += line_spacing - - return parts - - def get_bbox( - self, - xy: tuple[float, float] = (0, 0), - anchor: str | None = None, - align: str = "left", - ) -> tuple[float, float, float, float]: - """ - Returns bounding box (in pixels) of text. - - Use :py:meth:`get_length` to get the offset of following text with 1/64 pixel - precision. The bounding box includes extra margins for some fonts, e.g. italics - or accents. - - :param xy: The anchor coordinates of the text. - :param anchor: The text anchor alignment. Determines the relative location of - the anchor to the text. The default alignment is top left, - specifically ``la`` for horizontal text and ``lt`` for - vertical text. See :ref:`text-anchors` for details. - :param align: For multiline text, ``"left"``, ``"center"``, ``"right"`` or - ``"justify"`` determines the relative alignment of lines. Use the - ``anchor`` parameter to specify the alignment to ``xy``. - - :return: ``(left, top, right, bottom)`` bounding box - """ - bbox: tuple[float, float, float, float] | None = None - fontmode = self._get_fontmode() - for xy, anchor, line in self._split(xy, anchor, align): - bbox_line = self.font.getbbox( - line, - fontmode, - self.direction, - self.features, - self.language, - self.stroke_width, - anchor, - ) - bbox_line = ( - bbox_line[0] + xy[0], - bbox_line[1] + xy[1], - bbox_line[2] + xy[0], - bbox_line[3] + xy[1], - ) - if bbox is None: - bbox = bbox_line - else: - bbox = ( - min(bbox[0], bbox_line[0]), - min(bbox[1], bbox_line[1]), - max(bbox[2], bbox_line[2]), - max(bbox[3], bbox_line[3]), - ) - - assert bbox is not None - return bbox diff --git a/voxvera/vendor/PIL/ImageTk.py b/voxvera/vendor/PIL/ImageTk.py deleted file mode 100644 index 3a4cb81..0000000 --- a/voxvera/vendor/PIL/ImageTk.py +++ /dev/null @@ -1,266 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# a Tk display interface -# -# History: -# 96-04-08 fl Created -# 96-09-06 fl Added getimage method -# 96-11-01 fl Rewritten, removed image attribute and crop method -# 97-05-09 fl Use PyImagingPaste method instead of image type -# 97-05-12 fl Minor tweaks to match the IFUNC95 interface -# 97-05-17 fl Support the "pilbitmap" booster patch -# 97-06-05 fl Added file= and data= argument to image constructors -# 98-03-09 fl Added width and height methods to Image classes -# 98-07-02 fl Use default mode for "P" images without palette attribute -# 98-07-02 fl Explicitly destroy Tkinter image objects -# 99-07-24 fl Support multiple Tk interpreters (from Greg Couch) -# 99-07-26 fl Automatically hook into Tkinter (if possible) -# 99-08-15 fl Hook uses _imagingtk instead of _imaging -# -# Copyright (c) 1997-1999 by Secret Labs AB -# Copyright (c) 1996-1997 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import tkinter -from io import BytesIO -from typing import Any - -from . import Image, ImageFile - -TYPE_CHECKING = False -if TYPE_CHECKING: - from ._typing import CapsuleType - -# -------------------------------------------------------------------- -# Check for Tkinter interface hooks - - -def _get_image_from_kw(kw: dict[str, Any]) -> ImageFile.ImageFile | None: - source = None - if "file" in kw: - source = kw.pop("file") - elif "data" in kw: - source = BytesIO(kw.pop("data")) - if not source: - return None - return Image.open(source) - - -def _pyimagingtkcall( - command: str, photo: PhotoImage | tkinter.PhotoImage, ptr: CapsuleType -) -> None: - tk = photo.tk - try: - tk.call(command, photo, repr(ptr)) - except tkinter.TclError: - # activate Tkinter hook - # may raise an error if it cannot attach to Tkinter - from . import _imagingtk - - _imagingtk.tkinit(tk.interpaddr()) - tk.call(command, photo, repr(ptr)) - - -# -------------------------------------------------------------------- -# PhotoImage - - -class PhotoImage: - """ - A Tkinter-compatible photo image. This can be used - everywhere Tkinter expects an image object. If the image is an RGBA - image, pixels having alpha 0 are treated as transparent. - - The constructor takes either a PIL image, or a mode and a size. - Alternatively, you can use the ``file`` or ``data`` options to initialize - the photo image object. - - :param image: Either a PIL image, or a mode string. If a mode string is - used, a size must also be given. - :param size: If the first argument is a mode string, this defines the size - of the image. - :keyword file: A filename to load the image from (using - ``Image.open(file)``). - :keyword data: An 8-bit string containing image data (as loaded from an - image file). - """ - - def __init__( - self, - image: Image.Image | str | None = None, - size: tuple[int, int] | None = None, - **kw: Any, - ) -> None: - # Tk compatibility: file or data - if image is None: - image = _get_image_from_kw(kw) - - if image is None: - msg = "Image is required" - raise ValueError(msg) - elif isinstance(image, str): - mode = image - image = None - - if size is None: - msg = "If first argument is mode, size is required" - raise ValueError(msg) - else: - # got an image instead of a mode - mode = image.mode - if mode == "P": - # palette mapped data - image.apply_transparency() - image.load() - mode = image.palette.mode if image.palette else "RGB" - size = image.size - kw["width"], kw["height"] = size - - if mode not in ["1", "L", "RGB", "RGBA"]: - mode = Image.getmodebase(mode) - - self.__mode = mode - self.__size = size - self.__photo = tkinter.PhotoImage(**kw) - self.tk = self.__photo.tk - if image: - self.paste(image) - - def __del__(self) -> None: - try: - name = self.__photo.name - except AttributeError: - return - self.__photo.name = None - try: - self.__photo.tk.call("image", "delete", name) - except Exception: - pass # ignore internal errors - - def __str__(self) -> str: - """ - Get the Tkinter photo image identifier. This method is automatically - called by Tkinter whenever a PhotoImage object is passed to a Tkinter - method. - - :return: A Tkinter photo image identifier (a string). - """ - return str(self.__photo) - - def width(self) -> int: - """ - Get the width of the image. - - :return: The width, in pixels. - """ - return self.__size[0] - - def height(self) -> int: - """ - Get the height of the image. - - :return: The height, in pixels. - """ - return self.__size[1] - - def paste(self, im: Image.Image) -> None: - """ - Paste a PIL image into the photo image. Note that this can - be very slow if the photo image is displayed. - - :param im: A PIL image. The size must match the target region. If the - mode does not match, the image is converted to the mode of - the bitmap image. - """ - # convert to blittable - ptr = im.getim() - image = im.im - if not image.isblock() or im.mode != self.__mode: - block = Image.core.new_block(self.__mode, im.size) - image.convert2(block, image) # convert directly between buffers - ptr = block.ptr - - _pyimagingtkcall("PyImagingPhoto", self.__photo, ptr) - - -# -------------------------------------------------------------------- -# BitmapImage - - -class BitmapImage: - """ - A Tkinter-compatible bitmap image. This can be used everywhere Tkinter - expects an image object. - - The given image must have mode "1". Pixels having value 0 are treated as - transparent. Options, if any, are passed on to Tkinter. The most commonly - used option is ``foreground``, which is used to specify the color for the - non-transparent parts. See the Tkinter documentation for information on - how to specify colours. - - :param image: A PIL image. - """ - - def __init__(self, image: Image.Image | None = None, **kw: Any) -> None: - # Tk compatibility: file or data - if image is None: - image = _get_image_from_kw(kw) - - if image is None: - msg = "Image is required" - raise ValueError(msg) - self.__mode = image.mode - self.__size = image.size - - self.__photo = tkinter.BitmapImage(data=image.tobitmap(), **kw) - - def __del__(self) -> None: - try: - name = self.__photo.name - except AttributeError: - return - self.__photo.name = None - try: - self.__photo.tk.call("image", "delete", name) - except Exception: - pass # ignore internal errors - - def width(self) -> int: - """ - Get the width of the image. - - :return: The width, in pixels. - """ - return self.__size[0] - - def height(self) -> int: - """ - Get the height of the image. - - :return: The height, in pixels. - """ - return self.__size[1] - - def __str__(self) -> str: - """ - Get the Tkinter bitmap image identifier. This method is automatically - called by Tkinter whenever a BitmapImage object is passed to a Tkinter - method. - - :return: A Tkinter bitmap image identifier (a string). - """ - return str(self.__photo) - - -def getimage(photo: PhotoImage) -> Image.Image: - """Copies the contents of a PhotoImage to a PIL image memory.""" - im = Image.new("RGBA", (photo.width(), photo.height())) - - _pyimagingtkcall("PyImagingPhotoGet", photo, im.getim()) - - return im diff --git a/voxvera/vendor/PIL/ImageTransform.py b/voxvera/vendor/PIL/ImageTransform.py deleted file mode 100644 index fb144ff..0000000 --- a/voxvera/vendor/PIL/ImageTransform.py +++ /dev/null @@ -1,136 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# transform wrappers -# -# History: -# 2002-04-08 fl Created -# -# Copyright (c) 2002 by Secret Labs AB -# Copyright (c) 2002 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from collections.abc import Sequence -from typing import Any - -from . import Image - - -class Transform(Image.ImageTransformHandler): - """Base class for other transforms defined in :py:mod:`~PIL.ImageTransform`.""" - - method: Image.Transform - - def __init__(self, data: Sequence[Any]) -> None: - self.data = data - - def getdata(self) -> tuple[Image.Transform, Sequence[int]]: - return self.method, self.data - - def transform( - self, - size: tuple[int, int], - image: Image.Image, - **options: Any, - ) -> Image.Image: - """Perform the transform. Called from :py:meth:`.Image.transform`.""" - # can be overridden - method, data = self.getdata() - return image.transform(size, method, data, **options) - - -class AffineTransform(Transform): - """ - Define an affine image transform. - - This function takes a 6-tuple (a, b, c, d, e, f) which contain the first - two rows from the inverse of an affine transform matrix. For each pixel - (x, y) in the output image, the new value is taken from a position (a x + - b y + c, d x + e y + f) in the input image, rounded to nearest pixel. - - This function can be used to scale, translate, rotate, and shear the - original image. - - See :py:meth:`.Image.transform` - - :param matrix: A 6-tuple (a, b, c, d, e, f) containing the first two rows - from the inverse of an affine transform matrix. - """ - - method = Image.Transform.AFFINE - - -class PerspectiveTransform(Transform): - """ - Define a perspective image transform. - - This function takes an 8-tuple (a, b, c, d, e, f, g, h). For each pixel - (x, y) in the output image, the new value is taken from a position - ((a x + b y + c) / (g x + h y + 1), (d x + e y + f) / (g x + h y + 1)) in - the input image, rounded to nearest pixel. - - This function can be used to scale, translate, rotate, and shear the - original image. - - See :py:meth:`.Image.transform` - - :param matrix: An 8-tuple (a, b, c, d, e, f, g, h). - """ - - method = Image.Transform.PERSPECTIVE - - -class ExtentTransform(Transform): - """ - Define a transform to extract a subregion from an image. - - Maps a rectangle (defined by two corners) from the image to a rectangle of - the given size. The resulting image will contain data sampled from between - the corners, such that (x0, y0) in the input image will end up at (0,0) in - the output image, and (x1, y1) at size. - - This method can be used to crop, stretch, shrink, or mirror an arbitrary - rectangle in the current image. It is slightly slower than crop, but about - as fast as a corresponding resize operation. - - See :py:meth:`.Image.transform` - - :param bbox: A 4-tuple (x0, y0, x1, y1) which specifies two points in the - input image's coordinate system. See :ref:`coordinate-system`. - """ - - method = Image.Transform.EXTENT - - -class QuadTransform(Transform): - """ - Define a quad image transform. - - Maps a quadrilateral (a region defined by four corners) from the image to a - rectangle of the given size. - - See :py:meth:`.Image.transform` - - :param xy: An 8-tuple (x0, y0, x1, y1, x2, y2, x3, y3) which contain the - upper left, lower left, lower right, and upper right corner of the - source quadrilateral. - """ - - method = Image.Transform.QUAD - - -class MeshTransform(Transform): - """ - Define a mesh image transform. A mesh transform consists of one or more - individual quad transforms. - - See :py:meth:`.Image.transform` - - :param data: A list of (bbox, quad) tuples. - """ - - method = Image.Transform.MESH diff --git a/voxvera/vendor/PIL/ImageWin.py b/voxvera/vendor/PIL/ImageWin.py deleted file mode 100644 index 98c28f2..0000000 --- a/voxvera/vendor/PIL/ImageWin.py +++ /dev/null @@ -1,247 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# a Windows DIB display interface -# -# History: -# 1996-05-20 fl Created -# 1996-09-20 fl Fixed subregion exposure -# 1997-09-21 fl Added draw primitive (for tzPrint) -# 2003-05-21 fl Added experimental Window/ImageWindow classes -# 2003-09-05 fl Added fromstring/tostring methods -# -# Copyright (c) Secret Labs AB 1997-2003. -# Copyright (c) Fredrik Lundh 1996-2003. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import Image - - -class HDC: - """ - Wraps an HDC integer. The resulting object can be passed to the - :py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose` - methods. - """ - - def __init__(self, dc: int) -> None: - self.dc = dc - - def __int__(self) -> int: - return self.dc - - -class HWND: - """ - Wraps an HWND integer. The resulting object can be passed to the - :py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose` - methods, instead of a DC. - """ - - def __init__(self, wnd: int) -> None: - self.wnd = wnd - - def __int__(self) -> int: - return self.wnd - - -class Dib: - """ - A Windows bitmap with the given mode and size. The mode can be one of "1", - "L", "P", or "RGB". - - If the display requires a palette, this constructor creates a suitable - palette and associates it with the image. For an "L" image, 128 graylevels - are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together - with 20 graylevels. - - To make sure that palettes work properly under Windows, you must call the - ``palette`` method upon certain events from Windows. - - :param image: Either a PIL image, or a mode string. If a mode string is - used, a size must also be given. The mode can be one of "1", - "L", "P", or "RGB". - :param size: If the first argument is a mode string, this - defines the size of the image. - """ - - def __init__( - self, image: Image.Image | str, size: tuple[int, int] | None = None - ) -> None: - if isinstance(image, str): - mode = image - image = "" - if size is None: - msg = "If first argument is mode, size is required" - raise ValueError(msg) - else: - mode = image.mode - size = image.size - if mode not in ["1", "L", "P", "RGB"]: - mode = Image.getmodebase(mode) - self.image = Image.core.display(mode, size) - self.mode = mode - self.size = size - if image: - assert not isinstance(image, str) - self.paste(image) - - def expose(self, handle: int | HDC | HWND) -> None: - """ - Copy the bitmap contents to a device context. - - :param handle: Device context (HDC), cast to a Python integer, or an - HDC or HWND instance. In PythonWin, you can use - ``CDC.GetHandleAttrib()`` to get a suitable handle. - """ - handle_int = int(handle) - if isinstance(handle, HWND): - dc = self.image.getdc(handle_int) - try: - self.image.expose(dc) - finally: - self.image.releasedc(handle_int, dc) - else: - self.image.expose(handle_int) - - def draw( - self, - handle: int | HDC | HWND, - dst: tuple[int, int, int, int], - src: tuple[int, int, int, int] | None = None, - ) -> None: - """ - Same as expose, but allows you to specify where to draw the image, and - what part of it to draw. - - The destination and source areas are given as 4-tuple rectangles. If - the source is omitted, the entire image is copied. If the source and - the destination have different sizes, the image is resized as - necessary. - """ - if src is None: - src = (0, 0) + self.size - handle_int = int(handle) - if isinstance(handle, HWND): - dc = self.image.getdc(handle_int) - try: - self.image.draw(dc, dst, src) - finally: - self.image.releasedc(handle_int, dc) - else: - self.image.draw(handle_int, dst, src) - - def query_palette(self, handle: int | HDC | HWND) -> int: - """ - Installs the palette associated with the image in the given device - context. - - This method should be called upon **QUERYNEWPALETTE** and - **PALETTECHANGED** events from Windows. If this method returns a - non-zero value, one or more display palette entries were changed, and - the image should be redrawn. - - :param handle: Device context (HDC), cast to a Python integer, or an - HDC or HWND instance. - :return: The number of entries that were changed (if one or more entries, - this indicates that the image should be redrawn). - """ - handle_int = int(handle) - if isinstance(handle, HWND): - handle = self.image.getdc(handle_int) - try: - result = self.image.query_palette(handle) - finally: - self.image.releasedc(handle, handle) - else: - result = self.image.query_palette(handle_int) - return result - - def paste( - self, im: Image.Image, box: tuple[int, int, int, int] | None = None - ) -> None: - """ - Paste a PIL image into the bitmap image. - - :param im: A PIL image. The size must match the target region. - If the mode does not match, the image is converted to the - mode of the bitmap image. - :param box: A 4-tuple defining the left, upper, right, and - lower pixel coordinate. See :ref:`coordinate-system`. If - None is given instead of a tuple, all of the image is - assumed. - """ - im.load() - if self.mode != im.mode: - im = im.convert(self.mode) - if box: - self.image.paste(im.im, box) - else: - self.image.paste(im.im) - - def frombytes(self, buffer: bytes) -> None: - """ - Load display memory contents from byte data. - - :param buffer: A buffer containing display data (usually - data returned from :py:func:`~PIL.ImageWin.Dib.tobytes`) - """ - self.image.frombytes(buffer) - - def tobytes(self) -> bytes: - """ - Copy display memory contents to bytes object. - - :return: A bytes object containing display data. - """ - return self.image.tobytes() - - -class Window: - """Create a Window with the given title size.""" - - def __init__( - self, title: str = "PIL", width: int | None = None, height: int | None = None - ) -> None: - self.hwnd = Image.core.createwindow( - title, self.__dispatcher, width or 0, height or 0 - ) - - def __dispatcher(self, action: str, *args: int) -> None: - getattr(self, f"ui_handle_{action}")(*args) - - def ui_handle_clear(self, dc: int, x0: int, y0: int, x1: int, y1: int) -> None: - pass - - def ui_handle_damage(self, x0: int, y0: int, x1: int, y1: int) -> None: - pass - - def ui_handle_destroy(self) -> None: - pass - - def ui_handle_repair(self, dc: int, x0: int, y0: int, x1: int, y1: int) -> None: - pass - - def ui_handle_resize(self, width: int, height: int) -> None: - pass - - def mainloop(self) -> None: - Image.core.eventloop() - - -class ImageWindow(Window): - """Create an image window which displays the given image.""" - - def __init__(self, image: Image.Image | Dib, title: str = "PIL") -> None: - if not isinstance(image, Dib): - image = Dib(image) - self.image = image - width, height = image.size - super().__init__(title, width=width, height=height) - - def ui_handle_repair(self, dc: int, x0: int, y0: int, x1: int, y1: int) -> None: - self.image.draw(dc, (x0, y0, x1, y1)) diff --git a/voxvera/vendor/PIL/ImtImagePlugin.py b/voxvera/vendor/PIL/ImtImagePlugin.py deleted file mode 100644 index c4eccee..0000000 --- a/voxvera/vendor/PIL/ImtImagePlugin.py +++ /dev/null @@ -1,103 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# IM Tools support for PIL -# -# history: -# 1996-05-27 fl Created (read 8-bit images only) -# 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.2) -# -# Copyright (c) Secret Labs AB 1997-2001. -# Copyright (c) Fredrik Lundh 1996-2001. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import re - -from . import Image, ImageFile - -# -# -------------------------------------------------------------------- - -field = re.compile(rb"([a-z]*) ([^ \r\n]*)") - - -## -# Image plugin for IM Tools images. - - -class ImtImageFile(ImageFile.ImageFile): - format = "IMT" - format_description = "IM Tools" - - def _open(self) -> None: - # Quick rejection: if there's not a LF among the first - # 100 bytes, this is (probably) not a text header. - - assert self.fp is not None - - buffer = self.fp.read(100) - if b"\n" not in buffer: - msg = "not an IM file" - raise SyntaxError(msg) - - xsize = ysize = 0 - - while True: - if buffer: - s = buffer[:1] - buffer = buffer[1:] - else: - s = self.fp.read(1) - if not s: - break - - if s == b"\x0c": - # image data begins - self.tile = [ - ImageFile._Tile( - "raw", - (0, 0) + self.size, - self.fp.tell() - len(buffer), - self.mode, - ) - ] - - break - - else: - # read key/value pair - if b"\n" not in buffer: - buffer += self.fp.read(100) - lines = buffer.split(b"\n") - s += lines.pop(0) - buffer = b"\n".join(lines) - if len(s) == 1 or len(s) > 100: - break - if s[0] == ord(b"*"): - continue # comment - - m = field.match(s) - if not m: - break - k, v = m.group(1, 2) - if k == b"width": - xsize = int(v) - self._size = xsize, ysize - elif k == b"height": - ysize = int(v) - self._size = xsize, ysize - elif k == b"pixel" and v == b"n8": - self._mode = "L" - - -# -# -------------------------------------------------------------------- - -Image.register_open(ImtImageFile.format, ImtImageFile) - -# -# no extension registered (".im" is simply too common) diff --git a/voxvera/vendor/PIL/IptcImagePlugin.py b/voxvera/vendor/PIL/IptcImagePlugin.py deleted file mode 100644 index 6fc824e..0000000 --- a/voxvera/vendor/PIL/IptcImagePlugin.py +++ /dev/null @@ -1,233 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# IPTC/NAA file handling -# -# history: -# 1995-10-01 fl Created -# 1998-03-09 fl Cleaned up and added to PIL -# 2002-06-18 fl Added getiptcinfo helper -# -# Copyright (c) Secret Labs AB 1997-2002. -# Copyright (c) Fredrik Lundh 1995. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from io import BytesIO -from typing import cast - -from . import Image, ImageFile -from ._binary import i16be as i16 -from ._binary import i32be as i32 - -COMPRESSION = {1: "raw", 5: "jpeg"} - - -# -# Helpers - - -def _i(c: bytes) -> int: - return i32((b"\0\0\0\0" + c)[-4:]) - - -## -# Image plugin for IPTC/NAA datastreams. To read IPTC/NAA fields -# from TIFF and JPEG files, use the getiptcinfo function. - - -class IptcImageFile(ImageFile.ImageFile): - format = "IPTC" - format_description = "IPTC/NAA" - - def getint(self, key: tuple[int, int]) -> int: - return _i(self.info[key]) - - def field(self) -> tuple[tuple[int, int] | None, int]: - # - # get a IPTC field header - assert self.fp is not None - s = self.fp.read(5) - if not s.strip(b"\x00"): - return None, 0 - - tag = s[1], s[2] - - # syntax - if s[0] != 0x1C or tag[0] not in [1, 2, 3, 4, 5, 6, 7, 8, 9, 240]: - msg = "invalid IPTC/NAA file" - raise SyntaxError(msg) - - # field size - size = s[3] - if size > 132: - msg = "illegal field length in IPTC/NAA file" - raise OSError(msg) - elif size == 128: - size = 0 - elif size > 128: - size = _i(self.fp.read(size - 128)) - else: - size = i16(s, 3) - - return tag, size - - def _open(self) -> None: - # load descriptive fields - assert self.fp is not None - while True: - offset = self.fp.tell() - tag, size = self.field() - if not tag or tag == (8, 10): - break - if size: - tagdata = self.fp.read(size) - else: - tagdata = None - if tag in self.info: - if isinstance(self.info[tag], list): - self.info[tag].append(tagdata) - else: - self.info[tag] = [self.info[tag], tagdata] - else: - self.info[tag] = tagdata - - # mode - layers = self.info[(3, 60)][0] - component = self.info[(3, 60)][1] - if layers == 1 and not component: - self._mode = "L" - band = None - else: - if layers == 3 and component: - self._mode = "RGB" - elif layers == 4 and component: - self._mode = "CMYK" - if (3, 65) in self.info: - band = self.info[(3, 65)][0] - 1 - else: - band = 0 - - # size - self._size = self.getint((3, 20)), self.getint((3, 30)) - - # compression - try: - compression = COMPRESSION[self.getint((3, 120))] - except KeyError as e: - msg = "Unknown IPTC image compression" - raise OSError(msg) from e - - # tile - if tag == (8, 10): - self.tile = [ - ImageFile._Tile("iptc", (0, 0) + self.size, offset, (compression, band)) - ] - - def load(self) -> Image.core.PixelAccess | None: - if self.tile: - args = self.tile[0].args - assert isinstance(args, tuple) - compression, band = args - - assert self.fp is not None - self.fp.seek(self.tile[0].offset) - - # Copy image data to temporary file - o = BytesIO() - if compression == "raw": - # To simplify access to the extracted file, - # prepend a PPM header - o.write(b"P5\n%d %d\n255\n" % self.size) - while True: - type, size = self.field() - if type != (8, 10): - break - while size > 0: - s = self.fp.read(min(size, 8192)) - if not s: - break - o.write(s) - size -= len(s) - - with Image.open(o) as _im: - if band is not None: - bands = [Image.new("L", _im.size)] * Image.getmodebands(self.mode) - bands[band] = _im - im = Image.merge(self.mode, bands) - else: - im = _im - im.load() - self.im = im.im - self.tile = [] - return ImageFile.ImageFile.load(self) - - -Image.register_open(IptcImageFile.format, IptcImageFile) - -Image.register_extension(IptcImageFile.format, ".iim") - - -def getiptcinfo( - im: ImageFile.ImageFile, -) -> dict[tuple[int, int], bytes | list[bytes]] | None: - """ - Get IPTC information from TIFF, JPEG, or IPTC file. - - :param im: An image containing IPTC data. - :returns: A dictionary containing IPTC information, or None if - no IPTC information block was found. - """ - from . import JpegImagePlugin, TiffImagePlugin - - data = None - - info: dict[tuple[int, int], bytes | list[bytes]] = {} - if isinstance(im, IptcImageFile): - # return info dictionary right away - for k, v in im.info.items(): - if isinstance(k, tuple): - info[k] = v - return info - - elif isinstance(im, JpegImagePlugin.JpegImageFile): - # extract the IPTC/NAA resource - photoshop = im.info.get("photoshop") - if photoshop: - data = photoshop.get(0x0404) - - elif isinstance(im, TiffImagePlugin.TiffImageFile): - # get raw data from the IPTC/NAA tag (PhotoShop tags the data - # as 4-byte integers, so we cannot use the get method...) - try: - data = im.tag_v2._tagdata[TiffImagePlugin.IPTC_NAA_CHUNK] - except KeyError: - pass - - if data is None: - return None # no properties - - # create an IptcImagePlugin object without initializing it - class FakeImage: - pass - - fake_im = FakeImage() - fake_im.__class__ = IptcImageFile # type: ignore[assignment] - iptc_im = cast(IptcImageFile, fake_im) - - # parse the IPTC information chunk - iptc_im.info = {} - iptc_im.fp = BytesIO(data) - - try: - iptc_im._open() - except (IndexError, KeyError): - pass # expected failure - - for k, v in iptc_im.info.items(): - if isinstance(k, tuple): - info[k] = v - return info diff --git a/voxvera/vendor/PIL/Jpeg2KImagePlugin.py b/voxvera/vendor/PIL/Jpeg2KImagePlugin.py deleted file mode 100644 index d6ec38d..0000000 --- a/voxvera/vendor/PIL/Jpeg2KImagePlugin.py +++ /dev/null @@ -1,448 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# JPEG2000 file handling -# -# History: -# 2014-03-12 ajh Created -# 2021-06-30 rogermb Extract dpi information from the 'resc' header box -# -# Copyright (c) 2014 Coriolis Systems Limited -# Copyright (c) 2014 Alastair Houghton -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io -import os -import struct -from typing import cast - -from . import Image, ImageFile, ImagePalette, _binary - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - from typing import IO - - -class BoxReader: - """ - A small helper class to read fields stored in JPEG2000 header boxes - and to easily step into and read sub-boxes. - """ - - def __init__(self, fp: IO[bytes], length: int = -1) -> None: - self.fp = fp - self.has_length = length >= 0 - self.length = length - self.remaining_in_box = -1 - - def _can_read(self, num_bytes: int) -> bool: - if self.has_length and self.fp.tell() + num_bytes > self.length: - # Outside box: ensure we don't read past the known file length - return False - if self.remaining_in_box >= 0: - # Inside box contents: ensure read does not go past box boundaries - return num_bytes <= self.remaining_in_box - else: - return True # No length known, just read - - def _read_bytes(self, num_bytes: int) -> bytes: - if not self._can_read(num_bytes): - msg = "Not enough data in header" - raise SyntaxError(msg) - - data = self.fp.read(num_bytes) - if len(data) < num_bytes: - msg = f"Expected to read {num_bytes} bytes but only got {len(data)}." - raise OSError(msg) - - if self.remaining_in_box > 0: - self.remaining_in_box -= num_bytes - return data - - def read_fields(self, field_format: str) -> tuple[int | bytes, ...]: - size = struct.calcsize(field_format) - data = self._read_bytes(size) - return struct.unpack(field_format, data) - - def read_boxes(self) -> BoxReader: - size = self.remaining_in_box - data = self._read_bytes(size) - return BoxReader(io.BytesIO(data), size) - - def has_next_box(self) -> bool: - if self.has_length: - return self.fp.tell() + self.remaining_in_box < self.length - else: - return True - - def next_box_type(self) -> bytes: - # Skip the rest of the box if it has not been read - if self.remaining_in_box > 0: - self.fp.seek(self.remaining_in_box, os.SEEK_CUR) - self.remaining_in_box = -1 - - # Read the length and type of the next box - lbox, tbox = cast(tuple[int, bytes], self.read_fields(">I4s")) - if lbox == 1: - lbox = cast(int, self.read_fields(">Q")[0]) - hlen = 16 - else: - hlen = 8 - - if lbox < hlen or not self._can_read(lbox - hlen): - msg = "Invalid header length" - raise SyntaxError(msg) - - self.remaining_in_box = lbox - hlen - return tbox - - -def _parse_codestream(fp: IO[bytes]) -> tuple[tuple[int, int], str]: - """Parse the JPEG 2000 codestream to extract the size and component - count from the SIZ marker segment, returning a PIL (size, mode) tuple.""" - - hdr = fp.read(2) - lsiz = _binary.i16be(hdr) - siz = hdr + fp.read(lsiz - 2) - lsiz, rsiz, xsiz, ysiz, xosiz, yosiz, _, _, _, _, csiz = struct.unpack_from( - ">HHIIIIIIIIH", siz - ) - - size = (xsiz - xosiz, ysiz - yosiz) - if csiz == 1: - ssiz = struct.unpack_from(">B", siz, 38) - if (ssiz[0] & 0x7F) + 1 > 8: - mode = "I;16" - else: - mode = "L" - elif csiz == 2: - mode = "LA" - elif csiz == 3: - mode = "RGB" - elif csiz == 4: - mode = "RGBA" - else: - msg = "unable to determine J2K image mode" - raise SyntaxError(msg) - - return size, mode - - -def _res_to_dpi(num: int, denom: int, exp: int) -> float | None: - """Convert JPEG2000's (numerator, denominator, exponent-base-10) resolution, - calculated as (num / denom) * 10^exp and stored in dots per meter, - to floating-point dots per inch.""" - if denom == 0: - return None - return (254 * num * (10**exp)) / (10000 * denom) - - -def _parse_jp2_header( - fp: IO[bytes], -) -> tuple[ - tuple[int, int], - str, - str | None, - tuple[float, float] | None, - ImagePalette.ImagePalette | None, -]: - """Parse the JP2 header box to extract size, component count, - color space information, and optionally DPI information, - returning a (size, mode, mimetype, dpi) tuple.""" - - # Find the JP2 header box - reader = BoxReader(fp) - header = None - mimetype = None - while reader.has_next_box(): - tbox = reader.next_box_type() - - if tbox == b"jp2h": - header = reader.read_boxes() - break - elif tbox == b"ftyp": - if reader.read_fields(">4s")[0] == b"jpx ": - mimetype = "image/jpx" - assert header is not None - - size = None - mode = None - bpc = None - nc = None - dpi = None # 2-tuple of DPI info, or None - palette = None - - while header.has_next_box(): - tbox = header.next_box_type() - - if tbox == b"ihdr": - height, width, nc, bpc = header.read_fields(">IIHB") - assert isinstance(height, int) - assert isinstance(width, int) - assert isinstance(bpc, int) - size = (width, height) - if nc == 1 and (bpc & 0x7F) > 8: - mode = "I;16" - elif nc == 1: - mode = "L" - elif nc == 2: - mode = "LA" - elif nc == 3: - mode = "RGB" - elif nc == 4: - mode = "RGBA" - elif tbox == b"colr" and nc == 4: - meth, _, _, enumcs = header.read_fields(">BBBI") - if meth == 1 and enumcs == 12: - mode = "CMYK" - elif tbox == b"pclr" and mode in ("L", "LA"): - ne, npc = header.read_fields(">HB") - assert isinstance(ne, int) - assert isinstance(npc, int) - max_bitdepth = 0 - for bitdepth in header.read_fields(">" + ("B" * npc)): - assert isinstance(bitdepth, int) - if bitdepth > max_bitdepth: - max_bitdepth = bitdepth - if max_bitdepth <= 8: - palette = ImagePalette.ImagePalette("RGBA" if npc == 4 else "RGB") - for i in range(ne): - color: list[int] = [] - for value in header.read_fields(">" + ("B" * npc)): - assert isinstance(value, int) - color.append(value) - palette.getcolor(tuple(color)) - mode = "P" if mode == "L" else "PA" - elif tbox == b"res ": - res = header.read_boxes() - while res.has_next_box(): - tres = res.next_box_type() - if tres == b"resc": - vrcn, vrcd, hrcn, hrcd, vrce, hrce = res.read_fields(">HHHHBB") - assert isinstance(vrcn, int) - assert isinstance(vrcd, int) - assert isinstance(hrcn, int) - assert isinstance(hrcd, int) - assert isinstance(vrce, int) - assert isinstance(hrce, int) - hres = _res_to_dpi(hrcn, hrcd, hrce) - vres = _res_to_dpi(vrcn, vrcd, vrce) - if hres is not None and vres is not None: - dpi = (hres, vres) - break - - if size is None or mode is None: - msg = "Malformed JP2 header" - raise SyntaxError(msg) - - return size, mode, mimetype, dpi, palette - - -## -# Image plugin for JPEG2000 images. - - -class Jpeg2KImageFile(ImageFile.ImageFile): - format = "JPEG2000" - format_description = "JPEG 2000 (ISO 15444)" - - def _open(self) -> None: - assert self.fp is not None - sig = self.fp.read(4) - if sig == b"\xff\x4f\xff\x51": - self.codec = "j2k" - self._size, self._mode = _parse_codestream(self.fp) - self._parse_comment() - else: - sig = sig + self.fp.read(8) - - if sig == b"\x00\x00\x00\x0cjP \x0d\x0a\x87\x0a": - self.codec = "jp2" - header = _parse_jp2_header(self.fp) - self._size, self._mode, self.custom_mimetype, dpi, self.palette = header - if dpi is not None: - self.info["dpi"] = dpi - if self.fp.read(12).endswith(b"jp2c\xff\x4f\xff\x51"): - hdr = self.fp.read(2) - length = _binary.i16be(hdr) - self.fp.seek(length - 2, os.SEEK_CUR) - self._parse_comment() - else: - msg = "not a JPEG 2000 file" - raise SyntaxError(msg) - - self._reduce = 0 - self.layers = 0 - - fd = -1 - length = -1 - - try: - fd = self.fp.fileno() - length = os.fstat(fd).st_size - except Exception: - fd = -1 - try: - pos = self.fp.tell() - self.fp.seek(0, io.SEEK_END) - length = self.fp.tell() - self.fp.seek(pos) - except Exception: - length = -1 - - self.tile = [ - ImageFile._Tile( - "jpeg2k", - (0, 0) + self.size, - 0, - (self.codec, self._reduce, self.layers, fd, length), - ) - ] - - def _parse_comment(self) -> None: - assert self.fp is not None - while True: - marker = self.fp.read(2) - if not marker: - break - typ = marker[1] - if typ in (0x90, 0xD9): - # Start of tile or end of codestream - break - hdr = self.fp.read(2) - length = _binary.i16be(hdr) - if typ == 0x64: - # Comment - self.info["comment"] = self.fp.read(length - 2)[2:] - break - else: - self.fp.seek(length - 2, os.SEEK_CUR) - - @property # type: ignore[override] - def reduce( - self, - ) -> ( - Callable[[int | tuple[int, int], tuple[int, int, int, int] | None], Image.Image] - | int - ): - # https://github.com/python-pillow/Pillow/issues/4343 found that the - # new Image 'reduce' method was shadowed by this plugin's 'reduce' - # property. This attempts to allow for both scenarios - return self._reduce or super().reduce - - @reduce.setter - def reduce(self, value: int) -> None: - self._reduce = value - - def load(self) -> Image.core.PixelAccess | None: - if self.tile and self._reduce: - power = 1 << self._reduce - adjust = power >> 1 - self._size = ( - int((self.size[0] + adjust) / power), - int((self.size[1] + adjust) / power), - ) - - # Update the reduce and layers settings - t = self.tile[0] - assert isinstance(t[3], tuple) - t3 = (t[3][0], self._reduce, self.layers, t[3][3], t[3][4]) - self.tile = [ImageFile._Tile(t[0], (0, 0) + self.size, t[2], t3)] - - return ImageFile.ImageFile.load(self) - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith( - (b"\xff\x4f\xff\x51", b"\x00\x00\x00\x0cjP \x0d\x0a\x87\x0a") - ) - - -# ------------------------------------------------------------ -# Save support - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - # Get the keyword arguments - info = im.encoderinfo - - if isinstance(filename, str): - filename = filename.encode() - if filename.endswith(b".j2k") or info.get("no_jp2", False): - kind = "j2k" - else: - kind = "jp2" - - offset = info.get("offset", None) - tile_offset = info.get("tile_offset", None) - tile_size = info.get("tile_size", None) - quality_mode = info.get("quality_mode", "rates") - quality_layers = info.get("quality_layers", None) - if quality_layers is not None and not ( - isinstance(quality_layers, (list, tuple)) - and all( - isinstance(quality_layer, (int, float)) for quality_layer in quality_layers - ) - ): - msg = "quality_layers must be a sequence of numbers" - raise ValueError(msg) - - num_resolutions = info.get("num_resolutions", 0) - cblk_size = info.get("codeblock_size", None) - precinct_size = info.get("precinct_size", None) - irreversible = info.get("irreversible", False) - progression = info.get("progression", "LRCP") - cinema_mode = info.get("cinema_mode", "no") - mct = info.get("mct", 0) - signed = info.get("signed", False) - comment = info.get("comment") - if isinstance(comment, str): - comment = comment.encode() - plt = info.get("plt", False) - - fd = -1 - if hasattr(fp, "fileno"): - try: - fd = fp.fileno() - except Exception: - fd = -1 - - im.encoderconfig = ( - offset, - tile_offset, - tile_size, - quality_mode, - quality_layers, - num_resolutions, - cblk_size, - precinct_size, - irreversible, - progression, - cinema_mode, - mct, - signed, - fd, - comment, - plt, - ) - - ImageFile._save(im, fp, [ImageFile._Tile("jpeg2k", (0, 0) + im.size, 0, kind)]) - - -# ------------------------------------------------------------ -# Registry stuff - - -Image.register_open(Jpeg2KImageFile.format, Jpeg2KImageFile, _accept) -Image.register_save(Jpeg2KImageFile.format, _save) - -Image.register_extensions( - Jpeg2KImageFile.format, [".jp2", ".j2k", ".jpc", ".jpf", ".jpx", ".j2c"] -) - -Image.register_mime(Jpeg2KImageFile.format, "image/jp2") diff --git a/voxvera/vendor/PIL/JpegImagePlugin.py b/voxvera/vendor/PIL/JpegImagePlugin.py deleted file mode 100644 index 894c154..0000000 --- a/voxvera/vendor/PIL/JpegImagePlugin.py +++ /dev/null @@ -1,895 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# JPEG (JFIF) file handling -# -# See "Digital Compression and Coding of Continuous-Tone Still Images, -# Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1) -# -# History: -# 1995-09-09 fl Created -# 1995-09-13 fl Added full parser -# 1996-03-25 fl Added hack to use the IJG command line utilities -# 1996-05-05 fl Workaround Photoshop 2.5 CMYK polarity bug -# 1996-05-28 fl Added draft support, JFIF version (0.1) -# 1996-12-30 fl Added encoder options, added progression property (0.2) -# 1997-08-27 fl Save mode 1 images as BW (0.3) -# 1998-07-12 fl Added YCbCr to draft and save methods (0.4) -# 1998-10-19 fl Don't hang on files using 16-bit DQT's (0.4.1) -# 2001-04-16 fl Extract DPI settings from JFIF files (0.4.2) -# 2002-07-01 fl Skip pad bytes before markers; identify Exif files (0.4.3) -# 2003-04-25 fl Added experimental EXIF decoder (0.5) -# 2003-06-06 fl Added experimental EXIF GPSinfo decoder -# 2003-09-13 fl Extract COM markers -# 2009-09-06 fl Added icc_profile support (from Florian Hoech) -# 2009-03-06 fl Changed CMYK handling; always use Adobe polarity (0.6) -# 2009-03-08 fl Added subsampling support (from Justin Huff). -# -# Copyright (c) 1997-2003 by Secret Labs AB. -# Copyright (c) 1995-1996 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import array -import io -import math -import os -import struct -import subprocess -import sys -import tempfile -import warnings - -from . import Image, ImageFile -from ._binary import i16be as i16 -from ._binary import i32be as i32 -from ._binary import o8 -from ._binary import o16be as o16 -from .JpegPresets import presets - -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import IO, Any - - from .MpoImagePlugin import MpoImageFile - -# -# Parser - - -def Skip(self: JpegImageFile, marker: int) -> None: - assert self.fp is not None - n = i16(self.fp.read(2)) - 2 - ImageFile._safe_read(self.fp, n) - - -def APP(self: JpegImageFile, marker: int) -> None: - # - # Application marker. Store these in the APP dictionary. - # Also look for well-known application markers. - - assert self.fp is not None - n = i16(self.fp.read(2)) - 2 - s = ImageFile._safe_read(self.fp, n) - - app = f"APP{marker & 15}" - - self.app[app] = s # compatibility - self.applist.append((app, s)) - - if marker == 0xFFE0 and s.startswith(b"JFIF"): - # extract JFIF information - self.info["jfif"] = version = i16(s, 5) # version - self.info["jfif_version"] = divmod(version, 256) - # extract JFIF properties - try: - jfif_unit = s[7] - jfif_density = i16(s, 8), i16(s, 10) - except Exception: - pass - else: - if jfif_unit == 1: - self.info["dpi"] = jfif_density - elif jfif_unit == 2: # cm - # 1 dpcm = 2.54 dpi - self.info["dpi"] = tuple(d * 2.54 for d in jfif_density) - self.info["jfif_unit"] = jfif_unit - self.info["jfif_density"] = jfif_density - elif marker == 0xFFE1 and s.startswith(b"Exif\0\0"): - # extract EXIF information - if "exif" in self.info: - self.info["exif"] += s[6:] - else: - self.info["exif"] = s - self._exif_offset = self.fp.tell() - n + 6 - elif marker == 0xFFE1 and s.startswith(b"http://ns.adobe.com/xap/1.0/\x00"): - self.info["xmp"] = s.split(b"\x00", 1)[1] - elif marker == 0xFFE2 and s.startswith(b"FPXR\0"): - # extract FlashPix information (incomplete) - self.info["flashpix"] = s # FIXME: value will change - elif marker == 0xFFE2 and s.startswith(b"ICC_PROFILE\0"): - # Since an ICC profile can be larger than the maximum size of - # a JPEG marker (64K), we need provisions to split it into - # multiple markers. The format defined by the ICC specifies - # one or more APP2 markers containing the following data: - # Identifying string ASCII "ICC_PROFILE\0" (12 bytes) - # Marker sequence number 1, 2, etc (1 byte) - # Number of markers Total of APP2's used (1 byte) - # Profile data (remainder of APP2 data) - # Decoders should use the marker sequence numbers to - # reassemble the profile, rather than assuming that the APP2 - # markers appear in the correct sequence. - self.icclist.append(s) - elif marker == 0xFFED and s.startswith(b"Photoshop 3.0\x00"): - # parse the image resource block - offset = 14 - photoshop = self.info.setdefault("photoshop", {}) - while s[offset : offset + 4] == b"8BIM": - try: - offset += 4 - # resource code - code = i16(s, offset) - offset += 2 - # resource name (usually empty) - name_len = s[offset] - # name = s[offset+1:offset+1+name_len] - offset += 1 + name_len - offset += offset & 1 # align - # resource data block - size = i32(s, offset) - offset += 4 - data = s[offset : offset + size] - if code == 0x03ED: # ResolutionInfo - photoshop[code] = { - "XResolution": i32(data, 0) / 65536, - "DisplayedUnitsX": i16(data, 4), - "YResolution": i32(data, 8) / 65536, - "DisplayedUnitsY": i16(data, 12), - } - else: - photoshop[code] = data - offset += size - offset += offset & 1 # align - except struct.error: - break # insufficient data - - elif marker == 0xFFEE and s.startswith(b"Adobe"): - self.info["adobe"] = i16(s, 5) - # extract Adobe custom properties - try: - adobe_transform = s[11] - except IndexError: - pass - else: - self.info["adobe_transform"] = adobe_transform - elif marker == 0xFFE2 and s.startswith(b"MPF\0"): - # extract MPO information - self.info["mp"] = s[4:] - # offset is current location minus buffer size - # plus constant header size - self.info["mpoffset"] = self.fp.tell() - n + 4 - - -def COM(self: JpegImageFile, marker: int) -> None: - # - # Comment marker. Store these in the APP dictionary. - assert self.fp is not None - n = i16(self.fp.read(2)) - 2 - s = ImageFile._safe_read(self.fp, n) - - self.info["comment"] = s - self.app["COM"] = s # compatibility - self.applist.append(("COM", s)) - - -def SOF(self: JpegImageFile, marker: int) -> None: - # - # Start of frame marker. Defines the size and mode of the - # image. JPEG is colour blind, so we use some simple - # heuristics to map the number of layers to an appropriate - # mode. Note that this could be made a bit brighter, by - # looking for JFIF and Adobe APP markers. - - assert self.fp is not None - n = i16(self.fp.read(2)) - 2 - s = ImageFile._safe_read(self.fp, n) - self._size = i16(s, 3), i16(s, 1) - if self._im is not None and self.size != self.im.size: - self._im = None - - self.bits = s[0] - if self.bits != 8: - msg = f"cannot handle {self.bits}-bit layers" - raise SyntaxError(msg) - - self.layers = s[5] - if self.layers == 1: - self._mode = "L" - elif self.layers == 3: - self._mode = "RGB" - elif self.layers == 4: - self._mode = "CMYK" - else: - msg = f"cannot handle {self.layers}-layer images" - raise SyntaxError(msg) - - if marker in [0xFFC2, 0xFFC6, 0xFFCA, 0xFFCE]: - self.info["progressive"] = self.info["progression"] = 1 - - if self.icclist: - # fixup icc profile - self.icclist.sort() # sort by sequence number - if self.icclist[0][13] == len(self.icclist): - profile = [p[14:] for p in self.icclist] - icc_profile = b"".join(profile) - else: - icc_profile = None # wrong number of fragments - self.info["icc_profile"] = icc_profile - self.icclist = [] - - for i in range(6, len(s), 3): - t = s[i : i + 3] - # 4-tuples: id, vsamp, hsamp, qtable - self.layer.append((t[0], t[1] // 16, t[1] & 15, t[2])) - - -def DQT(self: JpegImageFile, marker: int) -> None: - # - # Define quantization table. Note that there might be more - # than one table in each marker. - - # FIXME: The quantization tables can be used to estimate the - # compression quality. - - assert self.fp is not None - n = i16(self.fp.read(2)) - 2 - s = ImageFile._safe_read(self.fp, n) - while len(s): - v = s[0] - precision = 1 if (v // 16 == 0) else 2 # in bytes - qt_length = 1 + precision * 64 - if len(s) < qt_length: - msg = "bad quantization table marker" - raise SyntaxError(msg) - data = array.array("B" if precision == 1 else "H", s[1:qt_length]) - if sys.byteorder == "little" and precision > 1: - data.byteswap() # the values are always big-endian - self.quantization[v & 15] = [data[i] for i in zigzag_index] - s = s[qt_length:] - - -# -# JPEG marker table - -MARKER = { - 0xFFC0: ("SOF0", "Baseline DCT", SOF), - 0xFFC1: ("SOF1", "Extended Sequential DCT", SOF), - 0xFFC2: ("SOF2", "Progressive DCT", SOF), - 0xFFC3: ("SOF3", "Spatial lossless", SOF), - 0xFFC4: ("DHT", "Define Huffman table", Skip), - 0xFFC5: ("SOF5", "Differential sequential DCT", SOF), - 0xFFC6: ("SOF6", "Differential progressive DCT", SOF), - 0xFFC7: ("SOF7", "Differential spatial", SOF), - 0xFFC8: ("JPG", "Extension", None), - 0xFFC9: ("SOF9", "Extended sequential DCT (AC)", SOF), - 0xFFCA: ("SOF10", "Progressive DCT (AC)", SOF), - 0xFFCB: ("SOF11", "Spatial lossless DCT (AC)", SOF), - 0xFFCC: ("DAC", "Define arithmetic coding conditioning", Skip), - 0xFFCD: ("SOF13", "Differential sequential DCT (AC)", SOF), - 0xFFCE: ("SOF14", "Differential progressive DCT (AC)", SOF), - 0xFFCF: ("SOF15", "Differential spatial (AC)", SOF), - 0xFFD0: ("RST0", "Restart 0", None), - 0xFFD1: ("RST1", "Restart 1", None), - 0xFFD2: ("RST2", "Restart 2", None), - 0xFFD3: ("RST3", "Restart 3", None), - 0xFFD4: ("RST4", "Restart 4", None), - 0xFFD5: ("RST5", "Restart 5", None), - 0xFFD6: ("RST6", "Restart 6", None), - 0xFFD7: ("RST7", "Restart 7", None), - 0xFFD8: ("SOI", "Start of image", None), - 0xFFD9: ("EOI", "End of image", None), - 0xFFDA: ("SOS", "Start of scan", Skip), - 0xFFDB: ("DQT", "Define quantization table", DQT), - 0xFFDC: ("DNL", "Define number of lines", Skip), - 0xFFDD: ("DRI", "Define restart interval", Skip), - 0xFFDE: ("DHP", "Define hierarchical progression", SOF), - 0xFFDF: ("EXP", "Expand reference component", Skip), - 0xFFE0: ("APP0", "Application segment 0", APP), - 0xFFE1: ("APP1", "Application segment 1", APP), - 0xFFE2: ("APP2", "Application segment 2", APP), - 0xFFE3: ("APP3", "Application segment 3", APP), - 0xFFE4: ("APP4", "Application segment 4", APP), - 0xFFE5: ("APP5", "Application segment 5", APP), - 0xFFE6: ("APP6", "Application segment 6", APP), - 0xFFE7: ("APP7", "Application segment 7", APP), - 0xFFE8: ("APP8", "Application segment 8", APP), - 0xFFE9: ("APP9", "Application segment 9", APP), - 0xFFEA: ("APP10", "Application segment 10", APP), - 0xFFEB: ("APP11", "Application segment 11", APP), - 0xFFEC: ("APP12", "Application segment 12", APP), - 0xFFED: ("APP13", "Application segment 13", APP), - 0xFFEE: ("APP14", "Application segment 14", APP), - 0xFFEF: ("APP15", "Application segment 15", APP), - 0xFFF0: ("JPG0", "Extension 0", None), - 0xFFF1: ("JPG1", "Extension 1", None), - 0xFFF2: ("JPG2", "Extension 2", None), - 0xFFF3: ("JPG3", "Extension 3", None), - 0xFFF4: ("JPG4", "Extension 4", None), - 0xFFF5: ("JPG5", "Extension 5", None), - 0xFFF6: ("JPG6", "Extension 6", None), - 0xFFF7: ("JPG7", "Extension 7", None), - 0xFFF8: ("JPG8", "Extension 8", None), - 0xFFF9: ("JPG9", "Extension 9", None), - 0xFFFA: ("JPG10", "Extension 10", None), - 0xFFFB: ("JPG11", "Extension 11", None), - 0xFFFC: ("JPG12", "Extension 12", None), - 0xFFFD: ("JPG13", "Extension 13", None), - 0xFFFE: ("COM", "Comment", COM), -} - - -def _accept(prefix: bytes) -> bool: - # Magic number was taken from https://en.wikipedia.org/wiki/JPEG - return prefix.startswith(b"\xff\xd8\xff") - - -## -# Image plugin for JPEG and JFIF images. - - -class JpegImageFile(ImageFile.ImageFile): - format = "JPEG" - format_description = "JPEG (ISO 10918)" - - def _open(self) -> None: - assert self.fp is not None - s = self.fp.read(3) - - if not _accept(s): - msg = "not a JPEG file" - raise SyntaxError(msg) - s = b"\xff" - - # Create attributes - self.bits = self.layers = 0 - self._exif_offset = 0 - - # JPEG specifics (internal) - self.layer: list[tuple[int, int, int, int]] = [] - self._huffman_dc: dict[Any, Any] = {} - self._huffman_ac: dict[Any, Any] = {} - self.quantization: dict[int, list[int]] = {} - self.app: dict[str, bytes] = {} # compatibility - self.applist: list[tuple[str, bytes]] = [] - self.icclist: list[bytes] = [] - - while True: - i = s[0] - if i == 0xFF: - s = s + self.fp.read(1) - i = i16(s) - else: - # Skip non-0xFF junk - s = self.fp.read(1) - continue - - if i in MARKER: - name, description, handler = MARKER[i] - if handler is not None: - handler(self, i) - if i == 0xFFDA: # start of scan - rawmode = self.mode - if self.mode == "CMYK": - rawmode = "CMYK;I" # assume adobe conventions - self.tile = [ - ImageFile._Tile("jpeg", (0, 0) + self.size, 0, (rawmode, "")) - ] - # self.__offset = self.fp.tell() - break - s = self.fp.read(1) - elif i in {0, 0xFFFF}: - # padded marker or junk; move on - s = b"\xff" - elif i == 0xFF00: # Skip extraneous data (escaped 0xFF) - s = self.fp.read(1) - else: - msg = "no marker found" - raise SyntaxError(msg) - - self._read_dpi_from_exif() - - def __getstate__(self) -> list[Any]: - return super().__getstate__() + [self.layers, self.layer] - - def __setstate__(self, state: list[Any]) -> None: - self.layers, self.layer = state[6:] - super().__setstate__(state) - - def load_read(self, read_bytes: int) -> bytes: - """ - internal: read more image data - For premature EOF and LOAD_TRUNCATED_IMAGES adds EOI marker - so libjpeg can finish decoding - """ - assert self.fp is not None - s = self.fp.read(read_bytes) - - if not s and ImageFile.LOAD_TRUNCATED_IMAGES and not hasattr(self, "_ended"): - # Premature EOF. - # Pretend file is finished adding EOI marker - self._ended = True - return b"\xff\xd9" - - return s - - def draft( - self, mode: str | None, size: tuple[int, int] | None - ) -> tuple[str, tuple[int, int, float, float]] | None: - if len(self.tile) != 1: - return None - - # Protect from second call - if self.decoderconfig: - return None - - d, e, o, a = self.tile[0] - scale = 1 - original_size = self.size - - assert isinstance(a, tuple) - if a[0] == "RGB" and mode in ["L", "YCbCr"]: - self._mode = mode - a = mode, "" - - if size: - scale = min(self.size[0] // size[0], self.size[1] // size[1]) - for s in [8, 4, 2, 1]: - if scale >= s: - break - assert e is not None - e = ( - e[0], - e[1], - (e[2] - e[0] + s - 1) // s + e[0], - (e[3] - e[1] + s - 1) // s + e[1], - ) - self._size = ((self.size[0] + s - 1) // s, (self.size[1] + s - 1) // s) - scale = s - - self.tile = [ImageFile._Tile(d, e, o, a)] - self.decoderconfig = (scale, 0) - - box = (0, 0, original_size[0] / scale, original_size[1] / scale) - return self.mode, box - - def load_djpeg(self) -> None: - # ALTERNATIVE: handle JPEGs via the IJG command line utilities - - f, path = tempfile.mkstemp() - os.close(f) - if os.path.exists(self.filename): - subprocess.check_call(["djpeg", "-outfile", path, self.filename]) - else: - try: - os.unlink(path) - except OSError: - pass - - msg = "Invalid Filename" - raise ValueError(msg) - - try: - with Image.open(path) as _im: - _im.load() - self.im = _im.im - finally: - try: - os.unlink(path) - except OSError: - pass - - self._mode = self.im.mode - self._size = self.im.size - - self.tile = [] - - def _getexif(self) -> dict[int, Any] | None: - return _getexif(self) - - def _read_dpi_from_exif(self) -> None: - # If DPI isn't in JPEG header, fetch from EXIF - if "dpi" in self.info or "exif" not in self.info: - return - try: - exif = self.getexif() - resolution_unit = exif[0x0128] - x_resolution = exif[0x011A] - try: - dpi = float(x_resolution[0]) / x_resolution[1] - except TypeError: - dpi = x_resolution - if math.isnan(dpi): - msg = "DPI is not a number" - raise ValueError(msg) - if resolution_unit == 3: # cm - # 1 dpcm = 2.54 dpi - dpi *= 2.54 - self.info["dpi"] = dpi, dpi - except ( - struct.error, # truncated EXIF - KeyError, # dpi not included - SyntaxError, # invalid/unreadable EXIF - TypeError, # dpi is an invalid float - ValueError, # dpi is an invalid float - ZeroDivisionError, # invalid dpi rational value - ): - self.info["dpi"] = 72, 72 - - def _getmp(self) -> dict[int, Any] | None: - return _getmp(self) - - -def _getexif(self: JpegImageFile) -> dict[int, Any] | None: - if "exif" not in self.info: - return None - return self.getexif()._get_merged_dict() - - -def _getmp(self: JpegImageFile) -> dict[int, Any] | None: - # Extract MP information. This method was inspired by the "highly - # experimental" _getexif version that's been in use for years now, - # itself based on the ImageFileDirectory class in the TIFF plugin. - - # The MP record essentially consists of a TIFF file embedded in a JPEG - # application marker. - try: - data = self.info["mp"] - except KeyError: - return None - file_contents = io.BytesIO(data) - head = file_contents.read(8) - endianness = ">" if head.startswith(b"\x4d\x4d\x00\x2a") else "<" - # process dictionary - from . import TiffImagePlugin - - try: - info = TiffImagePlugin.ImageFileDirectory_v2(head) - file_contents.seek(info.next) - info.load(file_contents) - mp = dict(info) - except Exception as e: - msg = "malformed MP Index (unreadable directory)" - raise SyntaxError(msg) from e - # it's an error not to have a number of images - try: - quant = mp[0xB001] - except KeyError as e: - msg = "malformed MP Index (no number of images)" - raise SyntaxError(msg) from e - # get MP entries - mpentries = [] - try: - rawmpentries = mp[0xB002] - for entrynum in range(quant): - unpackedentry = struct.unpack_from( - f"{endianness}LLLHH", rawmpentries, entrynum * 16 - ) - labels = ("Attribute", "Size", "DataOffset", "EntryNo1", "EntryNo2") - mpentry = dict(zip(labels, unpackedentry)) - mpentryattr = { - "DependentParentImageFlag": bool(mpentry["Attribute"] & (1 << 31)), - "DependentChildImageFlag": bool(mpentry["Attribute"] & (1 << 30)), - "RepresentativeImageFlag": bool(mpentry["Attribute"] & (1 << 29)), - "Reserved": (mpentry["Attribute"] & (3 << 27)) >> 27, - "ImageDataFormat": (mpentry["Attribute"] & (7 << 24)) >> 24, - "MPType": mpentry["Attribute"] & 0x00FFFFFF, - } - if mpentryattr["ImageDataFormat"] == 0: - mpentryattr["ImageDataFormat"] = "JPEG" - else: - msg = "unsupported picture format in MPO" - raise SyntaxError(msg) - mptypemap = { - 0x000000: "Undefined", - 0x010001: "Large Thumbnail (VGA Equivalent)", - 0x010002: "Large Thumbnail (Full HD Equivalent)", - 0x020001: "Multi-Frame Image (Panorama)", - 0x020002: "Multi-Frame Image: (Disparity)", - 0x020003: "Multi-Frame Image: (Multi-Angle)", - 0x030000: "Baseline MP Primary Image", - } - mpentryattr["MPType"] = mptypemap.get(mpentryattr["MPType"], "Unknown") - mpentry["Attribute"] = mpentryattr - mpentries.append(mpentry) - mp[0xB002] = mpentries - except KeyError as e: - msg = "malformed MP Index (bad MP Entry)" - raise SyntaxError(msg) from e - # Next we should try and parse the individual image unique ID list; - # we don't because I've never seen this actually used in a real MPO - # file and so can't test it. - return mp - - -# -------------------------------------------------------------------- -# stuff to save JPEG files - -RAWMODE = { - "1": "L", - "L": "L", - "RGB": "RGB", - "RGBX": "RGB", - "CMYK": "CMYK;I", # assume adobe conventions - "YCbCr": "YCbCr", -} - -# fmt: off -zigzag_index = ( - 0, 1, 5, 6, 14, 15, 27, 28, - 2, 4, 7, 13, 16, 26, 29, 42, - 3, 8, 12, 17, 25, 30, 41, 43, - 9, 11, 18, 24, 31, 40, 44, 53, - 10, 19, 23, 32, 39, 45, 52, 54, - 20, 22, 33, 38, 46, 51, 55, 60, - 21, 34, 37, 47, 50, 56, 59, 61, - 35, 36, 48, 49, 57, 58, 62, 63, -) - -samplings = { - (1, 1, 1, 1, 1, 1): 0, - (2, 1, 1, 1, 1, 1): 1, - (2, 2, 1, 1, 1, 1): 2, -} -# fmt: on - - -def get_sampling(im: Image.Image) -> int: - # There's no subsampling when images have only 1 layer - # (grayscale images) or when they are CMYK (4 layers), - # so set subsampling to the default value. - # - # NOTE: currently Pillow can't encode JPEG to YCCK format. - # If YCCK support is added in the future, subsampling code will have - # to be updated (here and in JpegEncode.c) to deal with 4 layers. - if not isinstance(im, JpegImageFile) or im.layers in (1, 4): - return -1 - sampling = im.layer[0][1:3] + im.layer[1][1:3] + im.layer[2][1:3] - return samplings.get(sampling, -1) - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.width == 0 or im.height == 0: - msg = "cannot write empty image as JPEG" - raise ValueError(msg) - - try: - rawmode = RAWMODE[im.mode] - except KeyError as e: - msg = f"cannot write mode {im.mode} as JPEG" - raise OSError(msg) from e - - info = im.encoderinfo - - dpi = [round(x) for x in info.get("dpi", (0, 0))] - - quality = info.get("quality", -1) - subsampling = info.get("subsampling", -1) - qtables = info.get("qtables") - - if quality == "keep": - quality = -1 - subsampling = "keep" - qtables = "keep" - elif quality in presets: - preset = presets[quality] - quality = -1 - subsampling = preset.get("subsampling", -1) - qtables = preset.get("quantization") - elif not isinstance(quality, int): - msg = "Invalid quality setting" - raise ValueError(msg) - else: - if subsampling in presets: - subsampling = presets[subsampling].get("subsampling", -1) - if isinstance(qtables, str) and qtables in presets: - qtables = presets[qtables].get("quantization") - - if subsampling == "4:4:4": - subsampling = 0 - elif subsampling == "4:2:2": - subsampling = 1 - elif subsampling == "4:2:0": - subsampling = 2 - elif subsampling == "4:1:1": - # For compatibility. Before Pillow 4.3, 4:1:1 actually meant 4:2:0. - # Set 4:2:0 if someone is still using that value. - subsampling = 2 - elif subsampling == "keep": - if im.format != "JPEG": - msg = "Cannot use 'keep' when original image is not a JPEG" - raise ValueError(msg) - subsampling = get_sampling(im) - - def validate_qtables( - qtables: ( - str | tuple[list[int], ...] | list[list[int]] | dict[int, list[int]] | None - ), - ) -> list[list[int]] | None: - if qtables is None: - return qtables - if isinstance(qtables, str): - try: - lines = [ - int(num) - for line in qtables.splitlines() - for num in line.split("#", 1)[0].split() - ] - except ValueError as e: - msg = "Invalid quantization table" - raise ValueError(msg) from e - else: - qtables = [lines[s : s + 64] for s in range(0, len(lines), 64)] - if isinstance(qtables, (tuple, list, dict)): - if isinstance(qtables, dict): - qtables = [ - qtables[key] for key in range(len(qtables)) if key in qtables - ] - elif isinstance(qtables, tuple): - qtables = list(qtables) - if not (0 < len(qtables) < 5): - msg = "None or too many quantization tables" - raise ValueError(msg) - for idx, table in enumerate(qtables): - try: - if len(table) != 64: - msg = "Invalid quantization table" - raise TypeError(msg) - table_array = array.array("H", table) - except TypeError as e: - msg = "Invalid quantization table" - raise ValueError(msg) from e - else: - qtables[idx] = list(table_array) - return qtables - - if qtables == "keep": - if im.format != "JPEG": - msg = "Cannot use 'keep' when original image is not a JPEG" - raise ValueError(msg) - qtables = getattr(im, "quantization", None) - qtables = validate_qtables(qtables) - - extra = info.get("extra", b"") - - MAX_BYTES_IN_MARKER = 65533 - if xmp := info.get("xmp"): - overhead_len = 29 # b"http://ns.adobe.com/xap/1.0/\x00" - max_data_bytes_in_marker = MAX_BYTES_IN_MARKER - overhead_len - if len(xmp) > max_data_bytes_in_marker: - msg = "XMP data is too long" - raise ValueError(msg) - size = o16(2 + overhead_len + len(xmp)) - extra += b"\xff\xe1" + size + b"http://ns.adobe.com/xap/1.0/\x00" + xmp - - if icc_profile := info.get("icc_profile"): - overhead_len = 14 # b"ICC_PROFILE\0" + o8(i) + o8(len(markers)) - max_data_bytes_in_marker = MAX_BYTES_IN_MARKER - overhead_len - markers = [] - while icc_profile: - markers.append(icc_profile[:max_data_bytes_in_marker]) - icc_profile = icc_profile[max_data_bytes_in_marker:] - i = 1 - for marker in markers: - size = o16(2 + overhead_len + len(marker)) - extra += ( - b"\xff\xe2" - + size - + b"ICC_PROFILE\0" - + o8(i) - + o8(len(markers)) - + marker - ) - i += 1 - - comment = info.get("comment", im.info.get("comment")) - - # "progressive" is the official name, but older documentation - # says "progression" - # FIXME: issue a warning if the wrong form is used (post-1.1.7) - progressive = info.get("progressive", False) or info.get("progression", False) - - optimize = info.get("optimize", False) - - exif = info.get("exif", b"") - if isinstance(exif, Image.Exif): - exif = exif.tobytes() - if len(exif) > MAX_BYTES_IN_MARKER: - msg = "EXIF data is too long" - raise ValueError(msg) - - # get keyword arguments - im.encoderconfig = ( - quality, - progressive, - info.get("smooth", 0), - optimize, - info.get("keep_rgb", False), - info.get("streamtype", 0), - dpi, - subsampling, - info.get("restart_marker_blocks", 0), - info.get("restart_marker_rows", 0), - qtables, - comment, - extra, - exif, - ) - - # if we optimize, libjpeg needs a buffer big enough to hold the whole image - # in a shot. Guessing on the size, at im.size bytes. (raw pixel size is - # channels*size, this is a value that's been used in a django patch. - # https://github.com/matthewwithanm/django-imagekit/issues/50 - if optimize or progressive: - # CMYK can be bigger - if im.mode == "CMYK": - bufsize = 4 * im.size[0] * im.size[1] - # keep sets quality to -1, but the actual value may be high. - elif quality >= 95 or quality == -1: - bufsize = 2 * im.size[0] * im.size[1] - else: - bufsize = im.size[0] * im.size[1] - if exif: - bufsize += len(exif) + 5 - if extra: - bufsize += len(extra) + 1 - else: - # The EXIF info needs to be written as one block, + APP1, + one spare byte. - # Ensure that our buffer is big enough. Same with the icc_profile block. - bufsize = max(len(exif) + 5, len(extra) + 1) - - ImageFile._save( - im, fp, [ImageFile._Tile("jpeg", (0, 0) + im.size, 0, rawmode)], bufsize - ) - - -## -# Factory for making JPEG and MPO instances -def jpeg_factory( - fp: IO[bytes], filename: str | bytes | None = None -) -> JpegImageFile | MpoImageFile: - im = JpegImageFile(fp, filename) - try: - mpheader = im._getmp() - if mpheader is not None and mpheader[45057] > 1: - for segment, content in im.applist: - if segment == "APP1" and b' hdrgm:Version="' in content: - # Ultra HDR images are not yet supported - return im - # It's actually an MPO - from .MpoImagePlugin import MpoImageFile - - # Don't reload everything, just convert it. - im = MpoImageFile.adopt(im, mpheader) - except (TypeError, IndexError): - # It is really a JPEG - pass - except SyntaxError: - warnings.warn( - "Image appears to be a malformed MPO file, it will be " - "interpreted as a base JPEG file" - ) - return im - - -# --------------------------------------------------------------------- -# Registry stuff - -Image.register_open(JpegImageFile.format, jpeg_factory, _accept) -Image.register_save(JpegImageFile.format, _save) - -Image.register_extensions(JpegImageFile.format, [".jfif", ".jpe", ".jpg", ".jpeg"]) - -Image.register_mime(JpegImageFile.format, "image/jpeg") diff --git a/voxvera/vendor/PIL/JpegPresets.py b/voxvera/vendor/PIL/JpegPresets.py deleted file mode 100644 index d0e64a3..0000000 --- a/voxvera/vendor/PIL/JpegPresets.py +++ /dev/null @@ -1,242 +0,0 @@ -""" -JPEG quality settings equivalent to the Photoshop settings. -Can be used when saving JPEG files. - -The following presets are available by default: -``web_low``, ``web_medium``, ``web_high``, ``web_very_high``, ``web_maximum``, -``low``, ``medium``, ``high``, ``maximum``. -More presets can be added to the :py:data:`presets` dict if needed. - -To apply the preset, specify:: - - quality="preset_name" - -To apply only the quantization table:: - - qtables="preset_name" - -To apply only the subsampling setting:: - - subsampling="preset_name" - -Example:: - - im.save("image_name.jpg", quality="web_high") - -Subsampling ------------ - -Subsampling is the practice of encoding images by implementing less resolution -for chroma information than for luma information. -(ref.: https://en.wikipedia.org/wiki/Chroma_subsampling) - -Possible subsampling values are 0, 1 and 2 that correspond to 4:4:4, 4:2:2 and -4:2:0. - -You can get the subsampling of a JPEG with the -:func:`.JpegImagePlugin.get_sampling` function. - -In JPEG compressed data a JPEG marker is used instead of an EXIF tag. -(ref.: https://exiv2.org/tags.html) - - -Quantization tables -------------------- - -They are values use by the DCT (Discrete cosine transform) to remove -*unnecessary* information from the image (the lossy part of the compression). -(ref.: https://en.wikipedia.org/wiki/Quantization_matrix#Quantization_matrices, -https://en.wikipedia.org/wiki/JPEG#Quantization) - -You can get the quantization tables of a JPEG with:: - - im.quantization - -This will return a dict with a number of lists. You can pass this dict -directly as the qtables argument when saving a JPEG. - -The quantization table format in presets is a list with sublists. These formats -are interchangeable. - -Libjpeg ref.: -https://web.archive.org/web/20120328125543/http://www.jpegcameras.com/libjpeg/libjpeg-3.html - -""" - -from __future__ import annotations - -# fmt: off -presets = { - 'web_low': {'subsampling': 2, # "4:2:0" - 'quantization': [ - [20, 16, 25, 39, 50, 46, 62, 68, - 16, 18, 23, 38, 38, 53, 65, 68, - 25, 23, 31, 38, 53, 65, 68, 68, - 39, 38, 38, 53, 65, 68, 68, 68, - 50, 38, 53, 65, 68, 68, 68, 68, - 46, 53, 65, 68, 68, 68, 68, 68, - 62, 65, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68], - [21, 25, 32, 38, 54, 68, 68, 68, - 25, 28, 24, 38, 54, 68, 68, 68, - 32, 24, 32, 43, 66, 68, 68, 68, - 38, 38, 43, 53, 68, 68, 68, 68, - 54, 54, 66, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68] - ]}, - 'web_medium': {'subsampling': 2, # "4:2:0" - 'quantization': [ - [16, 11, 11, 16, 23, 27, 31, 30, - 11, 12, 12, 15, 20, 23, 23, 30, - 11, 12, 13, 16, 23, 26, 35, 47, - 16, 15, 16, 23, 26, 37, 47, 64, - 23, 20, 23, 26, 39, 51, 64, 64, - 27, 23, 26, 37, 51, 64, 64, 64, - 31, 23, 35, 47, 64, 64, 64, 64, - 30, 30, 47, 64, 64, 64, 64, 64], - [17, 15, 17, 21, 20, 26, 38, 48, - 15, 19, 18, 17, 20, 26, 35, 43, - 17, 18, 20, 22, 26, 30, 46, 53, - 21, 17, 22, 28, 30, 39, 53, 64, - 20, 20, 26, 30, 39, 48, 64, 64, - 26, 26, 30, 39, 48, 63, 64, 64, - 38, 35, 46, 53, 64, 64, 64, 64, - 48, 43, 53, 64, 64, 64, 64, 64] - ]}, - 'web_high': {'subsampling': 0, # "4:4:4" - 'quantization': [ - [6, 4, 4, 6, 9, 11, 12, 16, - 4, 5, 5, 6, 8, 10, 12, 12, - 4, 5, 5, 6, 10, 12, 14, 19, - 6, 6, 6, 11, 12, 15, 19, 28, - 9, 8, 10, 12, 16, 20, 27, 31, - 11, 10, 12, 15, 20, 27, 31, 31, - 12, 12, 14, 19, 27, 31, 31, 31, - 16, 12, 19, 28, 31, 31, 31, 31], - [7, 7, 13, 24, 26, 31, 31, 31, - 7, 12, 16, 21, 31, 31, 31, 31, - 13, 16, 17, 31, 31, 31, 31, 31, - 24, 21, 31, 31, 31, 31, 31, 31, - 26, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31] - ]}, - 'web_very_high': {'subsampling': 0, # "4:4:4" - 'quantization': [ - [2, 2, 2, 2, 3, 4, 5, 6, - 2, 2, 2, 2, 3, 4, 5, 6, - 2, 2, 2, 2, 4, 5, 7, 9, - 2, 2, 2, 4, 5, 7, 9, 12, - 3, 3, 4, 5, 8, 10, 12, 12, - 4, 4, 5, 7, 10, 12, 12, 12, - 5, 5, 7, 9, 12, 12, 12, 12, - 6, 6, 9, 12, 12, 12, 12, 12], - [3, 3, 5, 9, 13, 15, 15, 15, - 3, 4, 6, 11, 14, 12, 12, 12, - 5, 6, 9, 14, 12, 12, 12, 12, - 9, 11, 14, 12, 12, 12, 12, 12, - 13, 14, 12, 12, 12, 12, 12, 12, - 15, 12, 12, 12, 12, 12, 12, 12, - 15, 12, 12, 12, 12, 12, 12, 12, - 15, 12, 12, 12, 12, 12, 12, 12] - ]}, - 'web_maximum': {'subsampling': 0, # "4:4:4" - 'quantization': [ - [1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 2, 2, - 1, 1, 1, 1, 1, 2, 2, 3, - 1, 1, 1, 1, 2, 2, 3, 3, - 1, 1, 1, 2, 2, 3, 3, 3, - 1, 1, 2, 2, 3, 3, 3, 3], - [1, 1, 1, 2, 2, 3, 3, 3, - 1, 1, 1, 2, 3, 3, 3, 3, - 1, 1, 1, 3, 3, 3, 3, 3, - 2, 2, 3, 3, 3, 3, 3, 3, - 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3] - ]}, - 'low': {'subsampling': 2, # "4:2:0" - 'quantization': [ - [18, 14, 14, 21, 30, 35, 34, 17, - 14, 16, 16, 19, 26, 23, 12, 12, - 14, 16, 17, 21, 23, 12, 12, 12, - 21, 19, 21, 23, 12, 12, 12, 12, - 30, 26, 23, 12, 12, 12, 12, 12, - 35, 23, 12, 12, 12, 12, 12, 12, - 34, 12, 12, 12, 12, 12, 12, 12, - 17, 12, 12, 12, 12, 12, 12, 12], - [20, 19, 22, 27, 20, 20, 17, 17, - 19, 25, 23, 14, 14, 12, 12, 12, - 22, 23, 14, 14, 12, 12, 12, 12, - 27, 14, 14, 12, 12, 12, 12, 12, - 20, 14, 12, 12, 12, 12, 12, 12, - 20, 12, 12, 12, 12, 12, 12, 12, - 17, 12, 12, 12, 12, 12, 12, 12, - 17, 12, 12, 12, 12, 12, 12, 12] - ]}, - 'medium': {'subsampling': 2, # "4:2:0" - 'quantization': [ - [12, 8, 8, 12, 17, 21, 24, 17, - 8, 9, 9, 11, 15, 19, 12, 12, - 8, 9, 10, 12, 19, 12, 12, 12, - 12, 11, 12, 21, 12, 12, 12, 12, - 17, 15, 19, 12, 12, 12, 12, 12, - 21, 19, 12, 12, 12, 12, 12, 12, - 24, 12, 12, 12, 12, 12, 12, 12, - 17, 12, 12, 12, 12, 12, 12, 12], - [13, 11, 13, 16, 20, 20, 17, 17, - 11, 14, 14, 14, 14, 12, 12, 12, - 13, 14, 14, 14, 12, 12, 12, 12, - 16, 14, 14, 12, 12, 12, 12, 12, - 20, 14, 12, 12, 12, 12, 12, 12, - 20, 12, 12, 12, 12, 12, 12, 12, - 17, 12, 12, 12, 12, 12, 12, 12, - 17, 12, 12, 12, 12, 12, 12, 12] - ]}, - 'high': {'subsampling': 0, # "4:4:4" - 'quantization': [ - [6, 4, 4, 6, 9, 11, 12, 16, - 4, 5, 5, 6, 8, 10, 12, 12, - 4, 5, 5, 6, 10, 12, 12, 12, - 6, 6, 6, 11, 12, 12, 12, 12, - 9, 8, 10, 12, 12, 12, 12, 12, - 11, 10, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 16, 12, 12, 12, 12, 12, 12, 12], - [7, 7, 13, 24, 20, 20, 17, 17, - 7, 12, 16, 14, 14, 12, 12, 12, - 13, 16, 14, 14, 12, 12, 12, 12, - 24, 14, 14, 12, 12, 12, 12, 12, - 20, 14, 12, 12, 12, 12, 12, 12, - 20, 12, 12, 12, 12, 12, 12, 12, - 17, 12, 12, 12, 12, 12, 12, 12, - 17, 12, 12, 12, 12, 12, 12, 12] - ]}, - 'maximum': {'subsampling': 0, # "4:4:4" - 'quantization': [ - [2, 2, 2, 2, 3, 4, 5, 6, - 2, 2, 2, 2, 3, 4, 5, 6, - 2, 2, 2, 2, 4, 5, 7, 9, - 2, 2, 2, 4, 5, 7, 9, 12, - 3, 3, 4, 5, 8, 10, 12, 12, - 4, 4, 5, 7, 10, 12, 12, 12, - 5, 5, 7, 9, 12, 12, 12, 12, - 6, 6, 9, 12, 12, 12, 12, 12], - [3, 3, 5, 9, 13, 15, 15, 15, - 3, 4, 6, 10, 14, 12, 12, 12, - 5, 6, 9, 14, 12, 12, 12, 12, - 9, 10, 14, 12, 12, 12, 12, 12, - 13, 14, 12, 12, 12, 12, 12, 12, - 15, 12, 12, 12, 12, 12, 12, 12, - 15, 12, 12, 12, 12, 12, 12, 12, - 15, 12, 12, 12, 12, 12, 12, 12] - ]}, -} -# fmt: on diff --git a/voxvera/vendor/PIL/McIdasImagePlugin.py b/voxvera/vendor/PIL/McIdasImagePlugin.py deleted file mode 100644 index 9a47933..0000000 --- a/voxvera/vendor/PIL/McIdasImagePlugin.py +++ /dev/null @@ -1,78 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# Basic McIdas support for PIL -# -# History: -# 1997-05-05 fl Created (8-bit images only) -# 2009-03-08 fl Added 16/32-bit support. -# -# Thanks to Richard Jones and Craig Swank for specs and samples. -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1997. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import struct - -from . import Image, ImageFile - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"\x00\x00\x00\x00\x00\x00\x00\x04") - - -## -# Image plugin for McIdas area images. - - -class McIdasImageFile(ImageFile.ImageFile): - format = "MCIDAS" - format_description = "McIdas area file" - - def _open(self) -> None: - # parse area file directory - assert self.fp is not None - - s = self.fp.read(256) - if not _accept(s) or len(s) != 256: - msg = "not an McIdas area file" - raise SyntaxError(msg) - - self.area_descriptor_raw = s - self.area_descriptor = w = [0, *struct.unpack("!64i", s)] - - # get mode - if w[11] == 1: - mode = rawmode = "L" - elif w[11] == 2: - mode = rawmode = "I;16B" - elif w[11] == 4: - # FIXME: add memory map support - mode = "I" - rawmode = "I;32B" - else: - msg = "unsupported McIdas format" - raise SyntaxError(msg) - - self._mode = mode - self._size = w[10], w[9] - - offset = w[34] + w[15] - stride = w[15] + w[10] * w[11] * w[14] - - self.tile = [ - ImageFile._Tile("raw", (0, 0) + self.size, offset, (rawmode, stride, 1)) - ] - - -# -------------------------------------------------------------------- -# registry - -Image.register_open(McIdasImageFile.format, McIdasImageFile, _accept) - -# no default extension diff --git a/voxvera/vendor/PIL/MicImagePlugin.py b/voxvera/vendor/PIL/MicImagePlugin.py deleted file mode 100644 index 99a07ba..0000000 --- a/voxvera/vendor/PIL/MicImagePlugin.py +++ /dev/null @@ -1,103 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# Microsoft Image Composer support for PIL -# -# Notes: -# uses TiffImagePlugin.py to read the actual image streams -# -# History: -# 97-01-20 fl Created -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1997. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import olefile - -from . import Image, TiffImagePlugin - -# -# -------------------------------------------------------------------- - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(olefile.MAGIC) - - -## -# Image plugin for Microsoft's Image Composer file format. - - -class MicImageFile(TiffImagePlugin.TiffImageFile): - format = "MIC" - format_description = "Microsoft Image Composer" - _close_exclusive_fp_after_loading = False - - def _open(self) -> None: - # read the OLE directory and see if this is a likely - # to be a Microsoft Image Composer file - - try: - self.ole = olefile.OleFileIO(self.fp) - except OSError as e: - msg = "not an MIC file; invalid OLE file" - raise SyntaxError(msg) from e - - # find ACI subfiles with Image members (maybe not the - # best way to identify MIC files, but what the... ;-) - - self.images = [ - path - for path in self.ole.listdir() - if path[1:] and path[0].endswith(".ACI") and path[1] == "Image" - ] - - # if we didn't find any images, this is probably not - # an MIC file. - if not self.images: - msg = "not an MIC file; no image entries" - raise SyntaxError(msg) - - self.frame = -1 - self._n_frames = len(self.images) - self.is_animated = self._n_frames > 1 - - assert self.fp is not None - self.__fp = self.fp - self.seek(0) - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - filename = self.images[frame] - self.fp = self.ole.openstream(filename) - - TiffImagePlugin.TiffImageFile._open(self) - - self.frame = frame - - def tell(self) -> int: - return self.frame - - def close(self) -> None: - self.__fp.close() - self.ole.close() - super().close() - - def __exit__(self, *args: object) -> None: - self.__fp.close() - self.ole.close() - super().__exit__() - - -# -# -------------------------------------------------------------------- - -Image.register_open(MicImageFile.format, MicImageFile, _accept) - -Image.register_extension(MicImageFile.format, ".mic") diff --git a/voxvera/vendor/PIL/MpegImagePlugin.py b/voxvera/vendor/PIL/MpegImagePlugin.py deleted file mode 100644 index 47ebe9d..0000000 --- a/voxvera/vendor/PIL/MpegImagePlugin.py +++ /dev/null @@ -1,84 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# MPEG file handling -# -# History: -# 95-09-09 fl Created -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1995. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import Image, ImageFile -from ._binary import i8 -from ._typing import SupportsRead - -# -# Bitstream parser - - -class BitStream: - def __init__(self, fp: SupportsRead[bytes]) -> None: - self.fp = fp - self.bits = 0 - self.bitbuffer = 0 - - def next(self) -> int: - return i8(self.fp.read(1)) - - def peek(self, bits: int) -> int: - while self.bits < bits: - self.bitbuffer = (self.bitbuffer << 8) + self.next() - self.bits += 8 - return self.bitbuffer >> (self.bits - bits) & (1 << bits) - 1 - - def skip(self, bits: int) -> None: - while self.bits < bits: - self.bitbuffer = (self.bitbuffer << 8) + i8(self.fp.read(1)) - self.bits += 8 - self.bits = self.bits - bits - - def read(self, bits: int) -> int: - v = self.peek(bits) - self.bits = self.bits - bits - return v - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"\x00\x00\x01\xb3") - - -## -# Image plugin for MPEG streams. This plugin can identify a stream, -# but it cannot read it. - - -class MpegImageFile(ImageFile.ImageFile): - format = "MPEG" - format_description = "MPEG" - - def _open(self) -> None: - assert self.fp is not None - - s = BitStream(self.fp) - if s.read(32) != 0x1B3: - msg = "not an MPEG file" - raise SyntaxError(msg) - - self._mode = "RGB" - self._size = s.read(12), s.read(12) - - -# -------------------------------------------------------------------- -# Registry stuff - -Image.register_open(MpegImageFile.format, MpegImageFile, _accept) - -Image.register_extensions(MpegImageFile.format, [".mpg", ".mpeg"]) - -Image.register_mime(MpegImageFile.format, "video/mpeg") diff --git a/voxvera/vendor/PIL/MpoImagePlugin.py b/voxvera/vendor/PIL/MpoImagePlugin.py deleted file mode 100644 index 9360061..0000000 --- a/voxvera/vendor/PIL/MpoImagePlugin.py +++ /dev/null @@ -1,204 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# MPO file handling -# -# See "Multi-Picture Format" (CIPA DC-007-Translation 2009, Standard of the -# Camera & Imaging Products Association) -# -# The multi-picture object combines multiple JPEG images (with a modified EXIF -# data format) into a single file. While it can theoretically be used much like -# a GIF animation, it is commonly used to represent 3D photographs and is (as -# of this writing) the most commonly used format by 3D cameras. -# -# History: -# 2014-03-13 Feneric Created -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os -import struct -from typing import IO, Any, cast - -from . import ( - Image, - ImageFile, - ImageSequence, - JpegImagePlugin, - TiffImagePlugin, -) -from ._binary import o32le -from ._util import DeferredError - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - JpegImagePlugin._save(im, fp, filename) - - -def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - append_images = im.encoderinfo.get("append_images", []) - if not append_images and not getattr(im, "is_animated", False): - _save(im, fp, filename) - return - - mpf_offset = 28 - offsets: list[int] = [] - im_sequences = [im, *append_images] - total = sum(getattr(seq, "n_frames", 1) for seq in im_sequences) - for im_sequence in im_sequences: - for im_frame in ImageSequence.Iterator(im_sequence): - if not offsets: - # APP2 marker - ifd_length = 66 + 16 * total - im_frame.encoderinfo["extra"] = ( - b"\xff\xe2" - + struct.pack(">H", 6 + ifd_length) - + b"MPF\0" - + b" " * ifd_length - ) - exif = im_frame.encoderinfo.get("exif") - if isinstance(exif, Image.Exif): - exif = exif.tobytes() - im_frame.encoderinfo["exif"] = exif - if exif: - mpf_offset += 4 + len(exif) - - JpegImagePlugin._save(im_frame, fp, filename) - offsets.append(fp.tell()) - else: - encoderinfo = im_frame._attach_default_encoderinfo(im) - im_frame.save(fp, "JPEG") - im_frame.encoderinfo = encoderinfo - offsets.append(fp.tell() - offsets[-1]) - - ifd = TiffImagePlugin.ImageFileDirectory_v2() - ifd[0xB000] = b"0100" - ifd[0xB001] = len(offsets) - - mpentries = b"" - data_offset = 0 - for i, size in enumerate(offsets): - if i == 0: - mptype = 0x030000 # Baseline MP Primary Image - else: - mptype = 0x000000 # Undefined - mpentries += struct.pack(" None: - assert self.fp is not None - self.fp.seek(0) # prep the fp in order to pass the JPEG test - JpegImagePlugin.JpegImageFile._open(self) - self._after_jpeg_open() - - def _after_jpeg_open(self, mpheader: dict[int, Any] | None = None) -> None: - self.mpinfo = mpheader if mpheader is not None else self._getmp() - if self.mpinfo is None: - msg = "Image appears to be a malformed MPO file" - raise ValueError(msg) - self.n_frames = self.mpinfo[0xB001] - self.__mpoffsets = [ - mpent["DataOffset"] + self.info["mpoffset"] for mpent in self.mpinfo[0xB002] - ] - self.__mpoffsets[0] = 0 - # Note that the following assertion will only be invalid if something - # gets broken within JpegImagePlugin. - assert self.n_frames == len(self.__mpoffsets) - del self.info["mpoffset"] # no longer needed - self.is_animated = self.n_frames > 1 - assert self.fp is not None - self._fp = self.fp # FIXME: hack - self._fp.seek(self.__mpoffsets[0]) # get ready to read first frame - self.__frame = 0 - self.offset = 0 - # for now we can only handle reading and individual frame extraction - self.readonly = 1 - - def load_seek(self, pos: int) -> None: - if isinstance(self._fp, DeferredError): - raise self._fp.ex - self._fp.seek(pos) - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - if isinstance(self._fp, DeferredError): - raise self._fp.ex - self.fp = self._fp - self.offset = self.__mpoffsets[frame] - - original_exif = self.info.get("exif") - if "exif" in self.info: - del self.info["exif"] - - self.fp.seek(self.offset + 2) # skip SOI marker - if not self.fp.read(2): - msg = "No data found for frame" - raise ValueError(msg) - self.fp.seek(self.offset) - JpegImagePlugin.JpegImageFile._open(self) - if self.info.get("exif") != original_exif: - self._reload_exif() - - self.tile = [ - ImageFile._Tile("jpeg", (0, 0) + self.size, self.offset, self.tile[0][-1]) - ] - self.__frame = frame - - def tell(self) -> int: - return self.__frame - - @staticmethod - def adopt( - jpeg_instance: JpegImagePlugin.JpegImageFile, - mpheader: dict[int, Any] | None = None, - ) -> MpoImageFile: - """ - Transform the instance of JpegImageFile into - an instance of MpoImageFile. - After the call, the JpegImageFile is extended - to be an MpoImageFile. - - This is essentially useful when opening a JPEG - file that reveals itself as an MPO, to avoid - double call to _open. - """ - jpeg_instance.__class__ = MpoImageFile - mpo_instance = cast(MpoImageFile, jpeg_instance) - mpo_instance._after_jpeg_open(mpheader) - return mpo_instance - - -# --------------------------------------------------------------------- -# Registry stuff - -# Note that since MPO shares a factory with JPEG, we do not need to do a -# separate registration for it here. -# Image.register_open(MpoImageFile.format, -# JpegImagePlugin.jpeg_factory, _accept) -Image.register_save(MpoImageFile.format, _save) -Image.register_save_all(MpoImageFile.format, _save_all) - -Image.register_extension(MpoImageFile.format, ".mpo") - -Image.register_mime(MpoImageFile.format, "image/mpo") diff --git a/voxvera/vendor/PIL/MspImagePlugin.py b/voxvera/vendor/PIL/MspImagePlugin.py deleted file mode 100644 index 277087a..0000000 --- a/voxvera/vendor/PIL/MspImagePlugin.py +++ /dev/null @@ -1,200 +0,0 @@ -# -# The Python Imaging Library. -# -# MSP file handling -# -# This is the format used by the Paint program in Windows 1 and 2. -# -# History: -# 95-09-05 fl Created -# 97-01-03 fl Read/write MSP images -# 17-02-21 es Fixed RLE interpretation -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1995-97. -# Copyright (c) Eric Soroos 2017. -# -# See the README file for information on usage and redistribution. -# -# More info on this format: https://archive.org/details/gg243631 -# Page 313: -# Figure 205. Windows Paint Version 1: "DanM" Format -# Figure 206. Windows Paint Version 2: "LinS" Format. Used in Windows V2.03 -# -# See also: https://www.fileformat.info/format/mspaint/egff.htm -from __future__ import annotations - -import io -import struct -from typing import IO - -from . import Image, ImageFile -from ._binary import i16le as i16 -from ._binary import o16le as o16 - -# -# read MSP files - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith((b"DanM", b"LinS")) - - -## -# Image plugin for Windows MSP images. This plugin supports both -# uncompressed (Windows 1.0). - - -class MspImageFile(ImageFile.ImageFile): - format = "MSP" - format_description = "Windows Paint" - - def _open(self) -> None: - # Header - assert self.fp is not None - - s = self.fp.read(32) - if not _accept(s): - msg = "not an MSP file" - raise SyntaxError(msg) - - # Header checksum - checksum = 0 - for i in range(0, 32, 2): - checksum = checksum ^ i16(s, i) - if checksum != 0: - msg = "bad MSP checksum" - raise SyntaxError(msg) - - self._mode = "1" - self._size = i16(s, 4), i16(s, 6) - - if s.startswith(b"DanM"): - self.tile = [ImageFile._Tile("raw", (0, 0) + self.size, 32, "1")] - else: - self.tile = [ImageFile._Tile("MSP", (0, 0) + self.size, 32)] - - -class MspDecoder(ImageFile.PyDecoder): - # The algo for the MSP decoder is from - # https://www.fileformat.info/format/mspaint/egff.htm - # cc-by-attribution -- That page references is taken from the - # Encyclopedia of Graphics File Formats and is licensed by - # O'Reilly under the Creative Common/Attribution license - # - # For RLE encoded files, the 32byte header is followed by a scan - # line map, encoded as one 16bit word of encoded byte length per - # line. - # - # NOTE: the encoded length of the line can be 0. This was not - # handled in the previous version of this encoder, and there's no - # mention of how to handle it in the documentation. From the few - # examples I've seen, I've assumed that it is a fill of the - # background color, in this case, white. - # - # - # Pseudocode of the decoder: - # Read a BYTE value as the RunType - # If the RunType value is zero - # Read next byte as the RunCount - # Read the next byte as the RunValue - # Write the RunValue byte RunCount times - # If the RunType value is non-zero - # Use this value as the RunCount - # Read and write the next RunCount bytes literally - # - # e.g.: - # 0x00 03 ff 05 00 01 02 03 04 - # would yield the bytes: - # 0xff ff ff 00 01 02 03 04 - # - # which are then interpreted as a bit packed mode '1' image - - _pulls_fd = True - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - assert self.fd is not None - - img = io.BytesIO() - blank_line = bytearray((0xFF,) * ((self.state.xsize + 7) // 8)) - try: - self.fd.seek(32) - rowmap = struct.unpack_from( - f"<{self.state.ysize}H", self.fd.read(self.state.ysize * 2) - ) - except struct.error as e: - msg = "Truncated MSP file in row map" - raise OSError(msg) from e - - for x, rowlen in enumerate(rowmap): - try: - if rowlen == 0: - img.write(blank_line) - continue - row = self.fd.read(rowlen) - if len(row) != rowlen: - msg = f"Truncated MSP file, expected {rowlen} bytes on row {x}" - raise OSError(msg) - idx = 0 - while idx < rowlen: - runtype = row[idx] - idx += 1 - if runtype == 0: - (runcount, runval) = struct.unpack_from("Bc", row, idx) - img.write(runval * runcount) - idx += 2 - else: - runcount = runtype - img.write(row[idx : idx + runcount]) - idx += runcount - - except struct.error as e: - msg = f"Corrupted MSP file in row {x}" - raise OSError(msg) from e - - self.set_as_raw(img.getvalue(), "1") - - return -1, 0 - - -Image.register_decoder("MSP", MspDecoder) - - -# -# write MSP files (uncompressed only) - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.mode != "1": - msg = f"cannot write mode {im.mode} as MSP" - raise OSError(msg) - - # create MSP header - header = [0] * 16 - - header[0], header[1] = i16(b"Da"), i16(b"nM") # version 1 - header[2], header[3] = im.size - header[4], header[5] = 1, 1 - header[6], header[7] = 1, 1 - header[8], header[9] = im.size - - checksum = 0 - for h in header: - checksum = checksum ^ h - header[12] = checksum # FIXME: is this the right field? - - # header - for h in header: - fp.write(o16(h)) - - # image body - ImageFile._save(im, fp, [ImageFile._Tile("raw", (0, 0) + im.size, 32, "1")]) - - -# -# registry - -Image.register_open(MspImageFile.format, MspImageFile, _accept) -Image.register_save(MspImageFile.format, _save) - -Image.register_extension(MspImageFile.format, ".msp") diff --git a/voxvera/vendor/PIL/PSDraw.py b/voxvera/vendor/PIL/PSDraw.py deleted file mode 100644 index 7fd4c5c..0000000 --- a/voxvera/vendor/PIL/PSDraw.py +++ /dev/null @@ -1,237 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# Simple PostScript graphics interface -# -# History: -# 1996-04-20 fl Created -# 1999-01-10 fl Added gsave/grestore to image method -# 2005-05-04 fl Fixed floating point issue in image (from Eric Etheridge) -# -# Copyright (c) 1997-2005 by Secret Labs AB. All rights reserved. -# Copyright (c) 1996 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import sys -from typing import IO - -from . import EpsImagePlugin - -TYPE_CHECKING = False - - -## -# Simple PostScript graphics interface. - - -class PSDraw: - """ - Sets up printing to the given file. If ``fp`` is omitted, - ``sys.stdout.buffer`` is assumed. - """ - - def __init__(self, fp: IO[bytes] | None = None) -> None: - if not fp: - fp = sys.stdout.buffer - self.fp = fp - - def begin_document(self, id: str | None = None) -> None: - """Set up printing of a document. (Write PostScript DSC header.)""" - # FIXME: incomplete - self.fp.write( - b"%!PS-Adobe-3.0\n" - b"save\n" - b"/showpage { } def\n" - b"%%EndComments\n" - b"%%BeginDocument\n" - ) - # self.fp.write(ERROR_PS) # debugging! - self.fp.write(EDROFF_PS) - self.fp.write(VDI_PS) - self.fp.write(b"%%EndProlog\n") - self.isofont: dict[bytes, int] = {} - - def end_document(self) -> None: - """Ends printing. (Write PostScript DSC footer.)""" - self.fp.write(b"%%EndDocument\nrestore showpage\n%%End\n") - if hasattr(self.fp, "flush"): - self.fp.flush() - - def setfont(self, font: str, size: int) -> None: - """ - Selects which font to use. - - :param font: A PostScript font name - :param size: Size in points. - """ - font_bytes = bytes(font, "UTF-8") - if font_bytes not in self.isofont: - # reencode font - self.fp.write( - b"/PSDraw-%s ISOLatin1Encoding /%s E\n" % (font_bytes, font_bytes) - ) - self.isofont[font_bytes] = 1 - # rough - self.fp.write(b"/F0 %d /PSDraw-%s F\n" % (size, font_bytes)) - - def line(self, xy0: tuple[int, int], xy1: tuple[int, int]) -> None: - """ - Draws a line between the two points. Coordinates are given in - PostScript point coordinates (72 points per inch, (0, 0) is the lower - left corner of the page). - """ - self.fp.write(b"%d %d %d %d Vl\n" % (*xy0, *xy1)) - - def rectangle(self, box: tuple[int, int, int, int]) -> None: - """ - Draws a rectangle. - - :param box: A tuple of four integers, specifying left, bottom, width and - height. - """ - self.fp.write(b"%d %d M 0 %d %d Vr\n" % box) - - def text(self, xy: tuple[int, int], text: str) -> None: - """ - Draws text at the given position. You must use - :py:meth:`~PIL.PSDraw.PSDraw.setfont` before calling this method. - """ - text_bytes = bytes(text, "UTF-8") - text_bytes = b"\\(".join(text_bytes.split(b"(")) - text_bytes = b"\\)".join(text_bytes.split(b")")) - self.fp.write(b"%d %d M (%s) S\n" % (xy + (text_bytes,))) - - if TYPE_CHECKING: - from . import Image - - def image( - self, box: tuple[int, int, int, int], im: Image.Image, dpi: int | None = None - ) -> None: - """Draw a PIL image, centered in the given box.""" - # default resolution depends on mode - if not dpi: - if im.mode == "1": - dpi = 200 # fax - else: - dpi = 100 # grayscale - # image size (on paper) - x = im.size[0] * 72 / dpi - y = im.size[1] * 72 / dpi - # max allowed size - xmax = float(box[2] - box[0]) - ymax = float(box[3] - box[1]) - if x > xmax: - y = y * xmax / x - x = xmax - if y > ymax: - x = x * ymax / y - y = ymax - dx = (xmax - x) / 2 + box[0] - dy = (ymax - y) / 2 + box[1] - self.fp.write(b"gsave\n%f %f translate\n" % (dx, dy)) - if (x, y) != im.size: - # EpsImagePlugin._save prints the image at (0,0,xsize,ysize) - sx = x / im.size[0] - sy = y / im.size[1] - self.fp.write(b"%f %f scale\n" % (sx, sy)) - EpsImagePlugin._save(im, self.fp, "", 0) - self.fp.write(b"\ngrestore\n") - - -# -------------------------------------------------------------------- -# PostScript driver - -# -# EDROFF.PS -- PostScript driver for Edroff 2 -# -# History: -# 94-01-25 fl: created (edroff 2.04) -# -# Copyright (c) Fredrik Lundh 1994. -# - - -EDROFF_PS = b"""\ -/S { show } bind def -/P { moveto show } bind def -/M { moveto } bind def -/X { 0 rmoveto } bind def -/Y { 0 exch rmoveto } bind def -/E { findfont - dup maxlength dict begin - { - 1 index /FID ne { def } { pop pop } ifelse - } forall - /Encoding exch def - dup /FontName exch def - currentdict end definefont pop -} bind def -/F { findfont exch scalefont dup setfont - [ exch /setfont cvx ] cvx bind def -} bind def -""" - -# -# VDI.PS -- PostScript driver for VDI meta commands -# -# History: -# 94-01-25 fl: created (edroff 2.04) -# -# Copyright (c) Fredrik Lundh 1994. -# - -VDI_PS = b"""\ -/Vm { moveto } bind def -/Va { newpath arcn stroke } bind def -/Vl { moveto lineto stroke } bind def -/Vc { newpath 0 360 arc closepath } bind def -/Vr { exch dup 0 rlineto - exch dup 0 exch rlineto - exch neg 0 rlineto - 0 exch neg rlineto - setgray fill } bind def -/Tm matrix def -/Ve { Tm currentmatrix pop - translate scale newpath 0 0 .5 0 360 arc closepath - Tm setmatrix -} bind def -/Vf { currentgray exch setgray fill setgray } bind def -""" - -# -# ERROR.PS -- Error handler -# -# History: -# 89-11-21 fl: created (pslist 1.10) -# - -ERROR_PS = b"""\ -/landscape false def -/errorBUF 200 string def -/errorNL { currentpoint 10 sub exch pop 72 exch moveto } def -errordict begin /handleerror { - initmatrix /Courier findfont 10 scalefont setfont - newpath 72 720 moveto $error begin /newerror false def - (PostScript Error) show errorNL errorNL - (Error: ) show - /errorname load errorBUF cvs show errorNL errorNL - (Command: ) show - /command load dup type /stringtype ne { errorBUF cvs } if show - errorNL errorNL - (VMstatus: ) show - vmstatus errorBUF cvs show ( bytes available, ) show - errorBUF cvs show ( bytes used at level ) show - errorBUF cvs show errorNL errorNL - (Operand stargck: ) show errorNL /ostargck load { - dup type /stringtype ne { errorBUF cvs } if 72 0 rmoveto show errorNL - } forall errorNL - (Execution stargck: ) show errorNL /estargck load { - dup type /stringtype ne { errorBUF cvs } if 72 0 rmoveto show errorNL - } forall - end showpage -} def end -""" diff --git a/voxvera/vendor/PIL/PaletteFile.py b/voxvera/vendor/PIL/PaletteFile.py deleted file mode 100644 index 2a26e5d..0000000 --- a/voxvera/vendor/PIL/PaletteFile.py +++ /dev/null @@ -1,54 +0,0 @@ -# -# Python Imaging Library -# $Id$ -# -# stuff to read simple, teragon-style palette files -# -# History: -# 97-08-23 fl Created -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1997. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from typing import IO - -from ._binary import o8 - - -class PaletteFile: - """File handler for Teragon-style palette files.""" - - rawmode = "RGB" - - def __init__(self, fp: IO[bytes]) -> None: - palette = [o8(i) * 3 for i in range(256)] - - while True: - s = fp.readline() - - if not s: - break - if s.startswith(b"#"): - continue - if len(s) > 100: - msg = "bad palette file" - raise SyntaxError(msg) - - v = [int(x) for x in s.split()] - try: - [i, r, g, b] = v - except ValueError: - [i, r] = v - g = b = r - - if 0 <= i <= 255: - palette[i] = o8(r) + o8(g) + o8(b) - - self.palette = b"".join(palette) - - def getpalette(self) -> tuple[bytes, str]: - return self.palette, self.rawmode diff --git a/voxvera/vendor/PIL/PalmImagePlugin.py b/voxvera/vendor/PIL/PalmImagePlugin.py deleted file mode 100644 index 15f7129..0000000 --- a/voxvera/vendor/PIL/PalmImagePlugin.py +++ /dev/null @@ -1,217 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# - -## -# Image plugin for Palm pixmap images (output only). -## -from __future__ import annotations - -from typing import IO - -from . import Image, ImageFile -from ._binary import o8 -from ._binary import o16be as o16b - -# fmt: off -_Palm8BitColormapValues = ( - (255, 255, 255), (255, 204, 255), (255, 153, 255), (255, 102, 255), - (255, 51, 255), (255, 0, 255), (255, 255, 204), (255, 204, 204), - (255, 153, 204), (255, 102, 204), (255, 51, 204), (255, 0, 204), - (255, 255, 153), (255, 204, 153), (255, 153, 153), (255, 102, 153), - (255, 51, 153), (255, 0, 153), (204, 255, 255), (204, 204, 255), - (204, 153, 255), (204, 102, 255), (204, 51, 255), (204, 0, 255), - (204, 255, 204), (204, 204, 204), (204, 153, 204), (204, 102, 204), - (204, 51, 204), (204, 0, 204), (204, 255, 153), (204, 204, 153), - (204, 153, 153), (204, 102, 153), (204, 51, 153), (204, 0, 153), - (153, 255, 255), (153, 204, 255), (153, 153, 255), (153, 102, 255), - (153, 51, 255), (153, 0, 255), (153, 255, 204), (153, 204, 204), - (153, 153, 204), (153, 102, 204), (153, 51, 204), (153, 0, 204), - (153, 255, 153), (153, 204, 153), (153, 153, 153), (153, 102, 153), - (153, 51, 153), (153, 0, 153), (102, 255, 255), (102, 204, 255), - (102, 153, 255), (102, 102, 255), (102, 51, 255), (102, 0, 255), - (102, 255, 204), (102, 204, 204), (102, 153, 204), (102, 102, 204), - (102, 51, 204), (102, 0, 204), (102, 255, 153), (102, 204, 153), - (102, 153, 153), (102, 102, 153), (102, 51, 153), (102, 0, 153), - (51, 255, 255), (51, 204, 255), (51, 153, 255), (51, 102, 255), - (51, 51, 255), (51, 0, 255), (51, 255, 204), (51, 204, 204), - (51, 153, 204), (51, 102, 204), (51, 51, 204), (51, 0, 204), - (51, 255, 153), (51, 204, 153), (51, 153, 153), (51, 102, 153), - (51, 51, 153), (51, 0, 153), (0, 255, 255), (0, 204, 255), - (0, 153, 255), (0, 102, 255), (0, 51, 255), (0, 0, 255), - (0, 255, 204), (0, 204, 204), (0, 153, 204), (0, 102, 204), - (0, 51, 204), (0, 0, 204), (0, 255, 153), (0, 204, 153), - (0, 153, 153), (0, 102, 153), (0, 51, 153), (0, 0, 153), - (255, 255, 102), (255, 204, 102), (255, 153, 102), (255, 102, 102), - (255, 51, 102), (255, 0, 102), (255, 255, 51), (255, 204, 51), - (255, 153, 51), (255, 102, 51), (255, 51, 51), (255, 0, 51), - (255, 255, 0), (255, 204, 0), (255, 153, 0), (255, 102, 0), - (255, 51, 0), (255, 0, 0), (204, 255, 102), (204, 204, 102), - (204, 153, 102), (204, 102, 102), (204, 51, 102), (204, 0, 102), - (204, 255, 51), (204, 204, 51), (204, 153, 51), (204, 102, 51), - (204, 51, 51), (204, 0, 51), (204, 255, 0), (204, 204, 0), - (204, 153, 0), (204, 102, 0), (204, 51, 0), (204, 0, 0), - (153, 255, 102), (153, 204, 102), (153, 153, 102), (153, 102, 102), - (153, 51, 102), (153, 0, 102), (153, 255, 51), (153, 204, 51), - (153, 153, 51), (153, 102, 51), (153, 51, 51), (153, 0, 51), - (153, 255, 0), (153, 204, 0), (153, 153, 0), (153, 102, 0), - (153, 51, 0), (153, 0, 0), (102, 255, 102), (102, 204, 102), - (102, 153, 102), (102, 102, 102), (102, 51, 102), (102, 0, 102), - (102, 255, 51), (102, 204, 51), (102, 153, 51), (102, 102, 51), - (102, 51, 51), (102, 0, 51), (102, 255, 0), (102, 204, 0), - (102, 153, 0), (102, 102, 0), (102, 51, 0), (102, 0, 0), - (51, 255, 102), (51, 204, 102), (51, 153, 102), (51, 102, 102), - (51, 51, 102), (51, 0, 102), (51, 255, 51), (51, 204, 51), - (51, 153, 51), (51, 102, 51), (51, 51, 51), (51, 0, 51), - (51, 255, 0), (51, 204, 0), (51, 153, 0), (51, 102, 0), - (51, 51, 0), (51, 0, 0), (0, 255, 102), (0, 204, 102), - (0, 153, 102), (0, 102, 102), (0, 51, 102), (0, 0, 102), - (0, 255, 51), (0, 204, 51), (0, 153, 51), (0, 102, 51), - (0, 51, 51), (0, 0, 51), (0, 255, 0), (0, 204, 0), - (0, 153, 0), (0, 102, 0), (0, 51, 0), (17, 17, 17), - (34, 34, 34), (68, 68, 68), (85, 85, 85), (119, 119, 119), - (136, 136, 136), (170, 170, 170), (187, 187, 187), (221, 221, 221), - (238, 238, 238), (192, 192, 192), (128, 0, 0), (128, 0, 128), - (0, 128, 0), (0, 128, 128), (0, 0, 0), (0, 0, 0), - (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), - (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), - (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), - (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), - (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), - (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)) -# fmt: on - - -# so build a prototype image to be used for palette resampling -def build_prototype_image() -> Image.Image: - image = Image.new("L", (1, len(_Palm8BitColormapValues))) - image.putdata(list(range(len(_Palm8BitColormapValues)))) - palettedata: tuple[int, ...] = () - for colormapValue in _Palm8BitColormapValues: - palettedata += colormapValue - palettedata += (0, 0, 0) * (256 - len(_Palm8BitColormapValues)) - image.putpalette(palettedata) - return image - - -Palm8BitColormapImage = build_prototype_image() - -# OK, we now have in Palm8BitColormapImage, -# a "P"-mode image with the right palette -# -# -------------------------------------------------------------------- - -_FLAGS = {"custom-colormap": 0x4000, "is-compressed": 0x8000, "has-transparent": 0x2000} - -_COMPRESSION_TYPES = {"none": 0xFF, "rle": 0x01, "scanline": 0x00} - - -# -# -------------------------------------------------------------------- - -## -# (Internal) Image save plugin for the Palm format. - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.mode == "P": - rawmode = "P" - bpp = 8 - version = 1 - - elif im.mode == "L": - if im.encoderinfo.get("bpp") in (1, 2, 4): - # this is 8-bit grayscale, so we shift it to get the high-order bits, - # and invert it because - # Palm does grayscale from white (0) to black (1) - bpp = im.encoderinfo["bpp"] - maxval = (1 << bpp) - 1 - shift = 8 - bpp - im = im.point(lambda x: maxval - (x >> shift)) - elif im.info.get("bpp") in (1, 2, 4): - # here we assume that even though the inherent mode is 8-bit grayscale, - # only the lower bpp bits are significant. - # We invert them to match the Palm. - bpp = im.info["bpp"] - maxval = (1 << bpp) - 1 - im = im.point(lambda x: maxval - (x & maxval)) - else: - msg = f"cannot write mode {im.mode} as Palm" - raise OSError(msg) - - # we ignore the palette here - im._mode = "P" - rawmode = f"P;{bpp}" - version = 1 - - elif im.mode == "1": - # monochrome -- write it inverted, as is the Palm standard - rawmode = "1;I" - bpp = 1 - version = 0 - - else: - msg = f"cannot write mode {im.mode} as Palm" - raise OSError(msg) - - # - # make sure image data is available - im.load() - - # write header - - cols = im.size[0] - rows = im.size[1] - - rowbytes = int((cols + (16 // bpp - 1)) / (16 // bpp)) * 2 - transparent_index = 0 - compression_type = _COMPRESSION_TYPES["none"] - - flags = 0 - if im.mode == "P": - flags |= _FLAGS["custom-colormap"] - colormap = im.im.getpalette() - colors = len(colormap) // 3 - colormapsize = 4 * colors + 2 - else: - colormapsize = 0 - - if "offset" in im.info: - offset = (rowbytes * rows + 16 + 3 + colormapsize) // 4 - else: - offset = 0 - - fp.write(o16b(cols) + o16b(rows) + o16b(rowbytes) + o16b(flags)) - fp.write(o8(bpp)) - fp.write(o8(version)) - fp.write(o16b(offset)) - fp.write(o8(transparent_index)) - fp.write(o8(compression_type)) - fp.write(o16b(0)) # reserved by Palm - - # now write colormap if necessary - - if colormapsize: - fp.write(o16b(colors)) - for i in range(colors): - fp.write(o8(i)) - fp.write(colormap[3 * i : 3 * i + 3]) - - # now convert data to raw form - ImageFile._save( - im, fp, [ImageFile._Tile("raw", (0, 0) + im.size, 0, (rawmode, rowbytes, 1))] - ) - - if hasattr(fp, "flush"): - fp.flush() - - -# -# -------------------------------------------------------------------- - -Image.register_save("Palm", _save) - -Image.register_extension("Palm", ".palm") - -Image.register_mime("Palm", "image/palm") diff --git a/voxvera/vendor/PIL/PcdImagePlugin.py b/voxvera/vendor/PIL/PcdImagePlugin.py deleted file mode 100644 index 296f377..0000000 --- a/voxvera/vendor/PIL/PcdImagePlugin.py +++ /dev/null @@ -1,68 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# PCD file handling -# -# History: -# 96-05-10 fl Created -# 96-05-27 fl Added draft mode (128x192, 256x384) -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1996. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import Image, ImageFile - -## -# Image plugin for PhotoCD images. This plugin only reads the 768x512 -# image from the file; higher resolutions are encoded in a proprietary -# encoding. - - -class PcdImageFile(ImageFile.ImageFile): - format = "PCD" - format_description = "Kodak PhotoCD" - - def _open(self) -> None: - # rough - assert self.fp is not None - - self.fp.seek(2048) - s = self.fp.read(1539) - - if not s.startswith(b"PCD_"): - msg = "not a PCD file" - raise SyntaxError(msg) - - orientation = s[1538] & 3 - self.tile_post_rotate = None - if orientation == 1: - self.tile_post_rotate = 90 - elif orientation == 3: - self.tile_post_rotate = 270 - - self._mode = "RGB" - self._size = (512, 768) if orientation in (1, 3) else (768, 512) - self.tile = [ImageFile._Tile("pcd", (0, 0, 768, 512), 96 * 2048)] - - def load_prepare(self) -> None: - if self._im is None and self.tile_post_rotate: - self.im = Image.core.new(self.mode, (768, 512)) - ImageFile.ImageFile.load_prepare(self) - - def load_end(self) -> None: - if self.tile_post_rotate: - # Handle rotated PCDs - self.im = self.rotate(self.tile_post_rotate, expand=True).im - - -# -# registry - -Image.register_open(PcdImageFile.format, PcdImageFile) - -Image.register_extension(PcdImageFile.format, ".pcd") diff --git a/voxvera/vendor/PIL/PcfFontFile.py b/voxvera/vendor/PIL/PcfFontFile.py deleted file mode 100644 index a00e9b9..0000000 --- a/voxvera/vendor/PIL/PcfFontFile.py +++ /dev/null @@ -1,258 +0,0 @@ -# -# THIS IS WORK IN PROGRESS -# -# The Python Imaging Library -# $Id$ -# -# portable compiled font file parser -# -# history: -# 1997-08-19 fl created -# 2003-09-13 fl fixed loading of unicode fonts -# -# Copyright (c) 1997-2003 by Secret Labs AB. -# Copyright (c) 1997-2003 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io - -from . import FontFile, Image -from ._binary import i8 -from ._binary import i16be as b16 -from ._binary import i16le as l16 -from ._binary import i32be as b32 -from ._binary import i32le as l32 - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - from typing import BinaryIO - -# -------------------------------------------------------------------- -# declarations - -PCF_MAGIC = 0x70636601 # "\x01fcp" - -PCF_PROPERTIES = 1 << 0 -PCF_ACCELERATORS = 1 << 1 -PCF_METRICS = 1 << 2 -PCF_BITMAPS = 1 << 3 -PCF_INK_METRICS = 1 << 4 -PCF_BDF_ENCODINGS = 1 << 5 -PCF_SWIDTHS = 1 << 6 -PCF_GLYPH_NAMES = 1 << 7 -PCF_BDF_ACCELERATORS = 1 << 8 - -BYTES_PER_ROW: list[Callable[[int], int]] = [ - lambda bits: ((bits + 7) >> 3), - lambda bits: ((bits + 15) >> 3) & ~1, - lambda bits: ((bits + 31) >> 3) & ~3, - lambda bits: ((bits + 63) >> 3) & ~7, -] - - -def sz(s: bytes, o: int) -> bytes: - return s[o : s.index(b"\0", o)] - - -class PcfFontFile(FontFile.FontFile): - """Font file plugin for the X11 PCF format.""" - - name = "name" - - def __init__(self, fp: BinaryIO, charset_encoding: str = "iso8859-1"): - self.charset_encoding = charset_encoding - - magic = l32(fp.read(4)) - if magic != PCF_MAGIC: - msg = "not a PCF file" - raise SyntaxError(msg) - - super().__init__() - - count = l32(fp.read(4)) - self.toc = {} - for i in range(count): - type = l32(fp.read(4)) - self.toc[type] = l32(fp.read(4)), l32(fp.read(4)), l32(fp.read(4)) - - self.fp = fp - - self.info = self._load_properties() - - metrics = self._load_metrics() - bitmaps = self._load_bitmaps(metrics) - encoding = self._load_encoding() - - # - # create glyph structure - - for ch, ix in enumerate(encoding): - if ix is not None: - ( - xsize, - ysize, - left, - right, - width, - ascent, - descent, - attributes, - ) = metrics[ix] - self.glyph[ch] = ( - (width, 0), - (left, descent - ysize, xsize + left, descent), - (0, 0, xsize, ysize), - bitmaps[ix], - ) - - def _getformat( - self, tag: int - ) -> tuple[BinaryIO, int, Callable[[bytes], int], Callable[[bytes], int]]: - format, size, offset = self.toc[tag] - - fp = self.fp - fp.seek(offset) - - format = l32(fp.read(4)) - - if format & 4: - i16, i32 = b16, b32 - else: - i16, i32 = l16, l32 - - return fp, format, i16, i32 - - def _load_properties(self) -> dict[bytes, bytes | int]: - # - # font properties - - properties = {} - - fp, format, i16, i32 = self._getformat(PCF_PROPERTIES) - - nprops = i32(fp.read(4)) - - # read property description - p = [(i32(fp.read(4)), i8(fp.read(1)), i32(fp.read(4))) for _ in range(nprops)] - - if nprops & 3: - fp.seek(4 - (nprops & 3), io.SEEK_CUR) # pad - - data = fp.read(i32(fp.read(4))) - - for k, s, v in p: - property_value: bytes | int = sz(data, v) if s else v - properties[sz(data, k)] = property_value - - return properties - - def _load_metrics(self) -> list[tuple[int, int, int, int, int, int, int, int]]: - # - # font metrics - - metrics: list[tuple[int, int, int, int, int, int, int, int]] = [] - - fp, format, i16, i32 = self._getformat(PCF_METRICS) - - append = metrics.append - - if (format & 0xFF00) == 0x100: - # "compressed" metrics - for i in range(i16(fp.read(2))): - left = i8(fp.read(1)) - 128 - right = i8(fp.read(1)) - 128 - width = i8(fp.read(1)) - 128 - ascent = i8(fp.read(1)) - 128 - descent = i8(fp.read(1)) - 128 - xsize = right - left - ysize = ascent + descent - append((xsize, ysize, left, right, width, ascent, descent, 0)) - - else: - # "jumbo" metrics - for i in range(i32(fp.read(4))): - left = i16(fp.read(2)) - right = i16(fp.read(2)) - width = i16(fp.read(2)) - ascent = i16(fp.read(2)) - descent = i16(fp.read(2)) - attributes = i16(fp.read(2)) - xsize = right - left - ysize = ascent + descent - append((xsize, ysize, left, right, width, ascent, descent, attributes)) - - return metrics - - def _load_bitmaps( - self, metrics: list[tuple[int, int, int, int, int, int, int, int]] - ) -> list[Image.Image]: - # - # bitmap data - - fp, format, i16, i32 = self._getformat(PCF_BITMAPS) - - nbitmaps = i32(fp.read(4)) - - if nbitmaps != len(metrics): - msg = "Wrong number of bitmaps" - raise OSError(msg) - - offsets = [i32(fp.read(4)) for _ in range(nbitmaps)] - - bitmap_sizes = [i32(fp.read(4)) for _ in range(4)] - - # byteorder = format & 4 # non-zero => MSB - bitorder = format & 8 # non-zero => MSB - padindex = format & 3 - - bitmapsize = bitmap_sizes[padindex] - offsets.append(bitmapsize) - - data = fp.read(bitmapsize) - - pad = BYTES_PER_ROW[padindex] - mode = "1;R" - if bitorder: - mode = "1" - - bitmaps = [] - for i in range(nbitmaps): - xsize, ysize = metrics[i][:2] - b, e = offsets[i : i + 2] - bitmaps.append( - Image.frombytes("1", (xsize, ysize), data[b:e], "raw", mode, pad(xsize)) - ) - - return bitmaps - - def _load_encoding(self) -> list[int | None]: - fp, format, i16, i32 = self._getformat(PCF_BDF_ENCODINGS) - - first_col, last_col = i16(fp.read(2)), i16(fp.read(2)) - first_row, last_row = i16(fp.read(2)), i16(fp.read(2)) - - i16(fp.read(2)) # default - - nencoding = (last_col - first_col + 1) * (last_row - first_row + 1) - - # map character code to bitmap index - encoding: list[int | None] = [None] * min(256, nencoding) - - encoding_offsets = [i16(fp.read(2)) for _ in range(nencoding)] - - for i in range(first_col, len(encoding)): - try: - encoding_offset = encoding_offsets[ - ord(bytearray([i]).decode(self.charset_encoding)) - ] - if encoding_offset != 0xFFFF: - encoding[i] = encoding_offset - except UnicodeDecodeError: - # character is not supported in selected encoding - pass - - return encoding diff --git a/voxvera/vendor/PIL/PcxImagePlugin.py b/voxvera/vendor/PIL/PcxImagePlugin.py deleted file mode 100644 index 6b16d53..0000000 --- a/voxvera/vendor/PIL/PcxImagePlugin.py +++ /dev/null @@ -1,228 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# PCX file handling -# -# This format was originally used by ZSoft's popular PaintBrush -# program for the IBM PC. It is also supported by many MS-DOS and -# Windows applications, including the Windows PaintBrush program in -# Windows 3. -# -# history: -# 1995-09-01 fl Created -# 1996-05-20 fl Fixed RGB support -# 1997-01-03 fl Fixed 2-bit and 4-bit support -# 1999-02-03 fl Fixed 8-bit support (broken in 1.0b1) -# 1999-02-07 fl Added write support -# 2002-06-09 fl Made 2-bit and 4-bit support a bit more robust -# 2002-07-30 fl Seek from to current position, not beginning of file -# 2003-06-03 fl Extract DPI settings (info["dpi"]) -# -# Copyright (c) 1997-2003 by Secret Labs AB. -# Copyright (c) 1995-2003 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io -import logging -from typing import IO - -from . import Image, ImageFile, ImagePalette -from ._binary import i16le as i16 -from ._binary import o8 -from ._binary import o16le as o16 - -logger = logging.getLogger(__name__) - - -def _accept(prefix: bytes) -> bool: - return len(prefix) >= 2 and prefix[0] == 10 and prefix[1] in [0, 2, 3, 5] - - -## -# Image plugin for Paintbrush images. - - -class PcxImageFile(ImageFile.ImageFile): - format = "PCX" - format_description = "Paintbrush" - - def _open(self) -> None: - # header - assert self.fp is not None - - s = self.fp.read(68) - if not _accept(s): - msg = "not a PCX file" - raise SyntaxError(msg) - - # image - bbox = i16(s, 4), i16(s, 6), i16(s, 8) + 1, i16(s, 10) + 1 - if bbox[2] <= bbox[0] or bbox[3] <= bbox[1]: - msg = "bad PCX image size" - raise SyntaxError(msg) - logger.debug("BBox: %s %s %s %s", *bbox) - - offset = self.fp.tell() + 60 - - # format - version = s[1] - bits = s[3] - planes = s[65] - provided_stride = i16(s, 66) - logger.debug( - "PCX version %s, bits %s, planes %s, stride %s", - version, - bits, - planes, - provided_stride, - ) - - self.info["dpi"] = i16(s, 12), i16(s, 14) - - if bits == 1 and planes == 1: - mode = rawmode = "1" - - elif bits == 1 and planes in (2, 4): - mode = "P" - rawmode = f"P;{planes}L" - self.palette = ImagePalette.raw("RGB", s[16:64]) - - elif version == 5 and bits == 8 and planes == 1: - mode = rawmode = "L" - # FIXME: hey, this doesn't work with the incremental loader !!! - self.fp.seek(-769, io.SEEK_END) - s = self.fp.read(769) - if len(s) == 769 and s[0] == 12: - # check if the palette is linear grayscale - for i in range(256): - if s[i * 3 + 1 : i * 3 + 4] != o8(i) * 3: - mode = rawmode = "P" - break - if mode == "P": - self.palette = ImagePalette.raw("RGB", s[1:]) - - elif version == 5 and bits == 8 and planes == 3: - mode = "RGB" - rawmode = "RGB;L" - - else: - msg = "unknown PCX mode" - raise OSError(msg) - - self._mode = mode - self._size = bbox[2] - bbox[0], bbox[3] - bbox[1] - - # Don't trust the passed in stride. - # Calculate the approximate position for ourselves. - # CVE-2020-35653 - stride = (self._size[0] * bits + 7) // 8 - - # While the specification states that this must be even, - # not all images follow this - if provided_stride != stride: - stride += stride % 2 - - bbox = (0, 0) + self.size - logger.debug("size: %sx%s", *self.size) - - self.tile = [ImageFile._Tile("pcx", bbox, offset, (rawmode, planes * stride))] - - -# -------------------------------------------------------------------- -# save PCX files - - -SAVE = { - # mode: (version, bits, planes, raw mode) - "1": (2, 1, 1, "1"), - "L": (5, 8, 1, "L"), - "P": (5, 8, 1, "P"), - "RGB": (5, 8, 3, "RGB;L"), -} - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - try: - version, bits, planes, rawmode = SAVE[im.mode] - except KeyError as e: - msg = f"Cannot save {im.mode} images as PCX" - raise ValueError(msg) from e - - # bytes per plane - stride = (im.size[0] * bits + 7) // 8 - # stride should be even - stride += stride % 2 - # Stride needs to be kept in sync with the PcxEncode.c version. - # Ideally it should be passed in in the state, but the bytes value - # gets overwritten. - - logger.debug( - "PcxImagePlugin._save: xwidth: %d, bits: %d, stride: %d", - im.size[0], - bits, - stride, - ) - - # under windows, we could determine the current screen size with - # "Image.core.display_mode()[1]", but I think that's overkill... - - screen = im.size - - dpi = 100, 100 - - # PCX header - fp.write( - o8(10) - + o8(version) - + o8(1) - + o8(bits) - + o16(0) - + o16(0) - + o16(im.size[0] - 1) - + o16(im.size[1] - 1) - + o16(dpi[0]) - + o16(dpi[1]) - + b"\0" * 24 - + b"\xff" * 24 - + b"\0" - + o8(planes) - + o16(stride) - + o16(1) - + o16(screen[0]) - + o16(screen[1]) - + b"\0" * 54 - ) - - assert fp.tell() == 128 - - ImageFile._save( - im, fp, [ImageFile._Tile("pcx", (0, 0) + im.size, 0, (rawmode, bits * planes))] - ) - - if im.mode == "P": - # colour palette - fp.write(o8(12)) - palette = im.im.getpalette("RGB", "RGB") - palette += b"\x00" * (768 - len(palette)) - fp.write(palette) # 768 bytes - elif im.mode == "L": - # grayscale palette - fp.write(o8(12)) - for i in range(256): - fp.write(o8(i) * 3) - - -# -------------------------------------------------------------------- -# registry - - -Image.register_open(PcxImageFile.format, PcxImageFile, _accept) -Image.register_save(PcxImageFile.format, _save) - -Image.register_extension(PcxImageFile.format, ".pcx") - -Image.register_mime(PcxImageFile.format, "image/x-pcx") diff --git a/voxvera/vendor/PIL/PdfImagePlugin.py b/voxvera/vendor/PIL/PdfImagePlugin.py deleted file mode 100644 index 5594c7e..0000000 --- a/voxvera/vendor/PIL/PdfImagePlugin.py +++ /dev/null @@ -1,311 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# PDF (Acrobat) file handling -# -# History: -# 1996-07-16 fl Created -# 1997-01-18 fl Fixed header -# 2004-02-21 fl Fixes for 1/L/CMYK images, etc. -# 2004-02-24 fl Fixes for 1 and P images. -# -# Copyright (c) 1997-2004 by Secret Labs AB. All rights reserved. -# Copyright (c) 1996-1997 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# - -## -# Image plugin for PDF images (output only). -## -from __future__ import annotations - -import io -import math -import os -import time -from typing import IO, Any - -from . import Image, ImageFile, ImageSequence, PdfParser, features - -# -# -------------------------------------------------------------------- - -# object ids: -# 1. catalogue -# 2. pages -# 3. image -# 4. page -# 5. page contents - - -def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - _save(im, fp, filename, save_all=True) - - -## -# (Internal) Image save plugin for the PDF format. - - -def _write_image( - im: Image.Image, - filename: str | bytes, - existing_pdf: PdfParser.PdfParser, - image_refs: list[PdfParser.IndirectReference], -) -> tuple[PdfParser.IndirectReference, str]: - # FIXME: Should replace ASCIIHexDecode with RunLengthDecode - # (packbits) or LZWDecode (tiff/lzw compression). Note that - # PDF 1.2 also supports Flatedecode (zip compression). - - params = None - decode = None - - # - # Get image characteristics - - width, height = im.size - - dict_obj: dict[str, Any] = {"BitsPerComponent": 8} - if im.mode == "1": - if features.check("libtiff"): - decode_filter = "CCITTFaxDecode" - dict_obj["BitsPerComponent"] = 1 - params = PdfParser.PdfArray( - [ - PdfParser.PdfDict( - { - "K": -1, - "BlackIs1": True, - "Columns": width, - "Rows": height, - } - ) - ] - ) - else: - decode_filter = "DCTDecode" - dict_obj["ColorSpace"] = PdfParser.PdfName("DeviceGray") - procset = "ImageB" # grayscale - elif im.mode == "L": - decode_filter = "DCTDecode" - # params = f"<< /Predictor 15 /Columns {width-2} >>" - dict_obj["ColorSpace"] = PdfParser.PdfName("DeviceGray") - procset = "ImageB" # grayscale - elif im.mode == "LA": - decode_filter = "JPXDecode" - # params = f"<< /Predictor 15 /Columns {width-2} >>" - procset = "ImageB" # grayscale - dict_obj["SMaskInData"] = 1 - elif im.mode == "P": - decode_filter = "ASCIIHexDecode" - palette = im.getpalette() - assert palette is not None - dict_obj["ColorSpace"] = [ - PdfParser.PdfName("Indexed"), - PdfParser.PdfName("DeviceRGB"), - len(palette) // 3 - 1, - PdfParser.PdfBinary(palette), - ] - procset = "ImageI" # indexed color - - if "transparency" in im.info: - smask = im.convert("LA").getchannel("A") - smask.encoderinfo = {} - - image_ref = _write_image(smask, filename, existing_pdf, image_refs)[0] - dict_obj["SMask"] = image_ref - elif im.mode == "RGB": - decode_filter = "DCTDecode" - dict_obj["ColorSpace"] = PdfParser.PdfName("DeviceRGB") - procset = "ImageC" # color images - elif im.mode == "RGBA": - decode_filter = "JPXDecode" - procset = "ImageC" # color images - dict_obj["SMaskInData"] = 1 - elif im.mode == "CMYK": - decode_filter = "DCTDecode" - dict_obj["ColorSpace"] = PdfParser.PdfName("DeviceCMYK") - procset = "ImageC" # color images - decode = [1, 0, 1, 0, 1, 0, 1, 0] - else: - msg = f"cannot save mode {im.mode}" - raise ValueError(msg) - - # - # image - - op = io.BytesIO() - - if decode_filter == "ASCIIHexDecode": - ImageFile._save(im, op, [ImageFile._Tile("hex", (0, 0) + im.size, 0, im.mode)]) - elif decode_filter == "CCITTFaxDecode": - im.save( - op, - "TIFF", - compression="group4", - # use a single strip - strip_size=math.ceil(width / 8) * height, - ) - elif decode_filter == "DCTDecode": - Image.SAVE["JPEG"](im, op, filename) - elif decode_filter == "JPXDecode": - del dict_obj["BitsPerComponent"] - Image.SAVE["JPEG2000"](im, op, filename) - else: - msg = f"unsupported PDF filter ({decode_filter})" - raise ValueError(msg) - - stream = op.getvalue() - filter: PdfParser.PdfArray | PdfParser.PdfName - if decode_filter == "CCITTFaxDecode": - stream = stream[8:] - filter = PdfParser.PdfArray([PdfParser.PdfName(decode_filter)]) - else: - filter = PdfParser.PdfName(decode_filter) - - image_ref = image_refs.pop(0) - existing_pdf.write_obj( - image_ref, - stream=stream, - Type=PdfParser.PdfName("XObject"), - Subtype=PdfParser.PdfName("Image"), - Width=width, # * 72.0 / x_resolution, - Height=height, # * 72.0 / y_resolution, - Filter=filter, - Decode=decode, - DecodeParms=params, - **dict_obj, - ) - - return image_ref, procset - - -def _save( - im: Image.Image, fp: IO[bytes], filename: str | bytes, save_all: bool = False -) -> None: - is_appending = im.encoderinfo.get("append", False) - filename_str = filename.decode() if isinstance(filename, bytes) else filename - if is_appending: - existing_pdf = PdfParser.PdfParser(f=fp, filename=filename_str, mode="r+b") - else: - existing_pdf = PdfParser.PdfParser(f=fp, filename=filename_str, mode="w+b") - - dpi = im.encoderinfo.get("dpi") - if dpi: - x_resolution = dpi[0] - y_resolution = dpi[1] - else: - x_resolution = y_resolution = im.encoderinfo.get("resolution", 72.0) - - info = { - "title": ( - None if is_appending else os.path.splitext(os.path.basename(filename))[0] - ), - "author": None, - "subject": None, - "keywords": None, - "creator": None, - "producer": None, - "creationDate": None if is_appending else time.gmtime(), - "modDate": None if is_appending else time.gmtime(), - } - for k, default in info.items(): - v = im.encoderinfo.get(k) if k in im.encoderinfo else default - if v: - existing_pdf.info[k[0].upper() + k[1:]] = v - - # - # make sure image data is available - im.load() - - existing_pdf.start_writing() - existing_pdf.write_header() - existing_pdf.write_comment("created by Pillow PDF driver") - - # - # pages - ims = [im] - if save_all: - append_images = im.encoderinfo.get("append_images", []) - for append_im in append_images: - append_im.encoderinfo = im.encoderinfo.copy() - ims.append(append_im) - number_of_pages = 0 - image_refs = [] - page_refs = [] - contents_refs = [] - for im in ims: - im_number_of_pages = 1 - if save_all: - im_number_of_pages = getattr(im, "n_frames", 1) - number_of_pages += im_number_of_pages - for i in range(im_number_of_pages): - image_refs.append(existing_pdf.next_object_id(0)) - if im.mode == "P" and "transparency" in im.info: - image_refs.append(existing_pdf.next_object_id(0)) - - page_refs.append(existing_pdf.next_object_id(0)) - contents_refs.append(existing_pdf.next_object_id(0)) - existing_pdf.pages.append(page_refs[-1]) - - # - # catalog and list of pages - existing_pdf.write_catalog() - - page_number = 0 - for im_sequence in ims: - im_pages: ImageSequence.Iterator | list[Image.Image] = ( - ImageSequence.Iterator(im_sequence) if save_all else [im_sequence] - ) - for im in im_pages: - image_ref, procset = _write_image(im, filename, existing_pdf, image_refs) - - # - # page - - existing_pdf.write_page( - page_refs[page_number], - Resources=PdfParser.PdfDict( - ProcSet=[PdfParser.PdfName("PDF"), PdfParser.PdfName(procset)], - XObject=PdfParser.PdfDict(image=image_ref), - ), - MediaBox=[ - 0, - 0, - im.width * 72.0 / x_resolution, - im.height * 72.0 / y_resolution, - ], - Contents=contents_refs[page_number], - ) - - # - # page contents - - page_contents = b"q %f 0 0 %f 0 0 cm /image Do Q\n" % ( - im.width * 72.0 / x_resolution, - im.height * 72.0 / y_resolution, - ) - - existing_pdf.write_obj(contents_refs[page_number], stream=page_contents) - - page_number += 1 - - # - # trailer - existing_pdf.write_xref_and_trailer() - if hasattr(fp, "flush"): - fp.flush() - existing_pdf.close() - - -# -# -------------------------------------------------------------------- - - -Image.register_save("PDF", _save) -Image.register_save_all("PDF", _save_all) - -Image.register_extension("PDF", ".pdf") - -Image.register_mime("PDF", "application/pdf") diff --git a/voxvera/vendor/PIL/PdfParser.py b/voxvera/vendor/PIL/PdfParser.py deleted file mode 100644 index 2c90314..0000000 --- a/voxvera/vendor/PIL/PdfParser.py +++ /dev/null @@ -1,1075 +0,0 @@ -from __future__ import annotations - -import calendar -import codecs -import collections -import mmap -import os -import re -import time -import zlib -from typing import Any, NamedTuple - -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import IO - - _DictBase = collections.UserDict[str | bytes, Any] -else: - _DictBase = collections.UserDict - - -# see 7.9.2.2 Text String Type on page 86 and D.3 PDFDocEncoding Character Set -# on page 656 -def encode_text(s: str) -> bytes: - return codecs.BOM_UTF16_BE + s.encode("utf_16_be") - - -PDFDocEncoding = { - 0x16: "\u0017", - 0x18: "\u02d8", - 0x19: "\u02c7", - 0x1A: "\u02c6", - 0x1B: "\u02d9", - 0x1C: "\u02dd", - 0x1D: "\u02db", - 0x1E: "\u02da", - 0x1F: "\u02dc", - 0x80: "\u2022", - 0x81: "\u2020", - 0x82: "\u2021", - 0x83: "\u2026", - 0x84: "\u2014", - 0x85: "\u2013", - 0x86: "\u0192", - 0x87: "\u2044", - 0x88: "\u2039", - 0x89: "\u203a", - 0x8A: "\u2212", - 0x8B: "\u2030", - 0x8C: "\u201e", - 0x8D: "\u201c", - 0x8E: "\u201d", - 0x8F: "\u2018", - 0x90: "\u2019", - 0x91: "\u201a", - 0x92: "\u2122", - 0x93: "\ufb01", - 0x94: "\ufb02", - 0x95: "\u0141", - 0x96: "\u0152", - 0x97: "\u0160", - 0x98: "\u0178", - 0x99: "\u017d", - 0x9A: "\u0131", - 0x9B: "\u0142", - 0x9C: "\u0153", - 0x9D: "\u0161", - 0x9E: "\u017e", - 0xA0: "\u20ac", -} - - -def decode_text(b: bytes) -> str: - if b[: len(codecs.BOM_UTF16_BE)] == codecs.BOM_UTF16_BE: - return b[len(codecs.BOM_UTF16_BE) :].decode("utf_16_be") - else: - return "".join(PDFDocEncoding.get(byte, chr(byte)) for byte in b) - - -class PdfFormatError(RuntimeError): - """An error that probably indicates a syntactic or semantic error in the - PDF file structure""" - - pass - - -def check_format_condition(condition: bool, error_message: str) -> None: - if not condition: - raise PdfFormatError(error_message) - - -class IndirectReferenceTuple(NamedTuple): - object_id: int - generation: int - - -class IndirectReference(IndirectReferenceTuple): - def __str__(self) -> str: - return f"{self.object_id} {self.generation} R" - - def __bytes__(self) -> bytes: - return self.__str__().encode("us-ascii") - - def __eq__(self, other: object) -> bool: - if self.__class__ is not other.__class__: - return False - assert isinstance(other, IndirectReference) - return other.object_id == self.object_id and other.generation == self.generation - - def __ne__(self, other: object) -> bool: - return not (self == other) - - def __hash__(self) -> int: - return hash((self.object_id, self.generation)) - - -class IndirectObjectDef(IndirectReference): - def __str__(self) -> str: - return f"{self.object_id} {self.generation} obj" - - -class XrefTable: - def __init__(self) -> None: - self.existing_entries: dict[int, tuple[int, int]] = ( - {} - ) # object ID => (offset, generation) - self.new_entries: dict[int, tuple[int, int]] = ( - {} - ) # object ID => (offset, generation) - self.deleted_entries = {0: 65536} # object ID => generation - self.reading_finished = False - - def __setitem__(self, key: int, value: tuple[int, int]) -> None: - if self.reading_finished: - self.new_entries[key] = value - else: - self.existing_entries[key] = value - if key in self.deleted_entries: - del self.deleted_entries[key] - - def __getitem__(self, key: int) -> tuple[int, int]: - try: - return self.new_entries[key] - except KeyError: - return self.existing_entries[key] - - def __delitem__(self, key: int) -> None: - if key in self.new_entries: - generation = self.new_entries[key][1] + 1 - del self.new_entries[key] - self.deleted_entries[key] = generation - elif key in self.existing_entries: - generation = self.existing_entries[key][1] + 1 - self.deleted_entries[key] = generation - elif key in self.deleted_entries: - generation = self.deleted_entries[key] - else: - msg = f"object ID {key} cannot be deleted because it doesn't exist" - raise IndexError(msg) - - def __contains__(self, key: int) -> bool: - return key in self.existing_entries or key in self.new_entries - - def __len__(self) -> int: - return len( - set(self.existing_entries.keys()) - | set(self.new_entries.keys()) - | set(self.deleted_entries.keys()) - ) - - def keys(self) -> set[int]: - return ( - set(self.existing_entries.keys()) - set(self.deleted_entries.keys()) - ) | set(self.new_entries.keys()) - - def write(self, f: IO[bytes]) -> int: - keys = sorted(set(self.new_entries.keys()) | set(self.deleted_entries.keys())) - deleted_keys = sorted(set(self.deleted_entries.keys())) - startxref = f.tell() - f.write(b"xref\n") - while keys: - # find a contiguous sequence of object IDs - prev: int | None = None - for index, key in enumerate(keys): - if prev is None or prev + 1 == key: - prev = key - else: - contiguous_keys = keys[:index] - keys = keys[index:] - break - else: - contiguous_keys = keys - keys = [] - f.write(b"%d %d\n" % (contiguous_keys[0], len(contiguous_keys))) - for object_id in contiguous_keys: - if object_id in self.new_entries: - f.write(b"%010d %05d n \n" % self.new_entries[object_id]) - else: - this_deleted_object_id = deleted_keys.pop(0) - check_format_condition( - object_id == this_deleted_object_id, - f"expected the next deleted object ID to be {object_id}, " - f"instead found {this_deleted_object_id}", - ) - try: - next_in_linked_list = deleted_keys[0] - except IndexError: - next_in_linked_list = 0 - f.write( - b"%010d %05d f \n" - % (next_in_linked_list, self.deleted_entries[object_id]) - ) - return startxref - - -class PdfName: - name: bytes - - def __init__(self, name: PdfName | bytes | str) -> None: - if isinstance(name, PdfName): - self.name = name.name - elif isinstance(name, bytes): - self.name = name - else: - self.name = name.encode("us-ascii") - - def name_as_str(self) -> str: - return self.name.decode("us-ascii") - - def __eq__(self, other: object) -> bool: - return ( - isinstance(other, PdfName) and other.name == self.name - ) or other == self.name - - def __hash__(self) -> int: - return hash(self.name) - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({repr(self.name)})" - - @classmethod - def from_pdf_stream(cls, data: bytes) -> PdfName: - return cls(PdfParser.interpret_name(data)) - - allowed_chars = set(range(33, 127)) - {ord(c) for c in "#%/()<>[]{}"} - - def __bytes__(self) -> bytes: - result = bytearray(b"/") - for b in self.name: - if b in self.allowed_chars: - result.append(b) - else: - result.extend(b"#%02X" % b) - return bytes(result) - - -class PdfArray(list[Any]): - def __bytes__(self) -> bytes: - return b"[ " + b" ".join(pdf_repr(x) for x in self) + b" ]" - - -class PdfDict(_DictBase): - def __setattr__(self, key: str, value: Any) -> None: - if key == "data": - collections.UserDict.__setattr__(self, key, value) - else: - self[key.encode("us-ascii")] = value - - def __getattr__(self, key: str) -> str | time.struct_time: - try: - value = self[key.encode("us-ascii")] - except KeyError as e: - raise AttributeError(key) from e - if isinstance(value, bytes): - value = decode_text(value) - if key.endswith("Date"): - if value.startswith("D:"): - value = value[2:] - - relationship = "Z" - if len(value) > 17: - relationship = value[14] - offset = int(value[15:17]) * 60 - if len(value) > 20: - offset += int(value[18:20]) - - format = "%Y%m%d%H%M%S"[: len(value) - 2] - value = time.strptime(value[: len(format) + 2], format) - if relationship in ["+", "-"]: - offset *= 60 - if relationship == "+": - offset *= -1 - value = time.gmtime(calendar.timegm(value) + offset) - return value - - def __bytes__(self) -> bytes: - out = bytearray(b"<<") - for key, value in self.items(): - if value is None: - continue - value = pdf_repr(value) - out.extend(b"\n") - out.extend(bytes(PdfName(key))) - out.extend(b" ") - out.extend(value) - out.extend(b"\n>>") - return bytes(out) - - -class PdfBinary: - def __init__(self, data: list[int] | bytes) -> None: - self.data = data - - def __bytes__(self) -> bytes: - return b"<%s>" % b"".join(b"%02X" % b for b in self.data) - - -class PdfStream: - def __init__(self, dictionary: PdfDict, buf: bytes) -> None: - self.dictionary = dictionary - self.buf = buf - - def decode(self) -> bytes: - try: - filter = self.dictionary[b"Filter"] - except KeyError: - return self.buf - if filter == b"FlateDecode": - try: - expected_length = self.dictionary[b"DL"] - except KeyError: - expected_length = self.dictionary[b"Length"] - return zlib.decompress(self.buf, bufsize=int(expected_length)) - else: - msg = f"stream filter {repr(filter)} unknown/unsupported" - raise NotImplementedError(msg) - - -def pdf_repr(x: Any) -> bytes: - if x is True: - return b"true" - elif x is False: - return b"false" - elif x is None: - return b"null" - elif isinstance(x, (PdfName, PdfDict, PdfArray, PdfBinary)): - return bytes(x) - elif isinstance(x, (int, float)): - return str(x).encode("us-ascii") - elif isinstance(x, time.struct_time): - return b"(D:" + time.strftime("%Y%m%d%H%M%SZ", x).encode("us-ascii") + b")" - elif isinstance(x, dict): - return bytes(PdfDict(x)) - elif isinstance(x, list): - return bytes(PdfArray(x)) - elif isinstance(x, str): - return pdf_repr(encode_text(x)) - elif isinstance(x, bytes): - # XXX escape more chars? handle binary garbage - x = x.replace(b"\\", b"\\\\") - x = x.replace(b"(", b"\\(") - x = x.replace(b")", b"\\)") - return b"(" + x + b")" - else: - return bytes(x) - - -class PdfParser: - """Based on - https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf - Supports PDF up to 1.4 - """ - - def __init__( - self, - filename: str | None = None, - f: IO[bytes] | None = None, - buf: bytes | bytearray | None = None, - start_offset: int = 0, - mode: str = "rb", - ) -> None: - if buf and f: - msg = "specify buf or f or filename, but not both buf and f" - raise RuntimeError(msg) - self.filename = filename - self.buf: bytes | bytearray | mmap.mmap | None = buf - self.f = f - self.start_offset = start_offset - self.should_close_buf = False - self.should_close_file = False - if filename is not None and f is None: - self.f = f = open(filename, mode) - self.should_close_file = True - if f is not None: - self.buf = self.get_buf_from_file(f) - self.should_close_buf = True - if not filename and hasattr(f, "name"): - self.filename = f.name - self.cached_objects: dict[IndirectReference, Any] = {} - self.root_ref: IndirectReference | None - self.info_ref: IndirectReference | None - self.pages_ref: IndirectReference | None - self.last_xref_section_offset: int | None - if self.buf: - self.read_pdf_info() - else: - self.file_size_total = self.file_size_this = 0 - self.root = PdfDict() - self.root_ref = None - self.info = PdfDict() - self.info_ref = None - self.page_tree_root = PdfDict() - self.pages: list[IndirectReference] = [] - self.orig_pages: list[IndirectReference] = [] - self.pages_ref = None - self.last_xref_section_offset = None - self.trailer_dict: dict[bytes, Any] = {} - self.xref_table = XrefTable() - self.xref_table.reading_finished = True - if f: - self.seek_end() - - def __enter__(self) -> PdfParser: - return self - - def __exit__(self, *args: object) -> None: - self.close() - - def start_writing(self) -> None: - self.close_buf() - self.seek_end() - - def close_buf(self) -> None: - if isinstance(self.buf, mmap.mmap): - self.buf.close() - self.buf = None - - def close(self) -> None: - if self.should_close_buf: - self.close_buf() - if self.f is not None and self.should_close_file: - self.f.close() - self.f = None - - def seek_end(self) -> None: - assert self.f is not None - self.f.seek(0, os.SEEK_END) - - def write_header(self) -> None: - assert self.f is not None - self.f.write(b"%PDF-1.4\n") - - def write_comment(self, s: str) -> None: - assert self.f is not None - self.f.write(f"% {s}\n".encode()) - - def write_catalog(self) -> IndirectReference: - assert self.f is not None - self.del_root() - self.root_ref = self.next_object_id(self.f.tell()) - self.pages_ref = self.next_object_id(0) - self.rewrite_pages() - self.write_obj(self.root_ref, Type=PdfName(b"Catalog"), Pages=self.pages_ref) - self.write_obj( - self.pages_ref, - Type=PdfName(b"Pages"), - Count=len(self.pages), - Kids=self.pages, - ) - return self.root_ref - - def rewrite_pages(self) -> None: - pages_tree_nodes_to_delete = [] - for i, page_ref in enumerate(self.orig_pages): - page_info = self.cached_objects[page_ref] - del self.xref_table[page_ref.object_id] - pages_tree_nodes_to_delete.append(page_info[PdfName(b"Parent")]) - if page_ref not in self.pages: - # the page has been deleted - continue - # make dict keys into strings for passing to write_page - stringified_page_info = {} - for key, value in page_info.items(): - # key should be a PdfName - stringified_page_info[key.name_as_str()] = value - stringified_page_info["Parent"] = self.pages_ref - new_page_ref = self.write_page(None, **stringified_page_info) - for j, cur_page_ref in enumerate(self.pages): - if cur_page_ref == page_ref: - # replace the page reference with the new one - self.pages[j] = new_page_ref - # delete redundant Pages tree nodes from xref table - for pages_tree_node_ref in pages_tree_nodes_to_delete: - while pages_tree_node_ref: - pages_tree_node = self.cached_objects[pages_tree_node_ref] - if pages_tree_node_ref.object_id in self.xref_table: - del self.xref_table[pages_tree_node_ref.object_id] - pages_tree_node_ref = pages_tree_node.get(b"Parent", None) - self.orig_pages = [] - - def write_xref_and_trailer( - self, new_root_ref: IndirectReference | None = None - ) -> None: - assert self.f is not None - if new_root_ref: - self.del_root() - self.root_ref = new_root_ref - if self.info: - self.info_ref = self.write_obj(None, self.info) - start_xref = self.xref_table.write(self.f) - num_entries = len(self.xref_table) - trailer_dict: dict[str | bytes, Any] = { - b"Root": self.root_ref, - b"Size": num_entries, - } - if self.last_xref_section_offset is not None: - trailer_dict[b"Prev"] = self.last_xref_section_offset - if self.info: - trailer_dict[b"Info"] = self.info_ref - self.last_xref_section_offset = start_xref - self.f.write( - b"trailer\n" - + bytes(PdfDict(trailer_dict)) - + b"\nstartxref\n%d\n%%%%EOF" % start_xref - ) - - def write_page( - self, ref: int | IndirectReference | None, *objs: Any, **dict_obj: Any - ) -> IndirectReference: - obj_ref = self.pages[ref] if isinstance(ref, int) else ref - if "Type" not in dict_obj: - dict_obj["Type"] = PdfName(b"Page") - if "Parent" not in dict_obj: - dict_obj["Parent"] = self.pages_ref - return self.write_obj(obj_ref, *objs, **dict_obj) - - def write_obj( - self, ref: IndirectReference | None, *objs: Any, **dict_obj: Any - ) -> IndirectReference: - assert self.f is not None - f = self.f - if ref is None: - ref = self.next_object_id(f.tell()) - else: - self.xref_table[ref.object_id] = (f.tell(), ref.generation) - f.write(bytes(IndirectObjectDef(*ref))) - stream = dict_obj.pop("stream", None) - if stream is not None: - dict_obj["Length"] = len(stream) - if dict_obj: - f.write(pdf_repr(dict_obj)) - for obj in objs: - f.write(pdf_repr(obj)) - if stream is not None: - f.write(b"stream\n") - f.write(stream) - f.write(b"\nendstream\n") - f.write(b"endobj\n") - return ref - - def del_root(self) -> None: - if self.root_ref is None: - return - del self.xref_table[self.root_ref.object_id] - del self.xref_table[self.root[b"Pages"].object_id] - - @staticmethod - def get_buf_from_file(f: IO[bytes]) -> bytes | mmap.mmap: - if hasattr(f, "getbuffer"): - return f.getbuffer() - elif hasattr(f, "getvalue"): - return f.getvalue() - else: - try: - return mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) - except ValueError: # cannot mmap an empty file - return b"" - - def read_pdf_info(self) -> None: - assert self.buf is not None - self.file_size_total = len(self.buf) - self.file_size_this = self.file_size_total - self.start_offset - self.read_trailer() - check_format_condition( - self.trailer_dict.get(b"Root") is not None, "Root is missing" - ) - self.root_ref = self.trailer_dict[b"Root"] - assert self.root_ref is not None - self.info_ref = self.trailer_dict.get(b"Info", None) - self.root = PdfDict(self.read_indirect(self.root_ref)) - if self.info_ref is None: - self.info = PdfDict() - else: - self.info = PdfDict(self.read_indirect(self.info_ref)) - check_format_condition(b"Type" in self.root, "/Type missing in Root") - check_format_condition( - self.root[b"Type"] == b"Catalog", "/Type in Root is not /Catalog" - ) - check_format_condition( - self.root.get(b"Pages") is not None, "/Pages missing in Root" - ) - check_format_condition( - isinstance(self.root[b"Pages"], IndirectReference), - "/Pages in Root is not an indirect reference", - ) - self.pages_ref = self.root[b"Pages"] - assert self.pages_ref is not None - self.page_tree_root = self.read_indirect(self.pages_ref) - self.pages = self.linearize_page_tree(self.page_tree_root) - # save the original list of page references - # in case the user modifies, adds or deletes some pages - # and we need to rewrite the pages and their list - self.orig_pages = self.pages[:] - - def next_object_id(self, offset: int | None = None) -> IndirectReference: - try: - # TODO: support reuse of deleted objects - reference = IndirectReference(max(self.xref_table.keys()) + 1, 0) - except ValueError: - reference = IndirectReference(1, 0) - if offset is not None: - self.xref_table[reference.object_id] = (offset, 0) - return reference - - delimiter = rb"[][()<>{}/%]" - delimiter_or_ws = rb"[][()<>{}/%\000\011\012\014\015\040]" - whitespace = rb"[\000\011\012\014\015\040]" - whitespace_or_hex = rb"[\000\011\012\014\015\0400-9a-fA-F]" - whitespace_optional = whitespace + b"*" - whitespace_mandatory = whitespace + b"+" - # No "\012" aka "\n" or "\015" aka "\r": - whitespace_optional_no_nl = rb"[\000\011\014\040]*" - newline_only = rb"[\r\n]+" - newline = whitespace_optional_no_nl + newline_only + whitespace_optional_no_nl - re_trailer_end = re.compile( - whitespace_mandatory - + rb"trailer" - + whitespace_optional - + rb"<<(.*>>)" - + newline - + rb"startxref" - + newline - + rb"([0-9]+)" - + newline - + rb"%%EOF" - + whitespace_optional - + rb"$", - re.DOTALL, - ) - re_trailer_prev = re.compile( - whitespace_optional - + rb"trailer" - + whitespace_optional - + rb"<<(.*?>>)" - + newline - + rb"startxref" - + newline - + rb"([0-9]+)" - + newline - + rb"%%EOF" - + whitespace_optional, - re.DOTALL, - ) - - def read_trailer(self) -> None: - assert self.buf is not None - search_start_offset = len(self.buf) - 16384 - if search_start_offset < self.start_offset: - search_start_offset = self.start_offset - m = self.re_trailer_end.search(self.buf, search_start_offset) - check_format_condition(m is not None, "trailer end not found") - # make sure we found the LAST trailer - last_match = m - while m: - last_match = m - m = self.re_trailer_end.search(self.buf, m.start() + 16) - if not m: - m = last_match - assert m is not None - trailer_data = m.group(1) - self.last_xref_section_offset = int(m.group(2)) - self.trailer_dict = self.interpret_trailer(trailer_data) - self.xref_table = XrefTable() - self.read_xref_table(xref_section_offset=self.last_xref_section_offset) - if b"Prev" in self.trailer_dict: - self.read_prev_trailer(self.trailer_dict[b"Prev"]) - - def read_prev_trailer(self, xref_section_offset: int) -> None: - assert self.buf is not None - trailer_offset = self.read_xref_table(xref_section_offset=xref_section_offset) - m = self.re_trailer_prev.search( - self.buf[trailer_offset : trailer_offset + 16384] - ) - check_format_condition(m is not None, "previous trailer not found") - assert m is not None - trailer_data = m.group(1) - check_format_condition( - int(m.group(2)) == xref_section_offset, - "xref section offset in previous trailer doesn't match what was expected", - ) - trailer_dict = self.interpret_trailer(trailer_data) - if b"Prev" in trailer_dict: - self.read_prev_trailer(trailer_dict[b"Prev"]) - - re_whitespace_optional = re.compile(whitespace_optional) - re_name = re.compile( - whitespace_optional - + rb"/([!-$&'*-.0-;=?-Z\\^-z|~]+)(?=" - + delimiter_or_ws - + rb")" - ) - re_dict_start = re.compile(whitespace_optional + rb"<<") - re_dict_end = re.compile(whitespace_optional + rb">>" + whitespace_optional) - - @classmethod - def interpret_trailer(cls, trailer_data: bytes) -> dict[bytes, Any]: - trailer = {} - offset = 0 - while True: - m = cls.re_name.match(trailer_data, offset) - if not m: - m = cls.re_dict_end.match(trailer_data, offset) - check_format_condition( - m is not None and m.end() == len(trailer_data), - "name not found in trailer, remaining data: " - + repr(trailer_data[offset:]), - ) - break - key = cls.interpret_name(m.group(1)) - assert isinstance(key, bytes) - value, value_offset = cls.get_value(trailer_data, m.end()) - trailer[key] = value - if value_offset is None: - break - offset = value_offset - check_format_condition( - b"Size" in trailer and isinstance(trailer[b"Size"], int), - "/Size not in trailer or not an integer", - ) - check_format_condition( - b"Root" in trailer and isinstance(trailer[b"Root"], IndirectReference), - "/Root not in trailer or not an indirect reference", - ) - return trailer - - re_hashes_in_name = re.compile(rb"([^#]*)(#([0-9a-fA-F]{2}))?") - - @classmethod - def interpret_name(cls, raw: bytes, as_text: bool = False) -> str | bytes: - name = b"" - for m in cls.re_hashes_in_name.finditer(raw): - if m.group(3): - name += m.group(1) + bytearray.fromhex(m.group(3).decode("us-ascii")) - else: - name += m.group(1) - if as_text: - return name.decode("utf-8") - else: - return bytes(name) - - re_null = re.compile(whitespace_optional + rb"null(?=" + delimiter_or_ws + rb")") - re_true = re.compile(whitespace_optional + rb"true(?=" + delimiter_or_ws + rb")") - re_false = re.compile(whitespace_optional + rb"false(?=" + delimiter_or_ws + rb")") - re_int = re.compile( - whitespace_optional + rb"([-+]?[0-9]+)(?=" + delimiter_or_ws + rb")" - ) - re_real = re.compile( - whitespace_optional - + rb"([-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+))(?=" - + delimiter_or_ws - + rb")" - ) - re_array_start = re.compile(whitespace_optional + rb"\[") - re_array_end = re.compile(whitespace_optional + rb"]") - re_string_hex = re.compile( - whitespace_optional + rb"<(" + whitespace_or_hex + rb"*)>" - ) - re_string_lit = re.compile(whitespace_optional + rb"\(") - re_indirect_reference = re.compile( - whitespace_optional - + rb"([-+]?[0-9]+)" - + whitespace_mandatory - + rb"([-+]?[0-9]+)" - + whitespace_mandatory - + rb"R(?=" - + delimiter_or_ws - + rb")" - ) - re_indirect_def_start = re.compile( - whitespace_optional - + rb"([-+]?[0-9]+)" - + whitespace_mandatory - + rb"([-+]?[0-9]+)" - + whitespace_mandatory - + rb"obj(?=" - + delimiter_or_ws - + rb")" - ) - re_indirect_def_end = re.compile( - whitespace_optional + rb"endobj(?=" + delimiter_or_ws + rb")" - ) - re_comment = re.compile( - rb"(" + whitespace_optional + rb"%[^\r\n]*" + newline + rb")*" - ) - re_stream_start = re.compile(whitespace_optional + rb"stream\r?\n") - re_stream_end = re.compile( - whitespace_optional + rb"endstream(?=" + delimiter_or_ws + rb")" - ) - - @classmethod - def get_value( - cls, - data: bytes | bytearray | mmap.mmap, - offset: int, - expect_indirect: IndirectReference | None = None, - max_nesting: int = -1, - ) -> tuple[Any, int | None]: - if max_nesting == 0: - return None, None - m = cls.re_comment.match(data, offset) - if m: - offset = m.end() - m = cls.re_indirect_def_start.match(data, offset) - if m: - check_format_condition( - int(m.group(1)) > 0, - "indirect object definition: object ID must be greater than 0", - ) - check_format_condition( - int(m.group(2)) >= 0, - "indirect object definition: generation must be non-negative", - ) - check_format_condition( - expect_indirect is None - or expect_indirect - == IndirectReference(int(m.group(1)), int(m.group(2))), - "indirect object definition different than expected", - ) - object, object_offset = cls.get_value( - data, m.end(), max_nesting=max_nesting - 1 - ) - if object_offset is None: - return object, None - m = cls.re_indirect_def_end.match(data, object_offset) - check_format_condition( - m is not None, "indirect object definition end not found" - ) - assert m is not None - return object, m.end() - check_format_condition( - not expect_indirect, "indirect object definition not found" - ) - m = cls.re_indirect_reference.match(data, offset) - if m: - check_format_condition( - int(m.group(1)) > 0, - "indirect object reference: object ID must be greater than 0", - ) - check_format_condition( - int(m.group(2)) >= 0, - "indirect object reference: generation must be non-negative", - ) - return IndirectReference(int(m.group(1)), int(m.group(2))), m.end() - m = cls.re_dict_start.match(data, offset) - if m: - offset = m.end() - result: dict[Any, Any] = {} - m = cls.re_dict_end.match(data, offset) - current_offset: int | None = offset - while not m: - assert current_offset is not None - key, current_offset = cls.get_value( - data, current_offset, max_nesting=max_nesting - 1 - ) - if current_offset is None: - return result, None - value, current_offset = cls.get_value( - data, current_offset, max_nesting=max_nesting - 1 - ) - result[key] = value - if current_offset is None: - return result, None - m = cls.re_dict_end.match(data, current_offset) - current_offset = m.end() - m = cls.re_stream_start.match(data, current_offset) - if m: - stream_len = result.get(b"Length") - if stream_len is None or not isinstance(stream_len, int): - msg = f"bad or missing Length in stream dict ({stream_len})" - raise PdfFormatError(msg) - stream_data = data[m.end() : m.end() + stream_len] - m = cls.re_stream_end.match(data, m.end() + stream_len) - check_format_condition(m is not None, "stream end not found") - assert m is not None - current_offset = m.end() - return PdfStream(PdfDict(result), stream_data), current_offset - return PdfDict(result), current_offset - m = cls.re_array_start.match(data, offset) - if m: - offset = m.end() - results = [] - m = cls.re_array_end.match(data, offset) - current_offset = offset - while not m: - assert current_offset is not None - value, current_offset = cls.get_value( - data, current_offset, max_nesting=max_nesting - 1 - ) - results.append(value) - if current_offset is None: - return results, None - m = cls.re_array_end.match(data, current_offset) - return results, m.end() - m = cls.re_null.match(data, offset) - if m: - return None, m.end() - m = cls.re_true.match(data, offset) - if m: - return True, m.end() - m = cls.re_false.match(data, offset) - if m: - return False, m.end() - m = cls.re_name.match(data, offset) - if m: - return PdfName(cls.interpret_name(m.group(1))), m.end() - m = cls.re_int.match(data, offset) - if m: - return int(m.group(1)), m.end() - m = cls.re_real.match(data, offset) - if m: - # XXX Decimal instead of float??? - return float(m.group(1)), m.end() - m = cls.re_string_hex.match(data, offset) - if m: - # filter out whitespace - hex_string = bytearray( - b for b in m.group(1) if b in b"0123456789abcdefABCDEF" - ) - if len(hex_string) % 2 == 1: - # append a 0 if the length is not even - yes, at the end - hex_string.append(ord(b"0")) - return bytearray.fromhex(hex_string.decode("us-ascii")), m.end() - m = cls.re_string_lit.match(data, offset) - if m: - return cls.get_literal_string(data, m.end()) - # return None, offset # fallback (only for debugging) - msg = f"unrecognized object: {repr(data[offset : offset + 32])}" - raise PdfFormatError(msg) - - re_lit_str_token = re.compile( - rb"(\\[nrtbf()\\])|(\\[0-9]{1,3})|(\\(\r\n|\r|\n))|(\r\n|\r|\n)|(\()|(\))" - ) - escaped_chars = { - b"n": b"\n", - b"r": b"\r", - b"t": b"\t", - b"b": b"\b", - b"f": b"\f", - b"(": b"(", - b")": b")", - b"\\": b"\\", - ord(b"n"): b"\n", - ord(b"r"): b"\r", - ord(b"t"): b"\t", - ord(b"b"): b"\b", - ord(b"f"): b"\f", - ord(b"("): b"(", - ord(b")"): b")", - ord(b"\\"): b"\\", - } - - @classmethod - def get_literal_string( - cls, data: bytes | bytearray | mmap.mmap, offset: int - ) -> tuple[bytes, int]: - nesting_depth = 0 - result = bytearray() - for m in cls.re_lit_str_token.finditer(data, offset): - result.extend(data[offset : m.start()]) - if m.group(1): - result.extend(cls.escaped_chars[m.group(1)[1]]) - elif m.group(2): - result.append(int(m.group(2)[1:], 8)) - elif m.group(3): - pass - elif m.group(5): - result.extend(b"\n") - elif m.group(6): - result.extend(b"(") - nesting_depth += 1 - elif m.group(7): - if nesting_depth == 0: - return bytes(result), m.end() - result.extend(b")") - nesting_depth -= 1 - offset = m.end() - msg = "unfinished literal string" - raise PdfFormatError(msg) - - re_xref_section_start = re.compile(whitespace_optional + rb"xref" + newline) - re_xref_subsection_start = re.compile( - whitespace_optional - + rb"([0-9]+)" - + whitespace_mandatory - + rb"([0-9]+)" - + whitespace_optional - + newline_only - ) - re_xref_entry = re.compile(rb"([0-9]{10}) ([0-9]{5}) ([fn])( \r| \n|\r\n)") - - def read_xref_table(self, xref_section_offset: int) -> int: - assert self.buf is not None - subsection_found = False - m = self.re_xref_section_start.match( - self.buf, xref_section_offset + self.start_offset - ) - check_format_condition(m is not None, "xref section start not found") - assert m is not None - offset = m.end() - while True: - m = self.re_xref_subsection_start.match(self.buf, offset) - if not m: - check_format_condition( - subsection_found, "xref subsection start not found" - ) - break - subsection_found = True - offset = m.end() - first_object = int(m.group(1)) - num_objects = int(m.group(2)) - for i in range(first_object, first_object + num_objects): - m = self.re_xref_entry.match(self.buf, offset) - check_format_condition(m is not None, "xref entry not found") - assert m is not None - offset = m.end() - is_free = m.group(3) == b"f" - if not is_free: - generation = int(m.group(2)) - new_entry = (int(m.group(1)), generation) - if i not in self.xref_table: - self.xref_table[i] = new_entry - return offset - - def read_indirect(self, ref: IndirectReference, max_nesting: int = -1) -> Any: - offset, generation = self.xref_table[ref[0]] - check_format_condition( - generation == ref[1], - f"expected to find generation {ref[1]} for object ID {ref[0]} in xref " - f"table, instead found generation {generation} at offset {offset}", - ) - assert self.buf is not None - value = self.get_value( - self.buf, - offset + self.start_offset, - expect_indirect=IndirectReference(*ref), - max_nesting=max_nesting, - )[0] - self.cached_objects[ref] = value - return value - - def linearize_page_tree( - self, node: PdfDict | None = None - ) -> list[IndirectReference]: - page_node = node if node is not None else self.page_tree_root - check_format_condition( - page_node[b"Type"] == b"Pages", "/Type of page tree node is not /Pages" - ) - pages = [] - for kid in page_node[b"Kids"]: - kid_object = self.read_indirect(kid) - if kid_object[b"Type"] == b"Page": - pages.append(kid) - else: - pages.extend(self.linearize_page_tree(node=kid_object)) - return pages diff --git a/voxvera/vendor/PIL/PixarImagePlugin.py b/voxvera/vendor/PIL/PixarImagePlugin.py deleted file mode 100644 index d2b6d0a..0000000 --- a/voxvera/vendor/PIL/PixarImagePlugin.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# PIXAR raster support for PIL -# -# history: -# 97-01-29 fl Created -# -# notes: -# This is incomplete; it is based on a few samples created with -# Photoshop 2.5 and 3.0, and a summary description provided by -# Greg Coats . Hopefully, "L" and -# "RGBA" support will be added in future versions. -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1997. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import Image, ImageFile -from ._binary import i16le as i16 - -# -# helpers - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"\200\350\000\000") - - -## -# Image plugin for PIXAR raster images. - - -class PixarImageFile(ImageFile.ImageFile): - format = "PIXAR" - format_description = "PIXAR raster image" - - def _open(self) -> None: - # assuming a 4-byte magic label - assert self.fp is not None - - s = self.fp.read(4) - if not _accept(s): - msg = "not a PIXAR file" - raise SyntaxError(msg) - - # read rest of header - s = s + self.fp.read(508) - - self._size = i16(s, 418), i16(s, 416) - - # get channel/depth descriptions - mode = i16(s, 424), i16(s, 426) - - if mode == (14, 2): - self._mode = "RGB" - # FIXME: to be continued... - - # create tile descriptor (assuming "dumped") - self.tile = [ImageFile._Tile("raw", (0, 0) + self.size, 1024, self.mode)] - - -# -# -------------------------------------------------------------------- - -Image.register_open(PixarImageFile.format, PixarImageFile, _accept) - -Image.register_extension(PixarImageFile.format, ".pxr") diff --git a/voxvera/vendor/PIL/PngImagePlugin.py b/voxvera/vendor/PIL/PngImagePlugin.py deleted file mode 100644 index 9826a4c..0000000 --- a/voxvera/vendor/PIL/PngImagePlugin.py +++ /dev/null @@ -1,1564 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# PNG support code -# -# See "PNG (Portable Network Graphics) Specification, version 1.0; -# W3C Recommendation", 1996-10-01, Thomas Boutell (ed.). -# -# history: -# 1996-05-06 fl Created (couldn't resist it) -# 1996-12-14 fl Upgraded, added read and verify support (0.2) -# 1996-12-15 fl Separate PNG stream parser -# 1996-12-29 fl Added write support, added getchunks -# 1996-12-30 fl Eliminated circular references in decoder (0.3) -# 1998-07-12 fl Read/write 16-bit images as mode I (0.4) -# 2001-02-08 fl Added transparency support (from Zircon) (0.5) -# 2001-04-16 fl Don't close data source in "open" method (0.6) -# 2004-02-24 fl Don't even pretend to support interlaced files (0.7) -# 2004-08-31 fl Do basic sanity check on chunk identifiers (0.8) -# 2004-09-20 fl Added PngInfo chunk container -# 2004-12-18 fl Added DPI read support (based on code by Niki Spahiev) -# 2008-08-13 fl Added tRNS support for RGB images -# 2009-03-06 fl Support for preserving ICC profiles (by Florian Hoech) -# 2009-03-08 fl Added zTXT support (from Lowell Alleman) -# 2009-03-29 fl Read interlaced PNG files (from Conrado Porto Lopes Gouvua) -# -# Copyright (c) 1997-2009 by Secret Labs AB -# Copyright (c) 1996 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import itertools -import logging -import re -import struct -import warnings -import zlib -from enum import IntEnum -from fractions import Fraction -from typing import IO, NamedTuple, cast - -from . import Image, ImageChops, ImageFile, ImagePalette, ImageSequence -from ._binary import i16be as i16 -from ._binary import i32be as i32 -from ._binary import o8 -from ._binary import o16be as o16 -from ._binary import o32be as o32 -from ._deprecate import deprecate -from ._util import DeferredError - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Callable - from typing import Any, NoReturn - - from . import _imaging - -logger = logging.getLogger(__name__) - -is_cid = re.compile(rb"\w\w\w\w").match - - -_MAGIC = b"\211PNG\r\n\032\n" - - -_MODES = { - # supported bits/color combinations, and corresponding modes/rawmodes - # Grayscale - (1, 0): ("1", "1"), - (2, 0): ("L", "L;2"), - (4, 0): ("L", "L;4"), - (8, 0): ("L", "L"), - (16, 0): ("I;16", "I;16B"), - # Truecolour - (8, 2): ("RGB", "RGB"), - (16, 2): ("RGB", "RGB;16B"), - # Indexed-colour - (1, 3): ("P", "P;1"), - (2, 3): ("P", "P;2"), - (4, 3): ("P", "P;4"), - (8, 3): ("P", "P"), - # Grayscale with alpha - (8, 4): ("LA", "LA"), - (16, 4): ("RGBA", "LA;16B"), # LA;16B->LA not yet available - # Truecolour with alpha - (8, 6): ("RGBA", "RGBA"), - (16, 6): ("RGBA", "RGBA;16B"), -} - - -_simple_palette = re.compile(b"^\xff*\x00\xff*$") - -MAX_TEXT_CHUNK = ImageFile.SAFEBLOCK -""" -Maximum decompressed size for a iTXt or zTXt chunk. -Eliminates decompression bombs where compressed chunks can expand 1000x. -See :ref:`Text in PNG File Format`. -""" -MAX_TEXT_MEMORY = 64 * MAX_TEXT_CHUNK -""" -Set the maximum total text chunk size. -See :ref:`Text in PNG File Format`. -""" - - -# APNG frame disposal modes -class Disposal(IntEnum): - OP_NONE = 0 - """ - No disposal is done on this frame before rendering the next frame. - See :ref:`Saving APNG sequences`. - """ - OP_BACKGROUND = 1 - """ - This frame’s modified region is cleared to fully transparent black before rendering - the next frame. - See :ref:`Saving APNG sequences`. - """ - OP_PREVIOUS = 2 - """ - This frame’s modified region is reverted to the previous frame’s contents before - rendering the next frame. - See :ref:`Saving APNG sequences`. - """ - - -# APNG frame blend modes -class Blend(IntEnum): - OP_SOURCE = 0 - """ - All color components of this frame, including alpha, overwrite the previous output - image contents. - See :ref:`Saving APNG sequences`. - """ - OP_OVER = 1 - """ - This frame should be alpha composited with the previous output image contents. - See :ref:`Saving APNG sequences`. - """ - - -def _safe_zlib_decompress(s: bytes) -> bytes: - dobj = zlib.decompressobj() - plaintext = dobj.decompress(s, MAX_TEXT_CHUNK) - if dobj.unconsumed_tail: - msg = "Decompressed data too large for PngImagePlugin.MAX_TEXT_CHUNK" - raise ValueError(msg) - return plaintext - - -def _crc32(data: bytes, seed: int = 0) -> int: - return zlib.crc32(data, seed) & 0xFFFFFFFF - - -# -------------------------------------------------------------------- -# Support classes. Suitable for PNG and related formats like MNG etc. - - -class ChunkStream: - def __init__(self, fp: IO[bytes]) -> None: - self.fp: IO[bytes] | None = fp - self.queue: list[tuple[bytes, int, int]] | None = [] - - def read(self) -> tuple[bytes, int, int]: - """Fetch a new chunk. Returns header information.""" - cid = None - - assert self.fp is not None - if self.queue: - cid, pos, length = self.queue.pop() - self.fp.seek(pos) - else: - s = self.fp.read(8) - cid = s[4:] - pos = self.fp.tell() - length = i32(s) - - if not is_cid(cid): - if not ImageFile.LOAD_TRUNCATED_IMAGES: - msg = f"broken PNG file (chunk {repr(cid)})" - raise SyntaxError(msg) - - return cid, pos, length - - def __enter__(self) -> ChunkStream: - return self - - def __exit__(self, *args: object) -> None: - self.close() - - def close(self) -> None: - self.queue = self.fp = None - - def push(self, cid: bytes, pos: int, length: int) -> None: - assert self.queue is not None - self.queue.append((cid, pos, length)) - - def call(self, cid: bytes, pos: int, length: int) -> bytes: - """Call the appropriate chunk handler""" - - logger.debug("STREAM %r %s %s", cid, pos, length) - return getattr(self, f"chunk_{cid.decode('ascii')}")(pos, length) - - def crc(self, cid: bytes, data: bytes) -> None: - """Read and verify checksum""" - - # Skip CRC checks for ancillary chunks if allowed to load truncated - # images - # 5th byte of first char is 1 [specs, section 5.4] - if ImageFile.LOAD_TRUNCATED_IMAGES and (cid[0] >> 5 & 1): - self.crc_skip(cid, data) - return - - assert self.fp is not None - try: - crc1 = _crc32(data, _crc32(cid)) - crc2 = i32(self.fp.read(4)) - if crc1 != crc2: - msg = f"broken PNG file (bad header checksum in {repr(cid)})" - raise SyntaxError(msg) - except struct.error as e: - msg = f"broken PNG file (incomplete checksum in {repr(cid)})" - raise SyntaxError(msg) from e - - def crc_skip(self, cid: bytes, data: bytes) -> None: - """Read checksum""" - - assert self.fp is not None - self.fp.read(4) - - def verify(self, endchunk: bytes = b"IEND") -> list[bytes]: - # Simple approach; just calculate checksum for all remaining - # blocks. Must be called directly after open. - - cids = [] - - assert self.fp is not None - while True: - try: - cid, pos, length = self.read() - except struct.error as e: - msg = "truncated PNG file" - raise OSError(msg) from e - - if cid == endchunk: - break - self.crc(cid, ImageFile._safe_read(self.fp, length)) - cids.append(cid) - - return cids - - -class iTXt(str): - """ - Subclass of string to allow iTXt chunks to look like strings while - keeping their extra information - - """ - - lang: str | bytes | None - tkey: str | bytes | None - - @staticmethod - def __new__( - cls, text: str, lang: str | None = None, tkey: str | None = None - ) -> iTXt: - """ - :param cls: the class to use when creating the instance - :param text: value for this key - :param lang: language code - :param tkey: UTF-8 version of the key name - """ - - self = str.__new__(cls, text) - self.lang = lang - self.tkey = tkey - return self - - -class PngInfo: - """ - PNG chunk container (for use with save(pnginfo=)) - - """ - - def __init__(self) -> None: - self.chunks: list[tuple[bytes, bytes, bool]] = [] - - def add(self, cid: bytes, data: bytes, after_idat: bool = False) -> None: - """Appends an arbitrary chunk. Use with caution. - - :param cid: a byte string, 4 bytes long. - :param data: a byte string of the encoded data - :param after_idat: for use with private chunks. Whether the chunk - should be written after IDAT - - """ - - self.chunks.append((cid, data, after_idat)) - - def add_itxt( - self, - key: str | bytes, - value: str | bytes, - lang: str | bytes = "", - tkey: str | bytes = "", - zip: bool = False, - ) -> None: - """Appends an iTXt chunk. - - :param key: latin-1 encodable text key name - :param value: value for this key - :param lang: language code - :param tkey: UTF-8 version of the key name - :param zip: compression flag - - """ - - if not isinstance(key, bytes): - key = key.encode("latin-1", "strict") - if not isinstance(value, bytes): - value = value.encode("utf-8", "strict") - if not isinstance(lang, bytes): - lang = lang.encode("utf-8", "strict") - if not isinstance(tkey, bytes): - tkey = tkey.encode("utf-8", "strict") - - if zip: - self.add( - b"iTXt", - key + b"\0\x01\0" + lang + b"\0" + tkey + b"\0" + zlib.compress(value), - ) - else: - self.add(b"iTXt", key + b"\0\0\0" + lang + b"\0" + tkey + b"\0" + value) - - def add_text( - self, key: str | bytes, value: str | bytes | iTXt, zip: bool = False - ) -> None: - """Appends a text chunk. - - :param key: latin-1 encodable text key name - :param value: value for this key, text or an - :py:class:`PIL.PngImagePlugin.iTXt` instance - :param zip: compression flag - - """ - if isinstance(value, iTXt): - return self.add_itxt( - key, - value, - value.lang if value.lang is not None else b"", - value.tkey if value.tkey is not None else b"", - zip=zip, - ) - - # The tEXt chunk stores latin-1 text - if not isinstance(value, bytes): - try: - value = value.encode("latin-1", "strict") - except UnicodeError: - return self.add_itxt(key, value, zip=zip) - - if not isinstance(key, bytes): - key = key.encode("latin-1", "strict") - - if zip: - self.add(b"zTXt", key + b"\0\0" + zlib.compress(value)) - else: - self.add(b"tEXt", key + b"\0" + value) - - -# -------------------------------------------------------------------- -# PNG image stream (IHDR/IEND) - - -class _RewindState(NamedTuple): - info: dict[str | tuple[int, int], Any] - tile: list[ImageFile._Tile] - seq_num: int | None - - -class PngStream(ChunkStream): - def __init__(self, fp: IO[bytes]) -> None: - super().__init__(fp) - - # local copies of Image attributes - self.im_info: dict[str | tuple[int, int], Any] = {} - self.im_text: dict[str, str | iTXt] = {} - self.im_size = (0, 0) - self.im_mode = "" - self.im_tile: list[ImageFile._Tile] = [] - self.im_palette: tuple[str, bytes] | None = None - self.im_custom_mimetype: str | None = None - self.im_n_frames: int | None = None - self._seq_num: int | None = None - self.rewind_state = _RewindState({}, [], None) - - self.text_memory = 0 - - def check_text_memory(self, chunklen: int) -> None: - self.text_memory += chunklen - if self.text_memory > MAX_TEXT_MEMORY: - msg = ( - "Too much memory used in text chunks: " - f"{self.text_memory}>MAX_TEXT_MEMORY" - ) - raise ValueError(msg) - - def save_rewind(self) -> None: - self.rewind_state = _RewindState( - self.im_info.copy(), - self.im_tile, - self._seq_num, - ) - - def rewind(self) -> None: - self.im_info = self.rewind_state.info.copy() - self.im_tile = self.rewind_state.tile - self._seq_num = self.rewind_state.seq_num - - def chunk_iCCP(self, pos: int, length: int) -> bytes: - # ICC profile - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - # according to PNG spec, the iCCP chunk contains: - # Profile name 1-79 bytes (character string) - # Null separator 1 byte (null character) - # Compression method 1 byte (0) - # Compressed profile n bytes (zlib with deflate compression) - i = s.find(b"\0") - logger.debug("iCCP profile name %r", s[:i]) - comp_method = s[i + 1] - logger.debug("Compression method %s", comp_method) - if comp_method != 0: - msg = f"Unknown compression method {comp_method} in iCCP chunk" - raise SyntaxError(msg) - try: - icc_profile = _safe_zlib_decompress(s[i + 2 :]) - except ValueError: - if ImageFile.LOAD_TRUNCATED_IMAGES: - icc_profile = None - else: - raise - except zlib.error: - icc_profile = None # FIXME - self.im_info["icc_profile"] = icc_profile - return s - - def chunk_IHDR(self, pos: int, length: int) -> bytes: - # image header - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - if length < 13: - if ImageFile.LOAD_TRUNCATED_IMAGES: - return s - msg = "Truncated IHDR chunk" - raise ValueError(msg) - self.im_size = i32(s, 0), i32(s, 4) - try: - self.im_mode, self.im_rawmode = _MODES[(s[8], s[9])] - except Exception: - pass - if s[12]: - self.im_info["interlace"] = 1 - if s[11]: - msg = "unknown filter category" - raise SyntaxError(msg) - return s - - def chunk_IDAT(self, pos: int, length: int) -> NoReturn: - # image data - if "bbox" in self.im_info: - tile = [ImageFile._Tile("zip", self.im_info["bbox"], pos, self.im_rawmode)] - else: - if self.im_n_frames is not None: - self.im_info["default_image"] = True - tile = [ImageFile._Tile("zip", (0, 0) + self.im_size, pos, self.im_rawmode)] - self.im_tile = tile - self.im_idat = length - msg = "image data found" - raise EOFError(msg) - - def chunk_IEND(self, pos: int, length: int) -> NoReturn: - msg = "end of PNG image" - raise EOFError(msg) - - def chunk_PLTE(self, pos: int, length: int) -> bytes: - # palette - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - if self.im_mode == "P": - self.im_palette = "RGB", s - return s - - def chunk_tRNS(self, pos: int, length: int) -> bytes: - # transparency - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - if self.im_mode == "P": - if _simple_palette.match(s): - # tRNS contains only one full-transparent entry, - # other entries are full opaque - i = s.find(b"\0") - if i >= 0: - self.im_info["transparency"] = i - else: - # otherwise, we have a byte string with one alpha value - # for each palette entry - self.im_info["transparency"] = s - elif self.im_mode == "1": - self.im_info["transparency"] = 255 if i16(s) else 0 - elif self.im_mode in ("L", "I;16"): - self.im_info["transparency"] = i16(s) - elif self.im_mode == "RGB": - self.im_info["transparency"] = i16(s), i16(s, 2), i16(s, 4) - return s - - def chunk_gAMA(self, pos: int, length: int) -> bytes: - # gamma setting - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - self.im_info["gamma"] = i32(s) / 100000.0 - return s - - def chunk_cHRM(self, pos: int, length: int) -> bytes: - # chromaticity, 8 unsigned ints, actual value is scaled by 100,000 - # WP x,y, Red x,y, Green x,y Blue x,y - - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - raw_vals = struct.unpack(f">{len(s) // 4}I", s) - self.im_info["chromaticity"] = tuple(elt / 100000.0 for elt in raw_vals) - return s - - def chunk_sRGB(self, pos: int, length: int) -> bytes: - # srgb rendering intent, 1 byte - # 0 perceptual - # 1 relative colorimetric - # 2 saturation - # 3 absolute colorimetric - - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - if length < 1: - if ImageFile.LOAD_TRUNCATED_IMAGES: - return s - msg = "Truncated sRGB chunk" - raise ValueError(msg) - self.im_info["srgb"] = s[0] - return s - - def chunk_pHYs(self, pos: int, length: int) -> bytes: - # pixels per unit - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - if length < 9: - if ImageFile.LOAD_TRUNCATED_IMAGES: - return s - msg = "Truncated pHYs chunk" - raise ValueError(msg) - px, py = i32(s, 0), i32(s, 4) - unit = s[8] - if unit == 1: # meter - dpi = px * 0.0254, py * 0.0254 - self.im_info["dpi"] = dpi - elif unit == 0: - self.im_info["aspect"] = px, py - return s - - def chunk_tEXt(self, pos: int, length: int) -> bytes: - # text - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - try: - k, v = s.split(b"\0", 1) - except ValueError: - # fallback for broken tEXt tags - k = s - v = b"" - if k: - k_str = k.decode("latin-1", "strict") - v_str = v.decode("latin-1", "replace") - - self.im_info[k_str] = v if k == b"exif" else v_str - self.im_text[k_str] = v_str - self.check_text_memory(len(v_str)) - - return s - - def chunk_zTXt(self, pos: int, length: int) -> bytes: - # compressed text - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - try: - k, v = s.split(b"\0", 1) - except ValueError: - k = s - v = b"" - if v: - comp_method = v[0] - else: - comp_method = 0 - if comp_method != 0: - msg = f"Unknown compression method {comp_method} in zTXt chunk" - raise SyntaxError(msg) - try: - v = _safe_zlib_decompress(v[1:]) - except ValueError: - if ImageFile.LOAD_TRUNCATED_IMAGES: - v = b"" - else: - raise - except zlib.error: - v = b"" - - if k: - k_str = k.decode("latin-1", "strict") - v_str = v.decode("latin-1", "replace") - - self.im_info[k_str] = self.im_text[k_str] = v_str - self.check_text_memory(len(v_str)) - - return s - - def chunk_iTXt(self, pos: int, length: int) -> bytes: - # international text - assert self.fp is not None - r = s = ImageFile._safe_read(self.fp, length) - try: - k, r = r.split(b"\0", 1) - except ValueError: - return s - if len(r) < 2: - return s - cf, cm, r = r[0], r[1], r[2:] - try: - lang, tk, v = r.split(b"\0", 2) - except ValueError: - return s - if cf != 0: - if cm == 0: - try: - v = _safe_zlib_decompress(v) - except ValueError: - if ImageFile.LOAD_TRUNCATED_IMAGES: - return s - else: - raise - except zlib.error: - return s - else: - return s - if k == b"XML:com.adobe.xmp": - self.im_info["xmp"] = v - try: - k_str = k.decode("latin-1", "strict") - lang_str = lang.decode("utf-8", "strict") - tk_str = tk.decode("utf-8", "strict") - v_str = v.decode("utf-8", "strict") - except UnicodeError: - return s - - self.im_info[k_str] = self.im_text[k_str] = iTXt(v_str, lang_str, tk_str) - self.check_text_memory(len(v_str)) - - return s - - def chunk_eXIf(self, pos: int, length: int) -> bytes: - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - self.im_info["exif"] = b"Exif\x00\x00" + s - return s - - # APNG chunks - def chunk_acTL(self, pos: int, length: int) -> bytes: - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - if length < 8: - if ImageFile.LOAD_TRUNCATED_IMAGES: - return s - msg = "APNG contains truncated acTL chunk" - raise ValueError(msg) - if self.im_n_frames is not None: - self.im_n_frames = None - warnings.warn("Invalid APNG, will use default PNG image if possible") - return s - n_frames = i32(s) - if n_frames == 0 or n_frames > 0x80000000: - warnings.warn("Invalid APNG, will use default PNG image if possible") - return s - self.im_n_frames = n_frames - self.im_info["loop"] = i32(s, 4) - self.im_custom_mimetype = "image/apng" - return s - - def chunk_fcTL(self, pos: int, length: int) -> bytes: - assert self.fp is not None - s = ImageFile._safe_read(self.fp, length) - if length < 26: - if ImageFile.LOAD_TRUNCATED_IMAGES: - return s - msg = "APNG contains truncated fcTL chunk" - raise ValueError(msg) - seq = i32(s) - if (self._seq_num is None and seq != 0) or ( - self._seq_num is not None and self._seq_num != seq - 1 - ): - msg = "APNG contains frame sequence errors" - raise SyntaxError(msg) - self._seq_num = seq - width, height = i32(s, 4), i32(s, 8) - px, py = i32(s, 12), i32(s, 16) - im_w, im_h = self.im_size - if px + width > im_w or py + height > im_h: - msg = "APNG contains invalid frames" - raise SyntaxError(msg) - self.im_info["bbox"] = (px, py, px + width, py + height) - delay_num, delay_den = i16(s, 20), i16(s, 22) - if delay_den == 0: - delay_den = 100 - self.im_info["duration"] = float(delay_num) / float(delay_den) * 1000 - self.im_info["disposal"] = s[24] - self.im_info["blend"] = s[25] - return s - - def chunk_fdAT(self, pos: int, length: int) -> bytes: - assert self.fp is not None - if length < 4: - if ImageFile.LOAD_TRUNCATED_IMAGES: - s = ImageFile._safe_read(self.fp, length) - return s - msg = "APNG contains truncated fDAT chunk" - raise ValueError(msg) - s = ImageFile._safe_read(self.fp, 4) - seq = i32(s) - if self._seq_num != seq - 1: - msg = "APNG contains frame sequence errors" - raise SyntaxError(msg) - self._seq_num = seq - return self.chunk_IDAT(pos + 4, length - 4) - - -# -------------------------------------------------------------------- -# PNG reader - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(_MAGIC) - - -## -# Image plugin for PNG images. - - -class PngImageFile(ImageFile.ImageFile): - format = "PNG" - format_description = "Portable network graphics" - - def _open(self) -> None: - assert self.fp is not None - if not _accept(self.fp.read(8)): - msg = "not a PNG file" - raise SyntaxError(msg) - self._fp = self.fp - self.__frame = 0 - - # - # Parse headers up to the first IDAT or fDAT chunk - - self.private_chunks: list[tuple[bytes, bytes] | tuple[bytes, bytes, bool]] = [] - self.png: PngStream | None = PngStream(self.fp) - - while True: - # - # get next chunk - - cid, pos, length = self.png.read() - - try: - s = self.png.call(cid, pos, length) - except EOFError: - break - except AttributeError: - logger.debug("%r %s %s (unknown)", cid, pos, length) - s = ImageFile._safe_read(self.fp, length) - if cid[1:2].islower(): - self.private_chunks.append((cid, s)) - - self.png.crc(cid, s) - - # - # Copy relevant attributes from the PngStream. An alternative - # would be to let the PngStream class modify these attributes - # directly, but that introduces circular references which are - # difficult to break if things go wrong in the decoder... - # (believe me, I've tried ;-) - - self._mode = self.png.im_mode - self._size = self.png.im_size - self.info = self.png.im_info - self._text: dict[str, str | iTXt] | None = None - self.tile = self.png.im_tile - self.custom_mimetype = self.png.im_custom_mimetype - self.n_frames = self.png.im_n_frames or 1 - self.default_image = self.info.get("default_image", False) - - if self.png.im_palette: - rawmode, data = self.png.im_palette - self.palette = ImagePalette.raw(rawmode, data) - - if cid == b"fdAT": - self.__prepare_idat = length - 4 - else: - self.__prepare_idat = length # used by load_prepare() - - if self.png.im_n_frames is not None: - self._close_exclusive_fp_after_loading = False - self.png.save_rewind() - self.__rewind_idat = self.__prepare_idat - self.__rewind = self._fp.tell() - if self.default_image: - # IDAT chunk contains default image and not first animation frame - self.n_frames += 1 - self._seek(0) - self.is_animated = self.n_frames > 1 - - @property - def text(self) -> dict[str, str | iTXt]: - # experimental - if self._text is None: - # iTxt, tEXt and zTXt chunks may appear at the end of the file - # So load the file to ensure that they are read - if self.is_animated: - frame = self.__frame - # for APNG, seek to the final frame before loading - self.seek(self.n_frames - 1) - self.load() - if self.is_animated: - self.seek(frame) - assert self._text is not None - return self._text - - def verify(self) -> None: - """Verify PNG file""" - - if self.fp is None: - msg = "verify must be called directly after open" - raise RuntimeError(msg) - - # back up to beginning of IDAT block - self.fp.seek(self.tile[0][2] - 8) - - assert self.png is not None - self.png.verify() - self.png.close() - - super().verify() - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - if frame < self.__frame: - self._seek(0, True) - - last_frame = self.__frame - for f in range(self.__frame + 1, frame + 1): - try: - self._seek(f) - except EOFError as e: - self.seek(last_frame) - msg = "no more images in APNG file" - raise EOFError(msg) from e - - def _seek(self, frame: int, rewind: bool = False) -> None: - assert self.png is not None - if isinstance(self._fp, DeferredError): - raise self._fp.ex - - self.dispose: _imaging.ImagingCore | None - dispose_extent = None - if frame == 0: - if rewind: - self._fp.seek(self.__rewind) - self.png.rewind() - self.__prepare_idat = self.__rewind_idat - self._im = None - self.info = self.png.im_info - self.tile = self.png.im_tile - self.fp = self._fp - self._prev_im = None - self.dispose = None - self.default_image = self.info.get("default_image", False) - self.dispose_op = self.info.get("disposal") - self.blend_op = self.info.get("blend") - dispose_extent = self.info.get("bbox") - self.__frame = 0 - else: - if frame != self.__frame + 1: - msg = f"cannot seek to frame {frame}" - raise ValueError(msg) - - # ensure previous frame was loaded - self.load() - - if self.dispose: - self.im.paste(self.dispose, self.dispose_extent) - self._prev_im = self.im.copy() - - self.fp = self._fp - - # advance to the next frame - if self.__prepare_idat: - ImageFile._safe_read(self.fp, self.__prepare_idat) - self.__prepare_idat = 0 - frame_start = False - while True: - self.fp.read(4) # CRC - - try: - cid, pos, length = self.png.read() - except (struct.error, SyntaxError): - break - - if cid == b"IEND": - msg = "No more images in APNG file" - raise EOFError(msg) - if cid == b"fcTL": - if frame_start: - # there must be at least one fdAT chunk between fcTL chunks - msg = "APNG missing frame data" - raise SyntaxError(msg) - frame_start = True - - try: - self.png.call(cid, pos, length) - except UnicodeDecodeError: - break - except EOFError: - if cid == b"fdAT": - length -= 4 - if frame_start: - self.__prepare_idat = length - break - ImageFile._safe_read(self.fp, length) - except AttributeError: - logger.debug("%r %s %s (unknown)", cid, pos, length) - ImageFile._safe_read(self.fp, length) - - self.__frame = frame - self.tile = self.png.im_tile - self.dispose_op = self.info.get("disposal") - self.blend_op = self.info.get("blend") - dispose_extent = self.info.get("bbox") - - if not self.tile: - msg = "image not found in APNG frame" - raise EOFError(msg) - if dispose_extent: - self.dispose_extent: tuple[float, float, float, float] = dispose_extent - - # setup frame disposal (actual disposal done when needed in the next _seek()) - if self._prev_im is None and self.dispose_op == Disposal.OP_PREVIOUS: - self.dispose_op = Disposal.OP_BACKGROUND - - self.dispose = None - if self.dispose_op == Disposal.OP_PREVIOUS: - if self._prev_im: - self.dispose = self._prev_im.copy() - self.dispose = self._crop(self.dispose, self.dispose_extent) - elif self.dispose_op == Disposal.OP_BACKGROUND: - self.dispose = Image.core.fill(self.mode, self.size) - self.dispose = self._crop(self.dispose, self.dispose_extent) - - def tell(self) -> int: - return self.__frame - - def load_prepare(self) -> None: - """internal: prepare to read PNG file""" - - if self.info.get("interlace"): - self.decoderconfig = self.decoderconfig + (1,) - - self.__idat = self.__prepare_idat # used by load_read() - ImageFile.ImageFile.load_prepare(self) - - def load_read(self, read_bytes: int) -> bytes: - """internal: read more image data""" - - assert self.png is not None - assert self.fp is not None - while self.__idat == 0: - # end of chunk, skip forward to next one - - self.fp.read(4) # CRC - - cid, pos, length = self.png.read() - - if cid not in [b"IDAT", b"DDAT", b"fdAT"]: - self.png.push(cid, pos, length) - return b"" - - if cid == b"fdAT": - try: - self.png.call(cid, pos, length) - except EOFError: - pass - self.__idat = length - 4 # sequence_num has already been read - else: - self.__idat = length # empty chunks are allowed - - # read more data from this chunk - if read_bytes <= 0: - read_bytes = self.__idat - else: - read_bytes = min(read_bytes, self.__idat) - - self.__idat = self.__idat - read_bytes - - return self.fp.read(read_bytes) - - def load_end(self) -> None: - """internal: finished reading image data""" - assert self.png is not None - assert self.fp is not None - if self.__idat != 0: - self.fp.read(self.__idat) - while True: - self.fp.read(4) # CRC - - try: - cid, pos, length = self.png.read() - except (struct.error, SyntaxError): - break - - if cid == b"IEND": - break - elif cid == b"fcTL" and self.is_animated: - # start of the next frame, stop reading - self.__prepare_idat = 0 - self.png.push(cid, pos, length) - break - - try: - self.png.call(cid, pos, length) - except UnicodeDecodeError: - break - except EOFError: - if cid == b"fdAT": - length -= 4 - try: - ImageFile._safe_read(self.fp, length) - except OSError as e: - if ImageFile.LOAD_TRUNCATED_IMAGES: - break - else: - raise e - except AttributeError: - logger.debug("%r %s %s (unknown)", cid, pos, length) - s = ImageFile._safe_read(self.fp, length) - if cid[1:2].islower(): - self.private_chunks.append((cid, s, True)) - self._text = self.png.im_text - if not self.is_animated: - self.png.close() - self.png = None - else: - if self._prev_im and self.blend_op == Blend.OP_OVER: - updated = self._crop(self.im, self.dispose_extent) - if self.im.mode == "RGB" and "transparency" in self.info: - mask = updated.convert_transparent( - "RGBA", self.info["transparency"] - ) - else: - if self.im.mode == "P" and "transparency" in self.info: - t = self.info["transparency"] - if isinstance(t, bytes): - updated.putpalettealphas(t) - elif isinstance(t, int): - updated.putpalettealpha(t) - mask = updated.convert("RGBA") - self._prev_im.paste(updated, self.dispose_extent, mask) - self.im = self._prev_im - - def _getexif(self) -> dict[int, Any] | None: - if "exif" not in self.info: - self.load() - if "exif" not in self.info and "Raw profile type exif" not in self.info: - return None - return self.getexif()._get_merged_dict() - - def getexif(self) -> Image.Exif: - if "exif" not in self.info: - self.load() - - return super().getexif() - - -# -------------------------------------------------------------------- -# PNG writer - -_OUTMODES = { - # supported PIL modes, and corresponding rawmode, bit depth and color type - "1": ("1", b"\x01", b"\x00"), - "L;1": ("L;1", b"\x01", b"\x00"), - "L;2": ("L;2", b"\x02", b"\x00"), - "L;4": ("L;4", b"\x04", b"\x00"), - "L": ("L", b"\x08", b"\x00"), - "LA": ("LA", b"\x08", b"\x04"), - "I": ("I;16B", b"\x10", b"\x00"), - "I;16": ("I;16B", b"\x10", b"\x00"), - "I;16B": ("I;16B", b"\x10", b"\x00"), - "P;1": ("P;1", b"\x01", b"\x03"), - "P;2": ("P;2", b"\x02", b"\x03"), - "P;4": ("P;4", b"\x04", b"\x03"), - "P": ("P", b"\x08", b"\x03"), - "RGB": ("RGB", b"\x08", b"\x02"), - "RGBA": ("RGBA", b"\x08", b"\x06"), -} - - -def putchunk(fp: IO[bytes], cid: bytes, *data: bytes) -> None: - """Write a PNG chunk (including CRC field)""" - - byte_data = b"".join(data) - - fp.write(o32(len(byte_data)) + cid) - fp.write(byte_data) - crc = _crc32(byte_data, _crc32(cid)) - fp.write(o32(crc)) - - -class _idat: - # wrap output from the encoder in IDAT chunks - - def __init__(self, fp: IO[bytes], chunk: Callable[..., None]) -> None: - self.fp = fp - self.chunk = chunk - - def write(self, data: bytes) -> None: - self.chunk(self.fp, b"IDAT", data) - - -class _fdat: - # wrap encoder output in fdAT chunks - - def __init__(self, fp: IO[bytes], chunk: Callable[..., None], seq_num: int) -> None: - self.fp = fp - self.chunk = chunk - self.seq_num = seq_num - - def write(self, data: bytes) -> None: - self.chunk(self.fp, b"fdAT", o32(self.seq_num), data) - self.seq_num += 1 - - -def _apply_encoderinfo(im: Image.Image, encoderinfo: dict[str, Any]) -> None: - im.encoderconfig = ( - encoderinfo.get("optimize", False), - encoderinfo.get("compress_level", -1), - encoderinfo.get("compress_type", -1), - encoderinfo.get("dictionary", b""), - ) - - -class _Frame(NamedTuple): - im: Image.Image - bbox: tuple[int, int, int, int] | None - encoderinfo: dict[str, Any] - - -def _write_multiple_frames( - im: Image.Image, - fp: IO[bytes], - chunk: Callable[..., None], - mode: str, - rawmode: str, - default_image: Image.Image | None, - append_images: list[Image.Image], -) -> Image.Image | None: - duration = im.encoderinfo.get("duration") - loop = im.encoderinfo.get("loop", im.info.get("loop", 0)) - disposal = im.encoderinfo.get("disposal", im.info.get("disposal", Disposal.OP_NONE)) - blend = im.encoderinfo.get("blend", im.info.get("blend", Blend.OP_SOURCE)) - - if default_image: - chain = itertools.chain(append_images) - else: - chain = itertools.chain([im], append_images) - - im_frames: list[_Frame] = [] - frame_count = 0 - for im_seq in chain: - for im_frame in ImageSequence.Iterator(im_seq): - if im_frame.mode == mode: - im_frame = im_frame.copy() - else: - im_frame = im_frame.convert(mode) - encoderinfo = im.encoderinfo.copy() - if isinstance(duration, (list, tuple)): - encoderinfo["duration"] = duration[frame_count] - elif duration is None and "duration" in im_frame.info: - encoderinfo["duration"] = im_frame.info["duration"] - if isinstance(disposal, (list, tuple)): - encoderinfo["disposal"] = disposal[frame_count] - if isinstance(blend, (list, tuple)): - encoderinfo["blend"] = blend[frame_count] - frame_count += 1 - - if im_frames: - previous = im_frames[-1] - prev_disposal = previous.encoderinfo.get("disposal") - prev_blend = previous.encoderinfo.get("blend") - if prev_disposal == Disposal.OP_PREVIOUS and len(im_frames) < 2: - prev_disposal = Disposal.OP_BACKGROUND - - if prev_disposal == Disposal.OP_BACKGROUND: - base_im = previous.im.copy() - dispose = Image.core.fill("RGBA", im.size, (0, 0, 0, 0)) - bbox = previous.bbox - if bbox: - dispose = dispose.crop(bbox) - else: - bbox = (0, 0) + im.size - base_im.paste(dispose, bbox) - elif prev_disposal == Disposal.OP_PREVIOUS: - base_im = im_frames[-2].im - else: - base_im = previous.im - delta = ImageChops.subtract_modulo( - im_frame.convert("RGBA"), base_im.convert("RGBA") - ) - bbox = delta.getbbox(alpha_only=False) - if ( - not bbox - and prev_disposal == encoderinfo.get("disposal") - and prev_blend == encoderinfo.get("blend") - and "duration" in encoderinfo - ): - previous.encoderinfo["duration"] += encoderinfo["duration"] - continue - else: - bbox = None - im_frames.append(_Frame(im_frame, bbox, encoderinfo)) - - if len(im_frames) == 1 and not default_image: - return im_frames[0].im - - # animation control - chunk( - fp, - b"acTL", - o32(len(im_frames)), # 0: num_frames - o32(loop), # 4: num_plays - ) - - # default image IDAT (if it exists) - if default_image: - default_im = im if im.mode == mode else im.convert(mode) - _apply_encoderinfo(default_im, im.encoderinfo) - ImageFile._save( - default_im, - cast(IO[bytes], _idat(fp, chunk)), - [ImageFile._Tile("zip", (0, 0) + im.size, 0, rawmode)], - ) - - seq_num = 0 - for frame, frame_data in enumerate(im_frames): - im_frame = frame_data.im - if not frame_data.bbox: - bbox = (0, 0) + im_frame.size - else: - bbox = frame_data.bbox - im_frame = im_frame.crop(bbox) - size = im_frame.size - encoderinfo = frame_data.encoderinfo - frame_duration = encoderinfo.get("duration", 0) - delay = Fraction(frame_duration / 1000).limit_denominator(65535) - if delay.numerator > 65535: - msg = "cannot write duration" - raise ValueError(msg) - frame_disposal = encoderinfo.get("disposal", disposal) - frame_blend = encoderinfo.get("blend", blend) - # frame control - chunk( - fp, - b"fcTL", - o32(seq_num), # sequence_number - o32(size[0]), # width - o32(size[1]), # height - o32(bbox[0]), # x_offset - o32(bbox[1]), # y_offset - o16(delay.numerator), # delay_numerator - o16(delay.denominator), # delay_denominator - o8(frame_disposal), # dispose_op - o8(frame_blend), # blend_op - ) - seq_num += 1 - # frame data - _apply_encoderinfo(im_frame, im.encoderinfo) - if frame == 0 and not default_image: - # first frame must be in IDAT chunks for backwards compatibility - ImageFile._save( - im_frame, - cast(IO[bytes], _idat(fp, chunk)), - [ImageFile._Tile("zip", (0, 0) + im_frame.size, 0, rawmode)], - ) - else: - fdat_chunks = _fdat(fp, chunk, seq_num) - ImageFile._save( - im_frame, - cast(IO[bytes], fdat_chunks), - [ImageFile._Tile("zip", (0, 0) + im_frame.size, 0, rawmode)], - ) - seq_num = fdat_chunks.seq_num - return None - - -def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - _save(im, fp, filename, save_all=True) - - -def _save( - im: Image.Image, - fp: IO[bytes], - filename: str | bytes, - chunk: Callable[..., None] = putchunk, - save_all: bool = False, -) -> None: - # save an image to disk (called by the save method) - - if save_all: - default_image = im.encoderinfo.get( - "default_image", im.info.get("default_image") - ) - modes = set() - sizes = set() - append_images = im.encoderinfo.get("append_images", []) - for im_seq in itertools.chain([im], append_images): - for im_frame in ImageSequence.Iterator(im_seq): - modes.add(im_frame.mode) - sizes.add(im_frame.size) - for mode in ("RGBA", "RGB", "P"): - if mode in modes: - break - else: - mode = modes.pop() - size = tuple(max(frame_size[i] for frame_size in sizes) for i in range(2)) - else: - size = im.size - mode = im.mode - - outmode = mode - if mode == "P": - # - # attempt to minimize storage requirements for palette images - if "bits" in im.encoderinfo: - # number of bits specified by user - colors = min(1 << im.encoderinfo["bits"], 256) - else: - # check palette contents - if im.palette: - colors = max(min(len(im.palette.getdata()[1]) // 3, 256), 1) - else: - colors = 256 - - if colors <= 16: - if colors <= 2: - bits = 1 - elif colors <= 4: - bits = 2 - else: - bits = 4 - outmode += f";{bits}" - - # get the corresponding PNG mode - try: - rawmode, bit_depth, color_type = _OUTMODES[outmode] - except KeyError as e: - msg = f"cannot write mode {mode} as PNG" - raise OSError(msg) from e - if outmode == "I": - deprecate("Saving I mode images as PNG", 13, stacklevel=4) - - # - # write minimal PNG file - - fp.write(_MAGIC) - - chunk( - fp, - b"IHDR", - o32(size[0]), # 0: size - o32(size[1]), - bit_depth, - color_type, - b"\0", # 10: compression - b"\0", # 11: filter category - b"\0", # 12: interlace flag - ) - - chunks = [b"cHRM", b"cICP", b"gAMA", b"sBIT", b"sRGB", b"tIME"] - - icc = im.encoderinfo.get("icc_profile", im.info.get("icc_profile")) - if icc: - # ICC profile - # according to PNG spec, the iCCP chunk contains: - # Profile name 1-79 bytes (character string) - # Null separator 1 byte (null character) - # Compression method 1 byte (0) - # Compressed profile n bytes (zlib with deflate compression) - name = b"ICC Profile" - data = name + b"\0\0" + zlib.compress(icc) - chunk(fp, b"iCCP", data) - - # You must either have sRGB or iCCP. - # Disallow sRGB chunks when an iCCP-chunk has been emitted. - chunks.remove(b"sRGB") - - info = im.encoderinfo.get("pnginfo") - if info: - chunks_multiple_allowed = [b"sPLT", b"iTXt", b"tEXt", b"zTXt"] - for info_chunk in info.chunks: - cid, data = info_chunk[:2] - if cid in chunks: - chunks.remove(cid) - chunk(fp, cid, data) - elif cid in chunks_multiple_allowed: - chunk(fp, cid, data) - elif cid[1:2].islower(): - # Private chunk - after_idat = len(info_chunk) == 3 and info_chunk[2] - if not after_idat: - chunk(fp, cid, data) - - if im.mode == "P": - palette_byte_number = colors * 3 - palette_bytes = im.im.getpalette("RGB")[:palette_byte_number] - while len(palette_bytes) < palette_byte_number: - palette_bytes += b"\0" - chunk(fp, b"PLTE", palette_bytes) - - transparency = im.encoderinfo.get("transparency", im.info.get("transparency", None)) - - if transparency or transparency == 0: - if im.mode == "P": - # limit to actual palette size - alpha_bytes = colors - if isinstance(transparency, bytes): - chunk(fp, b"tRNS", transparency[:alpha_bytes]) - else: - transparency = max(0, min(255, transparency)) - alpha = b"\xff" * transparency + b"\0" - chunk(fp, b"tRNS", alpha[:alpha_bytes]) - elif im.mode in ("1", "L", "I", "I;16"): - transparency = max(0, min(65535, transparency)) - chunk(fp, b"tRNS", o16(transparency)) - elif im.mode == "RGB": - red, green, blue = transparency - chunk(fp, b"tRNS", o16(red) + o16(green) + o16(blue)) - else: - if "transparency" in im.encoderinfo: - # don't bother with transparency if it's an RGBA - # and it's in the info dict. It's probably just stale. - msg = "cannot use transparency for this mode" - raise OSError(msg) - else: - if im.mode == "P" and im.im.getpalettemode() == "RGBA": - alpha = im.im.getpalette("RGBA", "A") - alpha_bytes = colors - chunk(fp, b"tRNS", alpha[:alpha_bytes]) - - dpi = im.encoderinfo.get("dpi") - if dpi: - chunk( - fp, - b"pHYs", - o32(int(dpi[0] / 0.0254 + 0.5)), - o32(int(dpi[1] / 0.0254 + 0.5)), - b"\x01", - ) - - if info: - chunks = [b"bKGD", b"hIST"] - for info_chunk in info.chunks: - cid, data = info_chunk[:2] - if cid in chunks: - chunks.remove(cid) - chunk(fp, cid, data) - - exif = im.encoderinfo.get("exif") - if exif: - if isinstance(exif, Image.Exif): - exif = exif.tobytes(8) - if exif.startswith(b"Exif\x00\x00"): - exif = exif[6:] - chunk(fp, b"eXIf", exif) - - single_im: Image.Image | None = im - if save_all: - single_im = _write_multiple_frames( - im, fp, chunk, mode, rawmode, default_image, append_images - ) - if single_im: - _apply_encoderinfo(single_im, im.encoderinfo) - ImageFile._save( - single_im, - cast(IO[bytes], _idat(fp, chunk)), - [ImageFile._Tile("zip", (0, 0) + single_im.size, 0, rawmode)], - ) - - if info: - for info_chunk in info.chunks: - cid, data = info_chunk[:2] - if cid[1:2].islower(): - # Private chunk - after_idat = len(info_chunk) == 3 and info_chunk[2] - if after_idat: - chunk(fp, cid, data) - - chunk(fp, b"IEND", b"") - - if hasattr(fp, "flush"): - fp.flush() - - -# -------------------------------------------------------------------- -# PNG chunk converter - - -def getchunks(im: Image.Image, **params: Any) -> list[tuple[bytes, bytes, bytes]]: - """Return a list of PNG chunks representing this image.""" - from io import BytesIO - - chunks = [] - - def append(fp: IO[bytes], cid: bytes, *data: bytes) -> None: - byte_data = b"".join(data) - crc = o32(_crc32(byte_data, _crc32(cid))) - chunks.append((cid, byte_data, crc)) - - fp = BytesIO() - - try: - im.encoderinfo = params - _save(im, fp, "", append) - finally: - del im.encoderinfo - - return chunks - - -# -------------------------------------------------------------------- -# Registry - -Image.register_open(PngImageFile.format, PngImageFile, _accept) -Image.register_save(PngImageFile.format, _save) -Image.register_save_all(PngImageFile.format, _save_all) - -Image.register_extensions(PngImageFile.format, [".png", ".apng"]) - -Image.register_mime(PngImageFile.format, "image/png") diff --git a/voxvera/vendor/PIL/PpmImagePlugin.py b/voxvera/vendor/PIL/PpmImagePlugin.py deleted file mode 100644 index 307bc97..0000000 --- a/voxvera/vendor/PIL/PpmImagePlugin.py +++ /dev/null @@ -1,375 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# PPM support for PIL -# -# History: -# 96-03-24 fl Created -# 98-03-06 fl Write RGBA images (as RGB, that is) -# -# Copyright (c) Secret Labs AB 1997-98. -# Copyright (c) Fredrik Lundh 1996. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import math -from typing import IO - -from . import Image, ImageFile -from ._binary import i16be as i16 -from ._binary import o8 -from ._binary import o32le as o32 - -# -# -------------------------------------------------------------------- - -b_whitespace = b"\x20\x09\x0a\x0b\x0c\x0d" - -MODES = { - # standard - b"P1": "1", - b"P2": "L", - b"P3": "RGB", - b"P4": "1", - b"P5": "L", - b"P6": "RGB", - # extensions - b"P0CMYK": "CMYK", - b"Pf": "F", - # PIL extensions (for test purposes only) - b"PyP": "P", - b"PyRGBA": "RGBA", - b"PyCMYK": "CMYK", -} - - -def _accept(prefix: bytes) -> bool: - return len(prefix) >= 2 and prefix.startswith(b"P") and prefix[1] in b"0123456fy" - - -## -# Image plugin for PBM, PGM, and PPM images. - - -class PpmImageFile(ImageFile.ImageFile): - format = "PPM" - format_description = "Pbmplus image" - - def _read_magic(self) -> bytes: - assert self.fp is not None - - magic = b"" - # read until whitespace or longest available magic number - for _ in range(6): - c = self.fp.read(1) - if not c or c in b_whitespace: - break - magic += c - return magic - - def _read_token(self) -> bytes: - assert self.fp is not None - - token = b"" - while len(token) <= 10: # read until next whitespace or limit of 10 characters - c = self.fp.read(1) - if not c: - break - elif c in b_whitespace: # token ended - if not token: - # skip whitespace at start - continue - break - elif c == b"#": - # ignores rest of the line; stops at CR, LF or EOF - while self.fp.read(1) not in b"\r\n": - pass - continue - token += c - if not token: - # Token was not even 1 byte - msg = "Reached EOF while reading header" - raise ValueError(msg) - elif len(token) > 10: - msg_too_long = b"Token too long in file header: %s" % token - raise ValueError(msg_too_long) - return token - - def _open(self) -> None: - assert self.fp is not None - - magic_number = self._read_magic() - try: - mode = MODES[magic_number] - except KeyError: - msg = "not a PPM file" - raise SyntaxError(msg) - self._mode = mode - - if magic_number in (b"P1", b"P4"): - self.custom_mimetype = "image/x-portable-bitmap" - elif magic_number in (b"P2", b"P5"): - self.custom_mimetype = "image/x-portable-graymap" - elif magic_number in (b"P3", b"P6"): - self.custom_mimetype = "image/x-portable-pixmap" - - self._size = int(self._read_token()), int(self._read_token()) - - decoder_name = "raw" - if magic_number in (b"P1", b"P2", b"P3"): - decoder_name = "ppm_plain" - - args: str | tuple[str | int, ...] - if mode == "1": - args = "1;I" - elif mode == "F": - scale = float(self._read_token()) - if scale == 0.0 or not math.isfinite(scale): - msg = "scale must be finite and non-zero" - raise ValueError(msg) - self.info["scale"] = abs(scale) - - rawmode = "F;32F" if scale < 0 else "F;32BF" - args = (rawmode, 0, -1) - else: - maxval = int(self._read_token()) - if not 0 < maxval < 65536: - msg = "maxval must be greater than 0 and less than 65536" - raise ValueError(msg) - if maxval > 255 and mode == "L": - self._mode = "I" - - rawmode = mode - if decoder_name != "ppm_plain": - # If maxval matches a bit depth, use the raw decoder directly - if maxval == 65535 and mode == "L": - rawmode = "I;16B" - elif maxval != 255: - decoder_name = "ppm" - - args = rawmode if decoder_name == "raw" else (rawmode, maxval) - self.tile = [ - ImageFile._Tile(decoder_name, (0, 0) + self.size, self.fp.tell(), args) - ] - - -# -# -------------------------------------------------------------------- - - -class PpmPlainDecoder(ImageFile.PyDecoder): - _pulls_fd = True - _comment_spans: bool - - def _read_block(self) -> bytes: - assert self.fd is not None - - return self.fd.read(ImageFile.SAFEBLOCK) - - def _find_comment_end(self, block: bytes, start: int = 0) -> int: - a = block.find(b"\n", start) - b = block.find(b"\r", start) - return min(a, b) if a * b > 0 else max(a, b) # lowest nonnegative index (or -1) - - def _ignore_comments(self, block: bytes) -> bytes: - if self._comment_spans: - # Finish current comment - while block: - comment_end = self._find_comment_end(block) - if comment_end != -1: - # Comment ends in this block - # Delete tail of comment - block = block[comment_end + 1 :] - break - else: - # Comment spans whole block - # So read the next block, looking for the end - block = self._read_block() - - # Search for any further comments - self._comment_spans = False - while True: - comment_start = block.find(b"#") - if comment_start == -1: - # No comment found - break - comment_end = self._find_comment_end(block, comment_start) - if comment_end != -1: - # Comment ends in this block - # Delete comment - block = block[:comment_start] + block[comment_end + 1 :] - else: - # Comment continues to next block(s) - block = block[:comment_start] - self._comment_spans = True - break - return block - - def _decode_bitonal(self) -> bytearray: - """ - This is a separate method because in the plain PBM format, all data tokens are - exactly one byte, so the inter-token whitespace is optional. - """ - data = bytearray() - total_bytes = self.state.xsize * self.state.ysize - - while len(data) != total_bytes: - block = self._read_block() # read next block - if not block: - # eof - break - - block = self._ignore_comments(block) - - tokens = b"".join(block.split()) - for token in tokens: - if token not in (48, 49): - msg = b"Invalid token for this mode: %s" % bytes([token]) - raise ValueError(msg) - data = (data + tokens)[:total_bytes] - invert = bytes.maketrans(b"01", b"\xff\x00") - return data.translate(invert) - - def _decode_blocks(self, maxval: int) -> bytearray: - data = bytearray() - max_len = 10 - out_byte_count = 4 if self.mode == "I" else 1 - out_max = 65535 if self.mode == "I" else 255 - bands = Image.getmodebands(self.mode) - total_bytes = self.state.xsize * self.state.ysize * bands * out_byte_count - - half_token = b"" - while len(data) != total_bytes: - block = self._read_block() # read next block - if not block: - if half_token: - block = bytearray(b" ") # flush half_token - else: - # eof - break - - block = self._ignore_comments(block) - - if half_token: - block = half_token + block # stitch half_token to new block - half_token = b"" - - tokens = block.split() - - if block and not block[-1:].isspace(): # block might split token - half_token = tokens.pop() # save half token for later - if len(half_token) > max_len: # prevent buildup of half_token - msg = ( - b"Token too long found in data: %s" % half_token[: max_len + 1] - ) - raise ValueError(msg) - - for token in tokens: - if len(token) > max_len: - msg = b"Token too long found in data: %s" % token[: max_len + 1] - raise ValueError(msg) - value = int(token) - if value < 0: - msg_str = f"Channel value is negative: {value}" - raise ValueError(msg_str) - if value > maxval: - msg_str = f"Channel value too large for this mode: {value}" - raise ValueError(msg_str) - value = round(value / maxval * out_max) - data += o32(value) if self.mode == "I" else o8(value) - if len(data) == total_bytes: # finished! - break - return data - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - self._comment_spans = False - if self.mode == "1": - data = self._decode_bitonal() - rawmode = "1;8" - else: - maxval = self.args[-1] - data = self._decode_blocks(maxval) - rawmode = "I;32" if self.mode == "I" else self.mode - self.set_as_raw(bytes(data), rawmode) - return -1, 0 - - -class PpmDecoder(ImageFile.PyDecoder): - _pulls_fd = True - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - assert self.fd is not None - - data = bytearray() - maxval = self.args[-1] - in_byte_count = 1 if maxval < 256 else 2 - out_byte_count = 4 if self.mode == "I" else 1 - out_max = 65535 if self.mode == "I" else 255 - bands = Image.getmodebands(self.mode) - dest_length = self.state.xsize * self.state.ysize * bands * out_byte_count - while len(data) < dest_length: - pixels = self.fd.read(in_byte_count * bands) - if len(pixels) < in_byte_count * bands: - # eof - break - for b in range(bands): - value = ( - pixels[b] if in_byte_count == 1 else i16(pixels, b * in_byte_count) - ) - value = min(out_max, round(value / maxval * out_max)) - data += o32(value) if self.mode == "I" else o8(value) - rawmode = "I;32" if self.mode == "I" else self.mode - self.set_as_raw(bytes(data), rawmode) - return -1, 0 - - -# -# -------------------------------------------------------------------- - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.mode == "1": - rawmode, head = "1;I", b"P4" - elif im.mode == "L": - rawmode, head = "L", b"P5" - elif im.mode in ("I", "I;16"): - rawmode, head = "I;16B", b"P5" - elif im.mode in ("RGB", "RGBA"): - rawmode, head = "RGB", b"P6" - elif im.mode == "F": - rawmode, head = "F;32F", b"Pf" - else: - msg = f"cannot write mode {im.mode} as PPM" - raise OSError(msg) - fp.write(head + b"\n%d %d\n" % im.size) - if head == b"P6": - fp.write(b"255\n") - elif head == b"P5": - if rawmode == "L": - fp.write(b"255\n") - else: - fp.write(b"65535\n") - elif head == b"Pf": - fp.write(b"-1.0\n") - row_order = -1 if im.mode == "F" else 1 - ImageFile._save( - im, fp, [ImageFile._Tile("raw", (0, 0) + im.size, 0, (rawmode, 0, row_order))] - ) - - -# -# -------------------------------------------------------------------- - - -Image.register_open(PpmImageFile.format, PpmImageFile, _accept) -Image.register_save(PpmImageFile.format, _save) - -Image.register_decoder("ppm", PpmDecoder) -Image.register_decoder("ppm_plain", PpmPlainDecoder) - -Image.register_extensions(PpmImageFile.format, [".pbm", ".pgm", ".ppm", ".pnm", ".pfm"]) - -Image.register_mime(PpmImageFile.format, "image/x-portable-anymap") diff --git a/voxvera/vendor/PIL/PsdImagePlugin.py b/voxvera/vendor/PIL/PsdImagePlugin.py deleted file mode 100644 index 69a8703..0000000 --- a/voxvera/vendor/PIL/PsdImagePlugin.py +++ /dev/null @@ -1,334 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# Adobe PSD 2.5/3.0 file handling -# -# History: -# 1995-09-01 fl Created -# 1997-01-03 fl Read most PSD images -# 1997-01-18 fl Fixed P and CMYK support -# 2001-10-21 fl Added seek/tell support (for layers) -# -# Copyright (c) 1997-2001 by Secret Labs AB. -# Copyright (c) 1995-2001 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io -from functools import cached_property -from typing import IO - -from . import Image, ImageFile, ImagePalette -from ._binary import i8 -from ._binary import i16be as i16 -from ._binary import i32be as i32 -from ._binary import si16be as si16 -from ._binary import si32be as si32 -from ._util import DeferredError - -MODES = { - # (photoshop mode, bits) -> (pil mode, required channels) - (0, 1): ("1", 1), - (0, 8): ("L", 1), - (1, 8): ("L", 1), - (2, 8): ("P", 1), - (3, 8): ("RGB", 3), - (4, 8): ("CMYK", 4), - (7, 8): ("L", 1), # FIXME: multilayer - (8, 8): ("L", 1), # duotone - (9, 8): ("LAB", 3), -} - - -# --------------------------------------------------------------------. -# read PSD images - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"8BPS") - - -## -# Image plugin for Photoshop images. - - -class PsdImageFile(ImageFile.ImageFile): - format = "PSD" - format_description = "Adobe Photoshop" - _close_exclusive_fp_after_loading = False - - def _open(self) -> None: - assert self.fp is not None - read = self.fp.read - - # - # header - - s = read(26) - if not _accept(s) or i16(s, 4) != 1: - msg = "not a PSD file" - raise SyntaxError(msg) - - psd_bits = i16(s, 22) - psd_channels = i16(s, 12) - psd_mode = i16(s, 24) - - mode, channels = MODES[(psd_mode, psd_bits)] - - if channels > psd_channels: - msg = "not enough channels" - raise OSError(msg) - if mode == "RGB" and psd_channels == 4: - mode = "RGBA" - channels = 4 - - self._mode = mode - self._size = i32(s, 18), i32(s, 14) - - # - # color mode data - - size = i32(read(4)) - if size: - data = read(size) - if mode == "P" and size == 768: - self.palette = ImagePalette.raw("RGB;L", data) - - # - # image resources - - self.resources = [] - - size = i32(read(4)) - if size: - # load resources - end = self.fp.tell() + size - while self.fp.tell() < end: - read(4) # signature - id = i16(read(2)) - name = read(i8(read(1))) - if not (len(name) & 1): - read(1) # padding - data = read(i32(read(4))) - if len(data) & 1: - read(1) # padding - self.resources.append((id, name, data)) - if id == 1039: # ICC profile - self.info["icc_profile"] = data - - # - # layer and mask information - - self._layers_position = None - - size = i32(read(4)) - if size: - end = self.fp.tell() + size - size = i32(read(4)) - if size: - self._layers_position = self.fp.tell() - self._layers_size = size - self.fp.seek(end) - self._n_frames: int | None = None - - # - # image descriptor - - self.tile = _maketile(self.fp, mode, (0, 0) + self.size, channels) - - # keep the file open - self._fp = self.fp - self.frame = 1 - self._min_frame = 1 - - @cached_property - def layers( - self, - ) -> list[tuple[str, str, tuple[int, int, int, int], list[ImageFile._Tile]]]: - layers = [] - if self._layers_position is not None: - if isinstance(self._fp, DeferredError): - raise self._fp.ex - self._fp.seek(self._layers_position) - _layer_data = io.BytesIO(ImageFile._safe_read(self._fp, self._layers_size)) - layers = _layerinfo(_layer_data, self._layers_size) - self._n_frames = len(layers) - return layers - - @property - def n_frames(self) -> int: - if self._n_frames is None: - self._n_frames = len(self.layers) - return self._n_frames - - @property - def is_animated(self) -> bool: - return len(self.layers) > 1 - - def seek(self, layer: int) -> None: - if not self._seek_check(layer): - return - if isinstance(self._fp, DeferredError): - raise self._fp.ex - - # seek to given layer (1..max) - _, mode, _, tile = self.layers[layer - 1] - self._mode = mode - self.tile = tile - self.frame = layer - self.fp = self._fp - - def tell(self) -> int: - # return layer number (0=image, 1..max=layers) - return self.frame - - -def _layerinfo( - fp: IO[bytes], ct_bytes: int -) -> list[tuple[str, str, tuple[int, int, int, int], list[ImageFile._Tile]]]: - # read layerinfo block - layers = [] - - def read(size: int) -> bytes: - return ImageFile._safe_read(fp, size) - - ct = si16(read(2)) - - # sanity check - if ct_bytes < (abs(ct) * 20): - msg = "Layer block too short for number of layers requested" - raise SyntaxError(msg) - - for _ in range(abs(ct)): - # bounding box - y0 = si32(read(4)) - x0 = si32(read(4)) - y1 = si32(read(4)) - x1 = si32(read(4)) - - # image info - bands = [] - ct_types = i16(read(2)) - if ct_types > 4: - fp.seek(ct_types * 6 + 12, io.SEEK_CUR) - size = i32(read(4)) - fp.seek(size, io.SEEK_CUR) - continue - - for _ in range(ct_types): - type = i16(read(2)) - - if type == 65535: - b = "A" - else: - b = "RGBA"[type] - - bands.append(b) - read(4) # size - - # figure out the image mode - bands.sort() - if bands == ["R"]: - mode = "L" - elif bands == ["B", "G", "R"]: - mode = "RGB" - elif bands == ["A", "B", "G", "R"]: - mode = "RGBA" - else: - mode = "" # unknown - - # skip over blend flags and extra information - read(12) # filler - name = "" - size = i32(read(4)) # length of the extra data field - if size: - data_end = fp.tell() + size - - length = i32(read(4)) - if length: - fp.seek(length - 16, io.SEEK_CUR) - - length = i32(read(4)) - if length: - fp.seek(length, io.SEEK_CUR) - - length = i8(read(1)) - if length: - # Don't know the proper encoding, - # Latin-1 should be a good guess - name = read(length).decode("latin-1", "replace") - - fp.seek(data_end) - layers.append((name, mode, (x0, y0, x1, y1))) - - # get tiles - layerinfo = [] - for i, (name, mode, bbox) in enumerate(layers): - tile = [] - for m in mode: - t = _maketile(fp, m, bbox, 1) - if t: - tile.extend(t) - layerinfo.append((name, mode, bbox, tile)) - - return layerinfo - - -def _maketile( - file: IO[bytes], mode: str, bbox: tuple[int, int, int, int], channels: int -) -> list[ImageFile._Tile]: - tiles = [] - read = file.read - - compression = i16(read(2)) - - xsize = bbox[2] - bbox[0] - ysize = bbox[3] - bbox[1] - - offset = file.tell() - - if compression == 0: - # - # raw compression - for channel in range(channels): - layer = mode[channel] - if mode == "CMYK": - layer += ";I" - tiles.append(ImageFile._Tile("raw", bbox, offset, layer)) - offset = offset + xsize * ysize - - elif compression == 1: - # - # packbits compression - i = 0 - bytecount = read(channels * ysize * 2) - offset = file.tell() - for channel in range(channels): - layer = mode[channel] - if mode == "CMYK": - layer += ";I" - tiles.append(ImageFile._Tile("packbits", bbox, offset, layer)) - for y in range(ysize): - offset = offset + i16(bytecount, i) - i += 2 - - file.seek(offset) - - if offset & 1: - read(1) # padding - - return tiles - - -# -------------------------------------------------------------------- -# registry - - -Image.register_open(PsdImageFile.format, PsdImageFile, _accept) - -Image.register_extension(PsdImageFile.format, ".psd") - -Image.register_mime(PsdImageFile.format, "image/vnd.adobe.photoshop") diff --git a/voxvera/vendor/PIL/QoiImagePlugin.py b/voxvera/vendor/PIL/QoiImagePlugin.py deleted file mode 100644 index d0709b1..0000000 --- a/voxvera/vendor/PIL/QoiImagePlugin.py +++ /dev/null @@ -1,235 +0,0 @@ -# -# The Python Imaging Library. -# -# QOI support for PIL -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os -from typing import IO - -from . import Image, ImageFile -from ._binary import i32be as i32 -from ._binary import o8 -from ._binary import o32be as o32 - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"qoif") - - -class QoiImageFile(ImageFile.ImageFile): - format = "QOI" - format_description = "Quite OK Image" - - def _open(self) -> None: - assert self.fp is not None - if not _accept(self.fp.read(4)): - msg = "not a QOI file" - raise SyntaxError(msg) - - self._size = i32(self.fp.read(4)), i32(self.fp.read(4)) - - channels = self.fp.read(1)[0] - self._mode = "RGB" if channels == 3 else "RGBA" - - self.fp.seek(1, os.SEEK_CUR) # colorspace - self.tile = [ImageFile._Tile("qoi", (0, 0) + self._size, self.fp.tell())] - - -class QoiDecoder(ImageFile.PyDecoder): - _pulls_fd = True - _previous_pixel: bytes | bytearray | None = None - _previously_seen_pixels: dict[int, bytes | bytearray] = {} - - def _add_to_previous_pixels(self, value: bytes | bytearray) -> None: - self._previous_pixel = value - - r, g, b, a = value - hash_value = (r * 3 + g * 5 + b * 7 + a * 11) % 64 - self._previously_seen_pixels[hash_value] = value - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - assert self.fd is not None - - self._previously_seen_pixels = {} - self._previous_pixel = bytearray((0, 0, 0, 255)) - - data = bytearray() - bands = Image.getmodebands(self.mode) - dest_length = self.state.xsize * self.state.ysize * bands - while len(data) < dest_length: - byte = self.fd.read(1)[0] - value: bytes | bytearray - if byte == 0b11111110 and self._previous_pixel: # QOI_OP_RGB - value = bytearray(self.fd.read(3)) + self._previous_pixel[3:] - elif byte == 0b11111111: # QOI_OP_RGBA - value = self.fd.read(4) - else: - op = byte >> 6 - if op == 0: # QOI_OP_INDEX - op_index = byte & 0b00111111 - value = self._previously_seen_pixels.get( - op_index, bytearray((0, 0, 0, 0)) - ) - elif op == 1 and self._previous_pixel: # QOI_OP_DIFF - value = bytearray( - ( - (self._previous_pixel[0] + ((byte & 0b00110000) >> 4) - 2) - % 256, - (self._previous_pixel[1] + ((byte & 0b00001100) >> 2) - 2) - % 256, - (self._previous_pixel[2] + (byte & 0b00000011) - 2) % 256, - self._previous_pixel[3], - ) - ) - elif op == 2 and self._previous_pixel: # QOI_OP_LUMA - second_byte = self.fd.read(1)[0] - diff_green = (byte & 0b00111111) - 32 - diff_red = ((second_byte & 0b11110000) >> 4) - 8 - diff_blue = (second_byte & 0b00001111) - 8 - - value = bytearray( - tuple( - (self._previous_pixel[i] + diff_green + diff) % 256 - for i, diff in enumerate((diff_red, 0, diff_blue)) - ) - ) - value += self._previous_pixel[3:] - elif op == 3 and self._previous_pixel: # QOI_OP_RUN - run_length = (byte & 0b00111111) + 1 - value = self._previous_pixel - if bands == 3: - value = value[:3] - data += value * run_length - continue - self._add_to_previous_pixels(value) - - if bands == 3: - value = value[:3] - data += value - self.set_as_raw(data) - return -1, 0 - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.mode == "RGB": - channels = 3 - elif im.mode == "RGBA": - channels = 4 - else: - msg = "Unsupported QOI image mode" - raise ValueError(msg) - - colorspace = 0 if im.encoderinfo.get("colorspace") == "sRGB" else 1 - - fp.write(b"qoif") - fp.write(o32(im.size[0])) - fp.write(o32(im.size[1])) - fp.write(o8(channels)) - fp.write(o8(colorspace)) - - ImageFile._save(im, fp, [ImageFile._Tile("qoi", (0, 0) + im.size)]) - - -class QoiEncoder(ImageFile.PyEncoder): - _pushes_fd = True - _previous_pixel: tuple[int, int, int, int] | None = None - _previously_seen_pixels: dict[int, tuple[int, int, int, int]] = {} - _run = 0 - - def _write_run(self) -> bytes: - data = o8(0b11000000 | (self._run - 1)) # QOI_OP_RUN - self._run = 0 - return data - - def _delta(self, left: int, right: int) -> int: - result = (left - right) & 255 - if result >= 128: - result -= 256 - return result - - def encode(self, bufsize: int) -> tuple[int, int, bytes]: - assert self.im is not None - - self._previously_seen_pixels = {0: (0, 0, 0, 0)} - self._previous_pixel = (0, 0, 0, 255) - - data = bytearray() - w, h = self.im.size - bands = Image.getmodebands(self.mode) - - for y in range(h): - for x in range(w): - pixel = self.im.getpixel((x, y)) - if bands == 3: - pixel = (*pixel, 255) - - if pixel == self._previous_pixel: - self._run += 1 - if self._run == 62: - data += self._write_run() - else: - if self._run: - data += self._write_run() - - r, g, b, a = pixel - hash_value = (r * 3 + g * 5 + b * 7 + a * 11) % 64 - if self._previously_seen_pixels.get(hash_value) == pixel: - data += o8(hash_value) # QOI_OP_INDEX - elif self._previous_pixel: - self._previously_seen_pixels[hash_value] = pixel - - prev_r, prev_g, prev_b, prev_a = self._previous_pixel - if prev_a == a: - delta_r = self._delta(r, prev_r) - delta_g = self._delta(g, prev_g) - delta_b = self._delta(b, prev_b) - - if ( - -2 <= delta_r < 2 - and -2 <= delta_g < 2 - and -2 <= delta_b < 2 - ): - data += o8( - 0b01000000 - | (delta_r + 2) << 4 - | (delta_g + 2) << 2 - | (delta_b + 2) - ) # QOI_OP_DIFF - else: - delta_gr = self._delta(delta_r, delta_g) - delta_gb = self._delta(delta_b, delta_g) - if ( - -8 <= delta_gr < 8 - and -32 <= delta_g < 32 - and -8 <= delta_gb < 8 - ): - data += o8( - 0b10000000 | (delta_g + 32) - ) # QOI_OP_LUMA - data += o8((delta_gr + 8) << 4 | (delta_gb + 8)) - else: - data += o8(0b11111110) # QOI_OP_RGB - data += bytes(pixel[:3]) - else: - data += o8(0b11111111) # QOI_OP_RGBA - data += bytes(pixel) - - self._previous_pixel = pixel - - if self._run: - data += self._write_run() - data += bytes((0, 0, 0, 0, 0, 0, 0, 1)) # padding - - return len(data), 0, data - - -Image.register_open(QoiImageFile.format, QoiImageFile, _accept) -Image.register_decoder("qoi", QoiDecoder) -Image.register_extension(QoiImageFile.format, ".qoi") - -Image.register_save(QoiImageFile.format, _save) -Image.register_encoder("qoi", QoiEncoder) diff --git a/voxvera/vendor/PIL/SgiImagePlugin.py b/voxvera/vendor/PIL/SgiImagePlugin.py deleted file mode 100644 index 8530221..0000000 --- a/voxvera/vendor/PIL/SgiImagePlugin.py +++ /dev/null @@ -1,231 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# SGI image file handling -# -# See "The SGI Image File Format (Draft version 0.97)", Paul Haeberli. -# -# -# -# History: -# 2017-22-07 mb Add RLE decompression -# 2016-16-10 mb Add save method without compression -# 1995-09-10 fl Created -# -# Copyright (c) 2016 by Mickael Bonfill. -# Copyright (c) 2008 by Karsten Hiddemann. -# Copyright (c) 1997 by Secret Labs AB. -# Copyright (c) 1995 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import os -import struct -from typing import IO - -from . import Image, ImageFile -from ._binary import i16be as i16 -from ._binary import o8 - - -def _accept(prefix: bytes) -> bool: - return len(prefix) >= 2 and i16(prefix) == 474 - - -MODES = { - (1, 1, 1): "L", - (1, 2, 1): "L", - (2, 1, 1): "L;16B", - (2, 2, 1): "L;16B", - (1, 3, 3): "RGB", - (2, 3, 3): "RGB;16B", - (1, 3, 4): "RGBA", - (2, 3, 4): "RGBA;16B", -} - - -## -# Image plugin for SGI images. -class SgiImageFile(ImageFile.ImageFile): - format = "SGI" - format_description = "SGI Image File Format" - - def _open(self) -> None: - # HEAD - assert self.fp is not None - - headlen = 512 - s = self.fp.read(headlen) - - if not _accept(s): - msg = "Not an SGI image file" - raise ValueError(msg) - - # compression : verbatim or RLE - compression = s[2] - - # bpc : 1 or 2 bytes (8bits or 16bits) - bpc = s[3] - - # dimension : 1, 2 or 3 (depending on xsize, ysize and zsize) - dimension = i16(s, 4) - - # xsize : width - xsize = i16(s, 6) - - # ysize : height - ysize = i16(s, 8) - - # zsize : channels count - zsize = i16(s, 10) - - # determine mode from bits/zsize - try: - rawmode = MODES[(bpc, dimension, zsize)] - except KeyError: - msg = "Unsupported SGI image mode" - raise ValueError(msg) - - self._size = xsize, ysize - self._mode = rawmode.split(";")[0] - if self.mode == "RGB": - self.custom_mimetype = "image/rgb" - - # orientation -1 : scanlines begins at the bottom-left corner - orientation = -1 - - # decoder info - if compression == 0: - pagesize = xsize * ysize * bpc - if bpc == 2: - self.tile = [ - ImageFile._Tile( - "SGI16", - (0, 0) + self.size, - headlen, - (self.mode, 0, orientation), - ) - ] - else: - self.tile = [] - offset = headlen - for layer in self.mode: - self.tile.append( - ImageFile._Tile( - "raw", (0, 0) + self.size, offset, (layer, 0, orientation) - ) - ) - offset += pagesize - elif compression == 1: - self.tile = [ - ImageFile._Tile( - "sgi_rle", (0, 0) + self.size, headlen, (rawmode, orientation, bpc) - ) - ] - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.mode not in {"RGB", "RGBA", "L"}: - msg = "Unsupported SGI image mode" - raise ValueError(msg) - - # Get the keyword arguments - info = im.encoderinfo - - # Byte-per-pixel precision, 1 = 8bits per pixel - bpc = info.get("bpc", 1) - - if bpc not in (1, 2): - msg = "Unsupported number of bytes per pixel" - raise ValueError(msg) - - # Flip the image, since the origin of SGI file is the bottom-left corner - orientation = -1 - # Define the file as SGI File Format - magic_number = 474 - # Run-Length Encoding Compression - Unsupported at this time - rle = 0 - - # X Dimension = width / Y Dimension = height - x, y = im.size - # Z Dimension: Number of channels - z = len(im.mode) - # Number of dimensions (x,y,z) - if im.mode == "L": - dimension = 1 if y == 1 else 2 - else: - dimension = 3 - - # Minimum Byte value - pinmin = 0 - # Maximum Byte value (255 = 8bits per pixel) - pinmax = 255 - # Image name (79 characters max, truncated below in write) - img_name = os.path.splitext(os.path.basename(filename))[0] - if isinstance(img_name, str): - img_name = img_name.encode("ascii", "ignore") - # Standard representation of pixel in the file - colormap = 0 - fp.write(struct.pack(">h", magic_number)) - fp.write(o8(rle)) - fp.write(o8(bpc)) - fp.write(struct.pack(">H", dimension)) - fp.write(struct.pack(">H", x)) - fp.write(struct.pack(">H", y)) - fp.write(struct.pack(">H", z)) - fp.write(struct.pack(">l", pinmin)) - fp.write(struct.pack(">l", pinmax)) - fp.write(struct.pack("4s", b"")) # dummy - fp.write(struct.pack("79s", img_name)) # truncates to 79 chars - fp.write(struct.pack("s", b"")) # force null byte after img_name - fp.write(struct.pack(">l", colormap)) - fp.write(struct.pack("404s", b"")) # dummy - - rawmode = "L" - if bpc == 2: - rawmode = "L;16B" - - for channel in im.split(): - fp.write(channel.tobytes("raw", rawmode, 0, orientation)) - - if hasattr(fp, "flush"): - fp.flush() - - -class SGI16Decoder(ImageFile.PyDecoder): - _pulls_fd = True - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - assert self.fd is not None - assert self.im is not None - - rawmode, stride, orientation = self.args - pagesize = self.state.xsize * self.state.ysize - zsize = len(self.mode) - self.fd.seek(512) - - for band in range(zsize): - channel = Image.new("L", (self.state.xsize, self.state.ysize)) - channel.frombytes( - self.fd.read(2 * pagesize), "raw", "L;16B", stride, orientation - ) - self.im.putband(channel.im, band) - - return -1, 0 - - -# -# registry - - -Image.register_decoder("SGI16", SGI16Decoder) -Image.register_open(SgiImageFile.format, SgiImageFile, _accept) -Image.register_save(SgiImageFile.format, _save) -Image.register_mime(SgiImageFile.format, "image/sgi") - -Image.register_extensions(SgiImageFile.format, [".bw", ".rgb", ".rgba", ".sgi"]) - -# End of file diff --git a/voxvera/vendor/PIL/SpiderImagePlugin.py b/voxvera/vendor/PIL/SpiderImagePlugin.py deleted file mode 100644 index 8662922..0000000 --- a/voxvera/vendor/PIL/SpiderImagePlugin.py +++ /dev/null @@ -1,332 +0,0 @@ -# -# The Python Imaging Library. -# -# SPIDER image file handling -# -# History: -# 2004-08-02 Created BB -# 2006-03-02 added save method -# 2006-03-13 added support for stack images -# -# Copyright (c) 2004 by Health Research Inc. (HRI) RENSSELAER, NY 12144. -# Copyright (c) 2004 by William Baxter. -# Copyright (c) 2004 by Secret Labs AB. -# Copyright (c) 2004 by Fredrik Lundh. -# - -## -# Image plugin for the Spider image format. This format is used -# by the SPIDER software, in processing image data from electron -# microscopy and tomography. -## - -# -# SpiderImagePlugin.py -# -# The Spider image format is used by SPIDER software, in processing -# image data from electron microscopy and tomography. -# -# Spider home page: -# https://spider.wadsworth.org/spider_doc/spider/docs/spider.html -# -# Details about the Spider image format: -# https://spider.wadsworth.org/spider_doc/spider/docs/image_doc.html -# -from __future__ import annotations - -import os -import struct -import sys -from typing import IO, Any, cast - -from . import Image, ImageFile -from ._util import DeferredError - -TYPE_CHECKING = False - - -def isInt(f: Any) -> int: - try: - i = int(f) - if f - i == 0: - return 1 - else: - return 0 - except (ValueError, OverflowError): - return 0 - - -iforms = [1, 3, -11, -12, -21, -22] - - -# There is no magic number to identify Spider files, so just check a -# series of header locations to see if they have reasonable values. -# Returns no. of bytes in the header, if it is a valid Spider header, -# otherwise returns 0 - - -def isSpiderHeader(t: tuple[float, ...]) -> int: - h = (99,) + t # add 1 value so can use spider header index start=1 - # header values 1,2,5,12,13,22,23 should be integers - for i in [1, 2, 5, 12, 13, 22, 23]: - if not isInt(h[i]): - return 0 - # check iform - iform = int(h[5]) - if iform not in iforms: - return 0 - # check other header values - labrec = int(h[13]) # no. records in file header - labbyt = int(h[22]) # total no. of bytes in header - lenbyt = int(h[23]) # record length in bytes - if labbyt != (labrec * lenbyt): - return 0 - # looks like a valid header - return labbyt - - -def isSpiderImage(filename: str) -> int: - with open(filename, "rb") as fp: - f = fp.read(92) # read 23 * 4 bytes - t = struct.unpack(">23f", f) # try big-endian first - hdrlen = isSpiderHeader(t) - if hdrlen == 0: - t = struct.unpack("<23f", f) # little-endian - hdrlen = isSpiderHeader(t) - return hdrlen - - -class SpiderImageFile(ImageFile.ImageFile): - format = "SPIDER" - format_description = "Spider 2D image" - _close_exclusive_fp_after_loading = False - - def _open(self) -> None: - # check header - n = 27 * 4 # read 27 float values - assert self.fp is not None - f = self.fp.read(n) - - try: - self.bigendian = 1 - t = struct.unpack(">27f", f) # try big-endian first - hdrlen = isSpiderHeader(t) - if hdrlen == 0: - self.bigendian = 0 - t = struct.unpack("<27f", f) # little-endian - hdrlen = isSpiderHeader(t) - if hdrlen == 0: - msg = "not a valid Spider file" - raise SyntaxError(msg) - except struct.error as e: - msg = "not a valid Spider file" - raise SyntaxError(msg) from e - - h = (99,) + t # add 1 value : spider header index starts at 1 - iform = int(h[5]) - if iform != 1: - msg = "not a Spider 2D image" - raise SyntaxError(msg) - - self._size = int(h[12]), int(h[2]) # size in pixels (width, height) - self.istack = int(h[24]) - self.imgnumber = int(h[27]) - - if self.istack == 0 and self.imgnumber == 0: - # stk=0, img=0: a regular 2D image - offset = hdrlen - self._nimages = 1 - elif self.istack > 0 and self.imgnumber == 0: - # stk>0, img=0: Opening the stack for the first time - self.imgbytes = int(h[12]) * int(h[2]) * 4 - self.hdrlen = hdrlen - self._nimages = int(h[26]) - # Point to the first image in the stack - offset = hdrlen * 2 - self.imgnumber = 1 - elif self.istack == 0 and self.imgnumber > 0: - # stk=0, img>0: an image within the stack - offset = hdrlen + self.stkoffset - self.istack = 2 # So Image knows it's still a stack - else: - msg = "inconsistent stack header values" - raise SyntaxError(msg) - - if self.bigendian: - self.rawmode = "F;32BF" - else: - self.rawmode = "F;32F" - self._mode = "F" - - self.tile = [ImageFile._Tile("raw", (0, 0) + self.size, offset, self.rawmode)] - self._fp = self.fp # FIXME: hack - - @property - def n_frames(self) -> int: - return self._nimages - - @property - def is_animated(self) -> bool: - return self._nimages > 1 - - # 1st image index is zero (although SPIDER imgnumber starts at 1) - def tell(self) -> int: - if self.imgnumber < 1: - return 0 - else: - return self.imgnumber - 1 - - def seek(self, frame: int) -> None: - if self.istack == 0: - msg = "attempt to seek in a non-stack file" - raise EOFError(msg) - if not self._seek_check(frame): - return - if isinstance(self._fp, DeferredError): - raise self._fp.ex - self.stkoffset = self.hdrlen + frame * (self.hdrlen + self.imgbytes) - self.fp = self._fp - self.fp.seek(self.stkoffset) - self._open() - - # returns a byte image after rescaling to 0..255 - def convert2byte(self, depth: int = 255) -> Image.Image: - extrema = self.getextrema() - assert isinstance(extrema[0], float) - minimum, maximum = cast(tuple[float, float], extrema) - m: float = 1 - if maximum != minimum: - m = depth / (maximum - minimum) - b = -m * minimum - return self.point(lambda i: i * m + b).convert("L") - - if TYPE_CHECKING: - from . import ImageTk - - # returns a ImageTk.PhotoImage object, after rescaling to 0..255 - def tkPhotoImage(self) -> ImageTk.PhotoImage: - from . import ImageTk - - return ImageTk.PhotoImage(self.convert2byte(), palette=256) - - -# -------------------------------------------------------------------- -# Image series - - -# given a list of filenames, return a list of images -def loadImageSeries(filelist: list[str] | None = None) -> list[Image.Image] | None: - """create a list of :py:class:`~PIL.Image.Image` objects for use in a montage""" - if filelist is None or len(filelist) < 1: - return None - - byte_imgs = [] - for img in filelist: - if not os.path.exists(img): - print(f"unable to find {img}") - continue - try: - with Image.open(img) as im: - assert isinstance(im, SpiderImageFile) - byte_im = im.convert2byte() - except Exception: - if not isSpiderImage(img): - print(f"{img} is not a Spider image file") - continue - byte_im.info["filename"] = img - byte_imgs.append(byte_im) - return byte_imgs - - -# -------------------------------------------------------------------- -# For saving images in Spider format - - -def makeSpiderHeader(im: Image.Image) -> list[bytes]: - nsam, nrow = im.size - lenbyt = nsam * 4 # There are labrec records in the header - labrec = int(1024 / lenbyt) - if 1024 % lenbyt != 0: - labrec += 1 - labbyt = labrec * lenbyt - nvalues = int(labbyt / 4) - if nvalues < 23: - return [] - - hdr = [0.0] * nvalues - - # NB these are Fortran indices - hdr[1] = 1.0 # nslice (=1 for an image) - hdr[2] = float(nrow) # number of rows per slice - hdr[3] = float(nrow) # number of records in the image - hdr[5] = 1.0 # iform for 2D image - hdr[12] = float(nsam) # number of pixels per line - hdr[13] = float(labrec) # number of records in file header - hdr[22] = float(labbyt) # total number of bytes in header - hdr[23] = float(lenbyt) # record length in bytes - - # adjust for Fortran indexing - hdr = hdr[1:] - hdr.append(0.0) - # pack binary data into a string - return [struct.pack("f", v) for v in hdr] - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.mode != "F": - im = im.convert("F") - - hdr = makeSpiderHeader(im) - if len(hdr) < 256: - msg = "Error creating Spider header" - raise OSError(msg) - - # write the SPIDER header - fp.writelines(hdr) - - rawmode = "F;32NF" # 32-bit native floating point - ImageFile._save(im, fp, [ImageFile._Tile("raw", (0, 0) + im.size, 0, rawmode)]) - - -def _save_spider(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - # get the filename extension and register it with Image - filename_ext = os.path.splitext(filename)[1] - ext = filename_ext.decode() if isinstance(filename_ext, bytes) else filename_ext - Image.register_extension(SpiderImageFile.format, ext) - _save(im, fp, filename) - - -# -------------------------------------------------------------------- - - -Image.register_open(SpiderImageFile.format, SpiderImageFile) -Image.register_save(SpiderImageFile.format, _save_spider) - -if __name__ == "__main__": - if len(sys.argv) < 2: - print("Syntax: python3 SpiderImagePlugin.py [infile] [outfile]") - sys.exit() - - filename = sys.argv[1] - if not isSpiderImage(filename): - print("input image must be in Spider format") - sys.exit() - - with Image.open(filename) as im: - print(f"image: {im}") - print(f"format: {im.format}") - print(f"size: {im.size}") - print(f"mode: {im.mode}") - print("max, min: ", end=" ") - print(im.getextrema()) - - if len(sys.argv) > 2: - outfile = sys.argv[2] - - # perform some image operation - transposed_im = im.transpose(Image.Transpose.FLIP_LEFT_RIGHT) - print( - f"saving a flipped version of {os.path.basename(filename)} " - f"as {outfile} " - ) - transposed_im.save(outfile, SpiderImageFile.format) diff --git a/voxvera/vendor/PIL/SunImagePlugin.py b/voxvera/vendor/PIL/SunImagePlugin.py deleted file mode 100644 index 8912379..0000000 --- a/voxvera/vendor/PIL/SunImagePlugin.py +++ /dev/null @@ -1,145 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# Sun image file handling -# -# History: -# 1995-09-10 fl Created -# 1996-05-28 fl Fixed 32-bit alignment -# 1998-12-29 fl Import ImagePalette module -# 2001-12-18 fl Fixed palette loading (from Jean-Claude Rimbault) -# -# Copyright (c) 1997-2001 by Secret Labs AB -# Copyright (c) 1995-1996 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -from . import Image, ImageFile, ImagePalette -from ._binary import i32be as i32 - - -def _accept(prefix: bytes) -> bool: - return len(prefix) >= 4 and i32(prefix) == 0x59A66A95 - - -## -# Image plugin for Sun raster files. - - -class SunImageFile(ImageFile.ImageFile): - format = "SUN" - format_description = "Sun Raster File" - - def _open(self) -> None: - # The Sun Raster file header is 32 bytes in length - # and has the following format: - - # typedef struct _SunRaster - # { - # DWORD MagicNumber; /* Magic (identification) number */ - # DWORD Width; /* Width of image in pixels */ - # DWORD Height; /* Height of image in pixels */ - # DWORD Depth; /* Number of bits per pixel */ - # DWORD Length; /* Size of image data in bytes */ - # DWORD Type; /* Type of raster file */ - # DWORD ColorMapType; /* Type of color map */ - # DWORD ColorMapLength; /* Size of the color map in bytes */ - # } SUNRASTER; - - assert self.fp is not None - - # HEAD - s = self.fp.read(32) - if not _accept(s): - msg = "not an SUN raster file" - raise SyntaxError(msg) - - offset = 32 - - self._size = i32(s, 4), i32(s, 8) - - depth = i32(s, 12) - # data_length = i32(s, 16) # unreliable, ignore. - file_type = i32(s, 20) - palette_type = i32(s, 24) # 0: None, 1: RGB, 2: Raw/arbitrary - palette_length = i32(s, 28) - - if depth == 1: - self._mode, rawmode = "1", "1;I" - elif depth == 4: - self._mode, rawmode = "L", "L;4" - elif depth == 8: - self._mode = rawmode = "L" - elif depth == 24: - if file_type == 3: - self._mode, rawmode = "RGB", "RGB" - else: - self._mode, rawmode = "RGB", "BGR" - elif depth == 32: - if file_type == 3: - self._mode, rawmode = "RGB", "RGBX" - else: - self._mode, rawmode = "RGB", "BGRX" - else: - msg = "Unsupported Mode/Bit Depth" - raise SyntaxError(msg) - - if palette_length: - if palette_length > 1024: - msg = "Unsupported Color Palette Length" - raise SyntaxError(msg) - - if palette_type != 1: - msg = "Unsupported Palette Type" - raise SyntaxError(msg) - - offset = offset + palette_length - self.palette = ImagePalette.raw("RGB;L", self.fp.read(palette_length)) - if self.mode == "L": - self._mode = "P" - rawmode = rawmode.replace("L", "P") - - # 16 bit boundaries on stride - stride = ((self.size[0] * depth + 15) // 16) * 2 - - # file type: Type is the version (or flavor) of the bitmap - # file. The following values are typically found in the Type - # field: - # 0000h Old - # 0001h Standard - # 0002h Byte-encoded - # 0003h RGB format - # 0004h TIFF format - # 0005h IFF format - # FFFFh Experimental - - # Old and standard are the same, except for the length tag. - # byte-encoded is run-length-encoded - # RGB looks similar to standard, but RGB byte order - # TIFF and IFF mean that they were converted from T/IFF - # Experimental means that it's something else. - # (https://www.fileformat.info/format/sunraster/egff.htm) - - if file_type in (0, 1, 3, 4, 5): - self.tile = [ - ImageFile._Tile("raw", (0, 0) + self.size, offset, (rawmode, stride)) - ] - elif file_type == 2: - self.tile = [ - ImageFile._Tile("sun_rle", (0, 0) + self.size, offset, rawmode) - ] - else: - msg = "Unsupported Sun Raster file type" - raise SyntaxError(msg) - - -# -# registry - - -Image.register_open(SunImageFile.format, SunImageFile, _accept) - -Image.register_extension(SunImageFile.format, ".ras") diff --git a/voxvera/vendor/PIL/TarIO.py b/voxvera/vendor/PIL/TarIO.py deleted file mode 100644 index 86490a4..0000000 --- a/voxvera/vendor/PIL/TarIO.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# read files from within a tar file -# -# History: -# 95-06-18 fl Created -# 96-05-28 fl Open files in binary mode -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1995-96. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io - -from . import ContainerIO - - -class TarIO(ContainerIO.ContainerIO[bytes]): - """A file object that provides read access to a given member of a TAR file.""" - - def __init__(self, tarfile: str, file: str) -> None: - """ - Create file object. - - :param tarfile: Name of TAR file. - :param file: Name of member file. - """ - self.fh = open(tarfile, "rb") - - while True: - s = self.fh.read(512) - if len(s) != 512: - self.fh.close() - - msg = "unexpected end of tar file" - raise OSError(msg) - - name = s[:100].decode("utf-8") - i = name.find("\0") - if i == 0: - self.fh.close() - - msg = "cannot find subfile" - raise OSError(msg) - if i > 0: - name = name[:i] - - size = int(s[124:135], 8) - - if file == name: - break - - self.fh.seek((size + 511) & (~511), io.SEEK_CUR) - - # Open region - super().__init__(self.fh, self.fh.tell(), size) diff --git a/voxvera/vendor/PIL/TgaImagePlugin.py b/voxvera/vendor/PIL/TgaImagePlugin.py deleted file mode 100644 index 90d5b5c..0000000 --- a/voxvera/vendor/PIL/TgaImagePlugin.py +++ /dev/null @@ -1,264 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# TGA file handling -# -# History: -# 95-09-01 fl created (reads 24-bit files only) -# 97-01-04 fl support more TGA versions, including compressed images -# 98-07-04 fl fixed orientation and alpha layer bugs -# 98-09-11 fl fixed orientation for runlength decoder -# -# Copyright (c) Secret Labs AB 1997-98. -# Copyright (c) Fredrik Lundh 1995-97. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import warnings -from typing import IO - -from . import Image, ImageFile, ImagePalette -from ._binary import i16le as i16 -from ._binary import o8 -from ._binary import o16le as o16 - -# -# -------------------------------------------------------------------- -# Read RGA file - - -MODES = { - # map imagetype/depth to rawmode - (1, 8): "P", - (3, 1): "1", - (3, 8): "L", - (3, 16): "LA", - (2, 16): "BGRA;15Z", - (2, 24): "BGR", - (2, 32): "BGRA", -} - - -## -# Image plugin for Targa files. - - -class TgaImageFile(ImageFile.ImageFile): - format = "TGA" - format_description = "Targa" - - def _open(self) -> None: - # process header - assert self.fp is not None - - s = self.fp.read(18) - - id_len = s[0] - - colormaptype = s[1] - imagetype = s[2] - - depth = s[16] - - flags = s[17] - - self._size = i16(s, 12), i16(s, 14) - - # validate header fields - if ( - colormaptype not in (0, 1) - or self.size[0] <= 0 - or self.size[1] <= 0 - or depth not in (1, 8, 16, 24, 32) - ): - msg = "not a TGA file" - raise SyntaxError(msg) - - # image mode - if imagetype in (3, 11): - self._mode = "L" - if depth == 1: - self._mode = "1" # ??? - elif depth == 16: - self._mode = "LA" - elif imagetype in (1, 9): - self._mode = "P" if colormaptype else "L" - elif imagetype in (2, 10): - self._mode = "RGB" if depth == 24 else "RGBA" - else: - msg = "unknown TGA mode" - raise SyntaxError(msg) - - # orientation - orientation = flags & 0x30 - self._flip_horizontally = orientation in [0x10, 0x30] - if orientation in [0x20, 0x30]: - orientation = 1 - elif orientation in [0, 0x10]: - orientation = -1 - else: - msg = "unknown TGA orientation" - raise SyntaxError(msg) - - self.info["orientation"] = orientation - - if imagetype & 8: - self.info["compression"] = "tga_rle" - - if id_len: - self.info["id_section"] = self.fp.read(id_len) - - if colormaptype: - # read palette - start, size, mapdepth = i16(s, 3), i16(s, 5), s[7] - if mapdepth == 16: - self.palette = ImagePalette.raw( - "BGRA;15Z", bytes(2 * start) + self.fp.read(2 * size) - ) - self.palette.mode = "RGBA" - elif mapdepth == 24: - self.palette = ImagePalette.raw( - "BGR", bytes(3 * start) + self.fp.read(3 * size) - ) - elif mapdepth == 32: - self.palette = ImagePalette.raw( - "BGRA", bytes(4 * start) + self.fp.read(4 * size) - ) - else: - msg = "unknown TGA map depth" - raise SyntaxError(msg) - - # setup tile descriptor - try: - rawmode = MODES[(imagetype & 7, depth)] - if imagetype & 8: - # compressed - self.tile = [ - ImageFile._Tile( - "tga_rle", - (0, 0) + self.size, - self.fp.tell(), - (rawmode, orientation, depth), - ) - ] - else: - self.tile = [ - ImageFile._Tile( - "raw", - (0, 0) + self.size, - self.fp.tell(), - (rawmode, 0, orientation), - ) - ] - except KeyError: - pass # cannot decode - - def load_end(self) -> None: - if self._flip_horizontally: - self.im = self.im.transpose(Image.Transpose.FLIP_LEFT_RIGHT) - - -# -# -------------------------------------------------------------------- -# Write TGA file - - -SAVE = { - "1": ("1", 1, 0, 3), - "L": ("L", 8, 0, 3), - "LA": ("LA", 16, 0, 3), - "P": ("P", 8, 1, 1), - "RGB": ("BGR", 24, 0, 2), - "RGBA": ("BGRA", 32, 0, 2), -} - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - try: - rawmode, bits, colormaptype, imagetype = SAVE[im.mode] - except KeyError as e: - msg = f"cannot write mode {im.mode} as TGA" - raise OSError(msg) from e - - if "rle" in im.encoderinfo: - rle = im.encoderinfo["rle"] - else: - compression = im.encoderinfo.get("compression", im.info.get("compression")) - rle = compression == "tga_rle" - if rle: - imagetype += 8 - - id_section = im.encoderinfo.get("id_section", im.info.get("id_section", "")) - id_len = len(id_section) - if id_len > 255: - id_len = 255 - id_section = id_section[:255] - warnings.warn("id_section has been trimmed to 255 characters") - - if colormaptype: - palette = im.im.getpalette("RGB", "BGR") - colormaplength, colormapentry = len(palette) // 3, 24 - else: - colormaplength, colormapentry = 0, 0 - - if im.mode in ("LA", "RGBA"): - flags = 8 - else: - flags = 0 - - orientation = im.encoderinfo.get("orientation", im.info.get("orientation", -1)) - if orientation > 0: - flags = flags | 0x20 - - fp.write( - o8(id_len) - + o8(colormaptype) - + o8(imagetype) - + o16(0) # colormapfirst - + o16(colormaplength) - + o8(colormapentry) - + o16(0) - + o16(0) - + o16(im.size[0]) - + o16(im.size[1]) - + o8(bits) - + o8(flags) - ) - - if id_section: - fp.write(id_section) - - if colormaptype: - fp.write(palette) - - if rle: - ImageFile._save( - im, - fp, - [ImageFile._Tile("tga_rle", (0, 0) + im.size, 0, (rawmode, orientation))], - ) - else: - ImageFile._save( - im, - fp, - [ImageFile._Tile("raw", (0, 0) + im.size, 0, (rawmode, 0, orientation))], - ) - - # write targa version 2 footer - fp.write(b"\000" * 8 + b"TRUEVISION-XFILE." + b"\000") - - -# -# -------------------------------------------------------------------- -# Registry - - -Image.register_open(TgaImageFile.format, TgaImageFile) -Image.register_save(TgaImageFile.format, _save) - -Image.register_extensions(TgaImageFile.format, [".tga", ".icb", ".vda", ".vst"]) - -Image.register_mime(TgaImageFile.format, "image/x-tga") diff --git a/voxvera/vendor/PIL/TiffImagePlugin.py b/voxvera/vendor/PIL/TiffImagePlugin.py deleted file mode 100644 index de2ce06..0000000 --- a/voxvera/vendor/PIL/TiffImagePlugin.py +++ /dev/null @@ -1,2338 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# TIFF file handling -# -# TIFF is a flexible, if somewhat aged, image file format originally -# defined by Aldus. Although TIFF supports a wide variety of pixel -# layouts and compression methods, the name doesn't really stand for -# "thousands of incompatible file formats," it just feels that way. -# -# To read TIFF data from a stream, the stream must be seekable. For -# progressive decoding, make sure to use TIFF files where the tag -# directory is placed first in the file. -# -# History: -# 1995-09-01 fl Created -# 1996-05-04 fl Handle JPEGTABLES tag -# 1996-05-18 fl Fixed COLORMAP support -# 1997-01-05 fl Fixed PREDICTOR support -# 1997-08-27 fl Added support for rational tags (from Perry Stoll) -# 1998-01-10 fl Fixed seek/tell (from Jan Blom) -# 1998-07-15 fl Use private names for internal variables -# 1999-06-13 fl Rewritten for PIL 1.0 (1.0) -# 2000-10-11 fl Additional fixes for Python 2.0 (1.1) -# 2001-04-17 fl Fixed rewind support (seek to frame 0) (1.2) -# 2001-05-12 fl Added write support for more tags (from Greg Couch) (1.3) -# 2001-12-18 fl Added workaround for broken Matrox library -# 2002-01-18 fl Don't mess up if photometric tag is missing (D. Alan Stewart) -# 2003-05-19 fl Check FILLORDER tag -# 2003-09-26 fl Added RGBa support -# 2004-02-24 fl Added DPI support; fixed rational write support -# 2005-02-07 fl Added workaround for broken Corel Draw 10 files -# 2006-01-09 fl Added support for float/double tags (from Russell Nelson) -# -# Copyright (c) 1997-2006 by Secret Labs AB. All rights reserved. -# Copyright (c) 1995-1997 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import io -import itertools -import logging -import math -import os -import struct -import warnings -from collections.abc import Callable, MutableMapping -from fractions import Fraction -from numbers import Number, Rational -from typing import IO, Any, cast - -from . import ExifTags, Image, ImageFile, ImageOps, ImagePalette, TiffTags -from ._binary import i16be as i16 -from ._binary import i32be as i32 -from ._binary import o8 -from ._util import DeferredError, is_path -from .TiffTags import TYPES - -TYPE_CHECKING = False -if TYPE_CHECKING: - from collections.abc import Iterator - from typing import NoReturn - - from ._typing import Buffer, IntegralLike, StrOrBytesPath - -logger = logging.getLogger(__name__) - -# Set these to true to force use of libtiff for reading or writing. -READ_LIBTIFF = False -WRITE_LIBTIFF = False -STRIP_SIZE = 65536 - -II = b"II" # little-endian (Intel style) -MM = b"MM" # big-endian (Motorola style) - -# -# -------------------------------------------------------------------- -# Read TIFF files - -# a few tag names, just to make the code below a bit more readable -OSUBFILETYPE = 255 -IMAGEWIDTH = 256 -IMAGELENGTH = 257 -BITSPERSAMPLE = 258 -COMPRESSION = 259 -PHOTOMETRIC_INTERPRETATION = 262 -FILLORDER = 266 -IMAGEDESCRIPTION = 270 -STRIPOFFSETS = 273 -SAMPLESPERPIXEL = 277 -ROWSPERSTRIP = 278 -STRIPBYTECOUNTS = 279 -X_RESOLUTION = 282 -Y_RESOLUTION = 283 -PLANAR_CONFIGURATION = 284 -RESOLUTION_UNIT = 296 -TRANSFERFUNCTION = 301 -SOFTWARE = 305 -DATE_TIME = 306 -ARTIST = 315 -PREDICTOR = 317 -COLORMAP = 320 -TILEWIDTH = 322 -TILELENGTH = 323 -TILEOFFSETS = 324 -TILEBYTECOUNTS = 325 -SUBIFD = 330 -EXTRASAMPLES = 338 -SAMPLEFORMAT = 339 -JPEGTABLES = 347 -YCBCRSUBSAMPLING = 530 -REFERENCEBLACKWHITE = 532 -COPYRIGHT = 33432 -IPTC_NAA_CHUNK = 33723 # newsphoto properties -PHOTOSHOP_CHUNK = 34377 # photoshop properties -ICCPROFILE = 34675 -EXIFIFD = 34665 -XMP = 700 -JPEGQUALITY = 65537 # pseudo-tag by libtiff - -# https://github.com/imagej/ImageJA/blob/master/src/main/java/ij/io/TiffDecoder.java -IMAGEJ_META_DATA_BYTE_COUNTS = 50838 -IMAGEJ_META_DATA = 50839 - -COMPRESSION_INFO = { - # Compression => pil compression name - 1: "raw", - 2: "tiff_ccitt", - 3: "group3", - 4: "group4", - 5: "tiff_lzw", - 6: "tiff_jpeg", # obsolete - 7: "jpeg", - 8: "tiff_adobe_deflate", - 32771: "tiff_raw_16", # 16-bit padding - 32773: "packbits", - 32809: "tiff_thunderscan", - 32946: "tiff_deflate", - 34676: "tiff_sgilog", - 34677: "tiff_sgilog24", - 34925: "lzma", - 50000: "zstd", - 50001: "webp", -} - -COMPRESSION_INFO_REV = {v: k for k, v in COMPRESSION_INFO.items()} - -OPEN_INFO = { - # (ByteOrder, PhotoInterpretation, SampleFormat, FillOrder, BitsPerSample, - # ExtraSamples) => mode, rawmode - (II, 0, (1,), 1, (1,), ()): ("1", "1;I"), - (MM, 0, (1,), 1, (1,), ()): ("1", "1;I"), - (II, 0, (1,), 2, (1,), ()): ("1", "1;IR"), - (MM, 0, (1,), 2, (1,), ()): ("1", "1;IR"), - (II, 1, (1,), 1, (1,), ()): ("1", "1"), - (MM, 1, (1,), 1, (1,), ()): ("1", "1"), - (II, 1, (1,), 2, (1,), ()): ("1", "1;R"), - (MM, 1, (1,), 2, (1,), ()): ("1", "1;R"), - (II, 0, (1,), 1, (2,), ()): ("L", "L;2I"), - (MM, 0, (1,), 1, (2,), ()): ("L", "L;2I"), - (II, 0, (1,), 2, (2,), ()): ("L", "L;2IR"), - (MM, 0, (1,), 2, (2,), ()): ("L", "L;2IR"), - (II, 1, (1,), 1, (2,), ()): ("L", "L;2"), - (MM, 1, (1,), 1, (2,), ()): ("L", "L;2"), - (II, 1, (1,), 2, (2,), ()): ("L", "L;2R"), - (MM, 1, (1,), 2, (2,), ()): ("L", "L;2R"), - (II, 0, (1,), 1, (4,), ()): ("L", "L;4I"), - (MM, 0, (1,), 1, (4,), ()): ("L", "L;4I"), - (II, 0, (1,), 2, (4,), ()): ("L", "L;4IR"), - (MM, 0, (1,), 2, (4,), ()): ("L", "L;4IR"), - (II, 1, (1,), 1, (4,), ()): ("L", "L;4"), - (MM, 1, (1,), 1, (4,), ()): ("L", "L;4"), - (II, 1, (1,), 2, (4,), ()): ("L", "L;4R"), - (MM, 1, (1,), 2, (4,), ()): ("L", "L;4R"), - (II, 0, (1,), 1, (8,), ()): ("L", "L;I"), - (MM, 0, (1,), 1, (8,), ()): ("L", "L;I"), - (II, 0, (1,), 2, (8,), ()): ("L", "L;IR"), - (MM, 0, (1,), 2, (8,), ()): ("L", "L;IR"), - (II, 1, (1,), 1, (8,), ()): ("L", "L"), - (MM, 1, (1,), 1, (8,), ()): ("L", "L"), - (II, 1, (2,), 1, (8,), ()): ("L", "L"), - (MM, 1, (2,), 1, (8,), ()): ("L", "L"), - (II, 1, (1,), 2, (8,), ()): ("L", "L;R"), - (MM, 1, (1,), 2, (8,), ()): ("L", "L;R"), - (II, 1, (1,), 1, (12,), ()): ("I;16", "I;12"), - (II, 0, (1,), 1, (16,), ()): ("I;16", "I;16"), - (II, 1, (1,), 1, (16,), ()): ("I;16", "I;16"), - (MM, 1, (1,), 1, (16,), ()): ("I;16B", "I;16B"), - (II, 1, (1,), 2, (16,), ()): ("I;16", "I;16R"), - (II, 1, (2,), 1, (16,), ()): ("I", "I;16S"), - (MM, 1, (2,), 1, (16,), ()): ("I", "I;16BS"), - (II, 0, (3,), 1, (32,), ()): ("F", "F;32F"), - (MM, 0, (3,), 1, (32,), ()): ("F", "F;32BF"), - (II, 1, (1,), 1, (32,), ()): ("I", "I;32N"), - (II, 1, (2,), 1, (32,), ()): ("I", "I;32S"), - (MM, 1, (2,), 1, (32,), ()): ("I", "I;32BS"), - (II, 1, (3,), 1, (32,), ()): ("F", "F;32F"), - (MM, 1, (3,), 1, (32,), ()): ("F", "F;32BF"), - (II, 1, (1,), 1, (8, 8), (2,)): ("LA", "LA"), - (MM, 1, (1,), 1, (8, 8), (2,)): ("LA", "LA"), - (II, 2, (1,), 1, (8, 8, 8), ()): ("RGB", "RGB"), - (MM, 2, (1,), 1, (8, 8, 8), ()): ("RGB", "RGB"), - (II, 2, (1,), 2, (8, 8, 8), ()): ("RGB", "RGB;R"), - (MM, 2, (1,), 2, (8, 8, 8), ()): ("RGB", "RGB;R"), - (II, 2, (1,), 1, (8, 8, 8, 8), ()): ("RGBA", "RGBA"), # missing ExtraSamples - (MM, 2, (1,), 1, (8, 8, 8, 8), ()): ("RGBA", "RGBA"), # missing ExtraSamples - (II, 2, (1,), 1, (8, 8, 8, 8), (0,)): ("RGB", "RGBX"), - (MM, 2, (1,), 1, (8, 8, 8, 8), (0,)): ("RGB", "RGBX"), - (II, 2, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGB", "RGBXX"), - (MM, 2, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGB", "RGBXX"), - (II, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGB", "RGBXXX"), - (MM, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGB", "RGBXXX"), - (II, 2, (1,), 1, (8, 8, 8, 8), (1,)): ("RGBA", "RGBa"), - (MM, 2, (1,), 1, (8, 8, 8, 8), (1,)): ("RGBA", "RGBa"), - (II, 2, (1,), 1, (8, 8, 8, 8, 8), (1, 0)): ("RGBA", "RGBaX"), - (MM, 2, (1,), 1, (8, 8, 8, 8, 8), (1, 0)): ("RGBA", "RGBaX"), - (II, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (1, 0, 0)): ("RGBA", "RGBaXX"), - (MM, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (1, 0, 0)): ("RGBA", "RGBaXX"), - (II, 2, (1,), 1, (8, 8, 8, 8), (2,)): ("RGBA", "RGBA"), - (MM, 2, (1,), 1, (8, 8, 8, 8), (2,)): ("RGBA", "RGBA"), - (II, 2, (1,), 1, (8, 8, 8, 8, 8), (2, 0)): ("RGBA", "RGBAX"), - (MM, 2, (1,), 1, (8, 8, 8, 8, 8), (2, 0)): ("RGBA", "RGBAX"), - (II, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (2, 0, 0)): ("RGBA", "RGBAXX"), - (MM, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (2, 0, 0)): ("RGBA", "RGBAXX"), - (II, 2, (1,), 1, (8, 8, 8, 8), (999,)): ("RGBA", "RGBA"), # Corel Draw 10 - (MM, 2, (1,), 1, (8, 8, 8, 8), (999,)): ("RGBA", "RGBA"), # Corel Draw 10 - (II, 2, (1,), 1, (16, 16, 16), ()): ("RGB", "RGB;16L"), - (MM, 2, (1,), 1, (16, 16, 16), ()): ("RGB", "RGB;16B"), - (II, 2, (1,), 1, (16, 16, 16, 16), ()): ("RGBA", "RGBA;16L"), - (MM, 2, (1,), 1, (16, 16, 16, 16), ()): ("RGBA", "RGBA;16B"), - (II, 2, (1,), 1, (16, 16, 16, 16), (0,)): ("RGB", "RGBX;16L"), - (MM, 2, (1,), 1, (16, 16, 16, 16), (0,)): ("RGB", "RGBX;16B"), - (II, 2, (1,), 1, (16, 16, 16, 16), (1,)): ("RGBA", "RGBa;16L"), - (MM, 2, (1,), 1, (16, 16, 16, 16), (1,)): ("RGBA", "RGBa;16B"), - (II, 2, (1,), 1, (16, 16, 16, 16), (2,)): ("RGBA", "RGBA;16L"), - (MM, 2, (1,), 1, (16, 16, 16, 16), (2,)): ("RGBA", "RGBA;16B"), - (II, 3, (1,), 1, (1,), ()): ("P", "P;1"), - (MM, 3, (1,), 1, (1,), ()): ("P", "P;1"), - (II, 3, (1,), 2, (1,), ()): ("P", "P;1R"), - (MM, 3, (1,), 2, (1,), ()): ("P", "P;1R"), - (II, 3, (1,), 1, (2,), ()): ("P", "P;2"), - (MM, 3, (1,), 1, (2,), ()): ("P", "P;2"), - (II, 3, (1,), 2, (2,), ()): ("P", "P;2R"), - (MM, 3, (1,), 2, (2,), ()): ("P", "P;2R"), - (II, 3, (1,), 1, (4,), ()): ("P", "P;4"), - (MM, 3, (1,), 1, (4,), ()): ("P", "P;4"), - (II, 3, (1,), 2, (4,), ()): ("P", "P;4R"), - (MM, 3, (1,), 2, (4,), ()): ("P", "P;4R"), - (II, 3, (1,), 1, (8,), ()): ("P", "P"), - (MM, 3, (1,), 1, (8,), ()): ("P", "P"), - (II, 3, (1,), 1, (8, 8), (0,)): ("P", "PX"), - (MM, 3, (1,), 1, (8, 8), (0,)): ("P", "PX"), - (II, 3, (1,), 1, (8, 8), (2,)): ("PA", "PA"), - (MM, 3, (1,), 1, (8, 8), (2,)): ("PA", "PA"), - (II, 3, (1,), 2, (8,), ()): ("P", "P;R"), - (MM, 3, (1,), 2, (8,), ()): ("P", "P;R"), - (II, 5, (1,), 1, (8, 8, 8, 8), ()): ("CMYK", "CMYK"), - (MM, 5, (1,), 1, (8, 8, 8, 8), ()): ("CMYK", "CMYK"), - (II, 5, (1,), 1, (8, 8, 8, 8, 8), (0,)): ("CMYK", "CMYKX"), - (MM, 5, (1,), 1, (8, 8, 8, 8, 8), (0,)): ("CMYK", "CMYKX"), - (II, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"), - (MM, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"), - (II, 5, (1,), 1, (16, 16, 16, 16), ()): ("CMYK", "CMYK;16L"), - (MM, 5, (1,), 1, (16, 16, 16, 16), ()): ("CMYK", "CMYK;16B"), - (II, 6, (1,), 1, (8,), ()): ("L", "L"), - (MM, 6, (1,), 1, (8,), ()): ("L", "L"), - # JPEG compressed images handled by LibTiff and auto-converted to RGBX - # Minimal Baseline TIFF requires YCbCr images to have 3 SamplesPerPixel - (II, 6, (1,), 1, (8, 8, 8), ()): ("RGB", "RGBX"), - (MM, 6, (1,), 1, (8, 8, 8), ()): ("RGB", "RGBX"), - (II, 8, (1,), 1, (8, 8, 8), ()): ("LAB", "LAB"), - (MM, 8, (1,), 1, (8, 8, 8), ()): ("LAB", "LAB"), -} - -MAX_SAMPLESPERPIXEL = max(len(key_tp[4]) for key_tp in OPEN_INFO) - -PREFIXES = [ - b"MM\x00\x2a", # Valid TIFF header with big-endian byte order - b"II\x2a\x00", # Valid TIFF header with little-endian byte order - b"MM\x2a\x00", # Invalid TIFF header, assume big-endian - b"II\x00\x2a", # Invalid TIFF header, assume little-endian - b"MM\x00\x2b", # BigTIFF with big-endian byte order - b"II\x2b\x00", # BigTIFF with little-endian byte order -] - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(tuple(PREFIXES)) - - -def _limit_rational( - val: float | Fraction | IFDRational, max_val: int -) -> tuple[IntegralLike, IntegralLike]: - inv = abs(val) > 1 - n_d = IFDRational(1 / val if inv else val).limit_rational(max_val) - return n_d[::-1] if inv else n_d - - -def _limit_signed_rational( - val: IFDRational, max_val: int, min_val: int -) -> tuple[IntegralLike, IntegralLike]: - frac = Fraction(val) - n_d: tuple[IntegralLike, IntegralLike] = frac.numerator, frac.denominator - - if min(float(i) for i in n_d) < min_val: - n_d = _limit_rational(val, abs(min_val)) - - n_d_float = tuple(float(i) for i in n_d) - if max(n_d_float) > max_val: - n_d = _limit_rational(n_d_float[0] / n_d_float[1], max_val) - - return n_d - - -## -# Wrapper for TIFF IFDs. - -_load_dispatch = {} -_write_dispatch = {} - - -def _delegate(op: str) -> Any: - def delegate( - self: IFDRational, *args: tuple[float, ...] - ) -> bool | float | Fraction: - return getattr(self._val, op)(*args) - - return delegate - - -class IFDRational(Rational): - """Implements a rational class where 0/0 is a legal value to match - the in the wild use of exif rationals. - - e.g., DigitalZoomRatio - 0.00/0.00 indicates that no digital zoom was used - """ - - """ If the denominator is 0, store this as a float('nan'), otherwise store - as a fractions.Fraction(). Delegate as appropriate - - """ - - __slots__ = ("_numerator", "_denominator", "_val") - - def __init__( - self, value: float | Fraction | IFDRational, denominator: int = 1 - ) -> None: - """ - :param value: either an integer numerator, a - float/rational/other number, or an IFDRational - :param denominator: Optional integer denominator - """ - self._val: Fraction | float - if isinstance(value, IFDRational): - self._numerator = value.numerator - self._denominator = value.denominator - self._val = value._val - return - - if isinstance(value, Fraction): - self._numerator = value.numerator - self._denominator = value.denominator - else: - if TYPE_CHECKING: - self._numerator = cast(IntegralLike, value) - else: - self._numerator = value - self._denominator = denominator - - if denominator == 0: - self._val = float("nan") - elif denominator == 1: - self._val = Fraction(value) - elif int(value) == value: - self._val = Fraction(int(value), denominator) - else: - self._val = Fraction(value / denominator) - - @property - def numerator(self) -> IntegralLike: - return self._numerator - - @property - def denominator(self) -> int: - return self._denominator - - def limit_rational(self, max_denominator: int) -> tuple[IntegralLike, int]: - """ - - :param max_denominator: Integer, the maximum denominator value - :returns: Tuple of (numerator, denominator) - """ - - if self.denominator == 0: - return self.numerator, self.denominator - - assert isinstance(self._val, Fraction) - f = self._val.limit_denominator(max_denominator) - return f.numerator, f.denominator - - def __repr__(self) -> str: - return str(float(self._val)) - - def __hash__(self) -> int: # type: ignore[override] - return self._val.__hash__() - - def __eq__(self, other: object) -> bool: - val = self._val - if isinstance(other, IFDRational): - other = other._val - if isinstance(other, float): - val = float(val) - return val == other - - def __getstate__(self) -> list[float | Fraction | IntegralLike]: - return [self._val, self._numerator, self._denominator] - - def __setstate__(self, state: list[float | Fraction | IntegralLike]) -> None: - IFDRational.__init__(self, 0) - _val, _numerator, _denominator = state - assert isinstance(_val, (float, Fraction)) - self._val = _val - if TYPE_CHECKING: - self._numerator = cast(IntegralLike, _numerator) - else: - self._numerator = _numerator - assert isinstance(_denominator, int) - self._denominator = _denominator - - """ a = ['add','radd', 'sub', 'rsub', 'mul', 'rmul', - 'truediv', 'rtruediv', 'floordiv', 'rfloordiv', - 'mod','rmod', 'pow','rpow', 'pos', 'neg', - 'abs', 'trunc', 'lt', 'gt', 'le', 'ge', 'bool', - 'ceil', 'floor', 'round'] - print("\n".join("__%s__ = _delegate('__%s__')" % (s,s) for s in a)) - """ - - __add__ = _delegate("__add__") - __radd__ = _delegate("__radd__") - __sub__ = _delegate("__sub__") - __rsub__ = _delegate("__rsub__") - __mul__ = _delegate("__mul__") - __rmul__ = _delegate("__rmul__") - __truediv__ = _delegate("__truediv__") - __rtruediv__ = _delegate("__rtruediv__") - __floordiv__ = _delegate("__floordiv__") - __rfloordiv__ = _delegate("__rfloordiv__") - __mod__ = _delegate("__mod__") - __rmod__ = _delegate("__rmod__") - __pow__ = _delegate("__pow__") - __rpow__ = _delegate("__rpow__") - __pos__ = _delegate("__pos__") - __neg__ = _delegate("__neg__") - __abs__ = _delegate("__abs__") - __trunc__ = _delegate("__trunc__") - __lt__ = _delegate("__lt__") - __gt__ = _delegate("__gt__") - __le__ = _delegate("__le__") - __ge__ = _delegate("__ge__") - __bool__ = _delegate("__bool__") - __ceil__ = _delegate("__ceil__") - __floor__ = _delegate("__floor__") - __round__ = _delegate("__round__") - # Python >= 3.11 - if hasattr(Fraction, "__int__"): - __int__ = _delegate("__int__") - - -_LoaderFunc = Callable[["ImageFileDirectory_v2", bytes, bool], Any] - - -def _register_loader(idx: int, size: int) -> Callable[[_LoaderFunc], _LoaderFunc]: - def decorator(func: _LoaderFunc) -> _LoaderFunc: - from .TiffTags import TYPES - - if func.__name__.startswith("load_"): - TYPES[idx] = func.__name__[5:].replace("_", " ") - _load_dispatch[idx] = size, func # noqa: F821 - return func - - return decorator - - -def _register_writer(idx: int) -> Callable[[Callable[..., Any]], Callable[..., Any]]: - def decorator(func: Callable[..., Any]) -> Callable[..., Any]: - _write_dispatch[idx] = func # noqa: F821 - return func - - return decorator - - -def _register_basic(idx_fmt_name: tuple[int, str, str]) -> None: - from .TiffTags import TYPES - - idx, fmt, name = idx_fmt_name - TYPES[idx] = name - size = struct.calcsize(f"={fmt}") - - def basic_handler( - self: ImageFileDirectory_v2, data: bytes, legacy_api: bool = True - ) -> tuple[Any, ...]: - return self._unpack(f"{len(data) // size}{fmt}", data) - - _load_dispatch[idx] = size, basic_handler # noqa: F821 - _write_dispatch[idx] = lambda self, *values: ( # noqa: F821 - b"".join(self._pack(fmt, value) for value in values) - ) - - -if TYPE_CHECKING: - _IFDv2Base = MutableMapping[int, Any] -else: - _IFDv2Base = MutableMapping - - -class ImageFileDirectory_v2(_IFDv2Base): - """This class represents a TIFF tag directory. To speed things up, we - don't decode tags unless they're asked for. - - Exposes a dictionary interface of the tags in the directory:: - - ifd = ImageFileDirectory_v2() - ifd[key] = 'Some Data' - ifd.tagtype[key] = TiffTags.ASCII - print(ifd[key]) - 'Some Data' - - Individual values are returned as the strings or numbers, sequences are - returned as tuples of the values. - - The tiff metadata type of each item is stored in a dictionary of - tag types in - :attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype`. The types - are read from a tiff file, guessed from the type added, or added - manually. - - Data Structures: - - * ``self.tagtype = {}`` - - * Key: numerical TIFF tag number - * Value: integer corresponding to the data type from - :py:data:`.TiffTags.TYPES` - - .. versionadded:: 3.0.0 - - 'Internal' data structures: - - * ``self._tags_v2 = {}`` - - * Key: numerical TIFF tag number - * Value: decoded data, as tuple for multiple values - - * ``self._tagdata = {}`` - - * Key: numerical TIFF tag number - * Value: undecoded byte string from file - - * ``self._tags_v1 = {}`` - - * Key: numerical TIFF tag number - * Value: decoded data in the v1 format - - Tags will be found in the private attributes ``self._tagdata``, and in - ``self._tags_v2`` once decoded. - - ``self.legacy_api`` is a value for internal use, and shouldn't be changed - from outside code. In cooperation with - :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`, if ``legacy_api`` - is true, then decoded tags will be populated into both ``_tags_v1`` and - ``_tags_v2``. ``_tags_v2`` will be used if this IFD is used in the TIFF - save routine. Tags should be read from ``_tags_v1`` if - ``legacy_api == true``. - - """ - - _load_dispatch: dict[int, tuple[int, _LoaderFunc]] = {} - _write_dispatch: dict[int, Callable[..., Any]] = {} - - def __init__( - self, - ifh: bytes = b"II\x2a\x00\x00\x00\x00\x00", - prefix: bytes | None = None, - group: int | None = None, - ) -> None: - """Initialize an ImageFileDirectory. - - To construct an ImageFileDirectory from a real file, pass the 8-byte - magic header to the constructor. To only set the endianness, pass it - as the 'prefix' keyword argument. - - :param ifh: One of the accepted magic headers (cf. PREFIXES); also sets - endianness. - :param prefix: Override the endianness of the file. - """ - if not _accept(ifh): - msg = f"not a TIFF file (header {repr(ifh)} not valid)" - raise SyntaxError(msg) - self._prefix = prefix if prefix is not None else ifh[:2] - if self._prefix == MM: - self._endian = ">" - elif self._prefix == II: - self._endian = "<" - else: - msg = "not a TIFF IFD" - raise SyntaxError(msg) - self._bigtiff = ifh[2] == 43 - self.group = group - self.tagtype: dict[int, int] = {} - """ Dictionary of tag types """ - self.reset() - self.next = ( - self._unpack("Q", ifh[8:])[0] - if self._bigtiff - else self._unpack("L", ifh[4:])[0] - ) - self._legacy_api = False - - prefix = property(lambda self: self._prefix) - offset = property(lambda self: self._offset) - - @property - def legacy_api(self) -> bool: - return self._legacy_api - - @legacy_api.setter - def legacy_api(self, value: bool) -> NoReturn: - msg = "Not allowing setting of legacy api" - raise Exception(msg) - - def reset(self) -> None: - self._tags_v1: dict[int, Any] = {} # will remain empty if legacy_api is false - self._tags_v2: dict[int, Any] = {} # main tag storage - self._tagdata: dict[int, bytes] = {} - self.tagtype = {} # added 2008-06-05 by Florian Hoech - self._next = None - self._offset: int | None = None - - def __str__(self) -> str: - return str(dict(self)) - - def named(self) -> dict[str, Any]: - """ - :returns: dict of name|key: value - - Returns the complete tag dictionary, with named tags where possible. - """ - return { - TiffTags.lookup(code, self.group).name: value - for code, value in self.items() - } - - def __len__(self) -> int: - return len(set(self._tagdata) | set(self._tags_v2)) - - def __getitem__(self, tag: int) -> Any: - if tag not in self._tags_v2: # unpack on the fly - data = self._tagdata[tag] - typ = self.tagtype[tag] - size, handler = self._load_dispatch[typ] - self[tag] = handler(self, data, self.legacy_api) # check type - val = self._tags_v2[tag] - if self.legacy_api and not isinstance(val, (tuple, bytes)): - val = (val,) - return val - - def __contains__(self, tag: object) -> bool: - return tag in self._tags_v2 or tag in self._tagdata - - def __setitem__(self, tag: int, value: Any) -> None: - self._setitem(tag, value, self.legacy_api) - - def _setitem(self, tag: int, value: Any, legacy_api: bool) -> None: - basetypes = (Number, bytes, str) - - info = TiffTags.lookup(tag, self.group) - values = [value] if isinstance(value, basetypes) else value - - if tag not in self.tagtype: - if info.type: - self.tagtype[tag] = info.type - else: - self.tagtype[tag] = TiffTags.UNDEFINED - if all(isinstance(v, IFDRational) for v in values): - for v in values: - assert isinstance(v, IFDRational) - if v < 0: - self.tagtype[tag] = TiffTags.SIGNED_RATIONAL - break - else: - self.tagtype[tag] = TiffTags.RATIONAL - elif all(isinstance(v, int) for v in values): - short = True - signed_short = True - long = True - for v in values: - assert isinstance(v, int) - if short and not (0 <= v < 2**16): - short = False - if signed_short and not (-(2**15) < v < 2**15): - signed_short = False - if long and v < 0: - long = False - if short: - self.tagtype[tag] = TiffTags.SHORT - elif signed_short: - self.tagtype[tag] = TiffTags.SIGNED_SHORT - elif long: - self.tagtype[tag] = TiffTags.LONG - else: - self.tagtype[tag] = TiffTags.SIGNED_LONG - elif all(isinstance(v, float) for v in values): - self.tagtype[tag] = TiffTags.DOUBLE - elif all(isinstance(v, str) for v in values): - self.tagtype[tag] = TiffTags.ASCII - elif all(isinstance(v, bytes) for v in values): - self.tagtype[tag] = TiffTags.BYTE - - if self.tagtype[tag] == TiffTags.UNDEFINED: - values = [ - v.encode("ascii", "replace") if isinstance(v, str) else v - for v in values - ] - elif self.tagtype[tag] == TiffTags.RATIONAL: - values = [float(v) if isinstance(v, int) else v for v in values] - - is_ifd = self.tagtype[tag] == TiffTags.LONG and isinstance(values, dict) - if not is_ifd: - values = tuple( - info.cvt_enum(value) if isinstance(value, str) else value - for value in values - ) - - dest = self._tags_v1 if legacy_api else self._tags_v2 - - # Three branches: - # Spec'd length == 1, Actual length 1, store as element - # Spec'd length == 1, Actual > 1, Warn and truncate. Formerly barfed. - # No Spec, Actual length 1, Formerly (<4.2) returned a 1 element tuple. - # Don't mess with the legacy api, since it's frozen. - if not is_ifd and ( - (info.length == 1) - or self.tagtype[tag] == TiffTags.BYTE - or (info.length is None and len(values) == 1 and not legacy_api) - ): - # Don't mess with the legacy api, since it's frozen. - if legacy_api and self.tagtype[tag] in [ - TiffTags.RATIONAL, - TiffTags.SIGNED_RATIONAL, - ]: # rationals - values = (values,) - try: - (dest[tag],) = values - except ValueError: - # We've got a builtin tag with 1 expected entry - warnings.warn( - f"Metadata Warning, tag {tag} had too many entries: " - f"{len(values)}, expected 1" - ) - dest[tag] = values[0] - - else: - # Spec'd length > 1 or undefined - # Unspec'd, and length > 1 - dest[tag] = values - - def __delitem__(self, tag: int) -> None: - self._tags_v2.pop(tag, None) - self._tags_v1.pop(tag, None) - self._tagdata.pop(tag, None) - - def __iter__(self) -> Iterator[int]: - return iter(set(self._tagdata) | set(self._tags_v2)) - - def _unpack(self, fmt: str, data: bytes) -> tuple[Any, ...]: - return struct.unpack(self._endian + fmt, data) - - def _pack(self, fmt: str, *values: Any) -> bytes: - return struct.pack(self._endian + fmt, *values) - - list( - map( - _register_basic, - [ - (TiffTags.SHORT, "H", "short"), - (TiffTags.LONG, "L", "long"), - (TiffTags.SIGNED_BYTE, "b", "signed byte"), - (TiffTags.SIGNED_SHORT, "h", "signed short"), - (TiffTags.SIGNED_LONG, "l", "signed long"), - (TiffTags.FLOAT, "f", "float"), - (TiffTags.DOUBLE, "d", "double"), - (TiffTags.IFD, "L", "long"), - (TiffTags.LONG8, "Q", "long8"), - ], - ) - ) - - @_register_loader(1, 1) # Basic type, except for the legacy API. - def load_byte(self, data: bytes, legacy_api: bool = True) -> bytes: - return data - - @_register_writer(1) # Basic type, except for the legacy API. - def write_byte(self, data: bytes | int | IFDRational) -> bytes: - if isinstance(data, IFDRational): - data = int(data) - if isinstance(data, int): - data = bytes((data,)) - return data - - @_register_loader(2, 1) - def load_string(self, data: bytes, legacy_api: bool = True) -> str: - if data.endswith(b"\0"): - data = data[:-1] - return data.decode("latin-1", "replace") - - @_register_writer(2) - def write_string(self, value: str | bytes | int) -> bytes: - # remerge of https://github.com/python-pillow/Pillow/pull/1416 - if isinstance(value, int): - value = str(value) - if not isinstance(value, bytes): - value = value.encode("ascii", "replace") - return value + b"\0" - - @_register_loader(5, 8) - def load_rational( - self, data: bytes, legacy_api: bool = True - ) -> tuple[tuple[int, int] | IFDRational, ...]: - vals = self._unpack(f"{len(data) // 4}L", data) - - def combine(a: int, b: int) -> tuple[int, int] | IFDRational: - return (a, b) if legacy_api else IFDRational(a, b) - - return tuple(combine(num, denom) for num, denom in zip(vals[::2], vals[1::2])) - - @_register_writer(5) - def write_rational(self, *values: IFDRational) -> bytes: - return b"".join( - self._pack("2L", *_limit_rational(frac, 2**32 - 1)) for frac in values - ) - - @_register_loader(7, 1) - def load_undefined(self, data: bytes, legacy_api: bool = True) -> bytes: - return data - - @_register_writer(7) - def write_undefined(self, value: bytes | int | IFDRational) -> bytes: - if isinstance(value, IFDRational): - value = int(value) - if isinstance(value, int): - value = str(value).encode("ascii", "replace") - return value - - @_register_loader(10, 8) - def load_signed_rational( - self, data: bytes, legacy_api: bool = True - ) -> tuple[tuple[int, int] | IFDRational, ...]: - vals = self._unpack(f"{len(data) // 4}l", data) - - def combine(a: int, b: int) -> tuple[int, int] | IFDRational: - return (a, b) if legacy_api else IFDRational(a, b) - - return tuple(combine(num, denom) for num, denom in zip(vals[::2], vals[1::2])) - - @_register_writer(10) - def write_signed_rational(self, *values: IFDRational) -> bytes: - return b"".join( - self._pack("2l", *_limit_signed_rational(frac, 2**31 - 1, -(2**31))) - for frac in values - ) - - def _ensure_read(self, fp: IO[bytes], size: int) -> bytes: - ret = fp.read(size) - if len(ret) != size: - msg = ( - "Corrupt EXIF data. " - f"Expecting to read {size} bytes but only got {len(ret)}. " - ) - raise OSError(msg) - return ret - - def load(self, fp: IO[bytes]) -> None: - self.reset() - self._offset = fp.tell() - - try: - tag_count = ( - self._unpack("Q", self._ensure_read(fp, 8)) - if self._bigtiff - else self._unpack("H", self._ensure_read(fp, 2)) - )[0] - for i in range(tag_count): - tag, typ, count, data = ( - self._unpack("HHQ8s", self._ensure_read(fp, 20)) - if self._bigtiff - else self._unpack("HHL4s", self._ensure_read(fp, 12)) - ) - - tagname = TiffTags.lookup(tag, self.group).name - typname = TYPES.get(typ, "unknown") - msg = f"tag: {tagname} ({tag}) - type: {typname} ({typ})" - - try: - unit_size, handler = self._load_dispatch[typ] - except KeyError: - logger.debug("%s - unsupported type %s", msg, typ) - continue # ignore unsupported type - size = count * unit_size - if size > (8 if self._bigtiff else 4): - here = fp.tell() - (offset,) = self._unpack("Q" if self._bigtiff else "L", data) - msg += f" Tag Location: {here} - Data Location: {offset}" - fp.seek(offset) - data = ImageFile._safe_read(fp, size) - fp.seek(here) - else: - data = data[:size] - - if len(data) != size: - warnings.warn( - "Possibly corrupt EXIF data. " - f"Expecting to read {size} bytes but only got {len(data)}." - f" Skipping tag {tag}" - ) - logger.debug(msg) - continue - - if not data: - logger.debug(msg) - continue - - self._tagdata[tag] = data - self.tagtype[tag] = typ - - msg += " - value: " - msg += f"" if size > 32 else repr(data) - - logger.debug(msg) - - (self.next,) = ( - self._unpack("Q", self._ensure_read(fp, 8)) - if self._bigtiff - else self._unpack("L", self._ensure_read(fp, 4)) - ) - except OSError as msg: - warnings.warn(str(msg)) - return - - def _get_ifh(self) -> bytes: - ifh = self._prefix + self._pack("H", 43 if self._bigtiff else 42) - if self._bigtiff: - ifh += self._pack("HH", 8, 0) - ifh += self._pack("Q", 16) if self._bigtiff else self._pack("L", 8) - - return ifh - - def tobytes(self, offset: int = 0) -> bytes: - # FIXME What about tagdata? - result = self._pack("Q" if self._bigtiff else "H", len(self._tags_v2)) - - entries: list[tuple[int, int, int, bytes, bytes]] = [] - - fmt = "Q" if self._bigtiff else "L" - fmt_size = 8 if self._bigtiff else 4 - offset += ( - len(result) + len(self._tags_v2) * (20 if self._bigtiff else 12) + fmt_size - ) - stripoffsets = None - - # pass 1: convert tags to binary format - # always write tags in ascending order - for tag, value in sorted(self._tags_v2.items()): - if tag == STRIPOFFSETS: - stripoffsets = len(entries) - typ = self.tagtype[tag] - logger.debug("Tag %s, Type: %s, Value: %s", tag, typ, repr(value)) - is_ifd = typ == TiffTags.LONG and isinstance(value, dict) - if is_ifd: - ifd = ImageFileDirectory_v2(self._get_ifh(), group=tag) - values = self._tags_v2[tag] - for ifd_tag, ifd_value in values.items(): - ifd[ifd_tag] = ifd_value - data = ifd.tobytes(offset) - else: - values = value if isinstance(value, tuple) else (value,) - data = self._write_dispatch[typ](self, *values) - - tagname = TiffTags.lookup(tag, self.group).name - typname = "ifd" if is_ifd else TYPES.get(typ, "unknown") - msg = f"save: {tagname} ({tag}) - type: {typname} ({typ}) - value: " - msg += f"" if len(data) >= 16 else str(values) - logger.debug(msg) - - # count is sum of lengths for string and arbitrary data - if is_ifd: - count = 1 - elif typ in [TiffTags.BYTE, TiffTags.ASCII, TiffTags.UNDEFINED]: - count = len(data) - else: - count = len(values) - # figure out if data fits into the entry - if len(data) <= fmt_size: - entries.append((tag, typ, count, data.ljust(fmt_size, b"\0"), b"")) - else: - entries.append((tag, typ, count, self._pack(fmt, offset), data)) - offset += (len(data) + 1) // 2 * 2 # pad to word - - # update strip offset data to point beyond auxiliary data - if stripoffsets is not None: - tag, typ, count, value, data = entries[stripoffsets] - if data: - size, handler = self._load_dispatch[typ] - values = [val + offset for val in handler(self, data, self.legacy_api)] - data = self._write_dispatch[typ](self, *values) - else: - value = self._pack(fmt, self._unpack(fmt, value)[0] + offset) - entries[stripoffsets] = tag, typ, count, value, data - - # pass 2: write entries to file - for tag, typ, count, value, data in entries: - logger.debug("%s %s %s %s %s", tag, typ, count, repr(value), repr(data)) - result += self._pack( - "HHQ8s" if self._bigtiff else "HHL4s", tag, typ, count, value - ) - - # -- overwrite here for multi-page -- - result += self._pack(fmt, 0) # end of entries - - # pass 3: write auxiliary data to file - for tag, typ, count, value, data in entries: - result += data - if len(data) & 1: - result += b"\0" - - return result - - def save(self, fp: IO[bytes]) -> int: - if fp.tell() == 0: # skip TIFF header on subsequent pages - fp.write(self._get_ifh()) - - offset = fp.tell() - result = self.tobytes(offset) - fp.write(result) - return offset + len(result) - - -ImageFileDirectory_v2._load_dispatch = _load_dispatch -ImageFileDirectory_v2._write_dispatch = _write_dispatch -for idx, name in TYPES.items(): - name = name.replace(" ", "_") - setattr(ImageFileDirectory_v2, f"load_{name}", _load_dispatch[idx][1]) - setattr(ImageFileDirectory_v2, f"write_{name}", _write_dispatch[idx]) -del _load_dispatch, _write_dispatch, idx, name - - -# Legacy ImageFileDirectory support. -class ImageFileDirectory_v1(ImageFileDirectory_v2): - """This class represents the **legacy** interface to a TIFF tag directory. - - Exposes a dictionary interface of the tags in the directory:: - - ifd = ImageFileDirectory_v1() - ifd[key] = 'Some Data' - ifd.tagtype[key] = TiffTags.ASCII - print(ifd[key]) - ('Some Data',) - - Also contains a dictionary of tag types as read from the tiff image file, - :attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v1.tagtype`. - - Values are returned as a tuple. - - .. deprecated:: 3.0.0 - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - self._legacy_api = True - - tags = property(lambda self: self._tags_v1) - tagdata = property(lambda self: self._tagdata) - - # defined in ImageFileDirectory_v2 - tagtype: dict[int, int] - """Dictionary of tag types""" - - @classmethod - def from_v2(cls, original: ImageFileDirectory_v2) -> ImageFileDirectory_v1: - """Returns an - :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1` - instance with the same data as is contained in the original - :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2` - instance. - - :returns: :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1` - - """ - - ifd = cls(prefix=original.prefix) - ifd._tagdata = original._tagdata - ifd.tagtype = original.tagtype - ifd.next = original.next # an indicator for multipage tiffs - return ifd - - def to_v2(self) -> ImageFileDirectory_v2: - """Returns an - :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2` - instance with the same data as is contained in the original - :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1` - instance. - - :returns: :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2` - - """ - - ifd = ImageFileDirectory_v2(prefix=self.prefix) - ifd._tagdata = dict(self._tagdata) - ifd.tagtype = dict(self.tagtype) - ifd._tags_v2 = dict(self._tags_v2) - return ifd - - def __contains__(self, tag: object) -> bool: - return tag in self._tags_v1 or tag in self._tagdata - - def __len__(self) -> int: - return len(set(self._tagdata) | set(self._tags_v1)) - - def __iter__(self) -> Iterator[int]: - return iter(set(self._tagdata) | set(self._tags_v1)) - - def __setitem__(self, tag: int, value: Any) -> None: - for legacy_api in (False, True): - self._setitem(tag, value, legacy_api) - - def __getitem__(self, tag: int) -> Any: - if tag not in self._tags_v1: # unpack on the fly - data = self._tagdata[tag] - typ = self.tagtype[tag] - size, handler = self._load_dispatch[typ] - for legacy in (False, True): - self._setitem(tag, handler(self, data, legacy), legacy) - val = self._tags_v1[tag] - if not isinstance(val, (tuple, bytes)): - val = (val,) - return val - - -# undone -- switch this pointer -ImageFileDirectory = ImageFileDirectory_v1 - - -## -# Image plugin for TIFF files. - - -class TiffImageFile(ImageFile.ImageFile): - format = "TIFF" - format_description = "Adobe TIFF" - _close_exclusive_fp_after_loading = False - - def __init__( - self, - fp: StrOrBytesPath | IO[bytes], - filename: str | bytes | None = None, - ) -> None: - self.tag_v2: ImageFileDirectory_v2 - """ Image file directory (tag dictionary) """ - - self.tag: ImageFileDirectory_v1 - """ Legacy tag entries """ - - super().__init__(fp, filename) - - def _open(self) -> None: - """Open the first image in a TIFF file""" - - # Header - assert self.fp is not None - ifh = self.fp.read(8) - if ifh[2] == 43: - ifh += self.fp.read(8) - - self.tag_v2 = ImageFileDirectory_v2(ifh) - - # setup frame pointers - self.__first = self.__next = self.tag_v2.next - self.__frame = -1 - self._fp = self.fp - self._frame_pos: list[int] = [] - self._n_frames: int | None = None - - logger.debug("*** TiffImageFile._open ***") - logger.debug("- __first: %s", self.__first) - logger.debug("- ifh: %s", repr(ifh)) # Use repr to avoid str(bytes) - - # and load the first frame - self._seek(0) - - @property - def n_frames(self) -> int: - current_n_frames = self._n_frames - if current_n_frames is None: - current = self.tell() - self._seek(len(self._frame_pos)) - while self._n_frames is None: - self._seek(self.tell() + 1) - self.seek(current) - assert self._n_frames is not None - return self._n_frames - - def seek(self, frame: int) -> None: - """Select a given frame as current image""" - if not self._seek_check(frame): - return - self._seek(frame) - if self._im is not None and ( - self.im.size != self._tile_size - or self.im.mode != self.mode - or self.readonly - ): - self._im = None - - def _seek(self, frame: int) -> None: - if isinstance(self._fp, DeferredError): - raise self._fp.ex - self.fp = self._fp - - while len(self._frame_pos) <= frame: - if not self.__next: - msg = "no more images in TIFF file" - raise EOFError(msg) - logger.debug( - "Seeking to frame %s, on frame %s, __next %s, location: %s", - frame, - self.__frame, - self.__next, - self.fp.tell(), - ) - if self.__next >= 2**63: - msg = "Unable to seek to frame" - raise ValueError(msg) - self.fp.seek(self.__next) - self._frame_pos.append(self.__next) - logger.debug("Loading tags, location: %s", self.fp.tell()) - self.tag_v2.load(self.fp) - if self.tag_v2.next in self._frame_pos: - # This IFD has already been processed - # Declare this to be the end of the image - self.__next = 0 - else: - self.__next = self.tag_v2.next - if self.__next == 0: - self._n_frames = frame + 1 - if len(self._frame_pos) == 1: - self.is_animated = self.__next != 0 - self.__frame += 1 - self.fp.seek(self._frame_pos[frame]) - self.tag_v2.load(self.fp) - if XMP in self.tag_v2: - xmp = self.tag_v2[XMP] - if isinstance(xmp, tuple) and len(xmp) == 1: - xmp = xmp[0] - self.info["xmp"] = xmp - elif "xmp" in self.info: - del self.info["xmp"] - self._reload_exif() - # fill the legacy tag/ifd entries - self.tag = self.ifd = ImageFileDirectory_v1.from_v2(self.tag_v2) - self.__frame = frame - self._setup() - - def tell(self) -> int: - """Return the current frame number""" - return self.__frame - - def get_photoshop_blocks(self) -> dict[int, dict[str, bytes]]: - """ - Returns a dictionary of Photoshop "Image Resource Blocks". - The keys are the image resource ID. For more information, see - https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_pgfId-1037727 - - :returns: Photoshop "Image Resource Blocks" in a dictionary. - """ - blocks = {} - val = self.tag_v2.get(ExifTags.Base.ImageResources) - if val: - while val.startswith(b"8BIM"): - id = i16(val[4:6]) - n = math.ceil((val[6] + 1) / 2) * 2 - size = i32(val[6 + n : 10 + n]) - data = val[10 + n : 10 + n + size] - blocks[id] = {"data": data} - - val = val[math.ceil((10 + n + size) / 2) * 2 :] - return blocks - - def load(self) -> Image.core.PixelAccess | None: - if self.tile and self.use_load_libtiff: - return self._load_libtiff() - return super().load() - - def load_prepare(self) -> None: - if self._im is None: - Image._decompression_bomb_check(self._tile_size) - self.im = Image.core.new(self.mode, self._tile_size) - ImageFile.ImageFile.load_prepare(self) - - def load_end(self) -> None: - # allow closing if we're on the first frame, there's no next - # This is the ImageFile.load path only, libtiff specific below. - if not self.is_animated: - self._close_exclusive_fp_after_loading = True - - # load IFD data from fp before it is closed - exif = self.getexif() - for key in TiffTags.TAGS_V2_GROUPS: - if key not in exif: - continue - exif.get_ifd(key) - - ImageOps.exif_transpose(self, in_place=True) - if ExifTags.Base.Orientation in self.tag_v2: - del self.tag_v2[ExifTags.Base.Orientation] - - def _load_libtiff(self) -> Image.core.PixelAccess | None: - """Overload method triggered when we detect a compressed tiff - Calls out to libtiff""" - - Image.Image.load(self) - - self.load_prepare() - - if not len(self.tile) == 1: - msg = "Not exactly one tile" - raise OSError(msg) - - # (self._compression, (extents tuple), - # 0, (rawmode, self._compression, fp)) - extents = self.tile[0][1] - args = self.tile[0][3] - - # To be nice on memory footprint, if there's a - # file descriptor, use that instead of reading - # into a string in python. - assert self.fp is not None - try: - fp = hasattr(self.fp, "fileno") and self.fp.fileno() - # flush the file descriptor, prevents error on pypy 2.4+ - # should also eliminate the need for fp.tell - # in _seek - if hasattr(self.fp, "flush"): - self.fp.flush() - except OSError: - # io.BytesIO have a fileno, but returns an OSError if - # it doesn't use a file descriptor. - fp = False - - if fp: - assert isinstance(args, tuple) - args_list = list(args) - args_list[2] = fp - args = tuple(args_list) - - decoder = Image._getdecoder(self.mode, "libtiff", args, self.decoderconfig) - try: - decoder.setimage(self.im, extents) - except ValueError as e: - msg = "Couldn't set the image" - raise OSError(msg) from e - - close_self_fp = self._exclusive_fp and not self.is_animated - if hasattr(self.fp, "getvalue"): - # We've got a stringio like thing passed in. Yay for all in memory. - # The decoder needs the entire file in one shot, so there's not - # a lot we can do here other than give it the entire file. - # unless we could do something like get the address of the - # underlying string for stringio. - # - # Rearranging for supporting byteio items, since they have a fileno - # that returns an OSError if there's no underlying fp. Easier to - # deal with here by reordering. - logger.debug("have getvalue. just sending in a string from getvalue") - n, err = decoder.decode(self.fp.getvalue()) - elif fp: - # we've got a actual file on disk, pass in the fp. - logger.debug("have fileno, calling fileno version of the decoder.") - if not close_self_fp: - self.fp.seek(0) - # Save and restore the file position, because libtiff will move it - # outside of the Python runtime, and that will confuse - # io.BufferedReader and possible others. - # NOTE: This must use os.lseek(), and not fp.tell()/fp.seek(), - # because the buffer read head already may not equal the actual - # file position, and fp.seek() may just adjust it's internal - # pointer and not actually seek the OS file handle. - pos = os.lseek(fp, 0, os.SEEK_CUR) - # 4 bytes, otherwise the trace might error out - n, err = decoder.decode(b"fpfp") - os.lseek(fp, pos, os.SEEK_SET) - else: - # we have something else. - logger.debug("don't have fileno or getvalue. just reading") - self.fp.seek(0) - # UNDONE -- so much for that buffer size thing. - n, err = decoder.decode(self.fp.read()) - - self.tile = [] - self.readonly = 0 - - self.load_end() - - if close_self_fp: - self.fp.close() - self.fp = None # might be shared - - if err < 0: - msg = f"decoder error {err}" - raise OSError(msg) - - return Image.Image.load(self) - - def _setup(self) -> None: - """Setup this image object based on current tags""" - - if 0xBC01 in self.tag_v2: - msg = "Windows Media Photo files not yet supported" - raise OSError(msg) - - # extract relevant tags - self._compression = COMPRESSION_INFO[self.tag_v2.get(COMPRESSION, 1)] - self._planar_configuration = self.tag_v2.get(PLANAR_CONFIGURATION, 1) - - # photometric is a required tag, but not everyone is reading - # the specification - photo = self.tag_v2.get(PHOTOMETRIC_INTERPRETATION, 0) - - # old style jpeg compression images most certainly are YCbCr - if self._compression == "tiff_jpeg": - photo = 6 - - fillorder = self.tag_v2.get(FILLORDER, 1) - - logger.debug("*** Summary ***") - logger.debug("- compression: %s", self._compression) - logger.debug("- photometric_interpretation: %s", photo) - logger.debug("- planar_configuration: %s", self._planar_configuration) - logger.debug("- fill_order: %s", fillorder) - logger.debug("- YCbCr subsampling: %s", self.tag_v2.get(YCBCRSUBSAMPLING)) - - # size - try: - xsize = self.tag_v2[IMAGEWIDTH] - ysize = self.tag_v2[IMAGELENGTH] - except KeyError as e: - msg = "Missing dimensions" - raise TypeError(msg) from e - if not isinstance(xsize, int) or not isinstance(ysize, int): - msg = "Invalid dimensions" - raise ValueError(msg) - self._tile_size = xsize, ysize - orientation = self.tag_v2.get(ExifTags.Base.Orientation) - if orientation in (5, 6, 7, 8): - self._size = ysize, xsize - else: - self._size = xsize, ysize - - logger.debug("- size: %s", self.size) - - sample_format = self.tag_v2.get(SAMPLEFORMAT, (1,)) - if len(sample_format) > 1 and max(sample_format) == min(sample_format) == 1: - # SAMPLEFORMAT is properly per band, so an RGB image will - # be (1,1,1). But, we don't support per band pixel types, - # and anything more than one band is a uint8. So, just - # take the first element. Revisit this if adding support - # for more exotic images. - sample_format = (1,) - - bps_tuple = self.tag_v2.get(BITSPERSAMPLE, (1,)) - extra_tuple = self.tag_v2.get(EXTRASAMPLES, ()) - if photo in (2, 6, 8): # RGB, YCbCr, LAB - bps_count = 3 - elif photo == 5: # CMYK - bps_count = 4 - else: - bps_count = 1 - bps_count += len(extra_tuple) - bps_actual_count = len(bps_tuple) - samples_per_pixel = self.tag_v2.get( - SAMPLESPERPIXEL, - 3 if self._compression == "tiff_jpeg" and photo in (2, 6) else 1, - ) - - if samples_per_pixel > MAX_SAMPLESPERPIXEL: - # DOS check, samples_per_pixel can be a Long, and we extend the tuple below - logger.error( - "More samples per pixel than can be decoded: %s", samples_per_pixel - ) - msg = "Invalid value for samples per pixel" - raise SyntaxError(msg) - - if samples_per_pixel < bps_actual_count: - # If a file has more values in bps_tuple than expected, - # remove the excess. - bps_tuple = bps_tuple[:samples_per_pixel] - elif samples_per_pixel > bps_actual_count and bps_actual_count == 1: - # If a file has only one value in bps_tuple, when it should have more, - # presume it is the same number of bits for all of the samples. - bps_tuple = bps_tuple * samples_per_pixel - - if len(bps_tuple) != samples_per_pixel: - msg = "unknown data organization" - raise SyntaxError(msg) - - # mode: check photometric interpretation and bits per pixel - key = ( - self.tag_v2.prefix, - photo, - sample_format, - fillorder, - bps_tuple, - extra_tuple, - ) - logger.debug("format key: %s", key) - try: - self._mode, rawmode = OPEN_INFO[key] - except KeyError as e: - logger.debug("- unsupported format") - msg = "unknown pixel mode" - raise SyntaxError(msg) from e - - logger.debug("- raw mode: %s", rawmode) - logger.debug("- pil mode: %s", self.mode) - - self.info["compression"] = self._compression - - xres = self.tag_v2.get(X_RESOLUTION, 1) - yres = self.tag_v2.get(Y_RESOLUTION, 1) - - if xres and yres: - resunit = self.tag_v2.get(RESOLUTION_UNIT) - if resunit == 2: # dots per inch - self.info["dpi"] = (xres, yres) - elif resunit == 3: # dots per centimeter. convert to dpi - self.info["dpi"] = (xres * 2.54, yres * 2.54) - elif resunit is None: # used to default to 1, but now 2) - self.info["dpi"] = (xres, yres) - # For backward compatibility, - # we also preserve the old behavior - self.info["resolution"] = xres, yres - else: # No absolute unit of measurement - self.info["resolution"] = xres, yres - - # build tile descriptors - x = y = layer = 0 - self.tile = [] - self.use_load_libtiff = READ_LIBTIFF or self._compression != "raw" - if self.use_load_libtiff: - # Decoder expects entire file as one tile. - # There's a buffer size limit in load (64k) - # so large g4 images will fail if we use that - # function. - # - # Setup the one tile for the whole image, then - # use the _load_libtiff function. - - # libtiff handles the fillmode for us, so 1;IR should - # actually be 1;I. Including the R double reverses the - # bits, so stripes of the image are reversed. See - # https://github.com/python-pillow/Pillow/issues/279 - if fillorder == 2: - # Replace fillorder with fillorder=1 - key = key[:3] + (1,) + key[4:] - logger.debug("format key: %s", key) - # this should always work, since all the - # fillorder==2 modes have a corresponding - # fillorder=1 mode - self._mode, rawmode = OPEN_INFO[key] - # YCbCr images with new jpeg compression with pixels in one plane - # unpacked straight into RGB values - if ( - photo == 6 - and self._compression == "jpeg" - and self._planar_configuration == 1 - ): - rawmode = "RGB" - # libtiff always returns the bytes in native order. - # we're expecting image byte order. So, if the rawmode - # contains I;16, we need to convert from native to image - # byte order. - elif rawmode == "I;16": - rawmode = "I;16N" - elif rawmode.endswith((";16B", ";16L")): - rawmode = rawmode[:-1] + "N" - - # Offset in the tile tuple is 0, we go from 0,0 to - # w,h, and we only do this once -- eds - a = (rawmode, self._compression, False, self.tag_v2.offset) - self.tile.append(ImageFile._Tile("libtiff", (0, 0, xsize, ysize), 0, a)) - - elif STRIPOFFSETS in self.tag_v2 or TILEOFFSETS in self.tag_v2: - # striped image - if STRIPOFFSETS in self.tag_v2: - offsets = self.tag_v2[STRIPOFFSETS] - h = self.tag_v2.get(ROWSPERSTRIP, ysize) - w = xsize - else: - # tiled image - offsets = self.tag_v2[TILEOFFSETS] - tilewidth = self.tag_v2.get(TILEWIDTH) - h = self.tag_v2.get(TILELENGTH) - if not isinstance(tilewidth, int) or not isinstance(h, int): - msg = "Invalid tile dimensions" - raise ValueError(msg) - w = tilewidth - - if w == xsize and h == ysize and self._planar_configuration != 2: - # Every tile covers the image. Only use the last offset - offsets = offsets[-1:] - - for offset in offsets: - if x + w > xsize: - stride = w * sum(bps_tuple) / 8 # bytes per line - else: - stride = 0 - - tile_rawmode = rawmode - if self._planar_configuration == 2: - # each band on it's own layer - tile_rawmode = rawmode[layer] - # adjust stride width accordingly - stride /= bps_count - - args = (tile_rawmode, int(stride), 1) - self.tile.append( - ImageFile._Tile( - self._compression, - (x, y, min(x + w, xsize), min(y + h, ysize)), - offset, - args, - ) - ) - x += w - if x >= xsize: - x, y = 0, y + h - if y >= ysize: - y = 0 - layer += 1 - else: - logger.debug("- unsupported data organization") - msg = "unknown data organization" - raise SyntaxError(msg) - - # Fix up info. - if ICCPROFILE in self.tag_v2: - self.info["icc_profile"] = self.tag_v2[ICCPROFILE] - - # fixup palette descriptor - - if self.mode in ["P", "PA"]: - palette = [o8(b // 256) for b in self.tag_v2[COLORMAP]] - self.palette = ImagePalette.raw("RGB;L", b"".join(palette)) - - -# -# -------------------------------------------------------------------- -# Write TIFF files - -# little endian is default except for image modes with -# explicit big endian byte-order - -SAVE_INFO = { - # mode => rawmode, byteorder, photometrics, - # sampleformat, bitspersample, extra - "1": ("1", II, 1, 1, (1,), None), - "L": ("L", II, 1, 1, (8,), None), - "LA": ("LA", II, 1, 1, (8, 8), 2), - "P": ("P", II, 3, 1, (8,), None), - "PA": ("PA", II, 3, 1, (8, 8), 2), - "I": ("I;32S", II, 1, 2, (32,), None), - "I;16": ("I;16", II, 1, 1, (16,), None), - "I;16L": ("I;16L", II, 1, 1, (16,), None), - "F": ("F;32F", II, 1, 3, (32,), None), - "RGB": ("RGB", II, 2, 1, (8, 8, 8), None), - "RGBX": ("RGBX", II, 2, 1, (8, 8, 8, 8), 0), - "RGBA": ("RGBA", II, 2, 1, (8, 8, 8, 8), 2), - "CMYK": ("CMYK", II, 5, 1, (8, 8, 8, 8), None), - "YCbCr": ("YCbCr", II, 6, 1, (8, 8, 8), None), - "LAB": ("LAB", II, 8, 1, (8, 8, 8), None), - "I;16B": ("I;16B", MM, 1, 1, (16,), None), -} - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - try: - rawmode, prefix, photo, format, bits, extra = SAVE_INFO[im.mode] - except KeyError as e: - msg = f"cannot write mode {im.mode} as TIFF" - raise OSError(msg) from e - - encoderinfo = im.encoderinfo - encoderconfig = im.encoderconfig - - ifd = ImageFileDirectory_v2(prefix=prefix) - if encoderinfo.get("big_tiff"): - ifd._bigtiff = True - - try: - compression = encoderinfo["compression"] - except KeyError: - compression = im.info.get("compression") - if isinstance(compression, int): - # compression value may be from BMP. Ignore it - compression = None - if compression is None: - compression = "raw" - elif compression == "tiff_jpeg": - # OJPEG is obsolete, so use new-style JPEG compression instead - compression = "jpeg" - elif compression == "tiff_deflate": - compression = "tiff_adobe_deflate" - - libtiff = WRITE_LIBTIFF or compression != "raw" - - # required for color libtiff images - ifd[PLANAR_CONFIGURATION] = 1 - - ifd[IMAGEWIDTH] = im.size[0] - ifd[IMAGELENGTH] = im.size[1] - - # write any arbitrary tags passed in as an ImageFileDirectory - if "tiffinfo" in encoderinfo: - info = encoderinfo["tiffinfo"] - elif "exif" in encoderinfo: - info = encoderinfo["exif"] - if isinstance(info, bytes): - exif = Image.Exif() - exif.load(info) - info = exif - else: - info = {} - logger.debug("Tiffinfo Keys: %s", list(info)) - if isinstance(info, ImageFileDirectory_v1): - info = info.to_v2() - for key in info: - if isinstance(info, Image.Exif) and key in TiffTags.TAGS_V2_GROUPS: - ifd[key] = info.get_ifd(key) - else: - ifd[key] = info.get(key) - try: - ifd.tagtype[key] = info.tagtype[key] - except Exception: - pass # might not be an IFD. Might not have populated type - - legacy_ifd = {} - if hasattr(im, "tag"): - legacy_ifd = im.tag.to_v2() - - supplied_tags = {**legacy_ifd, **getattr(im, "tag_v2", {})} - for tag in ( - # IFD offset that may not be correct in the saved image - EXIFIFD, - # Determined by the image format and should not be copied from legacy_ifd. - SAMPLEFORMAT, - ): - if tag in supplied_tags: - del supplied_tags[tag] - - # additions written by Greg Couch, gregc@cgl.ucsf.edu - # inspired by image-sig posting from Kevin Cazabon, kcazabon@home.com - if hasattr(im, "tag_v2"): - # preserve tags from original TIFF image file - for key in ( - RESOLUTION_UNIT, - X_RESOLUTION, - Y_RESOLUTION, - IPTC_NAA_CHUNK, - PHOTOSHOP_CHUNK, - XMP, - ): - if key in im.tag_v2: - if key == IPTC_NAA_CHUNK and im.tag_v2.tagtype[key] not in ( - TiffTags.BYTE, - TiffTags.UNDEFINED, - ): - del supplied_tags[key] - else: - ifd[key] = im.tag_v2[key] - ifd.tagtype[key] = im.tag_v2.tagtype[key] - - # preserve ICC profile (should also work when saving other formats - # which support profiles as TIFF) -- 2008-06-06 Florian Hoech - icc = encoderinfo.get("icc_profile", im.info.get("icc_profile")) - if icc: - ifd[ICCPROFILE] = icc - - for key, name in [ - (IMAGEDESCRIPTION, "description"), - (X_RESOLUTION, "resolution"), - (Y_RESOLUTION, "resolution"), - (X_RESOLUTION, "x_resolution"), - (Y_RESOLUTION, "y_resolution"), - (RESOLUTION_UNIT, "resolution_unit"), - (SOFTWARE, "software"), - (DATE_TIME, "date_time"), - (ARTIST, "artist"), - (COPYRIGHT, "copyright"), - ]: - if name in encoderinfo: - ifd[key] = encoderinfo[name] - - dpi = encoderinfo.get("dpi") - if dpi: - ifd[RESOLUTION_UNIT] = 2 - ifd[X_RESOLUTION] = dpi[0] - ifd[Y_RESOLUTION] = dpi[1] - - if bits != (1,): - ifd[BITSPERSAMPLE] = bits - if len(bits) != 1: - ifd[SAMPLESPERPIXEL] = len(bits) - if extra is not None: - ifd[EXTRASAMPLES] = extra - if format != 1: - ifd[SAMPLEFORMAT] = format - - if PHOTOMETRIC_INTERPRETATION not in ifd: - ifd[PHOTOMETRIC_INTERPRETATION] = photo - elif im.mode in ("1", "L") and ifd[PHOTOMETRIC_INTERPRETATION] == 0: - if im.mode == "1": - inverted_im = im.copy() - px = inverted_im.load() - if px is not None: - for y in range(inverted_im.height): - for x in range(inverted_im.width): - px[x, y] = 0 if px[x, y] == 255 else 255 - im = inverted_im - else: - im = ImageOps.invert(im) - - if im.mode in ["P", "PA"]: - lut = im.im.getpalette("RGB", "RGB;L") - colormap = [] - colors = len(lut) // 3 - for i in range(3): - colormap += [v * 256 for v in lut[colors * i : colors * (i + 1)]] - colormap += [0] * (256 - colors) - ifd[COLORMAP] = colormap - # data orientation - w, h = ifd[IMAGEWIDTH], ifd[IMAGELENGTH] - stride = len(bits) * ((w * bits[0] + 7) // 8) - if ROWSPERSTRIP not in ifd: - # aim for given strip size (64 KB by default) when using libtiff writer - if libtiff: - im_strip_size = encoderinfo.get("strip_size", STRIP_SIZE) - rows_per_strip = 1 if stride == 0 else min(im_strip_size // stride, h) - # JPEG encoder expects multiple of 8 rows - if compression == "jpeg": - rows_per_strip = min(((rows_per_strip + 7) // 8) * 8, h) - else: - rows_per_strip = h - if rows_per_strip == 0: - rows_per_strip = 1 - ifd[ROWSPERSTRIP] = rows_per_strip - strip_byte_counts = 1 if stride == 0 else stride * ifd[ROWSPERSTRIP] - strips_per_image = (h + ifd[ROWSPERSTRIP] - 1) // ifd[ROWSPERSTRIP] - if strip_byte_counts >= 2**16: - ifd.tagtype[STRIPBYTECOUNTS] = TiffTags.LONG - ifd[STRIPBYTECOUNTS] = (strip_byte_counts,) * (strips_per_image - 1) + ( - stride * h - strip_byte_counts * (strips_per_image - 1), - ) - ifd[STRIPOFFSETS] = tuple( - range(0, strip_byte_counts * strips_per_image, strip_byte_counts) - ) # this is adjusted by IFD writer - # no compression by default: - ifd[COMPRESSION] = COMPRESSION_INFO_REV.get(compression, 1) - - if im.mode == "YCbCr": - for tag, default_value in { - YCBCRSUBSAMPLING: (1, 1), - REFERENCEBLACKWHITE: (0, 255, 128, 255, 128, 255), - }.items(): - ifd.setdefault(tag, default_value) - - blocklist = [TILEWIDTH, TILELENGTH, TILEOFFSETS, TILEBYTECOUNTS] - if libtiff: - if "quality" in encoderinfo: - quality = encoderinfo["quality"] - if not isinstance(quality, int) or quality < 0 or quality > 100: - msg = "Invalid quality setting" - raise ValueError(msg) - if compression != "jpeg": - msg = "quality setting only supported for 'jpeg' compression" - raise ValueError(msg) - ifd[JPEGQUALITY] = quality - - logger.debug("Saving using libtiff encoder") - logger.debug("Items: %s", sorted(ifd.items())) - _fp = 0 - if hasattr(fp, "fileno"): - try: - fp.seek(0) - _fp = fp.fileno() - except io.UnsupportedOperation: - pass - - # optional types for non core tags - types = {} - # STRIPOFFSETS and STRIPBYTECOUNTS are added by the library - # based on the data in the strip. - # OSUBFILETYPE is deprecated. - # The other tags expect arrays with a certain length (fixed or depending on - # BITSPERSAMPLE, etc), passing arrays with a different length will result in - # segfaults. Block these tags until we add extra validation. - # SUBIFD may also cause a segfault. - blocklist += [ - OSUBFILETYPE, - REFERENCEBLACKWHITE, - STRIPBYTECOUNTS, - STRIPOFFSETS, - TRANSFERFUNCTION, - SUBIFD, - ] - - # bits per sample is a single short in the tiff directory, not a list. - atts: dict[int, Any] = {BITSPERSAMPLE: bits[0]} - # Merge the ones that we have with (optional) more bits from - # the original file, e.g x,y resolution so that we can - # save(load('')) == original file. - for tag, value in itertools.chain(ifd.items(), supplied_tags.items()): - # Libtiff can only process certain core items without adding - # them to the custom dictionary. - # Custom items are supported for int, float, unicode, string and byte - # values. Other types and tuples require a tagtype. - if tag not in TiffTags.LIBTIFF_CORE: - if tag in TiffTags.TAGS_V2_GROUPS: - types[tag] = TiffTags.LONG8 - elif tag in ifd.tagtype: - types[tag] = ifd.tagtype[tag] - elif isinstance(value, (int, float, str, bytes)) or ( - isinstance(value, tuple) - and all(isinstance(v, (int, float, IFDRational)) for v in value) - ): - type = TiffTags.lookup(tag).type - if type: - types[tag] = type - if tag not in atts and tag not in blocklist: - if isinstance(value, str): - atts[tag] = value.encode("ascii", "replace") + b"\0" - elif isinstance(value, IFDRational): - atts[tag] = float(value) - else: - atts[tag] = value - - if SAMPLEFORMAT in atts and len(atts[SAMPLEFORMAT]) == 1: - atts[SAMPLEFORMAT] = atts[SAMPLEFORMAT][0] - - logger.debug("Converted items: %s", sorted(atts.items())) - - # libtiff always expects the bytes in native order. - # we're storing image byte order. So, if the rawmode - # contains I;16, we need to convert from native to image - # byte order. - if im.mode in ("I;16", "I;16B", "I;16L"): - rawmode = "I;16N" - - # Pass tags as sorted list so that the tags are set in a fixed order. - # This is required by libtiff for some tags. For example, the JPEGQUALITY - # pseudo tag requires that the COMPRESS tag was already set. - tags = list(atts.items()) - tags.sort() - a = (rawmode, compression, _fp, filename, tags, types) - encoder = Image._getencoder(im.mode, "libtiff", a, encoderconfig) - encoder.setimage(im.im, (0, 0) + im.size) - while True: - errcode, data = encoder.encode(ImageFile.MAXBLOCK)[1:] - if not _fp: - fp.write(data) - if errcode: - break - if errcode < 0: - msg = f"encoder error {errcode} when writing image file" - raise OSError(msg) - - else: - for tag in blocklist: - del ifd[tag] - offset = ifd.save(fp) - - ImageFile._save( - im, - fp, - [ImageFile._Tile("raw", (0, 0) + im.size, offset, (rawmode, stride, 1))], - ) - - # -- helper for multi-page save -- - if "_debug_multipage" in encoderinfo: - # just to access o32 and o16 (using correct byte order) - setattr(im, "_debug_multipage", ifd) - - -class AppendingTiffWriter(io.BytesIO): - fieldSizes = [ - 0, # None - 1, # byte - 1, # ascii - 2, # short - 4, # long - 8, # rational - 1, # sbyte - 1, # undefined - 2, # sshort - 4, # slong - 8, # srational - 4, # float - 8, # double - 4, # ifd - 2, # unicode - 4, # complex - 8, # long8 - ] - - Tags = { - 273, # StripOffsets - 288, # FreeOffsets - 324, # TileOffsets - 519, # JPEGQTables - 520, # JPEGDCTables - 521, # JPEGACTables - } - - def __init__(self, fn: StrOrBytesPath | IO[bytes], new: bool = False) -> None: - self.f: IO[bytes] - if is_path(fn): - self.name = fn - self.close_fp = True - try: - self.f = open(fn, "w+b" if new else "r+b") - except OSError: - self.f = open(fn, "w+b") - else: - self.f = cast(IO[bytes], fn) - self.close_fp = False - self.beginning = self.f.tell() - self.setup() - - def setup(self) -> None: - # Reset everything. - self.f.seek(self.beginning, os.SEEK_SET) - - self.whereToWriteNewIFDOffset: int | None = None - self.offsetOfNewPage = 0 - - self.IIMM = iimm = self.f.read(4) - self._bigtiff = b"\x2b" in iimm - if not iimm: - # empty file - first page - self.isFirst = True - return - - self.isFirst = False - if iimm not in PREFIXES: - msg = "Invalid TIFF file header" - raise RuntimeError(msg) - - self.setEndian("<" if iimm.startswith(II) else ">") - - if self._bigtiff: - self.f.seek(4, os.SEEK_CUR) - self.skipIFDs() - self.goToEnd() - - def finalize(self) -> None: - if self.isFirst: - return - - # fix offsets - self.f.seek(self.offsetOfNewPage) - - iimm = self.f.read(4) - if not iimm: - # Make it easy to finish a frame without committing to a new one. - return - - if iimm != self.IIMM: - msg = "IIMM of new page doesn't match IIMM of first page" - raise RuntimeError(msg) - - if self._bigtiff: - self.f.seek(4, os.SEEK_CUR) - ifd_offset = self._read(8 if self._bigtiff else 4) - ifd_offset += self.offsetOfNewPage - assert self.whereToWriteNewIFDOffset is not None - self.f.seek(self.whereToWriteNewIFDOffset) - self._write(ifd_offset, 8 if self._bigtiff else 4) - self.f.seek(ifd_offset) - self.fixIFD() - - def newFrame(self) -> None: - # Call this to finish a frame. - self.finalize() - self.setup() - - def __enter__(self) -> AppendingTiffWriter: - return self - - def __exit__(self, *args: object) -> None: - if self.close_fp: - self.close() - - def tell(self) -> int: - return self.f.tell() - self.offsetOfNewPage - - def seek(self, offset: int, whence: int = io.SEEK_SET) -> int: - """ - :param offset: Distance to seek. - :param whence: Whether the distance is relative to the start, - end or current position. - :returns: The resulting position, relative to the start. - """ - if whence == os.SEEK_SET: - offset += self.offsetOfNewPage - - self.f.seek(offset, whence) - return self.tell() - - def goToEnd(self) -> None: - self.f.seek(0, os.SEEK_END) - pos = self.f.tell() - - # pad to 16 byte boundary - pad_bytes = 16 - pos % 16 - if 0 < pad_bytes < 16: - self.f.write(bytes(pad_bytes)) - self.offsetOfNewPage = self.f.tell() - - def setEndian(self, endian: str) -> None: - self.endian = endian - self.longFmt = f"{self.endian}L" - self.shortFmt = f"{self.endian}H" - self.tagFormat = f"{self.endian}HH" + ("Q" if self._bigtiff else "L") - - def skipIFDs(self) -> None: - while True: - ifd_offset = self._read(8 if self._bigtiff else 4) - if ifd_offset == 0: - self.whereToWriteNewIFDOffset = self.f.tell() - ( - 8 if self._bigtiff else 4 - ) - break - - self.f.seek(ifd_offset) - num_tags = self._read(8 if self._bigtiff else 2) - self.f.seek(num_tags * (20 if self._bigtiff else 12), os.SEEK_CUR) - - def write(self, data: Buffer, /) -> int: - return self.f.write(data) - - def _fmt(self, field_size: int) -> str: - try: - return {2: "H", 4: "L", 8: "Q"}[field_size] - except KeyError: - msg = "offset is not supported" - raise RuntimeError(msg) - - def _read(self, field_size: int) -> int: - (value,) = struct.unpack( - self.endian + self._fmt(field_size), self.f.read(field_size) - ) - return value - - def readShort(self) -> int: - return self._read(2) - - def readLong(self) -> int: - return self._read(4) - - @staticmethod - def _verify_bytes_written(bytes_written: int | None, expected: int) -> None: - if bytes_written is not None and bytes_written != expected: - msg = f"wrote only {bytes_written} bytes but wanted {expected}" - raise RuntimeError(msg) - - def _rewriteLast( - self, value: int, field_size: int, new_field_size: int = 0 - ) -> None: - self.f.seek(-field_size, os.SEEK_CUR) - if not new_field_size: - new_field_size = field_size - bytes_written = self.f.write( - struct.pack(self.endian + self._fmt(new_field_size), value) - ) - self._verify_bytes_written(bytes_written, new_field_size) - - def rewriteLastShortToLong(self, value: int) -> None: - self._rewriteLast(value, 2, 4) - - def rewriteLastShort(self, value: int) -> None: - return self._rewriteLast(value, 2) - - def rewriteLastLong(self, value: int) -> None: - return self._rewriteLast(value, 4) - - def _write(self, value: int, field_size: int) -> None: - bytes_written = self.f.write( - struct.pack(self.endian + self._fmt(field_size), value) - ) - self._verify_bytes_written(bytes_written, field_size) - - def writeShort(self, value: int) -> None: - self._write(value, 2) - - def writeLong(self, value: int) -> None: - self._write(value, 4) - - def close(self) -> None: - self.finalize() - if self.close_fp: - self.f.close() - - def fixIFD(self) -> None: - num_tags = self._read(8 if self._bigtiff else 2) - - for i in range(num_tags): - tag, field_type, count = struct.unpack( - self.tagFormat, self.f.read(12 if self._bigtiff else 8) - ) - - field_size = self.fieldSizes[field_type] - total_size = field_size * count - fmt_size = 8 if self._bigtiff else 4 - is_local = total_size <= fmt_size - if not is_local: - offset = self._read(fmt_size) + self.offsetOfNewPage - self._rewriteLast(offset, fmt_size) - - if tag in self.Tags: - cur_pos = self.f.tell() - - logger.debug( - "fixIFD: %s (%d) - type: %s (%d) - type size: %d - count: %d", - TiffTags.lookup(tag).name, - tag, - TYPES.get(field_type, "unknown"), - field_type, - field_size, - count, - ) - - if is_local: - self._fixOffsets(count, field_size) - self.f.seek(cur_pos + fmt_size) - else: - self.f.seek(offset) - self._fixOffsets(count, field_size) - self.f.seek(cur_pos) - - elif is_local: - # skip the locally stored value that is not an offset - self.f.seek(fmt_size, os.SEEK_CUR) - - def _fixOffsets(self, count: int, field_size: int) -> None: - for i in range(count): - offset = self._read(field_size) - offset += self.offsetOfNewPage - - new_field_size = 0 - if self._bigtiff and field_size in (2, 4) and offset >= 2**32: - # offset is now too large - we must convert long to long8 - new_field_size = 8 - elif field_size == 2 and offset >= 2**16: - # offset is now too large - we must convert short to long - new_field_size = 4 - if new_field_size: - if count != 1: - msg = "not implemented" - raise RuntimeError(msg) # XXX TODO - - # simple case - the offset is just one and therefore it is - # local (not referenced with another offset) - self._rewriteLast(offset, field_size, new_field_size) - # Move back past the new offset, past 'count', and before 'field_type' - rewind = -new_field_size - 4 - 2 - self.f.seek(rewind, os.SEEK_CUR) - self.writeShort(new_field_size) # rewrite the type - self.f.seek(2 - rewind, os.SEEK_CUR) - else: - self._rewriteLast(offset, field_size) - - def fixOffsets( - self, count: int, isShort: bool = False, isLong: bool = False - ) -> None: - if isShort: - field_size = 2 - elif isLong: - field_size = 4 - else: - field_size = 0 - return self._fixOffsets(count, field_size) - - -def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - append_images = list(im.encoderinfo.get("append_images", [])) - if not hasattr(im, "n_frames") and not append_images: - return _save(im, fp, filename) - - cur_idx = im.tell() - try: - with AppendingTiffWriter(fp) as tf: - for ims in [im] + append_images: - encoderinfo = ims._attach_default_encoderinfo(im) - if not hasattr(ims, "encoderconfig"): - ims.encoderconfig = () - nfr = getattr(ims, "n_frames", 1) - - for idx in range(nfr): - ims.seek(idx) - ims.load() - _save(ims, tf, filename) - tf.newFrame() - ims.encoderinfo = encoderinfo - finally: - im.seek(cur_idx) - - -# -# -------------------------------------------------------------------- -# Register - -Image.register_open(TiffImageFile.format, TiffImageFile, _accept) -Image.register_save(TiffImageFile.format, _save) -Image.register_save_all(TiffImageFile.format, _save_all) - -Image.register_extensions(TiffImageFile.format, [".tif", ".tiff"]) - -Image.register_mime(TiffImageFile.format, "image/tiff") diff --git a/voxvera/vendor/PIL/TiffTags.py b/voxvera/vendor/PIL/TiffTags.py deleted file mode 100644 index 613a3b7..0000000 --- a/voxvera/vendor/PIL/TiffTags.py +++ /dev/null @@ -1,566 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# TIFF tags -# -# This module provides clear-text names for various well-known -# TIFF tags. the TIFF codec works just fine without it. -# -# Copyright (c) Secret Labs AB 1999. -# -# See the README file for information on usage and redistribution. -# - -## -# This module provides constants and clear-text names for various -# well-known TIFF tags. -## -from __future__ import annotations - -from typing import NamedTuple - - -class _TagInfo(NamedTuple): - value: int | None - name: str - type: int | None - length: int | None - enum: dict[str, int] - - -class TagInfo(_TagInfo): - __slots__: list[str] = [] - - def __new__( - cls, - value: int | None = None, - name: str = "unknown", - type: int | None = None, - length: int | None = None, - enum: dict[str, int] | None = None, - ) -> TagInfo: - return super().__new__(cls, value, name, type, length, enum or {}) - - def cvt_enum(self, value: str) -> int | str: - # Using get will call hash(value), which can be expensive - # for some types (e.g. Fraction). Since self.enum is rarely - # used, it's usually better to test it first. - return self.enum.get(value, value) if self.enum else value - - -def lookup(tag: int, group: int | None = None) -> TagInfo: - """ - :param tag: Integer tag number - :param group: Which :py:data:`~PIL.TiffTags.TAGS_V2_GROUPS` to look in - - .. versionadded:: 8.3.0 - - :returns: Taginfo namedtuple, From the ``TAGS_V2`` info if possible, - otherwise just populating the value and name from ``TAGS``. - If the tag is not recognized, "unknown" is returned for the name - - """ - - if group is not None: - info = TAGS_V2_GROUPS[group].get(tag) if group in TAGS_V2_GROUPS else None - else: - info = TAGS_V2.get(tag) - return info or TagInfo(tag, TAGS.get(tag, "unknown")) - - -## -# Map tag numbers to tag info. -# -# id: (Name, Type, Length[, enum_values]) -# -# The length here differs from the length in the tiff spec. For -# numbers, the tiff spec is for the number of fields returned. We -# agree here. For string-like types, the tiff spec uses the length of -# field in bytes. In Pillow, we are using the number of expected -# fields, in general 1 for string-like types. - - -BYTE = 1 -ASCII = 2 -SHORT = 3 -LONG = 4 -RATIONAL = 5 -SIGNED_BYTE = 6 -UNDEFINED = 7 -SIGNED_SHORT = 8 -SIGNED_LONG = 9 -SIGNED_RATIONAL = 10 -FLOAT = 11 -DOUBLE = 12 -IFD = 13 -LONG8 = 16 - -_tags_v2: dict[int, tuple[str, int, int] | tuple[str, int, int, dict[str, int]]] = { - 254: ("NewSubfileType", LONG, 1), - 255: ("SubfileType", SHORT, 1), - 256: ("ImageWidth", LONG, 1), - 257: ("ImageLength", LONG, 1), - 258: ("BitsPerSample", SHORT, 0), - 259: ( - "Compression", - SHORT, - 1, - { - "Uncompressed": 1, - "CCITT 1d": 2, - "Group 3 Fax": 3, - "Group 4 Fax": 4, - "LZW": 5, - "JPEG": 6, - "PackBits": 32773, - }, - ), - 262: ( - "PhotometricInterpretation", - SHORT, - 1, - { - "WhiteIsZero": 0, - "BlackIsZero": 1, - "RGB": 2, - "RGB Palette": 3, - "Transparency Mask": 4, - "CMYK": 5, - "YCbCr": 6, - "CieLAB": 8, - "CFA": 32803, # TIFF/EP, Adobe DNG - "LinearRaw": 32892, # Adobe DNG - }, - ), - 263: ("Threshholding", SHORT, 1), - 264: ("CellWidth", SHORT, 1), - 265: ("CellLength", SHORT, 1), - 266: ("FillOrder", SHORT, 1), - 269: ("DocumentName", ASCII, 1), - 270: ("ImageDescription", ASCII, 1), - 271: ("Make", ASCII, 1), - 272: ("Model", ASCII, 1), - 273: ("StripOffsets", LONG, 0), - 274: ("Orientation", SHORT, 1), - 277: ("SamplesPerPixel", SHORT, 1), - 278: ("RowsPerStrip", LONG, 1), - 279: ("StripByteCounts", LONG, 0), - 280: ("MinSampleValue", SHORT, 0), - 281: ("MaxSampleValue", SHORT, 0), - 282: ("XResolution", RATIONAL, 1), - 283: ("YResolution", RATIONAL, 1), - 284: ("PlanarConfiguration", SHORT, 1, {"Contiguous": 1, "Separate": 2}), - 285: ("PageName", ASCII, 1), - 286: ("XPosition", RATIONAL, 1), - 287: ("YPosition", RATIONAL, 1), - 288: ("FreeOffsets", LONG, 1), - 289: ("FreeByteCounts", LONG, 1), - 290: ("GrayResponseUnit", SHORT, 1), - 291: ("GrayResponseCurve", SHORT, 0), - 292: ("T4Options", LONG, 1), - 293: ("T6Options", LONG, 1), - 296: ("ResolutionUnit", SHORT, 1, {"none": 1, "inch": 2, "cm": 3}), - 297: ("PageNumber", SHORT, 2), - 301: ("TransferFunction", SHORT, 0), - 305: ("Software", ASCII, 1), - 306: ("DateTime", ASCII, 1), - 315: ("Artist", ASCII, 1), - 316: ("HostComputer", ASCII, 1), - 317: ("Predictor", SHORT, 1, {"none": 1, "Horizontal Differencing": 2}), - 318: ("WhitePoint", RATIONAL, 2), - 319: ("PrimaryChromaticities", RATIONAL, 6), - 320: ("ColorMap", SHORT, 0), - 321: ("HalftoneHints", SHORT, 2), - 322: ("TileWidth", LONG, 1), - 323: ("TileLength", LONG, 1), - 324: ("TileOffsets", LONG, 0), - 325: ("TileByteCounts", LONG, 0), - 330: ("SubIFDs", LONG, 0), - 332: ("InkSet", SHORT, 1), - 333: ("InkNames", ASCII, 1), - 334: ("NumberOfInks", SHORT, 1), - 336: ("DotRange", SHORT, 0), - 337: ("TargetPrinter", ASCII, 1), - 338: ("ExtraSamples", SHORT, 0), - 339: ("SampleFormat", SHORT, 0), - 340: ("SMinSampleValue", DOUBLE, 0), - 341: ("SMaxSampleValue", DOUBLE, 0), - 342: ("TransferRange", SHORT, 6), - 347: ("JPEGTables", UNDEFINED, 1), - # obsolete JPEG tags - 512: ("JPEGProc", SHORT, 1), - 513: ("JPEGInterchangeFormat", LONG, 1), - 514: ("JPEGInterchangeFormatLength", LONG, 1), - 515: ("JPEGRestartInterval", SHORT, 1), - 517: ("JPEGLosslessPredictors", SHORT, 0), - 518: ("JPEGPointTransforms", SHORT, 0), - 519: ("JPEGQTables", LONG, 0), - 520: ("JPEGDCTables", LONG, 0), - 521: ("JPEGACTables", LONG, 0), - 529: ("YCbCrCoefficients", RATIONAL, 3), - 530: ("YCbCrSubSampling", SHORT, 2), - 531: ("YCbCrPositioning", SHORT, 1), - 532: ("ReferenceBlackWhite", RATIONAL, 6), - 700: ("XMP", BYTE, 0), - # Four private SGI tags - 32995: ("Matteing", SHORT, 1), - 32996: ("DataType", SHORT, 0), - 32997: ("ImageDepth", LONG, 1), - 32998: ("TileDepth", LONG, 1), - 33432: ("Copyright", ASCII, 1), - 33723: ("IptcNaaInfo", UNDEFINED, 1), - 34377: ("PhotoshopInfo", BYTE, 0), - # FIXME add more tags here - 34665: ("ExifIFD", LONG, 1), - 34675: ("ICCProfile", UNDEFINED, 1), - 34853: ("GPSInfoIFD", LONG, 1), - 36864: ("ExifVersion", UNDEFINED, 1), - 37724: ("ImageSourceData", UNDEFINED, 1), - 40965: ("InteroperabilityIFD", LONG, 1), - 41730: ("CFAPattern", UNDEFINED, 1), - # MPInfo - 45056: ("MPFVersion", UNDEFINED, 1), - 45057: ("NumberOfImages", LONG, 1), - 45058: ("MPEntry", UNDEFINED, 1), - 45059: ("ImageUIDList", UNDEFINED, 0), # UNDONE, check - 45060: ("TotalFrames", LONG, 1), - 45313: ("MPIndividualNum", LONG, 1), - 45569: ("PanOrientation", LONG, 1), - 45570: ("PanOverlap_H", RATIONAL, 1), - 45571: ("PanOverlap_V", RATIONAL, 1), - 45572: ("BaseViewpointNum", LONG, 1), - 45573: ("ConvergenceAngle", SIGNED_RATIONAL, 1), - 45574: ("BaselineLength", RATIONAL, 1), - 45575: ("VerticalDivergence", SIGNED_RATIONAL, 1), - 45576: ("AxisDistance_X", SIGNED_RATIONAL, 1), - 45577: ("AxisDistance_Y", SIGNED_RATIONAL, 1), - 45578: ("AxisDistance_Z", SIGNED_RATIONAL, 1), - 45579: ("YawAngle", SIGNED_RATIONAL, 1), - 45580: ("PitchAngle", SIGNED_RATIONAL, 1), - 45581: ("RollAngle", SIGNED_RATIONAL, 1), - 40960: ("FlashPixVersion", UNDEFINED, 1), - 50741: ("MakerNoteSafety", SHORT, 1, {"Unsafe": 0, "Safe": 1}), - 50780: ("BestQualityScale", RATIONAL, 1), - 50838: ("ImageJMetaDataByteCounts", LONG, 0), # Can be more than one - 50839: ("ImageJMetaData", UNDEFINED, 1), # see Issue #2006 -} -_tags_v2_groups = { - # ExifIFD - 34665: { - 36864: ("ExifVersion", UNDEFINED, 1), - 40960: ("FlashPixVersion", UNDEFINED, 1), - 40965: ("InteroperabilityIFD", LONG, 1), - 41730: ("CFAPattern", UNDEFINED, 1), - }, - # GPSInfoIFD - 34853: { - 0: ("GPSVersionID", BYTE, 4), - 1: ("GPSLatitudeRef", ASCII, 2), - 2: ("GPSLatitude", RATIONAL, 3), - 3: ("GPSLongitudeRef", ASCII, 2), - 4: ("GPSLongitude", RATIONAL, 3), - 5: ("GPSAltitudeRef", BYTE, 1), - 6: ("GPSAltitude", RATIONAL, 1), - 7: ("GPSTimeStamp", RATIONAL, 3), - 8: ("GPSSatellites", ASCII, 0), - 9: ("GPSStatus", ASCII, 2), - 10: ("GPSMeasureMode", ASCII, 2), - 11: ("GPSDOP", RATIONAL, 1), - 12: ("GPSSpeedRef", ASCII, 2), - 13: ("GPSSpeed", RATIONAL, 1), - 14: ("GPSTrackRef", ASCII, 2), - 15: ("GPSTrack", RATIONAL, 1), - 16: ("GPSImgDirectionRef", ASCII, 2), - 17: ("GPSImgDirection", RATIONAL, 1), - 18: ("GPSMapDatum", ASCII, 0), - 19: ("GPSDestLatitudeRef", ASCII, 2), - 20: ("GPSDestLatitude", RATIONAL, 3), - 21: ("GPSDestLongitudeRef", ASCII, 2), - 22: ("GPSDestLongitude", RATIONAL, 3), - 23: ("GPSDestBearingRef", ASCII, 2), - 24: ("GPSDestBearing", RATIONAL, 1), - 25: ("GPSDestDistanceRef", ASCII, 2), - 26: ("GPSDestDistance", RATIONAL, 1), - 27: ("GPSProcessingMethod", UNDEFINED, 0), - 28: ("GPSAreaInformation", UNDEFINED, 0), - 29: ("GPSDateStamp", ASCII, 11), - 30: ("GPSDifferential", SHORT, 1), - }, - # InteroperabilityIFD - 40965: {1: ("InteropIndex", ASCII, 1), 2: ("InteropVersion", UNDEFINED, 1)}, -} - -# Legacy Tags structure -# these tags aren't included above, but were in the previous versions -TAGS: dict[int | tuple[int, int], str] = { - 347: "JPEGTables", - 700: "XMP", - # Additional Exif Info - 32932: "Wang Annotation", - 33434: "ExposureTime", - 33437: "FNumber", - 33445: "MD FileTag", - 33446: "MD ScalePixel", - 33447: "MD ColorTable", - 33448: "MD LabName", - 33449: "MD SampleInfo", - 33450: "MD PrepDate", - 33451: "MD PrepTime", - 33452: "MD FileUnits", - 33550: "ModelPixelScaleTag", - 33723: "IptcNaaInfo", - 33918: "INGR Packet Data Tag", - 33919: "INGR Flag Registers", - 33920: "IrasB Transformation Matrix", - 33922: "ModelTiepointTag", - 34264: "ModelTransformationTag", - 34377: "PhotoshopInfo", - 34735: "GeoKeyDirectoryTag", - 34736: "GeoDoubleParamsTag", - 34737: "GeoAsciiParamsTag", - 34850: "ExposureProgram", - 34852: "SpectralSensitivity", - 34855: "ISOSpeedRatings", - 34856: "OECF", - 34864: "SensitivityType", - 34865: "StandardOutputSensitivity", - 34866: "RecommendedExposureIndex", - 34867: "ISOSpeed", - 34868: "ISOSpeedLatitudeyyy", - 34869: "ISOSpeedLatitudezzz", - 34908: "HylaFAX FaxRecvParams", - 34909: "HylaFAX FaxSubAddress", - 34910: "HylaFAX FaxRecvTime", - 36864: "ExifVersion", - 36867: "DateTimeOriginal", - 36868: "DateTimeDigitized", - 37121: "ComponentsConfiguration", - 37122: "CompressedBitsPerPixel", - 37724: "ImageSourceData", - 37377: "ShutterSpeedValue", - 37378: "ApertureValue", - 37379: "BrightnessValue", - 37380: "ExposureBiasValue", - 37381: "MaxApertureValue", - 37382: "SubjectDistance", - 37383: "MeteringMode", - 37384: "LightSource", - 37385: "Flash", - 37386: "FocalLength", - 37396: "SubjectArea", - 37500: "MakerNote", - 37510: "UserComment", - 37520: "SubSec", - 37521: "SubSecTimeOriginal", - 37522: "SubsecTimeDigitized", - 40960: "FlashPixVersion", - 40961: "ColorSpace", - 40962: "PixelXDimension", - 40963: "PixelYDimension", - 40964: "RelatedSoundFile", - 40965: "InteroperabilityIFD", - 41483: "FlashEnergy", - 41484: "SpatialFrequencyResponse", - 41486: "FocalPlaneXResolution", - 41487: "FocalPlaneYResolution", - 41488: "FocalPlaneResolutionUnit", - 41492: "SubjectLocation", - 41493: "ExposureIndex", - 41495: "SensingMethod", - 41728: "FileSource", - 41729: "SceneType", - 41730: "CFAPattern", - 41985: "CustomRendered", - 41986: "ExposureMode", - 41987: "WhiteBalance", - 41988: "DigitalZoomRatio", - 41989: "FocalLengthIn35mmFilm", - 41990: "SceneCaptureType", - 41991: "GainControl", - 41992: "Contrast", - 41993: "Saturation", - 41994: "Sharpness", - 41995: "DeviceSettingDescription", - 41996: "SubjectDistanceRange", - 42016: "ImageUniqueID", - 42032: "CameraOwnerName", - 42033: "BodySerialNumber", - 42034: "LensSpecification", - 42035: "LensMake", - 42036: "LensModel", - 42037: "LensSerialNumber", - 42112: "GDAL_METADATA", - 42113: "GDAL_NODATA", - 42240: "Gamma", - 50215: "Oce Scanjob Description", - 50216: "Oce Application Selector", - 50217: "Oce Identification Number", - 50218: "Oce ImageLogic Characteristics", - # Adobe DNG - 50706: "DNGVersion", - 50707: "DNGBackwardVersion", - 50708: "UniqueCameraModel", - 50709: "LocalizedCameraModel", - 50710: "CFAPlaneColor", - 50711: "CFALayout", - 50712: "LinearizationTable", - 50713: "BlackLevelRepeatDim", - 50714: "BlackLevel", - 50715: "BlackLevelDeltaH", - 50716: "BlackLevelDeltaV", - 50717: "WhiteLevel", - 50718: "DefaultScale", - 50719: "DefaultCropOrigin", - 50720: "DefaultCropSize", - 50721: "ColorMatrix1", - 50722: "ColorMatrix2", - 50723: "CameraCalibration1", - 50724: "CameraCalibration2", - 50725: "ReductionMatrix1", - 50726: "ReductionMatrix2", - 50727: "AnalogBalance", - 50728: "AsShotNeutral", - 50729: "AsShotWhiteXY", - 50730: "BaselineExposure", - 50731: "BaselineNoise", - 50732: "BaselineSharpness", - 50733: "BayerGreenSplit", - 50734: "LinearResponseLimit", - 50735: "CameraSerialNumber", - 50736: "LensInfo", - 50737: "ChromaBlurRadius", - 50738: "AntiAliasStrength", - 50740: "DNGPrivateData", - 50778: "CalibrationIlluminant1", - 50779: "CalibrationIlluminant2", - 50784: "Alias Layer Metadata", -} - -TAGS_V2: dict[int, TagInfo] = {} -TAGS_V2_GROUPS: dict[int, dict[int, TagInfo]] = {} - - -def _populate() -> None: - for k, v in _tags_v2.items(): - # Populate legacy structure. - TAGS[k] = v[0] - if len(v) == 4: - for sk, sv in v[3].items(): - TAGS[(k, sv)] = sk - - TAGS_V2[k] = TagInfo(k, *v) - - for group, tags in _tags_v2_groups.items(): - TAGS_V2_GROUPS[group] = {k: TagInfo(k, *v) for k, v in tags.items()} - - -_populate() -## -# Map type numbers to type names -- defined in ImageFileDirectory. - -TYPES: dict[int, str] = {} - -# -# These tags are handled by default in libtiff, without -# adding to the custom dictionary. From tif_dir.c, searching for -# case TIFFTAG in the _TIFFVSetField function: -# Line: item. -# 148: case TIFFTAG_SUBFILETYPE: -# 151: case TIFFTAG_IMAGEWIDTH: -# 154: case TIFFTAG_IMAGELENGTH: -# 157: case TIFFTAG_BITSPERSAMPLE: -# 181: case TIFFTAG_COMPRESSION: -# 202: case TIFFTAG_PHOTOMETRIC: -# 205: case TIFFTAG_THRESHHOLDING: -# 208: case TIFFTAG_FILLORDER: -# 214: case TIFFTAG_ORIENTATION: -# 221: case TIFFTAG_SAMPLESPERPIXEL: -# 228: case TIFFTAG_ROWSPERSTRIP: -# 238: case TIFFTAG_MINSAMPLEVALUE: -# 241: case TIFFTAG_MAXSAMPLEVALUE: -# 244: case TIFFTAG_SMINSAMPLEVALUE: -# 247: case TIFFTAG_SMAXSAMPLEVALUE: -# 250: case TIFFTAG_XRESOLUTION: -# 256: case TIFFTAG_YRESOLUTION: -# 262: case TIFFTAG_PLANARCONFIG: -# 268: case TIFFTAG_XPOSITION: -# 271: case TIFFTAG_YPOSITION: -# 274: case TIFFTAG_RESOLUTIONUNIT: -# 280: case TIFFTAG_PAGENUMBER: -# 284: case TIFFTAG_HALFTONEHINTS: -# 288: case TIFFTAG_COLORMAP: -# 294: case TIFFTAG_EXTRASAMPLES: -# 298: case TIFFTAG_MATTEING: -# 305: case TIFFTAG_TILEWIDTH: -# 316: case TIFFTAG_TILELENGTH: -# 327: case TIFFTAG_TILEDEPTH: -# 333: case TIFFTAG_DATATYPE: -# 344: case TIFFTAG_SAMPLEFORMAT: -# 361: case TIFFTAG_IMAGEDEPTH: -# 364: case TIFFTAG_SUBIFD: -# 376: case TIFFTAG_YCBCRPOSITIONING: -# 379: case TIFFTAG_YCBCRSUBSAMPLING: -# 383: case TIFFTAG_TRANSFERFUNCTION: -# 389: case TIFFTAG_REFERENCEBLACKWHITE: -# 393: case TIFFTAG_INKNAMES: - -# Following pseudo-tags are also handled by default in libtiff: -# TIFFTAG_JPEGQUALITY 65537 - -# some of these are not in our TAGS_V2 dict and were included from tiff.h - -# This list also exists in encode.c -LIBTIFF_CORE = { - 255, - 256, - 257, - 258, - 259, - 262, - 263, - 266, - 274, - 277, - 278, - 280, - 281, - 340, - 341, - 282, - 283, - 284, - 286, - 287, - 296, - 297, - 321, - 320, - 338, - 32995, - 322, - 323, - 32998, - 32996, - 339, - 32997, - 330, - 531, - 530, - 301, - 532, - 333, - # as above - 269, # this has been in our tests forever, and works - 65537, -} - -LIBTIFF_CORE.remove(255) # We don't have support for subfiletypes -LIBTIFF_CORE.remove(322) # We don't have support for writing tiled images with libtiff -LIBTIFF_CORE.remove(323) # Tiled images - -# Note to advanced users: There may be combinations of these -# parameters and values that when added properly, will work and -# produce valid tiff images that may work in your application. -# It is safe to add and remove tags from this set from Pillow's point -# of view so long as you test against libtiff. diff --git a/voxvera/vendor/PIL/WalImageFile.py b/voxvera/vendor/PIL/WalImageFile.py deleted file mode 100644 index fb3e1c0..0000000 --- a/voxvera/vendor/PIL/WalImageFile.py +++ /dev/null @@ -1,128 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# WAL file handling -# -# History: -# 2003-04-23 fl created -# -# Copyright (c) 2003 by Fredrik Lundh. -# -# See the README file for information on usage and redistribution. -# - -""" -This reader is based on the specification available from: -https://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtml -and has been tested with a few sample files found using google. - -.. note:: - This format cannot be automatically recognized, so the reader - is not registered for use with :py:func:`PIL.Image.open()`. - To open a WAL file, use the :py:func:`PIL.WalImageFile.open()` function instead. -""" -from __future__ import annotations - -from typing import IO - -from . import Image, ImageFile -from ._binary import i32le as i32 -from ._typing import StrOrBytesPath - - -class WalImageFile(ImageFile.ImageFile): - format = "WAL" - format_description = "Quake2 Texture" - - def _open(self) -> None: - self._mode = "P" - - # read header fields - assert self.fp is not None - header = self.fp.read(32 + 24 + 32 + 12) - self._size = i32(header, 32), i32(header, 36) - Image._decompression_bomb_check(self.size) - - # load pixel data - offset = i32(header, 40) - self.fp.seek(offset) - - # strings are null-terminated - self.info["name"] = header[:32].split(b"\0", 1)[0] - if next_name := header[56 : 56 + 32].split(b"\0", 1)[0]: - self.info["next_name"] = next_name - - def load(self) -> Image.core.PixelAccess | None: - if self._im is None: - assert self.fp is not None - self.im = Image.core.new(self.mode, self.size) - self.frombytes(self.fp.read(self.size[0] * self.size[1])) - self.putpalette(quake2palette) - return Image.Image.load(self) - - -def open(filename: StrOrBytesPath | IO[bytes]) -> WalImageFile: - """ - Load texture from a Quake2 WAL texture file. - - By default, a Quake2 standard palette is attached to the texture. - To override the palette, use the :py:func:`PIL.Image.Image.putpalette()` method. - - :param filename: WAL file name, or an opened file handle. - :returns: An image instance. - """ - return WalImageFile(filename) - - -quake2palette = ( - # default palette taken from piffo 0.93 by Hans Häggström - b"\x01\x01\x01\x0b\x0b\x0b\x12\x12\x12\x17\x17\x17\x1b\x1b\x1b\x1e" - b"\x1e\x1e\x22\x22\x22\x26\x26\x26\x29\x29\x29\x2c\x2c\x2c\x2f\x2f" - b"\x2f\x32\x32\x32\x35\x35\x35\x37\x37\x37\x3a\x3a\x3a\x3c\x3c\x3c" - b"\x24\x1e\x13\x22\x1c\x12\x20\x1b\x12\x1f\x1a\x10\x1d\x19\x10\x1b" - b"\x17\x0f\x1a\x16\x0f\x18\x14\x0d\x17\x13\x0d\x16\x12\x0d\x14\x10" - b"\x0b\x13\x0f\x0b\x10\x0d\x0a\x0f\x0b\x0a\x0d\x0b\x07\x0b\x0a\x07" - b"\x23\x23\x26\x22\x22\x25\x22\x20\x23\x21\x1f\x22\x20\x1e\x20\x1f" - b"\x1d\x1e\x1d\x1b\x1c\x1b\x1a\x1a\x1a\x19\x19\x18\x17\x17\x17\x16" - b"\x16\x14\x14\x14\x13\x13\x13\x10\x10\x10\x0f\x0f\x0f\x0d\x0d\x0d" - b"\x2d\x28\x20\x29\x24\x1c\x27\x22\x1a\x25\x1f\x17\x38\x2e\x1e\x31" - b"\x29\x1a\x2c\x25\x17\x26\x20\x14\x3c\x30\x14\x37\x2c\x13\x33\x28" - b"\x12\x2d\x24\x10\x28\x1f\x0f\x22\x1a\x0b\x1b\x14\x0a\x13\x0f\x07" - b"\x31\x1a\x16\x30\x17\x13\x2e\x16\x10\x2c\x14\x0d\x2a\x12\x0b\x27" - b"\x0f\x0a\x25\x0f\x07\x21\x0d\x01\x1e\x0b\x01\x1c\x0b\x01\x1a\x0b" - b"\x01\x18\x0a\x01\x16\x0a\x01\x13\x0a\x01\x10\x07\x01\x0d\x07\x01" - b"\x29\x23\x1e\x27\x21\x1c\x26\x20\x1b\x25\x1f\x1a\x23\x1d\x19\x21" - b"\x1c\x18\x20\x1b\x17\x1e\x19\x16\x1c\x18\x14\x1b\x17\x13\x19\x14" - b"\x10\x17\x13\x0f\x14\x10\x0d\x12\x0f\x0b\x0f\x0b\x0a\x0b\x0a\x07" - b"\x26\x1a\x0f\x23\x19\x0f\x20\x17\x0f\x1c\x16\x0f\x19\x13\x0d\x14" - b"\x10\x0b\x10\x0d\x0a\x0b\x0a\x07\x33\x22\x1f\x35\x29\x26\x37\x2f" - b"\x2d\x39\x35\x34\x37\x39\x3a\x33\x37\x39\x30\x34\x36\x2b\x31\x34" - b"\x27\x2e\x31\x22\x2b\x2f\x1d\x28\x2c\x17\x25\x2a\x0f\x20\x26\x0d" - b"\x1e\x25\x0b\x1c\x22\x0a\x1b\x20\x07\x19\x1e\x07\x17\x1b\x07\x14" - b"\x18\x01\x12\x16\x01\x0f\x12\x01\x0b\x0d\x01\x07\x0a\x01\x01\x01" - b"\x2c\x21\x21\x2a\x1f\x1f\x29\x1d\x1d\x27\x1c\x1c\x26\x1a\x1a\x24" - b"\x18\x18\x22\x17\x17\x21\x16\x16\x1e\x13\x13\x1b\x12\x12\x18\x10" - b"\x10\x16\x0d\x0d\x12\x0b\x0b\x0d\x0a\x0a\x0a\x07\x07\x01\x01\x01" - b"\x2e\x30\x29\x2d\x2e\x27\x2b\x2c\x26\x2a\x2a\x24\x28\x29\x23\x27" - b"\x27\x21\x26\x26\x1f\x24\x24\x1d\x22\x22\x1c\x1f\x1f\x1a\x1c\x1c" - b"\x18\x19\x19\x16\x17\x17\x13\x13\x13\x10\x0f\x0f\x0d\x0b\x0b\x0a" - b"\x30\x1e\x1b\x2d\x1c\x19\x2c\x1a\x17\x2a\x19\x14\x28\x17\x13\x26" - b"\x16\x10\x24\x13\x0f\x21\x12\x0d\x1f\x10\x0b\x1c\x0f\x0a\x19\x0d" - b"\x0a\x16\x0b\x07\x12\x0a\x07\x0f\x07\x01\x0a\x01\x01\x01\x01\x01" - b"\x28\x29\x38\x26\x27\x36\x25\x26\x34\x24\x24\x31\x22\x22\x2f\x20" - b"\x21\x2d\x1e\x1f\x2a\x1d\x1d\x27\x1b\x1b\x25\x19\x19\x21\x17\x17" - b"\x1e\x14\x14\x1b\x13\x12\x17\x10\x0f\x13\x0d\x0b\x0f\x0a\x07\x07" - b"\x2f\x32\x29\x2d\x30\x26\x2b\x2e\x24\x29\x2c\x21\x27\x2a\x1e\x25" - b"\x28\x1c\x23\x26\x1a\x21\x25\x18\x1e\x22\x14\x1b\x1f\x10\x19\x1c" - b"\x0d\x17\x1a\x0a\x13\x17\x07\x10\x13\x01\x0d\x0f\x01\x0a\x0b\x01" - b"\x01\x3f\x01\x13\x3c\x0b\x1b\x39\x10\x20\x35\x14\x23\x31\x17\x23" - b"\x2d\x18\x23\x29\x18\x3f\x3f\x3f\x3f\x3f\x39\x3f\x3f\x31\x3f\x3f" - b"\x2a\x3f\x3f\x20\x3f\x3f\x14\x3f\x3c\x12\x3f\x39\x0f\x3f\x35\x0b" - b"\x3f\x32\x07\x3f\x2d\x01\x3d\x2a\x01\x3b\x26\x01\x39\x21\x01\x37" - b"\x1d\x01\x34\x1a\x01\x32\x16\x01\x2f\x12\x01\x2d\x0f\x01\x2a\x0b" - b"\x01\x27\x07\x01\x23\x01\x01\x1d\x01\x01\x17\x01\x01\x10\x01\x01" - b"\x3d\x01\x01\x19\x19\x3f\x3f\x01\x01\x01\x01\x3f\x16\x16\x13\x10" - b"\x10\x0f\x0d\x0d\x0b\x3c\x2e\x2a\x36\x27\x20\x30\x21\x18\x29\x1b" - b"\x10\x3c\x39\x37\x37\x32\x2f\x31\x2c\x28\x2b\x26\x21\x30\x22\x20" -) diff --git a/voxvera/vendor/PIL/WebPImagePlugin.py b/voxvera/vendor/PIL/WebPImagePlugin.py deleted file mode 100644 index e20e40d..0000000 --- a/voxvera/vendor/PIL/WebPImagePlugin.py +++ /dev/null @@ -1,317 +0,0 @@ -from __future__ import annotations - -from io import BytesIO - -from . import Image, ImageFile - -try: - from . import _webp - - SUPPORTED = True -except ImportError: - SUPPORTED = False - -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import IO, Any - -_VP8_MODES_BY_IDENTIFIER = { - b"VP8 ": "RGB", - b"VP8X": "RGBA", - b"VP8L": "RGBA", # lossless -} - - -def _accept(prefix: bytes) -> bool | str: - is_riff_file_format = prefix.startswith(b"RIFF") - is_webp_file = prefix[8:12] == b"WEBP" - is_valid_vp8_mode = prefix[12:16] in _VP8_MODES_BY_IDENTIFIER - - if is_riff_file_format and is_webp_file and is_valid_vp8_mode: - if not SUPPORTED: - return ( - "image file could not be identified because WEBP support not installed" - ) - return True - return False - - -class WebPImageFile(ImageFile.ImageFile): - format = "WEBP" - format_description = "WebP image" - __loaded = 0 - __logical_frame = 0 - - def _open(self) -> None: - # Use the newer AnimDecoder API to parse the (possibly) animated file, - # and access muxed chunks like ICC/EXIF/XMP. - assert self.fp is not None - self._decoder = _webp.WebPAnimDecoder(self.fp.read()) - - # Get info from decoder - self._size, self.info["loop"], bgcolor, self.n_frames, self.rawmode = ( - self._decoder.get_info() - ) - self.info["background"] = ( - (bgcolor >> 16) & 0xFF, # R - (bgcolor >> 8) & 0xFF, # G - bgcolor & 0xFF, # B - (bgcolor >> 24) & 0xFF, # A - ) - self.is_animated = self.n_frames > 1 - self._mode = "RGB" if self.rawmode == "RGBX" else self.rawmode - - # Attempt to read ICC / EXIF / XMP chunks from file - for key, chunk_name in { - "icc_profile": "ICCP", - "exif": "EXIF", - "xmp": "XMP ", - }.items(): - if value := self._decoder.get_chunk(chunk_name): - self.info[key] = value - - # Initialize seek state - self._reset(reset=False) - - def _getexif(self) -> dict[int, Any] | None: - if "exif" not in self.info: - return None - return self.getexif()._get_merged_dict() - - def seek(self, frame: int) -> None: - if not self._seek_check(frame): - return - - # Set logical frame to requested position - self.__logical_frame = frame - - def _reset(self, reset: bool = True) -> None: - if reset: - self._decoder.reset() - self.__physical_frame = 0 - self.__loaded = -1 - self.__timestamp = 0 - - def _get_next(self) -> tuple[bytes, int, int]: - # Get next frame - ret = self._decoder.get_next() - self.__physical_frame += 1 - - # Check if an error occurred - if ret is None: - self._reset() # Reset just to be safe - self.seek(0) - msg = "failed to decode next frame in WebP file" - raise EOFError(msg) - - # Compute duration - data, timestamp = ret - duration = timestamp - self.__timestamp - self.__timestamp = timestamp - - # libwebp gives frame end, adjust to start of frame - timestamp -= duration - return data, timestamp, duration - - def _seek(self, frame: int) -> None: - if self.__physical_frame == frame: - return # Nothing to do - if frame < self.__physical_frame: - self._reset() # Rewind to beginning - while self.__physical_frame < frame: - self._get_next() # Advance to the requested frame - - def load(self) -> Image.core.PixelAccess | None: - if self.__loaded != self.__logical_frame: - self._seek(self.__logical_frame) - - # We need to load the image data for this frame - data, self.info["timestamp"], self.info["duration"] = self._get_next() - self.__loaded = self.__logical_frame - - # Set tile - if self.fp and self._exclusive_fp: - self.fp.close() - self.fp = BytesIO(data) - self.tile = [ImageFile._Tile("raw", (0, 0) + self.size, 0, self.rawmode)] - - return super().load() - - def load_seek(self, pos: int) -> None: - pass - - def tell(self) -> int: - return self.__logical_frame - - -def _convert_frame(im: Image.Image) -> Image.Image: - # Make sure image mode is supported - if im.mode not in ("RGBX", "RGBA", "RGB"): - im = im.convert("RGBA" if im.has_transparency_data else "RGB") - return im - - -def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - encoderinfo = im.encoderinfo.copy() - append_images = list(encoderinfo.get("append_images", [])) - - # If total frame count is 1, then save using the legacy API, which - # will preserve non-alpha modes - total = 0 - for ims in [im] + append_images: - total += getattr(ims, "n_frames", 1) - if total == 1: - _save(im, fp, filename) - return - - background: int | tuple[int, ...] = (0, 0, 0, 0) - if "background" in encoderinfo: - background = encoderinfo["background"] - elif "background" in im.info: - background = im.info["background"] - if isinstance(background, int): - # GifImagePlugin stores a global color table index in - # info["background"]. So it must be converted to an RGBA value - palette = im.getpalette() - if palette: - r, g, b = palette[background * 3 : (background + 1) * 3] - background = (r, g, b, 255) - else: - background = (background, background, background, 255) - - duration = im.encoderinfo.get("duration", im.info.get("duration", 0)) - loop = im.encoderinfo.get("loop", 0) - minimize_size = im.encoderinfo.get("minimize_size", False) - kmin = im.encoderinfo.get("kmin", None) - kmax = im.encoderinfo.get("kmax", None) - allow_mixed = im.encoderinfo.get("allow_mixed", False) - verbose = False - lossless = im.encoderinfo.get("lossless", False) - quality = im.encoderinfo.get("quality", 80) - alpha_quality = im.encoderinfo.get("alpha_quality", 100) - method = im.encoderinfo.get("method", 0) - icc_profile = im.encoderinfo.get("icc_profile") or "" - exif = im.encoderinfo.get("exif", "") - if isinstance(exif, Image.Exif): - exif = exif.tobytes() - xmp = im.encoderinfo.get("xmp", "") - if allow_mixed: - lossless = False - - # Sensible keyframe defaults are from gif2webp.c script - if kmin is None: - kmin = 9 if lossless else 3 - if kmax is None: - kmax = 17 if lossless else 5 - - # Validate background color - if ( - not isinstance(background, (list, tuple)) - or len(background) != 4 - or not all(0 <= v < 256 for v in background) - ): - msg = f"Background color is not an RGBA tuple clamped to (0-255): {background}" - raise OSError(msg) - - # Convert to packed uint - bg_r, bg_g, bg_b, bg_a = background - background = (bg_a << 24) | (bg_r << 16) | (bg_g << 8) | (bg_b << 0) - - # Setup the WebP animation encoder - enc = _webp.WebPAnimEncoder( - im.size, - background, - loop, - minimize_size, - kmin, - kmax, - allow_mixed, - verbose, - ) - - # Add each frame - frame_idx = 0 - timestamp = 0 - cur_idx = im.tell() - try: - for ims in [im] + append_images: - # Get number of frames in this image - nfr = getattr(ims, "n_frames", 1) - - for idx in range(nfr): - ims.seek(idx) - - frame = _convert_frame(ims) - - # Append the frame to the animation encoder - enc.add( - frame.getim(), - round(timestamp), - lossless, - quality, - alpha_quality, - method, - ) - - # Update timestamp and frame index - if isinstance(duration, (list, tuple)): - timestamp += duration[frame_idx] - else: - timestamp += duration - frame_idx += 1 - - finally: - im.seek(cur_idx) - - # Force encoder to flush frames - enc.add(None, round(timestamp), lossless, quality, alpha_quality, 0) - - # Get the final output from the encoder - data = enc.assemble(icc_profile, exif, xmp) - if data is None: - msg = "cannot write file as WebP (encoder returned None)" - raise OSError(msg) - - fp.write(data) - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - lossless = im.encoderinfo.get("lossless", False) - quality = im.encoderinfo.get("quality", 80) - alpha_quality = im.encoderinfo.get("alpha_quality", 100) - icc_profile = im.encoderinfo.get("icc_profile") or "" - exif = im.encoderinfo.get("exif", b"") - if isinstance(exif, Image.Exif): - exif = exif.tobytes() - if exif.startswith(b"Exif\x00\x00"): - exif = exif[6:] - xmp = im.encoderinfo.get("xmp", "") - method = im.encoderinfo.get("method", 4) - exact = 1 if im.encoderinfo.get("exact") else 0 - - im = _convert_frame(im) - - data = _webp.WebPEncode( - im.getim(), - lossless, - float(quality), - float(alpha_quality), - icc_profile, - method, - exact, - exif, - xmp, - ) - if data is None: - msg = "cannot write file as WebP (encoder returned None)" - raise OSError(msg) - - fp.write(data) - - -Image.register_open(WebPImageFile.format, WebPImageFile, _accept) -if SUPPORTED: - Image.register_save(WebPImageFile.format, _save) - Image.register_save_all(WebPImageFile.format, _save_all) - Image.register_extension(WebPImageFile.format, ".webp") - Image.register_mime(WebPImageFile.format, "image/webp") diff --git a/voxvera/vendor/PIL/WmfImagePlugin.py b/voxvera/vendor/PIL/WmfImagePlugin.py deleted file mode 100644 index 3ae8624..0000000 --- a/voxvera/vendor/PIL/WmfImagePlugin.py +++ /dev/null @@ -1,188 +0,0 @@ -# -# The Python Imaging Library -# $Id$ -# -# WMF stub codec -# -# history: -# 1996-12-14 fl Created -# 2004-02-22 fl Turned into a stub driver -# 2004-02-23 fl Added EMF support -# -# Copyright (c) Secret Labs AB 1997-2004. All rights reserved. -# Copyright (c) Fredrik Lundh 1996. -# -# See the README file for information on usage and redistribution. -# -# WMF/EMF reference documentation: -# https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-WMF/[MS-WMF].pdf -# http://wvware.sourceforge.net/caolan/index.html -# http://wvware.sourceforge.net/caolan/ora-wmf.html -from __future__ import annotations - -from typing import IO - -from . import Image, ImageFile -from ._binary import i16le as word -from ._binary import si16le as short -from ._binary import si32le as _long - -_handler = None - - -def register_handler(handler: ImageFile.StubHandler | None) -> None: - """ - Install application-specific WMF image handler. - - :param handler: Handler object. - """ - global _handler - _handler = handler - - -if hasattr(Image.core, "drawwmf"): - # install default handler (windows only) - - class WmfHandler(ImageFile.StubHandler): - def open(self, im: ImageFile.StubImageFile) -> None: - im._mode = "RGB" - self.bbox = im.info["wmf_bbox"] - - def load(self, im: ImageFile.StubImageFile) -> Image.Image: - assert im.fp is not None - im.fp.seek(0) # rewind - return Image.frombytes( - "RGB", - im.size, - Image.core.drawwmf(im.fp.read(), im.size, self.bbox), - "raw", - "BGR", - (im.size[0] * 3 + 3) & -4, - -1, - ) - - register_handler(WmfHandler()) - -# -# -------------------------------------------------------------------- -# Read WMF file - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith((b"\xd7\xcd\xc6\x9a\x00\x00", b"\x01\x00\x00\x00")) - - -## -# Image plugin for Windows metafiles. - - -class WmfStubImageFile(ImageFile.StubImageFile): - format = "WMF" - format_description = "Windows Metafile" - - def _open(self) -> None: - # check placeable header - assert self.fp is not None - s = self.fp.read(44) - - if s.startswith(b"\xd7\xcd\xc6\x9a\x00\x00"): - # placeable windows metafile - - # get units per inch - inch = word(s, 14) - if inch == 0: - msg = "Invalid inch" - raise ValueError(msg) - self._inch: tuple[float, float] = inch, inch - - # get bounding box - x0 = short(s, 6) - y0 = short(s, 8) - x1 = short(s, 10) - y1 = short(s, 12) - - # normalize size to 72 dots per inch - self.info["dpi"] = 72 - size = ( - (x1 - x0) * self.info["dpi"] // inch, - (y1 - y0) * self.info["dpi"] // inch, - ) - - self.info["wmf_bbox"] = x0, y0, x1, y1 - - # sanity check (standard metafile header) - if s[22:26] != b"\x01\x00\t\x00": - msg = "Unsupported WMF file format" - raise SyntaxError(msg) - - elif s.startswith(b"\x01\x00\x00\x00") and s[40:44] == b" EMF": - # enhanced metafile - - # get bounding box - x0 = _long(s, 8) - y0 = _long(s, 12) - x1 = _long(s, 16) - y1 = _long(s, 20) - - # get frame (in 0.01 millimeter units) - frame = _long(s, 24), _long(s, 28), _long(s, 32), _long(s, 36) - - size = x1 - x0, y1 - y0 - - # calculate dots per inch from bbox and frame - xdpi = 2540.0 * (x1 - x0) / (frame[2] - frame[0]) - ydpi = 2540.0 * (y1 - y0) / (frame[3] - frame[1]) - - self.info["wmf_bbox"] = x0, y0, x1, y1 - - if xdpi == ydpi: - self.info["dpi"] = xdpi - else: - self.info["dpi"] = xdpi, ydpi - self._inch = xdpi, ydpi - - else: - msg = "Unsupported file format" - raise SyntaxError(msg) - - self._mode = "RGB" - self._size = size - - loader = self._load() - if loader: - loader.open(self) - - def _load(self) -> ImageFile.StubHandler | None: - return _handler - - def load( - self, dpi: float | tuple[float, float] | None = None - ) -> Image.core.PixelAccess | None: - if dpi is not None: - self.info["dpi"] = dpi - x0, y0, x1, y1 = self.info["wmf_bbox"] - if not isinstance(dpi, tuple): - dpi = dpi, dpi - self._size = ( - int((x1 - x0) * dpi[0] / self._inch[0]), - int((y1 - y0) * dpi[1] / self._inch[1]), - ) - return super().load() - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if _handler is None or not hasattr(_handler, "save"): - msg = "WMF save handler not installed" - raise OSError(msg) - _handler.save(im, fp, filename) - - -# -# -------------------------------------------------------------------- -# Registry stuff - - -Image.register_open(WmfStubImageFile.format, WmfStubImageFile, _accept) -Image.register_save(WmfStubImageFile.format, _save) - -Image.register_extensions(WmfStubImageFile.format, [".wmf", ".emf"]) diff --git a/voxvera/vendor/PIL/XVThumbImagePlugin.py b/voxvera/vendor/PIL/XVThumbImagePlugin.py deleted file mode 100644 index 192c041..0000000 --- a/voxvera/vendor/PIL/XVThumbImagePlugin.py +++ /dev/null @@ -1,83 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# XV Thumbnail file handler by Charles E. "Gene" Cash -# (gcash@magicnet.net) -# -# see xvcolor.c and xvbrowse.c in the sources to John Bradley's XV, -# available from ftp://ftp.cis.upenn.edu/pub/xv/ -# -# history: -# 98-08-15 cec created (b/w only) -# 98-12-09 cec added color palette -# 98-12-28 fl added to PIL (with only a few very minor modifications) -# -# To do: -# FIXME: make save work (this requires quantization support) -# -from __future__ import annotations - -from . import Image, ImageFile, ImagePalette -from ._binary import o8 - -_MAGIC = b"P7 332" - -# standard color palette for thumbnails (RGB332) -PALETTE = b"" -for r in range(8): - for g in range(8): - for b in range(4): - PALETTE = PALETTE + ( - o8((r * 255) // 7) + o8((g * 255) // 7) + o8((b * 255) // 3) - ) - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(_MAGIC) - - -## -# Image plugin for XV thumbnail images. - - -class XVThumbImageFile(ImageFile.ImageFile): - format = "XVThumb" - format_description = "XV thumbnail image" - - def _open(self) -> None: - # check magic - assert self.fp is not None - - if not _accept(self.fp.read(6)): - msg = "not an XV thumbnail file" - raise SyntaxError(msg) - - # Skip to beginning of next line - self.fp.readline() - - # skip info comments - while True: - s = self.fp.readline() - if not s: - msg = "Unexpected EOF reading XV thumbnail file" - raise SyntaxError(msg) - if s[0] != 35: # ie. when not a comment: '#' - break - - # parse header line (already read) - w, h = s.strip().split(maxsplit=2)[:2] - - self._mode = "P" - self._size = int(w), int(h) - - self.palette = ImagePalette.raw("RGB", PALETTE) - - self.tile = [ - ImageFile._Tile("raw", (0, 0) + self.size, self.fp.tell(), self.mode) - ] - - -# -------------------------------------------------------------------- - -Image.register_open(XVThumbImageFile.format, XVThumbImageFile, _accept) diff --git a/voxvera/vendor/PIL/XbmImagePlugin.py b/voxvera/vendor/PIL/XbmImagePlugin.py deleted file mode 100644 index 1e57aa1..0000000 --- a/voxvera/vendor/PIL/XbmImagePlugin.py +++ /dev/null @@ -1,98 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# XBM File handling -# -# History: -# 1995-09-08 fl Created -# 1996-11-01 fl Added save support -# 1997-07-07 fl Made header parser more tolerant -# 1997-07-22 fl Fixed yet another parser bug -# 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.4) -# 2001-05-13 fl Added hotspot handling (based on code from Bernhard Herzog) -# 2004-02-24 fl Allow some whitespace before first #define -# -# Copyright (c) 1997-2004 by Secret Labs AB -# Copyright (c) 1996-1997 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import re -from typing import IO - -from . import Image, ImageFile - -# XBM header -xbm_head = re.compile( - rb"\s*#define[ \t]+.*_width[ \t]+(?P[0-9]+)[\r\n]+" - b"#define[ \t]+.*_height[ \t]+(?P[0-9]+)[\r\n]+" - b"(?P" - b"#define[ \t]+[^_]*_x_hot[ \t]+(?P[0-9]+)[\r\n]+" - b"#define[ \t]+[^_]*_y_hot[ \t]+(?P[0-9]+)[\r\n]+" - b")?" - rb"[\000-\377]*_bits\[]" -) - - -def _accept(prefix: bytes) -> bool: - return prefix.lstrip().startswith(b"#define") - - -## -# Image plugin for X11 bitmaps. - - -class XbmImageFile(ImageFile.ImageFile): - format = "XBM" - format_description = "X11 Bitmap" - - def _open(self) -> None: - assert self.fp is not None - - m = xbm_head.match(self.fp.read(512)) - - if not m: - msg = "not a XBM file" - raise SyntaxError(msg) - - xsize = int(m.group("width")) - ysize = int(m.group("height")) - - if m.group("hotspot"): - self.info["hotspot"] = (int(m.group("xhot")), int(m.group("yhot"))) - - self._mode = "1" - self._size = xsize, ysize - - self.tile = [ImageFile._Tile("xbm", (0, 0) + self.size, m.end())] - - -def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: - if im.mode != "1": - msg = f"cannot write mode {im.mode} as XBM" - raise OSError(msg) - - fp.write(f"#define im_width {im.size[0]}\n".encode("ascii")) - fp.write(f"#define im_height {im.size[1]}\n".encode("ascii")) - - hotspot = im.encoderinfo.get("hotspot") - if hotspot: - fp.write(f"#define im_x_hot {hotspot[0]}\n".encode("ascii")) - fp.write(f"#define im_y_hot {hotspot[1]}\n".encode("ascii")) - - fp.write(b"static char im_bits[] = {\n") - - ImageFile._save(im, fp, [ImageFile._Tile("xbm", (0, 0) + im.size)]) - - fp.write(b"};\n") - - -Image.register_open(XbmImageFile.format, XbmImageFile, _accept) -Image.register_save(XbmImageFile.format, _save) - -Image.register_extension(XbmImageFile.format, ".xbm") - -Image.register_mime(XbmImageFile.format, "image/xbm") diff --git a/voxvera/vendor/PIL/XpmImagePlugin.py b/voxvera/vendor/PIL/XpmImagePlugin.py deleted file mode 100644 index 3be240f..0000000 --- a/voxvera/vendor/PIL/XpmImagePlugin.py +++ /dev/null @@ -1,157 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# XPM File handling -# -# History: -# 1996-12-29 fl Created -# 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.7) -# -# Copyright (c) Secret Labs AB 1997-2001. -# Copyright (c) Fredrik Lundh 1996-2001. -# -# See the README file for information on usage and redistribution. -# -from __future__ import annotations - -import re - -from . import Image, ImageFile, ImagePalette -from ._binary import o8 - -# XPM header -xpm_head = re.compile(b'"([0-9]*) ([0-9]*) ([0-9]*) ([0-9]*)') - - -def _accept(prefix: bytes) -> bool: - return prefix.startswith(b"/* XPM */") - - -## -# Image plugin for X11 pixel maps. - - -class XpmImageFile(ImageFile.ImageFile): - format = "XPM" - format_description = "X11 Pixel Map" - - def _open(self) -> None: - assert self.fp is not None - if not _accept(self.fp.read(9)): - msg = "not an XPM file" - raise SyntaxError(msg) - - # skip forward to next string - while True: - line = self.fp.readline() - if not line: - msg = "broken XPM file" - raise SyntaxError(msg) - m = xpm_head.match(line) - if m: - break - - self._size = int(m.group(1)), int(m.group(2)) - - palette_length = int(m.group(3)) - bpp = int(m.group(4)) - - # - # load palette description - - palette = {} - - for _ in range(palette_length): - line = self.fp.readline().rstrip() - - c = line[1 : bpp + 1] - s = line[bpp + 1 : -2].split() - - for i in range(0, len(s), 2): - if s[i] == b"c": - # process colour key - rgb = s[i + 1] - if rgb == b"None": - self.info["transparency"] = c - elif rgb.startswith(b"#"): - rgb_int = int(rgb[1:], 16) - palette[c] = ( - o8((rgb_int >> 16) & 255) - + o8((rgb_int >> 8) & 255) - + o8(rgb_int & 255) - ) - else: - # unknown colour - msg = "cannot read this XPM file" - raise ValueError(msg) - break - - else: - # missing colour key - msg = "cannot read this XPM file" - raise ValueError(msg) - - args: tuple[int, dict[bytes, bytes] | tuple[bytes, ...]] - if palette_length > 256: - self._mode = "RGB" - args = (bpp, palette) - else: - self._mode = "P" - self.palette = ImagePalette.raw("RGB", b"".join(palette.values())) - args = (bpp, tuple(palette.keys())) - - self.tile = [ImageFile._Tile("xpm", (0, 0) + self.size, self.fp.tell(), args)] - - def load_read(self, read_bytes: int) -> bytes: - # - # load all image data in one chunk - - xsize, ysize = self.size - - assert self.fp is not None - s = [self.fp.readline()[1 : xsize + 1].ljust(xsize) for i in range(ysize)] - - return b"".join(s) - - -class XpmDecoder(ImageFile.PyDecoder): - _pulls_fd = True - - def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: - assert self.fd is not None - - data = bytearray() - bpp, palette = self.args - dest_length = self.state.xsize * self.state.ysize - if self.mode == "RGB": - dest_length *= 3 - pixel_header = False - while len(data) < dest_length: - line = self.fd.readline() - if not line: - break - if line.rstrip() == b"/* pixels */" and not pixel_header: - pixel_header = True - continue - line = b'"'.join(line.split(b'"')[1:-1]) - for i in range(0, len(line), bpp): - key = line[i : i + bpp] - if self.mode == "RGB": - data += palette[key] - else: - data += o8(palette.index(key)) - self.set_as_raw(bytes(data)) - return -1, 0 - - -# -# Registry - - -Image.register_open(XpmImageFile.format, XpmImageFile, _accept) -Image.register_decoder("xpm", XpmDecoder) - -Image.register_extension(XpmImageFile.format, ".xpm") - -Image.register_mime(XpmImageFile.format, "image/xpm") diff --git a/voxvera/vendor/PIL/__init__.py b/voxvera/vendor/PIL/__init__.py deleted file mode 100644 index 6e4c23f..0000000 --- a/voxvera/vendor/PIL/__init__.py +++ /dev/null @@ -1,87 +0,0 @@ -"""Pillow (Fork of the Python Imaging Library) - -Pillow is the friendly PIL fork by Jeffrey A. Clark and contributors. - https://github.com/python-pillow/Pillow/ - -Pillow is forked from PIL 1.1.7. - -PIL is the Python Imaging Library by Fredrik Lundh and contributors. -Copyright (c) 1999 by Secret Labs AB. - -Use PIL.__version__ for this Pillow version. - -;-) -""" - -from __future__ import annotations - -from . import _version - -# VERSION was removed in Pillow 6.0.0. -# PILLOW_VERSION was removed in Pillow 9.0.0. -# Use __version__ instead. -__version__ = _version.__version__ -del _version - - -_plugins = [ - "AvifImagePlugin", - "BlpImagePlugin", - "BmpImagePlugin", - "BufrStubImagePlugin", - "CurImagePlugin", - "DcxImagePlugin", - "DdsImagePlugin", - "EpsImagePlugin", - "FitsImagePlugin", - "FliImagePlugin", - "FpxImagePlugin", - "FtexImagePlugin", - "GbrImagePlugin", - "GifImagePlugin", - "GribStubImagePlugin", - "Hdf5StubImagePlugin", - "IcnsImagePlugin", - "IcoImagePlugin", - "ImImagePlugin", - "ImtImagePlugin", - "IptcImagePlugin", - "JpegImagePlugin", - "Jpeg2KImagePlugin", - "McIdasImagePlugin", - "MicImagePlugin", - "MpegImagePlugin", - "MpoImagePlugin", - "MspImagePlugin", - "PalmImagePlugin", - "PcdImagePlugin", - "PcxImagePlugin", - "PdfImagePlugin", - "PixarImagePlugin", - "PngImagePlugin", - "PpmImagePlugin", - "PsdImagePlugin", - "QoiImagePlugin", - "SgiImagePlugin", - "SpiderImagePlugin", - "SunImagePlugin", - "TgaImagePlugin", - "TiffImagePlugin", - "WebPImagePlugin", - "WmfImagePlugin", - "XbmImagePlugin", - "XpmImagePlugin", - "XVThumbImagePlugin", -] - - -class UnidentifiedImageError(OSError): - """ - Raised in :py:meth:`PIL.Image.open` if an image cannot be opened and identified. - - If a PNG image raises this error, setting :data:`.ImageFile.LOAD_TRUNCATED_IMAGES` - to true may allow the image to be opened after all. The setting will ignore missing - data and checksum failures. - """ - - pass diff --git a/voxvera/vendor/PIL/__main__.py b/voxvera/vendor/PIL/__main__.py deleted file mode 100644 index 043156e..0000000 --- a/voxvera/vendor/PIL/__main__.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import annotations - -import sys - -from .features import pilinfo - -pilinfo(supported_formats="--report" not in sys.argv) diff --git a/voxvera/vendor/PIL/_avif.cpython-312-x86_64-linux-gnu.so b/voxvera/vendor/PIL/_avif.cpython-312-x86_64-linux-gnu.so deleted file mode 100755 index c83a451..0000000 Binary files a/voxvera/vendor/PIL/_avif.cpython-312-x86_64-linux-gnu.so and /dev/null differ diff --git a/voxvera/vendor/PIL/_avif.pyi b/voxvera/vendor/PIL/_avif.pyi deleted file mode 100644 index e27843e..0000000 --- a/voxvera/vendor/PIL/_avif.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... diff --git a/voxvera/vendor/PIL/_binary.py b/voxvera/vendor/PIL/_binary.py deleted file mode 100644 index 4594ccc..0000000 --- a/voxvera/vendor/PIL/_binary.py +++ /dev/null @@ -1,112 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# Binary input/output support routines. -# -# Copyright (c) 1997-2003 by Secret Labs AB -# Copyright (c) 1995-2003 by Fredrik Lundh -# Copyright (c) 2012 by Brian Crowell -# -# See the README file for information on usage and redistribution. -# - - -"""Binary input/output support routines.""" -from __future__ import annotations - -from struct import pack, unpack_from - - -def i8(c: bytes) -> int: - return c[0] - - -def o8(i: int) -> bytes: - return bytes((i & 255,)) - - -# Input, le = little endian, be = big endian -def i16le(c: bytes, o: int = 0) -> int: - """ - Converts a 2-bytes (16 bits) string to an unsigned integer. - - :param c: string containing bytes to convert - :param o: offset of bytes to convert in string - """ - return unpack_from(" int: - """ - Converts a 2-bytes (16 bits) string to a signed integer. - - :param c: string containing bytes to convert - :param o: offset of bytes to convert in string - """ - return unpack_from(" int: - """ - Converts a 2-bytes (16 bits) string to a signed integer, big endian. - - :param c: string containing bytes to convert - :param o: offset of bytes to convert in string - """ - return unpack_from(">h", c, o)[0] - - -def i32le(c: bytes, o: int = 0) -> int: - """ - Converts a 4-bytes (32 bits) string to an unsigned integer. - - :param c: string containing bytes to convert - :param o: offset of bytes to convert in string - """ - return unpack_from(" int: - """ - Converts a 4-bytes (32 bits) string to a signed integer. - - :param c: string containing bytes to convert - :param o: offset of bytes to convert in string - """ - return unpack_from(" int: - """ - Converts a 4-bytes (32 bits) string to a signed integer, big endian. - - :param c: string containing bytes to convert - :param o: offset of bytes to convert in string - """ - return unpack_from(">i", c, o)[0] - - -def i16be(c: bytes, o: int = 0) -> int: - return unpack_from(">H", c, o)[0] - - -def i32be(c: bytes, o: int = 0) -> int: - return unpack_from(">I", c, o)[0] - - -# Output, le = little endian, be = big endian -def o16le(i: int) -> bytes: - return pack(" bytes: - return pack(" bytes: - return pack(">H", i) - - -def o32be(i: int) -> bytes: - return pack(">I", i) diff --git a/voxvera/vendor/PIL/_deprecate.py b/voxvera/vendor/PIL/_deprecate.py deleted file mode 100644 index 711c62a..0000000 --- a/voxvera/vendor/PIL/_deprecate.py +++ /dev/null @@ -1,72 +0,0 @@ -from __future__ import annotations - -import warnings - -from . import __version__ - - -def deprecate( - deprecated: str, - when: int | None, - replacement: str | None = None, - *, - action: str | None = None, - plural: bool = False, - stacklevel: int = 3, -) -> None: - """ - Deprecations helper. - - :param deprecated: Name of thing to be deprecated. - :param when: Pillow major version to be removed in. - :param replacement: Name of replacement. - :param action: Instead of "replacement", give a custom call to action - e.g. "Upgrade to new thing". - :param plural: if the deprecated thing is plural, needing "are" instead of "is". - - Usually of the form: - - "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd). - Use [replacement] instead." - - You can leave out the replacement sentence: - - "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd)" - - Or with another call to action: - - "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd). - [action]." - """ - - is_ = "are" if plural else "is" - - if when is None: - removed = "a future version" - elif when <= int(__version__.split(".")[0]): - msg = f"{deprecated} {is_} deprecated and should be removed." - raise RuntimeError(msg) - elif when == 13: - removed = "Pillow 13 (2026-10-15)" - elif when == 14: - removed = "Pillow 14 (2027-10-15)" - else: - msg = f"Unknown removal version: {when}. Update {__name__}?" - raise ValueError(msg) - - if replacement and action: - msg = "Use only one of 'replacement' and 'action'" - raise ValueError(msg) - - if replacement: - action = f". Use {replacement} instead." - elif action: - action = f". {action.rstrip('.')}." - else: - action = "" - - warnings.warn( - f"{deprecated} {is_} deprecated and will be removed in {removed}{action}", - DeprecationWarning, - stacklevel=stacklevel, - ) diff --git a/voxvera/vendor/PIL/_imaging.cpython-312-x86_64-linux-gnu.so b/voxvera/vendor/PIL/_imaging.cpython-312-x86_64-linux-gnu.so deleted file mode 100755 index def877a..0000000 Binary files a/voxvera/vendor/PIL/_imaging.cpython-312-x86_64-linux-gnu.so and /dev/null differ diff --git a/voxvera/vendor/PIL/_imaging.pyi b/voxvera/vendor/PIL/_imaging.pyi deleted file mode 100644 index 81028a5..0000000 --- a/voxvera/vendor/PIL/_imaging.pyi +++ /dev/null @@ -1,31 +0,0 @@ -from typing import Any - -class ImagingCore: - def __getitem__(self, index: int) -> float | tuple[int, ...] | None: ... - def __getattr__(self, name: str) -> Any: ... - -class ImagingFont: - def __getattr__(self, name: str) -> Any: ... - -class ImagingDraw: - def __getattr__(self, name: str) -> Any: ... - -class PixelAccess: - def __getitem__(self, xy: tuple[int, int]) -> float | tuple[int, ...]: ... - def __setitem__( - self, xy: tuple[int, int], color: float | tuple[int, ...] - ) -> None: ... - -class ImagingDecoder: - def __getattr__(self, name: str) -> Any: ... - -class ImagingEncoder: - def __getattr__(self, name: str) -> Any: ... - -class _Outline: - def close(self) -> None: ... - def __getattr__(self, name: str) -> Any: ... - -def font(image: ImagingCore, glyphdata: bytes) -> ImagingFont: ... -def outline() -> _Outline: ... -def __getattr__(name: str) -> Any: ... diff --git a/voxvera/vendor/PIL/_imagingcms.cpython-312-x86_64-linux-gnu.so b/voxvera/vendor/PIL/_imagingcms.cpython-312-x86_64-linux-gnu.so deleted file mode 100755 index 2544b62..0000000 Binary files a/voxvera/vendor/PIL/_imagingcms.cpython-312-x86_64-linux-gnu.so and /dev/null differ diff --git a/voxvera/vendor/PIL/_imagingcms.pyi b/voxvera/vendor/PIL/_imagingcms.pyi deleted file mode 100644 index 4fc0d60..0000000 --- a/voxvera/vendor/PIL/_imagingcms.pyi +++ /dev/null @@ -1,143 +0,0 @@ -import datetime -import sys -from typing import Literal, SupportsFloat, TypeAlias, TypedDict - -from ._typing import CapsuleType - -littlecms_version: str | None - -_Tuple3f: TypeAlias = tuple[float, float, float] -_Tuple2x3f: TypeAlias = tuple[_Tuple3f, _Tuple3f] -_Tuple3x3f: TypeAlias = tuple[_Tuple3f, _Tuple3f, _Tuple3f] - -class _IccMeasurementCondition(TypedDict): - observer: int - backing: _Tuple3f - geo: str - flare: float - illuminant_type: str - -class _IccViewingCondition(TypedDict): - illuminant: _Tuple3f - surround: _Tuple3f - illuminant_type: str - -class CmsProfile: - @property - def rendering_intent(self) -> int: ... - @property - def creation_date(self) -> datetime.datetime | None: ... - @property - def copyright(self) -> str | None: ... - @property - def target(self) -> str | None: ... - @property - def manufacturer(self) -> str | None: ... - @property - def model(self) -> str | None: ... - @property - def profile_description(self) -> str | None: ... - @property - def screening_description(self) -> str | None: ... - @property - def viewing_condition(self) -> str | None: ... - @property - def version(self) -> float: ... - @property - def icc_version(self) -> int: ... - @property - def attributes(self) -> int: ... - @property - def header_flags(self) -> int: ... - @property - def header_manufacturer(self) -> str: ... - @property - def header_model(self) -> str: ... - @property - def device_class(self) -> str: ... - @property - def connection_space(self) -> str: ... - @property - def xcolor_space(self) -> str: ... - @property - def profile_id(self) -> bytes: ... - @property - def is_matrix_shaper(self) -> bool: ... - @property - def technology(self) -> str | None: ... - @property - def colorimetric_intent(self) -> str | None: ... - @property - def perceptual_rendering_intent_gamut(self) -> str | None: ... - @property - def saturation_rendering_intent_gamut(self) -> str | None: ... - @property - def red_colorant(self) -> _Tuple2x3f | None: ... - @property - def green_colorant(self) -> _Tuple2x3f | None: ... - @property - def blue_colorant(self) -> _Tuple2x3f | None: ... - @property - def red_primary(self) -> _Tuple2x3f | None: ... - @property - def green_primary(self) -> _Tuple2x3f | None: ... - @property - def blue_primary(self) -> _Tuple2x3f | None: ... - @property - def media_white_point_temperature(self) -> float | None: ... - @property - def media_white_point(self) -> _Tuple2x3f | None: ... - @property - def media_black_point(self) -> _Tuple2x3f | None: ... - @property - def luminance(self) -> _Tuple2x3f | None: ... - @property - def chromatic_adaptation(self) -> tuple[_Tuple3x3f, _Tuple3x3f] | None: ... - @property - def chromaticity(self) -> _Tuple3x3f | None: ... - @property - def colorant_table(self) -> list[str] | None: ... - @property - def colorant_table_out(self) -> list[str] | None: ... - @property - def intent_supported(self) -> dict[int, tuple[bool, bool, bool]] | None: ... - @property - def clut(self) -> dict[int, tuple[bool, bool, bool]] | None: ... - @property - def icc_measurement_condition(self) -> _IccMeasurementCondition | None: ... - @property - def icc_viewing_condition(self) -> _IccViewingCondition | None: ... - def is_intent_supported(self, intent: int, direction: int, /) -> int: ... - -class CmsTransform: - def apply(self, id_in: CapsuleType, id_out: CapsuleType) -> int: ... - -def profile_open(profile: str, /) -> CmsProfile: ... -def profile_frombytes(profile: bytes, /) -> CmsProfile: ... -def profile_tobytes(profile: CmsProfile, /) -> bytes: ... -def buildTransform( - input_profile: CmsProfile, - output_profile: CmsProfile, - in_mode: str, - out_mode: str, - rendering_intent: int = 0, - cms_flags: int = 0, - /, -) -> CmsTransform: ... -def buildProofTransform( - input_profile: CmsProfile, - output_profile: CmsProfile, - proof_profile: CmsProfile, - in_mode: str, - out_mode: str, - rendering_intent: int = 0, - proof_intent: int = 0, - cms_flags: int = 0, - /, -) -> CmsTransform: ... -def createProfile( - color_space: Literal["LAB", "XYZ", "sRGB"], color_temp: SupportsFloat = 0.0, / -) -> CmsProfile: ... - -if sys.platform == "win32": - def get_display_profile_win32(handle: int = 0, is_dc: int = 0, /) -> str | None: ... diff --git a/voxvera/vendor/PIL/_imagingft.cpython-312-x86_64-linux-gnu.so b/voxvera/vendor/PIL/_imagingft.cpython-312-x86_64-linux-gnu.so deleted file mode 100755 index f58fd53..0000000 Binary files a/voxvera/vendor/PIL/_imagingft.cpython-312-x86_64-linux-gnu.so and /dev/null differ diff --git a/voxvera/vendor/PIL/_imagingft.pyi b/voxvera/vendor/PIL/_imagingft.pyi deleted file mode 100644 index 2136810..0000000 --- a/voxvera/vendor/PIL/_imagingft.pyi +++ /dev/null @@ -1,70 +0,0 @@ -from collections.abc import Callable -from typing import Any - -from . import ImageFont, _imaging - -class Font: - @property - def family(self) -> str | None: ... - @property - def style(self) -> str | None: ... - @property - def ascent(self) -> int: ... - @property - def descent(self) -> int: ... - @property - def height(self) -> int: ... - @property - def x_ppem(self) -> int: ... - @property - def y_ppem(self) -> int: ... - @property - def glyphs(self) -> int: ... - def render( - self, - string: str | bytes, - fill: Callable[[int, int], _imaging.ImagingCore], - mode: str, - dir: str | None, - features: list[str] | None, - lang: str | None, - stroke_width: float, - stroke_filled: bool, - anchor: str | None, - foreground_ink_long: int, - start: tuple[float, float], - /, - ) -> tuple[_imaging.ImagingCore, tuple[int, int]]: ... - def getsize( - self, - string: str | bytes | bytearray, - mode: str, - dir: str | None, - features: list[str] | None, - lang: str | None, - anchor: str | None, - /, - ) -> tuple[tuple[int, int], tuple[int, int]]: ... - def getlength( - self, - string: str | bytes, - mode: str, - dir: str | None, - features: list[str] | None, - lang: str | None, - /, - ) -> float: ... - def getvarnames(self) -> list[bytes]: ... - def getvaraxes(self) -> list[ImageFont.Axis]: ... - def setvarname(self, instance_index: int, /) -> None: ... - def setvaraxes(self, axes: list[float], /) -> None: ... - -def getfont( - filename: str | bytes, - size: float, - index: int, - encoding: str, - font_bytes: bytes, - layout_engine: int, -) -> Font: ... -def __getattr__(name: str) -> Any: ... diff --git a/voxvera/vendor/PIL/_imagingmath.cpython-312-x86_64-linux-gnu.so b/voxvera/vendor/PIL/_imagingmath.cpython-312-x86_64-linux-gnu.so deleted file mode 100755 index 44dc3e7..0000000 Binary files a/voxvera/vendor/PIL/_imagingmath.cpython-312-x86_64-linux-gnu.so and /dev/null differ diff --git a/voxvera/vendor/PIL/_imagingmath.pyi b/voxvera/vendor/PIL/_imagingmath.pyi deleted file mode 100644 index e27843e..0000000 --- a/voxvera/vendor/PIL/_imagingmath.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... diff --git a/voxvera/vendor/PIL/_imagingmorph.cpython-312-x86_64-linux-gnu.so b/voxvera/vendor/PIL/_imagingmorph.cpython-312-x86_64-linux-gnu.so deleted file mode 100755 index f08e5ad..0000000 Binary files a/voxvera/vendor/PIL/_imagingmorph.cpython-312-x86_64-linux-gnu.so and /dev/null differ diff --git a/voxvera/vendor/PIL/_imagingmorph.pyi b/voxvera/vendor/PIL/_imagingmorph.pyi deleted file mode 100644 index e27843e..0000000 --- a/voxvera/vendor/PIL/_imagingmorph.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... diff --git a/voxvera/vendor/PIL/_imagingtk.cpython-312-x86_64-linux-gnu.so b/voxvera/vendor/PIL/_imagingtk.cpython-312-x86_64-linux-gnu.so deleted file mode 100755 index 1e92289..0000000 Binary files a/voxvera/vendor/PIL/_imagingtk.cpython-312-x86_64-linux-gnu.so and /dev/null differ diff --git a/voxvera/vendor/PIL/_imagingtk.pyi b/voxvera/vendor/PIL/_imagingtk.pyi deleted file mode 100644 index e27843e..0000000 --- a/voxvera/vendor/PIL/_imagingtk.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... diff --git a/voxvera/vendor/PIL/_tkinter_finder.py b/voxvera/vendor/PIL/_tkinter_finder.py deleted file mode 100644 index 9c01430..0000000 --- a/voxvera/vendor/PIL/_tkinter_finder.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Find compiled module linking to Tcl / Tk libraries""" - -from __future__ import annotations - -import sys -import tkinter - -tk = getattr(tkinter, "_tkinter") - -try: - if hasattr(sys, "pypy_find_executable"): - TKINTER_LIB = tk.tklib_cffi.__file__ - else: - TKINTER_LIB = tk.__file__ -except AttributeError: - # _tkinter may be compiled directly into Python, in which case __file__ is - # not available. load_tkinter_funcs will check the binary first in any case. - TKINTER_LIB = None - -tk_version = str(tkinter.TkVersion) diff --git a/voxvera/vendor/PIL/_typing.py b/voxvera/vendor/PIL/_typing.py deleted file mode 100644 index a941f89..0000000 --- a/voxvera/vendor/PIL/_typing.py +++ /dev/null @@ -1,45 +0,0 @@ -from __future__ import annotations - -import os -import sys -from collections.abc import Sequence -from typing import Any, Protocol, TypeVar - -TYPE_CHECKING = False -if TYPE_CHECKING: - from numbers import _IntegralLike as IntegralLike - - try: - import numpy.typing as npt - - NumpyArray = npt.NDArray[Any] - except ImportError: - pass - -if sys.version_info >= (3, 13): - from types import CapsuleType -else: - CapsuleType = object - -if sys.version_info >= (3, 12): - from collections.abc import Buffer -else: - Buffer = Any - - -_Ink = float | tuple[int, ...] | str - -Coords = Sequence[float] | Sequence[Sequence[float]] - - -_T_co = TypeVar("_T_co", covariant=True) - - -class SupportsRead(Protocol[_T_co]): - def read(self, length: int = ..., /) -> _T_co: ... - - -StrOrBytesPath = str | bytes | os.PathLike[str] | os.PathLike[bytes] - - -__all__ = ["Buffer", "IntegralLike", "StrOrBytesPath", "SupportsRead"] diff --git a/voxvera/vendor/PIL/_util.py b/voxvera/vendor/PIL/_util.py deleted file mode 100644 index b1fa6a0..0000000 --- a/voxvera/vendor/PIL/_util.py +++ /dev/null @@ -1,29 +0,0 @@ -from __future__ import annotations - -import os - -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import Any, NoReturn, TypeGuard - - from ._typing import StrOrBytesPath - - -def is_path(f: Any) -> TypeGuard[StrOrBytesPath]: - return isinstance(f, (bytes, str, os.PathLike)) - - -class DeferredError: - def __init__(self, ex: BaseException): - self.ex = ex - - def __getattr__(self, elt: str) -> NoReturn: - raise self.ex - - @staticmethod - def new(ex: BaseException) -> Any: - """ - Creates an object that raises the wrapped exception ``ex`` when used, - and casts it to :py:obj:`~typing.Any` type. - """ - return DeferredError(ex) diff --git a/voxvera/vendor/PIL/_version.py b/voxvera/vendor/PIL/_version.py deleted file mode 100644 index 85d2abd..0000000 --- a/voxvera/vendor/PIL/_version.py +++ /dev/null @@ -1,4 +0,0 @@ -# Master version for Pillow -from __future__ import annotations - -__version__ = "12.1.1" diff --git a/voxvera/vendor/PIL/_webp.cpython-312-x86_64-linux-gnu.so b/voxvera/vendor/PIL/_webp.cpython-312-x86_64-linux-gnu.so deleted file mode 100755 index 9a4d983..0000000 Binary files a/voxvera/vendor/PIL/_webp.cpython-312-x86_64-linux-gnu.so and /dev/null differ diff --git a/voxvera/vendor/PIL/_webp.pyi b/voxvera/vendor/PIL/_webp.pyi deleted file mode 100644 index e27843e..0000000 --- a/voxvera/vendor/PIL/_webp.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -def __getattr__(name: str) -> Any: ... diff --git a/voxvera/vendor/PIL/features.py b/voxvera/vendor/PIL/features.py deleted file mode 100644 index ff32c25..0000000 --- a/voxvera/vendor/PIL/features.py +++ /dev/null @@ -1,343 +0,0 @@ -from __future__ import annotations - -import collections -import os -import sys -import warnings -from typing import IO - -import PIL - -from . import Image - -modules = { - "pil": ("PIL._imaging", "PILLOW_VERSION"), - "tkinter": ("PIL._tkinter_finder", "tk_version"), - "freetype2": ("PIL._imagingft", "freetype2_version"), - "littlecms2": ("PIL._imagingcms", "littlecms_version"), - "webp": ("PIL._webp", "webpdecoder_version"), - "avif": ("PIL._avif", "libavif_version"), -} - - -def check_module(feature: str) -> bool: - """ - Checks if a module is available. - - :param feature: The module to check for. - :returns: ``True`` if available, ``False`` otherwise. - :raises ValueError: If the module is not defined in this version of Pillow. - """ - if feature not in modules: - msg = f"Unknown module {feature}" - raise ValueError(msg) - - module, ver = modules[feature] - - try: - __import__(module) - return True - except ModuleNotFoundError: - return False - except ImportError as ex: - warnings.warn(str(ex)) - return False - - -def version_module(feature: str) -> str | None: - """ - :param feature: The module to check for. - :returns: - The loaded version number as a string, or ``None`` if unknown or not available. - :raises ValueError: If the module is not defined in this version of Pillow. - """ - if not check_module(feature): - return None - - module, ver = modules[feature] - - return getattr(__import__(module, fromlist=[ver]), ver) - - -def get_supported_modules() -> list[str]: - """ - :returns: A list of all supported modules. - """ - return [f for f in modules if check_module(f)] - - -codecs = { - "jpg": ("jpeg", "jpeglib"), - "jpg_2000": ("jpeg2k", "jp2klib"), - "zlib": ("zip", "zlib"), - "libtiff": ("libtiff", "libtiff"), -} - - -def check_codec(feature: str) -> bool: - """ - Checks if a codec is available. - - :param feature: The codec to check for. - :returns: ``True`` if available, ``False`` otherwise. - :raises ValueError: If the codec is not defined in this version of Pillow. - """ - if feature not in codecs: - msg = f"Unknown codec {feature}" - raise ValueError(msg) - - codec, lib = codecs[feature] - - return f"{codec}_encoder" in dir(Image.core) - - -def version_codec(feature: str) -> str | None: - """ - :param feature: The codec to check for. - :returns: - The version number as a string, or ``None`` if not available. - Checked at compile time for ``jpg``, run-time otherwise. - :raises ValueError: If the codec is not defined in this version of Pillow. - """ - if not check_codec(feature): - return None - - codec, lib = codecs[feature] - - version = getattr(Image.core, f"{lib}_version") - - if feature == "libtiff": - return version.split("\n")[0].split("Version ")[1] - - return version - - -def get_supported_codecs() -> list[str]: - """ - :returns: A list of all supported codecs. - """ - return [f for f in codecs if check_codec(f)] - - -features: dict[str, tuple[str, str, str | None]] = { - "raqm": ("PIL._imagingft", "HAVE_RAQM", "raqm_version"), - "fribidi": ("PIL._imagingft", "HAVE_FRIBIDI", "fribidi_version"), - "harfbuzz": ("PIL._imagingft", "HAVE_HARFBUZZ", "harfbuzz_version"), - "libjpeg_turbo": ("PIL._imaging", "HAVE_LIBJPEGTURBO", "libjpeg_turbo_version"), - "mozjpeg": ("PIL._imaging", "HAVE_MOZJPEG", "libjpeg_turbo_version"), - "zlib_ng": ("PIL._imaging", "HAVE_ZLIBNG", "zlib_ng_version"), - "libimagequant": ("PIL._imaging", "HAVE_LIBIMAGEQUANT", "imagequant_version"), - "xcb": ("PIL._imaging", "HAVE_XCB", None), -} - - -def check_feature(feature: str) -> bool | None: - """ - Checks if a feature is available. - - :param feature: The feature to check for. - :returns: ``True`` if available, ``False`` if unavailable, ``None`` if unknown. - :raises ValueError: If the feature is not defined in this version of Pillow. - """ - if feature not in features: - msg = f"Unknown feature {feature}" - raise ValueError(msg) - - module, flag, ver = features[feature] - - try: - imported_module = __import__(module, fromlist=["PIL"]) - return getattr(imported_module, flag) - except ModuleNotFoundError: - return None - except ImportError as ex: - warnings.warn(str(ex)) - return None - - -def version_feature(feature: str) -> str | None: - """ - :param feature: The feature to check for. - :returns: The version number as a string, or ``None`` if not available. - :raises ValueError: If the feature is not defined in this version of Pillow. - """ - if not check_feature(feature): - return None - - module, flag, ver = features[feature] - - if ver is None: - return None - - return getattr(__import__(module, fromlist=[ver]), ver) - - -def get_supported_features() -> list[str]: - """ - :returns: A list of all supported features. - """ - return [f for f in features if check_feature(f)] - - -def check(feature: str) -> bool | None: - """ - :param feature: A module, codec, or feature name. - :returns: - ``True`` if the module, codec, or feature is available, - ``False`` or ``None`` otherwise. - """ - - if feature in modules: - return check_module(feature) - if feature in codecs: - return check_codec(feature) - if feature in features: - return check_feature(feature) - warnings.warn(f"Unknown feature '{feature}'.", stacklevel=2) - return False - - -def version(feature: str) -> str | None: - """ - :param feature: - The module, codec, or feature to check for. - :returns: - The version number as a string, or ``None`` if unknown or not available. - """ - if feature in modules: - return version_module(feature) - if feature in codecs: - return version_codec(feature) - if feature in features: - return version_feature(feature) - return None - - -def get_supported() -> list[str]: - """ - :returns: A list of all supported modules, features, and codecs. - """ - - ret = get_supported_modules() - ret.extend(get_supported_features()) - ret.extend(get_supported_codecs()) - return ret - - -def pilinfo(out: IO[str] | None = None, supported_formats: bool = True) -> None: - """ - Prints information about this installation of Pillow. - This function can be called with ``python3 -m PIL``. - It can also be called with ``python3 -m PIL.report`` or ``python3 -m PIL --report`` - to have "supported_formats" set to ``False``, omitting the list of all supported - image file formats. - - :param out: - The output stream to print to. Defaults to ``sys.stdout`` if ``None``. - :param supported_formats: - If ``True``, a list of all supported image file formats will be printed. - """ - - if out is None: - out = sys.stdout - - Image.init() - - print("-" * 68, file=out) - print(f"Pillow {PIL.__version__}", file=out) - py_version_lines = sys.version.splitlines() - print(f"Python {py_version_lines[0].strip()}", file=out) - for py_version in py_version_lines[1:]: - print(f" {py_version.strip()}", file=out) - print("-" * 68, file=out) - print(f"Python executable is {sys.executable or 'unknown'}", file=out) - if sys.prefix != sys.base_prefix: - print(f"Environment Python files loaded from {sys.prefix}", file=out) - print(f"System Python files loaded from {sys.base_prefix}", file=out) - print("-" * 68, file=out) - print( - f"Python Pillow modules loaded from {os.path.dirname(Image.__file__)}", - file=out, - ) - print( - f"Binary Pillow modules loaded from {os.path.dirname(Image.core.__file__)}", - file=out, - ) - print("-" * 68, file=out) - - for name, feature in [ - ("pil", "PIL CORE"), - ("tkinter", "TKINTER"), - ("freetype2", "FREETYPE2"), - ("littlecms2", "LITTLECMS2"), - ("webp", "WEBP"), - ("avif", "AVIF"), - ("jpg", "JPEG"), - ("jpg_2000", "OPENJPEG (JPEG2000)"), - ("zlib", "ZLIB (PNG/ZIP)"), - ("libtiff", "LIBTIFF"), - ("raqm", "RAQM (Bidirectional Text)"), - ("libimagequant", "LIBIMAGEQUANT (Quantization method)"), - ("xcb", "XCB (X protocol)"), - ]: - if check(name): - v: str | None = None - if name == "jpg": - libjpeg_turbo_version = version_feature("libjpeg_turbo") - if libjpeg_turbo_version is not None: - v = "mozjpeg" if check_feature("mozjpeg") else "libjpeg-turbo" - v += " " + libjpeg_turbo_version - if v is None: - v = version(name) - if v is not None: - version_static = name in ("pil", "jpg") - if name == "littlecms2": - # this check is also in src/_imagingcms.c:setup_module() - version_static = tuple(int(x) for x in v.split(".")) < (2, 7) - t = "compiled for" if version_static else "loaded" - if name == "zlib": - zlib_ng_version = version_feature("zlib_ng") - if zlib_ng_version is not None: - v += ", compiled for zlib-ng " + zlib_ng_version - elif name == "raqm": - for f in ("fribidi", "harfbuzz"): - v2 = version_feature(f) - if v2 is not None: - v += f", {f} {v2}" - print("---", feature, "support ok,", t, v, file=out) - else: - print("---", feature, "support ok", file=out) - else: - print("***", feature, "support not installed", file=out) - print("-" * 68, file=out) - - if supported_formats: - extensions = collections.defaultdict(list) - for ext, i in Image.EXTENSION.items(): - extensions[i].append(ext) - - for i in sorted(Image.ID): - line = f"{i}" - if i in Image.MIME: - line = f"{line} {Image.MIME[i]}" - print(line, file=out) - - if i in extensions: - print( - "Extensions: {}".format(", ".join(sorted(extensions[i]))), file=out - ) - - features = [] - if i in Image.OPEN: - features.append("open") - if i in Image.SAVE: - features.append("save") - if i in Image.SAVE_ALL: - features.append("save_all") - if i in Image.DECODERS: - features.append("decode") - if i in Image.ENCODERS: - features.append("encode") - - print("Features: {}".format(", ".join(features)), file=out) - print("-" * 68, file=out) diff --git a/voxvera/vendor/PIL/py.typed b/voxvera/vendor/PIL/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/PIL/report.py b/voxvera/vendor/PIL/report.py deleted file mode 100644 index d2815e8..0000000 --- a/voxvera/vendor/PIL/report.py +++ /dev/null @@ -1,5 +0,0 @@ -from __future__ import annotations - -from .features import pilinfo - -pilinfo(supported_formats=False) diff --git a/voxvera/vendor/PyInstaller/__init__.py b/voxvera/vendor/PyInstaller/__init__.py deleted file mode 100755 index a99f94e..0000000 --- a/voxvera/vendor/PyInstaller/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -__all__ = ('HOMEPATH', 'PLATFORM', '__version__', 'DEFAULT_DISTPATH', 'DEFAULT_SPECPATH', 'DEFAULT_WORKPATH') - -import os - -from PyInstaller import compat - -# Note: Keep this variable as plain string so it could be updated automatically when doing a release. -__version__ = '6.19.0' - -# Absolute path of this package's directory. Save this early so all submodules can use the absolute path. This is -# required for example if the current directory changes prior to loading the hooks. -PACKAGEPATH = os.path.abspath(os.path.dirname(__file__)) - -HOMEPATH = os.path.dirname(PACKAGEPATH) - -# Default values of paths where to put files created by PyInstaller. If changing these, do not forget to update the -# help text for corresponding command-line options, defined in build_main. - -# Where to put created .spec file. -DEFAULT_SPECPATH = os.getcwd() -# Where to put the final frozen application. -DEFAULT_DISTPATH = os.path.join(os.getcwd(), 'dist') -# Where to put all the temporary files; .log, .pyz, etc. -DEFAULT_WORKPATH = os.path.join(os.getcwd(), 'build') - -PLATFORM = compat.system + '-' + compat.architecture -# Include machine name in path to bootloader for some machines (e.g., 'arm'). Explicitly avoid doing this on macOS, -# where we keep universal2 bootloaders in Darwin-64bit folder regardless of whether we are on x86_64 or arm64. -if compat.machine and not compat.is_darwin: - PLATFORM += '-' + compat.machine -# Similarly, disambiguate musl Linux from glibc Linux. -if compat.is_musl: - PLATFORM += '-musl' diff --git a/voxvera/vendor/PyInstaller/__main__.py b/voxvera/vendor/PyInstaller/__main__.py deleted file mode 100755 index f36090b..0000000 --- a/voxvera/vendor/PyInstaller/__main__.py +++ /dev/null @@ -1,321 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Main command-line interface to PyInstaller. -""" -from __future__ import annotations - -import argparse -import os -import platform -import sys -import pathlib -from collections import defaultdict - -from PyInstaller import __version__ -from PyInstaller import log as logging -# Note: do not import anything else until compat.check_requirements function is run! -from PyInstaller import compat - -try: - from argcomplete import autocomplete -except ImportError: - - def autocomplete(parser): - return None - - -logger = logging.getLogger(__name__) - -# Taken from https://stackoverflow.com/a/22157136 to format args more flexibly: any help text which beings with ``R|`` -# will have all newlines preserved; the help text will be line wrapped. See -# https://docs.python.org/3/library/argparse.html#formatter-class. - - -# This is used by the ``--debug`` option. -class _SmartFormatter(argparse.HelpFormatter): - def _split_lines(self, text, width): - if text.startswith('R|'): - # The underlying implementation of ``RawTextHelpFormatter._split_lines`` invokes this; mimic it. - return text[2:].splitlines() - else: - # Invoke the usual formatter. - return super()._split_lines(text, width) - - -def run_makespec(filenames, **opts): - # Split pathex by using the path separator - temppaths = opts['pathex'][:] - pathex = opts['pathex'] = [] - for p in temppaths: - pathex.extend(p.split(os.pathsep)) - - import PyInstaller.building.makespec - - spec_file = PyInstaller.building.makespec.main(filenames, **opts) - logger.info('wrote %s' % spec_file) - return spec_file - - -def run_build(pyi_config, spec_file, **kwargs): - import PyInstaller.building.build_main - PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) - - -def __add_options(parser): - parser.add_argument( - '-v', - '--version', - action='version', - version=__version__, - help='Show program version info and exit.', - ) - - -class _PyiArgumentParser(argparse.ArgumentParser): - def __init__(self, *args, **kwargs): - self._pyi_action_groups = defaultdict(list) - super().__init__(*args, **kwargs) - - def _add_options(self, __add_options: callable, name: str = ""): - """ - Mutate self with the given callable, storing any new actions added in a named group - """ - n_actions_before = len(getattr(self, "_actions", [])) - __add_options(self) # preserves old behavior - new_actions = getattr(self, "_actions", [])[n_actions_before:] - self._pyi_action_groups[name].extend(new_actions) - - def _option_name(self, action): - """ - Get the option name(s) associated with an action - - For options that define both short and long names, this function will - return the long names joined by "/" - """ - longnames = [name for name in action.option_strings if name.startswith("--")] - if longnames: - name = "/".join(longnames) - else: - name = action.option_strings[0] - return name - - def _forbid_options(self, args: argparse.Namespace, group: str, errmsg: str = ""): - """Forbid options from a named action group""" - options = defaultdict(str) - for action in self._pyi_action_groups[group]: - dest = action.dest - name = self._option_name(action) - if getattr(args, dest) is not self.get_default(dest): - if dest in options: - options[dest] += "/" - options[dest] += name - - # if any options from the forbidden group are not the default values, - # the user must have passed them in, so issue an error report - if options: - sep = "\n " - bad = sep.join(options.values()) - if errmsg: - errmsg = "\n" + errmsg - raise SystemExit(f"ERROR: option(s) not allowed:{sep}{bad}{errmsg}") - - -def generate_parser() -> _PyiArgumentParser: - """ - Build an argparse parser for PyInstaller's main CLI. - """ - - import PyInstaller.building.build_main - import PyInstaller.building.makespec - import PyInstaller.log - - parser = _PyiArgumentParser(formatter_class=_SmartFormatter) - parser.prog = "pyinstaller" - - parser._add_options(__add_options) - parser._add_options(PyInstaller.building.makespec.__add_options, name="makespec") - parser._add_options(PyInstaller.building.build_main.__add_options, name="build_main") - parser._add_options(PyInstaller.log.__add_options, name="log") - - parser.add_argument( - 'filenames', - metavar='scriptname', - nargs='+', - help="Name of scriptfiles to be processed or exactly one .spec file. If a .spec file is specified, most " - "options are unnecessary and are ignored.", - ) - - return parser - - -def run(pyi_args: list | None = None, pyi_config: dict | None = None): - """ - pyi_args allows running PyInstaller programmatically without a subprocess - pyi_config allows checking configuration once when running multiple tests - """ - compat.check_requirements() - check_unsafe_privileges() - - import PyInstaller.log - - old_sys_argv = sys.argv - try: - parser = generate_parser() - autocomplete(parser) - if pyi_args is None: - pyi_args = sys.argv[1:] - try: - index = pyi_args.index("--") - except ValueError: - index = len(pyi_args) - args = parser.parse_args(pyi_args[:index]) - spec_args = pyi_args[index + 1:] - PyInstaller.log.__process_options(parser, args) - - # Print PyInstaller version, Python version, and platform as the first line to stdout. This helps us identify - # PyInstaller, Python, and platform version when users report issues. - try: - from _pyinstaller_hooks_contrib import __version__ as contrib_hooks_version - except Exception: - contrib_hooks_version = 'unknown' - - logger.info('PyInstaller: %s, contrib hooks: %s', __version__, contrib_hooks_version) - logger.info('Python: %s%s', platform.python_version(), " (conda)" if compat.is_conda else "") - logger.info('Platform: %s', platform.platform()) - logger.info('Python environment: %s', sys.prefix) - - # Skip creating .spec when .spec file is supplied. - if args.filenames[0].endswith('.spec'): - parser._forbid_options( - args, group="makespec", errmsg="makespec options not valid when a .spec file is given" - ) - spec_file = args.filenames[0] - else: - # Ensure that the given script files exist, before trying to generate the .spec file. - # This prevents us from overwriting an existing (and customized) .spec file if user makes a typo in the - # .spec file's suffix when trying to build it, for example, `pyinstaller program.cpes` (see #8276). - # It also prevents creation of a .spec file when `pyinstaller program.py` is accidentally ran from a - # directory that does not contain the script (for example, due to failing to change the directory prior - # to running the command). - for filename in args.filenames: - if not os.path.isfile(filename): - raise SystemExit(f"ERROR: Script file {filename!r} does not exist.") - spec_file = run_makespec(**vars(args)) - - sys.argv = [spec_file, *spec_args] - run_build(pyi_config, spec_file, **vars(args)) - - except KeyboardInterrupt: - raise SystemExit("Aborted by user request.") - except RecursionError: - from PyInstaller import _recursion_too_deep_message - _recursion_too_deep_message.raise_with_msg() - finally: - sys.argv = old_sys_argv - - -def _console_script_run(): - # Python prepends the main script's parent directory to sys.path. When PyInstaller is ran via the usual - # `pyinstaller` CLI entry point, this directory is $pythonprefix/bin which should not be in sys.path. - if os.path.basename(sys.path[0]) in ("bin", "Scripts"): - sys.path.pop(0) - run() - - -def check_unsafe_privileges(): - """ - Forbid dangerous usage of PyInstaller with escalated privileges - """ - if compat.is_win and not compat.is_win_wine: - # Discourage (with the intention to eventually block) people using *run as admin* with PyInstaller. - # There are 4 cases, block case 3 but be careful not to also block case 2. - # 1. User has no admin access: TokenElevationTypeDefault - # 2. User is an admin/UAC disabled (common on CI/VMs): TokenElevationTypeDefault - # 3. User has used *run as administrator* to elevate: TokenElevationTypeFull - # 4. User can escalate but hasn't: TokenElevationTypeLimited - # https://techcommunity.microsoft.com/t5/windows-blog-archive/how-to-determine-if-a-user-is-a-member-of-the-administrators/ba-p/228476 - import ctypes - - advapi32 = ctypes.CDLL("Advapi32.dll") - kernel32 = ctypes.CDLL("kernel32.dll") - - kernel32.GetCurrentProcess.restype = ctypes.c_void_p - process = kernel32.GetCurrentProcess() - - token = ctypes.c_void_p() - try: - TOKEN_QUERY = 8 - assert advapi32.OpenProcessToken(ctypes.c_void_p(process), TOKEN_QUERY, ctypes.byref(token)) - - elevation_type = ctypes.c_int() - TokenElevationType = 18 - assert advapi32.GetTokenInformation( - token, TokenElevationType, ctypes.byref(elevation_type), ctypes.sizeof(elevation_type), - ctypes.byref(ctypes.c_int()) - ) - finally: - kernel32.CloseHandle(token) - - if elevation_type.value == 2: # TokenElevationTypeFull - logger.log( - logging.DEPRECATION, - "Running PyInstaller as admin is not necessary nor sensible. Run PyInstaller from a non-administrator " - "terminal. PyInstaller 7.0 will block this." - ) - - elif compat.is_darwin or compat.is_linux: - # Discourage (with the intention to eventually block) people using *sudo* with PyInstaller. - # Again there are 4 cases, block only case 4. - # 1. Non-root: os.getuid() != 0 - # 2. Logged in as root (usually a VM): os.getlogin() == "root", os.getuid() == 0 - # 3. No named users (e.g. most Docker containers): os.getlogin() fails - # 4. Regular user using escalation: os.getlogin() != "root", os.getuid() == 0 - try: - user = os.getlogin() - except OSError: - user = "" - if os.getuid() == 0 and user and user != "root": - logger.log( - logging.DEPRECATION, - "Running PyInstaller as root is not necessary nor sensible. Do not use PyInstaller with sudo. " - "PyInstaller 7.0 will block this." - ) - - if compat.is_win: - # Do not let people run PyInstaller from admin cmd's default working directory (C:\Windows\system32) - cwd = pathlib.Path.cwd() - - try: - win_dir = compat.win32api.GetWindowsDirectory() - except Exception: - win_dir = None - win_dir = None if win_dir is None else pathlib.Path(win_dir).resolve() - - inside_win_dir = cwd == win_dir or win_dir in cwd.parents - - # The only exception to the above is if user's home directory is also located under %WINDIR%, which happens - # when PyInstaller is ran under SYSTEM user. - if inside_win_dir: - home_dir = pathlib.Path.home().resolve() - if cwd == home_dir or home_dir in cwd.parents: - inside_win_dir = False - - if inside_win_dir: - raise SystemExit( - f"ERROR: Do not run pyinstaller from {cwd}. cd to where your code is and run pyinstaller from there. " - "Hint: You can open a terminal where your code is by going to the parent folder in Windows file " - "explorer and typing cmd into the address bar." - ) - - -if __name__ == '__main__': - run() diff --git a/voxvera/vendor/PyInstaller/_recursion_too_deep_message.py b/voxvera/vendor/PyInstaller/_recursion_too_deep_message.py deleted file mode 100755 index e62c20d..0000000 --- a/voxvera/vendor/PyInstaller/_recursion_too_deep_message.py +++ /dev/null @@ -1,45 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -msg = """ -============================================================= -A RecursionError (maximum recursion depth exceeded) occurred. -For working around please follow these instructions -============================================================= - -1. In your program's .spec file add this line near the top:: - - import sys ; sys.setrecursionlimit(sys.getrecursionlimit() * 5) - -2. Build your program by running PyInstaller with the .spec file as - argument:: - - pyinstaller myprog.spec - -3. If this fails, you most probably hit an endless recursion in - PyInstaller. Please try to track this down as far as possible, - create a minimal example so we can reproduce and open an issue at - https://github.com/pyinstaller/pyinstaller/issues following the - instructions in the issue template. Many thanks. - -Explanation: Python's stack-limit is a safety-belt against endless recursion, -eating up memory. PyInstaller imports modules recursively. If the structure -how modules are imported within your program is awkward, this leads to the -nesting being too deep and hitting Python's stack-limit. - -With the default recursion limit (1000), the recursion error occurs at about -115 nested imported, with limit 2000 at about 240, with limit 5000 at about -660. -""" - - -def raise_with_msg(): - raise SystemExit(msg) diff --git a/voxvera/vendor/PyInstaller/_shared_with_waf.py b/voxvera/vendor/PyInstaller/_shared_with_waf.py deleted file mode 100755 index ed2615c..0000000 --- a/voxvera/vendor/PyInstaller/_shared_with_waf.py +++ /dev/null @@ -1,92 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Code to be shared by PyInstaller and the bootloader/wscript file. - -This code must not assume that either PyInstaller or any of its dependencies installed. I.e., the only imports allowed -in here are standard library ones. Within reason, it is preferable that this file should still run under Python 2.7 as -many compiler docker images still have only Python 2 installed. -""" - -import platform -import re - - -def _pyi_machine(machine, system): - # type: (str, str) -> str - """ - Choose an intentionally simplified architecture identifier to be used in the bootloader's directory name. - - Args: - machine: - The output of ``platform.machine()`` or any known architecture alias or shorthand that may be used by a - C compiler. - system: - The output of ``platform.system()`` on the target machine. - Returns: - Either a string tag or, on platforms that don't need an architecture tag, ``None``. - - Ideally, we would just use ``platform.machine()`` directly, but that makes cross-compiling the bootloader almost - impossible, because you need to know at compile time exactly what ``platform.machine()`` will be at run time, based - only on the machine name alias or shorthand reported by the C compiler at the build time. Rather, use a loose - differentiation, and trust that anyone mixing armv6l with armv6h knows what they are doing. - """ - # See the corresponding tests in tests/unit/test_compat.py for examples. - - if platform.machine() == "sw_64" or platform.machine() == "loongarch64": - # This explicitly inhibits cross compiling the bootloader for or on SunWay and LoongArch machine. - return platform.machine() - - if system == "Windows": - if machine.lower().startswith("arm"): - return "arm" - else: - return "intel" - - if system == "SunOS": - if machine.lower() in ("x86_64", "x86", "i86pc"): - return "intel" - else: - return "sparc" - - if system != "Linux": - # No architecture specifier for anything par Linux. - # - macOS is on two 64 bit architectures, but they are merged into one "universal2" bootloader. - # - BSD supports a wide range of architectures, but according to PyPI's download statistics, every one of our - # BSD users are on x86_64. This may change in the distant future. - return - - if machine.startswith(("arm", "aarch")): - # ARM has a huge number of similar and aliased sub-versions, such as armv5, armv6l armv8h, aarch64. - return "arm" - if machine in ("thumb"): - # Reported by waf/gcc when Thumb instruction set is enabled on 32-bit ARM. The platform.machine() returns "arm" - # regardless of the instruction set. - return "arm" - if machine in ("x86_64", "x64", "x86"): - return "intel" - if re.fullmatch("i[1-6]86", machine): - return "intel" - if machine.startswith(("ppc", "powerpc")): - # PowerPC comes in 64 vs 32 bit and little vs big endian variants. - return "ppc" - if machine in ("mips64", "mips"): - return "mips" - if machine.startswith("riscv"): - return "riscv" - # Machines with no known aliases :) - if machine in ("s390x",): - return machine - - # Unknown architectures are allowed by default, but will all be placed under one directory. In theory, trying to - # have multiple unknown architectures in one copy of PyInstaller will not work, but that should be sufficiently - # unlikely to ever happen. - return "unknown" diff --git a/voxvera/vendor/PyInstaller/archive/__init__.py b/voxvera/vendor/PyInstaller/archive/__init__.py deleted file mode 100755 index a7501ae..0000000 --- a/voxvera/vendor/PyInstaller/archive/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__author__ = 'martin' diff --git a/voxvera/vendor/PyInstaller/archive/pyz_crypto.py b/voxvera/vendor/PyInstaller/archive/pyz_crypto.py deleted file mode 100755 index a16905f..0000000 --- a/voxvera/vendor/PyInstaller/archive/pyz_crypto.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -class PyiBlockCipher: - def __init__(self, key=None): - from PyInstaller.exceptions import RemovedCipherFeatureError - raise RemovedCipherFeatureError("Please remove cipher and block_cipher parameters from your spec file.") diff --git a/voxvera/vendor/PyInstaller/archive/readers.py b/voxvera/vendor/PyInstaller/archive/readers.py deleted file mode 100755 index 3ddc160..0000000 --- a/voxvera/vendor/PyInstaller/archive/readers.py +++ /dev/null @@ -1,238 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Python-based CArchive (PKG) reader implementation. Used only in the archive_viewer utility. -""" - -import os -import struct - -from PyInstaller.loader.pyimod01_archive import ZlibArchiveReader, ArchiveReadError - - -class NotAnArchiveError(TypeError): - pass - - -# Type codes for CArchive TOC entries -PKG_ITEM_BINARY = 'b' # binary -PKG_ITEM_DEPENDENCY = 'd' # runtime option -PKG_ITEM_PYZ = 'z' # zlib (pyz) - frozen Python code -PKG_ITEM_ZIPFILE = 'Z' # zlib (pyz) - frozen Python code -PKG_ITEM_PYPACKAGE = 'M' # Python package (__init__.py) -PKG_ITEM_PYMODULE = 'm' # Python module -PKG_ITEM_PYSOURCE = 's' # Python script (v3) -PKG_ITEM_DATA = 'x' # data -PKG_ITEM_RUNTIME_OPTION = 'o' # runtime option -PKG_ITEM_SPLASH = 'l' # splash resources - - -class CArchiveReader: - """ - Reader for PyInstaller's CArchive (PKG) archive. - """ - - # Cookie - holds some information for the bootloader. C struct format definition. '!' at the beginning means network - # byte order. C struct looks like: - # - # typedef struct _archive_cookie - # { - # char magic[8]; - # uint32_t pkg_length; - # uint32_t toc_offset; - # uint32_t toc_length; - # uint32_t python_version; - # char python_libname[64]; - # } ARCHIVE_COOKIE; - # - _COOKIE_MAGIC_PATTERN = b'MEI\014\013\012\013\016' - - _COOKIE_FORMAT = '!8sIIII64s' - _COOKIE_LENGTH = struct.calcsize(_COOKIE_FORMAT) - - # TOC entry: - # - # typedef struct _toc_entry - # { - # uint32_t entry_length; - # uint32_t offset; - # uint32_t length; - # uint32_t uncompressed_length; - # unsigned char compression_flag; - # char typecode; - # char name[1]; /* Variable-length name, padded to multiple of 16 */ - # } TOC_ENTRY; - # - _TOC_ENTRY_FORMAT = '!IIIIBc' - _TOC_ENTRY_LENGTH = struct.calcsize(_TOC_ENTRY_FORMAT) - - def __init__(self, filename): - self._filename = filename - self._start_offset = 0 - self._end_offset = 0 - self._toc_offset = 0 - self._toc_length = 0 - - self.toc = {} - self.options = [] - - # Load TOC - with open(self._filename, "rb") as fp: - # Find cookie MAGIC pattern - cookie_start_offset = self._find_magic_pattern(fp, self._COOKIE_MAGIC_PATTERN) - if cookie_start_offset == -1: - raise ArchiveReadError("Could not find COOKIE magic pattern!") - - # Read the whole cookie - fp.seek(cookie_start_offset, os.SEEK_SET) - cookie_data = fp.read(self._COOKIE_LENGTH) - - magic, archive_length, toc_offset, toc_length, pyvers, pylib_name = \ - struct.unpack(self._COOKIE_FORMAT, cookie_data) - - # Compute start and end offset of the the archive - self._end_offset = cookie_start_offset + self._COOKIE_LENGTH - self._start_offset = self._end_offset - archive_length - - # Verify that Python shared library name is set - if not pylib_name: - raise ArchiveReadError("Python shared library name not set in the archive!") - - # Read whole toc - fp.seek(self._start_offset + toc_offset) - toc_data = fp.read(toc_length) - - self.toc, self.options = self._parse_toc(toc_data) - - @staticmethod - def _find_magic_pattern(fp, magic_pattern): - # Start at the end of file, and scan back-to-start - fp.seek(0, os.SEEK_END) - end_pos = fp.tell() - - # Scan from back - SEARCH_CHUNK_SIZE = 8192 - magic_offset = -1 - while end_pos >= len(magic_pattern): - start_pos = max(end_pos - SEARCH_CHUNK_SIZE, 0) - chunk_size = end_pos - start_pos - # Is the remaining chunk large enough to hold the pattern? - if chunk_size < len(magic_pattern): - break - # Read and scan the chunk - fp.seek(start_pos, os.SEEK_SET) - buf = fp.read(chunk_size) - pos = buf.rfind(magic_pattern) - if pos != -1: - magic_offset = start_pos + pos - break - # Adjust search location for next chunk; ensure proper overlap - end_pos = start_pos + len(magic_pattern) - 1 - - return magic_offset - - @classmethod - def _parse_toc(cls, data): - options = [] - toc = {} - cur_pos = 0 - while cur_pos < len(data): - # Read and parse the fixed-size TOC entry header - entry_length, entry_offset, data_length, uncompressed_length, compression_flag, typecode = \ - struct.unpack(cls._TOC_ENTRY_FORMAT, data[cur_pos:(cur_pos + cls._TOC_ENTRY_LENGTH)]) - cur_pos += cls._TOC_ENTRY_LENGTH - # Read variable-length name - name_length = entry_length - cls._TOC_ENTRY_LENGTH - name, *_ = struct.unpack(f'{name_length}s', data[cur_pos:(cur_pos + name_length)]) - cur_pos += name_length - # Name string may contain up to 15 bytes of padding - name = name.rstrip(b'\0').decode('utf-8') - - typecode = typecode.decode('ascii') - - # The TOC should not contain duplicates, except for OPTION entries. Therefore, keep those - # in a separate list. With options, the rest of the entries do not make sense, anyway. - if typecode == 'o': - options.append(name) - else: - toc[name] = (entry_offset, data_length, uncompressed_length, compression_flag, typecode) - - return toc, options - - def extract(self, name): - """ - Extract data for the given entry name. - """ - - entry = self.toc.get(name) - if entry is None: - raise KeyError(f"No entry named {name!r} found in the archive!") - - entry_offset, data_length, uncompressed_length, compression_flag, typecode = entry - with open(self._filename, "rb") as fp: - fp.seek(self._start_offset + entry_offset, os.SEEK_SET) - data = fp.read(data_length) - - if compression_flag: - import zlib - data = zlib.decompress(data) - - return data - - def raw_pkg_data(self): - """ - Extract complete PKG/CArchive archive from the parent file (executable). - """ - total_length = self._end_offset - self._start_offset - with open(self._filename, "rb") as fp: - fp.seek(self._start_offset, os.SEEK_SET) - return fp.read(total_length) - - def open_embedded_archive(self, name): - """ - Open new archive reader for the embedded archive. - """ - - entry = self.toc.get(name) - if entry is None: - raise KeyError(f"No entry named {name!r} found in the archive!") - - entry_offset, data_length, uncompressed_length, compression_flag, typecode = entry - - if typecode == PKG_ITEM_PYZ: - # Open as embedded archive, without extraction. - return ZlibArchiveReader(self._filename, self._start_offset + entry_offset) - elif typecode == PKG_ITEM_ZIPFILE: - raise NotAnArchiveError("Zipfile archives not supported yet!") - else: - raise NotAnArchiveError(f"Entry {name!r} is not a supported embedded archive!") - - -def pkg_archive_contents(filename, recursive=True): - """ - List the contents of the PKG / CArchive. If `recursive` flag is set (the default), the contents of the embedded PYZ - archive is included as well. - - Used by the tests. - """ - - contents = [] - - pkg_archive = CArchiveReader(filename) - for name, toc_entry in pkg_archive.toc.items(): - *_, typecode = toc_entry - contents.append(name) - if typecode == PKG_ITEM_PYZ and recursive: - pyz_archive = pkg_archive.open_embedded_archive(name) - for name in pyz_archive.toc.keys(): - contents.append(name) - - return contents diff --git a/voxvera/vendor/PyInstaller/archive/writers.py b/voxvera/vendor/PyInstaller/archive/writers.py deleted file mode 100755 index e854e5e..0000000 --- a/voxvera/vendor/PyInstaller/archive/writers.py +++ /dev/null @@ -1,458 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Utilities to create data structures for embedding Python modules and additional files into the executable. -""" - -import marshal -import os -import shutil -import struct -import sys -import zlib - -from PyInstaller.building.utils import get_code_object, replace_filename_in_code_object -from PyInstaller.compat import BYTECODE_MAGIC, is_win, strict_collect_mode -from PyInstaller.loader.pyimod01_archive import PYZ_ITEM_MODULE, PYZ_ITEM_NSPKG, PYZ_ITEM_PKG - - -class ZlibArchiveWriter: - """ - Writer for PyInstaller's PYZ (ZlibArchive) archive. The archive is used to store collected byte-compiled Python - modules, as individually-compressed entries. - """ - _PYZ_MAGIC_PATTERN = b'PYZ\0' - _HEADER_LENGTH = 12 + 5 - _COMPRESSION_LEVEL = 6 # zlib compression level - - def __init__(self, filename, entries, code_dict=None): - """ - filename - Target filename of the archive. - entries - An iterable containing entries in the form of tuples: (name, src_path, typecode), where `name` is the name - under which the resource is stored (e.g., python module name, without suffix), `src_path` is name of the - file from which the resource is read, and `typecode` is the Analysis-level TOC typecode (`PYMODULE`). - code_dict - Optional code dictionary containing code objects for analyzed/collected python modules. - """ - code_dict = code_dict or {} - - with open(filename, "wb") as fp: - # Reserve space for the header. - fp.write(b'\0' * self._HEADER_LENGTH) - - # Write entries' data and collect TOC entries - toc = [] - for entry in entries: - toc_entry = self._write_entry(fp, entry, code_dict) - toc.append(toc_entry) - - # Write TOC - toc_offset = fp.tell() - toc_data = marshal.dumps(toc) - fp.write(toc_data) - - # Write header: - # - PYZ magic pattern (4 bytes) - # - python bytecode magic pattern (4 bytes) - # - TOC offset (32-bit int, 4 bytes) - # - 4 unused bytes - fp.seek(0, os.SEEK_SET) - - fp.write(self._PYZ_MAGIC_PATTERN) - fp.write(BYTECODE_MAGIC) - fp.write(struct.pack('!i', toc_offset)) - - @classmethod - def _write_entry(cls, fp, entry, code_dict): - name, src_path, typecode = entry - assert typecode in {'PYMODULE', 'PYMODULE-1', 'PYMODULE-2'} - - if src_path in {'-', None}: - # PEP-420 namespace package; these do not have code objects, but we still need an entry in PYZ to inform our - # run-time module finder/loader of the package's existence. So create a TOC entry for 0-byte data blob, - # and write no data. - return (name, (PYZ_ITEM_NSPKG, fp.tell(), 0)) - - code_object = code_dict[name] - - src_basename, _ = os.path.splitext(os.path.basename(src_path)) - if src_basename == '__init__': - typecode = PYZ_ITEM_PKG - co_filename = os.path.join(*name.split('.'), '__init__.py') - else: - typecode = PYZ_ITEM_MODULE - co_filename = os.path.join(*name.split('.')) + '.py' - - # Replace co_filename on code object with anonymized version without absolute path to the module. - code_object = replace_filename_in_code_object(code_object, co_filename) - - # Serialize - data = marshal.dumps(code_object) - - # First compress, then encrypt. - obj = zlib.compress(data, cls._COMPRESSION_LEVEL) - - # Create TOC entry - toc_entry = (name, (typecode, fp.tell(), len(obj))) - - # Write data blob - fp.write(obj) - - return toc_entry - - -class CArchiveWriter: - """ - Writer for PyInstaller's CArchive (PKG) archive. - - This archive contains all files that are bundled within an executable; a PYZ (ZlibArchive), DLLs, Python C - extensions, and other data files that are bundled in onefile mode. - - The archive can be read from either C (bootloader code at application's run-time) or Python (for debug purposes). - """ - _COOKIE_MAGIC_PATTERN = b'MEI\014\013\012\013\016' - - # For cookie and TOC entry structure, see `PyInstaller.archive.readers.CArchiveReader`. - _COOKIE_FORMAT = '!8sIIII64s' - _COOKIE_LENGTH = struct.calcsize(_COOKIE_FORMAT) - - _TOC_ENTRY_FORMAT = '!IIIIBc' - _TOC_ENTRY_LENGTH = struct.calcsize(_TOC_ENTRY_FORMAT) - - _COMPRESSION_LEVEL = 9 # zlib compression level - - def __init__(self, filename, entries, pylib_name): - """ - filename - Target filename of the archive. - entries - An iterable containing entries in the form of tuples: (dest_name, src_name, compress, typecode), where - `dest_name` is the name under which the resource is stored in the archive (and name under which it is - extracted at runtime), `src_name` is name of the file from which the resouce is read, `compress` is a - boolean compression flag, and `typecode` is the Analysis-level TOC typecode. - pylib_name - Name of the python shared library. - """ - self._collected_names = set() # Track collected names for strict package mode. - - with open(filename, "wb") as fp: - # Write entries' data and collect TOC entries - toc = [] - for entry in entries: - toc_entry = self._write_entry(fp, entry) - toc.append(toc_entry) - - # Write TOC - toc_offset = fp.tell() - toc_data = self._serialize_toc(toc) - toc_length = len(toc_data) - - fp.write(toc_data) - - # Write cookie - archive_length = toc_offset + toc_length + self._COOKIE_LENGTH - pyvers = sys.version_info[0] * 100 + sys.version_info[1] - cookie_data = struct.pack( - self._COOKIE_FORMAT, - self._COOKIE_MAGIC_PATTERN, - archive_length, - toc_offset, - toc_length, - pyvers, - pylib_name.encode('ascii'), - ) - - fp.write(cookie_data) - - def _write_entry(self, fp, entry): - dest_name, src_name, compress, typecode = entry - - # Write OPTION entries as-is, without normalizing them. This also exempts them from duplication check, - # allowing them to be specified multiple times. - if typecode == 'o': - return self._write_blob(fp, b"", dest_name, typecode) - - # Ensure forward slashes in paths are on Windows converted to back slashes '\\', as on Windows the bootloader - # works only with back slashes. - dest_name = os.path.normpath(dest_name) - if is_win and os.path.sep == '/': - # When building under MSYS, the above path normalization uses Unix-style separators, so replace them - # manually. - dest_name = dest_name.replace(os.path.sep, '\\') - - # For symbolic link entries, also ensure that the symlink target path (stored in src_name) is using - # Windows-style back slash separators. - if typecode == 'n': - src_name = src_name.replace(os.path.sep, '\\') - - # Strict pack/collect mode: keep track of the destination names, and raise an error if we try to add a duplicate - # (a file with same destination name, subject to OS case normalization rules). - if strict_collect_mode: - normalized_dest = None - if typecode in {'s', 's1', 's2', 'm', 'M'}: - # Exempt python source scripts and modules from the check. - pass - else: - # Everything else; normalize the case - normalized_dest = os.path.normcase(dest_name) - # Check for existing entry, if applicable - if normalized_dest: - if normalized_dest in self._collected_names: - raise ValueError( - f"Attempting to collect a duplicated file into CArchive: {normalized_dest} (type: {typecode})" - ) - self._collected_names.add(normalized_dest) - - if typecode == 'd': - # Dependency; merge src_name (= reference path prefix) and dest_name (= name) into single-string format that - # is parsed by bootloader. - return self._write_blob(fp, b"", f"{src_name}:{dest_name}", typecode) - elif typecode in {'s', 's1', 's2'}: - # If it is a source code file, compile it to a code object and marshal the object, so it can be unmarshalled - # by the bootloader. For that, we need to know target optimization level, which is stored in typecode. - optim_level = {'s': 0, 's1': 1, 's2': 2}[typecode] - code = get_code_object(dest_name, src_name, optimize=optim_level) - # Construct new `co_filename` by taking destination name, and replace its suffix with the one from the code - # object's co_filename; this should cover all of the following cases: - # - run-time hook script: the source name has a suffix (that is also present in `co_filename` produced by - # `get_code_object`), destination name has no suffix. - # - entry-point script with a suffix: both source name and destination name have the same suffix (and the - # same suffix is also in `co_filename` produced by `get_code_object`) - # - entry-point script without a suffix: neither source name nor destination name have a suffix, but - # `get_code_object` adds a .py suffix to `co_filename` to mitigate potential issues with POSIX - # executables and `traceback` module; we want to preserve this behavior. - co_filename = os.path.splitext(dest_name)[0] + os.path.splitext(code.co_filename)[1] - code = replace_filename_in_code_object(code, co_filename) - return self._write_blob(fp, marshal.dumps(code), dest_name, 's', compress=compress) - elif typecode in ('m', 'M'): - # Read the PYC file. We do not perform compilation here (in contrast to script files in the above branch), - # so typecode does not contain optimization level information. - with open(src_name, "rb") as in_fp: - data = in_fp.read() - assert data[:4] == BYTECODE_MAGIC - # Skip the PYC header, load the code object. - code = marshal.loads(data[16:]) - co_filename = dest_name + '.py' # Use dest name with added .py suffix. - code = replace_filename_in_code_object(code, co_filename) - # These module entries are loaded and executed within the bootloader, which requires only the code - # object, without the PYC header. - return self._write_blob(fp, marshal.dumps(code), dest_name, typecode, compress=compress) - elif typecode == 'n': - # Symbolic link; store target name (as NULL-terminated string) - data = src_name.encode('utf-8') + b'\x00' - return self._write_blob(fp, data, dest_name, typecode, compress=compress) - else: - return self._write_file(fp, src_name, dest_name, typecode, compress=compress) - - def _write_blob(self, out_fp, blob: bytes, dest_name, typecode, compress=False): - """ - Write the binary contents (**blob**) of a small file to the archive and return the corresponding CArchive TOC - entry. - """ - data_offset = out_fp.tell() - data_length = len(blob) - if compress: - blob = zlib.compress(blob, level=self._COMPRESSION_LEVEL) - out_fp.write(blob) - - return (data_offset, len(blob), data_length, int(compress), typecode, dest_name) - - def _write_file(self, out_fp, src_name, dest_name, typecode, compress=False): - """ - Stream copy a large file into the archive and return the corresponding CArchive TOC entry. - """ - data_offset = out_fp.tell() - data_length = os.stat(src_name).st_size - with open(src_name, 'rb') as in_fp: - if compress: - tmp_buffer = bytearray(16 * 1024) - compressor = zlib.compressobj(self._COMPRESSION_LEVEL) - while True: - num_read = in_fp.readinto(tmp_buffer) - if not num_read: - break - out_fp.write(compressor.compress(tmp_buffer[:num_read])) - out_fp.write(compressor.flush()) - else: - shutil.copyfileobj(in_fp, out_fp) - - return (data_offset, out_fp.tell() - data_offset, data_length, int(compress), typecode, dest_name) - - @classmethod - def _serialize_toc(cls, toc): - serialized_toc = [] - for toc_entry in toc: - data_offset, compressed_length, data_length, compress, typecode, name = toc_entry - - # Encode names as UTF-8. This should be safe as standard python modules only contain ASCII-characters (and - # standard shared libraries should have the same), and thus the C-code still can handle this correctly. - name = name.encode('utf-8') - name_length = len(name) + 1 # Add 1 for string-terminating zero byte. - - # Ensure TOC entries are aligned on 16-byte boundary, so they can be read by bootloader (C code) on - # platforms with strict data alignment requirements (for example linux on `armhf`/`armv7`, such as 32-bit - # Debian Buster on Raspberry Pi). - entry_length = cls._TOC_ENTRY_LENGTH + name_length - if entry_length % 16 != 0: - padding_length = 16 - (entry_length % 16) - name_length += padding_length - - # Serialize - serialized_entry = struct.pack( - cls._TOC_ENTRY_FORMAT + f"{name_length}s", # "Ns" format automatically pads the string with zero bytes. - cls._TOC_ENTRY_LENGTH + name_length, - data_offset, - compressed_length, - data_length, - compress, - typecode.encode('ascii'), - name, - ) - serialized_toc.append(serialized_entry) - - return b''.join(serialized_toc) - - -class SplashWriter: - """ - Writer for the splash screen resources archive. - - The resulting archive is added as an entry into the CArchive with the typecode PKG_ITEM_SPLASH. - """ - # This struct describes the splash resources as it will be in an buffer inside the bootloader. All necessary parts - # are bundled, the *_len and *_offset fields describe the data beyond this header definition. - # Whereas script and image fields are binary data, the requirements fields describe an array of strings. Each string - # is null-terminated in order to easily iterate over this list from within C. - # - # typedef struct _splash_data_header - # { - # char tcl_shared_library_name[32]; - # char tk_shared_library_name[32]; - # char tcl_module_directory_name[16]; - # char tk_module_directory_name[16]; - # - # uint32_t script_len; - # uint32_t script_offset; - # - # uint32_t image_len; - # uint32_t image_offset; - # - # uint32_t requirements_len; - # uint32_t requirements_offset; - # } SPLASH_DATA_HEADER; - # - _HEADER_FORMAT = '!32s 32s 16s 16s II II II' - _HEADER_LENGTH = struct.calcsize(_HEADER_FORMAT) - - # The created archive is compressed by the CArchive, so no need to compress the data here. - - def __init__( - self, - filename, - requirements_list, - tcl_shared_library_name, - tk_shared_library_name, - tcl_module_directory_name, - tk_module_directory_name, - image, - script, - ): - """ - Writer for splash screen resources that are bundled into the CArchive as a single archive/entry. - - :param filename: The filename of the archive to create - :param requirements_list: List of filenames for the requirements array - :param str tcl_shared_library_name: Basename of the Tcl shared library - :param str tk_shared_library_name: Basename of the Tk shared library - :param str tcl_module_directory_name: Basename of the Tcl module directory (e.g., tcl/) - :param str tk_module_directory_name: Basename of the Tk module directory (e.g., tk/) - :param Union[str, bytes] image: Image like object - :param str script: The tcl/tk script to execute to create the screen. - """ - - # Ensure forward slashes in dependency names are on Windows converted to back slashes '\\', as on Windows the - # bootloader works only with back slashes. - def _normalize_filename(filename): - filename = os.path.normpath(filename) - if is_win and os.path.sep == '/': - # When building under MSYS, the above path normalization uses Unix-style separators, so replace them - # manually. - filename = filename.replace(os.path.sep, '\\') - return filename - - requirements_list = [_normalize_filename(name) for name in requirements_list] - - with open(filename, "wb") as fp: - # Reserve space for the header. - fp.write(b'\0' * self._HEADER_LENGTH) - - # Serialize the requirements list. This list (more an array) contains the names of all files the bootloader - # needs to extract before the splash screen can be started. The implementation terminates every name with a - # null-byte, that keeps the list short memory wise and makes it iterable from C. - requirements_len = 0 - requirements_offset = fp.tell() - for name in requirements_list: - name = name.encode('utf-8') + b'\0' - fp.write(name) - requirements_len += len(name) - - # Write splash script - script_offset = fp.tell() - script_len = len(script) - fp.write(script.encode("utf-8")) - - # Write splash image. If image is a bytes buffer, it is written directly into the archive. Otherwise, it - # is assumed to be a path and the file is copied into the archive. - image_offset = fp.tell() - if isinstance(image, bytes): - # Image was converted by PIL/Pillow and is already in buffer - image_len = len(image) - fp.write(image) - else: - # Read image into buffer - with open(image, 'rb') as image_fp: - image_data = image_fp.read() - image_len = len(image_data) - fp.write(image_data) - del image_data - - # The following strings are written to 16-character fields with zero-padding, which means that we need to - # ensure that their length is strictly below 16 characters (if it were exactly 16, the field would have no - # terminating NULL character!). - def _encode_str(value, field_name, limit): - enc_value = value.encode("utf-8") - if len(enc_value) >= limit: - raise ValueError( - f"Length of the encoded field {field_name!r} ({len(enc_value)}) is greater or equal to the " - f"limit of {limit} characters!" - ) - - return enc_value - - # Write header - header_data = struct.pack( - self._HEADER_FORMAT, - _encode_str(tcl_shared_library_name, 'tcl_shared_library_name', 32), - _encode_str(tk_shared_library_name, 'tk_shared_library_name', 32), - _encode_str(tcl_module_directory_name, 'tcl_module_directory_name', 16), - _encode_str(tk_module_directory_name, 'tk_module_directory_name', 16), - script_len, - script_offset, - image_len, - image_offset, - requirements_len, - requirements_offset, - ) - - fp.seek(0, os.SEEK_SET) - fp.write(header_data) diff --git a/voxvera/vendor/PyInstaller/bootloader/Linux-64bit-intel/run b/voxvera/vendor/PyInstaller/bootloader/Linux-64bit-intel/run deleted file mode 100755 index 24b1aef..0000000 Binary files a/voxvera/vendor/PyInstaller/bootloader/Linux-64bit-intel/run and /dev/null differ diff --git a/voxvera/vendor/PyInstaller/bootloader/Linux-64bit-intel/run_d b/voxvera/vendor/PyInstaller/bootloader/Linux-64bit-intel/run_d deleted file mode 100755 index d3c2c91..0000000 Binary files a/voxvera/vendor/PyInstaller/bootloader/Linux-64bit-intel/run_d and /dev/null differ diff --git a/voxvera/vendor/PyInstaller/building/__init__.py b/voxvera/vendor/PyInstaller/building/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/building/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/building/api.py b/voxvera/vendor/PyInstaller/building/api.py deleted file mode 100755 index becea2c..0000000 --- a/voxvera/vendor/PyInstaller/building/api.py +++ /dev/null @@ -1,1334 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -This module contains classes that are available for the .spec files. - -Spec file is generated by PyInstaller. The generated code from .spec file -is a way how PyInstaller does the dependency analysis and creates executable. -""" - -import os -import subprocess -import sys -import time -import pathlib -import shutil -from operator import itemgetter - -from PyInstaller import HOMEPATH, PLATFORM -from PyInstaller import log as logging -from PyInstaller.archive.writers import CArchiveWriter, ZlibArchiveWriter -from PyInstaller.building.datastruct import Target, _check_guts_eq, normalize_pyz_toc, normalize_toc -from PyInstaller.building.utils import ( - _check_guts_toc, _make_clean_directory, _rmtree, process_collected_binary, get_code_object, compile_pymodule -) -from PyInstaller.building.splash import Splash # argument type validation in EXE -from PyInstaller.compat import is_cygwin, is_darwin, is_linux, is_win, strict_collect_mode, is_nogil, is_aix -from PyInstaller.depend import bindepend -from PyInstaller.depend.analysis import get_bootstrap_modules -import PyInstaller.utils.misc as miscutils - -logger = logging.getLogger(__name__) - -if is_win: - from PyInstaller.utils.win32 import (icon, versioninfo, winmanifest, winresource, winutils) - -if is_darwin: - import PyInstaller.utils.osx as osxutils - - -class PYZ(Target): - """ - Creates a zlib-based PYZ archive that contains byte-compiled pure Python modules. - """ - def __init__(self, *tocs, **kwargs): - """ - tocs - One or more TOC (Table of Contents) lists, usually an `Analysis.pure`. - - kwargs - Possible keyword arguments: - - name - A filename for the .pyz. Normally not needed, as the generated name will do fine. - """ - if kwargs.get("cipher"): - from PyInstaller.exceptions import RemovedCipherFeatureError - raise RemovedCipherFeatureError( - "Please remove the 'cipher' arguments to PYZ() and Analysis() in your spec file." - ) - - from PyInstaller.config import CONF - - super().__init__() - - name = kwargs.get('name', None) - - self.name = name - if name is None: - self.name = os.path.splitext(self.tocfilename)[0] + '.pyz' - - # PyInstaller bootstrapping modules. - bootstrap_dependencies = get_bootstrap_modules() - - # Compile the python modules that are part of bootstrap dependencies, so that they can be collected into the - # CArchive/PKG and imported by the bootstrap script. - self.dependencies = [] - workpath = os.path.join(CONF['workpath'], 'localpycs') - for name, src_path, typecode in bootstrap_dependencies: - if typecode == 'PYMODULE': - # Compile pymodule and include the compiled .pyc file. - pyc_path = compile_pymodule( - name, - src_path, - workpath, - # Never optimize bootstrap dependencies! - optimize=0, - code_cache=None, - ) - self.dependencies.append((name, pyc_path, typecode)) - else: - # Include as is (extensions). - self.dependencies.append((name, src_path, typecode)) - - # Merge input TOC(s) and their code object dictionaries (if available). Skip the bootstrap modules, which will - # be passed on to CArchive/PKG. - bootstrap_module_names = set(name for name, _, typecode in self.dependencies if typecode == 'PYMODULE') - self.toc = [] - self.code_dict = {} - for toc in tocs: - # Check if code cache association exists for the given TOC list - code_cache = CONF['code_cache'].get(id(toc)) - if code_cache is not None: - self.code_dict.update(code_cache) - - for entry in toc: - name, _, typecode = entry - # PYZ expects only PYMODULE entries (python code objects). - assert typecode in {'PYMODULE', 'PYMODULE-1', 'PYMODULE-2'}, f"Invalid entry passed to PYZ: {entry}!" - # Module required during bootstrap; skip to avoid collecting a duplicate. - if name in bootstrap_module_names: - continue - self.toc.append(entry) - - # Normalize TOC - self.toc = normalize_pyz_toc(self.toc) - - # Alphabetically sort the TOC to enable reproducible builds. - self.toc.sort() - - self.__postinit__() - - _GUTS = ( - # input parameters - ('name', _check_guts_eq), - ('toc', _check_guts_toc), - # no calculated/analysed values - ) - - def assemble(self): - logger.info("Building PYZ (ZlibArchive) %s", self.name) - - # Ensure code objects are available for all modules we are about to collect. - # NOTE: PEP-420 namespace packages (marked by src_path being set to '-') do not have code objects. - # NOTE: `self.toc` is already sorted by names. - archive_toc = [] - for entry in self.toc: - name, src_path, typecode = entry - if src_path not in {'-', None} and name not in self.code_dict: - # The code object is not available from the ModuleGraph's cache; re-create it. - optim_level = {'PYMODULE': 0, 'PYMODULE-1': 1, 'PYMODULE-2': 2}[typecode] - try: - self.code_dict[name] = get_code_object(name, src_path, optimize=optim_level) - except SyntaxError: - # The module was likely written for different Python version; exclude it - continue - archive_toc.append(entry) - - # Create the archive - ZlibArchiveWriter(self.name, archive_toc, code_dict=self.code_dict) - logger.info("Building PYZ (ZlibArchive) %s completed successfully.", self.name) - - -class PKG(Target): - """ - Creates a CArchive. CArchive is the data structure that is embedded into the executable. This data structure allows - to include various read-only data in a single-file deployment. - """ - xformdict = { - # PYMODULE entries are already byte-compiled, so we do not need to encode optimization level in the low-level - # typecodes. PYSOURCE entries are byte-compiled by the underlying writer, so we need to pass the optimization - # level via low-level typecodes. - 'PYMODULE': 'm', - 'PYMODULE-1': 'm', - 'PYMODULE-2': 'm', - 'PYSOURCE': 's', - 'PYSOURCE-1': 's1', - 'PYSOURCE-2': 's2', - 'EXTENSION': 'b', - 'PYZ': 'z', - 'PKG': 'a', - 'DATA': 'x', - 'BINARY': 'b', - 'ZIPFILE': 'Z', - 'EXECUTABLE': 'b', - 'DEPENDENCY': 'd', - 'SPLASH': 'l', - 'SYMLINK': 'n', - } - - def __init__( - self, - toc, - python_lib_name, - name=None, - cdict=None, - exclude_binaries=False, - strip_binaries=False, - upx_binaries=False, - upx_exclude=None, - target_arch=None, - codesign_identity=None, - entitlements_file=None - ): - """ - toc - A TOC (Table of Contents) list. - python_lib_name - Name of the python shared library to store in PKG. Required by bootloader. - name - An optional filename for the PKG. - cdict - Dictionary that specifies compression by typecode. For Example, PYZ is left uncompressed so that it - can be accessed inside the PKG. The default uses sensible values. If zlib is not available, no - compression is used. - exclude_binaries - If True, EXTENSIONs and BINARYs will be left out of the PKG, and forwarded to its container (usually - a COLLECT). - strip_binaries - If True, use 'strip' command to reduce the size of binary files. - upx_binaries - """ - super().__init__() - - self.toc = normalize_toc(toc) # Ensure guts contain normalized TOC - self.python_lib_name = python_lib_name - self.cdict = cdict - self.name = name - if name is None: - self.name = os.path.splitext(self.tocfilename)[0] + '.pkg' - self.exclude_binaries = exclude_binaries - self.strip_binaries = strip_binaries - self.upx_binaries = upx_binaries - self.upx_exclude = upx_exclude or [] - self.target_arch = target_arch - self.codesign_identity = codesign_identity - self.entitlements_file = entitlements_file - - # This dict tells PyInstaller what items embedded in the executable should be compressed. - if self.cdict is None: - self.cdict = { - 'EXTENSION': COMPRESSED, - 'DATA': COMPRESSED, - 'BINARY': COMPRESSED, - 'EXECUTABLE': COMPRESSED, - 'PYSOURCE': COMPRESSED, - 'PYMODULE': COMPRESSED, - 'SPLASH': COMPRESSED, - # Do not compress PYZ as a whole, as it contains individually-compressed modules. - 'PYZ': UNCOMPRESSED, - # Do not compress target names in symbolic links. - 'SYMLINK': UNCOMPRESSED, - } - - self.__postinit__() - - _GUTS = ( # input parameters - ('name', _check_guts_eq), - ('cdict', _check_guts_eq), - ('toc', _check_guts_toc), # list unchanged and no newer files - ('python_lib_name', _check_guts_eq), - ('exclude_binaries', _check_guts_eq), - ('strip_binaries', _check_guts_eq), - ('upx_binaries', _check_guts_eq), - ('upx_exclude', _check_guts_eq), - ('target_arch', _check_guts_eq), - ('codesign_identity', _check_guts_eq), - ('entitlements_file', _check_guts_eq), - # no calculated/analysed values - ) - - def assemble(self): - logger.info("Building PKG (CArchive) %s", os.path.basename(self.name)) - - pkg_file = pathlib.Path(self.name).resolve() # Used to detect attempts at PKG feeding itself - - bootstrap_toc = [] # TOC containing bootstrap scripts and modules, which must not be sorted. - archive_toc = [] # TOC containing all other elements. Sorted to enable reproducible builds. - - for dest_name, src_name, typecode in self.toc: - # Ensure that the source file exists, if necessary. Skip the check for OPTION entries, where 'src_name' is - # None. Also skip DEPENDENCY entries due to special contents of 'dest_name' and/or 'src_name'. Same for the - # SYMLINK entries, where 'src_name' is relative target name for symbolic link. - if typecode not in {'OPTION', 'DEPENDENCY', 'SYMLINK'}: - if not os.path.exists(src_name): - if strict_collect_mode: - raise ValueError(f"Non-existent resource {src_name}, meant to be collected as {dest_name}!") - else: - logger.warning( - "Ignoring non-existent resource %s, meant to be collected as %s", src_name, dest_name - ) - continue - - # Detect attempt at collecting PKG into itself, as it results in and endless feeding loop and exhaustion - # of all available storage space. - if pathlib.Path(src_name).resolve() == pkg_file: - raise ValueError(f"Trying to collect PKG file {src_name} into itself!") - - if typecode in ('BINARY', 'EXTENSION'): - if self.exclude_binaries: - # This is onedir-specific codepath - the EXE and consequently PKG should not be passed the Analysis' - # `datas` and `binaries` TOCs (unless the user messes up the .spec file). However, EXTENSION entries - # might still slip in via `PYZ.dependencies`, which are merged by EXE into its TOC and passed on to - # PKG here. Such entries need to be passed to the parent container (the COLLECT) via - # `PKG.dependencies`. - # - # This codepath formerly performed such pass-through only for EXTENSION entries, but in order to - # keep code simple, we now also do it for BINARY entries. In a sane world, we do not expect to - # encounter them here; but if they do happen to pass through here and we pass them on, the - # container's TOC de-duplication should take care of them (same as with EXTENSION ones, really). - self.dependencies.append((dest_name, src_name, typecode)) - else: - # This is onefile-specific codepath. The binaries (both EXTENSION and BINARY entries) need to be - # processed using `process_collected_binary` helper. - src_name = process_collected_binary( - src_name, - dest_name, - use_strip=self.strip_binaries, - use_upx=self.upx_binaries, - upx_exclude=self.upx_exclude, - target_arch=self.target_arch, - codesign_identity=self.codesign_identity, - entitlements_file=self.entitlements_file, - strict_arch_validation=(typecode == 'EXTENSION'), - ) - archive_toc.append((dest_name, src_name, self.cdict.get(typecode, False), self.xformdict[typecode])) - elif typecode in ('DATA', 'ZIPFILE'): - # Same logic as above for BINARY and EXTENSION; if `exclude_binaries` is set, we are in onedir mode; - # we should exclude DATA (and ZIPFILE) entries and instead pass them on via PKG's `dependencies`. This - # prevents a onedir application from becoming a broken onefile one if user accidentally passes datas - # and binaries TOCs to EXE instead of COLLECT. - if self.exclude_binaries: - self.dependencies.append((dest_name, src_name, typecode)) - else: - if typecode == 'DATA' and os.access(src_name, os.X_OK): - # DATA with executable bit set (e.g., shell script); turn into binary so that executable bit is - # restored on the extracted file. - carchive_typecode = 'b' - else: - carchive_typecode = self.xformdict[typecode] - archive_toc.append((dest_name, src_name, self.cdict.get(typecode, False), carchive_typecode)) - elif typecode == 'OPTION': - archive_toc.append((dest_name, '', False, 'o')) - elif typecode in {'PYSOURCE', 'PYSOURCE-1', 'PYSOURCE-2', 'PYMODULE', 'PYMODULE-1', 'PYMODULE-2'}: - # Collect python script and modules in a TOC that will not be sorted. - bootstrap_toc.append((dest_name, src_name, self.cdict.get(typecode, False), self.xformdict[typecode])) - elif typecode == 'PYZ': - # Override PYZ name in the PKG archive into PYZ.pyz, regardless of what the original name was. The - # bootloader looks for PYZ via the typecode and implicitly expects a single entry, so the name does - # not matter. However, having a fixed name matters if we want reproducibility in scenarios where - # multiple builds are performed within the same process (for example, on our CI). - archive_toc.append(('PYZ.pyz', src_name, self.cdict.get(typecode, False), self.xformdict[typecode])) - else: - # PKG, DEPENDENCY, SPLASH, SYMLINK - archive_toc.append((dest_name, src_name, self.cdict.get(typecode, False), self.xformdict[typecode])) - - # Sort content alphabetically by type and name to enable reproducible builds. - archive_toc.sort(key=itemgetter(3, 0)) - # Do *not* sort modules and scripts, as their order is important. - # TODO: Think about having all modules first and then all scripts. - CArchiveWriter(self.name, bootstrap_toc + archive_toc, pylib_name=self.python_lib_name) - - logger.info("Building PKG (CArchive) %s completed successfully.", os.path.basename(self.name)) - - -class EXE(Target): - """ - Creates the final executable of the frozen app. This bundles all necessary files together. - """ - def __init__(self, *args, **kwargs): - """ - args - One or more arguments that are either an instance of `Target` or an iterable representing TOC list. - kwargs - Possible keyword arguments: - - bootloader_ignore_signals - Non-Windows only. If True, the bootloader process will ignore all ignorable signals. If False (default), - it will forward all signals to the child process. Useful in situations where for example a supervisor - process signals both the bootloader and the child (e.g., via a process group) to avoid signalling the - child twice. - console - On Windows or macOS governs whether to use the console executable or the windowed executable. Always - True on Linux/Unix (always console executable - it does not matter there). - hide_console - Windows only. In console-enabled executable, hide or minimize the console window if the program owns the - console window (i.e., was not launched from existing console window). Depending on the setting, the - console is hidden/mininized either early in the bootloader execution ('hide-early', 'minimize-early') or - late in the bootloader execution ('hide-late', 'minimize-late'). The early option takes place as soon as - the PKG archive is found. In onefile builds, the late option takes place after application has unpacked - itself and before it launches the child process. In onedir builds, the late option takes place before - starting the embedded python interpreter. - disable_windowed_traceback - Disable traceback dump of unhandled exception in windowed (noconsole) mode (Windows and macOS only), - and instead display a message that this feature is disabled. - debug - Setting to True gives you progress messages from the executable (for console=False there will be - annoying MessageBoxes on Windows). - name - The filename for the executable. On Windows suffix '.exe' is appended. - exclude_binaries - Forwarded to the PKG the EXE builds. - icon - Windows and macOS only. icon='myicon.ico' to use an icon file or icon='notepad.exe,0' to grab an icon - resource. Defaults to use PyInstaller's console or windowed icon. Use icon=`NONE` to not add any icon. - version - Windows only. version='myversion.txt'. Use grab_version.py to get a version resource from an executable - and then edit the output to create your own. (The syntax of version resources is so arcane that I would - not attempt to write one from scratch). - uac_admin - Windows only. Setting to True creates a Manifest with will request elevation upon application start. - uac_uiaccess - Windows only. Setting to True allows an elevated application to work with Remote Desktop. - argv_emulation - macOS only. Enables argv emulation in macOS .app bundles (i.e., windowed bootloader). If enabled, the - initial open document/URL Apple Events are intercepted by bootloader and converted into sys.argv. - target_arch - macOS only. Used to explicitly specify the target architecture; either single-arch ('x86_64' or 'arm64') - or 'universal2'. Used in checks that the collected binaries contain the requires arch slice(s) and/or - to convert fat binaries into thin ones as necessary. If not specified (default), a single-arch build - corresponding to running architecture is assumed. - codesign_identity - macOS only. Use the provided identity to sign collected binaries and the generated executable. If - signing identity is not provided, ad-hoc signing is performed. - entitlements_file - macOS only. Optional path to entitlements file to use with code signing of collected binaries - (--entitlements option to codesign utility). - contents_directory - Onedir mode only. Specifies the name of the directory where all files par the executable will be placed. - Setting the name to '.' (or '' or None) re-enables old onedir layout without contents directory. - """ - from PyInstaller.config import CONF - - super().__init__() - - # Available options for EXE in .spec files. - self.exclude_binaries = kwargs.get('exclude_binaries', False) - self.bootloader_ignore_signals = kwargs.get('bootloader_ignore_signals', False) - self.console = kwargs.get('console', True) - self.hide_console = kwargs.get('hide_console', None) - self.disable_windowed_traceback = kwargs.get('disable_windowed_traceback', False) - self.debug = kwargs.get('debug', False) - self.name = kwargs.get('name', None) - self.icon = kwargs.get('icon', None) - self.versrsrc = kwargs.get('version', None) - self.manifest = kwargs.get('manifest', None) - self.resources = kwargs.get('resources', []) - self.strip = kwargs.get('strip', False) - self.upx_exclude = kwargs.get("upx_exclude", []) - self.runtime_tmpdir = kwargs.get('runtime_tmpdir', None) - self.contents_directory = kwargs.get("contents_directory", "_internal") - # If ``append_pkg`` is false, the archive will not be appended to the exe, but copied beside it. - self.append_pkg = kwargs.get('append_pkg', True) - - # On Windows allows the exe to request admin privileges. - self.uac_admin = kwargs.get('uac_admin', False) - self.uac_uiaccess = kwargs.get('uac_uiaccess', False) - - # macOS argv emulation - self.argv_emulation = kwargs.get('argv_emulation', False) - - # Target architecture (macOS only) - self.target_arch = kwargs.get('target_arch', None) - if is_darwin: - if self.target_arch is None: - import platform - self.target_arch = platform.machine() - else: - assert self.target_arch in {'x86_64', 'arm64', 'universal2'}, \ - f"Unsupported target arch: {self.target_arch}" - logger.info("EXE target arch: %s", self.target_arch) - else: - self.target_arch = None # explicitly disable - - # Code signing identity (macOS only) - self.codesign_identity = kwargs.get('codesign_identity', None) - if is_darwin: - logger.info("Code signing identity: %s", self.codesign_identity) - else: - self.codesign_identity = None # explicitly disable - # Code signing entitlements - self.entitlements_file = kwargs.get('entitlements_file', None) - - # UPX needs to be both available and enabled for the target. - self.upx = CONF['upx_available'] and kwargs.get('upx', False) - - # Catch and clear options that are unsupported on specific platforms. - if self.versrsrc and not is_win: - logger.warning('Ignoring version information; supported only on Windows!') - self.versrsrc = None - if self.manifest and not is_win: - logger.warning('Ignoring manifest; supported only on Windows!') - self.manifest = None - if self.resources and not is_win: - logger.warning('Ignoring resources; supported only on Windows!') - self.resources = [] - if self.icon and not (is_win or is_darwin): - logger.warning('Ignoring icon; supported only on Windows and macOS!') - self.icon = None - if self.hide_console and not is_win: - logger.warning('Ignoring hide_console; supported only on Windows!') - self.hide_console = None - - if self.contents_directory in ("", "."): - self.contents_directory = None # Re-enable old onedir layout without contents directory. - elif self.contents_directory == ".." or "/" in self.contents_directory or "\\" in self.contents_directory: - raise SystemExit( - f'ERROR: Invalid value "{self.contents_directory}" passed to `--contents-directory` or ' - '`contents_directory`. Exactly one directory level is required (or just "." to disable the ' - 'contents directory).' - ) - - if not kwargs.get('embed_manifest', True): - from PyInstaller.exceptions import RemovedExternalManifestError - raise RemovedExternalManifestError( - "Please remove the 'embed_manifest' argument to EXE() in your spec file." - ) - - # Old .spec format included in 'name' the path where to put created app. New format includes only exename. - # - # Ignore fullpath in the 'name' and prepend DISTPATH or WORKPATH. - # DISTPATH - onefile - # WORKPATH - onedir - if self.exclude_binaries: - # onedir mode - create executable in WORKPATH. - self.name = os.path.join(CONF['workpath'], os.path.basename(self.name)) - else: - # onefile mode - create executable in DISTPATH. - self.name = os.path.join(CONF['distpath'], os.path.basename(self.name)) - - # Old .spec format included on Windows in 'name' .exe suffix. - if is_win or is_cygwin: - # Append .exe suffix if it is not already there. - if not self.name.endswith('.exe'): - self.name += '.exe' - base_name = os.path.splitext(os.path.basename(self.name))[0] - else: - base_name = os.path.basename(self.name) - # Create the CArchive PKG in WORKPATH. When instancing PKG(), set name so that guts check can test whether the - # file already exists. - self.pkgname = os.path.join(CONF['workpath'], base_name + '.pkg') - - self.toc = [] - - for arg in args: - # Valid arguments: PYZ object, Splash object, and TOC-list iterables - if isinstance(arg, (PYZ, Splash)): - # Add object as an entry to the TOC, and merge its dependencies TOC - if isinstance(arg, PYZ): - self.toc.append((os.path.basename(arg.name), arg.name, "PYZ")) - else: - self.toc.append((os.path.basename(arg.name), arg.name, "SPLASH")) - self.toc.extend(arg.dependencies) - elif miscutils.is_iterable(arg): - # TOC-like iterable - self.toc.extend(arg) - else: - raise TypeError(f"Invalid argument type for EXE: {type(arg)!r}") - - if is_nogil: - # Signal to bootloader that python was built with Py_GIL_DISABLED, in order to select correct `PyConfig` - # structure layout at run-time. - self.toc.append(("pyi-python-flag Py_GIL_DISABLED", "", "OPTION")) - - if self.runtime_tmpdir is not None: - self.toc.append(("pyi-runtime-tmpdir " + self.runtime_tmpdir, "", "OPTION")) - - if self.bootloader_ignore_signals: - # no value; presence means "true" - self.toc.append(("pyi-bootloader-ignore-signals", "", "OPTION")) - - if self.disable_windowed_traceback: - # no value; presence means "true" - self.toc.append(("pyi-disable-windowed-traceback", "", "OPTION")) - - if self.argv_emulation: - # no value; presence means "true" - self.toc.append(("pyi-macos-argv-emulation", "", "OPTION")) - - if self.contents_directory: - self.toc.append(("pyi-contents-directory " + self.contents_directory, "", "OPTION")) - - if self.hide_console: - # Validate the value - _HIDE_CONSOLE_VALUES = {'hide-early', 'minimize-early', 'hide-late', 'minimize-late'} - self.hide_console = self.hide_console.lower() - if self.hide_console not in _HIDE_CONSOLE_VALUES: - raise ValueError( - f"Invalid hide_console value: {self.hide_console}! Allowed values: {_HIDE_CONSOLE_VALUES}" - ) - self.toc.append((f"pyi-hide-console {self.hide_console}", "", "OPTION")) - - # If the icon path is relative, make it relative to the .spec file. - if self.icon and self.icon != "NONE": - if isinstance(self.icon, list): - self.icon = [self._makeabs(ic) for ic in self.icon] - else: - self.icon = [self._makeabs(self.icon)] - - if is_win: - if not self.icon: - # --icon not specified; use default from bootloader folder - if self.console: - ico = 'icon-console.ico' - else: - ico = 'icon-windowed.ico' - self.icon = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'bootloader', 'images', ico) - - # Prepare manifest for the executable by creating minimal manifest or modifying the supplied one. - if self.manifest: - # Determine if we were given a filename or an XML string. - if "<" in self.manifest: - self.manifest = self.manifest.encode("utf-8") - else: - self.manifest = self._makeabs(self.manifest) - with open(self.manifest, "rb") as fp: - self.manifest = fp.read() - self.manifest = winmanifest.create_application_manifest(self.manifest, self.uac_admin, self.uac_uiaccess) - - if self.versrsrc: - if isinstance(self.versrsrc, versioninfo.VSVersionInfo): - # We were passed a valid versioninfo.VSVersionInfo structure - pass - elif isinstance(self.versrsrc, (str, bytes, os.PathLike)): - # File path; either absolute, or relative to the spec file - self.versrsrc = self._makeabs(self.versrsrc) - logger.debug("Loading version info from file: %r", self.versrsrc) - self.versrsrc = versioninfo.load_version_info_from_text_file(self.versrsrc) - else: - raise TypeError(f"Unsupported type for version info argument: {type(self.versrsrc)!r}") - - # Identify python shared library. This is needed both for PKG (where we need to store the name so that - # bootloader can look it up), and for macOS-specific processing of the generated executable (adjusting the SDK - # version). - # - # NOTE: we already performed an equivalent search (using the same `get_python_library_path` helper) during the - # analysis stage to ensure that the python shared library is collected. Unfortunately, with the way data passing - # works in onedir builds, we cannot look up the value in the TOC at this stage, and we need to search again. - self.python_lib = bindepend.get_python_library_path() - if self.python_lib is None: - from PyInstaller.exceptions import PythonLibraryNotFoundError - raise PythonLibraryNotFoundError() - - # On AIX, the python shared library might in fact be an ar archive with shared object inside it, and needs to - # be `dlopen`'ed with full name (for example, `libpython3.9.a(libpython3.9.so)`. So if the library's suffix is - # .a, adjust the name accordingly, assuming fixed format for the shared object name. NOTE: the information about - # shared object name is in fact available from `ldd` but not propagated from our binary dependency analysis. If - # we ever need to determine the shared object's name dynamically, we could write a simple ar parser, based on - # information from `https://www.ibm.com/docs/en/aix/7.3?topic=formats-ar-file-format-big`. - if is_aix: - _, ext = os.path.splitext(self.python_lib) - if ext == '.a': - _py_major, _py_minor = sys.version_info[:2] - self.python_lib += f"(libpython{_py_major}.{_py_minor}.so)" - - # Normalize TOC - self.toc = normalize_toc(self.toc) - - self.pkg = PKG( - toc=self.toc, - python_lib_name=os.path.basename(self.python_lib), - name=self.pkgname, - cdict=kwargs.get('cdict', None), - exclude_binaries=self.exclude_binaries, - strip_binaries=self.strip, - upx_binaries=self.upx, - upx_exclude=self.upx_exclude, - target_arch=self.target_arch, - codesign_identity=self.codesign_identity, - entitlements_file=self.entitlements_file - ) - self.dependencies = self.pkg.dependencies - - # Get the path of the bootloader and store it in a TOC, so it can be checked for being changed. - exe = self._bootloader_file('run', '.exe' if is_win or is_cygwin else '') - self.exefiles = [(os.path.basename(exe), exe, 'EXECUTABLE')] - - self.__postinit__() - - _GUTS = ( - # input parameters - ('name', _check_guts_eq), - ('console', _check_guts_eq), - ('debug', _check_guts_eq), - ('exclude_binaries', _check_guts_eq), - ('icon', _check_guts_eq), - ('versrsrc', _check_guts_eq), - ('uac_admin', _check_guts_eq), - ('uac_uiaccess', _check_guts_eq), - ('manifest', _check_guts_eq), - ('append_pkg', _check_guts_eq), - ('argv_emulation', _check_guts_eq), - ('target_arch', _check_guts_eq), - ('codesign_identity', _check_guts_eq), - ('entitlements_file', _check_guts_eq), - # for the case the directory is shared between platforms: - ('pkgname', _check_guts_eq), - ('toc', _check_guts_eq), - ('resources', _check_guts_eq), - ('strip', _check_guts_eq), - ('upx', _check_guts_eq), - ('mtm', None), # checked below - # derived values - ('exefiles', _check_guts_toc), - ('python_lib', _check_guts_eq), - ) - - def _check_guts(self, data, last_build): - if not os.path.exists(self.name): - logger.info("Rebuilding %s because %s missing", self.tocbasename, os.path.basename(self.name)) - return True - if not self.append_pkg and not os.path.exists(self.pkgname): - logger.info("Rebuilding because %s missing", os.path.basename(self.pkgname)) - return True - - if Target._check_guts(self, data, last_build): - return True - - mtm = data['mtm'] - if mtm != miscutils.mtime(self.name): - logger.info("Rebuilding %s because mtimes don't match", self.tocbasename) - return True - if mtm < miscutils.mtime(self.pkg.tocfilename): - logger.info("Rebuilding %s because pkg is more recent", self.tocbasename) - return True - - return False - - @staticmethod - def _makeabs(path): - """ - Helper for anchoring relative paths to spec file location. - """ - from PyInstaller.config import CONF - if os.path.isabs(path): - return path - else: - return os.path.join(CONF['specpath'], path) - - def _bootloader_file(self, exe, extension=None): - """ - Pick up the right bootloader file - debug, console, windowed. - """ - # Having console/windowed bootloader makes sense only on Windows and macOS. - if is_win or is_darwin: - if not self.console: - exe = exe + 'w' - # There are two types of bootloaders: - # run - release, no verbose messages in console. - # run_d - contains verbose messages in console. - if self.debug: - exe = exe + '_d' - if extension: - exe = exe + extension - bootloader_file = os.path.join(HOMEPATH, 'PyInstaller', 'bootloader', PLATFORM, exe) - logger.info('Bootloader %s' % bootloader_file) - return bootloader_file - - def assemble(self): - # On Windows, we used to append .notanexecutable to the intermediate/temporary file name to (attempt to) - # prevent interference from anti-virus programs with the build process (see #6467). This is now disabled - # as we wrap all processing steps that modify the executable in the `_retry_operation` helper; however, - # we keep around the `build_name` variable instead of directly using `self.name`, just in case we need - # to re-enable it... - build_name = self.name - - logger.info("Building EXE from %s", self.tocbasename) - if os.path.exists(self.name): - if os.path.isdir(self.name): - _rmtree(self.name) # will prompt for confirmation if --noconfirm is not given - else: - os.remove(self.name) - if not os.path.exists(os.path.dirname(self.name)): - os.makedirs(os.path.dirname(self.name)) - bootloader_exe = self.exefiles[0][1] # pathname of bootloader - if not os.path.exists(bootloader_exe): - raise SystemExit(_MISSING_BOOTLOADER_ERRORMSG) - - # Step 1: copy the bootloader file, and perform any operations that need to be done prior to appending the PKG. - logger.info("Copying bootloader EXE to %s", build_name) - self._retry_operation(shutil.copyfile, bootloader_exe, build_name) - self._retry_operation(os.chmod, build_name, 0o755) - - if is_win: - # First, remove all resources from the file. This ensures that no manifest is embedded, even if bootloader - # was compiled with a toolchain that forcibly embeds a default manifest (e.g., mingw toolchain from msys2). - self._retry_operation(winresource.remove_all_resources, build_name) - # Embed icon. - if self.icon != "NONE": - logger.info("Copying icon to EXE") - self._retry_operation(icon.CopyIcons, build_name, self.icon) - # Embed version info. - if self.versrsrc: - logger.info("Copying version information to EXE") - self._retry_operation(versioninfo.write_version_info_to_executable, build_name, self.versrsrc) - # Embed/copy other resources. - logger.info("Copying %d resources to EXE", len(self.resources)) - for resource in self.resources: - self._retry_operation(self._copy_windows_resource, build_name, resource) - # Embed the manifest into the executable. - logger.info("Embedding manifest in EXE") - self._retry_operation(winmanifest.write_manifest_to_executable, build_name, self.manifest) - elif is_darwin: - # Convert bootloader to the target arch - logger.info("Converting EXE to target arch (%s)", self.target_arch) - osxutils.binary_to_target_arch(build_name, self.target_arch, display_name='Bootloader EXE') - - # Step 2: append the PKG, if necessary - if self.append_pkg: - append_file = self.pkg.name # Append PKG - append_type = 'PKG archive' # For debug messages - else: - # In onefile mode, copy the stand-alone PKG next to the executable. In onedir, this will be done by the - # COLLECT() target. - if not self.exclude_binaries: - pkg_dst = os.path.join(os.path.dirname(build_name), os.path.basename(self.pkgname)) - logger.info("Copying stand-alone PKG archive from %s to %s", self.pkg.name, pkg_dst) - shutil.copyfile(self.pkg.name, pkg_dst) - else: - logger.info("Stand-alone PKG archive will be handled by COLLECT") - - # The bootloader requires package side-loading to be explicitly enabled, which is done by embedding custom - # signature to the executable. This extra signature ensures that the sideload-enabled executable is at least - # slightly different from the stock bootloader executables, which should prevent antivirus programs from - # flagging our stock bootloaders due to sideload-enabled applications in the wild. - - # Write to temporary file - pkgsig_file = self.pkg.name + '.sig' - with open(pkgsig_file, "wb") as f: - # 8-byte MAGIC; slightly changed PKG MAGIC pattern - f.write(b'MEI\015\013\012\013\016') - - append_file = pkgsig_file # Append PKG-SIG - append_type = 'PKG sideload signature' # For debug messages - - if is_linux: - # Linux: append data into custom ELF section using objcopy. - logger.info("Appending %s to custom ELF section in EXE", append_type) - cmd = ['objcopy', '--add-section', f'pydata={append_file}', build_name] - p = subprocess.run(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, encoding='utf-8') - if p.returncode: - raise SystemError(f"objcopy Failure: {p.returncode} {p.stdout}") - - elif is_darwin: - # macOS: remove signature, append data, and fix-up headers so that the appended data appears to be part of - # the executable (which is required by strict validation during code-signing). - - # Strip signatures from all arch slices. Strictly speaking, we need to remove signature (if present) from - # the last slice, because we will be appending data to it. When building universal2 bootloaders natively on - # macOS, only arm64 slices have a (dummy) signature. However, when cross-compiling with osxcross, we seem to - # get dummy signatures on both x86_64 and arm64 slices. While the former should not have any impact, it does - # seem to cause issues with further binary signing using real identity. Therefore, we remove all signatures - # and re-sign the binary using dummy signature once the data is appended. - logger.info("Removing signature(s) from EXE") - osxutils.remove_signature_from_binary(build_name) - - # Fix Mach-O image UUID(s) in executable to ensure uniqueness across different builds. - # NOTE: even if PKG is side-loaded, use the hash of its contents to generate the new UUID. - # NOTE: this step is performed *before* PKG is appended and sizes are fixed in the executable's headers; - # this ensures that we are operating only on original header size instead of enlarged one (which could - # be significantly larger in large onefile builds). - logger.info("Modifying Mach-O image UUID(s) in EXE") - osxutils.update_exe_identifier(build_name, self.pkg.name) - - # Append the data - logger.info("Appending %s to EXE", append_type) - self._append_data_to_exe(build_name, append_file) - - # Fix Mach-O headers - logger.info("Fixing EXE headers for code signing") - osxutils.fix_exe_for_code_signing(build_name) - else: - # Fall back to just appending data at the end of the file - logger.info("Appending %s to EXE", append_type) - self._retry_operation(self._append_data_to_exe, build_name, append_file) - - # Step 3: post-processing - if is_win: - # Set checksum to appease antiviral software. Also set build timestamp to current time to increase entropy - # (but honor SOURCE_DATE_EPOCH environment variable for reproducible builds). - logger.info("Fixing EXE headers") - build_timestamp = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) - self._retry_operation(winutils.set_exe_build_timestamp, build_name, build_timestamp) - self._retry_operation(winutils.update_exe_pe_checksum, build_name) - elif is_darwin: - # If the version of macOS SDK used to build bootloader exceeds that of macOS SDK used to built Python - # library (and, by extension, bundled Tcl/Tk libraries), force the version declared by the frozen executable - # to match that of the Python library. - # Having macOS attempt to enable new features (based on SDK version) for frozen application has no benefit - # if the Python library does not support them as well. - # On the other hand, there seem to be UI issues in tkinter due to failed or partial enablement of dark mode - # (i.e., the bootloader executable being built against SDK 10.14 or later, which causes macOS to enable dark - # mode, and Tk libraries being built against an earlier SDK version that does not support the dark mode). - # With python.org Intel macOS installers, this manifests as black Tk windows and UI elements (see issue - # #5827), while in Anaconda python, it may result in white text on bright background. - pylib_version = osxutils.get_macos_sdk_version(self.python_lib) - exe_version = osxutils.get_macos_sdk_version(build_name) - if pylib_version < exe_version: - logger.info( - "Rewriting the executable's macOS SDK version (%d.%d.%d) to match the SDK version of the Python " - "library (%d.%d.%d) in order to avoid inconsistent behavior and potential UI issues in the " - "frozen application.", *exe_version, *pylib_version - ) - osxutils.set_macos_sdk_version(build_name, *pylib_version) - - # Re-sign the binary (either ad-hoc or using real identity, if provided). - logger.info("Re-signing the EXE") - osxutils.sign_binary(build_name, self.codesign_identity, self.entitlements_file) - - # Ensure executable flag is set - self._retry_operation(os.chmod, build_name, 0o755) - # Get mtime for storing into the guts - self.mtm = self._retry_operation(miscutils.mtime, build_name) - if build_name != self.name: - self._retry_operation(os.rename, build_name, self.name) - logger.info("Building EXE from %s completed successfully.", self.tocbasename) - - def _copy_windows_resource(self, build_name, resource_spec): - import pefile - - # Helper for optionally converting integer strings to values; resource types and IDs/names can be specified as - # either numeric values or custom strings... - def _to_int(value): - try: - return int(value) - except Exception: - return value - - logger.debug("Processing resource: %r", resource_spec) - resource = resource_spec.split(",") # filename,[type],[name],[language] - - if len(resource) < 1 or len(resource) > 4: - raise ValueError( - f"Invalid Windows resource specifier {resource_spec!r}! " - f"Must be in format 'filename,[type],[name],[language]'!" - ) - - # Anchor resource file to spec file location, if necessary. - src_filename = self._makeabs(resource[0]) - - # Ensure file exists. - if not os.path.isfile(src_filename): - raise ValueError(f"Resource file {src_filename!r} does not exist!") - - # Check if src_filename points to a PE file or an arbitrary (data) file. - try: - with pefile.PE(src_filename, fast_load=True): - is_pe_file = True - except Exception: - is_pe_file = False - - if is_pe_file: - # If resource file is PE file, copy all resources from it, subject to specified type, name, and language. - logger.debug("Resource file %r is a PE file...", src_filename) - - # Resource type, name, and language serve as filters. If not specified, use "*". - resource_type = _to_int(resource[1]) if len(resource) >= 2 else "*" - resource_name = _to_int(resource[2]) if len(resource) >= 3 else "*" - resource_lang = _to_int(resource[3]) if len(resource) >= 4 else "*" - - try: - winresource.copy_resources_from_pe_file( - build_name, - src_filename, - [resource_type], - [resource_name], - [resource_lang], - ) - except Exception as e: - raise IOError(f"Failed to copy resources from PE file {src_filename!r}") from e - else: - logger.debug("Resource file %r is an arbitrary data file...", src_filename) - - # For arbitrary data file, resource type and name need to be provided. - if len(resource) < 3: - raise ValueError( - f"Invalid Windows resource specifier {resource_spec!r}! " - f"For arbitrary data file, the format is 'filename,type,name,[language]'!" - ) - - resource_type = _to_int(resource[1]) - resource_name = _to_int(resource[2]) - resource_lang = _to_int(resource[3]) if len(resource) >= 4 else 0 # LANG_NEUTRAL - - # Prohibit wildcards for resource type and name. - if resource_type == "*": - raise ValueError( - f"Invalid Windows resource specifier {resource_spec!r}! " - f"For arbitrary data file, resource type cannot be a wildcard (*)!" - ) - if resource_name == "*": - raise ValueError( - f"Invalid Windows resource specifier {resource_spec!r}! " - f"For arbitrary data file, resource ma,e cannot be a wildcard (*)!" - ) - - try: - with open(src_filename, 'rb') as fp: - data = fp.read() - - winresource.add_or_update_resource( - build_name, - data, - resource_type, - [resource_name], - [resource_lang], - ) - except Exception as e: - raise IOError(f"Failed to embed data file {src_filename!r} as Windows resource") from e - - def _append_data_to_exe(self, build_name, append_file): - with open(build_name, 'ab') as outf: - with open(append_file, 'rb') as inf: - shutil.copyfileobj(inf, outf, length=64 * 1024) - - @staticmethod - def _retry_operation(func, *args, max_attempts=20): - """ - Attempt to execute the given function `max_attempts` number of times while catching exceptions that are usually - associated with Windows anti-virus programs temporarily locking the access to the executable. - """ - def _is_allowed_exception(e): - """ - Helper to determine whether the given exception is eligible for retry or not. - """ - if isinstance(e, PermissionError): - # Always retry on all instances of PermissionError - return True - elif is_win: - from PyInstaller.compat import pywintypes - - # Windows-specific errno and winerror codes. - # https://learn.microsoft.com/en-us/cpp/c-runtime-library/errno-constants - _ALLOWED_ERRNO = { - 13, # EACCES (would typically be a PermissionError instead) - 22, # EINVAL (reported to be caused by Crowdstrike; see #7840) - } - # https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499- - _ALLOWED_WINERROR = { - 5, # ERROR_ACCESS_DENIED (reported in #7825) - 32, # ERROR_SHARING_VIOLATION (exclusive lock via `CreateFileW` flags, or via `_locked`). - 110, # ERROR_OPEN_FAILED (reported in #8138) - } - if isinstance(e, OSError): - # For OSError exceptions other than PermissionError, validate errno. - if e.errno in _ALLOWED_ERRNO: - return True - # OSError typically translates `winerror` into `errno` equivalent; but try to match the original - # values as a fall back, just in case. `OSError.winerror` attribute exists only on Windows. - if e.winerror in _ALLOWED_WINERROR: - return True - elif isinstance(e, pywintypes.error): - # pywintypes.error is raised by helper functions that use win32 C API bound via pywin32-ctypes. - if e.winerror in _ALLOWED_WINERROR: - return True - return False - - func_name = func.__name__ - for attempt in range(max_attempts): - try: - return func(*args) - except Exception as e: - # Check if exception is eligible for retry; if not, also check its immediate cause (in case the - # exception was thrown from an eligible exception). - if not _is_allowed_exception(e) and not _is_allowed_exception(e.__context__): - raise - - # Retry after sleep (unless this was our last attempt) - if attempt < max_attempts - 1: - sleep_duration = 1 / (max_attempts - 1 - attempt) - logger.warning( - f"Execution of {func_name!r} failed on attempt #{attempt + 1} / {max_attempts}: {e!r}. " - f"Retrying in {sleep_duration:.2f} second(s)..." - ) - time.sleep(sleep_duration) - else: - logger.warning( - f"Execution of {func_name!r} failed on attempt #{attempt + 1} / {max_attempts}: {e!r}." - ) - raise RuntimeError(f"Execution of {func_name!r} failed - no more attempts left!") from e - - -class COLLECT(Target): - """ - In one-dir mode creates the output folder with all necessary files. - """ - def __init__(self, *args, **kwargs): - """ - args - One or more arguments that are either an instance of `Target` or an iterable representing TOC list. - kwargs - Possible keyword arguments: - - name - The name of the directory to be built. - """ - from PyInstaller.config import CONF - - super().__init__() - - self.strip_binaries = kwargs.get('strip', False) - self.upx_exclude = kwargs.get("upx_exclude", []) - self.console = True - self.target_arch = None - self.codesign_identity = None - self.entitlements_file = None - - # UPX needs to be both available and enabled for the taget. - self.upx_binaries = CONF['upx_available'] and kwargs.get('upx', False) - - # The `name` should be the output directory name, without the parent path (the directory is created in the - # DISTPATH). Old .spec formats included parent path, so strip it away. - self.name = os.path.join(CONF['distpath'], os.path.basename(kwargs.get('name'))) - - for arg in args: - if isinstance(arg, EXE): - self.contents_directory = arg.contents_directory - break - else: - raise ValueError("No EXE() instance was passed to COLLECT()") - - self.toc = [] - for arg in args: - # Valid arguments: EXE object and TOC-like iterables - if isinstance(arg, EXE): - # Add EXE as an entry to the TOC, and merge its dependencies TOC - self.toc.append((os.path.basename(arg.name), arg.name, 'EXECUTABLE')) - self.toc.extend(arg.dependencies) - # Inherit settings - self.console = arg.console - self.target_arch = arg.target_arch - self.codesign_identity = arg.codesign_identity - self.entitlements_file = arg.entitlements_file - # Search for the executable's external manifest, and collect it if available - for dest_name, src_name, typecode in arg.toc: - if dest_name == os.path.basename(arg.name) + ".manifest": - self.toc.append((dest_name, src_name, typecode)) - # If PKG is not appended to the executable, we need to collect it. - if not arg.append_pkg: - self.toc.append((os.path.basename(arg.pkgname), arg.pkgname, 'PKG')) - elif miscutils.is_iterable(arg): - # TOC-like iterable - self.toc.extend(arg) - else: - raise TypeError(f"Invalid argument type for COLLECT: {type(arg)!r}") - - # Normalize TOC - self.toc = normalize_toc(self.toc) - - self.__postinit__() - - _GUTS = ( - # COLLECT always builds, we just want the TOC to be written out. - ('toc', None), - ) - - def _check_guts(self, data, last_build): - # COLLECT always needs to be executed, in order to clean the output directory. - return True - - def assemble(self): - _make_clean_directory(self.name) - logger.info("Building COLLECT %s", self.tocbasename) - for dest_name, src_name, typecode in self.toc: - # Ensure that the source file exists, if necessary. Skip the check for DEPENDENCY entries due to special - # contents of 'dest_name' and/or 'src_name'. Same for the SYMLINK entries, where 'src_name' is relative - # target name for symbolic link. - if typecode not in {'DEPENDENCY', 'SYMLINK'} and not os.path.exists(src_name): - # If file is contained within python egg, it will be added with the egg. - if strict_collect_mode: - raise ValueError(f"Non-existent resource {src_name}, meant to be collected as {dest_name}!") - else: - logger.warning( - "Ignoring non-existent resource %s, meant to be collected as %s", src_name, dest_name - ) - continue - # Disallow collection outside of the dist directory. - if os.pardir in os.path.normpath(dest_name).split(os.sep) or os.path.isabs(dest_name): - raise SystemExit( - 'ERROR: attempting to store file outside of the dist directory: %r. Aborting.' % dest_name - ) - # Create parent directory structure, if necessary - if typecode in ("EXECUTABLE", "PKG"): - dest_path = os.path.join(self.name, dest_name) - else: - dest_path = os.path.join(self.name, self.contents_directory or "", dest_name) - dest_dir = os.path.dirname(dest_path) - try: - os.makedirs(dest_dir, exist_ok=True) - except FileExistsError: - raise SystemExit( - f"ERROR: Pyinstaller needs to create a directory at {dest_dir!r}, " - "but there already exists a file at that path!" - ) - if typecode in ('EXTENSION', 'BINARY'): - src_name = process_collected_binary( - src_name, - dest_name, - use_strip=self.strip_binaries, - use_upx=self.upx_binaries, - upx_exclude=self.upx_exclude, - target_arch=self.target_arch, - codesign_identity=self.codesign_identity, - entitlements_file=self.entitlements_file, - strict_arch_validation=(typecode == 'EXTENSION'), - ) - if typecode == 'SYMLINK': - # On Windows, ensure that symlink target path (stored in src_name) is using Windows-style back slash - # separators. - if is_win and os.path.sep == '/': - src_name = src_name.replace(os.path.sep, '\\') - - os.symlink(src_name, dest_path) # Create link at dest_path, pointing at (relative) src_name - elif typecode != 'DEPENDENCY': - # At this point, `src_name` should be a valid file. - if not os.path.isfile(src_name): - raise ValueError(f"Resource {src_name!r} is not a valid file!") - # If strict collection mode is enabled, the destination should not exist yet. - if strict_collect_mode and os.path.exists(dest_path): - raise ValueError( - f"Attempting to collect a duplicated file into COLLECT: {dest_name} (type: {typecode})" - ) - # Use `shutil.copyfile` to copy file with default permissions. We do not attempt to preserve original - # permissions nor metadata, as they might be too restrictive and cause issues either during subsequent - # re-build attempts or when trying to move the application bundle. For binaries (and data files with - # executable bit set), we manually set the executable bits after copying the file. - shutil.copyfile(src_name, dest_path) - if ( - typecode in ('EXTENSION', 'BINARY', 'EXECUTABLE') - or (typecode == 'DATA' and os.access(src_name, os.X_OK)) - ): - os.chmod(dest_path, 0o755) - logger.info("Building COLLECT %s completed successfully.", self.tocbasename) - - -class MERGE: - """ - Given Analysis objects for multiple executables, replace occurrences of data and binary files with references to the - first executable in which they occur. The actual data and binary files are then collected only once, thereby - reducing the disk space used by multiple executables. Every executable (even onedir ones!) obtained from a - MERGE-processed Analysis gains onefile semantics, because it needs to extract its referenced dependencies from other - executables into temporary directory before they can run. - """ - def __init__(self, *args): - """ - args - Dependencies as a list of (analysis, identifier, path_to_exe) tuples. `analysis` is an instance of - `Analysis`, `identifier` is the basename of the entry-point script (without .py suffix), and `path_to_exe` - is path to the corresponding executable, relative to the `dist` directory (without .exe suffix in the - filename component). For onefile executables, `path_to_exe` is usually just executable's base name - (e.g., `myexecutable`). For onedir executables, `path_to_exe` usually comprises both the application's - directory name and executable name (e.g., `myapp/myexecutable`). - """ - self._dependencies = {} - self._symlinks = set() - - # Process all given (analysis, identifier, path_to_exe) tuples - for analysis, identifier, path_to_exe in args: - # Process analysis.binaries and analysis.datas TOCs. self._process_toc() call returns two TOCs; the first - # contains entries that remain within this analysis, while the second contains entries that reference - # an entry in another executable. - binaries, binaries_refs = self._process_toc(analysis.binaries, path_to_exe) - datas, datas_refs = self._process_toc(analysis.datas, path_to_exe) - # Update `analysis.binaries`, `analysis.datas`, and `analysis.dependencies`. - # The entries that are found in preceding executable(s) are removed from `binaries` and `datas`, and their - # DEPENDENCY entry counterparts are added to `dependencies`. We cannot simply update the entries in - # `binaries` and `datas`, because at least in theory, we need to support both onefile and onedir mode. And - # while in onefile, `a.datas`, `a.binaries`, and `a.dependencies` are passed to `EXE` (and its `PKG`), with - # onedir, `a.datas` and `a.binaries` need to be passed to `COLLECT` (as they were before the MERGE), while - # `a.dependencies` needs to be passed to `EXE`. This split requires DEPENDENCY entries to be in a separate - # TOC. - analysis.binaries = normalize_toc(binaries) - analysis.datas = normalize_toc(datas) - analysis.dependencies += binaries_refs + datas_refs - - def _process_toc(self, toc, path_to_exe): - # NOTE: unfortunately, these need to keep two separate lists. See the comment in the calling code on why this - # is so. - toc_keep = [] - toc_refs = [] - for entry in toc: - dest_name, src_name, typecode = entry - - # Special handling and bookkeeping for symbolic links. We need to account both for dest_name and src_name, - # because src_name might be the same in different contexts. For example, when collecting Qt .framework - # bundles on macOS, there are multiple relative symbolic links `Current -> A` (one in each .framework). - if typecode == 'SYMLINK': - key = dest_name, src_name - if key not in self._symlinks: - # First occurrence; keep the entry in "for-keep" TOC, same as we would for binaries and datas. - logger.debug("Keeping symbolic link %r entry in original TOC.", entry) - self._symlinks.add(key) - toc_keep.append(entry) - else: - # Subsequent occurrence; keep the SYMLINK entry intact, but add it to the references TOC instead of - # "for-keep" TOC, so it ends up in `a.dependencies`. - logger.debug("Moving symbolic link %r entry to references TOC.", entry) - toc_refs.append(entry) - del key # Block-local variable - continue - - # In fact, we need to accout for both dest_name and src_name with regular entries as well; previous - # approach that considered only src_name ended tripped up when same file was collected in different - # locations (i.e., same src_name but different dest_names). - key = dest_name, src_name - if key not in self._dependencies: - logger.debug("Adding dependency %r located in %s", key, path_to_exe) - self._dependencies[key] = path_to_exe - # Add entry to list of kept TOC entries - toc_keep.append(entry) - else: - # Construct relative dependency path; i.e., the relative path from this executable (or rather, its - # parent directory) to the executable that contains the dependency. - dep_path = os.path.relpath(self._dependencies[key], os.path.dirname(path_to_exe)) - # Ignore references that point to the origin package. This can happen if the same resource is listed - # multiple times in TOCs (e.g., once as binary and once as data). - if dep_path.endswith(path_to_exe): - logger.debug( - "Ignoring self-reference of %r for %s, located in %s - duplicated TOC entry?", key, path_to_exe, - dep_path - ) - # The entry is a duplicate, and should be ignored (i.e., do not add it to either of output TOCs). - continue - logger.debug("Referencing %r to be a dependency for %s, located in %s", key, path_to_exe, dep_path) - # Create new DEPENDENCY entry; under destination path (first element), we store the original destination - # path, while source path contains the relative reference path. - toc_refs.append((dest_name, dep_path, "DEPENDENCY")) - - return toc_keep, toc_refs - - -UNCOMPRESSED = False -COMPRESSED = True - -_MISSING_BOOTLOADER_ERRORMSG = """Fatal error: PyInstaller does not include a pre-compiled bootloader for your -platform. For more details and instructions how to build the bootloader see -""" diff --git a/voxvera/vendor/PyInstaller/building/build_main.py b/voxvera/vendor/PyInstaller/building/build_main.py deleted file mode 100755 index bceb964..0000000 --- a/voxvera/vendor/PyInstaller/building/build_main.py +++ /dev/null @@ -1,1275 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Build packages using spec files. - -NOTE: All global variables, classes and imported modules create API for .spec files. -""" - -import glob -import os -import pathlib -import pprint -import shutil -import enum -import re -import sys - -from PyInstaller import DEFAULT_DISTPATH, DEFAULT_WORKPATH, HOMEPATH, compat -from PyInstaller import log as logging -from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ -from PyInstaller.building.datastruct import ( - TOC, Target, Tree, _check_guts_eq, normalize_toc, normalize_pyz_toc, toc_process_symbolic_links -) -from PyInstaller.building.osx import BUNDLE -from PyInstaller.building.splash import Splash -from PyInstaller.building.utils import ( - _check_guts_toc, _check_guts_toc_mtime, _should_include_system_binary, format_binaries_and_datas, compile_pymodule, - destination_name_for_extension, postprocess_binaries_toc_pywin32, postprocess_binaries_toc_pywin32_anaconda, - create_base_library_zip -) -from PyInstaller.compat import is_win, is_conda, is_darwin, is_linux -from PyInstaller.depend import bindepend -from PyInstaller.depend.analysis import initialize_modgraph, HOOK_PRIORITY_USER_HOOKS -from PyInstaller.depend.utils import scan_code_for_ctypes -from PyInstaller import isolated -from PyInstaller.utils.misc import absnormpath, get_path_to_toplevel_modules, mtime -from PyInstaller.utils.hooks import get_package_paths -from PyInstaller.utils.hooks.gi import compile_glib_schema_files - -if is_darwin: - from PyInstaller.utils import osx as osxutils - -logger = logging.getLogger(__name__) - -STRINGTYPE = type('') -TUPLETYPE = type((None,)) - -rthooks = {} - -# Place where the loader modules and initialization scripts live. -_init_code_path = os.path.join(HOMEPATH, 'PyInstaller', 'loader') - -IMPORT_TYPES = [ - 'top-level', 'conditional', 'delayed', 'delayed, conditional', 'optional', 'conditional, optional', - 'delayed, optional', 'delayed, conditional, optional' -] - -WARNFILE_HEADER = """\ - -This file lists modules PyInstaller was not able to find. This does not -necessarily mean these modules are required for running your program. Both -Python's standard library and 3rd-party Python packages often conditionally -import optional modules, some of which may be available only on certain -platforms. - -Types of import: -* top-level: imported at the top-level - look at these first -* conditional: imported within an if-statement -* delayed: imported within a function -* optional: imported within a try-except-statement - -IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for - tracking down the missing module yourself. Thanks! - -""" - - -@isolated.decorate -def discover_hook_directories(): - """ - Discover hook directories via pyinstaller40 entry points. Perform the discovery in an isolated subprocess - to avoid importing the package(s) in the main process. - - :return: list of discovered hook directories. - """ - - from traceback import format_exception_only - from PyInstaller.log import logger - from PyInstaller.compat import importlib_metadata - from PyInstaller.depend.analysis import HOOK_PRIORITY_CONTRIBUTED_HOOKS, HOOK_PRIORITY_UPSTREAM_HOOKS - - # The “selectable” entry points (via group and name keyword args) were introduced in importlib_metadata 4.6 and - # Python 3.10. The compat module ensures we are using a compatible version. - entry_points = importlib_metadata.entry_points(group='pyinstaller40', name='hook-dirs') - - # Ensure that pyinstaller_hooks_contrib comes last so that hooks from packages providing their own take priority. - # In pyinstaller-hooks-contrib >= 2024.8, the entry-point module is `_pyinstaller_hooks_contrib`; in earlier - # versions, it was `_pyinstaller_hooks_contrib.hooks`. - entry_points = sorted(entry_points, key=lambda x: x.module.startswith("_pyinstaller_hooks_contrib")) - - hook_directories = [] - for entry_point in entry_points: - # Query hook directory location(s) from entry point - try: - hook_directory_entries = entry_point.load()() - except Exception as e: - msg = "".join(format_exception_only(type(e), e)).strip() - logger.warning("discover_hook_directories: Failed to process hook entry point '%s': %s", entry_point, msg) - continue - - # Determine location-based priority: upstream hooks vs. hooks from contributed hooks package. - location_priority = ( - HOOK_PRIORITY_CONTRIBUTED_HOOKS - if entry_point.module.startswith("_pyinstaller_hooks_contrib") else HOOK_PRIORITY_UPSTREAM_HOOKS - ) - - # Append entries - hook_directories.extend([(hook_directory_entry, location_priority) - for hook_directory_entry in hook_directory_entries]) - - logger.debug("discover_hook_directories: Hook directories: %s", hook_directories) - - return hook_directories - - -def find_binary_dependencies(binaries, import_packages, symlink_suppression_patterns): - """ - Find dynamic dependencies (linked shared libraries) for the provided list of binaries. - - On Windows, this function performs additional pre-processing in an isolated environment in an attempt to handle - dynamic library search path modifications made by packages during their import. The packages from the given list - of collected packages are imported one by one, while keeping track of modifications made by `os.add_dll_directory` - calls and additions to the `PATH` environment variable. The recorded additional search paths are then passed to - the binary dependency analysis step. - - binaries - List of binaries to scan for dynamic dependencies. - import_packages - List of packages to import prior to scanning binaries. - symlink_suppression_patterns - Set of paths and/or path patterns for which binary dependency analysis should not create symbolic links - to the top-level application directory (when the discovered shared library's parent directory structure - is preserved). When binary dependency analysis discovers a shared library, it matches its *source path* - against all symlink suppression patterns (using `pathlib.PurePath.match`) to determine whether to create - a symbolic link to top-level application directory or not. - - :return: expanded list of binaries and then dependencies. - """ - - # Extra library search paths (used on Windows to resolve DLL paths). - extra_libdirs = [] - if compat.is_win: - # Always search `sys.base_prefix`, and search it first. This ensures that we resolve the correct version of - # `python3X.dll` and `python3.dll` (a PEP-0384 stable ABI stub that forwards symbols to the fully versioned - # `python3X.dll`), regardless of other python installations that might be present in the PATH. - extra_libdirs.append(compat.base_prefix) - - # When using python built from source, `sys.base_prefix` does not point to the directory that contains python - # executable, `python3X.dll`, and `python3.dll`. To accommodate such case, also add the directory in which - # python executable is located to the extra search paths. On the off-chance that this is a combination of venv - # and python built from source, prefer `sys._base_executable` over `sys.executable`. - extra_libdirs.append(os.path.dirname(getattr(sys, '_base_executable', sys.executable))) - - # If `pywin32` is installed, resolve the path to the `pywin32_system32` directory. Most `pywin32` extensions - # reference the `pywintypes3X.dll` in there. Based on resolved `pywin32_system32` directory, also add other - # `pywin32` directory, in case extensions in different directories reference each other (the ones in the same - # directory should already be resolvable due to binary dependency analysis passing the analyzed binary's - # location to the `get_imports` function). This allows us to avoid searching all paths in `sys.path`, which - # may lead to other corner-case issues (e.g., #5560). - pywin32_system32_dir = None - try: - # Look up the directory by treating it as a namespace package. - _, pywin32_system32_dir = get_package_paths('pywin32_system32') - except Exception: - pass - - if pywin32_system32_dir: - pywin32_base_dir = os.path.dirname(pywin32_system32_dir) - extra_libdirs += [ - pywin32_system32_dir, # .../pywin32_system32 - # based on pywin32.pth - os.path.join(pywin32_base_dir, 'win32'), # .../win32 - os.path.join(pywin32_base_dir, 'win32', 'lib'), # .../win32/lib - os.path.join(pywin32_base_dir, 'Pythonwin'), # .../Pythonwin - ] - - # On Windows, packages' initialization code might register additional DLL search paths, either by modifying the - # `PATH` environment variable, or by calling `os.add_dll_directory`. Therefore, we import all collected packages, - # and track changes made to the environment. - if compat.is_win: - # Helper functions to be executed in isolated environment. - def setup(suppressed_imports): - """ - Prepare environment for change tracking - """ - import os - import sys - - os._added_dll_directories = [] - os._original_path_env = os.environ.get('PATH', '') - - _original_add_dll_directory = os.add_dll_directory - - def _pyi_add_dll_directory(path): - os._added_dll_directories.append(path) - return _original_add_dll_directory(path) - - os.add_dll_directory = _pyi_add_dll_directory - - # Suppress import of specified packages - for name in suppressed_imports: - sys.modules[name] = None - - def import_library(package): - """ - Import collected package to set up environment. - """ - try: - __import__(package) - except Exception: - pass - - def process_search_paths(): - """ - Obtain lists of added search paths. - """ - import os - - # `os.add_dll_directory` might be called with a `pathlib.Path`, which cannot be marhsalled out of the helper - # process. So explicitly convert all entries to strings. - dll_directories = [str(path) for path in os._added_dll_directories] - - orig_path = set(os._original_path_env.split(os.pathsep)) - modified_path = os.environ.get('PATH', '').split(os.pathsep) - path_additions = [path for path in modified_path if path and path not in orig_path] - - return dll_directories, path_additions - - # Pre-process the list of packages to import. - # Check for Qt bindings packages, and put them at the front of the packages list. This ensures that they are - # always imported first, which should prevent packages that support multiple bindings (`qtypy`, `pyqtgraph`, - # `matplotlib`, etc.) from trying to auto-select bindings. - _QT_BINDINGS = ('PySide2', 'PyQt5', 'PySide6', 'PyQt6') - - qt_packages = [] - other_packages = [] - for package in import_packages: - if package.startswith(_QT_BINDINGS): - qt_packages.append(package) - else: - other_packages.append(package) - import_packages = qt_packages + other_packages - - # Just in case, explicitly suppress imports of Qt bindings that we are *not* collecting - if multiple bindings - # are available and some were excluded from our analysis, a package imported here might still try to import an - # excluded bindings package (and succeed at doing so). - suppressed_imports = [package for package in _QT_BINDINGS if package not in qt_packages] - - # If we suppressed PySide2 or PySide6, we must also suppress their corresponding shiboken package - if "PySide2" in suppressed_imports: - suppressed_imports += ["shiboken2"] - if "PySide6" in suppressed_imports: - suppressed_imports += ["shiboken6"] - - # Suppress import of `pyqtgraph.canvas`, which is known to crash python interpreter. See #7452 and #8322, as - # well as https://github.com/pyqtgraph/pyqtgraph/issues/2838. - suppressed_imports += ['pyqtgraph.canvas'] - - # PySimpleGUI 5.x displays a "first-run" dialog when imported for the first time, which blocks the loop below. - # This is a problem for building on CI, where the dialog cannot be closed, and where PySimpleGUI runs "for the - # first time" every time. See #8396. - suppressed_imports += ['PySimpleGUI'] - - # Processing in isolated environment. - with isolated.Python() as child: - child.call(setup, suppressed_imports) - for package in import_packages: - try: - child.call(import_library, package) - except isolated.SubprocessDiedError as e: - # Re-raise as `isolated.SubprocessDiedError` again, to trigger error-handling codepath in - # `isolated.Python.__exit__()`. - raise isolated.SubprocessDiedError( - f"Isolated subprocess crashed while importing package {package!r}! " - f"Package import list: {import_packages!r}" - ) from e - added_dll_directories, added_path_directories = child.call(process_search_paths) - - # Process extra search paths... - logger.info("Extra DLL search directories (AddDllDirectory): %r", added_dll_directories) - extra_libdirs += added_dll_directories - - logger.info("Extra DLL search directories (PATH): %r", added_path_directories) - extra_libdirs += added_path_directories - - # Deduplicate search paths - # NOTE: `list(set(extra_libdirs))` does not preserve the order of search paths (which matters here), so we need to - # de-duplicate using `list(dict.fromkeys(extra_libdirs).keys())` instead. - extra_libdirs = list(dict.fromkeys(extra_libdirs).keys()) - - # Search for dependencies of the given binaries - return bindepend.binary_dependency_analysis( - binaries, - search_paths=extra_libdirs, - symlink_suppression_patterns=symlink_suppression_patterns, - ) - - -class _ModuleCollectionMode(enum.IntFlag): - """ - Module collection mode flags. - """ - PYZ = enum.auto() # Collect byte-compiled .pyc into PYZ archive - PYC = enum.auto() # Collect byte-compiled .pyc as external data file - PY = enum.auto() # Collect source .py file as external data file - - -_MODULE_COLLECTION_MODES = { - "pyz": _ModuleCollectionMode.PYZ, - "pyc": _ModuleCollectionMode.PYC, - "py": _ModuleCollectionMode.PY, - "pyz+py": _ModuleCollectionMode.PYZ | _ModuleCollectionMode.PY, - "py+pyz": _ModuleCollectionMode.PYZ | _ModuleCollectionMode.PY, -} - - -def _get_module_collection_mode(mode_dict, name, noarchive=False): - """ - Determine the module/package collection mode for the given module name, based on the provided collection - mode settings dictionary. - """ - # Default mode: collect into PYZ, unless noarchive is enabled. In that case, collect as pyc. - mode_flags = _ModuleCollectionMode.PYC if noarchive else _ModuleCollectionMode.PYZ - - # If we have no collection mode settings, end here and now. - if not mode_dict: - return mode_flags - - # Search the parent modules/packages in top-down fashion, and take the last given setting. This ensures that - # a setting given for the top-level package is recursively propagated to all its subpackages and submodules, - # but also allows individual sub-modules to override the setting again. - mode = 'pyz' - - name_parts = name.split('.') - for i in range(len(name_parts)): - modlevel = ".".join(name_parts[:i + 1]) - modlevel_mode = mode_dict.get(modlevel, None) - if modlevel_mode is not None: - mode = modlevel_mode - - # Convert mode string to _ModuleCollectionMode flags - try: - mode_flags = _MODULE_COLLECTION_MODES[mode] - except KeyError: - raise ValueError(f"Unknown module collection mode for {name!r}: {mode!r}!") - - # noarchive flag being set means that we need to change _ModuleCollectionMode.PYZ into _ModuleCollectionMode.PYC - if noarchive and _ModuleCollectionMode.PYZ in mode_flags: - mode_flags ^= _ModuleCollectionMode.PYZ - mode_flags |= _ModuleCollectionMode.PYC - - return mode_flags - - -class Analysis(Target): - """ - Class that performs analysis of the user's main Python scripts. - - An Analysis contains multiple TOC (Table of Contents) lists, accessed as attributes of the analysis object. - - scripts - The scripts you gave Analysis as input, with any runtime hook scripts prepended. - pure - The pure Python modules. - binaries - The extension modules and their dependencies. - datas - Data files collected from packages. - zipfiles - Deprecated - always empty. - zipped_data - Deprecated - always empty. - """ - _old_scripts = { - absnormpath(os.path.join(HOMEPATH, "support", "_mountzlib.py")), - absnormpath(os.path.join(HOMEPATH, "support", "useUnicode.py")), - absnormpath(os.path.join(HOMEPATH, "support", "useTK.py")), - absnormpath(os.path.join(HOMEPATH, "support", "unpackTK.py")), - absnormpath(os.path.join(HOMEPATH, "support", "removeTK.py")) - } - - def __init__( - self, - scripts, - pathex=None, - binaries=None, - datas=None, - hiddenimports=None, - hookspath=None, - hooksconfig=None, - excludes=None, - runtime_hooks=None, - cipher=None, - win_no_prefer_redirects=False, - win_private_assemblies=False, - noarchive=False, - module_collection_mode=None, - optimize=-1, - **_kwargs, - ): - """ - scripts - A list of scripts specified as file names. - pathex - An optional list of paths to be searched before sys.path. - binaries - An optional list of additional binaries (dlls, etc.) to include. - datas - An optional list of additional data files to include. - hiddenimport - An optional list of additional (hidden) modules to include. - hookspath - An optional list of additional paths to search for hooks. (hook-modules). - hooksconfig - An optional dict of config settings for hooks. (hook-modules). - excludes - An optional list of module or package names (their Python names, not path names) that will be - ignored (as though they were not found). - runtime_hooks - An optional list of scripts to use as users' runtime hooks. Specified as file names. - cipher - Deprecated. Raises an error if not None. - win_no_prefer_redirects - Deprecated. Raises an error if not False. - win_private_assemblies - Deprecated. Raises an error if not False. - noarchive - If True, do not place source files in a archive, but keep them as individual files. - module_collection_mode - An optional dict of package/module names and collection mode strings. Valid collection mode strings: - 'pyz' (default), 'pyc', 'py', 'pyz+py' (or 'py+pyz') - optimize - Optimization level for collected bytecode. If not specified or set to -1, it is set to the value of - `sys.flags.optimize` of the running build process. - """ - if cipher is not None: - from PyInstaller.exceptions import RemovedCipherFeatureError - raise RemovedCipherFeatureError( - "Please remove the 'cipher' arguments to PYZ() and Analysis() in your spec file." - ) - if win_no_prefer_redirects: - from PyInstaller.exceptions import RemovedWinSideBySideSupportError - raise RemovedWinSideBySideSupportError( - "Please remove the 'win_no_prefer_redirects' argument to Analysis() in your spec file." - ) - if win_private_assemblies: - from PyInstaller.exceptions import RemovedWinSideBySideSupportError - raise RemovedWinSideBySideSupportError( - "Please remove the 'win_private_assemblies' argument to Analysis() in your spec file." - ) - super().__init__() - from PyInstaller.config import CONF - - self.inputs = [] - spec_dir = os.path.dirname(CONF['spec']) - for script in scripts: - # If path is relative, it is relative to the location of .spec file. - if not os.path.isabs(script): - script = os.path.join(spec_dir, script) - if absnormpath(script) in self._old_scripts: - logger.warning('Ignoring obsolete auto-added script %s', script) - continue - # Normalize script path. - script = os.path.normpath(script) - if not os.path.exists(script): - raise SystemExit("ERROR: script '%s' not found" % script) - self.inputs.append(script) - - # Django hook requires this variable to find the script manage.py. - CONF['main_script'] = self.inputs[0] - - site_packages_pathex = [] - for path in (pathex or []): - if pathlib.Path(path).name == "site-packages": - site_packages_pathex.append(str(path)) - if site_packages_pathex: - logger.log( - logging.DEPRECATION, "Foreign Python environment's site-packages paths added to --paths/pathex:\n%s\n" - "This is ALWAYS the wrong thing to do. If your environment's site-packages is not in PyInstaller's " - "module search path then you are running PyInstaller from a different environment to the one your " - "packages are in. Run print(sys.prefix) without PyInstaller to get the environment you should be using " - "then install and run PyInstaller from that environment instead of this one. This warning will become " - "an error in PyInstaller 7.0.", pprint.pformat(site_packages_pathex) - ) - - self.pathex = self._extend_pathex(pathex, self.inputs) - # Set global config variable 'pathex' to make it available for PyInstaller.utils.hooks and import hooks. Path - # extensions for module search. - CONF['pathex'] = self.pathex - # Extend sys.path so PyInstaller could find all necessary modules. - sys.path.extend(self.pathex) - logger.info('Module search paths (PYTHONPATH):\n' + pprint.pformat(sys.path)) - - self.hiddenimports = hiddenimports or [] - # Include hidden imports passed via CONF['hiddenimports']; these might be populated if user has a wrapper script - # that calls `build_main.main()` with custom `pyi_config` dictionary that contains `hiddenimports`. - self.hiddenimports.extend(CONF.get('hiddenimports', [])) - - for modnm in self.hiddenimports: - if re.search(r"[\\/]", modnm): - raise SystemExit( - f"ERROR: Invalid hiddenimport '{modnm}'. Hidden imports should be importable module names – not " - "file paths. i.e. use --hiddenimport=foo.bar instead of --hiddenimport=.../site-packages/foo/bar.py" - ) - - self.hookspath = [] - # Prepend directories in `hookspath` (`--additional-hooks-dir`) to take precedence over those from the entry - # points. Expand starting tilde into user's home directory, as a work-around for tilde not being expanded by - # shell when using `--additional-hooks-dir=~/path/abc` instead of `--additional-hooks-dir ~/path/abc` (or when - # the path argument is quoted). - if hookspath: - self.hookspath.extend([(os.path.expanduser(path), HOOK_PRIORITY_USER_HOOKS) for path in hookspath]) - - # Add hook directories from PyInstaller entry points. - self.hookspath += discover_hook_directories() - - self.hooksconfig = {} - if hooksconfig: - self.hooksconfig.update(hooksconfig) - - # Custom runtime hook files that should be included and started before any existing PyInstaller runtime hooks. - self.custom_runtime_hooks = runtime_hooks or [] - - self._input_binaries = [] - self._input_datas = [] - - self.excludes = excludes or [] - self.scripts = [] - self.pure = [] - self.binaries = [] - self.zipfiles = [] - self.zipped_data = [] - self.datas = [] - self.dependencies = [] - self._python_version = sys.version - self.noarchive = noarchive - self.module_collection_mode = module_collection_mode or {} - self.optimize = sys.flags.optimize if optimize in {-1, None} else optimize - - self._modules_outside_pyz = [] - - # Validate the optimization level to avoid errors later on... - if self.optimize not in {0, 1, 2}: - raise ValueError(f"Unsupported bytecode optimization level: {self.optimize!r}") - - # Expand the `binaries` and `datas` lists specified in the .spec file, and ensure that the lists are normalized - # and sorted before guts comparison. - # - # While we use these lists to initialize `Analysis.binaries` and `Analysis.datas`, at this point, we need to - # store them in separate variables, which undergo *full* guts comparison (`_check_guts_toc`) as opposed to - # just mtime-based comparison (`_check_guts_toc_mtime`). Changes to these initial list *must* trigger a rebuild - # (and due to the way things work, a re-analysis), otherwise user might end up with a cached build that fails to - # reflect the changes. - if binaries: - logger.info("Appending 'binaries' from .spec") - self._input_binaries = [(dest_name, src_name, 'BINARY') - for dest_name, src_name in format_binaries_and_datas(binaries, workingdir=spec_dir)] - self._input_binaries = sorted(normalize_toc(self._input_binaries)) - - if datas: - logger.info("Appending 'datas' from .spec") - self._input_datas = [(dest_name, src_name, 'DATA') - for dest_name, src_name in format_binaries_and_datas(datas, workingdir=spec_dir)] - self._input_datas = sorted(normalize_toc(self._input_datas)) - - self.__postinit__() - - _GUTS = ( # input parameters - ('inputs', _check_guts_eq), # parameter `scripts` - ('pathex', _check_guts_eq), - ('hiddenimports', _check_guts_eq), - ('hookspath', _check_guts_eq), - ('hooksconfig', _check_guts_eq), - ('excludes', _check_guts_eq), - ('custom_runtime_hooks', _check_guts_eq), - ('noarchive', _check_guts_eq), - ('module_collection_mode', _check_guts_eq), - ('optimize', _check_guts_eq), - - ('_input_binaries', _check_guts_toc), - ('_input_datas', _check_guts_toc), - - # calculated/analysed values - ('_python_version', _check_guts_eq), - ('scripts', _check_guts_toc_mtime), - ('pure', _check_guts_toc_mtime), - ('binaries', _check_guts_toc_mtime), - ('zipfiles', _check_guts_toc_mtime), - ('zipped_data', None), # TODO check this, too - ('datas', _check_guts_toc_mtime), - # TODO: Need to add "dependencies"? - - ('_modules_outside_pyz', _check_guts_toc_mtime), - ) - - def _extend_pathex(self, spec_pathex, scripts): - """ - Normalize additional paths where PyInstaller will look for modules and add paths with scripts to the list of - paths. - - :param spec_pathex: Additional paths defined defined in .spec file. - :param scripts: Scripts to create executable from. - :return: list of updated paths - """ - # Based on main supplied script - add top-level modules directory to PYTHONPATH. - # Sometimes the main app script is not top-level module but submodule like 'mymodule.mainscript.py'. - # In that case PyInstaller will not be able find modules in the directory containing 'mymodule'. - # Add this directory to PYTHONPATH so PyInstaller could find it. - pathex = [] - # Add scripts paths first. - for script in scripts: - logger.debug('script: %s' % script) - script_toplevel_dir = get_path_to_toplevel_modules(script) - if script_toplevel_dir: - pathex.append(script_toplevel_dir) - # Append paths from .spec. - if spec_pathex is not None: - pathex.extend(spec_pathex) - # Normalize paths in pathex and make them absolute. - return list(dict.fromkeys(absnormpath(p) for p in pathex)) - - def _check_guts(self, data, last_build): - if Target._check_guts(self, data, last_build): - return True - for filename in self.inputs: - if mtime(filename) > last_build: - logger.info("Building because %s changed", filename) - return True - # Now we know that none of the input parameters and none of the input files has changed. So take the values - # that were calculated / analyzed in the last run and store them in `self`. These TOC lists should already - # be normalized. - self.scripts = data['scripts'] - self.pure = data['pure'] - self.binaries = data['binaries'] - self.zipfiles = data['zipfiles'] - self.zipped_data = data['zipped_data'] - self.datas = data['datas'] - - return False - - def assemble(self): - """ - This method is the MAIN method for finding all necessary files to be bundled. - """ - from PyInstaller.config import CONF - - # Search for python shared library, which we need to collect into frozen application. Do this as the very - # first step, to minimize the amount of processing when the shared library cannot be found. - logger.info('Looking for Python shared library...') - python_lib = bindepend.get_python_library_path() # Raises PythonLibraryNotFoundError - logger.info('Using Python shared library: %s', python_lib) - - logger.info("Running Analysis %s", self.tocbasename) - logger.info("Target bytecode optimization level: %d", self.optimize) - - for m in self.excludes: - logger.debug("Excluding module '%s'" % m) - self.graph = initialize_modgraph(excludes=self.excludes, user_hook_dirs=self.hookspath) - - # Initialize `binaries` and `datas` with `_input_binaries` and `_input_datas`. Make sure to copy the lists - # to prevent modifications of original lists, which we need to store in original form for guts comparison. - self.datas = [entry for entry in self._input_datas] - self.binaries = [entry for entry in self._input_binaries] - - # Expand sys.path of module graph. The attribute is the set of paths to use for imports: sys.path, plus our - # loader, plus other paths from e.g. --path option). - self.graph.path = self.pathex + self.graph.path - - # Scan for legacy namespace packages. - self.graph.scan_legacy_namespace_packages() - - # Add python shared library to `binaries`. - if is_darwin and osxutils.is_framework_bundle_lib(python_lib): - # If python library is located in macOS .framework bundle, collect the bundle, and create symbolic link to - # top-level directory. - src_path = pathlib.PurePath(python_lib) - dst_path = pathlib.PurePath(src_path.relative_to(src_path.parent.parent.parent.parent)) - self.binaries.append((str(dst_path), str(src_path), 'BINARY')) - self.binaries.append((os.path.basename(python_lib), str(dst_path), 'SYMLINK')) - else: - self.binaries.append((os.path.basename(python_lib), python_lib, 'BINARY')) - - # -- Module graph. -- - # - # Construct the module graph of import relationships between modules required by this user's application. For - # each entry point (top-level user-defined Python script), all imports originating from this entry point are - # recursively parsed into a subgraph of the module graph. This subgraph is then connected to this graph's root - # node, ensuring imported module nodes will be reachable from the root node -- which is is (arbitrarily) chosen - # to be the first entry point's node. - - # List of graph nodes corresponding to program scripts. - program_scripts = [] - - # Assume that if the script does not exist, Modulegraph will raise error. Save the graph nodes of each in - # sequence. - for script in self.inputs: - logger.info("Analyzing %s", script) - program_scripts.append(self.graph.add_script(script)) - - # Analyze the script's hidden imports (named on the command line) - self.graph.add_hiddenimports(self.hiddenimports) - - # -- Post-graph hooks. -- - self.graph.process_post_graph_hooks(self) - - # Update 'binaries' and 'datas' TOC lists with entries collected from hooks. - self.binaries += self.graph.make_hook_binaries_toc() - self.datas += self.graph.make_hook_datas_toc() - - # We do not support zipped eggs anymore (PyInstaller v6.0), so `zipped_data` and `zipfiles` are always empty. - self.zipped_data = [] - self.zipfiles = [] - - # -- Automatic binary vs. data reclassification. -- - # - # At this point, `binaries` and `datas` contain TOC entries supplied by user via input arguments, and by hooks - # that were ran during the analysis. Neither source can be fully trusted regarding the DATA vs BINARY - # classification (no thanks to our hookutils not being 100% reliable, either!). Therefore, inspect the files and - # automatically reclassify them as necessary. - # - # The proper classification is important especially for collected binaries - to ensure that they undergo binary - # dependency analysis and platform-specific binary processing. On macOS, the .app bundle generation code also - # depends on files to be properly classified. - # - # For entries added to `binaries` and `datas` after this point, we trust their typecodes due to the nature of - # their origin. - combined_toc = normalize_toc(self.datas + self.binaries) - - logger.info('Performing binary vs. data reclassification (%d entries)', len(combined_toc)) - - self.datas = [] - self.binaries = [] - - for dest_name, src_name, typecode in combined_toc: - # Returns 'BINARY' or 'DATA', or None if file cannot be classified. - detected_typecode = bindepend.classify_binary_vs_data(src_name) - if detected_typecode is not None: - if detected_typecode != typecode: - logger.debug( - "Reclassifying collected file %r from %s to %s...", src_name, typecode, detected_typecode - ) - typecode = detected_typecode - - # Put back into corresponding TOC list. - if typecode in {'BINARY', 'EXTENSION'}: - self.binaries.append((dest_name, src_name, typecode)) - else: - self.datas.append((dest_name, src_name, typecode)) - - # -- Look for dlls that are imported by Python 'ctypes' module. -- - # First get code objects of all modules that import 'ctypes'. - logger.info('Looking for ctypes DLLs') - # dict like: {'module1': code_obj, 'module2': code_obj} - ctypes_code_objs = self.graph.get_code_using("ctypes") - - for name, co in ctypes_code_objs.items(): - # Get dlls that might be needed by ctypes. - logger.debug('Scanning %s for ctypes-based references to shared libraries', name) - try: - ctypes_binaries = scan_code_for_ctypes(co) - # As this scan happens after automatic binary-vs-data classification, we need to validate the binaries - # ourselves, just in case. - for dest_name, src_name, typecode in set(ctypes_binaries): - # Allow for `None` in case re-classification is not supported on the given platform. - if bindepend.classify_binary_vs_data(src_name) not in (None, 'BINARY'): - logger.warning("Ignoring %s found via ctypes - not a valid binary!", src_name) - continue - self.binaries.append((dest_name, src_name, typecode)) - except Exception as ex: - raise RuntimeError(f"Failed to scan the module '{name}'. This is a bug. Please report it.") from ex - - self.datas.extend((dest, source, "DATA") - for (dest, source) in format_binaries_and_datas(self.graph.metadata_required())) - - # Analyze run-time hooks. - rhtook_scripts = self.graph.analyze_runtime_hooks(self.custom_runtime_hooks) - - # -- Extract the nodes of the graph as TOCs for further processing. -- - - # Initialize the scripts list: run-time hooks (custom ones, followed by regular ones), followed by program - # script(s). - - # We do not optimize bytecode of run-time hooks. - rthook_toc = self.graph.nodes_to_toc(rhtook_scripts) - - # Override the typecode of program script(s) to include bytecode optimization level. - program_toc = self.graph.nodes_to_toc(program_scripts) - optim_typecode = {0: 'PYSOURCE', 1: 'PYSOURCE-1', 2: 'PYSOURCE-2'}[self.optimize] - program_toc = [(name, src_path, optim_typecode) for name, src_path, typecode in program_toc] - - self.scripts = rthook_toc + program_toc - self.scripts = normalize_toc(self.scripts) # Should not really contain duplicates, but just in case... - - # Extend the binaries list with all the Extensions modulegraph has found. - self.binaries += self.graph.make_binaries_toc() - - # Convert extension module names into full filenames, and append suffix. Ensure that extensions that come from - # the lib-dynload are collected into _MEIPASS/python3.x/lib-dynload instead of directly into _MEIPASS. - for idx, (dest, source, typecode) in enumerate(self.binaries): - if typecode != 'EXTENSION': - continue - dest = destination_name_for_extension(dest, source, typecode) - self.binaries[idx] = (dest, source, typecode) - - # Perform initial normalization of `datas` and `binaries` - self.datas = normalize_toc(self.datas) - self.binaries = normalize_toc(self.binaries) - - # Post-process GLib schemas - self.datas = compile_glib_schema_files(self.datas, os.path.join(CONF['workpath'], "_pyi_gschema_compilation")) - self.datas = normalize_toc(self.datas) - - # Process the pure-python modules list. Depending on the collection mode, these entries end up either in "pure" - # list for collection into the PYZ archive, or in the "datas" list for collection as external data files. - assert len(self.pure) == 0 - pure_pymodules_toc = self.graph.make_pure_toc() - - # Merge package collection mode settings from .spec file. These are applied last, so they override the - # settings previously applied by hooks. - self.graph._module_collection_mode.update(self.module_collection_mode) - logger.debug("Module collection settings: %r", self.graph._module_collection_mode) - - # If target bytecode optimization level matches the run-time bytecode optimization level (i.e., of the running - # build process), we can re-use the modulegraph's code-object cache. - if self.optimize == sys.flags.optimize: - logger.debug( - "Target optimization level %d matches run-time optimization level %d - using modulegraph's code-object " - "cache.", - self.optimize, - sys.flags.optimize, - ) - code_cache = self.graph.get_code_objects() - else: - logger.debug( - "Target optimization level %d differs from run-time optimization level %d - ignoring modulegraph's " - "code-object cache.", - self.optimize, - sys.flags.optimize, - ) - code_cache = None - - # Construct a set for look-up of modules that should end up in base_library.zip. The list of corresponding - # modulegraph nodes is stored in `PyiModuleGraph._base_modules` (see `PyiModuleGraph._analyze_base_modules`). - base_modules = set(node.identifier for node in self.graph._base_modules) - base_modules_toc = [] - - pycs_dir = os.path.join(CONF['workpath'], 'localpycs') - optim_level = self.optimize # We could extend this with per-module settings, similar to `collect_mode`. - for name, src_path, typecode in pure_pymodules_toc: - assert typecode == 'PYMODULE' - collect_mode = _get_module_collection_mode(self.graph._module_collection_mode, name, self.noarchive) - - # Collect byte-compiled .pyc into PYZ archive or base_library.zip. Embed optimization level into typecode. - in_pyz = False - if _ModuleCollectionMode.PYZ in collect_mode: - optim_typecode = {0: 'PYMODULE', 1: 'PYMODULE-1', 2: 'PYMODULE-2'}[optim_level] - toc_entry = (name, src_path, optim_typecode) - if name in base_modules: - base_modules_toc.append(toc_entry) - else: - self.pure.append(toc_entry) - in_pyz = True - - # If module is not collected into PYZ archive (and is consequently not tracked in the `self.pure` TOC list), - # add it to the `self._modules_outside_pyz` TOC list, in order to be able to detect modifications in those - # modules. - if not in_pyz: - self._modules_outside_pyz.append((name, src_path, typecode)) - - # Pure namespace packages have no source path, and cannot be collected as external data file. - if src_path in (None, '-'): - continue - - # Collect source .py file as external data file - if _ModuleCollectionMode.PY in collect_mode: - basename, ext = os.path.splitext(os.path.basename(src_path)) - # If the module is available only as a byte-compiled .pyc, we cannot collect its source. - if ext.lower() == '.pyc': - logger.warning( - 'Cannot collect source .py file for module %r - module is available only as .pyc: %r', - name, - src_path, - ) - continue - dest_path = name.replace('.', os.sep) - if basename == '__init__': - dest_path += os.sep + '__init__' + ext - else: - dest_path += ext - self.datas.append((dest_path, src_path, "DATA")) - - # Collect byte-compiled .pyc file as external data file - if _ModuleCollectionMode.PYC in collect_mode: - basename, ext = os.path.splitext(os.path.basename(src_path)) - dest_path = name.replace('.', os.sep) - if basename == '__init__': - dest_path += os.sep + '__init__' - # Append the extension for the compiled result. In python 3.5 (PEP-488) .pyo files were replaced by - # .opt-1.pyc and .opt-2.pyc. However, it seems that for bytecode-only module distribution, we always - # need to use the .pyc extension. - dest_path += '.pyc' - - # Compile - use optimization-level-specific sub-directory in local working directory. - obj_path = compile_pymodule( - name, - src_path, - workpath=os.path.join(pycs_dir, str(optim_level)), - optimize=optim_level, - code_cache=code_cache, - ) - - self.datas.append((dest_path, obj_path, "DATA")) - - # Construct base_library.zip, if applicable (the only scenario where it is not is if we are building with - # noarchive mode). Always remove the file before the build. - base_library_zip = os.path.join(CONF['workpath'], 'base_library.zip') - if os.path.exists(base_library_zip): - os.remove(base_library_zip) - if base_modules_toc: - logger.info('Creating %s...', os.path.basename(base_library_zip)) - create_base_library_zip(base_library_zip, base_modules_toc, code_cache) - self.datas.append((os.path.basename(base_library_zip), base_library_zip, 'DATA')) # Bundle as data file. - - # Normalize list of pure-python modules (these will end up in PYZ archive, so use specific normalization). - self.pure = normalize_pyz_toc(self.pure) - - # Associate the `pure` TOC list instance with code cache in the global `CONF`; this is used by `PYZ` writer - # to obtain modules' code from cache instead - # - # (NOTE: back when `pure` was an instance of `TOC` class, the code object was passed by adding an attribute - # to the `pure` itself; now that `pure` is plain `list`, we cannot do that anymore. But the association via - # object ID should have the same semantics as the added attribute). - from PyInstaller.config import CONF - global_code_cache_map = CONF['code_cache'] - global_code_cache_map[id(self.pure)] = code_cache - - # Add remaining binary dependencies - analyze Python C-extensions and what DLLs they depend on. - # - # Up until this point, we did very best not to import the packages into the main process. However, a package - # may set up additional library search paths during its import (e.g., by modifying PATH or calling the - # add_dll_directory() function on Windows, or modifying LD_LIBRARY_PATH on Linux). In order to reliably - # discover dynamic libraries, we therefore require an environment with all packages imported. We achieve that - # by gathering list of all collected packages, and spawn an isolated process, in which we first import all - # the packages from the list, and then perform search for dynamic libraries. - logger.info('Looking for dynamic libraries') - - collected_packages = self.graph.get_collected_packages() - self.binaries.extend( - find_binary_dependencies(self.binaries, collected_packages, self.graph._bindepend_symlink_suppression) - ) - - # Apply work-around for (potential) binaries collected from `pywin32` package... - if is_win: - self.binaries = postprocess_binaries_toc_pywin32(self.binaries) - # With anaconda, we need additional work-around... - if is_conda: - self.binaries = postprocess_binaries_toc_pywin32_anaconda(self.binaries) - - # On linux, check for HMAC files accompanying shared library files and, if available, collect them. - # These are present on Fedora and RHEL, and are used in FIPS-enabled configurations to ensure shared - # library's file integrity. - if is_linux: - for dest_name, src_name, typecode in self.binaries: - if typecode not in {'BINARY', 'EXTENSION'}: - continue # Skip symbolic links - - src_lib_path = pathlib.Path(src_name) - - # Check for .name.hmac file next to the shared library. - src_hmac_path = src_lib_path.with_name(f".{src_lib_path.name}.hmac") - if src_hmac_path.is_file(): - dest_hmac_path = pathlib.PurePath(dest_name).with_name(src_hmac_path.name) - self.datas.append((str(dest_hmac_path), str(src_hmac_path), 'DATA')) - - # Alternatively, check the fipscheck directory: fipscheck/name.hmac - src_hmac_path = src_lib_path.parent / "fipscheck" / f"{src_lib_path.name}.hmac" - if src_hmac_path.is_file(): - dest_hmac_path = pathlib.PurePath("fipscheck") / src_hmac_path.name - self.datas.append((str(dest_hmac_path), str(src_hmac_path), 'DATA')) - - # Similarly, look for .chk files that are used by NSS libraries. - src_chk_path = src_lib_path.with_suffix(".chk") - if src_chk_path.is_file(): - dest_chk_path = pathlib.PurePath(dest_name).with_name(src_chk_path.name) - self.datas.append((str(dest_chk_path), str(src_chk_path), 'DATA')) - - # Final normalization of `datas` and `binaries`: - # - normalize both TOCs together (to avoid having duplicates across the lists) - # - process the combined normalized TOC for symlinks - # - split back into `binaries` (BINARY, EXTENSION) and `datas` (everything else) - combined_toc = normalize_toc(self.datas + self.binaries) - combined_toc = toc_process_symbolic_links(combined_toc) - - # On macOS, look for binaries collected from .framework bundles, collect their Info.plist files, and fix the - # structure to conform to code-signing requirements (i.e., Versions/Current symbolic link and symbolic links - # for top-level directories). - if is_darwin: - combined_toc = osxutils.collect_files_from_framework_bundles(combined_toc) - combined_toc = normalize_toc(combined_toc) - - self.datas = [] - self.binaries = [] - for entry in combined_toc: - dest_name, src_name, typecode = entry - if typecode in {'BINARY', 'EXTENSION'}: - self.binaries.append(entry) - else: - self.datas.append(entry) - - # On macOS, the Finder app seems to litter visited directories with `.DS_Store` files. These cause issues with - # codesigning when placed in mixed-content directories, where our .app bundle generator cross-links data files - # from `Resources` to `Frameworks` tree, and the `codesign` utility explicitly forbids a `.DS_Store` file to be - # a symbolic link. - # But there is no reason for `.DS_Store` files to be collected in the first place, so filter them out. - if is_darwin: - self.datas = [(dest_name, src_name, typecode) for dest_name, src_name, typecode in self.datas - if os.path.basename(src_name) != '.DS_Store'] - - # Write warnings about missing modules. - self._write_warnings() - # Write debug information about the graph - self._write_graph_debug() - - # On macOS, check the SDK version of the binaries to be collected, and warn when the SDK version is either - # invalid or too low. Such binaries will likely refuse to be loaded when hardened runtime is enabled and - # while we cannot do anything about it, we can at least warn the user about it. - # See: https://developer.apple.com/forums/thread/132526 - if is_darwin: - binaries_with_invalid_sdk = [] - for dest_name, src_name, typecode in self.binaries: - try: - sdk_version = osxutils.get_macos_sdk_version(src_name) - except Exception: - logger.warning("Failed to query macOS SDK version of %r!", src_name, exc_info=True) - binaries_with_invalid_sdk.append((dest_name, src_name, "unavailable")) - continue - - if sdk_version < (10, 9, 0): - binaries_with_invalid_sdk.append((dest_name, src_name, sdk_version)) - if binaries_with_invalid_sdk: - logger.warning("Found one or more binaries with invalid or incompatible macOS SDK version:") - for dest_name, src_name, sdk_version in binaries_with_invalid_sdk: - logger.warning(" * %r, collected as %r; version: %r", src_name, dest_name, sdk_version) - logger.warning("These binaries will likely cause issues with code-signing and hardened runtime!") - - def _write_warnings(self): - """ - Write warnings about missing modules. Get them from the graph and use the graph to figure out who tried to - import them. - """ - def dependency_description(name, dep_info): - if not dep_info or dep_info == 'direct': - imptype = 0 - else: - imptype = (dep_info.conditional + 2 * dep_info.function + 4 * dep_info.tryexcept) - return '%s (%s)' % (name, IMPORT_TYPES[imptype]) - - from PyInstaller.config import CONF - miss_toc = self.graph.make_missing_toc() - with open(CONF['warnfile'], 'w', encoding='utf-8') as wf: - wf.write(WARNFILE_HEADER) - for (n, p, status) in miss_toc: - importers = self.graph.get_importers(n) - print( - status, - 'module named', - n, - '- imported by', - ', '.join(dependency_description(name, data) for name, data in importers), - file=wf - ) - logger.info("Warnings written to %s", CONF['warnfile']) - - def _write_graph_debug(self): - """ - Write a xref (in html) and with `--log-level DEBUG` a dot-drawing of the graph. - """ - from PyInstaller.config import CONF - with open(CONF['xref-file'], 'w', encoding='utf-8') as fh: - self.graph.create_xref(fh) - logger.info("Graph cross-reference written to %s", CONF['xref-file']) - if logger.getEffectiveLevel() > logging.DEBUG: - return - # The `DOT language's `_ default character encoding (see the end - # of the linked page) is UTF-8. - with open(CONF['dot-file'], 'w', encoding='utf-8') as fh: - self.graph.graphreport(fh) - logger.info("Graph drawing written to %s", CONF['dot-file']) - - def exclude_system_libraries(self, list_of_exceptions=None): - """ - This method may be optionally called from the spec file to exclude any system libraries from the list of - binaries other than those containing the shell-style wildcards in list_of_exceptions. Those that match - '*python*' or are stored under 'lib-dynload' are always treated as exceptions and not excluded. - """ - - self.binaries = [ - entry for entry in self.binaries if _should_include_system_binary(entry, list_of_exceptions or []) - ] - - -class ExecutableBuilder: - """ - Class that constructs the executable. - """ - # TODO wrap the 'main' and 'build' function into this class. - - -def build(spec, distpath, workpath, clean_build): - """ - Build the executable according to the created SPEC file. - """ - from PyInstaller.config import CONF - - # Ensure starting tilde in distpath / workpath is expanded into user's home directory. This is to work around for - # tilde not being expanded when using `--workpath=~/path/abc` instead of `--workpath ~/path/abc` (or when the path - # argument is quoted). See https://github.com/pyinstaller/pyinstaller/issues/696 - distpath = os.path.abspath(os.path.expanduser(distpath)) - workpath = os.path.abspath(os.path.expanduser(workpath)) - - CONF['spec'] = os.path.abspath(spec) - CONF['specpath'], CONF['specnm'] = os.path.split(CONF['spec']) - CONF['specnm'] = os.path.splitext(CONF['specnm'])[0] - - # Add 'specname' to workpath and distpath if they point to PyInstaller homepath. - if os.path.dirname(distpath) == HOMEPATH: - distpath = os.path.join(HOMEPATH, CONF['specnm'], os.path.basename(distpath)) - CONF['distpath'] = distpath - if os.path.dirname(workpath) == HOMEPATH: - workpath = os.path.join(HOMEPATH, CONF['specnm'], os.path.basename(workpath), CONF['specnm']) - else: - workpath = os.path.join(workpath, CONF['specnm']) - CONF['workpath'] = workpath - - CONF['warnfile'] = os.path.join(workpath, 'warn-%s.txt' % CONF['specnm']) - CONF['dot-file'] = os.path.join(workpath, 'graph-%s.dot' % CONF['specnm']) - CONF['xref-file'] = os.path.join(workpath, 'xref-%s.html' % CONF['specnm']) - - CONF['code_cache'] = dict() - - # Clean PyInstaller cache (CONF['cachedir']) and temporary files (workpath) to be able start a clean build. - if clean_build: - logger.info('Removing temporary files and cleaning cache in %s', CONF['cachedir']) - for pth in (CONF['cachedir'], workpath): - if os.path.exists(pth): - # Remove all files in 'pth'. - for f in glob.glob(pth + '/*'): - # Remove dirs recursively. - if os.path.isdir(f): - shutil.rmtree(f) - else: - os.remove(f) - - # Create DISTPATH and workpath if they does not exist. - for pth in (CONF['distpath'], CONF['workpath']): - os.makedirs(pth, exist_ok=True) - - # Construct NAMESPACE for running the Python code from .SPEC file. - # NOTE: Passing NAMESPACE allows to avoid having global variables in this module and makes isolated environment for - # running tests. - # NOTE: Defining NAMESPACE allows to map any class to a apecific name for .SPEC. - # FIXME: Some symbols might be missing. Add them if there are some failures. - # TODO: What from this .spec API is deprecated and could be removed? - spec_namespace = { - # Set of global variables that can be used while processing .spec file. Some of them act as configuration - # options. - 'DISTPATH': CONF['distpath'], - 'HOMEPATH': HOMEPATH, - 'SPEC': CONF['spec'], - 'specnm': CONF['specnm'], - 'SPECPATH': CONF['specpath'], - 'WARNFILE': CONF['warnfile'], - 'workpath': CONF['workpath'], - # PyInstaller classes for .spec. - 'TOC': TOC, # Kept for backward compatibility even though `TOC` class is deprecated. - 'Analysis': Analysis, - 'BUNDLE': BUNDLE, - 'COLLECT': COLLECT, - 'EXE': EXE, - 'MERGE': MERGE, - 'PYZ': PYZ, - 'Tree': Tree, - 'Splash': Splash, - # Python modules available for .spec. - 'os': os, - } - - # Execute the specfile. Read it as a binary file... - try: - with open(spec, 'rb') as f: - # ... then let Python determine the encoding, since ``compile`` accepts byte strings. - code = compile(f.read(), spec, 'exec') - except FileNotFoundError: - raise SystemExit(f'ERROR: Spec file "{spec}" not found!') - exec(code, spec_namespace) - - logger.info("Build complete! The results are available in: %s", CONF['distpath']) - - -def __add_options(parser): - parser.add_argument( - "--distpath", - metavar="DIR", - default=DEFAULT_DISTPATH, - help="Where to put the bundled app (default: ./dist)", - ) - parser.add_argument( - '--workpath', - default=DEFAULT_WORKPATH, - help="Where to put all the temporary work files, .log, .pyz and etc. (default: ./build)", - ) - parser.add_argument( - '-y', - '--noconfirm', - action="store_true", - default=False, - help="Replace output directory (default: %s) without asking for confirmation" % - os.path.join('SPECPATH', 'dist', 'SPECNAME'), - ) - parser.add_argument( - '--upx-dir', - default=None, - help="Path to UPX utility (default: search the execution path)", - ) - parser.add_argument( - '--clean', - dest='clean_build', - action='store_true', - default=False, - help="Clean PyInstaller cache and remove temporary files before building.", - ) - - -def main( - pyi_config, - specfile, - noconfirm=False, - distpath=DEFAULT_DISTPATH, - workpath=DEFAULT_WORKPATH, - upx_dir=None, - clean_build=False, - **kw -): - from PyInstaller.config import CONF - CONF['noconfirm'] = noconfirm - - # If configuration dict is supplied - skip configuration step. - if pyi_config is None: - import PyInstaller.configure as configure - CONF.update(configure.get_config(upx_dir=upx_dir)) - else: - CONF.update(pyi_config) - - CONF['ui_admin'] = kw.get('ui_admin', False) - CONF['ui_access'] = kw.get('ui_uiaccess', False) - - build(specfile, distpath, workpath, clean_build) diff --git a/voxvera/vendor/PyInstaller/building/datastruct.py b/voxvera/vendor/PyInstaller/building/datastruct.py deleted file mode 100755 index ca16286..0000000 --- a/voxvera/vendor/PyInstaller/building/datastruct.py +++ /dev/null @@ -1,459 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import os -import pathlib -import warnings - -from PyInstaller import log as logging -from PyInstaller.building.utils import _check_guts_eq -from PyInstaller.utils import misc - -logger = logging.getLogger(__name__) - - -def unique_name(entry): - """ - Return the filename used to enforce uniqueness for the given TOC entry. - - Parameters - ---------- - entry : tuple - - Returns - ------- - unique_name: str - """ - name, path, typecode = entry - if typecode in ('BINARY', 'DATA', 'EXTENSION', 'DEPENDENCY'): - name = os.path.normcase(name) - - return name - - -# This class is deprecated and has been replaced by plain lists with explicit normalization (de-duplication) via -# `normalize_toc` and `normalize_pyz_toc` helper functions. -class TOC(list): - """ - TOC (Table of Contents) class is a list of tuples of the form (name, path, typecode). - - typecode name path description - -------------------------------------------------------------------------------------- - EXTENSION Python internal name. Full path name in build. Extension module. - PYSOURCE Python internal name. Full path name in build. Script. - PYMODULE Python internal name. Full path name in build. Pure Python module (including __init__ modules). - PYZ Runtime name. Full path name in build. A .pyz archive (ZlibArchive data structure). - PKG Runtime name. Full path name in build. A .pkg archive (Carchive data structure). - BINARY Runtime name. Full path name in build. Shared library. - DATA Runtime name. Full path name in build. Arbitrary files. - OPTION The option. Unused. Python runtime option (frozen into executable). - - A TOC contains various types of files. A TOC contains no duplicates and preserves order. - PyInstaller uses TOC data type to collect necessary files bundle them into an executable. - """ - def __init__(self, initlist=None): - super().__init__() - - # Deprecation warning - warnings.warn( - "TOC class is deprecated. Use a plain list of 3-element tuples instead.", - DeprecationWarning, - stacklevel=2, - ) - - self.filenames = set() - if initlist: - for entry in initlist: - self.append(entry) - - def append(self, entry): - if not isinstance(entry, tuple): - logger.info("TOC found a %s, not a tuple", entry) - raise TypeError("Expected tuple, not %s." % type(entry).__name__) - - unique = unique_name(entry) - - if unique not in self.filenames: - self.filenames.add(unique) - super().append(entry) - - def insert(self, pos, entry): - if not isinstance(entry, tuple): - logger.info("TOC found a %s, not a tuple", entry) - raise TypeError("Expected tuple, not %s." % type(entry).__name__) - unique = unique_name(entry) - - if unique not in self.filenames: - self.filenames.add(unique) - super().insert(pos, entry) - - def __add__(self, other): - result = TOC(self) - result.extend(other) - return result - - def __radd__(self, other): - result = TOC(other) - result.extend(self) - return result - - def __iadd__(self, other): - for entry in other: - self.append(entry) - return self - - def extend(self, other): - # TODO: look if this can be done more efficient with out the loop, e.g. by not using a list as base at all. - for entry in other: - self.append(entry) - - def __sub__(self, other): - # Construct new TOC with entries not contained in the other TOC - other = TOC(other) - return TOC([entry for entry in self if unique_name(entry) not in other.filenames]) - - def __rsub__(self, other): - result = TOC(other) - return result.__sub__(self) - - def __setitem__(self, key, value): - if isinstance(key, slice): - if key == slice(None, None, None): - # special case: set the entire list - self.filenames = set() - self.clear() - self.extend(value) - return - else: - raise KeyError("TOC.__setitem__ doesn't handle slices") - - else: - old_value = self[key] - old_name = unique_name(old_value) - self.filenames.remove(old_name) - - new_name = unique_name(value) - if new_name not in self.filenames: - self.filenames.add(new_name) - super(TOC, self).__setitem__(key, value) - - -class Target: - invcnum = 0 - - def __init__(self): - from PyInstaller.config import CONF - - # Get a (per class) unique number to avoid conflicts between toc objects - self.invcnum = self.__class__.invcnum - self.__class__.invcnum += 1 - self.tocfilename = os.path.join(CONF['workpath'], '%s-%02d.toc' % (self.__class__.__name__, self.invcnum)) - self.tocbasename = os.path.basename(self.tocfilename) - self.dependencies = [] - - def __postinit__(self): - """ - Check if the target need to be rebuild and if so, re-assemble. - - `__postinit__` is to be called at the end of `__init__` of every subclass of Target. `__init__` is meant to - setup the parameters and `__postinit__` is checking if rebuild is required and in case calls `assemble()` - """ - logger.info("checking %s", self.__class__.__name__) - data = None - last_build = misc.mtime(self.tocfilename) - if last_build == 0: - logger.info("Building %s because %s is non existent", self.__class__.__name__, self.tocbasename) - else: - try: - data = misc.load_py_data_struct(self.tocfilename) - except Exception: - logger.info("Building because %s is bad", self.tocbasename) - else: - # create a dict for easier access - data = dict(zip((g[0] for g in self._GUTS), data)) - # assemble if previous data was not found or is outdated - if not data or self._check_guts(data, last_build): - self.assemble() - self._save_guts() - - _GUTS = [] - - def _check_guts(self, data, last_build): - """ - Returns True if rebuild/assemble is required. - """ - if len(data) != len(self._GUTS): - logger.info("Building because %s is bad", self.tocbasename) - return True - for attr, func in self._GUTS: - if func is None: - # no check for this value - continue - if func(attr, data[attr], getattr(self, attr), last_build): - return True - return False - - def _save_guts(self): - """ - Save the input parameters and the work-product of this run to maybe avoid regenerating it later. - """ - data = tuple(getattr(self, g[0]) for g in self._GUTS) - misc.save_py_data_struct(self.tocfilename, data) - - -class Tree(Target, list): - """ - This class is a way of creating a TOC (Table of Contents) list that describes some or all of the files within a - directory. - """ - def __init__(self, root=None, prefix=None, excludes=None, typecode='DATA'): - """ - root - The root of the tree (on the build system). - prefix - Optional prefix to the names of the target system. - excludes - A list of names to exclude. Two forms are allowed: - - name - Files with this basename will be excluded (do not include the path). - *.ext - Any file with the given extension will be excluded. - typecode - The typecode to be used for all files found in this tree. See the TOC class for for information about - the typcodes. - """ - Target.__init__(self) - list.__init__(self) - self.root = root - self.prefix = prefix - self.excludes = excludes - self.typecode = typecode - if excludes is None: - self.excludes = [] - self.__postinit__() - - _GUTS = ( # input parameters - ('root', _check_guts_eq), - ('prefix', _check_guts_eq), - ('excludes', _check_guts_eq), - ('typecode', _check_guts_eq), - ('data', None), # tested below - # no calculated/analysed values - ) - - def _check_guts(self, data, last_build): - if Target._check_guts(self, data, last_build): - return True - # Walk the collected directories as check if they have been changed - which means files have been added or - # removed. There is no need to check for the files, since `Tree` is only about the directory contents (which is - # the list of files). - stack = [data['root']] - while stack: - d = stack.pop() - if misc.mtime(d) > last_build: - logger.info("Building %s because directory %s changed", self.tocbasename, d) - return True - for nm in os.listdir(d): - path = os.path.join(d, nm) - if os.path.isdir(path): - stack.append(path) - self[:] = data['data'] # collected files - return False - - def _save_guts(self): - # Use the attribute `data` to save the list - self.data = self - super()._save_guts() - del self.data - - def assemble(self): - logger.info("Building Tree %s", self.tocbasename) - stack = [(self.root, self.prefix)] - excludes = set() - xexcludes = set() - for name in self.excludes: - if name.startswith('*'): - xexcludes.add(name[1:]) - else: - excludes.add(name) - result = [] - while stack: - dir, prefix = stack.pop() - for filename in os.listdir(dir): - if filename in excludes: - continue - ext = os.path.splitext(filename)[1] - if ext in xexcludes: - continue - fullfilename = os.path.join(dir, filename) - if prefix: - resfilename = os.path.join(prefix, filename) - else: - resfilename = filename - if os.path.isdir(fullfilename): - stack.append((fullfilename, resfilename)) - else: - result.append((resfilename, fullfilename, self.typecode)) - self[:] = result - - -def normalize_toc(toc): - # Default priority: 0 - _TOC_TYPE_PRIORITIES = { - # DEPENDENCY entries need to replace original entries, so they need the highest priority. - 'DEPENDENCY': 3, - # SYMLINK entries have higher priority than other regular entries - 'SYMLINK': 2, - # BINARY/EXTENSION entries undergo additional processing, so give them precedence over DATA and other entries. - 'BINARY': 1, - 'EXTENSION': 1, - } - - def _type_case_normalization_fcn(typecode): - # Case-normalize all entries except OPTION. - return typecode not in { - "OPTION", - } - - return _normalize_toc(toc, _TOC_TYPE_PRIORITIES, _type_case_normalization_fcn) - - -def normalize_pyz_toc(toc): - # Default priority: 0 - _TOC_TYPE_PRIORITIES = { - # Ensure that entries with higher optimization level take precedence. - 'PYMODULE-2': 2, - 'PYMODULE-1': 1, - 'PYMODULE': 0, - } - - return _normalize_toc(toc, _TOC_TYPE_PRIORITIES) - - -def _normalize_toc(toc, toc_type_priorities, type_case_normalization_fcn=lambda typecode: False): - options_toc = [] - tmp_toc = dict() - for dest_name, src_name, typecode in toc: - # Exempt OPTION entries from de-duplication processing. Some options might allow being specified multiple times. - if typecode == 'OPTION': - options_toc.append(((dest_name, src_name, typecode))) - continue - - # Always sanitize the dest_name with `os.path.normpath` to remove any local loops with parent directory path - # components. `pathlib` does not seem to offer equivalent functionality. - dest_name = os.path.normpath(dest_name) - - # Normalize the destination name for uniqueness. Use `pathlib.PurePath` to ensure that keys are both - # case-normalized (on OSes where applicable) and directory-separator normalized (just in case). - if type_case_normalization_fcn(typecode): - entry_key = pathlib.PurePath(dest_name) - else: - entry_key = dest_name - - existing_entry = tmp_toc.get(entry_key) - if existing_entry is None: - # Entry does not exist - insert - tmp_toc[entry_key] = (dest_name, src_name, typecode) - else: - # Entry already exists - replace if its typecode has higher priority - _, _, existing_typecode = existing_entry - if toc_type_priorities.get(typecode, 0) > toc_type_priorities.get(existing_typecode, 0): - tmp_toc[entry_key] = (dest_name, src_name, typecode) - - # Return the items as list. The order matches the original order due to python dict maintaining the insertion order. - # The exception are OPTION entries, which are now placed at the beginning of the TOC. - return options_toc + list(tmp_toc.values()) - - -def toc_process_symbolic_links(toc): - """ - Process TOC entries and replace entries whose files are symbolic links with SYMLINK entries (provided original file - is also being collected). - """ - # Dictionary of all destination names, for a fast look-up. - all_dest_files = set([dest_name for dest_name, src_name, typecode in toc]) - - # Process the TOC to create SYMLINK entries - new_toc = [] - for entry in toc: - dest_name, src_name, typecode = entry - - # Skip entries that are already symbolic links - if typecode == 'SYMLINK': - new_toc.append(entry) - continue - - # Skip entries without valid source name (e.g., OPTION) - if not src_name: - new_toc.append(entry) - continue - - # Source path is not a symbolic link (i.e., it is a regular file or directory) - if not os.path.islink(src_name): - new_toc.append(entry) - continue - - # Try preserving the symbolic link, under strict relative-relationship-preservation check - symlink_entry = _try_preserving_symbolic_link(dest_name, src_name, all_dest_files) - - if symlink_entry: - new_toc.append(symlink_entry) - else: - new_toc.append(entry) - - return new_toc - - -def _try_preserving_symbolic_link(dest_name, src_name, all_dest_files): - seen_src_files = set() - - # Set initial values for the loop - ref_src_file = src_name - ref_dest_file = dest_name - - while True: - # Guard against cyclic links... - if ref_src_file in seen_src_files: - break - seen_src_files.add(ref_src_file) - - # Stop when referenced source file is not a symbolic link anymore. - if not os.path.islink(ref_src_file): - break - - # Read the symbolic link's target, but do not fully resolve it using os.path.realpath(), because there might be - # other symbolic links involved as well (for example, /lib64 -> /usr/lib64 whereas we are processing - # /lib64/liba.so -> /lib64/liba.so.1) - symlink_target = os.readlink(ref_src_file) - if os.path.isabs(symlink_target): - break # We support only relative symbolic links. - - ref_dest_file = os.path.join(os.path.dirname(ref_dest_file), symlink_target) - ref_dest_file = os.path.normpath(ref_dest_file) # remove any '..' - - ref_src_file = os.path.join(os.path.dirname(ref_src_file), symlink_target) - ref_src_file = os.path.normpath(ref_src_file) # remove any '..' - - # Check if referenced destination file is valid (i.e., we are collecting a file under referenced name). - if ref_dest_file in all_dest_files: - # Sanity check: original source name and current referenced source name must, after complete resolution, - # point to the same file. - if os.path.realpath(src_name) == os.path.realpath(ref_src_file): - # Compute relative link for the destination file (might be modified, if we went over non-collected - # intermediate links). - rel_link = os.path.relpath(ref_dest_file, os.path.dirname(dest_name)) - return dest_name, rel_link, 'SYMLINK' - - # If referenced destination is not valid, do another iteration in case we are dealing with chained links and we - # are not collecting an intermediate link... - - return None diff --git a/voxvera/vendor/PyInstaller/building/icon.py b/voxvera/vendor/PyInstaller/building/icon.py deleted file mode 100755 index de298f2..0000000 --- a/voxvera/vendor/PyInstaller/building/icon.py +++ /dev/null @@ -1,90 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2022-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from typing import Tuple - -import os -import hashlib - - -def normalize_icon_type(icon_path: str, allowed_types: Tuple[str], convert_type: str, workpath: str) -> str: - """ - Returns a valid icon path or raises an Exception on error. - Ensures that the icon exists, and, if necessary, attempts to convert it to correct OS-specific format using Pillow. - - Takes: - icon_path - the icon given by the user - allowed_types - a tuple of icon formats that should be allowed through - EX: ("ico", "exe") - convert_type - the type to attempt conversion too if necessary - EX: "icns" - workpath - the temp directory to save any newly generated image files - """ - - # explicitly error if file not found - if not os.path.exists(icon_path): - raise FileNotFoundError(f"Icon input file {icon_path} not found") - - _, extension = os.path.splitext(icon_path) - extension = extension[1:] # get rid of the "." in ".whatever" - - # if the file is already in the right format, pass it back unchanged - if extension in allowed_types: - # Check both the suffix and the header of the file to guard against the user confusing image types. - signatures = hex_signatures[extension] - with open(icon_path, "rb") as f: - header = f.read(max(len(s) for s in signatures)) - if any(list(header)[:len(s)] == s for s in signatures): - return icon_path - - # The icon type is wrong! Let's try and import PIL - try: - from PIL import Image as PILImage - import PIL - - except ImportError: - raise ValueError( - f"Received icon image '{icon_path}' which exists but is not in the correct format. On this platform, " - f"only {allowed_types} images may be used as icons. If Pillow is installed, automatic conversion will " - f"be attempted. Please install Pillow or convert your '{extension}' file to one of {allowed_types} " - f"and try again." - ) - - # Let's try to use PIL to convert the icon file type - try: - _generated_name = f"generated-{hashlib.sha256(icon_path.encode()).hexdigest()}.{convert_type}" - generated_icon = os.path.join(workpath, _generated_name) - with PILImage.open(icon_path) as im: - # If an image uses a custom palette + transparency, convert it to RGBA for a better alpha mask depth. - if im.mode == "P" and im.info.get("transparency", None) is not None: - # The bit depth of the alpha channel will be higher, and the images will look better when eventually - # scaled to multiple sizes (16,24,32,..) for the ICO format for example. - im = im.convert("RGBA") - im.save(generated_icon) - icon_path = generated_icon - except PIL.UnidentifiedImageError: - raise ValueError( - f"Something went wrong converting icon image '{icon_path}' to '.{convert_type}' with Pillow, " - f"perhaps the image format is unsupported. Try again with a different file or use a file that can " - f"be used without conversion on this platform: {allowed_types}" - ) - - return icon_path - - -# Possible initial bytes of icon types PyInstaller needs to be able to recognise. -# Taken from: https://en.wikipedia.org/wiki/List_of_file_signatures -hex_signatures = { - "png": [[0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]], - "exe": [[0x4D, 0x5A], [0x5A, 0x4D]], - "ico": [[0x00, 0x00, 0x01, 0x00]], - "icns": [[0x69, 0x63, 0x6e, 0x73]], -} diff --git a/voxvera/vendor/PyInstaller/building/makespec.py b/voxvera/vendor/PyInstaller/building/makespec.py deleted file mode 100755 index 0aad832..0000000 --- a/voxvera/vendor/PyInstaller/building/makespec.py +++ /dev/null @@ -1,909 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Automatically build spec files containing a description of the project. -""" - -import argparse -import os -import re -import sys - -from PyInstaller import DEFAULT_SPECPATH, HOMEPATH -from PyInstaller import log as logging -from PyInstaller.building.templates import bundleexetmplt, bundletmplt, onedirtmplt, onefiletmplt, splashtmpl -from PyInstaller.compat import is_darwin, is_win - -logger = logging.getLogger(__name__) - -# This list gives valid choices for the ``--debug`` command-line option, except for the ``all`` choice. -DEBUG_ARGUMENT_CHOICES = ['imports', 'bootloader', 'noarchive'] -# This is the ``all`` choice. -DEBUG_ALL_CHOICE = ['all'] - - -def escape_win_filepath(path): - # escape all \ with another \ after using normpath to clean up the path - return os.path.normpath(path).replace('\\', '\\\\') - - -def make_path_spec_relative(filename, spec_dir): - """ - Make the filename relative to the directory containing .spec file if filename is relative and not absolute. - Otherwise keep filename untouched. - """ - if os.path.isabs(filename): - return filename - else: - filename = os.path.abspath(filename) - # Make it relative. - filename = os.path.relpath(filename, start=spec_dir) - return filename - - -# Support for trying to avoid hard-coded paths in the .spec files. Eg, all files rooted in the Installer directory tree -# will be written using "HOMEPATH", thus allowing this spec file to be used with any Installer installation. Same thing -# could be done for other paths too. -path_conversions = ((HOMEPATH, "HOMEPATH"),) - - -class SourceDestAction(argparse.Action): - """ - A command line option which takes multiple source:dest pairs. - """ - def __init__(self, *args, default=None, metavar=None, **kwargs): - super().__init__(*args, default=[], metavar='SOURCE:DEST', **kwargs) - - def __call__(self, parser, namespace, value, option_string=None): - try: - # Find the only separator that isn't a Windows drive. - separator, = (m for m in re.finditer(rf"(^\w:[/\\])|[:{os.pathsep}]", value) if not m[1]) - except ValueError: - # Split into SRC and DEST failed, wrong syntax - raise argparse.ArgumentError(self, f'Wrong syntax, should be {self.option_strings[0]}=SOURCE:DEST') - src = value[:separator.start()] - dest = value[separator.end():] - if not src or not dest: - # Syntax was correct, but one or both of SRC and DEST was not given - raise argparse.ArgumentError(self, "You have to specify both SOURCE and DEST") - - # argparse is not particularly smart with copy by reference typed defaults. If the current list is the default, - # replace it before modifying it to avoid changing the default. - if getattr(namespace, self.dest) is self.default: - setattr(namespace, self.dest, []) - getattr(namespace, self.dest).append((src, dest)) - - -def make_variable_path(filename, conversions=path_conversions): - if not os.path.isabs(filename): - # os.path.commonpath can not compare relative and absolute paths, and if filename is not absolute, none of the - # paths in conversions will match anyway. - return None, filename - for (from_path, to_name) in conversions: - assert os.path.abspath(from_path) == from_path, ("path '%s' should already be absolute" % from_path) - try: - common_path = os.path.commonpath([filename, from_path]) - except ValueError: - # Per https://docs.python.org/3/library/os.path.html#os.path.commonpath, this raises ValueError in several - # cases which prevent computing a common path. - common_path = None - if common_path == from_path: - rest = filename[len(from_path):] - if rest.startswith(('\\', '/')): - rest = rest[1:] - return to_name, rest - return None, filename - - -def removed_key_option(x): - from PyInstaller.exceptions import RemovedCipherFeatureError - raise RemovedCipherFeatureError("Please remove your --key=xxx argument.") - - -class _RemovedFlagAction(argparse.Action): - def __init__(self, *args, **kwargs): - kwargs["help"] = argparse.SUPPRESS - kwargs["nargs"] = 0 - super().__init__(*args, **kwargs) - - -class _RemovedNoEmbedManifestAction(_RemovedFlagAction): - def __call__(self, *args, **kwargs): - from PyInstaller.exceptions import RemovedExternalManifestError - raise RemovedExternalManifestError("Please remove your --no-embed-manifest argument.") - - -class _RemovedWinPrivateAssembliesAction(_RemovedFlagAction): - def __call__(self, *args, **kwargs): - from PyInstaller.exceptions import RemovedWinSideBySideSupportError - raise RemovedWinSideBySideSupportError("Please remove your --win-private-assemblies argument.") - - -class _RemovedWinNoPreferRedirectsAction(_RemovedFlagAction): - def __call__(self, *args, **kwargs): - from PyInstaller.exceptions import RemovedWinSideBySideSupportError - raise RemovedWinSideBySideSupportError("Please remove your --win-no-prefer-redirects argument.") - - -# An object used in place of a "path string", which knows how to repr() itself using variable names instead of -# hard-coded paths. -class Path: - def __init__(self, *parts): - self.path = os.path.join(*parts) - self.variable_prefix = self.filename_suffix = None - - def __repr__(self): - if self.filename_suffix is None: - self.variable_prefix, self.filename_suffix = make_variable_path(self.path) - if self.variable_prefix is None: - return repr(self.path) - return "os.path.join(" + self.variable_prefix + "," + repr(self.filename_suffix) + ")" - - -# An object used to construct extra preamble for the spec file, in order to accommodate extra collect_*() calls from the -# command-line -class Preamble: - def __init__( - self, datas, binaries, hiddenimports, collect_data, collect_binaries, collect_submodules, collect_all, - copy_metadata, recursive_copy_metadata - ): - # Initialize with literal values - will be switched to preamble variable name later, if necessary - self.binaries = binaries or [] - self.hiddenimports = hiddenimports or [] - self.datas = datas or [] - # Preamble content - self.content = [] - - # Import statements - if collect_data: - self._add_hookutil_import('collect_data_files') - if collect_binaries: - self._add_hookutil_import('collect_dynamic_libs') - if collect_submodules: - self._add_hookutil_import('collect_submodules') - if collect_all: - self._add_hookutil_import('collect_all') - if copy_metadata or recursive_copy_metadata: - self._add_hookutil_import('copy_metadata') - if self.content: - self.content += [''] # empty line to separate the section - # Variables - if collect_data or copy_metadata or collect_all or recursive_copy_metadata: - self._add_var('datas', self.datas) - self.datas = 'datas' # switch to variable - if collect_binaries or collect_all: - self._add_var('binaries', self.binaries) - self.binaries = 'binaries' # switch to variable - if collect_submodules or collect_all: - self._add_var('hiddenimports', self.hiddenimports) - self.hiddenimports = 'hiddenimports' # switch to variable - # Content - collect_data_files - for entry in collect_data: - self._add_collect_data(entry) - # Content - copy_metadata - for entry in copy_metadata: - self._add_copy_metadata(entry) - # Content - copy_metadata(..., recursive=True) - for entry in recursive_copy_metadata: - self._add_recursive_copy_metadata(entry) - # Content - collect_binaries - for entry in collect_binaries: - self._add_collect_binaries(entry) - # Content - collect_submodules - for entry in collect_submodules: - self._add_collect_submodules(entry) - # Content - collect_all - for entry in collect_all: - self._add_collect_all(entry) - # Merge - if self.content and self.content[-1] != '': - self.content += [''] # empty line - self.content = '\n'.join(self.content) - - def _add_hookutil_import(self, name): - self.content += ['from PyInstaller.utils.hooks import {0}'.format(name)] - - def _add_var(self, name, initial_value): - self.content += ['{0} = {1}'.format(name, initial_value)] - - def _add_collect_data(self, name): - self.content += ['datas += collect_data_files(\'{0}\')'.format(name)] - - def _add_copy_metadata(self, name): - self.content += ['datas += copy_metadata(\'{0}\')'.format(name)] - - def _add_recursive_copy_metadata(self, name): - self.content += ['datas += copy_metadata(\'{0}\', recursive=True)'.format(name)] - - def _add_collect_binaries(self, name): - self.content += ['binaries += collect_dynamic_libs(\'{0}\')'.format(name)] - - def _add_collect_submodules(self, name): - self.content += ['hiddenimports += collect_submodules(\'{0}\')'.format(name)] - - def _add_collect_all(self, name): - self.content += [ - 'tmp_ret = collect_all(\'{0}\')'.format(name), - 'datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]' - ] - - -def __add_options(parser): - """ - Add the `Makespec` options to a option-parser instance or a option group. - """ - g = parser.add_argument_group('What to generate') - g.add_argument( - "-D", - "--onedir", - dest="onefile", - action="store_false", - default=None, - help="Create a one-folder bundle containing an executable (default)", - ) - g.add_argument( - "-F", - "--onefile", - dest="onefile", - action="store_true", - default=None, - help="Create a one-file bundled executable.", - ) - g.add_argument( - "--specpath", - metavar="DIR", - help="Folder to store the generated spec file (default: current directory)", - ) - g.add_argument( - "-n", - "--name", - help="Name to assign to the bundled app and spec file (default: first script's basename)", - ) - g.add_argument( - "--contents-directory", - help="For onedir builds only, specify the name of the directory in which all supporting files (i.e. everything " - "except the executable itself) will be placed in. Use \".\" to re-enable old onedir layout without contents " - "directory.", - ) - - g = parser.add_argument_group('What to bundle, where to search') - g.add_argument( - '--add-data', - action=SourceDestAction, - dest='datas', - help="Additional data files or directories containing data files to be added to the application. The argument " - 'value should be in form of "source:dest_dir", where source is the path to file (or directory) to be ' - "collected, dest_dir is the destination directory relative to the top-level application directory, and both " - "paths are separated by a colon (:). To put a file in the top-level application directory, use . as a " - "dest_dir. This option can be used multiple times." - ) - g.add_argument( - '--add-binary', - action=SourceDestAction, - dest="binaries", - help='Additional binary files to be added to the executable. See the ``--add-data`` option for the format. ' - 'This option can be used multiple times.', - ) - g.add_argument( - "-p", - "--paths", - dest="pathex", - metavar="DIR", - action="append", - default=[], - help="A path to search for imports (like using PYTHONPATH). Multiple paths are allowed, separated by ``%s``, " - "or use this option multiple times. Equivalent to supplying the ``pathex`` argument in the spec file." % - repr(os.pathsep), - ) - g.add_argument( - '--hidden-import', - '--hiddenimport', - action='append', - default=[], - metavar="MODULENAME", - dest='hiddenimports', - help='Name an import not visible in the code of the script(s). This option can be used multiple times.', - ) - g.add_argument( - '--collect-submodules', - action="append", - default=[], - metavar="MODULENAME", - dest='collect_submodules', - help='Collect all submodules from the specified package or module. This option can be used multiple times.', - ) - g.add_argument( - '--collect-data', - '--collect-datas', - action="append", - default=[], - metavar="MODULENAME", - dest='collect_data', - help='Collect all data from the specified package or module. This option can be used multiple times.', - ) - g.add_argument( - '--collect-binaries', - action="append", - default=[], - metavar="MODULENAME", - dest='collect_binaries', - help='Collect all binaries from the specified package or module. This option can be used multiple times.', - ) - g.add_argument( - '--collect-all', - action="append", - default=[], - metavar="MODULENAME", - dest='collect_all', - help='Collect all submodules, data files, and binaries from the specified package or module. This option can ' - 'be used multiple times.', - ) - g.add_argument( - '--copy-metadata', - action="append", - default=[], - metavar="PACKAGENAME", - dest='copy_metadata', - help='Copy metadata for the specified package. This option can be used multiple times.', - ) - g.add_argument( - '--recursive-copy-metadata', - action="append", - default=[], - metavar="PACKAGENAME", - dest='recursive_copy_metadata', - help='Copy metadata for the specified package and all its dependencies. This option can be used multiple ' - 'times.', - ) - g.add_argument( - "--additional-hooks-dir", - action="append", - dest="hookspath", - default=[], - help="An additional path to search for hooks. This option can be used multiple times.", - ) - g.add_argument( - '--runtime-hook', - action='append', - dest='runtime_hooks', - default=[], - help='Path to a custom runtime hook file. A runtime hook is code that is bundled with the executable and is ' - 'executed before any other code or module to set up special features of the runtime environment. This option ' - 'can be used multiple times.', - ) - g.add_argument( - '--exclude-module', - dest='excludes', - action='append', - default=[], - help='Optional module or package (the Python name, not the path name) that will be ignored (as though it was ' - 'not found). This option can be used multiple times.', - ) - g.add_argument( - '--key', - dest='key', - help=argparse.SUPPRESS, - type=removed_key_option, - ) - g.add_argument( - '--splash', - dest='splash', - metavar="IMAGE_FILE", - help="(EXPERIMENTAL) Add an splash screen with the image IMAGE_FILE to the application. The splash screen can " - "display progress updates while unpacking.", - ) - - g = parser.add_argument_group('How to generate') - g.add_argument( - "-d", - "--debug", - # If this option is not specified, then its default value is an empty list (no debug options selected). - default=[], - # Note that ``nargs`` is omitted. This produces a single item not stored in a list, as opposed to a list - # containing one item, as per `nargs `_. - nargs=None, - # The options specified must come from this list. - choices=DEBUG_ALL_CHOICE + DEBUG_ARGUMENT_CHOICES, - # Append choice, rather than storing them (which would overwrite any previous selections). - action='append', - # Allow newlines in the help text; see the ``_SmartFormatter`` in ``__main__.py``. - help=( - "R|Provide assistance with debugging a frozen\n" - "application. This argument may be provided multiple\n" - "times to select several of the following options.\n" - "\n" - "- all: All three of the following options.\n" - "\n" - "- imports: specify the -v option to the underlying\n" - " Python interpreter, causing it to print a message\n" - " each time a module is initialized, showing the\n" - " place (filename or built-in module) from which it\n" - " is loaded. See\n" - " https://docs.python.org/3/using/cmdline.html#id4.\n" - "\n" - "- bootloader: tell the bootloader to issue progress\n" - " messages while initializing and starting the\n" - " bundled app. Used to diagnose problems with\n" - " missing imports.\n" - "\n" - "- noarchive: instead of storing all frozen Python\n" - " source files as an archive inside the resulting\n" - " executable, store them as files in the resulting\n" - " output directory.\n" - "\n" - ), - ) - g.add_argument( - '--optimize', - dest='optimize', - metavar='LEVEL', - type=int, - choices={-1, 0, 1, 2}, - default=None, - help='Bytecode optimization level used for collected python modules and scripts. For details, see the section ' - '“Bytecode Optimization Level” in PyInstaller manual.', - ) - g.add_argument( - '--python-option', - dest='python_options', - metavar='PYTHON_OPTION', - action='append', - default=[], - help='Specify a command-line option to pass to the Python interpreter at runtime. Currently supports ' - '"v" (equivalent to "--debug imports"), "u", "W ", "X ", and "hash_seed=". ' - 'For details, see the section "Specifying Python Interpreter Options" in PyInstaller manual.', - ) - g.add_argument( - "-s", - "--strip", - action="store_true", - help="Apply a symbol-table strip to the executable and shared libs (not recommended for Windows)", - ) - g.add_argument( - "--noupx", - action="store_true", - default=False, - help="Do not use UPX even if it is available (works differently between Windows and *nix)", - ) - g.add_argument( - "--upx-exclude", - dest="upx_exclude", - metavar="FILE", - action="append", - help="Prevent a binary from being compressed when using upx. This is typically used if upx corrupts certain " - "binaries during compression. FILE is the filename of the binary without path. This option can be used " - "multiple times.", - ) - - g = parser.add_argument_group('Windows and macOS specific options') - g.add_argument( - "-c", - "--console", - "--nowindowed", - dest="console", - action="store_true", - default=None, - help="Open a console window for standard i/o (default). On Windows this option has no effect if the first " - "script is a '.pyw' file.", - ) - g.add_argument( - "-w", - "--windowed", - "--noconsole", - dest="console", - action="store_false", - default=None, - help="Windows and macOS: do not provide a console window for standard i/o. On macOS this also triggers " - "building a macOS .app bundle. On Windows this option is automatically set if the first script is a '.pyw' " - "file. This option is ignored on *NIX systems.", - ) - g.add_argument( - "--hide-console", - type=str, - choices={'hide-early', 'hide-late', 'minimize-early', 'minimize-late'}, - default=None, - help="Windows only: in console-enabled executable, have bootloader automatically hide or minimize the console " - "window if the program owns the console window (i.e., was not launched from an existing console window).", - ) - g.add_argument( - "-i", - "--icon", - action='append', - dest="icon_file", - metavar='', - help="FILE.ico: apply the icon to a Windows executable. FILE.exe,ID: extract the icon with ID from an exe. " - "FILE.icns: apply the icon to the .app bundle on macOS. If an image file is entered that isn't in the " - "platform format (ico on Windows, icns on Mac), PyInstaller tries to use Pillow to translate the icon into " - "the correct format (if Pillow is installed). Use \"NONE\" to not apply any icon, thereby making the OS show " - "some default (default: apply PyInstaller's icon). This option can be used multiple times.", - ) - g.add_argument( - "--disable-windowed-traceback", - dest="disable_windowed_traceback", - action="store_true", - default=False, - help="Disable traceback dump of unhandled exception in windowed (noconsole) mode (Windows and macOS only), " - "and instead display a message that this feature is disabled.", - ) - - g = parser.add_argument_group('Windows specific options') - g.add_argument( - "--version-file", - dest="version_file", - metavar="FILE", - help="Add a version resource from FILE to the exe.", - ) - g.add_argument( - "--manifest", - metavar="", - help="Add manifest FILE or XML to the exe.", - ) - g.add_argument( - "-m", - dest="shorthand_manifest", - metavar="", - help="Deprecated shorthand for --manifest.", - ) - g.add_argument( - "--no-embed-manifest", - action=_RemovedNoEmbedManifestAction, - ) - g.add_argument( - "-r", - "--resource", - dest="resources", - metavar="RESOURCE", - action="append", - default=[], - help="Add or update a resource to a Windows executable. The RESOURCE is one to four items, " - "FILE[,TYPE[,NAME[,LANGUAGE]]]. FILE can be a data file or an exe/dll. For data files, at least TYPE and NAME " - "must be specified. LANGUAGE defaults to 0 or may be specified as wildcard * to update all resources of the " - "given TYPE and NAME. For exe/dll files, all resources from FILE will be added/updated to the final executable " - "if TYPE, NAME and LANGUAGE are omitted or specified as wildcard *. This option can be used multiple times.", - ) - g.add_argument( - '--uac-admin', - dest='uac_admin', - action="store_true", - default=False, - help="Using this option creates a Manifest that will request elevation upon application start.", - ) - g.add_argument( - '--uac-uiaccess', - dest='uac_uiaccess', - action="store_true", - default=False, - help="Using this option allows an elevated application to work with Remote Desktop.", - ) - - g = parser.add_argument_group('Windows Side-by-side Assembly searching options (advanced)') - g.add_argument( - "--win-private-assemblies", - action=_RemovedWinPrivateAssembliesAction, - ) - g.add_argument( - "--win-no-prefer-redirects", - action=_RemovedWinNoPreferRedirectsAction, - ) - - g = parser.add_argument_group('macOS specific options') - g.add_argument( - "--argv-emulation", - dest="argv_emulation", - action="store_true", - default=False, - help="Enable argv emulation for macOS app bundles. If enabled, the initial open document/URL event is " - "processed by the bootloader and the passed file paths or URLs are appended to sys.argv.", - ) - - g.add_argument( - '--osx-bundle-identifier', - dest='bundle_identifier', - help="macOS .app bundle identifier is used as the default unique program name for code signing purposes. " - "The usual form is a hierarchical name in reverse DNS notation. For example: com.mycompany.department.appname " - "(default: first script's basename)", - ) - - g.add_argument( - '--target-architecture', - '--target-arch', - dest='target_arch', - metavar='ARCH', - default=None, - help="Target architecture (macOS only; valid values: x86_64, arm64, universal2). Enables switching between " - "universal2 and single-arch version of frozen application (provided python installation supports the target " - "architecture). If not target architecture is not specified, the current running architecture is targeted.", - ) - - g.add_argument( - '--codesign-identity', - dest='codesign_identity', - metavar='IDENTITY', - default=None, - help="Code signing identity (macOS only). Use the provided identity to sign collected binaries and generated " - "executable. If signing identity is not provided, ad-hoc signing is performed instead.", - ) - - g.add_argument( - '--osx-entitlements-file', - dest='entitlements_file', - metavar='FILENAME', - default=None, - help="Entitlements file to use when code-signing the collected binaries (macOS only).", - ) - - g = parser.add_argument_group('Rarely used special options') - g.add_argument( - "--runtime-tmpdir", - dest="runtime_tmpdir", - metavar="PATH", - help="Where to extract libraries and support files in `onefile` mode. If this option is given, the bootloader " - "will ignore any temp-folder location defined by the run-time OS. The ``_MEIxxxxxx``-folder will be created " - "here. Please use this option only if you know what you are doing. Note that on POSIX systems, PyInstaller's " - "bootloader does NOT perform shell-style environment variable expansion on the given path string. Therefore, " - "using environment variables (e.g., ``~`` or ``$HOME``) in path will NOT work.", - ) - g.add_argument( - "--bootloader-ignore-signals", - action="store_true", - default=False, - help="Tell the bootloader to ignore signals rather than forwarding them to the child process. Useful in " - "situations where for example a supervisor process signals both the bootloader and the child (e.g., via a " - "process group) to avoid signalling the child twice.", - ) - - -def main( - scripts, - name=None, - onefile=False, - console=True, - debug=[], - python_options=[], - strip=False, - noupx=False, - upx_exclude=None, - runtime_tmpdir=None, - contents_directory=None, - pathex=[], - version_file=None, - specpath=None, - bootloader_ignore_signals=False, - disable_windowed_traceback=False, - datas=[], - binaries=[], - icon_file=None, - manifest=None, - resources=[], - bundle_identifier=None, - hiddenimports=[], - hookspath=[], - runtime_hooks=[], - excludes=[], - uac_admin=False, - uac_uiaccess=False, - collect_submodules=[], - collect_binaries=[], - collect_data=[], - collect_all=[], - copy_metadata=[], - splash=None, - recursive_copy_metadata=[], - target_arch=None, - codesign_identity=None, - entitlements_file=None, - argv_emulation=False, - hide_console=None, - optimize=None, - **_kwargs -): - # Default values for onefile and console when not explicitly specified on command-line (indicated by None) - if onefile is None: - onefile = False - - if console is None: - console = True - - # If appname is not specified - use the basename of the main script as name. - if name is None: - name = os.path.splitext(os.path.basename(scripts[0]))[0] - - # If specpath not specified - use default value - current working directory. - if specpath is None: - specpath = DEFAULT_SPECPATH - else: - # Expand starting tilde into user's home directory, as a work-around for tilde not being expanded by shell when - # using `--specpath=~/path/abc` instead of `--specpath ~/path/abc` (or when the path argument is quoted). - specpath = os.path.expanduser(specpath) - # If cwd is the root directory of PyInstaller, generate the .spec file in ./appname/ subdirectory. - if specpath == HOMEPATH: - specpath = os.path.join(HOMEPATH, name) - # Create directory tree if missing. - if not os.path.exists(specpath): - os.makedirs(specpath) - - # Handle additional EXE options. - exe_options = '' - if version_file: - exe_options += "\n version='%s'," % escape_win_filepath(version_file) - if uac_admin: - exe_options += "\n uac_admin=True," - if uac_uiaccess: - exe_options += "\n uac_uiaccess=True," - if icon_file: - # Icon file for Windows. - # On Windows, the default icon is embedded in the bootloader executable. - if icon_file[0] == 'NONE': - exe_options += "\n icon='NONE'," - else: - exe_options += "\n icon=[%s]," % ','.join("'%s'" % escape_win_filepath(ic) for ic in icon_file) - # Icon file for macOS. - # We need to encapsulate it into apostrofes. - icon_file = "'%s'" % icon_file[0] - else: - # On macOS, the default icon has to be copied into the .app bundle. - # The the text value 'None' means - use default icon. - icon_file = 'None' - if contents_directory: - exe_options += "\n contents_directory='%s'," % (contents_directory or "_internal") - if hide_console: - exe_options += "\n hide_console='%s'," % hide_console - - if bundle_identifier: - # We need to encapsulate it into apostrofes. - bundle_identifier = "'%s'" % bundle_identifier - - if _kwargs["shorthand_manifest"]: - manifest = _kwargs["shorthand_manifest"] - logger.log( - logging.DEPRECATION, "PyInstaller v7 will remove the -m shorthand flag. Please use --manifest=%s instead", - manifest - ) - if manifest: - if "<" in manifest: - # Assume XML string - exe_options += "\n manifest='%s'," % manifest.replace("'", "\\'") - else: - # Assume filename - exe_options += "\n manifest='%s'," % escape_win_filepath(manifest) - if resources: - resources = list(map(escape_win_filepath, resources)) - exe_options += "\n resources=%s," % repr(resources) - - hiddenimports = hiddenimports or [] - upx_exclude = upx_exclude or [] - - if is_darwin and onefile and not console: - from PyInstaller.building.osx import WINDOWED_ONEFILE_DEPRCATION - logger.log(logging.DEPRECATION, WINDOWED_ONEFILE_DEPRCATION) - - # If file extension of the first script is '.pyw', force --windowed option. - if is_win and os.path.splitext(scripts[0])[-1] == '.pyw': - console = False - - # If script paths are relative, make them relative to the directory containing .spec file. - scripts = [make_path_spec_relative(x, specpath) for x in scripts] - # With absolute paths replace prefix with variable HOMEPATH. - scripts = list(map(Path, scripts)) - - # Translate the default of ``debug=None`` to an empty list. - if debug is None: - debug = [] - # Translate the ``all`` option. - if DEBUG_ALL_CHOICE[0] in debug: - debug = DEBUG_ARGUMENT_CHOICES - - # Create preamble (for collect_*() calls) - preamble = Preamble( - datas, binaries, hiddenimports, collect_data, collect_binaries, collect_submodules, collect_all, copy_metadata, - recursive_copy_metadata - ) - - if splash: - splash_init = splashtmpl % {'splash_image': splash} - splash_binaries = "\n splash.binaries," - splash_target = "\n splash," - else: - splash_init = splash_binaries = splash_target = "" - - # Infer byte-code optimization level. - opt_level = sum([opt == 'O' for opt in python_options]) - if opt_level > 2: - logger.warning( - "The switch '--python-option O' has been specified %d times - it should be specified at most twice!", - opt_level, - ) - opt_level = 2 - - if optimize is None: - if opt_level == 0: - # Infer from running python process - optimize = sys.flags.optimize - else: - # Infer from `--python-option O` switch(es). - optimize = opt_level - elif optimize != opt_level and opt_level != 0: - logger.warning( - "Mismatch between optimization level passed via --optimize switch (%d) and number of '--python-option O' " - "switches (%d)!", - optimize, - opt_level, - ) - - if optimize >= 0: - # Ensure OPTIONs passed to bootloader match the optimization settings. - python_options += max(0, optimize - opt_level) * ['O'] - - # Create OPTIONs array - if 'imports' in debug and 'v' not in python_options: - python_options.append('v') - python_options_array = [(opt, None, 'OPTION') for opt in python_options] - - d = { - 'scripts': scripts, - 'pathex': pathex or [], - 'binaries': preamble.binaries, - 'datas': preamble.datas, - 'hiddenimports': preamble.hiddenimports, - 'preamble': preamble.content, - 'name': name, - 'noarchive': 'noarchive' in debug, - 'optimize': optimize, - 'options': python_options_array, - 'debug_bootloader': 'bootloader' in debug, - 'bootloader_ignore_signals': bootloader_ignore_signals, - 'strip': strip, - 'upx': not noupx, - 'upx_exclude': upx_exclude, - 'runtime_tmpdir': runtime_tmpdir, - 'exe_options': exe_options, - # Directory with additional custom import hooks. - 'hookspath': hookspath, - # List with custom runtime hook files. - 'runtime_hooks': runtime_hooks or [], - # List of modules/packages to ignore. - 'excludes': excludes or [], - # only Windows and macOS distinguish windowed and console apps - 'console': console, - 'disable_windowed_traceback': disable_windowed_traceback, - # Icon filename. Only macOS uses this item. - 'icon': icon_file, - # .app bundle identifier. Only macOS uses this item. - 'bundle_identifier': bundle_identifier, - # argv emulation (macOS only) - 'argv_emulation': argv_emulation, - # Target architecture (macOS only) - 'target_arch': target_arch, - # Code signing identity (macOS only) - 'codesign_identity': codesign_identity, - # Entitlements file (macOS only) - 'entitlements_file': entitlements_file, - # splash screen - 'splash_init': splash_init, - 'splash_target': splash_target, - 'splash_binaries': splash_binaries, - } - - # Write down .spec file to filesystem. - specfnm = os.path.join(specpath, name + '.spec') - with open(specfnm, 'w', encoding='utf-8') as specfile: - if onefile: - specfile.write(onefiletmplt % d) - # For macOS create .app bundle. - if is_darwin and not console: - specfile.write(bundleexetmplt % d) - else: - specfile.write(onedirtmplt % d) - # For macOS create .app bundle. - if is_darwin and not console: - specfile.write(bundletmplt % d) - - return specfnm diff --git a/voxvera/vendor/PyInstaller/building/osx.py b/voxvera/vendor/PyInstaller/building/osx.py deleted file mode 100755 index dca5649..0000000 --- a/voxvera/vendor/PyInstaller/building/osx.py +++ /dev/null @@ -1,736 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import os -import pathlib -import plistlib -import shutil -import subprocess - -from PyInstaller import log as logging -from PyInstaller.building.api import COLLECT, EXE -from PyInstaller.building.datastruct import Target, logger, normalize_toc -from PyInstaller.building.utils import _check_path_overlap, _rmtree, process_collected_binary -from PyInstaller.compat import is_darwin, strict_collect_mode -from PyInstaller.building.icon import normalize_icon_type -import PyInstaller.utils.misc as miscutils - -if is_darwin: - import PyInstaller.utils.osx as osxutils - -# Character sequence used to replace dot (`.`) in names of directories that are created in `Contents/MacOS` or -# `Contents/Frameworks`, where only .framework bundle directories are allowed to have dot in name. -DOT_REPLACEMENT = '__dot__' - -WINDOWED_ONEFILE_DEPRCATION = ( - "Onefile mode in combination with macOS .app bundles (windowed mode) don't make sense (a .app bundle can not be a " - "single file) and clashes with macOS's security. Please migrate to onedir mode. This will become an error " - "in v7.0." -) - - -class BUNDLE(Target): - def __init__(self, *args, **kwargs): - from PyInstaller.config import CONF - - for item in args: - if isinstance(item, EXE) and not item.exclude_binaries: - logger.log(logging.DEPRECATION, WINDOWED_ONEFILE_DEPRCATION) - - # BUNDLE only has a sense under macOS, it is a noop on other platforms. - if not is_darwin: - return - - # Get a path to a .icns icon for the app bundle. - self.icon = kwargs.get('icon') - if not self.icon: - # --icon not specified; use the default in the pyinstaller folder - self.icon = os.path.join( - os.path.dirname(os.path.dirname(__file__)), 'bootloader', 'images', 'icon-windowed.icns' - ) - else: - # User gave an --icon=path. If it is relative, make it relative to the spec file location. - if not os.path.isabs(self.icon): - self.icon = os.path.join(CONF['specpath'], self.icon) - - super().__init__() - - # .app bundle is created in DISTPATH. - self.name = kwargs.get('name', None) - base_name = os.path.basename(self.name) - self.name = os.path.join(CONF['distpath'], base_name) - - self.appname = os.path.splitext(base_name)[0] - # Ensure version is a string, even if user accidentally passed an int or a float. - # Having a `CFBundleShortVersionString` entry of non-string type in `Info.plist` causes the .app bundle to - # crash at start (#4466). - self.version = str(kwargs.get("version", "0.0.0")) - self.toc = [] - self.strip = False - self.upx = False - self.console = True - self.target_arch = None - self.codesign_identity = None - self.entitlements_file = None - - # .app bundle identifier for Code Signing - self.bundle_identifier = kwargs.get('bundle_identifier') - if not self.bundle_identifier: - # Fallback to appname. - self.bundle_identifier = self.appname - - self.info_plist = kwargs.get('info_plist', None) - - for arg in args: - # Valid arguments: EXE object, COLLECT object, and TOC-like iterables - if isinstance(arg, EXE): - # Add EXE as an entry to the TOC, and merge its dependencies TOC - self.toc.append((os.path.basename(arg.name), arg.name, 'EXECUTABLE')) - self.toc.extend(arg.dependencies) - # Inherit settings - self.strip = arg.strip - self.upx = arg.upx - self.upx_exclude = arg.upx_exclude - self.console = arg.console - self.target_arch = arg.target_arch - self.codesign_identity = arg.codesign_identity - self.entitlements_file = arg.entitlements_file - elif isinstance(arg, COLLECT): - # Merge the TOC - self.toc.extend(arg.toc) - # Inherit settings - self.strip = arg.strip_binaries - self.upx = arg.upx_binaries - self.upx_exclude = arg.upx_exclude - self.console = arg.console - self.target_arch = arg.target_arch - self.codesign_identity = arg.codesign_identity - self.entitlements_file = arg.entitlements_file - elif miscutils.is_iterable(arg): - # TOC-like iterable - self.toc.extend(arg) - else: - raise TypeError(f"Invalid argument type for BUNDLE: {type(arg)!r}") - - # Infer the executable name from the first EXECUTABLE entry in the TOC; it might have come from the COLLECT - # (as opposed to the stand-alone EXE). - for dest_name, src_name, typecode in self.toc: - if typecode == "EXECUTABLE": - self.exename = src_name - break - else: - raise ValueError("No EXECUTABLE entry found in the TOC!") - - # Normalize TOC - self.toc = normalize_toc(self.toc) - - self.__postinit__() - - _GUTS = ( - # BUNDLE always builds, just want the toc to be written out - ('toc', None), - ) - - def _check_guts(self, data, last_build): - # BUNDLE always needs to be executed, in order to clean the output directory. - return True - - # Helper for determining whether the given file belongs to a .framework bundle or not. If it does, it returns - # the path to the top-level .framework bundle directory; otherwise, returns None. In case of nested .framework - # bundles, the path to the top-most .framework bundle directory is returned. - @staticmethod - def _is_framework_file(dest_path): - # NOTE: reverse the parents list because we are looking for the top-most .framework bundle directory! - for parent in reversed(dest_path.parents): - if parent.name.endswith('.framework'): - return parent - return None - - # Helper that computes relative cross-link path between link's location and target, assuming they are both - # rooted in the `Contents` directory of a macOS .app bundle. - @staticmethod - def _compute_relative_crosslink(crosslink_location, crosslink_target): - # We could take symlink_location and symlink_target as they are (relative to parent of the `Contents` - # directory), but that would introduce an unnecessary `../Contents` part. So instead, we take both paths - # relative to the `Contents` directory. - return os.path.join( - *['..' for level in pathlib.PurePath(crosslink_location).relative_to('Contents').parent.parts], - pathlib.PurePath(crosslink_target).relative_to('Contents'), - ) - - # This method takes the original (input) TOC and processes it into final TOC, based on which the `assemble` method - # performs its file collection. The TOC processing here represents the core of our efforts to generate an .app - # bundle that is compatible with Apple's code-signing requirements. - # - # For in-depth details on the code-signing, see Apple's `Technical Note TN2206: macOS Code Signing In Depth` at - # https://developer.apple.com/library/archive/technotes/tn2206/_index.html - # - # The requirements, framed from PyInstaller's perspective, can be summarized as follows: - # - # 1. The `Contents/MacOS` directory is expected to contain only the program executable and (binary) code (= dylibs - # and nested .framework bundles). Alternatively, the dylibs and .framework bundles can be also placed into - # `Contents/Frameworks` directory (where same rules apply as for `Contents/MacOS`, so the remainder of this - # text refers to the two inter-changeably, unless explicitly noted otherwise). The code in `Contents/MacOS` - # is expected to be signed, and the `codesign` utility will recursively sign all found code when using `--deep` - # option to sign the .app bundle. - # - # 2. All non-code files should be be placed in `Contents/Resources`, so they become sealed (data) resources; - # i.e., their signature data is recorded in `Contents/_CodeSignature/CodeResources`. (As a side note, - # it seems that signature information for data/resources in `Contents/Resources` is kept nder `file` key in - # the `CodeResources` file, while the information for contents in `Contents/MacOS` is kept under `file2` key). - # - # 3. The directories in `Contents/MacOS` may not contain dots (`.`) in their names, except for the nested - # .framework bundle directories. The directories in `Contents/Resources` have no such restrictions. - # - # 4. There may not be any content in the top level of a bundle. In other words, if a bundle has a `Contents` - # or a `Versions` directory at its top level, there may be no other files or directories alongside them. The - # sole exception is that alongside `Versions`, there may be symlinks to files and directories in - # `Versions/Current`. This rule is important for nested .framework bundles that we collect from python packages. - # - # Next, let us consider the consequences of violating each of the above requirements: - # - # 1. Code signing machinery can directly store signature only in Mach-O binaries and nested .framework bundles; if - # a data file is placed in `Contents/MacOS`, the signature is stored in the file's extended attributes. If the - # extended attributes are lost, the program's signature will be broken. Many file transfer techniques (e.g., a - # zip file) do not preserve extended attributes, nor are they preserved when uploading to the Mac App Store. - # - # 2. Putting code (a dylib or a .framework bundle) into `Contents/Resources` causes it to be treated as a resource; - # the outer signature (i.e., of the whole .app bundle) does not know that this nested content is actually a code. - # Consequently, signing the bundle with `codesign --deep` will NOT sign binaries placed in the - # `Contents/Resources`, which may result in missing signatures when .app bundle is verified for notarization. - # This might be worked around by signing each binary separately, and then signing the whole bundle (without the - # `--deep` option), but requires the user to keep track of the offending binaries. - # - # 3. If a directory in `Contents/MacOS` contains a dot in the name, code-signing the bundle fails with - # `bundle format unrecognized, invalid, or unsuitable` due to code signing machinery treating directory as a - # nested .framework bundle directory. - # - # 4. If nested .framework bundle is malformed, the signing of the .app bundle might succeed, but subsequent - # verification will fail, for example with `embedded framework contains modified or invalid version` (as observed - # with .framework bundles shipped by contemporary PyQt/PySide PyPI wheels). - # - # The above requirements are unfortunately often at odds with the structure of python packages: - # - # * In general, python packages are mixed-content directories, where binaries and data files may be expected to - # be found next to each other. - # - # For example, `opencv-python` provides a custom loader script that requires the package to be collected in the - # source-only form by PyInstaller (i.e., the python modules and scripts collected as source .py files). At the - # same time, it expects the .py loader script to be able to find the binary extension next to itself. - # - # Another example of mixed-mode directories are Qt QML components' sub-directories, which contain both the - # component's plugin (a binary) and associated meta files (data files). - # - # * In python world, the directories often contain dots in their names. - # - # Dots are often used for private directories containing binaries that are shipped with a package. For example, - # `numpy/.dylibs`, `scipy/.dylibs`, etc. - # - # Qt QML components may also contain a dot in their name; couple of examples from `PySide2` package: - # `PySide2/Qt/qml/QtQuick.2`, `PySide2/Qt/qml/QtQuick/Controls.2`, `PySide2/Qt/qml/QtQuick/Particles.2`, etc. - # - # The packages' metadata directories also invariably contain dots in the name due to version (for example, - # `numpy-1.24.3.dist-info`). - # - # In the light of all above, PyInstaller attempts to strictly place all files to their mandated location - # (`Contents/MacOS` or `Contents/Frameworks` vs `Contents/Resources`). To preserve the illusion of mixed-content - # directories, the content is cross-linked from one directory to the other. Specifically: - # - # * All entries with DATA typecode are assumed to be data files, and are always placed in corresponding directory - # structure rooted in `Contents/Resources`. - # - # * All entries with BINARY or EXTENSION typecode are always placed in corresponding directory structure rooted in - # `Contents/Frameworks`. - # - # * All entries with EXECUTABLE are placed in `Contents/MacOS` directory. - # - # * For the purposes of relocation, nested .framework bundles are treated as a single BINARY entity; i.e., the - # whole .bundle directory is placed in corresponding directory structure rooted in `Contents/Frameworks` (even - # though some of its contents, such as `Info.plist` file, are actually data files). - # - # * Top-level data files and binaries are always cross-linked to the other directory. For example, given a data file - # `data_file.txt` that was collected into `Contents/Resources`, we create a symbolic link called - # `Contents/MacOS/data_file.txt` that points to `../Resources/data_file.txt`. - # - # * The executable itself, while placed in `Contents/MacOS`, are cross-linked into both `Contents/Framworks` and - # `Contents/Resources`. - # - # * The stand-alone PKG entries (used with onefile builds that side-load the PKG archive) are treated as data files - # and collected into `Contents/Resources`, but cross-linked only into `Contents/MacOS` directory (because they - # must appear to be next to the program executable). This is the only entry type that is cross-linked into the - # `Contents/MacOS` directory and also the only data-like entry type that is not cross-linked into the - # `Contents/Frameworks` directory. - # - # * For files in sub-directories, the cross-linking behavior depends on the type of directory: - # - # * A data-only directory is created in directory structure rooted in `Contents/Resources`, and cross-linked - # into directory structure rooted in `Contents/Frameworks` at directory level (i.e., we link the whole - # directory instead of individual files). - # - # This largely saves us from having to deal with dots in the names of collected metadata directories, which - # are examples of data-only directories. - # - # * A binary-only directory is created in directory structure rooted in `Contents/Frameworks`, and cross-linked - # into `Contents/Resources` at directory level. - # - # * A mixed-content directory is created in both directory structures. Files are placed into corresponding - # directory structure based on their type, and cross-linked into other directory structure at file level. - # - # * This rule is applied recursively; for example, a data-only sub-directory in a mixed-content directory is - # cross-linked at directory level, while adjacent binary and data files are cross-linked at file level. - # - # * To work around the issue with dots in the names of directories in `Contents/Frameworks` (applicable to - # binary-only or mixed-content directories), such directories are created with modified name (the dot replaced - # with a pre-defined pattern). Next to the modified directory, a symbolic link with original name is created, - # pointing to the directory with modified name. With mixed-content directories, this modification is performed - # only on the `Contents/Frameworks` side; the corresponding directory in `Contents/Resources` can be created - # directly, without name modification and symbolic link. - # - # * If a symbolic link needs to be created in a mixed-content directory due to a SYMLINK entry from the original - # TOC (i.e., a "collected" symlink originating from analysis, as opposed to the cross-linking mechanism described - # above), the link is created in both directory structures, each pointing to the resource in its corresponding - # directory structure (with one such resource being an actual file, and the other being a cross-link to the file). - # - # Final remarks: - # - # NOTE: the relocation mechanism is codified by tests in `tests/functional/test_macos_bundle_structure.py`. - # - # NOTE: by placing binaries and nested .framework entries into `Contents/Frameworks` instead of `Contents/MacOS`, - # we have effectively relocated the `sys._MEIPASS` directory from the `Contents/MacOS` (= the parent directory of - # the program executable) into `Contents/Frameworks`. This requires the PyInstaller's bootloader to detect that it - # is running in the app-bundle mode (e.g., by checking if program executable's parent directory is `Contents/NacOS`) - # and adjust the path accordingly. - # - # NOTE: the implemented relocation mechanism depends on the input TOC containing properly classified entries - # w.r.t. BINARY vs DATA. So hooks and .spec files triggering collection of binaries as datas (and vice versa) will - # result in incorrect placement of those files in the generated .app bundle. However, this is *not* the proper place - # to address such issues; if necessary, automatic (re)classification should be added to analysis process, to ensure - # that BUNDLE (as well as other build targets) receive correctly classified TOC. - # - # NOTE: similar to the previous note, the relocation mechanism is also not the proper place to enforce compliant - # structure of the nested .framework bundles. Instead, this is handled by the analysis process, using the - # `PyInstaller.utils.osx.collect_files_from_framework_bundles` helper function. So the input TOC that BUNDLE - # receives should already contain entries that reconstruct compliant nested .framework bundles. - def _process_bundle_toc(self, toc): - bundle_toc = [] - - # Step 1: inspect the directory layout and classify the directories according to their contents. - directory_types = dict() - - _MIXED_DIR_TYPE = 'MIXED-DIR' - _DATA_DIR_TYPE = 'DATA-DIR' - _BINARY_DIR_TYPE = 'BINARY-DIR' - _FRAMEWORK_DIR_TYPE = 'FRAMEWORK-DIR' - - _TOP_LEVEL_DIR = pathlib.PurePath('.') - - for dest_name, src_name, typecode in toc: - dest_path = pathlib.PurePath(dest_name) - - framework_dir = self._is_framework_file(dest_path) - if framework_dir: - # Mark the framework directory as FRAMEWORK-DIR. - directory_types[framework_dir] = _FRAMEWORK_DIR_TYPE - # Treat the framework directory as BINARY file when classifying parent directories. - typecode = 'BINARY' - parent_dirs = framework_dir.parents - else: - parent_dirs = dest_path.parents - # Treat BINARY and EXTENSION as BINARY to simplify further processing. - if typecode == 'EXTENSION': - typecode = 'BINARY' - - # (Re)classify parent directories - for parent_dir in parent_dirs: - # Skip the top-level `.` dir. This is also the only directory that can contain EXECUTABLE and PKG - # entries, so we do not have to worry about. - if parent_dir == _TOP_LEVEL_DIR: - continue - - directory_type = _BINARY_DIR_TYPE if typecode == 'BINARY' else _DATA_DIR_TYPE # default - directory_type = directory_types.get(parent_dir, directory_type) - - if directory_type == _DATA_DIR_TYPE and typecode == 'BINARY': - directory_type = _MIXED_DIR_TYPE - if directory_type == _BINARY_DIR_TYPE and typecode == 'DATA': - directory_type = _MIXED_DIR_TYPE - - directory_types[parent_dir] = directory_type - - logger.debug("Directory classification: %r", directory_types) - - # Step 2: process the obtained directory structure and create symlink entries for directories that need to be - # cross-linked. Such directories are data-only and binary-only directories (and framework directories) that are - # located either in the top-level directory (have no parent) or in a mixed-content directory. - for directory_path, directory_type in directory_types.items(): - # Cross-linking at directory level applies only to data-only and binary-only directories (as well as - # framework directories). - if directory_type == _MIXED_DIR_TYPE: - continue - - # The parent needs to be either top-level directory or a mixed-content directory. Otherwise, the parent - # (or one of its ancestors) will get cross-linked, and we do not need the link here. - parent_dir = directory_path.parent - requires_crosslink = parent_dir == _TOP_LEVEL_DIR or directory_types.get(parent_dir) == _MIXED_DIR_TYPE - if not requires_crosslink: - continue - - logger.debug("Cross-linking directory %r of type %r", directory_path, directory_type) - - # Data-only directories are created in `Contents/Resources`, needs to be cross-linked into `Contents/MacOS`. - # Vice versa for binary-only or framework directories. The directory creation is handled implicitly, when we - # create parent directory structure for collected files. - if directory_type == _DATA_DIR_TYPE: - symlink_src = os.path.join('Contents/Resources', directory_path) - symlink_dest = os.path.join('Contents/Frameworks', directory_path) - else: - symlink_src = os.path.join('Contents/Frameworks', directory_path) - symlink_dest = os.path.join('Contents/Resources', directory_path) - symlink_ref = self._compute_relative_crosslink(symlink_dest, symlink_src) - - bundle_toc.append((symlink_dest, symlink_ref, 'SYMLINK')) - - # Step 3: first part of the work-around for directories that are located in `Contents/Frameworks` but contain a - # dot in their name. As per `codesign` rules, the only directories in `Contents/Frameworks` that are allowed to - # contain a dot in their name are .framework bundle directories. So we replace the dot with a custom character - # sequence (stored in global `DOT_REPLACEMENT` variable), and create a symbolic with original name pointing to - # the modified name. This is the best we can do with code-sign requirements vs. python community showing their - # packages' dylibs into `.dylib` subdirectories, or Qt storing their Qml components in directories named - # `QtQuick.2`, `QtQuick/Controls.2`, `QtQuick/Particles.2`, `QtQuick/Templates.2`, etc. - # - # In this step, we only prepare symlink entries that link the original directory name (with dot) to the modified - # one (with dot replaced). The parent paths for collected files are modified in later step(s). - for directory_path, directory_type in directory_types.items(): - # .framework bundle directories contain a dot in the name, but are allowed that. - if directory_type == _FRAMEWORK_DIR_TYPE: - continue - - # Data-only directories are fully located in `Contents/Resources` and cross-linked to `Contents/Frameworks` - # at directory level, so they are also allowed a dot in their name. - if directory_type == _DATA_DIR_TYPE: - continue - - # Apply the work-around, if necessary... - if '.' not in directory_path.name: - continue - - logger.debug( - "Creating symlink to work around the dot in the name of directory %r (%s)...", str(directory_path), - directory_type - ) - - # Create a SYMLINK entry, but only for this level. In case of nested directories with dots in names, the - # symlinks for ancestors will be created by corresponding loop iteration. - bundle_toc.append(( - os.path.join('Contents/Frameworks', directory_path), - directory_path.name.replace('.', DOT_REPLACEMENT), - 'SYMLINK', - )) - - # Step 4: process the entries for collected files, and decide whether they should be placed into - # `Contents/MacOS`, `Contents/Frameworks`, or `Contents/Resources`, and whether they should be cross-linked into - # other directories. - for orig_dest_name, src_name, typecode in toc: - orig_dest_path = pathlib.PurePath(orig_dest_name) - - # Special handling for EXECUTABLE and PKG entries - if typecode == 'EXECUTABLE': - # Place into `Contents/MacOS`, ... - file_dest = os.path.join('Contents/MacOS', orig_dest_name) - bundle_toc.append((file_dest, src_name, typecode)) - # ... and do nothing else. We explicitly avoid cross-linking the executable to `Contents/Frameworks` and - # `Contents/Resources`, because it should be not necessary (the executable's location should be - # discovered via `sys.executable`) and to prevent issues when executable name collides with name of a - # package from which we collect either binaries or data files (or both); see #7314. - continue - elif typecode == 'PKG': - # Place into `Contents/Resources` ... - file_dest = os.path.join('Contents/Resources', orig_dest_name) - bundle_toc.append((file_dest, src_name, typecode)) - # ... and cross-link only into `Contents/MacOS`. - # This is used only in `onefile` mode, where there is actually no other content to distribute among the - # `Contents/Resources` and `Contents/Frameworks` directories, so cross-linking into the latter makes - # little sense. - symlink_dest = os.path.join('Contents/MacOS', orig_dest_name) - symlink_ref = self._compute_relative_crosslink(symlink_dest, file_dest) - bundle_toc.append((symlink_dest, symlink_ref, 'SYMLINK')) - continue - - # Standard data vs binary processing... - - # Determine file location based on its type. - if self._is_framework_file(orig_dest_path): - # File from a framework bundle; put into `Contents/Frameworks`, but never cross-link the file itself. - # The whole .framework bundle directory will be linked as necessary by the directory cross-linking - # mechanism. - file_base_dir = 'Contents/Frameworks' - crosslink_base_dir = None - elif typecode == 'DATA': - # Data file; relocate to `Contents/Resources` and cross-link it back into `Contents/Frameworks`. - file_base_dir = 'Contents/Resources' - crosslink_base_dir = 'Contents/Frameworks' - else: - # Binary; put into `Contents/Frameworks` and cross-link it into `Contents/Resources`. - file_base_dir = 'Contents/Frameworks' - crosslink_base_dir = 'Contents/Resources' - - # Determine if we need to cross-link the file. We need to do this for top-level files (the ones without - # parent directories), and for files whose parent directories are mixed-content directories. - requires_crosslink = False - if crosslink_base_dir is not None: - parent_dir = orig_dest_path.parent - requires_crosslink = parent_dir == _TOP_LEVEL_DIR or directory_types.get(parent_dir) == _MIXED_DIR_TYPE - - # Special handling for SYMLINK entries in original TOC; if we need to cross-link a symlink entry, we create - # it in both locations, and have each point to the (relative) resource in the same directory (so one of the - # targets will likely be a file, and the other will be a symlink due to cross-linking). - if typecode == 'SYMLINK' and requires_crosslink: - bundle_toc.append((os.path.join(file_base_dir, orig_dest_name), src_name, typecode)) - bundle_toc.append((os.path.join(crosslink_base_dir, orig_dest_name), src_name, typecode)) - continue - - # The file itself. - file_dest = os.path.join(file_base_dir, orig_dest_name) - bundle_toc.append((file_dest, src_name, typecode)) - - # Symlink for cross-linking - if requires_crosslink: - symlink_dest = os.path.join(crosslink_base_dir, orig_dest_name) - symlink_ref = self._compute_relative_crosslink(symlink_dest, file_dest) - bundle_toc.append((symlink_dest, symlink_ref, 'SYMLINK')) - - # Step 5: sanitize all destination paths in the new TOC, to ensure that paths that are rooted in - # `Contents/Frameworks` do not contain directories with dots in their names. Doing this as a post-processing - # step keeps code simple and clean and ensures that this step is applied to files, symlinks that originate from - # cross-linking files, and symlinks that originate from cross-linking directories. This in turn ensures that - # all directory hierarchies created during the actual file collection have sanitized names, and that collection - # outcome does not depend on the order of entries in the TOC. - sanitized_toc = [] - for dest_name, src_name, typecode in bundle_toc: - dest_path = pathlib.PurePath(dest_name) - - # Paths rooted in Contents/Resources do not require sanitizing. - if dest_path.parts[0] == 'Contents' and dest_path.parts[1] == 'Resources': - sanitized_toc.append((dest_name, src_name, typecode)) - continue - - # Special handling for files from .framework bundle directories; sanitize only parent path of the .framework - # directory. - framework_path = self._is_framework_file(dest_path) - if framework_path: - parent_path = framework_path.parent - remaining_path = dest_path.relative_to(parent_path) - else: - parent_path = dest_path.parent - remaining_path = dest_path.name - - sanitized_dest_path = pathlib.PurePath( - *parent_path.parts[:2], # Contents/Frameworks - *[part.replace('.', DOT_REPLACEMENT) for part in parent_path.parts[2:]], - remaining_path, - ) - sanitized_dest_name = str(sanitized_dest_path) - - if sanitized_dest_path != dest_path: - logger.debug("Sanitizing dest path: %r -> %r", dest_name, sanitized_dest_name) - - sanitized_toc.append((sanitized_dest_name, src_name, typecode)) - - bundle_toc = sanitized_toc - - # Normalize and sort the TOC for easier inspection - bundle_toc = sorted(normalize_toc(bundle_toc)) - - return bundle_toc - - def assemble(self): - from PyInstaller.config import CONF - - if _check_path_overlap(self.name) and os.path.isdir(self.name): - _rmtree(self.name) - - logger.info("Building BUNDLE %s", self.tocbasename) - - # Create a minimal Mac bundle structure. - os.makedirs(os.path.join(self.name, "Contents", "MacOS")) - os.makedirs(os.path.join(self.name, "Contents", "Resources")) - os.makedirs(os.path.join(self.name, "Contents", "Frameworks")) - - # Makes sure the icon exists and attempts to convert to the proper format if applicable - self.icon = normalize_icon_type(self.icon, ("icns",), "icns", CONF["workpath"]) - - # Ensure icon path is absolute - self.icon = os.path.abspath(self.icon) - - # Copy icns icon to Resources directory. - shutil.copyfile(self.icon, os.path.join(self.name, 'Contents', 'Resources', os.path.basename(self.icon))) - - # Key/values for a minimal Info.plist file - info_plist_dict = { - "CFBundleDisplayName": self.appname, - "CFBundleName": self.appname, - - # Required by 'codesign' utility. - # The value for CFBundleIdentifier is used as the default unique name of your program for Code Signing - # purposes. It even identifies the APP for access to restricted macOS areas like Keychain. - # - # The identifier used for signing must be globally unique. The usual form for this identifier is a - # hierarchical name in reverse DNS notation, starting with the toplevel domain, followed by the company - # name, followed by the department within the company, and ending with the product name. Usually in the - # form: com.mycompany.department.appname - # CLI option --osx-bundle-identifier sets this value. - "CFBundleIdentifier": self.bundle_identifier, - "CFBundleExecutable": os.path.basename(self.exename), - "CFBundleIconFile": os.path.basename(self.icon), - "CFBundleInfoDictionaryVersion": "6.0", - "CFBundlePackageType": "APPL", - "CFBundleShortVersionString": self.version, - } - - # Set some default values. But they still can be overwritten by the user. - if self.console: - # Setting EXE console=True implies LSBackgroundOnly=True. - info_plist_dict['LSBackgroundOnly'] = True - else: - # Let's use high resolution by default. - info_plist_dict['NSHighResolutionCapable'] = True - - # Merge info_plist settings from spec file - if isinstance(self.info_plist, dict) and self.info_plist: - info_plist_dict.update(self.info_plist) - - plist_filename = os.path.join(self.name, "Contents", "Info.plist") - with open(plist_filename, "wb") as plist_fh: - plistlib.dump(info_plist_dict, plist_fh) - - # Pre-process the TOC into its final BUNDLE-compatible form. - bundle_toc = self._process_bundle_toc(self.toc) - - # Perform the actual collection. - CONTENTS_FRAMEWORKS_PATH = pathlib.PurePath('Contents/Frameworks') - for dest_name, src_name, typecode in bundle_toc: - # Create parent directory structure, if necessary - dest_path = os.path.join(self.name, dest_name) # Absolute destination path - dest_dir = os.path.dirname(dest_path) - try: - os.makedirs(dest_dir, exist_ok=True) - except FileExistsError: - raise SystemExit( - f"ERROR: Pyinstaller needs to create a directory at {dest_dir!r}, " - "but there already exists a file at that path!" - ) - # Copy extensions and binaries from cache. This ensures that these files undergo additional binary - # processing - have paths to linked libraries rewritten (relative to `@rpath`) and have rpath set to the - # top-level directory (relative to `@loader_path`, i.e., the file's location). The "top-level" directory - # in this case corresponds to `Contents/MacOS` (where `sys._MEIPASS` also points), so we need to pass - # the cache retrieval function the *original* destination path (which is without preceding - # `Contents/MacOS`). - if typecode in ('EXTENSION', 'BINARY'): - orig_dest_name = str(pathlib.PurePath(dest_name).relative_to(CONTENTS_FRAMEWORKS_PATH)) - src_name = process_collected_binary( - src_name, - orig_dest_name, - use_strip=self.strip, - use_upx=self.upx, - upx_exclude=self.upx_exclude, - target_arch=self.target_arch, - codesign_identity=self.codesign_identity, - entitlements_file=self.entitlements_file, - strict_arch_validation=(typecode == 'EXTENSION'), - ) - if typecode == 'SYMLINK': - os.symlink(src_name, dest_path) # Create link at dest_path, pointing at (relative) src_name - else: - # BUNDLE does not support MERGE-based multipackage - assert typecode != 'DEPENDENCY', "MERGE DEPENDENCY entries are not supported in BUNDLE!" - - # At this point, `src_name` should be a valid file. - if not os.path.isfile(src_name): - raise ValueError(f"Resource {src_name!r} is not a valid file!") - # If strict collection mode is enabled, the destination should not exist yet. - if strict_collect_mode and os.path.exists(dest_path): - raise ValueError( - f"Attempting to collect a duplicated file into BUNDLE: {dest_name} (type: {typecode})" - ) - # Use `shutil.copyfile` to copy file with default permissions. We do not attempt to preserve original - # permissions nor metadata, as they might be too restrictive and cause issues either during subsequent - # re-build attempts or when trying to move the application bundle. For binaries (and data files with - # executable bit set), we manually set the executable bits after copying the file. - shutil.copyfile(src_name, dest_path) - if ( - typecode in ('EXTENSION', 'BINARY', 'EXECUTABLE') - or (typecode == 'DATA' and os.access(src_name, os.X_OK)) - ): - os.chmod(dest_path, 0o755) - - # Sign the bundle - logger.info('Signing the BUNDLE...') - try: - osxutils.sign_binary(self.name, self.codesign_identity, self.entitlements_file, deep=True) - except Exception as e: - # Display a warning or re-raise the error, depending on the environment-variable setting. - if os.environ.get("PYINSTALLER_STRICT_BUNDLE_CODESIGN_ERROR", "0") == "0": - logger.warning("Error while signing the bundle: %s", e) - logger.warning("You will need to sign the bundle manually!") - else: - raise RuntimeError("Failed to codesign the bundle!") from e - - logger.info("Building BUNDLE %s completed successfully.", self.tocbasename) - - # Optionally verify bundle's signature. This is primarily intended for our CI. - if os.environ.get("PYINSTALLER_VERIFY_BUNDLE_SIGNATURE", "0") != "0": - logger.info("Verifying signature for BUNDLE %s...", self.name) - self.verify_bundle_signature(self.name) - logger.info("BUNDLE verification complete!") - - @staticmethod - def verify_bundle_signature(bundle_dir): - # First, verify the bundle signature using codesign. - cmd_args = ['/usr/bin/codesign', '--verify', '--all-architectures', '--deep', '--strict', bundle_dir] - p = subprocess.run(cmd_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf8') - if p.returncode: - raise SystemError( - f"codesign command ({cmd_args}) failed with error code {p.returncode}!\noutput: {p.stdout}" - ) - - # Ensure that code-signing information is *NOT* embedded in the files' extended attributes. - # - # This happens when files other than binaries are present in `Contents/MacOS` or `Contents/Frameworks` - # directory; as the signature cannot be embedded within the file itself (contrary to binaries with - # `LC_CODE_SIGNATURE` section in their header), it ends up stores in the file's extended attributes. However, - # if such bundle is transferred using a method that does not support extended attributes (for example, a zip - # file), the signatures on these files are lost, and the signature of the bundle as a whole becomes invalid. - # This is the primary reason why we need to relocate non-binaries into `Contents/Resources` - the signatures - # for files in that directory end up stored in `Contents/_CodeSignature/CodeResources` file. - # - # This check therefore aims to ensure that all files have been properly relocated to their corresponding - # locations w.r.t. the code-signing requirements. - - try: - import xattr - except ModuleNotFoundError: - logger.info("xattr package not available; skipping verification of extended attributes!") - return - - CODESIGN_ATTRS = ( - "com.apple.cs.CodeDirectory", - "com.apple.cs.CodeRequirements", - "com.apple.cs.CodeRequirements-1", - "com.apple.cs.CodeSignature", - ) - - for entry in pathlib.Path(bundle_dir).rglob("*"): - if not entry.is_file(): - continue - - file_attrs = xattr.listxattr(entry) - if any([codesign_attr in file_attrs for codesign_attr in CODESIGN_ATTRS]): - raise ValueError(f"Code-sign attributes found in extended attributes of {str(entry)!r}!") diff --git a/voxvera/vendor/PyInstaller/building/splash.py b/voxvera/vendor/PyInstaller/building/splash.py deleted file mode 100755 index 3b7fe8c..0000000 --- a/voxvera/vendor/PyInstaller/building/splash.py +++ /dev/null @@ -1,486 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ----------------------------------------------------------------------------- -import io -import os -import re -import struct -import pathlib - -from PyInstaller import log as logging -from PyInstaller.archive.writers import SplashWriter -from PyInstaller.building import splash_templates -from PyInstaller.building.datastruct import Target -from PyInstaller.building.utils import _check_guts_eq, _check_guts_toc, misc -from PyInstaller.compat import is_aix, is_darwin -from PyInstaller.depend import bindepend - -logger = logging.getLogger(__name__) - - -class Splash(Target): - """ - Bundles the required resources for the splash screen into a file, which will be included in the CArchive. - - A Splash has two outputs, one is itself and one is stored in splash.binaries. Both need to be passed to other - build targets in order to enable the splash screen. - """ - def __init__(self, image_file, binaries, datas, **kwargs): - """ - :param str image_file: - A path-like object to the image to be used. Only the PNG file format is supported. - - .. note:: If a different file format is supplied and PIL (Pillow) is installed, the file will be converted - automatically. - - .. note:: *Windows*: The color ``'magenta'`` / ``'#ff00ff'`` must not be used in the image or text, as it is - used by splash screen to indicate transparent areas. Use a similar color (e.g., ``'#ff00fe'``) instead. - - .. note:: If PIL (Pillow) is installed and the image is bigger than max_img_size, the image will be resized - to fit into the specified area. - :param list binaries: - The TOC list of binaries the Analysis build target found. This TOC includes all extension modules and their - binary dependencies. This is required to determine whether the user's program uses `tkinter`. - :param list datas: - The TOC list of data the Analysis build target found. This TOC includes all data-file dependencies of the - modules. This is required to check if all splash screen requirements can be bundled. - - :keyword text_pos: - An optional two-integer tuple that represents the origin of the text on the splash screen image. The - origin of the text is its lower left corner. A unit in the respective coordinate system is a pixel of the - image, its origin lies in the top left corner of the image. This parameter also acts like a switch for - the text feature. If omitted, no text will be displayed on the splash screen. This text will be used to - show textual progress in onefile mode. - :type text_pos: Tuple[int, int] - :keyword text_size: - The desired size of the font. If the size argument is a positive number, it is interpreted as a size in - points. If size is a negative number, its absolute value is interpreted as a size in pixels. Default: ``12`` - :type text_size: int - :keyword text_font: - An optional name of a font for the text. This font must be installed on the user system, otherwise the - system default font is used. If this parameter is omitted, the default font is also used. - :keyword text_color: - An optional color for the text. HTML color codes (``'#40e0d0'``) and color names (``'turquoise'``) are - supported. Default: ``'black'`` - (Windows: the color ``'magenta'`` / ``'#ff00ff'`` is used to indicate transparency, and should not be used) - :type text_color: str - :keyword text_default: - The default text which will be displayed before the extraction starts. Default: ``"Initializing"`` - :type text_default: str - :keyword full_tk: - By default Splash bundles only the necessary files for the splash screen (some tk components). This - options enables adding full tk and making it a requirement, meaning all tk files will be unpacked before - the splash screen can be started. This is useful during development of the splash screen script. - Default: ``False`` - :type full_tk: bool - :keyword minify_script: - The splash screen is created by executing an Tcl/Tk script. This option enables minimizing the script, - meaning removing all non essential parts from the script. Default: ``True`` - :keyword name: - An optional alternative filename for the .res file. If not specified, a name is generated. - :type name: str - :keyword script_name: - An optional alternative filename for the Tcl script, that will be generated. If not specified, a name is - generated. - :type script_name: str - :keyword max_img_size: - Maximum size of the splash screen image as a tuple. If the supplied image exceeds this limit, it will be - resized to fit the maximum width (to keep the original aspect ratio). This option can be disabled by - setting it to None. Default: ``(760, 480)`` - :type max_img_size: Tuple[int, int] - :keyword always_on_top: - Force the splashscreen to be always on top of other windows. If disabled, other windows (e.g., from other - applications) can cover the splash screen by user bringing them to front. This might be useful for - frozen applications with long startup times. Default: ``True`` - :type always_on_top: bool - """ - from PyInstaller.config import CONF - from PyInstaller.utils.hooks.tcl_tk import tcltk_info - - Target.__init__(self) - - # Splash screen is not supported on macOS. It operates in a secondary thread and macOS disallows UI operations - # in any thread other than main. - if is_darwin: - raise SystemExit("ERROR: Splash screen is not supported on macOS.") - - # Ensure tkinter (and thus Tcl/Tk) is available. - if not tcltk_info.available: - raise SystemExit( - "ERROR: Your platform does not support the splash screen feature, since tkinter is not installed. " - "Please install tkinter and try again." - ) - - # Check if the Tcl/Tk version is supported. - logger.info("Verifying Tcl/Tk compatibility with splash screen requirements") - self._check_tcl_tk_compatibility(tcltk_info) - - # Make image path relative to .spec file - if not os.path.isabs(image_file): - image_file = os.path.join(CONF['specpath'], image_file) - image_file = os.path.normpath(image_file) - if not os.path.exists(image_file): - raise ValueError("Image file '%s' not found" % image_file) - - # Copy all arguments - self.image_file = image_file - self.full_tk = kwargs.get("full_tk", False) - self.name = kwargs.get("name", None) - self.script_name = kwargs.get("script_name", None) - self.minify_script = kwargs.get("minify_script", True) - self.max_img_size = kwargs.get("max_img_size", (760, 480)) - - # text options - self.text_pos = kwargs.get("text_pos", None) - self.text_size = kwargs.get("text_size", 12) - self.text_font = kwargs.get("text_font", "TkDefaultFont") - self.text_color = kwargs.get("text_color", "black") - self.text_default = kwargs.get("text_default", "Initializing") - - # always-on-top behavior - self.always_on_top = kwargs.get("always_on_top", True) - - # Save the generated file separately so that it is not necessary to generate the data again and again - root = os.path.splitext(self.tocfilename)[0] - if self.name is None: - self.name = root + '.res' - if self.script_name is None: - self.script_name = root + '_script.tcl' - - # Internal variables - # Store path to _tkinter extension module, so that guts check can detect if the path changed for some reason. - self._tkinter_file = tcltk_info.tkinter_extension_file - - # Calculated / analysed values - self.uses_tkinter = self._uses_tkinter(self._tkinter_file, binaries) - logger.debug("Program uses tkinter: %r", self.uses_tkinter) - self.script = self.generate_script() - self.tcl_lib = tcltk_info.tcl_shared_library # full path to shared library - self.tk_lib = tcltk_info.tk_shared_library - - assert self.tcl_lib is not None - assert self.tk_lib is not None - - logger.debug("Using Tcl shared library: %r", self.tcl_lib) - logger.debug("Using Tk shared library: %r", self.tk_lib) - - self.splash_requirements = set([ - # NOTE: the implicit assumption here is that Tcl and Tk shared library are collected into top-level - # application directory, which, at tme moment, is true in practically all cases. - os.path.basename(self.tcl_lib), - os.path.basename(self.tk_lib), - # The list of requirements below is based on the current implementation of splash screen script. If you want - # to extend the splash screen functionality and run into Tcl/Tk errors, chances are that additional Tk - # components need to be added here. - # - # NOTE: these paths use the *destination* layout for Tcl/Tk scripts, which uses unversioned tcl and tk - # directories (see `PyInstaller.utils.hooks.tcl_tk.collect_tcl_tk_files`). - os.path.join(tcltk_info.TCL_ROOTNAME, "init.tcl"), - # Core Tk - os.path.join(tcltk_info.TK_ROOTNAME, "license.terms"), - os.path.join(tcltk_info.TK_ROOTNAME, "text.tcl"), - os.path.join(tcltk_info.TK_ROOTNAME, "tk.tcl"), - # Used for customizable font - os.path.join(tcltk_info.TK_ROOTNAME, "ttk", "ttk.tcl"), - os.path.join(tcltk_info.TK_ROOTNAME, "ttk", "fonts.tcl"), - os.path.join(tcltk_info.TK_ROOTNAME, "ttk", "cursors.tcl"), - os.path.join(tcltk_info.TK_ROOTNAME, "ttk", "utils.tcl"), - ]) - - if tcltk_info.tk_version >= (9, 0): - self.splash_requirements.update([ - os.path.join(tcltk_info.TK_ROOTNAME, "scaling.tcl"), - os.path.join(tcltk_info.TK_ROOTNAME, "tclIndex"), # required for auto-load of scaling.tcl - ]) - - logger.info("Collect Tcl/Tk data files for the splash screen") - tcltk_tree = tcltk_info.data_files # 3-element tuple TOC - if self.full_tk: - # The user wants a full copy of Tk, so make all Tk files a requirement. - self.splash_requirements.update(entry[0] for entry in tcltk_tree) - - # Scan for binary dependencies of the Tcl/Tk shared libraries, and add them to `binaries` TOC list (which - # should really be called `dependencies` as it is not limited to binaries. But it is too late now, and - # existing spec files depend on this naming). We specify these binary dependencies (which include the - # Tcl and Tk shared libraries themselves) even if the user's program uses tkinter and they would be collected - # anyway; let the collection mechanism deal with potential duplicates. - tcltk_libs = [(os.path.basename(src_name), src_name, 'BINARY') for src_name in (self.tcl_lib, self.tk_lib)] - self.binaries = bindepend.binary_dependency_analysis(tcltk_libs) - - # Put all shared library dependencies in `splash_requirements`, so they are made available in onefile mode. - self.splash_requirements.update(entry[0] for entry in self.binaries) - - # If the user's program does not use tkinter, add resources from Tcl/Tk tree to the dependencies list. - # Do so only for the resources that are part of splash requirements. - if not self.uses_tkinter: - self.binaries.extend(entry for entry in tcltk_tree if entry[0] in self.splash_requirements) - - # Check if all requirements were found. - collected_files = set(entry[0] for entry in (binaries + datas + self.binaries)) - - def _filter_requirement(filename): - if filename not in collected_files: - # Item is not bundled, so warn the user about it. This actually may happen on some tkinter installations - # that are missing the license.terms file - as this file has no effect on operation of splash screen, - # suppress the warning for it. - if os.path.basename(filename) == 'license.terms': - return False - - logger.warning( - "The local Tcl/Tk installation is missing the file %s. The behavior of the splash screen is " - "therefore undefined and may be unsupported.", filename - ) - return False - return True - - # Remove all files which were not found. - self.splash_requirements = set(filter(_filter_requirement, self.splash_requirements)) - - logger.debug("Splash Requirements: %s", self.splash_requirements) - - # On AIX, the Tcl and Tk shared libraries might in fact be ar archives with shared object inside it, and need to - # be `dlopen`'ed with full name (for example, `libtcl.a(libtcl.so.8.6)` and `libtk.a(libtk.so.8.6)`. So if the - # library's suffix is .a, adjust the name accordingly, assuming fixed format for the shared object name. - # Adjust the names at the end of this method, because preceding steps use `self.tcl_lib` and `self.tk_lib` for - # filesystem-based operations and need the original filenames. - if is_aix: - _, ext = os.path.splitext(self.tcl_lib) - if ext == '.a': - tcl_major, tcl_minor = tcltk_info.tcl_version - self.tcl_lib += f"(libtcl.so.{tcl_major}.{tcl_minor})" - _, ext = os.path.splitext(self.tk_lib) - if ext == '.a': - tk_major, tk_minor = tcltk_info.tk_version - self.tk_lib += f"(libtk.so.{tk_major}.{tk_minor})" - - self.__postinit__() - - _GUTS = ( - # input parameters - ('image_file', _check_guts_eq), - ('name', _check_guts_eq), - ('script_name', _check_guts_eq), - ('text_pos', _check_guts_eq), - ('text_size', _check_guts_eq), - ('text_font', _check_guts_eq), - ('text_color', _check_guts_eq), - ('text_default', _check_guts_eq), - ('always_on_top', _check_guts_eq), - ('full_tk', _check_guts_eq), - ('minify_script', _check_guts_eq), - ('max_img_size', _check_guts_eq), - # calculated/analysed values - ('uses_tkinter', _check_guts_eq), - ('script', _check_guts_eq), - ('tcl_lib', _check_guts_eq), - ('tk_lib', _check_guts_eq), - ('splash_requirements', _check_guts_eq), - ('binaries', _check_guts_toc), - # internal value - # Check if the tkinter installation changed. This is theoretically possible if someone uses two different python - # installations of the same version. - ('_tkinter_file', _check_guts_eq), - ) - - def _check_guts(self, data, last_build): - if Target._check_guts(self, data, last_build): - return True - - # Check if the image has been modified. - if misc.mtime(self.image_file) > last_build: - logger.info("Building %s because file %s changed", self.tocbasename, self.image_file) - return True - - return False - - def assemble(self): - logger.info("Building Splash %s", self.name) - - # Check if PIL/pillow is available. - try: - from PIL import Image as PILImage - except ImportError: - PILImage = None - - # Required to pass tcltk_info.TK_ROOTNAME to SplashWriter - from PyInstaller.utils.hooks.tcl_tk import tcltk_info - - # Function to resize a given image to fit into the area defined by max_img_size. - def _resize_image(_image, _orig_size): - if PILImage: - _w, _h = _orig_size - _ratio_w = self.max_img_size[0] / _w - if _ratio_w < 1: - # Image width exceeds limit - _h = int(_h * _ratio_w) - _w = self.max_img_size[0] - - _ratio_h = self.max_img_size[1] / _h - if _ratio_h < 1: - # Image height exceeds limit - _w = int(_w * _ratio_h) - _h = self.max_img_size[1] - - # If a file is given it will be open - if isinstance(_image, PILImage.Image): - _img = _image - else: - _img = PILImage.open(_image) - _img_resized = _img.resize((_w, _h)) - - # Save image into a stream - _image_stream = io.BytesIO() - _img_resized.save(_image_stream, format='PNG') - _img.close() - _img_resized.close() - _image_data = _image_stream.getvalue() - logger.info("Resized image %s from dimensions %r to (%d, %d)", self.image_file, _orig_size, _w, _h) - return _image_data - else: - raise ValueError( - "The splash image dimensions (w: %d, h: %d) exceed max_img_size (w: %d, h:%d), but the image " - "cannot be resized due to missing PIL.Image! Either install the Pillow package, adjust the " - "max_img_size, or use an image of compatible dimensions." % - (_orig_size[0], _orig_size[1], self.max_img_size[0], self.max_img_size[1]) - ) - - # Open image file - image_file = open(self.image_file, 'rb') - - # Check header of the file to identify it - if image_file.read(8) == b'\x89PNG\r\n\x1a\n': - # self.image_file is a PNG file - image_file.seek(16) - img_size = (struct.unpack("!I", image_file.read(4))[0], struct.unpack("!I", image_file.read(4))[0]) - - if img_size > self.max_img_size: - # The image exceeds the maximum image size, so resize it - image = _resize_image(self.image_file, img_size) - else: - image = os.path.abspath(self.image_file) - elif PILImage: - # Pillow is installed, meaning the image can be converted automatically - img = PILImage.open(self.image_file, mode='r') - - if img.size > self.max_img_size: - image = _resize_image(img, img.size) - else: - image_data = io.BytesIO() - img.save(image_data, format='PNG') - img.close() - image = image_data.getvalue() - logger.info("Converted image %s to PNG format", self.image_file) - else: - raise ValueError( - "The image %s needs to be converted to a PNG file, but PIL.Image is not available! Either install the " - "Pillow package, or use a PNG image for you splash screen." % (self.image_file,) - ) - - image_file.close() - - SplashWriter( - self.name, - self.splash_requirements, - os.path.basename(self.tcl_lib), # tcl86t.dll - os.path.basename(self.tk_lib), # tk86t.dll - tcltk_info.TCL_ROOTNAME, - tcltk_info.TK_ROOTNAME, - image, - self.script - ) - - @staticmethod - def _check_tcl_tk_compatibility(tcltk_info): - tcl_version = tcltk_info.tcl_version # (major, minor) tuple - tk_version = tcltk_info.tk_version - - if is_darwin and tcltk_info.is_macos_system_framework: - # Outdated Tcl/Tk 8.5 system framework is not supported. - raise SystemExit( - "ERROR: The splash screen feature does not support macOS system framework version of Tcl/Tk." - ) - - # Test if tcl/tk version is supported - if tcl_version < (8, 6) or tk_version < (8, 6): - logger.warning( - "The installed Tcl/Tk (%d.%d / %d.%d) version might not work with the splash screen feature of the " - "bootloader, which was tested against Tcl/Tk 8.6", *tcl_version, *tk_version - ) - - # This should be impossible, since tcl/tk is released together with the same version number, but just in case - if tcl_version != tk_version: - logger.warning( - "The installed version of Tcl (%d.%d) and Tk (%d.%d) do not match. PyInstaller is tested against " - "matching versions", *tcl_version, *tk_version - ) - - # Ensure that Tcl is built with multi-threading support. - if not tcltk_info.tcl_threaded: - # This is a feature breaking problem, so exit. - raise SystemExit( - "ERROR: The installed Tcl version is not threaded. PyInstaller only supports the splash screen " - "using threaded Tcl." - ) - - # Ensure that Tcl and Tk shared libraries are available - if tcltk_info.tcl_shared_library is None or tcltk_info.tk_shared_library is None: - message = \ - "ERROR: Could not determine the path to Tcl and/or Tk shared library, " \ - "which are required for splash screen." - if not tcltk_info.tkinter_extension_file: - message += ( - " The _tkinter module appears to be a built-in, which likely means that python was built with " - "statically-linked Tcl/Tk libraries and is incompatible with splash screen." - ) - raise SystemExit(message) - - def generate_script(self): - """ - Generate the script for the splash screen. - - If minify_script is True, all unnecessary parts will be removed. - """ - d = {} - if self.text_pos is not None: - logger.debug("Add text support to splash screen") - d.update({ - 'pad_x': self.text_pos[0], - 'pad_y': self.text_pos[1], - 'color': self.text_color, - 'font': self.text_font, - 'font_size': self.text_size, - 'default_text': self.text_default, - }) - script = splash_templates.build_script(text_options=d, always_on_top=self.always_on_top) - - if self.minify_script: - # Remove any documentation, empty lines and unnecessary spaces - script = '\n'.join( - line for line in map(lambda line: line.strip(), script.splitlines()) - if not line.startswith('#') # documentation - and line # empty lines - ) - # Remove unnecessary spaces - script = re.sub(' +', ' ', script) - - # Write script to disk, so that it is transparent to the user what script is executed. - with open(self.script_name, "w", encoding="utf-8") as script_file: - script_file.write(script) - return script - - @staticmethod - def _uses_tkinter(tkinter_file, binaries): - # Test for _tkinter extension instead of tkinter module, because user might use a different wrapping library for - # Tk. Use `pathlib.PurePath` in comparisons to account for case normalization and separator normalization. - tkinter_file = pathlib.PurePath(tkinter_file) - for dest_name, src_name, typecode in binaries: - if pathlib.PurePath(src_name) == tkinter_file: - return True - return False diff --git a/voxvera/vendor/PyInstaller/building/splash_templates.py b/voxvera/vendor/PyInstaller/building/splash_templates.py deleted file mode 100755 index afa068e..0000000 --- a/voxvera/vendor/PyInstaller/building/splash_templates.py +++ /dev/null @@ -1,229 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ----------------------------------------------------------------------------- -""" -Templates for the splash screen tcl script. -""" -from PyInstaller.compat import is_cygwin, is_darwin, is_win - -ipc_script = r""" -proc _ipc_server {channel clientaddr clientport} { - # This function is called if a new client connects to - # the server. This creates a channel, which calls - # _ipc_caller if data was send through the connection - set client_name [format <%s:%d> $clientaddr $clientport] - - chan configure $channel \ - -buffering none \ - -encoding utf-8 \ - -eofchar \x04 \ - -translation cr - chan event $channel readable [list _ipc_caller $channel $client_name] -} - -proc _ipc_caller {channel client_name} { - # This function is called if a command was sent through - # the tcp connection. The current implementation supports - # two commands: update_text and exit, although exit - # is implemented to be called if the connection gets - # closed (from python) or the character 0x04 was received - chan gets $channel cmd - - if {[chan eof $channel]} { - # This is entered if either the connection was closed - # or the char 0x04 was send - chan close $channel - exit - - } elseif {![chan blocked $channel]} { - # RPC methods - - # update_text command - if {[string match "update_text*" $cmd]} { - global status_text - set first [expr {[string first "(" $cmd] + 1}] - set last [expr {[string last ")" $cmd] - 1}] - - set status_text [string range $cmd $first $last] - } - # Implement other procedures here - } -} - -# By setting the port to 0 the os will assign a free port -set server_socket [socket -server _ipc_server -myaddr localhost 0] -set server_port [fconfigure $server_socket -sockname] - -# This environment variable is shared between the python and the tcl -# interpreter and publishes the port the tcp server socket is available -set env(_PYI_SPLASH_IPC) [lindex $server_port 2] -""" - -image_script = r""" -# The variable $_image_data, which holds the data for the splash -# image is created by the bootloader. -image create photo splash_image -splash_image put $_image_data -# delete the variable, because the image now holds the data -unset _image_data - -proc canvas_text_update {canvas tag _var - -} { - # This function is rigged to be called if the a variable - # status_text gets changed. This updates the text on - # the canvas - upvar $_var var - $canvas itemconfigure $tag -text $var -} -""" - -splash_canvas_setup = r""" -package require Tk - -set image_width [image width splash_image] -set image_height [image height splash_image] -set display_width [winfo screenwidth .] -set display_height [winfo screenheight .] - -set x_position [expr {int(0.5*($display_width - $image_width))}] -set y_position [expr {int(0.5*($display_height - $image_height))}] - -# Toplevel frame in which all widgets should be positioned -frame .root - -# Configure the canvas on which the splash -# screen will be drawn -canvas .root.canvas \ - -width $image_width \ - -height $image_height \ - -borderwidth 0 \ - -highlightthickness 0 - -# Draw the image into the canvas, filling it. -.root.canvas create image \ - [expr {$image_width / 2}] \ - [expr {$image_height / 2}] \ - -image splash_image -""" - -splash_canvas_text = r""" -# Create a text on the canvas, which tracks the local -# variable status_text. status_text is changed via C to -# update the progress on the splash screen. -# We cannot use the default label, because it has a -# default background, which cannot be turned transparent -.root.canvas create text \ - %(pad_x)d \ - %(pad_y)d \ - -fill %(color)s \ - -justify center \ - -font myFont \ - -tag vartext \ - -anchor sw -trace add variable status_text write \ - [list canvas_text_update .root.canvas vartext] -set status_text "%(default_text)s" -""" - -splash_canvas_default_font = r""" -font create myFont {*}[font actual TkDefaultFont] -font configure myFont -size %(font_size)d -""" - -splash_canvas_custom_font = r""" -font create myFont -family %(font)s -size %(font_size)d -""" - -if is_win or is_cygwin: - transparent_setup = r""" -# If the image is transparent, the background will be filled -# with magenta. The magenta background is later replaced with transparency. -# Here is the limitation of this implementation, that only -# sharp transparent image corners are possible -wm attributes . -transparentcolor magenta -.root.canvas configure -background magenta -""" - -elif is_darwin: - # This is untested, but should work following: https://stackoverflow.com/a/44296157/5869139 - transparent_setup = r""" -wm attributes . -transparent 1 -. configure -background systemTransparent -.root.canvas configure -background systemTransparent -""" - -else: - # For Linux there is no common way to create a transparent window - transparent_setup = r"" - -pack_widgets = r""" -# Position all widgets in the window -pack .root -grid .root.canvas -column 0 -row 0 -columnspan 1 -rowspan 2 -""" - -# Enable always-on-top behavior, by setting overrideredirect and the topmost attribute. -position_window_on_top = r""" -# Set position and mode of the window - always-on-top behavior -wm overrideredirect . 1 -wm geometry . +${x_position}+${y_position} -wm attributes . -topmost 1 -""" - -# Disable always-on-top behavior -if is_win or is_cygwin or is_darwin: - # On Windows, we disable the always-on-top behavior while still setting overrideredirect - # (to disable window decorations), but set topmost attribute to 0. - position_window = r""" -# Set position and mode of the window -wm overrideredirect . 1 -wm geometry . +${x_position}+${y_position} -wm attributes . -topmost 0 -""" -else: - # On Linux, we must not use overrideredirect; instead, we set X11-specific type attribute to splash, - # which lets the window manager to properly handle the splash screen (without window decorations - # but allowing other windows to be brought to front). - position_window = r""" -# Set position and mode of the window -wm geometry . +${x_position}+${y_position} -wm attributes . -type splash -""" - -raise_window = r""" -raise . -""" - - -def build_script(text_options=None, always_on_top=False): - """ - This function builds the tcl script for the splash screen. - """ - # Order is important! - script = [ - ipc_script, - image_script, - splash_canvas_setup, - ] - - if text_options: - # If the default font is used we need a different syntax - if text_options['font'] == "TkDefaultFont": - script.append(splash_canvas_default_font % text_options) - else: - script.append(splash_canvas_custom_font % text_options) - script.append(splash_canvas_text % text_options) - - script.append(transparent_setup) - - script.append(pack_widgets) - script.append(position_window_on_top if always_on_top else position_window) - script.append(raise_window) - - return '\n'.join(script) diff --git a/voxvera/vendor/PyInstaller/building/templates.py b/voxvera/vendor/PyInstaller/building/templates.py deleted file mode 100755 index 24e5080..0000000 --- a/voxvera/vendor/PyInstaller/building/templates.py +++ /dev/null @@ -1,126 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Templates to generate .spec files. -""" - -onefiletmplt = """# -*- mode: python ; coding: utf-8 -*- -%(preamble)s - -a = Analysis( - %(scripts)s, - pathex=%(pathex)s, - binaries=%(binaries)s, - datas=%(datas)s, - hiddenimports=%(hiddenimports)s, - hookspath=%(hookspath)r, - hooksconfig={}, - runtime_hooks=%(runtime_hooks)r, - excludes=%(excludes)s, - noarchive=%(noarchive)s, - optimize=%(optimize)r, -) -pyz = PYZ(a.pure) -%(splash_init)s -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.datas,%(splash_target)s%(splash_binaries)s - %(options)s, - name='%(name)s', - debug=%(debug_bootloader)s, - bootloader_ignore_signals=%(bootloader_ignore_signals)s, - strip=%(strip)s, - upx=%(upx)s, - upx_exclude=%(upx_exclude)s, - runtime_tmpdir=%(runtime_tmpdir)r, - console=%(console)s, - disable_windowed_traceback=%(disable_windowed_traceback)s, - argv_emulation=%(argv_emulation)r, - target_arch=%(target_arch)r, - codesign_identity=%(codesign_identity)r, - entitlements_file=%(entitlements_file)r,%(exe_options)s -) -""" - -onedirtmplt = """# -*- mode: python ; coding: utf-8 -*- -%(preamble)s - -a = Analysis( - %(scripts)s, - pathex=%(pathex)s, - binaries=%(binaries)s, - datas=%(datas)s, - hiddenimports=%(hiddenimports)s, - hookspath=%(hookspath)r, - hooksconfig={}, - runtime_hooks=%(runtime_hooks)r, - excludes=%(excludes)s, - noarchive=%(noarchive)s, - optimize=%(optimize)r, -) -pyz = PYZ(a.pure) -%(splash_init)s -exe = EXE( - pyz, - a.scripts,%(splash_target)s - %(options)s, - exclude_binaries=True, - name='%(name)s', - debug=%(debug_bootloader)s, - bootloader_ignore_signals=%(bootloader_ignore_signals)s, - strip=%(strip)s, - upx=%(upx)s, - console=%(console)s, - disable_windowed_traceback=%(disable_windowed_traceback)s, - argv_emulation=%(argv_emulation)r, - target_arch=%(target_arch)r, - codesign_identity=%(codesign_identity)r, - entitlements_file=%(entitlements_file)r,%(exe_options)s -) -coll = COLLECT( - exe, - a.binaries, - a.datas,%(splash_binaries)s - strip=%(strip)s, - upx=%(upx)s, - upx_exclude=%(upx_exclude)s, - name='%(name)s', -) -""" - -bundleexetmplt = """app = BUNDLE( - exe, - name='%(name)s.app', - icon=%(icon)s, - bundle_identifier=%(bundle_identifier)s, -) -""" - -bundletmplt = """app = BUNDLE( - coll, - name='%(name)s.app', - icon=%(icon)s, - bundle_identifier=%(bundle_identifier)s, -) -""" - -splashtmpl = """splash = Splash( - %(splash_image)r, - binaries=a.binaries, - datas=a.datas, - text_pos=None, - text_size=12, - minify_script=True, - always_on_top=True, -) -""" diff --git a/voxvera/vendor/PyInstaller/building/utils.py b/voxvera/vendor/PyInstaller/building/utils.py deleted file mode 100755 index da195f2..0000000 --- a/voxvera/vendor/PyInstaller/building/utils.py +++ /dev/null @@ -1,846 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import fnmatch -import glob -import hashlib -import io -import marshal -import os -import pathlib -import platform -import shutil -import struct -import subprocess -import sys -import types -import zipfile - -from PyInstaller import compat -from PyInstaller import log as logging -from PyInstaller.compat import is_aix, is_darwin, is_win, is_linux -from PyInstaller.exceptions import InvalidSrcDestTupleError -from PyInstaller.utils import misc - -if is_win: - from PyInstaller.utils.win32 import versioninfo - -if is_darwin: - import PyInstaller.utils.osx as osxutils - -logger = logging.getLogger(__name__) - -# -- Helpers for checking guts. -# -# NOTE: by _GUTS it is meant intermediate files and data structures that PyInstaller creates for bundling files and -# creating final executable. - - -def _check_guts_eq(attr_name, old_value, new_value, last_build): - """ - Rebuild is required if values differ. - """ - if old_value != new_value: - logger.info("Building because %s changed", attr_name) - return True - return False - - -def _check_guts_toc_mtime(attr_name, old_toc, new_toc, last_build): - """ - Rebuild is required if mtimes of files listed in old TOC are newer than last_build. - - Use this for calculated/analysed values read from cache. - """ - for dest_name, src_name, typecode in old_toc: - if misc.mtime(src_name) > last_build: - logger.info("Building because %s changed", src_name) - return True - return False - - -def _check_guts_toc(attr_name, old_toc, new_toc, last_build): - """ - Rebuild is required if either TOC content changed or mtimes of files listed in old TOC are newer than last_build. - - Use this for input parameters. - """ - return _check_guts_eq(attr_name, old_toc, new_toc, last_build) or \ - _check_guts_toc_mtime(attr_name, old_toc, new_toc, last_build) - - -def destination_name_for_extension(module_name, src_name, typecode): - """ - Take a TOC entry (dest_name, src_name, typecode) and determine the full destination name for the extension. - """ - - assert typecode == 'EXTENSION' - - # The `module_name` should be the extension's importable module name, such as `psutil._psutil_linux` or - # `numpy._core._multiarray_umath`. Reconstruct the directory structure from parent package name(s), if any. - dest_elements = module_name.split('.') - - # We have the base name of the extension file (the last element in the module name), but we do not know the - # full extension suffix. We can take that from source name; for simplicity, replace the whole base name part. - src_path = pathlib.Path(src_name) - dest_elements[-1] = src_path.name - - # Extensions that originate from python's python3.x/lib-dynload directory should be diverted into - # python3.x/lib-dynload destination directory instead of being collected into top-level application directory. - # See #5604 for original motivation (using just lib-dynload), and #9204 for extension (using python3.x/lib-dynload). - if src_path.parent.name == 'lib-dynload': - python_dir = f'python{sys.version_info.major}.{sys.version_info.minor}' - if src_path.parent.parent.name == python_dir: - dest_elements = [python_dir, 'lib-dynload', *dest_elements] - - return os.path.join(*dest_elements) - - -def process_collected_binary( - src_name, - dest_name, - use_strip=False, - use_upx=False, - upx_exclude=None, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - strict_arch_validation=False -): - """ - Process the collected binary using strip or UPX (or both), and apply any platform-specific processing. On macOS, - this rewrites the library paths in the headers, and (re-)signs the binary. On-disk cache is used to avoid processing - the same binary with same options over and over. - - In addition to given arguments, this function also uses CONF['cachedir'] and CONF['upx_dir']. - """ - from PyInstaller.config import CONF - - # We need to use cache in the following scenarios: - # * extra binary processing due to use of `strip` or `upx` - # * building on macOS, where we need to rewrite library paths in binaries' headers and (re-)sign the binaries. - if not use_strip and not use_upx and not is_darwin: - return src_name - - # Match against provided UPX exclude patterns. - upx_exclude = upx_exclude or [] - if use_upx: - src_path = pathlib.PurePath(src_name) - for upx_exclude_entry in upx_exclude: - # pathlib.PurePath.match() matches from right to left, and supports * wildcard, but does not support the - # "**" syntax for directory recursion. Case sensitivity follows the OS default. - if src_path.match(upx_exclude_entry): - logger.info("Disabling UPX for %s due to match in exclude pattern: %s", src_name, upx_exclude_entry) - use_upx = False - break - - # Additional automatic disablement rules for UPX and strip. - - # On Windows, avoid using UPX with binaries that have control flow guard (CFG) enabled. - if use_upx and is_win and versioninfo.pefile_check_control_flow_guard(src_name): - logger.info('Disabling UPX for %s due to CFG!', src_name) - use_upx = False - - # Avoid using UPX with Qt plugins, as it strips the data required by the Qt plugin loader. - if use_upx and misc.is_file_qt_plugin(src_name): - logger.info('Disabling UPX for %s due to it being a Qt plugin!', src_name) - use_upx = False - - # On linux, if a binary has an accompanying HMAC or CHK file, avoid modifying it in any way. - if (use_upx or use_strip) and is_linux: - src_path = pathlib.Path(src_name) - hmac_path = src_path.with_name(f".{src_path.name}.hmac") - chk_path = src_path.with_suffix(".chk") - if hmac_path.is_file(): - logger.info('Disabling UPX and/or strip for %s due to accompanying .hmac file!', src_name) - use_upx = use_strip = False - elif chk_path.is_file(): - logger.info('Disabling UPX and/or strip for %s due to accompanying .chk file!', src_name) - use_upx = use_strip = False - del src_path, hmac_path, chk_path - - # Exit early if no processing is required after above rules are applied. - if not use_strip and not use_upx and not is_darwin: - return src_name - - # Prepare cache directory path. Cache is tied to python major/minor version, but also to various processing options. - pyver = f'py{sys.version_info[0]}{sys.version_info[1]}' - arch = platform.architecture()[0] - cache_dir = os.path.join( - CONF['cachedir'], - f'bincache{use_strip:d}{use_upx:d}{pyver}{arch}', - ) - if target_arch: - cache_dir = os.path.join(cache_dir, target_arch) - if is_darwin: - # Separate by codesign identity - if codesign_identity: - # Compute hex digest of codesign identity string to prevent issues with invalid characters. - csi_hash = hashlib.sha256(codesign_identity.encode('utf-8')) - cache_dir = os.path.join(cache_dir, csi_hash.hexdigest()) - else: - cache_dir = os.path.join(cache_dir, 'adhoc') # ad-hoc signing - # Separate by entitlements - if entitlements_file: - # Compute hex digest of entitlements file contents - with open(entitlements_file, 'rb') as fp: - ef_hash = hashlib.sha256(fp.read()) - cache_dir = os.path.join(cache_dir, ef_hash.hexdigest()) - else: - cache_dir = os.path.join(cache_dir, 'no-entitlements') - os.makedirs(cache_dir, exist_ok=True) - - # Load cache index, if available - cache_index_file = os.path.join(cache_dir, "index.dat") - try: - cache_index = misc.load_py_data_struct(cache_index_file) - except FileNotFoundError: - cache_index = {} - except Exception: - # Tell the user they may want to fix their cache... However, do not delete it for them; if it keeps getting - # corrupted, we will never find out. - logger.warning("PyInstaller bincache may be corrupted; use pyinstaller --clean to fix it.") - raise - - # Look up the file in cache; use case-normalized destination name as identifier. - cached_id = os.path.normcase(dest_name) - cached_name = os.path.join(cache_dir, dest_name) - src_digest = _compute_file_digest(src_name) - - if cached_id in cache_index: - # If digest matches to the cached digest, return the cached file... - if src_digest == cache_index[cached_id]: - return cached_name - - # ... otherwise remove it. - os.remove(cached_name) - - # Ensure parent path exists - os.makedirs(os.path.dirname(cached_name), exist_ok=True) - - # Use `shutil.copyfile` to copy the file with default permissions bits, then manually set executable - # bits. This way, we avoid copying permission bits and metadata from the original file, which might be too - # restrictive for further processing (read-only permissions, immutable flag on FreeBSD, and so on). - shutil.copyfile(src_name, cached_name) - os.chmod(cached_name, 0o755) - - # Apply strip - if use_strip: - strip_options = [] - if is_darwin: - # The default strip behavior breaks some shared libraries under macOS. - strip_options = ["-S"] # -S = strip only debug symbols. - elif is_aix: - # Set -X32_64 flag to have strip transparently process both 32-bit and 64-bit binaries, without user having - # to set OBJECT_MODE environment variable prior to the build. Also accommodates potential mixed-case - # scenario, for example a 32-bit utility program being collected into a 64-bit application bundle. - strip_options = ["-X32_64"] - - cmd = ["strip", *strip_options, cached_name] - logger.info("Executing: %s", " ".join(cmd)) - try: - p = subprocess.run( - cmd, - stdin=subprocess.DEVNULL, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - check=True, - errors='ignore', - encoding='utf-8', - ) - logger.debug("Output from strip command:\n%s", p.stdout) - except subprocess.CalledProcessError as e: - show_warning = True - - # On AIX, strip utility raises an error when ran against already-stripped binary. Catch the corresponding - # message (`0654-419 The specified archive file was already stripped.`) and suppress the warning. - if is_aix and "0654-419" in e.stdout: - show_warning = False - - if show_warning: - logger.warning("Failed to run strip on %r!", cached_name, exc_info=True) - logger.warning("Output from strip command:\n%s", e.stdout) - except Exception: - logger.warning("Failed to run strip on %r!", cached_name, exc_info=True) - - # Apply UPX - if use_upx: - upx_exe = 'upx' - upx_dir = CONF['upx_dir'] - if upx_dir: - upx_exe = os.path.join(upx_dir, upx_exe) - - upx_options = [ - # Do not compress icons, so that they can still be accessed externally. - '--compress-icons=0', - # Use LZMA compression. - '--lzma', - # Quiet mode. - '-q', - ] - if is_win: - # Binaries built with Visual Studio 7.1 require --strip-loadconf or they will not compress. - upx_options.append('--strip-loadconf') - - cmd = [upx_exe, *upx_options, cached_name] - logger.info("Executing: %s", " ".join(cmd)) - try: - p = subprocess.run( - cmd, - stdin=subprocess.DEVNULL, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - check=True, - errors='ignore', - encoding='utf-8', - ) - logger.debug("Output from upx command:\n%s", p.stdout) - except subprocess.CalledProcessError as e: - logger.warning("Failed to upx strip on %r!", cached_name, exc_info=True) - logger.warning("Output from upx command:\n%s", e.stdout) - except Exception: - logger.warning("Failed to run upx on %r!", cached_name, exc_info=True) - - # On macOS, we need to modify the given binary's paths to the dependent libraries, in order to ensure they are - # relocatable and always refer to location within the frozen application. Specifically, we make all dependent - # library paths relative to @rpath, and set @rpath to point to the top-level application directory, relative to - # the binary's location (i.e., @loader_path). - # - # While modifying the headers invalidates existing signatures, we avoid removing them in order to speed things up - # (and to avoid potential bugs in the codesign utility, like the one reported on macOS 10.13 in #6167). - # The forced re-signing at the end should take care of the invalidated signatures. - if is_darwin: - try: - osxutils.binary_to_target_arch(cached_name, target_arch, display_name=src_name) - #osxutils.remove_signature_from_binary(cached_name) # Disabled as per comment above. - target_rpath = str( - pathlib.PurePath('@loader_path', *['..' for level in pathlib.PurePath(dest_name).parent.parts]) - ) - osxutils.set_dylib_dependency_paths(cached_name, target_rpath) - osxutils.sign_binary(cached_name, codesign_identity, entitlements_file) - except osxutils.InvalidBinaryError: - # Raised by osxutils.binary_to_target_arch when the given file is not a valid macOS binary (for example, - # a linux .so file; see issue #6327). The error prevents any further processing, so just ignore it. - pass - except osxutils.IncompatibleBinaryArchError: - # Raised by osxutils.binary_to_target_arch when the given file does not contain (all) required arch slices. - # Depending on the strict validation mode, re-raise or swallow the error. - # - # Strict validation should be enabled only for binaries where the architecture *must* match the target one, - # i.e., the extension modules. Everything else is pretty much a gray area, for example: - # * a universal2 extension may have its x86_64 and arm64 slices linked against distinct single-arch/thin - # shared libraries - # * a collected executable that is launched by python code via a subprocess can be x86_64-only, even though - # the actual python code is running on M1 in native arm64 mode. - if strict_arch_validation: - raise - logger.debug("File %s failed optional architecture validation - collecting as-is!", src_name) - except Exception as e: - raise SystemError(f"Failed to process binary {cached_name!r}!") from e - - # Update cache index - cache_index[cached_id] = src_digest - misc.save_py_data_struct(cache_index_file, cache_index) - - return cached_name - - -def _compute_file_digest(filename): - hasher = hashlib.sha1() - with open(filename, "rb") as fp: - for chunk in iter(lambda: fp.read(16 * 1024), b""): - hasher.update(chunk) - return bytearray(hasher.digest()) - - -def _check_path_overlap(path): - """ - Check that path does not overlap with WORKPATH or SPECPATH (i.e., WORKPATH and SPECPATH may not start with path, - which could be caused by a faulty hand-edited specfile). - - Raise SystemExit if there is overlap, return True otherwise - """ - from PyInstaller.config import CONF - specerr = 0 - if CONF['workpath'].startswith(path): - logger.error('Specfile error: The output path "%s" contains WORKPATH (%s)', path, CONF['workpath']) - specerr += 1 - if CONF['specpath'].startswith(path): - logger.error('Specfile error: The output path "%s" contains SPECPATH (%s)', path, CONF['specpath']) - specerr += 1 - if specerr: - raise SystemExit( - 'ERROR: Please edit/recreate the specfile (%s) and set a different output name (e.g. "dist").' % - CONF['spec'] - ) - return True - - -def _make_clean_directory(path): - """ - Create a clean directory from the given directory name. - """ - if _check_path_overlap(path): - if os.path.isdir(path) or os.path.isfile(path): - try: - os.remove(path) - except OSError: - _rmtree(path) - - os.makedirs(path, exist_ok=True) - - -def _rmtree(path): - """ - Remove directory and all its contents, but only after user confirmation, or if the -y option is set. - """ - from PyInstaller.config import CONF - if CONF['noconfirm']: - choice = 'y' - elif sys.stdout.isatty(): - choice = input( - 'WARNING: The output directory "%s" and ALL ITS CONTENTS will be REMOVED! Continue? (y/N)' % path - ) - else: - raise SystemExit( - 'ERROR: The output directory "%s" is not empty. Please remove all its contents or use the -y option (remove' - ' output directory without confirmation).' % path - ) - if choice.strip().lower() == 'y': - if not CONF['noconfirm']: - print("On your own risk, you can use the option `--noconfirm` to get rid of this question.") - logger.info('Removing dir %s', path) - shutil.rmtree(path) - else: - raise SystemExit('User aborted') - - -# TODO Refactor to prohibit empty target directories. As the docstring below documents, this function currently permits -# the second item of each 2-tuple in "hook.datas" to be the empty string, in which case the target directory defaults to -# the source directory's basename. However, this functionality is very fragile and hence bad. Instead: -# -# * An exception should be raised if such item is empty. -# * All hooks currently passing the empty string for such item (e.g., -# "hooks/hook-babel.py", "hooks/hook-matplotlib.py") should be refactored -# to instead pass such basename. -def format_binaries_and_datas(binaries_or_datas, workingdir=None): - """ - Convert the passed list of hook-style 2-tuples into a returned set of `TOC`-style 2-tuples. - - Elements of the passed list are 2-tuples `(source_dir_or_glob, target_dir)`. - Elements of the returned set are 2-tuples `(target_file, source_file)`. - For backwards compatibility, the order of elements in the former tuples are the reverse of the order of elements in - the latter tuples! - - Parameters - ---------- - binaries_or_datas : list - List of hook-style 2-tuples (e.g., the top-level `binaries` and `datas` attributes defined by hooks) whose: - * The first element is either: - * A glob matching only the absolute or relative paths of source non-Python data files. - * The absolute or relative path of a source directory containing only source non-Python data files. - * The second element is the relative path of the target directory into which these source files will be - recursively copied. - - If the optional `workingdir` parameter is passed, source paths may be either absolute or relative; else, source - paths _must_ be absolute. - workingdir : str - Optional absolute path of the directory to which all relative source paths in the `binaries_or_datas` - parameter will be prepended by (and hence converted into absolute paths) _or_ `None` if these paths are to be - preserved as relative. Defaults to `None`. - - Returns - ---------- - set - Set of `TOC`-style 2-tuples whose: - * First element is the absolute or relative path of a target file. - * Second element is the absolute or relative path of the corresponding source file to be copied to this target - file. - """ - toc_datas = set() - - for src_root_path_or_glob, trg_root_dir in binaries_or_datas: - # Disallow empty source path. Those are typically result of errors, and result in implicit collection of the - # whole current working directory, which is never a good idea. - if not src_root_path_or_glob: - raise InvalidSrcDestTupleError( - (src_root_path_or_glob, trg_root_dir), - "Empty SRC is not allowed when adding binary and data files, as it would result in collection of the " - "whole current working directory." - ) - if not trg_root_dir: - raise InvalidSrcDestTupleError( - (src_root_path_or_glob, trg_root_dir), - "Empty DEST_DIR is not allowed - to collect files into application's top-level directory, use " - f"{os.curdir!r}." - ) - # Disallow absolute target paths, as well as target paths that would end up pointing outside of the - # application's top-level directory. - if os.path.isabs(trg_root_dir): - raise InvalidSrcDestTupleError((src_root_path_or_glob, trg_root_dir), "DEST_DIR must be a relative path!") - if os.path.normpath(trg_root_dir).startswith('..'): - raise InvalidSrcDestTupleError( - (src_root_path_or_glob, trg_root_dir), - "DEST_DIR must not point outside of application's top-level directory!", - ) - - # Convert relative to absolute paths if required. - if workingdir and not os.path.isabs(src_root_path_or_glob): - src_root_path_or_glob = os.path.join(workingdir, src_root_path_or_glob) - - # Normalize paths. - src_root_path_or_glob = os.path.normpath(src_root_path_or_glob) - - # If given source path is a file or directory path, pass it on. - # If not, treat it as a glob and pass on all matching paths. However, we need to preserve the directories - # captured by the glob - as opposed to collecting their contents into top-level target directory. Therefore, - # we set a flag which is used in subsequent processing to distinguish between original directory paths and - # directory paths that were captured by the glob. - if os.path.isfile(src_root_path_or_glob) or os.path.isdir(src_root_path_or_glob): - src_root_paths = [src_root_path_or_glob] - was_glob = False - else: - src_root_paths = glob.glob(src_root_path_or_glob) - was_glob = True - - if not src_root_paths: - raise SystemExit(f'ERROR: Unable to find {src_root_path_or_glob!r} when adding binary and data files.') - - for src_root_path in src_root_paths: - if os.path.isfile(src_root_path): - # Normalizing the result to remove redundant relative paths (e.g., removing "./" from "trg/./file"). - toc_datas.add(( - os.path.normpath(os.path.join(trg_root_dir, os.path.basename(src_root_path))), - os.path.normpath(src_root_path), - )) - elif os.path.isdir(src_root_path): - for src_dir, src_subdir_basenames, src_file_basenames in os.walk(src_root_path): - # Ensure the current source directory is a subdirectory of the passed top-level source directory. - # Since os.walk() does *NOT* follow symlinks by default, this should be the case. (But let's make - # sure.) - assert src_dir.startswith(src_root_path) - - # Relative path of the current target directory, obtained by: - # - # * Stripping the top-level source directory from the current source directory (e.g., removing - # "/top" from "/top/dir"). - # * Normalizing the result to remove redundant relative paths (e.g., removing "./" from - # "trg/./file"). - if was_glob: - # Preserve directories captured by glob. - rel_dir = os.path.relpath(src_dir, os.path.dirname(src_root_path)) - else: - rel_dir = os.path.relpath(src_dir, src_root_path) - trg_dir = os.path.normpath(os.path.join(trg_root_dir, rel_dir)) - - for src_file_basename in src_file_basenames: - src_file = os.path.join(src_dir, src_file_basename) - if os.path.isfile(src_file): - # Normalize the result to remove redundant relative paths (e.g., removing "./" from - # "trg/./file"). - toc_datas.add(( - os.path.normpath(os.path.join(trg_dir, src_file_basename)), os.path.normpath(src_file) - )) - - return toc_datas - - -def get_code_object(modname, filename, optimize): - """ - Get the code-object for a module. - - This is a simplifed non-performant version which circumvents __pycache__. - """ - - # Once upon a time, we compiled dummy code objects for PEP-420 namespace packages. We do not do that anymore. - assert filename not in {'-', None}, "Called with PEP-420 namespace package!" - - _, ext = os.path.splitext(filename) - ext = ext.lower() - - if ext == '.pyc': - # The module is available in binary-only form. Read the contents of .pyc file using helper function, which - # supports reading from either stand-alone or archive-embedded .pyc files. - logger.debug('Reading code object from .pyc file %s', filename) - pyc_data = _read_pyc_data(filename) - code_object = marshal.loads(pyc_data[16:]) - else: - # Assume this is a source .py file, but allow an arbitrary extension (other than .pyc, which is taken in - # the above branch). This allows entry-point scripts to have an arbitrary (or no) extension, as tested by - # the `test_arbitrary_ext` in `test_basic.py`. - logger.debug('Compiling python script/module file %s', filename) - - with open(filename, 'rb') as f: - source = f.read() - - # If entry-point script has no suffix, append .py when compiling the source. In POSIX builds, the executable - # has no suffix either; this causes issues with `traceback` module, as it tries to read the executable file - # when trying to look up the code for the entry-point script (when current working directory contains the - # executable). - _, ext = os.path.splitext(filename) - if not ext: - logger.debug("Appending .py to compiled entry-point name...") - filename += '.py' - - try: - code_object = compile(source, filename, 'exec', optimize=optimize) - except SyntaxError: - logger.warning("Sytnax error while compiling %s", filename) - raise - - return code_object - - -def replace_filename_in_code_object(code_object, filename): - """ - Recursively replace the `co_filename` in the given code object and code objects stored in its `co_consts` entries. - Primarily used to anonymize collected code objects, i.e., by removing the build environment's paths from them. - """ - - consts = tuple( - replace_filename_in_code_object(const_co, filename) if isinstance(const_co, types.CodeType) else const_co - for const_co in code_object.co_consts - ) - - return code_object.replace(co_consts=consts, co_filename=filename) - - -def _should_include_system_binary(binary_tuple, exceptions): - """ - Return True if the given binary_tuple describes a system binary that should be included. - - Exclude all system library binaries other than those with "lib-dynload" in the destination or "python" in the - source, except for those matching the patterns in the exceptions list. Intended to be used from the Analysis - exclude_system_libraries method. - """ - dest = binary_tuple[0] - if dest.startswith(f'python{sys.version_info.major}.{sys.version_info.minor}/lib-dynload'): - return True - src = binary_tuple[1] - if fnmatch.fnmatch(src, '*python*'): - return True - if not src.startswith('/lib') and not src.startswith('/usr/lib'): - return True - for exception in exceptions: - if fnmatch.fnmatch(dest, exception): - return True - return False - - -def compile_pymodule(name, src_path, workpath, optimize, code_cache=None): - """ - Given the name and source file for a pure-python module, compile the module in the specified working directory, - and return the name of resulting .pyc file. The paths in the resulting .pyc module are anonymized by having their - absolute prefix removed. - - If a .pyc file with matching name already exists in the target working directory, it is re-used (provided it has - compatible bytecode magic in the header, and that its modification time is newer than that of the source file). - - If the specified module is available in binary-only form, the input .pyc file is copied to the target working - directory and post-processed. If the specified module is available in source form, it is compiled only if - corresponding code object is not available in the optional code-object cache; otherwise, it is copied from cache - and post-processed. When compiling the module, the specified byte-code optimization level is used. - - It is up to caller to ensure that the optional code-object cache contains only code-objects of target optimization - level, and that if the specified working directory already contains .pyc files, that they were created with target - optimization level. - """ - - # Construct the target .pyc filename in the workpath - split_name = name.split(".") - if "__init__" in src_path: - # __init__ module; use "__init__" as module name, and construct parent path using all components of the - # fully-qualified name - parent_dirs = split_name - mod_basename = "__init__" - else: - # Regular module; use last component of the fully-qualified name as module name, and the rest as the parent - # path. - parent_dirs = split_name[:-1] - mod_basename = split_name[-1] - pyc_path = os.path.join(workpath, *parent_dirs, mod_basename + '.pyc') - - # Check if optional cache contains module entry - code_object = code_cache.get(name, None) if code_cache else None - - if code_object is None: - _, ext = os.path.splitext(src_path) - ext = ext.lower() - - if ext == '.py': - # Source py file; read source and compile it. - with open(src_path, 'rb') as f: - src_data = f.read() - code_object = compile(src_data, src_path, 'exec', optimize=optimize) - elif ext == '.pyc': - # The module is available in binary-only form. Read the contents of .pyc file using helper function, which - # supports reading from either stand-alone or archive-embedded .pyc files. - pyc_data = _read_pyc_data(src_path) - # Unmarshal code object; this is necessary if we want to strip paths from it - code_object = marshal.loads(pyc_data[16:]) - else: - raise ValueError(f"Invalid python module file {src_path}; unhandled extension {ext}!") - - # Replace co_filename in code object with anonymized filename that does not contain full path. Construct the - # relative filename from module name, similar how we earlier constructed the `pyc_path`. - co_filename = os.path.join(*parent_dirs, mod_basename + '.py') - code_object = replace_filename_in_code_object(code_object, co_filename) - - # Write complete .pyc module to in-memory stream. Then, check if .pyc file already exists, compare contents, and - # (re)write it only if different. This avoids unnecessary (re)writing of the file, and in turn also avoids - # unnecessary cache invalidation for targets that make use of the .pyc file (e.g., PKG, COLLECT). - with io.BytesIO() as pyc_stream: - pyc_stream.write(compat.BYTECODE_MAGIC) - pyc_stream.write(struct.pack('= 3.10 stdlib, or equivalent importlib-metadata >= 4.6. -if _setup_py_mode: - importlib_metadata = None -else: - if sys.version_info >= (3, 10): - import importlib.metadata as importlib_metadata - else: - try: - import importlib_metadata - except ImportError as e: - from PyInstaller.exceptions import ImportlibMetadataError - 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"): - from PyInstaller.exceptions import ImportlibMetadataError - raise ImportlibMetadataError() - -# Strict collect mode, which raises error when trying to collect duplicate files into PKG/CArchive or COLLECT. -strict_collect_mode = os.environ.get("PYINSTALLER_STRICT_COLLECT_MODE", "0") != "0" - -# Copied from https://docs.python.org/3/library/platform.html#cross-platform. -is_64bits: bool = sys.maxsize > 2**32 - -# Distinguish specific code for various Python versions. Variables 'is_pyXY' mean that Python X.Y and up is supported. -# Keep even unsupported versions here to keep 3rd-party hooks working. -is_py35 = sys.version_info >= (3, 5) -is_py36 = sys.version_info >= (3, 6) -is_py37 = sys.version_info >= (3, 7) -is_py38 = sys.version_info >= (3, 8) -is_py39 = sys.version_info >= (3, 9) -is_py310 = sys.version_info >= (3, 10) -is_py311 = sys.version_info >= (3, 11) -is_py312 = sys.version_info >= (3, 12) -is_py313 = sys.version_info >= (3, 13) -is_py314 = sys.version_info >= (3, 14) - -is_win = sys.platform.startswith('win') -is_win_10 = is_win and (platform.win32_ver()[0] == '10') -is_win_11 = is_win and (platform.win32_ver()[0] == '11') -is_win_wine = False # Running under Wine; determined later on. -is_cygwin = sys.platform == 'cygwin' -is_darwin = sys.platform == 'darwin' # macOS - -# Unix platforms -is_linux = sys.platform.startswith('linux') -is_solar = sys.platform.startswith('sun') # Solaris -is_aix = sys.platform.startswith('aix') -is_freebsd = sys.platform.startswith('freebsd') -is_openbsd = sys.platform.startswith('openbsd') -is_hpux = sys.platform.startswith('hp-ux') - -# Some code parts are similar to several unix platforms (e.g. Linux, Solaris, AIX). -# macOS is not considered as unix since there are many platform-specific details for Mac in PyInstaller. -is_unix = is_linux or is_solar or is_aix or is_freebsd or is_hpux or is_openbsd - -# Linux distributions such as Alpine or OpenWRT use musl as their libc implementation and resultantly need specially -# compiled bootloaders. On musl systems, ldd with no arguments prints 'musl' and its version. -is_musl = is_linux and "musl" in subprocess.run(["ldd"], capture_output=True, encoding="utf-8").stderr - -# Termux - terminal emulator and Linux environment app for Android. -is_termux = is_linux and hasattr(sys, 'getandroidapilevel') - -# macOS version -_macos_ver = tuple(int(x) for x in platform.mac_ver()[0].split('.')) if is_darwin else None - -# macOS 11 (Big Sur): if python is not compiled with Big Sur support, it ends up in compatibility mode by default, which -# is indicated by platform.mac_ver() returning '10.16'. The lack of proper Big Sur support breaks find_library() -# function from ctypes.util module, as starting with Big Sur, shared libraries are not visible on disk anymore. Support -# for the new library search mechanism was added in python 3.9 when compiled with Big Sur support. In such cases, -# platform.mac_ver() reports version as '11.x'. The behavior can be further modified via SYSTEM_VERSION_COMPAT -# environment variable; which allows explicitly enabling or disabling the compatibility mode. However, note that -# disabling the compatibility mode and using python that does not properly support Big Sur still leaves find_library() -# broken (which is a scenario that we ignore at the moment). -# The same logic applies to macOS 12 (Monterey). -is_macos_11_compat = bool(_macos_ver) and _macos_ver[0:2] == (10, 16) # Big Sur or newer in compat mode -is_macos_11_native = bool(_macos_ver) and _macos_ver[0:2] >= (11, 0) # Big Sur or newer in native mode -is_macos_11 = is_macos_11_compat or is_macos_11_native # Big Sur or newer - -# Check if python >= 3.13 was built with Py_GIL_DISABLED / free-threading (PEP703). -# -# This affects the shared library name, which has the "t" ABI suffix, as per: -# https://github.com/python/steering-council/issues/221#issuecomment-1841593283 -# -# It also affects the layout of PyConfig structure used by bootloader; consequently we need to inform bootloader what -# kind of build it is dealing with (only in python 3.13; with 3.14 and later, we use PEP741 configuration API in the -# bootloader, and do not need to know the layout of PyConfig structure anymore) -is_nogil = bool(sysconfig.get_config_var('Py_GIL_DISABLED')) - -# In a virtual environment created by virtualenv (github.com/pypa/virtualenv) there exists sys.real_prefix with the path -# to the base Python installation from which the virtual environment was created. This is true regardless of the version -# of Python used to execute the virtualenv command. -# -# In a virtual environment created by the venv module available in the Python standard lib, there exists sys.base_prefix -# with the path to the base implementation. This does not exist in a virtual environment created by virtualenv. -# -# The following code creates compat.is_venv and is.virtualenv that are True when running a virtual environment, and also -# compat.base_prefix with the path to the base Python installation. - -base_prefix: str = os.path.abspath(getattr(sys, 'real_prefix', getattr(sys, 'base_prefix', sys.prefix))) -# Ensure `base_prefix` is not containing any relative parts. -is_venv = is_virtualenv = base_prefix != os.path.abspath(sys.prefix) - -# Conda environments sometimes have different paths or apply patches to packages that can affect how a hook or package -# should access resources. Method for determining conda taken from https://stackoverflow.com/questions/47610844#47610844 -is_conda = os.path.isdir(os.path.join(base_prefix, 'conda-meta')) - -# Similar to ``is_conda`` but is ``False`` using another ``venv``-like manager on top. In this case, no packages -# encountered will be conda packages meaning that the default non-conda behaviour is generally desired from PyInstaller. -is_pure_conda = os.path.isdir(os.path.join(sys.prefix, 'conda-meta')) - -# Full path to python interpreter. -python_executable = getattr(sys, '_base_executable', sys.executable) - -# Is this Python from Microsoft App Store (Windows only)? Python from Microsoft App Store has executable pointing at -# empty shims. -is_ms_app_store = is_win and os.path.getsize(python_executable) == 0 - -if is_ms_app_store: - # Locate the actual executable inside base_prefix. - python_executable = os.path.join(base_prefix, os.path.basename(python_executable)) - if not os.path.exists(python_executable): - raise SystemExit( - 'ERROR: PyInstaller cannot locate real python executable belonging to Python from Microsoft App Store!' - ) - -# Bytecode magic value -BYTECODE_MAGIC = importlib.util.MAGIC_NUMBER - -# List of suffixes for Python C extension modules. -EXTENSION_SUFFIXES = importlib.machinery.EXTENSION_SUFFIXES -ALL_SUFFIXES = importlib.machinery.all_suffixes() - -# On Windows we require pywin32-ctypes. -# -> all pyinstaller modules should use win32api from PyInstaller.compat to -# ensure that it can work on MSYS2 (which requires pywin32-ctypes) -if is_win: - if _setup_py_mode: - pywintypes = None - win32api = None - else: - try: - # Hide the `cffi` package from win32-ctypes by temporarily blocking its import. This ensures that `ctypes` - # backend is always used, even if `cffi` is available. The `cffi` backend uses `pycparser`, which is - # incompatible with -OO mode (2nd optimization level) due to its removal of docstrings. - # See https://github.com/pyinstaller/pyinstaller/issues/6345 - # On the off chance that `cffi` has already been imported, store the `sys.modules` entry so we can restore - # it after importing `pywin32-ctypes` modules. - orig_cffi = sys.modules.get('cffi') - sys.modules['cffi'] = None - - from win32ctypes.pywin32 import pywintypes # noqa: F401, E402 - from win32ctypes.pywin32 import win32api # noqa: F401, E402 - except ImportError as e: - raise SystemExit( - 'ERROR: Could not import `pywintypes` or `win32api` from `win32ctypes.pywin32`.\n' - 'Please make sure that `pywin32-ctypes` is installed and importable, for example:\n\n' - 'pip install pywin32-ctypes\n' - ) from e - finally: - # Unblock `cffi`. - if orig_cffi is not None: - sys.modules['cffi'] = orig_cffi - else: - del sys.modules['cffi'] - del orig_cffi - -# macOS's platform.architecture() can be buggy, so we do this manually here. Based off the python documentation: -# https://docs.python.org/3/library/platform.html#platform.architecture -if is_darwin: - architecture = '64bit' if sys.maxsize > 2**32 else '32bit' -else: - architecture = platform.architecture()[0] - -# Cygwin needs special handling, because platform.system() contains identifiers such as MSYS_NT-10.0-19042 and -# CYGWIN_NT-10.0-19042 that do not fit PyInstaller's OS naming scheme. Explicitly set `system` to 'Cygwin'. -system = 'Cygwin' if is_cygwin else platform.system() - -# Machine suffix for bootloader. -if is_win: - # On Windows ARM64 using an x64 Python environment, platform.machine() returns ARM64 but - # we really want the bootloader that matches the Python environment instead of the OS. - machine = _pyi_machine(os.environ.get("PROCESSOR_ARCHITECTURE", platform.machine()), platform.system()) -else: - machine = _pyi_machine(platform.machine(), platform.system()) - - -# Wine detection and support -def is_wine_dll(filename: str | os.PathLike): - """ - Check if the given PE file is a Wine DLL (PE-converted built-in, or fake/placeholder one). - - Returns True if the given file is a Wine DLL, False if not (or if file cannot be analyzed or does not exist). - """ - _WINE_SIGNATURES = ( - b'Wine builtin DLL', # PE-converted Wine DLL - b'Wine placeholder DLL', # Fake/placeholder Wine DLL - ) - _MAX_LEN = max([len(sig) for sig in _WINE_SIGNATURES]) - - # Wine places their DLL signature in the padding area between the IMAGE_DOS_HEADER and IMAGE_NT_HEADERS. So we need - # to compare the bytes that come right after IMAGE_DOS_HEADER, i.e., after initial 64 bytes. We can read the file - # directly and avoid using the pefile library to avoid performance penalty associated with full header parsing. - try: - with open(filename, 'rb') as fp: - fp.seek(64) - signature = fp.read(_MAX_LEN) - return signature.startswith(_WINE_SIGNATURES) - except Exception: - pass - return False - - -if is_win: - try: - import ctypes.util # noqa: E402 - is_win_wine = is_wine_dll(ctypes.util.find_library('kernel32')) - except Exception: - pass - -# Set and get environment variables does not handle unicode strings correctly on Windows. - -# Acting on os.environ instead of using getenv()/setenv()/unsetenv(), as suggested in -# : "Calling putenv() directly does not change os.environ, so it is -# better to modify os.environ." (Same for unsetenv.) - - -def getenv(name: str, default: str | None = None): - """ - Returns unicode string containing value of environment variable 'name'. - """ - return os.environ.get(name, default) - - -def setenv(name: str, value: str): - """ - Accepts unicode string and set it as environment variable 'name' containing value 'value'. - """ - os.environ[name] = value - - -def unsetenv(name: str): - """ - Delete the environment variable 'name'. - """ - # Some platforms (e.g., AIX) do not support `os.unsetenv()` and thus `del os.environ[name]` has no effect on the - # real environment. For this case, we set the value to the empty string. - os.environ[name] = "" - del os.environ[name] - - -# Exec commands in subprocesses. - - -def exec_command( - *cmdargs: str, encoding: str | None = None, raise_enoent: bool | None = None, **kwargs: int | bool | list | None -): - """ - Run the command specified by the passed positional arguments, optionally configured by the passed keyword arguments. - - .. DANGER:: - **Ignore this function's return value** -- unless this command's standard output contains _only_ pathnames, in - which case this function returns the correct filesystem-encoded string expected by PyInstaller. In all other - cases, this function's return value is _not_ safely usable. - - For backward compatibility, this function's return value non-portably depends on the current Python version and - passed keyword arguments: - - * Under Python 3.x, this value is a **decoded `str` string**. However, even this value is _not_ necessarily - safely usable: - * If the `encoding` parameter is passed, this value is guaranteed to be safely usable. - * Else, this value _cannot_ be safely used for any purpose (e.g., string manipulation or parsing), except to be - passed directly to another non-Python command. Why? Because this value has been decoded with the encoding - specified by `sys.getfilesystemencoding()`, the encoding used by `os.fsencode()` and `os.fsdecode()` to - convert from platform-agnostic to platform-specific pathnames. This is _not_ necessarily the encoding with - which this command's standard output was encoded. Cue edge-case decoding exceptions. - - Parameters - ---------- - cmdargs : - Variadic list whose: - 1. Mandatory first element is the absolute path, relative path, or basename in the current `${PATH}` of the - command to run. - 2. Optional remaining elements are arguments to pass to this command. - encoding : str, optional - Optional keyword argument specifying the encoding with which to decode this command's standard output under - Python 3. As this function's return value should be ignored, this argument should _never_ be passed. - raise_enoent : boolean, optional - Optional keyword argument to simply raise the exception if the executing the command fails since to the command - is not found. This is useful to checking id a command exists. - - All remaining keyword arguments are passed as is to the `subprocess.Popen()` constructor. - - Returns - ---------- - str - Ignore this value. See discussion above. - """ - - proc = subprocess.Popen(cmdargs, stdout=subprocess.PIPE, **kwargs) - try: - out = proc.communicate(timeout=60)[0] - except OSError as e: - if raise_enoent and e.errno == errno.ENOENT: - raise - print('--' * 20, file=sys.stderr) - print("Error running '%s':" % " ".join(cmdargs), file=sys.stderr) - print(e, file=sys.stderr) - print('--' * 20, file=sys.stderr) - raise ExecCommandFailed("ERROR: Executing command failed!") from e - except subprocess.TimeoutExpired: - proc.kill() - raise - - # stdout/stderr are returned as a byte array NOT as string, so we need to convert that to proper encoding. - try: - if encoding: - out = out.decode(encoding) - else: - # If no encoding is given, assume we are reading filenames from stdout only because it is the common case. - out = os.fsdecode(out) - except UnicodeDecodeError as e: - # The sub-process used a different encoding; provide more information to ease debugging. - print('--' * 20, file=sys.stderr) - print(str(e), file=sys.stderr) - print('These are the bytes around the offending byte:', file=sys.stderr) - print('--' * 20, file=sys.stderr) - raise - return out - - -def exec_command_rc(*cmdargs: str, **kwargs: float | bool | list | None): - """ - Return the exit code of the command specified by the passed positional arguments, optionally configured by the - passed keyword arguments. - - Parameters - ---------- - cmdargs : list - Variadic list whose: - 1. Mandatory first element is the absolute path, relative path, or basename in the current `${PATH}` of the - command to run. - 2. Optional remaining elements are arguments to pass to this command. - - All keyword arguments are passed as is to the `subprocess.call()` function. - - Returns - ---------- - int - This command's exit code as an unsigned byte in the range `[0, 255]`, where 0 signifies success and all other - values signal a failure. - """ - - # 'encoding' keyword is not supported for 'subprocess.call'; remove it from kwargs. - if 'encoding' in kwargs: - kwargs.pop('encoding') - return subprocess.call(cmdargs, **kwargs) - - -def exec_command_all(*cmdargs: str, encoding: str | None = None, **kwargs: int | bool | list | None): - """ - Run the command specified by the passed positional arguments, optionally configured by the passed keyword arguments. - - .. DANGER:: - **Ignore this function's return value.** If this command's standard output consists solely of pathnames, consider - calling `exec_command()` - - Parameters - ---------- - cmdargs : str - Variadic list whose: - 1. Mandatory first element is the absolute path, relative path, or basename in the current `${PATH}` of the - command to run. - 2. Optional remaining elements are arguments to pass to this command. - encoding : str, optional - Optional keyword argument specifying the encoding with which to decode this command's standard output. As this - function's return value should be ignored, this argument should _never_ be passed. - - All remaining keyword arguments are passed as is to the `subprocess.Popen()` constructor. - - Returns - ---------- - (int, str, str) - Ignore this 3-element tuple `(exit_code, stdout, stderr)`. See the `exec_command()` function for discussion. - """ - proc = subprocess.Popen( - cmdargs, - bufsize=-1, # Default OS buffer size. - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - **kwargs - ) - # Waits for subprocess to complete. - try: - out, err = proc.communicate(timeout=60) - except subprocess.TimeoutExpired: - proc.kill() - raise - # stdout/stderr are returned as a byte array NOT as string. Thus we need to convert that to proper encoding. - try: - if encoding: - out = out.decode(encoding) - err = err.decode(encoding) - else: - # If no encoding is given, assume we're reading filenames from stdout only because it's the common case. - out = os.fsdecode(out) - err = os.fsdecode(err) - except UnicodeDecodeError as e: - # The sub-process used a different encoding, provide more information to ease debugging. - print('--' * 20, file=sys.stderr) - print(str(e), file=sys.stderr) - print('These are the bytes around the offending byte:', file=sys.stderr) - print('--' * 20, file=sys.stderr) - raise - - return proc.returncode, out, err - - -def __wrap_python(args, kwargs): - cmdargs = [sys.executable] - - # macOS supports universal binaries (binary for multiple architectures. We need to ensure that subprocess - # binaries are running for the same architecture as python executable. It is necessary to run binaries with 'arch' - # command. - if is_darwin: - if architecture == '64bit': - if platform.machine() == 'arm64': - py_prefix = ['arch', '-arm64'] # Apple M1 - else: - py_prefix = ['arch', '-x86_64'] # Intel - elif architecture == '32bit': - py_prefix = ['arch', '-i386'] - else: - py_prefix = [] - # Since macOS 10.11, the environment variable DYLD_LIBRARY_PATH is no more inherited by child processes, so we - # proactively propagate the current value using the `-e` option of the `arch` command. - if 'DYLD_LIBRARY_PATH' in os.environ: - path = os.environ['DYLD_LIBRARY_PATH'] - py_prefix += ['-e', 'DYLD_LIBRARY_PATH=%s' % path] - cmdargs = py_prefix + cmdargs - - if not __debug__: - cmdargs.append('-O') - - cmdargs.extend(args) - - env = kwargs.get('env') - if env is None: - env = dict(**os.environ) - - # Ensure python 3 subprocess writes 'str' as utf-8 - env['PYTHONIOENCODING'] = 'UTF-8' - # ... and ensure we read output as utf-8 - kwargs['encoding'] = 'UTF-8' - - return cmdargs, kwargs - - -def exec_python(*args: str, **kwargs: str | None): - """ - Wrap running python script in a subprocess. - - Return stdout of the invoked command. - """ - cmdargs, kwargs = __wrap_python(args, kwargs) - return exec_command(*cmdargs, **kwargs) - - -def exec_python_rc(*args: str, **kwargs: str | None): - """ - Wrap running python script in a subprocess. - - Return exit code of the invoked command. - """ - cmdargs, kwargs = __wrap_python(args, kwargs) - return exec_command_rc(*cmdargs, **kwargs) - - -# Path handling. - - -# Site-packages functions - use native function if available. -def getsitepackages(prefixes: list | None = None): - """ - Returns a list containing all global site-packages directories. - - For each directory present in ``prefixes`` (or the global ``PREFIXES``), this function finds its `site-packages` - subdirectory depending on the system environment, and returns a list of full paths. - """ - # This implementation was copied from the ``site`` module, python 3.7.3. - sitepackages = [] - seen = set() - - if prefixes is None: - prefixes = [sys.prefix, sys.exec_prefix] - - for prefix in prefixes: - if not prefix or prefix in seen: - continue - seen.add(prefix) - - if os.sep == '/': - sitepackages.append(os.path.join(prefix, "lib", "python%d.%d" % sys.version_info[:2], "site-packages")) - else: - sitepackages.append(prefix) - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) - return sitepackages - - -# Backported for virtualenv. Module 'site' in virtualenv might not have this attribute. -getsitepackages = getattr(site, 'getsitepackages', getsitepackages) - - -# Wrapper to load a module from a Python source file. This function loads import hooks when processing them. -def importlib_load_source(name: str, pathname: str): - # Import module from a file. - mod_loader = importlib.machinery.SourceFileLoader(name, pathname) - mod = types.ModuleType(mod_loader.name) - mod.__file__ = mod_loader.get_filename() # Some hooks require __file__ attribute in their namespace - mod_loader.exec_module(mod) - return mod - - -# Patterns of module names that should be bundled into the base_library.zip to be available during bootstrap. -# These modules include direct or indirect dependencies of encodings.* modules. The encodings modules must be -# recursively included to set the I/O encoding during python startup. Similarly, this list should include -# modules used by PyInstaller's bootstrap scripts and modules (loader/pyi*.py) - -PY3_BASE_MODULES = { - '_collections_abc', - '_weakrefset', - 'abc', - 'codecs', - 'collections', - 'copyreg', - 'encodings', - 'enum', - 'functools', - 'genericpath', # dependency of os.path - 'io', - 'heapq', - 'keyword', - 'linecache', - 'locale', - 'ntpath', # dependency of os.path - 'operator', - 'os', - 'posixpath', # dependency of os.path - 're', - 'reprlib', - 'sre_compile', - 'sre_constants', - 'sre_parse', - 'stat', # dependency of os.path - 'traceback', # for startup errors - 'types', - 'weakref', - 'warnings', -} - -if not is_py310: - PY3_BASE_MODULES.add('_bootlocale') - -# Object types of Pure Python modules in modulegraph dependency graph. -# Pure Python modules have code object (attribute co_code). -PURE_PYTHON_MODULE_TYPES = { - 'SourceModule', - 'CompiledModule', - 'Package', - 'NamespacePackage', - # Deprecated. - # TODO Could these module types be removed? - 'FlatPackage', - 'ArchiveModule', -} -# Object types of special Python modules (built-in, run-time, namespace package) in modulegraph dependency graph that do -# not have code object. -SPECIAL_MODULE_TYPES = { - # Omit AliasNode from here (and consequently from VALID_MODULE_TYPES), in order to prevent PyiModuleGraph from - # running standard hooks for aliased modules. - #'AliasNode', - 'BuiltinModule', - 'RuntimeModule', - 'RuntimePackage', - - # PyInstaller handles scripts differently and not as standard Python modules. - 'Script', -} -# Object types of Binary Python modules (extensions, etc) in modulegraph dependency graph. -BINARY_MODULE_TYPES = { - 'Extension', - 'ExtensionPackage', -} -# Object types of valid Python modules in modulegraph dependency graph. -VALID_MODULE_TYPES = PURE_PYTHON_MODULE_TYPES | SPECIAL_MODULE_TYPES | BINARY_MODULE_TYPES -# Object types of bad/missing/invalid Python modules in modulegraph dependency graph. -# TODO: should be 'Invalid' module types also in the 'MISSING' set? -BAD_MODULE_TYPES = { - 'BadModule', - 'ExcludedModule', - 'InvalidSourceModule', - 'InvalidCompiledModule', - 'MissingModule', - - # Runtime modules and packages are technically valid rather than bad, but exist only in-memory rather than on-disk - # (typically due to pre_safe_import_module() hooks), and hence cannot be physically frozen. For simplicity, these - # nodes are categorized as bad rather than valid. - 'RuntimeModule', - 'RuntimePackage', -} -ALL_MODULE_TYPES = VALID_MODULE_TYPES | BAD_MODULE_TYPES -# TODO: review this mapping to TOC, remove useless entries. -# Dictionary to map ModuleGraph node types to TOC typecodes. -MODULE_TYPES_TO_TOC_DICT = { - # Pure modules. - 'AliasNode': 'PYMODULE', - 'Script': 'PYSOURCE', - 'SourceModule': 'PYMODULE', - 'CompiledModule': 'PYMODULE', - 'Package': 'PYMODULE', - 'FlatPackage': 'PYMODULE', - 'ArchiveModule': 'PYMODULE', - # Binary modules. - 'Extension': 'EXTENSION', - 'ExtensionPackage': 'EXTENSION', - # Special valid modules. - 'BuiltinModule': 'BUILTIN', - 'NamespacePackage': 'PYMODULE', - # Bad modules. - 'BadModule': 'bad', - 'ExcludedModule': 'excluded', - 'InvalidSourceModule': 'invalid', - 'InvalidCompiledModule': 'invalid', - 'MissingModule': 'missing', - 'RuntimeModule': 'runtime', - 'RuntimePackage': 'runtime', - # Other. - 'does not occur': 'BINARY', -} - - -def check_requirements(): - """ - Verify that all requirements to run PyInstaller are met. - - Fail hard if any requirement is not met. - """ - # Fail hard if Python does not have minimum required version - if sys.version_info < (3, 8): - raise EnvironmentError('PyInstaller requires Python 3.8 or newer.') - - if sys.implementation.name != "cpython": - raise SystemExit(f"ERROR: PyInstaller does not support {sys.implementation.name}. Only CPython is supported.") - - if getattr(sys, "frozen", False): - raise SystemExit("ERROR: PyInstaller can not be ran on itself") - - # There are some old packages which used to be backports of libraries which are now part of the standard library. - # These backports are now unmaintained and contain only an older subset of features leading to obscure errors like - # "enum has not attribute IntFlag" if installed. - from importlib.metadata import distribution, PackageNotFoundError - - for name in ["enum34", "typing", "pathlib"]: - try: - dist = distribution(name) - except PackageNotFoundError: - continue - remove = "conda remove" if is_conda else f'"{sys.executable}" -m pip uninstall {name}' - raise SystemExit( - f"ERROR: The '{name}' package is an obsolete backport of a standard library package and is incompatible " - f"with PyInstaller. Please remove this package (located in {dist.locate_file('')}) using\n {remove}\n" - "then try again." - ) - - # Bail out if binutils is not installed. - if is_linux and shutil.which("objdump") is None: - raise SystemExit( - "ERROR: On Linux, objdump is required. It is typically provided by the 'binutils' package " - "installable via your Linux distribution's package manager." - ) diff --git a/voxvera/vendor/PyInstaller/config.py b/voxvera/vendor/PyInstaller/config.py deleted file mode 100755 index e6cb695..0000000 --- a/voxvera/vendor/PyInstaller/config.py +++ /dev/null @@ -1,56 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -This module holds run-time PyInstaller configuration. - -Variable CONF is a dict() with all configuration options that are necessary for the build phase. Build phase is done by -passing .spec file to exec() function. CONF variable is the only way how to pass arguments to exec() and how to avoid -using 'global' variables. - -NOTE: Having 'global' variables does not play well with the test suite because it does not provide isolated environments -for tests. Some tests might fail in this case. - -NOTE: The 'CONF' dict() is cleaned after building phase to not interfere with any other possible test. - -To pass any arguments to build phase, just do: - - from PyInstaller.config import CONF - CONF['my_var_name'] = my_value - -And to use this variable in the build phase: - - from PyInstaller.config import CONF - foo = CONF['my_var_name'] - - -This is the list of known variables. (Please update it if necessary.) - -cachedir -hiddenimports -noconfirm -pathex -ui_admin -ui_access -upx_available -upx_dir -workpath - -tests_modgraph - cached PyiModuleGraph object to speed up tests - -code_cache - dictionary associating `Analysis.pure` list instances with code cache dictionaries. Used by PYZ writer. -""" - -# NOTE: Do not import other PyInstaller modules here. Just define constants here. - -CONF = { - # Unit tests require this key to exist. - 'pathex': [], -} diff --git a/voxvera/vendor/PyInstaller/configure.py b/voxvera/vendor/PyInstaller/configure.py deleted file mode 100755 index 46234b8..0000000 --- a/voxvera/vendor/PyInstaller/configure.py +++ /dev/null @@ -1,107 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Configure PyInstaller for the current Python installation. -""" - -import os -import subprocess - -from PyInstaller import compat -from PyInstaller import log as logging - -logger = logging.getLogger(__name__) - - -def _check_upx_availability(upx_dir): - logger.debug('Testing UPX availability ...') - - upx_exe = "upx" - if upx_dir: - upx_exe = os.path.normpath(os.path.join(upx_dir, upx_exe)) - - # Check if we can call `upx -V`. - try: - output = subprocess.check_output( - [upx_exe, '-V'], - stdin=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, - encoding='utf-8', - ) - except Exception: - logger.debug('UPX is not available.') - return False - - # Read the first line to display version string - try: - version_string = output.splitlines()[0] - except IndexError: - version_string = 'version string unavailable' - - logger.debug('UPX is available: %s', version_string) - return True - - -def _get_pyinstaller_cache_dir(): - old_cache_dir = None - if compat.getenv('PYINSTALLER_CONFIG_DIR'): - cache_dir = compat.getenv('PYINSTALLER_CONFIG_DIR') - elif compat.is_win: - cache_dir = compat.getenv('LOCALAPPDATA') - if not cache_dir: - cache_dir = os.path.expanduser('~\\Application Data') - elif compat.is_darwin: - cache_dir = os.path.expanduser('~/Library/Application Support') - else: - # According to XDG specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html - old_cache_dir = compat.getenv('XDG_DATA_HOME') - if not old_cache_dir: - old_cache_dir = os.path.expanduser('~/.local/share') - cache_dir = compat.getenv('XDG_CACHE_HOME') - if not cache_dir: - cache_dir = os.path.expanduser('~/.cache') - cache_dir = os.path.join(cache_dir, 'pyinstaller') - # Move old cache-dir, if any, to new location. - if old_cache_dir and not os.path.exists(cache_dir): - old_cache_dir = os.path.join(old_cache_dir, 'pyinstaller') - if os.path.exists(old_cache_dir): - parent_dir = os.path.dirname(cache_dir) - if not os.path.exists(parent_dir): - os.makedirs(parent_dir) - os.rename(old_cache_dir, cache_dir) - return cache_dir - - -def get_config(upx_dir=None): - config = {} - - config['cachedir'] = _get_pyinstaller_cache_dir() - config['upx_dir'] = upx_dir - - # Disable UPX on non-Windows. Using UPX (3.96) on modern Linux shared libraries (for example, the python3.x.so - # shared library) seems to result in segmentation fault when they are dlopen'd. This happens in recent versions - # of Fedora and Ubuntu linux, as well as in Alpine containers. On macOS, UPX (3.96) fails with - # UnknownExecutableFormatException on most .dylibs (and interferes with code signature on other occasions). And - # even when it would succeed, compressed libraries cannot be (re)signed due to failed strict validation. - upx_available = _check_upx_availability(upx_dir) - if upx_available: - if compat.is_win or compat.is_cygwin: - logger.info("UPX is available and will be used if enabled on build targets.") - elif os.environ.get("PYINSTALLER_FORCE_UPX", "0") != "0": - logger.warning( - "UPX is available and force-enabled on platform with known compatibility problems - use at own risk!" - ) - else: - upx_available = False - logger.info("UPX is available but is disabled on non-Windows due to known compatibility problems.") - config['upx_available'] = upx_available - - return config diff --git a/voxvera/vendor/PyInstaller/depend/__init__.py b/voxvera/vendor/PyInstaller/depend/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/depend/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/depend/analysis.py b/voxvera/vendor/PyInstaller/depend/analysis.py deleted file mode 100755 index 72ae4e4..0000000 --- a/voxvera/vendor/PyInstaller/depend/analysis.py +++ /dev/null @@ -1,1025 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Define a modified ModuleGraph that can return its contents as a TOC and in other ways act like the old ImpTracker. -TODO: This class, along with TOC and Tree, should be in a separate module. - -For reference, the ModuleGraph node types and their contents: - - nodetype identifier filename - - Script full path to .py full path to .py - SourceModule basename full path to .py - BuiltinModule basename None - CompiledModule basename full path to .pyc - Extension basename full path to .so - MissingModule basename None - Package basename full path to __init__.py - packagepath is ['path to package'] - globalnames is set of global names __init__.py defines - ExtensionPackage basename full path to __init__.{so,dll} - packagepath is ['path to package'] - -The main extension here over ModuleGraph is a method to extract nodes from the flattened graph and return them as a -TOC, or added to a TOC. Other added methods look up nodes by identifier and return facts about them, replacing what -the old ImpTracker list could do. -""" - -import ast -import os -import sys -import traceback -from collections import defaultdict -from copy import deepcopy - -from PyInstaller import HOMEPATH, PACKAGEPATH -from PyInstaller import log as logging -from PyInstaller.building.utils import destination_name_for_extension -from PyInstaller.compat import ( - BAD_MODULE_TYPES, BINARY_MODULE_TYPES, MODULE_TYPES_TO_TOC_DICT, PURE_PYTHON_MODULE_TYPES, PY3_BASE_MODULES, - VALID_MODULE_TYPES, importlib_load_source, is_win -) -from PyInstaller.depend import bytecode -from PyInstaller.depend.imphook import AdditionalFilesCache, ModuleHookCache -from PyInstaller.depend.imphookapi import (PreFindModulePathAPI, PreSafeImportModuleAPI) -from PyInstaller.lib.modulegraph.find_modules import get_implies -from PyInstaller.lib.modulegraph.modulegraph import ModuleGraph, DEFAULT_IMPORT_LEVEL, ABSOLUTE_IMPORT_LEVEL, Package -from PyInstaller.log import DEBUG, INFO, TRACE -from PyInstaller.utils.hooks import collect_submodules, is_package - -logger = logging.getLogger(__name__) - -# Location-based hook priority constants -HOOK_PRIORITY_BUILTIN_HOOKS = -2000 # Built-in hooks. Lowest priority. -HOOK_PRIORITY_CONTRIBUTED_HOOKS = -1000 # Hooks from pyinstaller-hooks-contrib package. -HOOK_PRIORITY_UPSTREAM_HOOKS = 0 # Hooks provided by packages themselves, via entry-points. -HOOK_PRIORITY_USER_HOOKS = 1000 # User-supplied hooks (command-line / spec file). Highest priority. - - -class PyiModuleGraph(ModuleGraph): - """ - Directed graph whose nodes represent modules and edges represent dependencies between these modules. - - This high-level subclass wraps the lower-level `ModuleGraph` class with support for graph and runtime hooks. - While each instance of `ModuleGraph` represents a set of disconnected trees, each instance of this class *only* - represents a single connected tree whose root node is the Python script originally passed by the user on the - command line. For that reason, while there may (and typically do) exist more than one `ModuleGraph` instance, - there typically exists only a singleton instance of this class. - - Attributes - ---------- - _hooks : ModuleHookCache - Dictionary mapping the fully-qualified names of all modules with normal (post-graph) hooks to the absolute paths - of such hooks. See the the `_find_module_path()` method for details. - _hooks_pre_find_module_path : ModuleHookCache - Dictionary mapping the fully-qualified names of all modules with pre-find module path hooks to the absolute - paths of such hooks. See the the `_find_module_path()` method for details. - _hooks_pre_safe_import_module : ModuleHookCache - Dictionary mapping the fully-qualified names of all modules with pre-safe import module hooks to the absolute - paths of such hooks. See the `_safe_import_module()` method for details. - _user_hook_dirs : list - List of the absolute paths of all directories containing user-defined hooks for the current application. - _excludes : list - List of module names to be excluded when searching for dependencies. - _additional_files_cache : AdditionalFilesCache - Cache of all external dependencies (e.g., binaries, datas) listed in hook scripts for imported modules. - _module_collection_mode : dict - A dictionary of module/package collection mode settings set by hook scripts for their modules. - _bindepend_symlink_suppression : set - A set of paths or path patterns corresponding to shared libraries for which binary dependency analysis should - not create symbolic links into top-level application directory. - _base_modules: list - Dependencies for `base_library.zip` (which remain the same for every executable). - """ - - # Note: these levels are completely arbitrary and may be adjusted if needed. - LOG_LEVEL_MAPPING = {0: INFO, 1: DEBUG, 2: TRACE, 3: TRACE, 4: TRACE} - - def __init__(self, pyi_homepath, user_hook_dirs=(), excludes=(), **kwargs): - super().__init__(excludes=excludes, **kwargs) - # Homepath to the place where is PyInstaller located. - self._homepath = pyi_homepath - # modulegraph Node for the main python script that is analyzed by PyInstaller. - self._top_script_node = None - - # Absolute paths of all user-defined hook directories. - self._excludes = excludes - self._reset(user_hook_dirs) - self._analyze_base_modules() - - def _reset(self, user_hook_dirs): - """ - Reset for another set of scripts. This is primary required for running the test-suite. - """ - self._top_script_node = None - self._additional_files_cache = AdditionalFilesCache() - self._module_collection_mode = dict() - self._bindepend_symlink_suppression = set() - # Hook sources: user-supplied (command-line / spec file), entry-point (upstream hooks, contributed hooks), and - # built-in hooks. The order does not really matter anymore, because each entry is now a (location, priority) - # tuple, and order is determined from assigned priority (which may also be overridden by hooks themselves). - self._user_hook_dirs = [ - *user_hook_dirs, - (os.path.join(PACKAGEPATH, 'hooks'), HOOK_PRIORITY_BUILTIN_HOOKS), - ] - # Hook-specific lookup tables. These need to reset when reusing cached PyiModuleGraph to avoid hooks to refer to - # files or data from another test-case. - logger.info('Initializing module graph hook caches...') - self._hooks = self._cache_hooks("") - self._hooks_pre_safe_import_module = self._cache_hooks('pre_safe_import_module') - self._hooks_pre_find_module_path = self._cache_hooks('pre_find_module_path') - - # Search for run-time hooks in all hook directories. - self._available_rthooks = defaultdict(list) - for uhd, _ in self._user_hook_dirs: - uhd_path = os.path.abspath(os.path.join(uhd, 'rthooks.dat')) - try: - with open(uhd_path, 'r', encoding='utf-8') as f: - rthooks = ast.literal_eval(f.read()) - except FileNotFoundError: - # Ignore if this hook path doesn't have run-time hooks. - continue - except Exception as e: - logger.error('Unable to read run-time hooks from %r: %s' % (uhd_path, e)) - continue - - self._merge_rthooks(rthooks, uhd, uhd_path) - - # Convert back to a standard dict. - self._available_rthooks = dict(self._available_rthooks) - - def _merge_rthooks(self, rthooks, uhd, uhd_path): - """ - The expected data structure for a run-time hook file is a Python dictionary of type ``Dict[str, List[str]]``, - where the dictionary keys are module names and the sequence strings are Python file names. - - Check then merge this data structure, updating the file names to be absolute. - """ - # Check that the root element is a dict. - assert isinstance(rthooks, dict), 'The root element in %s must be a dict.' % uhd_path - for module_name, python_file_name_list in rthooks.items(): - # Ensure the key is a string. - assert isinstance(module_name, str), \ - '%s must be a dict whose keys are strings; %s is not a string.' % (uhd_path, module_name) - # Ensure the value is a list. - assert isinstance(python_file_name_list, list), \ - 'The value of %s key %s must be a list.' % (uhd_path, module_name) - if module_name in self._available_rthooks: - logger.warning( - 'Runtime hooks for %s have already been defined. Skipping the runtime hooks for %s that are ' - 'defined in %s.', module_name, module_name, os.path.join(uhd, 'rthooks') - ) - # Skip this module - continue - # Merge this with existing run-time hooks. - for python_file_name in python_file_name_list: - # Ensure each item in the list is a string. - assert isinstance(python_file_name, str), \ - '%s key %s, item %r must be a string.' % (uhd_path, module_name, python_file_name) - # Transform it into an absolute path. - abs_path = os.path.join(uhd, 'rthooks', python_file_name) - # Make sure this file exists. - assert os.path.exists(abs_path), \ - 'In %s, key %s, the file %r expected to be located at %r does not exist.' % \ - (uhd_path, module_name, python_file_name, abs_path) - # Merge it. - self._available_rthooks[module_name].append(abs_path) - - @staticmethod - def _findCaller(*args, **kwargs): - # Used to add an additional stack-frame above logger.findCaller. findCaller expects the caller to be three - # stack-frames above itself. - return logger.findCaller(*args, **kwargs) - - def msg(self, level, s, *args): - """ - Print a debug message with the given level. - - 1. Map the msg log level to a logger log level. - 2. Generate the message format (the same format as ModuleGraph) - 3. Find the caller, which findCaller expects three stack-frames above itself: - [3] caller -> [2] msg (here) -> [1] _findCaller -> [0] logger.findCaller - 4. Create a logRecord with the caller's information. - 5. Handle the logRecord. - """ - try: - level = self.LOG_LEVEL_MAPPING[level] - except KeyError: - return - if not logger.isEnabledFor(level): - return - - msg = "%s %s" % (s, ' '.join(map(repr, args))) - - try: - fn, lno, func, sinfo = self._findCaller() - except ValueError: # pragma: no cover - fn, lno, func, sinfo = "(unknown file)", 0, "(unknown function)", None - record = logger.makeRecord(logger.name, level, fn, lno, msg, [], None, func, None, sinfo) - - logger.handle(record) - - # Set logging methods so that the stack is correctly detected. - msgin = msg - msgout = msg - - def _cache_hooks(self, hook_type): - """ - Create a cache of all hooks of the specified type. - - The cache will include all official hooks defined by the PyInstaller codebase _and_ all unofficial hooks - defined for the current application. - - Parameters - ---------- - hook_type : str - Type of hooks to be cached, equivalent to the basename of the subpackage of the `PyInstaller.hooks` - package containing such hooks (e.g., empty string for standard hooks, `pre_safe_import_module` for - pre-safe-import-module hooks, `pre_find_module_path` for pre-find-module-path hooks). - """ - # Cache of this type of hooks. - hook_dirs = [] - for user_hook_dir, priority in self._user_hook_dirs: - # Absolute path of the user-defined subdirectory of this hook type. If this directory exists, add it to the - # list to be cached. - user_hook_type_dir = os.path.join(user_hook_dir, hook_type) - if os.path.isdir(user_hook_type_dir): - hook_dirs.append((user_hook_type_dir, priority)) - - return ModuleHookCache(self, hook_dirs) - - def _analyze_base_modules(self): - """ - Analyze dependencies of the the modules in base_library.zip. - """ - logger.info('Analyzing modules for base_library.zip ...') - required_mods = [] - # Collect submodules from required modules in base_library.zip. - for m in PY3_BASE_MODULES: - if is_package(m): - required_mods += collect_submodules(m) - else: - required_mods.append(m) - # Initialize ModuleGraph. - self._base_modules = [mod for req in required_mods for mod in self.import_hook(req)] - - def add_script(self, pathname, caller=None): - """ - Wrap the parent's 'run_script' method and create graph from the first script in the analysis, and save its - node to use as the "caller" node for all others. This gives a connected graph rather than a collection of - unrelated trees. - """ - if self._top_script_node is None: - # Remember the node for the first script. - try: - self._top_script_node = super().add_script(pathname) - except SyntaxError: - print("\nSyntax error in", pathname, file=sys.stderr) - formatted_lines = traceback.format_exc().splitlines(True) - print(*formatted_lines[-4:], file=sys.stderr) - sys.exit(1) - # Create references from the top script to the base_modules in graph. - for node in self._base_modules: - self.add_edge(self._top_script_node, node) - # Return top-level script node. - return self._top_script_node - else: - if not caller: - # Defaults to as any additional script is called from the top-level script. - caller = self._top_script_node - return super().add_script(pathname, caller=caller) - - def process_post_graph_hooks(self, analysis): - """ - For each imported module, run this module's post-graph hooks if any. - - Parameters - ---------- - analysis: build_main.Analysis - The Analysis that calls the hooks - - """ - # For each iteration of the infinite "while" loop below: - # - # 1. All hook() functions defined in cached hooks for imported modules are called. This may result in new - # modules being imported (e.g., as hidden imports) that were ignored earlier in the current iteration: if - # this is the case, all hook() functions defined in cached hooks for these modules will be called by the next - # iteration. - # 2. All cached hooks whose hook() functions were called are removed from this cache. If this cache is empty, no - # hook() functions will be called by the next iteration and this loop will be terminated. - # 3. If no hook() functions were called, this loop is terminated. - logger.info('Processing module hooks (post-graph stage)...') - while True: - # Set of the names of all imported modules whose post-graph hooks are run by this iteration, preventing the - # next iteration from re- running these hooks. If still empty at the end of this iteration, no post-graph - # hooks were run; thus, this loop will be terminated. - hooked_module_names = set() - - # For each remaining hookable module and corresponding hooks... - for module_name, module_hook in self._hooks.items(): - # Graph node for this module if imported or "None" otherwise. - module_node = self.find_node(module_name, create_nspkg=False) - - # If this module has not been imported, temporarily ignore it. This module is retained in the cache, as - # a subsequently run post-graph hook could import this module as a hidden import. - if module_node is None: - continue - - # If this module is unimportable, permanently ignore it. - if type(module_node).__name__ not in VALID_MODULE_TYPES: - hooked_module_names.add(module_name) - continue - - # Run this script's post-graph hook. - module_hook.post_graph(analysis) - - # Cache all external dependencies listed by this script after running this hook, which could add - # dependencies. - self._additional_files_cache.add(module_name, module_hook.binaries, module_hook.datas) - - # Update package collection mode settings. - self._module_collection_mode.update(module_hook.module_collection_mode) - - # Update symbolic link suppression patterns for binary dependency analysis. - self._bindepend_symlink_suppression.update(module_hook.bindepend_symlink_suppression) - - # Prevent this module's hooks from being run again. - hooked_module_names.add(module_name) - - # Prevent all post-graph hooks run above from being run again by the next iteration. - self._hooks.remove_modules(*hooked_module_names) - - # If no post-graph hooks were run, terminate iteration. - if not hooked_module_names: - break - - def _find_all_excluded_imports(self, module_name): - """ - Collect excludedimports from the hooks of the specified module and all its parents. - """ - excluded_imports = set() - while module_name: - # Gather excluded imports from hook belonging to the module. - module_hook = self._hooks.get(module_name, None) - if module_hook: - excluded_imports.update(module_hook.excludedimports) - # Change module name to the module's parent name - module_name = module_name.rpartition('.')[0] - return excluded_imports - - def _safe_import_hook( - self, target_module_partname, source_module, target_attr_names, level=DEFAULT_IMPORT_LEVEL, edge_attr=None - ): - if source_module is not None: - # Gather all excluded imports for the referring modules, as well as its parents. - # For example, we want the excluded imports specified by hook for PIL to be also applied when the referring - # module is its submodule, PIL.Image. - excluded_imports = self._find_all_excluded_imports(source_module.identifier) - - # Apply extra processing only if we have any excluded-imports rules - if excluded_imports: - # Resolve the base module name. Level can be ABSOLUTE_IMPORT_LEVEL (= 0) for absolute imports, or an - # integer indicating the relative level. We do not use equality comparison just in case we ever happen - # to get ABSOLUTE_OR_RELATIVE_IMPORT_LEVEL (-1), which is a remnant of python2 days. - if level > ABSOLUTE_IMPORT_LEVEL: - if isinstance(source_module, Package): - # Package - base_module_name = source_module.identifier - else: - # Module in a package; base name must be the parent package name! - base_module_name = '.'.join(source_module.identifier.split('.')[:-1]) - - # Adjust the base module name based on level - if level > 1: - base_module_name = '.'.join(base_module_name.split('.')[:-(level - 1)]) - - if target_module_partname: - base_module_name += '.' + target_module_partname - else: - base_module_name = target_module_partname - - def _exclude_module(module_name, excluded_imports, referrer_name): - """ - Helper for checking whether given module should be excluded. - Returns the name of exclusion rule if module should be excluded, None otherwise. - """ - module_name_parts = module_name.split('.') - for excluded_import in excluded_imports: - excluded_import_parts = excluded_import.split('.') - match = module_name_parts[:len(excluded_import_parts)] == excluded_import_parts - if match: - # Check if the referrer is (was!) subject to the same rule. Because if it was and was - # analyzed anyway, some other import chain must have overrode the exclusion, and we should - # waive it here. A package hook might exclude a part (a subpackage) of the said package to - # prevent its collection when there are no external references; but when they are (for - # example, user explicitly imports the said subpackage in their program), we must let the - # subpackage import its submodules. - referrer_name_parts = referrer_name.split('.') - referrer_match = referrer_name_parts[:len(excluded_import_parts)] == excluded_import_parts - if referrer_match: - logger.debug( - "Deactivating suppression rule %r for module %r because it also applies to the " - "referrer (%r)...", excluded_import, module_name, referrer_name - ) - continue - - return excluded_import - return None - - # First, check if base module name is to be excluded. - # This covers both basic `import a` and `import a.b.c`, as well as `from d import e, f` where base - # module `d` is excluded. - excluded_import_rule = _exclude_module( - base_module_name, - excluded_imports, - source_module.identifier, - ) - if excluded_import_rule: - logger.debug( - "Suppressing import of %r from module %r due to excluded import %r specified in a hook for %r " - "(or its parent package(s)).", base_module_name, source_module.identifier, excluded_import_rule, - source_module.identifier - ) - return [] - - # If we have target attribute names, check each of them, and remove excluded ones from the - # `target_attr_names` list. - if target_attr_names: - filtered_target_attr_names = [] - for target_attr_name in target_attr_names: - submodule_name = base_module_name + '.' + target_attr_name - excluded_import_rule = _exclude_module( - submodule_name, - excluded_imports, - source_module.identifier, - ) - if excluded_import_rule: - logger.debug( - "Suppressing import of %r from module %r due to excluded import %r specified in a hook " - "for %r (or its parent package(s)).", submodule_name, source_module.identifier, - excluded_import_rule, source_module.identifier - ) - else: - filtered_target_attr_names.append(target_attr_name) - - # Swap with filtered target attribute names list; if no elements remain after the filtering, pass - # None... - target_attr_names = filtered_target_attr_names or None - - ret_modules = super()._safe_import_hook( - target_module_partname, source_module, target_attr_names, level, edge_attr - ) - - # Ensure that hooks are pre-loaded for returned module(s), in an attempt to ensure that hooks are called in the - # order of imports. The hooks are cached, so there should be no downsides to pre-loading hooks early (as opposed - # to loading them in post-graph analysis). When modules are imported from other modules, the hooks for those - # referring (source) modules and their parent package(s) are loaded by the exclusion mechanism that takes place - # before the above `super()._safe_import_hook` call. The code below attempts to complement that, but for the - # referred (target) modules and their parent package(s). - for ret_module in ret_modules: - if type(ret_module).__name__ not in VALID_MODULE_TYPES: - continue - # (Ab)use the `_find_all_excluded_imports` helper to load all hooks for the given module and its parent - # package(s). - self._find_all_excluded_imports(ret_module.identifier) - - return ret_modules - - def _safe_import_module(self, module_basename, module_name, parent_package): - """ - Create a new graph node for the module with the passed name under the parent package signified by the passed - graph node. - - This method wraps the superclass method with support for pre-import module hooks. If such a hook exists for - this module (e.g., a script `PyInstaller.hooks.hook-{module_name}` containing a function - `pre_safe_import_module()`), that hook will be run _before_ the superclass method is called. - - Pre-Safe-Import-Hooks are performed just *prior* to importing the module. When running the hook, the modules - parent package has already been imported and ti's `__path__` is set up. But the module is just about to be - imported. - - See the superclass method for description of parameters and return value. - """ - # If this module has a pre-safe import module hook, run it. Make sure to remove it first, to prevent subsequent - # calls from running it again. - hook = self._hooks_pre_safe_import_module.pop(module_name, None) - if hook is not None: - # Dynamically import this hook as a fabricated module. - hook_path, hook_basename = os.path.split(hook.hook_filename) - logger.info('Processing pre-safe-import-module hook %r from %r', hook_basename, hook_path) - hook_module_name = 'PyInstaller_hooks_pre_safe_import_module_' + module_name.replace('.', '_') - hook_module = importlib_load_source(hook_module_name, hook.hook_filename) - - # Object communicating changes made by this hook back to us. - hook_api = PreSafeImportModuleAPI( - module_graph=self, - module_basename=module_basename, - module_name=module_name, - parent_package=parent_package, - ) - - # Run this hook, passed this object. - if not hasattr(hook_module, 'pre_safe_import_module'): - raise NameError('pre_safe_import_module() function not defined by hook %r.' % hook_module) - hook_module.pre_safe_import_module(hook_api) - - # Respect method call changes requested by this hook. - module_basename = hook_api.module_basename - module_name = hook_api.module_name - - # Call the superclass method. - return super()._safe_import_module(module_basename, module_name, parent_package) - - def _find_module_path(self, fullname, module_name, search_dirs): - """ - Get a 3-tuple detailing the physical location of the module with the passed name if that module exists _or_ - raise `ImportError` otherwise. - - This method wraps the superclass method with support for pre-find module path hooks. If such a hook exists - for this module (e.g., a script `PyInstaller.hooks.hook-{module_name}` containing a function - `pre_find_module_path()`), that hook will be run _before_ the superclass method is called. - - See superclass method for parameter and return value descriptions. - """ - # If this module has a pre-find module path hook, run it. Make sure to remove it first, to prevent subsequent - # calls from running it again. - hook = self._hooks_pre_find_module_path.pop(fullname, None) - if hook is not None: - # Dynamically import this hook as a fabricated module. - hook_path, hook_basename = os.path.split(hook.hook_filename) - logger.info('Processing pre-find-module-path hook %r from %r', hook_basename, hook_path) - hook_fullname = 'PyInstaller_hooks_pre_find_module_path_' + fullname.replace('.', '_') - hook_module = importlib_load_source(hook_fullname, hook.hook_filename) - - # Object communicating changes made by this hook back to us. - hook_api = PreFindModulePathAPI( - module_graph=self, - module_name=fullname, - search_dirs=search_dirs, - ) - - # Run this hook, passed this object. - if not hasattr(hook_module, 'pre_find_module_path'): - raise NameError('pre_find_module_path() function not defined by hook %r.' % hook_module) - hook_module.pre_find_module_path(hook_api) - - # Respect search-directory changes requested by this hook. - search_dirs = hook_api.search_dirs - - # Call the superclass method. - return super()._find_module_path(fullname, module_name, search_dirs) - - def get_code_objects(self): - """ - Get code objects from ModuleGraph for pure Python modules. This allows to avoid writing .pyc/pyo files to hdd - at later stage. - - :return: Dict with module name and code object. - """ - code_dict = {} - mod_types = PURE_PYTHON_MODULE_TYPES - for node in self.iter_graph(start=self._top_script_node): - # TODO This is terrible. To allow subclassing, types should never be directly compared. Use isinstance() - # instead, which is safer, simpler, and accepts sets. Most other calls to type() in the codebase should also - # be refactored to call isinstance() instead. - - # get node type e.g. Script - mg_type = type(node).__name__ - if mg_type in mod_types: - if node.code: - code_dict[node.identifier] = node.code - return code_dict - - def _make_toc(self, typecode=None): - """ - Return the name, path and type of selected nodes as a TOC. The selection is determined by the given list - of PyInstaller TOC typecodes. If that list is empty we return the complete flattened graph as a TOC with the - ModuleGraph note types in place of typecodes -- meant for debugging only. Normally we return ModuleGraph - nodes whose types map to the requested PyInstaller typecode(s) as indicated in the MODULE_TYPES_TO_TOC_DICT. - - We use the ModuleGraph (really, ObjectGraph) flatten() method to scan all the nodes. This is patterned after - ModuleGraph.report(). - """ - toc = list() - for node in self.iter_graph(start=self._top_script_node): - entry = self._node_to_toc(node, typecode) - # Append the entry. We do not check for duplicates here; the TOC normalization is left to caller. - # However, as entries are obtained from modulegraph, there should not be any duplicates at this stage. - if entry is not None: - toc.append(entry) - return toc - - def make_pure_toc(self): - """ - Return all pure Python modules formatted as TOC. - """ - # PyInstaller should handle special module types without code object. - return self._make_toc(PURE_PYTHON_MODULE_TYPES) - - def make_binaries_toc(self): - """ - Return all binary Python modules formatted as TOC. - """ - return self._make_toc(BINARY_MODULE_TYPES) - - def make_missing_toc(self): - """ - Return all MISSING Python modules formatted as TOC. - """ - return self._make_toc(BAD_MODULE_TYPES) - - @staticmethod - def _node_to_toc(node, typecode=None): - # TODO This is terrible. Everything in Python has a type. It is nonsensical to even speak of "nodes [that] are - # not typed." How would that even occur? After all, even "None" has a type! (It is "NoneType", for the curious.) - # Remove this, please. - - # Get node type, e.g., Script - mg_type = type(node).__name__ - assert mg_type is not None - - if typecode and mg_type not in typecode: - # Type is not a to be selected one, skip this one - return None - # Extract the identifier and a path if any. - if mg_type == 'Script': - # for Script nodes only, identifier is a whole path - (name, ext) = os.path.splitext(node.filename) - name = os.path.basename(name) - elif mg_type == 'ExtensionPackage': - # Package with __init__ module being an extension module. This needs to end up as e.g. 'mypkg/__init__.so'. - # Convert the packages name ('mypkg') into the module name ('mypkg.__init__') *here* to keep special cases - # away elsewhere (where the module name is converted to a filename). - name = node.identifier + ".__init__" - else: - name = node.identifier - path = node.filename if node.filename is not None else '' - # Ensure name is really 'str'. Module graph might return object type 'modulegraph.Alias' which inherits fromm - # 'str'. But 'marshal.dumps()' function is able to marshal only 'str'. Otherwise on Windows PyInstaller might - # fail with message like: - # ValueError: unmarshallable object - name = str(name) - # Translate to the corresponding TOC typecode. - toc_type = MODULE_TYPES_TO_TOC_DICT[mg_type] - return name, path, toc_type - - def nodes_to_toc(self, nodes): - """ - Given a list of nodes, create a TOC representing those nodes. This is mainly used to initialize a TOC of - scripts with the ones that are runtime hooks. The process is almost the same as _make_toc(), but the caller - guarantees the nodes are valid, so minimal checking. - """ - return [self._node_to_toc(node) for node in nodes] - - # Return true if the named item is in the graph as a BuiltinModule node. The passed name is a basename. - def is_a_builtin(self, name): - node = self.find_node(name) - if node is None: - return False - return type(node).__name__ == 'BuiltinModule' - - def get_importers(self, name): - """ - List all modules importing the module with the passed name. - - Returns a list of (identifier, DependencyIinfo)-tuples. If the names module has not yet been imported, this - method returns an empty list. - - Parameters - ---------- - name : str - Fully-qualified name of the module to be examined. - - Returns - ---------- - list - List of (fully-qualified names, DependencyIinfo)-tuples of all modules importing the module with the passed - fully-qualified name. - - """ - def get_importer_edge_data(importer): - edge = self.graph.edge_by_node(importer, name) - # edge might be None in case an AliasModule was added. - if edge is not None: - return self.graph.edge_data(edge) - - node = self.find_node(name) - if node is None: - return [] - _, importers = self.get_edges(node) - importers = (importer.identifier for importer in importers if importer is not None) - return [(importer, get_importer_edge_data(importer)) for importer in importers] - - # TODO: create a class from this function. - def analyze_runtime_hooks(self, custom_runhooks): - """ - Analyze custom run-time hooks and run-time hooks implied by found modules. - - :return : list of Graph nodes. - """ - rthooks_nodes = [] - logger.info('Analyzing run-time hooks ...') - # Process custom runtime hooks (from --runtime-hook options). The runtime hooks are order dependent. First hooks - # in the list are executed first. Put their graph nodes at the head of the priority_scripts list Pyinstaller - # defined rthooks and thus they are executed first. - if custom_runhooks: - for hook_file in custom_runhooks: - logger.info("Including custom run-time hook %r", hook_file) - hook_file = os.path.abspath(hook_file) - # Not using "try" here because the path is supposed to exist, if it does not, the raised error will - # explain. - rthooks_nodes.append(self.add_script(hook_file)) - - # Find runtime hooks that are implied by packages already imported. Get a temporary TOC listing all the scripts - # and packages graphed so far. Assuming that runtime hooks apply only to modules and packages. - temp_toc = self._make_toc(VALID_MODULE_TYPES) - for (mod_name, path, typecode) in temp_toc: - # Look if there is any run-time hook for given module. - if mod_name in self._available_rthooks: - # There could be several run-time hooks for a module. - for abs_path in self._available_rthooks[mod_name]: - hook_path, hook_basename = os.path.split(abs_path) - logger.info("Including run-time hook %r from %r", hook_basename, hook_path) - rthooks_nodes.append(self.add_script(abs_path)) - - return rthooks_nodes - - def add_hiddenimports(self, module_list): - """ - Add hidden imports that are either supplied as CLI option --hidden-import=MODULENAME or as dependencies from - some PyInstaller features when enabled (e.g., crypto feature). - """ - assert self._top_script_node is not None - # Analyze the script's hidden imports (named on the command line). - for modnm in module_list: - node = self.find_node(modnm) - if node is not None: - logger.debug('Hidden import %r already found', modnm) - else: - logger.info("Analyzing hidden import %r", modnm) - # ModuleGraph throws ImportError if import not found. - try: - nodes = self.import_hook(modnm) - assert len(nodes) == 1 - node = nodes[0] - except ImportError: - logger.error("Hidden import %r not found", modnm) - continue - # Create references from the top script to the hidden import, even if found otherwise. Do not waste time - # checking whether it is actually added by this (test-) script. - self.add_edge(self._top_script_node, node) - - def get_code_using(self, module: str) -> dict: - """ - Find modules that import a given **module**. - """ - co_dict = {} - pure_python_module_types = PURE_PYTHON_MODULE_TYPES | { - 'Script', - } - node = self.find_node(module) - if node: - referrers = self.incoming(node) - for r in referrers: - # Under python 3.7 and earlier, if `module` is added to hidden imports, one of referrers ends up being - # None, causing #3825. Work around it. - if r is None: - continue - # Ensure that modulegraph objects have 'code' attribute. - if type(r).__name__ not in pure_python_module_types: - continue - identifier = r.identifier - if identifier == module or identifier.startswith(module + '.'): - # Skip self references or references from `modules`'s own submodules. - continue - # The code object may be None if referrer ends up shadowed by eponymous directory that ends up treated - # as a namespace package. See #6873 for an example. - if r.code is None: - continue - co_dict[r.identifier] = r.code - return co_dict - - def metadata_required(self) -> set: - """ - Collect metadata for all packages that appear to need it. - """ - - # List every function that we can think of which is known to require metadata. - out = set() - - out |= self._metadata_from( - "pkg_resources", - ["get_distribution"], # Requires metadata for one distribution. - ["require"], # Requires metadata for all dependencies. - ) - - # importlib.metadata is often `import ... as` aliased to importlib_metadata for compatibility with < py38. - # Assume both are valid. - for importlib_metadata in ["importlib.metadata", "importlib_metadata"]: - out |= self._metadata_from( - importlib_metadata, - ["metadata", "distribution", "version", "files", "requires"], - [], - ) - - return out - - def _metadata_from(self, package, methods=(), recursive_methods=()) -> set: - """ - Collect metadata whose requirements are implied by given function names. - - Args: - package: - The module name that must be imported in a source file to trigger the search. - methods: - Function names from **package** which take a distribution name as an argument and imply that metadata - is required for that distribution. - recursive_methods: - Like **methods** but also implies that a distribution's dependencies' metadata must be collected too. - Returns: - Required metadata in hook data ``(source, dest)`` format as returned by - :func:`PyInstaller.utils.hooks.copy_metadata()`. - - Scan all source code to be included for usage of particular *key* functions which imply that that code will - require metadata for some distribution (which may not be its own) at runtime. In the case of a match, - collect the required metadata. - """ - from PyInstaller.utils.hooks import copy_metadata - from PyInstaller.compat import importlib_metadata - - # Generate sets of possible function names to search for. - need_metadata = set() - need_recursive_metadata = set() - for method in methods: - need_metadata.update(bytecode.any_alias(package + "." + method)) - for method in recursive_methods: - need_recursive_metadata.update(bytecode.any_alias(package + "." + method)) - - out = set() - - for name, code in self.get_code_using(package).items(): - for calls in bytecode.recursive_function_calls(code).values(): - for function_name, args in calls: - # Only consider function calls taking one argument. - if len(args) != 1: - continue - package = args[0] - try: - if function_name in need_metadata: - out.update(copy_metadata(package)) - elif function_name in need_recursive_metadata: - out.update(copy_metadata(package, recursive=True)) - - except importlib_metadata.PackageNotFoundError: - # Currently, we opt to silently skip over missing metadata. - continue - - return out - - def get_collected_packages(self) -> list: - """ - Return the list of collected python packages. - """ - # `node.identifier` might be an instance of `modulegraph.Alias`, hence explicit conversion to `str`. - return [ - str(node.identifier) for node in self.iter_graph(start=self._top_script_node) - if type(node).__name__ == 'Package' - ] - - def make_hook_binaries_toc(self) -> list: - """ - Return the TOC list of binaries collected by hooks." - """ - toc = [] - for node in self.iter_graph(start=self._top_script_node): - module_name = str(node.identifier) - for dest_name, src_name in self._additional_files_cache.binaries(module_name): - toc.append((dest_name, src_name, 'BINARY')) - - return toc - - def make_hook_datas_toc(self) -> list: - """ - Return the TOC list of data files collected by hooks." - """ - toc = [] - for node in self.iter_graph(start=self._top_script_node): - module_name = str(node.identifier) - for dest_name, src_name in self._additional_files_cache.datas(module_name): - toc.append((dest_name, src_name, 'DATA')) - - return toc - - -_cached_module_graph_ = None - - -def initialize_modgraph(excludes=(), user_hook_dirs=()): - """ - Create the cached module graph. - - This function might appear weird but is necessary for speeding up test runtime because it allows caching basic - ModuleGraph object that gets created for 'base_library.zip'. - - Parameters - ---------- - excludes : list - List of the fully-qualified names of all modules to be "excluded" and hence _not_ frozen into the executable. - user_hook_dirs : list - List of the absolute paths of all directories containing user-defined hooks for the current application or - `None` if no such directories were specified. - - Returns - ---------- - PyiModuleGraph - Module graph with core dependencies. - """ - # Normalize parameters to ensure tuples and make comparison work. - user_hook_dirs = user_hook_dirs or () - excludes = excludes or () - - # Ensure that __main__ is always excluded from the modulegraph, to prevent accidentally pulling PyInstaller itself - # into the modulegraph. This seems to happen on Windows, because modulegraph is able to resolve `__main__` as - # `.../PyInstaller.exe/__main__.py` and analyze it. The `__main__` has a different meaning during analysis compared - # to the program run-time, when it refers to the program's entry-point (which would always be part of the - # modulegraph anyway, by virtue of being the starting point of the analysis). - if "__main__" not in excludes: - excludes += ("__main__",) - - # If there is a graph cached with the same excludes, reuse it. See ``PyiModulegraph._reset()`` for what is - # reset. This cache is used primarily to speed up the test-suite. Fixture `pyi_modgraph` calls this function with - # empty excludes, creating a graph suitable for the huge majority of tests. - global _cached_module_graph_ - if _cached_module_graph_ and _cached_module_graph_._excludes == excludes: - logger.info('Reusing cached module dependency graph...') - graph = deepcopy(_cached_module_graph_) - graph._reset(user_hook_dirs) - return graph - - logger.info('Initializing module dependency graph...') - - # Construct the initial module graph by analyzing all import statements. - graph = PyiModuleGraph( - HOMEPATH, - excludes=excludes, - # get_implies() are hidden imports known by modulgraph. - implies=get_implies(), - user_hook_dirs=user_hook_dirs, - ) - - if not _cached_module_graph_: - # Only cache the first graph, see above for explanation. - logger.info('Caching module dependency graph...') - # cache a deep copy of the graph - _cached_module_graph_ = deepcopy(graph) - # Clear data which does not need to be copied from the cached graph since it will be reset by - # ``PyiModulegraph._reset()`` anyway. - _cached_module_graph_._hooks = None - _cached_module_graph_._hooks_pre_safe_import_module = None - _cached_module_graph_._hooks_pre_find_module_path = None - - return graph - - -def get_bootstrap_modules(): - """ - Get TOC with the bootstrapping modules and their dependencies. - :return: TOC with modules - """ - # Import 'struct' modules to get real paths to module file names. - mod_struct = __import__('struct') - # Basic modules necessary for the bootstrap process. - loader_mods = list() - loaderpath = os.path.join(HOMEPATH, 'PyInstaller', 'loader') - # On some platforms (Windows, Debian/Ubuntu) '_struct' and zlib modules are built-in modules (linked statically) - # and thus does not have attribute __file__. 'struct' module is required for reading Python bytecode from - # executable. 'zlib' is required to decompress this bytecode. - for mod_name in ['_struct', 'zlib']: - mod = __import__(mod_name) # C extension. - if hasattr(mod, '__file__'): - mod_file = os.path.abspath(mod.__file__) - # Resolve full destination name for extension, diverting it into python3.x/lib-dynload directory if - # necessary (to match behavior for extension collection introduced in #5604). - mod_dest = destination_name_for_extension(mod_name, mod_file, 'EXTENSION') - loader_mods.append((mod_dest, mod_file, 'EXTENSION')) - loader_mods.append(('struct', os.path.abspath(mod_struct.__file__), 'PYMODULE')) - # Loader/bootstrap modules. - # NOTE: These modules should be kept simple without any complicated dependencies. - loader_mods += [ - ('pyimod01_archive', os.path.join(loaderpath, 'pyimod01_archive.py'), 'PYMODULE'), - ('pyimod02_importers', os.path.join(loaderpath, 'pyimod02_importers.py'), 'PYMODULE'), - ('pyimod03_ctypes', os.path.join(loaderpath, 'pyimod03_ctypes.py'), 'PYMODULE'), - ] - if is_win: - loader_mods.append(('pyimod04_pywin32', os.path.join(loaderpath, 'pyimod04_pywin32.py'), 'PYMODULE')) - # The bootstrap script - loader_mods.append(('pyiboot01_bootstrap', os.path.join(loaderpath, 'pyiboot01_bootstrap.py'), 'PYSOURCE')) - return loader_mods diff --git a/voxvera/vendor/PyInstaller/depend/bindepend.py b/voxvera/vendor/PyInstaller/depend/bindepend.py deleted file mode 100755 index 23b3769..0000000 --- a/voxvera/vendor/PyInstaller/depend/bindepend.py +++ /dev/null @@ -1,1131 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Find external dependencies of binary libraries. -""" - -import ctypes.util -import functools -import os -import pathlib -import re -import sys -import sysconfig -import subprocess - -from PyInstaller import compat -from PyInstaller import log as logging -from PyInstaller.depend import dylib, utils -from PyInstaller.utils.win32 import winutils -from PyInstaller.exceptions import PythonLibraryNotFoundError - -if compat.is_darwin: - import PyInstaller.utils.osx as osxutils - -logger = logging.getLogger(__name__) - -_exe_machine_type = None -if compat.is_win: - _exe_machine_type = winutils.get_pe_file_machine_type(compat.python_executable) - -#- High-level binary dependency analysis - - -def _get_paths_for_parent_directory_preservation(): - """ - Return list of paths that serve as prefixes for parent-directory preservation of collected binaries and/or - shared libraries. If a binary is collected from a location that starts with a path from this list, the relative - directory structure is preserved within the frozen application bundle; otherwise, the binary is collected to the - frozen application's top-level directory. - """ - - # Use only site-packages paths. We have no control over contents of `sys.path`, so using all paths from that may - # lead to unintended behavior in corner cases. For example, if `sys.path` contained the drive root (see #7028), - # all paths that do not match some other sub-path rooted in that drive will end up recognized as relative to the - # drive root. In such case, any DLL collected from `c:\Windows\system32` will be collected into `Windows\system32` - # sub-directory; ucrt DLLs collected from MSVC or Windows SDK installed in `c:\Program Files\...` will end up - # collected into `Program Files\...` subdirectory; etc. - # - # On the other hand, the DLL parent directory preservation is primarily aimed at packages installed via PyPI - # wheels, which are typically installed into site-packages. Therefore, limiting the directory preservation for - # shared libraries collected from site-packages should do the trick, and should be reasonably safe. - import site - - orig_paths = site.getsitepackages() - orig_paths.append(site.getusersitepackages()) - - # Explicitly excluded paths. `site.getsitepackages` seems to include `sys.prefix`, which we need to exclude, to - # avoid issue swith DLLs in its sub-directories. We need both resolved and unresolved variant to handle cases - # where `base_prefix` itself is a symbolic link (e.g., `scoop`-installed python on Windows, see #8023). - excluded_paths = { - pathlib.Path(sys.base_prefix), - pathlib.Path(sys.base_prefix).resolve(), - pathlib.Path(sys.prefix), - pathlib.Path(sys.prefix).resolve(), - } - - # For each path in orig_paths, append a resolved variant. This helps with linux venv where we need to consider - # both `venv/lib/python3.11/site-packages` and `venv/lib/python3.11/site-packages` and `lib64` is a symlink - # to `lib`. - orig_paths += [pathlib.Path(path).resolve() for path in orig_paths] - - paths = set() - for path in orig_paths: - if not path: - continue - path = pathlib.Path(path) - # Filter out non-directories (e.g., /path/to/python3x.zip) or non-existent paths - if not path.is_dir(): - continue - # Filter out explicitly excluded paths - if path in excluded_paths: - continue - paths.add(path) - - # Sort by length (in term of path components) to ensure match against the longest common prefix (for example, match - # /path/to/venv/lib/site-packages instead of /path/to/venv when both paths are in site paths). - paths = sorted(paths, key=lambda x: len(x.parents), reverse=True) - - return paths - - -def _select_destination_directory(src_filename, parent_dir_preservation_paths): - # Check parent directory preservation paths - for parent_dir_preservation_path in parent_dir_preservation_paths: - if parent_dir_preservation_path in src_filename.parents: - # Collect into corresponding sub-directory. - return src_filename.relative_to(parent_dir_preservation_path) - - # Collect into top-level directory. - return src_filename.name - - -def binary_dependency_analysis(binaries, search_paths=None, symlink_suppression_patterns=None): - """ - Perform binary dependency analysis on the given TOC list of collected binaries, by recursively scanning each binary - for linked dependencies (shared library imports). Returns new TOC list that contains both original entries and their - binary dependencies. - - Additional search paths for dependencies' full path resolution may be supplied via optional argument. - """ - - # Get all path prefixes for binaries' parent-directory preservation. For binaries collected from packages in (for - # example) site-packages directory, we should try to preserve the parent directory structure. - parent_dir_preservation_paths = _get_paths_for_parent_directory_preservation() - - # Keep track of processed binaries and processed dependencies. - processed_binaries = set() - processed_dependencies = set() - - # Keep track of unresolved dependencies, in order to defer the missing-library warnings until after everything has - # been processed. This allows us to suppress warnings for dependencies that end up being collected anyway; for - # details, see the end of this function. - missing_dependencies = [] - - # Populate output TOC with input binaries - this also serves as TODO list, as we iterate over it while appending - # new entries at the end. - output_toc = binaries[:] - for dest_name, src_name, typecode in output_toc: - # Do not process symbolic links (already present in input TOC list, or added during analysis below). - if typecode == 'SYMLINK': - continue - - # Keep track of processed binaries, to avoid unnecessarily repeating analysis of the same file. Use pathlib.Path - # to avoid having to worry about case normalization. - src_path = pathlib.Path(src_name) - if src_path in processed_binaries: - continue - processed_binaries.add(src_path) - - logger.debug("Analyzing binary %r", src_name) - - # Analyze imports (linked dependencies) - for dep_name, dep_src_path in get_imports(src_name, search_paths): - logger.debug("Processing dependency, name: %r, resolved path: %r", dep_name, dep_src_path) - - # Skip unresolved dependencies. Defer the missing-library warnings until after binary dependency analysis - # is complete. - if not dep_src_path: - missing_dependencies.append((dep_name, src_name)) - continue - - # Compare resolved dependency against global inclusion/exclusion rules. - if not dylib.include_library(dep_src_path): - logger.debug("Skipping dependency %r due to global exclusion rules.", dep_src_path) - continue - - dep_src_path = pathlib.Path(dep_src_path) # Turn into pathlib.Path for subsequent processing - - # Avoid processing this dependency if we have already processed it. - if dep_src_path in processed_dependencies: - logger.debug("Skipping dependency %r due to prior processing.", str(dep_src_path)) - continue - processed_dependencies.add(dep_src_path) - - # Try to preserve parent directory structure, if applicable. - # NOTE: do not resolve the source path, because on macOS and linux, it may be a versioned .so (e.g., - # libsomething.so.1, pointing at libsomething.so.1.2.3), and we need to collect it under original name! - dep_dest_path = _select_destination_directory(dep_src_path, parent_dir_preservation_paths) - dep_dest_path = pathlib.PurePath(dep_dest_path) # Might be a str() if it is just a basename... - - # If we are collecting library into top-level directory on macOS, check whether it comes from a - # .framework bundle. If it does, re-create the .framework bundle in the top-level directory - # instead. - if compat.is_darwin and dep_dest_path.parent == pathlib.PurePath('.'): - if osxutils.is_framework_bundle_lib(dep_src_path): - # dst_src_path is parent_path/Name.framework/Versions/Current/Name - framework_parent_path = dep_src_path.parent.parent.parent.parent - dep_dest_path = pathlib.PurePath(dep_src_path.relative_to(framework_parent_path)) - - logger.debug("Collecting dependency %r as %r.", str(dep_src_path), str(dep_dest_path)) - output_toc.append((str(dep_dest_path), str(dep_src_path), 'BINARY')) - - # On non-Windows, if we are not collecting the binary into application's top-level directory ('.'), - # add a symbolic link from top-level directory to the actual location. This is to accommodate - # LD_LIBRARY_PATH being set to the top-level application directory on linux (although library search - # should be mostly done via rpaths, so this might be redundant) and to accommodate library path - # rewriting on macOS, which assumes that the library was collected into top-level directory. - if compat.is_win: - # We do not use symlinks on Windows. - pass - elif dep_dest_path.parent == pathlib.PurePath('.'): - # The shared library itself is being collected into top-level application directory. - pass - elif any(dep_src_path.match(pattern) for pattern in symlink_suppression_patterns): - # Honor symlink suppression patterns specified by hooks. - logger.debug( - "Skipping symbolic link from %r to top-level application directory due to source path matching one " - "of symlink suppression path patterns.", str(dep_dest_path) - ) - else: - logger.debug("Adding symbolic link from %r to top-level application directory.", str(dep_dest_path)) - output_toc.append((str(dep_dest_path.name), str(dep_dest_path), 'SYMLINK')) - - # Handle missing dependencies: display warnings, add missing symbolic links to top-level application directory, etc. - seen_binaries = { - os.path.normcase(os.path.basename(src_name)): (dest_name, src_name, typecode) - for dest_name, src_name, typecode in output_toc if typecode != 'SYMLINK' - } - existing_symlinks = set([dest_name for dest_name, src_name, typecode in output_toc if typecode == 'SYMLINK']) - - for dependency_name, referring_binary in missing_dependencies: - # Ignore libraries that we would not collect in the first place. - if not dylib.include_library(dependency_name): - continue - - # If the binary with a matching basename happens to be among the discovered binaries, suppress the message as - # well. This might happen either because the library was collected by some other mechanism (for example, via - # hook, or supplied by the user), or because it was discovered during the analysis of another binary (which, - # for example, had properly set run-paths on Linux/macOS or was located next to that other analyzed binary on - # Windows). - # - # On non-Windows, also check if symbolic link to the discovered binary already exists in the top-level - # application directory, and if not, create it. This is important especially on macOS, where our library path - # rewriting assumes that all dependent libraries are available in the top-level application directory, or - # linked into it. - dependency_basename = os.path.normcase(os.path.basename(dependency_name)) - dependency_toc_entry = seen_binaries.get(dependency_basename, None) - if dependency_toc_entry is None: - # Not found, emit a warning (subject to global warning suppression rules). - if not dylib.warn_missing_lib(dependency_name): - continue - logger.warning( - "Library not found: could not resolve %r, dependency of %r.", dependency_name, referring_binary - ) - elif not compat.is_win: - # Found; generate symbolic link if necessary. - dependency_dest_path = pathlib.PurePath(dependency_toc_entry[0]) - dependency_src_path = pathlib.Path(dependency_toc_entry[1]) - - if dependency_dest_path.parent == pathlib.PurePath('.'): - # The binary is collected into top-level application directory. - continue - elif dependency_basename in existing_symlinks: - # The symbolic link already exists. - continue - - # Keep honoring symlink suppression patterns specified by hooks (same as in main binary dependency analysis - # loop). - if any(dependency_src_path.match(pattern) for pattern in symlink_suppression_patterns): - logger.info( - "Missing dependency handling: skipping symbolic link from %r to top-level application directory " - "due to source path matching one of symlink suppression path patterns.", str(dependency_dest_path) - ) - continue - - # Create the symbolic link - logger.info( - "Missing dependency handling: adding symbolic link from %r to top-level application directory.", - str(dependency_dest_path) - ) - output_toc.append((dependency_basename, str(dependency_dest_path), 'SYMLINK')) - existing_symlinks.add(dependency_basename) - - return output_toc - - -#- Low-level import analysis - - -def get_imports(filename, search_paths=None): - """ - Analyze the given binary file (shared library or executable), and obtain the list of shared libraries it imports - (i.e., link-time dependencies). - - Returns set of tuples (name, fullpath). The name component is the referenced name, and on macOS, may not be just - a base name. If the library's full path cannot be resolved, fullpath element is None. - - Additional list of search paths may be specified via `search_paths`, to be used as a fall-back when the - platform-specific resolution mechanism fails to resolve a library fullpath. - """ - if compat.is_win: - if str(filename).lower().endswith(".manifest"): - return [] - return _get_imports_pefile(filename, search_paths) - elif compat.is_darwin: - return _get_imports_macholib(filename, search_paths) - else: - return _get_imports_ldd(filename, search_paths) - - -def _get_imports_pefile(filename, search_paths): - """ - Windows-specific helper for `get_imports`, which uses the `pefile` library to walk through PE header. - """ - import pefile - - output = set() - - # By default, pefile library parses all PE information. We are only interested in the list of dependent dlls. - # Performance is improved by reading only needed information. https://code.google.com/p/pefile/wiki/UsageExamples - pe = pefile.PE(filename, fast_load=True) - pe.parse_data_directories( - directories=[ - pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_IMPORT'], - pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_EXPORT'], - ], - forwarded_exports_only=True, - import_dllnames_only=True, - ) - - # If a library has no binary dependencies, pe.DIRECTORY_ENTRY_IMPORT does not exist. - for entry in getattr(pe, 'DIRECTORY_ENTRY_IMPORT', []): - dll_str = entry.dll.decode('utf-8') - output.add(dll_str) - - # We must also read the exports table to find forwarded symbols: - # http://blogs.msdn.com/b/oldnewthing/archive/2006/07/19/671238.aspx - exported_symbols = getattr(pe, 'DIRECTORY_ENTRY_EXPORT', None) - if exported_symbols: - for symbol in exported_symbols.symbols: - if symbol.forwarder is not None: - # symbol.forwarder is a bytes object. Convert it to a string. - forwarder = symbol.forwarder.decode('utf-8') - # symbol.forwarder is for example 'KERNEL32.EnterCriticalSection' - dll = forwarder.split('.')[0] - output.add(dll + ".dll") - - pe.close() - - # Attempt to resolve full paths to referenced DLLs. Always add the input binary's parent directory to the search - # paths. - search_paths = [os.path.dirname(filename)] + (search_paths or []) - output = {(lib, resolve_library_path(lib, search_paths)) for lib in output} - - return output - - -def _get_imports_ldd(filename, search_paths): - """ - Helper for `get_imports`, which uses `ldd` to analyze shared libraries. Used on Linux and other POSIX-like platforms - (with exception of macOS). - """ - - output = set() - - # Output of ldd varies between platforms... - if compat.is_aix: - # Match libs of the form - # 'archivelib.a(objectmember.so/.o)' - # or - # 'sharedlib.so' - # Will not match the fake lib '/unix' - LDD_PATTERN = re.compile(r"^\s*(((?P(.*\.a))(?P\(.*\)))|((?P(.*\.so))))$") - elif compat.is_hpux: - # Match libs of the form - # 'sharedlib.so => full-path-to-lib - # e.g. - # 'libpython2.7.so => /usr/local/lib/hpux32/libpython2.7.so' - LDD_PATTERN = re.compile(r"^\s+(.*)\s+=>\s+(.*)$") - elif compat.is_solar: - # Match libs of the form - # 'sharedlib.so => full-path-to-lib - # e.g. - # 'libpython2.7.so.1.0 => /usr/local/lib/libpython2.7.so.1.0' - # Will not match the platform specific libs starting with '/platform' - LDD_PATTERN = re.compile(r"^\s+(.*)\s+=>\s+(.*)$") - elif compat.is_linux: - # Match libs of the form - # libpython3.13.so.1.0 => /home/brenainn/.pyenv/versions/3.13.0/lib/libpython3.13.so.1.0 (0x00007a9e15800000) - # or - # /tmp/python/install/bin/../lib/libpython3.13.so.1.0 (0x00007b9489c82000) - LDD_PATTERN = re.compile(r"^\s*(?:(.*?)\s+=>\s+)?(.*?)\s+\(.*\)") - else: - LDD_PATTERN = re.compile(r"\s*(.*?)\s+=>\s+(.*?)\s+\(.*\)") - - # Resolve symlinks since GNU ldd contains a bug in processing a symlink to a binary - # using $ORIGIN: https://sourceware.org/bugzilla/show_bug.cgi?id=25263 - p = subprocess.run( - ['ldd', os.path.realpath(filename)], - stdin=subprocess.DEVNULL, - stderr=subprocess.PIPE, - stdout=subprocess.PIPE, - encoding='utf-8', - ) - - ldd_warnings = [] - for line in p.stderr.splitlines(): - if not line: - continue - # Python extensions (including stdlib ones) are not linked against python.so but rely on Python's symbols having - # already been loaded into symbol space at runtime. musl's ldd issues a series of harmless warnings to stderr - # telling us that those symbols are unfindable. These should be suppressed. - elif line.startswith("Error relocating ") and line.endswith(" symbol not found"): - continue - # Shared libraries should have the executable bits set; however, this is not the case for shared libraries - # shipped in PyPI wheels, which cause ldd to emit `ldd: warning: you do not have execution permission for ...` - # warnings. Suppress these. - elif line.startswith("ldd: warning: you do not have execution permission for "): - continue - # When `ldd` is ran against a file that is not a dynamic binary (i.e., is not a binary at all, or is a static - # binary), it emits a "not a dynamic executable" warning. Suppress it. - elif "not a dynamic executable" in line: - continue - # Propagate any other warnings it might have. - ldd_warnings.append(line) - if ldd_warnings: - logger.warning("ldd warnings for %r:\n%s", filename, "\n".join(ldd_warnings)) - - for line in p.stdout.splitlines(): - name = None # Referenced name - lib = None # Resolved library path - - m = LDD_PATTERN.search(line) - if m: - if compat.is_aix: - libarchive = m.group('libarchive') - if libarchive: - # We matched an archive lib with a request for a particular embedded shared object. - # 'archivelib.a(objectmember.so/.o)' - lib = libarchive - name = os.path.basename(lib) + m.group('objectmember') - else: - # We matched a stand-alone shared library. - # 'sharedlib.so' - lib = m.group('libshared') - name = os.path.basename(lib) - elif compat.is_hpux: - name, lib = m.group(1), m.group(2) - else: - name, lib = m.group(1), m.group(2) - name = name or os.path.basename(lib) - if compat.is_linux: - # Skip all ld variants listed https://sourceware.org/glibc/wiki/ABIList - # plus musl's ld-musl-*.so.*. - if re.fullmatch(r"ld(64)?(-linux|-musl)?(-.+)?\.so(\..+)?", os.path.basename(lib)): - continue - if name[:10] in ('linux-gate', 'linux-vdso'): - # linux-gate is a fake library which does not exist and should be ignored. See also: - # http://www.trilithium.com/johan/2005/08/linux-gate/ - continue - - if compat.is_cygwin: - # exclude Windows system library - if lib.lower().startswith('/cygdrive/c/windows/system'): - continue - - # Reset library path if it does not exist - if not os.path.exists(lib): - lib = None - elif line.endswith("not found"): - # On glibc-based linux distributions, missing libraries are marked with name.so => not found - tokens = line.split('=>') - if len(tokens) != 2: - continue - name = tokens[0].strip() - lib = None - else: - # TODO: should we warn about unprocessed lines? - continue - - # Fall back to searching the supplied search paths, if any. - if not lib: - lib = _resolve_library_path_in_search_paths( - os.path.basename(name), # Search for basename of the referenced name. - search_paths, - ) - - # Normalize the resolved path, to remove any extraneous "../" elements. - if lib: - lib = os.path.normpath(lib) - - # Return referenced name as-is instead of computing a basename, to provide additional context when library - # cannot be resolved. - output.add((name, lib)) - - return output - - -def _get_imports_macholib(filename, search_paths): - """ - macOS-specific helper for `get_imports`, which uses `macholib` to analyze library load commands in Mach-O headers. - """ - from macholib.dyld import dyld_find - from macholib.mach_o import LC_RPATH - from macholib.MachO import MachO - - try: - from macholib.dyld import _dyld_shared_cache_contains_path - except ImportError: - _dyld_shared_cache_contains_path = None - - output = set() - - # Parent directory of the input binary and parent directory of python executable, used to substitute @loader_path - # and @executable_path. The macOS dylib loader (dyld) fully resolves the symbolic links when using @loader_path - # and @executable_path references, so we need to do the same using `os.path.realpath`. - bin_path = os.path.dirname(os.path.realpath(filename)) - python_bin = os.path.realpath(sys.executable) - python_bin_path = os.path.dirname(python_bin) - - def _get_referenced_libs(m): - # Collect referenced libraries from MachO object. - referenced_libs = set() - for header in m.headers: - for idx, name, lib in header.walkRelocatables(): - referenced_libs.add(lib) - return referenced_libs - - def _get_run_paths(m): - # Find LC_RPATH commands to collect rpaths from MachO object. - # macholib does not handle @rpath, so we need to handle run paths ourselves. - run_paths = [] - for header in m.headers: - for command in header.commands: - # A command is a tuple like: - # (, - # , - # '../lib\x00\x00') - cmd_type = command[0].cmd - if cmd_type == LC_RPATH: - rpath = command[2].decode('utf-8') - # Remove trailing '\x00' characters. E.g., '../lib\x00\x00' - rpath = rpath.rstrip('\x00') - # If run path starts with @, ensure it starts with either @loader_path or @executable_path. - # We cannot process anything else. - if rpath.startswith("@") and not rpath.startswith(("@executable_path", "@loader_path")): - logger.warning("Unsupported rpath format %r found in binary %r - ignoring...", rpath, filename) - continue - run_paths.append(rpath) - return run_paths - - @functools.lru_cache - def get_run_paths_and_referenced_libs(filename): - # Walk through Mach-O headers, and collect all referenced libraries and run paths. - m = MachO(filename) - return _get_referenced_libs(m), _get_run_paths(m) - - @functools.lru_cache - def get_run_paths(filename): - # Walk through Mach-O headers, and collect only run paths. - return _get_run_paths(MachO(filename)) - - # Collect referenced libraries and run paths from the input binary. - referenced_libs, run_paths = get_run_paths_and_referenced_libs(filename) - - # On macOS, run paths (rpaths) are inherited from the executable that loads the given shared library (or from the - # shared library that loads the given shared library). This means that shared libraries and python binary extensions - # can reference other shared libraries using @rpath without having set any run paths themselves. - # - # In order to simulate the run path inheritance that happens in unfrozen python programs, we need to augment the - # run paths from the given binary with those set by the python interpreter executable (`sys.executable`). Anaconda - # python, for example, sets the run path on the python executable to `@loader_path/../lib`, which allows python - # extensions to reference shared libraries in the Anaconda environment's `lib` directory via only `@rpath` - # (for example, the `_ssl` extension can reference the OpenSSL library as `@rpath/libssl.3.dylib`). In another - # example, python executable has its run path set to the top-level directory of its .framework bundle; in this - # case the `ssl` extension references the OpenSSL library as `@rpath/Versions/3.10/lib/libssl.1.1.dylib`. - run_paths += get_run_paths(python_bin) - - # This fallback should be fully superseded by the above recovery of run paths from python executable; but for now, - # keep it around in case of unforeseen corner cases. - run_paths.append(os.path.join(compat.base_prefix, 'lib')) - - # De-duplicate run_paths while preserving their order. - run_paths = list(dict.fromkeys(run_paths)) - - def _resolve_using_path(lib): - # Absolute paths should not be resolved; we should just check whether the library exists or not. This used to - # be done using macholib's dyld_find() as well (as it properly handles system libraries that are hidden on - # Big Sur and later), but it turns out that even if given an absolute path, it gives precedence to search paths - # from DYLD_LIBRARY_PATH. This leads to confusing errors when directory in DYLD_LIBRARY_PATH contains a file - # (shared library or data file) that happens to have the same name as a library from a system framework. - if os.path.isabs(lib): - if _dyld_shared_cache_contains_path is not None and _dyld_shared_cache_contains_path(lib): - return lib - if os.path.isfile(lib): - return lib - return None - - try: - return dyld_find(lib) - except ValueError: - return None - - def _resolve_using_loader_path(lib, bin_path, python_bin_path): - # Strictly speaking, @loader_path should be anchored to parent directory of analyzed binary (`bin_path`), while - # @executable_path should be anchored to the parent directory of the process' executable. Typically, this would - # be python executable (`python_bin_path`). Unless we are analyzing a collected 3rd party executable; in that - # case, `bin_path` is correct option. So we first try resolving using `bin_path`, and then fall back to - # `python_bin_path`. This does not account for transitive run paths of higher-order dependencies, but there is - # only so much we can do here... - # - # NOTE: do not use macholib's `dyld_find`, because its fallback search locations might end up resolving wrong - # instance of the library! For example, if our `bin_path` and `python_bin_path` are anchored in an Anaconda - # python environment and the candidate library path does not exit (because we are calling this function when - # trying to resolve @rpath with multiple candidate run paths), we do not want to fall back to eponymous library - # that happens to be present in the Homebrew python environment... - if lib.startswith('@loader_path/'): - lib = lib[len('@loader_path/'):] - elif lib.startswith('@executable_path/'): - lib = lib[len('@executable_path/'):] - - # Try resolving with binary's path first... - resolved_lib = _resolve_using_path(os.path.join(bin_path, lib)) - if resolved_lib is not None: - return resolved_lib - - # ... and fall-back to resolving with python executable's path - return _resolve_using_path(os.path.join(python_bin_path, lib)) - - # Try to resolve full path of the referenced libraries. - for referenced_lib in referenced_libs: - resolved_lib = None - - # If path starts with @rpath, we have to handle it ourselves. - if referenced_lib.startswith('@rpath'): - lib = os.path.join(*referenced_lib.split(os.sep)[1:]) # Remove the @rpath/ prefix - - # Try all run paths. - for run_path in run_paths: - # Join the path. - lib_path = os.path.join(run_path, lib) - - if lib_path.startswith(("@executable_path", "@loader_path")): - # Run path starts with @executable_path or @loader_path. - lib_path = _resolve_using_loader_path(lib_path, bin_path, python_bin_path) - else: - # If run path was relative, anchor it to binary's location. - if not os.path.isabs(lib_path): - os.path.join(bin_path, lib_path) - lib_path = _resolve_using_path(lib_path) - - if lib_path and os.path.exists(lib_path): - resolved_lib = lib_path - break - else: - if referenced_lib.startswith(("@executable_path", "@loader_path")): - resolved_lib = _resolve_using_loader_path(referenced_lib, bin_path, python_bin_path) - else: - resolved_lib = _resolve_using_path(referenced_lib) - - # Fall back to searching the supplied search paths, if any. - if not resolved_lib: - resolved_lib = _resolve_library_path_in_search_paths( - os.path.basename(referenced_lib), # Search for basename of the referenced name. - search_paths, - ) - - # Normalize the resolved path, to remove any extraneous "../" elements. - if resolved_lib: - resolved_lib = os.path.normpath(resolved_lib) - - # Return referenced library name as-is instead of computing a basename. Full referenced name carries additional - # information that might be useful for the caller to determine how to deal with unresolved library (e.g., ignore - # unresolved libraries that are supposed to be located in system-wide directories). - output.add((referenced_lib, resolved_lib)) - - return output - - -#- Library full path resolution - - -def resolve_library_path(name, search_paths=None): - """ - Given a library name, attempt to resolve full path to that library. The search for library is done via - platform-specific mechanism and fall back to optionally-provided list of search paths. Returns None if library - cannot be resolved. If give library name is already an absolute path, the given path is returned without any - processing. - """ - # No-op if path is already absolute. - if os.path.isabs(name): - return name - - if compat.is_unix: - # Use platform-specific helper. - fullpath = _resolve_library_path_unix(name) - if fullpath: - return fullpath - # Fall back to searching the supplied search paths, if any - return _resolve_library_path_in_search_paths(name, search_paths) - elif compat.is_win: - # Try the caller-supplied search paths, if any. - fullpath = _resolve_library_path_in_search_paths(name, search_paths) - if fullpath: - return fullpath - - # Fall back to default Windows search paths, using the PATH environment variable (which should also include - # the system paths, such as c:\windows and c:\windows\system32) - win_search_paths = [path for path in compat.getenv('PATH', '').split(os.pathsep) if path] - return _resolve_library_path_in_search_paths(name, win_search_paths) - else: - return ctypes.util.find_library(name) - - return None - - -# Compatibility aliases for hooks from contributed hooks repository. All of these now point to the high-level -# `resolve_library_path`. -findLibrary = resolve_library_path -findSystemLibrary = resolve_library_path - - -def _resolve_library_path_in_search_paths(name, search_paths=None): - """ - Low-level helper for resolving given library name to full path in given list of search paths. - """ - for search_path in search_paths or []: - fullpath = os.path.join(search_path, name) - if not os.path.isfile(fullpath): - continue - - # On Windows, ensure that architecture matches that of running python interpreter. - if compat.is_win: - try: - dll_machine_type = winutils.get_pe_file_machine_type(fullpath) - except Exception: - # A search path might contain a DLL that we cannot analyze; for example, a stub file. Skip over. - continue - if dll_machine_type != _exe_machine_type: - continue - - return os.path.normpath(fullpath) - - return None - - -def _resolve_library_path_unix(name): - """ - UNIX-specific helper for resolving library path. - - Emulates the algorithm used by dlopen. `name` must include the prefix, e.g., ``libpython2.4.so``. - """ - assert compat.is_unix, "Current implementation for Unix only (Linux, Solaris, AIX, FreeBSD)" - - if name.endswith('.so') or '.so.' in name: - # We have been given full library name that includes suffix. Use `_resolve_library_path_in_search_paths` to find - # the exact match. - lib_search_func = _resolve_library_path_in_search_paths - else: - # We have been given a library name without suffix. Use `_which_library` as search function, which will try to - # find library with matching basename. - lib_search_func = _which_library - - # Look in the LD_LIBRARY_PATH according to platform. - if compat.is_aix: - lp = compat.getenv('LIBPATH', '') - elif compat.is_darwin: - lp = compat.getenv('DYLD_LIBRARY_PATH', '') - else: - lp = compat.getenv('LD_LIBRARY_PATH', '') - lib = lib_search_func(name, filter(None, lp.split(os.pathsep))) - - # Look in /etc/ld.so.cache - # Solaris does not have /sbin/ldconfig. Just check if this file exists. - if lib is None: - utils.load_ldconfig_cache() - lib = utils.LDCONFIG_CACHE.get(name) - if lib: - assert os.path.isfile(lib) - - # Look in the known safe paths. - if lib is None: - # Architecture independent locations. - paths = ['/lib', '/usr/lib'] - # Architecture dependent locations. - if compat.architecture == '32bit': - paths.extend(['/lib32', '/usr/lib32']) - else: - paths.extend(['/lib64', '/usr/lib64']) - # Machine dependent locations. - if compat.machine == 'intel': - if compat.architecture == '32bit': - paths.extend(['/usr/lib/i386-linux-gnu']) - else: - paths.extend(['/usr/lib/x86_64-linux-gnu']) - - # On Debian/Ubuntu /usr/bin/python is linked statically with libpython. Newer Debian/Ubuntu with multiarch - # support puts the libpythonX.Y.so in paths like /usr/lib/i386-linux-gnu/. Try to query the arch-specific - # sub-directory, if available. - arch_subdir = sysconfig.get_config_var('multiarchsubdir') - if arch_subdir: - arch_subdir = os.path.basename(arch_subdir) - paths.append(os.path.join('/usr/lib', arch_subdir)) - else: - logger.debug('Multiarch directory not detected.') - - # Termux (a Ubuntu like subsystem for Android) has an additional libraries directory. - if os.path.isdir('/data/data/com.termux/files/usr/lib'): - paths.append('/data/data/com.termux/files/usr/lib') - - if compat.is_aix: - paths.append('/opt/freeware/lib') - elif compat.is_hpux: - if compat.architecture == '32bit': - paths.append('/usr/local/lib/hpux32') - else: - paths.append('/usr/local/lib/hpux64') - elif compat.is_freebsd or compat.is_openbsd: - paths.append('/usr/local/lib') - lib = lib_search_func(name, paths) - - return lib - - -def _which_library(name, dirs): - """ - Search for a shared library in a list of directories. - - Args: - name: - The library name including the `lib` prefix but excluding any `.so` suffix. - dirs: - An iterable of folders to search in. - Returns: - The path to the library if found or None otherwise. - - """ - matcher = _library_matcher(name) - for path in filter(os.path.exists, dirs): - for _path in os.listdir(path): - if matcher(_path): - return os.path.join(path, _path) - - -def _library_matcher(name): - """ - Create a callable that matches libraries if **name** is a valid library prefix for input library full names. - """ - return re.compile(name + r"[0-9]*\.").match - - -#- Python shared library search - - -def get_python_library_path(): - """ - Find Python shared library that belongs to the current interpreter. - - Return full path to Python dynamic library or None when not found. - - PyInstaller needs to collect the Python shared library, so that bootloader can load it, import Python C API - symbols, and use them to set up the embedded Python interpreter. - - The name of the shared library is typically fixed (`python3.X.dll` on Windows, libpython3.X.so on Unix systems, - and `libpython3.X.dylib` on macOS for shared library builds and `Python.framework/Python` for framework build). - Its location can usually be inferred from the Python interpreter executable, when the latter is dynamically - linked against the shared library. - - However, some situations require extra handling due to various quirks; for example, Debian-based linux - distributions statically link the Python interpreter executable against the Python library, while also providing - a shared library variant for external users. - """ - - # With Windows Python builds, this is pretty straight-forward: `sys.dllhandle` provides a handle to the loaded - # Python DLL, and we can resolve its path using `GetModuleFileName()` from win32 API. - # This is applicable to python.org Windows builds, Anaconda on Windows, and MSYS2 Python. - if compat.is_win: - if hasattr(sys, 'dllhandle'): - import _winapi - return _winapi.GetModuleFileName(sys.dllhandle) - else: - raise PythonLibraryNotFoundError( - "Python was built without a shared library, which is required by PyInstaller." - ) - - # On other (POSIX) platforms, the name of the Python shared library is available in the `INSTSONAME` variable - # exposed by the `sysconfig` module. There is also the `LDLIBRARY` variable, which points to the unversioned .so - # symbolic link for linking purposes; however, we are interested in the actual, fully-versioned soname. - # This should cover all variations in the naming schemes across different platforms as well as different build - # options (debug build, free-threaded build, etc.). - # - # However, `INSTSONAME` points to the shared library only if shared library is enabled; in static-library builds, - # it points to the static library, which is of no use to us. We can check if Python was built with shared library - # (i.e., the `--enable-shared` option) by checking `Py_ENABLE_SHARED` variable, which should be set to 1 in this - # case (and 0 in the case of a static-library build). On macOS, builds made with `--enable-framework` have - # `Py_ENABLE_SHARED` set to 0, but have `PYTHONFRAMEWORK`set to a non-empty string. - # - # The above description is further complicated by the fact that in some Python builds, the `python` executable is - # built against static Python library, and the shared library is built separately and provided for development and - # for embedders (such as PyInstaller). Presumably, this is done for performance reasons. Also, it is enabled by the - # fact that on POSIX, Python extensions do not need to have the referenced Python symbols resolved at link-time; - # rather, these symbols can be resolved at run-time from the running Python process (and are effectively provided - # by the `python` executable). Such builds come in two variants. In the first variant, `Py_ENABLE_SHARED` is 0 and - # `INSTSONAME` points to the static library; an example of such build is Anaconda Python. In the second variant, - # `Py_ENABLE_SHARED` is 1 and `INSTSONAME` points to the shared library, but `python` executable is not linked - # against it; examples of such build are Debian-packaged Python and `astral-sh/python-build-standalone` Python. - # - # Therefore, our strategy is as follows: if we determine that shared library was enabled (via `Py_ENABLE_SHARED` - # on all platforms and/or via `PYTHONFRAMEWORK` on macOS), we use the name given by `INSTSONAME`. First, we try - # to locate it by analyzing binary dependencies of `python` executable (regular shared-library-enabled build), - # then fall back to standard search locations (second variant of static-executable-with-separate-shared-library). - # If `Py_ENABLE_SHARED` is set to 0, we try to guess the library name based on version and feature flags, but we - # search only `sys.base_prefix` and `lib` directory under `sys.base_prefix`; if the shared library is not found - # there, we assume it is unavailable and raise an error. This attempts to accommodate Anaconda python (and corner - # cases when we cannot reliably identify Anaconda python - see #9273) and prevent accidental bundling of - # system-wide Python shared library in cases when user tries to use custom Python build without shared library. - - def _find_lib_in_libdirs(name, *libdirs): - for libdir in libdirs: - full_path = os.path.join(libdir, name) - if not os.path.exists(full_path): - continue - # Resolve potential symbolic links to achieve consistent results with linker-based search; e.g., on - # POSIX systems, linker resolves unversioned library names (python3.X.so) to versioned ones - # (libpython3.X.so.1.0) due to former being symbolic links to the latter. See #6831. - full_path = os.path.realpath(full_path) - if not os.path.exists(full_path): - continue - return full_path - return None - - is_shared = ( - # Builds made with `--enable-shared` have `Py_ENABLE_SHARED` set to 1. This is true even for Debian-packaged - # Python, which has the `python` executable statically linked against the Python library. - sysconfig.get_config_var("Py_ENABLE_SHARED") or - # On macOS, builds made with `--enable-framework` have `Py_ENABLE_SHARED` set to 0, but have `PYTHONFRAMEWORK` - # set to a non-empty string. - (compat.is_darwin and sysconfig.get_config_var("PYTHONFRAMEWORK")) - ) - - if not is_shared: - # Anaconda Python; this codepath used to be under `compat.is_conda` switch, but we may also be dealing with - # Anaconda Python without `conda-meta` directory (see #9273). Or some other Python build where shared library - # is provided but `Py_ENABLE_SHARED` is set to 0. - py_major, py_minor = sys.version_info[:2] - py_suffix = "t" if compat.is_nogil else "" # TODO: does Anaconda provide debug builds with "d" suffix? - if compat.is_darwin: - # macOS - expected_name = f"libpython{py_major}.{py_minor}{py_suffix}.dylib" - else: - # Linux; assume any other potential POSIX builds use the same naming scheme. - expected_name = f"libpython{py_major}.{py_minor}{py_suffix}.so.1.0" - - # Allow the library to be only in `sys.base_prefix` or the `lib` directory under it. This should prevent us from - # picking up an unrelated copy of shared library that might happen to be available in standard search path, when - # we should instead be raising an error due to Python having been built without a shared library. (In true - # static-library builds, Python's own extension modules are usually turned into built-ins. So picking up an - # unrelated Python shared library that happens to be of the same version results in run-time errors due to - # missing extensions - because in the build that produced the shared library, those extensions are expected to - # be external extension modules!) - python_libname = _find_lib_in_libdirs( - expected_name, # Full name - compat.base_prefix, - os.path.join(compat.base_prefix, 'lib'), - ) - if python_libname: - return python_libname - - # Raise PythonLibraryNotFoundError - option_str = ( - "either the `--enable-shared` or the `--enable-framework` option" - if compat.is_darwin else "the `--enable-shared` option" - ) - raise PythonLibraryNotFoundError( - "Python was built without a shared library, which is required by PyInstaller. " - f"If you built Python from source, rebuild it with {option_str}." - ) - - # Use the library name from `INSTSONAME`. - expected_name = sysconfig.get_config_var('INSTSONAME') - - # In Cygwin builds (and also MSYS2 python, although that should be handled by Windows-specific codepath...), - # INSTSONAME is available, but the name has a ".dll.a" suffix; remove that trailing ".a". - if (compat.is_win or compat.is_cygwin) and os.path.normcase(expected_name).endswith('.dll.a'): - expected_name = expected_name[:-2] - - # NOTE: on macOS with .framework bundle build, INSTSONAME contains full name of the .framework library, for example - # `Python.framework/Versions/3.13/Python`. Pre-compute a basename for comparisons that are using only basename. - expected_basename = os.path.normcase(os.path.basename(expected_name)) - - # First, try to find the expected name among the libraries against which the Python executable is linked. This - # assumes that the Python executable was not statically linked against the library (as is the case with - # Debian-packaged Python or `astral-sh/python-build-standalone` Python). - imported_libraries = get_imports(compat.python_executable) # (name, fullpath) tuples - for _, lib_path in imported_libraries: - if lib_path is None: - continue # Skip unresolved imports - if os.path.normcase(os.path.basename(lib_path)) == expected_basename: # Basename comparison - # Python library found. Return absolute path to it. - return lib_path - - # As a fallback, try to find the library in several "standard" search locations... - - # First, search the `sys.base_prefix` and `lib` directory in `sys.base_prefix`, as these locations have the closest - # ties to our current Python process. This caters to builds such as `astral-sh/python-build-standalone` Python. - python_libname = _find_lib_in_libdirs( - expected_name, # Full name - compat.base_prefix, - os.path.join(compat.base_prefix, 'lib'), - ) - if python_libname: - return python_libname - - # Perform search in the configured library search locations. This should be done after exhausting all other options; - # it primarily caters to Debian-packaged Python, but we need to make sure that we do not collect shared library from - # system-installed Python when the current interpreter is in fact some other Python build (such as, for example, - # `astral-sh/python-build-standalone` Python that is handled in the preceding code block). - python_libname = resolve_library_path(expected_basename) # Basename - if python_libname: - return python_libname - - # Not found. Raise a PythonLibraryNotFoundError with corresponding message. - message = f"ERROR: Python shared library ({expected_name!r}) was not found!" - if compat.is_linux and os.path.isfile('/etc/debian_version'): - # The shared library is provided by `libpython3.x` package (i.e., no need to install full `python3-dev`). - pkg_name = f"libpython3.{sys.version_info.minor}" - message += ( - " If you are using system python on Debian/Ubuntu, you might need to install a separate package by running " - f"`apt install {pkg_name}`." - ) - - raise PythonLibraryNotFoundError(message) - - -#- Binary vs data (re)classification - - -def classify_binary_vs_data(filename): - """ - Classify the given file as either BINARY or a DATA, using appropriate platform-specific method. Returns 'BINARY' - or 'DATA' string depending on the determined file type, or None if classification cannot be performed (non-existing - file, missing tool, and other errors during classification). - """ - - # We cannot classify non-existent files. - if not os.path.isfile(filename): - return None - - # Use platform-specific implementation. - return _classify_binary_vs_data(filename) - - -if compat.is_linux: - - def _classify_binary_vs_data(filename): - # First check for ELF signature, in order to avoid calling `objdump` on every data file, which can be costly. - try: - with open(filename, 'rb') as fp: - sig = fp.read(4) - except Exception: - return None - - if sig != b"\x7FELF": - return "DATA" - - # Verify the binary by checking if `objdump` recognizes the file. The preceding ELF signature check should - # ensure that this is an ELF file, while this check should ensure that it is a valid ELF file. In the future, - # we could try checking that the architecture matches the running platform. - cmd_args = ['objdump', '-a', filename] - try: - p = subprocess.run( - cmd_args, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - stdin=subprocess.DEVNULL, - encoding='utf8', - ) - except Exception: - return None # Failed to run `objdump` or `objdump` unavailable. - - return 'BINARY' if p.returncode == 0 else 'DATA' - -elif compat.is_win: - - @functools.lru_cache() - def _no_op_pefile_gc(): - # Disable pefile's reduntant and very slow call to gc.collect(). See #8762. - import types - import gc - import pefile - - fake_gc = types.ModuleType("gc") - fake_gc.__dict__.update(gc.__dict__) - fake_gc.collect = lambda *_, **__: None - pefile.gc = fake_gc - - def _classify_binary_vs_data(filename): - import pefile - - _no_op_pefile_gc() - - # First check for MZ signature, which should allow us to quickly classify the majority of data files. - try: - with open(filename, 'rb') as fp: - sig = fp.read(2) - except Exception: - return None - - if sig != b"MZ": - return "DATA" - - # Check if the file can be opened using `pefile`. - try: - with pefile.PE(filename, fast_load=True) as pe: # noqa: F841 - pass - return 'BINARY' - except pefile.PEFormatError: - return 'DATA' - except Exception: - pass - - return None - -elif compat.is_darwin: - - def _classify_binary_vs_data(filename): - # See if the file can be opened using `macholib`. - import macholib.MachO - - try: - macho = macholib.MachO.MachO(filename) # noqa: F841 - return 'BINARY' - except Exception: - # TODO: catch only `ValueError`? - pass - - return 'DATA' - -else: - - def _classify_binary_vs_data(filename): - # Classification not implemented for the platform. - return None diff --git a/voxvera/vendor/PyInstaller/depend/bytecode.py b/voxvera/vendor/PyInstaller/depend/bytecode.py deleted file mode 100755 index d51ea34..0000000 --- a/voxvera/vendor/PyInstaller/depend/bytecode.py +++ /dev/null @@ -1,366 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Tools for searching bytecode for key statements that indicate the need for additional resources, such as data files -and package metadata. - -By *bytecode* I mean the ``code`` object given by ``compile()``, accessible from the ``__code__`` attribute of any -non-builtin function or, in PyInstallerLand, the ``PyiModuleGraph.node("some.module").code`` attribute. The best -guide for bytecode format I have found is the disassembler reference: https://docs.python.org/3/library/dis.html - -This parser implementation aims to combine the flexibility and speed of regex with the clarity of the output of -``dis.dis(code)``. It has not achieved the 2nd, but C'est la vie... - -The biggest clarity killer here is the ``EXTENDED_ARG`` opcode which can appear almost anywhere and therefore needs -to be tiptoed around at every step. If this code needs to expand significantly, I would recommend an upgrade to a -regex-based grammar parsing library such as Reparse. This way, little steps like unpacking ``EXTENDED_ARGS`` can be -defined once then simply referenced forming a nice hierarchy rather than copied everywhere its needed. -""" - -import dis -import re -from types import CodeType -from typing import Pattern - -from PyInstaller import compat - -# opcode name -> opcode map -# Python 3.11 introduced specialized opcodes that are not covered by opcode.opmap (and equivalent dis.opmap), but dis -# has a private map of all opcodes called _all_opmap. So use the latter, if available. -opmap = getattr(dis, '_all_opmap', dis.opmap) - - -def _instruction_to_regex(x: str): - """ - Get a regex-escaped opcode byte from its human readable name. - """ - return re.escape(bytes([opmap[x]])) - - -def bytecode_regex(pattern: bytes, flags=re.VERBOSE | re.DOTALL): - """ - A regex-powered Python bytecode matcher. - - ``bytecode_regex`` provides a very thin wrapper around :func:`re.compile`. - - * Any opcode names wrapped in backticks are substituted for their corresponding opcode bytes. - * Patterns are compiled in VERBOSE mode by default so that whitespace and comments may be used. - - This aims to mirror the output of :func:`dis.dis`, which is far more readable than looking at raw byte strings. - """ - assert isinstance(pattern, bytes) - - # Replace anything wrapped in backticks with regex-escaped opcodes. - pattern = re.sub( - rb"`(\w+)`", - lambda m: _instruction_to_regex(m[1].decode()), - pattern, - ) - return re.compile(pattern, flags=flags) - - -def finditer(pattern: Pattern, string: bytes): - """ - Call ``pattern.finditer(string)``, but remove any matches beginning on an odd byte (i.e., matches where - match.start() is not a multiple of 2). - - This should be used to avoid false positive matches where a bytecode pair's argument is mistaken for an opcode. - """ - assert isinstance(string, bytes) - string = _cleanup_bytecode_string(string) - matches = pattern.finditer(string) - while True: - for match in matches: - if match.start() % 2 == 0: - # All is good. This match starts on an OPCODE. - yield match - else: - # This match has started on an odd byte, meaning that it is a false positive and should be skipped. - # There is a very slim chance that a genuine match overlaps this one and, because re.finditer() does not - # allow overlapping matches, it would be lost. To avoid that, restart the regex scan, starting at the - # next even byte. - matches = pattern.finditer(string, match.start() + 1) - break - else: - break - - -# Opcodes involved in function calls with constant arguments. The differences between python versions are handled by -# variables below, which are then used to construct the _call_function_bytecode regex. -# NOTE1: the _OPCODES_* entries are typically used in (non-capturing) groups that match the opcode plus an arbitrary -# argument. But because the entries themselves may contain more than on opcode (with OR operator between them), they -# themselves need to be enclosed in another (non-capturing) group. E.g., "(?:(?:_OPCODES_FUNCTION_GLOBAL).)". -# NOTE2: _OPCODES_EXTENDED_ARG2 is an exception, as it is used as a list of opcodes to exclude, i.e., -# "[^_OPCODES_EXTENDED_ARG2]". Therefore, multiple opcodes are not separated by the OR operator. -if not compat.is_py311: - # Python 3.7 introduced two new function-related opcodes, LOAD_METHOD and CALL_METHOD - _OPCODES_EXTENDED_ARG = rb"`EXTENDED_ARG`" - _OPCODES_EXTENDED_ARG2 = _OPCODES_EXTENDED_ARG - _OPCODES_FUNCTION_GLOBAL = rb"`LOAD_NAME`|`LOAD_GLOBAL`|`LOAD_FAST`" - _OPCODES_FUNCTION_LOAD = rb"`LOAD_ATTR`|`LOAD_METHOD`" - _OPCODES_FUNCTION_ARGS = rb"`LOAD_CONST`" - _OPCODES_FUNCTION_CALL = rb"`CALL_FUNCTION`|`CALL_METHOD`|`CALL_FUNCTION_EX`" - - def _cleanup_bytecode_string(bytecode): - return bytecode # Nothing to do here -elif not compat.is_py312: - # Python 3.11 removed CALL_FUNCTION and CALL_METHOD, and replaced them with PRECALL + CALL instruction sequence. - # As both PRECALL and CALL have the same parameter (the argument count), we need to match only up to the PRECALL. - # The CALL_FUNCTION_EX is still present. - # From Python 3.11b1 on, there is an EXTENDED_ARG_QUICK specialization opcode present. - _OPCODES_EXTENDED_ARG = rb"`EXTENDED_ARG`|`EXTENDED_ARG_QUICK`" - _OPCODES_EXTENDED_ARG2 = rb"`EXTENDED_ARG``EXTENDED_ARG_QUICK`" # Special case; see note above the if/else block! - _OPCODES_FUNCTION_GLOBAL = rb"`LOAD_NAME`|`LOAD_GLOBAL`|`LOAD_FAST`" - _OPCODES_FUNCTION_LOAD = rb"`LOAD_ATTR`|`LOAD_METHOD`" - _OPCODES_FUNCTION_ARGS = rb"`LOAD_CONST`" - _OPCODES_FUNCTION_CALL = rb"`PRECALL`|`CALL_FUNCTION_EX`" - - # Starting with python 3.11, the bytecode is peppered with CACHE instructions (which dis module conveniently hides - # unless show_caches=True is used). Dealing with these CACHE instructions in regex rules is going to render them - # unreadable, so instead we pre-process the bytecode and filter the offending opcodes out. - _cache_instruction_filter = bytecode_regex(rb"(`CACHE`.)|(..)") - - def _cleanup_bytecode_string(bytecode): - return _cache_instruction_filter.sub(rb"\2", bytecode) -else: - # Python 3.12 merged EXTENDED_ARG_QUICK back in to EXTENDED_ARG, and LOAD_METHOD in to LOAD_ATTR - # PRECALL is no longer a valid key - _OPCODES_EXTENDED_ARG = rb"`EXTENDED_ARG`" - _OPCODES_EXTENDED_ARG2 = _OPCODES_EXTENDED_ARG - if compat.is_py314: - # Python 3.14.0a7 added LOAD_FAST_BORROW. - _OPCODES_FUNCTION_GLOBAL = rb"`LOAD_NAME`|`LOAD_GLOBAL`|`LOAD_FAST`|`LOAD_FAST_BORROW`" - else: - _OPCODES_FUNCTION_GLOBAL = rb"`LOAD_NAME`|`LOAD_GLOBAL`|`LOAD_FAST`" - _OPCODES_FUNCTION_LOAD = rb"`LOAD_ATTR`" - if compat.is_py314: - # Python 3.14.0a2 split LOAD_CONST into LOAD_CONST, LOAD_IMMORTAL_CONST, and LOAD_SMALL_INT. - # https://github.com/python/cpython/commit/faa3272fb8d63d481a136cc0467a0cba6ed7b264 - _OPCODES_FUNCTION_ARGS = rb"`LOAD_CONST`|`LOAD_SMALL_INT`|`LOAD_CONST_IMMORTAL`" - else: - _OPCODES_FUNCTION_ARGS = rb"`LOAD_CONST`" - _OPCODES_FUNCTION_CALL = rb"`CALL`|`CALL_FUNCTION_EX`" - - # In Python 3.13, PUSH_NULL opcode is emitted after the LOAD_NAME (and after LOAD_ATTR opcode(s), if applicable). - # In python 3.11 and 3.12, it was emitted before the LOAD_NAME, and thus fell outside of our regex matching; now, - # we have to deal with it. But, instead of trying to add it to matching rules and adjusting the post-processing - # to deal with it, we opt to filter them out (at the same time as we filter out CACHE opcodes), and leave the rest - # of processing untouched. - if compat.is_py313: - _cache_instruction_filter = bytecode_regex(rb"(`CACHE`.)|(`PUSH_NULL`.)|(..)") - - def _cleanup_bytecode_string(bytecode): - return _cache_instruction_filter.sub(rb"\3", bytecode) - else: - _cache_instruction_filter = bytecode_regex(rb"(`CACHE`.)|(..)") - - def _cleanup_bytecode_string(bytecode): - return _cache_instruction_filter.sub(rb"\2", bytecode) - - -# language=PythonVerboseRegExp -_call_function_bytecode = bytecode_regex( - rb""" - # Matches `global_function('some', 'constant', 'arguments')`. - - # Load the global function. In code with >256 of names, this may require extended name references. - ( - (?:(?:""" + _OPCODES_EXTENDED_ARG + rb""").)* - (?:(?:""" + _OPCODES_FUNCTION_GLOBAL + rb""").) - ) - - # For foo.bar.whizz(), the above is the 'foo', below is the 'bar.whizz' (one opcode per name component, each - # possibly preceded by name reference extension). - ( - (?: - (?:(?:""" + _OPCODES_EXTENDED_ARG + rb""").)* - (?:""" + _OPCODES_FUNCTION_LOAD + rb"""). - )* - ) - - # Load however many arguments it takes. These (for now) must all be constants. - # Again, code with >256 constants may need extended enumeration. - ( - (?: - (?:(?:""" + _OPCODES_EXTENDED_ARG + rb""").)* - (?:""" + _OPCODES_FUNCTION_ARGS + rb"""). - )* - ) - - # Call the function. If opcode is CALL_FUNCTION_EX, the parameter are flags. For other opcodes, the parameter - # is the argument count (which may be > 256). - ( - (?:(?:""" + _OPCODES_EXTENDED_ARG + rb""").)* - (?:""" + _OPCODES_FUNCTION_CALL + rb"""). - ) -""" -) - -# language=PythonVerboseRegExp -_extended_arg_bytecode = bytecode_regex( - rb"""( - # Arbitrary number of EXTENDED_ARG pairs. - (?:(?:""" + _OPCODES_EXTENDED_ARG + rb""").)* - - # Followed by some other instruction (usually a LOAD). - [^""" + _OPCODES_EXTENDED_ARG2 + rb"""]. -)""" -) - - -def extended_arguments(extended_args: bytes): - """ - Unpack the (extended) integer used to reference names or constants. - - The input should be a bytecode snippet of the following form:: - - EXTENDED_ARG ? # Repeated 0-4 times. - LOAD_xxx ? # Any of LOAD_NAME/LOAD_CONST/LOAD_METHOD/... - - Each ? byte combined together gives the number we want. - """ - return int.from_bytes(extended_args[1::2], "big") - - -def load(raw: bytes, code: CodeType) -> str: - """ - Parse an (extended) LOAD_xxx instruction. - """ - # Get the enumeration. - index = extended_arguments(raw) - - # Work out what that enumeration was for (constant/local var/global var). - - # If the last instruction byte is a LOAD_FAST: - if raw[-2] == opmap["LOAD_FAST"]: - # Then this is a local variable. - return code.co_varnames[index] - # Or if it is a LOAD_CONST: - if raw[-2] == opmap["LOAD_CONST"]: - # Then this is a literal. - return code.co_consts[index] - # Otherwise, it is a global name. - if compat.is_py311 and raw[-2] == opmap["LOAD_GLOBAL"]: - # In python 3.11, namei>>1 is pushed on stack... - return code.co_names[index >> 1] - if compat.is_py312 and raw[-2] == opmap["LOAD_ATTR"]: - # In python 3.12, namei>>1 is pushed on stack... - return code.co_names[index >> 1] - if compat.is_py314 and raw[-2] == opmap["LOAD_SMALL_INT"]: - # python 3.14 introduced LOAD_SMALL_INT, which pushes its argument (int value < 256) on the stack - return index - if compat.is_py314 and raw[-2] == opmap["LOAD_CONST_IMMORTAL"]: - # python 3.14 introduced LOAD_CONST_IMMORTAL, which pushes co_consts[consti] on the stack. This is intended to - # be a variant of LOAD_CONST for constants that are known to be immortal. - return code.co_consts[index] - if compat.is_py314 and raw[-2] == opmap["LOAD_FAST_BORROW"]: - # python 3.14 introduced LOAD_FAST_BORROW, which pushes a borrowed reference to the local co_varnames[var_num] - # onto the stack. - return code.co_varnames[index] - - return code.co_names[index] - - -def loads(raw: bytes, code: CodeType) -> list: - """ - Parse multiple consecutive LOAD_xxx instructions. Or load() in a for loop. - - May be used to unpack a function's parameters or nested attributes ``(foo.bar.pop.whack)``. - """ - return [load(i, code) for i in _extended_arg_bytecode.findall(raw)] - - -def function_calls(code: CodeType) -> list: - """ - Scan a code object for all function calls on constant arguments. - """ - match: re.Match - out = [] - - for match in finditer(_call_function_bytecode, code.co_code): - function_root, methods, args, function_call = match.groups() - - # For foo(): - # `function_root` contains 'foo' and `methods` is empty. - # For foo.bar.whizz(): - # `function_root` contains 'foo' and `methods` contains the rest. - function_root = load(function_root, code) - methods = loads(methods, code) - function = ".".join([function_root] + methods) - - args = loads(args, code) - if function_call[0] == opmap['CALL_FUNCTION_EX']: - flags = extended_arguments(function_call) - if flags != 0: - # Keyword arguments present. Unhandled at the moment. - continue - # In calls with const arguments, args contains a single - # tuple with all values. - if len(args) != 1 or not isinstance(args[0], tuple): - continue - args = list(args[0]) - else: - arg_count = extended_arguments(function_call) - - if arg_count != len(args): - # This happens if there are variable or keyword arguments. Bail out in either case. - continue - - out.append((function, args)) - - return out - - -def search_recursively(search: callable, code: CodeType, _memo=None) -> dict: - """ - Apply a search function to a code object, recursing into child code objects (function definitions). - """ - if _memo is None: - _memo = {} - if code not in _memo: - _memo[code] = search(code) - for const in code.co_consts: - if isinstance(const, CodeType): - search_recursively(search, const, _memo) - return _memo - - -def recursive_function_calls(code: CodeType) -> dict: - """ - Scan a code object for function calls on constant arguments, recursing into function definitions and bodies of - comprehension loops. - """ - return search_recursively(function_calls, code) - - -def any_alias(full_name: str): - """List possible aliases of a fully qualified Python name. - - >>> list(any_alias("foo.bar.wizz")) - ['foo.bar.wizz', 'bar.wizz', 'wizz'] - - This crudely allows us to capture uses of wizz() under any of - :: - import foo - foo.bar.wizz() - :: - from foo import bar - bar.wizz() - :: - from foo.bar import wizz - wizz() - - However, it will fail for any form of aliases and quite likely find false matches. - """ - parts = full_name.split('.') - while parts: - yield ".".join(parts) - parts = parts[1:] diff --git a/voxvera/vendor/PyInstaller/depend/dylib.py b/voxvera/vendor/PyInstaller/depend/dylib.py deleted file mode 100755 index b351dcd..0000000 --- a/voxvera/vendor/PyInstaller/depend/dylib.py +++ /dev/null @@ -1,379 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Manipulating with dynamic libraries. -""" - -import os -import pathlib -import re -import sys - -from PyInstaller import compat -import PyInstaller.log as logging - -logger = logging.getLogger(__name__) - -# Ignoring some system libraries speeds up packaging process -_excludes = { - # Ignore annoying warnings with Windows system DLLs. - # - # 'W: library kernel32.dll required via ctypes not found' - # 'W: library coredll.dll required via ctypes not found' - # - # These these dlls has to be ignored for all operating systems because they might be resolved when scanning code for - # ctypes dependencies. - r'advapi32\.dll', - r'ws2_32\.dll', - r'gdi32\.dll', - r'oleaut32\.dll', - r'shell32\.dll', - r'ole32\.dll', - r'coredll\.dll', - r'crypt32\.dll', - r'kernel32', - r'kernel32\.dll', - r'msvcrt\.dll', - r'rpcrt4\.dll', - r'user32\.dll', - # Some modules tries to import the Python library. e.g. pyreadline.console.console - r'python\%s\%s', -} - -# Regex includes - overrides excludes. Include list is used only to override specific libraries from exclude list. -_includes = set() - -_win_includes = { - # We need to allow collection of Visual Studio C++ (VC) runtime DLLs from system directories in order to avoid - # missing DLL errors when the frozen application is run on a system that does not have the corresponding VC - # runtime installed. The VC runtime DLLs may be dependencies of python shared library itself or of extension - # modules provided by 3rd party packages. - - # Visual Studio 2010 (VC10) runtime - # http://msdn.microsoft.com/en-us/library/8kche8ah(v=vs.100).aspx - r'atl100\.dll', - r'msvcr100\.dll', - r'msvcp100\.dll', - r'mfc100\.dll', - r'mfc100u\.dll', - r'mfcmifc80\.dll', - r'mfcm100\.dll', - r'mfcm100u\.dll', - - # Visual Studio 2012 (VC11) runtime - # https://docs.microsoft.com/en-us/visualstudio/releases/2013/2012-redistribution-vs - # - # VC110.ATL - r'atl110\.dll', - # VC110.CRT - r'msvcp110\.dll', - r'msvcr110\.dll', - r'vccorlib110\.dll', - # VC110.CXXAMP - r'vcamp110\.dll', - # VC110.MFC - r'mfc110\.dll', - r'mfc110u\.dll', - r'mfcm110\.dll', - r'mfcm110u\.dll', - # VC110.MFCLOC - r'mfc110chs\.dll', - r'mfc110cht\.dll', - r'mfc110enu\.dll', - r'mfc110esn\.dll', - r'mfc110deu\.dll', - r'mfc110fra\.dll', - r'mfc110ita\.dll', - r'mfc110jpn\.dll', - r'mfc110kor\.dll', - r'mfc110rus\.dll', - # VC110.OpenMP - r'vcomp110\.dll', - # DIA SDK - r'msdia110\.dll', - - # Visual Studio 2013 (VC12) runtime - # https://docs.microsoft.com/en-us/visualstudio/releases/2013/2013-redistribution-vs - # - # VC120.CRT - r'msvcp120\.dll', - r'msvcr120\.dll', - r'vccorlib120\.dll', - # VC120.CXXAMP - r'vcamp120\.dll', - # VC120.MFC - r'mfc120\.dll', - r'mfc120u\.dll', - r'mfcm120\.dll', - r'mfcm120u\.dll', - # VC120.MFCLOC - r'mfc120chs\.dll', - r'mfc120cht\.dll', - r'mfc120deu\.dll', - r'mfc120enu\.dll', - r'mfc120esn\.dll', - r'mfc120fra\.dll', - r'mfc120ita\.dll', - r'mfc120jpn\.dll', - r'mfc120kor\.dll', - r'mfc120rus\.dll', - # VC120.OPENMP - r'vcomp120\.dll', - # DIA SDK - r'msdia120\.dll', - # Cpp REST Windows SDK - r'casablanca120.winrt\.dll', - # Mobile Services Cpp Client - r'zumosdk120.winrt\.dll', - # Cpp REST SDK - r'casablanca120\.dll', - - # Universal C Runtime Library (since Visual Studio 2015) - # - # NOTE: these should be put under a switch, as they need not to be bundled if deployment target is Windows 10 - # and later, as "UCRT is now a system component in Windows 10 and later, managed by Windows Update". - # (https://docs.microsoft.com/en-us/cpp/windows/determining-which-dlls-to-redistribute?view=msvc-170) - # And as discovered in #6326, Windows prefers system-installed version over the bundled one, anyway - # (see https://docs.microsoft.com/en-us/cpp/windows/universal-crt-deployment?view=msvc-170#local-deployment). - r'api-ms-win-core.*', - r'api-ms-win-crt.*', - r'ucrtbase\.dll', - - # Visual Studio 2015/2017/2019/2022 (VC14) runtime - # https://docs.microsoft.com/en-us/visualstudio/releases/2022/redistribution - # - # VC141.CRT/VC142.CRT/VC143.CRT - r'concrt140\.dll', - r'msvcp140\.dll', - r'msvcp140_1\.dll', - r'msvcp140_2\.dll', - r'msvcp140_atomic_wait\.dll', - r'msvcp140_codecvt_ids\.dll', - r'vccorlib140\.dll', - r'vcruntime140\.dll', - r'vcruntime140_1\.dll', - # VC141.CXXAMP/VC142.CXXAMP/VC143.CXXAMP - r'vcamp140\.dll', - # VC141.OpenMP/VC142.OpenMP/VC143.OpenMP - r'vcomp140\.dll', - # DIA SDK - r'msdia140\.dll', - - # Allow pythonNN.dll, pythoncomNN.dll, pywintypesNN.dll - r'py(?:thon(?:com(?:loader)?)?|wintypes)\d+\.dll', -} - -_win_excludes = { - # On Windows, only .dll files can be loaded. - r'.*\.so', - r'.*\.dylib', - - # MS assembly excludes - r'Microsoft\.Windows\.Common-Controls', -} - -_unix_excludes = { - r'libc\.so(\..*)?', - r'libdl\.so(\..*)?', - r'libm\.so(\..*)?', - r'libpthread\.so(\..*)?', - r'librt\.so(\..*)?', - r'libthread_db\.so(\..*)?', - # glibc regex excludes. - r'ld-linux\.so(\..*)?', - r'libBrokenLocale\.so(\..*)?', - r'libanl\.so(\..*)?', - r'libcidn\.so(\..*)?', - r'libcrypt\.so(\..*)?', - r'libnsl\.so(\..*)?', - r'libnss_compat.*\.so(\..*)?', - r'libnss_dns.*\.so(\..*)?', - r'libnss_files.*\.so(\..*)?', - r'libnss_hesiod.*\.so(\..*)?', - r'libnss_nis.*\.so(\..*)?', - r'libnss_nisplus.*\.so(\..*)?', - r'libresolv\.so(\..*)?', - r'libutil\.so(\..*)?', - # graphical interface libraries come with graphical stack (see libglvnd) - r'libE?(Open)?GLX?(ESv1_CM|ESv2)?(dispatch)?\.so(\..*)?', - r'libdrm\.so(\..*)?', - # a subset of libraries included as part of the Nvidia Linux Graphics Driver as of 520.56.06: - # https://download.nvidia.com/XFree86/Linux-x86_64/520.56.06/README/installedcomponents.html - r'nvidia_drv\.so', - r'libglxserver_nvidia\.so(\..*)?', - r'libnvidia-egl-(gbm|wayland)\.so(\..*)?', - r'libnvidia-(cfg|compiler|e?glcore|glsi|glvkspirv|rtcore|allocator|tls|ml)\.so(\..*)?', - r'lib(EGL|GLX)_nvidia\.so(\..*)?', - # libcuda.so, libcuda.so.1, and libcuda.so.{version} are run-time part of NVIDIA driver, and should not be - # collected, as they need to match the rest of driver components on the target system. - r'libcuda\.so(\..*)?', - r'libcudadebugger\.so(\..*)?', - # libxcb-dri changes ABI frequently (e.g.: between Ubuntu LTS releases) and is usually installed as dependency of - # the graphics stack anyway. No need to bundle it. - r'libxcb\.so(\..*)?', - r'libxcb-dri.*\.so(\..*)?', - # system running a Wayland compositor should already have these libraries - # in versions that should not conflict with system drivers, unlike bundled - r'libwayland.*\.so(\..*)?', -} - -_aix_excludes = { - r'libbz2\.a', - r'libc\.a', - r'libC\.a', - r'libcrypt\.a', - r'libdl\.a', - r'libintl\.a', - r'libpthreads\.a', - r'librt\\.a', - r'librtl\.a', - r'libz\.a', -} - -_solaris_excludes = { - r'libsocket\.so(\..*)?', -} - -_cygwin_excludes = { - r'cygwin1\.dll', -} - -if compat.is_win: - _includes |= _win_includes - _excludes |= _win_excludes -elif compat.is_cygwin: - _excludes |= _cygwin_excludes -elif compat.is_aix: - # The exclude list for AIX differs from other *nix platforms. - _excludes |= _aix_excludes -elif compat.is_solar: - # The exclude list for Solaris differs from other *nix platforms. - _excludes |= _solaris_excludes - _excludes |= _unix_excludes -elif compat.is_unix: - # Common excludes for *nix platforms -- except AIX. - _excludes |= _unix_excludes - - -class MatchList: - def __init__(self, entries): - self._regex = re.compile('|'.join(entries), re.I) if entries else None - - def check_library(self, libname): - if self._regex: - return self._regex.match(os.path.basename(libname)) - return False - - -if compat.is_darwin: - import macholib.util - - class MacExcludeList(MatchList): - def __init__(self, entries): - super().__init__(entries) - - def check_library(self, libname): - # Try the global exclude list. - result = super().check_library(libname) - if result: - return result - - # Exclude libraries in standard system locations. - return macholib.util.in_system_path(libname) - - exclude_list = MacExcludeList(_excludes) - include_list = MatchList(_includes) - -elif compat.is_win: - from PyInstaller.utils.win32 import winutils - - class WinExcludeList(MatchList): - def __init__(self, entries): - super().__init__(entries) - - self._windows_dir = pathlib.Path(winutils.get_windows_dir()).resolve() - - # When running as SYSTEM user, the home directory is `%WINDIR%\system32\config\systemprofile`. - self._home_dir = pathlib.Path.home().resolve() - self._system_home = self._windows_dir in self._home_dir.parents - - def check_library(self, libname): - # Try the global exclude list. The global exclude list contains lower-cased names, so lower-case the input - # for case-normalized comparison. - result = super().check_library(libname.lower()) - if result: - return result - - # Exclude everything from the Windows directory by default; but allow contents of user's gome directory if - # that happens to be rooted under Windows directory (e.g., when running PyInstaller as SYSTEM user). - lib_fullpath = pathlib.Path(libname).resolve() - exclude = self._windows_dir in lib_fullpath.parents - if exclude and self._system_home and self._home_dir in lib_fullpath.parents: - exclude = False - return exclude - - exclude_list = WinExcludeList(_excludes) - include_list = MatchList(_includes) -else: - exclude_list = MatchList(_excludes) - include_list = MatchList(_includes) - -_seen_wine_dlls = set() # Used for warning tracking in include_library() - - -def include_library(libname): - """ - Check if the dynamic library should be included with application or not. - """ - if exclude_list.check_library(libname) and not include_list.check_library(libname): - # Library is excluded and is not overridden by include list. It should be excluded. - return False - - # If we are running under Wine and the library is a Wine built-in DLL, ensure that it is always excluded. Typically, - # excluding a DLL leads to an incomplete bundle and run-time errors when the said DLL is not installed on the target - # system. However, having Wine built-in DLLs collected is even more detrimental, as they usually provide Wine's - # implementation of low-level functionality, and therefore cannot be used on actual Windows (i.e., system libraries - # from the C:\Windows\system32 directory that might end up collected due to ``_win_includes`` list; a prominent - # example are VC runtime DLLs, for which Wine provides their own implementation, unless user explicitly installs - # Microsoft's VC redistributable package in their Wine environment). Therefore, excluding the Wine built-in DLLs - # actually improves the chances of the bundle running on Windows, or at least makes the issue easier to debug by - # turning it into the "standard" missing DLL problem. Exclusion should not affect the bundle's ability to run under - # Wine itself, as the excluded DLLs are available there. - if compat.is_win_wine and compat.is_wine_dll(libname): - # Display warning message only once per DLL. Note that it is also displayed only if the DLL were to be included - # in the first place. - if libname not in _seen_wine_dlls: - logger.warning("Excluding Wine built-in DLL: %s", libname) - _seen_wine_dlls.add(libname) - return False - - return True - - -# Patterns for suppressing warnings about missing dynamically linked libraries -_warning_suppressions = [] - -# On some systems (e.g., openwrt), libc.so might point to ldd. Suppress warnings about it. -if compat.is_linux: - _warning_suppressions.append(r'ldd') - -# Suppress warnings about unresolvable UCRT DLLs (see issue #1566) on Windows 10+ -if compat.is_win and sys.getwindowsversion().major >= 10: - _warning_suppressions.append(r'api-ms-win-.*\.dll') - -missing_lib_warning_suppression_list = MatchList(_warning_suppressions) - - -def warn_missing_lib(libname): - """ - Check if a missing-library warning should be displayed for the given library name (or full path). - """ - return not missing_lib_warning_suppression_list.check_library(libname) diff --git a/voxvera/vendor/PyInstaller/depend/imphook.py b/voxvera/vendor/PyInstaller/depend/imphook.py deleted file mode 100755 index b4f184a..0000000 --- a/voxvera/vendor/PyInstaller/depend/imphook.py +++ /dev/null @@ -1,582 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Code related to processing of import hooks. -""" - -import glob -import os.path -import sys -import weakref -import re - -from PyInstaller import log as logging -from PyInstaller.building.utils import format_binaries_and_datas -from PyInstaller.compat import importlib_load_source -from PyInstaller.depend.imphookapi import PostGraphAPI -from PyInstaller.exceptions import ImportErrorWhenRunningHook - -logger = logging.getLogger(__name__) - - -class ModuleHookCache(dict): - """ - Cache of lazily loadable hook script objects. - - This cache is implemented as a `dict` subclass mapping from the fully-qualified names of all modules with at - least one hook script to lists of `ModuleHook` instances encapsulating these scripts. As a `dict` subclass, - all cached module names and hook scripts are accessible via standard dictionary operations. - - Attributes - ---------- - module_graph : ModuleGraph - Current module graph. - _hook_module_name_prefix : str - String prefixing the names of all in-memory modules lazily loaded from cached hook scripts. See also the - `hook_module_name_prefix` parameter passed to the `ModuleHook.__init__()` method. - """ - - _cache_id_next = 0 - """ - 0-based identifier unique to the next `ModuleHookCache` to be instantiated. - - This identifier is incremented on each instantiation of a new `ModuleHookCache` to isolate in-memory modules of - lazily loaded hook scripts in that cache to the same cache-specific namespace, preventing edge-case collisions - with existing in-memory modules in other caches. - - """ - def __init__(self, module_graph, hook_dirs): - """ - Cache all hook scripts in the passed directories. - - **Order of caching is significant** with respect to hooks for the same module, as the values of this - dictionary are lists. Hooks for the same module will be run in the order in which they are cached. Previously - cached hooks are always preserved rather than overridden. - - By default, official hooks are cached _before_ user-defined hooks. For modules with both official and - user-defined hooks, this implies that the former take priority over and hence will be loaded _before_ the - latter. - - Parameters - ---------- - module_graph : ModuleGraph - Current module graph. - hook_dirs : list - List of the absolute or relative paths of all directories containing **hook scripts** (i.e., - Python scripts with filenames matching `hook-{module_name}.py`, where `{module_name}` is the module - hooked by that script) to be cached. - """ - super().__init__() - - # To avoid circular references and hence increased memory consumption, a weak rather than strong reference is - # stored to the passed graph. Since this graph is guaranteed to live longer than this cache, - # this is guaranteed to be safe. - self.module_graph = weakref.proxy(module_graph) - - # String unique to this cache prefixing the names of all in-memory modules lazily loaded from cached hook - # scripts, privatized for safety. - self._hook_module_name_prefix = '__PyInstaller_hooks_{}_'.format(ModuleHookCache._cache_id_next) - ModuleHookCache._cache_id_next += 1 - - # Cache all hook scripts in the passed directories. - self._cache_hook_dirs(hook_dirs) - - def _cache_hook_dirs(self, hook_dirs): - """ - Cache all hook scripts in the passed directories. - - Parameters - ---------- - hook_dirs : list - List of the absolute or relative paths of all directories containing hook scripts to be cached. - """ - - for hook_dir, default_priority in hook_dirs: - # Canonicalize this directory's path and validate its existence. - hook_dir = os.path.abspath(hook_dir) - if not os.path.isdir(hook_dir): - raise FileNotFoundError('Hook directory "{}" not found.'.format(hook_dir)) - - # For each hook script in this directory... - hook_filenames = glob.glob(os.path.join(hook_dir, 'hook-*.py')) - for hook_filename in hook_filenames: - # Fully-qualified name of this hook's corresponding module, constructed by removing the "hook-" prefix - # and ".py" suffix. - module_name = os.path.basename(hook_filename)[5:-3] - - # Lazily loadable hook object. - module_hook = ModuleHook( - module_graph=self.module_graph, - module_name=module_name, - hook_filename=hook_filename, - hook_module_name_prefix=self._hook_module_name_prefix, - default_priority=default_priority, - ) - - # Add this hook to this module's list of hooks. - module_hooks = self.setdefault(module_name, []) - module_hooks.append(module_hook) - - # Post-processing: we allow only one instance of hook per module. Currently, the priority order is defined - # implicitly, via order of hook directories, so the first hook in the list has the highest priority. - for module_name in self.keys(): - hooks = self[module_name] - if len(hooks) == 1: - self[module_name] = hooks[0] - else: - # Order by priority value, in descending order. - sorted_hooks = sorted(hooks, key=lambda hook: hook.priority, reverse=True) - self[module_name] = sorted_hooks[0] - - def remove_modules(self, *module_names): - """ - Remove the passed modules and all hook scripts cached for these modules from this cache. - - Parameters - ---------- - module_names : list - List of all fully-qualified module names to be removed. - """ - - for module_name in module_names: - # Unload this module's hook script modules from memory. Since these are top-level pure-Python modules cached - # only in the "sys.modules" dictionary, popping these modules from this dictionary suffices to garbage - # collect them. - module_hook = self.pop(module_name, None) # Remove our reference, if available. - if module_hook is not None: - sys.modules.pop(module_hook.hook_module_name, None) - - -def _module_collection_mode_sanitizer(value): - if isinstance(value, dict): - # Hook set a dictionary; use it as-is - return value - elif isinstance(value, str): - # Hook set a mode string; convert to a dictionary and assign the string to `None` (= the hooked module). - return {None: value} - - raise ValueError(f"Invalid module collection mode setting value: {value!r}") - - -def _bindepend_symlink_suppression_sanitizer(value): - if isinstance(value, (list, set)): - # Hook set a list or a set; use it as-is - return set(value) - elif isinstance(value, str): - # Hook set a string; create a set with single element. - return set([value]) - - raise ValueError(f"Invalid value for bindepend_symlink_suppression: {value!r}") - - -# Dictionary mapping the names of magic attributes required by the "ModuleHook" class to 2-tuples "(default_type, -# sanitizer_func)", where: -# -# * "default_type" is the type to which that attribute will be initialized when that hook is lazily loaded. -# * "sanitizer_func" is the callable sanitizing the original value of that attribute defined by that hook into a -# safer value consumable by "ModuleHook" callers if any or "None" if the original value requires no sanitization. -# -# To avoid subtleties in the ModuleHook.__getattr__() method, this dictionary is declared as a module rather than a -# class attribute. If declared as a class attribute and then undefined (...for whatever reason), attempting to access -# this attribute from that method would produce infinite recursion. -_MAGIC_MODULE_HOOK_ATTRS = { - # Collections in which order is insignificant. This includes: - # - # * "datas", sanitized from hook-style 2-tuple lists defined by hooks into TOC-style 2-tuple sets consumable by - # "ModuleHook" callers. - # * "binaries", sanitized in the same way. - 'datas': (set, format_binaries_and_datas), - 'binaries': (set, format_binaries_and_datas), - 'excludedimports': (set, None), - - # Collections in which order is significant. This includes: - # - # * "hiddenimports", as order of importation is significant. On module importation, hook scripts are loaded and hook - # functions declared by these scripts are called. As these scripts and functions can have side effects dependent - # on module importation order, module importation itself can have side effects dependent on this order! - 'hiddenimports': (list, None), - - # Flags - 'warn_on_missing_hiddenimports': (lambda: True, bool), - - # Package/module collection mode dictionary. - 'module_collection_mode': (dict, _module_collection_mode_sanitizer), - - # Path patterns for suppression of symbolic links created by binary dependency analysis. - 'bindepend_symlink_suppression': (set, _bindepend_symlink_suppression_sanitizer), -} - - -class ModuleHook: - """ - Cached object encapsulating a lazy loadable hook script. - - This object exposes public attributes (e.g., `datas`) of the underlying hook script as attributes of the same - name of this object. On the first access of any such attribute, this hook script is lazily loaded into an - in-memory private module reused on subsequent accesses. These dynamic attributes are referred to as "magic." All - other static attributes of this object (e.g., `hook_module_name`) are referred to as "non-magic." - - Attributes (Magic) - ---------- - datas : set - Set of `TOC`-style 2-tuples `(target_file, source_file)` for all external non-executable files required by - the module being hooked, converted from the `datas` list of hook-style 2-tuples `(source_dir_or_glob, - target_dir)` defined by this hook script. - binaries : set - Set of `TOC`-style 2-tuples `(target_file, source_file)` for all external executable files required by the - module being hooked, converted from the `binaries` list of hook-style 2-tuples `(source_dir_or_glob, - target_dir)` defined by this hook script. - excludedimports : set - Set of the fully-qualified names of all modules imported by the module being hooked to be ignored rather than - imported from that module, converted from the `excludedimports` list defined by this hook script. These - modules will only be "locally" rather than "globally" ignored. These modules will remain importable from all - modules other than the module being hooked. - hiddenimports : set - Set of the fully-qualified names of all modules imported by the module being hooked that are _not_ - automatically detectable by PyInstaller (usually due to being dynamically imported in that module), - converted from the `hiddenimports` list defined by this hook script. - warn_on_missing_hiddenimports : bool - Boolean flag indicating whether missing hidden imports from the hook should generate warnings or not. This - behavior is enabled by default, but individual hooks can opt out of it. - module_collection_mode : dict - A dictionary of package/module names and their corresponding collection mode strings ('pyz', 'pyc', 'py', - 'pyz+py', 'py+pyz'). - bindepend_symlink_suppression : set - A set of paths or path patterns corresponding to shared libraries for which binary dependency analysis should - not create symbolic links into top-level application directory. - - Attributes (Non-magic) - ---------- - module_graph : ModuleGraph - Current module graph. - module_name : str - Name of the module hooked by this hook script. - hook_filename : str - Absolute or relative path of this hook script. - hook_module_name : str - Name of the in-memory module of this hook script's interpreted contents. - _hook_module : module - In-memory module of this hook script's interpreted contents, lazily loaded on the first call to the - `_load_hook_module()` method _or_ `None` if this method has yet to be accessed. - _default_priority : int - Default (location-based) priority for this hook. - priority : int - Actual priority for this hook. Might be different from `_default_priority` if hook file specifies the hook - priority override. - """ - - #-- Magic -- - - def __init__(self, module_graph, module_name, hook_filename, hook_module_name_prefix, default_priority): - """ - Initialize this metadata. - - Parameters - ---------- - module_graph : ModuleGraph - Current module graph. - module_name : str - Name of the module hooked by this hook script. - hook_filename : str - Absolute or relative path of this hook script. - hook_module_name_prefix : str - String prefixing the name of the in-memory module for this hook script. To avoid namespace clashes with - similar modules created by other `ModuleHook` objects in other `ModuleHookCache` containers, this string - _must_ be unique to the `ModuleHookCache` container containing this `ModuleHook` object. If this string - is non-unique, an existing in-memory module will be erroneously reused when lazily loading this hook - script, thus erroneously resanitizing previously sanitized hook script attributes (e.g., `datas`) with - the `format_binaries_and_datas()` helper. - default_priority : int - Default, location-based priority for this hook. Used to select active hook when multiple hooks are defined - for the same module. - """ - # Note that the passed module graph is already a weak reference, avoiding circular reference issues. See - # ModuleHookCache.__init__(). TODO: Add a failure message - assert isinstance(module_graph, weakref.ProxyTypes) - self.module_graph = module_graph - self.module_name = module_name - self.hook_filename = hook_filename - - # Default priority; used as fall-back for dynamic `hook_priority` attribute. - self._default_priority = default_priority - - # Name of the in-memory module fabricated to refer to this hook script. - self.hook_module_name = hook_module_name_prefix + self.module_name.replace('.', '_') - - # Attributes subsequently defined by the _load_hook_module() method. - self._loaded = False - self._has_hook_function = False - self._hook_module = None - - def __getattr__(self, attr_name): - """ - Get the magic attribute with the passed name (e.g., `datas`) from this lazily loaded hook script if any _or_ - raise `AttributeError` otherwise. - - This special method is called only for attributes _not_ already defined by this object. This includes - undefined attributes and the first attempt to access magic attributes. - - This special method is _not_ called for subsequent attempts to access magic attributes. The first attempt to - access magic attributes defines corresponding instance variables accessible via the `self.__dict__` instance - dictionary (e.g., as `self.datas`) without calling this method. This approach also allows magic attributes to - be deleted from this object _without_ defining the `__delattr__()` special method. - - See Also - ---------- - Class docstring for supported magic attributes. - """ - - if attr_name == 'priority': - # If attribute is part of hook metadata, read metadata from hook script and return the attribute value. - self._load_hook_metadata() - return getattr(self, attr_name) - if attr_name in _MAGIC_MODULE_HOOK_ATTRS and not self._loaded: - # If attribute is hook's magic attribute, load and run the hook script, and return the attribute value. - self._load_hook_module() - return getattr(self, attr_name) - else: - # This is an undefined attribute. Raise an exception. - raise AttributeError(attr_name) - - def __setattr__(self, attr_name, attr_value): - """ - Set the attribute with the passed name to the passed value. - - If this is a magic attribute, this hook script will be lazily loaded before setting this attribute. Unlike - `__getattr__()`, this special method is called to set _any_ attribute -- including magic, non-magic, - and undefined attributes. - - See Also - ---------- - Class docstring for supported magic attributes. - """ - - # If this is a magic attribute, initialize this attribute by lazy loading this hook script before overwriting - # this attribute. - if attr_name in _MAGIC_MODULE_HOOK_ATTRS: - self._load_hook_module() - - # Set this attribute to the passed value. To avoid recursion, the superclass method rather than setattr() is - # called. - return super().__setattr__(attr_name, attr_value) - - #-- Loading -- - - def _load_hook_metadata(self): - """ - Load hook metadata from its source file. - """ - self.priority = self._default_priority - - # Priority override pattern: `# $PyInstaller-Hook-Priority: ` - priority_pattern = re.compile(r"^\s*#\s*\$PyInstaller-Hook-Priority:\s*(?P[\S]+)") - - with open(self.hook_filename, "r", encoding="utf-8") as f: - for line in f: - # Attempt to match and parse hook priority directive - m = priority_pattern.match(line) - if m is not None: - try: - self.priority = int(m.group('value')) - except Exception: - logger.warning( - "Failed to parse hook priority value string: %r!", m.group('value'), exc_info=True - ) - # Currently, this is our only line of interest, so we can stop the search here. - return - - def _load_hook_module(self, keep_module_ref=False): - """ - Lazily load this hook script into an in-memory private module. - - This method (and, indeed, this class) preserves all attributes and functions defined by this hook script as - is, ensuring sane behaviour in hook functions _not_ expecting unplanned external modification. Instead, - this method copies public attributes defined by this hook script (e.g., `binaries`) into private attributes - of this object, which the special `__getattr__()` and `__setattr__()` methods safely expose to external - callers. For public attributes _not_ defined by this hook script, the corresponding private attributes will - be assigned sane defaults. For some public attributes defined by this hook script, the corresponding private - attributes will be transformed into objects more readily and safely consumed elsewhere by external callers. - - See Also - ---------- - Class docstring for supported attributes. - """ - - # If this hook script module has already been loaded, noop. - if self._loaded and (self._hook_module is not None or not keep_module_ref): - return - - # Load and execute the hook script. Even if mechanisms from the import machinery are used, this does not import - # the hook as the module. - hook_path, hook_basename = os.path.split(self.hook_filename) - logger.info('Processing standard module hook %r from %r', hook_basename, hook_path) - try: - self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename) - except ImportError: - logger.debug("Hook failed with:", exc_info=True) - raise ImportErrorWhenRunningHook(self.hook_module_name, self.hook_filename) - - # Mark as loaded - self._loaded = True - - # Check if module has hook() function. - self._has_hook_function = hasattr(self._hook_module, 'hook') - - # Copy hook script attributes into magic attributes exposed as instance variables of the current "ModuleHook" - # instance. - for attr_name, (default_type, sanitizer_func) in _MAGIC_MODULE_HOOK_ATTRS.items(): - # Unsanitized value of this attribute. - attr_value = getattr(self._hook_module, attr_name, None) - - # If this attribute is undefined, expose a sane default instead. - if attr_value is None: - attr_value = default_type() - # Else if this attribute requires sanitization, do so. - elif sanitizer_func is not None: - attr_value = sanitizer_func(attr_value) - # Else, expose the unsanitized value of this attribute. - - # Expose this attribute as an instance variable of the same name. - setattr(self, attr_name, attr_value) - - # If module_collection_mode has an entry with None key, reassign it to the hooked module's name. - setattr( - self, 'module_collection_mode', { - key if key is not None else self.module_name: value - for key, value in getattr(self, 'module_collection_mode').items() - } - ) - - # Release the module if we do not need the reference. This is the case when hook is loaded during the analysis - # rather as part of the post-graph operations. - if not keep_module_ref: - self._hook_module = None - - #-- Hooks -- - - def post_graph(self, analysis): - """ - Call the **post-graph hook** (i.e., `hook()` function) defined by this hook script, if any. - - Parameters - ---------- - analysis: build_main.Analysis - Analysis that calls the hook - - This method is intended to be called _after_ the module graph for this application is constructed. - """ - - # Lazily load this hook script into an in-memory module. - # The script might have been loaded before during modulegraph analysis; in that case, it needs to be reloaded - # only if it provides a hook() function. - if not self._loaded or self._has_hook_function: - # Keep module reference when loading the hook, so we can call its hook function! - self._load_hook_module(keep_module_ref=True) - - # Call this hook script's hook() function, which modifies attributes accessed by subsequent methods and - # hence must be called first. - self._process_hook_func(analysis) - - # Order is insignificant here. - self._process_hidden_imports() - - def _process_hook_func(self, analysis): - """ - Call this hook's `hook()` function if defined. - - Parameters - ---------- - analysis: build_main.Analysis - Analysis that calls the hook - """ - - # If this hook script defines no hook() function, noop. - if not hasattr(self._hook_module, 'hook'): - return - - # Call this hook() function. - hook_api = PostGraphAPI(module_name=self.module_name, module_graph=self.module_graph, analysis=analysis) - try: - self._hook_module.hook(hook_api) - except ImportError: - logger.debug("Hook failed with:", exc_info=True) - raise ImportErrorWhenRunningHook(self.hook_module_name, self.hook_filename) - - # Update all magic attributes modified by the prior call. - self.datas.update(set(hook_api._added_datas)) - self.binaries.update(set(hook_api._added_binaries)) - self.hiddenimports.extend(hook_api._added_imports) - self.module_collection_mode.update(hook_api._module_collection_mode) - self.bindepend_symlink_suppression.update(hook_api._bindepend_symlink_suppression) - - # FIXME: `hook_api._deleted_imports` should be appended to `self.excludedimports` and used to suppress module - # import during the modulegraph construction rather than handled here. However, for that to work, the `hook()` - # function needs to be ran during modulegraph construction instead of in post-processing (and this in turn - # requires additional code refactoring in order to be able to pass `analysis` to `PostGraphAPI` object at - # that point). So once the modulegraph rewrite is complete, remove the code block below. - for deleted_module_name in hook_api._deleted_imports: - # Remove the graph link between the hooked module and item. This removes the 'item' node from the graph if - # no other links go to it (no other modules import it) - self.module_graph.removeReference(hook_api.node, deleted_module_name) - - def _process_hidden_imports(self): - """ - Add all imports listed in this hook script's `hiddenimports` attribute to the module graph as if directly - imported by this hooked module. - - These imports are typically _not_ implicitly detectable by PyInstaller and hence must be explicitly defined - by hook scripts. - """ - - # For each hidden import required by the module being hooked... - for import_module_name in self.hiddenimports: - try: - # Graph node for this module. Do not implicitly create namespace packages for non-existent packages. - caller = self.module_graph.find_node(self.module_name, create_nspkg=False) - - # Manually import this hidden import from this module. - self.module_graph.import_hook(import_module_name, caller) - # If this hidden import is unimportable, print a non-fatal warning. Hidden imports often become - # desynchronized from upstream packages and hence are only "soft" recommendations. - except ImportError: - if self.warn_on_missing_hiddenimports: - logger.warning('Hidden import "%s" not found!', import_module_name) - - -class AdditionalFilesCache: - """ - Cache for storing what binaries and datas were pushed by what modules when import hooks were processed. - """ - def __init__(self): - self._binaries = {} - self._datas = {} - - def add(self, modname, binaries, datas): - - self._binaries.setdefault(modname, []) - self._binaries[modname].extend(binaries or []) - self._datas.setdefault(modname, []) - self._datas[modname].extend(datas or []) - - def __contains__(self, name): - return name in self._binaries or name in self._datas - - def binaries(self, modname): - """ - Return list of binaries for given module name. - """ - return self._binaries.get(modname, []) - - def datas(self, modname): - """ - Return list of datas for given module name. - """ - return self._datas.get(modname, []) diff --git a/voxvera/vendor/PyInstaller/depend/imphookapi.py b/voxvera/vendor/PyInstaller/depend/imphookapi.py deleted file mode 100755 index 16ce0c1..0000000 --- a/voxvera/vendor/PyInstaller/depend/imphookapi.py +++ /dev/null @@ -1,486 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Classes facilitating communication between PyInstaller and import hooks. - -PyInstaller passes instances of classes defined by this module to corresponding functions defined by external import -hooks, which commonly modify the contents of these instances before returning. PyInstaller then detects and converts -these modifications into appropriate operations on the current `PyiModuleGraph` instance, thus modifying which -modules will be frozen into the executable. -""" - -from PyInstaller.building.utils import format_binaries_and_datas -from PyInstaller.lib.modulegraph.modulegraph import (RuntimeModule, RuntimePackage) - - -class PreSafeImportModuleAPI: - """ - Metadata communicating changes made by the current **pre-safe import module hook** (i.e., hook run immediately - _before_ a call to `ModuleGraph._safe_import_module()` recursively adding the hooked module, package, - or C extension and all transitive imports thereof to the module graph) back to PyInstaller. - - Pre-safe import module hooks _must_ define a `pre_safe_import_module()` function accepting an instance of this - class, whose attributes describe the subsequent `ModuleGraph._safe_import_module()` call creating the hooked - module's graph node. - - Each pre-safe import module hook is run _only_ on the first attempt to create the hooked module's graph node and - then subsequently ignored. If this hook successfully creates that graph node, the subsequent - `ModuleGraph._safe_import_module()` call will observe this fact and silently return without attempting to - recreate that graph node. - - Pre-safe import module hooks are typically used to create graph nodes for **runtime modules** (i.e., - modules dynamically defined at runtime). Most modules are physically defined in external `.py`-suffixed scripts. - Some modules, however, are dynamically defined at runtime (e.g., `six.moves`, dynamically defined by the - physically defined `six.py` module). However, `ModuleGraph` only parses `import` statements residing in external - scripts. `ModuleGraph` is _not_ a full-fledged, Turing-complete Python interpreter and hence has no means of - parsing `import` statements performed by runtime modules existing only in-memory. - - 'With great power comes great responsibility.' - - - Attributes (Immutable) - ---------------------------- - The following attributes are **immutable** (i.e., read-only). For safety, any attempts to change these attributes - _will_ result in a raised exception: - - module_graph : PyiModuleGraph - Current module graph. - parent_package : Package - Graph node for the package providing this module _or_ `None` if this module is a top-level module. - - Attributes (Mutable) - ----------------------------- - The following attributes are editable. - - module_basename : str - Unqualified name of the module to be imported (e.g., `text`). - module_name : str - Fully-qualified name of this module (e.g., `email.mime.text`). - """ - def __init__(self, module_graph, module_basename, module_name, parent_package): - self._module_graph = module_graph - self.module_basename = module_basename - self.module_name = module_name - self._parent_package = parent_package - - # Immutable properties. No corresponding setters are defined. - @property - def module_graph(self): - """ - Current module graph. - """ - return self._module_graph - - @property - def parent_package(self): - """ - Parent Package of this node. - """ - return self._parent_package - - def add_runtime_module(self, module_name): - """ - Add a graph node representing a non-package Python module with the passed name dynamically defined at runtime. - - Most modules are statically defined on-disk as standard Python files. Some modules, however, are dynamically - defined in-memory at runtime (e.g., `gi.repository.Gst`, dynamically defined by the statically defined - `gi.repository.__init__` module). - - This method adds a graph node representing such a runtime module. Since this module is _not_ a package, - all attempts to import submodules from this module in `from`-style import statements (e.g., the `queue` - submodule in `from six.moves import queue`) will be silently ignored. To circumvent this, simply call - `add_runtime_package()` instead. - - Parameters - ---------- - module_name : str - Fully-qualified name of this module (e.g., `gi.repository.Gst`). - - Examples - ---------- - This method is typically called by `pre_safe_import_module()` hooks, e.g.: - - def pre_safe_import_module(api): - api.add_runtime_module(api.module_name) - """ - - self._module_graph.add_module(RuntimeModule(module_name)) - - def add_runtime_package(self, package_name): - """ - Add a graph node representing a non-namespace Python package with the passed name dynamically defined at - runtime. - - Most packages are statically defined on-disk as standard subdirectories containing `__init__.py` files. Some - packages, however, are dynamically defined in-memory at runtime (e.g., `six.moves`, dynamically defined by - the statically defined `six` module). - - This method adds a graph node representing such a runtime package. All attributes imported from this package - in `from`-style import statements that are submodules of this package (e.g., the `queue` submodule in `from - six.moves import queue`) will be imported rather than ignored. - - Parameters - ---------- - package_name : str - Fully-qualified name of this package (e.g., `six.moves`). - - Examples - ---------- - This method is typically called by `pre_safe_import_module()` hooks, e.g.: - - def pre_safe_import_module(api): - api.add_runtime_package(api.module_name) - """ - - self._module_graph.add_module(RuntimePackage(package_name)) - - def add_alias_module(self, real_module_name, alias_module_name): - """ - Alias the source module to the target module with the passed names. - - This method ensures that the next call to findNode() given the target module name will resolve this alias. - This includes importing and adding a graph node for the source module if needed as well as adding a reference - from the target to the source module. - - Parameters - ---------- - real_module_name : str - Fully-qualified name of the **existing module** (i.e., the module being aliased). - alias_module_name : str - Fully-qualified name of the **non-existent module** (i.e., the alias to be created). - """ - - self._module_graph.alias_module(real_module_name, alias_module_name) - - def append_package_path(self, directory): - """ - Modulegraph does a good job at simulating Python's, but it cannot handle packagepath `__path__` modifications - packages make at runtime. - - Therefore there is a mechanism whereby you can register extra paths in this map for a package, and it will be - honored. - - Parameters - ---------- - directory : str - Absolute or relative path of the directory to be appended to this package's `__path__` attribute. - """ - - self._module_graph.append_package_path(self.module_name, directory) - - -class PreFindModulePathAPI: - """ - Metadata communicating changes made by the current **pre-find module path hook** (i.e., hook run immediately - _before_ a call to `ModuleGraph._find_module_path()` finding the hooked module's absolute path) back to PyInstaller. - - Pre-find module path hooks _must_ define a `pre_find_module_path()` function accepting an instance of this class, - whose attributes describe the subsequent `ModuleGraph._find_module_path()` call to be performed. - - Pre-find module path hooks are typically used to change the absolute path from which a module will be - subsequently imported and thus frozen into the executable. To do so, hooks may overwrite the default - `search_dirs` list of the absolute paths of all directories to be searched for that module: e.g., - - def pre_find_module_path(api): - api.search_dirs = ['/the/one/true/package/providing/this/module'] - - Each pre-find module path hook is run _only_ on the first call to `ModuleGraph._find_module_path()` for the - corresponding module. - - Attributes - ---------- - The following attributes are **mutable** (i.e., modifiable). All changes to these attributes will be immediately - respected by PyInstaller: - - search_dirs : list - List of the absolute paths of all directories to be searched for this module (in order). Searching will halt - at the first directory containing this module. - - Attributes (Immutable) - ---------- - The following attributes are **immutable** (i.e., read-only). For safety, any attempts to change these attributes - _will_ result in a raised exception: - - module_name : str - Fully-qualified name of this module. - module_graph : PyiModuleGraph - Current module graph. For efficiency, this attribute is technically mutable. To preserve graph integrity, - this attribute should nonetheless _never_ be modified. While read-only `PyiModuleGraph` methods (e.g., - `findNode()`) are safely callable from within pre-find module path hooks, methods modifying the graph are - _not_. If graph modifications are required, consider an alternative type of hook (e.g., pre-import module - hooks). - """ - def __init__( - self, - module_graph, - module_name, - search_dirs, - ): - # Mutable attributes. - self.search_dirs = search_dirs - - # Immutable attributes. - self._module_graph = module_graph - self._module_name = module_name - - # Immutable properties. No corresponding setters are defined. - @property - def module_graph(self): - """ - Current module graph. - """ - return self._module_graph - - @property - def module_name(self): - """ - Fully-qualified name of this module. - """ - return self._module_name - - -class PostGraphAPI: - """ - Metadata communicating changes made by the current **post-graph hook** (i.e., hook run for a specific module - transitively imported by the current application _after_ the module graph of all `import` statements performed by - this application has been constructed) back to PyInstaller. - - Post-graph hooks may optionally define a `post_graph()` function accepting an instance of this class, - whose attributes describe the current state of the module graph and the hooked module's graph node. - - Attributes (Mutable) - ---------- - The following attributes are **mutable** (i.e., modifiable). All changes to these attributes will be immediately - respected by PyInstaller: - - module_graph : PyiModuleGraph - Current module graph. - module : Node - Graph node for the currently hooked module. - - 'With great power comes great responsibility.' - - Attributes (Immutable) - ---------- - The following attributes are **immutable** (i.e., read-only). For safety, any attempts to change these attributes - _will_ result in a raised exception: - - __name__ : str - Fully-qualified name of this module (e.g., `six.moves.tkinter`). - __file__ : str - Absolute path of this module. If this module is: - * A standard (rather than namespace) package, this is the absolute path of this package's directory. - * A namespace (rather than standard) package, this is the abstract placeholder `-`. (Don't ask. Don't tell.) - * A non-package module or C extension, this is the absolute path of the corresponding file. - __path__ : list - List of the absolute paths of all directories comprising this package if this module is a package _or_ `None` - otherwise. If this module is a standard (rather than namespace) package, this list contains only the absolute - path of this package's directory. - co : code - Code object compiled from the contents of `__file__` (e.g., via the `compile()` builtin). - analysis: build_main.Analysis - The Analysis that load the hook. - - Attributes (Private) - ---------- - The following attributes are technically mutable but private, and hence should _never_ be externally accessed or - modified by hooks. Call the corresponding public methods instead: - - _added_datas : list - List of the `(name, path)` 2-tuples or TOC objects of all external data files required by the current hook, - defaulting to the empty list. This is equivalent to the global `datas` hook attribute. - _added_imports : list - List of the fully-qualified names of all modules imported by the current hook, defaulting to the empty list. - This is equivalent to the global `hiddenimports` hook attribute. - _added_binaries : list - List of the `(name, path)` 2-tuples or TOC objects of all external C extensions imported by the current hook, - defaulting to the empty list. This is equivalent to the global `binaries` hook attribute. - _module_collection_mode : dict - Dictionary of package/module names and their corresponding collection mode strings. This is equivalent to the - global `module_collection_mode` hook attribute. - _bindepend_symlink_suppression : set - A set of paths or path patterns corresponding to shared libraries for which binary dependency analysis should - not generate symbolic links into top-level application directory. - """ - def __init__(self, module_name, module_graph, analysis): - # Mutable attributes. - self.module_graph = module_graph - self.module = module_graph.find_node(module_name) - assert self.module is not None # should not occur - - # Immutable attributes. - self.___name__ = module_name - self.___file__ = self.module.filename - self._co = self.module.code - self._analysis = analysis - - # To enforce immutability, convert this module's package path if any into an immutable tuple. - self.___path__ = tuple(self.module.packagepath) \ - if self.module.packagepath is not None else None - - #FIXME: Refactor "_added_datas", "_added_binaries", and "_deleted_imports" into sets. Since order of - #import is important, "_added_imports" must remain a list. - - # Private attributes. - self._added_binaries = [] - self._added_datas = [] - self._added_imports = [] - self._deleted_imports = [] - self._module_collection_mode = {} - self._bindepend_symlink_suppression = set() - - # Immutable properties. No corresponding setters are defined. - @property - def __file__(self): - """ - Absolute path of this module's file. - """ - return self.___file__ - - @property - def __path__(self): - """ - List of the absolute paths of all directories comprising this package if this module is a package _or_ `None` - otherwise. If this module is a standard (rather than namespace) package, this list contains only the absolute - path of this package's directory. - """ - return self.___path__ - - @property - def __name__(self): - """ - Fully-qualified name of this module (e.g., `six.moves.tkinter`). - """ - return self.___name__ - - @property - def co(self): - """ - Code object compiled from the contents of `__file__` (e.g., via the `compile()` builtin). - """ - return self._co - - @property - def analysis(self): - """ - build_main.Analysis that calls the hook. - """ - return self._analysis - - # Obsolete immutable properties provided to preserve backward compatibility. - @property - def name(self): - """ - Fully-qualified name of this module (e.g., `six.moves.tkinter`). - - **This property has been deprecated by the `__name__` property.** - """ - return self.___name__ - - @property - def graph(self): - """ - Current module graph. - - **This property has been deprecated by the `module_graph` property.** - """ - return self.module_graph - - @property - def node(self): - """ - Graph node for the currently hooked module. - - **This property has been deprecated by the `module` property.** - """ - return self.module - - # TODO: This incorrectly returns the list of the graph nodes of all modules *TRANSITIVELY* (rather than directly) - # imported by this module. Unfortunately, this implies that most uses of this property are currently broken - # (e.g., "hook-PIL.SpiderImagePlugin.py"). We only require this for the aforementioned hook, so contemplate - # alternative approaches. - @property - def imports(self): - """ - List of the graph nodes of all modules directly imported by this module. - """ - return self.module_graph.iter_graph(start=self.module) - - def add_imports(self, *module_names): - """ - Add all Python modules whose fully-qualified names are in the passed list as "hidden imports" upon which the - current module depends. - - This is equivalent to appending such names to the hook-specific `hiddenimports` attribute. - """ - # Append such names to the current list of all such names. - self._added_imports.extend(module_names) - - def del_imports(self, *module_names): - """ - Remove the named fully-qualified modules from the set of imports (either hidden or visible) upon which the - current module depends. - - This is equivalent to appending such names to the hook-specific `excludedimports` attribute. - """ - self._deleted_imports.extend(module_names) - - def add_binaries(self, binaries): - """ - Add all external dynamic libraries in the passed list of `(src_name, dest_name)` 2-tuples as dependencies of the - current module. This is equivalent to adding to the global `binaries` hook attribute. - - For convenience, the `binaries` may also be a list of TOC-style 3-tuples `(dest_name, src_name, typecode)`. - """ - - # Detect TOC 3-tuple list by checking the length of the first entry - if binaries and len(binaries[0]) == 3: - self._added_binaries.extend(entry[:2] for entry in binaries) - else: - # NOTE: `format_binaries_and_datas` changes tuples from input format `(src_name, dest_name)` to output - # format `(dest_name, src_name)`. - self._added_binaries.extend(format_binaries_and_datas(binaries)) - - def add_datas(self, datas): - """ - Add all external data files in the passed list of `(src_name, dest_name)` 2-tuples as dependencies of the - current module. This is equivalent to adding to the global `datas` hook attribute. - - For convenience, the `datas` may also be a list of TOC-style 3-tuples `(dest_name, src_name, typecode)`. - """ - - # Detect TOC 3-tuple list by checking the length of the first entry - if datas and len(datas[0]) == 3: - self._added_datas.extend(entry[:2] for entry in datas) - else: - # NOTE: `format_binaries_and_datas` changes tuples from input format `(src_name, dest_name)` to output - # format `(dest_name, src_name)`. - self._added_datas.extend(format_binaries_and_datas(datas)) - - def set_module_collection_mode(self, name, mode): - """" - Set the package/module collection mode for the specified module name. If `name` is `None`, the hooked - module/package name is used. `mode` can be one of valid mode strings (`'pyz'`, `'pyc'`, `'py'`, `'pyz+py'`, - `'py+pyz'`) or `None`, which clears the setting for the module/package - but only within this hook's context! - """ - if name is None: - name = self.__name__ - if mode is None: - self._module_collection_mode.pop(name) - else: - self._module_collection_mode[name] = mode - - def add_bindepend_symlink_suppression_pattern(self, pattern): - """ - Add the given path or path pattern to the set of patterns that prevent binary dependency analysis from creating - a symbolic link to the top-level application directory. - """ - self._bindepend_symlink_suppression.add(pattern) diff --git a/voxvera/vendor/PyInstaller/depend/utils.py b/voxvera/vendor/PyInstaller/depend/utils.py deleted file mode 100755 index ebbbbff..0000000 --- a/voxvera/vendor/PyInstaller/depend/utils.py +++ /dev/null @@ -1,344 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Utility functions related to analyzing/bundling dependencies. -""" - -import ctypes.util -import os -import re -import shutil -from types import CodeType - -from PyInstaller import compat -from PyInstaller import log as logging -from PyInstaller.depend import bytecode -from PyInstaller.depend.dylib import include_library -from PyInstaller.exceptions import ExecCommandFailed - -logger = logging.getLogger(__name__) - - -def scan_code_for_ctypes(co): - binaries = __recursively_scan_code_objects_for_ctypes(co) - - # If any of the libraries has been requested with anything else than the basename, drop that entry and warn the - # user - PyInstaller would need to patch the compiled pyc file to make it work correctly! - binaries = set(binaries) - for binary in list(binaries): - # 'binary' might be in some cases None. Some Python modules (e.g., PyObjC.objc._bridgesupport) might contain - # code like this: - # dll = ctypes.CDLL(None) - if not binary: - # None values have to be removed too. - binaries.remove(binary) - elif binary != os.path.basename(binary): - # TODO make these warnings show up somewhere. - try: - filename = co.co_filename - except Exception: - filename = 'UNKNOWN' - logger.warning( - "Ignoring %s imported from %s - only basenames are supported with ctypes imports!", binary, filename - ) - binaries.remove(binary) - - binaries = _resolveCtypesImports(binaries) - return binaries - - -def __recursively_scan_code_objects_for_ctypes(code: CodeType): - """ - Detects ctypes dependencies, using reasonable heuristics that should cover most common ctypes usages; returns a - list containing names of binaries detected as dependencies. - """ - from PyInstaller.depend.bytecode import any_alias, search_recursively - - binaries = [] - ctypes_dll_names = { - *any_alias("ctypes.CDLL"), - *any_alias("ctypes.cdll.LoadLibrary"), - *any_alias("ctypes.WinDLL"), - *any_alias("ctypes.windll.LoadLibrary"), - *any_alias("ctypes.OleDLL"), - *any_alias("ctypes.oledll.LoadLibrary"), - *any_alias("ctypes.PyDLL"), - *any_alias("ctypes.pydll.LoadLibrary"), - } - find_library_names = { - *any_alias("ctypes.util.find_library"), - } - - for calls in bytecode.recursive_function_calls(code).values(): - for (name, args) in calls: - if not len(args) == 1 or not isinstance(args[0], str): - continue - if name in ctypes_dll_names: - # ctypes.*DLL() or ctypes.*dll.LoadLibrary() - binaries.append(*args) - elif name in find_library_names: - # ctypes.util.find_library() needs to be handled separately, because we need to resolve the library base - # name given as the argument (without prefix and suffix, e.g. 'gs') into corresponding full name (e.g., - # 'libgs.so.9'). - libname = args[0] - if libname: - try: # this try was inserted due to the ctypes bug https://github.com/python/cpython/issues/93094 - libname = ctypes.util.find_library(libname) - except FileNotFoundError: - libname = None - logger.warning( - 'ctypes.util.find_library raised a FileNotFoundError. ' - 'Supressing and assuming no lib with the name "%s" was found.', args[0] - ) - if libname: - # On Windows, `find_library` may return a full pathname. See issue #1934. - libname = os.path.basename(libname) - binaries.append(libname) - - # The above handles any flavour of function/class call. We still need to capture the (albeit rarely used) case of - # loading libraries with ctypes.cdll's getattr. - for i in search_recursively(_scan_code_for_ctypes_getattr, code).values(): - binaries.extend(i) - - return binaries - - -_ctypes_getattr_regex = bytecode.bytecode_regex( - rb""" - # Matches 'foo.bar' or 'foo.bar.whizz'. - - # Load the 'foo'. - ( - (?:(?:""" + bytecode._OPCODES_EXTENDED_ARG + rb""").)* - (?:""" + bytecode._OPCODES_FUNCTION_GLOBAL + rb"""). - ) - - # Load the 'bar.whizz' (one opcode per name component, each possibly preceded by name reference extension). - ( - (?: - (?:(?:""" + bytecode._OPCODES_EXTENDED_ARG + rb""").)* - (?:""" + bytecode._OPCODES_FUNCTION_LOAD + rb"""). - )+ - ) -""" -) - - -def _scan_code_for_ctypes_getattr(code: CodeType): - """ - Detect uses of ``ctypes.cdll.library_name``, which implies that ``library_name.dll`` should be collected. - """ - - key_names = ("cdll", "oledll", "pydll", "windll") - - for match in bytecode.finditer(_ctypes_getattr_regex, code.co_code): - name, attrs = match.groups() - name = bytecode.load(name, code) - attrs = bytecode.loads(attrs, code) - - if attrs and attrs[-1] == "LoadLibrary": - continue - - # Capture `from ctypes import ole; ole.dll_name`. - if len(attrs) == 1: - if name in key_names: - yield attrs[0] + ".dll" - # Capture `import ctypes; ctypes.ole.dll_name`. - if len(attrs) == 2: - if name == "ctypes" and attrs[0] in key_names: - yield attrs[1] + ".dll" - - -# TODO: reuse this code with modulegraph implementation. -def _resolveCtypesImports(cbinaries): - """ - Completes ctypes BINARY entries for modules with their full path. - - Input is a list of c-binary-names (as found by `scan_code_instruction_for_ctypes`). Output is a list of tuples - ready to be appended to the ``binaries`` of a modules. - - This function temporarily extents PATH, LD_LIBRARY_PATH or DYLD_LIBRARY_PATH (depending on the platform) by - CONF['pathex'] so shared libs will be search there, too. - - Example: - >>> _resolveCtypesImports(['libgs.so']) - [(libgs.so', ''/usr/lib/libgs.so', 'BINARY')] - """ - from ctypes.util import find_library - - from PyInstaller.config import CONF - - if compat.is_unix: - envvar = "LD_LIBRARY_PATH" - elif compat.is_darwin: - envvar = "DYLD_LIBRARY_PATH" - else: - envvar = "PATH" - - def _setPaths(): - path = os.pathsep.join(CONF['pathex']) - old = compat.getenv(envvar) - if old is not None: - path = os.pathsep.join((path, old)) - compat.setenv(envvar, path) - return old - - def _restorePaths(old): - if old is None: - compat.unsetenv(envvar) - else: - compat.setenv(envvar, old) - - ret = [] - - # Try to locate the shared library on the disk. This is done by calling ctypes.util.find_library with - # ImportTracker's local paths temporarily prepended to the library search paths (and restored after the call). - old = _setPaths() - for cbin in cbinaries: - try: - # There is an issue with find_library() where it can run into errors trying to locate the library. See - # #5734. - cpath = find_library(os.path.splitext(cbin)[0]) - except FileNotFoundError: - # In these cases, find_library() should return None. - cpath = None - if compat.is_unix or compat.is_cygwin: - # CAVEAT: find_library() is not the correct function. ctype's documentation says that it is meant to resolve - # only the filename (as a *compiler* does) not the full path. Anyway, it works well enough on Windows and - # macOS. On Linux, we need to implement more code to find out the full path. - if cpath is None: - cpath = cbin - # "man ld.so" says that we should first search LD_LIBRARY_PATH and then the ldcache. - for d in compat.getenv(envvar, '').split(os.pathsep): - if os.path.isfile(os.path.join(d, cpath)): - cpath = os.path.join(d, cpath) - break - else: - if LDCONFIG_CACHE is None: - load_ldconfig_cache() - if cpath in LDCONFIG_CACHE: - cpath = LDCONFIG_CACHE[cpath] - assert os.path.isfile(cpath) - else: - cpath = None - if cpath is None: - # Skip warning message if cbin (basename of library) is ignored. This prevents messages like: - # 'W: library kernel32.dll required via ctypes not found' - if not include_library(cbin): - continue - # On non-Windows, automatically ignore all ctypes-based referenes to DLL files. This complements the above - # check, which might not match potential case variations (e.g., `KERNEL32.dll`, instead of `kernel32.dll`) - # due to case-sensitivity of the matching that is in effect on non-Windows platforms. - if (not compat.is_win and not compat.is_cygwin) and cbin.lower().endswith('.dll'): - continue - logger.warning("Library %s required via ctypes not found", cbin) - else: - if not include_library(cpath): - continue - ret.append((cbin, cpath, "BINARY")) - _restorePaths(old) - return ret - - -LDCONFIG_CACHE = None # cache the output of `/sbin/ldconfig -p` - - -def load_ldconfig_cache(): - """ - Create a cache of the `ldconfig`-output to call it only once. - It contains thousands of libraries and running it on every dylib is expensive. - """ - global LDCONFIG_CACHE - - if LDCONFIG_CACHE is not None: - return - - if compat.is_cygwin: - # Not available under Cygwin; but we might be re-using general POSIX codepaths, and end up here. So exit early. - LDCONFIG_CACHE = {} - return - - if compat.is_musl: - # Musl deliberately doesn't use ldconfig. The ldconfig executable either doesn't exist or it's a functionless - # executable which, on calling with any arguments, simply tells you that those arguments are invalid. - LDCONFIG_CACHE = {} - return - - ldconfig = shutil.which('ldconfig') - if ldconfig is None: - # If `ldconfig` is not found in $PATH, search for it in some fixed directories. Simply use a second call instead - # of fiddling around with checks for empty env-vars and string-concat. - ldconfig = shutil.which('ldconfig', path='/usr/sbin:/sbin:/usr/bin:/bin') - - # If we still could not find the 'ldconfig' command... - if ldconfig is None: - LDCONFIG_CACHE = {} - return - - if compat.is_freebsd or compat.is_openbsd: - # This has a quite different format than other Unixes: - # [vagrant@freebsd-10 ~]$ ldconfig -r - # /var/run/ld-elf.so.hints: - # search directories: /lib:/usr/lib:/usr/lib/compat:... - # 0:-lgeom.5 => /lib/libgeom.so.5 - # 184:-lpython2.7.1 => /usr/local/lib/libpython2.7.so.1 - ldconfig_arg = '-r' - splitlines_count = 2 - pattern = re.compile(r'^\s+\d+:-l(\S+)(\s.*)? => (\S+)') - else: - # Skip first line of the library list because it is just an informative line and might contain localized - # characters. Example of first line with locale set to cs_CZ.UTF-8: - #$ /sbin/ldconfig -p - #V keši „/etc/ld.so.cache“ nalezeno knihoven: 2799 - # libzvbi.so.0 (libc6,x86-64) => /lib64/libzvbi.so.0 - # libzvbi-chains.so.0 (libc6,x86-64) => /lib64/libzvbi-chains.so.0 - ldconfig_arg = '-p' - splitlines_count = 1 - pattern = re.compile(r'^\s+(\S+)(\s.*)? => (\S+)') - - try: - text = compat.exec_command(ldconfig, ldconfig_arg) - except ExecCommandFailed: - logger.warning("Failed to execute ldconfig. Disabling LD cache.") - LDCONFIG_CACHE = {} - return - - text = text.strip().splitlines()[splitlines_count:] - - LDCONFIG_CACHE = {} - for line in text: - # :fixme: this assumes library names do not contain whitespace - m = pattern.match(line) - - # Sanitize away any abnormal lines of output. - if m is None: - # Warn about it then skip the rest of this iteration. - if re.search("Cache generated by:", line): - # See #5540. This particular line is harmless. - pass - else: - logger.warning("Unrecognised line of output %r from ldconfig", line) - continue - - path = m.groups()[-1] - if compat.is_freebsd or compat.is_openbsd: - # Insert `.so` at the end of the lib's basename. soname and filename may have (different) trailing versions. - # We assume the `.so` in the filename to mark the end of the lib's basename. - bname = os.path.basename(path).split('.so', 1)[0] - name = 'lib' + m.group(1) - assert name.startswith(bname) - name = bname + '.so' + name[len(bname):] - else: - name = m.group(1) - # ldconfig may know about several versions of the same lib, e.g., different arch, different libc, etc. - # Use the first entry. - if name not in LDCONFIG_CACHE: - LDCONFIG_CACHE[name] = path diff --git a/voxvera/vendor/PyInstaller/exceptions.py b/voxvera/vendor/PyInstaller/exceptions.py deleted file mode 100755 index 020e878..0000000 --- a/voxvera/vendor/PyInstaller/exceptions.py +++ /dev/null @@ -1,70 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -class ExecCommandFailed(SystemExit): - pass - - -class HookError(Exception): - """ - Base class for hook related errors. - """ - pass - - -class ImportErrorWhenRunningHook(HookError): - def __str__(self): - return ( - "ERROR: Failed to import module {0} required by hook for module {1}. Please check whether module {0} " - "actually exists and whether the hook is compatible with your version of {1}: You might want to read more " - "about hooks in the manual and provide a pull-request to improve PyInstaller.".format( - self.args[0], self.args[1] - ) - ) - - -class RemovedCipherFeatureError(SystemExit): - def __init__(self, message): - super().__init__( - f"ERROR: Bytecode encryption was removed in PyInstaller v6.0. {message}" - " For the rationale and alternatives see https://github.com/pyinstaller/pyinstaller/pull/6999" - ) - - -class RemovedExternalManifestError(SystemExit): - def __init__(self, message): - super().__init__(f"ERROR: Support for external executable manifest was removed in PyInstaller v6.0. {message}") - - -class RemovedWinSideBySideSupportError(SystemExit): - def __init__(self, message): - super().__init__( - f"ERROR: Support for collecting and processing WinSxS assemblies was removed in PyInstaller v6.0. {message}" - ) - - -class PythonLibraryNotFoundError(SystemExit): - def __init__(self, message): - super().__init__(f"ERROR: {message}") - - -class InvalidSrcDestTupleError(SystemExit): - def __init__(self, src_dest, message): - super().__init__(f"ERROR: Invalid (SRC, DEST_DIR) tuple: {src_dest!r}. {message}") - - -class ImportlibMetadataError(SystemExit): - def __init__(self): - super().__init__( - "ERROR: PyInstaller requires importlib.metadata from python >= 3.10 stdlib or importlib_metadata from " - "importlib-metadata >= 4.6" - ) diff --git a/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/__init__.py b/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/__init__.py deleted file mode 100755 index e006337..0000000 --- a/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/__init__.py +++ /dev/null @@ -1,36 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2023, 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 -# ----------------------------------------------------------------------------- - -import sys -import os - -# A boolean indicating whether the frozen application is a macOS .app bundle. -is_macos_app_bundle = sys.platform == 'darwin' and sys._MEIPASS.endswith("Contents/Frameworks") - - -def prepend_path_to_environment_variable(path, variable_name): - """ - Prepend the given path to the list of paths stored in the given environment variable (separated by `os.pathsep`). - If the given path is already specified in the environment variable, no changes are made. If the environment variable - is not set or is empty, it is set/overwritten with the given path. - """ - stored_paths = os.environ.get(variable_name) - if stored_paths: - # If path is already included, make this a no-op. NOTE: we need to split the string and search in the list of - # substrings to find an exact match; searching in the original string might erroneously match a prefix of a - # longer (i.e., sub-directory) path when such entry already happens to be in PATH (see #8857). - if path in stored_paths.split(os.pathsep): - return - # Otherwise, prepend the path - stored_paths = path + os.pathsep + stored_paths - else: - stored_paths = path - os.environ[variable_name] = stored_paths diff --git a/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/_win32.py b/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/_win32.py deleted file mode 100755 index 80e30ec..0000000 --- a/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/_win32.py +++ /dev/null @@ -1,333 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2023, 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 -# ----------------------------------------------------------------------------- - -import ctypes -import ctypes.wintypes - -# Constants from win32 headers -TOKEN_QUERY = 0x0008 - -TokenUser = 1 # from TOKEN_INFORMATION_CLASS enum -TokenAppContainerSid = 31 # from TOKEN_INFORMATION_CLASS enum - -ERROR_INSUFFICIENT_BUFFER = 122 - -INVALID_HANDLE = -1 - -FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100 -FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000 - -SDDL_REVISION1 = 1 - -# Structures for ConvertSidToStringSidW -PSID = ctypes.wintypes.LPVOID - - -class SID_AND_ATTRIBUTES(ctypes.Structure): - _fields_ = [ - ("Sid", PSID), - ("Attributes", ctypes.wintypes.DWORD), - ] - - -class TOKEN_USER(ctypes.Structure): - _fields_ = [ - ("User", SID_AND_ATTRIBUTES), - ] - - -PTOKEN_USER = ctypes.POINTER(TOKEN_USER) - - -class TOKEN_APPCONTAINER_INFORMATION(ctypes.Structure): - _fields_ = [ - ("TokenAppContainer", PSID), - ] - - -PTOKEN_APPCONTAINER_INFORMATION = ctypes.POINTER(TOKEN_APPCONTAINER_INFORMATION) - -# SECURITY_ATTRIBUTES structure for CreateDirectoryW -PSECURITY_DESCRIPTOR = ctypes.wintypes.LPVOID - - -class SECURITY_ATTRIBUTES(ctypes.Structure): - _fields_ = [ - ("nLength", ctypes.wintypes.DWORD), - ("lpSecurityDescriptor", PSECURITY_DESCRIPTOR), - ("bInheritHandle", ctypes.wintypes.BOOL), - ] - - -# win32 API functions, bound via ctypes. -# NOTE: we do not use ctypes.windll. to avoid modifying its (global) function prototypes, which might affect -# user's code. -advapi32 = ctypes.WinDLL("advapi32") -kernel32 = ctypes.WinDLL("kernel32") - -advapi32.ConvertSidToStringSidW.restype = ctypes.wintypes.BOOL -advapi32.ConvertSidToStringSidW.argtypes = ( - PSID, # [in] PSID Sid - ctypes.POINTER(ctypes.wintypes.LPWSTR), # [out] LPWSTR *StringSid -) - -advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW.restype = ctypes.wintypes.BOOL -advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW.argtypes = ( - ctypes.wintypes.LPCWSTR, # [in] LPCWSTR StringSecurityDescriptor - ctypes.wintypes.DWORD, # [in] DWORD StringSDRevision - ctypes.POINTER(PSECURITY_DESCRIPTOR), # [out] PSECURITY_DESCRIPTOR *SecurityDescriptor - ctypes.wintypes.PULONG, # [out] PULONG SecurityDescriptorSize -) - -advapi32.GetTokenInformation.restype = ctypes.wintypes.BOOL -advapi32.GetTokenInformation.argtypes = ( - ctypes.wintypes.HANDLE, # [in] HANDLE TokenHandle - ctypes.c_int, # [in] TOKEN_INFORMATION_CLASS TokenInformationClass - ctypes.wintypes.LPVOID, # [out, optional] LPVOID TokenInformation - ctypes.wintypes.DWORD, # [in] DWORD TokenInformationLength - ctypes.wintypes.PDWORD, # [out] PDWORD ReturnLength -) - -kernel32.CloseHandle.restype = ctypes.wintypes.BOOL -kernel32.CloseHandle.argtypes = ( - ctypes.wintypes.HANDLE, # [in] HANDLE hObject -) - -kernel32.CreateDirectoryW.restype = ctypes.wintypes.BOOL -kernel32.CreateDirectoryW.argtypes = ( - ctypes.wintypes.LPCWSTR, # [in] LPCWSTR lpPathName - ctypes.POINTER(SECURITY_ATTRIBUTES), # [in, optional] LPSECURITY_ATTRIBUTES lpSecurityAttributes -) - -kernel32.FormatMessageW.restype = ctypes.wintypes.DWORD -kernel32.FormatMessageW.argtypes = ( - ctypes.wintypes.DWORD, # [in] DWORD dwFlags - ctypes.wintypes.LPCVOID, # [in, optional] LPCVOID lpSource - ctypes.wintypes.DWORD, # [in] DWORD dwMessageId - ctypes.wintypes.DWORD, # [in] DWORD dwLanguageId - ctypes.wintypes.LPWSTR, # [out] LPWSTR lpBuffer - ctypes.wintypes.DWORD, # [in] DWORD nSize - ctypes.wintypes.LPVOID, # [in, optional] va_list *Arguments -) - -kernel32.GetCurrentProcess.restype = ctypes.wintypes.HANDLE -# kernel32.GetCurrentProcess has no arguments - -kernel32.GetLastError.restype = ctypes.wintypes.DWORD -# kernel32.GetLastError has no arguments - -kernel32.LocalFree.restype = ctypes.wintypes.BOOL -kernel32.LocalFree.argtypes = ( - ctypes.wintypes.HLOCAL, # [in] _Frees_ptr_opt_ HLOCAL hMem -) - -kernel32.OpenProcessToken.restype = ctypes.wintypes.BOOL -kernel32.OpenProcessToken.argtypes = ( - ctypes.wintypes.HANDLE, # [in] HANDLE ProcessHandle - ctypes.wintypes.DWORD, # [in] DWORD DesiredAccess - ctypes.wintypes.PHANDLE, # [out] PHANDLE TokenHandle -) - - -def _win_error_to_message(error_code): - """ - Convert win32 error code to message. - """ - message_wstr = ctypes.wintypes.LPWSTR(None) - ret = kernel32.FormatMessageW( - FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - None, # lpSource - error_code, # dwMessageId - 0x400, # dwLanguageId = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) - ctypes.cast( - ctypes.byref(message_wstr), - ctypes.wintypes.LPWSTR, - ), # pointer to LPWSTR due to FORMAT_MESSAGE_ALLOCATE_BUFFER; needs to be cast to LPWSTR - 64, # due to FORMAT_MESSAGE_ALLOCATE_BUFFER, this is minimum number of characters to allocate - None, - ) - if ret == 0: - return None - - message = message_wstr.value - kernel32.LocalFree(message_wstr) - - # Strip trailing CR/LF. - if message: - message = message.strip() - return message - - -def _get_process_sid(token_information_class): - """ - Obtain the SID from the current process by the given token information class. - - Args: - token_information_class: Token information class identifying the SID that we're - interested in. Only TokenUser and TokenAppContainerSid are supported. - - Returns: SID (if it could be fetched) or None if not available or on error. - """ - process_token = ctypes.wintypes.HANDLE(INVALID_HANDLE) - - try: - # Get access token for the current process - ret = kernel32.OpenProcessToken( - kernel32.GetCurrentProcess(), - TOKEN_QUERY, - ctypes.pointer(process_token), - ) - if ret == 0: - error_code = kernel32.GetLastError() - raise RuntimeError(f"Failed to open process token! Error code: 0x{error_code:X}") - - # Query buffer size for sid - token_info_size = ctypes.wintypes.DWORD(0) - - ret = advapi32.GetTokenInformation( - process_token, - token_information_class, - None, - 0, - ctypes.byref(token_info_size), - ) - - # We expect this call to fail with ERROR_INSUFFICIENT_BUFFER - if ret == 0: - error_code = kernel32.GetLastError() - if error_code != ERROR_INSUFFICIENT_BUFFER: - raise RuntimeError(f"Failed to query token information buffer size! Error code: 0x{error_code:X}") - else: - raise RuntimeError("Unexpected return value from GetTokenInformation!") - - # Allocate buffer - token_info = ctypes.create_string_buffer(token_info_size.value) - ret = advapi32.GetTokenInformation( - process_token, - token_information_class, - token_info, - token_info_size, - ctypes.byref(token_info_size), - ) - if ret == 0: - error_code = kernel32.GetLastError() - raise RuntimeError(f"Failed to query token information! Error code: 0x{error_code:X}") - - # Convert SID to string - # Technically, when UserToken is used, we need to pass user_info->User.Sid, - # but as they are at the beginning of the buffer, just pass the buffer instead... - sid_wstr = ctypes.wintypes.LPWSTR(None) - - if token_information_class == TokenUser: - sid = ctypes.cast(token_info, PTOKEN_USER).contents.User.Sid - elif token_information_class == TokenAppContainerSid: - sid = ctypes.cast(token_info, PTOKEN_APPCONTAINER_INFORMATION).contents.TokenAppContainer - else: - raise ValueError(f"Unexpected token information class: {token_information_class}") - - ret = advapi32.ConvertSidToStringSidW(sid, ctypes.pointer(sid_wstr)) - if ret == 0: - error_code = kernel32.GetLastError() - raise RuntimeError(f"Failed to convert SID to string! Error code: 0x{error_code:X}") - sid = sid_wstr.value - kernel32.LocalFree(sid_wstr) - except Exception: - sid = None - finally: - # Close the process token - if process_token.value != INVALID_HANDLE: - kernel32.CloseHandle(process_token) - - return sid - - -# Get and cache current user's SID -_user_sid = _get_process_sid(TokenUser) - -# Get and cache current app container's SID (if any) -_app_container_sid = _get_process_sid(TokenAppContainerSid) - - -def secure_mkdir(dir_name): - """ - Replacement for mkdir that limits the access to created directory to current user. - """ - - # Create security descriptor - # Prefer actual user SID over SID S-1-3-4 (current owner), because at the time of writing, Wine does not properly - # support the latter. - user_sid = _user_sid or "S-1-3-4" - - # DACL descriptor (D): - # ace_type;ace_flags;rights;object_guid;inherit_object_guid;account_sid;(resource_attribute) - # - ace_type = SDDL_ACCESS_ALLOWED (A) - # - rights = SDDL_FILE_ALL (FA) - # - account_sid = current user (queried SID) - security_desc_str = f"D:(A;;FA;;;{user_sid})" - - # If the app is running within an AppContainer, the app container SID has to be added to the DACL. - # Otherwise our process will not have access to the temp dir. - # - # Quoting https://learn.microsoft.com/en-us/windows/win32/secauthz/implementing-an-appcontainer: - # "The AppContainer SID is a persistent unique identifier for the appcontainer. ... - # To allow a single AppContainer to access a resource, add its AppContainerSID to the ACL for that resource." - if _app_container_sid: - security_desc_str += f"(A;;FA;;;{_app_container_sid})" - security_desc = ctypes.wintypes.LPVOID(None) - - ret = advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW( - security_desc_str, - SDDL_REVISION1, - ctypes.byref(security_desc), - None, - ) - if ret == 0: - error_code = kernel32.GetLastError() - raise RuntimeError( - f"Failed to create security descriptor! Error code: 0x{error_code:X}, " - f"message: {_win_error_to_message(error_code)}" - ) - - security_attr = SECURITY_ATTRIBUTES() - security_attr.nLength = ctypes.sizeof(SECURITY_ATTRIBUTES) - security_attr.lpSecurityDescriptor = security_desc - security_attr.bInheritHandle = False - - # Create directory - ret = kernel32.CreateDirectoryW( - dir_name, - security_attr, - ) - if ret == 0: - # Call failed; store error code immediately, to avoid it being overwritten in cleanup below. - error_code = kernel32.GetLastError() - - # Free security descriptor - kernel32.LocalFree(security_desc) - - # Exit on succeess - if ret != 0: - return - - # Construct OSError from win error code - error_message = _win_error_to_message(error_code) - - # Strip trailing dot to match error message from os.mkdir(). - if error_message and error_message[-1] == '.': - error_message = error_message[:-1] - - raise OSError( - None, # errno - error_message, # strerror - dir_name, # filename - error_code, # winerror - None, # filename2 - ) diff --git a/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/qt.py b/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/qt.py deleted file mode 100755 index b406677..0000000 --- a/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/qt.py +++ /dev/null @@ -1,118 +0,0 @@ -# ----------------------------------------------------------------------------- -# 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 -# ----------------------------------------------------------------------------- - -import os -import importlib -import atexit - -# Helper for ensuring that only one Qt bindings package is registered at run-time via run-time hooks. -_registered_qt_bindings = None - - -def ensure_single_qt_bindings_package(qt_bindings): - global _registered_qt_bindings - if _registered_qt_bindings is not None: - raise RuntimeError( - f"Cannot execute run-time hook for {qt_bindings!r} because run-time hook for {_registered_qt_bindings!r} " - "has been run before, and PyInstaller-frozen applications do not support multiple Qt bindings in the same " - "application!" - ) - _registered_qt_bindings = qt_bindings - - -# Helper for relocating Qt prefix via embedded qt.conf file. -_QT_CONF_FILENAME = ":/qt/etc/qt.conf" - -_QT_CONF_RESOURCE_NAME = ( - # qt - b"\x00\x02" - b"\x00\x00\x07\x84" - b"\x00\x71" - b"\x00\x74" - # etc - b"\x00\x03" - b"\x00\x00\x6c\xa3" - b"\x00\x65" - b"\x00\x74\x00\x63" - # qt.conf - b"\x00\x07" - b"\x08\x74\xa6\xa6" - b"\x00\x71" - b"\x00\x74\x00\x2e\x00\x63\x00\x6f\x00\x6e\x00\x66" -) - -_QT_CONF_RESOURCE_STRUCT = ( - # : - b"\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01" - # :/qt - b"\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02" - # :/qt/etc - b"\x00\x00\x00\x0a\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03" - # :/qt/etc/qt.conf - b"\x00\x00\x00\x16\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00" -) - - -def create_embedded_qt_conf(qt_bindings, prefix_path): - # The QtCore module might be unavailable if we collected just the top-level binding package (e.g., PyQt5) without - # any of its submodules. Since this helper is called from run-time hook for the binding package, we need to handle - # that scenario here. - try: - QtCore = importlib.import_module(qt_bindings + ".QtCore") - except ImportError: - return - - # No-op if embedded qt.conf already exists - if QtCore.QFile.exists(_QT_CONF_FILENAME): - return - - # Create qt.conf file that relocates Qt prefix. - # NOTE: paths should use POSIX-style forward slashes as separator, even on Windows. - if os.sep == '\\': - prefix_path = prefix_path.replace(os.sep, '/') - - qt_conf = f"[Paths]\nPrefix = {prefix_path}\n" - if os.name == 'nt' and qt_bindings in {"PySide2", "PySide6"}: - # PySide PyPI wheels on Windows set LibraryExecutablesPath to PrefixPath - qt_conf += f"LibraryExecutables = {prefix_path}" - - # Encode the contents; in Qt5, QSettings uses Latin1 encoding, in Qt6, it uses UTF8. - if qt_bindings in {"PySide2", "PyQt5"}: - qt_conf = qt_conf.encode("latin1") - else: - qt_conf = qt_conf.encode("utf-8") - - # Prepend data size (32-bit integer, big endian) - qt_conf_size = len(qt_conf) - qt_resource_data = qt_conf_size.to_bytes(4, 'big') + qt_conf - - # Register - succeeded = QtCore.qRegisterResourceData( - 0x01, - _QT_CONF_RESOURCE_STRUCT, - _QT_CONF_RESOURCE_NAME, - qt_resource_data, - ) - if not succeeded: - return # Tough luck - - # Unregister the resource at exit, to ensure that the registered resource on Qt/C++ side does not outlive the - # `_qt_resource_data` python variable and its data buffer. This also adds a reference to the `_qt_resource_data`, - # which conveniently ensures that the data is not garbage collected before we perform the cleanup (otherwise garbage - # collector might kick in at any time after we exit this helper function, and `qRegisterResourceData` does not seem - # to make a copy of the data!). - atexit.register( - QtCore.qUnregisterResourceData, - 0x01, - _QT_CONF_RESOURCE_STRUCT, - _QT_CONF_RESOURCE_NAME, - qt_resource_data, - ) diff --git a/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/tempfile.py b/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/tempfile.py deleted file mode 100755 index da2307b..0000000 --- a/voxvera/vendor/PyInstaller/fake-modules/_pyi_rth_utils/tempfile.py +++ /dev/null @@ -1,56 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2023, 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 -# ----------------------------------------------------------------------------- - -import os -import sys -import errno -import tempfile - -# Helper for creating temporary directories with access restricted to the user running the process. -# On POSIX systems, this is already achieved by `tempfile.mkdtemp`, which uses 0o700 permissions mask. -# On Windows, however, the POSIX permissions semantics have no effect, and we need to provide our own implementation -# that restricts the access by passing appropriate security attributes to the `CreateDirectory` function. - -if os.name == 'nt': - from . import _win32 - - def secure_mkdtemp(suffix=None, prefix=None, dir=None): - """ - Windows-specific replacement for `tempfile.mkdtemp` that restricts access to the user running the process. - Based on `mkdtemp` implementation from python 3.11 stdlib. - """ - - prefix, suffix, dir, output_type = tempfile._sanitize_params(prefix, suffix, dir) - - names = tempfile._get_candidate_names() - if output_type is bytes: - names = map(os.fsencode, names) - - for seq in range(tempfile.TMP_MAX): - name = next(names) - file = os.path.join(dir, prefix + name + suffix) - sys.audit("tempfile.mkdtemp", file) - try: - _win32.secure_mkdir(file) - except FileExistsError: - continue # try again - except PermissionError: - # This exception is thrown when a directory with the chosen name already exists on windows. - if (os.name == 'nt' and os.path.isdir(dir) and os.access(dir, os.W_OK)): - continue - else: - raise - return file - - raise FileExistsError(errno.EEXIST, "No usable temporary directory name found") - -else: - secure_mkdtemp = tempfile.mkdtemp diff --git a/voxvera/vendor/PyInstaller/fake-modules/pyi_splash.py b/voxvera/vendor/PyInstaller/fake-modules/pyi_splash.py deleted file mode 100755 index 3eb5719..0000000 --- a/voxvera/vendor/PyInstaller/fake-modules/pyi_splash.py +++ /dev/null @@ -1,211 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, 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 -# ----------------------------------------------------------------------------- - -# This module is not a "fake module" in the classical sense, but a real module that can be imported. It acts as an RPC -# interface for the functions of the bootloader. -""" -This module connects to the bootloader to send messages to the splash screen. - -It is intended to act as a RPC interface for the functions provided by the bootloader, such as displaying text or -closing. This makes the users python program independent of how the communication with the bootloader is implemented, -since a consistent API is provided. - -To connect to the bootloader, it connects to a local tcp socket whose port is passed through the environment variable -'_PYI_SPLASH_IPC'. The bootloader creates a server socket and accepts every connection request. Since the os-module, -which is needed to request the environment variable, is not available at boot time, the module does not establish the -connection until initialization. - -The protocol by which the Python interpreter communicates with the bootloader is implemented in this module. - -This module does not support reloads while the splash screen is displayed, i.e. it cannot be reloaded (such as by -importlib.reload), because the splash screen closes automatically when the connection to this instance of the module -is lost. -""" - -import atexit -import os - -# Import the _socket module instead of the socket module. All used functions to connect to the ipc system are -# provided by the C module and the users program does not necessarily need to include the socket module and all -# required modules it uses. -import _socket - -__all__ = ["CLOSE_CONNECTION", "FLUSH_CHARACTER", "is_alive", "close", "update_text"] - -try: - # The user might have excluded logging from imports. - import logging as _logging -except ImportError: - _logging = None - -try: - # The user might have excluded functools from imports. - from functools import update_wrapper -except ImportError: - update_wrapper = None - - -# Utility -def _log(level, msg, *args, **kwargs): - """ - Conditional wrapper around logging module. If the user excluded logging from the imports or it was not imported, - this function should handle it and avoid using the logger. - """ - if _logging: - logger = _logging.getLogger(__name__) - logger.log(level, msg, *args, **kwargs) - - -# These constants define single characters which are needed to send commands to the bootloader. Those constants are -# also set in the tcl script. -CLOSE_CONNECTION = b'\x04' # ASCII End-of-Transmission character -FLUSH_CHARACTER = b'\x0D' # ASCII Carriage Return character - -# Module internal variables -_initialized = False -# Keep these variables always synchronized -_ipc_socket_closed = True -_ipc_socket = _socket.socket(_socket.AF_INET, _socket.SOCK_STREAM) - - -def _initialize(): - """ - Initialize this module - - :return: - """ - global _initialized, _ipc_socket_closed - - # If _ipc_port is zero, the splash screen is intentionally suppressed (for example, we are in sub-process spawned - # via sys.executable). Mark the splash screen as initialized, but do not attempt to connect. - if _ipc_port == 0: - _initialized = True - return - - # Attempt to connect to the splash screen process. - try: - _ipc_socket.connect(("127.0.0.1", _ipc_port)) - _ipc_socket_closed = False - - _initialized = True - _log(10, "IPC connection to the splash screen was successfully established.") # log-level: debug - except OSError as err: - raise ConnectionError(f"Could not connect to TCP port {_ipc_port}.") from err - - -# We expect a splash screen from the bootloader, but if _PYI_SPLASH_IPC is not set, the module cannot connect to it. -# _PYI_SPLASH_IPC being set to zero indicates that splash screen should be (gracefully) suppressed; i.e., the calls -# in this module should become no-op without generating warning messages. -try: - _ipc_port = int(os.environ['_PYI_SPLASH_IPC']) - del os.environ['_PYI_SPLASH_IPC'] - # Initialize the connection upon importing this module. This will establish a connection to the bootloader's TCP - # server socket. - _initialize() -except (KeyError, ValueError): - # log-level: warning - _log( - 30, - "The environment does not allow connecting to the splash screen. Did bootloader fail to initialize it?", - exc_info=True, - ) -except ConnectionError: - # log-level: error - _log(40, "Failed to connect to the bootloader's IPC server!", exc_info=True) - - -def _check_connection(func): - """ - Utility decorator for checking whether the function should be executed. - - The wrapped function may raise a ConnectionError if the module was not initialized correctly. - """ - def wrapper(*args, **kwargs): - """ - Executes the wrapped function if the environment allows it. - - That is, if the connection to to bootloader has not been closed and the module is initialized. - - :raises RuntimeError: if the module was not initialized correctly. - """ - if _initialized and _ipc_socket_closed: - if _ipc_port != 0: - _log(10, "Connection to splash screen has already been closed.") # log-level: debug - return - elif not _initialized: - raise RuntimeError("This module is not initialized; did it fail to load?") - - return func(*args, **kwargs) - - if update_wrapper: - # For runtime introspection - update_wrapper(wrapper, func) - - return wrapper - - -@_check_connection -def _send_command(cmd, args=None): - """ - Send the command followed by args to the splash screen. - - :param str cmd: The command to send. All command have to be defined as procedures in the tcl splash screen script. - :param list[str] args: All arguments to send to the receiving function - """ - if args is None: - args = [] - - full_cmd = "%s(%s)" % (cmd, " ".join(args)) - try: - _ipc_socket.sendall(full_cmd.encode("utf-8") + FLUSH_CHARACTER) - except OSError as err: - raise ConnectionError(f"Unable to send command {full_cmd!r} to the bootloader") from err - - -def is_alive(): - """ - Indicates whether the module can be used. - - Returns False if the module is either not initialized or was disabled by closing the splash screen. Otherwise, - the module should be usable. - """ - return _initialized and not _ipc_socket_closed - - -@_check_connection -def update_text(msg: str): - """ - Updates the text on the splash screen window. - - :param str msg: the text to be displayed - :raises ConnectionError: If the OS fails to write to the socket. - :raises RuntimeError: If the module is not initialized. - """ - _send_command("update_text", [msg]) - - -def close(): - """ - Close the connection to the ipc tcp server socket. - - This will close the splash screen and renders this module unusable. After this function is called, no connection - can be opened to the splash screen again and all functions in this module become unusable. - """ - global _ipc_socket_closed - if _initialized and not _ipc_socket_closed: - _ipc_socket.sendall(CLOSE_CONNECTION) - _ipc_socket.close() - _ipc_socket_closed = True - - -@atexit.register -def _exit(): - close() diff --git a/voxvera/vendor/PyInstaller/hooks/__init__.py b/voxvera/vendor/PyInstaller/hooks/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/hooks/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PIL.Image.py b/voxvera/vendor/PyInstaller/hooks/hook-PIL.Image.py deleted file mode 100755 index 1d9e029..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PIL.Image.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This hook was tested with Pillow 2.9.0 (Maintained fork of PIL): https://pypi.python.org/pypi/Pillow - -from PyInstaller.utils.hooks import collect_submodules - -# Include all PIL image plugins - module names containing 'ImagePlugin'. e.g. PIL.JpegImagePlugin -hiddenimports = collect_submodules('PIL', lambda name: 'ImagePlugin' in name) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PIL.ImageFilter.py b/voxvera/vendor/PyInstaller/hooks/hook-PIL.ImageFilter.py deleted file mode 100755 index 528694b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PIL.ImageFilter.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Only used if installed, not mean to pull in numpy. -excludedimports = ["numpy"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PIL.SpiderImagePlugin.py b/voxvera/vendor/PyInstaller/hooks/hook-PIL.SpiderImagePlugin.py deleted file mode 100755 index 1b6466f..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PIL.SpiderImagePlugin.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# PIL's SpiderImagePlugin features a tkPhotoImage() method, which imports ImageTk (and thus brings in the whole Tcl/Tk -# library). Assume that if people are really using tkinter in their application, they will also import it directly. -excludedimports = ['tkinter'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PIL.py b/voxvera/vendor/PyInstaller/hooks/hook-PIL.py deleted file mode 100755 index b7a6849..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PIL.py +++ /dev/null @@ -1,21 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This hook was tested with Pillow 2.9.0 (Maintained fork of PIL): -# https://pypi.python.org/pypi/Pillow - -# Ignore tkinter to prevent inclusion of Tcl/Tk library and other GUI libraries. Assume that if people are really using -# tkinter in their application, they will also import it directly and thus PyInstaller bundles the right GUI library. -excludedimports = ['tkinter', 'PyQt5', 'PySide2', 'PyQt6', 'PySide6'] - -# Similarly, prevent inclusion of IPython, which in turn ends up pulling in whole matplotlib, along with its optional -# GUI library dependencies. -excludedimports += ['IPython'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QAxContainer.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QAxContainer.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QAxContainer.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qsci.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qsci.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qsci.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt.py deleted file mode 100755 index 668d423..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt.py +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# When PyQt5.Qt is imported it implies the import of all PyQt5 modules. See -# http://pyqt.sourceforge.net/Docs/PyQt5/Qt.html. -import os - -from PyInstaller.utils.hooks import get_module_file_attribute - -# Only do this if PyQt5 is found. -mfi = get_module_file_attribute('PyQt5') -if mfi: - # Determine the name of all these modules by looking in the PyQt5 directory. - hiddenimports = [] - for f in os.listdir(os.path.dirname(mfi)): - root, ext = os.path.splitext(os.path.basename(f)) - if root.startswith('Qt') and root != 'Qt': - # On Linux and macOS, PyQt 5.14.1 has a ``.abi3`` suffix on all library names. Remove it. - if root.endswith('.abi3'): - root = root[:-5] - hiddenimports.append('PyQt5.' + root) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DAnimation.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DAnimation.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DAnimation.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DCore.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DCore.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DExtras.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DExtras.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DExtras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DInput.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DInput.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DInput.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DLogic.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DLogic.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DLogic.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DRender.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DRender.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.Qt3DRender.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtBluetooth.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtBluetooth.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtBluetooth.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtChart.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtChart.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtChart.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtCore.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtCore.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDBus.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDBus.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDBus.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDataVisualization.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDataVisualization.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDataVisualization.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDesigner.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDesigner.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtDesigner.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtGui.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtGui.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtGui.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtHelp.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtHelp.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtHelp.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtLocation.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtLocation.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtLocation.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMacExtras.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMacExtras.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMacExtras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMultimedia.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMultimedia.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMultimedia.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMultimediaWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMultimediaWidgets.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtMultimediaWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNetwork.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNetwork.py deleted file mode 100755 index 1c8cc67..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNetwork.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies, pyqt5_library_info - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) -binaries += pyqt5_library_info.collect_qtnetwork_files() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNetworkAuth.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNetworkAuth.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNetworkAuth.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNfc.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNfc.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtNfc.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtOpenGL.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtOpenGL.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtOpenGL.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPositioning.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPositioning.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPositioning.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPrintSupport.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPrintSupport.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPrintSupport.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPurchasing.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPurchasing.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtPurchasing.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQml.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQml.py deleted file mode 100755 index 718d323..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQml.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies, pyqt5_library_info - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) -qml_binaries, qml_datas = pyqt5_library_info.collect_qtqml_files() -binaries += qml_binaries -datas += qml_datas diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuick.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuick.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuick.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuick3D.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuick3D.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuick3D.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuickWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuickWidgets.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtQuickWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtRemoteObjects.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtRemoteObjects.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtRemoteObjects.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtScript.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtScript.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtScript.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSensors.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSensors.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSensors.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSerialPort.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSerialPort.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSerialPort.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSql.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSql.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSql.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSvg.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSvg.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtSvg.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtTest.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtTest.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtTest.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtTextToSpeech.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtTextToSpeech.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtTextToSpeech.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebChannel.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebChannel.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebChannel.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngine.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngine.py deleted file mode 100755 index 7b67e1b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngine.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngineCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngineCore.py deleted file mode 100755 index f575e0d..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngineCore.py +++ /dev/null @@ -1,22 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import \ - add_qt5_dependencies, pyqt5_library_info - -# Ensure PyQt5 is importable before adding info depending on it. -if pyqt5_library_info.version is not None: - hiddenimports, binaries, datas = add_qt5_dependencies(__file__) - - # Include helper process executable, translations, and resources. - webengine_binaries, webengine_datas = pyqt5_library_info.collect_qtwebengine_files() - binaries += webengine_binaries - datas += webengine_datas diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngineWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngineWidgets.py deleted file mode 100755 index 7b67e1b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebEngineWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebKit.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebKit.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebKit.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebKitWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebKitWidgets.py deleted file mode 100755 index 7b67e1b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebKitWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebSockets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebSockets.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWebSockets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWidgets.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWinExtras.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWinExtras.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtWinExtras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtX11Extras.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtX11Extras.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtX11Extras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtXml.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtXml.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtXml.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtXmlPatterns.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtXmlPatterns.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.QtXmlPatterns.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.py deleted file mode 100755 index 2325577..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.py +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import pyqt5_library_info, ensure_single_qt_bindings_package - -# Allow only one Qt bindings package to be collected in frozen application. -ensure_single_qt_bindings_package("PyQt5") - -# Only proceed if PyQt5 can be imported. -if pyqt5_library_info.version is not None: - hiddenimports = [ - # PyQt5.10 and earlier uses sip in an separate package; - 'sip', - # PyQt5.11 and later provides SIP in a private package. Support both. - 'PyQt5.sip', - # Imported via __import__ in PyQt5/__init__.py - 'pkgutil', - ] - - # Collect required Qt binaries. - binaries = pyqt5_library_info.collect_extra_binaries() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.uic.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.uic.py deleted file mode 100755 index e4474dd..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt5.uic.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files - -# We need to include modules in PyQt5.uic.widget-plugins, so they can be dynamically loaded by uic. They should be -# included as separate (data-like) files, so they can be found by os.listdir and friends. However, as this directory -# is not a package, refer to it using the package (PyQt5.uic) followed by the subdirectory name (``widget-plugins/``). -datas = collect_data_files('PyQt5.uic', True, 'widget-plugins') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QAxContainer.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QAxContainer.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QAxContainer.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qsci.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qsci.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qsci.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DAnimation.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DAnimation.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DAnimation.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DCore.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DCore.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DExtras.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DExtras.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DExtras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DInput.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DInput.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DInput.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DLogic.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DLogic.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DLogic.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DRender.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DRender.py deleted file mode 100755 index 58ac06d..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.Qt3DRender.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -hiddenimports += ["PyQt6.QtOpenGL"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtBluetooth.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtBluetooth.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtBluetooth.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtCharts.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtCharts.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtCharts.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtCore.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtCore.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDBus.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDBus.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDBus.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDataVisualization.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDataVisualization.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDataVisualization.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDesigner.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDesigner.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtDesigner.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGraphs.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGraphs.py deleted file mode 100755 index 17c60d1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGraphs.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -# These dependencies cannot seem to be inferred from linked libraries. -hiddenimports += ['PyQt6.QtNetwork', 'PyQt6.QtQml'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGraphsWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGraphsWidgets.py deleted file mode 100755 index c4cba93..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGraphsWidgets.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -# These dependencies cannot seem to be inferred from linked libraries. -hiddenimports += ['PyQt6.QtGraphs', 'PyQt6.QtQuickWidgets'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGui.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGui.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtGui.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtHelp.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtHelp.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtHelp.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtMultimedia.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtMultimedia.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtMultimedia.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtMultimediaWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtMultimediaWidgets.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtMultimediaWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNetwork.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNetwork.py deleted file mode 100755 index c780c7c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNetwork.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies, pyqt6_library_info - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) -binaries += pyqt6_library_info.collect_qtnetwork_files() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNetworkAuth.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNetworkAuth.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNetworkAuth.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNfc.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNfc.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtNfc.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtOpenGL.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtOpenGL.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtOpenGL.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtOpenGLWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtOpenGLWidgets.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtOpenGLWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPdf.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPdf.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPdf.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPdfWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPdfWidgets.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPdfWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPositioning.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPositioning.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPositioning.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPrintSupport.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPrintSupport.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtPrintSupport.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQml.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQml.py deleted file mode 100755 index 024696a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQml.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies, pyqt6_library_info - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) -qml_binaries, qml_datas = pyqt6_library_info.collect_qtqml_files() -binaries += qml_binaries -datas += qml_datas diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuick.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuick.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuick.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuick3D.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuick3D.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuick3D.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuickWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuickWidgets.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtQuickWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtRemoteObjects.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtRemoteObjects.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtRemoteObjects.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSensors.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSensors.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSensors.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSerialPort.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSerialPort.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSerialPort.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSpatialAudio.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSpatialAudio.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSpatialAudio.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSql.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSql.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSql.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtStateMachine.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtStateMachine.py deleted file mode 100755 index b1b97aa..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtStateMachine.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -# This dependency cannot seem to be inferred from linked libraries (at least on Windows). -hiddenimports += ['PyQt6.QtGui'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSvg.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSvg.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSvg.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSvgWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSvgWidgets.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtSvgWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtTest.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtTest.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtTest.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtTextToSpeech.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtTextToSpeech.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtTextToSpeech.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebChannel.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebChannel.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebChannel.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineCore.py deleted file mode 100755 index 7eb593c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineCore.py +++ /dev/null @@ -1,27 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import \ - add_qt6_dependencies, pyqt6_library_info - -# Ensure PyQt6 is importable before adding info depending on it. -if pyqt6_library_info.version is not None: - # Qt6 prior to 6.2.2 contains a bug that makes it incompatible with the way PyInstaller collects - # QtWebEngine shared libraries and resources. So exit here and now instead of producing a defunct build. - if pyqt6_library_info.version < [6, 2, 2]: - raise SystemExit("ERROR: PyInstaller's QtWebEngine support requires Qt6 6.2.2 or later!") - - hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - - # Include helper process executable, translations, and resources. - webengine_binaries, webengine_datas = pyqt6_library_info.collect_qtwebengine_files() - binaries += webengine_binaries - datas += webengine_datas diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineQuick.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineQuick.py deleted file mode 100755 index 19083de..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineQuick.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineWidgets.py deleted file mode 100755 index 19083de..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebEngineWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebSockets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebSockets.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWebSockets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWidgets.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtXml.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtXml.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.QtXml.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.py deleted file mode 100755 index b9e2f51..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.py +++ /dev/null @@ -1,26 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import pyqt6_library_info, ensure_single_qt_bindings_package - -# Allow only one Qt bindings package to be collected in frozen application. -ensure_single_qt_bindings_package("PyQt6") - -# Only proceed if PyQt6 can be imported. -if pyqt6_library_info.version is not None: - hiddenimports = [ - 'PyQt6.sip', - # Imported via __import__ in PyQt6/__init__.py - 'pkgutil', - ] - - # Collect required Qt binaries. - binaries = pyqt6_library_info.collect_extra_binaries() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.uic.py b/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.uic.py deleted file mode 100755 index 7744cbc..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PyQt6.uic.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files - -# We need to include modules in PyQt6.uic.widget-plugins, so they can be dynamically loaded by uic. They should be -# included as separate (data-like) files, so they can be found by os.listdir and friends. However, as this directory -# is not a package, refer to it using the package (PyQt6.uic) followed by the subdirectory name (``widget-plugins/``). -datas = collect_data_files('PyQt6.uic', True, 'widget-plugins') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DAnimation.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DAnimation.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DAnimation.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DCore.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DCore.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DExtras.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DExtras.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DExtras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DInput.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DInput.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DInput.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DLogic.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DLogic.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DLogic.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DRender.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DRender.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qt3DRender.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtAxContainer.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtAxContainer.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtAxContainer.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtCharts.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtCharts.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtCharts.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtConcurrent.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtConcurrent.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtConcurrent.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtCore.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtCore.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtDataVisualization.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtDataVisualization.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtDataVisualization.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtGui.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtGui.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtGui.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtHelp.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtHelp.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtHelp.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtLocation.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtLocation.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtLocation.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMacExtras.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMacExtras.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMacExtras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMultimedia.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMultimedia.py deleted file mode 100755 index 1f3f908..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMultimedia.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) - -# Using PySide2 true_properties ("from __feature__ import true_properties") causes a hidden dependency on -# QtMultimediaWidgets python module: -# https://github.com/qtproject/pyside-pyside-setup/blob/5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py#L577-L586 -hiddenimports += ['PySide2.QtMultimediaWidgets'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMultimediaWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMultimediaWidgets.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtMultimediaWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtNetwork.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtNetwork.py deleted file mode 100755 index 4e62091..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtNetwork.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies, pyside2_library_info - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) -binaries += pyside2_library_info.collect_qtnetwork_files() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtOpenGL.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtOpenGL.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtOpenGL.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtOpenGLFunctions.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtOpenGLFunctions.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtOpenGLFunctions.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtPositioning.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtPositioning.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtPositioning.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtPrintSupport.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtPrintSupport.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtPrintSupport.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQml.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQml.py deleted file mode 100755 index a9f7162..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQml.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies, pyside2_library_info - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) -qml_binaries, qml_datas = pyside2_library_info.collect_qtqml_files() -binaries += qml_binaries -datas += qml_datas - -hiddenimports += ["PySide2.QtGui"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuick.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuick.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuick.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuickControls2.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuickControls2.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuickControls2.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuickWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuickWidgets.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtQuickWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtRemoteObjects.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtRemoteObjects.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtRemoteObjects.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScript.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScript.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScript.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScriptTools.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScriptTools.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScriptTools.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScxml.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScxml.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtScxml.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSensors.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSensors.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSensors.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSerialPort.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSerialPort.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSerialPort.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSql.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSql.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSql.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSvg.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSvg.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtSvg.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtTest.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtTest.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtTest.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtTextToSpeech.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtTextToSpeech.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtTextToSpeech.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtUiTools.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtUiTools.py deleted file mode 100755 index 9f47776..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtUiTools.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) -hiddenimports += ['PySide2.QtXml'] # Not inferred from dynamic lib analysis diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebChannel.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebChannel.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebChannel.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngine.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngine.py deleted file mode 100755 index 7b67e1b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngine.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngineCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngineCore.py deleted file mode 100755 index afb578e..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngineCore.py +++ /dev/null @@ -1,22 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import \ - add_qt5_dependencies, pyside2_library_info - -# Ensure PySide2 is importable before adding info depending on it. -if pyside2_library_info.version is not None: - hiddenimports, binaries, datas = add_qt5_dependencies(__file__) - - # Include helper process executable, translations, and resources. - webengine_binaries, webengine_datas = pyside2_library_info.collect_qtwebengine_files() - binaries += webengine_binaries - datas += webengine_datas diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngineWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngineWidgets.py deleted file mode 100755 index 7b67e1b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebEngineWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebKit.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebKit.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebKit.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebKitWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebKitWidgets.py deleted file mode 100755 index 7b67e1b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebKitWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebSockets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebSockets.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWebSockets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWidgets.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWinExtras.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWinExtras.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtWinExtras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtX11Extras.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtX11Extras.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtX11Extras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtXml.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtXml.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtXml.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtXmlPatterns.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtXmlPatterns.py deleted file mode 100755 index 51258b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.QtXmlPatterns.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt5_dependencies - -hiddenimports, binaries, datas = add_qt5_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qwt5.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qwt5.py deleted file mode 100755 index 57f3c22..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.Qwt5.py +++ /dev/null @@ -1,31 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import isolated - -hiddenimports = ['PySide2.QtCore', 'PySide2.QtWidgets', 'PySide2.QtGui', 'PySide2.QtSvg'] - - -@isolated.decorate -def conditional_imports(): - from PySide2 import Qwt5 - - out = [] - if hasattr(Qwt5, "toNumpy"): - out.append("numpy") - if hasattr(Qwt5, "toNumeric"): - out.append("numeric") - if hasattr(Qwt5, "toNumarray"): - out.append("numarray") - return out - - -hiddenimports += conditional_imports() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide2.py deleted file mode 100755 index aa7a714..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide2.py +++ /dev/null @@ -1,25 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import pyside2_library_info, ensure_single_qt_bindings_package - -# Allow only one Qt bindings package to be collected in frozen application. -ensure_single_qt_bindings_package("PySide2") - -# Only proceed if PySide2 can be imported. -if pyside2_library_info.version is not None: - hiddenimports = ['shiboken2', 'inspect'] - if pyside2_library_info.version < [5, 15]: - # The shiboken2 bootstrap in earlier releases requires __future__ in addition to inspect - hiddenimports += ['__future__'] - - # Collect required Qt binaries. - binaries = pyside2_library_info.collect_extra_binaries() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DAnimation.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DAnimation.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DAnimation.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DCore.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DCore.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DExtras.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DExtras.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DExtras.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DInput.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DInput.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DInput.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DLogic.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DLogic.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DLogic.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DRender.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DRender.py deleted file mode 100755 index 2bb9b83..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.Qt3DRender.py +++ /dev/null @@ -1,20 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies, pyside6_library_info - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -# In PySide 6.7.0, Qt3DRender module added a reference to QtOpenGL type system. The hidden import is required on -# Windows, while on macOS and Linux we seem to pick it up automatically due to the corresponding Qt shared library -# appearing among binary dependencies. Keep it around on all OSes, though - just in case this ever changes. -if pyside6_library_info.version is not None and pyside6_library_info.version >= [6, 7]: - hiddenimports += ['PySide6.QtOpenGL'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtAxContainer.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtAxContainer.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtAxContainer.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtBluetooth.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtBluetooth.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtBluetooth.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtCharts.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtCharts.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtCharts.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtConcurrent.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtConcurrent.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtConcurrent.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtCore.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtCore.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDBus.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDBus.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDBus.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDataVisualization.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDataVisualization.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDataVisualization.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDesigner.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDesigner.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtDesigner.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGraphs.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGraphs.py deleted file mode 100755 index 00941c0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGraphs.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGraphsWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGraphsWidgets.py deleted file mode 100755 index 91ae027..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGraphsWidgets.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -# These dependencies cannot seem to be inferred from linked libraries. -hiddenimports += ['PySide6.QtQuickWidgets', 'PySide6.QtGraphs'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGui.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGui.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtGui.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtHelp.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtHelp.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtHelp.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtHttpServer.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtHttpServer.py deleted file mode 100755 index 790cb11..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtHttpServer.py +++ /dev/null @@ -1,18 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -# This seems to be necessary on Windows; on other OSes, it is inferred automatically because the extension is linked -# against the Qt6Concurrent shared library. -hiddenimports += ['PySide6.QtConcurrent'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtLocation.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtLocation.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtLocation.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtMultimedia.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtMultimedia.py deleted file mode 100755 index 0c2d31b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtMultimedia.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -# Using PySide6 true_properties ("from __feature__ import true_properties") causes a hidden dependency on -# QtMultimediaWidgets python module: -# https://github.com/qtproject/pyside-pyside-setup/blob/v6.2.2.1/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py#L614-L627 -hiddenimports += ['PySide6.QtMultimediaWidgets'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtMultimediaWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtMultimediaWidgets.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtMultimediaWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNetwork.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNetwork.py deleted file mode 100755 index a216ecd..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNetwork.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies, pyside6_library_info - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) -binaries += pyside6_library_info.collect_qtnetwork_files() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNetworkAuth.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNetworkAuth.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNetworkAuth.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNfc.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNfc.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtNfc.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtOpenGL.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtOpenGL.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtOpenGL.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtOpenGLWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtOpenGLWidgets.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtOpenGLWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPdf.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPdf.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPdf.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPdfWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPdfWidgets.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPdfWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPositioning.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPositioning.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPositioning.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPrintSupport.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPrintSupport.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtPrintSupport.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQml.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQml.py deleted file mode 100755 index 8b6837d..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQml.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies, pyside6_library_info - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) -qml_binaries, qml_datas = pyside6_library_info.collect_qtqml_files() -binaries += qml_binaries -datas += qml_datas diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuick.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuick.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuick.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuick3D.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuick3D.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuick3D.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuickControls2.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuickControls2.py deleted file mode 100755 index b405fc6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuickControls2.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - -hiddenimports += ['PySide6.QtQuick'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuickWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuickWidgets.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtQuickWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtRemoteObjects.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtRemoteObjects.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtRemoteObjects.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtScxml.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtScxml.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtScxml.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSensors.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSensors.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSensors.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSerialBus.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSerialBus.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSerialBus.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSerialPort.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSerialPort.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSerialPort.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSpatialAudio.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSpatialAudio.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSpatialAudio.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSql.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSql.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSql.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtStateMachine.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtStateMachine.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtStateMachine.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSvg.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSvg.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSvg.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSvgWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSvgWidgets.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtSvgWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtTest.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtTest.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtTest.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtTextToSpeech.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtTextToSpeech.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtTextToSpeech.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtUiTools.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtUiTools.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtUiTools.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebChannel.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebChannel.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebChannel.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineCore.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineCore.py deleted file mode 100755 index 06e05f8..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineCore.py +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import \ - add_qt6_dependencies, pyside6_library_info - -# Ensure PySide6 is importable before adding info depending on it. -if pyside6_library_info.version is not None: - # Qt6 prior to 6.2.2 contains a bug that makes it incompatible with the way PyInstaller collects - # QtWebEngine shared libraries and resources. So exit here and now instead of producing a defunct build. - if pyside6_library_info.version < [6, 2, 2]: - raise SystemExit("ERROR: PyInstaller's QtWebEngine support requires Qt6 6.2.2 or later!") - - hiddenimports, binaries, datas = add_qt6_dependencies(__file__) - - # Include helper process executable, translations, and resources. - webengine_binaries, webengine_datas = pyside6_library_info.collect_qtwebengine_files() - binaries += webengine_binaries - datas += webengine_datas - - hiddenimports += ['PySide6.QtPrintSupport'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineQuick.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineQuick.py deleted file mode 100755 index 19083de..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineQuick.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineWidgets.py deleted file mode 100755 index 19083de..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebEngineWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebSockets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebSockets.py deleted file mode 100755 index 49d27d6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWebSockets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWidgets.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWidgets.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtWidgets.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtXml.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtXml.py deleted file mode 100755 index edd5cd1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.QtXml.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.qt import add_qt6_dependencies - -hiddenimports, binaries, datas = add_qt6_dependencies(__file__) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.py b/voxvera/vendor/PyInstaller/hooks/hook-PySide6.py deleted file mode 100755 index 30e2ee6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-PySide6.py +++ /dev/null @@ -1,28 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import check_requirement -from PyInstaller.utils.hooks.qt import pyside6_library_info, ensure_single_qt_bindings_package - -# Allow only one Qt bindings package to be collected in frozen application. -ensure_single_qt_bindings_package("PySide6") - -# Only proceed if PySide6 can be imported. -if pyside6_library_info.version is not None: - hiddenimports = ['shiboken6', 'inspect'] - - # Starting with PySide6 6.4.0, we need to collect PySide6.support.deprecated for | and & operators to work with - # Qt key and key modifiers enums. See #7249. - if check_requirement("PySide6 >= 6.4.0"): - hiddenimports += ['PySide6.support.deprecated'] - - # Collect required Qt binaries. - binaries = pyside6_library_info.collect_extra_binaries() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-_ctypes.py b/voxvera/vendor/PyInstaller/hooks/hook-_ctypes.py deleted file mode 100755 index d9ccf8c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-_ctypes.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat - -# During python 3.14 development cycle, ctypes struct/union layout logic has been moved from `_ctypes` extension into -# Python, i.e., `ctypes._layout` module: https://github.com/python/cpython/pull/123352 -# Since this module is referenced only from the `_ctypes` extension, it needs to be added to hidden imports, at least on -# Windows and macOS. -if compat.is_py314: - hiddenimports = ['ctypes._layout'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-_osx_support.py b/voxvera/vendor/PyInstaller/hooks/hook-_osx_support.py deleted file mode 100755 index a3a69d5..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-_osx_support.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Prevent conditional import of `distutils` in `_osx_support.compiler_fixup()` in python < 3.10 from pulling in -# `distutils`; this function is called only from `distutils` itself, which ensures that the module is available as -# needed. Blocking this import prevents `distutils` (and nowadays `setuptools`) from being pulled into even very -# basic applications when built with python < 3.10. -# -# See: https://github.com/python/cpython/blob/f3994ade31a563d49806cf6a681d1b1115fccaa3/Lib/_osx_support.py#L430-L434 - -excludedimports = ['distutils'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-_pyi_rth_utils.py b/voxvera/vendor/PyInstaller/hooks/hook-_pyi_rth_utils.py deleted file mode 100755 index cbd93aa..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-_pyi_rth_utils.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat - -# Exclude submodules specific to non-applicable OSes -excludedimports = [] -if not compat.is_win: - excludedimports += ['_pyi_rth_utils._win32'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-_tkinter.py b/voxvera/vendor/PyInstaller/hooks/hook-_tkinter.py deleted file mode 100755 index 7f21b49..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-_tkinter.py +++ /dev/null @@ -1,22 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.tcl_tk import tcltk_info - - -def hook(hook_api): - # Add all Tcl/Tk data files, based on the `TclTkInfo.data_files`. If Tcl/Tk is unavailable, the list is empty. - # - # NOTE: the list contains 3-element TOC tuples with full destination filenames (because other parts of code, - # specifically splash-screen writer, currently require this format). Therefore, we need to use - # `PostGraphAPI.add_datas` (which supports 3-element TOC tuples); if this was 2-element "hook-style" TOC list, - # we could just assign `datas` global hook variable, without implementing the post-graph `hook()` function. - hook_api.add_datas(tcltk_info.data_files) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-babel.py b/voxvera/vendor/PyInstaller/hooks/hook-babel.py deleted file mode 100755 index 5f03a97..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-babel.py +++ /dev/null @@ -1,24 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files - -# Ensure that .dat files from locale-data sub-directory are collected. -datas = collect_data_files('babel') - -# Unpickling of locale-data/root.dat currently (babel v2.16.0) requires classes from following modules, so ensure that -# they are always collected: -hiddenimports = [ - "babel.dates", - "babel.localedata", - "babel.plural", - "babel.numbers", -] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-difflib.py b/voxvera/vendor/PyInstaller/hooks/hook-difflib.py deleted file mode 100755 index 2416758..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-difflib.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# only required when run as `__main__` -excludedimports = ["doctest"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-distutils.command.check.py b/voxvera/vendor/PyInstaller/hooks/hook-distutils.command.check.py deleted file mode 100755 index 50a17d4..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-distutils.command.check.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Conditionally imported in this module; should not trigger collection. -excludedimports = ['docutils'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-distutils.py b/voxvera/vendor/PyInstaller/hooks/hook-distutils.py deleted file mode 100755 index c9cd63b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-distutils.py +++ /dev/null @@ -1,33 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.setuptools import setuptools_info - -hiddenimports = [] - -# From Python 3.6 and later ``distutils.sysconfig`` takes on the same behaviour as regular ``sysconfig`` of moving the -# config vars to a module (see hook-sysconfig.py). It doesn't use a nice `get module name` function like ``sysconfig`` -# does to help us locate it but the module is the same file that ``sysconfig`` uses so we can use the -# ``_get_sysconfigdata_name()`` from regular ``sysconfig``. -try: - import sysconfig - hiddenimports += [sysconfig._get_sysconfigdata_name()] -except AttributeError: - # Either sysconfig has no attribute _get_sysconfigdata_name (i.e., the function does not exist), or this is Windows - # and the _get_sysconfigdata_name() call failed due to missing sys.abiflags attribute. - pass - -# Starting with setuptools 60.0, the vendored distutils overrides the stdlib one (which will be removed in python 3.12 -# anyway), so check if we are using that version. While the distutils override behavior can be controleld via the -# ``SETUPTOOLS_USE_DISTUTILS`` environment variable, the latter may have a different value during the build and at the -# runtime, and so we need to ensure that both stdlib and setuptools variant of distutils are collected. -if setuptools_info.available and setuptools_info.version >= (60, 0): - hiddenimports += ['setuptools._distutils'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-distutils.util.py b/voxvera/vendor/PyInstaller/hooks/hook-distutils.util.py deleted file mode 100755 index 021d459..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-distutils.util.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# distutils.util.run_2to3() imports lib2to3. Exclude it as chances are low that it is used by the frozen package. -excludedimports = ['lib2to3.refactor'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.contrib.sessions.py b/voxvera/vendor/PyInstaller/hooks/hook-django.contrib.sessions.py deleted file mode 100755 index 5d86e6c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.contrib.sessions.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules - -hiddenimports = collect_submodules('django.contrib.sessions.backends') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.core.cache.py b/voxvera/vendor/PyInstaller/hooks/hook-django.core.cache.py deleted file mode 100755 index eb319c7..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.core.cache.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules - -hiddenimports = collect_submodules('django.core.cache.backends') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.core.mail.py b/voxvera/vendor/PyInstaller/hooks/hook-django.core.mail.py deleted file mode 100755 index 1cee61c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.core.mail.py +++ /dev/null @@ -1,25 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -django.core.mail uses part of the email package. -The problem is: when using runserver with autoreload mode, the thread that checks for changed files triggers further -imports within the email package, because of the LazyImporter in email (used in 2.5 for backward compatibility). -We then need to name those modules as hidden imports, otherwise at runtime the autoreload thread will complain -with a traceback. -""" - -hiddenimports = [ - 'email.mime.message', - 'email.mime.image', - 'email.mime.text', - 'email.mime.multipart', - 'email.mime.audio', -] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.core.management.py b/voxvera/vendor/PyInstaller/hooks/hook-django.core.management.py deleted file mode 100755 index a8566e0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.core.management.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules - -# Module django.core.management.commands.shell imports IPython, but it introduces many other dependencies that are not -# necessary for a simple django project; ignore the IPython module. -excludedimports = ['IPython', 'matplotlib', 'tkinter'] - -# Django requires management modules for the script 'manage.py'. -hiddenimports = collect_submodules('django.core.management.commands') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.mysql.base.py b/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.mysql.base.py deleted file mode 100755 index 951899e..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.mysql.base.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Compiler module (see class DatabaseOperations) -hiddenimports = ["django.db.backends.mysql.compiler"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.oracle.base.py b/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.oracle.base.py deleted file mode 100755 index d50eb97..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.oracle.base.py +++ /dev/null @@ -1,12 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -hiddenimports = ["django.db.backends.oracle.compiler"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.py b/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.py deleted file mode 100755 index e829fe7..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.db.backends.py +++ /dev/null @@ -1,25 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import glob -import os - -from PyInstaller.utils.hooks import get_module_file_attribute - -# Compiler (see class BaseDatabaseOperations) -hiddenimports = ['django.db.models.sql.compiler'] - -# Include all available Django backends. -modpath = os.path.dirname(get_module_file_attribute('django.db.backends')) -for fn in glob.glob(os.path.join(modpath, '*')): - if os.path.isdir(fn): - fn = os.path.basename(fn) - hiddenimports.append('django.db.backends.' + fn + '.base') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.py b/voxvera/vendor/PyInstaller/hooks/hook-django.py deleted file mode 100755 index 4a8ee04..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.py +++ /dev/null @@ -1,92 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Tested with django 2.2 - -import glob -import os - -from PyInstaller import log as logging -from PyInstaller.utils import hooks -from PyInstaller.utils.hooks import django - -logger = logging.getLogger(__name__) - -# Collect everything. Some submodules of django are not importable without considerable external setup. Ignore the -# errors they raise. -datas, binaries, hiddenimports = hooks.collect_all('django', on_error="ignore") - -root_dir = django.django_find_root_dir() -if root_dir: - logger.info('Django root directory %s', root_dir) - # Include imports from the mysite.settings.py module. - settings_py_imports = django.django_dottedstring_imports(root_dir) - # Include all submodules of all imports detected in mysite.settings.py. - for submod in settings_py_imports: - hiddenimports.append(submod) - hiddenimports += hooks.collect_submodules(submod) - # Include main django modules - settings.py, urls.py, wsgi.py. Without them the django server won't run. - package_name = os.path.basename(root_dir) - default_settings_module = f'{package_name}.settings' - settings_module = os.environ.get('DJANGO_SETTINGS_MODULE', default_settings_module) - hiddenimports += [ - # TODO: consider including 'mysite.settings.py' in source code as a data files, - # since users might need to edit this file. - settings_module, - package_name + '.urls', - package_name + '.wsgi', - ] - # Django hiddenimports from the standard Python library. - hiddenimports += [ - 'http.cookies', - 'html.parser', - ] - - # Bundle django DB schema migration scripts as data files. They are necessary for some commands. - logger.info('Collecting Django migration scripts.') - migration_modules = [ - 'django.conf.app_template.migrations', - 'django.contrib.admin.migrations', - 'django.contrib.auth.migrations', - 'django.contrib.contenttypes.migrations', - 'django.contrib.flatpages.migrations', - 'django.contrib.redirects.migrations', - 'django.contrib.sessions.migrations', - 'django.contrib.sites.migrations', - ] - # Include migration scripts of Django-based apps too. - installed_apps = hooks.get_module_attribute(settings_module, 'INSTALLED_APPS') - migration_modules.extend(set(app + '.migrations' for app in installed_apps)) - # Copy migration files. - for mod in migration_modules: - mod_name, bundle_name = mod.split('.', 1) - mod_dir = os.path.dirname(hooks.get_module_file_attribute(mod_name)) - bundle_dir = bundle_name.replace('.', os.sep) - pattern = os.path.join(mod_dir, bundle_dir, '*.py') - files = glob.glob(pattern) - for f in files: - datas.append((f, os.path.join(mod_name, bundle_dir))) - - # Include data files from your Django project found in your django root package. - datas += hooks.collect_data_files(package_name) - - # Include database file if using sqlite. The sqlite database is usually next to the manage.py script. - root_dir_parent = os.path.dirname(root_dir) - # TODO Add more patterns if necessary. - _patterns = ['*.db', 'db.*'] - for p in _patterns: - files = glob.glob(os.path.join(root_dir_parent, p)) - for f in files: - # Place those files next to the executable. - datas.append((f, '.')) - -else: - logger.warning('No django root directory could be found!') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-django.template.loaders.py b/voxvera/vendor/PyInstaller/hooks/hook-django.template.loaders.py deleted file mode 100755 index 18b1374..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-django.template.loaders.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules - -hiddenimports = collect_submodules('django.template.loaders') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-encodings.py b/voxvera/vendor/PyInstaller/hooks/hook-encodings.py deleted file mode 100755 index a4082e1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-encodings.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules - -hiddenimports = collect_submodules('encodings') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gevent.py b/voxvera/vendor/PyInstaller/hooks/hook-gevent.py deleted file mode 100755 index 40ad953..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gevent.py +++ /dev/null @@ -1,24 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_all, copy_metadata - -excludedimports = ["gevent.testing", "gevent.tests"] - -datas, binaries, hiddenimports = collect_all( - 'gevent', - filter_submodules=lambda name: ("gevent.testing" not in name or "gevent.tests" not in name), - include_py_files=False, - exclude_datas=["**/tests"] -) - -# Gevent uses ``pkg_resources.require("...")``, which means that all its dependencies must also have their metadata. -datas += copy_metadata('gevent', recursive=True) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.py deleted file mode 100755 index 78e3538..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.py +++ /dev/null @@ -1,26 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat -from packaging.version import Version - -pygobject_version = Version(compat.importlib_metadata.version("pygobject")).release - -hiddenimports = ['gi._error', 'gi._option'] - -# PyGObject 3.50.0 added support for `asyncio`, and attempts to import inside the `_gi` extension. -if pygobject_version >= (3, 50, 0): - hiddenimports += ['asyncio'] - -# PyGobject 3.52.0 added `gi._enum`, which needs to be added to hiddenimports due to being imported from the -# `_gi` extension. -if pygobject_version >= (3, 52, 0): - hiddenimports += ['gi._enum'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Adw.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Adw.py deleted file mode 100755 index 3327e21..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Adw.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('Adw', '1') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.AppIndicator3.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.AppIndicator3.py deleted file mode 100755 index 4b9c894..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.AppIndicator3.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('AppIndicator3', '0.1') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Atk.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Atk.py deleted file mode 100755 index b57ee3f..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Atk.py +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import get_hook_config -from PyInstaller.utils.hooks.gi import GiModuleInfo, collect_glib_translations - - -def hook(hook_api): - module_info = GiModuleInfo('Atk', '1.0') - if not module_info.available: - return - - binaries, datas, hiddenimports = module_info.collect_typelib_data() - - # Collect translations - lang_list = get_hook_config(hook_api, "gi", "languages") - datas += collect_glib_translations('atk10', lang_list) - - hook_api.add_datas(datas) - hook_api.add_binaries(binaries) - hook_api.add_imports(*hiddenimports) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.AyatanaAppIndicator3.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.AyatanaAppIndicator3.py deleted file mode 100755 index 36b178a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.AyatanaAppIndicator3.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('AyatanaAppIndicator3', '0.1') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Champlain.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Champlain.py deleted file mode 100755 index d48def3..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Champlain.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('Champlain', '0.12') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Clutter.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Clutter.py deleted file mode 100755 index 9ad56a6..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Clutter.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('Clutter', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.DBus.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.DBus.py deleted file mode 100755 index 0580fcb..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.DBus.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('DBus', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GIRepository.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GIRepository.py deleted file mode 100755 index 5c6961a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GIRepository.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GIRepository', '2.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GLib.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GLib.py deleted file mode 100755 index 6aa236c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GLib.py +++ /dev/null @@ -1,42 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import glob -import os - -from PyInstaller.compat import is_win -from PyInstaller.utils.hooks import get_hook_config -from PyInstaller.utils.hooks.gi import GiModuleInfo, collect_glib_share_files, collect_glib_translations - - -def hook(hook_api): - module_info = GiModuleInfo('GLib', '2.0') - if not module_info.available: - return - - binaries, datas, hiddenimports = module_info.collect_typelib_data() - - # Collect translations - lang_list = get_hook_config(hook_api, "gi", "languages") - datas += collect_glib_translations('glib20', lang_list) - - # Collect schemas - datas += collect_glib_share_files('glib-2.0', 'schemas') - - # On Windows, glib needs a spawn helper for g_spawn* API - if is_win: - pattern = os.path.join(module_info.get_libdir(), 'gspawn-*-helper*.exe') - for f in glob.glob(pattern): - binaries.append((f, '.')) - - hook_api.add_datas(datas) - hook_api.add_binaries(binaries) - hook_api.add_imports(*hiddenimports) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GModule.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GModule.py deleted file mode 100755 index 0ccaaaf..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GModule.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GModule', '2.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GObject.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GObject.py deleted file mode 100755 index 2171165..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GObject.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -from PyInstaller.utils.hooks import check_requirement -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GObject', '2.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() - # gi._gobject removed from PyGObject in version 3.25.1 - if check_requirement('PyGObject < 3.25.1'): - hiddenimports += ['gi._gobject'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gdk.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gdk.py deleted file mode 100755 index 99fbd08..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gdk.py +++ /dev/null @@ -1,36 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo -from PyInstaller.utils.hooks import get_hook_config - - -def hook(hook_api): - # Use the Gdk version from hook config, if available. If not, try using Gtk version from hook config, so that we - # collect Gdk and Gtk of the same version. - module_versions = get_hook_config(hook_api, 'gi', 'module-versions') - if module_versions: - version = module_versions.get('Gdk') - if not version: - version = module_versions.get('Gtk', '3.0') - else: - version = '3.0' - - module_info = GiModuleInfo('Gdk', version) - if not module_info.available: - return - - binaries, datas, hiddenimports = module_info.collect_typelib_data() - hiddenimports += ['gi._gi_cairo', 'gi.repository.cairo'] - - hook_api.add_datas(datas) - hook_api.add_binaries(binaries) - hook_api.add_imports(*hiddenimports) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py deleted file mode 100755 index 8126328..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py +++ /dev/null @@ -1,150 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import glob -import os -import shutil -import subprocess - -from PyInstaller import compat -from PyInstaller.config import CONF # workpath -from PyInstaller.utils.hooks import get_hook_config, logger -from PyInstaller.utils.hooks.gi import GiModuleInfo, collect_glib_translations - -LOADERS_PATH = os.path.join('gdk-pixbuf-2.0', '2.10.0', 'loaders') -LOADER_MODULE_DEST_PATH = "lib/gdk-pixbuf/loaders" -LOADER_CACHE_DEST_PATH = "lib/gdk-pixbuf" # NOTE: some search & replace code depends on / being used on all platforms. - - -def _find_gdk_pixbuf_query_loaders_executable(libdir): - # Distributions either package gdk-pixbuf-query-loaders in the GI libs directory (not on the path), or on the path - # with or without a -x64 suffix, depending on the architecture. - cmds = [ - os.path.join(libdir, 'gdk-pixbuf-2.0', 'gdk-pixbuf-query-loaders'), - 'gdk-pixbuf-query-loaders-64', - 'gdk-pixbuf-query-loaders', - ] - - for cmd in cmds: - cmd_fullpath = shutil.which(cmd) - if cmd_fullpath is not None: - return cmd_fullpath - - return None - - -def _collect_loaders(libdir): - # Assume loader plugins have .so library suffix on all non-Windows platforms - lib_ext = "*.dll" if compat.is_win else "*.so" - - # Find all loaders - loader_libs = [] - pattern = os.path.join(libdir, LOADERS_PATH, lib_ext) - for f in glob.glob(pattern): - loader_libs.append(f) - - # Sometimes the loaders are stored in a different directory from the library (msys2) - if not loader_libs: - pattern = os.path.abspath(os.path.join(libdir, '..', 'lib', LOADERS_PATH, lib_ext)) - for f in glob.glob(pattern): - loader_libs.append(f) - - return loader_libs - - -def _generate_loader_cache(gdk_pixbuf_query_loaders, libdir, loader_libs): - # Run the "gdk-pixbuf-query-loaders" command and capture its standard output providing an updated loader - # cache; then write this output to the loader cache bundled with this frozen application. On all platforms, - # we also move the package structure to point to lib/gdk-pixbuf instead of lib/gdk-pixbuf-2.0/2.10.0 in - # order to make compatible with macOS .app bundle signing. - # - # On macOS we use @executable_path to specify a path relative to the generated bundle. However, on - # non-Windows, we need to rewrite the loader cache because it is not relocatable by default. See - # https://bugzilla.gnome.org/show_bug.cgi?id=737523 - # - # To make it easier to rewrite, we just always write @executable_path, since its significantly easier to - # find/replace at runtime. :) - # - # To permit string munging, decode the encoded bytes output by this command (i.e., enable the - # "universal_newlines" option). - # - # On Fedora, the default loaders cache is /usr/lib64, but the libdir is actually /lib64. To get around this, - # we pass the path to the loader command, and it will create a cache with the right path. - # - # On Windows, the loaders lib directory is relative, starts with 'lib', and uses \\ as path separators - # (escaped \). - cachedata = subprocess.run([gdk_pixbuf_query_loaders, *loader_libs], - check=True, - stdout=subprocess.PIPE, - encoding='utf-8').stdout - - output_lines = [] - prefix = '"' + os.path.join(libdir, 'gdk-pixbuf-2.0', '2.10.0') - plen = len(prefix) - - win_prefix = '"' + '\\\\'.join(['lib', 'gdk-pixbuf-2.0', '2.10.0']) - win_plen = len(win_prefix) - - msys2_prefix = '"' + os.path.abspath(os.path.join(libdir, '..', 'lib', 'gdk-pixbuf-2.0', '2.10.0')) - msys2_plen = len(msys2_prefix) - - # For each line in the updated loader cache... - for line in cachedata.splitlines(): - if line.startswith('#'): - continue - if line.startswith(prefix): - line = '"@executable_path/' + LOADER_CACHE_DEST_PATH + line[plen:] - elif line.startswith(win_prefix): - line = '"' + LOADER_CACHE_DEST_PATH.replace('/', '\\\\') + line[win_plen:] - elif line.startswith(msys2_prefix): - line = ('"' + LOADER_CACHE_DEST_PATH + line[msys2_plen:]).replace('/', '\\\\') - output_lines.append(line) - - return '\n'.join(output_lines) - - -def hook(hook_api): - module_info = GiModuleInfo('GdkPixbuf', '2.0') - if not module_info.available: - return - - binaries, datas, hiddenimports = module_info.collect_typelib_data() - - libdir = module_info.get_libdir() - - # Collect GdkPixbuf loaders and generate loader cache file - gdk_pixbuf_query_loaders = _find_gdk_pixbuf_query_loaders_executable(libdir) - logger.debug("gdk-pixbuf-query-loaders executable: %s", gdk_pixbuf_query_loaders) - if not gdk_pixbuf_query_loaders: - logger.warning("gdk-pixbuf-query-loaders executable not found in GI library directory or in PATH!") - else: - # Find all GdkPixbuf loader modules - loader_libs = _collect_loaders(libdir) - - # Collect discovered loaders - for lib in loader_libs: - binaries.append((lib, LOADER_MODULE_DEST_PATH)) - - # Generate loader cache; we need to store it to CONF['workpath'] so we can collect it as a data file. - cachedata = _generate_loader_cache(gdk_pixbuf_query_loaders, libdir, loader_libs) - cachefile = os.path.join(CONF['workpath'], 'loaders.cache') - with open(cachefile, 'w', encoding='utf-8') as fp: - fp.write(cachedata) - datas.append((cachefile, LOADER_CACHE_DEST_PATH)) - - # Collect translations - lang_list = get_hook_config(hook_api, "gi", "languages") - if gdk_pixbuf_query_loaders: - datas += collect_glib_translations('gdk-pixbuf', lang_list) - - hook_api.add_datas(datas) - hook_api.add_binaries(binaries) - hook_api.add_imports(*hiddenimports) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gio.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gio.py deleted file mode 100755 index fe34446..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gio.py +++ /dev/null @@ -1,68 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import glob -import os - -from PyInstaller import compat -import PyInstaller.log as logging -from PyInstaller.utils.hooks.gi import GiModuleInfo - -logger = logging.getLogger(__name__) - -module_info = GiModuleInfo('Gio', '2.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() - - # Find Gio modules - libdir = module_info.get_libdir() - modules_pattern = None - gio_libdir = os.path.join(libdir, 'gio', 'modules') - runtime_path = 'gio_modules' - - lib_ext = '*.so' - if compat.is_win: - lib_ext = '*.dll' - - if not os.path.exists(gio_libdir): - # homebrew/MSYS2 may install the files elsewhere... - gio_libdir = os.path.join(os.path.commonprefix([compat.base_prefix, gio_libdir]), 'lib', 'gio', 'modules') - - if os.path.exists(gio_libdir): - modules_pattern = os.path.join(gio_libdir, lib_ext) - else: - logger.warning('Could not determine Gio modules path!') - - if modules_pattern: - for f in glob.glob(modules_pattern): - binaries.append((f, runtime_path)) - cache_file = os.path.join(gio_libdir, 'giomodule.cache') - if os.path.isfile(cache_file): - datas.append((cache_file, runtime_path)) - else: - # To add a new platform add a new elif above with the proper is_ and proper pattern for finding the - # Gio modules on your platform. - logger.warning('Bundling Gio modules is not supported on your platform.') - - # Bundle the mime cache -- might not be needed on Windows - # -> this is used for content type detection (also used by GdkPixbuf) - # -> gio/xdgmime/xdgmime.c looks for mime/mime.cache in the users home directory, followed by XDG_DATA_DIRS if - # specified in the environment, otherwise it searches /usr/local/share/ and /usr/share/ - if not compat.is_win: - _mime_searchdirs = ['/usr/local/share', '/usr/share'] - if 'XDG_DATA_DIRS' in os.environ: - _mime_searchdirs.insert(0, os.environ['XDG_DATA_DIRS']) - - for sd in _mime_searchdirs: - spath = os.path.join(sd, 'mime', 'mime.cache') - if os.path.exists(spath): - datas.append((spath, 'share/mime')) - break diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Graphene.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Graphene.py deleted file mode 100755 index bfa4d30..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Graphene.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('Graphene', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gsk.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gsk.py deleted file mode 100755 index 9229252..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gsk.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('Gsk', '4.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gst.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gst.py deleted file mode 100755 index 939a37b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gst.py +++ /dev/null @@ -1,93 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# GStreamer contains a lot of plugins. We need to collect them and bundle them with the exe file. We also need to -# resolve binary dependencies of these GStreamer plugins. - -import pathlib - -from PyInstaller.utils.hooks import get_hook_config, include_or_exclude_file -import PyInstaller.log as logging -from PyInstaller import isolated -from PyInstaller.utils.hooks.gi import GiModuleInfo, collect_glib_share_files, collect_glib_translations - -logger = logging.getLogger(__name__) - - -@isolated.decorate -def _get_gst_plugin_path(): - import os - import gi - gi.require_version('Gst', '1.0') - from gi.repository import Gst - Gst.init(None) - reg = Gst.Registry.get() - plug = reg.find_plugin('coreelements') - path = plug.get_filename() - return os.path.dirname(path) - - -def _format_plugin_pattern(plugin_name): - return f"**/*gst{plugin_name}.*" - - -def hook(hook_api): - module_info = GiModuleInfo('Gst', '1.0') - if not module_info.available: - return - - binaries, datas, hiddenimports = module_info.collect_typelib_data() - hiddenimports += ["gi.repository.Gio"] - - # Collect data files - datas += collect_glib_share_files('gstreamer-1.0') - - # Translations - lang_list = get_hook_config(hook_api, "gi", "languages") - for prog in [ - 'gst-plugins-bad-1.0', - 'gst-plugins-base-1.0', - 'gst-plugins-good-1.0', - 'gst-plugins-ugly-1.0', - 'gstreamer-1.0', - ]: - datas += collect_glib_translations(prog, lang_list) - - # Plugins - try: - plugin_path = _get_gst_plugin_path() - except Exception as e: - logger.warning("Failed to determine gstreamer plugin path: %s", e) - plugin_path = None - - if plugin_path: - plugin_path = pathlib.Path(plugin_path) - - # Obtain optional include/exclude list from hook config - include_list = get_hook_config(hook_api, "gstreamer", "include_plugins") - exclude_list = get_hook_config(hook_api, "gstreamer", "exclude_plugins") - - # Format plugin basenames into filename patterns for matching - if include_list is not None: - include_list = [_format_plugin_pattern(name) for name in include_list] - if exclude_list is not None: - exclude_list = [_format_plugin_pattern(name) for name in exclude_list] - - # The names of GStreamer plugins typically start with libgst (or just gst, depending on the toolchain). We also - # need to account for different extensions that might be used on a particular OS (for example, on macOS, the - # extension may be either .so or .dylib). - for lib_pattern in ['*gst*.dll', '*gst*.dylib', '*gst*.so']: - binaries += [(str(filename), 'gst_plugins') for filename in plugin_path.glob(lib_pattern) - if include_or_exclude_file(filename, include_list, exclude_list)] - - hook_api.add_datas(datas) - hook_api.add_binaries(binaries) - hook_api.add_imports(*hiddenimports) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstAllocators.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstAllocators.py deleted file mode 100755 index 119401a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstAllocators.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstAllocators', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstApp.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstApp.py deleted file mode 100755 index 7c25a44..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstApp.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstApp', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstAudio.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstAudio.py deleted file mode 100755 index cf18078..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstAudio.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstAudio', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstBadAudio.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstBadAudio.py deleted file mode 100755 index 0f345b9..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstBadAudio.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstBadAudio', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstBase.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstBase.py deleted file mode 100755 index ea6187b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstBase.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstBase', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstCheck.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstCheck.py deleted file mode 100755 index e631995..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstCheck.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstCheck', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstCodecs.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstCodecs.py deleted file mode 100755 index ffa643e..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstCodecs.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstCodecs', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstController.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstController.py deleted file mode 100755 index c928843..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstController.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstController', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGL.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGL.py deleted file mode 100755 index 0075eb0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGL.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstGL', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLEGL.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLEGL.py deleted file mode 100755 index a3f557d..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLEGL.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstGLEGL', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLWayland.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLWayland.py deleted file mode 100755 index 6ef146d..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLWayland.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstGLWayland', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLX11.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLX11.py deleted file mode 100755 index dd68570..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstGLX11.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstGLX11', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstInsertBin.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstInsertBin.py deleted file mode 100755 index c7980bc..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstInsertBin.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstInsertBin', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstMpegts.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstMpegts.py deleted file mode 100755 index b690192..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstMpegts.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstMpegts', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstNet.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstNet.py deleted file mode 100755 index 0c268af..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstNet.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstNet', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPbutils.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPbutils.py deleted file mode 100755 index 173b695..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPbutils.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstPbutils', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPlay.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPlay.py deleted file mode 100755 index edb6020..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPlay.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstPlay', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPlayer.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPlayer.py deleted file mode 100755 index 80cb93f..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstPlayer.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstPlayer', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtp.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtp.py deleted file mode 100755 index d18e58d..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtp.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstRtp', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtsp.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtsp.py deleted file mode 100755 index 09382dd..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtsp.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstRtsp', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtspServer.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtspServer.py deleted file mode 100755 index d023c3f..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstRtspServer.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstRtspServer', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstSdp.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstSdp.py deleted file mode 100755 index 2a78e2b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstSdp.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstSdp', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstTag.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstTag.py deleted file mode 100755 index dbac756..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstTag.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstTag', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstTranscoder.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstTranscoder.py deleted file mode 100755 index 3cc1dcf..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstTranscoder.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstTranscoder', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVideo.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVideo.py deleted file mode 100755 index 398b503..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVideo.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstVideo', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkan.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkan.py deleted file mode 100755 index 588c073..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkan.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstVulkan', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkanWayland.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkanWayland.py deleted file mode 100755 index aaef939..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkanWayland.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstVulkanWayland', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkanXCB.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkanXCB.py deleted file mode 100755 index 2351a13..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstVulkanXCB.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstVulkanXCB', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstWebRTC.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstWebRTC.py deleted file mode 100755 index 9fcac06..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GstWebRTC.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GstWebRTC', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gtk.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gtk.py deleted file mode 100755 index 2495b1d..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Gtk.py +++ /dev/null @@ -1,59 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import os -import os.path - -from PyInstaller.compat import is_win -from PyInstaller.utils.hooks import get_hook_config -from PyInstaller.utils.hooks.gi import GiModuleInfo, collect_glib_etc_files, collect_glib_share_files, \ - collect_glib_translations - - -def hook(hook_api): - module_info = GiModuleInfo('Gtk', '3.0', hook_api=hook_api) # Pass hook_api to read version from hook config - if not module_info.available: - return - - binaries, datas, hiddenimports = module_info.collect_typelib_data() - - # Collect fontconfig data - datas += collect_glib_share_files('fontconfig') - - # Icons, themes, translations - icon_list = get_hook_config(hook_api, "gi", "icons") - if icon_list is not None: - for icon in icon_list: - datas += collect_glib_share_files(os.path.join('icons', icon)) - else: - datas += collect_glib_share_files('icons') - - # Themes - theme_list = get_hook_config(hook_api, "gi", "themes") - if theme_list is not None: - for theme in theme_list: - datas += collect_glib_share_files(os.path.join('themes', theme)) - else: - datas += collect_glib_share_files('themes') - - # Translations - lang_list = get_hook_config(hook_api, "gi", "languages") - datas += collect_glib_translations(f'gtk{module_info.version[0]}0', lang_list) - - # These only seem to be required on Windows - if is_win: - datas += collect_glib_etc_files('fonts') - datas += collect_glib_etc_files('pango') - datas += collect_glib_share_files('fonts') - - hook_api.add_datas(datas) - hook_api.add_binaries(binaries) - hook_api.add_imports(*hiddenimports) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkChamplain.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkChamplain.py deleted file mode 100755 index 777b620..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkChamplain.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GtkChamplain', '0.12') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkClutter.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkClutter.py deleted file mode 100755 index cc4fcd7..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkClutter.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('GtkClutter', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkSource.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkSource.py deleted file mode 100755 index 5e7efa7..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkSource.py +++ /dev/null @@ -1,31 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo, collect_glib_share_files - - -def hook(hook_api): - module_info = GiModuleInfo('GtkSource', '3.0', hook_api=hook_api) # Pass hook_api to read version from hook config - if not module_info.available: - return - - binaries, datas, hiddenimports = module_info.collect_typelib_data() - - # Collect data files - # The data directory name contains verbatim version, e.g.: - # * GtkSourceView-3.0 -> /usr/share/gtksourceview-3.0 - # * GtkSourceView-4 -> /usr/share/gtksourceview-4 - # * GtkSourceView-5 -> /usr/share/gtksourceview-5 - datas += collect_glib_share_files(f'gtksourceview-{module_info.version}') - - hook_api.add_datas(datas) - hook_api.add_binaries(binaries) - hook_api.add_imports(*hiddenimports) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkosxApplication.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkosxApplication.py deleted file mode 100755 index 3437edf..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.GtkosxApplication.py +++ /dev/null @@ -1,18 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.compat import is_darwin -from PyInstaller.utils.hooks.gi import GiModuleInfo - -if is_darwin: - module_info = GiModuleInfo('GtkosxApplication', '1.0') - if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.HarfBuzz.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.HarfBuzz.py deleted file mode 100755 index 41cef14..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.HarfBuzz.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('HarfBuzz', '0.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.OsmGpsMap.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.OsmGpsMap.py deleted file mode 100755 index 477f0c0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.OsmGpsMap.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo("OsmGpsMap", "1.0") -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Pango.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Pango.py deleted file mode 100755 index 3d8b865..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Pango.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('Pango', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.PangoCairo.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.PangoCairo.py deleted file mode 100755 index 7c058fd..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.PangoCairo.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('PangoCairo', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Rsvg.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Rsvg.py deleted file mode 100755 index e3ad6d2..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.Rsvg.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('Rsvg', '2.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.cairo.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.cairo.py deleted file mode 100755 index 71fed30..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.cairo.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('cairo', '1.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.freetype2.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.freetype2.py deleted file mode 100755 index ffea7a1..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.freetype2.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('freetype2', '2.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.xlib.py b/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.xlib.py deleted file mode 100755 index 1c2bde3..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-gi.repository.xlib.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks.gi import GiModuleInfo - -module_info = GiModuleInfo('xlib', '2.0') -if module_info.available: - binaries, datas, hiddenimports = module_info.collect_typelib_data() diff --git a/voxvera/vendor/PyInstaller/hooks/hook-heapq.py b/voxvera/vendor/PyInstaller/hooks/hook-heapq.py deleted file mode 100755 index 373025f..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-heapq.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Only required when run as `__main__`. -excludedimports = ["doctest"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-idlelib.py b/voxvera/vendor/PyInstaller/hooks/hook-idlelib.py deleted file mode 100755 index 505378d..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-idlelib.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files - -datas = collect_data_files('idlelib') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-importlib_metadata.py b/voxvera/vendor/PyInstaller/hooks/hook-importlib_metadata.py deleted file mode 100755 index 7abf511..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-importlib_metadata.py +++ /dev/null @@ -1,24 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2019-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -importlib_metadata is a library to access the metadata for a Python package. This functionality intends to replace most -uses of pkg_resources entry point API and metadata API. -""" - -from PyInstaller.utils.hooks import copy_metadata - -# Normally, we should never need to use copy_metadata() in a hook since metadata requirements detection is now -# automatic. However, that detection first uses `PyiModuleGraph.get_code_using("importlib_metadata")` to find -# files which `import importlib_metadata` and `get_code_using()` intentionally excludes internal imports. This -# means that importlib_metadata is not scanned for usages of importlib_metadata and therefore when -# importlib_metadata uses its own API to get its version, this goes undetected. Therefore, we must collect its -# metadata manually. -datas = copy_metadata('importlib_metadata') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-importlib_resources.py b/voxvera/vendor/PyInstaller/hooks/hook-importlib_resources.py deleted file mode 100755 index b43b19b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-importlib_resources.py +++ /dev/null @@ -1,22 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2019-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -`importlib_resources` is a backport of the 3.9+ module `importlib.resources` -""" - -from PyInstaller.utils.hooks import check_requirement, collect_data_files - -# Prior to v1.2.0, a `version.txt` file is used to set __version__. Later versions use `importlib.metadata`. -if check_requirement("importlib_resources < 1.2.0"): - datas = collect_data_files("importlib_resources", includes=["version.txt"]) - -if check_requirement("importlib_resources >= 1.3.1"): - hiddenimports = ['importlib_resources.trees'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-keyring.py b/voxvera/vendor/PyInstaller/hooks/hook-keyring.py deleted file mode 100755 index acbd5ff..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-keyring.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules, copy_metadata - -# Collect backends -hiddenimports = collect_submodules('keyring.backends') - -# Keyring performs backend plugin discovery using setuptools entry points, which are listed in the metadata. Therefore, -# we need to copy the metadata, otherwise no backends will be found at run-time. -datas = copy_metadata('keyring') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-kivy.py b/voxvera/vendor/PyInstaller/hooks/hook-kivy.py deleted file mode 100755 index fd01f06..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-kivy.py +++ /dev/null @@ -1,25 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import log as logging -from PyInstaller.utils.hooks import check_requirement - -if check_requirement('kivy >= 1.9.1'): - from kivy.tools.packaging.pyinstaller_hooks import (add_dep_paths, get_deps_all, get_factory_modules, kivy_modules) - from kivy.tools.packaging.pyinstaller_hooks import excludedimports, datas # noqa: F401 - - add_dep_paths() - - hiddenimports = get_deps_all()['hiddenimports'] - hiddenimports = list(set(get_factory_modules() + kivy_modules + hiddenimports)) -else: - logger = logging.getLogger(__name__) - logger.warning('Hook disabled because of Kivy version < 1.9.1') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-lib2to3.py b/voxvera/vendor/PyInstaller/hooks/hook-lib2to3.py deleted file mode 100755 index 83b0f08..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-lib2to3.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This is needed to bundle lib2to3 Grammars files - -from PyInstaller.utils.hooks import collect_data_files - -datas = collect_data_files('lib2to3') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backend_bases.py b/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backend_bases.py deleted file mode 100755 index f65344c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backend_bases.py +++ /dev/null @@ -1,12 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -excludedimports = ['IPython'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.backend_qtagg.py b/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.backend_qtagg.py deleted file mode 100755 index b3067db..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.backend_qtagg.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This module conditionally imports PyQt6: -# https://github.com/matplotlib/matplotlib/blob/9e18a343fb58a2978a8e27df03190ed21c61c343/lib/matplotlib/backends/backend_qtagg.py#L52-L53 -# Suppress this import to prevent PyQt6 from being accidentally pulled in; the actually relevant Qt bindings are -# determined by our hook for `matplotlib.backends.qt_compat` module. -excludedimports = ['PyQt6'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.backend_qtcairo.py b/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.backend_qtcairo.py deleted file mode 100755 index 0b9174b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.backend_qtcairo.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This module conditionally imports PyQt6: -# https://github.com/matplotlib/matplotlib/blob/9e18a343fb58a2978a8e27df03190ed21c61c343/lib/matplotlib/backends/backend_qtcairo.py#L24-L25 -# Suppress this import to prevent PyQt6 from being accidentally pulled in; the actually relevant Qt bindings are -# determined by our hook for `matplotlib.backends.qt_compat` module. -excludedimports = ['PyQt6'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.py b/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.py deleted file mode 100755 index 935ca80..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.py +++ /dev/null @@ -1,226 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.compat import is_darwin -from PyInstaller.utils.hooks import logger, get_hook_config -from PyInstaller import isolated - - -@isolated.decorate -def _get_configured_default_backend(): - """ - Return the configured default matplotlib backend name, if available as matplotlib.rcParams['backend'] (or overridden - by MPLBACKEND environment variable. If the value of matplotlib.rcParams['backend'] corresponds to the auto-sentinel - object, returns None - """ - import matplotlib - # matplotlib.rcParams overrides the __getitem__ implementation and attempts to determine and load the default - # backend using pyplot.switch_backend(). Therefore, use dict.__getitem__(). - val = dict.__getitem__(matplotlib.rcParams, 'backend') - if isinstance(val, str): - return val - return None - - -@isolated.decorate -def _list_available_mpl_backends(): - """ - Returns the names of all available matplotlib backends. - """ - import matplotlib - return matplotlib.rcsetup.all_backends - - -@isolated.decorate -def _check_mpl_backend_importable(module_name): - """ - Attempts to import the given module name (matplotlib backend module). - - Exceptions are propagated to caller. - """ - __import__(module_name) - - -# Bytecode scanning -def _recursive_scan_code_objects_for_mpl_use(co): - """ - Recursively scan the bytecode for occurrences of matplotlib.use() or mpl.use() calls with const arguments, and - collect those arguments into list of used matplotlib backend names. - """ - - from PyInstaller.depend.bytecode import any_alias, recursive_function_calls - - mpl_use_names = { - *any_alias("matplotlib.use"), - *any_alias("mpl.use"), # matplotlib is commonly aliased as mpl - } - - backends = [] - for calls in recursive_function_calls(co).values(): - for name, args in calls: - # matplotlib.use(backend) or matplotlib.use(backend, force) - # We support only literal arguments. Similarly, kwargs are - # not supported. - if len(args) not in {1, 2} or not isinstance(args[0], str): - continue - if name in mpl_use_names: - backends.append(args[0]) - - return backends - - -def _backend_module_name(name): - """ - Converts matplotlib backend name to its corresponding module name. - - Equivalent to matplotlib.cbook._backend_module_name(). - """ - if name.startswith("module://"): - return name[9:] - return f"matplotlib.backends.backend_{name.lower()}" - - -def _autodetect_used_backends(hook_api): - """ - Returns a list of automatically-discovered matplotlib backends in use, or the name of the default matplotlib - backend. Implements the 'auto' backend selection method. - """ - # Scan the code for matplotlib.use() - modulegraph = hook_api.analysis.graph - mpl_code_objs = modulegraph.get_code_using("matplotlib") - used_backends = [] - for name, co in mpl_code_objs.items(): - co_backends = _recursive_scan_code_objects_for_mpl_use(co) - if co_backends: - logger.info( - "Discovered Matplotlib backend(s) via `matplotlib.use()` call in module %r: %r", name, co_backends - ) - used_backends += co_backends - - # Deduplicate and sort the list of used backends before displaying it. - used_backends = sorted(set(used_backends)) - - if used_backends: - HOOK_CONFIG_DOCS = 'https://pyinstaller.org/en/stable/hooks-config.html#matplotlib-hooks' - logger.info( - "The following Matplotlib backends were discovered by scanning for `matplotlib.use()` calls: %r. If your " - "backend of choice is not in this list, either add a `matplotlib.use()` call to your code, or configure " - "the backend collection via hook options (see: %s).", used_backends, HOOK_CONFIG_DOCS - ) - return used_backends - - # Determine the default matplotlib backend. - # - # Ideally, this would be done by calling ``matplotlib.get_backend()``. However, that function tries to switch to the - # default backend (calling ``matplotlib.pyplot.switch_backend()``), which seems to occasionally fail on our linux CI - # with an error and, on other occasions, returns the headless Agg backend instead of the GUI one (even with display - # server running). Furthermore, using ``matplotlib.get_backend()`` returns headless 'Agg' when display server is - # unavailable, which is not ideal for automated builds. - # - # Therefore, we try to emulate ``matplotlib.get_backend()`` ourselves. First, we try to obtain the configured - # default backend from settings (rcparams and/or MPLBACKEND environment variable). If that is unavailable, we try to - # find the first importable GUI-based backend, using the same list as matplotlib.pyplot.switch_backend() uses for - # automatic backend selection. The difference is that we only test whether the backend module is importable, without - # trying to switch to it. - default_backend = _get_configured_default_backend() # isolated sub-process - if default_backend: - logger.info("Found configured default matplotlib backend: %s", default_backend) - return [default_backend] - - # `QtAgg` supersedes `Qt5Agg`; however, we keep `Qt5Agg` in the candidate list to support older versions of - # matplotlib that do not have `QtAgg`. - candidates = ["QtAgg", "Qt5Agg", "Gtk4Agg", "Gtk3Agg", "TkAgg", "WxAgg"] - if is_darwin: - candidates = ["MacOSX"] + candidates - logger.info("Trying determine the default backend as first importable candidate from the list: %r", candidates) - - for candidate in candidates: - try: - module_name = _backend_module_name(candidate) - _check_mpl_backend_importable(module_name) # NOTE: uses an isolated sub-process. - except Exception: - continue - return [candidate] - - # Fall back to headless Agg backend - logger.info("None of the backend candidates could be imported; falling back to headless Agg!") - return ['Agg'] - - -def _collect_all_importable_backends(hook_api): - """ - Returns a list of all importable matplotlib backends. Implements the 'all' backend selection method. - """ - # List of the human-readable names of all available backends. - backend_names = _list_available_mpl_backends() # NOTE: retrieved in an isolated sub-process. - logger.info("All available matplotlib backends: %r", backend_names) - - # Try to import the module(s). - importable_backends = [] - - # List of backends to exclude; Qt4 is not supported by PyInstaller anymore. - exclude_backends = {'Qt4Agg', 'Qt4Cairo'} - - # Ignore "CocoaAgg" on OSes other than macOS; attempting to import it on other OSes halts the current - # (sub)process without printing output or raising exceptions, preventing reliable detection. Apply the - # same logic for the (newer) "MacOSX" backend. - if not is_darwin: - exclude_backends |= {'CocoaAgg', 'MacOSX'} - - # For safety, attempt to import each backend in an isolated sub-process. - for backend_name in backend_names: - if backend_name in exclude_backends: - logger.info(' Matplotlib backend %r: excluded', backend_name) - continue - - try: - module_name = _backend_module_name(backend_name) - _check_mpl_backend_importable(module_name) # NOTE: uses an isolated sub-process. - except Exception: - # Backend is not importable, for whatever reason. - logger.info(' Matplotlib backend %r: ignored due to import error', backend_name) - continue - - logger.info(' Matplotlib backend %r: added', backend_name) - importable_backends.append(backend_name) - - return importable_backends - - -def hook(hook_api): - # Backend collection setting - backends_method = get_hook_config(hook_api, 'matplotlib', 'backends') - if backends_method is None: - backends_method = 'auto' # default method - - # Select backend(s) - if backends_method == 'auto': - logger.info("Matplotlib backend selection method: automatic discovery of used backends") - backend_names = _autodetect_used_backends(hook_api) - elif backends_method == 'all': - logger.info("Matplotlib backend selection method: collection of all importable backends") - backend_names = _collect_all_importable_backends(hook_api) - else: - logger.info("Matplotlib backend selection method: user-provided name(s)") - if isinstance(backends_method, str): - backend_names = [backends_method] - else: - assert isinstance(backends_method, list), "User-provided backend name(s) must be either a string or a list!" - backend_names = backends_method - - # Deduplicate and sort the list of selected backends before displaying it. - backend_names = sorted(set(backend_names)) - - logger.info("Selected matplotlib backends: %r", backend_names) - - # Set module names as hiddenimports - module_names = [_backend_module_name(backend) for backend in backend_names] # backend name -> module name - hook_api.add_imports(*module_names) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.qt_compat.py b/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.qt_compat.py deleted file mode 100755 index 4e12fff..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.backends.qt_compat.py +++ /dev/null @@ -1,26 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import qt as qtutils - -# This module conditionally imports all Qt bindings. Prevent all available bindings from being pulled in by trying to -# select the most applicable one. -# -# The preference order for this module appears to be: PyQt6, PySide6, PyQt5, PySide2 (or just PyQt5, PySide2 if Qt5 -# bindings are forced). See: -# https://github.com/matplotlib/matplotlib/blob/9e18a343fb58a2978a8e27df03190ed21c61c343/lib/matplotlib/backends/qt_compat.py#L113-L125 -# -# We, however, use the default preference order of the helper function, in order to keep it consistent across multiple -# hooks that use the same helper. -excludedimports = qtutils.exclude_extraneous_qt_bindings( - hook_name="hook-matplotlib.backends.qt_compat", - qt_bindings_order=None, -) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.numerix.py b/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.numerix.py deleted file mode 100755 index 924b400..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.numerix.py +++ /dev/null @@ -1,21 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -The matplotlib.numerix package sneaks these imports in under the radar. -""" - -hiddenimports = [ - 'fft', - 'linear_algebra', - 'random_array', - 'ma', - 'mlab', -] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.py b/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.py deleted file mode 100755 index e628e9b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.py +++ /dev/null @@ -1,38 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import isolated -from PyInstaller import compat -from PyInstaller.utils import hooks as hookutils - - -@isolated.decorate -def mpl_data_dir(): - import matplotlib - return matplotlib.get_data_path() - - -datas = [ - (mpl_data_dir(), "matplotlib/mpl-data"), -] - -binaries = [] - -# Windows PyPI wheels for `matplotlib` >= 3.7.0 use `delvewheel`. -# In addition to DLLs from `matplotlib.libs` directory, which should be picked up automatically by dependency analysis -# in contemporary PyInstaller versions, we also need to collect the load-order file. This used to be required for -# python <= 3.7 (that lacked `os.add_dll_directory`), but is also needed for Anaconda python 3.8 and 3.9, where -# `delvewheel` falls back to load-order file codepath due to Anaconda breaking `os.add_dll_directory` implementation. -if compat.is_win and hookutils.check_requirement('matplotlib >= 3.7.0'): - delvewheel_datas, delvewheel_binaries = hookutils.collect_delvewheel_libs_directory('matplotlib') - - datas += delvewheel_datas - binaries += delvewheel_binaries diff --git a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.pyplot.py b/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.pyplot.py deleted file mode 100755 index 2f78597..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-matplotlib.pyplot.py +++ /dev/null @@ -1,12 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -excludedimports = ['IPython', "IPython.core.pylabtools"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-multiprocessing.util.py b/voxvera/vendor/PyInstaller/hooks/hook-multiprocessing.util.py deleted file mode 100755 index b9363ba..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-multiprocessing.util.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# In Python 3.8 mutliprocess.utils has _cleanup_tests() to cleanup multiprocessing resources when multiprocessing tests -# completed. This function import `tests` which is the complete Python test-suite, pulling in many more dependencies, -# e.g., tkinter. - -excludedimports = ['test'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-numpy.py b/voxvera/vendor/PyInstaller/hooks/hook-numpy.py deleted file mode 100755 index d2a49d0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-numpy.py +++ /dev/null @@ -1,129 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. Additional -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# --- Copyright Disclaimer --- -# -# An earlier copy of this hook has been submitted to the NumPy project, where it was integrated in v1.23.0rc1 -# (https://github.com/numpy/numpy/pull/20745), under terms and conditions outlined in their repository [1]. -# -# A special provision is hereby granted to the NumPy project that allows the NumPy copy of the hook to incorporate the -# changes made to this (PyInstaller's) copy of the hook, subject to their licensing terms as opposed to PyInstaller's -# (stricter) licensing terms. -# -# .. refs: -# -# [1] NumPy's license: https://github.com/numpy/numpy/blob/master/LICENSE.txt - -# NOTE: when comparing the contents of this hook and the NumPy version of the hook (for example, to port changes), keep -# in mind that this copy is PyInstaller-centric - it caters to the version of PyInstaller it is bundled with, but needs -# to account for different behavior of different NumPy versions. In contrast, the NumPy copy of the hook caters to the -# version of NumPy it is bundled with, but should account for behavior differences in different PyInstaller versions. - -# Override the default hook priority so that our copy of hook is used instead of NumPy's one (which has priority 0, -# the default for upstream hooks). -# $PyInstaller-Hook-Priority: 1 - -from PyInstaller import compat -from PyInstaller.utils.hooks import ( - get_installer, - collect_dynamic_libs, -) - -from packaging.version import Version - -numpy_version = Version(compat.importlib_metadata.version("numpy")).release -numpy_installer = get_installer('numpy') - -hiddenimports = [] -datas = [] -binaries = [] - -# Collect shared libraries that are bundled inside the numpy's package directory. With PyInstaller 6.x, the directory -# layout of collected shared libraries should be preserved (to match behavior of the binary dependency analysis). In -# earlier versions of PyInstaller, it was necessary to collect the shared libraries into application's top-level -# directory (because that was also what binary dependency analysis in PyInstaller < 6.0 did). -binaries += collect_dynamic_libs("numpy") - -# Check if we are using Anaconda-packaged numpy -if numpy_installer == 'conda': - # Collect DLLs for NumPy and its dependencies (MKL, OpenBlas, OpenMP, etc.) from the communal Conda bin directory. - from PyInstaller.utils.hooks import conda_support - datas += conda_support.collect_dynamic_libs("numpy", dependencies=True) - -# NumPy 1.26 started using `delvewheel` for its Windows PyPI wheels. While contemporary PyInstaller versions -# automatically pick up DLLs from external `numpy.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. -# -# Under contemporary python versions, we might still need to explicitly collect the DLLs from `numpy.libs` directory -# to accommodate the cases when some other package's `.lib` directory (for example, `pandas.libs`) contains a DLL -# with the same name, and binary dependency analysis ends up resolving that one. -# -# The installer check compares against 'conda', because PyPI wheels might be installed by installers other than 'pip' -# (for example, 'uv' - see #9360). -if compat.is_win and numpy_version >= (1, 26) and numpy_installer != 'conda': - from PyInstaller.utils.hooks import collect_delvewheel_libs_directory - datas, binaries = collect_delvewheel_libs_directory("numpy", datas=datas, binaries=binaries) - -# Submodules PyInstaller cannot detect (probably because they are only imported by extension modules, which PyInstaller -# cannot read). -if numpy_version >= (2, 0): - # In v2.0.0, `numpy.core` was renamed to `numpy._core`. - # See https://github.com/numpy/numpy/commit/47b70cbffd672849a5d3b9b6fa6e515700460fd0 - hiddenimports += ['numpy._core._dtype_ctypes', 'numpy._core._multiarray_tests'] -else: - hiddenimports += ['numpy.core._dtype_ctypes'] - - # See https://github.com/numpy/numpy/commit/99104bd2d0557078d7ea9a590129c87dd63df623 - if numpy_version >= (1, 25): - hiddenimports += ['numpy.core._multiarray_tests'] - -# Starting with v2.3.0, we need to add `numpy._core._exceptions` to hiddenimports; in previous versions, this module -# was picked up due to explicit import in `numpy._core._methods`, which was removed as part of cleanup in -# https://github.com/numpy/numpy/commit/a51a4f5c10aa9b7962ff1e7e9b5f9b7d91c51489 -if numpy_version >= (2, 3, 0): - hiddenimports += ['numpy._core._exceptions'] - -# This hidden import was removed from NumPy hook in v1.25.0 (https://github.com/numpy/numpy/pull/22666). According to -# comment in the linked PR, it should have been unnecessary since v1.19. -if compat.is_conda and numpy_version < (1, 19): - hiddenimports += ["six"] - -# Remove testing and building code and packages that are referenced throughout NumPy but are not really dependencies. -excludedimports = [ - "scipy", - "pytest", - "nose", - "f2py", - "setuptools", -] - -# As of v1.22.0, numpy.testing (imported for example by some scipy modules) requires numpy.distutils and distutils. -# This was due to numpy.testing adding import of numpy.testing._private.extbuild, which in turn imported numpy.distutils -# and distutils. These imports were moved into functions that require them in v1.22.2 and v.1.23.0. -# See: https://github.com/numpy/numpy/pull/20831 and https://github.com/numpy/numpy/pull/20906 -# So we can exclude them for all numpy versions except for v1.22.0 and v1.22.1 - the main motivation is to avoid pulling -# in `setuptools` (which nowadays provides its vendored version of `distutils`). -if numpy_version < (1, 22, 0) or numpy_version > (1, 22, 1): - excludedimports += [ - "distutils", - "numpy.distutils", - ] - -# In numpy v2.0.0, numpy.f2py submodule has been added to numpy's `__all__` attribute. Therefore, using -# `from numpy import *` leads to an error if `numpy.f2py` is excluded (seen in scipy 1.14). The exclusion in earlier -# releases was not reported to cause any issues, so keep it around. Although it should be noted that it does break an -# explicit import (i.e., `import numpy.f2py`) from user's code as well, because it prevents collection of other -# submodules from `numpy.f2py`. -if numpy_version < (2, 0): - excludedimports += [ - "numpy.f2py", - ] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pandas.io.clipboard.py b/voxvera/vendor/PyInstaller/hooks/hook-pandas.io.clipboard.py deleted file mode 100755 index 2395920..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pandas.io.clipboard.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This module conditionally imports PyQt5: -# https://github.com/pandas-dev/pandas/blob/95308514e1221200e4526dfaf248283f3d7ade06/pandas/io/clipboard/__init__.py#L578-L597 -# Suppress this import to prevent PyQt5 from being accidentally pulled in; the actually relevant Qt bindings are -# determined by our hook for `qtpy` module, which contemporary versions of pandas mandate as part of `clipboard` and -# `all` extras: -# https://github.com/pandas-dev/pandas/blob/95308514e1221200e4526dfaf248283f3d7ade06/pyproject.toml#L86 -# https://github.com/pandas-dev/pandas/blob/95308514e1221200e4526dfaf248283f3d7ade06/pyproject.toml#L115 -excludedimports = ['PyQt5'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pandas.io.formats.style.py b/voxvera/vendor/PyInstaller/hooks/hook-pandas.io.formats.style.py deleted file mode 100755 index 2a56828..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pandas.io.formats.style.py +++ /dev/null @@ -1,18 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files - -# This module indirectly imports jinja2 -hiddenimports = ['jinja2'] - -# It also requires template file stored in pandas/io/formats/templates -datas = collect_data_files('pandas.io.formats') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pandas.plotting.py b/voxvera/vendor/PyInstaller/hooks/hook-pandas.plotting.py deleted file mode 100755 index 948dd88..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pandas.plotting.py +++ /dev/null @@ -1,18 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import check_requirement - -# Starting with pandas 1.3.0, pandas.plotting._matplotlib is imported via importlib.import_module() and needs to be -# added to hidden imports. But do this only if matplotlib is available in the first place (as it is soft dependency -# of pandas). -if check_requirement('pandas >= 1.3.0') and check_requirement('matplotlib'): - hiddenimports = ['pandas.plotting._matplotlib'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pandas.py b/voxvera/vendor/PyInstaller/hooks/hook-pandas.py deleted file mode 100755 index 3b0612a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pandas.py +++ /dev/null @@ -1,36 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2017-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat -from PyInstaller.utils.hooks import collect_submodules, get_installer - -from packaging.version import Version - -pandas_version = Version(compat.importlib_metadata.version("pandas")).release -pandas_installer = get_installer('pandas') - -datas = [] -binaries = [] - -# Pandas keeps Python extensions loaded with dynamic imports here. -hiddenimports = collect_submodules('pandas._libs') - -# Pandas 1.2.0 and later require cmath hidden import on linux and macOS. On Windows, this is not strictly required, but -# we add it anyway to keep things simple (and future-proof). -if pandas_version >= (1, 2, 0): - hiddenimports += ['cmath'] - -# Pandas 2.1.0 started using `delvewheel` for its Windows PyPI wheels. Ensure that DLLs from `pandas.libs` directory are -# collected regardless of whether binary dependency analysis manages to pick them up or not. See a similar block in the -# `numpy` hook for additional explanation. -if compat.is_win and pandas_version >= (2, 1, 0) and pandas_installer != 'conda': - from PyInstaller.utils.hooks import collect_delvewheel_libs_directory - datas, binaries = collect_delvewheel_libs_directory("pandas", datas=datas, binaries=binaries) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pickle.py b/voxvera/vendor/PyInstaller/hooks/hook-pickle.py deleted file mode 100755 index 8d023bb..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pickle.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Only required when run as `__main__` -excludedimports = ["argparse", "doctest"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pkg_resources.py b/voxvera/vendor/PyInstaller/hooks/hook-pkg_resources.py deleted file mode 100755 index 286671f..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pkg_resources.py +++ /dev/null @@ -1,68 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules, can_import_module -from PyInstaller.utils.hooks.setuptools import setuptools_info - -hiddenimports = [] -excludedimports = ['__main__'] - -# pkg_resources keeps vendored modules in its _vendor subpackage, and does sys.meta_path based import magic to expose -# them as pkg_resources.extern.* -# -# With setuptools >= 71.0, pkg_resources ceased to vendor packages, because vendoring is now done at the setuptools -# level. -if setuptools_info.available and setuptools_info.version < (71, 0, 0): - # The `railroad` package is an optional requirement for `pyparsing`. `pyparsing.diagrams` depends on `railroad`, so - # filter it out when `railroad` is not available. - if can_import_module('railroad'): - hiddenimports += collect_submodules('pkg_resources._vendor') - else: - hiddenimports += collect_submodules( - 'pkg_resources._vendor', filter=lambda name: 'pkg_resources._vendor.pyparsing.diagram' not in name - ) - - # pkg_resources v45.0 dropped support for Python 2 and added this module printing a warning. We could save some - # bytes if we would replace this by a fake module. - if setuptools_info.version >= (45, 0, 0) and setuptools_info.version < (49, 1, 1): - hiddenimports += ['pkg_resources.py2_warn'] - - # As of v60.7, setuptools vendored jaraco and has pkg_resources use it. Currently, the pkg_resources._vendor.jaraco - # namespace package cannot be automatically scanned due to limited support for pure namespace packages in our hook - # utilities. - # - # In setuptools 60.7.0, the vendored jaraco.text package included "Lorem Ipsum.txt" data file, which also has to be - # collected. However, the presence of the data file (and the resulting directory hierarchy) confuses the importer's - # redirection logic; instead of trying to work-around that, tell user to upgrade or downgrade their setuptools. - if setuptools_info.version == (60, 7, 0): - raise SystemExit( - "ERROR: Setuptools 60.7.0 is incompatible with PyInstaller. " - "Downgrade to an earlier version or upgrade to a later version." - ) - # In setuptools 60.7.1, the "Lorem Ipsum.txt" data file was dropped from the vendored jaraco.text package, so we can - # accommodate it with couple of hidden imports. - elif setuptools_info.version >= (60, 7, 1): - hiddenimports += [ - 'pkg_resources._vendor.jaraco.functools', - 'pkg_resources._vendor.jaraco.context', - 'pkg_resources._vendor.jaraco.text', - ] - - # As of setuptools 70.0.0, we need pkg_resources.extern added to hidden imports. - if setuptools_info.version >= (70, 0, 0): - hiddenimports += [ - 'pkg_resources.extern', - ] - -# Some more hidden imports. See: -# https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/15#issuecomment-663699288 `packaging` can either be -# its own package, or embedded in `pkg_resources._vendor.packaging`, or both. -hiddenimports += collect_submodules('packaging') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-platform.py b/voxvera/vendor/PyInstaller/hooks/hook-platform.py deleted file mode 100755 index 66aca00..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-platform.py +++ /dev/null @@ -1,27 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -import sys - -excludedimports = [] - -# see https://github.com/python/cpython/blob/3.9/Lib/platform.py#L411 -# This will exclude `plistlib` for sys.platform != 'darwin' -if sys.platform != 'darwin': - excludedimports += ["plistlib"] - -# Avoid collecting `_ios_support`, which in turn triggers unnecessary collection of `libobjc` shared library if the -# latter happens to be available on the build system. -# See https://github.com/pyinstaller/pyinstaller/issues/9333, as well as -# https://github.com/python/cpython/blob/v3.13.0/Lib/platform.py#L508-L521 -# and -# https://github.com/python/cpython/blob/v3.13.0/Lib/_ios_support.py#L13 -if sys.platform != 'ios': - excludedimports += ["_ios_support"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pygments.py b/voxvera/vendor/PyInstaller/hooks/hook-pygments.py deleted file mode 100755 index 529d82b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pygments.py +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -PyInstaller hook file for Pygments. Tested with version 2.0.2. -""" - -from PyInstaller.utils.hooks import collect_submodules - -# The following applies to pygments version 2.0.2, as reported by ``pip show pygments``. -# -# From pygments.formatters, line 37:: -# -# def _load_formatters(module_name): -# """Load a formatter (and all others in the module too).""" -# mod = __import__(module_name, None, None, ['__all__']) -# -# Therefore, we need all the modules in ``pygments.formatters``. - -hiddenimports = collect_submodules('pygments.formatters') -hiddenimports.extend(collect_submodules('pygments.lexers')) -hiddenimports.extend(collect_submodules('pygments.styles')) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pytz.py b/voxvera/vendor/PyInstaller/hooks/hook-pytz.py deleted file mode 100755 index a44d29a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pytz.py +++ /dev/null @@ -1,20 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files - -# On Linux pytz installed from distribution repository uses zoneinfo from /usr/share/zoneinfo/ and no data files might -# be collected. -datas = collect_data_files('pytz') - -# pytz references pkg_resources in a fall-back codepath that should normally not be reached; add an exclude to prevent -# (now deprecated) pkg_resources from being pulled in the frozen application. -excludedimports = ['pkg_resources'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-pytzdata.py b/voxvera/vendor/PyInstaller/hooks/hook-pytzdata.py deleted file mode 100755 index e45626c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-pytzdata.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files - -datas = collect_data_files("pytzdata") diff --git a/voxvera/vendor/PyInstaller/hooks/hook-qtawesome.py b/voxvera/vendor/PyInstaller/hooks/hook-qtawesome.py deleted file mode 100755 index 9829a03..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-qtawesome.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2017-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Hook for QtAwesome (https://github.com/spyder-ide/qtawesome). -Font files and charmaps need to be included with module. -Tested with QtAwesome 0.4.4 and Python 3.6 on macOS 10.12.4. -""" - -from PyInstaller.utils.hooks import collect_data_files - -datas = collect_data_files('qtawesome') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-qtpy.py b/voxvera/vendor/PyInstaller/hooks/hook-qtpy.py deleted file mode 100755 index a6ce00c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-qtpy.py +++ /dev/null @@ -1,25 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import qt as qtutils - -# This module conditionally imports all Qt bindings. Prevent all available bindings from being pulled in by trying to -# select the most applicable one. -# -# The preference order for this module appears to be: PyQt5, PySide2, PyQt6, PySide6. See: -# https://github.com/spyder-ide/qtpy/blob/3238de7a3e038daeb585c1a76fd9a0c4baf22f11/qtpy/__init__.py#L199-L289 -# -# We, however, use the default preference order of the helper function, in order to keep it consistent across multiple -# hooks that use the same helper. -excludedimports = qtutils.exclude_extraneous_qt_bindings( - hook_name="hook-qtpy", - qt_bindings_order=None, -) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scapy.layers.all.py b/voxvera/vendor/PyInstaller/hooks/hook-scapy.layers.all.py deleted file mode 100755 index fdcc779..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scapy.layers.all.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules - -# The layers to load can be configured using scapy's conf.load_layers. -# from scapy.config import conf; print(conf.load_layers) -# I decided not to use this, but to include all layer modules. The reason is: When building the package, load_layers may -# not include all the layer modules the program will use later. - -hiddenimports = collect_submodules('scapy.layers') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.io.matlab.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.io.matlab.py deleted file mode 100755 index c69c767..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.io.matlab.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Module scipy.io.matlab allows to parse matlab files. The hidden import is necessary for SciPy 0.11+. -hiddenimports = ['scipy.io.matlab.streams'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.linalg.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.linalg.py deleted file mode 100755 index b1a68b8..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.linalg.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# The hidden import is necessary for SciPy 0.16+. -hiddenimports = ['scipy.linalg.cython_blas', 'scipy.linalg.cython_lapack'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.py deleted file mode 100755 index b454cca..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.py +++ /dev/null @@ -1,64 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ----------------------------------------------------------------------------- - -import glob -import os -import sysconfig - -from PyInstaller.compat import is_win, is_linux -from PyInstaller.utils.hooks import ( - get_module_file_attribute, - check_requirement, - collect_delvewheel_libs_directory, - collect_submodules, -) - -binaries = [] -datas = [] - -# Package the DLL bundle that official scipy wheels for Windows ship The DLL bundle will either be in extra-dll on -# windows proper and in .libs if installed on a virtualenv created from MinGW (Git-Bash for example) -if is_win: - extra_dll_locations = ['extra-dll', '.libs'] - for location in extra_dll_locations: - dll_glob = os.path.join(os.path.dirname(get_module_file_attribute('scipy')), location, "*.dll") - if glob.glob(dll_glob): - binaries.append((dll_glob, ".")) - -# Handle delvewheel-enabled win32 wheels, which have external scipy.libs directory (scipy >= 0.9.2) -if check_requirement("scipy >= 1.9.2") and is_win: - datas, binaries = collect_delvewheel_libs_directory('scipy', datas=datas, binaries=binaries) - -# collect library-wide utility extension modules -hiddenimports = ['scipy._lib.%s' % m for m in ['messagestream', "_ccallback_c", "_fpumode"]] - -# In scipy 1.14.0, `scipy._lib.array_api_compat.numpy` added a programmatic import of its `.fft` submodule, which needs -# to be added to hiddenimports. -if check_requirement("scipy >= 1.14.0"): - hiddenimports += ['scipy._lib.array_api_compat.numpy.fft'] - -# If scipy is provided by Debian's python3-scipy, its scipy.__config__ submodule is renamed to a dynamically imported -# scipy.__config__${SOABI}__ -# https://salsa.debian.org/python-team/packages/scipy/-/blob/1255922cf7c52b05aa44fb733449953cd9adb815/debian/patches/scipy_config_SOABI.patch -if is_linux and "dist-packages" in get_module_file_attribute("scipy"): - hiddenimports.append('scipy.__config__' + sysconfig.get_config_var('SOABI') + '__') - -# The `scipy._lib.array_api_compat.numpy` module performs a `from numpy import *`; in numpy 2.0.0, `numpy.f2py` was -# added to `numpy.__all__` attribute, but at the same time, the upstream numpy hook adds `numpy.f2py` to -# `excludedimports`. Therefore, the `numpy.f2py` sub-package ends up missing. Due to the way exclusion mechanism works, -# we need to add both `numpy.f2py` and all its submodules to hiddenimports here. -if check_requirement("numpy >= 2.0.0"): - hiddenimports += collect_submodules('numpy.f2py', filter=lambda name: name != 'numpy.f2py.tests') - -# Starting with scipy 1.17.0, the `scipy._cyutility` extension is imported when top-level `scipy` package is imported -# (via import of another extension, `scipy._lib`). -if check_requirement("scipy >= 1.17.0"): - hiddenimports += ['scipy._cyutility'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.sparse.csgraph.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.sparse.csgraph.py deleted file mode 100755 index 9cabdbd..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.sparse.csgraph.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# The hidden import is necessary for SciPy 0.11+. -hiddenimports = ['scipy.sparse.csgraph._validation'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.spatial._ckdtree.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.spatial._ckdtree.py deleted file mode 100755 index 00d1a87..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.spatial._ckdtree.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import is_module_satisfies - -# As of SciPy 1.16.0, `scipy.spatial._ckdtree` extension started to depend on newly-introduced `scipy._cyutility`. -if is_module_satisfies('scipy >= 1.16.0'): - hiddenimports = ['scipy._cyutility'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.spatial.transform.rotation.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.spatial.transform.rotation.py deleted file mode 100755 index 4840cf2..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.spatial.transform.rotation.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import check_requirement - -# As of scipy 1.6.0, scipy.spatial.transform.rotation is cython-compiled, so we fail to automatically pick up its -# imports. -if check_requirement("scipy >= 1.6.0"): - hiddenimports = ['scipy.spatial.transform._rotation_groups'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.special._ellip_harm_2.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.special._ellip_harm_2.py deleted file mode 100755 index 5115b02..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.special._ellip_harm_2.py +++ /dev/null @@ -1,30 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Module hook for the `scipy.special._ellip_harm_2` C extension first introduced by SciPy >= 0.15.0. - -See Also ----------- -https://github.com/scipy/scipy/blob/master/scipy/special/_ellip_harm_2.pyx - This C extension's Cython-based implementation. -""" - -# In SciPy >= 0.15.0: -# -# 1. The "scipy.special.__init__" module imports... -# 2. The "scipy.special._ellip_harm" module imports... -# 3. The "scipy.special._ellip_harm_2" C extension imports... -# 4. The "scipy.integrate" package. -# -# The third import is undetectable by PyInstaller and hence explicitly listed. Since "_ellip_harm" and "_ellip_harm_2" -# were first introduced by SciPy 0.15.0, the following hidden import will only be applied for versions of SciPy -# guaranteed to provide these modules and C extensions. -hiddenimports = ['scipy.integrate'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.special._ufuncs.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.special._ufuncs.py deleted file mode 100755 index f94b22e..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.special._ufuncs.py +++ /dev/null @@ -1,25 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import is_module_satisfies - -# Module scipy.io._ufunc depends on some other C/C++ extensions. The hidden import is necessary for SciPy 0.13+. -# Thanks to dyadkin; see issue #826. -hiddenimports = ['scipy.special._ufuncs_cxx'] - -# SciPy 1.13.0 cythonized cdflib; this introduced new `scipy.special._cdflib` extension that is imported from the -# `scipy.special._ufuncs` extension, and thus we need a hidden import here. -if is_module_satisfies('scipy >= 1.13.0'): - hiddenimports += ['scipy.special._cdflib'] - -# SciPy 1.14.0 introduced `scipy.special._special_ufuncs`, which is imported from `scipy.special._ufuncs` extension. -if is_module_satisfies('scipy >= 1.14.0'): - hiddenimports += ['scipy.special._special_ufuncs'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scipy.stats._stats.py b/voxvera/vendor/PyInstaller/hooks/hook-scipy.stats._stats.py deleted file mode 100755 index e5f72a0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scipy.stats._stats.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import check_requirement - -if check_requirement("scipy >= 1.5.0"): - hiddenimports = ['scipy.special.cython_special'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-scrapy.py b/voxvera/vendor/PyInstaller/hooks/hook-scrapy.py deleted file mode 100755 index f110bb0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-scrapy.py +++ /dev/null @@ -1,18 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Hook for https://pypi.org/project/Scrapy/ -# https://stackoverflow.com/questions/49085970/no-such-file-or-directory-error-using-pyinstaller-and-scrapy - -from PyInstaller.utils.hooks import collect_data_files, collect_submodules - -datas = collect_data_files('scrapy') -hiddenimports = collect_submodules('scrapy') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-setuptools._vendor.importlib_metadata.py b/voxvera/vendor/PyInstaller/hooks/hook-setuptools._vendor.importlib_metadata.py deleted file mode 100755 index e7c92d0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-setuptools._vendor.importlib_metadata.py +++ /dev/null @@ -1,21 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import fnmatch -from PyInstaller.utils.hooks.setuptools import setuptools_info - -# Collect metadata for setuptools-vendored copy of importlib-metadata, to match the behavior of hook for -# stand-alone version of the package (i.e., `hook-importlib_metadata.py`). - -# Use cached data files list from setuptools_info, and extract relevant bits (to avoid having to call another -# `collect_data_files` and import `setuptools` in isolated process). -datas = [(src_name, dest_name) for src_name, dest_name in setuptools_info.vendored_data - if fnmatch.fnmatch(src_name, "**/setuptools/_vendor/importlib_metadata-*.dist-info/*")] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-setuptools._vendor.jaraco.text.py b/voxvera/vendor/PyInstaller/hooks/hook-setuptools._vendor.jaraco.text.py deleted file mode 100755 index 47e65da..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-setuptools._vendor.jaraco.text.py +++ /dev/null @@ -1,18 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import fnmatch -from PyInstaller.utils.hooks.setuptools import setuptools_info - -# Use cached data files list from setuptools_info, and extract relevant bits (to avoid having to call another -# `collect_data_files` and import `setuptools` in isolated process). -datas = [(src_name, dest_name) for src_name, dest_name in setuptools_info.vendored_data - if fnmatch.fnmatch(src_name, "**/setuptools/_vendor/jaraco/text/*")] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-setuptools.py b/voxvera/vendor/PyInstaller/hooks/hook-setuptools.py deleted file mode 100755 index 6c2c1bb..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-setuptools.py +++ /dev/null @@ -1,75 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat -from PyInstaller.utils.hooks.setuptools import setuptools_info - -datas = [] - -hiddenimports = [ - # Test case import/test_zipimport2 fails during importing pkg_resources or setuptools when module not present. - 'distutils.command.build_ext', - 'setuptools.msvc', -] - -# Necessary for setuptools on Mac/Unix -if compat.is_unix or compat.is_darwin: - hiddenimports.append('syslog') - -# Prevent the following modules from being collected solely due to reference from anywhere within setuptools (or -# its vendored dependencies). -excludedimports = [ - 'pytest', - 'numpy', # originally from hook-setuptools.msvc - 'docutils', # originally from hool-setuptools._distutils.command.check -] - -# setuptools >= 39.0.0 is "vendoring" its own direct dependencies from "_vendor" to "extern". This also requires -# 'pre_safe_import_module/hook-setuptools.extern.six.moves.py' to make the moves defined in 'setuptools._vendor.six' -# importable under 'setuptools.extern.six'. -# -# With setuptools 71.0.0, the vendored packages are exposed to the outside world by `setuptools._vendor` location being -# appended to `sys.path`, and the `VendorImporter` is gone (i.e., no more mapping to `setuptools.extern`). Since the -# vendored dependencies are now exposed as top-level modules (provided upstream versions are not available, as they -# would take precedence due to `sys.path` ordering), we need pre-safe-import-module hooks that detect when only vendored -# version is available, and add aliases to prevent duplicated collection. For list of vendored packages for which we -# need such pre-safe-import-module hooks, see the code in `PyInstaller.utils.hooks.setuptools`. -# -# The list of submodules from `setuptools._vendor` is now available in `setuptools_info.vendored_modules` (and covers -# all setuptools versions). -# -# NOTE: with setuptools >= 71.0, we do not need to add modules from `setuptools._vendored` to hidden imports anymore, -# because the aliases we set up should ensure that the necessary parts get collected. We still need them for earlier -# versions of setuptools, though. -if setuptools_info.version < (71, 0): - hiddenimports += setuptools_info.vendored_modules - -# The situation with vendored distutils (from `setuptools._distutils`) is a bit more complicated; python >= 3.12 does -# not provide stdlib version of `distutils` anymore, so our corresponding pre-safe-import-module hook sets up aliases. -# In earlier python versions, stdlib version is available as well, and at run-time, we might need both versions present, -# so that whichever is applicable can be used. Therefore, for python < 3.12, we need to add the vendored distuils -# modules to hidden imports. -if setuptools_info.distutils_vendored and not compat.is_py312: - hiddenimports += setuptools_info.distutils_modules - -# With setuptools >= 71.0.0, the vendored packages also have metadata, and might also contain data files that need to -# be collected. The list of corresponding data files is kept cached in `setuptools_info.vendored_data` (to minimize the -# number of times we need to call collect_data_files()). -# -# While it might be tempting to simply collect all data files and be done with it, we actually need to match the -# collection behavior for the stand-alone versions of these packages; i.e., we should collect metadata (and/or data -# files) for the vendored package only if the same data is also collected for stand-alone version. Otherwise, we risk -# inconsistent behavior and potential mismatches; for example, if we collected metadata for vendored package A here, -# but end up collecting stand-alone A, for which we normally do not collect the metadata, then at run-time, we will end -# up with stand-alone copy of A and vendored copy of its metadata being discoverable. -# -# Therefore, if metadata and/or metadata needs to be collected, do it in corresponding sub-package hook (for an example, -# see `hook-setuptools._vendor.jaraco.text.py`). diff --git a/voxvera/vendor/PyInstaller/hooks/hook-shelve.py b/voxvera/vendor/PyInstaller/hooks/hook-shelve.py deleted file mode 100755 index 1df601a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-shelve.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Tested on Windows 7 x64 With Python 3.5 - -hiddenimports = ["dbm.ndbm", "dbm.dumb", "dbm.gnu"] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-shiboken6.py b/voxvera/vendor/PyInstaller/hooks/hook-shiboken6.py deleted file mode 100755 index 17cf0c3..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-shiboken6.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat - -# Up until python 3.12, `xxsubtype` was built-in on all OSes. Now it is an extension on non-Windows, and without it, -# shiboken6 initialization segfaults. -if compat.is_py312 and not compat.is_win: - hiddenimports = ['xxsubtype'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-sphinx.py b/voxvera/vendor/PyInstaller/hooks/hook-sphinx.py deleted file mode 100755 index f5a13ac..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-sphinx.py +++ /dev/null @@ -1,41 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files, collect_submodules, eval_statement - -# Sphinx consists of several extensions that are lazily loaded. So collect all submodules to ensure we do not miss -# any of them. -hiddenimports = collect_submodules('sphinx') - -# For each extension in sphinx.application.builtin_extensions that does not come from the sphinx package, do a -# collect_submodules(). We need to do this explicitly because collect_submodules() does not seem to work with -# namespace packages, which precludes us from simply doing hiddenimports += collect_submodules('sphinxcontrib') -builtin_extensions = list( - eval_statement( - """ - from sphinx.application import builtin_extensions - print(builtin_extensions) - """ - ) -) -for extension in builtin_extensions: - if extension.startswith('sphinx.'): - continue # Already collected - hiddenimports += collect_submodules(extension) - -# This is inherited from an earlier version of the hook, and seems to have been required in Sphinx v.1.3.1 era due to -# https://github.com/sphinx-doc/sphinx/blob/b87ce32e7dc09773f9e71305e66e8d6aead53dd1/sphinx/cmdline.py#L173. -# It does not hurt to keep it around, just in case. -hiddenimports += ['locale'] - -# Collect all data files: *.html and *.conf files in ``sphinx.themes``, translation files in ``sphinx.locale``, etc. -# Also collect all data files for the alabaster theme. -datas = collect_data_files('sphinx') + collect_data_files('alabaster') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-sqlalchemy.py b/voxvera/vendor/PyInstaller/hooks/hook-sqlalchemy.py deleted file mode 100755 index 3aafc50..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-sqlalchemy.py +++ /dev/null @@ -1,88 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import re -import importlib.util - -from PyInstaller import isolated -from PyInstaller.lib.modulegraph.modulegraph import SourceModule -from PyInstaller.utils.hooks import check_requirement, collect_entry_point, logger - -datas = [] - -# 'sqlalchemy.testing' causes bundling a lot of unnecessary modules. -excludedimports = ['sqlalchemy.testing'] - -# Include most common database bindings some database bindings are detected and include some are not. We should -# explicitly include database backends. -hiddenimports = ['pysqlite2', 'MySQLdb', 'psycopg2', 'sqlalchemy.ext.baked'] - -if check_requirement('sqlalchemy >= 1.4'): - hiddenimports.append("sqlalchemy.sql.default_comparator") - - -@isolated.decorate -def _get_dialect_modules(module_name): - import importlib - module = importlib.import_module(module_name) - return [f"{module_name}.{submodule_name}" for submodule_name in module.__all__] - - -# In SQLAlchemy >= 0.6, the "sqlalchemy.dialects" package provides dialects. -# In SQLAlchemy <= 0.5, the "sqlalchemy.databases" package provides dialects. -if check_requirement('sqlalchemy >= 0.6'): - hiddenimports += _get_dialect_modules("sqlalchemy.dialects") -else: - hiddenimports += _get_dialect_modules("sqlalchemy.databases") - -# Collect additional dialects and plugins that are registered via entry-points, under assumption that they are available -# in the build environment for a reason (i.e., they are used). -for entry_point_name in ('sqlalchemy.dialects', 'sqlalchemy.plugins'): - ep_datas, ep_hiddenimports = collect_entry_point(entry_point_name) - datas += ep_datas - hiddenimports += ep_hiddenimports - - -def hook(hook_api): - """ - SQLAlchemy 0.9 introduced the decorator 'util.dependencies'. This decorator does imports. E.g.: - - @util.dependencies("sqlalchemy.sql.schema") - - This hook scans for included SQLAlchemy modules and then scans those modules for any util.dependencies and marks - those modules as hidden imports. - """ - - if not check_requirement('sqlalchemy >= 0.9'): - return - - # this parser is very simplistic but seems to catch all cases as of V1.1 - depend_regex = re.compile(r'@util.dependencies\([\'"](.*?)[\'"]\)') - - hidden_imports_set = set() - known_imports = set() - for node in hook_api.module_graph.iter_graph(start=hook_api.module): - if isinstance(node, SourceModule) and node.identifier.startswith('sqlalchemy.'): - known_imports.add(node.identifier) - - # Read the source... - with open(node.filename, 'rb') as f: - source_code = f.read() - source_code = importlib.util.decode_source(source_code) - - # ... and scan it - for match in depend_regex.findall(source_code): - hidden_imports_set.add(match) - - hidden_imports_set -= known_imports - if len(hidden_imports_set): - logger.info(" Found %d sqlalchemy hidden imports", len(hidden_imports_set)) - hook_api.add_imports(*list(hidden_imports_set)) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-sqlite3.py b/voxvera/vendor/PyInstaller/hooks/hook-sqlite3.py deleted file mode 100755 index 805bf8f..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-sqlite3.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_submodules - -hiddenimports = [] - -# On Windows in Python 3.4 'sqlite3' package might contain tests that are not required in frozen application. -for mod in collect_submodules('sqlite3'): - if not mod.startswith('sqlite3.test'): - hiddenimports.append(mod) diff --git a/voxvera/vendor/PyInstaller/hooks/hook-sysconfig.py b/voxvera/vendor/PyInstaller/hooks/hook-sysconfig.py deleted file mode 100755 index d4331cf..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-sysconfig.py +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -import sys - -# see https://github.com/python/cpython/blob/3.9/Lib/sysconfig.py#L593 -# This will exclude `_osx_support`, `distutils`, `distutils.log` for sys.platform != 'darwin' -if sys.platform != 'darwin': - excludedimports = ["_osx_support"] - -# Python 3.6 uses additional modules like `_sysconfigdata_m_linux_x86_64-linux-gnu`, see -# https://github.com/python/cpython/blob/3.6/Lib/sysconfig.py#L417 -# Note: Some versions of Anaconda backport this feature to before 3.6. See issue #3105. -# Note: on Windows, python.org and Anaconda python provide _get_sysconfigdata_name, but calling it fails due to sys -# module lacking abiflags attribute. It does work on MSYS2/MINGW python, where we need to collect corresponding file. -try: - import sysconfig - hiddenimports = [sysconfig._get_sysconfigdata_name()] -except AttributeError: - # Either sysconfig has no attribute _get_sysconfigdata_name (i.e., the function does not exist), or this is Windows - # and the _get_sysconfigdata_name() call failed due to missing sys.abiflags attribute. - pass diff --git a/voxvera/vendor/PyInstaller/hooks/hook-wcwidth.py b/voxvera/vendor/PyInstaller/hooks/hook-wcwidth.py deleted file mode 100755 index dc7c2dd..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-wcwidth.py +++ /dev/null @@ -1,14 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2017-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller.utils.hooks import collect_data_files - -datas = collect_data_files('wcwidth') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-win32ctypes.core.py b/voxvera/vendor/PyInstaller/hooks/hook-win32ctypes.core.py deleted file mode 100755 index 6971473..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-win32ctypes.core.py +++ /dev/null @@ -1,22 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2020-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# TODO: remove this hook during PyInstaller 4.5 release cycle! - -from PyInstaller.utils.hooks import can_import_module, collect_submodules - -# We need to collect submodules from win32ctypes.core.cffi or win32ctypes.core.ctypes for win32ctypes.core to work. -# Always collect the `ctypes` backend, and add the `cffi` one if `cffi` is available. Having the `ctypes` backend always -# available helps in situations when `cffi` is available in the build environment, but is disabled at run-time or not -# collected (e.g., due to `--exclude cffi`). -hiddenimports = collect_submodules('win32ctypes.core.ctypes') -if can_import_module('cffi'): - hiddenimports += collect_submodules('win32ctypes.core.cffi') diff --git a/voxvera/vendor/PyInstaller/hooks/hook-xml.dom.domreg.py b/voxvera/vendor/PyInstaller/hooks/hook-xml.dom.domreg.py deleted file mode 100755 index eb7161a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-xml.dom.domreg.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# xml.dom.domreg line 54 -hiddenimports = ['xml.dom.minidom'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-xml.etree.cElementTree.py b/voxvera/vendor/PyInstaller/hooks/hook-xml.etree.cElementTree.py deleted file mode 100755 index 95dc702..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-xml.etree.cElementTree.py +++ /dev/null @@ -1,13 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# cElementTree has a hidden import (Python >=2.5 stdlib version) -hiddenimports = ['xml.etree.ElementTree'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-xml.py b/voxvera/vendor/PyInstaller/hooks/hook-xml.py deleted file mode 100755 index d7776a0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-xml.py +++ /dev/null @@ -1,12 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -hiddenimports = ['xml.sax.xmlreader', 'xml.sax.expatreader'] diff --git a/voxvera/vendor/PyInstaller/hooks/hook-zope.interface.py b/voxvera/vendor/PyInstaller/hooks/hook-zope.interface.py deleted file mode 100755 index b43d023..0000000 --- a/voxvera/vendor/PyInstaller/hooks/hook-zope.interface.py +++ /dev/null @@ -1,12 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -excludedimports = ["unittest"] diff --git a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/__init__.py b/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-PyQt5.uic.port_v2.py b/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-PyQt5.uic.port_v2.py deleted file mode 100755 index 014c9e2..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-PyQt5.uic.port_v2.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_find_module_path(hook_api): - # Forbid imports in the port_v2 directory under Python 3 The code wouldn't import and would crash the build process. - hook_api.search_dirs = [] diff --git a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-_pyi_rth_utils.py b/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-_pyi_rth_utils.py deleted file mode 100755 index d035df0..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-_pyi_rth_utils.py +++ /dev/null @@ -1,25 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ----------------------------------------------------------------------------- -""" -This hook allows discovery and collection of PyInstaller's internal _pyi_rth_utils module that provides utility -functions for run-time hooks. - -The module is implemented in 'PyInstaller/fake-modules/_pyi_rth_utils.py'. -""" - -import os - -from PyInstaller import PACKAGEPATH - - -def pre_find_module_path(api): - module_dir = os.path.join(PACKAGEPATH, 'fake-modules') - api.search_dirs = [module_dir] diff --git a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-distutils.py b/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-distutils.py deleted file mode 100755 index 0e7e646..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-distutils.py +++ /dev/null @@ -1,46 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ----------------------------------------------------------------------------- -""" -`distutils`-specific pre-find module path hook. - -When run from within a virtual environment, this hook changes the `__path__` of the `distutils` package to -that of the system-wide rather than virtual-environment-specific `distutils` package. While the former is suitable for -freezing, the latter is intended for use _only_ from within virtual environments. - -NOTE: this behavior seems to be specific to virtual environments created by (an old?) version of `virtualenv`; it is not -applicable to virtual environments created by the `venv`. -""" - -import pathlib - -from PyInstaller.utils.hooks import logger, get_module_file_attribute - - -def pre_find_module_path(api): - # Absolute path of the system-wide "distutils" package when run from within a venv or None otherwise. - - # opcode is not a virtualenv module, so we can use it to find the stdlib. Technique taken from virtualenv's - # "distutils" package detection at - # https://github.com/pypa/virtualenv/blob/16.3.0/virtualenv_embedded/distutils-init.py#L5 - # As opcode is a module, stdlib path corresponds to the parent directory of its ``__file__`` attribute. - stdlib_path = pathlib.Path(get_module_file_attribute('opcode')).parent.resolve() - # As distutils is a package, we need to consider the grandparent directory of its ``__file__`` attribute. - distutils_path = pathlib.Path(get_module_file_attribute('distutils')).parent.parent.resolve() - - if distutils_path.name == 'setuptools': - logger.debug("distutils: provided by setuptools") - elif distutils_path == stdlib_path: - logger.debug("distutils: provided by stdlib") - else: - # Find this package in stdlib. - stdlib_path = str(stdlib_path) - logger.debug("distutils: virtualenv shim - retargeting to stdlib dir %r", stdlib_path) - api.search_dirs = [stdlib_path] diff --git a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-pyi_splash.py b/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-pyi_splash.py deleted file mode 100755 index 15f8009..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-pyi_splash.py +++ /dev/null @@ -1,36 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ----------------------------------------------------------------------------- -""" -This hook does not move a module that can be installed by a package manager, but points to a PyInstaller internal -module that can be imported into the users python instance. - -The module is implemented in 'PyInstaller/fake-modules/pyi_splash.py'. -""" - -import os - -from PyInstaller import PACKAGEPATH -from PyInstaller.utils.hooks import logger - - -def pre_find_module_path(api): - try: - # Test if a module named 'pyi_splash' is locally installed. This prevents that a potentially required dependency - # is not packed - import pyi_splash # noqa: F401 - except ImportError: - module_dir = os.path.join(PACKAGEPATH, 'fake-modules') - - api.search_dirs = [module_dir] - logger.info('Adding pyi_splash module to application dependencies.') - else: - logger.info('A local module named "pyi_splash" is installed. Use the installed one instead.') - return diff --git a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-tkinter.py b/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-tkinter.py deleted file mode 100755 index 1cc5a78..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_find_module_path/hook-tkinter.py +++ /dev/null @@ -1,21 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import log as logging -from PyInstaller.utils.hooks import tcl_tk - -logger = logging.getLogger(__name__) - - -def pre_find_module_path(hook_api): - if not tcl_tk.tcltk_info.available: - logger.warning("tkinter installation is broken. It will be excluded from the application") - hook_api.search_dirs = [] diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/__init__.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-autocommand.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-autocommand.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-autocommand.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-backports.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-backports.py deleted file mode 100755 index 3b6a8fc..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-backports.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This top-level namespace package might be provided by setuptools >= 71.0.0, which makes its vendored dependencies -# public by appending path to its `setuptools._vendored` directory to `sys.path`. The following shared -# pre-safe-import-module hook implementation checks whether this is the case, and, depending on situation, either -# sets up aliases to prevent duplicate collection, or extends the search paths. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module_for_top_level_namespace_packages \ - as pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-backports.tarfile.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-backports.tarfile.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-backports.tarfile.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-distutils.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-distutils.py deleted file mode 100755 index 7f88845..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-distutils.py +++ /dev/null @@ -1,23 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat -from PyInstaller.utils.hooks.setuptools import setuptools_info - - -def pre_safe_import_module(api): - # `distutils` was removed from from stdlib in python 3.12; if it is available, it is provided by `setuptools`. - # Therefore, we need to create package/module alias entries, which prevent the setuptools._distutils` and its - # submodules from being collected as top-level modules (as `distutils` and its submodules) in addition to being - # collected as their "true" names. - if compat.is_py312 and setuptools_info.distutils_vendored: - for aliased_name, real_vendored_name in setuptools_info.get_distutils_aliases(): - api.add_alias_module(real_vendored_name, aliased_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.overrides.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.overrides.py deleted file mode 100755 index c98573a..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.overrides.py +++ /dev/null @@ -1,26 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat -from PyInstaller.utils import hooks as hookutils - - -def pre_safe_import_module(api): - if compat.is_linux: - # See comment in the adjacent `hook-gi.py`. - try: - paths = hookutils.get_module_attribute(api.module_name, "__path__") - except Exception: - # Most likely `gi.overrides` cannot be imported. - paths = [] - - for path in paths: - api.append_package_path(path) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.py deleted file mode 100755 index 409007c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.py +++ /dev/null @@ -1,40 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2022-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import compat -from PyInstaller.utils import hooks as hookutils - - -def pre_safe_import_module(api): - if compat.is_linux: - # RHEL/Fedora RPM package for GObject introspection is known to split the `gi` package into two locations: - # - /usr/lib64/python3.x/site-packages/gi - # - /usr/lib/python3.x/site-packages/gi - # The `__init__.py` is located in the first directory, while `repository` and `overrides` are located in - # the second, and `__init__.py` dynamically extends the `__path__` during package import, using - # `__path__ = pkgutil.extend_path(__path__, __name__)`. - # The modulegraph has no way of knowing this, so we need extend the package path in this hook. Otherwise, - # only the first location is scanned, and the `gi.repository` ends up missing. - # - # ADDENDUM: it looks like the `gi.overrides` can also be split across both locations, so we need a similar - # hook for `gi.overrides` as well. - # - # NOTE: the `get_package_paths`/`get_package_all_paths` helpers read the paths from package's spec without - # importing the (top-level) package, so they do not catch run-time path modifications. Instead, we use - # `get_module_attribute` to import the package in isolated process and query its `__path__` attribute. - try: - paths = hookutils.get_module_attribute(api.module_name, "__path__") - except Exception: - # Most likely `gi` cannot be imported. - paths = [] - - for path in paths: - api.append_package_path(path) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Adw.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Adw.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Adw.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.AppIndicator3.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.AppIndicator3.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.AppIndicator3.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Atk.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Atk.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Atk.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.AyatanaAppIndicator3.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.AyatanaAppIndicator3.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.AyatanaAppIndicator3.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Champlain.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Champlain.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Champlain.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Clutter.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Clutter.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Clutter.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.DBus.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.DBus.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.DBus.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GIRepository.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GIRepository.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GIRepository.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GLib.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GLib.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GLib.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GModule.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GModule.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GModule.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GObject.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GObject.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GObject.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gdk.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gdk.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gdk.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GdkPixbuf.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GdkPixbuf.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GdkPixbuf.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gio.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gio.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gio.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Graphene.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Graphene.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Graphene.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gsk.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gsk.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gsk.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gst.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gst.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gst.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstAllocators.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstAllocators.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstAllocators.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstApp.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstApp.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstApp.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstAudio.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstAudio.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstAudio.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstBadAudio.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstBadAudio.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstBadAudio.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstBase.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstBase.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstBase.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstCheck.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstCheck.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstCheck.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstCodecs.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstCodecs.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstCodecs.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstController.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstController.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstController.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGL.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGL.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGL.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLEGL.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLEGL.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLEGL.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLWayland.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLWayland.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLWayland.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLX11.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLX11.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstGLX11.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstInsertBin.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstInsertBin.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstInsertBin.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstMpegts.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstMpegts.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstMpegts.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstNet.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstNet.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstNet.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPbutils.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPbutils.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPbutils.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPlay.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPlay.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPlay.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPlayer.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPlayer.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstPlayer.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtp.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtp.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtp.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtsp.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtsp.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtsp.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtspServer.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtspServer.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstRtspServer.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstSdp.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstSdp.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstSdp.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstTag.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstTag.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstTag.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstTranscoder.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstTranscoder.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstTranscoder.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVideo.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVideo.py deleted file mode 100755 index e75bfee..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVideo.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert - # them to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkan.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkan.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkan.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkanWayland.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkanWayland.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkanWayland.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkanXCB.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkanXCB.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstVulkanXCB.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstWebRTC.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstWebRTC.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GstWebRTC.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gtk.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gtk.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gtk.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkChamplain.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkChamplain.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkChamplain.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkClutter.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkClutter.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkClutter.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkSource.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkSource.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkSource.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkosxApplication.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkosxApplication.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GtkosxApplication.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.HarfBuzz.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.HarfBuzz.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.HarfBuzz.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.OsmGpsMap.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.OsmGpsMap.py deleted file mode 100755 index cb80208..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.OsmGpsMap.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Pango.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Pango.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Pango.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.PangoCairo.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.PangoCairo.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.PangoCairo.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Rsvg.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Rsvg.py deleted file mode 100755 index a9978ab..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Rsvg.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.cairo.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.cairo.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.cairo.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.freetype2.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.freetype2.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.freetype2.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.xlib.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.xlib.py deleted file mode 100755 index 131ce95..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.xlib.py +++ /dev/null @@ -1,16 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -def pre_safe_import_module(api): - # PyGObject modules loaded through the gi repository are marked as MissingModules by modulegraph, so we convert them - # to RuntimeModules in order for their hooks to be loaded and executed. - api.add_runtime_module(api.module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-importlib_metadata.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-importlib_metadata.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-importlib_metadata.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-importlib_resources.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-importlib_resources.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-importlib_resources.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-inflect.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-inflect.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-inflect.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.context.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.context.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.context.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.functools.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.functools.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.functools.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.py deleted file mode 100755 index 3b6a8fc..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2025, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This top-level namespace package might be provided by setuptools >= 71.0.0, which makes its vendored dependencies -# public by appending path to its `setuptools._vendored` directory to `sys.path`. The following shared -# pre-safe-import-module hook implementation checks whether this is the case, and, depending on situation, either -# sets up aliases to prevent duplicate collection, or extends the search paths. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module_for_top_level_namespace_packages \ - as pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.text.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.text.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-jaraco.text.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-more_itertools.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-more_itertools.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-more_itertools.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-ordered_set.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-ordered_set.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-ordered_set.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-packaging.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-packaging.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-packaging.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-platformdirs.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-platformdirs.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-platformdirs.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-setuptools.extern.six.moves.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-setuptools.extern.six.moves.py deleted file mode 100755 index 5a09a89..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-setuptools.extern.six.moves.py +++ /dev/null @@ -1,39 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import isolated - -# This is basically a copy of pre_safe_import_module/hook-six.moves.py adopted to setuptools.extern.six resp. -# setuptools._vendor.six. Please see pre_safe_import_module/hook-six.moves.py for documentation. - -# Note that the moves are defined in 'setuptools._vendor.six' but are imported under 'setuptools.extern.six'. - - -def pre_safe_import_module(api): - @isolated.call - def real_to_six_module_name(): - try: - import setuptools._vendor.six as six - except ImportError: - try: - import setuptools.extern.six as six - except ImportError: - return None # unavailable - - return { - moved.mod: 'setuptools.extern.six.moves.' + moved.name - for moved in six._moved_attributes if isinstance(moved, (six.MovedModule, six.MovedAttribute)) - } - - if real_to_six_module_name is not None: - api.add_runtime_package(api.module_name) - for real_module_name, six_module_name in real_to_six_module_name.items(): - api.add_alias_module(real_module_name, six_module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-six.moves.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-six.moves.py deleted file mode 100755 index 1c86669..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-six.moves.py +++ /dev/null @@ -1,62 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import isolated - - -def pre_safe_import_module(api): - """ - Add the `six.moves` module as a dynamically defined runtime module node and all modules mapped by - `six._SixMetaPathImporter` as aliased module nodes to the passed graph. - - The `six.moves` module is dynamically defined at runtime by the `six` module and hence cannot be imported in the - standard way. Instead, this hook adds a placeholder node for the `six.moves` module to the graph, - which implicitly adds an edge from that node to the node for its parent `six` module. This ensures that the `six` - module will be frozen into the executable. (Phew!) - - `six._SixMetaPathImporter` is a PEP 302-compliant module importer converting imports independent of the current - Python version into imports specific to that version (e.g., under Python 3, from `from six.moves import - tkinter_tix` to `import tkinter.tix`). For each such mapping, this hook adds a corresponding module alias to the - graph allowing PyInstaller to translate the former to the latter. - """ - @isolated.call - def real_to_six_module_name(): - """ - Generate a dictionary from conventional module names to "six.moves" attribute names (e.g., from `tkinter.tix` to - `six.moves.tkinter_tix`). - """ - try: - import six - except ImportError: - return None # unavailable - - # Iterate over the "six._moved_attributes" list rather than the "six._importer.known_modules" dictionary, as - # "urllib"-specific moved modules are overwritten in the latter with unhelpful "LazyModule" objects. If this is - # a moved module or attribute, map the corresponding module. In the case of moved attributes, the attribute's - # module is mapped while the attribute itself is mapped at runtime and hence ignored here. - return { - moved.mod: 'six.moves.' + moved.name - for moved in six._moved_attributes if isinstance(moved, (six.MovedModule, six.MovedAttribute)) - } - - # Add "six.moves" as a runtime package rather than module. Modules cannot physically contain submodules; only - # packages can. In "from"-style import statements (e.g., "from six.moves import queue"), this implies that: - # * Attributes imported from customary modules are guaranteed *NOT* to be submodules. Hence, ModuleGraph justifiably - # ignores these attributes. While some attributes declared by "six.moves" are ignorable non-modules (e.g., - # functions, classes), others are non-ignorable submodules that must be imported. Adding "six.moves" as a runtime - # module causes ModuleGraph to ignore these submodules, which defeats the entire point. - # * Attributes imported from packages could be submodules. To disambiguate non-ignorable submodules from ignorable - # non-submodules (e.g., classes, variables), ModuleGraph first attempts to import these attributes as submodules. - # This is exactly what we want. - if real_to_six_module_name is not None: - api.add_runtime_package(api.module_name) - for real_module_name, six_module_name in real_to_six_module_name.items(): - api.add_alias_module(real_module_name, six_module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-tomli.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-tomli.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-tomli.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-typeguard.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-typeguard.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-typeguard.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-typing_extensions.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-typing_extensions.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-typing_extensions.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-urllib3.packages.six.moves.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-urllib3.packages.six.moves.py deleted file mode 100755 index d257f83..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-urllib3.packages.six.moves.py +++ /dev/null @@ -1,34 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from PyInstaller import isolated - -# This basically is a copy of pre_safe_import_module/hook-six.moves.py adopted to urllib3.packages.six. Please see -# pre_safe_import_module/hook-six.moves.py for documentation. - - -def pre_safe_import_module(api): - @isolated.call - def real_to_six_module_name(): - try: - import urllib3.packages.six as six - except ImportError: - return None # unavailable - - return { - moved.mod: 'urllib3.packages.six.moves.' + moved.name - for moved in six._moved_attributes if isinstance(moved, (six.MovedModule, six.MovedAttribute)) - } - - if real_to_six_module_name is not None: - api.add_runtime_package(api.module_name) - for real_module_name, six_module_name in real_to_six_module_name.items(): - api.add_alias_module(real_module_name, six_module_name) diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-wheel.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-wheel.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-wheel.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-zipp.py b/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-zipp.py deleted file mode 100755 index 83c7249..0000000 --- a/voxvera/vendor/PyInstaller/hooks/pre_safe_import_module/hook-zipp.py +++ /dev/null @@ -1,15 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# This package/module might be provided by setuptools >= 71.0.0, which makes its vendored dependencies public by -# appending path to its `setuptools._vendored` directory to `sys.path`. The following shared pre-safe-import-module -# hook implementation checks whether this is the case, and sets up aliases to prevent duplicate collection. -from PyInstaller.utils.hooks.setuptools import pre_safe_import_module # noqa: F401 diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks.dat b/voxvera/vendor/PyInstaller/hooks/rthooks.dat deleted file mode 100755 index c024452..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks.dat +++ /dev/null @@ -1,23 +0,0 @@ -{ - 'django': ['pyi_rth_django.py'], - 'gi': ['pyi_rth_gi.py'], - 'gi.repository.Gio': ['pyi_rth_gio.py'], - 'gi.repository.GLib': ['pyi_rth_glib.py'], - 'gi.repository.GdkPixbuf': ['pyi_rth_gdkpixbuf.py'], - 'gi.repository.Gtk': ['pyi_rth_gtk.py'], - 'gi.repository.Gst': ['pyi_rth_gstreamer.py'], - 'gst': ['pyi_rth_gstreamer.py'], - 'inspect': ['pyi_rth_inspect.py'], - 'kivy': ['pyi_rth_kivy.py'], - 'kivy.lib.gstplayer': ['pyi_rth_gstreamer.py'], - 'matplotlib': ['pyi_rth_mplconfig.py'], - 'pkgutil': ['pyi_rth_pkgutil.py'], - 'pkg_resources': ['pyi_rth_pkgres.py'], - 'PyQt5': ['pyi_rth_pyqt5.py'], - 'PyQt6': ['pyi_rth_pyqt6.py'], - 'PySide2': ['pyi_rth_pyside2.py'], - 'PySide6': ['pyi_rth_pyside6.py'], - '_tkinter': ['pyi_rth__tkinter.py'], - 'multiprocessing': ['pyi_rth_multiprocessing.py'], - 'setuptools': ['pyi_rth_setuptools.py'], -} diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/__init__.py b/voxvera/vendor/PyInstaller/hooks/rthooks/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth__tkinter.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth__tkinter.py deleted file mode 100755 index ae154f8..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth__tkinter.py +++ /dev/null @@ -1,37 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import os - import sys - - # The directory names must match TCL_ROOTNAME and TK_ROOTNAME constants defined in `PyInstaller.utils.hooks.tcl_tk`. - tcldir = os.path.join(sys._MEIPASS, '_tcl_data') - tkdir = os.path.join(sys._MEIPASS, '_tk_data') - - # Notify "tkinter" of data directories. On macOS, we do not collect data directories if system Tcl/Tk framework is - # used. On other OSes, we always collect them, so their absence is considered an error. - is_darwin = sys.platform == 'darwin' - - if os.path.isdir(tcldir): - os.environ["TCL_LIBRARY"] = tcldir - elif not is_darwin: - raise FileNotFoundError('Tcl data directory "%s" not found.' % tcldir) - - if os.path.isdir(tkdir): - os.environ["TK_LIBRARY"] = tkdir - elif not is_darwin: - raise FileNotFoundError('Tk data directory "%s" not found.' % tkdir) - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_django.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_django.py deleted file mode 100755 index 81243bd..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_django.py +++ /dev/null @@ -1,34 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, 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 -#----------------------------------------------------------------------------- - -# This Django rthook was tested with Django 1.8.3. - - -def _pyi_rthook(): - import django.utils.autoreload - - _old_restart_with_reloader = django.utils.autoreload.restart_with_reloader - - def _restart_with_reloader(*args): - import sys - a0 = sys.argv.pop(0) - try: - return _old_restart_with_reloader(*args) - finally: - sys.argv.insert(0, a0) - - # Override restart_with_reloader() function, otherwise the app might complain that some commands do not exist; - # e.g., runserver. - django.utils.autoreload.restart_with_reloader = _restart_with_reloader - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gdkpixbuf.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gdkpixbuf.py deleted file mode 100755 index de8223f..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gdkpixbuf.py +++ /dev/null @@ -1,41 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import atexit - import os - import sys - import tempfile - - pixbuf_file = os.path.join(sys._MEIPASS, 'lib', 'gdk-pixbuf', 'loaders.cache') - - # If we are not on Windows, we need to rewrite the cache -> we rewrite on macOS to support --onefile mode - if os.path.exists(pixbuf_file) and sys.platform != 'win32': - with open(pixbuf_file, 'rb') as fp: - contents = fp.read() - - # Create a temporary file with the cache and cleverly replace the prefix we injected with the actual path. - fd, pixbuf_file = tempfile.mkstemp() - with os.fdopen(fd, 'wb') as fp: - libpath = os.path.join(sys._MEIPASS, 'lib').encode('utf-8') - fp.write(contents.replace(b'@executable_path/lib', libpath)) - - try: - atexit.register(os.unlink, pixbuf_file) - except OSError: - pass - - os.environ['GDK_PIXBUF_MODULE_FILE'] = pixbuf_file - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gi.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gi.py deleted file mode 100755 index 3c3b382..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gi.py +++ /dev/null @@ -1,21 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import os - import sys - - os.environ['GI_TYPELIB_PATH'] = os.path.join(sys._MEIPASS, 'gi_typelibs') - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gio.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gio.py deleted file mode 100755 index f9fc307..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gio.py +++ /dev/null @@ -1,21 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import os - import sys - - os.environ['GIO_MODULE_DIR'] = os.path.join(sys._MEIPASS, 'gio_modules') - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_glib.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_glib.py deleted file mode 100755 index 35bd7f8..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_glib.py +++ /dev/null @@ -1,37 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import os - import sys - - # Prepend the frozen application's data dir to XDG_DATA_DIRS. We need to avoid overwriting the existing paths in - # order to allow the frozen application to run system-installed applications (for example, launch a web browser via - # the webbrowser module on Linux). Should the user desire complete isolation of the frozen application from the - # system, they need to clean up XDG_DATA_DIRS at the start of their program (i.e., remove all entries but first). - pyi_data_dir = os.path.join(sys._MEIPASS, 'share') - - xdg_data_dirs = os.environ.get('XDG_DATA_DIRS', None) - if xdg_data_dirs: - if pyi_data_dir not in xdg_data_dirs: - xdg_data_dirs = pyi_data_dir + os.pathsep + xdg_data_dirs - else: - xdg_data_dirs = pyi_data_dir - os.environ['XDG_DATA_DIRS'] = xdg_data_dirs - - # Cleanup aux variables - del xdg_data_dirs - del pyi_data_dir - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gstreamer.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gstreamer.py deleted file mode 100755 index 5663229..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gstreamer.py +++ /dev/null @@ -1,32 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import os - import sys - - # Without this environment variable set to 'no' importing 'gst' causes 100% CPU load. (Tested on macOS.) - os.environ['GST_REGISTRY_FORK'] = 'no' - - gst_plugin_paths = [sys._MEIPASS, os.path.join(sys._MEIPASS, 'gst-plugins')] - os.environ['GST_PLUGIN_PATH'] = os.pathsep.join(gst_plugin_paths) - - # Prevent permission issues on Windows - os.environ['GST_REGISTRY'] = os.path.join(sys._MEIPASS, 'registry.bin') - - # Only use packaged plugins to prevent GStreamer from crashing when it finds plugins from another version which are - # installed system wide. - os.environ['GST_PLUGIN_SYSTEM_PATH'] = '' - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gtk.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gtk.py deleted file mode 100755 index d6ae21c..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_gtk.py +++ /dev/null @@ -1,27 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import os - import sys - - os.environ['GTK_DATA_PREFIX'] = sys._MEIPASS - os.environ['GTK_EXE_PREFIX'] = sys._MEIPASS - os.environ['GTK_PATH'] = sys._MEIPASS - - # Include these here, as GTK will import pango automatically. - os.environ['PANGO_LIBDIR'] = sys._MEIPASS - os.environ['PANGO_SYSCONFDIR'] = os.path.join(sys._MEIPASS, 'etc') # TODO? - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_inspect.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_inspect.py deleted file mode 100755 index 2575997..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_inspect.py +++ /dev/null @@ -1,99 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import inspect - import os - import sys - import zipfile - - # Use sys._MEIPASS with normalized path component separator. This is necessary on some platforms (i.e., msys2/mingw - # python on Windows), because we use string comparisons on the paths. - SYS_PREFIX = os.path.normpath(sys._MEIPASS) - BASE_LIBRARY = os.path.join(SYS_PREFIX, "base_library.zip") - - # Obtain the list of modules in base_library.zip, so we can use it in our `_pyi_getsourcefile` implementation. - def _get_base_library_files(filename): - # base_library.zip might not exit - if not os.path.isfile(filename): - return set() - - with zipfile.ZipFile(filename, 'r') as zf: - namelist = zf.namelist() - - return set(os.path.normpath(entry) for entry in namelist) - - base_library_files = _get_base_library_files(BASE_LIBRARY) - - # Provide custom implementation of inspect.getsourcefile() for frozen applications that properly resolves relative - # filenames obtained from object (e.g., inspect stack-frames). See #5963. - # - # Although we are overriding `inspect.getsourcefile` function, we are NOT trying to resolve source file here! - # The main purpose of this implementation is to properly resolve relative file names obtained from `co_filename` - # attribute of code objects (which are, in turn, obtained from in turn are obtained from `frame` and `traceback` - # objects). PyInstaller strips absolute paths from `co_filename` when collecting modules, as the original absolute - # paths are not portable/relocatable anyway. The `inspect` module tries to look up the module that corresponds to - # the code object by comparing modules' `__file__` attribute to the value of `co_filename`. Therefore, our override - # needs to resolve the relative file names (usually having a .py suffix) into absolute module names (which, in the - # frozen application, usually have .pyc suffix). - # - # The `inspect` module retrieves the actual source code using `linecache.getlines()`. If the passed source filename - # does not exist, the underlying implementation end up resolving the module, and obtains the source via loader's - # `get_source` method. So for modules in the PYZ archive, it ends up calling `get_source` implementation on our - # `PyiFrozenLoader`. For modules in `base_library.zip`, it ends up calling `get_source` on python's own - # `zipimport.zipimporter`; to properly handle out-of-zip source files, we therefore need to monkey-patch - # `get_source` with our own override that translates the in-zip .pyc filename into out-of-zip .py file location - # and loads the source (this override is done in `pyimod02_importers` module). - # - # The above-described fallback takes place if the .pyc file does not exist on filesystem - if this ever becomes - # a problem, we could consider monkey-patching `linecache.updatecache` (and possibly `checkcache`) to translate - # .pyc paths in `sys._MEIPASS` and `base_library.zip` into .py paths in `sys._MEIPASS` before calling the original - # implementation. - _orig_inspect_getsourcefile = inspect.getsourcefile - - def _pyi_getsourcefile(object): - filename = inspect.getfile(object) - filename = os.path.normpath(filename) # Ensure path component separators are normalized. - if not os.path.isabs(filename): - # Check if given filename matches the basename of __main__'s __file__. - main_file = getattr(sys.modules['__main__'], '__file__', None) - if main_file and filename == os.path.basename(main_file): - return main_file - - # If the relative filename does not correspond to the frozen entry-point script, convert it to the absolute - # path in either `sys._MEIPASS/base_library.zip` or `sys._MEIPASS`, whichever applicable. - # - # The modules in `sys._MEIPASS/base_library.zip` are handled by python's `zipimport.zipimporter`, and have - # their __file__ attribute point to the .pyc file in the archive. So we match the behavior, in order to - # facilitate matching via __file__ attribute and use of loader's `get_source`, as per the earlier comment - # block. - # - # The modules in PYZ archive are handled by our `PyFrozenLoader`, which now sets the module's __file__ - # attribute to point to where .py files would be. Therefore, we can directly merge SYS_PREFIX and filename - # (and if the source .py file exists, it will be loaded directly from filename, without the intermediate - # loader look-up). - pyc_filename = filename + 'c' - if pyc_filename in base_library_files: - return os.path.normpath(os.path.join(BASE_LIBRARY, pyc_filename)) - return os.path.normpath(os.path.join(SYS_PREFIX, filename)) - elif filename.startswith(SYS_PREFIX): - # If filename is already an absolute file path pointing into application's top-level directory, return it - # as-is and prevent any further processing. - return filename - # Use original implementation as a fallback. - return _orig_inspect_getsourcefile(object) - - inspect.getsourcefile = _pyi_getsourcefile - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_kivy.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_kivy.py deleted file mode 100755 index 0846401..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_kivy.py +++ /dev/null @@ -1,24 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2015-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import os - import sys - - root = os.path.join(sys._MEIPASS, 'kivy_install') - - os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data') - os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules') - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_mplconfig.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_mplconfig.py deleted file mode 100755 index 93fec80..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_mplconfig.py +++ /dev/null @@ -1,46 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, 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 -#----------------------------------------------------------------------------- - -# matplotlib will create $HOME/.matplotlib folder in user's home directory. In this directory there is fontList.cache -# file which lists paths to matplotlib fonts. -# -# When you run your onefile exe for the first time it's extracted to for example "_MEIxxxxx" temp directory and -# fontList.cache file is created with fonts paths pointing to this directory. -# -# Second time you run your exe new directory is created "_MEIyyyyy" but fontList.cache file still points to previous -# directory which was deleted. And then you will get error like: -# -# RuntimeError: Could not open facefile -# -# We need to force matplotlib to recreate config directory every time you run your app. - - -def _pyi_rthook(): - import atexit - import os - import shutil - - import _pyi_rth_utils.tempfile # PyInstaller's run-time hook utilities module - - # Isolate matplotlib's config dir into temporary directory. - # Use our replacement for `tempfile.mkdtemp` function that properly restricts access to directory on all platforms. - configdir = _pyi_rth_utils.tempfile.secure_mkdtemp() - os.environ['MPLCONFIGDIR'] = configdir - - try: - # Remove temp directory at application exit and ignore any errors. - atexit.register(shutil.rmtree, configdir, ignore_errors=True) - except OSError: - pass - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py deleted file mode 100755 index f596d93..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py +++ /dev/null @@ -1,55 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2017-2023, 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 -#----------------------------------------------------------------------------- - - -def _pyi_rthook(): - import sys - - import multiprocessing - import multiprocessing.spawn - - from subprocess import _args_from_interpreter_flags - - # Prevent `spawn` from trying to read `__main__` in from the main script - multiprocessing.process.ORIGINAL_DIR = None - - def _freeze_support(): - # We want to catch the two processes that are spawned by the multiprocessing code: - # - the semaphore tracker, which cleans up named semaphores in the `spawn` multiprocessing mode - # - the fork server, which keeps track of worker processes in the `forkserver` mode. - # Both of these processes are started by spawning a new copy of the running executable, passing it the flags - # from `_args_from_interpreter_flags` and then "-c" and an import statement. - # Look for those flags and the import statement, then `exec()` the code ourselves. - - if ( - len(sys.argv) >= 2 and sys.argv[-2] == '-c' and sys.argv[-1].startswith( - ('from multiprocessing.resource_tracker import main', 'from multiprocessing.forkserver import main') - ) and set(sys.argv[1:-2]) == set(_args_from_interpreter_flags()) - ): - exec(sys.argv[-1]) - sys.exit() - - if multiprocessing.spawn.is_forking(sys.argv): - kwds = {} - for arg in sys.argv[2:]: - name, value = arg.split('=') - if value == 'None': - kwds[name] = None - else: - kwds[name] = int(value) - multiprocessing.spawn.spawn_main(**kwds) - sys.exit() - - multiprocessing.freeze_support = multiprocessing.spawn.freeze_support = _freeze_support - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pkgres.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pkgres.py deleted file mode 100755 index fe59194..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pkgres.py +++ /dev/null @@ -1,178 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, 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 -#----------------------------------------------------------------------------- - -# To make pkg_resources work with frozen modules, we need to set the 'Provider' class for PyiFrozenLoader. -# This class decides where to look for resources and other stuff. -# -# 'pkg_resources.NullProvider' is dedicated to abitrary PEP302 loaders, such as our PyiFrozenLoader. It uses method -# __loader__.get_data() in methods pkg_resources.resource_string() and pkg_resources.resource_stream(). -# -# We provide PyiFrozenProvider, which subclasses the NullProvider and implements _has(), _isdir(), and _listdir() -# methods, which are needed for pkg_resources.resource_exists(), resource_isdir(), and resource_listdir() to work. We -# cannot use the DefaultProvider, because it provides filesystem-only implementations (and overrides _get() with a -# filesystem-only one), whereas our provider needs to also support embedded resources. -# -# The PyiFrozenProvider allows querying/listing both PYZ-embedded and on-filesystem resources in a frozen package. The -# results are typically combined for both types of resources (e.g., when listing a directory or checking whether a -# resource exists). When the order of precedence matters, the PYZ-embedded resources take precedence over the -# on-filesystem ones, to keep the behavior consistent with the actual file content retrieval via _get() method (which in -# turn uses PyiFrozenLoader's get_data() method). For example, when checking whether a resource is a directory via -# _isdir(), a PYZ-embedded file will take precedence over a potential on-filesystem directory. Also, in contrast to -# unfrozen packages, the frozen ones do not contain source .py files, which are therefore absent from content listings. - - -def _pyi_rthook(): - import os - import pathlib - import sys - import warnings - - with warnings.catch_warnings(): - warnings.filterwarnings( - "ignore", - category=UserWarning, - message="pkg_resources is deprecated", - ) - import pkg_resources - - import pyimod02_importers # PyInstaller's bootstrap module - - SYS_PREFIX = pathlib.PurePath(sys._MEIPASS) - - class _TocFilesystem: - """ - A prefix tree implementation for embedded filesystem reconstruction. - - NOTE: as of PyInstaller 6.0, the embedded PYZ archive cannot contain data files anymore. Instead, it contains - only .pyc modules - which are by design not returned by `PyiFrozenProvider`. So this implementation has been - reduced to supporting only directories implied by collected packages. - """ - def __init__(self, tree_node): - self._tree = tree_node - - def _get_tree_node(self, path): - path = pathlib.PurePath(path) - current = self._tree - for component in path.parts: - if component not in current: - return None - current = current[component] - return current - - def path_exists(self, path): - node = self._get_tree_node(path) - return isinstance(node, dict) # Directory only - - def path_isdir(self, path): - node = self._get_tree_node(path) - return isinstance(node, dict) # Directory only - - def path_listdir(self, path): - node = self._get_tree_node(path) - if not isinstance(node, dict): - return [] # Non-existent or file - # Return only sub-directories - return [entry_name for entry_name, entry_data in node.items() if isinstance(entry_data, dict)] - - class PyiFrozenProvider(pkg_resources.NullProvider): - """ - Custom pkg_resources provider for PyiFrozenLoader. - """ - def __init__(self, module): - super().__init__(module) - - # Get top-level path; if "module" corresponds to a package, we need the path to the package itself. - # If "module" is a submodule in a package, we need the path to the parent package. - # - # This is equivalent to `pkg_resources.NullProvider.module_path`, except we construct a `pathlib.PurePath` - # for easier manipulation. - # - # NOTE: the path is NOT resolved for symbolic links, as neither are paths that are passed by `pkg_resources` - # to `_has`, `_isdir`, `_listdir` (they are all anchored to `module_path`, which in turn is just - # `os.path.dirname(module.__file__)`. As `__file__` returned by `PyiFrozenLoader` is always anchored to - # `sys._MEIPASS`, we do not have to worry about cross-linked directories in macOS .app bundles, where the - # resolved `__file__` could be either in the `Contents/Frameworks` directory (the "true" `sys._MEIPASS`), or - # in the `Contents/Resources` directory due to cross-linking. - self._pkg_path = pathlib.PurePath(module.__file__).parent - - # Construct _TocFilesystem on top of pre-computed prefix tree provided by pyimod02_importers. - self.embedded_tree = _TocFilesystem(pyimod02_importers.get_pyz_toc_tree()) - - def _normalize_path(self, path): - # Avoid using `Path.resolve`, because it resolves symlinks. This is undesirable, because the pure path in - # `self._pkg_path` does not have symlinks resolved, so comparison between the two would be faulty. Instead, - # use `os.path.normpath` to normalize the path and get rid of any '..' elements (the path itself should - # already be absolute). - return pathlib.Path(os.path.normpath(path)) - - def _is_relative_to_package(self, path): - return path == self._pkg_path or self._pkg_path in path.parents - - def _has(self, path): - # Prevent access outside the package. - path = self._normalize_path(path) - if not self._is_relative_to_package(path): - return False - - # Check the filesystem first to avoid unnecessarily computing the relative path... - if path.exists(): - return True - rel_path = path.relative_to(SYS_PREFIX) - return self.embedded_tree.path_exists(rel_path) - - def _isdir(self, path): - # Prevent access outside the package. - path = self._normalize_path(path) - if not self._is_relative_to_package(path): - return False - - # Embedded resources have precedence over filesystem... - rel_path = path.relative_to(SYS_PREFIX) - node = self.embedded_tree._get_tree_node(rel_path) - if node is None: - return path.is_dir() # No match found; try the filesystem. - else: - # str = file, dict = directory - return not isinstance(node, str) - - def _listdir(self, path): - # Prevent access outside the package. - path = self._normalize_path(path) - if not self._is_relative_to_package(path): - return [] - - # Relative path for searching embedded resources. - rel_path = path.relative_to(SYS_PREFIX) - # List content from embedded filesystem... - content = self.embedded_tree.path_listdir(rel_path) - # ... as well as the actual one. - if path.is_dir(): - # Use os.listdir() to avoid having to convert Path objects to strings... Also make sure to de-duplicate - # the results. - path = str(path) # not is_py36 - content = list(set(content + os.listdir(path))) - return content - - pkg_resources.register_loader_type(pyimod02_importers.PyiFrozenLoader, PyiFrozenProvider) - - # With our PyiFrozenFinder now being a path entry finder, it effectively replaces python's FileFinder. So we need - # to register it with `pkg_resources.find_on_path` to allow metadata to be found on filesystem. - pkg_resources.register_finder(pyimod02_importers.PyiFrozenFinder, pkg_resources.find_on_path) - - # For the above change to fully take effect, we need to re-initialize pkg_resources's master working set (since the - # original one was built with assumption that sys.path entries are handled by python's FileFinder). - # See https://github.com/pypa/setuptools/issues/373 - if hasattr(pkg_resources, '_initialize_master_working_set'): - pkg_resources._initialize_master_working_set() - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pkgutil.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pkgutil.py deleted file mode 100755 index e619d54..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pkgutil.py +++ /dev/null @@ -1,64 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, 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 -#----------------------------------------------------------------------------- -# -# The run-time hook provides a custom module iteration function for our PyiFrozenFinder, which allows -# `pkgutil.iter_modules()` to return entries for modules that are embedded in the PYZ archive. The non-embedded modules -# (binary extensions, modules collected as only source .py files, etc.) are enumerated using the `fallback_finder` -# provided by `PyiFrozenFinder` (which typically would be the python's `FileFinder`). -def _pyi_rthook(): - import pkgutil - - import pyimod02_importers # PyInstaller's bootstrap module - - # This could, in fact, be implemented as `iter_modules()` method of the `PyiFrozenFinder`. However, we want to - # avoid importing `pkgutil` in that bootstrap module (i.e., for the `pkgutil.iter_importer_modules()` call on the - # fallback finder). - def _iter_pyi_frozen_finder_modules(finder, prefix=''): - # Fetch PYZ TOC tree from pyimod02_importers - pyz_toc_tree = pyimod02_importers.get_pyz_toc_tree() - - # Finder has already pre-computed the package prefix implied by the search path. Use it to find the starting - # node in the prefix tree. - if finder._pyz_entry_prefix: - pkg_name_parts = finder._pyz_entry_prefix.split('.') - else: - pkg_name_parts = [] - - tree_node = pyz_toc_tree - for pkg_name_part in pkg_name_parts: - tree_node = tree_node.get(pkg_name_part) - if not isinstance(tree_node, dict): - # This check handles two cases: - # a) path does not exist (`tree_node` is `None`) - # b) path corresponds to a module instead of a package (`tree_node` is a leaf node (`str`)). - tree_node = {} - break - - # Dump the contents of the tree node. - for entry_name, entry_data in tree_node.items(): - is_pkg = isinstance(entry_data, dict) - yield prefix + entry_name, is_pkg - - # If our finder has a fall-back finder available, iterate its modules as well. By using the public - # `fallback_finder` attribute, we force creation of the fallback finder as necessary. - # NOTE: we do not care about potential duplicates here, because `pkgutil.iter_modules()` itself - # keeps track of yielded names for purposes of de-duplication. - if finder.fallback_finder is not None: - yield from pkgutil.iter_importer_modules(finder.fallback_finder, prefix) - - pkgutil.iter_importer_modules.register( - pyimod02_importers.PyiFrozenFinder, - _iter_pyi_frozen_finder_modules, - ) - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyqt5.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyqt5.py deleted file mode 100755 index fa388e8..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyqt5.py +++ /dev/null @@ -1,68 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, 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 -#----------------------------------------------------------------------------- - -# The path to Qt's components may not default to the wheel layout for self-compiled PyQt5 installations. Mandate the -# wheel layout. See ``utils/hooks/qt.py`` for more details. - - -def _pyi_rthook(): - import os - import sys - - from _pyi_rth_utils import is_macos_app_bundle, prepend_path_to_environment_variable - from _pyi_rth_utils import qt as qt_rth_utils - - # Ensure this is the only Qt bindings package in the application. - qt_rth_utils.ensure_single_qt_bindings_package("PyQt5") - - # Try PyQt5 5.15.4-style path first... - pyqt_path = os.path.join(sys._MEIPASS, 'PyQt5', 'Qt5') - if not os.path.isdir(pyqt_path): - # ... and fall back to the older version - pyqt_path = os.path.join(sys._MEIPASS, 'PyQt5', 'Qt') - - os.environ['QT_PLUGIN_PATH'] = os.path.join(pyqt_path, 'plugins') - - if is_macos_app_bundle: - # Special handling for macOS .app bundles. To satisfy codesign requirements, we are forced to split `qml` - # directory into two parts; one that keeps only binaries (rooted in `Contents/Frameworks`) and one that keeps - # only data files (rooted in `Contents/Resources), with files from one directory tree being symlinked to the - # other to maintain illusion of a single mixed-content directory. As Qt seems to compute the identifier of its - # QML components based on location of the `qmldir` file w.r.t. the registered QML import paths, we need to - # register both paths, because the `qmldir` file for a component could be reached via either directory tree. - pyqt_path_res = os.path.normpath( - os.path.join(sys._MEIPASS, '..', 'Resources', os.path.relpath(pyqt_path, sys._MEIPASS)) - ) - os.environ['QML2_IMPORT_PATH'] = os.pathsep.join([ - os.path.join(pyqt_path_res, 'qml'), - os.path.join(pyqt_path, 'qml'), - ]) - else: - os.environ['QML2_IMPORT_PATH'] = os.path.join(pyqt_path, 'qml') - - # Back in the day, this was required because PyQt5 5.12.3 explicitly checked that `Qt5Core.dll` was in `PATH` - # (see #4293), and contemporary PyInstaller versions collected that DLL to `sys._MEIPASS`. - # - # Nowadays, we add `sys._MEIPASS` to `PATH` in order to ensure that `QtNetwork` can discover OpenSSL DLLs that might - # have been collected there (i.e., when they were not shipped with the package, and were collected from an external - # location). - if sys.platform.startswith('win'): - prepend_path_to_environment_variable(sys._MEIPASS, 'PATH') - - # Qt bindings package installed via PyPI wheels typically ensures that its bundled Qt is relocatable, by creating - # embedded `qt.conf` file during its initialization. This run-time generated qt.conf dynamically sets the Qt prefix - # path to the package's Qt directory. For bindings packages that do not create embedded `qt.conf` during their - # initialization (for example, conda-installed packages), try to perform this step ourselves. - qt_rth_utils.create_embedded_qt_conf("PyQt5", pyqt_path) - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyqt6.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyqt6.py deleted file mode 100755 index d3ed0cd..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyqt6.py +++ /dev/null @@ -1,70 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, 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 -#----------------------------------------------------------------------------- - -# The path to Qt's components may not default to the wheel layout for self-compiled PyQt6 installations. Mandate the -# wheel layout. See ``utils/hooks/qt.py`` for more details. - - -def _pyi_rthook(): - import os - import sys - - from _pyi_rth_utils import is_macos_app_bundle, prepend_path_to_environment_variable - from _pyi_rth_utils import qt as qt_rth_utils - - # Ensure this is the only Qt bindings package in the application. - qt_rth_utils.ensure_single_qt_bindings_package("PyQt6") - - # Try PyQt6 6.0.3-style path first... - pyqt_path = os.path.join(sys._MEIPASS, 'PyQt6', 'Qt6') - if not os.path.isdir(pyqt_path): - # ... and fall back to the older version. - pyqt_path = os.path.join(sys._MEIPASS, 'PyQt6', 'Qt') - - os.environ['QT_PLUGIN_PATH'] = os.path.join(pyqt_path, 'plugins') - - if is_macos_app_bundle: - # Special handling for macOS .app bundles. To satisfy codesign requirements, we are forced to split `qml` - # directory into two parts; one that keeps only binaries (rooted in `Contents/Frameworks`) and one that keeps - # only data files (rooted in `Contents/Resources), with files from one directory tree being symlinked to the - # other to maintain illusion of a single mixed-content directory. As Qt seems to compute the identifier of its - # QML components based on location of the `qmldir` file w.r.t. the registered QML import paths, we need to - # register both paths, because the `qmldir` file for a component could be reached via either directory tree. - pyqt_path_res = os.path.normpath( - os.path.join(sys._MEIPASS, '..', 'Resources', os.path.relpath(pyqt_path, sys._MEIPASS)) - ) - os.environ['QML2_IMPORT_PATH'] = os.pathsep.join([ - os.path.join(pyqt_path_res, 'qml'), - os.path.join(pyqt_path, 'qml'), - ]) - else: - os.environ['QML2_IMPORT_PATH'] = os.path.join(pyqt_path, 'qml') - - # Add `sys._MEIPASS` to `PATH` in order to ensure that `QtNetwork` can discover OpenSSL DLLs that might have been - # collected there (i.e., when they were not shipped with the package, and were collected from an external location). - if sys.platform.startswith('win'): - prepend_path_to_environment_variable(sys._MEIPASS, 'PATH') - - # For macOS POSIX builds, we need to add `sys._MEIPASS` to `DYLD_LIBRARY_PATH` so that QtNetwork can discover - # OpenSSL dynamic libraries for its `openssl` TLS backend. This also prevents fallback to external locations, such - # as Homebrew. For .app bundles, this is unnecessary because `QtNetwork` explicitly searches `Contents/Frameworks`. - if sys.platform == 'darwin' and not is_macos_app_bundle: - prepend_path_to_environment_variable(sys._MEIPASS, 'DYLD_LIBRARY_PATH') - - # Qt bindings package installed via PyPI wheels typically ensures that its bundled Qt is relocatable, by creating - # embedded `qt.conf` file during its initialization. This run-time generated qt.conf dynamically sets the Qt prefix - # path to the package's Qt directory. For bindings packages that do not create embedded `qt.conf` during their - # initialization (for example, conda-installed packages), try to perform this step ourselves. - qt_rth_utils.create_embedded_qt_conf("PyQt6", pyqt_path) - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyside2.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyside2.py deleted file mode 100755 index 3aca93b..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyside2.py +++ /dev/null @@ -1,63 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, 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 -#----------------------------------------------------------------------------- - -# The path to Qt's components may not default to the wheel layout for self-compiled PySide2 installations. Mandate the -# wheel layout. See ``utils/hooks/qt.py`` for more details. - - -def _pyi_rthook(): - import os - import sys - - from _pyi_rth_utils import is_macos_app_bundle, prepend_path_to_environment_variable - from _pyi_rth_utils import qt as qt_rth_utils - - # Ensure this is the only Qt bindings package in the application. - qt_rth_utils.ensure_single_qt_bindings_package("PySide2") - - if sys.platform.startswith('win'): - pyqt_path = os.path.join(sys._MEIPASS, 'PySide2') - else: - pyqt_path = os.path.join(sys._MEIPASS, 'PySide2', 'Qt') - - os.environ['QT_PLUGIN_PATH'] = os.path.join(pyqt_path, 'plugins') - - if is_macos_app_bundle: - # Special handling for macOS .app bundles. To satisfy codesign requirements, we are forced to split `qml` - # directory into two parts; one that keeps only binaries (rooted in `Contents/Frameworks`) and one that keeps - # only data files (rooted in `Contents/Resources), with files from one directory tree being symlinked to the - # other to maintain illusion of a single mixed-content directory. As Qt seems to compute the identifier of its - # QML components based on location of the `qmldir` file w.r.t. the registered QML import paths, we need to - # register both paths, because the `qmldir` file for a component could be reached via either directory tree. - pyqt_path_res = os.path.normpath( - os.path.join(sys._MEIPASS, '..', 'Resources', os.path.relpath(pyqt_path, sys._MEIPASS)) - ) - os.environ['QML2_IMPORT_PATH'] = os.pathsep.join([ - os.path.join(pyqt_path_res, 'qml'), - os.path.join(pyqt_path, 'qml'), - ]) - else: - os.environ['QML2_IMPORT_PATH'] = os.path.join(pyqt_path, 'qml') - - # Add `sys._MEIPASS` to `PATH` in order to ensure that `QtNetwork` can discover OpenSSL DLLs that might have been - # collected there (i.e., when they were not shipped with the package, and were collected from an external location). - if sys.platform.startswith('win'): - prepend_path_to_environment_variable(sys._MEIPASS, 'PATH') - - # Qt bindings package installed via PyPI wheels typically ensures that its bundled Qt is relocatable, by creating - # embedded `qt.conf` file during its initialization. This run-time generated qt.conf dynamically sets the Qt prefix - # path to the package's Qt directory. For bindings packages that do not create embedded `qt.conf` during their - # initialization (for example, conda-installed packages), try to perform this step ourselves. - qt_rth_utils.create_embedded_qt_conf("PySide2", pyqt_path) - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyside6.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyside6.py deleted file mode 100755 index 73db137..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_pyside6.py +++ /dev/null @@ -1,69 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, 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 -#----------------------------------------------------------------------------- - -# The path to Qt's components may not default to the wheel layout for self-compiled PySide6 installations. Mandate the -# wheel layout. See ``utils/hooks/qt.py`` for more details. - - -def _pyi_rthook(): - import os - import sys - - from _pyi_rth_utils import is_macos_app_bundle, prepend_path_to_environment_variable - from _pyi_rth_utils import qt as qt_rth_utils - - # Ensure this is the only Qt bindings package in the application. - qt_rth_utils.ensure_single_qt_bindings_package("PySide6") - - if sys.platform.startswith('win'): - pyqt_path = os.path.join(sys._MEIPASS, 'PySide6') - else: - pyqt_path = os.path.join(sys._MEIPASS, 'PySide6', 'Qt') - - os.environ['QT_PLUGIN_PATH'] = os.path.join(pyqt_path, 'plugins') - - if is_macos_app_bundle: - # Special handling for macOS .app bundles. To satisfy codesign requirements, we are forced to split `qml` - # directory into two parts; one that keeps only binaries (rooted in `Contents/Frameworks`) and one that keeps - # only data files (rooted in `Contents/Resources), with files from one directory tree being symlinked to the - # other to maintain illusion of a single mixed-content directory. As Qt seems to compute the identifier of its - # QML components based on location of the `qmldir` file w.r.t. the registered QML import paths, we need to - # register both paths, because the `qmldir` file for a component could be reached via either directory tree. - pyqt_path_res = os.path.normpath( - os.path.join(sys._MEIPASS, '..', 'Resources', os.path.relpath(pyqt_path, sys._MEIPASS)) - ) - os.environ['QML2_IMPORT_PATH'] = os.pathsep.join([ - os.path.join(pyqt_path_res, 'qml'), - os.path.join(pyqt_path, 'qml'), - ]) - else: - os.environ['QML2_IMPORT_PATH'] = os.path.join(pyqt_path, 'qml') - - # Add `sys._MEIPASS` to `PATH` in order to ensure that `QtNetwork` can discover OpenSSL DLLs that might have been - # collected there (i.e., when they were not shipped with the package, and were collected from an external location). - if sys.platform.startswith('win'): - prepend_path_to_environment_variable(sys._MEIPASS, 'PATH') - - # For macOS POSIX builds, we need to add `sys._MEIPASS` to `DYLD_LIBRARY_PATH` so that QtNetwork can discover - # OpenSSL dynamic libraries for its `openssl` TLS backend. This also prevents fallback to external locations, such - # as Homebrew. For .app bundles, this is unnecessary because `QtNetwork` explicitly searches `Contents/Frameworks`. - if sys.platform == 'darwin' and not is_macos_app_bundle: - prepend_path_to_environment_variable(sys._MEIPASS, 'DYLD_LIBRARY_PATH') - - # Qt bindings package installed via PyPI wheels typically ensures that its bundled Qt is relocatable, by creating - # embedded `qt.conf` file during its initialization. This run-time generated qt.conf dynamically sets the Qt prefix - # path to the package's Qt directory. For bindings packages that do not create embedded `qt.conf` during their - # initialization (for example, conda-installed packages), try to perform this step ourselves. - qt_rth_utils.create_embedded_qt_conf("PySide6", pyqt_path) - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_setuptools.py b/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_setuptools.py deleted file mode 100755 index 0a3ffb8..0000000 --- a/voxvera/vendor/PyInstaller/hooks/rthooks/pyi_rth_setuptools.py +++ /dev/null @@ -1,37 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2022-2023, 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 -#----------------------------------------------------------------------------- - -# This runtime hook performs the equivalent of the distutils-precedence.pth from the setuptools package; -# it registers a special meta finder that diverts import of distutils to setuptools._distutils, if available. - - -def _pyi_rthook(): - def _install_setuptools_distutils_hack(): - import os - import setuptools - - # We need to query setuptools version at runtime, because the default value for SETUPTOOLS_USE_DISTUTILS - # has changed at version 60.0 from "stdlib" to "local", and we want to mimic that behavior. - setuptools_major = int(setuptools.__version__.split('.')[0]) - default_value = "stdlib" if setuptools_major < 60 else "local" - - if os.environ.get("SETUPTOOLS_USE_DISTUTILS", default_value) == "local": - import _distutils_hack - _distutils_hack.add_shim() - - try: - _install_setuptools_distutils_hack() - except Exception: - pass - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/PyInstaller/isolated/__init__.py b/voxvera/vendor/PyInstaller/isolated/__init__.py deleted file mode 100755 index 3016e7d..0000000 --- a/voxvera/vendor/PyInstaller/isolated/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) or, at the user's discretion, the MIT License. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception OR MIT) -# ----------------------------------------------------------------------------- -""" -PyInstaller hooks typically will need to import the package which they are written for but doing so may manipulate -globals such as :data:`sys.path` or :data:`os.environ` in ways that affect the build. For example, on Windows, -Qt's binaries are added to then loaded via ``PATH`` in such a way that if you import multiple Qt variants in one -session then there is no guarantee which variant's binaries each variant will get! - -To get around this, PyInstaller does any such tasks in an isolated Python subprocess and ships a -:mod:`PyInstaller.isolated` submodule to do so in hooks. :: - - from PyInstaller import isolated - -This submodule provides: - -* :func:`isolated.call() ` to evaluate functions in isolation. -* :func:`@isolated.decorate ` to mark a function as always called in isolation. -* :class:`isolated.Python() ` to efficiently call many functions in a single child instance of Python. - -""" - -# flake8: noqa -from ._parent import Python, call, decorate, SubprocessDiedError diff --git a/voxvera/vendor/PyInstaller/isolated/_child.py b/voxvera/vendor/PyInstaller/isolated/_child.py deleted file mode 100755 index 0709b68..0000000 --- a/voxvera/vendor/PyInstaller/isolated/_child.py +++ /dev/null @@ -1,101 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) or, at the user's discretion, the MIT License. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception OR MIT) -# ----------------------------------------------------------------------------- -""" -The child process to be invoked by IsolatedPython(). - -This file is to be run directly with pipe handles for reading from and writing to the parent process as command line -arguments. - -""" - -import sys -import os -import types -from marshal import loads, dumps -from base64 import b64encode, b64decode -from traceback import format_exception - -if os.name == "nt": - from msvcrt import open_osfhandle - - def _open(osf_handle, mode): - # Convert system file handles to file descriptors before opening them. - return open(open_osfhandle(osf_handle, 0), mode) -else: - _open = open - - -def run_next_command(read_fh, write_fh): - """ - Listen to **read_fh** for the next function to run. Write the result to **write_fh**. - """ - - # Check the first line of input. Receiving an empty line is the signal that there are no more tasks to be ran. - first_line = read_fh.readline() - if first_line == b"\n": - # It's time to end this child process - return False - - # There are 5 lines to read: The function's code, its default args, its default kwargs, its args, and its kwargs. - code = loads(b64decode(first_line.strip())) - _defaults = loads(b64decode(read_fh.readline().strip())) - _kwdefaults = loads(b64decode(read_fh.readline().strip())) - args = loads(b64decode(read_fh.readline().strip())) - kwargs = loads(b64decode(read_fh.readline().strip())) - - try: - # Define the global namespace available to the function. - GLOBALS = {"__builtins__": __builtins__, "__isolated__": True} - # Reconstruct the function. - function = types.FunctionType(code, GLOBALS) - function.__defaults__ = _defaults - function.__kwdefaults__ = _kwdefaults - - # Run it. - output = function(*args, **kwargs) - - # Verify that the output is serialise-able (i.e. no custom types or module or function references) here so that - # it's caught if it fails. - marshalled = dumps((True, output)) - - except BaseException as ex: - # An exception happened whilst either running the function or serialising its output. Send back a string - # version of the traceback (unfortunately raw traceback objects are not marshal-able) and a boolean to say - # that it failed. - tb_lines = format_exception(type(ex), ex, ex.__traceback__) - if tb_lines[0] == "Traceback (most recent call last):\n": - # This particular line is distracting. Get rid of it. - tb_lines = tb_lines[1:] - marshalled = dumps((False, "".join(tb_lines).rstrip())) - - # Send the output (return value or traceback) back to the parent. - write_fh.write(b64encode(marshalled)) - write_fh.write(b"\n") - write_fh.flush() - - # Signal that an instruction was ran (successfully or otherwise). - return True - - -if __name__ == '__main__': - # Mark this process as PyInstaller's isolated subprocess; this makes attempts at spawning further isolated - # subprocesses via `PyInstaller.isolated` from this process no-op. - sys._pyi_isolated_subprocess = True - - read_from_parent, write_to_parent = map(int, sys.argv[1:]) - - with _open(read_from_parent, "rb") as read_fh: - with _open(write_to_parent, "wb") as write_fh: - sys.path = loads(b64decode(read_fh.readline())) - - # Keep receiving and running instructions until the parent sends the signal to stop. - while run_next_command(read_fh, write_fh): - pass diff --git a/voxvera/vendor/PyInstaller/isolated/_parent.py b/voxvera/vendor/PyInstaller/isolated/_parent.py deleted file mode 100755 index 0998e93..0000000 --- a/voxvera/vendor/PyInstaller/isolated/_parent.py +++ /dev/null @@ -1,437 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2021-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) or, at the user's discretion, the MIT License. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception OR MIT) -# ----------------------------------------------------------------------------- - -import os -from pathlib import Path -from marshal import loads, dumps -from base64 import b64encode, b64decode -import functools -import subprocess -import sys - -from PyInstaller import compat -from PyInstaller import log as logging - -logger = logging.getLogger(__name__) - -# WinAPI bindings for Windows-specific codepath -if os.name == "nt": - import msvcrt - import ctypes - import ctypes.wintypes - - # CreatePipe - class SECURITY_ATTRIBUTES(ctypes.Structure): - _fields_ = [ - ("nLength", ctypes.wintypes.DWORD), - ("lpSecurityDescriptor", ctypes.wintypes.LPVOID), - ("bInheritHandle", ctypes.wintypes.BOOL), - ] - - HANDLE_FLAG_INHERIT = 0x0001 - - LPSECURITY_ATTRIBUTES = ctypes.POINTER(SECURITY_ATTRIBUTES) - - CreatePipe = ctypes.windll.kernel32.CreatePipe - CreatePipe.argtypes = [ - ctypes.POINTER(ctypes.wintypes.HANDLE), - ctypes.POINTER(ctypes.wintypes.HANDLE), - LPSECURITY_ATTRIBUTES, - ctypes.wintypes.DWORD, - ] - CreatePipe.restype = ctypes.wintypes.BOOL - - # CloseHandle - CloseHandle = ctypes.windll.kernel32.CloseHandle - CloseHandle.argtypes = [ctypes.wintypes.HANDLE] - CloseHandle.restype = ctypes.wintypes.BOOL - -CHILD_PY = Path(__file__).with_name("_child.py") - - -def create_pipe(read_handle_inheritable, write_handle_inheritable): - """ - Create a one-way pipe for sending data to child processes. - - Args: - read_handle_inheritable: - A boolean flag indicating whether the handle corresponding to the read end-point of the pipe should be - marked as inheritable by subprocesses. - write_handle_inheritable: - A boolean flag indicating whether the handle corresponding to the write end-point of the pipe should be - marked as inheritable by subprocesses. - - Returns: - A read/write pair of file descriptors (which are just integers) on posix or system file handles on Windows. - - The pipe may be used either by this process or subprocesses of this process but not globally. - """ - return _create_pipe_impl(read_handle_inheritable, write_handle_inheritable) - - -def close_pipe_endpoint(pipe_handle): - """ - Close the file descriptor (posix) or handle (Windows) belonging to a pipe. - """ - return _close_pipe_endpoint_impl(pipe_handle) - - -if os.name == "nt": - - def _create_pipe_impl(read_handle_inheritable, write_handle_inheritable): - # Use WinAPI CreatePipe function to create the pipe. Python's os.pipe() does the same, but wraps the resulting - # handles into inheritable file descriptors (https://github.com/python/cpython/issues/77046). Instead, we want - # just handles, and will set the inheritable flag on corresponding handle ourselves. - read_handle = ctypes.wintypes.HANDLE() - write_handle = ctypes.wintypes.HANDLE() - - # SECURITY_ATTRIBUTES with inherit handle set to True - security_attributes = SECURITY_ATTRIBUTES() - security_attributes.nLength = ctypes.sizeof(security_attributes) - security_attributes.bInheritHandle = True - security_attributes.lpSecurityDescriptor = None - - # CreatePipe() - succeeded = CreatePipe( - ctypes.byref(read_handle), # hReadPipe - ctypes.byref(write_handle), # hWritePipe - ctypes.byref(security_attributes), # lpPipeAttributes - 0, # nSize - ) - if not succeeded: - raise ctypes.WinError() - - # Set inheritable flags. Instead of binding and using SetHandleInformation WinAPI function, we can use - # os.set_handle_inheritable(). - os.set_handle_inheritable(read_handle.value, read_handle_inheritable) - os.set_handle_inheritable(write_handle.value, write_handle_inheritable) - - return read_handle.value, write_handle.value - - def _close_pipe_endpoint_impl(pipe_handle): - succeeded = CloseHandle(pipe_handle) - if not succeeded: - raise ctypes.WinError() -else: - - def _create_pipe_impl(read_fd_inheritable, write_fd_inheritable): - # Create pipe, using os.pipe() - read_fd, write_fd = os.pipe() - - # The default behaviour of pipes is that they are process specific. I.e., they can only be used by this - # process to talk to itself. Setting inheritable flags means that child processes may also use these pipes. - os.set_inheritable(read_fd, read_fd_inheritable) - os.set_inheritable(write_fd, write_fd_inheritable) - - return read_fd, write_fd - - def _close_pipe_endpoint_impl(pipe_fd): - os.close(pipe_fd) - - -def child(read_from_parent: int, write_to_parent: int): - """ - Spawn a Python subprocess sending it the two file descriptors it needs to talk back to this parent process. - """ - if os.name != 'nt': - # Explicitly disabling close_fds is a requirement for making file descriptors inheritable by child processes. - extra_kwargs = { - "env": _subprocess_env(), - "close_fds": False, - } - else: - # On Windows, we can use subprocess.STARTUPINFO to explicitly pass the list of file handles to be inherited, - # so we can avoid disabling close_fds - extra_kwargs = { - "env": _subprocess_env(), - "close_fds": True, - "startupinfo": subprocess.STARTUPINFO(lpAttributeList={"handle_list": [read_from_parent, write_to_parent]}) - } - - # Run the _child.py script directly passing it the two file descriptors it needs to talk back to the parent. - cmd, options = compat.__wrap_python([str(CHILD_PY), str(read_from_parent), str(write_to_parent)], extra_kwargs) - - # I'm intentionally leaving stdout and stderr alone so that print() can still be used for emergency debugging and - # unhandled errors in the child are still visible. - return subprocess.Popen(cmd, **options) - - -def _subprocess_env(): - """ - Define the environment variables to be readable in a child process. - """ - from PyInstaller.config import CONF - python_path = CONF["pathex"] - if "PYTHONPATH" in os.environ: - python_path = python_path + [os.environ["PYTHONPATH"]] - env = os.environ.copy() - env["PYTHONPATH"] = os.pathsep.join(python_path) - return env - - -class SubprocessDiedError(RuntimeError): - pass - - -class Python: - """ - Start and connect to a separate Python subprocess. - - This is the lowest level of public API provided by this module. The advantage of using this class directly is - that it allows multiple functions to be evaluated in a single subprocess, making it faster than multiple calls to - :func:`call`. - - The ``strict_mode`` argument controls behavior when the child process fails to shut down; if strict mode is enabled, - an error is raised, otherwise only warning is logged. If the value of ``strict_mode`` is ``None``, the value of - ``PyInstaller.compat.strict_collect_mode`` is used (which in turn is controlled by the - ``PYINSTALLER_STRICT_COLLECT_MODE`` environment variable. - - Examples: - To call some predefined functions ``x = foo()``, ``y = bar("numpy")`` and ``z = bazz(some_flag=True)`` all using - the same isolated subprocess use:: - - with isolated.Python() as child: - x = child.call(foo) - y = child.call(bar, "numpy") - z = child.call(bazz, some_flag=True) - - """ - def __init__(self, strict_mode=None): - self._child = None - - # Re-use the compat.strict_collect_mode and its PYINSTALLER_STRICT_COLLECT_MODE environment variable for - # default strict-mode setting. - self._strict_mode = strict_mode if strict_mode is not None else compat.strict_collect_mode - - # Check if we are already running in PyInstaller's isolated subprocess, to prevent further nesting. - self._already_isolated = getattr(sys, '_pyi_isolated_subprocess', False) - - def __enter__(self): - # No-op if already running in an isolated subprocess. - if self._already_isolated: - return self - - # We need two pipes. One for the child to send data to the parent. The (write) end-point passed to the - # child needs to be marked as inheritable. - read_from_child, write_to_parent = create_pipe(False, True) - # And one for the parent to send data to the child. The (read) end-point passed to the child needs to be - # marked as inheritable. - read_from_parent, write_to_child = create_pipe(True, False) - - # Spawn a Python subprocess sending it the two file descriptors it needs to talk back to this parent process. - self._child = child(read_from_parent, write_to_parent) - - # Close the end-points that were inherited by the child. - close_pipe_endpoint(read_from_parent) - close_pipe_endpoint(write_to_parent) - del read_from_parent - del write_to_parent - - # Open file handles to talk to the child. This should fully transfer ownership of the underlying file - # descriptor to the opened handle; so when we close the latter, the former should be closed as well. - if os.name == 'nt': - # On Windows, we must first open file descriptor on top of the handle using _open_osfhandle (which - # python wraps in msvcrt.open_osfhandle). According to MSDN, this transfers the ownership of the - # underlying file handle to the file descriptors; i.e., they are both closed when the file descriptor - # is closed). - self._write_handle = os.fdopen(msvcrt.open_osfhandle(write_to_child, 0), "wb") - self._read_handle = os.fdopen(msvcrt.open_osfhandle(read_from_child, 0), "rb") - else: - self._write_handle = os.fdopen(write_to_child, "wb") - self._read_handle = os.fdopen(read_from_child, "rb") - - self._send(sys.path) - - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - # No-op if already running in an isolated subprocess. - if self._already_isolated: - return - - if exc_type and issubclass(exc_type, SubprocessDiedError): - self._write_handle.close() - self._read_handle.close() - del self._read_handle, self._write_handle - self._child = None - return - # Send the signal (a blank line) to the child to tell it that it's time to stop. - self._write_handle.write(b"\n") - self._write_handle.flush() - - # Wait for the child process to exit. The timeout is necessary for corner cases when the sub-process fails to - # exit (such as due to dangling non-daemon threads; see #7290). At this point, the subprocess already did all - # its work, so it should be safe to terminate. And as we expect it to shut down quickly (or not at all), the - # timeout is relatively short. - # - # In strict build mode, we raise an error when the subprocess fails to exit on its own, but do so only after - # we attempt to kill the subprocess, to avoid leaving zombie processes. - shutdown_error = False - - try: - self._child.wait(timeout=5) - except subprocess.TimeoutExpired: - logger.warning("Timed out while waiting for the child process to exit!") - shutdown_error = True - self._child.kill() - try: - self._child.wait(timeout=15) - except subprocess.TimeoutExpired: - logger.warning("Timed out while waiting for the child process to be killed!") - # Give up and fall through - - # Close the handles. This should also close the underlying file descriptors. - self._write_handle.close() - self._read_handle.close() - del self._read_handle, self._write_handle - - self._child = None - - # Raise an error in strict mode, after all clean-up has been performed. - if shutdown_error and self._strict_mode: - raise RuntimeError("Timed out while waiting for the child process to exit!") - - def call(self, function, *args, **kwargs): - """ - Call a function in the child Python. Retrieve its return value. Usage of this method is identical to that - of the :func:`call` function. - """ - # If already running in an isolated subprocess, directly execute the function. - if self._already_isolated: - return function(*args, **kwargs) - - if self._child is None: - raise RuntimeError("An isolated.Python object must be used in a 'with' clause.") - - self._send(function.__code__, function.__defaults__, function.__kwdefaults__, args, kwargs) - - # Read a single line of output back from the child. This contains if the function worked and either its return - # value or a traceback. This will block indefinitely until it receives a '\n' byte. - try: - ok, output = loads(b64decode(self._read_handle.readline())) - except (EOFError, BrokenPipeError): - # Subprocess appears to have died in an unhandleable way (e.g. SIGSEV). Raise an error. - raise SubprocessDiedError( - f"Child process died calling {function.__name__}() with args={args} and " - f"kwargs={kwargs}. Its exit code was {self._child.wait()}." - ) from None - - # If all went well, then ``output`` is the return value. - if ok: - return output - - # Otherwise an error happened and ``output`` is a string-ified stacktrace. Raise an error appending the - # stacktrace. Having the output in this order gives a nice fluent transition from parent to child in the stack - # trace. - raise RuntimeError(f"Child process call to {function.__name__}() failed with:\n" + output) - - def _send(self, *objects): - for object in objects: - self._write_handle.write(b64encode(dumps(object))) - self._write_handle.write(b"\n") - # Flushing is very important. Without it, the data is not sent but forever sits in a buffer so that the child is - # forever waiting for its data and the parent in turn is forever waiting for the child's response. - self._write_handle.flush() - - -def call(function, *args, **kwargs): - r""" - Call a function with arguments in a separate child Python. Retrieve its return value. - - Args: - function: - The function to send and invoke. - *args: - **kwargs: - Positional and keyword arguments to send to the function. These must be simple builtin types - not custom - classes. - Returns: - The return value of the function. Again, these must be basic types serialisable by :func:`marshal.dumps`. - Raises: - RuntimeError: - Any exception which happens inside an isolated process is caught and reraised in the parent process. - - To use, define a function which returns the information you're looking for. Any imports it requires must happen in - the body of the function. For example, to safely check the output of ``matplotlib.get_data_path()`` use:: - - # Define a function to be ran in isolation. - def get_matplotlib_data_path(): - import matplotlib - return matplotlib.get_data_path() - - # Call it with isolated.call(). - get_matplotlib_data_path = isolated.call(matplotlib_data_path) - - For single use functions taking no arguments like the above you can abuse the decorator syntax slightly to define - and execute a function in one go. :: - - >>> @isolated.call - ... def matplotlib_data_dir(): - ... import matplotlib - ... return matplotlib.get_data_path() - >>> matplotlib_data_dir - '/home/brenainn/.pyenv/versions/3.9.6/lib/python3.9/site-packages/matplotlib/mpl-data' - - Functions may take positional and keyword arguments and return most generic Python data types. :: - - >>> def echo_parameters(*args, **kwargs): - ... return args, kwargs - >>> isolated.call(echo_parameters, 1, 2, 3) - (1, 2, 3), {} - >>> isolated.call(echo_parameters, foo=["bar"]) - (), {'foo': ['bar']} - - Notes: - To make a function behave differently if it's isolated, check for the ``__isolated__`` global. :: - - if globals().get("__isolated__", False): - # We're inside a child process. - ... - else: - # This is the master process. - ... - - """ - with Python() as isolated: - return isolated.call(function, *args, **kwargs) - - -def decorate(function): - """ - Decorate a function so that it is always called in an isolated subprocess. - - Examples: - - To use, write a function then prepend ``@isolated.decorate``. :: - - @isolated.decorate - def add_1(x): - '''Add 1 to ``x``, displaying the current process ID.''' - import os - print(f"Process {os.getpid()}: Adding 1 to {x}.") - return x + 1 - - The resultant ``add_1()`` function can now be called as you would a - normal function and it'll automatically use a subprocess. - - >>> add_1(4) - Process 4920: Adding 1 to 4. - 5 - >>> add_1(13.2) - Process 4928: Adding 1 to 13.2. - 14.2 - - """ - @functools.wraps(function) - def wrapped(*args, **kwargs): - return call(function, *args, **kwargs) - - return wrapped diff --git a/voxvera/vendor/PyInstaller/lib/README.rst b/voxvera/vendor/PyInstaller/lib/README.rst deleted file mode 100755 index a09f6d5..0000000 --- a/voxvera/vendor/PyInstaller/lib/README.rst +++ /dev/null @@ -1,49 +0,0 @@ -Custom modifications of 3rd party libraries -=========================================== - -NOTE: PyInstaller does not extend PYTHONPATH (sys.path) with this directory -that contains bundled 3rd party libraries. - -Some users complained that PyInstaller failed because their apps were using -too old versions of some libraries that PyInstaller uses too and that's why -extending sys.path was dropped. - -All libraries are tweaked to be importable as:: - - from PyInstaller.lib.LIB_NAME import xyz - -In libraries replace imports like:: - - from altgraph import y - from modulegraph import z - -with relative prefix:: - - from ..altgraph import y - from ..modulegraph import z - - -altgraph ----------- - -- add fixed version string to ./altgraph/__init__.py:: - - # For PyInstaller/lib/ define the version here, since there is no - # package-resource. - __version__ = '0.13' - - -modulegraph ------------ - -https://bitbucket.org/ronaldoussoren/modulegraph/downloads - -- TODO Use official modulegraph version when following issue is resolved and pull request merged - https://bitbucket.org/ronaldoussoren/modulegraph/issues/28/__main__-module-being-analyzed-for-wheel - -- add fixed version string to ./modulegraph/__init__.py:: - - # For PyInstaller/lib/ define the version here, since there is no - # package-resource. - __version__ = '0.13' - diff --git a/voxvera/vendor/PyInstaller/lib/__init__.py b/voxvera/vendor/PyInstaller/lib/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/lib/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/lib/modulegraph/__init__.py b/voxvera/vendor/PyInstaller/lib/modulegraph/__init__.py deleted file mode 100755 index 9446169..0000000 --- a/voxvera/vendor/PyInstaller/lib/modulegraph/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = '0.17' diff --git a/voxvera/vendor/PyInstaller/lib/modulegraph/__main__.py b/voxvera/vendor/PyInstaller/lib/modulegraph/__main__.py deleted file mode 100755 index ea4670b..0000000 --- a/voxvera/vendor/PyInstaller/lib/modulegraph/__main__.py +++ /dev/null @@ -1,89 +0,0 @@ -import sys -import os -import argparse -from .modulegraph import ModuleGraph - - -def parse_arguments(): - parser = argparse.ArgumentParser( - conflict_handler='resolve', prog='%s -mmodulegraph' % ( - os.path.basename(sys.executable))) - parser.add_argument( - '-d', action='count', dest='debug', default=1, - help='Increase debug level') - parser.add_argument( - '-q', action='store_const', dest='debug', const=0, - help='Clear debug level') - parser.add_argument( - '-m', '--modules', action='store_true', - dest='domods', default=False, - help='arguments are module names, not script files') - parser.add_argument( - '-x', metavar='NAME', action='append', dest='excludes', - default=[], help='Add NAME to the excludes list') - parser.add_argument( - '-p', action='append', metavar='PATH', dest='addpath', default=[], - help='Add PATH to the module search path') - parser.add_argument( - '-g', '--dot', action='store_const', dest='output', const='dot', - help='Output a .dot graph') - parser.add_argument( - '-h', '--html', action='store_const', - dest='output', const='html', help='Output a HTML file') - parser.add_argument( - 'scripts', metavar='SCRIPT', nargs='+', help='scripts to analyse') - - opts = parser.parse_args() - return opts - - -def create_graph(scripts, domods, debuglevel, excludes, path_extras): - # Set the path based on sys.path and the script directory - path = sys.path[:] - - if domods: - del path[0] - else: - path[0] = os.path.dirname(scripts[0]) - - path = path_extras + path - if debuglevel > 1: - print("path:", file=sys.stderr) - for item in path: - print(" ", repr(item), file=sys.stderr) - - # Create the module finder and turn its crank - mf = ModuleGraph(path, excludes=excludes, debug=debuglevel) - for arg in scripts: - if domods: - if arg[-2:] == '.*': - mf.import_hook(arg[:-2], None, ["*"]) - else: - mf.import_hook(arg) - else: - mf.add_script(arg) - return mf - - -def output_graph(output_format, mf): - if output_format == 'dot': - mf.graphreport() - elif output_format == 'html': - mf.create_xref() - else: - mf.report() - - -def main(): - opts = parse_arguments() - mf = create_graph( - opts.scripts, opts.domods, opts.debug, - opts.excludes, opts.addpath) - output_graph(opts.output, mf) - - -if __name__ == '__main__': # pragma: no cover - try: - main() - except KeyboardInterrupt: - print("\n[interrupt]") diff --git a/voxvera/vendor/PyInstaller/lib/modulegraph/find_modules.py b/voxvera/vendor/PyInstaller/lib/modulegraph/find_modules.py deleted file mode 100755 index b383b28..0000000 --- a/voxvera/vendor/PyInstaller/lib/modulegraph/find_modules.py +++ /dev/null @@ -1,61 +0,0 @@ -""" -modulegraph.find_modules - High-level module dependency finding interface -========================================================================= - -History -........ - -Originally (loosely) based on code in py2exe's build_exe.py by Thomas Heller. -""" -import os -import pkgutil - -from .modulegraph import Alias - -def get_implies(): - def _xml_etree_modules(): - import xml.etree - return [ - f"xml.etree.{module_name}" - for _, module_name, is_package in pkgutil.iter_modules(xml.etree.__path__) - if not is_package - ] - - result = { - # imports done from C code in built-in and/or extension modules - # (untrackable by modulegraph). - "_curses": ["curses"], - "posix": ["resource"], - "gc": ["time"], - "time": ["_strptime"], - "datetime": ["time"], - "parser": ["copyreg"], - "codecs": ["encodings"], - "_sre": ["copy", "re"], - "zipimport": ["zlib"], - - # _frozen_importlib is part of the interpreter itself - "_frozen_importlib": None, - - # os.path is an alias for a platform specific module, - # ensure that the graph shows this. - "os.path": Alias(os.path.__name__), - - # Python >= 3.2: - "_datetime": ["time", "_strptime"], - "_json": ["json.decoder"], - "_pickle": ["codecs", "copyreg", "_compat_pickle"], - "_posixsubprocess": ["gc"], - "_ssl": ["socket"], - - # Python >= 3.3: - "_elementtree": ["pyexpat"] + _xml_etree_modules(), - - # This is not C extension, but it uses __import__ - "anydbm": ["dbhash", "gdbm", "dbm", "dumbdbm", "whichdb"], - - # Known package aliases - "wxPython.wx": Alias('wx'), - } - - return result diff --git a/voxvera/vendor/PyInstaller/lib/modulegraph/modulegraph.py b/voxvera/vendor/PyInstaller/lib/modulegraph/modulegraph.py deleted file mode 100755 index a3699cc..0000000 --- a/voxvera/vendor/PyInstaller/lib/modulegraph/modulegraph.py +++ /dev/null @@ -1,3107 +0,0 @@ -""" -Find modules used by a script, using bytecode analysis. - -Based on the stdlib modulefinder by Thomas Heller and Just van Rossum, -but uses a graph data structure and 2.3 features - -XXX: Verify all calls to _import_hook (and variants) to ensure that -imports are done in the right way. -""" -#FIXME: To decrease the likelihood of ModuleGraph exceeding the recursion limit -#and hence unpredictably raising fatal exceptions, increase the recursion -#limit at PyInstaller startup (i.e., in the -#PyInstaller.building.build_main.build() function). For details, see: -# https://github.com/pyinstaller/pyinstaller/issues/1919#issuecomment-216016176 - -import ast -import os -import pkgutil -import sys -import types -import re -from collections import deque, namedtuple, defaultdict -import urllib.request -import warnings -import importlib.util -import importlib.machinery - -# The logic in PyInstaller.compat ensures that these are available and -# of correct version. -if sys.version_info >= (3, 10): - import importlib.metadata as importlib_metadata -else: - import importlib_metadata - -# The latest version of altgraph at the time of writing (v0.17.4) still -# uses pkg_resources to query its own version. With setuptools >= 80.9.0, -# this triggers deprecation warnings. In 2025-11-30, pkg_resources will be -# removed altogether. Give altgraph just enough of a mocked pkg_resources that -# it can still be imported. -try: - _pkg_resources_not_imported = object() - _old_pkg_resources = sys.modules.get("pkg_resources", _pkg_resources_not_imported) - sys.modules["pkg_resources"] = fake_pkg_resources = types.SimpleNamespace() - fake_pkg_resources.require = lambda name: [importlib_metadata.distribution(name)] - - from altgraph.ObjectGraph import ObjectGraph - from altgraph import GraphError -finally: - if _old_pkg_resources is not _pkg_resources_not_imported: - sys.modules["pkg_resources"] = _old_pkg_resources - else: - del sys.modules["pkg_resources"] - -from . import util - - -class BUILTIN_MODULE: - def is_package(fqname): - return False - - -class NAMESPACE_PACKAGE: - def __init__(self, namespace_dirs): - self.namespace_dirs = namespace_dirs - - def is_package(self, fqname): - return True - - -#FIXME: Leverage this rather than magic numbers below. -ABSOLUTE_OR_RELATIVE_IMPORT_LEVEL = -1 -""" -Constant instructing the builtin `__import__()` function to attempt both -absolute and relative imports. -""" - - -#FIXME: Leverage this rather than magic numbers below. -ABSOLUTE_IMPORT_LEVEL = 0 -""" -Constant instructing the builtin `__import__()` function to attempt only -absolute imports. -""" - - -#FIXME: Leverage this rather than magic numbers below. -DEFAULT_IMPORT_LEVEL = ABSOLUTE_IMPORT_LEVEL -""" -Constant instructing the builtin `__import__()` function to attempt the default -import style specific to the active Python interpreter. - -Specifically, under: - -* Python 2, this defaults to attempting both absolute and relative imports. -* Python 3, this defaults to attempting only absolute imports. -""" - - -class InvalidRelativeImportError (ImportError): - pass - - -def _path_from_importerror(exc, default): - # This is a hack, but sadly enough the necessary information - # isn't available otherwise. - m = re.match(r'^No module named (\S+)$', str(exc)) - if m is not None: - return m.group(1) - - return default - - -#FIXME: What is this? Do we actually need this? This appears to provide -#significantly more fine-grained metadata than PyInstaller will ever require. -#It consumes a great deal of space (slots or no slots), since we store an -#instance of this class for each edge of the graph. -class DependencyInfo (namedtuple("DependencyInfo", - ["conditional", "function", "tryexcept", "fromlist"])): - __slots__ = () - - def _merged(self, other): - if (not self.conditional and not self.function and not self.tryexcept) \ - or (not other.conditional and not other.function and not other.tryexcept): - return DependencyInfo( - conditional=False, - function=False, - tryexcept=False, - fromlist=self.fromlist and other.fromlist) - - else: - return DependencyInfo( - conditional=self.conditional or other.conditional, - function=self.function or other.function, - tryexcept=self.tryexcept or other.tryexcept, - fromlist=self.fromlist and other.fromlist) - - -#FIXME: Shift the following Node class hierarchy into a new -#"PyInstaller.lib.modulegraph.node" module. This module is much too long. -#FIXME: Refactor "_deferred_imports" from a tuple into a proper lightweight -#class leveraging "__slots__". If not for backward compatibility, we'd just -#leverage a named tuple -- but this should do just as well. -#FIXME: Move the "packagepath" attribute into the "Package" class. Only -#packages define the "__path__" special attribute. The codebase currently -#erroneously tests whether "module.packagepath is not None" to determine -#whether a node is a package or not. However, "isinstance(module, Package)" is -#a significantly more reliable test. Refactor the former into the latter. -class Node: - """ - Abstract base class (ABC) of all objects added to a `ModuleGraph`. - - Attributes - ---------- - code : codeobject - Code object of the pure-Python module corresponding to this graph node - if any _or_ `None` otherwise. - graphident : str - Synonym of `identifier` required by the `ObjectGraph` superclass of the - `ModuleGraph` class. For readability, the `identifier` attribute should - typically be used instead. - filename : str - Absolute path of this graph node's corresponding module, package, or C - extension if any _or_ `None` otherwise. - identifier : str - Fully-qualified name of this graph node's corresponding module, - package, or C extension. - packagepath : str - List of the absolute paths of all directories comprising this graph - node's corresponding package. If this is a: - * Non-namespace package, this list contains exactly one path. - * Namespace package, this list contains one or more paths. - _deferred_imports : list - List of all target modules imported by the source module corresponding - to this graph node whole importations have been deferred for subsequent - processing in between calls to the `_ModuleGraph._scan_code()` and - `_ModuleGraph._process_imports()` methods for this source module _or_ - `None` otherwise. Each element of this list is a 3-tuple - `(have_star, _safe_import_hook_args, _safe_import_hook_kwargs)` - collecting the importation of a target module from this source module - for subsequent processing, where: - * `have_star` is a boolean `True` only if this is a `from`-style star - import (e.g., resembling `from {target_module_name} import *`). - * `_safe_import_hook_args` is a (typically non-empty) sequence of all - positional arguments to be passed to the `_safe_import_hook()` method - to add this importation to the graph. - * `_safe_import_hook_kwargs` is a (typically empty) dictionary of all - keyword arguments to be passed to the `_safe_import_hook()` method - to add this importation to the graph. - Unlike functional languages, Python imposes a maximum depth on the - interpreter stack (and hence recursion). On breaching this depth, - Python raises a fatal `RuntimeError` exception. Since `ModuleGraph` - parses imports recursively rather than iteratively, this depth _was_ - commonly breached before the introduction of this list. Python - environments installing a large number of modules (e.g., Anaconda) were - particularly susceptible. Why? Because `ModuleGraph` concurrently - descended through both the abstract syntax trees (ASTs) of all source - modules being parsed _and_ the graph of all target modules imported by - these source modules being built. The stack thus consisted of - alternating layers of AST and graph traversal. To unwind such - alternation and effectively halve the stack depth, `ModuleGraph` now - descends through the abstract syntax tree (AST) of each source module - being parsed and adds all importations originating within this module - to this list _before_ descending into the graph of these importations. - See pyinstaller/pyinstaller/#1289 for further details. - _global_attr_names : set - Set of the unqualified names of all global attributes (e.g., classes, - variables) defined in the pure-Python module corresponding to this - graph node if any _or_ the empty set otherwise. This includes the names - of all attributes imported via `from`-style star imports from other - existing modules (e.g., `from {target_module_name} import *`). This - set is principally used to differentiate the non-ignorable importation - of non-existent submodules in a package from the ignorable importation - of existing global attributes defined in that package's pure-Python - `__init__` submodule in `from`-style imports (e.g., `bar` in - `from foo import bar`, which may be either a submodule or attribute of - `foo`), as such imports ambiguously allow both. This set is _not_ used - to differentiate submodules from attributes in `import`-style imports - (e.g., `bar` in `import foo.bar`, which _must_ be a submodule of - `foo`), as such imports unambiguously allow only submodules. - _starimported_ignored_module_names : set - Set of the fully-qualified names of all existing unparsable modules - that the existing parsable module corresponding to this graph node - attempted to perform one or more "star imports" from. If this module - either does _not_ exist or does but is unparsable, this is the empty - set. Equivalently, this set contains each fully-qualified name - `{trg_module_name}` for which: - * This module contains an import statement of the form - `from {trg_module_name} import *`. - * The module whose name is `{trg_module_name}` exists but is _not_ - parsable by `ModuleGraph` (e.g., due to _not_ being pure-Python). - **This set is currently defined but otherwise ignored.** - _submodule_basename_to_node : dict - Dictionary mapping from the unqualified name of each submodule - contained by the parent module corresponding to this graph node to that - submodule's graph node. If this dictionary is non-empty, this parent - module is typically but _not_ always a package (e.g., the non-package - `os` module containing the `os.path` submodule). - """ - - __slots__ = [ - 'code', - 'filename', - 'graphident', - 'identifier', - 'packagepath', - '_deferred_imports', - '_global_attr_names', - '_starimported_ignored_module_names', - '_submodule_basename_to_node', - ] - - def __init__(self, identifier): - """ - Initialize this graph node. - - Parameters - ---------- - identifier : str - Fully-qualified name of this graph node's corresponding module, - package, or C extension. - """ - - self.code = None - self.filename = None - self.graphident = identifier - self.identifier = identifier - self.packagepath = None - self._deferred_imports = None - self._global_attr_names = set() - self._starimported_ignored_module_names = set() - self._submodule_basename_to_node = dict() - - - def is_global_attr(self, attr_name): - """ - `True` only if the pure-Python module corresponding to this graph node - defines a global attribute (e.g., class, variable) with the passed - name. - - If this module is actually a package, this method instead returns - `True` only if this package's pure-Python `__init__` submodule defines - such a global attribute. In this case, note that this package may still - contain an importable submodule of the same name. Callers should - attempt to import this attribute as a submodule of this package - _before_ assuming this attribute to be an ignorable global. See - "Examples" below for further details. - - Parameters - ---------- - attr_name : str - Unqualified name of the attribute to be tested. - - Returns - ---------- - bool - `True` only if this module defines this global attribute. - - Examples - ---------- - Consider a hypothetical module `foo` containing submodules `bar` and - `__init__` where the latter assigns `bar` to be a global variable - (possibly star-exported via the special `__all__` global variable): - - >>> # In "foo.__init__": - >>> bar = 3.1415 - - Python 2 and 3 both permissively permit this. This method returns - `True` in this case (i.e., when called on the `foo` package's graph - node, passed the attribute name `bar`) despite the importability of the - `foo.bar` submodule. - """ - - return attr_name in self._global_attr_names - - - def is_submodule(self, submodule_basename): - """ - `True` only if the parent module corresponding to this graph node - contains the submodule with the passed name. - - If `True`, this parent module is typically but _not_ always a package - (e.g., the non-package `os` module containing the `os.path` submodule). - - Parameters - ---------- - submodule_basename : str - Unqualified name of the submodule to be tested. - - Returns - ---------- - bool - `True` only if this parent module contains this submodule. - """ - - return submodule_basename in self._submodule_basename_to_node - - - def add_global_attr(self, attr_name): - """ - Record the global attribute (e.g., class, variable) with the passed - name to be defined by the pure-Python module corresponding to this - graph node. - - If this module is actually a package, this method instead records this - attribute to be defined by this package's pure-Python `__init__` - submodule. - - Parameters - ---------- - attr_name : str - Unqualified name of the attribute to be added. - """ - - self._global_attr_names.add(attr_name) - - - def add_global_attrs_from_module(self, target_module): - """ - Record all global attributes (e.g., classes, variables) defined by the - target module corresponding to the passed graph node to also be defined - by the source module corresponding to this graph node. - - If the source module is actually a package, this method instead records - these attributes to be defined by this package's pure-Python `__init__` - submodule. - - Parameters - ---------- - target_module : Node - Graph node of the target module to import attributes from. - """ - - self._global_attr_names.update(target_module._global_attr_names) - - - def add_submodule(self, submodule_basename, submodule_node): - """ - Add the submodule with the passed name and previously imported graph - node to the parent module corresponding to this graph node. - - This parent module is typically but _not_ always a package (e.g., the - non-package `os` module containing the `os.path` submodule). - - Parameters - ---------- - submodule_basename : str - Unqualified name of the submodule to add to this parent module. - submodule_node : Node - Graph node of this submodule. - """ - - self._submodule_basename_to_node[submodule_basename] = submodule_node - - - def get_submodule(self, submodule_basename): - """ - Graph node of the submodule with the passed name in the parent module - corresponding to this graph node. - - If this parent module does _not_ contain this submodule, an exception - is raised. Else, this parent module is typically but _not_ always a - package (e.g., the non-package `os` module containing the `os.path` - submodule). - - Parameters - ---------- - module_basename : str - Unqualified name of the submodule to retrieve. - - Returns - ---------- - Node - Graph node of this submodule. - """ - - return self._submodule_basename_to_node[submodule_basename] - - - def get_submodule_or_none(self, submodule_basename): - """ - Graph node of the submodule with the passed unqualified name in the - parent module corresponding to this graph node if this module contains - this submodule _or_ `None`. - - This parent module is typically but _not_ always a package (e.g., the - non-package `os` module containing the `os.path` submodule). - - Parameters - ---------- - submodule_basename : str - Unqualified name of the submodule to retrieve. - - Returns - ---------- - Node - Graph node of this submodule if this parent module contains this - submodule _or_ `None`. - """ - - return self._submodule_basename_to_node.get(submodule_basename) - - - def remove_global_attr_if_found(self, attr_name): - """ - Record the global attribute (e.g., class, variable) with the passed - name if previously recorded as defined by the pure-Python module - corresponding to this graph node to be subsequently undefined by the - same module. - - If this module is actually a package, this method instead records this - attribute to be undefined by this package's pure-Python `__init__` - submodule. - - This method is intended to be called on globals previously defined by - this module that are subsequently undefined via the `del` built-in by - this module, thus "forgetting" or "undoing" these globals. - - For safety, there exists no corresponding `remove_global_attr()` - method. While defining this method is trivial, doing so would invite - `KeyError` exceptions on scanning valid Python that lexically deletes a - global in a scope under this module's top level (e.g., in a function) - _before_ defining this global at this top level. Since `ModuleGraph` - cannot and should not (re)implement a full-blown Python interpreter, - ignoring out-of-order deletions is the only sane policy. - - Parameters - ---------- - attr_name : str - Unqualified name of the attribute to be removed. - """ - - if self.is_global_attr(attr_name): - self._global_attr_names.remove(attr_name) - - def __eq__(self, other): - try: - otherIdent = getattr(other, 'graphident') - except AttributeError: - return False - - return self.graphident == otherIdent - - def __ne__(self, other): - try: - otherIdent = getattr(other, 'graphident') - except AttributeError: - return True - - return self.graphident != otherIdent - - def __lt__(self, other): - try: - otherIdent = getattr(other, 'graphident') - except AttributeError: - return NotImplemented - - return self.graphident < otherIdent - - def __le__(self, other): - try: - otherIdent = getattr(other, 'graphident') - except AttributeError: - return NotImplemented - - return self.graphident <= otherIdent - - def __gt__(self, other): - try: - otherIdent = getattr(other, 'graphident') - except AttributeError: - return NotImplemented - - return self.graphident > otherIdent - - def __ge__(self, other): - try: - otherIdent = getattr(other, 'graphident') - except AttributeError: - return NotImplemented - - return self.graphident >= otherIdent - - def __hash__(self): - return hash(self.graphident) - - def infoTuple(self): - return (self.identifier,) - - def __repr__(self): - return '%s%r' % (type(self).__name__, self.infoTuple()) - - -class Alias(str): - """ - Placeholder aliasing an existing source module to a non-existent target - module (i.e., the desired alias). - - For obscure reasons, this class subclasses `str`. Each instance of this - class is the fully-qualified name of the existing source module being - aliased. Unlike the related `AliasNode` class, instances of this class are - _not_ actual nodes and hence _not_ added to the graph; they only facilitate - communication between the `ModuleGraph.alias_module()` and - `ModuleGraph.find_node()` methods. - """ - - -class AliasNode(Node): - """ - Graph node representing the aliasing of an existing source module under a - non-existent target module name (i.e., the desired alias). - """ - - def __init__(self, name, node=None): - """ - Initialize this alias. - - Parameters - ---------- - name : str - Fully-qualified name of the non-existent target module to be - created (as an alias of the existing source module). - node : Node - Graph node of the existing source module being aliased. Optional; - if not provided here, the attributes from referred node should - be copied later using `copyAttributesFromReferredNode` method. - """ - super(AliasNode, self).__init__(name) - - # Copy attributes from referred node, if provided - self.copyAttributesFromReferredNode(node) - - def copyAttributesFromReferredNode(self, node): - """ - Copy a subset of attributes from referred node (source module) into this target alias. - """ - # FIXME: Why only some? Why not *EVERYTHING* except "graphident", which - # must remain equal to "name" for lookup purposes? This is, after all, - # an alias. The idea is for the two nodes to effectively be the same. - for attr_name in ( - 'identifier', 'packagepath', - '_global_attr_names', '_starimported_ignored_module_names', - '_submodule_basename_to_node'): - if hasattr(node, attr_name): - setattr(self, attr_name, getattr(node, attr_name)) - - def infoTuple(self): - return (self.graphident, self.identifier) - - -class BadModule(Node): - pass - - -class ExcludedModule(BadModule): - pass - - -class MissingModule(BadModule): - pass - - -class InvalidRelativeImport (BadModule): - def __init__(self, relative_path, from_name): - identifier = relative_path - if relative_path.endswith('.'): - identifier += from_name - else: - identifier += '.' + from_name - super(InvalidRelativeImport, self).__init__(identifier) - self.relative_path = relative_path - self.from_name = from_name - - def infoTuple(self): - return (self.relative_path, self.from_name) - - -class Script(Node): - def __init__(self, filename): - super(Script, self).__init__(filename) - self.filename = filename - - def infoTuple(self): - return (self.filename,) - - -class BaseModule(Node): - def __init__(self, name, filename=None, path=None): - super(BaseModule, self).__init__(name) - self.filename = filename - self.packagepath = path - - def infoTuple(self): - return tuple(filter(None, (self.identifier, self.filename, self.packagepath))) - - -class BuiltinModule(BaseModule): - pass - - -class SourceModule(BaseModule): - pass - - -class InvalidSourceModule(SourceModule): - pass - - -class CompiledModule(BaseModule): - pass - - -class InvalidCompiledModule(BaseModule): - pass - - -class Extension(BaseModule): - pass - - -class Package(BaseModule): - """ - Graph node representing a non-namespace package. - """ - pass - - -class ExtensionPackage(Extension, Package): - """ - Graph node representing a package where the __init__ module is an extension - module. - """ - pass - - -class NamespacePackage(Package): - """ - Graph node representing a namespace package. - """ - pass - - -class RuntimeModule(BaseModule): - """ - Graph node representing a non-package Python module dynamically defined at - runtime. - - Most modules are statically defined on-disk as standard Python files. - Some modules, however, are dynamically defined in-memory at runtime - (e.g., `gi.repository.Gst`, dynamically defined by the statically - defined `gi.repository.__init__` module). - - This node represents such a runtime module. Since this is _not_ a package, - all attempts to import submodules from this module in `from`-style import - statements (e.g., the `queue` submodule in `from six.moves import queue`) - will be silently ignored. - - To ensure that the parent package of this module if any is also imported - and added to the graph, this node is typically added to the graph by - calling the `ModuleGraph.add_module()` method. - """ - pass - - -class RuntimePackage(Package): - """ - Graph node representing a non-namespace Python package dynamically defined - at runtime. - - Most packages are statically defined on-disk as standard subdirectories - containing `__init__.py` files. Some packages, however, are dynamically - defined in-memory at runtime (e.g., `six.moves`, dynamically defined by - the statically defined `six` module). - - This node represents such a runtime package. All attributes imported from - this package in `from`-style import statements that are submodules of this - package (e.g., the `queue` submodule in `from six.moves import queue`) will - be imported rather than ignored. - - To ensure that the parent package of this package if any is also imported - and added to the graph, this node is typically added to the graph by - calling the `ModuleGraph.add_module()` method. - """ - pass - - -#FIXME: Safely removable. We don't actually use this anywhere. After removing -#this class, remove the corresponding entry from "compat". -class FlatPackage(BaseModule): - def __init__(self, *args, **kwds): - warnings.warn( - "This class will be removed in a future version of modulegraph", - DeprecationWarning) - super(FlatPackage, *args, **kwds) - - -#FIXME: Safely removable. We don't actually use this anywhere. After removing -#this class, remove the corresponding entry from "compat". -class ArchiveModule(BaseModule): - def __init__(self, *args, **kwds): - warnings.warn( - "This class will be removed in a future version of modulegraph", - DeprecationWarning) - super(FlatPackage, *args, **kwds) - - -# HTML templates for ModuleGraph generator -header = """\ - - - - - %(TITLE)s - - - -

%(TITLE)s

""" -entry = """ -
- - %(CONTENT)s -
""" -contpl = """%(NAME)s %(TYPE)s""" -contpl_linked = """\ -%(NAME)s -%(TYPE)s""" -imports = """\ -
-%(HEAD)s: - %(LINKS)s -
-""" -footer = """ - -""" - - -def _ast_names(names): - result = [] - for nm in names: - if isinstance(nm, ast.alias): - result.append(nm.name) - else: - result.append(nm) - - result = [r for r in result if r != '__main__'] - return result - - -def uniq(seq): - """Remove duplicates from a list, preserving order""" - # Taken from https://stackoverflow.com/questions/480214 - seen = set() - seen_add = seen.add - return [x for x in seq if not (x in seen or seen_add(x))] - - -DEFAULT_IMPORT_LEVEL = 0 - - -class _Visitor(ast.NodeVisitor): - def __init__(self, graph, module): - self._graph = graph - self._module = module - self._level = DEFAULT_IMPORT_LEVEL - self._in_if = [False] - self._in_def = [False] - self._in_tryexcept = [False] - - @property - def in_if(self): - return self._in_if[-1] - - @property - def in_def(self): - return self._in_def[-1] - - @property - def in_tryexcept(self): - return self._in_tryexcept[-1] - - - def _collect_import(self, name, fromlist, level): - have_star = False - if fromlist is not None: - fromlist = uniq(fromlist) - if '*' in fromlist: - fromlist.remove('*') - have_star = True - - # Record this import as originating from this module for subsequent - # handling by the _process_imports() method. - self._module._deferred_imports.append( - (have_star, - (name, self._module, fromlist, level), - {'edge_attr': DependencyInfo( - conditional=self.in_if, - tryexcept=self.in_tryexcept, - function=self.in_def, - fromlist=False)})) - - - def visit_Import(self, node): - for nm in _ast_names(node.names): - self._collect_import(nm, None, self._level) - - def visit_ImportFrom(self, node): - level = node.level if node.level != 0 else self._level - self._collect_import(node.module or '', _ast_names(node.names), level) - - def visit_If(self, node): - self._in_if.append(True) - self.generic_visit(node) - self._in_if.pop() - - def visit_FunctionDef(self, node): - self._in_def.append(True) - self.generic_visit(node) - self._in_def.pop() - - visit_AsyncFunctionDef = visit_FunctionDef - - def visit_Try(self, node): - self._in_tryexcept.append(True) - self.generic_visit(node) - self._in_tryexcept.pop() - - def visit_TryExcept(self, node): - self._in_tryexcept.append(True) - self.generic_visit(node) - self._in_tryexcept.pop() - - def visit_Expression(self, node): - # Expression node's cannot contain import statements or - # other nodes that are relevant for us. - pass - - # Expression isn't actually used as such in AST trees, - # therefore define visitors for all kinds of expression nodes. - visit_BoolOp = visit_Expression - visit_BinOp = visit_Expression - visit_UnaryOp = visit_Expression - visit_Lambda = visit_Expression - visit_IfExp = visit_Expression - visit_Dict = visit_Expression - visit_Set = visit_Expression - visit_ListComp = visit_Expression - visit_SetComp = visit_Expression - visit_ListComp = visit_Expression - visit_GeneratorExp = visit_Expression - visit_Compare = visit_Expression - visit_Yield = visit_Expression - visit_YieldFrom = visit_Expression - visit_Await = visit_Expression - visit_Call = visit_Expression - visit_Await = visit_Expression - - -class ModuleGraph(ObjectGraph): - """ - Directed graph whose nodes represent modules and edges represent - dependencies between these modules. - """ - - - def createNode(self, cls, name, *args, **kw): - m = self.find_node(name) - - if m is None: - #assert m is None, m - m = super(ModuleGraph, self).createNode(cls, name, *args, **kw) - - return m - - - def __init__(self, path=None, excludes=(), replace_paths=(), implies=(), graph=None, debug=0): - super(ModuleGraph, self).__init__(graph=graph, debug=debug) - if path is None: - path = sys.path - self.path = path - self.lazynodes = {} - # excludes is stronger than implies - self.lazynodes.update(dict(implies)) - for m in excludes: - self.lazynodes[m] = None - self.replace_paths = replace_paths - - # Maintain own list of package path mappings in the scope of Modulegraph - # object. - self._package_path_map = {} - - # Legacy namespace-package paths. Initialized by scan_legacy_namespace_packages. - self._legacy_ns_packages = {} - - def scan_legacy_namespace_packages(self): - """ - Resolve extra package `__path__` entries for legacy setuptools-based - namespace packages, by reading `namespace_packages.txt` from dist - metadata. - """ - legacy_ns_packages = defaultdict(lambda: set()) - - for dist in importlib_metadata.distributions(): - ns_packages = dist.read_text("namespace_packages.txt") - if ns_packages is None: - continue - ns_packages = ns_packages.splitlines() - # Obtain path to dist metadata directory - dist_path = getattr(dist, '_path') - if dist_path is None: - continue - for package_name in ns_packages: - path = os.path.join( - str(dist_path.parent), # might be zipfile.Path if in zipped .egg - *package_name.split('.'), - ) - legacy_ns_packages[package_name].add(path) - - # Convert into dictionary of lists - self._legacy_ns_packages = { - package_name: list(paths) - for package_name, paths in legacy_ns_packages.items() - } - - def implyNodeReference(self, node, other, edge_data=None): - """ - Create a reference from the passed source node to the passed other node, - implying the former to depend upon the latter. - - While the source node _must_ be an existing graph node, the target node - may be either an existing graph node _or_ a fully-qualified module name. - In the latter case, the module with that name and all parent packages of - that module will be imported _without_ raising exceptions and for each - newly imported module or package: - - * A new graph node will be created for that module or package. - * A reference from the passed source node to that module or package will - be created. - - This method allows dependencies between Python objects _not_ importable - with standard techniques (e.g., module aliases, C extensions). - - Parameters - ---------- - node : str - Graph node for this reference's source module or package. - other : {Node, str} - Either a graph node _or_ fully-qualified name for this reference's - target module or package. - """ - - if isinstance(other, Node): - self._updateReference(node, other, edge_data) - else: - if isinstance(other, tuple): - raise ValueError(other) - others = self._safe_import_hook(other, node, None) - for other in others: - self._updateReference(node, other, edge_data) - - def outgoing(self, fromnode): - """ - Yield all nodes that `fromnode` dependes on (that is, - all modules that `fromnode` imports. - """ - - node = self.find_node(fromnode) - out_edges, _ = self.get_edges(node) - return out_edges - - getReferences = outgoing - - def incoming(self, tonode, collapse_missing_modules=True): - node = self.find_node(tonode) - _, in_edges = self.get_edges(node) - - if collapse_missing_modules: - for n in in_edges: - if isinstance(n, MissingModule): - for n in self.incoming(n, False): - yield n - - else: - yield n - - else: - for n in in_edges: - yield n - - getReferers = incoming - - def hasEdge(self, fromnode, tonode): - """ Return True iff there is an edge from 'fromnode' to 'tonode' """ - fromnode = self.find_node(fromnode) - tonode = self.find_node(tonode) - - return self.graph.edge_by_node(fromnode, tonode) is not None - - def foldReferences(self, packagenode): - """ - Create edges to/from `packagenode` based on the edges to/from all - submodules of that package _and_ then hide the graph nodes - corresponding to those submodules. - """ - - pkg = self.find_node(packagenode) - - for n in self.nodes(): - if not n.identifier.startswith(pkg.identifier + '.'): - continue - - iter_out, iter_inc = self.get_edges(n) - for other in iter_out: - if other.identifier.startswith(pkg.identifier + '.'): - continue - - if not self.hasEdge(pkg, other): - # Ignore circular dependencies - self._updateReference(pkg, other, 'pkg-internal-import') - - for other in iter_inc: - if other.identifier.startswith(pkg.identifier + '.'): - # Ignore circular dependencies - continue - - if not self.hasEdge(other, pkg): - self._updateReference(other, pkg, 'pkg-import') - - self.graph.hide_node(n) - - # TODO: unfoldReferences(pkg) that restore the submodule nodes and - # removes 'pkg-import' and 'pkg-internal-import' edges. Care should - # be taken to ensure that references are correct if multiple packages - # are folded and then one of them in unfolded - - def _updateReference(self, fromnode, tonode, edge_data): - try: - ed = self.edgeData(fromnode, tonode) - except (KeyError, GraphError): # XXX: Why 'GraphError' - return self.add_edge(fromnode, tonode, edge_data) - - if not (isinstance(ed, DependencyInfo) and isinstance(edge_data, DependencyInfo)): - self.updateEdgeData(fromnode, tonode, edge_data) - else: - self.updateEdgeData(fromnode, tonode, ed._merged(edge_data)) - - def add_edge(self, fromnode, tonode, edge_data='direct'): - """ - Create a reference from fromnode to tonode - """ - return super(ModuleGraph, self).createReference(fromnode, tonode, edge_data=edge_data) - - createReference = add_edge - - def find_node(self, name, create_nspkg=True): - """ - Graph node uniquely identified by the passed fully-qualified module - name if this module has been added to the graph _or_ `None` otherwise. - - If (in order): - - . A namespace package with this identifier exists _and_ the passed - `create_nspkg` parameter is `True`, this package will be - instantiated and returned. - . A lazy node with this identifier and: - * No dependencies exists, this node will be instantiated and - returned. - * Dependencies exists, this node and all transitive dependencies of - this node be instantiated and this node returned. - . A non-lazy node with this identifier exists, this node will be - returned as is. - - Parameters - ---------- - name : str - Fully-qualified name of the module whose graph node is to be found. - create_nspkg : bool - Ignored. - - Returns - ---------- - Node - Graph node of this module if added to the graph _or_ `None` - otherwise. - """ - - data = super(ModuleGraph, self).findNode(name) - - if data is not None: - return data - - if name in self.lazynodes: - deps = self.lazynodes.pop(name) - - if deps is None: - # excluded module - m = self.createNode(ExcludedModule, name) - elif isinstance(deps, Alias): - # NOTE: the AliasNode must be created and added to graph - # before trying to create the referred node; that might - # (due to recursive import analysis) lead to another - # attempt to resolve the aliased node (and if there is - # a real node that we are trying to shadow with the alias, - # that will end up added to the graph and prevent the - # alias node from being added). - m = self.createNode(AliasNode, name) - - # Create the referred node. - other = self._safe_import_hook(deps, None, None).pop() - - # Copy attributes; this used to be done by AliasNode - # constructor, back when referred node was created before - # the AliasNode (and could thus be passed to its constructor). - m.copyAttributesFromReferredNode(other) - - self.implyNodeReference(m, other) - else: - m = self._safe_import_hook(name, None, None).pop() - for dep in deps: - self.implyNodeReference(m, dep) - - return m - - return None - - findNode = find_node - iter_graph = ObjectGraph.flatten - - def add_script(self, pathname, caller=None): - """ - Create a node by path (not module name). It is expected to be a Python - source file, and will be scanned for dependencies. - """ - self.msg(2, "run_script", pathname) - - pathname = os.path.realpath(pathname) - m = self.find_node(pathname) - if m is not None: - return m - - with open(pathname, 'rb') as fp: - contents = fp.read() - contents = importlib.util.decode_source(contents) - - co_ast = compile(contents, pathname, 'exec', ast.PyCF_ONLY_AST, True) - co = compile(co_ast, pathname, 'exec', 0, True) - m = self.createNode(Script, pathname) - self._updateReference(caller, m, None) - n = self._scan_code(m, co, co_ast) - self._process_imports(n) - m.code = co - if self.replace_paths: - m.code = self._replace_paths_in_code(m.code) - return m - - - #FIXME: For safety, the "source_module" parameter should default to the - #root node of the current graph if unpassed. This parameter currently - #defaults to None, thus disconnected modules imported in this manner (e.g., - #hidden imports imported by depend.analysis.initialize_modgraph()). - def import_hook( - self, - target_module_partname, - source_module=None, - target_attr_names=None, - level=DEFAULT_IMPORT_LEVEL, - edge_attr=None, - ): - """ - Import the module with the passed name, all parent packages of this - module, _and_ all submodules and attributes in this module with the - passed names from the previously imported caller module signified by - the passed graph node. - - Unlike most import methods (e.g., `_safe_import_hook()`), this method - is designed to be publicly called by both external and internal - callers and hence is public. - - Parameters - ---------- - target_module_partname : str - Partially-qualified name of the target module to be imported. See - `_safe_import_hook()` for further details. - source_module : Node - Graph node for the previously imported **source module** (i.e., - module containing the `import` statement triggering the call to - this method) _or_ `None` if this module is to be imported in a - "disconnected" manner. **Passing `None` is _not_ recommended.** - Doing so produces a disconnected graph in which the graph node - created for the module to be imported will be disconnected and - hence unreachable from all other nodes -- which frequently causes - subtle issues in external callers (namely PyInstaller, which - silently ignores unreachable nodes). - target_attr_names : list - List of the unqualified names of all submodules and attributes to - be imported from the module to be imported if this is a "from"- - style import (e.g., `[encode_base64, encode_noop]` for the import - `from email.encoders import encode_base64, encode_noop`) _or_ - `None` otherwise. - level : int - Whether to perform an absolute or relative import. See - `_safe_import_hook()` for further details. - - Returns - ---------- - list - List of the graph nodes created for all modules explicitly imported - by this call, including the passed module and all submodules listed - in `target_attr_names` _but_ excluding all parent packages - implicitly imported by this call. If `target_attr_names` is `None` - or the empty list, this is guaranteed to be a list of one element: - the graph node created for the passed module. - - Raises - ---------- - ImportError - If the target module to be imported is unimportable. - """ - self.msg(3, "_import_hook", target_module_partname, source_module, source_module, level) - - source_package = self._determine_parent(source_module) - target_package, target_module_partname = self._find_head_package( - source_package, target_module_partname, level) - - self.msgin(4, "load_tail", target_package, target_module_partname) - - submodule = target_package - while target_module_partname: - i = target_module_partname.find('.') - if i < 0: - i = len(target_module_partname) - head, target_module_partname = target_module_partname[ - :i], target_module_partname[i+1:] - mname = "%s.%s" % (submodule.identifier, head) - submodule = self._safe_import_module(head, mname, submodule) - - if submodule is None: - # FIXME: Why do we no longer return a MissingModule instance? - # result = self.createNode(MissingModule, mname) - self.msgout(4, "raise ImportError: No module named", mname) - raise ImportError("No module named " + repr(mname)) - - self.msgout(4, "load_tail ->", submodule) - - target_module = submodule - target_modules = [target_module] - - # If this is a "from"-style import *AND* this target module is - # actually a package, import all submodules of this package specified - # by the "import" half of this import (e.g., the submodules "bar" and - # "car" of the target package "foo" in "from foo import bar, car"). - # - # If this target module is a non-package, it could still contain - # importable submodules (e.g., the non-package `os` module containing - # the `os.path` submodule). In this case, these submodules are already - # imported by this target module's pure-Python code. Since our import - # scanner already detects such imports, these submodules need *NOT* be - # reimported here. - if target_attr_names and isinstance(target_module, - (Package, AliasNode)): - for target_submodule in self._import_importable_package_submodules( - target_module, target_attr_names): - if target_submodule not in target_modules: - target_modules.append(target_submodule) - - # Add an edge from this source module to each target module. - for target_module in target_modules: - self._updateReference( - source_module, target_module, edge_data=edge_attr) - - return target_modules - - - def _determine_parent(self, caller): - """ - Determine the package containing a node. - """ - self.msgin(4, "determine_parent", caller) - - parent = None - if caller: - pname = caller.identifier - - if isinstance(caller, Package): - parent = caller - - elif '.' in pname: - pname = pname[:pname.rfind('.')] - parent = self.find_node(pname) - - elif caller.packagepath: - # XXX: I have no idea why this line - # is necessary. - parent = self.find_node(pname) - - self.msgout(4, "determine_parent ->", parent) - return parent - - - def _find_head_package( - self, - source_package, - target_module_partname, - level=DEFAULT_IMPORT_LEVEL): - """ - Import the target package providing the target module with the passed - name to be subsequently imported from the previously imported source - package corresponding to the passed graph node. - - Parameters - ---------- - source_package : Package - Graph node for the previously imported **source package** (i.e., - package containing the module containing the `import` statement - triggering the call to this method) _or_ `None` if this module is - to be imported in a "disconnected" manner. **Passing `None` is - _not_ recommended.** See the `_import_hook()` method for further - details. - target_module_partname : str - Partially-qualified name of the target module to be imported. See - `_safe_import_hook()` for further details. - level : int - Whether to perform absolute or relative imports. See the - `_safe_import_hook()` method for further details. - - Returns - ---------- - (target_package, target_module_tailname) - 2-tuple describing the imported target package, where: - * `target_package` is the graph node created for this package. - * `target_module_tailname` is the unqualified name of the target - module to be subsequently imported (e.g., `text` when passed a - `target_module_partname` of `email.mime.text`). - - Raises - ---------- - ImportError - If the package to be imported is unimportable. - """ - self.msgin(4, "find_head_package", source_package, target_module_partname, level) - - #FIXME: Rename all local variable names to something sensible. No, - #"p_fqdn" is not a sensible name. - - # If this target module is a submodule... - if '.' in target_module_partname: - target_module_headname, target_module_tailname = ( - target_module_partname.split('.', 1)) - # Else, this target module is a top-level module. - else: - target_module_headname = target_module_partname - target_module_tailname = '' - - # If attempting both absolute and relative imports... - if level == ABSOLUTE_OR_RELATIVE_IMPORT_LEVEL: - if source_package: - target_package_name = source_package.identifier + '.' + target_module_headname - else: - target_package_name = target_module_headname - # Else if attempting only absolute imports... - elif level == ABSOLUTE_IMPORT_LEVEL: - target_package_name = target_module_headname - - # Absolute import, ignore the parent - source_package = None - # Else if attempting only relative imports... - else: - if source_package is None: - self.msg(2, "Relative import outside of package") - raise InvalidRelativeImportError( - "Relative import outside of package (name=%r, parent=%r, level=%r)" % ( - target_module_partname, source_package, level)) - - for i in range(level - 1): - if '.' not in source_package.identifier: - self.msg(2, "Relative import outside of package") - raise InvalidRelativeImportError( - "Relative import outside of package (name=%r, parent=%r, level=%r)" % ( - target_module_partname, source_package, level)) - - p_fqdn = source_package.identifier.rsplit('.', 1)[0] - new_parent = self.find_node(p_fqdn) - if new_parent is None: - #FIXME: Repetition detected. Exterminate. Exterminate. - self.msg(2, "Relative import outside of package") - raise InvalidRelativeImportError( - "Relative import outside of package (name=%r, parent=%r, level=%r)" % ( - target_module_partname, source_package, level)) - - assert new_parent is not source_package, ( - new_parent, source_package) - source_package = new_parent - - if target_module_headname: - target_package_name = ( - source_package.identifier + '.' + target_module_headname) - else: - target_package_name = source_package.identifier - - # Graph node of this target package. - target_package = self._safe_import_module( - target_module_headname, target_package_name, source_package) - - # If this target package is *NOT* importable and a source package was - # passed, attempt to import this target package as an absolute import. - # - # ADDENDUM: but do this only if the passed "level" is either - # ABSOLUTE_IMPORT_LEVEL (0) or ABSOLUTE_OR_RELATIVE_IMPORT_LEVEL (-1). - # Otherwise, an attempt at relative import of a missing sub-module - # (from .module import something) might pull in an unrelated - # but eponymous top-level module, which should not happen. - if target_package is None and source_package is not None and level <= ABSOLUTE_IMPORT_LEVEL: - target_package_name = target_module_headname - source_package = None - - # Graph node for the target package, again. - target_package = self._safe_import_module( - target_module_headname, target_package_name, source_package) - - # If this target package is importable, return this package. - if target_package is not None: - self.msgout(4, "find_head_package ->", (target_package, target_module_tailname)) - return target_package, target_module_tailname - - # Else, raise an exception. - self.msgout(4, "raise ImportError: No module named", target_package_name) - raise ImportError("No module named " + target_package_name) - - - - - #FIXME: Refactor from a generator yielding graph nodes into a non-generator - #returning a list or tuple of all yielded graph nodes. This method is only - #called once above and the return value of that call is only iterated over - #as a list or tuple. There's no demonstrable reason for this to be a - #generator. Generators are great for their intended purposes (e.g., as - #continuations). This isn't one of those purposes. - def _import_importable_package_submodules(self, package, attr_names): - """ - Generator importing and yielding each importable submodule (of the - previously imported package corresponding to the passed graph node) - whose unqualified name is in the passed list. - - Elements of this list that are _not_ importable submodules of this - package are either: - - * Ignorable attributes (e.g., classes, globals) defined at the top - level of this package's `__init__` submodule, which will be ignored. - * Else, unignorable unimportable submodules, in which case an - exception is raised. - - Parameters - ---------- - package : Package - Graph node of the previously imported package containing the - modules to be imported and yielded. - - attr_names : list - List of the unqualified names of all attributes of this package to - attempt to import as submodules. This list will be internally - converted into a set, safely ignoring any duplicates in this list - (e.g., reducing the "from"-style import - `from foo import bar, car, far, bar, car, far` to merely - `from foo import bar, car, far`). - - Yields - ---------- - Node - Graph node created for the currently imported submodule. - - Raises - ---------- - ImportError - If any attribute whose name is in `attr_names` is neither: - * An importable submodule of this package. - * An ignorable global attribute (e.g., class, variable) defined at - the top level of this package's `__init__` submodule. - In this case, this attribute _must_ be an unimportable submodule of - this package. - """ - - # Ignore duplicate submodule names in the passed list. - attr_names = set(attr_names) - self.msgin(4, "_import_importable_package_submodules", package, attr_names) - - #FIXME: This test *SHOULD* be superfluous and hence safely removable. - #The higher-level _scan_bytecode() and _collect_import() methods - #already guarantee "*" characters to be removed from fromlists. - if '*' in attr_names: - attr_names.update(self._find_all_submodules(package)) - attr_names.remove('*') - - # self.msg(4, '_import_importable_package_submodules (global attrs)', package.identifier, package._global_attr_names) - - # For the name of each attribute to be imported from this package... - for attr_name in attr_names: - # self.msg(4, '_import_importable_package_submodules (fromlist attr)', package.identifier, attr_name) - - # Graph node of this attribute if this attribute is a previously - # imported module or None otherwise. - submodule = package.get_submodule_or_none(attr_name) - - # If this attribute is *NOT* a previously imported module, attempt - # to import this attribute as a submodule of this package. - if submodule is None: - # Fully-qualified name of this submodule. - submodule_name = package.identifier + '.' + attr_name - - # Graph node of this submodule if importable or None otherwise. - submodule = self._safe_import_module( - attr_name, submodule_name, package) - - # If this submodule is unimportable... - if submodule is None: - # If this attribute is a global (e.g., class, variable) - # defined at the top level of this package's "__init__" - # submodule, this importation is safely ignorable. Do so - # and skip to the next attribute. - # - # This behaviour is non-conformant with Python behaviour, - # which is bad, but is required to sanely handle all - # possible edge cases, which is good. In Python, a global - # attribute defined at the top level of a package's - # "__init__" submodule shadows a submodule of the same name - # in that package. Attempting to import that submodule - # instead imports that attribute; thus, that submodule is - # effectively unimportable. In this method and elsewhere, - # that submodule is tested for first and hence shadows that - # attribute -- the opposite logic. Attempts to import that - # attribute are mistakenly seen as attempts to import that - # submodule! Why? - # - # Edge cases. PyInstaller (and by extension ModuleGraph) - # only cares about module imports. Global attribute imports - # are parsed only as the means to this ends and are - # otherwise ignorable. The cost of erroneously shadowing: - # - # * Submodules by attributes is significant. Doing so - # prevents such submodules from being frozen and hence - # imported at application runtime. - # * Attributes by submodules is insignificant. Doing so - # could erroneously freeze such submodules despite their - # never being imported at application runtime. However, - # ModuleGraph is incapable of determining with certainty - # that Python logic in another module other than the - # "__init__" submodule containing these attributes does - # *NOT* delete these attributes and hence unshadow these - # submodules, which would then become importable at - # runtime and require freezing. Hence, ModuleGraph *MUST* - # permissively assume submodules of the same name as - # attributes to be unshadowed elsewhere and require - # freezing -- even if they do not. - # - # It is practically difficult (albeit technically feasible) - # for ModuleGraph to determine whether or not the target - # attribute names of "from"-style import statements (e.g., - # "bar" and "car" in "from foo import bar, car") refer to - # non-ignorable submodules or ignorable non-module globals - # during opcode scanning. Distinguishing these two cases - # during opcode scanning would require a costly call to the - # _find_module() method, which would subsequently be - # repeated during import-graph construction. This could be - # ameliorated with caching, which itself would require - # costly space consumption and developer time. - # - # Since opcode scanning fails to distinguish these two - # cases, this and other methods subsequently called at - # import-graph construction time (e.g., - # _safe_import_hook()) must do so. Since submodules of the - # same name as attributes must assume to be unshadowed - # elsewhere and require freezing, the only solution is to - # attempt to import an attribute as a non-ignorable module - # *BEFORE* assuming an attribute to be an ignorable - # non-module. Which is what this and other methods do. - # - # See Package.is_global_attr() for similar discussion. - if package.is_global_attr(attr_name): - self.msg(4, '_import_importable_package_submodules: ignoring from-imported global', package.identifier, attr_name) - continue - # Else, this attribute is an unimportable submodule. Since - # this is *NOT* safely ignorable, raise an exception. - else: - raise ImportError("No module named " + submodule_name) - - # Yield this submodule's graph node to the caller. - yield submodule - - self.msgin(4, "_import_importable_package_submodules ->") - - - def _find_all_submodules(self, m): - if not m.packagepath: - return - # 'suffixes' used to be a list hardcoded to [".py", ".pyc", ".pyo"]. - # But we must also collect Python extension modules - although - # we cannot separate normal dlls from Python extensions. - for path in m.packagepath: - try: - names = os.listdir(path) - except (os.error, IOError): - self.msg(2, "can't list directory", path) - continue - for name in names: - for suffix in importlib.machinery.all_suffixes(): - if path.endswith(suffix): - name = os.path.basename(path)[:-len(suffix)] - break - else: - continue - if name != '__init__': - yield name - - - def alias_module(self, src_module_name, trg_module_name): - """ - Alias the source module to the target module with the passed names. - - This method ensures that the next call to findNode() given the target - module name will resolve this alias. This includes importing and adding - a graph node for the source module if needed as well as adding a - reference from the target to source module. - - Parameters - ---------- - src_module_name : str - Fully-qualified name of the existing **source module** (i.e., the - module being aliased). - trg_module_name : str - Fully-qualified name of the non-existent **target module** (i.e., - the alias to be created). - """ - self.msg(3, 'alias_module "%s" -> "%s"' % (src_module_name, trg_module_name)) - # print('alias_module "%s" -> "%s"' % (src_module_name, trg_module_name)) - assert isinstance(src_module_name, str), '"%s" not a module name.' % str(src_module_name) - assert isinstance(trg_module_name, str), '"%s" not a module name.' % str(trg_module_name) - - # If the target module has already been added to the graph as either a - # non-alias or as a different alias, raise an exception. - trg_module = self.find_node(trg_module_name) - if trg_module is not None and not ( - isinstance(trg_module, AliasNode) and - trg_module.identifier == src_module_name): - raise ValueError( - 'Target module "%s" already imported as "%s".' % ( - trg_module_name, trg_module)) - - # See findNode() for details. - self.lazynodes[trg_module_name] = Alias(src_module_name) - - - def add_module(self, module): - """ - Add the passed module node to the graph if not already added. - - If that module has a parent module or package with a previously added - node, this method also adds a reference from this module node to its - parent node and adds this module node to its parent node's namespace. - - This high-level method wraps the low-level `addNode()` method, but is - typically _only_ called by graph hooks adding runtime module nodes. For - all other node types, the `import_module()` method should be called. - - Parameters - ---------- - module : BaseModule - Graph node of the module to be added. - """ - self.msg(3, 'add_module', module) - - # If no node exists for this module, add such a node. - module_added = self.find_node(module.identifier) - if module_added is None: - self.addNode(module) - else: - assert module == module_added, 'New module %r != previous %r.' % (module, module_added) - - # If this module has a previously added parent, reference this module to - # its parent and add this module to its parent's namespace. - parent_name, _, module_basename = module.identifier.rpartition('.') - if parent_name: - parent = self.find_node(parent_name) - if parent is None: - self.msg(4, 'add_module parent not found:', parent_name) - else: - self.add_edge(module, parent) - parent.add_submodule(module_basename, module) - - - def append_package_path(self, package_name, directory): - """ - Modulegraph does a good job at simulating Python's, but it can not - handle packagepath '__path__' modifications packages make at runtime. - - Therefore there is a mechanism whereby you can register extra paths - in this map for a package, and it will be honored. - - NOTE: This method has to be called before a package is resolved by - modulegraph. - - Parameters - ---------- - module : str - Fully-qualified module name. - directory : str - Absolute or relative path of the directory to append to the - '__path__' attribute. - """ - - paths = self._package_path_map.setdefault(package_name, []) - paths.append(directory) - - - def _safe_import_module( - self, module_partname, module_name, parent_module): - """ - Create a new graph node for the module with the passed name under the - parent package signified by the passed graph node _without_ raising - `ImportError` exceptions. - - If this module has already been imported, this module's existing graph - node will be returned; else if this module is importable, a new graph - node will be added for this module and returned; else this module is - unimportable, in which case `None` will be returned. Like the - `_safe_import_hook()` method, this method does _not_ raise - `ImportError` exceptions when this module is unimportable. - - Parameters - ---------- - module_partname : str - Unqualified name of the module to be imported (e.g., `text`). - module_name : str - Fully-qualified name of this module (e.g., `email.mime.text`). - parent_module : Package - Graph node of the previously imported parent module containing this - submodule _or_ `None` if this is a top-level module (i.e., - `module_name` contains no `.` delimiters). This parent module is - typically but _not_ always a package (e.g., the `os.path` submodule - contained by the `os` module). - - Returns - ---------- - Node - Graph node created for this module _or_ `None` if this module is - unimportable. - """ - self.msgin(3, "safe_import_module", module_partname, module_name, parent_module) - - # If this module has *NOT* already been imported, do so. - module = self.find_node(module_name) - if module is None: - # List of the absolute paths of all directories to be searched for - # this module. This effectively defaults to "sys.path". - search_dirs = None - - # If this module has a parent package... - if parent_module is not None: - # ...with a list of the absolute paths of all directories - # comprising this package, prefer that to "sys.path". - if parent_module.packagepath is not None: - search_dirs = parent_module.packagepath - # Else, something is horribly wrong. Return emptiness. - else: - self.msgout(3, "safe_import_module -> None (parent_parent.packagepath is None)") - return None - - try: - pathname, loader = self._find_module( - module_partname, search_dirs, parent_module) - except ImportError as exc: - self.msgout(3, "safe_import_module -> None (%r)" % exc) - return None - - (module, co) = self._load_module(module_name, pathname, loader) - if co is not None: - try: - if isinstance(co, ast.AST): - co_ast = co - co = compile(co_ast, pathname, 'exec', 0, True) - else: - co_ast = None - n = self._scan_code(module, co, co_ast) - self._process_imports(n) - - if self.replace_paths: - co = self._replace_paths_in_code(co) - module.code = co - except SyntaxError: - self.msg( - 1, "safe_import_module: SyntaxError in ", pathname, - ) - cls = InvalidSourceModule - module = self.createNode(cls, module_name) - - # If this is a submodule rather than top-level module... - if parent_module is not None: - self.msg(4, "safe_import_module create reference", module, "->", parent_module) - - # Add an edge from this submodule to its parent module. - self._updateReference( - module, parent_module, edge_data=DependencyInfo( - conditional=False, - fromlist=False, - function=False, - tryexcept=False, - )) - - # Add this submodule to its parent module. - parent_module.add_submodule(module_partname, module) - - # Return this module. - self.msgout(3, "safe_import_module ->", module) - return module - - def _load_module(self, fqname, pathname, loader): - from importlib._bootstrap_external import ExtensionFileLoader - self.msgin(2, "load_module", fqname, pathname, - loader.__class__.__name__) - partname = fqname.rpartition(".")[-1] - - if loader.is_package(partname): - if isinstance(loader, NAMESPACE_PACKAGE): - # This is a PEP-420 namespace package. - m = self.createNode(NamespacePackage, fqname) - m.filename = '-' - m.packagepath = loader.namespace_dirs[:] # copy for safety - else: - # Regular package. - # - # NOTE: this might be a legacy setuptools (pkg_resources) - # based namespace package (with __init__.py, but calling - # `pkg_resources.declare_namespace(__name__)`). To properly - # handle the case when such a package is split across - # multiple locations, we need to resolve the package - # paths via metadata. - ns_pkgpaths = self._legacy_ns_packages.get(fqname, []) - - if isinstance(loader, ExtensionFileLoader): - m = self.createNode(ExtensionPackage, fqname) - else: - m = self.createNode(Package, fqname) - m.filename = pathname - # PEP-302-compliant loaders return the pathname of the - # `__init__`-file, not the package directory. - assert os.path.basename(pathname).startswith('__init__.') - m.packagepath = [os.path.dirname(pathname)] + ns_pkgpaths - - # As per comment at top of file, simulate runtime packagepath - # additions - m.packagepath = m.packagepath + self._package_path_map.get( - fqname, []) - - if isinstance(m, NamespacePackage): - return (m, None) - - co = None - if loader is BUILTIN_MODULE: - cls = BuiltinModule - elif isinstance(loader, ExtensionFileLoader): - cls = Extension - - # Look for accompanying .py or .pyi file, which might allow - # us to perform basic import analysis for the extension. - def _co_from_accompanying_source(extension_filename): - path = os.path.dirname(extension_filename) - basename = os.path.basename(extension_filename).split('.')[0] - - for ext in {'.py', '.pyi'}: - src_filename = os.path.join(path, basename + ext) - if not os.path.isfile(src_filename): - continue - - try: - with open(src_filename, 'rb') as fp: - src = fp.read() - co = compile(src, src_filename, 'exec', ast.PyCF_ONLY_AST, True) - return co - except Exception as e: - pass - - co = _co_from_accompanying_source(pathname) - else: - try: - src = loader.get_source(partname) - except (UnicodeDecodeError, SyntaxError) as e: - # The `UnicodeDecodeError` is typically raised here when the - # source file contains non-ASCII characters in some local - # encoding that is different from UTF-8, but fails to - # declare it via PEP361 encoding header. Python seems to - # be able to load and run such module, but we cannot retrieve - # the source for it via the `loader.get_source()`. - # - # The `UnicodeDecoreError` in turn triggers a `SyntaxError` - # when such invalid character appears on the first line of - # the source file (and interrupts the scan for PEP361 - # encoding header). - # - # In such cases, we try to fall back to reading the source - # as raw data file. - - # If `SyntaxError` was not raised during handling of - # a `UnicodeDecodeError`, it was likely a genuine syntax - # error, so re-raise it. - if isinstance(e, SyntaxError): - if not isinstance(e.__context__, UnicodeDecodeError): - raise - - self.msg(2, "load_module: failed to obtain source for " - f"{partname}: {e}! Falling back to reading as " - "raw data!") - - path = loader.get_filename(partname) - src = loader.get_data(path) - - if src is not None: - try: - co = compile(src, pathname, 'exec', ast.PyCF_ONLY_AST, True) - cls = SourceModule - except SyntaxError: - co = None - cls = InvalidSourceModule - except Exception as exc: # FIXME: more specific? - cls = InvalidSourceModule - self.msg(2, "load_module: InvalidSourceModule", pathname, - exc) - else: - # no src available - try: - co = loader.get_code(partname) - cls = (CompiledModule if co is not None - else InvalidCompiledModule) - except Exception as exc: # FIXME: more specific? - self.msg(2, "load_module: InvalidCompiledModule, " - "Cannot load code", pathname, exc) - cls = InvalidCompiledModule - - m = self.createNode(cls, fqname) - m.filename = pathname - - self.msgout(2, "load_module ->", m) - return (m, co) - - def _safe_import_hook( - self, target_module_partname, source_module, target_attr_names, - level=DEFAULT_IMPORT_LEVEL, edge_attr=None): - """ - Import the module with the passed name and all parent packages of this - module from the previously imported caller module signified by the - passed graph node _without_ raising `ImportError` exceptions. - - This method wraps the lowel-level `_import_hook()` method. On catching - an `ImportError` exception raised by that method, this method creates - and adds a `MissingNode` instance describing the unimportable module to - the graph instead. - - Parameters - ---------- - target_module_partname : str - Partially-qualified name of the module to be imported. If `level` - is: - * `ABSOLUTE_OR_RELATIVE_IMPORT_LEVEL` (e.g., the Python 2 default) - or a positive integer (e.g., an explicit relative import), the - fully-qualified name of this module is the concatenation of the - fully-qualified name of the caller module's package and this - parameter. - * `ABSOLUTE_IMPORT_LEVEL` (e.g., the Python 3 default), this name - is already fully-qualified. - * A non-negative integer (e.g., `1`), this name is typically the - empty string. In this case, this is a "from"-style relative - import (e.g., "from . import bar") and the fully-qualified name - of this module is dynamically resolved by import machinery. - source_module : Node - Graph node for the previously imported **caller module** (i.e., - module containing the `import` statement triggering the call to - this method) _or_ `None` if this module is to be imported in a - "disconnected" manner. **Passing `None` is _not_ recommended.** - Doing so produces a disconnected graph in which the graph node - created for the module to be imported will be disconnected and - hence unreachable from all other nodes -- which frequently causes - subtle issues in external callers (e.g., PyInstaller, which - silently ignores unreachable nodes). - target_attr_names : list - List of the unqualified names of all submodules and attributes to - be imported via a `from`-style import statement from this target - module if any (e.g., the list `[encode_base64, encode_noop]` for - the import `from email.encoders import encode_base64, encode_noop`) - _or_ `None` otherwise. Ignored unless `source_module` is the graph - node of a package (i.e., is an instance of the `Package` class). - Why? Because: - * Consistency. The `_import_importable_package_submodules()` - method accepts a similar list applicable only to packages. - * Efficiency. Unlike packages, modules cannot physically contain - submodules. Hence, any target module imported via a `from`-style - import statement as an attribute from another target parent - module must itself have been imported in that target parent - module. The import statement responsible for that import must - already have been previously parsed by `ModuleGraph`, in which - case that target module will already be frozen by PyInstaller. - These imports are safely ignorable here. - level : int - Whether to perform an absolute or relative import. This parameter - corresponds exactly to the parameter of the same name accepted by - the `__import__()` built-in: "The default is -1 which indicates - both absolute and relative imports will be attempted. 0 means only - perform absolute imports. Positive values for level indicate the - number of parent directories to search relative to the directory of - the module calling `__import__()`." Defaults to -1 under Python 2 - and 0 under Python 3. Since this default depends on the major - version of the current Python interpreter, depending on this - default can result in unpredictable and non-portable behaviour. - Callers are strongly recommended to explicitly pass this parameter - rather than implicitly accept this default. - - Returns - ---------- - list - List of the graph nodes created for all modules explicitly imported - by this call, including the passed module and all submodules listed - in `target_attr_names` _but_ excluding all parent packages - implicitly imported by this call. If `target_attr_names` is either - `None` or the empty list, this is guaranteed to be a list of one - element: the graph node created for the passed module. As above, - `MissingNode` instances are created for all unimportable modules. - """ - self.msg(3, "_safe_import_hook", target_module_partname, source_module, target_attr_names, level) - - def is_swig_candidate(): - return (source_module is not None and - target_attr_names is None and - level == ABSOLUTE_IMPORT_LEVEL and - type(source_module) is SourceModule and - target_module_partname == - '_' + source_module.identifier.rpartition('.')[2]) - - def is_swig_wrapper(source_module): - with open(source_module.filename, 'rb') as fp: - contents = fp.read() - contents = importlib.util.decode_source(contents) - first_line = contents.splitlines()[0] if contents else '' - self.msg(5, 'SWIG wrapper candidate first line: %r' % (first_line)) - return "automatically generated by SWIG" in first_line - - - # List of the graph nodes created for all target modules both - # imported by and returned from this call, whose: - # - # * First element is the graph node for the core target module - # specified by the "target_module_partname" parameter. - # * Remaining elements are the graph nodes for all target submodules - # specified by the "target_attr_names" parameter. - target_modules = None - - # True if this is a Python 2-style implicit relative import of a - # SWIG-generated C extension. False if we checked and it is not SWIG. - # None if we haven't checked yet. - is_swig_import = None - - # Attempt to import this target module in the customary way. - try: - target_modules = self.import_hook( - target_module_partname, source_module, - target_attr_names=None, level=level, edge_attr=edge_attr) - # Failing that, defer to custom module importers handling non-standard - # import schemes (namely, SWIG). - except InvalidRelativeImportError: - self.msgout(2, "Invalid relative import", level, - target_module_partname, target_attr_names) - result = [] - for sub in target_attr_names or '*': - m = self.createNode(InvalidRelativeImport, - '.' * level + target_module_partname, sub) - self._updateReference(source_module, m, edge_data=edge_attr) - result.append(m) - return result - except ImportError as msg: - # If this is an absolute top-level import under Python 3 and if the - # name to be imported is the caller's name prefixed by "_", this - # could be a SWIG-generated Python 2-style implicit relative import. - # SWIG-generated files contain functions named swig_import_helper() - # importing dynamic libraries residing in the same directory. For - # example, a SWIG-generated caller module "csr.py" might resemble: - # - # # This file was automatically generated by SWIG (http://www.swig.org). - # ... - # def swig_import_helper(): - # ... - # try: - # fp, pathname, description = imp.find_module('_csr', - # [dirname(__file__)]) - # except ImportError: - # import _csr - # return _csr - # - # While there exists no reasonable means for modulegraph to parse - # the call to imp.find_module(), the subsequent implicit relative - # import is trivially parsable. This import is prohibited under - # Python 3, however, and thus parsed only if the caller's file is - # parsable plaintext (as indicated by a filetype of ".py") and the - # first line of this file is the above SWIG header comment. - # - # The constraint that this library's name be the caller's name - # prefixed by '_' is explicitly mandated by SWIG and thus a - # reliable indicator of "SWIG-ness". The SWIG documentation states: - # "When linking the module, the name of the output file has to match - # the name of the module prefixed by an underscore." - # - # Only source modules (e.g., ".py"-suffixed files) are SWIG import - # candidates. All other node types are safely ignorable. - if is_swig_candidate(): - self.msg( - 4, - 'SWIG import candidate (name=%r, caller=%r, level=%r)' % ( - target_module_partname, source_module, level)) - is_swig_import = is_swig_wrapper(source_module) - if is_swig_import: - # Convert this Python 2-compliant implicit relative - # import prohibited by Python 3 into a Python - # 3-compliant explicit relative "from"-style import for - # the duration of this function call by overwriting the - # original parameters passed to this call. - target_attr_names = [target_module_partname] - target_module_partname = '' - level = 1 - self.msg(2, - 'SWIG import (caller=%r, fromlist=%r, level=%r)' - % (source_module, target_attr_names, level)) - # Import this target SWIG C extension's package. - try: - target_modules = self.import_hook( - target_module_partname, source_module, - target_attr_names=None, - level=level, - edge_attr=edge_attr) - except ImportError as msg: - self.msg(2, "SWIG ImportError:", str(msg)) - - # If this module remains unimportable... - if target_modules is None: - self.msg(2, "ImportError:", str(msg)) - - # Add this module as a MissingModule node. - target_module = self.createNode( - MissingModule, - _path_from_importerror(msg, target_module_partname)) - self._updateReference( - source_module, target_module, edge_data=edge_attr) - - # Initialize this list to this node. - target_modules = [target_module] - - # Ensure that the above logic imported exactly one target module. - assert len(target_modules) == 1, ( - 'Expected import_hook() to' - 'return only one module but received: {}'.format(target_modules)) - - # Target module imported above. - target_module = target_modules[0] - - if isinstance(target_module, MissingModule) \ - and is_swig_import is None and is_swig_candidate() \ - and is_swig_wrapper(source_module): - # if this possible swig C module was previously imported from - # a python module other than its corresponding swig python - # module, then it may have been considered a MissingModule. - # Try to reimport it now. For details see pull-request #2578 - # and issue #1522. - # - # If this module was takes as a SWIG candidate above, but failed - # to import, this would be a MissingModule, too. Thus check if - # this was the case (is_swig_import would be not None) to avoid - # recursion error. If `is_swig_import` is None and we are still a - # swig candidate then that means we haven't properly imported this - # swig module yet so do that below. - # - # Remove the MissingModule node from the graph so that we can - # attempt a reimport and avoid collisions. This node should be - # fine to remove because the proper module will be imported and - # added to the graph in the next line (call to _safe_import_hook). - self.removeNode(target_module) - # Reimport the SWIG C module relative to the wrapper - target_modules = self._safe_import_hook( - target_module_partname, source_module, - target_attr_names=None, level=1, edge_attr=edge_attr) - # return the output regardless because it would just be - # duplicating the processing below - return target_modules - - if isinstance(edge_attr, DependencyInfo): - edge_attr = edge_attr._replace(fromlist=True) - - # If this is a "from"-style import *AND* this target module is a - # package, import all attributes listed by the "import" clause of this - # import that are submodules of this package. If this target module is - # *NOT* a package, these attributes are always ignorable globals (e.g., - # classes, variables) defined at the top level of this module. - # - # If this target module is a non-package, it could still contain - # importable submodules (e.g., the non-package `os` module containing - # the `os.path` submodule). In this case, these submodules are already - # imported by this target module's pure-Python code. Since our import - # scanner already detects these imports, these submodules need *NOT* be - # reimported here. (Doing so would be harmless but inefficient.) - if target_attr_names and isinstance(target_module, - (Package, AliasNode)): - # For the name of each attribute imported from this target package - # into this source module... - for target_submodule_partname in target_attr_names: - #FIXME: Is this optimization *REALLY* an optimization or at all - #necessary? The findNode() method called below should already - #be heavily optimized, in which case this optimization here is - #premature, senseless, and should be eliminated. - - # If this attribute is a previously imported submodule of this - # target module, optimize this edge case. - if target_module.is_submodule(target_submodule_partname): - # Graph node for this submodule. - target_submodule = target_module.get_submodule( - target_submodule_partname) - - #FIXME: What? Shouldn't "target_submodule" *ALWAYS* be - #non-None here? Assert this to be non-None instead. - if target_submodule is not None: - #FIXME: Why does duplication matter? List searches are - #mildly expensive. - - # If this submodule has not already been added to the - # list of submodules to be returned, do so. - if target_submodule not in target_modules: - self._updateReference( - source_module, - target_submodule, - edge_data=edge_attr) - target_modules.append(target_submodule) - continue - - # Fully-qualified name of this submodule. - target_submodule_name = ( - target_module.identifier + '.' + target_submodule_partname) - - # Graph node of this submodule if previously imported or None. - target_submodule = self.find_node(target_submodule_name) - - # If this submodule has not been imported, do so as if this - # submodule were the only attribute listed by the "import" - # clause of this import (e.g., as "from foo import bar" rather - # than "from foo import car, far, bar"). - if target_submodule is None: - # Attempt to import this submodule. - try: - # Ignore the list of graph nodes returned by this - # method. If both this submodule's package and this - # submodule are importable, this method returns a - # 2-element list whose second element is this - # submodule's graph node. However, if this submodule's - # package is importable but this submodule is not, - # this submodule is either: - # - # * An ignorable global attribute defined at the top - # level of this package's "__init__" submodule. In - # this case, this method returns a 1-element list - # without raising an exception. - # * A non-ignorable unimportable submodule. In this - # case, this method raises an "ImportError". - # - # While the first two cases are disambiguatable by the - # length of this list, doing so would render this code - # dependent on import_hook() details subject to change. - # Instead, call findNode() to decide the truthiness. - self.import_hook( - target_module_partname, source_module, - target_attr_names=[target_submodule_partname], - level=level, - edge_attr=edge_attr) - - # Graph node of this submodule imported by the prior - # call if importable or None otherwise. - target_submodule = self.find_node(target_submodule_name) - - # If this submodule does not exist, this *MUST* be an - # ignorable global attribute defined at the top level - # of this package's "__init__" submodule. - if target_submodule is None: - # Assert this to actually be the case. - assert target_module.is_global_attr( - target_submodule_partname), ( - 'No global named {} in {}.__init__'.format( - target_submodule_partname, - target_module.identifier)) - - # Skip this safely ignorable importation to the - # next attribute. See similar logic in the body of - # _import_importable_package_submodules(). - self.msg(4, '_safe_import_hook', 'ignoring imported non-module global', target_module.identifier, target_submodule_partname) - continue - - # If this is a SWIG C extension, instruct PyInstaller - # to freeze this extension under its unqualified rather - # than qualified name (e.g., as "_csr" rather than - # "scipy.sparse.sparsetools._csr"), permitting the - # implicit relative import in its parent SWIG module to - # successfully find this extension. - if is_swig_import: - # If a graph node with this name already exists, - # avoid collisions by emitting an error instead. - if self.find_node(target_submodule_partname): - self.msg( - 2, - 'SWIG import error: %r basename %r ' - 'already exists' % ( - target_submodule_name, - target_submodule_partname)) - else: - self.msg( - 4, - 'SWIG import renamed from %r to %r' % ( - target_submodule_name, - target_submodule_partname)) - target_submodule.identifier = ( - target_submodule_partname) - # If this submodule is unimportable, add a MissingModule. - except ImportError as msg: - self.msg(2, "ImportError:", str(msg)) - target_submodule = self.createNode( - MissingModule, target_submodule_name) - - # Add this submodule to its package. - target_module.add_submodule( - target_submodule_partname, target_submodule) - if target_submodule is not None: - self._updateReference( - target_module, target_submodule, edge_data=edge_attr) - self._updateReference( - source_module, target_submodule, edge_data=edge_attr) - - if target_submodule not in target_modules: - target_modules.append(target_submodule) - - # Return the list of all target modules imported by this call. - return target_modules - - - def _scan_code( - self, - module, - module_code_object, - module_code_object_ast=None): - """ - Parse and add all import statements from the passed code object of the - passed source module to this graph, recursively. - - **This method is at the root of all `ModuleGraph` recursion.** - Recursion begins here and ends when all import statements in all code - objects of all modules transitively imported by the source module - passed to the first call to this method have been added to the graph. - Specifically, this method: - - 1. If the passed `module_code_object_ast` parameter is non-`None`, - parses all import statements from this object. - 2. Else, parses all import statements from the passed - `module_code_object` parameter. - 1. For each such import statement: - 1. Adds to this `ModuleGraph` instance: - 1. Nodes for all target modules of these imports. - 1. Directed edges from this source module to these target - modules. - 2. Recursively calls this method with these target modules. - - Parameters - ---------- - module : Node - Graph node of the module to be parsed. - module_code_object : PyCodeObject - Code object providing this module's disassembled Python bytecode. - Ignored unless `module_code_object_ast` is `None`. - module_code_object_ast : optional[ast.AST] - Optional abstract syntax tree (AST) of this module if any or `None` - otherwise. Defaults to `None`, in which case the passed - `module_code_object` is parsed instead. - Returns - ---------- - module : Node - Graph node of the module to be parsed. - """ - - # For safety, guard against multiple scans of the same module by - # resetting this module's list of deferred target imports. - module._deferred_imports = [] - - # Parse all imports from this module *BEFORE* adding these imports to - # the graph. If an AST is provided, parse that rather than this - # module's code object. - if module_code_object_ast is not None: - # Parse this module's AST for imports. - self._scan_ast(module, module_code_object_ast) - - # Parse this module's code object for all relevant non-imports - # (e.g., global variable declarations and undeclarations). - self._scan_bytecode( - module, module_code_object, is_scanning_imports=False) - # Else, parse this module's code object for imports. - else: - self._scan_bytecode( - module, module_code_object, is_scanning_imports=True) - - return module - - def _scan_ast(self, module, module_code_object_ast): - """ - Parse and add all import statements from the passed abstract syntax - tree (AST) of the passed source module to this graph, non-recursively. - - Parameters - ---------- - module : Node - Graph node of the module to be parsed. - module_code_object_ast : ast.AST - Abstract syntax tree (AST) of this module to be parsed. - """ - - visitor = _Visitor(self, module) - visitor.visit(module_code_object_ast) - - #FIXME: Optimize. Global attributes added by this method are tested by - #other methods *ONLY* for packages, implying this method should scan and - #handle opcodes pertaining to global attributes (e.g., - #"STORE_NAME", "DELETE_GLOBAL") only if the passed "module" - #object is an instance of the "Package" class. For all other module types, - #these opcodes should simply be ignored. - # - #After doing so, the "Node._global_attr_names" attribute and all methods - #using this attribute (e.g., Node.is_global()) should be moved from the - #"Node" superclass to the "Package" subclass. - def _scan_bytecode( - self, module, module_code_object, is_scanning_imports): - """ - Parse and add all import statements from the passed code object of the - passed source module to this graph, non-recursively. - - This method parses all reasonably parsable operations (i.e., operations - that are both syntactically and semantically parsable _without_ - requiring Turing-complete interpretation) directly or indirectly - involving module importation from this code object. This includes: - - * `IMPORT_NAME`, denoting an import statement. Ignored unless - the passed `is_scanning_imports` parameter is `True`. - * `STORE_NAME` and `STORE_GLOBAL`, denoting the - declaration of a global attribute (e.g., class, variable) in this - module. This method stores each such declaration for subsequent - lookup. While global attributes are usually irrelevant to import - parsing, they remain the only means of distinguishing erroneous - non-ignorable attempts to import non-existent submodules of a package - from successful ignorable attempts to import existing global - attributes of a package's `__init__` submodule (e.g., the `bar` in - `from foo import bar`, which is either a non-ignorable submodule of - `foo` or an ignorable global attribute of `foo.__init__`). - * `DELETE_NAME` and `DELETE_GLOBAL`, denoting the - undeclaration of a previously declared global attribute in this - module. - - Since `ModuleGraph` is _not_ intended to replicate the behaviour of a - full-featured Turing-complete Python interpreter, this method ignores - operations that are _not_ reasonably parsable from this code object -- - even those directly or indirectly involving module importation. This - includes: - - * `STORE_ATTR(namei)`, implementing `TOS.name = TOS1`. If `TOS` is the - name of a target module currently imported into the namespace of the - passed source module, this opcode would ideally be parsed to add that - global attribute to that target module. Since this addition only - conditionally occurs on the importation of this source module and - execution of the code branch in this module performing this addition, - however, that global _cannot_ be unconditionally added to that target - module. In short, only Turing-complete behaviour suffices. - * `DELETE_ATTR(namei)`, implementing `del TOS.name`. If `TOS` is the - name of a target module currently imported into the namespace of the - passed source module, this opcode would ideally be parsed to remove - that global attribute from that target module. Again, however, only - Turing-complete behaviour suffices. - - Parameters - ---------- - module : Node - Graph node of the module to be parsed. - module_code_object : PyCodeObject - Code object of the module to be parsed. - is_scanning_imports : bool - `True` only if this method is parsing import statements from - `IMPORT_NAME` opcodes. If `False`, no import statements will be - parsed. This parameter is typically: - * `True` when parsing this module's code object for such imports. - * `False` when parsing this module's abstract syntax tree (AST) - (rather than code object) for such imports. In this case, that - parsing will have already parsed import statements, which this - parsing must avoid repeating. - """ - level = None - fromlist = None - - # 'deque' is a list-like container with fast appends, pops on - # either end, and automatically discarding elements too much. - prev_insts = deque(maxlen=2) - for inst in util.iterate_instructions(module_code_object): - if not inst: - continue - # If this is an import statement originating from this module, - # parse this import. - # - # Note that the related "IMPORT_FROM" opcode need *NOT* be parsed. - # "IMPORT_NAME" suffices. For further details, see - # http://probablyprogramming.com/2008/04/14/python-import_name - if inst.opname == 'IMPORT_NAME': - # If this method is ignoring import statements, skip to the - # next opcode. - if not is_scanning_imports: - continue - - # Python >=2.5: LOAD_CONST flags, LOAD_CONST names, IMPORT_NAME name - # - # Python 3.14 split LOAD_CONST into LOAD_CONST, LOAD_CONST_IMMORTAL, - # and LOAD_SMALL_INT. The former two can be used to load the names, - # while LOAD_SMALL_INT can be also used to load the flags. - if sys.version_info >= (3, 14): - assert prev_insts[-2].opname in {'LOAD_CONST', 'LOAD_CONST_IMMORTAL', 'LOAD_SMALL_INT'} - assert prev_insts[-1].opname in {'LOAD_CONST', 'LOAD_CONST_IMMORTAL'} - else: - assert prev_insts[-2].opname == 'LOAD_CONST' - assert prev_insts[-1].opname == 'LOAD_CONST' - - level = prev_insts[-2].argval - fromlist = prev_insts[-1].argval - - assert fromlist is None or type(fromlist) is tuple - target_module_partname = inst.argval - - #FIXME: The exact same logic appears in _collect_import(), - #which isn't particularly helpful. Instead, defer this logic - #until later by: - # - #* Refactor the "_deferred_imports" list to contain 2-tuples - # "(_safe_import_hook_args, _safe_import_hook_kwargs)" rather - # than 3-tuples "(have_star, _safe_import_hook_args, - # _safe_import_hook_kwargs)". - #* Stop prepending these tuples by a "have_star" boolean both - # here, in _collect_import(), and in _process_imports(). - #* Shift the logic below to _process_imports(). - #* Remove the same logic from _collect_import(). - have_star = False - if fromlist is not None: - fromlist = uniq(fromlist) - if '*' in fromlist: - fromlist.remove('*') - have_star = True - - # Record this import as originating from this module for - # subsequent handling by the _process_imports() method. - module._deferred_imports.append(( - have_star, - (target_module_partname, module, fromlist, level), - {} - )) - - elif inst.opname in ('STORE_NAME', 'STORE_GLOBAL'): - # If this is the declaration of a global attribute (e.g., - # class, variable) in this module, store this declaration for - # subsequent lookup. See method docstring for further details. - # - # Global attributes are usually irrelevant to import parsing, but - # remain the only means of distinguishing erroneous non-ignorable - # attempts to import non-existent submodules of a package from - # successful ignorable attempts to import existing global - # attributes of a package's "__init__" submodule (e.g., the "bar" - # in "from foo import bar", which is either a non-ignorable - # submodule of "foo" or an ignorable global attribute of - # "foo.__init__"). - name = inst.argval - module.add_global_attr(name) - - elif inst.opname in ('DELETE_NAME', 'DELETE_GLOBAL'): - # If this is the undeclaration of a previously declared global - # attribute (e.g., class, variable) in this module, remove that - # declaration to prevent subsequent lookup. See method docstring - # for further details. - name = inst.argval - module.remove_global_attr_if_found(name) - - prev_insts.append(inst) - - - def _process_imports(self, source_module): - """ - Graph all target modules whose importations were previously parsed from - the passed source module by a prior call to the `_scan_code()` method - and methods call by that method (e.g., `_scan_ast()`, - `_scan_bytecode()`, `_scan_bytecode_stores()`). - - Parameters - ---------- - source_module : Node - Graph node of the source module to graph target imports for. - """ - - # If this source module imported no target modules, noop. - if not source_module._deferred_imports: - return - - # For each target module imported by this source module... - for have_star, import_info, kwargs in source_module._deferred_imports: - # Graph node of the target module specified by the "from" portion - # of this "from"-style star import (e.g., an import resembling - # "from {target_module_name} import *") or ignored otherwise. - target_modules = self._safe_import_hook(*import_info, **kwargs) - if not target_modules: - # If _safe_import_hook suppressed the module, quietly drop it. - # Do not create an ExcludedModule instance, because that might - # completely suppress the module whereas it might need to be - # included due to reference from another module (that does - # not exclude it via hook). - continue - target_module = target_modules[0] - - # If this is a "from"-style star import, process this import. - if have_star: - #FIXME: Sadly, the current approach to importing attributes - #from "from"-style star imports is... simplistic. This should - #be revised as follows. If this target module is: - # - #* A package: - # * Whose "__init__" submodule defines the "__all__" global - # attribute, only attributes listed by this attribute should - # be imported. - # * Else, *NO* attributes should be imported. - #* A non-package: - # * Defining the "__all__" global attribute, only attributes - # listed by this attribute should be imported. - # * Else, only public attributes whose names are *NOT* - # prefixed by "_" should be imported. - source_module.add_global_attrs_from_module(target_module) - - source_module._starimported_ignored_module_names.update( - target_module._starimported_ignored_module_names) - - # If this target module has no code object and hence is - # unparsable, record its name for posterity. - if target_module.code is None: - target_module_name = import_info[0] - source_module._starimported_ignored_module_names.add( - target_module_name) - - # For safety, prevent these imports from being reprocessed. - source_module._deferred_imports = None - - - def _find_module(self, name, path, parent=None): - """ - 3-tuple describing the physical location of the module with the passed - name if this module is physically findable _or_ raise `ImportError`. - - This high-level method wraps the low-level `modulegraph.find_module()` - function with additional support for graph-based module caching. - - Parameters - ---------- - name : str - Fully-qualified name of the Python module to be found. - path : list - List of the absolute paths of all directories to search for this - module _or_ `None` if the default path list `self.path` is to be - searched. - parent : Node - Package containing this module if this module is a submodule of a - package _or_ `None` if this is a top-level module. - - Returns - ---------- - (filename, loader) - See `modulegraph._find_module()` for details. - - Raises - ---------- - ImportError - If this module is _not_ found. - """ - - if parent is not None: - # assert path is not None - fullname = parent.identifier + '.' + name - else: - fullname = name - - node = self.find_node(fullname) - if node is not None: - self.msg(3, "find_module: already included?", node) - raise ImportError(name) - - if path is None: - if name in sys.builtin_module_names: - return (None, BUILTIN_MODULE) - - path = self.path - - return self._find_module_path(fullname, name, path) - - - def _find_module_path(self, fullname, module_name, search_dirs): - """ - 3-tuple describing the physical location of the module with the passed - name if this module is physically findable _or_ raise `ImportError`. - - This low-level function is a variant on the standard `imp.find_module()` - function with additional support for: - - * Multiple search paths. The passed list of absolute paths will be - iteratively searched for the first directory containing a file - corresponding to this module. - * Compressed (e.g., zipped) packages. - - For efficiency, the higher level `ModuleGraph._find_module()` method - wraps this function with support for module caching. - - Parameters - ---------- - module_name : str - Fully-qualified name of the module to be found. - search_dirs : list - List of the absolute paths of all directories to search for this - module (in order). Searching will halt at the first directory - containing this module. - - Returns - ---------- - (filename, loader) - 2-tuple describing the physical location of this module, where: - * `filename` is the absolute path of this file. - * `loader` is the import loader. - In case of a namespace package, this is a NAMESPACE_PACKAGE - instance - - Raises - ---------- - ImportError - If this module is _not_ found. - """ - self.msgin(4, "_find_module_path <-", fullname, search_dirs) - - # Top-level 2-tuple to be returned. - path_data = None - - # List of the absolute paths of all directories comprising the - # namespace package to which this module belongs if any. - namespace_dirs = [] - - try: - for search_dir in search_dirs: - # PEP 302-compliant importer making loaders for this directory. - importer = pkgutil.get_importer(search_dir) - - # If this directory is not importable, continue. - if importer is None: - # self.msg(4, "_find_module_path importer not found", search_dir) - continue - - # Get the PEP 302-compliant loader object loading this module. - # - # If this importer defines the PEP 451-compliant find_spec() - # method, use that, and obtain loader from spec. This should - # be available on python >= 3.4. - if hasattr(importer, 'find_spec'): - loader = None - spec = importer.find_spec(module_name) - if spec is not None: - loader = spec.loader - namespace_dirs.extend(spec.submodule_search_locations or []) - # Else if this importer defines the PEP 302-compliant find_loader() - # method, use that. - elif hasattr(importer, 'find_loader'): - loader, loader_namespace_dirs = importer.find_loader( - module_name) - namespace_dirs.extend(loader_namespace_dirs) - # Else if this importer defines the Python 2-specific - # find_module() method, fall back to that. Despite the method - # name, this method returns a loader rather than a module. - elif hasattr(importer, 'find_module'): - loader = importer.find_module(module_name) - # Else, raise an exception. - else: - raise ImportError( - "Module %r importer %r loader unobtainable" % (module_name, importer)) - - # If this module is not loadable from this directory, continue. - if loader is None: - # self.msg(4, "_find_module_path loader not found", search_dir) - continue - - # Absolute path of this module. If this module resides in a - # compressed archive, this is the absolute path of this module - # after extracting this module from that archive and hence - # should not exist; else, this path should typically exist. - pathname = None - - # If this loader defines the PEP 302-compliant get_filename() - # method, preferably call that method first. Most if not all - # loaders (including zipimporter objects) define this method. - if hasattr(loader, 'get_filename'): - pathname = loader.get_filename(module_name) - # Else if this loader provides a "path" attribute, defer to that. - elif hasattr(loader, 'path'): - pathname = loader.path - # Else, raise an exception. - else: - raise ImportError( - "Module %r loader %r path unobtainable" % (module_name, loader)) - - # If no path was found, this is probably a namespace package. In - # such case, continue collecting namespace directories. - if pathname is None: - self.msg(4, "_find_module_path path not found", pathname) - continue - - # Return such metadata. - path_data = (pathname, loader) - break - # Else if this is a namespace package, return such metadata. - else: - if namespace_dirs: - path_data = (namespace_dirs[0], - NAMESPACE_PACKAGE(namespace_dirs)) - except UnicodeDecodeError as exc: - self.msgout(1, "_find_module_path -> unicode error", exc) - # Ensure that exceptions are logged, as this function is typically - # called by the import_module() method which squelches ImportErrors. - except Exception as exc: - self.msgout(4, "_find_module_path -> exception", exc) - raise - - # If this module was not found, raise an exception. - self.msgout(4, "_find_module_path ->", path_data) - if path_data is None: - raise ImportError("No module named " + repr(module_name)) - - return path_data - - - def create_xref(self, out=None): - global header, footer, entry, contpl, contpl_linked, imports - if out is None: - out = sys.stdout - scripts = [] - mods = [] - for mod in self.iter_graph(): - name = os.path.basename(mod.graphident) - if isinstance(mod, Script): - scripts.append((name, mod)) - else: - mods.append((name, mod)) - scripts.sort() - mods.sort() - scriptnames = [sn for sn, m in scripts] - scripts.extend(mods) - mods = scripts - - title = "modulegraph cross reference for " + ', '.join(scriptnames) - print(header % {"TITLE": title}, file=out) - - def sorted_namelist(mods): - lst = [os.path.basename(mod.graphident) for mod in mods if mod] - lst.sort() - return lst - for name, m in mods: - content = "" - if isinstance(m, BuiltinModule): - content = contpl % {"NAME": name, - "TYPE": "(builtin module)"} - elif isinstance(m, Extension): - content = contpl % {"NAME": name, - "TYPE": "%s" % m.filename} - else: - url = urllib.request.pathname2url(m.filename or "") - content = contpl_linked % {"NAME": name, "URL": url, - 'TYPE': m.__class__.__name__} - oute, ince = map(sorted_namelist, self.get_edges(m)) - if oute: - links = [] - for n in oute: - links.append(""" %s\n""" % (n, n)) - # #8226 = bullet-point; can't use html-entities since the - # test-suite uses xml.etree.ElementTree.XMLParser, which - # does't supprot them. - links = " • ".join(links) - content += imports % {"HEAD": "imports", "LINKS": links} - if ince: - links = [] - for n in ince: - links.append(""" %s\n""" % (n, n)) - # #8226 = bullet-point; can't use html-entities since the - # test-suite uses xml.etree.ElementTree.XMLParser, which - # does't supprot them. - links = " • ".join(links) - content += imports % {"HEAD": "imported by", "LINKS": links} - print(entry % {"NAME": name, "CONTENT": content}, file=out) - print(footer, file=out) - - def itergraphreport(self, name='G', flatpackages=()): - # XXX: Can this be implemented using Dot()? - nodes = list(map(self.graph.describe_node, self.graph.iterdfs(self))) - describe_edge = self.graph.describe_edge - edges = deque() - packagenodes = set() - packageidents = {} - nodetoident = {} - inpackages = {} - mainedges = set() - - # XXX - implement - flatpackages = dict(flatpackages) - - def nodevisitor(node, data, outgoing, incoming): - if not isinstance(data, Node): - return {'label': str(node)} - #if isinstance(d, (ExcludedModule, MissingModule, BadModule)): - # return None - s = ' ' + type(data).__name__ - for i, v in enumerate(data.infoTuple()[:1], 1): - s += '| %s' % (i, v) - return {'label': s, 'shape': 'record'} - - - def edgevisitor(edge, data, head, tail): - # XXX: This method nonsense, the edge - # data is never initialized. - if data == 'orphan': - return {'style': 'dashed'} - elif data == 'pkgref': - return {'style': 'dotted'} - return {} - - yield 'digraph %s {\ncharset="UTF-8";\n' % (name,) - attr = dict(rankdir='LR', concentrate='true') - cpatt = '%s="%s"' - for item in attr.items(): - yield '\t%s;\n' % (cpatt % item,) - - # find all packages (subgraphs) - for (node, data, outgoing, incoming) in nodes: - nodetoident[node] = getattr(data, 'graphident', None) - if isinstance(data, Package): - packageidents[data.graphident] = node - inpackages[node] = set([node]) - packagenodes.add(node) - - # create sets for subgraph, write out descriptions - for (node, data, outgoing, incoming) in nodes: - # update edges - for edge in (describe_edge(e) for e in outgoing): - edges.append(edge) - - # describe node - yield '\t"%s" [%s];\n' % ( - node, - ','.join([ - (cpatt % item) for item in - nodevisitor(node, data, outgoing, incoming).items() - ]), - ) - - inside = inpackages.get(node) - if inside is None: - inside = inpackages[node] = set() - ident = nodetoident[node] - if ident is None: - continue - pkgnode = packageidents.get(ident[:ident.rfind('.')]) - if pkgnode is not None: - inside.add(pkgnode) - - graph = [] - subgraphs = {} - for key in packagenodes: - subgraphs[key] = [] - - while edges: - edge, data, head, tail = edges.popleft() - if ((head, tail)) in mainedges: - continue - mainedges.add((head, tail)) - tailpkgs = inpackages[tail] - common = inpackages[head] & tailpkgs - if not common and tailpkgs: - usepkgs = sorted(tailpkgs) - if len(usepkgs) != 1 or usepkgs[0] != tail: - edges.append((edge, data, head, usepkgs[0])) - edges.append((edge, 'pkgref', usepkgs[-1], tail)) - continue - if common: - common = common.pop() - if tail == common: - edges.append((edge, data, tail, head)) - elif head == common: - subgraphs[common].append((edge, 'pkgref', head, tail)) - else: - edges.append((edge, data, common, head)) - edges.append((edge, data, common, tail)) - - else: - graph.append((edge, data, head, tail)) - - def do_graph(edges, tabs): - edgestr = tabs + '"%s" -> "%s" [%s];\n' - # describe edge - for (edge, data, head, tail) in edges: - attribs = edgevisitor(edge, data, head, tail) - yield edgestr % ( - head, - tail, - ','.join([(cpatt % item) for item in attribs.items()]), - ) - - for g, edges in subgraphs.items(): - yield '\tsubgraph "cluster_%s" {\n' % (g,) - yield '\t\tlabel="%s";\n' % (nodetoident[g],) - for s in do_graph(edges, '\t\t'): - yield s - yield '\t}\n' - - for s in do_graph(graph, '\t'): - yield s - - yield '}\n' - - def graphreport(self, fileobj=None, flatpackages=()): - if fileobj is None: - fileobj = sys.stdout - fileobj.writelines(self.itergraphreport(flatpackages=flatpackages)) - - def report(self): - """Print a report to stdout, listing the found modules with their - paths, as well as modules that are missing, or seem to be missing. - """ - print() - print("%-15s %-25s %s" % ("Class", "Name", "File")) - print("%-15s %-25s %s" % ("-----", "----", "----")) - for m in sorted(self.iter_graph(), key=lambda n: n.graphident): - if isinstance(m, AliasNode): - print("%-15s %-25s %s" % (type(m).__name__, m.graphident, m.identifier)) - else: - print("%-15s %-25s %s" % (type(m).__name__, m.graphident, m.filename or "")) - - def _replace_paths_in_code(self, co): - new_filename = original_filename = os.path.normpath(co.co_filename) - for f, r in self.replace_paths: - f = os.path.join(f, '') - r = os.path.join(r, '') - if original_filename.startswith(f): - new_filename = r + original_filename[len(f):] - break - - else: - return co - - consts = list(co.co_consts) - for i in range(len(consts)): - if isinstance(consts[i], type(co)): - consts[i] = self._replace_paths_in_code(consts[i]) - - return co.replace(co_consts=tuple(consts), co_filename=new_filename) diff --git a/voxvera/vendor/PyInstaller/lib/modulegraph/util.py b/voxvera/vendor/PyInstaller/lib/modulegraph/util.py deleted file mode 100755 index dab8c06..0000000 --- a/voxvera/vendor/PyInstaller/lib/modulegraph/util.py +++ /dev/null @@ -1,21 +0,0 @@ -import dis -import inspect - - -def iterate_instructions(code_object): - """Delivers the byte-code instructions as a continuous stream. - - Yields `dis.Instruction`. After each code-block (`co_code`), `None` is - yielded to mark the end of the block and to interrupt the steam. - """ - # The arg extension the EXTENDED_ARG opcode represents is automatically handled by get_instructions() but the - # instruction is left in. Get rid of it to make subsequent parsing easier/safer. - yield from (i for i in dis.get_instructions(code_object) if i.opname != "EXTENDED_ARG") - - yield None - - # For each constant in this code object that is itself a code object, - # parse this constant in the same manner. - for constant in code_object.co_consts: - if inspect.iscode(constant): - yield from iterate_instructions(constant) diff --git a/voxvera/vendor/PyInstaller/loader/__init__.py b/voxvera/vendor/PyInstaller/loader/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/loader/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/loader/pyiboot01_bootstrap.py b/voxvera/vendor/PyInstaller/loader/pyiboot01_bootstrap.py deleted file mode 100755 index b0da1dd..0000000 --- a/voxvera/vendor/PyInstaller/loader/pyiboot01_bootstrap.py +++ /dev/null @@ -1,95 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -#-- Start bootstrap process -# Only python built-in modules can be used. - -import sys - -import pyimod02_importers - -# Extend Python import machinery by adding PEP302 importers to sys.meta_path. -pyimod02_importers.install() - -#-- Bootstrap process is complete. -# We can use other python modules (e.g. os) - -import os # noqa: E402 - -# Let other python modules know that the code is running in frozen mode. -if not hasattr(sys, 'frozen'): - sys.frozen = True - -# sys._MEIPASS is now set in the bootloader. Hooray. - -# Python 3 C-API function Py_SetPath() resets sys.prefix to empty string. Python 2 was using PYTHONHOME for sys.prefix. -# Let's do the same for Python 3. -sys.prefix = sys._MEIPASS -sys.exec_prefix = sys.prefix - -# Python 3.3+ defines also sys.base_prefix. Let's set them too. -sys.base_prefix = sys.prefix -sys.base_exec_prefix = sys.exec_prefix - -# Some packages behave differently when running inside virtual environment. E.g., IPython tries to append path -# VIRTUAL_ENV to sys.path. For the frozen app we want to prevent this behavior. -VIRTENV = 'VIRTUAL_ENV' -if VIRTENV in os.environ: - # On some platforms (e.g., AIX) 'os.unsetenv()' is unavailable and deleting the var from os.environ does not - # delete it from the environment. - os.environ[VIRTENV] = '' - del os.environ[VIRTENV] - -# Ensure sys.path contains absolute paths. Otherwise, import of other python modules will fail when current working -# directory is changed by the frozen application. -python_path = [] -for pth in sys.path: - python_path.append(os.path.abspath(pth)) - sys.path = python_path - -# At least on Windows, Python seems to hook up the codecs on this import, so it is not enough to just package up all -# the encodings. -# -# It was also reported that without 'encodings' module, the frozen executable fails to load in some configurations: -# http://www.pyinstaller.org/ticket/651 -# -# Importing 'encodings' module in a run-time hook is not enough, since some run-time hooks require this module, and the -# order of running the code from the run-time hooks is not defined. -try: - import encodings # noqa: F401 -except ImportError: - pass - -# In the Python interpreter 'warnings' module is imported when 'sys.warnoptions' is not empty. Mimic this behavior. -if sys.warnoptions: - import warnings # noqa: F401 - -# Install the hooks for ctypes -import pyimod03_ctypes # noqa: E402 - -pyimod03_ctypes.install() - -# Install the hooks for pywin32 (Windows only) -if sys.platform.startswith('win'): - import pyimod04_pywin32 - pyimod04_pywin32.install() - -# Apply a hack for metadata that was collected from (unzipped) python eggs; the EGG-INFO directories are collected into -# their parent directories (my_package-version.egg/EGG-INFO), and for metadata to be discoverable by -# `importlib.metadata`, the .egg directory needs to be in `sys.path`. The deprecated `pkg_resources` does not have this -# limitation, and seems to work as long as the .egg directory's parent directory (in our case `sys._MEIPASS` is in -# `sys.path`. -for entry in os.listdir(sys._MEIPASS): - entry = os.path.join(sys._MEIPASS, entry) - if not os.path.isdir(entry): - continue - if entry.endswith('.egg'): - sys.path.append(entry) diff --git a/voxvera/vendor/PyInstaller/loader/pyimod01_archive.py b/voxvera/vendor/PyInstaller/loader/pyimod01_archive.py deleted file mode 100755 index 2d70254..0000000 --- a/voxvera/vendor/PyInstaller/loader/pyimod01_archive.py +++ /dev/null @@ -1,140 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# **NOTE** This module is used during bootstrap. -# Import *ONLY* builtin modules or modules that are collected into the base_library.zip archive. -# List of built-in modules: sys.builtin_module_names -# List of modules collected into base_library.zip: PyInstaller.compat.PY3_BASE_MODULES - -import os -import struct -import marshal -import zlib - -# In Python3, the MAGIC_NUMBER value is available in the importlib module. However, in the bootstrap phase we cannot use -# importlib directly, but rather its frozen variant. -import _frozen_importlib - -PYTHON_MAGIC_NUMBER = _frozen_importlib._bootstrap_external.MAGIC_NUMBER - -# Type codes for PYZ PYZ entries -PYZ_ITEM_MODULE = 0 -PYZ_ITEM_PKG = 1 -PYZ_ITEM_DATA = 2 # deprecated; PYZ does not contain any data entries anymore -PYZ_ITEM_NSPKG = 3 # PEP-420 namespace package - - -class ArchiveReadError(RuntimeError): - pass - - -class ZlibArchiveReader: - """ - Reader for PyInstaller's PYZ (ZlibArchive) archive. The archive is used to store collected byte-compiled Python - modules, as individually-compressed entries. - """ - _PYZ_MAGIC_PATTERN = b'PYZ\0' - - def __init__(self, filename, start_offset=None, check_pymagic=False): - self._filename = filename - self._start_offset = start_offset - - self.toc = {} - - # If no offset is given, try inferring it from filename - if start_offset is None: - self._filename, self._start_offset = self._parse_offset_from_filename(filename) - - # Parse header and load TOC. Standard header contains 12 bytes: PYZ magic pattern, python bytecode magic - # pattern, and offset to TOC (32-bit integer). It might be followed by additional fields, depending on - # implementation version. - with open(self._filename, "rb") as fp: - # Read PYZ magic pattern, located at the start of the file - fp.seek(self._start_offset, os.SEEK_SET) - - magic = fp.read(len(self._PYZ_MAGIC_PATTERN)) - if magic != self._PYZ_MAGIC_PATTERN: - raise ArchiveReadError("PYZ magic pattern mismatch!") - - # Read python magic/version number - pymagic = fp.read(len(PYTHON_MAGIC_NUMBER)) - if check_pymagic and pymagic != PYTHON_MAGIC_NUMBER: - raise ArchiveReadError("Python magic pattern mismatch!") - - # Read TOC offset - toc_offset, *_ = struct.unpack('!i', fp.read(4)) - - # Load TOC - fp.seek(self._start_offset + toc_offset, os.SEEK_SET) - self.toc = dict(marshal.load(fp)) - - @staticmethod - def _parse_offset_from_filename(filename): - """ - Parse the numeric offset from filename, stored as: `/path/to/file?offset`. - """ - offset = 0 - - idx = filename.rfind('?') - if idx == -1: - return filename, offset - - try: - offset = int(filename[idx + 1:]) - filename = filename[:idx] # Remove the offset from filename - except ValueError: - # Ignore spurious "?" in the path (for example, like in Windows UNC \\?\). - pass - - return filename, offset - - def extract(self, name, raw=False): - """ - Extract data from entry with the given name. - - If the entry belongs to a module or a package, the data is loaded (unmarshaled) into code object. To retrieve - raw data, set `raw` flag to True. - """ - # Look up entry - entry = self.toc.get(name) - if entry is None: - raise KeyError(f"No entry named {name!r} found in the archive!") - - typecode, entry_offset, entry_length = entry - - # PEP-420 namespace package does not have a data blob. - if typecode == PYZ_ITEM_NSPKG: - return None - - # Read data blob - try: - with open(self._filename, "rb") as fp: - fp.seek(self._start_offset + entry_offset) - obj = fp.read(entry_length) - except FileNotFoundError: - # We open the archive file each time we need to read from it, to avoid locking the file by keeping it open. - # This allows executable to be deleted or moved (renamed) while it is running, which is useful in certain - # scenarios (e.g., automatic update that replaces the executable). The caveat is that once the executable is - # renamed, we cannot read from its embedded PYZ archive anymore. In such case, exit with informative - # message. - raise SystemExit( - f"ERROR: {self._filename} appears to have been moved or deleted since this application was launched. " - "Continouation from this state is impossible. Exiting now." - ) - - try: - obj = zlib.decompress(obj) - if typecode in (PYZ_ITEM_MODULE, PYZ_ITEM_PKG) and not raw: - obj = marshal.loads(obj) - except EOFError as e: - raise ImportError(f"Failed to unmarshal PYZ entry {name!r}!") from e - - return obj diff --git a/voxvera/vendor/PyInstaller/loader/pyimod02_importers.py b/voxvera/vendor/PyInstaller/loader/pyimod02_importers.py deleted file mode 100755 index 68c22bc..0000000 --- a/voxvera/vendor/PyInstaller/loader/pyimod02_importers.py +++ /dev/null @@ -1,781 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -PEP-302 and PEP-451 importers for frozen applications. -""" - -# **NOTE** This module is used during bootstrap. -# Import *ONLY* builtin modules or modules that are collected into the base_library.zip archive. -# List of built-in modules: sys.builtin_module_names -# List of modules collected into base_library.zip: PyInstaller.compat.PY3_BASE_MODULES - -import sys -import os -import io - -import _frozen_importlib -import _thread - -import pyimod01_archive - -if sys.flags.verbose and sys.stderr: - - def trace(msg, *a): - sys.stderr.write(msg % a) - sys.stderr.write("\n") -else: - - def trace(msg, *a): - pass - - -def _decode_source(source_bytes): - """ - Decode bytes representing source code and return the string. Universal newline support is used in the decoding. - Based on CPython's implementation of the same functionality: - https://github.com/python/cpython/blob/3.9/Lib/importlib/_bootstrap_external.py#L679-L688 - """ - # Local import to avoid including `tokenize` and its dependencies in `base_library.zip` - from tokenize import detect_encoding - source_bytes_readline = io.BytesIO(source_bytes).readline - encoding = detect_encoding(source_bytes_readline) - newline_decoder = io.IncrementalNewlineDecoder(decoder=None, translate=True) - return newline_decoder.decode(source_bytes.decode(encoding[0])) - - -# Global instance of PYZ archive reader. Initialized by install(). -pyz_archive = None - -# Some runtime hooks might need to traverse available frozen package/module hierarchy to simulate filesystem. -# Such traversals can be efficiently implemented using a prefix tree (trie), whose computation we defer until first -# access. -_pyz_tree_lock = _thread.RLock() -_pyz_tree = None - - -def get_pyz_toc_tree(): - global _pyz_tree - - with _pyz_tree_lock: - if _pyz_tree is None: - _pyz_tree = _build_pyz_prefix_tree(pyz_archive) - return _pyz_tree - - -# Populate list of unresolved (original) and resolved paths to top-level directory, used when trying to determine -# relative path. -_TOP_LEVEL_DIRECTORY_PATHS = [] - -# Original sys._MEIPASS value; ensure separators are normalized (e.g., when using msys2 python). -_TOP_LEVEL_DIRECTORY = os.path.normpath(sys._MEIPASS) -_TOP_LEVEL_DIRECTORY_PATHS.append(_TOP_LEVEL_DIRECTORY) - -# Fully resolve sys._MEIPASS in case its location is symlinked at some level; for example, system temporary directory -# (used by onefile builds) is usually a symbolic link under macOS. -_RESOLVED_TOP_LEVEL_DIRECTORY = os.path.realpath(_TOP_LEVEL_DIRECTORY) -if os.path.normcase(_RESOLVED_TOP_LEVEL_DIRECTORY) != os.path.normcase(_TOP_LEVEL_DIRECTORY): - _TOP_LEVEL_DIRECTORY_PATHS.append(_RESOLVED_TOP_LEVEL_DIRECTORY) - -# If we are running as macOS .app bundle, compute the alternative top-level directory path as well. -_is_macos_app_bundle = False -if sys.platform == 'darwin' and _TOP_LEVEL_DIRECTORY.endswith("Contents/Frameworks"): - _is_macos_app_bundle = True - - _ALTERNATIVE_TOP_LEVEL_DIRECTORY = os.path.join( - os.path.dirname(_TOP_LEVEL_DIRECTORY), - 'Resources', - ) - _TOP_LEVEL_DIRECTORY_PATHS.append(_ALTERNATIVE_TOP_LEVEL_DIRECTORY) - - _RESOLVED_ALTERNATIVE_TOP_LEVEL_DIRECTORY = os.path.join( - os.path.dirname(_RESOLVED_TOP_LEVEL_DIRECTORY), - 'Resources', - ) - if _RESOLVED_ALTERNATIVE_TOP_LEVEL_DIRECTORY != _ALTERNATIVE_TOP_LEVEL_DIRECTORY: - _TOP_LEVEL_DIRECTORY_PATHS.append(_RESOLVED_ALTERNATIVE_TOP_LEVEL_DIRECTORY) - - -# Helper for computing PYZ prefix tree -def _build_pyz_prefix_tree(pyz_archive): - tree = dict() - for entry_name, entry_data in pyz_archive.toc.items(): - name_components = entry_name.split('.') - typecode = entry_data[0] - current = tree - if typecode in {pyimod01_archive.PYZ_ITEM_PKG, pyimod01_archive.PYZ_ITEM_NSPKG}: - # Package; create new dictionary node for its modules - for name_component in name_components: - current = current.setdefault(name_component, {}) - else: - # Module; create the leaf node (empty string) - for name_component in name_components[:-1]: - current = current.setdefault(name_component, {}) - current[name_components[-1]] = '' - return tree - - -class PyiFrozenFinder: - """ - PyInstaller's frozen path entry finder for specific search path. - - Per-path instances allow us to properly translate the given module name ("fullname") into full PYZ entry name. - For example, with search path being `sys._MEIPASS`, the module "mypackage.mod" would translate to "mypackage.mod" - in the PYZ archive. However, if search path was `sys._MEIPASS/myotherpackage/_vendored` (for example, if - `myotherpacakge` added this path to `sys.path`), then "mypackage.mod" would need to translate to - "myotherpackage._vendored.mypackage.mod" in the PYZ archive. - """ - def __repr__(self): - return f"{self.__class__.__name__}({self._path})" - - @classmethod - def path_hook(cls, path): - trace(f"PyInstaller: running path finder hook for path: {path!r}") - try: - finder = cls(path) - trace("PyInstaller: hook succeeded") - return finder - except Exception as e: - trace(f"PyInstaller: hook failed: {e}") - raise - - def __init__(self, path): - self._path = path # Store original path, as given. - self._pyz_archive = pyz_archive - - # Compute relative path to the top-level application directory. Do not try to resolve the path itself, because - # it might contain symbolic links in parts other than the prefix that corresponds to the top-level application - # directory. See #8994 for an example (files symlinked from a common directory outside of the top-level - # application directory). Instead, try to compute relative path w.r.t. the original and the resolved top-level - # application directory. - for top_level_path in _TOP_LEVEL_DIRECTORY_PATHS: - try: - relative_path = os.path.relpath(path, top_level_path) - except ValueError: - continue # Failed to compute relative path w.r.t. the given top-level directory path. - - if relative_path.startswith('..'): - continue # Relative path points outside of the given top-level directory. - - break # Successful match; stop here. - else: - raise ImportError("Failed to determine relative path w.r.t. top-level application directory.") - - # Ensure that path does not point to a file on filesystem. Strictly speaking, we should be checking that the - # given path is a valid directory, but that would need to check both PYZ and filesystem. So for now, limit the - # check to catch paths pointing to file, because that breaks `runpy.run_path()`, as per #8767. - if os.path.isfile(path): - raise ImportError("only directories are supported") - - if relative_path == '.': - self._pyz_entry_prefix = '' - else: - self._pyz_entry_prefix = '.'.join(relative_path.split(os.path.sep)) - - def _compute_pyz_entry_name(self, fullname): - """ - Convert module fullname into PYZ entry name, subject to the prefix implied by this finder's search path. - """ - tail_module = fullname.rpartition('.')[2] - - if self._pyz_entry_prefix: - return self._pyz_entry_prefix + "." + tail_module - else: - return tail_module - - @property - def fallback_finder(self): - """ - Opportunistically create a *fallback finder* using `sys.path_hooks` entries that are located *after* our hook. - The main goal of this exercise is to obtain an instance of python's FileFinder, but in theory any other hook - that comes after ours is eligible to be a fallback. - - Having this fallback allows our finder to "cooperate" with python's FileFinder, as if the two were a single - finder, which allows us to work around the python's PathFinder permitting only one finder instance per path - without subclassing FileFinder. - """ - if hasattr(self, '_fallback_finder'): - return self._fallback_finder - - # Try to instantiate fallback finder - our_hook_found = False - - self._fallback_finder = None - for idx, hook in enumerate(sys.path_hooks): - if hook == self.path_hook: - our_hook_found = True - continue # Our hook - - if not our_hook_found: - continue # Skip hooks before our hook - - try: - self._fallback_finder = hook(self._path) - break - except ImportError: - pass - - return self._fallback_finder - - def _find_fallback_spec(self, fullname, target): - """ - Attempt to find the spec using fallback finder, which is opportunistically created here. Typically, this would - be python's FileFinder, which can discover specs for on-filesystem modules, such as extension modules and - modules that are collected only as source .py files. - - Having this fallback allows our finder to "cooperate" with python's FileFinder, as if the two were a single - finder, which allows us to work around the python's PathFinder permitting only one finder instance per path - without subclassing FileFinder. - """ - if not hasattr(self, '_fallback_finder'): - self._fallback_finder = self._get_fallback_finder() - - if self._fallback_finder is None: - return None - - return self._fallback_finder.find_spec(fullname, target) - - #-- Core PEP451 finder functionality, modeled after importlib.abc.PathEntryFinder - # https://docs.python.org/3/library/importlib.html#importlib.abc.PathEntryFinder - def invalidate_caches(self): - """ - A method which, when called, should invalidate any internal cache used by the finder. Used by - importlib.invalidate_caches() when invalidating the caches of all finders on sys.meta_path. - - https://docs.python.org/3/library/importlib.html#importlib.abc.MetaPathFinder.invalidate_caches - """ - # We do not use any caches, but if we have created a fallback finder, propagate the function call. - # NOTE: use getattr() with _fallback_finder attribute, in order to avoid unnecessary creation of the - # fallback finder in case when it does not exist yet. - fallback_finder = getattr(self, '_fallback_finder', None) - if fallback_finder is not None: - if hasattr(fallback_finder, 'invalidate_caches'): - fallback_finder.invalidate_caches() - - def find_spec(self, fullname, target=None): - """ - A method for finding a spec for the specified module. The finder will search for the module only within the - path entry to which it is assigned. If a spec cannot be found, None is returned. When passed in, target is a - module object that the finder may use to make a more educated guess about what spec to return. - - https://docs.python.org/3/library/importlib.html#importlib.abc.PathEntryFinder.find_spec - """ - trace(f"{self}: find_spec: called with fullname={fullname!r}, target={fullname!r}") - - # Convert fullname to PYZ entry name. - pyz_entry_name = self._compute_pyz_entry_name(fullname) - - # Try looking up the entry in the PYZ archive - entry_data = self._pyz_archive.toc.get(pyz_entry_name) - if entry_data is None: - # Entry not found - try using fallback finder (for example, python's own FileFinder) to resolve on-disk - # resources, such as extension modules and modules that are collected only as source .py files. - trace(f"{self}: find_spec: {fullname!r} not found in PYZ...") - - if self.fallback_finder is not None: - trace(f"{self}: find_spec: attempting resolve using fallback finder {self.fallback_finder!r}.") - fallback_spec = self.fallback_finder.find_spec(fullname, target) - trace(f"{self}: find_spec: fallback finder returned spec: {fallback_spec!r}.") - return fallback_spec - else: - trace(f"{self}: find_spec: fallback finder is not available.") - - return None - - # Entry found - typecode = entry_data[0] - trace(f"{self}: find_spec: found {fullname!r} in PYZ as {pyz_entry_name!r}, typecode={typecode}") - - if typecode == pyimod01_archive.PYZ_ITEM_NSPKG: - # PEP420 namespace package - # We can use regular list for submodule_search_locations; the caller (i.e., python's PathFinder) takes care - # of constructing _NamespacePath from it. - spec = _frozen_importlib.ModuleSpec(fullname, None) - spec.submodule_search_locations = [ - # NOTE: since we are using sys._MEIPASS as prefix, we need to construct path from resolved PYZ entry - # name (equivalently, we could combine `self._path` and last part of `fullname`). - os.path.join(sys._MEIPASS, pyz_entry_name.replace('.', os.path.sep)), - ] - return spec - - is_package = typecode == pyimod01_archive.PYZ_ITEM_PKG - - # Instantiate frozen loader for the module - loader = PyiFrozenLoader( - name=fullname, - pyz_archive=self._pyz_archive, - pyz_entry_name=pyz_entry_name, - is_package=is_package, - ) - - # Resolve full filename, as if the module/package was located on filesystem. This is done by the loader. - origin = loader.path - - # Construct spec for module, using all collected information. - spec = _frozen_importlib.ModuleSpec( - fullname, - loader, - is_package=is_package, - origin=origin, - ) - - # Make the import machinery set __file__. - # PEP 451 says: "has_location" is true if the module is locatable. In that case the spec's origin is used - # as the location and __file__ is set to spec.origin. If additional location information is required - # (e.g., zipimport), that information may be stored in spec.loader_state. - spec.has_location = True - - # Set submodule_search_locations for packages. Seems to be required for importlib_resources from 3.2.0; - # see issue #5395. - if is_package: - spec.submodule_search_locations = [os.path.dirname(origin)] - - return spec - - # The following methods are part of legacy PEP302 finder interface. They have been deprecated since python 3.4, - # and removed in python 3.12. Provide compatibility shims to accommodate code that might still be using them. - if sys.version_info[:2] < (3, 12): - - def find_loader(self, fullname): - """ - A legacy method for finding a loader for the specified module. Returns a 2-tuple of (loader, portion) where - portion is a sequence of file system locations contributing to part of a namespace package. The loader may - be None while specifying portion to signify the contribution of the file system locations to a namespace - package. An empty list can be used for portion to signify the loader is not part of a namespace package. If - loader is None and portion is the empty list then no loader or location for a namespace package were found - (i.e. failure to find anything for the module). - - Deprecated since python 3.4, removed in 3.12. - """ - # Based on: - # https://github.com/python/cpython/blob/v3.11.9/Lib/importlib/_bootstrap_external.py#L1587-L1600 - spec = self.find_spec(fullname) - if spec is None: - return None, [] - return spec.loader, spec.submodule_search_locations or [] - - def find_module(self, fullname): - """ - A concrete implementation of Finder.find_module() which is equivalent to self.find_loader(fullname)[0]. - - Deprecated since python 3.4, removed in 3.12. - """ - # Based on: - # https://github.com/python/cpython/blob/v3.11.9/Lib/importlib/_bootstrap_external.py#L1585 - # https://github.com/python/cpython/blob/v3.11.9/Lib/importlib/_bootstrap_external.py#L622-L639 - # - loader, portions = self.find_loader(fullname) - return loader - - -# Helper for enforcing module name in PyiFrozenLoader methods. -def _check_name(method): - def _check_name_wrapper(self, name, *args, **kwargs): - if self.name != name: - raise ImportError(f'loader for {self.name} cannot handle {name}', name=name) - return method(self, name, *args, **kwargs) - - return _check_name_wrapper - - -class PyiFrozenLoader: - """ - PyInstaller's frozen loader for modules in the PYZ archive, which are discovered by PyiFrozenFinder. - - Since this loader is instantiated only from PyiFrozenFinder and since each loader instance is tied to a specific - module, the fact that the loader was instantiated serves as the proof that the module exists in the PYZ archive. - Hence, we can avoid any additional validation in the implementation of the loader's methods. - """ - def __init__(self, name, pyz_archive, pyz_entry_name, is_package): - # Store the reference to PYZ archive (for code object retrieval), as well as full PYZ entry name - # and typecode, all of which are passed from the PyiFrozenFinder. - self._pyz_archive = pyz_archive - self._pyz_entry_name = pyz_entry_name - self._is_package = is_package - - # Compute the module file path, as if module was located on filesystem. - # - # Rather than returning path to the .pyc file, return the path to .py file - which might actually exist, if it - # was explicitly collected into the frozen application). This improves compliance with - # https://docs.python.org/3/library/importlib.html#importlib.abc.ExecutionLoader.get_filename - # as well as general compatibility with 3rd party code that blindly assumes that module's file path points to - # the source .py file. - # - # NOTE: since we are using sys._MEIPASS as prefix, we need to construct path from full PYZ entry name - # (so that a module with `name`=`jaraco.text` and `pyz_entry_name`=`setuptools._vendor.jaraco.text` - # ends up with path set to `sys._MEIPASS/setuptools/_vendor/jaraco/text/__init__.pyc` instead of - # `sys._MEIPASS/jaraco/text/__init__.pyc`). - if is_package: - module_file = os.path.join(sys._MEIPASS, pyz_entry_name.replace('.', os.path.sep), '__init__.py') - else: - module_file = os.path.join(sys._MEIPASS, pyz_entry_name.replace('.', os.path.sep) + '.py') - - # These properties are defined as part of importlib.abc.FileLoader. They are used by our implementation - # (e.g., module name validation, get_filename(), get_source(), get_resource_reader()), and might also be used - # by 3rd party code that naively expects to be dealing with a FileLoader instance. - self.name = name # The name of the module the loader can handle. - self.path = module_file # Path to the file of the module - - #-- Core PEP451 loader functionality as defined by importlib.abc.Loader - # https://docs.python.org/3/library/importlib.html#importlib.abc.Loader - def create_module(self, spec): - """ - A method that returns the module object to use when importing a module. This method may return None, indicating - that default module creation semantics should take place. - - https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.create_module - """ - return None - - def exec_module(self, module): - """ - A method that executes the module in its own namespace when a module is imported or reloaded. The module - should already be initialized when exec_module() is called. When this method exists, create_module() - must be defined. - - https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.exec_module - """ - spec = module.__spec__ - bytecode = self.get_code(spec.name) # NOTE: get_code verifies that `spec.name` matches `self.name`! - if bytecode is None: - raise RuntimeError(f"Failed to retrieve bytecode for {spec.name!r}!") - - # Set by the import machinery - assert hasattr(module, '__file__') - - # If `submodule_search_locations` is not None, this is a package; set __path__. - if spec.submodule_search_locations is not None: - module.__path__ = spec.submodule_search_locations - - exec(bytecode, module.__dict__) - - # The following method is part of legacy PEP302 loader interface. It has been deprecated since python 3.4, and - # slated for removal in python 3.12, although that has not happened yet. Provide compatibility shim to accommodate - # code that might still be using it. - if True: - - @_check_name - def load_module(self, fullname): - """ - A legacy method for loading a module. If the module cannot be loaded, ImportError is raised, otherwise the - loaded module is returned. - - Deprecated since python 3.4, slated for removal in 3.12 (but still present in python's own FileLoader in - both v3.12.4 and v3.13.0rc1). - """ - # Based on: - # https://github.com/python/cpython/blob/v3.11.9/Lib/importlib/_bootstrap_external.py#L942-L945 - import importlib._bootstrap as _bootstrap - return _bootstrap._load_module_shim(self, fullname) - - #-- PEP302 protocol extensions as defined by importlib.abc.ExecutionLoader - # https://docs.python.org/3/library/importlib.html#importlib.abc.ExecutionLoader - @_check_name - def get_filename(self, fullname): - """ - A method that is to return the value of __file__ for the specified module. If no path is available, ImportError - is raised. - - If source code is available, then the method should return the path to the source file, regardless of whether a - bytecode was used to load the module. - - https://docs.python.org/3/library/importlib.html#importlib.abc.ExecutionLoader.get_filename - """ - return self.path - - #-- PEP302 protocol extensions as defined by importlib.abc.InspectLoader - # https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader - @_check_name - def get_code(self, fullname): - """ - Return the code object for a module, or None if the module does not have a code object (as would be the case, - for example, for a built-in module). Raise an ImportError if loader cannot find the requested module. - - https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader.get_code - """ - return self._pyz_archive.extract(self._pyz_entry_name) - - @_check_name - def get_source(self, fullname): - """ - A method to return the source of a module. It is returned as a text string using universal newlines, translating - all recognized line separators into '\n' characters. Returns None if no source is available (e.g. a built-in - module). Raises ImportError if the loader cannot find the module specified. - - https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader.get_source - """ - # The `path` attribute (which is also returned from `get_filename()`) already points to where the source .py - # file should exist, if it is available. - filename = self.path - - try: - # Read in binary mode, then decode - with open(filename, 'rb') as fp: - source_bytes = fp.read() - return _decode_source(source_bytes) - except FileNotFoundError: - pass - - # Source code is unavailable. - return None - - @_check_name - def is_package(self, fullname): - """ - A method to return a true value if the module is a package, a false value otherwise. ImportError is raised if - the loader cannot find the module. - - https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader.is_package - """ - return self._is_package - - #-- PEP302 protocol extensions as dfined by importlib.abc.ResourceLoader - # https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceLoader - def get_data(self, path): - """ - A method to return the bytes for the data located at path. Loaders that have a file-like storage back-end that - allows storing arbitrary data can implement this abstract method to give direct access to the data stored. - OSError is to be raised if the path cannot be found. The path is expected to be constructed using a module’s - __file__ attribute or an item from a package’s __path__. - - https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceLoader.get_data - """ - # Try to fetch the data from the filesystem. Since __file__ attribute works properly, just try to open the file - # and read it. - with open(path, 'rb') as fp: - return fp.read() - - #-- Support for `importlib.resources`. - @_check_name - def get_resource_reader(self, fullname): - """ - Return resource reader compatible with `importlib.resources`. - """ - return PyiFrozenResourceReader(self) - - -class PyiFrozenResourceReader: - """ - Resource reader for importlib.resources / importlib_resources support. - - Supports only on-disk resources, which should cover the typical use cases, i.e., the access to data files; - PyInstaller collects data files onto filesystem, and as of v6.0.0, the embedded PYZ archive is guaranteed - to contain only .pyc modules. - - When listing resources, source .py files will not be listed as they are not collected by default. Similarly, - sub-directories that contained only .py files are not reconstructed on filesystem, so they will not be listed, - either. If access to .py files is required for whatever reason, they need to be explicitly collected as data files - anyway, which will place them on filesystem and make them appear as resources. - - For on-disk resources, we *must* return path compatible with pathlib.Path() in order to avoid copy to a temporary - file, which might break under some circumstances, e.g., metpy with importlib_resources back-port, due to: - https://github.com/Unidata/MetPy/blob/a3424de66a44bf3a92b0dcacf4dff82ad7b86712/src/metpy/plots/wx_symbols.py#L24-L25 - (importlib_resources tries to use 'fonts/wx_symbols.ttf' as a temporary filename suffix, which fails as it contains - a separator). - - Furthermore, some packages expect files() to return either pathlib.Path or zipfile.Path, e.g., - https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/core/utils/resource_utils.py#L81-L97 - This makes implementation of mixed support for on-disk and embedded resources using importlib.abc.Traversable - protocol rather difficult. - - So in order to maximize compatibility with unfrozen behavior, the below implementation is basically equivalent of - importlib.readers.FileReader from python 3.10: - https://github.com/python/cpython/blob/839d7893943782ee803536a47f1d4de160314f85/Lib/importlib/readers.py#L11 - and its underlying classes, importlib.abc.TraversableResources and importlib.abc.ResourceReader: - https://github.com/python/cpython/blob/839d7893943782ee803536a47f1d4de160314f85/Lib/importlib/abc.py#L422 - https://github.com/python/cpython/blob/839d7893943782ee803536a47f1d4de160314f85/Lib/importlib/abc.py#L312 - """ - def __init__(self, loader): - # Local import to avoid including `pathlib` and its dependencies in `base_library.zip` - import pathlib - # This covers both modules and (regular) packages. Note that PEP-420 namespace packages are not handled by this - # resource reader (since they are not handled by PyiFrozenLoader, which uses this reader). - self.path = pathlib.Path(loader.path).parent - - def open_resource(self, resource): - return self.files().joinpath(resource).open('rb') - - def resource_path(self, resource): - return str(self.path.joinpath(resource)) - - def is_resource(self, path): - return self.files().joinpath(path).is_file() - - def contents(self): - return (item.name for item in self.files().iterdir()) - - def files(self): - return self.path - - -class PyiFrozenEntryPointLoader: - """ - A special loader that enables retrieval of the code-object for the __main__ module. - """ - def __repr__(self): - return self.__class__.__name__ - - def get_code(self, fullname): - if fullname == '__main__': - # Special handling for __main__ module; the bootloader should store code object to _pyi_main_co - # attribute of the module. - return sys.modules['__main__']._pyi_main_co - - raise ImportError(f'{self} cannot handle module {fullname!r}') - - -def install(): - """ - Install PyInstaller's frozen finders/loaders/importers into python's import machinery. - """ - # Setup PYZ archive reader. - # - # The bootloader should store the path to PYZ archive (the path to the PKG archive and the offset within it; for - # executable-embedded archive, this is for example /path/executable_name?117568) into _pyinstaller_pyz - # attribute of the sys module. - global pyz_archive - - if not hasattr(sys, '_pyinstaller_pyz'): - raise RuntimeError("Bootloader did not set sys._pyinstaller_pyz!") - - try: - pyz_archive = pyimod01_archive.ZlibArchiveReader(sys._pyinstaller_pyz, check_pymagic=True) - except Exception as e: - raise RuntimeError("Failed to setup PYZ archive reader!") from e - - delattr(sys, '_pyinstaller_pyz') - - # On Windows, there is finder called `_frozen_importlib.WindowsRegistryFinder`, which looks for Python module - # locations in Windows registry. The frozen application should not look for those, so remove this finder - # from `sys.meta_path`. - for entry in sys.meta_path: - if getattr(entry, '__name__', None) == 'WindowsRegistryFinder': - sys.meta_path.remove(entry) - break - - # Insert our hook for `PyiFrozenFinder` into `sys.path_hooks`. Place it after `zipimporter`, if available. - for idx, entry in enumerate(sys.path_hooks): - if getattr(entry, '__name__', None) == 'zipimporter': - trace(f"PyInstaller: inserting our finder hook at index {idx + 1} in sys.path_hooks.") - sys.path_hooks.insert(idx + 1, PyiFrozenFinder.path_hook) - break - else: - trace("PyInstaller: zipimporter hook not found in sys.path_hooks! Prepending our finder hook to the list.") - sys.path_hooks.insert(0, PyiFrozenFinder.path_hook) - - # Monkey-patch `zipimporter.get_source` to allow loading out-of-zip source .py files for modules that are - # in `base_library.zip`. - _patch_zipimporter_get_source() - - # Python might have already created a `FileFinder` for `sys._MEIPASS`. Remove the entry from path importer cache, - # so that next loading attempt creates `PyiFrozenFinder` instead. This could probably be avoided altogether if - # we refrained from adding `sys._MEIPASS` to `sys.path` until our importer hooks is in place. - sys.path_importer_cache.pop(sys._MEIPASS, None) - - # Set the PyiFrozenEntryPointLoader as loader for __main__, in order for python to treat __main__ as a module - # instead of a built-in, and to allow its code object to be retrieved. - try: - sys.modules['__main__'].__loader__ = PyiFrozenEntryPointLoader() - except Exception: - pass - - # Apply hack for python >= 3.11 and its frozen stdlib modules. - if sys.version_info >= (3, 11): - _fixup_frozen_stdlib() - - -# A hack for python >= 3.11 and its frozen stdlib modules. Unless `sys._stdlib_dir` is set, these modules end up -# missing __file__ attribute, which causes problems with 3rd party code. At the time of writing, python interpreter -# configuration API does not allow us to influence `sys._stdlib_dir` - it always resets it to `None`. Therefore, -# we manually set the path, and fix __file__ attribute on modules. -def _fixup_frozen_stdlib(): - import _imp # built-in - - # If sys._stdlib_dir is None or empty, override it with sys._MEIPASS - if not sys._stdlib_dir: - try: - sys._stdlib_dir = sys._MEIPASS - except AttributeError: - pass - - # The sys._stdlib_dir set above should affect newly-imported python-frozen modules. However, most of them have - # been already imported during python initialization and our bootstrap, so we need to retroactively fix their - # __file__ attribute. - for module_name, module in sys.modules.items(): - if not _imp.is_frozen(module_name): - continue - - is_pkg = _imp.is_frozen_package(module_name) - - # Determine "real" name from __spec__.loader_state. - loader_state = module.__spec__.loader_state - - orig_name = loader_state.origname - if is_pkg: - orig_name += '.__init__' - - # We set suffix to .pyc to be consistent with our PyiFrozenLoader. - filename = os.path.join(sys._MEIPASS, *orig_name.split('.')) + '.pyc' - - # Fixup the __file__ attribute - if not hasattr(module, '__file__'): - try: - module.__file__ = filename - except AttributeError: - pass - - # Fixup the loader_state.filename - # Except for _frozen_importlib (importlib._bootstrap), whose loader_state.filename appears to be left at - # None in python. - if loader_state.filename is None and orig_name != 'importlib._bootstrap': - loader_state.filename = filename - - -# Monkey-patch the `get_source` implementation of python's `zipimport.zipimporter` with our custom implementation that -# looks up for source files in top-level application directory instead of within the zip file. This allows us to collect -# source .py files for modules that are collected in the `base_library.zip` in the same way as for modules in the PYZ -# archive. -def _patch_zipimporter_get_source(): - import zipimport - - _orig_get_source = zipimport.zipimporter.get_source - - def _get_source(self, fullname): - # Call original implementation first, in case we are dealing with a zip file other than `base_library.zip` (or - # if the source .py file is actually in there, for whatever reason). This also implicitly validates the module - # name, as it raises exception if module does not exist and returns None if module exists but the source code - # is not present in the archive. - source = _orig_get_source(self, fullname) - if source is not None: - return source - - # Our override should apply only to `base_library.zip`. - if os.path.basename(self.archive) != 'base_library.zip': - return None - - # Translate module/package name into .py filename in the top-level application directory. - if self.is_package(fullname): - filename = os.path.join(*fullname.split('.'), '__init__.py') - else: - filename = os.path.join(*fullname.split('.')) + '.py' - filename = os.path.join(_RESOLVED_TOP_LEVEL_DIRECTORY, filename) - - try: - # Read in binary mode, then decode - with open(filename, 'rb') as fp: - source_bytes = fp.read() - return _decode_source(source_bytes) - except FileNotFoundError: - pass - - # Source code is unavailable. - return None - - zipimport.zipimporter.get_source = _get_source diff --git a/voxvera/vendor/PyInstaller/loader/pyimod03_ctypes.py b/voxvera/vendor/PyInstaller/loader/pyimod03_ctypes.py deleted file mode 100755 index ccb9c8d..0000000 --- a/voxvera/vendor/PyInstaller/loader/pyimod03_ctypes.py +++ /dev/null @@ -1,131 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License with exception -# for distributing bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- -""" -Hooks to make ctypes.CDLL, .PyDLL, etc. look in sys._MEIPASS first. -""" - -import sys - - -def install(): - """ - Install the hooks. - - This must be done from a function as opposed to at module-level, because when the module is imported/executed, - the import machinery is not completely set up yet. - """ - - import os - - try: - import ctypes - except ImportError: - # ctypes is not included in the frozen application - return - - def _frozen_name(name): - # If the given (file)name does not exist, fall back to searching for its basename in sys._MEIPASS, where - # PyInstaller usually collects shared libraries. - if name and not os.path.isfile(name): - frozen_name = os.path.join(sys._MEIPASS, os.path.basename(name)) - if os.path.isfile(frozen_name): - name = frozen_name - return name - - class PyInstallerImportError(OSError): - def __init__(self, name): - self.msg = ( - "Failed to load dynlib/dll %r. Most likely this dynlib/dll was not found when the application " - "was frozen." % name - ) - self.args = (self.msg,) - - class PyInstallerCDLL(ctypes.CDLL): - def __init__(self, name, *args, **kwargs): - name = _frozen_name(name) - try: - super().__init__(name, *args, **kwargs) - except Exception as base_error: - raise PyInstallerImportError(name) from base_error - - ctypes.CDLL = PyInstallerCDLL - ctypes.cdll = ctypes.LibraryLoader(PyInstallerCDLL) - - class PyInstallerPyDLL(ctypes.PyDLL): - def __init__(self, name, *args, **kwargs): - name = _frozen_name(name) - try: - super().__init__(name, *args, **kwargs) - except Exception as base_error: - raise PyInstallerImportError(name) from base_error - - ctypes.PyDLL = PyInstallerPyDLL - ctypes.pydll = ctypes.LibraryLoader(PyInstallerPyDLL) - - if sys.platform.startswith('win'): - - class PyInstallerWinDLL(ctypes.WinDLL): - def __init__(self, name, *args, **kwargs): - name = _frozen_name(name) - try: - super().__init__(name, *args, **kwargs) - except Exception as base_error: - raise PyInstallerImportError(name) from base_error - - ctypes.WinDLL = PyInstallerWinDLL - ctypes.windll = ctypes.LibraryLoader(PyInstallerWinDLL) - - class PyInstallerOleDLL(ctypes.OleDLL): - def __init__(self, name, *args, **kwargs): - name = _frozen_name(name) - try: - super().__init__(name, *args, **kwargs) - except Exception as base_error: - raise PyInstallerImportError(name) from base_error - - ctypes.OleDLL = PyInstallerOleDLL - ctypes.oledll = ctypes.LibraryLoader(PyInstallerOleDLL) - - try: - import ctypes.util - except ImportError: - # ctypes.util is not included in the frozen application - return - - # Same implementation as ctypes.util.find_library, except it prepends sys._MEIPASS to the search directories. - def pyinstaller_find_library(name): - if name in ('c', 'm'): - return ctypes.util.find_msvcrt() - # See MSDN for the REAL search order. - search_dirs = [sys._MEIPASS] + os.environ['PATH'].split(os.pathsep) - for directory in search_dirs: - fname = os.path.join(directory, name) - if os.path.isfile(fname): - return fname - if fname.lower().endswith(".dll"): - continue - fname = fname + ".dll" - if os.path.isfile(fname): - return fname - return None - - ctypes.util.find_library = pyinstaller_find_library - - -# On macOS insert sys._MEIPASS in the first position of the list of paths that ctypes uses to search for libraries. -# -# Note: 'ctypes' module will NOT be bundled with every app because code in this module is not scanned for module -# dependencies. It is safe to wrap 'ctypes' module into 'try/except ImportError' block. -if sys.platform.startswith('darwin'): - try: - from ctypes.macholib import dyld - dyld.DEFAULT_LIBRARY_FALLBACK.insert(0, sys._MEIPASS) - except ImportError: - # Do nothing when module 'ctypes' is not available. - pass diff --git a/voxvera/vendor/PyInstaller/loader/pyimod04_pywin32.py b/voxvera/vendor/PyInstaller/loader/pyimod04_pywin32.py deleted file mode 100755 index b635d75..0000000 --- a/voxvera/vendor/PyInstaller/loader/pyimod04_pywin32.py +++ /dev/null @@ -1,56 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License with exception -# for distributing bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- -""" -Set search path for pywin32 DLLs. Due to the large number of pywin32 modules, we use a single loader-level script -instead of per-module runtime hook scripts. -""" - -import os -import sys - - -def install(): - # Sub-directories containing extensions. In original python environment, these are added to `sys.path` by the - # `pywin32.pth` so the extensions end up treated as top-level modules. We attempt to preserve the directory - # layout, so we need to add these directories to `sys.path` ourselves. - pywin32_ext_paths = ('win32', 'pythonwin') - pywin32_ext_paths = [os.path.join(sys._MEIPASS, pywin32_ext_path) for pywin32_ext_path in pywin32_ext_paths] - pywin32_ext_paths = [path for path in pywin32_ext_paths if os.path.isdir(path)] - sys.path.extend(pywin32_ext_paths) - - # Additional handling of `pywin32_system32` DLL directory - pywin32_system32_path = os.path.join(sys._MEIPASS, 'pywin32_system32') - - if not os.path.isdir(pywin32_system32_path): - # Either pywin32 is not collected, or we are dealing with version that does not use the pywin32_system32 - # sub-directory. In the latter case, the pywin32 DLLs should be in `sys._MEIPASS`, and nothing - # else needs to be done here. - return - - # Add the DLL directory to `sys.path`. - # This is necessary because `__import_pywin32_system_module__` from `pywintypes` module assumes that in a frozen - # application, the pywin32 DLLs (`pythoncom3X.dll` and `pywintypes3X.dll`) that are normally found in - # `pywin32_system32` sub-directory in `sys.path` (site-packages, really) are located directly in `sys.path`. - # 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. - sys.path.append(pywin32_system32_path) - - # Add the DLL directory to DLL search path using os.add_dll_directory(). - # This allows extensions from win32 directory (e.g., win32api, win32crypt) to be loaded on their own without - # importing pywintypes first. The extensions are linked against pywintypes3X.dll. - os.add_dll_directory(pywin32_system32_path) - - # Add the DLL directory to PATH. This is necessary under certain versions of - # Anaconda python, where `os.add_dll_directory` does not work. - path = os.environ.get('PATH', None) - if not path: - path = pywin32_system32_path - else: - path = pywin32_system32_path + os.pathsep + path - os.environ['PATH'] = path diff --git a/voxvera/vendor/PyInstaller/log.py b/voxvera/vendor/PyInstaller/log.py deleted file mode 100755 index 7c5b5ce..0000000 --- a/voxvera/vendor/PyInstaller/log.py +++ /dev/null @@ -1,64 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Logging module for PyInstaller. -""" - -__all__ = ['getLogger', 'INFO', 'WARN', 'DEBUG', 'TRACE', 'ERROR', 'FATAL', 'DEPRECATION'] - -import os -import logging -from logging import DEBUG, ERROR, FATAL, INFO, WARN, getLogger - -TRACE = DEBUG - 5 -logging.addLevelName(TRACE, 'TRACE') -DEPRECATION = WARN + 5 -logging.addLevelName(DEPRECATION, 'DEPRECATION') -LEVELS = { - 'TRACE': TRACE, - 'DEBUG': DEBUG, - 'INFO': INFO, - 'WARN': WARN, - 'DEPRECATION': DEPRECATION, - 'ERROR': ERROR, - 'FATAL': FATAL, -} - -FORMAT = '%(relativeCreated)d %(levelname)s: %(message)s' -_env_level = os.environ.get("PYI_LOG_LEVEL", "INFO") -try: - level = LEVELS[_env_level.upper()] -except KeyError: - raise SystemExit(f"ERROR: Invalid PYI_LOG_LEVEL value '{_env_level}'. Should be one of {list(LEVELS)}.") -logging.basicConfig(format=FORMAT, level=level) -logger = getLogger('PyInstaller') - - -def __add_options(parser): - parser.add_argument( - '--log-level', - choices=LEVELS, - metavar="LEVEL", - dest='loglevel', - help='Amount of detail in build-time console messages. LEVEL may be one of %s (default: INFO). ' - 'Also settable via and overrides the PYI_LOG_LEVEL environment variable.' % ', '.join(LEVELS), - ) - - -def __process_options(parser, opts): - if opts.loglevel: - try: - level = opts.loglevel.upper() - _level = LEVELS[level] - except KeyError: - parser.error('Unknown log level `%s`' % opts.loglevel) - logger.setLevel(_level) - os.environ["PYI_LOG_LEVEL"] = level diff --git a/voxvera/vendor/PyInstaller/utils/__init__.py b/voxvera/vendor/PyInstaller/utils/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/utils/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/utils/cliutils/__init__.py b/voxvera/vendor/PyInstaller/utils/cliutils/__init__.py deleted file mode 100755 index 792d600..0000000 --- a/voxvera/vendor/PyInstaller/utils/cliutils/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/PyInstaller/utils/cliutils/archive_viewer.py b/voxvera/vendor/PyInstaller/utils/cliutils/archive_viewer.py deleted file mode 100755 index 24d3fc5..0000000 --- a/voxvera/vendor/PyInstaller/utils/cliutils/archive_viewer.py +++ /dev/null @@ -1,271 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Viewer for PyInstaller-generated archives. -""" - -import argparse -import os -import sys - -import PyInstaller.log -from PyInstaller.archive.readers import CArchiveReader, ZlibArchiveReader - -try: - from argcomplete import autocomplete -except ImportError: - - def autocomplete(parser): - return None - - -class ArchiveViewer: - def __init__(self, filename, interactive_mode, recursive_mode, brief_mode): - self.filename = filename - self.interactive_mode = interactive_mode - self.recursive_mode = recursive_mode - self.brief_mode = brief_mode - - self.stack = [] - - # Recursive mode implies non-interactive mode - if self.recursive_mode: - self.interactive_mode = False - - def main(self): - # Open top-level (initial) archive - archive = self._open_toplevel_archive(self.filename) - archive_name = os.path.basename(self.filename) - self.stack.append((archive_name, archive)) - - # Not-interactive mode - if not self.interactive_mode: - return self._non_interactive_processing() - - # Interactive mode; show top-level archive - self._show_archive_contents(archive_name, archive) - - # Interactive command processing - while True: - # Read command - try: - tokens = input('? ').split(None, 1) - except EOFError: - # Ctrl-D - print(file=sys.stderr) # Clear line. - break - - # Print usage? - if not tokens: - self._print_usage() - continue - - # Process - command = tokens[0].upper() - if command == 'Q': - break - elif command == 'U': - self._move_up_the_stack() - elif command == 'O': - self._open_embedded_archive(*tokens[1:]) - elif command == 'X': - self._extract_file(*tokens[1:]) - elif command == 'S': - archive_name, archive = self.stack[-1] - self._show_archive_contents(archive_name, archive) - else: - self._print_usage() - - def _non_interactive_processing(self): - archive_count = 0 - - while self.stack: - archive_name, archive = self.stack.pop() - archive_count += 1 - - if archive_count > 1: - print("") - self._show_archive_contents(archive_name, archive) - - if not self.recursive_mode: - continue - - # Scan for embedded archives - if isinstance(archive, CArchiveReader): - for name, (*_, typecode) in archive.toc.items(): - if typecode == 'z': - try: - embedded_archive = archive.open_embedded_archive(name) - except Exception as e: - print(f"Could not open embedded archive {name!r}: {e}", file=sys.stderr) - self.stack.append((name, embedded_archive)) - - def _print_usage(self): - print("U: go up one level", file=sys.stderr) - print("O : open embedded archive with given name", file=sys.stderr) - print("X : extract file with given name", file=sys.stderr) - print("S: list the contents of current archive again", file=sys.stderr) - print("Q: quit", file=sys.stderr) - - def _move_up_the_stack(self): - if len(self.stack) > 1: - self.stack.pop() - archive_name, archive = self.stack[-1] - self._show_archive_contents(archive_name, archive) - else: - print("Already in the top archive!", file=sys.stderr) - - def _open_toplevel_archive(self, filename): - if not os.path.isfile(filename): - print(f"Archive {filename} does not exist!", file=sys.stderr) - sys.exit(1) - - if filename[-4:].lower() == '.pyz': - return ZlibArchiveReader(filename) - return CArchiveReader(filename) - - def _open_embedded_archive(self, archive_name=None): - # Ask for name if not provided - if not archive_name: - archive_name = input('Open name? ') - archive_name = archive_name.strip() - - # No name given; abort - if not archive_name: - return - - # Open the embedded archive - _, parent_archive = self.stack[-1] - - if not hasattr(parent_archive, 'open_embedded_archive'): - print("Archive does not support embedded archives!", file=sys.stderr) - return - - try: - archive = parent_archive.open_embedded_archive(archive_name) - except Exception as e: - print(f"Could not open embedded archive {archive_name!r}: {e}", file=sys.stderr) - return - - # Add to stack and display contents - self.stack.append((archive_name, archive)) - self._show_archive_contents(archive_name, archive) - - def _extract_file(self, name=None): - # Ask for name if not provided - if not name: - name = input('Extract name? ') - name = name.strip() - - # Archive - archive_name, archive = self.stack[-1] - - # Retrieve data - try: - if isinstance(archive, CArchiveReader): - data = archive.extract(name) - elif isinstance(archive, ZlibArchiveReader): - data = archive.extract(name, raw=True) - if data is None: - raise ValueError("Entry has no associated data!") - else: - raise NotImplementedError(f"Extraction from archive type {type(archive)} not implemented!") - except Exception as e: - print(f"Failed to extract data for entry {name!r} from {archive_name!r}: {e}", file=sys.stderr) - return - - # Write to file - filename = input('Output filename? ') - if not filename: - print(repr(data)) - else: - with open(filename, 'wb') as fp: - fp.write(data) - - def _show_archive_contents(self, archive_name, archive): - if isinstance(archive, CArchiveReader): - if archive.options: - print(f"Options in {archive_name!r} (PKG/CArchive):") - for option in archive.options: - print(f" {option}") - print(f"Contents of {archive_name!r} (PKG/CArchive):") - if self.brief_mode: - for name in archive.toc.keys(): - print(f" {name}") - else: - print(" position, length, uncompressed_length, is_compressed, typecode, name") - for name, (position, length, uncompressed_length, is_compressed, typecode) in archive.toc.items(): - print(f" {position}, {length}, {uncompressed_length}, {is_compressed}, {typecode!r}, {name!r}") - elif isinstance(archive, ZlibArchiveReader): - print(f"Contents of {archive_name!r} (PYZ):") - if self.brief_mode: - for name in archive.toc.keys(): - print(f" {name}") - else: - print(" typecode, position, length, name") - for name, (typecode, position, length) in archive.toc.items(): - print(f" {typecode}, {position}, {length}, {name!r}") - else: - print(f"Contents of {name} (unknown)") - print(f"FIXME: implement content listing for archive type {type(archive)}!") - - -def run(): - parser = argparse.ArgumentParser() - parser.add_argument( - '-l', - '--list', - default=False, - action='store_true', - dest='listing_mode', - help='List the archive contents and exit (default: %(default)s).', - ) - parser.add_argument( - '-r', - '--recursive', - default=False, - action='store_true', - dest='recursive', - help='Recursively print an archive log (default: %(default)s). Implies --list.', - ) - parser.add_argument( - '-b', - '--brief', - default=False, - action='store_true', - dest='brief', - help='When displaying archive contents, show only file names. (default: %(default)s).', - ) - PyInstaller.log.__add_options(parser) - parser.add_argument( - 'filename', - metavar='pyi_archive', - help="PyInstaller archive to process.", - ) - - autocomplete(parser) - args = parser.parse_args() - PyInstaller.log.__process_options(parser, args) - - try: - viewer = ArchiveViewer( - filename=args.filename, - interactive_mode=not args.listing_mode, - recursive_mode=args.recursive, - brief_mode=args.brief, - ) - viewer.main() - except KeyboardInterrupt: - raise SystemExit("Aborted by user.") - - -if __name__ == '__main__': - run() diff --git a/voxvera/vendor/PyInstaller/utils/cliutils/bindepend.py b/voxvera/vendor/PyInstaller/utils/cliutils/bindepend.py deleted file mode 100755 index ebd5fdf..0000000 --- a/voxvera/vendor/PyInstaller/utils/cliutils/bindepend.py +++ /dev/null @@ -1,58 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Show dll dependencies of executable files or other dynamic libraries. -""" - -import argparse -import glob - -import PyInstaller.depend.bindepend -import PyInstaller.log - -try: - from argcomplete import autocomplete -except ImportError: - - def autocomplete(parser): - return None - - -def run(): - parser = argparse.ArgumentParser() - PyInstaller.log.__add_options(parser) - parser.add_argument( - 'filenames', - nargs='+', - metavar='executable-or-dynamic-library', - help="executables or dynamic libraries for which the dependencies should be shown", - ) - - autocomplete(parser) - args = parser.parse_args() - PyInstaller.log.__process_options(parser, args) - - # Suppress all informative messages from the dependency code. - PyInstaller.log.getLogger('PyInstaller.build.bindepend').setLevel(PyInstaller.log.WARN) - - try: - for input_filename_or_pattern in args.filenames: - for filename in glob.glob(input_filename_or_pattern): - print(f"{filename}:") - for lib_name, lib_path in sorted(PyInstaller.depend.bindepend.get_imports(filename)): - print(f" {lib_name} => {lib_path}") - print("") - except KeyboardInterrupt: - raise SystemExit("Aborted by user request.") - - -if __name__ == '__main__': - run() diff --git a/voxvera/vendor/PyInstaller/utils/cliutils/grab_version.py b/voxvera/vendor/PyInstaller/utils/cliutils/grab_version.py deleted file mode 100755 index f8e1193..0000000 --- a/voxvera/vendor/PyInstaller/utils/cliutils/grab_version.py +++ /dev/null @@ -1,59 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import argparse -import codecs - -try: - from argcomplete import autocomplete -except ImportError: - - def autocomplete(parser): - return None - - -def run(): - parser = argparse.ArgumentParser( - epilog=( - 'The printed output may be saved to a file, edited and used as the input for a version resource on any of ' - 'the executable targets in a PyInstaller .spec file.' - ) - ) - parser.add_argument( - 'exe_file', - metavar='exe-file', - help="full pathname of a Windows executable", - ) - parser.add_argument( - 'out_filename', - metavar='out-filename', - nargs='?', - default='file_version_info.txt', - help="filename where the grabbed version info will be saved", - ) - - autocomplete(parser) - args = parser.parse_args() - - try: - from PyInstaller.utils.win32 import versioninfo - info = versioninfo.read_version_info_from_executable(args.exe_file) - if not info: - raise SystemExit("ERROR: VersionInfo resource not found in exe") - with codecs.open(args.out_filename, 'w', 'utf-8') as fp: - fp.write(str(info)) - print(f"Version info written to: {args.out_filename!r}") - except KeyboardInterrupt: - raise SystemExit("Aborted by user request.") - - -if __name__ == '__main__': - run() diff --git a/voxvera/vendor/PyInstaller/utils/cliutils/makespec.py b/voxvera/vendor/PyInstaller/utils/cliutils/makespec.py deleted file mode 100755 index 6225759..0000000 --- a/voxvera/vendor/PyInstaller/utils/cliutils/makespec.py +++ /dev/null @@ -1,61 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Automatically build a spec file containing the description of the project. -""" - -import argparse -import os - -import PyInstaller.building.makespec -import PyInstaller.log - -try: - from argcomplete import autocomplete -except ImportError: - - def autocomplete(parser): - return None - - -def generate_parser(): - p = argparse.ArgumentParser() - PyInstaller.building.makespec.__add_options(p) - PyInstaller.log.__add_options(p) - p.add_argument( - 'scriptname', - nargs='+', - ) - return p - - -def run(): - p = generate_parser() - autocomplete(p) - args = p.parse_args() - PyInstaller.log.__process_options(p, args) - - # Split pathex by using the path separator. - temppaths = args.pathex[:] - args.pathex = [] - for p in temppaths: - args.pathex.extend(p.split(os.pathsep)) - - try: - name = PyInstaller.building.makespec.main(args.scriptname, **vars(args)) - print('Wrote %s.' % name) - print('Now run pyinstaller.py to build the executable.') - except KeyboardInterrupt: - raise SystemExit("Aborted by user request.") - - -if __name__ == '__main__': - run() diff --git a/voxvera/vendor/PyInstaller/utils/cliutils/set_version.py b/voxvera/vendor/PyInstaller/utils/cliutils/set_version.py deleted file mode 100755 index b936692..0000000 --- a/voxvera/vendor/PyInstaller/utils/cliutils/set_version.py +++ /dev/null @@ -1,51 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import argparse -import os - -try: - from argcomplete import autocomplete -except ImportError: - - def autocomplete(parser): - return None - - -def run(): - parser = argparse.ArgumentParser() - parser.add_argument( - 'info_file', - metavar='info-file', - help="text file containing version info", - ) - parser.add_argument( - 'exe_file', - metavar='exe-file', - help="full pathname of a Windows executable", - ) - autocomplete(parser) - args = parser.parse_args() - - info_file = os.path.abspath(args.info_file) - exe_file = os.path.abspath(args.exe_file) - - try: - from PyInstaller.utils.win32 import versioninfo - info = versioninfo.load_version_info_from_text_file(info_file) - versioninfo.write_version_info_to_executable(exe_file, info) - print(f"Version info written to: {exe_file!r}") - except KeyboardInterrupt: - raise SystemExit("Aborted by user request.") - - -if __name__ == '__main__': - run() diff --git a/voxvera/vendor/PyInstaller/utils/conftest.py b/voxvera/vendor/PyInstaller/utils/conftest.py deleted file mode 100755 index a62b15d..0000000 --- a/voxvera/vendor/PyInstaller/utils/conftest.py +++ /dev/null @@ -1,578 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import contextlib -import copy -import glob -import logging -import os -import re -import shutil -import subprocess -import sys -import time - -# Set a handler for the root-logger to inhibit 'basicConfig()' (called in PyInstaller.log) is setting up a stream -# handler writing to stderr. This avoids log messages to be written (and captured) twice: once on stderr and -# once by pytests's caplog. -logging.getLogger().addHandler(logging.NullHandler()) - -# psutil is used for process tree clean-up on time-out when running the test frozen application. If unavailable -# (for example, on cygwin), we fall back to trying to terminate only the main application process. -try: - import psutil # noqa: E402 -except ModuleNotFoundError: - psutil = None - -import pytest # noqa: E402 - -from PyInstaller import __main__ as pyi_main # noqa: E402 -from PyInstaller import configure # noqa: E402 -from PyInstaller.compat import is_cygwin, is_darwin, is_win # noqa: E402 -from PyInstaller.depend.analysis import initialize_modgraph # noqa: E402 -from PyInstaller.archive.readers import pkg_archive_contents # noqa: E402 -from PyInstaller.utils.tests import gen_sourcefile # noqa: E402 -from PyInstaller.utils.win32 import winutils # noqa: E402 - -# Timeout for running the executable. If executable does not exit in this time, it is interpreted as a test failure. -_EXE_TIMEOUT = 3 * 60 # In sec. -# All currently supported platforms -SUPPORTED_OSES = {"darwin", "linux", "win32"} -# Have pyi_builder fixure clean-up the temporary directories of successful tests. Controlled by environment variable. -_PYI_BUILDER_CLEANUP = os.environ.get("PYI_BUILDER_CLEANUP", "1") == "1" - -# Fixtures -# -------- - - -def pytest_runtest_setup(item): - """ - Markers to skip tests based on the current platform. - https://pytest.org/en/stable/example/markers.html#marking-platform-specific-tests-with-pytest - - Available markers: see pytest.ini markers - - @pytest.mark.darwin (macOS) - - @pytest.mark.linux (GNU/Linux) - - @pytest.mark.win32 (Windows) - """ - supported_platforms = SUPPORTED_OSES.intersection(mark.name for mark in item.iter_markers()) - plat = sys.platform - if supported_platforms and plat not in supported_platforms: - pytest.skip(f"does not run on {plat}") - - -@pytest.hookimpl(tryfirst=True, hookwrapper=True) -def pytest_runtest_makereport(item, call): - # Execute all other hooks to obtain the report object. - outcome = yield - rep = outcome.get_result() - - # Set a report attribute for each phase of a call, which can be "setup", "call", "teardown". - setattr(item, f"rep_{rep.when}", rep) - - -# Return the base directory which contains the current test module. -def _get_base_dir(request): - return request.path.resolve().parent # pathlib.Path instance - - -# Directory with Python scripts for functional tests. -def _get_script_dir(request): - return _get_base_dir(request) / 'scripts' - - -# Directory with testing modules used in some tests. -def _get_modules_dir(request): - return _get_base_dir(request) / 'modules' - - -# Directory with .toc log files. -def _get_logs_dir(request): - return _get_base_dir(request) / 'logs' - - -# Return the directory where data for tests is located. -def _get_data_dir(request): - return _get_base_dir(request) / 'data' - - -# Directory with .spec files used in some tests. -def _get_spec_dir(request): - return _get_base_dir(request) / 'specs' - - -@pytest.fixture -def spec_dir(request): - """ - Return the directory where the test spec-files reside. - """ - return _get_spec_dir(request) - - -@pytest.fixture -def script_dir(request): - """ - Return the directory where the test scripts reside. - """ - return _get_script_dir(request) - - -# A fixture that copies test's data directory into test's temporary directory. The data directory is assumed to be -# `data/{test-name}` found next to the .py file that contains test. -@pytest.fixture -def data_dir( - # The request object for this test. Used to infer name of the test and location of the source .py file. - # See - # https://pytest.org/latest/builtin.html#_pytest.python.FixtureRequest - # and - # https://pytest.org/latest/fixture.html#fixtures-can-introspect-the-requesting-test-context. - request, - # The tmp_path object for this test. See: https://pytest.org/latest/tmp_path.html. - tmp_path -): - # Strip the leading 'test_' from the test's name. - test_name = request.function.__name__[5:] - - # Copy to data dir and return the path. - source_data_dir = _get_data_dir(request) / test_name - tmp_data_dir = tmp_path / 'data' - # Copy the data. - shutil.copytree(source_data_dir, tmp_data_dir) - # Return the temporary data directory, so that the copied data can now be used. - return tmp_data_dir - - -class AppBuilder: - def __init__(self, tmp_path, request, bundle_mode): - self._tmp_path = tmp_path - self._request = request - self._mode = bundle_mode - self._spec_dir = tmp_path - self._dist_dir = tmp_path / 'dist' - self._build_dir = tmp_path / 'build' - self._is_spec = False - - def test_spec(self, specfile, *args, **kwargs): - """ - Test a Python script that is referenced in the supplied .spec file. - """ - __tracebackhide__ = True - specfile = _get_spec_dir(self._request) / specfile - # 'test_script' should handle .spec properly as script. - self._is_spec = True - return self.test_script(specfile, *args, **kwargs) - - def test_source(self, source, *args, **kwargs): - """ - Test a Python script given as source code. - - The source will be written into a file named like the test-function. This file will then be passed to - `test_script`. If you need other related file, e.g., as `.toc`-file for testing the content, put it at at the - normal place. Just mind to take the basnename from the test-function's name. - - :param script: Source code to create executable from. This will be saved into a temporary file which is then - passed on to `test_script`. - - :param test_id: Test-id for parametrized tests. If given, it will be appended to the script filename, separated - by two underscores. - - All other arguments are passed straight on to `test_script`. - """ - __tracebackhide__ = True - # For parametrized test append the test-id. - scriptfile = gen_sourcefile(self._tmp_path, source, kwargs.setdefault('test_id')) - del kwargs['test_id'] - return self.test_script(scriptfile, *args, **kwargs) - - def _display_message(self, step_name, message): - # Print the given message to both stderr and stdout, and it with APP-BUILDER to make it clear where it - # originates from. - print(f'[APP-BUILDER:{step_name}] {message}', file=sys.stdout) - print(f'[APP-BUILDER:{step_name}] {message}', file=sys.stderr) - - def test_script( - self, script, pyi_args=None, app_name=None, app_args=None, runtime=None, run_from_path=False, **kwargs - ): - """ - Main method to wrap all phases of testing a Python script. - - :param script: Name of script to create executable from. - :param pyi_args: Additional arguments to pass to PyInstaller when creating executable. - :param app_name: Name of the executable. This is equivalent to argument --name=APPNAME. - :param app_args: Additional arguments to pass to - :param runtime: Time in seconds how long to keep executable running. - :param toc_log: List of modules that are expected to be bundled with the executable. - """ - __tracebackhide__ = True - - # Skip interactive tests (the ones with `runtime` set) if `psutil` is unavailable, as we need it to properly - # clean up the process tree. - if runtime and psutil is None: - pytest.skip('Interactive tests require psutil for proper cleanup.') - - if pyi_args is None: - pyi_args = [] - if app_args is None: - app_args = [] - - if app_name: - if not self._is_spec: - pyi_args.extend(['--name', app_name]) - else: - # Derive name from script name. - app_name = os.path.splitext(os.path.basename(script))[0] - - # Relative path means that a script from _script_dir is referenced. - if not os.path.isabs(script): - script = _get_script_dir(self._request) / script - self.script = str(script) # might be a pathlib.Path at this point! - assert os.path.exists(self.script), f'Script {self.script!r} not found.' - - self._display_message('TEST-SCRIPT', 'Starting build...') - if not self._test_building(args=pyi_args): - pytest.fail(f'Building of {script} failed.') - - self._display_message('TEST-SCRIPT', 'Build finished, now running executable...') - self._test_executables(app_name, args=app_args, runtime=runtime, run_from_path=run_from_path, **kwargs) - self._display_message('TEST-SCRIPT', 'Running executable finished.') - - def _test_executables(self, name, args, runtime, run_from_path, **kwargs): - """ - Run created executable to make sure it works. - - Multipackage-tests generate more than one exe-file and all of them have to be run. - - :param args: CLI options to pass to the created executable. - :param runtime: Time in seconds how long to keep the executable running. - - :return: Exit code of the executable. - """ - __tracebackhide__ = True - exes = self._find_executables(name) - # Empty list means that PyInstaller probably failed to create any executable. - assert exes != [], 'No executable file was found.' - for exe in exes: - # Try to find .toc log file. .toc log file has the same basename as exe file. - toc_log = os.path.splitext(os.path.basename(exe))[0] + '.toc' - toc_log = _get_logs_dir(self._request) / toc_log - if toc_log.exists(): - if not self._examine_executable(exe, toc_log): - pytest.fail(f'Matching .toc of {exe} failed.') - retcode = self._run_executable(exe, args, run_from_path, runtime) - if retcode != kwargs.get('retcode', 0): - pytest.fail(f'Running exe {exe} failed with return-code {retcode}.') - - def _find_executables(self, name): - """ - Search for all executables generated by the testcase. - - If the test-case is called e.g. 'test_multipackage1', this is searching for each of 'test_multipackage1.exe' - and 'multipackage1_?.exe' in both one-file- and one-dir-mode. - - :param name: Name of the executable to look for. - - :return: List of executables - """ - exes = [] - onedir_pt = str(self._dist_dir / name / name) - onefile_pt = str(self._dist_dir / name) - patterns = [ - onedir_pt, - onefile_pt, - # Multipackage one-dir - onedir_pt + '_?', - # Multipackage one-file - onefile_pt + '_?' - ] - # For Windows append .exe extension to patterns. - if is_win: - patterns = [pt + '.exe' for pt in patterns] - # For macOS append pattern for .app bundles. - if is_darwin: - # e.g: ./dist/name.app/Contents/MacOS/name - app_bundle_pt = str(self._dist_dir / f'{name}.app' / 'Contents' / 'MacOS' / name) - patterns.append(app_bundle_pt) - # Apply file patterns. - for pattern in patterns: - for prog in glob.glob(pattern): - if os.path.isfile(prog): - exes.append(prog) - return exes - - def _run_executable(self, prog, args, run_from_path, runtime): - """ - Run executable created by PyInstaller. - - :param args: CLI options to pass to the created executable. - """ - # Run the test in a clean environment to make sure they're really self-contained. - prog_env = copy.deepcopy(os.environ) - prog_env['PATH'] = '' - del prog_env['PATH'] - # For Windows we need to keep minimal PATH for successful running of some tests. - if is_win: - # Minimum Windows PATH is in most cases: C:\Windows\system32;C:\Windows - prog_env['PATH'] = os.pathsep.join(winutils.get_system_path()) - # Same for Cygwin - if /usr/bin is not in PATH, cygwin1.dll cannot be discovered. - if is_cygwin: - prog_env['PATH'] = os.pathsep.join(['/usr/local/bin', '/usr/bin']) - # On macOS, we similarly set up minimal PATH with system directories, in case utilities from there are used by - # tested python code (for example, matplotlib >= 3.9.0 uses `system_profiler` that is found in /usr/sbin). - if is_darwin: - # The following paths are registered when application is launched via Finder, and are a subset of what is - # typically available in the shell. - prog_env['PATH'] = os.pathsep.join(['/usr/bin', '/bin', '/usr/sbin', '/sbin']) - - exe_path = prog - if run_from_path: - # Run executable in the temp directory. Add the directory containing the executable to $PATH. Basically, - # pretend we are a shell executing the program from $PATH. - prog_cwd = str(self._tmp_path) - prog_name = os.path.basename(prog) - prog_env['PATH'] = os.pathsep.join([prog_env.get('PATH', ''), os.path.dirname(prog)]) - - else: - # Run executable in the directory where it is. - prog_cwd = os.path.dirname(prog) - # The executable will be called with argv[0] as relative not absolute path. - prog_name = os.path.join(os.curdir, os.path.basename(prog)) - - args = [prog_name] + args - # Using sys.stdout/sys.stderr for subprocess fixes printing messages in Windows command prompt. Py.test is then - # able to collect stdout/sterr messages and display them if a test fails. - return self._run_executable_(args, exe_path, prog_env, prog_cwd, runtime) - - def _run_executable_(self, args, exe_path, prog_env, prog_cwd, runtime): - # Use psutil.Popen, if available; otherwise, fall back to subprocess.Popen - popen_implementation = subprocess.Popen if psutil is None else psutil.Popen - - # Run the executable - self._display_message('RUN-EXE', f'Running {exe_path!r}, args: {args!r}') - start_time = time.time() - process = popen_implementation(args, executable=exe_path, env=prog_env, cwd=prog_cwd) - - # Wait for the process to finish. If no run-time (= timeout) is specified, we expect the process to exit on - # its own, and use global _EXE_TIMEOUT. If run-time is specified, we expect the application to be running - # for at least the specified amount of time, which is useful in "interactive" test applications that are not - # expected exit on their own. - stdout = stderr = None - try: - timeout = runtime if runtime else _EXE_TIMEOUT - stdout, stderr = process.communicate(timeout=timeout) - elapsed = time.time() - start_time - retcode = process.returncode - self._display_message( - 'RUN-EXE', f'Process exited on its own after {elapsed:.1f} seconds with return code {retcode}.' - ) - except (subprocess.TimeoutExpired) if psutil is None else (psutil.TimeoutExpired, subprocess.TimeoutExpired): - if runtime: - # When 'runtime' is set, the expired timeout is a good sign that the executable was running successfully - # for the specified time. - self._display_message('RUN-EXE', f'Process reached expected run-time of {runtime} seconds.') - retcode = 0 - else: - # Executable is still running and it is not interactive. Clean up the process tree, and fail the test. - self._display_message('RUN-EXE', f'Timeout while running executable (timeout: {timeout} seconds)!') - retcode = 1 - - if psutil is None: - # We are using subprocess.Popen(). Without psutil, we have no access to process tree; this poses a - # problem for onefile builds, where we would need to first kill the child (main application) process, - # and let the onefile parent perform its cleanup. As a best-effort approach, we can first call - # process.terminate(); on POSIX systems, this sends SIGTERM to the parent process, and in most - # situations, the bootloader will forward it to the child process. Then wait 5 seconds, and call - # process.kill() if necessary. On Windows, however, both process.terminate() and process.kill() do - # the same. Therefore, we should avoid running "interactive" tests with expected run-time if we do - # not have psutil available. - try: - self._display_message('RUN-EXE', 'Stopping the process using Popen.terminate()...') - process.terminate() - stdout, stderr = process.communicate(timeout=5) - self._display_message('RUN-EXE', 'Process stopped.') - except subprocess.TimeoutExpired: - # Kill the process. - try: - self._display_message('RUN-EXE', 'Stopping the process using Popen.kill()...') - process.kill() - # process.communicate() waits for end-of-file, which may never arrive if there is a child - # process still alive. Nothing we can really do about it here, so add a short timeout and - # display a warning. - stdout, stderr = process.communicate(timeout=1) - self._display_message('RUN-EXE', 'Process stopped.') - except subprocess.TimeoutExpired: - self._display_message('RUN-EXE', 'Failed to stop the process (or its child process(es))!') - else: - # We are using psutil.Popen(). First, force-kill all child processes; in onefile mode, this includes - # the application process, whose termination should trigger cleanup and exit of the parent onefile - # process. - self._display_message('RUN-EXE', 'Stopping child processes...') - for child_process in list(process.children(recursive=True)): - with contextlib.suppress(psutil.NoSuchProcess): - self._display_message('RUN-EXE', f'Stopping child process {child_process.pid}...') - child_process.kill() - - # Give the main process 5 seconds to exit on its own (to accommodate cleanup in onefile mode). - try: - self._display_message('RUN-EXE', f'Waiting for main process ({process.pid}) to stop...') - stdout, stderr = process.communicate(timeout=5) - self._display_message('RUN-EXE', 'Process stopped on its own.') - except (psutil.TimeoutExpired, subprocess.TimeoutExpired): - # End of the line - kill the main process. - self._display_message('RUN-EXE', 'Stopping the process using Popen.kill()...') - with contextlib.suppress(psutil.NoSuchProcess): - process.kill() - # Try to retrieve stdout/stderr - but keep a short timeout, just in case... - try: - stdout, stderr = process.communicate(timeout=1) - self._display_message('RUN-EXE', 'Process stopped.') - except (psutil.TimeoutExpired, subprocess.TimeoutExpire): - self._display_message('RUN-EXE', 'Failed to stop the process (or its child process(es))!') - - self._display_message('RUN-EXE', f'Done! Return code: {retcode}') - - return retcode - - def _test_building(self, args): - """ - Run building of test script. - - :param args: additional CLI options for PyInstaller. - - Return True if build succeeded False otherwise. - """ - if self._is_spec: - default_args = [ - '--distpath', str(self._dist_dir), - '--workpath', str(self._build_dir), - '--log-level', 'INFO', - ] # yapf: disable - else: - default_args = [ - '--debug=bootloader', - '--noupx', - '--specpath', str(self._spec_dir), - '--distpath', str(self._dist_dir), - '--workpath', str(self._build_dir), - '--path', str(_get_modules_dir(self._request)), - '--log-level', 'INFO', - ] # yapf: disable - - # Choose bundle mode. - if self._mode == 'onedir': - default_args.append('--onedir') - elif self._mode == 'onefile': - default_args.append('--onefile') - # if self._mode is None then just the spec file was supplied. - - pyi_args = [self.script, *default_args, *args] - # TODO: fix return code in running PyInstaller programmatically. - PYI_CONFIG = configure.get_config() - # Override CACHEDIR for PyInstaller; relocate cache into `self._tmp_path`. - PYI_CONFIG['cachedir'] = str(self._tmp_path) - - pyi_main.run(pyi_args, PYI_CONFIG) - retcode = 0 - - return retcode == 0 - - def _examine_executable(self, exe, toc_log): - """ - Compare log files (now used mostly by multipackage test_name). - - :return: True if .toc files match - """ - self._display_message('EXAMINE-EXE', f'Matching against TOC log: {str(toc_log)!r}') - fname_list = pkg_archive_contents(exe) - with open(toc_log, 'r', encoding='utf-8') as f: - pattern_list = eval(f.read()) - # Alphabetical order of patterns. - pattern_list.sort() - missing = [] - for pattern in pattern_list: - for fname in fname_list: - if re.match(pattern, fname): - self._display_message('EXAMINE-EXE', f'Entry found: {pattern!r} --> {fname!r}') - break - else: - # No matching entry found - missing.append(pattern) - self._display_message('EXAMINE-EXE', f'Entry MISSING: {pattern!r}') - - # We expect the missing list to be empty - return not missing - - -# Scope 'session' should keep the object unchanged for whole tests. This fixture caches basic module graph dependencies -# that are same for every executable. -@pytest.fixture(scope='session') -def pyi_modgraph(): - # Explicitly set the log level since the plugin `pytest-catchlog` (un-) sets the root logger's level to NOTSET for - # the setup phase, which will lead to TRACE messages been written out. - import PyInstaller.log as logging - logging.logger.setLevel(logging.DEBUG) - initialize_modgraph() - - -# Run by default test as onedir and onefile. -@pytest.fixture(params=['onedir', 'onefile']) -def pyi_builder(tmp_path, monkeypatch, request, pyi_modgraph): - # Save/restore environment variable PATH. - monkeypatch.setenv('PATH', os.environ['PATH']) - # PyInstaller or a test case might manipulate 'sys.path'. Reset it for every test. - monkeypatch.syspath_prepend(None) - # Set current working directory to - monkeypatch.chdir(tmp_path) - # Clean up configuration and force PyInstaller to do a clean configuration for another app/test. The value is same - # as the original value. - monkeypatch.setattr('PyInstaller.config.CONF', {'pathex': []}) - - yield AppBuilder(tmp_path, request, request.param) - - # Clean up the temporary directory of a successful test - if _PYI_BUILDER_CLEANUP and request.node.rep_setup.passed and request.node.rep_call.passed: - if tmp_path.exists(): - shutil.rmtree(tmp_path, ignore_errors=True) - - -# Fixture for .spec based tests. With .spec it does not make sense to differentiate onefile/onedir mode. -@pytest.fixture -def pyi_builder_spec(tmp_path, request, monkeypatch, pyi_modgraph): - # Save/restore environment variable PATH. - monkeypatch.setenv('PATH', os.environ['PATH']) - # Set current working directory to - monkeypatch.chdir(tmp_path) - # PyInstaller or a test case might manipulate 'sys.path'. Reset it for every test. - monkeypatch.syspath_prepend(None) - # Clean up configuration and force PyInstaller to do a clean configuration for another app/test. The value is same - # as the original value. - monkeypatch.setattr('PyInstaller.config.CONF', {'pathex': []}) - - yield AppBuilder(tmp_path, request, None) - - # Clean up the temporary directory of a successful test - if _PYI_BUILDER_CLEANUP and request.node.rep_setup.passed and request.node.rep_call.passed: - if tmp_path.exists(): - shutil.rmtree(tmp_path, ignore_errors=True) - - -@pytest.fixture -def pyi_windowed_builder(pyi_builder: AppBuilder): - """A pyi_builder equivalent for testing --windowed applications.""" - - # psutil.Popen() somehow bypasses an application's windowed/console mode so that any application built in - # --windowed mode but invoked with psutil still receives valid std{in,out,err} handles and behaves exactly like - # a console application. In short, testing windowed mode with psutil is a null test. We must instead use subprocess. - - def _run_executable_(args, exe_path, prog_env, prog_cwd, runtime): - return subprocess.run([exe_path, *args], env=prog_env, cwd=prog_cwd, timeout=runtime).returncode - - pyi_builder._run_executable_ = _run_executable_ - yield pyi_builder diff --git a/voxvera/vendor/PyInstaller/utils/hooks/__init__.py b/voxvera/vendor/PyInstaller/utils/hooks/__init__.py deleted file mode 100755 index 0470263..0000000 --- a/voxvera/vendor/PyInstaller/utils/hooks/__init__.py +++ /dev/null @@ -1,1348 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -from __future__ import annotations - -import copy -import os -import textwrap -import fnmatch -from pathlib import Path -from collections import deque -from typing import Callable - -import packaging.requirements - -from PyInstaller import HOMEPATH, compat -from PyInstaller import log as logging -from PyInstaller.depend.imphookapi import PostGraphAPI -from PyInstaller import isolated -from PyInstaller.compat import importlib_metadata - -logger = logging.getLogger(__name__) - -# These extensions represent Python executables and should therefore be ignored when collecting data files. -# NOTE: .dylib files are not Python executable and should not be in this list. -PY_IGNORE_EXTENSIONS = set(compat.ALL_SUFFIXES) - -# Some hooks need to save some values. This is the dict that can be used for that. -# -# When running tests this variable should be reset before every test. -# -# For example the 'wx' module needs variable 'wxpubsub'. This tells PyInstaller which protocol of the wx module -# should be bundled. -hook_variables = {} - - -def __exec_python_cmd(cmd, env=None, capture_stdout=True): - """ - Executes an externally spawned Python interpreter. If capture_stdout is set to True, returns anything that was - emitted in the standard output as a single string. Otherwise, returns the exit code. - """ - # 'PyInstaller.config' cannot be imported as other top-level modules. - from PyInstaller.config import CONF - if env is None: - env = {} - # Update environment. Defaults to 'os.environ' - pp_env = copy.deepcopy(os.environ) - pp_env.update(env) - # Prepend PYTHONPATH with pathex. - # Some functions use some PyInstaller code in subprocess, so add PyInstaller HOMEPATH to sys.path as well. - pp = os.pathsep.join(CONF['pathex'] + [HOMEPATH]) - - # PYTHONPATH might be already defined in the 'env' argument or in the original 'os.environ'. Prepend it. - if 'PYTHONPATH' in pp_env: - pp = os.pathsep.join([pp_env.get('PYTHONPATH'), pp]) - pp_env['PYTHONPATH'] = pp - - if capture_stdout: - txt = compat.exec_python(*cmd, env=pp_env) - return txt.strip() - else: - return compat.exec_python_rc(*cmd, env=pp_env) - - -def __exec_statement(statement, capture_stdout=True): - statement = textwrap.dedent(statement) - cmd = ['-c', statement] - return __exec_python_cmd(cmd, capture_stdout=capture_stdout) - - -def exec_statement(statement: str): - """ - Execute a single Python statement in an externally-spawned interpreter, and return the resulting standard output - as a string. - - Examples:: - - tk_version = exec_statement("from _tkinter import TK_VERSION; print(TK_VERSION)") - - mpl_data_dir = exec_statement("import matplotlib; print(matplotlib.get_data_path())") - datas = [ (mpl_data_dir, "") ] - - Notes: - As of v5.0, usage of this function is discouraged in favour of the - new :mod:`PyInstaller.isolated` module. - - """ - return __exec_statement(statement, capture_stdout=True) - - -def exec_statement_rc(statement: str): - """ - Executes a Python statement in an externally spawned interpreter, and returns the exit code. - """ - return __exec_statement(statement, capture_stdout=False) - - -def eval_statement(statement: str): - """ - Execute a single Python statement in an externally-spawned interpreter, and :func:`eval` its output (if any). - - Example:: - - databases = eval_statement(''' - import sqlalchemy.databases - print(sqlalchemy.databases.__all__) - ''') - for db in databases: - hiddenimports.append("sqlalchemy.databases." + db) - - Notes: - As of v5.0, usage of this function is discouraged in favour of the - new :mod:`PyInstaller.isolated` module. - - """ - txt = exec_statement(statement).strip() - if not txt: - # Return an empty string, which is "not true" but is iterable. - return '' - return eval(txt) - - -@isolated.decorate -def get_pyextension_imports(module_name: str): - """ - Return list of modules required by binary (C/C++) Python extension. - - Python extension files ends with .so (Unix) or .pyd (Windows). It is almost impossible to analyze binary extension - and its dependencies. - - Module cannot be imported directly. - - Let's at least try import it in a subprocess and observe the difference in module list from sys.modules. - - This function could be used for 'hiddenimports' in PyInstaller hooks files. - """ - import sys - import importlib - - original = set(sys.modules.keys()) - - # When importing this module - sys.modules gets updated. - importlib.import_module(module_name) - - # Find and return which new modules have been loaded. - return list(set(sys.modules.keys()) - original - {module_name}) - - -def get_homebrew_path(formula: str = ''): - """ - Return the homebrew path to the requested formula, or the global prefix when called with no argument. - - Returns the path as a string or None if not found. - """ - import subprocess - brewcmd = ['brew', '--prefix'] - path = None - if formula: - brewcmd.append(formula) - dbgstr = 'homebrew formula "%s"' % formula - else: - dbgstr = 'homebrew prefix' - try: - path = subprocess.check_output(brewcmd).strip() - logger.debug('Found %s at "%s"' % (dbgstr, path)) - except OSError: - logger.debug('Detected homebrew not installed') - except subprocess.CalledProcessError: - logger.debug('homebrew formula "%s" not installed' % formula) - if path: - return path.decode('utf8') # macOS filenames are UTF-8 - else: - return None - - -def remove_prefix(string: str, prefix: str): - """ - This function removes the given prefix from a string, if the string does indeed begin with the prefix; otherwise, - it returns the original string. - """ - if string.startswith(prefix): - return string[len(prefix):] - else: - return string - - -def remove_suffix(string: str, suffix: str): - """ - This function removes the given suffix from a string, if the string does indeed end with the suffix; otherwise, - it returns the original string. - """ - # Special case: if suffix is empty, string[:0] returns ''. So, test for a non-empty suffix. - if suffix and string.endswith(suffix): - return string[:-len(suffix)] - else: - return string - - -# TODO: Do we really need a helper for this? This is pretty trivially obvious. -def remove_file_extension(filename: str): - """ - This function returns filename without its extension. - - For Python C modules it removes even whole '.cpython-34m.so' etc. - """ - for suff in compat.EXTENSION_SUFFIXES: - if filename.endswith(suff): - return filename[0:filename.rfind(suff)] - # Fallback to ordinary 'splitext'. - return os.path.splitext(filename)[0] - - -def can_import_module(module_name: str): - """ - Check if the specified module can be imported. - - Intended as a silent module availability check, as it does not print ModuleNotFoundError traceback to stderr when - the module is unavailable. - - Parameters - ---------- - module_name : str - Fully-qualified name of the module. - - Returns - ---------- - bool - Boolean indicating whether the module can be imported or not. - """ - - # Run the check in isolated sub-process, so we can gracefully handle cases when importing the module ends up - # crashing python interpreter. - @isolated.decorate - def _can_import_module(module_name): - try: - __import__(module_name) - return True - except Exception: - return False - - try: - return _can_import_module(module_name) - except isolated.SubprocessDiedError: - return False - - -# TODO: Replace most calls to exec_statement() with calls to this function. -def get_module_attribute(module_name: str, attr_name: str): - """ - Get the string value of the passed attribute from the passed module if this attribute is defined by this module - _or_ raise `AttributeError` otherwise. - - Since modules cannot be directly imported during analysis, this function spawns a subprocess importing this module - and returning the string value of this attribute in this module. - - Parameters - ---------- - module_name : str - Fully-qualified name of this module. - attr_name : str - Name of the attribute in this module to be retrieved. - - Returns - ---------- - str - String value of this attribute. - - Raises - ---------- - AttributeError - If this attribute is undefined. - """ - @isolated.decorate - def _get_module_attribute(module_name, attr_name): - import importlib - module = importlib.import_module(module_name) - return getattr(module, attr_name) - - # Return AttributeError on any kind of errors, to preserve old behavior. - try: - return _get_module_attribute(module_name, attr_name) - except Exception as e: - raise AttributeError(f"Failed to retrieve attribute {attr_name} from module {module_name}") from e - - -def get_module_file_attribute(package: str): - """ - Get the absolute path to the specified module or package. - - Modules and packages *must not* be directly imported in the main process during the analysis. Therefore, to - avoid leaking the imports, this function uses an isolated subprocess when it needs to import the module and - obtain its ``__file__`` attribute. - - Parameters - ---------- - package : str - Fully-qualified name of module or package. - - Returns - ---------- - str - Absolute path of this module. - """ - # First, try to use 'importlib.util.find_spec' and obtain loader from the spec (and filename from the loader). - # It is the fastest way, but does not work on certain modules in pywin32 that replace all module attributes with - # those of the .dll. In addition, we need to avoid it for submodules/subpackages, because it ends up importing - # their parent package, which would cause an import leak during the analysis. - filename: str | None = None - if '.' not in package: - try: - import importlib.util - loader = importlib.util.find_spec(package).loader - filename = loader.get_filename(package) - # Apparently in the past, ``None`` could be returned for built-in ``datetime`` module. Just in case this - # is still possible, return only if filename is valid. - if filename: - return filename - except (ImportError, AttributeError, TypeError, ValueError): - pass - - # Second attempt: try to obtain module/package's __file__ attribute in an isolated subprocess. - @isolated.decorate - def _get_module_file_attribute(package): - # First, try to use 'importlib.util.find_spec' and obtain loader from the spec (and filename from the loader). - # This should return the filename even if the module or package cannot be imported (e.g., a C-extension module - # with missing dependencies). - try: - import importlib.util - loader = importlib.util.find_spec(package).loader - filename = loader.get_filename(package) - # Safe-guard against ``None`` being returned (see comment in the non-isolated codepath). - if filename: - return filename - except (ImportError, AttributeError, TypeError, ValueError): - pass - - # Fall back to import attempt - import importlib - p = importlib.import_module(package) - return p.__file__ - - # The old behavior was to return ImportError (and that is what the test are also expecting...). - try: - filename = _get_module_file_attribute(package) - except Exception as e: - raise ImportError(f"Failed to obtain the __file__ attribute of package/module {package}!") from e - - return filename - - -def get_pywin32_module_file_attribute(module_name): - """ - Get the absolute path of the PyWin32 DLL specific to the PyWin32 module with the passed name (`pythoncom` - or `pywintypes`). - - On import, each PyWin32 module: - - * Imports a DLL specific to that module. - * Overwrites the values of all module attributes with values specific to that DLL. This includes that module's - `__file__` attribute, which then provides the absolute path of that DLL. - - This function imports the module in isolated subprocess and retrieves its `__file__` attribute. - """ - - # NOTE: we cannot use `get_module_file_attribute` as it does not account for the __file__ rewriting magic - # done by the module. Use `get_module_attribute` instead. - return get_module_attribute(module_name, '__file__') - - -def check_requirement(requirement: str): - """ - Check if a :pep:`0508` requirement is satisfied. Usually used to check if a package distribution is installed, - or if it is installed and satisfies the specified version requirement. - - Parameters - ---------- - requirement : str - Requirement string in :pep:`0508` format. - - Returns - ---------- - bool - Boolean indicating whether the requirement is satisfied or not. - - Examples - -------- - - :: - - # Assume Pillow 10.0.0 is installed. - >>> from PyInstaller.utils.hooks import check_requirement - >>> check_requirement('Pillow') - True - >>> check_requirement('Pillow < 9.0') - False - >>> check_requirement('Pillow >= 9.0, < 11.0') - True - """ - parsed_requirement = packaging.requirements.Requirement(requirement) - - # Fetch the actual version of the specified dist - try: - version = importlib_metadata.version(parsed_requirement.name) - except importlib_metadata.PackageNotFoundError: - return False # Not available at all - - # If specifier is not given, the only requirement is that dist is available - if not parsed_requirement.specifier: - return True - - # Parse specifier, and compare version. Enable pre-release matching, - # because we need "package >= 2.0.0" to match "2.5.0b1". - return parsed_requirement.specifier.contains(version, prereleases=True) - - -# Keep the `is_module_satisfies` as an alias for backwards compatibility with existing hooks. The old fallback -# to module version check does not work any more, though. -def is_module_satisfies( - requirements: str, - version: None = None, - version_attr: None = None, -): - """ - A compatibility wrapper for :func:`check_requirement`, intended for backwards compatibility with existing hooks. - - In contrast to original implementation from PyInstaller < 6, this implementation only checks the specified - :pep:`0508` requirement string; i.e., it tries to retrieve the distribution metadata, and compare its version - against optional version specifier(s). It does not attempt to fall back to checking the module's version attribute, - nor does it support ``version`` and ``version_attr`` arguments. - - Parameters - ---------- - requirements : str - Requirements string passed to the :func:`check_requirement`. - version : None - Deprecated and unsupported. Must be ``None``. - version_attr : None - Deprecated and unsupported. Must be ``None``. - - Returns - ---------- - bool - Boolean indicating whether the requirement is satisfied or not. - - Raises - ---------- - ValueError - If either ``version`` or ``version_attr`` are specified and are not None. - """ - if version is not None: - raise ValueError("Calling is_module_satisfies with version argument is not supported anymore.") - if version_attr is not None: - raise ValueError("Calling is_module_satisfies with version argument_attr is not supported anymore.") - return check_requirement(requirements) - - -def is_package(module_name: str): - """ - Check if a Python module is really a module or is a package containing other modules, without importing anything - in the main process. - - :param module_name: Module name to check. - :return: True if module is a package else otherwise. - """ - def _is_package(module_name: str): - """ - Determines whether the given name represents a package or not. If the name represents a top-level module or - a package, it is not imported. If the name represents a sub-module or a sub-package, its parent is imported. - In such cases, this function should be called from an isolated suprocess. - - NOTE: the fallback check for `__init__.py` is there because `_distutils_hack.DistutilsMetaFinder` from - `setuptools` does not set spec.submodule_search_locations for `distutils` / `setuptools._distutils` even though - it is a package. The alternative would be to always perform full import, and check for the `__path__` attribute, - but that would also always require full isolation. - """ - try: - import importlib.util - spec = importlib.util.find_spec(module_name) - return bool(spec.submodule_search_locations) or spec.origin.endswith('__init__.py') - except Exception: - return False - - # For top-level packages/modules, we can perform check in the main process; otherwise, we need to isolate the - # call to prevent import leaks in the main process. - if '.' not in module_name: - return _is_package(module_name) - else: - return isolated.call(_is_package, module_name) - - -def get_all_package_paths(package: str): - """ - Given a package name, return all paths associated with the package. Typically, packages have a single location - path, but PEP 420 namespace packages may be split across multiple locations. Returns an empty list if the specified - package is not found or is not a package. - """ - def _get_package_paths(package: str): - """ - Retrieve package path(s), as advertised by submodule_search_paths attribute of the spec obtained via - importlib.util.find_spec(package). If the name represents a top-level package, the package is not imported. - If the name represents a sub-module or a sub-package, its parent is imported. In such cases, this function - should be called from an isolated suprocess. Returns an empty list if specified package is not found or is not - a package. - """ - try: - import importlib.util - spec = importlib.util.find_spec(package) - if not spec or not spec.submodule_search_locations: - return [] - return [str(path) for path in spec.submodule_search_locations] - except Exception: - return [] - - # For top-level packages/modules, we can perform check in the main process; otherwise, we need to isolate the - # call to prevent import leaks in the main process. - if '.' not in package: - pkg_paths = _get_package_paths(package) - else: - pkg_paths = isolated.call(_get_package_paths, package) - - return pkg_paths - - -def package_base_path(package_path: str, package: str): - """ - Given a package location path and package name, return the package base path, i.e., the directory in which the - top-level package is located. For example, given the path ``/abs/path/to/python/libs/pkg/subpkg`` and - package name ``pkg.subpkg``, the function returns ``/abs/path/to/python/libs``. - """ - return remove_suffix(package_path, package.replace('.', os.sep)) # Base directory - - -def get_package_paths(package: str): - """ - Given a package, return the path to packages stored on this machine and also returns the path to this particular - package. For example, if pkg.subpkg lives in /abs/path/to/python/libs, then this function returns - ``(/abs/path/to/python/libs, /abs/path/to/python/libs/pkg/subpkg)``. - - NOTE: due to backwards compatibility, this function returns only one package path along with its base directory. - In case of PEP 420 namespace package with multiple location, only first location is returned. To obtain all - package paths, use the ``get_all_package_paths`` function and obtain corresponding base directories using the - ``package_base_path`` helper. - """ - pkg_paths = get_all_package_paths(package) - if not pkg_paths: - raise ValueError(f"Package '{package}' does not exist or is not a package!") - - if len(pkg_paths) > 1: - logger.warning( - "get_package_paths - package %s has multiple paths (%r); returning only first one!", package, pkg_paths - ) - - pkg_dir = pkg_paths[0] - pkg_base = package_base_path(pkg_dir, package) - - return pkg_base, pkg_dir - - -def collect_submodules( - package: str, - filter: Callable[[str], bool] = lambda name: True, - on_error: str = "warn once", -): - """ - List all submodules of a given package. - - Arguments: - package: - An ``import``-able package. - filter: - Filter the submodules found: A callable that takes a submodule name and returns True if it should be - included. - on_error: - The action to take when a submodule fails to import. May be any of: - - - raise: Errors are reraised and terminate the build. - - warn: Errors are downgraded to warnings. - - warn once: The first error issues a warning but all - subsequent errors are ignored to minimise *stderr pollution*. This - is the default. - - ignore: Skip all errors. Don't warn about anything. - Returns: - All submodules to be assigned to ``hiddenimports`` in a hook. - - This function is intended to be used by hook scripts, not by main PyInstaller code. - - Examples:: - - # Collect all submodules of Sphinx don't contain the word ``test``. - hiddenimports = collect_submodules( - "Sphinx", ``filter=lambda name: 'test' not in name) - - .. versionchanged:: 4.5 - Add the **on_error** parameter. - - """ - # Accept only strings as packages. - if not isinstance(package, str): - raise TypeError('package must be a str') - if on_error not in ("ignore", "warn once", "warn", "raise"): - raise ValueError( - f"Invalid on-error action '{on_error}': Must be one of ('ignore', 'warn once', 'warn', 'raise')" - ) - - logger.debug('Collecting submodules for %s', package) - - # Skip a module which is not a package. - if not is_package(package): - logger.debug('collect_submodules - %s is not a package.', package) - # If module is importable, return its name in the list, in order to keep behavior consistent with the - # one we have for packages (i.e., we include the package in the list of returned names) - if can_import_module(package): - return [package] - return [] - - # Determine the filesystem path(s) to the specified package. - package_submodules = [] - - todo = deque() - todo.append(package) - - with isolated.Python() as isolated_python: - while todo: - # Scan the given (sub)package - name = todo.pop() - modules, subpackages, on_error = isolated_python.call(_collect_submodules, name, on_error) - - # Add modules to the list of all submodules - package_submodules += [module for module in modules if filter(module)] - - # Add sub-packages to deque for subsequent recursion - for subpackage_name in subpackages: - if filter(subpackage_name): - todo.append(subpackage_name) - - package_submodules = sorted(package_submodules) - - logger.debug("collect_submodules - found submodules: %s", package_submodules) - return package_submodules - - -# This function is called in an isolated sub-process via `isolated.Python.call`. -def _collect_submodules(name, on_error): - import sys - import pkgutil - from traceback import format_exception_only - - from PyInstaller.utils.hooks import logger - - logger.debug("collect_submodules - scanning (sub)package %s", name) - - modules = [] - subpackages = [] - - # Resolve package location(s) - try: - __import__(name) - except Exception as ex: - # Catch all errors and either raise, warn, or ignore them as determined by the *on_error* parameter. - if on_error in ("warn", "warn once"): - from PyInstaller.log import logger - ex = "".join(format_exception_only(type(ex), ex)).strip() - logger.warning(f"Failed to collect submodules for '{name}' because importing '{name}' raised: {ex}") - if on_error == "warn once": - on_error = "ignore" - return modules, subpackages, on_error - elif on_error == "raise": - raise ImportError(f"Unable to load subpackage '{name}'.") from ex - - # Do not attempt to recurse into package if it did not make it into sys.modules. - if name not in sys.modules: - return modules, subpackages, on_error - - # Or if it does not have __path__ attribute. - paths = getattr(sys.modules[name], '__path__', None) or [] - if not paths: - return modules, subpackages, on_error - - # Package was successfully imported - include it in the list of modules. - modules.append(name) - - # Iterate package contents - logger.debug("collect_submodules - scanning (sub)package %s in location(s): %s", name, paths) - for importer, name, ispkg in pkgutil.iter_modules(paths, name + '.'): - if not ispkg: - modules.append(name) - else: - subpackages.append(name) - - return modules, subpackages, on_error - - -def is_module_or_submodule(name: str, mod_or_submod: str): - """ - This helper function is designed for use in the ``filter`` argument of :func:`collect_submodules`, by returning - ``True`` if the given ``name`` is a module or a submodule of ``mod_or_submod``. - - Examples: - - The following excludes ``foo.test`` and ``foo.test.one`` but not ``foo.testifier``. :: - - collect_submodules('foo', lambda name: not is_module_or_submodule(name, 'foo.test'))`` - """ - return name.startswith(mod_or_submod + '.') or name == mod_or_submod - - -# Patterns of dynamic library filenames that might be bundled with some installed Python packages. -PY_DYLIB_PATTERNS = [ - '*.dll', - '*.dylib', - 'lib*.so', -] - - -def collect_dynamic_libs(package: str, destdir: str | None = None, search_patterns: list = PY_DYLIB_PATTERNS): - """ - This function produces a list of (source, dest) of dynamic library files that reside in package. Its output can be - directly assigned to ``binaries`` in a hook script. The package parameter must be a string which names the package. - - :param destdir: Relative path to ./dist/APPNAME where the libraries should be put. - :param search_patterns: List of dynamic library filename patterns to collect. - """ - logger.debug('Collecting dynamic libraries for %s' % package) - - # Accept only strings as packages. - if not isinstance(package, str): - raise TypeError('package must be a str') - - # Skip a module which is not a package. - if not is_package(package): - logger.warning( - "collect_dynamic_libs - skipping library collection for module '%s' as it is not a package.", package - ) - return [] - - pkg_dirs = get_all_package_paths(package) - dylibs = [] - for pkg_dir in pkg_dirs: - pkg_base = package_base_path(pkg_dir, package) - # Recursively glob for all file patterns in the package directory - for pattern in search_patterns: - files = Path(pkg_dir).rglob(pattern) - for source in files: - # Produce the tuple ('/abs/path/to/source/mod/submod/file.pyd', 'mod/submod') - if destdir: - # Put libraries in the specified target directory. - dest = destdir - else: - # Preserve original directory hierarchy. - dest = source.parent.relative_to(pkg_base) - logger.debug(' %s, %s' % (source, dest)) - dylibs.append((str(source), str(dest))) - - return dylibs - - -def collect_data_files( - package: str, - include_py_files: bool = False, - subdir: str | os.PathLike | None = None, - excludes: list | None = None, - includes: list | None = None, -): - r""" - This function produces a list of ``(source, dest)`` entries for data files that reside in ``package``. - Its output can be directly assigned to ``datas`` in a hook script; for example, see ``hook-sphinx.py``. - The data files are all files that are not shared libraries / binary python extensions (based on extension - check) and are not python source (.py) files or byte-compiled modules (.pyc). Collection of the .py and .pyc - files can be toggled via the ``include_py_files`` flag. - Parameters: - - - The ``package`` parameter is a string which names the package. - - By default, python source files and byte-compiled modules (files with ``.py`` and ``.pyc`` suffix) are not - collected; setting the ``include_py_files`` argument to ``True`` collects these files as well. This is typically - used when a package requires source .py files to be available; for example, JIT compilation used in - deep-learning frameworks, code that requires access to .py files (for example, to check their date), or code - that tries to extend `sys.path` with subpackage paths in a way that is incompatible with PyInstaller's frozen - importer.. However, in contemporary PyInstaller versions, the preferred way of collecting source .py files is by - using the **module collection mode** setting (which enables collection of source .py files in addition to or - in lieu of collecting byte-compiled modules into PYZ archive). - - The ``subdir`` argument gives a subdirectory relative to ``package`` to search, which is helpful when submodules - are imported at run-time from a directory lacking ``__init__.py``. - - The ``excludes`` argument contains a sequence of strings or Paths. These provide a list of - `globs `_ - to exclude from the collected data files; if a directory matches the provided glob, all files it contains will - be excluded as well. All elements must be relative paths, which are relative to the provided package's path - (/ ``subdir`` if provided). - - Therefore, ``*.txt`` will exclude only ``.txt`` files in ``package``\ 's path, while ``**/*.txt`` will exclude - all ``.txt`` files in ``package``\ 's path and all its subdirectories. Likewise, ``**/__pycache__`` will exclude - all files contained in any subdirectory named ``__pycache__``. - - The ``includes`` function like ``excludes``, but only include matching paths. ``excludes`` override - ``includes``: a file or directory in both lists will be excluded. - - This function does not work on zipped Python eggs. - - This function is intended to be used by hook scripts, not by main PyInstaller code. - """ - logger.debug('Collecting data files for %s' % package) - - # Accept only strings as packages. - if not isinstance(package, str): - raise TypeError('package must be a str') - - # Skip a module which is not a package. - if not is_package(package): - logger.warning("collect_data_files - skipping data collection for module '%s' as it is not a package.", package) - return [] - - # Make sure the excludes are a list; this also makes a copy, so we don't modify the original. - excludes = list(excludes) if excludes else [] - # These excludes may contain directories which need to be searched. - excludes_len = len(excludes) - # Including py files means don't exclude them. This pattern will search any directories for containing files, so - # do not modify ``excludes_len``. - if not include_py_files: - excludes += ['**/*' + s for s in compat.ALL_SUFFIXES] - else: - # include_py_files should collect only .py and .pyc files, and not the extensions / shared libs. - excludes += ['**/*' + s for s in compat.ALL_SUFFIXES if s not in {'.py', '.pyc'}] - - # Never, ever, collect .pyc files from __pycache__. - excludes.append('**/__pycache__/*.pyc') - - # If not specified, include all files. Follow the same process as the excludes. - includes = list(includes) if includes else ["**/*"] - includes_len = len(includes) - - # A helper function to glob the in/ex "cludes", adding a wildcard to refer to all files under a subdirectory if a - # subdirectory is matched by the first ``clude_len`` patterns. Otherwise, it in/excludes the matched file. - # **This modifies** ``cludes``. - def clude_walker( - # Package directory to scan - pkg_dir, - # A list of paths relative to ``pkg_dir`` to in/exclude. - cludes, - # The number of ``cludes`` for which matching directories should be searched for all files under them. - clude_len, - # True if the list is includes, False for excludes. - is_include - ): - for i, c in enumerate(cludes): - for g in Path(pkg_dir).glob(c): - # The path obtained from `pathlib.Path.glob()` should already be an instance of `pathlib.Path`; however, - # under msys2/mingw python 3.13, it uses inconsistent mix of POSIX-style separators (for base part) and - # Windows separators (for the globbed part), which causes issues further down the road. Explicitly - # constructing a `Path` instance seems to normalize the separators and works around the problem. - g = Path(g) - if g.is_dir(): - # Only files are sources. Subdirectories are not. - if i < clude_len: - # In/exclude all files under a matching subdirectory. - cludes.append(str((g / "**/*").relative_to(pkg_dir))) - else: - # In/exclude a matching file. - sources.add(g) if is_include else sources.discard(g) - - # Obtain all paths for the specified package, and process each path independently. - datas = [] - - pkg_dirs = get_all_package_paths(package) - for pkg_dir in pkg_dirs: - sources = set() # Reset sources set - - pkg_base = package_base_path(pkg_dir, package) - if subdir: - pkg_dir = os.path.join(pkg_dir, subdir) - - # Process the package path with clude walker - clude_walker(pkg_dir, includes, includes_len, True) - clude_walker(pkg_dir, excludes, excludes_len, False) - - # Transform the sources into tuples for ``datas``. - datas += [(str(s), str(s.parent.relative_to(pkg_base))) for s in sources] - - logger.debug("collect_data_files - Found files: %s", datas) - return datas - - -def collect_system_data_files(path: str, destdir: str | os.PathLike | None = None, include_py_files: bool = False): - """ - This function produces a list of (source, dest) non-Python (i.e., data) files that reside somewhere on the system. - Its output can be directly assigned to ``datas`` in a hook script. - - This function is intended to be used by hook scripts, not by main PyInstaller code. - """ - # Accept only strings as paths. - if not isinstance(path, str): - raise TypeError('path must be a str') - - # Walk through all file in the given package, looking for data files. - datas = [] - for dirpath, dirnames, files in os.walk(path): - for f in files: - extension = os.path.splitext(f)[1] - if include_py_files or (extension not in PY_IGNORE_EXTENSIONS): - # Produce the tuple: (/abs/path/to/source/mod/submod/file.dat, mod/submod/destdir) - source = os.path.join(dirpath, f) - dest = str(Path(dirpath).relative_to(path)) - if destdir is not None: - dest = os.path.join(destdir, dest) - datas.append((source, dest)) - - return datas - - -def copy_metadata(package_name: str, recursive: bool = False): - """ - Collect distribution metadata so that ``importlib.metadata.distribution()`` or ``pkg_resources.get_distribution()`` - can find it. - - This function returns a list to be assigned to the ``datas`` global variable. This list instructs PyInstaller to - copy the metadata for the given package to the frozen application's data directory. - - Parameters - ---------- - package_name : str - Specifies the name of the package for which metadata should be copied. - recursive : bool - If true, collect metadata for the package's dependencies too. This enables use of - ``importlib.metadata.requires('package')`` or ``pkg_resources.require('package')`` inside the frozen - application. - - Returns - ------- - list - This should be assigned to ``datas``. - - Examples - -------- - >>> from PyInstaller.utils.hooks import copy_metadata - >>> copy_metadata('sphinx') - [('c:\\python27\\lib\\site-packages\\Sphinx-1.3.2.dist-info', - 'Sphinx-1.3.2.dist-info')] - - - Some packages rely on metadata files accessed through the ``importlib.metadata`` (or the now-deprecated - ``pkg_resources``) module. PyInstaller does not collect these metadata files by default. - If a package fails without the metadata (either its own, or of another package that it depends on), you can use this - function in a hook to collect the corresponding metadata files into the frozen application. The tuples in the - returned list contain two strings. The first is the full path to the package's metadata directory on the system. The - second is the destination name, which typically corresponds to the basename of the metadata directory. Adding these - tuples the the ``datas`` hook global variable, the metadata is collected into top-level application directory (where - it is usually searched for). - - .. versionchanged:: 4.3.1 - - Prevent ``dist-info`` metadata folders being renamed to ``egg-info`` which broke ``pkg_resources.require`` with - *extras* (see :issue:`#3033`). - - .. versionchanged:: 4.4.0 - - Add the **recursive** option. - """ - from collections import deque - - todo = deque([package_name]) - done = set() - out = [] - - while todo: - package_name = todo.pop() - if package_name in done: - continue - - dist = importlib_metadata.distribution(package_name) - - # We support only `importlib_metadata.PathDistribution`, since we need to rely on its private `_path` attribute - # to obtain the path to metadata file/directory. But we need to account for possible sub-classes and vendored - # variants (`setuptools._vendor.importlib_metadata.PathDistribution`), so just check that `_path` is available. - if not hasattr(dist, '_path'): - raise RuntimeError( - f"Unsupported distribution type {type(dist)} for {package_name} - does not have _path attribute" - ) - src_path = dist._path - - # We expect the `_path` attribute to be an instance of `pathlib.Path`. This assumption is violated when the - # package happens to be installed as a zipped egg. In such case, `_path` is an instance of either `zipp.Path` - # (when using `importlib.metadata` from `importlib-metadata`, which in turn uses 3rd party `zipp` package) or - # `zipfile.Path` (when using stdlib's `importlib.metadata`). While we could attempt to read the metadata - # from the zip, we dropped geberal support for zipped eggs from PyInstaller in 6.0, so raise an error. - if not isinstance(src_path, Path): - # NOTE: `src_path.parent` is also an instance of `zipfile.Path` or `zipp.Path`, and calling its `is_file()` - # method returns False, because the root of zip file is (rightfully) considered a directory. Therefore, we - # convert the path to `pathlib.Path` by taking the parent of `src_path.parent` (which turns out to be a - # `pathlib.Path`) and add to it the name of the `src_path.parent` (the name of .egg file). - try: - src_parent = src_path.parent.parent / src_path.parent.name - except Exception: - src_parent = src_path.parent - - if src_parent.is_file() and src_parent.name.endswith('.egg'): - raise RuntimeError( - f"Cannot collect metadata from path {str(src_path)!r}, which appears to be inside a zipped egg. " - f"PyInstaller >= 6.0 does not support zipped eggs anymore. Please reinstall {package_name!r} " - "using modern package installation method instead of deprecated 'python setup.py install'. " - "For example, if you are using pip package manager:\n" - "1. uninstall the zipped egg:\n" - f" pip uninstall {package_name}\n" - "2. make sure pip and its dependencies are up-to-date:\n" - " python -m pip install --upgrade pip setuptools\n" - "3. install the package:\n" - f" pip install {package_name}\n" - "To install a package from source, pass the path to the source directory to 'pip install' command." - ) - else: - # Generic message for unforeseen cases. - raise RuntimeError( - f"Cannot collect metadata from path {src_path!r}, which is of unsupported type {type(src_path)}." - ) - - if src_path.is_dir(): - # The metadata is stored in a directory (.egg-info, .dist-info), so collect the whole directory. If the - # package is installed as an egg, the metadata directory is ([...]/package_name-version.egg/EGG-INFO), - # and requires special handling (as of PyInstaller v6, we support only non-zipped eggs). - if src_path.name == 'EGG-INFO' and src_path.parent.name.endswith('.egg'): - dest_path = os.path.join(*src_path.parts[-2:]) - else: - dest_path = src_path.name - elif src_path.is_file(): - # The metadata is stored in a single file. Collect it into top-level application directory. - # The .egg-info file is commonly used by Debian/Ubuntu when packaging python packages. - dest_path = '.' - else: - raise RuntimeError( - f"Distribution metadata path {src_path!r} for {package_name} is neither file nor directory!" - ) - - # Hack for metadata from packages vendored by setuptools >= 71. If source path is rooted in setuptools/_vendor, - # prepend the same to the destination path and avoid collecting into top-level directory. - if src_path.parent.name == '_vendor' and src_path.parent.parent.name == 'setuptools': - dest_path = os.path.join('setuptools', '_vendor', dest_path) - - out.append((str(src_path), str(dest_path))) - - if not recursive: - return out - done.add(package_name) - - # Process requirements; `importlib.metadata` has no API for parsing requirements, so we need to use - # `packaging.requirements`. This is necessary to discard requirements with markers that do not match the - # environment (e.g., `python_version`, `sys_platform`). - 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()] - - todo += requirements - - return out - - -def get_installer(dist_name: str): - """ - Try to find which package manager installed the specified distribution (e.g., pip, conda, rpm) by reading INSTALLER - file from distribution's metadata. - - If the specified distribution does not exist, fall back to treating the passed name as importable package/module - name, and attempt to look up its associated distribution name; this matches the behavior of implementation found - in older PyInstaller versions (<= v6.12.0). - - :param dist_name: Name of distribution to look up - :return: Name of package manager or None - - .. versionchanged:: 6.13 - The passed name is now first treated as a distribution name (direct look-up), and only if that fails, it is - treated as importable package/module name. - """ - - # First, perform direct look-up via the passed name, treating it as distribution name. - try: - dist = importlib_metadata.distribution(dist_name) - installer_text = dist.read_text('INSTALLER') - if installer_text is not None: - return installer_text.strip() - else: - # Distribution exists, but does not have an INSTALLER file; stop the search here. - return None - except importlib_metadata.PackageNotFoundError: - pass - - # Fall back to treating the passed name as importable package/module name, and try to resolve its associated - # distribution name (e.g., enchant -> pyenchant). This requires distributions to explicitly list their top-level - # importable names in `top_level.txt` file in metadata, or `importlib.metadata` that can inferring top-level - # importable names (available in stdlib for python >= 3.11, or in importlib-metadata >= 4.8.1). - module_name = dist_name - pkg_to_dist = importlib_metadata.packages_distributions() - dist_names = pkg_to_dist.get(module_name) - - # A namespace package might result in multiple dists; take the first one that has INSTALLER file available... - for dist_name in dist_names or []: - try: - dist = importlib_metadata.distribution(dist_name) - installer_text = dist.read_text('INSTALLER') - if installer_text is not None: - return installer_text.strip() - except importlib_metadata.PackageNotFoundError: - # This might happen with eggs if the egg directory name does not match the dist name declared in the - # metadata. - pass - - return None - - -def collect_all( - package_name: str, - include_py_files: bool = True, - filter_submodules: Callable = lambda name: True, - exclude_datas: list | None = None, - include_datas: list | None = None, - on_error: str = "warn once", -): - """ - Collect everything for a given package name. - - Arguments: - package_name: - An ``import``-able package name. - include_py_files: - Forwarded to :func:`collect_data_files`. - filter_submodules: - Forwarded to :func:`collect_submodules`. - exclude_datas: - Forwarded to :func:`collect_data_files`. - include_datas: - Forwarded to :func:`collect_data_files`. - on_error: - Forwarded onto :func:`collect_submodules`. - - Returns: - tuple: A ``(datas, binaries, hiddenimports)`` triplet containing: - - - All data files, raw Python files (if **include_py_files**), and distribution metadata directories (if - applicable). - - All dynamic libraries as returned by :func:`collect_dynamic_libs`. - - All submodules of **package_name**. - - Typical use:: - - datas, binaries, hiddenimports = collect_all('my_package_name') - """ - datas = collect_data_files(package_name, include_py_files, excludes=exclude_datas, includes=include_datas) - binaries = collect_dynamic_libs(package_name) - hiddenimports = collect_submodules(package_name, on_error=on_error, filter=filter_submodules) - - # `copy_metadata` requires a dist name instead of importable/package name. - # A namespace package might belong to multiple distributions, so process all of them. - pkg_to_dist = importlib_metadata.packages_distributions() - dist_names = set(pkg_to_dist.get(package_name, [])) - for dist_name in dist_names: - # Copy metadata - try: - datas += copy_metadata(dist_name) - except Exception: - pass - - return datas, binaries, hiddenimports - - -def collect_entry_point(name: str): - """ - Collect modules and metadata for all exporters of a given entry point. - - Args: - name: - The name of the entry point. Check the documentation for the library that uses the entry point to find - its name. - Returns: - A ``(datas, hiddenimports)`` pair that should be assigned to the ``datas`` and ``hiddenimports``, respectively. - - For libraries, such as ``pytest`` or ``keyring``, that rely on plugins to extend their behaviour. - - Examples: - Pytest uses an entry point called ``'pytest11'`` for its extensions. - To collect all those extensions use:: - - datas, hiddenimports = collect_entry_point("pytest11") - - These values may be used in a hook or added to the ``datas`` and ``hiddenimports`` arguments in the ``.spec`` - file. See :ref:`using spec files`. - - .. versionadded:: 4.3 - """ - datas = [] - imports = [] - for entry_point in importlib_metadata.entry_points(group=name): - datas += copy_metadata(entry_point.dist.name) - imports.append(entry_point.module) - return datas, imports - - -def get_hook_config(hook_api: PostGraphAPI, module_name: str, key: str): - """ - Get user settings for hooks. - - Args: - module_name: - The module/package for which the key setting belong to. - key: - A key for the config. - Returns: - The value for the config. ``None`` if not set. - - The ``get_hook_config`` function will lookup settings in the ``Analysis.hooksconfig`` dict. - - The hook settings can be added to ``.spec`` file in the form of:: - - a = Analysis(["my-app.py"], - ... - hooksconfig = { - "gi": { - "icons": ["Adwaita"], - "themes": ["Adwaita"], - "languages": ["en_GB", "zh_CN"], - }, - }, - ... - ) - """ - config = hook_api.analysis.hooksconfig - value = None - if module_name in config and key in config[module_name]: - value = config[module_name][key] - return value - - -def include_or_exclude_file( - filename: str, - include_list: list | None = None, - exclude_list: list | None = None, -): - """ - Generic inclusion/exclusion decision function based on filename and list of include and exclude patterns. - - Args: - filename: - Filename considered for inclusion. - include_list: - List of inclusion file patterns. - exclude_list: - List of exclusion file patterns. - - Returns: - A boolean indicating whether the file should be included or not. - - If ``include_list`` is provided, True is returned only if the filename matches one of include patterns (and does not - match any patterns in ``exclude_list``, if provided). If ``include_list`` is not provided, True is returned if - filename does not match any patterns in ``exclude list``, if provided. If neither list is provided, True is - returned for any filename. - """ - if include_list is not None: - for pattern in include_list: - if fnmatch.fnmatch(filename, pattern): - break - else: - return False # Not explicitly included; exclude - - if exclude_list is not None: - for pattern in exclude_list: - if fnmatch.fnmatch(filename, pattern): - return False # Explicitly excluded - - return True - - -def collect_delvewheel_libs_directory(package_name, libdir_name=None, datas=None, binaries=None): - """ - Collect data files and binaries from the .libs directory of a delvewheel-enabled python wheel. Such wheels ship - their shared libraries in a .libs directory that is located next to the package directory, and therefore falls - outside the purview of the collect_dynamic_libs() utility function. - - Args: - package_name: - Name of the package (e.g., scipy). - libdir_name: - Optional name of the .libs directory (e.g., scipy.libs). If not provided, ".libs" is added to - ``package_name``. - datas: - Optional list of datas to which collected data file entries are added. The combined result is retuned - as part of the output tuple. - binaries: - Optional list of binaries to which collected binaries entries are added. The combined result is retuned - as part of the output tuple. - - Returns: - tuple: A ``(datas, binaries)`` pair that should be assigned to the ``datas`` and ``binaries``, respectively. - - Examples: - Collect the ``scipy.libs`` delvewheel directory belonging to the Windows ``scipy`` wheel:: - - datas, binaries = collect_delvewheel_libs_directory("scipy") - - When the collected entries should be added to existing ``datas`` and ``binaries`` listst, the following form - can be used to avoid using intermediate temporary variables and merging those into existing lists:: - - datas, binaries = collect_delvewheel_libs_directory("scipy", datas=datas, binaries=binaries) - - .. versionadded:: 5.6 - """ - - datas = datas or [] - binaries = binaries or [] - - if libdir_name is None: - libdir_name = package_name + '.libs' - - # delvewheel is applicable only to Windows wheels - if not compat.is_win: - return datas, binaries - - # Get package's parent path - pkg_base, pkg_dir = get_package_paths(package_name) - pkg_base = Path(pkg_base) - libs_dir = pkg_base / libdir_name - - if not libs_dir.is_dir(): - return datas, binaries - - # Collect all dynamic libs - collect them as binaries in order to facilitate proper binary dependency analysis - # (for example, to ensure that system-installed VC runtime DLLs are collected, if needed). - # As of PyInstaller 5.4, this should be safe (should not result in duplication), because binary dependency - # analysis attempts to preserve the DLL directory structure. - binaries += [(str(dll_file), str(dll_file.parent.relative_to(pkg_base))) for dll_file in libs_dir.glob('*.dll')] - - # Collect the .load-order file; strictly speaking, this should be necessary only under python < 3.8, but let us - # collect it for completeness sake. Differently named variants have been observed: `.load_order`, `.load-order`, - # and `.load-order-Name`. - datas += [(str(load_order_file), str(load_order_file.parent.relative_to(pkg_base))) - for load_order_file in libs_dir.glob('.load[-_]order*')] - - return datas, binaries - - -if compat.is_pure_conda: - from PyInstaller.utils.hooks import conda as conda_support # noqa: F401 -elif compat.is_conda: - from PyInstaller.utils.hooks.conda import CONDA_META_DIR as _tmp - logger.warning( - "Assuming this is not an Anaconda environment or an additional venv/pipenv/... environment manager is being " - "used on top, because the conda-meta folder %s does not exist.", _tmp - ) - del _tmp diff --git a/voxvera/vendor/PyInstaller/utils/hooks/conda.py b/voxvera/vendor/PyInstaller/utils/hooks/conda.py deleted file mode 100755 index a237102..0000000 --- a/voxvera/vendor/PyInstaller/utils/hooks/conda.py +++ /dev/null @@ -1,401 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# language=rst -""" -Additional helper methods for working specifically with Anaconda distributions are found at -:mod:`PyInstaller.utils.hooks.conda_support` -which is designed to mimic (albeit loosely) the `importlib.metadata`_ package. These functions find and parse the -distribution metadata from json files located in the ``conda-meta`` directory. - -.. versionadded:: 4.2.0 - -This module is available only if run inside a Conda environment. Usage of this module should therefore be wrapped in -a conditional clause:: - - from PyInstaller.compat import is_pure_conda - - if is_pure_conda: - from PyInstaller.utils.hooks import conda_support - - # Code goes here. e.g. - binaries = conda_support.collect_dynamic_libs("numpy") - ... - -Packages are all referenced by the *distribution name* you use to install it, rather than the *package name* you import -it with. I.e., use ``distribution("pillow")`` instead of ``distribution("PIL")`` or use ``package_distribution("PIL")``. -""" -from __future__ import annotations - -import fnmatch -import json -import pathlib -import sys -from typing import Iterable, List -from importlib.metadata import PackagePath as _PackagePath - -from PyInstaller import compat -from PyInstaller.log import logger - -# Conda virtual environments each get their own copy of `conda-meta` so the use of `sys.prefix` instead of -# `sys.base_prefix`, `sys.real_prefix` or anything from our `compat` module is intentional. -CONDA_ROOT = pathlib.Path(sys.prefix) -CONDA_META_DIR = CONDA_ROOT / "conda-meta" - -# Find all paths in `sys.path` that are inside Conda root. -PYTHONPATH_PREFIXES = [] -for _path in sys.path: - _path = pathlib.Path(_path) - try: - PYTHONPATH_PREFIXES.append(_path.relative_to(sys.prefix)) - except ValueError: - pass - -PYTHONPATH_PREFIXES.sort(key=lambda p: len(p.parts), reverse=True) - - -class Distribution: - """ - A bucket class representation of a Conda distribution. - - This bucket exports the following attributes: - - :ivar name: The distribution's name. - :ivar version: Its version. - :ivar files: All filenames as :meth:`PackagePath`\\ s included with this distribution. - :ivar dependencies: Names of other distributions that this distribution depends on (with version constraints - removed). - :ivar packages: Names of importable packages included in this distribution. - - This class is not intended to be constructed directly by users. Rather use :meth:`distribution` or - :meth:`package_distribution` to provide one for you. - """ - def __init__(self, json_path: str): - try: - self._json_path = pathlib.Path(json_path) - assert self._json_path.exists() - except (TypeError, AssertionError): - raise TypeError( - "Distribution requires a path to a conda-meta json. Perhaps you want " - "`distribution({})` instead?".format(repr(json_path)) - ) - - # Everything we need (including this distribution's name) is kept in the metadata json. - self.raw: dict = json.loads(self._json_path.read_text()) - - # Unpack the more useful contents of the json. - self.name: str = self.raw["name"] - self.version: str = self.raw["version"] - self.files = [PackagePath(i) for i in self.raw["files"]] - self.dependencies = self._init_dependencies() - self.packages = self._init_package_names() - - def __repr__(self): - return "{}(name=\"{}\", packages={})".format(type(self).__name__, self.name, self.packages) - - def _init_dependencies(self): - """ - Read dependencies from ``self.raw["depends"]``. - - :return: Dependent distribution names. - :rtype: list - - The names in ``self.raw["depends"]`` come with extra version constraint information which must be stripped. - """ - dependencies = [] - # For each dependency: - for dependency in self.raw.get("depends", []): - # ``dependency`` is a string of the form: "[name] [version constraints]" - name, *version_constraints = dependency.split(maxsplit=1) - dependencies.append(name) - return dependencies - - def _init_package_names(self): - """ - Search ``self.files`` for package names shipped by this distribution. - - :return: Package names. - :rtype: list - - These are names you would ``import`` rather than names you would install. - """ - packages = [] - for file in self.files: - package = _get_package_name(file) - if package is not None: - packages.append(package) - return packages - - @classmethod - def from_name(cls, name: str): - """ - Get distribution information for a given distribution **name** (i.e., something you would ``conda install``). - - :rtype: :class:`Distribution` - """ - if name in distributions: - return distributions[name] - raise ModuleNotFoundError( - "Distribution {} is either not installed or was not installed using Conda.".format(name) - ) - - @classmethod - def from_package_name(cls, name: str): - """ - Get distribution information for a **package** (i.e., something you would import). - - :rtype: :class:`Distribution` - - For example, the package ``pkg_resources`` belongs to the distribution ``setuptools``, which contains three - packages. - - >>> package_distribution("pkg_resources") - Distribution(name="setuptools", - packages=['easy_install', 'pkg_resources', 'setuptools']) - """ - if name in distributions_by_package: - return distributions_by_package[name] - raise ModuleNotFoundError("Package {} is either not installed or was not installed using Conda.".format(name)) - - -distribution = Distribution.from_name -package_distribution = Distribution.from_package_name - - -class PackagePath(_PackagePath): - """ - A filename relative to Conda's root (``sys.prefix``). - - This class inherits from :class:`pathlib.PurePosixPath` even on non-Posix OSs. To convert to a :class:`pathlib.Path` - pointing to the real file, use the :meth:`locate` method. - """ - def locate(self): - """ - Return a path-like object for this path pointing to the file's true location. - """ - return pathlib.Path(sys.prefix) / self - - -def walk_dependency_tree(initial: str, excludes: Iterable[str] | None = None): - """ - Collect a :class:`Distribution` and all direct and indirect dependencies of that distribution. - - Arguments: - initial: - Distribution name to collect from. - excludes: - Distributions to exclude. - Returns: - A ``{name: distribution}`` mapping where ``distribution`` is the output of - :func:`conda_support.distribution(name) `. - """ - if excludes is not None: - excludes = set(excludes) - - # Rather than use true recursion, mimic it with a to-do queue. - from collections import deque - done = {} - names_to_do = deque([initial]) - - while names_to_do: - # Grab a distribution name from the to-do list. - name = names_to_do.pop() - try: - # Collect and save it's metadata. - done[name] = distribution = Distribution.from_name(name) - logger.debug("Collected Conda distribution '%s', a dependency of '%s'.", name, initial) - except ModuleNotFoundError: - logger.warning( - "Conda distribution '%s', dependency of '%s', was not found. " - "If you installed this distribution with pip then you may ignore this warning.", name, initial - ) - continue - # For each dependency: - for _name in distribution.dependencies: - if _name in done: - # Skip anything already done. - continue - if _name == name: - # Avoid infinite recursion if a distribution depends on itself. This will probably never happen but I - # certainly would not chance it. - continue - if excludes is not None and _name in excludes: - # Do not recurse to excluded dependencies. - continue - names_to_do.append(_name) - return done - - -def _iter_distributions(name, dependencies, excludes): - if dependencies: - return walk_dependency_tree(name, excludes).values() - else: - return [Distribution.from_name(name)] - - -def requires(name: str, strip_versions: bool = False) -> List[str]: - """ - List requirements of a distribution. - - Arguments: - name: - The name of the distribution. - strip_versions: - List only their names, not their version constraints. - Returns: - A list of distribution names. - """ - if strip_versions: - return distribution(name).dependencies - return distribution(name).raw["depends"] - - -def files(name: str, dependencies: bool = False, excludes: list | None = None) -> List[PackagePath]: - """ - List all files belonging to a distribution. - - Arguments: - name: - The name of the distribution. - dependencies: - Recursively collect files of dependencies too. - excludes: - Distributions to ignore if **dependencies** is true. - Returns: - All filenames belonging to the given distribution. - - With ``dependencies=False``, this is just a shortcut for:: - - conda_support.distribution(name).files - """ - return [file for dist in _iter_distributions(name, dependencies, excludes) for file in dist.files] - - -if compat.is_win: - lib_dir = pathlib.PurePath("Library", "bin") -else: - lib_dir = pathlib.PurePath("lib") - - -def collect_dynamic_libs(name: str, dest: str = ".", dependencies: bool = True, excludes: Iterable[str] | None = None): - """ - Collect DLLs for distribution **name**. - - Arguments: - name: - The distribution's project-name. - dest: - Target destination, defaults to ``'.'``. - dependencies: - Recursively collect libs for dependent distributions (recommended). - excludes: - Dependent distributions to skip, defaults to ``None``. - Returns: - List of DLLs in PyInstaller's ``(source, dest)`` format. - - This collects libraries only from Conda's shared ``lib`` (Unix) or ``Library/bin`` (Windows) folders. To collect - from inside a distribution's installation use the regular :func:`PyInstaller.utils.hooks.collect_dynamic_libs`. - """ - DLL_SUFFIXES = ("*.dll", "*.dylib", "*.so", "*.so.*") - _files = [] - for file in files(name, dependencies, excludes): - # A file is classified as a dynamic library if: - # 1) it lives inside the dedicated ``lib_dir`` DLL folder. - # - # NOTE: `file` is an instance of `PackagePath`, which inherits from `pathlib.PurePosixPath` even on Windows. - # Therefore, it does not properly handle cases when metadata paths contain Windows-style separator, which does - # seem to be used on some Windows installations (see #9113). Therefore, cast `file` to `pathlib.PurePath` - # before comparing its parent to `lib_dir` (which should also be a `pathlib.PurePath`). - if pathlib.PurePath(file).parent != lib_dir: - continue - # 2) it is a file (and not a directory or a symbolic link pointing to a directory) - resolved_file = file.locate() - if not resolved_file.is_file(): - continue - # 3) has a correct suffix - if not any([resolved_file.match(suffix) for suffix in DLL_SUFFIXES]): - continue - - _files.append((str(resolved_file), dest)) - return _files - - -# --- Map packages to distributions and vice-versa --- - - -def _get_package_name(file: PackagePath): - """ - Determine the package name of a Python file in :data:`sys.path`. - - Arguments: - file: - A Python filename relative to Conda root (sys.prefix). - Returns: - Package name or None. - - This function only considers single file packages e.g. ``foo.py`` or top level ``foo/__init__.py``\\ s. - Anything else is ignored (returning ``None``). - """ - file = pathlib.Path(file) - # TODO: Handle PEP 420 namespace packages (which are missing `__init__` module). No such Conda PEP 420 namespace - # packages are known. - - # Get top-level folders by finding parents of `__init__.xyz`s - if file.stem == "__init__" and file.suffix in compat.ALL_SUFFIXES: - file = file.parent - elif file.suffix not in compat.ALL_SUFFIXES: - # Keep single-file packages but skip DLLs, data and junk files. - return - - # Check if this file/folder's parent is in ``sys.path`` i.e. it's directly importable. This intentionally excludes - # submodules which would cause confusion because ``sys.prefix`` is in ``sys.path``, meaning that every file in an - # Conda installation is a submodule. - for prefix in PYTHONPATH_PREFIXES: - if len(file.parts) != len(prefix.parts) + 1: - # This check is redundant but speeds it up quite a bit. - continue - # There are no wildcards involved here. The use of ``fnmatch`` is simply to handle the `if case-insensitive - # file system: use case-insensitive string matching.` - if fnmatch.fnmatch(str(file.parent), str(prefix)): - return file.stem - - -# All the information we want is organised the wrong way. - -# We want to look up distribution based on package names, but we can only search for packages using distribution names. -# And we would like to search for a distribution's json file, but, due to the noisy filenames of the jsons, we can only -# find a json's distribution rather than a distribution's json. - -# So we have to read everything, then regroup distributions in the ways we want them grouped. This will likely be a -# spectacular bottleneck on full-blown Conda (non miniconda) with 250+ packages by default at several GiBs. I suppose we -# could cache this on a per-json basis if it gets too much. - - -def _init_distributions(): - distributions = {} - for path in CONDA_META_DIR.glob("*.json"): - dist = Distribution(path) - distributions[dist.name] = dist - return distributions - - -distributions = _init_distributions() - - -def _init_packages(): - distributions_by_package = {} - for distribution in distributions.values(): - for package in distribution.packages: - distributions_by_package[package] = distribution - return distributions_by_package - - -distributions_by_package = _init_packages() diff --git a/voxvera/vendor/PyInstaller/utils/hooks/django.py b/voxvera/vendor/PyInstaller/utils/hooks/django.py deleted file mode 100755 index 5b8bdae..0000000 --- a/voxvera/vendor/PyInstaller/utils/hooks/django.py +++ /dev/null @@ -1,152 +0,0 @@ -# ---------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ---------------------------------------------------------------------------- -import os - -from PyInstaller import isolated - - -@isolated.decorate -def django_dottedstring_imports(django_root_dir): - """ - An isolated helper that returns list of all Django dependencies, parsed from the `mysite.settings` module. - - NOTE: With newer version of Django this is most likely the part of PyInstaller that will be broken. - - Tested with Django 2.2 - """ - - import sys - import os - - import PyInstaller.utils.misc - from PyInstaller.utils import hooks as hookutils - - # Extra search paths to add to sys.path: - # - parent directory of the django_root_dir - # - django_root_dir itself; often, Django users do not specify absolute imports in the settings module. - search_paths = [ - PyInstaller.utils.misc.get_path_to_toplevel_modules(django_root_dir), - django_root_dir, - ] - sys.path += search_paths - - # Set the path to project's settings module - default_settings_module = os.path.basename(django_root_dir) + '.settings' - settings_module = os.environ.get('DJANGO_SETTINGS_MODULE', default_settings_module) - os.environ['DJANGO_SETTINGS_MODULE'] = settings_module - - # Calling django.setup() avoids the exception AppRegistryNotReady() and also reads the user settings - # from DJANGO_SETTINGS_MODULE. - # https://stackoverflow.com/questions/24793351/django-appregistrynotready - import django # noqa: E402 - - django.setup() - - # This allows to access all django settings even from the settings.py module. - from django.conf import settings # noqa: E402 - - hiddenimports = list(settings.INSTALLED_APPS) - - # Do not fail script when settings does not have such attributes. - if hasattr(settings, 'TEMPLATE_CONTEXT_PROCESSORS'): - hiddenimports += list(settings.TEMPLATE_CONTEXT_PROCESSORS) - - if hasattr(settings, 'TEMPLATE_LOADERS'): - hiddenimports += list(settings.TEMPLATE_LOADERS) - - hiddenimports += [settings.ROOT_URLCONF] - - def _remove_class(class_name): - return '.'.join(class_name.split('.')[0:-1]) - - #-- Changes in Django 1.7. - - # Remove class names and keep just modules. - if hasattr(settings, 'AUTHENTICATION_BACKENDS'): - for cl in settings.AUTHENTICATION_BACKENDS: - cl = _remove_class(cl) - hiddenimports.append(cl) - # Deprecated since 4.2, may be None until it is removed - cl = getattr(settings, 'DEFAULT_FILE_STORAGE', None) - if cl: - hiddenimports.append(_remove_class(cl)) - if hasattr(settings, 'FILE_UPLOAD_HANDLERS'): - for cl in settings.FILE_UPLOAD_HANDLERS: - cl = _remove_class(cl) - hiddenimports.append(cl) - if hasattr(settings, 'MIDDLEWARE_CLASSES'): - for cl in settings.MIDDLEWARE_CLASSES: - cl = _remove_class(cl) - hiddenimports.append(cl) - # Templates is a dict: - if hasattr(settings, 'TEMPLATES'): - for templ in settings.TEMPLATES: - backend = _remove_class(templ['BACKEND']) - hiddenimports.append(backend) - # Include context_processors. - if hasattr(templ, 'OPTIONS'): - if hasattr(templ['OPTIONS'], 'context_processors'): - # Context processors are functions - strip last word. - mods = templ['OPTIONS']['context_processors'] - mods = [_remove_class(x) for x in mods] - hiddenimports += mods - # Include database backends - it is a dict. - for v in settings.DATABASES.values(): - hiddenimports.append(v['ENGINE']) - - # Add templatetags and context processors for each installed app. - for app in settings.INSTALLED_APPS: - app_templatetag_module = app + '.templatetags' - app_ctx_proc_module = app + '.context_processors' - hiddenimports.append(app_templatetag_module) - hiddenimports += hookutils.collect_submodules(app_templatetag_module) - hiddenimports.append(app_ctx_proc_module) - - # Deduplicate imports. - hiddenimports = list(set(hiddenimports)) - - # Return the hidden imports - return hiddenimports - - -def django_find_root_dir(): - """ - Return path to directory (top-level Python package) that contains main django files. Return None if no directory - was detected. - - Main Django project directory contain files like '__init__.py', 'settings.py' and 'url.py'. - - In Django 1.4+ the script 'manage.py' is not in the directory with 'settings.py' but usually one level up. We - need to detect this special case too. - """ - # 'PyInstaller.config' cannot be imported as other top-level modules. - from PyInstaller.config import CONF - - # Get the directory with manage.py. Manage.py is supplied to PyInstaller as the first main executable script. - manage_py = CONF['main_script'] - manage_dir = os.path.dirname(os.path.abspath(manage_py)) - - # Get the Django root directory. The directory that contains settings.py and url.py. It could be the directory - # containing manage.py or any of its subdirectories. - settings_dir = None - files = set(os.listdir(manage_dir)) - if ('settings.py' in files or 'settings' in files) and 'urls.py' in files: - settings_dir = manage_dir - else: - for f in files: - if os.path.isdir(os.path.join(manage_dir, f)): - subfiles = os.listdir(os.path.join(manage_dir, f)) - # Subdirectory contains critical files. - if ('settings.py' in subfiles or 'settings' in subfiles) and 'urls.py' in subfiles: - settings_dir = os.path.join(manage_dir, f) - break # Find the first directory. - - return settings_dir diff --git a/voxvera/vendor/PyInstaller/utils/hooks/gi.py b/voxvera/vendor/PyInstaller/utils/hooks/gi.py deleted file mode 100755 index 9ae06ce..0000000 --- a/voxvera/vendor/PyInstaller/utils/hooks/gi.py +++ /dev/null @@ -1,457 +0,0 @@ -# ---------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ---------------------------------------------------------------------------- -import os -import pathlib -import shutil -import subprocess -import hashlib -import re - -from PyInstaller.depend.utils import _resolveCtypesImports -from PyInstaller.utils.hooks import collect_submodules, collect_system_data_files, get_hook_config -from PyInstaller import isolated -from PyInstaller import log as logging -from PyInstaller import compat -from PyInstaller.depend.bindepend import findSystemLibrary - -logger = logging.getLogger(__name__) - - -class GiModuleInfo: - def __init__(self, module, version, hook_api=None): - self.name = module - self.version = version - self.available = False - self.sharedlibs = [] - self.typelib = None - self.dependencies = [] - - # If hook API is available, use it to override the version from hookconfig. - if hook_api is not None: - module_versions = get_hook_config(hook_api, 'gi', 'module-versions') - if module_versions: - self.version = module_versions.get(module, version) - - logger.debug("Gathering GI module info for %s %s", module, self.version) - - @isolated.decorate - def _get_module_info(module, version): - import gi - - # Ideally, we would use gi.Repository, which provides common abstraction for some of the functions we use in - # this codepath (e.g., `require`, `get_typelib_path`, `get_immediate_dependencies`). However, it lacks the - # `get_shared_library` function, which is why we are using "full" bindings via `gi.repository.GIRepository`. - # - # PyGObject 3.52.0 switched from girepository-1.0 to girepository-2.0, which means that GIRepository version - # has changed from 2.0 to 3.0 and some of the API has changed. - try: - gi.require_version("GIRepository", "3.0") - new_api = True - except ValueError: - gi.require_version("GIRepository", "2.0") - new_api = False - - from gi.repository import GIRepository - - # The old API had `get_default` method to obtain global singleton object; it was removed in the new API, - # which requires creation of separate GIRepository instances. - if new_api: - repo = GIRepository.Repository() - try: - repo.require(module, version, GIRepository.RepositoryLoadFlags.LAZY) - except ValueError: - return None # Module not available - - # The new API returns the list of shared libraries. - sharedlibs = repo.get_shared_libraries(module) - else: - repo = GIRepository.Repository.get_default() - try: - repo.require(module, version, GIRepository.RepositoryLoadFlags.IREPOSITORY_LOAD_FLAG_LAZY) - except ValueError: - return None # Module not available - - # Shared library/libraries - # Comma-separated list of paths to shared libraries, or None if none are associated. Convert to list. - sharedlibs = repo.get_shared_library(module) - sharedlibs = [lib.strip() for lib in sharedlibs.split(",")] if sharedlibs else [] - - # Path to .typelib file - typelib = repo.get_typelib_path(module) - - # Dependencies - # GIRepository.Repository.get_immediate_dependencies is available from gobject-introspection v1.44 on - if hasattr(repo, 'get_immediate_dependencies'): - dependencies = repo.get_immediate_dependencies(module) - else: - dependencies = repo.get_dependencies(module) - - return { - 'sharedlibs': sharedlibs, - 'typelib': typelib, - 'dependencies': dependencies, - } - - # Try to query information; if this fails, mark module as unavailable. - try: - info = _get_module_info(module, self.version) - if info is None: - logger.debug("GI module info %s %s not found.", module, self.version) - else: - logger.debug("GI module info %s %s found.", module, self.version) - self.sharedlibs = info['sharedlibs'] - self.typelib = info['typelib'] - self.dependencies = info['dependencies'] - self.available = True - except Exception as e: - logger.warning("Failed to query GI module %s %s: %s", module, self.version, e) - - def get_libdir(self): - """ - Return the path to shared library used by the module. If no libraries are associated with the typelib, None is - returned. If multiple library names are associated with the typelib, the path to the first resolved shared - library is returned. Raises exception if module is unavailable or none of the shared libraries could be - resolved. - """ - # Module unavailable - if not self.available: - raise ValueError(f"Module {self.name} {self.version} is unavailable!") - # Module has no associated shared libraries - if not self.sharedlibs: - return None - for lib in self.sharedlibs: - path = findSystemLibrary(lib) - if path: - return os.path.normpath(os.path.dirname(path)) - raise ValueError(f"Could not resolve any shared library of {self.name} {self.version}: {self.sharedlibs}!") - - def collect_typelib_data(self): - """ - Return a tuple of (binaries, datas, hiddenimports) to be used by PyGObject related hooks. - """ - datas = [] - binaries = [] - hiddenimports = [] - - logger.debug("Collecting module data for %s %s", self.name, self.version) - - # Module unavailable - if not self.available: - raise ValueError(f"Module {self.name} {self.version} is unavailable!") - - # Find shared libraries - resolved_libs = _resolveCtypesImports(self.sharedlibs) - for resolved_lib in resolved_libs: - logger.debug("Collecting shared library %s at %s", resolved_lib[0], resolved_lib[1]) - binaries.append((resolved_lib[1], ".")) - - # Find and collect .typelib file. Run it through the `gir_library_path_fix` to fix the library path, if - # necessary. - typelib_entry = gir_library_path_fix(self.typelib) - if typelib_entry: - logger.debug('Collecting gir typelib at %s', typelib_entry[0]) - datas.append(typelib_entry) - - # Overrides for the module - hiddenimports += collect_submodules('gi.overrides', lambda name: name.endswith('.' + self.name)) - - # Module dependencies - for dep in self.dependencies: - dep_module, _ = dep.rsplit('-', 1) - hiddenimports += [f'gi.repository.{dep_module}'] - - return binaries, datas, hiddenimports - - -# The old function, provided for backwards compatibility in 3rd party hooks. -def get_gi_libdir(module, version): - module_info = GiModuleInfo(module, version) - return module_info.get_libdir() - - -# The old function, provided for backwards compatibility in 3rd party hooks. -def get_gi_typelibs(module, version): - """ - Return a tuple of (binaries, datas, hiddenimports) to be used by PyGObject related hooks. Searches for and adds - dependencies recursively. - - :param module: GI module name, as passed to 'gi.require_version()' - :param version: GI module version, as passed to 'gi.require_version()' - """ - module_info = GiModuleInfo(module, version) - return module_info.collect_typelib_data() - - -def gir_library_path_fix(path): - import subprocess - - # 'PyInstaller.config' cannot be imported as other top-level modules. - from PyInstaller.config import CONF - - path = os.path.abspath(path) - - # On macOS we need to recompile the GIR files to reference the loader path, - # but this is not necessary on other platforms. - if compat.is_darwin: - - # If using a virtualenv, the base prefix and the path of the typelib - # have really nothing to do with each other, so try to detect that. - common_path = os.path.commonprefix([compat.base_prefix, path]) - if common_path == '/': - logger.debug("virtualenv detected? fixing the gir path...") - common_path = os.path.abspath(os.path.join(path, '..', '..', '..')) - - gir_path = os.path.join(common_path, 'share', 'gir-1.0') - - typelib_name = os.path.basename(path) - gir_name = os.path.splitext(typelib_name)[0] + '.gir' - - gir_file = os.path.join(gir_path, gir_name) - - if not os.path.exists(gir_path): - logger.error( - "Unable to find gir directory: %s.\nTry installing your platform's gobject-introspection package.", - gir_path - ) - return None - if not os.path.exists(gir_file): - logger.error( - "Unable to find gir file: %s.\nTry installing your platform's gobject-introspection package.", gir_file - ) - return None - - with open(gir_file, 'r', encoding='utf-8') as f: - lines = f.readlines() - # GIR files are `XML encoded `_, - # which means they are by definition encoded using UTF-8. - with open(os.path.join(CONF['workpath'], gir_name), 'w', encoding='utf-8') as f: - for line in lines: - if 'shared-library' in line: - split = re.split('(=)', line) - files = re.split('(["|,])', split[2]) - for count, item in enumerate(files): - if 'lib' in item: - files[count] = '@loader_path/' + os.path.basename(item) - line = ''.join(split[0:2]) + ''.join(files) - f.write(line) - - # g-ir-compiler expects a file so we cannot just pipe the fixed file to it. - command = subprocess.Popen(( - 'g-ir-compiler', os.path.join(CONF['workpath'], gir_name), - '-o', os.path.join(CONF['workpath'], typelib_name) - )) # yapf: disable - command.wait() - - return os.path.join(CONF['workpath'], typelib_name), 'gi_typelibs' - else: - return path, 'gi_typelibs' - - -@isolated.decorate -def get_glib_system_data_dirs(): - import gi - gi.require_version('GLib', '2.0') - from gi.repository import GLib - return GLib.get_system_data_dirs() - - -def get_glib_sysconf_dirs(): - """ - Try to return the sysconf directories (e.g., /etc). - """ - if compat.is_win: - # On Windows, if you look at gtkwin32.c, sysconfdir is actually relative to the location of the GTK DLL. Since - # that is what we are actually interested in (not the user path), we have to do that the hard way... - return [os.path.join(get_gi_libdir('GLib', '2.0'), 'etc')] - - @isolated.call - def data_dirs(): - import gi - gi.require_version('GLib', '2.0') - from gi.repository import GLib - return GLib.get_system_config_dirs() - - return data_dirs - - -def collect_glib_share_files(*path): - """ - Path is relative to the system data directory (e.g., /usr/share). - """ - glib_data_dirs = get_glib_system_data_dirs() - if glib_data_dirs is None: - return [] - - destdir = os.path.join('share', *path) - - # TODO: will this return too much? - collected = [] - for data_dir in glib_data_dirs: - p = os.path.join(data_dir, *path) - collected += collect_system_data_files(p, destdir=destdir, include_py_files=False) - - return collected - - -def collect_glib_etc_files(*path): - """ - Path is relative to the system config directory (e.g., /etc). - """ - glib_config_dirs = get_glib_sysconf_dirs() - if glib_config_dirs is None: - return [] - - destdir = os.path.join('etc', *path) - - # TODO: will this return too much? - collected = [] - for config_dir in glib_config_dirs: - p = os.path.join(config_dir, *path) - collected += collect_system_data_files(p, destdir=destdir, include_py_files=False) - - return collected - - -_glib_translations = None - - -def collect_glib_translations(prog, lang_list=None): - """ - Return a list of translations in the system locale directory whose names equal prog.mo. - """ - global _glib_translations - if _glib_translations is None: - if lang_list is not None: - trans = [] - for lang in lang_list: - trans += collect_glib_share_files(os.path.join("locale", lang)) - _glib_translations = trans - else: - _glib_translations = collect_glib_share_files('locale') - - names = [os.sep + prog + '.mo', os.sep + prog + '.po'] - namelen = len(names[0]) - - return [(src, dst) for src, dst in _glib_translations if src[-namelen:] in names] - - -# Not a hook utility function per-se (used by main Analysis class), but kept here to have all GLib/GObject functions -# in one place... -def compile_glib_schema_files(datas_toc, workdir, collect_source_files=False): - """ - Compile collected GLib schema files. Extracts the list of GLib schema files from the given input datas TOC, copies - them to temporary working directory, and compiles them. The resulting `gschemas.compiled` file is added to the - output TOC, replacing any existing entry with that name. If `collect_source_files` flag is set, the source XML - schema files are also (re)added to the output TOC; by default, they are not. This function is no-op (returns the - original TOC) if no GLib schemas are found in TOC or if `glib-compile-schemas` executable is not found in `PATH`. - """ - SCHEMA_DEST_DIR = pathlib.PurePath("share/glib-2.0/schemas") - workdir = pathlib.Path(workdir) - - schema_files = [] - output_toc = [] - for toc_entry in datas_toc: - dest_name, src_name, typecode = toc_entry - dest_name = pathlib.PurePath(dest_name) - src_name = pathlib.PurePath(src_name) - - # Pass-through for non-schema files, identified based on the destination directory. - if dest_name.parent != SCHEMA_DEST_DIR: - output_toc.append(toc_entry) - continue - - # It seems schemas directory contains different files with different suffices: - # - .gschema.xml - # - .schema.override - # - .enums.xml - # To avoid omitting anything, simply collect everything into temporary directory. - # Exemptions are gschema.dtd (which should be unnecessary) and gschemas.compiled (which we will generate - # ourselves in this function). - if src_name.name in {"gschema.dtd", "gschemas.compiled"}: - continue - - schema_files.append(src_name) - - # If there are no schema files available, simply return the input datas TOC. - if not schema_files: - return datas_toc - - # Ensure that `glib-compile-schemas` executable is in PATH, just in case... - schema_compiler_exe = shutil.which('glib-compile-schemas') - if not schema_compiler_exe: - logger.warning("GLib schema compiler (glib-compile-schemas) not found! Skipping GLib schema recompilation...") - return datas_toc - - # If `gschemas.compiled` file already exists in the temporary working directory, record its modification time and - # hash. This will allow us to restore the modification time on the newly-compiled copy, if the latter turns out - # to be identical to the existing old one. Just in case, if the file becomes subject to timestamp-based caching - # mechanism. - compiled_file = workdir / "gschemas.compiled" - old_compiled_file_hash = None - old_compiled_file_stat = None - - if compiled_file.is_file(): - # Record creation/modification time - old_compiled_file_stat = compiled_file.stat() - # Compute SHA1 hash; since compiled schema files are relatively small, do it in single step. - old_compiled_file_hash = hashlib.sha1(compiled_file.read_bytes()).digest() - - # Ensure that temporary working directory exists, and is empty. - if workdir.exists(): - shutil.rmtree(workdir) - workdir.mkdir(exist_ok=True) - - # Copy schema (source) files to temporary working directory - for schema_file in schema_files: - shutil.copy(schema_file, workdir) - - # Compile. The glib-compile-schema might produce warnings on its own (e.g., schemas using deprecated paths, or - # overrides for non-existent keys). Since these are non-actionable, capture and display them only as a DEBUG - # message, or as a WARNING one if the command fails. - logger.info("Compiling collected GLib schema files in %r...", str(workdir)) - try: - cmd_args = [schema_compiler_exe, str(workdir), '--targetdir', str(workdir)] - p = subprocess.run( - cmd_args, - stdin=subprocess.DEVNULL, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - check=True, - errors='ignore', - encoding='utf-8', - ) - logger.debug("Output from glib-compile-schemas:\n%s", p.stdout) - except subprocess.CalledProcessError as e: - # The called glib-compile-schema returned error. Display stdout/stderr, and return original datas TOC to - # minimize damage. - logger.warning("Failed to recompile GLib schemas! Returning collected files as-is!", exc_info=True) - logger.warning("Output from glib-compile-schemas:\n%s", e.stdout) - return datas_toc - except Exception: - # Compilation failed for whatever reason. Return original datas TOC to minimize damage. - logger.warning("Failed to recompile GLib schemas! Returning collected files as-is!", exc_info=True) - return datas_toc - - # Compute the checksum of the new compiled file, and if it matches the old checksum, restore the modification time. - if old_compiled_file_hash is not None: - new_compiled_file_hash = hashlib.sha1(compiled_file.read_bytes()).digest() - if new_compiled_file_hash == old_compiled_file_hash: - os.utime(compiled_file, ns=(old_compiled_file_stat.st_atime_ns, old_compiled_file_stat.st_mtime_ns)) - - # Add the resulting gschemas.compiled file to the output TOC - output_toc.append((str(SCHEMA_DEST_DIR / compiled_file.name), str(compiled_file), "DATA")) - - # Include source schema files in the output TOC (optional) - if collect_source_files: - for schema_file in schema_files: - output_toc.append((str(SCHEMA_DEST_DIR / schema_file.name), str(schema_file), "DATA")) - - return output_toc diff --git a/voxvera/vendor/PyInstaller/utils/hooks/qt/__init__.py b/voxvera/vendor/PyInstaller/utils/hooks/qt/__init__.py deleted file mode 100755 index fbefbe3..0000000 --- a/voxvera/vendor/PyInstaller/utils/hooks/qt/__init__.py +++ /dev/null @@ -1,1427 +0,0 @@ -# ---------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import glob -import os -import pathlib -import re - -from PyInstaller import compat -from PyInstaller import isolated -from PyInstaller import log as logging -from PyInstaller.depend import bindepend -from PyInstaller.utils import hooks, misc -from PyInstaller.utils.hooks.qt import _modules_info - -logger = logging.getLogger(__name__) - -# Qt deployment approach -# ---------------------- -# This is the core of PyInstaller's approach to Qt deployment. It is based on: -# -# - Discovering the location of Qt libraries by introspection, using QtLibraryInfo_. This provides compatibility with -# many variants of Qt5/6 (conda, self-compiled, provided by a Linux distro, etc.) and many versions of Qt5/6, all of -# which vary in the location of Qt files. -# -# - Placing all frozen PyQt5/6 or PySide2/6 Qt files in a standard subdirectory layout, which matches the layout of the -# corresponding wheel on PyPI. This is necessary to support Qt installs which are not in a subdirectory of the PyQt5/6 -# or PySide2/6 wrappers. See ``hooks/rthooks/pyi_rth_qt5.py`` for the use of environment variables to establish this -# layout. -# -# - Emitting warnings on missing QML and translation files which some installations do not have. -# -# - Determining additional files needed for deployment based on the information in the centralized Qt module information -# list in the ``_modules_info`` module. This includes plugins and translation files associated with each Qt python -# extension module, as well as additional python Qt extension modules. -# -# - Collecting additional files that are specific to each module and are handled separately, for example: -# -# - For dynamic OpenGL applications, the ``libEGL.dll``, ``libGLESv2.dll``, ``d3dcompiler_XX.dll`` (the XX is a -# version number), and ``opengl32sw.dll`` libraries need to be collected on Windows. This is handled by the -# "base" bindings hook, for example ``hook-PyQt5.py``. -# -# - If Qt was configured to use ICU, the ``icudtXX.dll``, ``icuinXX.dll``, and ``icuucXX.dll`` libraries need to -# be collected on Windows. This is handled by the "base" bindings hook, for example ``hook-PyQt5.py``. -# -# - Per the `Deploying QML Applications `_ page, QML-based -# applications need the ``qml/`` directory available. This is handled by ``QtQuick`` hook, for example -# ``hook-PyQt5.QtQuick.py``. -# -# - For ``QtWebEngine``-based applications, we follow the `deployWebEngineCore -# `_ -# function copies the following files from ``resources/``, and also copies the web engine process executable. -# - ``icudtl.dat`` -# - ``qtwebengine_devtools_resources.pak`` -# - ``qtwebengine_resources.pak`` -# - ``qtwebengine_resources_100p.pak`` -# - ``qtwebengine_resources_200p.pak`` -# -# This is handled by the ``QtWebEngineCore`` hook, for example ``hook-PyQt5.QtWebEngineCore.py``. -# -# For details and references, see the `original write-up -# `_ -# and the documentation in the ``_modules_info`` module. - - -# QtModuleInfo -# ------------ -# This class contains information about python module (extension), its corresponding Qt module (shared library), and -# associated plugins and translations. It is used within QtLibraryInfo_ to establish name-based mappings for file -# collection. -class QtModuleInfo: - def __init__(self, module, shared_lib=None, translations=None, plugins=None): - # Python module (extension) name without package namespace. For example, `QtCore`. - # Can be None if python bindings do not bind the module, but we still need to establish relationship between - # the Qt module (shared library) and its plugins and translations. - self.module = module - # Associated Qt module (shared library), if any. Used during recursive dependency analysis, where a python - # module (extension) is analyzed for linked Qt modules (shared libraries), and then their corresponding - # python modules (extensions) are added to hidden imports. For example, the Qt module name is `Qt5Core` or - # `Qt6Core`, depending on the Qt version. Can be None for python modules that are not tied to a particular - # Qt shared library (for example, the corresponding Qt module is headers-only) and hence they cannot be - # inferred from recursive link-time dependency analysis. - self.shared_lib = shared_lib - # List of base names of translation files (if any) associated with the Qt module. Multiple base names may be - # associated with a single module. - # For example, `['qt', 'qtbase']` for `QtCore` or `['qtmultimedia']` for `QtMultimedia`. - self.translations = translations or [] - # List of plugins associated with the Qt module. - self.plugins = plugins or [] - - def __repr__(self): - return f"(module={self.module!r}, shared_lib={self.shared_lib!r}, " \ - f"translations={self.translations!r}, plugins={self.plugins!r}" - - -# QtLibraryInfo -# -------------- -# This class uses introspection to determine the location of Qt files. This is essential to deal with the many variants -# of the PyQt5/6 and PySide2/6 package, each of which places files in a different location. Therefore, this class -# provides all location-related members of `QLibraryInfo `_. -class QtLibraryInfo: - def __init__(self, namespace): - if namespace not in ['PyQt5', 'PyQt6', 'PySide2', 'PySide6']: - raise Exception('Invalid namespace: {0}'.format(namespace)) - self.namespace = namespace - # Distinction between PyQt5/6 and PySide2/6 - self.is_pyqt = namespace in {'PyQt5', 'PyQt6'} - # Distinction between Qt5 and Qt6 - self.qt_major = 6 if namespace in {'PyQt6', 'PySide6'} else 5 - # Determine relative path where Qt libraries and data need to be collected in the frozen application. This - # varies between PyQt5/PyQt6/PySide2/PySide6, their versions, and platforms. NOTE: it is tempting to consider - # deriving this path as simply the value of QLibraryInfo.PrefixPath, taken relative to the package's root - # directory. However, we also need to support non-wheel deployments (e.g., with Qt installed in custom path on - # Windows, or with Qt and PyQt5 installed on linux using native package manager), and in those, the Qt - # PrefixPath does not reflect the required relative target path for the frozen application. - if namespace == 'PyQt5': - if self._use_new_layout("PyQt5", "5.15.4", False): - self.qt_rel_dir = os.path.join('PyQt5', 'Qt5') - else: - self.qt_rel_dir = os.path.join('PyQt5', 'Qt') - elif namespace == 'PyQt6': - if self._use_new_layout("PyQt6", "6.0.3", True): - self.qt_rel_dir = os.path.join('PyQt6', 'Qt6') - else: - self.qt_rel_dir = os.path.join('PyQt6', 'Qt') - elif namespace == 'PySide2': - # PySide2 uses PySide2/Qt on linux and macOS, and PySide2 on Windows - if compat.is_win: - self.qt_rel_dir = 'PySide2' - else: - self.qt_rel_dir = os.path.join('PySide2', 'Qt') - else: - # PySide6 follows the same logic as PySide2 - if compat.is_win: - self.qt_rel_dir = 'PySide6' - else: - self.qt_rel_dir = os.path.join('PySide6', 'Qt') - - # Process module information list to construct python-module-name -> info and shared-lib-name -> info mappings. - self._load_module_info() - - def __repr__(self): - return f"QtLibraryInfo({self.namespace})" - - # Delay initialization of the Qt library information until the corresponding attributes are first requested. - def __getattr__(self, name): - if 'version' in self.__dict__: - # Initialization was already done, but requested attribute is not available. - raise AttributeError(name) - - # Load Qt library info... - self._load_qt_info() - # ... and return the requested attribute - return getattr(self, name) - - # Check whether we must use the new layout (e.g. PyQt5/Qt5, PyQt6/Qt6) instead of the old layout (PyQt5/Qt, - # PyQt6/Qt). - @staticmethod - def _use_new_layout(package_basename: str, version: str, fallback_value: bool) -> bool: - # The PyQt wheels come in both non-commercial and commercial variants. So we need to check if a particular - # variant is installed before testing its version. - if hooks.check_requirement(package_basename): - return hooks.check_requirement(f"{package_basename} >= {version}") - if hooks.check_requirement(f"{package_basename}_commercial"): - return hooks.check_requirement(f"{package_basename}_commercial >= {version}") - return fallback_value - - # Load Qt information (called on first access to related fields) - def _load_qt_info(self): - """ - Load and process Qt library information. Called on the first access to the related attributes of the class - (e.g., `version` or `location`). - """ - - # Ensure self.version exists, even if PyQt{5,6}/PySide{2,6} cannot be imported. Hooks and util functions use - # `if .version` to check whether package was imported and other attributes are expected to be available. - # This also serves as a marker that initialization was already done. - self.version = None - - # Get library path information from Qt. See QLibraryInfo_. - @isolated.decorate - def _read_qt_library_info(package): - import os - import sys - import importlib - - # Import the Qt-based package - # equivalent to: from package.QtCore import QLibraryInfo, QCoreApplication - try: - QtCore = importlib.import_module('.QtCore', package) - except ModuleNotFoundError: - return None # Signal that package is unavailable - QLibraryInfo = QtCore.QLibraryInfo - QCoreApplication = QtCore.QCoreApplication - - # QLibraryInfo is not always valid until a QCoreApplication is instantiated. - app = QCoreApplication(sys.argv) # noqa: F841 - - # Qt6 deprecated QLibraryInfo.location() in favor of QLibraryInfo.path(), and - # QLibraryInfo.LibraryLocation enum was replaced by QLibraryInfo.LibraryPath. - if hasattr(QLibraryInfo, 'path'): - # Qt6; enumerate path enum values directly from the QLibraryInfo.LibraryPath enum. - path_names = [x for x in dir(QLibraryInfo.LibraryPath) if x.endswith('Path')] - location = {x: QLibraryInfo.path(getattr(QLibraryInfo.LibraryPath, x)) for x in path_names} - else: - # Qt5; in recent versions, location enum values can be enumeratd from QLibraryInfo.LibraryLocation. - # However, in older versions of Qt5 and its python bindings, that is unavailable. Hence the - # enumeration of "*Path"-named members of QLibraryInfo. - path_names = [x for x in dir(QLibraryInfo) if x.endswith('Path')] - location = {x: QLibraryInfo.location(getattr(QLibraryInfo, x)) for x in path_names} - - # Determine the python-based package location, by looking where the QtCore module is located. - package_location = os.path.dirname(QtCore.__file__) - - # Determine Qt version. Works for Qt 5.8 and later, where QLibraryInfo.version() was introduced. - try: - version = QLibraryInfo.version().segments() - except AttributeError: - version = [] - - return { - 'is_debug_build': QLibraryInfo.isDebugBuild(), - 'version': version, - 'location': location, - 'package_location': package_location, - } - - try: - qt_info = _read_qt_library_info(self.namespace) - except Exception as e: - logger.warning("%s: failed to obtain Qt library info: %s", self, e) - return - - # If package could not be imported, `_read_qt_library_info` returns None. In such cases, emit a debug message - # instead of a warning, because this initialization might be triggered by a helper function that is trying to - # determine availability of bindings by inspecting the `version` attribute of `QtLibraryInfo` for all bindings. - if qt_info is None: - logger.debug("%s: failed to obtain Qt library info: %s.QtCore could not be imported.", self, self.namespace) - return - - for k, v in qt_info.items(): - setattr(self, k, v) - - # Turn package_location into pathlib.Path(), and fully resolve it. - self.package_location = pathlib.Path(self.package_location).resolve() - - # Determine if the Qt is bundled with python package itself; this usually means we are dealing with with PyPI - # wheels. - resolved_qt_prefix_path = pathlib.Path(self.location['PrefixPath']).resolve() - self.qt_inside_package = ( - self.package_location == resolved_qt_prefix_path or # PySide2 and PySide6 Windows PyPI wheels - self.package_location in resolved_qt_prefix_path.parents - ) - - # Determine directory that contains Qt shared libraries. On non-Windows, this is typically location given by - # `LibrariesPath`. On Windows, it is usually `BinariesPath`, except for PySide PyPI wheels, where DLLs are - # placed in top-level `PrefixPath`. - if compat.is_win: - if self.qt_inside_package and not self.is_pyqt: - # Windows PyPI wheel - qt_lib_dir = self.location['PrefixPath'] - else: - qt_lib_dir = self.location['BinariesPath'] - else: - qt_lib_dir = self.location['LibrariesPath'] - self.qt_lib_dir = pathlib.Path(qt_lib_dir).resolve() - - # Module information list loading/processing - def _load_module_info(self): - """ - Process the Qt modules info definition list and construct two dictionaries: - - dictionary that maps Qt python module names to Qt module info entries - - dictionary that maps shared library names to Qt module info entries - """ - - self.python_modules = dict() - self.shared_libraries = dict() - - for entry in _modules_info.QT_MODULES_INFO: - # If entry specifies applicable bindings, check them - if entry.bindings: - applicable_bindings = _modules_info.process_namespace_strings(entry.bindings) - if self.namespace not in applicable_bindings: - continue - - # Create a QtModuleInfo entry - info_entry = QtModuleInfo( - module=entry.module, - shared_lib=f"Qt{self.qt_major}{entry.shared_lib}" if entry.shared_lib else None, - translations=entry.translations, - plugins=entry.plugins - ) - - # If we have python module (extension) name, create python-module-name -> info mapping. - if info_entry.module is not None: - self.python_modules[info_entry.module] = info_entry - - # If we have Qt module (shared library) name, create shared-lib-name -> info mapping. - if info_entry.shared_lib is not None: - self.shared_libraries[info_entry.shared_lib.lower()] = info_entry - - def _normalize_shared_library_name(self, filename): - """ - Normalize a shared library name into common form that we can use for look-ups and comparisons. - Primarily intended for Qt shared library names. - """ - - # Take base name, remove suffix, and lower case it. - lib_name = os.path.splitext(os.path.basename(filename))[0].lower() - # Linux libraries sometimes have a dotted version number -- ``libfoo.so.3``. It is now ''libfoo.so``, - # but the ``.so`` must also be removed. - if compat.is_linux and os.path.splitext(lib_name)[1] == '.so': - lib_name = os.path.splitext(lib_name)[0] - # Remove the "lib" prefix (Linux, macOS). - if lib_name.startswith('lib'): - lib_name = lib_name[3:] - # macOS: handle different naming schemes. PyPI wheels ship framework-enabled Qt builds, where shared - # libraries are part of .framework bundles (e.g., ``PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore``). - # In Anaconda (Py)Qt installations, the shared libraries are installed in environment's library directory, - # and contain versioned extensions, e.g., ``libQt5Core.5.dylib``. - if compat.is_darwin: - if lib_name.startswith('qt') and not lib_name.startswith('qt' + str(self.qt_major)): - # Qt library from a framework bundle (e.g., ``QtCore``); change prefix from ``qt`` to ``qt5`` or - # ``qt6`` to match names in Windows/Linux. - lib_name = 'qt' + str(self.qt_major) + lib_name[2:] - if lib_name.endswith('.' + str(self.qt_major)): - # Qt library from Anaconda, which originally had versioned extension, e.g., ``libfoo.5.dynlib``. - # The above processing turned it into ``foo.5``, so we need to remove the last two characters. - lib_name = lib_name[:-2] - - # Handle cases with QT_LIBINFIX set to '_conda', i.e. conda-forge builds. - if lib_name.endswith('_conda'): - lib_name = lib_name[:-6] - - return lib_name - - # Collection - def collect_module(self, module_name): - """ - Collect all dependencies (hiddenimports, binaries, datas) for the given Qt python module. - - This function performs recursive analysis of extension module's link-time dependencies, and uses dictionaries - built by `_load_module_info` to discover associated plugin types, translation file base names, and hidden - imports that need to be collected. - """ - - # Accumulate all dependencies in a set to avoid duplicates. - hiddenimports = set() - translation_base_names = set() - plugin_types = set() - - # Exit if the requested library cannot be imported. - # NOTE: self..version can be empty list on older Qt5 versions (#5381). - if self.version is None: - return [], [], [] - - logger.debug('%s: processing module %s...', self, module_name) - - # Look up the associated Qt module information by python module name. - # This allows us to collect associated module data directly, even if there is no associated shared library - # (e.g., header-only Qt module, or statically-built one). - short_module_name = module_name.split('.', 1)[-1] # PySide2.QtModule -> QtModule - if short_module_name in self.python_modules: - qt_module_info = self.python_modules[short_module_name] - - # NOTE: no need to add a hiddenimport here, because this is the module under consideration. - - # Add plugins - plugin_types.update(qt_module_info.plugins) - - # Add translation base name(s) - translation_base_names.update(qt_module_info.translations) - - # Find the actual module extension file. - module_file = hooks.get_module_file_attribute(module_name) - - # Additional search path for shared library resolution. This is mostly required for library resolution on - # Windows (Linux and macOS binaries use run paths to find Qt libs). - qtlib_search_paths = [ - # For PyQt5 and PyQt6 wheels, shared libraries should be in BinariesPath, while for PySide2 and PySide6, - # they should be in PrefixPath. - self.location['BinariesPath' if self.is_pyqt else 'PrefixPath'], - ] - - # Walk through all the link-time dependencies of a dynamically-linked library (``.so``/``.dll``/``.dylib``). - imported_libraries = bindepend.get_imports(module_file, qtlib_search_paths) - while imported_libraries: - imported_lib_name, imported_lib_path = imported_libraries.pop() # (name, fullpath) tuple - - # Skip unresolved libraries - if imported_lib_path is None: - logger.debug("%s: ignoring unresolved library import %r", self, imported_lib_name) - continue - - # Normalize the shared library name - lib_name = self._normalize_shared_library_name(imported_lib_path) - logger.debug( - '%s: imported library %r, full path %r -> parsed name %r.', self, imported_lib_name, imported_lib_path, - lib_name - ) - - # PySide2 and PySide6 on linux seem to link all extension modules against libQt5Core, libQt5Network, and - # libQt5Qml (or their libQt6* equivalents). While the first two are reasonable, the libQt5Qml dependency - # pulls in whole QtQml module, along with its data and plugins, which in turn pull in several other Qt - # libraries, greatly inflating the bundle size (see #6447). - # - # Similarly, some extension modules (QtWebChannel, QtWebEngine*) seem to be also linked against libQt5Qml, - # even when the module can be used without having the whole QtQml module collected. - # - # Therefore, we explicitly prevent inclusion of QtQml based on the dynamic library dependency, except for - # QtQml* and QtQuick* modules, whose use directly implies the use of QtQml. - if lib_name in ("qt5qml", "qt6qml"): - if not short_module_name.startswith(('QtQml', 'QtQuick')): - logger.debug('%s: ignoring imported library %r.', self, lib_name) - continue - - # Use the parsed library name to look up associated Qt module information. - if lib_name in self.shared_libraries: - logger.debug('%s: collecting Qt module associated with %r.', self, lib_name) - - # Look up associated module info - qt_module_info = self.shared_libraries[lib_name] - - # If there is a python extension module associated with Qt module, add it to hiddenimports. Since this - # means that we (most likely) have a hook available for that module, we can avoid analyzing the shared - # library itself (i.e., stop the recursive analysis), because this will be done by the corresponding - # hook. - if qt_module_info.module: - if qt_module_info.module == short_module_name: - # The one exception is if we are analyzing shared library associated with the input module; in - # that case, avoid adding a hidden import and analyze the library's link-time dependencies. We - # do not need to worry about plugins and translations for this particular module, because those - # have been handled at the beginning of this function. - imported_libraries.update(bindepend.get_imports(imported_lib_path, qtlib_search_paths)) - else: - hiddenimports.add(self.namespace + "." + qt_module_info.module) - continue - - # Add plugins - plugin_types.update(qt_module_info.plugins) - - # Add translation base name(s) - translation_base_names.update(qt_module_info.translations) - - # Analyze the linked shared libraries for its dependencies (recursive analysis). - imported_libraries.update(bindepend.get_imports(imported_lib_path, qtlib_search_paths)) - - # Collect plugin files. - binaries = [] - for plugin_type in plugin_types: - binaries += self.collect_plugins(plugin_type) - - # Collect translation files. - datas = [] - translation_src = self.location['TranslationsPath'] - translation_dst = os.path.join(self.qt_rel_dir, 'translations') - - for translation_base_name in translation_base_names: - # Not all PyQt5 installations include translations. See - # https://github.com/pyinstaller/pyinstaller/pull/3229#issuecomment-359479893 - # and - # https://github.com/pyinstaller/pyinstaller/issues/2857#issuecomment-368744341. - translation_pattern = os.path.join(translation_src, translation_base_name + '_*.qm') - translation_files = glob.glob(translation_pattern) - if translation_files: - datas += [(translation_file, translation_dst) for translation_file in translation_files] - else: - logger.warning( - '%s: could not find translations with base name %r! These translations will not be collected.', - self, translation_base_name - ) - - # Convert hiddenimports to a list. - hiddenimports = list(hiddenimports) - - logger.debug( - '%s: dependencies for %s:\n' - ' hiddenimports = %r\n' - ' binaries = %r\n' - ' datas = %r', self, module_name, hiddenimports, binaries, datas - ) - - return hiddenimports, binaries, datas - - @staticmethod - def _filter_release_plugins(plugin_files): - """ - Filter the provided list of Qt plugin files and remove the debug variants, under the assumption that both the - release version of a plugin (qtplugin.dll) and its debug variant (qtplugind.dll) appear in the list. - """ - # All basenames for lookup - plugin_basenames = {os.path.normcase(os.path.basename(f)) for f in plugin_files} - # Process all given filenames - release_plugin_files = [] - for plugin_filename in plugin_files: - plugin_basename = os.path.normcase(os.path.basename(plugin_filename)) - if plugin_basename.endswith('d.dll'): - # If we can find a variant without trailing 'd' in the plugin list, then the DLL we are dealing with is - # a debug variant and needs to be excluded. - release_name = os.path.splitext(plugin_basename)[0][:-1] + '.dll' - if release_name in plugin_basenames: - continue - release_plugin_files.append(plugin_filename) - return release_plugin_files - - def collect_plugins(self, plugin_type): - """ - Collect all plugins of the specified type from the Qt plugin directory. - - Returns list of (src, dst) tuples. - """ - # Ensure plugin directory exists - plugin_src_dir = self.location['PluginsPath'] - if not os.path.isdir(plugin_src_dir): - raise Exception(f"Qt plugin directory '{plugin_src_dir}' does not exist!") - - # Collect all shared lib files in plugin type (sub)directory - plugin_files = misc.dlls_in_dir(os.path.join(plugin_src_dir, plugin_type)) - - # Windows: - # - # dlls_in_dir() grabs all files ending with ``*.dll``, ``*.so`` and ``*.dylib`` in a certain directory. On - # Windows this would grab debug copies of Qt plugins, which then causes PyInstaller to add a dependency on the - # Debug CRT *in addition* to the release CRT. - if compat.is_win: - plugin_files = self._filter_release_plugins(plugin_files) - - logger.debug("%s: found plugin files for plugin type %r: %r", self, plugin_type, plugin_files) - - plugin_dst_dir = os.path.join(self.qt_rel_dir, 'plugins', plugin_type) - - # Exclude plugins with invalid Qt dependencies. - binaries = [] - for plugin_file in plugin_files: - valid, reason = self._validate_plugin_dependencies(plugin_file) - if valid: - binaries.append((plugin_file, plugin_dst_dir)) - else: - logger.debug("%s: excluding plugin %r (%r)! Reason: %s", self, plugin_file, plugin_type, reason) - return binaries - - def _validate_plugin_dependencies(self, plugin_file): - """ - Validate Qt dependencies of the given Qt plugin file. For the plugin to pass validation, all its Qt dependencies - must be available (resolvable), and must be resolvable from the default Qt shared library directory (to avoid - pulling in libraries from unrelated Qt installations that happen to be in search path). - """ - - imported_libraries = bindepend.get_imports(plugin_file, search_paths=[self.qt_lib_dir]) - for imported_lib_name, imported_lib_path in imported_libraries: - # Parse/normalize the (unresolved) library name, to determine if dependency is a Qt shared library. If not, - # skip the validation. - lib_name = self._normalize_shared_library_name(imported_lib_name) - if not lib_name.startswith(f"qt{self.qt_major}"): - continue - - if imported_lib_path is None: - return False, f"Missing Qt dependency {imported_lib_name!r}." - - imported_lib_path = pathlib.Path(imported_lib_path).resolve() - if self.qt_lib_dir not in imported_lib_path.parents: - return ( - False, - f"Qt dependency {imported_lib_name!r} ({str(imported_lib_path)!r}) has been resolved outside of " - f"the Qt shared library directory ({str(self.qt_lib_dir)!r})." - ) - - return True, None - - def _collect_all_or_none(self, mandatory_dll_patterns, optional_dll_patterns=None): - """ - Try to find Qt DLLs from the specified mandatory pattern list. If all mandatory patterns resolve to DLLs, - collect them all, as well as any DLLs from the optional pattern list. If a mandatory pattern fails to resolve - to a DLL, return an empty list. - - This allows all-or-none collection of particular groups of Qt DLLs that may or may not be available. - """ - optional_dll_patterns = optional_dll_patterns or [] - - # Package parent path; used to preserve the directory structure when DLLs are collected from the python - # package (e.g., PyPI wheels). - package_parent_path = self.package_location.parent - - # On Windows, DLLs are typically placed in `location['BinariesPath']`, except for PySide PyPI wheels, where - # `location['PrefixPath']` is used. This difference is already handled by `qt_lib_dir`, which is also fully - # resolved. - dll_path = self.qt_lib_dir - - # Helper for processing single DLL pattern - def _process_dll_pattern(dll_pattern): - discovered_dlls = [] - - dll_files = dll_path.glob(dll_pattern) - for dll_file in dll_files: - if package_parent_path in dll_file.parents: - # The DLL is located within python package; preserve the layout - dst_dll_dir = dll_file.parent.relative_to(package_parent_path) - else: - # The DLL is not located within python package; collect into top-level directory - dst_dll_dir = '.' - discovered_dlls.append((str(dll_file), str(dst_dll_dir))) - - return discovered_dlls - - # Process mandatory patterns - collected_dlls = [] - for pattern in mandatory_dll_patterns: - discovered_dlls = _process_dll_pattern(pattern) - if not discovered_dlls: - return [] # Mandatory pattern resulted in no DLLs; abort - collected_dlls += discovered_dlls - - # Process optional patterns - for pattern in optional_dll_patterns: - collected_dlls += _process_dll_pattern(pattern) - - return collected_dlls - - # Collect required Qt binaries, but only if all binaries in a group exist. - def collect_extra_binaries(self): - """ - Collect extra binaries/DLLs required by Qt. These include ANGLE DLLs, OpenGL software renderer DLL, and ICU - DLLs. Applicable only on Windows (on other OSes, empty list is returned). - """ - - binaries = [] - - # Applicable only to Windows. - if not compat.is_win: - return [] - - # OpenGL: EGL/GLES via ANGLE, software OpenGL renderer. - binaries += self._collect_all_or_none(['libEGL.dll', 'libGLESv2.dll'], ['d3dcompiler_??.dll']) - binaries += self._collect_all_or_none(['opengl32sw.dll']) - - # Include ICU files, if they exist. - # See the "Deployment approach" section at the top of this file. - binaries += self._collect_all_or_none(['icudt??.dll', 'icuin??.dll', 'icuuc??.dll']) - - return binaries - - # Collect additional shared libraries required for SSL support in QtNetwork, if they are available. - # Primarily applicable to Windows (see issue #3520, #4048). - def collect_qtnetwork_files(self): - """ - Collect extra binaries/shared libraries required by the QtNetwork module, such as OpenSSL shared libraries. - """ - - # No-op if requested Qt-based package is not available. - if self.version is None: - return [] - - # Check if QtNetwork supports SSL and has OpenSSL backend available (Qt >= 6.1). - # Also query the run-time OpenSSL version, so we know what dynamic libraries we need to search for. - @isolated.decorate - def _check_if_openssl_enabled(package): - import sys - import importlib - - # Import the Qt-based package - # equivalent to: from package.QtCore import QCoreApplication - QtCore = importlib.import_module('.QtCore', package) - QCoreApplication = QtCore.QCoreApplication - QLibraryInfo = QtCore.QLibraryInfo - # equivalent to: from package.QtNetwork import QSslSocket - QtNetwork = importlib.import_module('.QtNetwork', package) - QSslSocket = QtNetwork.QSslSocket - - # Instantiate QCoreApplication to suppress warnings - app = QCoreApplication(sys.argv) # noqa: F841 - - if not QSslSocket.supportsSsl(): - return False, None - - # Query the run-time OpenSSL version - openssl_version = QSslSocket.sslLibraryVersionNumber() - - # For Qt >= 6.1, check if `openssl` TLS backend is available - try: - qt_version = QLibraryInfo.version().segments() - except AttributeError: - qt_version = [] # Qt <= 5.8 - - if qt_version < [6, 1]: - return True, openssl_version # TLS backends not implemented yet - - return ('openssl' in QSslSocket.availableBackends(), openssl_version) - - openssl_enabled, openssl_version = _check_if_openssl_enabled(self.namespace) - if not openssl_enabled or openssl_version == 0: - logger.debug("%s: QtNetwork: does not support SSL or does not use OpenSSL.", self) - return [] - - # The actual search is handled in OS-specific ways. - if compat.is_win: - return self._collect_qtnetwork_openssl_windows(openssl_version) - elif compat.is_darwin: - return self._collect_qtnetwork_openssl_macos(openssl_version) - elif compat.is_linux: - return self._collect_qtnetwork_openssl_linux(openssl_version) - else: - logger.warning("%s: QtNetwork: collection of OpenSSL not implemented for this platform!") - return [] - - def _collect_qtnetwork_openssl_windows(self, openssl_version): - """ - Windows-specific collection of OpenSSL DLLs required by QtNetwork module. - """ - - # Package parent path; used to preserve the directory structure when DLLs are collected from the python - # package (e.g., PyPI wheels). - package_parent_path = self.package_location.parent - - # The OpenSSL DLLs might be shipped with PyPI wheel (PyQt5), might be available in the environment (msys2, - # anaconda), or might be expected to be available in the environment (PySide2, PySide6, PyQt6 PyPI wheels). - # - # The OpenSSL DLL naming scheme depends on the version: - # - OpenSSL 1.0.x: libeay32.dll, ssleay32.dll - # - OpenSSL 1.1.x 32-bit: libssl-1_1.dll, libcrypto-1_1.dll - # - OpenSSL 1.1.x 64-bit: libssl-1_1-x64.dll, libcrypto-1_1-x64.dll - # - OpenSSL 3.0.x 32-bit: libssl-1.dll, libcrypto-3.dll - # - OpenSSL 3.0.x 64-bit: libssl-3-x64.dll, libcrypto-3-x64.dll - # - # The official Qt builds (which are used by PySide and PyQt PyPI wheels) seem to be build against: - # - OpenSSL 1.1.x starting with Qt5 5.14.2: - # https://www.qt.io/blog/2019/06/17/qt-5-12-4-released-support-openssl-1-1-1 - # - OpenSSL 3.x starting with Qt6 6.5.0: - # https://www.qt.io/blog/moving-to-openssl-3-in-binary-builds-starting-from-qt-6.5-beta-2 - # - # However, a package can build Qt against OpenSSL version of their own choice. For example, at the time of - # writing, both mingw-w64-x86_64-qt5-base 5.15.11+kde+r138-1 and mingw-w64-x86_64-qt6-base 6.6.0-2 packages - # depend on mingw-w64-x86_64-openssl 3.1.4-1 (so OpenSSL 3). - # - # Luckily, we can query the run-time version of OpenSSL by calling `QSslSocket.sslLibraryVersionNumber()`, - # and narrow down the search for specific version. - if openssl_version >= 0x10000000 and openssl_version < 0x10100000: - # OpenSSL 1.0.x - used by old Qt5 builds - dll_names = ( - 'libeay32.dll', - 'ssleay32.dll', - ) - logger.debug("%s: QtNetwork: looking for OpenSSL 1.0.x DLLs: %r", self, dll_names) - elif openssl_version >= 0x10100000 and openssl_version < 0x30000000: - # OpenSSL 1.1.x - dll_names = ( - 'libssl-1_1-x64.dll' if compat.is_64bits else 'libssl-1_1.dll', - 'libcrypto-1_1-x64.dll' if compat.is_64bits else 'libcrypto-1_1.dll', - ) - logger.debug("%s: QtNetwork: looking for OpenSSL 1.1.x DLLs: %r", self, dll_names) - elif openssl_version >= 0x30000000 and openssl_version < 0x40000000: - # OpenSSL 3.0.x - dll_names = ( - 'libssl-3-x64.dll' if compat.is_64bits else 'libssl-3.dll', - 'libcrypto-3-x64.dll' if compat.is_64bits else 'libcrypto-3.dll', - ) - logger.debug("%s: QtNetwork: looking for OpenSSL 3.0.x DLLs: %r", self, dll_names) - else: - dll_names = [] # Nothing to search for - logger.warning("%s: QtNetwork: unsupported OpenSSL version: %X", self, openssl_version) - - binaries = [] - found_in_package = False - for dll in dll_names: - # Attempt to resolve the DLL path - dll_file_path = bindepend.resolve_library_path(dll, search_paths=[self.qt_lib_dir]) - if dll_file_path is None: - continue - dll_file_path = pathlib.Path(dll_file_path).resolve() - if package_parent_path in dll_file_path.parents: - # The DLL is located within python package; preserve the layout - dst_dll_path = dll_file_path.parent.relative_to(package_parent_path) - found_in_package = True - else: - # The DLL is not located within python package; collect into top-level directory - dst_dll_path = '.' - binaries.append((str(dll_file_path), str(dst_dll_path))) - - # If we found at least one OpenSSL DLL in the bindings' python package directory, discard all external - # OpenSSL DLLs. - if found_in_package: - binaries = [(dll_src_path, dll_dest_path) for dll_src_path, dll_dest_path in binaries - if package_parent_path in pathlib.Path(dll_src_path).parents] - - return binaries - - def _collect_qtnetwork_openssl_macos(self, openssl_version): - """ - macOS-specific collection of OpenSSL dylibs required by QtNetwork module. - """ - - # The official Qt5 builds on macOS (shipped by PyPI wheels) appear to be built with Apple's SecureTransport API - # instead of OpenSSL; for example, `QSslSocket.sslLibraryVersionNumber` returns 0, while - # `sslLibraryVersionString()` returns "Secure Transport, macOS 12.6". So with PySide2 and PyQt5, we do not need - # to worry about collection of OpenSSL shared libraries. - # - # Support for OpenSSL was introduced in Qt 6.1 with `openssl` TLS backend; the official Qt6 builds prior to 6.5 - # seem to be built with OpenSSL 1.1.x, and later versions with 3.0.x. However, PySide6 and PyQt6 PyPI wheels do - # not ship OpenSSL dynamic libraries at all , so whether `openssl` TLS backend is used or not depends on the - # presence of externally provided OpenSSL dynamic libraries (for example, provided by Homebrew). It is worth - # noting that python.org python installers *do* provide OpenSSL shared libraries (1.1.x for python <= 3.10, - # 3.0.x for python >= 3.12, and both for python 3.11) for its `_ssl` extension - however, these are NOT visible - # to Qt and its QtNetwork module. - # - # When the frozen application is built and we collect python's `_ssl` extension, we also collect the OpenSSL - # shared libraries shipped by python. So at least in theory, those should be available to QtNetwork module as - # well (assuming they are of compatible version). However, this is not exactly the case - QtNetwork looks for - # the libraries in locations given by `DYLD_LIBRARY_PATH` environment variable and in .app/Contents/Frameworks - # (if the program is an .app bundle): - # - # https://github.com/qt/qtbase/blob/6.6.0/src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp#L590-L599 - # - # So it works out-of-the box for our .app bundles, because starting with PyInstaller 6.0, `sys._MEIPASS` is in - # .app/Contents/Frameworks. But it does not with POSIX builds, because bootloader does not modify the - # `DYLD_LIBRARY_PATH` environment variable to include `sys._MEIPASS` (since we usually do not need that; - # regular linked library resolution in our macOS builds is done via path rewriting and rpaths). So either we - # need a run-time hook to add `sys._MEIPASS` to `DYLD_LIBRARY_PATH`, or modify the bootloader to always do that. - # - # Collecting the OpenSSL library and making it discoverable by adding `sys._MEIPASS` to `DYLD_LIBRARY_PATH` - # should also prevent QtNetwork from "accidentally" pulling in Homebrew version at run-time (if Homebrew is - # installed on the target system and provides compatible OpenSSL version). - # - # Therefore, try to resolve OpenSSL library via the version indicated by `QSslSocket.sslLibraryVersionNumber`; - # however, we first explicitly search only {sys.base_prefix}/lib (which is where python.org builds put their - # dynamic libs), and only if that fails, perform regular dylib path resolution. This way we ensure that if the - # OpenSSL dylibs are provided by python itself, we always prefer those over the Homebrew version (since we are - # very likely going to collect them for python's `_ssl` extension anyway). - - # As per above text, we need to worry only about Qt6, and thus OpenSSL 1.1.x or 3.0.x - if openssl_version >= 0x10100000 and openssl_version < 0x30000000: - # OpenSSL 1.1.x - dylib_names = ( - 'libcrypto.1.1.dylib', - 'libssl.1.1.dylib', - ) - logger.debug("%s: QtNetwork: looking for OpenSSL 1.1.x dylibs: %r", self, dylib_names) - elif openssl_version >= 0x30000000 and openssl_version < 0x40000000: - # OpenSSL 3.0.x - dylib_names = ( - 'libcrypto.3.dylib', - 'libssl.3.dylib', - ) - logger.debug("%s: QtNetwork: looking for OpenSSL 3.0.x dylibs: %r", self, dylib_names) - else: - dylib_names = [] # Nothing to search for - logger.warning("%s: QtNetwork: unsupported OpenSSL version: %X", self, openssl_version) - - # Compared to Windows, we do not have to worry about dylib's path preservation, as these are never part of - # the package, and are therefore always collected to the top-level application directory. - binaries = [] - base_prefix_lib_dir = os.path.join(compat.base_prefix, 'lib') - for dylib in dylib_names: - # First, attempt to resolve using only {sys.base_prefix}/lib - `bindepend.resolve_library_path` uses - # standard dyld search semantics and uses the given search paths as fallback (and would therefore - # favor Homebrew-provided version of the library). - dylib_path = bindepend._resolve_library_path_in_search_paths(dylib, search_paths=[base_prefix_lib_dir]) - if dylib_path is None: - dylib_path = bindepend.resolve_library_path(dylib, search_paths=[base_prefix_lib_dir, self.qt_lib_dir]) - if dylib_path is None: - continue - binaries.append((str(dylib_path), '.')) - - return binaries - - def _collect_qtnetwork_openssl_linux(self, openssl_version): - """ - Linux-specific collection of OpenSSL dylibs required by QtNetwork module. - """ - - # Out of the supported OSes, Linux is by far the most straight-forward, because OpenSSL shared libraries are - # expected to be provided by the system. So we can just use standard library path resolution with library names - # inferred from the run-time OpenSSL version. At run-time, QtNetwork searches paths from `LD_LIBRARY_PATH`, and - # on Linux, our bootloader already adds `sys._MEIPASS` to that environment variable. - - if openssl_version >= 0x10000000 and openssl_version < 0x10100000: - # OpenSSL 1.0.x - used by old Qt5 builds - shlib_names = ( - 'libcrypto.so.10', - 'libssl.so.10', - ) - logger.debug("%s: QtNetwork: looking for OpenSSL 1.0.x shared libraries: %r", self, shlib_names) - elif openssl_version >= 0x10100000 and openssl_version < 0x30000000: - # OpenSSL 1.1.x - shlib_names = ( - 'libcrypto.so.1.1', - 'libssl.so.1.1', - ) - logger.debug("%s: QtNetwork: looking for OpenSSL 1.1.x shared libraries: %r", self, shlib_names) - elif openssl_version >= 0x30000000 and openssl_version < 0x40000000: - # OpenSSL 3.0.x - shlib_names = ( - 'libcrypto.so.3', - 'libssl.so.3', - ) - logger.debug("%s: QtNetwork: looking for OpenSSL 3.0.x shared libraries: %r", self, shlib_names) - else: - shlib_names = [] # Nothing to search for - logger.warning("%s: QtNetwork: unsupported OpenSSL version: %X", self, openssl_version) - - binaries = [] - for shlib in shlib_names: - shlib_path = bindepend.resolve_library_path(shlib) - if shlib_path is None: - continue - binaries.append((str(shlib_path), '.')) - - return binaries - - def collect_qtqml_files(self): - """ - Collect additional binaries and data for QtQml module. - """ - - # No-op if requested Qt-based package is not available. - if self.version is None: - return [], [] - - # Not all PyQt5/PySide2 installs have QML files. In this case, location['Qml2ImportsPath'] is empty. - # Furthermore, even if location path is provided, the directory itself may not exist. - # - # https://github.com/pyinstaller/pyinstaller/pull/3229#issuecomment-359735031 - # https://github.com/pyinstaller/pyinstaller/issues/3864 - # - # In Qt 6, Qml2ImportsPath was deprecated in favor of QmlImportsPath. The former is not available in PySide6 - # 6.4.0 anymore (but is in PyQt6 6.4.0). Use the new QmlImportsPath if available. - if 'QmlImportsPath' in self.location: - qml_src_dir = self.location['QmlImportsPath'] - else: - qml_src_dir = self.location['Qml2ImportsPath'] - if not qml_src_dir or not os.path.isdir(qml_src_dir): - logger.warning('%s: QML directory %r does not exist. QML files not packaged.', self, qml_src_dir) - return [], [] - - qml_src_path = pathlib.Path(qml_src_dir).resolve() - qml_dest_path = pathlib.PurePath(self.qt_rel_dir) / 'qml' - - binaries = [] - datas = [] - - # Helper that computes the destination directory for the given file or directory from a QML plugin directory. - def _compute_dest_dir(src_filename): - if src_filename.is_dir(): - rel_path = src_filename.relative_to(qml_src_path) - else: - rel_path = src_filename.relative_to(qml_src_path).parent - return qml_dest_path / rel_path - - # Discover all QML plugin sub-directories by searching for `qmldir` files. - qmldir_files = qml_src_path.rglob('**/qmldir') - for qmldir_file in sorted(qmldir_files): - plugin_dir = qmldir_file.parent - logger.debug("%s: processing QML plugin directory %s", self, plugin_dir) - - try: - # Obtain lists of source files (separated into binaries and data files). - plugin_binaries, plugin_datas = self._process_qml_plugin(qmldir_file) - # Convert into (src, dest) tuples. - binaries += [(str(src_file), str(_compute_dest_dir(src_file))) for src_file in plugin_binaries] - datas += [(str(src_file), str(_compute_dest_dir(src_file))) for src_file in plugin_datas] - except Exception: - logger.warning("%s: failed to process QML plugin directory %s", self, plugin_dir, exc_info=True) - - return binaries, datas - - # https://doc.qt.io/qt-6/qtqml-modules-qmldir.html#plugin-declaration - # [optional] plugin [ - _qml_plugin_def = re.compile(r"^(?:(?:optional)\s+)?(?:plugin)\s+(?P\w+)(?:\s+(?P\.+))?$") - - def _process_qml_plugin(self, qmldir_file): - """ - Processes the QML directory corresponding to the given `qmldir` file. - - Returns lists of binaries and data files, but only the source file names. It is up to caller to turn these into - lists of (src, dest) tuples. - """ - plugin_dir = qmldir_file.parent - - plugin_binaries = set() - - # Read the `qmldir` file to determine the names of plugin binaries, if any. - contents = qmldir_file.read_text(encoding="utf-8") - for line in contents.splitlines(): - m = self._qml_plugin_def.match(line) - if m is None: - continue - - plugin_name = m.group("name") - plugin_path = m.group("path") - - # We currently do not support custom plugin path - neither relative nor absolute (the latter will never - # be supported, because to make it relocatable, we would need to modify the `qmpldir file`). - if plugin_path is not None: - raise Exception(f"Non-empty plugin path ({plugin_path!r} is not supported yet!") - - # Turn the plugin base name into actual shared lib name. - if compat.is_linux: - plugin_file = plugin_dir / f"lib{plugin_name}.so" - elif compat.is_win: - plugin_file = plugin_dir / f"{plugin_name}.dll" - elif compat.is_darwin: - plugin_file = plugin_dir / f"lib{plugin_name}.dylib" - else: - continue # This implicitly disables subsequent validation on unhandled platforms. - - # Warn if plugin file does not exist - if not plugin_file.is_file(): - logger.warn("%s: QML plugin binary %r does not exist!", str(plugin_file)) - continue - - plugin_binaries.add(plugin_file) - - # Exclude plugins with invalid Qt dependencies. - invalid_binaries = False - for plugin_binary in plugin_binaries: - valid, reason = self._validate_plugin_dependencies(plugin_binary) - if not valid: - logger.debug("%s: excluding QML plugin binary %r! Reason: %s", self, str(plugin_binary), reason) - invalid_binaries = True - - # If there was an invalid binary, discard the plugin. - if invalid_binaries: - logger.debug("%s: excluding QML plugin directory %r due to invalid plugin binaries!", self, str(plugin_dir)) - return [], [] - - # Generate binaries list. - binaries = sorted(plugin_binaries) - - # Generate list of data files - all content of this directory, except for the plugin binaries. Sub-directories - # are included if they do not contain a `qmldir` file (we do not recurse into the directory, but instead pass - # only its name, leaving the recursion to PyInstaller's built-in expansion of paths returned by hooks). - datas = [] - for entry in plugin_dir.iterdir(): - if entry.is_file(): - if entry in plugin_binaries: - continue - else: - if (entry / "qmldir").is_file(): - continue - datas.append(entry) - - return binaries, datas - - def collect_qtwebengine_files(self): - """ - Collect QtWebEngine helper process executable, translations, and resources. - """ - - binaries = [] - datas = [] - - # Output directory (varies between PyQt and PySide and among OSes; the difference is abstracted by - # QtLibraryInfo.qt_rel_dir) - rel_data_path = self.qt_rel_dir - - is_macos_framework = False - if compat.is_darwin: - # Determine if we are dealing with a framework-based Qt build (e.g., PyPI wheels) or a dylib-based one - # (e.g., Anaconda). The former requires special handling, while the latter is handled in the same way as - # Windows and Linux builds. - is_macos_framework = os.path.exists( - os.path.join(self.location['LibrariesPath'], 'QtWebEngineCore.framework') - ) - - if is_macos_framework: - # macOS .framework bundle - src_framework_path = os.path.join(self.location['LibrariesPath'], 'QtWebEngineCore.framework') - - # If Qt libraries are bundled with the package, collect the .framework bundle into corresponding package's - # subdirectory, because binary dependency analysis will also try to preserve the directory structure. - # However, if we are collecting from system-wide Qt installation (e.g., Homebrew-installed Qt), the binary - # depndency analysis will attempt to re-create .framework bundle in top-level directory, so we need to - # collect the extra files there. - bundled_qt_libs = pathlib.Path(self.package_location) in pathlib.Path(src_framework_path).parents - if bundled_qt_libs: - dst_framework_path = os.path.join(rel_data_path, 'lib/QtWebEngineCore.framework') - else: - dst_framework_path = 'QtWebEngineCore.framework' # In top-level directory - - # Determine the version directory - for now, we assume we are dealing with single-version framework; - # i.e., the Versions directory contains only a single directory, and Current symlink to it. - versions = sorted([ - version for version in os.listdir(os.path.join(src_framework_path, 'Versions')) if version != 'Current' - ]) - if len(versions) == 0: - raise RuntimeError("Could not determine version of the QtWebEngineCore.framework!") - elif len(versions) > 1: - logger.warning( - "Found multiple versions in QtWebEngineCore.framework (%r) - using the last one!", versions - ) - version = versions[-1] - - # Collect the Helpers directory. In well-formed .framework bundles (such as the ones provided by Homebrew), - # the Helpers directory is located in the versioned directory, and symlinked to the top-level directory. - src_helpers_path = os.path.join(src_framework_path, 'Versions', version, 'Helpers') - dst_helpers_path = os.path.join(dst_framework_path, 'Versions', version, 'Helpers') - if not os.path.exists(src_helpers_path): - # Alas, the .framework bundles shipped with contemporary PyPI PyQt/PySide wheels are not well-formed - # (presumably because .whl cannot preserve symlinks?). The Helpers in the top-level directory is in fact - # the hard copy, and there is either no Helpers in versioned directory, or there is a duplicate. - # So fall back to collecting from the top-level, but collect into versioned directory in order to - # be compliant with codesign's expectations. - src_helpers_path = os.path.join(src_framework_path, 'Helpers') - - helper_datas = hooks.collect_system_data_files(src_helpers_path, dst_helpers_path) - - # Filter out the actual helper executable from datas, and add it to binaries instead. This ensures that it - # undergoes additional binary processing that rewrites the paths to linked libraries. - HELPER_EXE = 'QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess' - for src_name, dest_name in helper_datas: - if src_name.endswith(HELPER_EXE): - binaries.append((src_name, dest_name)) - else: - datas.append((src_name, dest_name)) - - # Collect the Resources directory; same logic is used as with Helpers directory. - src_resources_path = os.path.join(src_framework_path, 'Versions', version, 'Resources') - dst_resources_path = os.path.join(dst_framework_path, 'Versions', version, 'Resources') - if not os.path.exists(src_resources_path): - src_resources_path = os.path.join(src_framework_path, 'Resources') - - datas += hooks.collect_system_data_files(src_resources_path, dst_resources_path) - - # NOTE: the QtWebEngineProcess helper is actually sought within the `QtWebEngineCore.framework/Helpers`, - # which ought to be a symlink to `QtWebEngineCore.framework/Versions/Current/Helpers`, where `Current` - # is also a symlink to the actual version directory, `A`. - # - # These symlinks are created automatically when the TOC list of collected resources is post-processed - # using `PyInstaller.utils.osx.collect_files_from_framework_bundles` helper, so we do not have to - # worry about them here... - else: - # Windows and linux (or Anaconda on macOS) - locales = 'qtwebengine_locales' - resources = 'resources' - - # Translations - datas.append(( - os.path.join(self.location['TranslationsPath'], locales), - os.path.join(rel_data_path, 'translations', locales), - )) - - # Resources; ``DataPath`` is the base directory for ``resources``, as per the - # `docs `_. - datas.append((os.path.join(self.location['DataPath'], resources), os.path.join(rel_data_path, resources)),) - - # Helper process executable (QtWebEngineProcess), located in ``LibraryExecutablesPath``. - # The target directory is determined as `LibraryExecutablesPath` relative to `PrefixPath`. On Windows, - # this should handle the differences between PySide2/PySide6 and PyQt5/PyQt6 PyPI wheel layout. - rel_helper_path = os.path.relpath(self.location['LibraryExecutablesPath'], self.location['PrefixPath']) - - # However, on Linux, we need to account for distribution-packaged Qt, where `LibraryExecutablesPath` might - # be nested deeper under `PrefixPath` than anticipated (w.r.t. PyPI wheel layout). For example, in Fedora, - # the helper is located under `/usr/lib64/qt5/libexec/QtWebEngineProcess`, with `PrefixPath` being `/usr` - # and `LibraryExecutablesPath` being `/usr/lib64/qt5/libexec/`, so the relative path ends up being - # `lib64/qt5/libexec` instead of just `libexec`. So on linux, we explicitly force the PyPI-compliant - # layout, by overriding relative helper path to just `libexec`. - if compat.is_linux and rel_helper_path != "libexec": - logger.info( - "%s: overriding relative destination path of QtWebEngineProcess helper from %r to %r!", self, - rel_helper_path, "libexec" - ) - rel_helper_path = "libexec" - - # Similarly, force the relative helper path for PySide2/PySide6 on Windows to `.`. This is already the case - # with PyPI PySide Windows wheels. But it is not the case with conda-installed PySide2, where the Qt's - # `PrefixPath` is for example `C:/Users//miniconda3/envs//Library`, while the corresponding - # `LibraryExecutablesPath` is `C:/Users//miniconda3/envs//Library/bin`. - if compat.is_win and not self.is_pyqt and rel_helper_path != ".": - logger.info( - "%s: overriding relative destination path of QtWebEngineProcess helper from %r to %r!", self, - rel_helper_path, "." - ) - rel_helper_path = "." - - dest = os.path.normpath(os.path.join(rel_data_path, rel_helper_path)) - binaries.append((os.path.join(self.location['LibraryExecutablesPath'], 'QtWebEngineProcess*'), dest)) - - # The helper QtWebEngineProcess executable should have an accompanying qt.conf file that helps it locate the - # Qt shared libraries. Try collecting it as well - qt_conf_file = os.path.join(self.location['LibraryExecutablesPath'], 'qt.conf') - if not os.path.isfile(qt_conf_file): - # The file seems to have been dropped from Qt 6.3 (and corresponding PySide6 and PyQt6) due to - # redundancy; however, we still need it in the frozen application - so generate our own. - from PyInstaller.config import CONF # workpath - # Relative path to root prefix of bundled Qt - this corresponds to the "inverse" of `rel_helper_path` - # variable that we computed earlier. - if rel_helper_path == '.': - rel_prefix = '.' - else: - # Replace each directory component in `rel_helper_path` with `..`. - rel_prefix = os.path.join(*['..' for _ in range(len(rel_helper_path.split(os.pathsep)))]) - # We expect the relative path to be either . or .. depending on PySide/PyQt layout; if that is not the - # case, warn about irregular path. - if rel_prefix not in ('.', '..'): - logger.warning( - "%s: unexpected relative Qt prefix path for QtWebEngineProcess qt.conf: %s", self, rel_prefix - ) - # The Qt docs on qt.conf (https://doc.qt.io/qt-5/qt-conf.html) recommend using forward slashes on - # Windows as well, due to backslash having to be escaped. This should not matter as we expect the - # relative path to be . or .., but you never know... - if os.sep == '\\': - rel_prefix = rel_prefix.replace(os.sep, '/') - # Create temporary file in workpath - qt_conf_file = os.path.join(CONF['workpath'], "qt.conf") - with open(qt_conf_file, 'w', encoding='utf-8') as fp: - print("[Paths]", file=fp) - print("Prefix = {}".format(rel_prefix), file=fp) - datas.append((qt_conf_file, dest)) - - # Add Linux-specific libraries. - if compat.is_linux: - # The automatic library detection fails for `NSS `_, - # which is used by QtWebEngine. In some distributions, the ``libnss`` supporting libraries are stored in a - # subdirectory ``nss``. Since ``libnss`` is not linked against them but loads them dynamically at run-time, - # we need to search for and add them. - # - # Specifically, the files we are looking for are - # - libfreebl3.so - # - libfreeblpriv3.so - # - libnssckbi.so - # - libnssdbm3.so - # - libsoftokn3.so - # and they might be in the same directory as ``libnss3.so`` (instead of ``nss`` subdirectory); this is - # the case even with contemporary Debian releases. See - # https://packages.debian.org/bullseye/amd64/libnss3/filelist - # vs. - # https://packages.debian.org/bookworm/amd64/libnss3/filelist - - # Analyze imports of ``QtWebEngineCore`` extension module, and look for ``libnss3.so`` to determine its - # parent directory. - libnss_dir = None - module_file = hooks.get_module_file_attribute(self.namespace + '.QtWebEngineCore') - for lib_name, lib_path in bindepend.get_imports(module_file): # (name, fullpath) tuples - if lib_path is None: - continue # Skip unresolved libraries - # Look for ``libnss3.so``. - if os.path.basename(lib_path).startswith('libnss3.so'): - libnss_dir = os.path.dirname(lib_path) - break - - # Search for NSS libraries - logger.debug("%s: QtWebEngineCore is linked against libnss3.so; collecting NSS libraries...", self) - if libnss_dir is not None: - # Libraries to search for - NSS_LIBS = [ - 'libfreebl3.so', - 'libfreeblpriv3.so', - 'libnssckbi.so', - 'libnssdbm3.so', - 'libsoftokn3.so', - ] - # Directories (relative to `libnss_dir`) to search in. Also serve as relative destination paths. - NSS_LIB_SUBDIRS = [ - 'nss', - '.', - ] - - for subdir in NSS_LIB_SUBDIRS: - for lib_name in NSS_LIBS: - lib_file = os.path.normpath(os.path.join(libnss_dir, subdir, lib_name)) - if os.path.isfile(lib_file): - logger.debug("%s: collecting NSS library: %r", self, lib_file) - binaries.append((lib_file, subdir)) - - return binaries, datas - - -# Provide single instances of this class to avoid each hook constructing its own. -pyqt5_library_info = QtLibraryInfo('PyQt5') -pyqt6_library_info = QtLibraryInfo('PyQt6') -pyside2_library_info = QtLibraryInfo('PySide2') -pyside6_library_info = QtLibraryInfo('PySide6') - - -def get_qt_library_info(namespace): - """ - Return QtLibraryInfo instance for the given namespace. - """ - if namespace == 'PyQt5': - return pyqt5_library_info - if namespace == 'PyQt6': - return pyqt6_library_info - elif namespace == 'PySide2': - return pyside2_library_info - elif namespace == 'PySide6': - return pyside6_library_info - - raise ValueError(f'Invalid namespace: {namespace}!') - - -# add_qt_dependencies -# -------------------- -# Generic implemnentation that finds the Qt 5/6 dependencies based on the hook name of a PyQt5/PyQt6/PySide2/PySide6 -# hook. Returns (hiddenimports, binaries, datas). Typical usage: -# ``hiddenimports, binaries, datas = add_qt5_dependencies(__file__)``. -def add_qt_dependencies(hook_file): - # Find the module underlying this Qt hook: change ``/path/to/hook-PyQt5.blah.py`` to ``PyQt5.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:] - namespace = module_name.split('.')[0] - - # Retrieve Qt library info structure.... - qt_info = get_qt_library_info(namespace) - # ... and use it to collect module dependencies - return qt_info.collect_module(module_name) - - -# add_qt5_dependencies -# -------------------- -# Find the Qt5 dependencies based on the hook name of a PySide2/PyQt5 hook. Returns (hiddenimports, binaries, datas). -# Typical usage: ``hiddenimports, binaries, datas = add_qt5_dependencies(__file__)``. -add_qt5_dependencies = add_qt_dependencies # Use generic implementation - -# add_qt6_dependencies -# -------------------- -# Find the Qt6 dependencies based on the hook name of a PySide6/PyQt6 hook. Returns (hiddenimports, binaries, datas). -# Typical usage: ``hiddenimports, binaries, datas = add_qt6_dependencies(__file__)``. -add_qt6_dependencies = add_qt_dependencies # Use generic implementation - - -# A helper for ensuring that only one Qt bindings package is collected into frozen application. Intended to be called -# from hooks for top-level bindings packages. -def ensure_single_qt_bindings_package(qt_bindings): - # For the lack of better alternative, use CONF structure. Note that this enforces single bindings for the whole - # spec file instead of individual Analysis instances! - from PyInstaller.config import CONF - - seen_qt_bindings = CONF.get("_seen_qt_bindings") - if seen_qt_bindings is None: - CONF["_seen_qt_bindings"] = qt_bindings - elif qt_bindings != seen_qt_bindings: - # Raise SystemExit to abort build process - raise SystemExit( - "ERROR: Aborting build process due to attempt to collect multiple Qt bindings packages: attempting to run " - f"hook for {qt_bindings!r}, while hook for {seen_qt_bindings!r} has already been run! PyInstaller does not " - "support multiple Qt bindings packages in a frozen application - either ensure that the build environment " - "has only one Qt bindings package installed, or exclude the extraneous bindings packages via the module " - "exclusion mechanism (--exclude command-line option, or excludes list in the spec file)." - ) - - -# A helper for generating exclude rules for extraneous Qt bindings. Intended for use in hooks for packages that pull in -# multiple Qt bindings packages due to conditional imports (for example, `matplotlib.backends.qt_compat`, `qtpy`). -def exclude_extraneous_qt_bindings(hook_name, qt_bindings_order=None): - _QT_BINDINGS = ['PyQt5', 'PySide2', 'PyQt6', 'PySide6'] # Known bindings, and also their preferred order - _QT_API_ENV = 'QT_API' - - def _create_excludes(selected_bindings): - return [bindings for bindings in _QT_BINDINGS if bindings != selected_bindings] - - logger.debug("%s: selecting Qt bindings package...", hook_name) - - if not qt_bindings_order: - qt_bindings_order = _QT_BINDINGS # Use default preference order - - env_qt_bindings = os.environ.get(_QT_API_ENV) - if env_qt_bindings is not None: - # Case-normalize the value into capitalized name from _QT_BINDINGS for further processing. - normalized_name = {name.lower(): name for name in _QT_BINDINGS}.get(env_qt_bindings.lower()) - if normalized_name is None: - logger.warning( - "%s: ignoring unsupported Qt bindings name %r in %s environment variable (supported values: %r)!", - hook_name, env_qt_bindings, _QT_API_ENV, _QT_BINDINGS - ) - env_qt_bindings = normalized_name - - # First choice: see if a hook for top-level Qt bindings package has already been run; if it has, use that bindings - # package. Due to check in the `ensure_single_qt_bindings_package` that these hooks use, only one such hook could - # have been run. This should cover cases when the entry-point script explicitly imports one of Qt bindings before - # importing a package that supports multiple bindings. - from PyInstaller.config import CONF - seen_qt_bindings = CONF.get("_seen_qt_bindings") - if seen_qt_bindings is not None: - # If bindings are also specified via environment variable and they differ, display a warning. - if env_qt_bindings is not None and env_qt_bindings != seen_qt_bindings: - logger.warning( - "%s: ignoring %s environment variable (%r) because hook for %r has been run!", hook_name, _QT_API_ENV, - env_qt_bindings, seen_qt_bindings - ) - - logger.info( - "%s: selected %r as Qt bindings because hook for %r has been run before.", hook_name, seen_qt_bindings, - seen_qt_bindings - ) - return _create_excludes(seen_qt_bindings) - - # Second choice: honor the QT_API environment variable, if it specified a valid Qt bindings package. - if env_qt_bindings is not None: - logger.info( - "%s: selected %r as Qt bindings as specified by the %s environment variable.", hook_name, env_qt_bindings, - _QT_API_ENV - ) - return _create_excludes(env_qt_bindings) - - # Third choice: select first available bindings (sorted by the given preference order), and display a warning if - # multiple bindings are available. - available_qt_bindings = [] - for bindings_name in qt_bindings_order: - # Check if bindings are available - info = get_qt_library_info(bindings_name) - if info.version is None: - continue - available_qt_bindings.append(bindings_name) - - if not available_qt_bindings: - logger.warning("%s: no Qt bindings are available!", hook_name) - return [] # No need to generate any excludes... - - selected_qt_bindings = available_qt_bindings[0] - if len(available_qt_bindings) == 1: - logger.info("%s: selected %r as the only available Qt bindings.", hook_name, selected_qt_bindings) - else: - # Warn on multiple bindings, and tell user to use QT_API environment variable - logger.warning( - "%s: selected %r as Qt bindings, but multiple bindings are available: %r. Use the %s environment variable " - "to select different bindings and suppress this warning.", hook_name, selected_qt_bindings, - available_qt_bindings, _QT_API_ENV - ) - return _create_excludes(selected_qt_bindings) diff --git a/voxvera/vendor/PyInstaller/utils/hooks/qt/_modules_info.py b/voxvera/vendor/PyInstaller/utils/hooks/qt/_modules_info.py deleted file mode 100755 index cd01bf9..0000000 --- a/voxvera/vendor/PyInstaller/utils/hooks/qt/_modules_info.py +++ /dev/null @@ -1,450 +0,0 @@ -# ---------------------------------------------------------------------------- -# Copyright (c) 2022-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -# Qt modules information - the core of our Qt collection approach -# ---------------------------------------------------------------- -# -# The python bindings for Qt (``PySide2``, ``PyQt5``, ``PySide6``, ``PyQt6``) consist of several python binary extension -# modules that provide bindings for corresponding Qt modules. For example, the ``PySide2.QtNetwork`` python extension -# module provides bindings for the ``QtNetwork`` Qt module from the ``qt/qtbase`` Qt repository. -# -# A Qt module can be considered as consisting of: -# * a shared library (for example, on Linux, the shared library names for the ``QtNetwork`` Qt module in Qt5 and Qt6 -# are ``libQt5Network.so`` and ``libQt6Network.so``, respectively). -# * plugins: a certain type (or class) of plugins is usually associated with a single Qt module (for example, -# ``imageformats`` plugins are associated with the ``QtGui`` Qt module from the ``qt/qtbase`` Qt repository), but -# additional plugins of that type may come from other Qt repositories. For example, ``imageformats/qsvg`` plugin -# is provided by ``qtsvg/src/plugins/imageformats/svg`` from the ``qt/qtsvg`` repository, and ``imageformats/qpdf`` -# is provided by ``qtwebengine/src/pdf/plugins/imageformats/pdf`` from the ``qt/qtwebengine`` repository. -# * translation files: names of translation files consist of a base name, which typically corresponds to the Qt -# repository name, and language code. A single translation file usually covers all Qt modules contained within -# the same repository. For example, translation files with base name ``qtbase`` contain translations for ``QtCore``, -# ``QtGui``, ``QtWidgets``, ``QtNetwork``, and other Qt modules from the ``qt/qtbase`` Qt repository. -# -# The PyInstaller's built-in analysis of link-time dependencies ensures that when collecting a Qt python extension -# module, we automatically pick up the linked Qt shared libraries. However, collection of linked Qt shared libraries -# does not result in collection of plugins, nor translation files. In addition, the dependency of a Qt python extension -# module on other Qt python extension modules (i.e., at the bindings level) cannot be automatically determined due to -# PyInstaller's inability to scan imports in binary extensions. -# -# PyInstaller < 5.7 solved this problem using a dictionary that associated a Qt shared library name with python -# extension name, plugins, and translation files. For each hooked Qt python extension module, the hook calls a helper -# that analyzes the extension file for link-time dependencies, and matches those against the dictionary. Therefore, -# based on linked shared libraries, we could recursively infer the list of files to collect in addition to the shared -# libraries themselves: -# - plugins and translation files belonging to Qt modules whose shared libraries we collect -# - Qt python extension modules corresponding to the Qt modules that we collect -# -# The above approach ensures that even if analyzed python script contains only ``from PySide2 import QtWidgets``, -# we would also collect ``PySide2.QtGui`` and ``PySide2.QtCore``, as well as all corresponding Qt module files -# (the shared libraries, plugins, translation files). For this to work, a hook must be provided for the -# ``PySide2.QtWidgets`` that performs the recursive analysis of the extension module file; so to ensure that each -# Qt python extension module by itself ensures collection of all its dependencies, we need to hook all Qt python -# extension modules provided by specific python Qt bindings package. -# -# The above approach with single dictionary, however, has several limitations: -# - it cannot provide association for Qt python module that binds a Qt module without a shared library (i.e., a -# headers-only module, or a statically-built module). In such cases, potential plugins and translations should -# be associated directly with the Qt python extension file instead of the Qt module's (non-existent) shared library. -# - it cannot (directly) handle differences between Qt5 and Qt6; we had to build a second dictionary -# - it cannot handle differences between the bindings themselves; for example, PyQt5 binds some Qt modules that -# PySide2 does not bind. Or, the binding's Qt python extension module is named differently in PyQt and PySide -# bindings (or just differently in PyQt5, while PySide2, PySide6, and PyQt6 use the same name). -# -# In order address the above shortcomings, we now store all information a list of structures that contain information -# for a particular Qt python extension and/or Qt module (shared library): -# - python extension name (if applicable) -# - Qt module name base (if applicable) -# - plugins -# - translation files base name -# - applicable Qt version (if necessary) -# - applicable Qt bindings (if necessary) -# -# This list is used to dynamically construct two dictionaries (based on the bindings name and Qt version): -# - mapping python extension names to associated module information -# - mapping Qt shared library names to associated module information -# This allows us to associate plugins and translations with either Qt python extension or with the Qt module's shared -# library (or both), whichever is applicable. -# -# The `qt_dynamic_dependencies_dict`_ from the original approach was constructed using several information sources, as -# documented `here -# `_. -# -# In the current approach, the relations stored in the `QT_MODULES_INFO`_ list were determined directly, by inspecting -# the Qt source code. This requires some prior knowledge of how the Qt code is organized (repositories and individual Qt -# modules within them), as well as some searching based on guesswork. The procedure can be outlined as follows: -# * check out the `main Qt repository `_. This repository contains references to all other -# Qt repositories in the form of git submodules. -# * for Qt5: -# * check out the latest release tag, e.g., v5.15.2, then check out the submodules. -# * search the Qt modules' qmake .pro files; for example, ``qtbase/src/network/network.pro`` for QtNetwork module. -# The plugin types associated with the module are listed in the ``MODULE_PLUGIN_TYPES`` variable (in this case, -# ``bearer``). -# * all translations are gathered in ``qttranslations`` sub-module/repository, and their association with -# individual repositories can be seen in ``qttranslations/translations/translations.pro``. -# * for Qt6: -# * check out the latest release tag, e.g., v6.3.1, then check out the submodules. -# * search the Qt modules' CMake files; for example, ``qtbase/src/network/CMakeLists.txt`` for QtNetwork module. -# The plugin types associated with the module are listed under ``PLUGIN_TYPES`` argument of the -# ``qt_internal_add_module()`` function that defines the Qt module. -# -# The idea is to make a list of all extension modules found in a Qt bindings package, as well as all available plugin -# directories (which correspond to plugin types) and translation files. For each extension, identify the corresponding -# Qt module (shared library name) and its associated plugins and translation files. Once this is done, most of available -# plugins and translations in the python bindings package should have a corresponding python Qt extension module -# available; this gives us associations based on the python extension module names as well as based on the Qt shared -# library names. For any plugins and translation files remaining unassociated, identify the corresponding Qt module; -# this gives us associations based only on Qt shared library names. While this second group of associations are never -# processed directly (due to lack of corresponding python extension), they may end up being processed during the -# recursive dependency analysis, if the corresponding Qt shared library is linked against by some Qt python extension -# or another Qt shared library. - - -# This structure is used to define Qt module information, such as python module/extension name, Qt module (shared -# library) name, translation files' base names, plugins, as well as associated python bindings (which implicitly -# also encode major Qt version). -class _QtModuleDef: - def __init__(self, module, shared_lib=None, translations=None, plugins=None, bindings=None): - # Python module (extension) name without package namespace. For example, `QtCore`. - # Can be None if python bindings do not bind the module, but we still need to establish relationship between - # the Qt module (shared library) and its plugins and translations. - self.module = module - # Associated Qt module (shared library), if any. Used during recursive dependency analysis, where a python - # module (extension) is analyzed for linked Qt modules (shared libraries), and then their corresponding - # python modules (extensions) are added to hidden imports. For example, the Qt module name is `Qt5Core` or - # `Qt6Core`, depending on the Qt version. Can be None for python modules that are not tied to a particular - # Qt shared library (for example, the corresponding Qt module is headers-only) and hence they cannot be - # inferred from recursive link-time dependency analysis. - self.shared_lib = shared_lib - # List of base names of translation files (if any) associated with the Qt module. Multiple base names may be - # associated with a single module. - # For example, `['qt', 'qtbase']` for `QtCore` or `['qtmultimedia']` for `QtMultimedia`. - self.translations = translations or [] - # List of plugins associated with the Qt module. - self.plugins = plugins or [] - # List of bindings (PySide2, PyQt5, PySide6, PyQt6) that provide the python module. This allows association of - # plugins and translations with shared libraries even for bindings that do not provide python module binding - # for the Qt module. - self.bindings = set(bindings or []) - - -# All Qt-based bindings. -ALL_QT_BINDINGS = {"PySide2", "PyQt5", "PySide6", "PyQt6"} - -# Qt modules information - the core of our Qt collection approach. -# -# For every python module/extension (i.e., entry in the list below that has valid `module`), we need a corresponding -# hook, ensuring that the extension file is analyzed, so that we collect the associated plugins and translation -# files, as well as perform recursive analysis of link-time binary dependencies (so that plugins and translation files -# belonging to those dependencies are collected as well). -QT_MODULES_INFO = ( - # *** qt/qt3d *** - _QtModuleDef("Qt3DAnimation", shared_lib="3DAnimation"), - _QtModuleDef("Qt3DCore", shared_lib="3DCore"), - _QtModuleDef("Qt3DExtras", shared_lib="3DExtras"), - _QtModuleDef("Qt3DInput", shared_lib="3DInput", plugins=["3dinputdevices"]), - _QtModuleDef("Qt3DLogic", shared_lib="3DLogic"), - _QtModuleDef( - "Qt3DRender", shared_lib="3DRender", plugins=["geometryloaders", "renderplugins", "renderers", "sceneparsers"] - ), - - # *** qt/qtactiveqt *** - # The python module is called QAxContainer in PyQt bindings, but QtAxContainer in PySide. The associated Qt module - # is header-only, so there is no shared library. - _QtModuleDef("QAxContainer", bindings=["PyQt*"]), - _QtModuleDef("QtAxContainer", bindings=["PySide*"]), - - # *** qt/qtcharts *** - # The python module is called QtChart in PyQt5, and QtCharts in PySide2, PySide6, and PyQt6 (which corresponds to - # the associated Qt module name, QtCharts). - _QtModuleDef("QtChart", shared_lib="Charts", bindings=["PyQt5"]), - _QtModuleDef("QtCharts", shared_lib="Charts", bindings=["!PyQt5"]), - - # *** qt/qtbase *** - # QtConcurrent python module is available only in PySide bindings. - _QtModuleDef(None, shared_lib="Concurrent", bindings=["PyQt*"]), - _QtModuleDef("QtConcurrent", shared_lib="Concurrent", bindings=["PySide*"]), - _QtModuleDef("QtCore", shared_lib="Core", translations=["qt", "qtbase"]), - # QtDBus python module is available in all bindings but PySide2. - _QtModuleDef(None, shared_lib="DBus", bindings=["PySide2"]), - _QtModuleDef("QtDBus", shared_lib="DBus", bindings=["!PySide2"]), - # QtNetwork uses different plugins in Qt5 and Qt6. - _QtModuleDef("QtNetwork", shared_lib="Network", plugins=["bearer"], bindings=["PySide2", "PyQt5"]), - _QtModuleDef( - "QtNetwork", - shared_lib="Network", - plugins=["networkaccess", "networkinformation", "tls"], - bindings=["PySide6", "PyQt6"] - ), - _QtModuleDef( - "QtGui", - shared_lib="Gui", - plugins=[ - "accessiblebridge", - "egldeviceintegrations", - "generic", - "iconengines", - "imageformats", - "platforms", - "platforms/darwin", - "platforminputcontexts", - "platformthemes", - "xcbglintegrations", - # The ``wayland-*`` plugins are part of QtWaylandClient Qt module, whose shared library - # (e.g., libQt5WaylandClient.so) is linked by the wayland-related ``platforms`` plugins. Ideally, we would - # collect these plugins based on the QtWaylandClient shared library entry, but as our Qt hook utilities do - # not scan the plugins for dependencies, that would not work. So instead we list these plugins under QtGui - # to achieve pretty much the same end result. - "wayland-decoration-client", - "wayland-graphics-integration-client", - "wayland-shell-integration" - ] - ), - _QtModuleDef("QtOpenGL", shared_lib="OpenGL"), - # This python module is specific to PySide2 and has no associated Qt module. - _QtModuleDef("QtOpenGLFunctions", bindings=["PySide2"]), - # This Qt module was introduced with Qt6. - _QtModuleDef("QtOpenGLWidgets", shared_lib="OpenGLWidgets", bindings=["PySide6", "PyQt6"]), - _QtModuleDef("QtPrintSupport", shared_lib="PrintSupport", plugins=["printsupport"]), - _QtModuleDef("QtSql", shared_lib="Sql", plugins=["sqldrivers"]), - _QtModuleDef("QtTest", shared_lib="Test"), - _QtModuleDef("QtWidgets", shared_lib="Widgets", plugins=["styles"]), - _QtModuleDef("QtXml", shared_lib="Xml"), - - # *** qt/qtconnectivity *** - _QtModuleDef("QtBluetooth", shared_lib="QtBluetooth", translations=["qtconnectivity"]), - _QtModuleDef("QtNfc", shared_lib="Nfc", translations=["qtconnectivity"]), - - # *** qt/qtdatavis3d *** - _QtModuleDef("QtDataVisualization", shared_lib="DataVisualization"), - - # *** qt/qtdeclarative *** - _QtModuleDef("QtQml", shared_lib="Qml", translations=["qtdeclarative"], plugins=["qmltooling"]), - # Have the Qt5 variant collect translations for qtquickcontrols (qt/qtquickcontrols provides only QtQuick plugins). - _QtModuleDef( - "QtQuick", - shared_lib="Quick", - translations=["qtquickcontrols"], - plugins=["scenegraph"], - bindings=["PySide2", "PyQt5"] - ), - _QtModuleDef("QtQuick", shared_lib="Quick", plugins=["scenegraph"], bindings=["PySide6", "PyQt6"]), - # Qt6-only; in Qt5, this module is part of qt/qtquickcontrols2. Python module is available only in PySide6. - _QtModuleDef(None, shared_lib="QuickControls2", bindings=["PyQt6"]), - _QtModuleDef("QtQuickControls2", shared_lib="QuickControls2", bindings=["PySide6"]), - _QtModuleDef("QtQuickWidgets", shared_lib="QuickWidgets"), - - # *** qt/qtgamepad *** - # No python module; shared library -> plugins association entry. - _QtModuleDef(None, shared_lib="Gamepad", plugins=["gamepads"]), - - # *** qt/qtgraphs *** - # Qt6 >= 6.6.0; python module is available only in PySide6. - _QtModuleDef("QtGraphs", shared_lib="Graphs", bindings=["PySide6"]), - - # *** qt/qthttpserver *** - # Qt6 >= 6.4.0; python module is available only in PySide6. - _QtModuleDef("QtHttpServer", shared_lib="HttpServer", bindings=["PySide6"]), - - # *** qt/qtlocation *** - # QtLocation was reintroduced in Qt6 v6.5.0. - _QtModuleDef( - "QtLocation", - shared_lib="Location", - translations=["qtlocation"], - plugins=["geoservices"], - bindings=["PySide2", "PyQt5", "PySide6"] - ), - _QtModuleDef( - "QtPositioning", - shared_lib="Positioning", - translations=["qtlocation"], - plugins=["position"], - ), - - # *** qt/qtmacextras *** - # Qt5-only Qt module. - _QtModuleDef("QtMacExtras", shared_lib="MacExtras", bindings=["PySide2", "PyQt5"]), - - # *** qt/qtmultimedia *** - # QtMultimedia on Qt6 currently uses only a subset of plugin names from Qt5 counterpart. - _QtModuleDef( - "QtMultimedia", - shared_lib="Multimedia", - translations=["qtmultimedia"], - plugins=[ - "mediaservice", "audio", "video/bufferpool", "video/gstvideorenderer", "video/videonode", "playlistformats", - "resourcepolicy" - ], - bindings=["PySide2", "PyQt5"] - ), - _QtModuleDef( - "QtMultimedia", - shared_lib="Multimedia", - translations=["qtmultimedia"], - # `multimedia` plugins are available as of Qt6 >= 6.4.0; earlier versions had `video/gstvideorenderer` and - # `video/videonode` plugins. - plugins=["multimedia", "video/gstvideorenderer", "video/videonode"], - bindings=["PySide6", "PyQt6"] - ), - _QtModuleDef("QtMultimediaWidgets", shared_lib="MultimediaWidgets"), - # Qt6-only Qt module; python module is available in PySide6 >= 6.4.0 and PyQt6 >= 6.5.0 - _QtModuleDef("QtSpatialAudio", shared_lib="SpatialAudio", bindings=["PySide6", "PyQt6"]), - - # *** qt/qtnetworkauth *** - # QtNetworkAuth python module is available in all bindings but PySide2. - _QtModuleDef(None, shared_lib="NetworkAuth", bindings=["PySide2"]), - _QtModuleDef("QtNetworkAuth", shared_lib="NetworkAuth", bindings=["!PySide2"]), - - # *** qt/qtpurchasing *** - # Qt5-only Qt module, python module is available only in PyQt5. - _QtModuleDef("QtPurchasing", shared_lib="Purchasing", bindings=["PyQt5"]), - - # *** qt/qtquick1 *** - # This is an old, Qt 5.3-era module... - _QtModuleDef( - "QtDeclarative", - shared_lib="Declarative", - translations=["qtquick1"], - plugins=["qml1tooling"], - bindings=["PySide2", "PyQt5"] - ), - - # *** qt/qtquick3d *** - # QtQuick3D python module is available in all bindings but PySide2. - _QtModuleDef(None, shared_lib="Quick3D", bindings=["PySide2"]), - _QtModuleDef("QtQuick3D", shared_lib="Quick3D", bindings=["!PySide2"]), - # No python module; shared library -> plugins association entry. - _QtModuleDef(None, shared_lib="Quick3DAssetImport", plugins=["assetimporters"]), - - # *** qt/qtquickcontrols2 *** - # Qt5-only module; in Qt6, this module is part of qt/declarative. Python module is available only in PySide2. - _QtModuleDef(None, translations=["qtquickcontrols2"], shared_lib="QuickControls2", bindings=["PyQt5"]), - _QtModuleDef( - "QtQuickControls2", translations=["qtquickcontrols2"], shared_lib="QuickControls2", bindings=["PySide2"] - ), - - # *** qt/qtremoteobjects *** - _QtModuleDef("QtRemoteObjects", shared_lib="RemoteObjects"), - - # *** qt/qtscxml *** - # Python module is available only in PySide bindings. Plugins are available only in Qt6. - # PyQt wheels do not seem to ship the corresponding Qt modules (shared libs) at all. - _QtModuleDef("QtScxml", shared_lib="Scxml", bindings=["PySide2"]), - _QtModuleDef("QtScxml", shared_lib="Scxml", plugins=["scxmldatamodel"], bindings=["PySide6"]), - # Qt6-only Qt module, python module is available only in PySide6. - _QtModuleDef("QtStateMachine", shared_lib="StateMachine", bindings=["PySide6"]), - - # *** qt/qtsensors *** - _QtModuleDef("QtSensors", shared_lib="Sensors", plugins=["sensors", "sensorgestures"]), - - # *** qt/qtserialport *** - _QtModuleDef("QtSerialPort", shared_lib="SerialPort", translations=["qtserialport"]), - - # *** qt/qtscript *** - # Qt5-only Qt module, python module is available only in PySide2. PyQt5 wheels do not seem to ship the corresponding - # Qt modules (shared libs) at all. - _QtModuleDef("QtScript", shared_lib="Script", translations=["qtscript"], plugins=["script"], bindings=["PySide2"]), - _QtModuleDef("QtScriptTools", shared_lib="ScriptTools", bindings=["PySide2"]), - - # *** qt/qtserialbus *** - # No python module; shared library -> plugins association entry. - # PySide6 6.5.0 introduced python module. - _QtModuleDef(None, shared_lib="SerialBus", plugins=["canbus"], bindings=["!PySide6"]), - _QtModuleDef("QtSerialBus", shared_lib="SerialBus", plugins=["canbus"], bindings=["PySide6"]), - - # *** qt/qtsvg *** - _QtModuleDef("QtSvg", shared_lib="Svg"), - # Qt6-only Qt module. - _QtModuleDef("QtSvgWidgets", shared_lib="SvgWidgets", bindings=["PySide6", "PyQt6"]), - - # *** qt/qtspeech *** - _QtModuleDef("QtTextToSpeech", shared_lib="TextToSpeech", plugins=["texttospeech"]), - - # *** qt/qttools *** - # QtDesigner python module is available in all bindings but PySide2. - _QtModuleDef(None, shared_lib="Designer", plugins=["designer"], bindings=["PySide2"]), - _QtModuleDef( - "QtDesigner", shared_lib="Designer", translations=["designer"], plugins=["designer"], bindings=["!PySide2"] - ), - _QtModuleDef("QtHelp", shared_lib="Help", translations=["qt_help"]), - # Python module is available only in PySide bindings. - _QtModuleDef("QtUiTools", shared_lib="UiTools", bindings=["PySide*"]), - - # *** qt/qtvirtualkeyboard *** - # No python module; shared library -> plugins association entry. - _QtModuleDef(None, shared_lib="VirtualKeyboard", plugins=["virtualkeyboard"]), - - # *** qt/qtwebchannel *** - _QtModuleDef("QtWebChannel", shared_lib="WebChannel"), - - # *** qt/qtwebengine *** - # QtWebEngine is Qt5-only module (replaced by QtWebEngineQuick in Qt6). - _QtModuleDef("QtWebEngine", shared_lib="WebEngine", bindings=["PySide2", "PyQt5"]), - _QtModuleDef("QtWebEngineCore", shared_lib="WebEngineCore", translations=["qtwebengine"]), - # QtWebEngineQuick is Qt6-only module (replacement for QtWebEngine in Qt5). - _QtModuleDef("QtWebEngineQuick", shared_lib="WebEngineQuick", bindings=["PySide6", "PyQt6"]), - _QtModuleDef("QtWebEngineWidgets", shared_lib="WebEngineWidgets"), - # QtPdf and QtPdfWidgets have python module available in PySide6 and PyQt6 >= 6.4.0. - _QtModuleDef("QtPdf", shared_lib="Pdf", bindings=["PySide6", "PyQt6"]), - _QtModuleDef("QtPdfWidgets", shared_lib="PdfWidgets", bindings=["PySide6", "PyQt6"]), - - # *** qt/qtwebsockets *** - _QtModuleDef("QtWebSockets", shared_lib="WebSockets", translations=["qtwebsockets"]), - - # *** qt/qtwebview *** - # No python module; shared library -> plugins association entry. - _QtModuleDef(None, shared_lib="WebView", plugins=["webview"]), - - # *** qt/qtwinextras *** - # Qt5-only Qt module. - _QtModuleDef("QtWinExtras", shared_lib="WinExtras", bindings=["PySide2", "PyQt5"]), - - # *** qt/qtx11extras *** - # Qt5-only Qt module. - _QtModuleDef("QtX11Extras", shared_lib="X11Extras", bindings=["PySide2", "PyQt5"]), - - # *** qt/qtxmlpatterns *** - # Qt5-only Qt module. - _QtModuleDef( - "QtXmlPatterns", shared_lib="XmlPatterns", translations=["qtxmlpatterns"], bindings=["PySide2", "PyQt5"] - ), - - # *** qscintilla *** - # Python module is available only in PyQt bindings. No associated shared library. - _QtModuleDef("Qsci", translations=["qscintilla"], bindings=["PyQt*"]), -) - - -# Helpers for turning Qt namespace specifiers, such as "!PySide2" or "PyQt*", into set of applicable -# namespaces. -def process_namespace_strings(namespaces): - """"Process list of Qt namespace specifier strings into set of namespaces.""" - bindings = set() - for namespace in namespaces: - bindings |= _process_namespace_string(namespace) - return bindings - - -def _process_namespace_string(namespace): - """Expand a Qt namespace specifier string into set of namespaces.""" - if namespace.startswith("!"): - bindings = _process_namespace_string(namespace[1:]) - return ALL_QT_BINDINGS - bindings - else: - if namespace == "PySide*": - return {"PySide2", "PySide6"} - elif namespace == "PyQt*": - return {"PyQt5", "PyQt6"} - elif namespace in ALL_QT_BINDINGS: - return {namespace} - else: - raise ValueError(f"Invalid Qt namespace specifier: {namespace}!") diff --git a/voxvera/vendor/PyInstaller/utils/hooks/setuptools.py b/voxvera/vendor/PyInstaller/utils/hooks/setuptools.py deleted file mode 100755 index 47a649c..0000000 --- a/voxvera/vendor/PyInstaller/utils/hooks/setuptools.py +++ /dev/null @@ -1,336 +0,0 @@ -# ---------------------------------------------------------------------------- -# Copyright (c) 2024, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -from PyInstaller import log as logging -from PyInstaller import isolated - -logger = logging.getLogger(__name__) - - -# Import setuptools and analyze its properties in an isolated subprocess. This function is called by `SetuptoolsInfo` -# to initialize its properties. -@isolated.decorate -def _retrieve_setuptools_info(): - import importlib - - try: - setuptools = importlib.import_module("setuptools") # noqa: F841 - except ModuleNotFoundError: - return None - - # Delay these imports until after we have confirmed that setuptools is importable. - import pathlib - - import packaging.version - - from PyInstaller.compat import importlib_metadata - from PyInstaller.utils.hooks import ( - collect_data_files, - collect_submodules, - ) - - # Try to retrieve the version. At this point, failure is consider an error. - version_string = importlib_metadata.version("setuptools") - version = packaging.version.Version(version_string).release # Use the version tuple - - # setuptools >= 60.0 its vendored copy of distutils (mainly due to its removal from stdlib in python >= 3.12). - distutils_vendored = False - distutils_modules = [] - if version >= (60, 0): - distutils_vendored = True - distutils_modules += ["_distutils_hack"] - distutils_modules += collect_submodules( - "setuptools._distutils", - # setuptools 71.0.1 ~ 71.0.4 include `setuptools._distutils.tests`; avoid explicitly collecting it - # (t was not included in earlier setuptools releases). - filter=lambda name: name != 'setuptools._distutils.tests', - ) - - # Check if `setuptools._vendor` exists. Some linux distributions opt to de-vendor `setuptools` and remove the - # `setuptools._vendor` directory altogether. If this is the case, most of additional processing below should be - # skipped to avoid errors and warnings about non-existent `setuptools._vendor` module. - try: - setuptools_vendor = importlib.import_module("setuptools._vendor") - except ModuleNotFoundError: - setuptools_vendor = None - - # Check for exposed packages/modules that are vendored by setuptools. If stand-alone version is not provided in the - # environment, setuptools-vendored version is exposed (due to location of `setuptools._vendor` being appended to - # `sys.path`. Applicable to v71.0.0 and later. - vendored_status = dict() - vendored_namespace_package_paths = dict() - if version >= (71, 0) and setuptools_vendor is not None: - VENDORED_TOP_LEVEL_NAMESPACE_CANDIDATES = ( - "backports", # "regular" package, but has namespace semantics due to `pkgutil.extend_path()` - "jaraco", # PEP-420 namespace package - ) - - VENDORED_CANDIDATES = ( - "autocommand", - "backports.tarfile", - "importlib_metadata", - "importlib_resources", - "inflect", - "jaraco.context", - "jaraco.functools", - "jaraco.text", - "more_itertools", - "ordered_set", - "packaging", - "platformdirs", - "tomli", - "typeguard", - "typing_extensions", - "wheel", - "zipp", - ) - - # Resolve path(s) of `setuptools_vendor` package. - setuptools_vendor_paths = [pathlib.Path(path).resolve() for path in setuptools_vendor.__path__] - - # Process each candidate: top-level namespace packages - for candidate_name in VENDORED_TOP_LEVEL_NAMESPACE_CANDIDATES: - try: - candidate = importlib.import_module(candidate_name) - except ImportError: - continue - - # Retrieve the __path__ attribute and store it, so we can re-use it in hooks without having to re-import - # `setuptools` and the candidate package... - candidate_path_attr = getattr(candidate, '__path__', []) - if candidate_path_attr: - candidate_paths = [pathlib.Path(path).resolve() for path in candidate_path_attr] - is_vendored = [ - any([ - setuptools_vendor_path in candidate_path.parents or candidate_path == setuptools_vendor_path - for setuptools_vendor_path in setuptools_vendor_paths - ]) for candidate_path in candidate_paths - ] - # For namespace packages, distinguish between "fully" vendored and "partially" vendored state; i.e., - # whether the part of namespace package in the vendored directory is the only part or not. - if all(is_vendored): - vendored_status[candidate_name] = 'fully' - elif any(is_vendored): - vendored_status[candidate_name] = 'partially' - else: - vendored_status[candidate_name] = False - - # Store paths - vendored_namespace_package_paths[candidate_name] = [str(path) for path in candidate_path_attr] - - # Process each candidate: modules and packages - for candidate_name in VENDORED_CANDIDATES: - try: - candidate = importlib.import_module(candidate_name) - except ImportError: - continue - - # Check the __file__ attribute (modules and regular packages). Will not work with namespace packages, but - # at the moment, there are none (vendored top-level namespace packages have already been handled). - candidate_file_attr = getattr(candidate, '__file__', None) - if candidate_file_attr is not None: - candidate_path = pathlib.Path(candidate_file_attr).parent.resolve() - is_vendored = any([ - setuptools_vendor_path in candidate_path.parents or candidate_path == setuptools_vendor_path - for setuptools_vendor_path in setuptools_vendor_paths - ]) - vendored_status[candidate_name] = is_vendored # True/False - - # Collect submodules from `setuptools._vendor`, regardless of whether the vendored package is exposed or - # not (because setuptools might need/use it either way). - vendored_modules = [] - if setuptools_vendor is not None: - EXCLUDED_VENDORED_MODULES = ( - # Prevent recursing into setuptools._vendor.pyparsing.diagram, which typically fails to be imported due - # to missing dependencies (railroad, pyparsing (?), jinja2) and generates a warning... As the module is - # usually unimportable, it is likely not to be used by setuptools. NOTE: pyparsing was removed from - # vendored packages in setuptools v67.0.0; keep this exclude around for earlier versions. - 'setuptools._vendor.pyparsing.diagram', - # Setuptools >= 71 started shipping vendored dependencies that include tests; avoid collecting those via - # hidden imports. (Note that this also prevents creation of aliases for these module, but that should - # not be an issue, as they should not be referenced from anywhere). - 'setuptools._vendor.importlib_resources.tests', - # These appear to be utility scripts bundled with the jaraco.text package - exclude them. - 'setuptools._vendor.jaraco.text.show-newlines', - 'setuptools._vendor.jaraco.text.strip-prefix', - 'setuptools._vendor.jaraco.text.to-dvorak', - 'setuptools._vendor.jaraco.text.to-qwerty', - ) - vendored_modules += collect_submodules( - 'setuptools._vendor', - filter=lambda name: name not in EXCLUDED_VENDORED_MODULES, - ) - - # `collect_submodules` (and its underlying `pkgutil.iter_modules` do not discover namespace sub-packages, in - # this case `setuptools._vendor.jaraco`. So force a manual scan of modules/packages inside it. - vendored_modules += collect_submodules( - 'setuptools._vendor.jaraco', - filter=lambda name: name not in EXCLUDED_VENDORED_MODULES, - ) - - # *** Data files for vendored packages *** - vendored_data = [] - - if version >= (71, 0) and setuptools_vendor is not None: - # Since the vendored dependencies from `setuptools/_vendor` are now visible to the outside world, make - # sure we collect their metadata. (We cannot use copy_metadata here, because we need to collect data - # files to their original locations). - vendored_data += collect_data_files('setuptools._vendor', includes=['**/*.dist-info']) - # Similarly, ensure that `Lorem ipsum.txt` from vendored jaraco.text is collected - vendored_data += collect_data_files('setuptools._vendor.jaraco.text', includes=['**/Lorem ipsum.txt']) - - # Return dictionary with collected information - return { - "available": True, - "version": version, - "distutils_vendored": distutils_vendored, - "distutils_modules": distutils_modules, - "vendored_status": vendored_status, - "vendored_modules": vendored_modules, - "vendored_data": vendored_data, - "vendored_namespace_package_paths": vendored_namespace_package_paths, - } - - -class SetuptoolsInfo: - def __init__(self): - pass - - def __repr__(self): - return "SetuptoolsInfo" - - # Delay initialization of setuptools information until until the corresponding attributes are first requested. - def __getattr__(self, name): - if 'available' in self.__dict__: - # Initialization was already done, but requested attribute is not available. - raise AttributeError(name) - - # Load setuptools info... - self._load_setuptools_info() - # ... and return the requested attribute - return getattr(self, name) - - def _load_setuptools_info(self): - logger.info("%s: initializing cached setuptools info...", self) - - # Initialize variables so that they might be accessed even if setuptools is unavailable or if initialization - # fails for some reason. - self.available = False - self.version = None - self.distutils_vendored = False - self.distutils_modules = [] - self.vendored_status = dict() - self.vendored_modules = [] - self.vendored_data = [] - self.vendored_namespace_package_paths = dict() - - try: - setuptools_info = _retrieve_setuptools_info() - except Exception as e: - logger.warning("%s: failed to obtain setuptools info: %s", self, e) - return - - # If package could not be imported, `_retrieve_setuptools_info` returns None. In such cases, emit a debug - # message instead of a warning, because this initialization might be triggered by a helper function that is - # trying to determine availability of `setuptools` by inspecting the `available` attribute. - if setuptools_info is None: - logger.debug("%s: failed to obtain setuptools info: setuptools could not be imported.", self) - return - - # Copy properties - for key, value in setuptools_info.items(): - setattr(self, key, value) - - def is_vendored(self, module_name): - return self.vendored_status.get(module_name, False) - - @staticmethod - def _create_vendored_aliases(vendored_name, module_name, modules_list): - # Create aliases for all submodules - prefix_len = len(vendored_name) # Length of target-name prefix to remove - return ((module_name + vendored_module[prefix_len:], vendored_module) for vendored_module in modules_list - if vendored_module.startswith(vendored_name)) - - def get_vendored_aliases(self, module_name): - vendored_name = f"setuptools._vendor.{module_name}" - return self._create_vendored_aliases(vendored_name, module_name, self.vendored_modules) - - def get_distutils_aliases(self): - vendored_name = "setuptools._distutils" - return self._create_vendored_aliases(vendored_name, "distutils", self.distutils_modules) - - -setuptools_info = SetuptoolsInfo() - - -def pre_safe_import_module_for_top_level_namespace_packages(api): - """ - A common implementation of pre_safe_import_module hook function for handling vendored top-level namespace packages - (i.e., `backports` and `jaraco`). - - This function can be either called from the `pre_safe_import_module` function in a pre-safe-import-module hook, or - just imported into the hook and aliased to `pre_safe_import_module`. - """ - module_name = api.module_name - - # Check if the package/module is a vendored copy. This also returns False is setuptools is unavailable, because - # vendored module status dictionary will be empty. - vendored = setuptools_info.is_vendored(module_name) - if not vendored: - return - - if vendored == 'fully': - # For a fully-vendored copy, force creation of aliases; on one hand, this aims to ensure that submodules are - # resolvable, but on the other, it also prevents creation of unvendored top-level package, which should not - # exit in this case. - vendored_name = f"setuptools._vendor.{module_name}" - logger.info( - "Setuptools: %r appears to be a full setuptools-vendored copy - creating alias to %r!", module_name, - vendored_name - ) - # Create aliases for all (sub)modules - for aliased_name, real_vendored_name in setuptools_info.get_vendored_aliases(module_name): - api.add_alias_module(real_vendored_name, aliased_name) - elif vendored == 'partially': - # For a partially-vendored copy, adjust the submodule search paths, so that submodules from all locations are - # discoverable (especially from the setuptools vendor directory, which might not be in the search path yet). - search_paths = setuptools_info.vendored_namespace_package_paths.get(module_name, []) - logger.info( - "Setuptools: %r appears to be a partial setuptools-vendored copy - extending search paths to %r!", - module_name, search_paths - ) - for path in search_paths: - api.append_package_path(path) - else: - logger.warning("Setuptools: %r has unhandled vendored status: %r", module_name, vendored) - - -def pre_safe_import_module(api): - """ - A common implementation of pre_safe_import_module hook function. - - This function can be either called from the `pre_safe_import_module` function in a pre-safe-import-module hook, or - just imported into the hook. - """ - module_name = api.module_name - - # Check if the package/module is a vendored copy. This also returns False is setuptools is unavailable, because - # vendored module status dictionary will be empty. - if not setuptools_info.is_vendored(module_name): - return - - vendored_name = f"setuptools._vendor.{module_name}" - logger.info( - "Setuptools: %r appears to be a setuptools-vendored copy - creating alias to %r!", module_name, vendored_name - ) - - # Create aliases for all (sub)modules - for aliased_name, real_vendored_name in setuptools_info.get_vendored_aliases(module_name): - api.add_alias_module(real_vendored_name, aliased_name) diff --git a/voxvera/vendor/PyInstaller/utils/hooks/tcl_tk.py b/voxvera/vendor/PyInstaller/utils/hooks/tcl_tk.py deleted file mode 100755 index e975c5f..0000000 --- a/voxvera/vendor/PyInstaller/utils/hooks/tcl_tk.py +++ /dev/null @@ -1,356 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import os -import fnmatch - -from PyInstaller import compat -from PyInstaller import isolated -from PyInstaller import log as logging -from PyInstaller.depend import bindepend - -if compat.is_darwin: - from PyInstaller.utils import osx as osxutils - -logger = logging.getLogger(__name__) - - -@isolated.decorate -def _get_tcl_tk_info(): - """ - Isolated-subprocess helper to retrieve the basic Tcl/Tk information: - - tkinter_extension_file = the value of __file__ attribute of the _tkinter binary extension (path to file). - - tcl_data_dir = path to the Tcl library/data directory. - - tcl_version = Tcl version - - tk_version = Tk version - - tcl_theaded = boolean indicating whether Tcl/Tk is built with multi-threading support. - """ - try: - import tkinter - import _tkinter - except ImportError: - # tkinter unavailable - return None - try: - tcl = tkinter.Tcl() - except tkinter.TclError: # e.g. "Can't find a usable init.tcl in the following directories: ..." - return None - - # Query the location of Tcl library/data directory. - tcl_data_dir = tcl.eval("info library") - - # Check if Tcl/Tk is built with multi-threaded support (built with --enable-threads), as indicated by the presence - # of optional `threaded` member in `tcl_platform` array. Tcl 9.0 removed the --enable-threads flag, and is always - # built with multi-threaded support (and thus the `threaded` array member has been removed). - TCL_MAJOR = int(_tkinter.TCL_VERSION.split(".")[0]) - if TCL_MAJOR >= 9: - tcl_threaded = True - else: - try: - tcl.getvar("tcl_platform(threaded)") # Ignore the actual value. - tcl_threaded = True - except tkinter.TclError: - tcl_threaded = False - - return { - "available": True, - # If `_tkinter` is a built-in (as opposed to an extension), it does not have a `__file__` attribute. - "tkinter_extension_file": getattr(_tkinter, '__file__', None), - "tcl_version": _tkinter.TCL_VERSION, - "tk_version": _tkinter.TK_VERSION, - "tcl_threaded": tcl_threaded, - "tcl_data_dir": tcl_data_dir, - } - - -class TclTkInfo: - # Root directory names of Tcl and Tk library/data directories in the frozen application. These directories are - # originally fully versioned (e.g., tcl8.6 and tk8.6); we want to remap them to unversioned variants, so that our - # run-time hook (pyi_rthook__tkinter.py) does not have to determine version numbers when setting `TCL_LIBRARY` - # and `TK_LIBRARY` environment variables. - # - # We also cannot use plain "tk" and "tcl", because on macOS, the Tcl and Tk shared libraries might come from - # framework bundles, and would therefore end up being collected as "Tcl" and "Tk" in the top-level application - # directory, causing clash due to filesystem being case-insensitive by default. - TCL_ROOTNAME = '_tcl_data' - TK_ROOTNAME = '_tk_data' - - def __init__(self): - pass - - def __repr__(self): - return "TclTkInfo" - - # Delay initialization of Tcl/Tk information until until the corresponding attributes are first requested. - def __getattr__(self, name): - if 'available' in self.__dict__: - # Initialization was already done, but requested attribute is not available. - raise AttributeError(name) - - # Load Qt library info... - self._load_tcl_tk_info() - # ... and return the requested attribute - return getattr(self, name) - - def _load_tcl_tk_info(self): - logger.info("%s: initializing cached Tcl/Tk info...", self) - - # Initialize variables so that they might be accessed even if tkinter/Tcl/Tk is unavailable or if initialization - # fails for some reason. - self.available = False - self.tkinter_extension_file = None - self.tcl_version = None - self.tk_version = None - self.tcl_threaded = False - self.tcl_data_dir = None - - self.tk_data_dir = None - self.tcl_module_dir = None - - self.is_macos_system_framework = False - self.tcl_shared_library = None - self.tk_shared_library = None - - self.data_files = [] - - try: - tcl_tk_info = _get_tcl_tk_info() - except Exception as e: - logger.warning("%s: failed to obtain Tcl/Tk info: %s", self, e) - return - - # If tkinter could not be imported, `_get_tcl_tk_info` returns None. In such cases, emit a debug message instead - # of a warning, because this initialization might be triggered by a helper function that is trying to determine - # availability of `tkinter` by inspecting the `available` attribute. - if tcl_tk_info is None: - logger.debug("%s: failed to obtain Tcl/Tk info: tkinter/_tkinter could not be imported.", self) - return - - # Copy properties - for key, value in tcl_tk_info.items(): - setattr(self, key, value) - - # Parse Tcl/Tk version into (major, minor) tuple. - self.tcl_version = tuple((int(x) for x in self.tcl_version.split(".")[:2])) - self.tk_version = tuple((int(x) for x in self.tk_version.split(".")[:2])) - - # Determine full path to Tcl and Tk shared libraries against which the `_tkinter` extension module is linked. - # This can only be done when `_tkinter` is in fact an extension, and not a built-in. In the latter case, the - # Tcl/Tk libraries are statically linked into python shared library, so there are no shared libraries for us - # to discover. - if self.tkinter_extension_file: - try: - ( - self.tcl_shared_library, - self.tk_shared_library, - ) = self._find_tcl_tk_shared_libraries(self.tkinter_extension_file) - except Exception: - logger.warning("%s: failed to determine Tcl and Tk shared library location!", self, exc_info=True) - - # macOS: check if _tkinter is linked against system-provided Tcl.framework and Tk.framework. This is the - # case with python3 from XCode tools (and was the case with very old homebrew python builds). In such cases, - # we should not be collecting Tcl/Tk files. - if compat.is_darwin: - self.is_macos_system_framework = self._check_macos_system_framework(self.tcl_shared_library) - - # Emit a warning in the unlikely event that we are dealing with Teapot-distributed version of ActiveTcl. - if not self.is_macos_system_framework: - self._warn_if_using_activetcl_or_teapot(self.tcl_data_dir) - - # Infer location of Tk library/data directory. Ideally, we could infer this by running - # - # import tkinter - # root = tkinter.Tk() - # tk_data_dir = root.tk.exprstring('$tk_library') - # - # in the isolated subprocess as part of `_get_tcl_tk_info`. However, that is impractical, as it shows the empty - # window, and on some platforms (e.g., linux) requires display server. Therefore, try to guess the location, - # based on the following heuristic: - # - if TK_LIBRARY is defined use it. - # - if Tk is built as macOS framework bundle, look for Scripts sub-directory in Resources directory next to - # the shared library. - # - otherwise, look for: $tcl_root/../tkX.Y, where X and Y are Tk major and minor version. - if "TK_LIBRARY" in os.environ: - self.tk_data_dir = os.environ["TK_LIBRARY"] - elif compat.is_darwin and self.tk_shared_library and ( - # is_framework_bundle_lib handles only fully-versioned framework library paths... - (osxutils.is_framework_bundle_lib(self.tk_shared_library)) or - # ... so manually handle top-level-symlinked variant for now. - (self.tk_shared_library).endswith("Tk.framework/Tk") - ): - # Fully resolve the library path, in case it is a top-level symlink; for example, resolve - # /Library/Frameworks/Python.framework/Versions/3.13/Frameworks/Tk.framework/Tk - # into - # /Library/Frameworks/Python.framework/Versions/3.13/Frameworks/Tk.framework/Versions/8.6/Tk - tk_lib_realpath = os.path.realpath(self.tk_shared_library) - # Resources/Scripts directory next to the shared library - self.tk_data_dir = os.path.join(os.path.dirname(tk_lib_realpath), "Resources", "Scripts") - else: - self.tk_data_dir = os.path.join( - os.path.dirname(self.tcl_data_dir), - f"tk{self.tk_version[0]}.{self.tk_version[1]}", - ) - - # Infer location of Tcl module directory. The modules directory is separate from the library/data one, and - # is located at $tcl_root/../tclX, where X is the major Tcl version. - self.tcl_module_dir = os.path.join( - os.path.dirname(self.tcl_data_dir), - f"tcl{self.tcl_version[0]}", - ) - - # Find all data files - if self.is_macos_system_framework: - logger.info("%s: using macOS system Tcl/Tk framework - not collecting data files.", self) - else: - # Collect Tcl and Tk scripts from their corresponding library/data directories. See comment at the - # definition of TK_ROOTNAME and TK_ROOTNAME variables. - if os.path.isdir(self.tcl_data_dir): - self.data_files += self._collect_files_from_directory( - self.tcl_data_dir, - prefix=self.TCL_ROOTNAME, - excludes=['demos', '*.lib', 'tclConfig.sh'], - ) - else: - logger.warning("%s: Tcl library/data directory %r does not exist!", self, self.tcl_data_dir) - - if os.path.isdir(self.tk_data_dir): - self.data_files += self._collect_files_from_directory( - self.tk_data_dir, - prefix=self.TK_ROOTNAME, - excludes=['demos', '*.lib', 'tkConfig.sh'], - ) - else: - logger.warning("%s: Tk library/data directory %r does not exist!", self, self.tk_data_dir) - - # Collect Tcl modules from modules directory - if os.path.isdir(self.tcl_module_dir): - self.data_files += self._collect_files_from_directory( - self.tcl_module_dir, - prefix=os.path.basename(self.tcl_module_dir), - ) - else: - logger.warning("%s: Tcl module directory %r does not exist!", self, self.tcl_module_dir) - - @staticmethod - def _collect_files_from_directory(root, prefix=None, excludes=None): - """ - A minimal port of PyInstaller.building.datastruct.Tree() functionality, which allows us to avoid using Tree - here. This way, the TclTkInfo data structure can be used without having PyInstaller's config context set up. - """ - excludes = excludes or [] - - todo = [(root, prefix)] - output = [] - while todo: - target_dir, prefix = todo.pop() - - for entry in os.listdir(target_dir): - # Basic name-based exclusion - if any((fnmatch.fnmatch(entry, exclude) for exclude in excludes)): - continue - - src_path = os.path.join(target_dir, entry) - dest_path = os.path.join(prefix, entry) if prefix else entry - - if os.path.isdir(src_path): - todo.append((src_path, dest_path)) - else: - # Return 3-element tuples with fully-resolved dest path, since other parts of code depend on that. - output.append((dest_path, src_path, 'DATA')) - - return output - - @staticmethod - def _find_tcl_tk_shared_libraries(tkinter_ext_file): - """ - Find Tcl and Tk shared libraries against which the _tkinter extension module is linked. - """ - tcl_lib = None - tk_lib = None - - for _, lib_path in bindepend.get_imports(tkinter_ext_file): # (name, fullpath) tuple - if lib_path is None: - continue # Skip unresolved entries - - # For comparison, take basename of lib_path. On macOS, lib_name returned by get_imports is in fact - # referenced name, which is not necessarily just a basename. - lib_name = os.path.basename(lib_path) - lib_name_lower = lib_name.lower() # lower-case for comparisons - - # First check for Tk library, because it is unlikely that 'tk' will appear in the name of the Tcl shared - # library, while 'tcl' could appear in the name of the Tk shared library. For example, Fedora 43 ships - # both Tcl/Tk 8.6 and 9.0, and in the latter, the libraries are named `libtcl9.0.so` and `libtcl9tk9.0.so`. - if 'tk' in lib_name_lower: - tk_lib = lib_path - elif 'tcl' in lib_name_lower: - tcl_lib = lib_path - - return tcl_lib, tk_lib - - @staticmethod - def _check_macos_system_framework(tcl_shared_lib): - # Starting with macOS 11, system libraries are hidden (unless both Python and PyInstaller's bootloader are built - # against macOS 11.x SDK). Therefore, Tcl shared library might end up unresolved (None); but that implicitly - # indicates that the system framework is used. - if tcl_shared_lib is None: - return True - - # Check if the path corresponds to the system framework, i.e., [/System]/Library/Frameworks/Tcl.framework/Tcl - return 'Library/Frameworks/Tcl.framework' in tcl_shared_lib - - @staticmethod - def _warn_if_using_activetcl_or_teapot(tcl_root): - """ - Check if Tcl installation is a Teapot-distributed version of ActiveTcl, and log a non-fatal warning that the - resulting frozen application will (likely) fail to run on other systems. - - PyInstaller does *not* freeze all ActiveTcl dependencies -- including Teapot, which is typically ignorable. - Since Teapot is *not* ignorable in this case, this function warns of impending failure. - - See Also - ------- - https://github.com/pyinstaller/pyinstaller/issues/621 - """ - if tcl_root is None: - return - - # Read the "init.tcl" script and look for mentions of "activetcl" and "teapot" - init_tcl = os.path.join(tcl_root, 'init.tcl') - if not os.path.isfile(init_tcl): - return - - mentions_activetcl = False - mentions_teapot = False - - # Tcl/Tk reads files using the system encoding (https://www.tcl.tk/doc/howto/i18n.html#system_encoding); - # on macOS, this is UTF-8. - with open(init_tcl, 'r', encoding='utf8') as fp: - for line in fp.readlines(): - line = line.strip().lower() - if line.startswith('#'): - continue - if 'activetcl' in line: - mentions_activetcl = True - if 'teapot' in line: - mentions_teapot = True - if mentions_activetcl and mentions_teapot: - break - - if mentions_activetcl and mentions_teapot: - logger.warning( - "You appear to be using an ActiveTcl build of Tcl/Tk, which PyInstaller has\n" - "difficulty freezing. To fix this, comment out all references to 'teapot' in\n" - f"{init_tcl!r}\n" - "See https://github.com/pyinstaller/pyinstaller/issues/621 for more information." - ) - - -tcltk_info = TclTkInfo() diff --git a/voxvera/vendor/PyInstaller/utils/misc.py b/voxvera/vendor/PyInstaller/utils/misc.py deleted file mode 100755 index 77a3e8e..0000000 --- a/voxvera/vendor/PyInstaller/utils/misc.py +++ /dev/null @@ -1,229 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -This module contains miscellaneous functions that do not fit anywhere else. -""" - -import glob -import os -import pprint -import codecs -import re -import tokenize -import io -import pathlib - -from PyInstaller import log as logging -from PyInstaller.compat import is_win - -logger = logging.getLogger(__name__) - - -def dlls_in_subdirs(directory): - """ - Returns a list *.dll, *.so, *.dylib in the given directory and its subdirectories. - """ - filelist = [] - for root, dirs, files in os.walk(directory): - filelist.extend(dlls_in_dir(root)) - return filelist - - -def dlls_in_dir(directory): - """ - Returns a list of *.dll, *.so, *.dylib in the given directory. - """ - return files_in_dir(directory, ["*.so", "*.dll", "*.dylib"]) - - -def files_in_dir(directory, file_patterns=None): - """ - Returns a list of files in the given directory that match the given pattern. - """ - - file_patterns = file_patterns or [] - - files = [] - for file_pattern in file_patterns: - files.extend(glob.glob(os.path.join(directory, file_pattern))) - return files - - -def get_path_to_toplevel_modules(filename): - """ - Return the path to top-level directory that contains Python modules. - - It will look in parent directories for __init__.py files. The first parent directory without __init__.py is the - top-level directory. - - Returned directory might be used to extend the PYTHONPATH. - """ - curr_dir = os.path.dirname(os.path.abspath(filename)) - pattern = '__init__.py' - - # Try max. 10 levels up. - try: - for i in range(10): - files = set(os.listdir(curr_dir)) - # 'curr_dir' is still not top-level; go to parent dir. - if pattern in files: - curr_dir = os.path.dirname(curr_dir) - # Top-level dir found; return it. - else: - return curr_dir - except IOError: - pass - # No top-level directory found, or error was encountered. - return None - - -def mtime(fnm): - try: - # TODO: explain why this does not use os.path.getmtime() ? - # - It is probably not used because it returns float and not int. - return os.stat(fnm)[8] - except Exception: - return 0 - - -def save_py_data_struct(filename, data): - """ - Save data into text file as Python data structure. - :param filename: - :param data: - :return: - """ - dirname = os.path.dirname(filename) - if not os.path.exists(dirname): - os.makedirs(dirname) - with open(filename, 'w', encoding='utf-8') as f: - pprint.pprint(data, f) - - -def load_py_data_struct(filename): - """ - Load data saved as python code and interpret that code. - :param filename: - :return: - """ - with open(filename, 'r', encoding='utf-8') as f: - if is_win: - # import versioninfo so that VSVersionInfo can parse correctly. - from PyInstaller.utils.win32 import versioninfo # noqa: F401 - - return eval(f.read()) - - -def absnormpath(apath): - return os.path.abspath(os.path.normpath(apath)) - - -def module_parent_packages(full_modname): - """ - Return list of parent package names. - 'aaa.bb.c.dddd' -> ['aaa', 'aaa.bb', 'aaa.bb.c'] - :param full_modname: Full name of a module. - :return: List of parent module names. - """ - prefix = '' - parents = [] - # Ignore the last component in module name and get really just parent, grandparent, great grandparent, etc. - for pkg in full_modname.split('.')[0:-1]: - # Ensure that first item does not start with dot '.' - prefix += '.' + pkg if prefix else pkg - parents.append(prefix) - return parents - - -def is_file_qt_plugin(filename): - """ - Check if the given file is a Qt plugin file. - :param filename: Full path to file to check. - :return: True if given file is a Qt plugin file, False if not. - """ - - # Check the file contents; scan for QTMETADATA string. The scan is based on the brute-force Windows codepath of - # findPatternUnloaded() from qtbase/src/corelib/plugin/qlibrary.cpp in Qt5. - with open(filename, 'rb') as fp: - fp.seek(0, os.SEEK_END) - end_pos = fp.tell() - - SEARCH_CHUNK_SIZE = 8192 - QTMETADATA_MAGIC = b'QTMETADATA ' - - magic_offset = -1 - while end_pos >= len(QTMETADATA_MAGIC): - start_pos = max(end_pos - SEARCH_CHUNK_SIZE, 0) - chunk_size = end_pos - start_pos - # Is the remaining chunk large enough to hold the pattern? - if chunk_size < len(QTMETADATA_MAGIC): - break - # Read and scan the chunk - fp.seek(start_pos, os.SEEK_SET) - buf = fp.read(chunk_size) - pos = buf.rfind(QTMETADATA_MAGIC) - if pos != -1: - magic_offset = start_pos + pos - break - # Adjust search location for next chunk; ensure proper overlap. - end_pos = start_pos + len(QTMETADATA_MAGIC) - 1 - if magic_offset == -1: - return False - - return True - - -BOM_MARKERS_TO_DECODERS = { - codecs.BOM_UTF32_LE: codecs.utf_32_le_decode, - codecs.BOM_UTF32_BE: codecs.utf_32_be_decode, - codecs.BOM_UTF32: codecs.utf_32_decode, - codecs.BOM_UTF16_LE: codecs.utf_16_le_decode, - codecs.BOM_UTF16_BE: codecs.utf_16_be_decode, - codecs.BOM_UTF16: codecs.utf_16_decode, - codecs.BOM_UTF8: codecs.utf_8_decode, -} -BOM_RE = re.compile(rb"\A(%s)?(.*)" % b"|".join(map(re.escape, BOM_MARKERS_TO_DECODERS)), re.DOTALL) - - -def decode(raw: bytes): - """ - Decode bytes to string, respecting and removing any byte-order marks if present, or respecting but not removing any - PEP263 encoding comments (# encoding: cp1252). - """ - bom, raw = BOM_RE.match(raw).groups() - if bom: - return BOM_MARKERS_TO_DECODERS[bom](raw)[0] - - encoding, _ = tokenize.detect_encoding(io.BytesIO(raw).readline) - return raw.decode(encoding) - - -def is_iterable(arg): - """ - Check if the passed argument is an iterable." - """ - try: - iter(arg) - except TypeError: - return False - return True - - -def path_to_parent_archive(filename): - """ - Check if the given file path points to a file inside an existing archive file. Returns first path from the set of - parent paths that points to an existing file, or `None` if no such path exists (i.e., file is an actual stand-alone - file). - """ - for parent in pathlib.Path(filename).parents: - if parent.is_file(): - return parent - return None diff --git a/voxvera/vendor/PyInstaller/utils/osx.py b/voxvera/vendor/PyInstaller/utils/osx.py deleted file mode 100755 index 68726ba..0000000 --- a/voxvera/vendor/PyInstaller/utils/osx.py +++ /dev/null @@ -1,757 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2014-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Utils for macOS platform. -""" - -import math -import os -import pathlib -import subprocess -import shutil -import tempfile - -from macholib.mach_o import ( - LC_BUILD_VERSION, - LC_CODE_SIGNATURE, - LC_ID_DYLIB, - LC_LOAD_DYLIB, - LC_LOAD_UPWARD_DYLIB, - LC_LOAD_WEAK_DYLIB, - LC_PREBOUND_DYLIB, - LC_REEXPORT_DYLIB, - LC_RPATH, - LC_SEGMENT_64, - LC_SYMTAB, - LC_UUID, - LC_VERSION_MIN_MACOSX, -) -from macholib.MachO import MachO -import macholib.util - -import PyInstaller.log as logging -from PyInstaller import compat - -logger = logging.getLogger(__name__) - - -def is_homebrew_env(): - """ - Check if Python interpreter was installed via Homebrew command 'brew'. - - :return: True if Homebrew else otherwise. - """ - # Python path prefix should start with Homebrew prefix. - env_prefix = get_homebrew_prefix() - if env_prefix and compat.base_prefix.startswith(env_prefix): - return True - return False - - -def is_macports_env(): - """ - Check if Python interpreter was installed via Macports command 'port'. - - :return: True if Macports else otherwise. - """ - # Python path prefix should start with Macports prefix. - env_prefix = get_macports_prefix() - if env_prefix and compat.base_prefix.startswith(env_prefix): - return True - return False - - -def get_homebrew_prefix(): - """ - :return: Root path of the Homebrew environment. - """ - prefix = shutil.which('brew') - # Conversion: /usr/local/bin/brew -> /usr/local - prefix = os.path.dirname(os.path.dirname(prefix)) - return prefix - - -def get_macports_prefix(): - """ - :return: Root path of the Macports environment. - """ - prefix = shutil.which('port') - # Conversion: /usr/local/bin/port -> /usr/local - prefix = os.path.dirname(os.path.dirname(prefix)) - return prefix - - -def _find_version_cmd(header): - """ - Helper that finds the version command in the given MachO header. - """ - # The SDK version is stored in LC_BUILD_VERSION command (used when targeting the latest versions of macOS) or in - # older LC_VERSION_MIN_MACOSX command. Check for presence of either. - version_cmd = [cmd for cmd in header.commands if cmd[0].cmd in {LC_BUILD_VERSION, LC_VERSION_MIN_MACOSX}] - assert len(version_cmd) == 1, \ - f"Expected exactly one LC_BUILD_VERSION or LC_VERSION_MIN_MACOSX command, found {len(version_cmd)}!" - return version_cmd[0] - - -def get_macos_sdk_version(filename): - """ - Obtain the version of macOS SDK against which the given binary was built. - - NOTE: currently, version is retrieved only from the first arch slice in the binary. - - :return: (major, minor, revision) tuple - """ - binary = MachO(filename) - header = binary.headers[0] - # Find version command using helper - version_cmd = _find_version_cmd(header) - return _hex_triplet(version_cmd[1].sdk) - - -def _hex_triplet(version): - # Parse SDK version number - major = (version & 0xFF0000) >> 16 - minor = (version & 0xFF00) >> 8 - revision = (version & 0xFF) - return major, minor, revision - - -def macosx_version_min(filename: str) -> tuple: - """ - Get the -macosx-version-min used to compile a macOS binary. - - For fat binaries, the minimum version is selected. - """ - versions = [] - for header in MachO(filename).headers: - cmd = _find_version_cmd(header) - if cmd[0].cmd == LC_VERSION_MIN_MACOSX: - versions.append(cmd[1].version) - else: - # macOS >= 10.14 uses LC_BUILD_VERSION instead. - versions.append(cmd[1].minos) - - return min(map(_hex_triplet, versions)) - - -def set_macos_sdk_version(filename, major, minor, revision): - """ - Overwrite the macOS SDK version declared in the given binary with the specified version. - - NOTE: currently, only version in the first arch slice is modified. - """ - # Validate values - assert 0 <= major <= 255, "Invalid major version value!" - assert 0 <= minor <= 255, "Invalid minor version value!" - assert 0 <= revision <= 255, "Invalid revision value!" - # Open binary - binary = MachO(filename) - header = binary.headers[0] - # Find version command using helper - version_cmd = _find_version_cmd(header) - # Write new SDK version number - version_cmd[1].sdk = major << 16 | minor << 8 | revision - # Write changes back. - with open(binary.filename, 'rb+') as fp: - binary.write(fp) - - -def fix_exe_for_code_signing(filename): - """ - Fixes the Mach-O headers to make code signing possible. - - Code signing on macOS does not work out of the box with embedding .pkg archive into the executable. - - The fix is done this way: - - Make the embedded .pkg archive part of the Mach-O 'String Table'. 'String Table' is at end of the macOS exe file, - so just change the size of the table to cover the end of the file. - - Fix the size of the __LINKEDIT segment. - - Note: the above fix works only if the single-arch thin executable or the last arch slice in a multi-arch fat - executable is not signed, because LC_CODE_SIGNATURE comes after LC_SYMTAB, and because modification of headers - invalidates the code signature. On modern arm64 macOS, code signature is mandatory, and therefore compilers - create a dummy signature when executable is built. In such cases, that signature needs to be removed before this - function is called. - - Mach-O format specification: http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/Mach-O.5.html - """ - # Estimate the file size after data was appended - file_size = os.path.getsize(filename) - - # Take the last available header. A single-arch thin binary contains a single slice, while a multi-arch fat binary - # contains multiple, and we need to modify the last one, which is adjacent to the appended data. - executable = MachO(filename) - header = executable.headers[-1] - - # Sanity check: ensure the executable slice is not signed (otherwise signature's section comes last in the - # __LINKEDIT segment). - sign_sec = [cmd for cmd in header.commands if cmd[0].cmd == LC_CODE_SIGNATURE] - assert len(sign_sec) == 0, "Executable contains code signature!" - - # Find __LINKEDIT segment by name (16-byte zero padded string) - __LINKEDIT_NAME = b'__LINKEDIT\x00\x00\x00\x00\x00\x00' - linkedit_seg = [cmd for cmd in header.commands if cmd[0].cmd == LC_SEGMENT_64 and cmd[1].segname == __LINKEDIT_NAME] - assert len(linkedit_seg) == 1, "Expected exactly one __LINKEDIT segment!" - linkedit_seg = linkedit_seg[0][1] # Take the segment command entry - # Find SYMTAB section - symtab_sec = [cmd for cmd in header.commands if cmd[0].cmd == LC_SYMTAB] - assert len(symtab_sec) == 1, "Expected exactly one SYMTAB section!" - symtab_sec = symtab_sec[0][1] # Take the symtab command entry - - # The string table is located at the end of the SYMTAB section, which in turn is the last section in the __LINKEDIT - # segment. Therefore, the end of SYMTAB section should be aligned with the end of __LINKEDIT segment, and in turn - # both should be aligned with the end of the file (as we are in the last or the only arch slice). - # - # However, when removing the signature from the executable using codesign under macOS 10.13, the codesign utility - # may produce an invalid file, with the declared length of the __LINKEDIT segment (linkedit_seg.filesize) pointing - # beyond the end of file, as reported in issue #6167. - # - # We can compensate for that by not using the declared sizes anywhere, and simply recompute them. In the final - # binary, the __LINKEDIT segment and the SYMTAB section MUST end at the end of the file (otherwise, we have bigger - # issues...). So simply recompute the declared sizes as difference between the final file length and the - # corresponding start offset (NOTE: the offset is relative to start of the slice, which is stored in header.offset. - # In thin binaries, header.offset is zero and start offset is relative to the start of file, but with fat binaries, - # header.offset is non-zero) - symtab_sec.strsize = file_size - (header.offset + symtab_sec.stroff) - linkedit_seg.filesize = file_size - (header.offset + linkedit_seg.fileoff) - - # Compute new vmsize by rounding filesize up to full page size. - page_size = (0x4000 if _get_arch_string(header.header).startswith('arm64') else 0x1000) - linkedit_seg.vmsize = math.ceil(linkedit_seg.filesize / page_size) * page_size - - # NOTE: according to spec, segments need to be aligned to page boundaries: 0x4000 (16 kB) for arm64, 0x1000 (4 kB) - # for other arches. But it seems we can get away without rounding and padding the segment file size - perhaps - # because it is the last one? - - # Write changes - with open(filename, 'rb+') as fp: - executable.write(fp) - - # In fat binaries, we also need to adjust the fat header. macholib as of version 1.14 does not support this, so we - # need to do it ourselves... - if executable.fat: - from macholib.mach_o import (FAT_MAGIC, FAT_MAGIC_64, fat_arch, fat_arch64, fat_header) - with open(filename, 'rb+') as fp: - # Taken from MachO.load_fat() implementation. The fat header's signature has already been validated when we - # loaded the file for the first time. - fat = fat_header.from_fileobj(fp) - if fat.magic == FAT_MAGIC: - archs = [fat_arch.from_fileobj(fp) for i in range(fat.nfat_arch)] - elif fat.magic == FAT_MAGIC_64: - archs = [fat_arch64.from_fileobj(fp) for i in range(fat.nfat_arch)] - # Adjust the size in the fat header for the last slice. - arch = archs[-1] - arch.size = file_size - arch.offset - # Now write the fat headers back to the file. - fp.seek(0) - fat.to_fileobj(fp) - for arch in archs: - arch.to_fileobj(fp) - - -def _get_arch_string(header): - """ - Converts cputype and cpusubtype from mach_o.mach_header_64 into arch string comparible with lipo/codesign. - The list of supported architectures can be found in man(1) arch. - """ - # NOTE: the constants below are taken from macholib.mach_o - cputype = header.cputype - cpusubtype = header.cpusubtype & 0x0FFFFFFF - if cputype == 0x01000000 | 7: - if cpusubtype == 8: - return 'x86_64h' # 64-bit intel (haswell) - else: - return 'x86_64' # 64-bit intel - elif cputype == 0x01000000 | 12: - if cpusubtype == 2: - return 'arm64e' - else: - return 'arm64' - elif cputype == 7: - return 'i386' # 32-bit intel - assert False, 'Unhandled architecture!' - - -def update_exe_identifier(filename, pkg_filename): - """ - Modifies the Mach-O image UUID stored in the LC_UUID command (if present) in order to ensure that different - frozen applications have different identifiers. See TN3178 for details on why this is required: - https://developer.apple.com/documentation/technotes/tn3178-checking-for-and-resolving-build-uuid-problems - """ - - # Compute hash of the PKG - import hashlib - pkg_hash = hashlib.sha1() - with open(pkg_filename, 'rb') as fp: - for chunk in iter(lambda: fp.read(8192), b""): - pkg_hash.update(chunk) - - # Modify UUID in all arch slices of the executable. - executable = MachO(filename) - for header in executable.headers: - # Find LC_UUID command - uuid_cmd = [cmd for cmd in header.commands if cmd[0].cmd == LC_UUID] - if not uuid_cmd: - continue - uuid_cmd = uuid_cmd[0] - - # Read the existing UUID (which is based on bootloader executable itself). - original_uuid = uuid_cmd[1].uuid - - # Add original UUID to the hash; this is similar to what UUID v3/v5 do with namespace + name, except - # that in our case, the prefix UUID (namespace) is added at the end, so that PKG hash needs to be - # (pre)computed only once. - combined_hash = pkg_hash.copy() - combined_hash.update(original_uuid) - - new_uuid = combined_hash.digest()[:16] # Same as uuid.uuid3() / uuid.uuid5(). - assert len(new_uuid) == 16 - - uuid_cmd[1].uuid = new_uuid - - # Write changes - with open(filename, 'rb+') as fp: - executable.write(fp) - - -class InvalidBinaryError(Exception): - """ - Exception raised by `get_binary_architectures` when it is passed an invalid binary. - """ - pass - - -class IncompatibleBinaryArchError(Exception): - """ - Exception raised by `binary_to_target_arch` when the passed binary fails the strict architecture check. - """ - def __init__(self, message): - url = "https://pyinstaller.org/en/stable/feature-notes.html#macos-multi-arch-support" - super().__init__(f"{message} For details about this error message, see: {url}") - - -def get_binary_architectures(filename): - """ - Inspects the given binary and returns tuple (is_fat, archs), where is_fat is boolean indicating fat/thin binary, - and arch is list of architectures with lipo/codesign compatible names. - """ - try: - executable = MachO(filename) - except ValueError as e: - raise InvalidBinaryError("Invalid Mach-O binary!") from e - return bool(executable.fat), [_get_arch_string(hdr.header) for hdr in executable.headers] - - -def convert_binary_to_thin_arch(filename, thin_arch, output_filename=None): - """ - Convert the given fat binary into thin one with the specified target architecture. - """ - output_filename = output_filename or filename - cmd_args = ['lipo', '-thin', thin_arch, filename, '-output', output_filename] - p = subprocess.run(cmd_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8') - if p.returncode: - raise SystemError(f"lipo command ({cmd_args}) failed with error code {p.returncode}!\noutput: {p.stdout}") - - -def merge_into_fat_binary(output_filename, *slice_filenames): - """ - Merge the given single-arch thin binary files into a fat binary. - """ - cmd_args = ['lipo', '-create', '-output', output_filename, *slice_filenames] - p = subprocess.run(cmd_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8') - if p.returncode: - raise SystemError(f"lipo command ({cmd_args}) failed with error code {p.returncode}!\noutput: {p.stdout}") - - -def binary_to_target_arch(filename, target_arch, display_name=None): - """ - Check that the given binary contains required architecture slice(s) and convert the fat binary into thin one, - if necessary. - """ - if not display_name: - display_name = filename # Same as input file - # Check the binary - is_fat, archs = get_binary_architectures(filename) - if target_arch == 'universal2': - if not is_fat: - raise IncompatibleBinaryArchError(f"{display_name} is not a fat binary!") - # Assume fat binary is universal2; nothing to do - else: - if is_fat: - if target_arch not in archs: - raise IncompatibleBinaryArchError(f"{display_name} does not contain slice for {target_arch}!") - # Convert to thin arch - logger.debug("Converting fat binary %s (%s) to thin binary (%s)", filename, display_name, target_arch) - convert_binary_to_thin_arch(filename, target_arch) - else: - if target_arch not in archs: - raise IncompatibleBinaryArchError( - f"{display_name} is incompatible with target arch {target_arch} (has arch: {archs[0]})!" - ) - # Binary has correct arch; nothing to do - - -def remove_signature_from_binary(filename): - """ - Remove the signature from all architecture slices of the given binary file using the codesign utility. - """ - logger.debug("Removing signature from file %r", filename) - cmd_args = ['/usr/bin/codesign', '--remove', '--all-architectures', filename] - p = subprocess.run(cmd_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8') - if p.returncode: - raise SystemError(f"codesign command ({cmd_args}) failed with error code {p.returncode}!\noutput: {p.stdout}") - - -def sign_binary(filename, identity=None, entitlements_file=None, deep=False): - """ - Sign the binary using codesign utility. If no identity is provided, ad-hoc signing is performed. - """ - extra_args = [] - if not identity: - identity = '-' # ad-hoc signing - else: - extra_args.append('--options=runtime') # hardened runtime - if entitlements_file: - extra_args.append('--entitlements') - extra_args.append(entitlements_file) - if deep: - extra_args.append('--deep') - - logger.debug("Signing file %r", filename) - cmd_args = [ - '/usr/bin/codesign', '-s', identity, '--force', '--all-architectures', '--timestamp', *extra_args, filename - ] - p = subprocess.run(cmd_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8') - if p.returncode: - raise SystemError(f"codesign command ({cmd_args}) failed with error code {p.returncode}!\noutput: {p.stdout}") - - -def set_dylib_dependency_paths(filename, target_rpath): - """ - Modify the given dylib's identity (in LC_ID_DYLIB command) and the paths to dependent dylibs (in LC_LOAD_DYLIB) - commands into `@rpath/` format, remove any existing rpaths (LC_RPATH commands), and add a new rpath - (LC_RPATH command) with the specified path. - - Uses `install-tool-name` utility to make the changes. - - The system libraries (e.g., the ones found in /usr/lib) are exempted from path rewrite. - - For multi-arch fat binaries, this function extracts each slice into temporary file, processes it separately, - and then merges all processed slices back into fat binary. This is necessary because `install-tool-name` cannot - modify rpaths in cases when an existing rpath is present only in one slice. - """ - - # Check if we are dealing with a fat binary; the `install-name-tool` seems to be unable to remove an rpath that is - # present only in one slice, so we need to extract each slice, process it separately, and then stich processed - # slices back into a fat binary. - is_fat, archs = get_binary_architectures(filename) - - if is_fat: - with tempfile.TemporaryDirectory() as tmpdir: - slice_filenames = [] - for arch in archs: - slice_filename = os.path.join(tmpdir, arch) - convert_binary_to_thin_arch(filename, arch, output_filename=slice_filename) - _set_dylib_dependency_paths(slice_filename, target_rpath) - slice_filenames.append(slice_filename) - merge_into_fat_binary(filename, *slice_filenames) - else: - # Thin binary - we can process it directly - _set_dylib_dependency_paths(filename, target_rpath) - - -def _set_dylib_dependency_paths(filename, target_rpath): - """ - The actual implementation of set_dylib_dependency_paths functionality. - - Implicitly assumes that a single-arch thin binary is given. - """ - - # Relocatable commands that we should overwrite - same list as used by `macholib`. - _RELOCATABLE = { - LC_LOAD_DYLIB, - LC_LOAD_UPWARD_DYLIB, - LC_LOAD_WEAK_DYLIB, - LC_PREBOUND_DYLIB, - LC_REEXPORT_DYLIB, - } - - # Parse dylib's header to extract the following commands: - # - LC_LOAD_DYLIB (or any member of _RELOCATABLE list): dylib load commands (dependent libraries) - # - LC_RPATH: rpath definitions - # - LC_ID_DYLIB: dylib's identity - binary = MachO(filename) - - dylib_id = None - rpaths = set() - linked_libs = set() - - for header in binary.headers: - for cmd in header.commands: - lc_type = cmd[0].cmd - if lc_type not in _RELOCATABLE and lc_type not in {LC_RPATH, LC_ID_DYLIB}: - continue - - # Decode path, strip trailing NULL characters - path = cmd[2].decode('utf-8').rstrip('\x00') - - if lc_type in _RELOCATABLE: - linked_libs.add(path) - elif lc_type == LC_RPATH: - rpaths.add(path) - elif lc_type == LC_ID_DYLIB: - dylib_id = path - - del binary - - # If dylib has identifier set, compute the normalized version, in form of `@rpath/basename`. - normalized_dylib_id = None - if dylib_id: - normalized_dylib_id = str(pathlib.PurePath('@rpath') / pathlib.PurePath(dylib_id).name) - - # Find dependent libraries that should have their prefix path changed to `@rpath`. If any dependent libraries - # end up using `@rpath` (originally or due to rewrite), set the `rpath_required` boolean to True, so we know - # that we need to add our rpath. - changed_lib_paths = [] - rpath_required = False - for linked_lib in linked_libs: - # Leave system dynamic libraries unchanged. - if macholib.util.in_system_path(linked_lib): - continue - - # The older python.org builds that use system Tcl/Tk framework have their _tkinter.cpython-*-darwin.so - # library linked against /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl and - # /Library/Frameworks/Tk.framework/Versions/8.5/Tk, although the actual frameworks are located in - # /System/Library/Frameworks. Therefore, they slip through the above in_system_path() check, and we need to - # exempt them manually. - _exemptions = [ - '/Library/Frameworks/Tcl.framework/', - '/Library/Frameworks/Tk.framework/', - ] - if any([x in linked_lib for x in _exemptions]): - continue - - # This linked library will end up using `@rpath`, whether modified or not... - rpath_required = True - - new_path = str(pathlib.PurePath('@rpath') / pathlib.PurePath(linked_lib).name) - if linked_lib == new_path: - continue - - changed_lib_paths.append((linked_lib, new_path)) - - # Gather arguments for `install-name-tool` - install_name_tool_args = [] - - # Modify the dylib identifier if necessary - if normalized_dylib_id and normalized_dylib_id != dylib_id: - install_name_tool_args += ["-id", normalized_dylib_id] - - # Changed libs - for original_path, new_path in changed_lib_paths: - install_name_tool_args += ["-change", original_path, new_path] - - # Remove all existing rpaths except for the target rpath (if it already exists). `install_name_tool` disallows using - # `-delete_rpath` and `-add_rpath` with the same argument. - for rpath in rpaths: - if rpath == target_rpath: - continue - install_name_tool_args += [ - "-delete_rpath", - rpath, - ] - - # If any of linked libraries use @rpath now and our target rpath is not already added, add it. - # NOTE: @rpath in the dylib identifier does not actually require the rpath to be set on the binary... - if rpath_required and target_rpath not in rpaths: - install_name_tool_args += [ - "-add_rpath", - target_rpath, - ] - - # If we have no arguments, finish immediately. - if not install_name_tool_args: - return - - # Run `install_name_tool` - cmd_args = ["install_name_tool", *install_name_tool_args, filename] - p = subprocess.run(cmd_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8') - if p.returncode: - raise SystemError( - f"install_name_tool command ({cmd_args}) failed with error code {p.returncode}!\noutput: {p.stdout}" - ) - - -def is_framework_bundle_lib(lib_path): - """ - Check if the given shared library is part of a .framework bundle. - """ - - lib_path = pathlib.PurePath(lib_path) - - # For now, focus only on versioned layout, such as `QtCore.framework/Versions/5/QtCore` - if lib_path.parent.parent.name != "Versions": - return False - if lib_path.parent.parent.parent.name != lib_path.name + ".framework": - return False - - return True - - -def collect_files_from_framework_bundles(collected_files): - """ - Scan the given TOC list of collected files for shared libraries that are collected from macOS .framework bundles, - and collect the bundles' Info.plist files. Additionally, create/restore the following symbolic links: - - `Versions/Current` pointing to the `Versions/` directory containing the binary - - `` in the top-level .framework directory, pointing to `Versions/Current/` - - `Resources` in the top-level .framework directory, pointing to `Versions/Current/Resources` - - additional directories in top-level .framework directory, pointing to their counterparts in `Versions/Current` - directory. - - Returns updated TOC list with added entries for the discovered Info.plist files and generated symbolic links. - """ - invalid_framework_found = False - - framework_entries = set() # Additional TOC entries for collected files. Use set for de-duplication. - framework_paths = set() # Registered framework paths for 2nd pass. - framework_symlinked_dirs = set() # Symlinked directories for filtering in 3rd pass. - - # 1st pass: discover binaries from .framework bundles, and for each such binary: - # - collect `Info.plist` - # - create `Current` -> `` symlink in `.framework/Versions` directory. - # - create `.framework/` -> `.framework/Versions/Current/` symlink. - # - create `.framework/Resources` -> `.framework/Versions/Current/Resources` symlink. - for dest_name, src_name, typecode in collected_files: - if typecode != 'BINARY': - continue - - src_path = pathlib.Path(src_name) # /src/path/to/.framework/Versions// - dest_path = pathlib.PurePath(dest_name) # /dest/path/to/.framework/Versions// - - # Check whether binary originates from a .framework bundle - if not is_framework_bundle_lib(src_path): - continue - - # Check whether binary is also collected into a .framework bundle (i.e., the original layout is preserved) - if not is_framework_bundle_lib(dest_path): - continue - - # Assuming versioned layout, Info.plist should exist in Resources directory located next to the binary. - info_plist_src = src_path.parent / "Resources" / "Info.plist" - if not info_plist_src.is_file(): - # Alas, the .framework bundles shipped with PySide/PyQt might have Info.plist available only in the - # top-level Resources directory. So accommodate this scenario as well, but collect the file into - # versioned directory to appease the code-signing gods... - info_plist_src_top = src_path.parent.parent.parent / "Resources" / "Info.plist" - if not info_plist_src_top.is_file(): - # Strictly speaking, a .framework bundle without Info.plist is invalid. However, that did not prevent - # PyQt from shipping such Qt .framework bundles up until v5.14.1. So by default, we just complain via - # a warning message; if such binaries work in unfrozen python, they should also work in frozen - # application. The codesign will refuse to sign the .app bundle (if we are generating one), but there - # is nothing we can do about that. - invalid_framework_found = True - framework_dir = src_path.parent.parent.parent - if compat.strict_collect_mode: - raise SystemError(f"Could not find Info.plist in {framework_dir}!") - else: - logger.warning("Could not find Info.plist in %s!", framework_dir) - continue - info_plist_src = info_plist_src_top - info_plist_dest = dest_path.parent / "Resources" / "Info.plist" - framework_entries.add((str(info_plist_dest), str(info_plist_src), "DATA")) - - # Reconstruct the symlink Versions/Current -> Versions/. - # This one seems to be necessary for code signing, but might be absent from .framework bundles shipped with - # python packages (i.e., PyPI wheels that do not support symlinks). So we always create it ourselves. - framework_entries.add((str(dest_path.parent.parent / "Current"), str(dest_path.parent.name), "SYMLINK")) - framework_symlinked_dirs.add(dest_path.parent.parent / "Current") # Cleanup in 3rd pass - - dest_framework_path = dest_path.parent.parent.parent # Top-level .framework directory path. - - # Symlink the binary in the `Current` directory to the top-level .framework directory. - # If TOC also contains an entry for a hard-copy entry in the top-level directory, it will be replaced by this - # symlink entry due to how our TOC normalization works. - framework_entries.add(( - str(dest_framework_path / dest_path.name), - str(pathlib.PurePath("Versions/Current") / dest_path.name), - "SYMLINK", - )) - - # Ditto for the `Resources` directory. - framework_entries.add(( - str(dest_framework_path / "Resources"), - "Versions/Current/Resources", - "SYMLINK", - )) - framework_symlinked_dirs.add(dest_framework_path / "Resources") # Cleanup in 3rd pass - - # Register the framework parent path to use in additional directories scan in subsequent pass. - framework_paths.add(dest_framework_path) - - # 2nd pass: scan for additional collected directories from .framework bundles, and create symlinks to the top-level - # application directory. Make the outer loop go over the registered framework paths, so it becomes no-op if no - # framework paths are registered. - VALID_SUBDIRS = {'Documentation', 'Frameworks', 'Headers', 'Helpers', 'Libraries', 'Resources'} - - for dest_framework_path in framework_paths: - for dest_name, src_name, typecode in collected_files: - dest_path = pathlib.PurePath(dest_name) - - # Try matching against framework path - try: - remaining_path = dest_path.relative_to(dest_framework_path) - except ValueError: # dest_path is not subpath of dest_framework_path - continue - - remaining_path_parts = remaining_path.parts - - # We are interested only in entries under Versions directory. - if remaining_path_parts[0] != 'Versions': - continue - - # If the entry name is among valid sub-directory names, create symlink. - dir_name = remaining_path_parts[2] - if dir_name not in VALID_SUBDIRS: - continue - - framework_entries.add(( - str(dest_framework_path / dir_name), - str(pathlib.PurePath("Versions/Current") / dir_name), - "SYMLINK", - )) - framework_symlinked_dirs.add(dest_framework_path / dir_name) # Cleanup in 3rd pass - - # 3rd pass: remove TOC entries under directories for which we are trying to restore symbolic links. These may be - # present when a python package (i.e., a PyPI wheel) ships a .framework bundle where symlinks were mangled into hard - # copies (due to lack of support for symlinks in wheels) AND these hard copies are collected through use of - # `collect_data` / `collect_binaries` / `collect_all` (either by user or by a hook). - if framework_symlinked_dirs: - filtered_toc = [] - - for dest_name, src_name, typecode in collected_files: - dest_path = pathlib.PurePath(dest_name) - - if any(dest_parent in framework_symlinked_dirs for dest_parent in dest_path.parents): - continue # Inside symlinked directory; remove - - filtered_toc.append((dest_name, src_name, typecode)) - else: - filtered_toc = collected_files - - # If we encountered an invalid .framework bundle without Info.plist, warn the user that code-signing will most - # likely fail. - if invalid_framework_found: - logger.warning( - "One or more collected .framework bundles have missing Info.plist file. If you are building an .app " - "bundle, you will most likely not be able to code-sign it." - ) - - return filtered_toc + sorted(framework_entries) diff --git a/voxvera/vendor/PyInstaller/utils/run_tests.py b/voxvera/vendor/PyInstaller/utils/run_tests.py deleted file mode 100755 index c655c7a..0000000 --- a/voxvera/vendor/PyInstaller/utils/run_tests.py +++ /dev/null @@ -1,70 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -# ----------------------------------------------------------------------------- - -import argparse -import sys - -import pytest - -from PyInstaller.compat import importlib_metadata - - -def paths_to_test(include_only=None): - """ - If ``include_only`` is falsey, this functions returns paths from all entry points. Otherwise, this parameter - must be a string or sequence of strings. In this case, this function will return *only* paths from entry points - whose ``module_name`` begins with the provided string(s). - """ - # Convert a string to a list. - if isinstance(include_only, str): - include_only = [include_only] - - # Walk through all entry points. - test_path_list = [] - for entry_point in importlib_metadata.entry_points(group="pyinstaller40", name="tests"): - # Implement ``include_only``. - if ( - not include_only # If falsey, include everything, - # Otherwise, include only the specified modules. - or any(entry_point.module.startswith(name) for name in include_only) - ): - test_path_list += list(entry_point.load()()) - return test_path_list - - -# Run pytest on all tests registered by the PyInstaller setuptools testing entry point. If provided, -# the ``include_only`` argument is passed to ``path_to_test``. -def run_pytest(*args, **kwargs): - paths = paths_to_test(include_only=kwargs.pop("include_only", None)) - # Return an error code if no tests were discovered. - if not paths: - print("Error: no tests discovered.", file=sys.stderr) - # This indicates no tests were discovered; see - # https://docs.pytest.org/en/latest/usage.html#possible-exit-codes. - return 5 - else: - # See https://docs.pytest.org/en/latest/usage.html#calling-pytest-from-python-code. - # Omit ``args[0]``, which is the name of this script. - print("pytest " + " ".join([*paths, *args[1:]])) - return pytest.main([*paths, *args[1:]], **kwargs) - - -if __name__ == "__main__": - # Look only for the ``--include_only`` argument. - parser = argparse.ArgumentParser(description='Run PyInstaller packaging tests.') - parser.add_argument( - "--include_only", - action="append", - help="Only run tests from the specified package.", - ) - args, unknown = parser.parse_known_args(sys.argv) - # Convert the parsed args into a dict using ``vars(args)``. - sys.exit(run_pytest(*unknown, **vars(args))) diff --git a/voxvera/vendor/PyInstaller/utils/tests.py b/voxvera/vendor/PyInstaller/utils/tests.py deleted file mode 100755 index 4a0b9c7..0000000 --- a/voxvera/vendor/PyInstaller/utils/tests.py +++ /dev/null @@ -1,112 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Decorators for skipping PyInstaller tests when specific requirements are not met. -""" - -import inspect -import sys -import textwrap - -import pytest - -from PyInstaller.utils.hooks import check_requirement - -# Wrap some pytest decorators to be consistent in tests. -parametrize = pytest.mark.parametrize -skipif = pytest.mark.skipif -xfail = pytest.mark.xfail -skip = pytest.mark.skip - -# Use these decorators to use the `pyi_builder` fixture only in onedir or only in onefile mode instead of both. -onedir_only = pytest.mark.parametrize('pyi_builder', ['onedir'], indirect=True) -onefile_only = pytest.mark.parametrize('pyi_builder', ['onefile'], indirect=True) - - -def importorskip(package: str): - """ - Skip a decorated test if **package** is not importable. - - Arguments: - package: - The name of the module. May be anything that is allowed after the ``import`` keyword. e.g. 'numpy' or - 'PIL.Image'. - Returns: - A pytest marker which either skips the test or does nothing. - - This function intentionally does not import the module. Doing so can lead to `sys.path` and `PATH` being - polluted, which then breaks later builds. - """ - if not importable(package): - return pytest.mark.skip(f"Can't import '{package}'.") - return pytest.mark.skipif(False, reason=f"Don't skip: '{package}' is importable.") - - -def importable(package: str): - from importlib.util import find_spec - - # The find_spec() function is used by the importlib machinery to locate a module to import. Using it finds the - # module but does not run it. Unfortunately, it does import parent modules to check submodules. - if "." in package: - # Using subprocesses is slow. If the top level module doesn't exist then we can skip it. - if not importable(package.split(".")[0]): - return False - # This is a submodule, import it in isolation. - from subprocess import DEVNULL, run - return run([sys.executable, "-c", "import " + package], stdout=DEVNULL, stderr=DEVNULL).returncode == 0 - - return find_spec(package) is not None - - -def requires(requirement: str): - """ - Mark a test to be skipped if **requirement** is not satisfied. - - Args: - requirement: - A distribution name and optional version specifier(s). See :func:`PyInstaller.utils.hooks.check_requirement` - which this argument is forwarded to. - Returns: - Either a skip marker or a dummy marker. - - This function operates on distribution metadata, and does not import any modules. - """ - if check_requirement(requirement): - return pytest.mark.skipif(False, reason=f"Don't skip: '{requirement}' is satisfied.") - else: - return pytest.mark.skip(f"Requires {requirement}.") - - -def gen_sourcefile(tmp_path, source, test_id=None): - """ - Generate a source file for testing. - - The source will be written into a file named like the test-function. This file will then be passed to - `test_script`. If you need other related file, e.g. as `.toc`-file for testing the content, put it at at the - normal place. Just mind to take the basnename from the test-function's name. - - :param script: Source code to create executable from. This will be saved into a temporary file which is then - passed on to `test_script`. - - :param test_id: Test-id for parametrized tests. If given, it will be appended to the script filename, - separated by two underscores. - """ - testname = inspect.stack()[1][3] - if test_id: - # For parametrized test append the test-id. - testname = testname + '__' + test_id - - # Periods are not allowed in Python module names. - testname = testname.replace('.', '_') - scriptfile = tmp_path / (testname + '.py') - source = textwrap.dedent(source) - scriptfile.write_text(source, encoding='utf-8') - return scriptfile diff --git a/voxvera/vendor/PyInstaller/utils/win32/__init__.py b/voxvera/vendor/PyInstaller/utils/win32/__init__.py deleted file mode 100755 index a7501ae..0000000 --- a/voxvera/vendor/PyInstaller/utils/win32/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__author__ = 'martin' diff --git a/voxvera/vendor/PyInstaller/utils/win32/icon.py b/voxvera/vendor/PyInstaller/utils/win32/icon.py deleted file mode 100755 index 7b703f8..0000000 --- a/voxvera/vendor/PyInstaller/utils/win32/icon.py +++ /dev/null @@ -1,251 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -The code in this module supports the --icon parameter on Windows. -(For --icon support under macOS, see building/osx.py.) - -The only entry point, called from api.py, is CopyIcons(), below. All the elaborate structure of classes that follows -is used to support the operation of CopyIcons_FromIco(). None of these classes and globals are referenced outside -this module. -""" - -import os -import os.path -import struct - -import PyInstaller.log as logging -from PyInstaller import config -from PyInstaller.compat import pywintypes, win32api -from PyInstaller.building.icon import normalize_icon_type - -logger = logging.getLogger(__name__) - -RT_ICON = 3 -RT_GROUP_ICON = 14 -LOAD_LIBRARY_AS_DATAFILE = 2 - - -class Structure: - def __init__(self): - size = self._sizeInBytes = struct.calcsize(self._format_) - self._fields_ = list(struct.unpack(self._format_, b'\000' * size)) - indexes = self._indexes_ = {} - for i, nm in enumerate(self._names_): - indexes[nm] = i - - def dump(self): - logger.info("DUMP of %s", self) - for name in self._names_: - if not name.startswith('_'): - logger.info("%20s = %s", name, getattr(self, name)) - logger.info("") - - def __getattr__(self, name): - if name in self._names_: - index = self._indexes_[name] - return self._fields_[index] - try: - return self.__dict__[name] - except KeyError as e: - raise AttributeError(name) from e - - def __setattr__(self, name, value): - if name in self._names_: - index = self._indexes_[name] - self._fields_[index] = value - else: - self.__dict__[name] = value - - def tostring(self): - return struct.pack(self._format_, *self._fields_) - - def fromfile(self, file): - data = file.read(self._sizeInBytes) - self._fields_ = list(struct.unpack(self._format_, data)) - - -class ICONDIRHEADER(Structure): - _names_ = "idReserved", "idType", "idCount" - _format_ = "hhh" - - -class ICONDIRENTRY(Structure): - _names_ = ("bWidth", "bHeight", "bColorCount", "bReserved", "wPlanes", "wBitCount", "dwBytesInRes", "dwImageOffset") - _format_ = "bbbbhhii" - - -class GRPICONDIR(Structure): - _names_ = "idReserved", "idType", "idCount" - _format_ = "hhh" - - -class GRPICONDIRENTRY(Structure): - _names_ = ("bWidth", "bHeight", "bColorCount", "bReserved", "wPlanes", "wBitCount", "dwBytesInRes", "nID") - _format_ = "bbbbhhih" - - -# An IconFile instance is created for each .ico file given. -class IconFile: - def __init__(self, path): - self.path = path - try: - # The path is from the user parameter, don't trust it. - file = open(self.path, "rb") - except OSError: - # The icon file can't be opened for some reason. Stop the - # program with an informative message. - raise SystemExit(f'ERROR: Unable to open icon file {self.path}!') - with file: - self.entries = [] - self.images = [] - header = self.header = ICONDIRHEADER() - header.fromfile(file) - for i in range(header.idCount): - entry = ICONDIRENTRY() - entry.fromfile(file) - self.entries.append(entry) - for e in self.entries: - file.seek(e.dwImageOffset, 0) - self.images.append(file.read(e.dwBytesInRes)) - - def grp_icon_dir(self): - return self.header.tostring() - - def grp_icondir_entries(self, id=1): - data = b'' - for entry in self.entries: - e = GRPICONDIRENTRY() - for n in e._names_[:-1]: - setattr(e, n, getattr(entry, n)) - e.nID = id - id = id + 1 - data = data + e.tostring() - return data - - -def CopyIcons_FromIco(dstpath, srcpath, id=1): - """ - Use the Win API UpdateResource facility to apply the icon resource(s) to the .exe file. - - :param str dstpath: absolute path of the .exe file being built. - :param str srcpath: list of 1 or more .ico file paths - """ - icons = map(IconFile, srcpath) - logger.debug("Copying icons from %s", srcpath) - - hdst = win32api.BeginUpdateResource(dstpath, 0) - - iconid = 1 - # Each step in the following enumerate() will instantiate an IconFile object, as a result of deferred execution - # of the map() above. - for i, f in enumerate(icons): - data = f.grp_icon_dir() - data = data + f.grp_icondir_entries(iconid) - win32api.UpdateResource(hdst, RT_GROUP_ICON, i + 1, data) - logger.debug("Writing RT_GROUP_ICON %d resource with %d bytes", i + 1, len(data)) - for data in f.images: - win32api.UpdateResource(hdst, RT_ICON, iconid, data) - logger.debug("Writing RT_ICON %d resource with %d bytes", iconid, len(data)) - iconid = iconid + 1 - - win32api.EndUpdateResource(hdst, 0) - - -def CopyIcons(dstpath, srcpath): - """ - Called from building/api.py to handle icons. If the input was by --icon on the command line, srcpath is a single - string. However, it is possible to modify the spec file adding icon=['foo.ico','bar.ico'] to the EXE() statement. - In that case, srcpath is a list of strings. - - The string format is either path-to-.ico or path-to-.exe,n for n an integer resource index in the .exe. In either - case, the path can be relative or absolute. - """ - - if isinstance(srcpath, (str, os.PathLike)): - # Just a single string, make it a one-element list. - srcpath = [srcpath] - # Convert possible PathLike elements to strings to allow the splitter function to work. - srcpath = [str(path) for path in srcpath] - - def splitter(s): - """ - Convert "pathname" to tuple ("pathname", None) - Convert "pathname,n" to tuple ("pathname", n) - """ - try: - srcpath, index = s.split(',') - return srcpath.strip(), int(index) - except ValueError: - return s, None - - # split all the items in the list into tuples as above. - srcpath = list(map(splitter, srcpath)) - - if len(srcpath) > 1: - # More than one icon source given. We currently handle multiple icons by calling CopyIcons_FromIco(), which only - # allows .ico, but will convert to that format if needed. - # - # Note that a ",index" on a .ico is just ignored in the single or multiple case. - srcs = [] - for s in srcpath: - srcs.append(normalize_icon_type(s[0], ("ico",), "ico", config.CONF["workpath"])) - return CopyIcons_FromIco(dstpath, srcs) - - # Just one source given. - srcpath, index = srcpath[0] - - # Makes sure the icon exists and attempts to convert to the proper format if applicable - srcpath = normalize_icon_type(srcpath, ("exe", "ico"), "ico", config.CONF["workpath"]) - - srcext = os.path.splitext(srcpath)[1] - - # Handle the simple case of foo.ico, ignoring any index. - if srcext.lower() == '.ico': - return CopyIcons_FromIco(dstpath, [srcpath]) - - # Single source is not .ico, presumably it is .exe (and if not, some error will occur). - if index is not None: - logger.debug("Copying icon from %s, %d", srcpath, index) - else: - logger.debug("Copying icons from %s", srcpath) - - try: - # Attempt to load the .ico or .exe containing the icon into memory using the same mechanism as if it were a DLL. - # If this fails for any reason (for example if the file does not exist or is not a .ico/.exe) then LoadLibraryEx - # returns a null handle and win32api raises a unique exception with a win error code and a string. - hsrc = win32api.LoadLibraryEx(srcpath, 0, LOAD_LIBRARY_AS_DATAFILE) - except pywintypes.error as W32E: - # We could continue with no icon (i.e., just return), but it seems best to terminate the build with a message. - raise SystemExit( - "ERROR: Unable to load icon file {}\n {} (Error code {})".format(srcpath, W32E.strerror, W32E.winerror) - ) - hdst = win32api.BeginUpdateResource(dstpath, 0) - if index is None: - grpname = win32api.EnumResourceNames(hsrc, RT_GROUP_ICON)[0] - elif index >= 0: - grpname = win32api.EnumResourceNames(hsrc, RT_GROUP_ICON)[index] - else: - grpname = -index - data = win32api.LoadResource(hsrc, RT_GROUP_ICON, grpname) - win32api.UpdateResource(hdst, RT_GROUP_ICON, grpname, data) - for iconname in win32api.EnumResourceNames(hsrc, RT_ICON): - data = win32api.LoadResource(hsrc, RT_ICON, iconname) - win32api.UpdateResource(hdst, RT_ICON, iconname, data) - win32api.FreeLibrary(hsrc) - win32api.EndUpdateResource(hdst, 0) - - -if __name__ == "__main__": - import sys - - dstpath = sys.argv[1] - srcpath = sys.argv[2:] - CopyIcons(dstpath, srcpath) diff --git a/voxvera/vendor/PyInstaller/utils/win32/versioninfo.py b/voxvera/vendor/PyInstaller/utils/win32/versioninfo.py deleted file mode 100755 index b290644..0000000 --- a/voxvera/vendor/PyInstaller/utils/win32/versioninfo.py +++ /dev/null @@ -1,604 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - -import struct - -import pefile - -from PyInstaller.compat import win32api - - -def pefile_check_control_flow_guard(filename): - """ - Checks if the specified PE file has CFG (Control Flow Guard) enabled. - - Parameters - ---------- - filename : str - Path to the PE file to inspect. - - Returns - ---------- - bool - True if file is a PE file with CFG enabled. False if CFG is not enabled or if file could not be processed using - the pefile library. - """ - try: - pe = pefile.PE(filename, fast_load=True) - # https://docs.microsoft.com/en-us/windows/win32/debug/pe-format - # IMAGE_DLLCHARACTERISTICS_GUARD_CF = 0x4000 - return bool(pe.OPTIONAL_HEADER.DllCharacteristics & 0x4000) - except Exception: - return False - - -# Ensures no code from the executable is executed. -LOAD_LIBRARY_AS_DATAFILE = 2 - - -def getRaw(text): - """ - Encodes text as UTF-16LE (Microsoft 'Unicode') for use in structs. - """ - return text.encode('UTF-16LE') - - -def read_version_info_from_executable(exe_filename): - """ - Read the version information structure from the given executable's resources, and return it as an instance of - `VSVersionInfo` structure. - """ - h = win32api.LoadLibraryEx(exe_filename, 0, LOAD_LIBRARY_AS_DATAFILE) - res = win32api.EnumResourceNames(h, pefile.RESOURCE_TYPE['RT_VERSION']) - if not len(res): - return None - data = win32api.LoadResource(h, pefile.RESOURCE_TYPE['RT_VERSION'], res[0]) - info = VSVersionInfo() - info.fromRaw(data) - win32api.FreeLibrary(h) - return info - - -def nextDWord(offset): - """ - Align `offset` to the next 4-byte boundary. - """ - return ((offset + 3) >> 2) << 2 - - -class VSVersionInfo: - """ - WORD wLength; // length of the VS_VERSION_INFO structure - WORD wValueLength; // length of the Value member - WORD wType; // 1 means text, 0 means binary - WCHAR szKey[]; // Contains the Unicode string "VS_VERSION_INFO". - WORD Padding1[]; - VS_FIXEDFILEINFO Value; - WORD Padding2[]; - WORD Children[]; // zero or more StringFileInfo or VarFileInfo - // structures (or both) that are children of the - // current version structure. - """ - def __init__(self, ffi=None, kids=None): - self.ffi = ffi - self.kids = kids or [] - - def fromRaw(self, data): - i, (sublen, vallen, wType, nm) = parseCommon(data) - #vallen is length of the ffi, typ is 0, nm is 'VS_VERSION_INFO'. - i = nextDWord(i) - # Now a VS_FIXEDFILEINFO - self.ffi = FixedFileInfo() - j = self.ffi.fromRaw(data, i) - i = j - while i < sublen: - j = i - i, (csublen, cvallen, ctyp, nm) = parseCommon(data, i) - if nm.strip() == 'StringFileInfo': - sfi = StringFileInfo() - k = sfi.fromRaw(csublen, cvallen, nm, data, i, j + csublen) - self.kids.append(sfi) - i = k - else: - vfi = VarFileInfo() - k = vfi.fromRaw(csublen, cvallen, nm, data, i, j + csublen) - self.kids.append(vfi) - i = k - i = j + csublen - i = nextDWord(i) - return i - - def toRaw(self): - raw_name = getRaw('VS_VERSION_INFO') - rawffi = self.ffi.toRaw() - vallen = len(rawffi) - typ = 0 - sublen = 6 + len(raw_name) + 2 - pad = b'' - if sublen % 4: - pad = b'\000\000' - sublen = sublen + len(pad) + vallen - pad2 = b'' - if sublen % 4: - pad2 = b'\000\000' - tmp = b''.join([kid.toRaw() for kid in self.kids]) - sublen = sublen + len(pad2) + len(tmp) - return struct.pack('HHH', sublen, vallen, typ) + raw_name + b'\000\000' + pad + rawffi + pad2 + tmp - - def __eq__(self, other): - return self.toRaw() == other - - def __str__(self, indent=''): - indent = indent + ' ' - tmp = [kid.__str__(indent + ' ') for kid in self.kids] - tmp = ', \n'.join(tmp) - return '\n'.join([ - "# UTF-8", - "#", - "# For more details about fixed file info 'ffi' see:", - "# http://msdn.microsoft.com/en-us/library/ms646997.aspx", - "VSVersionInfo(", - indent + f"ffi={self.ffi.__str__(indent)},", - indent + "kids=[", - tmp, - indent + "]", - ")", - ]) - - def __repr__(self): - return "versioninfo.VSVersionInfo(ffi=%r, kids=%r)" % (self.ffi, self.kids) - - -def parseCommon(data, start=0): - i = start + 6 - (wLength, wValueLength, wType) = struct.unpack('3H', data[start:i]) - i, text = parseUString(data, i, i + wLength) - return i, (wLength, wValueLength, wType, text) - - -def parseUString(data, start, limit): - i = start - while i < limit: - if data[i:i + 2] == b'\000\000': - break - i += 2 - text = data[start:i].decode('UTF-16LE') - i += 2 - return i, text - - -class FixedFileInfo: - """ - DWORD dwSignature; //Contains the value 0xFEEFO4BD - DWORD dwStrucVersion; // binary version number of this structure. - // The high-order word of this member contains - // the major version number, and the low-order - // word contains the minor version number. - DWORD dwFileVersionMS; // most significant 32 bits of the file's binary - // version number - DWORD dwFileVersionLS; // - DWORD dwProductVersionMS; // most significant 32 bits of the binary version - // number of the product with which this file was - // distributed - DWORD dwProductVersionLS; // - DWORD dwFileFlagsMask; // bitmask that specifies the valid bits in - // dwFileFlags. A bit is valid only if it was - // defined when the file was created. - DWORD dwFileFlags; // VS_FF_DEBUG, VS_FF_PATCHED etc. - DWORD dwFileOS; // VOS_NT, VOS_WINDOWS32 etc. - DWORD dwFileType; // VFT_APP etc. - DWORD dwFileSubtype; // 0 unless VFT_DRV or VFT_FONT or VFT_VXD - DWORD dwFileDateMS; - DWORD dwFileDateLS; - """ - def __init__( - self, - filevers=(0, 0, 0, 0), - prodvers=(0, 0, 0, 0), - mask=0x3f, - flags=0x0, - OS=0x40004, - fileType=0x1, - subtype=0x0, - date=(0, 0) - ): - self.sig = 0xfeef04bd - self.strucVersion = 0x10000 - self.fileVersionMS = (filevers[0] << 16) | (filevers[1] & 0xffff) - self.fileVersionLS = (filevers[2] << 16) | (filevers[3] & 0xffff) - self.productVersionMS = (prodvers[0] << 16) | (prodvers[1] & 0xffff) - self.productVersionLS = (prodvers[2] << 16) | (prodvers[3] & 0xffff) - self.fileFlagsMask = mask - self.fileFlags = flags - self.fileOS = OS - self.fileType = fileType - self.fileSubtype = subtype - self.fileDateMS = date[0] - self.fileDateLS = date[1] - - def fromRaw(self, data, i): - ( - self.sig, - self.strucVersion, - self.fileVersionMS, - self.fileVersionLS, - self.productVersionMS, - self.productVersionLS, - self.fileFlagsMask, - self.fileFlags, - self.fileOS, - self.fileType, - self.fileSubtype, - self.fileDateMS, - self.fileDateLS, - ) = struct.unpack('13L', data[i:i + 52]) - return i + 52 - - def toRaw(self): - return struct.pack( - '13L', - self.sig, - self.strucVersion, - self.fileVersionMS, - self.fileVersionLS, - self.productVersionMS, - self.productVersionLS, - self.fileFlagsMask, - self.fileFlags, - self.fileOS, - self.fileType, - self.fileSubtype, - self.fileDateMS, - self.fileDateLS, - ) - - def __eq__(self, other): - return self.toRaw() == other - - def __str__(self, indent=''): - fv = ( - self.fileVersionMS >> 16, self.fileVersionMS & 0xffff, - self.fileVersionLS >> 16, self.fileVersionLS & 0xffff, - ) # yapf: disable - pv = ( - self.productVersionMS >> 16, self.productVersionMS & 0xffff, - self.productVersionLS >> 16, self.productVersionLS & 0xffff, - ) # yapf: disable - fd = (self.fileDateMS, self.fileDateLS) - tmp = [ - 'FixedFileInfo(', - '# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)', - '# Set not needed items to zero 0.', - 'filevers=%s,' % (fv,), - 'prodvers=%s,' % (pv,), - "# Contains a bitmask that specifies the valid bits 'flags'r", - 'mask=%s,' % hex(self.fileFlagsMask), - '# Contains a bitmask that specifies the Boolean attributes of the file.', - 'flags=%s,' % hex(self.fileFlags), - '# The operating system for which this file was designed.', - '# 0x4 - NT and there is no need to change it.', - 'OS=%s,' % hex(self.fileOS), - '# The general type of file.', - '# 0x1 - the file is an application.', - 'fileType=%s,' % hex(self.fileType), - '# The function of the file.', - '# 0x0 - the function is not defined for this fileType', - 'subtype=%s,' % hex(self.fileSubtype), - '# Creation date and time stamp.', - 'date=%s' % (fd,), - ')', - ] - return f'\n{indent} '.join(tmp) - - def __repr__(self): - fv = ( - self.fileVersionMS >> 16, self.fileVersionMS & 0xffff, - self.fileVersionLS >> 16, self.fileVersionLS & 0xffff, - ) # yapf: disable - pv = ( - self.productVersionMS >> 16, self.productVersionMS & 0xffff, - self.productVersionLS >> 16, self.productVersionLS & 0xffff, - ) # yapf: disable - fd = (self.fileDateMS, self.fileDateLS) - return ( - 'versioninfo.FixedFileInfo(filevers=%r, prodvers=%r, ' - 'mask=0x%x, flags=0x%x, OS=0x%x, ' - 'fileType=%r, subtype=0x%x, date=%r)' % - (fv, pv, self.fileFlagsMask, self.fileFlags, self.fileOS, self.fileType, self.fileSubtype, fd) - ) - - -class StringFileInfo: - """ - WORD wLength; // length of the version resource - WORD wValueLength; // length of the Value member in the current - // VS_VERSION_INFO structure - WORD wType; // 1 means text, 0 means binary - WCHAR szKey[]; // Contains the Unicode string 'StringFileInfo'. - WORD Padding[]; - StringTable Children[]; // list of zero or more String structures - """ - def __init__(self, kids=None): - self.name = 'StringFileInfo' - self.kids = kids or [] - - def fromRaw(self, sublen, vallen, name, data, i, limit): - self.name = name - while i < limit: - st = StringTable() - j = st.fromRaw(data, i, limit) - self.kids.append(st) - i = j - return i - - def toRaw(self): - raw_name = getRaw(self.name) - vallen = 0 - typ = 1 - sublen = 6 + len(raw_name) + 2 - pad = b'' - if sublen % 4: - pad = b'\000\000' - tmp = b''.join([kid.toRaw() for kid in self.kids]) - sublen = sublen + len(pad) + len(tmp) - return struct.pack('HHH', sublen, vallen, typ) + raw_name + b'\000\000' + pad + tmp - - def __eq__(self, other): - return self.toRaw() == other - - def __str__(self, indent=''): - new_indent = indent + ' ' - tmp = ', \n'.join(kid.__str__(new_indent) for kid in self.kids) - return f'{indent}StringFileInfo(\n{new_indent}[\n{tmp}\n{new_indent}])' - - def __repr__(self): - return 'versioninfo.StringFileInfo(%r)' % self.kids - - -class StringTable: - """ - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[]; - String Children[]; // list of zero or more String structures. - """ - def __init__(self, name=None, kids=None): - self.name = name or '' - self.kids = kids or [] - - def fromRaw(self, data, i, limit): - i, (cpsublen, cpwValueLength, cpwType, self.name) = parseCodePage(data, i, limit) # should be code page junk - i = nextDWord(i) - while i < limit: - ss = StringStruct() - j = ss.fromRaw(data, i, limit) - i = j - self.kids.append(ss) - i = nextDWord(i) - return i - - def toRaw(self): - raw_name = getRaw(self.name) - vallen = 0 - typ = 1 - sublen = 6 + len(raw_name) + 2 - tmp = [] - for kid in self.kids: - raw = kid.toRaw() - if len(raw) % 4: - raw = raw + b'\000\000' - tmp.append(raw) - tmp = b''.join(tmp) - sublen += len(tmp) - return struct.pack('HHH', sublen, vallen, typ) + raw_name + b'\000\000' + tmp - - def __eq__(self, other): - return self.toRaw() == other - - def __str__(self, indent=''): - new_indent = indent + ' ' - tmp = (',\n' + new_indent).join(str(kid) for kid in self.kids) - return f"{indent}StringTable(\n{new_indent}'{self.name}',\n{new_indent}[{tmp}])" - - def __repr__(self): - return 'versioninfo.StringTable(%r, %r)' % (self.name, self.kids) - - -class StringStruct: - """ - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[]; - WORD Padding[]; - String Value[]; - """ - def __init__(self, name=None, val=None): - self.name = name or '' - self.val = val or '' - - def fromRaw(self, data, i, limit): - i, (sublen, vallen, typ, self.name) = parseCommon(data, i) - limit = i + sublen - i = nextDWord(i) - i, self.val = parseUString(data, i, limit) - return i - - def toRaw(self): - raw_name = getRaw(self.name) - raw_val = getRaw(self.val) - # TODO: document the size of vallen and sublen. - vallen = len(self.val) + 1 # Number of (wide-)characters, not bytes! - typ = 1 - sublen = 6 + len(raw_name) + 2 - pad = b'' - if sublen % 4: - pad = b'\000\000' - sublen = sublen + len(pad) + (vallen * 2) - return struct.pack('HHH', sublen, vallen, typ) + raw_name + b'\000\000' + pad + raw_val + b'\000\000' - - def __eq__(self, other): - return self.toRaw() == other - - def __str__(self, indent=''): - return "StringStruct(%r, %r)" % (self.name, self.val) - - def __repr__(self): - return 'versioninfo.StringStruct(%r, %r)' % (self.name, self.val) - - -def parseCodePage(data, i, limit): - i, (sublen, wValueLength, wType, nm) = parseCommon(data, i) - return i, (sublen, wValueLength, wType, nm) - - -class VarFileInfo: - """ - WORD wLength; // length of the version resource - WORD wValueLength; // length of the Value member in the current - // VS_VERSION_INFO structure - WORD wType; // 1 means text, 0 means binary - WCHAR szKey[]; // Contains the Unicode string 'VarFileInfo'. - WORD Padding[]; - Var Children[]; // list of zero or more Var structures - """ - def __init__(self, kids=None): - self.kids = kids or [] - - def fromRaw(self, sublen, vallen, name, data, i, limit): - self.sublen = sublen - self.vallen = vallen - self.name = name - i = nextDWord(i) - while i < limit: - vs = VarStruct() - j = vs.fromRaw(data, i, limit) - self.kids.append(vs) - i = j - return i - - def toRaw(self): - self.vallen = 0 - self.wType = 1 - self.name = 'VarFileInfo' - raw_name = getRaw(self.name) - sublen = 6 + len(raw_name) + 2 - pad = b'' - if sublen % 4: - pad = b'\000\000' - tmp = b''.join([kid.toRaw() for kid in self.kids]) - self.sublen = sublen + len(pad) + len(tmp) - return struct.pack('HHH', self.sublen, self.vallen, self.wType) + raw_name + b'\000\000' + pad + tmp - - def __eq__(self, other): - return self.toRaw() == other - - def __str__(self, indent=''): - return indent + "VarFileInfo([%s])" % ', '.join(str(kid) for kid in self.kids) - - def __repr__(self): - return 'versioninfo.VarFileInfo(%r)' % self.kids - - -class VarStruct: - """ - WORD wLength; // length of the version resource - WORD wValueLength; // length of the Value member in the current - // VS_VERSION_INFO structure - WORD wType; // 1 means text, 0 means binary - WCHAR szKey[]; // Contains the Unicode string 'Translation' - // or a user-defined key string value - WORD Padding[]; // - WORD Value[]; // list of one or more values that are language - // and code-page identifiers - """ - def __init__(self, name=None, kids=None): - self.name = name or '' - self.kids = kids or [] - - def fromRaw(self, data, i, limit): - i, (self.sublen, self.wValueLength, self.wType, self.name) = parseCommon(data, i) - i = nextDWord(i) - for j in range(0, self.wValueLength, 2): - kid = struct.unpack('H', data[i:i + 2])[0] - self.kids.append(kid) - i += 2 - return i - - def toRaw(self): - self.wValueLength = len(self.kids) * 2 - self.wType = 0 - raw_name = getRaw(self.name) - sublen = 6 + len(raw_name) + 2 - pad = b'' - if sublen % 4: - pad = b'\000\000' - self.sublen = sublen + len(pad) + self.wValueLength - tmp = b''.join([struct.pack('H', kid) for kid in self.kids]) - return struct.pack('HHH', self.sublen, self.wValueLength, self.wType) + raw_name + b'\000\000' + pad + tmp - - def __eq__(self, other): - return self.toRaw() == other - - def __str__(self, indent=''): - return "VarStruct('%s', %r)" % (self.name, self.kids) - - def __repr__(self): - return 'versioninfo.VarStruct(%r, %r)' % (self.name, self.kids) - - -def load_version_info_from_text_file(filename): - """ - Load the `VSVersionInfo` structure from its string-based (`VSVersionInfo.__str__`) serialization by reading the - text from the file and running it through `eval()`. - """ - - # Read and parse the version file. It may have a byte order marker or encoding cookie - respect it if it does. - import PyInstaller.utils.misc as miscutils - with open(filename, 'rb') as fp: - text = miscutils.decode(fp.read()) - - # Deserialize via eval() - try: - info = eval(text) - except Exception as e: - raise ValueError("Failed to deserialize VSVersionInfo from text-based representation!") from e - - # Sanity check - assert isinstance(info, VSVersionInfo), \ - f"Loaded incompatible structure type! Expected VSVersionInfo, got: {type(info)!r}" - - return info - - -def write_version_info_to_executable(exe_filename, info): - assert isinstance(info, VSVersionInfo) - - # Remember overlay - pe = pefile.PE(exe_filename, fast_load=True) - overlay_before = pe.get_overlay() - pe.close() - - hdst = win32api.BeginUpdateResource(exe_filename, 0) - win32api.UpdateResource(hdst, pefile.RESOURCE_TYPE['RT_VERSION'], 1, info.toRaw()) - win32api.EndUpdateResource(hdst, 0) - - if overlay_before: - # Check if the overlay is still present - pe = pefile.PE(exe_filename, fast_load=True) - overlay_after = pe.get_overlay() - pe.close() - - # If the update removed the overlay data, re-append it - if not overlay_after: - with open(exe_filename, 'ab') as exef: - exef.write(overlay_before) diff --git a/voxvera/vendor/PyInstaller/utils/win32/winmanifest.py b/voxvera/vendor/PyInstaller/utils/win32/winmanifest.py deleted file mode 100755 index 1d338df..0000000 --- a/voxvera/vendor/PyInstaller/utils/win32/winmanifest.py +++ /dev/null @@ -1,244 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -import xml.dom -import xml.dom.minidom - -#- Relevant constants from Windows headers -# Manifest resource code -RT_MANIFEST = 24 - -# Resource IDs (names) for manifest. -# See: https://www.gamedev.net/blogs/entry/2154553-manifest-embedding-and-activation -CREATEPROCESS_MANIFEST_RESOURCE_ID = 1 -ISOLATIONAWARE_MANIFEST_RESOURCE_ID = 2 - -LANG_NEUTRAL = 0 - -#- Default application manifest template, based on the one found in python executable. - -_DEFAULT_MANIFEST_XML = \ -b""" - - - - - - - - - - - - - - - - - - - - true - - - - - - - - -""" # noqa: E122,E501 - -#- DOM navigation helpers - - -def _find_elements_by_tag(root, tag): - """ - Find all elements with given tag under the given root element. - """ - return [node for node in root.childNodes if node.nodeType == xml.dom.Node.ELEMENT_NODE and node.tagName == tag] - - -def _find_element_by_tag(root, tag): - """ - Attempt to find a single element with given tag under the given root element, and return None if no such element - is found. Raises an error if multiple elements are found. - """ - elements = _find_elements_by_tag(root, tag) - if len(elements) > 1: - raise ValueError(f"Expected a single {tag!r} element, found {len(elements)} element(s)!") - if not elements: - return None - return elements[0] - - -#- Application manifest modification helpers - - -def _set_execution_level(manifest_dom, root_element, uac_admin=False, uac_uiaccess=False): - """ - Find -> -> element, and set its `level` and `uiAccess` - attributes based on supplied arguments. Create the XML elements if necessary, as they are optional. - """ - - # - trust_info_element = _find_element_by_tag(root_element, "trustInfo") - if not trust_info_element: - trust_info_element = manifest_dom.createElement("trustInfo") - trust_info_element.setAttribute("xmlns", "urn:schemas-microsoft-com:asm.v3") - root_element.appendChild(trust_info_element) - - # - security_element = _find_element_by_tag(trust_info_element, "security") - if not security_element: - security_element = manifest_dom.createElement("security") - trust_info_element.appendChild(security_element) - - # - requested_privileges_element = _find_element_by_tag(security_element, "requestedPrivileges") - if not requested_privileges_element: - requested_privileges_element = manifest_dom.createElement("requestedPrivileges") - security_element.appendChild(requested_privileges_element) - - # - requested_execution_level_element = _find_element_by_tag(requested_privileges_element, "requestedExecutionLevel") - if not requested_execution_level_element: - requested_execution_level_element = manifest_dom.createElement("requestedExecutionLevel") - requested_privileges_element.appendChild(requested_execution_level_element) - - requested_execution_level_element.setAttribute("level", "requireAdministrator" if uac_admin else "asInvoker") - requested_execution_level_element.setAttribute("uiAccess", "true" if uac_uiaccess else "false") - - -def _ensure_common_controls_dependency(manifest_dom, root_element): - """ - Scan elements for the one whose < -> corresponds to the - `Microsoft.Windows.Common-Controls`. If found, overwrite its properties. If not, create new - element with corresponding sub-elements and attributes. - """ - - # - dependency_elements = _find_elements_by_tag(root_element, "dependency") - for dependency_element in dependency_elements: - # - dependent_assembly_element = _find_element_by_tag(dependency_element, "dependentAssembly") - # - assembly_identity_element = _find_element_by_tag(dependent_assembly_element, "assemblyIdentity") - # Check the name attribute - if assembly_identity_element.attributes["name"].value == "Microsoft.Windows.Common-Controls": - common_controls_element = assembly_identity_element - break - else: - # Create - dependency_element = manifest_dom.createElement("dependency") - root_element.appendChild(dependency_element) - # Create - dependent_assembly_element = manifest_dom.createElement("dependentAssembly") - dependency_element.appendChild(dependent_assembly_element) - # Create - common_controls_element = manifest_dom.createElement("assemblyIdentity") - dependent_assembly_element.appendChild(common_controls_element) - - common_controls_element.setAttribute("type", "win32") - common_controls_element.setAttribute("name", "Microsoft.Windows.Common-Controls") - common_controls_element.setAttribute("version", "6.0.0.0") - common_controls_element.setAttribute("processorArchitecture", "*") - common_controls_element.setAttribute("publicKeyToken", "6595b64144ccf1df") - common_controls_element.setAttribute("language", "*") - - -def create_application_manifest(manifest_xml=None, uac_admin=False, uac_uiaccess=False): - """ - Create application manifest, from built-in or custom manifest XML template. If provided, `manifest_xml` must be - a string or byte string containing XML source. The returned manifest is a byte string, encoded in UTF-8. - - This function sets the attributes of `requestedExecutionLevel` based on provided `uac_admin` and `auc_uiacces` - arguments (creating the parent elements in the XML, if necessary). It also scans `dependency` elements for the - entry corresponding to `Microsoft.Windows.Common-Controls` and creates or modifies it as necessary. - """ - - if manifest_xml is None: - manifest_xml = _DEFAULT_MANIFEST_XML - - with xml.dom.minidom.parseString(manifest_xml) as manifest_dom: - root_element = manifest_dom.documentElement - - # Validate root element - must be - assert root_element.tagName == "assembly" - assert root_element.namespaceURI == "urn:schemas-microsoft-com:asm.v1" - assert root_element.attributes["manifestVersion"].value == "1.0" - - # Modify the manifest - _set_execution_level(manifest_dom, root_element, uac_admin, uac_uiaccess) - _ensure_common_controls_dependency(manifest_dom, root_element) - - # Create output XML - output = manifest_dom.toprettyxml(indent=" ", encoding="UTF-8") - - # Strip extra newlines - output = [line for line in output.splitlines() if line.strip()] - - # Replace: `` with ``. - # Support for `standalone` was added to `toprettyxml` in python 3.9, so do a manual work around. - output[0] = b"""""" - - output = b"\n".join(output) - - return output - - -def write_manifest_to_executable(filename, manifest_xml): - """ - Write the given manifest XML to the given executable's RT_MANIFEST resource. - """ - from PyInstaller.utils.win32 import winresource - - # CREATEPROCESS_MANIFEST_RESOURCE_ID is used for manifest resource in executables. - # ISOLATIONAWARE_MANIFEST_RESOURCE_ID is used for manifest resources in DLLs. - names = [CREATEPROCESS_MANIFEST_RESOURCE_ID] - - # Ensure LANG_NEUTRAL is updated, and also update any other present languages. - languages = [LANG_NEUTRAL, "*"] - - winresource.add_or_update_resource(filename, manifest_xml, RT_MANIFEST, names, languages) - - -def read_manifest_from_executable(filename): - """ - Read manifest from the given executable." - """ - from PyInstaller.utils.win32 import winresource - - resources = winresource.get_resources(filename, [RT_MANIFEST]) - - # `resources` is a three-level dictionary: - # - level 1: resource type (RT_MANIFEST) - # - level 2: resource name (CREATEPROCESS_MANIFEST_RESOURCE_ID) - # - level 3: resource language (LANG_NEUTRAL) - - # Level 1 - if RT_MANIFEST not in resources: - raise ValueError(f"No RT_MANIFEST resources found in {filename!r}.") - resources = resources[RT_MANIFEST] - - # Level 2 - if CREATEPROCESS_MANIFEST_RESOURCE_ID not in resources: - raise ValueError(f"No RT_MANIFEST resource named CREATEPROCESS_MANIFEST_RESOURCE_ID found in {filename!r}.") - resources = resources[CREATEPROCESS_MANIFEST_RESOURCE_ID] - - # Level 3 - # We prefer LANG_NEUTRAL, but allow fall back to the first available entry. - if LANG_NEUTRAL in resources: - resources = resources[LANG_NEUTRAL] - else: - resources = next(iter(resources.items())) - - manifest_xml = resources - return manifest_xml diff --git a/voxvera/vendor/PyInstaller/utils/win32/winresource.py b/voxvera/vendor/PyInstaller/utils/win32/winresource.py deleted file mode 100755 index f21d66c..0000000 --- a/voxvera/vendor/PyInstaller/utils/win32/winresource.py +++ /dev/null @@ -1,189 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Read and write resources from/to Win32 PE files. -""" - -import PyInstaller.log as logging -from PyInstaller.compat import pywintypes, win32api - -logger = logging.getLogger(__name__) - -LOAD_LIBRARY_AS_DATAFILE = 2 -ERROR_BAD_EXE_FORMAT = 193 -ERROR_RESOURCE_DATA_NOT_FOUND = 1812 -ERROR_RESOURCE_TYPE_NOT_FOUND = 1813 -ERROR_RESOURCE_NAME_NOT_FOUND = 1814 -ERROR_RESOURCE_LANG_NOT_FOUND = 1815 - - -def get_resources(filename, types=None, names=None, languages=None): - """ - Retrieve resources from the given PE file. - - filename: path to the PE file. - types: a list of resource types (integers or strings) to search for (None = all). - names: a list of resource names (integers or strings) to search for (None = all). - languages: a list of resource languages (integers) to search for (None = all). - - Returns a dictionary of the form {type: {name: {language: data}}}, which might also be empty if no matching - resources were found. - """ - types = set(types) if types is not None else {"*"} - names = set(names) if names is not None else {"*"} - languages = set(languages) if languages is not None else {"*"} - - output = {} - - # Errors codes for which we swallow exceptions - _IGNORE_EXCEPTIONS = { - ERROR_RESOURCE_DATA_NOT_FOUND, - ERROR_RESOURCE_TYPE_NOT_FOUND, - ERROR_RESOURCE_NAME_NOT_FOUND, - ERROR_RESOURCE_LANG_NOT_FOUND, - } - - # Open file - module_handle = win32api.LoadLibraryEx(filename, 0, LOAD_LIBRARY_AS_DATAFILE) - - # Enumerate available resource types - try: - available_types = win32api.EnumResourceTypes(module_handle) - except pywintypes.error as e: - if e.args[0] not in _IGNORE_EXCEPTIONS: - raise - available_types = [] - - if "*" not in types: - available_types = [res_type for res_type in available_types if res_type in types] - - for res_type in available_types: - # Enumerate available names for the resource type. - try: - available_names = win32api.EnumResourceNames(module_handle, res_type) - except pywintypes.error as e: - if e.args[0] not in _IGNORE_EXCEPTIONS: - raise - continue - - if "*" not in names: - available_names = [res_name for res_name in available_names if res_name in names] - - for res_name in available_names: - # Enumerate available languages for the resource type and name combination. - try: - available_languages = win32api.EnumResourceLanguages(module_handle, res_type, res_name) - except pywintypes.error as e: - if e.args[0] not in _IGNORE_EXCEPTIONS: - raise - continue - - if "*" not in languages: - available_languages = [res_lang for res_lang in available_languages if res_lang in languages] - - for res_lang in available_languages: - # Read data - try: - data = win32api.LoadResource(module_handle, res_type, res_name, res_lang) - except pywintypes.error as e: - if e.args[0] not in _IGNORE_EXCEPTIONS: - raise - continue - - if res_type not in output: - output[res_type] = {} - if res_name not in output[res_type]: - output[res_type][res_name] = {} - output[res_type][res_name][res_lang] = data - - # Close file - win32api.FreeLibrary(module_handle) - - return output - - -def add_or_update_resource(filename, data, res_type, names=None, languages=None): - """ - Update or add a single resource in the PE file with the given binary data. - - filename: path to the PE file. - data: binary data to write to the resource. - res_type: resource type to add/update (integer or string). - names: a list of resource names (integers or strings) to update (None = all). - languages: a list of resource languages (integers) to update (None = all). - """ - if res_type == "*": - raise ValueError("res_type cannot be a wildcard (*)!") - - names = set(names) if names is not None else {"*"} - languages = set(languages) if languages is not None else {"*"} - - # Retrieve existing resources, filtered by the given resource type and given resource names and languages. - resources = get_resources(filename, [res_type], names, languages) - - # Add res_type, name, language combinations that are not already present - resources = resources.get(res_type, {}) # This is now a {name: {language: data}} dictionary - - for res_name in names: - if res_name == "*": - continue - if res_name not in resources: - resources[res_name] = {} - - for res_lang in languages: - if res_lang == "*": - continue - if res_lang not in resources[res_name]: - resources[res_name][res_lang] = None # Just an indicator - - # Add resource to the target file, overwriting the existing resources with same type, name, language combinations. - module_handle = win32api.BeginUpdateResource(filename, 0) - for res_name in resources.keys(): - for res_lang in resources[res_name].keys(): - win32api.UpdateResource(module_handle, res_type, res_name, data, res_lang) - win32api.EndUpdateResource(module_handle, 0) - - -def copy_resources_from_pe_file(filename, src_filename, types=None, names=None, languages=None): - """ - Update or add resources in the given PE file by copying them over from the specified source PE file. - - filename: path to the PE file. - src_filename: path to the source PE file. - types: a list of resource types (integers or strings) to add/update via copy for (None = all). - names: a list of resource names (integers or strings) to add/update via copy (None = all). - languages: a list of resource languages (integers) to add/update via copy (None = all). - """ - types = set(types) if types is not None else {"*"} - names = set(names) if names is not None else {"*"} - languages = set(languages) if languages is not None else {"*"} - - # Retrieve existing resources, filtered by the given resource type and given resource names and languages. - resources = get_resources(src_filename, types, names, languages) - - for res_type, resources_for_type in resources.items(): - if "*" not in types and res_type not in types: - continue - for res_name, resources_for_type_name in resources_for_type.items(): - if "*" not in names and res_name not in names: - continue - for res_lang, data in resources_for_type_name.items(): - if "*" not in languages and res_lang not in languages: - continue - add_or_update_resource(filename, data, res_type, [res_name], [res_lang]) - - -def remove_all_resources(filename): - """ - Remove all resources from the given PE file: - """ - module_handle = win32api.BeginUpdateResource(filename, True) # bDeleteExistingResources=True - win32api.EndUpdateResource(module_handle, False) diff --git a/voxvera/vendor/PyInstaller/utils/win32/winutils.py b/voxvera/vendor/PyInstaller/utils/win32/winutils.py deleted file mode 100755 index 92cba77..0000000 --- a/voxvera/vendor/PyInstaller/utils/win32/winutils.py +++ /dev/null @@ -1,257 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (c) 2013-2023, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- -""" -Utilities for Windows platform. -""" - -from PyInstaller import compat - - -def get_windows_dir(): - """ - Return the Windows directory, e.g., C:\\Windows. - """ - windir = compat.win32api.GetWindowsDirectory() - if not windir: - raise SystemExit("ERROR: Cannot determine Windows directory!") - return windir - - -def get_system_path(): - """ - Return the required Windows system paths. - """ - sys_dir = compat.win32api.GetSystemDirectory() - # Ensure C:\Windows\system32 and C:\Windows directories are always present in PATH variable. - # C:\Windows\system32 is valid even for 64-bit Windows. Access do DLLs are transparently redirected to - # C:\Windows\syswow64 for 64bit applactions. - # See http://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx - return [sys_dir, get_windows_dir()] - - -def get_pe_file_machine_type(filename): - """ - Return the machine type code from the header of the given PE file. - """ - import pefile - - with pefile.PE(filename, fast_load=True) as pe: - return pe.FILE_HEADER.Machine - - -def set_exe_build_timestamp(exe_path, timestamp): - """ - Modifies the executable's build timestamp by updating values in the corresponding PE headers. - """ - import pefile - - with pefile.PE(exe_path, fast_load=True) as pe: - # Manually perform a full load. We need it to load all headers, but specifying it in the constructor triggers - # byte statistics gathering that takes forever with large files. So we try to go around that... - pe.full_load() - - # Set build timestamp. - # See: https://0xc0decafe.com/malware-analyst-guide-to-pe-timestamps - timestamp = int(timestamp) - # Set timestamp field in FILE_HEADER - pe.FILE_HEADER.TimeDateStamp = timestamp - # MSVC-compiled executables contain (at least?) one DIRECTORY_ENTRY_DEBUG entry that also contains timestamp - # with same value as set in FILE_HEADER. So modify that as well, as long as it is set. - debug_entries = getattr(pe, 'DIRECTORY_ENTRY_DEBUG', []) - for debug_entry in debug_entries: - if debug_entry.struct.TimeDateStamp: - debug_entry.struct.TimeDateStamp = timestamp - - # Generate updated EXE data - data = pe.write() - - # Rewrite the exe - with open(exe_path, 'wb') as fp: - fp.write(data) - - -def update_exe_pe_checksum(exe_path): - """ - Compute the executable's PE checksum, and write it to PE headers. - - This optional checksum is supposed to protect the executable against corruption but some anti-viral software have - taken to flagging anything without it set correctly as malware. See issue #5579. - """ - import pefile - - # Compute checksum using our equivalent of the MapFileAndCheckSumW - for large files, it is significantly faster - # than pure-pyton pefile.PE.generate_checksum(). However, it requires the file to be on disk (i.e., cannot operate - # on a memory buffer). - try: - checksum = compute_exe_pe_checksum(exe_path) - except Exception as e: - raise RuntimeError("Failed to compute PE checksum!") from e - - # Update the checksum - with pefile.PE(exe_path, fast_load=True) as pe: - pe.OPTIONAL_HEADER.CheckSum = checksum - - # Generate updated EXE data - data = pe.write() - - # Rewrite the exe - with open(exe_path, 'wb') as fp: - fp.write(data) - - -def compute_exe_pe_checksum(exe_path): - """ - This is a replacement for the MapFileAndCheckSumW function. As noted in MSDN documentation, the Microsoft's - implementation of MapFileAndCheckSumW internally calls its ASCII variant (MapFileAndCheckSumA), and therefore - cannot handle paths that contain characters that are not representable in the current code page. - See: https://docs.microsoft.com/en-us/windows/win32/api/imagehlp/nf-imagehlp-mapfileandchecksumw - - This function is based on Wine's implementation of MapFileAndCheckSumW, and due to being based entirely on - the pure widechar-API functions, it is not limited by the current code page. - """ - # ctypes bindings for relevant win32 API functions - import ctypes - from ctypes import windll, wintypes - - INVALID_HANDLE = wintypes.HANDLE(-1).value - - GetLastError = ctypes.windll.kernel32.GetLastError - GetLastError.argtypes = () - GetLastError.restype = wintypes.DWORD - - CloseHandle = windll.kernel32.CloseHandle - CloseHandle.argtypes = ( - wintypes.HANDLE, # hObject - ) - CloseHandle.restype = wintypes.BOOL - - CreateFileW = windll.kernel32.CreateFileW - CreateFileW.argtypes = ( - wintypes.LPCWSTR, # lpFileName - wintypes.DWORD, # dwDesiredAccess - wintypes.DWORD, # dwShareMode - wintypes.LPVOID, # lpSecurityAttributes - wintypes.DWORD, # dwCreationDisposition - wintypes.DWORD, # dwFlagsAndAttributes - wintypes.HANDLE, # hTemplateFile - ) - CreateFileW.restype = wintypes.HANDLE - - CreateFileMappingW = windll.kernel32.CreateFileMappingW - CreateFileMappingW.argtypes = ( - wintypes.HANDLE, # hFile - wintypes.LPVOID, # lpSecurityAttributes - wintypes.DWORD, # flProtect - wintypes.DWORD, # dwMaximumSizeHigh - wintypes.DWORD, # dwMaximumSizeLow - wintypes.LPCWSTR, # lpName - ) - CreateFileMappingW.restype = wintypes.HANDLE - - MapViewOfFile = windll.kernel32.MapViewOfFile - MapViewOfFile.argtypes = ( - wintypes.HANDLE, # hFileMappingObject - wintypes.DWORD, # dwDesiredAccess - wintypes.DWORD, # dwFileOffsetHigh - wintypes.DWORD, # dwFileOffsetLow - wintypes.DWORD, # dwNumberOfBytesToMap - ) - MapViewOfFile.restype = wintypes.LPVOID - - UnmapViewOfFile = windll.kernel32.UnmapViewOfFile - UnmapViewOfFile.argtypes = ( - wintypes.LPCVOID, # lpBaseAddress - ) - UnmapViewOfFile.restype = wintypes.BOOL - - GetFileSizeEx = windll.kernel32.GetFileSizeEx - GetFileSizeEx.argtypes = ( - wintypes.HANDLE, # hFile - wintypes.PLARGE_INTEGER, # lpFileSize - ) - - CheckSumMappedFile = windll.imagehlp.CheckSumMappedFile - CheckSumMappedFile.argtypes = ( - wintypes.LPVOID, # BaseAddress - wintypes.DWORD, # FileLength - wintypes.PDWORD, # HeaderSum - wintypes.PDWORD, # CheckSum - ) - CheckSumMappedFile.restype = wintypes.LPVOID - - # Open file - hFile = CreateFileW( - ctypes.c_wchar_p(exe_path), - 0x80000000, # dwDesiredAccess = GENERIC_READ - 0x00000001 | 0x00000002, # dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE, - None, # lpSecurityAttributes = NULL - 3, # dwCreationDisposition = OPEN_EXISTING - 0x80, # dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL - None # hTemplateFile = NULL - ) - if hFile == INVALID_HANDLE: - err = GetLastError() - raise RuntimeError(f"Failed to open file {exe_path}! Error code: {err}") - - # Query file size - fileLength = wintypes.LARGE_INTEGER(0) - if GetFileSizeEx(hFile, fileLength) == 0: - err = GetLastError() - CloseHandle(hFile) - raise RuntimeError(f"Failed to query file size file! Error code: {err}") - fileLength = fileLength.value - if fileLength > (2**32 - 1): - raise RuntimeError("Executable size exceeds maximum allowed executable size on Windows (4 GiB)!") - - # Map the file - hMapping = CreateFileMappingW( - hFile, - None, # lpFileMappingAttributes = NULL - 0x02, # flProtect = PAGE_READONLY - 0, # dwMaximumSizeHigh = 0 - 0, # dwMaximumSizeLow = 0 - None # lpName = NULL - ) - if not hMapping: - err = GetLastError() - CloseHandle(hFile) - raise RuntimeError(f"Failed to map file! Error code: {err}") - - # Create map view - baseAddress = MapViewOfFile( - hMapping, - 4, # dwDesiredAccess = FILE_MAP_READ - 0, # dwFileOffsetHigh = 0 - 0, # dwFileOffsetLow = 0 - 0 # dwNumberOfBytesToMap = 0 - ) - if baseAddress == 0: - err = GetLastError() - CloseHandle(hMapping) - CloseHandle(hFile) - raise RuntimeError(f"Failed to create map view! Error code: {err}") - - # Finally, compute the checksum - headerSum = wintypes.DWORD(0) - checkSum = wintypes.DWORD(0) - ret = CheckSumMappedFile(baseAddress, fileLength, ctypes.byref(headerSum), ctypes.byref(checkSum)) - if ret is None: - err = GetLastError() - - # Cleanup - UnmapViewOfFile(baseAddress) - CloseHandle(hMapping) - CloseHandle(hFile) - - if ret is None: - raise RuntimeError(f"CheckSumMappedFile failed! Error code: {err}") - - return checkSum.value diff --git a/voxvera/vendor/_distutils_hack/__init__.py b/voxvera/vendor/_distutils_hack/__init__.py deleted file mode 100644 index 94f71b9..0000000 --- a/voxvera/vendor/_distutils_hack/__init__.py +++ /dev/null @@ -1,239 +0,0 @@ -# don't import any costly modules -import os -import sys - -report_url = ( - "https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml" -) - - -def warn_distutils_present(): - if 'distutils' not in sys.modules: - return - import warnings - - warnings.warn( - "Distutils was imported before Setuptools, but importing Setuptools " - "also replaces the `distutils` module in `sys.modules`. This may lead " - "to undesirable behaviors or errors. To avoid these issues, avoid " - "using distutils directly, ensure that setuptools is installed in the " - "traditional way (e.g. not an editable install), and/or make sure " - "that setuptools is always imported before distutils." - ) - - -def clear_distutils(): - if 'distutils' not in sys.modules: - return - import warnings - - warnings.warn( - "Setuptools is replacing distutils. Support for replacing " - "an already imported distutils is deprecated. In the future, " - "this condition will fail. " - f"Register concerns at {report_url}" - ) - mods = [ - name - for name in sys.modules - if name == "distutils" or name.startswith("distutils.") - ] - for name in mods: - del sys.modules[name] - - -def enabled(): - """ - Allow selection of distutils by environment variable. - """ - which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local') - if which == 'stdlib': - import warnings - - warnings.warn( - "Reliance on distutils from stdlib is deprecated. Users " - "must rely on setuptools to provide the distutils module. " - "Avoid importing distutils or import setuptools first, " - "and avoid setting SETUPTOOLS_USE_DISTUTILS=stdlib. " - f"Register concerns at {report_url}" - ) - return which == 'local' - - -def ensure_local_distutils(): - import importlib - - clear_distutils() - - # With the DistutilsMetaFinder in place, - # perform an import to cause distutils to be - # loaded from setuptools._distutils. Ref #2906. - with shim(): - importlib.import_module('distutils') - - # check that submodules load as expected - core = importlib.import_module('distutils.core') - assert '_distutils' in core.__file__, core.__file__ - assert 'setuptools._distutils.log' not in sys.modules - - -def do_override(): - """ - Ensure that the local copy of distutils is preferred over stdlib. - - See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 - for more motivation. - """ - if enabled(): - warn_distutils_present() - ensure_local_distutils() - - -class _TrivialRe: - def __init__(self, *patterns) -> None: - self._patterns = patterns - - def match(self, string): - return all(pat in string for pat in self._patterns) - - -class DistutilsMetaFinder: - def find_spec(self, fullname, path, target=None): - # optimization: only consider top level modules and those - # found in the CPython test suite. - if path is not None and not fullname.startswith('test.'): - return None - - method_name = 'spec_for_{fullname}'.format(**locals()) - method = getattr(self, method_name, lambda: None) - return method() - - def spec_for_distutils(self): - if self.is_cpython(): - return None - - import importlib - import importlib.abc - import importlib.util - - try: - mod = importlib.import_module('setuptools._distutils') - except Exception: - # There are a couple of cases where setuptools._distutils - # may not be present: - # - An older Setuptools without a local distutils is - # taking precedence. Ref #2957. - # - Path manipulation during sitecustomize removes - # setuptools from the path but only after the hook - # has been loaded. Ref #2980. - # In either case, fall back to stdlib behavior. - return None - - class DistutilsLoader(importlib.abc.Loader): - def create_module(self, spec): - mod.__name__ = 'distutils' - return mod - - def exec_module(self, module): - pass - - return importlib.util.spec_from_loader( - 'distutils', DistutilsLoader(), origin=mod.__file__ - ) - - @staticmethod - def is_cpython(): - """ - Suppress supplying distutils for CPython (build and tests). - Ref #2965 and #3007. - """ - return os.path.isfile('pybuilddir.txt') - - def spec_for_pip(self): - """ - Ensure stdlib distutils when running under pip. - See pypa/pip#8761 for rationale. - """ - if sys.version_info >= (3, 12) or self.pip_imported_during_build(): - return - clear_distutils() - self.spec_for_distutils = lambda: None - - @classmethod - def pip_imported_during_build(cls): - """ - Detect if pip is being imported in a build script. Ref #2355. - """ - import traceback - - return any( - cls.frame_file_is_setup(frame) for frame, line in traceback.walk_stack(None) - ) - - @staticmethod - def frame_file_is_setup(frame): - """ - Return True if the indicated frame suggests a setup.py file. - """ - # some frames may not have __file__ (#2940) - return frame.f_globals.get('__file__', '').endswith('setup.py') - - def spec_for_sensitive_tests(self): - """ - Ensure stdlib distutils when running select tests under CPython. - - python/cpython#91169 - """ - clear_distutils() - self.spec_for_distutils = lambda: None - - sensitive_tests = ( - [ - 'test.test_distutils', - 'test.test_peg_generator', - 'test.test_importlib', - ] - if sys.version_info < (3, 10) - else [ - 'test.test_distutils', - ] - ) - - -for name in DistutilsMetaFinder.sensitive_tests: - setattr( - DistutilsMetaFinder, - f'spec_for_{name}', - DistutilsMetaFinder.spec_for_sensitive_tests, - ) - - -DISTUTILS_FINDER = DistutilsMetaFinder() - - -def add_shim(): - DISTUTILS_FINDER in sys.meta_path or insert_shim() - - -class shim: - def __enter__(self) -> None: - insert_shim() - - def __exit__(self, exc: object, value: object, tb: object) -> None: - _remove_shim() - - -def insert_shim(): - sys.meta_path.insert(0, DISTUTILS_FINDER) - - -def _remove_shim(): - try: - sys.meta_path.remove(DISTUTILS_FINDER) - except ValueError: - pass - - -if sys.version_info < (3, 12): - # DistutilsMetaFinder can only be disabled in Python < 3.12 (PEP 632) - remove_shim = _remove_shim diff --git a/voxvera/vendor/_distutils_hack/override.py b/voxvera/vendor/_distutils_hack/override.py deleted file mode 100644 index 2cc433a..0000000 --- a/voxvera/vendor/_distutils_hack/override.py +++ /dev/null @@ -1 +0,0 @@ -__import__('_distutils_hack').do_override() diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/__init__.py b/voxvera/vendor/_pyinstaller_hooks_contrib/__init__.py deleted file mode 100644 index 5bc2ecf..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/__init__.py +++ /dev/null @@ -1,47 +0,0 @@ -# ------------------------------------------------------------------ -# 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 - -__version__ = '2026.3' -__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, - ] - - -# Several packages for which provide hooks are involved in deep dependency chains when various optional dependencies are -# installed in the environment, and their analysis typically requires recursion limit that exceeds the default 1000. -# Therefore, automatically raise the recursion limit to at least 5000. This alleviates the need to do so on per-hook -# basis. -if (sys.platform.startswith('win') or sys.platform == 'cygwin') and sys.version_info < (3, 11): - # The recursion limit test in PyInstaller main repository seems to push the recursion level to the limit; and if the - # limit is set to 5000, this crashes python 3.8 - 3.10 on Windows and 3.9 that is (at the time of writing) available - # under Cygwin. Further investigation revealed that Windows builds of python 3.8 and 3.10 handle recursion up to - # level ~2075, while the practical limit for 3.9 is between 1950 and 1975. Therefore, for affected combinations of - # platforms and python versions, use a conservative limit of 1900 - if only to avoid issues with the recursion limit - # test in the main PyInstaller repository... - new_recursion_limit = 1900 -else: - new_recursion_limit = 5000 - -if sys.getrecursionlimit() < new_recursion_limit: - sys.setrecursionlimit(new_recursion_limit) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/compat.py b/voxvera/vendor/_pyinstaller_hooks_contrib/compat.py deleted file mode 100644 index 4acba2f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/compat.py +++ /dev/null @@ -1,42 +0,0 @@ -# ------------------------------------------------------------------ -# 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() diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/pre_find_module_path/__init__.py b/voxvera/vendor/_pyinstaller_hooks_contrib/pre_find_module_path/__init__.py deleted file mode 100644 index 89c0c0f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/pre_find_module_path/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -# ------------------------------------------------------------------ diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/__init__.py b/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/__init__.py deleted file mode 100644 index 89c0c0f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -# ------------------------------------------------------------------ diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/hook-tensorflow.py b/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/hook-tensorflow.py deleted file mode 100644 index 0d135b6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/hook-tensorflow.py +++ /dev/null @@ -1,28 +0,0 @@ -#----------------------------------------------------------------------------- -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/hook-win32com.py b/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/hook-win32com.py deleted file mode 100644 index c28e1d2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/pre_safe_import_module/hook-win32com.py +++ /dev/null @@ -1,50 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 its __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 import compat -from PyInstaller import isolated -from PyInstaller.utils.hooks import logger - - -@isolated.decorate -def _get_win32com_file(): - try: - import win32com - return win32com.__file__ - except Exception: - return None - - -def pre_safe_import_module(api): - if not compat.is_win or compat.is_cygwin: - return - - win32com_file = _get_win32com_file() - 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks.dat b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks.dat deleted file mode 100644 index f868f56..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks.dat +++ /dev/null @@ -1,16 +0,0 @@ -{ - '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'], -} diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/__init__.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/__init__.py deleted file mode 100644 index 30d22ed..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -# ------------------------------------------------------------------ diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_cryptography_openssl.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_cryptography_openssl.py deleted file mode 100644 index dbabe69..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_cryptography_openssl.py +++ /dev/null @@ -1,20 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_enchant.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_enchant.py deleted file mode 100644 index 36c185d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_enchant.py +++ /dev/null @@ -1,22 +0,0 @@ -#----------------------------------------------------------------------------- -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_ffpyplayer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_ffpyplayer.py deleted file mode 100644 index 6a024de..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_ffpyplayer.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 = '' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_findlibs.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_findlibs.py deleted file mode 100644 index 48e4ddd..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_findlibs.py +++ /dev/null @@ -1,58 +0,0 @@ -#----------------------------------------------------------------------------- -# 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, *args, **kwargs): - 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, *args, **kwargs) - - return None - - findlibs.find = _pyi_find - - -_pyi_rthook() -del _pyi_rthook diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_nltk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_nltk.py deleted file mode 100644 index feb9eb7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_nltk.py +++ /dev/null @@ -1,17 +0,0 @@ -#----------------------------------------------------------------------------- -# 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")) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_osgeo.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_osgeo.py deleted file mode 100644 index 7b31027..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_osgeo.py +++ /dev/null @@ -1,32 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pygraphviz.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pygraphviz.py deleted file mode 100644 index cfae2b3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pygraphviz.py +++ /dev/null @@ -1,32 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pyproj.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pyproj.py deleted file mode 100644 index b78b70b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pyproj.py +++ /dev/null @@ -1,26 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pyqtgraph_multiprocess.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pyqtgraph_multiprocess.py deleted file mode 100644 index 06a012b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pyqtgraph_multiprocess.py +++ /dev/null @@ -1,52 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pythoncom.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pythoncom.py deleted file mode 100644 index 4f11fb8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pythoncom.py +++ /dev/null @@ -1,24 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pywintypes.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pywintypes.py deleted file mode 100644 index 4f11fb8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pywintypes.py +++ /dev/null @@ -1,24 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_tensorflow.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_tensorflow.py deleted file mode 100644 index 747ea45..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_tensorflow.py +++ /dev/null @@ -1,53 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_traitlets.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_traitlets.py deleted file mode 100644 index 5ec3a9f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_traitlets.py +++ /dev/null @@ -1,25 +0,0 @@ -#----------------------------------------------------------------------------- -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_usb.py b/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_usb.py deleted file mode 100644 index b64624d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/rthooks/pyi_rth_usb.py +++ /dev/null @@ -1,85 +0,0 @@ -#----------------------------------------------------------------------------- -# 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', )) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/__init__.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/__init__.py deleted file mode 100644 index 89c0c0f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -# ------------------------------------------------------------------ diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-BTrees.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-BTrees.py deleted file mode 100644 index 1213dfd..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-BTrees.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-CTkMessagebox.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-CTkMessagebox.py deleted file mode 100644 index dd43aad..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-CTkMessagebox.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Crypto.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Crypto.py deleted file mode 100644 index a52de53..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Crypto.py +++ /dev/null @@ -1,62 +0,0 @@ -# ------------------------------------------------------------------ -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Cryptodome.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Cryptodome.py deleted file mode 100644 index 3a88482..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Cryptodome.py +++ /dev/null @@ -1,44 +0,0 @@ -# ------------------------------------------------------------------ -# 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('.', '/'))) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-HtmlTestRunner.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-HtmlTestRunner.py deleted file mode 100644 index 56abec9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-HtmlTestRunner.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-IPython.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-IPython.py deleted file mode 100644 index 8fec50b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-IPython.py +++ /dev/null @@ -1,42 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-OpenGL.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-OpenGL.py deleted file mode 100644 index ae7bd48..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-OpenGL.py +++ /dev/null @@ -1,42 +0,0 @@ -# ------------------------------------------------------------------ -# 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, collect_submodules - - -# 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 += collect_submodules('OpenGL.arrays') - -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-OpenGL_accelerate.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-OpenGL_accelerate.py deleted file mode 100644 index 5d6998b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-OpenGL_accelerate.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-PyTaskbar.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-PyTaskbar.py deleted file mode 100644 index 55a82a1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-PyTaskbar.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Xlib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Xlib.py deleted file mode 100644 index 8ce588e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-Xlib.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-_mssql.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-_mssql.py deleted file mode 100644 index 356a314..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-_mssql.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-_mysql.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-_mysql.py deleted file mode 100644 index 252fd2a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-_mysql.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-accessible_output2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-accessible_output2.py deleted file mode 100644 index 8d69536..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-accessible_output2.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adbc_driver_manager.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adbc_driver_manager.py deleted file mode 100644 index b08866d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adbc_driver_manager.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# Copyright (c) 2026 PyInstaller Development Team. -# -# This file is distributed under the terms of the GNU General Public -# License (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 = ['adbc_driver_manager._static_version'] -module_collection_mode = { - 'adbc_driver_manager._static_version': 'py', -} diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adbutils.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adbutils.py deleted file mode 100644 index 302439e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adbutils.py +++ /dev/null @@ -1,23 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adios.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adios.py deleted file mode 100644 index 761de00..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-adios.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-afmformats.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-afmformats.py deleted file mode 100644 index 79eafa6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-afmformats.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-aliyunsdkcore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-aliyunsdkcore.py deleted file mode 100644 index 50b0d96..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-aliyunsdkcore.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-altair.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-altair.py deleted file mode 100644 index 126115b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-altair.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-amazonproduct.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-amazonproduct.py deleted file mode 100644 index 46b8467..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-amazonproduct.py +++ /dev/null @@ -1,26 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-anyio.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-anyio.py deleted file mode 100644 index c19fb44..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-anyio.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-apkutils.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-apkutils.py deleted file mode 100644 index a8804bc..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-apkutils.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-appdirs.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-appdirs.py deleted file mode 100644 index d49d5ba..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-appdirs.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-appy.pod.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-appy.pod.py deleted file mode 100644 index 056aea2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-appy.pod.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-apscheduler.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-apscheduler.py deleted file mode 100644 index 4ac1838..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-apscheduler.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-argon2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-argon2.py deleted file mode 100644 index 505639a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-argon2.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astor.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astor.py deleted file mode 100644 index 93452da..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astor.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astroid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astroid.py deleted file mode 100644 index 22323cd..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astroid.py +++ /dev/null @@ -1,48 +0,0 @@ -# ------------------------------------------------------------------ -# 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')) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astropy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astropy.py deleted file mode 100644 index 925ca4d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astropy.py +++ /dev/null @@ -1,42 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astropy_iers_data.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astropy_iers_data.py deleted file mode 100644 index 828dd45..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-astropy_iers_data.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-av.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-av.py deleted file mode 100644 index 8770d6d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-av.py +++ /dev/null @@ -1,44 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-avro.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-avro.py deleted file mode 100644 index 178fa29..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-avro.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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"), -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-azurerm.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-azurerm.py deleted file mode 100644 index 52e9c51..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-azurerm.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-backports.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-backports.py deleted file mode 100644 index af9ead4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-backports.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-backports.zoneinfo.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-backports.zoneinfo.py deleted file mode 100644 index 03a5e41..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-backports.zoneinfo.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bacon.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bacon.py deleted file mode 100644 index febf11b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bacon.py +++ /dev/null @@ -1,50 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bcrypt.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bcrypt.py deleted file mode 100644 index adbb592..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bcrypt.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bitsandbytes.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bitsandbytes.py deleted file mode 100644 index 7897cf3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bitsandbytes.py +++ /dev/null @@ -1,23 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-black.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-black.py deleted file mode 100644 index 25ba19c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-black.py +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bleak.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bleak.py deleted file mode 100644 index 9fa261e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bleak.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-blib2to3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-blib2to3.py deleted file mode 100644 index cda9c1c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-blib2to3.py +++ /dev/null @@ -1,26 +0,0 @@ -# ------------------------------------------------------------------ -# 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.utils.mypy import find_mypyc_module_for_dist - -hiddenimports = [ - # `black` (or rather, its `blib2to3` library) uses `mypy`, and includes a top-level module with - # dynamically-generated name prefix; for example, `30fcd23745efe32ce681__mypyc`. - *find_mypyc_module_for_dist('black'), - 'dataclasses', - 'pkgutil', - 'tempfile', - *collect_submodules('blib2to3') -] - -# Ensure that data files, such as `PatternGrammar.txt` and `Grammar.txt`, are collected. -datas = collect_data_files('blib2to3') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-blspy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-blspy.py deleted file mode 100644 index 18cbca2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-blspy.py +++ /dev/null @@ -1,35 +0,0 @@ -# ------------------------------------------------------------------ -# 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] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bokeh.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bokeh.py deleted file mode 100644 index 8c42be6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-bokeh.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-boto.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-boto.py deleted file mode 100644 index 4ee2144..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-boto.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-boto3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-boto3.py deleted file mode 100644 index 579463c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-boto3.py +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-botocore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-botocore.py deleted file mode 100644 index 47ab1a0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-botocore.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-branca.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-branca.py deleted file mode 100644 index 9cb01f9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-branca.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cairocffi.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cairocffi.py deleted file mode 100644 index c7db979..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cairocffi.py +++ /dev/null @@ -1,45 +0,0 @@ -# ------------------------------------------------------------------ -# 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'} diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cairosvg.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cairosvg.py deleted file mode 100644 index 6098bf2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cairosvg.py +++ /dev/null @@ -1,40 +0,0 @@ -# ------------------------------------------------------------------ -# 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!") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-capstone.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-capstone.py deleted file mode 100644 index 3f18043..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-capstone.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cassandra.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cassandra.py deleted file mode 100644 index 1ebd1dd..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cassandra.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-celpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-celpy.py deleted file mode 100644 index 6d66a0e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-celpy.py +++ /dev/null @@ -1,24 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-certifi.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-certifi.py deleted file mode 100644 index 22c3d0b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-certifi.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cf_units.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cf_units.py deleted file mode 100644 index e8c1f3f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cf_units.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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/**']) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cftime.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cftime.py deleted file mode 100644 index 20cfc82..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cftime.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-chardet.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-chardet.py deleted file mode 100644 index fc66adf..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-chardet.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# Copyright (c) 2026 PyInstaller Development Team. -# -# This file is distributed under the terms of the GNU General Public -# License (version 2.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 - -# Starting with v7.0.0, we need to collect mypy extension, and the data files from chardet/models -if is_module_satisfies("chardet >= 7.0.0"): - from PyInstaller.utils.hooks import collect_data_files - from _pyinstaller_hooks_contrib.utils.mypy import find_mypyc_module_for_dist - - hiddenimports = find_mypyc_module_for_dist('chardet') - datas = collect_data_files('chardet') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-charset_normalizer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-charset_normalizer.py deleted file mode 100644 index d429b84..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-charset_normalizer.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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.4.5"): - from _pyinstaller_hooks_contrib.utils.mypy import find_mypyc_module_for_dist - hiddenimports = find_mypyc_module_for_dist('charset_normalizer') -elif is_module_satisfies("charset_normalizer >= 3.0.1"): - hiddenimports = ["charset_normalizer.md__mypyc"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cloudpickle.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cloudpickle.py deleted file mode 100644 index bfaff37..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cloudpickle.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cloudscraper.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cloudscraper.py deleted file mode 100644 index 3656f24..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cloudscraper.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-clr.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-clr.py deleted file mode 100644 index e0afb86..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-clr.py +++ /dev/null @@ -1,55 +0,0 @@ -# ------------------------------------------------------------------ -# 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 - from _pyinstaller_hooks_contrib.compat import importlib_metadata - - collected_runtime_files = [] - - # Try finding Python.Runtime.dll via distribution's file list - dist_files = importlib_metadata.files('pythonnet') or [] - 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-clr_loader.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-clr_loader.py deleted file mode 100644 index e997c41..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-clr_loader.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cmocean.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cmocean.py deleted file mode 100644 index d7201b5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cmocean.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-compliance_checker.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-compliance_checker.py deleted file mode 100644 index d8fb4be..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-compliance_checker.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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/**']) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-comtypes.client.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-comtypes.client.py deleted file mode 100644 index a96e16d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-comtypes.client.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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", -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-countrycode.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-countrycode.py deleted file mode 100644 index 535105d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-countrycode.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-countryinfo.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-countryinfo.py deleted file mode 100644 index aa05a06..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-countryinfo.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cryptography.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cryptography.py deleted file mode 100644 index 4e55d49..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cryptography.py +++ /dev/null @@ -1,132 +0,0 @@ -# ------------------------------------------------------------------ -# 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.") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cumm.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cumm.py deleted file mode 100644 index 1193a7f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cumm.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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 cumm/include directory - at import, the package asserts the existence of this directory. -datas = collect_data_files('cumm') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-customtkinter.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-customtkinter.py deleted file mode 100644 index 0247ad6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-customtkinter.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cv2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cv2.py deleted file mode 100644 index d6573c1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cv2.py +++ /dev/null @@ -1,168 +0,0 @@ -# ------------------------------------------------------------------ -# 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') - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cx_Oracle.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cx_Oracle.py deleted file mode 100644 index ae5daa8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cx_Oracle.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cytoolz.itertoolz.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cytoolz.itertoolz.py deleted file mode 100644 index fcba975..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-cytoolz.itertoolz.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash.py deleted file mode 100644 index 07a3fe8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_bootstrap_components.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_bootstrap_components.py deleted file mode 100644 index 8028d14..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_bootstrap_components.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_core_components.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_core_components.py deleted file mode 100644 index a41fe5a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_core_components.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_html_components.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_html_components.py deleted file mode 100644 index 077d8a5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_html_components.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_renderer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_renderer.py deleted file mode 100644 index 854f87e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_renderer.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_table.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_table.py deleted file mode 100644 index b7bb600..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_table.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_uploader.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_uploader.py deleted file mode 100644 index f9bf99b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dash_uploader.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dask.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dask.py deleted file mode 100644 index a11f7b7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dask.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# 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']) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-datasets.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-datasets.py deleted file mode 100644 index 1ff1a61..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-datasets.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateparser.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateparser.py deleted file mode 100644 index ed97292..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateparser.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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 - -# Ensure that `dateparser/data/dateparser_tz_cache.pkl` data file is collected. Applicable to dateparser >= v1.2.2; -# earlier releases have no data files, so this call returns empty list. -datas = collect_data_files('dateparser') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateparser.utils.strptime.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateparser.utils.strptime.py deleted file mode 100644 index 35e6c92..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateparser.utils.strptime.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateutil.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateutil.py deleted file mode 100644 index 54abddf..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dateutil.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dbus_fast.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dbus_fast.py deleted file mode 100644 index 4e2eb72..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dbus_fast.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dclab.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dclab.py deleted file mode 100644 index 3179a16..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dclab.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ddgs.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ddgs.py deleted file mode 100644 index 3d41d20..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ddgs.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# Copyright (c) 2026 PyInstaller Development Team. -# -# This file is distributed under the terms of the GNU General Public -# License (version 2.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 - -# The .ddgs module is lazily loaded, and is discovered only because PyInstaller currently analyzes imports under -# `if TYPE_CHECKING`. See: https://github.com/deedy5/ddgs/blob/v9.10.0/ddgs/__init__.py#L14-L15 -hiddenimports = ['ddgs.ddgs'] - -# The engines/backends are discovered via `pkgutil.iter_modules()`, so we need to ensure they are collected. -hiddenimports += collect_submodules('ddgs.engines') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-detectron2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-detectron2.py deleted file mode 100644 index 1ff1a61..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-detectron2.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-discid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-discid.py deleted file mode 100644 index 37cba62..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-discid.py +++ /dev/null @@ -1,40 +0,0 @@ -# ------------------------------------------------------------------ -# 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!") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-distorm3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-distorm3.py deleted file mode 100644 index b2fb731..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-distorm3.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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='.') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-distributed.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-distributed.py deleted file mode 100644 index d1072d9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-distributed.py +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# 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', -} diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dns.rdata.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dns.rdata.py deleted file mode 100644 index a185ad9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dns.rdata.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docutils.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docutils.py deleted file mode 100644 index 9d4ee79..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docutils.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docx.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docx.py deleted file mode 100644 index aefe64e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docx.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docx2pdf.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docx2pdf.py deleted file mode 100644 index c746417..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-docx2pdf.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-duckdb.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-duckdb.py deleted file mode 100644 index 0d24af0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-duckdb.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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, is_module_satisfies - -# duckdb requires stdlib `inspect` module. On newer python versions (>= 3.10), it is collected as a dependency of other -# stdlib modules, while on older python versions this is not the case. Therefore, we add it to hidden imports regardless -# of python version. -hiddenimports = ['inspect'] - -# Starting with v1.4.0, `duckdb` uses `importlib.metadata.version()` to determine its version. -if is_module_satisfies("duckdb >= 1.4.0"): - datas = copy_metadata('duckdb') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dynaconf.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dynaconf.py deleted file mode 100644 index 08c809a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-dynaconf.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-easyocr.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-easyocr.py deleted file mode 100644 index a868875..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-easyocr.py +++ /dev/null @@ -1,18 +0,0 @@ -from 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eccodeslib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eccodeslib.py deleted file mode 100644 index b04e500..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eccodeslib.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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 bundled dynamic libraries. -binaries = collect_dynamic_libs('eccodeslib') - -# `eccodeslib` depends on `eckitlib` and `fckitlib`, and when libraries are being imported at run-time by -# `findlibs.find()` user warnings are emitted if these packages cannot be imported. -hiddenimports = ['eckitlib', 'fckitlib'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eckitlib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eckitlib.py deleted file mode 100644 index 99a8786..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eckitlib.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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 bundled dynamic libraries. -binaries = collect_dynamic_libs('eckitlib') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eel.py deleted file mode 100644 index ceeb974..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eel.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-emoji.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-emoji.py deleted file mode 100644 index ecdf1fd..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-emoji.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-enchant.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-enchant.py deleted file mode 100644 index 39fd990..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-enchant.py +++ /dev/null @@ -1,69 +0,0 @@ -# ------------------------------------------------------------------ -# 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 import isolated -from PyInstaller import compat -from PyInstaller.utils.hooks import 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) -# - macOS: usually libenchant.dylib and several dictionaries when installed via pip. -binaries = collect_dynamic_libs('enchant') -datas = collect_data_files('enchant') -excludedimports = ['enchant.tests'] - -# On macOS try to find files in Homebrew or Macports environments. -if compat.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. - @isolated.decorate - def _get_enchant_lib(): - from enchant._enchant import e # ctypes.CDLL - return e._name - - libenchant = _get_enchant_lib() - - 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. - @isolated.decorate - def _get_enchant_backends(): - from enchant import Broker - return [str(provider.file) for provider in Broker().describe()] - - backends = _get_enchant_backends() - 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')) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eng_to_ipa.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eng_to_ipa.py deleted file mode 100644 index 5a78114..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eng_to_ipa.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ens.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ens.py deleted file mode 100644 index 89e496e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ens.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-enzyme.parsers.ebml.core.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-enzyme.parsers.ebml.core.py deleted file mode 100644 index 047274c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-enzyme.parsers.ebml.core.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_abi.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_abi.py deleted file mode 100644 index 75c26f0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_abi.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_account.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_account.py deleted file mode 100644 index 1a9c8f5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_account.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_hash.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_hash.py deleted file mode 100644 index 0c9d50e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_hash.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_keyfile.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_keyfile.py deleted file mode 100644 index 2d9453a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_keyfile.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_keys.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_keys.py deleted file mode 100644 index d96535e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_keys.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_rlp.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_rlp.py deleted file mode 100644 index 01943a6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_rlp.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_typing.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_typing.py deleted file mode 100644 index f31e4ca..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_typing.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_utils.network.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_utils.network.py deleted file mode 100644 index 3bd88f9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_utils.network.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_utils.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_utils.py deleted file mode 100644 index a87ec3c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-eth_utils.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-exchangelib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-exchangelib.py deleted file mode 100644 index 0c46bcc..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-exchangelib.py +++ /dev/null @@ -1,12 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fabric.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fabric.py deleted file mode 100644 index 3367c0c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fabric.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fairscale.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fairscale.py deleted file mode 100644 index 8b5d53d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fairscale.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fake_useragent.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fake_useragent.py deleted file mode 100644 index feab067..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fake_useragent.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# Copyright (c) 2026 PyInstaller Development Team. -# -# This file is distributed under the terms of the GNU General Public -# License (version 2.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("fake_useragent") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-faker.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-faker.py deleted file mode 100644 index 1d5b039..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-faker.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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) -) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-falcon.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-falcon.py deleted file mode 100644 index 1c1d2b1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-falcon.py +++ /dev/null @@ -1,41 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fastai.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fastai.py deleted file mode 100644 index 1ff1a61..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fastai.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fastparquet.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fastparquet.py deleted file mode 100644 index b43bbb4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fastparquet.py +++ /dev/null @@ -1,32 +0,0 @@ -# ------------------------------------------------------------------ -# 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) - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fckitlib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fckitlib.py deleted file mode 100644 index 22fe17f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fckitlib.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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 bundled dynamic libraries. -binaries = collect_dynamic_libs('fckitlib') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ffpyplayer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ffpyplayer.py deleted file mode 100644 index 1a96414..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ffpyplayer.py +++ /dev/null @@ -1,28 +0,0 @@ -# ------------------------------------------------------------------ -# 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 import isolated -from PyInstaller.utils.hooks import collect_submodules - -hiddenimports = collect_submodules("ffpyplayer") -binaries = [] - - -# ffpyplayer has an internal variable that list locations of libraries it is using. -@isolated.decorate -def _get_ffpyplayer_binary_dirs(): - import ffpyplayer - return ffpyplayer.dep_bins - - -for binary_dir in _get_ffpyplayer_binary_dirs(): - binaries += [(binary_dir, '.')] # Copy DLLs from these locations into top-level application directory. diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fiona.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fiona.py deleted file mode 100644 index 1e6d3fa..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fiona.py +++ /dev/null @@ -1,26 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flask_compress.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flask_compress.py deleted file mode 100644 index 9e04195..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flask_compress.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flask_restx.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flask_restx.py deleted file mode 100644 index c83b5b3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flask_restx.py +++ /dev/null @@ -1,14 +0,0 @@ -# ----------------------------------------------------------------------------- -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flex.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flex.py deleted file mode 100644 index 3faaa82..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flex.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flirpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flirpy.py deleted file mode 100644 index 4c51397..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-flirpy.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fmpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fmpy.py deleted file mode 100644 index daeb3c6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fmpy.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-folium.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-folium.py deleted file mode 100644 index a6af178..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-folium.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-freetype.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-freetype.py deleted file mode 100644 index 0ae5c04..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-freetype.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-frictionless.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-frictionless.py deleted file mode 100644 index fc0ff20..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-frictionless.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fsspec.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fsspec.py deleted file mode 100644 index e57a32d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fsspec.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fvcore.nn.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fvcore.nn.py deleted file mode 100644 index 1ff1a61..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-fvcore.nn.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gadfly.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gadfly.py deleted file mode 100644 index 1bf2314..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gadfly.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gbulb.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gbulb.py deleted file mode 100644 index 68116a1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gbulb.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gcloud.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gcloud.py deleted file mode 100644 index 051d61c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gcloud.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-geopandas.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-geopandas.py deleted file mode 100644 index 44d9001..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-geopandas.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gitlab.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gitlab.py deleted file mode 100644 index 8adf54b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gitlab.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-globus_sdk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-globus_sdk.py deleted file mode 100644 index 49fb06f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-globus_sdk.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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, copy_metadata - -datas = copy_metadata("globus_sdk") -datas += collect_data_files("globus_sdk") -hiddenimports = collect_submodules("globus_sdk") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gmplot.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gmplot.py deleted file mode 100644 index ce2d5ce..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gmplot.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gmsh.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gmsh.py deleted file mode 100644 index d9755d0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gmsh.py +++ /dev/null @@ -1,28 +0,0 @@ -# ------------------------------------------------------------------ -# 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!") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gooey.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gooey.py deleted file mode 100644 index 8861b47..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gooey.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.api_core.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.api_core.py deleted file mode 100644 index 641bdf0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.api_core.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.bigquery.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.bigquery.py deleted file mode 100644 index 1bbfa4a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.bigquery.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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')) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.core.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.core.py deleted file mode 100644 index db7c20e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.core.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.kms_v1.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.kms_v1.py deleted file mode 100644 index 116d7f4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.kms_v1.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.pubsub_v1.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.pubsub_v1.py deleted file mode 100644 index d022668..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.pubsub_v1.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.speech.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.speech.py deleted file mode 100644 index 7fed599..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.speech.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.storage.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.storage.py deleted file mode 100644 index 29866bc..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.storage.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.translate.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.translate.py deleted file mode 100644 index 465b8e9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.translate.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-googleapiclient.model.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-googleapiclient.model.py deleted file mode 100644 index d1a2293..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-googleapiclient.model.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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__']) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-grapheme.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-grapheme.py deleted file mode 100644 index fbe2a4b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-grapheme.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-graphql_query.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-graphql_query.py deleted file mode 100644 index f5a0f80..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-graphql_query.py +++ /dev/null @@ -1,18 +0,0 @@ -#----------------------------------------------------------------------------- -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-great_expectations.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-great_expectations.py deleted file mode 100644 index a19b7c4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-great_expectations.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gribapi.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gribapi.py deleted file mode 100644 index 984a989..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gribapi.py +++ /dev/null @@ -1,89 +0,0 @@ -# ------------------------------------------------------------------ -# 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 = [] -hiddenimports = [] - -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)) - - # If the shared library is available in the stand-alone `eccodeslib` package, add this package to to hidden imports, - # so that `findlibs.find()` can import it and query its `__file__` attribute. - if 'eccodeslib' in library_parent_path.parts: - hiddenimports += ['eccodeslib'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-grpc.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-grpc.py deleted file mode 100644 index a592be2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-grpc.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gtk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gtk.py deleted file mode 100644 index 64b3a4b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-gtk.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-h3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-h3.py deleted file mode 100644 index 89f112b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-h3.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-h5py.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-h5py.py deleted file mode 100644 index fcc002f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-h5py.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hdf5plugin.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hdf5plugin.py deleted file mode 100644 index b3ef44d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hdf5plugin.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hexbytes.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hexbytes.py deleted file mode 100644 index 8e29e8c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hexbytes.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-httplib2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-httplib2.py deleted file mode 100644 index 7789c1f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-httplib2.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-humanize.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-humanize.py deleted file mode 100644 index 598dac7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-humanize.py +++ /dev/null @@ -1,23 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hydra.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hydra.py deleted file mode 100644 index 0c61977..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-hydra.py +++ /dev/null @@ -1,36 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ijson.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ijson.py deleted file mode 100644 index 60fa40c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ijson.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-imageio.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-imageio.py deleted file mode 100644 index 1cf0e6e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-imageio.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-imageio_ffmpeg.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-imageio_ffmpeg.py deleted file mode 100644 index 4fd469b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-imageio_ffmpeg.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-iminuit.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-iminuit.py deleted file mode 100644 index 4cbb6cb..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-iminuit.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-intake.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-intake.py deleted file mode 100644 index 84a52a8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-intake.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-iso639.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-iso639.py deleted file mode 100644 index 974e73e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-iso639.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-itk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-itk.py deleted file mode 100644 index 54bf624..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-itk.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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", -} diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jaraco.text.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jaraco.text.py deleted file mode 100644 index 7126079..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jaraco.text.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jedi.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jedi.py deleted file mode 100644 index 9601dbe..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jedi.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jieba.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jieba.py deleted file mode 100644 index cc53edf..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jieba.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jinja2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jinja2.py deleted file mode 100644 index f017894..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jinja2.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jinxed.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jinxed.py deleted file mode 100644 index 28e7f36..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jinxed.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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' -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jira.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jira.py deleted file mode 100644 index dd64b1e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jira.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonpath_rw_ext.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonpath_rw_ext.py deleted file mode 100644 index 1914af4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonpath_rw_ext.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonrpcserver.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonrpcserver.py deleted file mode 100644 index 71947a1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonrpcserver.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonschema.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonschema.py deleted file mode 100644 index ca1289c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonschema.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonschema_specifications.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonschema_specifications.py deleted file mode 100644 index bbbdafb..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jsonschema_specifications.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jupyterlab.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jupyterlab.py deleted file mode 100644 index ba77523..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-jupyterlab.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-kaleido.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-kaleido.py deleted file mode 100644 index e21c5eb..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-kaleido.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-khmernltk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-khmernltk.py deleted file mode 100644 index 021d23c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-khmernltk.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-kinterbasdb.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-kinterbasdb.py deleted file mode 100644 index dff9f4b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-kinterbasdb.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langchain.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langchain.py deleted file mode 100644 index 6362f10..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langchain.py +++ /dev/null @@ -1,53 +0,0 @@ -# ------------------------------------------------------------------ -# 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, is_module_satisfies - -# This was required with langchain < 1.0.0; in contemporary versions, the package does not contain any data files, -# so this should be effectively a no-op. -datas = collect_data_files('langchain') - -# In langchain 1.2.1 the import logic for optional add-on packages was refactored, and direct imports in conditional -# blocks were replaced with dictionary-based look-up; see https://github.com/langchain-ai/langchain/pull/32813 -# So now we need to use that same dictionary to explicitly collect the optional packages that happen to be installed -# in the build environment. -if is_module_satisfies('langchain >= 1.2.1'): - from PyInstaller import isolated - - @isolated.decorate - def get_optional_packages(var_name): - packages = set() - - try: - import langchain.chat_models.base - providers = getattr(langchain.chat_models.base, var_name) - packages.update(package_name for package_name, *_ in providers.values()) - except Exception: - pass - - try: - import langchain.embeddings.base - providers = getattr(langchain.embeddings.base, var_name) - packages.update(package_name for package_name, *_ in providers.values()) - except Exception: - pass - - return sorted(packages) - - # langchain 1.2.10 renamed the `_SUPPORTED_PROVIDERS` into `_BUILTIN_PROVIDERS`. - if is_module_satisfies('langchain >= 1.2.10'): - var_name = '_BUILTIN_PROVIDERS' - else: - var_name = '_SUPPORTED_PROVIDERS' - - hiddenimports = get_optional_packages(var_name) - warn_on_missing_hiddenimports = False diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langchain_classic.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langchain_classic.py deleted file mode 100644 index 0a7d5bc..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langchain_classic.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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('langchain_classic') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langcodes.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langcodes.py deleted file mode 100644 index 65c4723..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langcodes.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langdetect.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langdetect.py deleted file mode 100644 index 2bfe9ac..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-langdetect.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-laonlp.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-laonlp.py deleted file mode 100644 index 2c8b577..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-laonlp.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lark.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lark.py deleted file mode 100644 index 653f810..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lark.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ldfparser.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ldfparser.py deleted file mode 100644 index 42e9033..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ldfparser.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lensfunpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lensfunpy.py deleted file mode 100644 index a44d5e4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lensfunpy.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-libaudioverse.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-libaudioverse.py deleted file mode 100644 index 9d28d60..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-libaudioverse.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-librosa.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-librosa.py deleted file mode 100644 index 2767038..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-librosa.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lightgbm.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lightgbm.py deleted file mode 100644 index 3718cc4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lightgbm.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lightning.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lightning.py deleted file mode 100644 index 840bdb9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lightning.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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'], -) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-limits.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-limits.py deleted file mode 100644 index 3bd9810..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-limits.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-linear_operator.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-linear_operator.py deleted file mode 100644 index 73c8621..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-linear_operator.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lingua.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lingua.py deleted file mode 100644 index 2d6fbb5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lingua.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-litestar.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-litestar.py deleted file mode 100644 index ca35e5a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-litestar.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-llvmlite.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-llvmlite.py deleted file mode 100644 index 108f521..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-llvmlite.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-logilab.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-logilab.py deleted file mode 100644 index 074fc40..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-logilab.py +++ /dev/null @@ -1,26 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.etree.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.etree.py deleted file mode 100644 index b53e89e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.etree.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.isoschematron.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.isoschematron.py deleted file mode 100644 index 8ed7659..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.isoschematron.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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')) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.objectify.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.objectify.py deleted file mode 100644 index e8cb2bf..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.objectify.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.py deleted file mode 100644 index 4a70af6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lz4.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lz4.py deleted file mode 100644 index 1b01cd4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-lz4.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-magic.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-magic.py deleted file mode 100644 index e5efe63..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-magic.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mako.codegen.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mako.codegen.py deleted file mode 100644 index dcaefa3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mako.codegen.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mariadb.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mariadb.py deleted file mode 100644 index 6466ba1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mariadb.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-markdown.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-markdown.py deleted file mode 100644 index 9918feb..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-markdown.py +++ /dev/null @@ -1,28 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mecab.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mecab.py deleted file mode 100644 index 2b30f86..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mecab.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-metpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-metpy.py deleted file mode 100644 index be84bb9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-metpy.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-migrate.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-migrate.py deleted file mode 100644 index b1ec0c9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-migrate.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mimesis.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mimesis.py deleted file mode 100644 index 5accde1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mimesis.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-minecraft_launcher_lib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-minecraft_launcher_lib.py deleted file mode 100644 index e06a0a9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-minecraft_launcher_lib.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mistune.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mistune.py deleted file mode 100644 index ea9a804..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mistune.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mnemonic.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mnemonic.py deleted file mode 100644 index 68c56e5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mnemonic.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-monai.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-monai.py deleted file mode 100644 index 82676db..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-monai.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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" diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-moviepy.audio.fx.all.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-moviepy.audio.fx.all.py deleted file mode 100644 index 4bb9c78..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-moviepy.audio.fx.all.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-moviepy.video.fx.all.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-moviepy.video.fx.all.py deleted file mode 100644 index cc0b924..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-moviepy.video.fx.all.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mpl_toolkits.basemap.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mpl_toolkits.basemap.py deleted file mode 100644 index 839b072..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-mpl_toolkits.basemap.py +++ /dev/null @@ -1,36 +0,0 @@ -# ------------------------------------------------------------------ -# 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)) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-msoffcrypto.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-msoffcrypto.py deleted file mode 100644 index 74f75e0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-msoffcrypto.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nacl.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nacl.py deleted file mode 100644 index 9694133..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nacl.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------------------------------------ -# 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)) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-names.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-names.py deleted file mode 100644 index ff33b59..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-names.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nanite.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nanite.py deleted file mode 100644 index 9d37ecc..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nanite.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-narwhals.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-narwhals.py deleted file mode 100644 index 0c8109f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-narwhals.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbconvert.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbconvert.py deleted file mode 100644 index fefb5ae..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbconvert.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbdime.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbdime.py deleted file mode 100644 index 38452ca..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbdime.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbformat.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbformat.py deleted file mode 100644 index d193864..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbformat.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbt.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbt.py deleted file mode 100644 index 676ee32..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nbt.py +++ /dev/null @@ -1,12 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ncclient.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ncclient.py deleted file mode 100644 index d41c061..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ncclient.py +++ /dev/null @@ -1,23 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-netCDF4.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-netCDF4.py deleted file mode 100644 index 259d71c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-netCDF4.py +++ /dev/null @@ -1,37 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nicegui.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nicegui.py deleted file mode 100644 index 539dfe0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nicegui.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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('nicegui') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-niquests.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-niquests.py deleted file mode 100644 index b9ec1d0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-niquests.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nltk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nltk.py deleted file mode 100644 index fa1cf2b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nltk.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nnpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nnpy.py deleted file mode 100644 index e4d3951..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nnpy.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-notebook.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-notebook.py deleted file mode 100644 index ea91dec..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-notebook.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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)] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numba.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numba.py deleted file mode 100644 index 9f69d34..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numba.py +++ /dev/null @@ -1,55 +0,0 @@ -# ------------------------------------------------------------------ -# 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. -# numba 0.62 reverted the change, removing the new type system. -if is_module_satisfies("numba >= 0.61.0rc1, < 0.62.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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numbers_parser.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numbers_parser.py deleted file mode 100644 index d6fd535..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numbers_parser.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numcodecs.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numcodecs.py deleted file mode 100644 index 7a6f6fd..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-numcodecs.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cublas.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cublas.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cublas.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_cupti.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_cupti.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_cupti.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_nvcc.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_nvcc.py deleted file mode 100644 index 13172ae..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_nvcc.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_nvrtc.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_nvrtc.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_nvrtc.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_runtime.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_runtime.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_runtime.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cudnn.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cudnn.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cudnn.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cufft.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cufft.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cufft.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.curand.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.curand.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.curand.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cusolver.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cusolver.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cusolver.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cusparse.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cusparse.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cusparse.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nccl.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nccl.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nccl.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nvjitlink.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nvjitlink.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nvjitlink.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nvtx.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nvtx.py deleted file mode 100644 index 3404162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nvtx.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-office365.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-office365.py deleted file mode 100644 index 37a007f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-office365.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-onnxruntime.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-onnxruntime.py deleted file mode 100644 index 9c7e807..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-onnxruntime.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-opencc.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-opencc.py deleted file mode 100644 index 9204053..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-opencc.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-openpyxl.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-openpyxl.py deleted file mode 100644 index 299a1be..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-openpyxl.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-opentelemetry.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-opentelemetry.py deleted file mode 100644 index d8e3e9e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-opentelemetry.py +++ /dev/null @@ -1,41 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-orjson.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-orjson.py deleted file mode 100644 index 04092dc..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-orjson.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-osgeo.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-osgeo.py deleted file mode 100644 index dbc0b4a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-osgeo.py +++ /dev/null @@ -1,81 +0,0 @@ -# ------------------------------------------------------------------ -# 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, ".")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pandas_flavor.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pandas_flavor.py deleted file mode 100644 index a41c36a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pandas_flavor.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-panel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-panel.py deleted file mode 100644 index 51c411f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-panel.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-parsedatetime.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-parsedatetime.py deleted file mode 100644 index 5392a72..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-parsedatetime.py +++ /dev/null @@ -1,29 +0,0 @@ -#----------------------------------------------------------------------------- -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-parso.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-parso.py deleted file mode 100644 index c00caf1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-parso.py +++ /dev/null @@ -1,17 +0,0 @@ -# ----------------------------------------------------------------------------- -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-passlib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-passlib.py deleted file mode 100644 index 9189b8e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-passlib.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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", -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-paste.exceptions.reporter.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-paste.exceptions.reporter.py deleted file mode 100644 index 9b80044..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-paste.exceptions.reporter.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-patoolib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-patoolib.py deleted file mode 100644 index 57d1aa6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-patoolib.py +++ /dev/null @@ -1,19 +0,0 @@ -#----------------------------------------------------------------------------- -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-patsy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-patsy.py deleted file mode 100644 index 39dbf7b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-patsy.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pdfminer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pdfminer.py deleted file mode 100644 index e4da9a7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pdfminer.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pendulum.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pendulum.py deleted file mode 100644 index 5649b4a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pendulum.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-phonenumbers.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-phonenumbers.py deleted file mode 100644 index 1494a21..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-phonenumbers.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pingouin.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pingouin.py deleted file mode 100644 index dd9989b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pingouin.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pint.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pint.py deleted file mode 100644 index 49d2dee..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pint.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pinyin.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pinyin.py deleted file mode 100644 index ad8c547..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pinyin.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-platformdirs.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-platformdirs.py deleted file mode 100644 index 4d6b250..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-platformdirs.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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 diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-plotly.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-plotly.py deleted file mode 100644 index be8714e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-plotly.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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/**/*.*', 'validators/**/*.*']) -hiddenimports = collect_submodules('plotly.validators') + ['pandas', 'cmath'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pointcept.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pointcept.py deleted file mode 100644 index 5d36ef1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pointcept.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -# ------------------------------------------------------------------ - -# Collect source .py files for JIT/torchscript. -module_collection_mode = 'pyz+py' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pptx.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pptx.py deleted file mode 100644 index fae9505..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pptx.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-prettytable.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-prettytable.py deleted file mode 100644 index d049b3a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-prettytable.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psutil.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psutil.py deleted file mode 100644 index 9976cad..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psutil.py +++ /dev/null @@ -1,50 +0,0 @@ -# ------------------------------------------------------------------ -# 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", "android")) -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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psychopy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psychopy.py deleted file mode 100644 index 4bee8d6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psychopy.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psycopg2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psycopg2.py deleted file mode 100644 index 7698bbb..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psycopg2.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psycopg_binary.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psycopg_binary.py deleted file mode 100644 index 77494c3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-psycopg_binary.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -# ------------------------------------------------------------------ - -# The `pyscopg_binary._uuid` module is imported from the `psycopg_binary._psycopg` binary extension when working with -# data of UUID data type. -hiddenimports = ['psycopg_binary._uuid'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-publicsuffix2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-publicsuffix2.py deleted file mode 100644 index 01a5ec2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-publicsuffix2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pubsub.core.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pubsub.core.py deleted file mode 100644 index dea0737..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pubsub.core.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__']) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-puremagic.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-puremagic.py deleted file mode 100644 index 8aa599f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-puremagic.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-py.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-py.py deleted file mode 100644 index b3bd685..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-py.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyarrow.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyarrow.py deleted file mode 100644 index ef98062..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyarrow.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycountry.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycountry.py deleted file mode 100644 index 9dd4f9a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycountry.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycparser.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycparser.py deleted file mode 100644 index 1f2e968..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycparser.py +++ /dev/null @@ -1,23 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycrfsuite.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycrfsuite.py deleted file mode 100644 index 8b64162..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pycrfsuite.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydantic.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydantic.py deleted file mode 100644 index 2e2d288..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydantic.py +++ /dev/null @@ -1,49 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydicom.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydicom.py deleted file mode 100644 index 8b3d497..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydicom.py +++ /dev/null @@ -1,69 +0,0 @@ -# ------------------------------------------------------------------ -# 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, - ], -) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydivert.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydivert.py deleted file mode 100644 index dab32b8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pydivert.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyecharts.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyecharts.py deleted file mode 100644 index 69f2e40..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyecharts.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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('pyecharts') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-io.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-io.py deleted file mode 100644 index 55fd56a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-io.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-ods.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-ods.py deleted file mode 100644 index 160e1b2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-ods.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-ods3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-ods3.py deleted file mode 100644 index a01beed..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-ods3.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-odsr.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-odsr.py deleted file mode 100644 index 0d10d71..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-odsr.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xls.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xls.py deleted file mode 100644 index 60acc3f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xls.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xlsx.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xlsx.py deleted file mode 100644 index 1f12497..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xlsx.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xlsxw.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xlsxw.py deleted file mode 100644 index c0b6778..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xlsxw.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel.py deleted file mode 100644 index f000b2d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel.py +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------ -# 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' -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_io.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_io.py deleted file mode 100644 index 2096a74..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_io.py +++ /dev/null @@ -1,26 +0,0 @@ -# ------------------------------------------------------------------ -# 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' -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_ods.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_ods.py deleted file mode 100644 index f856a0e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_ods.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_ods3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_ods3.py deleted file mode 100644 index c4f54eb..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_ods3.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_odsr.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_odsr.py deleted file mode 100644 index d895ed1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_odsr.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xls.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xls.py deleted file mode 100644 index 4875412..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xls.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xlsx.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xlsx.py deleted file mode 100644 index 438aab6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xlsx.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xlsxw.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xlsxw.py deleted file mode 100644 index 72f7593..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xlsxw.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcelerate.Writer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcelerate.Writer.py deleted file mode 100644 index ff9dbc8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcelerate.Writer.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pygraphviz.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pygraphviz.py deleted file mode 100644 index 7a6028f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pygraphviz.py +++ /dev/null @@ -1,145 +0,0 @@ -# ------------------------------------------------------------------ -# 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() diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pygwalker.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pygwalker.py deleted file mode 100644 index 9e78db1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pygwalker.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylibmagic.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylibmagic.py deleted file mode 100644 index 5fb8024..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylibmagic.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylint.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylint.py deleted file mode 100644 index 3e2e804..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylint.py +++ /dev/null @@ -1,75 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylsl.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylsl.py deleted file mode 100644 index f3c7960..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pylsl.py +++ /dev/null @@ -1,42 +0,0 @@ -# ------------------------------------------------------------------ -# 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 importing pylsl - this will fail if the shared library is unavailable. - try: - import pylsl # noqa: F401 - except Exception: - return None - - # Return the path to shared library that is used by pylsl. - try: - from pylsl.lib import lib as cdll # pylsl >= 0.17.0 - except ImportError: - from pylsl.pylsl import lib as cdll # older versions - - return cdll._name - - -# 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 = [] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymediainfo.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymediainfo.py deleted file mode 100644 index 6b39abc..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymediainfo.py +++ /dev/null @@ -1,44 +0,0 @@ -# ------------------------------------------------------------------ -# 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!") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymeshlab.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymeshlab.py deleted file mode 100644 index daf9a2a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymeshlab.py +++ /dev/null @@ -1,41 +0,0 @@ -# ------------------------------------------------------------------ -# 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 import compat -from PyInstaller.utils.hooks import collect_dynamic_libs, collect_data_files - -if compat.is_win: - # On Windows, pymeshlab wheel seems to include Qt libraries and plugins (and their dependencies, as well as meshlab - # plugins), as well as some of data files (such as translation files); all in the top-level package directory. - binaries = collect_dynamic_libs('pymeshlab') - datas = collect_data_files('pymeshlab') -elif compat.is_linux: - # On linux, only Qt libraries and plugins (and their dependencies, as well as meshlab plugins) seem to be included; - # all in lib subdir. - # NOTE: collect_dynamic_libs() does not collect versioned .so files; those are picked up by collect_data_files(). - binaries = collect_dynamic_libs('pymeshlab.lib') + collect_data_files('pymeshlab.lib') -elif compat.is_darwin: - # On macOS, Frameworks sub-directory contains Qt .framework bundles and other shared libraries, all of which seem - # to be picked up by binary dependency analysis. Avoid explicitly collecting anything from there to avoid - # interfering with PyInstaller's attempts to fix-up .framework bundle structure (see pyinstaller/pyinstaller#9335). - # The plugins for both meshlab and Qt are in PlugIns directory, and we need to collect those. - binaries = collect_dynamic_libs('pymeshlab.PlugIns') - -# On linux, prevent binary dependency analysis from generating symbolic links for bundles shared libraries to the -# top-level application directory. For some god-forsaken reason, the wheel includes a copy of python shared library, -# which might actually be ABI incompatible with version of python that frozen application is built with (for example, -# libpython3.13.so.1.0 shipped with pymeshlab 2025.7 causes `undefined symbol: _Py_GetExecutor` in `_opcode` extension -# collected from Fedora-provided python 3.13.11). -if compat.is_linux: - bindepend_symlink_suppression = [ - '**/pymeshlab/lib/*', - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymorphy3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymorphy3.py deleted file mode 100644 index 7282272..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymorphy3.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymssql.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymssql.py deleted file mode 100644 index f3a3c96..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pymssql.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pynng.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pynng.py deleted file mode 100644 index f3b7499..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pynng.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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 https://pypi.org/project/pynng/ -""" - -hiddenimports = ['_cffi_backend'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pynput.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pynput.py deleted file mode 100644 index 0776e1d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pynput.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyodbc.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyodbc.py deleted file mode 100644 index bfa2f42..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyodbc.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyopencl.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyopencl.py deleted file mode 100644 index 9646426..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyopencl.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypdfium2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypdfium2.py deleted file mode 100644 index 1005a8b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypdfium2.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypdfium2_raw.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypdfium2_raw.py deleted file mode 100644 index 01a349d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypdfium2_raw.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypemicro.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypemicro.py deleted file mode 100644 index 7a6e873..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypemicro.py +++ /dev/null @@ -1,43 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyphen.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyphen.py deleted file mode 100644 index 9f0be6f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyphen.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyppeteer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyppeteer.py deleted file mode 100644 index 8c15c18..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyppeteer.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyproj.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyproj.py deleted file mode 100644 index 83390ef..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyproj.py +++ /dev/null @@ -1,72 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypsexec.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypsexec.py deleted file mode 100644 index c96a56e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypsexec.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypylon.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypylon.py deleted file mode 100644 index 395aaf9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pypylon.py +++ /dev/null @@ -1,48 +0,0 @@ -# ------------------------------------------------------------------ -# 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)] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyqtgraph.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyqtgraph.py deleted file mode 100644 index 0d8bf9c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyqtgraph.py +++ /dev/null @@ -1,56 +0,0 @@ -# ------------------------------------------------------------------ -# 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, - ) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyshark.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyshark.py deleted file mode 100644 index 46aae20..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyshark.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pysnmp.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pysnmp.py deleted file mode 100644 index 5824b58..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pysnmp.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pystray.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pystray.py deleted file mode 100644 index 835b0be..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pystray.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pytest.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pytest.py deleted file mode 100644 index 080d2e7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pytest.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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() diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pythainlp.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pythainlp.py deleted file mode 100644 index d5bdcc5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pythainlp.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pythoncom.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pythoncom.py deleted file mode 100644 index 05b0c1d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pythoncom.py +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------ -# 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)] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pytokens.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pytokens.py deleted file mode 100644 index 4810bf7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pytokens.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# Copyright (c) 2026 PyInstaller Development Team. -# -# This file is distributed under the terms of the GNU General Public -# License (version 2.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.mypy import find_mypyc_module_for_dist - -# pytokens >= 0.4.0 uses `mypy`, and includes a top-level module with dynamically-generated name prefix; -# for example, `fd7dcdb10166ebd4db98__mypyc`. -hiddenimports = find_mypyc_module_for_dist('pytokens') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyttsx.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyttsx.py deleted file mode 100644 index 36fceb2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyttsx.py +++ /dev/null @@ -1,23 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyttsx3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyttsx3.py deleted file mode 100644 index ac3edf8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyttsx3.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyviz_comms.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyviz_comms.py deleted file mode 100644 index 5a882c9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyviz_comms.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyvjoy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyvjoy.py deleted file mode 100644 index d72e13e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pyvjoy.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pywintypes.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pywintypes.py deleted file mode 100644 index b452e93..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pywintypes.py +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------ -# 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)] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pywt.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pywt.py deleted file mode 100644 index e1b5f36..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-pywt.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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. diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-qtmodern.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-qtmodern.py deleted file mode 100644 index 2adb2b7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-qtmodern.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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"]) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-radicale.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-radicale.py deleted file mode 100644 index 56b487a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-radicale.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-raven.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-raven.py deleted file mode 100644 index fe6f8e6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-raven.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rawpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rawpy.py deleted file mode 100644 index 7daf325..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rawpy.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rdflib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rdflib.py deleted file mode 100644 index 7fc6631..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rdflib.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-redmine.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-redmine.py deleted file mode 100644 index 1291095..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-redmine.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-regex.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-regex.py deleted file mode 100644 index e55764e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-regex.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-reportlab.lib.utils.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-reportlab.lib.utils.py deleted file mode 100644 index eb3ce68..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-reportlab.lib.utils.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-reportlab.pdfbase._fontdata.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-reportlab.pdfbase._fontdata.py deleted file mode 100644 index e4e8e9a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-reportlab.pdfbase._fontdata.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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_')) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-resampy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-resampy.py deleted file mode 100644 index 8b45d2c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-resampy.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rich.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rich.py deleted file mode 100644 index 239056a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rich.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# Copyright (c) 2026 PyInstaller Development Team. -# -# This file is distributed under the terms of the GNU General Public -# License (version 2.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 - -# Starting with v14.3.0, we need to collect modules from `rich._unicode_data`. -if is_module_satisfies('rich >= 14.3.0'): - hiddenimports = collect_submodules('rich._unicode_data') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rlp.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rlp.py deleted file mode 100644 index c59c1b6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rlp.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rpy2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rpy2.py deleted file mode 100644 index f37c2b6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rpy2.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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", -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rtree.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rtree.py deleted file mode 100644 index 67899d3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rtree.py +++ /dev/null @@ -1,46 +0,0 @@ -# ------------------------------------------------------------------ -# 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*") - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ruamel.yaml.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ruamel.yaml.py deleted file mode 100644 index 23339e9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ruamel.yaml.py +++ /dev/null @@ -1,39 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -} diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rubicon.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rubicon.py deleted file mode 100644 index 68116a1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-rubicon.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sacremoses.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sacremoses.py deleted file mode 100644 index 23b00db..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sacremoses.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sam2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sam2.py deleted file mode 100644 index 321da39..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sam2.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -} diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-saml2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-saml2.py deleted file mode 100644 index 244944a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-saml2.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-schwifty.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-schwifty.py deleted file mode 100644 index a8b30ca..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-schwifty.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-seedir.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-seedir.py deleted file mode 100644 index 28ed6b5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-seedir.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-selectolax.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-selectolax.py deleted file mode 100644 index 53b3086..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-selectolax.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-selenium.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-selenium.py deleted file mode 100644 index 13a312a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-selenium.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sentry_sdk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sentry_sdk.py deleted file mode 100644 index 02afaf3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sentry_sdk.py +++ /dev/null @@ -1,39 +0,0 @@ -# ------------------------------------------------------------------ -# 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 import isolated - -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", -] - - -@isolated.decorate -def _get_integration_modules(): - import sentry_sdk.integrations as si - - # _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 - integrations = getattr(si, '_AUTO_ENABLING_INTEGRATIONS', []) - - # The list contains fully-qualified class names; turn them into module names by removing the last component. - return [integration_name.rsplit('.', maxsplit=1)[0] for integration_name in integrations] - - -hiddenimports += _get_integration_modules() diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-setuptools_scm.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-setuptools_scm.py deleted file mode 100644 index 8e22d91..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-setuptools_scm.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-shapely.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-shapely.py deleted file mode 100644 index 6899367..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-shapely.py +++ /dev/null @@ -1,105 +0,0 @@ -# ------------------------------------------------------------------ -# 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') or find_library('libgeos_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)] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-shotgun_api3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-shotgun_api3.py deleted file mode 100644 index 3ccf68a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-shotgun_api3.py +++ /dev/null @@ -1,23 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-simplemma.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-simplemma.py deleted file mode 100644 index a233c66..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-simplemma.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.color.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.color.py deleted file mode 100644 index d79f3fd..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.color.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.data.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.data.py deleted file mode 100644 index 8f59def..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.data.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.draw.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.draw.py deleted file mode 100644 index e52d351..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.draw.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.exposure.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.exposure.py deleted file mode 100644 index e737efb..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.exposure.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.feature.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.feature.py deleted file mode 100644 index 29d376d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.feature.py +++ /dev/null @@ -1,26 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.filters.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.filters.py deleted file mode 100644 index e88726c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.filters.py +++ /dev/null @@ -1,24 +0,0 @@ -# ------------------------------------------------------------------ -# 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', ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.future.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.future.py deleted file mode 100644 index 41905d4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.future.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.graph.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.graph.py deleted file mode 100644 index 2caffd4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.graph.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.io.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.io.py deleted file mode 100644 index 45d6663..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.io.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.measure.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.measure.py deleted file mode 100644 index 1cdaa2c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.measure.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.metrics.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.metrics.py deleted file mode 100644 index 7d575f5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.metrics.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.morphology.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.morphology.py deleted file mode 100644 index dc5c6c2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.morphology.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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"]) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.py deleted file mode 100644 index 03e3ec0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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"]) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.registration.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.registration.py deleted file mode 100644 index 0ffeee8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.registration.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.restoration.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.restoration.py deleted file mode 100644 index a048738..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.restoration.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.segmentation.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.segmentation.py deleted file mode 100644 index 48a3821..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.segmentation.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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 is_module_satisfies, collect_data_files, collect_submodules - -# As of scikit-image 0.26.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.26.0"): - datas = collect_data_files("skimage.segmentation", includes=["*.pyi"]) - hiddenimports = collect_submodules('skimage.segmentation', filter=lambda name: name != 'skimage.segmentation.tests') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.transform.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.transform.py deleted file mode 100644 index 3841a4e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.transform.py +++ /dev/null @@ -1,24 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.cluster.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.cluster.py deleted file mode 100644 index a855309..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.cluster.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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', ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.cupy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.cupy.py deleted file mode 100644 index 4c2275a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.cupy.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.dask.array.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.dask.array.py deleted file mode 100644 index 7779374..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.dask.array.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.numpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.numpy.py deleted file mode 100644 index 042a73a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.numpy.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.torch.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.torch.py deleted file mode 100644 index 207bb3d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.externals.array_api_compat.torch.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.linear_model.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.linear_model.py deleted file mode 100644 index ce5a884..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.linear_model.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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', ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.cluster.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.cluster.py deleted file mode 100644 index 3cbeb64..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.cluster.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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' - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.pairwise.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.pairwise.py deleted file mode 100644 index 188c1af..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.pairwise.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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', - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.py deleted file mode 100644 index 8bdea5f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.neighbors.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.neighbors.py deleted file mode 100644 index 937fe75..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.neighbors.py +++ /dev/null @@ -1,41 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.py deleted file mode 100644 index 25724f3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.tree.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.tree.py deleted file mode 100644 index 7a222e2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.tree.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.utils.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.utils.py deleted file mode 100644 index 10f44d7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.utils.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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.utils._cython_blas'] - -# As of scikit-learn 1.7.1, the `sklearn.utils._isfinite` extension started to depend on newly-introduced -# `sklearn._cyutility`. -if is_module_satisfies('scikit-learn >= 1.7.1'): - hiddenimports += ['sklearn._cyutility'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skyfield.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skyfield.py deleted file mode 100644 index 8394b34..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-skyfield.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-slixmpp.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-slixmpp.py deleted file mode 100644 index 93bd8a1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-slixmpp.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sound_lib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sound_lib.py deleted file mode 100644 index ed290ea..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sound_lib.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sounddevice.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sounddevice.py deleted file mode 100644 index 6316b03..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sounddevice.py +++ /dev/null @@ -1,62 +0,0 @@ -# ------------------------------------------------------------------ -# 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!") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-soundfile.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-soundfile.py deleted file mode 100644 index f788c38..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-soundfile.py +++ /dev/null @@ -1,62 +0,0 @@ -# ------------------------------------------------------------------ -# 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!") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spacy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spacy.py deleted file mode 100644 index 25ee44e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spacy.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-speech_recognition.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-speech_recognition.py deleted file mode 100644 index fb7d179..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-speech_recognition.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spiceypy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spiceypy.py deleted file mode 100644 index 3444d93..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spiceypy.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spnego.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spnego.py deleted file mode 100644 index b038573..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-spnego.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-srsly.msgpack._packer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-srsly.msgpack._packer.py deleted file mode 100644 index 519cd0b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-srsly.msgpack._packer.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sspilib.raw.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sspilib.raw.py deleted file mode 100644 index 7fbd239..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sspilib.raw.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-statsmodels.tsa.statespace.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-statsmodels.tsa.statespace.py deleted file mode 100644 index 547d706..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-statsmodels.tsa.statespace.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-stdnum.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-stdnum.py deleted file mode 100644 index 068e960..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-stdnum.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-storm.database.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-storm.database.py deleted file mode 100644 index 1cde580..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-storm.database.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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' -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sudachipy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sudachipy.py deleted file mode 100644 index 1abb48e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sudachipy.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------------------------------------ -# 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] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sunpy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sunpy.py deleted file mode 100644 index 4a069e4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sunpy.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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. diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sv_ttk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sv_ttk.py deleted file mode 100644 index 0f37e32..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-sv_ttk.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-swagger_spec_validator.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-swagger_spec_validator.py deleted file mode 100644 index bb4b4d1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-swagger_spec_validator.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tableauhyperapi.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tableauhyperapi.py deleted file mode 100644 index 210daef..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tableauhyperapi.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tables.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tables.py deleted file mode 100644 index 440c6a1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tables.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tcod.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tcod.py deleted file mode 100644 index d5b076e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tcod.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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='.') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tensorflow.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tensorflow.py deleted file mode 100644 index 6a7a50a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tensorflow.py +++ /dev/null @@ -1,188 +0,0 @@ -# ------------------------------------------------------------------ -# 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_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, -) - -# 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', - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-text_unidecode.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-text_unidecode.py deleted file mode 100644 index 68902ca..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-text_unidecode.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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')] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-textdistance.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-textdistance.py deleted file mode 100644 index 4859014..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-textdistance.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-thinc.backends.numpy_ops.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-thinc.backends.numpy_ops.py deleted file mode 100644 index fcb3e88..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-thinc.backends.numpy_ops.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-thinc.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-thinc.py deleted file mode 100644 index 7623253..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-thinc.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-timezonefinder.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-timezonefinder.py deleted file mode 100644 index e5cd309..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-timezonefinder.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-timm.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-timm.py deleted file mode 100644 index 1ff1a61..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-timm.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tinycss2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tinycss2.py deleted file mode 100644 index d06ab79..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tinycss2.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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__)) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterdnd2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterdnd2.py deleted file mode 100644 index 4b07d33..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterdnd2.py +++ /dev/null @@ -1,90 +0,0 @@ -# ------------------------------------------------------------------ -# 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()) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb.py deleted file mode 100644 index bb02c6c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb_tkhtml.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb_tkhtml.py deleted file mode 100644 index 33c6374..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb_tkhtml.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb_tkhtml_extras.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb_tkhtml_extras.py deleted file mode 100644 index 6ec0db4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb_tkhtml_extras.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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_extras') - -# Collect binaries from 'tkhtml' -binaries = collect_dynamic_libs('tkinterweb_tkhtml_extras') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga.py deleted file mode 100644 index be80488..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga.py +++ /dev/null @@ -1,44 +0,0 @@ -# ------------------------------------------------------------------ -# 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_data_files, 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") - -# Starting with `toga` 0.5.2, we need to collect .pyi files. -if is_module_satisfies("toga >= 0.5.2"): - datas += collect_data_files("toga") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_cocoa.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_cocoa.py deleted file mode 100644 index c6142f4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_cocoa.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_gtk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_gtk.py deleted file mode 100644 index 2e0353e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_gtk.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_winforms.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_winforms.py deleted file mode 100644 index adebb9a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-toga_winforms.py +++ /dev/null @@ -1,40 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torch.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torch.py deleted file mode 100644 index 85e75cf..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torch.py +++ /dev/null @@ -1,179 +0,0 @@ -# ------------------------------------------------------------------ -# 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 import compat - 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 compat.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 compat.is_win: - def _collect_mkl_dlls(): - # Determine if torch is packaged by Anaconda or not. Ideally, we would use our `get_installer()` hook - # utility function to check if installer is `conda`. However, it seems that some builds (e.g., those from - # `pytorch` and `nvidia` channels) provide legacy metadata in form of .egg-info directory, which does not - # include an INSTALLER file. So instead, search the conda metadata for a conda distribution/package that - # provides a `torch` importable package, if any. - conda_torch_dist = None - if compat.is_conda: - from PyInstaller.utils.hooks import conda_support - try: - conda_torch_dist = conda_support.package_distribution('torch') - except ModuleNotFoundError: - conda_torch_dist = None - - if conda_torch_dist: - # Anaconda-packaged torch - if 'mkl' not in conda_torch_dist.dependencies: - logger.info('hook-torch: this torch build (Anaconda package) does not depend on MKL...') - return [] - - logger.info('hook-torch: collecting DLLs from MKL and its dependencies (Anaconda packages)') - mkl_binaries = conda_support.collect_dynamic_libs('mkl', dependencies=True) - else: - # Non-Anaconda torch (e.g., PyPI wheel) - 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 [] - - # 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 or []): - # 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), '.')) - - if mkl_binaries: - logger.info( - 'hook-torch: found MKL DLLs: %r', - sorted([os.path.basename(src_name) for src_name, dest_name in mkl_binaries]) - ) - else: - logger.info('hook-torch: no MKL DLLs found.') - - 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchao.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchao.py deleted file mode 100644 index 5d36ef1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchao.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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 -# ------------------------------------------------------------------ - -# Collect source .py files for JIT/torchscript. -module_collection_mode = 'pyz+py' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchaudio.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchaudio.py deleted file mode 100644 index 57e570e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchaudio.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchtext.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchtext.py deleted file mode 100644 index 5ada443..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchtext.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchvision.io.image.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchvision.io.image.py deleted file mode 100644 index ba4a894..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchvision.io.image.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchvision.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchvision.py deleted file mode 100644 index f0ce8e4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-torchvision.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame.py deleted file mode 100644 index 404221a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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"] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_client.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_client.py deleted file mode 100644 index c134034..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_client.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_code.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_code.py deleted file mode 100644 index 333020b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_code.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_components.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_components.py deleted file mode 100644 index d49cfb4..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_components.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_datagrid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_datagrid.py deleted file mode 100644 index 601481c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_datagrid.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_deckgl.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_deckgl.py deleted file mode 100644 index 091566e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_deckgl.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_formkit.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_formkit.py deleted file mode 100644 index f677965..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_formkit.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_grid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_grid.py deleted file mode 100644 index 0373131..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_grid.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_iframe.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_iframe.py deleted file mode 100644 index 5ee77f7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_iframe.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_keycloak.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_keycloak.py deleted file mode 100644 index 89413a6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_keycloak.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_leaflet.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_leaflet.py deleted file mode 100644 index 9e2f295..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_leaflet.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_markdown.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_markdown.py deleted file mode 100644 index 7107379..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_markdown.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_matplotlib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_matplotlib.py deleted file mode 100644 index 63e6e66..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_matplotlib.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_mesh_streamer.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_mesh_streamer.py deleted file mode 100644 index b782f7a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_mesh_streamer.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_plotly.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_plotly.py deleted file mode 100644 index eaa2ecd..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_plotly.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_pvui.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_pvui.py deleted file mode 100644 index 209cd63..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_pvui.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_quasar.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_quasar.py deleted file mode 100644 index 3dc1c26..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_quasar.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_rca.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_rca.py deleted file mode 100644 index b9e5da9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_rca.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_router.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_router.py deleted file mode 100644 index a756569..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_router.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_simput.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_simput.py deleted file mode 100644 index d80a7ec..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_simput.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_tauri.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_tauri.py deleted file mode 100644 index af47491..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_tauri.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_tweakpane.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_tweakpane.py deleted file mode 100644 index 81c9190..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_tweakpane.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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")] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vega.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vega.py deleted file mode 100644 index fe157d2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vega.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtk.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtk.py deleted file mode 100644 index 865cbd9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtk.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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"), -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtk3d.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtk3d.py deleted file mode 100644 index 1c85729..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtk3d.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtklocal.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtklocal.py deleted file mode 100644 index 288e1e8..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtklocal.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vuetify.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vuetify.py deleted file mode 100644 index 4ea24fc..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vuetify.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_xterm.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_xterm.py deleted file mode 100644 index 39c3a72..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trame_xterm.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-transformers.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-transformers.py deleted file mode 100644 index 6fd7a35..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-transformers.py +++ /dev/null @@ -1,37 +0,0 @@ -from 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-travertino.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-travertino.py deleted file mode 100644 index 6afc577..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-travertino.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trimesh.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trimesh.py deleted file mode 100644 index 90ebfda..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-trimesh.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-triton.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-triton.py deleted file mode 100644 index a1e006c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-triton.py +++ /dev/null @@ -1,47 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ttkthemes.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ttkthemes.py deleted file mode 100644 index 87c731b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ttkthemes.py +++ /dev/null @@ -1,56 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ttkwidgets.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ttkwidgets.py deleted file mode 100644 index 94c65e3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ttkwidgets.py +++ /dev/null @@ -1,38 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tzdata.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tzdata.py deleted file mode 100644 index 2f540db..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tzdata.py +++ /dev/null @@ -1,22 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tzwhere.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tzwhere.py deleted file mode 100644 index 5c583af..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-tzwhere.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-u1db.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-u1db.py deleted file mode 100644 index ddd32c9..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-u1db.py +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ultralytics.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ultralytics.py deleted file mode 100644 index c49eac3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-ultralytics.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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' diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-umap.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-umap.py deleted file mode 100644 index 5ae0d4d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-umap.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-unidecode.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-unidecode.py deleted file mode 100644 index a51d89d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-unidecode.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uniseg.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uniseg.py deleted file mode 100644 index af28f0f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uniseg.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-urllib3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-urllib3.py deleted file mode 100644 index cafd1b0..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-urllib3.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-urllib3_future.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-urllib3_future.py deleted file mode 100644 index 0baa1d7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-urllib3_future.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-usb.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-usb.py deleted file mode 100644 index 5721eaa..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-usb.py +++ /dev/null @@ -1,91 +0,0 @@ -# ------------------------------------------------------------------ -# 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], '.')] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uuid6.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uuid6.py deleted file mode 100644 index 8a85018..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uuid6.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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 is_module_satisfies, copy_metadata - -# Starting with version 2025.0.1, uuid6 queries its metadata for version information. -if is_module_satisfies('uuid6 >= 2025.0.1'): - datas = copy_metadata('uuid6') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uvicorn.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uvicorn.py deleted file mode 100644 index 0acdd3c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uvicorn.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uvloop.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uvloop.py deleted file mode 100644 index 4c4280c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-uvloop.py +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vaderSentiment.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vaderSentiment.py deleted file mode 100644 index 0879fff..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vaderSentiment.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmDataModel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmDataModel.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmDataModel.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmFilters.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmFilters.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkAcceleratorsVTKmFilters.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkChartsCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkChartsCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkChartsCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonColor.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonColor.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonColor.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonComputationalGeometry.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonComputationalGeometry.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonComputationalGeometry.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonDataModel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonDataModel.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonDataModel.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonExecutionModel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonExecutionModel.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonExecutionModel.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonMath.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonMath.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonMath.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonMisc.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonMisc.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonMisc.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonPython.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonPython.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonPython.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonSystem.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonSystem.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonSystem.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonTransforms.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonTransforms.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkCommonTransforms.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkDomainsChemistry.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkDomainsChemistry.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkDomainsChemistry.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkDomainsChemistryOpenGL2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkDomainsChemistryOpenGL2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkDomainsChemistryOpenGL2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersAMR.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersAMR.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersAMR.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersCellGrid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersCellGrid.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersCellGrid.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersExtraction.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersExtraction.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersExtraction.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersFlowPaths.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersFlowPaths.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersFlowPaths.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeneral.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeneral.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeneral.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeneric.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeneric.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeneric.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeometry.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeometry.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeometry.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeometryPreview.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeometryPreview.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersGeometryPreview.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersHybrid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersHybrid.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersHybrid.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersHyperTree.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersHyperTree.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersHyperTree.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersImaging.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersImaging.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersImaging.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersModeling.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersModeling.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersModeling.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallel.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallel.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelDIY2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelDIY2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelDIY2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelImaging.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelImaging.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelImaging.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelStatistics.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelStatistics.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersParallelStatistics.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersPoints.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersPoints.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersPoints.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersProgrammable.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersProgrammable.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersProgrammable.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersPython.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersPython.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersPython.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersReduction.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersReduction.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersReduction.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSMP.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSMP.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSMP.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSelection.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSelection.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSelection.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSources.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSources.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersSources.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersStatistics.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersStatistics.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersStatistics.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTemporal.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTemporal.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTemporal.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTensor.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTensor.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTensor.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTexture.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTexture.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTexture.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTopology.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTopology.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersTopology.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersVerdict.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersVerdict.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkFiltersVerdict.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkGeovisCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkGeovisCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkGeovisCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAMR.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAMR.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAMR.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAsynchronous.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAsynchronous.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAsynchronous.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAvmesh.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAvmesh.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAvmesh.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCGNSReader.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCGNSReader.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCGNSReader.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCONVERGECFD.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCONVERGECFD.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCONVERGECFD.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCellGrid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCellGrid.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCellGrid.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCesium3DTiles.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCesium3DTiles.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCesium3DTiles.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOChemistry.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOChemistry.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOChemistry.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCityGML.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCityGML.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCityGML.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOERF.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOERF.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOERF.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOEnSight.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOEnSight.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOEnSight.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOEngys.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOEngys.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOEngys.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExodus.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExodus.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExodus.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExport.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExport.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExport.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExportGL2PS.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExportGL2PS.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExportGL2PS.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExportPDF.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExportPDF.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExportPDF.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOFDS.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOFDS.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOFDS.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOFLUENTCFF.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOFLUENTCFF.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOFLUENTCFF.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOGeoJSON.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOGeoJSON.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOGeoJSON.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOGeometry.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOGeometry.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOGeometry.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOH5Rage.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOH5Rage.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOH5Rage.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOH5part.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOH5part.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOH5part.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOHDF.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOHDF.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOHDF.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOIOSS.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOIOSS.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOIOSS.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOImage.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOImage.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOImage.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOImport.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOImport.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOImport.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOInfovis.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOInfovis.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOInfovis.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLANLX3D.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLANLX3D.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLANLX3D.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLSDyna.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLSDyna.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLSDyna.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLegacy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLegacy.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLegacy.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMINC.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMINC.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMINC.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMotionFX.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMotionFX.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMotionFX.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMovie.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMovie.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMovie.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIONetCDF.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIONetCDF.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIONetCDF.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOOMF.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOOMF.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOOMF.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOOggTheora.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOOggTheora.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOOggTheora.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOPIO.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOPIO.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOPIO.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOPLY.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOPLY.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOPLY.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallel.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallel.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelExodus.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelExodus.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelExodus.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelLSDyna.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelLSDyna.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelLSDyna.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelXML.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelXML.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOParallelXML.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOSQL.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOSQL.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOSQL.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOSegY.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOSegY.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOSegY.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOTRUCHAS.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOTRUCHAS.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOTRUCHAS.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOTecplotTable.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOTecplotTable.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOTecplotTable.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVPIC.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVPIC.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVPIC.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVeraOut.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVeraOut.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVeraOut.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVideo.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVideo.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVideo.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXML.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXML.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXML.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXMLParser.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXMLParser.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXMLParser.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXdmf2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXdmf2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXdmf2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingColor.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingColor.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingColor.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingFourier.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingFourier.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingFourier.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingGeneral.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingGeneral.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingGeneral.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingHybrid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingHybrid.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingHybrid.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingMath.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingMath.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingMath.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingMorphological.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingMorphological.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingMorphological.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingOpenGL2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingOpenGL2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingOpenGL2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingSources.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingSources.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingSources.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingStatistics.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingStatistics.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingStatistics.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingStencil.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingStencil.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkImagingStencil.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInfovisCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInfovisCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInfovisCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInfovisLayout.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInfovisLayout.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInfovisLayout.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionImage.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionImage.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionImage.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionStyle.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionStyle.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionStyle.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionWidgets.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionWidgets.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkInteractionWidgets.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkParallelCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkParallelCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkParallelCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkPythonContext2D.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkPythonContext2D.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkPythonContext2D.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingAnnotation.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingAnnotation.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingAnnotation.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingCellGrid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingCellGrid.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingCellGrid.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingContext2D.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingContext2D.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingContext2D.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingContextOpenGL2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingContextOpenGL2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingContextOpenGL2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingExternal.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingExternal.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingExternal.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingFreeType.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingFreeType.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingFreeType.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingGL2PSOpenGL2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingGL2PSOpenGL2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingGL2PSOpenGL2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingGridAxes.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingGridAxes.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingGridAxes.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingHyperTreeGrid.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingHyperTreeGrid.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingHyperTreeGrid.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingImage.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingImage.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingImage.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLICOpenGL2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLICOpenGL2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLICOpenGL2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLOD.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLOD.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLOD.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLabel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLabel.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingLabel.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingMatplotlib.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingMatplotlib.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingMatplotlib.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingOpenGL2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingOpenGL2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingOpenGL2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingParallel.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingParallel.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingParallel.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingSceneGraph.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingSceneGraph.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingSceneGraph.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingUI.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingUI.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingUI.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVR.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVR.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVR.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVRModels.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVRModels.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVRModels.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolume.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolume.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolume.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolumeAMR.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolumeAMR.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolumeAMR.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolumeOpenGL2.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolumeOpenGL2.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVolumeOpenGL2.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVtkJS.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVtkJS.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkRenderingVtkJS.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkSerializationManager.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkSerializationManager.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkSerializationManager.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkTestingRendering.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkTestingRendering.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkTestingRendering.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkTestingSerialization.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkTestingSerialization.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkTestingSerialization.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsContext2D.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsContext2D.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsContext2D.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsInfovis.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsInfovis.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsInfovis.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkWebCore.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkWebCore.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkWebCore.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkWebGLExporter.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkWebGLExporter.py deleted file mode 100644 index 960187b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkWebGLExporter.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkpython.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkpython.py deleted file mode 100644 index 76c1e60..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-vtkpython.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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' - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wavefile.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wavefile.py deleted file mode 100644 index 11dc973..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wavefile.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-weasyprint.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-weasyprint.py deleted file mode 100644 index e0814ea..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-weasyprint.py +++ /dev/null @@ -1,85 +0,0 @@ -# ------------------------------------------------------------------ -# 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!' - ) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-web3.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-web3.py deleted file mode 100644 index bc5c97e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-web3.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webassets.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webassets.py deleted file mode 100644 index 8a4b983..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webassets.py +++ /dev/null @@ -1,14 +0,0 @@ -# ------------------------------------------------------------------ -# 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) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webrtcvad.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webrtcvad.py deleted file mode 100644 index 853ead1..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webrtcvad.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-websockets.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-websockets.py deleted file mode 100644 index 84e0ec2..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-websockets.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webview.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webview.py deleted file mode 100644 index e465a66..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-webview.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-win32com.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-win32com.py deleted file mode 100644 index 346d133..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-win32com.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------ -# 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', -] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wordcloud.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wordcloud.py deleted file mode 100644 index 831a3f6..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wordcloud.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-workflow.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-workflow.py deleted file mode 100644 index 43de8d7..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-workflow.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.lib.activex.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.lib.activex.py deleted file mode 100644 index e3deb15..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.lib.activex.py +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------ -# 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 import isolated - - -# This is necessary because on first import, `wx.lib.activex` generates .tlb file for `comtypes`, unless running in a -# frozen application (in which case, the .tlb file is expected to exist already). So if we are building in a completely -# clean python environment (for example, in a CI/CD pipeline), we need to ensure that .tlb file is generated. -@isolated.decorate -def _ensure_tlb_file_exists(): - try: - import wx.lib.activex # noqa: F401 - except Exception: - pass - - -_ensure_tlb_file_exists() diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.lib.pubsub.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.lib.pubsub.py deleted file mode 100644 index c95f591..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.lib.pubsub.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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__']) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.xrc.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.xrc.py deleted file mode 100644 index 10c86a3..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-wx.xrc.py +++ /dev/null @@ -1,13 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xarray.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xarray.py deleted file mode 100644 index 79a1da5..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xarray.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xml.dom.html.HTMLDocument.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xml.dom.html.HTMLDocument.py deleted file mode 100644 index 97c7f4d..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xml.dom.html.HTMLDocument.py +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------------ -# 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', - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xml.sax.saxexts.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xml.sax.saxexts.py deleted file mode 100644 index 5be293b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xml.sax.saxexts.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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", - ] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xmldiff.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xmldiff.py deleted file mode 100644 index eb2b966..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xmldiff.py +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xmlschema.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xmlschema.py deleted file mode 100644 index 05a777c..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xmlschema.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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") diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xsge_gui.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xsge_gui.py deleted file mode 100644 index 068781e..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xsge_gui.py +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xyzservices.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xyzservices.py deleted file mode 100644 index d7b0ecf..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-xyzservices.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-yapf_third_party.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-yapf_third_party.py deleted file mode 100644 index d138c53..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-yapf_third_party.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-z3c.rml.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-z3c.rml.py deleted file mode 100644 index 658e44f..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-z3c.rml.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# 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", - ], -) diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zarr.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zarr.py deleted file mode 100644 index 0aefa8a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zarr.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zeep.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zeep.py deleted file mode 100644 index 002e106..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zeep.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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') diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zmq.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zmq.py deleted file mode 100644 index 5a9f833..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zmq.py +++ /dev/null @@ -1,63 +0,0 @@ -# ------------------------------------------------------------------ -# 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] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zoneinfo.py b/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zoneinfo.py deleted file mode 100644 index 03a5e41..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/stdhooks/hook-zoneinfo.py +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------ -# 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'] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/utils/__init__.py b/voxvera/vendor/_pyinstaller_hooks_contrib/utils/__init__.py deleted file mode 100644 index 792d600..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/utils/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/utils/mypy.py b/voxvera/vendor/_pyinstaller_hooks_contrib/utils/mypy.py deleted file mode 100644 index b2da38b..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/utils/mypy.py +++ /dev/null @@ -1,25 +0,0 @@ -# ------------------------------------------------------------------ -# Copyright (c) 2026 PyInstaller Development Team. -# -# This file is distributed under the terms of the GNU General Public -# License (version 2.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.compat import importlib_metadata - - -# Given the distribution name, find the top-level `mypyc` extension module belonging to that distribution. The said -# top-level module is called something like `30fcd23745efe32ce681__mypyc`; the prefix changes across different versions -# of the same distribution (and, of course, across different distributions). Therefore, we need to obtain the name by -# looking at distribution's list of files. -def find_mypyc_module_for_dist(dist_name): - try: - dist = importlib_metadata.distribution(dist_name) - except importlib_metadata.PackageNotFoundError: - return [] - return [entry.name.split('.')[0] for entry in (dist.files or []) if '__mypyc' in entry.name] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/utils/nvidia_cuda.py b/voxvera/vendor/_pyinstaller_hooks_contrib/utils/nvidia_cuda.py deleted file mode 100644 index b93064a..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/utils/nvidia_cuda.py +++ /dev/null @@ -1,77 +0,0 @@ -# ------------------------------------------------------------------ -# 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*')] diff --git a/voxvera/vendor/_pyinstaller_hooks_contrib/utils/vtkmodules.py b/voxvera/vendor/_pyinstaller_hooks_contrib/utils/vtkmodules.py deleted file mode 100644 index cd00c97..0000000 --- a/voxvera/vendor/_pyinstaller_hooks_contrib/utils/vtkmodules.py +++ /dev/null @@ -1,622 +0,0 @@ -import os - -from _pyinstaller_hooks_contrib.compat import importlib_metadata -import packaging.version - -try: - vtk_version = packaging.version.Version(importlib_metadata.version('vtk')).release -except Exception: - vtk_version = None - - -# 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.vtkIOAvmesh': [ - 'vtkmodules.vtkCommonExecutionModel', - 'vtkmodules.vtkIOCore', - ], - '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.vtkIOCore', - 'vtkmodules.vtkRenderingCore', - ], - 'vtkmodules.vtkIOImage': [ - 'vtkmodules.vtkCommonExecutionModel', - 'vtkmodules.vtkImagingCore', - ], - 'vtkmodules.vtkIOInfovis': [ - 'vtkmodules.vtkCommonExecutionModel', - 'vtkmodules.vtkIOLegacy', - 'vtkmodules.vtkIOXML', - ], - 'vtkmodules.vtkIOLANLX3D': [ - 'vtkmodules.vtkCommonExecutionModel', - ], - '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.vtkRenderingGridAxes': [ - 'vtkmodules.vtkChartsCore', - '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.vtkTestingSerialization': [ - 'vtkmodules.vtkCommonDataModel', - 'vtkmodules.vtkSerializationManager', - ], - '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', - ], -} - -# Additional hidden imports for vtk 9.6.0 -if vtk_version is not None and vtk_version >= (9, 6, 0): - # Additional - _module_dependencies['vtkmodules.vtkIOImage'] += ['vtkmodules.vtkIOCore'] - _module_dependencies['vtkmodules.vtkViewsInfovis'] += ['vtkmodules.vtkChartsCore'] - - # New - _module_dependencies['vtkmodules.vtkSerializationManager'] = ['vtkmodules.vtkCommonDataModel'] - - -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, [])] diff --git a/voxvera/vendor/altgraph-0.17.5.dist-info/INSTALLER b/voxvera/vendor/altgraph-0.17.5.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/altgraph-0.17.5.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/altgraph-0.17.5.dist-info/LICENSE b/voxvera/vendor/altgraph-0.17.5.dist-info/LICENSE deleted file mode 100644 index 6013a21..0000000 --- a/voxvera/vendor/altgraph-0.17.5.dist-info/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2004 Istvan Albert unless otherwise noted. -Copyright (c) 2006-2010 Bob Ippolito -Copyright (2) 2010-2020 Ronald Oussoren, et. al. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/voxvera/vendor/altgraph-0.17.5.dist-info/METADATA b/voxvera/vendor/altgraph-0.17.5.dist-info/METADATA deleted file mode 100644 index 4e53760..0000000 --- a/voxvera/vendor/altgraph-0.17.5.dist-info/METADATA +++ /dev/null @@ -1,307 +0,0 @@ -Metadata-Version: 2.1 -Name: altgraph -Version: 0.17.5 -Summary: Python graph (network) package -Home-page: https://altgraph.readthedocs.io -Download-URL: http://pypi.python.org/pypi/altgraph -Author: Ronald Oussoren -Author-email: ronaldoussoren@mac.com -Maintainer: Ronald Oussoren -Maintainer-email: ronaldoussoren@mac.com -License: MIT -Keywords: graph -Platform: any -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: 3.13 -Classifier: Programming Language :: Python :: 3.14 -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Topic :: Scientific/Engineering :: Mathematics -Classifier: Topic :: Scientific/Engineering :: Visualization -Description-Content-Type: text/x-rst; charset=UTF-8 -License-File: LICENSE -Project-URL: Documentation, https://altgraph.readthedocs.io/en/latest/ -Project-URL: Issue tracker, https://github.com/ronaldoussoren/altgraph/issues -Project-URL: Repository, https://github.com/ronaldoussoren/altgraph - -altgraph is a fork of graphlib: a graph (network) package for constructing -graphs, BFS and DFS traversals, topological sort, shortest paths, etc. with -graphviz output. - -altgraph includes some additional usage of Python 2.6+ features and -enhancements related to modulegraph and macholib. - -Project links -------------- - -* `Documentation `_ - -* `Issue Tracker `_ - -* `Repository `_ - - -Release history -=============== - -0.17.5 ------- - -* Update classifiers for Python 3.13 and 3.14 - -* Drop dependency on "pkg_resources" - -0.17.4 ------- - -* Update classifiers for Python 3.12 - -0.17.3 ------- - -* Update classifiers for Python 3.11 - -0.17.2 ------- - -* Change in setup.py to fix the sidebar links on PyPI - -0.17.1 ------- - -* Explicitly mark Python 3.10 as supported in wheel metadata. - -0.17 ----- - -* Explicitly mark Python 3.8 as supported in wheel metadata. - -* Migrate from Bitbucket to GitHub - -* Run black on the entire repository - -0.16.1 ------- - -* Explicitly mark Python 3.7 as supported in wheel metadata. - -0.16 ----- - -* Add LICENSE file - -0.15 ----- - -* ``ObjectGraph.get_edges``, ``ObjectGraph.getEdgeData`` and ``ObjectGraph.updateEdgeData`` - accept *None* as the node to get and treat this as an alias for *self* (as other - methods already did). - -0.14 ----- - -- Issue #7: Remove use of ``iteritems`` in altgraph.GraphAlgo code - -0.13 ----- - -- Issue #4: Graph._bfs_subgraph and back_bfs_subgraph return subgraphs with reversed edges - - Fix by "pombredanne" on bitbucket. - - -0.12 ----- - -- Added ``ObjectGraph.edgeData`` to retrieve the edge data - from a specific edge. - -- Added ``AltGraph.update_edge_data`` and ``ObjectGraph.updateEdgeData`` - to update the data associated with a graph edge. - -0.11 ----- - -- Stabilize the order of elements in dot file exports, - patch from bitbucket user 'pombredanne'. - -- Tweak setup.py file to remove dependency on distribute (but - keep the dependency on setuptools) - - -0.10.2 ------- - -- There where no classifiers in the package metadata due to a bug - in setup.py - -0.10.1 ------- - -This is a bugfix release - -Bug fixes: - -- Issue #3: The source archive contains a README.txt - while the setup file refers to ReadMe.txt. - - This is caused by a misfeature in distutils, as a - workaround I've renamed ReadMe.txt to README.txt - in the source tree and setup file. - - -0.10 ------ - -This is a minor feature release - -Features: - -- Do not use "2to3" to support Python 3. - - As a side effect of this altgraph now supports - Python 2.6 and later, and no longer supports - earlier releases of Python. - -- The order of attributes in the Dot output - is now always alphabetical. - - With this change the output will be consistent - between runs and Python versions. - -0.9 ---- - -This is a minor bugfix release - -Features: - -- Added ``altgraph.ObjectGraph.ObjectGraph.nodes``, a method - yielding all nodes in an object graph. - -Bugfixes: - -- The 0.8 release didn't work with py2app when using - python 3.x. - - -0.8 ------ - -This is a minor feature release. The major new feature -is a extensive set of unittests, which explains almost -all other changes in this release. - -Bugfixes: - -- Installing failed with Python 2.5 due to using a distutils - class that isn't available in that version of Python - (issue #1 on the issue tracker) - -- ``altgraph.GraphStat.degree_dist`` now actually works - -- ``altgraph.Graph.add_edge(a, b, create_nodes=False)`` will - no longer create the edge when one of the nodes doesn't - exist. - -- ``altgraph.Graph.forw_topo_sort`` failed for some sparse graphs. - -- ``altgraph.Graph.back_topo_sort`` was completely broken in - previous releases. - -- ``altgraph.Graph.forw_bfs_subgraph`` now actually works. - -- ``altgraph.Graph.back_bfs_subgraph`` now actually works. - -- ``altgraph.Graph.iterdfs`` now returns the correct result - when the ``forward`` argument is ``False``. - -- ``altgraph.Graph.iterdata`` now returns the correct result - when the ``forward`` argument is ``False``. - - -Features: - -- The ``altgraph.Graph`` constructor now accepts an argument - that contains 2- and 3-tuples instead of requireing that - all items have the same size. The (optional) argument can now - also be any iterator. - -- ``altgraph.Graph.Graph.add_node`` has no effect when you - add a hidden node. - -- The private method ``altgraph.Graph._bfs`` is no longer - present. - -- The private method ``altgraph.Graph._dfs`` is no longer - present. - -- ``altgraph.ObjectGraph`` now has a ``__contains__`` methods, - which means you can use the ``in`` operator to check if a - node is part of a graph. - -- ``altgraph.GraphUtil.generate_random_graph`` will raise - ``GraphError`` instead of looping forever when it is - impossible to create the requested graph. - -- ``altgraph.Dot.edge_style`` raises ``GraphError`` when - one of the nodes is not present in the graph. The method - silently added the tail in the past, but without ensuring - a consistent graph state. - -- ``altgraph.Dot.save_img`` now works when the mode is - ``"neato"``. - -0.7.2 ------ - -This is a minor bugfix release - -Bugfixes: - -- distutils didn't include the documentation subtree - -0.7.1 ------ - -This is a minor feature release - -Features: - -- Documentation is now generated using `sphinx `_ - and can be viewed at . - -- The repository has moved to bitbucket - -- ``altgraph.GraphStat.avg_hops`` is no longer present, the function had no - implementation and no specified behaviour. - -- the module ``altgraph.compat`` is gone, which means altgraph will no - longer work with Python 2.3. - - -0.7.0 ------ - -This is a minor feature release. - -Features: - -- Support for Python 3 - -- It is now possible to run tests using 'python setup.py test' - - (The actual testsuite is still very minimal though) diff --git a/voxvera/vendor/altgraph-0.17.5.dist-info/RECORD b/voxvera/vendor/altgraph-0.17.5.dist-info/RECORD deleted file mode 100644 index 2c92ea7..0000000 --- a/voxvera/vendor/altgraph-0.17.5.dist-info/RECORD +++ /dev/null @@ -1,14 +0,0 @@ -altgraph-0.17.5.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -altgraph-0.17.5.dist-info/LICENSE,sha256=bBlNbbDGTUVTXRDJUUK5sM2nt9zH8d3uMCs9U289vkY,1002 -altgraph-0.17.5.dist-info/METADATA,sha256=3GBkHboimjrvCfdk9WLDjZCLkwySYVry5iavMdb_GbU,7519 -altgraph-0.17.5.dist-info/RECORD,, -altgraph-0.17.5.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110 -altgraph-0.17.5.dist-info/top_level.txt,sha256=HEBeRWf5ItVPc7Y9hW7hGlrLXZjPoL4by6CAhBV_BwA,9 -altgraph-0.17.5.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1 -altgraph/Dot.py,sha256=gKEp6Su_CoOWQYt5HIVs_7MBYK1BEOhKX0RLAAA-vQs,9929 -altgraph/Graph.py,sha256=6b6fSHLA5QSqMDnSHIO7_WJnBYIdq3K5Bt8VipRODwg,20788 -altgraph/GraphAlgo.py,sha256=Uu9aTjSKWi38iQ_e9ZrwCnzQaI1WWFDhJ6kfmu0jxAA,5645 -altgraph/GraphStat.py,sha256=LKya4BKXJ5GZi5-sNYU17aOBTLxqn_tVgbiw4sWGYIU,1888 -altgraph/GraphUtil.py,sha256=1T4DJc2bJn6EIU_Ct4m0oiKlXWkXvqcXE8CGL2K9en8,3990 -altgraph/ObjectGraph.py,sha256=o7fPJtyBEgJSXAkUjzvj35B-FOY4uKzfLGqSvTitx8c,6490 -altgraph/__init__.py,sha256=Glu2oEC9U0oZLDEIJeudig16inwTvSiDKw8Av17_aNE,4957 diff --git a/voxvera/vendor/altgraph-0.17.5.dist-info/WHEEL b/voxvera/vendor/altgraph-0.17.5.dist-info/WHEEL deleted file mode 100644 index c34f116..0000000 --- a/voxvera/vendor/altgraph-0.17.5.dist-info/WHEEL +++ /dev/null @@ -1,6 +0,0 @@ -Wheel-Version: 1.0 -Generator: bdist_wheel (0.41.2) -Root-Is-Purelib: true -Tag: py2-none-any -Tag: py3-none-any - diff --git a/voxvera/vendor/altgraph-0.17.5.dist-info/top_level.txt b/voxvera/vendor/altgraph-0.17.5.dist-info/top_level.txt deleted file mode 100644 index 5ad6b8a..0000000 --- a/voxvera/vendor/altgraph-0.17.5.dist-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -altgraph diff --git a/voxvera/vendor/altgraph-0.17.5.dist-info/zip-safe b/voxvera/vendor/altgraph-0.17.5.dist-info/zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/voxvera/vendor/altgraph-0.17.5.dist-info/zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/voxvera/vendor/altgraph/Dot.py b/voxvera/vendor/altgraph/Dot.py deleted file mode 100644 index 1d19cb1..0000000 --- a/voxvera/vendor/altgraph/Dot.py +++ /dev/null @@ -1,321 +0,0 @@ -""" -altgraph.Dot - Interface to the dot language -============================================ - -The :py:mod:`~altgraph.Dot` module provides a simple interface to the -file format used in the -`graphviz `_ -program. The module is intended to offload the most tedious part of the process -(the **dot** file generation) while transparently exposing most of its -features. - -To display the graphs or to generate image files the -`graphviz `_ -package needs to be installed on the system, moreover the :command:`dot` and -:command:`dotty` programs must be accesible in the program path so that they -can be ran from processes spawned within the module. - -Example usage -------------- - -Here is a typical usage:: - - from altgraph import Graph, Dot - - # create a graph - edges = [ (1,2), (1,3), (3,4), (3,5), (4,5), (5,4) ] - graph = Graph.Graph(edges) - - # create a dot representation of the graph - dot = Dot.Dot(graph) - - # display the graph - dot.display() - - # save the dot representation into the mydot.dot file - dot.save_dot(file_name='mydot.dot') - - # save dot file as gif image into the graph.gif file - dot.save_img(file_name='graph', file_type='gif') - -Directed graph and non-directed graph -------------------------------------- - -Dot class can use for both directed graph and non-directed graph -by passing ``graphtype`` parameter. - -Example:: - - # create directed graph(default) - dot = Dot.Dot(graph, graphtype="digraph") - - # create non-directed graph - dot = Dot.Dot(graph, graphtype="graph") - -Customizing the output ----------------------- - -The graph drawing process may be customized by passing -valid :command:`dot` parameters for the nodes and edges. For a list of all -parameters see the `graphviz `_ -documentation. - -Example:: - - # customizing the way the overall graph is drawn - dot.style(size='10,10', rankdir='RL', page='5, 5' , ranksep=0.75) - - # customizing node drawing - dot.node_style(1, label='BASE_NODE',shape='box', color='blue' ) - dot.node_style(2, style='filled', fillcolor='red') - - # customizing edge drawing - dot.edge_style(1, 2, style='dotted') - dot.edge_style(3, 5, arrowhead='dot', label='binds', labelangle='90') - dot.edge_style(4, 5, arrowsize=2, style='bold') - - -.. note:: - - dotty (invoked via :py:func:`~altgraph.Dot.display`) may not be able to - display all graphics styles. To verify the output save it to an image file - and look at it that way. - -Valid attributes ----------------- - - - dot styles, passed via the :py:meth:`Dot.style` method:: - - rankdir = 'LR' (draws the graph horizontally, left to right) - ranksep = number (rank separation in inches) - - - node attributes, passed via the :py:meth:`Dot.node_style` method:: - - style = 'filled' | 'invisible' | 'diagonals' | 'rounded' - shape = 'box' | 'ellipse' | 'circle' | 'point' | 'triangle' - - - edge attributes, passed via the :py:meth:`Dot.edge_style` method:: - - style = 'dashed' | 'dotted' | 'solid' | 'invis' | 'bold' - arrowhead = 'box' | 'crow' | 'diamond' | 'dot' | 'inv' | 'none' - | 'tee' | 'vee' - weight = number (the larger the number the closer the nodes will be) - - - valid `graphviz colors - `_ - - - for more details on how to control the graph drawing process see the - `graphviz reference - `_. -""" -import os -import warnings - -from altgraph import GraphError - - -class Dot(object): - """ - A class providing a **graphviz** (dot language) representation - allowing a fine grained control over how the graph is being - displayed. - - If the :command:`dot` and :command:`dotty` programs are not in the current - system path their location needs to be specified in the contructor. - """ - - def __init__( - self, - graph=None, - nodes=None, - edgefn=None, - nodevisitor=None, - edgevisitor=None, - name="G", - dot="dot", - dotty="dotty", - neato="neato", - graphtype="digraph", - ): - """ - Initialization. - """ - self.name, self.attr = name, {} - - assert graphtype in ["graph", "digraph"] - self.type = graphtype - - self.temp_dot = "tmp_dot.dot" - self.temp_neo = "tmp_neo.dot" - - self.dot, self.dotty, self.neato = dot, dotty, neato - - # self.nodes: node styles - # self.edges: edge styles - self.nodes, self.edges = {}, {} - - if graph is not None and nodes is None: - nodes = graph - if graph is not None and edgefn is None: - - def edgefn(node, graph=graph): - return graph.out_nbrs(node) - - if nodes is None: - nodes = () - - seen = set() - for node in nodes: - if nodevisitor is None: - style = {} - else: - style = nodevisitor(node) - if style is not None: - self.nodes[node] = {} - self.node_style(node, **style) - seen.add(node) - if edgefn is not None: - for head in seen: - for tail in (n for n in edgefn(head) if n in seen): - if edgevisitor is None: - edgestyle = {} - else: - edgestyle = edgevisitor(head, tail) - if edgestyle is not None: - if head not in self.edges: - self.edges[head] = {} - self.edges[head][tail] = {} - self.edge_style(head, tail, **edgestyle) - - def style(self, **attr): - """ - Changes the overall style - """ - self.attr = attr - - def display(self, mode="dot"): - """ - Displays the current graph via dotty - """ - - if mode == "neato": - self.save_dot(self.temp_neo) - neato_cmd = "%s -o %s %s" % (self.neato, self.temp_dot, self.temp_neo) - os.system(neato_cmd) - else: - self.save_dot(self.temp_dot) - - plot_cmd = "%s %s" % (self.dotty, self.temp_dot) - os.system(plot_cmd) - - def node_style(self, node, **kwargs): - """ - Modifies a node style to the dot representation. - """ - if node not in self.edges: - self.edges[node] = {} - self.nodes[node] = kwargs - - def all_node_style(self, **kwargs): - """ - Modifies all node styles - """ - for node in self.nodes: - self.node_style(node, **kwargs) - - def edge_style(self, head, tail, **kwargs): - """ - Modifies an edge style to the dot representation. - """ - if tail not in self.nodes: - raise GraphError("invalid node %s" % (tail,)) - - try: - if tail not in self.edges[head]: - self.edges[head][tail] = {} - self.edges[head][tail] = kwargs - except KeyError: - raise GraphError("invalid edge %s -> %s " % (head, tail)) - - def iterdot(self): - # write graph title - if self.type == "digraph": - yield "digraph %s {\n" % (self.name,) - elif self.type == "graph": - yield "graph %s {\n" % (self.name,) - - else: - raise GraphError("unsupported graphtype %s" % (self.type,)) - - # write overall graph attributes - for attr_name, attr_value in sorted(self.attr.items()): - yield '%s="%s";' % (attr_name, attr_value) - yield "\n" - - # some reusable patterns - cpatt = '%s="%s",' # to separate attributes - epatt = "];\n" # to end attributes - - # write node attributes - for node_name, node_attr in sorted(self.nodes.items()): - yield '\t"%s" [' % (node_name,) - for attr_name, attr_value in sorted(node_attr.items()): - yield cpatt % (attr_name, attr_value) - yield epatt - - # write edge attributes - for head in sorted(self.edges): - for tail in sorted(self.edges[head]): - if self.type == "digraph": - yield '\t"%s" -> "%s" [' % (head, tail) - else: - yield '\t"%s" -- "%s" [' % (head, tail) - for attr_name, attr_value in sorted(self.edges[head][tail].items()): - yield cpatt % (attr_name, attr_value) - yield epatt - - # finish file - yield "}\n" - - def __iter__(self): - return self.iterdot() - - def save_dot(self, file_name=None): - """ - Saves the current graph representation into a file - """ - - if not file_name: - warnings.warn(DeprecationWarning, "always pass a file_name", stacklevel=2) - file_name = self.temp_dot - - with open(file_name, "w") as fp: - for chunk in self.iterdot(): - fp.write(chunk) - - def save_img(self, file_name=None, file_type="gif", mode="dot"): - """ - Saves the dot file as an image file - """ - - if not file_name: - warnings.warn(DeprecationWarning, "always pass a file_name", stacklevel=2) - file_name = "out" - - if mode == "neato": - self.save_dot(self.temp_neo) - neato_cmd = "%s -o %s %s" % (self.neato, self.temp_dot, self.temp_neo) - os.system(neato_cmd) - plot_cmd = self.dot - else: - self.save_dot(self.temp_dot) - plot_cmd = self.dot - - file_name = "%s.%s" % (file_name, file_type) - create_cmd = "%s -T%s %s -o %s" % ( - plot_cmd, - file_type, - self.temp_dot, - file_name, - ) - os.system(create_cmd) diff --git a/voxvera/vendor/altgraph/Graph.py b/voxvera/vendor/altgraph/Graph.py deleted file mode 100644 index 8088007..0000000 --- a/voxvera/vendor/altgraph/Graph.py +++ /dev/null @@ -1,682 +0,0 @@ -""" -altgraph.Graph - Base Graph class -================================= - -.. - #--Version 2.1 - #--Bob Ippolito October, 2004 - - #--Version 2.0 - #--Istvan Albert June, 2004 - - #--Version 1.0 - #--Nathan Denny, May 27, 1999 -""" - -from collections import deque - -from altgraph import GraphError - - -class Graph(object): - """ - The Graph class represents a directed graph with *N* nodes and *E* edges. - - Naming conventions: - - - the prefixes such as *out*, *inc* and *all* will refer to methods - that operate on the outgoing, incoming or all edges of that node. - - For example: :py:meth:`inc_degree` will refer to the degree of the node - computed over the incoming edges (the number of neighbours linking to - the node). - - - the prefixes such as *forw* and *back* will refer to the - orientation of the edges used in the method with respect to the node. - - For example: :py:meth:`forw_bfs` will start at the node then use the - outgoing edges to traverse the graph (goes forward). - """ - - def __init__(self, edges=None): - """ - Initialization - """ - - self.next_edge = 0 - self.nodes, self.edges = {}, {} - self.hidden_edges, self.hidden_nodes = {}, {} - - if edges is not None: - for item in edges: - if len(item) == 2: - head, tail = item - self.add_edge(head, tail) - elif len(item) == 3: - head, tail, data = item - self.add_edge(head, tail, data) - else: - raise GraphError("Cannot create edge from %s" % (item,)) - - def __repr__(self): - return "" % ( - self.number_of_nodes(), - self.number_of_edges(), - ) - - def add_node(self, node, node_data=None): - """ - Adds a new node to the graph. Arbitrary data can be attached to the - node via the node_data parameter. Adding the same node twice will be - silently ignored. - - The node must be a hashable value. - """ - # - # the nodes will contain tuples that will store incoming edges, - # outgoing edges and data - # - # index 0 -> incoming edges - # index 1 -> outgoing edges - - if node in self.hidden_nodes: - # Node is present, but hidden - return - - if node not in self.nodes: - self.nodes[node] = ([], [], node_data) - - def add_edge(self, head_id, tail_id, edge_data=1, create_nodes=True): - """ - Adds a directed edge going from head_id to tail_id. - Arbitrary data can be attached to the edge via edge_data. - It may create the nodes if adding edges between nonexisting ones. - - :param head_id: head node - :param tail_id: tail node - :param edge_data: (optional) data attached to the edge - :param create_nodes: (optional) creates the head_id or tail_id - node in case they did not exist - """ - # shorcut - edge = self.next_edge - - # add nodes if on automatic node creation - if create_nodes: - self.add_node(head_id) - self.add_node(tail_id) - - # update the corresponding incoming and outgoing lists in the nodes - # index 0 -> incoming edges - # index 1 -> outgoing edges - - try: - self.nodes[tail_id][0].append(edge) - self.nodes[head_id][1].append(edge) - except KeyError: - raise GraphError("Invalid nodes %s -> %s" % (head_id, tail_id)) - - # store edge information - self.edges[edge] = (head_id, tail_id, edge_data) - - self.next_edge += 1 - - def hide_edge(self, edge): - """ - Hides an edge from the graph. The edge may be unhidden at some later - time. - """ - try: - head_id, tail_id, edge_data = self.hidden_edges[edge] = self.edges[edge] - self.nodes[tail_id][0].remove(edge) - self.nodes[head_id][1].remove(edge) - del self.edges[edge] - except KeyError: - raise GraphError("Invalid edge %s" % edge) - - def hide_node(self, node): - """ - Hides a node from the graph. The incoming and outgoing edges of the - node will also be hidden. The node may be unhidden at some later time. - """ - try: - all_edges = self.all_edges(node) - self.hidden_nodes[node] = (self.nodes[node], all_edges) - for edge in all_edges: - self.hide_edge(edge) - del self.nodes[node] - except KeyError: - raise GraphError("Invalid node %s" % node) - - def restore_node(self, node): - """ - Restores a previously hidden node back into the graph and restores - all of its incoming and outgoing edges. - """ - try: - self.nodes[node], all_edges = self.hidden_nodes[node] - for edge in all_edges: - self.restore_edge(edge) - del self.hidden_nodes[node] - except KeyError: - raise GraphError("Invalid node %s" % node) - - def restore_edge(self, edge): - """ - Restores a previously hidden edge back into the graph. - """ - try: - head_id, tail_id, data = self.hidden_edges[edge] - self.nodes[tail_id][0].append(edge) - self.nodes[head_id][1].append(edge) - self.edges[edge] = head_id, tail_id, data - del self.hidden_edges[edge] - except KeyError: - raise GraphError("Invalid edge %s" % edge) - - def restore_all_edges(self): - """ - Restores all hidden edges. - """ - for edge in list(self.hidden_edges.keys()): - try: - self.restore_edge(edge) - except GraphError: - pass - - def restore_all_nodes(self): - """ - Restores all hidden nodes. - """ - for node in list(self.hidden_nodes.keys()): - self.restore_node(node) - - def __contains__(self, node): - """ - Test whether a node is in the graph - """ - return node in self.nodes - - def edge_by_id(self, edge): - """ - Returns the edge that connects the head_id and tail_id nodes - """ - try: - head, tail, data = self.edges[edge] - except KeyError: - head, tail = None, None - raise GraphError("Invalid edge %s" % edge) - - return (head, tail) - - def edge_by_node(self, head, tail): - """ - Returns the edge that connects the head_id and tail_id nodes - """ - for edge in self.out_edges(head): - if self.tail(edge) == tail: - return edge - return None - - def number_of_nodes(self): - """ - Returns the number of nodes - """ - return len(self.nodes) - - def number_of_edges(self): - """ - Returns the number of edges - """ - return len(self.edges) - - def __iter__(self): - """ - Iterates over all nodes in the graph - """ - return iter(self.nodes) - - def node_list(self): - """ - Return a list of the node ids for all visible nodes in the graph. - """ - return list(self.nodes.keys()) - - def edge_list(self): - """ - Returns an iterator for all visible nodes in the graph. - """ - return list(self.edges.keys()) - - def number_of_hidden_edges(self): - """ - Returns the number of hidden edges - """ - return len(self.hidden_edges) - - def number_of_hidden_nodes(self): - """ - Returns the number of hidden nodes - """ - return len(self.hidden_nodes) - - def hidden_node_list(self): - """ - Returns the list with the hidden nodes - """ - return list(self.hidden_nodes.keys()) - - def hidden_edge_list(self): - """ - Returns a list with the hidden edges - """ - return list(self.hidden_edges.keys()) - - def describe_node(self, node): - """ - return node, node data, outgoing edges, incoming edges for node - """ - incoming, outgoing, data = self.nodes[node] - return node, data, outgoing, incoming - - def describe_edge(self, edge): - """ - return edge, edge data, head, tail for edge - """ - head, tail, data = self.edges[edge] - return edge, data, head, tail - - def node_data(self, node): - """ - Returns the data associated with a node - """ - return self.nodes[node][2] - - def edge_data(self, edge): - """ - Returns the data associated with an edge - """ - return self.edges[edge][2] - - def update_edge_data(self, edge, edge_data): - """ - Replace the edge data for a specific edge - """ - self.edges[edge] = self.edges[edge][0:2] + (edge_data,) - - def head(self, edge): - """ - Returns the node of the head of the edge. - """ - return self.edges[edge][0] - - def tail(self, edge): - """ - Returns node of the tail of the edge. - """ - return self.edges[edge][1] - - def out_nbrs(self, node): - """ - List of nodes connected by outgoing edges - """ - return [self.tail(n) for n in self.out_edges(node)] - - def inc_nbrs(self, node): - """ - List of nodes connected by incoming edges - """ - return [self.head(n) for n in self.inc_edges(node)] - - def all_nbrs(self, node): - """ - List of nodes connected by incoming and outgoing edges - """ - return list(dict.fromkeys(self.inc_nbrs(node) + self.out_nbrs(node))) - - def out_edges(self, node): - """ - Returns a list of the outgoing edges - """ - try: - return list(self.nodes[node][1]) - except KeyError: - raise GraphError("Invalid node %s" % node) - - def inc_edges(self, node): - """ - Returns a list of the incoming edges - """ - try: - return list(self.nodes[node][0]) - except KeyError: - raise GraphError("Invalid node %s" % node) - - def all_edges(self, node): - """ - Returns a list of incoming and outging edges. - """ - return set(self.inc_edges(node) + self.out_edges(node)) - - def out_degree(self, node): - """ - Returns the number of outgoing edges - """ - return len(self.out_edges(node)) - - def inc_degree(self, node): - """ - Returns the number of incoming edges - """ - return len(self.inc_edges(node)) - - def all_degree(self, node): - """ - The total degree of a node - """ - return self.inc_degree(node) + self.out_degree(node) - - def _topo_sort(self, forward=True): - """ - Topological sort. - - Returns a list of nodes where the successors (based on outgoing and - incoming edges selected by the forward parameter) of any given node - appear in the sequence after that node. - """ - topo_list = [] - queue = deque() - indeg = {} - - # select the operation that will be performed - if forward: - get_edges = self.out_edges - get_degree = self.inc_degree - get_next = self.tail - else: - get_edges = self.inc_edges - get_degree = self.out_degree - get_next = self.head - - for node in self.node_list(): - degree = get_degree(node) - if degree: - indeg[node] = degree - else: - queue.append(node) - - while queue: - curr_node = queue.popleft() - topo_list.append(curr_node) - for edge in get_edges(curr_node): - tail_id = get_next(edge) - if tail_id in indeg: - indeg[tail_id] -= 1 - if indeg[tail_id] == 0: - queue.append(tail_id) - - if len(topo_list) == len(self.node_list()): - valid = True - else: - # the graph has cycles, invalid topological sort - valid = False - - return (valid, topo_list) - - def forw_topo_sort(self): - """ - Topological sort. - - Returns a list of nodes where the successors (based on outgoing edges) - of any given node appear in the sequence after that node. - """ - return self._topo_sort(forward=True) - - def back_topo_sort(self): - """ - Reverse topological sort. - - Returns a list of nodes where the successors (based on incoming edges) - of any given node appear in the sequence after that node. - """ - return self._topo_sort(forward=False) - - def _bfs_subgraph(self, start_id, forward=True): - """ - Private method creates a subgraph in a bfs order. - - The forward parameter specifies whether it is a forward or backward - traversal. - """ - if forward: - get_bfs = self.forw_bfs - get_nbrs = self.out_nbrs - else: - get_bfs = self.back_bfs - get_nbrs = self.inc_nbrs - - g = Graph() - bfs_list = get_bfs(start_id) - for node in bfs_list: - g.add_node(node) - - for node in bfs_list: - for nbr_id in get_nbrs(node): - if forward: - g.add_edge(node, nbr_id) - else: - g.add_edge(nbr_id, node) - - return g - - def forw_bfs_subgraph(self, start_id): - """ - Creates and returns a subgraph consisting of the breadth first - reachable nodes based on their outgoing edges. - """ - return self._bfs_subgraph(start_id, forward=True) - - def back_bfs_subgraph(self, start_id): - """ - Creates and returns a subgraph consisting of the breadth first - reachable nodes based on the incoming edges. - """ - return self._bfs_subgraph(start_id, forward=False) - - def iterdfs(self, start, end=None, forward=True): - """ - Collecting nodes in some depth first traversal. - - The forward parameter specifies whether it is a forward or backward - traversal. - """ - visited, stack = {start}, deque([start]) - - if forward: - get_edges = self.out_edges - get_next = self.tail - else: - get_edges = self.inc_edges - get_next = self.head - - while stack: - curr_node = stack.pop() - yield curr_node - if curr_node == end: - break - for edge in sorted(get_edges(curr_node)): - tail = get_next(edge) - if tail not in visited: - visited.add(tail) - stack.append(tail) - - def iterdata(self, start, end=None, forward=True, condition=None): - """ - Perform a depth-first walk of the graph (as ``iterdfs``) - and yield the item data of every node where condition matches. The - condition callback is only called when node_data is not None. - """ - - visited, stack = {start}, deque([start]) - - if forward: - get_edges = self.out_edges - get_next = self.tail - else: - get_edges = self.inc_edges - get_next = self.head - - get_data = self.node_data - - while stack: - curr_node = stack.pop() - curr_data = get_data(curr_node) - if curr_data is not None: - if condition is not None and not condition(curr_data): - continue - yield curr_data - if curr_node == end: - break - for edge in get_edges(curr_node): - tail = get_next(edge) - if tail not in visited: - visited.add(tail) - stack.append(tail) - - def _iterbfs(self, start, end=None, forward=True): - """ - The forward parameter specifies whether it is a forward or backward - traversal. Returns a list of tuples where the first value is the hop - value the second value is the node id. - """ - queue, visited = deque([(start, 0)]), {start} - - # the direction of the bfs depends on the edges that are sampled - if forward: - get_edges = self.out_edges - get_next = self.tail - else: - get_edges = self.inc_edges - get_next = self.head - - while queue: - curr_node, curr_step = queue.popleft() - yield (curr_node, curr_step) - if curr_node == end: - break - for edge in get_edges(curr_node): - tail = get_next(edge) - if tail not in visited: - visited.add(tail) - queue.append((tail, curr_step + 1)) - - def forw_bfs(self, start, end=None): - """ - Returns a list of nodes in some forward BFS order. - - Starting from the start node the breadth first search proceeds along - outgoing edges. - """ - return [node for node, step in self._iterbfs(start, end, forward=True)] - - def back_bfs(self, start, end=None): - """ - Returns a list of nodes in some backward BFS order. - - Starting from the start node the breadth first search proceeds along - incoming edges. - """ - return [node for node, _ in self._iterbfs(start, end, forward=False)] - - def forw_dfs(self, start, end=None): - """ - Returns a list of nodes in some forward DFS order. - - Starting with the start node the depth first search proceeds along - outgoing edges. - """ - return list(self.iterdfs(start, end, forward=True)) - - def back_dfs(self, start, end=None): - """ - Returns a list of nodes in some backward DFS order. - - Starting from the start node the depth first search proceeds along - incoming edges. - """ - return list(self.iterdfs(start, end, forward=False)) - - def connected(self): - """ - Returns :py:data:`True` if the graph's every node can be reached from - every other node. - """ - node_list = self.node_list() - for node in node_list: - bfs_list = self.forw_bfs(node) - if len(bfs_list) != len(node_list): - return False - return True - - def clust_coef(self, node): - """ - Computes and returns the local clustering coefficient of node. - - The local cluster coefficient is proportion of the actual number of - edges between neighbours of node and the maximum number of edges - between those neighbours. - - See "Local Clustering Coefficient" on - - for a formal definition. - """ - num = 0 - nbr_set = set(self.out_nbrs(node)) - - if node in nbr_set: - nbr_set.remove(node) # loop defense - - for nbr in nbr_set: - sec_set = set(self.out_nbrs(nbr)) - if nbr in sec_set: - sec_set.remove(nbr) # loop defense - num += len(nbr_set & sec_set) - - nbr_num = len(nbr_set) - if nbr_num: - clust_coef = float(num) / (nbr_num * (nbr_num - 1)) - else: - clust_coef = 0.0 - return clust_coef - - def get_hops(self, start, end=None, forward=True): - """ - Computes the hop distance to all nodes centered around a node. - - First order neighbours are at hop 1, their neigbours are at hop 2 etc. - Uses :py:meth:`forw_bfs` or :py:meth:`back_bfs` depending on the value - of the forward parameter. If the distance between all neighbouring - nodes is 1 the hop number corresponds to the shortest distance between - the nodes. - - :param start: the starting node - :param end: ending node (optional). When not specified will search the - whole graph. - :param forward: directionality parameter (optional). - If C{True} (default) it uses L{forw_bfs} otherwise L{back_bfs}. - :return: returns a list of tuples where each tuple contains the - node and the hop. - - Typical usage:: - - >>> print (graph.get_hops(1, 8)) - >>> [(1, 0), (2, 1), (3, 1), (4, 2), (5, 3), (7, 4), (8, 5)] - # node 1 is at 0 hops - # node 2 is at 1 hop - # ... - # node 8 is at 5 hops - """ - if forward: - return list(self._iterbfs(start=start, end=end, forward=True)) - else: - return list(self._iterbfs(start=start, end=end, forward=False)) diff --git a/voxvera/vendor/altgraph/GraphAlgo.py b/voxvera/vendor/altgraph/GraphAlgo.py deleted file mode 100644 index f93e73d..0000000 --- a/voxvera/vendor/altgraph/GraphAlgo.py +++ /dev/null @@ -1,171 +0,0 @@ -""" -altgraph.GraphAlgo - Graph algorithms -===================================== -""" -from altgraph import GraphError - - -def dijkstra(graph, start, end=None): - """ - Dijkstra's algorithm for shortest paths - - `David Eppstein, UC Irvine, 4 April 2002 - `_ - - `Python Cookbook Recipe - `_ - - Find shortest paths from the start node to all nodes nearer than or - equal to the end node. - - Dijkstra's algorithm is only guaranteed to work correctly when all edge - lengths are positive. This code does not verify this property for all - edges (only the edges examined until the end vertex is reached), but will - correctly compute shortest paths even for some graphs with negative edges, - and will raise an exception if it discovers that a negative edge has - caused it to make a mistake. - - Adapted to altgraph by Istvan Albert, Pennsylvania State University - - June, 9 2004 - """ - D = {} # dictionary of final distances - P = {} # dictionary of predecessors - Q = _priorityDictionary() # estimated distances of non-final vertices - Q[start] = 0 - - for v in Q: - D[v] = Q[v] - if v == end: - break - - for w in graph.out_nbrs(v): - edge_id = graph.edge_by_node(v, w) - vwLength = D[v] + graph.edge_data(edge_id) - if w in D: - if vwLength < D[w]: - raise GraphError( - "Dijkstra: found better path to already-final vertex" - ) - elif w not in Q or vwLength < Q[w]: - Q[w] = vwLength - P[w] = v - - return (D, P) - - -def shortest_path(graph, start, end): - """ - Find a single shortest path from the *start* node to the *end* node. - The input has the same conventions as dijkstra(). The output is a list of - the nodes in order along the shortest path. - - **Note that the distances must be stored in the edge data as numeric data** - """ - - D, P = dijkstra(graph, start, end) - Path = [] - while 1: - Path.append(end) - if end == start: - break - end = P[end] - Path.reverse() - return Path - - -# -# Utility classes and functions -# -class _priorityDictionary(dict): - """ - Priority dictionary using binary heaps (internal use only) - - David Eppstein, UC Irvine, 8 Mar 2002 - - Implements a data structure that acts almost like a dictionary, with - two modifications: - - 1. D.smallest() returns the value x minimizing D[x]. For this to - work correctly, all values D[x] stored in the dictionary must be - comparable. - - 2. iterating "for x in D" finds and removes the items from D in sorted - order. Each item is not removed until the next item is requested, - so D[x] will still return a useful value until the next iteration - of the for-loop. Each operation takes logarithmic amortized time. - """ - - def __init__(self): - """ - Initialize priorityDictionary by creating binary heap of pairs - (value,key). Note that changing or removing a dict entry will not - remove the old pair from the heap until it is found by smallest() - or until the heap is rebuilt. - """ - self.__heap = [] - dict.__init__(self) - - def smallest(self): - """ - Find smallest item after removing deleted items from front of heap. - """ - if len(self) == 0: - raise IndexError("smallest of empty priorityDictionary") - heap = self.__heap - while heap[0][1] not in self or self[heap[0][1]] != heap[0][0]: - lastItem = heap.pop() - insertionPoint = 0 - while 1: - smallChild = 2 * insertionPoint + 1 - if ( - smallChild + 1 < len(heap) - and heap[smallChild] > heap[smallChild + 1] - ): - smallChild += 1 - if smallChild >= len(heap) or lastItem <= heap[smallChild]: - heap[insertionPoint] = lastItem - break - heap[insertionPoint] = heap[smallChild] - insertionPoint = smallChild - return heap[0][1] - - def __iter__(self): - """ - Create destructive sorted iterator of priorityDictionary. - """ - - def iterfn(): - while len(self) > 0: - x = self.smallest() - yield x - del self[x] - - return iterfn() - - def __setitem__(self, key, val): - """ - Change value stored in dictionary and add corresponding pair to heap. - Rebuilds the heap if the number of deleted items gets large, to avoid - memory leakage. - """ - dict.__setitem__(self, key, val) - heap = self.__heap - if len(heap) > 2 * len(self): - self.__heap = [(v, k) for k, v in self.items()] - self.__heap.sort() - else: - newPair = (val, key) - insertionPoint = len(heap) - heap.append(None) - while insertionPoint > 0 and newPair < heap[(insertionPoint - 1) // 2]: - heap[insertionPoint] = heap[(insertionPoint - 1) // 2] - insertionPoint = (insertionPoint - 1) // 2 - heap[insertionPoint] = newPair - - def setdefault(self, key, val): - """ - Reimplement setdefault to pass through our customized __setitem__. - """ - if key not in self: - self[key] = val - return self[key] diff --git a/voxvera/vendor/altgraph/GraphStat.py b/voxvera/vendor/altgraph/GraphStat.py deleted file mode 100644 index cccc66d..0000000 --- a/voxvera/vendor/altgraph/GraphStat.py +++ /dev/null @@ -1,73 +0,0 @@ -""" -altgraph.GraphStat - Functions providing various graph statistics -================================================================= -""" - - -def degree_dist(graph, limits=(0, 0), bin_num=10, mode="out"): - """ - Computes the degree distribution for a graph. - - Returns a list of tuples where the first element of the tuple is the - center of the bin representing a range of degrees and the second element - of the tuple are the number of nodes with the degree falling in the range. - - Example:: - - .... - """ - - deg = [] - if mode == "inc": - get_deg = graph.inc_degree - else: - get_deg = graph.out_degree - - for node in graph: - deg.append(get_deg(node)) - - if not deg: - return [] - - results = _binning(values=deg, limits=limits, bin_num=bin_num) - - return results - - -_EPS = 1.0 / (2.0**32) - - -def _binning(values, limits=(0, 0), bin_num=10): - """ - Bins data that falls between certain limits, if the limits are (0, 0) the - minimum and maximum values are used. - - Returns a list of tuples where the first element of the tuple is the - center of the bin and the second element of the tuple are the counts. - """ - if limits == (0, 0): - min_val, max_val = min(values) - _EPS, max(values) + _EPS - else: - min_val, max_val = limits - - # get bin size - bin_size = (max_val - min_val) / float(bin_num) - bins = [0] * (bin_num) - - # will ignore these outliers for now - for value in values: - try: - if (value - min_val) >= 0: - index = int((value - min_val) / float(bin_size)) - bins[index] += 1 - except IndexError: - pass - - # make it ready for an x,y plot - result = [] - center = (bin_size / 2) + min_val - for i, y in enumerate(bins): - x = center + bin_size * i - result.append((x, y)) - - return result diff --git a/voxvera/vendor/altgraph/GraphUtil.py b/voxvera/vendor/altgraph/GraphUtil.py deleted file mode 100644 index cfd6a34..0000000 --- a/voxvera/vendor/altgraph/GraphUtil.py +++ /dev/null @@ -1,139 +0,0 @@ -""" -altgraph.GraphUtil - Utility classes and functions -================================================== -""" - -import random -from collections import deque - -from altgraph import Graph, GraphError - - -def generate_random_graph(node_num, edge_num, self_loops=False, multi_edges=False): - """ - Generates and returns a :py:class:`~altgraph.Graph.Graph` instance with - *node_num* nodes randomly connected by *edge_num* edges. - """ - g = Graph.Graph() - - if not multi_edges: - if self_loops: - max_edges = node_num * node_num - else: - max_edges = node_num * (node_num - 1) - - if edge_num > max_edges: - raise GraphError("inconsistent arguments to 'generate_random_graph'") - - nodes = range(node_num) - - for node in nodes: - g.add_node(node) - - while 1: - head = random.choice(nodes) - tail = random.choice(nodes) - - # loop defense - if head == tail and not self_loops: - continue - - # multiple edge defense - if g.edge_by_node(head, tail) is not None and not multi_edges: - continue - - # add the edge - g.add_edge(head, tail) - if g.number_of_edges() >= edge_num: - break - - return g - - -def generate_scale_free_graph(steps, growth_num, self_loops=False, multi_edges=False): - """ - Generates and returns a :py:class:`~altgraph.Graph.Graph` instance that - will have *steps* \\* *growth_num* nodes and a scale free (powerlaw) - connectivity. Starting with a fully connected graph with *growth_num* - nodes at every step *growth_num* nodes are added to the graph and are - connected to existing nodes with a probability proportional to the degree - of these existing nodes. - """ - # The code doesn't seem to do what the documentation claims. - graph = Graph.Graph() - - # initialize the graph - store = [] - for i in range(growth_num): - for j in range(i + 1, growth_num): - store.append(i) - store.append(j) - graph.add_edge(i, j) - - # generate - for node in range(growth_num, steps * growth_num): - graph.add_node(node) - while graph.out_degree(node) < growth_num: - nbr = random.choice(store) - - # loop defense - if node == nbr and not self_loops: - continue - - # multi edge defense - if graph.edge_by_node(node, nbr) and not multi_edges: - continue - - graph.add_edge(node, nbr) - - for nbr in graph.out_nbrs(node): - store.append(node) - store.append(nbr) - - return graph - - -def filter_stack(graph, head, filters): - """ - Perform a walk in a depth-first order starting - at *head*. - - Returns (visited, removes, orphans). - - * visited: the set of visited nodes - * removes: the list of nodes where the node - data does not all *filters* - * orphans: tuples of (last_good, node), - where node is not in removes, is directly - reachable from a node in *removes* and - *last_good* is the closest upstream node that is not - in *removes*. - """ - - visited, removes, orphans = {head}, set(), set() - stack = deque([(head, head)]) - get_data = graph.node_data - get_edges = graph.out_edges - get_tail = graph.tail - - while stack: - last_good, node = stack.pop() - data = get_data(node) - if data is not None: - for filtfunc in filters: - if not filtfunc(data): - removes.add(node) - break - else: - last_good = node - for edge in get_edges(node): - tail = get_tail(edge) - if last_good is not node: - orphans.add((last_good, tail)) - if tail not in visited: - visited.add(tail) - stack.append((last_good, tail)) - - orphans = [(lg, tl) for (lg, tl) in orphans if tl not in removes] - - return visited, removes, orphans diff --git a/voxvera/vendor/altgraph/ObjectGraph.py b/voxvera/vendor/altgraph/ObjectGraph.py deleted file mode 100644 index 379b05b..0000000 --- a/voxvera/vendor/altgraph/ObjectGraph.py +++ /dev/null @@ -1,212 +0,0 @@ -""" -altgraph.ObjectGraph - Graph of objects with an identifier -========================================================== - -A graph of objects that have a "graphident" attribute. -graphident is the key for the object in the graph -""" - -from altgraph import GraphError -from altgraph.Graph import Graph -from altgraph.GraphUtil import filter_stack - - -class ObjectGraph(object): - """ - A graph of objects that have a "graphident" attribute. - graphident is the key for the object in the graph - """ - - def __init__(self, graph=None, debug=0): - if graph is None: - graph = Graph() - self.graphident = self - self.graph = graph - self.debug = debug - self.indent = 0 - graph.add_node(self, None) - - def __repr__(self): - return "<%s>" % (type(self).__name__,) - - def flatten(self, condition=None, start=None): - """ - Iterate over the subgraph that is entirely reachable by condition - starting from the given start node or the ObjectGraph root - """ - if start is None: - start = self - start = self.getRawIdent(start) - return self.graph.iterdata(start=start, condition=condition) - - def nodes(self): - for ident in self.graph: - node = self.graph.node_data(ident) - if node is not None: - yield self.graph.node_data(ident) - - def get_edges(self, node): - if node is None: - node = self - start = self.getRawIdent(node) - _, _, outraw, incraw = self.graph.describe_node(start) - - def iter_edges(lst, n): - seen = set() - for tpl in (self.graph.describe_edge(e) for e in lst): - ident = tpl[n] - if ident not in seen: - yield self.findNode(ident) - seen.add(ident) - - return iter_edges(outraw, 3), iter_edges(incraw, 2) - - def edgeData(self, fromNode, toNode): - if fromNode is None: - fromNode = self - start = self.getRawIdent(fromNode) - stop = self.getRawIdent(toNode) - edge = self.graph.edge_by_node(start, stop) - return self.graph.edge_data(edge) - - def updateEdgeData(self, fromNode, toNode, edgeData): - if fromNode is None: - fromNode = self - start = self.getRawIdent(fromNode) - stop = self.getRawIdent(toNode) - edge = self.graph.edge_by_node(start, stop) - self.graph.update_edge_data(edge, edgeData) - - def filterStack(self, filters): - """ - Filter the ObjectGraph in-place by removing all edges to nodes that - do not match every filter in the given filter list - - Returns a tuple containing the number of: - (nodes_visited, nodes_removed, nodes_orphaned) - """ - visited, removes, orphans = filter_stack(self.graph, self, filters) - - for last_good, tail in orphans: - self.graph.add_edge(last_good, tail, edge_data="orphan") - - for node in removes: - self.graph.hide_node(node) - - return len(visited) - 1, len(removes), len(orphans) - - def removeNode(self, node): - """ - Remove the given node from the graph if it exists - """ - ident = self.getIdent(node) - if ident is not None: - self.graph.hide_node(ident) - - def removeReference(self, fromnode, tonode): - """ - Remove all edges from fromnode to tonode - """ - if fromnode is None: - fromnode = self - fromident = self.getIdent(fromnode) - toident = self.getIdent(tonode) - if fromident is not None and toident is not None: - while True: - edge = self.graph.edge_by_node(fromident, toident) - if edge is None: - break - self.graph.hide_edge(edge) - - def getIdent(self, node): - """ - Get the graph identifier for a node - """ - ident = self.getRawIdent(node) - if ident is not None: - return ident - node = self.findNode(node) - if node is None: - return None - return node.graphident - - def getRawIdent(self, node): - """ - Get the identifier for a node object - """ - if node is self: - return node - ident = getattr(node, "graphident", None) - return ident - - def __contains__(self, node): - return self.findNode(node) is not None - - def findNode(self, node): - """ - Find the node on the graph - """ - ident = self.getRawIdent(node) - if ident is None: - ident = node - try: - return self.graph.node_data(ident) - except KeyError: - return None - - def addNode(self, node): - """ - Add a node to the graph referenced by the root - """ - self.msg(4, "addNode", node) - - try: - self.graph.restore_node(node.graphident) - except GraphError: - self.graph.add_node(node.graphident, node) - - def createReference(self, fromnode, tonode, edge_data=None): - """ - Create a reference from fromnode to tonode - """ - if fromnode is None: - fromnode = self - fromident, toident = self.getIdent(fromnode), self.getIdent(tonode) - if fromident is None or toident is None: - return - self.msg(4, "createReference", fromnode, tonode, edge_data) - self.graph.add_edge(fromident, toident, edge_data=edge_data) - - def createNode(self, cls, name, *args, **kw): - """ - Add a node of type cls to the graph if it does not already exist - by the given name - """ - m = self.findNode(name) - if m is None: - m = cls(name, *args, **kw) - self.addNode(m) - return m - - def msg(self, level, s, *args): - """ - Print a debug message with the given level - """ - if s and level <= self.debug: - print("%s%s %s" % (" " * self.indent, s, " ".join(map(repr, args)))) - - def msgin(self, level, s, *args): - """ - Print a debug message and indent - """ - if level <= self.debug: - self.msg(level, s, *args) - self.indent = self.indent + 1 - - def msgout(self, level, s, *args): - """ - Dedent and print a debug message - """ - if level <= self.debug: - self.indent = self.indent - 1 - self.msg(level, s, *args) diff --git a/voxvera/vendor/altgraph/__init__.py b/voxvera/vendor/altgraph/__init__.py deleted file mode 100644 index 3624968..0000000 --- a/voxvera/vendor/altgraph/__init__.py +++ /dev/null @@ -1,146 +0,0 @@ -""" -altgraph - a python graph library -================================= - -altgraph is a fork of `graphlib `_ tailored -to use newer Python 2.3+ features, including additional support used by the -py2app suite (modulegraph and macholib, specifically). - -altgraph is a python based graph (network) representation and manipulation -package. It has started out as an extension to the -`graph_lib module -`_ -written by Nathan Denny it has been significantly optimized and expanded. - -The :class:`altgraph.Graph.Graph` class is loosely modeled after the -`LEDA `_ -(Library of Efficient Datatypes) representation. The library -includes methods for constructing graphs, BFS and DFS traversals, -topological sort, finding connected components, shortest paths as well as a -number graph statistics functions. The library can also visualize graphs -via `graphviz `_. - -The package contains the following modules: - - - the :py:mod:`altgraph.Graph` module contains the - :class:`~altgraph.Graph.Graph` class that stores the graph data - - - the :py:mod:`altgraph.GraphAlgo` module implements graph algorithms - operating on graphs (:py:class:`~altgraph.Graph.Graph`} instances) - - - the :py:mod:`altgraph.GraphStat` module contains functions for - computing statistical measures on graphs - - - the :py:mod:`altgraph.GraphUtil` module contains functions for - generating, reading and saving graphs - - - the :py:mod:`altgraph.Dot` module contains functions for displaying - graphs via `graphviz `_ - - - the :py:mod:`altgraph.ObjectGraph` module implements a graph of - objects with a unique identifier - -Installation ------------- - -Download and unpack the archive then type:: - - python setup.py install - -This will install the library in the default location. For instructions on -how to customize the install procedure read the output of:: - - python setup.py --help install - -To verify that the code works run the test suite:: - - python setup.py test - -Example usage -------------- - -Lets assume that we want to analyze the graph below (links to the full picture) -GRAPH_IMG. Our script then might look the following way:: - - from altgraph import Graph, GraphAlgo, Dot - - # these are the edges - edges = [ (1,2), (2,4), (1,3), (2,4), (3,4), (4,5), (6,5), - (6,14), (14,15), (6, 15), (5,7), (7, 8), (7,13), (12,8), - (8,13), (11,12), (11,9), (13,11), (9,13), (13,10) ] - - # creates the graph - graph = Graph.Graph() - for head, tail in edges: - graph.add_edge(head, tail) - - # do a forward bfs from 1 at most to 20 - print(graph.forw_bfs(1)) - -This will print the nodes in some breadth first order:: - - [1, 2, 3, 4, 5, 7, 8, 13, 11, 10, 12, 9] - -If we wanted to get the hop-distance from node 1 to node 8 -we coud write:: - - print(graph.get_hops(1, 8)) - -This will print the following:: - - [(1, 0), (2, 1), (3, 1), (4, 2), (5, 3), (7, 4), (8, 5)] - -Node 1 is at 0 hops since it is the starting node, nodes 2,3 are 1 hop away ... -node 8 is 5 hops away. To find the shortest distance between two nodes you -can use:: - - print(GraphAlgo.shortest_path(graph, 1, 12)) - -It will print the nodes on one (if there are more) the shortest paths:: - - [1, 2, 4, 5, 7, 13, 11, 12] - -To display the graph we can use the GraphViz backend:: - - dot = Dot.Dot(graph) - - # display the graph on the monitor - dot.display() - - # save it in an image file - dot.save_img(file_name='graph', file_type='gif') - - - -.. - @author: U{Istvan Albert} - - @license: MIT License - - Copyright (c) 2004 Istvan Albert unless otherwise noted. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - @requires: Python 2.3 or higher - - @newfield contributor: Contributors: - @contributor: U{Reka Albert } - -""" -__version__ = "0.17.5" - - -class GraphError(ValueError): - pass diff --git a/voxvera/vendor/bin/htmlmin b/voxvera/vendor/bin/htmlmin deleted file mode 100755 index 582b9bf..0000000 --- a/voxvera/vendor/bin/htmlmin +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from htmlmin.command import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/voxvera/vendor/bin/markdown-it b/voxvera/vendor/bin/markdown-it deleted file mode 100755 index ecc675d..0000000 --- a/voxvera/vendor/bin/markdown-it +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from markdown_it.cli.parse import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/voxvera/vendor/bin/pygmentize b/voxvera/vendor/bin/pygmentize deleted file mode 100755 index 2e82ac7..0000000 --- a/voxvera/vendor/bin/pygmentize +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from pygments.cmdline import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/voxvera/vendor/bin/qr b/voxvera/vendor/bin/qr deleted file mode 100755 index fb3077b..0000000 --- a/voxvera/vendor/bin/qr +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from qrcode.console_scripts import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/voxvera/vendor/distutils-precedence.pth b/voxvera/vendor/distutils-precedence.pth deleted file mode 100644 index 7f009fe..0000000 --- a/voxvera/vendor/distutils-precedence.pth +++ /dev/null @@ -1 +0,0 @@ -import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get(var, 'local') == 'local'; enabled and __import__('_distutils_hack').add_shim(); diff --git a/voxvera/vendor/htmlmin/__init__.py b/voxvera/vendor/htmlmin/__init__.py deleted file mode 100644 index 8044c10..0000000 --- a/voxvera/vendor/htmlmin/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -""" -Copyright (c) 2013, Dave Mankoff -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Dave Mankoff nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DAVE MANKOFF BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -""" - -from .main import minify, Minifier - -__version__ = '0.1.13' diff --git a/voxvera/vendor/htmlmin/command.py b/voxvera/vendor/htmlmin/command.py deleted file mode 100644 index ba3a427..0000000 --- a/voxvera/vendor/htmlmin/command.py +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env python -""" -Copyright (c) 2013, Dave Mankoff -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Dave Mankoff nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DAVE MANKOFF BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -""" - -import argparse -import codecs -import locale -import io -import sys - -#import htmlmin -from . import Minifier - -parser = argparse.ArgumentParser( - description='Minify HTML', - formatter_class=argparse.RawTextHelpFormatter - ) - -parser.add_argument('input_file', - nargs='?', - metavar='INPUT', - help='File path to html file to minify. Defaults to stdin.', - ) - -parser.add_argument('output_file', - nargs='?', - metavar='OUTPUT', - help="File path to output to. Defaults to stdout.", - ) - -parser.add_argument('-c', '--remove-comments', - help=( -'''When set, comments will be removed. They can be kept on an individual basis -by starting them with a '!': . The '!' will be removed from -the final output. If you want a '!' as the leading character of your comment, -put two of them: . - -'''), - action='store_true') - -parser.add_argument('-s', '--remove-empty-space', - help=( -'''When set, this removes empty space betwen tags in certain cases. -Specifically, it will remove empty space if and only if there a newline -character occurs within the space. Thus, code like -'x y' will be left alone, but code such as -' ... - - - ...' -will become '......'. Note that this CAN break your -html if you spread two inline tags over two lines. Use with caution. - -'''), - action='store_true') - -parser.add_argument('--remove-all-empty-space', - help=( -'''When set, this removes ALL empty space betwen tags. WARNING: this can and -likely will cause unintended consequences. For instance, 'X Y' -will become 'XY'. Putting whitespace along with other text will -avoid this problem. Only use if you are confident in the result. Whitespace is -not removed from inside of tags, thus ' ' will be left alone. - -'''), - action='store_true') - -parser.add_argument('--keep-optional-attribute-quotes', - help=( -'''When set, this keeps all attribute quotes, even if they are optional. - -'''), - action='store_true') - -parser.add_argument('-H', '--in-head', - help=( -'''If you are parsing only a fragment of HTML, and the fragment occurs in the -head of the document, setting this will remove some extra whitespace. - -'''), - action='store_true') - -parser.add_argument('-k', '--keep-pre-attr', - help=( -'''HTMLMin supports the propietary attribute 'pre' that can be added to elements -to prevent minification. This attribute is removed by default. Set this flag to -keep the 'pre' attributes in place. - -'''), - action='store_true') - -parser.add_argument('-a', '--pre-attr', - help=( -'''The attribute htmlmin looks for to find blocks of HTML that it should not -minify. This attribute will be removed from the HTML unless '-k' is -specified. Defaults to 'pre'. - -'''), - default='pre') - - -parser.add_argument('-p', '--pre-tags', - metavar='TAG', - help=( -'''By default, the contents of 'pre', and 'textarea' tags are left unminified. -You can specify different tags using the --pre-tags option. 'script' and 'style' -tags are always left unmininfied. - -'''), - nargs='*', - default=['pre', 'textarea']) -parser.add_argument('-e', '--encoding', - help=("Encoding to read and write with. Default 'utf-8'." - " When reading from stdin, attempts to use the system's" - " encoding before defaulting to utf-8.\n\n"), - default=None, - ) - -def main(): - args = parser.parse_args() - minifier = Minifier( - remove_comments=args.remove_comments, - remove_empty_space=args.remove_empty_space, - remove_optional_attribute_quotes=not args.keep_optional_attribute_quotes, - pre_tags=args.pre_tags, - keep_pre=args.keep_pre_attr, - pre_attr=args.pre_attr, - ) - default_encoding = args.encoding or 'utf-8' - - if args.input_file: - inp = codecs.open(args.input_file, encoding=default_encoding) - else: - encoding = args.encoding or sys.stdin.encoding \ - or locale.getpreferredencoding() or default_encoding - inp = io.open(sys.stdin.fileno(), encoding=encoding) - - for line in inp.readlines(): - minifier.input(line) - - if args.output_file: - codecs.open( - args.output_file, 'w', encoding=default_encoding).write(minifier.output) - else: - encoding = args.encoding or sys.stdout.encoding \ - or locale.getpreferredencoding() or default_encoding - io.open(sys.stdout.fileno(), 'w', encoding=encoding).write(minifier.output) - -if __name__ == '__main__': - main() - diff --git a/voxvera/vendor/htmlmin/decorator.py b/voxvera/vendor/htmlmin/decorator.py deleted file mode 100644 index 6e26597..0000000 --- a/voxvera/vendor/htmlmin/decorator.py +++ /dev/null @@ -1,64 +0,0 @@ -""" -Copyright (c) 2013, Dave Mankoff -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Dave Mankoff nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DAVE MANKOFF BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -""" - -from .main import Minifier - -def htmlmin(*args, **kwargs): - """Minifies HTML that is returned by a function. - - A simple decorator that minifies the HTML output of any function that it - decorates. It supports all the same options that :class:`htmlmin.minify` has. - With no options, it uses ``minify``'s default settings:: - - @htmlmin - def foobar(): - return ' minify me! ' - - or:: - - @htmlmin(remove_comments=True) - def foobar(): - return ' minify me! ' - """ - def _decorator(fn): - minify = Minifier(**kwargs).minify - def wrapper(*a, **kw): - return minify(fn(*a, **kw)) - return wrapper - - if len(args) == 1: - if callable(args[0]) and not kwargs: - return _decorator(args[0]) - else: - raise RuntimeError( - 'htmlmin decorator does accept positional arguments') - elif len(args) > 1: - raise RuntimeError( - 'htmlmin decorator does accept positional arguments') - else: - return _decorator - diff --git a/voxvera/vendor/htmlmin/escape.py b/voxvera/vendor/htmlmin/escape.py deleted file mode 100644 index 81033d2..0000000 --- a/voxvera/vendor/htmlmin/escape.py +++ /dev/null @@ -1,201 +0,0 @@ -""" -Copyright (c) 2015, Dave Mankoff -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Dave Mankoff nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DAVE MANKOFF BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -""" - -import re - -from html import escape - -import re - -NO_QUOTES = 0 -SINGLE_QUOTE = 1 -DOUBLE_QUOTE = 2 - -UPPER_A = ord('A') -UPPER_F = ord('F') -UPPER_Z = ord('Z') -LOWER_A = ord('a') -LOWER_F = ord('f') -LOWER_Z = ord('z') -ZERO = ord('0') -NINE = ord('9') - - -# https://www.w3.org/TR/html5/syntax.html#attributes-0 -CHARS_TO_QUOTE_RE = re.compile(u'[\x20\x09\x0a\x0c\x0d=><`]') - -def escape_tag(val): - return escape(val) - -def escape_attr_name(val): - return escape(val) - -def escape_attr_value(val, double_quote=False): - val = escape_ambiguous_ampersand(val) - has_html_tag = '<' in val or '>' in val - if double_quote: - return (val.replace('"', '"'), DOUBLE_QUOTE) - - double_quote_count = 0 - single_quote_count = 0 - for ch in val: - if ch == '"': - double_quote_count += 1 - elif ch == "'": - single_quote_count += 1 - if double_quote_count > single_quote_count: - return (val.replace("'", '''), SINGLE_QUOTE) - elif single_quote_count: - return (val.replace('"', '"'), DOUBLE_QUOTE) - - if not val or CHARS_TO_QUOTE_RE.search(val): - return (val, DOUBLE_QUOTE) - return (val, NO_QUOTES) - -def escape_ambiguous_ampersand(val): - # TODO: this function could probably me made a lot faster. - if not '&' in val: # short circuit for speed - return val - - state = 0 - result = [] - amp_buff = [] - for c in val: - if state == 0: # beginning - if c == '&': - state = 1 - else: - result.append(c) - elif state == 1: # ampersand - ord_c = ord(c) - if (UPPER_A <= ord_c <= UPPER_Z or - LOWER_A <= ord_c <= LOWER_Z or - ZERO <= ord_c <= NINE): - amp_buff.append(c) # TODO: use "name character references" section - # https://html.spec.whatwg.org/multipage/syntax.html#named-character-references - elif c == '#': - state = 2 - elif c == ';': - if amp_buff: - result.append('&') - result.extend(amp_buff) - result.append(';') - else: - result.append('&;') - state = 0 - amp_buff = [] - elif c == '&': - if amp_buff: - result.append('&') - result.extend(amp_buff) - else: - result.append('&') - amp_buff = [] - else: - result.append('&') - result.extend(amp_buff) - result.append(c) - state = 0 - amp_buff = [] - elif state == 2: # numeric character reference - ord_c = ord(c) - if c == 'x' or c == 'X': - state = 3 - elif ZERO <= ord_c <= NINE: - amp_buff.append(c) - elif c == ';': - if amp_buff: - result.append('&#') - result.extend(amp_buff) - result.append(';') - else: - result.append('&#;') - state = 0 - amp_buff = [] - elif c == '&': - if amp_buff: - result.append('&#') - result.extend(amp_buff) - else: - result.append('&#') - state = 1 - amp_buff = [] - else: - if amp_buff: - result.append('&#') - result.extend(amp_buff) - result.append(c) - else: - result.append('&#') - result.append(c) - state = 0 - amp_buff = [] - elif state == 3: # hex character reference - ord_c = ord(c) - if (UPPER_A <= ord_c <= UPPER_F or - LOWER_A <= ord_c <= LOWER_F or - ZERO <= ord_c <= NINE): - amp_buff.append(c) - elif c == ';': - if amp_buff: - result.append('&#x') - result.extend(amp_buff) - result.append(';') - else: - result.append('&#x;') - state = 0 - amp_buff = [] - elif c == '&': - if amp_buff: - result.append('&#x') - result.extend(amp_buff) - else: - result.append('&#x') - state = 1 - amp_buff = [] - else: - if amp_buff: - result.append('&#x') - result.extend(amp_buff) - result.append(c) - else: - result.append('&#x') - result.append(c) - state = 0 - amp_buff = [] - - if state == 1: - result.append('&') - result.extend(amp_buff) - elif state == 2: - result.append('&#') - result.extend(amp_buff) - elif state == 3: - result.append('&#x') - result.extend(amp_buff) - - return ''.join(result) diff --git a/voxvera/vendor/htmlmin/main.py b/voxvera/vendor/htmlmin/main.py deleted file mode 100644 index c7d8db3..0000000 --- a/voxvera/vendor/htmlmin/main.py +++ /dev/null @@ -1,191 +0,0 @@ -""" -Copyright (c) 2013, Dave Mankoff -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Dave Mankoff nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DAVE MANKOFF BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -""" - -from . import parser - -def minify(input, - remove_comments=False, - remove_empty_space=False, - remove_all_empty_space=False, - reduce_empty_attributes=True, - reduce_boolean_attributes=False, - remove_optional_attribute_quotes=True, - convert_charrefs=True, - keep_pre=False, - pre_tags=parser.PRE_TAGS, - pre_attr='pre', - cls=parser.HTMLMinParser): - """Minifies HTML in one shot. - - :param input: A string containing the HTML to be minified. - :param remove_comments: Remove comments found in HTML. Individual comments can - be maintained by putting a ``!`` as the first character inside the comment. - Thus:: - - - - Will become simply:: - - - - The added exclamation is removed. - :param remove_empty_space: Remove empty space found in HTML between an opening - and a closing tag and when it contains a newline or carriage return. If - whitespace is found that is only spaces and/or tabs, it will be turned into - a single space. Be careful, this can have unintended consequences. - :param remove_all_empty_space: A more extreme version of - ``remove_empty_space``, this removes all empty whitespace found between - tags. This is almost guaranteed to break your HTML unless you are very - careful. - :param reduce_boolean_attributes: Where allowed by the HTML5 specification, - attributes such as 'disabled' and 'readonly' will have their value removed, - so 'disabled="true"' will simply become 'disabled'. This is generally a - good option to turn on except when JavaScript relies on the values. - :param remove_optional_attribute_quotes: When True, optional quotes around - attributes are removed. When False, all attribute quotes are left intact. - Defaults to True. - :param conver_charrefs: Decode character references such as & and . - to their single charater values where safe. This currently only applies to - attributes. Data content between tags will be left encoded. - :param keep_pre: By default, htmlmin uses the special attribute ``pre`` to - allow you to demarcate areas of HTML that should not be minified. It removes - this attribute as it finds it. Setting this value to ``True`` tells htmlmin - to leave the attribute in the output. - :param pre_tags: A list of tag names that should never be minified. You are - free to change this list as you see fit, but you will probably want to - include ``pre`` and ``textarea`` if you make any changes to the list. Note - that ``">', - ), - ( - '', - '', - ), - ), - 'keep_pre_attribute': ( - 'the pre should stay ', - 'the pre should stay ', - ), - 'custom_pre_attribute': ( - 'the X Y ', - 'the X Y ', - ), - 'keep_empty': ( - '
A
B
', - '
A
B
', - ), - 'remove_empty': ( - (' \n
A
\r' - '
B
\r\n
C
D
'), - ('
A
' - '
B
C
D
'), - ), - 'remove_all_empty': ( - (' \n
A
\r' - '
B
\r\n
C
D
'), - ('
A
' - '
B
C
D
'), - ), - 'dont_minify_div': ( - '
X
', - '
X
', - ), - 'minify_pre': ( - '
   X  
', - '
 X 
', - ), - 'remove_head_spaces': ( - ' ☃X Y & Z ', - '☃X Y & Z', - ), - 'dont_minify_scripts_or_styles': ( - ' ', - ' ', - ), - 'remove_close_from_tags': ( - ('

' - ' ' - ' '), - ('

' - ' ' - ' '), - ), - 'remove_space_from_self_closed_tags': ( - ' ', - ' ', - ), - 'remove_redundant_lang_0': ( - ('

This is an example.' - '

I po polsku and more English.'), - ('

This is an example.' - '

I po polsku and more English.'), - ), - 'convert_charrefs': ( - '', - u'', - ), - 'convert_charrefs_false': ( - '', - '', - ), - 'dont_convert_pre_attr': ( - '', - '', - ), -} - -SELF_CLOSE_TEXTS = { - 'p_self_close': ( - '

X

Y ', - '

X

Y ', - ), - 'li_self_close': ( - '

  • X
  • Y
  • Z
Q', - '
  • X
  • Y
  • Z
Q', - ), - 'dt_self_close': ( - '
X
Y
Z
Q', - '
X
Y
Z
Q', - ), - 'dd_self_close': ( - '
X
Y
Z
Q', - '
X
Y
Z
Q', - ), - 'optgroup_self_close': ( - (' '), - (' '), - ), - 'option_self_close': ( - (' '), - (' '), - ), - 'colgroup_self_close': ( - '
', - '
', - ), - 'tbody_self_close': ( - (' \n' - '\n \n\n\n '), - ('
X
Y
\n' - '\n '), - ), - 'thead_self_close': ( - ('
X
Y
' - ' '), - ('
X
Y
' - ' '), - ), - 'tfoot_self_close': ( - ('
X
Y
' - ' '), - ('
X
Y
' - ' '), - ), - 'tr_self_close': ( - ('
X
Y
' - ' '), - ('
X
Y
' - ' '), - ), - 'td_self_close': ( - '
X
Y
X Y ', - '
X Y ', - ), - 'th_self_close': ( - '
X Y ', - '
X Y ', - ), - 'a_p_interaction': ( # the 'pre' functionality continues after the - '

X

Y', - '

X

Y', - ), -} - -SELF_OPENING_TEXTS = { - 'html_closed_no_open': ( - ' X ', - ' X ' - ), - 'head_closed_no_open': ( - ' X ', - ' X ' # TODO: we could theoretically kill that leading - # space. See HTMLMinParse.handle_endtag - ), - 'body_closed_no_open': ( - ' X ', - ' X ' - ), - 'colgroup_self_open': ( - '
', - '
', - ), - 'tbody_self_open': ( - '
', - '
', - ), - 'p_closed_no_open': ( # this isn't valid html, but its worth accounting for - '

X

Y

', - '
X

Y

', - ), -} - -class HTMLMinTestMeta(type): - def __new__(cls, name, bases, dct): - def make_test(text): - def inner_test(self): - self.assertEqual(self.minify(text[0]), text[1]) - return inner_test - - for k, v in dct.get('__reference_texts__',{}).items(): - if 'test_'+k not in dct: - dct['test_'+k] = make_test(v) - return type.__new__(cls, str(name), bases, dct) - -class HTMLMinTestCase( - HTMLMinTestMeta('HTMLMinTestCase', (unittest.TestCase, ), {})): - def setUp(self): - self.minify = htmlmin.minify - -class TestMinifyFunction(HTMLMinTestCase): - __reference_texts__ = MINIFY_FUNCTION_TEXTS - - def test_basic_minification_quality(self): - import codecs - with codecs.open('htmlmin/tests/large_test.html', encoding='utf-8') as inpf: - inp = inpf.read() - out = self.minify(inp) - self.assertEqual(len(inp) - len(out), 9408) - - def test_high_minification_quality(self): - import codecs - with codecs.open('htmlmin/tests/large_test.html', encoding='utf-8') as inpf: - inp = inpf.read() - out = self.minify(inp, remove_all_empty_space=True, remove_comments=True) - self.assertEqual(len(inp) - len(out), 12518) - -class TestMinifierObject(HTMLMinTestCase): - __reference_texts__ = MINIFY_FUNCTION_TEXTS - - def setUp(self): - HTMLMinTestCase.setUp(self) - self.minifier = htmlmin.Minifier() - self.minify = self.minifier.minify - - def test_reuse(self): - text = self.__reference_texts__['simple_text'] - self.assertEqual(self.minify(text[0]), text[1]) - self.assertEqual(self.minify(text[0]), text[1]) - - def test_dangling_tag(self): - dangling_tag = self.__reference_texts__['dangling_tag'] - dangling_tag_followup = self.__reference_texts__['dangling_tag_followup'] - self.assertEqual(self.minify(dangling_tag[0]), dangling_tag[1]) - self.assertEqual(self.minify(dangling_tag_followup[0]), dangling_tag_followup[1]) - - def test_buffered_input(self): - text = self.__reference_texts__['long_text'] - self.minifier.input(text[0][:len(text[0]) // 2]) - self.minifier.input(text[0][len(text[0]) // 2:]) - self.assertEqual(self.minifier.finalize(), text[1]) - - -class TestMinifyFeatures(HTMLMinTestCase): - __reference_texts__ = FEATURES_TEXTS - - def test_remove_comments(self): - text = self.__reference_texts__['remove_comments'] - self.assertEqual(htmlmin.minify(text[0], remove_comments=True), text[1]) - - def test_no_reduce_empty_attributes(self): - text = self.__reference_texts__['no_reduce_empty_attributes'] - self.assertEqual(htmlmin.minify(text[0], reduce_empty_attributes=False), text[1]) - - def test_no_reduce_empty_attributes_keep_quotes(self): - text = self.__reference_texts__['no_reduce_empty_attributes_keep_quotes'] - self.assertEqual(htmlmin.minify(text[0], reduce_empty_attributes=False, remove_optional_attribute_quotes=False), text[1]) - - def test_reduce_empty_attributes(self): - text = self.__reference_texts__['reduce_empty_attributes'] - self.assertEqual(htmlmin.minify(text[0], reduce_empty_attributes=True), text[1]) - - def test_reduce_boolean_attributes(self): - text = self.__reference_texts__['reduce_boolean_attributes'] - self.assertEqual(htmlmin.minify(text[0], reduce_boolean_attributes=True), text[1]) - - def test_keep_comments(self): - text = self.__reference_texts__['keep_comments'] - self.assertEqual(htmlmin.minify(text[0], remove_comments=True), text[1]) - - def test_keep_empty_comments(self): - text = self.__reference_texts__['keep_empty_comments'] - self.assertEqual(htmlmin.minify(text[0]), text[1]) - - def test_keep_conditional_comments(self): - text = self.__reference_texts__['keep_conditional_comments'] - self.assertEqual(htmlmin.minify(text[0], remove_comments=True), text[1]) - - def test_remove_nonconditional_comments(self): - text = self.__reference_texts__['remove_nonconditional_comments'] - self.assertEqual(htmlmin.minify(text[0], remove_comments=True), text[1]) - - def test_keep_optional_attribute_quotes(self): - text = self.__reference_texts__['keep_optional_attribute_quotes'] - self.assertEqual(htmlmin.minify(text[0], remove_optional_attribute_quotes=False), text[1]) - - def test_remove_optional_attribute_quotes(self): - texts = self.__reference_texts__['remove_optional_attribute_quotes'] - for text in texts: - self.assertEqual(htmlmin.minify(text[0], remove_optional_attribute_quotes=True), text[1]) - - def test_keep_pre_attribute(self): - text = self.__reference_texts__['keep_pre_attribute'] - self.assertEqual(htmlmin.minify(text[0], keep_pre=True), text[1]) - - def test_custom_pre_attribute(self): - text = self.__reference_texts__['custom_pre_attribute'] - self.assertEqual(htmlmin.minify(text[0], pre_attr='custom'), text[1]) - - def test_keep_empty(self): - text = self.__reference_texts__['keep_empty'] - self.assertEqual(htmlmin.minify(text[0]), text[1]) - - def test_remove_empty(self): - text = self.__reference_texts__['remove_empty'] - self.assertEqual(htmlmin.minify(text[0], remove_empty_space=True), text[1]) - - def test_remove_all_empty(self): - text = self.__reference_texts__['remove_all_empty'] - self.assertEqual(htmlmin.minify(text[0], remove_all_empty_space=True), - text[1]) - - def test_dont_minify_div(self): - text = self.__reference_texts__['dont_minify_div'] - self.assertEqual(htmlmin.minify(text[0], pre_tags=('div',)), text[1]) - - def test_minify_pre(self): - text = self.__reference_texts__['minify_pre'] - self.assertEqual(htmlmin.minify(text[0], pre_tags=('div',)), text[1]) - - def test_remove_head_spaces(self): - text = self.__reference_texts__['remove_head_spaces'] - self.assertEqual(htmlmin.minify(text[0]), text[1]) - - def test_dont_minify_scripts_or_styles(self): - text = self.__reference_texts__['dont_minify_scripts_or_styles'] - self.assertEqual(htmlmin.minify(text[0], pre_tags=[]), text[1]) - - def test_convert_charrefs_false(self): - text = self.__reference_texts__['convert_charrefs_false'] - self.assertEqual(htmlmin.minify(text[0], convert_charrefs=False), text[1]) - - -class TestSelfClosingTags(HTMLMinTestCase): - __reference_texts__ = SELF_CLOSE_TEXTS - -class TestSelfOpeningTags(HTMLMinTestCase): - __reference_texts__ = SELF_OPENING_TEXTS - -class TestDecorator(HTMLMinTestCase): - def test_direct_decorator(self): - @htmlmindecorator - def directly_decorated(): - return ' X Y ' - - self.assertEqual(' X Y ', directly_decorated()) - - def test_options_decorator(self): - @htmlmindecorator(remove_comments=True) - def directly_decorated(): - return ' X Y ' - - self.assertEqual(' X Y ', directly_decorated()) - -class TestMiddleware(HTMLMinTestCase): - def setUp(self): - HTMLMinTestCase.setUp(self) - def wsgi_app(environ, start_response): - start_response(environ['status'], environ['headers']) - yield environ['content'] - - self.wsgi_app = wsgi_app - - def call_app(self, app, status, headers, content): - response_status = [] # these need to be mutable so that they can be changed - response_headers = [] # within our inner function. - def start_response(status, headers, exc_info=None): - response_status.append(status) - response_headers.append(headers) - response_body = ''.join(app({'status': status, - 'content': content, - 'headers': headers}, - start_response)) - return response_status[0], response_headers[0], response_body - - def test_middlware(self): - app = HTMLMinMiddleware(self.wsgi_app) - status, headers, body = self.call_app( - app, '200 OK', (('Content-Type', 'text/html'),), - ' X Y ') - self.assertEqual(body, ' X Y ') - - def test_middlware_minifier_options(self): - app = HTMLMinMiddleware(self.wsgi_app, remove_comments=True) - status, headers, body = self.call_app( - app, '200 OK', (('Content-Type', 'text/html'),), - ' X Y ') - self.assertEqual(body, ' X Y ') - - def test_middlware_off_by_default(self): - app = HTMLMinMiddleware(self.wsgi_app, by_default=False) - status, headers, body = self.call_app( - app, '200 OK', (('Content-Type', 'text/html'),), - ' X Y ') - self.assertEqual(body, ' X Y ') - - def test_middlware_on_by_header(self): - app = HTMLMinMiddleware(self.wsgi_app, by_default=False) - status, headers, body = self.call_app( - app, '200 OK', ( - ('Content-Type', 'text/html'), - ('X-HTML-Min-Enable', 'True'), - ), - ' X Y ') - self.assertEqual(body, ' X Y ') - - def test_middlware_off_by_header(self): - app = HTMLMinMiddleware(self.wsgi_app) - status, headers, body = self.call_app( - app, '200 OK', ( - ('Content-Type', 'text/html'), - ('X-HTML-Min-Enable', 'False'), - ), - ' X Y ') - self.assertEqual(body, ' X Y ') - - def test_middlware_remove_header(self): - app = HTMLMinMiddleware(self.wsgi_app) - status, headers, body = self.call_app( - app, '200 OK', ( - ('Content-Type', 'text/html'), - ('X-HTML-Min-Enable', 'False'), - ), - ' X Y ') - self.assertFalse(any((h == 'X-HTML-Min-Enable' for h, v in headers))) - - def test_middlware_keep_header(self): - app = HTMLMinMiddleware(self.wsgi_app, keep_header=True) - status, headers, body = self.call_app( - app, '200 OK', [ - ('Content-Type', 'text/html'), - ('X-HTML-Min-Enable', 'False'), - ], - ' X Y ') - self.assertTrue(any((h == 'X-HTML-Min-Enable' for h, v in headers))) - -def suite(): - minify_function_suite = unittest.TestLoader().\ - loadTestsFromTestCase(TestMinifyFunction) - minifier_object_suite = unittest.TestLoader().\ - loadTestsFromTestCase(TestMinifierObject) - minify_features_suite = unittest.TestLoader().\ - loadTestsFromTestCase(TestMinifyFeatures) - self_closing_tags_suite = unittest.TestLoader().\ - loadTestsFromTestCase(TestSelfClosingTags) - self_opening_tags_suite = unittest.TestLoader().\ - loadTestsFromTestCase(TestSelfOpeningTags) - decorator_suite = unittest.TestLoader().\ - loadTestsFromTestCase(TestDecorator) - middleware_suite = unittest.TestLoader().\ - loadTestsFromTestCase(TestMiddleware) - return unittest.TestSuite([ - minify_function_suite, - minifier_object_suite, - minify_features_suite, - self_closing_tags_suite, - self_opening_tags_suite, - decorator_suite, - middleware_suite, - test_escape.suite(), - ]) - -if __name__ == '__main__': - unittest.main() diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/INSTALLER b/voxvera/vendor/htmlmin2-0.1.13.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/htmlmin2-0.1.13.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/LICENSE b/voxvera/vendor/htmlmin2-0.1.13.dist-info/LICENSE deleted file mode 100644 index 0da90f0..0000000 --- a/voxvera/vendor/htmlmin2-0.1.13.dist-info/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2013, Dave Mankoff -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Dave Mankoff nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DAVE MANKOFF BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/METADATA b/voxvera/vendor/htmlmin2-0.1.13.dist-info/METADATA deleted file mode 100644 index 1f2ba71..0000000 --- a/voxvera/vendor/htmlmin2-0.1.13.dist-info/METADATA +++ /dev/null @@ -1,27 +0,0 @@ -Metadata-Version: 2.1 -Name: htmlmin2 -Version: 0.1.13 -Summary: An HTML Minifier -Home-page: https://htmlmin.readthedocs.io/en/latest/ -Download-URL: https://github.com/mankyd/htmlmin -Author: Dave Mankoff -Author-email: mankyd@gmail.com -License: BSD -Classifier: Development Status :: 4 - Beta -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: BSD License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.2 -Classifier: Topic :: Text Processing :: Markup :: HTML -License-File: LICENSE - -> :warning: This is a fork of htmlmin. You can install this work with `pip install htmlmin2`. - -A configurable HTML Minifier with safety features. - -.. image:: https://travis-ci.org/mankyd/htmlmin.png?branch=master - :target: http://travis-ci.org/mankyd/htmlmin - -Documentation: https://htmlmin.readthedocs.io/en/latest/ diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/RECORD b/voxvera/vendor/htmlmin2-0.1.13.dist-info/RECORD deleted file mode 100644 index 1e240e9..0000000 --- a/voxvera/vendor/htmlmin2-0.1.13.dist-info/RECORD +++ /dev/null @@ -1,22 +0,0 @@ -../../bin/htmlmin,sha256=2ZxynJH3LI8uom5t_S9QtAPerrcvMHwJGrDcXvPmRDY,214 -htmlmin/__init__.py,sha256=9gGVWQNjpJ7DSV6nOTINYC9Oxh9SBM0SJQF1QnleFQI,1555 -htmlmin/command.py,sha256=pJOEuY9SKrpyNNXxBd6bxiivTrtRnqyLhKcG2N_K4Y4,5887 -htmlmin/decorator.py,sha256=sYUxLGqfXlSBBpo4qB3OWtbtCxmYdchFC6TScpAGevE,2502 -htmlmin/escape.py,sha256=2soypqfzs9gL4DFZu_4u6uw8LnbP_meglNkPl4dKelY,5792 -htmlmin/main.py,sha256=wqTZ4ztRZY6Ivwbo6ikyat7hK5lZFg0jRryhPZ9GEYc,8261 -htmlmin/middleware.py,sha256=wwf-9jVm1QdTUglmdjnB5zJhwMU76LN0MJ_IhX2GwiE,4121 -htmlmin/parser.py,sha256=HPgmjwNgaJpt1QNt9pyJBPtWx0vhLE1Oq4gt2oTJH4M,15426 -htmlmin/python3html/__init__.py,sha256=Ll7W0GxuN6hf1Lxsi1-SIkZEgeZAbEi1Tf7ptWIuiPo,4954 -htmlmin/python3html/parser.py,sha256=Gi7x5k60TXZn5xM94IQaOxZWxX-nGrPWmSS01Ec7e8g,18039 -htmlmin/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -htmlmin/tests/test_escape.py,sha256=PH7qnCDk8iaVaFWR07cLs9PN_YJTziQ2YM2pyL51srs,4119 -htmlmin/tests/tests.py,sha256=KD5cZphAsuo0lDRTKs40ckdRQSYA9vjQ87F6Og0ADC0,23720 -htmlmin2-0.1.13.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -htmlmin2-0.1.13.dist-info/LICENSE,sha256=NylGJ7OQfQZywkvFq5D83rntA50BFOVA3cq7v9KwAdk,1487 -htmlmin2-0.1.13.dist-info/METADATA,sha256=HbEsUIm0X11W_nJEFJdarAJikrXA-rUG5fegWqbrjR4,970 -htmlmin2-0.1.13.dist-info/RECORD,, -htmlmin2-0.1.13.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -htmlmin2-0.1.13.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92 -htmlmin2-0.1.13.dist-info/entry_points.txt,sha256=-ml_BfoVnNvdWOsj9OQlHTsyZUR_kkDQaGI5ywXHqRY,49 -htmlmin2-0.1.13.dist-info/top_level.txt,sha256=rkB3F7SwTrvHqFZBxOL5adGrc5lO7Zu9uJxhSwc4J-0,8 -htmlmin2-0.1.13.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1 diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/REQUESTED b/voxvera/vendor/htmlmin2-0.1.13.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/WHEEL b/voxvera/vendor/htmlmin2-0.1.13.dist-info/WHEEL deleted file mode 100644 index 57e3d84..0000000 --- a/voxvera/vendor/htmlmin2-0.1.13.dist-info/WHEEL +++ /dev/null @@ -1,5 +0,0 @@ -Wheel-Version: 1.0 -Generator: bdist_wheel (0.38.4) -Root-Is-Purelib: true -Tag: py3-none-any - diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/entry_points.txt b/voxvera/vendor/htmlmin2-0.1.13.dist-info/entry_points.txt deleted file mode 100644 index 11f46ae..0000000 --- a/voxvera/vendor/htmlmin2-0.1.13.dist-info/entry_points.txt +++ /dev/null @@ -1,2 +0,0 @@ -[console_scripts] -htmlmin = htmlmin.command:main diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/top_level.txt b/voxvera/vendor/htmlmin2-0.1.13.dist-info/top_level.txt deleted file mode 100644 index a42ee74..0000000 --- a/voxvera/vendor/htmlmin2-0.1.13.dist-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -htmlmin diff --git a/voxvera/vendor/htmlmin2-0.1.13.dist-info/zip-safe b/voxvera/vendor/htmlmin2-0.1.13.dist-info/zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/voxvera/vendor/htmlmin2-0.1.13.dist-info/zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/voxvera/vendor/inquirerpy-0.3.4.dist-info/INSTALLER b/voxvera/vendor/inquirerpy-0.3.4.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/inquirerpy-0.3.4.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/inquirerpy-0.3.4.dist-info/LICENSE b/voxvera/vendor/inquirerpy-0.3.4.dist-info/LICENSE deleted file mode 100644 index 7f22fe2..0000000 --- a/voxvera/vendor/inquirerpy-0.3.4.dist-info/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Kevin Zhuang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/voxvera/vendor/inquirerpy-0.3.4.dist-info/METADATA b/voxvera/vendor/inquirerpy-0.3.4.dist-info/METADATA deleted file mode 100644 index 91e2e87..0000000 --- a/voxvera/vendor/inquirerpy-0.3.4.dist-info/METADATA +++ /dev/null @@ -1,191 +0,0 @@ -Metadata-Version: 2.1 -Name: inquirerpy -Version: 0.3.4 -Summary: Python port of Inquirer.js (A collection of common interactive command-line user interfaces) -Home-page: https://github.com/kazhala/InquirerPy -License: MIT -Keywords: cli,prompt-toolkit,commandline,inquirer,development -Author: Kevin Zhuang -Author-email: kevin7441@gmail.com -Maintainer: Kevin Zhuang -Maintainer-email: kevin7441@gmail.com -Requires-Python: >=3.7,<4.0 -Classifier: Development Status :: 2 - Pre-Alpha -Classifier: Environment :: Console -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License -Classifier: Operating System :: Microsoft -Classifier: Operating System :: Unix -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.7 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Topic :: Software Development -Classifier: Topic :: Software Development :: Libraries -Classifier: Topic :: Software Development :: Libraries :: Application Frameworks -Classifier: Topic :: Software Development :: User Interfaces -Provides-Extra: docs -Requires-Dist: Sphinx (>=4.1.2,<5.0.0); extra == "docs" -Requires-Dist: furo (>=2021.8.17-beta.43,<2022.0.0); extra == "docs" -Requires-Dist: myst-parser (>=0.15.1,<0.16.0); extra == "docs" -Requires-Dist: pfzy (>=0.3.1,<0.4.0) -Requires-Dist: prompt-toolkit (>=3.0.1,<4.0.0) -Requires-Dist: sphinx-autobuild (>=2021.3.14,<2022.0.0); extra == "docs" -Requires-Dist: sphinx-copybutton (>=0.4.0,<0.5.0); extra == "docs" -Project-URL: Documentation, https://inquirerpy.readthedocs.io -Project-URL: Repository, https://github.com/kazhala/InquirerPy -Description-Content-Type: text/markdown - -# InquirerPy - -[![Test](https://github.com/kazhala/InquirerPy/workflows/Test/badge.svg)](https://github.com/kazhala/InquirerPy/actions?query=workflow%3ATest) -[![Lint](https://github.com/kazhala/InquirerPy/workflows/Lint/badge.svg)](https://github.com/kazhala/InquirerPy/actions?query=workflow%3ALint) -[![Build](https://codebuild.ap-southeast-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiUUYyRUIxOXBWZ0hKcUhrbXplQklMemRsTVBxbUk3bFlTdldnRGpxeEpQSXJidEtmVEVzbVNCTE1UR3VoRSt2N0NQV0VaUXlCUzNackFBNzRVUFBBS1FnPSIsIml2UGFyYW1ldGVyU3BlYyI6IloxREtFeWY4WkhxV0NFWU0iLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)](https://ap-southeast-2.console.aws.amazon.com/codesuite/codebuild/378756445655/projects/InquirerPy/history?region=ap-southeast-2&builds-meta=eyJmIjp7InRleHQiOiIifSwicyI6e30sIm4iOjIwLCJpIjowfQ) -[![Coverage](https://img.shields.io/coveralls/github/kazhala/InquirerPy?logo=coveralls)](https://coveralls.io/github/kazhala/InquirerPy?branch=master) -[![Version](https://img.shields.io/pypi/pyversions/InquirerPy)](https://pypi.org/project/InquirerPy/) -[![PyPi](https://img.shields.io/pypi/v/InquirerPy)](https://pypi.org/project/InquirerPy/) - -Documentation: [inquirerpy.readthedocs.io](https://inquirerpy.readthedocs.io/) - - - -## Introduction - -`InquirerPy` is a Python port of the famous [Inquirer.js](https://github.com/SBoudrias/Inquirer.js/) (A collection of common interactive command line user interfaces). -This project is a re-implementation of the [PyInquirer](https://github.com/CITGuru/PyInquirer) project, with bug fixes of known issues, new prompts, backward compatible APIs -as well as more customisation options. - - - -![Demo](https://github.com/kazhala/gif/blob/master/InquirerPy-demo.gif) - -## Motivation - -[PyInquirer](https://github.com/CITGuru/PyInquirer) is a great Python port of [Inquirer.js](https://github.com/SBoudrias/Inquirer.js/), however, the project is slowly reaching -to an unmaintained state with various issues left behind and no intention to implement more feature requests. I was heavily relying on this library for other projects but -could not proceed due to the limitations. - -Some noticeable ones that bother me the most: - -- hard limit on `prompt_toolkit` version 1.0.3 -- various color issues -- various cursor issues -- No options for VI/Emacs navigation key bindings -- Pagination option doesn't work - -This project uses python3.7+ type hinting with focus on resolving above issues while providing greater customisation options. - -## Requirements - -### OS - -Leveraging [prompt_toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit), `InquirerPy` works cross platform for all OS. Although Unix platform may have a better experience than Windows. - -### Python - -``` -python >= 3.7 -``` - -## Getting Started - -Checkout full documentation **[here](https://inquirerpy.readthedocs.io/)**. - -### Install - -```sh -pip3 install InquirerPy -``` - -### Quick Start - -#### Classic Syntax (PyInquirer) - -```python -from InquirerPy import prompt - -questions = [ - {"type": "input", "message": "What's your name:", "name": "name"}, - {"type": "confirm", "message": "Confirm?", "name": "confirm"}, -] -result = prompt(questions) -name = result["name"] -confirm = result["confirm"] -``` - -#### Alternate Syntax - -```python -from InquirerPy import inquirer - -name = inquirer.text(message="What's your name:").execute() -confirm = inquirer.confirm(message="Confirm?").execute() -``` - - - -## Migrating from PyInquirer - -Most APIs from [PyInquirer](https://github.com/CITGuru/PyInquirer) should be compatible with `InquirerPy`. If you have discovered more incompatible APIs, please -create an issue or directly update README via a pull request. - -### EditorPrompt - -`InquirerPy` does not support [editor](https://github.com/CITGuru/PyInquirer#editor---type-editor) prompt as of now. - -### CheckboxPrompt - -The following table contains the mapping of incompatible parameters. - -| PyInquirer | InquirerPy | -| --------------- | --------------- | -| pointer_sign | pointer | -| selected_sign | enabled_symbol | -| unselected_sign | disabled_symbol | - -### Style - -Every style keys from [PyInquirer](https://github.com/CITGuru/PyInquirer) is present in `InquirerPy` except the ones in the following table. - -| PyInquirer | InquirerPy | -| ---------- | ---------- | -| selected | pointer | - -Although `InquirerPy` support all the keys from [PyInquirer](https://github.com/CITGuru/PyInquirer), the styling works slightly different. -Please refer to the [Style](https://inquirerpy.readthedocs.io/en/latest/pages/style.html) documentation for detailed information. - - - -## Similar projects - -### questionary - -[questionary](https://github.com/tmbo/questionary) is a fantastic fork which supports `prompt_toolkit` 3.0.0+ with performance improvement and more customisation options. -It's already a well established and stable library. - -Comparing with [questionary](https://github.com/tmbo/questionary), `InquirerPy` offers even more customisation options in styles, UI as well as key bindings. `InquirerPy` also provides a new -and powerful [fuzzy](https://inquirerpy.readthedocs.io/en/latest/pages/prompts/fuzzy.html) prompt. - -### python-inquirer - -[python-inquirer](https://github.com/magmax/python-inquirer) is another great Python port of [Inquirer.js](https://github.com/SBoudrias/Inquirer.js/). Instead of using `prompt_toolkit`, it -leverages the library `blessed` to implement the UI. - -Before implementing `InquirerPy`, this library came up as an alternative. It's a more stable library comparing to the original [PyInquirer](https://github.com/CITGuru/PyInquirer), however -it has a rather limited customisation options and an older UI which did not solve the issues I was facing described in the [Motivation](#Motivation) section. - -Comparing with [python-inquirer](https://github.com/magmax/python-inquirer), `InquirerPy` offers a slightly better UI, -more customisation options in key bindings and styles, providing pagination as well as more prompts. - -## Credit - -This project is based on the great work done by the following projects & their authors. - -- [PyInquirer](https://github.com/CITGuru/PyInquirer) -- [prompt_toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) - -## License - -This project is licensed under [MIT](https://github.com/kazhala/InquirerPy/blob/master/LICENSE). - diff --git a/voxvera/vendor/inquirerpy-0.3.4.dist-info/RECORD b/voxvera/vendor/inquirerpy-0.3.4.dist-info/RECORD deleted file mode 100644 index 598a093..0000000 --- a/voxvera/vendor/inquirerpy-0.3.4.dist-info/RECORD +++ /dev/null @@ -1,36 +0,0 @@ -InquirerPy/__init__.py,sha256=qedqHHt5TKcRJSOEm9NlnrnLbwIoJ3klfGEyao7cFDY,92 -InquirerPy/base/__init__.py,sha256=Xmc1pD9KxTVcEFusd1uDFTUbye457b42Wq3nKY5hfPI,396 -InquirerPy/base/complex.py,sha256=pZ7EyLwJCoYJiTtVRSOv1mPK8Ceny0Fnc_uv2_EXJcs,10314 -InquirerPy/base/control.py,sha256=o8v5Kc0O7EQL8FS4wKiiAvsGdWcEOm-ny9nzm2_6zL4,8334 -InquirerPy/base/list.py,sha256=5YzgFpJWERavnopkHiL-1UnngWB8ZS9QsY4XXfW-C2g,8244 -InquirerPy/base/simple.py,sha256=PFqJN8GtKNcPTXkmTSprWH2rSdu_IXsxJTSugxaReZ0,13448 -InquirerPy/containers/__init__.py,sha256=Of9WUUzouFf7HbNXPYXtsgCVZe2iFOBSLYDjP3tV8do,35 -InquirerPy/containers/instruction.py,sha256=30zg-Bd_WR4DHBLnPsl23tAfHpiPxr0mgvNBo1730Yk,1273 -InquirerPy/containers/message.py,sha256=K54H5o7xV4CaTH8x_dWvhmrP9c3mFO4xY9KTdoAyD-Q,1476 -InquirerPy/containers/spinner.py,sha256=7IA2oRDpwpW0kva-bM5LDFd6tsqenhCXXRsd8kutDrw,3954 -InquirerPy/containers/validation.py,sha256=J4pbQD1n5D-jdy-S0ozdUJM7P6lxc6VUBVd-EP3lRYo,1904 -InquirerPy/enum.py,sha256=5jj4bG2Tjjr4GjpFOoBpCxpwNJ0hbw-kA1ic0WvKeWI,293 -InquirerPy/exceptions.py,sha256=gQyHPx0PbKNUG1XUm4hmPqq5kzaXkAQviKYb4v8NNAw,598 -InquirerPy/inquirer.py,sha256=KFvCyiPUAgp1i4hJSA4xLdkSfMhcYezjRG6CICWbU78,800 -InquirerPy/prompts/__init__.py,sha256=oJVhPbnR67_x20GvFIav8WpAg-tM-KiUjJFHRddh3f0,567 -InquirerPy/prompts/checkbox.py,sha256=zKxYwgv4IrpITT0wzUvjXw3QFVU25rAIHStdZUPgmGU,10789 -InquirerPy/prompts/confirm.py,sha256=NtQW-3j5adKOA2PSvdoinAfXAsC441LGezsAew7Bivo,8522 -InquirerPy/prompts/expand.py,sha256=Yz_pqTqo9i1M-qm6DxDyoS_XvT88MpUZY332f8OOF80,19208 -InquirerPy/prompts/filepath.py,sha256=tEetCSGdN9u1AFNFfM0_kjJ0rwxBK0-55A0Od0FML8M,8380 -InquirerPy/prompts/fuzzy.py,sha256=7G4z0k6c0pSwrvk-Y-yk70G3og51siSMI0qyojzn0ho,27709 -InquirerPy/prompts/input.py,sha256=Cyu0fGXgdoA6mhUzbh7PstEBTlkVEEcntoasmLA9wP0,11248 -InquirerPy/prompts/list.py,sha256=bFOn5cCQzfnFAtKZlgzQp7mful54QzvGiNG3ti2-snw,15616 -InquirerPy/prompts/number.py,sha256=fJ1lmZ8nsBRIU95CV6TjyDTo2lKfWX3Q00udCykpFSU,25154 -InquirerPy/prompts/rawlist.py,sha256=qb3ZLLA2XCLsJFFLIeX0z7HylZIcPfvfqj4KR4dYWGA,12589 -InquirerPy/prompts/secret.py,sha256=uZtT_HIDfTfRRb5xuFS6IQ_ub9ZirHs_KYTNDciHDvg,6099 -InquirerPy/py.typed,sha256=E0Fb-ljbipVe3fXv9yM10FgkDz3ks8ADvBjROBPyLxM,70 -InquirerPy/resolver.py,sha256=L2PnXpp7HwM4Vp4mvNXjZ_CiX-BFgQ4KgnMTjXDMihI,8396 -InquirerPy/separator.py,sha256=Om-lhbj9kOGocwhKdQ2Wex6CTJH69CKar72wPZRETQY,693 -InquirerPy/utils.py,sha256=Lf0nYT1xNJobjQrNR5Z0vDIR4jJeITFLeI0EfEuYAm8,11224 -InquirerPy/validator.py,sha256=exRQ0dEdfaVScVYuSsPfLNuhwWIVueHHw1kUYAjGr2w,5907 -inquirerpy-0.3.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -inquirerpy-0.3.4.dist-info/LICENSE,sha256=f_X1vlC7GWiYmTHt2_p9ESxTHEj_V3y4xAbsCRGCx6I,1069 -inquirerpy-0.3.4.dist-info/METADATA,sha256=E6RR6q3qbYpH4eVeNPppbd1UV18ywnN7jjuxtJQnis8,8145 -inquirerpy-0.3.4.dist-info/RECORD,, -inquirerpy-0.3.4.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -inquirerpy-0.3.4.dist-info/WHEEL,sha256=y3eDiaFVSNTPbgzfNn0nYn5tEn1cX6WrdetDlQM4xWw,83 diff --git a/voxvera/vendor/inquirerpy-0.3.4.dist-info/REQUESTED b/voxvera/vendor/inquirerpy-0.3.4.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/inquirerpy-0.3.4.dist-info/WHEEL b/voxvera/vendor/inquirerpy-0.3.4.dist-info/WHEEL deleted file mode 100644 index 3764652..0000000 --- a/voxvera/vendor/inquirerpy-0.3.4.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: poetry 1.0.7 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/voxvera/vendor/jsmin-3.0.1.dist-info/INSTALLER b/voxvera/vendor/jsmin-3.0.1.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/jsmin-3.0.1.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/jsmin-3.0.1.dist-info/LICENSE.txt b/voxvera/vendor/jsmin-3.0.1.dist-info/LICENSE.txt deleted file mode 100644 index 193a853..0000000 --- a/voxvera/vendor/jsmin-3.0.1.dist-info/LICENSE.txt +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Dave St.Germain - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - diff --git a/voxvera/vendor/jsmin-3.0.1.dist-info/METADATA b/voxvera/vendor/jsmin-3.0.1.dist-info/METADATA deleted file mode 100644 index 2d5001b..0000000 --- a/voxvera/vendor/jsmin-3.0.1.dist-info/METADATA +++ /dev/null @@ -1,196 +0,0 @@ -Metadata-Version: 2.1 -Name: jsmin -Version: 3.0.1 -Summary: JavaScript minifier. -Home-page: https://github.com/tikitu/jsmin/ -Author: Dave St.Germain -Author-email: dave@st.germa.in -Maintainer: Tikitu de Jager -Maintainer-email: tikitu+jsmin@logophile.org -License: MIT License -Classifier: Development Status :: 5 - Production/Stable -Classifier: Environment :: Web Environment -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content -Classifier: Topic :: Software Development :: Pre-processors -Classifier: Topic :: Text Processing :: Filters -License-File: LICENSE.txt - -===== -jsmin -===== - -JavaScript minifier. - -Usage -===== - -.. code:: python - - from jsmin import jsmin - with open('myfile.js') as js_file: - minified = jsmin(js_file.read()) - -You can run it as a commandline tool also:: - - python -m jsmin myfile.js - -NB: ``jsmin`` makes no attempt to be compatible with -`ECMAScript 6 / ES.next / Harmony `_. -The current maintainer does not intend to add ES6-compatibility. If you would -like to take over maintenance and update ``jsmin`` for ES6, please contact -`Tikitu de Jager `_. Pull requests are also -welcome, of course, but my time to review them is somewhat limited these days. - -If you're using ``jsmin`` on ES6 code, though, you might find the ``quote_chars`` -parameter useful: - -.. code:: python - - from jsmin import jsmin - with open('myfile.js') as js_file: - minified = jsmin(js_file.read(), quote_chars="'\"`") - - -Where to get it -=============== - -* install the package `from pypi `_ -* get the latest release `from latest-release on github `_ -* get the development version `from master on github `_ - - -Python 2 support removed -======================== - -Python 2 support was removed in version 3.0.0. If you need to support Python 2, please use version 2.2.2 with setuptools<58. - -Contributing -============ - -`Issues `_ and `Pull requests `_ -will be gratefully received on Github. The project used to be hosted -`on bitbucket `_ and old issues can still be -found there. - -If possible, please make separate pull requests for tests and for code: tests will be added to the `latest-release` branch while code will go to `master`. - -Unless you request otherwise, your Github identity will be added to the contributor's list below; if you prefer a -different name feel free to add it in your pull request instead. (If you prefer not to be mentioned you'll have to let -the maintainer know somehow.) - -Build/test status -================= - -Both branches are tested with Travis: https://travis-ci.org/tikitu/jsmin - -The `latest-release` branch (the version on PyPI plus any new tests) is tested against CPython 3. -Currently: - -.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=latest-release - -If that branch is failing that means there's a new test that fails on *the latest released version on pypi*, with no fix yet -released. - -The `master` branch (development version, might be ahead of latest released version) is tested against CPython 3. -Currently: - -.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=master - -If `master` is failing don't use it, but as long as `latest-release` is passing the pypi release should be ok. - -Contributors (chronological commit order) -========================================= - -* `Dave St.Germain `_ (original author) -* `Hans weltar `_ -* `Tikitu de Jager `_ (current maintainer) -* https://bitbucket.org/rennat -* `Nick Alexander `_ -* `Gennady Kovshenin `_ -* `Matt Molyneaux `_ -* `Albert Wang `_ -* `Ben Bradshaw `_ - -Changelog -========= - -v3.0.0 (2021-09-08) Ben Bradshaw --------------------------------- - -- Breaking Change: Removed support for Python 2 - -- Removed usage of use_2to3 in setup.py - -v2.2.2 (2017-05-01) Tikitu de Jager ------------------------------------ - -- Add license headers to code files (fixes i#17) - -- Remove mercurial files (fixes #20) - -v2.2.1 (2016-03-06) Tikitu de Jager ------------------------------------ - -- Fix #14: Infinite loop on `return x / 1;` - -v2.2.0 (2015-12-19) Tikitu de Jager ------------------------------------ - -- Merge #13: Preserve "loud comments" starting with `/*!` - - These are commonly used for copyright notices, and are preserved by various - other minifiers (e.g. YUI Compressor). - -v2.1.6 (2015-10-14) Tikitu de Jager ------------------------------------ - -- Fix #12: Newline following a regex literal should not be elided. - -v2.1.5 (2015-10-11) Tikitu de Jager ------------------------------------ - -- Fix #9: Premature end of statement caused by multi-line comment not - adding newline. - -- Fix #10: Removing multiline comment separating tokens must leave a space. - -- Refactor comment handling for maintainability. - -v2.1.4 (2015-08-23) Tikitu de Jager ------------------------------------ - -- Fix #6: regex literal matching comment was not correctly matched. - -- Refactor regex literal handling for robustness. - -v2.1.3 (2015-08-09) Tikitu de Jager ------------------------------------ - -- Reset issue numbering: issues live in github from now on. - -- Fix #1: regex literal was not recognised when occurring directly after `{`. - -v2.1.2 (2015-07-12) Tikitu de Jager ------------------------------------ - -- Issue numbers here and below refer to the bitbucket repository. - -- Fix #17: bug when JS starts with comment then literal regex. - -v2.1.1 (2015-02-14) Tikitu de Jager ------------------------------------ - -- Fix #16: bug returning a literal regex containing escaped forward-slashes. - -v2.1.0 (2014-12-24) Tikitu de Jager ------------------------------------ - -- First changelog entries; see README.rst for prior contributors. - -- Expose quote_chars parameter to provide just enough unofficial Harmony - support to be useful. - diff --git a/voxvera/vendor/jsmin-3.0.1.dist-info/RECORD b/voxvera/vendor/jsmin-3.0.1.dist-info/RECORD deleted file mode 100644 index a0b5030..0000000 --- a/voxvera/vendor/jsmin-3.0.1.dist-info/RECORD +++ /dev/null @@ -1,10 +0,0 @@ -jsmin-3.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -jsmin-3.0.1.dist-info/LICENSE.txt,sha256=cNZs8TW3bhxKeQmyYjBE4xvRQ6z-ATIR5i5u3jCgGRw,1084 -jsmin-3.0.1.dist-info/METADATA,sha256=x_PUEoo-0e6vMLNDJIhy-08vToX28O6DBWa0OQJ4i8M,6379 -jsmin-3.0.1.dist-info/RECORD,, -jsmin-3.0.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -jsmin-3.0.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92 -jsmin-3.0.1.dist-info/top_level.txt,sha256=zmE3G_jGnYEu2VZf8t21Hj7ScxA2amQrg_lrWmg_uDM,6 -jsmin/__init__.py,sha256=vVXl_lyB09JGGTX7WTxwsWttCWAvn8d9WNVUJQoVWd0,8441 -jsmin/__main__.py,sha256=2UyJsGAIlw8As7FuyotDDImZnITcRWVl1YUTDZEmYkE,1538 -jsmin/test.py,sha256=-lD858a_NuxUDjhiIHzcQwADocCtt9m0jwkMh_k2zDk,22537 diff --git a/voxvera/vendor/jsmin-3.0.1.dist-info/REQUESTED b/voxvera/vendor/jsmin-3.0.1.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/jsmin-3.0.1.dist-info/WHEEL b/voxvera/vendor/jsmin-3.0.1.dist-info/WHEEL deleted file mode 100644 index 98c0d20..0000000 --- a/voxvera/vendor/jsmin-3.0.1.dist-info/WHEEL +++ /dev/null @@ -1,5 +0,0 @@ -Wheel-Version: 1.0 -Generator: bdist_wheel (0.42.0) -Root-Is-Purelib: true -Tag: py3-none-any - diff --git a/voxvera/vendor/jsmin-3.0.1.dist-info/top_level.txt b/voxvera/vendor/jsmin-3.0.1.dist-info/top_level.txt deleted file mode 100644 index 79abaa9..0000000 --- a/voxvera/vendor/jsmin-3.0.1.dist-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -jsmin diff --git a/voxvera/vendor/jsmin/__init__.py b/voxvera/vendor/jsmin/__init__.py deleted file mode 100644 index 06e90cf..0000000 --- a/voxvera/vendor/jsmin/__init__.py +++ /dev/null @@ -1,252 +0,0 @@ -# vim: set fileencoding=utf-8 : - -# This code is original from jsmin by Douglas Crockford, it was translated to -# Python by Baruch Even. It was rewritten by Dave St.Germain for speed. -# -# The MIT License (MIT) -# -# Copyright (c) 2013 Dave St.Germain -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - - -import io - -__all__ = ['jsmin', 'JavascriptMinify'] -__version__ = '3.0.1' - - -def jsmin(js, **kwargs): - """ - returns a minified version of the javascript string - """ - klass = io.StringIO - ins = klass(js) - outs = klass() - JavascriptMinify(ins, outs, **kwargs).minify() - return outs.getvalue() - - -class JavascriptMinify(object): - """ - Minify an input stream of javascript, writing - to an output stream - """ - - def __init__(self, instream=None, outstream=None, quote_chars="'\""): - self.ins = instream - self.outs = outstream - self.quote_chars = quote_chars - - def minify(self, instream=None, outstream=None): - if instream and outstream: - self.ins, self.outs = instream, outstream - - self.is_return = False - self.return_buf = '' - - def write(char): - # all of this is to support literal regular expressions. - # sigh - if char in 'return': - self.return_buf += char - self.is_return = self.return_buf == 'return' - else: - self.return_buf = '' - self.is_return = self.is_return and char < '!' - self.outs.write(char) - if self.is_return: - self.return_buf = '' - - read = self.ins.read - - space_strings = "abcdefghijklmnopqrstuvwxyz"\ - "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$\\" - self.space_strings = space_strings - starters, enders = '{[(+-', '}])+-/' + self.quote_chars - newlinestart_strings = starters + space_strings + self.quote_chars - newlineend_strings = enders + space_strings + self.quote_chars - self.newlinestart_strings = newlinestart_strings - self.newlineend_strings = newlineend_strings - - do_newline = False - do_space = False - escape_slash_count = 0 - in_quote = '' - quote_buf = [] - - previous = ';' - previous_non_space = ';' - next1 = read(1) - - while next1: - next2 = read(1) - if in_quote: - quote_buf.append(next1) - - if next1 == in_quote: - numslashes = 0 - for c in reversed(quote_buf[:-1]): - if c != '\\': - break - else: - numslashes += 1 - if numslashes % 2 == 0: - in_quote = '' - write(''.join(quote_buf)) - elif next1 in '\r\n': - next2, do_newline = self.newline( - previous_non_space, next2, do_newline) - elif next1 < '!': - if (previous_non_space in space_strings \ - or previous_non_space > '~') \ - and (next2 in space_strings or next2 > '~'): - do_space = True - elif previous_non_space in '-+' and next2 == previous_non_space: - # protect against + ++ or - -- sequences - do_space = True - elif self.is_return and next2 == '/': - # returning a regex... - write(' ') - elif next1 == '/': - if do_space: - write(' ') - if next2 == '/': - # Line comment: treat it as a newline, but skip it - next2 = self.line_comment(next1, next2) - next1 = '\n' - next2, do_newline = self.newline( - previous_non_space, next2, do_newline) - elif next2 == '*': - self.block_comment(next1, next2) - next2 = read(1) - if previous_non_space in space_strings: - do_space = True - next1 = previous - else: - if previous_non_space in '{(,=:[?!&|;' or self.is_return: - self.regex_literal(next1, next2) - # hackish: after regex literal next1 is still / - # (it was the initial /, now it's the last /) - next2 = read(1) - else: - write('/') - else: - if do_newline: - write('\n') - do_newline = False - do_space = False - if do_space: - do_space = False - write(' ') - - write(next1) - if next1 in self.quote_chars: - in_quote = next1 - quote_buf = [] - - if next1 >= '!': - previous_non_space = next1 - - if next1 == '\\': - escape_slash_count += 1 - else: - escape_slash_count = 0 - - previous = next1 - next1 = next2 - - def regex_literal(self, next1, next2): - assert next1 == '/' # otherwise we should not be called! - - self.return_buf = '' - - read = self.ins.read - write = self.outs.write - - in_char_class = False - - write('/') - - next = next2 - while next and (next != '/' or in_char_class): - write(next) - if next == '\\': - write(read(1)) # whatever is next is escaped - elif next == '[': - write(read(1)) # character class cannot be empty - in_char_class = True - elif next == ']': - in_char_class = False - next = read(1) - - write('/') - - def line_comment(self, next1, next2): - assert next1 == next2 == '/' - - read = self.ins.read - - while next1 and next1 not in '\r\n': - next1 = read(1) - while next1 and next1 in '\r\n': - next1 = read(1) - - return next1 - - def block_comment(self, next1, next2): - assert next1 == '/' - assert next2 == '*' - - read = self.ins.read - - # Skip past first /* and avoid catching on /*/...*/ - next1 = read(1) - next2 = read(1) - - comment_buffer = '/*' - while next1 != '*' or next2 != '/': - comment_buffer += next1 - next1 = next2 - next2 = read(1) - - if comment_buffer.startswith("/*!"): - # comment needs preserving - self.outs.write(comment_buffer) - self.outs.write("*/\n") - - - def newline(self, previous_non_space, next2, do_newline): - read = self.ins.read - - if previous_non_space and ( - previous_non_space in self.newlineend_strings - or previous_non_space > '~'): - while 1: - if next2 < '!': - next2 = read(1) - if not next2: - break - else: - if next2 in self.newlinestart_strings \ - or next2 > '~' or next2 == '/': - do_newline = True - break - - return next2, do_newline diff --git a/voxvera/vendor/jsmin/__main__.py b/voxvera/vendor/jsmin/__main__.py deleted file mode 100644 index 6d37a3e..0000000 --- a/voxvera/vendor/jsmin/__main__.py +++ /dev/null @@ -1,37 +0,0 @@ -# vim: set fileencoding=utf-8 : - -# This code is original from jsmin by Douglas Crockford, it was translated to -# Python by Baruch Even. It was rewritten by Dave St.Germain for speed. -# -# The MIT License (MIT) -#· -# Copyright (c) 2013 Dave St.Germain -#· -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -#· -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -#· -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -import sys, os, glob -from jsmin import JavascriptMinify - -for f in sys.argv[1:]: - with open(f, 'r') as js: - minifier = JavascriptMinify(js, sys.stdout) - minifier.minify() - sys.stdout.write('\n') - - diff --git a/voxvera/vendor/jsmin/test.py b/voxvera/vendor/jsmin/test.py deleted file mode 100644 index 173ac65..0000000 --- a/voxvera/vendor/jsmin/test.py +++ /dev/null @@ -1,636 +0,0 @@ -# vim: set fileencoding=utf-8 : - -# This code is original from jsmin by Douglas Crockford, it was translated to -# Python by Baruch Even. It was rewritten by Dave St.Germain for speed. -# -# The MIT License (MIT) -#· -# Copyright (c) 2013 Dave St.Germain -#· -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -#· -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -#· -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -import unittest -import jsmin - - -class JsTests(unittest.TestCase): - def _minify(self, js): - return jsmin.jsmin(js) - - def assertEqual(self, thing1, thing2): - if thing1 != thing2: - print(repr(thing1), repr(thing2)) - raise AssertionError - return True - - def assertMinified(self, js_input, expected, **kwargs): - minified = jsmin.jsmin(js_input, **kwargs) - assert minified == expected, "\ngot: %r\nexp: %r" % (minified, expected) - - def testQuoted(self): - js = r''' - Object.extend(String, { - interpret: function(value) { - return value == null ? '' : String(value); - }, - specialChar: { - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '\\': '\\\\' - } - }); - - ''' - expected = r"""Object.extend(String,{interpret:function(value){return value==null?'':String(value);},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});""" - self.assertMinified(js, expected) - - def testSingleComment(self): - js = r'''// use native browser JS 1.6 implementation if available - if (Object.isFunction(Array.prototype.forEach)) - Array.prototype._each = Array.prototype.forEach; - - if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) { - - // hey there - function() {// testing comment - foo; - //something something - - location = 'http://foo.com;'; // goodbye - } - //bye - ''' - expected = r"""if(Object.isFunction(Array.prototype.forEach)) -Array.prototype._each=Array.prototype.forEach;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(item,i){function(){foo;location='http://foo.com;';}""" - self.assertMinified(js, expected) - - def testEmpty(self): - self.assertMinified('', '') - self.assertMinified(' ', '') - self.assertMinified('\n', '') - self.assertMinified('\r\n', '') - self.assertMinified('\t', '') - - - def testMultiComment(self): - js = r""" - function foo() { - print('hey'); - } - /* - if(this.options.zindex) { - this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); - this.element.style.zIndex = this.options.zindex; - } - */ - another thing; - """ - expected = r"""function foo(){print('hey');} -another thing;""" - self.assertMinified(js, expected) - - def testLeadingComment(self): - js = r"""/* here is a comment at the top - - it ends here */ - function foo() { - alert('crud'); - } - - """ - expected = r"""function foo(){alert('crud');}""" - self.assertMinified(js, expected) - - def testBlockCommentStartingWithSlash(self): - self.assertMinified('A; /*/ comment */ B', 'A;B') - - def testBlockCommentEndingWithSlash(self): - self.assertMinified('A; /* comment /*/ B', 'A;B') - - def testLeadingBlockCommentStartingWithSlash(self): - self.assertMinified('/*/ comment */ A', 'A') - - def testLeadingBlockCommentEndingWithSlash(self): - self.assertMinified('/* comment /*/ A', 'A') - - def testEmptyBlockComment(self): - self.assertMinified('/**/ A', 'A') - - def testBlockCommentMultipleOpen(self): - self.assertMinified('/* A /* B */ C', 'C') - - def testJustAComment(self): - self.assertMinified(' // a comment', '') - - def test_issue_bitbucket_10(self): - js = ''' - files = [{name: value.replace(/^.*\\\\/, '')}]; - // comment - A - ''' - expected = '''files=[{name:value.replace(/^.*\\\\/,'')}];A''' - self.assertMinified(js, expected) - - def test_issue_bitbucket_10_without_semicolon(self): - js = ''' - files = [{name: value.replace(/^.*\\\\/, '')}] - // comment - A - ''' - expected = '''files=[{name:value.replace(/^.*\\\\/,'')}]\nA''' - self.assertMinified(js, expected) - - def testRe(self): - js = r''' - var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); - return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); - });''' - expected = r"""var str=this.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'');return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);});""" - self.assertMinified(js, expected) - - def testIgnoreComment(self): - js = r""" - var options_for_droppable = { - overlap: options.overlap, - containment: options.containment, - tree: options.tree, - hoverclass: options.hoverclass, - onHover: Sortable.onHover - } - - var options_for_tree = { - onHover: Sortable.onEmptyHover, - overlap: options.overlap, - containment: options.containment, - hoverclass: options.hoverclass - } - - // fix for gecko engine - Element.cleanWhitespace(element); - """ - expected = r"""var options_for_droppable={overlap:options.overlap,containment:options.containment,tree:options.tree,hoverclass:options.hoverclass,onHover:Sortable.onHover} -var options_for_tree={onHover:Sortable.onEmptyHover,overlap:options.overlap,containment:options.containment,hoverclass:options.hoverclass} -Element.cleanWhitespace(element);""" - self.assertMinified(js, expected) - - def testHairyRe(self): - js = r""" - inspect: function(useDoubleQuotes) { - var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { - var character = String.specialChar[match[0]]; - return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); - }); - if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; - return "'" + escapedString.replace(/'/g, '\\\'') + "'"; - }, - - toJSON: function() { - return this.inspect(true); - }, - - unfilterJSON: function(filter) { - return this.sub(filter || Prototype.JSONFilter, '#{1}'); - }, - """ - expected = r"""inspect:function(useDoubleQuotes){var escapedString=this.gsub(/[\x00-\x1f\\]/,function(match){var character=String.specialChar[match[0]];return character?character:'\\u00'+match[0].charCodeAt().toPaddedString(2,16);});if(useDoubleQuotes)return'"'+escapedString.replace(/"/g,'\\"')+'"';return"'"+escapedString.replace(/'/g,'\\\'')+"'";},toJSON:function(){return this.inspect(true);},unfilterJSON:function(filter){return this.sub(filter||Prototype.JSONFilter,'#{1}');},""" - self.assertMinified(js, expected) - - def testLiteralRe(self): - js = r""" - myString.replace(/\\/g, '/'); - console.log("hi"); - """ - expected = r"""myString.replace(/\\/g,'/');console.log("hi");""" - self.assertMinified(js, expected) - - js = r''' return /^data:image\//i.test(url) || - /^(https?|ftp|file|about|chrome|resource):/.test(url); - ''' - expected = r'''return /^data:image\//i.test(url)||/^(https?|ftp|file|about|chrome|resource):/.test(url);''' - self.assertMinified(js, expected) - - def testNoBracesWithComment(self): - js = r""" - onSuccess: function(transport) { - var js = transport.responseText.strip(); - if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check - throw 'Server returned an invalid collection representation.'; - this._collection = eval(js); - this.checkForExternalText(); - }.bind(this), - onFailure: this.onFailure - }); - """ - expected = r"""onSuccess:function(transport){var js=transport.responseText.strip();if(!/^\[.*\]$/.test(js)) -throw'Server returned an invalid collection representation.';this._collection=eval(js);this.checkForExternalText();}.bind(this),onFailure:this.onFailure});""" - self.assertMinified(js, expected) - js_without_comment = r""" - onSuccess: function(transport) { - var js = transport.responseText.strip(); - if (!/^\[.*\]$/.test(js)) - throw 'Server returned an invalid collection representation.'; - this._collection = eval(js); - this.checkForExternalText(); - }.bind(this), - onFailure: this.onFailure - }); - """ - self.assertMinified(js_without_comment, expected) - - def testSpaceInRe(self): - js = r""" - num = num.replace(/ /g,''); - """ - self.assertMinified(js, "num=num.replace(/ /g,'');") - - def testEmptyString(self): - js = r''' - function foo('') { - - } - ''' - self.assertMinified(js, "function foo(''){}") - - def testDoubleSpace(self): - js = r''' -var foo = "hey"; - ''' - self.assertMinified(js, 'var foo="hey";') - - def testLeadingRegex(self): - js = r'/[d]+/g ' - self.assertMinified(js, js.strip()) - - def testLeadingString(self): - js = r"'a string in the middle of nowhere'; // and a comment" - self.assertMinified(js, "'a string in the middle of nowhere';") - - def testSingleCommentEnd(self): - js = r'// a comment\n' - self.assertMinified(js, '') - - def testInputStream(self): - try: - from StringIO import StringIO - except ImportError: - from io import StringIO - - ins = StringIO(r''' - function foo('') { - - } - ''') - outs = StringIO() - m = jsmin.JavascriptMinify() - m.minify(ins, outs) - output = outs.getvalue() - assert output == "function foo(''){}" - - def testUnicode(self): - instr = u'\u4000 //foo' - expected = u'\u4000' - output = jsmin.jsmin(instr) - self.assertEqual(output, expected) - - def testCommentBeforeEOF(self): - self.assertMinified("//test\r\n", "") - - def testCommentInObj(self): - self.assertMinified("""{ - a: 1,//comment - }""", "{a:1,}") - - def testCommentInObj2(self): - self.assertMinified("{a: 1//comment\r\n}", "{a:1}") - - def testImplicitSemicolon(self): - # return \n 1 is equivalent with return; 1 - # so best make sure jsmin retains the newline - self.assertMinified("return\na", "return\na") - - def test_explicit_semicolon(self): - self.assertMinified("return;//comment\r\na", "return;a") - - def testImplicitSemicolon2(self): - self.assertMinified("return//comment...\r\nar", "return\nar") - - def testImplicitSemicolon3(self): - self.assertMinified("return//comment...\r\na", "return\na") - - def testSingleComment2(self): - self.assertMinified('x.replace(/\//, "_")// slash to underscore', - 'x.replace(/\//,"_")') - - def testSlashesNearComments(self): - original = ''' - { a: n / 2, } - // comment - ''' - expected = '''{a:n/2,}''' - self.assertMinified(original, expected) - - def testReturn(self): - original = ''' - return foo;//comment - return bar;''' - expected = 'return foo;return bar;' - self.assertMinified(original, expected) - original = ''' - return foo - return bar;''' - expected = 'return foo\nreturn bar;' - self.assertMinified(original, expected) - - def test_space_plus(self): - original = '"s" + ++e + "s"' - expected = '"s"+ ++e+"s"' - self.assertMinified(original, expected) - - def test_no_final_newline(self): - original = '"s"' - expected = '"s"' - self.assertMinified(original, expected) - - def test_space_with_regex_repeats(self): - original = '/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");' - self.assertMinified(original, original) # there should be nothing jsmin can do here - - def test_space_with_regex_repeats_not_at_start(self): - original = 'aaa;/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");' - self.assertMinified(original, original) # there should be nothing jsmin can do here - - def test_space_in_regex(self): - original = '/a (a)/.test("a")' - self.assertMinified(original, original) - - def test_brackets_around_slashed_regex(self): - original = 'function a() { /\//.test("a") }' - expected = 'function a(){/\//.test("a")}' - self.assertMinified(original, expected) - - def test_angular_1(self): - original = '''var /** holds major version number for IE or NaN for real browsers */ - msie, - jqLite, // delay binding since jQuery could be loaded after us.''' - minified = jsmin.jsmin(original) - self.assertTrue('var\nmsie' in minified) - - def test_angular_2(self): - original = 'var/* comment */msie;' - expected = 'var msie;' - self.assertMinified(original, expected) - - def test_angular_3(self): - original = 'var /* comment */msie;' - expected = 'var msie;' - self.assertMinified(original, expected) - - def test_angular_4(self): - original = 'var /* comment */ msie;' - expected = 'var msie;' - self.assertMinified(original, expected) - - def test_angular_5(self): - original = 'a/b' - self.assertMinified(original, original) - - def testBackticks(self): - original = '`test`' - self.assertMinified(original, original, quote_chars="'\"`") - - original = '` test with leading whitespace`' - self.assertMinified(original, original, quote_chars="'\"`") - - original = '`test with trailing whitespace `' - self.assertMinified(original, original, quote_chars="'\"`") - - original = '''`test -with a new line`''' - self.assertMinified(original, original, quote_chars="'\"`") - - original = '''dumpAvStats: function(stats) { - var statsString = ""; - if (stats.mozAvSyncDelay) { - statsString += `A/V sync: ${stats.mozAvSyncDelay} ms `; - } - if (stats.mozJitterBufferDelay) { - statsString += `Jitter-buffer delay: ${stats.mozJitterBufferDelay} ms`; - } - - return React.DOM.div(null, statsString);''' - expected = 'dumpAvStats:function(stats){var statsString="";if(stats.mozAvSyncDelay){statsString+=`A/V sync: ${stats.mozAvSyncDelay} ms `;}\nif(stats.mozJitterBufferDelay){statsString+=`Jitter-buffer delay: ${stats.mozJitterBufferDelay} ms`;}\nreturn React.DOM.div(null,statsString);' - self.assertMinified(original, expected, quote_chars="'\"`") - - def testBackticksExpressions(self): - original = '`Fifteen is ${a + b} and not ${2 * a + b}.`' - self.assertMinified(original, original, quote_chars="'\"`") - - original = '''`Fifteen is ${a + -b} and not ${2 * a + "b"}.`''' - self.assertMinified(original, original, quote_chars="'\"`") - - def testBackticksTagged(self): - original = 'tag`Hello ${ a + b } world ${ a * b}`;' - self.assertMinified(original, original, quote_chars="'\"`") - - def test_issue_bitbucket_16(self): - original = """ - f = function() { - return /DataTree\/(.*)\//.exec(this._url)[1]; - } - """ - self.assertMinified( - original, - 'f=function(){return /DataTree\/(.*)\//.exec(this._url)[1];}') - - def test_issue_bitbucket_17(self): - original = "// hi\n/^(get|post|head|put)$/i.test('POST')" - self.assertMinified(original, - "/^(get|post|head|put)$/i.test('POST')") - - def test_issue_6(self): - original = ''' - respond.regex = { - comments: /\/\*[^*]*\*+([^/][^*]*\*+)*\//gi, - urls: 'whatever' - }; - ''' - expected = original.replace(' ', '').replace('\n', '') - self.assertMinified(original, expected) - - def test_issue_9(self): - original = '\n'.join([ - 'var a = \'hi\' // this is a comment', - 'var a = \'hi\' /* this is also a comment */', - 'console.log(1) // this is a comment', - 'console.log(1) /* this is also a comment */', - '1 // this is a comment', - '1 /* this is also a comment */', - '{} // this is a comment', - '{} /* this is also a comment */', - '"YOLO" /* this is a comment */', - '"YOLO" // this is a comment', - '(1 + 2) // comment', - '(1 + 2) /* yup still comment */', - 'var b' - ]) - expected = '\n'.join([ - 'var a=\'hi\'', - 'var a=\'hi\'', - 'console.log(1)', - 'console.log(1)', - '1', - '1', - '{}', - '{}', - '"YOLO"', - '"YOLO"', - '(1+2)', - '(1+2)', - 'var b' - ]) - self.assertMinified(expected, expected) - self.assertMinified(original, expected) - - def test_newline_between_strings(self): - self.assertMinified('"yolo"\n"loyo"', '"yolo"\n"loyo"') - - def test_issue_10_comments_between_tokens(self): - self.assertMinified('var/* comment */a', 'var a') - - def test_ends_with_string(self): - self.assertMinified('var s = "s"', 'var s="s"') - - def test_short_comment(self): - self.assertMinified('a;/**/b', 'a;b') - - def test_shorter_comment(self): - self.assertMinified('a;/*/*/b', 'a;b') - - def test_block_comment_with_semicolon(self): - self.assertMinified('a;/**/\nb', 'a;b') - - def test_block_comment_With_implicit_semicolon(self): - self.assertMinified('a/**/\nvar b', 'a\nvar b') - - def test_issue_9_single_comments(self): - original = ''' - var a = "hello" // this is a comment - a += " world" - ''' - self.assertMinified(original, 'var a="hello"\na+=" world"') - - def test_issue_9_multi_comments(self): - original = ''' - var a = "hello" /* this is a comment */ - a += " world" - ''' - self.assertMinified(original, 'var a="hello"\na+=" world"') - - def test_issue_12_re_nl_if(self): - original = ''' - var re = /\d{4}/ - if (1) { console.log(2); }''' - self.assertMinified( - original, 'var re=/\d{4}/\nif(1){console.log(2);}') - - def test_issue_12_re_nl_other(self): - original = ''' - var re = /\d{4}/ - g = 10''' - self.assertMinified(original , 'var re=/\d{4}/\ng=10') - - def test_preserve_copyright(self): - original = ''' - function this() { - /*! Copyright year person */ - console.log('hello!'); - } - - /*! Copyright blah blah - * - * Some other text - */ - - var a; - ''' - expected = """function this(){/*! Copyright year person */ -console.log('hello!');}/*! Copyright blah blah - * - * Some other text - */\n\nvar a;""" - self.assertMinified(original, expected) - - def test_issue_14(self): - original = 'return x / 1;' - self.assertMinified(original, 'return x/1;') - - def test_issue_14_with_char_from_return(self): - original = 'return r / 1;' - self.assertMinified(original, 'return r/1;') - - -class RegexTests(unittest.TestCase): - - def regex_recognise(self, js): - klass = jsmin.io.StringIO - ins = klass(js[2:]) - outs = klass() - jsmin.JavascriptMinify(ins, outs).regex_literal(js[0], js[1]) - return outs.getvalue() - - def assert_regex(self, js_input, expected): - assert js_input[0] == '/' # otherwise we should not be testing! - recognised = self.regex_recognise(js_input) - assert recognised == expected, "\n in: %r\ngot: %r\nexp: %r" % (js_input, recognised, expected) - - def test_simple(self): - self.assert_regex('/123/g', '/123/') - - def test_character_class(self): - self.assert_regex('/a[0-9]b/g', '/a[0-9]b/') - - def test_character_class_with_slash(self): - self.assert_regex('/a[/]b/g', '/a[/]b/') - - def test_escaped_forward_slash(self): - self.assert_regex(r'/a\/b/g', r'/a\/b/') - - def test_escaped_back_slash(self): - self.assert_regex(r'/a\\/g', r'/a\\/') - - def test_empty_character_class(self): - # This one is subtle: an empty character class is not allowed, afaics - # from http://regexpal.com/ Chrome Version 44.0.2403.155 (64-bit) Mac - # so this char class is interpreted as containing ]/ *not* as char - # class [] followed by end-of-regex /. - self.assert_regex('/a[]/]b/g', '/a[]/]b/') - - def test_precedence_of_parens(self): - # judging from - # http://regexpal.com/ Chrome Version 44.0.2403.155 (64-bit) Mac - # () have lower precedence than [] - self.assert_regex('/a([)])b/g', '/a([)])b/') - self.assert_regex('/a[(]b/g', '/a[(]b/') - -if __name__ == '__main__': - unittest.main() diff --git a/voxvera/vendor/markdown_it/__init__.py b/voxvera/vendor/markdown_it/__init__.py deleted file mode 100644 index 9fac279..0000000 --- a/voxvera/vendor/markdown_it/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -"""A Python port of Markdown-It""" - -__all__ = ("MarkdownIt",) -__version__ = "4.0.0" - -from .main import MarkdownIt diff --git a/voxvera/vendor/markdown_it/_compat.py b/voxvera/vendor/markdown_it/_compat.py deleted file mode 100644 index 9d48db4..0000000 --- a/voxvera/vendor/markdown_it/_compat.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import annotations diff --git a/voxvera/vendor/markdown_it/_punycode.py b/voxvera/vendor/markdown_it/_punycode.py deleted file mode 100644 index 312048b..0000000 --- a/voxvera/vendor/markdown_it/_punycode.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2014 Mathias Bynens -# Copyright 2021 Taneli Hukkinen -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -import codecs -from collections.abc import Callable -import re - -REGEX_SEPARATORS = re.compile(r"[\x2E\u3002\uFF0E\uFF61]") -REGEX_NON_ASCII = re.compile(r"[^\0-\x7E]") - - -def encode(uni: str) -> str: - return codecs.encode(uni, encoding="punycode").decode() - - -def decode(ascii: str) -> str: - return codecs.decode(ascii, encoding="punycode") # type: ignore - - -def map_domain(string: str, fn: Callable[[str], str]) -> str: - parts = string.split("@") - result = "" - if len(parts) > 1: - # In email addresses, only the domain name should be punycoded. Leave - # the local part (i.e. everything up to `@`) intact. - result = parts[0] + "@" - string = parts[1] - labels = REGEX_SEPARATORS.split(string) - encoded = ".".join(fn(label) for label in labels) - return result + encoded - - -def to_unicode(obj: str) -> str: - def mapping(obj: str) -> str: - if obj.startswith("xn--"): - return decode(obj[4:].lower()) - return obj - - return map_domain(obj, mapping) - - -def to_ascii(obj: str) -> str: - def mapping(obj: str) -> str: - if REGEX_NON_ASCII.search(obj): - return "xn--" + encode(obj) - return obj - - return map_domain(obj, mapping) diff --git a/voxvera/vendor/markdown_it/cli/__init__.py b/voxvera/vendor/markdown_it/cli/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/markdown_it/cli/parse.py b/voxvera/vendor/markdown_it/cli/parse.py deleted file mode 100644 index fe346b2..0000000 --- a/voxvera/vendor/markdown_it/cli/parse.py +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env python -""" -CLI interface to markdown-it-py - -Parse one or more markdown files, convert each to HTML, and print to stdout. -""" - -from __future__ import annotations - -import argparse -from collections.abc import Iterable, Sequence -import sys - -from markdown_it import __version__ -from markdown_it.main import MarkdownIt - -version_str = f"markdown-it-py [version {__version__}]" - - -def main(args: Sequence[str] | None = None) -> int: - namespace = parse_args(args) - if namespace.filenames: - convert(namespace.filenames) - else: - interactive() - return 0 - - -def convert(filenames: Iterable[str]) -> None: - for filename in filenames: - convert_file(filename) - - -def convert_file(filename: str) -> None: - """ - Parse a Markdown file and dump the output to stdout. - """ - try: - with open(filename, encoding="utf8", errors="ignore") as fin: - rendered = MarkdownIt().render(fin.read()) - print(rendered, end="") - except OSError: - sys.stderr.write(f'Cannot open file "{filename}".\n') - sys.exit(1) - - -def interactive() -> None: - """ - Parse user input, dump to stdout, rinse and repeat. - Python REPL style. - """ - print_heading() - contents = [] - more = False - while True: - try: - prompt, more = ("... ", True) if more else (">>> ", True) - contents.append(input(prompt) + "\n") - except EOFError: - print("\n" + MarkdownIt().render("\n".join(contents)), end="") - more = False - contents = [] - except KeyboardInterrupt: - print("\nExiting.") - break - - -def parse_args(args: Sequence[str] | None) -> argparse.Namespace: - """Parse input CLI arguments.""" - parser = argparse.ArgumentParser( - description="Parse one or more markdown files, " - "convert each to HTML, and print to stdout", - # NOTE: Remember to update README.md w/ the output of `markdown-it -h` - epilog=( - f""" -Interactive: - - $ markdown-it - markdown-it-py [version {__version__}] (interactive) - Type Ctrl-D to complete input, or Ctrl-C to exit. - >>> # Example - ... > markdown *input* - ... -

Example

-
-

markdown input

-
- -Batch: - - $ markdown-it README.md README.footer.md > index.html -""" - ), - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - parser.add_argument("-v", "--version", action="version", version=version_str) - parser.add_argument( - "filenames", nargs="*", help="specify an optional list of files to convert" - ) - return parser.parse_args(args) - - -def print_heading() -> None: - print(f"{version_str} (interactive)") - print("Type Ctrl-D to complete input, or Ctrl-C to exit.") - - -if __name__ == "__main__": - exit_code = main(sys.argv[1:]) - sys.exit(exit_code) diff --git a/voxvera/vendor/markdown_it/common/__init__.py b/voxvera/vendor/markdown_it/common/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/markdown_it/common/entities.py b/voxvera/vendor/markdown_it/common/entities.py deleted file mode 100644 index 14d08ec..0000000 --- a/voxvera/vendor/markdown_it/common/entities.py +++ /dev/null @@ -1,5 +0,0 @@ -"""HTML5 entities map: { name -> characters }.""" - -import html.entities - -entities = {name.rstrip(";"): chars for name, chars in html.entities.html5.items()} diff --git a/voxvera/vendor/markdown_it/common/html_blocks.py b/voxvera/vendor/markdown_it/common/html_blocks.py deleted file mode 100644 index 8a3b0b7..0000000 --- a/voxvera/vendor/markdown_it/common/html_blocks.py +++ /dev/null @@ -1,69 +0,0 @@ -"""List of valid html blocks names, according to commonmark spec -http://jgm.github.io/CommonMark/spec.html#html-blocks -""" - -# see https://spec.commonmark.org/0.31.2/#html-blocks -block_names = [ - "address", - "article", - "aside", - "base", - "basefont", - "blockquote", - "body", - "caption", - "center", - "col", - "colgroup", - "dd", - "details", - "dialog", - "dir", - "div", - "dl", - "dt", - "fieldset", - "figcaption", - "figure", - "footer", - "form", - "frame", - "frameset", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "hr", - "html", - "iframe", - "legend", - "li", - "link", - "main", - "menu", - "menuitem", - "nav", - "noframes", - "ol", - "optgroup", - "option", - "p", - "param", - "search", - "section", - "summary", - "table", - "tbody", - "td", - "tfoot", - "th", - "thead", - "title", - "tr", - "track", - "ul", -] diff --git a/voxvera/vendor/markdown_it/common/html_re.py b/voxvera/vendor/markdown_it/common/html_re.py deleted file mode 100644 index ab822c5..0000000 --- a/voxvera/vendor/markdown_it/common/html_re.py +++ /dev/null @@ -1,39 +0,0 @@ -"""Regexps to match html elements""" - -import re - -attr_name = "[a-zA-Z_:][a-zA-Z0-9:._-]*" - -unquoted = "[^\"'=<>`\\x00-\\x20]+" -single_quoted = "'[^']*'" -double_quoted = '"[^"]*"' - -attr_value = "(?:" + unquoted + "|" + single_quoted + "|" + double_quoted + ")" - -attribute = "(?:\\s+" + attr_name + "(?:\\s*=\\s*" + attr_value + ")?)" - -open_tag = "<[A-Za-z][A-Za-z0-9\\-]*" + attribute + "*\\s*\\/?>" - -close_tag = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>" -comment = "" -processing = "<[?][\\s\\S]*?[?]>" -declaration = "]*>" -cdata = "" - -HTML_TAG_RE = re.compile( - "^(?:" - + open_tag - + "|" - + close_tag - + "|" - + comment - + "|" - + processing - + "|" - + declaration - + "|" - + cdata - + ")" -) -HTML_OPEN_CLOSE_TAG_STR = "^(?:" + open_tag + "|" + close_tag + ")" -HTML_OPEN_CLOSE_TAG_RE = re.compile(HTML_OPEN_CLOSE_TAG_STR) diff --git a/voxvera/vendor/markdown_it/common/normalize_url.py b/voxvera/vendor/markdown_it/common/normalize_url.py deleted file mode 100644 index 92720b3..0000000 --- a/voxvera/vendor/markdown_it/common/normalize_url.py +++ /dev/null @@ -1,81 +0,0 @@ -from __future__ import annotations - -from collections.abc import Callable -from contextlib import suppress -import re -from urllib.parse import quote, unquote, urlparse, urlunparse # noqa: F401 - -import mdurl - -from .. import _punycode - -RECODE_HOSTNAME_FOR = ("http:", "https:", "mailto:") - - -def normalizeLink(url: str) -> str: - """Normalize destination URLs in links - - :: - - [label]: destination 'title' - ^^^^^^^^^^^ - """ - parsed = mdurl.parse(url, slashes_denote_host=True) - - # Encode hostnames in urls like: - # `http://host/`, `https://host/`, `mailto:user@host`, `//host/` - # - # We don't encode unknown schemas, because it's likely that we encode - # something we shouldn't (e.g. `skype:name` treated as `skype:host`) - # - if parsed.hostname and ( - not parsed.protocol or parsed.protocol in RECODE_HOSTNAME_FOR - ): - with suppress(Exception): - parsed = parsed._replace(hostname=_punycode.to_ascii(parsed.hostname)) - - return mdurl.encode(mdurl.format(parsed)) - - -def normalizeLinkText(url: str) -> str: - """Normalize autolink content - - :: - - - ~~~~~~~~~~~ - """ - parsed = mdurl.parse(url, slashes_denote_host=True) - - # Encode hostnames in urls like: - # `http://host/`, `https://host/`, `mailto:user@host`, `//host/` - # - # We don't encode unknown schemas, because it's likely that we encode - # something we shouldn't (e.g. `skype:name` treated as `skype:host`) - # - if parsed.hostname and ( - not parsed.protocol or parsed.protocol in RECODE_HOSTNAME_FOR - ): - with suppress(Exception): - parsed = parsed._replace(hostname=_punycode.to_unicode(parsed.hostname)) - - # add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720 - return mdurl.decode(mdurl.format(parsed), mdurl.DECODE_DEFAULT_CHARS + "%") - - -BAD_PROTO_RE = re.compile(r"^(vbscript|javascript|file|data):") -GOOD_DATA_RE = re.compile(r"^data:image\/(gif|png|jpeg|webp);") - - -def validateLink(url: str, validator: Callable[[str], bool] | None = None) -> bool: - """Validate URL link is allowed in output. - - This validator can prohibit more than really needed to prevent XSS. - It's a tradeoff to keep code simple and to be secure by default. - - Note: url should be normalized at this point, and existing entities decoded. - """ - if validator is not None: - return validator(url) - url = url.strip().lower() - return bool(GOOD_DATA_RE.search(url)) if BAD_PROTO_RE.search(url) else True diff --git a/voxvera/vendor/markdown_it/common/utils.py b/voxvera/vendor/markdown_it/common/utils.py deleted file mode 100644 index 11bda64..0000000 --- a/voxvera/vendor/markdown_it/common/utils.py +++ /dev/null @@ -1,313 +0,0 @@ -"""Utilities for parsing source text""" - -from __future__ import annotations - -import re -from re import Match -from typing import TypeVar -import unicodedata - -from .entities import entities - - -def charCodeAt(src: str, pos: int) -> int | None: - """ - Returns the Unicode value of the character at the specified location. - - @param - index The zero-based index of the desired character. - If there is no character at the specified index, NaN is returned. - - This was added for compatibility with python - """ - try: - return ord(src[pos]) - except IndexError: - return None - - -def charStrAt(src: str, pos: int) -> str | None: - """ - Returns the Unicode value of the character at the specified location. - - @param - index The zero-based index of the desired character. - If there is no character at the specified index, NaN is returned. - - This was added for compatibility with python - """ - try: - return src[pos] - except IndexError: - return None - - -_ItemTV = TypeVar("_ItemTV") - - -def arrayReplaceAt( - src: list[_ItemTV], pos: int, newElements: list[_ItemTV] -) -> list[_ItemTV]: - """ - Remove element from array and put another array at those position. - Useful for some operations with tokens - """ - return src[:pos] + newElements + src[pos + 1 :] - - -def isValidEntityCode(c: int) -> bool: - # broken sequence - if c >= 0xD800 and c <= 0xDFFF: - return False - # never used - if c >= 0xFDD0 and c <= 0xFDEF: - return False - if ((c & 0xFFFF) == 0xFFFF) or ((c & 0xFFFF) == 0xFFFE): - return False - # control codes - if c >= 0x00 and c <= 0x08: - return False - if c == 0x0B: - return False - if c >= 0x0E and c <= 0x1F: - return False - if c >= 0x7F and c <= 0x9F: - return False - # out of range - return not (c > 0x10FFFF) - - -def fromCodePoint(c: int) -> str: - """Convert ordinal to unicode. - - Note, in the original Javascript two string characters were required, - for codepoints larger than `0xFFFF`. - But Python 3 can represent any unicode codepoint in one character. - """ - return chr(c) - - -# UNESCAPE_MD_RE = re.compile(r'\\([!"#$%&\'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])') -# ENTITY_RE_g = re.compile(r'&([a-z#][a-z0-9]{1,31})', re.IGNORECASE) -UNESCAPE_ALL_RE = re.compile( - r'\\([!"#$%&\'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])' + "|" + r"&([a-z#][a-z0-9]{1,31});", - re.IGNORECASE, -) -DIGITAL_ENTITY_BASE10_RE = re.compile(r"#([0-9]{1,8})") -DIGITAL_ENTITY_BASE16_RE = re.compile(r"#x([a-f0-9]{1,8})", re.IGNORECASE) - - -def replaceEntityPattern(match: str, name: str) -> str: - """Convert HTML entity patterns, - see https://spec.commonmark.org/0.30/#entity-references - """ - if name in entities: - return entities[name] - - code: None | int = None - if pat := DIGITAL_ENTITY_BASE10_RE.fullmatch(name): - code = int(pat.group(1), 10) - elif pat := DIGITAL_ENTITY_BASE16_RE.fullmatch(name): - code = int(pat.group(1), 16) - - if code is not None and isValidEntityCode(code): - return fromCodePoint(code) - - return match - - -def unescapeAll(string: str) -> str: - def replacer_func(match: Match[str]) -> str: - escaped = match.group(1) - if escaped: - return escaped - entity = match.group(2) - return replaceEntityPattern(match.group(), entity) - - if "\\" not in string and "&" not in string: - return string - return UNESCAPE_ALL_RE.sub(replacer_func, string) - - -ESCAPABLE = r"""\\!"#$%&'()*+,./:;<=>?@\[\]^`{}|_~-""" -ESCAPE_CHAR = re.compile(r"\\([" + ESCAPABLE + r"])") - - -def stripEscape(string: str) -> str: - """Strip escape \\ characters""" - return ESCAPE_CHAR.sub(r"\1", string) - - -def escapeHtml(raw: str) -> str: - """Replace special characters "&", "<", ">" and '"' to HTML-safe sequences.""" - # like html.escape, but without escaping single quotes - raw = raw.replace("&", "&") # Must be done first! - raw = raw.replace("<", "<") - raw = raw.replace(">", ">") - raw = raw.replace('"', """) - return raw - - -# ////////////////////////////////////////////////////////////////////////////// - -REGEXP_ESCAPE_RE = re.compile(r"[.?*+^$[\]\\(){}|-]") - - -def escapeRE(string: str) -> str: - string = REGEXP_ESCAPE_RE.sub("\\$&", string) - return string - - -# ////////////////////////////////////////////////////////////////////////////// - - -def isSpace(code: int | None) -> bool: - """Check if character code is a whitespace.""" - return code in (0x09, 0x20) - - -def isStrSpace(ch: str | None) -> bool: - """Check if character is a whitespace.""" - return ch in ("\t", " ") - - -MD_WHITESPACE = { - 0x09, # \t - 0x0A, # \n - 0x0B, # \v - 0x0C, # \f - 0x0D, # \r - 0x20, # space - 0xA0, - 0x1680, - 0x202F, - 0x205F, - 0x3000, -} - - -def isWhiteSpace(code: int) -> bool: - r"""Zs (unicode class) || [\t\f\v\r\n]""" - if code >= 0x2000 and code <= 0x200A: - return True - return code in MD_WHITESPACE - - -# ////////////////////////////////////////////////////////////////////////////// - - -def isPunctChar(ch: str) -> bool: - """Check if character is a punctuation character.""" - return unicodedata.category(ch).startswith(("P", "S")) - - -MD_ASCII_PUNCT = { - 0x21, # /* ! */ - 0x22, # /* " */ - 0x23, # /* # */ - 0x24, # /* $ */ - 0x25, # /* % */ - 0x26, # /* & */ - 0x27, # /* ' */ - 0x28, # /* ( */ - 0x29, # /* ) */ - 0x2A, # /* * */ - 0x2B, # /* + */ - 0x2C, # /* , */ - 0x2D, # /* - */ - 0x2E, # /* . */ - 0x2F, # /* / */ - 0x3A, # /* : */ - 0x3B, # /* ; */ - 0x3C, # /* < */ - 0x3D, # /* = */ - 0x3E, # /* > */ - 0x3F, # /* ? */ - 0x40, # /* @ */ - 0x5B, # /* [ */ - 0x5C, # /* \ */ - 0x5D, # /* ] */ - 0x5E, # /* ^ */ - 0x5F, # /* _ */ - 0x60, # /* ` */ - 0x7B, # /* { */ - 0x7C, # /* | */ - 0x7D, # /* } */ - 0x7E, # /* ~ */ -} - - -def isMdAsciiPunct(ch: int) -> bool: - """Markdown ASCII punctuation characters. - - :: - - !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~ - - See http://spec.commonmark.org/0.15/#ascii-punctuation-character - - Don't confuse with unicode punctuation !!! It lacks some chars in ascii range. - - """ - return ch in MD_ASCII_PUNCT - - -def normalizeReference(string: str) -> str: - """Helper to unify [reference labels].""" - # Trim and collapse whitespace - # - string = re.sub(r"\s+", " ", string.strip()) - - # In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug - # fixed in v12 (couldn't find any details). - # - # So treat this one as a special case - # (remove this when node v10 is no longer supported). - # - # if ('ẞ'.toLowerCase() === 'Ṿ') { - # str = str.replace(/ẞ/g, 'ß') - # } - - # .toLowerCase().toUpperCase() should get rid of all differences - # between letter variants. - # - # Simple .toLowerCase() doesn't normalize 125 code points correctly, - # and .toUpperCase doesn't normalize 6 of them (list of exceptions: - # İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently - # uppercased versions). - # - # Here's an example showing how it happens. Lets take greek letter omega: - # uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ) - # - # Unicode entries: - # 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8 - # 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398 - # 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398 - # 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8 - # - # Case-insensitive comparison should treat all of them as equivalent. - # - # But .toLowerCase() doesn't change ϑ (it's already lowercase), - # and .toUpperCase() doesn't change ϴ (already uppercase). - # - # Applying first lower then upper case normalizes any character: - # '\u0398\u03f4\u03b8\u03d1'.toLowerCase().toUpperCase() === '\u0398\u0398\u0398\u0398' - # - # Note: this is equivalent to unicode case folding; unicode normalization - # is a different step that is not required here. - # - # Final result should be uppercased, because it's later stored in an object - # (this avoid a conflict with Object.prototype members, - # most notably, `__proto__`) - # - return string.lower().upper() - - -LINK_OPEN_RE = re.compile(r"^\s]", flags=re.IGNORECASE) -LINK_CLOSE_RE = re.compile(r"^", flags=re.IGNORECASE) - - -def isLinkOpen(string: str) -> bool: - return bool(LINK_OPEN_RE.search(string)) - - -def isLinkClose(string: str) -> bool: - return bool(LINK_CLOSE_RE.search(string)) diff --git a/voxvera/vendor/markdown_it/helpers/__init__.py b/voxvera/vendor/markdown_it/helpers/__init__.py deleted file mode 100644 index f4e2cd2..0000000 --- a/voxvera/vendor/markdown_it/helpers/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Functions for parsing Links""" - -__all__ = ("parseLinkDestination", "parseLinkLabel", "parseLinkTitle") -from .parse_link_destination import parseLinkDestination -from .parse_link_label import parseLinkLabel -from .parse_link_title import parseLinkTitle diff --git a/voxvera/vendor/markdown_it/helpers/parse_link_destination.py b/voxvera/vendor/markdown_it/helpers/parse_link_destination.py deleted file mode 100644 index c98323c..0000000 --- a/voxvera/vendor/markdown_it/helpers/parse_link_destination.py +++ /dev/null @@ -1,83 +0,0 @@ -""" -Parse link destination -""" - -from ..common.utils import charCodeAt, unescapeAll - - -class _Result: - __slots__ = ("ok", "pos", "str") - - def __init__(self) -> None: - self.ok = False - self.pos = 0 - self.str = "" - - -def parseLinkDestination(string: str, pos: int, maximum: int) -> _Result: - start = pos - result = _Result() - - if charCodeAt(string, pos) == 0x3C: # /* < */ - pos += 1 - while pos < maximum: - code = charCodeAt(string, pos) - if code == 0x0A: # /* \n */) - return result - if code == 0x3C: # / * < * / - return result - if code == 0x3E: # /* > */) { - result.pos = pos + 1 - result.str = unescapeAll(string[start + 1 : pos]) - result.ok = True - return result - - if code == 0x5C and pos + 1 < maximum: # \ - pos += 2 - continue - - pos += 1 - - # no closing '>' - return result - - # this should be ... } else { ... branch - - level = 0 - while pos < maximum: - code = charCodeAt(string, pos) - - if code is None or code == 0x20: - break - - # ascii control characters - if code < 0x20 or code == 0x7F: - break - - if code == 0x5C and pos + 1 < maximum: - if charCodeAt(string, pos + 1) == 0x20: - break - pos += 2 - continue - - if code == 0x28: # /* ( */) - level += 1 - if level > 32: - return result - - if code == 0x29: # /* ) */) - if level == 0: - break - level -= 1 - - pos += 1 - - if start == pos: - return result - if level != 0: - return result - - result.str = unescapeAll(string[start:pos]) - result.pos = pos - result.ok = True - return result diff --git a/voxvera/vendor/markdown_it/helpers/parse_link_label.py b/voxvera/vendor/markdown_it/helpers/parse_link_label.py deleted file mode 100644 index c80da5a..0000000 --- a/voxvera/vendor/markdown_it/helpers/parse_link_label.py +++ /dev/null @@ -1,44 +0,0 @@ -""" -Parse link label - -this function assumes that first character ("[") already matches -returns the end of the label - -""" - -from markdown_it.rules_inline import StateInline - - -def parseLinkLabel(state: StateInline, start: int, disableNested: bool = False) -> int: - labelEnd = -1 - oldPos = state.pos - found = False - - state.pos = start + 1 - level = 1 - - while state.pos < state.posMax: - marker = state.src[state.pos] - if marker == "]": - level -= 1 - if level == 0: - found = True - break - - prevPos = state.pos - state.md.inline.skipToken(state) - if marker == "[": - if prevPos == state.pos - 1: - # increase level if we find text `[`, - # which is not a part of any token - level += 1 - elif disableNested: - state.pos = oldPos - return -1 - if found: - labelEnd = state.pos - - # restore old state - state.pos = oldPos - - return labelEnd diff --git a/voxvera/vendor/markdown_it/helpers/parse_link_title.py b/voxvera/vendor/markdown_it/helpers/parse_link_title.py deleted file mode 100644 index a38ff0d..0000000 --- a/voxvera/vendor/markdown_it/helpers/parse_link_title.py +++ /dev/null @@ -1,75 +0,0 @@ -"""Parse link title""" - -from ..common.utils import charCodeAt, unescapeAll - - -class _State: - __slots__ = ("can_continue", "marker", "ok", "pos", "str") - - def __init__(self) -> None: - self.ok = False - """if `true`, this is a valid link title""" - self.can_continue = False - """if `true`, this link can be continued on the next line""" - self.pos = 0 - """if `ok`, it's the position of the first character after the closing marker""" - self.str = "" - """if `ok`, it's the unescaped title""" - self.marker = 0 - """expected closing marker character code""" - - def __str__(self) -> str: - return self.str - - -def parseLinkTitle( - string: str, start: int, maximum: int, prev_state: _State | None = None -) -> _State: - """Parse link title within `str` in [start, max] range, - or continue previous parsing if `prev_state` is defined (equal to result of last execution). - """ - pos = start - state = _State() - - if prev_state is not None: - # this is a continuation of a previous parseLinkTitle call on the next line, - # used in reference links only - state.str = prev_state.str - state.marker = prev_state.marker - else: - if pos >= maximum: - return state - - marker = charCodeAt(string, pos) - - # /* " */ /* ' */ /* ( */ - if marker != 0x22 and marker != 0x27 and marker != 0x28: - return state - - start += 1 - pos += 1 - - # if opening marker is "(", switch it to closing marker ")" - if marker == 0x28: - marker = 0x29 - - state.marker = marker - - while pos < maximum: - code = charCodeAt(string, pos) - if code == state.marker: - state.pos = pos + 1 - state.str += unescapeAll(string[start:pos]) - state.ok = True - return state - elif code == 0x28 and state.marker == 0x29: # /* ( */ /* ) */ - return state - elif code == 0x5C and pos + 1 < maximum: # /* \ */ - pos += 1 - - pos += 1 - - # no closing marker found, but this link title may continue on the next line (for references) - state.can_continue = True - state.str += unescapeAll(string[start:pos]) - return state diff --git a/voxvera/vendor/markdown_it/main.py b/voxvera/vendor/markdown_it/main.py deleted file mode 100644 index bf9fd18..0000000 --- a/voxvera/vendor/markdown_it/main.py +++ /dev/null @@ -1,350 +0,0 @@ -from __future__ import annotations - -from collections.abc import Callable, Generator, Iterable, Mapping, MutableMapping -from contextlib import contextmanager -from typing import Any, Literal, overload - -from . import helpers, presets -from .common import normalize_url, utils -from .parser_block import ParserBlock -from .parser_core import ParserCore -from .parser_inline import ParserInline -from .renderer import RendererHTML, RendererProtocol -from .rules_core.state_core import StateCore -from .token import Token -from .utils import EnvType, OptionsDict, OptionsType, PresetType - -try: - import linkify_it -except ModuleNotFoundError: - linkify_it = None - - -_PRESETS: dict[str, PresetType] = { - "default": presets.default.make(), - "js-default": presets.js_default.make(), - "zero": presets.zero.make(), - "commonmark": presets.commonmark.make(), - "gfm-like": presets.gfm_like.make(), -} - - -class MarkdownIt: - def __init__( - self, - config: str | PresetType = "commonmark", - options_update: Mapping[str, Any] | None = None, - *, - renderer_cls: Callable[[MarkdownIt], RendererProtocol] = RendererHTML, - ): - """Main parser class - - :param config: name of configuration to load or a pre-defined dictionary - :param options_update: dictionary that will be merged into ``config["options"]`` - :param renderer_cls: the class to load as the renderer: - ``self.renderer = renderer_cls(self) - """ - # add modules - self.utils = utils - self.helpers = helpers - - # initialise classes - self.inline = ParserInline() - self.block = ParserBlock() - self.core = ParserCore() - self.renderer = renderer_cls(self) - self.linkify = linkify_it.LinkifyIt() if linkify_it else None - - # set the configuration - if options_update and not isinstance(options_update, Mapping): - # catch signature change where renderer_cls was not used as a key-word - raise TypeError( - f"options_update should be a mapping: {options_update}" - "\n(Perhaps you intended this to be the renderer_cls?)" - ) - self.configure(config, options_update=options_update) - - def __repr__(self) -> str: - return f"{self.__class__.__module__}.{self.__class__.__name__}()" - - @overload - def __getitem__(self, name: Literal["inline"]) -> ParserInline: ... - - @overload - def __getitem__(self, name: Literal["block"]) -> ParserBlock: ... - - @overload - def __getitem__(self, name: Literal["core"]) -> ParserCore: ... - - @overload - def __getitem__(self, name: Literal["renderer"]) -> RendererProtocol: ... - - @overload - def __getitem__(self, name: str) -> Any: ... - - def __getitem__(self, name: str) -> Any: - return { - "inline": self.inline, - "block": self.block, - "core": self.core, - "renderer": self.renderer, - }[name] - - def set(self, options: OptionsType) -> None: - """Set parser options (in the same format as in constructor). - Probably, you will never need it, but you can change options after constructor call. - - __Note:__ To achieve the best possible performance, don't modify a - `markdown-it` instance options on the fly. If you need multiple configurations - it's best to create multiple instances and initialize each with separate config. - """ - self.options = OptionsDict(options) - - def configure( - self, presets: str | PresetType, options_update: Mapping[str, Any] | None = None - ) -> MarkdownIt: - """Batch load of all options and component settings. - This is an internal method, and you probably will not need it. - But if you will - see available presets and data structure - [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets) - - We strongly recommend to use presets instead of direct config loads. - That will give better compatibility with next versions. - """ - if isinstance(presets, str): - if presets not in _PRESETS: - raise KeyError(f"Wrong `markdown-it` preset '{presets}', check name") - config = _PRESETS[presets] - else: - config = presets - - if not config: - raise ValueError("Wrong `markdown-it` config, can't be empty") - - options = config.get("options", {}) or {} - if options_update: - options = {**options, **options_update} # type: ignore - - self.set(options) # type: ignore - - if "components" in config: - for name, component in config["components"].items(): - rules = component.get("rules", None) - if rules: - self[name].ruler.enableOnly(rules) - rules2 = component.get("rules2", None) - if rules2: - self[name].ruler2.enableOnly(rules2) - - return self - - def get_all_rules(self) -> dict[str, list[str]]: - """Return the names of all active rules.""" - rules = { - chain: self[chain].ruler.get_all_rules() - for chain in ["core", "block", "inline"] - } - rules["inline2"] = self.inline.ruler2.get_all_rules() - return rules - - def get_active_rules(self) -> dict[str, list[str]]: - """Return the names of all active rules.""" - rules = { - chain: self[chain].ruler.get_active_rules() - for chain in ["core", "block", "inline"] - } - rules["inline2"] = self.inline.ruler2.get_active_rules() - return rules - - def enable( - self, names: str | Iterable[str], ignoreInvalid: bool = False - ) -> MarkdownIt: - """Enable list or rules. (chainable) - - :param names: rule name or list of rule names to enable. - :param ignoreInvalid: set `true` to ignore errors when rule not found. - - It will automatically find appropriate components, - containing rules with given names. If rule not found, and `ignoreInvalid` - not set - throws exception. - - Example:: - - md = MarkdownIt().enable(['sub', 'sup']).disable('smartquotes') - - """ - result = [] - - if isinstance(names, str): - names = [names] - - for chain in ["core", "block", "inline"]: - result.extend(self[chain].ruler.enable(names, True)) - result.extend(self.inline.ruler2.enable(names, True)) - - missed = [name for name in names if name not in result] - if missed and not ignoreInvalid: - raise ValueError(f"MarkdownIt. Failed to enable unknown rule(s): {missed}") - - return self - - def disable( - self, names: str | Iterable[str], ignoreInvalid: bool = False - ) -> MarkdownIt: - """The same as [[MarkdownIt.enable]], but turn specified rules off. (chainable) - - :param names: rule name or list of rule names to disable. - :param ignoreInvalid: set `true` to ignore errors when rule not found. - - """ - result = [] - - if isinstance(names, str): - names = [names] - - for chain in ["core", "block", "inline"]: - result.extend(self[chain].ruler.disable(names, True)) - result.extend(self.inline.ruler2.disable(names, True)) - - missed = [name for name in names if name not in result] - if missed and not ignoreInvalid: - raise ValueError(f"MarkdownIt. Failed to disable unknown rule(s): {missed}") - return self - - @contextmanager - def reset_rules(self) -> Generator[None, None, None]: - """A context manager, that will reset the current enabled rules on exit.""" - chain_rules = self.get_active_rules() - yield - for chain, rules in chain_rules.items(): - if chain != "inline2": - self[chain].ruler.enableOnly(rules) - self.inline.ruler2.enableOnly(chain_rules["inline2"]) - - def add_render_rule( - self, name: str, function: Callable[..., Any], fmt: str = "html" - ) -> None: - """Add a rule for rendering a particular Token type. - - Only applied when ``renderer.__output__ == fmt`` - """ - if self.renderer.__output__ == fmt: - self.renderer.rules[name] = function.__get__(self.renderer) # type: ignore - - def use( - self, plugin: Callable[..., None], *params: Any, **options: Any - ) -> MarkdownIt: - """Load specified plugin with given params into current parser instance. (chainable) - - It's just a sugar to call `plugin(md, params)` with curring. - - Example:: - - def func(tokens, idx): - tokens[idx].content = tokens[idx].content.replace('foo', 'bar') - md = MarkdownIt().use(plugin, 'foo_replace', 'text', func) - - """ - plugin(self, *params, **options) - return self - - def parse(self, src: str, env: EnvType | None = None) -> list[Token]: - """Parse the source string to a token stream - - :param src: source string - :param env: environment sandbox - - Parse input string and return list of block tokens (special token type - "inline" will contain list of inline tokens). - - `env` is used to pass data between "distributed" rules and return additional - metadata like reference info, needed for the renderer. It also can be used to - inject data in specific cases. Usually, you will be ok to pass `{}`, - and then pass updated object to renderer. - """ - env = {} if env is None else env - if not isinstance(env, MutableMapping): - raise TypeError(f"Input data should be a MutableMapping, not {type(env)}") - if not isinstance(src, str): - raise TypeError(f"Input data should be a string, not {type(src)}") - state = StateCore(src, self, env) - self.core.process(state) - return state.tokens - - def render(self, src: str, env: EnvType | None = None) -> Any: - """Render markdown string into html. It does all magic for you :). - - :param src: source string - :param env: environment sandbox - :returns: The output of the loaded renderer - - `env` can be used to inject additional metadata (`{}` by default). - But you will not need it with high probability. See also comment - in [[MarkdownIt.parse]]. - """ - env = {} if env is None else env - return self.renderer.render(self.parse(src, env), self.options, env) - - def parseInline(self, src: str, env: EnvType | None = None) -> list[Token]: - """The same as [[MarkdownIt.parse]] but skip all block rules. - - :param src: source string - :param env: environment sandbox - - It returns the - block tokens list with the single `inline` element, containing parsed inline - tokens in `children` property. Also updates `env` object. - """ - env = {} if env is None else env - if not isinstance(env, MutableMapping): - raise TypeError(f"Input data should be an MutableMapping, not {type(env)}") - if not isinstance(src, str): - raise TypeError(f"Input data should be a string, not {type(src)}") - state = StateCore(src, self, env) - state.inlineMode = True - self.core.process(state) - return state.tokens - - def renderInline(self, src: str, env: EnvType | None = None) -> Any: - """Similar to [[MarkdownIt.render]] but for single paragraph content. - - :param src: source string - :param env: environment sandbox - - Similar to [[MarkdownIt.render]] but for single paragraph content. Result - will NOT be wrapped into `

` tags. - """ - env = {} if env is None else env - return self.renderer.render(self.parseInline(src, env), self.options, env) - - # link methods - - def validateLink(self, url: str) -> bool: - """Validate if the URL link is allowed in output. - - This validator can prohibit more than really needed to prevent XSS. - It's a tradeoff to keep code simple and to be secure by default. - - Note: the url should be normalized at this point, and existing entities decoded. - """ - return normalize_url.validateLink(url) - - def normalizeLink(self, url: str) -> str: - """Normalize destination URLs in links - - :: - - [label]: destination 'title' - ^^^^^^^^^^^ - """ - return normalize_url.normalizeLink(url) - - def normalizeLinkText(self, link: str) -> str: - """Normalize autolink content - - :: - - - ~~~~~~~~~~~ - """ - return normalize_url.normalizeLinkText(link) diff --git a/voxvera/vendor/markdown_it/parser_block.py b/voxvera/vendor/markdown_it/parser_block.py deleted file mode 100644 index 50a7184..0000000 --- a/voxvera/vendor/markdown_it/parser_block.py +++ /dev/null @@ -1,113 +0,0 @@ -"""Block-level tokenizer.""" - -from __future__ import annotations - -from collections.abc import Callable -import logging -from typing import TYPE_CHECKING - -from . import rules_block -from .ruler import Ruler -from .rules_block.state_block import StateBlock -from .token import Token -from .utils import EnvType - -if TYPE_CHECKING: - from markdown_it import MarkdownIt - -LOGGER = logging.getLogger(__name__) - - -RuleFuncBlockType = Callable[[StateBlock, int, int, bool], bool] -"""(state: StateBlock, startLine: int, endLine: int, silent: bool) -> matched: bool) - -`silent` disables token generation, useful for lookahead. -""" - -_rules: list[tuple[str, RuleFuncBlockType, list[str]]] = [ - # First 2 params - rule name & source. Secondary array - list of rules, - # which can be terminated by this one. - ("table", rules_block.table, ["paragraph", "reference"]), - ("code", rules_block.code, []), - ("fence", rules_block.fence, ["paragraph", "reference", "blockquote", "list"]), - ( - "blockquote", - rules_block.blockquote, - ["paragraph", "reference", "blockquote", "list"], - ), - ("hr", rules_block.hr, ["paragraph", "reference", "blockquote", "list"]), - ("list", rules_block.list_block, ["paragraph", "reference", "blockquote"]), - ("reference", rules_block.reference, []), - ("html_block", rules_block.html_block, ["paragraph", "reference", "blockquote"]), - ("heading", rules_block.heading, ["paragraph", "reference", "blockquote"]), - ("lheading", rules_block.lheading, []), - ("paragraph", rules_block.paragraph, []), -] - - -class ParserBlock: - """ - ParserBlock#ruler -> Ruler - - [[Ruler]] instance. Keep configuration of block rules. - """ - - def __init__(self) -> None: - self.ruler = Ruler[RuleFuncBlockType]() - for name, rule, alt in _rules: - self.ruler.push(name, rule, {"alt": alt}) - - def tokenize(self, state: StateBlock, startLine: int, endLine: int) -> None: - """Generate tokens for input range.""" - rules = self.ruler.getRules("") - line = startLine - maxNesting = state.md.options.maxNesting - hasEmptyLines = False - - while line < endLine: - state.line = line = state.skipEmptyLines(line) - if line >= endLine: - break - if state.sCount[line] < state.blkIndent: - # Termination condition for nested calls. - # Nested calls currently used for blockquotes & lists - break - if state.level >= maxNesting: - # If nesting level exceeded - skip tail to the end. - # That's not ordinary situation and we should not care about content. - state.line = endLine - break - - # Try all possible rules. - # On success, rule should: - # - update `state.line` - # - update `state.tokens` - # - return True - for rule in rules: - if rule(state, line, endLine, False): - break - - # set state.tight if we had an empty line before current tag - # i.e. latest empty line should not count - state.tight = not hasEmptyLines - - line = state.line - - # paragraph might "eat" one newline after it in nested lists - if (line - 1) < endLine and state.isEmpty(line - 1): - hasEmptyLines = True - - if line < endLine and state.isEmpty(line): - hasEmptyLines = True - line += 1 - state.line = line - - def parse( - self, src: str, md: MarkdownIt, env: EnvType, outTokens: list[Token] - ) -> list[Token] | None: - """Process input string and push block tokens into `outTokens`.""" - if not src: - return None - state = StateBlock(src, md, env, outTokens) - self.tokenize(state, state.line, state.lineMax) - return state.tokens diff --git a/voxvera/vendor/markdown_it/parser_core.py b/voxvera/vendor/markdown_it/parser_core.py deleted file mode 100644 index 8f5b921..0000000 --- a/voxvera/vendor/markdown_it/parser_core.py +++ /dev/null @@ -1,46 +0,0 @@ -""" -* class Core -* -* Top-level rules executor. Glues block/inline parsers and does intermediate -* transformations. -""" - -from __future__ import annotations - -from collections.abc import Callable - -from .ruler import Ruler -from .rules_core import ( - block, - inline, - linkify, - normalize, - replace, - smartquotes, - text_join, -) -from .rules_core.state_core import StateCore - -RuleFuncCoreType = Callable[[StateCore], None] - -_rules: list[tuple[str, RuleFuncCoreType]] = [ - ("normalize", normalize), - ("block", block), - ("inline", inline), - ("linkify", linkify), - ("replacements", replace), - ("smartquotes", smartquotes), - ("text_join", text_join), -] - - -class ParserCore: - def __init__(self) -> None: - self.ruler = Ruler[RuleFuncCoreType]() - for name, rule in _rules: - self.ruler.push(name, rule) - - def process(self, state: StateCore) -> None: - """Executes core chain rules.""" - for rule in self.ruler.getRules(""): - rule(state) diff --git a/voxvera/vendor/markdown_it/parser_inline.py b/voxvera/vendor/markdown_it/parser_inline.py deleted file mode 100644 index 26ec2e6..0000000 --- a/voxvera/vendor/markdown_it/parser_inline.py +++ /dev/null @@ -1,148 +0,0 @@ -"""Tokenizes paragraph content.""" - -from __future__ import annotations - -from collections.abc import Callable -from typing import TYPE_CHECKING - -from . import rules_inline -from .ruler import Ruler -from .rules_inline.state_inline import StateInline -from .token import Token -from .utils import EnvType - -if TYPE_CHECKING: - from markdown_it import MarkdownIt - - -# Parser rules -RuleFuncInlineType = Callable[[StateInline, bool], bool] -"""(state: StateInline, silent: bool) -> matched: bool) - -`silent` disables token generation, useful for lookahead. -""" -_rules: list[tuple[str, RuleFuncInlineType]] = [ - ("text", rules_inline.text), - ("linkify", rules_inline.linkify), - ("newline", rules_inline.newline), - ("escape", rules_inline.escape), - ("backticks", rules_inline.backtick), - ("strikethrough", rules_inline.strikethrough.tokenize), - ("emphasis", rules_inline.emphasis.tokenize), - ("link", rules_inline.link), - ("image", rules_inline.image), - ("autolink", rules_inline.autolink), - ("html_inline", rules_inline.html_inline), - ("entity", rules_inline.entity), -] - -# Note `rule2` ruleset was created specifically for emphasis/strikethrough -# post-processing and may be changed in the future. -# -# Don't use this for anything except pairs (plugins working with `balance_pairs`). -# -RuleFuncInline2Type = Callable[[StateInline], None] -_rules2: list[tuple[str, RuleFuncInline2Type]] = [ - ("balance_pairs", rules_inline.link_pairs), - ("strikethrough", rules_inline.strikethrough.postProcess), - ("emphasis", rules_inline.emphasis.postProcess), - # rules for pairs separate '**' into its own text tokens, which may be left unused, - # rule below merges unused segments back with the rest of the text - ("fragments_join", rules_inline.fragments_join), -] - - -class ParserInline: - def __init__(self) -> None: - self.ruler = Ruler[RuleFuncInlineType]() - for name, rule in _rules: - self.ruler.push(name, rule) - # Second ruler used for post-processing (e.g. in emphasis-like rules) - self.ruler2 = Ruler[RuleFuncInline2Type]() - for name, rule2 in _rules2: - self.ruler2.push(name, rule2) - - def skipToken(self, state: StateInline) -> None: - """Skip single token by running all rules in validation mode; - returns `True` if any rule reported success - """ - ok = False - pos = state.pos - rules = self.ruler.getRules("") - maxNesting = state.md.options["maxNesting"] - cache = state.cache - - if pos in cache: - state.pos = cache[pos] - return - - if state.level < maxNesting: - for rule in rules: - # Increment state.level and decrement it later to limit recursion. - # It's harmless to do here, because no tokens are created. - # But ideally, we'd need a separate private state variable for this purpose. - state.level += 1 - ok = rule(state, True) - state.level -= 1 - if ok: - break - else: - # Too much nesting, just skip until the end of the paragraph. - # - # NOTE: this will cause links to behave incorrectly in the following case, - # when an amount of `[` is exactly equal to `maxNesting + 1`: - # - # [[[[[[[[[[[[[[[[[[[[[foo]() - # - # TODO: remove this workaround when CM standard will allow nested links - # (we can replace it by preventing links from being parsed in - # validation mode) - # - state.pos = state.posMax - - if not ok: - state.pos += 1 - cache[pos] = state.pos - - def tokenize(self, state: StateInline) -> None: - """Generate tokens for input range.""" - ok = False - rules = self.ruler.getRules("") - end = state.posMax - maxNesting = state.md.options["maxNesting"] - - while state.pos < end: - # Try all possible rules. - # On success, rule should: - # - # - update `state.pos` - # - update `state.tokens` - # - return true - - if state.level < maxNesting: - for rule in rules: - ok = rule(state, False) - if ok: - break - - if ok: - if state.pos >= end: - break - continue - - state.pending += state.src[state.pos] - state.pos += 1 - - if state.pending: - state.pushPending() - - def parse( - self, src: str, md: MarkdownIt, env: EnvType, tokens: list[Token] - ) -> list[Token]: - """Process input string and push inline tokens into `tokens`""" - state = StateInline(src, md, env, tokens) - self.tokenize(state) - rules2 = self.ruler2.getRules("") - for rule in rules2: - rule(state) - return state.tokens diff --git a/voxvera/vendor/markdown_it/port.yaml b/voxvera/vendor/markdown_it/port.yaml deleted file mode 100644 index ce2dde9..0000000 --- a/voxvera/vendor/markdown_it/port.yaml +++ /dev/null @@ -1,48 +0,0 @@ -- package: markdown-it/markdown-it - version: 14.1.0 - commit: 0fe7ccb4b7f30236fb05f623be6924961d296d3d - date: Mar 19, 2024 - notes: - - Rename variables that use python built-in names, e.g. - - `max` -> `maximum` - - `len` -> `length` - - `str` -> `string` - - | - Convert JS `for` loops to `while` loops - this is generally the main difference between the codes, - because in python you can't do e.g. `for {i=1;i PresetType: - config = commonmark.make() - config["components"]["core"]["rules"].append("linkify") - config["components"]["block"]["rules"].append("table") - config["components"]["inline"]["rules"].extend(["strikethrough", "linkify"]) - config["components"]["inline"]["rules2"].append("strikethrough") - config["options"]["linkify"] = True - config["options"]["html"] = True - return config diff --git a/voxvera/vendor/markdown_it/presets/commonmark.py b/voxvera/vendor/markdown_it/presets/commonmark.py deleted file mode 100644 index ed0de0f..0000000 --- a/voxvera/vendor/markdown_it/presets/commonmark.py +++ /dev/null @@ -1,75 +0,0 @@ -"""Commonmark default options. - -This differs to presets.default, -primarily in that it allows HTML and does not enable components: - -- block: table -- inline: strikethrough -""" - -from ..utils import PresetType - - -def make() -> PresetType: - return { - "options": { - "maxNesting": 20, # Internal protection, recursion limit - "html": True, # Enable HTML tags in source, - # this is just a shorthand for .enable(["html_inline", "html_block"]) - # used by the linkify rule: - "linkify": False, # autoconvert URL-like texts to links - # used by the replacements and smartquotes rules - # Enable some language-neutral replacements + quotes beautification - "typographer": False, - # used by the smartquotes rule: - # Double + single quotes replacement pairs, when typographer enabled, - # and smartquotes on. Could be either a String or an Array. - # - # For example, you can use '«»„“' for Russian, '„“‚‘' for German, - # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). - "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */ - # Renderer specific; these options are used directly in the HTML renderer - "xhtmlOut": True, # Use '/' to close single tags (
) - "breaks": False, # Convert '\n' in paragraphs into
- "langPrefix": "language-", # CSS language prefix for fenced blocks - # Highlighter function. Should return escaped HTML, - # or '' if the source string is not changed and should be escaped externally. - # If result starts with PresetType: - return { - "options": { - "maxNesting": 100, # Internal protection, recursion limit - "html": False, # Enable HTML tags in source - # this is just a shorthand for .disable(["html_inline", "html_block"]) - # used by the linkify rule: - "linkify": False, # autoconvert URL-like texts to links - # used by the replacements and smartquotes rules: - # Enable some language-neutral replacements + quotes beautification - "typographer": False, - # used by the smartquotes rule: - # Double + single quotes replacement pairs, when typographer enabled, - # and smartquotes on. Could be either a String or an Array. - # For example, you can use '«»„“' for Russian, '„“‚‘' for German, - # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). - "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */ - # Renderer specific; these options are used directly in the HTML renderer - "xhtmlOut": False, # Use '/' to close single tags (
) - "breaks": False, # Convert '\n' in paragraphs into
- "langPrefix": "language-", # CSS language prefix for fenced blocks - # Highlighter function. Should return escaped HTML, - # or '' if the source string is not changed and should be escaped externally. - # If result starts with PresetType: - return { - "options": { - "maxNesting": 20, # Internal protection, recursion limit - "html": False, # Enable HTML tags in source - # this is just a shorthand for .disable(["html_inline", "html_block"]) - # used by the linkify rule: - "linkify": False, # autoconvert URL-like texts to links - # used by the replacements and smartquotes rules: - # Enable some language-neutral replacements + quotes beautification - "typographer": False, - # used by the smartquotes rule: - # Double + single quotes replacement pairs, when typographer enabled, - # and smartquotes on. Could be either a String or an Array. - # For example, you can use '«»„“' for Russian, '„“‚‘' for German, - # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). - "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */ - # Renderer specific; these options are used directly in the HTML renderer - "xhtmlOut": False, # Use '/' to close single tags (
) - "breaks": False, # Convert '\n' in paragraphs into
- "langPrefix": "language-", # CSS language prefix for fenced blocks - # Highlighter function. Should return escaped HTML, - # or '' if the source string is not changed and should be escaped externally. - # If result starts with Any: ... - - -class RendererHTML(RendererProtocol): - """Contains render rules for tokens. Can be updated and extended. - - Example: - - Each rule is called as independent static function with fixed signature: - - :: - - class Renderer: - def token_type_name(self, tokens, idx, options, env) { - # ... - return renderedHTML - - :: - - class CustomRenderer(RendererHTML): - def strong_open(self, tokens, idx, options, env): - return '' - def strong_close(self, tokens, idx, options, env): - return '' - - md = MarkdownIt(renderer_cls=CustomRenderer) - - result = md.render(...) - - See https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js - for more details and examples. - """ - - __output__ = "html" - - def __init__(self, parser: Any = None): - self.rules = { - k: v - for k, v in inspect.getmembers(self, predicate=inspect.ismethod) - if not (k.startswith("render") or k.startswith("_")) - } - - def render( - self, tokens: Sequence[Token], options: OptionsDict, env: EnvType - ) -> str: - """Takes token stream and generates HTML. - - :param tokens: list on block tokens to render - :param options: params of parser instance - :param env: additional data from parsed input - - """ - result = "" - - for i, token in enumerate(tokens): - if token.type == "inline": - if token.children: - result += self.renderInline(token.children, options, env) - elif token.type in self.rules: - result += self.rules[token.type](tokens, i, options, env) - else: - result += self.renderToken(tokens, i, options, env) - - return result - - def renderInline( - self, tokens: Sequence[Token], options: OptionsDict, env: EnvType - ) -> str: - """The same as ``render``, but for single token of `inline` type. - - :param tokens: list on block tokens to render - :param options: params of parser instance - :param env: additional data from parsed input (references, for example) - """ - result = "" - - for i, token in enumerate(tokens): - if token.type in self.rules: - result += self.rules[token.type](tokens, i, options, env) - else: - result += self.renderToken(tokens, i, options, env) - - return result - - def renderToken( - self, - tokens: Sequence[Token], - idx: int, - options: OptionsDict, - env: EnvType, - ) -> str: - """Default token renderer. - - Can be overridden by custom function - - :param idx: token index to render - :param options: params of parser instance - """ - result = "" - needLf = False - token = tokens[idx] - - # Tight list paragraphs - if token.hidden: - return "" - - # Insert a newline between hidden paragraph and subsequent opening - # block-level tag. - # - # For example, here we should insert a newline before blockquote: - # - a - # > - # - if token.block and token.nesting != -1 and idx and tokens[idx - 1].hidden: - result += "\n" - - # Add token name, e.g. ``. - # - needLf = False - - result += ">\n" if needLf else ">" - - return result - - @staticmethod - def renderAttrs(token: Token) -> str: - """Render token attributes to string.""" - result = "" - - for key, value in token.attrItems(): - result += " " + escapeHtml(key) + '="' + escapeHtml(str(value)) + '"' - - return result - - def renderInlineAsText( - self, - tokens: Sequence[Token] | None, - options: OptionsDict, - env: EnvType, - ) -> str: - """Special kludge for image `alt` attributes to conform CommonMark spec. - - Don't try to use it! Spec requires to show `alt` content with stripped markup, - instead of simple escaping. - - :param tokens: list on block tokens to render - :param options: params of parser instance - :param env: additional data from parsed input - """ - result = "" - - for token in tokens or []: - if token.type == "text": - result += token.content - elif token.type == "image": - if token.children: - result += self.renderInlineAsText(token.children, options, env) - elif token.type == "softbreak": - result += "\n" - - return result - - ################################################### - - def code_inline( - self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType - ) -> str: - token = tokens[idx] - return ( - "" - + escapeHtml(tokens[idx].content) - + "" - ) - - def code_block( - self, - tokens: Sequence[Token], - idx: int, - options: OptionsDict, - env: EnvType, - ) -> str: - token = tokens[idx] - - return ( - "" - + escapeHtml(tokens[idx].content) - + "\n" - ) - - def fence( - self, - tokens: Sequence[Token], - idx: int, - options: OptionsDict, - env: EnvType, - ) -> str: - token = tokens[idx] - info = unescapeAll(token.info).strip() if token.info else "" - langName = "" - langAttrs = "" - - if info: - arr = info.split(maxsplit=1) - langName = arr[0] - if len(arr) == 2: - langAttrs = arr[1] - - if options.highlight: - highlighted = options.highlight( - token.content, langName, langAttrs - ) or escapeHtml(token.content) - else: - highlighted = escapeHtml(token.content) - - if highlighted.startswith("" - + highlighted - + "\n" - ) - - return ( - "

"
-            + highlighted
-            + "
\n" - ) - - def image( - self, - tokens: Sequence[Token], - idx: int, - options: OptionsDict, - env: EnvType, - ) -> str: - token = tokens[idx] - - # "alt" attr MUST be set, even if empty. Because it's mandatory and - # should be placed on proper position for tests. - if token.children: - token.attrSet("alt", self.renderInlineAsText(token.children, options, env)) - else: - token.attrSet("alt", "") - - return self.renderToken(tokens, idx, options, env) - - def hardbreak( - self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType - ) -> str: - return "
\n" if options.xhtmlOut else "
\n" - - def softbreak( - self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType - ) -> str: - return ( - ("
\n" if options.xhtmlOut else "
\n") if options.breaks else "\n" - ) - - def text( - self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType - ) -> str: - return escapeHtml(tokens[idx].content) - - def html_block( - self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType - ) -> str: - return tokens[idx].content - - def html_inline( - self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType - ) -> str: - return tokens[idx].content diff --git a/voxvera/vendor/markdown_it/ruler.py b/voxvera/vendor/markdown_it/ruler.py deleted file mode 100644 index 91ab580..0000000 --- a/voxvera/vendor/markdown_it/ruler.py +++ /dev/null @@ -1,275 +0,0 @@ -""" -class Ruler - -Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and -[[MarkdownIt#inline]] to manage sequences of functions (rules): - -- keep rules in defined order -- assign the name to each rule -- enable/disable rules -- add/replace rules -- allow assign rules to additional named chains (in the same) -- caching lists of active rules - -You will not need use this class directly until write plugins. For simple -rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and -[[MarkdownIt.use]]. -""" - -from __future__ import annotations - -from collections.abc import Iterable -from dataclasses import dataclass, field -from typing import TYPE_CHECKING, Generic, TypedDict, TypeVar -import warnings - -from .utils import EnvType - -if TYPE_CHECKING: - from markdown_it import MarkdownIt - - -class StateBase: - def __init__(self, src: str, md: MarkdownIt, env: EnvType): - self.src = src - self.env = env - self.md = md - - @property - def src(self) -> str: - return self._src - - @src.setter - def src(self, value: str) -> None: - self._src = value - self._srcCharCode: tuple[int, ...] | None = None - - @property - def srcCharCode(self) -> tuple[int, ...]: - warnings.warn( - "StateBase.srcCharCode is deprecated. Use StateBase.src instead.", - DeprecationWarning, - stacklevel=2, - ) - if self._srcCharCode is None: - self._srcCharCode = tuple(ord(c) for c in self._src) - return self._srcCharCode - - -class RuleOptionsType(TypedDict, total=False): - alt: list[str] - - -RuleFuncTv = TypeVar("RuleFuncTv") -"""A rule function, whose signature is dependent on the state type.""" - - -@dataclass(slots=True) -class Rule(Generic[RuleFuncTv]): - name: str - enabled: bool - fn: RuleFuncTv = field(repr=False) - alt: list[str] - - -class Ruler(Generic[RuleFuncTv]): - def __init__(self) -> None: - # List of added rules. - self.__rules__: list[Rule[RuleFuncTv]] = [] - # Cached rule chains. - # First level - chain name, '' for default. - # Second level - diginal anchor for fast filtering by charcodes. - self.__cache__: dict[str, list[RuleFuncTv]] | None = None - - def __find__(self, name: str) -> int: - """Find rule index by name""" - for i, rule in enumerate(self.__rules__): - if rule.name == name: - return i - return -1 - - def __compile__(self) -> None: - """Build rules lookup cache""" - chains = {""} - # collect unique names - for rule in self.__rules__: - if not rule.enabled: - continue - for name in rule.alt: - chains.add(name) - self.__cache__ = {} - for chain in chains: - self.__cache__[chain] = [] - for rule in self.__rules__: - if not rule.enabled: - continue - if chain and (chain not in rule.alt): - continue - self.__cache__[chain].append(rule.fn) - - def at( - self, ruleName: str, fn: RuleFuncTv, options: RuleOptionsType | None = None - ) -> None: - """Replace rule by name with new function & options. - - :param ruleName: rule name to replace. - :param fn: new rule function. - :param options: new rule options (not mandatory). - :raises: KeyError if name not found - """ - index = self.__find__(ruleName) - options = options or {} - if index == -1: - raise KeyError(f"Parser rule not found: {ruleName}") - self.__rules__[index].fn = fn - self.__rules__[index].alt = options.get("alt", []) - self.__cache__ = None - - def before( - self, - beforeName: str, - ruleName: str, - fn: RuleFuncTv, - options: RuleOptionsType | None = None, - ) -> None: - """Add new rule to chain before one with given name. - - :param beforeName: new rule will be added before this one. - :param ruleName: new rule will be added before this one. - :param fn: new rule function. - :param options: new rule options (not mandatory). - :raises: KeyError if name not found - """ - index = self.__find__(beforeName) - options = options or {} - if index == -1: - raise KeyError(f"Parser rule not found: {beforeName}") - self.__rules__.insert( - index, Rule[RuleFuncTv](ruleName, True, fn, options.get("alt", [])) - ) - self.__cache__ = None - - def after( - self, - afterName: str, - ruleName: str, - fn: RuleFuncTv, - options: RuleOptionsType | None = None, - ) -> None: - """Add new rule to chain after one with given name. - - :param afterName: new rule will be added after this one. - :param ruleName: new rule will be added after this one. - :param fn: new rule function. - :param options: new rule options (not mandatory). - :raises: KeyError if name not found - """ - index = self.__find__(afterName) - options = options or {} - if index == -1: - raise KeyError(f"Parser rule not found: {afterName}") - self.__rules__.insert( - index + 1, Rule[RuleFuncTv](ruleName, True, fn, options.get("alt", [])) - ) - self.__cache__ = None - - def push( - self, ruleName: str, fn: RuleFuncTv, options: RuleOptionsType | None = None - ) -> None: - """Push new rule to the end of chain. - - :param ruleName: new rule will be added to the end of chain. - :param fn: new rule function. - :param options: new rule options (not mandatory). - - """ - self.__rules__.append( - Rule[RuleFuncTv](ruleName, True, fn, (options or {}).get("alt", [])) - ) - self.__cache__ = None - - def enable( - self, names: str | Iterable[str], ignoreInvalid: bool = False - ) -> list[str]: - """Enable rules with given names. - - :param names: name or list of rule names to enable. - :param ignoreInvalid: ignore errors when rule not found - :raises: KeyError if name not found and not ignoreInvalid - :return: list of found rule names - """ - if isinstance(names, str): - names = [names] - result: list[str] = [] - for name in names: - idx = self.__find__(name) - if (idx < 0) and ignoreInvalid: - continue - if (idx < 0) and not ignoreInvalid: - raise KeyError(f"Rules manager: invalid rule name {name}") - self.__rules__[idx].enabled = True - result.append(name) - self.__cache__ = None - return result - - def enableOnly( - self, names: str | Iterable[str], ignoreInvalid: bool = False - ) -> list[str]: - """Enable rules with given names, and disable everything else. - - :param names: name or list of rule names to enable. - :param ignoreInvalid: ignore errors when rule not found - :raises: KeyError if name not found and not ignoreInvalid - :return: list of found rule names - """ - if isinstance(names, str): - names = [names] - for rule in self.__rules__: - rule.enabled = False - return self.enable(names, ignoreInvalid) - - def disable( - self, names: str | Iterable[str], ignoreInvalid: bool = False - ) -> list[str]: - """Disable rules with given names. - - :param names: name or list of rule names to enable. - :param ignoreInvalid: ignore errors when rule not found - :raises: KeyError if name not found and not ignoreInvalid - :return: list of found rule names - """ - if isinstance(names, str): - names = [names] - result = [] - for name in names: - idx = self.__find__(name) - if (idx < 0) and ignoreInvalid: - continue - if (idx < 0) and not ignoreInvalid: - raise KeyError(f"Rules manager: invalid rule name {name}") - self.__rules__[idx].enabled = False - result.append(name) - self.__cache__ = None - return result - - def getRules(self, chainName: str = "") -> list[RuleFuncTv]: - """Return array of active functions (rules) for given chain name. - It analyzes rules configuration, compiles caches if not exists and returns result. - - Default chain name is `''` (empty string). It can't be skipped. - That's done intentionally, to keep signature monomorphic for high speed. - - """ - if self.__cache__ is None: - self.__compile__() - assert self.__cache__ is not None - # Chain can be empty, if rules disabled. But we still have to return Array. - return self.__cache__.get(chainName, []) or [] - - def get_all_rules(self) -> list[str]: - """Return all available rule names.""" - return [r.name for r in self.__rules__] - - def get_active_rules(self) -> list[str]: - """Return the active rule names.""" - return [r.name for r in self.__rules__ if r.enabled] diff --git a/voxvera/vendor/markdown_it/rules_block/__init__.py b/voxvera/vendor/markdown_it/rules_block/__init__.py deleted file mode 100644 index 517da23..0000000 --- a/voxvera/vendor/markdown_it/rules_block/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -__all__ = ( - "StateBlock", - "blockquote", - "code", - "fence", - "heading", - "hr", - "html_block", - "lheading", - "list_block", - "paragraph", - "reference", - "table", -) - -from .blockquote import blockquote -from .code import code -from .fence import fence -from .heading import heading -from .hr import hr -from .html_block import html_block -from .lheading import lheading -from .list import list_block -from .paragraph import paragraph -from .reference import reference -from .state_block import StateBlock -from .table import table diff --git a/voxvera/vendor/markdown_it/rules_block/blockquote.py b/voxvera/vendor/markdown_it/rules_block/blockquote.py deleted file mode 100644 index 0c9081b..0000000 --- a/voxvera/vendor/markdown_it/rules_block/blockquote.py +++ /dev/null @@ -1,299 +0,0 @@ -# Block quotes -from __future__ import annotations - -import logging - -from ..common.utils import isStrSpace -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -def blockquote(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug( - "entering blockquote: %s, %s, %s, %s", state, startLine, endLine, silent - ) - - oldLineMax = state.lineMax - pos = state.bMarks[startLine] + state.tShift[startLine] - max = state.eMarks[startLine] - - if state.is_code_block(startLine): - return False - - # check the block quote marker - try: - if state.src[pos] != ">": - return False - except IndexError: - return False - pos += 1 - - # we know that it's going to be a valid blockquote, - # so no point trying to find the end of it in silent mode - if silent: - return True - - # set offset past spaces and ">" - initial = offset = state.sCount[startLine] + 1 - - try: - second_char: str | None = state.src[pos] - except IndexError: - second_char = None - - # skip one optional space after '>' - if second_char == " ": - # ' > test ' - # ^ -- position start of line here: - pos += 1 - initial += 1 - offset += 1 - adjustTab = False - spaceAfterMarker = True - elif second_char == "\t": - spaceAfterMarker = True - - if (state.bsCount[startLine] + offset) % 4 == 3: - # ' >\t test ' - # ^ -- position start of line here (tab has width==1) - pos += 1 - initial += 1 - offset += 1 - adjustTab = False - else: - # ' >\t test ' - # ^ -- position start of line here + shift bsCount slightly - # to make extra space appear - adjustTab = True - - else: - spaceAfterMarker = False - - oldBMarks = [state.bMarks[startLine]] - state.bMarks[startLine] = pos - - while pos < max: - ch = state.src[pos] - - if isStrSpace(ch): - if ch == "\t": - offset += ( - 4 - - (offset + state.bsCount[startLine] + (1 if adjustTab else 0)) % 4 - ) - else: - offset += 1 - - else: - break - - pos += 1 - - oldBSCount = [state.bsCount[startLine]] - state.bsCount[startLine] = ( - state.sCount[startLine] + 1 + (1 if spaceAfterMarker else 0) - ) - - lastLineEmpty = pos >= max - - oldSCount = [state.sCount[startLine]] - state.sCount[startLine] = offset - initial - - oldTShift = [state.tShift[startLine]] - state.tShift[startLine] = pos - state.bMarks[startLine] - - terminatorRules = state.md.block.ruler.getRules("blockquote") - - oldParentType = state.parentType - state.parentType = "blockquote" - - # Search the end of the block - # - # Block ends with either: - # 1. an empty line outside: - # ``` - # > test - # - # ``` - # 2. an empty line inside: - # ``` - # > - # test - # ``` - # 3. another tag: - # ``` - # > test - # - - - - # ``` - - # for (nextLine = startLine + 1; nextLine < endLine; nextLine++) { - nextLine = startLine + 1 - while nextLine < endLine: - # check if it's outdented, i.e. it's inside list item and indented - # less than said list item: - # - # ``` - # 1. anything - # > current blockquote - # 2. checking this line - # ``` - isOutdented = state.sCount[nextLine] < state.blkIndent - - pos = state.bMarks[nextLine] + state.tShift[nextLine] - max = state.eMarks[nextLine] - - if pos >= max: - # Case 1: line is not inside the blockquote, and this line is empty. - break - - evaluatesTrue = state.src[pos] == ">" and not isOutdented - pos += 1 - if evaluatesTrue: - # This line is inside the blockquote. - - # set offset past spaces and ">" - initial = offset = state.sCount[nextLine] + 1 - - try: - next_char: str | None = state.src[pos] - except IndexError: - next_char = None - - # skip one optional space after '>' - if next_char == " ": - # ' > test ' - # ^ -- position start of line here: - pos += 1 - initial += 1 - offset += 1 - adjustTab = False - spaceAfterMarker = True - elif next_char == "\t": - spaceAfterMarker = True - - if (state.bsCount[nextLine] + offset) % 4 == 3: - # ' >\t test ' - # ^ -- position start of line here (tab has width==1) - pos += 1 - initial += 1 - offset += 1 - adjustTab = False - else: - # ' >\t test ' - # ^ -- position start of line here + shift bsCount slightly - # to make extra space appear - adjustTab = True - - else: - spaceAfterMarker = False - - oldBMarks.append(state.bMarks[nextLine]) - state.bMarks[nextLine] = pos - - while pos < max: - ch = state.src[pos] - - if isStrSpace(ch): - if ch == "\t": - offset += ( - 4 - - ( - offset - + state.bsCount[nextLine] - + (1 if adjustTab else 0) - ) - % 4 - ) - else: - offset += 1 - else: - break - - pos += 1 - - lastLineEmpty = pos >= max - - oldBSCount.append(state.bsCount[nextLine]) - state.bsCount[nextLine] = ( - state.sCount[nextLine] + 1 + (1 if spaceAfterMarker else 0) - ) - - oldSCount.append(state.sCount[nextLine]) - state.sCount[nextLine] = offset - initial - - oldTShift.append(state.tShift[nextLine]) - state.tShift[nextLine] = pos - state.bMarks[nextLine] - - nextLine += 1 - continue - - # Case 2: line is not inside the blockquote, and the last line was empty. - if lastLineEmpty: - break - - # Case 3: another tag found. - terminate = False - - for terminatorRule in terminatorRules: - if terminatorRule(state, nextLine, endLine, True): - terminate = True - break - - if terminate: - # Quirk to enforce "hard termination mode" for paragraphs; - # normally if you call `tokenize(state, startLine, nextLine)`, - # paragraphs will look below nextLine for paragraph continuation, - # but if blockquote is terminated by another tag, they shouldn't - state.lineMax = nextLine - - if state.blkIndent != 0: - # state.blkIndent was non-zero, we now set it to zero, - # so we need to re-calculate all offsets to appear as - # if indent wasn't changed - oldBMarks.append(state.bMarks[nextLine]) - oldBSCount.append(state.bsCount[nextLine]) - oldTShift.append(state.tShift[nextLine]) - oldSCount.append(state.sCount[nextLine]) - state.sCount[nextLine] -= state.blkIndent - - break - - oldBMarks.append(state.bMarks[nextLine]) - oldBSCount.append(state.bsCount[nextLine]) - oldTShift.append(state.tShift[nextLine]) - oldSCount.append(state.sCount[nextLine]) - - # A negative indentation means that this is a paragraph continuation - # - state.sCount[nextLine] = -1 - - nextLine += 1 - - oldIndent = state.blkIndent - state.blkIndent = 0 - - token = state.push("blockquote_open", "blockquote", 1) - token.markup = ">" - token.map = lines = [startLine, 0] - - state.md.block.tokenize(state, startLine, nextLine) - - token = state.push("blockquote_close", "blockquote", -1) - token.markup = ">" - - state.lineMax = oldLineMax - state.parentType = oldParentType - lines[1] = state.line - - # Restore original tShift; this might not be necessary since the parser - # has already been here, but just to make sure we can do that. - for i, item in enumerate(oldTShift): - state.bMarks[i + startLine] = oldBMarks[i] - state.tShift[i + startLine] = item - state.sCount[i + startLine] = oldSCount[i] - state.bsCount[i + startLine] = oldBSCount[i] - - state.blkIndent = oldIndent - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/code.py b/voxvera/vendor/markdown_it/rules_block/code.py deleted file mode 100644 index af8a41c..0000000 --- a/voxvera/vendor/markdown_it/rules_block/code.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Code block (4 spaces padded).""" - -import logging - -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -def code(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug("entering code: %s, %s, %s, %s", state, startLine, endLine, silent) - - if not state.is_code_block(startLine): - return False - - last = nextLine = startLine + 1 - - while nextLine < endLine: - if state.isEmpty(nextLine): - nextLine += 1 - continue - - if state.is_code_block(nextLine): - nextLine += 1 - last = nextLine - continue - - break - - state.line = last - - token = state.push("code_block", "code", 0) - token.content = state.getLines(startLine, last, 4 + state.blkIndent, False) + "\n" - token.map = [startLine, state.line] - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/fence.py b/voxvera/vendor/markdown_it/rules_block/fence.py deleted file mode 100644 index 263f1b8..0000000 --- a/voxvera/vendor/markdown_it/rules_block/fence.py +++ /dev/null @@ -1,101 +0,0 @@ -# fences (``` lang, ~~~ lang) -import logging - -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -def fence(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug("entering fence: %s, %s, %s, %s", state, startLine, endLine, silent) - - haveEndMarker = False - pos = state.bMarks[startLine] + state.tShift[startLine] - maximum = state.eMarks[startLine] - - if state.is_code_block(startLine): - return False - - if pos + 3 > maximum: - return False - - marker = state.src[pos] - - if marker not in ("~", "`"): - return False - - # scan marker length - mem = pos - pos = state.skipCharsStr(pos, marker) - - length = pos - mem - - if length < 3: - return False - - markup = state.src[mem:pos] - params = state.src[pos:maximum] - - if marker == "`" and marker in params: - return False - - # Since start is found, we can report success here in validation mode - if silent: - return True - - # search end of block - nextLine = startLine - - while True: - nextLine += 1 - if nextLine >= endLine: - # unclosed block should be autoclosed by end of document. - # also block seems to be autoclosed by end of parent - break - - pos = mem = state.bMarks[nextLine] + state.tShift[nextLine] - maximum = state.eMarks[nextLine] - - if pos < maximum and state.sCount[nextLine] < state.blkIndent: - # non-empty line with negative indent should stop the list: - # - ``` - # test - break - - try: - if state.src[pos] != marker: - continue - except IndexError: - break - - if state.is_code_block(nextLine): - continue - - pos = state.skipCharsStr(pos, marker) - - # closing code fence must be at least as long as the opening one - if pos - mem < length: - continue - - # make sure tail has spaces only - pos = state.skipSpaces(pos) - - if pos < maximum: - continue - - haveEndMarker = True - # found! - break - - # If a fence has heading spaces, they should be removed from its inner block - length = state.sCount[startLine] - - state.line = nextLine + (1 if haveEndMarker else 0) - - token = state.push("fence", "code", 0) - token.info = params - token.content = state.getLines(startLine + 1, nextLine, length, True) - token.markup = markup - token.map = [startLine, state.line] - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/heading.py b/voxvera/vendor/markdown_it/rules_block/heading.py deleted file mode 100644 index afcf9ed..0000000 --- a/voxvera/vendor/markdown_it/rules_block/heading.py +++ /dev/null @@ -1,69 +0,0 @@ -"""Atex heading (#, ##, ...)""" - -from __future__ import annotations - -import logging - -from ..common.utils import isStrSpace -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -def heading(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug("entering heading: %s, %s, %s, %s", state, startLine, endLine, silent) - - pos = state.bMarks[startLine] + state.tShift[startLine] - maximum = state.eMarks[startLine] - - if state.is_code_block(startLine): - return False - - ch: str | None = state.src[pos] - - if ch != "#" or pos >= maximum: - return False - - # count heading level - level = 1 - pos += 1 - try: - ch = state.src[pos] - except IndexError: - ch = None - while ch == "#" and pos < maximum and level <= 6: - level += 1 - pos += 1 - try: - ch = state.src[pos] - except IndexError: - ch = None - - if level > 6 or (pos < maximum and not isStrSpace(ch)): - return False - - if silent: - return True - - # Let's cut tails like ' ### ' from the end of string - - maximum = state.skipSpacesBack(maximum, pos) - tmp = state.skipCharsStrBack(maximum, "#", pos) - if tmp > pos and isStrSpace(state.src[tmp - 1]): - maximum = tmp - - state.line = startLine + 1 - - token = state.push("heading_open", "h" + str(level), 1) - token.markup = "########"[:level] - token.map = [startLine, state.line] - - token = state.push("inline", "", 0) - token.content = state.src[pos:maximum].strip() - token.map = [startLine, state.line] - token.children = [] - - token = state.push("heading_close", "h" + str(level), -1) - token.markup = "########"[:level] - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/hr.py b/voxvera/vendor/markdown_it/rules_block/hr.py deleted file mode 100644 index fca7d79..0000000 --- a/voxvera/vendor/markdown_it/rules_block/hr.py +++ /dev/null @@ -1,56 +0,0 @@ -"""Horizontal rule - -At least 3 of these characters on a line * - _ -""" - -import logging - -from ..common.utils import isStrSpace -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -def hr(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug("entering hr: %s, %s, %s, %s", state, startLine, endLine, silent) - - pos = state.bMarks[startLine] + state.tShift[startLine] - maximum = state.eMarks[startLine] - - if state.is_code_block(startLine): - return False - - try: - marker = state.src[pos] - except IndexError: - return False - pos += 1 - - # Check hr marker - if marker not in ("*", "-", "_"): - return False - - # markers can be mixed with spaces, but there should be at least 3 of them - - cnt = 1 - while pos < maximum: - ch = state.src[pos] - pos += 1 - if ch != marker and not isStrSpace(ch): - return False - if ch == marker: - cnt += 1 - - if cnt < 3: - return False - - if silent: - return True - - state.line = startLine + 1 - - token = state.push("hr", "hr", 0) - token.map = [startLine, state.line] - token.markup = marker * (cnt + 1) - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/html_block.py b/voxvera/vendor/markdown_it/rules_block/html_block.py deleted file mode 100644 index 3d43f6e..0000000 --- a/voxvera/vendor/markdown_it/rules_block/html_block.py +++ /dev/null @@ -1,90 +0,0 @@ -# HTML block -from __future__ import annotations - -import logging -import re - -from ..common.html_blocks import block_names -from ..common.html_re import HTML_OPEN_CLOSE_TAG_STR -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - -# An array of opening and corresponding closing sequences for html tags, -# last argument defines whether it can terminate a paragraph or not -HTML_SEQUENCES: list[tuple[re.Pattern[str], re.Pattern[str], bool]] = [ - ( - re.compile(r"^<(script|pre|style|textarea)(?=(\s|>|$))", re.IGNORECASE), - re.compile(r"<\/(script|pre|style|textarea)>", re.IGNORECASE), - True, - ), - (re.compile(r"^"), True), - (re.compile(r"^<\?"), re.compile(r"\?>"), True), - (re.compile(r"^"), True), - (re.compile(r"^"), True), - ( - re.compile("^|$))", re.IGNORECASE), - re.compile(r"^$"), - True, - ), - (re.compile(HTML_OPEN_CLOSE_TAG_STR + "\\s*$"), re.compile(r"^$"), False), -] - - -def html_block(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug( - "entering html_block: %s, %s, %s, %s", state, startLine, endLine, silent - ) - pos = state.bMarks[startLine] + state.tShift[startLine] - maximum = state.eMarks[startLine] - - if state.is_code_block(startLine): - return False - - if not state.md.options.get("html", None): - return False - - if state.src[pos] != "<": - return False - - lineText = state.src[pos:maximum] - - html_seq = None - for HTML_SEQUENCE in HTML_SEQUENCES: - if HTML_SEQUENCE[0].search(lineText): - html_seq = HTML_SEQUENCE - break - - if not html_seq: - return False - - if silent: - # true if this sequence can be a terminator, false otherwise - return html_seq[2] - - nextLine = startLine + 1 - - # If we are here - we detected HTML block. - # Let's roll down till block end. - if not html_seq[1].search(lineText): - while nextLine < endLine: - if state.sCount[nextLine] < state.blkIndent: - break - - pos = state.bMarks[nextLine] + state.tShift[nextLine] - maximum = state.eMarks[nextLine] - lineText = state.src[pos:maximum] - - if html_seq[1].search(lineText): - if len(lineText) != 0: - nextLine += 1 - break - nextLine += 1 - - state.line = nextLine - - token = state.push("html_block", "", 0) - token.map = [startLine, nextLine] - token.content = state.getLines(startLine, nextLine, state.blkIndent, True) - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/lheading.py b/voxvera/vendor/markdown_it/rules_block/lheading.py deleted file mode 100644 index 3522207..0000000 --- a/voxvera/vendor/markdown_it/rules_block/lheading.py +++ /dev/null @@ -1,86 +0,0 @@ -# lheading (---, ==) -import logging - -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -def lheading(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug("entering lheading: %s, %s, %s, %s", state, startLine, endLine, silent) - - level = None - nextLine = startLine + 1 - ruler = state.md.block.ruler - terminatorRules = ruler.getRules("paragraph") - - if state.is_code_block(startLine): - return False - - oldParentType = state.parentType - state.parentType = "paragraph" # use paragraph to match terminatorRules - - # jump line-by-line until empty one or EOF - while nextLine < endLine and not state.isEmpty(nextLine): - # this would be a code block normally, but after paragraph - # it's considered a lazy continuation regardless of what's there - if state.sCount[nextLine] - state.blkIndent > 3: - nextLine += 1 - continue - - # Check for underline in setext header - if state.sCount[nextLine] >= state.blkIndent: - pos = state.bMarks[nextLine] + state.tShift[nextLine] - maximum = state.eMarks[nextLine] - - if pos < maximum: - marker = state.src[pos] - - if marker in ("-", "="): - pos = state.skipCharsStr(pos, marker) - pos = state.skipSpaces(pos) - - # /* = */ - if pos >= maximum: - level = 1 if marker == "=" else 2 - break - - # quirk for blockquotes, this line should already be checked by that rule - if state.sCount[nextLine] < 0: - nextLine += 1 - continue - - # Some tags can terminate paragraph without empty line. - terminate = False - for terminatorRule in terminatorRules: - if terminatorRule(state, nextLine, endLine, True): - terminate = True - break - if terminate: - break - - nextLine += 1 - - if not level: - # Didn't find valid underline - return False - - content = state.getLines(startLine, nextLine, state.blkIndent, False).strip() - - state.line = nextLine + 1 - - token = state.push("heading_open", "h" + str(level), 1) - token.markup = marker - token.map = [startLine, state.line] - - token = state.push("inline", "", 0) - token.content = content - token.map = [startLine, state.line - 1] - token.children = [] - - token = state.push("heading_close", "h" + str(level), -1) - token.markup = marker - - state.parentType = oldParentType - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/list.py b/voxvera/vendor/markdown_it/rules_block/list.py deleted file mode 100644 index d8070d7..0000000 --- a/voxvera/vendor/markdown_it/rules_block/list.py +++ /dev/null @@ -1,345 +0,0 @@ -# Lists -import logging - -from ..common.utils import isStrSpace -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -# Search `[-+*][\n ]`, returns next pos after marker on success -# or -1 on fail. -def skipBulletListMarker(state: StateBlock, startLine: int) -> int: - pos = state.bMarks[startLine] + state.tShift[startLine] - maximum = state.eMarks[startLine] - - try: - marker = state.src[pos] - except IndexError: - return -1 - pos += 1 - - if marker not in ("*", "-", "+"): - return -1 - - if pos < maximum: - ch = state.src[pos] - - if not isStrSpace(ch): - # " -test " - is not a list item - return -1 - - return pos - - -# Search `\d+[.)][\n ]`, returns next pos after marker on success -# or -1 on fail. -def skipOrderedListMarker(state: StateBlock, startLine: int) -> int: - start = state.bMarks[startLine] + state.tShift[startLine] - pos = start - maximum = state.eMarks[startLine] - - # List marker should have at least 2 chars (digit + dot) - if pos + 1 >= maximum: - return -1 - - ch = state.src[pos] - pos += 1 - - ch_ord = ord(ch) - # /* 0 */ /* 9 */ - if ch_ord < 0x30 or ch_ord > 0x39: - return -1 - - while True: - # EOL -> fail - if pos >= maximum: - return -1 - - ch = state.src[pos] - pos += 1 - - # /* 0 */ /* 9 */ - ch_ord = ord(ch) - if ch_ord >= 0x30 and ch_ord <= 0x39: - # List marker should have no more than 9 digits - # (prevents integer overflow in browsers) - if pos - start >= 10: - return -1 - - continue - - # found valid marker - if ch in (")", "."): - break - - return -1 - - if pos < maximum: - ch = state.src[pos] - - if not isStrSpace(ch): - # " 1.test " - is not a list item - return -1 - - return pos - - -def markTightParagraphs(state: StateBlock, idx: int) -> None: - level = state.level + 2 - - i = idx + 2 - length = len(state.tokens) - 2 - while i < length: - if state.tokens[i].level == level and state.tokens[i].type == "paragraph_open": - state.tokens[i + 2].hidden = True - state.tokens[i].hidden = True - i += 2 - i += 1 - - -def list_block(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug("entering list: %s, %s, %s, %s", state, startLine, endLine, silent) - - isTerminatingParagraph = False - tight = True - - if state.is_code_block(startLine): - return False - - # Special case: - # - item 1 - # - item 2 - # - item 3 - # - item 4 - # - this one is a paragraph continuation - if ( - state.listIndent >= 0 - and state.sCount[startLine] - state.listIndent >= 4 - and state.sCount[startLine] < state.blkIndent - ): - return False - - # limit conditions when list can interrupt - # a paragraph (validation mode only) - # Next list item should still terminate previous list item - # - # This code can fail if plugins use blkIndent as well as lists, - # but I hope the spec gets fixed long before that happens. - # - if ( - silent - and state.parentType == "paragraph" - and state.sCount[startLine] >= state.blkIndent - ): - isTerminatingParagraph = True - - # Detect list type and position after marker - posAfterMarker = skipOrderedListMarker(state, startLine) - if posAfterMarker >= 0: - isOrdered = True - start = state.bMarks[startLine] + state.tShift[startLine] - markerValue = int(state.src[start : posAfterMarker - 1]) - - # If we're starting a new ordered list right after - # a paragraph, it should start with 1. - if isTerminatingParagraph and markerValue != 1: - return False - else: - posAfterMarker = skipBulletListMarker(state, startLine) - if posAfterMarker >= 0: - isOrdered = False - else: - return False - - # If we're starting a new unordered list right after - # a paragraph, first line should not be empty. - if ( - isTerminatingParagraph - and state.skipSpaces(posAfterMarker) >= state.eMarks[startLine] - ): - return False - - # We should terminate list on style change. Remember first one to compare. - markerChar = state.src[posAfterMarker - 1] - - # For validation mode we can terminate immediately - if silent: - return True - - # Start list - listTokIdx = len(state.tokens) - - if isOrdered: - token = state.push("ordered_list_open", "ol", 1) - if markerValue != 1: - token.attrs = {"start": markerValue} - - else: - token = state.push("bullet_list_open", "ul", 1) - - token.map = listLines = [startLine, 0] - token.markup = markerChar - - # - # Iterate list items - # - - nextLine = startLine - prevEmptyEnd = False - terminatorRules = state.md.block.ruler.getRules("list") - - oldParentType = state.parentType - state.parentType = "list" - - while nextLine < endLine: - pos = posAfterMarker - maximum = state.eMarks[nextLine] - - initial = offset = ( - state.sCount[nextLine] - + posAfterMarker - - (state.bMarks[startLine] + state.tShift[startLine]) - ) - - while pos < maximum: - ch = state.src[pos] - - if ch == "\t": - offset += 4 - (offset + state.bsCount[nextLine]) % 4 - elif ch == " ": - offset += 1 - else: - break - - pos += 1 - - contentStart = pos - - # trimming space in "- \n 3" case, indent is 1 here - indentAfterMarker = 1 if contentStart >= maximum else offset - initial - - # If we have more than 4 spaces, the indent is 1 - # (the rest is just indented code block) - if indentAfterMarker > 4: - indentAfterMarker = 1 - - # " - test" - # ^^^^^ - calculating total length of this thing - indent = initial + indentAfterMarker - - # Run subparser & write tokens - token = state.push("list_item_open", "li", 1) - token.markup = markerChar - token.map = itemLines = [startLine, 0] - if isOrdered: - token.info = state.src[start : posAfterMarker - 1] - - # change current state, then restore it after parser subcall - oldTight = state.tight - oldTShift = state.tShift[startLine] - oldSCount = state.sCount[startLine] - - # - example list - # ^ listIndent position will be here - # ^ blkIndent position will be here - # - oldListIndent = state.listIndent - state.listIndent = state.blkIndent - state.blkIndent = indent - - state.tight = True - state.tShift[startLine] = contentStart - state.bMarks[startLine] - state.sCount[startLine] = offset - - if contentStart >= maximum and state.isEmpty(startLine + 1): - # workaround for this case - # (list item is empty, list terminates before "foo"): - # ~~~~~~~~ - # - - # - # foo - # ~~~~~~~~ - state.line = min(state.line + 2, endLine) - else: - # NOTE in list.js this was: - # state.md.block.tokenize(state, startLine, endLine, True) - # but tokeniz does not take the final parameter - state.md.block.tokenize(state, startLine, endLine) - - # If any of list item is tight, mark list as tight - if (not state.tight) or prevEmptyEnd: - tight = False - - # Item become loose if finish with empty line, - # but we should filter last element, because it means list finish - prevEmptyEnd = (state.line - startLine) > 1 and state.isEmpty(state.line - 1) - - state.blkIndent = state.listIndent - state.listIndent = oldListIndent - state.tShift[startLine] = oldTShift - state.sCount[startLine] = oldSCount - state.tight = oldTight - - token = state.push("list_item_close", "li", -1) - token.markup = markerChar - - nextLine = startLine = state.line - itemLines[1] = nextLine - - if nextLine >= endLine: - break - - contentStart = state.bMarks[startLine] - - # - # Try to check if list is terminated or continued. - # - if state.sCount[nextLine] < state.blkIndent: - break - - if state.is_code_block(startLine): - break - - # fail if terminating block found - terminate = False - for terminatorRule in terminatorRules: - if terminatorRule(state, nextLine, endLine, True): - terminate = True - break - - if terminate: - break - - # fail if list has another type - if isOrdered: - posAfterMarker = skipOrderedListMarker(state, nextLine) - if posAfterMarker < 0: - break - start = state.bMarks[nextLine] + state.tShift[nextLine] - else: - posAfterMarker = skipBulletListMarker(state, nextLine) - if posAfterMarker < 0: - break - - if markerChar != state.src[posAfterMarker - 1]: - break - - # Finalize list - if isOrdered: - token = state.push("ordered_list_close", "ol", -1) - else: - token = state.push("bullet_list_close", "ul", -1) - - token.markup = markerChar - - listLines[1] = nextLine - state.line = nextLine - - state.parentType = oldParentType - - # mark paragraphs tight if needed - if tight: - markTightParagraphs(state, listTokIdx) - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/paragraph.py b/voxvera/vendor/markdown_it/rules_block/paragraph.py deleted file mode 100644 index 30ba877..0000000 --- a/voxvera/vendor/markdown_it/rules_block/paragraph.py +++ /dev/null @@ -1,66 +0,0 @@ -"""Paragraph.""" - -import logging - -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -def paragraph(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - LOGGER.debug( - "entering paragraph: %s, %s, %s, %s", state, startLine, endLine, silent - ) - - nextLine = startLine + 1 - ruler = state.md.block.ruler - terminatorRules = ruler.getRules("paragraph") - endLine = state.lineMax - - oldParentType = state.parentType - state.parentType = "paragraph" - - # jump line-by-line until empty one or EOF - while nextLine < endLine: - if state.isEmpty(nextLine): - break - # this would be a code block normally, but after paragraph - # it's considered a lazy continuation regardless of what's there - if state.sCount[nextLine] - state.blkIndent > 3: - nextLine += 1 - continue - - # quirk for blockquotes, this line should already be checked by that rule - if state.sCount[nextLine] < 0: - nextLine += 1 - continue - - # Some tags can terminate paragraph without empty line. - terminate = False - for terminatorRule in terminatorRules: - if terminatorRule(state, nextLine, endLine, True): - terminate = True - break - - if terminate: - break - - nextLine += 1 - - content = state.getLines(startLine, nextLine, state.blkIndent, False).strip() - - state.line = nextLine - - token = state.push("paragraph_open", "p", 1) - token.map = [startLine, state.line] - - token = state.push("inline", "", 0) - token.content = content - token.map = [startLine, state.line] - token.children = [] - - token = state.push("paragraph_close", "p", -1) - - state.parentType = oldParentType - - return True diff --git a/voxvera/vendor/markdown_it/rules_block/reference.py b/voxvera/vendor/markdown_it/rules_block/reference.py deleted file mode 100644 index ad94d40..0000000 --- a/voxvera/vendor/markdown_it/rules_block/reference.py +++ /dev/null @@ -1,235 +0,0 @@ -import logging - -from ..common.utils import charCodeAt, isSpace, normalizeReference -from .state_block import StateBlock - -LOGGER = logging.getLogger(__name__) - - -def reference(state: StateBlock, startLine: int, _endLine: int, silent: bool) -> bool: - LOGGER.debug( - "entering reference: %s, %s, %s, %s", state, startLine, _endLine, silent - ) - - pos = state.bMarks[startLine] + state.tShift[startLine] - maximum = state.eMarks[startLine] - nextLine = startLine + 1 - - if state.is_code_block(startLine): - return False - - if state.src[pos] != "[": - return False - - string = state.src[pos : maximum + 1] - - # string = state.getLines(startLine, nextLine, state.blkIndent, False).strip() - maximum = len(string) - - labelEnd = None - pos = 1 - while pos < maximum: - ch = charCodeAt(string, pos) - if ch == 0x5B: # /* [ */ - return False - elif ch == 0x5D: # /* ] */ - labelEnd = pos - break - elif ch == 0x0A: # /* \n */ - if (lineContent := getNextLine(state, nextLine)) is not None: - string += lineContent - maximum = len(string) - nextLine += 1 - elif ch == 0x5C: # /* \ */ - pos += 1 - if ( - pos < maximum - and charCodeAt(string, pos) == 0x0A - and (lineContent := getNextLine(state, nextLine)) is not None - ): - string += lineContent - maximum = len(string) - nextLine += 1 - pos += 1 - - if ( - labelEnd is None or labelEnd < 0 or charCodeAt(string, labelEnd + 1) != 0x3A - ): # /* : */ - return False - - # [label]: destination 'title' - # ^^^ skip optional whitespace here - pos = labelEnd + 2 - while pos < maximum: - ch = charCodeAt(string, pos) - if ch == 0x0A: - if (lineContent := getNextLine(state, nextLine)) is not None: - string += lineContent - maximum = len(string) - nextLine += 1 - elif isSpace(ch): - pass - else: - break - pos += 1 - - # [label]: destination 'title' - # ^^^^^^^^^^^ parse this - destRes = state.md.helpers.parseLinkDestination(string, pos, maximum) - if not destRes.ok: - return False - - href = state.md.normalizeLink(destRes.str) - if not state.md.validateLink(href): - return False - - pos = destRes.pos - - # save cursor state, we could require to rollback later - destEndPos = pos - destEndLineNo = nextLine - - # [label]: destination 'title' - # ^^^ skipping those spaces - start = pos - while pos < maximum: - ch = charCodeAt(string, pos) - if ch == 0x0A: - if (lineContent := getNextLine(state, nextLine)) is not None: - string += lineContent - maximum = len(string) - nextLine += 1 - elif isSpace(ch): - pass - else: - break - pos += 1 - - # [label]: destination 'title' - # ^^^^^^^ parse this - titleRes = state.md.helpers.parseLinkTitle(string, pos, maximum, None) - while titleRes.can_continue: - if (lineContent := getNextLine(state, nextLine)) is None: - break - string += lineContent - pos = maximum - maximum = len(string) - nextLine += 1 - titleRes = state.md.helpers.parseLinkTitle(string, pos, maximum, titleRes) - - if pos < maximum and start != pos and titleRes.ok: - title = titleRes.str - pos = titleRes.pos - else: - title = "" - pos = destEndPos - nextLine = destEndLineNo - - # skip trailing spaces until the rest of the line - while pos < maximum: - ch = charCodeAt(string, pos) - if not isSpace(ch): - break - pos += 1 - - if pos < maximum and charCodeAt(string, pos) != 0x0A and title: - # garbage at the end of the line after title, - # but it could still be a valid reference if we roll back - title = "" - pos = destEndPos - nextLine = destEndLineNo - while pos < maximum: - ch = charCodeAt(string, pos) - if not isSpace(ch): - break - pos += 1 - - if pos < maximum and charCodeAt(string, pos) != 0x0A: - # garbage at the end of the line - return False - - label = normalizeReference(string[1:labelEnd]) - if not label: - # CommonMark 0.20 disallows empty labels - return False - - # Reference can not terminate anything. This check is for safety only. - if silent: - return True - - if "references" not in state.env: - state.env["references"] = {} - - state.line = nextLine - - # note, this is not part of markdown-it JS, but is useful for renderers - if state.md.options.get("inline_definitions", False): - token = state.push("definition", "", 0) - token.meta = { - "id": label, - "title": title, - "url": href, - "label": string[1:labelEnd], - } - token.map = [startLine, state.line] - - if label not in state.env["references"]: - state.env["references"][label] = { - "title": title, - "href": href, - "map": [startLine, state.line], - } - else: - state.env.setdefault("duplicate_refs", []).append( - { - "title": title, - "href": href, - "label": label, - "map": [startLine, state.line], - } - ) - - return True - - -def getNextLine(state: StateBlock, nextLine: int) -> None | str: - endLine = state.lineMax - - if nextLine >= endLine or state.isEmpty(nextLine): - # empty line or end of input - return None - - isContinuation = False - - # this would be a code block normally, but after paragraph - # it's considered a lazy continuation regardless of what's there - if state.is_code_block(nextLine): - isContinuation = True - - # quirk for blockquotes, this line should already be checked by that rule - if state.sCount[nextLine] < 0: - isContinuation = True - - if not isContinuation: - terminatorRules = state.md.block.ruler.getRules("reference") - oldParentType = state.parentType - state.parentType = "reference" - - # Some tags can terminate paragraph without empty line. - terminate = False - for terminatorRule in terminatorRules: - if terminatorRule(state, nextLine, endLine, True): - terminate = True - break - - state.parentType = oldParentType - - if terminate: - # terminated by another block - return None - - pos = state.bMarks[nextLine] + state.tShift[nextLine] - maximum = state.eMarks[nextLine] - - # max + 1 explicitly includes the newline - return state.src[pos : maximum + 1] diff --git a/voxvera/vendor/markdown_it/rules_block/state_block.py b/voxvera/vendor/markdown_it/rules_block/state_block.py deleted file mode 100644 index 445ad26..0000000 --- a/voxvera/vendor/markdown_it/rules_block/state_block.py +++ /dev/null @@ -1,261 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Literal - -from ..common.utils import isStrSpace -from ..ruler import StateBase -from ..token import Token -from ..utils import EnvType - -if TYPE_CHECKING: - from markdown_it.main import MarkdownIt - - -class StateBlock(StateBase): - def __init__( - self, src: str, md: MarkdownIt, env: EnvType, tokens: list[Token] - ) -> None: - self.src = src - - # link to parser instance - self.md = md - - self.env = env - - # - # Internal state variables - # - - self.tokens = tokens - - self.bMarks: list[int] = [] # line begin offsets for fast jumps - self.eMarks: list[int] = [] # line end offsets for fast jumps - # offsets of the first non-space characters (tabs not expanded) - self.tShift: list[int] = [] - self.sCount: list[int] = [] # indents for each line (tabs expanded) - - # An amount of virtual spaces (tabs expanded) between beginning - # of each line (bMarks) and real beginning of that line. - # - # It exists only as a hack because blockquotes override bMarks - # losing information in the process. - # - # It's used only when expanding tabs, you can think about it as - # an initial tab length, e.g. bsCount=21 applied to string `\t123` - # means first tab should be expanded to 4-21%4 === 3 spaces. - # - self.bsCount: list[int] = [] - - # block parser variables - self.blkIndent = 0 # required block content indent (for example, if we are - # inside a list, it would be positioned after list marker) - self.line = 0 # line index in src - self.lineMax = 0 # lines count - self.tight = False # loose/tight mode for lists - self.ddIndent = -1 # indent of the current dd block (-1 if there isn't any) - self.listIndent = -1 # indent of the current list block (-1 if there isn't any) - - # can be 'blockquote', 'list', 'root', 'paragraph' or 'reference' - # used in lists to determine if they interrupt a paragraph - self.parentType = "root" - - self.level = 0 - - # renderer - self.result = "" - - # Create caches - # Generate markers. - indent_found = False - - start = pos = indent = offset = 0 - length = len(self.src) - - for pos, character in enumerate(self.src): - if not indent_found: - if isStrSpace(character): - indent += 1 - - if character == "\t": - offset += 4 - offset % 4 - else: - offset += 1 - continue - else: - indent_found = True - - if character == "\n" or pos == length - 1: - if character != "\n": - pos += 1 - self.bMarks.append(start) - self.eMarks.append(pos) - self.tShift.append(indent) - self.sCount.append(offset) - self.bsCount.append(0) - - indent_found = False - indent = 0 - offset = 0 - start = pos + 1 - - # Push fake entry to simplify cache bounds checks - self.bMarks.append(length) - self.eMarks.append(length) - self.tShift.append(0) - self.sCount.append(0) - self.bsCount.append(0) - - self.lineMax = len(self.bMarks) - 1 # don't count last fake line - - # pre-check if code blocks are enabled, to speed up is_code_block method - self._code_enabled = "code" in self.md["block"].ruler.get_active_rules() - - def __repr__(self) -> str: - return ( - f"{self.__class__.__name__}" - f"(line={self.line},level={self.level},tokens={len(self.tokens)})" - ) - - def push(self, ttype: str, tag: str, nesting: Literal[-1, 0, 1]) -> Token: - """Push new token to "stream".""" - token = Token(ttype, tag, nesting) - token.block = True - if nesting < 0: - self.level -= 1 # closing tag - token.level = self.level - if nesting > 0: - self.level += 1 # opening tag - self.tokens.append(token) - return token - - def isEmpty(self, line: int) -> bool: - """.""" - return (self.bMarks[line] + self.tShift[line]) >= self.eMarks[line] - - def skipEmptyLines(self, from_pos: int) -> int: - """.""" - while from_pos < self.lineMax: - try: - if (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[ - from_pos - ]: - break - except IndexError: - pass - from_pos += 1 - return from_pos - - def skipSpaces(self, pos: int) -> int: - """Skip spaces from given position.""" - while True: - try: - current = self.src[pos] - except IndexError: - break - if not isStrSpace(current): - break - pos += 1 - return pos - - def skipSpacesBack(self, pos: int, minimum: int) -> int: - """Skip spaces from given position in reverse.""" - if pos <= minimum: - return pos - while pos > minimum: - pos -= 1 - if not isStrSpace(self.src[pos]): - return pos + 1 - return pos - - def skipChars(self, pos: int, code: int) -> int: - """Skip character code from given position.""" - while True: - try: - current = self.srcCharCode[pos] - except IndexError: - break - if current != code: - break - pos += 1 - return pos - - def skipCharsStr(self, pos: int, ch: str) -> int: - """Skip character string from given position.""" - while True: - try: - current = self.src[pos] - except IndexError: - break - if current != ch: - break - pos += 1 - return pos - - def skipCharsBack(self, pos: int, code: int, minimum: int) -> int: - """Skip character code reverse from given position - 1.""" - if pos <= minimum: - return pos - while pos > minimum: - pos -= 1 - if code != self.srcCharCode[pos]: - return pos + 1 - return pos - - def skipCharsStrBack(self, pos: int, ch: str, minimum: int) -> int: - """Skip character string reverse from given position - 1.""" - if pos <= minimum: - return pos - while pos > minimum: - pos -= 1 - if ch != self.src[pos]: - return pos + 1 - return pos - - def getLines(self, begin: int, end: int, indent: int, keepLastLF: bool) -> str: - """Cut lines range from source.""" - line = begin - if begin >= end: - return "" - - queue = [""] * (end - begin) - - i = 1 - while line < end: - lineIndent = 0 - lineStart = first = self.bMarks[line] - last = ( - self.eMarks[line] + 1 - if line + 1 < end or keepLastLF - else self.eMarks[line] - ) - - while (first < last) and (lineIndent < indent): - ch = self.src[first] - if isStrSpace(ch): - if ch == "\t": - lineIndent += 4 - (lineIndent + self.bsCount[line]) % 4 - else: - lineIndent += 1 - elif first - lineStart < self.tShift[line]: - lineIndent += 1 - else: - break - first += 1 - - if lineIndent > indent: - # partially expanding tabs in code blocks, e.g '\t\tfoobar' - # with indent=2 becomes ' \tfoobar' - queue[i - 1] = (" " * (lineIndent - indent)) + self.src[first:last] - else: - queue[i - 1] = self.src[first:last] - - line += 1 - i += 1 - - return "".join(queue) - - def is_code_block(self, line: int) -> bool: - """Check if line is a code block, - i.e. the code block rule is enabled and text is indented by more than 3 spaces. - """ - return self._code_enabled and (self.sCount[line] - self.blkIndent) >= 4 diff --git a/voxvera/vendor/markdown_it/rules_block/table.py b/voxvera/vendor/markdown_it/rules_block/table.py deleted file mode 100644 index c52553d..0000000 --- a/voxvera/vendor/markdown_it/rules_block/table.py +++ /dev/null @@ -1,250 +0,0 @@ -# GFM table, https://github.github.com/gfm/#tables-extension- -from __future__ import annotations - -import re - -from ..common.utils import charStrAt, isStrSpace -from .state_block import StateBlock - -headerLineRe = re.compile(r"^:?-+:?$") -enclosingPipesRe = re.compile(r"^\||\|$") - -# Limit the amount of empty autocompleted cells in a table, -# see https://github.com/markdown-it/markdown-it/issues/1000, -# Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k. -# We set it to 65k, which can expand user input by a factor of x370 -# (256x256 square is 1.8kB expanded into 650kB). -MAX_AUTOCOMPLETED_CELLS = 0x10000 - - -def getLine(state: StateBlock, line: int) -> str: - pos = state.bMarks[line] + state.tShift[line] - maximum = state.eMarks[line] - - # return state.src.substr(pos, max - pos) - return state.src[pos:maximum] - - -def escapedSplit(string: str) -> list[str]: - result: list[str] = [] - pos = 0 - max = len(string) - isEscaped = False - lastPos = 0 - current = "" - ch = charStrAt(string, pos) - - while pos < max: - if ch == "|": - if not isEscaped: - # pipe separating cells, '|' - result.append(current + string[lastPos:pos]) - current = "" - lastPos = pos + 1 - else: - # escaped pipe, '\|' - current += string[lastPos : pos - 1] - lastPos = pos - - isEscaped = ch == "\\" - pos += 1 - - ch = charStrAt(string, pos) - - result.append(current + string[lastPos:]) - - return result - - -def table(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: - tbodyLines = None - - # should have at least two lines - if startLine + 2 > endLine: - return False - - nextLine = startLine + 1 - - if state.sCount[nextLine] < state.blkIndent: - return False - - if state.is_code_block(nextLine): - return False - - # first character of the second line should be '|', '-', ':', - # and no other characters are allowed but spaces; - # basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp - - pos = state.bMarks[nextLine] + state.tShift[nextLine] - if pos >= state.eMarks[nextLine]: - return False - first_ch = state.src[pos] - pos += 1 - if first_ch not in ("|", "-", ":"): - return False - - if pos >= state.eMarks[nextLine]: - return False - second_ch = state.src[pos] - pos += 1 - if second_ch not in ("|", "-", ":") and not isStrSpace(second_ch): - return False - - # if first character is '-', then second character must not be a space - # (due to parsing ambiguity with list) - if first_ch == "-" and isStrSpace(second_ch): - return False - - while pos < state.eMarks[nextLine]: - ch = state.src[pos] - - if ch not in ("|", "-", ":") and not isStrSpace(ch): - return False - - pos += 1 - - lineText = getLine(state, startLine + 1) - - columns = lineText.split("|") - aligns = [] - for i in range(len(columns)): - t = columns[i].strip() - if not t: - # allow empty columns before and after table, but not in between columns; - # e.g. allow ` |---| `, disallow ` ---||--- ` - if i == 0 or i == len(columns) - 1: - continue - else: - return False - - if not headerLineRe.search(t): - return False - if charStrAt(t, len(t) - 1) == ":": - aligns.append("center" if charStrAt(t, 0) == ":" else "right") - elif charStrAt(t, 0) == ":": - aligns.append("left") - else: - aligns.append("") - - lineText = getLine(state, startLine).strip() - if "|" not in lineText: - return False - if state.is_code_block(startLine): - return False - columns = escapedSplit(lineText) - if columns and columns[0] == "": - columns.pop(0) - if columns and columns[-1] == "": - columns.pop() - - # header row will define an amount of columns in the entire table, - # and align row should be exactly the same (the rest of the rows can differ) - columnCount = len(columns) - if columnCount == 0 or columnCount != len(aligns): - return False - - if silent: - return True - - oldParentType = state.parentType - state.parentType = "table" - - # use 'blockquote' lists for termination because it's - # the most similar to tables - terminatorRules = state.md.block.ruler.getRules("blockquote") - - token = state.push("table_open", "table", 1) - token.map = tableLines = [startLine, 0] - - token = state.push("thead_open", "thead", 1) - token.map = [startLine, startLine + 1] - - token = state.push("tr_open", "tr", 1) - token.map = [startLine, startLine + 1] - - for i in range(len(columns)): - token = state.push("th_open", "th", 1) - if aligns[i]: - token.attrs = {"style": "text-align:" + aligns[i]} - - token = state.push("inline", "", 0) - # note in markdown-it this map was removed in v12.0.0 however, we keep it, - # since it is helpful to propagate to children tokens - token.map = [startLine, startLine + 1] - token.content = columns[i].strip() - token.children = [] - - token = state.push("th_close", "th", -1) - - token = state.push("tr_close", "tr", -1) - token = state.push("thead_close", "thead", -1) - - autocompleted_cells = 0 - nextLine = startLine + 2 - while nextLine < endLine: - if state.sCount[nextLine] < state.blkIndent: - break - - terminate = False - for i in range(len(terminatorRules)): - if terminatorRules[i](state, nextLine, endLine, True): - terminate = True - break - - if terminate: - break - lineText = getLine(state, nextLine).strip() - if not lineText: - break - if state.is_code_block(nextLine): - break - columns = escapedSplit(lineText) - if columns and columns[0] == "": - columns.pop(0) - if columns and columns[-1] == "": - columns.pop() - - # note: autocomplete count can be negative if user specifies more columns than header, - # but that does not affect intended use (which is limiting expansion) - autocompleted_cells += columnCount - len(columns) - if autocompleted_cells > MAX_AUTOCOMPLETED_CELLS: - break - - if nextLine == startLine + 2: - token = state.push("tbody_open", "tbody", 1) - token.map = tbodyLines = [startLine + 2, 0] - - token = state.push("tr_open", "tr", 1) - token.map = [nextLine, nextLine + 1] - - for i in range(columnCount): - token = state.push("td_open", "td", 1) - if aligns[i]: - token.attrs = {"style": "text-align:" + aligns[i]} - - token = state.push("inline", "", 0) - # note in markdown-it this map was removed in v12.0.0 however, we keep it, - # since it is helpful to propagate to children tokens - token.map = [nextLine, nextLine + 1] - try: - token.content = columns[i].strip() if columns[i] else "" - except IndexError: - token.content = "" - token.children = [] - - token = state.push("td_close", "td", -1) - - token = state.push("tr_close", "tr", -1) - - nextLine += 1 - - if tbodyLines: - token = state.push("tbody_close", "tbody", -1) - tbodyLines[1] = nextLine - - token = state.push("table_close", "table", -1) - - tableLines[1] = nextLine - state.parentType = oldParentType - state.line = nextLine - return True diff --git a/voxvera/vendor/markdown_it/rules_core/__init__.py b/voxvera/vendor/markdown_it/rules_core/__init__.py deleted file mode 100644 index e7d7753..0000000 --- a/voxvera/vendor/markdown_it/rules_core/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -__all__ = ( - "StateCore", - "block", - "inline", - "linkify", - "normalize", - "replace", - "smartquotes", - "text_join", -) - -from .block import block -from .inline import inline -from .linkify import linkify -from .normalize import normalize -from .replacements import replace -from .smartquotes import smartquotes -from .state_core import StateCore -from .text_join import text_join diff --git a/voxvera/vendor/markdown_it/rules_core/block.py b/voxvera/vendor/markdown_it/rules_core/block.py deleted file mode 100644 index a6c3bb8..0000000 --- a/voxvera/vendor/markdown_it/rules_core/block.py +++ /dev/null @@ -1,13 +0,0 @@ -from ..token import Token -from .state_core import StateCore - - -def block(state: StateCore) -> None: - if state.inlineMode: - token = Token("inline", "", 0) - token.content = state.src - token.map = [0, 1] - token.children = [] - state.tokens.append(token) - else: - state.md.block.parse(state.src, state.md, state.env, state.tokens) diff --git a/voxvera/vendor/markdown_it/rules_core/inline.py b/voxvera/vendor/markdown_it/rules_core/inline.py deleted file mode 100644 index c3fd0b5..0000000 --- a/voxvera/vendor/markdown_it/rules_core/inline.py +++ /dev/null @@ -1,10 +0,0 @@ -from .state_core import StateCore - - -def inline(state: StateCore) -> None: - """Parse inlines""" - for token in state.tokens: - if token.type == "inline": - if token.children is None: - token.children = [] - state.md.inline.parse(token.content, state.md, state.env, token.children) diff --git a/voxvera/vendor/markdown_it/rules_core/linkify.py b/voxvera/vendor/markdown_it/rules_core/linkify.py deleted file mode 100644 index efbc9d4..0000000 --- a/voxvera/vendor/markdown_it/rules_core/linkify.py +++ /dev/null @@ -1,149 +0,0 @@ -from __future__ import annotations - -import re -from typing import Protocol - -from ..common.utils import arrayReplaceAt, isLinkClose, isLinkOpen -from ..token import Token -from .state_core import StateCore - -HTTP_RE = re.compile(r"^http://") -MAILTO_RE = re.compile(r"^mailto:") -TEST_MAILTO_RE = re.compile(r"^mailto:", flags=re.IGNORECASE) - - -def linkify(state: StateCore) -> None: - """Rule for identifying plain-text links.""" - if not state.md.options.linkify: - return - - if not state.md.linkify: - raise ModuleNotFoundError("Linkify enabled but not installed.") - - for inline_token in state.tokens: - if inline_token.type != "inline" or not state.md.linkify.pretest( - inline_token.content - ): - continue - - tokens = inline_token.children - - htmlLinkLevel = 0 - - # We scan from the end, to keep position when new tags added. - # Use reversed logic in links start/end match - assert tokens is not None - i = len(tokens) - while i >= 1: - i -= 1 - assert isinstance(tokens, list) - currentToken = tokens[i] - - # Skip content of markdown links - if currentToken.type == "link_close": - i -= 1 - while ( - tokens[i].level != currentToken.level - and tokens[i].type != "link_open" - ): - i -= 1 - continue - - # Skip content of html tag links - if currentToken.type == "html_inline": - if isLinkOpen(currentToken.content) and htmlLinkLevel > 0: - htmlLinkLevel -= 1 - if isLinkClose(currentToken.content): - htmlLinkLevel += 1 - if htmlLinkLevel > 0: - continue - - if currentToken.type == "text" and state.md.linkify.test( - currentToken.content - ): - text = currentToken.content - links: list[_LinkType] = state.md.linkify.match(text) or [] - - # Now split string to nodes - nodes = [] - level = currentToken.level - lastPos = 0 - - # forbid escape sequence at the start of the string, - # this avoids http\://example.com/ from being linkified as - # http://example.com/ - if ( - links - and links[0].index == 0 - and i > 0 - and tokens[i - 1].type == "text_special" - ): - links = links[1:] - - for link in links: - url = link.url - fullUrl = state.md.normalizeLink(url) - if not state.md.validateLink(fullUrl): - continue - - urlText = link.text - - # Linkifier might send raw hostnames like "example.com", where url - # starts with domain name. So we prepend http:// in those cases, - # and remove it afterwards. - if not link.schema: - urlText = HTTP_RE.sub( - "", state.md.normalizeLinkText("http://" + urlText) - ) - elif link.schema == "mailto:" and TEST_MAILTO_RE.search(urlText): - urlText = MAILTO_RE.sub( - "", state.md.normalizeLinkText("mailto:" + urlText) - ) - else: - urlText = state.md.normalizeLinkText(urlText) - - pos = link.index - - if pos > lastPos: - token = Token("text", "", 0) - token.content = text[lastPos:pos] - token.level = level - nodes.append(token) - - token = Token("link_open", "a", 1) - token.attrs = {"href": fullUrl} - token.level = level - level += 1 - token.markup = "linkify" - token.info = "auto" - nodes.append(token) - - token = Token("text", "", 0) - token.content = urlText - token.level = level - nodes.append(token) - - token = Token("link_close", "a", -1) - level -= 1 - token.level = level - token.markup = "linkify" - token.info = "auto" - nodes.append(token) - - lastPos = link.last_index - - if lastPos < len(text): - token = Token("text", "", 0) - token.content = text[lastPos:] - token.level = level - nodes.append(token) - - inline_token.children = tokens = arrayReplaceAt(tokens, i, nodes) - - -class _LinkType(Protocol): - url: str - text: str - index: int - last_index: int - schema: str | None diff --git a/voxvera/vendor/markdown_it/rules_core/normalize.py b/voxvera/vendor/markdown_it/rules_core/normalize.py deleted file mode 100644 index 3243924..0000000 --- a/voxvera/vendor/markdown_it/rules_core/normalize.py +++ /dev/null @@ -1,19 +0,0 @@ -"""Normalize input string.""" - -import re - -from .state_core import StateCore - -# https://spec.commonmark.org/0.29/#line-ending -NEWLINES_RE = re.compile(r"\r\n?|\n") -NULL_RE = re.compile(r"\0") - - -def normalize(state: StateCore) -> None: - # Normalize newlines - string = NEWLINES_RE.sub("\n", state.src) - - # Replace NULL characters - string = NULL_RE.sub("\ufffd", string) - - state.src = string diff --git a/voxvera/vendor/markdown_it/rules_core/replacements.py b/voxvera/vendor/markdown_it/rules_core/replacements.py deleted file mode 100644 index bcc9980..0000000 --- a/voxvera/vendor/markdown_it/rules_core/replacements.py +++ /dev/null @@ -1,127 +0,0 @@ -"""Simple typographic replacements - -* ``(c)``, ``(C)`` → © -* ``(tm)``, ``(TM)`` → ™ -* ``(r)``, ``(R)`` → ® -* ``+-`` → ± -* ``...`` → … -* ``?....`` → ?.. -* ``!....`` → !.. -* ``????????`` → ??? -* ``!!!!!`` → !!! -* ``,,,`` → , -* ``--`` → &ndash -* ``---`` → &mdash -""" - -from __future__ import annotations - -import logging -import re - -from ..token import Token -from .state_core import StateCore - -LOGGER = logging.getLogger(__name__) - -# TODO: -# - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾ -# - multiplication 2 x 4 -> 2 × 4 - -RARE_RE = re.compile(r"\+-|\.\.|\?\?\?\?|!!!!|,,|--") - -# Workaround for phantomjs - need regex without /g flag, -# or root check will fail every second time -# SCOPED_ABBR_TEST_RE = r"\((c|tm|r)\)" - -SCOPED_ABBR_RE = re.compile(r"\((c|tm|r)\)", flags=re.IGNORECASE) - -PLUS_MINUS_RE = re.compile(r"\+-") - -ELLIPSIS_RE = re.compile(r"\.{2,}") - -ELLIPSIS_QUESTION_EXCLAMATION_RE = re.compile(r"([?!])…") - -QUESTION_EXCLAMATION_RE = re.compile(r"([?!]){4,}") - -COMMA_RE = re.compile(r",{2,}") - -EM_DASH_RE = re.compile(r"(^|[^-])---(?=[^-]|$)", flags=re.MULTILINE) - -EN_DASH_RE = re.compile(r"(^|\s)--(?=\s|$)", flags=re.MULTILINE) - -EN_DASH_INDENT_RE = re.compile(r"(^|[^-\s])--(?=[^-\s]|$)", flags=re.MULTILINE) - - -SCOPED_ABBR = {"c": "©", "r": "®", "tm": "™"} - - -def replaceFn(match: re.Match[str]) -> str: - return SCOPED_ABBR[match.group(1).lower()] - - -def replace_scoped(inlineTokens: list[Token]) -> None: - inside_autolink = 0 - - for token in inlineTokens: - if token.type == "text" and not inside_autolink: - token.content = SCOPED_ABBR_RE.sub(replaceFn, token.content) - - if token.type == "link_open" and token.info == "auto": - inside_autolink -= 1 - - if token.type == "link_close" and token.info == "auto": - inside_autolink += 1 - - -def replace_rare(inlineTokens: list[Token]) -> None: - inside_autolink = 0 - - for token in inlineTokens: - if ( - token.type == "text" - and (not inside_autolink) - and RARE_RE.search(token.content) - ): - # +- -> ± - token.content = PLUS_MINUS_RE.sub("±", token.content) - - # .., ..., ....... -> … - token.content = ELLIPSIS_RE.sub("…", token.content) - - # but ?..... & !..... -> ?.. & !.. - token.content = ELLIPSIS_QUESTION_EXCLAMATION_RE.sub("\\1..", token.content) - token.content = QUESTION_EXCLAMATION_RE.sub("\\1\\1\\1", token.content) - - # ,, ,,, ,,,, -> , - token.content = COMMA_RE.sub(",", token.content) - - # em-dash - token.content = EM_DASH_RE.sub("\\1\u2014", token.content) - - # en-dash - token.content = EN_DASH_RE.sub("\\1\u2013", token.content) - token.content = EN_DASH_INDENT_RE.sub("\\1\u2013", token.content) - - if token.type == "link_open" and token.info == "auto": - inside_autolink -= 1 - - if token.type == "link_close" and token.info == "auto": - inside_autolink += 1 - - -def replace(state: StateCore) -> None: - if not state.md.options.typographer: - return - - for token in state.tokens: - if token.type != "inline": - continue - if token.children is None: - continue - - if SCOPED_ABBR_RE.search(token.content): - replace_scoped(token.children) - - if RARE_RE.search(token.content): - replace_rare(token.children) diff --git a/voxvera/vendor/markdown_it/rules_core/smartquotes.py b/voxvera/vendor/markdown_it/rules_core/smartquotes.py deleted file mode 100644 index f9b8b45..0000000 --- a/voxvera/vendor/markdown_it/rules_core/smartquotes.py +++ /dev/null @@ -1,202 +0,0 @@ -"""Convert straight quotation marks to typographic ones""" - -from __future__ import annotations - -import re -from typing import Any - -from ..common.utils import charCodeAt, isMdAsciiPunct, isPunctChar, isWhiteSpace -from ..token import Token -from .state_core import StateCore - -QUOTE_TEST_RE = re.compile(r"['\"]") -QUOTE_RE = re.compile(r"['\"]") -APOSTROPHE = "\u2019" # ’ - - -def replaceAt(string: str, index: int, ch: str) -> str: - # When the index is negative, the behavior is different from the js version. - # But basically, the index will not be negative. - assert index >= 0 - return string[:index] + ch + string[index + 1 :] - - -def process_inlines(tokens: list[Token], state: StateCore) -> None: - stack: list[dict[str, Any]] = [] - - for i, token in enumerate(tokens): - thisLevel = token.level - - j = 0 - for j in range(len(stack))[::-1]: - if stack[j]["level"] <= thisLevel: - break - else: - # When the loop is terminated without a "break". - # Subtract 1 to get the same index as the js version. - j -= 1 - - stack = stack[: j + 1] - - if token.type != "text": - continue - - text = token.content - pos = 0 - maximum = len(text) - - while pos < maximum: - goto_outer = False - lastIndex = pos - t = QUOTE_RE.search(text[lastIndex:]) - if not t: - break - - canOpen = canClose = True - pos = t.start(0) + lastIndex + 1 - isSingle = t.group(0) == "'" - - # Find previous character, - # default to space if it's the beginning of the line - lastChar: None | int = 0x20 - - if t.start(0) + lastIndex - 1 >= 0: - lastChar = charCodeAt(text, t.start(0) + lastIndex - 1) - else: - for j in range(i)[::-1]: - if tokens[j].type == "softbreak" or tokens[j].type == "hardbreak": - break - # should skip all tokens except 'text', 'html_inline' or 'code_inline' - if not tokens[j].content: - continue - - lastChar = charCodeAt(tokens[j].content, len(tokens[j].content) - 1) - break - - # Find next character, - # default to space if it's the end of the line - nextChar: None | int = 0x20 - - if pos < maximum: - nextChar = charCodeAt(text, pos) - else: - for j in range(i + 1, len(tokens)): - # nextChar defaults to 0x20 - if tokens[j].type == "softbreak" or tokens[j].type == "hardbreak": - break - # should skip all tokens except 'text', 'html_inline' or 'code_inline' - if not tokens[j].content: - continue - - nextChar = charCodeAt(tokens[j].content, 0) - break - - isLastPunctChar = lastChar is not None and ( - isMdAsciiPunct(lastChar) or isPunctChar(chr(lastChar)) - ) - isNextPunctChar = nextChar is not None and ( - isMdAsciiPunct(nextChar) or isPunctChar(chr(nextChar)) - ) - - isLastWhiteSpace = lastChar is not None and isWhiteSpace(lastChar) - isNextWhiteSpace = nextChar is not None and isWhiteSpace(nextChar) - - if isNextWhiteSpace: # noqa: SIM114 - canOpen = False - elif isNextPunctChar and not (isLastWhiteSpace or isLastPunctChar): - canOpen = False - - if isLastWhiteSpace: # noqa: SIM114 - canClose = False - elif isLastPunctChar and not (isNextWhiteSpace or isNextPunctChar): - canClose = False - - if nextChar == 0x22 and t.group(0) == '"': # 0x22: " # noqa: SIM102 - if ( - lastChar is not None and lastChar >= 0x30 and lastChar <= 0x39 - ): # 0x30: 0, 0x39: 9 - # special case: 1"" - count first quote as an inch - canClose = canOpen = False - - if canOpen and canClose: - # Replace quotes in the middle of punctuation sequence, but not - # in the middle of the words, i.e.: - # - # 1. foo " bar " baz - not replaced - # 2. foo-"-bar-"-baz - replaced - # 3. foo"bar"baz - not replaced - canOpen = isLastPunctChar - canClose = isNextPunctChar - - if not canOpen and not canClose: - # middle of word - if isSingle: - token.content = replaceAt( - token.content, t.start(0) + lastIndex, APOSTROPHE - ) - continue - - if canClose: - # this could be a closing quote, rewind the stack to get a match - for j in range(len(stack))[::-1]: - item = stack[j] - if stack[j]["level"] < thisLevel: - break - if item["single"] == isSingle and stack[j]["level"] == thisLevel: - item = stack[j] - - if isSingle: - openQuote = state.md.options.quotes[2] - closeQuote = state.md.options.quotes[3] - else: - openQuote = state.md.options.quotes[0] - closeQuote = state.md.options.quotes[1] - - # replace token.content *before* tokens[item.token].content, - # because, if they are pointing at the same token, replaceAt - # could mess up indices when quote length != 1 - token.content = replaceAt( - token.content, t.start(0) + lastIndex, closeQuote - ) - tokens[item["token"]].content = replaceAt( - tokens[item["token"]].content, item["pos"], openQuote - ) - - pos += len(closeQuote) - 1 - if item["token"] == i: - pos += len(openQuote) - 1 - - text = token.content - maximum = len(text) - - stack = stack[:j] - goto_outer = True - break - if goto_outer: - goto_outer = False - continue - - if canOpen: - stack.append( - { - "token": i, - "pos": t.start(0) + lastIndex, - "single": isSingle, - "level": thisLevel, - } - ) - elif canClose and isSingle: - token.content = replaceAt( - token.content, t.start(0) + lastIndex, APOSTROPHE - ) - - -def smartquotes(state: StateCore) -> None: - if not state.md.options.typographer: - return - - for token in state.tokens: - if token.type != "inline" or not QUOTE_RE.search(token.content): - continue - if token.children is not None: - process_inlines(token.children, state) diff --git a/voxvera/vendor/markdown_it/rules_core/state_core.py b/voxvera/vendor/markdown_it/rules_core/state_core.py deleted file mode 100644 index a938041..0000000 --- a/voxvera/vendor/markdown_it/rules_core/state_core.py +++ /dev/null @@ -1,25 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING - -from ..ruler import StateBase -from ..token import Token -from ..utils import EnvType - -if TYPE_CHECKING: - from markdown_it import MarkdownIt - - -class StateCore(StateBase): - def __init__( - self, - src: str, - md: MarkdownIt, - env: EnvType, - tokens: list[Token] | None = None, - ) -> None: - self.src = src - self.md = md # link to parser instance - self.env = env - self.tokens: list[Token] = tokens or [] - self.inlineMode = False diff --git a/voxvera/vendor/markdown_it/rules_core/text_join.py b/voxvera/vendor/markdown_it/rules_core/text_join.py deleted file mode 100644 index 5379f6d..0000000 --- a/voxvera/vendor/markdown_it/rules_core/text_join.py +++ /dev/null @@ -1,35 +0,0 @@ -"""Join raw text tokens with the rest of the text - -This is set as a separate rule to provide an opportunity for plugins -to run text replacements after text join, but before escape join. - -For example, `\\:)` shouldn't be replaced with an emoji. -""" - -from __future__ import annotations - -from ..token import Token -from .state_core import StateCore - - -def text_join(state: StateCore) -> None: - """Join raw text for escape sequences (`text_special`) tokens with the rest of the text""" - - for inline_token in state.tokens[:]: - if inline_token.type != "inline": - continue - - # convert text_special to text and join all adjacent text nodes - new_tokens: list[Token] = [] - for child_token in inline_token.children or []: - if child_token.type == "text_special": - child_token.type = "text" - if ( - child_token.type == "text" - and new_tokens - and new_tokens[-1].type == "text" - ): - new_tokens[-1].content += child_token.content - else: - new_tokens.append(child_token) - inline_token.children = new_tokens diff --git a/voxvera/vendor/markdown_it/rules_inline/__init__.py b/voxvera/vendor/markdown_it/rules_inline/__init__.py deleted file mode 100644 index d82ef8f..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -__all__ = ( - "StateInline", - "autolink", - "backtick", - "emphasis", - "entity", - "escape", - "fragments_join", - "html_inline", - "image", - "link", - "link_pairs", - "linkify", - "newline", - "strikethrough", - "text", -) -from . import emphasis, strikethrough -from .autolink import autolink -from .backticks import backtick -from .balance_pairs import link_pairs -from .entity import entity -from .escape import escape -from .fragments_join import fragments_join -from .html_inline import html_inline -from .image import image -from .link import link -from .linkify import linkify -from .newline import newline -from .state_inline import StateInline -from .text import text diff --git a/voxvera/vendor/markdown_it/rules_inline/autolink.py b/voxvera/vendor/markdown_it/rules_inline/autolink.py deleted file mode 100644 index 6546e25..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/autolink.py +++ /dev/null @@ -1,77 +0,0 @@ -# Process autolinks '' -import re - -from .state_inline import StateInline - -EMAIL_RE = re.compile( - r"^([a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$" -) -AUTOLINK_RE = re.compile(r"^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$") - - -def autolink(state: StateInline, silent: bool) -> bool: - pos = state.pos - - if state.src[pos] != "<": - return False - - start = state.pos - maximum = state.posMax - - while True: - pos += 1 - if pos >= maximum: - return False - - ch = state.src[pos] - - if ch == "<": - return False - if ch == ">": - break - - url = state.src[start + 1 : pos] - - if AUTOLINK_RE.search(url) is not None: - fullUrl = state.md.normalizeLink(url) - if not state.md.validateLink(fullUrl): - return False - - if not silent: - token = state.push("link_open", "a", 1) - token.attrs = {"href": fullUrl} - token.markup = "autolink" - token.info = "auto" - - token = state.push("text", "", 0) - token.content = state.md.normalizeLinkText(url) - - token = state.push("link_close", "a", -1) - token.markup = "autolink" - token.info = "auto" - - state.pos += len(url) + 2 - return True - - if EMAIL_RE.search(url) is not None: - fullUrl = state.md.normalizeLink("mailto:" + url) - if not state.md.validateLink(fullUrl): - return False - - if not silent: - token = state.push("link_open", "a", 1) - token.attrs = {"href": fullUrl} - token.markup = "autolink" - token.info = "auto" - - token = state.push("text", "", 0) - token.content = state.md.normalizeLinkText(url) - - token = state.push("link_close", "a", -1) - token.markup = "autolink" - token.info = "auto" - - state.pos += len(url) + 2 - return True - - return False diff --git a/voxvera/vendor/markdown_it/rules_inline/backticks.py b/voxvera/vendor/markdown_it/rules_inline/backticks.py deleted file mode 100644 index fc60d6b..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/backticks.py +++ /dev/null @@ -1,72 +0,0 @@ -# Parse backticks -import re - -from .state_inline import StateInline - -regex = re.compile("^ (.+) $") - - -def backtick(state: StateInline, silent: bool) -> bool: - pos = state.pos - - if state.src[pos] != "`": - return False - - start = pos - pos += 1 - maximum = state.posMax - - # scan marker length - while pos < maximum and (state.src[pos] == "`"): - pos += 1 - - marker = state.src[start:pos] - openerLength = len(marker) - - if state.backticksScanned and state.backticks.get(openerLength, 0) <= start: - if not silent: - state.pending += marker - state.pos += openerLength - return True - - matchStart = matchEnd = pos - - # Nothing found in the cache, scan until the end of the line (or until marker is found) - while True: - try: - matchStart = state.src.index("`", matchEnd) - except ValueError: - break - matchEnd = matchStart + 1 - - # scan marker length - while matchEnd < maximum and (state.src[matchEnd] == "`"): - matchEnd += 1 - - closerLength = matchEnd - matchStart - - if closerLength == openerLength: - # Found matching closer length. - if not silent: - token = state.push("code_inline", "code", 0) - token.markup = marker - token.content = state.src[pos:matchStart].replace("\n", " ") - if ( - token.content.startswith(" ") - and token.content.endswith(" ") - and len(token.content.strip()) > 0 - ): - token.content = token.content[1:-1] - state.pos = matchEnd - return True - - # Some different length found, put it in cache as upper limit of where closer can be found - state.backticks[closerLength] = matchStart - - # Scanned through the end, didn't find anything - state.backticksScanned = True - - if not silent: - state.pending += marker - state.pos += openerLength - return True diff --git a/voxvera/vendor/markdown_it/rules_inline/balance_pairs.py b/voxvera/vendor/markdown_it/rules_inline/balance_pairs.py deleted file mode 100644 index 9c63b27..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/balance_pairs.py +++ /dev/null @@ -1,138 +0,0 @@ -"""Balance paired characters (*, _, etc) in inline tokens.""" - -from __future__ import annotations - -from .state_inline import Delimiter, StateInline - - -def processDelimiters(state: StateInline, delimiters: list[Delimiter]) -> None: - """For each opening emphasis-like marker find a matching closing one.""" - if not delimiters: - return - - openersBottom = {} - maximum = len(delimiters) - - # headerIdx is the first delimiter of the current (where closer is) delimiter run - headerIdx = 0 - lastTokenIdx = -2 # needs any value lower than -1 - jumps: list[int] = [] - closerIdx = 0 - while closerIdx < maximum: - closer = delimiters[closerIdx] - - jumps.append(0) - - # markers belong to same delimiter run if: - # - they have adjacent tokens - # - AND markers are the same - # - if ( - delimiters[headerIdx].marker != closer.marker - or lastTokenIdx != closer.token - 1 - ): - headerIdx = closerIdx - lastTokenIdx = closer.token - - # Length is only used for emphasis-specific "rule of 3", - # if it's not defined (in strikethrough or 3rd party plugins), - # we can default it to 0 to disable those checks. - # - closer.length = closer.length or 0 - - if not closer.close: - closerIdx += 1 - continue - - # Previously calculated lower bounds (previous fails) - # for each marker, each delimiter length modulo 3, - # and for whether this closer can be an opener; - # https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460 - if closer.marker not in openersBottom: - openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1] - - minOpenerIdx = openersBottom[closer.marker][ - (3 if closer.open else 0) + (closer.length % 3) - ] - - openerIdx = headerIdx - jumps[headerIdx] - 1 - - newMinOpenerIdx = openerIdx - - while openerIdx > minOpenerIdx: - opener = delimiters[openerIdx] - - if opener.marker != closer.marker: - openerIdx -= jumps[openerIdx] + 1 - continue - - if opener.open and opener.end < 0: - isOddMatch = False - - # from spec: - # - # If one of the delimiters can both open and close emphasis, then the - # sum of the lengths of the delimiter runs containing the opening and - # closing delimiters must not be a multiple of 3 unless both lengths - # are multiples of 3. - # - if ( - (opener.close or closer.open) - and ((opener.length + closer.length) % 3 == 0) - and (opener.length % 3 != 0 or closer.length % 3 != 0) - ): - isOddMatch = True - - if not isOddMatch: - # If previous delimiter cannot be an opener, we can safely skip - # the entire sequence in future checks. This is required to make - # sure algorithm has linear complexity (see *_*_*_*_*_... case). - # - if openerIdx > 0 and not delimiters[openerIdx - 1].open: - lastJump = jumps[openerIdx - 1] + 1 - else: - lastJump = 0 - - jumps[closerIdx] = closerIdx - openerIdx + lastJump - jumps[openerIdx] = lastJump - - closer.open = False - opener.end = closerIdx - opener.close = False - newMinOpenerIdx = -1 - - # treat next token as start of run, - # it optimizes skips in **<...>**a**<...>** pathological case - lastTokenIdx = -2 - - break - - openerIdx -= jumps[openerIdx] + 1 - - if newMinOpenerIdx != -1: - # If match for this delimiter run failed, we want to set lower bound for - # future lookups. This is required to make sure algorithm has linear - # complexity. - # - # See details here: - # https:#github.com/commonmark/cmark/issues/178#issuecomment-270417442 - # - openersBottom[closer.marker][ - (3 if closer.open else 0) + ((closer.length or 0) % 3) - ] = newMinOpenerIdx - - closerIdx += 1 - - -def link_pairs(state: StateInline) -> None: - tokens_meta = state.tokens_meta - maximum = len(state.tokens_meta) - - processDelimiters(state, state.delimiters) - - curr = 0 - while curr < maximum: - curr_meta = tokens_meta[curr] - if curr_meta and "delimiters" in curr_meta: - processDelimiters(state, curr_meta["delimiters"]) - curr += 1 diff --git a/voxvera/vendor/markdown_it/rules_inline/emphasis.py b/voxvera/vendor/markdown_it/rules_inline/emphasis.py deleted file mode 100644 index 9a98f9e..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/emphasis.py +++ /dev/null @@ -1,102 +0,0 @@ -# Process *this* and _that_ -# -from __future__ import annotations - -from .state_inline import Delimiter, StateInline - - -def tokenize(state: StateInline, silent: bool) -> bool: - """Insert each marker as a separate text token, and add it to delimiter list""" - start = state.pos - marker = state.src[start] - - if silent: - return False - - if marker not in ("_", "*"): - return False - - scanned = state.scanDelims(state.pos, marker == "*") - - for _ in range(scanned.length): - token = state.push("text", "", 0) - token.content = marker - state.delimiters.append( - Delimiter( - marker=ord(marker), - length=scanned.length, - token=len(state.tokens) - 1, - end=-1, - open=scanned.can_open, - close=scanned.can_close, - ) - ) - - state.pos += scanned.length - - return True - - -def _postProcess(state: StateInline, delimiters: list[Delimiter]) -> None: - i = len(delimiters) - 1 - while i >= 0: - startDelim = delimiters[i] - - # /* _ */ /* * */ - if startDelim.marker != 0x5F and startDelim.marker != 0x2A: - i -= 1 - continue - - # Process only opening markers - if startDelim.end == -1: - i -= 1 - continue - - endDelim = delimiters[startDelim.end] - - # If the previous delimiter has the same marker and is adjacent to this one, - # merge those into one strong delimiter. - # - # `whatever` -> `whatever` - # - isStrong = ( - i > 0 - and delimiters[i - 1].end == startDelim.end + 1 - # check that first two markers match and adjacent - and delimiters[i - 1].marker == startDelim.marker - and delimiters[i - 1].token == startDelim.token - 1 - # check that last two markers are adjacent (we can safely assume they match) - and delimiters[startDelim.end + 1].token == endDelim.token + 1 - ) - - ch = chr(startDelim.marker) - - token = state.tokens[startDelim.token] - token.type = "strong_open" if isStrong else "em_open" - token.tag = "strong" if isStrong else "em" - token.nesting = 1 - token.markup = ch + ch if isStrong else ch - token.content = "" - - token = state.tokens[endDelim.token] - token.type = "strong_close" if isStrong else "em_close" - token.tag = "strong" if isStrong else "em" - token.nesting = -1 - token.markup = ch + ch if isStrong else ch - token.content = "" - - if isStrong: - state.tokens[delimiters[i - 1].token].content = "" - state.tokens[delimiters[startDelim.end + 1].token].content = "" - i -= 1 - - i -= 1 - - -def postProcess(state: StateInline) -> None: - """Walk through delimiter list and replace text tokens with tags.""" - _postProcess(state, state.delimiters) - - for token in state.tokens_meta: - if token and "delimiters" in token: - _postProcess(state, token["delimiters"]) diff --git a/voxvera/vendor/markdown_it/rules_inline/entity.py b/voxvera/vendor/markdown_it/rules_inline/entity.py deleted file mode 100644 index ec9d396..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/entity.py +++ /dev/null @@ -1,53 +0,0 @@ -# Process html entity - {, ¯, ", ... -import re - -from ..common.entities import entities -from ..common.utils import fromCodePoint, isValidEntityCode -from .state_inline import StateInline - -DIGITAL_RE = re.compile(r"^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));", re.IGNORECASE) -NAMED_RE = re.compile(r"^&([a-z][a-z0-9]{1,31});", re.IGNORECASE) - - -def entity(state: StateInline, silent: bool) -> bool: - pos = state.pos - maximum = state.posMax - - if state.src[pos] != "&": - return False - - if pos + 1 >= maximum: - return False - - if state.src[pos + 1] == "#": - if match := DIGITAL_RE.search(state.src[pos:]): - if not silent: - match1 = match.group(1) - code = ( - int(match1[1:], 16) if match1[0].lower() == "x" else int(match1, 10) - ) - - token = state.push("text_special", "", 0) - token.content = ( - fromCodePoint(code) - if isValidEntityCode(code) - else fromCodePoint(0xFFFD) - ) - token.markup = match.group(0) - token.info = "entity" - - state.pos += len(match.group(0)) - return True - - else: - if (match := NAMED_RE.search(state.src[pos:])) and match.group(1) in entities: - if not silent: - token = state.push("text_special", "", 0) - token.content = entities[match.group(1)] - token.markup = match.group(0) - token.info = "entity" - - state.pos += len(match.group(0)) - return True - - return False diff --git a/voxvera/vendor/markdown_it/rules_inline/escape.py b/voxvera/vendor/markdown_it/rules_inline/escape.py deleted file mode 100644 index 0fca6c8..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/escape.py +++ /dev/null @@ -1,93 +0,0 @@ -""" -Process escaped chars and hardbreaks -""" - -from ..common.utils import isStrSpace -from .state_inline import StateInline - - -def escape(state: StateInline, silent: bool) -> bool: - """Process escaped chars and hardbreaks.""" - pos = state.pos - maximum = state.posMax - - if state.src[pos] != "\\": - return False - - pos += 1 - - # '\' at the end of the inline block - if pos >= maximum: - return False - - ch1 = state.src[pos] - ch1_ord = ord(ch1) - if ch1 == "\n": - if not silent: - state.push("hardbreak", "br", 0) - pos += 1 - # skip leading whitespaces from next line - while pos < maximum: - ch = state.src[pos] - if not isStrSpace(ch): - break - pos += 1 - - state.pos = pos - return True - - escapedStr = state.src[pos] - - if ch1_ord >= 0xD800 and ch1_ord <= 0xDBFF and pos + 1 < maximum: - ch2 = state.src[pos + 1] - ch2_ord = ord(ch2) - if ch2_ord >= 0xDC00 and ch2_ord <= 0xDFFF: - escapedStr += ch2 - pos += 1 - - origStr = "\\" + escapedStr - - if not silent: - token = state.push("text_special", "", 0) - token.content = escapedStr if ch1 in _ESCAPED else origStr - token.markup = origStr - token.info = "escape" - - state.pos = pos + 1 - return True - - -_ESCAPED = { - "!", - '"', - "#", - "$", - "%", - "&", - "'", - "(", - ")", - "*", - "+", - ",", - "-", - ".", - "/", - ":", - ";", - "<", - "=", - ">", - "?", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "|", - "}", - "~", -} diff --git a/voxvera/vendor/markdown_it/rules_inline/fragments_join.py b/voxvera/vendor/markdown_it/rules_inline/fragments_join.py deleted file mode 100644 index f795c13..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/fragments_join.py +++ /dev/null @@ -1,43 +0,0 @@ -from .state_inline import StateInline - - -def fragments_join(state: StateInline) -> None: - """ - Clean up tokens after emphasis and strikethrough postprocessing: - merge adjacent text nodes into one and re-calculate all token levels - - This is necessary because initially emphasis delimiter markers (``*, _, ~``) - are treated as their own separate text tokens. Then emphasis rule either - leaves them as text (needed to merge with adjacent text) or turns them - into opening/closing tags (which messes up levels inside). - """ - level = 0 - maximum = len(state.tokens) - - curr = last = 0 - while curr < maximum: - # re-calculate levels after emphasis/strikethrough turns some text nodes - # into opening/closing tags - if state.tokens[curr].nesting < 0: - level -= 1 # closing tag - state.tokens[curr].level = level - if state.tokens[curr].nesting > 0: - level += 1 # opening tag - - if ( - state.tokens[curr].type == "text" - and curr + 1 < maximum - and state.tokens[curr + 1].type == "text" - ): - # collapse two adjacent text nodes - state.tokens[curr + 1].content = ( - state.tokens[curr].content + state.tokens[curr + 1].content - ) - else: - if curr != last: - state.tokens[last] = state.tokens[curr] - last += 1 - curr += 1 - - if curr != last: - del state.tokens[last:] diff --git a/voxvera/vendor/markdown_it/rules_inline/html_inline.py b/voxvera/vendor/markdown_it/rules_inline/html_inline.py deleted file mode 100644 index 9065e1d..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/html_inline.py +++ /dev/null @@ -1,43 +0,0 @@ -# Process html tags -from ..common.html_re import HTML_TAG_RE -from ..common.utils import isLinkClose, isLinkOpen -from .state_inline import StateInline - - -def isLetter(ch: int) -> bool: - lc = ch | 0x20 # to lower case - # /* a */ and /* z */ - return (lc >= 0x61) and (lc <= 0x7A) - - -def html_inline(state: StateInline, silent: bool) -> bool: - pos = state.pos - - if not state.md.options.get("html", None): - return False - - # Check start - maximum = state.posMax - if state.src[pos] != "<" or pos + 2 >= maximum: - return False - - # Quick fail on second char - ch = state.src[pos + 1] - if ch not in ("!", "?", "/") and not isLetter(ord(ch)): # /* / */ - return False - - match = HTML_TAG_RE.search(state.src[pos:]) - if not match: - return False - - if not silent: - token = state.push("html_inline", "", 0) - token.content = state.src[pos : pos + len(match.group(0))] - - if isLinkOpen(token.content): - state.linkLevel += 1 - if isLinkClose(token.content): - state.linkLevel -= 1 - - state.pos += len(match.group(0)) - return True diff --git a/voxvera/vendor/markdown_it/rules_inline/image.py b/voxvera/vendor/markdown_it/rules_inline/image.py deleted file mode 100644 index 005105b..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/image.py +++ /dev/null @@ -1,148 +0,0 @@ -# Process ![image]( "title") -from __future__ import annotations - -from ..common.utils import isStrSpace, normalizeReference -from ..token import Token -from .state_inline import StateInline - - -def image(state: StateInline, silent: bool) -> bool: - label = None - href = "" - oldPos = state.pos - max = state.posMax - - if state.src[state.pos] != "!": - return False - - if state.pos + 1 < state.posMax and state.src[state.pos + 1] != "[": - return False - - labelStart = state.pos + 2 - labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, False) - - # parser failed to find ']', so it's not a valid link - if labelEnd < 0: - return False - - pos = labelEnd + 1 - - if pos < max and state.src[pos] == "(": - # - # Inline link - # - - # [link]( "title" ) - # ^^ skipping these spaces - pos += 1 - while pos < max: - ch = state.src[pos] - if not isStrSpace(ch) and ch != "\n": - break - pos += 1 - - if pos >= max: - return False - - # [link]( "title" ) - # ^^^^^^ parsing link destination - start = pos - res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax) - if res.ok: - href = state.md.normalizeLink(res.str) - if state.md.validateLink(href): - pos = res.pos - else: - href = "" - - # [link]( "title" ) - # ^^ skipping these spaces - start = pos - while pos < max: - ch = state.src[pos] - if not isStrSpace(ch) and ch != "\n": - break - pos += 1 - - # [link]( "title" ) - # ^^^^^^^ parsing link title - res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax, None) - if pos < max and start != pos and res.ok: - title = res.str - pos = res.pos - - # [link]( "title" ) - # ^^ skipping these spaces - while pos < max: - ch = state.src[pos] - if not isStrSpace(ch) and ch != "\n": - break - pos += 1 - else: - title = "" - - if pos >= max or state.src[pos] != ")": - state.pos = oldPos - return False - - pos += 1 - - else: - # - # Link reference - # - if "references" not in state.env: - return False - - # /* [ */ - if pos < max and state.src[pos] == "[": - start = pos + 1 - pos = state.md.helpers.parseLinkLabel(state, pos) - if pos >= 0: - label = state.src[start:pos] - pos += 1 - else: - pos = labelEnd + 1 - else: - pos = labelEnd + 1 - - # covers label == '' and label == undefined - # (collapsed reference link and shortcut reference link respectively) - if not label: - label = state.src[labelStart:labelEnd] - - label = normalizeReference(label) - - ref = state.env["references"].get(label, None) - if not ref: - state.pos = oldPos - return False - - href = ref["href"] - title = ref["title"] - - # - # We found the end of the link, and know for a fact it's a valid link - # so all that's left to do is to call tokenizer. - # - if not silent: - content = state.src[labelStart:labelEnd] - - tokens: list[Token] = [] - state.md.inline.parse(content, state.md, state.env, tokens) - - token = state.push("image", "img", 0) - token.attrs = {"src": href, "alt": ""} - token.children = tokens or None - token.content = content - - if title: - token.attrSet("title", title) - - # note, this is not part of markdown-it JS, but is useful for renderers - if label and state.md.options.get("store_labels", False): - token.meta["label"] = label - - state.pos = pos - state.posMax = max - return True diff --git a/voxvera/vendor/markdown_it/rules_inline/link.py b/voxvera/vendor/markdown_it/rules_inline/link.py deleted file mode 100644 index 2e92c7d..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/link.py +++ /dev/null @@ -1,149 +0,0 @@ -# Process [link]( "stuff") - -from ..common.utils import isStrSpace, normalizeReference -from .state_inline import StateInline - - -def link(state: StateInline, silent: bool) -> bool: - href = "" - title = "" - label = None - oldPos = state.pos - maximum = state.posMax - start = state.pos - parseReference = True - - if state.src[state.pos] != "[": - return False - - labelStart = state.pos + 1 - labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, True) - - # parser failed to find ']', so it's not a valid link - if labelEnd < 0: - return False - - pos = labelEnd + 1 - - if pos < maximum and state.src[pos] == "(": - # - # Inline link - # - - # might have found a valid shortcut link, disable reference parsing - parseReference = False - - # [link]( "title" ) - # ^^ skipping these spaces - pos += 1 - while pos < maximum: - ch = state.src[pos] - if not isStrSpace(ch) and ch != "\n": - break - pos += 1 - - if pos >= maximum: - return False - - # [link]( "title" ) - # ^^^^^^ parsing link destination - start = pos - res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax) - if res.ok: - href = state.md.normalizeLink(res.str) - if state.md.validateLink(href): - pos = res.pos - else: - href = "" - - # [link]( "title" ) - # ^^ skipping these spaces - start = pos - while pos < maximum: - ch = state.src[pos] - if not isStrSpace(ch) and ch != "\n": - break - pos += 1 - - # [link]( "title" ) - # ^^^^^^^ parsing link title - res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax) - if pos < maximum and start != pos and res.ok: - title = res.str - pos = res.pos - - # [link]( "title" ) - # ^^ skipping these spaces - while pos < maximum: - ch = state.src[pos] - if not isStrSpace(ch) and ch != "\n": - break - pos += 1 - - if pos >= maximum or state.src[pos] != ")": - # parsing a valid shortcut link failed, fallback to reference - parseReference = True - - pos += 1 - - if parseReference: - # - # Link reference - # - if "references" not in state.env: - return False - - if pos < maximum and state.src[pos] == "[": - start = pos + 1 - pos = state.md.helpers.parseLinkLabel(state, pos) - if pos >= 0: - label = state.src[start:pos] - pos += 1 - else: - pos = labelEnd + 1 - - else: - pos = labelEnd + 1 - - # covers label == '' and label == undefined - # (collapsed reference link and shortcut reference link respectively) - if not label: - label = state.src[labelStart:labelEnd] - - label = normalizeReference(label) - - ref = state.env["references"].get(label, None) - if not ref: - state.pos = oldPos - return False - - href = ref["href"] - title = ref["title"] - - # - # We found the end of the link, and know for a fact it's a valid link - # so all that's left to do is to call tokenizer. - # - if not silent: - state.pos = labelStart - state.posMax = labelEnd - - token = state.push("link_open", "a", 1) - token.attrs = {"href": href} - - if title: - token.attrSet("title", title) - - # note, this is not part of markdown-it JS, but is useful for renderers - if label and state.md.options.get("store_labels", False): - token.meta["label"] = label - - state.linkLevel += 1 - state.md.inline.tokenize(state) - state.linkLevel -= 1 - - token = state.push("link_close", "a", -1) - - state.pos = pos - state.posMax = maximum - return True diff --git a/voxvera/vendor/markdown_it/rules_inline/linkify.py b/voxvera/vendor/markdown_it/rules_inline/linkify.py deleted file mode 100644 index 3669396..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/linkify.py +++ /dev/null @@ -1,62 +0,0 @@ -"""Process links like https://example.org/""" - -import re - -from .state_inline import StateInline - -# RFC3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) -SCHEME_RE = re.compile(r"(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$", re.IGNORECASE) - - -def linkify(state: StateInline, silent: bool) -> bool: - """Rule for identifying plain-text links.""" - if not state.md.options.linkify: - return False - if state.linkLevel > 0: - return False - if not state.md.linkify: - raise ModuleNotFoundError("Linkify enabled but not installed.") - - pos = state.pos - maximum = state.posMax - - if ( - (pos + 3) > maximum - or state.src[pos] != ":" - or state.src[pos + 1] != "/" - or state.src[pos + 2] != "/" - ): - return False - - if not (match := SCHEME_RE.search(state.pending)): - return False - - proto = match.group(1) - if not (link := state.md.linkify.match_at_start(state.src[pos - len(proto) :])): - return False - url: str = link.url - - # disallow '*' at the end of the link (conflicts with emphasis) - url = url.rstrip("*") - - full_url = state.md.normalizeLink(url) - if not state.md.validateLink(full_url): - return False - - if not silent: - state.pending = state.pending[: -len(proto)] - - token = state.push("link_open", "a", 1) - token.attrs = {"href": full_url} - token.markup = "linkify" - token.info = "auto" - - token = state.push("text", "", 0) - token.content = state.md.normalizeLinkText(url) - - token = state.push("link_close", "a", -1) - token.markup = "linkify" - token.info = "auto" - - state.pos += len(url) - len(proto) - return True diff --git a/voxvera/vendor/markdown_it/rules_inline/newline.py b/voxvera/vendor/markdown_it/rules_inline/newline.py deleted file mode 100644 index d05ee6d..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/newline.py +++ /dev/null @@ -1,44 +0,0 @@ -"""Proceess '\n'.""" - -from ..common.utils import charStrAt, isStrSpace -from .state_inline import StateInline - - -def newline(state: StateInline, silent: bool) -> bool: - pos = state.pos - - if state.src[pos] != "\n": - return False - - pmax = len(state.pending) - 1 - maximum = state.posMax - - # ' \n' -> hardbreak - # Lookup in pending chars is bad practice! Don't copy to other rules! - # Pending string is stored in concat mode, indexed lookups will cause - # conversion to flat mode. - if not silent: - if pmax >= 0 and charStrAt(state.pending, pmax) == " ": - if pmax >= 1 and charStrAt(state.pending, pmax - 1) == " ": - # Find whitespaces tail of pending chars. - ws = pmax - 1 - while ws >= 1 and charStrAt(state.pending, ws - 1) == " ": - ws -= 1 - state.pending = state.pending[:ws] - - state.push("hardbreak", "br", 0) - else: - state.pending = state.pending[:-1] - state.push("softbreak", "br", 0) - - else: - state.push("softbreak", "br", 0) - - pos += 1 - - # skip heading spaces for next line - while pos < maximum and isStrSpace(state.src[pos]): - pos += 1 - - state.pos = pos - return True diff --git a/voxvera/vendor/markdown_it/rules_inline/state_inline.py b/voxvera/vendor/markdown_it/rules_inline/state_inline.py deleted file mode 100644 index 50dc412..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/state_inline.py +++ /dev/null @@ -1,165 +0,0 @@ -from __future__ import annotations - -from collections import namedtuple -from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Literal - -from ..common.utils import isMdAsciiPunct, isPunctChar, isWhiteSpace -from ..ruler import StateBase -from ..token import Token -from ..utils import EnvType - -if TYPE_CHECKING: - from markdown_it import MarkdownIt - - -@dataclass(slots=True) -class Delimiter: - # Char code of the starting marker (number). - marker: int - - # Total length of these series of delimiters. - length: int - - # A position of the token this delimiter corresponds to. - token: int - - # If this delimiter is matched as a valid opener, `end` will be - # equal to its position, otherwise it's `-1`. - end: int - - # Boolean flags that determine if this delimiter could open or close - # an emphasis. - open: bool - close: bool - - level: bool | None = None - - -Scanned = namedtuple("Scanned", ["can_open", "can_close", "length"]) - - -class StateInline(StateBase): - def __init__( - self, src: str, md: MarkdownIt, env: EnvType, outTokens: list[Token] - ) -> None: - self.src = src - self.env = env - self.md = md - self.tokens = outTokens - self.tokens_meta: list[dict[str, Any] | None] = [None] * len(outTokens) - - self.pos = 0 - self.posMax = len(self.src) - self.level = 0 - self.pending = "" - self.pendingLevel = 0 - - # Stores { start: end } pairs. Useful for backtrack - # optimization of pairs parse (emphasis, strikes). - self.cache: dict[int, int] = {} - - # List of emphasis-like delimiters for current tag - self.delimiters: list[Delimiter] = [] - - # Stack of delimiter lists for upper level tags - self._prev_delimiters: list[list[Delimiter]] = [] - - # backticklength => last seen position - self.backticks: dict[int, int] = {} - self.backticksScanned = False - - # Counter used to disable inline linkify-it execution - # inside and markdown links - self.linkLevel = 0 - - def __repr__(self) -> str: - return ( - f"{self.__class__.__name__}" - f"(pos=[{self.pos} of {self.posMax}], token={len(self.tokens)})" - ) - - def pushPending(self) -> Token: - token = Token("text", "", 0) - token.content = self.pending - token.level = self.pendingLevel - self.tokens.append(token) - self.pending = "" - return token - - def push(self, ttype: str, tag: str, nesting: Literal[-1, 0, 1]) -> Token: - """Push new token to "stream". - If pending text exists - flush it as text token - """ - if self.pending: - self.pushPending() - - token = Token(ttype, tag, nesting) - token_meta = None - - if nesting < 0: - # closing tag - self.level -= 1 - self.delimiters = self._prev_delimiters.pop() - - token.level = self.level - - if nesting > 0: - # opening tag - self.level += 1 - self._prev_delimiters.append(self.delimiters) - self.delimiters = [] - token_meta = {"delimiters": self.delimiters} - - self.pendingLevel = self.level - self.tokens.append(token) - self.tokens_meta.append(token_meta) - return token - - def scanDelims(self, start: int, canSplitWord: bool) -> Scanned: - """ - Scan a sequence of emphasis-like markers, and determine whether - it can start an emphasis sequence or end an emphasis sequence. - - - start - position to scan from (it should point at a valid marker); - - canSplitWord - determine if these markers can be found inside a word - - """ - pos = start - maximum = self.posMax - marker = self.src[start] - - # treat beginning of the line as a whitespace - lastChar = self.src[start - 1] if start > 0 else " " - - while pos < maximum and self.src[pos] == marker: - pos += 1 - - count = pos - start - - # treat end of the line as a whitespace - nextChar = self.src[pos] if pos < maximum else " " - - isLastPunctChar = isMdAsciiPunct(ord(lastChar)) or isPunctChar(lastChar) - isNextPunctChar = isMdAsciiPunct(ord(nextChar)) or isPunctChar(nextChar) - - isLastWhiteSpace = isWhiteSpace(ord(lastChar)) - isNextWhiteSpace = isWhiteSpace(ord(nextChar)) - - left_flanking = not ( - isNextWhiteSpace - or (isNextPunctChar and not (isLastWhiteSpace or isLastPunctChar)) - ) - right_flanking = not ( - isLastWhiteSpace - or (isLastPunctChar and not (isNextWhiteSpace or isNextPunctChar)) - ) - - can_open = left_flanking and ( - canSplitWord or (not right_flanking) or isLastPunctChar - ) - can_close = right_flanking and ( - canSplitWord or (not left_flanking) or isNextPunctChar - ) - - return Scanned(can_open, can_close, count) diff --git a/voxvera/vendor/markdown_it/rules_inline/strikethrough.py b/voxvera/vendor/markdown_it/rules_inline/strikethrough.py deleted file mode 100644 index ec81628..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/strikethrough.py +++ /dev/null @@ -1,127 +0,0 @@ -# ~~strike through~~ -from __future__ import annotations - -from .state_inline import Delimiter, StateInline - - -def tokenize(state: StateInline, silent: bool) -> bool: - """Insert each marker as a separate text token, and add it to delimiter list""" - start = state.pos - ch = state.src[start] - - if silent: - return False - - if ch != "~": - return False - - scanned = state.scanDelims(state.pos, True) - length = scanned.length - - if length < 2: - return False - - if length % 2: - token = state.push("text", "", 0) - token.content = ch - length -= 1 - - i = 0 - while i < length: - token = state.push("text", "", 0) - token.content = ch + ch - state.delimiters.append( - Delimiter( - marker=ord(ch), - length=0, # disable "rule of 3" length checks meant for emphasis - token=len(state.tokens) - 1, - end=-1, - open=scanned.can_open, - close=scanned.can_close, - ) - ) - - i += 2 - - state.pos += scanned.length - - return True - - -def _postProcess(state: StateInline, delimiters: list[Delimiter]) -> None: - loneMarkers = [] - maximum = len(delimiters) - - i = 0 - while i < maximum: - startDelim = delimiters[i] - - if startDelim.marker != 0x7E: # /* ~ */ - i += 1 - continue - - if startDelim.end == -1: - i += 1 - continue - - endDelim = delimiters[startDelim.end] - - token = state.tokens[startDelim.token] - token.type = "s_open" - token.tag = "s" - token.nesting = 1 - token.markup = "~~" - token.content = "" - - token = state.tokens[endDelim.token] - token.type = "s_close" - token.tag = "s" - token.nesting = -1 - token.markup = "~~" - token.content = "" - - if ( - state.tokens[endDelim.token - 1].type == "text" - and state.tokens[endDelim.token - 1].content == "~" - ): - loneMarkers.append(endDelim.token - 1) - - i += 1 - - # If a marker sequence has an odd number of characters, it's split - # like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the - # start of the sequence. - # - # So, we have to move all those markers after subsequent s_close tags. - # - while loneMarkers: - i = loneMarkers.pop() - j = i + 1 - - while (j < len(state.tokens)) and (state.tokens[j].type == "s_close"): - j += 1 - - j -= 1 - - if i != j: - token = state.tokens[j] - state.tokens[j] = state.tokens[i] - state.tokens[i] = token - - -def postProcess(state: StateInline) -> None: - """Walk through delimiter list and replace text tokens with tags.""" - tokens_meta = state.tokens_meta - maximum = len(state.tokens_meta) - _postProcess(state, state.delimiters) - - curr = 0 - while curr < maximum: - try: - curr_meta = tokens_meta[curr] - except IndexError: - pass - else: - if curr_meta and "delimiters" in curr_meta: - _postProcess(state, curr_meta["delimiters"]) - curr += 1 diff --git a/voxvera/vendor/markdown_it/rules_inline/text.py b/voxvera/vendor/markdown_it/rules_inline/text.py deleted file mode 100644 index 18b2fcc..0000000 --- a/voxvera/vendor/markdown_it/rules_inline/text.py +++ /dev/null @@ -1,62 +0,0 @@ -import functools -import re - -# Skip text characters for text token, place those to pending buffer -# and increment current pos -from .state_inline import StateInline - -# Rule to skip pure text -# '{}$%@~+=:' reserved for extensions - -# !!!! Don't confuse with "Markdown ASCII Punctuation" chars -# http://spec.commonmark.org/0.15/#ascii-punctuation-character - - -_TerminatorChars = { - "\n", - "!", - "#", - "$", - "%", - "&", - "*", - "+", - "-", - ":", - "<", - "=", - ">", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "}", - "~", -} - - -@functools.cache -def _terminator_char_regex() -> re.Pattern[str]: - return re.compile("[" + re.escape("".join(_TerminatorChars)) + "]") - - -def text(state: StateInline, silent: bool) -> bool: - pos = state.pos - posMax = state.posMax - - terminator_char = _terminator_char_regex().search(state.src, pos) - pos = terminator_char.start() if terminator_char else posMax - - if pos == state.pos: - return False - - if not silent: - state.pending += state.src[state.pos : pos] - - state.pos = pos - - return True diff --git a/voxvera/vendor/markdown_it/token.py b/voxvera/vendor/markdown_it/token.py deleted file mode 100644 index d6d0b45..0000000 --- a/voxvera/vendor/markdown_it/token.py +++ /dev/null @@ -1,178 +0,0 @@ -from __future__ import annotations - -from collections.abc import Callable, MutableMapping -import dataclasses as dc -from typing import Any, Literal -import warnings - - -def convert_attrs(value: Any) -> Any: - """Convert Token.attrs set as ``None`` or ``[[key, value], ...]`` to a dict. - - This improves compatibility with upstream markdown-it. - """ - if not value: - return {} - if isinstance(value, list): - return dict(value) - return value - - -@dc.dataclass(slots=True) -class Token: - type: str - """Type of the token (string, e.g. "paragraph_open")""" - - tag: str - """HTML tag name, e.g. 'p'""" - - nesting: Literal[-1, 0, 1] - """Level change (number in {-1, 0, 1} set), where: - - `1` means the tag is opening - - `0` means the tag is self-closing - - `-1` means the tag is closing - """ - - attrs: dict[str, str | int | float] = dc.field(default_factory=dict) - """HTML attributes. - Note this differs from the upstream "list of lists" format, - although than an instance can still be initialised with this format. - """ - - map: list[int] | None = None - """Source map info. Format: `[ line_begin, line_end ]`""" - - level: int = 0 - """Nesting level, the same as `state.level`""" - - children: list[Token] | None = None - """Array of child nodes (inline and img tokens).""" - - content: str = "" - """Inner content, in the case of a self-closing tag (code, html, fence, etc.),""" - - markup: str = "" - """'*' or '_' for emphasis, fence string for fence, etc.""" - - info: str = "" - """Additional information: - - Info string for "fence" tokens - - The value "auto" for autolink "link_open" and "link_close" tokens - - The string value of the item marker for ordered-list "list_item_open" tokens - """ - - meta: dict[Any, Any] = dc.field(default_factory=dict) - """A place for plugins to store any arbitrary data""" - - block: bool = False - """True for block-level tokens, false for inline tokens. - Used in renderer to calculate line breaks - """ - - hidden: bool = False - """If true, ignore this element when rendering. - Used for tight lists to hide paragraphs. - """ - - def __post_init__(self) -> None: - self.attrs = convert_attrs(self.attrs) - - def attrIndex(self, name: str) -> int: - warnings.warn( # noqa: B028 - "Token.attrIndex should not be used, since Token.attrs is a dictionary", - UserWarning, - ) - if name not in self.attrs: - return -1 - return list(self.attrs.keys()).index(name) - - def attrItems(self) -> list[tuple[str, str | int | float]]: - """Get (key, value) list of attrs.""" - return list(self.attrs.items()) - - def attrPush(self, attrData: tuple[str, str | int | float]) -> None: - """Add `[ name, value ]` attribute to list. Init attrs if necessary.""" - name, value = attrData - self.attrSet(name, value) - - def attrSet(self, name: str, value: str | int | float) -> None: - """Set `name` attribute to `value`. Override old value if exists.""" - self.attrs[name] = value - - def attrGet(self, name: str) -> None | str | int | float: - """Get the value of attribute `name`, or null if it does not exist.""" - return self.attrs.get(name, None) - - def attrJoin(self, name: str, value: str) -> None: - """Join value to existing attribute via space. - Or create new attribute if not exists. - Useful to operate with token classes. - """ - if name in self.attrs: - current = self.attrs[name] - if not isinstance(current, str): - raise TypeError( - f"existing attr 'name' is not a str: {self.attrs[name]}" - ) - self.attrs[name] = f"{current} {value}" - else: - self.attrs[name] = value - - def copy(self, **changes: Any) -> Token: - """Return a shallow copy of the instance.""" - return dc.replace(self, **changes) - - def as_dict( - self, - *, - children: bool = True, - as_upstream: bool = True, - meta_serializer: Callable[[dict[Any, Any]], Any] | None = None, - filter: Callable[[str, Any], bool] | None = None, - dict_factory: Callable[..., MutableMapping[str, Any]] = dict, - ) -> MutableMapping[str, Any]: - """Return the token as a dictionary. - - :param children: Also convert children to dicts - :param as_upstream: Ensure the output dictionary is equal to that created by markdown-it - For example, attrs are converted to null or lists - :param meta_serializer: hook for serializing ``Token.meta`` - :param filter: A callable whose return code determines whether an - attribute or element is included (``True``) or dropped (``False``). - Is called with the (key, value) pair. - :param dict_factory: A callable to produce dictionaries from. - For example, to produce ordered dictionaries instead of normal Python - dictionaries, pass in ``collections.OrderedDict``. - - """ - mapping = dict_factory((f.name, getattr(self, f.name)) for f in dc.fields(self)) - if filter: - mapping = dict_factory((k, v) for k, v in mapping.items() if filter(k, v)) - if as_upstream and "attrs" in mapping: - mapping["attrs"] = ( - None - if not mapping["attrs"] - else [[k, v] for k, v in mapping["attrs"].items()] - ) - if meta_serializer and "meta" in mapping: - mapping["meta"] = meta_serializer(mapping["meta"]) - if children and mapping.get("children", None): - mapping["children"] = [ - child.as_dict( - children=children, - filter=filter, - dict_factory=dict_factory, - as_upstream=as_upstream, - meta_serializer=meta_serializer, - ) - for child in mapping["children"] - ] - return mapping - - @classmethod - def from_dict(cls, dct: MutableMapping[str, Any]) -> Token: - """Convert a dict to a Token.""" - token = cls(**dct) - if token.children: - token.children = [cls.from_dict(c) for c in token.children] # type: ignore[arg-type] - return token diff --git a/voxvera/vendor/markdown_it/tree.py b/voxvera/vendor/markdown_it/tree.py deleted file mode 100644 index 5369157..0000000 --- a/voxvera/vendor/markdown_it/tree.py +++ /dev/null @@ -1,333 +0,0 @@ -"""A tree representation of a linear markdown-it token stream. - -This module is not part of upstream JavaScript markdown-it. -""" - -from __future__ import annotations - -from collections.abc import Generator, Sequence -import textwrap -from typing import Any, NamedTuple, TypeVar, overload - -from .token import Token - - -class _NesterTokens(NamedTuple): - opening: Token - closing: Token - - -_NodeType = TypeVar("_NodeType", bound="SyntaxTreeNode") - - -class SyntaxTreeNode: - """A Markdown syntax tree node. - - A class that can be used to construct a tree representation of a linear - `markdown-it-py` token stream. - - Each node in the tree represents either: - - root of the Markdown document - - a single unnested `Token` - - a `Token` "_open" and "_close" token pair, and the tokens nested in - between - """ - - def __init__( - self, tokens: Sequence[Token] = (), *, create_root: bool = True - ) -> None: - """Initialize a `SyntaxTreeNode` from a token stream. - - If `create_root` is True, create a root node for the document. - """ - # Only nodes representing an unnested token have self.token - self.token: Token | None = None - - # Only containers have nester tokens - self.nester_tokens: _NesterTokens | None = None - - # Root node does not have self.parent - self._parent: Any = None - - # Empty list unless a non-empty container, or unnested token that has - # children (i.e. inline or img) - self._children: list[Any] = [] - - if create_root: - self._set_children_from_tokens(tokens) - return - - if not tokens: - raise ValueError( - "Can only create root from empty token sequence." - " Set `create_root=True`." - ) - elif len(tokens) == 1: - inline_token = tokens[0] - if inline_token.nesting: - raise ValueError( - "Unequal nesting level at the start and end of token stream." - ) - self.token = inline_token - if inline_token.children: - self._set_children_from_tokens(inline_token.children) - else: - self.nester_tokens = _NesterTokens(tokens[0], tokens[-1]) - self._set_children_from_tokens(tokens[1:-1]) - - def __repr__(self) -> str: - return f"{type(self).__name__}({self.type})" - - @overload - def __getitem__(self: _NodeType, item: int) -> _NodeType: ... - - @overload - def __getitem__(self: _NodeType, item: slice) -> list[_NodeType]: ... - - def __getitem__(self: _NodeType, item: int | slice) -> _NodeType | list[_NodeType]: - return self.children[item] - - def to_tokens(self: _NodeType) -> list[Token]: - """Recover the linear token stream.""" - - def recursive_collect_tokens(node: _NodeType, token_list: list[Token]) -> None: - if node.type == "root": - for child in node.children: - recursive_collect_tokens(child, token_list) - elif node.token: - token_list.append(node.token) - else: - assert node.nester_tokens - token_list.append(node.nester_tokens.opening) - for child in node.children: - recursive_collect_tokens(child, token_list) - token_list.append(node.nester_tokens.closing) - - tokens: list[Token] = [] - recursive_collect_tokens(self, tokens) - return tokens - - @property - def children(self: _NodeType) -> list[_NodeType]: - return self._children - - @children.setter - def children(self: _NodeType, value: list[_NodeType]) -> None: - self._children = value - - @property - def parent(self: _NodeType) -> _NodeType | None: - return self._parent # type: ignore - - @parent.setter - def parent(self: _NodeType, value: _NodeType | None) -> None: - self._parent = value - - @property - def is_root(self) -> bool: - """Is the node a special root node?""" - return not (self.token or self.nester_tokens) - - @property - def is_nested(self) -> bool: - """Is this node nested?. - - Returns `True` if the node represents a `Token` pair and tokens in the - sequence between them, where `Token.nesting` of the first `Token` in - the pair is 1 and nesting of the other `Token` is -1. - """ - return bool(self.nester_tokens) - - @property - def siblings(self: _NodeType) -> Sequence[_NodeType]: - """Get siblings of the node. - - Gets the whole group of siblings, including self. - """ - if not self.parent: - return [self] - return self.parent.children - - @property - def type(self) -> str: - """Get a string type of the represented syntax. - - - "root" for root nodes - - `Token.type` if the node represents an unnested token - - `Token.type` of the opening token, with "_open" suffix stripped, if - the node represents a nester token pair - """ - if self.is_root: - return "root" - if self.token: - return self.token.type - assert self.nester_tokens - return self.nester_tokens.opening.type.removesuffix("_open") - - @property - def next_sibling(self: _NodeType) -> _NodeType | None: - """Get the next node in the sequence of siblings. - - Returns `None` if this is the last sibling. - """ - self_index = self.siblings.index(self) - if self_index + 1 < len(self.siblings): - return self.siblings[self_index + 1] - return None - - @property - def previous_sibling(self: _NodeType) -> _NodeType | None: - """Get the previous node in the sequence of siblings. - - Returns `None` if this is the first sibling. - """ - self_index = self.siblings.index(self) - if self_index - 1 >= 0: - return self.siblings[self_index - 1] - return None - - def _add_child( - self, - tokens: Sequence[Token], - ) -> None: - """Make a child node for `self`.""" - child = type(self)(tokens, create_root=False) - child.parent = self - self.children.append(child) - - def _set_children_from_tokens(self, tokens: Sequence[Token]) -> None: - """Convert the token stream to a tree structure and set the resulting - nodes as children of `self`.""" - reversed_tokens = list(reversed(tokens)) - while reversed_tokens: - token = reversed_tokens.pop() - - if not token.nesting: - self._add_child([token]) - continue - if token.nesting != 1: - raise ValueError("Invalid token nesting") - - nested_tokens = [token] - nesting = 1 - while reversed_tokens and nesting: - token = reversed_tokens.pop() - nested_tokens.append(token) - nesting += token.nesting - if nesting: - raise ValueError(f"unclosed tokens starting {nested_tokens[0]}") - - self._add_child(nested_tokens) - - def pretty( - self, *, indent: int = 2, show_text: bool = False, _current: int = 0 - ) -> str: - """Create an XML style string of the tree.""" - prefix = " " * _current - text = prefix + f"<{self.type}" - if not self.is_root and self.attrs: - text += " " + " ".join(f"{k}={v!r}" for k, v in self.attrs.items()) - text += ">" - if ( - show_text - and not self.is_root - and self.type in ("text", "text_special") - and self.content - ): - text += "\n" + textwrap.indent(self.content, prefix + " " * indent) - for child in self.children: - text += "\n" + child.pretty( - indent=indent, show_text=show_text, _current=_current + indent - ) - return text - - def walk( - self: _NodeType, *, include_self: bool = True - ) -> Generator[_NodeType, None, None]: - """Recursively yield all descendant nodes in the tree starting at self. - - The order mimics the order of the underlying linear token - stream (i.e. depth first). - """ - if include_self: - yield self - for child in self.children: - yield from child.walk(include_self=True) - - # NOTE: - # The values of the properties defined below directly map to properties - # of the underlying `Token`s. A root node does not translate to a `Token` - # object, so calling these property getters on a root node will raise an - # `AttributeError`. - # - # There is no mapping for `Token.nesting` because the `is_nested` property - # provides that data, and can be called on any node type, including root. - - def _attribute_token(self) -> Token: - """Return the `Token` that is used as the data source for the - properties defined below.""" - if self.token: - return self.token - if self.nester_tokens: - return self.nester_tokens.opening - raise AttributeError("Root node does not have the accessed attribute") - - @property - def tag(self) -> str: - """html tag name, e.g. \"p\" """ - return self._attribute_token().tag - - @property - def attrs(self) -> dict[str, str | int | float]: - """Html attributes.""" - return self._attribute_token().attrs - - def attrGet(self, name: str) -> None | str | int | float: - """Get the value of attribute `name`, or null if it does not exist.""" - return self._attribute_token().attrGet(name) - - @property - def map(self) -> tuple[int, int] | None: - """Source map info. Format: `tuple[ line_begin, line_end ]`""" - map_ = self._attribute_token().map - if map_: - # Type ignore because `Token`s attribute types are not perfect - return tuple(map_) # type: ignore - return None - - @property - def level(self) -> int: - """nesting level, the same as `state.level`""" - return self._attribute_token().level - - @property - def content(self) -> str: - """In a case of self-closing tag (code, html, fence, etc.), it - has contents of this tag.""" - return self._attribute_token().content - - @property - def markup(self) -> str: - """'*' or '_' for emphasis, fence string for fence, etc.""" - return self._attribute_token().markup - - @property - def info(self) -> str: - """fence infostring""" - return self._attribute_token().info - - @property - def meta(self) -> dict[Any, Any]: - """A place for plugins to store an arbitrary data.""" - return self._attribute_token().meta - - @property - def block(self) -> bool: - """True for block-level tokens, false for inline tokens.""" - return self._attribute_token().block - - @property - def hidden(self) -> bool: - """If it's true, ignore this element when rendering. - Used for tight lists to hide paragraphs.""" - return self._attribute_token().hidden diff --git a/voxvera/vendor/markdown_it/utils.py b/voxvera/vendor/markdown_it/utils.py deleted file mode 100644 index 2571a15..0000000 --- a/voxvera/vendor/markdown_it/utils.py +++ /dev/null @@ -1,186 +0,0 @@ -from __future__ import annotations - -from collections.abc import Callable, Iterable, MutableMapping -from collections.abc import MutableMapping as MutableMappingABC -from pathlib import Path -from typing import TYPE_CHECKING, Any, TypedDict, cast - -if TYPE_CHECKING: - from typing_extensions import NotRequired - - -EnvType = MutableMapping[str, Any] # note: could use TypeAlias in python 3.10 -"""Type for the environment sandbox used in parsing and rendering, -which stores mutable variables for use by plugins and rules. -""" - - -class OptionsType(TypedDict): - """Options for parsing.""" - - maxNesting: int - """Internal protection, recursion limit.""" - html: bool - """Enable HTML tags in source.""" - linkify: bool - """Enable autoconversion of URL-like texts to links.""" - typographer: bool - """Enable smartquotes and replacements.""" - quotes: str - """Quote characters.""" - xhtmlOut: bool - """Use '/' to close single tags (
).""" - breaks: bool - """Convert newlines in paragraphs into
.""" - langPrefix: str - """CSS language prefix for fenced blocks.""" - highlight: Callable[[str, str, str], str] | None - """Highlighter function: (content, lang, attrs) -> str.""" - store_labels: NotRequired[bool] - """Store link label in link/image token's metadata (under Token.meta['label']). - - This is a Python only option, and is intended for the use of round-trip parsing. - """ - - -class PresetType(TypedDict): - """Preset configuration for markdown-it.""" - - options: OptionsType - """Options for parsing.""" - components: MutableMapping[str, MutableMapping[str, list[str]]] - """Components for parsing and rendering.""" - - -class OptionsDict(MutableMappingABC): # type: ignore - """A dictionary, with attribute access to core markdownit configuration options.""" - - # Note: ideally we would probably just remove attribute access entirely, - # but we keep it for backwards compatibility. - - def __init__(self, options: OptionsType) -> None: - self._options = cast(OptionsType, dict(options)) - - def __getitem__(self, key: str) -> Any: - return self._options[key] # type: ignore[literal-required] - - def __setitem__(self, key: str, value: Any) -> None: - self._options[key] = value # type: ignore[literal-required] - - def __delitem__(self, key: str) -> None: - del self._options[key] # type: ignore - - def __iter__(self) -> Iterable[str]: # type: ignore - return iter(self._options) - - def __len__(self) -> int: - return len(self._options) - - def __repr__(self) -> str: - return repr(self._options) - - def __str__(self) -> str: - return str(self._options) - - @property - def maxNesting(self) -> int: - """Internal protection, recursion limit.""" - return self._options["maxNesting"] - - @maxNesting.setter - def maxNesting(self, value: int) -> None: - self._options["maxNesting"] = value - - @property - def html(self) -> bool: - """Enable HTML tags in source.""" - return self._options["html"] - - @html.setter - def html(self, value: bool) -> None: - self._options["html"] = value - - @property - def linkify(self) -> bool: - """Enable autoconversion of URL-like texts to links.""" - return self._options["linkify"] - - @linkify.setter - def linkify(self, value: bool) -> None: - self._options["linkify"] = value - - @property - def typographer(self) -> bool: - """Enable smartquotes and replacements.""" - return self._options["typographer"] - - @typographer.setter - def typographer(self, value: bool) -> None: - self._options["typographer"] = value - - @property - def quotes(self) -> str: - """Quote characters.""" - return self._options["quotes"] - - @quotes.setter - def quotes(self, value: str) -> None: - self._options["quotes"] = value - - @property - def xhtmlOut(self) -> bool: - """Use '/' to close single tags (
).""" - return self._options["xhtmlOut"] - - @xhtmlOut.setter - def xhtmlOut(self, value: bool) -> None: - self._options["xhtmlOut"] = value - - @property - def breaks(self) -> bool: - """Convert newlines in paragraphs into
.""" - return self._options["breaks"] - - @breaks.setter - def breaks(self, value: bool) -> None: - self._options["breaks"] = value - - @property - def langPrefix(self) -> str: - """CSS language prefix for fenced blocks.""" - return self._options["langPrefix"] - - @langPrefix.setter - def langPrefix(self, value: str) -> None: - self._options["langPrefix"] = value - - @property - def highlight(self) -> Callable[[str, str, str], str] | None: - """Highlighter function: (content, langName, langAttrs) -> escaped HTML.""" - return self._options["highlight"] - - @highlight.setter - def highlight(self, value: Callable[[str, str, str], str] | None) -> None: - self._options["highlight"] = value - - -def read_fixture_file(path: str | Path) -> list[list[Any]]: - text = Path(path).read_text(encoding="utf-8") - tests = [] - section = 0 - last_pos = 0 - lines = text.splitlines(keepends=True) - for i in range(len(lines)): - if lines[i].rstrip() == ".": - if section == 0: - tests.append([i, lines[i - 1].strip()]) - section = 1 - elif section == 1: - tests[-1].append("".join(lines[last_pos + 1 : i])) - section = 2 - elif section == 2: - tests[-1].append("".join(lines[last_pos + 1 : i])) - section = 0 - - last_pos = i - return tests diff --git a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/INSTALLER b/voxvera/vendor/markdown_it_py-4.0.0.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/METADATA b/voxvera/vendor/markdown_it_py-4.0.0.dist-info/METADATA deleted file mode 100644 index 0f2b466..0000000 --- a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/METADATA +++ /dev/null @@ -1,219 +0,0 @@ -Metadata-Version: 2.4 -Name: markdown-it-py -Version: 4.0.0 -Summary: Python port of markdown-it. Markdown parsing, done right! -Keywords: markdown,lexer,parser,commonmark,markdown-it -Author-email: Chris Sewell -Requires-Python: >=3.10 -Description-Content-Type: text/markdown -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: 3.13 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Topic :: Text Processing :: Markup -License-File: LICENSE -License-File: LICENSE.markdown-it -Requires-Dist: mdurl~=0.1 -Requires-Dist: psutil ; extra == "benchmarking" -Requires-Dist: pytest ; extra == "benchmarking" -Requires-Dist: pytest-benchmark ; extra == "benchmarking" -Requires-Dist: commonmark~=0.9 ; extra == "compare" -Requires-Dist: markdown~=3.4 ; extra == "compare" -Requires-Dist: mistletoe~=1.0 ; extra == "compare" -Requires-Dist: mistune~=3.0 ; extra == "compare" -Requires-Dist: panflute~=2.3 ; extra == "compare" -Requires-Dist: markdown-it-pyrs ; extra == "compare" -Requires-Dist: linkify-it-py>=1,<3 ; extra == "linkify" -Requires-Dist: mdit-py-plugins>=0.5.0 ; extra == "plugins" -Requires-Dist: gprof2dot ; extra == "profiling" -Requires-Dist: mdit-py-plugins>=0.5.0 ; extra == "rtd" -Requires-Dist: myst-parser ; extra == "rtd" -Requires-Dist: pyyaml ; extra == "rtd" -Requires-Dist: sphinx ; extra == "rtd" -Requires-Dist: sphinx-copybutton ; extra == "rtd" -Requires-Dist: sphinx-design ; extra == "rtd" -Requires-Dist: sphinx-book-theme~=1.0 ; extra == "rtd" -Requires-Dist: jupyter_sphinx ; extra == "rtd" -Requires-Dist: ipykernel ; extra == "rtd" -Requires-Dist: coverage ; extra == "testing" -Requires-Dist: pytest ; extra == "testing" -Requires-Dist: pytest-cov ; extra == "testing" -Requires-Dist: pytest-regressions ; extra == "testing" -Requires-Dist: requests ; extra == "testing" -Project-URL: Documentation, https://markdown-it-py.readthedocs.io -Project-URL: Homepage, https://github.com/executablebooks/markdown-it-py -Provides-Extra: benchmarking -Provides-Extra: compare -Provides-Extra: linkify -Provides-Extra: plugins -Provides-Extra: profiling -Provides-Extra: rtd -Provides-Extra: testing - -# markdown-it-py - -[![Github-CI][github-ci]][github-link] -[![Coverage Status][codecov-badge]][codecov-link] -[![PyPI][pypi-badge]][pypi-link] -[![Conda][conda-badge]][conda-link] -[![PyPI - Downloads][install-badge]][install-link] - -

- markdown-it-py icon -

- -> Markdown parser done right. - -- Follows the __[CommonMark spec](http://spec.commonmark.org/)__ for baseline parsing -- Configurable syntax: you can add new rules and even replace existing ones. -- Pluggable: Adds syntax extensions to extend the parser (see the [plugin list][md-plugins]). -- High speed (see our [benchmarking tests][md-performance]) -- Easy to configure for [security][md-security] -- Member of [Google's Assured Open Source Software](https://cloud.google.com/assured-open-source-software/docs/supported-packages) - -This is a Python port of [markdown-it], and some of its associated plugins. -For more details see: . - -For details on [markdown-it] itself, see: - -- The __[Live demo](https://markdown-it.github.io)__ -- [The markdown-it README][markdown-it-readme] - -**See also:** [markdown-it-pyrs](https://github.com/chrisjsewell/markdown-it-pyrs) for an experimental Rust binding, -for even more speed! - -## Installation - -### PIP - -```bash -pip install markdown-it-py[plugins] -``` - -or with extras - -```bash -pip install markdown-it-py[linkify,plugins] -``` - -### Conda - -```bash -conda install -c conda-forge markdown-it-py -``` - -or with extras - -```bash -conda install -c conda-forge markdown-it-py linkify-it-py mdit-py-plugins -``` - -## Usage - -### Python API Usage - -Render markdown to HTML with markdown-it-py and a custom configuration -with and without plugins and features: - -```python -from markdown_it import MarkdownIt -from mdit_py_plugins.front_matter import front_matter_plugin -from mdit_py_plugins.footnote import footnote_plugin - -md = ( - MarkdownIt('commonmark', {'breaks':True,'html':True}) - .use(front_matter_plugin) - .use(footnote_plugin) - .enable('table') -) -text = (""" ---- -a: 1 ---- - -a | b -- | - -1 | 2 - -A footnote [^1] - -[^1]: some details -""") -tokens = md.parse(text) -html_text = md.render(text) - -## To export the html to a file, uncomment the lines below: -# from pathlib import Path -# Path("output.html").write_text(html_text) -``` - -### Command-line Usage - -Render markdown to HTML with markdown-it-py from the -command-line: - -```console -usage: markdown-it [-h] [-v] [filenames [filenames ...]] - -Parse one or more markdown files, convert each to HTML, and print to stdout - -positional arguments: - filenames specify an optional list of files to convert - -optional arguments: - -h, --help show this help message and exit - -v, --version show program's version number and exit - -Interactive: - - $ markdown-it - markdown-it-py [version 0.0.0] (interactive) - Type Ctrl-D to complete input, or Ctrl-C to exit. - >>> # Example - ... > markdown *input* - ... -

Example

-
-

markdown input

-
- -Batch: - - $ markdown-it README.md README.footer.md > index.html - -``` - -## References / Thanks - -Big thanks to the authors of [markdown-it]: - -- Alex Kocharin [github/rlidwka](https://github.com/rlidwka) -- Vitaly Puzrin [github/puzrin](https://github.com/puzrin) - -Also [John MacFarlane](https://github.com/jgm) for his work on the CommonMark spec and reference implementations. - -[github-ci]: https://github.com/executablebooks/markdown-it-py/actions/workflows/tests.yml/badge.svg?branch=master -[github-link]: https://github.com/executablebooks/markdown-it-py -[pypi-badge]: https://img.shields.io/pypi/v/markdown-it-py.svg -[pypi-link]: https://pypi.org/project/markdown-it-py -[conda-badge]: https://anaconda.org/conda-forge/markdown-it-py/badges/version.svg -[conda-link]: https://anaconda.org/conda-forge/markdown-it-py -[codecov-badge]: https://codecov.io/gh/executablebooks/markdown-it-py/branch/master/graph/badge.svg -[codecov-link]: https://codecov.io/gh/executablebooks/markdown-it-py -[install-badge]: https://img.shields.io/pypi/dw/markdown-it-py?label=pypi%20installs -[install-link]: https://pypistats.org/packages/markdown-it-py - -[CommonMark spec]: http://spec.commonmark.org/ -[markdown-it]: https://github.com/markdown-it/markdown-it -[markdown-it-readme]: https://github.com/markdown-it/markdown-it/blob/master/README.md -[md-security]: https://markdown-it-py.readthedocs.io/en/latest/security.html -[md-performance]: https://markdown-it-py.readthedocs.io/en/latest/performance.html -[md-plugins]: https://markdown-it-py.readthedocs.io/en/latest/plugins.html - diff --git a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/RECORD b/voxvera/vendor/markdown_it_py-4.0.0.dist-info/RECORD deleted file mode 100644 index 3cd9c48..0000000 --- a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/RECORD +++ /dev/null @@ -1,76 +0,0 @@ -../../bin/markdown-it,sha256=eNoJWKbt136XCdvgTtDwx1gxlXLWV_I1Ys-_gzrro_c,220 -markdown_it/__init__.py,sha256=R7fMvDxageYJ4Q6doBcimogy1ctcV1eBuCFu5Pr8bbA,114 -markdown_it/_compat.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35 -markdown_it/_punycode.py,sha256=JvSOZJ4VKr58z7unFGM0KhfTxqHMk2w8gglxae2QszM,2373 -markdown_it/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -markdown_it/cli/parse.py,sha256=Un3N7fyGHhZAQouGVnRx-WZcpKwEK2OF08rzVAEBie8,2881 -markdown_it/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -markdown_it/common/entities.py,sha256=EYRCmUL7ZU1FRGLSXQlPx356lY8EUBdFyx96eSGc6d0,157 -markdown_it/common/html_blocks.py,sha256=QXbUDMoN9lXLgYFk2DBYllnLiFukL6dHn2X98Y6Wews,986 -markdown_it/common/html_re.py,sha256=FggAEv9IL8gHQqsGTkHcf333rTojwG0DQJMH9oVu0fU,926 -markdown_it/common/normalize_url.py,sha256=avOXnLd9xw5jU1q5PLftjAM9pvGx8l9QDEkmZSyrMgg,2568 -markdown_it/common/utils.py,sha256=pMgvMOE3ZW-BdJ7HfuzlXNKyD1Ivk7jHErc2J_B8J5M,8734 -markdown_it/helpers/__init__.py,sha256=YH2z7dS0WUc_9l51MWPvrLtFoBPh4JLGw58OuhGRCK0,253 -markdown_it/helpers/parse_link_destination.py,sha256=u-xxWVP3g1s7C1bQuQItiYyDrYoYHJzXaZXPgr-o6mY,1906 -markdown_it/helpers/parse_link_label.py,sha256=PIHG6ZMm3BUw0a2m17lCGqNrl3vaz911tuoGviWD3I4,1037 -markdown_it/helpers/parse_link_title.py,sha256=jkLoYQMKNeX9bvWQHkaSroiEo27HylkEUNmj8xBRlp4,2273 -markdown_it/main.py,sha256=vzuT23LJyKrPKNyHKKAbOHkNWpwIldOGUM-IGsv2DHM,12732 -markdown_it/parser_block.py,sha256=-MyugXB63Te71s4NcSQZiK5bE6BHkdFyZv_bviuatdI,3939 -markdown_it/parser_core.py,sha256=SRmJjqe8dC6GWzEARpWba59cBmxjCr3Gsg8h29O8sQk,1016 -markdown_it/parser_inline.py,sha256=y0jCig8CJxQO7hBz0ZY3sGvPlAKTohOwIgaqnlSaS5A,5024 -markdown_it/port.yaml,sha256=jt_rdwOnfocOV5nc35revTybAAQMIp_-1fla_527sVE,2447 -markdown_it/presets/__init__.py,sha256=22vFtwJEY7iqFRtgVZ-pJthcetfpr1Oig8XOF9x1328,970 -markdown_it/presets/commonmark.py,sha256=ygfb0R7WQ_ZoyQP3df-B0EnYMqNXCVOSw9SAdMjsGow,2869 -markdown_it/presets/default.py,sha256=FfKVUI0HH3M-_qy6RwotLStdC4PAaAxE7Dq0_KQtRtc,1811 -markdown_it/presets/zero.py,sha256=okXWTBEI-2nmwx5XKeCjxInRf65oC11gahtRl-QNtHM,2113 -markdown_it/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26 -markdown_it/renderer.py,sha256=Lzr0glqd5oxFL10DOfjjW8kg4Gp41idQ4viEQaE47oA,9947 -markdown_it/ruler.py,sha256=eMAtWGRAfSM33aiJed0k5923BEkuMVsMq1ct8vU-ql4,9142 -markdown_it/rules_block/__init__.py,sha256=SQpg0ocmsHeILPAWRHhzgLgJMKIcNkQyELH13o_6Ktc,553 -markdown_it/rules_block/blockquote.py,sha256=7uymS36dcrned3DsIaRcqcbFU1NlymhvsZpEXTD3_n8,8887 -markdown_it/rules_block/code.py,sha256=iTAxv0U1-MDhz88M1m1pi2vzOhEMSEROsXMo2Qq--kU,860 -markdown_it/rules_block/fence.py,sha256=BJgU-PqZ4vAlCqGcrc8UtdLpJJyMeRWN-G-Op-zxrMc,2537 -markdown_it/rules_block/heading.py,sha256=4Lh15rwoVsQjE1hVhpbhidQ0k9xKHihgjAeYSbwgO5k,1745 -markdown_it/rules_block/hr.py,sha256=QCoY5kImaQRvF7PyP8OoWft6A8JVH1v6MN-0HR9Ikpg,1227 -markdown_it/rules_block/html_block.py,sha256=wA8pb34LtZr1BkIATgGKQBIGX5jQNOkwZl9UGEqvb5M,2721 -markdown_it/rules_block/lheading.py,sha256=fWoEuUo7S2svr5UMKmyQMkh0hheYAHg2gMM266Mogs4,2625 -markdown_it/rules_block/list.py,sha256=gIodkAJFyOIyKCZCj5lAlL7jIj5kAzrDb-K-2MFNplY,9668 -markdown_it/rules_block/paragraph.py,sha256=9pmCwA7eMu4LBdV4fWKzC4EdwaOoaGw2kfeYSQiLye8,1819 -markdown_it/rules_block/reference.py,sha256=ue1qZbUaUP0GIvwTjh6nD1UtCij8uwsIMuYW1xBkckc,6983 -markdown_it/rules_block/state_block.py,sha256=HowsQyy5hGUibH4HRZWKfLIlXeDUnuWL7kpF0-rSwoM,8422 -markdown_it/rules_block/table.py,sha256=8nMd9ONGOffER7BXmc9kbbhxkLjtpX79dVLR0iatGnM,7682 -markdown_it/rules_core/__init__.py,sha256=QFGBe9TUjnRQJDU7xY4SQYpxyTHNwg8beTSwXpNGRjE,394 -markdown_it/rules_core/block.py,sha256=0_JY1CUy-H2OooFtIEZAACtuoGUMohgxo4Z6A_UinSg,372 -markdown_it/rules_core/inline.py,sha256=9oWmeBhJHE7x47oJcN9yp6UsAZtrEY_A-VmfoMvKld4,325 -markdown_it/rules_core/linkify.py,sha256=mjQqpk_lHLh2Nxw4UFaLxa47Fgi-OHnmDamlgXnhmv0,5141 -markdown_it/rules_core/normalize.py,sha256=AJm4femtFJ_QBnM0dzh0UNqTTJk9K6KMtwRPaioZFqM,403 -markdown_it/rules_core/replacements.py,sha256=CH75mie-tdzdLKQtMBuCTcXAl1ijegdZGfbV_Vk7st0,3471 -markdown_it/rules_core/smartquotes.py,sha256=izK9fSyuTzA-zAUGkRkz9KwwCQWo40iRqcCKqOhFbEE,7443 -markdown_it/rules_core/state_core.py,sha256=HqWZCUr5fW7xG6jeQZDdO0hE9hxxyl3_-bawgOy57HY,570 -markdown_it/rules_core/text_join.py,sha256=rLXxNuLh_es5RvH31GsXi7en8bMNO9UJ5nbJMDBPltY,1173 -markdown_it/rules_inline/__init__.py,sha256=qqHZk6-YE8Rc12q6PxvVKBaxv2wmZeeo45H1XMR_Vxs,696 -markdown_it/rules_inline/autolink.py,sha256=pPoqJY8i99VtFn7KgUzMackMeq1hytzioVvWs-VQPRo,2065 -markdown_it/rules_inline/backticks.py,sha256=J7bezjjNxiXlKqvHc0fJkHZwH7-2nBsXVjcKydk8E4M,2037 -markdown_it/rules_inline/balance_pairs.py,sha256=5zgBiGidqdiWmt7Io_cuZOYh5EFEfXrYRce8RXg5m7o,4852 -markdown_it/rules_inline/emphasis.py,sha256=7aDLZx0Jlekuvbu3uEUTDhJp00Z0Pj6g4C3-VLhI8Co,3123 -markdown_it/rules_inline/entity.py,sha256=CE8AIGMi5isEa24RNseo0wRmTTaj5YLbgTFdDmBesAU,1651 -markdown_it/rules_inline/escape.py,sha256=KGulwrP5FnqZM7GXY8lf7pyVv0YkR59taZDeHb5cmKg,1659 -markdown_it/rules_inline/fragments_join.py,sha256=_3JbwWYJz74gRHeZk6T8edVJT2IVSsi7FfmJJlieQlA,1493 -markdown_it/rules_inline/html_inline.py,sha256=SBg6HR0HRqCdrkkec0dfOYuQdAqyfeLRFLeQggtgjvg,1130 -markdown_it/rules_inline/image.py,sha256=Wbsg7jgnOtKXIwXGNJOlG7ORThkMkBVolxItC0ph6C0,4141 -markdown_it/rules_inline/link.py,sha256=2oD-fAdB0xyxDRtZLTjzLeWbzJ1k9bbPVQmohb58RuI,4258 -markdown_it/rules_inline/linkify.py,sha256=ifH6sb5wE8PGMWEw9Sr4x0DhMVfNOEBCfFSwKll2O-s,1706 -markdown_it/rules_inline/newline.py,sha256=329r0V3aDjzNtJcvzA3lsFYjzgBrShLAV5uf9hwQL_M,1297 -markdown_it/rules_inline/state_inline.py,sha256=d-menFzbz5FDy1JNgGBF-BASasnVI-9RuOxWz9PnKn4,5003 -markdown_it/rules_inline/strikethrough.py,sha256=pwcPlyhkh5pqFVxRCSrdW5dNCIOtU4eDit7TVDTPIVA,3214 -markdown_it/rules_inline/text.py,sha256=FQqaQRUqbnMLO9ZSWPWQUMEKH6JqWSSSmlZ5Ii9P48o,1119 -markdown_it/token.py,sha256=cWrt9kodfPdizHq_tYrzyIZNtJYNMN1813DPNlunwTg,6381 -markdown_it/tree.py,sha256=56Cdbwu2Aiks7kNYqO_fQZWpPb_n48CUllzjQQfgu1Y,11111 -markdown_it/utils.py,sha256=lVLeX7Af3GaNFfxmMgUbsn5p7cXbwhLq7RSf56UWuRE,5687 -markdown_it_py-4.0.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -markdown_it_py-4.0.0.dist-info/METADATA,sha256=6fyqHi2vP5bYQKCfuqo5T-qt83o22Ip7a2tnJIfGW_s,7288 -markdown_it_py-4.0.0.dist-info/RECORD,, -markdown_it_py-4.0.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 -markdown_it_py-4.0.0.dist-info/entry_points.txt,sha256=T81l7fHQ3pllpQ4wUtQK6a8g_p6wxQbnjKVHCk2WMG4,58 -markdown_it_py-4.0.0.dist-info/licenses/LICENSE,sha256=SiJg1uLND1oVGh6G2_59PtVSseK-q_mUHBulxJy85IQ,1078 -markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it,sha256=eSxIxahJoV_fnjfovPnm0d0TsytGxkKnSKCkapkZ1HM,1073 diff --git a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/WHEEL b/voxvera/vendor/markdown_it_py-4.0.0.dist-info/WHEEL deleted file mode 100644 index d8b9936..0000000 --- a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: flit 3.12.0 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/entry_points.txt b/voxvera/vendor/markdown_it_py-4.0.0.dist-info/entry_points.txt deleted file mode 100644 index 7d829cd..0000000 --- a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/entry_points.txt +++ /dev/null @@ -1,3 +0,0 @@ -[console_scripts] -markdown-it=markdown_it.cli.parse:main - diff --git a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/licenses/LICENSE b/voxvera/vendor/markdown_it_py-4.0.0.dist-info/licenses/LICENSE deleted file mode 100644 index 582ddf5..0000000 --- a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/licenses/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 ExecutableBookProject - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it b/voxvera/vendor/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it deleted file mode 100644 index 7ffa058..0000000 --- a/voxvera/vendor/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/voxvera/vendor/mdurl-0.1.2.dist-info/INSTALLER b/voxvera/vendor/mdurl-0.1.2.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/mdurl-0.1.2.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/mdurl-0.1.2.dist-info/LICENSE b/voxvera/vendor/mdurl-0.1.2.dist-info/LICENSE deleted file mode 100644 index 2a920c5..0000000 --- a/voxvera/vendor/mdurl-0.1.2.dist-info/LICENSE +++ /dev/null @@ -1,46 +0,0 @@ -Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin. -Copyright (c) 2021 Taneli Hukkinen - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -.parse() is based on Joyent's node.js `url` code: - -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/voxvera/vendor/mdurl-0.1.2.dist-info/METADATA b/voxvera/vendor/mdurl-0.1.2.dist-info/METADATA deleted file mode 100644 index b4670e8..0000000 --- a/voxvera/vendor/mdurl-0.1.2.dist-info/METADATA +++ /dev/null @@ -1,32 +0,0 @@ -Metadata-Version: 2.1 -Name: mdurl -Version: 0.1.2 -Summary: Markdown URL utilities -Keywords: markdown,commonmark -Author-email: Taneli Hukkinen -Requires-Python: >=3.7 -Description-Content-Type: text/markdown -Classifier: License :: OSI Approved :: MIT License -Classifier: Operating System :: MacOS -Classifier: Operating System :: Microsoft :: Windows -Classifier: Operating System :: POSIX :: Linux -Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.7 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Typing :: Typed -Project-URL: Homepage, https://github.com/executablebooks/mdurl - -# mdurl - -[![Build Status](https://github.com/executablebooks/mdurl/workflows/Tests/badge.svg?branch=master)](https://github.com/executablebooks/mdurl/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush) -[![codecov.io](https://codecov.io/gh/executablebooks/mdurl/branch/master/graph/badge.svg)](https://codecov.io/gh/executablebooks/mdurl) -[![PyPI version](https://img.shields.io/pypi/v/mdurl)](https://pypi.org/project/mdurl) - -This is a Python port of the JavaScript [mdurl](https://www.npmjs.com/package/mdurl) package. -See the [upstream README.md file](https://github.com/markdown-it/mdurl/blob/master/README.md) for API documentation. - diff --git a/voxvera/vendor/mdurl-0.1.2.dist-info/RECORD b/voxvera/vendor/mdurl-0.1.2.dist-info/RECORD deleted file mode 100644 index 6e7bc6a..0000000 --- a/voxvera/vendor/mdurl-0.1.2.dist-info/RECORD +++ /dev/null @@ -1,12 +0,0 @@ -mdurl-0.1.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -mdurl-0.1.2.dist-info/LICENSE,sha256=fGBd9uKGZ6lgMRjpgnT2SknOPu0NJvzM6VNKNF4O-VU,2338 -mdurl-0.1.2.dist-info/METADATA,sha256=tTsp1I9Jk2cFP9o8gefOJ9JVg4Drv4PmYCOwLrfd0l0,1638 -mdurl-0.1.2.dist-info/RECORD,, -mdurl-0.1.2.dist-info/WHEEL,sha256=4TfKIB_xu-04bc2iKz6_zFt-gEFEEDU_31HGhqzOCE8,81 -mdurl/__init__.py,sha256=1vpE89NyXniIRZNC_4f6BPm3Ub4bPntjfyyhLRR7opU,547 -mdurl/_decode.py,sha256=3Q_gDQqU__TvDbu7x-b9LjbVl4QWy5g_qFwljcuvN_Y,3004 -mdurl/_encode.py,sha256=goJLUFt1h4rVZNqqm9t15Nw2W-bFXYQEy3aR01ImWvs,2602 -mdurl/_format.py,sha256=xZct0mdePXA0H3kAqxjGtlB5O86G35DAYMGkA44CmB4,626 -mdurl/_parse.py,sha256=ezZSkM2_4NQ2Zx047sEdcJG7NYQRFHiZK7Y8INHFzwY,11374 -mdurl/_url.py,sha256=5kQnRQN2A_G4svLnRzZcG0bfoD9AbBrYDXousDHZ3z0,284 -mdurl/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26 diff --git a/voxvera/vendor/mdurl-0.1.2.dist-info/WHEEL b/voxvera/vendor/mdurl-0.1.2.dist-info/WHEEL deleted file mode 100644 index 668ba4d..0000000 --- a/voxvera/vendor/mdurl-0.1.2.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: flit 3.7.1 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/voxvera/vendor/mdurl/__init__.py b/voxvera/vendor/mdurl/__init__.py deleted file mode 100644 index cdbb640..0000000 --- a/voxvera/vendor/mdurl/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -__all__ = ( - "decode", - "DECODE_DEFAULT_CHARS", - "DECODE_COMPONENT_CHARS", - "encode", - "ENCODE_DEFAULT_CHARS", - "ENCODE_COMPONENT_CHARS", - "format", - "parse", - "URL", -) -__version__ = "0.1.2" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT - -from mdurl._decode import DECODE_COMPONENT_CHARS, DECODE_DEFAULT_CHARS, decode -from mdurl._encode import ENCODE_COMPONENT_CHARS, ENCODE_DEFAULT_CHARS, encode -from mdurl._format import format -from mdurl._parse import url_parse as parse -from mdurl._url import URL diff --git a/voxvera/vendor/mdurl/_decode.py b/voxvera/vendor/mdurl/_decode.py deleted file mode 100644 index 9b50a2d..0000000 --- a/voxvera/vendor/mdurl/_decode.py +++ /dev/null @@ -1,104 +0,0 @@ -from __future__ import annotations - -from collections.abc import Sequence -import functools -import re - -DECODE_DEFAULT_CHARS = ";/?:@&=+$,#" -DECODE_COMPONENT_CHARS = "" - -decode_cache: dict[str, list[str]] = {} - - -def get_decode_cache(exclude: str) -> Sequence[str]: - if exclude in decode_cache: - return decode_cache[exclude] - - cache: list[str] = [] - decode_cache[exclude] = cache - - for i in range(128): - ch = chr(i) - cache.append(ch) - - for i in range(len(exclude)): - ch_code = ord(exclude[i]) - cache[ch_code] = "%" + ("0" + hex(ch_code)[2:].upper())[-2:] - - return cache - - -# Decode percent-encoded string. -# -def decode(string: str, exclude: str = DECODE_DEFAULT_CHARS) -> str: - cache = get_decode_cache(exclude) - repl_func = functools.partial(repl_func_with_cache, cache=cache) - return re.sub(r"(%[a-f0-9]{2})+", repl_func, string, flags=re.IGNORECASE) - - -def repl_func_with_cache(match: re.Match, cache: Sequence[str]) -> str: - seq = match.group() - result = "" - - i = 0 - l = len(seq) # noqa: E741 - while i < l: - b1 = int(seq[i + 1 : i + 3], 16) - - if b1 < 0x80: - result += cache[b1] - i += 3 # emulate JS for loop statement3 - continue - - if (b1 & 0xE0) == 0xC0 and (i + 3 < l): - # 110xxxxx 10xxxxxx - b2 = int(seq[i + 4 : i + 6], 16) - - if (b2 & 0xC0) == 0x80: - all_bytes = bytes((b1, b2)) - try: - result += all_bytes.decode() - except UnicodeDecodeError: - result += "\ufffd" * 2 - - i += 3 - i += 3 # emulate JS for loop statement3 - continue - - if (b1 & 0xF0) == 0xE0 and (i + 6 < l): - # 1110xxxx 10xxxxxx 10xxxxxx - b2 = int(seq[i + 4 : i + 6], 16) - b3 = int(seq[i + 7 : i + 9], 16) - - if (b2 & 0xC0) == 0x80 and (b3 & 0xC0) == 0x80: - all_bytes = bytes((b1, b2, b3)) - try: - result += all_bytes.decode() - except UnicodeDecodeError: - result += "\ufffd" * 3 - - i += 6 - i += 3 # emulate JS for loop statement3 - continue - - if (b1 & 0xF8) == 0xF0 and (i + 9 < l): - # 111110xx 10xxxxxx 10xxxxxx 10xxxxxx - b2 = int(seq[i + 4 : i + 6], 16) - b3 = int(seq[i + 7 : i + 9], 16) - b4 = int(seq[i + 10 : i + 12], 16) - - if (b2 & 0xC0) == 0x80 and (b3 & 0xC0) == 0x80 and (b4 & 0xC0) == 0x80: - all_bytes = bytes((b1, b2, b3, b4)) - try: - result += all_bytes.decode() - except UnicodeDecodeError: - result += "\ufffd" * 4 - - i += 9 - i += 3 # emulate JS for loop statement3 - continue - - result += "\ufffd" - i += 3 # emulate JS for loop statement3 - - return result diff --git a/voxvera/vendor/mdurl/_encode.py b/voxvera/vendor/mdurl/_encode.py deleted file mode 100644 index bc2e5b9..0000000 --- a/voxvera/vendor/mdurl/_encode.py +++ /dev/null @@ -1,85 +0,0 @@ -from __future__ import annotations - -from collections.abc import Sequence -from string import ascii_letters, digits, hexdigits -from urllib.parse import quote as encode_uri_component - -ASCII_LETTERS_AND_DIGITS = ascii_letters + digits - -ENCODE_DEFAULT_CHARS = ";/?:@&=+$,-_.!~*'()#" -ENCODE_COMPONENT_CHARS = "-_.!~*'()" - -encode_cache: dict[str, list[str]] = {} - - -# Create a lookup array where anything but characters in `chars` string -# and alphanumeric chars is percent-encoded. -def get_encode_cache(exclude: str) -> Sequence[str]: - if exclude in encode_cache: - return encode_cache[exclude] - - cache: list[str] = [] - encode_cache[exclude] = cache - - for i in range(128): - ch = chr(i) - - if ch in ASCII_LETTERS_AND_DIGITS: - # always allow unencoded alphanumeric characters - cache.append(ch) - else: - cache.append("%" + ("0" + hex(i)[2:].upper())[-2:]) - - for i in range(len(exclude)): - cache[ord(exclude[i])] = exclude[i] - - return cache - - -# Encode unsafe characters with percent-encoding, skipping already -# encoded sequences. -# -# - string - string to encode -# - exclude - list of characters to ignore (in addition to a-zA-Z0-9) -# - keepEscaped - don't encode '%' in a correct escape sequence (default: true) -def encode( - string: str, exclude: str = ENCODE_DEFAULT_CHARS, *, keep_escaped: bool = True -) -> str: - result = "" - - cache = get_encode_cache(exclude) - - l = len(string) # noqa: E741 - i = 0 - while i < l: - code = ord(string[i]) - - # % - if keep_escaped and code == 0x25 and i + 2 < l: - if all(c in hexdigits for c in string[i + 1 : i + 3]): - result += string[i : i + 3] - i += 2 - i += 1 # JS for loop statement3 - continue - - if code < 128: - result += cache[code] - i += 1 # JS for loop statement3 - continue - - if code >= 0xD800 and code <= 0xDFFF: - if code >= 0xD800 and code <= 0xDBFF and i + 1 < l: - next_code = ord(string[i + 1]) - if next_code >= 0xDC00 and next_code <= 0xDFFF: - result += encode_uri_component(string[i] + string[i + 1]) - i += 1 - i += 1 # JS for loop statement3 - continue - result += "%EF%BF%BD" - i += 1 # JS for loop statement3 - continue - - result += encode_uri_component(string[i]) - i += 1 # JS for loop statement3 - - return result diff --git a/voxvera/vendor/mdurl/_format.py b/voxvera/vendor/mdurl/_format.py deleted file mode 100644 index 12524ca..0000000 --- a/voxvera/vendor/mdurl/_format.py +++ /dev/null @@ -1,27 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from mdurl._url import URL - - -def format(url: URL) -> str: # noqa: A001 - result = "" - - result += url.protocol or "" - result += "//" if url.slashes else "" - result += url.auth + "@" if url.auth else "" - - if url.hostname and ":" in url.hostname: - # ipv6 address - result += "[" + url.hostname + "]" - else: - result += url.hostname or "" - - result += ":" + url.port if url.port else "" - result += url.pathname or "" - result += url.search or "" - result += url.hash or "" - - return result diff --git a/voxvera/vendor/mdurl/_parse.py b/voxvera/vendor/mdurl/_parse.py deleted file mode 100644 index ffeeac7..0000000 --- a/voxvera/vendor/mdurl/_parse.py +++ /dev/null @@ -1,304 +0,0 @@ -# Copyright Joyent, Inc. and other Node contributors. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - - -# Changes from joyent/node: -# -# 1. No leading slash in paths, -# e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/` -# -# 2. Backslashes are not replaced with slashes, -# so `http:\\example.org\` is treated like a relative path -# -# 3. Trailing colon is treated like a part of the path, -# i.e. in `http://example.org:foo` pathname is `:foo` -# -# 4. Nothing is URL-encoded in the resulting object, -# (in joyent/node some chars in auth and paths are encoded) -# -# 5. `url.parse()` does not have `parseQueryString` argument -# -# 6. Removed extraneous result properties: `host`, `path`, `query`, etc., -# which can be constructed using other parts of the url. - -from __future__ import annotations - -from collections import defaultdict -import re - -from mdurl._url import URL - -# Reference: RFC 3986, RFC 1808, RFC 2396 - -# define these here so at least they only have to be -# compiled once on the first module load. -PROTOCOL_PATTERN = re.compile(r"^([a-z0-9.+-]+:)", flags=re.IGNORECASE) -PORT_PATTERN = re.compile(r":[0-9]*$") - -# Special case for a simple path URL -SIMPLE_PATH_PATTERN = re.compile(r"^(//?(?!/)[^?\s]*)(\?[^\s]*)?$") - -# RFC 2396: characters reserved for delimiting URLs. -# We actually just auto-escape these. -DELIMS = ("<", ">", '"', "`", " ", "\r", "\n", "\t") - -# RFC 2396: characters not allowed for various reasons. -UNWISE = ("{", "}", "|", "\\", "^", "`") + DELIMS - -# Allowed by RFCs, but cause of XSS attacks. Always escape these. -AUTO_ESCAPE = ("'",) + UNWISE -# Characters that are never ever allowed in a hostname. -# Note that any invalid chars are also handled, but these -# are the ones that are *expected* to be seen, so we fast-path -# them. -NON_HOST_CHARS = ("%", "/", "?", ";", "#") + AUTO_ESCAPE -HOST_ENDING_CHARS = ("/", "?", "#") -HOSTNAME_MAX_LEN = 255 -HOSTNAME_PART_PATTERN = re.compile(r"^[+a-z0-9A-Z_-]{0,63}$") -HOSTNAME_PART_START = re.compile(r"^([+a-z0-9A-Z_-]{0,63})(.*)$") -# protocols that can allow "unsafe" and "unwise" chars. - -# protocols that never have a hostname. -HOSTLESS_PROTOCOL = defaultdict( - bool, - { - "javascript": True, - "javascript:": True, - }, -) -# protocols that always contain a // bit. -SLASHED_PROTOCOL = defaultdict( - bool, - { - "http": True, - "https": True, - "ftp": True, - "gopher": True, - "file": True, - "http:": True, - "https:": True, - "ftp:": True, - "gopher:": True, - "file:": True, - }, -) - - -class MutableURL: - def __init__(self) -> None: - self.protocol: str | None = None - self.slashes: bool = False - self.auth: str | None = None - self.port: str | None = None - self.hostname: str | None = None - self.hash: str | None = None - self.search: str | None = None - self.pathname: str | None = None - - def parse(self, url: str, slashes_denote_host: bool) -> "MutableURL": - lower_proto = "" - slashes = False - rest = url - - # trim before proceeding. - # This is to support parse stuff like " http://foo.com \n" - rest = rest.strip() - - if not slashes_denote_host and len(url.split("#")) == 1: - # Try fast path regexp - simple_path = SIMPLE_PATH_PATTERN.match(rest) - if simple_path: - self.pathname = simple_path.group(1) - if simple_path.group(2): - self.search = simple_path.group(2) - return self - - proto = "" - proto_match = PROTOCOL_PATTERN.match(rest) - if proto_match: - proto = proto_match.group() - lower_proto = proto.lower() - self.protocol = proto - rest = rest[len(proto) :] - - # figure out if it's got a host - # user@server is *always* interpreted as a hostname, and url - # resolution will treat //foo/bar as host=foo,path=bar because that's - # how the browser resolves relative URLs. - if slashes_denote_host or proto or re.search(r"^//[^@/]+@[^@/]+", rest): - slashes = rest.startswith("//") - if slashes and not (proto and HOSTLESS_PROTOCOL[proto]): - rest = rest[2:] - self.slashes = True - - if not HOSTLESS_PROTOCOL[proto] and ( - slashes or (proto and not SLASHED_PROTOCOL[proto]) - ): - - # there's a hostname. - # the first instance of /, ?, ;, or # ends the host. - # - # If there is an @ in the hostname, then non-host chars *are* allowed - # to the left of the last @ sign, unless some host-ending character - # comes *before* the @-sign. - # URLs are obnoxious. - # - # ex: - # http://a@b@c/ => user:a@b host:c - # http://a@b?@c => user:a host:c path:/?@c - - # v0.12 TODO(isaacs): This is not quite how Chrome does things. - # Review our test case against browsers more comprehensively. - - # find the first instance of any hostEndingChars - host_end = -1 - for i in range(len(HOST_ENDING_CHARS)): - hec = rest.find(HOST_ENDING_CHARS[i]) - if hec != -1 and (host_end == -1 or hec < host_end): - host_end = hec - - # at this point, either we have an explicit point where the - # auth portion cannot go past, or the last @ char is the decider. - if host_end == -1: - # atSign can be anywhere. - at_sign = rest.rfind("@") - else: - # atSign must be in auth portion. - # http://a@b/c@d => host:b auth:a path:/c@d - at_sign = rest.rfind("@", 0, host_end + 1) - - # Now we have a portion which is definitely the auth. - # Pull that off. - if at_sign != -1: - auth = rest[:at_sign] - rest = rest[at_sign + 1 :] - self.auth = auth - - # the host is the remaining to the left of the first non-host char - host_end = -1 - for i in range(len(NON_HOST_CHARS)): - hec = rest.find(NON_HOST_CHARS[i]) - if hec != -1 and (host_end == -1 or hec < host_end): - host_end = hec - # if we still have not hit it, then the entire thing is a host. - if host_end == -1: - host_end = len(rest) - - if host_end > 0 and rest[host_end - 1] == ":": - host_end -= 1 - host = rest[:host_end] - rest = rest[host_end:] - - # pull out port. - self.parse_host(host) - - # we've indicated that there is a hostname, - # so even if it's empty, it has to be present. - self.hostname = self.hostname or "" - - # if hostname begins with [ and ends with ] - # assume that it's an IPv6 address. - ipv6_hostname = self.hostname.startswith("[") and self.hostname.endswith( - "]" - ) - - # validate a little. - if not ipv6_hostname: - hostparts = self.hostname.split(".") - l = len(hostparts) # noqa: E741 - i = 0 - while i < l: - part = hostparts[i] - if not part: - i += 1 # emulate statement3 in JS for loop - continue - if not HOSTNAME_PART_PATTERN.search(part): - newpart = "" - k = len(part) - j = 0 - while j < k: - if ord(part[j]) > 127: - # we replace non-ASCII char with a temporary placeholder - # we need this to make sure size of hostname is not - # broken by replacing non-ASCII by nothing - newpart += "x" - else: - newpart += part[j] - j += 1 # emulate statement3 in JS for loop - - # we test again with ASCII char only - if not HOSTNAME_PART_PATTERN.search(newpart): - valid_parts = hostparts[:i] - not_host = hostparts[i + 1 :] - bit = HOSTNAME_PART_START.search(part) - if bit: - valid_parts.append(bit.group(1)) - not_host.insert(0, bit.group(2)) - if not_host: - rest = ".".join(not_host) + rest - self.hostname = ".".join(valid_parts) - break - i += 1 # emulate statement3 in JS for loop - - if len(self.hostname) > HOSTNAME_MAX_LEN: - self.hostname = "" - - # strip [ and ] from the hostname - # the host field still retains them, though - if ipv6_hostname: - self.hostname = self.hostname[1:-1] - - # chop off from the tail first. - hash = rest.find("#") # noqa: A001 - if hash != -1: - # got a fragment string. - self.hash = rest[hash:] - rest = rest[:hash] - qm = rest.find("?") - if qm != -1: - self.search = rest[qm:] - rest = rest[:qm] - if rest: - self.pathname = rest - if SLASHED_PROTOCOL[lower_proto] and self.hostname and not self.pathname: - self.pathname = "" - - return self - - def parse_host(self, host: str) -> None: - port_match = PORT_PATTERN.search(host) - if port_match: - port = port_match.group() - if port != ":": - self.port = port[1:] - host = host[: -len(port)] - if host: - self.hostname = host - - -def url_parse(url: URL | str, *, slashes_denote_host: bool = False) -> URL: - if isinstance(url, URL): - return url - u = MutableURL() - u.parse(url, slashes_denote_host) - return URL( - u.protocol, u.slashes, u.auth, u.port, u.hostname, u.hash, u.search, u.pathname - ) diff --git a/voxvera/vendor/mdurl/_url.py b/voxvera/vendor/mdurl/_url.py deleted file mode 100644 index f866e7a..0000000 --- a/voxvera/vendor/mdurl/_url.py +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import annotations - -from typing import NamedTuple - - -class URL(NamedTuple): - protocol: str | None - slashes: bool - auth: str | None - port: str | None - hostname: str | None - hash: str | None # noqa: A003 - search: str | None - pathname: str | None diff --git a/voxvera/vendor/mdurl/py.typed b/voxvera/vendor/mdurl/py.typed deleted file mode 100644 index 7632ecf..0000000 --- a/voxvera/vendor/mdurl/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561 diff --git a/voxvera/vendor/packaging-26.0.dist-info/INSTALLER b/voxvera/vendor/packaging-26.0.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/packaging-26.0.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/packaging-26.0.dist-info/METADATA b/voxvera/vendor/packaging-26.0.dist-info/METADATA deleted file mode 100644 index 3200e60..0000000 --- a/voxvera/vendor/packaging-26.0.dist-info/METADATA +++ /dev/null @@ -1,107 +0,0 @@ -Metadata-Version: 2.4 -Name: packaging -Version: 26.0 -Summary: Core utilities for Python packages -Author-email: Donald Stufft -Requires-Python: >=3.8 -Description-Content-Type: text/x-rst -License-Expression: Apache-2.0 OR BSD-2-Clause -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: 3.13 -Classifier: Programming Language :: Python :: 3.14 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Typing :: Typed -License-File: LICENSE -License-File: LICENSE.APACHE -License-File: LICENSE.BSD -Project-URL: Documentation, https://packaging.pypa.io/ -Project-URL: Source, https://github.com/pypa/packaging - -packaging -========= - -.. start-intro - -Reusable core utilities for various Python Packaging -`interoperability specifications `_. - -This library provides utilities that implement the interoperability -specifications which have clearly one correct behaviour (eg: :pep:`440`) -or benefit greatly from having a single shared implementation (eg: :pep:`425`). - -.. end-intro - -The ``packaging`` project includes the following: version handling, specifiers, -markers, requirements, tags, metadata, lockfiles, utilities. - -Documentation -------------- - -The `documentation`_ provides information and the API for the following: - -- Version Handling -- Specifiers -- Markers -- Requirements -- Tags -- Metadata -- Lockfiles -- Utilities - -Installation ------------- - -Use ``pip`` to install these utilities:: - - pip install packaging - -The ``packaging`` library uses calendar-based versioning (``YY.N``). - -Discussion ----------- - -If you run into bugs, you can file them in our `issue tracker`_. - -You can also join ``#pypa`` on Freenode to ask questions or get involved. - - -.. _`documentation`: https://packaging.pypa.io/ -.. _`issue tracker`: https://github.com/pypa/packaging/issues - - -Code of Conduct ---------------- - -Everyone interacting in the packaging project's codebases, issue trackers, chat -rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_. - -.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md - -Contributing ------------- - -The ``CONTRIBUTING.rst`` file outlines how to contribute to this project as -well as how to report a potential security issue. The documentation for this -project also covers information about `project development`_ and `security`_. - -.. _`project development`: https://packaging.pypa.io/en/latest/development/ -.. _`security`: https://packaging.pypa.io/en/latest/security/ - -Project History ---------------- - -Please review the ``CHANGELOG.rst`` file or the `Changelog documentation`_ for -recent changes and project history. - -.. _`Changelog documentation`: https://packaging.pypa.io/en/latest/changelog/ - diff --git a/voxvera/vendor/packaging-26.0.dist-info/RECORD b/voxvera/vendor/packaging-26.0.dist-info/RECORD deleted file mode 100644 index 6c826a9..0000000 --- a/voxvera/vendor/packaging-26.0.dist-info/RECORD +++ /dev/null @@ -1,25 +0,0 @@ -packaging-26.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -packaging-26.0.dist-info/METADATA,sha256=M2K7fWom2iliuo2qpHhc0LrKwhq6kIoRlcyPWVgKJlo,3309 -packaging-26.0.dist-info/RECORD,, -packaging-26.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 -packaging-26.0.dist-info/licenses/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197 -packaging-26.0.dist-info/licenses/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174 -packaging-26.0.dist-info/licenses/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344 -packaging/__init__.py,sha256=y4lVbpeBzCGk-IPDw5BGBZ_b0P3ukEEJZAbGYc6Ey8c,494 -packaging/_elffile.py,sha256=-sKkptYqzYw2-x3QByJa5mB4rfPWu1pxkZHRx1WAFCY,3211 -packaging/_manylinux.py,sha256=Hf6nB0cOrayEs96-p3oIXAgGnFquv20DO5l-o2_Xnv0,9559 -packaging/_musllinux.py,sha256=Z6swjH3MA7XS3qXnmMN7QPhqP3fnoYI0eQ18e9-HgAE,2707 -packaging/_parser.py,sha256=U_DajsEx2VoC_F46fSVV3hDKNCWoQYkPkasO3dld0ig,10518 -packaging/_structures.py,sha256=Hn49Ta8zV9Wo8GiCL8Nl2ARZY983Un3pruZGVNldPwE,1514 -packaging/_tokenizer.py,sha256=M8EwNIdXeL9NMFuFrQtiOKwjka_xFx8KjRQnfE8O_z8,5421 -packaging/licenses/__init__.py,sha256=TwXLHZCXwSgdFwRLPxW602T6mSieunSFHM6fp8pgW78,5819 -packaging/licenses/_spdx.py,sha256=WW7DXiyg68up_YND_wpRYlr1SHhiV4FfJLQffghhMxQ,51122 -packaging/markers.py,sha256=ZX-cLvW1S3cZcEc0fHI4z7zSx5U2T19yMpDP_mE-CYw,12771 -packaging/metadata.py,sha256=CWVZpN_HfoYMSSDuCP7igOvGgqA9AOmpW8f3qTisfnc,39360 -packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -packaging/pylock.py,sha256=-R1uNfJ4PaLto7Mg62YsGOHgvskuiIEqPwxOywl42Jk,22537 -packaging/requirements.py,sha256=PMCAWD8aNMnVD-6uZMedhBuAVX2573eZ4yPBLXmz04I,2870 -packaging/specifiers.py,sha256=EPNPimY_zFivthv1vdjZYz5IqkKGsnKR2yKh-EVyvZw,40797 -packaging/tags.py,sha256=cXLV1pJD3UtJlDg7Wz3zrfdQhRZqr8jumSAKKAAd2xE,22856 -packaging/utils.py,sha256=N4c6oZzFJy6klTZ3AnkNz7sSkJesuFWPp68LA3B5dAo,5040 -packaging/version.py,sha256=7XWlL2IDYLwDYC0ht6cFEhapLwLWbmyo4rb7sEFj0x8,23272 diff --git a/voxvera/vendor/packaging-26.0.dist-info/WHEEL b/voxvera/vendor/packaging-26.0.dist-info/WHEEL deleted file mode 100644 index d8b9936..0000000 --- a/voxvera/vendor/packaging-26.0.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: flit 3.12.0 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE b/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE deleted file mode 100644 index 6f62d44..0000000 --- a/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE +++ /dev/null @@ -1,3 +0,0 @@ -This software is made available under the terms of *either* of the licenses -found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made -under the terms of *both* these licenses. diff --git a/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE.APACHE b/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE.APACHE deleted file mode 100644 index f433b1a..0000000 --- a/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE.APACHE +++ /dev/null @@ -1,177 +0,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 diff --git a/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE.BSD b/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE.BSD deleted file mode 100644 index 42ce7b7..0000000 --- a/voxvera/vendor/packaging-26.0.dist-info/licenses/LICENSE.BSD +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) Donald Stufft and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/voxvera/vendor/packaging/__init__.py b/voxvera/vendor/packaging/__init__.py deleted file mode 100644 index 21695a7..0000000 --- a/voxvera/vendor/packaging/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -__title__ = "packaging" -__summary__ = "Core utilities for Python packages" -__uri__ = "https://github.com/pypa/packaging" - -__version__ = "26.0" - -__author__ = "Donald Stufft and individual contributors" -__email__ = "donald@stufft.io" - -__license__ = "BSD-2-Clause or Apache-2.0" -__copyright__ = f"2014 {__author__}" diff --git a/voxvera/vendor/packaging/_elffile.py b/voxvera/vendor/packaging/_elffile.py deleted file mode 100644 index 497b064..0000000 --- a/voxvera/vendor/packaging/_elffile.py +++ /dev/null @@ -1,108 +0,0 @@ -""" -ELF file parser. - -This provides a class ``ELFFile`` that parses an ELF executable in a similar -interface to ``ZipFile``. Only the read interface is implemented. - -ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html -""" - -from __future__ import annotations - -import enum -import os -import struct -from typing import IO - - -class ELFInvalid(ValueError): - pass - - -class EIClass(enum.IntEnum): - C32 = 1 - C64 = 2 - - -class EIData(enum.IntEnum): - Lsb = 1 - Msb = 2 - - -class EMachine(enum.IntEnum): - I386 = 3 - S390 = 22 - Arm = 40 - X8664 = 62 - AArc64 = 183 - - -class ELFFile: - """ - Representation of an ELF executable. - """ - - def __init__(self, f: IO[bytes]) -> None: - self._f = f - - try: - ident = self._read("16B") - except struct.error as e: - raise ELFInvalid("unable to parse identification") from e - magic = bytes(ident[:4]) - if magic != b"\x7fELF": - raise ELFInvalid(f"invalid magic: {magic!r}") - - self.capacity = ident[4] # Format for program header (bitness). - self.encoding = ident[5] # Data structure encoding (endianness). - - try: - # e_fmt: Format for program header. - # p_fmt: Format for section header. - # p_idx: Indexes to find p_type, p_offset, and p_filesz. - e_fmt, self._p_fmt, self._p_idx = { - (1, 1): ("HHIIIIIHHH", ">IIIIIIII", (0, 1, 4)), # 32-bit MSB. - (2, 1): ("HHIQQQIHHH", ">IIQQQQQQ", (0, 2, 5)), # 64-bit MSB. - }[(self.capacity, self.encoding)] - except KeyError as e: - raise ELFInvalid( - f"unrecognized capacity ({self.capacity}) or encoding ({self.encoding})" - ) from e - - try: - ( - _, - self.machine, # Architecture type. - _, - _, - self._e_phoff, # Offset of program header. - _, - self.flags, # Processor-specific flags. - _, - self._e_phentsize, # Size of section. - self._e_phnum, # Number of sections. - ) = self._read(e_fmt) - except struct.error as e: - raise ELFInvalid("unable to parse machine and section information") from e - - def _read(self, fmt: str) -> tuple[int, ...]: - return struct.unpack(fmt, self._f.read(struct.calcsize(fmt))) - - @property - def interpreter(self) -> str | None: - """ - The path recorded in the ``PT_INTERP`` section header. - """ - for index in range(self._e_phnum): - self._f.seek(self._e_phoff + self._e_phentsize * index) - try: - data = self._read(self._p_fmt) - except struct.error: - continue - if data[self._p_idx[0]] != 3: # Not PT_INTERP. - continue - self._f.seek(data[self._p_idx[1]]) - return os.fsdecode(self._f.read(data[self._p_idx[2]])).strip("\0") - return None diff --git a/voxvera/vendor/packaging/_manylinux.py b/voxvera/vendor/packaging/_manylinux.py deleted file mode 100644 index 0e79e8a..0000000 --- a/voxvera/vendor/packaging/_manylinux.py +++ /dev/null @@ -1,262 +0,0 @@ -from __future__ import annotations - -import collections -import contextlib -import functools -import os -import re -import sys -import warnings -from typing import Generator, Iterator, NamedTuple, Sequence - -from ._elffile import EIClass, EIData, ELFFile, EMachine - -EF_ARM_ABIMASK = 0xFF000000 -EF_ARM_ABI_VER5 = 0x05000000 -EF_ARM_ABI_FLOAT_HARD = 0x00000400 - -_ALLOWED_ARCHS = { - "x86_64", - "aarch64", - "ppc64", - "ppc64le", - "s390x", - "loongarch64", - "riscv64", -} - - -# `os.PathLike` not a generic type until Python 3.9, so sticking with `str` -# as the type for `path` until then. -@contextlib.contextmanager -def _parse_elf(path: str) -> Generator[ELFFile | None, None, None]: - try: - with open(path, "rb") as f: - yield ELFFile(f) - except (OSError, TypeError, ValueError): - yield None - - -def _is_linux_armhf(executable: str) -> bool: - # hard-float ABI can be detected from the ELF header of the running - # process - # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf - with _parse_elf(executable) as f: - return ( - f is not None - and f.capacity == EIClass.C32 - and f.encoding == EIData.Lsb - and f.machine == EMachine.Arm - and f.flags & EF_ARM_ABIMASK == EF_ARM_ABI_VER5 - and f.flags & EF_ARM_ABI_FLOAT_HARD == EF_ARM_ABI_FLOAT_HARD - ) - - -def _is_linux_i686(executable: str) -> bool: - with _parse_elf(executable) as f: - return ( - f is not None - and f.capacity == EIClass.C32 - and f.encoding == EIData.Lsb - and f.machine == EMachine.I386 - ) - - -def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool: - if "armv7l" in archs: - return _is_linux_armhf(executable) - if "i686" in archs: - return _is_linux_i686(executable) - return any(arch in _ALLOWED_ARCHS for arch in archs) - - -# If glibc ever changes its major version, we need to know what the last -# minor version was, so we can build the complete list of all versions. -# For now, guess what the highest minor version might be, assume it will -# be 50 for testing. Once this actually happens, update the dictionary -# with the actual value. -_LAST_GLIBC_MINOR: dict[int, int] = collections.defaultdict(lambda: 50) - - -class _GLibCVersion(NamedTuple): - major: int - minor: int - - -def _glibc_version_string_confstr() -> str | None: - """ - Primary implementation of glibc_version_string using os.confstr. - """ - # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely - # to be broken or missing. This strategy is used in the standard library - # platform module. - # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183 - try: - # Should be a string like "glibc 2.17". - version_string: str | None = os.confstr("CS_GNU_LIBC_VERSION") - assert version_string is not None - _, version = version_string.rsplit() - except (AssertionError, AttributeError, OSError, ValueError): - # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)... - return None - return version - - -def _glibc_version_string_ctypes() -> str | None: - """ - Fallback implementation of glibc_version_string using ctypes. - """ - try: - import ctypes # noqa: PLC0415 - except ImportError: - return None - - # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen - # manpage says, "If filename is NULL, then the returned handle is for the - # main program". This way we can let the linker do the work to figure out - # which libc our process is actually using. - # - # We must also handle the special case where the executable is not a - # dynamically linked executable. This can occur when using musl libc, - # for example. In this situation, dlopen() will error, leading to an - # OSError. Interestingly, at least in the case of musl, there is no - # errno set on the OSError. The single string argument used to construct - # OSError comes from libc itself and is therefore not portable to - # hard code here. In any case, failure to call dlopen() means we - # can proceed, so we bail on our attempt. - try: - process_namespace = ctypes.CDLL(None) - except OSError: - return None - - try: - gnu_get_libc_version = process_namespace.gnu_get_libc_version - except AttributeError: - # Symbol doesn't exist -> therefore, we are not linked to - # glibc. - return None - - # Call gnu_get_libc_version, which returns a string like "2.5" - gnu_get_libc_version.restype = ctypes.c_char_p - version_str: str = gnu_get_libc_version() - # py2 / py3 compatibility: - if not isinstance(version_str, str): - version_str = version_str.decode("ascii") - - return version_str - - -def _glibc_version_string() -> str | None: - """Returns glibc version string, or None if not using glibc.""" - return _glibc_version_string_confstr() or _glibc_version_string_ctypes() - - -def _parse_glibc_version(version_str: str) -> _GLibCVersion: - """Parse glibc version. - - We use a regexp instead of str.split because we want to discard any - random junk that might come after the minor version -- this might happen - in patched/forked versions of glibc (e.g. Linaro's version of glibc - uses version strings like "2.20-2014.11"). See gh-3588. - """ - m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) - if not m: - warnings.warn( - f"Expected glibc version with 2 components major.minor, got: {version_str}", - RuntimeWarning, - stacklevel=2, - ) - return _GLibCVersion(-1, -1) - return _GLibCVersion(int(m.group("major")), int(m.group("minor"))) - - -@functools.lru_cache -def _get_glibc_version() -> _GLibCVersion: - version_str = _glibc_version_string() - if version_str is None: - return _GLibCVersion(-1, -1) - return _parse_glibc_version(version_str) - - -# From PEP 513, PEP 600 -def _is_compatible(arch: str, version: _GLibCVersion) -> bool: - sys_glibc = _get_glibc_version() - if sys_glibc < version: - return False - # Check for presence of _manylinux module. - try: - import _manylinux # noqa: PLC0415 - except ImportError: - return True - if hasattr(_manylinux, "manylinux_compatible"): - result = _manylinux.manylinux_compatible(version[0], version[1], arch) - if result is not None: - return bool(result) - return True - if version == _GLibCVersion(2, 5) and hasattr(_manylinux, "manylinux1_compatible"): - return bool(_manylinux.manylinux1_compatible) - if version == _GLibCVersion(2, 12) and hasattr( - _manylinux, "manylinux2010_compatible" - ): - return bool(_manylinux.manylinux2010_compatible) - if version == _GLibCVersion(2, 17) and hasattr( - _manylinux, "manylinux2014_compatible" - ): - return bool(_manylinux.manylinux2014_compatible) - return True - - -_LEGACY_MANYLINUX_MAP: dict[_GLibCVersion, str] = { - # CentOS 7 w/ glibc 2.17 (PEP 599) - _GLibCVersion(2, 17): "manylinux2014", - # CentOS 6 w/ glibc 2.12 (PEP 571) - _GLibCVersion(2, 12): "manylinux2010", - # CentOS 5 w/ glibc 2.5 (PEP 513) - _GLibCVersion(2, 5): "manylinux1", -} - - -def platform_tags(archs: Sequence[str]) -> Iterator[str]: - """Generate manylinux tags compatible to the current platform. - - :param archs: Sequence of compatible architectures. - The first one shall be the closest to the actual architecture and be the part of - platform tag after the ``linux_`` prefix, e.g. ``x86_64``. - The ``linux_`` prefix is assumed as a prerequisite for the current platform to - be manylinux-compatible. - - :returns: An iterator of compatible manylinux tags. - """ - if not _have_compatible_abi(sys.executable, archs): - return - # Oldest glibc to be supported regardless of architecture is (2, 17). - too_old_glibc2 = _GLibCVersion(2, 16) - if set(archs) & {"x86_64", "i686"}: - # On x86/i686 also oldest glibc to be supported is (2, 5). - too_old_glibc2 = _GLibCVersion(2, 4) - current_glibc = _GLibCVersion(*_get_glibc_version()) - glibc_max_list = [current_glibc] - # We can assume compatibility across glibc major versions. - # https://sourceware.org/bugzilla/show_bug.cgi?id=24636 - # - # Build a list of maximum glibc versions so that we can - # output the canonical list of all glibc from current_glibc - # down to too_old_glibc2, including all intermediary versions. - for glibc_major in range(current_glibc.major - 1, 1, -1): - glibc_minor = _LAST_GLIBC_MINOR[glibc_major] - glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor)) - for arch in archs: - for glibc_max in glibc_max_list: - if glibc_max.major == too_old_glibc2.major: - min_minor = too_old_glibc2.minor - else: - # For other glibc major versions oldest supported is (x, 0). - min_minor = -1 - for glibc_minor in range(glibc_max.minor, min_minor, -1): - glibc_version = _GLibCVersion(glibc_max.major, glibc_minor) - if _is_compatible(arch, glibc_version): - yield "manylinux_{}_{}_{}".format(*glibc_version, arch) - - # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags. - if legacy_tag := _LEGACY_MANYLINUX_MAP.get(glibc_version): - yield f"{legacy_tag}_{arch}" diff --git a/voxvera/vendor/packaging/_musllinux.py b/voxvera/vendor/packaging/_musllinux.py deleted file mode 100644 index 4e8116a..0000000 --- a/voxvera/vendor/packaging/_musllinux.py +++ /dev/null @@ -1,85 +0,0 @@ -"""PEP 656 support. - -This module implements logic to detect if the currently running Python is -linked against musl, and what musl version is used. -""" - -from __future__ import annotations - -import functools -import re -import subprocess -import sys -from typing import Iterator, NamedTuple, Sequence - -from ._elffile import ELFFile - - -class _MuslVersion(NamedTuple): - major: int - minor: int - - -def _parse_musl_version(output: str) -> _MuslVersion | None: - lines = [n for n in (n.strip() for n in output.splitlines()) if n] - if len(lines) < 2 or lines[0][:4] != "musl": - return None - m = re.match(r"Version (\d+)\.(\d+)", lines[1]) - if not m: - return None - return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2))) - - -@functools.lru_cache -def _get_musl_version(executable: str) -> _MuslVersion | None: - """Detect currently-running musl runtime version. - - This is done by checking the specified executable's dynamic linking - information, and invoking the loader to parse its output for a version - string. If the loader is musl, the output would be something like:: - - musl libc (x86_64) - Version 1.2.2 - Dynamic Program Loader - """ - try: - with open(executable, "rb") as f: - ld = ELFFile(f).interpreter - except (OSError, TypeError, ValueError): - return None - if ld is None or "musl" not in ld: - return None - proc = subprocess.run([ld], check=False, stderr=subprocess.PIPE, text=True) - return _parse_musl_version(proc.stderr) - - -def platform_tags(archs: Sequence[str]) -> Iterator[str]: - """Generate musllinux tags compatible to the current platform. - - :param archs: Sequence of compatible architectures. - The first one shall be the closest to the actual architecture and be the part of - platform tag after the ``linux_`` prefix, e.g. ``x86_64``. - The ``linux_`` prefix is assumed as a prerequisite for the current platform to - be musllinux-compatible. - - :returns: An iterator of compatible musllinux tags. - """ - sys_musl = _get_musl_version(sys.executable) - if sys_musl is None: # Python not dynamically linked against musl. - return - for arch in archs: - for minor in range(sys_musl.minor, -1, -1): - yield f"musllinux_{sys_musl.major}_{minor}_{arch}" - - -if __name__ == "__main__": # pragma: no cover - import sysconfig - - plat = sysconfig.get_platform() - assert plat.startswith("linux-"), "not linux" - - print("plat:", plat) - print("musl:", _get_musl_version(sys.executable)) - print("tags:", end=" ") - for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])): - print(t, end="\n ") diff --git a/voxvera/vendor/packaging/_parser.py b/voxvera/vendor/packaging/_parser.py deleted file mode 100644 index f6c1f5c..0000000 --- a/voxvera/vendor/packaging/_parser.py +++ /dev/null @@ -1,365 +0,0 @@ -"""Handwritten parser of dependency specifiers. - -The docstring for each __parse_* function contains EBNF-inspired grammar representing -the implementation. -""" - -from __future__ import annotations - -import ast -from typing import List, Literal, NamedTuple, Sequence, Tuple, Union - -from ._tokenizer import DEFAULT_RULES, Tokenizer - - -class Node: - __slots__ = ("value",) - - def __init__(self, value: str) -> None: - self.value = value - - def __str__(self) -> str: - return self.value - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}({self.value!r})>" - - def serialize(self) -> str: - raise NotImplementedError - - -class Variable(Node): - __slots__ = () - - def serialize(self) -> str: - return str(self) - - -class Value(Node): - __slots__ = () - - def serialize(self) -> str: - return f'"{self}"' - - -class Op(Node): - __slots__ = () - - def serialize(self) -> str: - return str(self) - - -MarkerLogical = Literal["and", "or"] -MarkerVar = Union[Variable, Value] -MarkerItem = Tuple[MarkerVar, Op, MarkerVar] -MarkerAtom = Union[MarkerItem, Sequence["MarkerAtom"]] -MarkerList = List[Union["MarkerList", MarkerAtom, MarkerLogical]] - - -class ParsedRequirement(NamedTuple): - name: str - url: str - extras: list[str] - specifier: str - marker: MarkerList | None - - -# -------------------------------------------------------------------------------------- -# Recursive descent parser for dependency specifier -# -------------------------------------------------------------------------------------- -def parse_requirement(source: str) -> ParsedRequirement: - return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) - - -def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement: - """ - requirement = WS? IDENTIFIER WS? extras WS? requirement_details - """ - tokenizer.consume("WS") - - name_token = tokenizer.expect( - "IDENTIFIER", expected="package name at the start of dependency specifier" - ) - name = name_token.text - tokenizer.consume("WS") - - extras = _parse_extras(tokenizer) - tokenizer.consume("WS") - - url, specifier, marker = _parse_requirement_details(tokenizer) - tokenizer.expect("END", expected="end of dependency specifier") - - return ParsedRequirement(name, url, extras, specifier, marker) - - -def _parse_requirement_details( - tokenizer: Tokenizer, -) -> tuple[str, str, MarkerList | None]: - """ - requirement_details = AT URL (WS requirement_marker?)? - | specifier WS? (requirement_marker)? - """ - - specifier = "" - url = "" - marker = None - - if tokenizer.check("AT"): - tokenizer.read() - tokenizer.consume("WS") - - url_start = tokenizer.position - url = tokenizer.expect("URL", expected="URL after @").text - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - tokenizer.expect("WS", expected="whitespace after URL") - - # The input might end after whitespace. - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - marker = _parse_requirement_marker( - tokenizer, - span_start=url_start, - expected="semicolon (after URL and whitespace)", - ) - else: - specifier_start = tokenizer.position - specifier = _parse_specifier(tokenizer) - tokenizer.consume("WS") - - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - marker = _parse_requirement_marker( - tokenizer, - span_start=specifier_start, - expected=( - "comma (within version specifier), semicolon (after version specifier)" - if specifier - else "semicolon (after name with no version specifier)" - ), - ) - - return (url, specifier, marker) - - -def _parse_requirement_marker( - tokenizer: Tokenizer, *, span_start: int, expected: str -) -> MarkerList: - """ - requirement_marker = SEMICOLON marker WS? - """ - - if not tokenizer.check("SEMICOLON"): - tokenizer.raise_syntax_error( - f"Expected {expected} or end", - span_start=span_start, - span_end=None, - ) - tokenizer.read() - - marker = _parse_marker(tokenizer) - tokenizer.consume("WS") - - return marker - - -def _parse_extras(tokenizer: Tokenizer) -> list[str]: - """ - extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)? - """ - if not tokenizer.check("LEFT_BRACKET", peek=True): - return [] - - with tokenizer.enclosing_tokens( - "LEFT_BRACKET", - "RIGHT_BRACKET", - around="extras", - ): - tokenizer.consume("WS") - extras = _parse_extras_list(tokenizer) - tokenizer.consume("WS") - - return extras - - -def _parse_extras_list(tokenizer: Tokenizer) -> list[str]: - """ - extras_list = identifier (wsp* ',' wsp* identifier)* - """ - extras: list[str] = [] - - if not tokenizer.check("IDENTIFIER"): - return extras - - extras.append(tokenizer.read().text) - - while True: - tokenizer.consume("WS") - if tokenizer.check("IDENTIFIER", peek=True): - tokenizer.raise_syntax_error("Expected comma between extra names") - elif not tokenizer.check("COMMA"): - break - - tokenizer.read() - tokenizer.consume("WS") - - extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma") - extras.append(extra_token.text) - - return extras - - -def _parse_specifier(tokenizer: Tokenizer) -> str: - """ - specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS - | WS? version_many WS? - """ - with tokenizer.enclosing_tokens( - "LEFT_PARENTHESIS", - "RIGHT_PARENTHESIS", - around="version specifier", - ): - tokenizer.consume("WS") - parsed_specifiers = _parse_version_many(tokenizer) - tokenizer.consume("WS") - - return parsed_specifiers - - -def _parse_version_many(tokenizer: Tokenizer) -> str: - """ - version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)? - """ - parsed_specifiers = "" - while tokenizer.check("SPECIFIER"): - span_start = tokenizer.position - parsed_specifiers += tokenizer.read().text - if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True): - tokenizer.raise_syntax_error( - ".* suffix can only be used with `==` or `!=` operators", - span_start=span_start, - span_end=tokenizer.position + 1, - ) - if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True): - tokenizer.raise_syntax_error( - "Local version label can only be used with `==` or `!=` operators", - span_start=span_start, - span_end=tokenizer.position, - ) - tokenizer.consume("WS") - if not tokenizer.check("COMMA"): - break - parsed_specifiers += tokenizer.read().text - tokenizer.consume("WS") - - return parsed_specifiers - - -# -------------------------------------------------------------------------------------- -# Recursive descent parser for marker expression -# -------------------------------------------------------------------------------------- -def parse_marker(source: str) -> MarkerList: - return _parse_full_marker(Tokenizer(source, rules=DEFAULT_RULES)) - - -def _parse_full_marker(tokenizer: Tokenizer) -> MarkerList: - retval = _parse_marker(tokenizer) - tokenizer.expect("END", expected="end of marker expression") - return retval - - -def _parse_marker(tokenizer: Tokenizer) -> MarkerList: - """ - marker = marker_atom (BOOLOP marker_atom)+ - """ - expression = [_parse_marker_atom(tokenizer)] - while tokenizer.check("BOOLOP"): - token = tokenizer.read() - expr_right = _parse_marker_atom(tokenizer) - expression.extend((token.text, expr_right)) - return expression - - -def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom: - """ - marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS? - | WS? marker_item WS? - """ - - tokenizer.consume("WS") - if tokenizer.check("LEFT_PARENTHESIS", peek=True): - with tokenizer.enclosing_tokens( - "LEFT_PARENTHESIS", - "RIGHT_PARENTHESIS", - around="marker expression", - ): - tokenizer.consume("WS") - marker: MarkerAtom = _parse_marker(tokenizer) - tokenizer.consume("WS") - else: - marker = _parse_marker_item(tokenizer) - tokenizer.consume("WS") - return marker - - -def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem: - """ - marker_item = WS? marker_var WS? marker_op WS? marker_var WS? - """ - tokenizer.consume("WS") - marker_var_left = _parse_marker_var(tokenizer) - tokenizer.consume("WS") - marker_op = _parse_marker_op(tokenizer) - tokenizer.consume("WS") - marker_var_right = _parse_marker_var(tokenizer) - tokenizer.consume("WS") - return (marker_var_left, marker_op, marker_var_right) - - -def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar: # noqa: RET503 - """ - marker_var = VARIABLE | QUOTED_STRING - """ - if tokenizer.check("VARIABLE"): - return process_env_var(tokenizer.read().text.replace(".", "_")) - elif tokenizer.check("QUOTED_STRING"): - return process_python_str(tokenizer.read().text) - else: - tokenizer.raise_syntax_error( - message="Expected a marker variable or quoted string" - ) - - -def process_env_var(env_var: str) -> Variable: - if env_var in ("platform_python_implementation", "python_implementation"): - return Variable("platform_python_implementation") - else: - return Variable(env_var) - - -def process_python_str(python_str: str) -> Value: - value = ast.literal_eval(python_str) - return Value(str(value)) - - -def _parse_marker_op(tokenizer: Tokenizer) -> Op: - """ - marker_op = IN | NOT IN | OP - """ - if tokenizer.check("IN"): - tokenizer.read() - return Op("in") - elif tokenizer.check("NOT"): - tokenizer.read() - tokenizer.expect("WS", expected="whitespace after 'not'") - tokenizer.expect("IN", expected="'in' after 'not'") - return Op("not in") - elif tokenizer.check("OP"): - return Op(tokenizer.read().text) - else: - return tokenizer.raise_syntax_error( - "Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in" - ) diff --git a/voxvera/vendor/packaging/_structures.py b/voxvera/vendor/packaging/_structures.py deleted file mode 100644 index 225e2ee..0000000 --- a/voxvera/vendor/packaging/_structures.py +++ /dev/null @@ -1,69 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -import typing - - -@typing.final -class InfinityType: - __slots__ = () - - def __repr__(self) -> str: - return "Infinity" - - def __hash__(self) -> int: - return hash(repr(self)) - - def __lt__(self, other: object) -> bool: - return False - - def __le__(self, other: object) -> bool: - return False - - def __eq__(self, other: object) -> bool: - return isinstance(other, self.__class__) - - def __gt__(self, other: object) -> bool: - return True - - def __ge__(self, other: object) -> bool: - return True - - def __neg__(self: object) -> "NegativeInfinityType": - return NegativeInfinity - - -Infinity = InfinityType() - - -@typing.final -class NegativeInfinityType: - __slots__ = () - - def __repr__(self) -> str: - return "-Infinity" - - def __hash__(self) -> int: - return hash(repr(self)) - - def __lt__(self, other: object) -> bool: - return True - - def __le__(self, other: object) -> bool: - return True - - def __eq__(self, other: object) -> bool: - return isinstance(other, self.__class__) - - def __gt__(self, other: object) -> bool: - return False - - def __ge__(self, other: object) -> bool: - return False - - def __neg__(self: object) -> InfinityType: - return Infinity - - -NegativeInfinity = NegativeInfinityType() diff --git a/voxvera/vendor/packaging/_tokenizer.py b/voxvera/vendor/packaging/_tokenizer.py deleted file mode 100644 index e6d20dd..0000000 --- a/voxvera/vendor/packaging/_tokenizer.py +++ /dev/null @@ -1,193 +0,0 @@ -from __future__ import annotations - -import contextlib -import re -from dataclasses import dataclass -from typing import Generator, Mapping, NoReturn - -from .specifiers import Specifier - - -@dataclass -class Token: - name: str - text: str - position: int - - -class ParserSyntaxError(Exception): - """The provided source text could not be parsed correctly.""" - - def __init__( - self, - message: str, - *, - source: str, - span: tuple[int, int], - ) -> None: - self.span = span - self.message = message - self.source = source - - super().__init__() - - def __str__(self) -> str: - marker = " " * self.span[0] + "~" * (self.span[1] - self.span[0]) + "^" - return f"{self.message}\n {self.source}\n {marker}" - - -DEFAULT_RULES: dict[str, re.Pattern[str]] = { - "LEFT_PARENTHESIS": re.compile(r"\("), - "RIGHT_PARENTHESIS": re.compile(r"\)"), - "LEFT_BRACKET": re.compile(r"\["), - "RIGHT_BRACKET": re.compile(r"\]"), - "SEMICOLON": re.compile(r";"), - "COMMA": re.compile(r","), - "QUOTED_STRING": re.compile( - r""" - ( - ('[^']*') - | - ("[^"]*") - ) - """, - re.VERBOSE, - ), - "OP": re.compile(r"(===|==|~=|!=|<=|>=|<|>)"), - "BOOLOP": re.compile(r"\b(or|and)\b"), - "IN": re.compile(r"\bin\b"), - "NOT": re.compile(r"\bnot\b"), - "VARIABLE": re.compile( - r""" - \b( - python_version - |python_full_version - |os[._]name - |sys[._]platform - |platform_(release|system) - |platform[._](version|machine|python_implementation) - |python_implementation - |implementation_(name|version) - |extras? - |dependency_groups - )\b - """, - re.VERBOSE, - ), - "SPECIFIER": re.compile( - Specifier._operator_regex_str + Specifier._version_regex_str, - re.VERBOSE | re.IGNORECASE, - ), - "AT": re.compile(r"\@"), - "URL": re.compile(r"[^ \t]+"), - "IDENTIFIER": re.compile(r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b"), - "VERSION_PREFIX_TRAIL": re.compile(r"\.\*"), - "VERSION_LOCAL_LABEL_TRAIL": re.compile(r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*"), - "WS": re.compile(r"[ \t]+"), - "END": re.compile(r"$"), -} - - -class Tokenizer: - """Context-sensitive token parsing. - - Provides methods to examine the input stream to check whether the next token - matches. - """ - - def __init__( - self, - source: str, - *, - rules: Mapping[str, re.Pattern[str]], - ) -> None: - self.source = source - self.rules = rules - self.next_token: Token | None = None - self.position = 0 - - def consume(self, name: str) -> None: - """Move beyond provided token name, if at current position.""" - if self.check(name): - self.read() - - def check(self, name: str, *, peek: bool = False) -> bool: - """Check whether the next token has the provided name. - - By default, if the check succeeds, the token *must* be read before - another check. If `peek` is set to `True`, the token is not loaded and - would need to be checked again. - """ - assert self.next_token is None, ( - f"Cannot check for {name!r}, already have {self.next_token!r}" - ) - assert name in self.rules, f"Unknown token name: {name!r}" - - expression = self.rules[name] - - match = expression.match(self.source, self.position) - if match is None: - return False - if not peek: - self.next_token = Token(name, match[0], self.position) - return True - - def expect(self, name: str, *, expected: str) -> Token: - """Expect a certain token name next, failing with a syntax error otherwise. - - The token is *not* read. - """ - if not self.check(name): - raise self.raise_syntax_error(f"Expected {expected}") - return self.read() - - def read(self) -> Token: - """Consume the next token and return it.""" - token = self.next_token - assert token is not None - - self.position += len(token.text) - self.next_token = None - - return token - - def raise_syntax_error( - self, - message: str, - *, - span_start: int | None = None, - span_end: int | None = None, - ) -> NoReturn: - """Raise ParserSyntaxError at the given position.""" - span = ( - self.position if span_start is None else span_start, - self.position if span_end is None else span_end, - ) - raise ParserSyntaxError( - message, - source=self.source, - span=span, - ) - - @contextlib.contextmanager - def enclosing_tokens( - self, open_token: str, close_token: str, *, around: str - ) -> Generator[None, None, None]: - if self.check(open_token): - open_position = self.position - self.read() - else: - open_position = None - - yield - - if open_position is None: - return - - if not self.check(close_token): - self.raise_syntax_error( - f"Expected matching {close_token} for {open_token}, after {around}", - span_start=open_position, - ) - - self.read() diff --git a/voxvera/vendor/packaging/licenses/__init__.py b/voxvera/vendor/packaging/licenses/__init__.py deleted file mode 100644 index 335b275..0000000 --- a/voxvera/vendor/packaging/licenses/__init__.py +++ /dev/null @@ -1,147 +0,0 @@ -####################################################################################### -# -# Adapted from: -# https://github.com/pypa/hatch/blob/5352e44/backend/src/hatchling/licenses/parse.py -# -# MIT License -# -# Copyright (c) 2017-present Ofek Lev -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of this -# software and associated documentation files (the "Software"), to deal in the Software -# without restriction, including without limitation the rights to use, copy, modify, -# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be included in all copies -# or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# -# With additional allowance of arbitrary `LicenseRef-` identifiers, not just -# `LicenseRef-Public-Domain` and `LicenseRef-Proprietary`. -# -####################################################################################### -from __future__ import annotations - -import re -from typing import NewType, cast - -from ._spdx import EXCEPTIONS, LICENSES - -__all__ = [ - "InvalidLicenseExpression", - "NormalizedLicenseExpression", - "canonicalize_license_expression", -] - -license_ref_allowed = re.compile("^[A-Za-z0-9.-]*$") - -NormalizedLicenseExpression = NewType("NormalizedLicenseExpression", str) - - -class InvalidLicenseExpression(ValueError): - """Raised when a license-expression string is invalid - - >>> canonicalize_license_expression("invalid") - Traceback (most recent call last): - ... - packaging.licenses.InvalidLicenseExpression: Invalid license expression: 'invalid' - """ - - -def canonicalize_license_expression( - raw_license_expression: str, -) -> NormalizedLicenseExpression: - if not raw_license_expression: - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) - - # Pad any parentheses so tokenization can be achieved by merely splitting on - # whitespace. - license_expression = raw_license_expression.replace("(", " ( ").replace(")", " ) ") - licenseref_prefix = "LicenseRef-" - license_refs = { - ref.lower(): "LicenseRef-" + ref[len(licenseref_prefix) :] - for ref in license_expression.split() - if ref.lower().startswith(licenseref_prefix.lower()) - } - - # Normalize to lower case so we can look up licenses/exceptions - # and so boolean operators are Python-compatible. - license_expression = license_expression.lower() - - tokens = license_expression.split() - - # Rather than implementing a parenthesis/boolean logic parser, create an - # expression that Python can parse. Everything that is not involved with the - # grammar itself is replaced with the placeholder `False` and the resultant - # expression should become a valid Python expression. - python_tokens = [] - for token in tokens: - if token not in {"or", "and", "with", "(", ")"}: - python_tokens.append("False") - elif token == "with": - python_tokens.append("or") - elif ( - token == "(" - and python_tokens - and python_tokens[-1] not in {"or", "and", "("} - ) or (token == ")" and python_tokens and python_tokens[-1] == "("): - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) - else: - python_tokens.append(token) - - python_expression = " ".join(python_tokens) - try: - compile(python_expression, "", "eval") - except SyntaxError: - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) from None - - # Take a final pass to check for unknown licenses/exceptions. - normalized_tokens = [] - for token in tokens: - if token in {"or", "and", "with", "(", ")"}: - normalized_tokens.append(token.upper()) - continue - - if normalized_tokens and normalized_tokens[-1] == "WITH": - if token not in EXCEPTIONS: - message = f"Unknown license exception: {token!r}" - raise InvalidLicenseExpression(message) - - normalized_tokens.append(EXCEPTIONS[token]["id"]) - else: - if token.endswith("+"): - final_token = token[:-1] - suffix = "+" - else: - final_token = token - suffix = "" - - if final_token.startswith("licenseref-"): - if not license_ref_allowed.match(final_token): - message = f"Invalid licenseref: {final_token!r}" - raise InvalidLicenseExpression(message) - normalized_tokens.append(license_refs[final_token] + suffix) - else: - if final_token not in LICENSES: - message = f"Unknown license: {final_token!r}" - raise InvalidLicenseExpression(message) - normalized_tokens.append(LICENSES[final_token]["id"] + suffix) - - normalized_expression = " ".join(normalized_tokens) - - return cast( - "NormalizedLicenseExpression", - normalized_expression.replace("( ", "(").replace(" )", ")"), - ) diff --git a/voxvera/vendor/packaging/licenses/_spdx.py b/voxvera/vendor/packaging/licenses/_spdx.py deleted file mode 100644 index a277af2..0000000 --- a/voxvera/vendor/packaging/licenses/_spdx.py +++ /dev/null @@ -1,799 +0,0 @@ - -from __future__ import annotations - -from typing import TypedDict - -class SPDXLicense(TypedDict): - id: str - deprecated: bool - -class SPDXException(TypedDict): - id: str - deprecated: bool - - -VERSION = '3.27.0' - -LICENSES: dict[str, SPDXLicense] = { - '0bsd': {'id': '0BSD', 'deprecated': False}, - '3d-slicer-1.0': {'id': '3D-Slicer-1.0', 'deprecated': False}, - 'aal': {'id': 'AAL', 'deprecated': False}, - 'abstyles': {'id': 'Abstyles', 'deprecated': False}, - 'adacore-doc': {'id': 'AdaCore-doc', 'deprecated': False}, - 'adobe-2006': {'id': 'Adobe-2006', 'deprecated': False}, - 'adobe-display-postscript': {'id': 'Adobe-Display-PostScript', 'deprecated': False}, - 'adobe-glyph': {'id': 'Adobe-Glyph', 'deprecated': False}, - 'adobe-utopia': {'id': 'Adobe-Utopia', 'deprecated': False}, - 'adsl': {'id': 'ADSL', 'deprecated': False}, - 'afl-1.1': {'id': 'AFL-1.1', 'deprecated': False}, - 'afl-1.2': {'id': 'AFL-1.2', 'deprecated': False}, - 'afl-2.0': {'id': 'AFL-2.0', 'deprecated': False}, - 'afl-2.1': {'id': 'AFL-2.1', 'deprecated': False}, - 'afl-3.0': {'id': 'AFL-3.0', 'deprecated': False}, - 'afmparse': {'id': 'Afmparse', 'deprecated': False}, - 'agpl-1.0': {'id': 'AGPL-1.0', 'deprecated': True}, - 'agpl-1.0-only': {'id': 'AGPL-1.0-only', 'deprecated': False}, - 'agpl-1.0-or-later': {'id': 'AGPL-1.0-or-later', 'deprecated': False}, - 'agpl-3.0': {'id': 'AGPL-3.0', 'deprecated': True}, - 'agpl-3.0-only': {'id': 'AGPL-3.0-only', 'deprecated': False}, - 'agpl-3.0-or-later': {'id': 'AGPL-3.0-or-later', 'deprecated': False}, - 'aladdin': {'id': 'Aladdin', 'deprecated': False}, - 'amd-newlib': {'id': 'AMD-newlib', 'deprecated': False}, - 'amdplpa': {'id': 'AMDPLPA', 'deprecated': False}, - 'aml': {'id': 'AML', 'deprecated': False}, - 'aml-glslang': {'id': 'AML-glslang', 'deprecated': False}, - 'ampas': {'id': 'AMPAS', 'deprecated': False}, - 'antlr-pd': {'id': 'ANTLR-PD', 'deprecated': False}, - 'antlr-pd-fallback': {'id': 'ANTLR-PD-fallback', 'deprecated': False}, - 'any-osi': {'id': 'any-OSI', 'deprecated': False}, - 'any-osi-perl-modules': {'id': 'any-OSI-perl-modules', 'deprecated': False}, - 'apache-1.0': {'id': 'Apache-1.0', 'deprecated': False}, - 'apache-1.1': {'id': 'Apache-1.1', 'deprecated': False}, - 'apache-2.0': {'id': 'Apache-2.0', 'deprecated': False}, - 'apafml': {'id': 'APAFML', 'deprecated': False}, - 'apl-1.0': {'id': 'APL-1.0', 'deprecated': False}, - 'app-s2p': {'id': 'App-s2p', 'deprecated': False}, - 'apsl-1.0': {'id': 'APSL-1.0', 'deprecated': False}, - 'apsl-1.1': {'id': 'APSL-1.1', 'deprecated': False}, - 'apsl-1.2': {'id': 'APSL-1.2', 'deprecated': False}, - 'apsl-2.0': {'id': 'APSL-2.0', 'deprecated': False}, - 'arphic-1999': {'id': 'Arphic-1999', 'deprecated': False}, - 'artistic-1.0': {'id': 'Artistic-1.0', 'deprecated': False}, - 'artistic-1.0-cl8': {'id': 'Artistic-1.0-cl8', 'deprecated': False}, - 'artistic-1.0-perl': {'id': 'Artistic-1.0-Perl', 'deprecated': False}, - 'artistic-2.0': {'id': 'Artistic-2.0', 'deprecated': False}, - 'artistic-dist': {'id': 'Artistic-dist', 'deprecated': False}, - 'aspell-ru': {'id': 'Aspell-RU', 'deprecated': False}, - 'aswf-digital-assets-1.0': {'id': 'ASWF-Digital-Assets-1.0', 'deprecated': False}, - 'aswf-digital-assets-1.1': {'id': 'ASWF-Digital-Assets-1.1', 'deprecated': False}, - 'baekmuk': {'id': 'Baekmuk', 'deprecated': False}, - 'bahyph': {'id': 'Bahyph', 'deprecated': False}, - 'barr': {'id': 'Barr', 'deprecated': False}, - 'bcrypt-solar-designer': {'id': 'bcrypt-Solar-Designer', 'deprecated': False}, - 'beerware': {'id': 'Beerware', 'deprecated': False}, - 'bitstream-charter': {'id': 'Bitstream-Charter', 'deprecated': False}, - 'bitstream-vera': {'id': 'Bitstream-Vera', 'deprecated': False}, - 'bittorrent-1.0': {'id': 'BitTorrent-1.0', 'deprecated': False}, - 'bittorrent-1.1': {'id': 'BitTorrent-1.1', 'deprecated': False}, - 'blessing': {'id': 'blessing', 'deprecated': False}, - 'blueoak-1.0.0': {'id': 'BlueOak-1.0.0', 'deprecated': False}, - 'boehm-gc': {'id': 'Boehm-GC', 'deprecated': False}, - 'boehm-gc-without-fee': {'id': 'Boehm-GC-without-fee', 'deprecated': False}, - 'borceux': {'id': 'Borceux', 'deprecated': False}, - 'brian-gladman-2-clause': {'id': 'Brian-Gladman-2-Clause', 'deprecated': False}, - 'brian-gladman-3-clause': {'id': 'Brian-Gladman-3-Clause', 'deprecated': False}, - 'bsd-1-clause': {'id': 'BSD-1-Clause', 'deprecated': False}, - 'bsd-2-clause': {'id': 'BSD-2-Clause', 'deprecated': False}, - 'bsd-2-clause-darwin': {'id': 'BSD-2-Clause-Darwin', 'deprecated': False}, - 'bsd-2-clause-first-lines': {'id': 'BSD-2-Clause-first-lines', 'deprecated': False}, - 'bsd-2-clause-freebsd': {'id': 'BSD-2-Clause-FreeBSD', 'deprecated': True}, - 'bsd-2-clause-netbsd': {'id': 'BSD-2-Clause-NetBSD', 'deprecated': True}, - 'bsd-2-clause-patent': {'id': 'BSD-2-Clause-Patent', 'deprecated': False}, - 'bsd-2-clause-pkgconf-disclaimer': {'id': 'BSD-2-Clause-pkgconf-disclaimer', 'deprecated': False}, - 'bsd-2-clause-views': {'id': 'BSD-2-Clause-Views', 'deprecated': False}, - 'bsd-3-clause': {'id': 'BSD-3-Clause', 'deprecated': False}, - 'bsd-3-clause-acpica': {'id': 'BSD-3-Clause-acpica', 'deprecated': False}, - 'bsd-3-clause-attribution': {'id': 'BSD-3-Clause-Attribution', 'deprecated': False}, - 'bsd-3-clause-clear': {'id': 'BSD-3-Clause-Clear', 'deprecated': False}, - 'bsd-3-clause-flex': {'id': 'BSD-3-Clause-flex', 'deprecated': False}, - 'bsd-3-clause-hp': {'id': 'BSD-3-Clause-HP', 'deprecated': False}, - 'bsd-3-clause-lbnl': {'id': 'BSD-3-Clause-LBNL', 'deprecated': False}, - 'bsd-3-clause-modification': {'id': 'BSD-3-Clause-Modification', 'deprecated': False}, - 'bsd-3-clause-no-military-license': {'id': 'BSD-3-Clause-No-Military-License', 'deprecated': False}, - 'bsd-3-clause-no-nuclear-license': {'id': 'BSD-3-Clause-No-Nuclear-License', 'deprecated': False}, - 'bsd-3-clause-no-nuclear-license-2014': {'id': 'BSD-3-Clause-No-Nuclear-License-2014', 'deprecated': False}, - 'bsd-3-clause-no-nuclear-warranty': {'id': 'BSD-3-Clause-No-Nuclear-Warranty', 'deprecated': False}, - 'bsd-3-clause-open-mpi': {'id': 'BSD-3-Clause-Open-MPI', 'deprecated': False}, - 'bsd-3-clause-sun': {'id': 'BSD-3-Clause-Sun', 'deprecated': False}, - 'bsd-4-clause': {'id': 'BSD-4-Clause', 'deprecated': False}, - 'bsd-4-clause-shortened': {'id': 'BSD-4-Clause-Shortened', 'deprecated': False}, - 'bsd-4-clause-uc': {'id': 'BSD-4-Clause-UC', 'deprecated': False}, - 'bsd-4.3reno': {'id': 'BSD-4.3RENO', 'deprecated': False}, - 'bsd-4.3tahoe': {'id': 'BSD-4.3TAHOE', 'deprecated': False}, - 'bsd-advertising-acknowledgement': {'id': 'BSD-Advertising-Acknowledgement', 'deprecated': False}, - 'bsd-attribution-hpnd-disclaimer': {'id': 'BSD-Attribution-HPND-disclaimer', 'deprecated': False}, - 'bsd-inferno-nettverk': {'id': 'BSD-Inferno-Nettverk', 'deprecated': False}, - 'bsd-protection': {'id': 'BSD-Protection', 'deprecated': False}, - 'bsd-source-beginning-file': {'id': 'BSD-Source-beginning-file', 'deprecated': False}, - 'bsd-source-code': {'id': 'BSD-Source-Code', 'deprecated': False}, - 'bsd-systemics': {'id': 'BSD-Systemics', 'deprecated': False}, - 'bsd-systemics-w3works': {'id': 'BSD-Systemics-W3Works', 'deprecated': False}, - 'bsl-1.0': {'id': 'BSL-1.0', 'deprecated': False}, - 'busl-1.1': {'id': 'BUSL-1.1', 'deprecated': False}, - 'bzip2-1.0.5': {'id': 'bzip2-1.0.5', 'deprecated': True}, - 'bzip2-1.0.6': {'id': 'bzip2-1.0.6', 'deprecated': False}, - 'c-uda-1.0': {'id': 'C-UDA-1.0', 'deprecated': False}, - 'cal-1.0': {'id': 'CAL-1.0', 'deprecated': False}, - 'cal-1.0-combined-work-exception': {'id': 'CAL-1.0-Combined-Work-Exception', 'deprecated': False}, - 'caldera': {'id': 'Caldera', 'deprecated': False}, - 'caldera-no-preamble': {'id': 'Caldera-no-preamble', 'deprecated': False}, - 'catharon': {'id': 'Catharon', 'deprecated': False}, - 'catosl-1.1': {'id': 'CATOSL-1.1', 'deprecated': False}, - 'cc-by-1.0': {'id': 'CC-BY-1.0', 'deprecated': False}, - 'cc-by-2.0': {'id': 'CC-BY-2.0', 'deprecated': False}, - 'cc-by-2.5': {'id': 'CC-BY-2.5', 'deprecated': False}, - 'cc-by-2.5-au': {'id': 'CC-BY-2.5-AU', 'deprecated': False}, - 'cc-by-3.0': {'id': 'CC-BY-3.0', 'deprecated': False}, - 'cc-by-3.0-at': {'id': 'CC-BY-3.0-AT', 'deprecated': False}, - 'cc-by-3.0-au': {'id': 'CC-BY-3.0-AU', 'deprecated': False}, - 'cc-by-3.0-de': {'id': 'CC-BY-3.0-DE', 'deprecated': False}, - 'cc-by-3.0-igo': {'id': 'CC-BY-3.0-IGO', 'deprecated': False}, - 'cc-by-3.0-nl': {'id': 'CC-BY-3.0-NL', 'deprecated': False}, - 'cc-by-3.0-us': {'id': 'CC-BY-3.0-US', 'deprecated': False}, - 'cc-by-4.0': {'id': 'CC-BY-4.0', 'deprecated': False}, - 'cc-by-nc-1.0': {'id': 'CC-BY-NC-1.0', 'deprecated': False}, - 'cc-by-nc-2.0': {'id': 'CC-BY-NC-2.0', 'deprecated': False}, - 'cc-by-nc-2.5': {'id': 'CC-BY-NC-2.5', 'deprecated': False}, - 'cc-by-nc-3.0': {'id': 'CC-BY-NC-3.0', 'deprecated': False}, - 'cc-by-nc-3.0-de': {'id': 'CC-BY-NC-3.0-DE', 'deprecated': False}, - 'cc-by-nc-4.0': {'id': 'CC-BY-NC-4.0', 'deprecated': False}, - 'cc-by-nc-nd-1.0': {'id': 'CC-BY-NC-ND-1.0', 'deprecated': False}, - 'cc-by-nc-nd-2.0': {'id': 'CC-BY-NC-ND-2.0', 'deprecated': False}, - 'cc-by-nc-nd-2.5': {'id': 'CC-BY-NC-ND-2.5', 'deprecated': False}, - 'cc-by-nc-nd-3.0': {'id': 'CC-BY-NC-ND-3.0', 'deprecated': False}, - 'cc-by-nc-nd-3.0-de': {'id': 'CC-BY-NC-ND-3.0-DE', 'deprecated': False}, - 'cc-by-nc-nd-3.0-igo': {'id': 'CC-BY-NC-ND-3.0-IGO', 'deprecated': False}, - 'cc-by-nc-nd-4.0': {'id': 'CC-BY-NC-ND-4.0', 'deprecated': False}, - 'cc-by-nc-sa-1.0': {'id': 'CC-BY-NC-SA-1.0', 'deprecated': False}, - 'cc-by-nc-sa-2.0': {'id': 'CC-BY-NC-SA-2.0', 'deprecated': False}, - 'cc-by-nc-sa-2.0-de': {'id': 'CC-BY-NC-SA-2.0-DE', 'deprecated': False}, - 'cc-by-nc-sa-2.0-fr': {'id': 'CC-BY-NC-SA-2.0-FR', 'deprecated': False}, - 'cc-by-nc-sa-2.0-uk': {'id': 'CC-BY-NC-SA-2.0-UK', 'deprecated': False}, - 'cc-by-nc-sa-2.5': {'id': 'CC-BY-NC-SA-2.5', 'deprecated': False}, - 'cc-by-nc-sa-3.0': {'id': 'CC-BY-NC-SA-3.0', 'deprecated': False}, - 'cc-by-nc-sa-3.0-de': {'id': 'CC-BY-NC-SA-3.0-DE', 'deprecated': False}, - 'cc-by-nc-sa-3.0-igo': {'id': 'CC-BY-NC-SA-3.0-IGO', 'deprecated': False}, - 'cc-by-nc-sa-4.0': {'id': 'CC-BY-NC-SA-4.0', 'deprecated': False}, - 'cc-by-nd-1.0': {'id': 'CC-BY-ND-1.0', 'deprecated': False}, - 'cc-by-nd-2.0': {'id': 'CC-BY-ND-2.0', 'deprecated': False}, - 'cc-by-nd-2.5': {'id': 'CC-BY-ND-2.5', 'deprecated': False}, - 'cc-by-nd-3.0': {'id': 'CC-BY-ND-3.0', 'deprecated': False}, - 'cc-by-nd-3.0-de': {'id': 'CC-BY-ND-3.0-DE', 'deprecated': False}, - 'cc-by-nd-4.0': {'id': 'CC-BY-ND-4.0', 'deprecated': False}, - 'cc-by-sa-1.0': {'id': 'CC-BY-SA-1.0', 'deprecated': False}, - 'cc-by-sa-2.0': {'id': 'CC-BY-SA-2.0', 'deprecated': False}, - 'cc-by-sa-2.0-uk': {'id': 'CC-BY-SA-2.0-UK', 'deprecated': False}, - 'cc-by-sa-2.1-jp': {'id': 'CC-BY-SA-2.1-JP', 'deprecated': False}, - 'cc-by-sa-2.5': {'id': 'CC-BY-SA-2.5', 'deprecated': False}, - 'cc-by-sa-3.0': {'id': 'CC-BY-SA-3.0', 'deprecated': False}, - 'cc-by-sa-3.0-at': {'id': 'CC-BY-SA-3.0-AT', 'deprecated': False}, - 'cc-by-sa-3.0-de': {'id': 'CC-BY-SA-3.0-DE', 'deprecated': False}, - 'cc-by-sa-3.0-igo': {'id': 'CC-BY-SA-3.0-IGO', 'deprecated': False}, - 'cc-by-sa-4.0': {'id': 'CC-BY-SA-4.0', 'deprecated': False}, - 'cc-pddc': {'id': 'CC-PDDC', 'deprecated': False}, - 'cc-pdm-1.0': {'id': 'CC-PDM-1.0', 'deprecated': False}, - 'cc-sa-1.0': {'id': 'CC-SA-1.0', 'deprecated': False}, - 'cc0-1.0': {'id': 'CC0-1.0', 'deprecated': False}, - 'cddl-1.0': {'id': 'CDDL-1.0', 'deprecated': False}, - 'cddl-1.1': {'id': 'CDDL-1.1', 'deprecated': False}, - 'cdl-1.0': {'id': 'CDL-1.0', 'deprecated': False}, - 'cdla-permissive-1.0': {'id': 'CDLA-Permissive-1.0', 'deprecated': False}, - 'cdla-permissive-2.0': {'id': 'CDLA-Permissive-2.0', 'deprecated': False}, - 'cdla-sharing-1.0': {'id': 'CDLA-Sharing-1.0', 'deprecated': False}, - 'cecill-1.0': {'id': 'CECILL-1.0', 'deprecated': False}, - 'cecill-1.1': {'id': 'CECILL-1.1', 'deprecated': False}, - 'cecill-2.0': {'id': 'CECILL-2.0', 'deprecated': False}, - 'cecill-2.1': {'id': 'CECILL-2.1', 'deprecated': False}, - 'cecill-b': {'id': 'CECILL-B', 'deprecated': False}, - 'cecill-c': {'id': 'CECILL-C', 'deprecated': False}, - 'cern-ohl-1.1': {'id': 'CERN-OHL-1.1', 'deprecated': False}, - 'cern-ohl-1.2': {'id': 'CERN-OHL-1.2', 'deprecated': False}, - 'cern-ohl-p-2.0': {'id': 'CERN-OHL-P-2.0', 'deprecated': False}, - 'cern-ohl-s-2.0': {'id': 'CERN-OHL-S-2.0', 'deprecated': False}, - 'cern-ohl-w-2.0': {'id': 'CERN-OHL-W-2.0', 'deprecated': False}, - 'cfitsio': {'id': 'CFITSIO', 'deprecated': False}, - 'check-cvs': {'id': 'check-cvs', 'deprecated': False}, - 'checkmk': {'id': 'checkmk', 'deprecated': False}, - 'clartistic': {'id': 'ClArtistic', 'deprecated': False}, - 'clips': {'id': 'Clips', 'deprecated': False}, - 'cmu-mach': {'id': 'CMU-Mach', 'deprecated': False}, - 'cmu-mach-nodoc': {'id': 'CMU-Mach-nodoc', 'deprecated': False}, - 'cnri-jython': {'id': 'CNRI-Jython', 'deprecated': False}, - 'cnri-python': {'id': 'CNRI-Python', 'deprecated': False}, - 'cnri-python-gpl-compatible': {'id': 'CNRI-Python-GPL-Compatible', 'deprecated': False}, - 'coil-1.0': {'id': 'COIL-1.0', 'deprecated': False}, - 'community-spec-1.0': {'id': 'Community-Spec-1.0', 'deprecated': False}, - 'condor-1.1': {'id': 'Condor-1.1', 'deprecated': False}, - 'copyleft-next-0.3.0': {'id': 'copyleft-next-0.3.0', 'deprecated': False}, - 'copyleft-next-0.3.1': {'id': 'copyleft-next-0.3.1', 'deprecated': False}, - 'cornell-lossless-jpeg': {'id': 'Cornell-Lossless-JPEG', 'deprecated': False}, - 'cpal-1.0': {'id': 'CPAL-1.0', 'deprecated': False}, - 'cpl-1.0': {'id': 'CPL-1.0', 'deprecated': False}, - 'cpol-1.02': {'id': 'CPOL-1.02', 'deprecated': False}, - 'cronyx': {'id': 'Cronyx', 'deprecated': False}, - 'crossword': {'id': 'Crossword', 'deprecated': False}, - 'cryptoswift': {'id': 'CryptoSwift', 'deprecated': False}, - 'crystalstacker': {'id': 'CrystalStacker', 'deprecated': False}, - 'cua-opl-1.0': {'id': 'CUA-OPL-1.0', 'deprecated': False}, - 'cube': {'id': 'Cube', 'deprecated': False}, - 'curl': {'id': 'curl', 'deprecated': False}, - 'cve-tou': {'id': 'cve-tou', 'deprecated': False}, - 'd-fsl-1.0': {'id': 'D-FSL-1.0', 'deprecated': False}, - 'dec-3-clause': {'id': 'DEC-3-Clause', 'deprecated': False}, - 'diffmark': {'id': 'diffmark', 'deprecated': False}, - 'dl-de-by-2.0': {'id': 'DL-DE-BY-2.0', 'deprecated': False}, - 'dl-de-zero-2.0': {'id': 'DL-DE-ZERO-2.0', 'deprecated': False}, - 'doc': {'id': 'DOC', 'deprecated': False}, - 'docbook-dtd': {'id': 'DocBook-DTD', 'deprecated': False}, - 'docbook-schema': {'id': 'DocBook-Schema', 'deprecated': False}, - 'docbook-stylesheet': {'id': 'DocBook-Stylesheet', 'deprecated': False}, - 'docbook-xml': {'id': 'DocBook-XML', 'deprecated': False}, - 'dotseqn': {'id': 'Dotseqn', 'deprecated': False}, - 'drl-1.0': {'id': 'DRL-1.0', 'deprecated': False}, - 'drl-1.1': {'id': 'DRL-1.1', 'deprecated': False}, - 'dsdp': {'id': 'DSDP', 'deprecated': False}, - 'dtoa': {'id': 'dtoa', 'deprecated': False}, - 'dvipdfm': {'id': 'dvipdfm', 'deprecated': False}, - 'ecl-1.0': {'id': 'ECL-1.0', 'deprecated': False}, - 'ecl-2.0': {'id': 'ECL-2.0', 'deprecated': False}, - 'ecos-2.0': {'id': 'eCos-2.0', 'deprecated': True}, - 'efl-1.0': {'id': 'EFL-1.0', 'deprecated': False}, - 'efl-2.0': {'id': 'EFL-2.0', 'deprecated': False}, - 'egenix': {'id': 'eGenix', 'deprecated': False}, - 'elastic-2.0': {'id': 'Elastic-2.0', 'deprecated': False}, - 'entessa': {'id': 'Entessa', 'deprecated': False}, - 'epics': {'id': 'EPICS', 'deprecated': False}, - 'epl-1.0': {'id': 'EPL-1.0', 'deprecated': False}, - 'epl-2.0': {'id': 'EPL-2.0', 'deprecated': False}, - 'erlpl-1.1': {'id': 'ErlPL-1.1', 'deprecated': False}, - 'etalab-2.0': {'id': 'etalab-2.0', 'deprecated': False}, - 'eudatagrid': {'id': 'EUDatagrid', 'deprecated': False}, - 'eupl-1.0': {'id': 'EUPL-1.0', 'deprecated': False}, - 'eupl-1.1': {'id': 'EUPL-1.1', 'deprecated': False}, - 'eupl-1.2': {'id': 'EUPL-1.2', 'deprecated': False}, - 'eurosym': {'id': 'Eurosym', 'deprecated': False}, - 'fair': {'id': 'Fair', 'deprecated': False}, - 'fbm': {'id': 'FBM', 'deprecated': False}, - 'fdk-aac': {'id': 'FDK-AAC', 'deprecated': False}, - 'ferguson-twofish': {'id': 'Ferguson-Twofish', 'deprecated': False}, - 'frameworx-1.0': {'id': 'Frameworx-1.0', 'deprecated': False}, - 'freebsd-doc': {'id': 'FreeBSD-DOC', 'deprecated': False}, - 'freeimage': {'id': 'FreeImage', 'deprecated': False}, - 'fsfap': {'id': 'FSFAP', 'deprecated': False}, - 'fsfap-no-warranty-disclaimer': {'id': 'FSFAP-no-warranty-disclaimer', 'deprecated': False}, - 'fsful': {'id': 'FSFUL', 'deprecated': False}, - 'fsfullr': {'id': 'FSFULLR', 'deprecated': False}, - 'fsfullrsd': {'id': 'FSFULLRSD', 'deprecated': False}, - 'fsfullrwd': {'id': 'FSFULLRWD', 'deprecated': False}, - 'fsl-1.1-alv2': {'id': 'FSL-1.1-ALv2', 'deprecated': False}, - 'fsl-1.1-mit': {'id': 'FSL-1.1-MIT', 'deprecated': False}, - 'ftl': {'id': 'FTL', 'deprecated': False}, - 'furuseth': {'id': 'Furuseth', 'deprecated': False}, - 'fwlw': {'id': 'fwlw', 'deprecated': False}, - 'game-programming-gems': {'id': 'Game-Programming-Gems', 'deprecated': False}, - 'gcr-docs': {'id': 'GCR-docs', 'deprecated': False}, - 'gd': {'id': 'GD', 'deprecated': False}, - 'generic-xts': {'id': 'generic-xts', 'deprecated': False}, - 'gfdl-1.1': {'id': 'GFDL-1.1', 'deprecated': True}, - 'gfdl-1.1-invariants-only': {'id': 'GFDL-1.1-invariants-only', 'deprecated': False}, - 'gfdl-1.1-invariants-or-later': {'id': 'GFDL-1.1-invariants-or-later', 'deprecated': False}, - 'gfdl-1.1-no-invariants-only': {'id': 'GFDL-1.1-no-invariants-only', 'deprecated': False}, - 'gfdl-1.1-no-invariants-or-later': {'id': 'GFDL-1.1-no-invariants-or-later', 'deprecated': False}, - 'gfdl-1.1-only': {'id': 'GFDL-1.1-only', 'deprecated': False}, - 'gfdl-1.1-or-later': {'id': 'GFDL-1.1-or-later', 'deprecated': False}, - 'gfdl-1.2': {'id': 'GFDL-1.2', 'deprecated': True}, - 'gfdl-1.2-invariants-only': {'id': 'GFDL-1.2-invariants-only', 'deprecated': False}, - 'gfdl-1.2-invariants-or-later': {'id': 'GFDL-1.2-invariants-or-later', 'deprecated': False}, - 'gfdl-1.2-no-invariants-only': {'id': 'GFDL-1.2-no-invariants-only', 'deprecated': False}, - 'gfdl-1.2-no-invariants-or-later': {'id': 'GFDL-1.2-no-invariants-or-later', 'deprecated': False}, - 'gfdl-1.2-only': {'id': 'GFDL-1.2-only', 'deprecated': False}, - 'gfdl-1.2-or-later': {'id': 'GFDL-1.2-or-later', 'deprecated': False}, - 'gfdl-1.3': {'id': 'GFDL-1.3', 'deprecated': True}, - 'gfdl-1.3-invariants-only': {'id': 'GFDL-1.3-invariants-only', 'deprecated': False}, - 'gfdl-1.3-invariants-or-later': {'id': 'GFDL-1.3-invariants-or-later', 'deprecated': False}, - 'gfdl-1.3-no-invariants-only': {'id': 'GFDL-1.3-no-invariants-only', 'deprecated': False}, - 'gfdl-1.3-no-invariants-or-later': {'id': 'GFDL-1.3-no-invariants-or-later', 'deprecated': False}, - 'gfdl-1.3-only': {'id': 'GFDL-1.3-only', 'deprecated': False}, - 'gfdl-1.3-or-later': {'id': 'GFDL-1.3-or-later', 'deprecated': False}, - 'giftware': {'id': 'Giftware', 'deprecated': False}, - 'gl2ps': {'id': 'GL2PS', 'deprecated': False}, - 'glide': {'id': 'Glide', 'deprecated': False}, - 'glulxe': {'id': 'Glulxe', 'deprecated': False}, - 'glwtpl': {'id': 'GLWTPL', 'deprecated': False}, - 'gnuplot': {'id': 'gnuplot', 'deprecated': False}, - 'gpl-1.0': {'id': 'GPL-1.0', 'deprecated': True}, - 'gpl-1.0+': {'id': 'GPL-1.0+', 'deprecated': True}, - 'gpl-1.0-only': {'id': 'GPL-1.0-only', 'deprecated': False}, - 'gpl-1.0-or-later': {'id': 'GPL-1.0-or-later', 'deprecated': False}, - 'gpl-2.0': {'id': 'GPL-2.0', 'deprecated': True}, - 'gpl-2.0+': {'id': 'GPL-2.0+', 'deprecated': True}, - 'gpl-2.0-only': {'id': 'GPL-2.0-only', 'deprecated': False}, - 'gpl-2.0-or-later': {'id': 'GPL-2.0-or-later', 'deprecated': False}, - 'gpl-2.0-with-autoconf-exception': {'id': 'GPL-2.0-with-autoconf-exception', 'deprecated': True}, - 'gpl-2.0-with-bison-exception': {'id': 'GPL-2.0-with-bison-exception', 'deprecated': True}, - 'gpl-2.0-with-classpath-exception': {'id': 'GPL-2.0-with-classpath-exception', 'deprecated': True}, - 'gpl-2.0-with-font-exception': {'id': 'GPL-2.0-with-font-exception', 'deprecated': True}, - 'gpl-2.0-with-gcc-exception': {'id': 'GPL-2.0-with-GCC-exception', 'deprecated': True}, - 'gpl-3.0': {'id': 'GPL-3.0', 'deprecated': True}, - 'gpl-3.0+': {'id': 'GPL-3.0+', 'deprecated': True}, - 'gpl-3.0-only': {'id': 'GPL-3.0-only', 'deprecated': False}, - 'gpl-3.0-or-later': {'id': 'GPL-3.0-or-later', 'deprecated': False}, - 'gpl-3.0-with-autoconf-exception': {'id': 'GPL-3.0-with-autoconf-exception', 'deprecated': True}, - 'gpl-3.0-with-gcc-exception': {'id': 'GPL-3.0-with-GCC-exception', 'deprecated': True}, - 'graphics-gems': {'id': 'Graphics-Gems', 'deprecated': False}, - 'gsoap-1.3b': {'id': 'gSOAP-1.3b', 'deprecated': False}, - 'gtkbook': {'id': 'gtkbook', 'deprecated': False}, - 'gutmann': {'id': 'Gutmann', 'deprecated': False}, - 'haskellreport': {'id': 'HaskellReport', 'deprecated': False}, - 'hdf5': {'id': 'HDF5', 'deprecated': False}, - 'hdparm': {'id': 'hdparm', 'deprecated': False}, - 'hidapi': {'id': 'HIDAPI', 'deprecated': False}, - 'hippocratic-2.1': {'id': 'Hippocratic-2.1', 'deprecated': False}, - 'hp-1986': {'id': 'HP-1986', 'deprecated': False}, - 'hp-1989': {'id': 'HP-1989', 'deprecated': False}, - 'hpnd': {'id': 'HPND', 'deprecated': False}, - 'hpnd-dec': {'id': 'HPND-DEC', 'deprecated': False}, - 'hpnd-doc': {'id': 'HPND-doc', 'deprecated': False}, - 'hpnd-doc-sell': {'id': 'HPND-doc-sell', 'deprecated': False}, - 'hpnd-export-us': {'id': 'HPND-export-US', 'deprecated': False}, - 'hpnd-export-us-acknowledgement': {'id': 'HPND-export-US-acknowledgement', 'deprecated': False}, - 'hpnd-export-us-modify': {'id': 'HPND-export-US-modify', 'deprecated': False}, - 'hpnd-export2-us': {'id': 'HPND-export2-US', 'deprecated': False}, - 'hpnd-fenneberg-livingston': {'id': 'HPND-Fenneberg-Livingston', 'deprecated': False}, - 'hpnd-inria-imag': {'id': 'HPND-INRIA-IMAG', 'deprecated': False}, - 'hpnd-intel': {'id': 'HPND-Intel', 'deprecated': False}, - 'hpnd-kevlin-henney': {'id': 'HPND-Kevlin-Henney', 'deprecated': False}, - 'hpnd-markus-kuhn': {'id': 'HPND-Markus-Kuhn', 'deprecated': False}, - 'hpnd-merchantability-variant': {'id': 'HPND-merchantability-variant', 'deprecated': False}, - 'hpnd-mit-disclaimer': {'id': 'HPND-MIT-disclaimer', 'deprecated': False}, - 'hpnd-netrek': {'id': 'HPND-Netrek', 'deprecated': False}, - 'hpnd-pbmplus': {'id': 'HPND-Pbmplus', 'deprecated': False}, - 'hpnd-sell-mit-disclaimer-xserver': {'id': 'HPND-sell-MIT-disclaimer-xserver', 'deprecated': False}, - 'hpnd-sell-regexpr': {'id': 'HPND-sell-regexpr', 'deprecated': False}, - 'hpnd-sell-variant': {'id': 'HPND-sell-variant', 'deprecated': False}, - 'hpnd-sell-variant-mit-disclaimer': {'id': 'HPND-sell-variant-MIT-disclaimer', 'deprecated': False}, - 'hpnd-sell-variant-mit-disclaimer-rev': {'id': 'HPND-sell-variant-MIT-disclaimer-rev', 'deprecated': False}, - 'hpnd-uc': {'id': 'HPND-UC', 'deprecated': False}, - 'hpnd-uc-export-us': {'id': 'HPND-UC-export-US', 'deprecated': False}, - 'htmltidy': {'id': 'HTMLTIDY', 'deprecated': False}, - 'ibm-pibs': {'id': 'IBM-pibs', 'deprecated': False}, - 'icu': {'id': 'ICU', 'deprecated': False}, - 'iec-code-components-eula': {'id': 'IEC-Code-Components-EULA', 'deprecated': False}, - 'ijg': {'id': 'IJG', 'deprecated': False}, - 'ijg-short': {'id': 'IJG-short', 'deprecated': False}, - 'imagemagick': {'id': 'ImageMagick', 'deprecated': False}, - 'imatix': {'id': 'iMatix', 'deprecated': False}, - 'imlib2': {'id': 'Imlib2', 'deprecated': False}, - 'info-zip': {'id': 'Info-ZIP', 'deprecated': False}, - 'inner-net-2.0': {'id': 'Inner-Net-2.0', 'deprecated': False}, - 'innosetup': {'id': 'InnoSetup', 'deprecated': False}, - 'intel': {'id': 'Intel', 'deprecated': False}, - 'intel-acpi': {'id': 'Intel-ACPI', 'deprecated': False}, - 'interbase-1.0': {'id': 'Interbase-1.0', 'deprecated': False}, - 'ipa': {'id': 'IPA', 'deprecated': False}, - 'ipl-1.0': {'id': 'IPL-1.0', 'deprecated': False}, - 'isc': {'id': 'ISC', 'deprecated': False}, - 'isc-veillard': {'id': 'ISC-Veillard', 'deprecated': False}, - 'jam': {'id': 'Jam', 'deprecated': False}, - 'jasper-2.0': {'id': 'JasPer-2.0', 'deprecated': False}, - 'jove': {'id': 'jove', 'deprecated': False}, - 'jpl-image': {'id': 'JPL-image', 'deprecated': False}, - 'jpnic': {'id': 'JPNIC', 'deprecated': False}, - 'json': {'id': 'JSON', 'deprecated': False}, - 'kastrup': {'id': 'Kastrup', 'deprecated': False}, - 'kazlib': {'id': 'Kazlib', 'deprecated': False}, - 'knuth-ctan': {'id': 'Knuth-CTAN', 'deprecated': False}, - 'lal-1.2': {'id': 'LAL-1.2', 'deprecated': False}, - 'lal-1.3': {'id': 'LAL-1.3', 'deprecated': False}, - 'latex2e': {'id': 'Latex2e', 'deprecated': False}, - 'latex2e-translated-notice': {'id': 'Latex2e-translated-notice', 'deprecated': False}, - 'leptonica': {'id': 'Leptonica', 'deprecated': False}, - 'lgpl-2.0': {'id': 'LGPL-2.0', 'deprecated': True}, - 'lgpl-2.0+': {'id': 'LGPL-2.0+', 'deprecated': True}, - 'lgpl-2.0-only': {'id': 'LGPL-2.0-only', 'deprecated': False}, - 'lgpl-2.0-or-later': {'id': 'LGPL-2.0-or-later', 'deprecated': False}, - 'lgpl-2.1': {'id': 'LGPL-2.1', 'deprecated': True}, - 'lgpl-2.1+': {'id': 'LGPL-2.1+', 'deprecated': True}, - 'lgpl-2.1-only': {'id': 'LGPL-2.1-only', 'deprecated': False}, - 'lgpl-2.1-or-later': {'id': 'LGPL-2.1-or-later', 'deprecated': False}, - 'lgpl-3.0': {'id': 'LGPL-3.0', 'deprecated': True}, - 'lgpl-3.0+': {'id': 'LGPL-3.0+', 'deprecated': True}, - 'lgpl-3.0-only': {'id': 'LGPL-3.0-only', 'deprecated': False}, - 'lgpl-3.0-or-later': {'id': 'LGPL-3.0-or-later', 'deprecated': False}, - 'lgpllr': {'id': 'LGPLLR', 'deprecated': False}, - 'libpng': {'id': 'Libpng', 'deprecated': False}, - 'libpng-1.6.35': {'id': 'libpng-1.6.35', 'deprecated': False}, - 'libpng-2.0': {'id': 'libpng-2.0', 'deprecated': False}, - 'libselinux-1.0': {'id': 'libselinux-1.0', 'deprecated': False}, - 'libtiff': {'id': 'libtiff', 'deprecated': False}, - 'libutil-david-nugent': {'id': 'libutil-David-Nugent', 'deprecated': False}, - 'liliq-p-1.1': {'id': 'LiLiQ-P-1.1', 'deprecated': False}, - 'liliq-r-1.1': {'id': 'LiLiQ-R-1.1', 'deprecated': False}, - 'liliq-rplus-1.1': {'id': 'LiLiQ-Rplus-1.1', 'deprecated': False}, - 'linux-man-pages-1-para': {'id': 'Linux-man-pages-1-para', 'deprecated': False}, - 'linux-man-pages-copyleft': {'id': 'Linux-man-pages-copyleft', 'deprecated': False}, - 'linux-man-pages-copyleft-2-para': {'id': 'Linux-man-pages-copyleft-2-para', 'deprecated': False}, - 'linux-man-pages-copyleft-var': {'id': 'Linux-man-pages-copyleft-var', 'deprecated': False}, - 'linux-openib': {'id': 'Linux-OpenIB', 'deprecated': False}, - 'loop': {'id': 'LOOP', 'deprecated': False}, - 'lpd-document': {'id': 'LPD-document', 'deprecated': False}, - 'lpl-1.0': {'id': 'LPL-1.0', 'deprecated': False}, - 'lpl-1.02': {'id': 'LPL-1.02', 'deprecated': False}, - 'lppl-1.0': {'id': 'LPPL-1.0', 'deprecated': False}, - 'lppl-1.1': {'id': 'LPPL-1.1', 'deprecated': False}, - 'lppl-1.2': {'id': 'LPPL-1.2', 'deprecated': False}, - 'lppl-1.3a': {'id': 'LPPL-1.3a', 'deprecated': False}, - 'lppl-1.3c': {'id': 'LPPL-1.3c', 'deprecated': False}, - 'lsof': {'id': 'lsof', 'deprecated': False}, - 'lucida-bitmap-fonts': {'id': 'Lucida-Bitmap-Fonts', 'deprecated': False}, - 'lzma-sdk-9.11-to-9.20': {'id': 'LZMA-SDK-9.11-to-9.20', 'deprecated': False}, - 'lzma-sdk-9.22': {'id': 'LZMA-SDK-9.22', 'deprecated': False}, - 'mackerras-3-clause': {'id': 'Mackerras-3-Clause', 'deprecated': False}, - 'mackerras-3-clause-acknowledgment': {'id': 'Mackerras-3-Clause-acknowledgment', 'deprecated': False}, - 'magaz': {'id': 'magaz', 'deprecated': False}, - 'mailprio': {'id': 'mailprio', 'deprecated': False}, - 'makeindex': {'id': 'MakeIndex', 'deprecated': False}, - 'man2html': {'id': 'man2html', 'deprecated': False}, - 'martin-birgmeier': {'id': 'Martin-Birgmeier', 'deprecated': False}, - 'mcphee-slideshow': {'id': 'McPhee-slideshow', 'deprecated': False}, - 'metamail': {'id': 'metamail', 'deprecated': False}, - 'minpack': {'id': 'Minpack', 'deprecated': False}, - 'mips': {'id': 'MIPS', 'deprecated': False}, - 'miros': {'id': 'MirOS', 'deprecated': False}, - 'mit': {'id': 'MIT', 'deprecated': False}, - 'mit-0': {'id': 'MIT-0', 'deprecated': False}, - 'mit-advertising': {'id': 'MIT-advertising', 'deprecated': False}, - 'mit-click': {'id': 'MIT-Click', 'deprecated': False}, - 'mit-cmu': {'id': 'MIT-CMU', 'deprecated': False}, - 'mit-enna': {'id': 'MIT-enna', 'deprecated': False}, - 'mit-feh': {'id': 'MIT-feh', 'deprecated': False}, - 'mit-festival': {'id': 'MIT-Festival', 'deprecated': False}, - 'mit-khronos-old': {'id': 'MIT-Khronos-old', 'deprecated': False}, - 'mit-modern-variant': {'id': 'MIT-Modern-Variant', 'deprecated': False}, - 'mit-open-group': {'id': 'MIT-open-group', 'deprecated': False}, - 'mit-testregex': {'id': 'MIT-testregex', 'deprecated': False}, - 'mit-wu': {'id': 'MIT-Wu', 'deprecated': False}, - 'mitnfa': {'id': 'MITNFA', 'deprecated': False}, - 'mmixware': {'id': 'MMIXware', 'deprecated': False}, - 'motosoto': {'id': 'Motosoto', 'deprecated': False}, - 'mpeg-ssg': {'id': 'MPEG-SSG', 'deprecated': False}, - 'mpi-permissive': {'id': 'mpi-permissive', 'deprecated': False}, - 'mpich2': {'id': 'mpich2', 'deprecated': False}, - 'mpl-1.0': {'id': 'MPL-1.0', 'deprecated': False}, - 'mpl-1.1': {'id': 'MPL-1.1', 'deprecated': False}, - 'mpl-2.0': {'id': 'MPL-2.0', 'deprecated': False}, - 'mpl-2.0-no-copyleft-exception': {'id': 'MPL-2.0-no-copyleft-exception', 'deprecated': False}, - 'mplus': {'id': 'mplus', 'deprecated': False}, - 'ms-lpl': {'id': 'MS-LPL', 'deprecated': False}, - 'ms-pl': {'id': 'MS-PL', 'deprecated': False}, - 'ms-rl': {'id': 'MS-RL', 'deprecated': False}, - 'mtll': {'id': 'MTLL', 'deprecated': False}, - 'mulanpsl-1.0': {'id': 'MulanPSL-1.0', 'deprecated': False}, - 'mulanpsl-2.0': {'id': 'MulanPSL-2.0', 'deprecated': False}, - 'multics': {'id': 'Multics', 'deprecated': False}, - 'mup': {'id': 'Mup', 'deprecated': False}, - 'naist-2003': {'id': 'NAIST-2003', 'deprecated': False}, - 'nasa-1.3': {'id': 'NASA-1.3', 'deprecated': False}, - 'naumen': {'id': 'Naumen', 'deprecated': False}, - 'nbpl-1.0': {'id': 'NBPL-1.0', 'deprecated': False}, - 'ncbi-pd': {'id': 'NCBI-PD', 'deprecated': False}, - 'ncgl-uk-2.0': {'id': 'NCGL-UK-2.0', 'deprecated': False}, - 'ncl': {'id': 'NCL', 'deprecated': False}, - 'ncsa': {'id': 'NCSA', 'deprecated': False}, - 'net-snmp': {'id': 'Net-SNMP', 'deprecated': True}, - 'netcdf': {'id': 'NetCDF', 'deprecated': False}, - 'newsletr': {'id': 'Newsletr', 'deprecated': False}, - 'ngpl': {'id': 'NGPL', 'deprecated': False}, - 'ngrep': {'id': 'ngrep', 'deprecated': False}, - 'nicta-1.0': {'id': 'NICTA-1.0', 'deprecated': False}, - 'nist-pd': {'id': 'NIST-PD', 'deprecated': False}, - 'nist-pd-fallback': {'id': 'NIST-PD-fallback', 'deprecated': False}, - 'nist-software': {'id': 'NIST-Software', 'deprecated': False}, - 'nlod-1.0': {'id': 'NLOD-1.0', 'deprecated': False}, - 'nlod-2.0': {'id': 'NLOD-2.0', 'deprecated': False}, - 'nlpl': {'id': 'NLPL', 'deprecated': False}, - 'nokia': {'id': 'Nokia', 'deprecated': False}, - 'nosl': {'id': 'NOSL', 'deprecated': False}, - 'noweb': {'id': 'Noweb', 'deprecated': False}, - 'npl-1.0': {'id': 'NPL-1.0', 'deprecated': False}, - 'npl-1.1': {'id': 'NPL-1.1', 'deprecated': False}, - 'nposl-3.0': {'id': 'NPOSL-3.0', 'deprecated': False}, - 'nrl': {'id': 'NRL', 'deprecated': False}, - 'ntia-pd': {'id': 'NTIA-PD', 'deprecated': False}, - 'ntp': {'id': 'NTP', 'deprecated': False}, - 'ntp-0': {'id': 'NTP-0', 'deprecated': False}, - 'nunit': {'id': 'Nunit', 'deprecated': True}, - 'o-uda-1.0': {'id': 'O-UDA-1.0', 'deprecated': False}, - 'oar': {'id': 'OAR', 'deprecated': False}, - 'occt-pl': {'id': 'OCCT-PL', 'deprecated': False}, - 'oclc-2.0': {'id': 'OCLC-2.0', 'deprecated': False}, - 'odbl-1.0': {'id': 'ODbL-1.0', 'deprecated': False}, - 'odc-by-1.0': {'id': 'ODC-By-1.0', 'deprecated': False}, - 'offis': {'id': 'OFFIS', 'deprecated': False}, - 'ofl-1.0': {'id': 'OFL-1.0', 'deprecated': False}, - 'ofl-1.0-no-rfn': {'id': 'OFL-1.0-no-RFN', 'deprecated': False}, - 'ofl-1.0-rfn': {'id': 'OFL-1.0-RFN', 'deprecated': False}, - 'ofl-1.1': {'id': 'OFL-1.1', 'deprecated': False}, - 'ofl-1.1-no-rfn': {'id': 'OFL-1.1-no-RFN', 'deprecated': False}, - 'ofl-1.1-rfn': {'id': 'OFL-1.1-RFN', 'deprecated': False}, - 'ogc-1.0': {'id': 'OGC-1.0', 'deprecated': False}, - 'ogdl-taiwan-1.0': {'id': 'OGDL-Taiwan-1.0', 'deprecated': False}, - 'ogl-canada-2.0': {'id': 'OGL-Canada-2.0', 'deprecated': False}, - 'ogl-uk-1.0': {'id': 'OGL-UK-1.0', 'deprecated': False}, - 'ogl-uk-2.0': {'id': 'OGL-UK-2.0', 'deprecated': False}, - 'ogl-uk-3.0': {'id': 'OGL-UK-3.0', 'deprecated': False}, - 'ogtsl': {'id': 'OGTSL', 'deprecated': False}, - 'oldap-1.1': {'id': 'OLDAP-1.1', 'deprecated': False}, - 'oldap-1.2': {'id': 'OLDAP-1.2', 'deprecated': False}, - 'oldap-1.3': {'id': 'OLDAP-1.3', 'deprecated': False}, - 'oldap-1.4': {'id': 'OLDAP-1.4', 'deprecated': False}, - 'oldap-2.0': {'id': 'OLDAP-2.0', 'deprecated': False}, - 'oldap-2.0.1': {'id': 'OLDAP-2.0.1', 'deprecated': False}, - 'oldap-2.1': {'id': 'OLDAP-2.1', 'deprecated': False}, - 'oldap-2.2': {'id': 'OLDAP-2.2', 'deprecated': False}, - 'oldap-2.2.1': {'id': 'OLDAP-2.2.1', 'deprecated': False}, - 'oldap-2.2.2': {'id': 'OLDAP-2.2.2', 'deprecated': False}, - 'oldap-2.3': {'id': 'OLDAP-2.3', 'deprecated': False}, - 'oldap-2.4': {'id': 'OLDAP-2.4', 'deprecated': False}, - 'oldap-2.5': {'id': 'OLDAP-2.5', 'deprecated': False}, - 'oldap-2.6': {'id': 'OLDAP-2.6', 'deprecated': False}, - 'oldap-2.7': {'id': 'OLDAP-2.7', 'deprecated': False}, - 'oldap-2.8': {'id': 'OLDAP-2.8', 'deprecated': False}, - 'olfl-1.3': {'id': 'OLFL-1.3', 'deprecated': False}, - 'oml': {'id': 'OML', 'deprecated': False}, - 'openpbs-2.3': {'id': 'OpenPBS-2.3', 'deprecated': False}, - 'openssl': {'id': 'OpenSSL', 'deprecated': False}, - 'openssl-standalone': {'id': 'OpenSSL-standalone', 'deprecated': False}, - 'openvision': {'id': 'OpenVision', 'deprecated': False}, - 'opl-1.0': {'id': 'OPL-1.0', 'deprecated': False}, - 'opl-uk-3.0': {'id': 'OPL-UK-3.0', 'deprecated': False}, - 'opubl-1.0': {'id': 'OPUBL-1.0', 'deprecated': False}, - 'oset-pl-2.1': {'id': 'OSET-PL-2.1', 'deprecated': False}, - 'osl-1.0': {'id': 'OSL-1.0', 'deprecated': False}, - 'osl-1.1': {'id': 'OSL-1.1', 'deprecated': False}, - 'osl-2.0': {'id': 'OSL-2.0', 'deprecated': False}, - 'osl-2.1': {'id': 'OSL-2.1', 'deprecated': False}, - 'osl-3.0': {'id': 'OSL-3.0', 'deprecated': False}, - 'padl': {'id': 'PADL', 'deprecated': False}, - 'parity-6.0.0': {'id': 'Parity-6.0.0', 'deprecated': False}, - 'parity-7.0.0': {'id': 'Parity-7.0.0', 'deprecated': False}, - 'pddl-1.0': {'id': 'PDDL-1.0', 'deprecated': False}, - 'php-3.0': {'id': 'PHP-3.0', 'deprecated': False}, - 'php-3.01': {'id': 'PHP-3.01', 'deprecated': False}, - 'pixar': {'id': 'Pixar', 'deprecated': False}, - 'pkgconf': {'id': 'pkgconf', 'deprecated': False}, - 'plexus': {'id': 'Plexus', 'deprecated': False}, - 'pnmstitch': {'id': 'pnmstitch', 'deprecated': False}, - 'polyform-noncommercial-1.0.0': {'id': 'PolyForm-Noncommercial-1.0.0', 'deprecated': False}, - 'polyform-small-business-1.0.0': {'id': 'PolyForm-Small-Business-1.0.0', 'deprecated': False}, - 'postgresql': {'id': 'PostgreSQL', 'deprecated': False}, - 'ppl': {'id': 'PPL', 'deprecated': False}, - 'psf-2.0': {'id': 'PSF-2.0', 'deprecated': False}, - 'psfrag': {'id': 'psfrag', 'deprecated': False}, - 'psutils': {'id': 'psutils', 'deprecated': False}, - 'python-2.0': {'id': 'Python-2.0', 'deprecated': False}, - 'python-2.0.1': {'id': 'Python-2.0.1', 'deprecated': False}, - 'python-ldap': {'id': 'python-ldap', 'deprecated': False}, - 'qhull': {'id': 'Qhull', 'deprecated': False}, - 'qpl-1.0': {'id': 'QPL-1.0', 'deprecated': False}, - 'qpl-1.0-inria-2004': {'id': 'QPL-1.0-INRIA-2004', 'deprecated': False}, - 'radvd': {'id': 'radvd', 'deprecated': False}, - 'rdisc': {'id': 'Rdisc', 'deprecated': False}, - 'rhecos-1.1': {'id': 'RHeCos-1.1', 'deprecated': False}, - 'rpl-1.1': {'id': 'RPL-1.1', 'deprecated': False}, - 'rpl-1.5': {'id': 'RPL-1.5', 'deprecated': False}, - 'rpsl-1.0': {'id': 'RPSL-1.0', 'deprecated': False}, - 'rsa-md': {'id': 'RSA-MD', 'deprecated': False}, - 'rscpl': {'id': 'RSCPL', 'deprecated': False}, - 'ruby': {'id': 'Ruby', 'deprecated': False}, - 'ruby-pty': {'id': 'Ruby-pty', 'deprecated': False}, - 'sax-pd': {'id': 'SAX-PD', 'deprecated': False}, - 'sax-pd-2.0': {'id': 'SAX-PD-2.0', 'deprecated': False}, - 'saxpath': {'id': 'Saxpath', 'deprecated': False}, - 'scea': {'id': 'SCEA', 'deprecated': False}, - 'schemereport': {'id': 'SchemeReport', 'deprecated': False}, - 'sendmail': {'id': 'Sendmail', 'deprecated': False}, - 'sendmail-8.23': {'id': 'Sendmail-8.23', 'deprecated': False}, - 'sendmail-open-source-1.1': {'id': 'Sendmail-Open-Source-1.1', 'deprecated': False}, - 'sgi-b-1.0': {'id': 'SGI-B-1.0', 'deprecated': False}, - 'sgi-b-1.1': {'id': 'SGI-B-1.1', 'deprecated': False}, - 'sgi-b-2.0': {'id': 'SGI-B-2.0', 'deprecated': False}, - 'sgi-opengl': {'id': 'SGI-OpenGL', 'deprecated': False}, - 'sgp4': {'id': 'SGP4', 'deprecated': False}, - 'shl-0.5': {'id': 'SHL-0.5', 'deprecated': False}, - 'shl-0.51': {'id': 'SHL-0.51', 'deprecated': False}, - 'simpl-2.0': {'id': 'SimPL-2.0', 'deprecated': False}, - 'sissl': {'id': 'SISSL', 'deprecated': False}, - 'sissl-1.2': {'id': 'SISSL-1.2', 'deprecated': False}, - 'sl': {'id': 'SL', 'deprecated': False}, - 'sleepycat': {'id': 'Sleepycat', 'deprecated': False}, - 'smail-gpl': {'id': 'SMAIL-GPL', 'deprecated': False}, - 'smlnj': {'id': 'SMLNJ', 'deprecated': False}, - 'smppl': {'id': 'SMPPL', 'deprecated': False}, - 'snia': {'id': 'SNIA', 'deprecated': False}, - 'snprintf': {'id': 'snprintf', 'deprecated': False}, - 'sofa': {'id': 'SOFA', 'deprecated': False}, - 'softsurfer': {'id': 'softSurfer', 'deprecated': False}, - 'soundex': {'id': 'Soundex', 'deprecated': False}, - 'spencer-86': {'id': 'Spencer-86', 'deprecated': False}, - 'spencer-94': {'id': 'Spencer-94', 'deprecated': False}, - 'spencer-99': {'id': 'Spencer-99', 'deprecated': False}, - 'spl-1.0': {'id': 'SPL-1.0', 'deprecated': False}, - 'ssh-keyscan': {'id': 'ssh-keyscan', 'deprecated': False}, - 'ssh-openssh': {'id': 'SSH-OpenSSH', 'deprecated': False}, - 'ssh-short': {'id': 'SSH-short', 'deprecated': False}, - 'ssleay-standalone': {'id': 'SSLeay-standalone', 'deprecated': False}, - 'sspl-1.0': {'id': 'SSPL-1.0', 'deprecated': False}, - 'standardml-nj': {'id': 'StandardML-NJ', 'deprecated': True}, - 'sugarcrm-1.1.3': {'id': 'SugarCRM-1.1.3', 'deprecated': False}, - 'sul-1.0': {'id': 'SUL-1.0', 'deprecated': False}, - 'sun-ppp': {'id': 'Sun-PPP', 'deprecated': False}, - 'sun-ppp-2000': {'id': 'Sun-PPP-2000', 'deprecated': False}, - 'sunpro': {'id': 'SunPro', 'deprecated': False}, - 'swl': {'id': 'SWL', 'deprecated': False}, - 'swrule': {'id': 'swrule', 'deprecated': False}, - 'symlinks': {'id': 'Symlinks', 'deprecated': False}, - 'tapr-ohl-1.0': {'id': 'TAPR-OHL-1.0', 'deprecated': False}, - 'tcl': {'id': 'TCL', 'deprecated': False}, - 'tcp-wrappers': {'id': 'TCP-wrappers', 'deprecated': False}, - 'termreadkey': {'id': 'TermReadKey', 'deprecated': False}, - 'tgppl-1.0': {'id': 'TGPPL-1.0', 'deprecated': False}, - 'thirdeye': {'id': 'ThirdEye', 'deprecated': False}, - 'threeparttable': {'id': 'threeparttable', 'deprecated': False}, - 'tmate': {'id': 'TMate', 'deprecated': False}, - 'torque-1.1': {'id': 'TORQUE-1.1', 'deprecated': False}, - 'tosl': {'id': 'TOSL', 'deprecated': False}, - 'tpdl': {'id': 'TPDL', 'deprecated': False}, - 'tpl-1.0': {'id': 'TPL-1.0', 'deprecated': False}, - 'trustedqsl': {'id': 'TrustedQSL', 'deprecated': False}, - 'ttwl': {'id': 'TTWL', 'deprecated': False}, - 'ttyp0': {'id': 'TTYP0', 'deprecated': False}, - 'tu-berlin-1.0': {'id': 'TU-Berlin-1.0', 'deprecated': False}, - 'tu-berlin-2.0': {'id': 'TU-Berlin-2.0', 'deprecated': False}, - 'ubuntu-font-1.0': {'id': 'Ubuntu-font-1.0', 'deprecated': False}, - 'ucar': {'id': 'UCAR', 'deprecated': False}, - 'ucl-1.0': {'id': 'UCL-1.0', 'deprecated': False}, - 'ulem': {'id': 'ulem', 'deprecated': False}, - 'umich-merit': {'id': 'UMich-Merit', 'deprecated': False}, - 'unicode-3.0': {'id': 'Unicode-3.0', 'deprecated': False}, - 'unicode-dfs-2015': {'id': 'Unicode-DFS-2015', 'deprecated': False}, - 'unicode-dfs-2016': {'id': 'Unicode-DFS-2016', 'deprecated': False}, - 'unicode-tou': {'id': 'Unicode-TOU', 'deprecated': False}, - 'unixcrypt': {'id': 'UnixCrypt', 'deprecated': False}, - 'unlicense': {'id': 'Unlicense', 'deprecated': False}, - 'unlicense-libtelnet': {'id': 'Unlicense-libtelnet', 'deprecated': False}, - 'unlicense-libwhirlpool': {'id': 'Unlicense-libwhirlpool', 'deprecated': False}, - 'upl-1.0': {'id': 'UPL-1.0', 'deprecated': False}, - 'urt-rle': {'id': 'URT-RLE', 'deprecated': False}, - 'vim': {'id': 'Vim', 'deprecated': False}, - 'vostrom': {'id': 'VOSTROM', 'deprecated': False}, - 'vsl-1.0': {'id': 'VSL-1.0', 'deprecated': False}, - 'w3c': {'id': 'W3C', 'deprecated': False}, - 'w3c-19980720': {'id': 'W3C-19980720', 'deprecated': False}, - 'w3c-20150513': {'id': 'W3C-20150513', 'deprecated': False}, - 'w3m': {'id': 'w3m', 'deprecated': False}, - 'watcom-1.0': {'id': 'Watcom-1.0', 'deprecated': False}, - 'widget-workshop': {'id': 'Widget-Workshop', 'deprecated': False}, - 'wsuipa': {'id': 'Wsuipa', 'deprecated': False}, - 'wtfpl': {'id': 'WTFPL', 'deprecated': False}, - 'wwl': {'id': 'wwl', 'deprecated': False}, - 'wxwindows': {'id': 'wxWindows', 'deprecated': True}, - 'x11': {'id': 'X11', 'deprecated': False}, - 'x11-distribute-modifications-variant': {'id': 'X11-distribute-modifications-variant', 'deprecated': False}, - 'x11-swapped': {'id': 'X11-swapped', 'deprecated': False}, - 'xdebug-1.03': {'id': 'Xdebug-1.03', 'deprecated': False}, - 'xerox': {'id': 'Xerox', 'deprecated': False}, - 'xfig': {'id': 'Xfig', 'deprecated': False}, - 'xfree86-1.1': {'id': 'XFree86-1.1', 'deprecated': False}, - 'xinetd': {'id': 'xinetd', 'deprecated': False}, - 'xkeyboard-config-zinoviev': {'id': 'xkeyboard-config-Zinoviev', 'deprecated': False}, - 'xlock': {'id': 'xlock', 'deprecated': False}, - 'xnet': {'id': 'Xnet', 'deprecated': False}, - 'xpp': {'id': 'xpp', 'deprecated': False}, - 'xskat': {'id': 'XSkat', 'deprecated': False}, - 'xzoom': {'id': 'xzoom', 'deprecated': False}, - 'ypl-1.0': {'id': 'YPL-1.0', 'deprecated': False}, - 'ypl-1.1': {'id': 'YPL-1.1', 'deprecated': False}, - 'zed': {'id': 'Zed', 'deprecated': False}, - 'zeeff': {'id': 'Zeeff', 'deprecated': False}, - 'zend-2.0': {'id': 'Zend-2.0', 'deprecated': False}, - 'zimbra-1.3': {'id': 'Zimbra-1.3', 'deprecated': False}, - 'zimbra-1.4': {'id': 'Zimbra-1.4', 'deprecated': False}, - 'zlib': {'id': 'Zlib', 'deprecated': False}, - 'zlib-acknowledgement': {'id': 'zlib-acknowledgement', 'deprecated': False}, - 'zpl-1.1': {'id': 'ZPL-1.1', 'deprecated': False}, - 'zpl-2.0': {'id': 'ZPL-2.0', 'deprecated': False}, - 'zpl-2.1': {'id': 'ZPL-2.1', 'deprecated': False}, -} - -EXCEPTIONS: dict[str, SPDXException] = { - '389-exception': {'id': '389-exception', 'deprecated': False}, - 'asterisk-exception': {'id': 'Asterisk-exception', 'deprecated': False}, - 'asterisk-linking-protocols-exception': {'id': 'Asterisk-linking-protocols-exception', 'deprecated': False}, - 'autoconf-exception-2.0': {'id': 'Autoconf-exception-2.0', 'deprecated': False}, - 'autoconf-exception-3.0': {'id': 'Autoconf-exception-3.0', 'deprecated': False}, - 'autoconf-exception-generic': {'id': 'Autoconf-exception-generic', 'deprecated': False}, - 'autoconf-exception-generic-3.0': {'id': 'Autoconf-exception-generic-3.0', 'deprecated': False}, - 'autoconf-exception-macro': {'id': 'Autoconf-exception-macro', 'deprecated': False}, - 'bison-exception-1.24': {'id': 'Bison-exception-1.24', 'deprecated': False}, - 'bison-exception-2.2': {'id': 'Bison-exception-2.2', 'deprecated': False}, - 'bootloader-exception': {'id': 'Bootloader-exception', 'deprecated': False}, - 'cgal-linking-exception': {'id': 'CGAL-linking-exception', 'deprecated': False}, - 'classpath-exception-2.0': {'id': 'Classpath-exception-2.0', 'deprecated': False}, - 'clisp-exception-2.0': {'id': 'CLISP-exception-2.0', 'deprecated': False}, - 'cryptsetup-openssl-exception': {'id': 'cryptsetup-OpenSSL-exception', 'deprecated': False}, - 'digia-qt-lgpl-exception-1.1': {'id': 'Digia-Qt-LGPL-exception-1.1', 'deprecated': False}, - 'digirule-foss-exception': {'id': 'DigiRule-FOSS-exception', 'deprecated': False}, - 'ecos-exception-2.0': {'id': 'eCos-exception-2.0', 'deprecated': False}, - 'erlang-otp-linking-exception': {'id': 'erlang-otp-linking-exception', 'deprecated': False}, - 'fawkes-runtime-exception': {'id': 'Fawkes-Runtime-exception', 'deprecated': False}, - 'fltk-exception': {'id': 'FLTK-exception', 'deprecated': False}, - 'fmt-exception': {'id': 'fmt-exception', 'deprecated': False}, - 'font-exception-2.0': {'id': 'Font-exception-2.0', 'deprecated': False}, - 'freertos-exception-2.0': {'id': 'freertos-exception-2.0', 'deprecated': False}, - 'gcc-exception-2.0': {'id': 'GCC-exception-2.0', 'deprecated': False}, - 'gcc-exception-2.0-note': {'id': 'GCC-exception-2.0-note', 'deprecated': False}, - 'gcc-exception-3.1': {'id': 'GCC-exception-3.1', 'deprecated': False}, - 'gmsh-exception': {'id': 'Gmsh-exception', 'deprecated': False}, - 'gnat-exception': {'id': 'GNAT-exception', 'deprecated': False}, - 'gnome-examples-exception': {'id': 'GNOME-examples-exception', 'deprecated': False}, - 'gnu-compiler-exception': {'id': 'GNU-compiler-exception', 'deprecated': False}, - 'gnu-javamail-exception': {'id': 'gnu-javamail-exception', 'deprecated': False}, - 'gpl-3.0-389-ds-base-exception': {'id': 'GPL-3.0-389-ds-base-exception', 'deprecated': False}, - 'gpl-3.0-interface-exception': {'id': 'GPL-3.0-interface-exception', 'deprecated': False}, - 'gpl-3.0-linking-exception': {'id': 'GPL-3.0-linking-exception', 'deprecated': False}, - 'gpl-3.0-linking-source-exception': {'id': 'GPL-3.0-linking-source-exception', 'deprecated': False}, - 'gpl-cc-1.0': {'id': 'GPL-CC-1.0', 'deprecated': False}, - 'gstreamer-exception-2005': {'id': 'GStreamer-exception-2005', 'deprecated': False}, - 'gstreamer-exception-2008': {'id': 'GStreamer-exception-2008', 'deprecated': False}, - 'harbour-exception': {'id': 'harbour-exception', 'deprecated': False}, - 'i2p-gpl-java-exception': {'id': 'i2p-gpl-java-exception', 'deprecated': False}, - 'independent-modules-exception': {'id': 'Independent-modules-exception', 'deprecated': False}, - 'kicad-libraries-exception': {'id': 'KiCad-libraries-exception', 'deprecated': False}, - 'lgpl-3.0-linking-exception': {'id': 'LGPL-3.0-linking-exception', 'deprecated': False}, - 'libpri-openh323-exception': {'id': 'libpri-OpenH323-exception', 'deprecated': False}, - 'libtool-exception': {'id': 'Libtool-exception', 'deprecated': False}, - 'linux-syscall-note': {'id': 'Linux-syscall-note', 'deprecated': False}, - 'llgpl': {'id': 'LLGPL', 'deprecated': False}, - 'llvm-exception': {'id': 'LLVM-exception', 'deprecated': False}, - 'lzma-exception': {'id': 'LZMA-exception', 'deprecated': False}, - 'mif-exception': {'id': 'mif-exception', 'deprecated': False}, - 'mxml-exception': {'id': 'mxml-exception', 'deprecated': False}, - 'nokia-qt-exception-1.1': {'id': 'Nokia-Qt-exception-1.1', 'deprecated': True}, - 'ocaml-lgpl-linking-exception': {'id': 'OCaml-LGPL-linking-exception', 'deprecated': False}, - 'occt-exception-1.0': {'id': 'OCCT-exception-1.0', 'deprecated': False}, - 'openjdk-assembly-exception-1.0': {'id': 'OpenJDK-assembly-exception-1.0', 'deprecated': False}, - 'openvpn-openssl-exception': {'id': 'openvpn-openssl-exception', 'deprecated': False}, - 'pcre2-exception': {'id': 'PCRE2-exception', 'deprecated': False}, - 'polyparse-exception': {'id': 'polyparse-exception', 'deprecated': False}, - 'ps-or-pdf-font-exception-20170817': {'id': 'PS-or-PDF-font-exception-20170817', 'deprecated': False}, - 'qpl-1.0-inria-2004-exception': {'id': 'QPL-1.0-INRIA-2004-exception', 'deprecated': False}, - 'qt-gpl-exception-1.0': {'id': 'Qt-GPL-exception-1.0', 'deprecated': False}, - 'qt-lgpl-exception-1.1': {'id': 'Qt-LGPL-exception-1.1', 'deprecated': False}, - 'qwt-exception-1.0': {'id': 'Qwt-exception-1.0', 'deprecated': False}, - 'romic-exception': {'id': 'romic-exception', 'deprecated': False}, - 'rrdtool-floss-exception-2.0': {'id': 'RRDtool-FLOSS-exception-2.0', 'deprecated': False}, - 'sane-exception': {'id': 'SANE-exception', 'deprecated': False}, - 'shl-2.0': {'id': 'SHL-2.0', 'deprecated': False}, - 'shl-2.1': {'id': 'SHL-2.1', 'deprecated': False}, - 'stunnel-exception': {'id': 'stunnel-exception', 'deprecated': False}, - 'swi-exception': {'id': 'SWI-exception', 'deprecated': False}, - 'swift-exception': {'id': 'Swift-exception', 'deprecated': False}, - 'texinfo-exception': {'id': 'Texinfo-exception', 'deprecated': False}, - 'u-boot-exception-2.0': {'id': 'u-boot-exception-2.0', 'deprecated': False}, - 'ubdl-exception': {'id': 'UBDL-exception', 'deprecated': False}, - 'universal-foss-exception-1.0': {'id': 'Universal-FOSS-exception-1.0', 'deprecated': False}, - 'vsftpd-openssl-exception': {'id': 'vsftpd-openssl-exception', 'deprecated': False}, - 'wxwindows-exception-3.1': {'id': 'WxWindows-exception-3.1', 'deprecated': False}, - 'x11vnc-openssl-exception': {'id': 'x11vnc-openssl-exception', 'deprecated': False}, -} diff --git a/voxvera/vendor/packaging/markers.py b/voxvera/vendor/packaging/markers.py deleted file mode 100644 index ca3706f..0000000 --- a/voxvera/vendor/packaging/markers.py +++ /dev/null @@ -1,388 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import operator -import os -import platform -import sys -from typing import AbstractSet, Callable, Literal, Mapping, TypedDict, Union, cast - -from ._parser import MarkerAtom, MarkerList, Op, Value, Variable -from ._parser import parse_marker as _parse_marker -from ._tokenizer import ParserSyntaxError -from .specifiers import InvalidSpecifier, Specifier -from .utils import canonicalize_name - -__all__ = [ - "Environment", - "EvaluateContext", - "InvalidMarker", - "Marker", - "UndefinedComparison", - "UndefinedEnvironmentName", - "default_environment", -] - -Operator = Callable[[str, Union[str, AbstractSet[str]]], bool] -EvaluateContext = Literal["metadata", "lock_file", "requirement"] -MARKERS_ALLOWING_SET = {"extras", "dependency_groups"} -MARKERS_REQUIRING_VERSION = { - "implementation_version", - "platform_release", - "python_full_version", - "python_version", -} - - -class InvalidMarker(ValueError): - """ - An invalid marker was found, users should refer to PEP 508. - """ - - -class UndefinedComparison(ValueError): - """ - An invalid operation was attempted on a value that doesn't support it. - """ - - -class UndefinedEnvironmentName(ValueError): - """ - A name was attempted to be used that does not exist inside of the - environment. - """ - - -class Environment(TypedDict): - implementation_name: str - """The implementation's identifier, e.g. ``'cpython'``.""" - - implementation_version: str - """ - The implementation's version, e.g. ``'3.13.0a2'`` for CPython 3.13.0a2, or - ``'7.3.13'`` for PyPy3.10 v7.3.13. - """ - - os_name: str - """ - The value of :py:data:`os.name`. The name of the operating system dependent module - imported, e.g. ``'posix'``. - """ - - platform_machine: str - """ - Returns the machine type, e.g. ``'i386'``. - - An empty string if the value cannot be determined. - """ - - platform_release: str - """ - The system's release, e.g. ``'2.2.0'`` or ``'NT'``. - - An empty string if the value cannot be determined. - """ - - platform_system: str - """ - The system/OS name, e.g. ``'Linux'``, ``'Windows'`` or ``'Java'``. - - An empty string if the value cannot be determined. - """ - - platform_version: str - """ - The system's release version, e.g. ``'#3 on degas'``. - - An empty string if the value cannot be determined. - """ - - python_full_version: str - """ - The Python version as string ``'major.minor.patchlevel'``. - - Note that unlike the Python :py:data:`sys.version`, this value will always include - the patchlevel (it defaults to 0). - """ - - platform_python_implementation: str - """ - A string identifying the Python implementation, e.g. ``'CPython'``. - """ - - python_version: str - """The Python version as string ``'major.minor'``.""" - - sys_platform: str - """ - This string contains a platform identifier that can be used to append - platform-specific components to :py:data:`sys.path`, for instance. - - For Unix systems, except on Linux and AIX, this is the lowercased OS name as - returned by ``uname -s`` with the first part of the version as returned by - ``uname -r`` appended, e.g. ``'sunos5'`` or ``'freebsd8'``, at the time when Python - was built. - """ - - -def _normalize_extras( - result: MarkerList | MarkerAtom | str, -) -> MarkerList | MarkerAtom | str: - if not isinstance(result, tuple): - return result - - lhs, op, rhs = result - if isinstance(lhs, Variable) and lhs.value == "extra": - normalized_extra = canonicalize_name(rhs.value) - rhs = Value(normalized_extra) - elif isinstance(rhs, Variable) and rhs.value == "extra": - normalized_extra = canonicalize_name(lhs.value) - lhs = Value(normalized_extra) - return lhs, op, rhs - - -def _normalize_extra_values(results: MarkerList) -> MarkerList: - """ - Normalize extra values. - """ - - return [_normalize_extras(r) for r in results] - - -def _format_marker( - marker: list[str] | MarkerAtom | str, first: bool | None = True -) -> str: - assert isinstance(marker, (list, tuple, str)) - - # Sometimes we have a structure like [[...]] which is a single item list - # where the single item is itself it's own list. In that case we want skip - # the rest of this function so that we don't get extraneous () on the - # outside. - if ( - isinstance(marker, list) - and len(marker) == 1 - and isinstance(marker[0], (list, tuple)) - ): - return _format_marker(marker[0]) - - if isinstance(marker, list): - inner = (_format_marker(m, first=False) for m in marker) - if first: - return " ".join(inner) - else: - return "(" + " ".join(inner) + ")" - elif isinstance(marker, tuple): - return " ".join([m.serialize() for m in marker]) - else: - return marker - - -_operators: dict[str, Operator] = { - "in": lambda lhs, rhs: lhs in rhs, - "not in": lambda lhs, rhs: lhs not in rhs, - "<": lambda _lhs, _rhs: False, - "<=": operator.eq, - "==": operator.eq, - "!=": operator.ne, - ">=": operator.eq, - ">": lambda _lhs, _rhs: False, -} - - -def _eval_op(lhs: str, op: Op, rhs: str | AbstractSet[str], *, key: str) -> bool: - op_str = op.serialize() - if key in MARKERS_REQUIRING_VERSION: - try: - spec = Specifier(f"{op_str}{rhs}") - except InvalidSpecifier: - pass - else: - return spec.contains(lhs, prereleases=True) - - oper: Operator | None = _operators.get(op_str) - if oper is None: - raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.") - - return oper(lhs, rhs) - - -def _normalize( - lhs: str, rhs: str | AbstractSet[str], key: str -) -> tuple[str, str | AbstractSet[str]]: - # PEP 685 - Comparison of extra names for optional distribution dependencies - # https://peps.python.org/pep-0685/ - # > When comparing extra names, tools MUST normalize the names being - # > compared using the semantics outlined in PEP 503 for names - if key == "extra": - assert isinstance(rhs, str), "extra value must be a string" - # Both sides are normalized at this point already - return (lhs, rhs) - if key in MARKERS_ALLOWING_SET: - if isinstance(rhs, str): # pragma: no cover - return (canonicalize_name(lhs), canonicalize_name(rhs)) - else: - return (canonicalize_name(lhs), {canonicalize_name(v) for v in rhs}) - - # other environment markers don't have such standards - return lhs, rhs - - -def _evaluate_markers( - markers: MarkerList, environment: dict[str, str | AbstractSet[str]] -) -> bool: - groups: list[list[bool]] = [[]] - - for marker in markers: - if isinstance(marker, list): - groups[-1].append(_evaluate_markers(marker, environment)) - elif isinstance(marker, tuple): - lhs, op, rhs = marker - - if isinstance(lhs, Variable): - environment_key = lhs.value - lhs_value = environment[environment_key] - rhs_value = rhs.value - else: - lhs_value = lhs.value - environment_key = rhs.value - rhs_value = environment[environment_key] - - assert isinstance(lhs_value, str), "lhs must be a string" - lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key) - groups[-1].append(_eval_op(lhs_value, op, rhs_value, key=environment_key)) - elif marker == "or": - groups.append([]) - elif marker == "and": - pass - else: # pragma: nocover - raise TypeError(f"Unexpected marker {marker!r}") - - return any(all(item) for item in groups) - - -def format_full_version(info: sys._version_info) -> str: - version = f"{info.major}.{info.minor}.{info.micro}" - kind = info.releaselevel - if kind != "final": - version += kind[0] + str(info.serial) - return version - - -def default_environment() -> Environment: - iver = format_full_version(sys.implementation.version) - implementation_name = sys.implementation.name - return { - "implementation_name": implementation_name, - "implementation_version": iver, - "os_name": os.name, - "platform_machine": platform.machine(), - "platform_release": platform.release(), - "platform_system": platform.system(), - "platform_version": platform.version(), - "python_full_version": platform.python_version(), - "platform_python_implementation": platform.python_implementation(), - "python_version": ".".join(platform.python_version_tuple()[:2]), - "sys_platform": sys.platform, - } - - -class Marker: - def __init__(self, marker: str) -> None: - # Note: We create a Marker object without calling this constructor in - # packaging.requirements.Requirement. If any additional logic is - # added here, make sure to mirror/adapt Requirement. - - # If this fails and throws an error, the repr still expects _markers to - # be defined. - self._markers: MarkerList = [] - - try: - self._markers = _normalize_extra_values(_parse_marker(marker)) - # The attribute `_markers` can be described in terms of a recursive type: - # MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]] - # - # For example, the following expression: - # python_version > "3.6" or (python_version == "3.6" and os_name == "unix") - # - # is parsed into: - # [ - # (, ')>, ), - # 'and', - # [ - # (, , ), - # 'or', - # (, , ) - # ] - # ] - except ParserSyntaxError as e: - raise InvalidMarker(str(e)) from e - - def __str__(self) -> str: - return _format_marker(self._markers) - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}('{self}')>" - - def __hash__(self) -> int: - return hash(str(self)) - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Marker): - return NotImplemented - - return str(self) == str(other) - - def evaluate( - self, - environment: Mapping[str, str | AbstractSet[str]] | None = None, - context: EvaluateContext = "metadata", - ) -> bool: - """Evaluate a marker. - - Return the boolean from evaluating the given marker against the - environment. environment is an optional argument to override all or - part of the determined environment. The *context* parameter specifies what - context the markers are being evaluated for, which influences what markers - are considered valid. Acceptable values are "metadata" (for core metadata; - default), "lock_file", and "requirement" (i.e. all other situations). - - The environment is determined from the current Python process. - """ - current_environment = cast( - "dict[str, str | AbstractSet[str]]", default_environment() - ) - if context == "lock_file": - current_environment.update( - extras=frozenset(), dependency_groups=frozenset() - ) - elif context == "metadata": - current_environment["extra"] = "" - - if environment is not None: - current_environment.update(environment) - if "extra" in current_environment: - # The API used to allow setting extra to None. We need to handle - # this case for backwards compatibility. Also skip running - # normalize name if extra is empty. - extra = cast("str | None", current_environment["extra"]) - current_environment["extra"] = canonicalize_name(extra) if extra else "" - - return _evaluate_markers( - self._markers, _repair_python_full_version(current_environment) - ) - - -def _repair_python_full_version( - env: dict[str, str | AbstractSet[str]], -) -> dict[str, str | AbstractSet[str]]: - """ - Work around platform.python_version() returning something that is not PEP 440 - compliant for non-tagged Python builds. - """ - python_full_version = cast("str", env["python_full_version"]) - if python_full_version.endswith("+"): - env["python_full_version"] = f"{python_full_version}local" - return env diff --git a/voxvera/vendor/packaging/metadata.py b/voxvera/vendor/packaging/metadata.py deleted file mode 100644 index 253f6b1..0000000 --- a/voxvera/vendor/packaging/metadata.py +++ /dev/null @@ -1,978 +0,0 @@ -from __future__ import annotations - -import email.feedparser -import email.header -import email.message -import email.parser -import email.policy -import keyword -import pathlib -import sys -import typing -from typing import ( - Any, - Callable, - Generic, - Literal, - TypedDict, - cast, -) - -from . import licenses, requirements, specifiers, utils -from . import version as version_module - -if typing.TYPE_CHECKING: - from .licenses import NormalizedLicenseExpression - -T = typing.TypeVar("T") - - -if sys.version_info >= (3, 11): # pragma: no cover - ExceptionGroup = ExceptionGroup # noqa: F821 -else: # pragma: no cover - - class ExceptionGroup(Exception): - """A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11. - - If :external:exc:`ExceptionGroup` is already defined by Python itself, - that version is used instead. - """ - - message: str - exceptions: list[Exception] - - def __init__(self, message: str, exceptions: list[Exception]) -> None: - self.message = message - self.exceptions = exceptions - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.message!r}, {self.exceptions!r})" - - -class InvalidMetadata(ValueError): - """A metadata field contains invalid data.""" - - field: str - """The name of the field that contains invalid data.""" - - def __init__(self, field: str, message: str) -> None: - self.field = field - super().__init__(message) - - -# The RawMetadata class attempts to make as few assumptions about the underlying -# serialization formats as possible. The idea is that as long as a serialization -# formats offer some very basic primitives in *some* way then we can support -# serializing to and from that format. -class RawMetadata(TypedDict, total=False): - """A dictionary of raw core metadata. - - Each field in core metadata maps to a key of this dictionary (when data is - provided). The key is lower-case and underscores are used instead of dashes - compared to the equivalent core metadata field. Any core metadata field that - can be specified multiple times or can hold multiple values in a single - field have a key with a plural name. See :class:`Metadata` whose attributes - match the keys of this dictionary. - - Core metadata fields that can be specified multiple times are stored as a - list or dict depending on which is appropriate for the field. Any fields - which hold multiple values in a single field are stored as a list. - - """ - - # Metadata 1.0 - PEP 241 - metadata_version: str - name: str - version: str - platforms: list[str] - summary: str - description: str - keywords: list[str] - home_page: str - author: str - author_email: str - license: str - - # Metadata 1.1 - PEP 314 - supported_platforms: list[str] - download_url: str - classifiers: list[str] - requires: list[str] - provides: list[str] - obsoletes: list[str] - - # Metadata 1.2 - PEP 345 - maintainer: str - maintainer_email: str - requires_dist: list[str] - provides_dist: list[str] - obsoletes_dist: list[str] - requires_python: str - requires_external: list[str] - project_urls: dict[str, str] - - # Metadata 2.0 - # PEP 426 attempted to completely revamp the metadata format - # but got stuck without ever being able to build consensus on - # it and ultimately ended up withdrawn. - # - # However, a number of tools had started emitting METADATA with - # `2.0` Metadata-Version, so for historical reasons, this version - # was skipped. - - # Metadata 2.1 - PEP 566 - description_content_type: str - provides_extra: list[str] - - # Metadata 2.2 - PEP 643 - dynamic: list[str] - - # Metadata 2.3 - PEP 685 - # No new fields were added in PEP 685, just some edge case were - # tightened up to provide better interoperability. - - # Metadata 2.4 - PEP 639 - license_expression: str - license_files: list[str] - - # Metadata 2.5 - PEP 794 - import_names: list[str] - import_namespaces: list[str] - - -# 'keywords' is special as it's a string in the core metadata spec, but we -# represent it as a list. -_STRING_FIELDS = { - "author", - "author_email", - "description", - "description_content_type", - "download_url", - "home_page", - "license", - "license_expression", - "maintainer", - "maintainer_email", - "metadata_version", - "name", - "requires_python", - "summary", - "version", -} - -_LIST_FIELDS = { - "classifiers", - "dynamic", - "license_files", - "obsoletes", - "obsoletes_dist", - "platforms", - "provides", - "provides_dist", - "provides_extra", - "requires", - "requires_dist", - "requires_external", - "supported_platforms", - "import_names", - "import_namespaces", -} - -_DICT_FIELDS = { - "project_urls", -} - - -def _parse_keywords(data: str) -> list[str]: - """Split a string of comma-separated keywords into a list of keywords.""" - return [k.strip() for k in data.split(",")] - - -def _parse_project_urls(data: list[str]) -> dict[str, str]: - """Parse a list of label/URL string pairings separated by a comma.""" - urls = {} - for pair in data: - # Our logic is slightly tricky here as we want to try and do - # *something* reasonable with malformed data. - # - # The main thing that we have to worry about, is data that does - # not have a ',' at all to split the label from the Value. There - # isn't a singular right answer here, and we will fail validation - # later on (if the caller is validating) so it doesn't *really* - # matter, but since the missing value has to be an empty str - # and our return value is dict[str, str], if we let the key - # be the missing value, then they'd have multiple '' values that - # overwrite each other in a accumulating dict. - # - # The other potential issue is that it's possible to have the - # same label multiple times in the metadata, with no solid "right" - # answer with what to do in that case. As such, we'll do the only - # thing we can, which is treat the field as unparsable and add it - # to our list of unparsed fields. - # - # TODO: The spec doesn't say anything about if the keys should be - # considered case sensitive or not... logically they should - # be case-preserving and case-insensitive, but doing that - # would open up more cases where we might have duplicate - # entries. - label, _, url = (s.strip() for s in pair.partition(",")) - - if label in urls: - # The label already exists in our set of urls, so this field - # is unparsable, and we can just add the whole thing to our - # unparsable data and stop processing it. - raise KeyError("duplicate labels in project urls") - urls[label] = url - - return urls - - -def _get_payload(msg: email.message.Message, source: bytes | str) -> str: - """Get the body of the message.""" - # If our source is a str, then our caller has managed encodings for us, - # and we don't need to deal with it. - if isinstance(source, str): - payload = msg.get_payload() - assert isinstance(payload, str) - return payload - # If our source is a bytes, then we're managing the encoding and we need - # to deal with it. - else: - bpayload = msg.get_payload(decode=True) - assert isinstance(bpayload, bytes) - try: - return bpayload.decode("utf8", "strict") - except UnicodeDecodeError as exc: - raise ValueError("payload in an invalid encoding") from exc - - -# The various parse_FORMAT functions here are intended to be as lenient as -# possible in their parsing, while still returning a correctly typed -# RawMetadata. -# -# To aid in this, we also generally want to do as little touching of the -# data as possible, except where there are possibly some historic holdovers -# that make valid data awkward to work with. -# -# While this is a lower level, intermediate format than our ``Metadata`` -# class, some light touch ups can make a massive difference in usability. - -# Map METADATA fields to RawMetadata. -_EMAIL_TO_RAW_MAPPING = { - "author": "author", - "author-email": "author_email", - "classifier": "classifiers", - "description": "description", - "description-content-type": "description_content_type", - "download-url": "download_url", - "dynamic": "dynamic", - "home-page": "home_page", - "import-name": "import_names", - "import-namespace": "import_namespaces", - "keywords": "keywords", - "license": "license", - "license-expression": "license_expression", - "license-file": "license_files", - "maintainer": "maintainer", - "maintainer-email": "maintainer_email", - "metadata-version": "metadata_version", - "name": "name", - "obsoletes": "obsoletes", - "obsoletes-dist": "obsoletes_dist", - "platform": "platforms", - "project-url": "project_urls", - "provides": "provides", - "provides-dist": "provides_dist", - "provides-extra": "provides_extra", - "requires": "requires", - "requires-dist": "requires_dist", - "requires-external": "requires_external", - "requires-python": "requires_python", - "summary": "summary", - "supported-platform": "supported_platforms", - "version": "version", -} -_RAW_TO_EMAIL_MAPPING = {raw: email for email, raw in _EMAIL_TO_RAW_MAPPING.items()} - - -# This class is for writing RFC822 messages -class RFC822Policy(email.policy.EmailPolicy): - """ - This is :class:`email.policy.EmailPolicy`, but with a simple ``header_store_parse`` - implementation that handles multi-line values, and some nice defaults. - """ - - utf8 = True - mangle_from_ = False - max_line_length = 0 - - def header_store_parse(self, name: str, value: str) -> tuple[str, str]: - size = len(name) + 2 - value = value.replace("\n", "\n" + " " * size) - return (name, value) - - -# This class is for writing RFC822 messages -class RFC822Message(email.message.EmailMessage): - """ - This is :class:`email.message.EmailMessage` with two small changes: it defaults to - our `RFC822Policy`, and it correctly writes unicode when being called - with `bytes()`. - """ - - def __init__(self) -> None: - super().__init__(policy=RFC822Policy()) - - def as_bytes( - self, unixfrom: bool = False, policy: email.policy.Policy | None = None - ) -> bytes: - """ - Return the bytes representation of the message. - - This handles unicode encoding. - """ - return self.as_string(unixfrom, policy=policy).encode("utf-8") - - -def parse_email(data: bytes | str) -> tuple[RawMetadata, dict[str, list[str]]]: - """Parse a distribution's metadata stored as email headers (e.g. from ``METADATA``). - - This function returns a two-item tuple of dicts. The first dict is of - recognized fields from the core metadata specification. Fields that can be - parsed and translated into Python's built-in types are converted - appropriately. All other fields are left as-is. Fields that are allowed to - appear multiple times are stored as lists. - - The second dict contains all other fields from the metadata. This includes - any unrecognized fields. It also includes any fields which are expected to - be parsed into a built-in type but were not formatted appropriately. Finally, - any fields that are expected to appear only once but are repeated are - included in this dict. - - """ - raw: dict[str, str | list[str] | dict[str, str]] = {} - unparsed: dict[str, list[str]] = {} - - if isinstance(data, str): - parsed = email.parser.Parser(policy=email.policy.compat32).parsestr(data) - else: - parsed = email.parser.BytesParser(policy=email.policy.compat32).parsebytes(data) - - # We have to wrap parsed.keys() in a set, because in the case of multiple - # values for a key (a list), the key will appear multiple times in the - # list of keys, but we're avoiding that by using get_all(). - for name_with_case in frozenset(parsed.keys()): - # Header names in RFC are case insensitive, so we'll normalize to all - # lower case to make comparisons easier. - name = name_with_case.lower() - - # We use get_all() here, even for fields that aren't multiple use, - # because otherwise someone could have e.g. two Name fields, and we - # would just silently ignore it rather than doing something about it. - headers = parsed.get_all(name) or [] - - # The way the email module works when parsing bytes is that it - # unconditionally decodes the bytes as ascii using the surrogateescape - # handler. When you pull that data back out (such as with get_all() ), - # it looks to see if the str has any surrogate escapes, and if it does - # it wraps it in a Header object instead of returning the string. - # - # As such, we'll look for those Header objects, and fix up the encoding. - value = [] - # Flag if we have run into any issues processing the headers, thus - # signalling that the data belongs in 'unparsed'. - valid_encoding = True - for h in headers: - # It's unclear if this can return more types than just a Header or - # a str, so we'll just assert here to make sure. - assert isinstance(h, (email.header.Header, str)) - - # If it's a header object, we need to do our little dance to get - # the real data out of it. In cases where there is invalid data - # we're going to end up with mojibake, but there's no obvious, good - # way around that without reimplementing parts of the Header object - # ourselves. - # - # That should be fine since, if mojibacked happens, this key is - # going into the unparsed dict anyways. - if isinstance(h, email.header.Header): - # The Header object stores it's data as chunks, and each chunk - # can be independently encoded, so we'll need to check each - # of them. - chunks: list[tuple[bytes, str | None]] = [] - for binary, _encoding in email.header.decode_header(h): - try: - binary.decode("utf8", "strict") - except UnicodeDecodeError: - # Enable mojibake. - encoding = "latin1" - valid_encoding = False - else: - encoding = "utf8" - chunks.append((binary, encoding)) - - # Turn our chunks back into a Header object, then let that - # Header object do the right thing to turn them into a - # string for us. - value.append(str(email.header.make_header(chunks))) - # This is already a string, so just add it. - else: - value.append(h) - - # We've processed all of our values to get them into a list of str, - # but we may have mojibake data, in which case this is an unparsed - # field. - if not valid_encoding: - unparsed[name] = value - continue - - raw_name = _EMAIL_TO_RAW_MAPPING.get(name) - if raw_name is None: - # This is a bit of a weird situation, we've encountered a key that - # we don't know what it means, so we don't know whether it's meant - # to be a list or not. - # - # Since we can't really tell one way or another, we'll just leave it - # as a list, even though it may be a single item list, because that's - # what makes the most sense for email headers. - unparsed[name] = value - continue - - # If this is one of our string fields, then we'll check to see if our - # value is a list of a single item. If it is then we'll assume that - # it was emitted as a single string, and unwrap the str from inside - # the list. - # - # If it's any other kind of data, then we haven't the faintest clue - # what we should parse it as, and we have to just add it to our list - # of unparsed stuff. - if raw_name in _STRING_FIELDS and len(value) == 1: - raw[raw_name] = value[0] - # If this is import_names, we need to special case the empty field - # case, which converts to an empty list instead of None. We can't let - # the empty case slip through, as it will fail validation. - elif raw_name == "import_names" and value == [""]: - raw[raw_name] = [] - # If this is one of our list of string fields, then we can just assign - # the value, since email *only* has strings, and our get_all() call - # above ensures that this is a list. - elif raw_name in _LIST_FIELDS: - raw[raw_name] = value - # Special Case: Keywords - # The keywords field is implemented in the metadata spec as a str, - # but it conceptually is a list of strings, and is serialized using - # ", ".join(keywords), so we'll do some light data massaging to turn - # this into what it logically is. - elif raw_name == "keywords" and len(value) == 1: - raw[raw_name] = _parse_keywords(value[0]) - # Special Case: Project-URL - # The project urls is implemented in the metadata spec as a list of - # specially-formatted strings that represent a key and a value, which - # is fundamentally a mapping, however the email format doesn't support - # mappings in a sane way, so it was crammed into a list of strings - # instead. - # - # We will do a little light data massaging to turn this into a map as - # it logically should be. - elif raw_name == "project_urls": - try: - raw[raw_name] = _parse_project_urls(value) - except KeyError: - unparsed[name] = value - # Nothing that we've done has managed to parse this, so it'll just - # throw it in our unparsable data and move on. - else: - unparsed[name] = value - - # We need to support getting the Description from the message payload in - # addition to getting it from the the headers. This does mean, though, there - # is the possibility of it being set both ways, in which case we put both - # in 'unparsed' since we don't know which is right. - try: - payload = _get_payload(parsed, data) - except ValueError: - unparsed.setdefault("description", []).append( - parsed.get_payload(decode=isinstance(data, bytes)) # type: ignore[call-overload] - ) - else: - if payload: - # Check to see if we've already got a description, if so then both - # it, and this body move to unparsable. - if "description" in raw: - description_header = cast("str", raw.pop("description")) - unparsed.setdefault("description", []).extend( - [description_header, payload] - ) - elif "description" in unparsed: - unparsed["description"].append(payload) - else: - raw["description"] = payload - - # We need to cast our `raw` to a metadata, because a TypedDict only support - # literal key names, but we're computing our key names on purpose, but the - # way this function is implemented, our `TypedDict` can only have valid key - # names. - return cast("RawMetadata", raw), unparsed - - -_NOT_FOUND = object() - - -# Keep the two values in sync. -_VALID_METADATA_VERSIONS = ["1.0", "1.1", "1.2", "2.1", "2.2", "2.3", "2.4", "2.5"] -_MetadataVersion = Literal["1.0", "1.1", "1.2", "2.1", "2.2", "2.3", "2.4", "2.5"] - -_REQUIRED_ATTRS = frozenset(["metadata_version", "name", "version"]) - - -class _Validator(Generic[T]): - """Validate a metadata field. - - All _process_*() methods correspond to a core metadata field. The method is - called with the field's raw value. If the raw value is valid it is returned - in its "enriched" form (e.g. ``version.Version`` for the ``Version`` field). - If the raw value is invalid, :exc:`InvalidMetadata` is raised (with a cause - as appropriate). - """ - - name: str - raw_name: str - added: _MetadataVersion - - def __init__( - self, - *, - added: _MetadataVersion = "1.0", - ) -> None: - self.added = added - - def __set_name__(self, _owner: Metadata, name: str) -> None: - self.name = name - self.raw_name = _RAW_TO_EMAIL_MAPPING[name] - - def __get__(self, instance: Metadata, _owner: type[Metadata]) -> T: - # With Python 3.8, the caching can be replaced with functools.cached_property(). - # No need to check the cache as attribute lookup will resolve into the - # instance's __dict__ before __get__ is called. - cache = instance.__dict__ - value = instance._raw.get(self.name) - - # To make the _process_* methods easier, we'll check if the value is None - # and if this field is NOT a required attribute, and if both of those - # things are true, we'll skip the the converter. This will mean that the - # converters never have to deal with the None union. - if self.name in _REQUIRED_ATTRS or value is not None: - try: - converter: Callable[[Any], T] = getattr(self, f"_process_{self.name}") - except AttributeError: - pass - else: - value = converter(value) - - cache[self.name] = value - try: - del instance._raw[self.name] # type: ignore[misc] - except KeyError: - pass - - return cast("T", value) - - def _invalid_metadata( - self, msg: str, cause: Exception | None = None - ) -> InvalidMetadata: - exc = InvalidMetadata( - self.raw_name, msg.format_map({"field": repr(self.raw_name)}) - ) - exc.__cause__ = cause - return exc - - def _process_metadata_version(self, value: str) -> _MetadataVersion: - # Implicitly makes Metadata-Version required. - if value not in _VALID_METADATA_VERSIONS: - raise self._invalid_metadata(f"{value!r} is not a valid metadata version") - return cast("_MetadataVersion", value) - - def _process_name(self, value: str) -> str: - if not value: - raise self._invalid_metadata("{field} is a required field") - # Validate the name as a side-effect. - try: - utils.canonicalize_name(value, validate=True) - except utils.InvalidName as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) from exc - else: - return value - - def _process_version(self, value: str) -> version_module.Version: - if not value: - raise self._invalid_metadata("{field} is a required field") - try: - return version_module.parse(value) - except version_module.InvalidVersion as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) from exc - - def _process_summary(self, value: str) -> str: - """Check the field contains no newlines.""" - if "\n" in value: - raise self._invalid_metadata("{field} must be a single line") - return value - - def _process_description_content_type(self, value: str) -> str: - content_types = {"text/plain", "text/x-rst", "text/markdown"} - message = email.message.EmailMessage() - message["content-type"] = value - - content_type, parameters = ( - # Defaults to `text/plain` if parsing failed. - message.get_content_type().lower(), - message["content-type"].params, - ) - # Check if content-type is valid or defaulted to `text/plain` and thus was - # not parseable. - if content_type not in content_types or content_type not in value.lower(): - raise self._invalid_metadata( - f"{{field}} must be one of {list(content_types)}, not {value!r}" - ) - - charset = parameters.get("charset", "UTF-8") - if charset != "UTF-8": - raise self._invalid_metadata( - f"{{field}} can only specify the UTF-8 charset, not {list(charset)}" - ) - - markdown_variants = {"GFM", "CommonMark"} - variant = parameters.get("variant", "GFM") # Use an acceptable default. - if content_type == "text/markdown" and variant not in markdown_variants: - raise self._invalid_metadata( - f"valid Markdown variants for {{field}} are {list(markdown_variants)}, " - f"not {variant!r}", - ) - return value - - def _process_dynamic(self, value: list[str]) -> list[str]: - for dynamic_field in map(str.lower, value): - if dynamic_field in {"name", "version", "metadata-version"}: - raise self._invalid_metadata( - f"{dynamic_field!r} is not allowed as a dynamic field" - ) - elif dynamic_field not in _EMAIL_TO_RAW_MAPPING: - raise self._invalid_metadata( - f"{dynamic_field!r} is not a valid dynamic field" - ) - return list(map(str.lower, value)) - - def _process_provides_extra( - self, - value: list[str], - ) -> list[utils.NormalizedName]: - normalized_names = [] - try: - for name in value: - normalized_names.append(utils.canonicalize_name(name, validate=True)) - except utils.InvalidName as exc: - raise self._invalid_metadata( - f"{name!r} is invalid for {{field}}", cause=exc - ) from exc - else: - return normalized_names - - def _process_requires_python(self, value: str) -> specifiers.SpecifierSet: - try: - return specifiers.SpecifierSet(value) - except specifiers.InvalidSpecifier as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) from exc - - def _process_requires_dist( - self, - value: list[str], - ) -> list[requirements.Requirement]: - reqs = [] - try: - for req in value: - reqs.append(requirements.Requirement(req)) - except requirements.InvalidRequirement as exc: - raise self._invalid_metadata( - f"{req!r} is invalid for {{field}}", cause=exc - ) from exc - else: - return reqs - - def _process_license_expression(self, value: str) -> NormalizedLicenseExpression: - try: - return licenses.canonicalize_license_expression(value) - except ValueError as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) from exc - - def _process_license_files(self, value: list[str]) -> list[str]: - paths = [] - for path in value: - if ".." in path: - raise self._invalid_metadata( - f"{path!r} is invalid for {{field}}, " - "parent directory indicators are not allowed" - ) - if "*" in path: - raise self._invalid_metadata( - f"{path!r} is invalid for {{field}}, paths must be resolved" - ) - if ( - pathlib.PurePosixPath(path).is_absolute() - or pathlib.PureWindowsPath(path).is_absolute() - ): - raise self._invalid_metadata( - f"{path!r} is invalid for {{field}}, paths must be relative" - ) - if pathlib.PureWindowsPath(path).as_posix() != path: - raise self._invalid_metadata( - f"{path!r} is invalid for {{field}}, paths must use '/' delimiter" - ) - paths.append(path) - return paths - - def _process_import_names(self, value: list[str]) -> list[str]: - for import_name in value: - name, semicolon, private = import_name.partition(";") - name = name.rstrip() - for identifier in name.split("."): - if not identifier.isidentifier(): - raise self._invalid_metadata( - f"{name!r} is invalid for {{field}}; " - f"{identifier!r} is not a valid identifier" - ) - elif keyword.iskeyword(identifier): - raise self._invalid_metadata( - f"{name!r} is invalid for {{field}}; " - f"{identifier!r} is a keyword" - ) - if semicolon and private.lstrip() != "private": - raise self._invalid_metadata( - f"{import_name!r} is invalid for {{field}}; " - "the only valid option is 'private'" - ) - return value - - _process_import_namespaces = _process_import_names - - -class Metadata: - """Representation of distribution metadata. - - Compared to :class:`RawMetadata`, this class provides objects representing - metadata fields instead of only using built-in types. Any invalid metadata - will cause :exc:`InvalidMetadata` to be raised (with a - :py:attr:`~BaseException.__cause__` attribute as appropriate). - """ - - _raw: RawMetadata - - @classmethod - def from_raw(cls, data: RawMetadata, *, validate: bool = True) -> Metadata: - """Create an instance from :class:`RawMetadata`. - - If *validate* is true, all metadata will be validated. All exceptions - related to validation will be gathered and raised as an :class:`ExceptionGroup`. - """ - ins = cls() - ins._raw = data.copy() # Mutations occur due to caching enriched values. - - if validate: - exceptions: list[Exception] = [] - try: - metadata_version = ins.metadata_version - metadata_age = _VALID_METADATA_VERSIONS.index(metadata_version) - except InvalidMetadata as metadata_version_exc: - exceptions.append(metadata_version_exc) - metadata_version = None - - # Make sure to check for the fields that are present, the required - # fields (so their absence can be reported). - fields_to_check = frozenset(ins._raw) | _REQUIRED_ATTRS - # Remove fields that have already been checked. - fields_to_check -= {"metadata_version"} - - for key in fields_to_check: - try: - if metadata_version: - # Can't use getattr() as that triggers descriptor protocol which - # will fail due to no value for the instance argument. - try: - field_metadata_version = cls.__dict__[key].added - except KeyError: - exc = InvalidMetadata(key, f"unrecognized field: {key!r}") - exceptions.append(exc) - continue - field_age = _VALID_METADATA_VERSIONS.index( - field_metadata_version - ) - if field_age > metadata_age: - field = _RAW_TO_EMAIL_MAPPING[key] - exc = InvalidMetadata( - field, - f"{field} introduced in metadata version " - f"{field_metadata_version}, not {metadata_version}", - ) - exceptions.append(exc) - continue - getattr(ins, key) - except InvalidMetadata as exc: - exceptions.append(exc) - - if exceptions: - raise ExceptionGroup("invalid metadata", exceptions) - - return ins - - @classmethod - def from_email(cls, data: bytes | str, *, validate: bool = True) -> Metadata: - """Parse metadata from email headers. - - If *validate* is true, the metadata will be validated. All exceptions - related to validation will be gathered and raised as an :class:`ExceptionGroup`. - """ - raw, unparsed = parse_email(data) - - if validate: - exceptions: list[Exception] = [] - for unparsed_key in unparsed: - if unparsed_key in _EMAIL_TO_RAW_MAPPING: - message = f"{unparsed_key!r} has invalid data" - else: - message = f"unrecognized field: {unparsed_key!r}" - exceptions.append(InvalidMetadata(unparsed_key, message)) - - if exceptions: - raise ExceptionGroup("unparsed", exceptions) - - try: - return cls.from_raw(raw, validate=validate) - except ExceptionGroup as exc_group: - raise ExceptionGroup( - "invalid or unparsed metadata", exc_group.exceptions - ) from None - - metadata_version: _Validator[_MetadataVersion] = _Validator() - """:external:ref:`core-metadata-metadata-version` - (required; validated to be a valid metadata version)""" - # `name` is not normalized/typed to NormalizedName so as to provide access to - # the original/raw name. - name: _Validator[str] = _Validator() - """:external:ref:`core-metadata-name` - (required; validated using :func:`~packaging.utils.canonicalize_name` and its - *validate* parameter)""" - version: _Validator[version_module.Version] = _Validator() - """:external:ref:`core-metadata-version` (required)""" - dynamic: _Validator[list[str] | None] = _Validator( - added="2.2", - ) - """:external:ref:`core-metadata-dynamic` - (validated against core metadata field names and lowercased)""" - platforms: _Validator[list[str] | None] = _Validator() - """:external:ref:`core-metadata-platform`""" - supported_platforms: _Validator[list[str] | None] = _Validator(added="1.1") - """:external:ref:`core-metadata-supported-platform`""" - summary: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-summary` (validated to contain no newlines)""" - description: _Validator[str | None] = _Validator() # TODO 2.1: can be in body - """:external:ref:`core-metadata-description`""" - description_content_type: _Validator[str | None] = _Validator(added="2.1") - """:external:ref:`core-metadata-description-content-type` (validated)""" - keywords: _Validator[list[str] | None] = _Validator() - """:external:ref:`core-metadata-keywords`""" - home_page: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-home-page`""" - download_url: _Validator[str | None] = _Validator(added="1.1") - """:external:ref:`core-metadata-download-url`""" - author: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-author`""" - author_email: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-author-email`""" - maintainer: _Validator[str | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-maintainer`""" - maintainer_email: _Validator[str | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-maintainer-email`""" - license: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-license`""" - license_expression: _Validator[NormalizedLicenseExpression | None] = _Validator( - added="2.4" - ) - """:external:ref:`core-metadata-license-expression`""" - license_files: _Validator[list[str] | None] = _Validator(added="2.4") - """:external:ref:`core-metadata-license-file`""" - classifiers: _Validator[list[str] | None] = _Validator(added="1.1") - """:external:ref:`core-metadata-classifier`""" - requires_dist: _Validator[list[requirements.Requirement] | None] = _Validator( - added="1.2" - ) - """:external:ref:`core-metadata-requires-dist`""" - requires_python: _Validator[specifiers.SpecifierSet | None] = _Validator( - added="1.2" - ) - """:external:ref:`core-metadata-requires-python`""" - # Because `Requires-External` allows for non-PEP 440 version specifiers, we - # don't do any processing on the values. - requires_external: _Validator[list[str] | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-requires-external`""" - project_urls: _Validator[dict[str, str] | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-project-url`""" - # PEP 685 lets us raise an error if an extra doesn't pass `Name` validation - # regardless of metadata version. - provides_extra: _Validator[list[utils.NormalizedName] | None] = _Validator( - added="2.1", - ) - """:external:ref:`core-metadata-provides-extra`""" - provides_dist: _Validator[list[str] | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-provides-dist`""" - obsoletes_dist: _Validator[list[str] | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-obsoletes-dist`""" - import_names: _Validator[list[str] | None] = _Validator(added="2.5") - """:external:ref:`core-metadata-import-name`""" - import_namespaces: _Validator[list[str] | None] = _Validator(added="2.5") - """:external:ref:`core-metadata-import-namespace`""" - requires: _Validator[list[str] | None] = _Validator(added="1.1") - """``Requires`` (deprecated)""" - provides: _Validator[list[str] | None] = _Validator(added="1.1") - """``Provides`` (deprecated)""" - obsoletes: _Validator[list[str] | None] = _Validator(added="1.1") - """``Obsoletes`` (deprecated)""" - - def as_rfc822(self) -> RFC822Message: - """ - Return an RFC822 message with the metadata. - """ - message = RFC822Message() - self._write_metadata(message) - return message - - def _write_metadata(self, message: RFC822Message) -> None: - """ - Return an RFC822 message with the metadata. - """ - for name, validator in self.__class__.__dict__.items(): - if isinstance(validator, _Validator) and name != "description": - value = getattr(self, name) - email_name = _RAW_TO_EMAIL_MAPPING[name] - if value is not None: - if email_name == "project-url": - for label, url in value.items(): - message[email_name] = f"{label}, {url}" - elif email_name == "keywords": - message[email_name] = ",".join(value) - elif email_name == "import-name" and value == []: - message[email_name] = "" - elif isinstance(value, list): - for item in value: - message[email_name] = str(item) - else: - message[email_name] = str(value) - - # The description is a special case because it is in the body of the message. - if self.description is not None: - message.set_payload(self.description) diff --git a/voxvera/vendor/packaging/py.typed b/voxvera/vendor/packaging/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/packaging/pylock.py b/voxvera/vendor/packaging/pylock.py deleted file mode 100644 index a564f15..0000000 --- a/voxvera/vendor/packaging/pylock.py +++ /dev/null @@ -1,635 +0,0 @@ -from __future__ import annotations - -import dataclasses -import logging -import re -from collections.abc import Mapping, Sequence -from dataclasses import dataclass -from datetime import datetime -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Protocol, - TypeVar, -) - -from .markers import Marker -from .specifiers import SpecifierSet -from .utils import NormalizedName, is_normalized_name -from .version import Version - -if TYPE_CHECKING: # pragma: no cover - from pathlib import Path - - from typing_extensions import Self - -_logger = logging.getLogger(__name__) - -__all__ = [ - "Package", - "PackageArchive", - "PackageDirectory", - "PackageSdist", - "PackageVcs", - "PackageWheel", - "Pylock", - "PylockUnsupportedVersionError", - "PylockValidationError", - "is_valid_pylock_path", -] - -_T = TypeVar("_T") -_T2 = TypeVar("_T2") - - -class _FromMappingProtocol(Protocol): # pragma: no cover - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: ... - - -_FromMappingProtocolT = TypeVar("_FromMappingProtocolT", bound=_FromMappingProtocol) - - -_PYLOCK_FILE_NAME_RE = re.compile(r"^pylock\.([^.]+)\.toml$") - - -def is_valid_pylock_path(path: Path) -> bool: - """Check if the given path is a valid pylock file path.""" - return path.name == "pylock.toml" or bool(_PYLOCK_FILE_NAME_RE.match(path.name)) - - -def _toml_key(key: str) -> str: - return key.replace("_", "-") - - -def _toml_value(key: str, value: Any) -> Any: # noqa: ANN401 - if isinstance(value, (Version, Marker, SpecifierSet)): - return str(value) - if isinstance(value, Sequence) and key == "environments": - return [str(v) for v in value] - return value - - -def _toml_dict_factory(data: list[tuple[str, Any]]) -> dict[str, Any]: - return { - _toml_key(key): _toml_value(key, value) - for key, value in data - if value is not None - } - - -def _get(d: Mapping[str, Any], expected_type: type[_T], key: str) -> _T | None: - """Get a value from the dictionary and verify it's the expected type.""" - if (value := d.get(key)) is None: - return None - if not isinstance(value, expected_type): - raise PylockValidationError( - f"Unexpected type {type(value).__name__} " - f"(expected {expected_type.__name__})", - context=key, - ) - return value - - -def _get_required(d: Mapping[str, Any], expected_type: type[_T], key: str) -> _T: - """Get a required value from the dictionary and verify it's the expected type.""" - if (value := _get(d, expected_type, key)) is None: - raise _PylockRequiredKeyError(key) - return value - - -def _get_sequence( - d: Mapping[str, Any], expected_item_type: type[_T], key: str -) -> Sequence[_T] | None: - """Get a list value from the dictionary and verify it's the expected items type.""" - if (value := _get(d, Sequence, key)) is None: # type: ignore[type-abstract] - return None - if isinstance(value, (str, bytes)): - # special case: str and bytes are Sequences, but we want to reject it - raise PylockValidationError( - f"Unexpected type {type(value).__name__} (expected Sequence)", - context=key, - ) - for i, item in enumerate(value): - if not isinstance(item, expected_item_type): - raise PylockValidationError( - f"Unexpected type {type(item).__name__} " - f"(expected {expected_item_type.__name__})", - context=f"{key}[{i}]", - ) - return value - - -def _get_as( - d: Mapping[str, Any], - expected_type: type[_T], - target_type: Callable[[_T], _T2], - key: str, -) -> _T2 | None: - """Get a value from the dictionary, verify it's the expected type, - and convert to the target type. - - This assumes the target_type constructor accepts the value. - """ - if (value := _get(d, expected_type, key)) is None: - return None - try: - return target_type(value) - except Exception as e: - raise PylockValidationError(e, context=key) from e - - -def _get_required_as( - d: Mapping[str, Any], - expected_type: type[_T], - target_type: Callable[[_T], _T2], - key: str, -) -> _T2: - """Get a required value from the dict, verify it's the expected type, - and convert to the target type.""" - if (value := _get_as(d, expected_type, target_type, key)) is None: - raise _PylockRequiredKeyError(key) - return value - - -def _get_sequence_as( - d: Mapping[str, Any], - expected_item_type: type[_T], - target_item_type: Callable[[_T], _T2], - key: str, -) -> list[_T2] | None: - """Get list value from dictionary and verify expected items type.""" - if (value := _get_sequence(d, expected_item_type, key)) is None: - return None - result = [] - try: - for item in value: - typed_item = target_item_type(item) - result.append(typed_item) - except Exception as e: - raise PylockValidationError(e, context=f"{key}[{len(result)}]") from e - return result - - -def _get_object( - d: Mapping[str, Any], target_type: type[_FromMappingProtocolT], key: str -) -> _FromMappingProtocolT | None: - """Get a dictionary value from the dictionary and convert it to a dataclass.""" - if (value := _get(d, Mapping, key)) is None: # type: ignore[type-abstract] - return None - try: - return target_type._from_dict(value) - except Exception as e: - raise PylockValidationError(e, context=key) from e - - -def _get_sequence_of_objects( - d: Mapping[str, Any], target_item_type: type[_FromMappingProtocolT], key: str -) -> list[_FromMappingProtocolT] | None: - """Get a list value from the dictionary and convert its items to a dataclass.""" - if (value := _get_sequence(d, Mapping, key)) is None: # type: ignore[type-abstract] - return None - result: list[_FromMappingProtocolT] = [] - try: - for item in value: - typed_item = target_item_type._from_dict(item) - result.append(typed_item) - except Exception as e: - raise PylockValidationError(e, context=f"{key}[{len(result)}]") from e - return result - - -def _get_required_sequence_of_objects( - d: Mapping[str, Any], target_item_type: type[_FromMappingProtocolT], key: str -) -> Sequence[_FromMappingProtocolT]: - """Get a required list value from the dictionary and convert its items to a - dataclass.""" - if (result := _get_sequence_of_objects(d, target_item_type, key)) is None: - raise _PylockRequiredKeyError(key) - return result - - -def _validate_normalized_name(name: str) -> NormalizedName: - """Validate that a string is a NormalizedName.""" - if not is_normalized_name(name): - raise PylockValidationError(f"Name {name!r} is not normalized") - return NormalizedName(name) - - -def _validate_path_url(path: str | None, url: str | None) -> None: - if not path and not url: - raise PylockValidationError("path or url must be provided") - - -def _validate_hashes(hashes: Mapping[str, Any]) -> Mapping[str, Any]: - if not hashes: - raise PylockValidationError("At least one hash must be provided") - if not all(isinstance(hash_val, str) for hash_val in hashes.values()): - raise PylockValidationError("Hash values must be strings") - return hashes - - -class PylockValidationError(Exception): - """Raised when when input data is not spec-compliant.""" - - context: str | None = None - message: str - - def __init__( - self, - cause: str | Exception, - *, - context: str | None = None, - ) -> None: - if isinstance(cause, PylockValidationError): - if cause.context: - self.context = ( - f"{context}.{cause.context}" if context else cause.context - ) - else: - self.context = context - self.message = cause.message - else: - self.context = context - self.message = str(cause) - - def __str__(self) -> str: - if self.context: - return f"{self.message} in {self.context!r}" - return self.message - - -class _PylockRequiredKeyError(PylockValidationError): - def __init__(self, key: str) -> None: - super().__init__("Missing required value", context=key) - - -class PylockUnsupportedVersionError(PylockValidationError): - """Raised when encountering an unsupported `lock_version`.""" - - -@dataclass(frozen=True, init=False) -class PackageVcs: - type: str - url: str | None = None - path: str | None = None - requested_revision: str | None = None - commit_id: str # type: ignore[misc] - subdirectory: str | None = None - - def __init__( - self, - *, - type: str, - url: str | None = None, - path: str | None = None, - requested_revision: str | None = None, - commit_id: str, - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "type", type) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "requested_revision", requested_revision) - object.__setattr__(self, "commit_id", commit_id) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_vcs = cls( - type=_get_required(d, str, "type"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - requested_revision=_get(d, str, "requested-revision"), - commit_id=_get_required(d, str, "commit-id"), - subdirectory=_get(d, str, "subdirectory"), - ) - _validate_path_url(package_vcs.path, package_vcs.url) - return package_vcs - - -@dataclass(frozen=True, init=False) -class PackageDirectory: - path: str - editable: bool | None = None - subdirectory: str | None = None - - def __init__( - self, - *, - path: str, - editable: bool | None = None, - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "path", path) - object.__setattr__(self, "editable", editable) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - return cls( - path=_get_required(d, str, "path"), - editable=_get(d, bool, "editable"), - subdirectory=_get(d, str, "subdirectory"), - ) - - -@dataclass(frozen=True, init=False) -class PackageArchive: - url: str | None = None - path: str | None = None - size: int | None = None - upload_time: datetime | None = None - hashes: Mapping[str, str] # type: ignore[misc] - subdirectory: str | None = None - - def __init__( - self, - *, - url: str | None = None, - path: str | None = None, - size: int | None = None, - upload_time: datetime | None = None, - hashes: Mapping[str, str], - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "hashes", hashes) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_archive = cls( - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - upload_time=_get(d, datetime, "upload-time"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - subdirectory=_get(d, str, "subdirectory"), - ) - _validate_path_url(package_archive.path, package_archive.url) - return package_archive - - -@dataclass(frozen=True, init=False) -class PackageSdist: - name: str | None = None - upload_time: datetime | None = None - url: str | None = None - path: str | None = None - size: int | None = None - hashes: Mapping[str, str] # type: ignore[misc] - - def __init__( - self, - *, - name: str | None = None, - upload_time: datetime | None = None, - url: str | None = None, - path: str | None = None, - size: int | None = None, - hashes: Mapping[str, str], - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "hashes", hashes) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_sdist = cls( - name=_get(d, str, "name"), - upload_time=_get(d, datetime, "upload-time"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - ) - _validate_path_url(package_sdist.path, package_sdist.url) - return package_sdist - - -@dataclass(frozen=True, init=False) -class PackageWheel: - name: str | None = None - upload_time: datetime | None = None - url: str | None = None - path: str | None = None - size: int | None = None - hashes: Mapping[str, str] # type: ignore[misc] - - def __init__( - self, - *, - name: str | None = None, - upload_time: datetime | None = None, - url: str | None = None, - path: str | None = None, - size: int | None = None, - hashes: Mapping[str, str], - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "hashes", hashes) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_wheel = cls( - name=_get(d, str, "name"), - upload_time=_get(d, datetime, "upload-time"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - ) - _validate_path_url(package_wheel.path, package_wheel.url) - return package_wheel - - -@dataclass(frozen=True, init=False) -class Package: - name: NormalizedName - version: Version | None = None - marker: Marker | None = None - requires_python: SpecifierSet | None = None - dependencies: Sequence[Mapping[str, Any]] | None = None - vcs: PackageVcs | None = None - directory: PackageDirectory | None = None - archive: PackageArchive | None = None - index: str | None = None - sdist: PackageSdist | None = None - wheels: Sequence[PackageWheel] | None = None - attestation_identities: Sequence[Mapping[str, Any]] | None = None - tool: Mapping[str, Any] | None = None - - def __init__( - self, - *, - name: NormalizedName, - version: Version | None = None, - marker: Marker | None = None, - requires_python: SpecifierSet | None = None, - dependencies: Sequence[Mapping[str, Any]] | None = None, - vcs: PackageVcs | None = None, - directory: PackageDirectory | None = None, - archive: PackageArchive | None = None, - index: str | None = None, - sdist: PackageSdist | None = None, - wheels: Sequence[PackageWheel] | None = None, - attestation_identities: Sequence[Mapping[str, Any]] | None = None, - tool: Mapping[str, Any] | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "version", version) - object.__setattr__(self, "marker", marker) - object.__setattr__(self, "requires_python", requires_python) - object.__setattr__(self, "dependencies", dependencies) - object.__setattr__(self, "vcs", vcs) - object.__setattr__(self, "directory", directory) - object.__setattr__(self, "archive", archive) - object.__setattr__(self, "index", index) - object.__setattr__(self, "sdist", sdist) - object.__setattr__(self, "wheels", wheels) - object.__setattr__(self, "attestation_identities", attestation_identities) - object.__setattr__(self, "tool", tool) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package = cls( - name=_get_required_as(d, str, _validate_normalized_name, "name"), - version=_get_as(d, str, Version, "version"), - requires_python=_get_as(d, str, SpecifierSet, "requires-python"), - dependencies=_get_sequence(d, Mapping, "dependencies"), # type: ignore[type-abstract] - marker=_get_as(d, str, Marker, "marker"), - vcs=_get_object(d, PackageVcs, "vcs"), - directory=_get_object(d, PackageDirectory, "directory"), - archive=_get_object(d, PackageArchive, "archive"), - index=_get(d, str, "index"), - sdist=_get_object(d, PackageSdist, "sdist"), - wheels=_get_sequence_of_objects(d, PackageWheel, "wheels"), - attestation_identities=_get_sequence(d, Mapping, "attestation-identities"), # type: ignore[type-abstract] - tool=_get(d, Mapping, "tool"), # type: ignore[type-abstract] - ) - distributions = bool(package.sdist) + len(package.wheels or []) - direct_urls = ( - bool(package.vcs) + bool(package.directory) + bool(package.archive) - ) - if distributions > 0 and direct_urls > 0: - raise PylockValidationError( - "None of vcs, directory, archive must be set if sdist or wheels are set" - ) - if distributions == 0 and direct_urls != 1: - raise PylockValidationError( - "Exactly one of vcs, directory, archive must be set " - "if sdist and wheels are not set" - ) - try: - for i, attestation_identity in enumerate( # noqa: B007 - package.attestation_identities or [] - ): - _get_required(attestation_identity, str, "kind") - except Exception as e: - raise PylockValidationError( - e, context=f"attestation-identities[{i}]" - ) from e - return package - - @property - def is_direct(self) -> bool: - return not (self.sdist or self.wheels) - - -@dataclass(frozen=True, init=False) -class Pylock: - """A class representing a pylock file.""" - - lock_version: Version - environments: Sequence[Marker] | None = None - requires_python: SpecifierSet | None = None - extras: Sequence[NormalizedName] | None = None - dependency_groups: Sequence[str] | None = None - default_groups: Sequence[str] | None = None - created_by: str # type: ignore[misc] - packages: Sequence[Package] # type: ignore[misc] - tool: Mapping[str, Any] | None = None - - def __init__( - self, - *, - lock_version: Version, - environments: Sequence[Marker] | None = None, - requires_python: SpecifierSet | None = None, - extras: Sequence[NormalizedName] | None = None, - dependency_groups: Sequence[str] | None = None, - default_groups: Sequence[str] | None = None, - created_by: str, - packages: Sequence[Package], - tool: Mapping[str, Any] | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "lock_version", lock_version) - object.__setattr__(self, "environments", environments) - object.__setattr__(self, "requires_python", requires_python) - object.__setattr__(self, "extras", extras) - object.__setattr__(self, "dependency_groups", dependency_groups) - object.__setattr__(self, "default_groups", default_groups) - object.__setattr__(self, "created_by", created_by) - object.__setattr__(self, "packages", packages) - object.__setattr__(self, "tool", tool) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - pylock = cls( - lock_version=_get_required_as(d, str, Version, "lock-version"), - environments=_get_sequence_as(d, str, Marker, "environments"), - extras=_get_sequence_as(d, str, _validate_normalized_name, "extras"), - dependency_groups=_get_sequence(d, str, "dependency-groups"), - default_groups=_get_sequence(d, str, "default-groups"), - created_by=_get_required(d, str, "created-by"), - requires_python=_get_as(d, str, SpecifierSet, "requires-python"), - packages=_get_required_sequence_of_objects(d, Package, "packages"), - tool=_get(d, Mapping, "tool"), # type: ignore[type-abstract] - ) - if not Version("1") <= pylock.lock_version < Version("2"): - raise PylockUnsupportedVersionError( - f"pylock version {pylock.lock_version} is not supported" - ) - if pylock.lock_version > Version("1.0"): - _logger.warning( - "pylock minor version %s is not supported", pylock.lock_version - ) - return pylock - - @classmethod - def from_dict(cls, d: Mapping[str, Any], /) -> Self: - """Create and validate a Pylock instance from a TOML dictionary. - - Raises :class:`PylockValidationError` if the input data is not - spec-compliant. - """ - return cls._from_dict(d) - - def to_dict(self) -> Mapping[str, Any]: - """Convert the Pylock instance to a TOML dictionary.""" - return dataclasses.asdict(self, dict_factory=_toml_dict_factory) - - def validate(self) -> None: - """Validate the Pylock instance against the specification. - - Raises :class:`PylockValidationError` otherwise.""" - self.from_dict(self.to_dict()) diff --git a/voxvera/vendor/packaging/requirements.py b/voxvera/vendor/packaging/requirements.py deleted file mode 100644 index 3079be6..0000000 --- a/voxvera/vendor/packaging/requirements.py +++ /dev/null @@ -1,86 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import annotations - -from typing import Iterator - -from ._parser import parse_requirement as _parse_requirement -from ._tokenizer import ParserSyntaxError -from .markers import Marker, _normalize_extra_values -from .specifiers import SpecifierSet -from .utils import canonicalize_name - - -class InvalidRequirement(ValueError): - """ - An invalid requirement was found, users should refer to PEP 508. - """ - - -class Requirement: - """Parse a requirement. - - Parse a given requirement string into its parts, such as name, specifier, - URL, and extras. Raises InvalidRequirement on a badly-formed requirement - string. - """ - - # TODO: Can we test whether something is contained within a requirement? - # If so how do we do that? Do we need to test against the _name_ of - # the thing as well as the version? What about the markers? - # TODO: Can we normalize the name and extra name? - - def __init__(self, requirement_string: str) -> None: - try: - parsed = _parse_requirement(requirement_string) - except ParserSyntaxError as e: - raise InvalidRequirement(str(e)) from e - - self.name: str = parsed.name - self.url: str | None = parsed.url or None - self.extras: set[str] = set(parsed.extras or []) - self.specifier: SpecifierSet = SpecifierSet(parsed.specifier) - self.marker: Marker | None = None - if parsed.marker is not None: - self.marker = Marker.__new__(Marker) - self.marker._markers = _normalize_extra_values(parsed.marker) - - def _iter_parts(self, name: str) -> Iterator[str]: - yield name - - if self.extras: - formatted_extras = ",".join(sorted(self.extras)) - yield f"[{formatted_extras}]" - - if self.specifier: - yield str(self.specifier) - - if self.url: - yield f" @ {self.url}" - if self.marker: - yield " " - - if self.marker: - yield f"; {self.marker}" - - def __str__(self) -> str: - return "".join(self._iter_parts(self.name)) - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}('{self}')>" - - def __hash__(self) -> int: - return hash(tuple(self._iter_parts(canonicalize_name(self.name)))) - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Requirement): - return NotImplemented - - return ( - canonicalize_name(self.name) == canonicalize_name(other.name) - and self.extras == other.extras - and self.specifier == other.specifier - and self.url == other.url - and self.marker == other.marker - ) diff --git a/voxvera/vendor/packaging/specifiers.py b/voxvera/vendor/packaging/specifiers.py deleted file mode 100644 index 5d26b0d..0000000 --- a/voxvera/vendor/packaging/specifiers.py +++ /dev/null @@ -1,1068 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -""" -.. testsetup:: - - from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier - from packaging.version import Version -""" - -from __future__ import annotations - -import abc -import itertools -import re -from typing import Callable, Final, Iterable, Iterator, TypeVar, Union - -from .utils import canonicalize_version -from .version import InvalidVersion, Version - -UnparsedVersion = Union[Version, str] -UnparsedVersionVar = TypeVar("UnparsedVersionVar", bound=UnparsedVersion) -CallableOperator = Callable[[Version, str], bool] - - -def _coerce_version(version: UnparsedVersion) -> Version | None: - if not isinstance(version, Version): - try: - version = Version(version) - except InvalidVersion: - return None - return version - - -def _public_version(version: Version) -> Version: - return version.__replace__(local=None) - - -def _base_version(version: Version) -> Version: - return version.__replace__(pre=None, post=None, dev=None, local=None) - - -class InvalidSpecifier(ValueError): - """ - Raised when attempting to create a :class:`Specifier` with a specifier - string that is invalid. - - >>> Specifier("lolwat") - Traceback (most recent call last): - ... - packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat' - """ - - -class BaseSpecifier(metaclass=abc.ABCMeta): - __slots__ = () - __match_args__ = ("_str",) - - @property - def _str(self) -> str: - """Internal property for match_args""" - return str(self) - - @abc.abstractmethod - def __str__(self) -> str: - """ - Returns the str representation of this Specifier-like object. This - should be representative of the Specifier itself. - """ - - @abc.abstractmethod - def __hash__(self) -> int: - """ - Returns a hash value for this Specifier-like object. - """ - - @abc.abstractmethod - def __eq__(self, other: object) -> bool: - """ - Returns a boolean representing whether or not the two Specifier-like - objects are equal. - - :param other: The other object to check against. - """ - - @property - @abc.abstractmethod - def prereleases(self) -> bool | None: - """Whether or not pre-releases as a whole are allowed. - - This can be set to either ``True`` or ``False`` to explicitly enable or disable - prereleases or it can be set to ``None`` (the default) to use default semantics. - """ - - @prereleases.setter # noqa: B027 - def prereleases(self, value: bool) -> None: - """Setter for :attr:`prereleases`. - - :param value: The value to set. - """ - - @abc.abstractmethod - def contains(self, item: str, prereleases: bool | None = None) -> bool: - """ - Determines if the given item is contained within this specifier. - """ - - @abc.abstractmethod - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """ - Takes an iterable of items and filters them so that only items which - are contained within this specifier are allowed in it. - """ - - -class Specifier(BaseSpecifier): - """This class abstracts handling of version specifiers. - - .. tip:: - - It is generally not required to instantiate this manually. You should instead - prefer to work with :class:`SpecifierSet` instead, which can parse - comma-separated version specifiers (which is what package metadata contains). - """ - - __slots__ = ("_prereleases", "_spec", "_spec_version") - - _operator_regex_str = r""" - (?P(~=|==|!=|<=|>=|<|>|===)) - """ - _version_regex_str = r""" - (?P - (?: - # The identity operators allow for an escape hatch that will - # do an exact string match of the version you wish to install. - # This will not be parsed by PEP 440 and we cannot determine - # any semantic meaning from it. This operator is discouraged - # but included entirely as an escape hatch. - (?<====) # Only match for the identity operator - \s* - [^\s;)]* # The arbitrary version can be just about anything, - # we match everything except for whitespace, a - # semi-colon for marker support, and a closing paren - # since versions can be enclosed in them. - ) - | - (?: - # The (non)equality operators allow for wild card and local - # versions to be specified so we have to define these two - # operators separately to enable that. - (?<===|!=) # Only match for equals and not equals - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)* # release - - # You cannot use a wild card and a pre-release, post-release, a dev or - # local version together so group them with a | and make them optional. - (?: - \.\* # Wild card syntax of .* - | - (?: # pre release - [-_\.]? - (alpha|beta|preview|pre|a|b|c|rc) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local - )? - ) - | - (?: - # The compatible operator requires at least two digits in the - # release segment. - (?<=~=) # Only match for the compatible operator - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) - (?: # pre release - [-_\.]? - (alpha|beta|preview|pre|a|b|c|rc) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - ) - | - (?: - # All other operators only allow a sub set of what the - # (non)equality operators do. Specifically they do not allow - # local versions to be specified nor do they allow the prefix - # matching wild cards. - (?=": "greater_than_equal", - "<": "less_than", - ">": "greater_than", - "===": "arbitrary", - } - - def __init__(self, spec: str = "", prereleases: bool | None = None) -> None: - """Initialize a Specifier instance. - - :param spec: - The string representation of a specifier which will be parsed and - normalized before use. - :param prereleases: - This tells the specifier if it should accept prerelease versions if - applicable or not. The default of ``None`` will autodetect it from the - given specifiers. - :raises InvalidSpecifier: - If the given specifier is invalid (i.e. bad syntax). - """ - match = self._regex.fullmatch(spec) - if not match: - raise InvalidSpecifier(f"Invalid specifier: {spec!r}") - - self._spec: tuple[str, str] = ( - match.group("operator").strip(), - match.group("version").strip(), - ) - - # Store whether or not this Specifier should accept prereleases - self._prereleases = prereleases - - # Specifier version cache - self._spec_version: tuple[str, Version] | None = None - - def _get_spec_version(self, version: str) -> Version | None: - """One element cache, as only one spec Version is needed per Specifier.""" - if self._spec_version is not None and self._spec_version[0] == version: - return self._spec_version[1] - - version_specifier = _coerce_version(version) - if version_specifier is None: - return None - - self._spec_version = (version, version_specifier) - return version_specifier - - def _require_spec_version(self, version: str) -> Version: - """Get spec version, asserting it's valid (not for === operator). - - This method should only be called for operators where version - strings are guaranteed to be valid PEP 440 versions (not ===). - """ - spec_version = self._get_spec_version(version) - assert spec_version is not None - return spec_version - - @property - def prereleases(self) -> bool | None: - # If there is an explicit prereleases set for this, then we'll just - # blindly use that. - if self._prereleases is not None: - return self._prereleases - - # Only the "!=" operator does not imply prereleases when - # the version in the specifier is a prerelease. - operator, version_str = self._spec - if operator != "!=": - # The == specifier with trailing .* cannot include prereleases - # e.g. "==1.0a1.*" is not valid. - if operator == "==" and version_str.endswith(".*"): - return False - - # "===" can have arbitrary string versions, so we cannot parse - # those, we take prereleases as unknown (None) for those. - version = self._get_spec_version(version_str) - if version is None: - return None - - # For all other operators, use the check if spec Version - # object implies pre-releases. - if version.is_prerelease: - return True - - return False - - @prereleases.setter - def prereleases(self, value: bool | None) -> None: - self._prereleases = value - - @property - def operator(self) -> str: - """The operator of this specifier. - - >>> Specifier("==1.2.3").operator - '==' - """ - return self._spec[0] - - @property - def version(self) -> str: - """The version of this specifier. - - >>> Specifier("==1.2.3").version - '1.2.3' - """ - return self._spec[1] - - def __repr__(self) -> str: - """A representation of the Specifier that shows all internal state. - - >>> Specifier('>=1.0.0') - =1.0.0')> - >>> Specifier('>=1.0.0', prereleases=False) - =1.0.0', prereleases=False)> - >>> Specifier('>=1.0.0', prereleases=True) - =1.0.0', prereleases=True)> - """ - pre = ( - f", prereleases={self.prereleases!r}" - if self._prereleases is not None - else "" - ) - - return f"<{self.__class__.__name__}({str(self)!r}{pre})>" - - def __str__(self) -> str: - """A string representation of the Specifier that can be round-tripped. - - >>> str(Specifier('>=1.0.0')) - '>=1.0.0' - >>> str(Specifier('>=1.0.0', prereleases=False)) - '>=1.0.0' - """ - return "{}{}".format(*self._spec) - - @property - def _canonical_spec(self) -> tuple[str, str]: - operator, version = self._spec - if operator == "===" or version.endswith(".*"): - return operator, version - - spec_version = self._require_spec_version(version) - - canonical_version = canonicalize_version( - spec_version, strip_trailing_zero=(operator != "~=") - ) - - return operator, canonical_version - - def __hash__(self) -> int: - return hash(self._canonical_spec) - - def __eq__(self, other: object) -> bool: - """Whether or not the two Specifier-like objects are equal. - - :param other: The other object to check against. - - The value of :attr:`prereleases` is ignored. - - >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0") - True - >>> (Specifier("==1.2.3", prereleases=False) == - ... Specifier("==1.2.3", prereleases=True)) - True - >>> Specifier("==1.2.3") == "==1.2.3" - True - >>> Specifier("==1.2.3") == Specifier("==1.2.4") - False - >>> Specifier("==1.2.3") == Specifier("~=1.2.3") - False - """ - if isinstance(other, str): - try: - other = self.__class__(str(other)) - except InvalidSpecifier: - return NotImplemented - elif not isinstance(other, self.__class__): - return NotImplemented - - return self._canonical_spec == other._canonical_spec - - def _get_operator(self, op: str) -> CallableOperator: - operator_callable: CallableOperator = getattr( - self, f"_compare_{self._operators[op]}" - ) - return operator_callable - - def _compare_compatible(self, prospective: Version, spec: str) -> bool: - # Compatible releases have an equivalent combination of >= and ==. That - # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to - # implement this in terms of the other specifiers instead of - # implementing it ourselves. The only thing we need to do is construct - # the other specifiers. - - # We want everything but the last item in the version, but we want to - # ignore suffix segments. - prefix = _version_join( - list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1] - ) - - # Add the prefix notation to the end of our string - prefix += ".*" - - return self._get_operator(">=")(prospective, spec) and self._get_operator("==")( - prospective, prefix - ) - - def _compare_equal(self, prospective: Version, spec: str) -> bool: - # We need special logic to handle prefix matching - if spec.endswith(".*"): - # In the case of prefix matching we want to ignore local segment. - normalized_prospective = canonicalize_version( - _public_version(prospective), strip_trailing_zero=False - ) - # Get the normalized version string ignoring the trailing .* - normalized_spec = canonicalize_version(spec[:-2], strip_trailing_zero=False) - # Split the spec out by bangs and dots, and pretend that there is - # an implicit dot in between a release segment and a pre-release segment. - split_spec = _version_split(normalized_spec) - - # Split the prospective version out by bangs and dots, and pretend - # that there is an implicit dot in between a release segment and - # a pre-release segment. - split_prospective = _version_split(normalized_prospective) - - # 0-pad the prospective version before shortening it to get the correct - # shortened version. - padded_prospective, _ = _pad_version(split_prospective, split_spec) - - # Shorten the prospective version to be the same length as the spec - # so that we can determine if the specifier is a prefix of the - # prospective version or not. - shortened_prospective = padded_prospective[: len(split_spec)] - - return shortened_prospective == split_spec - else: - # Convert our spec string into a Version - spec_version = self._require_spec_version(spec) - - # If the specifier does not have a local segment, then we want to - # act as if the prospective version also does not have a local - # segment. - if not spec_version.local: - prospective = _public_version(prospective) - - return prospective == spec_version - - def _compare_not_equal(self, prospective: Version, spec: str) -> bool: - return not self._compare_equal(prospective, spec) - - def _compare_less_than_equal(self, prospective: Version, spec: str) -> bool: - # NB: Local version identifiers are NOT permitted in the version - # specifier, so local version labels can be universally removed from - # the prospective version. - return _public_version(prospective) <= self._require_spec_version(spec) - - def _compare_greater_than_equal(self, prospective: Version, spec: str) -> bool: - # NB: Local version identifiers are NOT permitted in the version - # specifier, so local version labels can be universally removed from - # the prospective version. - return _public_version(prospective) >= self._require_spec_version(spec) - - def _compare_less_than(self, prospective: Version, spec_str: str) -> bool: - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = self._require_spec_version(spec_str) - - # Check to see if the prospective version is less than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective < spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a pre-release version, that we do not accept pre-release - # versions for the version mentioned in the specifier (e.g. <3.1 should - # not match 3.1.dev0, but should match 3.0.dev0). - if ( - not spec.is_prerelease - and prospective.is_prerelease - and _base_version(prospective) == _base_version(spec) - ): - return False - - # If we've gotten to here, it means that prospective version is both - # less than the spec version *and* it's not a pre-release of the same - # version in the spec. - return True - - def _compare_greater_than(self, prospective: Version, spec_str: str) -> bool: - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = self._require_spec_version(spec_str) - - # Check to see if the prospective version is greater than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective > spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a post-release version, that we do not accept - # post-release versions for the version mentioned in the specifier - # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). - if ( - not spec.is_postrelease - and prospective.is_postrelease - and _base_version(prospective) == _base_version(spec) - ): - return False - - # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is technically greater than, to match. - if prospective.local is not None and _base_version( - prospective - ) == _base_version(spec): - return False - - # If we've gotten to here, it means that prospective version is both - # greater than the spec version *and* it's not a pre-release of the - # same version in the spec. - return True - - def _compare_arbitrary(self, prospective: Version | str, spec: str) -> bool: - return str(prospective).lower() == str(spec).lower() - - def __contains__(self, item: str | Version) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: The item to check for. - - This is used for the ``in`` operator and behaves the same as - :meth:`contains` with no ``prereleases`` argument passed. - - >>> "1.2.3" in Specifier(">=1.2.3") - True - >>> Version("1.2.3") in Specifier(">=1.2.3") - True - >>> "1.0.0" in Specifier(">=1.2.3") - False - >>> "1.3.0a1" in Specifier(">=1.2.3") - True - >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True) - True - """ - return self.contains(item) - - def contains(self, item: UnparsedVersion, prereleases: bool | None = None) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: - The item to check for, which can be a version string or a - :class:`Version` instance. - :param prereleases: - Whether or not to match prereleases with this Specifier. If set to - ``None`` (the default), it will follow the recommendation from - :pep:`440` and match prereleases, as there are no other versions. - - >>> Specifier(">=1.2.3").contains("1.2.3") - True - >>> Specifier(">=1.2.3").contains(Version("1.2.3")) - True - >>> Specifier(">=1.2.3").contains("1.0.0") - False - >>> Specifier(">=1.2.3").contains("1.3.0a1") - True - >>> Specifier(">=1.2.3", prereleases=False).contains("1.3.0a1") - False - >>> Specifier(">=1.2.3").contains("1.3.0a1") - True - """ - - return bool(list(self.filter([item], prereleases=prereleases))) - - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """Filter items in the given iterable, that match the specifier. - - :param iterable: - An iterable that can contain version strings and :class:`Version` instances. - The items in the iterable will be filtered according to the specifier. - :param prereleases: - Whether or not to allow prereleases in the returned iterator. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases if there are no other versions. - - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) - ['1.3'] - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")])) - ['1.2.3', '1.3', ] - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"])) - ['1.5a1'] - >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - """ - prereleases_versions = [] - found_non_prereleases = False - - # Determine if to include prereleases by default - include_prereleases = ( - prereleases if prereleases is not None else self.prereleases - ) - - # Get the matching operator - operator_callable = self._get_operator(self.operator) - - # Filter versions - for version in iterable: - parsed_version = _coerce_version(version) - if parsed_version is None: - # === operator can match arbitrary (non-version) strings - if self.operator == "===" and self._compare_arbitrary( - version, self.version - ): - yield version - elif operator_callable(parsed_version, self.version): - # If it's not a prerelease or prereleases are allowed, yield it directly - if not parsed_version.is_prerelease or include_prereleases: - found_non_prereleases = True - yield version - # Otherwise collect prereleases for potential later use - elif prereleases is None and self._prereleases is not False: - prereleases_versions.append(version) - - # If no non-prereleases were found and prereleases weren't - # explicitly forbidden, yield the collected prereleases - if ( - not found_non_prereleases - and prereleases is None - and self._prereleases is not False - ): - yield from prereleases_versions - - -_prefix_regex = re.compile(r"([0-9]+)((?:a|b|c|rc)[0-9]+)") - - -def _version_split(version: str) -> list[str]: - """Split version into components. - - The split components are intended for version comparison. The logic does - not attempt to retain the original version string, so joining the - components back with :func:`_version_join` may not produce the original - version string. - """ - result: list[str] = [] - - epoch, _, rest = version.rpartition("!") - result.append(epoch or "0") - - for item in rest.split("."): - match = _prefix_regex.fullmatch(item) - if match: - result.extend(match.groups()) - else: - result.append(item) - return result - - -def _version_join(components: list[str]) -> str: - """Join split version components into a version string. - - This function assumes the input came from :func:`_version_split`, where the - first component must be the epoch (either empty or numeric), and all other - components numeric. - """ - epoch, *rest = components - return f"{epoch}!{'.'.join(rest)}" - - -def _is_not_suffix(segment: str) -> bool: - return not any( - segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post") - ) - - -def _pad_version(left: list[str], right: list[str]) -> tuple[list[str], list[str]]: - left_split, right_split = [], [] - - # Get the release segment of our versions - left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) - right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) - - # Get the rest of our versions - left_split.append(left[len(left_split[0]) :]) - right_split.append(right[len(right_split[0]) :]) - - # Insert our padding - left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0]))) - right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0]))) - - return ( - list(itertools.chain.from_iterable(left_split)), - list(itertools.chain.from_iterable(right_split)), - ) - - -class SpecifierSet(BaseSpecifier): - """This class abstracts handling of a set of version specifiers. - - It can be passed a single specifier (``>=3.0``), a comma-separated list of - specifiers (``>=3.0,!=3.1``), or no specifier at all. - """ - - __slots__ = ("_prereleases", "_specs") - - def __init__( - self, - specifiers: str | Iterable[Specifier] = "", - prereleases: bool | None = None, - ) -> None: - """Initialize a SpecifierSet instance. - - :param specifiers: - The string representation of a specifier or a comma-separated list of - specifiers which will be parsed and normalized before use. - May also be an iterable of ``Specifier`` instances, which will be used - as is. - :param prereleases: - This tells the SpecifierSet if it should accept prerelease versions if - applicable or not. The default of ``None`` will autodetect it from the - given specifiers. - - :raises InvalidSpecifier: - If the given ``specifiers`` are not parseable than this exception will be - raised. - """ - - if isinstance(specifiers, str): - # Split on `,` to break each individual specifier into its own item, and - # strip each item to remove leading/trailing whitespace. - split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] - - # Make each individual specifier a Specifier and save in a frozen set - # for later. - self._specs = frozenset(map(Specifier, split_specifiers)) - else: - # Save the supplied specifiers in a frozen set. - self._specs = frozenset(specifiers) - - # Store our prereleases value so we can use it later to determine if - # we accept prereleases or not. - self._prereleases = prereleases - - @property - def prereleases(self) -> bool | None: - # If we have been given an explicit prerelease modifier, then we'll - # pass that through here. - if self._prereleases is not None: - return self._prereleases - - # If we don't have any specifiers, and we don't have a forced value, - # then we'll just return None since we don't know if this should have - # pre-releases or not. - if not self._specs: - return None - - # Otherwise we'll see if any of the given specifiers accept - # prereleases, if any of them do we'll return True, otherwise False. - if any(s.prereleases for s in self._specs): - return True - - return None - - @prereleases.setter - def prereleases(self, value: bool | None) -> None: - self._prereleases = value - - def __repr__(self) -> str: - """A representation of the specifier set that shows all internal state. - - Note that the ordering of the individual specifiers within the set may not - match the input string. - - >>> SpecifierSet('>=1.0.0,!=2.0.0') - =1.0.0')> - >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False) - =1.0.0', prereleases=False)> - >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True) - =1.0.0', prereleases=True)> - """ - pre = ( - f", prereleases={self.prereleases!r}" - if self._prereleases is not None - else "" - ) - - return f"" - - def __str__(self) -> str: - """A string representation of the specifier set that can be round-tripped. - - Note that the ordering of the individual specifiers within the set may not - match the input string. - - >>> str(SpecifierSet(">=1.0.0,!=1.0.1")) - '!=1.0.1,>=1.0.0' - >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False)) - '!=1.0.1,>=1.0.0' - """ - return ",".join(sorted(str(s) for s in self._specs)) - - def __hash__(self) -> int: - return hash(self._specs) - - def __and__(self, other: SpecifierSet | str) -> SpecifierSet: - """Return a SpecifierSet which is a combination of the two sets. - - :param other: The other object to combine with. - - >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1' - =1.0.0')> - >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1') - =1.0.0')> - """ - if isinstance(other, str): - other = SpecifierSet(other) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - specifier = SpecifierSet() - specifier._specs = frozenset(self._specs | other._specs) - - if self._prereleases is None and other._prereleases is not None: - specifier._prereleases = other._prereleases - elif ( - self._prereleases is not None and other._prereleases is None - ) or self._prereleases == other._prereleases: - specifier._prereleases = self._prereleases - else: - raise ValueError( - "Cannot combine SpecifierSets with True and False prerelease overrides." - ) - - return specifier - - def __eq__(self, other: object) -> bool: - """Whether or not the two SpecifierSet-like objects are equal. - - :param other: The other object to check against. - - The value of :attr:`prereleases` is ignored. - - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) == - ... SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)) - True - >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1" - True - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2") - False - """ - if isinstance(other, (str, Specifier)): - other = SpecifierSet(str(other)) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - return self._specs == other._specs - - def __len__(self) -> int: - """Returns the number of specifiers in this specifier set.""" - return len(self._specs) - - def __iter__(self) -> Iterator[Specifier]: - """ - Returns an iterator over all the underlying :class:`Specifier` instances - in this specifier set. - - >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str) - [, =1.0.0')>] - """ - return iter(self._specs) - - def __contains__(self, item: UnparsedVersion) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: The item to check for. - - This is used for the ``in`` operator and behaves the same as - :meth:`contains` with no ``prereleases`` argument passed. - - >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1") - False - >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True) - True - """ - return self.contains(item) - - def contains( - self, - item: UnparsedVersion, - prereleases: bool | None = None, - installed: bool | None = None, - ) -> bool: - """Return whether or not the item is contained in this SpecifierSet. - - :param item: - The item to check for, which can be a version string or a - :class:`Version` instance. - :param prereleases: - Whether or not to match prereleases with this SpecifierSet. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases, as there are no other versions. - :param installed: - Whether or not the item is installed. If set to ``True``, it will - accept prerelease versions even if the specifier does not allow them. - - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3") - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3")) - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1") - True - >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False).contains("1.3.0a1") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True) - True - """ - version = _coerce_version(item) - - if version is not None and installed and version.is_prerelease: - prereleases = True - - check_item = item if version is None else version - return bool(list(self.filter([check_item], prereleases=prereleases))) - - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """Filter items in the given iterable, that match the specifiers in this set. - - :param iterable: - An iterable that can contain version strings and :class:`Version` instances. - The items in the iterable will be filtered according to the specifier. - :param prereleases: - Whether or not to allow prereleases in the returned iterator. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases if there are no other versions. - - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) - ['1.3'] - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")])) - ['1.3', ] - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"])) - ['1.5a1'] - >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - - An "empty" SpecifierSet will filter items based on the presence of prerelease - versions in the set. - - >>> list(SpecifierSet("").filter(["1.3", "1.5a1"])) - ['1.3'] - >>> list(SpecifierSet("").filter(["1.5a1"])) - ['1.5a1'] - >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - """ - # Determine if we're forcing a prerelease or not, if we're not forcing - # one for this particular filter call, then we'll use whatever the - # SpecifierSet thinks for whether or not we should support prereleases. - if prereleases is None and self.prereleases is not None: - prereleases = self.prereleases - - # If we have any specifiers, then we want to wrap our iterable in the - # filter method for each one, this will act as a logical AND amongst - # each specifier. - if self._specs: - # When prereleases is None, we need to let all versions through - # the individual filters, then decide about prereleases at the end - # based on whether any non-prereleases matched ALL specs. - for spec in self._specs: - iterable = spec.filter( - iterable, prereleases=True if prereleases is None else prereleases - ) - - if prereleases is not None: - # If we have a forced prereleases value, - # we can immediately return the iterator. - return iter(iterable) - else: - # Handle empty SpecifierSet cases where prereleases is not None. - if prereleases is True: - return iter(iterable) - - if prereleases is False: - return ( - item - for item in iterable - if (version := _coerce_version(item)) is None - or not version.is_prerelease - ) - - # Finally if prereleases is None, apply PEP 440 logic: - # exclude prereleases unless there are no final releases that matched. - filtered_items: list[UnparsedVersionVar] = [] - found_prereleases: list[UnparsedVersionVar] = [] - found_final_release = False - - for item in iterable: - parsed_version = _coerce_version(item) - # Arbitrary strings are always included as it is not - # possible to determine if they are prereleases, - # and they have already passed all specifiers. - if parsed_version is None: - filtered_items.append(item) - found_prereleases.append(item) - elif parsed_version.is_prerelease: - found_prereleases.append(item) - else: - filtered_items.append(item) - found_final_release = True - - return iter(filtered_items if found_final_release else found_prereleases) diff --git a/voxvera/vendor/packaging/tags.py b/voxvera/vendor/packaging/tags.py deleted file mode 100644 index 5ef27c8..0000000 --- a/voxvera/vendor/packaging/tags.py +++ /dev/null @@ -1,651 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import logging -import platform -import re -import struct -import subprocess -import sys -import sysconfig -from importlib.machinery import EXTENSION_SUFFIXES -from typing import ( - Any, - Iterable, - Iterator, - Sequence, - Tuple, - cast, -) - -from . import _manylinux, _musllinux - -logger = logging.getLogger(__name__) - -PythonVersion = Sequence[int] -AppleVersion = Tuple[int, int] - -INTERPRETER_SHORT_NAMES: dict[str, str] = { - "python": "py", # Generic. - "cpython": "cp", - "pypy": "pp", - "ironpython": "ip", - "jython": "jy", -} - - -_32_BIT_INTERPRETER = struct.calcsize("P") == 4 - - -class Tag: - """ - A representation of the tag triple for a wheel. - - Instances are considered immutable and thus are hashable. Equality checking - is also supported. - """ - - __slots__ = ["_abi", "_hash", "_interpreter", "_platform"] - - def __init__(self, interpreter: str, abi: str, platform: str) -> None: - self._interpreter = interpreter.lower() - self._abi = abi.lower() - self._platform = platform.lower() - # The __hash__ of every single element in a Set[Tag] will be evaluated each time - # that a set calls its `.disjoint()` method, which may be called hundreds of - # times when scanning a page of links for packages with tags matching that - # Set[Tag]. Pre-computing the value here produces significant speedups for - # downstream consumers. - self._hash = hash((self._interpreter, self._abi, self._platform)) - - @property - def interpreter(self) -> str: - return self._interpreter - - @property - def abi(self) -> str: - return self._abi - - @property - def platform(self) -> str: - return self._platform - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Tag): - return NotImplemented - - return ( - (self._hash == other._hash) # Short-circuit ASAP for perf reasons. - and (self._platform == other._platform) - and (self._abi == other._abi) - and (self._interpreter == other._interpreter) - ) - - def __hash__(self) -> int: - return self._hash - - def __str__(self) -> str: - return f"{self._interpreter}-{self._abi}-{self._platform}" - - def __repr__(self) -> str: - return f"<{self} @ {id(self)}>" - - def __setstate__(self, state: tuple[None, dict[str, Any]]) -> None: - # The cached _hash is wrong when unpickling. - _, slots = state - for k, v in slots.items(): - setattr(self, k, v) - self._hash = hash((self._interpreter, self._abi, self._platform)) - - -def parse_tag(tag: str) -> frozenset[Tag]: - """ - Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances. - - Returning a set is required due to the possibility that the tag is a - compressed tag set. - """ - tags = set() - interpreters, abis, platforms = tag.split("-") - for interpreter in interpreters.split("."): - for abi in abis.split("."): - for platform_ in platforms.split("."): - tags.add(Tag(interpreter, abi, platform_)) - return frozenset(tags) - - -def _get_config_var(name: str, warn: bool = False) -> int | str | None: - value: int | str | None = sysconfig.get_config_var(name) - if value is None and warn: - logger.debug( - "Config variable '%s' is unset, Python ABI tag may be incorrect", name - ) - return value - - -def _normalize_string(string: str) -> str: - return string.replace(".", "_").replace("-", "_").replace(" ", "_") - - -def _is_threaded_cpython(abis: list[str]) -> bool: - """ - Determine if the ABI corresponds to a threaded (`--disable-gil`) build. - - The threaded builds are indicated by a "t" in the abiflags. - """ - if len(abis) == 0: - return False - # expect e.g., cp313 - m = re.match(r"cp\d+(.*)", abis[0]) - if not m: - return False - abiflags = m.group(1) - return "t" in abiflags - - -def _abi3_applies(python_version: PythonVersion, threading: bool) -> bool: - """ - Determine if the Python version supports abi3. - - PEP 384 was first implemented in Python 3.2. The threaded (`--disable-gil`) - builds do not support abi3. - """ - return len(python_version) > 1 and tuple(python_version) >= (3, 2) and not threading - - -def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> list[str]: - py_version = tuple(py_version) # To allow for version comparison. - abis = [] - version = _version_nodot(py_version[:2]) - threading = debug = pymalloc = ucs4 = "" - with_debug = _get_config_var("Py_DEBUG", warn) - has_refcount = hasattr(sys, "gettotalrefcount") - # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled - # extension modules is the best option. - # https://github.com/pypa/pip/issues/3383#issuecomment-173267692 - has_ext = "_d.pyd" in EXTENSION_SUFFIXES - if with_debug or (with_debug is None and (has_refcount or has_ext)): - debug = "d" - if py_version >= (3, 13) and _get_config_var("Py_GIL_DISABLED", warn): - threading = "t" - if py_version < (3, 8): - with_pymalloc = _get_config_var("WITH_PYMALLOC", warn) - if with_pymalloc or with_pymalloc is None: - pymalloc = "m" - if py_version < (3, 3): - unicode_size = _get_config_var("Py_UNICODE_SIZE", warn) - if unicode_size == 4 or ( - unicode_size is None and sys.maxunicode == 0x10FFFF - ): - ucs4 = "u" - elif debug: - # Debug builds can also load "normal" extension modules. - # We can also assume no UCS-4 or pymalloc requirement. - abis.append(f"cp{version}{threading}") - abis.insert(0, f"cp{version}{threading}{debug}{pymalloc}{ucs4}") - return abis - - -def cpython_tags( - python_version: PythonVersion | None = None, - abis: Iterable[str] | None = None, - platforms: Iterable[str] | None = None, - *, - warn: bool = False, -) -> Iterator[Tag]: - """ - Yields the tags for a CPython interpreter. - - The tags consist of: - - cp-- - - cp-abi3- - - cp-none- - - cp-abi3- # Older Python versions down to 3.2. - - If python_version only specifies a major version then user-provided ABIs and - the 'none' ABItag will be used. - - If 'abi3' or 'none' are specified in 'abis' then they will be yielded at - their normal position and not at the beginning. - """ - if not python_version: - python_version = sys.version_info[:2] - - interpreter = f"cp{_version_nodot(python_version[:2])}" - - if abis is None: - abis = _cpython_abis(python_version, warn) if len(python_version) > 1 else [] - abis = list(abis) - # 'abi3' and 'none' are explicitly handled later. - for explicit_abi in ("abi3", "none"): - try: - abis.remove(explicit_abi) - except ValueError: # noqa: PERF203 - pass - - platforms = list(platforms or platform_tags()) - for abi in abis: - for platform_ in platforms: - yield Tag(interpreter, abi, platform_) - - threading = _is_threaded_cpython(abis) - use_abi3 = _abi3_applies(python_version, threading) - if use_abi3: - yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms) - yield from (Tag(interpreter, "none", platform_) for platform_ in platforms) - - if use_abi3: - for minor_version in range(python_version[1] - 1, 1, -1): - for platform_ in platforms: - version = _version_nodot((python_version[0], minor_version)) - interpreter = f"cp{version}" - yield Tag(interpreter, "abi3", platform_) - - -def _generic_abi() -> list[str]: - """ - Return the ABI tag based on EXT_SUFFIX. - """ - # The following are examples of `EXT_SUFFIX`. - # We want to keep the parts which are related to the ABI and remove the - # parts which are related to the platform: - # - linux: '.cpython-310-x86_64-linux-gnu.so' => cp310 - # - mac: '.cpython-310-darwin.so' => cp310 - # - win: '.cp310-win_amd64.pyd' => cp310 - # - win: '.pyd' => cp37 (uses _cpython_abis()) - # - pypy: '.pypy38-pp73-x86_64-linux-gnu.so' => pypy38_pp73 - # - graalpy: '.graalpy-38-native-x86_64-darwin.dylib' - # => graalpy_38_native - - ext_suffix = _get_config_var("EXT_SUFFIX", warn=True) - if not isinstance(ext_suffix, str) or ext_suffix[0] != ".": - raise SystemError("invalid sysconfig.get_config_var('EXT_SUFFIX')") - parts = ext_suffix.split(".") - if len(parts) < 3: - # CPython3.7 and earlier uses ".pyd" on Windows. - return _cpython_abis(sys.version_info[:2]) - soabi = parts[1] - if soabi.startswith("cpython"): - # non-windows - abi = "cp" + soabi.split("-")[1] - elif soabi.startswith("cp"): - # windows - abi = soabi.split("-")[0] - elif soabi.startswith("pypy"): - abi = "-".join(soabi.split("-")[:2]) - elif soabi.startswith("graalpy"): - abi = "-".join(soabi.split("-")[:3]) - elif soabi: - # pyston, ironpython, others? - abi = soabi - else: - return [] - return [_normalize_string(abi)] - - -def generic_tags( - interpreter: str | None = None, - abis: Iterable[str] | None = None, - platforms: Iterable[str] | None = None, - *, - warn: bool = False, -) -> Iterator[Tag]: - """ - Yields the tags for a generic interpreter. - - The tags consist of: - - -- - - The "none" ABI will be added if it was not explicitly provided. - """ - if not interpreter: - interp_name = interpreter_name() - interp_version = interpreter_version(warn=warn) - interpreter = f"{interp_name}{interp_version}" - abis = _generic_abi() if abis is None else list(abis) - platforms = list(platforms or platform_tags()) - if "none" not in abis: - abis.append("none") - for abi in abis: - for platform_ in platforms: - yield Tag(interpreter, abi, platform_) - - -def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]: - """ - Yields Python versions in descending order. - - After the latest version, the major-only version will be yielded, and then - all previous versions of that major version. - """ - if len(py_version) > 1: - yield f"py{_version_nodot(py_version[:2])}" - yield f"py{py_version[0]}" - if len(py_version) > 1: - for minor in range(py_version[1] - 1, -1, -1): - yield f"py{_version_nodot((py_version[0], minor))}" - - -def compatible_tags( - python_version: PythonVersion | None = None, - interpreter: str | None = None, - platforms: Iterable[str] | None = None, -) -> Iterator[Tag]: - """ - Yields the sequence of tags that are compatible with a specific version of Python. - - The tags consist of: - - py*-none- - - -none-any # ... if `interpreter` is provided. - - py*-none-any - """ - if not python_version: - python_version = sys.version_info[:2] - platforms = list(platforms or platform_tags()) - for version in _py_interpreter_range(python_version): - for platform_ in platforms: - yield Tag(version, "none", platform_) - if interpreter: - yield Tag(interpreter, "none", "any") - for version in _py_interpreter_range(python_version): - yield Tag(version, "none", "any") - - -def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str: - if not is_32bit: - return arch - - if arch.startswith("ppc"): - return "ppc" - - return "i386" - - -def _mac_binary_formats(version: AppleVersion, cpu_arch: str) -> list[str]: - formats = [cpu_arch] - if cpu_arch == "x86_64": - if version < (10, 4): - return [] - formats.extend(["intel", "fat64", "fat32"]) - - elif cpu_arch == "i386": - if version < (10, 4): - return [] - formats.extend(["intel", "fat32", "fat"]) - - elif cpu_arch == "ppc64": - # TODO: Need to care about 32-bit PPC for ppc64 through 10.2? - if version > (10, 5) or version < (10, 4): - return [] - formats.append("fat64") - - elif cpu_arch == "ppc": - if version > (10, 6): - return [] - formats.extend(["fat32", "fat"]) - - if cpu_arch in {"arm64", "x86_64"}: - formats.append("universal2") - - if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}: - formats.append("universal") - - return formats - - -def mac_platforms( - version: AppleVersion | None = None, arch: str | None = None -) -> Iterator[str]: - """ - Yields the platform tags for a macOS system. - - The `version` parameter is a two-item tuple specifying the macOS version to - generate platform tags for. The `arch` parameter is the CPU architecture to - generate platform tags for. Both parameters default to the appropriate value - for the current system. - """ - version_str, _, cpu_arch = platform.mac_ver() - if version is None: - version = cast("AppleVersion", tuple(map(int, version_str.split(".")[:2]))) - if version == (10, 16): - # When built against an older macOS SDK, Python will report macOS 10.16 - # instead of the real version. - version_str = subprocess.run( - [ - sys.executable, - "-sS", - "-c", - "import platform; print(platform.mac_ver()[0])", - ], - check=True, - env={"SYSTEM_VERSION_COMPAT": "0"}, - stdout=subprocess.PIPE, - text=True, - ).stdout - version = cast("AppleVersion", tuple(map(int, version_str.split(".")[:2]))) - - if arch is None: - arch = _mac_arch(cpu_arch) - - if (10, 0) <= version < (11, 0): - # Prior to Mac OS 11, each yearly release of Mac OS bumped the - # "minor" version number. The major version was always 10. - major_version = 10 - for minor_version in range(version[1], -1, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - if version >= (11, 0): - # Starting with Mac OS 11, each yearly release bumps the major version - # number. The minor versions are now the midyear updates. - minor_version = 0 - for major_version in range(version[0], 10, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - if version >= (11, 0): - # Mac OS 11 on x86_64 is compatible with binaries from previous releases. - # Arm64 support was introduced in 11.0, so no Arm binaries from previous - # releases exist. - # - # However, the "universal2" binary format can have a - # macOS version earlier than 11.0 when the x86_64 part of the binary supports - # that version of macOS. - major_version = 10 - if arch == "x86_64": - for minor_version in range(16, 3, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - else: - for minor_version in range(16, 3, -1): - compat_version = major_version, minor_version - binary_format = "universal2" - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - -def ios_platforms( - version: AppleVersion | None = None, multiarch: str | None = None -) -> Iterator[str]: - """ - Yields the platform tags for an iOS system. - - :param version: A two-item tuple specifying the iOS version to generate - platform tags for. Defaults to the current iOS version. - :param multiarch: The CPU architecture+ABI to generate platform tags for - - (the value used by `sys.implementation._multiarch` e.g., - `arm64_iphoneos` or `x84_64_iphonesimulator`). Defaults to the current - multiarch value. - """ - if version is None: - # if iOS is the current platform, ios_ver *must* be defined. However, - # it won't exist for CPython versions before 3.13, which causes a mypy - # error. - _, release, _, _ = platform.ios_ver() # type: ignore[attr-defined, unused-ignore] - version = cast("AppleVersion", tuple(map(int, release.split(".")[:2]))) - - if multiarch is None: - multiarch = sys.implementation._multiarch - multiarch = multiarch.replace("-", "_") - - ios_platform_template = "ios_{major}_{minor}_{multiarch}" - - # Consider any iOS major.minor version from the version requested, down to - # 12.0. 12.0 is the first iOS version that is known to have enough features - # to support CPython. Consider every possible minor release up to X.9. There - # highest the minor has ever gone is 8 (14.8 and 15.8) but having some extra - # candidates that won't ever match doesn't really hurt, and it saves us from - # having to keep an explicit list of known iOS versions in the code. Return - # the results descending order of version number. - - # If the requested major version is less than 12, there won't be any matches. - if version[0] < 12: - return - - # Consider the actual X.Y version that was requested. - yield ios_platform_template.format( - major=version[0], minor=version[1], multiarch=multiarch - ) - - # Consider every minor version from X.0 to the minor version prior to the - # version requested by the platform. - for minor in range(version[1] - 1, -1, -1): - yield ios_platform_template.format( - major=version[0], minor=minor, multiarch=multiarch - ) - - for major in range(version[0] - 1, 11, -1): - for minor in range(9, -1, -1): - yield ios_platform_template.format( - major=major, minor=minor, multiarch=multiarch - ) - - -def android_platforms( - api_level: int | None = None, abi: str | None = None -) -> Iterator[str]: - """ - Yields the :attr:`~Tag.platform` tags for Android. If this function is invoked on - non-Android platforms, the ``api_level`` and ``abi`` arguments are required. - - :param int api_level: The maximum `API level - `__ to return. Defaults - to the current system's version, as returned by ``platform.android_ver``. - :param str abi: The `Android ABI `__, - e.g. ``arm64_v8a``. Defaults to the current system's ABI , as returned by - ``sysconfig.get_platform``. Hyphens and periods will be replaced with - underscores. - """ - if platform.system() != "Android" and (api_level is None or abi is None): - raise TypeError( - "on non-Android platforms, the api_level and abi arguments are required" - ) - - if api_level is None: - # Python 3.13 was the first version to return platform.system() == "Android", - # and also the first version to define platform.android_ver(). - api_level = platform.android_ver().api_level # type: ignore[attr-defined] - - if abi is None: - abi = sysconfig.get_platform().split("-")[-1] - abi = _normalize_string(abi) - - # 16 is the minimum API level known to have enough features to support CPython - # without major patching. Yield every API level from the maximum down to the - # minimum, inclusive. - min_api_level = 16 - for ver in range(api_level, min_api_level - 1, -1): - yield f"android_{ver}_{abi}" - - -def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]: - linux = _normalize_string(sysconfig.get_platform()) - if not linux.startswith("linux_"): - # we should never be here, just yield the sysconfig one and return - yield linux - return - if is_32bit: - if linux == "linux_x86_64": - linux = "linux_i686" - elif linux == "linux_aarch64": - linux = "linux_armv8l" - _, arch = linux.split("_", 1) - archs = {"armv8l": ["armv8l", "armv7l"]}.get(arch, [arch]) - yield from _manylinux.platform_tags(archs) - yield from _musllinux.platform_tags(archs) - for arch in archs: - yield f"linux_{arch}" - - -def _generic_platforms() -> Iterator[str]: - yield _normalize_string(sysconfig.get_platform()) - - -def platform_tags() -> Iterator[str]: - """ - Provides the platform tags for this installation. - """ - if platform.system() == "Darwin": - return mac_platforms() - elif platform.system() == "iOS": - return ios_platforms() - elif platform.system() == "Android": - return android_platforms() - elif platform.system() == "Linux": - return _linux_platforms() - else: - return _generic_platforms() - - -def interpreter_name() -> str: - """ - Returns the name of the running interpreter. - - Some implementations have a reserved, two-letter abbreviation which will - be returned when appropriate. - """ - name = sys.implementation.name - return INTERPRETER_SHORT_NAMES.get(name) or name - - -def interpreter_version(*, warn: bool = False) -> str: - """ - Returns the version of the running interpreter. - """ - version = _get_config_var("py_version_nodot", warn=warn) - return str(version) if version else _version_nodot(sys.version_info[:2]) - - -def _version_nodot(version: PythonVersion) -> str: - return "".join(map(str, version)) - - -def sys_tags(*, warn: bool = False) -> Iterator[Tag]: - """ - Returns the sequence of tag triples for the running interpreter. - - The order of the sequence corresponds to priority order for the - interpreter, from most to least important. - """ - - interp_name = interpreter_name() - if interp_name == "cp": - yield from cpython_tags(warn=warn) - else: - yield from generic_tags() - - if interp_name == "pp": - interp = "pp3" - elif interp_name == "cp": - interp = "cp" + interpreter_version(warn=warn) - else: - interp = None - yield from compatible_tags(interpreter=interp) diff --git a/voxvera/vendor/packaging/utils.py b/voxvera/vendor/packaging/utils.py deleted file mode 100644 index c41c813..0000000 --- a/voxvera/vendor/packaging/utils.py +++ /dev/null @@ -1,158 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import re -from typing import NewType, Tuple, Union, cast - -from .tags import Tag, parse_tag -from .version import InvalidVersion, Version, _TrimmedRelease - -BuildTag = Union[Tuple[()], Tuple[int, str]] -NormalizedName = NewType("NormalizedName", str) - - -class InvalidName(ValueError): - """ - An invalid distribution name; users should refer to the packaging user guide. - """ - - -class InvalidWheelFilename(ValueError): - """ - An invalid wheel filename was found, users should refer to PEP 427. - """ - - -class InvalidSdistFilename(ValueError): - """ - An invalid sdist filename was found, users should refer to the packaging user guide. - """ - - -# Core metadata spec for `Name` -_validate_regex = re.compile(r"[A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9]", re.IGNORECASE) -_normalized_regex = re.compile(r"[a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9]") -# PEP 427: The build number must start with a digit. -_build_tag_regex = re.compile(r"(\d+)(.*)") - - -def canonicalize_name(name: str, *, validate: bool = False) -> NormalizedName: - if validate and not _validate_regex.fullmatch(name): - raise InvalidName(f"name is invalid: {name!r}") - # Ensure all ``.`` and ``_`` are ``-`` - # Emulates ``re.sub(r"[-_.]+", "-", name).lower()`` from PEP 503 - # Much faster than re, and even faster than str.translate - value = name.lower().replace("_", "-").replace(".", "-") - # Condense repeats (faster than regex) - while "--" in value: - value = value.replace("--", "-") - return cast("NormalizedName", value) - - -def is_normalized_name(name: str) -> bool: - return _normalized_regex.fullmatch(name) is not None - - -def canonicalize_version( - version: Version | str, *, strip_trailing_zero: bool = True -) -> str: - """ - Return a canonical form of a version as a string. - - >>> canonicalize_version('1.0.1') - '1.0.1' - - Per PEP 625, versions may have multiple canonical forms, differing - only by trailing zeros. - - >>> canonicalize_version('1.0.0') - '1' - >>> canonicalize_version('1.0.0', strip_trailing_zero=False) - '1.0.0' - - Invalid versions are returned unaltered. - - >>> canonicalize_version('foo bar baz') - 'foo bar baz' - """ - if isinstance(version, str): - try: - version = Version(version) - except InvalidVersion: - return str(version) - return str(_TrimmedRelease(version) if strip_trailing_zero else version) - - -def parse_wheel_filename( - filename: str, -) -> tuple[NormalizedName, Version, BuildTag, frozenset[Tag]]: - if not filename.endswith(".whl"): - raise InvalidWheelFilename( - f"Invalid wheel filename (extension must be '.whl'): {filename!r}" - ) - - filename = filename[:-4] - dashes = filename.count("-") - if dashes not in (4, 5): - raise InvalidWheelFilename( - f"Invalid wheel filename (wrong number of parts): {filename!r}" - ) - - parts = filename.split("-", dashes - 2) - name_part = parts[0] - # See PEP 427 for the rules on escaping the project name. - if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None: - raise InvalidWheelFilename(f"Invalid project name: {filename!r}") - name = canonicalize_name(name_part) - - try: - version = Version(parts[1]) - except InvalidVersion as e: - raise InvalidWheelFilename( - f"Invalid wheel filename (invalid version): {filename!r}" - ) from e - - if dashes == 5: - build_part = parts[2] - build_match = _build_tag_regex.match(build_part) - if build_match is None: - raise InvalidWheelFilename( - f"Invalid build number: {build_part} in {filename!r}" - ) - build = cast("BuildTag", (int(build_match.group(1)), build_match.group(2))) - else: - build = () - tags = parse_tag(parts[-1]) - return (name, version, build, tags) - - -def parse_sdist_filename(filename: str) -> tuple[NormalizedName, Version]: - if filename.endswith(".tar.gz"): - file_stem = filename[: -len(".tar.gz")] - elif filename.endswith(".zip"): - file_stem = filename[: -len(".zip")] - else: - raise InvalidSdistFilename( - f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):" - f" {filename!r}" - ) - - # We are requiring a PEP 440 version, which cannot contain dashes, - # so we split on the last dash. - name_part, sep, version_part = file_stem.rpartition("-") - if not sep: - raise InvalidSdistFilename(f"Invalid sdist filename: {filename!r}") - - name = canonicalize_name(name_part) - - try: - version = Version(version_part) - except InvalidVersion as e: - raise InvalidSdistFilename( - f"Invalid sdist filename (invalid version): {filename!r}" - ) from e - - return (name, version) diff --git a/voxvera/vendor/packaging/version.py b/voxvera/vendor/packaging/version.py deleted file mode 100644 index 1206c46..0000000 --- a/voxvera/vendor/packaging/version.py +++ /dev/null @@ -1,792 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -""" -.. testsetup:: - - from packaging.version import parse, Version -""" - -from __future__ import annotations - -import re -import sys -import typing -from typing import ( - Any, - Callable, - Literal, - NamedTuple, - SupportsInt, - Tuple, - TypedDict, - Union, -) - -from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType - -if typing.TYPE_CHECKING: - from typing_extensions import Self, Unpack - -if sys.version_info >= (3, 13): # pragma: no cover - from warnings import deprecated as _deprecated -elif typing.TYPE_CHECKING: - from typing_extensions import deprecated as _deprecated -else: # pragma: no cover - import functools - import warnings - - def _deprecated(message: str) -> object: - def decorator(func: object) -> object: - @functools.wraps(func) - def wrapper(*args: object, **kwargs: object) -> object: - warnings.warn( - message, - category=DeprecationWarning, - stacklevel=2, - ) - return func(*args, **kwargs) - - return wrapper - - return decorator - - -_LETTER_NORMALIZATION = { - "alpha": "a", - "beta": "b", - "c": "rc", - "pre": "rc", - "preview": "rc", - "rev": "post", - "r": "post", -} - -__all__ = ["VERSION_PATTERN", "InvalidVersion", "Version", "parse"] - -LocalType = Tuple[Union[int, str], ...] - -CmpPrePostDevType = Union[InfinityType, NegativeInfinityType, Tuple[str, int]] -CmpLocalType = Union[ - NegativeInfinityType, - Tuple[Union[Tuple[int, str], Tuple[NegativeInfinityType, Union[int, str]]], ...], -] -CmpKey = Tuple[ - int, - Tuple[int, ...], - CmpPrePostDevType, - CmpPrePostDevType, - CmpPrePostDevType, - CmpLocalType, -] -VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool] - - -class _VersionReplace(TypedDict, total=False): - epoch: int | None - release: tuple[int, ...] | None - pre: tuple[Literal["a", "b", "rc"], int] | None - post: int | None - dev: int | None - local: str | None - - -def parse(version: str) -> Version: - """Parse the given version string. - - >>> parse('1.0.dev1') - - - :param version: The version string to parse. - :raises InvalidVersion: When the version string is not a valid version. - """ - return Version(version) - - -class InvalidVersion(ValueError): - """Raised when a version string is not a valid version. - - >>> Version("invalid") - Traceback (most recent call last): - ... - packaging.version.InvalidVersion: Invalid version: 'invalid' - """ - - -class _BaseVersion: - __slots__ = () - - # This can also be a normal member (see the packaging_legacy package); - # we are just requiring it to be readable. Actually defining a property - # has runtime effect on subclasses, so it's typing only. - if typing.TYPE_CHECKING: - - @property - def _key(self) -> tuple[Any, ...]: ... - - def __hash__(self) -> int: - return hash(self._key) - - # Please keep the duplicated `isinstance` check - # in the six comparisons hereunder - # unless you find a way to avoid adding overhead function calls. - def __lt__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key < other._key - - def __le__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key <= other._key - - def __eq__(self, other: object) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key == other._key - - def __ge__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key >= other._key - - def __gt__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key > other._key - - def __ne__(self, other: object) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key != other._key - - -# Deliberately not anchored to the start and end of the string, to make it -# easier for 3rd party code to reuse - -# Note that ++ doesn't behave identically on CPython and PyPy, so not using it here -_VERSION_PATTERN = r""" - v?+ # optional leading v - (?: - (?:(?P[0-9]+)!)?+ # epoch - (?P[0-9]+(?:\.[0-9]+)*+) # release segment - (?P
                                          # pre-release
-            [._-]?+
-            (?Palpha|a|beta|b|preview|pre|c|rc)
-            [._-]?+
-            (?P[0-9]+)?
-        )?+
-        (?P                                         # post release
-            (?:-(?P[0-9]+))
-            |
-            (?:
-                [._-]?
-                (?Ppost|rev|r)
-                [._-]?
-                (?P[0-9]+)?
-            )
-        )?+
-        (?P                                          # dev release
-            [._-]?+
-            (?Pdev)
-            [._-]?+
-            (?P[0-9]+)?
-        )?+
-    )
-    (?:\+
-        (?P                                        # local version
-            [a-z0-9]+
-            (?:[._-][a-z0-9]+)*+
-        )
-    )?+
-"""
-
-_VERSION_PATTERN_OLD = _VERSION_PATTERN.replace("*+", "*").replace("?+", "?")
-
-# Possessive qualifiers were added in Python 3.11.
-# CPython 3.11.0-3.11.4 had a bug: https://github.com/python/cpython/pull/107795
-# Older PyPy also had a bug.
-VERSION_PATTERN = (
-    _VERSION_PATTERN_OLD
-    if (sys.implementation.name == "cpython" and sys.version_info < (3, 11, 5))
-    or (sys.implementation.name == "pypy" and sys.version_info < (3, 11, 13))
-    or sys.version_info < (3, 11)
-    else _VERSION_PATTERN
-)
-"""
-A string containing the regular expression used to match a valid version.
-
-The pattern is not anchored at either end, and is intended for embedding in larger
-expressions (for example, matching a version number as part of a file name). The
-regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
-flags set.
-
-:meta hide-value:
-"""
-
-
-# Validation pattern for local version in replace()
-_LOCAL_PATTERN = re.compile(r"[a-z0-9]+(?:[._-][a-z0-9]+)*", re.IGNORECASE)
-
-
-def _validate_epoch(value: object, /) -> int:
-    epoch = value or 0
-    if isinstance(epoch, int) and epoch >= 0:
-        return epoch
-    msg = f"epoch must be non-negative integer, got {epoch}"
-    raise InvalidVersion(msg)
-
-
-def _validate_release(value: object, /) -> tuple[int, ...]:
-    release = (0,) if value is None else value
-    if (
-        isinstance(release, tuple)
-        and len(release) > 0
-        and all(isinstance(i, int) and i >= 0 for i in release)
-    ):
-        return release
-    msg = f"release must be a non-empty tuple of non-negative integers, got {release}"
-    raise InvalidVersion(msg)
-
-
-def _validate_pre(value: object, /) -> tuple[Literal["a", "b", "rc"], int] | None:
-    if value is None:
-        return value
-    if (
-        isinstance(value, tuple)
-        and len(value) == 2
-        and value[0] in ("a", "b", "rc")
-        and isinstance(value[1], int)
-        and value[1] >= 0
-    ):
-        return value
-    msg = f"pre must be a tuple of ('a'|'b'|'rc', non-negative int), got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_post(value: object, /) -> tuple[Literal["post"], int] | None:
-    if value is None:
-        return value
-    if isinstance(value, int) and value >= 0:
-        return ("post", value)
-    msg = f"post must be non-negative integer, got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_dev(value: object, /) -> tuple[Literal["dev"], int] | None:
-    if value is None:
-        return value
-    if isinstance(value, int) and value >= 0:
-        return ("dev", value)
-    msg = f"dev must be non-negative integer, got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_local(value: object, /) -> LocalType | None:
-    if value is None:
-        return value
-    if isinstance(value, str) and _LOCAL_PATTERN.fullmatch(value):
-        return _parse_local_version(value)
-    msg = f"local must be a valid version string, got {value!r}"
-    raise InvalidVersion(msg)
-
-
-# Backward compatibility for internals before 26.0. Do not use.
-class _Version(NamedTuple):
-    epoch: int
-    release: tuple[int, ...]
-    dev: tuple[str, int] | None
-    pre: tuple[str, int] | None
-    post: tuple[str, int] | None
-    local: LocalType | None
-
-
-class Version(_BaseVersion):
-    """This class abstracts handling of a project's versions.
-
-    A :class:`Version` instance is comparison aware and can be compared and
-    sorted using the standard Python interfaces.
-
-    >>> v1 = Version("1.0a5")
-    >>> v2 = Version("1.0")
-    >>> v1
-    
-    >>> v2
-    
-    >>> v1 < v2
-    True
-    >>> v1 == v2
-    False
-    >>> v1 > v2
-    False
-    >>> v1 >= v2
-    False
-    >>> v1 <= v2
-    True
-    """
-
-    __slots__ = ("_dev", "_epoch", "_key_cache", "_local", "_post", "_pre", "_release")
-    __match_args__ = ("_str",)
-
-    _regex = re.compile(r"\s*" + VERSION_PATTERN + r"\s*", re.VERBOSE | re.IGNORECASE)
-
-    _epoch: int
-    _release: tuple[int, ...]
-    _dev: tuple[str, int] | None
-    _pre: tuple[str, int] | None
-    _post: tuple[str, int] | None
-    _local: LocalType | None
-
-    _key_cache: CmpKey | None
-
-    def __init__(self, version: str) -> None:
-        """Initialize a Version object.
-
-        :param version:
-            The string representation of a version which will be parsed and normalized
-            before use.
-        :raises InvalidVersion:
-            If the ``version`` does not conform to PEP 440 in any way then this
-            exception will be raised.
-        """
-        # Validate the version and parse it into pieces
-        match = self._regex.fullmatch(version)
-        if not match:
-            raise InvalidVersion(f"Invalid version: {version!r}")
-        self._epoch = int(match.group("epoch")) if match.group("epoch") else 0
-        self._release = tuple(map(int, match.group("release").split(".")))
-        self._pre = _parse_letter_version(match.group("pre_l"), match.group("pre_n"))
-        self._post = _parse_letter_version(
-            match.group("post_l"), match.group("post_n1") or match.group("post_n2")
-        )
-        self._dev = _parse_letter_version(match.group("dev_l"), match.group("dev_n"))
-        self._local = _parse_local_version(match.group("local"))
-
-        # Key which will be used for sorting
-        self._key_cache = None
-
-    def __replace__(self, **kwargs: Unpack[_VersionReplace]) -> Self:
-        epoch = _validate_epoch(kwargs["epoch"]) if "epoch" in kwargs else self._epoch
-        release = (
-            _validate_release(kwargs["release"])
-            if "release" in kwargs
-            else self._release
-        )
-        pre = _validate_pre(kwargs["pre"]) if "pre" in kwargs else self._pre
-        post = _validate_post(kwargs["post"]) if "post" in kwargs else self._post
-        dev = _validate_dev(kwargs["dev"]) if "dev" in kwargs else self._dev
-        local = _validate_local(kwargs["local"]) if "local" in kwargs else self._local
-
-        if (
-            epoch == self._epoch
-            and release == self._release
-            and pre == self._pre
-            and post == self._post
-            and dev == self._dev
-            and local == self._local
-        ):
-            return self
-
-        new_version = self.__class__.__new__(self.__class__)
-        new_version._key_cache = None
-        new_version._epoch = epoch
-        new_version._release = release
-        new_version._pre = pre
-        new_version._post = post
-        new_version._dev = dev
-        new_version._local = local
-
-        return new_version
-
-    @property
-    def _key(self) -> CmpKey:
-        if self._key_cache is None:
-            self._key_cache = _cmpkey(
-                self._epoch,
-                self._release,
-                self._pre,
-                self._post,
-                self._dev,
-                self._local,
-            )
-        return self._key_cache
-
-    @property
-    @_deprecated("Version._version is private and will be removed soon")
-    def _version(self) -> _Version:
-        return _Version(
-            self._epoch, self._release, self._dev, self._pre, self._post, self._local
-        )
-
-    @_version.setter
-    @_deprecated("Version._version is private and will be removed soon")
-    def _version(self, value: _Version) -> None:
-        self._epoch = value.epoch
-        self._release = value.release
-        self._dev = value.dev
-        self._pre = value.pre
-        self._post = value.post
-        self._local = value.local
-        self._key_cache = None
-
-    def __repr__(self) -> str:
-        """A representation of the Version that shows all internal state.
-
-        >>> Version('1.0.0')
-        
-        """
-        return f""
-
-    def __str__(self) -> str:
-        """A string representation of the version that can be round-tripped.
-
-        >>> str(Version("1.0a5"))
-        '1.0a5'
-        """
-        # This is a hot function, so not calling self.base_version
-        version = ".".join(map(str, self.release))
-
-        # Epoch
-        if self.epoch:
-            version = f"{self.epoch}!{version}"
-
-        # Pre-release
-        if self.pre is not None:
-            version += "".join(map(str, self.pre))
-
-        # Post-release
-        if self.post is not None:
-            version += f".post{self.post}"
-
-        # Development release
-        if self.dev is not None:
-            version += f".dev{self.dev}"
-
-        # Local version segment
-        if self.local is not None:
-            version += f"+{self.local}"
-
-        return version
-
-    @property
-    def _str(self) -> str:
-        """Internal property for match_args"""
-        return str(self)
-
-    @property
-    def epoch(self) -> int:
-        """The epoch of the version.
-
-        >>> Version("2.0.0").epoch
-        0
-        >>> Version("1!2.0.0").epoch
-        1
-        """
-        return self._epoch
-
-    @property
-    def release(self) -> tuple[int, ...]:
-        """The components of the "release" segment of the version.
-
-        >>> Version("1.2.3").release
-        (1, 2, 3)
-        >>> Version("2.0.0").release
-        (2, 0, 0)
-        >>> Version("1!2.0.0.post0").release
-        (2, 0, 0)
-
-        Includes trailing zeroes but not the epoch or any pre-release / development /
-        post-release suffixes.
-        """
-        return self._release
-
-    @property
-    def pre(self) -> tuple[str, int] | None:
-        """The pre-release segment of the version.
-
-        >>> print(Version("1.2.3").pre)
-        None
-        >>> Version("1.2.3a1").pre
-        ('a', 1)
-        >>> Version("1.2.3b1").pre
-        ('b', 1)
-        >>> Version("1.2.3rc1").pre
-        ('rc', 1)
-        """
-        return self._pre
-
-    @property
-    def post(self) -> int | None:
-        """The post-release number of the version.
-
-        >>> print(Version("1.2.3").post)
-        None
-        >>> Version("1.2.3.post1").post
-        1
-        """
-        return self._post[1] if self._post else None
-
-    @property
-    def dev(self) -> int | None:
-        """The development number of the version.
-
-        >>> print(Version("1.2.3").dev)
-        None
-        >>> Version("1.2.3.dev1").dev
-        1
-        """
-        return self._dev[1] if self._dev else None
-
-    @property
-    def local(self) -> str | None:
-        """The local version segment of the version.
-
-        >>> print(Version("1.2.3").local)
-        None
-        >>> Version("1.2.3+abc").local
-        'abc'
-        """
-        if self._local:
-            return ".".join(str(x) for x in self._local)
-        else:
-            return None
-
-    @property
-    def public(self) -> str:
-        """The public portion of the version.
-
-        >>> Version("1.2.3").public
-        '1.2.3'
-        >>> Version("1.2.3+abc").public
-        '1.2.3'
-        >>> Version("1!1.2.3dev1+abc").public
-        '1!1.2.3.dev1'
-        """
-        return str(self).split("+", 1)[0]
-
-    @property
-    def base_version(self) -> str:
-        """The "base version" of the version.
-
-        >>> Version("1.2.3").base_version
-        '1.2.3'
-        >>> Version("1.2.3+abc").base_version
-        '1.2.3'
-        >>> Version("1!1.2.3dev1+abc").base_version
-        '1!1.2.3'
-
-        The "base version" is the public version of the project without any pre or post
-        release markers.
-        """
-        release_segment = ".".join(map(str, self.release))
-        return f"{self.epoch}!{release_segment}" if self.epoch else release_segment
-
-    @property
-    def is_prerelease(self) -> bool:
-        """Whether this version is a pre-release.
-
-        >>> Version("1.2.3").is_prerelease
-        False
-        >>> Version("1.2.3a1").is_prerelease
-        True
-        >>> Version("1.2.3b1").is_prerelease
-        True
-        >>> Version("1.2.3rc1").is_prerelease
-        True
-        >>> Version("1.2.3dev1").is_prerelease
-        True
-        """
-        return self.dev is not None or self.pre is not None
-
-    @property
-    def is_postrelease(self) -> bool:
-        """Whether this version is a post-release.
-
-        >>> Version("1.2.3").is_postrelease
-        False
-        >>> Version("1.2.3.post1").is_postrelease
-        True
-        """
-        return self.post is not None
-
-    @property
-    def is_devrelease(self) -> bool:
-        """Whether this version is a development release.
-
-        >>> Version("1.2.3").is_devrelease
-        False
-        >>> Version("1.2.3.dev1").is_devrelease
-        True
-        """
-        return self.dev is not None
-
-    @property
-    def major(self) -> int:
-        """The first item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").major
-        1
-        """
-        return self.release[0] if len(self.release) >= 1 else 0
-
-    @property
-    def minor(self) -> int:
-        """The second item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").minor
-        2
-        >>> Version("1").minor
-        0
-        """
-        return self.release[1] if len(self.release) >= 2 else 0
-
-    @property
-    def micro(self) -> int:
-        """The third item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").micro
-        3
-        >>> Version("1").micro
-        0
-        """
-        return self.release[2] if len(self.release) >= 3 else 0
-
-
-class _TrimmedRelease(Version):
-    __slots__ = ()
-
-    def __init__(self, version: str | Version) -> None:
-        if isinstance(version, Version):
-            self._epoch = version._epoch
-            self._release = version._release
-            self._dev = version._dev
-            self._pre = version._pre
-            self._post = version._post
-            self._local = version._local
-            self._key_cache = version._key_cache
-            return
-        super().__init__(version)  # pragma: no cover
-
-    @property
-    def release(self) -> tuple[int, ...]:
-        """
-        Release segment without any trailing zeros.
-
-        >>> _TrimmedRelease('1.0.0').release
-        (1,)
-        >>> _TrimmedRelease('0.0').release
-        (0,)
-        """
-        # This leaves one 0.
-        rel = super().release
-        len_release = len(rel)
-        i = len_release
-        while i > 1 and rel[i - 1] == 0:
-            i -= 1
-        return rel if i == len_release else rel[:i]
-
-
-def _parse_letter_version(
-    letter: str | None, number: str | bytes | SupportsInt | None
-) -> tuple[str, int] | None:
-    if letter:
-        # We normalize any letters to their lower case form
-        letter = letter.lower()
-
-        # We consider some words to be alternate spellings of other words and
-        # in those cases we want to normalize the spellings to our preferred
-        # spelling.
-        letter = _LETTER_NORMALIZATION.get(letter, letter)
-
-        # We consider there to be an implicit 0 in a pre-release if there is
-        # not a numeral associated with it.
-        return letter, int(number or 0)
-
-    if number:
-        # We assume if we are given a number, but we are not given a letter
-        # then this is using the implicit post release syntax (e.g. 1.0-1)
-        return "post", int(number)
-
-    return None
-
-
-_local_version_separators = re.compile(r"[\._-]")
-
-
-def _parse_local_version(local: str | None) -> LocalType | None:
-    """
-    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
-    """
-    if local is not None:
-        return tuple(
-            part.lower() if not part.isdigit() else int(part)
-            for part in _local_version_separators.split(local)
-        )
-    return None
-
-
-def _cmpkey(
-    epoch: int,
-    release: tuple[int, ...],
-    pre: tuple[str, int] | None,
-    post: tuple[str, int] | None,
-    dev: tuple[str, int] | None,
-    local: LocalType | None,
-) -> CmpKey:
-    # When we compare a release version, we want to compare it with all of the
-    # trailing zeros removed. We will use this for our sorting key.
-    len_release = len(release)
-    i = len_release
-    while i and release[i - 1] == 0:
-        i -= 1
-    _release = release if i == len_release else release[:i]
-
-    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
-    # We'll do this by abusing the pre segment, but we _only_ want to do this
-    # if there is not a pre or a post segment. If we have one of those then
-    # the normal sorting rules will handle this case correctly.
-    if pre is None and post is None and dev is not None:
-        _pre: CmpPrePostDevType = NegativeInfinity
-    # Versions without a pre-release (except as noted above) should sort after
-    # those with one.
-    elif pre is None:
-        _pre = Infinity
-    else:
-        _pre = pre
-
-    # Versions without a post segment should sort before those with one.
-    if post is None:
-        _post: CmpPrePostDevType = NegativeInfinity
-
-    else:
-        _post = post
-
-    # Versions without a development segment should sort after those with one.
-    if dev is None:
-        _dev: CmpPrePostDevType = Infinity
-
-    else:
-        _dev = dev
-
-    if local is None:
-        # Versions without a local segment should sort before those with one.
-        _local: CmpLocalType = NegativeInfinity
-    else:
-        # Versions with a local segment need that segment parsed to implement
-        # the sorting rules in PEP440.
-        # - Alpha numeric segments sort before numeric segments
-        # - Alpha numeric segments sort lexicographically
-        # - Numeric segments sort numerically
-        # - Shorter versions sort before longer versions when the prefixes
-        #   match exactly
-        _local = tuple(
-            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
-        )
-
-    return epoch, _release, _pre, _post, _dev, _local
diff --git a/voxvera/vendor/pfzy-0.3.4.dist-info/INSTALLER b/voxvera/vendor/pfzy-0.3.4.dist-info/INSTALLER
deleted file mode 100644
index a1b589e..0000000
--- a/voxvera/vendor/pfzy-0.3.4.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-pip
diff --git a/voxvera/vendor/pfzy-0.3.4.dist-info/LICENSE b/voxvera/vendor/pfzy-0.3.4.dist-info/LICENSE
deleted file mode 100644
index 5af2d63..0000000
--- a/voxvera/vendor/pfzy-0.3.4.dist-info/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2021 Kevin Zhuang
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/voxvera/vendor/pfzy-0.3.4.dist-info/METADATA b/voxvera/vendor/pfzy-0.3.4.dist-info/METADATA
deleted file mode 100644
index bbf083e..0000000
--- a/voxvera/vendor/pfzy-0.3.4.dist-info/METADATA
+++ /dev/null
@@ -1,112 +0,0 @@
-Metadata-Version: 2.1
-Name: pfzy
-Version: 0.3.4
-Summary: Python port of the fzy fuzzy string matching algorithm
-Home-page: https://github.com/kazhala/pfzy
-License: MIT
-Keywords: fuzzy,string,fzy,search,development
-Author: Kevin Zhuang
-Author-email: kevin7441@gmail.com
-Requires-Python: >=3.7,<4.0
-Classifier: Development Status :: 4 - Beta
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: Microsoft
-Classifier: Operating System :: Unix
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.10
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
-Classifier: Topic :: Software Development
-Classifier: Topic :: Software Development :: Libraries
-Provides-Extra: docs
-Requires-Dist: Sphinx (>=4.1.2,<5.0.0); extra == "docs"
-Requires-Dist: furo (>=2021.8.17-beta.43,<2022.0.0); extra == "docs"
-Requires-Dist: myst-parser (>=0.15.1,<0.16.0); extra == "docs"
-Requires-Dist: sphinx-autobuild (>=2021.3.14,<2022.0.0); extra == "docs"
-Requires-Dist: sphinx-copybutton (>=0.4.0,<0.5.0); extra == "docs"
-Project-URL: Documentation, https://pfzy.readthedocs.io/
-Project-URL: Repository, https://github.com/kazhala/pfzy
-Description-Content-Type: text/markdown
-
-# pfzy
-
-[![CI](https://github.com/kazhala/pfzy/workflows/CI/badge.svg)](https://github.com/kazhala/pfzy/actions?query=workflow%3ACI)
-[![Docs](https://img.shields.io/readthedocs/pfzy?label=Docs&logo=Read%20the%20Docs)](https://readthedocs.org/projects/pfzy/)
-[![Build](https://codebuild.ap-southeast-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiT2pwUFo2MVBzV1ptL0d4VDhmSHo4bSswVHFuaEh6bEU1d2g3bmpsdnZjSzcwWkxac3NHcjBKZDkyT2t1R0VveHJ0WlNFWmZmUjNQUGFpemxwV2loRm9rPSIsIml2UGFyYW1ldGVyU3BlYyI6Imw4dlcwYjlxaU9kYVd0UkoiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)](https://ap-southeast-2.console.aws.amazon.com/codesuite/codebuild/378756445655/projects/pfzy/history?region=ap-southeast-2&builds-meta=eyJmIjp7InRleHQiOiIifSwicyI6e30sIm4iOjIwLCJpIjowfQ)
-[![Coverage](https://img.shields.io/coveralls/github/kazhala/pfzy?logo=coveralls)](https://coveralls.io/github/kazhala/pfzy?branch=master)
-[![Version](https://img.shields.io/pypi/pyversions/pfzy)](https://pypi.org/project/pfzy/)
-[![PyPi](https://img.shields.io/pypi/v/pfzy)](https://pypi.org/project/pfzy/)
-[![License](https://img.shields.io/pypi/l/pfzy)](https://github.com/kazhala/pfzy/blob/master/LICENSE)
-
-
-
-Python port of the [fzy](https://github.com/jhawthorn/fzy) fuzzy string matching algorithm.
-
-- [Async fuzzy match function](https://pfzy.readthedocs.io/en/latest/pages/usage.html#matcher)
-- [Fzy scorer (fuzzy string match)](https://pfzy.readthedocs.io/en/latest/pages/usage.html#fzy-scorer)
-- [Substring scorer (exact substring match)](https://pfzy.readthedocs.io/en/latest/pages/usage.html#substr-scorer)
-
-## Requirements
-
-```
-python >= 3.7
-```
-
-## Installation
-
-```sh
-pip install pfzy
-```
-
-## Quick Start
-
-**Full documentation: [https://pfzy.readthedocs.io/](https://pfzy.readthedocs.io/)**
-
-```python
-import asyncio
-
-from pfzy import fuzzy_match
-
-result = asyncio.run(fuzzy_match("ab", ["acb", "acbabc"]))
-```
-
-```
->>> print(result)
-[{'value': 'acbabc', 'indices': [3, 4]}, {'value': 'acb', 'indices': [0, 2]}]
-```
-
-
-
-## Background
-
-[fuzzywuzzy](https://github.com/seatgeek/fuzzywuzzy) is a famous python package for performing fuzzy matching
-between strings powered by [python-Levenshtein](https://github.com/miohtama/python-Levenshtein). While it does its
-job well it doesn't calculate/provide the matching indices which is essential in a fuzzy finder applications.
-
-The [fzy](https://github.com/jhawthorn/fzy) fuzzy matching algorithm can calculate the matching score while also
-providing the matching indices which fuzzy finder applications can use to provide extra highlights.
-
-The initial implementation of this algorithm can be found at [sweep.py](https://github.com/aslpavel/sweep.py) which
-is a python implementation of the terminal fuzzy finder. The code snippet is later used by the project [vim-clap](https://github.com/liuchengxu/vim-clap).
-
-**I found myself needing this logic across multiple projects hence decided to strip out the logic and publish a dedicated
-package with detailed documentation and unittest.**
-
-
-
-## Credit
-
-- [fzy](https://github.com/jhawthorn/fzy)
-- [sweep.py](https://github.com/aslpavel/sweep.py)
-- [vim-clap](https://github.com/liuchengxu/vim-clap)
-
-## LICENSE
-
-> All 3 projects mentioned in [Credit](#credit) are all licensed under [MIT](https://opensource.org/licenses/MIT).
-
-This project is licensed under [MIT](https://github.com/kazhala/pfzy). Copyright (c) 2021 Kevin Zhuang
-
-
-
diff --git a/voxvera/vendor/pfzy-0.3.4.dist-info/RECORD b/voxvera/vendor/pfzy-0.3.4.dist-info/RECORD
deleted file mode 100644
index c9e820c..0000000
--- a/voxvera/vendor/pfzy-0.3.4.dist-info/RECORD
+++ /dev/null
@@ -1,9 +0,0 @@
-pfzy-0.3.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
-pfzy-0.3.4.dist-info/LICENSE,sha256=TZpg3YfN3cXDH-kG98XmWUqNHI-3y1Oc1IM8LKEitf8,1069
-pfzy-0.3.4.dist-info/METADATA,sha256=gSyTDeWnbMUP6sMwy7twOW__M3qhxV6YMInpJ7nOcd8,4898
-pfzy-0.3.4.dist-info/RECORD,,
-pfzy-0.3.4.dist-info/WHEEL,sha256=y3eDiaFVSNTPbgzfNn0nYn5tEn1cX6WrdetDlQM4xWw,83
-pfzy/__init__.py,sha256=R_EaWAVCNSU8-apr-1e0trr5yChP2LCnERq5UJmIrX8,84
-pfzy/match.py,sha256=10cmthmiaHdP6OTyihIKX_vUCTdv2eAD5Toh_Rqm8lk,3927
-pfzy/score.py,sha256=GbvvK6fBPam3Ac7pkEUDKHc8CMGbwW-Js4fOpoKndlQ,9842
-pfzy/types.py,sha256=2HYaeEZgQd8m_tSFSlRvv7mw4JPofFr_dSlM_GbgB4E,193
diff --git a/voxvera/vendor/pfzy-0.3.4.dist-info/WHEEL b/voxvera/vendor/pfzy-0.3.4.dist-info/WHEEL
deleted file mode 100644
index 3764652..0000000
--- a/voxvera/vendor/pfzy-0.3.4.dist-info/WHEEL
+++ /dev/null
@@ -1,4 +0,0 @@
-Wheel-Version: 1.0
-Generator: poetry 1.0.7
-Root-Is-Purelib: true
-Tag: py3-none-any
diff --git a/voxvera/vendor/pfzy/__init__.py b/voxvera/vendor/pfzy/__init__.py
deleted file mode 100644
index 76da671..0000000
--- a/voxvera/vendor/pfzy/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from pfzy.match import fuzzy_match
-from pfzy.score import fzy_scorer, substr_scorer
diff --git a/voxvera/vendor/pfzy/match.py b/voxvera/vendor/pfzy/match.py
deleted file mode 100644
index 1c1c729..0000000
--- a/voxvera/vendor/pfzy/match.py
+++ /dev/null
@@ -1,111 +0,0 @@
-"""Module contains the async interface to match needle against haystack in batch."""
-import asyncio
-import heapq
-from typing import Any, Callable, Dict, List, Union, cast
-
-from pfzy.score import SCORE_INDICES, fzy_scorer
-from pfzy.types import HAYSTACKS
-
-
-async def _rank_task(
-    scorer: Callable[[str, str], SCORE_INDICES],
-    needle: str,
-    haystacks: List[Union[str, Dict[str, Any]]],
-    key: str,
-) -> List[Dict[str, Any]]:
-    """Calculate the score for needle against given list of haystacks and rank them.
-
-    Args:
-        scorer: Scorer to be used to do the calculation.
-        needle: Substring to search.
-        haystacks: List of dictionary containing the haystack to be searched.
-        key: The key within the `haystacks` dictionary that contains the actual string value.
-
-    Return:
-        Sorted list of haystacks based on the needle score with additional keys for the `score`
-        and `indices`.
-    """
-    result = []
-    for haystack in haystacks:
-        score, indices = scorer(needle, cast(Dict, haystack)[key])
-        if indices is None:
-            continue
-        result.append(
-            {
-                "score": score,
-                "indices": indices,
-                "haystack": haystack,
-            }
-        )
-    result.sort(key=lambda x: x["score"], reverse=True)
-    return result
-
-
-async def fuzzy_match(
-    needle: str,
-    haystacks: HAYSTACKS,
-    key: str = "",
-    batch_size: int = 4096,
-    scorer: Callable[[str, str], SCORE_INDICES] = None,
-) -> List[Dict[str, Any]]:
-    """Fuzzy find the needle within list of haystacks and get matched results with matching index.
-
-    Note:
-        The `key` argument is optional when the provided `haystacks` argument is a list of :class:`str`.
-        It will be given a default key `value` if not present.
-
-    Warning:
-        The `key` argument is required when provided `haystacks` argument is a list of :class:`dict`.
-        If not present, :class:`TypeError` will be raised.
-
-    Args:
-        needle: String to search within the `haystacks`.
-        haystacks: List of haystack/longer strings to be searched.
-        key: If `haystacks` is a list of dictionary, provide the key that
-            can obtain the haystack value to search.
-        batch_size: Number of entry to be processed together.
-        scorer (Callable[[str, str], SCORE_indices]): Desired scorer to use. Currently only :func:`~pfzy.score.fzy_scorer` and :func:`~pfzy.score.substr_scorer` is supported.
-
-    Raises:
-        TypeError: When the argument `haystacks` is :class:`list` of :class:`dict` and the `key` argument
-            is missing, :class:`TypeError` will be raised.
-
-    Returns:
-        List of matching `haystacks` with additional key indices and score.
-
-    Examples:
-        >>> import asyncio
-        >>> asyncio.run(fuzzy_match("ab", ["acb", "acbabc"]))
-        [{'value': 'acbabc', 'indices': [3, 4]}, {'value': 'acb', 'indices': [0, 2]}]
-    """
-    if scorer is None:
-        scorer = fzy_scorer
-
-    for index, haystack in enumerate(haystacks):
-        if not isinstance(haystack, dict):
-            if not key:
-                key = "value"
-            haystacks[index] = {key: haystack}
-
-    if not key:
-        raise TypeError(
-            f"${fuzzy_match.__name__} missing 1 required argument: 'key', 'key' is required when haystacks is an instance of dict"
-        )
-
-    batches = await asyncio.gather(
-        *(
-            _rank_task(
-                scorer,
-                needle,
-                haystacks[offset : offset + batch_size],
-                key,
-            )
-            for offset in range(0, len(haystacks), batch_size)
-        )
-    )
-    results = heapq.merge(*batches, key=lambda x: x["score"], reverse=True)
-    choices = []
-    for candidate in results:
-        candidate["haystack"]["indices"] = candidate["indices"]
-        choices.append(candidate["haystack"])
-    return choices
diff --git a/voxvera/vendor/pfzy/score.py b/voxvera/vendor/pfzy/score.py
deleted file mode 100644
index f755dc9..0000000
--- a/voxvera/vendor/pfzy/score.py
+++ /dev/null
@@ -1,307 +0,0 @@
-"""Module contains the score calculation algorithems."""
-from functools import partial
-from typing import Dict, List, Union, cast
-
-from pfzy.types import SCORE_INDICES
-
-SCORE_MIN = float("-inf")
-SCORE_MAX = float("inf")
-SCORE_GAP_LEADING = -0.005
-SCORE_GAP_TRAILING = -0.005
-SCORE_GAP_INNER = -0.01
-SCORE_MATCH_CONSECUTIVE = 1.0
-
-
-def _char_range_with(
-    char_start: str, char_stop: str, value, hash_table: Dict[str, Union[int, float]]
-) -> Dict[str, Union[int, float]]:
-    """Generate index mapping for `bonus` calculation.
-
-    Args:
-        char_start: Starting char of the range.
-        char_stop: Ending char of the range.
-        value: Value to give to the range of char.
-        hash_table: Base dictionary to add the mapping.
-
-    Returns:
-        A dictionary containing the given range with provided index.
-
-    Examples:
-        >>> _char_range_with("a", "d", 1, {})
-        {'a': 1, 'b': 1, 'c': 1, 'd': 1}
-    """
-    hash_table = hash_table.copy()
-    hash_table.update(
-        (chr(uni_char), value)
-        for uni_char in range(ord(char_start), ord(char_stop) + 1)
-    )
-    return hash_table
-
-
-lower_with = partial(_char_range_with, "a", "z")
-upper_with = partial(_char_range_with, "A", "Z")
-digit_with = partial(_char_range_with, "0", "9")
-
-SCORE_MATCH_SLASH = 0.9
-SCORE_MATCH_WORD = 0.8
-SCORE_MATCH_CAPITAL = 0.7
-SCORE_MATCH_DOT = 0.6
-BONUS_MAP = {
-    "/": SCORE_MATCH_SLASH,
-    "-": SCORE_MATCH_WORD,
-    "_": SCORE_MATCH_WORD,
-    " ": SCORE_MATCH_WORD,
-    ".": SCORE_MATCH_DOT,
-}
-BONUS_STATES = [{}, BONUS_MAP, lower_with(SCORE_MATCH_CAPITAL, BONUS_MAP)]
-BONUS_INDEX = cast(Dict[str, int], digit_with(1, lower_with(1, upper_with(2, {}))))
-
-
-def _bonus(haystack: str) -> List[float]:
-    """Calculate bonus score for the given haystack.
-
-    The bonus are applied to each char based on the previous char.
-
-    When previous char is within the `BONUS_MAP` then additional bonus
-    are applied to the current char due to it might be the start of a new
-    word.
-
-    When encountered a mix case character, if the current char is capitalised then
-    if the previous char is normal case or within `BONUS_MAP`, additional bounus are applied.
-
-    Args:
-        haystack: String to calculate bonus.
-
-    Returns:
-        A list of float matching the length of the given haystack
-        with each index representing the bonus score to apply.
-
-    Examples:
-        >>> _bonus("asdf")
-        [0.9, 0, 0, 0]
-        >>> _bonus("asdf asdf")
-        [0.9, 0, 0, 0, 0, 0.8, 0, 0, 0]
-        >>> _bonus("asdf aSdf")
-        [0.9, 0, 0, 0, 0, 0.8, 0.7, 0, 0]
-        >>> _bonus("asdf/aSdf")
-        [0.9, 0, 0, 0, 0, 0.9, 0.7, 0, 0]
-    """
-    prev_char = "/"
-    bonus = []
-    for char in haystack:
-        bonus.append(BONUS_STATES[BONUS_INDEX.get(char, 0)].get(prev_char, 0))
-        prev_char = char
-    return bonus
-
-
-def _score(needle: str, haystack: str) -> SCORE_INDICES:
-    """Use fzy logic to calculate score for `needle` within the given `haystack`.
-
-    2 2D array to track the score.
-    1. The running score (`running_score`) which represents the best score for the current position.
-    2. The result score (`result_score`) which tracks to overall best score that could be for the current positon.
-
-    With every consequtive match, additional bonuse score are given and for every non matching char, a negative
-    gap score is applied.
-
-    After the score is calculated, the final matching score will be stored at the last position of the `result_score`.
-
-    Backtrack the result by comparing the 2 2D array to find the corresponding indices.
-
-    Args:
-        needle: Substring to find in haystack.
-        haystack: String to be searched and scored.
-
-    Returns:
-        A tuple of matching score with a list of matching indices.
-    """
-    needle_len, haystack_len = len(needle), len(haystack)
-    bonus_score = _bonus(haystack)
-
-    # smart case
-    if needle.islower():
-        haystack = haystack.lower()
-
-    # return all values if no query
-    if needle_len == 0 or needle_len == haystack_len:
-        return SCORE_MAX, list(range(needle_len))
-
-    # best score for the position
-    running_score: List[List[float]] = [
-        [0 for _ in range(haystack_len)] for _ in range(needle_len)
-    ]
-
-    # overall best score at each position
-    result_score: List[List[float]] = [
-        [0 for _ in range(haystack_len)] for _ in range(needle_len)
-    ]
-
-    for i in range(needle_len):
-        prev_score = SCORE_MIN
-
-        # gap between matching char
-        # more gaps, less score
-        gap_score = SCORE_GAP_TRAILING if i == needle_len - 1 else SCORE_GAP_INNER
-
-        for j in range(haystack_len):
-            if needle[i] == haystack[j]:
-                score = SCORE_MIN
-                if i == 0:
-                    score = j * SCORE_GAP_LEADING + bonus_score[j]
-                elif j != 0:
-                    score = max(
-                        result_score[i - 1][j - 1] + bonus_score[j],
-                        # consecutive match if value is higher
-                        running_score[i - 1][j - 1] + SCORE_MATCH_CONSECUTIVE,
-                    )
-                running_score[i][j] = score
-                result_score[i][j] = prev_score = max(score, prev_score + gap_score)
-            else:
-                running_score[i][j] = SCORE_MIN
-                # increment the best score with gap_score since no match
-                result_score[i][j] = prev_score = prev_score + gap_score
-
-    # backtrace to find the all indices of optimal matching
-    # starting from the end to pick the first possible match we encounter
-    i, j = needle_len - 1, haystack_len - 1
-    # use to determine if the current match is consequtive match
-    match_required = False
-    indices = [0 for _ in range(needle_len)]
-
-    while i >= 0:
-        while j >= 0:
-            # if the prev score is determined to be consecutive match
-            # then the current position must be a match
-            # e.g. haystack, needle = "auibywcabc", "abc"
-            # using match_required: [7, 8, 9]
-            # without match_required: [0, 8, 9]
-            if (
-                match_required or running_score[i][j] == result_score[i][j]
-            ) and running_score[i][j] != SCORE_MIN:
-                match_required = (
-                    i > 0
-                    and j > 0
-                    and result_score[i][j]
-                    == running_score[i - 1][j - 1] + SCORE_MATCH_CONSECUTIVE
-                )
-                indices[i] = j
-                j -= 1
-                break
-            else:
-                j -= 1
-        i -= 1
-
-    return result_score[needle_len - 1][haystack_len - 1], indices
-
-
-def _subsequence(needle: str, haystack: str) -> bool:
-    """Check if needle is subsequence of haystack.
-
-    Args:
-        needle: Substring to find in haystack.
-        haystack: String to be searched and scored.
-
-    Returns:
-        Boolean indicating if `needle` is subsequence of `haystack`.
-
-    Examples:
-        >>> _subsequence("as", "bbwi")
-        False
-        >>> _subsequence("as", "bbaiws")
-        True
-        >>> _subsequence("sa", "bbaiws")
-        False
-    """
-    needle, haystack = needle.lower(), haystack.lower()
-    if not needle:
-        return True
-    offset = 0
-    for char in needle:
-        offset = haystack.find(char, offset) + 1
-        if offset <= 0:
-            return False
-    return True
-
-
-def fzy_scorer(needle: str, haystack: str) -> SCORE_INDICES:
-    """Use fzy matching algorithem to match needle against haystack.
-
-    Note:
-        The `fzf` unordered search is not supported for performance concern.
-        When the provided `needle` is not a subsequence of `haystack` at all,
-        then `(-inf, None)` is returned.
-
-    See Also:
-        https://github.com/jhawthorn/fzy/blob/master/src/match.c
-
-    Args:
-        needle: Substring to find in haystack.
-        haystack: String to be searched and scored against.
-
-    Returns:
-        A tuple of matching score with a list of matching indices.
-
-    Examples:
-        >>> fzy_scorer("ab", "acb")
-        (0.89, [0, 2])
-        >>> fzy_scorer("ab", "acbabc")
-        (0.98, [3, 4])
-        >>> fzy_scorer("ab", "wc")
-        (-inf, None)
-    """
-    if _subsequence(needle, haystack):
-        return _score(needle, haystack)
-    else:
-        return SCORE_MIN, None
-
-
-def substr_scorer(needle: str, haystack: str) -> SCORE_INDICES:
-    """Match needle against haystack using :meth:`str.find`.
-
-    Note:
-        Scores may be negative but the higher the score, the higher
-        the match rank. `-inf` score means no match found.
-
-    See Also:
-        https://github.com/aslpavel/sweep.py/blob/3f4a179b708059c12b9e5d76d1eb3c70bf2caadc/sweep.py#L837
-
-    Args:
-        needle: Substring to find in haystack.
-        haystack: String to be searched and scored against.
-
-    Returns:
-        A tuple of matching score with a list of matching indices.
-
-    Example:
-        >>> substr_scorer("ab", "awsab")
-        (-1.3, [3, 4])
-        >>> substr_scorer("ab", "abc")
-        (0.5, [0, 1])
-        >>> substr_scorer("ab", "iop")
-        (-inf, None)
-        >>> substr_scorer("ab", "asdafswabc")
-        (-1.6388888888888888, [7, 8])
-        >>> substr_scorer(" ", "asdf")
-        (0, [])
-    """
-    indices = []
-    offset = 0
-    needle, haystack = needle.lower(), haystack.lower()
-
-    for needle in needle.split(" "):
-        if not needle:
-            continue
-        offset = haystack.find(needle, offset)
-        if offset < 0:
-            return SCORE_MIN, None
-        needle_len = len(needle)
-        indices.extend(range(offset, offset + needle_len))
-        offset += needle_len
-
-    if not indices:
-        return 0, indices
-
-    return (
-        -(indices[-1] + 1 - indices[0]) + 2 / (indices[0] + 1) + 1 / (indices[-1] + 1),
-        indices,
-    )
diff --git a/voxvera/vendor/pfzy/types.py b/voxvera/vendor/pfzy/types.py
deleted file mode 100644
index ce3d25d..0000000
--- a/voxvera/vendor/pfzy/types.py
+++ /dev/null
@@ -1,5 +0,0 @@
-"""Module contains typing aliases."""
-from typing import Any, Dict, List, Optional, Tuple, Union
-
-SCORE_INDICES = Tuple[float, Optional[List[int]]]
-HAYSTACKS = List[Union[str, Dict[str, Any]]]
diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/INSTALLER b/voxvera/vendor/pillow-12.1.1.dist-info/INSTALLER
deleted file mode 100644
index a1b589e..0000000
--- a/voxvera/vendor/pillow-12.1.1.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-pip
diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/METADATA b/voxvera/vendor/pillow-12.1.1.dist-info/METADATA
deleted file mode 100644
index f205f0d..0000000
--- a/voxvera/vendor/pillow-12.1.1.dist-info/METADATA
+++ /dev/null
@@ -1,175 +0,0 @@
-Metadata-Version: 2.4
-Name: pillow
-Version: 12.1.1
-Summary: Python Imaging Library (fork)
-Author-email: "Jeffrey A. Clark" 
-License-Expression: MIT-CMU
-Project-URL: Changelog, https://github.com/python-pillow/Pillow/releases
-Project-URL: Documentation, https://pillow.readthedocs.io
-Project-URL: Funding, https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi
-Project-URL: Homepage, https://python-pillow.github.io
-Project-URL: Mastodon, https://fosstodon.org/@pillow
-Project-URL: Release notes, https://pillow.readthedocs.io/en/stable/releasenotes/index.html
-Project-URL: Source, https://github.com/python-pillow/Pillow
-Keywords: Imaging
-Classifier: Development Status :: 6 - Mature
-Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.10
-Classifier: Programming Language :: Python :: 3.11
-Classifier: Programming Language :: Python :: 3.12
-Classifier: Programming Language :: Python :: 3.13
-Classifier: Programming Language :: Python :: 3.14
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Multimedia :: Graphics
-Classifier: Topic :: Multimedia :: Graphics :: Capture :: Digital Camera
-Classifier: Topic :: Multimedia :: Graphics :: Capture :: Screen Capture
-Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
-Classifier: Topic :: Multimedia :: Graphics :: Viewers
-Classifier: Typing :: Typed
-Requires-Python: >=3.10
-Description-Content-Type: text/markdown
-License-File: LICENSE
-Provides-Extra: docs
-Requires-Dist: furo; extra == "docs"
-Requires-Dist: olefile; extra == "docs"
-Requires-Dist: sphinx>=8.2; extra == "docs"
-Requires-Dist: sphinx-autobuild; extra == "docs"
-Requires-Dist: sphinx-copybutton; extra == "docs"
-Requires-Dist: sphinx-inline-tabs; extra == "docs"
-Requires-Dist: sphinxext-opengraph; extra == "docs"
-Provides-Extra: fpx
-Requires-Dist: olefile; extra == "fpx"
-Provides-Extra: mic
-Requires-Dist: olefile; extra == "mic"
-Provides-Extra: test-arrow
-Requires-Dist: arro3-compute; extra == "test-arrow"
-Requires-Dist: arro3-core; extra == "test-arrow"
-Requires-Dist: nanoarrow; extra == "test-arrow"
-Requires-Dist: pyarrow; extra == "test-arrow"
-Provides-Extra: tests
-Requires-Dist: check-manifest; extra == "tests"
-Requires-Dist: coverage>=7.4.2; extra == "tests"
-Requires-Dist: defusedxml; extra == "tests"
-Requires-Dist: markdown2; extra == "tests"
-Requires-Dist: olefile; extra == "tests"
-Requires-Dist: packaging; extra == "tests"
-Requires-Dist: pyroma>=5; extra == "tests"
-Requires-Dist: pytest; extra == "tests"
-Requires-Dist: pytest-cov; extra == "tests"
-Requires-Dist: pytest-timeout; extra == "tests"
-Requires-Dist: pytest-xdist; extra == "tests"
-Requires-Dist: trove-classifiers>=2024.10.12; extra == "tests"
-Provides-Extra: xmp
-Requires-Dist: defusedxml; extra == "xmp"
-Dynamic: license-file
-
-

- Pillow logo -

- -# Pillow - -## Python Imaging Library (Fork) - -Pillow is the friendly PIL fork by [Jeffrey A. Clark and -contributors](https://github.com/python-pillow/Pillow/graphs/contributors). -PIL is the Python Imaging Library by Fredrik Lundh and contributors. -As of 2019, Pillow development is -[supported by Tidelift](https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=readme&utm_campaign=enterprise). - - - - - - - - - - - - - - - - - - -
docs - Documentation Status -
tests - GitHub Actions build status (Lint) - GitHub Actions build status (Test Linux and macOS) - GitHub Actions build status (Test Windows) - GitHub Actions build status (Test MinGW) - GitHub Actions build status (Test Docker) - GitHub Actions build status (Wheels) - Code coverage - Fuzzing Status -
package - Zenodo - Tidelift - Newest PyPI version - Number of PyPI downloads - OpenSSF Best Practices -
social - Join the chat at https://gitter.im/python-pillow/Pillow - Follow on https://fosstodon.org/@pillow -
- -## Overview - -The Python Imaging Library adds image processing capabilities to your Python interpreter. - -This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities. - -The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool. - -## More information - -- [Documentation](https://pillow.readthedocs.io/) - - [Installation](https://pillow.readthedocs.io/en/latest/installation/basic-installation.html) - - [Handbook](https://pillow.readthedocs.io/en/latest/handbook/index.html) -- [Contribute](https://github.com/python-pillow/Pillow/blob/main/.github/CONTRIBUTING.md) - - [Issues](https://github.com/python-pillow/Pillow/issues) - - [Pull requests](https://github.com/python-pillow/Pillow/pulls) -- [Release notes](https://pillow.readthedocs.io/en/stable/releasenotes/index.html) -- [Changelog](https://github.com/python-pillow/Pillow/releases) - - [Pre-fork](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst#pre-fork) - -## Report a vulnerability - -To report a security vulnerability, please follow the procedure described in the [Tidelift security policy](https://tidelift.com/docs/security). diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/RECORD b/voxvera/vendor/pillow-12.1.1.dist-info/RECORD deleted file mode 100644 index b4ab7be..0000000 --- a/voxvera/vendor/pillow-12.1.1.dist-info/RECORD +++ /dev/null @@ -1,141 +0,0 @@ -PIL/AvifImagePlugin.py,sha256=sHaYxONtVEDZ24y8Ad7qRlixD4iIPC2ipH1W79-uPbE,9030 -PIL/BdfFontFile.py,sha256=PhlZfIRmEfmorbhZZeSM5eebGo1Ei7fL-lR9XlfTZZA,3285 -PIL/BlpImagePlugin.py,sha256=tQxeJbpiyvp3-zSLjeWAQr8YdLS_HoKWmuLDQwRQl4w,16568 -PIL/BmpImagePlugin.py,sha256=64PB3YE8kEL8QrAuUMlWoEaByYJUTYV6OQA254Uj4Lc,19925 -PIL/BufrStubImagePlugin.py,sha256=gMbELNwEghE_IM2Ov1NT4jy-96CTpEvyuj_mXmckL-c,1765 -PIL/ContainerIO.py,sha256=wkBqL2GDAb5fh3wrtfTGUfqioJipCl-lg2GxbjQrTZw,4604 -PIL/CurImagePlugin.py,sha256=-WEsgwQbA9rQzXB0HG0LK1V_qbuwHosPZ0T2IjfN8r0,1791 -PIL/DcxImagePlugin.py,sha256=OlCv6yDI0LLZNbuUI7s69FI1DuArPyGxo3YCzQ1n8Hg,2180 -PIL/DdsImagePlugin.py,sha256=JRhDGFhKXvolAiD_X4_nYQ3DARogu2hmE2AhZuGc02Q,18931 -PIL/EpsImagePlugin.py,sha256=jnT9Y01VEOdnU0Q3ZncyeTM81WYPpPABXT2BOgKW-mY,16626 -PIL/ExifTags.py,sha256=zW6kVikCosiyoCo7J7R62evD3hoxjKPchnVh8po7CZc,9931 -PIL/FitsImagePlugin.py,sha256=-oDJnAH113CK5qPvwz9lL81fkV1gla_tNfqLcq8zKgo,4644 -PIL/FliImagePlugin.py,sha256=4zxH8IXBX9DGi6dJRM6Y5NMdbA1d99x696mcGZHxHzI,4929 -PIL/FontFile.py,sha256=St7MxO5Q-oakCLWn3ZrgrtaT3wSsmAarxm8AU-G8Moc,3577 -PIL/FpxImagePlugin.py,sha256=NnHQj6Ze1LUXqIOi7WHCKBEBftAkJZJJ1quHEpZaE14,7363 -PIL/FtexImagePlugin.py,sha256=ZS0WqBHtItNoi0W52A4REOGrDIfh40dCGDLruaXLRFE,3570 -PIL/GbrImagePlugin.py,sha256=DYyvhekFB1sOQLEWPwYbf0CEfGdgdax1ci-3DuSeIgQ,3053 -PIL/GdImageFile.py,sha256=LP4Uxv3Y2ivGZIyOVuGJarDDVS7zK6F1Q6SNl4wyGuQ,2788 -PIL/GifImagePlugin.py,sha256=Bu5YTg7YwLgJIxcE0RiDGHIGTApmGZxXvWQn0dPs674,42304 -PIL/GimpGradientFile.py,sha256=gqqUkDbKVFCtBxt5VAhPS0HtLZDYFI6KWEaUhhTNNE8,3982 -PIL/GimpPaletteFile.py,sha256=hIHQ9LJ5ri0hy1e_vZYeD-n67UWdhEDlKc4vDxgaUdg,1860 -PIL/GribStubImagePlugin.py,sha256=C9YNx1hxBgYvRFzcs1ZG-srEG_3A3DIWBgk1j-nbl8I,1794 -PIL/Hdf5StubImagePlugin.py,sha256=4JirZFt94qjH73NsWJi83OP-cEUMKDTsIhWKrdNGvuc,1776 -PIL/IcnsImagePlugin.py,sha256=l3JdNkYQVAMeiGpK_tem2vtDD11KtAJ64wQGsA0E-JQ,12440 -PIL/IcoImagePlugin.py,sha256=UGzIDlQ02ZB-VJEsoyI7YWmTx26ZiB2EHJZ1qvB28JQ,13103 -PIL/ImImagePlugin.py,sha256=8sBOAy7xlqP722sXWhnJn4VoBhTBzbZQTtfW_XsWefU,11602 -PIL/Image.py,sha256=Pl7NzD6IAHSZAeYcgQi9PEkGPTukRPoLYrDBivAiAH8,148899 -PIL/ImageChops.py,sha256=GEjlymcoDtA5OOeIxQVIX96BD-s6AXhb7TmSLYn2tUg,7946 -PIL/ImageCms.py,sha256=IuCm3gXKpb5Eu1kn-TB8cD9XJLZEa8fpkEjzVqAIKNk,40676 -PIL/ImageColor.py,sha256=IGA9C2umeED_EzS2Cvj6KsU0VutC9RstWIYPe8uDsVk,9441 -PIL/ImageDraw.py,sha256=FMn0AK_gxxJBYB8afOGF2FUP2KJPFvUf3UZp_KrJz7A,36287 -PIL/ImageDraw2.py,sha256=pdVMW7bVw3KwhXvRZh28Md4y-2xFfuo5fHcDnaYqVK4,7227 -PIL/ImageEnhance.py,sha256=4Elhz_lyyxLmx0GkSHrwOAmNJ2TkqVQPHejzGihZUMI,3627 -PIL/ImageFile.py,sha256=W5_QULZWeY7Kqz04cLujVu0kSBnKZu7liLCCqoXO-GM,29972 -PIL/ImageFilter.py,sha256=MO1MBrbXDiX2IAGESdGm_0087bwmSZ_14ecAj28ojCY,18729 -PIL/ImageFont.py,sha256=tsIwpnCjWl57_sMcAFTt84Ikpf14EPrW8_IJ9XQ7z7E,63253 -PIL/ImageGrab.py,sha256=oaeBn7UHjtxKPXJ9OSXPUt3cG1I0j-4yesbfvh0p_TY,7750 -PIL/ImageMath.py,sha256=RQl6cRXGuszba4KwtbIudin_8U65shpWrajr9gTn1rw,10369 -PIL/ImageMode.py,sha256=aaZVHAiCEanOA2K1jN3DlW3NPKa8Dm5nIXTXErzyFms,2395 -PIL/ImageMorph.py,sha256=otf5f9A-Y4Aosfl1E4YWEVatgDBInGp6xWBJfAJ0NRs,10356 -PIL/ImageOps.py,sha256=bIcQFK_MtovfNSYTcOesp4So9OgsGrwt3cGsB7xlGRM,25567 -PIL/ImagePalette.py,sha256=uPP_qWWSTWitlv4WdXucZF4n-2ZNsHjg4H36g-JpuxU,9092 -PIL/ImagePath.py,sha256=5yUG5XCUil1KKTTA_8PgGhcmg-mnue-GK0FwTBlhjw4,371 -PIL/ImageQt.py,sha256=PTt5TPyngWL-Vuvx_bwnH17EOBe3tE7l4huVmvGQP5Y,6684 -PIL/ImageSequence.py,sha256=Mphgkr79scmYBgmi9ZguhDfVwHvpLSX5uZVHDZlrn0I,2253 -PIL/ImageShow.py,sha256=Ju0_Db2B4_n3yKJV9sDsF7_HAgciEdXlq6I1Eiw1YTo,10106 -PIL/ImageStat.py,sha256=FVTiYWGCciPW1QD61b7DYZlcDqR0dS6hsLjq-gcKcG4,5495 -PIL/ImageText.py,sha256=E3EEmIlP1FG-zgy9YddETN1HKSIXaRJSrPJIC67aAxY,12120 -PIL/ImageTk.py,sha256=b5SntckGXs0ECsI2MmdJg3CSX6AtELsWh0Ohxu41u_k,8132 -PIL/ImageTransform.py,sha256=-qek7P3lzLddcXt9cWt5w_L11JGp2yY3AJtOfmJAkDc,3916 -PIL/ImageWin.py,sha256=LT05w8_vTfRrC3n9S9pM0TNbXrzZLEJHlCJil7Xv80k,8085 -PIL/ImtImagePlugin.py,sha256=SL5IrsHcblltxtX4v_HVFhYnR6haJ0AOd2NHhZKMImY,2665 -PIL/IptcImagePlugin.py,sha256=AV5HTo7kHo20IuF1rd4OhQcbf3wt1rbRPwpI3cK0xw4,6579 -PIL/Jpeg2KImagePlugin.py,sha256=DugpqlY-L54ZSbOOr1mux_fT1APy73e9715NQx_zL9E,14002 -PIL/JpegImagePlugin.py,sha256=kWLRMNTVrfcHaIpZpcLsaLtxaefrenWdILZWwZfYEZ8,31543 -PIL/JpegPresets.py,sha256=lnqWHo4DLIHIulcdHp0NJ7CWexHt8T3w51kIKlLfkIA,12379 -PIL/McIdasImagePlugin.py,sha256=baOIkD-CIIeCgBFTf8kos928PKBuCUqYYa38u3WES_8,1877 -PIL/MicImagePlugin.py,sha256=j91UizvL-zgXZgOcq_4oWBbSX6LPq1J9kNHkdITM1Qw,2599 -PIL/MpegImagePlugin.py,sha256=g7BZd93kWpFi41SG_wKFoi0yEPsioI4kj45b2F-3Vrw,2010 -PIL/MpoImagePlugin.py,sha256=xRCA2R2lSpT76pqDiQX0Es0yyaHj5d4gdN26eV7aInU,6792 -PIL/MspImagePlugin.py,sha256=oxk_MLUDvzJ4JDuOZCHkmqOPXniG42PHOyNGwe60slY,5892 -PIL/PSDraw.py,sha256=KMBGj3vXaFpblaIcA9KjFFTpdal41AQggY-UgzqoMkQ,6918 -PIL/PaletteFile.py,sha256=suDdAL6VMljXw4oEn1vhTt4DQ4vbpIHGd3A4oxOgE6s,1216 -PIL/PalmImagePlugin.py,sha256=WJ1b8I1xTSAXYDJhIpkVFCLu2LlpbiBD5d1Hr-m2l08,8748 -PIL/PcdImagePlugin.py,sha256=-gnMUqQH0R-aljsd3nZS9eBI1j75ijWD_HZfadE3RsQ,1774 -PIL/PcfFontFile.py,sha256=DqcyydQgP2vtiPFzj57KYHLuF2v-0oMTB-VkgYYHKhE,7223 -PIL/PcxImagePlugin.py,sha256=1xAq6CdH34cOsOgTPi4Wu2SKQCdQiTLVyqaMkYQZUP4,6245 -PIL/PdfImagePlugin.py,sha256=6lZLoQMVbAE-x1ESrv6PgGSyM9Ueck7e6E6ps-YQ-vI,9321 -PIL/PdfParser.py,sha256=Hr3ImLDSIKwUF6OrQ1GjlAnGi6ZpGVLWhGfKhqQ_DRM,37996 -PIL/PixarImagePlugin.py,sha256=l_4GwBd0mATnIXYJbwmmODU2vP7wewLu6BRviHCB2EI,1758 -PIL/PngImagePlugin.py,sha256=XaVZDKJIf37Cp9tSZr74kYWFTVfV5PYZ9Qeo8pVbeqo,51721 -PIL/PpmImagePlugin.py,sha256=vb5SP0IjQPzDRDE8jSPtcJv9K3Rh1LczAlt0Pg26i90,12391 -PIL/PsdImagePlugin.py,sha256=Dxyb0AwhIk7ngpuOluaJz3HtlQtSUmylLJao9CPiCII,8720 -PIL/QoiImagePlugin.py,sha256=o3IJbJYiG6Qz_evDAixeTferNaXOA7Rf0TsoNQeFaZ4,8607 -PIL/SgiImagePlugin.py,sha256=3Ql89s8vycNWjcxJwMw28iksV9Yj2xWoKBQ6c5DHXBg,6389 -PIL/SpiderImagePlugin.py,sha256=etb3Q-rKGtBg_rrVmBfh-poM2AODqibtA3yq5zoUTSc,10306 -PIL/SunImagePlugin.py,sha256=Hdxkhk0pxpBGxYhPJfCDLwsYcO1KjxjtplNMFYibIvk,4589 -PIL/TarIO.py,sha256=BqYUChCBb9F7Sh-uZ86iz1Dtoy2D0obNwGm65z1rdc0,1442 -PIL/TgaImagePlugin.py,sha256=2vDsFTcBUBHw1V80wpVv4tgpLDbPr6yVHi6Fvaqf0HY,6980 -PIL/TiffImagePlugin.py,sha256=cIQ48x3zmm5PFSG01wqweC8DJUhJxrX1R62c8Edw1Jg,85002 -PIL/TiffTags.py,sha256=dm3qNQQkuaLKqzUTvnlGiUA8K3IizQOABvac_wjttF0,17206 -PIL/WalImageFile.py,sha256=P6Ue6JZGAwBKE-JAIUP-oHCC4MPPc2jyqOScnAEKK3Y,5761 -PIL/WebPImagePlugin.py,sha256=fCHqpMBM5CV2pr26GzLEuBm7V58Q_Z9YJ-9zxc2jA4M,9854 -PIL/WmfImagePlugin.py,sha256=B2pMdJxRildCITQdb4XNAJXEwjitr2ZZVKVl2c-G1xY,5316 -PIL/XVThumbImagePlugin.py,sha256=XghmnRm8Y_8j0O28XPbHRrmK7CrGVuR844gv1hfF5ug,2126 -PIL/XbmImagePlugin.py,sha256=Fd6GVDEo73nyFICA3Z3w4LjkwoZWvhHB6rKCm5yVrho,2669 -PIL/XpmImagePlugin.py,sha256=jtUKavJCYwIAsJaJwSx8vJsx1oTbCywfDxePENmA93w,4400 -PIL/__init__.py,sha256=Q4KOEpR7S_Xsj30fvOsvR94xEpX4KUsVeUwaVP1fU80,2031 -PIL/__main__.py,sha256=Lpj4vef8mI7jA1sRCUAoVYaeePD_Uc898xF5c7XLx1A,133 -PIL/_avif.cpython-312-x86_64-linux-gnu.so,sha256=yRNgSy1InaliqpKaMpMB9kHUhxRQbzzTpnlR2l6oEQ0,87889 -PIL/_avif.pyi,sha256=3fBxcSppJr6EOEcUojvflG3Eegg7lv2Qp0dNQQILrP4,63 -PIL/_binary.py,sha256=pcM6AL04GxgmGeLfcH1V1BZHENwIrQH0uxhJ7r0HIL0,2550 -PIL/_deprecate.py,sha256=KhyLVmQYVVww0rORbU24Te3t8fOt9G2LeM6fJGWbl0o,2034 -PIL/_imaging.cpython-312-x86_64-linux-gnu.so,sha256=mySw-Q9iDm6IgugjkIH-JEzU348mpd93cwSeTYd3kog,3357545 -PIL/_imaging.pyi,sha256=fT-TTGQS0kym1gv77gXTKQtJrAmO1NynS5LKBtG3G6M,893 -PIL/_imagingcms.cpython-312-x86_64-linux-gnu.so,sha256=7McplYI5qWt3rMmA8Cv35YGQ1yzlIreG8KdRzvBgiDY,157841 -PIL/_imagingcms.pyi,sha256=ZZ8iIoi6EHWLvgAdfm1hPD5CQmxi75LiJl5x8yGxYoU,4433 -PIL/_imagingft.cpython-312-x86_64-linux-gnu.so,sha256=2Hwh6PkylrG_moiTQHO9HxD5SeNRzrfJTrKo-kDtDds,322977 -PIL/_imagingft.pyi,sha256=cYySzvcKBCiHPBsvttMie9AdfUcEsqZR-3256YQtz2Q,1833 -PIL/_imagingmath.cpython-312-x86_64-linux-gnu.so,sha256=vn7EvKt8b6fEk0cA-j8OmBVnhCC-a2IaWIFKB-58Dbo,167536 -PIL/_imagingmath.pyi,sha256=3fBxcSppJr6EOEcUojvflG3Eegg7lv2Qp0dNQQILrP4,63 -PIL/_imagingmorph.cpython-312-x86_64-linux-gnu.so,sha256=CM4oTAEjGiUXu6TWMCA5kM_hJQEONl-KVvcQ6umrod0,37040 -PIL/_imagingmorph.pyi,sha256=3fBxcSppJr6EOEcUojvflG3Eegg7lv2Qp0dNQQILrP4,63 -PIL/_imagingtk.cpython-312-x86_64-linux-gnu.so,sha256=lYneIS1JCAqNQd0cjp-B4fXn3cId7RMzdUc4ORcEyJE,47000 -PIL/_imagingtk.pyi,sha256=3fBxcSppJr6EOEcUojvflG3Eegg7lv2Qp0dNQQILrP4,63 -PIL/_tkinter_finder.py,sha256=GIZ4stmFhUosmHKSrdxcjStiocDNfyJn7RBie2SWxU0,538 -PIL/_typing.py,sha256=2z33ZUp9aQnkSqXzNR3Zn7l04d2W-oAj1OiZhiyFF68,919 -PIL/_util.py,sha256=fxhWdrLARyc2PsMgN3m9_U1dY3oUKbV7mkoHcXgoeeA,684 -PIL/_version.py,sha256=28QchbjtLhowcIycQ-2YvK356_LZtiCuh-r1ELBCsEQ,87 -PIL/_webp.cpython-312-x86_64-linux-gnu.so,sha256=cOm91PbOITaPei2DOEswpa6UxpEj1cxiL4sVwSeL-z4,108849 -PIL/_webp.pyi,sha256=3fBxcSppJr6EOEcUojvflG3Eegg7lv2Qp0dNQQILrP4,63 -PIL/features.py,sha256=FPkEhjtBaRSqpkgHNYduwxiFtycu4NjZKwEMWxtemPU,10775 -PIL/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -PIL/report.py,sha256=4JY6-IU7sH1RKuRbOvy1fUt0dAoi79FX4tYJN3p1DT0,100 -pillow-12.1.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pillow-12.1.1.dist-info/METADATA,sha256=F_8fLSrbwe5hjpfxSagcqvTDKT1aaHIntiiRmecPLRc,8808 -pillow-12.1.1.dist-info/RECORD,, -pillow-12.1.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -pillow-12.1.1.dist-info/WHEEL,sha256=B-GgFgvGtVF47hnlOJerBPFwnKuDqzU8LJacPThYwiA,152 -pillow-12.1.1.dist-info/licenses/LICENSE,sha256=MBeL96_5-NyCr-01CGzTeKkGTnf8tDgEhfOLXaM3cFI,68061 -pillow-12.1.1.dist-info/sboms/auditwheel.cdx.json,sha256=x7_fT0kZa1lFqoThoUYRe8ADJUO90lHQHwjHFPSaFxo,1358 -pillow-12.1.1.dist-info/top_level.txt,sha256=riZqrk-hyZqh5f1Z0Zwii3dKfxEsByhu9cU9IODF-NY,4 -pillow-12.1.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1 -pillow.libs/libXau-154567c4.so.6.0.0,sha256=BUhNJL94y47QMWnxywZyBNgpy3ryHeiCBADSnRFeQyA,22081 -pillow.libs/libavif-01e67780.so.16.3.0,sha256=xCXlA8_rggzsCA_EsWKFzgqPBmT1ihpZCo3iMyvD1P0,5142057 -pillow.libs/libbrotlicommon-c55a5f7a.so.1.2.0,sha256=KRd3RkM3AIqxjtuqeOUvrXmS2ThJ7qT9_g5ML8pRfI8,144425 -pillow.libs/libbrotlidec-b57ddf63.so.1.2.0,sha256=ZBDWekS9g0GRgRJS3t6vIAZioIC1lqQfinrBbT1Ml4E,62337 -pillow.libs/libfreetype-ee1c40c4.so.6.20.4,sha256=NT-L0LUGjsSLzTo-_0Cd-Vkpkfa9n8nrrqMm-Ynk-Ao,1463609 -pillow.libs/libharfbuzz-0692f733.so.0.61230.0,sha256=Vk9HU3ouaHMJ_VFtuhDv4EfRq6R6XjzSAWKmz2_nyd0,932841 -pillow.libs/libjpeg-32d42e18.so.62.4.0,sha256=3r2uOqv4njme2QvkzdwjpbvKejrTyOIQTLz-R4IDDDM,836273 -pillow.libs/liblcms2-cc10e42f.so.2.0.17,sha256=5JMjEDVKMwxcinhbQl6qhRLaezAiQFYEPSz-KultHe0,519073 -pillow.libs/liblzma-61b1002e.so.5.8.2,sha256=8WWs0fVFL4eJdo0YS7JQyClvQogXEpZnYmtcAdbKBZQ,266369 -pillow.libs/libopenjp2-94e588ba.so.2.5.4,sha256=5ye2mwzPYSo447VzscBGO_ZWXyBgFEPFRY45hlXLIw0,585849 -pillow.libs/libpng16-4a38ea05.so.16.53.0,sha256=3RgdzzWJ0lAiCEDXTJb6VOVy_Uz2uIEJz3iBrd-l6l8,278001 -pillow.libs/libsharpyuv-95d8a097.so.0.1.2,sha256=EtR2hzr_XVKswxcXrVFfDixKeUd1TMu56F0oHwH3Els,46113 -pillow.libs/libtiff-295fd75c.so.6.2.0,sha256=stFPC-suZnyQTuaXqP4VvMLYGCSbgyEOhLKFKj0zE1Y,754729 -pillow.libs/libwebp-d8b9687f.so.7.2.0,sha256=k-gbdtoXnzmBItYhvYxdhV11ff08TsQgWSMUUHmMzPs,731209 -pillow.libs/libwebpdemux-747f2b49.so.2.0.17,sha256=jsiJz7rjNfyn9TOqFT2OPydmTYax0iNBCCBQg9st9vw,30217 -pillow.libs/libwebpmux-7f11e5ce.so.3.1.2,sha256=Pes9BQ-MFyCzlQH9n07pWNtt7O0afgVlBsMJ-6kuU_o,58617 -pillow.libs/libxcb-64009ff3.so.1.1.0,sha256=t0N-0WuuesRJgEn9FOENG9HD59FdDl6rHS6tQqg6SdE,251425 -pillow.libs/libzstd-761a17b6.so.1.5.7,sha256=jKEGQObGqZaFbxpkGZX8jzstJVcHhJPh4SShnGgZjB8,1800497 diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/REQUESTED b/voxvera/vendor/pillow-12.1.1.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/WHEEL b/voxvera/vendor/pillow-12.1.1.dist-info/WHEEL deleted file mode 100644 index 7978f30..0000000 --- a/voxvera/vendor/pillow-12.1.1.dist-info/WHEEL +++ /dev/null @@ -1,6 +0,0 @@ -Wheel-Version: 1.0 -Generator: setuptools (82.0.0) -Root-Is-Purelib: false -Tag: cp312-cp312-manylinux_2_27_x86_64 -Tag: cp312-cp312-manylinux_2_28_x86_64 - diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/licenses/LICENSE b/voxvera/vendor/pillow-12.1.1.dist-info/licenses/LICENSE deleted file mode 100644 index a5ad83b..0000000 --- a/voxvera/vendor/pillow-12.1.1.dist-info/licenses/LICENSE +++ /dev/null @@ -1,1523 +0,0 @@ -The Python Imaging Library (PIL) is - - Copyright © 1997-2011 by Secret Labs AB - Copyright © 1995-2011 by Fredrik Lundh and contributors - -Pillow is the friendly PIL fork. It is - - Copyright © 2010 by Jeffrey A. Clark and contributors - -Like PIL, Pillow is licensed under the open source MIT-CMU License: - -By obtaining, using, and/or copying this software and/or its associated -documentation, you agree that you have read, understood, and will comply -with the following terms and conditions: - -Permission to use, copy, modify and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies, and that -both that copyright notice and this permission notice appear in supporting -documentation, and that the name of Secret Labs AB or the author not be -used in advertising or publicity pertaining to distribution of the software -without specific, written prior permission. - -SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, -INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ----- - -AOM - -Copyright (c) 2016, Alliance for Open Media. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - ----- - -BROTLI - -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - ----- - -BZIP2 - - --------------------------------------------------------------------------- - -This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (C) 1996-2019 Julian R Seward. All -rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - -3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - -4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Julian Seward, jseward@acm.org -bzip2/libbzip2 version 1.0.8 of 13 July 2019 - --------------------------------------------------------------------------- - - ----- - -DAV1D - -Copyright © 2018-2019, VideoLAN and dav1d authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ----- - -FREETYPE2 - -The FreeType 2 font engine is copyrighted work and cannot be used -legally without a software license. In order to make this project -usable to a vast majority of developers, we distribute it under two -mutually exclusive open-source licenses. - -This means that *you* must choose *one* of the two licenses described -below, then obey all its terms and conditions when using FreeType 2 in -any of your projects or products. - - - The FreeType License, found in the file `docs/FTL.TXT`, which is - similar to the original BSD license *with* an advertising clause - that forces you to explicitly cite the FreeType project in your - product's documentation. All details are in the license file. - This license is suited to products which don't use the GNU General - Public License. - - Note that this license is compatible to the GNU General Public - License version 3, but not version 2. - - - The GNU General Public License version 2, found in - `docs/GPLv2.TXT` (any later version can be used also), for - programs which already use the GPL. Note that the FTL is - incompatible with GPLv2 due to its advertisement clause. - -The contributed BDF and PCF drivers come with a license similar to -that of the X Window System. It is compatible to the above two -licenses (see files `src/bdf/README` and `src/pcf/README`). The same -holds for the source code files `src/base/fthash.c` and -`include/freetype/internal/fthash.h`; they were part of the BDF driver -in earlier FreeType versions. - -The gzip module uses the zlib license (see `src/gzip/zlib.h`) which -too is compatible to the above two licenses. - -The files `src/autofit/ft-hb.c` and `src/autofit/ft-hb.h` contain code -taken almost verbatim from the HarfBuzz file `hb-ft.cc`, which uses -the 'Old MIT' license, compatible to the above two licenses. - -The MD5 checksum support (only used for debugging in development -builds) is in the public domain. - --------------------------------------------------------------------------- - - The FreeType Project LICENSE - ---------------------------- - - 2006-Jan-27 - - Copyright 1996-2002, 2006 by - David Turner, Robert Wilhelm, and Werner Lemberg - - - -Introduction -============ - - The FreeType Project is distributed in several archive packages; - some of them may contain, in addition to the FreeType font engine, - various tools and contributions which rely on, or relate to, the - FreeType Project. - - This license applies to all files found in such packages, and - which do not fall under their own explicit license. The license - affects thus the FreeType font engine, the test programs, - documentation and makefiles, at the very least. - - This license was inspired by the BSD, Artistic, and IJG - (Independent JPEG Group) licenses, which all encourage inclusion - and use of free software in commercial and freeware products - alike. As a consequence, its main points are that: - - o We don't promise that this software works. However, we will be - interested in any kind of bug reports. (`as is' distribution) - - o You can use this software for whatever you want, in parts or - full form, without having to pay us. (`royalty-free' usage) - - o You may not pretend that you wrote this software. If you use - it, or only parts of it, in a program, you must acknowledge - somewhere in your documentation that you have used the - FreeType code. (`credits') - - We specifically permit and encourage the inclusion of this - software, with or without modifications, in commercial products. - We disclaim all warranties covering The FreeType Project and - assume no liability related to The FreeType Project. - - - Finally, many people asked us for a preferred form for a - credit/disclaimer to use in compliance with this license. We thus - encourage you to use the following text: - - """ - Portions of this software are copyright © The FreeType - Project (www.freetype.org). All rights reserved. - """ - - Please replace with the value from the FreeType version you - actually use. - - -Legal Terms -=========== - -0. Definitions --------------- - - Throughout this license, the terms `package', `FreeType Project', - and `FreeType archive' refer to the set of files originally - distributed by the authors (David Turner, Robert Wilhelm, and - Werner Lemberg) as the `FreeType Project', be they named as alpha, - beta or final release. - - `You' refers to the licensee, or person using the project, where - `using' is a generic term including compiling the project's source - code as well as linking it to form a `program' or `executable'. - This program is referred to as `a program using the FreeType - engine'. - - This license applies to all files distributed in the original - FreeType Project, including all source code, binaries and - documentation, unless otherwise stated in the file in its - original, unmodified form as distributed in the original archive. - If you are unsure whether or not a particular file is covered by - this license, you must contact us to verify this. - - The FreeType Project is copyright (C) 1996-2000 by David Turner, - Robert Wilhelm, and Werner Lemberg. All rights reserved except as - specified below. - -1. No Warranty --------------- - - THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY - KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO - USE, OF THE FREETYPE PROJECT. - -2. Redistribution ------------------ - - This license grants a worldwide, royalty-free, perpetual and - irrevocable right and license to use, execute, perform, compile, - display, copy, create derivative works of, distribute and - sublicense the FreeType Project (in both source and object code - forms) and derivative works thereof for any purpose; and to - authorize others to exercise some or all of the rights granted - herein, subject to the following conditions: - - o Redistribution of source code must retain this license file - (`FTL.TXT') unaltered; any additions, deletions or changes to - the original files must be clearly indicated in accompanying - documentation. The copyright notices of the unaltered, - original files must be preserved in all copies of source - files. - - o Redistribution in binary form must provide a disclaimer that - states that the software is based in part of the work of the - FreeType Team, in the distribution documentation. We also - encourage you to put an URL to the FreeType web page in your - documentation, though this isn't mandatory. - - These conditions apply to any software derived from or based on - the FreeType Project, not just the unmodified files. If you use - our work, you must acknowledge us. However, no fee need be paid - to us. - -3. Advertising --------------- - - Neither the FreeType authors and contributors nor you shall use - the name of the other for commercial, advertising, or promotional - purposes without specific prior written permission. - - We suggest, but do not require, that you use one or more of the - following phrases to refer to this software in your documentation - or advertising materials: `FreeType Project', `FreeType Engine', - `FreeType library', or `FreeType Distribution'. - - As you have not signed this license, you are not required to - accept it. However, as the FreeType Project is copyrighted - material, only this license, or another one contracted with the - authors, grants you the right to use, distribute, and modify it. - Therefore, by using, distributing, or modifying the FreeType - Project, you indicate that you understand and accept all the terms - of this license. - -4. Contacts ------------ - - There are two mailing lists related to FreeType: - - o freetype@nongnu.org - - Discusses general use and applications of FreeType, as well as - future and wanted additions to the library and distribution. - If you are looking for support, start in this list if you - haven't found anything to help you in the documentation. - - o freetype-devel@nongnu.org - - Discusses bugs, as well as engine internals, design issues, - specific licenses, porting, etc. - - Our home page can be found at - - https://www.freetype.org - - ---- end of FTL.TXT --- - -The following license details are part of `src/bdf/README`: - -``` -License -******* - -Copyright (C) 2001-2002 by Francesco Zappa Nardelli - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*** Portions of the driver (that is, bdflib.c and bdf.h): - -Copyright 2000 Computing Research Labs, New Mexico State University -Copyright 2001-2002, 2011 Francesco Zappa Nardelli - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -Credits -******* - -This driver is based on excellent Mark Leisher's bdf library. If you -find something good in this driver you should probably thank him, not -me. -``` - -The following license details are part of `src/pcf/README`: - -``` -License -******* - -Copyright (C) 2000 by Francesco Zappa Nardelli - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -Credits -******* - -Keith Packard wrote the pcf driver found in XFree86. His work is at -the same time the specification and the sample implementation of the -PCF format. Undoubtedly, this driver is inspired from his work. -``` - - ----- - -HARFBUZZ - -HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. -For parts of HarfBuzz that are licensed under different licenses see individual -files names COPYING in subdirectories where applicable. - -Copyright © 2010-2022 Google, Inc. -Copyright © 2015-2020 Ebrahim Byagowi -Copyright © 2019,2020 Facebook, Inc. -Copyright © 2012,2015 Mozilla Foundation -Copyright © 2011 Codethink Limited -Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies) -Copyright © 2009 Keith Stribley -Copyright © 2011 Martin Hosken and SIL International -Copyright © 2007 Chris Wilson -Copyright © 2005,2006,2020,2021,2022,2023 Behdad Esfahbod -Copyright © 2004,2007,2008,2009,2010,2013,2021,2022,2023 Red Hat, Inc. -Copyright © 1998-2005 David Turner and Werner Lemberg -Copyright © 2016 Igalia S.L. -Copyright © 2022 Matthias Clasen -Copyright © 2018,2021 Khaled Hosny -Copyright © 2018,2019,2020 Adobe, Inc -Copyright © 2013-2015 Alexei Podtelezhnikov - -For full copyright notices consult the individual files in the package. - - -Permission is hereby granted, without written agreement and without -license or royalty fees, to use, copy, modify, and distribute this -software and its documentation for any purpose, provided that the -above copyright notice and the following two paragraphs appear in -all copies of this software. - -IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR -DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES -ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN -IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS -ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO -PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - - ----- - -LCMS2 - -Little CMS -Copyright (c) 1998-2020 Marti Maria Saguer - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ----- - -LIBAVIF - -Copyright 2019 Joe Drago. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - -Files: src/obu.c - -Copyright © 2018-2019, VideoLAN and dav1d authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - -Files: third_party/iccjpeg/* - -In plain English: - -1. We don't promise that this software works. (But if you find any bugs, - please let us know!) -2. You can use this software for whatever you want. You don't have to pay us. -3. You may not pretend that you wrote this software. If you use it in a - program, you must acknowledge somewhere in your documentation that - you've used the IJG code. - -In legalese: - -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and you, -its user, assume the entire risk as to its quality and accuracy. - -This software is copyright (C) 1991-2013, Thomas G. Lane, Guido Vollbeding. -All Rights Reserved except as specified below. - -Permission is hereby granted to use, copy, modify, and distribute this -software (or portions thereof) for any purpose, without fee, subject to these -conditions: -(1) If any part of the source code for this software is distributed, then this -README file must be included, with this copyright and no-warranty notice -unaltered; and any additions, deletions, or changes to the original files -must be clearly indicated in accompanying documentation. -(2) If only executable code is distributed, then the accompanying -documentation must state that "this software is based in part on the work of -the Independent JPEG Group". -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept -NO LIABILITY for damages of any kind. - -These conditions apply to any software derived from or based on the IJG code, -not just to the unmodified library. If you use our work, you ought to -acknowledge us. - -Permission is NOT granted for the use of any IJG author's name or company name -in advertising or publicity relating to this software or products derived from -it. This software may be referred to only as "the Independent JPEG Group's -software". - -We specifically permit and encourage the use of this software as the basis of -commercial products, provided that all warranty or liability claims are -assumed by the product vendor. - - -The Unix configuration script "configure" was produced with GNU Autoconf. -It is copyright by the Free Software Foundation but is freely distributable. -The same holds for its supporting scripts (config.guess, config.sub, -ltmain.sh). Another support script, install-sh, is copyright by X Consortium -but is also freely distributable. - -The IJG distribution formerly included code to read and write GIF files. -To avoid entanglement with the Unisys LZW patent, GIF reading support has -been removed altogether, and the GIF writer has been simplified to produce -"uncompressed GIFs". This technique does not use the LZW algorithm; the -resulting GIF files are larger than usual, but are readable by all standard -GIF decoders. - -We are required to state that - "The Graphics Interchange Format(c) is the Copyright property of - CompuServe Incorporated. GIF(sm) is a Service Mark property of - CompuServe Incorporated." - ------------------------------------------------------------------------------- - -Files: contrib/gdk-pixbuf/* - -Copyright 2020 Emmanuel Gil Peyrot. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - -Files: android_jni/gradlew* - - - 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. - ------------------------------------------------------------------------------- - -Files: third_party/libyuv/* - -Copyright 2011 The LibYuv Project Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ----- - -LIBJPEG - -1. We don't promise that this software works. (But if you find any bugs, - please let us know!) -2. You can use this software for whatever you want. You don't have to pay us. -3. You may not pretend that you wrote this software. If you use it in a - program, you must acknowledge somewhere in your documentation that - you've used the IJG code. - -In legalese: - -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and you, -its user, assume the entire risk as to its quality and accuracy. - -This software is copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding. -All Rights Reserved except as specified below. - -Permission is hereby granted to use, copy, modify, and distribute this -software (or portions thereof) for any purpose, without fee, subject to these -conditions: -(1) If any part of the source code for this software is distributed, then this -README file must be included, with this copyright and no-warranty notice -unaltered; and any additions, deletions, or changes to the original files -must be clearly indicated in accompanying documentation. -(2) If only executable code is distributed, then the accompanying -documentation must state that "this software is based in part on the work of -the Independent JPEG Group". -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept -NO LIABILITY for damages of any kind. - -These conditions apply to any software derived from or based on the IJG code, -not just to the unmodified library. If you use our work, you ought to -acknowledge us. - -Permission is NOT granted for the use of any IJG author's name or company name -in advertising or publicity relating to this software or products derived from -it. This software may be referred to only as "the Independent JPEG Group's -software". - -We specifically permit and encourage the use of this software as the basis of -commercial products, provided that all warranty or liability claims are -assumed by the product vendor. - - ----- - -LIBLZMA - -XZ Utils Licensing -================== - - Different licenses apply to different files in this package. Here - is a rough summary of which licenses apply to which parts of this - package (but check the individual files to be sure!): - - - liblzma is in the public domain. - - - xz, xzdec, and lzmadec command line tools are in the public - domain unless GNU getopt_long had to be compiled and linked - in from the lib directory. The getopt_long code is under - GNU LGPLv2.1+. - - - The scripts to grep, diff, and view compressed files have been - adapted from gzip. These scripts and their documentation are - under GNU GPLv2+. - - - All the documentation in the doc directory and most of the - XZ Utils specific documentation files in other directories - are in the public domain. - - - Translated messages are in the public domain. - - - The build system contains public domain files, and files that - are under GNU GPLv2+ or GNU GPLv3+. None of these files end up - in the binaries being built. - - - Test files and test code in the tests directory, and debugging - utilities in the debug directory are in the public domain. - - - The extra directory may contain public domain files, and files - that are under various free software licenses. - - You can do whatever you want with the files that have been put into - the public domain. If you find public domain legally problematic, - take the previous sentence as a license grant. If you still find - the lack of copyright legally problematic, you have too many - lawyers. - - As usual, this software is provided "as is", without any warranty. - - If you copy significant amounts of public domain code from XZ Utils - into your project, acknowledging this somewhere in your software is - polite (especially if it is proprietary, non-free software), but - naturally it is not legally required. Here is an example of a good - notice to put into "about box" or into documentation: - - This software includes code from XZ Utils . - - The following license texts are included in the following files: - - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1 - - COPYING.GPLv2: GNU General Public License version 2 - - COPYING.GPLv3: GNU General Public License version 3 - - Note that the toolchain (compiler, linker etc.) may add some code - pieces that are copyrighted. Thus, it is possible that e.g. liblzma - binary wouldn't actually be in the public domain in its entirety - even though it contains no copyrighted code from the XZ Utils source - package. - - If you have questions, don't hesitate to ask the author(s) for more - information. - - ----- - -LIBPNG - -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE -========================================= - -PNG Reference Library License version 2 ---------------------------------------- - - * Copyright (c) 1995-2022 The PNG Reference Library Authors. - * Copyright (c) 2018-2022 Cosmin Truta. - * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. - * Copyright (c) 1996-1997 Andreas Dilger. - * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. - -The software is supplied "as is", without warranty of any kind, -express or implied, including, without limitation, the warranties -of merchantability, fitness for a particular purpose, title, and -non-infringement. In no event shall the Copyright owners, or -anyone distributing the software, be liable for any damages or -other liability, whether in contract, tort or otherwise, arising -from, out of, or in connection with the software, or the use or -other dealings in the software, even if advised of the possibility -of such damage. - -Permission is hereby granted to use, copy, modify, and distribute -this software, or portions hereof, for any purpose, without fee, -subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you - must not claim that you wrote the original software. If you - use this software in a product, an acknowledgment in the product - documentation would be appreciated, but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - - -PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) ------------------------------------------------------------------------ - -libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are -Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are -derived from libpng-1.0.6, and are distributed according to the same -disclaimer and license as libpng-1.0.6 with the following individuals -added to the list of Contributing Authors: - - Simon-Pierre Cadieux - Eric S. Raymond - Mans Rullgard - Cosmin Truta - Gilles Vollant - James Yu - Mandar Sahastrabuddhe - Google Inc. - Vadim Barkov - -and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of - the library or against infringement. There is no warranty that our - efforts or the library will fulfill any of your particular purposes - or needs. This library is provided with all faults, and the entire - risk of satisfactory quality, performance, accuracy, and effort is - with the user. - -Some files in the "contrib" directory and some configure-generated -files that are distributed with libpng have other copyright owners, and -are released under other open source licenses. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from -libpng-0.96, and are distributed according to the same disclaimer and -license as libpng-0.96, with the following individuals added to the -list of Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - -libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, -and are distributed according to the same disclaimer and license as -libpng-0.88, with the following individuals added to the list of -Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - -Some files in the "scripts" directory have other copyright owners, -but are released under this license. - -libpng versions 0.5, May 1995, through 0.88, January 1996, are -Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. - -For the purposes of this copyright and license, "Contributing Authors" -is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - -The PNG Reference Library is supplied "AS IS". The Contributing -Authors and Group 42, Inc. disclaim all warranties, expressed or -implied, including, without limitation, the warranties of -merchantability and of fitness for any purpose. The Contributing -Authors and Group 42, Inc. assume no liability for direct, indirect, -incidental, special, exemplary, or consequential damages, which may -result from the use of the PNG Reference Library, even if advised of -the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - - 2. Altered versions must be plainly marked as such and must not - be misrepresented as being the original source. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, -without fee, and encourage the use of this source code as a component -to supporting the PNG file format in commercial products. If you use -this source code in a product, acknowledgment is not required but would -be appreciated. - - ----- - -LIBTIFF - -Copyright (c) 1988-1997 Sam Leffler -Copyright (c) 1991-1997 Silicon Graphics, Inc. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, provided -that (i) the above copyright notices and this permission notice appear in -all copies of the software and related documentation, and (ii) the names of -Sam Leffler and Silicon Graphics may not be used in any advertising or -publicity relating to the software without the specific, prior written -permission of Sam Leffler and Silicon Graphics. - -THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE. - - ----- - -LIBWEBP - -Copyright (c) 2010, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ----- - -LIBYUV - -Copyright 2011 The LibYuv Project Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ----- - -OPENJPEG - -* - * The copyright in this software is being made available under the 2-clauses - * BSD License, included below. This software may be subject to other third - * party and contributor rights, including patent rights, and no such rights - * are granted under this license. - * - * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2014, Professor Benoit Macq - * Copyright (c) 2003-2014, Antonin Descampe - * Copyright (c) 2003-2009, Francois-Olivier Devaux - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - - ----- - -RAQM - -The MIT License (MIT) - -Copyright © 2015 Information Technology Authority (ITA) -Copyright © 2016 Khaled Hosny - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ----- - -XAU - -Copyright 1988, 1993, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - ----- - -XCB - -Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the authors -or their institutions shall not be used in advertising or -otherwise to promote the sale, use or other dealings in this -Software without prior written authorization from the -authors. - - ----- - -XDMCP - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Keith Packard, MIT X Consortium - - ----- - -ZLIB - - (C) 1995-2017 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* receiving -lengthy legal documents to sign. The sources are provided for free but without -warranty of any kind. The library has been entirely written by Jean-loup -Gailly and Mark Adler; it does not include third-party code. - -If you redistribute modified sources, we would appreciate that you include in -the file ChangeLog history information documenting your changes. Please read -the FAQ for more information on the distribution of modified source versions. - - ----- - -ZSTD - -BSD License - -For Zstandard software - -Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook, nor Meta, nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/sboms/auditwheel.cdx.json b/voxvera/vendor/pillow-12.1.1.dist-info/sboms/auditwheel.cdx.json deleted file mode 100644 index d71690b..0000000 --- a/voxvera/vendor/pillow-12.1.1.dist-info/sboms/auditwheel.cdx.json +++ /dev/null @@ -1 +0,0 @@ -{"bomFormat": "CycloneDX", "specVersion": "1.4", "version": 1, "metadata": {"component": {"type": "library", "bom-ref": "pkg:pypi/pillow@12.1.1?file_name=pillow-12.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", "name": "pillow", "version": "12.1.1", "purl": "pkg:pypi/pillow@12.1.1?file_name=pillow-12.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl"}, "tools": [{"name": "auditwheel", "version": "6.5.0"}]}, "components": [{"type": "library", "bom-ref": "pkg:pypi/pillow@12.1.1?file_name=pillow-12.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", "name": "pillow", "version": "12.1.1", "purl": "pkg:pypi/pillow@12.1.1?file_name=pillow-12.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl"}, {"type": "library", "bom-ref": "pkg:rpm/almalinux/libXau@1.0.9-3.el8#ac77887fa9a50833ff7a34d7e27ebe243468552bc94f6628693cb1dfdaf102e7", "name": "libXau", "version": "1.0.9-3.el8", "purl": "pkg:rpm/almalinux/libXau@1.0.9-3.el8"}], "dependencies": [{"ref": "pkg:pypi/pillow@12.1.1?file_name=pillow-12.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", "dependsOn": ["pkg:rpm/almalinux/libXau@1.0.9-3.el8#ac77887fa9a50833ff7a34d7e27ebe243468552bc94f6628693cb1dfdaf102e7"]}, {"ref": "pkg:rpm/almalinux/libXau@1.0.9-3.el8#ac77887fa9a50833ff7a34d7e27ebe243468552bc94f6628693cb1dfdaf102e7"}]} \ No newline at end of file diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/top_level.txt b/voxvera/vendor/pillow-12.1.1.dist-info/top_level.txt deleted file mode 100644 index b338169..0000000 --- a/voxvera/vendor/pillow-12.1.1.dist-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -PIL diff --git a/voxvera/vendor/pillow-12.1.1.dist-info/zip-safe b/voxvera/vendor/pillow-12.1.1.dist-info/zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/voxvera/vendor/pillow-12.1.1.dist-info/zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/voxvera/vendor/pillow.libs/libXau-154567c4.so.6.0.0 b/voxvera/vendor/pillow.libs/libXau-154567c4.so.6.0.0 deleted file mode 100755 index ff06a58..0000000 Binary files a/voxvera/vendor/pillow.libs/libXau-154567c4.so.6.0.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libavif-01e67780.so.16.3.0 b/voxvera/vendor/pillow.libs/libavif-01e67780.so.16.3.0 deleted file mode 100755 index 121cc08..0000000 Binary files a/voxvera/vendor/pillow.libs/libavif-01e67780.so.16.3.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libbrotlicommon-c55a5f7a.so.1.2.0 b/voxvera/vendor/pillow.libs/libbrotlicommon-c55a5f7a.so.1.2.0 deleted file mode 100755 index cadbea7..0000000 Binary files a/voxvera/vendor/pillow.libs/libbrotlicommon-c55a5f7a.so.1.2.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libbrotlidec-b57ddf63.so.1.2.0 b/voxvera/vendor/pillow.libs/libbrotlidec-b57ddf63.so.1.2.0 deleted file mode 100755 index 90cdef7..0000000 Binary files a/voxvera/vendor/pillow.libs/libbrotlidec-b57ddf63.so.1.2.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libfreetype-ee1c40c4.so.6.20.4 b/voxvera/vendor/pillow.libs/libfreetype-ee1c40c4.so.6.20.4 deleted file mode 100755 index 1c4e607..0000000 Binary files a/voxvera/vendor/pillow.libs/libfreetype-ee1c40c4.so.6.20.4 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libharfbuzz-0692f733.so.0.61230.0 b/voxvera/vendor/pillow.libs/libharfbuzz-0692f733.so.0.61230.0 deleted file mode 100755 index 9474353..0000000 Binary files a/voxvera/vendor/pillow.libs/libharfbuzz-0692f733.so.0.61230.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libjpeg-32d42e18.so.62.4.0 b/voxvera/vendor/pillow.libs/libjpeg-32d42e18.so.62.4.0 deleted file mode 100755 index b9e5165..0000000 Binary files a/voxvera/vendor/pillow.libs/libjpeg-32d42e18.so.62.4.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/liblcms2-cc10e42f.so.2.0.17 b/voxvera/vendor/pillow.libs/liblcms2-cc10e42f.so.2.0.17 deleted file mode 100755 index b71aff4..0000000 Binary files a/voxvera/vendor/pillow.libs/liblcms2-cc10e42f.so.2.0.17 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/liblzma-61b1002e.so.5.8.2 b/voxvera/vendor/pillow.libs/liblzma-61b1002e.so.5.8.2 deleted file mode 100755 index 8456d99..0000000 Binary files a/voxvera/vendor/pillow.libs/liblzma-61b1002e.so.5.8.2 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libopenjp2-94e588ba.so.2.5.4 b/voxvera/vendor/pillow.libs/libopenjp2-94e588ba.so.2.5.4 deleted file mode 100755 index dd1d919..0000000 Binary files a/voxvera/vendor/pillow.libs/libopenjp2-94e588ba.so.2.5.4 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libpng16-4a38ea05.so.16.53.0 b/voxvera/vendor/pillow.libs/libpng16-4a38ea05.so.16.53.0 deleted file mode 100755 index 62a2460..0000000 Binary files a/voxvera/vendor/pillow.libs/libpng16-4a38ea05.so.16.53.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libsharpyuv-95d8a097.so.0.1.2 b/voxvera/vendor/pillow.libs/libsharpyuv-95d8a097.so.0.1.2 deleted file mode 100755 index 5d17bd4..0000000 Binary files a/voxvera/vendor/pillow.libs/libsharpyuv-95d8a097.so.0.1.2 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libtiff-295fd75c.so.6.2.0 b/voxvera/vendor/pillow.libs/libtiff-295fd75c.so.6.2.0 deleted file mode 100755 index 8fd90d3..0000000 Binary files a/voxvera/vendor/pillow.libs/libtiff-295fd75c.so.6.2.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libwebp-d8b9687f.so.7.2.0 b/voxvera/vendor/pillow.libs/libwebp-d8b9687f.so.7.2.0 deleted file mode 100755 index 3472332..0000000 Binary files a/voxvera/vendor/pillow.libs/libwebp-d8b9687f.so.7.2.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libwebpdemux-747f2b49.so.2.0.17 b/voxvera/vendor/pillow.libs/libwebpdemux-747f2b49.so.2.0.17 deleted file mode 100755 index 7a4f0eb..0000000 Binary files a/voxvera/vendor/pillow.libs/libwebpdemux-747f2b49.so.2.0.17 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libwebpmux-7f11e5ce.so.3.1.2 b/voxvera/vendor/pillow.libs/libwebpmux-7f11e5ce.so.3.1.2 deleted file mode 100755 index cc00128..0000000 Binary files a/voxvera/vendor/pillow.libs/libwebpmux-7f11e5ce.so.3.1.2 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libxcb-64009ff3.so.1.1.0 b/voxvera/vendor/pillow.libs/libxcb-64009ff3.so.1.1.0 deleted file mode 100755 index 44689e1..0000000 Binary files a/voxvera/vendor/pillow.libs/libxcb-64009ff3.so.1.1.0 and /dev/null differ diff --git a/voxvera/vendor/pillow.libs/libzstd-761a17b6.so.1.5.7 b/voxvera/vendor/pillow.libs/libzstd-761a17b6.so.1.5.7 deleted file mode 100755 index 78bb65c..0000000 Binary files a/voxvera/vendor/pillow.libs/libzstd-761a17b6.so.1.5.7 and /dev/null differ diff --git a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/INSTALLER b/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/METADATA b/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/METADATA deleted file mode 100644 index 7fbbd56..0000000 --- a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/METADATA +++ /dev/null @@ -1,172 +0,0 @@ -Metadata-Version: 2.4 -Name: prompt_toolkit -Version: 3.0.52 -Summary: Library for building powerful interactive command lines in Python -Author: Jonathan Slenders -Project-URL: Homepage, https://github.com/prompt-toolkit/python-prompt-toolkit -Project-URL: Documentation, https://python-prompt-toolkit.readthedocs.io/en/stable/ -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: BSD License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: 3.13 -Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python -Classifier: Topic :: Software Development -Requires-Python: >=3.8 -Description-Content-Type: text/x-rst -License-File: LICENSE -License-File: AUTHORS.rst -Requires-Dist: wcwidth -Dynamic: license-file - -Python Prompt Toolkit -===================== - -|AppVeyor| |PyPI| |RTD| |License| |Codecov| - -.. image :: /docs/images/logo_400px.png - -``prompt_toolkit`` *is a library for building powerful interactive command line applications in Python.* - -Read the `documentation on readthedocs -`_. - - -Gallery -******* - -`ptpython `_ is an interactive -Python Shell, build on top of ``prompt_toolkit``. - -.. image :: /docs/images/ptpython.png - -`More examples `_ - - -prompt_toolkit features -*********************** - -``prompt_toolkit`` could be a replacement for `GNU readline -`_, but it can be much -more than that. - -Some features: - -- **Pure Python**. -- Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.) -- Multi-line input editing. -- Advanced code completion. -- Both Emacs and Vi key bindings. (Similar to readline.) -- Even some advanced Vi functionality, like named registers and digraphs. -- Reverse and forward incremental search. -- Works well with Unicode double width characters. (Chinese input.) -- Selecting text for copy/paste. (Both Emacs and Vi style.) -- Support for `bracketed paste `_. -- Mouse support for cursor positioning and scrolling. -- Auto suggestions. (Like `fish shell `_.) -- Multiple input buffers. -- No global state. -- Lightweight, the only dependencies are Pygments and wcwidth. -- Runs on Linux, OS X, FreeBSD, OpenBSD and Windows systems. -- And much more... - -Feel free to create tickets for bugs and feature requests, and create pull -requests if you have nice patches that you would like to share with others. - - -Installation -************ - -:: - - pip install prompt_toolkit - -For Conda, do: - -:: - - conda install -c https://conda.anaconda.org/conda-forge prompt_toolkit - - -About Windows support -********************* - -``prompt_toolkit`` is cross platform, and everything that you build on top -should run fine on both Unix and Windows systems. Windows support is best on -recent Windows 10 builds, for which the command line window supports vt100 -escape sequences. (If not supported, we fall back to using Win32 APIs for color -and cursor movements). - -It's worth noting that the implementation is a "best effort of what is -possible". Both Unix and Windows terminals have their limitations. But in -general, the Unix experience will still be a little better. - - -Getting started -*************** - -The most simple example of the library would look like this: - -.. code:: python - - from prompt_toolkit import prompt - - if __name__ == '__main__': - answer = prompt('Give me some input: ') - print('You said: %s' % answer) - -For more complex examples, have a look in the ``examples`` directory. All -examples are chosen to demonstrate only one thing. Also, don't be afraid to -look at the source code. The implementation of the ``prompt`` function could be -a good start. - -Philosophy -********** - -The source code of ``prompt_toolkit`` should be **readable**, **concise** and -**efficient**. We prefer short functions focusing each on one task and for which -the input and output types are clearly specified. We mostly prefer composition -over inheritance, because inheritance can result in too much functionality in -the same object. We prefer immutable objects where possible (objects don't -change after initialization). Reusability is important. We absolutely refrain -from having a changing global state, it should be possible to have multiple -independent instances of the same code in the same process. The architecture -should be layered: the lower levels operate on primitive operations and data -structures giving -- when correctly combined -- all the possible flexibility; -while at the higher level, there should be a simpler API, ready-to-use and -sufficient for most use cases. Thinking about algorithms and efficiency is -important, but avoid premature optimization. - - -`Projects using prompt_toolkit `_ -*********************************************** - -Special thanks to -***************** - -- `Pygments `_: Syntax highlighter. -- `wcwidth `_: Determine columns needed for a wide characters. - -.. |PyPI| image:: https://img.shields.io/pypi/v/prompt_toolkit.svg - :target: https://pypi.python.org/pypi/prompt-toolkit/ - :alt: Latest Version - -.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true - :target: https://ci.appveyor.com/project/prompt-toolkit/python-prompt-toolkit/ - -.. |RTD| image:: https://readthedocs.org/projects/python-prompt-toolkit/badge/ - :target: https://python-prompt-toolkit.readthedocs.io/en/master/ - -.. |License| image:: https://img.shields.io/github/license/prompt-toolkit/python-prompt-toolkit.svg - :target: https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/LICENSE - -.. |Codecov| image:: https://codecov.io/gh/prompt-toolkit/python-prompt-toolkit/branch/master/graphs/badge.svg?style=flat - :target: https://codecov.io/gh/prompt-toolkit/python-prompt-toolkit/ - diff --git a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/RECORD b/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/RECORD deleted file mode 100644 index 6b3b89e..0000000 --- a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/RECORD +++ /dev/null @@ -1,153 +0,0 @@ -prompt_toolkit-3.0.52.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -prompt_toolkit-3.0.52.dist-info/METADATA,sha256=gNS9QKahcd_SXDMrrr7h_YciNC8TPbU4Xi1XGaXaLik,6414 -prompt_toolkit-3.0.52.dist-info/RECORD,, -prompt_toolkit-3.0.52.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91 -prompt_toolkit-3.0.52.dist-info/licenses/AUTHORS.rst,sha256=09xixryENmWElauJrqN1Eef6k5HSgmVyOcnPuA29QuU,148 -prompt_toolkit-3.0.52.dist-info/licenses/LICENSE,sha256=MDV02b3YXHV9YCUBeUK_F7ru3yd49ivX9CXQfYgPTEo,1493 -prompt_toolkit-3.0.52.dist-info/top_level.txt,sha256=5rJXrEGx6st4KkmhOPR6l0ITDbV53x_Xy6MurOukXfA,15 -prompt_toolkit/__init__.py,sha256=zWTvKCSL-Qb_hO8opATHynv2gNdm0YMCA9x3obLJUH4,1376 -prompt_toolkit/application/__init__.py,sha256=rat9iPhYTmo7nd2BU8xZSU_-AfJpjnnBmxe9y3TQivM,657 -prompt_toolkit/application/application.py,sha256=iTjvCjKjtPss4_L8MYidBFFQLumfHLgrkFQSGqE4O3c,63242 -prompt_toolkit/application/current.py,sha256=IyZmMpzOWEISG_o06Bj2vzgdDTxI7uAQnbTHFJGuL0s,6209 -prompt_toolkit/application/dummy.py,sha256=BCfThUgz5Eb5fWJSKBVeJaA5kwksw8jJQtN6g61xMXM,1619 -prompt_toolkit/application/run_in_terminal.py,sha256=qgTfpG3qGP4wRy9l_7zU8P7s59CARIvagulTyPn_oEg,3767 -prompt_toolkit/auto_suggest.py,sha256=qSiaxlaKjLyNEJ8bJN0641gqsIzZ3LB2cOyq88xBQb4,5798 -prompt_toolkit/buffer.py,sha256=VkAbKTJV7441aO4Ei-ozqc8IBlNPEnLGAt5t42tB6jg,74513 -prompt_toolkit/cache.py,sha256=Lo3ewsEIgn-LQBYNni79w74u5LSvvuVYF0e6giEArQg,3823 -prompt_toolkit/clipboard/__init__.py,sha256=yK0LonIfEZRyoXqcgLdh8kjOhechjO-Ej2-C1g3VegQ,439 -prompt_toolkit/clipboard/base.py,sha256=rucEv1kKfvZUj6bwGRz04uSSTZie7rvnKUnyVXb2vv4,2515 -prompt_toolkit/clipboard/in_memory.py,sha256=U_iY6UUevkKMfTvir_XMsD0qwuLVKuoTeRdjkZW-A6I,1060 -prompt_toolkit/clipboard/pyperclip.py,sha256=H9HOlyGW0XItvx_Ji64zBQkiQPfLb6DFAw5J5irzK28,1160 -prompt_toolkit/completion/__init__.py,sha256=8Hm2yJ1nqBkaC-R9ugELgjhU32U308V89F6bJG0QDYo,992 -prompt_toolkit/completion/base.py,sha256=T7212aScNaGMaSrDIwsJIXeXLIM_eVCIcScNcDPZYwI,16103 -prompt_toolkit/completion/deduplicate.py,sha256=QibqYI23GPjsbyxaxiNoqAbKawzHmfYOlxeW2HPFbTE,1436 -prompt_toolkit/completion/filesystem.py,sha256=Z_RR72e14bVavdWnbxECw23qCt_TWTY9R6DpVqW7vxE,3949 -prompt_toolkit/completion/fuzzy_completer.py,sha256=RnREvA7y6nC7LKGqZUEvtuSm8eXVQYheJTsnhUvRbmM,7738 -prompt_toolkit/completion/nested.py,sha256=ig2Qy4dLyDvOT6O8Qb-iRZLWzlT11S5tVQ3GFZmpm-U,3844 -prompt_toolkit/completion/word_completer.py,sha256=VF1S7YCxYqI3pKmVXJaD82eMW1ZMq8_zAAIS1XKGU5M,3435 -prompt_toolkit/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -prompt_toolkit/contrib/completers/__init__.py,sha256=qJB_xNFGbhfiDv_zUaox9mkQEGqBYqP_jfByQDb93hA,103 -prompt_toolkit/contrib/completers/system.py,sha256=0Hc2dziheEx2qNog4YOl-4Tu8Fg5Dx2xjNURTx09BDg,2057 -prompt_toolkit/contrib/regular_languages/__init__.py,sha256=cgMQkakD4FbvLUozDGucRRFOk8yScfcKfqOMpCtvAPo,3279 -prompt_toolkit/contrib/regular_languages/compiler.py,sha256=3tnUJCE2jCcVI63vcpI0kG4KfuqIatSQRb8-F5UCgsI,21948 -prompt_toolkit/contrib/regular_languages/completion.py,sha256=jESF35RaYWj_rnT-OZc_zC9QZXYvPao4JZ8wx7yS3KM,3468 -prompt_toolkit/contrib/regular_languages/lexer.py,sha256=DBgyek9LkfJv6hz24eOaVM--w9Qaw4zIMWusMvGHBts,3415 -prompt_toolkit/contrib/regular_languages/regex_parser.py,sha256=zWGJfQSjomvdj2rD7MPpn2pWOUR7VMv4su5iAV0jzM4,7732 -prompt_toolkit/contrib/regular_languages/validation.py,sha256=4k5wxgUFc_KTOW5PmmZOrWb-Z-HjX8fjjKqul-oR8uc,2059 -prompt_toolkit/contrib/ssh/__init__.py,sha256=UcRG2wc28EEKtFEudoIXz_DFzWKKQjAVSv6cf-ufPiM,180 -prompt_toolkit/contrib/ssh/server.py,sha256=81McNn6r0Cbu9SPceH7fa5QirAnteHmNh1Gk4dFpgvI,6130 -prompt_toolkit/contrib/telnet/__init__.py,sha256=NyUfsmJdafGiUxD9gzYQNlVdHu_ILDH7F57VJw8efUM,104 -prompt_toolkit/contrib/telnet/log.py,sha256=LcFRDyRxoRKSZsVRVpBOrEgsEt_LQLyUHKtgVZklopI,167 -prompt_toolkit/contrib/telnet/protocol.py,sha256=2i-JYfaAse-uFWtNdVEoP_Q-OMbkl3YbUfv_wvaaS3k,5584 -prompt_toolkit/contrib/telnet/server.py,sha256=S2UGX30O0aYjYV_oy4hnJM7f7xllGxXA-WUnlKqLNTw,13461 -prompt_toolkit/cursor_shapes.py,sha256=k5g5yJONGl1ITgy29KX9yzspJvIJ6Jbbwd7WkYC9Z-4,3721 -prompt_toolkit/data_structures.py,sha256=w0BZy6Fpx4se-kAI9Kj8Q7lAKLln8U_Em_ncpqnC1xY,212 -prompt_toolkit/document.py,sha256=s83zyjuwE8pvEdFN8y46pRYa_YRveVBkf9As3xlYU-w,40547 -prompt_toolkit/enums.py,sha256=F3q9JmH9vhpMLA2OKKN7RrNQu_YDlNWoPU-0qsTUuAs,358 -prompt_toolkit/eventloop/__init__.py,sha256=pxSkV_zybeoj6Ff3lgNHhbD5ENmBW9mk_XkiyeRL_OY,730 -prompt_toolkit/eventloop/async_generator.py,sha256=nozLJR4z2MJKV7Qi0hsknA2mb1Jcp7XJx-AdUEDhDhw,3933 -prompt_toolkit/eventloop/inputhook.py,sha256=LDElZtmg-kLQiItMS8CFPxtLzxV8QzohWHsWUvw3h00,6130 -prompt_toolkit/eventloop/utils.py,sha256=VhYmsDZmRwVXnEPBF_C2LpiW-ranPn6EIXWIuMa6XaU,3200 -prompt_toolkit/eventloop/win32.py,sha256=wrLJVOtOw_tqVOeK6ttNF47Sk2oX342dLN1pxKBLCL4,2286 -prompt_toolkit/filters/__init__.py,sha256=2YSVwf4EnLf1VOXYmb8Dr0WoA93XGGO0iCUIr14KGXQ,1990 -prompt_toolkit/filters/app.py,sha256=GAQzU3An_pUIIV0ja4RV7Wfl0CbLI-U1HUMOItrCKNI,10374 -prompt_toolkit/filters/base.py,sha256=asrgKE-gzYlRLrS4w3kMFimvZtXQ9pk252Vs5ShVeeM,6855 -prompt_toolkit/filters/cli.py,sha256=QGV7JT7-BUXpPXNzBLUcNH3GI69ugFZCDV1nylOjq78,1867 -prompt_toolkit/filters/utils.py,sha256=4nOjHPEd451Pj3qpfg40fq3XSnt1kmq3WoAbhu2NV-8,859 -prompt_toolkit/formatted_text/__init__.py,sha256=aQtNhxOhIa_HmvlNOQ2RGGpplg-KX3sYFJWiXgNfQxY,1509 -prompt_toolkit/formatted_text/ansi.py,sha256=9jajRZ4bIZ4rRDoSNMyDKF0ctErcEwoyFbvh96ownXU,9824 -prompt_toolkit/formatted_text/base.py,sha256=X3y5QIPH2IS9LesYzXneELtT4zGpik8gd-UQVh6I2bE,5162 -prompt_toolkit/formatted_text/html.py,sha256=-88VwuuCLRNkzEgK8FJKOHT9NDh939BxH8vGivvILdU,4374 -prompt_toolkit/formatted_text/pygments.py,sha256=sK-eFFzOnD2sgadVLgNkW-xOuTw_uIf8_z06DZ4CA8g,780 -prompt_toolkit/formatted_text/utils.py,sha256=r6tPtwo6dqvqf9gqZ7ARyvtNUjDDq6QZqrTWg6EMFuQ,3044 -prompt_toolkit/history.py,sha256=S9W9SgL83QftMQANdjdjBMm-yGmeM51_qCRRC1H4Mr8,9441 -prompt_toolkit/input/__init__.py,sha256=7g6kwNanG4Ml12FFdj9E1ivChpXWcfRUMUJzmTQMS7U,273 -prompt_toolkit/input/ansi_escape_sequences.py,sha256=h7714SZgs2z80PZRVxsCfHHJjtEUmWlToVCBtFFvfR4,13663 -prompt_toolkit/input/base.py,sha256=nqdM61RerkAnTBxQCqxxIHErKvaEXUerPIn--gr6NLs,4030 -prompt_toolkit/input/defaults.py,sha256=a-vczSh7kngFArLhFsJ2CXNdkx5WQlzilxHLdzGDkFw,2500 -prompt_toolkit/input/posix_pipe.py,sha256=B_JS2-FB6Sk0da9gSH0NnhcUCkp3bw0m1-ogMOHmmcE,3158 -prompt_toolkit/input/posix_utils.py,sha256=ySaEGnt_IwG5nzxcpILgEXC60mbrIAbC3ZZ6kuE9zCw,3973 -prompt_toolkit/input/typeahead.py,sha256=mAaf5_XKTLpao1kw9ORIrhGGEz9gvu4oc-iZKKMQz3k,2545 -prompt_toolkit/input/vt100.py,sha256=soxxSLU7fwp6yn77j5gCYUZroEp7KBKm4a3Zn4vRAsk,10514 -prompt_toolkit/input/vt100_parser.py,sha256=qDrNbsnPukZblfyjgfjCvzMv8xQKRz0M84UvUWq7P44,8407 -prompt_toolkit/input/win32.py,sha256=gF_IXqZhFKeAbKWYGkMKRBG3kF4yqDgDzWG2tX073IM,31410 -prompt_toolkit/input/win32_pipe.py,sha256=OvjKHN5xfEoGHLygWwayyeB0RolHL6YHLNeOMK-54LU,4700 -prompt_toolkit/key_binding/__init__.py,sha256=IZWqJLBjQaQMfo0SJTjqJKQH0TZcSNa2Cdln-M4z8JI,447 -prompt_toolkit/key_binding/bindings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -prompt_toolkit/key_binding/bindings/auto_suggest.py,sha256=4PrJVgIK_Nt2o3RtVtuRm2aFPGrackhuMCBVNtjPj7M,1855 -prompt_toolkit/key_binding/bindings/basic.py,sha256=Fp9mj-RYZlGmAU9UV9wIIEnlxELN7NJ0qakMVH7MuRU,7229 -prompt_toolkit/key_binding/bindings/completion.py,sha256=6nR3WfGe7FDsjq1xTsDazeajkV9KBLpCYQi3klujdLU,6903 -prompt_toolkit/key_binding/bindings/cpr.py,sha256=181XQNZ0-sgL-vV2B67aRitTFHadogvMUh6LWVMUTV0,786 -prompt_toolkit/key_binding/bindings/emacs.py,sha256=trIZUu8e5kJGSaq6Ndb-Exz4NdHV9SjUsfsw_UM8c6o,19634 -prompt_toolkit/key_binding/bindings/focus.py,sha256=LIP4InccUUvD7I4NZrqtY9WjVfO_wJLyrVcoxAw92uU,507 -prompt_toolkit/key_binding/bindings/mouse.py,sha256=6JPr0BqzFfLEVb7Ek_WO0CejUcwq0jIrrNwvSGkHeus,18586 -prompt_toolkit/key_binding/bindings/named_commands.py,sha256=jdkqQ-ltNYC2BgIW1QdG7Qx4mWIod2Ps6C2TpL6NJ-Y,18407 -prompt_toolkit/key_binding/bindings/open_in_editor.py,sha256=bgVmeDmVtHsgzJnc59b-dOZ-nO6WydBYI_7aOWMpe5c,1356 -prompt_toolkit/key_binding/bindings/page_navigation.py,sha256=RPLUEZuZvekErPazex7pK0c6LxeV9LshewBHp012iMI,2392 -prompt_toolkit/key_binding/bindings/scroll.py,sha256=hQeQ0m2AStUKjVNDXfa9DTMw3WS5qzW1n3gU0fkfWFk,5613 -prompt_toolkit/key_binding/bindings/search.py,sha256=rU6VYra1IDzN6mG4mrbGivrZ-hjy_kZcjsKqmdVJKAE,2632 -prompt_toolkit/key_binding/bindings/vi.py,sha256=TSglqzPZU9VMernOvn09GVxObFXpXuyCSiH9i1MpIIo,75602 -prompt_toolkit/key_binding/defaults.py,sha256=JZJTshyBV39cWH2AT7xDP9AXOiyXQpjaI-ckePTi7os,1975 -prompt_toolkit/key_binding/digraphs.py,sha256=rZvh9AdY5Te6bSlIHRQNskJYVIONYahYuu-w9Pti5yM,32785 -prompt_toolkit/key_binding/emacs_state.py,sha256=ZJBWcLTzgtRkUW9UiDuI-SRrnlLsxu3IrTOK0_UQt5Y,884 -prompt_toolkit/key_binding/key_bindings.py,sha256=HEbemzMuSdO4fhHc_p7em02dd-rt7ZqxGzs-Fpu6LcY,20933 -prompt_toolkit/key_binding/key_processor.py,sha256=0WLK4dcU8klL2Xna_RKxOpsW7t8ld67Y9Xmto3U-n0E,17555 -prompt_toolkit/key_binding/vi_state.py,sha256=GAlH1xPvYoJnRUM9s3bTMlWh5UnIZ40fFtYInKMC2x0,3337 -prompt_toolkit/keys.py,sha256=nDkIqJbm_dRsVjArp7oItGKIFAAnSxcSniSwc1O-BYA,4916 -prompt_toolkit/layout/__init__.py,sha256=gNbniLmlvkWwPE6Kg2ykyZJRTOKsWnHbwUjyO-VFDP8,3603 -prompt_toolkit/layout/containers.py,sha256=BpR90-WNGPBcoYyCCSorAn2eHTz-1aoeQQO7QGqbuYU,100179 -prompt_toolkit/layout/controls.py,sha256=9h6425oGeBwLO85MBNdHSh6XsrtEay5JwuIX-fuzsVI,35993 -prompt_toolkit/layout/dimension.py,sha256=GOd3W6bxtH9tPaGo31brUwF94K2UOz-ldB_6rearjSI,6948 -prompt_toolkit/layout/dummy.py,sha256=8zB3MwDDd4RpI880WUKhv719tTzy5bXS9gm9zdkBZ10,1047 -prompt_toolkit/layout/layout.py,sha256=VXqWAoL3EviGn4CxtOrFJekMALvl9xff1bTSnE-gXF8,13960 -prompt_toolkit/layout/margins.py,sha256=bt-IvD03uQvmLVYvGZLqPLluR6kUlBRBAGJwCc8F7II,10375 -prompt_toolkit/layout/menus.py,sha256=B4H2oCPF48gLy9cB0vkdGIoH_8gGyj95TDHtfxXRVSw,27195 -prompt_toolkit/layout/mouse_handlers.py,sha256=lwbGSdpn6_pcK7HQWJ6IvHsxTf1_ahBew4pkmtU6zUM,1589 -prompt_toolkit/layout/processors.py,sha256=0VE4UIGRzyXvDO4XqCB7LXNG9WkSxLz7FW7toOvHDSE,34296 -prompt_toolkit/layout/screen.py,sha256=2PWdPDkQxtJrMSv9oqdZrWa7ChCnC7J4SvfVIithi5E,10113 -prompt_toolkit/layout/scrollable_pane.py,sha256=JQtPfafU61RJt3MzGW2wsw96o1sjJH0g2DSVyO7J6qA,19264 -prompt_toolkit/layout/utils.py,sha256=qot9clyeG3FoplfAS2O6QxmnnA_PDln4-dUJ5Hu76fQ,2371 -prompt_toolkit/lexers/__init__.py,sha256=QldV9b8J2Kb9Exyv2fDss-YRzP07z2FYAhwPN4coWn8,409 -prompt_toolkit/lexers/base.py,sha256=XdyKLj4rD25CVCqSCfElWE3ppBN1LGQ9fRLPi1oYfl0,2350 -prompt_toolkit/lexers/pygments.py,sha256=it89LjsltZpzlQJPb95GX4GdMu7gq1J1QzWC29lCQi4,11922 -prompt_toolkit/log.py,sha256=6typpL_jnewdUc3j2OoplVLwnP9dSMOkIsJy_sgR9IY,153 -prompt_toolkit/mouse_events.py,sha256=4mUHJbG8WrrQznw7z_jsOrdmldC5ZMRM4gDDUy51pyk,2473 -prompt_toolkit/output/__init__.py,sha256=GVlT-U_W0EuIP-c1Qjyp0DN6Fl2PsCEhFzjUMRHsGWI,280 -prompt_toolkit/output/base.py,sha256=o74Vok7cXLxgHoAaqKHQAGcNZILn5B5g6Z0pUXU6x7s,8348 -prompt_toolkit/output/color_depth.py,sha256=KEFTlxCYTqOvA-VDx4wUb8G6HaYD5Hbf5GKmPZwssCs,1569 -prompt_toolkit/output/conemu.py,sha256=_w2IEFR-mXsaMFINgZITiJNRCS9QowLUxeskPEpz2GE,1865 -prompt_toolkit/output/defaults.py,sha256=72RecTuugrjvfZinbvsFRYDwMcczE9Zw3ttmmiG0Ivg,3689 -prompt_toolkit/output/flush_stdout.py,sha256=ReT0j0IwVJEcth7VJj2zE6UcY0OVz5Ut1rpANnbCyYQ,3236 -prompt_toolkit/output/plain_text.py,sha256=VnjoDmy0pKQoubXXQJQ_MljoDYi1FcLdNZB2KN_TQIs,3296 -prompt_toolkit/output/vt100.py,sha256=a_vswyv0w0AyWZoI5O2a13y9q0Fj3cxdK2wqwi2zS0U,23474 -prompt_toolkit/output/win32.py,sha256=_aM4-pJq91l2mFkpBtRHksQ3xaUjw_Jj0yVJdle1Vbo,22639 -prompt_toolkit/output/windows10.py,sha256=yf0i1xAs-mbqOCwq25K78hkJjju1jXZ5b0e-w9aSBBA,4362 -prompt_toolkit/patch_stdout.py,sha256=8gEaQdqykdBczlvp3FrOjDlEG02yeXoYKrDAGqj48Wg,9477 -prompt_toolkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -prompt_toolkit/renderer.py,sha256=h4r7bShanQyvh9nrSQfxvHZUPT6ZPUH1kD5Nbeu2RwY,29398 -prompt_toolkit/search.py,sha256=6Go_LtBeBlIMkdUCqb-WFCBKLchd70kgtccqP5dyv08,6951 -prompt_toolkit/selection.py,sha256=P6zQOahBqqt1YZmfQ2-V9iJjOo4cxl0bdmU_-0jezJI,1274 -prompt_toolkit/shortcuts/__init__.py,sha256=ENuc0MPbDtxMnPNhYKUeYDzp4_J_ycQ-aQDfgg7imRw,1020 -prompt_toolkit/shortcuts/choice_input.py,sha256=Jzs6y2x6BLo5Otetx3szDKks7ikLwqlx_gYhXYP7HWY,10523 -prompt_toolkit/shortcuts/dialogs.py,sha256=gFibLlbaii8ijuurk9TpbNi5fMTHu99T6m1wfFilbE8,9007 -prompt_toolkit/shortcuts/progress_bar/__init__.py,sha256=QeAssmFBDPCC5VRoObAp4UkebwETP3qS7-na4acstWM,540 -prompt_toolkit/shortcuts/progress_bar/base.py,sha256=_cqp7coZMFDc7ZoAUL1iz3fL1Dt5hw3hi1HEfBvUpK8,14402 -prompt_toolkit/shortcuts/progress_bar/formatters.py,sha256=VfRADwUm8op-DzoM51UrKI8pSa1T1LAz5q9VMUW2siI,11739 -prompt_toolkit/shortcuts/prompt.py,sha256=JpGwxOW7nd0maObh8H4njxJ_PLALJozCiW_xCYBf8ug,60747 -prompt_toolkit/shortcuts/utils.py,sha256=NNjBY0Brkcb13Gxhh7Yc72_YpDFsQbkIlm7ZXvW3rK0,6950 -prompt_toolkit/styles/__init__.py,sha256=7N1NNE1gTQo5mjT9f7mRwRodkrBoNpT9pmqWK-lrSeY,1640 -prompt_toolkit/styles/base.py,sha256=J0Q7q4Nyrxig6KVLMnxZ-Jh3HlbPSKRPDSgtHjGMx_U,5064 -prompt_toolkit/styles/defaults.py,sha256=TRnP1PeuauYa_Ru1PpJ_ImsfaldvLE1JjmPV8tvfJjs,8699 -prompt_toolkit/styles/named_colors.py,sha256=yZ30oKB-fCRk6RMASYg8q3Uz2zgdfy_YNbuQWYpyYas,4367 -prompt_toolkit/styles/pygments.py,sha256=yWJEcvYCFo1e2EN9IF5HWpxHQ104J0HOJg1LUsSA9oM,1974 -prompt_toolkit/styles/style.py,sha256=GXYGYLJolUiErIHmuxk5VuPgwehoV2l8Cvfdy9_GKc0,13263 -prompt_toolkit/styles/style_transformation.py,sha256=cGaOo-jqhP79QoEHLQxrOZo9QMrxWxtXgfXKsHlx1Jg,12427 -prompt_toolkit/token.py,sha256=do3EnxLrCDVbq47MzJ2vqSYps-CjVKWNCWzCZgdf5Jo,121 -prompt_toolkit/utils.py,sha256=7O8hILpI2VZb0KoC7J-5z1S2aXICf_kwtmRq5xdfDTg,8631 -prompt_toolkit/validation.py,sha256=XTdmExMgaqj-Whym9yYyQxOAaKce97KYyyGXwCxMr-A,5807 -prompt_toolkit/widgets/__init__.py,sha256=RZXj6UzZWFuxOQXc1TwHLIwwZYJU-YBAaV4oLrC2dCA,1218 -prompt_toolkit/widgets/base.py,sha256=MEqDogz8BCH7KEQEH0L6w9BndCFhsiaBhg0ZFm91VQo,35546 -prompt_toolkit/widgets/dialogs.py,sha256=K2ACcf0rKXwpBQGQcjSTq2aNeSInGmklzZRPnhdtZTc,3380 -prompt_toolkit/widgets/menus.py,sha256=SeX-llaTpF1pVak2lw37mAP0SFDONIRZT5oq23mARg8,13419 -prompt_toolkit/widgets/toolbars.py,sha256=MoxOxaa8Yi3nJvH4G8OCwlNuwx3XWUJ07J0a7D17_w0,12178 -prompt_toolkit/win32_types.py,sha256=3xVjabRA3Q-RN2x3DLqTOrstuYj4_uCq6w2i8t6LZ6E,5551 diff --git a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/WHEEL b/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/WHEEL deleted file mode 100644 index e7fa31b..0000000 --- a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/WHEEL +++ /dev/null @@ -1,5 +0,0 @@ -Wheel-Version: 1.0 -Generator: setuptools (80.9.0) -Root-Is-Purelib: true -Tag: py3-none-any - diff --git a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/licenses/AUTHORS.rst b/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/licenses/AUTHORS.rst deleted file mode 100644 index f7c8f60..0000000 --- a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/licenses/AUTHORS.rst +++ /dev/null @@ -1,11 +0,0 @@ -Authors -======= - -Creator -------- -Jonathan Slenders - -Contributors ------------- - -- Amjith Ramanujam diff --git a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/licenses/LICENSE b/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/licenses/LICENSE deleted file mode 100644 index e1720e0..0000000 --- a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/licenses/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014, Jonathan Slenders -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - -* Neither the name of the {organization} nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/top_level.txt b/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/top_level.txt deleted file mode 100644 index 29392df..0000000 --- a/voxvera/vendor/prompt_toolkit-3.0.52.dist-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -prompt_toolkit diff --git a/voxvera/vendor/prompt_toolkit/__init__.py b/voxvera/vendor/prompt_toolkit/__init__.py deleted file mode 100644 index 7a0c4ce..0000000 --- a/voxvera/vendor/prompt_toolkit/__init__.py +++ /dev/null @@ -1,54 +0,0 @@ -""" -prompt_toolkit -============== - -Author: Jonathan Slenders - -Description: prompt_toolkit is a Library for building powerful interactive - command lines in Python. It can be a replacement for GNU - Readline, but it can be much more than that. - -See the examples directory to learn about the usage. - -Probably, to get started, you might also want to have a look at -`prompt_toolkit.shortcuts.prompt`. -""" - -from __future__ import annotations - -import re -from importlib import metadata - -# note: this is a bit more lax than the actual pep 440 to allow for a/b/rc/dev without a number -pep440 = re.compile( - r"^([1-9]\d*!)?(0|[1-9]\d*)(\.(0|[1-9]\d*))*((a|b|rc)(0|[1-9]\d*)?)?(\.post(0|[1-9]\d*))?(\.dev(0|[1-9]\d*)?)?$", - re.UNICODE, -) -from .application import Application -from .formatted_text import ANSI, HTML -from .shortcuts import PromptSession, choice, print_formatted_text, prompt - -# Don't forget to update in `docs/conf.py`! -__version__ = metadata.version("prompt_toolkit") - -assert pep440.match(__version__) - -# Version tuple. -VERSION = tuple(int(v.rstrip("abrc")) for v in __version__.split(".")[:3]) - - -__all__ = [ - # Application. - "Application", - # Shortcuts. - "prompt", - "choice", - "PromptSession", - "print_formatted_text", - # Formatted text. - "HTML", - "ANSI", - # Version info. - "__version__", - "VERSION", -] diff --git a/voxvera/vendor/prompt_toolkit/application/__init__.py b/voxvera/vendor/prompt_toolkit/application/__init__.py deleted file mode 100644 index 569d8c0..0000000 --- a/voxvera/vendor/prompt_toolkit/application/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from .application import Application -from .current import ( - AppSession, - create_app_session, - create_app_session_from_tty, - get_app, - get_app_or_none, - get_app_session, - set_app, -) -from .dummy import DummyApplication -from .run_in_terminal import in_terminal, run_in_terminal - -__all__ = [ - # Application. - "Application", - # Current. - "AppSession", - "get_app_session", - "create_app_session", - "create_app_session_from_tty", - "get_app", - "get_app_or_none", - "set_app", - # Dummy. - "DummyApplication", - # Run_in_terminal - "in_terminal", - "run_in_terminal", -] diff --git a/voxvera/vendor/prompt_toolkit/application/application.py b/voxvera/vendor/prompt_toolkit/application/application.py deleted file mode 100644 index f27ada1..0000000 --- a/voxvera/vendor/prompt_toolkit/application/application.py +++ /dev/null @@ -1,1630 +0,0 @@ -from __future__ import annotations - -import asyncio -import contextvars -import os -import re -import signal -import sys -import threading -import time -from asyncio import ( - AbstractEventLoop, - Future, - Task, - ensure_future, - get_running_loop, - sleep, -) -from contextlib import ExitStack, contextmanager -from subprocess import Popen -from traceback import format_tb -from typing import ( - Any, - Callable, - Coroutine, - Generator, - Generic, - Hashable, - Iterable, - Iterator, - TypeVar, - cast, - overload, -) - -from prompt_toolkit.buffer import Buffer -from prompt_toolkit.cache import SimpleCache -from prompt_toolkit.clipboard import Clipboard, InMemoryClipboard -from prompt_toolkit.cursor_shapes import AnyCursorShapeConfig, to_cursor_shape_config -from prompt_toolkit.data_structures import Size -from prompt_toolkit.enums import EditingMode -from prompt_toolkit.eventloop import ( - InputHook, - get_traceback_from_context, - new_eventloop_with_inputhook, - run_in_executor_with_context, -) -from prompt_toolkit.eventloop.utils import call_soon_threadsafe -from prompt_toolkit.filters import Condition, Filter, FilterOrBool, to_filter -from prompt_toolkit.formatted_text import AnyFormattedText -from prompt_toolkit.input.base import Input -from prompt_toolkit.input.typeahead import get_typeahead, store_typeahead -from prompt_toolkit.key_binding.bindings.page_navigation import ( - load_page_navigation_bindings, -) -from prompt_toolkit.key_binding.defaults import load_key_bindings -from prompt_toolkit.key_binding.emacs_state import EmacsState -from prompt_toolkit.key_binding.key_bindings import ( - Binding, - ConditionalKeyBindings, - GlobalOnlyKeyBindings, - KeyBindings, - KeyBindingsBase, - KeysTuple, - merge_key_bindings, -) -from prompt_toolkit.key_binding.key_processor import KeyPressEvent, KeyProcessor -from prompt_toolkit.key_binding.vi_state import ViState -from prompt_toolkit.keys import Keys -from prompt_toolkit.layout.containers import Container, Window -from prompt_toolkit.layout.controls import BufferControl, UIControl -from prompt_toolkit.layout.dummy import create_dummy_layout -from prompt_toolkit.layout.layout import Layout, walk -from prompt_toolkit.output import ColorDepth, Output -from prompt_toolkit.renderer import Renderer, print_formatted_text -from prompt_toolkit.search import SearchState -from prompt_toolkit.styles import ( - BaseStyle, - DummyStyle, - DummyStyleTransformation, - DynamicStyle, - StyleTransformation, - default_pygments_style, - default_ui_style, - merge_styles, -) -from prompt_toolkit.utils import Event, in_main_thread - -from .current import get_app_session, set_app -from .run_in_terminal import in_terminal, run_in_terminal - -__all__ = [ - "Application", -] - - -E = KeyPressEvent -_AppResult = TypeVar("_AppResult") -ApplicationEventHandler = Callable[["Application[_AppResult]"], None] - -_SIGWINCH = getattr(signal, "SIGWINCH", None) -_SIGTSTP = getattr(signal, "SIGTSTP", None) - - -class Application(Generic[_AppResult]): - """ - The main Application class! - This glues everything together. - - :param layout: A :class:`~prompt_toolkit.layout.Layout` instance. - :param key_bindings: - :class:`~prompt_toolkit.key_binding.KeyBindingsBase` instance for - the key bindings. - :param clipboard: :class:`~prompt_toolkit.clipboard.Clipboard` to use. - :param full_screen: When True, run the application on the alternate screen buffer. - :param color_depth: Any :class:`~.ColorDepth` value, a callable that - returns a :class:`~.ColorDepth` or `None` for default. - :param erase_when_done: (bool) Clear the application output when it finishes. - :param reverse_vi_search_direction: Normally, in Vi mode, a '/' searches - forward and a '?' searches backward. In Readline mode, this is usually - reversed. - :param min_redraw_interval: Number of seconds to wait between redraws. Use - this for applications where `invalidate` is called a lot. This could cause - a lot of terminal output, which some terminals are not able to process. - - `None` means that every `invalidate` will be scheduled right away - (which is usually fine). - - When one `invalidate` is called, but a scheduled redraw of a previous - `invalidate` call has not been executed yet, nothing will happen in any - case. - - :param max_render_postpone_time: When there is high CPU (a lot of other - scheduled calls), postpone the rendering max x seconds. '0' means: - don't postpone. '.5' means: try to draw at least twice a second. - - :param refresh_interval: Automatically invalidate the UI every so many - seconds. When `None` (the default), only invalidate when `invalidate` - has been called. - - :param terminal_size_polling_interval: Poll the terminal size every so many - seconds. Useful if the applications runs in a thread other then then - main thread where SIGWINCH can't be handled, or on Windows. - - Filters: - - :param mouse_support: (:class:`~prompt_toolkit.filters.Filter` or - boolean). When True, enable mouse support. - :param paste_mode: :class:`~prompt_toolkit.filters.Filter` or boolean. - :param editing_mode: :class:`~prompt_toolkit.enums.EditingMode`. - - :param enable_page_navigation_bindings: When `True`, enable the page - navigation key bindings. These include both Emacs and Vi bindings like - page-up, page-down and so on to scroll through pages. Mostly useful for - creating an editor or other full screen applications. Probably, you - don't want this for the implementation of a REPL. By default, this is - enabled if `full_screen` is set. - - Callbacks (all of these should accept an - :class:`~prompt_toolkit.application.Application` object as input.) - - :param on_reset: Called during reset. - :param on_invalidate: Called when the UI has been invalidated. - :param before_render: Called right before rendering. - :param after_render: Called right after rendering. - - I/O: - (Note that the preferred way to change the input/output is by creating an - `AppSession` with the required input/output objects. If you need multiple - applications running at the same time, you have to create a separate - `AppSession` using a `with create_app_session():` block. - - :param input: :class:`~prompt_toolkit.input.Input` instance. - :param output: :class:`~prompt_toolkit.output.Output` instance. (Probably - Vt100_Output or Win32Output.) - - Usage: - - app = Application(...) - app.run() - - # Or - await app.run_async() - """ - - def __init__( - self, - layout: Layout | None = None, - style: BaseStyle | None = None, - include_default_pygments_style: FilterOrBool = True, - style_transformation: StyleTransformation | None = None, - key_bindings: KeyBindingsBase | None = None, - clipboard: Clipboard | None = None, - full_screen: bool = False, - color_depth: (ColorDepth | Callable[[], ColorDepth | None] | None) = None, - mouse_support: FilterOrBool = False, - enable_page_navigation_bindings: None - | (FilterOrBool) = None, # Can be None, True or False. - paste_mode: FilterOrBool = False, - editing_mode: EditingMode = EditingMode.EMACS, - erase_when_done: bool = False, - reverse_vi_search_direction: FilterOrBool = False, - min_redraw_interval: float | int | None = None, - max_render_postpone_time: float | int | None = 0.01, - refresh_interval: float | None = None, - terminal_size_polling_interval: float | None = 0.5, - cursor: AnyCursorShapeConfig = None, - on_reset: ApplicationEventHandler[_AppResult] | None = None, - on_invalidate: ApplicationEventHandler[_AppResult] | None = None, - before_render: ApplicationEventHandler[_AppResult] | None = None, - after_render: ApplicationEventHandler[_AppResult] | None = None, - # I/O. - input: Input | None = None, - output: Output | None = None, - ) -> None: - # If `enable_page_navigation_bindings` is not specified, enable it in - # case of full screen applications only. This can be overridden by the user. - if enable_page_navigation_bindings is None: - enable_page_navigation_bindings = Condition(lambda: self.full_screen) - - paste_mode = to_filter(paste_mode) - mouse_support = to_filter(mouse_support) - reverse_vi_search_direction = to_filter(reverse_vi_search_direction) - enable_page_navigation_bindings = to_filter(enable_page_navigation_bindings) - include_default_pygments_style = to_filter(include_default_pygments_style) - - if layout is None: - layout = create_dummy_layout() - - if style_transformation is None: - style_transformation = DummyStyleTransformation() - - self.style = style - self.style_transformation = style_transformation - - # Key bindings. - self.key_bindings = key_bindings - self._default_bindings = load_key_bindings() - self._page_navigation_bindings = load_page_navigation_bindings() - - self.layout = layout - self.clipboard = clipboard or InMemoryClipboard() - self.full_screen: bool = full_screen - self._color_depth = color_depth - self.mouse_support = mouse_support - - self.paste_mode = paste_mode - self.editing_mode = editing_mode - self.erase_when_done = erase_when_done - self.reverse_vi_search_direction = reverse_vi_search_direction - self.enable_page_navigation_bindings = enable_page_navigation_bindings - self.min_redraw_interval = min_redraw_interval - self.max_render_postpone_time = max_render_postpone_time - self.refresh_interval = refresh_interval - self.terminal_size_polling_interval = terminal_size_polling_interval - - self.cursor = to_cursor_shape_config(cursor) - - # Events. - self.on_invalidate = Event(self, on_invalidate) - self.on_reset = Event(self, on_reset) - self.before_render = Event(self, before_render) - self.after_render = Event(self, after_render) - - # I/O. - session = get_app_session() - self.output = output or session.output - self.input = input or session.input - - # List of 'extra' functions to execute before a Application.run. - self.pre_run_callables: list[Callable[[], None]] = [] - - self._is_running = False - self.future: Future[_AppResult] | None = None - self.loop: AbstractEventLoop | None = None - self._loop_thread: threading.Thread | None = None - self.context: contextvars.Context | None = None - - #: Quoted insert. This flag is set if we go into quoted insert mode. - self.quoted_insert = False - - #: Vi state. (For Vi key bindings.) - self.vi_state = ViState() - self.emacs_state = EmacsState() - - #: When to flush the input (For flushing escape keys.) This is important - #: on terminals that use vt100 input. We can't distinguish the escape - #: key from for instance the left-arrow key, if we don't know what follows - #: after "\x1b". This little timer will consider "\x1b" to be escape if - #: nothing did follow in this time span. - #: This seems to work like the `ttimeoutlen` option in Vim. - self.ttimeoutlen = 0.5 # Seconds. - - #: Like Vim's `timeoutlen` option. This can be `None` or a float. For - #: instance, suppose that we have a key binding AB and a second key - #: binding A. If the uses presses A and then waits, we don't handle - #: this binding yet (unless it was marked 'eager'), because we don't - #: know what will follow. This timeout is the maximum amount of time - #: that we wait until we call the handlers anyway. Pass `None` to - #: disable this timeout. - self.timeoutlen = 1.0 - - #: The `Renderer` instance. - # Make sure that the same stdout is used, when a custom renderer has been passed. - self._merged_style = self._create_merged_style(include_default_pygments_style) - - self.renderer = Renderer( - self._merged_style, - self.output, - full_screen=full_screen, - mouse_support=mouse_support, - cpr_not_supported_callback=self.cpr_not_supported_callback, - ) - - #: Render counter. This one is increased every time the UI is rendered. - #: It can be used as a key for caching certain information during one - #: rendering. - self.render_counter = 0 - - # Invalidate flag. When 'True', a repaint has been scheduled. - self._invalidated = False - self._invalidate_events: list[ - Event[object] - ] = [] # Collection of 'invalidate' Event objects. - self._last_redraw_time = 0.0 # Unix timestamp of last redraw. Used when - # `min_redraw_interval` is given. - - #: The `InputProcessor` instance. - self.key_processor = KeyProcessor(_CombinedRegistry(self)) - - # If `run_in_terminal` was called. This will point to a `Future` what will be - # set at the point when the previous run finishes. - self._running_in_terminal = False - self._running_in_terminal_f: Future[None] | None = None - - # Trigger initialize callback. - self.reset() - - def _create_merged_style(self, include_default_pygments_style: Filter) -> BaseStyle: - """ - Create a `Style` object that merges the default UI style, the default - pygments style, and the custom user style. - """ - dummy_style = DummyStyle() - pygments_style = default_pygments_style() - - @DynamicStyle - def conditional_pygments_style() -> BaseStyle: - if include_default_pygments_style(): - return pygments_style - else: - return dummy_style - - return merge_styles( - [ - default_ui_style(), - conditional_pygments_style, - DynamicStyle(lambda: self.style), - ] - ) - - @property - def color_depth(self) -> ColorDepth: - """ - The active :class:`.ColorDepth`. - - The current value is determined as follows: - - - If a color depth was given explicitly to this application, use that - value. - - Otherwise, fall back to the color depth that is reported by the - :class:`.Output` implementation. If the :class:`.Output` class was - created using `output.defaults.create_output`, then this value is - coming from the $PROMPT_TOOLKIT_COLOR_DEPTH environment variable. - """ - depth = self._color_depth - - if callable(depth): - depth = depth() - - if depth is None: - depth = self.output.get_default_color_depth() - - return depth - - @property - def current_buffer(self) -> Buffer: - """ - The currently focused :class:`~.Buffer`. - - (This returns a dummy :class:`.Buffer` when none of the actual buffers - has the focus. In this case, it's really not practical to check for - `None` values or catch exceptions every time.) - """ - return self.layout.current_buffer or Buffer( - name="dummy-buffer" - ) # Dummy buffer. - - @property - def current_search_state(self) -> SearchState: - """ - Return the current :class:`.SearchState`. (The one for the focused - :class:`.BufferControl`.) - """ - ui_control = self.layout.current_control - if isinstance(ui_control, BufferControl): - return ui_control.search_state - else: - return SearchState() # Dummy search state. (Don't return None!) - - def reset(self) -> None: - """ - Reset everything, for reading the next input. - """ - # Notice that we don't reset the buffers. (This happens just before - # returning, and when we have multiple buffers, we clearly want the - # content in the other buffers to remain unchanged between several - # calls of `run`. (And the same is true for the focus stack.) - - self.exit_style = "" - - self._background_tasks: set[Task[None]] = set() - - self.renderer.reset() - self.key_processor.reset() - self.layout.reset() - self.vi_state.reset() - self.emacs_state.reset() - - # Trigger reset event. - self.on_reset.fire() - - # Make sure that we have a 'focusable' widget focused. - # (The `Layout` class can't determine this.) - layout = self.layout - - if not layout.current_control.is_focusable(): - for w in layout.find_all_windows(): - if w.content.is_focusable(): - layout.current_window = w - break - - def invalidate(self) -> None: - """ - Thread safe way of sending a repaint trigger to the input event loop. - """ - if not self._is_running: - # Don't schedule a redraw if we're not running. - # Otherwise, `get_running_loop()` in `call_soon_threadsafe` can fail. - # See: https://github.com/dbcli/mycli/issues/797 - return - - # `invalidate()` called if we don't have a loop yet (not running?), or - # after the event loop was closed. - if self.loop is None or self.loop.is_closed(): - return - - # Never schedule a second redraw, when a previous one has not yet been - # executed. (This should protect against other threads calling - # 'invalidate' many times, resulting in 100% CPU.) - if self._invalidated: - return - else: - self._invalidated = True - - # Trigger event. - self.loop.call_soon_threadsafe(self.on_invalidate.fire) - - def redraw() -> None: - self._invalidated = False - self._redraw() - - def schedule_redraw() -> None: - call_soon_threadsafe( - redraw, max_postpone_time=self.max_render_postpone_time, loop=self.loop - ) - - if self.min_redraw_interval: - # When a minimum redraw interval is set, wait minimum this amount - # of time between redraws. - diff = time.time() - self._last_redraw_time - if diff < self.min_redraw_interval: - - async def redraw_in_future() -> None: - await sleep(cast(float, self.min_redraw_interval) - diff) - schedule_redraw() - - self.loop.call_soon_threadsafe( - lambda: self.create_background_task(redraw_in_future()) - ) - else: - schedule_redraw() - else: - schedule_redraw() - - @property - def invalidated(self) -> bool: - "True when a redraw operation has been scheduled." - return self._invalidated - - def _redraw(self, render_as_done: bool = False) -> None: - """ - Render the command line again. (Not thread safe!) (From other threads, - or if unsure, use :meth:`.Application.invalidate`.) - - :param render_as_done: make sure to put the cursor after the UI. - """ - - def run_in_context() -> None: - # Only draw when no sub application was started. - if self._is_running and not self._running_in_terminal: - if self.min_redraw_interval: - self._last_redraw_time = time.time() - - # Render - self.render_counter += 1 - self.before_render.fire() - - if render_as_done: - if self.erase_when_done: - self.renderer.erase() - else: - # Draw in 'done' state and reset renderer. - self.renderer.render(self, self.layout, is_done=render_as_done) - else: - self.renderer.render(self, self.layout) - - self.layout.update_parents_relations() - - # Fire render event. - self.after_render.fire() - - self._update_invalidate_events() - - # NOTE: We want to make sure this Application is the active one. The - # invalidate function is often called from a context where this - # application is not the active one. (Like the - # `PromptSession._auto_refresh_context`). - # We copy the context in case the context was already active, to - # prevent RuntimeErrors. (The rendering is not supposed to change - # any context variables.) - if self.context is not None: - self.context.copy().run(run_in_context) - - def _start_auto_refresh_task(self) -> None: - """ - Start a while/true loop in the background for automatic invalidation of - the UI. - """ - if self.refresh_interval is not None and self.refresh_interval != 0: - - async def auto_refresh(refresh_interval: float) -> None: - while True: - await sleep(refresh_interval) - self.invalidate() - - self.create_background_task(auto_refresh(self.refresh_interval)) - - def _update_invalidate_events(self) -> None: - """ - Make sure to attach 'invalidate' handlers to all invalidate events in - the UI. - """ - # Remove all the original event handlers. (Components can be removed - # from the UI.) - for ev in self._invalidate_events: - ev -= self._invalidate_handler - - # Gather all new events. - # (All controls are able to invalidate themselves.) - def gather_events() -> Iterable[Event[object]]: - for c in self.layout.find_all_controls(): - yield from c.get_invalidate_events() - - self._invalidate_events = list(gather_events()) - - for ev in self._invalidate_events: - ev += self._invalidate_handler - - def _invalidate_handler(self, sender: object) -> None: - """ - Handler for invalidate events coming from UIControls. - - (This handles the difference in signature between event handler and - `self.invalidate`. It also needs to be a method -not a nested - function-, so that we can remove it again .) - """ - self.invalidate() - - def _on_resize(self) -> None: - """ - When the window size changes, we erase the current output and request - again the cursor position. When the CPR answer arrives, the output is - drawn again. - """ - # Erase, request position (when cursor is at the start position) - # and redraw again. -- The order is important. - self.renderer.erase(leave_alternate_screen=False) - self._request_absolute_cursor_position() - self._redraw() - - def _pre_run(self, pre_run: Callable[[], None] | None = None) -> None: - """ - Called during `run`. - - `self.future` should be set to the new future at the point where this - is called in order to avoid data races. `pre_run` can be used to set a - `threading.Event` to synchronize with UI termination code, running in - another thread that would call `Application.exit`. (See the progress - bar code for an example.) - """ - if pre_run: - pre_run() - - # Process registered "pre_run_callables" and clear list. - for c in self.pre_run_callables: - c() - del self.pre_run_callables[:] - - async def run_async( - self, - pre_run: Callable[[], None] | None = None, - set_exception_handler: bool = True, - handle_sigint: bool = True, - slow_callback_duration: float = 0.5, - ) -> _AppResult: - """ - Run the prompt_toolkit :class:`~prompt_toolkit.application.Application` - until :meth:`~prompt_toolkit.application.Application.exit` has been - called. Return the value that was passed to - :meth:`~prompt_toolkit.application.Application.exit`. - - This is the main entry point for a prompt_toolkit - :class:`~prompt_toolkit.application.Application` and usually the only - place where the event loop is actually running. - - :param pre_run: Optional callable, which is called right after the - "reset" of the application. - :param set_exception_handler: When set, in case of an exception, go out - of the alternate screen and hide the application, display the - exception, and wait for the user to press ENTER. - :param handle_sigint: Handle SIGINT signal if possible. This will call - the `` key binding when a SIGINT is received. (This only - works in the main thread.) - :param slow_callback_duration: Display warnings if code scheduled in - the asyncio event loop takes more time than this. The asyncio - default of `0.1` is sometimes not sufficient on a slow system, - because exceptionally, the drawing of the app, which happens in the - event loop, can take a bit longer from time to time. - """ - assert not self._is_running, "Application is already running." - - if not in_main_thread() or sys.platform == "win32": - # Handling signals in other threads is not supported. - # Also on Windows, `add_signal_handler(signal.SIGINT, ...)` raises - # `NotImplementedError`. - # See: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1553 - handle_sigint = False - - async def _run_async(f: asyncio.Future[_AppResult]) -> _AppResult: - context = contextvars.copy_context() - self.context = context - - # Counter for cancelling 'flush' timeouts. Every time when a key is - # pressed, we start a 'flush' timer for flushing our escape key. But - # when any subsequent input is received, a new timer is started and - # the current timer will be ignored. - flush_task: asyncio.Task[None] | None = None - - # Reset. - # (`self.future` needs to be set when `pre_run` is called.) - self.reset() - self._pre_run(pre_run) - - # Feed type ahead input first. - self.key_processor.feed_multiple(get_typeahead(self.input)) - self.key_processor.process_keys() - - def read_from_input() -> None: - nonlocal flush_task - - # Ignore when we aren't running anymore. This callback will - # removed from the loop next time. (It could be that it was - # still in the 'tasks' list of the loop.) - # Except: if we need to process incoming CPRs. - if not self._is_running and not self.renderer.waiting_for_cpr: - return - - # Get keys from the input object. - keys = self.input.read_keys() - - # Feed to key processor. - self.key_processor.feed_multiple(keys) - self.key_processor.process_keys() - - # Quit when the input stream was closed. - if self.input.closed: - if not f.done(): - f.set_exception(EOFError) - else: - # Automatically flush keys. - if flush_task: - flush_task.cancel() - flush_task = self.create_background_task(auto_flush_input()) - - def read_from_input_in_context() -> None: - # Ensure that key bindings callbacks are always executed in the - # current context. This is important when key bindings are - # accessing contextvars. (These callbacks are currently being - # called from a different context. Underneath, - # `loop.add_reader` is used to register the stdin FD.) - # (We copy the context to avoid a `RuntimeError` in case the - # context is already active.) - context.copy().run(read_from_input) - - async def auto_flush_input() -> None: - # Flush input after timeout. - # (Used for flushing the enter key.) - # This sleep can be cancelled, in that case we won't flush yet. - await sleep(self.ttimeoutlen) - flush_input() - - def flush_input() -> None: - if not self.is_done: - # Get keys, and feed to key processor. - keys = self.input.flush_keys() - self.key_processor.feed_multiple(keys) - self.key_processor.process_keys() - - if self.input.closed: - f.set_exception(EOFError) - - # Enter raw mode, attach input and attach WINCH event handler. - with self.input.raw_mode(), self.input.attach( - read_from_input_in_context - ), attach_winch_signal_handler(self._on_resize): - # Draw UI. - self._request_absolute_cursor_position() - self._redraw() - self._start_auto_refresh_task() - - self.create_background_task(self._poll_output_size()) - - # Wait for UI to finish. - try: - result = await f - finally: - # In any case, when the application finishes. - # (Successful, or because of an error.) - try: - self._redraw(render_as_done=True) - finally: - # _redraw has a good chance to fail if it calls widgets - # with bad code. Make sure to reset the renderer - # anyway. - self.renderer.reset() - - # Unset `is_running`, this ensures that possibly - # scheduled draws won't paint during the following - # yield. - self._is_running = False - - # Detach event handlers for invalidate events. - # (Important when a UIControl is embedded in multiple - # applications, like ptterm in pymux. An invalidate - # should not trigger a repaint in terminated - # applications.) - for ev in self._invalidate_events: - ev -= self._invalidate_handler - self._invalidate_events = [] - - # Wait for CPR responses. - if self.output.responds_to_cpr: - await self.renderer.wait_for_cpr_responses() - - # Wait for the run-in-terminals to terminate. - previous_run_in_terminal_f = self._running_in_terminal_f - - if previous_run_in_terminal_f: - await previous_run_in_terminal_f - - # Store unprocessed input as typeahead for next time. - store_typeahead(self.input, self.key_processor.empty_queue()) - - return result - - @contextmanager - def set_loop() -> Iterator[AbstractEventLoop]: - loop = get_running_loop() - self.loop = loop - self._loop_thread = threading.current_thread() - - try: - yield loop - finally: - self.loop = None - self._loop_thread = None - - @contextmanager - def set_is_running() -> Iterator[None]: - self._is_running = True - try: - yield - finally: - self._is_running = False - - @contextmanager - def set_handle_sigint(loop: AbstractEventLoop) -> Iterator[None]: - if handle_sigint: - with _restore_sigint_from_ctypes(): - # save sigint handlers (python and os level) - # See: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1576 - loop.add_signal_handler( - signal.SIGINT, - lambda *_: loop.call_soon_threadsafe( - self.key_processor.send_sigint - ), - ) - try: - yield - finally: - loop.remove_signal_handler(signal.SIGINT) - else: - yield - - @contextmanager - def set_exception_handler_ctx(loop: AbstractEventLoop) -> Iterator[None]: - if set_exception_handler: - previous_exc_handler = loop.get_exception_handler() - loop.set_exception_handler(self._handle_exception) - try: - yield - finally: - loop.set_exception_handler(previous_exc_handler) - - else: - yield - - @contextmanager - def set_callback_duration(loop: AbstractEventLoop) -> Iterator[None]: - # Set slow_callback_duration. - original_slow_callback_duration = loop.slow_callback_duration - loop.slow_callback_duration = slow_callback_duration - try: - yield - finally: - # Reset slow_callback_duration. - loop.slow_callback_duration = original_slow_callback_duration - - @contextmanager - def create_future( - loop: AbstractEventLoop, - ) -> Iterator[asyncio.Future[_AppResult]]: - f = loop.create_future() - self.future = f # XXX: make sure to set this before calling '_redraw'. - - try: - yield f - finally: - # Also remove the Future again. (This brings the - # application back to its initial state, where it also - # doesn't have a Future.) - self.future = None - - with ExitStack() as stack: - stack.enter_context(set_is_running()) - - # Make sure to set `_invalidated` to `False` to begin with, - # otherwise we're not going to paint anything. This can happen if - # this application had run before on a different event loop, and a - # paint was scheduled using `call_soon_threadsafe` with - # `max_postpone_time`. - self._invalidated = False - - loop = stack.enter_context(set_loop()) - - stack.enter_context(set_handle_sigint(loop)) - stack.enter_context(set_exception_handler_ctx(loop)) - stack.enter_context(set_callback_duration(loop)) - stack.enter_context(set_app(self)) - stack.enter_context(self._enable_breakpointhook()) - - f = stack.enter_context(create_future(loop)) - - try: - return await _run_async(f) - finally: - # Wait for the background tasks to be done. This needs to - # go in the finally! If `_run_async` raises - # `KeyboardInterrupt`, we still want to wait for the - # background tasks. - await self.cancel_and_wait_for_background_tasks() - - # The `ExitStack` above is defined in typeshed in a way that it can - # swallow exceptions. Without next line, mypy would think that there's - # a possibility we don't return here. See: - # https://github.com/python/mypy/issues/7726 - assert False, "unreachable" - - def run( - self, - pre_run: Callable[[], None] | None = None, - set_exception_handler: bool = True, - handle_sigint: bool = True, - in_thread: bool = False, - inputhook: InputHook | None = None, - ) -> _AppResult: - """ - A blocking 'run' call that waits until the UI is finished. - - This will run the application in a fresh asyncio event loop. - - :param pre_run: Optional callable, which is called right after the - "reset" of the application. - :param set_exception_handler: When set, in case of an exception, go out - of the alternate screen and hide the application, display the - exception, and wait for the user to press ENTER. - :param in_thread: When true, run the application in a background - thread, and block the current thread until the application - terminates. This is useful if we need to be sure the application - won't use the current event loop (asyncio does not support nested - event loops). A new event loop will be created in this background - thread, and that loop will also be closed when the background - thread terminates. When this is used, it's especially important to - make sure that all asyncio background tasks are managed through - `get_appp().create_background_task()`, so that unfinished tasks are - properly cancelled before the event loop is closed. This is used - for instance in ptpython. - :param handle_sigint: Handle SIGINT signal. Call the key binding for - `Keys.SIGINT`. (This only works in the main thread.) - """ - if in_thread: - result: _AppResult - exception: BaseException | None = None - - def run_in_thread() -> None: - nonlocal result, exception - try: - result = self.run( - pre_run=pre_run, - set_exception_handler=set_exception_handler, - # Signal handling only works in the main thread. - handle_sigint=False, - inputhook=inputhook, - ) - except BaseException as e: - exception = e - - thread = threading.Thread(target=run_in_thread) - thread.start() - thread.join() - - if exception is not None: - raise exception - return result - - coro = self.run_async( - pre_run=pre_run, - set_exception_handler=set_exception_handler, - handle_sigint=handle_sigint, - ) - - def _called_from_ipython() -> bool: - try: - return ( - sys.modules["IPython"].version_info < (8, 18, 0, "") - and "IPython/terminal/interactiveshell.py" - in sys._getframe(3).f_code.co_filename - ) - except BaseException: - return False - - if inputhook is not None: - # Create new event loop with given input hook and run the app. - # In Python 3.12, we can use asyncio.run(loop_factory=...) - # For now, use `run_until_complete()`. - loop = new_eventloop_with_inputhook(inputhook) - result = loop.run_until_complete(coro) - loop.run_until_complete(loop.shutdown_asyncgens()) - loop.close() - return result - - elif _called_from_ipython(): - # workaround to make input hooks work for IPython until - # https://github.com/ipython/ipython/pull/14241 is merged. - # IPython was setting the input hook by installing an event loop - # previously. - try: - # See whether a loop was installed already. If so, use that. - # That's required for the input hooks to work, they are - # installed using `set_event_loop`. - loop = asyncio.get_event_loop() - except RuntimeError: - # No loop installed. Run like usual. - return asyncio.run(coro) - else: - # Use existing loop. - return loop.run_until_complete(coro) - - else: - # No loop installed. Run like usual. - return asyncio.run(coro) - - def _handle_exception( - self, loop: AbstractEventLoop, context: dict[str, Any] - ) -> None: - """ - Handler for event loop exceptions. - This will print the exception, using run_in_terminal. - """ - # For Python 2: we have to get traceback at this point, because - # we're still in the 'except:' block of the event loop where the - # traceback is still available. Moving this code in the - # 'print_exception' coroutine will loose the exception. - tb = get_traceback_from_context(context) - formatted_tb = "".join(format_tb(tb)) - - async def in_term() -> None: - async with in_terminal(): - # Print output. Similar to 'loop.default_exception_handler', - # but don't use logger. (This works better on Python 2.) - print("\nUnhandled exception in event loop:") - print(formatted_tb) - print("Exception {}".format(context.get("exception"))) - - await _do_wait_for_enter("Press ENTER to continue...") - - ensure_future(in_term()) - - @contextmanager - def _enable_breakpointhook(self) -> Generator[None, None, None]: - """ - Install our custom breakpointhook for the duration of this context - manager. (We will only install the hook if no other custom hook was - set.) - """ - if sys.breakpointhook == sys.__breakpointhook__: - sys.breakpointhook = self._breakpointhook - - try: - yield - finally: - sys.breakpointhook = sys.__breakpointhook__ - else: - yield - - def _breakpointhook(self, *a: object, **kw: object) -> None: - """ - Breakpointhook which uses PDB, but ensures that the application is - hidden and input echoing is restored during each debugger dispatch. - - This can be called from any thread. In any case, the application's - event loop will be blocked while the PDB input is displayed. The event - will continue after leaving the debugger. - """ - app = self - # Inline import on purpose. We don't want to import pdb, if not needed. - import pdb - from types import FrameType - - TraceDispatch = Callable[[FrameType, str, Any], Any] - - @contextmanager - def hide_app_from_eventloop_thread() -> Generator[None, None, None]: - """Stop application if `__breakpointhook__` is called from within - the App's event loop.""" - # Hide application. - app.renderer.erase() - - # Detach input and dispatch to debugger. - with app.input.detach(): - with app.input.cooked_mode(): - yield - - # Note: we don't render the application again here, because - # there's a good chance that there's a breakpoint on the next - # line. This paint/erase cycle would move the PDB prompt back - # to the middle of the screen. - - @contextmanager - def hide_app_from_other_thread() -> Generator[None, None, None]: - """Stop application if `__breakpointhook__` is called from a - thread other than the App's event loop.""" - ready = threading.Event() - done = threading.Event() - - async def in_loop() -> None: - # from .run_in_terminal import in_terminal - # async with in_terminal(): - # ready.set() - # await asyncio.get_running_loop().run_in_executor(None, done.wait) - # return - - # Hide application. - app.renderer.erase() - - # Detach input and dispatch to debugger. - with app.input.detach(): - with app.input.cooked_mode(): - ready.set() - # Here we block the App's event loop thread until the - # debugger resumes. We could have used `with - # run_in_terminal.in_terminal():` like the commented - # code above, but it seems to work better if we - # completely stop the main event loop while debugging. - done.wait() - - self.create_background_task(in_loop()) - ready.wait() - try: - yield - finally: - done.set() - - class CustomPdb(pdb.Pdb): - def trace_dispatch( - self, frame: FrameType, event: str, arg: Any - ) -> TraceDispatch: - if app._loop_thread is None: - return super().trace_dispatch(frame, event, arg) - - if app._loop_thread == threading.current_thread(): - with hide_app_from_eventloop_thread(): - return super().trace_dispatch(frame, event, arg) - - with hide_app_from_other_thread(): - return super().trace_dispatch(frame, event, arg) - - frame = sys._getframe().f_back - CustomPdb(stdout=sys.__stdout__).set_trace(frame) - - def create_background_task( - self, coroutine: Coroutine[Any, Any, None] - ) -> asyncio.Task[None]: - """ - Start a background task (coroutine) for the running application. When - the `Application` terminates, unfinished background tasks will be - cancelled. - - Given that we still support Python versions before 3.11, we can't use - task groups (and exception groups), because of that, these background - tasks are not allowed to raise exceptions. If they do, we'll call the - default exception handler from the event loop. - - If at some point, we have Python 3.11 as the minimum supported Python - version, then we can use a `TaskGroup` (with the lifetime of - `Application.run_async()`, and run run the background tasks in there. - - This is not threadsafe. - """ - loop = self.loop or get_running_loop() - task: asyncio.Task[None] = loop.create_task(coroutine) - self._background_tasks.add(task) - - task.add_done_callback(self._on_background_task_done) - return task - - def _on_background_task_done(self, task: asyncio.Task[None]) -> None: - """ - Called when a background task completes. Remove it from - `_background_tasks`, and handle exceptions if any. - """ - self._background_tasks.discard(task) - - if task.cancelled(): - return - - exc = task.exception() - if exc is not None: - get_running_loop().call_exception_handler( - { - "message": f"prompt_toolkit.Application background task {task!r} " - "raised an unexpected exception.", - "exception": exc, - "task": task, - } - ) - - async def cancel_and_wait_for_background_tasks(self) -> None: - """ - Cancel all background tasks, and wait for the cancellation to complete. - If any of the background tasks raised an exception, this will also - propagate the exception. - - (If we had nurseries like Trio, this would be the `__aexit__` of a - nursery.) - """ - for task in self._background_tasks: - task.cancel() - - # Wait until the cancellation of the background tasks completes. - # `asyncio.wait()` does not propagate exceptions raised within any of - # these tasks, which is what we want. Otherwise, we can't distinguish - # between a `CancelledError` raised in this task because it got - # cancelled, and a `CancelledError` raised on this `await` checkpoint, - # because *we* got cancelled during the teardown of the application. - # (If we get cancelled here, then it's important to not suppress the - # `CancelledError`, and have it propagate.) - # NOTE: Currently, if we get cancelled at this point then we can't wait - # for the cancellation to complete (in the future, we should be - # using anyio or Python's 3.11 TaskGroup.) - # Also, if we had exception groups, we could propagate an - # `ExceptionGroup` if something went wrong here. Right now, we - # don't propagate exceptions, but have them printed in - # `_on_background_task_done`. - if len(self._background_tasks) > 0: - await asyncio.wait( - self._background_tasks, timeout=None, return_when=asyncio.ALL_COMPLETED - ) - - async def _poll_output_size(self) -> None: - """ - Coroutine for polling the terminal dimensions. - - Useful for situations where `attach_winch_signal_handler` is not sufficient: - - If we are not running in the main thread. - - On Windows. - """ - size: Size | None = None - interval = self.terminal_size_polling_interval - - if interval is None: - return - - while True: - await asyncio.sleep(interval) - new_size = self.output.get_size() - - if size is not None and new_size != size: - self._on_resize() - size = new_size - - def cpr_not_supported_callback(self) -> None: - """ - Called when we don't receive the cursor position response in time. - """ - if not self.output.responds_to_cpr: - return # We know about this already. - - def in_terminal() -> None: - self.output.write( - "WARNING: your terminal doesn't support cursor position requests (CPR).\r\n" - ) - self.output.flush() - - run_in_terminal(in_terminal) - - @overload - def exit(self) -> None: - "Exit without arguments." - - @overload - def exit(self, *, result: _AppResult, style: str = "") -> None: - "Exit with `_AppResult`." - - @overload - def exit( - self, *, exception: BaseException | type[BaseException], style: str = "" - ) -> None: - "Exit with exception." - - def exit( - self, - result: _AppResult | None = None, - exception: BaseException | type[BaseException] | None = None, - style: str = "", - ) -> None: - """ - Exit application. - - .. note:: - - If `Application.exit` is called before `Application.run()` is - called, then the `Application` won't exit (because the - `Application.future` doesn't correspond to the current run). Use a - `pre_run` hook and an event to synchronize the closing if there's a - chance this can happen. - - :param result: Set this result for the application. - :param exception: Set this exception as the result for an application. For - a prompt, this is often `EOFError` or `KeyboardInterrupt`. - :param style: Apply this style on the whole content when quitting, - often this is 'class:exiting' for a prompt. (Used when - `erase_when_done` is not set.) - """ - assert result is None or exception is None - - if self.future is None: - raise Exception("Application is not running. Application.exit() failed.") - - if self.future.done(): - raise Exception("Return value already set. Application.exit() failed.") - - self.exit_style = style - - if exception is not None: - self.future.set_exception(exception) - else: - self.future.set_result(cast(_AppResult, result)) - - def _request_absolute_cursor_position(self) -> None: - """ - Send CPR request. - """ - # Note: only do this if the input queue is not empty, and a return - # value has not been set. Otherwise, we won't be able to read the - # response anyway. - if not self.key_processor.input_queue and not self.is_done: - self.renderer.request_absolute_cursor_position() - - async def run_system_command( - self, - command: str, - wait_for_enter: bool = True, - display_before_text: AnyFormattedText = "", - wait_text: str = "Press ENTER to continue...", - ) -> None: - """ - Run system command (While hiding the prompt. When finished, all the - output will scroll above the prompt.) - - :param command: Shell command to be executed. - :param wait_for_enter: FWait for the user to press enter, when the - command is finished. - :param display_before_text: If given, text to be displayed before the - command executes. - :return: A `Future` object. - """ - async with in_terminal(): - # Try to use the same input/output file descriptors as the one, - # used to run this application. - try: - input_fd = self.input.fileno() - except AttributeError: - input_fd = sys.stdin.fileno() - try: - output_fd = self.output.fileno() - except AttributeError: - output_fd = sys.stdout.fileno() - - # Run sub process. - def run_command() -> None: - self.print_text(display_before_text) - p = Popen(command, shell=True, stdin=input_fd, stdout=output_fd) - p.wait() - - await run_in_executor_with_context(run_command) - - # Wait for the user to press enter. - if wait_for_enter: - await _do_wait_for_enter(wait_text) - - def suspend_to_background(self, suspend_group: bool = True) -> None: - """ - (Not thread safe -- to be called from inside the key bindings.) - Suspend process. - - :param suspend_group: When true, suspend the whole process group. - (This is the default, and probably what you want.) - """ - # Only suspend when the operating system supports it. - # (Not on Windows.) - if _SIGTSTP is not None: - - def run() -> None: - signal = cast(int, _SIGTSTP) - # Send `SIGTSTP` to own process. - # This will cause it to suspend. - - # Usually we want the whole process group to be suspended. This - # handles the case when input is piped from another process. - if suspend_group: - os.kill(0, signal) - else: - os.kill(os.getpid(), signal) - - run_in_terminal(run) - - def print_text( - self, text: AnyFormattedText, style: BaseStyle | None = None - ) -> None: - """ - Print a list of (style_str, text) tuples to the output. - (When the UI is running, this method has to be called through - `run_in_terminal`, otherwise it will destroy the UI.) - - :param text: List of ``(style_str, text)`` tuples. - :param style: Style class to use. Defaults to the active style in the CLI. - """ - print_formatted_text( - output=self.output, - formatted_text=text, - style=style or self._merged_style, - color_depth=self.color_depth, - style_transformation=self.style_transformation, - ) - - @property - def is_running(self) -> bool: - "`True` when the application is currently active/running." - return self._is_running - - @property - def is_done(self) -> bool: - if self.future: - return self.future.done() - return False - - def get_used_style_strings(self) -> list[str]: - """ - Return a list of used style strings. This is helpful for debugging, and - for writing a new `Style`. - """ - attrs_for_style = self.renderer._attrs_for_style - - if attrs_for_style: - return sorted( - re.sub(r"\s+", " ", style_str).strip() - for style_str in attrs_for_style.keys() - ) - - return [] - - -class _CombinedRegistry(KeyBindingsBase): - """ - The `KeyBindings` of key bindings for a `Application`. - This merges the global key bindings with the one of the current user - control. - """ - - def __init__(self, app: Application[_AppResult]) -> None: - self.app = app - self._cache: SimpleCache[ - tuple[Window, frozenset[UIControl]], KeyBindingsBase - ] = SimpleCache() - - @property - def _version(self) -> Hashable: - """Not needed - this object is not going to be wrapped in another - KeyBindings object.""" - raise NotImplementedError - - @property - def bindings(self) -> list[Binding]: - """Not needed - this object is not going to be wrapped in another - KeyBindings object.""" - raise NotImplementedError - - def _create_key_bindings( - self, current_window: Window, other_controls: list[UIControl] - ) -> KeyBindingsBase: - """ - Create a `KeyBindings` object that merges the `KeyBindings` from the - `UIControl` with all the parent controls and the global key bindings. - """ - key_bindings = [] - collected_containers = set() - - # Collect key bindings from currently focused control and all parent - # controls. Don't include key bindings of container parent controls. - container: Container = current_window - while True: - collected_containers.add(container) - kb = container.get_key_bindings() - if kb is not None: - key_bindings.append(kb) - - if container.is_modal(): - break - - parent = self.app.layout.get_parent(container) - if parent is None: - break - else: - container = parent - - # Include global bindings (starting at the top-model container). - for c in walk(container): - if c not in collected_containers: - kb = c.get_key_bindings() - if kb is not None: - key_bindings.append(GlobalOnlyKeyBindings(kb)) - - # Add App key bindings - if self.app.key_bindings: - key_bindings.append(self.app.key_bindings) - - # Add mouse bindings. - key_bindings.append( - ConditionalKeyBindings( - self.app._page_navigation_bindings, - self.app.enable_page_navigation_bindings, - ) - ) - key_bindings.append(self.app._default_bindings) - - # Reverse this list. The current control's key bindings should come - # last. They need priority. - key_bindings = key_bindings[::-1] - - return merge_key_bindings(key_bindings) - - @property - def _key_bindings(self) -> KeyBindingsBase: - current_window = self.app.layout.current_window - other_controls = list(self.app.layout.find_all_controls()) - key = current_window, frozenset(other_controls) - - return self._cache.get( - key, lambda: self._create_key_bindings(current_window, other_controls) - ) - - def get_bindings_for_keys(self, keys: KeysTuple) -> list[Binding]: - return self._key_bindings.get_bindings_for_keys(keys) - - def get_bindings_starting_with_keys(self, keys: KeysTuple) -> list[Binding]: - return self._key_bindings.get_bindings_starting_with_keys(keys) - - -async def _do_wait_for_enter(wait_text: AnyFormattedText) -> None: - """ - Create a sub application to wait for the enter key press. - This has two advantages over using 'input'/'raw_input': - - This will share the same input/output I/O. - - This doesn't block the event loop. - """ - from prompt_toolkit.shortcuts import PromptSession - - key_bindings = KeyBindings() - - @key_bindings.add("enter") - def _ok(event: E) -> None: - event.app.exit() - - @key_bindings.add(Keys.Any) - def _ignore(event: E) -> None: - "Disallow typing." - pass - - session: PromptSession[None] = PromptSession( - message=wait_text, key_bindings=key_bindings - ) - try: - await session.app.run_async() - except KeyboardInterrupt: - pass # Control-c pressed. Don't propagate this error. - - -@contextmanager -def attach_winch_signal_handler( - handler: Callable[[], None], -) -> Generator[None, None, None]: - """ - Attach the given callback as a WINCH signal handler within the context - manager. Restore the original signal handler when done. - - The `Application.run` method will register SIGWINCH, so that it will - properly repaint when the terminal window resizes. However, using - `run_in_terminal`, we can temporarily send an application to the - background, and run an other app in between, which will then overwrite the - SIGWINCH. This is why it's important to restore the handler when the app - terminates. - """ - # The tricky part here is that signals are registered in the Unix event - # loop with a wakeup fd, but another application could have registered - # signals using signal.signal directly. For now, the implementation is - # hard-coded for the `asyncio.unix_events._UnixSelectorEventLoop`. - - # No WINCH? Then don't do anything. - sigwinch = getattr(signal, "SIGWINCH", None) - if sigwinch is None or not in_main_thread(): - yield - return - - # Keep track of the previous handler. - # (Only UnixSelectorEventloop has `_signal_handlers`.) - loop = get_running_loop() - previous_winch_handler = getattr(loop, "_signal_handlers", {}).get(sigwinch) - - try: - loop.add_signal_handler(sigwinch, handler) - yield - finally: - # Restore the previous signal handler. - loop.remove_signal_handler(sigwinch) - if previous_winch_handler is not None: - loop.add_signal_handler( - sigwinch, - previous_winch_handler._callback, - *previous_winch_handler._args, - ) - - -@contextmanager -def _restore_sigint_from_ctypes() -> Generator[None, None, None]: - # The following functions are part of the stable ABI since python 3.2 - # See: https://docs.python.org/3/c-api/sys.html#c.PyOS_getsig - # Inline import: these are not available on Pypy. - try: - from ctypes import c_int, c_void_p, pythonapi - except ImportError: - have_ctypes_signal = False - else: - # GraalPy has the functions, but they don't work - have_ctypes_signal = sys.implementation.name != "graalpy" - - if have_ctypes_signal: - # PyOS_sighandler_t PyOS_getsig(int i) - pythonapi.PyOS_getsig.restype = c_void_p - pythonapi.PyOS_getsig.argtypes = (c_int,) - - # PyOS_sighandler_t PyOS_setsig(int i, PyOS_sighandler_t h) - pythonapi.PyOS_setsig.restype = c_void_p - pythonapi.PyOS_setsig.argtypes = ( - c_int, - c_void_p, - ) - - sigint = signal.getsignal(signal.SIGINT) - if have_ctypes_signal: - sigint_os = pythonapi.PyOS_getsig(signal.SIGINT) - - try: - yield - finally: - if sigint is not None: - signal.signal(signal.SIGINT, sigint) - if have_ctypes_signal: - pythonapi.PyOS_setsig(signal.SIGINT, sigint_os) diff --git a/voxvera/vendor/prompt_toolkit/application/current.py b/voxvera/vendor/prompt_toolkit/application/current.py deleted file mode 100644 index f7032fe..0000000 --- a/voxvera/vendor/prompt_toolkit/application/current.py +++ /dev/null @@ -1,195 +0,0 @@ -from __future__ import annotations - -from contextlib import contextmanager -from contextvars import ContextVar -from typing import TYPE_CHECKING, Any, Generator - -if TYPE_CHECKING: - from prompt_toolkit.input.base import Input - from prompt_toolkit.output.base import Output - - from .application import Application - -__all__ = [ - "AppSession", - "get_app_session", - "get_app", - "get_app_or_none", - "set_app", - "create_app_session", - "create_app_session_from_tty", -] - - -class AppSession: - """ - An AppSession is an interactive session, usually connected to one terminal. - Within one such session, interaction with many applications can happen, one - after the other. - - The input/output device is not supposed to change during one session. - - Warning: Always use the `create_app_session` function to create an - instance, so that it gets activated correctly. - - :param input: Use this as a default input for all applications - running in this session, unless an input is passed to the `Application` - explicitly. - :param output: Use this as a default output. - """ - - def __init__( - self, input: Input | None = None, output: Output | None = None - ) -> None: - self._input = input - self._output = output - - # The application will be set dynamically by the `set_app` context - # manager. This is called in the application itself. - self.app: Application[Any] | None = None - - def __repr__(self) -> str: - return f"AppSession(app={self.app!r})" - - @property - def input(self) -> Input: - if self._input is None: - from prompt_toolkit.input.defaults import create_input - - self._input = create_input() - return self._input - - @property - def output(self) -> Output: - if self._output is None: - from prompt_toolkit.output.defaults import create_output - - self._output = create_output() - return self._output - - -_current_app_session: ContextVar[AppSession] = ContextVar( - "_current_app_session", default=AppSession() -) - - -def get_app_session() -> AppSession: - return _current_app_session.get() - - -def get_app() -> Application[Any]: - """ - Get the current active (running) Application. - An :class:`.Application` is active during the - :meth:`.Application.run_async` call. - - We assume that there can only be one :class:`.Application` active at the - same time. There is only one terminal window, with only one stdin and - stdout. This makes the code significantly easier than passing around the - :class:`.Application` everywhere. - - If no :class:`.Application` is running, then return by default a - :class:`.DummyApplication`. For practical reasons, we prefer to not raise - an exception. This way, we don't have to check all over the place whether - an actual `Application` was returned. - - (For applications like pymux where we can have more than one `Application`, - we'll use a work-around to handle that.) - """ - session = _current_app_session.get() - if session.app is not None: - return session.app - - from .dummy import DummyApplication - - return DummyApplication() - - -def get_app_or_none() -> Application[Any] | None: - """ - Get the current active (running) Application, or return `None` if no - application is running. - """ - session = _current_app_session.get() - return session.app - - -@contextmanager -def set_app(app: Application[Any]) -> Generator[None, None, None]: - """ - Context manager that sets the given :class:`.Application` active in an - `AppSession`. - - This should only be called by the `Application` itself. - The application will automatically be active while its running. If you want - the application to be active in other threads/coroutines, where that's not - the case, use `contextvars.copy_context()`, or use `Application.context` to - run it in the appropriate context. - """ - session = _current_app_session.get() - - previous_app = session.app - session.app = app - try: - yield - finally: - session.app = previous_app - - -@contextmanager -def create_app_session( - input: Input | None = None, output: Output | None = None -) -> Generator[AppSession, None, None]: - """ - Create a separate AppSession. - - This is useful if there can be multiple individual ``AppSession``'s going - on. Like in the case of a Telnet/SSH server. - """ - # If no input/output is specified, fall back to the current input/output, - # if there was one that was set/created for the current session. - # (Note that we check `_input`/`_output` and not `input`/`output`. This is - # because we don't want to accidentally create a new input/output objects - # here and store it in the "parent" `AppSession`. Especially, when - # combining pytest's `capsys` fixture and `create_app_session`, sys.stdin - # and sys.stderr are patched for every test, so we don't want to leak - # those outputs object across `AppSession`s.) - if input is None: - input = get_app_session()._input - if output is None: - output = get_app_session()._output - - # Create new `AppSession` and activate. - session = AppSession(input=input, output=output) - - token = _current_app_session.set(session) - try: - yield session - finally: - _current_app_session.reset(token) - - -@contextmanager -def create_app_session_from_tty() -> Generator[AppSession, None, None]: - """ - Create `AppSession` that always prefers the TTY input/output. - - Even if `sys.stdin` and `sys.stdout` are connected to input/output pipes, - this will still use the terminal for interaction (because `sys.stderr` is - still connected to the terminal). - - Usage:: - - from prompt_toolkit.shortcuts import prompt - - with create_app_session_from_tty(): - prompt('>') - """ - from prompt_toolkit.input.defaults import create_input - from prompt_toolkit.output.defaults import create_output - - input = create_input(always_prefer_tty=True) - output = create_output(always_prefer_tty=True) - - with create_app_session(input=input, output=output) as app_session: - yield app_session diff --git a/voxvera/vendor/prompt_toolkit/application/dummy.py b/voxvera/vendor/prompt_toolkit/application/dummy.py deleted file mode 100644 index 43819e1..0000000 --- a/voxvera/vendor/prompt_toolkit/application/dummy.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import annotations - -from typing import Callable - -from prompt_toolkit.eventloop import InputHook -from prompt_toolkit.formatted_text import AnyFormattedText -from prompt_toolkit.input import DummyInput -from prompt_toolkit.output import DummyOutput - -from .application import Application - -__all__ = [ - "DummyApplication", -] - - -class DummyApplication(Application[None]): - """ - When no :class:`.Application` is running, - :func:`.get_app` will run an instance of this :class:`.DummyApplication` instead. - """ - - def __init__(self) -> None: - super().__init__(output=DummyOutput(), input=DummyInput()) - - def run( - self, - pre_run: Callable[[], None] | None = None, - set_exception_handler: bool = True, - handle_sigint: bool = True, - in_thread: bool = False, - inputhook: InputHook | None = None, - ) -> None: - raise NotImplementedError("A DummyApplication is not supposed to run.") - - async def run_async( - self, - pre_run: Callable[[], None] | None = None, - set_exception_handler: bool = True, - handle_sigint: bool = True, - slow_callback_duration: float = 0.5, - ) -> None: - raise NotImplementedError("A DummyApplication is not supposed to run.") - - async def run_system_command( - self, - command: str, - wait_for_enter: bool = True, - display_before_text: AnyFormattedText = "", - wait_text: str = "", - ) -> None: - raise NotImplementedError - - def suspend_to_background(self, suspend_group: bool = True) -> None: - raise NotImplementedError diff --git a/voxvera/vendor/prompt_toolkit/application/run_in_terminal.py b/voxvera/vendor/prompt_toolkit/application/run_in_terminal.py deleted file mode 100644 index 1f5e18e..0000000 --- a/voxvera/vendor/prompt_toolkit/application/run_in_terminal.py +++ /dev/null @@ -1,117 +0,0 @@ -""" -Tools for running functions on the terminal above the current application or prompt. -""" - -from __future__ import annotations - -from asyncio import Future, ensure_future -from contextlib import asynccontextmanager -from typing import AsyncGenerator, Awaitable, Callable, TypeVar - -from prompt_toolkit.eventloop import run_in_executor_with_context - -from .current import get_app_or_none - -__all__ = [ - "run_in_terminal", - "in_terminal", -] - -_T = TypeVar("_T") - - -def run_in_terminal( - func: Callable[[], _T], render_cli_done: bool = False, in_executor: bool = False -) -> Awaitable[_T]: - """ - Run function on the terminal above the current application or prompt. - - What this does is first hiding the prompt, then running this callable - (which can safely output to the terminal), and then again rendering the - prompt which causes the output of this function to scroll above the - prompt. - - ``func`` is supposed to be a synchronous function. If you need an - asynchronous version of this function, use the ``in_terminal`` context - manager directly. - - :param func: The callable to execute. - :param render_cli_done: When True, render the interface in the - 'Done' state first, then execute the function. If False, - erase the interface first. - :param in_executor: When True, run in executor. (Use this for long - blocking functions, when you don't want to block the event loop.) - - :returns: A `Future`. - """ - - async def run() -> _T: - async with in_terminal(render_cli_done=render_cli_done): - if in_executor: - return await run_in_executor_with_context(func) - else: - return func() - - return ensure_future(run()) - - -@asynccontextmanager -async def in_terminal(render_cli_done: bool = False) -> AsyncGenerator[None, None]: - """ - Asynchronous context manager that suspends the current application and runs - the body in the terminal. - - .. code:: - - async def f(): - async with in_terminal(): - call_some_function() - await call_some_async_function() - """ - app = get_app_or_none() - if app is None or not app._is_running: - yield - return - - # When a previous `run_in_terminal` call was in progress. Wait for that - # to finish, before starting this one. Chain to previous call. - previous_run_in_terminal_f = app._running_in_terminal_f - new_run_in_terminal_f: Future[None] = Future() - app._running_in_terminal_f = new_run_in_terminal_f - - # Wait for the previous `run_in_terminal` to finish. - if previous_run_in_terminal_f is not None: - await previous_run_in_terminal_f - - # Wait for all CPRs to arrive. We don't want to detach the input until - # all cursor position responses have been arrived. Otherwise, the tty - # will echo its input and can show stuff like ^[[39;1R. - if app.output.responds_to_cpr: - await app.renderer.wait_for_cpr_responses() - - # Draw interface in 'done' state, or erase. - if render_cli_done: - app._redraw(render_as_done=True) - else: - app.renderer.erase() - - # Disable rendering. - app._running_in_terminal = True - - # Detach input. - try: - with app.input.detach(): - with app.input.cooked_mode(): - yield - finally: - # Redraw interface again. - try: - app._running_in_terminal = False - app.renderer.reset() - app._request_absolute_cursor_position() - app._redraw() - finally: - # (Check for `.done()`, because it can be that this future was - # cancelled.) - if not new_run_in_terminal_f.done(): - new_run_in_terminal_f.set_result(None) diff --git a/voxvera/vendor/prompt_toolkit/auto_suggest.py b/voxvera/vendor/prompt_toolkit/auto_suggest.py deleted file mode 100644 index 73213ba..0000000 --- a/voxvera/vendor/prompt_toolkit/auto_suggest.py +++ /dev/null @@ -1,177 +0,0 @@ -""" -`Fish-style `_ like auto-suggestion. - -While a user types input in a certain buffer, suggestions are generated -(asynchronously.) Usually, they are displayed after the input. When the cursor -presses the right arrow and the cursor is at the end of the input, the -suggestion will be inserted. - -If you want the auto suggestions to be asynchronous (in a background thread), -because they take too much time, and could potentially block the event loop, -then wrap the :class:`.AutoSuggest` instance into a -:class:`.ThreadedAutoSuggest`. -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import TYPE_CHECKING, Callable - -from prompt_toolkit.eventloop import run_in_executor_with_context - -from .document import Document -from .filters import Filter, to_filter - -if TYPE_CHECKING: - from .buffer import Buffer - -__all__ = [ - "Suggestion", - "AutoSuggest", - "ThreadedAutoSuggest", - "DummyAutoSuggest", - "AutoSuggestFromHistory", - "ConditionalAutoSuggest", - "DynamicAutoSuggest", -] - - -class Suggestion: - """ - Suggestion returned by an auto-suggest algorithm. - - :param text: The suggestion text. - """ - - def __init__(self, text: str) -> None: - self.text = text - - def __repr__(self) -> str: - return f"Suggestion({self.text})" - - -class AutoSuggest(metaclass=ABCMeta): - """ - Base class for auto suggestion implementations. - """ - - @abstractmethod - def get_suggestion(self, buffer: Buffer, document: Document) -> Suggestion | None: - """ - Return `None` or a :class:`.Suggestion` instance. - - We receive both :class:`~prompt_toolkit.buffer.Buffer` and - :class:`~prompt_toolkit.document.Document`. The reason is that auto - suggestions are retrieved asynchronously. (Like completions.) The - buffer text could be changed in the meantime, but ``document`` contains - the buffer document like it was at the start of the auto suggestion - call. So, from here, don't access ``buffer.text``, but use - ``document.text`` instead. - - :param buffer: The :class:`~prompt_toolkit.buffer.Buffer` instance. - :param document: The :class:`~prompt_toolkit.document.Document` instance. - """ - - async def get_suggestion_async( - self, buff: Buffer, document: Document - ) -> Suggestion | None: - """ - Return a :class:`.Future` which is set when the suggestions are ready. - This function can be overloaded in order to provide an asynchronous - implementation. - """ - return self.get_suggestion(buff, document) - - -class ThreadedAutoSuggest(AutoSuggest): - """ - Wrapper that runs auto suggestions in a thread. - (Use this to prevent the user interface from becoming unresponsive if the - generation of suggestions takes too much time.) - """ - - def __init__(self, auto_suggest: AutoSuggest) -> None: - self.auto_suggest = auto_suggest - - def get_suggestion(self, buff: Buffer, document: Document) -> Suggestion | None: - return self.auto_suggest.get_suggestion(buff, document) - - async def get_suggestion_async( - self, buff: Buffer, document: Document - ) -> Suggestion | None: - """ - Run the `get_suggestion` function in a thread. - """ - - def run_get_suggestion_thread() -> Suggestion | None: - return self.get_suggestion(buff, document) - - return await run_in_executor_with_context(run_get_suggestion_thread) - - -class DummyAutoSuggest(AutoSuggest): - """ - AutoSuggest class that doesn't return any suggestion. - """ - - def get_suggestion(self, buffer: Buffer, document: Document) -> Suggestion | None: - return None # No suggestion - - -class AutoSuggestFromHistory(AutoSuggest): - """ - Give suggestions based on the lines in the history. - """ - - def get_suggestion(self, buffer: Buffer, document: Document) -> Suggestion | None: - history = buffer.history - - # Consider only the last line for the suggestion. - text = document.text.rsplit("\n", 1)[-1] - - # Only create a suggestion when this is not an empty line. - if text.strip(): - # Find first matching line in history. - for string in reversed(list(history.get_strings())): - for line in reversed(string.splitlines()): - if line.startswith(text): - return Suggestion(line[len(text) :]) - - return None - - -class ConditionalAutoSuggest(AutoSuggest): - """ - Auto suggest that can be turned on and of according to a certain condition. - """ - - def __init__(self, auto_suggest: AutoSuggest, filter: bool | Filter) -> None: - self.auto_suggest = auto_suggest - self.filter = to_filter(filter) - - def get_suggestion(self, buffer: Buffer, document: Document) -> Suggestion | None: - if self.filter(): - return self.auto_suggest.get_suggestion(buffer, document) - - return None - - -class DynamicAutoSuggest(AutoSuggest): - """ - Validator class that can dynamically returns any Validator. - - :param get_validator: Callable that returns a :class:`.Validator` instance. - """ - - def __init__(self, get_auto_suggest: Callable[[], AutoSuggest | None]) -> None: - self.get_auto_suggest = get_auto_suggest - - def get_suggestion(self, buff: Buffer, document: Document) -> Suggestion | None: - auto_suggest = self.get_auto_suggest() or DummyAutoSuggest() - return auto_suggest.get_suggestion(buff, document) - - async def get_suggestion_async( - self, buff: Buffer, document: Document - ) -> Suggestion | None: - auto_suggest = self.get_auto_suggest() or DummyAutoSuggest() - return await auto_suggest.get_suggestion_async(buff, document) diff --git a/voxvera/vendor/prompt_toolkit/buffer.py b/voxvera/vendor/prompt_toolkit/buffer.py deleted file mode 100644 index f5847d4..0000000 --- a/voxvera/vendor/prompt_toolkit/buffer.py +++ /dev/null @@ -1,2029 +0,0 @@ -""" -Data structures for the Buffer. -It holds the text, cursor position, history, etc... -""" - -from __future__ import annotations - -import asyncio -import logging -import os -import re -import shlex -import shutil -import subprocess -import tempfile -from collections import deque -from enum import Enum -from functools import wraps -from typing import Any, Callable, Coroutine, Iterable, TypeVar, cast - -from .application.current import get_app -from .application.run_in_terminal import run_in_terminal -from .auto_suggest import AutoSuggest, Suggestion -from .cache import FastDictCache -from .clipboard import ClipboardData -from .completion import ( - CompleteEvent, - Completer, - Completion, - DummyCompleter, - get_common_complete_suffix, -) -from .document import Document -from .eventloop import aclosing -from .filters import FilterOrBool, to_filter -from .history import History, InMemoryHistory -from .search import SearchDirection, SearchState -from .selection import PasteMode, SelectionState, SelectionType -from .utils import Event, to_str -from .validation import ValidationError, Validator - -__all__ = [ - "EditReadOnlyBuffer", - "Buffer", - "CompletionState", - "indent", - "unindent", - "reshape_text", -] - -logger = logging.getLogger(__name__) - - -class EditReadOnlyBuffer(Exception): - "Attempt editing of read-only :class:`.Buffer`." - - -class ValidationState(Enum): - "The validation state of a buffer. This is set after the validation." - - VALID = "VALID" - INVALID = "INVALID" - UNKNOWN = "UNKNOWN" - - -class CompletionState: - """ - Immutable class that contains a completion state. - """ - - def __init__( - self, - original_document: Document, - completions: list[Completion] | None = None, - complete_index: int | None = None, - ) -> None: - #: Document as it was when the completion started. - self.original_document = original_document - - #: List of all the current Completion instances which are possible at - #: this point. - self.completions = completions or [] - - #: Position in the `completions` array. - #: This can be `None` to indicate "no completion", the original text. - self.complete_index = complete_index # Position in the `_completions` array. - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.original_document!r}, <{len(self.completions)!r}> completions, index={self.complete_index!r})" - - def go_to_index(self, index: int | None) -> None: - """ - Create a new :class:`.CompletionState` object with the new index. - - When `index` is `None` deselect the completion. - """ - if self.completions: - assert index is None or 0 <= index < len(self.completions) - self.complete_index = index - - def new_text_and_position(self) -> tuple[str, int]: - """ - Return (new_text, new_cursor_position) for this completion. - """ - if self.complete_index is None: - return self.original_document.text, self.original_document.cursor_position - else: - original_text_before_cursor = self.original_document.text_before_cursor - original_text_after_cursor = self.original_document.text_after_cursor - - c = self.completions[self.complete_index] - if c.start_position == 0: - before = original_text_before_cursor - else: - before = original_text_before_cursor[: c.start_position] - - new_text = before + c.text + original_text_after_cursor - new_cursor_position = len(before) + len(c.text) - return new_text, new_cursor_position - - @property - def current_completion(self) -> Completion | None: - """ - Return the current completion, or return `None` when no completion is - selected. - """ - if self.complete_index is not None: - return self.completions[self.complete_index] - return None - - -_QUOTED_WORDS_RE = re.compile(r"""(\s+|".*?"|'.*?')""") - - -class YankNthArgState: - """ - For yank-last-arg/yank-nth-arg: Keep track of where we are in the history. - """ - - def __init__( - self, history_position: int = 0, n: int = -1, previous_inserted_word: str = "" - ) -> None: - self.history_position = history_position - self.previous_inserted_word = previous_inserted_word - self.n = n - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(history_position={self.history_position!r}, n={self.n!r}, previous_inserted_word={self.previous_inserted_word!r})" - - -BufferEventHandler = Callable[["Buffer"], None] -BufferAcceptHandler = Callable[["Buffer"], bool] - - -class Buffer: - """ - The core data structure that holds the text and cursor position of the - current input line and implements all text manipulations on top of it. It - also implements the history, undo stack and the completion state. - - :param completer: :class:`~prompt_toolkit.completion.Completer` instance. - :param history: :class:`~prompt_toolkit.history.History` instance. - :param tempfile_suffix: The tempfile suffix (extension) to be used for the - "open in editor" function. For a Python REPL, this would be ".py", so - that the editor knows the syntax highlighting to use. This can also be - a callable that returns a string. - :param tempfile: For more advanced tempfile situations where you need - control over the subdirectories and filename. For a Git Commit Message, - this would be ".git/COMMIT_EDITMSG", so that the editor knows the syntax - highlighting to use. This can also be a callable that returns a string. - :param name: Name for this buffer. E.g. DEFAULT_BUFFER. This is mostly - useful for key bindings where we sometimes prefer to refer to a buffer - by their name instead of by reference. - :param accept_handler: Called when the buffer input is accepted. (Usually - when the user presses `enter`.) The accept handler receives this - `Buffer` as input and should return True when the buffer text should be - kept instead of calling reset. - - In case of a `PromptSession` for instance, we want to keep the text, - because we will exit the application, and only reset it during the next - run. - :param max_number_of_completions: Never display more than this number of - completions, even when the completer can produce more (limited by - default to 10k for performance). - - Events: - - :param on_text_changed: When the buffer text changes. (Callable or None.) - :param on_text_insert: When new text is inserted. (Callable or None.) - :param on_cursor_position_changed: When the cursor moves. (Callable or None.) - :param on_completions_changed: When the completions were changed. (Callable or None.) - :param on_suggestion_set: When an auto-suggestion text has been set. (Callable or None.) - - Filters: - - :param complete_while_typing: :class:`~prompt_toolkit.filters.Filter` - or `bool`. Decide whether or not to do asynchronous autocompleting while - typing. - :param validate_while_typing: :class:`~prompt_toolkit.filters.Filter` - or `bool`. Decide whether or not to do asynchronous validation while - typing. - :param enable_history_search: :class:`~prompt_toolkit.filters.Filter` or - `bool` to indicate when up-arrow partial string matching is enabled. It - is advised to not enable this at the same time as - `complete_while_typing`, because when there is an autocompletion found, - the up arrows usually browse through the completions, rather than - through the history. - :param read_only: :class:`~prompt_toolkit.filters.Filter`. When True, - changes will not be allowed. - :param multiline: :class:`~prompt_toolkit.filters.Filter` or `bool`. When - not set, pressing `Enter` will call the `accept_handler`. Otherwise, - pressing `Esc-Enter` is required. - """ - - def __init__( - self, - completer: Completer | None = None, - auto_suggest: AutoSuggest | None = None, - history: History | None = None, - validator: Validator | None = None, - tempfile_suffix: str | Callable[[], str] = "", - tempfile: str | Callable[[], str] = "", - name: str = "", - complete_while_typing: FilterOrBool = False, - validate_while_typing: FilterOrBool = False, - enable_history_search: FilterOrBool = False, - document: Document | None = None, - accept_handler: BufferAcceptHandler | None = None, - read_only: FilterOrBool = False, - multiline: FilterOrBool = True, - max_number_of_completions: int = 10000, - on_text_changed: BufferEventHandler | None = None, - on_text_insert: BufferEventHandler | None = None, - on_cursor_position_changed: BufferEventHandler | None = None, - on_completions_changed: BufferEventHandler | None = None, - on_suggestion_set: BufferEventHandler | None = None, - ) -> None: - # Accept both filters and booleans as input. - enable_history_search = to_filter(enable_history_search) - complete_while_typing = to_filter(complete_while_typing) - validate_while_typing = to_filter(validate_while_typing) - read_only = to_filter(read_only) - multiline = to_filter(multiline) - - self.completer = completer or DummyCompleter() - self.auto_suggest = auto_suggest - self.validator = validator - self.tempfile_suffix = tempfile_suffix - self.tempfile = tempfile - self.name = name - self.accept_handler = accept_handler - - # Filters. (Usually, used by the key bindings to drive the buffer.) - self.complete_while_typing = complete_while_typing - self.validate_while_typing = validate_while_typing - self.enable_history_search = enable_history_search - self.read_only = read_only - self.multiline = multiline - self.max_number_of_completions = max_number_of_completions - - # Text width. (For wrapping, used by the Vi 'gq' operator.) - self.text_width = 0 - - #: The command buffer history. - # Note that we shouldn't use a lazy 'or' here. bool(history) could be - # False when empty. - self.history = InMemoryHistory() if history is None else history - - self.__cursor_position = 0 - - # Events - self.on_text_changed: Event[Buffer] = Event(self, on_text_changed) - self.on_text_insert: Event[Buffer] = Event(self, on_text_insert) - self.on_cursor_position_changed: Event[Buffer] = Event( - self, on_cursor_position_changed - ) - self.on_completions_changed: Event[Buffer] = Event(self, on_completions_changed) - self.on_suggestion_set: Event[Buffer] = Event(self, on_suggestion_set) - - # Document cache. (Avoid creating new Document instances.) - self._document_cache: FastDictCache[ - tuple[str, int, SelectionState | None], Document - ] = FastDictCache(Document, size=10) - - # Create completer / auto suggestion / validation coroutines. - self._async_suggester = self._create_auto_suggest_coroutine() - self._async_completer = self._create_completer_coroutine() - self._async_validator = self._create_auto_validate_coroutine() - - # Asyncio task for populating the history. - self._load_history_task: asyncio.Future[None] | None = None - - # Reset other attributes. - self.reset(document=document) - - def __repr__(self) -> str: - if len(self.text) < 15: - text = self.text - else: - text = self.text[:12] + "..." - - return f"" - - def reset( - self, document: Document | None = None, append_to_history: bool = False - ) -> None: - """ - :param append_to_history: Append current input to history first. - """ - if append_to_history: - self.append_to_history() - - document = document or Document() - - self.__cursor_position = document.cursor_position - - # `ValidationError` instance. (Will be set when the input is wrong.) - self.validation_error: ValidationError | None = None - self.validation_state: ValidationState | None = ValidationState.UNKNOWN - - # State of the selection. - self.selection_state: SelectionState | None = None - - # Multiple cursor mode. (When we press 'I' or 'A' in visual-block mode, - # we can insert text on multiple lines at once. This is implemented by - # using multiple cursors.) - self.multiple_cursor_positions: list[int] = [] - - # When doing consecutive up/down movements, prefer to stay at this column. - self.preferred_column: int | None = None - - # State of complete browser - # For interactive completion through Ctrl-N/Ctrl-P. - self.complete_state: CompletionState | None = None - - # State of Emacs yank-nth-arg completion. - self.yank_nth_arg_state: YankNthArgState | None = None # for yank-nth-arg. - - # Remember the document that we had *right before* the last paste - # operation. This is used for rotating through the kill ring. - self.document_before_paste: Document | None = None - - # Current suggestion. - self.suggestion: Suggestion | None = None - - # The history search text. (Used for filtering the history when we - # browse through it.) - self.history_search_text: str | None = None - - # Undo/redo stacks (stack of `(text, cursor_position)`). - self._undo_stack: list[tuple[str, int]] = [] - self._redo_stack: list[tuple[str, int]] = [] - - # Cancel history loader. If history loading was still ongoing. - # Cancel the `_load_history_task`, so that next repaint of the - # `BufferControl` we will repopulate it. - if self._load_history_task is not None: - self._load_history_task.cancel() - self._load_history_task = None - - #: The working lines. Similar to history, except that this can be - #: modified. The user can press arrow_up and edit previous entries. - #: Ctrl-C should reset this, and copy the whole history back in here. - #: Enter should process the current command and append to the real - #: history. - self._working_lines: deque[str] = deque([document.text]) - self.__working_index = 0 - - def load_history_if_not_yet_loaded(self) -> None: - """ - Create task for populating the buffer history (if not yet done). - - Note:: - - This needs to be called from within the event loop of the - application, because history loading is async, and we need to be - sure the right event loop is active. Therefor, we call this method - in the `BufferControl.create_content`. - - There are situations where prompt_toolkit applications are created - in one thread, but will later run in a different thread (Ptpython - is one example. The REPL runs in a separate thread, in order to - prevent interfering with a potential different event loop in the - main thread. The REPL UI however is still created in the main - thread.) We could decide to not support creating prompt_toolkit - objects in one thread and running the application in a different - thread, but history loading is the only place where it matters, and - this solves it. - """ - if self._load_history_task is None: - - async def load_history() -> None: - async for item in self.history.load(): - self._working_lines.appendleft(item) - self.__working_index += 1 - - self._load_history_task = get_app().create_background_task(load_history()) - - def load_history_done(f: asyncio.Future[None]) -> None: - """ - Handle `load_history` result when either done, cancelled, or - when an exception was raised. - """ - try: - f.result() - except asyncio.CancelledError: - # Ignore cancellation. But handle it, so that we don't get - # this traceback. - pass - except GeneratorExit: - # Probably not needed, but we had situations where - # `GeneratorExit` was raised in `load_history` during - # cancellation. - pass - except BaseException: - # Log error if something goes wrong. (We don't have a - # caller to which we can propagate this exception.) - logger.exception("Loading history failed") - - self._load_history_task.add_done_callback(load_history_done) - - # - - def _set_text(self, value: str) -> bool: - """set text at current working_index. Return whether it changed.""" - working_index = self.working_index - working_lines = self._working_lines - - original_value = working_lines[working_index] - working_lines[working_index] = value - - # Return True when this text has been changed. - if len(value) != len(original_value): - # For Python 2, it seems that when two strings have a different - # length and one is a prefix of the other, Python still scans - # character by character to see whether the strings are different. - # (Some benchmarking showed significant differences for big - # documents. >100,000 of lines.) - return True - elif value != original_value: - return True - return False - - def _set_cursor_position(self, value: int) -> bool: - """Set cursor position. Return whether it changed.""" - original_position = self.__cursor_position - self.__cursor_position = max(0, value) - - return self.__cursor_position != original_position - - @property - def text(self) -> str: - return self._working_lines[self.working_index] - - @text.setter - def text(self, value: str) -> None: - """ - Setting text. (When doing this, make sure that the cursor_position is - valid for this text. text/cursor_position should be consistent at any time, - otherwise set a Document instead.) - """ - # Ensure cursor position remains within the size of the text. - if self.cursor_position > len(value): - self.cursor_position = len(value) - - # Don't allow editing of read-only buffers. - if self.read_only(): - raise EditReadOnlyBuffer() - - changed = self._set_text(value) - - if changed: - self._text_changed() - - # Reset history search text. - # (Note that this doesn't need to happen when working_index - # changes, which is when we traverse the history. That's why we - # don't do this in `self._text_changed`.) - self.history_search_text = None - - @property - def cursor_position(self) -> int: - return self.__cursor_position - - @cursor_position.setter - def cursor_position(self, value: int) -> None: - """ - Setting cursor position. - """ - assert isinstance(value, int) - - # Ensure cursor position is within the size of the text. - if value > len(self.text): - value = len(self.text) - if value < 0: - value = 0 - - changed = self._set_cursor_position(value) - - if changed: - self._cursor_position_changed() - - @property - def working_index(self) -> int: - return self.__working_index - - @working_index.setter - def working_index(self, value: int) -> None: - if self.__working_index != value: - self.__working_index = value - # Make sure to reset the cursor position, otherwise we end up in - # situations where the cursor position is out of the bounds of the - # text. - self.cursor_position = 0 - self._text_changed() - - def _text_changed(self) -> None: - # Remove any validation errors and complete state. - self.validation_error = None - self.validation_state = ValidationState.UNKNOWN - self.complete_state = None - self.yank_nth_arg_state = None - self.document_before_paste = None - self.selection_state = None - self.suggestion = None - self.preferred_column = None - - # fire 'on_text_changed' event. - self.on_text_changed.fire() - - # Input validation. - # (This happens on all change events, unlike auto completion, also when - # deleting text.) - if self.validator and self.validate_while_typing(): - get_app().create_background_task(self._async_validator()) - - def _cursor_position_changed(self) -> None: - # Remove any complete state. - # (Input validation should only be undone when the cursor position - # changes.) - self.complete_state = None - self.yank_nth_arg_state = None - self.document_before_paste = None - - # Unset preferred_column. (Will be set after the cursor movement, if - # required.) - self.preferred_column = None - - # Note that the cursor position can change if we have a selection the - # new position of the cursor determines the end of the selection. - - # fire 'on_cursor_position_changed' event. - self.on_cursor_position_changed.fire() - - @property - def document(self) -> Document: - """ - Return :class:`~prompt_toolkit.document.Document` instance from the - current text, cursor position and selection state. - """ - return self._document_cache[ - self.text, self.cursor_position, self.selection_state - ] - - @document.setter - def document(self, value: Document) -> None: - """ - Set :class:`~prompt_toolkit.document.Document` instance. - - This will set both the text and cursor position at the same time, but - atomically. (Change events will be triggered only after both have been set.) - """ - self.set_document(value) - - def set_document(self, value: Document, bypass_readonly: bool = False) -> None: - """ - Set :class:`~prompt_toolkit.document.Document` instance. Like the - ``document`` property, but accept an ``bypass_readonly`` argument. - - :param bypass_readonly: When True, don't raise an - :class:`.EditReadOnlyBuffer` exception, even - when the buffer is read-only. - - .. warning:: - - When this buffer is read-only and `bypass_readonly` was not passed, - the `EditReadOnlyBuffer` exception will be caught by the - `KeyProcessor` and is silently suppressed. This is important to - keep in mind when writing key bindings, because it won't do what - you expect, and there won't be a stack trace. Use try/finally - around this function if you need some cleanup code. - """ - # Don't allow editing of read-only buffers. - if not bypass_readonly and self.read_only(): - raise EditReadOnlyBuffer() - - # Set text and cursor position first. - text_changed = self._set_text(value.text) - cursor_position_changed = self._set_cursor_position(value.cursor_position) - - # Now handle change events. (We do this when text/cursor position is - # both set and consistent.) - if text_changed: - self._text_changed() - self.history_search_text = None - - if cursor_position_changed: - self._cursor_position_changed() - - @property - def is_returnable(self) -> bool: - """ - True when there is something handling accept. - """ - return bool(self.accept_handler) - - # End of - - def save_to_undo_stack(self, clear_redo_stack: bool = True) -> None: - """ - Safe current state (input text and cursor position), so that we can - restore it by calling undo. - """ - # Safe if the text is different from the text at the top of the stack - # is different. If the text is the same, just update the cursor position. - if self._undo_stack and self._undo_stack[-1][0] == self.text: - self._undo_stack[-1] = (self._undo_stack[-1][0], self.cursor_position) - else: - self._undo_stack.append((self.text, self.cursor_position)) - - # Saving anything to the undo stack, clears the redo stack. - if clear_redo_stack: - self._redo_stack = [] - - def transform_lines( - self, - line_index_iterator: Iterable[int], - transform_callback: Callable[[str], str], - ) -> str: - """ - Transforms the text on a range of lines. - When the iterator yield an index not in the range of lines that the - document contains, it skips them silently. - - To uppercase some lines:: - - new_text = transform_lines(range(5,10), lambda text: text.upper()) - - :param line_index_iterator: Iterator of line numbers (int) - :param transform_callback: callable that takes the original text of a - line, and return the new text for this line. - - :returns: The new text. - """ - # Split lines - lines = self.text.split("\n") - - # Apply transformation - for index in line_index_iterator: - try: - lines[index] = transform_callback(lines[index]) - except IndexError: - pass - - return "\n".join(lines) - - def transform_current_line(self, transform_callback: Callable[[str], str]) -> None: - """ - Apply the given transformation function to the current line. - - :param transform_callback: callable that takes a string and return a new string. - """ - document = self.document - a = document.cursor_position + document.get_start_of_line_position() - b = document.cursor_position + document.get_end_of_line_position() - self.text = ( - document.text[:a] - + transform_callback(document.text[a:b]) - + document.text[b:] - ) - - def transform_region( - self, from_: int, to: int, transform_callback: Callable[[str], str] - ) -> None: - """ - Transform a part of the input string. - - :param from_: (int) start position. - :param to: (int) end position. - :param transform_callback: Callable which accepts a string and returns - the transformed string. - """ - assert from_ < to - - self.text = "".join( - [ - self.text[:from_] - + transform_callback(self.text[from_:to]) - + self.text[to:] - ] - ) - - def cursor_left(self, count: int = 1) -> None: - self.cursor_position += self.document.get_cursor_left_position(count=count) - - def cursor_right(self, count: int = 1) -> None: - self.cursor_position += self.document.get_cursor_right_position(count=count) - - def cursor_up(self, count: int = 1) -> None: - """(for multiline edit). Move cursor to the previous line.""" - original_column = self.preferred_column or self.document.cursor_position_col - self.cursor_position += self.document.get_cursor_up_position( - count=count, preferred_column=original_column - ) - - # Remember the original column for the next up/down movement. - self.preferred_column = original_column - - def cursor_down(self, count: int = 1) -> None: - """(for multiline edit). Move cursor to the next line.""" - original_column = self.preferred_column or self.document.cursor_position_col - self.cursor_position += self.document.get_cursor_down_position( - count=count, preferred_column=original_column - ) - - # Remember the original column for the next up/down movement. - self.preferred_column = original_column - - def auto_up( - self, count: int = 1, go_to_start_of_line_if_history_changes: bool = False - ) -> None: - """ - If we're not on the first line (of a multiline input) go a line up, - otherwise go back in history. (If nothing is selected.) - """ - if self.complete_state: - self.complete_previous(count=count) - elif self.document.cursor_position_row > 0: - self.cursor_up(count=count) - elif not self.selection_state: - self.history_backward(count=count) - - # Go to the start of the line? - if go_to_start_of_line_if_history_changes: - self.cursor_position += self.document.get_start_of_line_position() - - def auto_down( - self, count: int = 1, go_to_start_of_line_if_history_changes: bool = False - ) -> None: - """ - If we're not on the last line (of a multiline input) go a line down, - otherwise go forward in history. (If nothing is selected.) - """ - if self.complete_state: - self.complete_next(count=count) - elif self.document.cursor_position_row < self.document.line_count - 1: - self.cursor_down(count=count) - elif not self.selection_state: - self.history_forward(count=count) - - # Go to the start of the line? - if go_to_start_of_line_if_history_changes: - self.cursor_position += self.document.get_start_of_line_position() - - def delete_before_cursor(self, count: int = 1) -> str: - """ - Delete specified number of characters before cursor and return the - deleted text. - """ - assert count >= 0 - deleted = "" - - if self.cursor_position > 0: - deleted = self.text[self.cursor_position - count : self.cursor_position] - - new_text = ( - self.text[: self.cursor_position - count] - + self.text[self.cursor_position :] - ) - new_cursor_position = self.cursor_position - len(deleted) - - # Set new Document atomically. - self.document = Document(new_text, new_cursor_position) - - return deleted - - def delete(self, count: int = 1) -> str: - """ - Delete specified number of characters and Return the deleted text. - """ - if self.cursor_position < len(self.text): - deleted = self.document.text_after_cursor[:count] - self.text = ( - self.text[: self.cursor_position] - + self.text[self.cursor_position + len(deleted) :] - ) - return deleted - else: - return "" - - def join_next_line(self, separator: str = " ") -> None: - """ - Join the next line to the current one by deleting the line ending after - the current line. - """ - if not self.document.on_last_line: - self.cursor_position += self.document.get_end_of_line_position() - self.delete() - - # Remove spaces. - self.text = ( - self.document.text_before_cursor - + separator - + self.document.text_after_cursor.lstrip(" ") - ) - - def join_selected_lines(self, separator: str = " ") -> None: - """ - Join the selected lines. - """ - assert self.selection_state - - # Get lines. - from_, to = sorted( - [self.cursor_position, self.selection_state.original_cursor_position] - ) - - before = self.text[:from_] - lines = self.text[from_:to].splitlines() - after = self.text[to:] - - # Replace leading spaces with just one space. - lines = [l.lstrip(" ") + separator for l in lines] - - # Set new document. - self.document = Document( - text=before + "".join(lines) + after, - cursor_position=len(before + "".join(lines[:-1])) - 1, - ) - - def swap_characters_before_cursor(self) -> None: - """ - Swap the last two characters before the cursor. - """ - pos = self.cursor_position - - if pos >= 2: - a = self.text[pos - 2] - b = self.text[pos - 1] - - self.text = self.text[: pos - 2] + b + a + self.text[pos:] - - def go_to_history(self, index: int) -> None: - """ - Go to this item in the history. - """ - if index < len(self._working_lines): - self.working_index = index - self.cursor_position = len(self.text) - - def complete_next(self, count: int = 1, disable_wrap_around: bool = False) -> None: - """ - Browse to the next completions. - (Does nothing if there are no completion.) - """ - index: int | None - - if self.complete_state: - completions_count = len(self.complete_state.completions) - - if self.complete_state.complete_index is None: - index = 0 - elif self.complete_state.complete_index == completions_count - 1: - index = None - - if disable_wrap_around: - return - else: - index = min( - completions_count - 1, self.complete_state.complete_index + count - ) - self.go_to_completion(index) - - def complete_previous( - self, count: int = 1, disable_wrap_around: bool = False - ) -> None: - """ - Browse to the previous completions. - (Does nothing if there are no completion.) - """ - index: int | None - - if self.complete_state: - if self.complete_state.complete_index == 0: - index = None - - if disable_wrap_around: - return - elif self.complete_state.complete_index is None: - index = len(self.complete_state.completions) - 1 - else: - index = max(0, self.complete_state.complete_index - count) - - self.go_to_completion(index) - - def cancel_completion(self) -> None: - """ - Cancel completion, go back to the original text. - """ - if self.complete_state: - self.go_to_completion(None) - self.complete_state = None - - def _set_completions(self, completions: list[Completion]) -> CompletionState: - """ - Start completions. (Generate list of completions and initialize.) - - By default, no completion will be selected. - """ - self.complete_state = CompletionState( - original_document=self.document, completions=completions - ) - - # Trigger event. This should eventually invalidate the layout. - self.on_completions_changed.fire() - - return self.complete_state - - def start_history_lines_completion(self) -> None: - """ - Start a completion based on all the other lines in the document and the - history. - """ - found_completions: set[str] = set() - completions = [] - - # For every line of the whole history, find matches with the current line. - current_line = self.document.current_line_before_cursor.lstrip() - - for i, string in enumerate(self._working_lines): - for j, l in enumerate(string.split("\n")): - l = l.strip() - if l and l.startswith(current_line): - # When a new line has been found. - if l not in found_completions: - found_completions.add(l) - - # Create completion. - if i == self.working_index: - display_meta = "Current, line %s" % (j + 1) - else: - display_meta = f"History {i + 1}, line {j + 1}" - - completions.append( - Completion( - text=l, - start_position=-len(current_line), - display_meta=display_meta, - ) - ) - - self._set_completions(completions=completions[::-1]) - self.go_to_completion(0) - - def go_to_completion(self, index: int | None) -> None: - """ - Select a completion from the list of current completions. - """ - assert self.complete_state - - # Set new completion - state = self.complete_state - state.go_to_index(index) - - # Set text/cursor position - new_text, new_cursor_position = state.new_text_and_position() - self.document = Document(new_text, new_cursor_position) - - # (changing text/cursor position will unset complete_state.) - self.complete_state = state - - def apply_completion(self, completion: Completion) -> None: - """ - Insert a given completion. - """ - # If there was already a completion active, cancel that one. - if self.complete_state: - self.go_to_completion(None) - self.complete_state = None - - # Insert text from the given completion. - self.delete_before_cursor(-completion.start_position) - self.insert_text(completion.text) - - def _set_history_search(self) -> None: - """ - Set `history_search_text`. - (The text before the cursor will be used for filtering the history.) - """ - if self.enable_history_search(): - if self.history_search_text is None: - self.history_search_text = self.document.text_before_cursor - else: - self.history_search_text = None - - def _history_matches(self, i: int) -> bool: - """ - True when the current entry matches the history search. - (when we don't have history search, it's also True.) - """ - return self.history_search_text is None or self._working_lines[i].startswith( - self.history_search_text - ) - - def history_forward(self, count: int = 1) -> None: - """ - Move forwards through the history. - - :param count: Amount of items to move forward. - """ - self._set_history_search() - - # Go forward in history. - found_something = False - - for i in range(self.working_index + 1, len(self._working_lines)): - if self._history_matches(i): - self.working_index = i - count -= 1 - found_something = True - if count == 0: - break - - # If we found an entry, move cursor to the end of the first line. - if found_something: - self.cursor_position = 0 - self.cursor_position += self.document.get_end_of_line_position() - - def history_backward(self, count: int = 1) -> None: - """ - Move backwards through history. - """ - self._set_history_search() - - # Go back in history. - found_something = False - - for i in range(self.working_index - 1, -1, -1): - if self._history_matches(i): - self.working_index = i - count -= 1 - found_something = True - if count == 0: - break - - # If we move to another entry, move cursor to the end of the line. - if found_something: - self.cursor_position = len(self.text) - - def yank_nth_arg(self, n: int | None = None, _yank_last_arg: bool = False) -> None: - """ - Pick nth word from previous history entry (depending on current - `yank_nth_arg_state`) and insert it at current position. Rotate through - history if called repeatedly. If no `n` has been given, take the first - argument. (The second word.) - - :param n: (None or int), The index of the word from the previous line - to take. - """ - assert n is None or isinstance(n, int) - history_strings = self.history.get_strings() - - if not len(history_strings): - return - - # Make sure we have a `YankNthArgState`. - if self.yank_nth_arg_state is None: - state = YankNthArgState(n=-1 if _yank_last_arg else 1) - else: - state = self.yank_nth_arg_state - - if n is not None: - state.n = n - - # Get new history position. - new_pos = state.history_position - 1 - if -new_pos > len(history_strings): - new_pos = -1 - - # Take argument from line. - line = history_strings[new_pos] - - words = [w.strip() for w in _QUOTED_WORDS_RE.split(line)] - words = [w for w in words if w] - try: - word = words[state.n] - except IndexError: - word = "" - - # Insert new argument. - if state.previous_inserted_word: - self.delete_before_cursor(len(state.previous_inserted_word)) - self.insert_text(word) - - # Save state again for next completion. (Note that the 'insert' - # operation from above clears `self.yank_nth_arg_state`.) - state.previous_inserted_word = word - state.history_position = new_pos - self.yank_nth_arg_state = state - - def yank_last_arg(self, n: int | None = None) -> None: - """ - Like `yank_nth_arg`, but if no argument has been given, yank the last - word by default. - """ - self.yank_nth_arg(n=n, _yank_last_arg=True) - - def start_selection( - self, selection_type: SelectionType = SelectionType.CHARACTERS - ) -> None: - """ - Take the current cursor position as the start of this selection. - """ - self.selection_state = SelectionState(self.cursor_position, selection_type) - - def copy_selection(self, _cut: bool = False) -> ClipboardData: - """ - Copy selected text and return :class:`.ClipboardData` instance. - - Notice that this doesn't store the copied data on the clipboard yet. - You can store it like this: - - .. code:: python - - data = buffer.copy_selection() - get_app().clipboard.set_data(data) - """ - new_document, clipboard_data = self.document.cut_selection() - if _cut: - self.document = new_document - - self.selection_state = None - return clipboard_data - - def cut_selection(self) -> ClipboardData: - """ - Delete selected text and return :class:`.ClipboardData` instance. - """ - return self.copy_selection(_cut=True) - - def paste_clipboard_data( - self, - data: ClipboardData, - paste_mode: PasteMode = PasteMode.EMACS, - count: int = 1, - ) -> None: - """ - Insert the data from the clipboard. - """ - assert isinstance(data, ClipboardData) - assert paste_mode in (PasteMode.VI_BEFORE, PasteMode.VI_AFTER, PasteMode.EMACS) - - original_document = self.document - self.document = self.document.paste_clipboard_data( - data, paste_mode=paste_mode, count=count - ) - - # Remember original document. This assignment should come at the end, - # because assigning to 'document' will erase it. - self.document_before_paste = original_document - - def newline(self, copy_margin: bool = True) -> None: - """ - Insert a line ending at the current position. - """ - if copy_margin: - self.insert_text("\n" + self.document.leading_whitespace_in_current_line) - else: - self.insert_text("\n") - - def insert_line_above(self, copy_margin: bool = True) -> None: - """ - Insert a new line above the current one. - """ - if copy_margin: - insert = self.document.leading_whitespace_in_current_line + "\n" - else: - insert = "\n" - - self.cursor_position += self.document.get_start_of_line_position() - self.insert_text(insert) - self.cursor_position -= 1 - - def insert_line_below(self, copy_margin: bool = True) -> None: - """ - Insert a new line below the current one. - """ - if copy_margin: - insert = "\n" + self.document.leading_whitespace_in_current_line - else: - insert = "\n" - - self.cursor_position += self.document.get_end_of_line_position() - self.insert_text(insert) - - def insert_text( - self, - data: str, - overwrite: bool = False, - move_cursor: bool = True, - fire_event: bool = True, - ) -> None: - """ - Insert characters at cursor position. - - :param fire_event: Fire `on_text_insert` event. This is mainly used to - trigger autocompletion while typing. - """ - # Original text & cursor position. - otext = self.text - ocpos = self.cursor_position - - # In insert/text mode. - if overwrite: - # Don't overwrite the newline itself. Just before the line ending, - # it should act like insert mode. - overwritten_text = otext[ocpos : ocpos + len(data)] - if "\n" in overwritten_text: - overwritten_text = overwritten_text[: overwritten_text.find("\n")] - - text = otext[:ocpos] + data + otext[ocpos + len(overwritten_text) :] - else: - text = otext[:ocpos] + data + otext[ocpos:] - - if move_cursor: - cpos = self.cursor_position + len(data) - else: - cpos = self.cursor_position - - # Set new document. - # (Set text and cursor position at the same time. Otherwise, setting - # the text will fire a change event before the cursor position has been - # set. It works better to have this atomic.) - self.document = Document(text, cpos) - - # Fire 'on_text_insert' event. - if fire_event: # XXX: rename to `start_complete`. - self.on_text_insert.fire() - - # Only complete when "complete_while_typing" is enabled. - if self.completer and self.complete_while_typing(): - get_app().create_background_task(self._async_completer()) - - # Call auto_suggest. - if self.auto_suggest: - get_app().create_background_task(self._async_suggester()) - - def undo(self) -> None: - # Pop from the undo-stack until we find a text that if different from - # the current text. (The current logic of `save_to_undo_stack` will - # cause that the top of the undo stack is usually the same as the - # current text, so in that case we have to pop twice.) - while self._undo_stack: - text, pos = self._undo_stack.pop() - - if text != self.text: - # Push current text to redo stack. - self._redo_stack.append((self.text, self.cursor_position)) - - # Set new text/cursor_position. - self.document = Document(text, cursor_position=pos) - break - - def redo(self) -> None: - if self._redo_stack: - # Copy current state on undo stack. - self.save_to_undo_stack(clear_redo_stack=False) - - # Pop state from redo stack. - text, pos = self._redo_stack.pop() - self.document = Document(text, cursor_position=pos) - - def validate(self, set_cursor: bool = False) -> bool: - """ - Returns `True` if valid. - - :param set_cursor: Set the cursor position, if an error was found. - """ - # Don't call the validator again, if it was already called for the - # current input. - if self.validation_state != ValidationState.UNKNOWN: - return self.validation_state == ValidationState.VALID - - # Call validator. - if self.validator: - try: - self.validator.validate(self.document) - except ValidationError as e: - # Set cursor position (don't allow invalid values.) - if set_cursor: - self.cursor_position = min( - max(0, e.cursor_position), len(self.text) - ) - - self.validation_state = ValidationState.INVALID - self.validation_error = e - return False - - # Handle validation result. - self.validation_state = ValidationState.VALID - self.validation_error = None - return True - - async def _validate_async(self) -> None: - """ - Asynchronous version of `validate()`. - This one doesn't set the cursor position. - - We have both variants, because a synchronous version is required. - Handling the ENTER key needs to be completely synchronous, otherwise - stuff like type-ahead is going to give very weird results. (People - could type input while the ENTER key is still processed.) - - An asynchronous version is required if we have `validate_while_typing` - enabled. - """ - while True: - # Don't call the validator again, if it was already called for the - # current input. - if self.validation_state != ValidationState.UNKNOWN: - return - - # Call validator. - error = None - document = self.document - - if self.validator: - try: - await self.validator.validate_async(self.document) - except ValidationError as e: - error = e - - # If the document changed during the validation, try again. - if self.document != document: - continue - - # Handle validation result. - if error: - self.validation_state = ValidationState.INVALID - else: - self.validation_state = ValidationState.VALID - - self.validation_error = error - get_app().invalidate() # Trigger redraw (display error). - - def append_to_history(self) -> None: - """ - Append the current input to the history. - """ - # Save at the tail of the history. (But don't if the last entry the - # history is already the same.) - if self.text: - history_strings = self.history.get_strings() - if not len(history_strings) or history_strings[-1] != self.text: - self.history.append_string(self.text) - - def _search( - self, - search_state: SearchState, - include_current_position: bool = False, - count: int = 1, - ) -> tuple[int, int] | None: - """ - Execute search. Return (working_index, cursor_position) tuple when this - search is applied. Returns `None` when this text cannot be found. - """ - assert count > 0 - - text = search_state.text - direction = search_state.direction - ignore_case = search_state.ignore_case() - - def search_once( - working_index: int, document: Document - ) -> tuple[int, Document] | None: - """ - Do search one time. - Return (working_index, document) or `None` - """ - if direction == SearchDirection.FORWARD: - # Try find at the current input. - new_index = document.find( - text, - include_current_position=include_current_position, - ignore_case=ignore_case, - ) - - if new_index is not None: - return ( - working_index, - Document(document.text, document.cursor_position + new_index), - ) - else: - # No match, go forward in the history. (Include len+1 to wrap around.) - # (Here we should always include all cursor positions, because - # it's a different line.) - for i in range(working_index + 1, len(self._working_lines) + 1): - i %= len(self._working_lines) - - document = Document(self._working_lines[i], 0) - new_index = document.find( - text, include_current_position=True, ignore_case=ignore_case - ) - if new_index is not None: - return (i, Document(document.text, new_index)) - else: - # Try find at the current input. - new_index = document.find_backwards(text, ignore_case=ignore_case) - - if new_index is not None: - return ( - working_index, - Document(document.text, document.cursor_position + new_index), - ) - else: - # No match, go back in the history. (Include -1 to wrap around.) - for i in range(working_index - 1, -2, -1): - i %= len(self._working_lines) - - document = Document( - self._working_lines[i], len(self._working_lines[i]) - ) - new_index = document.find_backwards( - text, ignore_case=ignore_case - ) - if new_index is not None: - return ( - i, - Document(document.text, len(document.text) + new_index), - ) - return None - - # Do 'count' search iterations. - working_index = self.working_index - document = self.document - for _ in range(count): - result = search_once(working_index, document) - if result is None: - return None # Nothing found. - else: - working_index, document = result - - return (working_index, document.cursor_position) - - def document_for_search(self, search_state: SearchState) -> Document: - """ - Return a :class:`~prompt_toolkit.document.Document` instance that has - the text/cursor position for this search, if we would apply it. This - will be used in the - :class:`~prompt_toolkit.layout.BufferControl` to display feedback while - searching. - """ - search_result = self._search(search_state, include_current_position=True) - - if search_result is None: - return self.document - else: - working_index, cursor_position = search_result - - # Keep selection, when `working_index` was not changed. - if working_index == self.working_index: - selection = self.selection_state - else: - selection = None - - return Document( - self._working_lines[working_index], cursor_position, selection=selection - ) - - def get_search_position( - self, - search_state: SearchState, - include_current_position: bool = True, - count: int = 1, - ) -> int: - """ - Get the cursor position for this search. - (This operation won't change the `working_index`. It's won't go through - the history. Vi text objects can't span multiple items.) - """ - search_result = self._search( - search_state, include_current_position=include_current_position, count=count - ) - - if search_result is None: - return self.cursor_position - else: - working_index, cursor_position = search_result - return cursor_position - - def apply_search( - self, - search_state: SearchState, - include_current_position: bool = True, - count: int = 1, - ) -> None: - """ - Apply search. If something is found, set `working_index` and - `cursor_position`. - """ - search_result = self._search( - search_state, include_current_position=include_current_position, count=count - ) - - if search_result is not None: - working_index, cursor_position = search_result - self.working_index = working_index - self.cursor_position = cursor_position - - def exit_selection(self) -> None: - self.selection_state = None - - def _editor_simple_tempfile(self) -> tuple[str, Callable[[], None]]: - """ - Simple (file) tempfile implementation. - Return (tempfile, cleanup_func). - """ - suffix = to_str(self.tempfile_suffix) - descriptor, filename = tempfile.mkstemp(suffix) - - os.write(descriptor, self.text.encode("utf-8")) - os.close(descriptor) - - def cleanup() -> None: - os.unlink(filename) - - return filename, cleanup - - def _editor_complex_tempfile(self) -> tuple[str, Callable[[], None]]: - # Complex (directory) tempfile implementation. - headtail = to_str(self.tempfile) - if not headtail: - # Revert to simple case. - return self._editor_simple_tempfile() - headtail = str(headtail) - - # Try to make according to tempfile logic. - head, tail = os.path.split(headtail) - if os.path.isabs(head): - head = head[1:] - - dirpath = tempfile.mkdtemp() - if head: - dirpath = os.path.join(dirpath, head) - # Assume there is no issue creating dirs in this temp dir. - os.makedirs(dirpath) - - # Open the filename and write current text. - filename = os.path.join(dirpath, tail) - with open(filename, "w", encoding="utf-8") as fh: - fh.write(self.text) - - def cleanup() -> None: - shutil.rmtree(dirpath) - - return filename, cleanup - - def open_in_editor(self, validate_and_handle: bool = False) -> asyncio.Task[None]: - """ - Open code in editor. - - This returns a future, and runs in a thread executor. - """ - if self.read_only(): - raise EditReadOnlyBuffer() - - # Write current text to temporary file - if self.tempfile: - filename, cleanup_func = self._editor_complex_tempfile() - else: - filename, cleanup_func = self._editor_simple_tempfile() - - async def run() -> None: - try: - # Open in editor - # (We need to use `run_in_terminal`, because not all editors go to - # the alternate screen buffer, and some could influence the cursor - # position.) - success = await run_in_terminal( - lambda: self._open_file_in_editor(filename), in_executor=True - ) - - # Read content again. - if success: - with open(filename, "rb") as f: - text = f.read().decode("utf-8") - - # Drop trailing newline. (Editors are supposed to add it at the - # end, but we don't need it.) - if text.endswith("\n"): - text = text[:-1] - - self.document = Document(text=text, cursor_position=len(text)) - - # Accept the input. - if validate_and_handle: - self.validate_and_handle() - - finally: - # Clean up temp dir/file. - cleanup_func() - - return get_app().create_background_task(run()) - - def _open_file_in_editor(self, filename: str) -> bool: - """ - Call editor executable. - - Return True when we received a zero return code. - """ - # If the 'VISUAL' or 'EDITOR' environment variable has been set, use that. - # Otherwise, fall back to the first available editor that we can find. - visual = os.environ.get("VISUAL") - editor = os.environ.get("EDITOR") - - editors = [ - visual, - editor, - # Order of preference. - "/usr/bin/editor", - "/usr/bin/nano", - "/usr/bin/pico", - "/usr/bin/vi", - "/usr/bin/emacs", - ] - - for e in editors: - if e: - try: - # Use 'shlex.split()', because $VISUAL can contain spaces - # and quotes. - returncode = subprocess.call(shlex.split(e) + [filename]) - return returncode == 0 - - except OSError: - # Executable does not exist, try the next one. - pass - - return False - - def start_completion( - self, - select_first: bool = False, - select_last: bool = False, - insert_common_part: bool = False, - complete_event: CompleteEvent | None = None, - ) -> None: - """ - Start asynchronous autocompletion of this buffer. - (This will do nothing if a previous completion was still in progress.) - """ - # Only one of these options can be selected. - assert select_first + select_last + insert_common_part <= 1 - - get_app().create_background_task( - self._async_completer( - select_first=select_first, - select_last=select_last, - insert_common_part=insert_common_part, - complete_event=complete_event - or CompleteEvent(completion_requested=True), - ) - ) - - def _create_completer_coroutine(self) -> Callable[..., Coroutine[Any, Any, None]]: - """ - Create function for asynchronous autocompletion. - - (This consumes the asynchronous completer generator, which possibly - runs the completion algorithm in another thread.) - """ - - def completion_does_nothing(document: Document, completion: Completion) -> bool: - """ - Return `True` if applying this completion doesn't have any effect. - (When it doesn't insert any new text. - """ - text_before_cursor = document.text_before_cursor - replaced_text = text_before_cursor[ - len(text_before_cursor) + completion.start_position : - ] - return replaced_text == completion.text - - @_only_one_at_a_time - async def async_completer( - select_first: bool = False, - select_last: bool = False, - insert_common_part: bool = False, - complete_event: CompleteEvent | None = None, - ) -> None: - document = self.document - complete_event = complete_event or CompleteEvent(text_inserted=True) - - # Don't complete when we already have completions. - if self.complete_state or not self.completer: - return - - # Create an empty CompletionState. - complete_state = CompletionState(original_document=self.document) - self.complete_state = complete_state - - def proceed() -> bool: - """Keep retrieving completions. Input text has not yet changed - while generating completions.""" - return self.complete_state == complete_state - - refresh_needed = asyncio.Event() - - async def refresh_while_loading() -> None: - """Background loop to refresh the UI at most 3 times a second - while the completion are loading. Calling - `on_completions_changed.fire()` for every completion that we - receive is too expensive when there are many completions. (We - could tune `Application.max_render_postpone_time` and - `Application.min_redraw_interval`, but having this here is a - better approach.) - """ - while True: - self.on_completions_changed.fire() - refresh_needed.clear() - await asyncio.sleep(0.3) - await refresh_needed.wait() - - refresh_task = asyncio.ensure_future(refresh_while_loading()) - try: - # Load. - async with aclosing( - self.completer.get_completions_async(document, complete_event) - ) as async_generator: - async for completion in async_generator: - complete_state.completions.append(completion) - refresh_needed.set() - - # If the input text changes, abort. - if not proceed(): - break - - # Always stop at 10k completions. - if ( - len(complete_state.completions) - >= self.max_number_of_completions - ): - break - finally: - refresh_task.cancel() - - # Refresh one final time after we got everything. - self.on_completions_changed.fire() - - completions = complete_state.completions - - # When there is only one completion, which has nothing to add, ignore it. - if len(completions) == 1 and completion_does_nothing( - document, completions[0] - ): - del completions[:] - - # Set completions if the text was not yet changed. - if proceed(): - # When no completions were found, or when the user selected - # already a completion by using the arrow keys, don't do anything. - if ( - not self.complete_state - or self.complete_state.complete_index is not None - ): - return - - # When there are no completions, reset completion state anyway. - if not completions: - self.complete_state = None - # Render the ui if the completion menu was shown - # it is needed especially if there is one completion and it was deleted. - self.on_completions_changed.fire() - return - - # Select first/last or insert common part, depending on the key - # binding. (For this we have to wait until all completions are - # loaded.) - - if select_first: - self.go_to_completion(0) - - elif select_last: - self.go_to_completion(len(completions) - 1) - - elif insert_common_part: - common_part = get_common_complete_suffix(document, completions) - if common_part: - # Insert the common part, update completions. - self.insert_text(common_part) - if len(completions) > 1: - # (Don't call `async_completer` again, but - # recalculate completions. See: - # https://github.com/ipython/ipython/issues/9658) - completions[:] = [ - c.new_completion_from_position(len(common_part)) - for c in completions - ] - - self._set_completions(completions=completions) - else: - self.complete_state = None - else: - # When we were asked to insert the "common" - # prefix, but there was no common suffix but - # still exactly one match, then select the - # first. (It could be that we have a completion - # which does * expansion, like '*.py', with - # exactly one match.) - if len(completions) == 1: - self.go_to_completion(0) - - else: - # If the last operation was an insert, (not a delete), restart - # the completion coroutine. - - if self.document.text_before_cursor == document.text_before_cursor: - return # Nothing changed. - - if self.document.text_before_cursor.startswith( - document.text_before_cursor - ): - raise _Retry - - return async_completer - - def _create_auto_suggest_coroutine(self) -> Callable[[], Coroutine[Any, Any, None]]: - """ - Create function for asynchronous auto suggestion. - (This can be in another thread.) - """ - - @_only_one_at_a_time - async def async_suggestor() -> None: - document = self.document - - # Don't suggest when we already have a suggestion. - if self.suggestion or not self.auto_suggest: - return - - suggestion = await self.auto_suggest.get_suggestion_async(self, document) - - # Set suggestion only if the text was not yet changed. - if self.document == document: - # Set suggestion and redraw interface. - self.suggestion = suggestion - self.on_suggestion_set.fire() - else: - # Otherwise, restart thread. - raise _Retry - - return async_suggestor - - def _create_auto_validate_coroutine( - self, - ) -> Callable[[], Coroutine[Any, Any, None]]: - """ - Create a function for asynchronous validation while typing. - (This can be in another thread.) - """ - - @_only_one_at_a_time - async def async_validator() -> None: - await self._validate_async() - - return async_validator - - def validate_and_handle(self) -> None: - """ - Validate buffer and handle the accept action. - """ - valid = self.validate(set_cursor=True) - - # When the validation succeeded, accept the input. - if valid: - if self.accept_handler: - keep_text = self.accept_handler(self) - else: - keep_text = False - - self.append_to_history() - - if not keep_text: - self.reset() - - -_T = TypeVar("_T", bound=Callable[..., Coroutine[Any, Any, None]]) - - -def _only_one_at_a_time(coroutine: _T) -> _T: - """ - Decorator that only starts the coroutine only if the previous call has - finished. (Used to make sure that we have only one autocompleter, auto - suggestor and validator running at a time.) - - When the coroutine raises `_Retry`, it is restarted. - """ - running = False - - @wraps(coroutine) - async def new_coroutine(*a: Any, **kw: Any) -> Any: - nonlocal running - - # Don't start a new function, if the previous is still in progress. - if running: - return - - running = True - - try: - while True: - try: - await coroutine(*a, **kw) - except _Retry: - continue - else: - return None - finally: - running = False - - return cast(_T, new_coroutine) - - -class _Retry(Exception): - "Retry in `_only_one_at_a_time`." - - -def indent(buffer: Buffer, from_row: int, to_row: int, count: int = 1) -> None: - """ - Indent text of a :class:`.Buffer` object. - """ - current_row = buffer.document.cursor_position_row - current_col = buffer.document.cursor_position_col - line_range = range(from_row, to_row) - - # Apply transformation. - indent_content = " " * count - new_text = buffer.transform_lines(line_range, lambda l: indent_content + l) - buffer.document = Document( - new_text, Document(new_text).translate_row_col_to_index(current_row, 0) - ) - - # Place cursor in the same position in text after indenting - buffer.cursor_position += current_col + len(indent_content) - - -def unindent(buffer: Buffer, from_row: int, to_row: int, count: int = 1) -> None: - """ - Unindent text of a :class:`.Buffer` object. - """ - current_row = buffer.document.cursor_position_row - current_col = buffer.document.cursor_position_col - line_range = range(from_row, to_row) - - indent_content = " " * count - - def transform(text: str) -> str: - remove = indent_content - if text.startswith(remove): - return text[len(remove) :] - else: - return text.lstrip() - - # Apply transformation. - new_text = buffer.transform_lines(line_range, transform) - buffer.document = Document( - new_text, Document(new_text).translate_row_col_to_index(current_row, 0) - ) - - # Place cursor in the same position in text after dedent - buffer.cursor_position += current_col - len(indent_content) - - -def reshape_text(buffer: Buffer, from_row: int, to_row: int) -> None: - """ - Reformat text, taking the width into account. - `to_row` is included. - (Vi 'gq' operator.) - """ - lines = buffer.text.splitlines(True) - lines_before = lines[:from_row] - lines_after = lines[to_row + 1 :] - lines_to_reformat = lines[from_row : to_row + 1] - - if lines_to_reformat: - # Take indentation from the first line. - match = re.search(r"^\s*", lines_to_reformat[0]) - length = match.end() if match else 0 # `match` can't be None, actually. - - indent = lines_to_reformat[0][:length].replace("\n", "") - - # Now, take all the 'words' from the lines to be reshaped. - words = "".join(lines_to_reformat).split() - - # And reshape. - width = (buffer.text_width or 80) - len(indent) - reshaped_text = [indent] - current_width = 0 - for w in words: - if current_width: - if len(w) + current_width + 1 > width: - reshaped_text.append("\n") - reshaped_text.append(indent) - current_width = 0 - else: - reshaped_text.append(" ") - current_width += 1 - - reshaped_text.append(w) - current_width += len(w) - - if reshaped_text[-1] != "\n": - reshaped_text.append("\n") - - # Apply result. - buffer.document = Document( - text="".join(lines_before + reshaped_text + lines_after), - cursor_position=len("".join(lines_before + reshaped_text)), - ) diff --git a/voxvera/vendor/prompt_toolkit/cache.py b/voxvera/vendor/prompt_toolkit/cache.py deleted file mode 100644 index 01dd1f7..0000000 --- a/voxvera/vendor/prompt_toolkit/cache.py +++ /dev/null @@ -1,127 +0,0 @@ -from __future__ import annotations - -from collections import deque -from functools import wraps -from typing import Any, Callable, Dict, Generic, Hashable, Tuple, TypeVar, cast - -__all__ = [ - "SimpleCache", - "FastDictCache", - "memoized", -] - -_T = TypeVar("_T", bound=Hashable) -_U = TypeVar("_U") - - -class SimpleCache(Generic[_T, _U]): - """ - Very simple cache that discards the oldest item when the cache size is - exceeded. - - :param maxsize: Maximum size of the cache. (Don't make it too big.) - """ - - def __init__(self, maxsize: int = 8) -> None: - assert maxsize > 0 - - self._data: dict[_T, _U] = {} - self._keys: deque[_T] = deque() - self.maxsize: int = maxsize - - def get(self, key: _T, getter_func: Callable[[], _U]) -> _U: - """ - Get object from the cache. - If not found, call `getter_func` to resolve it, and put that on the top - of the cache instead. - """ - # Look in cache first. - try: - return self._data[key] - except KeyError: - # Not found? Get it. - value = getter_func() - self._data[key] = value - self._keys.append(key) - - # Remove the oldest key when the size is exceeded. - if len(self._data) > self.maxsize: - key_to_remove = self._keys.popleft() - if key_to_remove in self._data: - del self._data[key_to_remove] - - return value - - def clear(self) -> None: - "Clear cache." - self._data = {} - self._keys = deque() - - -_K = TypeVar("_K", bound=Tuple[Hashable, ...]) -_V = TypeVar("_V") - - -class FastDictCache(Dict[_K, _V]): - """ - Fast, lightweight cache which keeps at most `size` items. - It will discard the oldest items in the cache first. - - The cache is a dictionary, which doesn't keep track of access counts. - It is perfect to cache little immutable objects which are not expensive to - create, but where a dictionary lookup is still much faster than an object - instantiation. - - :param get_value: Callable that's called in case of a missing key. - """ - - # NOTE: This cache is used to cache `prompt_toolkit.layout.screen.Char` and - # `prompt_toolkit.Document`. Make sure to keep this really lightweight. - # Accessing the cache should stay faster than instantiating new - # objects. - # (Dictionary lookups are really fast.) - # SimpleCache is still required for cases where the cache key is not - # the same as the arguments given to the function that creates the - # value.) - def __init__(self, get_value: Callable[..., _V], size: int = 1000000) -> None: - assert size > 0 - - self._keys: deque[_K] = deque() - self.get_value = get_value - self.size = size - - def __missing__(self, key: _K) -> _V: - # Remove the oldest key when the size is exceeded. - if len(self) > self.size: - key_to_remove = self._keys.popleft() - if key_to_remove in self: - del self[key_to_remove] - - result = self.get_value(*key) - self[key] = result - self._keys.append(key) - return result - - -_F = TypeVar("_F", bound=Callable[..., object]) - - -def memoized(maxsize: int = 1024) -> Callable[[_F], _F]: - """ - Memoization decorator for immutable classes and pure functions. - """ - - def decorator(obj: _F) -> _F: - cache: SimpleCache[Hashable, Any] = SimpleCache(maxsize=maxsize) - - @wraps(obj) - def new_callable(*a: Any, **kw: Any) -> Any: - def create_new() -> Any: - return obj(*a, **kw) - - key = (a, tuple(sorted(kw.items()))) - return cache.get(key, create_new) - - return cast(_F, new_callable) - - return decorator diff --git a/voxvera/vendor/prompt_toolkit/clipboard/__init__.py b/voxvera/vendor/prompt_toolkit/clipboard/__init__.py deleted file mode 100644 index e72f30e..0000000 --- a/voxvera/vendor/prompt_toolkit/clipboard/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -from __future__ import annotations - -from .base import Clipboard, ClipboardData, DummyClipboard, DynamicClipboard -from .in_memory import InMemoryClipboard - -# We are not importing `PyperclipClipboard` here, because it would require the -# `pyperclip` module to be present. - -# from .pyperclip import PyperclipClipboard - -__all__ = [ - "Clipboard", - "ClipboardData", - "DummyClipboard", - "DynamicClipboard", - "InMemoryClipboard", -] diff --git a/voxvera/vendor/prompt_toolkit/clipboard/base.py b/voxvera/vendor/prompt_toolkit/clipboard/base.py deleted file mode 100644 index 28cfdcd..0000000 --- a/voxvera/vendor/prompt_toolkit/clipboard/base.py +++ /dev/null @@ -1,109 +0,0 @@ -""" -Clipboard for command line interface. -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import Callable - -from prompt_toolkit.selection import SelectionType - -__all__ = [ - "Clipboard", - "ClipboardData", - "DummyClipboard", - "DynamicClipboard", -] - - -class ClipboardData: - """ - Text on the clipboard. - - :param text: string - :param type: :class:`~prompt_toolkit.selection.SelectionType` - """ - - def __init__( - self, text: str = "", type: SelectionType = SelectionType.CHARACTERS - ) -> None: - self.text = text - self.type = type - - -class Clipboard(metaclass=ABCMeta): - """ - Abstract baseclass for clipboards. - (An implementation can be in memory, it can share the X11 or Windows - keyboard, or can be persistent.) - """ - - @abstractmethod - def set_data(self, data: ClipboardData) -> None: - """ - Set data to the clipboard. - - :param data: :class:`~.ClipboardData` instance. - """ - - def set_text(self, text: str) -> None: # Not abstract. - """ - Shortcut for setting plain text on clipboard. - """ - self.set_data(ClipboardData(text)) - - def rotate(self) -> None: - """ - For Emacs mode, rotate the kill ring. - """ - - @abstractmethod - def get_data(self) -> ClipboardData: - """ - Return clipboard data. - """ - - -class DummyClipboard(Clipboard): - """ - Clipboard implementation that doesn't remember anything. - """ - - def set_data(self, data: ClipboardData) -> None: - pass - - def set_text(self, text: str) -> None: - pass - - def rotate(self) -> None: - pass - - def get_data(self) -> ClipboardData: - return ClipboardData() - - -class DynamicClipboard(Clipboard): - """ - Clipboard class that can dynamically returns any Clipboard. - - :param get_clipboard: Callable that returns a :class:`.Clipboard` instance. - """ - - def __init__(self, get_clipboard: Callable[[], Clipboard | None]) -> None: - self.get_clipboard = get_clipboard - - def _clipboard(self) -> Clipboard: - return self.get_clipboard() or DummyClipboard() - - def set_data(self, data: ClipboardData) -> None: - self._clipboard().set_data(data) - - def set_text(self, text: str) -> None: - self._clipboard().set_text(text) - - def rotate(self) -> None: - self._clipboard().rotate() - - def get_data(self) -> ClipboardData: - return self._clipboard().get_data() diff --git a/voxvera/vendor/prompt_toolkit/clipboard/in_memory.py b/voxvera/vendor/prompt_toolkit/clipboard/in_memory.py deleted file mode 100644 index d9ae081..0000000 --- a/voxvera/vendor/prompt_toolkit/clipboard/in_memory.py +++ /dev/null @@ -1,44 +0,0 @@ -from __future__ import annotations - -from collections import deque - -from .base import Clipboard, ClipboardData - -__all__ = [ - "InMemoryClipboard", -] - - -class InMemoryClipboard(Clipboard): - """ - Default clipboard implementation. - Just keep the data in memory. - - This implements a kill-ring, for Emacs mode. - """ - - def __init__(self, data: ClipboardData | None = None, max_size: int = 60) -> None: - assert max_size >= 1 - - self.max_size = max_size - self._ring: deque[ClipboardData] = deque() - - if data is not None: - self.set_data(data) - - def set_data(self, data: ClipboardData) -> None: - self._ring.appendleft(data) - - while len(self._ring) > self.max_size: - self._ring.pop() - - def get_data(self) -> ClipboardData: - if self._ring: - return self._ring[0] - else: - return ClipboardData() - - def rotate(self) -> None: - if self._ring: - # Add the very first item at the end. - self._ring.append(self._ring.popleft()) diff --git a/voxvera/vendor/prompt_toolkit/clipboard/pyperclip.py b/voxvera/vendor/prompt_toolkit/clipboard/pyperclip.py deleted file mode 100644 index 66eb711..0000000 --- a/voxvera/vendor/prompt_toolkit/clipboard/pyperclip.py +++ /dev/null @@ -1,42 +0,0 @@ -from __future__ import annotations - -import pyperclip - -from prompt_toolkit.selection import SelectionType - -from .base import Clipboard, ClipboardData - -__all__ = [ - "PyperclipClipboard", -] - - -class PyperclipClipboard(Clipboard): - """ - Clipboard that synchronizes with the Windows/Mac/Linux system clipboard, - using the pyperclip module. - """ - - def __init__(self) -> None: - self._data: ClipboardData | None = None - - def set_data(self, data: ClipboardData) -> None: - self._data = data - pyperclip.copy(data.text) - - def get_data(self) -> ClipboardData: - text = pyperclip.paste() - - # When the clipboard data is equal to what we copied last time, reuse - # the `ClipboardData` instance. That way we're sure to keep the same - # `SelectionType`. - if self._data and self._data.text == text: - return self._data - - # Pyperclip returned something else. Create a new `ClipboardData` - # instance. - else: - return ClipboardData( - text=text, - type=SelectionType.LINES if "\n" in text else SelectionType.CHARACTERS, - ) diff --git a/voxvera/vendor/prompt_toolkit/completion/__init__.py b/voxvera/vendor/prompt_toolkit/completion/__init__.py deleted file mode 100644 index f65a94e..0000000 --- a/voxvera/vendor/prompt_toolkit/completion/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from .base import ( - CompleteEvent, - Completer, - Completion, - ConditionalCompleter, - DummyCompleter, - DynamicCompleter, - ThreadedCompleter, - get_common_complete_suffix, - merge_completers, -) -from .deduplicate import DeduplicateCompleter -from .filesystem import ExecutableCompleter, PathCompleter -from .fuzzy_completer import FuzzyCompleter, FuzzyWordCompleter -from .nested import NestedCompleter -from .word_completer import WordCompleter - -__all__ = [ - # Base. - "Completion", - "Completer", - "ThreadedCompleter", - "DummyCompleter", - "DynamicCompleter", - "CompleteEvent", - "ConditionalCompleter", - "merge_completers", - "get_common_complete_suffix", - # Filesystem. - "PathCompleter", - "ExecutableCompleter", - # Fuzzy - "FuzzyCompleter", - "FuzzyWordCompleter", - # Nested. - "NestedCompleter", - # Word completer. - "WordCompleter", - # Deduplicate - "DeduplicateCompleter", -] diff --git a/voxvera/vendor/prompt_toolkit/completion/base.py b/voxvera/vendor/prompt_toolkit/completion/base.py deleted file mode 100644 index 3846ef7..0000000 --- a/voxvera/vendor/prompt_toolkit/completion/base.py +++ /dev/null @@ -1,438 +0,0 @@ -""" """ - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import AsyncGenerator, Callable, Iterable, Sequence - -from prompt_toolkit.document import Document -from prompt_toolkit.eventloop import aclosing, generator_to_async_generator -from prompt_toolkit.filters import FilterOrBool, to_filter -from prompt_toolkit.formatted_text import AnyFormattedText, StyleAndTextTuples - -__all__ = [ - "Completion", - "Completer", - "ThreadedCompleter", - "DummyCompleter", - "DynamicCompleter", - "CompleteEvent", - "ConditionalCompleter", - "merge_completers", - "get_common_complete_suffix", -] - - -class Completion: - """ - :param text: The new string that will be inserted into the document. - :param start_position: Position relative to the cursor_position where the - new text will start. The text will be inserted between the - start_position and the original cursor position. - :param display: (optional string or formatted text) If the completion has - to be displayed differently in the completion menu. - :param display_meta: (Optional string or formatted text) Meta information - about the completion, e.g. the path or source where it's coming from. - This can also be a callable that returns a string. - :param style: Style string. - :param selected_style: Style string, used for a selected completion. - This can override the `style` parameter. - """ - - def __init__( - self, - text: str, - start_position: int = 0, - display: AnyFormattedText | None = None, - display_meta: AnyFormattedText | None = None, - style: str = "", - selected_style: str = "", - ) -> None: - from prompt_toolkit.formatted_text import to_formatted_text - - self.text = text - self.start_position = start_position - self._display_meta = display_meta - - if display is None: - display = text - - self.display = to_formatted_text(display) - - self.style = style - self.selected_style = selected_style - - assert self.start_position <= 0 - - def __repr__(self) -> str: - if isinstance(self.display, str) and self.display == self.text: - return f"{self.__class__.__name__}(text={self.text!r}, start_position={self.start_position!r})" - else: - return f"{self.__class__.__name__}(text={self.text!r}, start_position={self.start_position!r}, display={self.display!r})" - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Completion): - return False - return ( - self.text == other.text - and self.start_position == other.start_position - and self.display == other.display - and self._display_meta == other._display_meta - ) - - def __hash__(self) -> int: - return hash((self.text, self.start_position, self.display, self._display_meta)) - - @property - def display_text(self) -> str: - "The 'display' field as plain text." - from prompt_toolkit.formatted_text import fragment_list_to_text - - return fragment_list_to_text(self.display) - - @property - def display_meta(self) -> StyleAndTextTuples: - "Return meta-text. (This is lazy when using a callable)." - from prompt_toolkit.formatted_text import to_formatted_text - - return to_formatted_text(self._display_meta or "") - - @property - def display_meta_text(self) -> str: - "The 'meta' field as plain text." - from prompt_toolkit.formatted_text import fragment_list_to_text - - return fragment_list_to_text(self.display_meta) - - def new_completion_from_position(self, position: int) -> Completion: - """ - (Only for internal use!) - Get a new completion by splitting this one. Used by `Application` when - it needs to have a list of new completions after inserting the common - prefix. - """ - assert position - self.start_position >= 0 - - return Completion( - text=self.text[position - self.start_position :], - display=self.display, - display_meta=self._display_meta, - ) - - -class CompleteEvent: - """ - Event that called the completer. - - :param text_inserted: When True, it means that completions are requested - because of a text insert. (`Buffer.complete_while_typing`.) - :param completion_requested: When True, it means that the user explicitly - pressed the `Tab` key in order to view the completions. - - These two flags can be used for instance to implement a completer that - shows some completions when ``Tab`` has been pressed, but not - automatically when the user presses a space. (Because of - `complete_while_typing`.) - """ - - def __init__( - self, text_inserted: bool = False, completion_requested: bool = False - ) -> None: - assert not (text_inserted and completion_requested) - - #: Automatic completion while typing. - self.text_inserted = text_inserted - - #: Used explicitly requested completion by pressing 'tab'. - self.completion_requested = completion_requested - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(text_inserted={self.text_inserted!r}, completion_requested={self.completion_requested!r})" - - -class Completer(metaclass=ABCMeta): - """ - Base class for completer implementations. - """ - - @abstractmethod - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - """ - This should be a generator that yields :class:`.Completion` instances. - - If the generation of completions is something expensive (that takes a - lot of time), consider wrapping this `Completer` class in a - `ThreadedCompleter`. In that case, the completer algorithm runs in a - background thread and completions will be displayed as soon as they - arrive. - - :param document: :class:`~prompt_toolkit.document.Document` instance. - :param complete_event: :class:`.CompleteEvent` instance. - """ - while False: - yield - - async def get_completions_async( - self, document: Document, complete_event: CompleteEvent - ) -> AsyncGenerator[Completion, None]: - """ - Asynchronous generator for completions. (Probably, you won't have to - override this.) - - Asynchronous generator of :class:`.Completion` objects. - """ - for item in self.get_completions(document, complete_event): - yield item - - -class ThreadedCompleter(Completer): - """ - Wrapper that runs the `get_completions` generator in a thread. - - (Use this to prevent the user interface from becoming unresponsive if the - generation of completions takes too much time.) - - The completions will be displayed as soon as they are produced. The user - can already select a completion, even if not all completions are displayed. - """ - - def __init__(self, completer: Completer) -> None: - self.completer = completer - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - return self.completer.get_completions(document, complete_event) - - async def get_completions_async( - self, document: Document, complete_event: CompleteEvent - ) -> AsyncGenerator[Completion, None]: - """ - Asynchronous generator of completions. - """ - # NOTE: Right now, we are consuming the `get_completions` generator in - # a synchronous background thread, then passing the results one - # at a time over a queue, and consuming this queue in the main - # thread (that's what `generator_to_async_generator` does). That - # means that if the completer is *very* slow, we'll be showing - # completions in the UI once they are computed. - - # It's very tempting to replace this implementation with the - # commented code below for several reasons: - - # - `generator_to_async_generator` is not perfect and hard to get - # right. It's a lot of complexity for little gain. The - # implementation needs a huge buffer for it to be efficient - # when there are many completions (like 50k+). - # - Normally, a completer is supposed to be fast, users can have - # "complete while typing" enabled, and want to see the - # completions within a second. Handling one completion at a - # time, and rendering once we get it here doesn't make any - # sense if this is quick anyway. - # - Completers like `FuzzyCompleter` prepare all completions - # anyway so that they can be sorted by accuracy before they are - # yielded. At the point that we start yielding completions - # here, we already have all completions. - # - The `Buffer` class has complex logic to invalidate the UI - # while it is consuming the completions. We don't want to - # invalidate the UI for every completion (if there are many), - # but we want to do it often enough so that completions are - # being displayed while they are produced. - - # We keep the current behavior mainly for backward-compatibility. - # Similarly, it would be better for this function to not return - # an async generator, but simply be a coroutine that returns a - # list of `Completion` objects, containing all completions at - # once. - - # Note that this argument doesn't mean we shouldn't use - # `ThreadedCompleter`. It still makes sense to produce - # completions in a background thread, because we don't want to - # freeze the UI while the user is typing. But sending the - # completions one at a time to the UI maybe isn't worth it. - - # def get_all_in_thread() -> List[Completion]: - # return list(self.get_completions(document, complete_event)) - - # completions = await get_running_loop().run_in_executor(None, get_all_in_thread) - # for completion in completions: - # yield completion - - async with aclosing( - generator_to_async_generator( - lambda: self.completer.get_completions(document, complete_event) - ) - ) as async_generator: - async for completion in async_generator: - yield completion - - def __repr__(self) -> str: - return f"ThreadedCompleter({self.completer!r})" - - -class DummyCompleter(Completer): - """ - A completer that doesn't return any completion. - """ - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - return [] - - def __repr__(self) -> str: - return "DummyCompleter()" - - -class DynamicCompleter(Completer): - """ - Completer class that can dynamically returns any Completer. - - :param get_completer: Callable that returns a :class:`.Completer` instance. - """ - - def __init__(self, get_completer: Callable[[], Completer | None]) -> None: - self.get_completer = get_completer - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - completer = self.get_completer() or DummyCompleter() - return completer.get_completions(document, complete_event) - - async def get_completions_async( - self, document: Document, complete_event: CompleteEvent - ) -> AsyncGenerator[Completion, None]: - completer = self.get_completer() or DummyCompleter() - - async for completion in completer.get_completions_async( - document, complete_event - ): - yield completion - - def __repr__(self) -> str: - return f"DynamicCompleter({self.get_completer!r} -> {self.get_completer()!r})" - - -class ConditionalCompleter(Completer): - """ - Wrapper around any other completer that will enable/disable the completions - depending on whether the received condition is satisfied. - - :param completer: :class:`.Completer` instance. - :param filter: :class:`.Filter` instance. - """ - - def __init__(self, completer: Completer, filter: FilterOrBool) -> None: - self.completer = completer - self.filter = to_filter(filter) - - def __repr__(self) -> str: - return f"ConditionalCompleter({self.completer!r}, filter={self.filter!r})" - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - # Get all completions in a blocking way. - if self.filter(): - yield from self.completer.get_completions(document, complete_event) - - async def get_completions_async( - self, document: Document, complete_event: CompleteEvent - ) -> AsyncGenerator[Completion, None]: - # Get all completions in a non-blocking way. - if self.filter(): - async with aclosing( - self.completer.get_completions_async(document, complete_event) - ) as async_generator: - async for item in async_generator: - yield item - - -class _MergedCompleter(Completer): - """ - Combine several completers into one. - """ - - def __init__(self, completers: Sequence[Completer]) -> None: - self.completers = completers - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - # Get all completions from the other completers in a blocking way. - for completer in self.completers: - yield from completer.get_completions(document, complete_event) - - async def get_completions_async( - self, document: Document, complete_event: CompleteEvent - ) -> AsyncGenerator[Completion, None]: - # Get all completions from the other completers in a non-blocking way. - for completer in self.completers: - async with aclosing( - completer.get_completions_async(document, complete_event) - ) as async_generator: - async for item in async_generator: - yield item - - -def merge_completers( - completers: Sequence[Completer], deduplicate: bool = False -) -> Completer: - """ - Combine several completers into one. - - :param deduplicate: If `True`, wrap the result in a `DeduplicateCompleter` - so that completions that would result in the same text will be - deduplicated. - """ - if deduplicate: - from .deduplicate import DeduplicateCompleter - - return DeduplicateCompleter(_MergedCompleter(completers)) - - return _MergedCompleter(completers) - - -def get_common_complete_suffix( - document: Document, completions: Sequence[Completion] -) -> str: - """ - Return the common prefix for all completions. - """ - - # Take only completions that don't change the text before the cursor. - def doesnt_change_before_cursor(completion: Completion) -> bool: - end = completion.text[: -completion.start_position] - return document.text_before_cursor.endswith(end) - - completions2 = [c for c in completions if doesnt_change_before_cursor(c)] - - # When there is at least one completion that changes the text before the - # cursor, don't return any common part. - if len(completions2) != len(completions): - return "" - - # Return the common prefix. - def get_suffix(completion: Completion) -> str: - return completion.text[-completion.start_position :] - - return _commonprefix([get_suffix(c) for c in completions2]) - - -def _commonprefix(strings: Iterable[str]) -> str: - # Similar to os.path.commonprefix - if not strings: - return "" - - else: - s1 = min(strings) - s2 = max(strings) - - for i, c in enumerate(s1): - if c != s2[i]: - return s1[:i] - - return s1 diff --git a/voxvera/vendor/prompt_toolkit/completion/deduplicate.py b/voxvera/vendor/prompt_toolkit/completion/deduplicate.py deleted file mode 100644 index c3d5256..0000000 --- a/voxvera/vendor/prompt_toolkit/completion/deduplicate.py +++ /dev/null @@ -1,45 +0,0 @@ -from __future__ import annotations - -from typing import Iterable - -from prompt_toolkit.document import Document - -from .base import CompleteEvent, Completer, Completion - -__all__ = ["DeduplicateCompleter"] - - -class DeduplicateCompleter(Completer): - """ - Wrapper around a completer that removes duplicates. Only the first unique - completions are kept. - - Completions are considered to be a duplicate if they result in the same - document text when they would be applied. - """ - - def __init__(self, completer: Completer) -> None: - self.completer = completer - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - # Keep track of the document strings we'd get after applying any completion. - found_so_far: set[str] = set() - - for completion in self.completer.get_completions(document, complete_event): - text_if_applied = ( - document.text[: document.cursor_position + completion.start_position] - + completion.text - + document.text[document.cursor_position :] - ) - - if text_if_applied == document.text: - # Don't include completions that don't have any effect at all. - continue - - if text_if_applied in found_so_far: - continue - - found_so_far.add(text_if_applied) - yield completion diff --git a/voxvera/vendor/prompt_toolkit/completion/filesystem.py b/voxvera/vendor/prompt_toolkit/completion/filesystem.py deleted file mode 100644 index 8e7f87e..0000000 --- a/voxvera/vendor/prompt_toolkit/completion/filesystem.py +++ /dev/null @@ -1,118 +0,0 @@ -from __future__ import annotations - -import os -from typing import Callable, Iterable - -from prompt_toolkit.completion import CompleteEvent, Completer, Completion -from prompt_toolkit.document import Document - -__all__ = [ - "PathCompleter", - "ExecutableCompleter", -] - - -class PathCompleter(Completer): - """ - Complete for Path variables. - - :param get_paths: Callable which returns a list of directories to look into - when the user enters a relative path. - :param file_filter: Callable which takes a filename and returns whether - this file should show up in the completion. ``None`` - when no filtering has to be done. - :param min_input_len: Don't do autocompletion when the input string is shorter. - """ - - def __init__( - self, - only_directories: bool = False, - get_paths: Callable[[], list[str]] | None = None, - file_filter: Callable[[str], bool] | None = None, - min_input_len: int = 0, - expanduser: bool = False, - ) -> None: - self.only_directories = only_directories - self.get_paths = get_paths or (lambda: ["."]) - self.file_filter = file_filter or (lambda _: True) - self.min_input_len = min_input_len - self.expanduser = expanduser - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - text = document.text_before_cursor - - # Complete only when we have at least the minimal input length, - # otherwise, we can too many results and autocompletion will become too - # heavy. - if len(text) < self.min_input_len: - return - - try: - # Do tilde expansion. - if self.expanduser: - text = os.path.expanduser(text) - - # Directories where to look. - dirname = os.path.dirname(text) - if dirname: - directories = [ - os.path.dirname(os.path.join(p, text)) for p in self.get_paths() - ] - else: - directories = self.get_paths() - - # Start of current file. - prefix = os.path.basename(text) - - # Get all filenames. - filenames = [] - for directory in directories: - # Look for matches in this directory. - if os.path.isdir(directory): - for filename in os.listdir(directory): - if filename.startswith(prefix): - filenames.append((directory, filename)) - - # Sort - filenames = sorted(filenames, key=lambda k: k[1]) - - # Yield them. - for directory, filename in filenames: - completion = filename[len(prefix) :] - full_name = os.path.join(directory, filename) - - if os.path.isdir(full_name): - # For directories, add a slash to the filename. - # (We don't add them to the `completion`. Users can type it - # to trigger the autocompletion themselves.) - filename += "/" - elif self.only_directories: - continue - - if not self.file_filter(full_name): - continue - - yield Completion( - text=completion, - start_position=0, - display=filename, - ) - except OSError: - pass - - -class ExecutableCompleter(PathCompleter): - """ - Complete only executable files in the current path. - """ - - def __init__(self) -> None: - super().__init__( - only_directories=False, - min_input_len=1, - get_paths=lambda: os.environ.get("PATH", "").split(os.pathsep), - file_filter=lambda name: os.access(name, os.X_OK), - expanduser=True, - ) diff --git a/voxvera/vendor/prompt_toolkit/completion/fuzzy_completer.py b/voxvera/vendor/prompt_toolkit/completion/fuzzy_completer.py deleted file mode 100644 index 82625ab..0000000 --- a/voxvera/vendor/prompt_toolkit/completion/fuzzy_completer.py +++ /dev/null @@ -1,213 +0,0 @@ -from __future__ import annotations - -import re -from typing import Callable, Iterable, NamedTuple, Sequence - -from prompt_toolkit.document import Document -from prompt_toolkit.filters import FilterOrBool, to_filter -from prompt_toolkit.formatted_text import AnyFormattedText, StyleAndTextTuples - -from .base import CompleteEvent, Completer, Completion -from .word_completer import WordCompleter - -__all__ = [ - "FuzzyCompleter", - "FuzzyWordCompleter", -] - - -class FuzzyCompleter(Completer): - """ - Fuzzy completion. - This wraps any other completer and turns it into a fuzzy completer. - - If the list of words is: ["leopard" , "gorilla", "dinosaur", "cat", "bee"] - Then trying to complete "oar" would yield "leopard" and "dinosaur", but not - the others, because they match the regular expression 'o.*a.*r'. - Similar, in another application "djm" could expand to "django_migrations". - - The results are sorted by relevance, which is defined as the start position - and the length of the match. - - Notice that this is not really a tool to work around spelling mistakes, - like what would be possible with difflib. The purpose is rather to have a - quicker or more intuitive way to filter the given completions, especially - when many completions have a common prefix. - - Fuzzy algorithm is based on this post: - https://blog.amjith.com/fuzzyfinder-in-10-lines-of-python - - :param completer: A :class:`~.Completer` instance. - :param WORD: When True, use WORD characters. - :param pattern: Regex pattern which selects the characters before the - cursor that are considered for the fuzzy matching. - :param enable_fuzzy: (bool or `Filter`) Enabled the fuzzy behavior. For - easily turning fuzzyness on or off according to a certain condition. - """ - - def __init__( - self, - completer: Completer, - WORD: bool = False, - pattern: str | None = None, - enable_fuzzy: FilterOrBool = True, - ) -> None: - assert pattern is None or pattern.startswith("^") - - self.completer = completer - self.pattern = pattern - self.WORD = WORD - self.pattern = pattern - self.enable_fuzzy = to_filter(enable_fuzzy) - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - if self.enable_fuzzy(): - return self._get_fuzzy_completions(document, complete_event) - else: - return self.completer.get_completions(document, complete_event) - - def _get_pattern(self) -> str: - if self.pattern: - return self.pattern - if self.WORD: - return r"[^\s]+" - return "^[a-zA-Z0-9_]*" - - def _get_fuzzy_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - word_before_cursor = document.get_word_before_cursor( - pattern=re.compile(self._get_pattern()) - ) - - # Get completions - document2 = Document( - text=document.text[: document.cursor_position - len(word_before_cursor)], - cursor_position=document.cursor_position - len(word_before_cursor), - ) - - inner_completions = list( - self.completer.get_completions(document2, complete_event) - ) - - fuzzy_matches: list[_FuzzyMatch] = [] - - if word_before_cursor == "": - # If word before the cursor is an empty string, consider all - # completions, without filtering everything with an empty regex - # pattern. - fuzzy_matches = [_FuzzyMatch(0, 0, compl) for compl in inner_completions] - else: - pat = ".*?".join(map(re.escape, word_before_cursor)) - pat = f"(?=({pat}))" # lookahead regex to manage overlapping matches - regex = re.compile(pat, re.IGNORECASE) - for compl in inner_completions: - matches = list(regex.finditer(compl.text)) - if matches: - # Prefer the match, closest to the left, then shortest. - best = min(matches, key=lambda m: (m.start(), len(m.group(1)))) - fuzzy_matches.append( - _FuzzyMatch(len(best.group(1)), best.start(), compl) - ) - - def sort_key(fuzzy_match: _FuzzyMatch) -> tuple[int, int]: - "Sort by start position, then by the length of the match." - return fuzzy_match.start_pos, fuzzy_match.match_length - - fuzzy_matches = sorted(fuzzy_matches, key=sort_key) - - for match in fuzzy_matches: - # Include these completions, but set the correct `display` - # attribute and `start_position`. - yield Completion( - text=match.completion.text, - start_position=match.completion.start_position - - len(word_before_cursor), - # We access to private `_display_meta` attribute, because that one is lazy. - display_meta=match.completion._display_meta, - display=self._get_display(match, word_before_cursor), - style=match.completion.style, - ) - - def _get_display( - self, fuzzy_match: _FuzzyMatch, word_before_cursor: str - ) -> AnyFormattedText: - """ - Generate formatted text for the display label. - """ - - def get_display() -> AnyFormattedText: - m = fuzzy_match - word = m.completion.text - - if m.match_length == 0: - # No highlighting when we have zero length matches (no input text). - # In this case, use the original display text (which can include - # additional styling or characters). - return m.completion.display - - result: StyleAndTextTuples = [] - - # Text before match. - result.append(("class:fuzzymatch.outside", word[: m.start_pos])) - - # The match itself. - characters = list(word_before_cursor) - - for c in word[m.start_pos : m.start_pos + m.match_length]: - classname = "class:fuzzymatch.inside" - if characters and c.lower() == characters[0].lower(): - classname += ".character" - del characters[0] - - result.append((classname, c)) - - # Text after match. - result.append( - ("class:fuzzymatch.outside", word[m.start_pos + m.match_length :]) - ) - - return result - - return get_display() - - -class FuzzyWordCompleter(Completer): - """ - Fuzzy completion on a list of words. - - (This is basically a `WordCompleter` wrapped in a `FuzzyCompleter`.) - - :param words: List of words or callable that returns a list of words. - :param meta_dict: Optional dict mapping words to their meta-information. - :param WORD: When True, use WORD characters. - """ - - def __init__( - self, - words: Sequence[str] | Callable[[], Sequence[str]], - meta_dict: dict[str, str] | None = None, - WORD: bool = False, - ) -> None: - self.words = words - self.meta_dict = meta_dict or {} - self.WORD = WORD - - self.word_completer = WordCompleter( - words=self.words, WORD=self.WORD, meta_dict=self.meta_dict - ) - - self.fuzzy_completer = FuzzyCompleter(self.word_completer, WORD=self.WORD) - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - return self.fuzzy_completer.get_completions(document, complete_event) - - -class _FuzzyMatch(NamedTuple): - match_length: int - start_pos: int - completion: Completion diff --git a/voxvera/vendor/prompt_toolkit/completion/nested.py b/voxvera/vendor/prompt_toolkit/completion/nested.py deleted file mode 100644 index b72b69e..0000000 --- a/voxvera/vendor/prompt_toolkit/completion/nested.py +++ /dev/null @@ -1,109 +0,0 @@ -""" -Nestedcompleter for completion of hierarchical data structures. -""" - -from __future__ import annotations - -from typing import Any, Iterable, Mapping, Set, Union - -from prompt_toolkit.completion import CompleteEvent, Completer, Completion -from prompt_toolkit.completion.word_completer import WordCompleter -from prompt_toolkit.document import Document - -__all__ = ["NestedCompleter"] - -# NestedDict = Mapping[str, Union['NestedDict', Set[str], None, Completer]] -NestedDict = Mapping[str, Union[Any, Set[str], None, Completer]] - - -class NestedCompleter(Completer): - """ - Completer which wraps around several other completers, and calls any the - one that corresponds with the first word of the input. - - By combining multiple `NestedCompleter` instances, we can achieve multiple - hierarchical levels of autocompletion. This is useful when `WordCompleter` - is not sufficient. - - If you need multiple levels, check out the `from_nested_dict` classmethod. - """ - - def __init__( - self, options: dict[str, Completer | None], ignore_case: bool = True - ) -> None: - self.options = options - self.ignore_case = ignore_case - - def __repr__(self) -> str: - return f"NestedCompleter({self.options!r}, ignore_case={self.ignore_case!r})" - - @classmethod - def from_nested_dict(cls, data: NestedDict) -> NestedCompleter: - """ - Create a `NestedCompleter`, starting from a nested dictionary data - structure, like this: - - .. code:: - - data = { - 'show': { - 'version': None, - 'interfaces': None, - 'clock': None, - 'ip': {'interface': {'brief'}} - }, - 'exit': None - 'enable': None - } - - The value should be `None` if there is no further completion at some - point. If all values in the dictionary are None, it is also possible to - use a set instead. - - Values in this data structure can be a completers as well. - """ - options: dict[str, Completer | None] = {} - for key, value in data.items(): - if isinstance(value, Completer): - options[key] = value - elif isinstance(value, dict): - options[key] = cls.from_nested_dict(value) - elif isinstance(value, set): - options[key] = cls.from_nested_dict(dict.fromkeys(value)) - else: - assert value is None - options[key] = None - - return cls(options) - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - # Split document. - text = document.text_before_cursor.lstrip() - stripped_len = len(document.text_before_cursor) - len(text) - - # If there is a space, check for the first term, and use a - # subcompleter. - if " " in text: - first_term = text.split()[0] - completer = self.options.get(first_term) - - # If we have a sub completer, use this for the completions. - if completer is not None: - remaining_text = text[len(first_term) :].lstrip() - move_cursor = len(text) - len(remaining_text) + stripped_len - - new_document = Document( - remaining_text, - cursor_position=document.cursor_position - move_cursor, - ) - - yield from completer.get_completions(new_document, complete_event) - - # No space in the input: behave exactly like `WordCompleter`. - else: - completer = WordCompleter( - list(self.options.keys()), ignore_case=self.ignore_case - ) - yield from completer.get_completions(document, complete_event) diff --git a/voxvera/vendor/prompt_toolkit/completion/word_completer.py b/voxvera/vendor/prompt_toolkit/completion/word_completer.py deleted file mode 100644 index 2e12405..0000000 --- a/voxvera/vendor/prompt_toolkit/completion/word_completer.py +++ /dev/null @@ -1,94 +0,0 @@ -from __future__ import annotations - -from typing import Callable, Iterable, Mapping, Pattern, Sequence - -from prompt_toolkit.completion import CompleteEvent, Completer, Completion -from prompt_toolkit.document import Document -from prompt_toolkit.formatted_text import AnyFormattedText - -__all__ = [ - "WordCompleter", -] - - -class WordCompleter(Completer): - """ - Simple autocompletion on a list of words. - - :param words: List of words or callable that returns a list of words. - :param ignore_case: If True, case-insensitive completion. - :param meta_dict: Optional dict mapping words to their meta-text. (This - should map strings to strings or formatted text.) - :param WORD: When True, use WORD characters. - :param sentence: When True, don't complete by comparing the word before the - cursor, but by comparing all the text before the cursor. In this case, - the list of words is just a list of strings, where each string can - contain spaces. (Can not be used together with the WORD option.) - :param match_middle: When True, match not only the start, but also in the - middle of the word. - :param pattern: Optional compiled regex for finding the word before - the cursor to complete. When given, use this regex pattern instead of - default one (see document._FIND_WORD_RE) - """ - - def __init__( - self, - words: Sequence[str] | Callable[[], Sequence[str]], - ignore_case: bool = False, - display_dict: Mapping[str, AnyFormattedText] | None = None, - meta_dict: Mapping[str, AnyFormattedText] | None = None, - WORD: bool = False, - sentence: bool = False, - match_middle: bool = False, - pattern: Pattern[str] | None = None, - ) -> None: - assert not (WORD and sentence) - - self.words = words - self.ignore_case = ignore_case - self.display_dict = display_dict or {} - self.meta_dict = meta_dict or {} - self.WORD = WORD - self.sentence = sentence - self.match_middle = match_middle - self.pattern = pattern - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - # Get list of words. - words = self.words - if callable(words): - words = words() - - # Get word/text before cursor. - if self.sentence: - word_before_cursor = document.text_before_cursor - else: - word_before_cursor = document.get_word_before_cursor( - WORD=self.WORD, pattern=self.pattern - ) - - if self.ignore_case: - word_before_cursor = word_before_cursor.lower() - - def word_matches(word: str) -> bool: - """True when the word before the cursor matches.""" - if self.ignore_case: - word = word.lower() - - if self.match_middle: - return word_before_cursor in word - else: - return word.startswith(word_before_cursor) - - for a in words: - if word_matches(a): - display = self.display_dict.get(a, a) - display_meta = self.meta_dict.get(a, "") - yield Completion( - text=a, - start_position=-len(word_before_cursor), - display=display, - display_meta=display_meta, - ) diff --git a/voxvera/vendor/prompt_toolkit/contrib/__init__.py b/voxvera/vendor/prompt_toolkit/contrib/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/prompt_toolkit/contrib/completers/__init__.py b/voxvera/vendor/prompt_toolkit/contrib/completers/__init__.py deleted file mode 100644 index 172fe6f..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/completers/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from __future__ import annotations - -from .system import SystemCompleter - -__all__ = ["SystemCompleter"] diff --git a/voxvera/vendor/prompt_toolkit/contrib/completers/system.py b/voxvera/vendor/prompt_toolkit/contrib/completers/system.py deleted file mode 100644 index 5d990e5..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/completers/system.py +++ /dev/null @@ -1,64 +0,0 @@ -from __future__ import annotations - -from prompt_toolkit.completion.filesystem import ExecutableCompleter, PathCompleter -from prompt_toolkit.contrib.regular_languages.compiler import compile -from prompt_toolkit.contrib.regular_languages.completion import GrammarCompleter - -__all__ = [ - "SystemCompleter", -] - - -class SystemCompleter(GrammarCompleter): - """ - Completer for system commands. - """ - - def __init__(self) -> None: - # Compile grammar. - g = compile( - r""" - # First we have an executable. - (?P[^\s]+) - - # Ignore literals in between. - ( - \s+ - ("[^"]*" | '[^']*' | [^'"]+ ) - )* - - \s+ - - # Filename as parameters. - ( - (?P[^\s]+) | - "(?P[^\s]+)" | - '(?P[^\s]+)' - ) - """, - escape_funcs={ - "double_quoted_filename": (lambda string: string.replace('"', '\\"')), - "single_quoted_filename": (lambda string: string.replace("'", "\\'")), - }, - unescape_funcs={ - "double_quoted_filename": ( - lambda string: string.replace('\\"', '"') - ), # XXX: not entirely correct. - "single_quoted_filename": (lambda string: string.replace("\\'", "'")), - }, - ) - - # Create GrammarCompleter - super().__init__( - g, - { - "executable": ExecutableCompleter(), - "filename": PathCompleter(only_directories=False, expanduser=True), - "double_quoted_filename": PathCompleter( - only_directories=False, expanduser=True - ), - "single_quoted_filename": PathCompleter( - only_directories=False, expanduser=True - ), - }, - ) diff --git a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/__init__.py b/voxvera/vendor/prompt_toolkit/contrib/regular_languages/__init__.py deleted file mode 100644 index 38b027c..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/__init__.py +++ /dev/null @@ -1,80 +0,0 @@ -r""" -Tool for expressing the grammar of an input as a regular language. -================================================================== - -The grammar for the input of many simple command line interfaces can be -expressed by a regular language. Examples are PDB (the Python debugger); a -simple (bash-like) shell with "pwd", "cd", "cat" and "ls" commands; arguments -that you can pass to an executable; etc. It is possible to use regular -expressions for validation and parsing of such a grammar. (More about regular -languages: http://en.wikipedia.org/wiki/Regular_language) - -Example -------- - -Let's take the pwd/cd/cat/ls example. We want to have a shell that accepts -these three commands. "cd" is followed by a quoted directory name and "cat" is -followed by a quoted file name. (We allow quotes inside the filename when -they're escaped with a backslash.) We could define the grammar using the -following regular expression:: - - grammar = \s* ( - pwd | - ls | - (cd \s+ " ([^"]|\.)+ ") | - (cat \s+ " ([^"]|\.)+ ") - ) \s* - - -What can we do with this grammar? ---------------------------------- - -- Syntax highlighting: We could use this for instance to give file names - different color. -- Parse the result: .. We can extract the file names and commands by using a - regular expression with named groups. -- Input validation: .. Don't accept anything that does not match this grammar. - When combined with a parser, we can also recursively do - filename validation (and accept only existing files.) -- Autocompletion: .... Each part of the grammar can have its own autocompleter. - "cat" has to be completed using file names, while "cd" - has to be completed using directory names. - -How does it work? ------------------ - -As a user of this library, you have to define the grammar of the input as a -regular expression. The parts of this grammar where autocompletion, validation -or any other processing is required need to be marked using a regex named -group. Like ``(?P...)`` for instance. - -When the input is processed for validation (for instance), the regex will -execute, the named group is captured, and the validator associated with this -named group will test the captured string. - -There is one tricky bit: - - Often we operate on incomplete input (this is by definition the case for - autocompletion) and we have to decide for the cursor position in which - possible state the grammar it could be and in which way variables could be - matched up to that point. - -To solve this problem, the compiler takes the original regular expression and -translates it into a set of other regular expressions which each match certain -prefixes of the original regular expression. We generate one prefix regular -expression for every named variable (with this variable being the end of that -expression). - - -TODO: some examples of: - - How to create a highlighter from this grammar. - - How to create a validator from this grammar. - - How to create an autocompleter from this grammar. - - How to create a parser from this grammar. -""" - -from __future__ import annotations - -from .compiler import compile - -__all__ = ["compile"] diff --git a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/compiler.py b/voxvera/vendor/prompt_toolkit/contrib/regular_languages/compiler.py deleted file mode 100644 index 4009d54..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/compiler.py +++ /dev/null @@ -1,579 +0,0 @@ -r""" -Compiler for a regular grammar. - -Example usage:: - - # Create and compile grammar. - p = compile('add \s+ (?P[^\s]+) \s+ (?P[^\s]+)') - - # Match input string. - m = p.match('add 23 432') - - # Get variables. - m.variables().get('var1') # Returns "23" - m.variables().get('var2') # Returns "432" - - -Partial matches are possible:: - - # Create and compile grammar. - p = compile(''' - # Operators with two arguments. - ((?P[^\s]+) \s+ (?P[^\s]+) \s+ (?P[^\s]+)) | - - # Operators with only one arguments. - ((?P[^\s]+) \s+ (?P[^\s]+)) - ''') - - # Match partial input string. - m = p.match_prefix('add 23') - - # Get variables. (Notice that both operator1 and operator2 contain the - # value "add".) This is because our input is incomplete, and we don't know - # yet in which rule of the regex we we'll end up. It could also be that - # `operator1` and `operator2` have a different autocompleter and we want to - # call all possible autocompleters that would result in valid input.) - m.variables().get('var1') # Returns "23" - m.variables().get('operator1') # Returns "add" - m.variables().get('operator2') # Returns "add" - -""" - -from __future__ import annotations - -import re -from typing import Callable, Dict, Iterable, Iterator, Pattern, TypeVar, overload -from typing import Match as RegexMatch - -from .regex_parser import ( - AnyNode, - Lookahead, - Node, - NodeSequence, - Regex, - Repeat, - Variable, - parse_regex, - tokenize_regex, -) - -__all__ = ["compile", "Match", "Variables"] - - -# Name of the named group in the regex, matching trailing input. -# (Trailing input is when the input contains characters after the end of the -# expression has been matched.) -_INVALID_TRAILING_INPUT = "invalid_trailing" - -EscapeFuncDict = Dict[str, Callable[[str], str]] - - -class _CompiledGrammar: - """ - Compiles a grammar. This will take the parse tree of a regular expression - and compile the grammar. - - :param root_node: :class~`.regex_parser.Node` instance. - :param escape_funcs: `dict` mapping variable names to escape callables. - :param unescape_funcs: `dict` mapping variable names to unescape callables. - """ - - def __init__( - self, - root_node: Node, - escape_funcs: EscapeFuncDict | None = None, - unescape_funcs: EscapeFuncDict | None = None, - ) -> None: - self.root_node = root_node - self.escape_funcs = escape_funcs or {} - self.unescape_funcs = unescape_funcs or {} - - #: Dictionary that will map the regex names to Node instances. - self._group_names_to_nodes: dict[ - str, str - ] = {} # Maps regex group names to varnames. - counter = [0] - - def create_group_func(node: Variable) -> str: - name = f"n{counter[0]}" - self._group_names_to_nodes[name] = node.varname - counter[0] += 1 - return name - - # Compile regex strings. - self._re_pattern = f"^{self._transform(root_node, create_group_func)}$" - self._re_prefix_patterns = list( - self._transform_prefix(root_node, create_group_func) - ) - - # Compile the regex itself. - flags = re.DOTALL # Note that we don't need re.MULTILINE! (^ and $ - # still represent the start and end of input text.) - self._re = re.compile(self._re_pattern, flags) - self._re_prefix = [re.compile(t, flags) for t in self._re_prefix_patterns] - - # We compile one more set of regexes, similar to `_re_prefix`, but accept any trailing - # input. This will ensure that we can still highlight the input correctly, even when the - # input contains some additional characters at the end that don't match the grammar.) - self._re_prefix_with_trailing_input = [ - re.compile( - r"(?:{})(?P<{}>.*?)$".format(t.rstrip("$"), _INVALID_TRAILING_INPUT), - flags, - ) - for t in self._re_prefix_patterns - ] - - def escape(self, varname: str, value: str) -> str: - """ - Escape `value` to fit in the place of this variable into the grammar. - """ - f = self.escape_funcs.get(varname) - return f(value) if f else value - - def unescape(self, varname: str, value: str) -> str: - """ - Unescape `value`. - """ - f = self.unescape_funcs.get(varname) - return f(value) if f else value - - @classmethod - def _transform( - cls, root_node: Node, create_group_func: Callable[[Variable], str] - ) -> str: - """ - Turn a :class:`Node` object into a regular expression. - - :param root_node: The :class:`Node` instance for which we generate the grammar. - :param create_group_func: A callable which takes a `Node` and returns the next - free name for this node. - """ - - def transform(node: Node) -> str: - # Turn `AnyNode` into an OR. - if isinstance(node, AnyNode): - return "(?:{})".format("|".join(transform(c) for c in node.children)) - - # Concatenate a `NodeSequence` - elif isinstance(node, NodeSequence): - return "".join(transform(c) for c in node.children) - - # For Regex and Lookahead nodes, just insert them literally. - elif isinstance(node, Regex): - return node.regex - - elif isinstance(node, Lookahead): - before = "(?!" if node.negative else "(=" - return before + transform(node.childnode) + ")" - - # A `Variable` wraps the children into a named group. - elif isinstance(node, Variable): - return f"(?P<{create_group_func(node)}>{transform(node.childnode)})" - - # `Repeat`. - elif isinstance(node, Repeat): - if node.max_repeat is None: - if node.min_repeat == 0: - repeat_sign = "*" - elif node.min_repeat == 1: - repeat_sign = "+" - else: - repeat_sign = "{%i,%s}" % ( - node.min_repeat, - ("" if node.max_repeat is None else str(node.max_repeat)), - ) - - return "(?:{}){}{}".format( - transform(node.childnode), - repeat_sign, - ("" if node.greedy else "?"), - ) - else: - raise TypeError(f"Got {node!r}") - - return transform(root_node) - - @classmethod - def _transform_prefix( - cls, root_node: Node, create_group_func: Callable[[Variable], str] - ) -> Iterable[str]: - """ - Yield all the regular expressions matching a prefix of the grammar - defined by the `Node` instance. - - For each `Variable`, one regex pattern will be generated, with this - named group at the end. This is required because a regex engine will - terminate once a match is found. For autocompletion however, we need - the matches for all possible paths, so that we can provide completions - for each `Variable`. - - - So, in the case of an `Any` (`A|B|C)', we generate a pattern for each - clause. This is one for `A`, one for `B` and one for `C`. Unless some - groups don't contain a `Variable`, then these can be merged together. - - In the case of a `NodeSequence` (`ABC`), we generate a pattern for - each prefix that ends with a variable, and one pattern for the whole - sequence. So, that's one for `A`, one for `AB` and one for `ABC`. - - :param root_node: The :class:`Node` instance for which we generate the grammar. - :param create_group_func: A callable which takes a `Node` and returns the next - free name for this node. - """ - - def contains_variable(node: Node) -> bool: - if isinstance(node, Regex): - return False - elif isinstance(node, Variable): - return True - elif isinstance(node, (Lookahead, Repeat)): - return contains_variable(node.childnode) - elif isinstance(node, (NodeSequence, AnyNode)): - return any(contains_variable(child) for child in node.children) - - return False - - def transform(node: Node) -> Iterable[str]: - # Generate separate pattern for all terms that contain variables - # within this OR. Terms that don't contain a variable can be merged - # together in one pattern. - if isinstance(node, AnyNode): - # If we have a definition like: - # (?P .*) | (?P .*) - # Then we want to be able to generate completions for both the - # name as well as the city. We do this by yielding two - # different regular expressions, because the engine won't - # follow multiple paths, if multiple are possible. - children_with_variable = [] - children_without_variable = [] - for c in node.children: - if contains_variable(c): - children_with_variable.append(c) - else: - children_without_variable.append(c) - - for c in children_with_variable: - yield from transform(c) - - # Merge options without variable together. - if children_without_variable: - yield "|".join( - r for c in children_without_variable for r in transform(c) - ) - - # For a sequence, generate a pattern for each prefix that ends with - # a variable + one pattern of the complete sequence. - # (This is because, for autocompletion, we match the text before - # the cursor, and completions are given for the variable that we - # match right before the cursor.) - elif isinstance(node, NodeSequence): - # For all components in the sequence, compute prefix patterns, - # as well as full patterns. - complete = [cls._transform(c, create_group_func) for c in node.children] - prefixes = [list(transform(c)) for c in node.children] - variable_nodes = [contains_variable(c) for c in node.children] - - # If any child is contains a variable, we should yield a - # pattern up to that point, so that we are sure this will be - # matched. - for i in range(len(node.children)): - if variable_nodes[i]: - for c_str in prefixes[i]: - yield "".join(complete[:i]) + c_str - - # If there are non-variable nodes, merge all the prefixes into - # one pattern. If the input is: "[part1] [part2] [part3]", then - # this gets compiled into: - # (complete1 + (complete2 + (complete3 | partial3) | partial2) | partial1 ) - # For nodes that contain a variable, we skip the "|partial" - # part here, because thees are matched with the previous - # patterns. - if not all(variable_nodes): - result = [] - - # Start with complete patterns. - for i in range(len(node.children)): - result.append("(?:") - result.append(complete[i]) - - # Add prefix patterns. - for i in range(len(node.children) - 1, -1, -1): - if variable_nodes[i]: - # No need to yield a prefix for this one, we did - # the variable prefixes earlier. - result.append(")") - else: - result.append("|(?:") - # If this yields multiple, we should yield all combinations. - assert len(prefixes[i]) == 1 - result.append(prefixes[i][0]) - result.append("))") - - yield "".join(result) - - elif isinstance(node, Regex): - yield f"(?:{node.regex})?" - - elif isinstance(node, Lookahead): - if node.negative: - yield f"(?!{cls._transform(node.childnode, create_group_func)})" - else: - # Not sure what the correct semantics are in this case. - # (Probably it's not worth implementing this.) - raise Exception("Positive lookahead not yet supported.") - - elif isinstance(node, Variable): - # (Note that we should not append a '?' here. the 'transform' - # method will already recursively do that.) - for c_str in transform(node.childnode): - yield f"(?P<{create_group_func(node)}>{c_str})" - - elif isinstance(node, Repeat): - # If we have a repetition of 8 times. That would mean that the - # current input could have for instance 7 times a complete - # match, followed by a partial match. - prefix = cls._transform(node.childnode, create_group_func) - - if node.max_repeat == 1: - yield from transform(node.childnode) - else: - for c_str in transform(node.childnode): - if node.max_repeat: - repeat_sign = "{,%i}" % (node.max_repeat - 1) - else: - repeat_sign = "*" - yield "(?:{}){}{}{}".format( - prefix, - repeat_sign, - ("" if node.greedy else "?"), - c_str, - ) - - else: - raise TypeError(f"Got {node!r}") - - for r in transform(root_node): - yield f"^(?:{r})$" - - def match(self, string: str) -> Match | None: - """ - Match the string with the grammar. - Returns a :class:`Match` instance or `None` when the input doesn't match the grammar. - - :param string: The input string. - """ - m = self._re.match(string) - - if m: - return Match( - string, [(self._re, m)], self._group_names_to_nodes, self.unescape_funcs - ) - return None - - def match_prefix(self, string: str) -> Match | None: - """ - Do a partial match of the string with the grammar. The returned - :class:`Match` instance can contain multiple representations of the - match. This will never return `None`. If it doesn't match at all, the "trailing input" - part will capture all of the input. - - :param string: The input string. - """ - # First try to match using `_re_prefix`. If nothing is found, use the patterns that - # also accept trailing characters. - for patterns in [self._re_prefix, self._re_prefix_with_trailing_input]: - matches = [(r, r.match(string)) for r in patterns] - matches2 = [(r, m) for r, m in matches if m] - - if matches2 != []: - return Match( - string, matches2, self._group_names_to_nodes, self.unescape_funcs - ) - - return None - - -class Match: - """ - :param string: The input string. - :param re_matches: List of (compiled_re_pattern, re_match) tuples. - :param group_names_to_nodes: Dictionary mapping all the re group names to the matching Node instances. - """ - - def __init__( - self, - string: str, - re_matches: list[tuple[Pattern[str], RegexMatch[str]]], - group_names_to_nodes: dict[str, str], - unescape_funcs: dict[str, Callable[[str], str]], - ): - self.string = string - self._re_matches = re_matches - self._group_names_to_nodes = group_names_to_nodes - self._unescape_funcs = unescape_funcs - - def _nodes_to_regs(self) -> list[tuple[str, tuple[int, int]]]: - """ - Return a list of (varname, reg) tuples. - """ - - def get_tuples() -> Iterable[tuple[str, tuple[int, int]]]: - for r, re_match in self._re_matches: - for group_name, group_index in r.groupindex.items(): - if group_name != _INVALID_TRAILING_INPUT: - regs = re_match.regs - reg = regs[group_index] - node = self._group_names_to_nodes[group_name] - yield (node, reg) - - return list(get_tuples()) - - def _nodes_to_values(self) -> list[tuple[str, str, tuple[int, int]]]: - """ - Returns list of (Node, string_value) tuples. - """ - - def is_none(sl: tuple[int, int]) -> bool: - return sl[0] == -1 and sl[1] == -1 - - def get(sl: tuple[int, int]) -> str: - return self.string[sl[0] : sl[1]] - - return [ - (varname, get(slice), slice) - for varname, slice in self._nodes_to_regs() - if not is_none(slice) - ] - - def _unescape(self, varname: str, value: str) -> str: - unwrapper = self._unescape_funcs.get(varname) - return unwrapper(value) if unwrapper else value - - def variables(self) -> Variables: - """ - Returns :class:`Variables` instance. - """ - return Variables( - [(k, self._unescape(k, v), sl) for k, v, sl in self._nodes_to_values()] - ) - - def trailing_input(self) -> MatchVariable | None: - """ - Get the `MatchVariable` instance, representing trailing input, if there is any. - "Trailing input" is input at the end that does not match the grammar anymore, but - when this is removed from the end of the input, the input would be a valid string. - """ - slices: list[tuple[int, int]] = [] - - # Find all regex group for the name _INVALID_TRAILING_INPUT. - for r, re_match in self._re_matches: - for group_name, group_index in r.groupindex.items(): - if group_name == _INVALID_TRAILING_INPUT: - slices.append(re_match.regs[group_index]) - - # Take the smallest part. (Smaller trailing text means that a larger input has - # been matched, so that is better.) - if slices: - slice = (max(i[0] for i in slices), max(i[1] for i in slices)) - value = self.string[slice[0] : slice[1]] - return MatchVariable("", value, slice) - return None - - def end_nodes(self) -> Iterable[MatchVariable]: - """ - Yields `MatchVariable` instances for all the nodes having their end - position at the end of the input string. - """ - for varname, reg in self._nodes_to_regs(): - # If this part goes until the end of the input string. - if reg[1] == len(self.string): - value = self._unescape(varname, self.string[reg[0] : reg[1]]) - yield MatchVariable(varname, value, (reg[0], reg[1])) - - -_T = TypeVar("_T") - - -class Variables: - def __init__(self, tuples: list[tuple[str, str, tuple[int, int]]]) -> None: - #: List of (varname, value, slice) tuples. - self._tuples = tuples - - def __repr__(self) -> str: - return "{}({})".format( - self.__class__.__name__, - ", ".join(f"{k}={v!r}" for k, v, _ in self._tuples), - ) - - @overload - def get(self, key: str) -> str | None: ... - - @overload - def get(self, key: str, default: str | _T) -> str | _T: ... - - def get(self, key: str, default: str | _T | None = None) -> str | _T | None: - items = self.getall(key) - return items[0] if items else default - - def getall(self, key: str) -> list[str]: - return [v for k, v, _ in self._tuples if k == key] - - def __getitem__(self, key: str) -> str | None: - return self.get(key) - - def __iter__(self) -> Iterator[MatchVariable]: - """ - Yield `MatchVariable` instances. - """ - for varname, value, slice in self._tuples: - yield MatchVariable(varname, value, slice) - - -class MatchVariable: - """ - Represents a match of a variable in the grammar. - - :param varname: (string) Name of the variable. - :param value: (string) Value of this variable. - :param slice: (start, stop) tuple, indicating the position of this variable - in the input string. - """ - - def __init__(self, varname: str, value: str, slice: tuple[int, int]) -> None: - self.varname = varname - self.value = value - self.slice = slice - - self.start = self.slice[0] - self.stop = self.slice[1] - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.varname!r}, {self.value!r})" - - -def compile( - expression: str, - escape_funcs: EscapeFuncDict | None = None, - unescape_funcs: EscapeFuncDict | None = None, -) -> _CompiledGrammar: - """ - Compile grammar (given as regex string), returning a `CompiledGrammar` - instance. - """ - return _compile_from_parse_tree( - parse_regex(tokenize_regex(expression)), - escape_funcs=escape_funcs, - unescape_funcs=unescape_funcs, - ) - - -def _compile_from_parse_tree( - root_node: Node, - escape_funcs: EscapeFuncDict | None = None, - unescape_funcs: EscapeFuncDict | None = None, -) -> _CompiledGrammar: - """ - Compile grammar (given as parse tree), returning a `CompiledGrammar` - instance. - """ - return _CompiledGrammar( - root_node, escape_funcs=escape_funcs, unescape_funcs=unescape_funcs - ) diff --git a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/completion.py b/voxvera/vendor/prompt_toolkit/contrib/regular_languages/completion.py deleted file mode 100644 index 19ebaad..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/completion.py +++ /dev/null @@ -1,100 +0,0 @@ -""" -Completer for a regular grammar. -""" - -from __future__ import annotations - -from typing import Iterable - -from prompt_toolkit.completion import CompleteEvent, Completer, Completion -from prompt_toolkit.document import Document - -from .compiler import Match, _CompiledGrammar - -__all__ = [ - "GrammarCompleter", -] - - -class GrammarCompleter(Completer): - """ - Completer which can be used for autocompletion according to variables in - the grammar. Each variable can have a different autocompleter. - - :param compiled_grammar: `GrammarCompleter` instance. - :param completers: `dict` mapping variable names of the grammar to the - `Completer` instances to be used for each variable. - """ - - def __init__( - self, compiled_grammar: _CompiledGrammar, completers: dict[str, Completer] - ) -> None: - self.compiled_grammar = compiled_grammar - self.completers = completers - - def get_completions( - self, document: Document, complete_event: CompleteEvent - ) -> Iterable[Completion]: - m = self.compiled_grammar.match_prefix(document.text_before_cursor) - - if m: - yield from self._remove_duplicates( - self._get_completions_for_match(m, complete_event) - ) - - def _get_completions_for_match( - self, match: Match, complete_event: CompleteEvent - ) -> Iterable[Completion]: - """ - Yield all the possible completions for this input string. - (The completer assumes that the cursor position was at the end of the - input string.) - """ - for match_variable in match.end_nodes(): - varname = match_variable.varname - start = match_variable.start - - completer = self.completers.get(varname) - - if completer: - text = match_variable.value - - # Unwrap text. - unwrapped_text = self.compiled_grammar.unescape(varname, text) - - # Create a document, for the completions API (text/cursor_position) - document = Document(unwrapped_text, len(unwrapped_text)) - - # Call completer - for completion in completer.get_completions(document, complete_event): - new_text = ( - unwrapped_text[: len(text) + completion.start_position] - + completion.text - ) - - # Wrap again. - yield Completion( - text=self.compiled_grammar.escape(varname, new_text), - start_position=start - len(match.string), - display=completion.display, - display_meta=completion.display_meta, - ) - - def _remove_duplicates(self, items: Iterable[Completion]) -> Iterable[Completion]: - """ - Remove duplicates, while keeping the order. - (Sometimes we have duplicates, because the there several matches of the - same grammar, each yielding similar completions.) - """ - - def hash_completion(completion: Completion) -> tuple[str, int]: - return completion.text, completion.start_position - - yielded_so_far: set[tuple[str, int]] = set() - - for completion in items: - hash_value = hash_completion(completion) - - if hash_value not in yielded_so_far: - yielded_so_far.add(hash_value) - yield completion diff --git a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/lexer.py b/voxvera/vendor/prompt_toolkit/contrib/regular_languages/lexer.py deleted file mode 100644 index c5434cf..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/lexer.py +++ /dev/null @@ -1,94 +0,0 @@ -""" -`GrammarLexer` is compatible with other lexers and can be used to highlight -the input using a regular grammar with annotations. -""" - -from __future__ import annotations - -from typing import Callable - -from prompt_toolkit.document import Document -from prompt_toolkit.formatted_text.base import StyleAndTextTuples -from prompt_toolkit.formatted_text.utils import split_lines -from prompt_toolkit.lexers import Lexer - -from .compiler import _CompiledGrammar - -__all__ = [ - "GrammarLexer", -] - - -class GrammarLexer(Lexer): - """ - Lexer which can be used for highlighting of fragments according to variables in the grammar. - - (It does not actual lexing of the string, but it exposes an API, compatible - with the Pygments lexer class.) - - :param compiled_grammar: Grammar as returned by the `compile()` function. - :param lexers: Dictionary mapping variable names of the regular grammar to - the lexers that should be used for this part. (This can - call other lexers recursively.) If you wish a part of the - grammar to just get one fragment, use a - `prompt_toolkit.lexers.SimpleLexer`. - """ - - def __init__( - self, - compiled_grammar: _CompiledGrammar, - default_style: str = "", - lexers: dict[str, Lexer] | None = None, - ) -> None: - self.compiled_grammar = compiled_grammar - self.default_style = default_style - self.lexers = lexers or {} - - def _get_text_fragments(self, text: str) -> StyleAndTextTuples: - m = self.compiled_grammar.match_prefix(text) - - if m: - characters: StyleAndTextTuples = [(self.default_style, c) for c in text] - - for v in m.variables(): - # If we have a `Lexer` instance for this part of the input. - # Tokenize recursively and apply tokens. - lexer = self.lexers.get(v.varname) - - if lexer: - document = Document(text[v.start : v.stop]) - lexer_tokens_for_line = lexer.lex_document(document) - text_fragments: StyleAndTextTuples = [] - for i in range(len(document.lines)): - text_fragments.extend(lexer_tokens_for_line(i)) - text_fragments.append(("", "\n")) - if text_fragments: - text_fragments.pop() - - i = v.start - for t, s, *_ in text_fragments: - for c in s: - if characters[i][0] == self.default_style: - characters[i] = (t, characters[i][1]) - i += 1 - - # Highlight trailing input. - trailing_input = m.trailing_input() - if trailing_input: - for i in range(trailing_input.start, trailing_input.stop): - characters[i] = ("class:trailing-input", characters[i][1]) - - return characters - else: - return [("", text)] - - def lex_document(self, document: Document) -> Callable[[int], StyleAndTextTuples]: - lines = list(split_lines(self._get_text_fragments(document.text))) - - def get_line(lineno: int) -> StyleAndTextTuples: - try: - return lines[lineno] - except IndexError: - return [] - - return get_line diff --git a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/regex_parser.py b/voxvera/vendor/prompt_toolkit/contrib/regular_languages/regex_parser.py deleted file mode 100644 index 353e54f..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/regex_parser.py +++ /dev/null @@ -1,279 +0,0 @@ -""" -Parser for parsing a regular expression. -Take a string representing a regular expression and return the root node of its -parse tree. - -usage:: - - root_node = parse_regex('(hello|world)') - -Remarks: -- The regex parser processes multiline, it ignores all whitespace and supports - multiple named groups with the same name and #-style comments. - -Limitations: -- Lookahead is not supported. -""" - -from __future__ import annotations - -import re - -__all__ = [ - "Repeat", - "Variable", - "Regex", - "Lookahead", - "tokenize_regex", - "parse_regex", -] - - -class Node: - """ - Base class for all the grammar nodes. - (You don't initialize this one.) - """ - - def __add__(self, other_node: Node) -> NodeSequence: - return NodeSequence([self, other_node]) - - def __or__(self, other_node: Node) -> AnyNode: - return AnyNode([self, other_node]) - - -class AnyNode(Node): - """ - Union operation (OR operation) between several grammars. You don't - initialize this yourself, but it's a result of a "Grammar1 | Grammar2" - operation. - """ - - def __init__(self, children: list[Node]) -> None: - self.children = children - - def __or__(self, other_node: Node) -> AnyNode: - return AnyNode(self.children + [other_node]) - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.children!r})" - - -class NodeSequence(Node): - """ - Concatenation operation of several grammars. You don't initialize this - yourself, but it's a result of a "Grammar1 + Grammar2" operation. - """ - - def __init__(self, children: list[Node]) -> None: - self.children = children - - def __add__(self, other_node: Node) -> NodeSequence: - return NodeSequence(self.children + [other_node]) - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.children!r})" - - -class Regex(Node): - """ - Regular expression. - """ - - def __init__(self, regex: str) -> None: - re.compile(regex) # Validate - - self.regex = regex - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(/{self.regex}/)" - - -class Lookahead(Node): - """ - Lookahead expression. - """ - - def __init__(self, childnode: Node, negative: bool = False) -> None: - self.childnode = childnode - self.negative = negative - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.childnode!r})" - - -class Variable(Node): - """ - Mark a variable in the regular grammar. This will be translated into a - named group. Each variable can have his own completer, validator, etc.. - - :param childnode: The grammar which is wrapped inside this variable. - :param varname: String. - """ - - def __init__(self, childnode: Node, varname: str = "") -> None: - self.childnode = childnode - self.varname = varname - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(childnode={self.childnode!r}, varname={self.varname!r})" - - -class Repeat(Node): - def __init__( - self, - childnode: Node, - min_repeat: int = 0, - max_repeat: int | None = None, - greedy: bool = True, - ) -> None: - self.childnode = childnode - self.min_repeat = min_repeat - self.max_repeat = max_repeat - self.greedy = greedy - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(childnode={self.childnode!r})" - - -def tokenize_regex(input: str) -> list[str]: - """ - Takes a string, representing a regular expression as input, and tokenizes - it. - - :param input: string, representing a regular expression. - :returns: List of tokens. - """ - # Regular expression for tokenizing other regular expressions. - p = re.compile( - r"""^( - \(\?P\<[a-zA-Z0-9_-]+\> | # Start of named group. - \(\?#[^)]*\) | # Comment - \(\?= | # Start of lookahead assertion - \(\?! | # Start of negative lookahead assertion - \(\?<= | # If preceded by. - \(\?< | # If not preceded by. - \(?: | # Start of group. (non capturing.) - \( | # Start of group. - \(?[iLmsux] | # Flags. - \(?P=[a-zA-Z]+\) | # Back reference to named group - \) | # End of group. - \{[^{}]*\} | # Repetition - \*\? | \+\? | \?\?\ | # Non greedy repetition. - \* | \+ | \? | # Repetition - \#.*\n | # Comment - \\. | - - # Character group. - \[ - ( [^\]\\] | \\.)* - \] | - - [^(){}] | - . - )""", - re.VERBOSE, - ) - - tokens = [] - - while input: - m = p.match(input) - if m: - token, input = input[: m.end()], input[m.end() :] - if not token.isspace(): - tokens.append(token) - else: - raise Exception("Could not tokenize input regex.") - - return tokens - - -def parse_regex(regex_tokens: list[str]) -> Node: - """ - Takes a list of tokens from the tokenizer, and returns a parse tree. - """ - # We add a closing brace because that represents the final pop of the stack. - tokens: list[str] = [")"] + regex_tokens[::-1] - - def wrap(lst: list[Node]) -> Node: - """Turn list into sequence when it contains several items.""" - if len(lst) == 1: - return lst[0] - else: - return NodeSequence(lst) - - def _parse() -> Node: - or_list: list[list[Node]] = [] - result: list[Node] = [] - - def wrapped_result() -> Node: - if or_list == []: - return wrap(result) - else: - or_list.append(result) - return AnyNode([wrap(i) for i in or_list]) - - while tokens: - t = tokens.pop() - - if t.startswith("(?P<"): - variable = Variable(_parse(), varname=t[4:-1]) - result.append(variable) - - elif t in ("*", "*?"): - greedy = t == "*" - result[-1] = Repeat(result[-1], greedy=greedy) - - elif t in ("+", "+?"): - greedy = t == "+" - result[-1] = Repeat(result[-1], min_repeat=1, greedy=greedy) - - elif t in ("?", "??"): - if result == []: - raise Exception("Nothing to repeat." + repr(tokens)) - else: - greedy = t == "?" - result[-1] = Repeat( - result[-1], min_repeat=0, max_repeat=1, greedy=greedy - ) - - elif t == "|": - or_list.append(result) - result = [] - - elif t in ("(", "(?:"): - result.append(_parse()) - - elif t == "(?!": - result.append(Lookahead(_parse(), negative=True)) - - elif t == "(?=": - result.append(Lookahead(_parse(), negative=False)) - - elif t == ")": - return wrapped_result() - - elif t.startswith("#"): - pass - - elif t.startswith("{"): - # TODO: implement! - raise Exception(f"{t}-style repetition not yet supported") - - elif t.startswith("(?"): - raise Exception(f"{t!r} not supported") - - elif t.isspace(): - pass - else: - result.append(Regex(t)) - - raise Exception("Expecting ')' token") - - result = _parse() - - if len(tokens) != 0: - raise Exception("Unmatched parentheses.") - else: - return result diff --git a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/validation.py b/voxvera/vendor/prompt_toolkit/contrib/regular_languages/validation.py deleted file mode 100644 index e6cfd74..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/regular_languages/validation.py +++ /dev/null @@ -1,60 +0,0 @@ -""" -Validator for a regular language. -""" - -from __future__ import annotations - -from prompt_toolkit.document import Document -from prompt_toolkit.validation import ValidationError, Validator - -from .compiler import _CompiledGrammar - -__all__ = [ - "GrammarValidator", -] - - -class GrammarValidator(Validator): - """ - Validator which can be used for validation according to variables in - the grammar. Each variable can have its own validator. - - :param compiled_grammar: `GrammarCompleter` instance. - :param validators: `dict` mapping variable names of the grammar to the - `Validator` instances to be used for each variable. - """ - - def __init__( - self, compiled_grammar: _CompiledGrammar, validators: dict[str, Validator] - ) -> None: - self.compiled_grammar = compiled_grammar - self.validators = validators - - def validate(self, document: Document) -> None: - # Parse input document. - # We use `match`, not `match_prefix`, because for validation, we want - # the actual, unambiguous interpretation of the input. - m = self.compiled_grammar.match(document.text) - - if m: - for v in m.variables(): - validator = self.validators.get(v.varname) - - if validator: - # Unescape text. - unwrapped_text = self.compiled_grammar.unescape(v.varname, v.value) - - # Create a document, for the completions API (text/cursor_position) - inner_document = Document(unwrapped_text, len(unwrapped_text)) - - try: - validator.validate(inner_document) - except ValidationError as e: - raise ValidationError( - cursor_position=v.start + e.cursor_position, - message=e.message, - ) from e - else: - raise ValidationError( - cursor_position=len(document.text), message="Invalid command" - ) diff --git a/voxvera/vendor/prompt_toolkit/contrib/ssh/__init__.py b/voxvera/vendor/prompt_toolkit/contrib/ssh/__init__.py deleted file mode 100644 index bbc1c21..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/ssh/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -from __future__ import annotations - -from .server import PromptToolkitSSHServer, PromptToolkitSSHSession - -__all__ = [ - "PromptToolkitSSHSession", - "PromptToolkitSSHServer", -] diff --git a/voxvera/vendor/prompt_toolkit/contrib/ssh/server.py b/voxvera/vendor/prompt_toolkit/contrib/ssh/server.py deleted file mode 100644 index 4badc6c..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/ssh/server.py +++ /dev/null @@ -1,178 +0,0 @@ -""" -Utility for running a prompt_toolkit application in an asyncssh server. -""" - -from __future__ import annotations - -import asyncio -import traceback -from asyncio import get_running_loop -from typing import Any, Callable, Coroutine, TextIO, cast - -import asyncssh - -from prompt_toolkit.application.current import AppSession, create_app_session -from prompt_toolkit.data_structures import Size -from prompt_toolkit.input import PipeInput, create_pipe_input -from prompt_toolkit.output.vt100 import Vt100_Output - -__all__ = ["PromptToolkitSSHSession", "PromptToolkitSSHServer"] - - -class PromptToolkitSSHSession(asyncssh.SSHServerSession): # type: ignore - def __init__( - self, - interact: Callable[[PromptToolkitSSHSession], Coroutine[Any, Any, None]], - *, - enable_cpr: bool, - ) -> None: - self.interact = interact - self.enable_cpr = enable_cpr - self.interact_task: asyncio.Task[None] | None = None - self._chan: Any | None = None - self.app_session: AppSession | None = None - - # PipInput object, for sending input in the CLI. - # (This is something that we can use in the prompt_toolkit event loop, - # but still write date in manually.) - self._input: PipeInput | None = None - self._output: Vt100_Output | None = None - - # Output object. Don't render to the real stdout, but write everything - # in the SSH channel. - class Stdout: - def write(s, data: str) -> None: - try: - if self._chan is not None: - self._chan.write(data.replace("\n", "\r\n")) - except BrokenPipeError: - pass # Channel not open for sending. - - def isatty(s) -> bool: - return True - - def flush(s) -> None: - pass - - @property - def encoding(s) -> str: - assert self._chan is not None - return str(self._chan._orig_chan.get_encoding()[0]) - - self.stdout = cast(TextIO, Stdout()) - - def _get_size(self) -> Size: - """ - Callable that returns the current `Size`, required by Vt100_Output. - """ - if self._chan is None: - return Size(rows=20, columns=79) - else: - width, height, pixwidth, pixheight = self._chan.get_terminal_size() - return Size(rows=height, columns=width) - - def connection_made(self, chan: Any) -> None: - self._chan = chan - - def shell_requested(self) -> bool: - return True - - def session_started(self) -> None: - self.interact_task = get_running_loop().create_task(self._interact()) - - async def _interact(self) -> None: - if self._chan is None: - # Should not happen. - raise Exception("`_interact` called before `connection_made`.") - - if hasattr(self._chan, "set_line_mode") and self._chan._editor is not None: - # Disable the line editing provided by asyncssh. Prompt_toolkit - # provides the line editing. - self._chan.set_line_mode(False) - - term = self._chan.get_terminal_type() - - self._output = Vt100_Output( - self.stdout, self._get_size, term=term, enable_cpr=self.enable_cpr - ) - - with create_pipe_input() as self._input: - with create_app_session(input=self._input, output=self._output) as session: - self.app_session = session - try: - await self.interact(self) - except BaseException: - traceback.print_exc() - finally: - # Close the connection. - self._chan.close() - self._input.close() - - def terminal_size_changed( - self, width: int, height: int, pixwidth: object, pixheight: object - ) -> None: - # Send resize event to the current application. - if self.app_session and self.app_session.app: - self.app_session.app._on_resize() - - def data_received(self, data: str, datatype: object) -> None: - if self._input is None: - # Should not happen. - return - - self._input.send_text(data) - - -class PromptToolkitSSHServer(asyncssh.SSHServer): - """ - Run a prompt_toolkit application over an asyncssh server. - - This takes one argument, an `interact` function, which is called for each - connection. This should be an asynchronous function that runs the - prompt_toolkit applications. This function runs in an `AppSession`, which - means that we can have multiple UI interactions concurrently. - - Example usage: - - .. code:: python - - async def interact(ssh_session: PromptToolkitSSHSession) -> None: - await yes_no_dialog("my title", "my text").run_async() - - prompt_session = PromptSession() - text = await prompt_session.prompt_async("Type something: ") - print_formatted_text('You said: ', text) - - server = PromptToolkitSSHServer(interact=interact) - loop = get_running_loop() - loop.run_until_complete( - asyncssh.create_server( - lambda: MySSHServer(interact), - "", - port, - server_host_keys=["/etc/ssh/..."], - ) - ) - loop.run_forever() - - :param enable_cpr: When `True`, the default, try to detect whether the SSH - client runs in a terminal that responds to "cursor position requests". - That way, we can properly determine how much space there is available - for the UI (especially for drop down menus) to render. - """ - - def __init__( - self, - interact: Callable[[PromptToolkitSSHSession], Coroutine[Any, Any, None]], - *, - enable_cpr: bool = True, - ) -> None: - self.interact = interact - self.enable_cpr = enable_cpr - - def begin_auth(self, username: str) -> bool: - # No authentication. - return False - - def session_requested(self) -> PromptToolkitSSHSession: - return PromptToolkitSSHSession(self.interact, enable_cpr=self.enable_cpr) diff --git a/voxvera/vendor/prompt_toolkit/contrib/telnet/__init__.py b/voxvera/vendor/prompt_toolkit/contrib/telnet/__init__.py deleted file mode 100644 index de902b4..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/telnet/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import annotations - -from .server import TelnetServer - -__all__ = [ - "TelnetServer", -] diff --git a/voxvera/vendor/prompt_toolkit/contrib/telnet/log.py b/voxvera/vendor/prompt_toolkit/contrib/telnet/log.py deleted file mode 100644 index 476dffc..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/telnet/log.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Python logger for the telnet server. -""" - -from __future__ import annotations - -import logging - -logger = logging.getLogger(__package__) - -__all__ = [ - "logger", -] diff --git a/voxvera/vendor/prompt_toolkit/contrib/telnet/protocol.py b/voxvera/vendor/prompt_toolkit/contrib/telnet/protocol.py deleted file mode 100644 index 58286e2..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/telnet/protocol.py +++ /dev/null @@ -1,209 +0,0 @@ -""" -Parser for the Telnet protocol. (Not a complete implementation of the telnet -specification, but sufficient for a command line interface.) - -Inspired by `Twisted.conch.telnet`. -""" - -from __future__ import annotations - -import struct -from typing import Callable, Generator - -from .log import logger - -__all__ = [ - "TelnetProtocolParser", -] - - -def int2byte(number: int) -> bytes: - return bytes((number,)) - - -# Telnet constants. -NOP = int2byte(0) -SGA = int2byte(3) - -IAC = int2byte(255) -DO = int2byte(253) -DONT = int2byte(254) -LINEMODE = int2byte(34) -SB = int2byte(250) -WILL = int2byte(251) -WONT = int2byte(252) -MODE = int2byte(1) -SE = int2byte(240) -ECHO = int2byte(1) -NAWS = int2byte(31) -LINEMODE = int2byte(34) -SUPPRESS_GO_AHEAD = int2byte(3) - -TTYPE = int2byte(24) -SEND = int2byte(1) -IS = int2byte(0) - -DM = int2byte(242) -BRK = int2byte(243) -IP = int2byte(244) -AO = int2byte(245) -AYT = int2byte(246) -EC = int2byte(247) -EL = int2byte(248) -GA = int2byte(249) - - -class TelnetProtocolParser: - """ - Parser for the Telnet protocol. - Usage:: - - def data_received(data): - print(data) - - def size_received(rows, columns): - print(rows, columns) - - p = TelnetProtocolParser(data_received, size_received) - p.feed(binary_data) - """ - - def __init__( - self, - data_received_callback: Callable[[bytes], None], - size_received_callback: Callable[[int, int], None], - ttype_received_callback: Callable[[str], None], - ) -> None: - self.data_received_callback = data_received_callback - self.size_received_callback = size_received_callback - self.ttype_received_callback = ttype_received_callback - - self._parser = self._parse_coroutine() - self._parser.send(None) # type: ignore - - def received_data(self, data: bytes) -> None: - self.data_received_callback(data) - - def do_received(self, data: bytes) -> None: - """Received telnet DO command.""" - logger.info("DO %r", data) - - def dont_received(self, data: bytes) -> None: - """Received telnet DONT command.""" - logger.info("DONT %r", data) - - def will_received(self, data: bytes) -> None: - """Received telnet WILL command.""" - logger.info("WILL %r", data) - - def wont_received(self, data: bytes) -> None: - """Received telnet WONT command.""" - logger.info("WONT %r", data) - - def command_received(self, command: bytes, data: bytes) -> None: - if command == DO: - self.do_received(data) - - elif command == DONT: - self.dont_received(data) - - elif command == WILL: - self.will_received(data) - - elif command == WONT: - self.wont_received(data) - - else: - logger.info("command received %r %r", command, data) - - def naws(self, data: bytes) -> None: - """ - Received NAWS. (Window dimensions.) - """ - if len(data) == 4: - # NOTE: the first parameter of struct.unpack should be - # a 'str' object. Both on Py2/py3. This crashes on OSX - # otherwise. - columns, rows = struct.unpack("!HH", data) - self.size_received_callback(rows, columns) - else: - logger.warning("Wrong number of NAWS bytes") - - def ttype(self, data: bytes) -> None: - """ - Received terminal type. - """ - subcmd, data = data[0:1], data[1:] - if subcmd == IS: - ttype = data.decode("ascii") - self.ttype_received_callback(ttype) - else: - logger.warning("Received a non-IS terminal type Subnegotiation") - - def negotiate(self, data: bytes) -> None: - """ - Got negotiate data. - """ - command, payload = data[0:1], data[1:] - - if command == NAWS: - self.naws(payload) - elif command == TTYPE: - self.ttype(payload) - else: - logger.info("Negotiate (%r got bytes)", len(data)) - - def _parse_coroutine(self) -> Generator[None, bytes, None]: - """ - Parser state machine. - Every 'yield' expression returns the next byte. - """ - while True: - d = yield - - if d == int2byte(0): - pass # NOP - - # Go to state escaped. - elif d == IAC: - d2 = yield - - if d2 == IAC: - self.received_data(d2) - - # Handle simple commands. - elif d2 in (NOP, DM, BRK, IP, AO, AYT, EC, EL, GA): - self.command_received(d2, b"") - - # Handle IAC-[DO/DONT/WILL/WONT] commands. - elif d2 in (DO, DONT, WILL, WONT): - d3 = yield - self.command_received(d2, d3) - - # Subnegotiation - elif d2 == SB: - # Consume everything until next IAC-SE - data = [] - - while True: - d3 = yield - - if d3 == IAC: - d4 = yield - if d4 == SE: - break - else: - data.append(d4) - else: - data.append(d3) - - self.negotiate(b"".join(data)) - else: - self.received_data(d) - - def feed(self, data: bytes) -> None: - """ - Feed data to the parser. - """ - for b in data: - self._parser.send(int2byte(b)) diff --git a/voxvera/vendor/prompt_toolkit/contrib/telnet/server.py b/voxvera/vendor/prompt_toolkit/contrib/telnet/server.py deleted file mode 100644 index bc2ad53..0000000 --- a/voxvera/vendor/prompt_toolkit/contrib/telnet/server.py +++ /dev/null @@ -1,428 +0,0 @@ -""" -Telnet server. -""" - -from __future__ import annotations - -import asyncio -import contextvars -import socket -from asyncio import get_running_loop -from typing import Any, Callable, Coroutine, TextIO, cast - -from prompt_toolkit.application.current import create_app_session, get_app -from prompt_toolkit.application.run_in_terminal import run_in_terminal -from prompt_toolkit.data_structures import Size -from prompt_toolkit.formatted_text import AnyFormattedText, to_formatted_text -from prompt_toolkit.input import PipeInput, create_pipe_input -from prompt_toolkit.output.vt100 import Vt100_Output -from prompt_toolkit.renderer import print_formatted_text as print_formatted_text -from prompt_toolkit.styles import BaseStyle, DummyStyle - -from .log import logger -from .protocol import ( - DO, - ECHO, - IAC, - LINEMODE, - MODE, - NAWS, - SB, - SE, - SEND, - SUPPRESS_GO_AHEAD, - TTYPE, - WILL, - TelnetProtocolParser, -) - -__all__ = [ - "TelnetServer", -] - - -def int2byte(number: int) -> bytes: - return bytes((number,)) - - -def _initialize_telnet(connection: socket.socket) -> None: - logger.info("Initializing telnet connection") - - # Iac Do Linemode - connection.send(IAC + DO + LINEMODE) - - # Suppress Go Ahead. (This seems important for Putty to do correct echoing.) - # This will allow bi-directional operation. - connection.send(IAC + WILL + SUPPRESS_GO_AHEAD) - - # Iac sb - connection.send(IAC + SB + LINEMODE + MODE + int2byte(0) + IAC + SE) - - # IAC Will Echo - connection.send(IAC + WILL + ECHO) - - # Negotiate window size - connection.send(IAC + DO + NAWS) - - # Negotiate terminal type - # Assume the client will accept the negotiation with `IAC + WILL + TTYPE` - connection.send(IAC + DO + TTYPE) - - # We can then select the first terminal type supported by the client, - # which is generally the best type the client supports - # The client should reply with a `IAC + SB + TTYPE + IS + ttype + IAC + SE` - connection.send(IAC + SB + TTYPE + SEND + IAC + SE) - - -class _ConnectionStdout: - """ - Wrapper around socket which provides `write` and `flush` methods for the - Vt100_Output output. - """ - - def __init__(self, connection: socket.socket, encoding: str) -> None: - self._encoding = encoding - self._connection = connection - self._errors = "strict" - self._buffer: list[bytes] = [] - self._closed = False - - def write(self, data: str) -> None: - data = data.replace("\n", "\r\n") - self._buffer.append(data.encode(self._encoding, errors=self._errors)) - self.flush() - - def isatty(self) -> bool: - return True - - def flush(self) -> None: - try: - if not self._closed: - self._connection.send(b"".join(self._buffer)) - except OSError as e: - logger.warning(f"Couldn't send data over socket: {e}") - - self._buffer = [] - - def close(self) -> None: - self._closed = True - - @property - def encoding(self) -> str: - return self._encoding - - @property - def errors(self) -> str: - return self._errors - - -class TelnetConnection: - """ - Class that represents one Telnet connection. - """ - - def __init__( - self, - conn: socket.socket, - addr: tuple[str, int], - interact: Callable[[TelnetConnection], Coroutine[Any, Any, None]], - server: TelnetServer, - encoding: str, - style: BaseStyle | None, - vt100_input: PipeInput, - enable_cpr: bool = True, - ) -> None: - self.conn = conn - self.addr = addr - self.interact = interact - self.server = server - self.encoding = encoding - self.style = style - self._closed = False - self._ready = asyncio.Event() - self.vt100_input = vt100_input - self.enable_cpr = enable_cpr - self.vt100_output: Vt100_Output | None = None - - # Create "Output" object. - self.size = Size(rows=40, columns=79) - - # Initialize. - _initialize_telnet(conn) - - # Create output. - def get_size() -> Size: - return self.size - - self.stdout = cast(TextIO, _ConnectionStdout(conn, encoding=encoding)) - - def data_received(data: bytes) -> None: - """TelnetProtocolParser 'data_received' callback""" - self.vt100_input.send_bytes(data) - - def size_received(rows: int, columns: int) -> None: - """TelnetProtocolParser 'size_received' callback""" - self.size = Size(rows=rows, columns=columns) - if self.vt100_output is not None and self.context: - self.context.run(lambda: get_app()._on_resize()) - - def ttype_received(ttype: str) -> None: - """TelnetProtocolParser 'ttype_received' callback""" - self.vt100_output = Vt100_Output( - self.stdout, get_size, term=ttype, enable_cpr=enable_cpr - ) - self._ready.set() - - self.parser = TelnetProtocolParser(data_received, size_received, ttype_received) - self.context: contextvars.Context | None = None - - async def run_application(self) -> None: - """ - Run application. - """ - - def handle_incoming_data() -> None: - data = self.conn.recv(1024) - if data: - self.feed(data) - else: - # Connection closed by client. - logger.info("Connection closed by client. {!r} {!r}".format(*self.addr)) - self.close() - - # Add reader. - loop = get_running_loop() - loop.add_reader(self.conn, handle_incoming_data) - - try: - # Wait for v100_output to be properly instantiated - await self._ready.wait() - with create_app_session(input=self.vt100_input, output=self.vt100_output): - self.context = contextvars.copy_context() - await self.interact(self) - finally: - self.close() - - def feed(self, data: bytes) -> None: - """ - Handler for incoming data. (Called by TelnetServer.) - """ - self.parser.feed(data) - - def close(self) -> None: - """ - Closed by client. - """ - if not self._closed: - self._closed = True - - self.vt100_input.close() - get_running_loop().remove_reader(self.conn) - self.conn.close() - self.stdout.close() - - def send(self, formatted_text: AnyFormattedText) -> None: - """ - Send text to the client. - """ - if self.vt100_output is None: - return - formatted_text = to_formatted_text(formatted_text) - print_formatted_text( - self.vt100_output, formatted_text, self.style or DummyStyle() - ) - - def send_above_prompt(self, formatted_text: AnyFormattedText) -> None: - """ - Send text to the client. - This is asynchronous, returns a `Future`. - """ - formatted_text = to_formatted_text(formatted_text) - return self._run_in_terminal(lambda: self.send(formatted_text)) - - def _run_in_terminal(self, func: Callable[[], None]) -> None: - # Make sure that when an application was active for this connection, - # that we print the text above the application. - if self.context: - self.context.run(run_in_terminal, func) - else: - raise RuntimeError("Called _run_in_terminal outside `run_application`.") - - def erase_screen(self) -> None: - """ - Erase the screen and move the cursor to the top. - """ - if self.vt100_output is None: - return - self.vt100_output.erase_screen() - self.vt100_output.cursor_goto(0, 0) - self.vt100_output.flush() - - -async def _dummy_interact(connection: TelnetConnection) -> None: - pass - - -class TelnetServer: - """ - Telnet server implementation. - - Example:: - - async def interact(connection): - connection.send("Welcome") - session = PromptSession() - result = await session.prompt_async(message="Say something: ") - connection.send(f"You said: {result}\n") - - async def main(): - server = TelnetServer(interact=interact, port=2323) - await server.run() - """ - - def __init__( - self, - host: str = "127.0.0.1", - port: int = 23, - interact: Callable[ - [TelnetConnection], Coroutine[Any, Any, None] - ] = _dummy_interact, - encoding: str = "utf-8", - style: BaseStyle | None = None, - enable_cpr: bool = True, - ) -> None: - self.host = host - self.port = port - self.interact = interact - self.encoding = encoding - self.style = style - self.enable_cpr = enable_cpr - - self._run_task: asyncio.Task[None] | None = None - self._application_tasks: list[asyncio.Task[None]] = [] - - self.connections: set[TelnetConnection] = set() - - @classmethod - def _create_socket(cls, host: str, port: int) -> socket.socket: - # Create and bind socket - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - s.bind((host, port)) - - s.listen(4) - return s - - async def run(self, ready_cb: Callable[[], None] | None = None) -> None: - """ - Run the telnet server, until this gets cancelled. - - :param ready_cb: Callback that will be called at the point that we're - actually listening. - """ - socket = self._create_socket(self.host, self.port) - logger.info( - "Listening for telnet connections on %s port %r", self.host, self.port - ) - - get_running_loop().add_reader(socket, lambda: self._accept(socket)) - - if ready_cb: - ready_cb() - - try: - # Run forever, until cancelled. - await asyncio.Future() - finally: - get_running_loop().remove_reader(socket) - socket.close() - - # Wait for all applications to finish. - for t in self._application_tasks: - t.cancel() - - # (This is similar to - # `Application.cancel_and_wait_for_background_tasks`. We wait for the - # background tasks to complete, but don't propagate exceptions, because - # we can't use `ExceptionGroup` yet.) - if len(self._application_tasks) > 0: - await asyncio.wait( - self._application_tasks, - timeout=None, - return_when=asyncio.ALL_COMPLETED, - ) - - def start(self) -> None: - """ - Deprecated: Use `.run()` instead. - - Start the telnet server (stop by calling and awaiting `stop()`). - """ - if self._run_task is not None: - # Already running. - return - - self._run_task = get_running_loop().create_task(self.run()) - - async def stop(self) -> None: - """ - Deprecated: Use `.run()` instead. - - Stop a telnet server that was started using `.start()` and wait for the - cancellation to complete. - """ - if self._run_task is not None: - self._run_task.cancel() - try: - await self._run_task - except asyncio.CancelledError: - pass - - def _accept(self, listen_socket: socket.socket) -> None: - """ - Accept new incoming connection. - """ - conn, addr = listen_socket.accept() - logger.info("New connection %r %r", *addr) - - # Run application for this connection. - async def run() -> None: - try: - with create_pipe_input() as vt100_input: - connection = TelnetConnection( - conn, - addr, - self.interact, - self, - encoding=self.encoding, - style=self.style, - vt100_input=vt100_input, - enable_cpr=self.enable_cpr, - ) - self.connections.add(connection) - - logger.info("Starting interaction %r %r", *addr) - try: - await connection.run_application() - finally: - self.connections.remove(connection) - logger.info("Stopping interaction %r %r", *addr) - except EOFError: - # Happens either when the connection is closed by the client - # (e.g., when the user types 'control-]', then 'quit' in the - # telnet client) or when the user types control-d in a prompt - # and this is not handled by the interact function. - logger.info("Unhandled EOFError in telnet application.") - except KeyboardInterrupt: - # Unhandled control-c propagated by a prompt. - logger.info("Unhandled KeyboardInterrupt in telnet application.") - except BaseException as e: - print(f"Got {type(e).__name__}", e) - import traceback - - traceback.print_exc() - finally: - self._application_tasks.remove(task) - - task = get_running_loop().create_task(run()) - self._application_tasks.append(task) diff --git a/voxvera/vendor/prompt_toolkit/cursor_shapes.py b/voxvera/vendor/prompt_toolkit/cursor_shapes.py deleted file mode 100644 index 01d1092..0000000 --- a/voxvera/vendor/prompt_toolkit/cursor_shapes.py +++ /dev/null @@ -1,117 +0,0 @@ -from __future__ import annotations - -from abc import ABC, abstractmethod -from enum import Enum -from typing import TYPE_CHECKING, Any, Callable, Union - -from prompt_toolkit.enums import EditingMode -from prompt_toolkit.key_binding.vi_state import InputMode - -if TYPE_CHECKING: - from .application import Application - -__all__ = [ - "CursorShape", - "CursorShapeConfig", - "SimpleCursorShapeConfig", - "ModalCursorShapeConfig", - "DynamicCursorShapeConfig", - "to_cursor_shape_config", -] - - -class CursorShape(Enum): - # Default value that should tell the output implementation to never send - # cursor shape escape sequences. This is the default right now, because - # before this `CursorShape` functionality was introduced into - # prompt_toolkit itself, people had workarounds to send cursor shapes - # escapes into the terminal, by monkey patching some of prompt_toolkit's - # internals. We don't want the default prompt_toolkit implementation to - # interfere with that. E.g., IPython patches the `ViState.input_mode` - # property. See: https://github.com/ipython/ipython/pull/13501/files - _NEVER_CHANGE = "_NEVER_CHANGE" - - BLOCK = "BLOCK" - BEAM = "BEAM" - UNDERLINE = "UNDERLINE" - BLINKING_BLOCK = "BLINKING_BLOCK" - BLINKING_BEAM = "BLINKING_BEAM" - BLINKING_UNDERLINE = "BLINKING_UNDERLINE" - - -class CursorShapeConfig(ABC): - @abstractmethod - def get_cursor_shape(self, application: Application[Any]) -> CursorShape: - """ - Return the cursor shape to be used in the current state. - """ - - -AnyCursorShapeConfig = Union[CursorShape, CursorShapeConfig, None] - - -class SimpleCursorShapeConfig(CursorShapeConfig): - """ - Always show the given cursor shape. - """ - - def __init__(self, cursor_shape: CursorShape = CursorShape._NEVER_CHANGE) -> None: - self.cursor_shape = cursor_shape - - def get_cursor_shape(self, application: Application[Any]) -> CursorShape: - return self.cursor_shape - - -class ModalCursorShapeConfig(CursorShapeConfig): - """ - Show cursor shape according to the current input mode. - """ - - def get_cursor_shape(self, application: Application[Any]) -> CursorShape: - if application.editing_mode == EditingMode.VI: - if application.vi_state.input_mode in { - InputMode.NAVIGATION, - }: - return CursorShape.BLOCK - if application.vi_state.input_mode in { - InputMode.INSERT, - InputMode.INSERT_MULTIPLE, - }: - return CursorShape.BEAM - if application.vi_state.input_mode in { - InputMode.REPLACE, - InputMode.REPLACE_SINGLE, - }: - return CursorShape.UNDERLINE - elif application.editing_mode == EditingMode.EMACS: - # like vi's INSERT - return CursorShape.BEAM - - # Default - return CursorShape.BLOCK - - -class DynamicCursorShapeConfig(CursorShapeConfig): - def __init__( - self, get_cursor_shape_config: Callable[[], AnyCursorShapeConfig] - ) -> None: - self.get_cursor_shape_config = get_cursor_shape_config - - def get_cursor_shape(self, application: Application[Any]) -> CursorShape: - return to_cursor_shape_config(self.get_cursor_shape_config()).get_cursor_shape( - application - ) - - -def to_cursor_shape_config(value: AnyCursorShapeConfig) -> CursorShapeConfig: - """ - Take a `CursorShape` instance or `CursorShapeConfig` and turn it into a - `CursorShapeConfig`. - """ - if value is None: - return SimpleCursorShapeConfig() - - if isinstance(value, CursorShape): - return SimpleCursorShapeConfig(value) - - return value diff --git a/voxvera/vendor/prompt_toolkit/data_structures.py b/voxvera/vendor/prompt_toolkit/data_structures.py deleted file mode 100644 index 27dd458..0000000 --- a/voxvera/vendor/prompt_toolkit/data_structures.py +++ /dev/null @@ -1,18 +0,0 @@ -from __future__ import annotations - -from typing import NamedTuple - -__all__ = [ - "Point", - "Size", -] - - -class Point(NamedTuple): - x: int - y: int - - -class Size(NamedTuple): - rows: int - columns: int diff --git a/voxvera/vendor/prompt_toolkit/document.py b/voxvera/vendor/prompt_toolkit/document.py deleted file mode 100644 index c9fbd9a..0000000 --- a/voxvera/vendor/prompt_toolkit/document.py +++ /dev/null @@ -1,1182 +0,0 @@ -""" -The `Document` that implements all the text operations/querying. -""" - -from __future__ import annotations - -import bisect -import re -import string -import weakref -from typing import Callable, Dict, Iterable, List, NoReturn, Pattern, cast - -from .clipboard import ClipboardData -from .filters import vi_mode -from .selection import PasteMode, SelectionState, SelectionType - -__all__ = [ - "Document", -] - - -# Regex for finding "words" in documents. (We consider a group of alnum -# characters a word, but also a group of special characters a word, as long as -# it doesn't contain a space.) -# (This is a 'word' in Vi.) -_FIND_WORD_RE = re.compile(r"([a-zA-Z0-9_]+|[^a-zA-Z0-9_\s]+)") -_FIND_CURRENT_WORD_RE = re.compile(r"^([a-zA-Z0-9_]+|[^a-zA-Z0-9_\s]+)") -_FIND_CURRENT_WORD_INCLUDE_TRAILING_WHITESPACE_RE = re.compile( - r"^(([a-zA-Z0-9_]+|[^a-zA-Z0-9_\s]+)\s*)" -) - -# Regex for finding "WORDS" in documents. -# (This is a 'WORD in Vi.) -_FIND_BIG_WORD_RE = re.compile(r"([^\s]+)") -_FIND_CURRENT_BIG_WORD_RE = re.compile(r"^([^\s]+)") -_FIND_CURRENT_BIG_WORD_INCLUDE_TRAILING_WHITESPACE_RE = re.compile(r"^([^\s]+\s*)") - -# Share the Document._cache between all Document instances. -# (Document instances are considered immutable. That means that if another -# `Document` is constructed with the same text, it should have the same -# `_DocumentCache`.) -_text_to_document_cache: dict[str, _DocumentCache] = cast( - Dict[str, "_DocumentCache"], - weakref.WeakValueDictionary(), # Maps document.text to DocumentCache instance. -) - - -class _ImmutableLineList(List[str]): - """ - Some protection for our 'lines' list, which is assumed to be immutable in the cache. - (Useful for detecting obvious bugs.) - """ - - def _error(self, *a: object, **kw: object) -> NoReturn: - raise NotImplementedError("Attempt to modify an immutable list.") - - __setitem__ = _error - append = _error - clear = _error - extend = _error - insert = _error - pop = _error - remove = _error - reverse = _error - sort = _error - - -class _DocumentCache: - def __init__(self) -> None: - #: List of lines for the Document text. - self.lines: _ImmutableLineList | None = None - - #: List of index positions, pointing to the start of all the lines. - self.line_indexes: list[int] | None = None - - -class Document: - """ - This is a immutable class around the text and cursor position, and contains - methods for querying this data, e.g. to give the text before the cursor. - - This class is usually instantiated by a :class:`~prompt_toolkit.buffer.Buffer` - object, and accessed as the `document` property of that class. - - :param text: string - :param cursor_position: int - :param selection: :class:`.SelectionState` - """ - - __slots__ = ("_text", "_cursor_position", "_selection", "_cache") - - def __init__( - self, - text: str = "", - cursor_position: int | None = None, - selection: SelectionState | None = None, - ) -> None: - # Check cursor position. It can also be right after the end. (Where we - # insert text.) - assert cursor_position is None or cursor_position <= len(text), AssertionError( - f"cursor_position={cursor_position!r}, len_text={len(text)!r}" - ) - - # By default, if no cursor position was given, make sure to put the - # cursor position is at the end of the document. This is what makes - # sense in most places. - if cursor_position is None: - cursor_position = len(text) - - # Keep these attributes private. A `Document` really has to be - # considered to be immutable, because otherwise the caching will break - # things. Because of that, we wrap these into read-only properties. - self._text = text - self._cursor_position = cursor_position - self._selection = selection - - # Cache for lines/indexes. (Shared with other Document instances that - # contain the same text. - try: - self._cache = _text_to_document_cache[self.text] - except KeyError: - self._cache = _DocumentCache() - _text_to_document_cache[self.text] = self._cache - - # XX: For some reason, above, we can't use 'WeakValueDictionary.setdefault'. - # This fails in Pypy3. `self._cache` becomes None, because that's what - # 'setdefault' returns. - # self._cache = _text_to_document_cache.setdefault(self.text, _DocumentCache()) - # assert self._cache - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.text!r}, {self.cursor_position!r})" - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Document): - return False - - return ( - self.text == other.text - and self.cursor_position == other.cursor_position - and self.selection == other.selection - ) - - @property - def text(self) -> str: - "The document text." - return self._text - - @property - def cursor_position(self) -> int: - "The document cursor position." - return self._cursor_position - - @property - def selection(self) -> SelectionState | None: - ":class:`.SelectionState` object." - return self._selection - - @property - def current_char(self) -> str: - """Return character under cursor or an empty string.""" - return self._get_char_relative_to_cursor(0) or "" - - @property - def char_before_cursor(self) -> str: - """Return character before the cursor or an empty string.""" - return self._get_char_relative_to_cursor(-1) or "" - - @property - def text_before_cursor(self) -> str: - return self.text[: self.cursor_position :] - - @property - def text_after_cursor(self) -> str: - return self.text[self.cursor_position :] - - @property - def current_line_before_cursor(self) -> str: - """Text from the start of the line until the cursor.""" - _, _, text = self.text_before_cursor.rpartition("\n") - return text - - @property - def current_line_after_cursor(self) -> str: - """Text from the cursor until the end of the line.""" - text, _, _ = self.text_after_cursor.partition("\n") - return text - - @property - def lines(self) -> list[str]: - """ - Array of all the lines. - """ - # Cache, because this one is reused very often. - if self._cache.lines is None: - self._cache.lines = _ImmutableLineList(self.text.split("\n")) - - return self._cache.lines - - @property - def _line_start_indexes(self) -> list[int]: - """ - Array pointing to the start indexes of all the lines. - """ - # Cache, because this is often reused. (If it is used, it's often used - # many times. And this has to be fast for editing big documents!) - if self._cache.line_indexes is None: - # Create list of line lengths. - line_lengths = map(len, self.lines) - - # Calculate cumulative sums. - indexes = [0] - append = indexes.append - pos = 0 - - for line_length in line_lengths: - pos += line_length + 1 - append(pos) - - # Remove the last item. (This is not a new line.) - if len(indexes) > 1: - indexes.pop() - - self._cache.line_indexes = indexes - - return self._cache.line_indexes - - @property - def lines_from_current(self) -> list[str]: - """ - Array of the lines starting from the current line, until the last line. - """ - return self.lines[self.cursor_position_row :] - - @property - def line_count(self) -> int: - r"""Return the number of lines in this document. If the document ends - with a trailing \n, that counts as the beginning of a new line.""" - return len(self.lines) - - @property - def current_line(self) -> str: - """Return the text on the line where the cursor is. (when the input - consists of just one line, it equals `text`.""" - return self.current_line_before_cursor + self.current_line_after_cursor - - @property - def leading_whitespace_in_current_line(self) -> str: - """The leading whitespace in the left margin of the current line.""" - current_line = self.current_line - length = len(current_line) - len(current_line.lstrip()) - return current_line[:length] - - def _get_char_relative_to_cursor(self, offset: int = 0) -> str: - """ - Return character relative to cursor position, or empty string - """ - try: - return self.text[self.cursor_position + offset] - except IndexError: - return "" - - @property - def on_first_line(self) -> bool: - """ - True when we are at the first line. - """ - return self.cursor_position_row == 0 - - @property - def on_last_line(self) -> bool: - """ - True when we are at the last line. - """ - return self.cursor_position_row == self.line_count - 1 - - @property - def cursor_position_row(self) -> int: - """ - Current row. (0-based.) - """ - row, _ = self._find_line_start_index(self.cursor_position) - return row - - @property - def cursor_position_col(self) -> int: - """ - Current column. (0-based.) - """ - # (Don't use self.text_before_cursor to calculate this. Creating - # substrings and doing rsplit is too expensive for getting the cursor - # position.) - _, line_start_index = self._find_line_start_index(self.cursor_position) - return self.cursor_position - line_start_index - - def _find_line_start_index(self, index: int) -> tuple[int, int]: - """ - For the index of a character at a certain line, calculate the index of - the first character on that line. - - Return (row, index) tuple. - """ - indexes = self._line_start_indexes - - pos = bisect.bisect_right(indexes, index) - 1 - return pos, indexes[pos] - - def translate_index_to_position(self, index: int) -> tuple[int, int]: - """ - Given an index for the text, return the corresponding (row, col) tuple. - (0-based. Returns (0, 0) for index=0.) - """ - # Find start of this line. - row, row_index = self._find_line_start_index(index) - col = index - row_index - - return row, col - - def translate_row_col_to_index(self, row: int, col: int) -> int: - """ - Given a (row, col) tuple, return the corresponding index. - (Row and col params are 0-based.) - - Negative row/col values are turned into zero. - """ - try: - result = self._line_start_indexes[row] - line = self.lines[row] - except IndexError: - if row < 0: - result = self._line_start_indexes[0] - line = self.lines[0] - else: - result = self._line_start_indexes[-1] - line = self.lines[-1] - - result += max(0, min(col, len(line))) - - # Keep in range. (len(self.text) is included, because the cursor can be - # right after the end of the text as well.) - result = max(0, min(result, len(self.text))) - return result - - @property - def is_cursor_at_the_end(self) -> bool: - """True when the cursor is at the end of the text.""" - return self.cursor_position == len(self.text) - - @property - def is_cursor_at_the_end_of_line(self) -> bool: - """True when the cursor is at the end of this line.""" - return self.current_char in ("\n", "") - - def has_match_at_current_position(self, sub: str) -> bool: - """ - `True` when this substring is found at the cursor position. - """ - return self.text.find(sub, self.cursor_position) == self.cursor_position - - def find( - self, - sub: str, - in_current_line: bool = False, - include_current_position: bool = False, - ignore_case: bool = False, - count: int = 1, - ) -> int | None: - """ - Find `text` after the cursor, return position relative to the cursor - position. Return `None` if nothing was found. - - :param count: Find the n-th occurrence. - """ - assert isinstance(ignore_case, bool) - - if in_current_line: - text = self.current_line_after_cursor - else: - text = self.text_after_cursor - - if not include_current_position: - if len(text) == 0: - return None # (Otherwise, we always get a match for the empty string.) - else: - text = text[1:] - - flags = re.IGNORECASE if ignore_case else 0 - iterator = re.finditer(re.escape(sub), text, flags) - - try: - for i, match in enumerate(iterator): - if i + 1 == count: - if include_current_position: - return match.start(0) - else: - return match.start(0) + 1 - except StopIteration: - pass - return None - - def find_all(self, sub: str, ignore_case: bool = False) -> list[int]: - """ - Find all occurrences of the substring. Return a list of absolute - positions in the document. - """ - flags = re.IGNORECASE if ignore_case else 0 - return [a.start() for a in re.finditer(re.escape(sub), self.text, flags)] - - def find_backwards( - self, - sub: str, - in_current_line: bool = False, - ignore_case: bool = False, - count: int = 1, - ) -> int | None: - """ - Find `text` before the cursor, return position relative to the cursor - position. Return `None` if nothing was found. - - :param count: Find the n-th occurrence. - """ - if in_current_line: - before_cursor = self.current_line_before_cursor[::-1] - else: - before_cursor = self.text_before_cursor[::-1] - - flags = re.IGNORECASE if ignore_case else 0 - iterator = re.finditer(re.escape(sub[::-1]), before_cursor, flags) - - try: - for i, match in enumerate(iterator): - if i + 1 == count: - return -match.start(0) - len(sub) - except StopIteration: - pass - return None - - def get_word_before_cursor( - self, WORD: bool = False, pattern: Pattern[str] | None = None - ) -> str: - """ - Give the word before the cursor. - If we have whitespace before the cursor this returns an empty string. - - :param pattern: (None or compiled regex). When given, use this regex - pattern. - """ - if self._is_word_before_cursor_complete(WORD=WORD, pattern=pattern): - # Space before the cursor or no text before cursor. - return "" - - text_before_cursor = self.text_before_cursor - start = self.find_start_of_previous_word(WORD=WORD, pattern=pattern) or 0 - - return text_before_cursor[len(text_before_cursor) + start :] - - def _is_word_before_cursor_complete( - self, WORD: bool = False, pattern: Pattern[str] | None = None - ) -> bool: - if pattern: - return self.find_start_of_previous_word(WORD=WORD, pattern=pattern) is None - else: - return ( - self.text_before_cursor == "" or self.text_before_cursor[-1:].isspace() - ) - - def find_start_of_previous_word( - self, count: int = 1, WORD: bool = False, pattern: Pattern[str] | None = None - ) -> int | None: - """ - Return an index relative to the cursor position pointing to the start - of the previous word. Return `None` if nothing was found. - - :param pattern: (None or compiled regex). When given, use this regex - pattern. - """ - assert not (WORD and pattern) - - # Reverse the text before the cursor, in order to do an efficient - # backwards search. - text_before_cursor = self.text_before_cursor[::-1] - - if pattern: - regex = pattern - elif WORD: - regex = _FIND_BIG_WORD_RE - else: - regex = _FIND_WORD_RE - - iterator = regex.finditer(text_before_cursor) - - try: - for i, match in enumerate(iterator): - if i + 1 == count: - return -match.end(0) - except StopIteration: - pass - return None - - def find_boundaries_of_current_word( - self, - WORD: bool = False, - include_leading_whitespace: bool = False, - include_trailing_whitespace: bool = False, - ) -> tuple[int, int]: - """ - Return the relative boundaries (startpos, endpos) of the current word under the - cursor. (This is at the current line, because line boundaries obviously - don't belong to any word.) - If not on a word, this returns (0,0) - """ - text_before_cursor = self.current_line_before_cursor[::-1] - text_after_cursor = self.current_line_after_cursor - - def get_regex(include_whitespace: bool) -> Pattern[str]: - return { - (False, False): _FIND_CURRENT_WORD_RE, - (False, True): _FIND_CURRENT_WORD_INCLUDE_TRAILING_WHITESPACE_RE, - (True, False): _FIND_CURRENT_BIG_WORD_RE, - (True, True): _FIND_CURRENT_BIG_WORD_INCLUDE_TRAILING_WHITESPACE_RE, - }[(WORD, include_whitespace)] - - match_before = get_regex(include_leading_whitespace).search(text_before_cursor) - match_after = get_regex(include_trailing_whitespace).search(text_after_cursor) - - # When there is a match before and after, and we're not looking for - # WORDs, make sure that both the part before and after the cursor are - # either in the [a-zA-Z_] alphabet or not. Otherwise, drop the part - # before the cursor. - if not WORD and match_before and match_after: - c1 = self.text[self.cursor_position - 1] - c2 = self.text[self.cursor_position] - alphabet = string.ascii_letters + "0123456789_" - - if (c1 in alphabet) != (c2 in alphabet): - match_before = None - - return ( - -match_before.end(1) if match_before else 0, - match_after.end(1) if match_after else 0, - ) - - def get_word_under_cursor(self, WORD: bool = False) -> str: - """ - Return the word, currently below the cursor. - This returns an empty string when the cursor is on a whitespace region. - """ - start, end = self.find_boundaries_of_current_word(WORD=WORD) - return self.text[self.cursor_position + start : self.cursor_position + end] - - def find_next_word_beginning( - self, count: int = 1, WORD: bool = False - ) -> int | None: - """ - Return an index relative to the cursor position pointing to the start - of the next word. Return `None` if nothing was found. - """ - if count < 0: - return self.find_previous_word_beginning(count=-count, WORD=WORD) - - regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE - iterator = regex.finditer(self.text_after_cursor) - - try: - for i, match in enumerate(iterator): - # Take first match, unless it's the word on which we're right now. - if i == 0 and match.start(1) == 0: - count += 1 - - if i + 1 == count: - return match.start(1) - except StopIteration: - pass - return None - - def find_next_word_ending( - self, include_current_position: bool = False, count: int = 1, WORD: bool = False - ) -> int | None: - """ - Return an index relative to the cursor position pointing to the end - of the next word. Return `None` if nothing was found. - """ - if count < 0: - return self.find_previous_word_ending(count=-count, WORD=WORD) - - if include_current_position: - text = self.text_after_cursor - else: - text = self.text_after_cursor[1:] - - regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE - iterable = regex.finditer(text) - - try: - for i, match in enumerate(iterable): - if i + 1 == count: - value = match.end(1) - - if include_current_position: - return value - else: - return value + 1 - - except StopIteration: - pass - return None - - def find_previous_word_beginning( - self, count: int = 1, WORD: bool = False - ) -> int | None: - """ - Return an index relative to the cursor position pointing to the start - of the previous word. Return `None` if nothing was found. - """ - if count < 0: - return self.find_next_word_beginning(count=-count, WORD=WORD) - - regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE - iterator = regex.finditer(self.text_before_cursor[::-1]) - - try: - for i, match in enumerate(iterator): - if i + 1 == count: - return -match.end(1) - except StopIteration: - pass - return None - - def find_previous_word_ending( - self, count: int = 1, WORD: bool = False - ) -> int | None: - """ - Return an index relative to the cursor position pointing to the end - of the previous word. Return `None` if nothing was found. - """ - if count < 0: - return self.find_next_word_ending(count=-count, WORD=WORD) - - text_before_cursor = self.text_after_cursor[:1] + self.text_before_cursor[::-1] - - regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE - iterator = regex.finditer(text_before_cursor) - - try: - for i, match in enumerate(iterator): - # Take first match, unless it's the word on which we're right now. - if i == 0 and match.start(1) == 0: - count += 1 - - if i + 1 == count: - return -match.start(1) + 1 - except StopIteration: - pass - return None - - def find_next_matching_line( - self, match_func: Callable[[str], bool], count: int = 1 - ) -> int | None: - """ - Look downwards for empty lines. - Return the line index, relative to the current line. - """ - result = None - - for index, line in enumerate(self.lines[self.cursor_position_row + 1 :]): - if match_func(line): - result = 1 + index - count -= 1 - - if count == 0: - break - - return result - - def find_previous_matching_line( - self, match_func: Callable[[str], bool], count: int = 1 - ) -> int | None: - """ - Look upwards for empty lines. - Return the line index, relative to the current line. - """ - result = None - - for index, line in enumerate(self.lines[: self.cursor_position_row][::-1]): - if match_func(line): - result = -1 - index - count -= 1 - - if count == 0: - break - - return result - - def get_cursor_left_position(self, count: int = 1) -> int: - """ - Relative position for cursor left. - """ - if count < 0: - return self.get_cursor_right_position(-count) - - return -min(self.cursor_position_col, count) - - def get_cursor_right_position(self, count: int = 1) -> int: - """ - Relative position for cursor_right. - """ - if count < 0: - return self.get_cursor_left_position(-count) - - return min(count, len(self.current_line_after_cursor)) - - def get_cursor_up_position( - self, count: int = 1, preferred_column: int | None = None - ) -> int: - """ - Return the relative cursor position (character index) where we would be if the - user pressed the arrow-up button. - - :param preferred_column: When given, go to this column instead of - staying at the current column. - """ - assert count >= 1 - column = ( - self.cursor_position_col if preferred_column is None else preferred_column - ) - - return ( - self.translate_row_col_to_index( - max(0, self.cursor_position_row - count), column - ) - - self.cursor_position - ) - - def get_cursor_down_position( - self, count: int = 1, preferred_column: int | None = None - ) -> int: - """ - Return the relative cursor position (character index) where we would be if the - user pressed the arrow-down button. - - :param preferred_column: When given, go to this column instead of - staying at the current column. - """ - assert count >= 1 - column = ( - self.cursor_position_col if preferred_column is None else preferred_column - ) - - return ( - self.translate_row_col_to_index(self.cursor_position_row + count, column) - - self.cursor_position - ) - - def find_enclosing_bracket_right( - self, left_ch: str, right_ch: str, end_pos: int | None = None - ) -> int | None: - """ - Find the right bracket enclosing current position. Return the relative - position to the cursor position. - - When `end_pos` is given, don't look past the position. - """ - if self.current_char == right_ch: - return 0 - - if end_pos is None: - end_pos = len(self.text) - else: - end_pos = min(len(self.text), end_pos) - - stack = 1 - - # Look forward. - for i in range(self.cursor_position + 1, end_pos): - c = self.text[i] - - if c == left_ch: - stack += 1 - elif c == right_ch: - stack -= 1 - - if stack == 0: - return i - self.cursor_position - - return None - - def find_enclosing_bracket_left( - self, left_ch: str, right_ch: str, start_pos: int | None = None - ) -> int | None: - """ - Find the left bracket enclosing current position. Return the relative - position to the cursor position. - - When `start_pos` is given, don't look past the position. - """ - if self.current_char == left_ch: - return 0 - - if start_pos is None: - start_pos = 0 - else: - start_pos = max(0, start_pos) - - stack = 1 - - # Look backward. - for i in range(self.cursor_position - 1, start_pos - 1, -1): - c = self.text[i] - - if c == right_ch: - stack += 1 - elif c == left_ch: - stack -= 1 - - if stack == 0: - return i - self.cursor_position - - return None - - def find_matching_bracket_position( - self, start_pos: int | None = None, end_pos: int | None = None - ) -> int: - """ - Return relative cursor position of matching [, (, { or < bracket. - - When `start_pos` or `end_pos` are given. Don't look past the positions. - """ - - # Look for a match. - for pair in "()", "[]", "{}", "<>": - A = pair[0] - B = pair[1] - if self.current_char == A: - return self.find_enclosing_bracket_right(A, B, end_pos=end_pos) or 0 - elif self.current_char == B: - return self.find_enclosing_bracket_left(A, B, start_pos=start_pos) or 0 - - return 0 - - def get_start_of_document_position(self) -> int: - """Relative position for the start of the document.""" - return -self.cursor_position - - def get_end_of_document_position(self) -> int: - """Relative position for the end of the document.""" - return len(self.text) - self.cursor_position - - def get_start_of_line_position(self, after_whitespace: bool = False) -> int: - """Relative position for the start of this line.""" - if after_whitespace: - current_line = self.current_line - return ( - len(current_line) - - len(current_line.lstrip()) - - self.cursor_position_col - ) - else: - return -len(self.current_line_before_cursor) - - def get_end_of_line_position(self) -> int: - """Relative position for the end of this line.""" - return len(self.current_line_after_cursor) - - def last_non_blank_of_current_line_position(self) -> int: - """ - Relative position for the last non blank character of this line. - """ - return len(self.current_line.rstrip()) - self.cursor_position_col - 1 - - def get_column_cursor_position(self, column: int) -> int: - """ - Return the relative cursor position for this column at the current - line. (It will stay between the boundaries of the line in case of a - larger number.) - """ - line_length = len(self.current_line) - current_column = self.cursor_position_col - column = max(0, min(line_length, column)) - - return column - current_column - - def selection_range( - self, - ) -> tuple[ - int, int - ]: # XXX: shouldn't this return `None` if there is no selection??? - """ - Return (from, to) tuple of the selection. - start and end position are included. - - This doesn't take the selection type into account. Use - `selection_ranges` instead. - """ - if self.selection: - from_, to = sorted( - [self.cursor_position, self.selection.original_cursor_position] - ) - else: - from_, to = self.cursor_position, self.cursor_position - - return from_, to - - def selection_ranges(self) -> Iterable[tuple[int, int]]: - """ - Return a list of `(from, to)` tuples for the selection or none if - nothing was selected. The upper boundary is not included. - - This will yield several (from, to) tuples in case of a BLOCK selection. - This will return zero ranges, like (8,8) for empty lines in a block - selection. - """ - if self.selection: - from_, to = sorted( - [self.cursor_position, self.selection.original_cursor_position] - ) - - if self.selection.type == SelectionType.BLOCK: - from_line, from_column = self.translate_index_to_position(from_) - to_line, to_column = self.translate_index_to_position(to) - from_column, to_column = sorted([from_column, to_column]) - lines = self.lines - - if vi_mode(): - to_column += 1 - - for l in range(from_line, to_line + 1): - line_length = len(lines[l]) - - if from_column <= line_length: - yield ( - self.translate_row_col_to_index(l, from_column), - self.translate_row_col_to_index( - l, min(line_length, to_column) - ), - ) - else: - # In case of a LINES selection, go to the start/end of the lines. - if self.selection.type == SelectionType.LINES: - from_ = max(0, self.text.rfind("\n", 0, from_) + 1) - - if self.text.find("\n", to) >= 0: - to = self.text.find("\n", to) - else: - to = len(self.text) - 1 - - # In Vi mode, the upper boundary is always included. For Emacs, - # that's not the case. - if vi_mode(): - to += 1 - - yield from_, to - - def selection_range_at_line(self, row: int) -> tuple[int, int] | None: - """ - If the selection spans a portion of the given line, return a (from, to) tuple. - - The returned upper boundary is not included in the selection, so - `(0, 0)` is an empty selection. `(0, 1)`, is a one character selection. - - Returns None if the selection doesn't cover this line at all. - """ - if self.selection: - line = self.lines[row] - - row_start = self.translate_row_col_to_index(row, 0) - row_end = self.translate_row_col_to_index(row, len(line)) - - from_, to = sorted( - [self.cursor_position, self.selection.original_cursor_position] - ) - - # Take the intersection of the current line and the selection. - intersection_start = max(row_start, from_) - intersection_end = min(row_end, to) - - if intersection_start <= intersection_end: - if self.selection.type == SelectionType.LINES: - intersection_start = row_start - intersection_end = row_end - - elif self.selection.type == SelectionType.BLOCK: - _, col1 = self.translate_index_to_position(from_) - _, col2 = self.translate_index_to_position(to) - col1, col2 = sorted([col1, col2]) - - if col1 > len(line): - return None # Block selection doesn't cross this line. - - intersection_start = self.translate_row_col_to_index(row, col1) - intersection_end = self.translate_row_col_to_index(row, col2) - - _, from_column = self.translate_index_to_position(intersection_start) - _, to_column = self.translate_index_to_position(intersection_end) - - # In Vi mode, the upper boundary is always included. For Emacs - # mode, that's not the case. - if vi_mode(): - to_column += 1 - - return from_column, to_column - return None - - def cut_selection(self) -> tuple[Document, ClipboardData]: - """ - Return a (:class:`.Document`, :class:`.ClipboardData`) tuple, where the - document represents the new document when the selection is cut, and the - clipboard data, represents whatever has to be put on the clipboard. - """ - if self.selection: - cut_parts = [] - remaining_parts = [] - new_cursor_position = self.cursor_position - - last_to = 0 - for from_, to in self.selection_ranges(): - if last_to == 0: - new_cursor_position = from_ - - remaining_parts.append(self.text[last_to:from_]) - cut_parts.append(self.text[from_:to]) - last_to = to - - remaining_parts.append(self.text[last_to:]) - - cut_text = "\n".join(cut_parts) - remaining_text = "".join(remaining_parts) - - # In case of a LINES selection, don't include the trailing newline. - if self.selection.type == SelectionType.LINES and cut_text.endswith("\n"): - cut_text = cut_text[:-1] - - return ( - Document(text=remaining_text, cursor_position=new_cursor_position), - ClipboardData(cut_text, self.selection.type), - ) - else: - return self, ClipboardData("") - - def paste_clipboard_data( - self, - data: ClipboardData, - paste_mode: PasteMode = PasteMode.EMACS, - count: int = 1, - ) -> Document: - """ - Return a new :class:`.Document` instance which contains the result if - we would paste this data at the current cursor position. - - :param paste_mode: Where to paste. (Before/after/emacs.) - :param count: When >1, Paste multiple times. - """ - before = paste_mode == PasteMode.VI_BEFORE - after = paste_mode == PasteMode.VI_AFTER - - if data.type == SelectionType.CHARACTERS: - if after: - new_text = ( - self.text[: self.cursor_position + 1] - + data.text * count - + self.text[self.cursor_position + 1 :] - ) - else: - new_text = ( - self.text_before_cursor + data.text * count + self.text_after_cursor - ) - - new_cursor_position = self.cursor_position + len(data.text) * count - if before: - new_cursor_position -= 1 - - elif data.type == SelectionType.LINES: - l = self.cursor_position_row - if before: - lines = self.lines[:l] + [data.text] * count + self.lines[l:] - new_text = "\n".join(lines) - new_cursor_position = len("".join(self.lines[:l])) + l - else: - lines = self.lines[: l + 1] + [data.text] * count + self.lines[l + 1 :] - new_cursor_position = len("".join(self.lines[: l + 1])) + l + 1 - new_text = "\n".join(lines) - - elif data.type == SelectionType.BLOCK: - lines = self.lines[:] - start_line = self.cursor_position_row - start_column = self.cursor_position_col + (0 if before else 1) - - for i, line in enumerate(data.text.split("\n")): - index = i + start_line - if index >= len(lines): - lines.append("") - - lines[index] = lines[index].ljust(start_column) - lines[index] = ( - lines[index][:start_column] - + line * count - + lines[index][start_column:] - ) - - new_text = "\n".join(lines) - new_cursor_position = self.cursor_position + (0 if before else 1) - - return Document(text=new_text, cursor_position=new_cursor_position) - - def empty_line_count_at_the_end(self) -> int: - """ - Return number of empty lines at the end of the document. - """ - count = 0 - for line in self.lines[::-1]: - if not line or line.isspace(): - count += 1 - else: - break - - return count - - def start_of_paragraph(self, count: int = 1, before: bool = False) -> int: - """ - Return the start of the current paragraph. (Relative cursor position.) - """ - - def match_func(text: str) -> bool: - return not text or text.isspace() - - line_index = self.find_previous_matching_line( - match_func=match_func, count=count - ) - - if line_index: - add = 0 if before else 1 - return min(0, self.get_cursor_up_position(count=-line_index) + add) - else: - return -self.cursor_position - - def end_of_paragraph(self, count: int = 1, after: bool = False) -> int: - """ - Return the end of the current paragraph. (Relative cursor position.) - """ - - def match_func(text: str) -> bool: - return not text or text.isspace() - - line_index = self.find_next_matching_line(match_func=match_func, count=count) - - if line_index: - add = 0 if after else 1 - return max(0, self.get_cursor_down_position(count=line_index) - add) - else: - return len(self.text_after_cursor) - - # Modifiers. - - def insert_after(self, text: str) -> Document: - """ - Create a new document, with this text inserted after the buffer. - It keeps selection ranges and cursor position in sync. - """ - return Document( - text=self.text + text, - cursor_position=self.cursor_position, - selection=self.selection, - ) - - def insert_before(self, text: str) -> Document: - """ - Create a new document, with this text inserted before the buffer. - It keeps selection ranges and cursor position in sync. - """ - selection_state = self.selection - - if selection_state: - selection_state = SelectionState( - original_cursor_position=selection_state.original_cursor_position - + len(text), - type=selection_state.type, - ) - - return Document( - text=text + self.text, - cursor_position=self.cursor_position + len(text), - selection=selection_state, - ) diff --git a/voxvera/vendor/prompt_toolkit/enums.py b/voxvera/vendor/prompt_toolkit/enums.py deleted file mode 100644 index da03633..0000000 --- a/voxvera/vendor/prompt_toolkit/enums.py +++ /dev/null @@ -1,19 +0,0 @@ -from __future__ import annotations - -from enum import Enum - - -class EditingMode(Enum): - # The set of key bindings that is active. - VI = "VI" - EMACS = "EMACS" - - -#: Name of the search buffer. -SEARCH_BUFFER = "SEARCH_BUFFER" - -#: Name of the default buffer. -DEFAULT_BUFFER = "DEFAULT_BUFFER" - -#: Name of the system buffer. -SYSTEM_BUFFER = "SYSTEM_BUFFER" diff --git a/voxvera/vendor/prompt_toolkit/eventloop/__init__.py b/voxvera/vendor/prompt_toolkit/eventloop/__init__.py deleted file mode 100644 index 5df623b..0000000 --- a/voxvera/vendor/prompt_toolkit/eventloop/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import annotations - -from .async_generator import aclosing, generator_to_async_generator -from .inputhook import ( - InputHook, - InputHookContext, - InputHookSelector, - new_eventloop_with_inputhook, - set_eventloop_with_inputhook, -) -from .utils import ( - call_soon_threadsafe, - get_traceback_from_context, - run_in_executor_with_context, -) - -__all__ = [ - # Async generator - "generator_to_async_generator", - "aclosing", - # Utils. - "run_in_executor_with_context", - "call_soon_threadsafe", - "get_traceback_from_context", - # Inputhooks. - "InputHook", - "new_eventloop_with_inputhook", - "set_eventloop_with_inputhook", - "InputHookSelector", - "InputHookContext", -] diff --git a/voxvera/vendor/prompt_toolkit/eventloop/async_generator.py b/voxvera/vendor/prompt_toolkit/eventloop/async_generator.py deleted file mode 100644 index 32e5f88..0000000 --- a/voxvera/vendor/prompt_toolkit/eventloop/async_generator.py +++ /dev/null @@ -1,125 +0,0 @@ -""" -Implementation for async generators. -""" - -from __future__ import annotations - -from asyncio import get_running_loop -from contextlib import asynccontextmanager -from queue import Empty, Full, Queue -from typing import Any, AsyncGenerator, Callable, Iterable, TypeVar - -from .utils import run_in_executor_with_context - -__all__ = [ - "aclosing", - "generator_to_async_generator", -] - -_T_Generator = TypeVar("_T_Generator", bound=AsyncGenerator[Any, None]) - - -@asynccontextmanager -async def aclosing( - thing: _T_Generator, -) -> AsyncGenerator[_T_Generator, None]: - "Similar to `contextlib.aclosing`, in Python 3.10." - try: - yield thing - finally: - await thing.aclose() - - -# By default, choose a buffer size that's a good balance between having enough -# throughput, but not consuming too much memory. We use this to consume a sync -# generator of completions as an async generator. If the queue size is very -# small (like 1), consuming the completions goes really slow (when there are a -# lot of items). If the queue size would be unlimited or too big, this can -# cause overconsumption of memory, and cause CPU time spent producing items -# that are no longer needed (if the consumption of the async generator stops at -# some point). We need a fixed size in order to get some back pressure from the -# async consumer to the sync producer. We choose 1000 by default here. If we -# have around 50k completions, measurements show that 1000 is still -# significantly faster than a buffer of 100. -DEFAULT_BUFFER_SIZE: int = 1000 - -_T = TypeVar("_T") - - -class _Done: - pass - - -async def generator_to_async_generator( - get_iterable: Callable[[], Iterable[_T]], - buffer_size: int = DEFAULT_BUFFER_SIZE, -) -> AsyncGenerator[_T, None]: - """ - Turn a generator or iterable into an async generator. - - This works by running the generator in a background thread. - - :param get_iterable: Function that returns a generator or iterable when - called. - :param buffer_size: Size of the queue between the async consumer and the - synchronous generator that produces items. - """ - quitting = False - # NOTE: We are limiting the queue size in order to have back-pressure. - q: Queue[_T | _Done] = Queue(maxsize=buffer_size) - loop = get_running_loop() - - def runner() -> None: - """ - Consume the generator in background thread. - When items are received, they'll be pushed to the queue. - """ - try: - for item in get_iterable(): - # When this async generator was cancelled (closed), stop this - # thread. - if quitting: - return - - while True: - try: - q.put(item, timeout=1) - except Full: - if quitting: - return - continue - else: - break - - finally: - while True: - try: - q.put(_Done(), timeout=1) - except Full: - if quitting: - return - continue - else: - break - - # Start background thread. - runner_f = run_in_executor_with_context(runner) - - try: - while True: - try: - item = q.get_nowait() - except Empty: - item = await loop.run_in_executor(None, q.get) - if isinstance(item, _Done): - break - else: - yield item - finally: - # When this async generator is closed (GeneratorExit exception, stop - # the background thread as well. - we don't need that anymore.) - quitting = True - - # Wait for the background thread to finish. (should happen right after - # the last item is yielded). - await runner_f diff --git a/voxvera/vendor/prompt_toolkit/eventloop/inputhook.py b/voxvera/vendor/prompt_toolkit/eventloop/inputhook.py deleted file mode 100644 index 40016e8..0000000 --- a/voxvera/vendor/prompt_toolkit/eventloop/inputhook.py +++ /dev/null @@ -1,191 +0,0 @@ -""" -Similar to `PyOS_InputHook` of the Python API, we can plug in an input hook in -the asyncio event loop. - -The way this works is by using a custom 'selector' that runs the other event -loop until the real selector is ready. - -It's the responsibility of this event hook to return when there is input ready. -There are two ways to detect when input is ready: - -The inputhook itself is a callable that receives an `InputHookContext`. This -callable should run the other event loop, and return when the main loop has -stuff to do. There are two ways to detect when to return: - -- Call the `input_is_ready` method periodically. Quit when this returns `True`. - -- Add the `fileno` as a watch to the external eventloop. Quit when file descriptor - becomes readable. (But don't read from it.) - - Note that this is not the same as checking for `sys.stdin.fileno()`. The - eventloop of prompt-toolkit allows thread-based executors, for example for - asynchronous autocompletion. When the completion for instance is ready, we - also want prompt-toolkit to gain control again in order to display that. -""" - -from __future__ import annotations - -import asyncio -import os -import select -import selectors -import sys -import threading -from asyncio import AbstractEventLoop, get_running_loop -from selectors import BaseSelector, SelectorKey -from typing import TYPE_CHECKING, Any, Callable, Mapping - -__all__ = [ - "new_eventloop_with_inputhook", - "set_eventloop_with_inputhook", - "InputHookSelector", - "InputHookContext", - "InputHook", -] - -if TYPE_CHECKING: - from _typeshed import FileDescriptorLike - from typing_extensions import TypeAlias - - _EventMask = int - - -class InputHookContext: - """ - Given as a parameter to the inputhook. - """ - - def __init__(self, fileno: int, input_is_ready: Callable[[], bool]) -> None: - self._fileno = fileno - self.input_is_ready = input_is_ready - - def fileno(self) -> int: - return self._fileno - - -InputHook: TypeAlias = Callable[[InputHookContext], None] - - -def new_eventloop_with_inputhook( - inputhook: Callable[[InputHookContext], None], -) -> AbstractEventLoop: - """ - Create a new event loop with the given inputhook. - """ - selector = InputHookSelector(selectors.DefaultSelector(), inputhook) - loop = asyncio.SelectorEventLoop(selector) - return loop - - -def set_eventloop_with_inputhook( - inputhook: Callable[[InputHookContext], None], -) -> AbstractEventLoop: - """ - Create a new event loop with the given inputhook, and activate it. - """ - # Deprecated! - - loop = new_eventloop_with_inputhook(inputhook) - asyncio.set_event_loop(loop) - return loop - - -class InputHookSelector(BaseSelector): - """ - Usage: - - selector = selectors.SelectSelector() - loop = asyncio.SelectorEventLoop(InputHookSelector(selector, inputhook)) - asyncio.set_event_loop(loop) - """ - - def __init__( - self, selector: BaseSelector, inputhook: Callable[[InputHookContext], None] - ) -> None: - self.selector = selector - self.inputhook = inputhook - self._r, self._w = os.pipe() - - def register( - self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = None - ) -> SelectorKey: - return self.selector.register(fileobj, events, data=data) - - def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: - return self.selector.unregister(fileobj) - - def modify( - self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = None - ) -> SelectorKey: - return self.selector.modify(fileobj, events, data=None) - - def select( - self, timeout: float | None = None - ) -> list[tuple[SelectorKey, _EventMask]]: - # If there are tasks in the current event loop, - # don't run the input hook. - if len(getattr(get_running_loop(), "_ready", [])) > 0: - return self.selector.select(timeout=timeout) - - ready = False - result = None - - # Run selector in other thread. - def run_selector() -> None: - nonlocal ready, result - result = self.selector.select(timeout=timeout) - os.write(self._w, b"x") - ready = True - - th = threading.Thread(target=run_selector) - th.start() - - def input_is_ready() -> bool: - return ready - - # Call inputhook. - # The inputhook function is supposed to return when our selector - # becomes ready. The inputhook can do that by registering the fd in its - # own loop, or by checking the `input_is_ready` function regularly. - self.inputhook(InputHookContext(self._r, input_is_ready)) - - # Flush the read end of the pipe. - try: - # Before calling 'os.read', call select.select. This is required - # when the gevent monkey patch has been applied. 'os.read' is never - # monkey patched and won't be cooperative, so that would block all - # other select() calls otherwise. - # See: http://www.gevent.org/gevent.os.html - - # Note: On Windows, this is apparently not an issue. - # However, if we would ever want to add a select call, it - # should use `windll.kernel32.WaitForMultipleObjects`, - # because `select.select` can't wait for a pipe on Windows. - if sys.platform != "win32": - select.select([self._r], [], [], None) - - os.read(self._r, 1024) - except OSError: - # This happens when the window resizes and a SIGWINCH was received. - # We get 'Error: [Errno 4] Interrupted system call' - # Just ignore. - pass - - # Wait for the real selector to be done. - th.join() - assert result is not None - return result - - def close(self) -> None: - """ - Clean up resources. - """ - if self._r: - os.close(self._r) - os.close(self._w) - - self._r = self._w = -1 - self.selector.close() - - def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: - return self.selector.get_map() diff --git a/voxvera/vendor/prompt_toolkit/eventloop/utils.py b/voxvera/vendor/prompt_toolkit/eventloop/utils.py deleted file mode 100644 index 3138361..0000000 --- a/voxvera/vendor/prompt_toolkit/eventloop/utils.py +++ /dev/null @@ -1,101 +0,0 @@ -from __future__ import annotations - -import asyncio -import contextvars -import sys -import time -from asyncio import get_running_loop -from types import TracebackType -from typing import Any, Awaitable, Callable, TypeVar, cast - -__all__ = [ - "run_in_executor_with_context", - "call_soon_threadsafe", - "get_traceback_from_context", -] - -_T = TypeVar("_T") - - -def run_in_executor_with_context( - func: Callable[..., _T], - *args: Any, - loop: asyncio.AbstractEventLoop | None = None, -) -> Awaitable[_T]: - """ - Run a function in an executor, but make sure it uses the same contextvars. - This is required so that the function will see the right application. - - See also: https://bugs.python.org/issue34014 - """ - loop = loop or get_running_loop() - ctx: contextvars.Context = contextvars.copy_context() - - return loop.run_in_executor(None, ctx.run, func, *args) - - -def call_soon_threadsafe( - func: Callable[[], None], - max_postpone_time: float | None = None, - loop: asyncio.AbstractEventLoop | None = None, -) -> None: - """ - Wrapper around asyncio's `call_soon_threadsafe`. - - This takes a `max_postpone_time` which can be used to tune the urgency of - the method. - - Asyncio runs tasks in first-in-first-out. However, this is not what we - want for the render function of the prompt_toolkit UI. Rendering is - expensive, but since the UI is invalidated very often, in some situations - we render the UI too often, so much that the rendering CPU usage slows down - the rest of the processing of the application. (Pymux is an example where - we have to balance the CPU time spend on rendering the UI, and parsing - process output.) - However, we want to set a deadline value, for when the rendering should - happen. (The UI should stay responsive). - """ - loop2 = loop or get_running_loop() - - # If no `max_postpone_time` has been given, schedule right now. - if max_postpone_time is None: - loop2.call_soon_threadsafe(func) - return - - max_postpone_until = time.time() + max_postpone_time - - def schedule() -> None: - # When there are no other tasks scheduled in the event loop. Run it - # now. - # Notice: uvloop doesn't have this _ready attribute. In that case, - # always call immediately. - if not getattr(loop2, "_ready", []): - func() - return - - # If the timeout expired, run this now. - if time.time() > max_postpone_until: - func() - return - - # Schedule again for later. - loop2.call_soon_threadsafe(schedule) - - loop2.call_soon_threadsafe(schedule) - - -def get_traceback_from_context(context: dict[str, Any]) -> TracebackType | None: - """ - Get the traceback object from the context. - """ - exception = context.get("exception") - if exception: - if hasattr(exception, "__traceback__"): - return cast(TracebackType, exception.__traceback__) - else: - # call_exception_handler() is usually called indirectly - # from an except block. If it's not the case, the traceback - # is undefined... - return sys.exc_info()[2] - - return None diff --git a/voxvera/vendor/prompt_toolkit/eventloop/win32.py b/voxvera/vendor/prompt_toolkit/eventloop/win32.py deleted file mode 100644 index 56a0c7d..0000000 --- a/voxvera/vendor/prompt_toolkit/eventloop/win32.py +++ /dev/null @@ -1,72 +0,0 @@ -from __future__ import annotations - -import sys - -assert sys.platform == "win32" - -from ctypes import pointer - -from ..utils import SPHINX_AUTODOC_RUNNING - -# Do not import win32-specific stuff when generating documentation. -# Otherwise RTD would be unable to generate docs for this module. -if not SPHINX_AUTODOC_RUNNING: - from ctypes import windll - -from ctypes.wintypes import BOOL, DWORD, HANDLE - -from prompt_toolkit.win32_types import SECURITY_ATTRIBUTES - -__all__ = ["wait_for_handles", "create_win32_event"] - - -WAIT_TIMEOUT = 0x00000102 -INFINITE = -1 - - -def wait_for_handles(handles: list[HANDLE], timeout: int = INFINITE) -> HANDLE | None: - """ - Waits for multiple handles. (Similar to 'select') Returns the handle which is ready. - Returns `None` on timeout. - http://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx - - Note that handles should be a list of `HANDLE` objects, not integers. See - this comment in the patch by @quark-zju for the reason why: - - ''' Make sure HANDLE on Windows has a correct size - - Previously, the type of various HANDLEs are native Python integer - types. The ctypes library will treat them as 4-byte integer when used - in function arguments. On 64-bit Windows, HANDLE is 8-byte and usually - a small integer. Depending on whether the extra 4 bytes are zero-ed out - or not, things can happen to work, or break. ''' - - This function returns either `None` or one of the given `HANDLE` objects. - (The return value can be tested with the `is` operator.) - """ - arrtype = HANDLE * len(handles) - handle_array = arrtype(*handles) - - ret: int = windll.kernel32.WaitForMultipleObjects( - len(handle_array), handle_array, BOOL(False), DWORD(timeout) - ) - - if ret == WAIT_TIMEOUT: - return None - else: - return handles[ret] - - -def create_win32_event() -> HANDLE: - """ - Creates a Win32 unnamed Event . - http://msdn.microsoft.com/en-us/library/windows/desktop/ms682396(v=vs.85).aspx - """ - return HANDLE( - windll.kernel32.CreateEventA( - pointer(SECURITY_ATTRIBUTES()), - BOOL(True), # Manual reset event. - BOOL(False), # Initial state. - None, # Unnamed event object. - ) - ) diff --git a/voxvera/vendor/prompt_toolkit/filters/__init__.py b/voxvera/vendor/prompt_toolkit/filters/__init__.py deleted file mode 100644 index 556ed88..0000000 --- a/voxvera/vendor/prompt_toolkit/filters/__init__.py +++ /dev/null @@ -1,71 +0,0 @@ -""" -Filters decide whether something is active or not (they decide about a boolean -state). This is used to enable/disable features, like key bindings, parts of -the layout and other stuff. For instance, we could have a `HasSearch` filter -attached to some part of the layout, in order to show that part of the user -interface only while the user is searching. - -Filters are made to avoid having to attach callbacks to all event in order to -propagate state. However, they are lazy, they don't automatically propagate the -state of what they are observing. Only when a filter is called (it's actually a -callable), it will calculate its value. So, its not really reactive -programming, but it's made to fit for this framework. - -Filters can be chained using ``&`` and ``|`` operations, and inverted using the -``~`` operator, for instance:: - - filter = has_focus('default') & ~ has_selection -""" - -from __future__ import annotations - -from .app import * -from .base import Always, Condition, Filter, FilterOrBool, Never -from .cli import * -from .utils import is_true, to_filter - -__all__ = [ - # app - "has_arg", - "has_completions", - "completion_is_selected", - "has_focus", - "buffer_has_focus", - "has_selection", - "has_validation_error", - "is_done", - "is_read_only", - "is_multiline", - "renderer_height_is_known", - "in_editing_mode", - "in_paste_mode", - "vi_mode", - "vi_navigation_mode", - "vi_insert_mode", - "vi_insert_multiple_mode", - "vi_replace_mode", - "vi_selection_mode", - "vi_waiting_for_text_object_mode", - "vi_digraph_mode", - "vi_recording_macro", - "emacs_mode", - "emacs_insert_mode", - "emacs_selection_mode", - "shift_selection_mode", - "is_searching", - "control_is_searchable", - "vi_search_direction_reversed", - # base. - "Filter", - "Never", - "Always", - "Condition", - "FilterOrBool", - # utils. - "is_true", - "to_filter", -] - -from .cli import __all__ as cli_all - -__all__.extend(cli_all) diff --git a/voxvera/vendor/prompt_toolkit/filters/app.py b/voxvera/vendor/prompt_toolkit/filters/app.py deleted file mode 100644 index b9cc611..0000000 --- a/voxvera/vendor/prompt_toolkit/filters/app.py +++ /dev/null @@ -1,419 +0,0 @@ -""" -Filters that accept a `Application` as argument. -""" - -from __future__ import annotations - -from typing import TYPE_CHECKING - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.cache import memoized -from prompt_toolkit.enums import EditingMode - -from .base import Condition - -if TYPE_CHECKING: - from prompt_toolkit.layout.layout import FocusableElement - - -__all__ = [ - "has_arg", - "has_completions", - "completion_is_selected", - "has_focus", - "buffer_has_focus", - "has_selection", - "has_suggestion", - "has_validation_error", - "is_done", - "is_read_only", - "is_multiline", - "renderer_height_is_known", - "in_editing_mode", - "in_paste_mode", - "vi_mode", - "vi_navigation_mode", - "vi_insert_mode", - "vi_insert_multiple_mode", - "vi_replace_mode", - "vi_selection_mode", - "vi_waiting_for_text_object_mode", - "vi_digraph_mode", - "vi_recording_macro", - "emacs_mode", - "emacs_insert_mode", - "emacs_selection_mode", - "shift_selection_mode", - "is_searching", - "control_is_searchable", - "vi_search_direction_reversed", -] - - -# NOTE: `has_focus` below should *not* be `memoized`. It can reference any user -# control. For instance, if we would continuously create new -# `PromptSession` instances, then previous instances won't be released, -# because this memoize (which caches results in the global scope) will -# still refer to each instance. -def has_focus(value: FocusableElement) -> Condition: - """ - Enable when this buffer has the focus. - """ - from prompt_toolkit.buffer import Buffer - from prompt_toolkit.layout import walk - from prompt_toolkit.layout.containers import Window, to_container - from prompt_toolkit.layout.controls import UIControl - - if isinstance(value, str): - - def test() -> bool: - return get_app().current_buffer.name == value - - elif isinstance(value, Buffer): - - def test() -> bool: - return get_app().current_buffer == value - - elif isinstance(value, UIControl): - - def test() -> bool: - return get_app().layout.current_control == value - - else: - value = to_container(value) - - if isinstance(value, Window): - - def test() -> bool: - return get_app().layout.current_window == value - - else: - - def test() -> bool: - # Consider focused when any window inside this container is - # focused. - current_window = get_app().layout.current_window - - for c in walk(value): - if isinstance(c, Window) and c == current_window: - return True - return False - - @Condition - def has_focus_filter() -> bool: - return test() - - return has_focus_filter - - -@Condition -def buffer_has_focus() -> bool: - """ - Enabled when the currently focused control is a `BufferControl`. - """ - return get_app().layout.buffer_has_focus - - -@Condition -def has_selection() -> bool: - """ - Enable when the current buffer has a selection. - """ - return bool(get_app().current_buffer.selection_state) - - -@Condition -def has_suggestion() -> bool: - """ - Enable when the current buffer has a suggestion. - """ - buffer = get_app().current_buffer - return buffer.suggestion is not None and buffer.suggestion.text != "" - - -@Condition -def has_completions() -> bool: - """ - Enable when the current buffer has completions. - """ - state = get_app().current_buffer.complete_state - return state is not None and len(state.completions) > 0 - - -@Condition -def completion_is_selected() -> bool: - """ - True when the user selected a completion. - """ - complete_state = get_app().current_buffer.complete_state - return complete_state is not None and complete_state.current_completion is not None - - -@Condition -def is_read_only() -> bool: - """ - True when the current buffer is read only. - """ - return get_app().current_buffer.read_only() - - -@Condition -def is_multiline() -> bool: - """ - True when the current buffer has been marked as multiline. - """ - return get_app().current_buffer.multiline() - - -@Condition -def has_validation_error() -> bool: - "Current buffer has validation error." - return get_app().current_buffer.validation_error is not None - - -@Condition -def has_arg() -> bool: - "Enable when the input processor has an 'arg'." - return get_app().key_processor.arg is not None - - -@Condition -def is_done() -> bool: - """ - True when the CLI is returning, aborting or exiting. - """ - return get_app().is_done - - -@Condition -def renderer_height_is_known() -> bool: - """ - Only True when the renderer knows it's real height. - - (On VT100 terminals, we have to wait for a CPR response, before we can be - sure of the available height between the cursor position and the bottom of - the terminal. And usually it's nicer to wait with drawing bottom toolbars - until we receive the height, in order to avoid flickering -- first drawing - somewhere in the middle, and then again at the bottom.) - """ - return get_app().renderer.height_is_known - - -@memoized() -def in_editing_mode(editing_mode: EditingMode) -> Condition: - """ - Check whether a given editing mode is active. (Vi or Emacs.) - """ - - @Condition - def in_editing_mode_filter() -> bool: - return get_app().editing_mode == editing_mode - - return in_editing_mode_filter - - -@Condition -def in_paste_mode() -> bool: - return get_app().paste_mode() - - -@Condition -def vi_mode() -> bool: - return get_app().editing_mode == EditingMode.VI - - -@Condition -def vi_navigation_mode() -> bool: - """ - Active when the set for Vi navigation key bindings are active. - """ - from prompt_toolkit.key_binding.vi_state import InputMode - - app = get_app() - - if ( - app.editing_mode != EditingMode.VI - or app.vi_state.operator_func - or app.vi_state.waiting_for_digraph - or app.current_buffer.selection_state - ): - return False - - return ( - app.vi_state.input_mode == InputMode.NAVIGATION - or app.vi_state.temporary_navigation_mode - or app.current_buffer.read_only() - ) - - -@Condition -def vi_insert_mode() -> bool: - from prompt_toolkit.key_binding.vi_state import InputMode - - app = get_app() - - if ( - app.editing_mode != EditingMode.VI - or app.vi_state.operator_func - or app.vi_state.waiting_for_digraph - or app.current_buffer.selection_state - or app.vi_state.temporary_navigation_mode - or app.current_buffer.read_only() - ): - return False - - return app.vi_state.input_mode == InputMode.INSERT - - -@Condition -def vi_insert_multiple_mode() -> bool: - from prompt_toolkit.key_binding.vi_state import InputMode - - app = get_app() - - if ( - app.editing_mode != EditingMode.VI - or app.vi_state.operator_func - or app.vi_state.waiting_for_digraph - or app.current_buffer.selection_state - or app.vi_state.temporary_navigation_mode - or app.current_buffer.read_only() - ): - return False - - return app.vi_state.input_mode == InputMode.INSERT_MULTIPLE - - -@Condition -def vi_replace_mode() -> bool: - from prompt_toolkit.key_binding.vi_state import InputMode - - app = get_app() - - if ( - app.editing_mode != EditingMode.VI - or app.vi_state.operator_func - or app.vi_state.waiting_for_digraph - or app.current_buffer.selection_state - or app.vi_state.temporary_navigation_mode - or app.current_buffer.read_only() - ): - return False - - return app.vi_state.input_mode == InputMode.REPLACE - - -@Condition -def vi_replace_single_mode() -> bool: - from prompt_toolkit.key_binding.vi_state import InputMode - - app = get_app() - - if ( - app.editing_mode != EditingMode.VI - or app.vi_state.operator_func - or app.vi_state.waiting_for_digraph - or app.current_buffer.selection_state - or app.vi_state.temporary_navigation_mode - or app.current_buffer.read_only() - ): - return False - - return app.vi_state.input_mode == InputMode.REPLACE_SINGLE - - -@Condition -def vi_selection_mode() -> bool: - app = get_app() - if app.editing_mode != EditingMode.VI: - return False - - return bool(app.current_buffer.selection_state) - - -@Condition -def vi_waiting_for_text_object_mode() -> bool: - app = get_app() - if app.editing_mode != EditingMode.VI: - return False - - return app.vi_state.operator_func is not None - - -@Condition -def vi_digraph_mode() -> bool: - app = get_app() - if app.editing_mode != EditingMode.VI: - return False - - return app.vi_state.waiting_for_digraph - - -@Condition -def vi_recording_macro() -> bool: - "When recording a Vi macro." - app = get_app() - if app.editing_mode != EditingMode.VI: - return False - - return app.vi_state.recording_register is not None - - -@Condition -def emacs_mode() -> bool: - "When the Emacs bindings are active." - return get_app().editing_mode == EditingMode.EMACS - - -@Condition -def emacs_insert_mode() -> bool: - app = get_app() - if ( - app.editing_mode != EditingMode.EMACS - or app.current_buffer.selection_state - or app.current_buffer.read_only() - ): - return False - return True - - -@Condition -def emacs_selection_mode() -> bool: - app = get_app() - return bool( - app.editing_mode == EditingMode.EMACS and app.current_buffer.selection_state - ) - - -@Condition -def shift_selection_mode() -> bool: - app = get_app() - return bool( - app.current_buffer.selection_state - and app.current_buffer.selection_state.shift_mode - ) - - -@Condition -def is_searching() -> bool: - "When we are searching." - app = get_app() - return app.layout.is_searching - - -@Condition -def control_is_searchable() -> bool: - "When the current UIControl is searchable." - from prompt_toolkit.layout.controls import BufferControl - - control = get_app().layout.current_control - - return ( - isinstance(control, BufferControl) and control.search_buffer_control is not None - ) - - -@Condition -def vi_search_direction_reversed() -> bool: - "When the '/' and '?' key bindings for Vi-style searching have been reversed." - return get_app().reverse_vi_search_direction() diff --git a/voxvera/vendor/prompt_toolkit/filters/base.py b/voxvera/vendor/prompt_toolkit/filters/base.py deleted file mode 100644 index cd95424..0000000 --- a/voxvera/vendor/prompt_toolkit/filters/base.py +++ /dev/null @@ -1,260 +0,0 @@ -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import Callable, Iterable, Union - -__all__ = ["Filter", "Never", "Always", "Condition", "FilterOrBool"] - - -class Filter(metaclass=ABCMeta): - """ - Base class for any filter to activate/deactivate a feature, depending on a - condition. - - The return value of ``__call__`` will tell if the feature should be active. - """ - - def __init__(self) -> None: - self._and_cache: dict[Filter, Filter] = {} - self._or_cache: dict[Filter, Filter] = {} - self._invert_result: Filter | None = None - - @abstractmethod - def __call__(self) -> bool: - """ - The actual call to evaluate the filter. - """ - return True - - def __and__(self, other: Filter) -> Filter: - """ - Chaining of filters using the & operator. - """ - assert isinstance(other, Filter), f"Expecting filter, got {other!r}" - - if isinstance(other, Always): - return self - if isinstance(other, Never): - return other - - if other in self._and_cache: - return self._and_cache[other] - - result = _AndList.create([self, other]) - self._and_cache[other] = result - return result - - def __or__(self, other: Filter) -> Filter: - """ - Chaining of filters using the | operator. - """ - assert isinstance(other, Filter), f"Expecting filter, got {other!r}" - - if isinstance(other, Always): - return other - if isinstance(other, Never): - return self - - if other in self._or_cache: - return self._or_cache[other] - - result = _OrList.create([self, other]) - self._or_cache[other] = result - return result - - def __invert__(self) -> Filter: - """ - Inverting of filters using the ~ operator. - """ - if self._invert_result is None: - self._invert_result = _Invert(self) - - return self._invert_result - - def __bool__(self) -> None: - """ - By purpose, we don't allow bool(...) operations directly on a filter, - because the meaning is ambiguous. - - Executing a filter has to be done always by calling it. Providing - defaults for `None` values should be done through an `is None` check - instead of for instance ``filter1 or Always()``. - """ - raise ValueError( - "The truth value of a Filter is ambiguous. Instead, call it as a function." - ) - - -def _remove_duplicates(filters: list[Filter]) -> list[Filter]: - result = [] - for f in filters: - if f not in result: - result.append(f) - return result - - -class _AndList(Filter): - """ - Result of &-operation between several filters. - """ - - def __init__(self, filters: list[Filter]) -> None: - super().__init__() - self.filters = filters - - @classmethod - def create(cls, filters: Iterable[Filter]) -> Filter: - """ - Create a new filter by applying an `&` operator between them. - - If there's only one unique filter in the given iterable, it will return - that one filter instead of an `_AndList`. - """ - filters_2: list[Filter] = [] - - for f in filters: - if isinstance(f, _AndList): # Turn nested _AndLists into one. - filters_2.extend(f.filters) - else: - filters_2.append(f) - - # Remove duplicates. This could speed up execution, and doesn't make a - # difference for the evaluation. - filters = _remove_duplicates(filters_2) - - # If only one filter is left, return that without wrapping into an - # `_AndList`. - if len(filters) == 1: - return filters[0] - - return cls(filters) - - def __call__(self) -> bool: - return all(f() for f in self.filters) - - def __repr__(self) -> str: - return "&".join(repr(f) for f in self.filters) - - -class _OrList(Filter): - """ - Result of |-operation between several filters. - """ - - def __init__(self, filters: list[Filter]) -> None: - super().__init__() - self.filters = filters - - @classmethod - def create(cls, filters: Iterable[Filter]) -> Filter: - """ - Create a new filter by applying an `|` operator between them. - - If there's only one unique filter in the given iterable, it will return - that one filter instead of an `_OrList`. - """ - filters_2: list[Filter] = [] - - for f in filters: - if isinstance(f, _OrList): # Turn nested _AndLists into one. - filters_2.extend(f.filters) - else: - filters_2.append(f) - - # Remove duplicates. This could speed up execution, and doesn't make a - # difference for the evaluation. - filters = _remove_duplicates(filters_2) - - # If only one filter is left, return that without wrapping into an - # `_AndList`. - if len(filters) == 1: - return filters[0] - - return cls(filters) - - def __call__(self) -> bool: - return any(f() for f in self.filters) - - def __repr__(self) -> str: - return "|".join(repr(f) for f in self.filters) - - -class _Invert(Filter): - """ - Negation of another filter. - """ - - def __init__(self, filter: Filter) -> None: - super().__init__() - self.filter = filter - - def __call__(self) -> bool: - return not self.filter() - - def __repr__(self) -> str: - return f"~{self.filter!r}" - - -class Always(Filter): - """ - Always enable feature. - """ - - def __call__(self) -> bool: - return True - - def __or__(self, other: Filter) -> Filter: - return self - - def __and__(self, other: Filter) -> Filter: - return other - - def __invert__(self) -> Never: - return Never() - - -class Never(Filter): - """ - Never enable feature. - """ - - def __call__(self) -> bool: - return False - - def __and__(self, other: Filter) -> Filter: - return self - - def __or__(self, other: Filter) -> Filter: - return other - - def __invert__(self) -> Always: - return Always() - - -class Condition(Filter): - """ - Turn any callable into a Filter. The callable is supposed to not take any - arguments. - - This can be used as a decorator:: - - @Condition - def feature_is_active(): # `feature_is_active` becomes a Filter. - return True - - :param func: Callable which takes no inputs and returns a boolean. - """ - - def __init__(self, func: Callable[[], bool]) -> None: - super().__init__() - self.func = func - - def __call__(self) -> bool: - return self.func() - - def __repr__(self) -> str: - return f"Condition({self.func!r})" - - -# Often used as type annotation. -FilterOrBool = Union[Filter, bool] diff --git a/voxvera/vendor/prompt_toolkit/filters/cli.py b/voxvera/vendor/prompt_toolkit/filters/cli.py deleted file mode 100644 index 902fbaa..0000000 --- a/voxvera/vendor/prompt_toolkit/filters/cli.py +++ /dev/null @@ -1,65 +0,0 @@ -""" -For backwards-compatibility. keep this file. -(Many people are going to have key bindings that rely on this file.) -""" - -from __future__ import annotations - -from .app import * - -__all__ = [ - # Old names. - "HasArg", - "HasCompletions", - "HasFocus", - "HasSelection", - "HasValidationError", - "IsDone", - "IsReadOnly", - "IsMultiline", - "RendererHeightIsKnown", - "InEditingMode", - "InPasteMode", - "ViMode", - "ViNavigationMode", - "ViInsertMode", - "ViInsertMultipleMode", - "ViReplaceMode", - "ViSelectionMode", - "ViWaitingForTextObjectMode", - "ViDigraphMode", - "EmacsMode", - "EmacsInsertMode", - "EmacsSelectionMode", - "IsSearching", - "HasSearch", - "ControlIsSearchable", -] - -# Keep the original classnames for backwards compatibility. -HasValidationError = lambda: has_validation_error -HasArg = lambda: has_arg -IsDone = lambda: is_done -RendererHeightIsKnown = lambda: renderer_height_is_known -ViNavigationMode = lambda: vi_navigation_mode -InPasteMode = lambda: in_paste_mode -EmacsMode = lambda: emacs_mode -EmacsInsertMode = lambda: emacs_insert_mode -ViMode = lambda: vi_mode -IsSearching = lambda: is_searching -HasSearch = lambda: is_searching -ControlIsSearchable = lambda: control_is_searchable -EmacsSelectionMode = lambda: emacs_selection_mode -ViDigraphMode = lambda: vi_digraph_mode -ViWaitingForTextObjectMode = lambda: vi_waiting_for_text_object_mode -ViSelectionMode = lambda: vi_selection_mode -ViReplaceMode = lambda: vi_replace_mode -ViInsertMultipleMode = lambda: vi_insert_multiple_mode -ViInsertMode = lambda: vi_insert_mode -HasSelection = lambda: has_selection -HasCompletions = lambda: has_completions -IsReadOnly = lambda: is_read_only -IsMultiline = lambda: is_multiline - -HasFocus = has_focus # No lambda here! (Has_focus is callable that returns a callable.) -InEditingMode = in_editing_mode diff --git a/voxvera/vendor/prompt_toolkit/filters/utils.py b/voxvera/vendor/prompt_toolkit/filters/utils.py deleted file mode 100644 index 20e00ee..0000000 --- a/voxvera/vendor/prompt_toolkit/filters/utils.py +++ /dev/null @@ -1,41 +0,0 @@ -from __future__ import annotations - -from .base import Always, Filter, FilterOrBool, Never - -__all__ = [ - "to_filter", - "is_true", -] - - -_always = Always() -_never = Never() - - -_bool_to_filter: dict[bool, Filter] = { - True: _always, - False: _never, -} - - -def to_filter(bool_or_filter: FilterOrBool) -> Filter: - """ - Accept both booleans and Filters as input and - turn it into a Filter. - """ - if isinstance(bool_or_filter, bool): - return _bool_to_filter[bool_or_filter] - - if isinstance(bool_or_filter, Filter): - return bool_or_filter - - raise TypeError(f"Expecting a bool or a Filter instance. Got {bool_or_filter!r}") - - -def is_true(value: FilterOrBool) -> bool: - """ - Test whether `value` is True. In case of a Filter, call it. - - :param value: Boolean or `Filter` instance. - """ - return to_filter(value)() diff --git a/voxvera/vendor/prompt_toolkit/formatted_text/__init__.py b/voxvera/vendor/prompt_toolkit/formatted_text/__init__.py deleted file mode 100644 index 0590c81..0000000 --- a/voxvera/vendor/prompt_toolkit/formatted_text/__init__.py +++ /dev/null @@ -1,59 +0,0 @@ -""" -Many places in prompt_toolkit can take either plain text, or formatted text. -For instance the :func:`~prompt_toolkit.shortcuts.prompt` function takes either -plain text or formatted text for the prompt. The -:class:`~prompt_toolkit.layout.FormattedTextControl` can also take either plain -text or formatted text. - -In any case, there is an input that can either be just plain text (a string), -an :class:`.HTML` object, an :class:`.ANSI` object or a sequence of -`(style_string, text)` tuples. The :func:`.to_formatted_text` conversion -function takes any of these and turns all of them into such a tuple sequence. -""" - -from __future__ import annotations - -from .ansi import ANSI -from .base import ( - AnyFormattedText, - FormattedText, - OneStyleAndTextTuple, - StyleAndTextTuples, - Template, - is_formatted_text, - merge_formatted_text, - to_formatted_text, -) -from .html import HTML -from .pygments import PygmentsTokens -from .utils import ( - fragment_list_len, - fragment_list_to_text, - fragment_list_width, - split_lines, - to_plain_text, -) - -__all__ = [ - # Base. - "AnyFormattedText", - "OneStyleAndTextTuple", - "to_formatted_text", - "is_formatted_text", - "Template", - "merge_formatted_text", - "FormattedText", - "StyleAndTextTuples", - # HTML. - "HTML", - # ANSI. - "ANSI", - # Pygments. - "PygmentsTokens", - # Utils. - "fragment_list_len", - "fragment_list_width", - "fragment_list_to_text", - "split_lines", - "to_plain_text", -] diff --git a/voxvera/vendor/prompt_toolkit/formatted_text/ansi.py b/voxvera/vendor/prompt_toolkit/formatted_text/ansi.py deleted file mode 100644 index 8cc37a6..0000000 --- a/voxvera/vendor/prompt_toolkit/formatted_text/ansi.py +++ /dev/null @@ -1,302 +0,0 @@ -from __future__ import annotations - -from string import Formatter -from typing import Generator - -from prompt_toolkit.output.vt100 import BG_ANSI_COLORS, FG_ANSI_COLORS -from prompt_toolkit.output.vt100 import _256_colors as _256_colors_table - -from .base import StyleAndTextTuples - -__all__ = [ - "ANSI", - "ansi_escape", -] - - -class ANSI: - """ - ANSI formatted text. - Take something ANSI escaped text, for use as a formatted string. E.g. - - :: - - ANSI('\\x1b[31mhello \\x1b[32mworld') - - Characters between ``\\001`` and ``\\002`` are supposed to have a zero width - when printed, but these are literally sent to the terminal output. This can - be used for instance, for inserting Final Term prompt commands. They will - be translated into a prompt_toolkit '[ZeroWidthEscape]' fragment. - """ - - def __init__(self, value: str) -> None: - self.value = value - self._formatted_text: StyleAndTextTuples = [] - - # Default style attributes. - self._color: str | None = None - self._bgcolor: str | None = None - self._bold = False - self._dim = False - self._underline = False - self._strike = False - self._italic = False - self._blink = False - self._reverse = False - self._hidden = False - - # Process received text. - parser = self._parse_corot() - parser.send(None) # type: ignore - for c in value: - parser.send(c) - - def _parse_corot(self) -> Generator[None, str, None]: - """ - Coroutine that parses the ANSI escape sequences. - """ - style = "" - formatted_text = self._formatted_text - - while True: - # NOTE: CSI is a special token within a stream of characters that - # introduces an ANSI control sequence used to set the - # style attributes of the following characters. - csi = False - - c = yield - - # Everything between \001 and \002 should become a ZeroWidthEscape. - if c == "\001": - escaped_text = "" - while c != "\002": - c = yield - if c == "\002": - formatted_text.append(("[ZeroWidthEscape]", escaped_text)) - c = yield - break - else: - escaped_text += c - - # Check for CSI - if c == "\x1b": - # Start of color escape sequence. - square_bracket = yield - if square_bracket == "[": - csi = True - else: - continue - elif c == "\x9b": - csi = True - - if csi: - # Got a CSI sequence. Color codes are following. - current = "" - params = [] - - while True: - char = yield - - # Construct number - if char.isdigit(): - current += char - - # Eval number - else: - # Limit and save number value - params.append(min(int(current or 0), 9999)) - - # Get delimiter token if present - if char == ";": - current = "" - - # Check and evaluate color codes - elif char == "m": - # Set attributes and token. - self._select_graphic_rendition(params) - style = self._create_style_string() - break - - # Check and evaluate cursor forward - elif char == "C": - for i in range(params[0]): - # add using current style - formatted_text.append((style, " ")) - break - - else: - # Ignore unsupported sequence. - break - else: - # Add current character. - # NOTE: At this point, we could merge the current character - # into the previous tuple if the style did not change, - # however, it's not worth the effort given that it will - # be "Exploded" once again when it's rendered to the - # output. - formatted_text.append((style, c)) - - def _select_graphic_rendition(self, attrs: list[int]) -> None: - """ - Taken a list of graphics attributes and apply changes. - """ - if not attrs: - attrs = [0] - else: - attrs = list(attrs[::-1]) - - while attrs: - attr = attrs.pop() - - if attr in _fg_colors: - self._color = _fg_colors[attr] - elif attr in _bg_colors: - self._bgcolor = _bg_colors[attr] - elif attr == 1: - self._bold = True - elif attr == 2: - self._dim = True - elif attr == 3: - self._italic = True - elif attr == 4: - self._underline = True - elif attr == 5: - self._blink = True # Slow blink - elif attr == 6: - self._blink = True # Fast blink - elif attr == 7: - self._reverse = True - elif attr == 8: - self._hidden = True - elif attr == 9: - self._strike = True - elif attr == 22: - self._bold = False # Normal intensity - self._dim = False - elif attr == 23: - self._italic = False - elif attr == 24: - self._underline = False - elif attr == 25: - self._blink = False - elif attr == 27: - self._reverse = False - elif attr == 28: - self._hidden = False - elif attr == 29: - self._strike = False - elif not attr: - # Reset all style attributes - self._color = None - self._bgcolor = None - self._bold = False - self._dim = False - self._underline = False - self._strike = False - self._italic = False - self._blink = False - self._reverse = False - self._hidden = False - - elif attr in (38, 48) and len(attrs) > 1: - n = attrs.pop() - - # 256 colors. - if n == 5 and len(attrs) >= 1: - if attr == 38: - m = attrs.pop() - self._color = _256_colors.get(m) - elif attr == 48: - m = attrs.pop() - self._bgcolor = _256_colors.get(m) - - # True colors. - if n == 2 and len(attrs) >= 3: - try: - color_str = ( - f"#{attrs.pop():02x}{attrs.pop():02x}{attrs.pop():02x}" - ) - except IndexError: - pass - else: - if attr == 38: - self._color = color_str - elif attr == 48: - self._bgcolor = color_str - - def _create_style_string(self) -> str: - """ - Turn current style flags into a string for usage in a formatted text. - """ - result = [] - if self._color: - result.append(self._color) - if self._bgcolor: - result.append("bg:" + self._bgcolor) - if self._bold: - result.append("bold") - if self._dim: - result.append("dim") - if self._underline: - result.append("underline") - if self._strike: - result.append("strike") - if self._italic: - result.append("italic") - if self._blink: - result.append("blink") - if self._reverse: - result.append("reverse") - if self._hidden: - result.append("hidden") - - return " ".join(result) - - def __repr__(self) -> str: - return f"ANSI({self.value!r})" - - def __pt_formatted_text__(self) -> StyleAndTextTuples: - return self._formatted_text - - def format(self, *args: str, **kwargs: str) -> ANSI: - """ - Like `str.format`, but make sure that the arguments are properly - escaped. (No ANSI escapes can be injected.) - """ - return ANSI(FORMATTER.vformat(self.value, args, kwargs)) - - def __mod__(self, value: object) -> ANSI: - """ - ANSI('%s') % value - """ - if not isinstance(value, tuple): - value = (value,) - - value = tuple(ansi_escape(i) for i in value) - return ANSI(self.value % value) - - -# Mapping of the ANSI color codes to their names. -_fg_colors = {v: k for k, v in FG_ANSI_COLORS.items()} -_bg_colors = {v: k for k, v in BG_ANSI_COLORS.items()} - -# Mapping of the escape codes for 256colors to their 'ffffff' value. -_256_colors = {} - -for i, (r, g, b) in enumerate(_256_colors_table.colors): - _256_colors[i] = f"#{r:02x}{g:02x}{b:02x}" - - -def ansi_escape(text: object) -> str: - """ - Replace characters with a special meaning. - """ - return str(text).replace("\x1b", "?").replace("\b", "?") - - -class ANSIFormatter(Formatter): - def format_field(self, value: object, format_spec: str) -> str: - return ansi_escape(format(value, format_spec)) - - -FORMATTER = ANSIFormatter() diff --git a/voxvera/vendor/prompt_toolkit/formatted_text/base.py b/voxvera/vendor/prompt_toolkit/formatted_text/base.py deleted file mode 100644 index 5fee1f8..0000000 --- a/voxvera/vendor/prompt_toolkit/formatted_text/base.py +++ /dev/null @@ -1,179 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Callable, Iterable, List, Tuple, Union, cast - -from prompt_toolkit.mouse_events import MouseEvent - -if TYPE_CHECKING: - from typing_extensions import Protocol - - from prompt_toolkit.key_binding.key_bindings import NotImplementedOrNone - -__all__ = [ - "OneStyleAndTextTuple", - "StyleAndTextTuples", - "MagicFormattedText", - "AnyFormattedText", - "to_formatted_text", - "is_formatted_text", - "Template", - "merge_formatted_text", - "FormattedText", -] - -OneStyleAndTextTuple = Union[ - Tuple[str, str], Tuple[str, str, Callable[[MouseEvent], "NotImplementedOrNone"]] -] - -# List of (style, text) tuples. -StyleAndTextTuples = List[OneStyleAndTextTuple] - - -if TYPE_CHECKING: - from typing_extensions import TypeGuard - - class MagicFormattedText(Protocol): - """ - Any object that implements ``__pt_formatted_text__`` represents formatted - text. - """ - - def __pt_formatted_text__(self) -> StyleAndTextTuples: ... - - -AnyFormattedText = Union[ - str, - "MagicFormattedText", - StyleAndTextTuples, - # Callable[[], 'AnyFormattedText'] # Recursive definition not supported by mypy. - Callable[[], Any], - None, -] - - -def to_formatted_text( - value: AnyFormattedText, style: str = "", auto_convert: bool = False -) -> FormattedText: - """ - Convert the given value (which can be formatted text) into a list of text - fragments. (Which is the canonical form of formatted text.) The outcome is - always a `FormattedText` instance, which is a list of (style, text) tuples. - - It can take a plain text string, an `HTML` or `ANSI` object, anything that - implements `__pt_formatted_text__` or a callable that takes no arguments and - returns one of those. - - :param style: An additional style string which is applied to all text - fragments. - :param auto_convert: If `True`, also accept other types, and convert them - to a string first. - """ - result: FormattedText | StyleAndTextTuples - - if value is None: - result = [] - elif isinstance(value, str): - result = [("", value)] - elif isinstance(value, list): - result = value # StyleAndTextTuples - elif hasattr(value, "__pt_formatted_text__"): - result = cast("MagicFormattedText", value).__pt_formatted_text__() - elif callable(value): - return to_formatted_text(value(), style=style) - elif auto_convert: - result = [("", f"{value}")] - else: - raise ValueError( - "No formatted text. Expecting a unicode object, " - f"HTML, ANSI or a FormattedText instance. Got {value!r}" - ) - - # Apply extra style. - if style: - result = cast( - StyleAndTextTuples, - [(style + " " + item_style, *rest) for item_style, *rest in result], - ) - - # Make sure the result is wrapped in a `FormattedText`. Among other - # reasons, this is important for `print_formatted_text` to work correctly - # and distinguish between lists and formatted text. - if isinstance(result, FormattedText): - return result - else: - return FormattedText(result) - - -def is_formatted_text(value: object) -> TypeGuard[AnyFormattedText]: - """ - Check whether the input is valid formatted text (for use in assert - statements). - In case of a callable, it doesn't check the return type. - """ - if callable(value): - return True - if isinstance(value, (str, list)): - return True - if hasattr(value, "__pt_formatted_text__"): - return True - return False - - -class FormattedText(StyleAndTextTuples): - """ - A list of ``(style, text)`` tuples. - - (In some situations, this can also be ``(style, text, mouse_handler)`` - tuples.) - """ - - def __pt_formatted_text__(self) -> StyleAndTextTuples: - return self - - def __repr__(self) -> str: - return f"FormattedText({super().__repr__()})" - - -class Template: - """ - Template for string interpolation with formatted text. - - Example:: - - Template(' ... {} ... ').format(HTML(...)) - - :param text: Plain text. - """ - - def __init__(self, text: str) -> None: - assert "{0}" not in text - self.text = text - - def format(self, *values: AnyFormattedText) -> AnyFormattedText: - def get_result() -> AnyFormattedText: - # Split the template in parts. - parts = self.text.split("{}") - assert len(parts) - 1 == len(values) - - result = FormattedText() - for part, val in zip(parts, values): - result.append(("", part)) - result.extend(to_formatted_text(val)) - result.append(("", parts[-1])) - return result - - return get_result - - -def merge_formatted_text(items: Iterable[AnyFormattedText]) -> AnyFormattedText: - """ - Merge (Concatenate) several pieces of formatted text together. - """ - - def _merge_formatted_text() -> AnyFormattedText: - result = FormattedText() - for i in items: - result.extend(to_formatted_text(i)) - return result - - return _merge_formatted_text diff --git a/voxvera/vendor/prompt_toolkit/formatted_text/html.py b/voxvera/vendor/prompt_toolkit/formatted_text/html.py deleted file mode 100644 index a940ac8..0000000 --- a/voxvera/vendor/prompt_toolkit/formatted_text/html.py +++ /dev/null @@ -1,145 +0,0 @@ -from __future__ import annotations - -import xml.dom.minidom as minidom -from string import Formatter -from typing import Any - -from .base import FormattedText, StyleAndTextTuples - -__all__ = ["HTML"] - - -class HTML: - """ - HTML formatted text. - Take something HTML-like, for use as a formatted string. - - :: - - # Turn something into red. - HTML('') - - # Italic, bold, underline and strike. - HTML('...') - HTML('...') - HTML('...') - HTML('...') - - All HTML elements become available as a "class" in the style sheet. - E.g. ``...`` can be styled, by setting a style for - ``username``. - """ - - def __init__(self, value: str) -> None: - self.value = value - document = minidom.parseString(f"{value}") - - result: StyleAndTextTuples = [] - name_stack: list[str] = [] - fg_stack: list[str] = [] - bg_stack: list[str] = [] - - def get_current_style() -> str: - "Build style string for current node." - parts = [] - if name_stack: - parts.append("class:" + ",".join(name_stack)) - - if fg_stack: - parts.append("fg:" + fg_stack[-1]) - if bg_stack: - parts.append("bg:" + bg_stack[-1]) - return " ".join(parts) - - def process_node(node: Any) -> None: - "Process node recursively." - for child in node.childNodes: - if child.nodeType == child.TEXT_NODE: - result.append((get_current_style(), child.data)) - else: - add_to_name_stack = child.nodeName not in ( - "#document", - "html-root", - "style", - ) - fg = bg = "" - - for k, v in child.attributes.items(): - if k == "fg": - fg = v - if k == "bg": - bg = v - if k == "color": - fg = v # Alias for 'fg'. - - # Check for spaces in attributes. This would result in - # invalid style strings otherwise. - if " " in fg: - raise ValueError('"fg" attribute contains a space.') - if " " in bg: - raise ValueError('"bg" attribute contains a space.') - - if add_to_name_stack: - name_stack.append(child.nodeName) - if fg: - fg_stack.append(fg) - if bg: - bg_stack.append(bg) - - process_node(child) - - if add_to_name_stack: - name_stack.pop() - if fg: - fg_stack.pop() - if bg: - bg_stack.pop() - - process_node(document) - - self.formatted_text = FormattedText(result) - - def __repr__(self) -> str: - return f"HTML({self.value!r})" - - def __pt_formatted_text__(self) -> StyleAndTextTuples: - return self.formatted_text - - def format(self, *args: object, **kwargs: object) -> HTML: - """ - Like `str.format`, but make sure that the arguments are properly - escaped. - """ - return HTML(FORMATTER.vformat(self.value, args, kwargs)) - - def __mod__(self, value: object) -> HTML: - """ - HTML('%s') % value - """ - if not isinstance(value, tuple): - value = (value,) - - value = tuple(html_escape(i) for i in value) - return HTML(self.value % value) - - -class HTMLFormatter(Formatter): - def format_field(self, value: object, format_spec: str) -> str: - return html_escape(format(value, format_spec)) - - -def html_escape(text: object) -> str: - # The string interpolation functions also take integers and other types. - # Convert to string first. - if not isinstance(text, str): - text = f"{text}" - - return ( - text.replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace('"', """) - ) - - -FORMATTER = HTMLFormatter() diff --git a/voxvera/vendor/prompt_toolkit/formatted_text/pygments.py b/voxvera/vendor/prompt_toolkit/formatted_text/pygments.py deleted file mode 100644 index d4ef3ad..0000000 --- a/voxvera/vendor/prompt_toolkit/formatted_text/pygments.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING - -from prompt_toolkit.styles.pygments import pygments_token_to_classname - -from .base import StyleAndTextTuples - -if TYPE_CHECKING: - from pygments.token import Token - -__all__ = [ - "PygmentsTokens", -] - - -class PygmentsTokens: - """ - Turn a pygments token list into a list of prompt_toolkit text fragments - (``(style_str, text)`` tuples). - """ - - def __init__(self, token_list: list[tuple[Token, str]]) -> None: - self.token_list = token_list - - def __pt_formatted_text__(self) -> StyleAndTextTuples: - result: StyleAndTextTuples = [] - - for token, text in self.token_list: - result.append(("class:" + pygments_token_to_classname(token), text)) - - return result diff --git a/voxvera/vendor/prompt_toolkit/formatted_text/utils.py b/voxvera/vendor/prompt_toolkit/formatted_text/utils.py deleted file mode 100644 index a6f78cb..0000000 --- a/voxvera/vendor/prompt_toolkit/formatted_text/utils.py +++ /dev/null @@ -1,102 +0,0 @@ -""" -Utilities for manipulating formatted text. - -When ``to_formatted_text`` has been called, we get a list of ``(style, text)`` -tuples. This file contains functions for manipulating such a list. -""" - -from __future__ import annotations - -from typing import Iterable, cast - -from prompt_toolkit.utils import get_cwidth - -from .base import ( - AnyFormattedText, - OneStyleAndTextTuple, - StyleAndTextTuples, - to_formatted_text, -) - -__all__ = [ - "to_plain_text", - "fragment_list_len", - "fragment_list_width", - "fragment_list_to_text", - "split_lines", -] - - -def to_plain_text(value: AnyFormattedText) -> str: - """ - Turn any kind of formatted text back into plain text. - """ - return fragment_list_to_text(to_formatted_text(value)) - - -def fragment_list_len(fragments: StyleAndTextTuples) -> int: - """ - Return the amount of characters in this text fragment list. - - :param fragments: List of ``(style_str, text)`` or - ``(style_str, text, mouse_handler)`` tuples. - """ - ZeroWidthEscape = "[ZeroWidthEscape]" - return sum(len(item[1]) for item in fragments if ZeroWidthEscape not in item[0]) - - -def fragment_list_width(fragments: StyleAndTextTuples) -> int: - """ - Return the character width of this text fragment list. - (Take double width characters into account.) - - :param fragments: List of ``(style_str, text)`` or - ``(style_str, text, mouse_handler)`` tuples. - """ - ZeroWidthEscape = "[ZeroWidthEscape]" - return sum( - get_cwidth(c) - for item in fragments - for c in item[1] - if ZeroWidthEscape not in item[0] - ) - - -def fragment_list_to_text(fragments: StyleAndTextTuples) -> str: - """ - Concatenate all the text parts again. - - :param fragments: List of ``(style_str, text)`` or - ``(style_str, text, mouse_handler)`` tuples. - """ - ZeroWidthEscape = "[ZeroWidthEscape]" - return "".join(item[1] for item in fragments if ZeroWidthEscape not in item[0]) - - -def split_lines( - fragments: Iterable[OneStyleAndTextTuple], -) -> Iterable[StyleAndTextTuples]: - """ - Take a single list of (style_str, text) tuples and yield one such list for each - line. Just like str.split, this will yield at least one item. - - :param fragments: Iterable of ``(style_str, text)`` or - ``(style_str, text, mouse_handler)`` tuples. - """ - line: StyleAndTextTuples = [] - - for style, string, *mouse_handler in fragments: - parts = string.split("\n") - - for part in parts[:-1]: - line.append(cast(OneStyleAndTextTuple, (style, part, *mouse_handler))) - yield line - line = [] - - line.append(cast(OneStyleAndTextTuple, (style, parts[-1], *mouse_handler))) - - # Always yield the last line, even when this is an empty line. This ensures - # that when `fragments` ends with a newline character, an additional empty - # line is yielded. (Otherwise, there's no way to differentiate between the - # cases where `fragments` does and doesn't end with a newline.) - yield line diff --git a/voxvera/vendor/prompt_toolkit/history.py b/voxvera/vendor/prompt_toolkit/history.py deleted file mode 100644 index 2d497a0..0000000 --- a/voxvera/vendor/prompt_toolkit/history.py +++ /dev/null @@ -1,306 +0,0 @@ -""" -Implementations for the history of a `Buffer`. - -NOTE: There is no `DynamicHistory`: - This doesn't work well, because the `Buffer` needs to be able to attach - an event handler to the event when a history entry is loaded. This - loading can be done asynchronously and making the history swappable would - probably break this. -""" - -from __future__ import annotations - -import datetime -import os -import threading -from abc import ABCMeta, abstractmethod -from asyncio import get_running_loop -from typing import AsyncGenerator, Iterable, Sequence, Union - -__all__ = [ - "History", - "ThreadedHistory", - "DummyHistory", - "FileHistory", - "InMemoryHistory", -] - - -class History(metaclass=ABCMeta): - """ - Base ``History`` class. - - This also includes abstract methods for loading/storing history. - """ - - def __init__(self) -> None: - # In memory storage for strings. - self._loaded = False - - # History that's loaded already, in reverse order. Latest, most recent - # item first. - self._loaded_strings: list[str] = [] - - # - # Methods expected by `Buffer`. - # - - async def load(self) -> AsyncGenerator[str, None]: - """ - Load the history and yield all the entries in reverse order (latest, - most recent history entry first). - - This method can be called multiple times from the `Buffer` to - repopulate the history when prompting for a new input. So we are - responsible here for both caching, and making sure that strings that - were were appended to the history will be incorporated next time this - method is called. - """ - if not self._loaded: - self._loaded_strings = list(self.load_history_strings()) - self._loaded = True - - for item in self._loaded_strings: - yield item - - def get_strings(self) -> list[str]: - """ - Get the strings from the history that are loaded so far. - (In order. Oldest item first.) - """ - return self._loaded_strings[::-1] - - def append_string(self, string: str) -> None: - "Add string to the history." - self._loaded_strings.insert(0, string) - self.store_string(string) - - # - # Implementation for specific backends. - # - - @abstractmethod - def load_history_strings(self) -> Iterable[str]: - """ - This should be a generator that yields `str` instances. - - It should yield the most recent items first, because they are the most - important. (The history can already be used, even when it's only - partially loaded.) - """ - while False: - yield - - @abstractmethod - def store_string(self, string: str) -> None: - """ - Store the string in persistent storage. - """ - - -class ThreadedHistory(History): - """ - Wrapper around `History` implementations that run the `load()` generator in - a thread. - - Use this to increase the start-up time of prompt_toolkit applications. - History entries are available as soon as they are loaded. We don't have to - wait for everything to be loaded. - """ - - def __init__(self, history: History) -> None: - super().__init__() - - self.history = history - - self._load_thread: threading.Thread | None = None - - # Lock for accessing/manipulating `_loaded_strings` and `_loaded` - # together in a consistent state. - self._lock = threading.Lock() - - # Events created by each `load()` call. Used to wait for new history - # entries from the loader thread. - self._string_load_events: list[threading.Event] = [] - - async def load(self) -> AsyncGenerator[str, None]: - """ - Like `History.load(), but call `self.load_history_strings()` in a - background thread. - """ - # Start the load thread, if this is called for the first time. - if not self._load_thread: - self._load_thread = threading.Thread( - target=self._in_load_thread, - daemon=True, - ) - self._load_thread.start() - - # Consume the `_loaded_strings` list, using asyncio. - loop = get_running_loop() - - # Create threading Event so that we can wait for new items. - event = threading.Event() - event.set() - self._string_load_events.append(event) - - items_yielded = 0 - - try: - while True: - # Wait for new items to be available. - # (Use a timeout, because the executor thread is not a daemon - # thread. The "slow-history.py" example would otherwise hang if - # Control-C is pressed before the history is fully loaded, - # because there's still this non-daemon executor thread waiting - # for this event.) - got_timeout = await loop.run_in_executor( - None, lambda: event.wait(timeout=0.5) - ) - if not got_timeout: - continue - - # Read new items (in lock). - def in_executor() -> tuple[list[str], bool]: - with self._lock: - new_items = self._loaded_strings[items_yielded:] - done = self._loaded - event.clear() - return new_items, done - - new_items, done = await loop.run_in_executor(None, in_executor) - - items_yielded += len(new_items) - - for item in new_items: - yield item - - if done: - break - finally: - self._string_load_events.remove(event) - - def _in_load_thread(self) -> None: - try: - # Start with an empty list. In case `append_string()` was called - # before `load()` happened. Then `.store_string()` will have - # written these entries back to disk and we will reload it. - self._loaded_strings = [] - - for item in self.history.load_history_strings(): - with self._lock: - self._loaded_strings.append(item) - - for event in self._string_load_events: - event.set() - finally: - with self._lock: - self._loaded = True - for event in self._string_load_events: - event.set() - - def append_string(self, string: str) -> None: - with self._lock: - self._loaded_strings.insert(0, string) - self.store_string(string) - - # All of the following are proxied to `self.history`. - - def load_history_strings(self) -> Iterable[str]: - return self.history.load_history_strings() - - def store_string(self, string: str) -> None: - self.history.store_string(string) - - def __repr__(self) -> str: - return f"ThreadedHistory({self.history!r})" - - -class InMemoryHistory(History): - """ - :class:`.History` class that keeps a list of all strings in memory. - - In order to prepopulate the history, it's possible to call either - `append_string` for all items or pass a list of strings to `__init__` here. - """ - - def __init__(self, history_strings: Sequence[str] | None = None) -> None: - super().__init__() - # Emulating disk storage. - if history_strings is None: - self._storage = [] - else: - self._storage = list(history_strings) - - def load_history_strings(self) -> Iterable[str]: - yield from self._storage[::-1] - - def store_string(self, string: str) -> None: - self._storage.append(string) - - -class DummyHistory(History): - """ - :class:`.History` object that doesn't remember anything. - """ - - def load_history_strings(self) -> Iterable[str]: - return [] - - def store_string(self, string: str) -> None: - pass - - def append_string(self, string: str) -> None: - # Don't remember this. - pass - - -_StrOrBytesPath = Union[str, bytes, "os.PathLike[str]", "os.PathLike[bytes]"] - - -class FileHistory(History): - """ - :class:`.History` class that stores all strings in a file. - """ - - def __init__(self, filename: _StrOrBytesPath) -> None: - self.filename = filename - super().__init__() - - def load_history_strings(self) -> Iterable[str]: - strings: list[str] = [] - lines: list[str] = [] - - def add() -> None: - if lines: - # Join and drop trailing newline. - string = "".join(lines)[:-1] - - strings.append(string) - - if os.path.exists(self.filename): - with open(self.filename, "rb") as f: - for line_bytes in f: - line = line_bytes.decode("utf-8", errors="replace") - - if line.startswith("+"): - lines.append(line[1:]) - else: - add() - lines = [] - - add() - - # Reverse the order, because newest items have to go first. - return reversed(strings) - - def store_string(self, string: str) -> None: - # Save to file. - with open(self.filename, "ab") as f: - - def write(t: str) -> None: - f.write(t.encode("utf-8")) - - write(f"\n# {datetime.datetime.now()}\n") - for line in string.split("\n"): - write(f"+{line}\n") diff --git a/voxvera/vendor/prompt_toolkit/input/__init__.py b/voxvera/vendor/prompt_toolkit/input/__init__.py deleted file mode 100644 index ed8631b..0000000 --- a/voxvera/vendor/prompt_toolkit/input/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import annotations - -from .base import DummyInput, Input, PipeInput -from .defaults import create_input, create_pipe_input - -__all__ = [ - # Base. - "Input", - "PipeInput", - "DummyInput", - # Defaults. - "create_input", - "create_pipe_input", -] diff --git a/voxvera/vendor/prompt_toolkit/input/ansi_escape_sequences.py b/voxvera/vendor/prompt_toolkit/input/ansi_escape_sequences.py deleted file mode 100644 index 1fba418..0000000 --- a/voxvera/vendor/prompt_toolkit/input/ansi_escape_sequences.py +++ /dev/null @@ -1,344 +0,0 @@ -""" -Mappings from VT100 (ANSI) escape sequences to the corresponding prompt_toolkit -keys. - -We are not using the terminfo/termcap databases to detect the ANSI escape -sequences for the input. Instead, we recognize 99% of the most common -sequences. This works well, because in practice, every modern terminal is -mostly Xterm compatible. - -Some useful docs: -- Mintty: https://github.com/mintty/mintty/blob/master/wiki/Keycodes.md -""" - -from __future__ import annotations - -from ..keys import Keys - -__all__ = [ - "ANSI_SEQUENCES", - "REVERSE_ANSI_SEQUENCES", -] - -# Mapping of vt100 escape codes to Keys. -ANSI_SEQUENCES: dict[str, Keys | tuple[Keys, ...]] = { - # Control keys. - "\x00": Keys.ControlAt, # Control-At (Also for Ctrl-Space) - "\x01": Keys.ControlA, # Control-A (home) - "\x02": Keys.ControlB, # Control-B (emacs cursor left) - "\x03": Keys.ControlC, # Control-C (interrupt) - "\x04": Keys.ControlD, # Control-D (exit) - "\x05": Keys.ControlE, # Control-E (end) - "\x06": Keys.ControlF, # Control-F (cursor forward) - "\x07": Keys.ControlG, # Control-G - "\x08": Keys.ControlH, # Control-H (8) (Identical to '\b') - "\x09": Keys.ControlI, # Control-I (9) (Identical to '\t') - "\x0a": Keys.ControlJ, # Control-J (10) (Identical to '\n') - "\x0b": Keys.ControlK, # Control-K (delete until end of line; vertical tab) - "\x0c": Keys.ControlL, # Control-L (clear; form feed) - "\x0d": Keys.ControlM, # Control-M (13) (Identical to '\r') - "\x0e": Keys.ControlN, # Control-N (14) (history forward) - "\x0f": Keys.ControlO, # Control-O (15) - "\x10": Keys.ControlP, # Control-P (16) (history back) - "\x11": Keys.ControlQ, # Control-Q - "\x12": Keys.ControlR, # Control-R (18) (reverse search) - "\x13": Keys.ControlS, # Control-S (19) (forward search) - "\x14": Keys.ControlT, # Control-T - "\x15": Keys.ControlU, # Control-U - "\x16": Keys.ControlV, # Control-V - "\x17": Keys.ControlW, # Control-W - "\x18": Keys.ControlX, # Control-X - "\x19": Keys.ControlY, # Control-Y (25) - "\x1a": Keys.ControlZ, # Control-Z - "\x1b": Keys.Escape, # Also Control-[ - "\x9b": Keys.ShiftEscape, - "\x1c": Keys.ControlBackslash, # Both Control-\ (also Ctrl-| ) - "\x1d": Keys.ControlSquareClose, # Control-] - "\x1e": Keys.ControlCircumflex, # Control-^ - "\x1f": Keys.ControlUnderscore, # Control-underscore (Also for Ctrl-hyphen.) - # ASCII Delete (0x7f) - # Vt220 (and Linux terminal) send this when pressing backspace. We map this - # to ControlH, because that will make it easier to create key bindings that - # work everywhere, with the trade-off that it's no longer possible to - # handle backspace and control-h individually for the few terminals that - # support it. (Most terminals send ControlH when backspace is pressed.) - # See: http://www.ibb.net/~anne/keyboard.html - "\x7f": Keys.ControlH, - # -- - # Various - "\x1b[1~": Keys.Home, # tmux - "\x1b[2~": Keys.Insert, - "\x1b[3~": Keys.Delete, - "\x1b[4~": Keys.End, # tmux - "\x1b[5~": Keys.PageUp, - "\x1b[6~": Keys.PageDown, - "\x1b[7~": Keys.Home, # xrvt - "\x1b[8~": Keys.End, # xrvt - "\x1b[Z": Keys.BackTab, # shift + tab - "\x1b\x09": Keys.BackTab, # Linux console - "\x1b[~": Keys.BackTab, # Windows console - # -- - # Function keys. - "\x1bOP": Keys.F1, - "\x1bOQ": Keys.F2, - "\x1bOR": Keys.F3, - "\x1bOS": Keys.F4, - "\x1b[[A": Keys.F1, # Linux console. - "\x1b[[B": Keys.F2, # Linux console. - "\x1b[[C": Keys.F3, # Linux console. - "\x1b[[D": Keys.F4, # Linux console. - "\x1b[[E": Keys.F5, # Linux console. - "\x1b[11~": Keys.F1, # rxvt-unicode - "\x1b[12~": Keys.F2, # rxvt-unicode - "\x1b[13~": Keys.F3, # rxvt-unicode - "\x1b[14~": Keys.F4, # rxvt-unicode - "\x1b[15~": Keys.F5, - "\x1b[17~": Keys.F6, - "\x1b[18~": Keys.F7, - "\x1b[19~": Keys.F8, - "\x1b[20~": Keys.F9, - "\x1b[21~": Keys.F10, - "\x1b[23~": Keys.F11, - "\x1b[24~": Keys.F12, - "\x1b[25~": Keys.F13, - "\x1b[26~": Keys.F14, - "\x1b[28~": Keys.F15, - "\x1b[29~": Keys.F16, - "\x1b[31~": Keys.F17, - "\x1b[32~": Keys.F18, - "\x1b[33~": Keys.F19, - "\x1b[34~": Keys.F20, - # Xterm - "\x1b[1;2P": Keys.F13, - "\x1b[1;2Q": Keys.F14, - # '\x1b[1;2R': Keys.F15, # Conflicts with CPR response. - "\x1b[1;2S": Keys.F16, - "\x1b[15;2~": Keys.F17, - "\x1b[17;2~": Keys.F18, - "\x1b[18;2~": Keys.F19, - "\x1b[19;2~": Keys.F20, - "\x1b[20;2~": Keys.F21, - "\x1b[21;2~": Keys.F22, - "\x1b[23;2~": Keys.F23, - "\x1b[24;2~": Keys.F24, - # -- - # CSI 27 disambiguated modified "other" keys (xterm) - # Ref: https://invisible-island.net/xterm/modified-keys.html - # These are currently unsupported, so just re-map some common ones to the - # unmodified versions - "\x1b[27;2;13~": Keys.ControlM, # Shift + Enter - "\x1b[27;5;13~": Keys.ControlM, # Ctrl + Enter - "\x1b[27;6;13~": Keys.ControlM, # Ctrl + Shift + Enter - # -- - # Control + function keys. - "\x1b[1;5P": Keys.ControlF1, - "\x1b[1;5Q": Keys.ControlF2, - # "\x1b[1;5R": Keys.ControlF3, # Conflicts with CPR response. - "\x1b[1;5S": Keys.ControlF4, - "\x1b[15;5~": Keys.ControlF5, - "\x1b[17;5~": Keys.ControlF6, - "\x1b[18;5~": Keys.ControlF7, - "\x1b[19;5~": Keys.ControlF8, - "\x1b[20;5~": Keys.ControlF9, - "\x1b[21;5~": Keys.ControlF10, - "\x1b[23;5~": Keys.ControlF11, - "\x1b[24;5~": Keys.ControlF12, - "\x1b[1;6P": Keys.ControlF13, - "\x1b[1;6Q": Keys.ControlF14, - # "\x1b[1;6R": Keys.ControlF15, # Conflicts with CPR response. - "\x1b[1;6S": Keys.ControlF16, - "\x1b[15;6~": Keys.ControlF17, - "\x1b[17;6~": Keys.ControlF18, - "\x1b[18;6~": Keys.ControlF19, - "\x1b[19;6~": Keys.ControlF20, - "\x1b[20;6~": Keys.ControlF21, - "\x1b[21;6~": Keys.ControlF22, - "\x1b[23;6~": Keys.ControlF23, - "\x1b[24;6~": Keys.ControlF24, - # -- - # Tmux (Win32 subsystem) sends the following scroll events. - "\x1b[62~": Keys.ScrollUp, - "\x1b[63~": Keys.ScrollDown, - "\x1b[200~": Keys.BracketedPaste, # Start of bracketed paste. - # -- - # Sequences generated by numpad 5. Not sure what it means. (It doesn't - # appear in 'infocmp'. Just ignore. - "\x1b[E": Keys.Ignore, # Xterm. - "\x1b[G": Keys.Ignore, # Linux console. - # -- - # Meta/control/escape + pageup/pagedown/insert/delete. - "\x1b[3;2~": Keys.ShiftDelete, # xterm, gnome-terminal. - "\x1b[5;2~": Keys.ShiftPageUp, - "\x1b[6;2~": Keys.ShiftPageDown, - "\x1b[2;3~": (Keys.Escape, Keys.Insert), - "\x1b[3;3~": (Keys.Escape, Keys.Delete), - "\x1b[5;3~": (Keys.Escape, Keys.PageUp), - "\x1b[6;3~": (Keys.Escape, Keys.PageDown), - "\x1b[2;4~": (Keys.Escape, Keys.ShiftInsert), - "\x1b[3;4~": (Keys.Escape, Keys.ShiftDelete), - "\x1b[5;4~": (Keys.Escape, Keys.ShiftPageUp), - "\x1b[6;4~": (Keys.Escape, Keys.ShiftPageDown), - "\x1b[3;5~": Keys.ControlDelete, # xterm, gnome-terminal. - "\x1b[5;5~": Keys.ControlPageUp, - "\x1b[6;5~": Keys.ControlPageDown, - "\x1b[3;6~": Keys.ControlShiftDelete, - "\x1b[5;6~": Keys.ControlShiftPageUp, - "\x1b[6;6~": Keys.ControlShiftPageDown, - "\x1b[2;7~": (Keys.Escape, Keys.ControlInsert), - "\x1b[5;7~": (Keys.Escape, Keys.ControlPageDown), - "\x1b[6;7~": (Keys.Escape, Keys.ControlPageDown), - "\x1b[2;8~": (Keys.Escape, Keys.ControlShiftInsert), - "\x1b[5;8~": (Keys.Escape, Keys.ControlShiftPageDown), - "\x1b[6;8~": (Keys.Escape, Keys.ControlShiftPageDown), - # -- - # Arrows. - # (Normal cursor mode). - "\x1b[A": Keys.Up, - "\x1b[B": Keys.Down, - "\x1b[C": Keys.Right, - "\x1b[D": Keys.Left, - "\x1b[H": Keys.Home, - "\x1b[F": Keys.End, - # Tmux sends following keystrokes when control+arrow is pressed, but for - # Emacs ansi-term sends the same sequences for normal arrow keys. Consider - # it a normal arrow press, because that's more important. - # (Application cursor mode). - "\x1bOA": Keys.Up, - "\x1bOB": Keys.Down, - "\x1bOC": Keys.Right, - "\x1bOD": Keys.Left, - "\x1bOF": Keys.End, - "\x1bOH": Keys.Home, - # Shift + arrows. - "\x1b[1;2A": Keys.ShiftUp, - "\x1b[1;2B": Keys.ShiftDown, - "\x1b[1;2C": Keys.ShiftRight, - "\x1b[1;2D": Keys.ShiftLeft, - "\x1b[1;2F": Keys.ShiftEnd, - "\x1b[1;2H": Keys.ShiftHome, - # Meta + arrow keys. Several terminals handle this differently. - # The following sequences are for xterm and gnome-terminal. - # (Iterm sends ESC followed by the normal arrow_up/down/left/right - # sequences, and the OSX Terminal sends ESCb and ESCf for "alt - # arrow_left" and "alt arrow_right." We don't handle these - # explicitly, in here, because would could not distinguish between - # pressing ESC (to go to Vi navigation mode), followed by just the - # 'b' or 'f' key. These combinations are handled in - # the input processor.) - "\x1b[1;3A": (Keys.Escape, Keys.Up), - "\x1b[1;3B": (Keys.Escape, Keys.Down), - "\x1b[1;3C": (Keys.Escape, Keys.Right), - "\x1b[1;3D": (Keys.Escape, Keys.Left), - "\x1b[1;3F": (Keys.Escape, Keys.End), - "\x1b[1;3H": (Keys.Escape, Keys.Home), - # Alt+shift+number. - "\x1b[1;4A": (Keys.Escape, Keys.ShiftDown), - "\x1b[1;4B": (Keys.Escape, Keys.ShiftUp), - "\x1b[1;4C": (Keys.Escape, Keys.ShiftRight), - "\x1b[1;4D": (Keys.Escape, Keys.ShiftLeft), - "\x1b[1;4F": (Keys.Escape, Keys.ShiftEnd), - "\x1b[1;4H": (Keys.Escape, Keys.ShiftHome), - # Control + arrows. - "\x1b[1;5A": Keys.ControlUp, # Cursor Mode - "\x1b[1;5B": Keys.ControlDown, # Cursor Mode - "\x1b[1;5C": Keys.ControlRight, # Cursor Mode - "\x1b[1;5D": Keys.ControlLeft, # Cursor Mode - "\x1b[1;5F": Keys.ControlEnd, - "\x1b[1;5H": Keys.ControlHome, - # Tmux sends following keystrokes when control+arrow is pressed, but for - # Emacs ansi-term sends the same sequences for normal arrow keys. Consider - # it a normal arrow press, because that's more important. - "\x1b[5A": Keys.ControlUp, - "\x1b[5B": Keys.ControlDown, - "\x1b[5C": Keys.ControlRight, - "\x1b[5D": Keys.ControlLeft, - "\x1bOc": Keys.ControlRight, # rxvt - "\x1bOd": Keys.ControlLeft, # rxvt - # Control + shift + arrows. - "\x1b[1;6A": Keys.ControlShiftDown, - "\x1b[1;6B": Keys.ControlShiftUp, - "\x1b[1;6C": Keys.ControlShiftRight, - "\x1b[1;6D": Keys.ControlShiftLeft, - "\x1b[1;6F": Keys.ControlShiftEnd, - "\x1b[1;6H": Keys.ControlShiftHome, - # Control + Meta + arrows. - "\x1b[1;7A": (Keys.Escape, Keys.ControlDown), - "\x1b[1;7B": (Keys.Escape, Keys.ControlUp), - "\x1b[1;7C": (Keys.Escape, Keys.ControlRight), - "\x1b[1;7D": (Keys.Escape, Keys.ControlLeft), - "\x1b[1;7F": (Keys.Escape, Keys.ControlEnd), - "\x1b[1;7H": (Keys.Escape, Keys.ControlHome), - # Meta + Shift + arrows. - "\x1b[1;8A": (Keys.Escape, Keys.ControlShiftDown), - "\x1b[1;8B": (Keys.Escape, Keys.ControlShiftUp), - "\x1b[1;8C": (Keys.Escape, Keys.ControlShiftRight), - "\x1b[1;8D": (Keys.Escape, Keys.ControlShiftLeft), - "\x1b[1;8F": (Keys.Escape, Keys.ControlShiftEnd), - "\x1b[1;8H": (Keys.Escape, Keys.ControlShiftHome), - # Meta + arrow on (some?) Macs when using iTerm defaults (see issue #483). - "\x1b[1;9A": (Keys.Escape, Keys.Up), - "\x1b[1;9B": (Keys.Escape, Keys.Down), - "\x1b[1;9C": (Keys.Escape, Keys.Right), - "\x1b[1;9D": (Keys.Escape, Keys.Left), - # -- - # Control/shift/meta + number in mintty. - # (c-2 will actually send c-@ and c-6 will send c-^.) - "\x1b[1;5p": Keys.Control0, - "\x1b[1;5q": Keys.Control1, - "\x1b[1;5r": Keys.Control2, - "\x1b[1;5s": Keys.Control3, - "\x1b[1;5t": Keys.Control4, - "\x1b[1;5u": Keys.Control5, - "\x1b[1;5v": Keys.Control6, - "\x1b[1;5w": Keys.Control7, - "\x1b[1;5x": Keys.Control8, - "\x1b[1;5y": Keys.Control9, - "\x1b[1;6p": Keys.ControlShift0, - "\x1b[1;6q": Keys.ControlShift1, - "\x1b[1;6r": Keys.ControlShift2, - "\x1b[1;6s": Keys.ControlShift3, - "\x1b[1;6t": Keys.ControlShift4, - "\x1b[1;6u": Keys.ControlShift5, - "\x1b[1;6v": Keys.ControlShift6, - "\x1b[1;6w": Keys.ControlShift7, - "\x1b[1;6x": Keys.ControlShift8, - "\x1b[1;6y": Keys.ControlShift9, - "\x1b[1;7p": (Keys.Escape, Keys.Control0), - "\x1b[1;7q": (Keys.Escape, Keys.Control1), - "\x1b[1;7r": (Keys.Escape, Keys.Control2), - "\x1b[1;7s": (Keys.Escape, Keys.Control3), - "\x1b[1;7t": (Keys.Escape, Keys.Control4), - "\x1b[1;7u": (Keys.Escape, Keys.Control5), - "\x1b[1;7v": (Keys.Escape, Keys.Control6), - "\x1b[1;7w": (Keys.Escape, Keys.Control7), - "\x1b[1;7x": (Keys.Escape, Keys.Control8), - "\x1b[1;7y": (Keys.Escape, Keys.Control9), - "\x1b[1;8p": (Keys.Escape, Keys.ControlShift0), - "\x1b[1;8q": (Keys.Escape, Keys.ControlShift1), - "\x1b[1;8r": (Keys.Escape, Keys.ControlShift2), - "\x1b[1;8s": (Keys.Escape, Keys.ControlShift3), - "\x1b[1;8t": (Keys.Escape, Keys.ControlShift4), - "\x1b[1;8u": (Keys.Escape, Keys.ControlShift5), - "\x1b[1;8v": (Keys.Escape, Keys.ControlShift6), - "\x1b[1;8w": (Keys.Escape, Keys.ControlShift7), - "\x1b[1;8x": (Keys.Escape, Keys.ControlShift8), - "\x1b[1;8y": (Keys.Escape, Keys.ControlShift9), -} - - -def _get_reverse_ansi_sequences() -> dict[Keys, str]: - """ - Create a dictionary that maps prompt_toolkit keys back to the VT100 escape - sequences. - """ - result: dict[Keys, str] = {} - - for sequence, key in ANSI_SEQUENCES.items(): - if not isinstance(key, tuple): - if key not in result: - result[key] = sequence - - return result - - -REVERSE_ANSI_SEQUENCES = _get_reverse_ansi_sequences() diff --git a/voxvera/vendor/prompt_toolkit/input/base.py b/voxvera/vendor/prompt_toolkit/input/base.py deleted file mode 100644 index 40ffd9d..0000000 --- a/voxvera/vendor/prompt_toolkit/input/base.py +++ /dev/null @@ -1,154 +0,0 @@ -""" -Abstraction of CLI Input. -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from contextlib import contextmanager -from typing import Callable, ContextManager, Generator - -from prompt_toolkit.key_binding import KeyPress - -__all__ = [ - "Input", - "PipeInput", - "DummyInput", -] - - -class Input(metaclass=ABCMeta): - """ - Abstraction for any input. - - An instance of this class can be given to the constructor of a - :class:`~prompt_toolkit.application.Application` and will also be - passed to the :class:`~prompt_toolkit.eventloop.base.EventLoop`. - """ - - @abstractmethod - def fileno(self) -> int: - """ - Fileno for putting this in an event loop. - """ - - @abstractmethod - def typeahead_hash(self) -> str: - """ - Identifier for storing type ahead key presses. - """ - - @abstractmethod - def read_keys(self) -> list[KeyPress]: - """ - Return a list of Key objects which are read/parsed from the input. - """ - - def flush_keys(self) -> list[KeyPress]: - """ - Flush the underlying parser. and return the pending keys. - (Used for vt100 input.) - """ - return [] - - def flush(self) -> None: - "The event loop can call this when the input has to be flushed." - pass - - @property - @abstractmethod - def closed(self) -> bool: - "Should be true when the input stream is closed." - return False - - @abstractmethod - def raw_mode(self) -> ContextManager[None]: - """ - Context manager that turns the input into raw mode. - """ - - @abstractmethod - def cooked_mode(self) -> ContextManager[None]: - """ - Context manager that turns the input into cooked mode. - """ - - @abstractmethod - def attach(self, input_ready_callback: Callable[[], None]) -> ContextManager[None]: - """ - Return a context manager that makes this input active in the current - event loop. - """ - - @abstractmethod - def detach(self) -> ContextManager[None]: - """ - Return a context manager that makes sure that this input is not active - in the current event loop. - """ - - def close(self) -> None: - "Close input." - pass - - -class PipeInput(Input): - """ - Abstraction for pipe input. - """ - - @abstractmethod - def send_bytes(self, data: bytes) -> None: - """Feed byte string into the pipe""" - - @abstractmethod - def send_text(self, data: str) -> None: - """Feed a text string into the pipe""" - - -class DummyInput(Input): - """ - Input for use in a `DummyApplication` - - If used in an actual application, it will make the application render - itself once and exit immediately, due to an `EOFError`. - """ - - def fileno(self) -> int: - raise NotImplementedError - - def typeahead_hash(self) -> str: - return f"dummy-{id(self)}" - - def read_keys(self) -> list[KeyPress]: - return [] - - @property - def closed(self) -> bool: - # This needs to be true, so that the dummy input will trigger an - # `EOFError` immediately in the application. - return True - - def raw_mode(self) -> ContextManager[None]: - return _dummy_context_manager() - - def cooked_mode(self) -> ContextManager[None]: - return _dummy_context_manager() - - def attach(self, input_ready_callback: Callable[[], None]) -> ContextManager[None]: - # Call the callback immediately once after attaching. - # This tells the callback to call `read_keys` and check the - # `input.closed` flag, after which it won't receive any keys, but knows - # that `EOFError` should be raised. This unblocks `read_from_input` in - # `application.py`. - input_ready_callback() - - return _dummy_context_manager() - - def detach(self) -> ContextManager[None]: - return _dummy_context_manager() - - -@contextmanager -def _dummy_context_manager() -> Generator[None, None, None]: - yield diff --git a/voxvera/vendor/prompt_toolkit/input/defaults.py b/voxvera/vendor/prompt_toolkit/input/defaults.py deleted file mode 100644 index 483eeb2..0000000 --- a/voxvera/vendor/prompt_toolkit/input/defaults.py +++ /dev/null @@ -1,79 +0,0 @@ -from __future__ import annotations - -import io -import sys -from typing import ContextManager, TextIO - -from .base import DummyInput, Input, PipeInput - -__all__ = [ - "create_input", - "create_pipe_input", -] - - -def create_input(stdin: TextIO | None = None, always_prefer_tty: bool = False) -> Input: - """ - Create the appropriate `Input` object for the current os/environment. - - :param always_prefer_tty: When set, if `sys.stdin` is connected to a Unix - `pipe`, check whether `sys.stdout` or `sys.stderr` are connected to a - pseudo terminal. If so, open the tty for reading instead of reading for - `sys.stdin`. (We can open `stdout` or `stderr` for reading, this is how - a `$PAGER` works.) - """ - if sys.platform == "win32": - from .win32 import Win32Input - - # If `stdin` was assigned `None` (which happens with pythonw.exe), use - # a `DummyInput`. This triggers `EOFError` in the application code. - if stdin is None and sys.stdin is None: - return DummyInput() - - return Win32Input(stdin or sys.stdin) - else: - from .vt100 import Vt100Input - - # If no input TextIO is given, use stdin/stdout. - if stdin is None: - stdin = sys.stdin - - if always_prefer_tty: - for obj in [sys.stdin, sys.stdout, sys.stderr]: - if obj.isatty(): - stdin = obj - break - - # If we can't access the file descriptor for the selected stdin, return - # a `DummyInput` instead. This can happen for instance in unit tests, - # when `sys.stdin` is patched by something that's not an actual file. - # (Instantiating `Vt100Input` would fail in this case.) - try: - stdin.fileno() - except io.UnsupportedOperation: - return DummyInput() - - return Vt100Input(stdin) - - -def create_pipe_input() -> ContextManager[PipeInput]: - """ - Create an input pipe. - This is mostly useful for unit testing. - - Usage:: - - with create_pipe_input() as input: - input.send_text('inputdata') - - Breaking change: In prompt_toolkit 3.0.28 and earlier, this was returning - the `PipeInput` directly, rather than through a context manager. - """ - if sys.platform == "win32": - from .win32_pipe import Win32PipeInput - - return Win32PipeInput.create() - else: - from .posix_pipe import PosixPipeInput - - return PosixPipeInput.create() diff --git a/voxvera/vendor/prompt_toolkit/input/posix_pipe.py b/voxvera/vendor/prompt_toolkit/input/posix_pipe.py deleted file mode 100644 index c131fb8..0000000 --- a/voxvera/vendor/prompt_toolkit/input/posix_pipe.py +++ /dev/null @@ -1,118 +0,0 @@ -from __future__ import annotations - -import sys - -assert sys.platform != "win32" - -import os -from contextlib import contextmanager -from typing import ContextManager, Iterator, TextIO, cast - -from ..utils import DummyContext -from .base import PipeInput -from .vt100 import Vt100Input - -__all__ = [ - "PosixPipeInput", -] - - -class _Pipe: - "Wrapper around os.pipe, that ensures we don't double close any end." - - def __init__(self) -> None: - self.read_fd, self.write_fd = os.pipe() - self._read_closed = False - self._write_closed = False - - def close_read(self) -> None: - "Close read-end if not yet closed." - if self._read_closed: - return - - os.close(self.read_fd) - self._read_closed = True - - def close_write(self) -> None: - "Close write-end if not yet closed." - if self._write_closed: - return - - os.close(self.write_fd) - self._write_closed = True - - def close(self) -> None: - "Close both read and write ends." - self.close_read() - self.close_write() - - -class PosixPipeInput(Vt100Input, PipeInput): - """ - Input that is send through a pipe. - This is useful if we want to send the input programmatically into the - application. Mostly useful for unit testing. - - Usage:: - - with PosixPipeInput.create() as input: - input.send_text('inputdata') - """ - - _id = 0 - - def __init__(self, _pipe: _Pipe, _text: str = "") -> None: - # Private constructor. Users should use the public `.create()` method. - self.pipe = _pipe - - class Stdin: - encoding = "utf-8" - - def isatty(stdin) -> bool: - return True - - def fileno(stdin) -> int: - return self.pipe.read_fd - - super().__init__(cast(TextIO, Stdin())) - self.send_text(_text) - - # Identifier for every PipeInput for the hash. - self.__class__._id += 1 - self._id = self.__class__._id - - @classmethod - @contextmanager - def create(cls, text: str = "") -> Iterator[PosixPipeInput]: - pipe = _Pipe() - try: - yield PosixPipeInput(_pipe=pipe, _text=text) - finally: - pipe.close() - - def send_bytes(self, data: bytes) -> None: - os.write(self.pipe.write_fd, data) - - def send_text(self, data: str) -> None: - "Send text to the input." - os.write(self.pipe.write_fd, data.encode("utf-8")) - - def raw_mode(self) -> ContextManager[None]: - return DummyContext() - - def cooked_mode(self) -> ContextManager[None]: - return DummyContext() - - def close(self) -> None: - "Close pipe fds." - # Only close the write-end of the pipe. This will unblock the reader - # callback (in vt100.py > _attached_input), which eventually will raise - # `EOFError`. If we'd also close the read-end, then the event loop - # won't wake up the corresponding callback because of this. - self.pipe.close_write() - - def typeahead_hash(self) -> str: - """ - This needs to be unique for every `PipeInput`. - """ - return f"pipe-input-{self._id}" diff --git a/voxvera/vendor/prompt_toolkit/input/posix_utils.py b/voxvera/vendor/prompt_toolkit/input/posix_utils.py deleted file mode 100644 index 4a78dc4..0000000 --- a/voxvera/vendor/prompt_toolkit/input/posix_utils.py +++ /dev/null @@ -1,97 +0,0 @@ -from __future__ import annotations - -import os -import select -from codecs import getincrementaldecoder - -__all__ = [ - "PosixStdinReader", -] - - -class PosixStdinReader: - """ - Wrapper around stdin which reads (nonblocking) the next available 1024 - bytes and decodes it. - - Note that you can't be sure that the input file is closed if the ``read`` - function returns an empty string. When ``errors=ignore`` is passed, - ``read`` can return an empty string if all malformed input was replaced by - an empty string. (We can't block here and wait for more input.) So, because - of that, check the ``closed`` attribute, to be sure that the file has been - closed. - - :param stdin_fd: File descriptor from which we read. - :param errors: Can be 'ignore', 'strict' or 'replace'. - On Python3, this can be 'surrogateescape', which is the default. - - 'surrogateescape' is preferred, because this allows us to transfer - unrecognized bytes to the key bindings. Some terminals, like lxterminal - and Guake, use the 'Mxx' notation to send mouse events, where each 'x' - can be any possible byte. - """ - - # By default, we want to 'ignore' errors here. The input stream can be full - # of junk. One occurrence of this that I had was when using iTerm2 on OS X, - # with "Option as Meta" checked (You should choose "Option as +Esc".) - - def __init__( - self, stdin_fd: int, errors: str = "surrogateescape", encoding: str = "utf-8" - ) -> None: - self.stdin_fd = stdin_fd - self.errors = errors - - # Create incremental decoder for decoding stdin. - # We can not just do `os.read(stdin.fileno(), 1024).decode('utf-8')`, because - # it could be that we are in the middle of a utf-8 byte sequence. - self._stdin_decoder_cls = getincrementaldecoder(encoding) - self._stdin_decoder = self._stdin_decoder_cls(errors=errors) - - #: True when there is nothing anymore to read. - self.closed = False - - def read(self, count: int = 1024) -> str: - # By default we choose a rather small chunk size, because reading - # big amounts of input at once, causes the event loop to process - # all these key bindings also at once without going back to the - # loop. This will make the application feel unresponsive. - """ - Read the input and return it as a string. - - Return the text. Note that this can return an empty string, even when - the input stream was not yet closed. This means that something went - wrong during the decoding. - """ - if self.closed: - return "" - - # Check whether there is some input to read. `os.read` would block - # otherwise. - # (Actually, the event loop is responsible to make sure that this - # function is only called when there is something to read, but for some - # reason this happens in certain situations.) - try: - if not select.select([self.stdin_fd], [], [], 0)[0]: - return "" - except OSError: - # Happens for instance when the file descriptor was closed. - # (We had this in ptterm, where the FD became ready, a callback was - # scheduled, but in the meantime another callback closed it already.) - self.closed = True - - # Note: the following works better than wrapping `self.stdin` like - # `codecs.getreader('utf-8')(stdin)` and doing `read(1)`. - # Somehow that causes some latency when the escape - # character is pressed. (Especially on combination with the `select`.) - try: - data = os.read(self.stdin_fd, count) - - # Nothing more to read, stream is closed. - if data == b"": - self.closed = True - return "" - except OSError: - # In case of SIGWINCH - data = b"" - - return self._stdin_decoder.decode(data) diff --git a/voxvera/vendor/prompt_toolkit/input/typeahead.py b/voxvera/vendor/prompt_toolkit/input/typeahead.py deleted file mode 100644 index f8faa93..0000000 --- a/voxvera/vendor/prompt_toolkit/input/typeahead.py +++ /dev/null @@ -1,78 +0,0 @@ -r""" -Store input key strokes if we did read more than was required. - -The input classes `Vt100Input` and `Win32Input` read the input text in chunks -of a few kilobytes. This means that if we read input from stdin, it could be -that we read a couple of lines (with newlines in between) at once. - -This creates a problem: potentially, we read too much from stdin. Sometimes -people paste several lines at once because they paste input in a REPL and -expect each input() call to process one line. Or they rely on type ahead -because the application can't keep up with the processing. - -However, we need to read input in bigger chunks. We need this mostly to support -pasting of larger chunks of text. We don't want everything to become -unresponsive because we: - - read one character; - - parse one character; - - call the key binding, which does a string operation with one character; - - and render the user interface. -Doing text operations on single characters is very inefficient in Python, so we -prefer to work on bigger chunks of text. This is why we have to read the input -in bigger chunks. - -Further, line buffering is also not an option, because it doesn't work well in -the architecture. We use lower level Posix APIs, that work better with the -event loop and so on. In fact, there is also nothing that defines that only \n -can accept the input, you could create a key binding for any key to accept the -input. - -To support type ahead, this module will store all the key strokes that were -read too early, so that they can be feed into to the next `prompt()` call or to -the next prompt_toolkit `Application`. -""" - -from __future__ import annotations - -from collections import defaultdict - -from ..key_binding import KeyPress -from .base import Input - -__all__ = [ - "store_typeahead", - "get_typeahead", - "clear_typeahead", -] - -_buffer: dict[str, list[KeyPress]] = defaultdict(list) - - -def store_typeahead(input_obj: Input, key_presses: list[KeyPress]) -> None: - """ - Insert typeahead key presses for the given input. - """ - global _buffer - key = input_obj.typeahead_hash() - _buffer[key].extend(key_presses) - - -def get_typeahead(input_obj: Input) -> list[KeyPress]: - """ - Retrieve typeahead and reset the buffer for this input. - """ - global _buffer - - key = input_obj.typeahead_hash() - result = _buffer[key] - _buffer[key] = [] - return result - - -def clear_typeahead(input_obj: Input) -> None: - """ - Clear typeahead buffer. - """ - global _buffer - key = input_obj.typeahead_hash() - _buffer[key] = [] diff --git a/voxvera/vendor/prompt_toolkit/input/vt100.py b/voxvera/vendor/prompt_toolkit/input/vt100.py deleted file mode 100644 index c1660de..0000000 --- a/voxvera/vendor/prompt_toolkit/input/vt100.py +++ /dev/null @@ -1,309 +0,0 @@ -from __future__ import annotations - -import sys - -assert sys.platform != "win32" - -import contextlib -import io -import termios -import tty -from asyncio import AbstractEventLoop, get_running_loop -from typing import Callable, ContextManager, Generator, TextIO - -from ..key_binding import KeyPress -from .base import Input -from .posix_utils import PosixStdinReader -from .vt100_parser import Vt100Parser - -__all__ = [ - "Vt100Input", - "raw_mode", - "cooked_mode", -] - - -class Vt100Input(Input): - """ - Vt100 input for Posix systems. - (This uses a posix file descriptor that can be registered in the event loop.) - """ - - # For the error messages. Only display "Input is not a terminal" once per - # file descriptor. - _fds_not_a_terminal: set[int] = set() - - def __init__(self, stdin: TextIO) -> None: - # Test whether the given input object has a file descriptor. - # (Idle reports stdin to be a TTY, but fileno() is not implemented.) - try: - # This should not raise, but can return 0. - stdin.fileno() - except io.UnsupportedOperation as e: - if "idlelib.run" in sys.modules: - raise io.UnsupportedOperation( - "Stdin is not a terminal. Running from Idle is not supported." - ) from e - else: - raise io.UnsupportedOperation("Stdin is not a terminal.") from e - - # Even when we have a file descriptor, it doesn't mean it's a TTY. - # Normally, this requires a real TTY device, but people instantiate - # this class often during unit tests as well. They use for instance - # pexpect to pipe data into an application. For convenience, we print - # an error message and go on. - isatty = stdin.isatty() - fd = stdin.fileno() - - if not isatty and fd not in Vt100Input._fds_not_a_terminal: - msg = "Warning: Input is not a terminal (fd=%r).\n" - sys.stderr.write(msg % fd) - sys.stderr.flush() - Vt100Input._fds_not_a_terminal.add(fd) - - # - self.stdin = stdin - - # Create a backup of the fileno(). We want this to work even if the - # underlying file is closed, so that `typeahead_hash()` keeps working. - self._fileno = stdin.fileno() - - self._buffer: list[KeyPress] = [] # Buffer to collect the Key objects. - self.stdin_reader = PosixStdinReader(self._fileno, encoding=stdin.encoding) - self.vt100_parser = Vt100Parser( - lambda key_press: self._buffer.append(key_press) - ) - - def attach(self, input_ready_callback: Callable[[], None]) -> ContextManager[None]: - """ - Return a context manager that makes this input active in the current - event loop. - """ - return _attached_input(self, input_ready_callback) - - def detach(self) -> ContextManager[None]: - """ - Return a context manager that makes sure that this input is not active - in the current event loop. - """ - return _detached_input(self) - - def read_keys(self) -> list[KeyPress]: - "Read list of KeyPress." - # Read text from stdin. - data = self.stdin_reader.read() - - # Pass it through our vt100 parser. - self.vt100_parser.feed(data) - - # Return result. - result = self._buffer - self._buffer = [] - return result - - def flush_keys(self) -> list[KeyPress]: - """ - Flush pending keys and return them. - (Used for flushing the 'escape' key.) - """ - # Flush all pending keys. (This is most important to flush the vt100 - # 'Escape' key early when nothing else follows.) - self.vt100_parser.flush() - - # Return result. - result = self._buffer - self._buffer = [] - return result - - @property - def closed(self) -> bool: - return self.stdin_reader.closed - - def raw_mode(self) -> ContextManager[None]: - return raw_mode(self.stdin.fileno()) - - def cooked_mode(self) -> ContextManager[None]: - return cooked_mode(self.stdin.fileno()) - - def fileno(self) -> int: - return self.stdin.fileno() - - def typeahead_hash(self) -> str: - return f"fd-{self._fileno}" - - -_current_callbacks: dict[ - tuple[AbstractEventLoop, int], Callable[[], None] | None -] = {} # (loop, fd) -> current callback - - -@contextlib.contextmanager -def _attached_input( - input: Vt100Input, callback: Callable[[], None] -) -> Generator[None, None, None]: - """ - Context manager that makes this input active in the current event loop. - - :param input: :class:`~prompt_toolkit.input.Input` object. - :param callback: Called when the input is ready to read. - """ - loop = get_running_loop() - fd = input.fileno() - previous = _current_callbacks.get((loop, fd)) - - def callback_wrapper() -> None: - """Wrapper around the callback that already removes the reader when - the input is closed. Otherwise, we keep continuously calling this - callback, until we leave the context manager (which can happen a bit - later). This fixes issues when piping /dev/null into a prompt_toolkit - application.""" - if input.closed: - loop.remove_reader(fd) - callback() - - try: - loop.add_reader(fd, callback_wrapper) - except PermissionError: - # For `EPollSelector`, adding /dev/null to the event loop will raise - # `PermissionError` (that doesn't happen for `SelectSelector` - # apparently). Whenever we get a `PermissionError`, we can raise - # `EOFError`, because there's not more to be read anyway. `EOFError` is - # an exception that people expect in - # `prompt_toolkit.application.Application.run()`. - # To reproduce, do: `ptpython 0< /dev/null 1< /dev/null` - raise EOFError - - _current_callbacks[loop, fd] = callback - - try: - yield - finally: - loop.remove_reader(fd) - - if previous: - loop.add_reader(fd, previous) - _current_callbacks[loop, fd] = previous - else: - del _current_callbacks[loop, fd] - - -@contextlib.contextmanager -def _detached_input(input: Vt100Input) -> Generator[None, None, None]: - loop = get_running_loop() - fd = input.fileno() - previous = _current_callbacks.get((loop, fd)) - - if previous: - loop.remove_reader(fd) - _current_callbacks[loop, fd] = None - - try: - yield - finally: - if previous: - loop.add_reader(fd, previous) - _current_callbacks[loop, fd] = previous - - -class raw_mode: - """ - :: - - with raw_mode(stdin): - ''' the pseudo-terminal stdin is now used in raw mode ''' - - We ignore errors when executing `tcgetattr` fails. - """ - - # There are several reasons for ignoring errors: - # 1. To avoid the "Inappropriate ioctl for device" crash if somebody would - # execute this code (In a Python REPL, for instance): - # - # import os; f = open(os.devnull); os.dup2(f.fileno(), 0) - # - # The result is that the eventloop will stop correctly, because it has - # to logic to quit when stdin is closed. However, we should not fail at - # this point. See: - # https://github.com/jonathanslenders/python-prompt-toolkit/pull/393 - # https://github.com/jonathanslenders/python-prompt-toolkit/issues/392 - - # 2. Related, when stdin is an SSH pipe, and no full terminal was allocated. - # See: https://github.com/jonathanslenders/python-prompt-toolkit/pull/165 - def __init__(self, fileno: int) -> None: - self.fileno = fileno - self.attrs_before: list[int | list[bytes | int]] | None - try: - self.attrs_before = termios.tcgetattr(fileno) - except termios.error: - # Ignore attribute errors. - self.attrs_before = None - - def __enter__(self) -> None: - # NOTE: On os X systems, using pty.setraw() fails. Therefor we are using this: - try: - newattr = termios.tcgetattr(self.fileno) - except termios.error: - pass - else: - newattr[tty.LFLAG] = self._patch_lflag(newattr[tty.LFLAG]) - newattr[tty.IFLAG] = self._patch_iflag(newattr[tty.IFLAG]) - - # VMIN defines the number of characters read at a time in - # non-canonical mode. It seems to default to 1 on Linux, but on - # Solaris and derived operating systems it defaults to 4. (This is - # because the VMIN slot is the same as the VEOF slot, which - # defaults to ASCII EOT = Ctrl-D = 4.) - newattr[tty.CC][termios.VMIN] = 1 - - termios.tcsetattr(self.fileno, termios.TCSANOW, newattr) - - @classmethod - def _patch_lflag(cls, attrs: int) -> int: - return attrs & ~(termios.ECHO | termios.ICANON | termios.IEXTEN | termios.ISIG) - - @classmethod - def _patch_iflag(cls, attrs: int) -> int: - return attrs & ~( - # Disable XON/XOFF flow control on output and input. - # (Don't capture Ctrl-S and Ctrl-Q.) - # Like executing: "stty -ixon." - termios.IXON - | termios.IXOFF - | - # Don't translate carriage return into newline on input. - termios.ICRNL - | termios.INLCR - | termios.IGNCR - ) - - def __exit__(self, *a: object) -> None: - if self.attrs_before is not None: - try: - termios.tcsetattr(self.fileno, termios.TCSANOW, self.attrs_before) - except termios.error: - pass - - # # Put the terminal in application mode. - # self._stdout.write('\x1b[?1h') - - -class cooked_mode(raw_mode): - """ - The opposite of ``raw_mode``, used when we need cooked mode inside a - `raw_mode` block. Used in `Application.run_in_terminal`.:: - - with cooked_mode(stdin): - ''' the pseudo-terminal stdin is now used in cooked mode. ''' - """ - - @classmethod - def _patch_lflag(cls, attrs: int) -> int: - return attrs | (termios.ECHO | termios.ICANON | termios.IEXTEN | termios.ISIG) - - @classmethod - def _patch_iflag(cls, attrs: int) -> int: - # Turn the ICRNL flag back on. (Without this, calling `input()` in - # run_in_terminal doesn't work and displays ^M instead. Ptpython - # evaluates commands using `run_in_terminal`, so it's important that - # they translate ^M back into ^J.) - return attrs | termios.ICRNL diff --git a/voxvera/vendor/prompt_toolkit/input/vt100_parser.py b/voxvera/vendor/prompt_toolkit/input/vt100_parser.py deleted file mode 100644 index 73dbce3..0000000 --- a/voxvera/vendor/prompt_toolkit/input/vt100_parser.py +++ /dev/null @@ -1,250 +0,0 @@ -""" -Parser for VT100 input stream. -""" - -from __future__ import annotations - -import re -from typing import Callable, Dict, Generator - -from ..key_binding.key_processor import KeyPress -from ..keys import Keys -from .ansi_escape_sequences import ANSI_SEQUENCES - -__all__ = [ - "Vt100Parser", -] - - -# Regex matching any CPR response -# (Note that we use '\Z' instead of '$', because '$' could include a trailing -# newline.) -_cpr_response_re = re.compile("^" + re.escape("\x1b[") + r"\d+;\d+R\Z") - -# Mouse events: -# Typical: "Esc[MaB*" Urxvt: "Esc[96;14;13M" and for Xterm SGR: "Esc[<64;85;12M" -_mouse_event_re = re.compile("^" + re.escape("\x1b[") + r"( bool: - # (hard coded) If this could be a prefix of a CPR response, return - # True. - if _cpr_response_prefix_re.match(prefix) or _mouse_event_prefix_re.match( - prefix - ): - result = True - else: - # If this could be a prefix of anything else, also return True. - result = any( - v - for k, v in ANSI_SEQUENCES.items() - if k.startswith(prefix) and k != prefix - ) - - self[prefix] = result - return result - - -_IS_PREFIX_OF_LONGER_MATCH_CACHE = _IsPrefixOfLongerMatchCache() - - -class Vt100Parser: - """ - Parser for VT100 input stream. - Data can be fed through the `feed` method and the given callback will be - called with KeyPress objects. - - :: - - def callback(key): - pass - i = Vt100Parser(callback) - i.feed('data\x01...') - - :attr feed_key_callback: Function that will be called when a key is parsed. - """ - - # Lookup table of ANSI escape sequences for a VT100 terminal - # Hint: in order to know what sequences your terminal writes to stdin, run - # "od -c" and start typing. - def __init__(self, feed_key_callback: Callable[[KeyPress], None]) -> None: - self.feed_key_callback = feed_key_callback - self.reset() - - def reset(self, request: bool = False) -> None: - self._in_bracketed_paste = False - self._start_parser() - - def _start_parser(self) -> None: - """ - Start the parser coroutine. - """ - self._input_parser = self._input_parser_generator() - self._input_parser.send(None) # type: ignore - - def _get_match(self, prefix: str) -> None | Keys | tuple[Keys, ...]: - """ - Return the key (or keys) that maps to this prefix. - """ - # (hard coded) If we match a CPR response, return Keys.CPRResponse. - # (This one doesn't fit in the ANSI_SEQUENCES, because it contains - # integer variables.) - if _cpr_response_re.match(prefix): - return Keys.CPRResponse - - elif _mouse_event_re.match(prefix): - return Keys.Vt100MouseEvent - - # Otherwise, use the mappings. - try: - return ANSI_SEQUENCES[prefix] - except KeyError: - return None - - def _input_parser_generator(self) -> Generator[None, str | _Flush, None]: - """ - Coroutine (state machine) for the input parser. - """ - prefix = "" - retry = False - flush = False - - while True: - flush = False - - if retry: - retry = False - else: - # Get next character. - c = yield - - if isinstance(c, _Flush): - flush = True - else: - prefix += c - - # If we have some data, check for matches. - if prefix: - is_prefix_of_longer_match = _IS_PREFIX_OF_LONGER_MATCH_CACHE[prefix] - match = self._get_match(prefix) - - # Exact matches found, call handlers.. - if (flush or not is_prefix_of_longer_match) and match: - self._call_handler(match, prefix) - prefix = "" - - # No exact match found. - elif (flush or not is_prefix_of_longer_match) and not match: - found = False - retry = True - - # Loop over the input, try the longest match first and - # shift. - for i in range(len(prefix), 0, -1): - match = self._get_match(prefix[:i]) - if match: - self._call_handler(match, prefix[:i]) - prefix = prefix[i:] - found = True - - if not found: - self._call_handler(prefix[0], prefix[0]) - prefix = prefix[1:] - - def _call_handler( - self, key: str | Keys | tuple[Keys, ...], insert_text: str - ) -> None: - """ - Callback to handler. - """ - if isinstance(key, tuple): - # Received ANSI sequence that corresponds with multiple keys - # (probably alt+something). Handle keys individually, but only pass - # data payload to first KeyPress (so that we won't insert it - # multiple times). - for i, k in enumerate(key): - self._call_handler(k, insert_text if i == 0 else "") - else: - if key == Keys.BracketedPaste: - self._in_bracketed_paste = True - self._paste_buffer = "" - else: - self.feed_key_callback(KeyPress(key, insert_text)) - - def feed(self, data: str) -> None: - """ - Feed the input stream. - - :param data: Input string (unicode). - """ - # Handle bracketed paste. (We bypass the parser that matches all other - # key presses and keep reading input until we see the end mark.) - # This is much faster then parsing character by character. - if self._in_bracketed_paste: - self._paste_buffer += data - end_mark = "\x1b[201~" - - if end_mark in self._paste_buffer: - end_index = self._paste_buffer.index(end_mark) - - # Feed content to key bindings. - paste_content = self._paste_buffer[:end_index] - self.feed_key_callback(KeyPress(Keys.BracketedPaste, paste_content)) - - # Quit bracketed paste mode and handle remaining input. - self._in_bracketed_paste = False - remaining = self._paste_buffer[end_index + len(end_mark) :] - self._paste_buffer = "" - - self.feed(remaining) - - # Handle normal input character by character. - else: - for i, c in enumerate(data): - if self._in_bracketed_paste: - # Quit loop and process from this position when the parser - # entered bracketed paste. - self.feed(data[i:]) - break - else: - self._input_parser.send(c) - - def flush(self) -> None: - """ - Flush the buffer of the input stream. - - This will allow us to handle the escape key (or maybe meta) sooner. - The input received by the escape key is actually the same as the first - characters of e.g. Arrow-Up, so without knowing what follows the escape - sequence, we don't know whether escape has been pressed, or whether - it's something else. This flush function should be called after a - timeout, and processes everything that's still in the buffer as-is, so - without assuming any characters will follow. - """ - self._input_parser.send(_Flush()) - - def feed_and_flush(self, data: str) -> None: - """ - Wrapper around ``feed`` and ``flush``. - """ - self.feed(data) - self.flush() diff --git a/voxvera/vendor/prompt_toolkit/input/win32.py b/voxvera/vendor/prompt_toolkit/input/win32.py deleted file mode 100644 index 616df8e..0000000 --- a/voxvera/vendor/prompt_toolkit/input/win32.py +++ /dev/null @@ -1,904 +0,0 @@ -from __future__ import annotations - -import os -import sys -from abc import abstractmethod -from asyncio import get_running_loop -from contextlib import contextmanager - -from ..utils import SPHINX_AUTODOC_RUNNING - -assert sys.platform == "win32" - -# Do not import win32-specific stuff when generating documentation. -# Otherwise RTD would be unable to generate docs for this module. -if not SPHINX_AUTODOC_RUNNING: - import msvcrt - from ctypes import windll - -from ctypes import Array, byref, pointer -from ctypes.wintypes import DWORD, HANDLE -from typing import Callable, ContextManager, Iterable, Iterator, TextIO - -from prompt_toolkit.eventloop import run_in_executor_with_context -from prompt_toolkit.eventloop.win32 import create_win32_event, wait_for_handles -from prompt_toolkit.key_binding.key_processor import KeyPress -from prompt_toolkit.keys import Keys -from prompt_toolkit.mouse_events import MouseButton, MouseEventType -from prompt_toolkit.win32_types import ( - INPUT_RECORD, - KEY_EVENT_RECORD, - MOUSE_EVENT_RECORD, - STD_INPUT_HANDLE, - EventTypes, -) - -from .ansi_escape_sequences import REVERSE_ANSI_SEQUENCES -from .base import Input -from .vt100_parser import Vt100Parser - -__all__ = [ - "Win32Input", - "ConsoleInputReader", - "raw_mode", - "cooked_mode", - "attach_win32_input", - "detach_win32_input", -] - -# Win32 Constants for MOUSE_EVENT_RECORD. -# See: https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str -FROM_LEFT_1ST_BUTTON_PRESSED = 0x1 -RIGHTMOST_BUTTON_PRESSED = 0x2 -MOUSE_MOVED = 0x0001 -MOUSE_WHEELED = 0x0004 - -# See: https://msdn.microsoft.com/pl-pl/library/windows/desktop/ms686033(v=vs.85).aspx -ENABLE_VIRTUAL_TERMINAL_INPUT = 0x0200 - - -class _Win32InputBase(Input): - """ - Base class for `Win32Input` and `Win32PipeInput`. - """ - - def __init__(self) -> None: - self.win32_handles = _Win32Handles() - - @property - @abstractmethod - def handle(self) -> HANDLE: - pass - - -class Win32Input(_Win32InputBase): - """ - `Input` class that reads from the Windows console. - """ - - def __init__(self, stdin: TextIO | None = None) -> None: - super().__init__() - self._use_virtual_terminal_input = _is_win_vt100_input_enabled() - - self.console_input_reader: Vt100ConsoleInputReader | ConsoleInputReader - - if self._use_virtual_terminal_input: - self.console_input_reader = Vt100ConsoleInputReader() - else: - self.console_input_reader = ConsoleInputReader() - - def attach(self, input_ready_callback: Callable[[], None]) -> ContextManager[None]: - """ - Return a context manager that makes this input active in the current - event loop. - """ - return attach_win32_input(self, input_ready_callback) - - def detach(self) -> ContextManager[None]: - """ - Return a context manager that makes sure that this input is not active - in the current event loop. - """ - return detach_win32_input(self) - - def read_keys(self) -> list[KeyPress]: - return list(self.console_input_reader.read()) - - def flush_keys(self) -> list[KeyPress]: - return self.console_input_reader.flush_keys() - - @property - def closed(self) -> bool: - return False - - def raw_mode(self) -> ContextManager[None]: - return raw_mode( - use_win10_virtual_terminal_input=self._use_virtual_terminal_input - ) - - def cooked_mode(self) -> ContextManager[None]: - return cooked_mode() - - def fileno(self) -> int: - # The windows console doesn't depend on the file handle, so - # this is not used for the event loop (which uses the - # handle instead). But it's used in `Application.run_system_command` - # which opens a subprocess with a given stdin/stdout. - return sys.stdin.fileno() - - def typeahead_hash(self) -> str: - return "win32-input" - - def close(self) -> None: - self.console_input_reader.close() - - @property - def handle(self) -> HANDLE: - return self.console_input_reader.handle - - -class ConsoleInputReader: - """ - :param recognize_paste: When True, try to discover paste actions and turn - the event into a BracketedPaste. - """ - - # Keys with character data. - mappings = { - b"\x1b": Keys.Escape, - b"\x00": Keys.ControlSpace, # Control-Space (Also for Ctrl-@) - b"\x01": Keys.ControlA, # Control-A (home) - b"\x02": Keys.ControlB, # Control-B (emacs cursor left) - b"\x03": Keys.ControlC, # Control-C (interrupt) - b"\x04": Keys.ControlD, # Control-D (exit) - b"\x05": Keys.ControlE, # Control-E (end) - b"\x06": Keys.ControlF, # Control-F (cursor forward) - b"\x07": Keys.ControlG, # Control-G - b"\x08": Keys.ControlH, # Control-H (8) (Identical to '\b') - b"\x09": Keys.ControlI, # Control-I (9) (Identical to '\t') - b"\x0a": Keys.ControlJ, # Control-J (10) (Identical to '\n') - b"\x0b": Keys.ControlK, # Control-K (delete until end of line; vertical tab) - b"\x0c": Keys.ControlL, # Control-L (clear; form feed) - b"\x0d": Keys.ControlM, # Control-M (enter) - b"\x0e": Keys.ControlN, # Control-N (14) (history forward) - b"\x0f": Keys.ControlO, # Control-O (15) - b"\x10": Keys.ControlP, # Control-P (16) (history back) - b"\x11": Keys.ControlQ, # Control-Q - b"\x12": Keys.ControlR, # Control-R (18) (reverse search) - b"\x13": Keys.ControlS, # Control-S (19) (forward search) - b"\x14": Keys.ControlT, # Control-T - b"\x15": Keys.ControlU, # Control-U - b"\x16": Keys.ControlV, # Control-V - b"\x17": Keys.ControlW, # Control-W - b"\x18": Keys.ControlX, # Control-X - b"\x19": Keys.ControlY, # Control-Y (25) - b"\x1a": Keys.ControlZ, # Control-Z - b"\x1c": Keys.ControlBackslash, # Both Control-\ and Ctrl-| - b"\x1d": Keys.ControlSquareClose, # Control-] - b"\x1e": Keys.ControlCircumflex, # Control-^ - b"\x1f": Keys.ControlUnderscore, # Control-underscore (Also for Ctrl-hyphen.) - b"\x7f": Keys.Backspace, # (127) Backspace (ASCII Delete.) - } - - # Keys that don't carry character data. - keycodes = { - # Home/End - 33: Keys.PageUp, - 34: Keys.PageDown, - 35: Keys.End, - 36: Keys.Home, - # Arrows - 37: Keys.Left, - 38: Keys.Up, - 39: Keys.Right, - 40: Keys.Down, - 45: Keys.Insert, - 46: Keys.Delete, - # F-keys. - 112: Keys.F1, - 113: Keys.F2, - 114: Keys.F3, - 115: Keys.F4, - 116: Keys.F5, - 117: Keys.F6, - 118: Keys.F7, - 119: Keys.F8, - 120: Keys.F9, - 121: Keys.F10, - 122: Keys.F11, - 123: Keys.F12, - } - - LEFT_ALT_PRESSED = 0x0002 - RIGHT_ALT_PRESSED = 0x0001 - SHIFT_PRESSED = 0x0010 - LEFT_CTRL_PRESSED = 0x0008 - RIGHT_CTRL_PRESSED = 0x0004 - - def __init__(self, recognize_paste: bool = True) -> None: - self._fdcon = None - self.recognize_paste = recognize_paste - - # When stdin is a tty, use that handle, otherwise, create a handle from - # CONIN$. - self.handle: HANDLE - if sys.stdin.isatty(): - self.handle = HANDLE(windll.kernel32.GetStdHandle(STD_INPUT_HANDLE)) - else: - self._fdcon = os.open("CONIN$", os.O_RDWR | os.O_BINARY) - self.handle = HANDLE(msvcrt.get_osfhandle(self._fdcon)) - - def close(self) -> None: - "Close fdcon." - if self._fdcon is not None: - os.close(self._fdcon) - - def read(self) -> Iterable[KeyPress]: - """ - Return a list of `KeyPress` instances. It won't return anything when - there was nothing to read. (This function doesn't block.) - - http://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx - """ - max_count = 2048 # Max events to read at the same time. - - read = DWORD(0) - arrtype = INPUT_RECORD * max_count - input_records = arrtype() - - # Check whether there is some input to read. `ReadConsoleInputW` would - # block otherwise. - # (Actually, the event loop is responsible to make sure that this - # function is only called when there is something to read, but for some - # reason this happened in the asyncio_win32 loop, and it's better to be - # safe anyway.) - if not wait_for_handles([self.handle], timeout=0): - return - - # Get next batch of input event. - windll.kernel32.ReadConsoleInputW( - self.handle, pointer(input_records), max_count, pointer(read) - ) - - # First, get all the keys from the input buffer, in order to determine - # whether we should consider this a paste event or not. - all_keys = list(self._get_keys(read, input_records)) - - # Fill in 'data' for key presses. - all_keys = [self._insert_key_data(key) for key in all_keys] - - # Correct non-bmp characters that are passed as separate surrogate codes - all_keys = list(self._merge_paired_surrogates(all_keys)) - - if self.recognize_paste and self._is_paste(all_keys): - gen = iter(all_keys) - k: KeyPress | None - - for k in gen: - # Pasting: if the current key consists of text or \n, turn it - # into a BracketedPaste. - data = [] - while k and ( - not isinstance(k.key, Keys) - or k.key in {Keys.ControlJ, Keys.ControlM} - ): - data.append(k.data) - try: - k = next(gen) - except StopIteration: - k = None - - if data: - yield KeyPress(Keys.BracketedPaste, "".join(data)) - if k is not None: - yield k - else: - yield from all_keys - - def flush_keys(self) -> list[KeyPress]: - # Method only needed for structural compatibility with `Vt100ConsoleInputReader`. - return [] - - def _insert_key_data(self, key_press: KeyPress) -> KeyPress: - """ - Insert KeyPress data, for vt100 compatibility. - """ - if key_press.data: - return key_press - - if isinstance(key_press.key, Keys): - data = REVERSE_ANSI_SEQUENCES.get(key_press.key, "") - else: - data = "" - - return KeyPress(key_press.key, data) - - def _get_keys( - self, read: DWORD, input_records: Array[INPUT_RECORD] - ) -> Iterator[KeyPress]: - """ - Generator that yields `KeyPress` objects from the input records. - """ - for i in range(read.value): - ir = input_records[i] - - # Get the right EventType from the EVENT_RECORD. - # (For some reason the Windows console application 'cmder' - # [http://gooseberrycreative.com/cmder/] can return '0' for - # ir.EventType. -- Just ignore that.) - if ir.EventType in EventTypes: - ev = getattr(ir.Event, EventTypes[ir.EventType]) - - # Process if this is a key event. (We also have mouse, menu and - # focus events.) - if isinstance(ev, KEY_EVENT_RECORD) and ev.KeyDown: - yield from self._event_to_key_presses(ev) - - elif isinstance(ev, MOUSE_EVENT_RECORD): - yield from self._handle_mouse(ev) - - @staticmethod - def _merge_paired_surrogates(key_presses: list[KeyPress]) -> Iterator[KeyPress]: - """ - Combines consecutive KeyPresses with high and low surrogates into - single characters - """ - buffered_high_surrogate = None - for key in key_presses: - is_text = not isinstance(key.key, Keys) - is_high_surrogate = is_text and "\ud800" <= key.key <= "\udbff" - is_low_surrogate = is_text and "\udc00" <= key.key <= "\udfff" - - if buffered_high_surrogate: - if is_low_surrogate: - # convert high surrogate + low surrogate to single character - fullchar = ( - (buffered_high_surrogate.key + key.key) - .encode("utf-16-le", "surrogatepass") - .decode("utf-16-le") - ) - key = KeyPress(fullchar, fullchar) - else: - yield buffered_high_surrogate - buffered_high_surrogate = None - - if is_high_surrogate: - buffered_high_surrogate = key - else: - yield key - - if buffered_high_surrogate: - yield buffered_high_surrogate - - @staticmethod - def _is_paste(keys: list[KeyPress]) -> bool: - """ - Return `True` when we should consider this list of keys as a paste - event. Pasted text on windows will be turned into a - `Keys.BracketedPaste` event. (It's not 100% correct, but it is probably - the best possible way to detect pasting of text and handle that - correctly.) - """ - # Consider paste when it contains at least one newline and at least one - # other character. - text_count = 0 - newline_count = 0 - - for k in keys: - if not isinstance(k.key, Keys): - text_count += 1 - if k.key == Keys.ControlM: - newline_count += 1 - - return newline_count >= 1 and text_count >= 1 - - def _event_to_key_presses(self, ev: KEY_EVENT_RECORD) -> list[KeyPress]: - """ - For this `KEY_EVENT_RECORD`, return a list of `KeyPress` instances. - """ - assert isinstance(ev, KEY_EVENT_RECORD) and ev.KeyDown - - result: KeyPress | None = None - - control_key_state = ev.ControlKeyState - u_char = ev.uChar.UnicodeChar - # Use surrogatepass because u_char may be an unmatched surrogate - ascii_char = u_char.encode("utf-8", "surrogatepass") - - # NOTE: We don't use `ev.uChar.AsciiChar`. That appears to be the - # unicode code point truncated to 1 byte. See also: - # https://github.com/ipython/ipython/issues/10004 - # https://github.com/jonathanslenders/python-prompt-toolkit/issues/389 - - if u_char == "\x00": - if ev.VirtualKeyCode in self.keycodes: - result = KeyPress(self.keycodes[ev.VirtualKeyCode], "") - else: - if ascii_char in self.mappings: - if self.mappings[ascii_char] == Keys.ControlJ: - u_char = ( - "\n" # Windows sends \n, turn into \r for unix compatibility. - ) - result = KeyPress(self.mappings[ascii_char], u_char) - else: - result = KeyPress(u_char, u_char) - - # First we handle Shift-Control-Arrow/Home/End (need to do this first) - if ( - ( - control_key_state & self.LEFT_CTRL_PRESSED - or control_key_state & self.RIGHT_CTRL_PRESSED - ) - and control_key_state & self.SHIFT_PRESSED - and result - ): - mapping: dict[str, str] = { - Keys.Left: Keys.ControlShiftLeft, - Keys.Right: Keys.ControlShiftRight, - Keys.Up: Keys.ControlShiftUp, - Keys.Down: Keys.ControlShiftDown, - Keys.Home: Keys.ControlShiftHome, - Keys.End: Keys.ControlShiftEnd, - Keys.Insert: Keys.ControlShiftInsert, - Keys.PageUp: Keys.ControlShiftPageUp, - Keys.PageDown: Keys.ControlShiftPageDown, - } - result.key = mapping.get(result.key, result.key) - - # Correctly handle Control-Arrow/Home/End and Control-Insert/Delete keys. - if ( - control_key_state & self.LEFT_CTRL_PRESSED - or control_key_state & self.RIGHT_CTRL_PRESSED - ) and result: - mapping = { - Keys.Left: Keys.ControlLeft, - Keys.Right: Keys.ControlRight, - Keys.Up: Keys.ControlUp, - Keys.Down: Keys.ControlDown, - Keys.Home: Keys.ControlHome, - Keys.End: Keys.ControlEnd, - Keys.Insert: Keys.ControlInsert, - Keys.Delete: Keys.ControlDelete, - Keys.PageUp: Keys.ControlPageUp, - Keys.PageDown: Keys.ControlPageDown, - } - result.key = mapping.get(result.key, result.key) - - # Turn 'Tab' into 'BackTab' when shift was pressed. - # Also handle other shift-key combination - if control_key_state & self.SHIFT_PRESSED and result: - mapping = { - Keys.Tab: Keys.BackTab, - Keys.Left: Keys.ShiftLeft, - Keys.Right: Keys.ShiftRight, - Keys.Up: Keys.ShiftUp, - Keys.Down: Keys.ShiftDown, - Keys.Home: Keys.ShiftHome, - Keys.End: Keys.ShiftEnd, - Keys.Insert: Keys.ShiftInsert, - Keys.Delete: Keys.ShiftDelete, - Keys.PageUp: Keys.ShiftPageUp, - Keys.PageDown: Keys.ShiftPageDown, - } - result.key = mapping.get(result.key, result.key) - - # Turn 'Space' into 'ControlSpace' when control was pressed. - if ( - ( - control_key_state & self.LEFT_CTRL_PRESSED - or control_key_state & self.RIGHT_CTRL_PRESSED - ) - and result - and result.data == " " - ): - result = KeyPress(Keys.ControlSpace, " ") - - # Turn Control-Enter into META-Enter. (On a vt100 terminal, we cannot - # detect this combination. But it's really practical on Windows.) - if ( - ( - control_key_state & self.LEFT_CTRL_PRESSED - or control_key_state & self.RIGHT_CTRL_PRESSED - ) - and result - and result.key == Keys.ControlJ - ): - return [KeyPress(Keys.Escape, ""), result] - - # Return result. If alt was pressed, prefix the result with an - # 'Escape' key, just like unix VT100 terminals do. - - # NOTE: Only replace the left alt with escape. The right alt key often - # acts as altgr and is used in many non US keyboard layouts for - # typing some special characters, like a backslash. We don't want - # all backslashes to be prefixed with escape. (Esc-\ has a - # meaning in E-macs, for instance.) - if result: - meta_pressed = control_key_state & self.LEFT_ALT_PRESSED - - if meta_pressed: - return [KeyPress(Keys.Escape, ""), result] - else: - return [result] - - else: - return [] - - def _handle_mouse(self, ev: MOUSE_EVENT_RECORD) -> list[KeyPress]: - """ - Handle mouse events. Return a list of KeyPress instances. - """ - event_flags = ev.EventFlags - button_state = ev.ButtonState - - event_type: MouseEventType | None = None - button: MouseButton = MouseButton.NONE - - # Scroll events. - if event_flags & MOUSE_WHEELED: - if button_state > 0: - event_type = MouseEventType.SCROLL_UP - else: - event_type = MouseEventType.SCROLL_DOWN - else: - # Handle button state for non-scroll events. - if button_state == FROM_LEFT_1ST_BUTTON_PRESSED: - button = MouseButton.LEFT - - elif button_state == RIGHTMOST_BUTTON_PRESSED: - button = MouseButton.RIGHT - - # Move events. - if event_flags & MOUSE_MOVED: - event_type = MouseEventType.MOUSE_MOVE - - # No key pressed anymore: mouse up. - if event_type is None: - if button_state > 0: - # Some button pressed. - event_type = MouseEventType.MOUSE_DOWN - else: - # No button pressed. - event_type = MouseEventType.MOUSE_UP - - data = ";".join( - [ - button.value, - event_type.value, - str(ev.MousePosition.X), - str(ev.MousePosition.Y), - ] - ) - return [KeyPress(Keys.WindowsMouseEvent, data)] - - -class Vt100ConsoleInputReader: - """ - Similar to `ConsoleInputReader`, but for usage when - `ENABLE_VIRTUAL_TERMINAL_INPUT` is enabled. This assumes that Windows sends - us the right vt100 escape sequences and we parse those with our vt100 - parser. - - (Using this instead of `ConsoleInputReader` results in the "data" attribute - from the `KeyPress` instances to be more correct in edge cases, because - this responds to for instance the terminal being in application cursor keys - mode.) - """ - - def __init__(self) -> None: - self._fdcon = None - - self._buffer: list[KeyPress] = [] # Buffer to collect the Key objects. - self._vt100_parser = Vt100Parser( - lambda key_press: self._buffer.append(key_press) - ) - - # When stdin is a tty, use that handle, otherwise, create a handle from - # CONIN$. - self.handle: HANDLE - if sys.stdin.isatty(): - self.handle = HANDLE(windll.kernel32.GetStdHandle(STD_INPUT_HANDLE)) - else: - self._fdcon = os.open("CONIN$", os.O_RDWR | os.O_BINARY) - self.handle = HANDLE(msvcrt.get_osfhandle(self._fdcon)) - - def close(self) -> None: - "Close fdcon." - if self._fdcon is not None: - os.close(self._fdcon) - - def read(self) -> Iterable[KeyPress]: - """ - Return a list of `KeyPress` instances. It won't return anything when - there was nothing to read. (This function doesn't block.) - - http://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx - """ - max_count = 2048 # Max events to read at the same time. - - read = DWORD(0) - arrtype = INPUT_RECORD * max_count - input_records = arrtype() - - # Check whether there is some input to read. `ReadConsoleInputW` would - # block otherwise. - # (Actually, the event loop is responsible to make sure that this - # function is only called when there is something to read, but for some - # reason this happened in the asyncio_win32 loop, and it's better to be - # safe anyway.) - if not wait_for_handles([self.handle], timeout=0): - return [] - - # Get next batch of input event. - windll.kernel32.ReadConsoleInputW( - self.handle, pointer(input_records), max_count, pointer(read) - ) - - # First, get all the keys from the input buffer, in order to determine - # whether we should consider this a paste event or not. - for key_data in self._get_keys(read, input_records): - self._vt100_parser.feed(key_data) - - # Return result. - result = self._buffer - self._buffer = [] - return result - - def flush_keys(self) -> list[KeyPress]: - """ - Flush pending keys and return them. - (Used for flushing the 'escape' key.) - """ - # Flush all pending keys. (This is most important to flush the vt100 - # 'Escape' key early when nothing else follows.) - self._vt100_parser.flush() - - # Return result. - result = self._buffer - self._buffer = [] - return result - - def _get_keys( - self, read: DWORD, input_records: Array[INPUT_RECORD] - ) -> Iterator[str]: - """ - Generator that yields `KeyPress` objects from the input records. - """ - for i in range(read.value): - ir = input_records[i] - - # Get the right EventType from the EVENT_RECORD. - # (For some reason the Windows console application 'cmder' - # [http://gooseberrycreative.com/cmder/] can return '0' for - # ir.EventType. -- Just ignore that.) - if ir.EventType in EventTypes: - ev = getattr(ir.Event, EventTypes[ir.EventType]) - - # Process if this is a key event. (We also have mouse, menu and - # focus events.) - if isinstance(ev, KEY_EVENT_RECORD) and ev.KeyDown: - u_char = ev.uChar.UnicodeChar - if u_char != "\x00": - yield u_char - - -class _Win32Handles: - """ - Utility to keep track of which handles are connectod to which callbacks. - - `add_win32_handle` starts a tiny event loop in another thread which waits - for the Win32 handle to become ready. When this happens, the callback will - be called in the current asyncio event loop using `call_soon_threadsafe`. - - `remove_win32_handle` will stop this tiny event loop. - - NOTE: We use this technique, so that we don't have to use the - `ProactorEventLoop` on Windows and we can wait for things like stdin - in a `SelectorEventLoop`. This is important, because our inputhook - mechanism (used by IPython), only works with the `SelectorEventLoop`. - """ - - def __init__(self) -> None: - self._handle_callbacks: dict[int, Callable[[], None]] = {} - - # Windows Events that are triggered when we have to stop watching this - # handle. - self._remove_events: dict[int, HANDLE] = {} - - def add_win32_handle(self, handle: HANDLE, callback: Callable[[], None]) -> None: - """ - Add a Win32 handle to the event loop. - """ - handle_value = handle.value - - if handle_value is None: - raise ValueError("Invalid handle.") - - # Make sure to remove a previous registered handler first. - self.remove_win32_handle(handle) - - loop = get_running_loop() - self._handle_callbacks[handle_value] = callback - - # Create remove event. - remove_event = create_win32_event() - self._remove_events[handle_value] = remove_event - - # Add reader. - def ready() -> None: - # Tell the callback that input's ready. - try: - callback() - finally: - run_in_executor_with_context(wait, loop=loop) - - # Wait for the input to become ready. - # (Use an executor for this, the Windows asyncio event loop doesn't - # allow us to wait for handles like stdin.) - def wait() -> None: - # Wait until either the handle becomes ready, or the remove event - # has been set. - result = wait_for_handles([remove_event, handle]) - - if result is remove_event: - windll.kernel32.CloseHandle(remove_event) - return - else: - loop.call_soon_threadsafe(ready) - - run_in_executor_with_context(wait, loop=loop) - - def remove_win32_handle(self, handle: HANDLE) -> Callable[[], None] | None: - """ - Remove a Win32 handle from the event loop. - Return either the registered handler or `None`. - """ - if handle.value is None: - return None # Ignore. - - # Trigger remove events, so that the reader knows to stop. - try: - event = self._remove_events.pop(handle.value) - except KeyError: - pass - else: - windll.kernel32.SetEvent(event) - - try: - return self._handle_callbacks.pop(handle.value) - except KeyError: - return None - - -@contextmanager -def attach_win32_input( - input: _Win32InputBase, callback: Callable[[], None] -) -> Iterator[None]: - """ - Context manager that makes this input active in the current event loop. - - :param input: :class:`~prompt_toolkit.input.Input` object. - :param input_ready_callback: Called when the input is ready to read. - """ - win32_handles = input.win32_handles - handle = input.handle - - if handle.value is None: - raise ValueError("Invalid handle.") - - # Add reader. - previous_callback = win32_handles.remove_win32_handle(handle) - win32_handles.add_win32_handle(handle, callback) - - try: - yield - finally: - win32_handles.remove_win32_handle(handle) - - if previous_callback: - win32_handles.add_win32_handle(handle, previous_callback) - - -@contextmanager -def detach_win32_input(input: _Win32InputBase) -> Iterator[None]: - win32_handles = input.win32_handles - handle = input.handle - - if handle.value is None: - raise ValueError("Invalid handle.") - - previous_callback = win32_handles.remove_win32_handle(handle) - - try: - yield - finally: - if previous_callback: - win32_handles.add_win32_handle(handle, previous_callback) - - -class raw_mode: - """ - :: - - with raw_mode(stdin): - ''' the windows terminal is now in 'raw' mode. ''' - - The ``fileno`` attribute is ignored. This is to be compatible with the - `raw_input` method of `.vt100_input`. - """ - - def __init__( - self, fileno: int | None = None, use_win10_virtual_terminal_input: bool = False - ) -> None: - self.handle = HANDLE(windll.kernel32.GetStdHandle(STD_INPUT_HANDLE)) - self.use_win10_virtual_terminal_input = use_win10_virtual_terminal_input - - def __enter__(self) -> None: - # Remember original mode. - original_mode = DWORD() - windll.kernel32.GetConsoleMode(self.handle, pointer(original_mode)) - self.original_mode = original_mode - - self._patch() - - def _patch(self) -> None: - # Set raw - ENABLE_ECHO_INPUT = 0x0004 - ENABLE_LINE_INPUT = 0x0002 - ENABLE_PROCESSED_INPUT = 0x0001 - - new_mode = self.original_mode.value & ~( - ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT - ) - - if self.use_win10_virtual_terminal_input: - new_mode |= ENABLE_VIRTUAL_TERMINAL_INPUT - - windll.kernel32.SetConsoleMode(self.handle, new_mode) - - def __exit__(self, *a: object) -> None: - # Restore original mode - windll.kernel32.SetConsoleMode(self.handle, self.original_mode) - - -class cooked_mode(raw_mode): - """ - :: - - with cooked_mode(stdin): - ''' The pseudo-terminal stdin is now used in cooked mode. ''' - """ - - def _patch(self) -> None: - # Set cooked. - ENABLE_ECHO_INPUT = 0x0004 - ENABLE_LINE_INPUT = 0x0002 - ENABLE_PROCESSED_INPUT = 0x0001 - - windll.kernel32.SetConsoleMode( - self.handle, - self.original_mode.value - | (ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT), - ) - - -def _is_win_vt100_input_enabled() -> bool: - """ - Returns True when we're running Windows and VT100 escape sequences are - supported. - """ - hconsole = HANDLE(windll.kernel32.GetStdHandle(STD_INPUT_HANDLE)) - - # Get original console mode. - original_mode = DWORD(0) - windll.kernel32.GetConsoleMode(hconsole, byref(original_mode)) - - try: - # Try to enable VT100 sequences. - result: int = windll.kernel32.SetConsoleMode( - hconsole, DWORD(ENABLE_VIRTUAL_TERMINAL_INPUT) - ) - - return result == 1 - finally: - windll.kernel32.SetConsoleMode(hconsole, original_mode) diff --git a/voxvera/vendor/prompt_toolkit/input/win32_pipe.py b/voxvera/vendor/prompt_toolkit/input/win32_pipe.py deleted file mode 100644 index 0bafa49..0000000 --- a/voxvera/vendor/prompt_toolkit/input/win32_pipe.py +++ /dev/null @@ -1,156 +0,0 @@ -from __future__ import annotations - -import sys - -assert sys.platform == "win32" - -from contextlib import contextmanager -from ctypes import windll -from ctypes.wintypes import HANDLE -from typing import Callable, ContextManager, Iterator - -from prompt_toolkit.eventloop.win32 import create_win32_event - -from ..key_binding import KeyPress -from ..utils import DummyContext -from .base import PipeInput -from .vt100_parser import Vt100Parser -from .win32 import _Win32InputBase, attach_win32_input, detach_win32_input - -__all__ = ["Win32PipeInput"] - - -class Win32PipeInput(_Win32InputBase, PipeInput): - """ - This is an input pipe that works on Windows. - Text or bytes can be feed into the pipe, and key strokes can be read from - the pipe. This is useful if we want to send the input programmatically into - the application. Mostly useful for unit testing. - - Notice that even though it's Windows, we use vt100 escape sequences over - the pipe. - - Usage:: - - input = Win32PipeInput() - input.send_text('inputdata') - """ - - _id = 0 - - def __init__(self, _event: HANDLE) -> None: - super().__init__() - # Event (handle) for registering this input in the event loop. - # This event is set when there is data available to read from the pipe. - # Note: We use this approach instead of using a regular pipe, like - # returned from `os.pipe()`, because making such a regular pipe - # non-blocking is tricky and this works really well. - self._event = create_win32_event() - - self._closed = False - - # Parser for incoming keys. - self._buffer: list[KeyPress] = [] # Buffer to collect the Key objects. - self.vt100_parser = Vt100Parser(lambda key: self._buffer.append(key)) - - # Identifier for every PipeInput for the hash. - self.__class__._id += 1 - self._id = self.__class__._id - - @classmethod - @contextmanager - def create(cls) -> Iterator[Win32PipeInput]: - event = create_win32_event() - try: - yield Win32PipeInput(_event=event) - finally: - windll.kernel32.CloseHandle(event) - - @property - def closed(self) -> bool: - return self._closed - - def fileno(self) -> int: - """ - The windows pipe doesn't depend on the file handle. - """ - raise NotImplementedError - - @property - def handle(self) -> HANDLE: - "The handle used for registering this pipe in the event loop." - return self._event - - def attach(self, input_ready_callback: Callable[[], None]) -> ContextManager[None]: - """ - Return a context manager that makes this input active in the current - event loop. - """ - return attach_win32_input(self, input_ready_callback) - - def detach(self) -> ContextManager[None]: - """ - Return a context manager that makes sure that this input is not active - in the current event loop. - """ - return detach_win32_input(self) - - def read_keys(self) -> list[KeyPress]: - "Read list of KeyPress." - - # Return result. - result = self._buffer - self._buffer = [] - - # Reset event. - if not self._closed: - # (If closed, the event should not reset.) - windll.kernel32.ResetEvent(self._event) - - return result - - def flush_keys(self) -> list[KeyPress]: - """ - Flush pending keys and return them. - (Used for flushing the 'escape' key.) - """ - # Flush all pending keys. (This is most important to flush the vt100 - # 'Escape' key early when nothing else follows.) - self.vt100_parser.flush() - - # Return result. - result = self._buffer - self._buffer = [] - return result - - def send_bytes(self, data: bytes) -> None: - "Send bytes to the input." - self.send_text(data.decode("utf-8", "ignore")) - - def send_text(self, text: str) -> None: - "Send text to the input." - if self._closed: - raise ValueError("Attempt to write into a closed pipe.") - - # Pass it through our vt100 parser. - self.vt100_parser.feed(text) - - # Set event. - windll.kernel32.SetEvent(self._event) - - def raw_mode(self) -> ContextManager[None]: - return DummyContext() - - def cooked_mode(self) -> ContextManager[None]: - return DummyContext() - - def close(self) -> None: - "Close write-end of the pipe." - self._closed = True - windll.kernel32.SetEvent(self._event) - - def typeahead_hash(self) -> str: - """ - This needs to be unique for every `PipeInput`. - """ - return f"pipe-input-{self._id}" diff --git a/voxvera/vendor/prompt_toolkit/key_binding/__init__.py b/voxvera/vendor/prompt_toolkit/key_binding/__init__.py deleted file mode 100644 index c31746a..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -from __future__ import annotations - -from .key_bindings import ( - ConditionalKeyBindings, - DynamicKeyBindings, - KeyBindings, - KeyBindingsBase, - merge_key_bindings, -) -from .key_processor import KeyPress, KeyPressEvent - -__all__ = [ - # key_bindings. - "ConditionalKeyBindings", - "DynamicKeyBindings", - "KeyBindings", - "KeyBindingsBase", - "merge_key_bindings", - # key_processor - "KeyPress", - "KeyPressEvent", -] diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/__init__.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/auto_suggest.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/auto_suggest.py deleted file mode 100644 index b487f14..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/auto_suggest.py +++ /dev/null @@ -1,66 +0,0 @@ -""" -Key bindings for auto suggestion (for fish-style auto suggestion). -""" - -from __future__ import annotations - -import re - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.filters import Condition, emacs_mode -from prompt_toolkit.key_binding.key_bindings import KeyBindings -from prompt_toolkit.key_binding.key_processor import KeyPressEvent - -__all__ = [ - "load_auto_suggest_bindings", -] - -E = KeyPressEvent - - -def load_auto_suggest_bindings() -> KeyBindings: - """ - Key bindings for accepting auto suggestion text. - - (This has to come after the Vi bindings, because they also have an - implementation for the "right arrow", but we really want the suggestion - binding when a suggestion is available.) - """ - key_bindings = KeyBindings() - handle = key_bindings.add - - @Condition - def suggestion_available() -> bool: - app = get_app() - return ( - app.current_buffer.suggestion is not None - and len(app.current_buffer.suggestion.text) > 0 - and app.current_buffer.document.is_cursor_at_the_end - ) - - @handle("c-f", filter=suggestion_available) - @handle("c-e", filter=suggestion_available) - @handle("right", filter=suggestion_available) - def _accept(event: E) -> None: - """ - Accept suggestion. - """ - b = event.current_buffer - suggestion = b.suggestion - - if suggestion: - b.insert_text(suggestion.text) - - @handle("escape", "f", filter=suggestion_available & emacs_mode) - def _fill(event: E) -> None: - """ - Fill partial suggestion. - """ - b = event.current_buffer - suggestion = b.suggestion - - if suggestion: - t = re.split(r"([^\s/]+(?:\s+|/))", suggestion.text) - b.insert_text(next(x for x in t if x)) - - return key_bindings diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/basic.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/basic.py deleted file mode 100644 index ad18df9..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/basic.py +++ /dev/null @@ -1,257 +0,0 @@ -# pylint: disable=function-redefined -from __future__ import annotations - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.filters import ( - Condition, - emacs_insert_mode, - has_selection, - in_paste_mode, - is_multiline, - vi_insert_mode, -) -from prompt_toolkit.key_binding.key_processor import KeyPress, KeyPressEvent -from prompt_toolkit.keys import Keys - -from ..key_bindings import KeyBindings -from .named_commands import get_by_name - -__all__ = [ - "load_basic_bindings", -] - -E = KeyPressEvent - - -def if_no_repeat(event: E) -> bool: - """Callable that returns True when the previous event was delivered to - another handler.""" - return not event.is_repeat - - -@Condition -def has_text_before_cursor() -> bool: - return bool(get_app().current_buffer.text) - - -@Condition -def in_quoted_insert() -> bool: - return get_app().quoted_insert - - -def load_basic_bindings() -> KeyBindings: - key_bindings = KeyBindings() - insert_mode = vi_insert_mode | emacs_insert_mode - handle = key_bindings.add - - @handle("c-a") - @handle("c-b") - @handle("c-c") - @handle("c-d") - @handle("c-e") - @handle("c-f") - @handle("c-g") - @handle("c-h") - @handle("c-i") - @handle("c-j") - @handle("c-k") - @handle("c-l") - @handle("c-m") - @handle("c-n") - @handle("c-o") - @handle("c-p") - @handle("c-q") - @handle("c-r") - @handle("c-s") - @handle("c-t") - @handle("c-u") - @handle("c-v") - @handle("c-w") - @handle("c-x") - @handle("c-y") - @handle("c-z") - @handle("f1") - @handle("f2") - @handle("f3") - @handle("f4") - @handle("f5") - @handle("f6") - @handle("f7") - @handle("f8") - @handle("f9") - @handle("f10") - @handle("f11") - @handle("f12") - @handle("f13") - @handle("f14") - @handle("f15") - @handle("f16") - @handle("f17") - @handle("f18") - @handle("f19") - @handle("f20") - @handle("f21") - @handle("f22") - @handle("f23") - @handle("f24") - @handle("c-@") # Also c-space. - @handle("c-\\") - @handle("c-]") - @handle("c-^") - @handle("c-_") - @handle("backspace") - @handle("up") - @handle("down") - @handle("right") - @handle("left") - @handle("s-up") - @handle("s-down") - @handle("s-right") - @handle("s-left") - @handle("home") - @handle("end") - @handle("s-home") - @handle("s-end") - @handle("delete") - @handle("s-delete") - @handle("c-delete") - @handle("pageup") - @handle("pagedown") - @handle("s-tab") - @handle("tab") - @handle("c-s-left") - @handle("c-s-right") - @handle("c-s-home") - @handle("c-s-end") - @handle("c-left") - @handle("c-right") - @handle("c-up") - @handle("c-down") - @handle("c-home") - @handle("c-end") - @handle("insert") - @handle("s-insert") - @handle("c-insert") - @handle("") - @handle(Keys.Ignore) - def _ignore(event: E) -> None: - """ - First, for any of these keys, Don't do anything by default. Also don't - catch them in the 'Any' handler which will insert them as data. - - If people want to insert these characters as a literal, they can always - do by doing a quoted insert. (ControlQ in emacs mode, ControlV in Vi - mode.) - """ - pass - - # Readline-style bindings. - handle("home")(get_by_name("beginning-of-line")) - handle("end")(get_by_name("end-of-line")) - handle("left")(get_by_name("backward-char")) - handle("right")(get_by_name("forward-char")) - handle("c-up")(get_by_name("previous-history")) - handle("c-down")(get_by_name("next-history")) - handle("c-l")(get_by_name("clear-screen")) - - handle("c-k", filter=insert_mode)(get_by_name("kill-line")) - handle("c-u", filter=insert_mode)(get_by_name("unix-line-discard")) - handle("backspace", filter=insert_mode, save_before=if_no_repeat)( - get_by_name("backward-delete-char") - ) - handle("delete", filter=insert_mode, save_before=if_no_repeat)( - get_by_name("delete-char") - ) - handle("c-delete", filter=insert_mode, save_before=if_no_repeat)( - get_by_name("delete-char") - ) - handle(Keys.Any, filter=insert_mode, save_before=if_no_repeat)( - get_by_name("self-insert") - ) - handle("c-t", filter=insert_mode)(get_by_name("transpose-chars")) - handle("c-i", filter=insert_mode)(get_by_name("menu-complete")) - handle("s-tab", filter=insert_mode)(get_by_name("menu-complete-backward")) - - # Control-W should delete, using whitespace as separator, while M-Del - # should delete using [^a-zA-Z0-9] as a boundary. - handle("c-w", filter=insert_mode)(get_by_name("unix-word-rubout")) - - handle("pageup", filter=~has_selection)(get_by_name("previous-history")) - handle("pagedown", filter=~has_selection)(get_by_name("next-history")) - - # CTRL keys. - - handle("c-d", filter=has_text_before_cursor & insert_mode)( - get_by_name("delete-char") - ) - - @handle("enter", filter=insert_mode & is_multiline) - def _newline(event: E) -> None: - """ - Newline (in case of multiline input. - """ - event.current_buffer.newline(copy_margin=not in_paste_mode()) - - @handle("c-j") - def _newline2(event: E) -> None: - r""" - By default, handle \n as if it were a \r (enter). - (It appears that some terminals send \n instead of \r when pressing - enter. - at least the Linux subsystem for Windows.) - """ - event.key_processor.feed(KeyPress(Keys.ControlM, "\r"), first=True) - - # Delete the word before the cursor. - - @handle("up") - def _go_up(event: E) -> None: - event.current_buffer.auto_up(count=event.arg) - - @handle("down") - def _go_down(event: E) -> None: - event.current_buffer.auto_down(count=event.arg) - - @handle("delete", filter=has_selection) - def _cut(event: E) -> None: - data = event.current_buffer.cut_selection() - event.app.clipboard.set_data(data) - - # Global bindings. - - @handle("c-z") - def _insert_ctrl_z(event: E) -> None: - """ - By default, control-Z should literally insert Ctrl-Z. - (Ansi Ctrl-Z, code 26 in MSDOS means End-Of-File. - In a Python REPL for instance, it's possible to type - Control-Z followed by enter to quit.) - - When the system bindings are loaded and suspend-to-background is - supported, that will override this binding. - """ - event.current_buffer.insert_text(event.data) - - @handle(Keys.BracketedPaste) - def _paste(event: E) -> None: - """ - Pasting from clipboard. - """ - data = event.data - - # Be sure to use \n as line ending. - # Some terminals (Like iTerm2) seem to paste \r\n line endings in a - # bracketed paste. See: https://github.com/ipython/ipython/issues/9737 - data = data.replace("\r\n", "\n") - data = data.replace("\r", "\n") - - event.current_buffer.insert_text(data) - - @handle(Keys.Any, filter=in_quoted_insert, eager=True) - def _insert_text(event: E) -> None: - """ - Handle quoted insert. - """ - event.current_buffer.insert_text(event.data, overwrite=False) - event.app.quoted_insert = False - - return key_bindings diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/completion.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/completion.py deleted file mode 100644 index 8c5e005..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/completion.py +++ /dev/null @@ -1,206 +0,0 @@ -""" -Key binding handlers for displaying completions. -""" - -from __future__ import annotations - -import asyncio -import math -from typing import TYPE_CHECKING - -from prompt_toolkit.application.run_in_terminal import in_terminal -from prompt_toolkit.completion import ( - CompleteEvent, - Completion, - get_common_complete_suffix, -) -from prompt_toolkit.formatted_text import StyleAndTextTuples -from prompt_toolkit.key_binding.key_bindings import KeyBindings -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.keys import Keys -from prompt_toolkit.utils import get_cwidth - -if TYPE_CHECKING: - from prompt_toolkit.application import Application - from prompt_toolkit.shortcuts import PromptSession - -__all__ = [ - "generate_completions", - "display_completions_like_readline", -] - -E = KeyPressEvent - - -def generate_completions(event: E) -> None: - r""" - Tab-completion: where the first tab completes the common suffix and the - second tab lists all the completions. - """ - b = event.current_buffer - - # When already navigating through completions, select the next one. - if b.complete_state: - b.complete_next() - else: - b.start_completion(insert_common_part=True) - - -def display_completions_like_readline(event: E) -> None: - """ - Key binding handler for readline-style tab completion. - This is meant to be as similar as possible to the way how readline displays - completions. - - Generate the completions immediately (blocking) and display them above the - prompt in columns. - - Usage:: - - # Call this handler when 'Tab' has been pressed. - key_bindings.add(Keys.ControlI)(display_completions_like_readline) - """ - # Request completions. - b = event.current_buffer - if b.completer is None: - return - complete_event = CompleteEvent(completion_requested=True) - completions = list(b.completer.get_completions(b.document, complete_event)) - - # Calculate the common suffix. - common_suffix = get_common_complete_suffix(b.document, completions) - - # One completion: insert it. - if len(completions) == 1: - b.delete_before_cursor(-completions[0].start_position) - b.insert_text(completions[0].text) - # Multiple completions with common part. - elif common_suffix: - b.insert_text(common_suffix) - # Otherwise: display all completions. - elif completions: - _display_completions_like_readline(event.app, completions) - - -def _display_completions_like_readline( - app: Application[object], completions: list[Completion] -) -> asyncio.Task[None]: - """ - Display the list of completions in columns above the prompt. - This will ask for a confirmation if there are too many completions to fit - on a single page and provide a paginator to walk through them. - """ - from prompt_toolkit.formatted_text import to_formatted_text - from prompt_toolkit.shortcuts.prompt import create_confirm_session - - # Get terminal dimensions. - term_size = app.output.get_size() - term_width = term_size.columns - term_height = term_size.rows - - # Calculate amount of required columns/rows for displaying the - # completions. (Keep in mind that completions are displayed - # alphabetically column-wise.) - max_compl_width = min( - term_width, max(get_cwidth(c.display_text) for c in completions) + 1 - ) - column_count = max(1, term_width // max_compl_width) - completions_per_page = column_count * (term_height - 1) - page_count = int(math.ceil(len(completions) / float(completions_per_page))) - # Note: math.ceil can return float on Python2. - - def display(page: int) -> None: - # Display completions. - page_completions = completions[ - page * completions_per_page : (page + 1) * completions_per_page - ] - - page_row_count = int(math.ceil(len(page_completions) / float(column_count))) - page_columns = [ - page_completions[i * page_row_count : (i + 1) * page_row_count] - for i in range(column_count) - ] - - result: StyleAndTextTuples = [] - - for r in range(page_row_count): - for c in range(column_count): - try: - completion = page_columns[c][r] - style = "class:readline-like-completions.completion " + ( - completion.style or "" - ) - - result.extend(to_formatted_text(completion.display, style=style)) - - # Add padding. - padding = max_compl_width - get_cwidth(completion.display_text) - result.append((completion.style, " " * padding)) - except IndexError: - pass - result.append(("", "\n")) - - app.print_text(to_formatted_text(result, "class:readline-like-completions")) - - # User interaction through an application generator function. - async def run_compl() -> None: - "Coroutine." - async with in_terminal(render_cli_done=True): - if len(completions) > completions_per_page: - # Ask confirmation if it doesn't fit on the screen. - confirm = await create_confirm_session( - f"Display all {len(completions)} possibilities?", - ).prompt_async() - - if confirm: - # Display pages. - for page in range(page_count): - display(page) - - if page != page_count - 1: - # Display --MORE-- and go to the next page. - show_more = await _create_more_session( - "--MORE--" - ).prompt_async() - - if not show_more: - return - else: - app.output.flush() - else: - # Display all completions. - display(0) - - return app.create_background_task(run_compl()) - - -def _create_more_session(message: str = "--MORE--") -> PromptSession[bool]: - """ - Create a `PromptSession` object for displaying the "--MORE--". - """ - from prompt_toolkit.shortcuts import PromptSession - - bindings = KeyBindings() - - @bindings.add(" ") - @bindings.add("y") - @bindings.add("Y") - @bindings.add(Keys.ControlJ) - @bindings.add(Keys.ControlM) - @bindings.add(Keys.ControlI) # Tab. - def _yes(event: E) -> None: - event.app.exit(result=True) - - @bindings.add("n") - @bindings.add("N") - @bindings.add("q") - @bindings.add("Q") - @bindings.add(Keys.ControlC) - def _no(event: E) -> None: - event.app.exit(result=False) - - @bindings.add(Keys.Any) - def _ignore(event: E) -> None: - "Disable inserting of text." - - return PromptSession(message, key_bindings=bindings, erase_when_done=True) diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/cpr.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/cpr.py deleted file mode 100644 index cd9df0a..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/cpr.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import annotations - -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.keys import Keys - -from ..key_bindings import KeyBindings - -__all__ = [ - "load_cpr_bindings", -] - -E = KeyPressEvent - - -def load_cpr_bindings() -> KeyBindings: - key_bindings = KeyBindings() - - @key_bindings.add(Keys.CPRResponse, save_before=lambda e: False) - def _(event: E) -> None: - """ - Handle incoming Cursor-Position-Request response. - """ - # The incoming data looks like u'\x1b[35;1R' - # Parse row/col information. - row, col = map(int, event.data[2:-1].split(";")) - - # Report absolute cursor position to the renderer. - event.app.renderer.report_absolute_cursor_row(row) - - return key_bindings diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/emacs.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/emacs.py deleted file mode 100644 index 207afba..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/emacs.py +++ /dev/null @@ -1,563 +0,0 @@ -# pylint: disable=function-redefined -from __future__ import annotations - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.buffer import Buffer, indent, unindent -from prompt_toolkit.completion import CompleteEvent -from prompt_toolkit.filters import ( - Condition, - emacs_insert_mode, - emacs_mode, - has_arg, - has_selection, - in_paste_mode, - is_multiline, - is_read_only, - shift_selection_mode, - vi_search_direction_reversed, -) -from prompt_toolkit.key_binding.key_bindings import Binding -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.keys import Keys -from prompt_toolkit.selection import SelectionType - -from ..key_bindings import ConditionalKeyBindings, KeyBindings, KeyBindingsBase -from .named_commands import get_by_name - -__all__ = [ - "load_emacs_bindings", - "load_emacs_search_bindings", - "load_emacs_shift_selection_bindings", -] - -E = KeyPressEvent - - -@Condition -def is_returnable() -> bool: - return get_app().current_buffer.is_returnable - - -@Condition -def is_arg() -> bool: - return get_app().key_processor.arg == "-" - - -def load_emacs_bindings() -> KeyBindingsBase: - """ - Some e-macs extensions. - """ - # Overview of Readline emacs commands: - # http://www.catonmat.net/download/readline-emacs-editing-mode-cheat-sheet.pdf - key_bindings = KeyBindings() - handle = key_bindings.add - - insert_mode = emacs_insert_mode - - @handle("escape") - def _esc(event: E) -> None: - """ - By default, ignore escape key. - - (If we don't put this here, and Esc is followed by a key which sequence - is not handled, we'll insert an Escape character in the input stream. - Something we don't want and happens to easily in emacs mode. - Further, people can always use ControlQ to do a quoted insert.) - """ - pass - - handle("c-a")(get_by_name("beginning-of-line")) - handle("c-b")(get_by_name("backward-char")) - handle("c-delete", filter=insert_mode)(get_by_name("kill-word")) - handle("c-e")(get_by_name("end-of-line")) - handle("c-f")(get_by_name("forward-char")) - handle("c-left")(get_by_name("backward-word")) - handle("c-right")(get_by_name("forward-word")) - handle("c-x", "r", "y", filter=insert_mode)(get_by_name("yank")) - handle("c-y", filter=insert_mode)(get_by_name("yank")) - handle("escape", "b")(get_by_name("backward-word")) - handle("escape", "c", filter=insert_mode)(get_by_name("capitalize-word")) - handle("escape", "d", filter=insert_mode)(get_by_name("kill-word")) - handle("escape", "f")(get_by_name("forward-word")) - handle("escape", "l", filter=insert_mode)(get_by_name("downcase-word")) - handle("escape", "u", filter=insert_mode)(get_by_name("uppercase-word")) - handle("escape", "y", filter=insert_mode)(get_by_name("yank-pop")) - handle("escape", "backspace", filter=insert_mode)(get_by_name("backward-kill-word")) - handle("escape", "\\", filter=insert_mode)(get_by_name("delete-horizontal-space")) - - handle("c-home")(get_by_name("beginning-of-buffer")) - handle("c-end")(get_by_name("end-of-buffer")) - - handle("c-_", save_before=(lambda e: False), filter=insert_mode)( - get_by_name("undo") - ) - - handle("c-x", "c-u", save_before=(lambda e: False), filter=insert_mode)( - get_by_name("undo") - ) - - handle("escape", "<", filter=~has_selection)(get_by_name("beginning-of-history")) - handle("escape", ">", filter=~has_selection)(get_by_name("end-of-history")) - - handle("escape", ".", filter=insert_mode)(get_by_name("yank-last-arg")) - handle("escape", "_", filter=insert_mode)(get_by_name("yank-last-arg")) - handle("escape", "c-y", filter=insert_mode)(get_by_name("yank-nth-arg")) - handle("escape", "#", filter=insert_mode)(get_by_name("insert-comment")) - handle("c-o")(get_by_name("operate-and-get-next")) - - # ControlQ does a quoted insert. Not that for vt100 terminals, you have to - # disable flow control by running ``stty -ixon``, otherwise Ctrl-Q and - # Ctrl-S are captured by the terminal. - handle("c-q", filter=~has_selection)(get_by_name("quoted-insert")) - - handle("c-x", "(")(get_by_name("start-kbd-macro")) - handle("c-x", ")")(get_by_name("end-kbd-macro")) - handle("c-x", "e")(get_by_name("call-last-kbd-macro")) - - @handle("c-n") - def _next(event: E) -> None: - "Next line." - event.current_buffer.auto_down() - - @handle("c-p") - def _prev(event: E) -> None: - "Previous line." - event.current_buffer.auto_up(count=event.arg) - - def handle_digit(c: str) -> None: - """ - Handle input of arguments. - The first number needs to be preceded by escape. - """ - - @handle(c, filter=has_arg) - @handle("escape", c) - def _(event: E) -> None: - event.append_to_arg_count(c) - - for c in "0123456789": - handle_digit(c) - - @handle("escape", "-", filter=~has_arg) - def _meta_dash(event: E) -> None: - """""" - if event._arg is None: - event.append_to_arg_count("-") - - @handle("-", filter=is_arg) - def _dash(event: E) -> None: - """ - When '-' is typed again, after exactly '-' has been given as an - argument, ignore this. - """ - event.app.key_processor.arg = "-" - - # Meta + Enter: always accept input. - handle("escape", "enter", filter=insert_mode & is_returnable)( - get_by_name("accept-line") - ) - - # Enter: accept input in single line mode. - handle("enter", filter=insert_mode & is_returnable & ~is_multiline)( - get_by_name("accept-line") - ) - - def character_search(buff: Buffer, char: str, count: int) -> None: - if count < 0: - match = buff.document.find_backwards( - char, in_current_line=True, count=-count - ) - else: - match = buff.document.find(char, in_current_line=True, count=count) - - if match is not None: - buff.cursor_position += match - - @handle("c-]", Keys.Any) - def _goto_char(event: E) -> None: - "When Ctl-] + a character is pressed. go to that character." - # Also named 'character-search' - character_search(event.current_buffer, event.data, event.arg) - - @handle("escape", "c-]", Keys.Any) - def _goto_char_backwards(event: E) -> None: - "Like Ctl-], but backwards." - # Also named 'character-search-backward' - character_search(event.current_buffer, event.data, -event.arg) - - @handle("escape", "a") - def _prev_sentence(event: E) -> None: - "Previous sentence." - # TODO: - - @handle("escape", "e") - def _end_of_sentence(event: E) -> None: - "Move to end of sentence." - # TODO: - - @handle("escape", "t", filter=insert_mode) - def _swap_characters(event: E) -> None: - """ - Swap the last two words before the cursor. - """ - # TODO - - @handle("escape", "*", filter=insert_mode) - def _insert_all_completions(event: E) -> None: - """ - `meta-*`: Insert all possible completions of the preceding text. - """ - buff = event.current_buffer - - # List all completions. - complete_event = CompleteEvent(text_inserted=False, completion_requested=True) - completions = list( - buff.completer.get_completions(buff.document, complete_event) - ) - - # Insert them. - text_to_insert = " ".join(c.text for c in completions) - buff.insert_text(text_to_insert) - - @handle("c-x", "c-x") - def _toggle_start_end(event: E) -> None: - """ - Move cursor back and forth between the start and end of the current - line. - """ - buffer = event.current_buffer - - if buffer.document.is_cursor_at_the_end_of_line: - buffer.cursor_position += buffer.document.get_start_of_line_position( - after_whitespace=False - ) - else: - buffer.cursor_position += buffer.document.get_end_of_line_position() - - @handle("c-@") # Control-space or Control-@ - def _start_selection(event: E) -> None: - """ - Start of the selection (if the current buffer is not empty). - """ - # Take the current cursor position as the start of this selection. - buff = event.current_buffer - if buff.text: - buff.start_selection(selection_type=SelectionType.CHARACTERS) - - @handle("c-g", filter=~has_selection) - def _cancel(event: E) -> None: - """ - Control + G: Cancel completion menu and validation state. - """ - event.current_buffer.complete_state = None - event.current_buffer.validation_error = None - - @handle("c-g", filter=has_selection) - def _cancel_selection(event: E) -> None: - """ - Cancel selection. - """ - event.current_buffer.exit_selection() - - @handle("c-w", filter=has_selection) - @handle("c-x", "r", "k", filter=has_selection) - def _cut(event: E) -> None: - """ - Cut selected text. - """ - data = event.current_buffer.cut_selection() - event.app.clipboard.set_data(data) - - @handle("escape", "w", filter=has_selection) - def _copy(event: E) -> None: - """ - Copy selected text. - """ - data = event.current_buffer.copy_selection() - event.app.clipboard.set_data(data) - - @handle("escape", "left") - def _start_of_word(event: E) -> None: - """ - Cursor to start of previous word. - """ - buffer = event.current_buffer - buffer.cursor_position += ( - buffer.document.find_previous_word_beginning(count=event.arg) or 0 - ) - - @handle("escape", "right") - def _start_next_word(event: E) -> None: - """ - Cursor to start of next word. - """ - buffer = event.current_buffer - buffer.cursor_position += ( - buffer.document.find_next_word_beginning(count=event.arg) - or buffer.document.get_end_of_document_position() - ) - - @handle("escape", "/", filter=insert_mode) - def _complete(event: E) -> None: - """ - M-/: Complete. - """ - b = event.current_buffer - if b.complete_state: - b.complete_next() - else: - b.start_completion(select_first=True) - - @handle("c-c", ">", filter=has_selection) - def _indent(event: E) -> None: - """ - Indent selected text. - """ - buffer = event.current_buffer - - buffer.cursor_position += buffer.document.get_start_of_line_position( - after_whitespace=True - ) - - from_, to = buffer.document.selection_range() - from_, _ = buffer.document.translate_index_to_position(from_) - to, _ = buffer.document.translate_index_to_position(to) - - indent(buffer, from_, to + 1, count=event.arg) - - @handle("c-c", "<", filter=has_selection) - def _unindent(event: E) -> None: - """ - Unindent selected text. - """ - buffer = event.current_buffer - - from_, to = buffer.document.selection_range() - from_, _ = buffer.document.translate_index_to_position(from_) - to, _ = buffer.document.translate_index_to_position(to) - - unindent(buffer, from_, to + 1, count=event.arg) - - return ConditionalKeyBindings(key_bindings, emacs_mode) - - -def load_emacs_search_bindings() -> KeyBindingsBase: - key_bindings = KeyBindings() - handle = key_bindings.add - from . import search - - # NOTE: We don't bind 'Escape' to 'abort_search'. The reason is that we - # want Alt+Enter to accept input directly in incremental search mode. - # Instead, we have double escape. - - handle("c-r")(search.start_reverse_incremental_search) - handle("c-s")(search.start_forward_incremental_search) - - handle("c-c")(search.abort_search) - handle("c-g")(search.abort_search) - handle("c-r")(search.reverse_incremental_search) - handle("c-s")(search.forward_incremental_search) - handle("up")(search.reverse_incremental_search) - handle("down")(search.forward_incremental_search) - handle("enter")(search.accept_search) - - # Handling of escape. - handle("escape", eager=True)(search.accept_search) - - # Like Readline, it's more natural to accept the search when escape has - # been pressed, however instead the following two bindings could be used - # instead. - # #handle('escape', 'escape', eager=True)(search.abort_search) - # #handle('escape', 'enter', eager=True)(search.accept_search_and_accept_input) - - # If Read-only: also include the following key bindings: - - # '/' and '?' key bindings for searching, just like Vi mode. - handle("?", filter=is_read_only & ~vi_search_direction_reversed)( - search.start_reverse_incremental_search - ) - handle("/", filter=is_read_only & ~vi_search_direction_reversed)( - search.start_forward_incremental_search - ) - handle("?", filter=is_read_only & vi_search_direction_reversed)( - search.start_forward_incremental_search - ) - handle("/", filter=is_read_only & vi_search_direction_reversed)( - search.start_reverse_incremental_search - ) - - @handle("n", filter=is_read_only) - def _jump_next(event: E) -> None: - "Jump to next match." - event.current_buffer.apply_search( - event.app.current_search_state, - include_current_position=False, - count=event.arg, - ) - - @handle("N", filter=is_read_only) - def _jump_prev(event: E) -> None: - "Jump to previous match." - event.current_buffer.apply_search( - ~event.app.current_search_state, - include_current_position=False, - count=event.arg, - ) - - return ConditionalKeyBindings(key_bindings, emacs_mode) - - -def load_emacs_shift_selection_bindings() -> KeyBindingsBase: - """ - Bindings to select text with shift + cursor movements - """ - - key_bindings = KeyBindings() - handle = key_bindings.add - - def unshift_move(event: E) -> None: - """ - Used for the shift selection mode. When called with - a shift + movement key press event, moves the cursor - as if shift is not pressed. - """ - key = event.key_sequence[0].key - - if key == Keys.ShiftUp: - event.current_buffer.auto_up(count=event.arg) - return - if key == Keys.ShiftDown: - event.current_buffer.auto_down(count=event.arg) - return - - # the other keys are handled through their readline command - key_to_command: dict[Keys | str, str] = { - Keys.ShiftLeft: "backward-char", - Keys.ShiftRight: "forward-char", - Keys.ShiftHome: "beginning-of-line", - Keys.ShiftEnd: "end-of-line", - Keys.ControlShiftLeft: "backward-word", - Keys.ControlShiftRight: "forward-word", - Keys.ControlShiftHome: "beginning-of-buffer", - Keys.ControlShiftEnd: "end-of-buffer", - } - - try: - # Both the dict lookup and `get_by_name` can raise KeyError. - binding = get_by_name(key_to_command[key]) - except KeyError: - pass - else: # (`else` is not really needed here.) - if isinstance(binding, Binding): - # (It should always be a binding here) - binding.call(event) - - @handle("s-left", filter=~has_selection) - @handle("s-right", filter=~has_selection) - @handle("s-up", filter=~has_selection) - @handle("s-down", filter=~has_selection) - @handle("s-home", filter=~has_selection) - @handle("s-end", filter=~has_selection) - @handle("c-s-left", filter=~has_selection) - @handle("c-s-right", filter=~has_selection) - @handle("c-s-home", filter=~has_selection) - @handle("c-s-end", filter=~has_selection) - def _start_selection(event: E) -> None: - """ - Start selection with shift + movement. - """ - # Take the current cursor position as the start of this selection. - buff = event.current_buffer - if buff.text: - buff.start_selection(selection_type=SelectionType.CHARACTERS) - - if buff.selection_state is not None: - # (`selection_state` should never be `None`, it is created by - # `start_selection`.) - buff.selection_state.enter_shift_mode() - - # Then move the cursor - original_position = buff.cursor_position - unshift_move(event) - if buff.cursor_position == original_position: - # Cursor didn't actually move - so cancel selection - # to avoid having an empty selection - buff.exit_selection() - - @handle("s-left", filter=shift_selection_mode) - @handle("s-right", filter=shift_selection_mode) - @handle("s-up", filter=shift_selection_mode) - @handle("s-down", filter=shift_selection_mode) - @handle("s-home", filter=shift_selection_mode) - @handle("s-end", filter=shift_selection_mode) - @handle("c-s-left", filter=shift_selection_mode) - @handle("c-s-right", filter=shift_selection_mode) - @handle("c-s-home", filter=shift_selection_mode) - @handle("c-s-end", filter=shift_selection_mode) - def _extend_selection(event: E) -> None: - """ - Extend the selection - """ - # Just move the cursor, like shift was not pressed - unshift_move(event) - buff = event.current_buffer - - if buff.selection_state is not None: - if buff.cursor_position == buff.selection_state.original_cursor_position: - # selection is now empty, so cancel selection - buff.exit_selection() - - @handle(Keys.Any, filter=shift_selection_mode) - def _replace_selection(event: E) -> None: - """ - Replace selection by what is typed - """ - event.current_buffer.cut_selection() - get_by_name("self-insert").call(event) - - @handle("enter", filter=shift_selection_mode & is_multiline) - def _newline(event: E) -> None: - """ - A newline replaces the selection - """ - event.current_buffer.cut_selection() - event.current_buffer.newline(copy_margin=not in_paste_mode()) - - @handle("backspace", filter=shift_selection_mode) - def _delete(event: E) -> None: - """ - Delete selection. - """ - event.current_buffer.cut_selection() - - @handle("c-y", filter=shift_selection_mode) - def _yank(event: E) -> None: - """ - In shift selection mode, yanking (pasting) replace the selection. - """ - buff = event.current_buffer - if buff.selection_state: - buff.cut_selection() - get_by_name("yank").call(event) - - # moving the cursor in shift selection mode cancels the selection - @handle("left", filter=shift_selection_mode) - @handle("right", filter=shift_selection_mode) - @handle("up", filter=shift_selection_mode) - @handle("down", filter=shift_selection_mode) - @handle("home", filter=shift_selection_mode) - @handle("end", filter=shift_selection_mode) - @handle("c-left", filter=shift_selection_mode) - @handle("c-right", filter=shift_selection_mode) - @handle("c-home", filter=shift_selection_mode) - @handle("c-end", filter=shift_selection_mode) - def _cancel(event: E) -> None: - """ - Cancel selection. - """ - event.current_buffer.exit_selection() - # we then process the cursor movement - key_press = event.key_sequence[0] - event.key_processor.feed(key_press, first=True) - - return ConditionalKeyBindings(key_bindings, emacs_mode) diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/focus.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/focus.py deleted file mode 100644 index 24aa3ce..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/focus.py +++ /dev/null @@ -1,26 +0,0 @@ -from __future__ import annotations - -from prompt_toolkit.key_binding.key_processor import KeyPressEvent - -__all__ = [ - "focus_next", - "focus_previous", -] - -E = KeyPressEvent - - -def focus_next(event: E) -> None: - """ - Focus the next visible Window. - (Often bound to the `Tab` key.) - """ - event.app.layout.focus_next() - - -def focus_previous(event: E) -> None: - """ - Focus the previous visible Window. - (Often bound to the `BackTab` key.) - """ - event.app.layout.focus_previous() diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/mouse.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/mouse.py deleted file mode 100644 index cb426ce..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/mouse.py +++ /dev/null @@ -1,348 +0,0 @@ -from __future__ import annotations - -import sys -from typing import TYPE_CHECKING - -from prompt_toolkit.data_structures import Point -from prompt_toolkit.key_binding.key_processor import KeyPress, KeyPressEvent -from prompt_toolkit.keys import Keys -from prompt_toolkit.mouse_events import ( - MouseButton, - MouseEvent, - MouseEventType, - MouseModifier, -) - -from ..key_bindings import KeyBindings - -if TYPE_CHECKING: - from prompt_toolkit.key_binding.key_bindings import NotImplementedOrNone - -__all__ = [ - "load_mouse_bindings", -] - -E = KeyPressEvent - -# fmt: off -SCROLL_UP = MouseEventType.SCROLL_UP -SCROLL_DOWN = MouseEventType.SCROLL_DOWN -MOUSE_DOWN = MouseEventType.MOUSE_DOWN -MOUSE_MOVE = MouseEventType.MOUSE_MOVE -MOUSE_UP = MouseEventType.MOUSE_UP - -NO_MODIFIER : frozenset[MouseModifier] = frozenset() -SHIFT : frozenset[MouseModifier] = frozenset({MouseModifier.SHIFT}) -ALT : frozenset[MouseModifier] = frozenset({MouseModifier.ALT}) -SHIFT_ALT : frozenset[MouseModifier] = frozenset({MouseModifier.SHIFT, MouseModifier.ALT}) -CONTROL : frozenset[MouseModifier] = frozenset({MouseModifier.CONTROL}) -SHIFT_CONTROL : frozenset[MouseModifier] = frozenset({MouseModifier.SHIFT, MouseModifier.CONTROL}) -ALT_CONTROL : frozenset[MouseModifier] = frozenset({MouseModifier.ALT, MouseModifier.CONTROL}) -SHIFT_ALT_CONTROL: frozenset[MouseModifier] = frozenset({MouseModifier.SHIFT, MouseModifier.ALT, MouseModifier.CONTROL}) -UNKNOWN_MODIFIER : frozenset[MouseModifier] = frozenset() - -LEFT = MouseButton.LEFT -MIDDLE = MouseButton.MIDDLE -RIGHT = MouseButton.RIGHT -NO_BUTTON = MouseButton.NONE -UNKNOWN_BUTTON = MouseButton.UNKNOWN - -xterm_sgr_mouse_events = { - ( 0, "m") : (LEFT, MOUSE_UP, NO_MODIFIER), # left_up 0+ + + =0 - ( 4, "m") : (LEFT, MOUSE_UP, SHIFT), # left_up Shift 0+4+ + =4 - ( 8, "m") : (LEFT, MOUSE_UP, ALT), # left_up Alt 0+ +8+ =8 - (12, "m") : (LEFT, MOUSE_UP, SHIFT_ALT), # left_up Shift Alt 0+4+8+ =12 - (16, "m") : (LEFT, MOUSE_UP, CONTROL), # left_up Control 0+ + +16=16 - (20, "m") : (LEFT, MOUSE_UP, SHIFT_CONTROL), # left_up Shift Control 0+4+ +16=20 - (24, "m") : (LEFT, MOUSE_UP, ALT_CONTROL), # left_up Alt Control 0+ +8+16=24 - (28, "m") : (LEFT, MOUSE_UP, SHIFT_ALT_CONTROL), # left_up Shift Alt Control 0+4+8+16=28 - - ( 1, "m") : (MIDDLE, MOUSE_UP, NO_MODIFIER), # middle_up 1+ + + =1 - ( 5, "m") : (MIDDLE, MOUSE_UP, SHIFT), # middle_up Shift 1+4+ + =5 - ( 9, "m") : (MIDDLE, MOUSE_UP, ALT), # middle_up Alt 1+ +8+ =9 - (13, "m") : (MIDDLE, MOUSE_UP, SHIFT_ALT), # middle_up Shift Alt 1+4+8+ =13 - (17, "m") : (MIDDLE, MOUSE_UP, CONTROL), # middle_up Control 1+ + +16=17 - (21, "m") : (MIDDLE, MOUSE_UP, SHIFT_CONTROL), # middle_up Shift Control 1+4+ +16=21 - (25, "m") : (MIDDLE, MOUSE_UP, ALT_CONTROL), # middle_up Alt Control 1+ +8+16=25 - (29, "m") : (MIDDLE, MOUSE_UP, SHIFT_ALT_CONTROL), # middle_up Shift Alt Control 1+4+8+16=29 - - ( 2, "m") : (RIGHT, MOUSE_UP, NO_MODIFIER), # right_up 2+ + + =2 - ( 6, "m") : (RIGHT, MOUSE_UP, SHIFT), # right_up Shift 2+4+ + =6 - (10, "m") : (RIGHT, MOUSE_UP, ALT), # right_up Alt 2+ +8+ =10 - (14, "m") : (RIGHT, MOUSE_UP, SHIFT_ALT), # right_up Shift Alt 2+4+8+ =14 - (18, "m") : (RIGHT, MOUSE_UP, CONTROL), # right_up Control 2+ + +16=18 - (22, "m") : (RIGHT, MOUSE_UP, SHIFT_CONTROL), # right_up Shift Control 2+4+ +16=22 - (26, "m") : (RIGHT, MOUSE_UP, ALT_CONTROL), # right_up Alt Control 2+ +8+16=26 - (30, "m") : (RIGHT, MOUSE_UP, SHIFT_ALT_CONTROL), # right_up Shift Alt Control 2+4+8+16=30 - - ( 0, "M") : (LEFT, MOUSE_DOWN, NO_MODIFIER), # left_down 0+ + + =0 - ( 4, "M") : (LEFT, MOUSE_DOWN, SHIFT), # left_down Shift 0+4+ + =4 - ( 8, "M") : (LEFT, MOUSE_DOWN, ALT), # left_down Alt 0+ +8+ =8 - (12, "M") : (LEFT, MOUSE_DOWN, SHIFT_ALT), # left_down Shift Alt 0+4+8+ =12 - (16, "M") : (LEFT, MOUSE_DOWN, CONTROL), # left_down Control 0+ + +16=16 - (20, "M") : (LEFT, MOUSE_DOWN, SHIFT_CONTROL), # left_down Shift Control 0+4+ +16=20 - (24, "M") : (LEFT, MOUSE_DOWN, ALT_CONTROL), # left_down Alt Control 0+ +8+16=24 - (28, "M") : (LEFT, MOUSE_DOWN, SHIFT_ALT_CONTROL), # left_down Shift Alt Control 0+4+8+16=28 - - ( 1, "M") : (MIDDLE, MOUSE_DOWN, NO_MODIFIER), # middle_down 1+ + + =1 - ( 5, "M") : (MIDDLE, MOUSE_DOWN, SHIFT), # middle_down Shift 1+4+ + =5 - ( 9, "M") : (MIDDLE, MOUSE_DOWN, ALT), # middle_down Alt 1+ +8+ =9 - (13, "M") : (MIDDLE, MOUSE_DOWN, SHIFT_ALT), # middle_down Shift Alt 1+4+8+ =13 - (17, "M") : (MIDDLE, MOUSE_DOWN, CONTROL), # middle_down Control 1+ + +16=17 - (21, "M") : (MIDDLE, MOUSE_DOWN, SHIFT_CONTROL), # middle_down Shift Control 1+4+ +16=21 - (25, "M") : (MIDDLE, MOUSE_DOWN, ALT_CONTROL), # middle_down Alt Control 1+ +8+16=25 - (29, "M") : (MIDDLE, MOUSE_DOWN, SHIFT_ALT_CONTROL), # middle_down Shift Alt Control 1+4+8+16=29 - - ( 2, "M") : (RIGHT, MOUSE_DOWN, NO_MODIFIER), # right_down 2+ + + =2 - ( 6, "M") : (RIGHT, MOUSE_DOWN, SHIFT), # right_down Shift 2+4+ + =6 - (10, "M") : (RIGHT, MOUSE_DOWN, ALT), # right_down Alt 2+ +8+ =10 - (14, "M") : (RIGHT, MOUSE_DOWN, SHIFT_ALT), # right_down Shift Alt 2+4+8+ =14 - (18, "M") : (RIGHT, MOUSE_DOWN, CONTROL), # right_down Control 2+ + +16=18 - (22, "M") : (RIGHT, MOUSE_DOWN, SHIFT_CONTROL), # right_down Shift Control 2+4+ +16=22 - (26, "M") : (RIGHT, MOUSE_DOWN, ALT_CONTROL), # right_down Alt Control 2+ +8+16=26 - (30, "M") : (RIGHT, MOUSE_DOWN, SHIFT_ALT_CONTROL), # right_down Shift Alt Control 2+4+8+16=30 - - (32, "M") : (LEFT, MOUSE_MOVE, NO_MODIFIER), # left_drag 32+ + + =32 - (36, "M") : (LEFT, MOUSE_MOVE, SHIFT), # left_drag Shift 32+4+ + =36 - (40, "M") : (LEFT, MOUSE_MOVE, ALT), # left_drag Alt 32+ +8+ =40 - (44, "M") : (LEFT, MOUSE_MOVE, SHIFT_ALT), # left_drag Shift Alt 32+4+8+ =44 - (48, "M") : (LEFT, MOUSE_MOVE, CONTROL), # left_drag Control 32+ + +16=48 - (52, "M") : (LEFT, MOUSE_MOVE, SHIFT_CONTROL), # left_drag Shift Control 32+4+ +16=52 - (56, "M") : (LEFT, MOUSE_MOVE, ALT_CONTROL), # left_drag Alt Control 32+ +8+16=56 - (60, "M") : (LEFT, MOUSE_MOVE, SHIFT_ALT_CONTROL), # left_drag Shift Alt Control 32+4+8+16=60 - - (33, "M") : (MIDDLE, MOUSE_MOVE, NO_MODIFIER), # middle_drag 33+ + + =33 - (37, "M") : (MIDDLE, MOUSE_MOVE, SHIFT), # middle_drag Shift 33+4+ + =37 - (41, "M") : (MIDDLE, MOUSE_MOVE, ALT), # middle_drag Alt 33+ +8+ =41 - (45, "M") : (MIDDLE, MOUSE_MOVE, SHIFT_ALT), # middle_drag Shift Alt 33+4+8+ =45 - (49, "M") : (MIDDLE, MOUSE_MOVE, CONTROL), # middle_drag Control 33+ + +16=49 - (53, "M") : (MIDDLE, MOUSE_MOVE, SHIFT_CONTROL), # middle_drag Shift Control 33+4+ +16=53 - (57, "M") : (MIDDLE, MOUSE_MOVE, ALT_CONTROL), # middle_drag Alt Control 33+ +8+16=57 - (61, "M") : (MIDDLE, MOUSE_MOVE, SHIFT_ALT_CONTROL), # middle_drag Shift Alt Control 33+4+8+16=61 - - (34, "M") : (RIGHT, MOUSE_MOVE, NO_MODIFIER), # right_drag 34+ + + =34 - (38, "M") : (RIGHT, MOUSE_MOVE, SHIFT), # right_drag Shift 34+4+ + =38 - (42, "M") : (RIGHT, MOUSE_MOVE, ALT), # right_drag Alt 34+ +8+ =42 - (46, "M") : (RIGHT, MOUSE_MOVE, SHIFT_ALT), # right_drag Shift Alt 34+4+8+ =46 - (50, "M") : (RIGHT, MOUSE_MOVE, CONTROL), # right_drag Control 34+ + +16=50 - (54, "M") : (RIGHT, MOUSE_MOVE, SHIFT_CONTROL), # right_drag Shift Control 34+4+ +16=54 - (58, "M") : (RIGHT, MOUSE_MOVE, ALT_CONTROL), # right_drag Alt Control 34+ +8+16=58 - (62, "M") : (RIGHT, MOUSE_MOVE, SHIFT_ALT_CONTROL), # right_drag Shift Alt Control 34+4+8+16=62 - - (35, "M") : (NO_BUTTON, MOUSE_MOVE, NO_MODIFIER), # none_drag 35+ + + =35 - (39, "M") : (NO_BUTTON, MOUSE_MOVE, SHIFT), # none_drag Shift 35+4+ + =39 - (43, "M") : (NO_BUTTON, MOUSE_MOVE, ALT), # none_drag Alt 35+ +8+ =43 - (47, "M") : (NO_BUTTON, MOUSE_MOVE, SHIFT_ALT), # none_drag Shift Alt 35+4+8+ =47 - (51, "M") : (NO_BUTTON, MOUSE_MOVE, CONTROL), # none_drag Control 35+ + +16=51 - (55, "M") : (NO_BUTTON, MOUSE_MOVE, SHIFT_CONTROL), # none_drag Shift Control 35+4+ +16=55 - (59, "M") : (NO_BUTTON, MOUSE_MOVE, ALT_CONTROL), # none_drag Alt Control 35+ +8+16=59 - (63, "M") : (NO_BUTTON, MOUSE_MOVE, SHIFT_ALT_CONTROL), # none_drag Shift Alt Control 35+4+8+16=63 - - (64, "M") : (NO_BUTTON, SCROLL_UP, NO_MODIFIER), # scroll_up 64+ + + =64 - (68, "M") : (NO_BUTTON, SCROLL_UP, SHIFT), # scroll_up Shift 64+4+ + =68 - (72, "M") : (NO_BUTTON, SCROLL_UP, ALT), # scroll_up Alt 64+ +8+ =72 - (76, "M") : (NO_BUTTON, SCROLL_UP, SHIFT_ALT), # scroll_up Shift Alt 64+4+8+ =76 - (80, "M") : (NO_BUTTON, SCROLL_UP, CONTROL), # scroll_up Control 64+ + +16=80 - (84, "M") : (NO_BUTTON, SCROLL_UP, SHIFT_CONTROL), # scroll_up Shift Control 64+4+ +16=84 - (88, "M") : (NO_BUTTON, SCROLL_UP, ALT_CONTROL), # scroll_up Alt Control 64+ +8+16=88 - (92, "M") : (NO_BUTTON, SCROLL_UP, SHIFT_ALT_CONTROL), # scroll_up Shift Alt Control 64+4+8+16=92 - - (65, "M") : (NO_BUTTON, SCROLL_DOWN, NO_MODIFIER), # scroll_down 64+ + + =65 - (69, "M") : (NO_BUTTON, SCROLL_DOWN, SHIFT), # scroll_down Shift 64+4+ + =69 - (73, "M") : (NO_BUTTON, SCROLL_DOWN, ALT), # scroll_down Alt 64+ +8+ =73 - (77, "M") : (NO_BUTTON, SCROLL_DOWN, SHIFT_ALT), # scroll_down Shift Alt 64+4+8+ =77 - (81, "M") : (NO_BUTTON, SCROLL_DOWN, CONTROL), # scroll_down Control 64+ + +16=81 - (85, "M") : (NO_BUTTON, SCROLL_DOWN, SHIFT_CONTROL), # scroll_down Shift Control 64+4+ +16=85 - (89, "M") : (NO_BUTTON, SCROLL_DOWN, ALT_CONTROL), # scroll_down Alt Control 64+ +8+16=89 - (93, "M") : (NO_BUTTON, SCROLL_DOWN, SHIFT_ALT_CONTROL), # scroll_down Shift Alt Control 64+4+8+16=93 -} - -typical_mouse_events = { - 32: (LEFT , MOUSE_DOWN , UNKNOWN_MODIFIER), - 33: (MIDDLE , MOUSE_DOWN , UNKNOWN_MODIFIER), - 34: (RIGHT , MOUSE_DOWN , UNKNOWN_MODIFIER), - 35: (UNKNOWN_BUTTON , MOUSE_UP , UNKNOWN_MODIFIER), - - 64: (LEFT , MOUSE_MOVE , UNKNOWN_MODIFIER), - 65: (MIDDLE , MOUSE_MOVE , UNKNOWN_MODIFIER), - 66: (RIGHT , MOUSE_MOVE , UNKNOWN_MODIFIER), - 67: (NO_BUTTON , MOUSE_MOVE , UNKNOWN_MODIFIER), - - 96: (NO_BUTTON , SCROLL_UP , UNKNOWN_MODIFIER), - 97: (NO_BUTTON , SCROLL_DOWN, UNKNOWN_MODIFIER), -} - -urxvt_mouse_events={ - 32: (UNKNOWN_BUTTON, MOUSE_DOWN , UNKNOWN_MODIFIER), - 35: (UNKNOWN_BUTTON, MOUSE_UP , UNKNOWN_MODIFIER), - 96: (NO_BUTTON , SCROLL_UP , UNKNOWN_MODIFIER), - 97: (NO_BUTTON , SCROLL_DOWN, UNKNOWN_MODIFIER), -} -# fmt:on - - -def load_mouse_bindings() -> KeyBindings: - """ - Key bindings, required for mouse support. - (Mouse events enter through the key binding system.) - """ - key_bindings = KeyBindings() - - @key_bindings.add(Keys.Vt100MouseEvent) - def _(event: E) -> NotImplementedOrNone: - """ - Handling of incoming mouse event. - """ - # TypicaL: "eSC[MaB*" - # Urxvt: "Esc[96;14;13M" - # Xterm SGR: "Esc[<64;85;12M" - - # Parse incoming packet. - if event.data[2] == "M": - # Typical. - mouse_event, x, y = map(ord, event.data[3:]) - - # TODO: Is it possible to add modifiers here? - mouse_button, mouse_event_type, mouse_modifiers = typical_mouse_events[ - mouse_event - ] - - # Handle situations where `PosixStdinReader` used surrogateescapes. - if x >= 0xDC00: - x -= 0xDC00 - if y >= 0xDC00: - y -= 0xDC00 - - x -= 32 - y -= 32 - else: - # Urxvt and Xterm SGR. - # When the '<' is not present, we are not using the Xterm SGR mode, - # but Urxvt instead. - data = event.data[2:] - if data[:1] == "<": - sgr = True - data = data[1:] - else: - sgr = False - - # Extract coordinates. - mouse_event, x, y = map(int, data[:-1].split(";")) - m = data[-1] - - # Parse event type. - if sgr: - try: - ( - mouse_button, - mouse_event_type, - mouse_modifiers, - ) = xterm_sgr_mouse_events[mouse_event, m] - except KeyError: - return NotImplemented - - else: - # Some other terminals, like urxvt, Hyper terminal, ... - ( - mouse_button, - mouse_event_type, - mouse_modifiers, - ) = urxvt_mouse_events.get( - mouse_event, (UNKNOWN_BUTTON, MOUSE_MOVE, UNKNOWN_MODIFIER) - ) - - x -= 1 - y -= 1 - - # Only handle mouse events when we know the window height. - if event.app.renderer.height_is_known and mouse_event_type is not None: - # Take region above the layout into account. The reported - # coordinates are absolute to the visible part of the terminal. - from prompt_toolkit.renderer import HeightIsUnknownError - - try: - y -= event.app.renderer.rows_above_layout - except HeightIsUnknownError: - return NotImplemented - - # Call the mouse handler from the renderer. - - # Note: This can return `NotImplemented` if no mouse handler was - # found for this position, or if no repainting needs to - # happen. this way, we avoid excessive repaints during mouse - # movements. - handler = event.app.renderer.mouse_handlers.mouse_handlers[y][x] - return handler( - MouseEvent( - position=Point(x=x, y=y), - event_type=mouse_event_type, - button=mouse_button, - modifiers=mouse_modifiers, - ) - ) - - return NotImplemented - - @key_bindings.add(Keys.ScrollUp) - def _scroll_up(event: E) -> None: - """ - Scroll up event without cursor position. - """ - # We don't receive a cursor position, so we don't know which window to - # scroll. Just send an 'up' key press instead. - event.key_processor.feed(KeyPress(Keys.Up), first=True) - - @key_bindings.add(Keys.ScrollDown) - def _scroll_down(event: E) -> None: - """ - Scroll down event without cursor position. - """ - event.key_processor.feed(KeyPress(Keys.Down), first=True) - - @key_bindings.add(Keys.WindowsMouseEvent) - def _mouse(event: E) -> NotImplementedOrNone: - """ - Handling of mouse events for Windows. - """ - # This key binding should only exist for Windows. - if sys.platform == "win32": - # Parse data. - pieces = event.data.split(";") - - button = MouseButton(pieces[0]) - event_type = MouseEventType(pieces[1]) - x = int(pieces[2]) - y = int(pieces[3]) - - # Make coordinates absolute to the visible part of the terminal. - output = event.app.renderer.output - - from prompt_toolkit.output.win32 import Win32Output - from prompt_toolkit.output.windows10 import Windows10_Output - - if isinstance(output, (Win32Output, Windows10_Output)): - screen_buffer_info = output.get_win32_screen_buffer_info() - rows_above_cursor = ( - screen_buffer_info.dwCursorPosition.Y - - event.app.renderer._cursor_pos.y - ) - y -= rows_above_cursor - - # Call the mouse event handler. - # (Can return `NotImplemented`.) - handler = event.app.renderer.mouse_handlers.mouse_handlers[y][x] - - return handler( - MouseEvent( - position=Point(x=x, y=y), - event_type=event_type, - button=button, - modifiers=UNKNOWN_MODIFIER, - ) - ) - - # No mouse handler found. Return `NotImplemented` so that we don't - # invalidate the UI. - return NotImplemented - - return key_bindings diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/named_commands.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/named_commands.py deleted file mode 100644 index 8ea8dd0..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/named_commands.py +++ /dev/null @@ -1,691 +0,0 @@ -""" -Key bindings which are also known by GNU Readline by the given names. - -See: http://www.delorie.com/gnu/docs/readline/rlman_13.html -""" - -from __future__ import annotations - -from typing import Callable, TypeVar, Union, cast - -from prompt_toolkit.document import Document -from prompt_toolkit.enums import EditingMode -from prompt_toolkit.key_binding.key_bindings import Binding, key_binding -from prompt_toolkit.key_binding.key_processor import KeyPress, KeyPressEvent -from prompt_toolkit.keys import Keys -from prompt_toolkit.layout.controls import BufferControl -from prompt_toolkit.search import SearchDirection -from prompt_toolkit.selection import PasteMode - -from .completion import display_completions_like_readline, generate_completions - -__all__ = [ - "get_by_name", -] - - -# Typing. -_Handler = Callable[[KeyPressEvent], None] -_HandlerOrBinding = Union[_Handler, Binding] -_T = TypeVar("_T", bound=_HandlerOrBinding) -E = KeyPressEvent - - -# Registry that maps the Readline command names to their handlers. -_readline_commands: dict[str, Binding] = {} - - -def register(name: str) -> Callable[[_T], _T]: - """ - Store handler in the `_readline_commands` dictionary. - """ - - def decorator(handler: _T) -> _T: - "`handler` is a callable or Binding." - if isinstance(handler, Binding): - _readline_commands[name] = handler - else: - _readline_commands[name] = key_binding()(cast(_Handler, handler)) - - return handler - - return decorator - - -def get_by_name(name: str) -> Binding: - """ - Return the handler for the (Readline) command with the given name. - """ - try: - return _readline_commands[name] - except KeyError as e: - raise KeyError(f"Unknown Readline command: {name!r}") from e - - -# -# Commands for moving -# See: http://www.delorie.com/gnu/docs/readline/rlman_14.html -# - - -@register("beginning-of-buffer") -def beginning_of_buffer(event: E) -> None: - """ - Move to the start of the buffer. - """ - buff = event.current_buffer - buff.cursor_position = 0 - - -@register("end-of-buffer") -def end_of_buffer(event: E) -> None: - """ - Move to the end of the buffer. - """ - buff = event.current_buffer - buff.cursor_position = len(buff.text) - - -@register("beginning-of-line") -def beginning_of_line(event: E) -> None: - """ - Move to the start of the current line. - """ - buff = event.current_buffer - buff.cursor_position += buff.document.get_start_of_line_position( - after_whitespace=False - ) - - -@register("end-of-line") -def end_of_line(event: E) -> None: - """ - Move to the end of the line. - """ - buff = event.current_buffer - buff.cursor_position += buff.document.get_end_of_line_position() - - -@register("forward-char") -def forward_char(event: E) -> None: - """ - Move forward a character. - """ - buff = event.current_buffer - buff.cursor_position += buff.document.get_cursor_right_position(count=event.arg) - - -@register("backward-char") -def backward_char(event: E) -> None: - "Move back a character." - buff = event.current_buffer - buff.cursor_position += buff.document.get_cursor_left_position(count=event.arg) - - -@register("forward-word") -def forward_word(event: E) -> None: - """ - Move forward to the end of the next word. Words are composed of letters and - digits. - """ - buff = event.current_buffer - pos = buff.document.find_next_word_ending(count=event.arg) - - if pos: - buff.cursor_position += pos - - -@register("backward-word") -def backward_word(event: E) -> None: - """ - Move back to the start of the current or previous word. Words are composed - of letters and digits. - """ - buff = event.current_buffer - pos = buff.document.find_previous_word_beginning(count=event.arg) - - if pos: - buff.cursor_position += pos - - -@register("clear-screen") -def clear_screen(event: E) -> None: - """ - Clear the screen and redraw everything at the top of the screen. - """ - event.app.renderer.clear() - - -@register("redraw-current-line") -def redraw_current_line(event: E) -> None: - """ - Refresh the current line. - (Readline defines this command, but prompt-toolkit doesn't have it.) - """ - pass - - -# -# Commands for manipulating the history. -# See: http://www.delorie.com/gnu/docs/readline/rlman_15.html -# - - -@register("accept-line") -def accept_line(event: E) -> None: - """ - Accept the line regardless of where the cursor is. - """ - event.current_buffer.validate_and_handle() - - -@register("previous-history") -def previous_history(event: E) -> None: - """ - Move `back` through the history list, fetching the previous command. - """ - event.current_buffer.history_backward(count=event.arg) - - -@register("next-history") -def next_history(event: E) -> None: - """ - Move `forward` through the history list, fetching the next command. - """ - event.current_buffer.history_forward(count=event.arg) - - -@register("beginning-of-history") -def beginning_of_history(event: E) -> None: - """ - Move to the first line in the history. - """ - event.current_buffer.go_to_history(0) - - -@register("end-of-history") -def end_of_history(event: E) -> None: - """ - Move to the end of the input history, i.e., the line currently being entered. - """ - event.current_buffer.history_forward(count=10**100) - buff = event.current_buffer - buff.go_to_history(len(buff._working_lines) - 1) - - -@register("reverse-search-history") -def reverse_search_history(event: E) -> None: - """ - Search backward starting at the current line and moving `up` through - the history as necessary. This is an incremental search. - """ - control = event.app.layout.current_control - - if isinstance(control, BufferControl) and control.search_buffer_control: - event.app.current_search_state.direction = SearchDirection.BACKWARD - event.app.layout.current_control = control.search_buffer_control - - -# -# Commands for changing text -# - - -@register("end-of-file") -def end_of_file(event: E) -> None: - """ - Exit. - """ - event.app.exit() - - -@register("delete-char") -def delete_char(event: E) -> None: - """ - Delete character before the cursor. - """ - deleted = event.current_buffer.delete(count=event.arg) - if not deleted: - event.app.output.bell() - - -@register("backward-delete-char") -def backward_delete_char(event: E) -> None: - """ - Delete the character behind the cursor. - """ - if event.arg < 0: - # When a negative argument has been given, this should delete in front - # of the cursor. - deleted = event.current_buffer.delete(count=-event.arg) - else: - deleted = event.current_buffer.delete_before_cursor(count=event.arg) - - if not deleted: - event.app.output.bell() - - -@register("self-insert") -def self_insert(event: E) -> None: - """ - Insert yourself. - """ - event.current_buffer.insert_text(event.data * event.arg) - - -@register("transpose-chars") -def transpose_chars(event: E) -> None: - """ - Emulate Emacs transpose-char behavior: at the beginning of the buffer, - do nothing. At the end of a line or buffer, swap the characters before - the cursor. Otherwise, move the cursor right, and then swap the - characters before the cursor. - """ - b = event.current_buffer - p = b.cursor_position - if p == 0: - return - elif p == len(b.text) or b.text[p] == "\n": - b.swap_characters_before_cursor() - else: - b.cursor_position += b.document.get_cursor_right_position() - b.swap_characters_before_cursor() - - -@register("uppercase-word") -def uppercase_word(event: E) -> None: - """ - Uppercase the current (or following) word. - """ - buff = event.current_buffer - - for i in range(event.arg): - pos = buff.document.find_next_word_ending() - words = buff.document.text_after_cursor[:pos] - buff.insert_text(words.upper(), overwrite=True) - - -@register("downcase-word") -def downcase_word(event: E) -> None: - """ - Lowercase the current (or following) word. - """ - buff = event.current_buffer - - for i in range(event.arg): # XXX: not DRY: see meta_c and meta_u!! - pos = buff.document.find_next_word_ending() - words = buff.document.text_after_cursor[:pos] - buff.insert_text(words.lower(), overwrite=True) - - -@register("capitalize-word") -def capitalize_word(event: E) -> None: - """ - Capitalize the current (or following) word. - """ - buff = event.current_buffer - - for i in range(event.arg): - pos = buff.document.find_next_word_ending() - words = buff.document.text_after_cursor[:pos] - buff.insert_text(words.title(), overwrite=True) - - -@register("quoted-insert") -def quoted_insert(event: E) -> None: - """ - Add the next character typed to the line verbatim. This is how to insert - key sequences like C-q, for example. - """ - event.app.quoted_insert = True - - -# -# Killing and yanking. -# - - -@register("kill-line") -def kill_line(event: E) -> None: - """ - Kill the text from the cursor to the end of the line. - - If we are at the end of the line, this should remove the newline. - (That way, it is possible to delete multiple lines by executing this - command multiple times.) - """ - buff = event.current_buffer - if event.arg < 0: - deleted = buff.delete_before_cursor( - count=-buff.document.get_start_of_line_position() - ) - else: - if buff.document.current_char == "\n": - deleted = buff.delete(1) - else: - deleted = buff.delete(count=buff.document.get_end_of_line_position()) - event.app.clipboard.set_text(deleted) - - -@register("kill-word") -def kill_word(event: E) -> None: - """ - Kill from point to the end of the current word, or if between words, to the - end of the next word. Word boundaries are the same as forward-word. - """ - buff = event.current_buffer - pos = buff.document.find_next_word_ending(count=event.arg) - - if pos: - deleted = buff.delete(count=pos) - - if event.is_repeat: - deleted = event.app.clipboard.get_data().text + deleted - - event.app.clipboard.set_text(deleted) - - -@register("unix-word-rubout") -def unix_word_rubout(event: E, WORD: bool = True) -> None: - """ - Kill the word behind point, using whitespace as a word boundary. - Usually bound to ControlW. - """ - buff = event.current_buffer - pos = buff.document.find_start_of_previous_word(count=event.arg, WORD=WORD) - - if pos is None: - # Nothing found? delete until the start of the document. (The - # input starts with whitespace and no words were found before the - # cursor.) - pos = -buff.cursor_position - - if pos: - deleted = buff.delete_before_cursor(count=-pos) - - # If the previous key press was also Control-W, concatenate deleted - # text. - if event.is_repeat: - deleted += event.app.clipboard.get_data().text - - event.app.clipboard.set_text(deleted) - else: - # Nothing to delete. Bell. - event.app.output.bell() - - -@register("backward-kill-word") -def backward_kill_word(event: E) -> None: - """ - Kills the word before point, using "not a letter nor a digit" as a word boundary. - Usually bound to M-Del or M-Backspace. - """ - unix_word_rubout(event, WORD=False) - - -@register("delete-horizontal-space") -def delete_horizontal_space(event: E) -> None: - """ - Delete all spaces and tabs around point. - """ - buff = event.current_buffer - text_before_cursor = buff.document.text_before_cursor - text_after_cursor = buff.document.text_after_cursor - - delete_before = len(text_before_cursor) - len(text_before_cursor.rstrip("\t ")) - delete_after = len(text_after_cursor) - len(text_after_cursor.lstrip("\t ")) - - buff.delete_before_cursor(count=delete_before) - buff.delete(count=delete_after) - - -@register("unix-line-discard") -def unix_line_discard(event: E) -> None: - """ - Kill backward from the cursor to the beginning of the current line. - """ - buff = event.current_buffer - - if buff.document.cursor_position_col == 0 and buff.document.cursor_position > 0: - buff.delete_before_cursor(count=1) - else: - deleted = buff.delete_before_cursor( - count=-buff.document.get_start_of_line_position() - ) - event.app.clipboard.set_text(deleted) - - -@register("yank") -def yank(event: E) -> None: - """ - Paste before cursor. - """ - event.current_buffer.paste_clipboard_data( - event.app.clipboard.get_data(), count=event.arg, paste_mode=PasteMode.EMACS - ) - - -@register("yank-nth-arg") -def yank_nth_arg(event: E) -> None: - """ - Insert the first argument of the previous command. With an argument, insert - the nth word from the previous command (start counting at 0). - """ - n = event.arg if event.arg_present else None - event.current_buffer.yank_nth_arg(n) - - -@register("yank-last-arg") -def yank_last_arg(event: E) -> None: - """ - Like `yank_nth_arg`, but if no argument has been given, yank the last word - of each line. - """ - n = event.arg if event.arg_present else None - event.current_buffer.yank_last_arg(n) - - -@register("yank-pop") -def yank_pop(event: E) -> None: - """ - Rotate the kill ring, and yank the new top. Only works following yank or - yank-pop. - """ - buff = event.current_buffer - doc_before_paste = buff.document_before_paste - clipboard = event.app.clipboard - - if doc_before_paste is not None: - buff.document = doc_before_paste - clipboard.rotate() - buff.paste_clipboard_data(clipboard.get_data(), paste_mode=PasteMode.EMACS) - - -# -# Completion. -# - - -@register("complete") -def complete(event: E) -> None: - """ - Attempt to perform completion. - """ - display_completions_like_readline(event) - - -@register("menu-complete") -def menu_complete(event: E) -> None: - """ - Generate completions, or go to the next completion. (This is the default - way of completing input in prompt_toolkit.) - """ - generate_completions(event) - - -@register("menu-complete-backward") -def menu_complete_backward(event: E) -> None: - """ - Move backward through the list of possible completions. - """ - event.current_buffer.complete_previous() - - -# -# Keyboard macros. -# - - -@register("start-kbd-macro") -def start_kbd_macro(event: E) -> None: - """ - Begin saving the characters typed into the current keyboard macro. - """ - event.app.emacs_state.start_macro() - - -@register("end-kbd-macro") -def end_kbd_macro(event: E) -> None: - """ - Stop saving the characters typed into the current keyboard macro and save - the definition. - """ - event.app.emacs_state.end_macro() - - -@register("call-last-kbd-macro") -@key_binding(record_in_macro=False) -def call_last_kbd_macro(event: E) -> None: - """ - Re-execute the last keyboard macro defined, by making the characters in the - macro appear as if typed at the keyboard. - - Notice that we pass `record_in_macro=False`. This ensures that the 'c-x e' - key sequence doesn't appear in the recording itself. This function inserts - the body of the called macro back into the KeyProcessor, so these keys will - be added later on to the macro of their handlers have `record_in_macro=True`. - """ - # Insert the macro. - macro = event.app.emacs_state.macro - - if macro: - event.app.key_processor.feed_multiple(macro, first=True) - - -@register("print-last-kbd-macro") -def print_last_kbd_macro(event: E) -> None: - """ - Print the last keyboard macro. - """ - - # TODO: Make the format suitable for the inputrc file. - def print_macro() -> None: - macro = event.app.emacs_state.macro - if macro: - for k in macro: - print(k) - - from prompt_toolkit.application.run_in_terminal import run_in_terminal - - run_in_terminal(print_macro) - - -# -# Miscellaneous Commands. -# - - -@register("undo") -def undo(event: E) -> None: - """ - Incremental undo. - """ - event.current_buffer.undo() - - -@register("insert-comment") -def insert_comment(event: E) -> None: - """ - Without numeric argument, comment all lines. - With numeric argument, uncomment all lines. - In any case accept the input. - """ - buff = event.current_buffer - - # Transform all lines. - if event.arg != 1: - - def change(line: str) -> str: - return line[1:] if line.startswith("#") else line - - else: - - def change(line: str) -> str: - return "#" + line - - buff.document = Document( - text="\n".join(map(change, buff.text.splitlines())), cursor_position=0 - ) - - # Accept input. - buff.validate_and_handle() - - -@register("vi-editing-mode") -def vi_editing_mode(event: E) -> None: - """ - Switch to Vi editing mode. - """ - event.app.editing_mode = EditingMode.VI - - -@register("emacs-editing-mode") -def emacs_editing_mode(event: E) -> None: - """ - Switch to Emacs editing mode. - """ - event.app.editing_mode = EditingMode.EMACS - - -@register("prefix-meta") -def prefix_meta(event: E) -> None: - """ - Metafy the next character typed. This is for keyboards without a meta key. - - Sometimes people also want to bind other keys to Meta, e.g. 'jj':: - - key_bindings.add_key_binding('j', 'j', filter=ViInsertMode())(prefix_meta) - """ - # ('first' should be true, because we want to insert it at the current - # position in the queue.) - event.app.key_processor.feed(KeyPress(Keys.Escape), first=True) - - -@register("operate-and-get-next") -def operate_and_get_next(event: E) -> None: - """ - Accept the current line for execution and fetch the next line relative to - the current line from the history for editing. - """ - buff = event.current_buffer - new_index = buff.working_index + 1 - - # Accept the current input. (This will also redraw the interface in the - # 'done' state.) - buff.validate_and_handle() - - # Set the new index at the start of the next run. - def set_working_index() -> None: - if new_index < len(buff._working_lines): - buff.working_index = new_index - - event.app.pre_run_callables.append(set_working_index) - - -@register("edit-and-execute-command") -def edit_and_execute(event: E) -> None: - """ - Invoke an editor on the current command line, and accept the result. - """ - buff = event.current_buffer - buff.open_in_editor(validate_and_handle=True) diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/open_in_editor.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/open_in_editor.py deleted file mode 100644 index 26b8685..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/open_in_editor.py +++ /dev/null @@ -1,52 +0,0 @@ -""" -Open in editor key bindings. -""" - -from __future__ import annotations - -from prompt_toolkit.filters import emacs_mode, has_selection, vi_navigation_mode - -from ..key_bindings import KeyBindings, KeyBindingsBase, merge_key_bindings -from .named_commands import get_by_name - -__all__ = [ - "load_open_in_editor_bindings", - "load_emacs_open_in_editor_bindings", - "load_vi_open_in_editor_bindings", -] - - -def load_open_in_editor_bindings() -> KeyBindingsBase: - """ - Load both the Vi and emacs key bindings for handling edit-and-execute-command. - """ - return merge_key_bindings( - [ - load_emacs_open_in_editor_bindings(), - load_vi_open_in_editor_bindings(), - ] - ) - - -def load_emacs_open_in_editor_bindings() -> KeyBindings: - """ - Pressing C-X C-E will open the buffer in an external editor. - """ - key_bindings = KeyBindings() - - key_bindings.add("c-x", "c-e", filter=emacs_mode & ~has_selection)( - get_by_name("edit-and-execute-command") - ) - - return key_bindings - - -def load_vi_open_in_editor_bindings() -> KeyBindings: - """ - Pressing 'v' in navigation mode will open the buffer in an external editor. - """ - key_bindings = KeyBindings() - key_bindings.add("v", filter=vi_navigation_mode)( - get_by_name("edit-and-execute-command") - ) - return key_bindings diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/page_navigation.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/page_navigation.py deleted file mode 100644 index c490425..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/page_navigation.py +++ /dev/null @@ -1,85 +0,0 @@ -""" -Key bindings for extra page navigation: bindings for up/down scrolling through -long pages, like in Emacs or Vi. -""" - -from __future__ import annotations - -from prompt_toolkit.filters import buffer_has_focus, emacs_mode, vi_mode -from prompt_toolkit.key_binding.key_bindings import ( - ConditionalKeyBindings, - KeyBindings, - KeyBindingsBase, - merge_key_bindings, -) - -from .scroll import ( - scroll_backward, - scroll_forward, - scroll_half_page_down, - scroll_half_page_up, - scroll_one_line_down, - scroll_one_line_up, - scroll_page_down, - scroll_page_up, -) - -__all__ = [ - "load_page_navigation_bindings", - "load_emacs_page_navigation_bindings", - "load_vi_page_navigation_bindings", -] - - -def load_page_navigation_bindings() -> KeyBindingsBase: - """ - Load both the Vi and Emacs bindings for page navigation. - """ - # Only enable when a `Buffer` is focused, otherwise, we would catch keys - # when another widget is focused (like for instance `c-d` in a - # ptterm.Terminal). - return ConditionalKeyBindings( - merge_key_bindings( - [ - load_emacs_page_navigation_bindings(), - load_vi_page_navigation_bindings(), - ] - ), - buffer_has_focus, - ) - - -def load_emacs_page_navigation_bindings() -> KeyBindingsBase: - """ - Key bindings, for scrolling up and down through pages. - This are separate bindings, because GNU readline doesn't have them. - """ - key_bindings = KeyBindings() - handle = key_bindings.add - - handle("c-v")(scroll_page_down) - handle("pagedown")(scroll_page_down) - handle("escape", "v")(scroll_page_up) - handle("pageup")(scroll_page_up) - - return ConditionalKeyBindings(key_bindings, emacs_mode) - - -def load_vi_page_navigation_bindings() -> KeyBindingsBase: - """ - Key bindings, for scrolling up and down through pages. - This are separate bindings, because GNU readline doesn't have them. - """ - key_bindings = KeyBindings() - handle = key_bindings.add - - handle("c-f")(scroll_forward) - handle("c-b")(scroll_backward) - handle("c-d")(scroll_half_page_down) - handle("c-u")(scroll_half_page_up) - handle("c-e")(scroll_one_line_down) - handle("c-y")(scroll_one_line_up) - handle("pagedown")(scroll_page_down) - handle("pageup")(scroll_page_up) - - return ConditionalKeyBindings(key_bindings, vi_mode) diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/scroll.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/scroll.py deleted file mode 100644 index 13e44ed..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/scroll.py +++ /dev/null @@ -1,190 +0,0 @@ -""" -Key bindings, for scrolling up and down through pages. - -This are separate bindings, because GNU readline doesn't have them, but -they are very useful for navigating through long multiline buffers, like in -Vi, Emacs, etc... -""" - -from __future__ import annotations - -from prompt_toolkit.key_binding.key_processor import KeyPressEvent - -__all__ = [ - "scroll_forward", - "scroll_backward", - "scroll_half_page_up", - "scroll_half_page_down", - "scroll_one_line_up", - "scroll_one_line_down", -] - -E = KeyPressEvent - - -def scroll_forward(event: E, half: bool = False) -> None: - """ - Scroll window down. - """ - w = event.app.layout.current_window - b = event.app.current_buffer - - if w and w.render_info: - info = w.render_info - ui_content = info.ui_content - - # Height to scroll. - scroll_height = info.window_height - if half: - scroll_height //= 2 - - # Calculate how many lines is equivalent to that vertical space. - y = b.document.cursor_position_row + 1 - height = 0 - while y < ui_content.line_count: - line_height = info.get_height_for_line(y) - - if height + line_height < scroll_height: - height += line_height - y += 1 - else: - break - - b.cursor_position = b.document.translate_row_col_to_index(y, 0) - - -def scroll_backward(event: E, half: bool = False) -> None: - """ - Scroll window up. - """ - w = event.app.layout.current_window - b = event.app.current_buffer - - if w and w.render_info: - info = w.render_info - - # Height to scroll. - scroll_height = info.window_height - if half: - scroll_height //= 2 - - # Calculate how many lines is equivalent to that vertical space. - y = max(0, b.document.cursor_position_row - 1) - height = 0 - while y > 0: - line_height = info.get_height_for_line(y) - - if height + line_height < scroll_height: - height += line_height - y -= 1 - else: - break - - b.cursor_position = b.document.translate_row_col_to_index(y, 0) - - -def scroll_half_page_down(event: E) -> None: - """ - Same as ControlF, but only scroll half a page. - """ - scroll_forward(event, half=True) - - -def scroll_half_page_up(event: E) -> None: - """ - Same as ControlB, but only scroll half a page. - """ - scroll_backward(event, half=True) - - -def scroll_one_line_down(event: E) -> None: - """ - scroll_offset += 1 - """ - w = event.app.layout.current_window - b = event.app.current_buffer - - if w: - # When the cursor is at the top, move to the next line. (Otherwise, only scroll.) - if w.render_info: - info = w.render_info - - if w.vertical_scroll < info.content_height - info.window_height: - if info.cursor_position.y <= info.configured_scroll_offsets.top: - b.cursor_position += b.document.get_cursor_down_position() - - w.vertical_scroll += 1 - - -def scroll_one_line_up(event: E) -> None: - """ - scroll_offset -= 1 - """ - w = event.app.layout.current_window - b = event.app.current_buffer - - if w: - # When the cursor is at the bottom, move to the previous line. (Otherwise, only scroll.) - if w.render_info: - info = w.render_info - - if w.vertical_scroll > 0: - first_line_height = info.get_height_for_line(info.first_visible_line()) - - cursor_up = info.cursor_position.y - ( - info.window_height - - 1 - - first_line_height - - info.configured_scroll_offsets.bottom - ) - - # Move cursor up, as many steps as the height of the first line. - # TODO: not entirely correct yet, in case of line wrapping and many long lines. - for _ in range(max(0, cursor_up)): - b.cursor_position += b.document.get_cursor_up_position() - - # Scroll window - w.vertical_scroll -= 1 - - -def scroll_page_down(event: E) -> None: - """ - Scroll page down. (Prefer the cursor at the top of the page, after scrolling.) - """ - w = event.app.layout.current_window - b = event.app.current_buffer - - if w and w.render_info: - # Scroll down one page. - line_index = max(w.render_info.last_visible_line(), w.vertical_scroll + 1) - w.vertical_scroll = line_index - - b.cursor_position = b.document.translate_row_col_to_index(line_index, 0) - b.cursor_position += b.document.get_start_of_line_position( - after_whitespace=True - ) - - -def scroll_page_up(event: E) -> None: - """ - Scroll page up. (Prefer the cursor at the bottom of the page, after scrolling.) - """ - w = event.app.layout.current_window - b = event.app.current_buffer - - if w and w.render_info: - # Put cursor at the first visible line. (But make sure that the cursor - # moves at least one line up.) - line_index = max( - 0, - min(w.render_info.first_visible_line(), b.document.cursor_position_row - 1), - ) - - b.cursor_position = b.document.translate_row_col_to_index(line_index, 0) - b.cursor_position += b.document.get_start_of_line_position( - after_whitespace=True - ) - - # Set the scroll offset. We can safely set it to zero; the Window will - # make sure that it scrolls at least until the cursor becomes visible. - w.vertical_scroll = 0 diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/search.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/search.py deleted file mode 100644 index a57c52e..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/search.py +++ /dev/null @@ -1,96 +0,0 @@ -""" -Search related key bindings. -""" - -from __future__ import annotations - -from prompt_toolkit import search -from prompt_toolkit.application.current import get_app -from prompt_toolkit.filters import Condition, control_is_searchable, is_searching -from prompt_toolkit.key_binding.key_processor import KeyPressEvent - -from ..key_bindings import key_binding - -__all__ = [ - "abort_search", - "accept_search", - "start_reverse_incremental_search", - "start_forward_incremental_search", - "reverse_incremental_search", - "forward_incremental_search", - "accept_search_and_accept_input", -] - -E = KeyPressEvent - - -@key_binding(filter=is_searching) -def abort_search(event: E) -> None: - """ - Abort an incremental search and restore the original - line. - (Usually bound to ControlG/ControlC.) - """ - search.stop_search() - - -@key_binding(filter=is_searching) -def accept_search(event: E) -> None: - """ - When enter pressed in isearch, quit isearch mode. (Multiline - isearch would be too complicated.) - (Usually bound to Enter.) - """ - search.accept_search() - - -@key_binding(filter=control_is_searchable) -def start_reverse_incremental_search(event: E) -> None: - """ - Enter reverse incremental search. - (Usually ControlR.) - """ - search.start_search(direction=search.SearchDirection.BACKWARD) - - -@key_binding(filter=control_is_searchable) -def start_forward_incremental_search(event: E) -> None: - """ - Enter forward incremental search. - (Usually ControlS.) - """ - search.start_search(direction=search.SearchDirection.FORWARD) - - -@key_binding(filter=is_searching) -def reverse_incremental_search(event: E) -> None: - """ - Apply reverse incremental search, but keep search buffer focused. - """ - search.do_incremental_search(search.SearchDirection.BACKWARD, count=event.arg) - - -@key_binding(filter=is_searching) -def forward_incremental_search(event: E) -> None: - """ - Apply forward incremental search, but keep search buffer focused. - """ - search.do_incremental_search(search.SearchDirection.FORWARD, count=event.arg) - - -@Condition -def _previous_buffer_is_returnable() -> bool: - """ - True if the previously focused buffer has a return handler. - """ - prev_control = get_app().layout.search_target_buffer_control - return bool(prev_control and prev_control.buffer.is_returnable) - - -@key_binding(filter=is_searching & _previous_buffer_is_returnable) -def accept_search_and_accept_input(event: E) -> None: - """ - Accept the search operation first, then accept the input. - """ - search.accept_search() - event.current_buffer.validate_and_handle() diff --git a/voxvera/vendor/prompt_toolkit/key_binding/bindings/vi.py b/voxvera/vendor/prompt_toolkit/key_binding/bindings/vi.py deleted file mode 100644 index d68a31f..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/bindings/vi.py +++ /dev/null @@ -1,2233 +0,0 @@ -# pylint: disable=function-redefined -from __future__ import annotations - -import codecs -import string -from enum import Enum -from itertools import accumulate -from typing import Callable, Iterable, Tuple, TypeVar - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.buffer import Buffer, indent, reshape_text, unindent -from prompt_toolkit.clipboard import ClipboardData -from prompt_toolkit.document import Document -from prompt_toolkit.filters import ( - Always, - Condition, - Filter, - has_arg, - is_read_only, - is_searching, -) -from prompt_toolkit.filters.app import ( - in_paste_mode, - is_multiline, - vi_digraph_mode, - vi_insert_mode, - vi_insert_multiple_mode, - vi_mode, - vi_navigation_mode, - vi_recording_macro, - vi_replace_mode, - vi_replace_single_mode, - vi_search_direction_reversed, - vi_selection_mode, - vi_waiting_for_text_object_mode, -) -from prompt_toolkit.input.vt100_parser import Vt100Parser -from prompt_toolkit.key_binding.digraphs import DIGRAPHS -from prompt_toolkit.key_binding.key_processor import KeyPress, KeyPressEvent -from prompt_toolkit.key_binding.vi_state import CharacterFind, InputMode -from prompt_toolkit.keys import Keys -from prompt_toolkit.search import SearchDirection -from prompt_toolkit.selection import PasteMode, SelectionState, SelectionType - -from ..key_bindings import ConditionalKeyBindings, KeyBindings, KeyBindingsBase -from .named_commands import get_by_name - -__all__ = [ - "load_vi_bindings", - "load_vi_search_bindings", -] - -E = KeyPressEvent - -ascii_lowercase = string.ascii_lowercase - -vi_register_names = ascii_lowercase + "0123456789" - - -class TextObjectType(Enum): - EXCLUSIVE = "EXCLUSIVE" - INCLUSIVE = "INCLUSIVE" - LINEWISE = "LINEWISE" - BLOCK = "BLOCK" - - -class TextObject: - """ - Return struct for functions wrapped in ``text_object``. - Both `start` and `end` are relative to the current cursor position. - """ - - def __init__( - self, start: int, end: int = 0, type: TextObjectType = TextObjectType.EXCLUSIVE - ): - self.start = start - self.end = end - self.type = type - - @property - def selection_type(self) -> SelectionType: - if self.type == TextObjectType.LINEWISE: - return SelectionType.LINES - if self.type == TextObjectType.BLOCK: - return SelectionType.BLOCK - else: - return SelectionType.CHARACTERS - - def sorted(self) -> tuple[int, int]: - """ - Return a (start, end) tuple where start <= end. - """ - if self.start < self.end: - return self.start, self.end - else: - return self.end, self.start - - def operator_range(self, document: Document) -> tuple[int, int]: - """ - Return a (start, end) tuple with start <= end that indicates the range - operators should operate on. - `buffer` is used to get start and end of line positions. - - This should return something that can be used in a slice, so the `end` - position is *not* included. - """ - start, end = self.sorted() - doc = document - - if ( - self.type == TextObjectType.EXCLUSIVE - and doc.translate_index_to_position(end + doc.cursor_position)[1] == 0 - ): - # If the motion is exclusive and the end of motion is on the first - # column, the end position becomes end of previous line. - end -= 1 - if self.type == TextObjectType.INCLUSIVE: - end += 1 - if self.type == TextObjectType.LINEWISE: - # Select whole lines - row, col = doc.translate_index_to_position(start + doc.cursor_position) - start = doc.translate_row_col_to_index(row, 0) - doc.cursor_position - row, col = doc.translate_index_to_position(end + doc.cursor_position) - end = ( - doc.translate_row_col_to_index(row, len(doc.lines[row])) - - doc.cursor_position - ) - return start, end - - def get_line_numbers(self, buffer: Buffer) -> tuple[int, int]: - """ - Return a (start_line, end_line) pair. - """ - # Get absolute cursor positions from the text object. - from_, to = self.operator_range(buffer.document) - from_ += buffer.cursor_position - to += buffer.cursor_position - - # Take the start of the lines. - from_, _ = buffer.document.translate_index_to_position(from_) - to, _ = buffer.document.translate_index_to_position(to) - - return from_, to - - def cut(self, buffer: Buffer) -> tuple[Document, ClipboardData]: - """ - Turn text object into `ClipboardData` instance. - """ - from_, to = self.operator_range(buffer.document) - - from_ += buffer.cursor_position - to += buffer.cursor_position - - # For Vi mode, the SelectionState does include the upper position, - # while `self.operator_range` does not. So, go one to the left, unless - # we're in the line mode, then we don't want to risk going to the - # previous line, and missing one line in the selection. - if self.type != TextObjectType.LINEWISE: - to -= 1 - - document = Document( - buffer.text, - to, - SelectionState(original_cursor_position=from_, type=self.selection_type), - ) - - new_document, clipboard_data = document.cut_selection() - return new_document, clipboard_data - - -# Typevar for any text object function: -TextObjectFunction = Callable[[E], TextObject] -_TOF = TypeVar("_TOF", bound=TextObjectFunction) - - -def create_text_object_decorator( - key_bindings: KeyBindings, -) -> Callable[..., Callable[[_TOF], _TOF]]: - """ - Create a decorator that can be used to register Vi text object implementations. - """ - - def text_object_decorator( - *keys: Keys | str, - filter: Filter = Always(), - no_move_handler: bool = False, - no_selection_handler: bool = False, - eager: bool = False, - ) -> Callable[[_TOF], _TOF]: - """ - Register a text object function. - - Usage:: - - @text_object('w', filter=..., no_move_handler=False) - def handler(event): - # Return a text object for this key. - return TextObject(...) - - :param no_move_handler: Disable the move handler in navigation mode. - (It's still active in selection mode.) - """ - - def decorator(text_object_func: _TOF) -> _TOF: - @key_bindings.add( - *keys, filter=vi_waiting_for_text_object_mode & filter, eager=eager - ) - def _apply_operator_to_text_object(event: E) -> None: - # Arguments are multiplied. - vi_state = event.app.vi_state - event._arg = str((vi_state.operator_arg or 1) * (event.arg or 1)) - - # Call the text object handler. - text_obj = text_object_func(event) - - # Get the operator function. - # (Should never be None here, given the - # `vi_waiting_for_text_object_mode` filter state.) - operator_func = vi_state.operator_func - - if text_obj is not None and operator_func is not None: - # Call the operator function with the text object. - operator_func(event, text_obj) - - # Clear operator. - event.app.vi_state.operator_func = None - event.app.vi_state.operator_arg = None - - # Register a move operation. (Doesn't need an operator.) - if not no_move_handler: - - @key_bindings.add( - *keys, - filter=~vi_waiting_for_text_object_mode - & filter - & vi_navigation_mode, - eager=eager, - ) - def _move_in_navigation_mode(event: E) -> None: - """ - Move handler for navigation mode. - """ - text_object = text_object_func(event) - event.current_buffer.cursor_position += text_object.start - - # Register a move selection operation. - if not no_selection_handler: - - @key_bindings.add( - *keys, - filter=~vi_waiting_for_text_object_mode - & filter - & vi_selection_mode, - eager=eager, - ) - def _move_in_selection_mode(event: E) -> None: - """ - Move handler for selection mode. - """ - text_object = text_object_func(event) - buff = event.current_buffer - selection_state = buff.selection_state - - if selection_state is None: - return # Should not happen, because of the `vi_selection_mode` filter. - - # When the text object has both a start and end position, like 'i(' or 'iw', - # Turn this into a selection, otherwise the cursor. - if text_object.end: - # Take selection positions from text object. - start, end = text_object.operator_range(buff.document) - start += buff.cursor_position - end += buff.cursor_position - - selection_state.original_cursor_position = start - buff.cursor_position = end - - # Take selection type from text object. - if text_object.type == TextObjectType.LINEWISE: - selection_state.type = SelectionType.LINES - else: - selection_state.type = SelectionType.CHARACTERS - else: - event.current_buffer.cursor_position += text_object.start - - # Make it possible to chain @text_object decorators. - return text_object_func - - return decorator - - return text_object_decorator - - -# Typevar for any operator function: -OperatorFunction = Callable[[E, TextObject], None] -_OF = TypeVar("_OF", bound=OperatorFunction) - - -def create_operator_decorator( - key_bindings: KeyBindings, -) -> Callable[..., Callable[[_OF], _OF]]: - """ - Create a decorator that can be used for registering Vi operators. - """ - - def operator_decorator( - *keys: Keys | str, filter: Filter = Always(), eager: bool = False - ) -> Callable[[_OF], _OF]: - """ - Register a Vi operator. - - Usage:: - - @operator('d', filter=...) - def handler(event, text_object): - # Do something with the text object here. - """ - - def decorator(operator_func: _OF) -> _OF: - @key_bindings.add( - *keys, - filter=~vi_waiting_for_text_object_mode & filter & vi_navigation_mode, - eager=eager, - ) - def _operator_in_navigation(event: E) -> None: - """ - Handle operator in navigation mode. - """ - # When this key binding is matched, only set the operator - # function in the ViState. We should execute it after a text - # object has been received. - event.app.vi_state.operator_func = operator_func - event.app.vi_state.operator_arg = event.arg - - @key_bindings.add( - *keys, - filter=~vi_waiting_for_text_object_mode & filter & vi_selection_mode, - eager=eager, - ) - def _operator_in_selection(event: E) -> None: - """ - Handle operator in selection mode. - """ - buff = event.current_buffer - selection_state = buff.selection_state - - if selection_state is not None: - # Create text object from selection. - if selection_state.type == SelectionType.LINES: - text_obj_type = TextObjectType.LINEWISE - elif selection_state.type == SelectionType.BLOCK: - text_obj_type = TextObjectType.BLOCK - else: - text_obj_type = TextObjectType.INCLUSIVE - - text_object = TextObject( - selection_state.original_cursor_position - buff.cursor_position, - type=text_obj_type, - ) - - # Execute operator. - operator_func(event, text_object) - - # Quit selection mode. - buff.selection_state = None - - return operator_func - - return decorator - - return operator_decorator - - -@Condition -def is_returnable() -> bool: - return get_app().current_buffer.is_returnable - - -@Condition -def in_block_selection() -> bool: - buff = get_app().current_buffer - return bool( - buff.selection_state and buff.selection_state.type == SelectionType.BLOCK - ) - - -@Condition -def digraph_symbol_1_given() -> bool: - return get_app().vi_state.digraph_symbol1 is not None - - -@Condition -def search_buffer_is_empty() -> bool: - "Returns True when the search buffer is empty." - return get_app().current_buffer.text == "" - - -@Condition -def tilde_operator() -> bool: - return get_app().vi_state.tilde_operator - - -def load_vi_bindings() -> KeyBindingsBase: - """ - Vi extensions. - - # Overview of Readline Vi commands: - # http://www.catonmat.net/download/bash-vi-editing-mode-cheat-sheet.pdf - """ - # Note: Some key bindings have the "~IsReadOnly()" filter added. This - # prevents the handler to be executed when the focus is on a - # read-only buffer. - # This is however only required for those that change the ViState to - # INSERT mode. The `Buffer` class itself throws the - # `EditReadOnlyBuffer` exception for any text operations which is - # handled correctly. There is no need to add "~IsReadOnly" to all key - # bindings that do text manipulation. - - key_bindings = KeyBindings() - handle = key_bindings.add - - # (Note: Always take the navigation bindings in read-only mode, even when - # ViState says different.) - - TransformFunction = Tuple[Tuple[str, ...], Filter, Callable[[str], str]] - - vi_transform_functions: list[TransformFunction] = [ - # Rot 13 transformation - ( - ("g", "?"), - Always(), - lambda string: codecs.encode(string, "rot_13"), - ), - # To lowercase - (("g", "u"), Always(), lambda string: string.lower()), - # To uppercase. - (("g", "U"), Always(), lambda string: string.upper()), - # Swap case. - (("g", "~"), Always(), lambda string: string.swapcase()), - ( - ("~",), - tilde_operator, - lambda string: string.swapcase(), - ), - ] - - # Insert a character literally (quoted insert). - handle("c-v", filter=vi_insert_mode)(get_by_name("quoted-insert")) - - @handle("escape") - def _back_to_navigation(event: E) -> None: - """ - Escape goes to vi navigation mode. - """ - buffer = event.current_buffer - vi_state = event.app.vi_state - - if vi_state.input_mode in (InputMode.INSERT, InputMode.REPLACE): - buffer.cursor_position += buffer.document.get_cursor_left_position() - - vi_state.input_mode = InputMode.NAVIGATION - - if bool(buffer.selection_state): - buffer.exit_selection() - - @handle("k", filter=vi_selection_mode) - def _up_in_selection(event: E) -> None: - """ - Arrow up in selection mode. - """ - event.current_buffer.cursor_up(count=event.arg) - - @handle("j", filter=vi_selection_mode) - def _down_in_selection(event: E) -> None: - """ - Arrow down in selection mode. - """ - event.current_buffer.cursor_down(count=event.arg) - - @handle("up", filter=vi_navigation_mode) - @handle("c-p", filter=vi_navigation_mode) - def _up_in_navigation(event: E) -> None: - """ - Arrow up and ControlP in navigation mode go up. - """ - event.current_buffer.auto_up(count=event.arg) - - @handle("k", filter=vi_navigation_mode) - def _go_up(event: E) -> None: - """ - Go up, but if we enter a new history entry, move to the start of the - line. - """ - event.current_buffer.auto_up( - count=event.arg, go_to_start_of_line_if_history_changes=True - ) - - @handle("down", filter=vi_navigation_mode) - @handle("c-n", filter=vi_navigation_mode) - def _go_down(event: E) -> None: - """ - Arrow down and Control-N in navigation mode. - """ - event.current_buffer.auto_down(count=event.arg) - - @handle("j", filter=vi_navigation_mode) - def _go_down2(event: E) -> None: - """ - Go down, but if we enter a new history entry, go to the start of the line. - """ - event.current_buffer.auto_down( - count=event.arg, go_to_start_of_line_if_history_changes=True - ) - - @handle("backspace", filter=vi_navigation_mode) - def _go_left(event: E) -> None: - """ - In navigation-mode, move cursor. - """ - event.current_buffer.cursor_position += ( - event.current_buffer.document.get_cursor_left_position(count=event.arg) - ) - - @handle("c-n", filter=vi_insert_mode) - def _complete_next(event: E) -> None: - b = event.current_buffer - - if b.complete_state: - b.complete_next() - else: - b.start_completion(select_first=True) - - @handle("c-p", filter=vi_insert_mode) - def _complete_prev(event: E) -> None: - """ - Control-P: To previous completion. - """ - b = event.current_buffer - - if b.complete_state: - b.complete_previous() - else: - b.start_completion(select_last=True) - - @handle("c-g", filter=vi_insert_mode) - @handle("c-y", filter=vi_insert_mode) - def _accept_completion(event: E) -> None: - """ - Accept current completion. - """ - event.current_buffer.complete_state = None - - @handle("c-e", filter=vi_insert_mode) - def _cancel_completion(event: E) -> None: - """ - Cancel completion. Go back to originally typed text. - """ - event.current_buffer.cancel_completion() - - # In navigation mode, pressing enter will always return the input. - handle("enter", filter=vi_navigation_mode & is_returnable)( - get_by_name("accept-line") - ) - - # In insert mode, also accept input when enter is pressed, and the buffer - # has been marked as single line. - handle("enter", filter=is_returnable & ~is_multiline)(get_by_name("accept-line")) - - @handle("enter", filter=~is_returnable & vi_navigation_mode) - def _start_of_next_line(event: E) -> None: - """ - Go to the beginning of next line. - """ - b = event.current_buffer - b.cursor_down(count=event.arg) - b.cursor_position += b.document.get_start_of_line_position( - after_whitespace=True - ) - - # ** In navigation mode ** - - # List of navigation commands: http://hea-www.harvard.edu/~fine/Tech/vi.html - - @handle("insert", filter=vi_navigation_mode) - def _insert_mode(event: E) -> None: - """ - Pressing the Insert key. - """ - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("insert", filter=vi_insert_mode) - def _navigation_mode(event: E) -> None: - """ - Pressing the Insert key. - """ - event.app.vi_state.input_mode = InputMode.NAVIGATION - - @handle("a", filter=vi_navigation_mode & ~is_read_only) - # ~IsReadOnly, because we want to stay in navigation mode for - # read-only buffers. - def _a(event: E) -> None: - event.current_buffer.cursor_position += ( - event.current_buffer.document.get_cursor_right_position() - ) - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("A", filter=vi_navigation_mode & ~is_read_only) - def _A(event: E) -> None: - event.current_buffer.cursor_position += ( - event.current_buffer.document.get_end_of_line_position() - ) - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("C", filter=vi_navigation_mode & ~is_read_only) - def _change_until_end_of_line(event: E) -> None: - """ - Change to end of line. - Same as 'c$' (which is implemented elsewhere.) - """ - buffer = event.current_buffer - - deleted = buffer.delete(count=buffer.document.get_end_of_line_position()) - event.app.clipboard.set_text(deleted) - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("c", "c", filter=vi_navigation_mode & ~is_read_only) - @handle("S", filter=vi_navigation_mode & ~is_read_only) - def _change_current_line(event: E) -> None: # TODO: implement 'arg' - """ - Change current line - """ - buffer = event.current_buffer - - # We copy the whole line. - data = ClipboardData(buffer.document.current_line, SelectionType.LINES) - event.app.clipboard.set_data(data) - - # But we delete after the whitespace - buffer.cursor_position += buffer.document.get_start_of_line_position( - after_whitespace=True - ) - buffer.delete(count=buffer.document.get_end_of_line_position()) - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("D", filter=vi_navigation_mode) - def _delete_until_end_of_line(event: E) -> None: - """ - Delete from cursor position until the end of the line. - """ - buffer = event.current_buffer - deleted = buffer.delete(count=buffer.document.get_end_of_line_position()) - event.app.clipboard.set_text(deleted) - - @handle("d", "d", filter=vi_navigation_mode) - def _delete_line(event: E) -> None: - """ - Delete line. (Or the following 'n' lines.) - """ - buffer = event.current_buffer - - # Split string in before/deleted/after text. - lines = buffer.document.lines - - before = "\n".join(lines[: buffer.document.cursor_position_row]) - deleted = "\n".join( - lines[ - buffer.document.cursor_position_row : buffer.document.cursor_position_row - + event.arg - ] - ) - after = "\n".join(lines[buffer.document.cursor_position_row + event.arg :]) - - # Set new text. - if before and after: - before = before + "\n" - - # Set text and cursor position. - buffer.document = Document( - text=before + after, - # Cursor At the start of the first 'after' line, after the leading whitespace. - cursor_position=len(before) + len(after) - len(after.lstrip(" ")), - ) - - # Set clipboard data - event.app.clipboard.set_data(ClipboardData(deleted, SelectionType.LINES)) - - @handle("x", filter=vi_selection_mode) - def _cut(event: E) -> None: - """ - Cut selection. - ('x' is not an operator.) - """ - clipboard_data = event.current_buffer.cut_selection() - event.app.clipboard.set_data(clipboard_data) - - @handle("i", filter=vi_navigation_mode & ~is_read_only) - def _i(event: E) -> None: - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("I", filter=vi_navigation_mode & ~is_read_only) - def _I(event: E) -> None: - event.app.vi_state.input_mode = InputMode.INSERT - event.current_buffer.cursor_position += ( - event.current_buffer.document.get_start_of_line_position( - after_whitespace=True - ) - ) - - @handle("I", filter=in_block_selection & ~is_read_only) - def insert_in_block_selection(event: E, after: bool = False) -> None: - """ - Insert in block selection mode. - """ - buff = event.current_buffer - - # Store all cursor positions. - positions = [] - - if after: - - def get_pos(from_to: tuple[int, int]) -> int: - return from_to[1] - - else: - - def get_pos(from_to: tuple[int, int]) -> int: - return from_to[0] - - for i, from_to in enumerate(buff.document.selection_ranges()): - positions.append(get_pos(from_to)) - if i == 0: - buff.cursor_position = get_pos(from_to) - - buff.multiple_cursor_positions = positions - - # Go to 'INSERT_MULTIPLE' mode. - event.app.vi_state.input_mode = InputMode.INSERT_MULTIPLE - buff.exit_selection() - - @handle("A", filter=in_block_selection & ~is_read_only) - def _append_after_block(event: E) -> None: - insert_in_block_selection(event, after=True) - - @handle("J", filter=vi_navigation_mode & ~is_read_only) - def _join(event: E) -> None: - """ - Join lines. - """ - for i in range(event.arg): - event.current_buffer.join_next_line() - - @handle("g", "J", filter=vi_navigation_mode & ~is_read_only) - def _join_nospace(event: E) -> None: - """ - Join lines without space. - """ - for i in range(event.arg): - event.current_buffer.join_next_line(separator="") - - @handle("J", filter=vi_selection_mode & ~is_read_only) - def _join_selection(event: E) -> None: - """ - Join selected lines. - """ - event.current_buffer.join_selected_lines() - - @handle("g", "J", filter=vi_selection_mode & ~is_read_only) - def _join_selection_nospace(event: E) -> None: - """ - Join selected lines without space. - """ - event.current_buffer.join_selected_lines(separator="") - - @handle("p", filter=vi_navigation_mode) - def _paste(event: E) -> None: - """ - Paste after - """ - event.current_buffer.paste_clipboard_data( - event.app.clipboard.get_data(), - count=event.arg, - paste_mode=PasteMode.VI_AFTER, - ) - - @handle("P", filter=vi_navigation_mode) - def _paste_before(event: E) -> None: - """ - Paste before - """ - event.current_buffer.paste_clipboard_data( - event.app.clipboard.get_data(), - count=event.arg, - paste_mode=PasteMode.VI_BEFORE, - ) - - @handle('"', Keys.Any, "p", filter=vi_navigation_mode) - def _paste_register(event: E) -> None: - """ - Paste from named register. - """ - c = event.key_sequence[1].data - if c in vi_register_names: - data = event.app.vi_state.named_registers.get(c) - if data: - event.current_buffer.paste_clipboard_data( - data, count=event.arg, paste_mode=PasteMode.VI_AFTER - ) - - @handle('"', Keys.Any, "P", filter=vi_navigation_mode) - def _paste_register_before(event: E) -> None: - """ - Paste (before) from named register. - """ - c = event.key_sequence[1].data - if c in vi_register_names: - data = event.app.vi_state.named_registers.get(c) - if data: - event.current_buffer.paste_clipboard_data( - data, count=event.arg, paste_mode=PasteMode.VI_BEFORE - ) - - @handle("r", filter=vi_navigation_mode) - def _replace(event: E) -> None: - """ - Go to 'replace-single'-mode. - """ - event.app.vi_state.input_mode = InputMode.REPLACE_SINGLE - - @handle("R", filter=vi_navigation_mode) - def _replace_mode(event: E) -> None: - """ - Go to 'replace'-mode. - """ - event.app.vi_state.input_mode = InputMode.REPLACE - - @handle("s", filter=vi_navigation_mode & ~is_read_only) - def _substitute(event: E) -> None: - """ - Substitute with new text - (Delete character(s) and go to insert mode.) - """ - text = event.current_buffer.delete(count=event.arg) - event.app.clipboard.set_text(text) - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("u", filter=vi_navigation_mode, save_before=(lambda e: False)) - def _undo(event: E) -> None: - for i in range(event.arg): - event.current_buffer.undo() - - @handle("V", filter=vi_navigation_mode) - def _visual_line(event: E) -> None: - """ - Start lines selection. - """ - event.current_buffer.start_selection(selection_type=SelectionType.LINES) - - @handle("c-v", filter=vi_navigation_mode) - def _visual_block(event: E) -> None: - """ - Enter block selection mode. - """ - event.current_buffer.start_selection(selection_type=SelectionType.BLOCK) - - @handle("V", filter=vi_selection_mode) - def _visual_line2(event: E) -> None: - """ - Exit line selection mode, or go from non line selection mode to line - selection mode. - """ - selection_state = event.current_buffer.selection_state - - if selection_state is not None: - if selection_state.type != SelectionType.LINES: - selection_state.type = SelectionType.LINES - else: - event.current_buffer.exit_selection() - - @handle("v", filter=vi_navigation_mode) - def _visual(event: E) -> None: - """ - Enter character selection mode. - """ - event.current_buffer.start_selection(selection_type=SelectionType.CHARACTERS) - - @handle("v", filter=vi_selection_mode) - def _visual2(event: E) -> None: - """ - Exit character selection mode, or go from non-character-selection mode - to character selection mode. - """ - selection_state = event.current_buffer.selection_state - - if selection_state is not None: - if selection_state.type != SelectionType.CHARACTERS: - selection_state.type = SelectionType.CHARACTERS - else: - event.current_buffer.exit_selection() - - @handle("c-v", filter=vi_selection_mode) - def _visual_block2(event: E) -> None: - """ - Exit block selection mode, or go from non block selection mode to block - selection mode. - """ - selection_state = event.current_buffer.selection_state - - if selection_state is not None: - if selection_state.type != SelectionType.BLOCK: - selection_state.type = SelectionType.BLOCK - else: - event.current_buffer.exit_selection() - - @handle("a", "w", filter=vi_selection_mode) - @handle("a", "W", filter=vi_selection_mode) - def _visual_auto_word(event: E) -> None: - """ - Switch from visual linewise mode to visual characterwise mode. - """ - buffer = event.current_buffer - - if ( - buffer.selection_state - and buffer.selection_state.type == SelectionType.LINES - ): - buffer.selection_state.type = SelectionType.CHARACTERS - - @handle("x", filter=vi_navigation_mode) - def _delete(event: E) -> None: - """ - Delete character. - """ - buff = event.current_buffer - count = min(event.arg, len(buff.document.current_line_after_cursor)) - if count: - text = event.current_buffer.delete(count=count) - event.app.clipboard.set_text(text) - - @handle("X", filter=vi_navigation_mode) - def _delete_before_cursor(event: E) -> None: - buff = event.current_buffer - count = min(event.arg, len(buff.document.current_line_before_cursor)) - if count: - text = event.current_buffer.delete_before_cursor(count=count) - event.app.clipboard.set_text(text) - - @handle("y", "y", filter=vi_navigation_mode) - @handle("Y", filter=vi_navigation_mode) - def _yank_line(event: E) -> None: - """ - Yank the whole line. - """ - text = "\n".join(event.current_buffer.document.lines_from_current[: event.arg]) - event.app.clipboard.set_data(ClipboardData(text, SelectionType.LINES)) - - @handle("+", filter=vi_navigation_mode) - def _next_line(event: E) -> None: - """ - Move to first non whitespace of next line - """ - buffer = event.current_buffer - buffer.cursor_position += buffer.document.get_cursor_down_position( - count=event.arg - ) - buffer.cursor_position += buffer.document.get_start_of_line_position( - after_whitespace=True - ) - - @handle("-", filter=vi_navigation_mode) - def _prev_line(event: E) -> None: - """ - Move to first non whitespace of previous line - """ - buffer = event.current_buffer - buffer.cursor_position += buffer.document.get_cursor_up_position( - count=event.arg - ) - buffer.cursor_position += buffer.document.get_start_of_line_position( - after_whitespace=True - ) - - @handle(">", ">", filter=vi_navigation_mode) - @handle("c-t", filter=vi_insert_mode) - def _indent(event: E) -> None: - """ - Indent lines. - """ - buffer = event.current_buffer - current_row = buffer.document.cursor_position_row - indent(buffer, current_row, current_row + event.arg) - - @handle("<", "<", filter=vi_navigation_mode) - @handle("c-d", filter=vi_insert_mode) - def _unindent(event: E) -> None: - """ - Unindent lines. - """ - current_row = event.current_buffer.document.cursor_position_row - unindent(event.current_buffer, current_row, current_row + event.arg) - - @handle("O", filter=vi_navigation_mode & ~is_read_only) - def _open_above(event: E) -> None: - """ - Open line above and enter insertion mode - """ - event.current_buffer.insert_line_above(copy_margin=not in_paste_mode()) - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("o", filter=vi_navigation_mode & ~is_read_only) - def _open_below(event: E) -> None: - """ - Open line below and enter insertion mode - """ - event.current_buffer.insert_line_below(copy_margin=not in_paste_mode()) - event.app.vi_state.input_mode = InputMode.INSERT - - @handle("~", filter=vi_navigation_mode) - def _reverse_case(event: E) -> None: - """ - Reverse case of current character and move cursor forward. - """ - buffer = event.current_buffer - c = buffer.document.current_char - - if c is not None and c != "\n": - buffer.insert_text(c.swapcase(), overwrite=True) - - @handle("g", "u", "u", filter=vi_navigation_mode & ~is_read_only) - def _lowercase_line(event: E) -> None: - """ - Lowercase current line. - """ - buff = event.current_buffer - buff.transform_current_line(lambda s: s.lower()) - - @handle("g", "U", "U", filter=vi_navigation_mode & ~is_read_only) - def _uppercase_line(event: E) -> None: - """ - Uppercase current line. - """ - buff = event.current_buffer - buff.transform_current_line(lambda s: s.upper()) - - @handle("g", "~", "~", filter=vi_navigation_mode & ~is_read_only) - def _swapcase_line(event: E) -> None: - """ - Swap case of the current line. - """ - buff = event.current_buffer - buff.transform_current_line(lambda s: s.swapcase()) - - @handle("#", filter=vi_navigation_mode) - def _prev_occurrence(event: E) -> None: - """ - Go to previous occurrence of this word. - """ - b = event.current_buffer - search_state = event.app.current_search_state - - search_state.text = b.document.get_word_under_cursor() - search_state.direction = SearchDirection.BACKWARD - - b.apply_search(search_state, count=event.arg, include_current_position=False) - - @handle("*", filter=vi_navigation_mode) - def _next_occurrence(event: E) -> None: - """ - Go to next occurrence of this word. - """ - b = event.current_buffer - search_state = event.app.current_search_state - - search_state.text = b.document.get_word_under_cursor() - search_state.direction = SearchDirection.FORWARD - - b.apply_search(search_state, count=event.arg, include_current_position=False) - - @handle("(", filter=vi_navigation_mode) - def _begin_of_sentence(event: E) -> None: - # TODO: go to begin of sentence. - # XXX: should become text_object. - pass - - @handle(")", filter=vi_navigation_mode) - def _end_of_sentence(event: E) -> None: - # TODO: go to end of sentence. - # XXX: should become text_object. - pass - - operator = create_operator_decorator(key_bindings) - text_object = create_text_object_decorator(key_bindings) - - @handle(Keys.Any, filter=vi_waiting_for_text_object_mode) - def _unknown_text_object(event: E) -> None: - """ - Unknown key binding while waiting for a text object. - """ - event.app.output.bell() - - # - # *** Operators *** - # - - def create_delete_and_change_operators( - delete_only: bool, with_register: bool = False - ) -> None: - """ - Delete and change operators. - - :param delete_only: Create an operator that deletes, but doesn't go to insert mode. - :param with_register: Copy the deleted text to this named register instead of the clipboard. - """ - handler_keys: Iterable[str] - if with_register: - handler_keys = ('"', Keys.Any, "cd"[delete_only]) - else: - handler_keys = "cd"[delete_only] - - @operator(*handler_keys, filter=~is_read_only) - def delete_or_change_operator(event: E, text_object: TextObject) -> None: - clipboard_data = None - buff = event.current_buffer - - if text_object: - new_document, clipboard_data = text_object.cut(buff) - buff.document = new_document - - # Set deleted/changed text to clipboard or named register. - if clipboard_data and clipboard_data.text: - if with_register: - reg_name = event.key_sequence[1].data - if reg_name in vi_register_names: - event.app.vi_state.named_registers[reg_name] = clipboard_data - else: - event.app.clipboard.set_data(clipboard_data) - - # Only go back to insert mode in case of 'change'. - if not delete_only: - event.app.vi_state.input_mode = InputMode.INSERT - - create_delete_and_change_operators(False, False) - create_delete_and_change_operators(False, True) - create_delete_and_change_operators(True, False) - create_delete_and_change_operators(True, True) - - def create_transform_handler( - filter: Filter, transform_func: Callable[[str], str], *a: str - ) -> None: - @operator(*a, filter=filter & ~is_read_only) - def _(event: E, text_object: TextObject) -> None: - """ - Apply transformation (uppercase, lowercase, rot13, swap case). - """ - buff = event.current_buffer - start, end = text_object.operator_range(buff.document) - - if start < end: - # Transform. - buff.transform_region( - buff.cursor_position + start, - buff.cursor_position + end, - transform_func, - ) - - # Move cursor - buff.cursor_position += text_object.end or text_object.start - - for k, f, func in vi_transform_functions: - create_transform_handler(f, func, *k) - - @operator("y") - def _yank(event: E, text_object: TextObject) -> None: - """ - Yank operator. (Copy text.) - """ - _, clipboard_data = text_object.cut(event.current_buffer) - if clipboard_data.text: - event.app.clipboard.set_data(clipboard_data) - - @operator('"', Keys.Any, "y") - def _yank_to_register(event: E, text_object: TextObject) -> None: - """ - Yank selection to named register. - """ - c = event.key_sequence[1].data - if c in vi_register_names: - _, clipboard_data = text_object.cut(event.current_buffer) - event.app.vi_state.named_registers[c] = clipboard_data - - @operator(">") - def _indent_text_object(event: E, text_object: TextObject) -> None: - """ - Indent. - """ - buff = event.current_buffer - from_, to = text_object.get_line_numbers(buff) - indent(buff, from_, to + 1, count=event.arg) - - @operator("<") - def _unindent_text_object(event: E, text_object: TextObject) -> None: - """ - Unindent. - """ - buff = event.current_buffer - from_, to = text_object.get_line_numbers(buff) - unindent(buff, from_, to + 1, count=event.arg) - - @operator("g", "q") - def _reshape(event: E, text_object: TextObject) -> None: - """ - Reshape text. - """ - buff = event.current_buffer - from_, to = text_object.get_line_numbers(buff) - reshape_text(buff, from_, to) - - # - # *** Text objects *** - # - - @text_object("b") - def _b(event: E) -> TextObject: - """ - Move one word or token left. - """ - return TextObject( - event.current_buffer.document.find_start_of_previous_word(count=event.arg) - or 0 - ) - - @text_object("B") - def _B(event: E) -> TextObject: - """ - Move one non-blank word left - """ - return TextObject( - event.current_buffer.document.find_start_of_previous_word( - count=event.arg, WORD=True - ) - or 0 - ) - - @text_object("$") - def _dollar(event: E) -> TextObject: - """ - 'c$', 'd$' and '$': Delete/change/move until end of line. - """ - return TextObject(event.current_buffer.document.get_end_of_line_position()) - - @text_object("w") - def _word_forward(event: E) -> TextObject: - """ - 'word' forward. 'cw', 'dw', 'w': Delete/change/move one word. - """ - return TextObject( - event.current_buffer.document.find_next_word_beginning(count=event.arg) - or event.current_buffer.document.get_end_of_document_position() - ) - - @text_object("W") - def _WORD_forward(event: E) -> TextObject: - """ - 'WORD' forward. 'cW', 'dW', 'W': Delete/change/move one WORD. - """ - return TextObject( - event.current_buffer.document.find_next_word_beginning( - count=event.arg, WORD=True - ) - or event.current_buffer.document.get_end_of_document_position() - ) - - @text_object("e") - def _end_of_word(event: E) -> TextObject: - """ - End of 'word': 'ce', 'de', 'e' - """ - end = event.current_buffer.document.find_next_word_ending(count=event.arg) - return TextObject(end - 1 if end else 0, type=TextObjectType.INCLUSIVE) - - @text_object("E") - def _end_of_WORD(event: E) -> TextObject: - """ - End of 'WORD': 'cE', 'dE', 'E' - """ - end = event.current_buffer.document.find_next_word_ending( - count=event.arg, WORD=True - ) - return TextObject(end - 1 if end else 0, type=TextObjectType.INCLUSIVE) - - @text_object("i", "w", no_move_handler=True) - def _inner_word(event: E) -> TextObject: - """ - Inner 'word': ciw and diw - """ - start, end = event.current_buffer.document.find_boundaries_of_current_word() - return TextObject(start, end) - - @text_object("a", "w", no_move_handler=True) - def _a_word(event: E) -> TextObject: - """ - A 'word': caw and daw - """ - start, end = event.current_buffer.document.find_boundaries_of_current_word( - include_trailing_whitespace=True - ) - return TextObject(start, end) - - @text_object("i", "W", no_move_handler=True) - def _inner_WORD(event: E) -> TextObject: - """ - Inner 'WORD': ciW and diW - """ - start, end = event.current_buffer.document.find_boundaries_of_current_word( - WORD=True - ) - return TextObject(start, end) - - @text_object("a", "W", no_move_handler=True) - def _a_WORD(event: E) -> TextObject: - """ - A 'WORD': caw and daw - """ - start, end = event.current_buffer.document.find_boundaries_of_current_word( - WORD=True, include_trailing_whitespace=True - ) - return TextObject(start, end) - - @text_object("a", "p", no_move_handler=True) - def _paragraph(event: E) -> TextObject: - """ - Auto paragraph. - """ - start = event.current_buffer.document.start_of_paragraph() - end = event.current_buffer.document.end_of_paragraph(count=event.arg) - return TextObject(start, end) - - @text_object("^") - def _start_of_line(event: E) -> TextObject: - """'c^', 'd^' and '^': Soft start of line, after whitespace.""" - return TextObject( - event.current_buffer.document.get_start_of_line_position( - after_whitespace=True - ) - ) - - @text_object("0") - def _hard_start_of_line(event: E) -> TextObject: - """ - 'c0', 'd0': Hard start of line, before whitespace. - (The move '0' key is implemented elsewhere, because a '0' could also change the `arg`.) - """ - return TextObject( - event.current_buffer.document.get_start_of_line_position( - after_whitespace=False - ) - ) - - def create_ci_ca_handles( - ci_start: str, ci_end: str, inner: bool, key: str | None = None - ) -> None: - # TODO: 'dat', 'dit', (tags (like xml) - """ - Delete/Change string between this start and stop character. But keep these characters. - This implements all the ci", ci<, ci{, ci(, di", di<, ca", ca<, ... combinations. - """ - - def handler(event: E) -> TextObject: - if ci_start == ci_end: - # Quotes - start = event.current_buffer.document.find_backwards( - ci_start, in_current_line=False - ) - end = event.current_buffer.document.find(ci_end, in_current_line=False) - else: - # Brackets - start = event.current_buffer.document.find_enclosing_bracket_left( - ci_start, ci_end - ) - end = event.current_buffer.document.find_enclosing_bracket_right( - ci_start, ci_end - ) - - if start is not None and end is not None: - offset = 0 if inner else 1 - return TextObject(start + 1 - offset, end + offset) - else: - # Nothing found. - return TextObject(0) - - if key is None: - text_object("ai"[inner], ci_start, no_move_handler=True)(handler) - text_object("ai"[inner], ci_end, no_move_handler=True)(handler) - else: - text_object("ai"[inner], key, no_move_handler=True)(handler) - - for inner in (False, True): - for ci_start, ci_end in [ - ('"', '"'), - ("'", "'"), - ("`", "`"), - ("[", "]"), - ("<", ">"), - ("{", "}"), - ("(", ")"), - ]: - create_ci_ca_handles(ci_start, ci_end, inner) - - create_ci_ca_handles("(", ")", inner, "b") # 'dab', 'dib' - create_ci_ca_handles("{", "}", inner, "B") # 'daB', 'diB' - - @text_object("{") - def _previous_section(event: E) -> TextObject: - """ - Move to previous blank-line separated section. - Implements '{', 'c{', 'd{', 'y{' - """ - index = event.current_buffer.document.start_of_paragraph( - count=event.arg, before=True - ) - return TextObject(index) - - @text_object("}") - def _next_section(event: E) -> TextObject: - """ - Move to next blank-line separated section. - Implements '}', 'c}', 'd}', 'y}' - """ - index = event.current_buffer.document.end_of_paragraph( - count=event.arg, after=True - ) - return TextObject(index) - - @text_object("f", Keys.Any) - def _find_next_occurrence(event: E) -> TextObject: - """ - Go to next occurrence of character. Typing 'fx' will move the - cursor to the next occurrence of character. 'x'. - """ - event.app.vi_state.last_character_find = CharacterFind(event.data, False) - match = event.current_buffer.document.find( - event.data, in_current_line=True, count=event.arg - ) - if match: - return TextObject(match, type=TextObjectType.INCLUSIVE) - else: - return TextObject(0) - - @text_object("F", Keys.Any) - def _find_previous_occurrence(event: E) -> TextObject: - """ - Go to previous occurrence of character. Typing 'Fx' will move the - cursor to the previous occurrence of character. 'x'. - """ - event.app.vi_state.last_character_find = CharacterFind(event.data, True) - return TextObject( - event.current_buffer.document.find_backwards( - event.data, in_current_line=True, count=event.arg - ) - or 0 - ) - - @text_object("t", Keys.Any) - def _t(event: E) -> TextObject: - """ - Move right to the next occurrence of c, then one char backward. - """ - event.app.vi_state.last_character_find = CharacterFind(event.data, False) - match = event.current_buffer.document.find( - event.data, in_current_line=True, count=event.arg - ) - if match: - return TextObject(match - 1, type=TextObjectType.INCLUSIVE) - else: - return TextObject(0) - - @text_object("T", Keys.Any) - def _T(event: E) -> TextObject: - """ - Move left to the previous occurrence of c, then one char forward. - """ - event.app.vi_state.last_character_find = CharacterFind(event.data, True) - match = event.current_buffer.document.find_backwards( - event.data, in_current_line=True, count=event.arg - ) - return TextObject(match + 1 if match else 0) - - def repeat(reverse: bool) -> None: - """ - Create ',' and ';' commands. - """ - - @text_object("," if reverse else ";") - def _(event: E) -> TextObject: - """ - Repeat the last 'f'/'F'/'t'/'T' command. - """ - pos: int | None = 0 - vi_state = event.app.vi_state - - type = TextObjectType.EXCLUSIVE - - if vi_state.last_character_find: - char = vi_state.last_character_find.character - backwards = vi_state.last_character_find.backwards - - if reverse: - backwards = not backwards - - if backwards: - pos = event.current_buffer.document.find_backwards( - char, in_current_line=True, count=event.arg - ) - else: - pos = event.current_buffer.document.find( - char, in_current_line=True, count=event.arg - ) - type = TextObjectType.INCLUSIVE - if pos: - return TextObject(pos, type=type) - else: - return TextObject(0) - - repeat(True) - repeat(False) - - @text_object("h") - @text_object("left") - def _left(event: E) -> TextObject: - """ - Implements 'ch', 'dh', 'h': Cursor left. - """ - return TextObject( - event.current_buffer.document.get_cursor_left_position(count=event.arg) - ) - - @text_object("j", no_move_handler=True, no_selection_handler=True) - # Note: We also need `no_selection_handler`, because we in - # selection mode, we prefer the other 'j' binding that keeps - # `buffer.preferred_column`. - def _down(event: E) -> TextObject: - """ - Implements 'cj', 'dj', 'j', ... Cursor up. - """ - return TextObject( - event.current_buffer.document.get_cursor_down_position(count=event.arg), - type=TextObjectType.LINEWISE, - ) - - @text_object("k", no_move_handler=True, no_selection_handler=True) - def _up(event: E) -> TextObject: - """ - Implements 'ck', 'dk', 'k', ... Cursor up. - """ - return TextObject( - event.current_buffer.document.get_cursor_up_position(count=event.arg), - type=TextObjectType.LINEWISE, - ) - - @text_object("l") - @text_object(" ") - @text_object("right") - def _right(event: E) -> TextObject: - """ - Implements 'cl', 'dl', 'l', 'c ', 'd ', ' '. Cursor right. - """ - return TextObject( - event.current_buffer.document.get_cursor_right_position(count=event.arg) - ) - - @text_object("H") - def _top_of_screen(event: E) -> TextObject: - """ - Moves to the start of the visible region. (Below the scroll offset.) - Implements 'cH', 'dH', 'H'. - """ - w = event.app.layout.current_window - b = event.current_buffer - - if w and w.render_info: - # When we find a Window that has BufferControl showing this window, - # move to the start of the visible area. - pos = ( - b.document.translate_row_col_to_index( - w.render_info.first_visible_line(after_scroll_offset=True), 0 - ) - - b.cursor_position - ) - - else: - # Otherwise, move to the start of the input. - pos = -len(b.document.text_before_cursor) - return TextObject(pos, type=TextObjectType.LINEWISE) - - @text_object("M") - def _middle_of_screen(event: E) -> TextObject: - """ - Moves cursor to the vertical center of the visible region. - Implements 'cM', 'dM', 'M'. - """ - w = event.app.layout.current_window - b = event.current_buffer - - if w and w.render_info: - # When we find a Window that has BufferControl showing this window, - # move to the center of the visible area. - pos = ( - b.document.translate_row_col_to_index( - w.render_info.center_visible_line(), 0 - ) - - b.cursor_position - ) - - else: - # Otherwise, move to the start of the input. - pos = -len(b.document.text_before_cursor) - return TextObject(pos, type=TextObjectType.LINEWISE) - - @text_object("L") - def _end_of_screen(event: E) -> TextObject: - """ - Moves to the end of the visible region. (Above the scroll offset.) - """ - w = event.app.layout.current_window - b = event.current_buffer - - if w and w.render_info: - # When we find a Window that has BufferControl showing this window, - # move to the end of the visible area. - pos = ( - b.document.translate_row_col_to_index( - w.render_info.last_visible_line(before_scroll_offset=True), 0 - ) - - b.cursor_position - ) - - else: - # Otherwise, move to the end of the input. - pos = len(b.document.text_after_cursor) - return TextObject(pos, type=TextObjectType.LINEWISE) - - @text_object("n", no_move_handler=True) - def _search_next(event: E) -> TextObject: - """ - Search next. - """ - buff = event.current_buffer - search_state = event.app.current_search_state - - cursor_position = buff.get_search_position( - search_state, include_current_position=False, count=event.arg - ) - return TextObject(cursor_position - buff.cursor_position) - - @handle("n", filter=vi_navigation_mode) - def _search_next2(event: E) -> None: - """ - Search next in navigation mode. (This goes through the history.) - """ - search_state = event.app.current_search_state - - event.current_buffer.apply_search( - search_state, include_current_position=False, count=event.arg - ) - - @text_object("N", no_move_handler=True) - def _search_previous(event: E) -> TextObject: - """ - Search previous. - """ - buff = event.current_buffer - search_state = event.app.current_search_state - - cursor_position = buff.get_search_position( - ~search_state, include_current_position=False, count=event.arg - ) - return TextObject(cursor_position - buff.cursor_position) - - @handle("N", filter=vi_navigation_mode) - def _search_previous2(event: E) -> None: - """ - Search previous in navigation mode. (This goes through the history.) - """ - search_state = event.app.current_search_state - - event.current_buffer.apply_search( - ~search_state, include_current_position=False, count=event.arg - ) - - @handle("z", "+", filter=vi_navigation_mode | vi_selection_mode) - @handle("z", "t", filter=vi_navigation_mode | vi_selection_mode) - @handle("z", "enter", filter=vi_navigation_mode | vi_selection_mode) - def _scroll_top(event: E) -> None: - """ - Scrolls the window to makes the current line the first line in the visible region. - """ - b = event.current_buffer - event.app.layout.current_window.vertical_scroll = b.document.cursor_position_row - - @handle("z", "-", filter=vi_navigation_mode | vi_selection_mode) - @handle("z", "b", filter=vi_navigation_mode | vi_selection_mode) - def _scroll_bottom(event: E) -> None: - """ - Scrolls the window to makes the current line the last line in the visible region. - """ - # We can safely set the scroll offset to zero; the Window will make - # sure that it scrolls at least enough to make the cursor visible - # again. - event.app.layout.current_window.vertical_scroll = 0 - - @handle("z", "z", filter=vi_navigation_mode | vi_selection_mode) - def _scroll_center(event: E) -> None: - """ - Center Window vertically around cursor. - """ - w = event.app.layout.current_window - b = event.current_buffer - - if w and w.render_info: - info = w.render_info - - # Calculate the offset that we need in order to position the row - # containing the cursor in the center. - scroll_height = info.window_height // 2 - - y = max(0, b.document.cursor_position_row - 1) - height = 0 - while y > 0: - line_height = info.get_height_for_line(y) - - if height + line_height < scroll_height: - height += line_height - y -= 1 - else: - break - - w.vertical_scroll = y - - @text_object("%") - def _goto_corresponding_bracket(event: E) -> TextObject: - """ - Implements 'c%', 'd%', '%, 'y%' (Move to corresponding bracket.) - If an 'arg' has been given, go this this % position in the file. - """ - buffer = event.current_buffer - - if event._arg: - # If 'arg' has been given, the meaning of % is to go to the 'x%' - # row in the file. - if 0 < event.arg <= 100: - absolute_index = buffer.document.translate_row_col_to_index( - int((event.arg * buffer.document.line_count - 1) / 100), 0 - ) - return TextObject( - absolute_index - buffer.document.cursor_position, - type=TextObjectType.LINEWISE, - ) - else: - return TextObject(0) # Do nothing. - - else: - # Move to the corresponding opening/closing bracket (()'s, []'s and {}'s). - match = buffer.document.find_matching_bracket_position() - if match: - return TextObject(match, type=TextObjectType.INCLUSIVE) - else: - return TextObject(0) - - @text_object("|") - def _to_column(event: E) -> TextObject: - """ - Move to the n-th column (you may specify the argument n by typing it on - number keys, for example, 20|). - """ - return TextObject( - event.current_buffer.document.get_column_cursor_position(event.arg - 1) - ) - - @text_object("g", "g") - def _goto_first_line(event: E) -> TextObject: - """ - Go to the start of the very first line. - Implements 'gg', 'cgg', 'ygg' - """ - d = event.current_buffer.document - - if event._arg: - # Move to the given line. - return TextObject( - d.translate_row_col_to_index(event.arg - 1, 0) - d.cursor_position, - type=TextObjectType.LINEWISE, - ) - else: - # Move to the top of the input. - return TextObject( - d.get_start_of_document_position(), type=TextObjectType.LINEWISE - ) - - @text_object("g", "_") - def _goto_last_line(event: E) -> TextObject: - """ - Go to last non-blank of line. - 'g_', 'cg_', 'yg_', etc.. - """ - return TextObject( - event.current_buffer.document.last_non_blank_of_current_line_position(), - type=TextObjectType.INCLUSIVE, - ) - - @text_object("g", "e") - def _ge(event: E) -> TextObject: - """ - Go to last character of previous word. - 'ge', 'cge', 'yge', etc.. - """ - prev_end = event.current_buffer.document.find_previous_word_ending( - count=event.arg - ) - return TextObject( - prev_end - 1 if prev_end is not None else 0, type=TextObjectType.INCLUSIVE - ) - - @text_object("g", "E") - def _gE(event: E) -> TextObject: - """ - Go to last character of previous WORD. - 'gE', 'cgE', 'ygE', etc.. - """ - prev_end = event.current_buffer.document.find_previous_word_ending( - count=event.arg, WORD=True - ) - return TextObject( - prev_end - 1 if prev_end is not None else 0, type=TextObjectType.INCLUSIVE - ) - - @text_object("g", "m") - def _gm(event: E) -> TextObject: - """ - Like g0, but half a screenwidth to the right. (Or as much as possible.) - """ - w = event.app.layout.current_window - buff = event.current_buffer - - if w and w.render_info: - width = w.render_info.window_width - start = buff.document.get_start_of_line_position(after_whitespace=False) - start += int(min(width / 2, len(buff.document.current_line))) - - return TextObject(start, type=TextObjectType.INCLUSIVE) - return TextObject(0) - - @text_object("G") - def _last_line(event: E) -> TextObject: - """ - Go to the end of the document. (If no arg has been given.) - """ - buf = event.current_buffer - return TextObject( - buf.document.translate_row_col_to_index(buf.document.line_count - 1, 0) - - buf.cursor_position, - type=TextObjectType.LINEWISE, - ) - - # - # *** Other *** - # - - @handle("G", filter=has_arg) - def _to_nth_history_line(event: E) -> None: - """ - If an argument is given, move to this line in the history. (for - example, 15G) - """ - event.current_buffer.go_to_history(event.arg - 1) - - for n in "123456789": - - @handle( - n, - filter=vi_navigation_mode - | vi_selection_mode - | vi_waiting_for_text_object_mode, - ) - def _arg(event: E) -> None: - """ - Always handle numerics in navigation mode as arg. - """ - event.append_to_arg_count(event.data) - - @handle( - "0", - filter=( - vi_navigation_mode | vi_selection_mode | vi_waiting_for_text_object_mode - ) - & has_arg, - ) - def _0_arg(event: E) -> None: - """ - Zero when an argument was already give. - """ - event.append_to_arg_count(event.data) - - @handle(Keys.Any, filter=vi_replace_mode) - def _insert_text(event: E) -> None: - """ - Insert data at cursor position. - """ - event.current_buffer.insert_text(event.data, overwrite=True) - - @handle(Keys.Any, filter=vi_replace_single_mode) - def _replace_single(event: E) -> None: - """ - Replace single character at cursor position. - """ - event.current_buffer.insert_text(event.data, overwrite=True) - event.current_buffer.cursor_position -= 1 - event.app.vi_state.input_mode = InputMode.NAVIGATION - - @handle( - Keys.Any, - filter=vi_insert_multiple_mode, - save_before=(lambda e: not e.is_repeat), - ) - def _insert_text_multiple_cursors(event: E) -> None: - """ - Insert data at multiple cursor positions at once. - (Usually a result of pressing 'I' or 'A' in block-selection mode.) - """ - buff = event.current_buffer - original_text = buff.text - - # Construct new text. - text = [] - p = 0 - - for p2 in buff.multiple_cursor_positions: - text.append(original_text[p:p2]) - text.append(event.data) - p = p2 - - text.append(original_text[p:]) - - # Shift all cursor positions. - new_cursor_positions = [ - pos + i + 1 for i, pos in enumerate(buff.multiple_cursor_positions) - ] - - # Set result. - buff.text = "".join(text) - buff.multiple_cursor_positions = new_cursor_positions - buff.cursor_position += 1 - - @handle("backspace", filter=vi_insert_multiple_mode) - def _delete_before_multiple_cursors(event: E) -> None: - """ - Backspace, using multiple cursors. - """ - buff = event.current_buffer - original_text = buff.text - - # Construct new text. - deleted_something = False - text = [] - p = 0 - - for p2 in buff.multiple_cursor_positions: - if p2 > 0 and original_text[p2 - 1] != "\n": # Don't delete across lines. - text.append(original_text[p : p2 - 1]) - deleted_something = True - else: - text.append(original_text[p:p2]) - p = p2 - - text.append(original_text[p:]) - - if deleted_something: - # Shift all cursor positions. - lengths = [len(part) for part in text[:-1]] - new_cursor_positions = list(accumulate(lengths)) - - # Set result. - buff.text = "".join(text) - buff.multiple_cursor_positions = new_cursor_positions - buff.cursor_position -= 1 - else: - event.app.output.bell() - - @handle("delete", filter=vi_insert_multiple_mode) - def _delete_after_multiple_cursors(event: E) -> None: - """ - Delete, using multiple cursors. - """ - buff = event.current_buffer - original_text = buff.text - - # Construct new text. - deleted_something = False - text = [] - new_cursor_positions = [] - p = 0 - - for p2 in buff.multiple_cursor_positions: - text.append(original_text[p:p2]) - if p2 >= len(original_text) or original_text[p2] == "\n": - # Don't delete across lines. - p = p2 - else: - p = p2 + 1 - deleted_something = True - - text.append(original_text[p:]) - - if deleted_something: - # Shift all cursor positions. - lengths = [len(part) for part in text[:-1]] - new_cursor_positions = list(accumulate(lengths)) - - # Set result. - buff.text = "".join(text) - buff.multiple_cursor_positions = new_cursor_positions - else: - event.app.output.bell() - - @handle("left", filter=vi_insert_multiple_mode) - def _left_multiple(event: E) -> None: - """ - Move all cursors to the left. - (But keep all cursors on the same line.) - """ - buff = event.current_buffer - new_positions = [] - - for p in buff.multiple_cursor_positions: - if buff.document.translate_index_to_position(p)[1] > 0: - p -= 1 - new_positions.append(p) - - buff.multiple_cursor_positions = new_positions - - if buff.document.cursor_position_col > 0: - buff.cursor_position -= 1 - - @handle("right", filter=vi_insert_multiple_mode) - def _right_multiple(event: E) -> None: - """ - Move all cursors to the right. - (But keep all cursors on the same line.) - """ - buff = event.current_buffer - new_positions = [] - - for p in buff.multiple_cursor_positions: - row, column = buff.document.translate_index_to_position(p) - if column < len(buff.document.lines[row]): - p += 1 - new_positions.append(p) - - buff.multiple_cursor_positions = new_positions - - if not buff.document.is_cursor_at_the_end_of_line: - buff.cursor_position += 1 - - @handle("up", filter=vi_insert_multiple_mode) - @handle("down", filter=vi_insert_multiple_mode) - def _updown_multiple(event: E) -> None: - """ - Ignore all up/down key presses when in multiple cursor mode. - """ - - @handle("c-x", "c-l", filter=vi_insert_mode) - def _complete_line(event: E) -> None: - """ - Pressing the ControlX - ControlL sequence in Vi mode does line - completion based on the other lines in the document and the history. - """ - event.current_buffer.start_history_lines_completion() - - @handle("c-x", "c-f", filter=vi_insert_mode) - def _complete_filename(event: E) -> None: - """ - Complete file names. - """ - # TODO - pass - - @handle("c-k", filter=vi_insert_mode | vi_replace_mode) - def _digraph(event: E) -> None: - """ - Go into digraph mode. - """ - event.app.vi_state.waiting_for_digraph = True - - @handle(Keys.Any, filter=vi_digraph_mode & ~digraph_symbol_1_given) - def _digraph1(event: E) -> None: - """ - First digraph symbol. - """ - event.app.vi_state.digraph_symbol1 = event.data - - @handle(Keys.Any, filter=vi_digraph_mode & digraph_symbol_1_given) - def _create_digraph(event: E) -> None: - """ - Insert digraph. - """ - try: - # Lookup. - code: tuple[str, str] = ( - event.app.vi_state.digraph_symbol1 or "", - event.data, - ) - if code not in DIGRAPHS: - code = code[::-1] # Try reversing. - symbol = DIGRAPHS[code] - except KeyError: - # Unknown digraph. - event.app.output.bell() - else: - # Insert digraph. - overwrite = event.app.vi_state.input_mode == InputMode.REPLACE - event.current_buffer.insert_text(chr(symbol), overwrite=overwrite) - event.app.vi_state.waiting_for_digraph = False - finally: - event.app.vi_state.waiting_for_digraph = False - event.app.vi_state.digraph_symbol1 = None - - @handle("c-o", filter=vi_insert_mode | vi_replace_mode) - def _quick_normal_mode(event: E) -> None: - """ - Go into normal mode for one single action. - """ - event.app.vi_state.temporary_navigation_mode = True - - @handle("q", Keys.Any, filter=vi_navigation_mode & ~vi_recording_macro) - def _start_macro(event: E) -> None: - """ - Start recording macro. - """ - c = event.key_sequence[1].data - if c in vi_register_names: - vi_state = event.app.vi_state - - vi_state.recording_register = c - vi_state.current_recording = "" - - @handle("q", filter=vi_navigation_mode & vi_recording_macro) - def _stop_macro(event: E) -> None: - """ - Stop recording macro. - """ - vi_state = event.app.vi_state - - # Store and stop recording. - if vi_state.recording_register: - vi_state.named_registers[vi_state.recording_register] = ClipboardData( - vi_state.current_recording - ) - vi_state.recording_register = None - vi_state.current_recording = "" - - @handle("@", Keys.Any, filter=vi_navigation_mode, record_in_macro=False) - def _execute_macro(event: E) -> None: - """ - Execute macro. - - Notice that we pass `record_in_macro=False`. This ensures that the `@x` - keys don't appear in the recording itself. This function inserts the - body of the called macro back into the KeyProcessor, so these keys will - be added later on to the macro of their handlers have - `record_in_macro=True`. - """ - # Retrieve macro. - c = event.key_sequence[1].data - try: - macro = event.app.vi_state.named_registers[c] - except KeyError: - return - - # Expand macro (which is a string in the register), in individual keys. - # Use vt100 parser for this. - keys: list[KeyPress] = [] - - parser = Vt100Parser(keys.append) - parser.feed(macro.text) - parser.flush() - - # Now feed keys back to the input processor. - for _ in range(event.arg): - event.app.key_processor.feed_multiple(keys, first=True) - - return ConditionalKeyBindings(key_bindings, vi_mode) - - -def load_vi_search_bindings() -> KeyBindingsBase: - key_bindings = KeyBindings() - handle = key_bindings.add - from . import search - - # Vi-style forward search. - handle( - "/", - filter=(vi_navigation_mode | vi_selection_mode) & ~vi_search_direction_reversed, - )(search.start_forward_incremental_search) - handle( - "?", - filter=(vi_navigation_mode | vi_selection_mode) & vi_search_direction_reversed, - )(search.start_forward_incremental_search) - handle("c-s")(search.start_forward_incremental_search) - - # Vi-style backward search. - handle( - "?", - filter=(vi_navigation_mode | vi_selection_mode) & ~vi_search_direction_reversed, - )(search.start_reverse_incremental_search) - handle( - "/", - filter=(vi_navigation_mode | vi_selection_mode) & vi_search_direction_reversed, - )(search.start_reverse_incremental_search) - handle("c-r")(search.start_reverse_incremental_search) - - # Apply the search. (At the / or ? prompt.) - handle("enter", filter=is_searching)(search.accept_search) - - handle("c-r", filter=is_searching)(search.reverse_incremental_search) - handle("c-s", filter=is_searching)(search.forward_incremental_search) - - handle("c-c")(search.abort_search) - handle("c-g")(search.abort_search) - handle("backspace", filter=search_buffer_is_empty)(search.abort_search) - - # Handle escape. This should accept the search, just like readline. - # `abort_search` would be a meaningful alternative. - handle("escape")(search.accept_search) - - return ConditionalKeyBindings(key_bindings, vi_mode) diff --git a/voxvera/vendor/prompt_toolkit/key_binding/defaults.py b/voxvera/vendor/prompt_toolkit/key_binding/defaults.py deleted file mode 100644 index 6c26571..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/defaults.py +++ /dev/null @@ -1,63 +0,0 @@ -""" -Default key bindings.:: - - key_bindings = load_key_bindings() - app = Application(key_bindings=key_bindings) -""" - -from __future__ import annotations - -from prompt_toolkit.filters import buffer_has_focus -from prompt_toolkit.key_binding.bindings.basic import load_basic_bindings -from prompt_toolkit.key_binding.bindings.cpr import load_cpr_bindings -from prompt_toolkit.key_binding.bindings.emacs import ( - load_emacs_bindings, - load_emacs_search_bindings, - load_emacs_shift_selection_bindings, -) -from prompt_toolkit.key_binding.bindings.mouse import load_mouse_bindings -from prompt_toolkit.key_binding.bindings.vi import ( - load_vi_bindings, - load_vi_search_bindings, -) -from prompt_toolkit.key_binding.key_bindings import ( - ConditionalKeyBindings, - KeyBindingsBase, - merge_key_bindings, -) - -__all__ = [ - "load_key_bindings", -] - - -def load_key_bindings() -> KeyBindingsBase: - """ - Create a KeyBindings object that contains the default key bindings. - """ - all_bindings = merge_key_bindings( - [ - # Load basic bindings. - load_basic_bindings(), - # Load emacs bindings. - load_emacs_bindings(), - load_emacs_search_bindings(), - load_emacs_shift_selection_bindings(), - # Load Vi bindings. - load_vi_bindings(), - load_vi_search_bindings(), - ] - ) - - return merge_key_bindings( - [ - # Make sure that the above key bindings are only active if the - # currently focused control is a `BufferControl`. For other controls, we - # don't want these key bindings to intervene. (This would break "ptterm" - # for instance, which handles 'Keys.Any' in the user control itself.) - ConditionalKeyBindings(all_bindings, buffer_has_focus), - # Active, even when no buffer has been focused. - load_mouse_bindings(), - load_cpr_bindings(), - ] - ) diff --git a/voxvera/vendor/prompt_toolkit/key_binding/digraphs.py b/voxvera/vendor/prompt_toolkit/key_binding/digraphs.py deleted file mode 100644 index f0152dc..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/digraphs.py +++ /dev/null @@ -1,1378 +0,0 @@ -""" -Vi Digraphs. -This is a list of special characters that can be inserted in Vi insert mode by -pressing Control-K followed by to normal characters. - -Taken from Neovim and translated to Python: -https://raw.githubusercontent.com/neovim/neovim/master/src/nvim/digraph.c -""" - -from __future__ import annotations - -__all__ = [ - "DIGRAPHS", -] - -# digraphs for Unicode from RFC1345 -# (also work for ISO-8859-1 aka latin1) -DIGRAPHS: dict[tuple[str, str], int] = { - ("N", "U"): 0x00, - ("S", "H"): 0x01, - ("S", "X"): 0x02, - ("E", "X"): 0x03, - ("E", "T"): 0x04, - ("E", "Q"): 0x05, - ("A", "K"): 0x06, - ("B", "L"): 0x07, - ("B", "S"): 0x08, - ("H", "T"): 0x09, - ("L", "F"): 0x0A, - ("V", "T"): 0x0B, - ("F", "F"): 0x0C, - ("C", "R"): 0x0D, - ("S", "O"): 0x0E, - ("S", "I"): 0x0F, - ("D", "L"): 0x10, - ("D", "1"): 0x11, - ("D", "2"): 0x12, - ("D", "3"): 0x13, - ("D", "4"): 0x14, - ("N", "K"): 0x15, - ("S", "Y"): 0x16, - ("E", "B"): 0x17, - ("C", "N"): 0x18, - ("E", "M"): 0x19, - ("S", "B"): 0x1A, - ("E", "C"): 0x1B, - ("F", "S"): 0x1C, - ("G", "S"): 0x1D, - ("R", "S"): 0x1E, - ("U", "S"): 0x1F, - ("S", "P"): 0x20, - ("N", "b"): 0x23, - ("D", "O"): 0x24, - ("A", "t"): 0x40, - ("<", "("): 0x5B, - ("/", "/"): 0x5C, - (")", ">"): 0x5D, - ("'", ">"): 0x5E, - ("'", "!"): 0x60, - ("(", "!"): 0x7B, - ("!", "!"): 0x7C, - ("!", ")"): 0x7D, - ("'", "?"): 0x7E, - ("D", "T"): 0x7F, - ("P", "A"): 0x80, - ("H", "O"): 0x81, - ("B", "H"): 0x82, - ("N", "H"): 0x83, - ("I", "N"): 0x84, - ("N", "L"): 0x85, - ("S", "A"): 0x86, - ("E", "S"): 0x87, - ("H", "S"): 0x88, - ("H", "J"): 0x89, - ("V", "S"): 0x8A, - ("P", "D"): 0x8B, - ("P", "U"): 0x8C, - ("R", "I"): 0x8D, - ("S", "2"): 0x8E, - ("S", "3"): 0x8F, - ("D", "C"): 0x90, - ("P", "1"): 0x91, - ("P", "2"): 0x92, - ("T", "S"): 0x93, - ("C", "C"): 0x94, - ("M", "W"): 0x95, - ("S", "G"): 0x96, - ("E", "G"): 0x97, - ("S", "S"): 0x98, - ("G", "C"): 0x99, - ("S", "C"): 0x9A, - ("C", "I"): 0x9B, - ("S", "T"): 0x9C, - ("O", "C"): 0x9D, - ("P", "M"): 0x9E, - ("A", "C"): 0x9F, - ("N", "S"): 0xA0, - ("!", "I"): 0xA1, - ("C", "t"): 0xA2, - ("P", "d"): 0xA3, - ("C", "u"): 0xA4, - ("Y", "e"): 0xA5, - ("B", "B"): 0xA6, - ("S", "E"): 0xA7, - ("'", ":"): 0xA8, - ("C", "o"): 0xA9, - ("-", "a"): 0xAA, - ("<", "<"): 0xAB, - ("N", "O"): 0xAC, - ("-", "-"): 0xAD, - ("R", "g"): 0xAE, - ("'", "m"): 0xAF, - ("D", "G"): 0xB0, - ("+", "-"): 0xB1, - ("2", "S"): 0xB2, - ("3", "S"): 0xB3, - ("'", "'"): 0xB4, - ("M", "y"): 0xB5, - ("P", "I"): 0xB6, - (".", "M"): 0xB7, - ("'", ","): 0xB8, - ("1", "S"): 0xB9, - ("-", "o"): 0xBA, - (">", ">"): 0xBB, - ("1", "4"): 0xBC, - ("1", "2"): 0xBD, - ("3", "4"): 0xBE, - ("?", "I"): 0xBF, - ("A", "!"): 0xC0, - ("A", "'"): 0xC1, - ("A", ">"): 0xC2, - ("A", "?"): 0xC3, - ("A", ":"): 0xC4, - ("A", "A"): 0xC5, - ("A", "E"): 0xC6, - ("C", ","): 0xC7, - ("E", "!"): 0xC8, - ("E", "'"): 0xC9, - ("E", ">"): 0xCA, - ("E", ":"): 0xCB, - ("I", "!"): 0xCC, - ("I", "'"): 0xCD, - ("I", ">"): 0xCE, - ("I", ":"): 0xCF, - ("D", "-"): 0xD0, - ("N", "?"): 0xD1, - ("O", "!"): 0xD2, - ("O", "'"): 0xD3, - ("O", ">"): 0xD4, - ("O", "?"): 0xD5, - ("O", ":"): 0xD6, - ("*", "X"): 0xD7, - ("O", "/"): 0xD8, - ("U", "!"): 0xD9, - ("U", "'"): 0xDA, - ("U", ">"): 0xDB, - ("U", ":"): 0xDC, - ("Y", "'"): 0xDD, - ("T", "H"): 0xDE, - ("s", "s"): 0xDF, - ("a", "!"): 0xE0, - ("a", "'"): 0xE1, - ("a", ">"): 0xE2, - ("a", "?"): 0xE3, - ("a", ":"): 0xE4, - ("a", "a"): 0xE5, - ("a", "e"): 0xE6, - ("c", ","): 0xE7, - ("e", "!"): 0xE8, - ("e", "'"): 0xE9, - ("e", ">"): 0xEA, - ("e", ":"): 0xEB, - ("i", "!"): 0xEC, - ("i", "'"): 0xED, - ("i", ">"): 0xEE, - ("i", ":"): 0xEF, - ("d", "-"): 0xF0, - ("n", "?"): 0xF1, - ("o", "!"): 0xF2, - ("o", "'"): 0xF3, - ("o", ">"): 0xF4, - ("o", "?"): 0xF5, - ("o", ":"): 0xF6, - ("-", ":"): 0xF7, - ("o", "/"): 0xF8, - ("u", "!"): 0xF9, - ("u", "'"): 0xFA, - ("u", ">"): 0xFB, - ("u", ":"): 0xFC, - ("y", "'"): 0xFD, - ("t", "h"): 0xFE, - ("y", ":"): 0xFF, - ("A", "-"): 0x0100, - ("a", "-"): 0x0101, - ("A", "("): 0x0102, - ("a", "("): 0x0103, - ("A", ";"): 0x0104, - ("a", ";"): 0x0105, - ("C", "'"): 0x0106, - ("c", "'"): 0x0107, - ("C", ">"): 0x0108, - ("c", ">"): 0x0109, - ("C", "."): 0x010A, - ("c", "."): 0x010B, - ("C", "<"): 0x010C, - ("c", "<"): 0x010D, - ("D", "<"): 0x010E, - ("d", "<"): 0x010F, - ("D", "/"): 0x0110, - ("d", "/"): 0x0111, - ("E", "-"): 0x0112, - ("e", "-"): 0x0113, - ("E", "("): 0x0114, - ("e", "("): 0x0115, - ("E", "."): 0x0116, - ("e", "."): 0x0117, - ("E", ";"): 0x0118, - ("e", ";"): 0x0119, - ("E", "<"): 0x011A, - ("e", "<"): 0x011B, - ("G", ">"): 0x011C, - ("g", ">"): 0x011D, - ("G", "("): 0x011E, - ("g", "("): 0x011F, - ("G", "."): 0x0120, - ("g", "."): 0x0121, - ("G", ","): 0x0122, - ("g", ","): 0x0123, - ("H", ">"): 0x0124, - ("h", ">"): 0x0125, - ("H", "/"): 0x0126, - ("h", "/"): 0x0127, - ("I", "?"): 0x0128, - ("i", "?"): 0x0129, - ("I", "-"): 0x012A, - ("i", "-"): 0x012B, - ("I", "("): 0x012C, - ("i", "("): 0x012D, - ("I", ";"): 0x012E, - ("i", ";"): 0x012F, - ("I", "."): 0x0130, - ("i", "."): 0x0131, - ("I", "J"): 0x0132, - ("i", "j"): 0x0133, - ("J", ">"): 0x0134, - ("j", ">"): 0x0135, - ("K", ","): 0x0136, - ("k", ","): 0x0137, - ("k", "k"): 0x0138, - ("L", "'"): 0x0139, - ("l", "'"): 0x013A, - ("L", ","): 0x013B, - ("l", ","): 0x013C, - ("L", "<"): 0x013D, - ("l", "<"): 0x013E, - ("L", "."): 0x013F, - ("l", "."): 0x0140, - ("L", "/"): 0x0141, - ("l", "/"): 0x0142, - ("N", "'"): 0x0143, - ("n", "'"): 0x0144, - ("N", ","): 0x0145, - ("n", ","): 0x0146, - ("N", "<"): 0x0147, - ("n", "<"): 0x0148, - ("'", "n"): 0x0149, - ("N", "G"): 0x014A, - ("n", "g"): 0x014B, - ("O", "-"): 0x014C, - ("o", "-"): 0x014D, - ("O", "("): 0x014E, - ("o", "("): 0x014F, - ("O", '"'): 0x0150, - ("o", '"'): 0x0151, - ("O", "E"): 0x0152, - ("o", "e"): 0x0153, - ("R", "'"): 0x0154, - ("r", "'"): 0x0155, - ("R", ","): 0x0156, - ("r", ","): 0x0157, - ("R", "<"): 0x0158, - ("r", "<"): 0x0159, - ("S", "'"): 0x015A, - ("s", "'"): 0x015B, - ("S", ">"): 0x015C, - ("s", ">"): 0x015D, - ("S", ","): 0x015E, - ("s", ","): 0x015F, - ("S", "<"): 0x0160, - ("s", "<"): 0x0161, - ("T", ","): 0x0162, - ("t", ","): 0x0163, - ("T", "<"): 0x0164, - ("t", "<"): 0x0165, - ("T", "/"): 0x0166, - ("t", "/"): 0x0167, - ("U", "?"): 0x0168, - ("u", "?"): 0x0169, - ("U", "-"): 0x016A, - ("u", "-"): 0x016B, - ("U", "("): 0x016C, - ("u", "("): 0x016D, - ("U", "0"): 0x016E, - ("u", "0"): 0x016F, - ("U", '"'): 0x0170, - ("u", '"'): 0x0171, - ("U", ";"): 0x0172, - ("u", ";"): 0x0173, - ("W", ">"): 0x0174, - ("w", ">"): 0x0175, - ("Y", ">"): 0x0176, - ("y", ">"): 0x0177, - ("Y", ":"): 0x0178, - ("Z", "'"): 0x0179, - ("z", "'"): 0x017A, - ("Z", "."): 0x017B, - ("z", "."): 0x017C, - ("Z", "<"): 0x017D, - ("z", "<"): 0x017E, - ("O", "9"): 0x01A0, - ("o", "9"): 0x01A1, - ("O", "I"): 0x01A2, - ("o", "i"): 0x01A3, - ("y", "r"): 0x01A6, - ("U", "9"): 0x01AF, - ("u", "9"): 0x01B0, - ("Z", "/"): 0x01B5, - ("z", "/"): 0x01B6, - ("E", "D"): 0x01B7, - ("A", "<"): 0x01CD, - ("a", "<"): 0x01CE, - ("I", "<"): 0x01CF, - ("i", "<"): 0x01D0, - ("O", "<"): 0x01D1, - ("o", "<"): 0x01D2, - ("U", "<"): 0x01D3, - ("u", "<"): 0x01D4, - ("A", "1"): 0x01DE, - ("a", "1"): 0x01DF, - ("A", "7"): 0x01E0, - ("a", "7"): 0x01E1, - ("A", "3"): 0x01E2, - ("a", "3"): 0x01E3, - ("G", "/"): 0x01E4, - ("g", "/"): 0x01E5, - ("G", "<"): 0x01E6, - ("g", "<"): 0x01E7, - ("K", "<"): 0x01E8, - ("k", "<"): 0x01E9, - ("O", ";"): 0x01EA, - ("o", ";"): 0x01EB, - ("O", "1"): 0x01EC, - ("o", "1"): 0x01ED, - ("E", "Z"): 0x01EE, - ("e", "z"): 0x01EF, - ("j", "<"): 0x01F0, - ("G", "'"): 0x01F4, - ("g", "'"): 0x01F5, - (";", "S"): 0x02BF, - ("'", "<"): 0x02C7, - ("'", "("): 0x02D8, - ("'", "."): 0x02D9, - ("'", "0"): 0x02DA, - ("'", ";"): 0x02DB, - ("'", '"'): 0x02DD, - ("A", "%"): 0x0386, - ("E", "%"): 0x0388, - ("Y", "%"): 0x0389, - ("I", "%"): 0x038A, - ("O", "%"): 0x038C, - ("U", "%"): 0x038E, - ("W", "%"): 0x038F, - ("i", "3"): 0x0390, - ("A", "*"): 0x0391, - ("B", "*"): 0x0392, - ("G", "*"): 0x0393, - ("D", "*"): 0x0394, - ("E", "*"): 0x0395, - ("Z", "*"): 0x0396, - ("Y", "*"): 0x0397, - ("H", "*"): 0x0398, - ("I", "*"): 0x0399, - ("K", "*"): 0x039A, - ("L", "*"): 0x039B, - ("M", "*"): 0x039C, - ("N", "*"): 0x039D, - ("C", "*"): 0x039E, - ("O", "*"): 0x039F, - ("P", "*"): 0x03A0, - ("R", "*"): 0x03A1, - ("S", "*"): 0x03A3, - ("T", "*"): 0x03A4, - ("U", "*"): 0x03A5, - ("F", "*"): 0x03A6, - ("X", "*"): 0x03A7, - ("Q", "*"): 0x03A8, - ("W", "*"): 0x03A9, - ("J", "*"): 0x03AA, - ("V", "*"): 0x03AB, - ("a", "%"): 0x03AC, - ("e", "%"): 0x03AD, - ("y", "%"): 0x03AE, - ("i", "%"): 0x03AF, - ("u", "3"): 0x03B0, - ("a", "*"): 0x03B1, - ("b", "*"): 0x03B2, - ("g", "*"): 0x03B3, - ("d", "*"): 0x03B4, - ("e", "*"): 0x03B5, - ("z", "*"): 0x03B6, - ("y", "*"): 0x03B7, - ("h", "*"): 0x03B8, - ("i", "*"): 0x03B9, - ("k", "*"): 0x03BA, - ("l", "*"): 0x03BB, - ("m", "*"): 0x03BC, - ("n", "*"): 0x03BD, - ("c", "*"): 0x03BE, - ("o", "*"): 0x03BF, - ("p", "*"): 0x03C0, - ("r", "*"): 0x03C1, - ("*", "s"): 0x03C2, - ("s", "*"): 0x03C3, - ("t", "*"): 0x03C4, - ("u", "*"): 0x03C5, - ("f", "*"): 0x03C6, - ("x", "*"): 0x03C7, - ("q", "*"): 0x03C8, - ("w", "*"): 0x03C9, - ("j", "*"): 0x03CA, - ("v", "*"): 0x03CB, - ("o", "%"): 0x03CC, - ("u", "%"): 0x03CD, - ("w", "%"): 0x03CE, - ("'", "G"): 0x03D8, - (",", "G"): 0x03D9, - ("T", "3"): 0x03DA, - ("t", "3"): 0x03DB, - ("M", "3"): 0x03DC, - ("m", "3"): 0x03DD, - ("K", "3"): 0x03DE, - ("k", "3"): 0x03DF, - ("P", "3"): 0x03E0, - ("p", "3"): 0x03E1, - ("'", "%"): 0x03F4, - ("j", "3"): 0x03F5, - ("I", "O"): 0x0401, - ("D", "%"): 0x0402, - ("G", "%"): 0x0403, - ("I", "E"): 0x0404, - ("D", "S"): 0x0405, - ("I", "I"): 0x0406, - ("Y", "I"): 0x0407, - ("J", "%"): 0x0408, - ("L", "J"): 0x0409, - ("N", "J"): 0x040A, - ("T", "s"): 0x040B, - ("K", "J"): 0x040C, - ("V", "%"): 0x040E, - ("D", "Z"): 0x040F, - ("A", "="): 0x0410, - ("B", "="): 0x0411, - ("V", "="): 0x0412, - ("G", "="): 0x0413, - ("D", "="): 0x0414, - ("E", "="): 0x0415, - ("Z", "%"): 0x0416, - ("Z", "="): 0x0417, - ("I", "="): 0x0418, - ("J", "="): 0x0419, - ("K", "="): 0x041A, - ("L", "="): 0x041B, - ("M", "="): 0x041C, - ("N", "="): 0x041D, - ("O", "="): 0x041E, - ("P", "="): 0x041F, - ("R", "="): 0x0420, - ("S", "="): 0x0421, - ("T", "="): 0x0422, - ("U", "="): 0x0423, - ("F", "="): 0x0424, - ("H", "="): 0x0425, - ("C", "="): 0x0426, - ("C", "%"): 0x0427, - ("S", "%"): 0x0428, - ("S", "c"): 0x0429, - ("=", '"'): 0x042A, - ("Y", "="): 0x042B, - ("%", '"'): 0x042C, - ("J", "E"): 0x042D, - ("J", "U"): 0x042E, - ("J", "A"): 0x042F, - ("a", "="): 0x0430, - ("b", "="): 0x0431, - ("v", "="): 0x0432, - ("g", "="): 0x0433, - ("d", "="): 0x0434, - ("e", "="): 0x0435, - ("z", "%"): 0x0436, - ("z", "="): 0x0437, - ("i", "="): 0x0438, - ("j", "="): 0x0439, - ("k", "="): 0x043A, - ("l", "="): 0x043B, - ("m", "="): 0x043C, - ("n", "="): 0x043D, - ("o", "="): 0x043E, - ("p", "="): 0x043F, - ("r", "="): 0x0440, - ("s", "="): 0x0441, - ("t", "="): 0x0442, - ("u", "="): 0x0443, - ("f", "="): 0x0444, - ("h", "="): 0x0445, - ("c", "="): 0x0446, - ("c", "%"): 0x0447, - ("s", "%"): 0x0448, - ("s", "c"): 0x0449, - ("=", "'"): 0x044A, - ("y", "="): 0x044B, - ("%", "'"): 0x044C, - ("j", "e"): 0x044D, - ("j", "u"): 0x044E, - ("j", "a"): 0x044F, - ("i", "o"): 0x0451, - ("d", "%"): 0x0452, - ("g", "%"): 0x0453, - ("i", "e"): 0x0454, - ("d", "s"): 0x0455, - ("i", "i"): 0x0456, - ("y", "i"): 0x0457, - ("j", "%"): 0x0458, - ("l", "j"): 0x0459, - ("n", "j"): 0x045A, - ("t", "s"): 0x045B, - ("k", "j"): 0x045C, - ("v", "%"): 0x045E, - ("d", "z"): 0x045F, - ("Y", "3"): 0x0462, - ("y", "3"): 0x0463, - ("O", "3"): 0x046A, - ("o", "3"): 0x046B, - ("F", "3"): 0x0472, - ("f", "3"): 0x0473, - ("V", "3"): 0x0474, - ("v", "3"): 0x0475, - ("C", "3"): 0x0480, - ("c", "3"): 0x0481, - ("G", "3"): 0x0490, - ("g", "3"): 0x0491, - ("A", "+"): 0x05D0, - ("B", "+"): 0x05D1, - ("G", "+"): 0x05D2, - ("D", "+"): 0x05D3, - ("H", "+"): 0x05D4, - ("W", "+"): 0x05D5, - ("Z", "+"): 0x05D6, - ("X", "+"): 0x05D7, - ("T", "j"): 0x05D8, - ("J", "+"): 0x05D9, - ("K", "%"): 0x05DA, - ("K", "+"): 0x05DB, - ("L", "+"): 0x05DC, - ("M", "%"): 0x05DD, - ("M", "+"): 0x05DE, - ("N", "%"): 0x05DF, - ("N", "+"): 0x05E0, - ("S", "+"): 0x05E1, - ("E", "+"): 0x05E2, - ("P", "%"): 0x05E3, - ("P", "+"): 0x05E4, - ("Z", "j"): 0x05E5, - ("Z", "J"): 0x05E6, - ("Q", "+"): 0x05E7, - ("R", "+"): 0x05E8, - ("S", "h"): 0x05E9, - ("T", "+"): 0x05EA, - (",", "+"): 0x060C, - (";", "+"): 0x061B, - ("?", "+"): 0x061F, - ("H", "'"): 0x0621, - ("a", "M"): 0x0622, - ("a", "H"): 0x0623, - ("w", "H"): 0x0624, - ("a", "h"): 0x0625, - ("y", "H"): 0x0626, - ("a", "+"): 0x0627, - ("b", "+"): 0x0628, - ("t", "m"): 0x0629, - ("t", "+"): 0x062A, - ("t", "k"): 0x062B, - ("g", "+"): 0x062C, - ("h", "k"): 0x062D, - ("x", "+"): 0x062E, - ("d", "+"): 0x062F, - ("d", "k"): 0x0630, - ("r", "+"): 0x0631, - ("z", "+"): 0x0632, - ("s", "+"): 0x0633, - ("s", "n"): 0x0634, - ("c", "+"): 0x0635, - ("d", "d"): 0x0636, - ("t", "j"): 0x0637, - ("z", "H"): 0x0638, - ("e", "+"): 0x0639, - ("i", "+"): 0x063A, - ("+", "+"): 0x0640, - ("f", "+"): 0x0641, - ("q", "+"): 0x0642, - ("k", "+"): 0x0643, - ("l", "+"): 0x0644, - ("m", "+"): 0x0645, - ("n", "+"): 0x0646, - ("h", "+"): 0x0647, - ("w", "+"): 0x0648, - ("j", "+"): 0x0649, - ("y", "+"): 0x064A, - (":", "+"): 0x064B, - ('"', "+"): 0x064C, - ("=", "+"): 0x064D, - ("/", "+"): 0x064E, - ("'", "+"): 0x064F, - ("1", "+"): 0x0650, - ("3", "+"): 0x0651, - ("0", "+"): 0x0652, - ("a", "S"): 0x0670, - ("p", "+"): 0x067E, - ("v", "+"): 0x06A4, - ("g", "f"): 0x06AF, - ("0", "a"): 0x06F0, - ("1", "a"): 0x06F1, - ("2", "a"): 0x06F2, - ("3", "a"): 0x06F3, - ("4", "a"): 0x06F4, - ("5", "a"): 0x06F5, - ("6", "a"): 0x06F6, - ("7", "a"): 0x06F7, - ("8", "a"): 0x06F8, - ("9", "a"): 0x06F9, - ("B", "."): 0x1E02, - ("b", "."): 0x1E03, - ("B", "_"): 0x1E06, - ("b", "_"): 0x1E07, - ("D", "."): 0x1E0A, - ("d", "."): 0x1E0B, - ("D", "_"): 0x1E0E, - ("d", "_"): 0x1E0F, - ("D", ","): 0x1E10, - ("d", ","): 0x1E11, - ("F", "."): 0x1E1E, - ("f", "."): 0x1E1F, - ("G", "-"): 0x1E20, - ("g", "-"): 0x1E21, - ("H", "."): 0x1E22, - ("h", "."): 0x1E23, - ("H", ":"): 0x1E26, - ("h", ":"): 0x1E27, - ("H", ","): 0x1E28, - ("h", ","): 0x1E29, - ("K", "'"): 0x1E30, - ("k", "'"): 0x1E31, - ("K", "_"): 0x1E34, - ("k", "_"): 0x1E35, - ("L", "_"): 0x1E3A, - ("l", "_"): 0x1E3B, - ("M", "'"): 0x1E3E, - ("m", "'"): 0x1E3F, - ("M", "."): 0x1E40, - ("m", "."): 0x1E41, - ("N", "."): 0x1E44, - ("n", "."): 0x1E45, - ("N", "_"): 0x1E48, - ("n", "_"): 0x1E49, - ("P", "'"): 0x1E54, - ("p", "'"): 0x1E55, - ("P", "."): 0x1E56, - ("p", "."): 0x1E57, - ("R", "."): 0x1E58, - ("r", "."): 0x1E59, - ("R", "_"): 0x1E5E, - ("r", "_"): 0x1E5F, - ("S", "."): 0x1E60, - ("s", "."): 0x1E61, - ("T", "."): 0x1E6A, - ("t", "."): 0x1E6B, - ("T", "_"): 0x1E6E, - ("t", "_"): 0x1E6F, - ("V", "?"): 0x1E7C, - ("v", "?"): 0x1E7D, - ("W", "!"): 0x1E80, - ("w", "!"): 0x1E81, - ("W", "'"): 0x1E82, - ("w", "'"): 0x1E83, - ("W", ":"): 0x1E84, - ("w", ":"): 0x1E85, - ("W", "."): 0x1E86, - ("w", "."): 0x1E87, - ("X", "."): 0x1E8A, - ("x", "."): 0x1E8B, - ("X", ":"): 0x1E8C, - ("x", ":"): 0x1E8D, - ("Y", "."): 0x1E8E, - ("y", "."): 0x1E8F, - ("Z", ">"): 0x1E90, - ("z", ">"): 0x1E91, - ("Z", "_"): 0x1E94, - ("z", "_"): 0x1E95, - ("h", "_"): 0x1E96, - ("t", ":"): 0x1E97, - ("w", "0"): 0x1E98, - ("y", "0"): 0x1E99, - ("A", "2"): 0x1EA2, - ("a", "2"): 0x1EA3, - ("E", "2"): 0x1EBA, - ("e", "2"): 0x1EBB, - ("E", "?"): 0x1EBC, - ("e", "?"): 0x1EBD, - ("I", "2"): 0x1EC8, - ("i", "2"): 0x1EC9, - ("O", "2"): 0x1ECE, - ("o", "2"): 0x1ECF, - ("U", "2"): 0x1EE6, - ("u", "2"): 0x1EE7, - ("Y", "!"): 0x1EF2, - ("y", "!"): 0x1EF3, - ("Y", "2"): 0x1EF6, - ("y", "2"): 0x1EF7, - ("Y", "?"): 0x1EF8, - ("y", "?"): 0x1EF9, - (";", "'"): 0x1F00, - (",", "'"): 0x1F01, - (";", "!"): 0x1F02, - (",", "!"): 0x1F03, - ("?", ";"): 0x1F04, - ("?", ","): 0x1F05, - ("!", ":"): 0x1F06, - ("?", ":"): 0x1F07, - ("1", "N"): 0x2002, - ("1", "M"): 0x2003, - ("3", "M"): 0x2004, - ("4", "M"): 0x2005, - ("6", "M"): 0x2006, - ("1", "T"): 0x2009, - ("1", "H"): 0x200A, - ("-", "1"): 0x2010, - ("-", "N"): 0x2013, - ("-", "M"): 0x2014, - ("-", "3"): 0x2015, - ("!", "2"): 0x2016, - ("=", "2"): 0x2017, - ("'", "6"): 0x2018, - ("'", "9"): 0x2019, - (".", "9"): 0x201A, - ("9", "'"): 0x201B, - ('"', "6"): 0x201C, - ('"', "9"): 0x201D, - (":", "9"): 0x201E, - ("9", '"'): 0x201F, - ("/", "-"): 0x2020, - ("/", "="): 0x2021, - (".", "."): 0x2025, - ("%", "0"): 0x2030, - ("1", "'"): 0x2032, - ("2", "'"): 0x2033, - ("3", "'"): 0x2034, - ("1", '"'): 0x2035, - ("2", '"'): 0x2036, - ("3", '"'): 0x2037, - ("C", "a"): 0x2038, - ("<", "1"): 0x2039, - (">", "1"): 0x203A, - (":", "X"): 0x203B, - ("'", "-"): 0x203E, - ("/", "f"): 0x2044, - ("0", "S"): 0x2070, - ("4", "S"): 0x2074, - ("5", "S"): 0x2075, - ("6", "S"): 0x2076, - ("7", "S"): 0x2077, - ("8", "S"): 0x2078, - ("9", "S"): 0x2079, - ("+", "S"): 0x207A, - ("-", "S"): 0x207B, - ("=", "S"): 0x207C, - ("(", "S"): 0x207D, - (")", "S"): 0x207E, - ("n", "S"): 0x207F, - ("0", "s"): 0x2080, - ("1", "s"): 0x2081, - ("2", "s"): 0x2082, - ("3", "s"): 0x2083, - ("4", "s"): 0x2084, - ("5", "s"): 0x2085, - ("6", "s"): 0x2086, - ("7", "s"): 0x2087, - ("8", "s"): 0x2088, - ("9", "s"): 0x2089, - ("+", "s"): 0x208A, - ("-", "s"): 0x208B, - ("=", "s"): 0x208C, - ("(", "s"): 0x208D, - (")", "s"): 0x208E, - ("L", "i"): 0x20A4, - ("P", "t"): 0x20A7, - ("W", "="): 0x20A9, - ("=", "e"): 0x20AC, # euro - ("E", "u"): 0x20AC, # euro - ("=", "R"): 0x20BD, # rouble - ("=", "P"): 0x20BD, # rouble - ("o", "C"): 0x2103, - ("c", "o"): 0x2105, - ("o", "F"): 0x2109, - ("N", "0"): 0x2116, - ("P", "O"): 0x2117, - ("R", "x"): 0x211E, - ("S", "M"): 0x2120, - ("T", "M"): 0x2122, - ("O", "m"): 0x2126, - ("A", "O"): 0x212B, - ("1", "3"): 0x2153, - ("2", "3"): 0x2154, - ("1", "5"): 0x2155, - ("2", "5"): 0x2156, - ("3", "5"): 0x2157, - ("4", "5"): 0x2158, - ("1", "6"): 0x2159, - ("5", "6"): 0x215A, - ("1", "8"): 0x215B, - ("3", "8"): 0x215C, - ("5", "8"): 0x215D, - ("7", "8"): 0x215E, - ("1", "R"): 0x2160, - ("2", "R"): 0x2161, - ("3", "R"): 0x2162, - ("4", "R"): 0x2163, - ("5", "R"): 0x2164, - ("6", "R"): 0x2165, - ("7", "R"): 0x2166, - ("8", "R"): 0x2167, - ("9", "R"): 0x2168, - ("a", "R"): 0x2169, - ("b", "R"): 0x216A, - ("c", "R"): 0x216B, - ("1", "r"): 0x2170, - ("2", "r"): 0x2171, - ("3", "r"): 0x2172, - ("4", "r"): 0x2173, - ("5", "r"): 0x2174, - ("6", "r"): 0x2175, - ("7", "r"): 0x2176, - ("8", "r"): 0x2177, - ("9", "r"): 0x2178, - ("a", "r"): 0x2179, - ("b", "r"): 0x217A, - ("c", "r"): 0x217B, - ("<", "-"): 0x2190, - ("-", "!"): 0x2191, - ("-", ">"): 0x2192, - ("-", "v"): 0x2193, - ("<", ">"): 0x2194, - ("U", "D"): 0x2195, - ("<", "="): 0x21D0, - ("=", ">"): 0x21D2, - ("=", "="): 0x21D4, - ("F", "A"): 0x2200, - ("d", "P"): 0x2202, - ("T", "E"): 0x2203, - ("/", "0"): 0x2205, - ("D", "E"): 0x2206, - ("N", "B"): 0x2207, - ("(", "-"): 0x2208, - ("-", ")"): 0x220B, - ("*", "P"): 0x220F, - ("+", "Z"): 0x2211, - ("-", "2"): 0x2212, - ("-", "+"): 0x2213, - ("*", "-"): 0x2217, - ("O", "b"): 0x2218, - ("S", "b"): 0x2219, - ("R", "T"): 0x221A, - ("0", "("): 0x221D, - ("0", "0"): 0x221E, - ("-", "L"): 0x221F, - ("-", "V"): 0x2220, - ("P", "P"): 0x2225, - ("A", "N"): 0x2227, - ("O", "R"): 0x2228, - ("(", "U"): 0x2229, - (")", "U"): 0x222A, - ("I", "n"): 0x222B, - ("D", "I"): 0x222C, - ("I", "o"): 0x222E, - (".", ":"): 0x2234, - (":", "."): 0x2235, - (":", "R"): 0x2236, - (":", ":"): 0x2237, - ("?", "1"): 0x223C, - ("C", "G"): 0x223E, - ("?", "-"): 0x2243, - ("?", "="): 0x2245, - ("?", "2"): 0x2248, - ("=", "?"): 0x224C, - ("H", "I"): 0x2253, - ("!", "="): 0x2260, - ("=", "3"): 0x2261, - ("=", "<"): 0x2264, - (">", "="): 0x2265, - ("<", "*"): 0x226A, - ("*", ">"): 0x226B, - ("!", "<"): 0x226E, - ("!", ">"): 0x226F, - ("(", "C"): 0x2282, - (")", "C"): 0x2283, - ("(", "_"): 0x2286, - (")", "_"): 0x2287, - ("0", "."): 0x2299, - ("0", "2"): 0x229A, - ("-", "T"): 0x22A5, - (".", "P"): 0x22C5, - (":", "3"): 0x22EE, - (".", "3"): 0x22EF, - ("E", "h"): 0x2302, - ("<", "7"): 0x2308, - (">", "7"): 0x2309, - ("7", "<"): 0x230A, - ("7", ">"): 0x230B, - ("N", "I"): 0x2310, - ("(", "A"): 0x2312, - ("T", "R"): 0x2315, - ("I", "u"): 0x2320, - ("I", "l"): 0x2321, - ("<", "/"): 0x2329, - ("/", ">"): 0x232A, - ("V", "s"): 0x2423, - ("1", "h"): 0x2440, - ("3", "h"): 0x2441, - ("2", "h"): 0x2442, - ("4", "h"): 0x2443, - ("1", "j"): 0x2446, - ("2", "j"): 0x2447, - ("3", "j"): 0x2448, - ("4", "j"): 0x2449, - ("1", "."): 0x2488, - ("2", "."): 0x2489, - ("3", "."): 0x248A, - ("4", "."): 0x248B, - ("5", "."): 0x248C, - ("6", "."): 0x248D, - ("7", "."): 0x248E, - ("8", "."): 0x248F, - ("9", "."): 0x2490, - ("h", "h"): 0x2500, - ("H", "H"): 0x2501, - ("v", "v"): 0x2502, - ("V", "V"): 0x2503, - ("3", "-"): 0x2504, - ("3", "_"): 0x2505, - ("3", "!"): 0x2506, - ("3", "/"): 0x2507, - ("4", "-"): 0x2508, - ("4", "_"): 0x2509, - ("4", "!"): 0x250A, - ("4", "/"): 0x250B, - ("d", "r"): 0x250C, - ("d", "R"): 0x250D, - ("D", "r"): 0x250E, - ("D", "R"): 0x250F, - ("d", "l"): 0x2510, - ("d", "L"): 0x2511, - ("D", "l"): 0x2512, - ("L", "D"): 0x2513, - ("u", "r"): 0x2514, - ("u", "R"): 0x2515, - ("U", "r"): 0x2516, - ("U", "R"): 0x2517, - ("u", "l"): 0x2518, - ("u", "L"): 0x2519, - ("U", "l"): 0x251A, - ("U", "L"): 0x251B, - ("v", "r"): 0x251C, - ("v", "R"): 0x251D, - ("V", "r"): 0x2520, - ("V", "R"): 0x2523, - ("v", "l"): 0x2524, - ("v", "L"): 0x2525, - ("V", "l"): 0x2528, - ("V", "L"): 0x252B, - ("d", "h"): 0x252C, - ("d", "H"): 0x252F, - ("D", "h"): 0x2530, - ("D", "H"): 0x2533, - ("u", "h"): 0x2534, - ("u", "H"): 0x2537, - ("U", "h"): 0x2538, - ("U", "H"): 0x253B, - ("v", "h"): 0x253C, - ("v", "H"): 0x253F, - ("V", "h"): 0x2542, - ("V", "H"): 0x254B, - ("F", "D"): 0x2571, - ("B", "D"): 0x2572, - ("T", "B"): 0x2580, - ("L", "B"): 0x2584, - ("F", "B"): 0x2588, - ("l", "B"): 0x258C, - ("R", "B"): 0x2590, - (".", "S"): 0x2591, - (":", "S"): 0x2592, - ("?", "S"): 0x2593, - ("f", "S"): 0x25A0, - ("O", "S"): 0x25A1, - ("R", "O"): 0x25A2, - ("R", "r"): 0x25A3, - ("R", "F"): 0x25A4, - ("R", "Y"): 0x25A5, - ("R", "H"): 0x25A6, - ("R", "Z"): 0x25A7, - ("R", "K"): 0x25A8, - ("R", "X"): 0x25A9, - ("s", "B"): 0x25AA, - ("S", "R"): 0x25AC, - ("O", "r"): 0x25AD, - ("U", "T"): 0x25B2, - ("u", "T"): 0x25B3, - ("P", "R"): 0x25B6, - ("T", "r"): 0x25B7, - ("D", "t"): 0x25BC, - ("d", "T"): 0x25BD, - ("P", "L"): 0x25C0, - ("T", "l"): 0x25C1, - ("D", "b"): 0x25C6, - ("D", "w"): 0x25C7, - ("L", "Z"): 0x25CA, - ("0", "m"): 0x25CB, - ("0", "o"): 0x25CE, - ("0", "M"): 0x25CF, - ("0", "L"): 0x25D0, - ("0", "R"): 0x25D1, - ("S", "n"): 0x25D8, - ("I", "c"): 0x25D9, - ("F", "d"): 0x25E2, - ("B", "d"): 0x25E3, - ("*", "2"): 0x2605, - ("*", "1"): 0x2606, - ("<", "H"): 0x261C, - (">", "H"): 0x261E, - ("0", "u"): 0x263A, - ("0", "U"): 0x263B, - ("S", "U"): 0x263C, - ("F", "m"): 0x2640, - ("M", "l"): 0x2642, - ("c", "S"): 0x2660, - ("c", "H"): 0x2661, - ("c", "D"): 0x2662, - ("c", "C"): 0x2663, - ("M", "d"): 0x2669, - ("M", "8"): 0x266A, - ("M", "2"): 0x266B, - ("M", "b"): 0x266D, - ("M", "x"): 0x266E, - ("M", "X"): 0x266F, - ("O", "K"): 0x2713, - ("X", "X"): 0x2717, - ("-", "X"): 0x2720, - ("I", "S"): 0x3000, - (",", "_"): 0x3001, - (".", "_"): 0x3002, - ("+", '"'): 0x3003, - ("+", "_"): 0x3004, - ("*", "_"): 0x3005, - (";", "_"): 0x3006, - ("0", "_"): 0x3007, - ("<", "+"): 0x300A, - (">", "+"): 0x300B, - ("<", "'"): 0x300C, - (">", "'"): 0x300D, - ("<", '"'): 0x300E, - (">", '"'): 0x300F, - ("(", '"'): 0x3010, - (")", '"'): 0x3011, - ("=", "T"): 0x3012, - ("=", "_"): 0x3013, - ("(", "'"): 0x3014, - (")", "'"): 0x3015, - ("(", "I"): 0x3016, - (")", "I"): 0x3017, - ("-", "?"): 0x301C, - ("A", "5"): 0x3041, - ("a", "5"): 0x3042, - ("I", "5"): 0x3043, - ("i", "5"): 0x3044, - ("U", "5"): 0x3045, - ("u", "5"): 0x3046, - ("E", "5"): 0x3047, - ("e", "5"): 0x3048, - ("O", "5"): 0x3049, - ("o", "5"): 0x304A, - ("k", "a"): 0x304B, - ("g", "a"): 0x304C, - ("k", "i"): 0x304D, - ("g", "i"): 0x304E, - ("k", "u"): 0x304F, - ("g", "u"): 0x3050, - ("k", "e"): 0x3051, - ("g", "e"): 0x3052, - ("k", "o"): 0x3053, - ("g", "o"): 0x3054, - ("s", "a"): 0x3055, - ("z", "a"): 0x3056, - ("s", "i"): 0x3057, - ("z", "i"): 0x3058, - ("s", "u"): 0x3059, - ("z", "u"): 0x305A, - ("s", "e"): 0x305B, - ("z", "e"): 0x305C, - ("s", "o"): 0x305D, - ("z", "o"): 0x305E, - ("t", "a"): 0x305F, - ("d", "a"): 0x3060, - ("t", "i"): 0x3061, - ("d", "i"): 0x3062, - ("t", "U"): 0x3063, - ("t", "u"): 0x3064, - ("d", "u"): 0x3065, - ("t", "e"): 0x3066, - ("d", "e"): 0x3067, - ("t", "o"): 0x3068, - ("d", "o"): 0x3069, - ("n", "a"): 0x306A, - ("n", "i"): 0x306B, - ("n", "u"): 0x306C, - ("n", "e"): 0x306D, - ("n", "o"): 0x306E, - ("h", "a"): 0x306F, - ("b", "a"): 0x3070, - ("p", "a"): 0x3071, - ("h", "i"): 0x3072, - ("b", "i"): 0x3073, - ("p", "i"): 0x3074, - ("h", "u"): 0x3075, - ("b", "u"): 0x3076, - ("p", "u"): 0x3077, - ("h", "e"): 0x3078, - ("b", "e"): 0x3079, - ("p", "e"): 0x307A, - ("h", "o"): 0x307B, - ("b", "o"): 0x307C, - ("p", "o"): 0x307D, - ("m", "a"): 0x307E, - ("m", "i"): 0x307F, - ("m", "u"): 0x3080, - ("m", "e"): 0x3081, - ("m", "o"): 0x3082, - ("y", "A"): 0x3083, - ("y", "a"): 0x3084, - ("y", "U"): 0x3085, - ("y", "u"): 0x3086, - ("y", "O"): 0x3087, - ("y", "o"): 0x3088, - ("r", "a"): 0x3089, - ("r", "i"): 0x308A, - ("r", "u"): 0x308B, - ("r", "e"): 0x308C, - ("r", "o"): 0x308D, - ("w", "A"): 0x308E, - ("w", "a"): 0x308F, - ("w", "i"): 0x3090, - ("w", "e"): 0x3091, - ("w", "o"): 0x3092, - ("n", "5"): 0x3093, - ("v", "u"): 0x3094, - ('"', "5"): 0x309B, - ("0", "5"): 0x309C, - ("*", "5"): 0x309D, - ("+", "5"): 0x309E, - ("a", "6"): 0x30A1, - ("A", "6"): 0x30A2, - ("i", "6"): 0x30A3, - ("I", "6"): 0x30A4, - ("u", "6"): 0x30A5, - ("U", "6"): 0x30A6, - ("e", "6"): 0x30A7, - ("E", "6"): 0x30A8, - ("o", "6"): 0x30A9, - ("O", "6"): 0x30AA, - ("K", "a"): 0x30AB, - ("G", "a"): 0x30AC, - ("K", "i"): 0x30AD, - ("G", "i"): 0x30AE, - ("K", "u"): 0x30AF, - ("G", "u"): 0x30B0, - ("K", "e"): 0x30B1, - ("G", "e"): 0x30B2, - ("K", "o"): 0x30B3, - ("G", "o"): 0x30B4, - ("S", "a"): 0x30B5, - ("Z", "a"): 0x30B6, - ("S", "i"): 0x30B7, - ("Z", "i"): 0x30B8, - ("S", "u"): 0x30B9, - ("Z", "u"): 0x30BA, - ("S", "e"): 0x30BB, - ("Z", "e"): 0x30BC, - ("S", "o"): 0x30BD, - ("Z", "o"): 0x30BE, - ("T", "a"): 0x30BF, - ("D", "a"): 0x30C0, - ("T", "i"): 0x30C1, - ("D", "i"): 0x30C2, - ("T", "U"): 0x30C3, - ("T", "u"): 0x30C4, - ("D", "u"): 0x30C5, - ("T", "e"): 0x30C6, - ("D", "e"): 0x30C7, - ("T", "o"): 0x30C8, - ("D", "o"): 0x30C9, - ("N", "a"): 0x30CA, - ("N", "i"): 0x30CB, - ("N", "u"): 0x30CC, - ("N", "e"): 0x30CD, - ("N", "o"): 0x30CE, - ("H", "a"): 0x30CF, - ("B", "a"): 0x30D0, - ("P", "a"): 0x30D1, - ("H", "i"): 0x30D2, - ("B", "i"): 0x30D3, - ("P", "i"): 0x30D4, - ("H", "u"): 0x30D5, - ("B", "u"): 0x30D6, - ("P", "u"): 0x30D7, - ("H", "e"): 0x30D8, - ("B", "e"): 0x30D9, - ("P", "e"): 0x30DA, - ("H", "o"): 0x30DB, - ("B", "o"): 0x30DC, - ("P", "o"): 0x30DD, - ("M", "a"): 0x30DE, - ("M", "i"): 0x30DF, - ("M", "u"): 0x30E0, - ("M", "e"): 0x30E1, - ("M", "o"): 0x30E2, - ("Y", "A"): 0x30E3, - ("Y", "a"): 0x30E4, - ("Y", "U"): 0x30E5, - ("Y", "u"): 0x30E6, - ("Y", "O"): 0x30E7, - ("Y", "o"): 0x30E8, - ("R", "a"): 0x30E9, - ("R", "i"): 0x30EA, - ("R", "u"): 0x30EB, - ("R", "e"): 0x30EC, - ("R", "o"): 0x30ED, - ("W", "A"): 0x30EE, - ("W", "a"): 0x30EF, - ("W", "i"): 0x30F0, - ("W", "e"): 0x30F1, - ("W", "o"): 0x30F2, - ("N", "6"): 0x30F3, - ("V", "u"): 0x30F4, - ("K", "A"): 0x30F5, - ("K", "E"): 0x30F6, - ("V", "a"): 0x30F7, - ("V", "i"): 0x30F8, - ("V", "e"): 0x30F9, - ("V", "o"): 0x30FA, - (".", "6"): 0x30FB, - ("-", "6"): 0x30FC, - ("*", "6"): 0x30FD, - ("+", "6"): 0x30FE, - ("b", "4"): 0x3105, - ("p", "4"): 0x3106, - ("m", "4"): 0x3107, - ("f", "4"): 0x3108, - ("d", "4"): 0x3109, - ("t", "4"): 0x310A, - ("n", "4"): 0x310B, - ("l", "4"): 0x310C, - ("g", "4"): 0x310D, - ("k", "4"): 0x310E, - ("h", "4"): 0x310F, - ("j", "4"): 0x3110, - ("q", "4"): 0x3111, - ("x", "4"): 0x3112, - ("z", "h"): 0x3113, - ("c", "h"): 0x3114, - ("s", "h"): 0x3115, - ("r", "4"): 0x3116, - ("z", "4"): 0x3117, - ("c", "4"): 0x3118, - ("s", "4"): 0x3119, - ("a", "4"): 0x311A, - ("o", "4"): 0x311B, - ("e", "4"): 0x311C, - ("a", "i"): 0x311E, - ("e", "i"): 0x311F, - ("a", "u"): 0x3120, - ("o", "u"): 0x3121, - ("a", "n"): 0x3122, - ("e", "n"): 0x3123, - ("a", "N"): 0x3124, - ("e", "N"): 0x3125, - ("e", "r"): 0x3126, - ("i", "4"): 0x3127, - ("u", "4"): 0x3128, - ("i", "u"): 0x3129, - ("v", "4"): 0x312A, - ("n", "G"): 0x312B, - ("g", "n"): 0x312C, - ("1", "c"): 0x3220, - ("2", "c"): 0x3221, - ("3", "c"): 0x3222, - ("4", "c"): 0x3223, - ("5", "c"): 0x3224, - ("6", "c"): 0x3225, - ("7", "c"): 0x3226, - ("8", "c"): 0x3227, - ("9", "c"): 0x3228, - # code points 0xe000 - 0xefff excluded, they have no assigned - # characters, only used in proposals. - ("f", "f"): 0xFB00, - ("f", "i"): 0xFB01, - ("f", "l"): 0xFB02, - ("f", "t"): 0xFB05, - ("s", "t"): 0xFB06, - # Vim 5.x compatible digraphs that don't conflict with the above - ("~", "!"): 161, - ("c", "|"): 162, - ("$", "$"): 163, - ("o", "x"): 164, # currency symbol in ISO 8859-1 - ("Y", "-"): 165, - ("|", "|"): 166, - ("c", "O"): 169, - ("-", ","): 172, - ("-", "="): 175, - ("~", "o"): 176, - ("2", "2"): 178, - ("3", "3"): 179, - ("p", "p"): 182, - ("~", "."): 183, - ("1", "1"): 185, - ("~", "?"): 191, - ("A", "`"): 192, - ("A", "^"): 194, - ("A", "~"): 195, - ("A", '"'): 196, - ("A", "@"): 197, - ("E", "`"): 200, - ("E", "^"): 202, - ("E", '"'): 203, - ("I", "`"): 204, - ("I", "^"): 206, - ("I", '"'): 207, - ("N", "~"): 209, - ("O", "`"): 210, - ("O", "^"): 212, - ("O", "~"): 213, - ("/", "\\"): 215, # multiplication symbol in ISO 8859-1 - ("U", "`"): 217, - ("U", "^"): 219, - ("I", "p"): 222, - ("a", "`"): 224, - ("a", "^"): 226, - ("a", "~"): 227, - ("a", '"'): 228, - ("a", "@"): 229, - ("e", "`"): 232, - ("e", "^"): 234, - ("e", '"'): 235, - ("i", "`"): 236, - ("i", "^"): 238, - ("n", "~"): 241, - ("o", "`"): 242, - ("o", "^"): 244, - ("o", "~"): 245, - ("u", "`"): 249, - ("u", "^"): 251, - ("y", '"'): 255, -} diff --git a/voxvera/vendor/prompt_toolkit/key_binding/emacs_state.py b/voxvera/vendor/prompt_toolkit/key_binding/emacs_state.py deleted file mode 100644 index 6a2ebf4..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/emacs_state.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import annotations - -from .key_processor import KeyPress - -__all__ = [ - "EmacsState", -] - - -class EmacsState: - """ - Mutable class to hold Emacs specific state. - """ - - def __init__(self) -> None: - # Simple macro recording. (Like Readline does.) - # (For Emacs mode.) - self.macro: list[KeyPress] | None = [] - self.current_recording: list[KeyPress] | None = None - - def reset(self) -> None: - self.current_recording = None - - @property - def is_recording(self) -> bool: - "Tell whether we are recording a macro." - return self.current_recording is not None - - def start_macro(self) -> None: - "Start recording macro." - self.current_recording = [] - - def end_macro(self) -> None: - "End recording macro." - self.macro = self.current_recording - self.current_recording = None diff --git a/voxvera/vendor/prompt_toolkit/key_binding/key_bindings.py b/voxvera/vendor/prompt_toolkit/key_binding/key_bindings.py deleted file mode 100644 index cf37c6d..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/key_bindings.py +++ /dev/null @@ -1,672 +0,0 @@ -""" -Key bindings registry. - -A `KeyBindings` object is a container that holds a list of key bindings. It has a -very efficient internal data structure for checking which key bindings apply -for a pressed key. - -Typical usage:: - - kb = KeyBindings() - - @kb.add(Keys.ControlX, Keys.ControlC, filter=INSERT) - def handler(event): - # Handle ControlX-ControlC key sequence. - pass - -It is also possible to combine multiple KeyBindings objects. We do this in the -default key bindings. There are some KeyBindings objects that contain the Emacs -bindings, while others contain the Vi bindings. They are merged together using -`merge_key_bindings`. - -We also have a `ConditionalKeyBindings` object that can enable/disable a group of -key bindings at once. - - -It is also possible to add a filter to a function, before a key binding has -been assigned, through the `key_binding` decorator.:: - - # First define a key handler with the `filter`. - @key_binding(filter=condition) - def my_key_binding(event): - ... - - # Later, add it to the key bindings. - kb.add(Keys.A, my_key_binding) -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from inspect import isawaitable -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Coroutine, - Hashable, - Sequence, - Tuple, - TypeVar, - Union, - cast, -) - -from prompt_toolkit.cache import SimpleCache -from prompt_toolkit.filters import FilterOrBool, Never, to_filter -from prompt_toolkit.keys import KEY_ALIASES, Keys - -if TYPE_CHECKING: - # Avoid circular imports. - from .key_processor import KeyPressEvent - - # The only two return values for a mouse handler (and key bindings) are - # `None` and `NotImplemented`. For the type checker it's best to annotate - # this as `object`. (The consumer never expects a more specific instance: - # checking for NotImplemented can be done using `is NotImplemented`.) - NotImplementedOrNone = object - # Other non-working options are: - # * Optional[Literal[NotImplemented]] - # --> Doesn't work, Literal can't take an Any. - # * None - # --> Doesn't work. We can't assign the result of a function that - # returns `None` to a variable. - # * Any - # --> Works, but too broad. - - -__all__ = [ - "NotImplementedOrNone", - "Binding", - "KeyBindingsBase", - "KeyBindings", - "ConditionalKeyBindings", - "merge_key_bindings", - "DynamicKeyBindings", - "GlobalOnlyKeyBindings", -] - -# Key bindings can be regular functions or coroutines. -# In both cases, if they return `NotImplemented`, the UI won't be invalidated. -# This is mainly used in case of mouse move events, to prevent excessive -# repainting during mouse move events. -KeyHandlerCallable = Callable[ - ["KeyPressEvent"], - Union["NotImplementedOrNone", Coroutine[Any, Any, "NotImplementedOrNone"]], -] - - -class Binding: - """ - Key binding: (key sequence + handler + filter). - (Immutable binding class.) - - :param record_in_macro: When True, don't record this key binding when a - macro is recorded. - """ - - def __init__( - self, - keys: tuple[Keys | str, ...], - handler: KeyHandlerCallable, - filter: FilterOrBool = True, - eager: FilterOrBool = False, - is_global: FilterOrBool = False, - save_before: Callable[[KeyPressEvent], bool] = (lambda e: True), - record_in_macro: FilterOrBool = True, - ) -> None: - self.keys = keys - self.handler = handler - self.filter = to_filter(filter) - self.eager = to_filter(eager) - self.is_global = to_filter(is_global) - self.save_before = save_before - self.record_in_macro = to_filter(record_in_macro) - - def call(self, event: KeyPressEvent) -> None: - result = self.handler(event) - - # If the handler is a coroutine, create an asyncio task. - if isawaitable(result): - awaitable = cast(Coroutine[Any, Any, "NotImplementedOrNone"], result) - - async def bg_task() -> None: - result = await awaitable - if result != NotImplemented: - event.app.invalidate() - - event.app.create_background_task(bg_task()) - - elif result != NotImplemented: - event.app.invalidate() - - def __repr__(self) -> str: - return ( - f"{self.__class__.__name__}(keys={self.keys!r}, handler={self.handler!r})" - ) - - -# Sequence of keys presses. -KeysTuple = Tuple[Union[Keys, str], ...] - - -class KeyBindingsBase(metaclass=ABCMeta): - """ - Interface for a KeyBindings. - """ - - @property - @abstractmethod - def _version(self) -> Hashable: - """ - For cache invalidation. - This should increase every time that - something changes. - """ - return 0 - - @abstractmethod - def get_bindings_for_keys(self, keys: KeysTuple) -> list[Binding]: - """ - Return a list of key bindings that can handle these keys. - (This return also inactive bindings, so the `filter` still has to be - called, for checking it.) - - :param keys: tuple of keys. - """ - return [] - - @abstractmethod - def get_bindings_starting_with_keys(self, keys: KeysTuple) -> list[Binding]: - """ - Return a list of key bindings that handle a key sequence starting with - `keys`. (It does only return bindings for which the sequences are - longer than `keys`. And like `get_bindings_for_keys`, it also includes - inactive bindings.) - - :param keys: tuple of keys. - """ - return [] - - @property - @abstractmethod - def bindings(self) -> list[Binding]: - """ - List of `Binding` objects. - (These need to be exposed, so that `KeyBindings` objects can be merged - together.) - """ - return [] - - # `add` and `remove` don't have to be part of this interface. - - -T = TypeVar("T", bound=Union[KeyHandlerCallable, Binding]) - - -class KeyBindings(KeyBindingsBase): - """ - A container for a set of key bindings. - - Example usage:: - - kb = KeyBindings() - - @kb.add('c-t') - def _(event): - print('Control-T pressed') - - @kb.add('c-a', 'c-b') - def _(event): - print('Control-A pressed, followed by Control-B') - - @kb.add('c-x', filter=is_searching) - def _(event): - print('Control-X pressed') # Works only if we are searching. - - """ - - def __init__(self) -> None: - self._bindings: list[Binding] = [] - self._get_bindings_for_keys_cache: SimpleCache[KeysTuple, list[Binding]] = ( - SimpleCache(maxsize=10000) - ) - self._get_bindings_starting_with_keys_cache: SimpleCache[ - KeysTuple, list[Binding] - ] = SimpleCache(maxsize=1000) - self.__version = 0 # For cache invalidation. - - def _clear_cache(self) -> None: - self.__version += 1 - self._get_bindings_for_keys_cache.clear() - self._get_bindings_starting_with_keys_cache.clear() - - @property - def bindings(self) -> list[Binding]: - return self._bindings - - @property - def _version(self) -> Hashable: - return self.__version - - def add( - self, - *keys: Keys | str, - filter: FilterOrBool = True, - eager: FilterOrBool = False, - is_global: FilterOrBool = False, - save_before: Callable[[KeyPressEvent], bool] = (lambda e: True), - record_in_macro: FilterOrBool = True, - ) -> Callable[[T], T]: - """ - Decorator for adding a key bindings. - - :param filter: :class:`~prompt_toolkit.filters.Filter` to determine - when this key binding is active. - :param eager: :class:`~prompt_toolkit.filters.Filter` or `bool`. - When True, ignore potential longer matches when this key binding is - hit. E.g. when there is an active eager key binding for Ctrl-X, - execute the handler immediately and ignore the key binding for - Ctrl-X Ctrl-E of which it is a prefix. - :param is_global: When this key bindings is added to a `Container` or - `Control`, make it a global (always active) binding. - :param save_before: Callable that takes an `Event` and returns True if - we should save the current buffer, before handling the event. - (That's the default.) - :param record_in_macro: Record these key bindings when a macro is - being recorded. (True by default.) - """ - assert keys - - keys = tuple(_parse_key(k) for k in keys) - - if isinstance(filter, Never): - # When a filter is Never, it will always stay disabled, so in that - # case don't bother putting it in the key bindings. It will slow - # down every key press otherwise. - def decorator(func: T) -> T: - return func - - else: - - def decorator(func: T) -> T: - if isinstance(func, Binding): - # We're adding an existing Binding object. - self.bindings.append( - Binding( - keys, - func.handler, - filter=func.filter & to_filter(filter), - eager=to_filter(eager) | func.eager, - is_global=to_filter(is_global) | func.is_global, - save_before=func.save_before, - record_in_macro=func.record_in_macro, - ) - ) - else: - self.bindings.append( - Binding( - keys, - cast(KeyHandlerCallable, func), - filter=filter, - eager=eager, - is_global=is_global, - save_before=save_before, - record_in_macro=record_in_macro, - ) - ) - self._clear_cache() - - return func - - return decorator - - def remove(self, *args: Keys | str | KeyHandlerCallable) -> None: - """ - Remove a key binding. - - This expects either a function that was given to `add` method as - parameter or a sequence of key bindings. - - Raises `ValueError` when no bindings was found. - - Usage:: - - remove(handler) # Pass handler. - remove('c-x', 'c-a') # Or pass the key bindings. - """ - found = False - - if callable(args[0]): - assert len(args) == 1 - function = args[0] - - # Remove the given function. - for b in self.bindings: - if b.handler == function: - self.bindings.remove(b) - found = True - - else: - assert len(args) > 0 - args = cast(Tuple[Union[Keys, str]], args) - - # Remove this sequence of key bindings. - keys = tuple(_parse_key(k) for k in args) - - for b in self.bindings: - if b.keys == keys: - self.bindings.remove(b) - found = True - - if found: - self._clear_cache() - else: - # No key binding found for this function. Raise ValueError. - raise ValueError(f"Binding not found: {function!r}") - - # For backwards-compatibility. - add_binding = add - remove_binding = remove - - def get_bindings_for_keys(self, keys: KeysTuple) -> list[Binding]: - """ - Return a list of key bindings that can handle this key. - (This return also inactive bindings, so the `filter` still has to be - called, for checking it.) - - :param keys: tuple of keys. - """ - - def get() -> list[Binding]: - result: list[tuple[int, Binding]] = [] - - for b in self.bindings: - if len(keys) == len(b.keys): - match = True - any_count = 0 - - for i, j in zip(b.keys, keys): - if i != j and i != Keys.Any: - match = False - break - - if i == Keys.Any: - any_count += 1 - - if match: - result.append((any_count, b)) - - # Place bindings that have more 'Any' occurrences in them at the end. - result = sorted(result, key=lambda item: -item[0]) - - return [item[1] for item in result] - - return self._get_bindings_for_keys_cache.get(keys, get) - - def get_bindings_starting_with_keys(self, keys: KeysTuple) -> list[Binding]: - """ - Return a list of key bindings that handle a key sequence starting with - `keys`. (It does only return bindings for which the sequences are - longer than `keys`. And like `get_bindings_for_keys`, it also includes - inactive bindings.) - - :param keys: tuple of keys. - """ - - def get() -> list[Binding]: - result = [] - for b in self.bindings: - if len(keys) < len(b.keys): - match = True - for i, j in zip(b.keys, keys): - if i != j and i != Keys.Any: - match = False - break - if match: - result.append(b) - return result - - return self._get_bindings_starting_with_keys_cache.get(keys, get) - - -def _parse_key(key: Keys | str) -> str | Keys: - """ - Replace key by alias and verify whether it's a valid one. - """ - # Already a parse key? -> Return it. - if isinstance(key, Keys): - return key - - # Lookup aliases. - key = KEY_ALIASES.get(key, key) - - # Replace 'space' by ' ' - if key == "space": - key = " " - - # Return as `Key` object when it's a special key. - try: - return Keys(key) - except ValueError: - pass - - # Final validation. - if len(key) != 1: - raise ValueError(f"Invalid key: {key}") - - return key - - -def key_binding( - filter: FilterOrBool = True, - eager: FilterOrBool = False, - is_global: FilterOrBool = False, - save_before: Callable[[KeyPressEvent], bool] = (lambda event: True), - record_in_macro: FilterOrBool = True, -) -> Callable[[KeyHandlerCallable], Binding]: - """ - Decorator that turn a function into a `Binding` object. This can be added - to a `KeyBindings` object when a key binding is assigned. - """ - assert save_before is None or callable(save_before) - - filter = to_filter(filter) - eager = to_filter(eager) - is_global = to_filter(is_global) - save_before = save_before - record_in_macro = to_filter(record_in_macro) - keys = () - - def decorator(function: KeyHandlerCallable) -> Binding: - return Binding( - keys, - function, - filter=filter, - eager=eager, - is_global=is_global, - save_before=save_before, - record_in_macro=record_in_macro, - ) - - return decorator - - -class _Proxy(KeyBindingsBase): - """ - Common part for ConditionalKeyBindings and _MergedKeyBindings. - """ - - def __init__(self) -> None: - # `KeyBindings` to be synchronized with all the others. - self._bindings2: KeyBindingsBase = KeyBindings() - self._last_version: Hashable = () - - def _update_cache(self) -> None: - """ - If `self._last_version` is outdated, then this should update - the version and `self._bindings2`. - """ - raise NotImplementedError - - # Proxy methods to self._bindings2. - - @property - def bindings(self) -> list[Binding]: - self._update_cache() - return self._bindings2.bindings - - @property - def _version(self) -> Hashable: - self._update_cache() - return self._last_version - - def get_bindings_for_keys(self, keys: KeysTuple) -> list[Binding]: - self._update_cache() - return self._bindings2.get_bindings_for_keys(keys) - - def get_bindings_starting_with_keys(self, keys: KeysTuple) -> list[Binding]: - self._update_cache() - return self._bindings2.get_bindings_starting_with_keys(keys) - - -class ConditionalKeyBindings(_Proxy): - """ - Wraps around a `KeyBindings`. Disable/enable all the key bindings according to - the given (additional) filter.:: - - @Condition - def setting_is_true(): - return True # or False - - registry = ConditionalKeyBindings(key_bindings, setting_is_true) - - When new key bindings are added to this object. They are also - enable/disabled according to the given `filter`. - - :param registries: List of :class:`.KeyBindings` objects. - :param filter: :class:`~prompt_toolkit.filters.Filter` object. - """ - - def __init__( - self, key_bindings: KeyBindingsBase, filter: FilterOrBool = True - ) -> None: - _Proxy.__init__(self) - - self.key_bindings = key_bindings - self.filter = to_filter(filter) - - def _update_cache(self) -> None: - "If the original key bindings was changed. Update our copy version." - expected_version = self.key_bindings._version - - if self._last_version != expected_version: - bindings2 = KeyBindings() - - # Copy all bindings from `self.key_bindings`, adding our condition. - for b in self.key_bindings.bindings: - bindings2.bindings.append( - Binding( - keys=b.keys, - handler=b.handler, - filter=self.filter & b.filter, - eager=b.eager, - is_global=b.is_global, - save_before=b.save_before, - record_in_macro=b.record_in_macro, - ) - ) - - self._bindings2 = bindings2 - self._last_version = expected_version - - -class _MergedKeyBindings(_Proxy): - """ - Merge multiple registries of key bindings into one. - - This class acts as a proxy to multiple :class:`.KeyBindings` objects, but - behaves as if this is just one bigger :class:`.KeyBindings`. - - :param registries: List of :class:`.KeyBindings` objects. - """ - - def __init__(self, registries: Sequence[KeyBindingsBase]) -> None: - _Proxy.__init__(self) - self.registries = registries - - def _update_cache(self) -> None: - """ - If one of the original registries was changed. Update our merged - version. - """ - expected_version = tuple(r._version for r in self.registries) - - if self._last_version != expected_version: - bindings2 = KeyBindings() - - for reg in self.registries: - bindings2.bindings.extend(reg.bindings) - - self._bindings2 = bindings2 - self._last_version = expected_version - - -def merge_key_bindings(bindings: Sequence[KeyBindingsBase]) -> _MergedKeyBindings: - """ - Merge multiple :class:`.Keybinding` objects together. - - Usage:: - - bindings = merge_key_bindings([bindings1, bindings2, ...]) - """ - return _MergedKeyBindings(bindings) - - -class DynamicKeyBindings(_Proxy): - """ - KeyBindings class that can dynamically returns any KeyBindings. - - :param get_key_bindings: Callable that returns a :class:`.KeyBindings` instance. - """ - - def __init__(self, get_key_bindings: Callable[[], KeyBindingsBase | None]) -> None: - self.get_key_bindings = get_key_bindings - self.__version = 0 - self._last_child_version = None - self._dummy = KeyBindings() # Empty key bindings. - - def _update_cache(self) -> None: - key_bindings = self.get_key_bindings() or self._dummy - assert isinstance(key_bindings, KeyBindingsBase) - version = id(key_bindings), key_bindings._version - - self._bindings2 = key_bindings - self._last_version = version - - -class GlobalOnlyKeyBindings(_Proxy): - """ - Wrapper around a :class:`.KeyBindings` object that only exposes the global - key bindings. - """ - - def __init__(self, key_bindings: KeyBindingsBase) -> None: - _Proxy.__init__(self) - self.key_bindings = key_bindings - - def _update_cache(self) -> None: - """ - If one of the original registries was changed. Update our merged - version. - """ - expected_version = self.key_bindings._version - - if self._last_version != expected_version: - bindings2 = KeyBindings() - - for b in self.key_bindings.bindings: - if b.is_global(): - bindings2.bindings.append(b) - - self._bindings2 = bindings2 - self._last_version = expected_version diff --git a/voxvera/vendor/prompt_toolkit/key_binding/key_processor.py b/voxvera/vendor/prompt_toolkit/key_binding/key_processor.py deleted file mode 100644 index e2070a1..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/key_processor.py +++ /dev/null @@ -1,526 +0,0 @@ -""" -An :class:`~.KeyProcessor` receives callbacks for the keystrokes parsed from -the input in the :class:`~prompt_toolkit.inputstream.InputStream` instance. - -The `KeyProcessor` will according to the implemented keybindings call the -correct callbacks when new key presses are feed through `feed`. -""" - -from __future__ import annotations - -import weakref -from asyncio import Task, sleep -from collections import deque -from typing import TYPE_CHECKING, Any, Generator - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.enums import EditingMode -from prompt_toolkit.filters.app import vi_navigation_mode -from prompt_toolkit.keys import Keys -from prompt_toolkit.utils import Event - -from .key_bindings import Binding, KeyBindingsBase - -if TYPE_CHECKING: - from prompt_toolkit.application import Application - from prompt_toolkit.buffer import Buffer - - -__all__ = [ - "KeyProcessor", - "KeyPress", - "KeyPressEvent", -] - - -class KeyPress: - """ - :param key: A `Keys` instance or text (one character). - :param data: The received string on stdin. (Often vt100 escape codes.) - """ - - def __init__(self, key: Keys | str, data: str | None = None) -> None: - assert isinstance(key, Keys) or len(key) == 1 - - if data is None: - if isinstance(key, Keys): - data = key.value - else: - data = key # 'key' is a one character string. - - self.key = key - self.data = data - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(key={self.key!r}, data={self.data!r})" - - def __eq__(self, other: object) -> bool: - if not isinstance(other, KeyPress): - return False - return self.key == other.key and self.data == other.data - - -""" -Helper object to indicate flush operation in the KeyProcessor. -NOTE: the implementation is very similar to the VT100 parser. -""" -_Flush = KeyPress("?", data="_Flush") - - -class KeyProcessor: - """ - Statemachine that receives :class:`KeyPress` instances and according to the - key bindings in the given :class:`KeyBindings`, calls the matching handlers. - - :: - - p = KeyProcessor(key_bindings) - - # Send keys into the processor. - p.feed(KeyPress(Keys.ControlX, '\x18')) - p.feed(KeyPress(Keys.ControlC, '\x03') - - # Process all the keys in the queue. - p.process_keys() - - # Now the ControlX-ControlC callback will be called if this sequence is - # registered in the key bindings. - - :param key_bindings: `KeyBindingsBase` instance. - """ - - def __init__(self, key_bindings: KeyBindingsBase) -> None: - self._bindings = key_bindings - - self.before_key_press = Event(self) - self.after_key_press = Event(self) - - self._flush_wait_task: Task[None] | None = None - - self.reset() - - def reset(self) -> None: - self._previous_key_sequence: list[KeyPress] = [] - self._previous_handler: Binding | None = None - - # The queue of keys not yet send to our _process generator/state machine. - self.input_queue: deque[KeyPress] = deque() - - # The key buffer that is matched in the generator state machine. - # (This is at at most the amount of keys that make up for one key binding.) - self.key_buffer: list[KeyPress] = [] - - #: Readline argument (for repetition of commands.) - #: https://www.gnu.org/software/bash/manual/html_node/Readline-Arguments.html - self.arg: str | None = None - - # Start the processor coroutine. - self._process_coroutine = self._process() - self._process_coroutine.send(None) # type: ignore - - def _get_matches(self, key_presses: list[KeyPress]) -> list[Binding]: - """ - For a list of :class:`KeyPress` instances. Give the matching handlers - that would handle this. - """ - keys = tuple(k.key for k in key_presses) - - # Try match, with mode flag - return [b for b in self._bindings.get_bindings_for_keys(keys) if b.filter()] - - def _is_prefix_of_longer_match(self, key_presses: list[KeyPress]) -> bool: - """ - For a list of :class:`KeyPress` instances. Return True if there is any - handler that is bound to a suffix of this keys. - """ - keys = tuple(k.key for k in key_presses) - - # Get the filters for all the key bindings that have a longer match. - # Note that we transform it into a `set`, because we don't care about - # the actual bindings and executing it more than once doesn't make - # sense. (Many key bindings share the same filter.) - filters = { - b.filter for b in self._bindings.get_bindings_starting_with_keys(keys) - } - - # When any key binding is active, return True. - return any(f() for f in filters) - - def _process(self) -> Generator[None, KeyPress, None]: - """ - Coroutine implementing the key match algorithm. Key strokes are sent - into this generator, and it calls the appropriate handlers. - """ - buffer = self.key_buffer - retry = False - - while True: - flush = False - - if retry: - retry = False - else: - key = yield - if key is _Flush: - flush = True - else: - buffer.append(key) - - # If we have some key presses, check for matches. - if buffer: - matches = self._get_matches(buffer) - - if flush: - is_prefix_of_longer_match = False - else: - is_prefix_of_longer_match = self._is_prefix_of_longer_match(buffer) - - # When eager matches were found, give priority to them and also - # ignore all the longer matches. - eager_matches = [m for m in matches if m.eager()] - - if eager_matches: - matches = eager_matches - is_prefix_of_longer_match = False - - # Exact matches found, call handler. - if not is_prefix_of_longer_match and matches: - self._call_handler(matches[-1], key_sequence=buffer[:]) - del buffer[:] # Keep reference. - - # No match found. - elif not is_prefix_of_longer_match and not matches: - retry = True - found = False - - # Loop over the input, try longest match first and shift. - for i in range(len(buffer), 0, -1): - matches = self._get_matches(buffer[:i]) - if matches: - self._call_handler(matches[-1], key_sequence=buffer[:i]) - del buffer[:i] - found = True - break - - if not found: - del buffer[:1] - - def feed(self, key_press: KeyPress, first: bool = False) -> None: - """ - Add a new :class:`KeyPress` to the input queue. - (Don't forget to call `process_keys` in order to process the queue.) - - :param first: If true, insert before everything else. - """ - if first: - self.input_queue.appendleft(key_press) - else: - self.input_queue.append(key_press) - - def feed_multiple(self, key_presses: list[KeyPress], first: bool = False) -> None: - """ - :param first: If true, insert before everything else. - """ - if first: - self.input_queue.extendleft(reversed(key_presses)) - else: - self.input_queue.extend(key_presses) - - def process_keys(self) -> None: - """ - Process all the keys in the `input_queue`. - (To be called after `feed`.) - - Note: because of the `feed`/`process_keys` separation, it is - possible to call `feed` from inside a key binding. - This function keeps looping until the queue is empty. - """ - app = get_app() - - def not_empty() -> bool: - # When the application result is set, stop processing keys. (E.g. - # if ENTER was received, followed by a few additional key strokes, - # leave the other keys in the queue.) - if app.is_done: - # But if there are still CPRResponse keys in the queue, these - # need to be processed. - return any(k for k in self.input_queue if k.key == Keys.CPRResponse) - else: - return bool(self.input_queue) - - def get_next() -> KeyPress: - if app.is_done: - # Only process CPR responses. Everything else is typeahead. - cpr = [k for k in self.input_queue if k.key == Keys.CPRResponse][0] - self.input_queue.remove(cpr) - return cpr - else: - return self.input_queue.popleft() - - is_flush = False - - while not_empty(): - # Process next key. - key_press = get_next() - - is_flush = key_press is _Flush - is_cpr = key_press.key == Keys.CPRResponse - - if not is_flush and not is_cpr: - self.before_key_press.fire() - - try: - self._process_coroutine.send(key_press) - except Exception: - # If for some reason something goes wrong in the parser, (maybe - # an exception was raised) restart the processor for next time. - self.reset() - self.empty_queue() - raise - - if not is_flush and not is_cpr: - self.after_key_press.fire() - - # Skip timeout if the last key was flush. - if not is_flush: - self._start_timeout() - - def empty_queue(self) -> list[KeyPress]: - """ - Empty the input queue. Return the unprocessed input. - """ - key_presses = list(self.input_queue) - self.input_queue.clear() - - # Filter out CPRs. We don't want to return these. - key_presses = [k for k in key_presses if k.key != Keys.CPRResponse] - return key_presses - - def _call_handler(self, handler: Binding, key_sequence: list[KeyPress]) -> None: - app = get_app() - was_recording_emacs = app.emacs_state.is_recording - was_recording_vi = bool(app.vi_state.recording_register) - was_temporary_navigation_mode = app.vi_state.temporary_navigation_mode - arg = self.arg - self.arg = None - - event = KeyPressEvent( - weakref.ref(self), - arg=arg, - key_sequence=key_sequence, - previous_key_sequence=self._previous_key_sequence, - is_repeat=(handler == self._previous_handler), - ) - - # Save the state of the current buffer. - if handler.save_before(event): - event.app.current_buffer.save_to_undo_stack() - - # Call handler. - from prompt_toolkit.buffer import EditReadOnlyBuffer - - try: - handler.call(event) - self._fix_vi_cursor_position(event) - - except EditReadOnlyBuffer: - # When a key binding does an attempt to change a buffer which is - # read-only, we can ignore that. We sound a bell and go on. - app.output.bell() - - if was_temporary_navigation_mode: - self._leave_vi_temp_navigation_mode(event) - - self._previous_key_sequence = key_sequence - self._previous_handler = handler - - # Record the key sequence in our macro. (Only if we're in macro mode - # before and after executing the key.) - if handler.record_in_macro(): - if app.emacs_state.is_recording and was_recording_emacs: - recording = app.emacs_state.current_recording - if recording is not None: # Should always be true, given that - # `was_recording_emacs` is set. - recording.extend(key_sequence) - - if app.vi_state.recording_register and was_recording_vi: - for k in key_sequence: - app.vi_state.current_recording += k.data - - def _fix_vi_cursor_position(self, event: KeyPressEvent) -> None: - """ - After every command, make sure that if we are in Vi navigation mode, we - never put the cursor after the last character of a line. (Unless it's - an empty line.) - """ - app = event.app - buff = app.current_buffer - preferred_column = buff.preferred_column - - if ( - vi_navigation_mode() - and buff.document.is_cursor_at_the_end_of_line - and len(buff.document.current_line) > 0 - ): - buff.cursor_position -= 1 - - # Set the preferred_column for arrow up/down again. - # (This was cleared after changing the cursor position.) - buff.preferred_column = preferred_column - - def _leave_vi_temp_navigation_mode(self, event: KeyPressEvent) -> None: - """ - If we're in Vi temporary navigation (normal) mode, return to - insert/replace mode after executing one action. - """ - app = event.app - - if app.editing_mode == EditingMode.VI: - # Not waiting for a text object and no argument has been given. - if app.vi_state.operator_func is None and self.arg is None: - app.vi_state.temporary_navigation_mode = False - - def _start_timeout(self) -> None: - """ - Start auto flush timeout. Similar to Vim's `timeoutlen` option. - - Start a background coroutine with a timer. When this timeout expires - and no key was pressed in the meantime, we flush all data in the queue - and call the appropriate key binding handlers. - """ - app = get_app() - timeout = app.timeoutlen - - if timeout is None: - return - - async def wait() -> None: - "Wait for timeout." - # This sleep can be cancelled. In that case we don't flush. - await sleep(timeout) - - if len(self.key_buffer) > 0: - # (No keys pressed in the meantime.) - flush_keys() - - def flush_keys() -> None: - "Flush keys." - self.feed(_Flush) - self.process_keys() - - # Automatically flush keys. - if self._flush_wait_task: - self._flush_wait_task.cancel() - self._flush_wait_task = app.create_background_task(wait()) - - def send_sigint(self) -> None: - """ - Send SIGINT. Immediately call the SIGINT key handler. - """ - self.feed(KeyPress(key=Keys.SIGINT), first=True) - self.process_keys() - - -class KeyPressEvent: - """ - Key press event, delivered to key bindings. - - :param key_processor_ref: Weak reference to the `KeyProcessor`. - :param arg: Repetition argument. - :param key_sequence: List of `KeyPress` instances. - :param previouskey_sequence: Previous list of `KeyPress` instances. - :param is_repeat: True when the previous event was delivered to the same handler. - """ - - def __init__( - self, - key_processor_ref: weakref.ReferenceType[KeyProcessor], - arg: str | None, - key_sequence: list[KeyPress], - previous_key_sequence: list[KeyPress], - is_repeat: bool, - ) -> None: - self._key_processor_ref = key_processor_ref - self.key_sequence = key_sequence - self.previous_key_sequence = previous_key_sequence - - #: True when the previous key sequence was handled by the same handler. - self.is_repeat = is_repeat - - self._arg = arg - self._app = get_app() - - def __repr__(self) -> str: - return f"KeyPressEvent(arg={self.arg!r}, key_sequence={self.key_sequence!r}, is_repeat={self.is_repeat!r})" - - @property - def data(self) -> str: - return self.key_sequence[-1].data - - @property - def key_processor(self) -> KeyProcessor: - processor = self._key_processor_ref() - if processor is None: - raise Exception("KeyProcessor was lost. This should not happen.") - return processor - - @property - def app(self) -> Application[Any]: - """ - The current `Application` object. - """ - return self._app - - @property - def current_buffer(self) -> Buffer: - """ - The current buffer. - """ - return self.app.current_buffer - - @property - def arg(self) -> int: - """ - Repetition argument. - """ - if self._arg == "-": - return -1 - - result = int(self._arg or 1) - - # Don't exceed a million. - if int(result) >= 1000000: - result = 1 - - return result - - @property - def arg_present(self) -> bool: - """ - True if repetition argument was explicitly provided. - """ - return self._arg is not None - - def append_to_arg_count(self, data: str) -> None: - """ - Add digit to the input argument. - - :param data: the typed digit as string - """ - assert data in "-0123456789" - current = self._arg - - if data == "-": - assert current is None or current == "-" - result = data - elif current is None: - result = data - else: - result = f"{current}{data}" - - self.key_processor.arg = result - - @property - def cli(self) -> Application[Any]: - "For backward-compatibility." - return self.app diff --git a/voxvera/vendor/prompt_toolkit/key_binding/vi_state.py b/voxvera/vendor/prompt_toolkit/key_binding/vi_state.py deleted file mode 100644 index 0543911..0000000 --- a/voxvera/vendor/prompt_toolkit/key_binding/vi_state.py +++ /dev/null @@ -1,107 +0,0 @@ -from __future__ import annotations - -from enum import Enum -from typing import TYPE_CHECKING, Callable - -from prompt_toolkit.clipboard import ClipboardData - -if TYPE_CHECKING: - from .bindings.vi import TextObject - from .key_processor import KeyPressEvent - -__all__ = [ - "InputMode", - "CharacterFind", - "ViState", -] - - -class InputMode(str, Enum): - value: str - - INSERT = "vi-insert" - INSERT_MULTIPLE = "vi-insert-multiple" - NAVIGATION = "vi-navigation" # Normal mode. - REPLACE = "vi-replace" - REPLACE_SINGLE = "vi-replace-single" - - -class CharacterFind: - def __init__(self, character: str, backwards: bool = False) -> None: - self.character = character - self.backwards = backwards - - -class ViState: - """ - Mutable class to hold the state of the Vi navigation. - """ - - def __init__(self) -> None: - #: None or CharacterFind instance. (This is used to repeat the last - #: search in Vi mode, by pressing the 'n' or 'N' in navigation mode.) - self.last_character_find: CharacterFind | None = None - - # When an operator is given and we are waiting for text object, - # -- e.g. in the case of 'dw', after the 'd' --, an operator callback - # is set here. - self.operator_func: None | (Callable[[KeyPressEvent, TextObject], None]) = None - self.operator_arg: int | None = None - - #: Named registers. Maps register name (e.g. 'a') to - #: :class:`ClipboardData` instances. - self.named_registers: dict[str, ClipboardData] = {} - - #: The Vi mode we're currently in to. - self.__input_mode = InputMode.INSERT - - #: Waiting for digraph. - self.waiting_for_digraph = False - self.digraph_symbol1: str | None = None # (None or a symbol.) - - #: When true, make ~ act as an operator. - self.tilde_operator = False - - #: Register in which we are recording a macro. - #: `None` when not recording anything. - # Note that the recording is only stored in the register after the - # recording is stopped. So we record in a separate `current_recording` - # variable. - self.recording_register: str | None = None - self.current_recording: str = "" - - # Temporary navigation (normal) mode. - # This happens when control-o has been pressed in insert or replace - # mode. The user can now do one navigation action and we'll return back - # to insert/replace. - self.temporary_navigation_mode = False - - @property - def input_mode(self) -> InputMode: - "Get `InputMode`." - return self.__input_mode - - @input_mode.setter - def input_mode(self, value: InputMode) -> None: - "Set `InputMode`." - if value == InputMode.NAVIGATION: - self.waiting_for_digraph = False - self.operator_func = None - self.operator_arg = None - - self.__input_mode = value - - def reset(self) -> None: - """ - Reset state, go back to the given mode. INSERT by default. - """ - # Go back to insert mode. - self.input_mode = InputMode.INSERT - - self.waiting_for_digraph = False - self.operator_func = None - self.operator_arg = None - - # Reset recording state. - self.recording_register = None - self.current_recording = "" diff --git a/voxvera/vendor/prompt_toolkit/keys.py b/voxvera/vendor/prompt_toolkit/keys.py deleted file mode 100644 index ee52aee..0000000 --- a/voxvera/vendor/prompt_toolkit/keys.py +++ /dev/null @@ -1,222 +0,0 @@ -from __future__ import annotations - -from enum import Enum - -__all__ = [ - "Keys", - "ALL_KEYS", -] - - -class Keys(str, Enum): - """ - List of keys for use in key bindings. - - Note that this is an "StrEnum", all values can be compared against - strings. - """ - - value: str - - Escape = "escape" # Also Control-[ - ShiftEscape = "s-escape" - - ControlAt = "c-@" # Also Control-Space. - - ControlA = "c-a" - ControlB = "c-b" - ControlC = "c-c" - ControlD = "c-d" - ControlE = "c-e" - ControlF = "c-f" - ControlG = "c-g" - ControlH = "c-h" - ControlI = "c-i" # Tab - ControlJ = "c-j" # Newline - ControlK = "c-k" - ControlL = "c-l" - ControlM = "c-m" # Carriage return - ControlN = "c-n" - ControlO = "c-o" - ControlP = "c-p" - ControlQ = "c-q" - ControlR = "c-r" - ControlS = "c-s" - ControlT = "c-t" - ControlU = "c-u" - ControlV = "c-v" - ControlW = "c-w" - ControlX = "c-x" - ControlY = "c-y" - ControlZ = "c-z" - - Control1 = "c-1" - Control2 = "c-2" - Control3 = "c-3" - Control4 = "c-4" - Control5 = "c-5" - Control6 = "c-6" - Control7 = "c-7" - Control8 = "c-8" - Control9 = "c-9" - Control0 = "c-0" - - ControlShift1 = "c-s-1" - ControlShift2 = "c-s-2" - ControlShift3 = "c-s-3" - ControlShift4 = "c-s-4" - ControlShift5 = "c-s-5" - ControlShift6 = "c-s-6" - ControlShift7 = "c-s-7" - ControlShift8 = "c-s-8" - ControlShift9 = "c-s-9" - ControlShift0 = "c-s-0" - - ControlBackslash = "c-\\" - ControlSquareClose = "c-]" - ControlCircumflex = "c-^" - ControlUnderscore = "c-_" - - Left = "left" - Right = "right" - Up = "up" - Down = "down" - Home = "home" - End = "end" - Insert = "insert" - Delete = "delete" - PageUp = "pageup" - PageDown = "pagedown" - - ControlLeft = "c-left" - ControlRight = "c-right" - ControlUp = "c-up" - ControlDown = "c-down" - ControlHome = "c-home" - ControlEnd = "c-end" - ControlInsert = "c-insert" - ControlDelete = "c-delete" - ControlPageUp = "c-pageup" - ControlPageDown = "c-pagedown" - - ShiftLeft = "s-left" - ShiftRight = "s-right" - ShiftUp = "s-up" - ShiftDown = "s-down" - ShiftHome = "s-home" - ShiftEnd = "s-end" - ShiftInsert = "s-insert" - ShiftDelete = "s-delete" - ShiftPageUp = "s-pageup" - ShiftPageDown = "s-pagedown" - - ControlShiftLeft = "c-s-left" - ControlShiftRight = "c-s-right" - ControlShiftUp = "c-s-up" - ControlShiftDown = "c-s-down" - ControlShiftHome = "c-s-home" - ControlShiftEnd = "c-s-end" - ControlShiftInsert = "c-s-insert" - ControlShiftDelete = "c-s-delete" - ControlShiftPageUp = "c-s-pageup" - ControlShiftPageDown = "c-s-pagedown" - - BackTab = "s-tab" # shift + tab - - F1 = "f1" - F2 = "f2" - F3 = "f3" - F4 = "f4" - F5 = "f5" - F6 = "f6" - F7 = "f7" - F8 = "f8" - F9 = "f9" - F10 = "f10" - F11 = "f11" - F12 = "f12" - F13 = "f13" - F14 = "f14" - F15 = "f15" - F16 = "f16" - F17 = "f17" - F18 = "f18" - F19 = "f19" - F20 = "f20" - F21 = "f21" - F22 = "f22" - F23 = "f23" - F24 = "f24" - - ControlF1 = "c-f1" - ControlF2 = "c-f2" - ControlF3 = "c-f3" - ControlF4 = "c-f4" - ControlF5 = "c-f5" - ControlF6 = "c-f6" - ControlF7 = "c-f7" - ControlF8 = "c-f8" - ControlF9 = "c-f9" - ControlF10 = "c-f10" - ControlF11 = "c-f11" - ControlF12 = "c-f12" - ControlF13 = "c-f13" - ControlF14 = "c-f14" - ControlF15 = "c-f15" - ControlF16 = "c-f16" - ControlF17 = "c-f17" - ControlF18 = "c-f18" - ControlF19 = "c-f19" - ControlF20 = "c-f20" - ControlF21 = "c-f21" - ControlF22 = "c-f22" - ControlF23 = "c-f23" - ControlF24 = "c-f24" - - # Matches any key. - Any = "" - - # Special. - ScrollUp = "" - ScrollDown = "" - - CPRResponse = "" - Vt100MouseEvent = "" - WindowsMouseEvent = "" - BracketedPaste = "" - - SIGINT = "" - - # For internal use: key which is ignored. - # (The key binding for this key should not do anything.) - Ignore = "" - - # Some 'Key' aliases (for backwards-compatibility). - ControlSpace = ControlAt - Tab = ControlI - Enter = ControlM - Backspace = ControlH - - # ShiftControl was renamed to ControlShift in - # 888fcb6fa4efea0de8333177e1bbc792f3ff3c24 (20 Feb 2020). - ShiftControlLeft = ControlShiftLeft - ShiftControlRight = ControlShiftRight - ShiftControlHome = ControlShiftHome - ShiftControlEnd = ControlShiftEnd - - -ALL_KEYS: list[str] = [k.value for k in Keys] - - -# Aliases. -KEY_ALIASES: dict[str, str] = { - "backspace": "c-h", - "c-space": "c-@", - "enter": "c-m", - "tab": "c-i", - # ShiftControl was renamed to ControlShift. - "s-c-left": "c-s-left", - "s-c-right": "c-s-right", - "s-c-home": "c-s-home", - "s-c-end": "c-s-end", -} diff --git a/voxvera/vendor/prompt_toolkit/layout/__init__.py b/voxvera/vendor/prompt_toolkit/layout/__init__.py deleted file mode 100644 index 7cd0c77..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/__init__.py +++ /dev/null @@ -1,147 +0,0 @@ -""" -Command line layout definitions -------------------------------- - -The layout of a command line interface is defined by a Container instance. -There are two main groups of classes here. Containers and controls: - -- A container can contain other containers or controls, it can have multiple - children and it decides about the dimensions. -- A control is responsible for rendering the actual content to a screen. - A control can propose some dimensions, but it's the container who decides - about the dimensions -- or when the control consumes more space -- which part - of the control will be visible. - - -Container classes:: - - - Container (Abstract base class) - |- HSplit (Horizontal split) - |- VSplit (Vertical split) - |- FloatContainer (Container which can also contain menus and other floats) - `- Window (Container which contains one actual control - -Control classes:: - - - UIControl (Abstract base class) - |- FormattedTextControl (Renders formatted text, or a simple list of text fragments) - `- BufferControl (Renders an input buffer.) - - -Usually, you end up wrapping every control inside a `Window` object, because -that's the only way to render it in a layout. - -There are some prepared toolbars which are ready to use:: - -- SystemToolbar (Shows the 'system' input buffer, for entering system commands.) -- ArgToolbar (Shows the input 'arg', for repetition of input commands.) -- SearchToolbar (Shows the 'search' input buffer, for incremental search.) -- CompletionsToolbar (Shows the completions of the current buffer.) -- ValidationToolbar (Shows validation errors of the current buffer.) - -And one prepared menu: - -- CompletionsMenu - -""" - -from __future__ import annotations - -from .containers import ( - AnyContainer, - ColorColumn, - ConditionalContainer, - Container, - DynamicContainer, - Float, - FloatContainer, - HorizontalAlign, - HSplit, - ScrollOffsets, - VerticalAlign, - VSplit, - Window, - WindowAlign, - WindowRenderInfo, - is_container, - to_container, - to_window, -) -from .controls import ( - BufferControl, - DummyControl, - FormattedTextControl, - SearchBufferControl, - UIContent, - UIControl, -) -from .dimension import ( - AnyDimension, - D, - Dimension, - is_dimension, - max_layout_dimensions, - sum_layout_dimensions, - to_dimension, -) -from .layout import InvalidLayoutError, Layout, walk -from .margins import ( - ConditionalMargin, - Margin, - NumberedMargin, - PromptMargin, - ScrollbarMargin, -) -from .menus import CompletionsMenu, MultiColumnCompletionsMenu -from .scrollable_pane import ScrollablePane - -__all__ = [ - # Layout. - "Layout", - "InvalidLayoutError", - "walk", - # Dimensions. - "AnyDimension", - "Dimension", - "D", - "sum_layout_dimensions", - "max_layout_dimensions", - "to_dimension", - "is_dimension", - # Containers. - "AnyContainer", - "Container", - "HorizontalAlign", - "VerticalAlign", - "HSplit", - "VSplit", - "FloatContainer", - "Float", - "WindowAlign", - "Window", - "WindowRenderInfo", - "ConditionalContainer", - "ScrollOffsets", - "ColorColumn", - "to_container", - "to_window", - "is_container", - "DynamicContainer", - "ScrollablePane", - # Controls. - "BufferControl", - "SearchBufferControl", - "DummyControl", - "FormattedTextControl", - "UIControl", - "UIContent", - # Margins. - "Margin", - "NumberedMargin", - "ScrollbarMargin", - "ConditionalMargin", - "PromptMargin", - # Menus. - "CompletionsMenu", - "MultiColumnCompletionsMenu", -] diff --git a/voxvera/vendor/prompt_toolkit/layout/containers.py b/voxvera/vendor/prompt_toolkit/layout/containers.py deleted file mode 100644 index f6fe381..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/containers.py +++ /dev/null @@ -1,2766 +0,0 @@ -""" -Container for the layout. -(Containers can contain other containers or user interface controls.) -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from enum import Enum -from functools import partial -from typing import TYPE_CHECKING, Callable, Sequence, Union, cast - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.cache import SimpleCache -from prompt_toolkit.data_structures import Point -from prompt_toolkit.filters import ( - FilterOrBool, - emacs_insert_mode, - to_filter, - vi_insert_mode, -) -from prompt_toolkit.formatted_text import ( - AnyFormattedText, - StyleAndTextTuples, - to_formatted_text, -) -from prompt_toolkit.formatted_text.utils import ( - fragment_list_to_text, - fragment_list_width, -) -from prompt_toolkit.key_binding import KeyBindingsBase -from prompt_toolkit.mouse_events import MouseEvent, MouseEventType -from prompt_toolkit.utils import get_cwidth, take_using_weights, to_int, to_str - -from .controls import ( - DummyControl, - FormattedTextControl, - GetLinePrefixCallable, - UIContent, - UIControl, -) -from .dimension import ( - AnyDimension, - Dimension, - max_layout_dimensions, - sum_layout_dimensions, - to_dimension, -) -from .margins import Margin -from .mouse_handlers import MouseHandlers -from .screen import _CHAR_CACHE, Screen, WritePosition -from .utils import explode_text_fragments - -if TYPE_CHECKING: - from typing_extensions import Protocol, TypeGuard - - from prompt_toolkit.key_binding.key_bindings import NotImplementedOrNone - - -__all__ = [ - "AnyContainer", - "Container", - "HorizontalAlign", - "VerticalAlign", - "HSplit", - "VSplit", - "FloatContainer", - "Float", - "WindowAlign", - "Window", - "WindowRenderInfo", - "ConditionalContainer", - "ScrollOffsets", - "ColorColumn", - "to_container", - "to_window", - "is_container", - "DynamicContainer", -] - - -class Container(metaclass=ABCMeta): - """ - Base class for user interface layout. - """ - - @abstractmethod - def reset(self) -> None: - """ - Reset the state of this container and all the children. - (E.g. reset scroll offsets, etc...) - """ - - @abstractmethod - def preferred_width(self, max_available_width: int) -> Dimension: - """ - Return a :class:`~prompt_toolkit.layout.Dimension` that represents the - desired width for this container. - """ - - @abstractmethod - def preferred_height(self, width: int, max_available_height: int) -> Dimension: - """ - Return a :class:`~prompt_toolkit.layout.Dimension` that represents the - desired height for this container. - """ - - @abstractmethod - def write_to_screen( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - """ - Write the actual content to the screen. - - :param screen: :class:`~prompt_toolkit.layout.screen.Screen` - :param mouse_handlers: :class:`~prompt_toolkit.layout.mouse_handlers.MouseHandlers`. - :param parent_style: Style string to pass to the :class:`.Window` - object. This will be applied to all content of the windows. - :class:`.VSplit` and :class:`.HSplit` can use it to pass their - style down to the windows that they contain. - :param z_index: Used for propagating z_index from parent to child. - """ - - def is_modal(self) -> bool: - """ - When this container is modal, key bindings from parent containers are - not taken into account if a user control in this container is focused. - """ - return False - - def get_key_bindings(self) -> KeyBindingsBase | None: - """ - Returns a :class:`.KeyBindings` object. These bindings become active when any - user control in this container has the focus, except if any containers - between this container and the focused user control is modal. - """ - return None - - @abstractmethod - def get_children(self) -> list[Container]: - """ - Return the list of child :class:`.Container` objects. - """ - return [] - - -if TYPE_CHECKING: - - class MagicContainer(Protocol): - """ - Any object that implements ``__pt_container__`` represents a container. - """ - - def __pt_container__(self) -> AnyContainer: ... - - -AnyContainer = Union[Container, "MagicContainer"] - - -def _window_too_small() -> Window: - "Create a `Window` that displays the 'Window too small' text." - return Window( - FormattedTextControl(text=[("class:window-too-small", " Window too small... ")]) - ) - - -class VerticalAlign(Enum): - "Alignment for `HSplit`." - - TOP = "TOP" - CENTER = "CENTER" - BOTTOM = "BOTTOM" - JUSTIFY = "JUSTIFY" - - -class HorizontalAlign(Enum): - "Alignment for `VSplit`." - - LEFT = "LEFT" - CENTER = "CENTER" - RIGHT = "RIGHT" - JUSTIFY = "JUSTIFY" - - -class _Split(Container): - """ - The common parts of `VSplit` and `HSplit`. - """ - - def __init__( - self, - children: Sequence[AnyContainer], - window_too_small: Container | None = None, - padding: AnyDimension = Dimension.exact(0), - padding_char: str | None = None, - padding_style: str = "", - width: AnyDimension = None, - height: AnyDimension = None, - z_index: int | None = None, - modal: bool = False, - key_bindings: KeyBindingsBase | None = None, - style: str | Callable[[], str] = "", - ) -> None: - self.children = [to_container(c) for c in children] - self.window_too_small = window_too_small or _window_too_small() - self.padding = padding - self.padding_char = padding_char - self.padding_style = padding_style - - self.width = width - self.height = height - self.z_index = z_index - - self.modal = modal - self.key_bindings = key_bindings - self.style = style - - def is_modal(self) -> bool: - return self.modal - - def get_key_bindings(self) -> KeyBindingsBase | None: - return self.key_bindings - - def get_children(self) -> list[Container]: - return self.children - - -class HSplit(_Split): - """ - Several layouts, one stacked above/under the other. :: - - +--------------------+ - | | - +--------------------+ - | | - +--------------------+ - - By default, this doesn't display a horizontal line between the children, - but if this is something you need, then create a HSplit as follows:: - - HSplit(children=[ ... ], padding_char='-', - padding=1, padding_style='#ffff00') - - :param children: List of child :class:`.Container` objects. - :param window_too_small: A :class:`.Container` object that is displayed if - there is not enough space for all the children. By default, this is a - "Window too small" message. - :param align: `VerticalAlign` value. - :param width: When given, use this width instead of looking at the children. - :param height: When given, use this height instead of looking at the children. - :param z_index: (int or None) When specified, this can be used to bring - element in front of floating elements. `None` means: inherit from parent. - :param style: A style string. - :param modal: ``True`` or ``False``. - :param key_bindings: ``None`` or a :class:`.KeyBindings` object. - - :param padding: (`Dimension` or int), size to be used for the padding. - :param padding_char: Character to be used for filling in the padding. - :param padding_style: Style to applied to the padding. - """ - - def __init__( - self, - children: Sequence[AnyContainer], - window_too_small: Container | None = None, - align: VerticalAlign = VerticalAlign.JUSTIFY, - padding: AnyDimension = 0, - padding_char: str | None = None, - padding_style: str = "", - width: AnyDimension = None, - height: AnyDimension = None, - z_index: int | None = None, - modal: bool = False, - key_bindings: KeyBindingsBase | None = None, - style: str | Callable[[], str] = "", - ) -> None: - super().__init__( - children=children, - window_too_small=window_too_small, - padding=padding, - padding_char=padding_char, - padding_style=padding_style, - width=width, - height=height, - z_index=z_index, - modal=modal, - key_bindings=key_bindings, - style=style, - ) - - self.align = align - - self._children_cache: SimpleCache[tuple[Container, ...], list[Container]] = ( - SimpleCache(maxsize=1) - ) - self._remaining_space_window = Window() # Dummy window. - - def preferred_width(self, max_available_width: int) -> Dimension: - if self.width is not None: - return to_dimension(self.width) - - if self.children: - dimensions = [c.preferred_width(max_available_width) for c in self.children] - return max_layout_dimensions(dimensions) - else: - return Dimension() - - def preferred_height(self, width: int, max_available_height: int) -> Dimension: - if self.height is not None: - return to_dimension(self.height) - - dimensions = [ - c.preferred_height(width, max_available_height) for c in self._all_children - ] - return sum_layout_dimensions(dimensions) - - def reset(self) -> None: - for c in self.children: - c.reset() - - @property - def _all_children(self) -> list[Container]: - """ - List of child objects, including padding. - """ - - def get() -> list[Container]: - result: list[Container] = [] - - # Padding Top. - if self.align in (VerticalAlign.CENTER, VerticalAlign.BOTTOM): - result.append(Window(width=Dimension(preferred=0))) - - # The children with padding. - for child in self.children: - result.append(child) - result.append( - Window( - height=self.padding, - char=self.padding_char, - style=self.padding_style, - ) - ) - if result: - result.pop() - - # Padding right. - if self.align in (VerticalAlign.CENTER, VerticalAlign.TOP): - result.append(Window(width=Dimension(preferred=0))) - - return result - - return self._children_cache.get(tuple(self.children), get) - - def write_to_screen( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - """ - Render the prompt to a `Screen` instance. - - :param screen: The :class:`~prompt_toolkit.layout.screen.Screen` class - to which the output has to be written. - """ - sizes = self._divide_heights(write_position) - style = parent_style + " " + to_str(self.style) - z_index = z_index if self.z_index is None else self.z_index - - if sizes is None: - self.window_too_small.write_to_screen( - screen, mouse_handlers, write_position, style, erase_bg, z_index - ) - else: - # - ypos = write_position.ypos - xpos = write_position.xpos - width = write_position.width - - # Draw child panes. - for s, c in zip(sizes, self._all_children): - c.write_to_screen( - screen, - mouse_handlers, - WritePosition(xpos, ypos, width, s), - style, - erase_bg, - z_index, - ) - ypos += s - - # Fill in the remaining space. This happens when a child control - # refuses to take more space and we don't have any padding. Adding a - # dummy child control for this (in `self._all_children`) is not - # desired, because in some situations, it would take more space, even - # when it's not required. This is required to apply the styling. - remaining_height = write_position.ypos + write_position.height - ypos - if remaining_height > 0: - self._remaining_space_window.write_to_screen( - screen, - mouse_handlers, - WritePosition(xpos, ypos, width, remaining_height), - style, - erase_bg, - z_index, - ) - - def _divide_heights(self, write_position: WritePosition) -> list[int] | None: - """ - Return the heights for all rows. - Or None when there is not enough space. - """ - if not self.children: - return [] - - width = write_position.width - height = write_position.height - - # Calculate heights. - dimensions = [c.preferred_height(width, height) for c in self._all_children] - - # Sum dimensions - sum_dimensions = sum_layout_dimensions(dimensions) - - # If there is not enough space for both. - # Don't do anything. - if sum_dimensions.min > height: - return None - - # Find optimal sizes. (Start with minimal size, increase until we cover - # the whole height.) - sizes = [d.min for d in dimensions] - - child_generator = take_using_weights( - items=list(range(len(dimensions))), weights=[d.weight for d in dimensions] - ) - - i = next(child_generator) - - # Increase until we meet at least the 'preferred' size. - preferred_stop = min(height, sum_dimensions.preferred) - preferred_dimensions = [d.preferred for d in dimensions] - - while sum(sizes) < preferred_stop: - if sizes[i] < preferred_dimensions[i]: - sizes[i] += 1 - i = next(child_generator) - - # Increase until we use all the available space. (or until "max") - if not get_app().is_done: - max_stop = min(height, sum_dimensions.max) - max_dimensions = [d.max for d in dimensions] - - while sum(sizes) < max_stop: - if sizes[i] < max_dimensions[i]: - sizes[i] += 1 - i = next(child_generator) - - return sizes - - -class VSplit(_Split): - """ - Several layouts, one stacked left/right of the other. :: - - +---------+----------+ - | | | - | | | - +---------+----------+ - - By default, this doesn't display a vertical line between the children, but - if this is something you need, then create a HSplit as follows:: - - VSplit(children=[ ... ], padding_char='|', - padding=1, padding_style='#ffff00') - - :param children: List of child :class:`.Container` objects. - :param window_too_small: A :class:`.Container` object that is displayed if - there is not enough space for all the children. By default, this is a - "Window too small" message. - :param align: `HorizontalAlign` value. - :param width: When given, use this width instead of looking at the children. - :param height: When given, use this height instead of looking at the children. - :param z_index: (int or None) When specified, this can be used to bring - element in front of floating elements. `None` means: inherit from parent. - :param style: A style string. - :param modal: ``True`` or ``False``. - :param key_bindings: ``None`` or a :class:`.KeyBindings` object. - - :param padding: (`Dimension` or int), size to be used for the padding. - :param padding_char: Character to be used for filling in the padding. - :param padding_style: Style to applied to the padding. - """ - - def __init__( - self, - children: Sequence[AnyContainer], - window_too_small: Container | None = None, - align: HorizontalAlign = HorizontalAlign.JUSTIFY, - padding: AnyDimension = 0, - padding_char: str | None = None, - padding_style: str = "", - width: AnyDimension = None, - height: AnyDimension = None, - z_index: int | None = None, - modal: bool = False, - key_bindings: KeyBindingsBase | None = None, - style: str | Callable[[], str] = "", - ) -> None: - super().__init__( - children=children, - window_too_small=window_too_small, - padding=padding, - padding_char=padding_char, - padding_style=padding_style, - width=width, - height=height, - z_index=z_index, - modal=modal, - key_bindings=key_bindings, - style=style, - ) - - self.align = align - - self._children_cache: SimpleCache[tuple[Container, ...], list[Container]] = ( - SimpleCache(maxsize=1) - ) - self._remaining_space_window = Window() # Dummy window. - - def preferred_width(self, max_available_width: int) -> Dimension: - if self.width is not None: - return to_dimension(self.width) - - dimensions = [ - c.preferred_width(max_available_width) for c in self._all_children - ] - - return sum_layout_dimensions(dimensions) - - def preferred_height(self, width: int, max_available_height: int) -> Dimension: - if self.height is not None: - return to_dimension(self.height) - - # At the point where we want to calculate the heights, the widths have - # already been decided. So we can trust `width` to be the actual - # `width` that's going to be used for the rendering. So, - # `divide_widths` is supposed to use all of the available width. - # Using only the `preferred` width caused a bug where the reported - # height was more than required. (we had a `BufferControl` which did - # wrap lines because of the smaller width returned by `_divide_widths`. - - sizes = self._divide_widths(width) - children = self._all_children - - if sizes is None: - return Dimension() - else: - dimensions = [ - c.preferred_height(s, max_available_height) - for s, c in zip(sizes, children) - ] - return max_layout_dimensions(dimensions) - - def reset(self) -> None: - for c in self.children: - c.reset() - - @property - def _all_children(self) -> list[Container]: - """ - List of child objects, including padding. - """ - - def get() -> list[Container]: - result: list[Container] = [] - - # Padding left. - if self.align in (HorizontalAlign.CENTER, HorizontalAlign.RIGHT): - result.append(Window(width=Dimension(preferred=0))) - - # The children with padding. - for child in self.children: - result.append(child) - result.append( - Window( - width=self.padding, - char=self.padding_char, - style=self.padding_style, - ) - ) - if result: - result.pop() - - # Padding right. - if self.align in (HorizontalAlign.CENTER, HorizontalAlign.LEFT): - result.append(Window(width=Dimension(preferred=0))) - - return result - - return self._children_cache.get(tuple(self.children), get) - - def _divide_widths(self, width: int) -> list[int] | None: - """ - Return the widths for all columns. - Or None when there is not enough space. - """ - children = self._all_children - - if not children: - return [] - - # Calculate widths. - dimensions = [c.preferred_width(width) for c in children] - preferred_dimensions = [d.preferred for d in dimensions] - - # Sum dimensions - sum_dimensions = sum_layout_dimensions(dimensions) - - # If there is not enough space for both. - # Don't do anything. - if sum_dimensions.min > width: - return None - - # Find optimal sizes. (Start with minimal size, increase until we cover - # the whole width.) - sizes = [d.min for d in dimensions] - - child_generator = take_using_weights( - items=list(range(len(dimensions))), weights=[d.weight for d in dimensions] - ) - - i = next(child_generator) - - # Increase until we meet at least the 'preferred' size. - preferred_stop = min(width, sum_dimensions.preferred) - - while sum(sizes) < preferred_stop: - if sizes[i] < preferred_dimensions[i]: - sizes[i] += 1 - i = next(child_generator) - - # Increase until we use all the available space. - max_dimensions = [d.max for d in dimensions] - max_stop = min(width, sum_dimensions.max) - - while sum(sizes) < max_stop: - if sizes[i] < max_dimensions[i]: - sizes[i] += 1 - i = next(child_generator) - - return sizes - - def write_to_screen( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - """ - Render the prompt to a `Screen` instance. - - :param screen: The :class:`~prompt_toolkit.layout.screen.Screen` class - to which the output has to be written. - """ - if not self.children: - return - - children = self._all_children - sizes = self._divide_widths(write_position.width) - style = parent_style + " " + to_str(self.style) - z_index = z_index if self.z_index is None else self.z_index - - # If there is not enough space. - if sizes is None: - self.window_too_small.write_to_screen( - screen, mouse_handlers, write_position, style, erase_bg, z_index - ) - return - - # Calculate heights, take the largest possible, but not larger than - # write_position.height. - heights = [ - child.preferred_height(width, write_position.height).preferred - for width, child in zip(sizes, children) - ] - height = max(write_position.height, min(write_position.height, max(heights))) - - # - ypos = write_position.ypos - xpos = write_position.xpos - - # Draw all child panes. - for s, c in zip(sizes, children): - c.write_to_screen( - screen, - mouse_handlers, - WritePosition(xpos, ypos, s, height), - style, - erase_bg, - z_index, - ) - xpos += s - - # Fill in the remaining space. This happens when a child control - # refuses to take more space and we don't have any padding. Adding a - # dummy child control for this (in `self._all_children`) is not - # desired, because in some situations, it would take more space, even - # when it's not required. This is required to apply the styling. - remaining_width = write_position.xpos + write_position.width - xpos - if remaining_width > 0: - self._remaining_space_window.write_to_screen( - screen, - mouse_handlers, - WritePosition(xpos, ypos, remaining_width, height), - style, - erase_bg, - z_index, - ) - - -class FloatContainer(Container): - """ - Container which can contain another container for the background, as well - as a list of floating containers on top of it. - - Example Usage:: - - FloatContainer(content=Window(...), - floats=[ - Float(xcursor=True, - ycursor=True, - content=CompletionsMenu(...)) - ]) - - :param z_index: (int or None) When specified, this can be used to bring - element in front of floating elements. `None` means: inherit from parent. - This is the z_index for the whole `Float` container as a whole. - """ - - def __init__( - self, - content: AnyContainer, - floats: list[Float], - modal: bool = False, - key_bindings: KeyBindingsBase | None = None, - style: str | Callable[[], str] = "", - z_index: int | None = None, - ) -> None: - self.content = to_container(content) - self.floats = floats - - self.modal = modal - self.key_bindings = key_bindings - self.style = style - self.z_index = z_index - - def reset(self) -> None: - self.content.reset() - - for f in self.floats: - f.content.reset() - - def preferred_width(self, max_available_width: int) -> Dimension: - return self.content.preferred_width(max_available_width) - - def preferred_height(self, width: int, max_available_height: int) -> Dimension: - """ - Return the preferred height of the float container. - (We don't care about the height of the floats, they should always fit - into the dimensions provided by the container.) - """ - return self.content.preferred_height(width, max_available_height) - - def write_to_screen( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - style = parent_style + " " + to_str(self.style) - z_index = z_index if self.z_index is None else self.z_index - - self.content.write_to_screen( - screen, mouse_handlers, write_position, style, erase_bg, z_index - ) - - for number, fl in enumerate(self.floats): - # z_index of a Float is computed by summing the z_index of the - # container and the `Float`. - new_z_index = (z_index or 0) + fl.z_index - style = parent_style + " " + to_str(self.style) - - # If the float that we have here, is positioned relative to the - # cursor position, but the Window that specifies the cursor - # position is not drawn yet, because it's a Float itself, we have - # to postpone this calculation. (This is a work-around, but good - # enough for now.) - postpone = fl.xcursor is not None or fl.ycursor is not None - - if postpone: - new_z_index = ( - number + 10**8 - ) # Draw as late as possible, but keep the order. - screen.draw_with_z_index( - z_index=new_z_index, - draw_func=partial( - self._draw_float, - fl, - screen, - mouse_handlers, - write_position, - style, - erase_bg, - new_z_index, - ), - ) - else: - self._draw_float( - fl, - screen, - mouse_handlers, - write_position, - style, - erase_bg, - new_z_index, - ) - - def _draw_float( - self, - fl: Float, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - "Draw a single Float." - # When a menu_position was given, use this instead of the cursor - # position. (These cursor positions are absolute, translate again - # relative to the write_position.) - # Note: This should be inside the for-loop, because one float could - # set the cursor position to be used for the next one. - cpos = screen.get_menu_position( - fl.attach_to_window or get_app().layout.current_window - ) - cursor_position = Point( - x=cpos.x - write_position.xpos, y=cpos.y - write_position.ypos - ) - - fl_width = fl.get_width() - fl_height = fl.get_height() - width: int - height: int - xpos: int - ypos: int - - # Left & width given. - if fl.left is not None and fl_width is not None: - xpos = fl.left - width = fl_width - # Left & right given -> calculate width. - elif fl.left is not None and fl.right is not None: - xpos = fl.left - width = write_position.width - fl.left - fl.right - # Width & right given -> calculate left. - elif fl_width is not None and fl.right is not None: - xpos = write_position.width - fl.right - fl_width - width = fl_width - # Near x position of cursor. - elif fl.xcursor: - if fl_width is None: - width = fl.content.preferred_width(write_position.width).preferred - width = min(write_position.width, width) - else: - width = fl_width - - xpos = cursor_position.x - if xpos + width > write_position.width: - xpos = max(0, write_position.width - width) - # Only width given -> center horizontally. - elif fl_width: - xpos = int((write_position.width - fl_width) / 2) - width = fl_width - # Otherwise, take preferred width from float content. - else: - width = fl.content.preferred_width(write_position.width).preferred - - if fl.left is not None: - xpos = fl.left - elif fl.right is not None: - xpos = max(0, write_position.width - width - fl.right) - else: # Center horizontally. - xpos = max(0, int((write_position.width - width) / 2)) - - # Trim. - width = min(width, write_position.width - xpos) - - # Top & height given. - if fl.top is not None and fl_height is not None: - ypos = fl.top - height = fl_height - # Top & bottom given -> calculate height. - elif fl.top is not None and fl.bottom is not None: - ypos = fl.top - height = write_position.height - fl.top - fl.bottom - # Height & bottom given -> calculate top. - elif fl_height is not None and fl.bottom is not None: - ypos = write_position.height - fl_height - fl.bottom - height = fl_height - # Near cursor. - elif fl.ycursor: - ypos = cursor_position.y + (0 if fl.allow_cover_cursor else 1) - - if fl_height is None: - height = fl.content.preferred_height( - width, write_position.height - ).preferred - else: - height = fl_height - - # Reduce height if not enough space. (We can use the height - # when the content requires it.) - if height > write_position.height - ypos: - if write_position.height - ypos + 1 >= ypos: - # When the space below the cursor is more than - # the space above, just reduce the height. - height = write_position.height - ypos - else: - # Otherwise, fit the float above the cursor. - height = min(height, cursor_position.y) - ypos = cursor_position.y - height - - # Only height given -> center vertically. - elif fl_height: - ypos = int((write_position.height - fl_height) / 2) - height = fl_height - # Otherwise, take preferred height from content. - else: - height = fl.content.preferred_height(width, write_position.height).preferred - - if fl.top is not None: - ypos = fl.top - elif fl.bottom is not None: - ypos = max(0, write_position.height - height - fl.bottom) - else: # Center vertically. - ypos = max(0, int((write_position.height - height) / 2)) - - # Trim. - height = min(height, write_position.height - ypos) - - # Write float. - # (xpos and ypos can be negative: a float can be partially visible.) - if height > 0 and width > 0: - wp = WritePosition( - xpos=xpos + write_position.xpos, - ypos=ypos + write_position.ypos, - width=width, - height=height, - ) - - if not fl.hide_when_covering_content or self._area_is_empty(screen, wp): - fl.content.write_to_screen( - screen, - mouse_handlers, - wp, - style, - erase_bg=not fl.transparent(), - z_index=z_index, - ) - - def _area_is_empty(self, screen: Screen, write_position: WritePosition) -> bool: - """ - Return True when the area below the write position is still empty. - (For floats that should not hide content underneath.) - """ - wp = write_position - - for y in range(wp.ypos, wp.ypos + wp.height): - if y in screen.data_buffer: - row = screen.data_buffer[y] - - for x in range(wp.xpos, wp.xpos + wp.width): - c = row[x] - if c.char != " ": - return False - - return True - - def is_modal(self) -> bool: - return self.modal - - def get_key_bindings(self) -> KeyBindingsBase | None: - return self.key_bindings - - def get_children(self) -> list[Container]: - children = [self.content] - children.extend(f.content for f in self.floats) - return children - - -class Float: - """ - Float for use in a :class:`.FloatContainer`. - Except for the `content` parameter, all other options are optional. - - :param content: :class:`.Container` instance. - - :param width: :class:`.Dimension` or callable which returns a :class:`.Dimension`. - :param height: :class:`.Dimension` or callable which returns a :class:`.Dimension`. - - :param left: Distance to the left edge of the :class:`.FloatContainer`. - :param right: Distance to the right edge of the :class:`.FloatContainer`. - :param top: Distance to the top of the :class:`.FloatContainer`. - :param bottom: Distance to the bottom of the :class:`.FloatContainer`. - - :param attach_to_window: Attach to the cursor from this window, instead of - the current window. - :param hide_when_covering_content: Hide the float when it covers content underneath. - :param allow_cover_cursor: When `False`, make sure to display the float - below the cursor. Not on top of the indicated position. - :param z_index: Z-index position. For a Float, this needs to be at least - one. It is relative to the z_index of the parent container. - :param transparent: :class:`.Filter` indicating whether this float needs to be - drawn transparently. - """ - - def __init__( - self, - content: AnyContainer, - top: int | None = None, - right: int | None = None, - bottom: int | None = None, - left: int | None = None, - width: int | Callable[[], int] | None = None, - height: int | Callable[[], int] | None = None, - xcursor: bool = False, - ycursor: bool = False, - attach_to_window: AnyContainer | None = None, - hide_when_covering_content: bool = False, - allow_cover_cursor: bool = False, - z_index: int = 1, - transparent: bool = False, - ) -> None: - assert z_index >= 1 - - self.left = left - self.right = right - self.top = top - self.bottom = bottom - - self.width = width - self.height = height - - self.xcursor = xcursor - self.ycursor = ycursor - - self.attach_to_window = ( - to_window(attach_to_window) if attach_to_window else None - ) - - self.content = to_container(content) - self.hide_when_covering_content = hide_when_covering_content - self.allow_cover_cursor = allow_cover_cursor - self.z_index = z_index - self.transparent = to_filter(transparent) - - def get_width(self) -> int | None: - if callable(self.width): - return self.width() - return self.width - - def get_height(self) -> int | None: - if callable(self.height): - return self.height() - return self.height - - def __repr__(self) -> str: - return f"Float(content={self.content!r})" - - -class WindowRenderInfo: - """ - Render information for the last render time of this control. - It stores mapping information between the input buffers (in case of a - :class:`~prompt_toolkit.layout.controls.BufferControl`) and the actual - render position on the output screen. - - (Could be used for implementation of the Vi 'H' and 'L' key bindings as - well as implementing mouse support.) - - :param ui_content: The original :class:`.UIContent` instance that contains - the whole input, without clipping. (ui_content) - :param horizontal_scroll: The horizontal scroll of the :class:`.Window` instance. - :param vertical_scroll: The vertical scroll of the :class:`.Window` instance. - :param window_width: The width of the window that displays the content, - without the margins. - :param window_height: The height of the window that displays the content. - :param configured_scroll_offsets: The scroll offsets as configured for the - :class:`Window` instance. - :param visible_line_to_row_col: Mapping that maps the row numbers on the - displayed screen (starting from zero for the first visible line) to - (row, col) tuples pointing to the row and column of the :class:`.UIContent`. - :param rowcol_to_yx: Mapping that maps (row, column) tuples representing - coordinates of the :class:`UIContent` to (y, x) absolute coordinates at - the rendered screen. - """ - - def __init__( - self, - window: Window, - ui_content: UIContent, - horizontal_scroll: int, - vertical_scroll: int, - window_width: int, - window_height: int, - configured_scroll_offsets: ScrollOffsets, - visible_line_to_row_col: dict[int, tuple[int, int]], - rowcol_to_yx: dict[tuple[int, int], tuple[int, int]], - x_offset: int, - y_offset: int, - wrap_lines: bool, - ) -> None: - self.window = window - self.ui_content = ui_content - self.vertical_scroll = vertical_scroll - self.window_width = window_width # Width without margins. - self.window_height = window_height - - self.configured_scroll_offsets = configured_scroll_offsets - self.visible_line_to_row_col = visible_line_to_row_col - self.wrap_lines = wrap_lines - - self._rowcol_to_yx = rowcol_to_yx # row/col from input to absolute y/x - # screen coordinates. - self._x_offset = x_offset - self._y_offset = y_offset - - @property - def visible_line_to_input_line(self) -> dict[int, int]: - return { - visible_line: rowcol[0] - for visible_line, rowcol in self.visible_line_to_row_col.items() - } - - @property - def cursor_position(self) -> Point: - """ - Return the cursor position coordinates, relative to the left/top corner - of the rendered screen. - """ - cpos = self.ui_content.cursor_position - try: - y, x = self._rowcol_to_yx[cpos.y, cpos.x] - except KeyError: - # For `DummyControl` for instance, the content can be empty, and so - # will `_rowcol_to_yx` be. Return 0/0 by default. - return Point(x=0, y=0) - else: - return Point(x=x - self._x_offset, y=y - self._y_offset) - - @property - def applied_scroll_offsets(self) -> ScrollOffsets: - """ - Return a :class:`.ScrollOffsets` instance that indicates the actual - offset. This can be less than or equal to what's configured. E.g, when - the cursor is completely at the top, the top offset will be zero rather - than what's configured. - """ - if self.displayed_lines[0] == 0: - top = 0 - else: - # Get row where the cursor is displayed. - y = self.input_line_to_visible_line[self.ui_content.cursor_position.y] - top = min(y, self.configured_scroll_offsets.top) - - return ScrollOffsets( - top=top, - bottom=min( - self.ui_content.line_count - self.displayed_lines[-1] - 1, - self.configured_scroll_offsets.bottom, - ), - # For left/right, it probably doesn't make sense to return something. - # (We would have to calculate the widths of all the lines and keep - # double width characters in mind.) - left=0, - right=0, - ) - - @property - def displayed_lines(self) -> list[int]: - """ - List of all the visible rows. (Line numbers of the input buffer.) - The last line may not be entirely visible. - """ - return sorted(row for row, col in self.visible_line_to_row_col.values()) - - @property - def input_line_to_visible_line(self) -> dict[int, int]: - """ - Return the dictionary mapping the line numbers of the input buffer to - the lines of the screen. When a line spans several rows at the screen, - the first row appears in the dictionary. - """ - result: dict[int, int] = {} - for k, v in self.visible_line_to_input_line.items(): - if v in result: - result[v] = min(result[v], k) - else: - result[v] = k - return result - - def first_visible_line(self, after_scroll_offset: bool = False) -> int: - """ - Return the line number (0 based) of the input document that corresponds - with the first visible line. - """ - if after_scroll_offset: - return self.displayed_lines[self.applied_scroll_offsets.top] - else: - return self.displayed_lines[0] - - def last_visible_line(self, before_scroll_offset: bool = False) -> int: - """ - Like `first_visible_line`, but for the last visible line. - """ - if before_scroll_offset: - return self.displayed_lines[-1 - self.applied_scroll_offsets.bottom] - else: - return self.displayed_lines[-1] - - def center_visible_line( - self, before_scroll_offset: bool = False, after_scroll_offset: bool = False - ) -> int: - """ - Like `first_visible_line`, but for the center visible line. - """ - return ( - self.first_visible_line(after_scroll_offset) - + ( - self.last_visible_line(before_scroll_offset) - - self.first_visible_line(after_scroll_offset) - ) - // 2 - ) - - @property - def content_height(self) -> int: - """ - The full height of the user control. - """ - return self.ui_content.line_count - - @property - def full_height_visible(self) -> bool: - """ - True when the full height is visible (There is no vertical scroll.) - """ - return ( - self.vertical_scroll == 0 - and self.last_visible_line() == self.content_height - ) - - @property - def top_visible(self) -> bool: - """ - True when the top of the buffer is visible. - """ - return self.vertical_scroll == 0 - - @property - def bottom_visible(self) -> bool: - """ - True when the bottom of the buffer is visible. - """ - return self.last_visible_line() == self.content_height - 1 - - @property - def vertical_scroll_percentage(self) -> int: - """ - Vertical scroll as a percentage. (0 means: the top is visible, - 100 means: the bottom is visible.) - """ - if self.bottom_visible: - return 100 - else: - return 100 * self.vertical_scroll // self.content_height - - def get_height_for_line(self, lineno: int) -> int: - """ - Return the height of the given line. - (The height that it would take, if this line became visible.) - """ - if self.wrap_lines: - return self.ui_content.get_height_for_line( - lineno, self.window_width, self.window.get_line_prefix - ) - else: - return 1 - - -class ScrollOffsets: - """ - Scroll offsets for the :class:`.Window` class. - - Note that left/right offsets only make sense if line wrapping is disabled. - """ - - def __init__( - self, - top: int | Callable[[], int] = 0, - bottom: int | Callable[[], int] = 0, - left: int | Callable[[], int] = 0, - right: int | Callable[[], int] = 0, - ) -> None: - self._top = top - self._bottom = bottom - self._left = left - self._right = right - - @property - def top(self) -> int: - return to_int(self._top) - - @property - def bottom(self) -> int: - return to_int(self._bottom) - - @property - def left(self) -> int: - return to_int(self._left) - - @property - def right(self) -> int: - return to_int(self._right) - - def __repr__(self) -> str: - return f"ScrollOffsets(top={self._top!r}, bottom={self._bottom!r}, left={self._left!r}, right={self._right!r})" - - -class ColorColumn: - """ - Column for a :class:`.Window` to be colored. - """ - - def __init__(self, position: int, style: str = "class:color-column") -> None: - self.position = position - self.style = style - - -_in_insert_mode = vi_insert_mode | emacs_insert_mode - - -class WindowAlign(Enum): - """ - Alignment of the Window content. - - Note that this is different from `HorizontalAlign` and `VerticalAlign`, - which are used for the alignment of the child containers in respectively - `VSplit` and `HSplit`. - """ - - LEFT = "LEFT" - RIGHT = "RIGHT" - CENTER = "CENTER" - - -class Window(Container): - """ - Container that holds a control. - - :param content: :class:`.UIControl` instance. - :param width: :class:`.Dimension` instance or callable. - :param height: :class:`.Dimension` instance or callable. - :param z_index: When specified, this can be used to bring element in front - of floating elements. - :param dont_extend_width: When `True`, don't take up more width then the - preferred width reported by the control. - :param dont_extend_height: When `True`, don't take up more width then the - preferred height reported by the control. - :param ignore_content_width: A `bool` or :class:`.Filter` instance. Ignore - the :class:`.UIContent` width when calculating the dimensions. - :param ignore_content_height: A `bool` or :class:`.Filter` instance. Ignore - the :class:`.UIContent` height when calculating the dimensions. - :param left_margins: A list of :class:`.Margin` instance to be displayed on - the left. For instance: :class:`~prompt_toolkit.layout.NumberedMargin` - can be one of them in order to show line numbers. - :param right_margins: Like `left_margins`, but on the other side. - :param scroll_offsets: :class:`.ScrollOffsets` instance, representing the - preferred amount of lines/columns to be always visible before/after the - cursor. When both top and bottom are a very high number, the cursor - will be centered vertically most of the time. - :param allow_scroll_beyond_bottom: A `bool` or - :class:`.Filter` instance. When True, allow scrolling so far, that the - top part of the content is not visible anymore, while there is still - empty space available at the bottom of the window. In the Vi editor for - instance, this is possible. You will see tildes while the top part of - the body is hidden. - :param wrap_lines: A `bool` or :class:`.Filter` instance. When True, don't - scroll horizontally, but wrap lines instead. - :param get_vertical_scroll: Callable that takes this window - instance as input and returns a preferred vertical scroll. - (When this is `None`, the scroll is only determined by the last and - current cursor position.) - :param get_horizontal_scroll: Callable that takes this window - instance as input and returns a preferred vertical scroll. - :param always_hide_cursor: A `bool` or - :class:`.Filter` instance. When True, never display the cursor, even - when the user control specifies a cursor position. - :param cursorline: A `bool` or :class:`.Filter` instance. When True, - display a cursorline. - :param cursorcolumn: A `bool` or :class:`.Filter` instance. When True, - display a cursorcolumn. - :param colorcolumns: A list of :class:`.ColorColumn` instances that - describe the columns to be highlighted, or a callable that returns such - a list. - :param align: :class:`.WindowAlign` value or callable that returns an - :class:`.WindowAlign` value. alignment of content. - :param style: A style string. Style to be applied to all the cells in this - window. (This can be a callable that returns a string.) - :param char: (string) Character to be used for filling the background. This - can also be a callable that returns a character. - :param get_line_prefix: None or a callable that returns formatted text to - be inserted before a line. It takes a line number (int) and a - wrap_count and returns formatted text. This can be used for - implementation of line continuations, things like Vim "breakindent" and - so on. - """ - - def __init__( - self, - content: UIControl | None = None, - width: AnyDimension = None, - height: AnyDimension = None, - z_index: int | None = None, - dont_extend_width: FilterOrBool = False, - dont_extend_height: FilterOrBool = False, - ignore_content_width: FilterOrBool = False, - ignore_content_height: FilterOrBool = False, - left_margins: Sequence[Margin] | None = None, - right_margins: Sequence[Margin] | None = None, - scroll_offsets: ScrollOffsets | None = None, - allow_scroll_beyond_bottom: FilterOrBool = False, - wrap_lines: FilterOrBool = False, - get_vertical_scroll: Callable[[Window], int] | None = None, - get_horizontal_scroll: Callable[[Window], int] | None = None, - always_hide_cursor: FilterOrBool = False, - cursorline: FilterOrBool = False, - cursorcolumn: FilterOrBool = False, - colorcolumns: ( - None | list[ColorColumn] | Callable[[], list[ColorColumn]] - ) = None, - align: WindowAlign | Callable[[], WindowAlign] = WindowAlign.LEFT, - style: str | Callable[[], str] = "", - char: None | str | Callable[[], str] = None, - get_line_prefix: GetLinePrefixCallable | None = None, - ) -> None: - self.allow_scroll_beyond_bottom = to_filter(allow_scroll_beyond_bottom) - self.always_hide_cursor = to_filter(always_hide_cursor) - self.wrap_lines = to_filter(wrap_lines) - self.cursorline = to_filter(cursorline) - self.cursorcolumn = to_filter(cursorcolumn) - - self.content = content or DummyControl() - self.dont_extend_width = to_filter(dont_extend_width) - self.dont_extend_height = to_filter(dont_extend_height) - self.ignore_content_width = to_filter(ignore_content_width) - self.ignore_content_height = to_filter(ignore_content_height) - self.left_margins = left_margins or [] - self.right_margins = right_margins or [] - self.scroll_offsets = scroll_offsets or ScrollOffsets() - self.get_vertical_scroll = get_vertical_scroll - self.get_horizontal_scroll = get_horizontal_scroll - self.colorcolumns = colorcolumns or [] - self.align = align - self.style = style - self.char = char - self.get_line_prefix = get_line_prefix - - self.width = width - self.height = height - self.z_index = z_index - - # Cache for the screens generated by the margin. - self._ui_content_cache: SimpleCache[tuple[int, int, int], UIContent] = ( - SimpleCache(maxsize=8) - ) - self._margin_width_cache: SimpleCache[tuple[Margin, int], int] = SimpleCache( - maxsize=1 - ) - - self.reset() - - def __repr__(self) -> str: - return f"Window(content={self.content!r})" - - def reset(self) -> None: - self.content.reset() - - #: Scrolling position of the main content. - self.vertical_scroll = 0 - self.horizontal_scroll = 0 - - # Vertical scroll 2: this is the vertical offset that a line is - # scrolled if a single line (the one that contains the cursor) consumes - # all of the vertical space. - self.vertical_scroll_2 = 0 - - #: Keep render information (mappings between buffer input and render - #: output.) - self.render_info: WindowRenderInfo | None = None - - def _get_margin_width(self, margin: Margin) -> int: - """ - Return the width for this margin. - (Calculate only once per render time.) - """ - - # Margin.get_width, needs to have a UIContent instance. - def get_ui_content() -> UIContent: - return self._get_ui_content(width=0, height=0) - - def get_width() -> int: - return margin.get_width(get_ui_content) - - key = (margin, get_app().render_counter) - return self._margin_width_cache.get(key, get_width) - - def _get_total_margin_width(self) -> int: - """ - Calculate and return the width of the margin (left + right). - """ - return sum(self._get_margin_width(m) for m in self.left_margins) + sum( - self._get_margin_width(m) for m in self.right_margins - ) - - def preferred_width(self, max_available_width: int) -> Dimension: - """ - Calculate the preferred width for this window. - """ - - def preferred_content_width() -> int | None: - """Content width: is only calculated if no exact width for the - window was given.""" - if self.ignore_content_width(): - return None - - # Calculate the width of the margin. - total_margin_width = self._get_total_margin_width() - - # Window of the content. (Can be `None`.) - preferred_width = self.content.preferred_width( - max_available_width - total_margin_width - ) - - if preferred_width is not None: - # Include width of the margins. - preferred_width += total_margin_width - return preferred_width - - # Merge. - return self._merge_dimensions( - dimension=to_dimension(self.width), - get_preferred=preferred_content_width, - dont_extend=self.dont_extend_width(), - ) - - def preferred_height(self, width: int, max_available_height: int) -> Dimension: - """ - Calculate the preferred height for this window. - """ - - def preferred_content_height() -> int | None: - """Content height: is only calculated if no exact height for the - window was given.""" - if self.ignore_content_height(): - return None - - total_margin_width = self._get_total_margin_width() - wrap_lines = self.wrap_lines() - - return self.content.preferred_height( - width - total_margin_width, - max_available_height, - wrap_lines, - self.get_line_prefix, - ) - - return self._merge_dimensions( - dimension=to_dimension(self.height), - get_preferred=preferred_content_height, - dont_extend=self.dont_extend_height(), - ) - - @staticmethod - def _merge_dimensions( - dimension: Dimension | None, - get_preferred: Callable[[], int | None], - dont_extend: bool = False, - ) -> Dimension: - """ - Take the Dimension from this `Window` class and the received preferred - size from the `UIControl` and return a `Dimension` to report to the - parent container. - """ - dimension = dimension or Dimension() - - # When a preferred dimension was explicitly given to the Window, - # ignore the UIControl. - preferred: int | None - - if dimension.preferred_specified: - preferred = dimension.preferred - else: - # Otherwise, calculate the preferred dimension from the UI control - # content. - preferred = get_preferred() - - # When a 'preferred' dimension is given by the UIControl, make sure - # that it stays within the bounds of the Window. - if preferred is not None: - if dimension.max_specified: - preferred = min(preferred, dimension.max) - - if dimension.min_specified: - preferred = max(preferred, dimension.min) - - # When a `dont_extend` flag has been given, use the preferred dimension - # also as the max dimension. - max_: int | None - min_: int | None - - if dont_extend and preferred is not None: - max_ = min(dimension.max, preferred) - else: - max_ = dimension.max if dimension.max_specified else None - - min_ = dimension.min if dimension.min_specified else None - - return Dimension( - min=min_, max=max_, preferred=preferred, weight=dimension.weight - ) - - def _get_ui_content(self, width: int, height: int) -> UIContent: - """ - Create a `UIContent` instance. - """ - - def get_content() -> UIContent: - return self.content.create_content(width=width, height=height) - - key = (get_app().render_counter, width, height) - return self._ui_content_cache.get(key, get_content) - - def _get_digraph_char(self) -> str | None: - "Return `False`, or the Digraph symbol to be used." - app = get_app() - if app.quoted_insert: - return "^" - if app.vi_state.waiting_for_digraph: - if app.vi_state.digraph_symbol1: - return app.vi_state.digraph_symbol1 - return "?" - return None - - def write_to_screen( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - """ - Write window to screen. This renders the user control, the margins and - copies everything over to the absolute position at the given screen. - """ - # If dont_extend_width/height was given. Then reduce width/height in - # WritePosition if the parent wanted us to paint in a bigger area. - # (This happens if this window is bundled with another window in a - # HSplit/VSplit, but with different size requirements.) - write_position = WritePosition( - xpos=write_position.xpos, - ypos=write_position.ypos, - width=write_position.width, - height=write_position.height, - ) - - if self.dont_extend_width(): - write_position.width = min( - write_position.width, - self.preferred_width(write_position.width).preferred, - ) - - if self.dont_extend_height(): - write_position.height = min( - write_position.height, - self.preferred_height( - write_position.width, write_position.height - ).preferred, - ) - - # Draw - z_index = z_index if self.z_index is None else self.z_index - - draw_func = partial( - self._write_to_screen_at_index, - screen, - mouse_handlers, - write_position, - parent_style, - erase_bg, - ) - - if z_index is None or z_index <= 0: - # When no z_index is given, draw right away. - draw_func() - else: - # Otherwise, postpone. - screen.draw_with_z_index(z_index=z_index, draw_func=draw_func) - - def _write_to_screen_at_index( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - ) -> None: - # Don't bother writing invisible windows. - # (We save some time, but also avoid applying last-line styling.) - if write_position.height <= 0 or write_position.width <= 0: - return - - # Calculate margin sizes. - left_margin_widths = [self._get_margin_width(m) for m in self.left_margins] - right_margin_widths = [self._get_margin_width(m) for m in self.right_margins] - total_margin_width = sum(left_margin_widths + right_margin_widths) - - # Render UserControl. - ui_content = self.content.create_content( - write_position.width - total_margin_width, write_position.height - ) - assert isinstance(ui_content, UIContent) - - # Scroll content. - wrap_lines = self.wrap_lines() - self._scroll( - ui_content, write_position.width - total_margin_width, write_position.height - ) - - # Erase background and fill with `char`. - self._fill_bg(screen, write_position, erase_bg) - - # Resolve `align` attribute. - align = self.align() if callable(self.align) else self.align - - # Write body - visible_line_to_row_col, rowcol_to_yx = self._copy_body( - ui_content, - screen, - write_position, - sum(left_margin_widths), - write_position.width - total_margin_width, - self.vertical_scroll, - self.horizontal_scroll, - wrap_lines=wrap_lines, - highlight_lines=True, - vertical_scroll_2=self.vertical_scroll_2, - always_hide_cursor=self.always_hide_cursor(), - has_focus=get_app().layout.current_control == self.content, - align=align, - get_line_prefix=self.get_line_prefix, - ) - - # Remember render info. (Set before generating the margins. They need this.) - x_offset = write_position.xpos + sum(left_margin_widths) - y_offset = write_position.ypos - - render_info = WindowRenderInfo( - window=self, - ui_content=ui_content, - horizontal_scroll=self.horizontal_scroll, - vertical_scroll=self.vertical_scroll, - window_width=write_position.width - total_margin_width, - window_height=write_position.height, - configured_scroll_offsets=self.scroll_offsets, - visible_line_to_row_col=visible_line_to_row_col, - rowcol_to_yx=rowcol_to_yx, - x_offset=x_offset, - y_offset=y_offset, - wrap_lines=wrap_lines, - ) - self.render_info = render_info - - # Set mouse handlers. - def mouse_handler(mouse_event: MouseEvent) -> NotImplementedOrNone: - """ - Wrapper around the mouse_handler of the `UIControl` that turns - screen coordinates into line coordinates. - Returns `NotImplemented` if no UI invalidation should be done. - """ - # Don't handle mouse events outside of the current modal part of - # the UI. - if self not in get_app().layout.walk_through_modal_area(): - return NotImplemented - - # Find row/col position first. - yx_to_rowcol = {v: k for k, v in rowcol_to_yx.items()} - y = mouse_event.position.y - x = mouse_event.position.x - - # If clicked below the content area, look for a position in the - # last line instead. - max_y = write_position.ypos + len(visible_line_to_row_col) - 1 - y = min(max_y, y) - result: NotImplementedOrNone - - while x >= 0: - try: - row, col = yx_to_rowcol[y, x] - except KeyError: - # Try again. (When clicking on the right side of double - # width characters, or on the right side of the input.) - x -= 1 - else: - # Found position, call handler of UIControl. - result = self.content.mouse_handler( - MouseEvent( - position=Point(x=col, y=row), - event_type=mouse_event.event_type, - button=mouse_event.button, - modifiers=mouse_event.modifiers, - ) - ) - break - else: - # nobreak. - # (No x/y coordinate found for the content. This happens in - # case of a DummyControl, that does not have any content. - # Report (0,0) instead.) - result = self.content.mouse_handler( - MouseEvent( - position=Point(x=0, y=0), - event_type=mouse_event.event_type, - button=mouse_event.button, - modifiers=mouse_event.modifiers, - ) - ) - - # If it returns NotImplemented, handle it here. - if result == NotImplemented: - result = self._mouse_handler(mouse_event) - - return result - - mouse_handlers.set_mouse_handler_for_range( - x_min=write_position.xpos + sum(left_margin_widths), - x_max=write_position.xpos + write_position.width - total_margin_width, - y_min=write_position.ypos, - y_max=write_position.ypos + write_position.height, - handler=mouse_handler, - ) - - # Render and copy margins. - move_x = 0 - - def render_margin(m: Margin, width: int) -> UIContent: - "Render margin. Return `Screen`." - # Retrieve margin fragments. - fragments = m.create_margin(render_info, width, write_position.height) - - # Turn it into a UIContent object. - # already rendered those fragments using this size.) - return FormattedTextControl(fragments).create_content( - width + 1, write_position.height - ) - - for m, width in zip(self.left_margins, left_margin_widths): - if width > 0: # (ConditionalMargin returns a zero width. -- Don't render.) - # Create screen for margin. - margin_content = render_margin(m, width) - - # Copy and shift X. - self._copy_margin(margin_content, screen, write_position, move_x, width) - move_x += width - - move_x = write_position.width - sum(right_margin_widths) - - for m, width in zip(self.right_margins, right_margin_widths): - # Create screen for margin. - margin_content = render_margin(m, width) - - # Copy and shift X. - self._copy_margin(margin_content, screen, write_position, move_x, width) - move_x += width - - # Apply 'self.style' - self._apply_style(screen, write_position, parent_style) - - # Tell the screen that this user control has been painted at this - # position. - screen.visible_windows_to_write_positions[self] = write_position - - def _copy_body( - self, - ui_content: UIContent, - new_screen: Screen, - write_position: WritePosition, - move_x: int, - width: int, - vertical_scroll: int = 0, - horizontal_scroll: int = 0, - wrap_lines: bool = False, - highlight_lines: bool = False, - vertical_scroll_2: int = 0, - always_hide_cursor: bool = False, - has_focus: bool = False, - align: WindowAlign = WindowAlign.LEFT, - get_line_prefix: Callable[[int, int], AnyFormattedText] | None = None, - ) -> tuple[dict[int, tuple[int, int]], dict[tuple[int, int], tuple[int, int]]]: - """ - Copy the UIContent into the output screen. - Return (visible_line_to_row_col, rowcol_to_yx) tuple. - - :param get_line_prefix: None or a callable that takes a line number - (int) and a wrap_count (int) and returns formatted text. - """ - xpos = write_position.xpos + move_x - ypos = write_position.ypos - line_count = ui_content.line_count - new_buffer = new_screen.data_buffer - empty_char = _CHAR_CACHE["", ""] - - # Map visible line number to (row, col) of input. - # 'col' will always be zero if line wrapping is off. - visible_line_to_row_col: dict[int, tuple[int, int]] = {} - - # Maps (row, col) from the input to (y, x) screen coordinates. - rowcol_to_yx: dict[tuple[int, int], tuple[int, int]] = {} - - def copy_line( - line: StyleAndTextTuples, - lineno: int, - x: int, - y: int, - is_input: bool = False, - ) -> tuple[int, int]: - """ - Copy over a single line to the output screen. This can wrap over - multiple lines in the output. It will call the prefix (prompt) - function before every line. - """ - if is_input: - current_rowcol_to_yx = rowcol_to_yx - else: - current_rowcol_to_yx = {} # Throwaway dictionary. - - # Draw line prefix. - if is_input and get_line_prefix: - prompt = to_formatted_text(get_line_prefix(lineno, 0)) - x, y = copy_line(prompt, lineno, x, y, is_input=False) - - # Scroll horizontally. - skipped = 0 # Characters skipped because of horizontal scrolling. - if horizontal_scroll and is_input: - h_scroll = horizontal_scroll - line = explode_text_fragments(line) - while h_scroll > 0 and line: - h_scroll -= get_cwidth(line[0][1]) - skipped += 1 - del line[:1] # Remove first character. - - x -= h_scroll # When scrolling over double width character, - # this can end up being negative. - - # Align this line. (Note that this doesn't work well when we use - # get_line_prefix and that function returns variable width prefixes.) - if align == WindowAlign.CENTER: - line_width = fragment_list_width(line) - if line_width < width: - x += (width - line_width) // 2 - elif align == WindowAlign.RIGHT: - line_width = fragment_list_width(line) - if line_width < width: - x += width - line_width - - col = 0 - wrap_count = 0 - for style, text, *_ in line: - new_buffer_row = new_buffer[y + ypos] - - # Remember raw VT escape sequences. (E.g. FinalTerm's - # escape sequences.) - if "[ZeroWidthEscape]" in style: - new_screen.zero_width_escapes[y + ypos][x + xpos] += text - continue - - for c in text: - char = _CHAR_CACHE[c, style] - char_width = char.width - - # Wrap when the line width is exceeded. - if wrap_lines and x + char_width > width: - visible_line_to_row_col[y + 1] = ( - lineno, - visible_line_to_row_col[y][1] + x, - ) - y += 1 - wrap_count += 1 - x = 0 - - # Insert line prefix (continuation prompt). - if is_input and get_line_prefix: - prompt = to_formatted_text( - get_line_prefix(lineno, wrap_count) - ) - x, y = copy_line(prompt, lineno, x, y, is_input=False) - - new_buffer_row = new_buffer[y + ypos] - - if y >= write_position.height: - return x, y # Break out of all for loops. - - # Set character in screen and shift 'x'. - if x >= 0 and y >= 0 and x < width: - new_buffer_row[x + xpos] = char - - # When we print a multi width character, make sure - # to erase the neighbors positions in the screen. - # (The empty string if different from everything, - # so next redraw this cell will repaint anyway.) - if char_width > 1: - for i in range(1, char_width): - new_buffer_row[x + xpos + i] = empty_char - - # If this is a zero width characters, then it's - # probably part of a decomposed unicode character. - # See: https://en.wikipedia.org/wiki/Unicode_equivalence - # Merge it in the previous cell. - elif char_width == 0: - # Handle all character widths. If the previous - # character is a multiwidth character, then - # merge it two positions back. - for pw in [2, 1]: # Previous character width. - if ( - x - pw >= 0 - and new_buffer_row[x + xpos - pw].width == pw - ): - prev_char = new_buffer_row[x + xpos - pw] - char2 = _CHAR_CACHE[ - prev_char.char + c, prev_char.style - ] - new_buffer_row[x + xpos - pw] = char2 - - # Keep track of write position for each character. - current_rowcol_to_yx[lineno, col + skipped] = ( - y + ypos, - x + xpos, - ) - - col += 1 - x += char_width - return x, y - - # Copy content. - def copy() -> int: - y = -vertical_scroll_2 - lineno = vertical_scroll - - while y < write_position.height and lineno < line_count: - # Take the next line and copy it in the real screen. - line = ui_content.get_line(lineno) - - visible_line_to_row_col[y] = (lineno, horizontal_scroll) - - # Copy margin and actual line. - x = 0 - x, y = copy_line(line, lineno, x, y, is_input=True) - - lineno += 1 - y += 1 - return y - - copy() - - def cursor_pos_to_screen_pos(row: int, col: int) -> Point: - "Translate row/col from UIContent to real Screen coordinates." - try: - y, x = rowcol_to_yx[row, col] - except KeyError: - # Normally this should never happen. (It is a bug, if it happens.) - # But to be sure, return (0, 0) - return Point(x=0, y=0) - - # raise ValueError( - # 'Invalid position. row=%r col=%r, vertical_scroll=%r, ' - # 'horizontal_scroll=%r, height=%r' % - # (row, col, vertical_scroll, horizontal_scroll, write_position.height)) - else: - return Point(x=x, y=y) - - # Set cursor and menu positions. - if ui_content.cursor_position: - screen_cursor_position = cursor_pos_to_screen_pos( - ui_content.cursor_position.y, ui_content.cursor_position.x - ) - - if has_focus: - new_screen.set_cursor_position(self, screen_cursor_position) - - if always_hide_cursor: - new_screen.show_cursor = False - else: - new_screen.show_cursor = ui_content.show_cursor - - self._highlight_digraph(new_screen) - - if highlight_lines: - self._highlight_cursorlines( - new_screen, - screen_cursor_position, - xpos, - ypos, - width, - write_position.height, - ) - - # Draw input characters from the input processor queue. - if has_focus and ui_content.cursor_position: - self._show_key_processor_key_buffer(new_screen) - - # Set menu position. - if ui_content.menu_position: - new_screen.set_menu_position( - self, - cursor_pos_to_screen_pos( - ui_content.menu_position.y, ui_content.menu_position.x - ), - ) - - # Update output screen height. - new_screen.height = max(new_screen.height, ypos + write_position.height) - - return visible_line_to_row_col, rowcol_to_yx - - def _fill_bg( - self, screen: Screen, write_position: WritePosition, erase_bg: bool - ) -> None: - """ - Erase/fill the background. - (Useful for floats and when a `char` has been given.) - """ - char: str | None - if callable(self.char): - char = self.char() - else: - char = self.char - - if erase_bg or char: - wp = write_position - char_obj = _CHAR_CACHE[char or " ", ""] - - for y in range(wp.ypos, wp.ypos + wp.height): - row = screen.data_buffer[y] - for x in range(wp.xpos, wp.xpos + wp.width): - row[x] = char_obj - - def _apply_style( - self, new_screen: Screen, write_position: WritePosition, parent_style: str - ) -> None: - # Apply `self.style`. - style = parent_style + " " + to_str(self.style) - - new_screen.fill_area(write_position, style=style, after=False) - - # Apply the 'last-line' class to the last line of each Window. This can - # be used to apply an 'underline' to the user control. - wp = WritePosition( - write_position.xpos, - write_position.ypos + write_position.height - 1, - write_position.width, - 1, - ) - new_screen.fill_area(wp, "class:last-line", after=True) - - def _highlight_digraph(self, new_screen: Screen) -> None: - """ - When we are in Vi digraph mode, put a question mark underneath the - cursor. - """ - digraph_char = self._get_digraph_char() - if digraph_char: - cpos = new_screen.get_cursor_position(self) - new_screen.data_buffer[cpos.y][cpos.x] = _CHAR_CACHE[ - digraph_char, "class:digraph" - ] - - def _show_key_processor_key_buffer(self, new_screen: Screen) -> None: - """ - When the user is typing a key binding that consists of several keys, - display the last pressed key if the user is in insert mode and the key - is meaningful to be displayed. - E.g. Some people want to bind 'jj' to escape in Vi insert mode. But the - first 'j' needs to be displayed in order to get some feedback. - """ - app = get_app() - key_buffer = app.key_processor.key_buffer - - if key_buffer and _in_insert_mode() and not app.is_done: - # The textual data for the given key. (Can be a VT100 escape - # sequence.) - data = key_buffer[-1].data - - # Display only if this is a 1 cell width character. - if get_cwidth(data) == 1: - cpos = new_screen.get_cursor_position(self) - new_screen.data_buffer[cpos.y][cpos.x] = _CHAR_CACHE[ - data, "class:partial-key-binding" - ] - - def _highlight_cursorlines( - self, new_screen: Screen, cpos: Point, x: int, y: int, width: int, height: int - ) -> None: - """ - Highlight cursor row/column. - """ - cursor_line_style = " class:cursor-line " - cursor_column_style = " class:cursor-column " - - data_buffer = new_screen.data_buffer - - # Highlight cursor line. - if self.cursorline(): - row = data_buffer[cpos.y] - for x in range(x, x + width): - original_char = row[x] - row[x] = _CHAR_CACHE[ - original_char.char, original_char.style + cursor_line_style - ] - - # Highlight cursor column. - if self.cursorcolumn(): - for y2 in range(y, y + height): - row = data_buffer[y2] - original_char = row[cpos.x] - row[cpos.x] = _CHAR_CACHE[ - original_char.char, original_char.style + cursor_column_style - ] - - # Highlight color columns - colorcolumns = self.colorcolumns - if callable(colorcolumns): - colorcolumns = colorcolumns() - - for cc in colorcolumns: - assert isinstance(cc, ColorColumn) - column = cc.position - - if column < x + width: # Only draw when visible. - color_column_style = " " + cc.style - - for y2 in range(y, y + height): - row = data_buffer[y2] - original_char = row[column + x] - row[column + x] = _CHAR_CACHE[ - original_char.char, original_char.style + color_column_style - ] - - def _copy_margin( - self, - margin_content: UIContent, - new_screen: Screen, - write_position: WritePosition, - move_x: int, - width: int, - ) -> None: - """ - Copy characters from the margin screen to the real screen. - """ - xpos = write_position.xpos + move_x - ypos = write_position.ypos - - margin_write_position = WritePosition(xpos, ypos, width, write_position.height) - self._copy_body(margin_content, new_screen, margin_write_position, 0, width) - - def _scroll(self, ui_content: UIContent, width: int, height: int) -> None: - """ - Scroll body. Ensure that the cursor is visible. - """ - if self.wrap_lines(): - func = self._scroll_when_linewrapping - else: - func = self._scroll_without_linewrapping - - func(ui_content, width, height) - - def _scroll_when_linewrapping( - self, ui_content: UIContent, width: int, height: int - ) -> None: - """ - Scroll to make sure the cursor position is visible and that we maintain - the requested scroll offset. - - Set `self.horizontal_scroll/vertical_scroll`. - """ - scroll_offsets_bottom = self.scroll_offsets.bottom - scroll_offsets_top = self.scroll_offsets.top - - # We don't have horizontal scrolling. - self.horizontal_scroll = 0 - - def get_line_height(lineno: int) -> int: - return ui_content.get_height_for_line(lineno, width, self.get_line_prefix) - - # When there is no space, reset `vertical_scroll_2` to zero and abort. - # This can happen if the margin is bigger than the window width. - # Otherwise the text height will become "infinite" (a big number) and - # the copy_line will spend a huge amount of iterations trying to render - # nothing. - if width <= 0: - self.vertical_scroll = ui_content.cursor_position.y - self.vertical_scroll_2 = 0 - return - - # If the current line consumes more than the whole window height, - # then we have to scroll vertically inside this line. (We don't take - # the scroll offsets into account for this.) - # Also, ignore the scroll offsets in this case. Just set the vertical - # scroll to this line. - line_height = get_line_height(ui_content.cursor_position.y) - if line_height > height - scroll_offsets_top: - # Calculate the height of the text before the cursor (including - # line prefixes). - text_before_height = ui_content.get_height_for_line( - ui_content.cursor_position.y, - width, - self.get_line_prefix, - slice_stop=ui_content.cursor_position.x, - ) - - # Adjust scroll offset. - self.vertical_scroll = ui_content.cursor_position.y - self.vertical_scroll_2 = min( - text_before_height - 1, # Keep the cursor visible. - line_height - - height, # Avoid blank lines at the bottom when scrolling up again. - self.vertical_scroll_2, - ) - self.vertical_scroll_2 = max( - 0, text_before_height - height, self.vertical_scroll_2 - ) - return - else: - self.vertical_scroll_2 = 0 - - # Current line doesn't consume the whole height. Take scroll offsets into account. - def get_min_vertical_scroll() -> int: - # Make sure that the cursor line is not below the bottom. - # (Calculate how many lines can be shown between the cursor and the .) - used_height = 0 - prev_lineno = ui_content.cursor_position.y - - for lineno in range(ui_content.cursor_position.y, -1, -1): - used_height += get_line_height(lineno) - - if used_height > height - scroll_offsets_bottom: - return prev_lineno - else: - prev_lineno = lineno - return 0 - - def get_max_vertical_scroll() -> int: - # Make sure that the cursor line is not above the top. - prev_lineno = ui_content.cursor_position.y - used_height = 0 - - for lineno in range(ui_content.cursor_position.y - 1, -1, -1): - used_height += get_line_height(lineno) - - if used_height > scroll_offsets_top: - return prev_lineno - else: - prev_lineno = lineno - return prev_lineno - - def get_topmost_visible() -> int: - """ - Calculate the upper most line that can be visible, while the bottom - is still visible. We should not allow scroll more than this if - `allow_scroll_beyond_bottom` is false. - """ - prev_lineno = ui_content.line_count - 1 - used_height = 0 - for lineno in range(ui_content.line_count - 1, -1, -1): - used_height += get_line_height(lineno) - if used_height > height: - return prev_lineno - else: - prev_lineno = lineno - return prev_lineno - - # Scroll vertically. (Make sure that the whole line which contains the - # cursor is visible. - topmost_visible = get_topmost_visible() - - # Note: the `min(topmost_visible, ...)` is to make sure that we - # don't require scrolling up because of the bottom scroll offset, - # when we are at the end of the document. - self.vertical_scroll = max( - self.vertical_scroll, min(topmost_visible, get_min_vertical_scroll()) - ) - self.vertical_scroll = min(self.vertical_scroll, get_max_vertical_scroll()) - - # Disallow scrolling beyond bottom? - if not self.allow_scroll_beyond_bottom(): - self.vertical_scroll = min(self.vertical_scroll, topmost_visible) - - def _scroll_without_linewrapping( - self, ui_content: UIContent, width: int, height: int - ) -> None: - """ - Scroll to make sure the cursor position is visible and that we maintain - the requested scroll offset. - - Set `self.horizontal_scroll/vertical_scroll`. - """ - cursor_position = ui_content.cursor_position or Point(x=0, y=0) - - # Without line wrapping, we will never have to scroll vertically inside - # a single line. - self.vertical_scroll_2 = 0 - - if ui_content.line_count == 0: - self.vertical_scroll = 0 - self.horizontal_scroll = 0 - return - else: - current_line_text = fragment_list_to_text( - ui_content.get_line(cursor_position.y) - ) - - def do_scroll( - current_scroll: int, - scroll_offset_start: int, - scroll_offset_end: int, - cursor_pos: int, - window_size: int, - content_size: int, - ) -> int: - "Scrolling algorithm. Used for both horizontal and vertical scrolling." - # Calculate the scroll offset to apply. - # This can obviously never be more than have the screen size. Also, when the - # cursor appears at the top or bottom, we don't apply the offset. - scroll_offset_start = int( - min(scroll_offset_start, window_size / 2, cursor_pos) - ) - scroll_offset_end = int( - min(scroll_offset_end, window_size / 2, content_size - 1 - cursor_pos) - ) - - # Prevent negative scroll offsets. - if current_scroll < 0: - current_scroll = 0 - - # Scroll back if we scrolled to much and there's still space to show more of the document. - if ( - not self.allow_scroll_beyond_bottom() - and current_scroll > content_size - window_size - ): - current_scroll = max(0, content_size - window_size) - - # Scroll up if cursor is before visible part. - if current_scroll > cursor_pos - scroll_offset_start: - current_scroll = max(0, cursor_pos - scroll_offset_start) - - # Scroll down if cursor is after visible part. - if current_scroll < (cursor_pos + 1) - window_size + scroll_offset_end: - current_scroll = (cursor_pos + 1) - window_size + scroll_offset_end - - return current_scroll - - # When a preferred scroll is given, take that first into account. - if self.get_vertical_scroll: - self.vertical_scroll = self.get_vertical_scroll(self) - assert isinstance(self.vertical_scroll, int) - if self.get_horizontal_scroll: - self.horizontal_scroll = self.get_horizontal_scroll(self) - assert isinstance(self.horizontal_scroll, int) - - # Update horizontal/vertical scroll to make sure that the cursor - # remains visible. - offsets = self.scroll_offsets - - self.vertical_scroll = do_scroll( - current_scroll=self.vertical_scroll, - scroll_offset_start=offsets.top, - scroll_offset_end=offsets.bottom, - cursor_pos=ui_content.cursor_position.y, - window_size=height, - content_size=ui_content.line_count, - ) - - if self.get_line_prefix: - current_line_prefix_width = fragment_list_width( - to_formatted_text(self.get_line_prefix(ui_content.cursor_position.y, 0)) - ) - else: - current_line_prefix_width = 0 - - self.horizontal_scroll = do_scroll( - current_scroll=self.horizontal_scroll, - scroll_offset_start=offsets.left, - scroll_offset_end=offsets.right, - cursor_pos=get_cwidth(current_line_text[: ui_content.cursor_position.x]), - window_size=width - current_line_prefix_width, - # We can only analyze the current line. Calculating the width off - # all the lines is too expensive. - content_size=max( - get_cwidth(current_line_text), self.horizontal_scroll + width - ), - ) - - def _mouse_handler(self, mouse_event: MouseEvent) -> NotImplementedOrNone: - """ - Mouse handler. Called when the UI control doesn't handle this - particular event. - - Return `NotImplemented` if nothing was done as a consequence of this - key binding (no UI invalidate required in that case). - """ - if mouse_event.event_type == MouseEventType.SCROLL_DOWN: - self._scroll_down() - return None - elif mouse_event.event_type == MouseEventType.SCROLL_UP: - self._scroll_up() - return None - - return NotImplemented - - def _scroll_down(self) -> None: - "Scroll window down." - info = self.render_info - - if info is None: - return - - if self.vertical_scroll < info.content_height - info.window_height: - if info.cursor_position.y <= info.configured_scroll_offsets.top: - self.content.move_cursor_down() - - self.vertical_scroll += 1 - - def _scroll_up(self) -> None: - "Scroll window up." - info = self.render_info - - if info is None: - return - - if info.vertical_scroll > 0: - # TODO: not entirely correct yet in case of line wrapping and long lines. - if ( - info.cursor_position.y - >= info.window_height - 1 - info.configured_scroll_offsets.bottom - ): - self.content.move_cursor_up() - - self.vertical_scroll -= 1 - - def get_key_bindings(self) -> KeyBindingsBase | None: - return self.content.get_key_bindings() - - def get_children(self) -> list[Container]: - return [] - - -class ConditionalContainer(Container): - """ - Wrapper around any other container that can change the visibility. The - received `filter` determines whether the given container should be - displayed or not. - - :param content: :class:`.Container` instance. - :param filter: :class:`.Filter` instance. - """ - - def __init__( - self, - content: AnyContainer, - filter: FilterOrBool, - alternative_content: AnyContainer | None = None, - ) -> None: - self.content = to_container(content) - self.alternative_content = ( - to_container(alternative_content) - if alternative_content is not None - else None - ) - self.filter = to_filter(filter) - - def __repr__(self) -> str: - return f"ConditionalContainer({self.content!r}, filter={self.filter!r})" - - def reset(self) -> None: - self.content.reset() - - def preferred_width(self, max_available_width: int) -> Dimension: - if self.filter(): - return self.content.preferred_width(max_available_width) - elif self.alternative_content is not None: - return self.alternative_content.preferred_width(max_available_width) - else: - return Dimension.zero() - - def preferred_height(self, width: int, max_available_height: int) -> Dimension: - if self.filter(): - return self.content.preferred_height(width, max_available_height) - elif self.alternative_content is not None: - return self.alternative_content.preferred_height( - width, max_available_height - ) - else: - return Dimension.zero() - - def write_to_screen( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - if self.filter(): - return self.content.write_to_screen( - screen, mouse_handlers, write_position, parent_style, erase_bg, z_index - ) - elif self.alternative_content is not None: - return self.alternative_content.write_to_screen( - screen, - mouse_handlers, - write_position, - parent_style, - erase_bg, - z_index, - ) - - def get_children(self) -> list[Container]: - result = [self.content] - if self.alternative_content is not None: - result.append(self.alternative_content) - return result - - -class DynamicContainer(Container): - """ - Container class that dynamically returns any Container. - - :param get_container: Callable that returns a :class:`.Container` instance - or any widget with a ``__pt_container__`` method. - """ - - def __init__(self, get_container: Callable[[], AnyContainer]) -> None: - self.get_container = get_container - - def _get_container(self) -> Container: - """ - Return the current container object. - - We call `to_container`, because `get_container` can also return a - widget with a ``__pt_container__`` method. - """ - obj = self.get_container() - return to_container(obj) - - def reset(self) -> None: - self._get_container().reset() - - def preferred_width(self, max_available_width: int) -> Dimension: - return self._get_container().preferred_width(max_available_width) - - def preferred_height(self, width: int, max_available_height: int) -> Dimension: - return self._get_container().preferred_height(width, max_available_height) - - def write_to_screen( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - self._get_container().write_to_screen( - screen, mouse_handlers, write_position, parent_style, erase_bg, z_index - ) - - def is_modal(self) -> bool: - return False - - def get_key_bindings(self) -> KeyBindingsBase | None: - # Key bindings will be collected when `layout.walk()` finds the child - # container. - return None - - def get_children(self) -> list[Container]: - # Here we have to return the current active container itself, not its - # children. Otherwise, we run into issues where `layout.walk()` will - # never see an object of type `Window` if this contains a window. We - # can't/shouldn't proxy the "isinstance" check. - return [self._get_container()] - - -def to_container(container: AnyContainer) -> Container: - """ - Make sure that the given object is a :class:`.Container`. - """ - if isinstance(container, Container): - return container - elif hasattr(container, "__pt_container__"): - return to_container(container.__pt_container__()) - else: - raise ValueError(f"Not a container object: {container!r}") - - -def to_window(container: AnyContainer) -> Window: - """ - Make sure that the given argument is a :class:`.Window`. - """ - if isinstance(container, Window): - return container - elif hasattr(container, "__pt_container__"): - return to_window(cast("MagicContainer", container).__pt_container__()) - else: - raise ValueError(f"Not a Window object: {container!r}.") - - -def is_container(value: object) -> TypeGuard[AnyContainer]: - """ - Checks whether the given value is a container object - (for use in assert statements). - """ - if isinstance(value, Container): - return True - if hasattr(value, "__pt_container__"): - return is_container(cast("MagicContainer", value).__pt_container__()) - return False diff --git a/voxvera/vendor/prompt_toolkit/layout/controls.py b/voxvera/vendor/prompt_toolkit/layout/controls.py deleted file mode 100644 index 5083c82..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/controls.py +++ /dev/null @@ -1,956 +0,0 @@ -""" -User interface Controls for the layout. -""" - -from __future__ import annotations - -import time -from abc import ABCMeta, abstractmethod -from typing import TYPE_CHECKING, Callable, Hashable, Iterable, NamedTuple - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.buffer import Buffer -from prompt_toolkit.cache import SimpleCache -from prompt_toolkit.data_structures import Point -from prompt_toolkit.document import Document -from prompt_toolkit.filters import FilterOrBool, to_filter -from prompt_toolkit.formatted_text import ( - AnyFormattedText, - StyleAndTextTuples, - to_formatted_text, -) -from prompt_toolkit.formatted_text.utils import ( - fragment_list_to_text, - fragment_list_width, - split_lines, -) -from prompt_toolkit.lexers import Lexer, SimpleLexer -from prompt_toolkit.mouse_events import MouseButton, MouseEvent, MouseEventType -from prompt_toolkit.search import SearchState -from prompt_toolkit.selection import SelectionType -from prompt_toolkit.utils import get_cwidth - -from .processors import ( - DisplayMultipleCursors, - HighlightIncrementalSearchProcessor, - HighlightSearchProcessor, - HighlightSelectionProcessor, - Processor, - TransformationInput, - merge_processors, -) - -if TYPE_CHECKING: - from prompt_toolkit.key_binding.key_bindings import ( - KeyBindingsBase, - NotImplementedOrNone, - ) - from prompt_toolkit.utils import Event - - -__all__ = [ - "BufferControl", - "SearchBufferControl", - "DummyControl", - "FormattedTextControl", - "UIControl", - "UIContent", -] - -GetLinePrefixCallable = Callable[[int, int], AnyFormattedText] - - -class UIControl(metaclass=ABCMeta): - """ - Base class for all user interface controls. - """ - - def reset(self) -> None: - # Default reset. (Doesn't have to be implemented.) - pass - - def preferred_width(self, max_available_width: int) -> int | None: - return None - - def preferred_height( - self, - width: int, - max_available_height: int, - wrap_lines: bool, - get_line_prefix: GetLinePrefixCallable | None, - ) -> int | None: - return None - - def is_focusable(self) -> bool: - """ - Tell whether this user control is focusable. - """ - return False - - @abstractmethod - def create_content(self, width: int, height: int) -> UIContent: - """ - Generate the content for this user control. - - Returns a :class:`.UIContent` instance. - """ - - def mouse_handler(self, mouse_event: MouseEvent) -> NotImplementedOrNone: - """ - Handle mouse events. - - When `NotImplemented` is returned, it means that the given event is not - handled by the `UIControl` itself. The `Window` or key bindings can - decide to handle this event as scrolling or changing focus. - - :param mouse_event: `MouseEvent` instance. - """ - return NotImplemented - - def move_cursor_down(self) -> None: - """ - Request to move the cursor down. - This happens when scrolling down and the cursor is completely at the - top. - """ - - def move_cursor_up(self) -> None: - """ - Request to move the cursor up. - """ - - def get_key_bindings(self) -> KeyBindingsBase | None: - """ - The key bindings that are specific for this user control. - - Return a :class:`.KeyBindings` object if some key bindings are - specified, or `None` otherwise. - """ - - def get_invalidate_events(self) -> Iterable[Event[object]]: - """ - Return a list of `Event` objects. This can be a generator. - (The application collects all these events, in order to bind redraw - handlers to these events.) - """ - return [] - - -class UIContent: - """ - Content generated by a user control. This content consists of a list of - lines. - - :param get_line: Callable that takes a line number and returns the current - line. This is a list of (style_str, text) tuples. - :param line_count: The number of lines. - :param cursor_position: a :class:`.Point` for the cursor position. - :param menu_position: a :class:`.Point` for the menu position. - :param show_cursor: Make the cursor visible. - """ - - def __init__( - self, - get_line: Callable[[int], StyleAndTextTuples] = (lambda i: []), - line_count: int = 0, - cursor_position: Point | None = None, - menu_position: Point | None = None, - show_cursor: bool = True, - ): - self.get_line = get_line - self.line_count = line_count - self.cursor_position = cursor_position or Point(x=0, y=0) - self.menu_position = menu_position - self.show_cursor = show_cursor - - # Cache for line heights. Maps cache key -> height - self._line_heights_cache: dict[Hashable, int] = {} - - def __getitem__(self, lineno: int) -> StyleAndTextTuples: - "Make it iterable (iterate line by line)." - if lineno < self.line_count: - return self.get_line(lineno) - else: - raise IndexError - - def get_height_for_line( - self, - lineno: int, - width: int, - get_line_prefix: GetLinePrefixCallable | None, - slice_stop: int | None = None, - ) -> int: - """ - Return the height that a given line would need if it is rendered in a - space with the given width (using line wrapping). - - :param get_line_prefix: None or a `Window.get_line_prefix` callable - that returns the prefix to be inserted before this line. - :param slice_stop: Wrap only "line[:slice_stop]" and return that - partial result. This is needed for scrolling the window correctly - when line wrapping. - :returns: The computed height. - """ - # Instead of using `get_line_prefix` as key, we use render_counter - # instead. This is more reliable, because this function could still be - # the same, while the content would change over time. - key = get_app().render_counter, lineno, width, slice_stop - - try: - return self._line_heights_cache[key] - except KeyError: - if width == 0: - height = 10**8 - else: - # Calculate line width first. - line = fragment_list_to_text(self.get_line(lineno))[:slice_stop] - text_width = get_cwidth(line) - - if get_line_prefix: - # Add prefix width. - text_width += fragment_list_width( - to_formatted_text(get_line_prefix(lineno, 0)) - ) - - # Slower path: compute path when there's a line prefix. - height = 1 - - # Keep wrapping as long as the line doesn't fit. - # Keep adding new prefixes for every wrapped line. - while text_width > width: - height += 1 - text_width -= width - - fragments2 = to_formatted_text( - get_line_prefix(lineno, height - 1) - ) - prefix_width = get_cwidth(fragment_list_to_text(fragments2)) - - if prefix_width >= width: # Prefix doesn't fit. - height = 10**8 - break - - text_width += prefix_width - else: - # Fast path: compute height when there's no line prefix. - try: - quotient, remainder = divmod(text_width, width) - except ZeroDivisionError: - height = 10**8 - else: - if remainder: - quotient += 1 # Like math.ceil. - height = max(1, quotient) - - # Cache and return - self._line_heights_cache[key] = height - return height - - -class FormattedTextControl(UIControl): - """ - Control that displays formatted text. This can be either plain text, an - :class:`~prompt_toolkit.formatted_text.HTML` object an - :class:`~prompt_toolkit.formatted_text.ANSI` object, a list of ``(style_str, - text)`` tuples or a callable that takes no argument and returns one of - those, depending on how you prefer to do the formatting. See - ``prompt_toolkit.layout.formatted_text`` for more information. - - (It's mostly optimized for rather small widgets, like toolbars, menus, etc...) - - When this UI control has the focus, the cursor will be shown in the upper - left corner of this control by default. There are two ways for specifying - the cursor position: - - - Pass a `get_cursor_position` function which returns a `Point` instance - with the current cursor position. - - - If the (formatted) text is passed as a list of ``(style, text)`` tuples - and there is one that looks like ``('[SetCursorPosition]', '')``, then - this will specify the cursor position. - - Mouse support: - - The list of fragments can also contain tuples of three items, looking like: - (style_str, text, handler). When mouse support is enabled and the user - clicks on this fragment, then the given handler is called. That handler - should accept two inputs: (Application, MouseEvent) and it should - either handle the event or return `NotImplemented` in case we want the - containing Window to handle this event. - - :param focusable: `bool` or :class:`.Filter`: Tell whether this control is - focusable. - - :param text: Text or formatted text to be displayed. - :param style: Style string applied to the content. (If you want to style - the whole :class:`~prompt_toolkit.layout.Window`, pass the style to the - :class:`~prompt_toolkit.layout.Window` instead.) - :param key_bindings: a :class:`.KeyBindings` object. - :param get_cursor_position: A callable that returns the cursor position as - a `Point` instance. - """ - - def __init__( - self, - text: AnyFormattedText = "", - style: str = "", - focusable: FilterOrBool = False, - key_bindings: KeyBindingsBase | None = None, - show_cursor: bool = True, - modal: bool = False, - get_cursor_position: Callable[[], Point | None] | None = None, - ) -> None: - self.text = text # No type check on 'text'. This is done dynamically. - self.style = style - self.focusable = to_filter(focusable) - - # Key bindings. - self.key_bindings = key_bindings - self.show_cursor = show_cursor - self.modal = modal - self.get_cursor_position = get_cursor_position - - #: Cache for the content. - self._content_cache: SimpleCache[Hashable, UIContent] = SimpleCache(maxsize=18) - self._fragment_cache: SimpleCache[int, StyleAndTextTuples] = SimpleCache( - maxsize=1 - ) - # Only cache one fragment list. We don't need the previous item. - - # Render info for the mouse support. - self._fragments: StyleAndTextTuples | None = None - - def reset(self) -> None: - self._fragments = None - - def is_focusable(self) -> bool: - return self.focusable() - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.text!r})" - - def _get_formatted_text_cached(self) -> StyleAndTextTuples: - """ - Get fragments, but only retrieve fragments once during one render run. - (This function is called several times during one rendering, because - we also need those for calculating the dimensions.) - """ - return self._fragment_cache.get( - get_app().render_counter, lambda: to_formatted_text(self.text, self.style) - ) - - def preferred_width(self, max_available_width: int) -> int: - """ - Return the preferred width for this control. - That is the width of the longest line. - """ - text = fragment_list_to_text(self._get_formatted_text_cached()) - line_lengths = [get_cwidth(l) for l in text.split("\n")] - return max(line_lengths) - - def preferred_height( - self, - width: int, - max_available_height: int, - wrap_lines: bool, - get_line_prefix: GetLinePrefixCallable | None, - ) -> int | None: - """ - Return the preferred height for this control. - """ - content = self.create_content(width, None) - if wrap_lines: - height = 0 - for i in range(content.line_count): - height += content.get_height_for_line(i, width, get_line_prefix) - if height >= max_available_height: - return max_available_height - return height - else: - return content.line_count - - def create_content(self, width: int, height: int | None) -> UIContent: - # Get fragments - fragments_with_mouse_handlers = self._get_formatted_text_cached() - fragment_lines_with_mouse_handlers = list( - split_lines(fragments_with_mouse_handlers) - ) - - # Strip mouse handlers from fragments. - fragment_lines: list[StyleAndTextTuples] = [ - [(item[0], item[1]) for item in line] - for line in fragment_lines_with_mouse_handlers - ] - - # Keep track of the fragments with mouse handler, for later use in - # `mouse_handler`. - self._fragments = fragments_with_mouse_handlers - - # If there is a `[SetCursorPosition]` in the fragment list, set the - # cursor position here. - def get_cursor_position( - fragment: str = "[SetCursorPosition]", - ) -> Point | None: - for y, line in enumerate(fragment_lines): - x = 0 - for style_str, text, *_ in line: - if fragment in style_str: - return Point(x=x, y=y) - x += len(text) - return None - - # If there is a `[SetMenuPosition]`, set the menu over here. - def get_menu_position() -> Point | None: - return get_cursor_position("[SetMenuPosition]") - - cursor_position = (self.get_cursor_position or get_cursor_position)() - - # Create content, or take it from the cache. - key = (tuple(fragments_with_mouse_handlers), width, cursor_position) - - def get_content() -> UIContent: - return UIContent( - get_line=lambda i: fragment_lines[i], - line_count=len(fragment_lines), - show_cursor=self.show_cursor, - cursor_position=cursor_position, - menu_position=get_menu_position(), - ) - - return self._content_cache.get(key, get_content) - - def mouse_handler(self, mouse_event: MouseEvent) -> NotImplementedOrNone: - """ - Handle mouse events. - - (When the fragment list contained mouse handlers and the user clicked on - on any of these, the matching handler is called. This handler can still - return `NotImplemented` in case we want the - :class:`~prompt_toolkit.layout.Window` to handle this particular - event.) - """ - if self._fragments: - # Read the generator. - fragments_for_line = list(split_lines(self._fragments)) - - try: - fragments = fragments_for_line[mouse_event.position.y] - except IndexError: - return NotImplemented - else: - # Find position in the fragment list. - xpos = mouse_event.position.x - - # Find mouse handler for this character. - count = 0 - for item in fragments: - count += len(item[1]) - if count > xpos: - if len(item) >= 3: - # Handler found. Call it. - # (Handler can return NotImplemented, so return - # that result.) - handler = item[2] - return handler(mouse_event) - else: - break - - # Otherwise, don't handle here. - return NotImplemented - - def is_modal(self) -> bool: - return self.modal - - def get_key_bindings(self) -> KeyBindingsBase | None: - return self.key_bindings - - -class DummyControl(UIControl): - """ - A dummy control object that doesn't paint any content. - - Useful for filling a :class:`~prompt_toolkit.layout.Window`. (The - `fragment` and `char` attributes of the `Window` class can be used to - define the filling.) - """ - - def create_content(self, width: int, height: int) -> UIContent: - def get_line(i: int) -> StyleAndTextTuples: - return [] - - return UIContent(get_line=get_line, line_count=100**100) # Something very big. - - def is_focusable(self) -> bool: - return False - - -class _ProcessedLine(NamedTuple): - fragments: StyleAndTextTuples - source_to_display: Callable[[int], int] - display_to_source: Callable[[int], int] - - -class BufferControl(UIControl): - """ - Control for visualizing the content of a :class:`.Buffer`. - - :param buffer: The :class:`.Buffer` object to be displayed. - :param input_processors: A list of - :class:`~prompt_toolkit.layout.processors.Processor` objects. - :param include_default_input_processors: When True, include the default - processors for highlighting of selection, search and displaying of - multiple cursors. - :param lexer: :class:`.Lexer` instance for syntax highlighting. - :param preview_search: `bool` or :class:`.Filter`: Show search while - typing. When this is `True`, probably you want to add a - ``HighlightIncrementalSearchProcessor`` as well. Otherwise only the - cursor position will move, but the text won't be highlighted. - :param focusable: `bool` or :class:`.Filter`: Tell whether this control is focusable. - :param focus_on_click: Focus this buffer when it's click, but not yet focused. - :param key_bindings: a :class:`.KeyBindings` object. - """ - - def __init__( - self, - buffer: Buffer | None = None, - input_processors: list[Processor] | None = None, - include_default_input_processors: bool = True, - lexer: Lexer | None = None, - preview_search: FilterOrBool = False, - focusable: FilterOrBool = True, - search_buffer_control: ( - None | SearchBufferControl | Callable[[], SearchBufferControl] - ) = None, - menu_position: Callable[[], int | None] | None = None, - focus_on_click: FilterOrBool = False, - key_bindings: KeyBindingsBase | None = None, - ): - self.input_processors = input_processors - self.include_default_input_processors = include_default_input_processors - - self.default_input_processors = [ - HighlightSearchProcessor(), - HighlightIncrementalSearchProcessor(), - HighlightSelectionProcessor(), - DisplayMultipleCursors(), - ] - - self.preview_search = to_filter(preview_search) - self.focusable = to_filter(focusable) - self.focus_on_click = to_filter(focus_on_click) - - self.buffer = buffer or Buffer() - self.menu_position = menu_position - self.lexer = lexer or SimpleLexer() - self.key_bindings = key_bindings - self._search_buffer_control = search_buffer_control - - #: Cache for the lexer. - #: Often, due to cursor movement, undo/redo and window resizing - #: operations, it happens that a short time, the same document has to be - #: lexed. This is a fairly easy way to cache such an expensive operation. - self._fragment_cache: SimpleCache[ - Hashable, Callable[[int], StyleAndTextTuples] - ] = SimpleCache(maxsize=8) - - self._last_click_timestamp: float | None = None - self._last_get_processed_line: Callable[[int], _ProcessedLine] | None = None - - def __repr__(self) -> str: - return f"<{self.__class__.__name__} buffer={self.buffer!r} at {id(self)!r}>" - - @property - def search_buffer_control(self) -> SearchBufferControl | None: - result: SearchBufferControl | None - - if callable(self._search_buffer_control): - result = self._search_buffer_control() - else: - result = self._search_buffer_control - - assert result is None or isinstance(result, SearchBufferControl) - return result - - @property - def search_buffer(self) -> Buffer | None: - control = self.search_buffer_control - if control is not None: - return control.buffer - return None - - @property - def search_state(self) -> SearchState: - """ - Return the `SearchState` for searching this `BufferControl`. This is - always associated with the search control. If one search bar is used - for searching multiple `BufferControls`, then they share the same - `SearchState`. - """ - search_buffer_control = self.search_buffer_control - if search_buffer_control: - return search_buffer_control.searcher_search_state - else: - return SearchState() - - def is_focusable(self) -> bool: - return self.focusable() - - def preferred_width(self, max_available_width: int) -> int | None: - """ - This should return the preferred width. - - Note: We don't specify a preferred width according to the content, - because it would be too expensive. Calculating the preferred - width can be done by calculating the longest line, but this would - require applying all the processors to each line. This is - unfeasible for a larger document, and doing it for small - documents only would result in inconsistent behavior. - """ - return None - - def preferred_height( - self, - width: int, - max_available_height: int, - wrap_lines: bool, - get_line_prefix: GetLinePrefixCallable | None, - ) -> int | None: - # Calculate the content height, if it was drawn on a screen with the - # given width. - height = 0 - content = self.create_content(width, height=1) # Pass a dummy '1' as height. - - # When line wrapping is off, the height should be equal to the amount - # of lines. - if not wrap_lines: - return content.line_count - - # When the number of lines exceeds the max_available_height, just - # return max_available_height. No need to calculate anything. - if content.line_count >= max_available_height: - return max_available_height - - for i in range(content.line_count): - height += content.get_height_for_line(i, width, get_line_prefix) - - if height >= max_available_height: - return max_available_height - - return height - - def _get_formatted_text_for_line_func( - self, document: Document - ) -> Callable[[int], StyleAndTextTuples]: - """ - Create a function that returns the fragments for a given line. - """ - - # Cache using `document.text`. - def get_formatted_text_for_line() -> Callable[[int], StyleAndTextTuples]: - return self.lexer.lex_document(document) - - key = (document.text, self.lexer.invalidation_hash()) - return self._fragment_cache.get(key, get_formatted_text_for_line) - - def _create_get_processed_line_func( - self, document: Document, width: int, height: int - ) -> Callable[[int], _ProcessedLine]: - """ - Create a function that takes a line number of the current document and - returns a _ProcessedLine(processed_fragments, source_to_display, display_to_source) - tuple. - """ - # Merge all input processors together. - input_processors = self.input_processors or [] - if self.include_default_input_processors: - input_processors = self.default_input_processors + input_processors - - merged_processor = merge_processors(input_processors) - - def transform( - lineno: int, - fragments: StyleAndTextTuples, - get_line: Callable[[int], StyleAndTextTuples], - ) -> _ProcessedLine: - "Transform the fragments for a given line number." - - # Get cursor position at this line. - def source_to_display(i: int) -> int: - """X position from the buffer to the x position in the - processed fragment list. By default, we start from the 'identity' - operation.""" - return i - - transformation = merged_processor.apply_transformation( - TransformationInput( - self, - document, - lineno, - source_to_display, - fragments, - width, - height, - get_line, - ) - ) - - return _ProcessedLine( - transformation.fragments, - transformation.source_to_display, - transformation.display_to_source, - ) - - def create_func() -> Callable[[int], _ProcessedLine]: - get_line = self._get_formatted_text_for_line_func(document) - cache: dict[int, _ProcessedLine] = {} - - def get_processed_line(i: int) -> _ProcessedLine: - try: - return cache[i] - except KeyError: - processed_line = transform(i, get_line(i), get_line) - cache[i] = processed_line - return processed_line - - return get_processed_line - - return create_func() - - def create_content( - self, width: int, height: int, preview_search: bool = False - ) -> UIContent: - """ - Create a UIContent. - """ - buffer = self.buffer - - # Trigger history loading of the buffer. We do this during the - # rendering of the UI here, because it needs to happen when an - # `Application` with its event loop is running. During the rendering of - # the buffer control is the earliest place we can achieve this, where - # we're sure the right event loop is active, and don't require user - # interaction (like in a key binding). - buffer.load_history_if_not_yet_loaded() - - # Get the document to be shown. If we are currently searching (the - # search buffer has focus, and the preview_search filter is enabled), - # then use the search document, which has possibly a different - # text/cursor position.) - search_control = self.search_buffer_control - preview_now = preview_search or bool( - # Only if this feature is enabled. - self.preview_search() - and - # And something was typed in the associated search field. - search_control - and search_control.buffer.text - and - # And we are searching in this control. (Many controls can point to - # the same search field, like in Pyvim.) - get_app().layout.search_target_buffer_control == self - ) - - if preview_now and search_control is not None: - ss = self.search_state - - document = buffer.document_for_search( - SearchState( - text=search_control.buffer.text, - direction=ss.direction, - ignore_case=ss.ignore_case, - ) - ) - else: - document = buffer.document - - get_processed_line = self._create_get_processed_line_func( - document, width, height - ) - self._last_get_processed_line = get_processed_line - - def translate_rowcol(row: int, col: int) -> Point: - "Return the content column for this coordinate." - return Point(x=get_processed_line(row).source_to_display(col), y=row) - - def get_line(i: int) -> StyleAndTextTuples: - "Return the fragments for a given line number." - fragments = get_processed_line(i).fragments - - # Add a space at the end, because that is a possible cursor - # position. (When inserting after the input.) We should do this on - # all the lines, not just the line containing the cursor. (Because - # otherwise, line wrapping/scrolling could change when moving the - # cursor around.) - fragments = fragments + [("", " ")] - return fragments - - content = UIContent( - get_line=get_line, - line_count=document.line_count, - cursor_position=translate_rowcol( - document.cursor_position_row, document.cursor_position_col - ), - ) - - # If there is an auto completion going on, use that start point for a - # pop-up menu position. (But only when this buffer has the focus -- - # there is only one place for a menu, determined by the focused buffer.) - if get_app().layout.current_control == self: - menu_position = self.menu_position() if self.menu_position else None - if menu_position is not None: - assert isinstance(menu_position, int) - menu_row, menu_col = buffer.document.translate_index_to_position( - menu_position - ) - content.menu_position = translate_rowcol(menu_row, menu_col) - elif buffer.complete_state: - # Position for completion menu. - # Note: We use 'min', because the original cursor position could be - # behind the input string when the actual completion is for - # some reason shorter than the text we had before. (A completion - # can change and shorten the input.) - menu_row, menu_col = buffer.document.translate_index_to_position( - min( - buffer.cursor_position, - buffer.complete_state.original_document.cursor_position, - ) - ) - content.menu_position = translate_rowcol(menu_row, menu_col) - else: - content.menu_position = None - - return content - - def mouse_handler(self, mouse_event: MouseEvent) -> NotImplementedOrNone: - """ - Mouse handler for this control. - """ - buffer = self.buffer - position = mouse_event.position - - # Focus buffer when clicked. - if get_app().layout.current_control == self: - if self._last_get_processed_line: - processed_line = self._last_get_processed_line(position.y) - - # Translate coordinates back to the cursor position of the - # original input. - xpos = processed_line.display_to_source(position.x) - index = buffer.document.translate_row_col_to_index(position.y, xpos) - - # Set the cursor position. - if mouse_event.event_type == MouseEventType.MOUSE_DOWN: - buffer.exit_selection() - buffer.cursor_position = index - - elif ( - mouse_event.event_type == MouseEventType.MOUSE_MOVE - and mouse_event.button != MouseButton.NONE - ): - # Click and drag to highlight a selection - if ( - buffer.selection_state is None - and abs(buffer.cursor_position - index) > 0 - ): - buffer.start_selection(selection_type=SelectionType.CHARACTERS) - buffer.cursor_position = index - - elif mouse_event.event_type == MouseEventType.MOUSE_UP: - # When the cursor was moved to another place, select the text. - # (The >1 is actually a small but acceptable workaround for - # selecting text in Vi navigation mode. In navigation mode, - # the cursor can never be after the text, so the cursor - # will be repositioned automatically.) - if abs(buffer.cursor_position - index) > 1: - if buffer.selection_state is None: - buffer.start_selection( - selection_type=SelectionType.CHARACTERS - ) - buffer.cursor_position = index - - # Select word around cursor on double click. - # Two MOUSE_UP events in a short timespan are considered a double click. - double_click = ( - self._last_click_timestamp - and time.time() - self._last_click_timestamp < 0.3 - ) - self._last_click_timestamp = time.time() - - if double_click: - start, end = buffer.document.find_boundaries_of_current_word() - buffer.cursor_position += start - buffer.start_selection(selection_type=SelectionType.CHARACTERS) - buffer.cursor_position += end - start - else: - # Don't handle scroll events here. - return NotImplemented - - # Not focused, but focusing on click events. - else: - if ( - self.focus_on_click() - and mouse_event.event_type == MouseEventType.MOUSE_UP - ): - # Focus happens on mouseup. (If we did this on mousedown, the - # up event will be received at the point where this widget is - # focused and be handled anyway.) - get_app().layout.current_control = self - else: - return NotImplemented - - return None - - def move_cursor_down(self) -> None: - b = self.buffer - b.cursor_position += b.document.get_cursor_down_position() - - def move_cursor_up(self) -> None: - b = self.buffer - b.cursor_position += b.document.get_cursor_up_position() - - def get_key_bindings(self) -> KeyBindingsBase | None: - """ - When additional key bindings are given. Return these. - """ - return self.key_bindings - - def get_invalidate_events(self) -> Iterable[Event[object]]: - """ - Return the Window invalidate events. - """ - # Whenever the buffer changes, the UI has to be updated. - yield self.buffer.on_text_changed - yield self.buffer.on_cursor_position_changed - - yield self.buffer.on_completions_changed - yield self.buffer.on_suggestion_set - - -class SearchBufferControl(BufferControl): - """ - :class:`.BufferControl` which is used for searching another - :class:`.BufferControl`. - - :param ignore_case: Search case insensitive. - """ - - def __init__( - self, - buffer: Buffer | None = None, - input_processors: list[Processor] | None = None, - lexer: Lexer | None = None, - focus_on_click: FilterOrBool = False, - key_bindings: KeyBindingsBase | None = None, - ignore_case: FilterOrBool = False, - ): - super().__init__( - buffer=buffer, - input_processors=input_processors, - lexer=lexer, - focus_on_click=focus_on_click, - key_bindings=key_bindings, - ) - - # If this BufferControl is used as a search field for one or more other - # BufferControls, then represents the search state. - self.searcher_search_state = SearchState(ignore_case=ignore_case) diff --git a/voxvera/vendor/prompt_toolkit/layout/dimension.py b/voxvera/vendor/prompt_toolkit/layout/dimension.py deleted file mode 100644 index eec6c69..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/dimension.py +++ /dev/null @@ -1,216 +0,0 @@ -""" -Layout dimensions are used to give the minimum, maximum and preferred -dimensions for containers and controls. -""" - -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Callable, Union - -__all__ = [ - "Dimension", - "D", - "sum_layout_dimensions", - "max_layout_dimensions", - "AnyDimension", - "to_dimension", - "is_dimension", -] - -if TYPE_CHECKING: - from typing_extensions import TypeGuard - - -class Dimension: - """ - Specified dimension (width/height) of a user control or window. - - The layout engine tries to honor the preferred size. If that is not - possible, because the terminal is larger or smaller, it tries to keep in - between min and max. - - :param min: Minimum size. - :param max: Maximum size. - :param weight: For a VSplit/HSplit, the actual size will be determined - by taking the proportion of weights from all the children. - E.g. When there are two children, one with a weight of 1, - and the other with a weight of 2, the second will always be - twice as big as the first, if the min/max values allow it. - :param preferred: Preferred size. - """ - - def __init__( - self, - min: int | None = None, - max: int | None = None, - weight: int | None = None, - preferred: int | None = None, - ) -> None: - if weight is not None: - assert weight >= 0 # Also cannot be a float. - - assert min is None or min >= 0 - assert max is None or max >= 0 - assert preferred is None or preferred >= 0 - - self.min_specified = min is not None - self.max_specified = max is not None - self.preferred_specified = preferred is not None - self.weight_specified = weight is not None - - if min is None: - min = 0 # Smallest possible value. - if max is None: # 0-values are allowed, so use "is None" - max = 1000**10 # Something huge. - if preferred is None: - preferred = min - if weight is None: - weight = 1 - - self.min = min - self.max = max - self.preferred = preferred - self.weight = weight - - # Don't allow situations where max < min. (This would be a bug.) - if max < min: - raise ValueError("Invalid Dimension: max < min.") - - # Make sure that the 'preferred' size is always in the min..max range. - if self.preferred < self.min: - self.preferred = self.min - - if self.preferred > self.max: - self.preferred = self.max - - @classmethod - def exact(cls, amount: int) -> Dimension: - """ - Return a :class:`.Dimension` with an exact size. (min, max and - preferred set to ``amount``). - """ - return cls(min=amount, max=amount, preferred=amount) - - @classmethod - def zero(cls) -> Dimension: - """ - Create a dimension that represents a zero size. (Used for 'invisible' - controls.) - """ - return cls.exact(amount=0) - - def __repr__(self) -> str: - fields = [] - if self.min_specified: - fields.append(f"min={self.min!r}") - if self.max_specified: - fields.append(f"max={self.max!r}") - if self.preferred_specified: - fields.append(f"preferred={self.preferred!r}") - if self.weight_specified: - fields.append(f"weight={self.weight!r}") - - return "Dimension({})".format(", ".join(fields)) - - -def sum_layout_dimensions(dimensions: list[Dimension]) -> Dimension: - """ - Sum a list of :class:`.Dimension` instances. - """ - min = sum(d.min for d in dimensions) - max = sum(d.max for d in dimensions) - preferred = sum(d.preferred for d in dimensions) - - return Dimension(min=min, max=max, preferred=preferred) - - -def max_layout_dimensions(dimensions: list[Dimension]) -> Dimension: - """ - Take the maximum of a list of :class:`.Dimension` instances. - Used when we have a HSplit/VSplit, and we want to get the best width/height.) - """ - if not len(dimensions): - return Dimension.zero() - - # If all dimensions are size zero. Return zero. - # (This is important for HSplit/VSplit, to report the right values to their - # parent when all children are invisible.) - if all(d.preferred == 0 and d.max == 0 for d in dimensions): - return Dimension.zero() - - # Ignore empty dimensions. (They should not reduce the size of others.) - dimensions = [d for d in dimensions if d.preferred != 0 and d.max != 0] - - if dimensions: - # Take the highest minimum dimension. - min_ = max(d.min for d in dimensions) - - # For the maximum, we would prefer not to go larger than then smallest - # 'max' value, unless other dimensions have a bigger preferred value. - # This seems to work best: - # - We don't want that a widget with a small height in a VSplit would - # shrink other widgets in the split. - # If it doesn't work well enough, then it's up to the UI designer to - # explicitly pass dimensions. - max_ = min(d.max for d in dimensions) - max_ = max(max_, max(d.preferred for d in dimensions)) - - # Make sure that min>=max. In some scenarios, when certain min..max - # ranges don't have any overlap, we can end up in such an impossible - # situation. In that case, give priority to the max value. - # E.g. taking (1..5) and (8..9) would return (8..5). Instead take (8..8). - if min_ > max_: - max_ = min_ - - preferred = max(d.preferred for d in dimensions) - - return Dimension(min=min_, max=max_, preferred=preferred) - else: - return Dimension() - - -# Anything that can be converted to a dimension. -AnyDimension = Union[ - None, # None is a valid dimension that will fit anything. - int, - Dimension, - # Callable[[], 'AnyDimension'] # Recursive definition not supported by mypy. - Callable[[], Any], -] - - -def to_dimension(value: AnyDimension) -> Dimension: - """ - Turn the given object into a `Dimension` object. - """ - if value is None: - return Dimension() - if isinstance(value, int): - return Dimension.exact(value) - if isinstance(value, Dimension): - return value - if callable(value): - return to_dimension(value()) - - raise ValueError("Not an integer or Dimension object.") - - -def is_dimension(value: object) -> TypeGuard[AnyDimension]: - """ - Test whether the given value could be a valid dimension. - (For usage in an assertion. It's not guaranteed in case of a callable.) - """ - if value is None: - return True - if callable(value): - return True # Assume it's a callable that doesn't take arguments. - if isinstance(value, (int, Dimension)): - return True - return False - - -# Common alias. -D = Dimension - -# For backward-compatibility. -LayoutDimension = Dimension diff --git a/voxvera/vendor/prompt_toolkit/layout/dummy.py b/voxvera/vendor/prompt_toolkit/layout/dummy.py deleted file mode 100644 index 1ee3e6c..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/dummy.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -Dummy layout. Used when somebody creates an `Application` without specifying a -`Layout`. -""" - -from __future__ import annotations - -from prompt_toolkit.formatted_text import HTML -from prompt_toolkit.key_binding import KeyBindings -from prompt_toolkit.key_binding.key_processor import KeyPressEvent - -from .containers import Window -from .controls import FormattedTextControl -from .dimension import D -from .layout import Layout - -__all__ = [ - "create_dummy_layout", -] - -E = KeyPressEvent - - -def create_dummy_layout() -> Layout: - """ - Create a dummy layout for use in an 'Application' that doesn't have a - layout specified. When ENTER is pressed, the application quits. - """ - kb = KeyBindings() - - @kb.add("enter") - def enter(event: E) -> None: - event.app.exit() - - control = FormattedTextControl( - HTML("No layout specified. Press ENTER to quit."), - key_bindings=kb, - ) - window = Window(content=control, height=D(min=1)) - return Layout(container=window, focused_element=window) diff --git a/voxvera/vendor/prompt_toolkit/layout/layout.py b/voxvera/vendor/prompt_toolkit/layout/layout.py deleted file mode 100644 index f9b7110..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/layout.py +++ /dev/null @@ -1,412 +0,0 @@ -""" -Wrapper for the layout. -""" - -from __future__ import annotations - -from typing import Generator, Iterable, Union - -from prompt_toolkit.buffer import Buffer - -from .containers import ( - AnyContainer, - ConditionalContainer, - Container, - Window, - to_container, -) -from .controls import BufferControl, SearchBufferControl, UIControl - -__all__ = [ - "Layout", - "InvalidLayoutError", - "walk", -] - -FocusableElement = Union[str, Buffer, UIControl, AnyContainer] - - -class Layout: - """ - The layout for a prompt_toolkit - :class:`~prompt_toolkit.application.Application`. - This also keeps track of which user control is focused. - - :param container: The "root" container for the layout. - :param focused_element: element to be focused initially. (Can be anything - the `focus` function accepts.) - """ - - def __init__( - self, - container: AnyContainer, - focused_element: FocusableElement | None = None, - ) -> None: - self.container = to_container(container) - self._stack: list[Window] = [] - - # Map search BufferControl back to the original BufferControl. - # This is used to keep track of when exactly we are searching, and for - # applying the search. - # When a link exists in this dictionary, that means the search is - # currently active. - # Map: search_buffer_control -> original buffer control. - self.search_links: dict[SearchBufferControl, BufferControl] = {} - - # Mapping that maps the children in the layout to their parent. - # This relationship is calculated dynamically, each time when the UI - # is rendered. (UI elements have only references to their children.) - self._child_to_parent: dict[Container, Container] = {} - - if focused_element is None: - try: - self._stack.append(next(self.find_all_windows())) - except StopIteration as e: - raise InvalidLayoutError( - "Invalid layout. The layout does not contain any Window object." - ) from e - else: - self.focus(focused_element) - - # List of visible windows. - self.visible_windows: list[Window] = [] # List of `Window` objects. - - def __repr__(self) -> str: - return f"Layout({self.container!r}, current_window={self.current_window!r})" - - def find_all_windows(self) -> Generator[Window, None, None]: - """ - Find all the :class:`.UIControl` objects in this layout. - """ - for item in self.walk(): - if isinstance(item, Window): - yield item - - def find_all_controls(self) -> Iterable[UIControl]: - for container in self.find_all_windows(): - yield container.content - - def focus(self, value: FocusableElement) -> None: - """ - Focus the given UI element. - - `value` can be either: - - - a :class:`.UIControl` - - a :class:`.Buffer` instance or the name of a :class:`.Buffer` - - a :class:`.Window` - - Any container object. In this case we will focus the :class:`.Window` - from this container that was focused most recent, or the very first - focusable :class:`.Window` of the container. - """ - # BufferControl by buffer name. - if isinstance(value, str): - for control in self.find_all_controls(): - if isinstance(control, BufferControl) and control.buffer.name == value: - self.focus(control) - return - raise ValueError(f"Couldn't find Buffer in the current layout: {value!r}.") - - # BufferControl by buffer object. - elif isinstance(value, Buffer): - for control in self.find_all_controls(): - if isinstance(control, BufferControl) and control.buffer == value: - self.focus(control) - return - raise ValueError(f"Couldn't find Buffer in the current layout: {value!r}.") - - # Focus UIControl. - elif isinstance(value, UIControl): - if value not in self.find_all_controls(): - raise ValueError( - "Invalid value. Container does not appear in the layout." - ) - if not value.is_focusable(): - raise ValueError("Invalid value. UIControl is not focusable.") - - self.current_control = value - - # Otherwise, expecting any Container object. - else: - value = to_container(value) - - if isinstance(value, Window): - # This is a `Window`: focus that. - if value not in self.find_all_windows(): - raise ValueError( - f"Invalid value. Window does not appear in the layout: {value!r}" - ) - - self.current_window = value - else: - # Focus a window in this container. - # If we have many windows as part of this container, and some - # of them have been focused before, take the last focused - # item. (This is very useful when the UI is composed of more - # complex sub components.) - windows = [] - for c in walk(value, skip_hidden=True): - if isinstance(c, Window) and c.content.is_focusable(): - windows.append(c) - - # Take the first one that was focused before. - for w in reversed(self._stack): - if w in windows: - self.current_window = w - return - - # None was focused before: take the very first focusable window. - if windows: - self.current_window = windows[0] - return - - raise ValueError( - f"Invalid value. Container cannot be focused: {value!r}" - ) - - def has_focus(self, value: FocusableElement) -> bool: - """ - Check whether the given control has the focus. - :param value: :class:`.UIControl` or :class:`.Window` instance. - """ - if isinstance(value, str): - if self.current_buffer is None: - return False - return self.current_buffer.name == value - if isinstance(value, Buffer): - return self.current_buffer == value - if isinstance(value, UIControl): - return self.current_control == value - else: - value = to_container(value) - if isinstance(value, Window): - return self.current_window == value - else: - # Check whether this "container" is focused. This is true if - # one of the elements inside is focused. - for element in walk(value): - if element == self.current_window: - return True - return False - - @property - def current_control(self) -> UIControl: - """ - Get the :class:`.UIControl` to currently has the focus. - """ - return self._stack[-1].content - - @current_control.setter - def current_control(self, control: UIControl) -> None: - """ - Set the :class:`.UIControl` to receive the focus. - """ - for window in self.find_all_windows(): - if window.content == control: - self.current_window = window - return - - raise ValueError("Control not found in the user interface.") - - @property - def current_window(self) -> Window: - "Return the :class:`.Window` object that is currently focused." - return self._stack[-1] - - @current_window.setter - def current_window(self, value: Window) -> None: - "Set the :class:`.Window` object to be currently focused." - self._stack.append(value) - - @property - def is_searching(self) -> bool: - "True if we are searching right now." - return self.current_control in self.search_links - - @property - def search_target_buffer_control(self) -> BufferControl | None: - """ - Return the :class:`.BufferControl` in which we are searching or `None`. - """ - # Not every `UIControl` is a `BufferControl`. This only applies to - # `BufferControl`. - control = self.current_control - - if isinstance(control, SearchBufferControl): - return self.search_links.get(control) - else: - return None - - def get_focusable_windows(self) -> Iterable[Window]: - """ - Return all the :class:`.Window` objects which are focusable (in the - 'modal' area). - """ - for w in self.walk_through_modal_area(): - if isinstance(w, Window) and w.content.is_focusable(): - yield w - - def get_visible_focusable_windows(self) -> list[Window]: - """ - Return a list of :class:`.Window` objects that are focusable. - """ - # focusable windows are windows that are visible, but also part of the - # modal container. Make sure to keep the ordering. - visible_windows = self.visible_windows - return [w for w in self.get_focusable_windows() if w in visible_windows] - - @property - def current_buffer(self) -> Buffer | None: - """ - The currently focused :class:`~.Buffer` or `None`. - """ - ui_control = self.current_control - if isinstance(ui_control, BufferControl): - return ui_control.buffer - return None - - def get_buffer_by_name(self, buffer_name: str) -> Buffer | None: - """ - Look in the layout for a buffer with the given name. - Return `None` when nothing was found. - """ - for w in self.walk(): - if isinstance(w, Window) and isinstance(w.content, BufferControl): - if w.content.buffer.name == buffer_name: - return w.content.buffer - return None - - @property - def buffer_has_focus(self) -> bool: - """ - Return `True` if the currently focused control is a - :class:`.BufferControl`. (For instance, used to determine whether the - default key bindings should be active or not.) - """ - ui_control = self.current_control - return isinstance(ui_control, BufferControl) - - @property - def previous_control(self) -> UIControl: - """ - Get the :class:`.UIControl` to previously had the focus. - """ - try: - return self._stack[-2].content - except IndexError: - return self._stack[-1].content - - def focus_last(self) -> None: - """ - Give the focus to the last focused control. - """ - if len(self._stack) > 1: - self._stack = self._stack[:-1] - - def focus_next(self) -> None: - """ - Focus the next visible/focusable Window. - """ - windows = self.get_visible_focusable_windows() - - if len(windows) > 0: - try: - index = windows.index(self.current_window) - except ValueError: - index = 0 - else: - index = (index + 1) % len(windows) - - self.focus(windows[index]) - - def focus_previous(self) -> None: - """ - Focus the previous visible/focusable Window. - """ - windows = self.get_visible_focusable_windows() - - if len(windows) > 0: - try: - index = windows.index(self.current_window) - except ValueError: - index = 0 - else: - index = (index - 1) % len(windows) - - self.focus(windows[index]) - - def walk(self) -> Iterable[Container]: - """ - Walk through all the layout nodes (and their children) and yield them. - """ - yield from walk(self.container) - - def walk_through_modal_area(self) -> Iterable[Container]: - """ - Walk through all the containers which are in the current 'modal' part - of the layout. - """ - # Go up in the tree, and find the root. (it will be a part of the - # layout, if the focus is in a modal part.) - root: Container = self.current_window - while not root.is_modal() and root in self._child_to_parent: - root = self._child_to_parent[root] - - yield from walk(root) - - def update_parents_relations(self) -> None: - """ - Update child->parent relationships mapping. - """ - parents = {} - - def walk(e: Container) -> None: - for c in e.get_children(): - parents[c] = e - walk(c) - - walk(self.container) - - self._child_to_parent = parents - - def reset(self) -> None: - # Remove all search links when the UI starts. - # (Important, for instance when control-c is been pressed while - # searching. The prompt cancels, but next `run()` call the search - # links are still there.) - self.search_links.clear() - - self.container.reset() - - def get_parent(self, container: Container) -> Container | None: - """ - Return the parent container for the given container, or ``None``, if it - wasn't found. - """ - try: - return self._child_to_parent[container] - except KeyError: - return None - - -class InvalidLayoutError(Exception): - pass - - -def walk(container: Container, skip_hidden: bool = False) -> Iterable[Container]: - """ - Walk through layout, starting at this container. - """ - # When `skip_hidden` is set, don't go into disabled ConditionalContainer containers. - if ( - skip_hidden - and isinstance(container, ConditionalContainer) - and not container.filter() - ): - return - - yield container - - for c in container.get_children(): - # yield from walk(c) - yield from walk(c, skip_hidden=skip_hidden) diff --git a/voxvera/vendor/prompt_toolkit/layout/margins.py b/voxvera/vendor/prompt_toolkit/layout/margins.py deleted file mode 100644 index 737a74d..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/margins.py +++ /dev/null @@ -1,304 +0,0 @@ -""" -Margin implementations for a :class:`~prompt_toolkit.layout.containers.Window`. -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import TYPE_CHECKING, Callable - -from prompt_toolkit.filters import FilterOrBool, to_filter -from prompt_toolkit.formatted_text import ( - StyleAndTextTuples, - fragment_list_to_text, - to_formatted_text, -) -from prompt_toolkit.utils import get_cwidth - -from .controls import UIContent - -if TYPE_CHECKING: - from .containers import WindowRenderInfo - -__all__ = [ - "Margin", - "NumberedMargin", - "ScrollbarMargin", - "ConditionalMargin", - "PromptMargin", -] - - -class Margin(metaclass=ABCMeta): - """ - Base interface for a margin. - """ - - @abstractmethod - def get_width(self, get_ui_content: Callable[[], UIContent]) -> int: - """ - Return the width that this margin is going to consume. - - :param get_ui_content: Callable that asks the user control to create - a :class:`.UIContent` instance. This can be used for instance to - obtain the number of lines. - """ - return 0 - - @abstractmethod - def create_margin( - self, window_render_info: WindowRenderInfo, width: int, height: int - ) -> StyleAndTextTuples: - """ - Creates a margin. - This should return a list of (style_str, text) tuples. - - :param window_render_info: - :class:`~prompt_toolkit.layout.containers.WindowRenderInfo` - instance, generated after rendering and copying the visible part of - the :class:`~prompt_toolkit.layout.controls.UIControl` into the - :class:`~prompt_toolkit.layout.containers.Window`. - :param width: The width that's available for this margin. (As reported - by :meth:`.get_width`.) - :param height: The height that's available for this margin. (The height - of the :class:`~prompt_toolkit.layout.containers.Window`.) - """ - return [] - - -class NumberedMargin(Margin): - """ - Margin that displays the line numbers. - - :param relative: Number relative to the cursor position. Similar to the Vi - 'relativenumber' option. - :param display_tildes: Display tildes after the end of the document, just - like Vi does. - """ - - def __init__( - self, relative: FilterOrBool = False, display_tildes: FilterOrBool = False - ) -> None: - self.relative = to_filter(relative) - self.display_tildes = to_filter(display_tildes) - - def get_width(self, get_ui_content: Callable[[], UIContent]) -> int: - line_count = get_ui_content().line_count - return max(3, len(f"{line_count}") + 1) - - def create_margin( - self, window_render_info: WindowRenderInfo, width: int, height: int - ) -> StyleAndTextTuples: - relative = self.relative() - - style = "class:line-number" - style_current = "class:line-number.current" - - # Get current line number. - current_lineno = window_render_info.ui_content.cursor_position.y - - # Construct margin. - result: StyleAndTextTuples = [] - last_lineno = None - - for y, lineno in enumerate(window_render_info.displayed_lines): - # Only display line number if this line is not a continuation of the previous line. - if lineno != last_lineno: - if lineno is None: - pass - elif lineno == current_lineno: - # Current line. - if relative: - # Left align current number in relative mode. - result.append((style_current, "%i" % (lineno + 1))) - else: - result.append( - (style_current, ("%i " % (lineno + 1)).rjust(width)) - ) - else: - # Other lines. - if relative: - lineno = abs(lineno - current_lineno) - 1 - - result.append((style, ("%i " % (lineno + 1)).rjust(width))) - - last_lineno = lineno - result.append(("", "\n")) - - # Fill with tildes. - if self.display_tildes(): - while y < window_render_info.window_height: - result.append(("class:tilde", "~\n")) - y += 1 - - return result - - -class ConditionalMargin(Margin): - """ - Wrapper around other :class:`.Margin` classes to show/hide them. - """ - - def __init__(self, margin: Margin, filter: FilterOrBool) -> None: - self.margin = margin - self.filter = to_filter(filter) - - def get_width(self, get_ui_content: Callable[[], UIContent]) -> int: - if self.filter(): - return self.margin.get_width(get_ui_content) - else: - return 0 - - def create_margin( - self, window_render_info: WindowRenderInfo, width: int, height: int - ) -> StyleAndTextTuples: - if width and self.filter(): - return self.margin.create_margin(window_render_info, width, height) - else: - return [] - - -class ScrollbarMargin(Margin): - """ - Margin displaying a scrollbar. - - :param display_arrows: Display scroll up/down arrows. - """ - - def __init__( - self, - display_arrows: FilterOrBool = False, - up_arrow_symbol: str = "^", - down_arrow_symbol: str = "v", - ) -> None: - self.display_arrows = to_filter(display_arrows) - self.up_arrow_symbol = up_arrow_symbol - self.down_arrow_symbol = down_arrow_symbol - - def get_width(self, get_ui_content: Callable[[], UIContent]) -> int: - return 1 - - def create_margin( - self, window_render_info: WindowRenderInfo, width: int, height: int - ) -> StyleAndTextTuples: - content_height = window_render_info.content_height - window_height = window_render_info.window_height - display_arrows = self.display_arrows() - - if display_arrows: - window_height -= 2 - - try: - fraction_visible = len(window_render_info.displayed_lines) / float( - content_height - ) - fraction_above = window_render_info.vertical_scroll / float(content_height) - - scrollbar_height = int( - min(window_height, max(1, window_height * fraction_visible)) - ) - scrollbar_top = int(window_height * fraction_above) - except ZeroDivisionError: - return [] - else: - - def is_scroll_button(row: int) -> bool: - "True if we should display a button on this row." - return scrollbar_top <= row <= scrollbar_top + scrollbar_height - - # Up arrow. - result: StyleAndTextTuples = [] - if display_arrows: - result.extend( - [ - ("class:scrollbar.arrow", self.up_arrow_symbol), - ("class:scrollbar", "\n"), - ] - ) - - # Scrollbar body. - scrollbar_background = "class:scrollbar.background" - scrollbar_background_start = "class:scrollbar.background,scrollbar.start" - scrollbar_button = "class:scrollbar.button" - scrollbar_button_end = "class:scrollbar.button,scrollbar.end" - - for i in range(window_height): - if is_scroll_button(i): - if not is_scroll_button(i + 1): - # Give the last cell a different style, because we - # want to underline this. - result.append((scrollbar_button_end, " ")) - else: - result.append((scrollbar_button, " ")) - else: - if is_scroll_button(i + 1): - result.append((scrollbar_background_start, " ")) - else: - result.append((scrollbar_background, " ")) - result.append(("", "\n")) - - # Down arrow - if display_arrows: - result.append(("class:scrollbar.arrow", self.down_arrow_symbol)) - - return result - - -class PromptMargin(Margin): - """ - [Deprecated] - - Create margin that displays a prompt. - This can display one prompt at the first line, and a continuation prompt - (e.g, just dots) on all the following lines. - - This `PromptMargin` implementation has been largely superseded in favor of - the `get_line_prefix` attribute of `Window`. The reason is that a margin is - always a fixed width, while `get_line_prefix` can return a variable width - prefix in front of every line, making it more powerful, especially for line - continuations. - - :param get_prompt: Callable returns formatted text or a list of - `(style_str, type)` tuples to be shown as the prompt at the first line. - :param get_continuation: Callable that takes three inputs. The width (int), - line_number (int), and is_soft_wrap (bool). It should return formatted - text or a list of `(style_str, type)` tuples for the next lines of the - input. - """ - - def __init__( - self, - get_prompt: Callable[[], StyleAndTextTuples], - get_continuation: None - | (Callable[[int, int, bool], StyleAndTextTuples]) = None, - ) -> None: - self.get_prompt = get_prompt - self.get_continuation = get_continuation - - def get_width(self, get_ui_content: Callable[[], UIContent]) -> int: - "Width to report to the `Window`." - # Take the width from the first line. - text = fragment_list_to_text(self.get_prompt()) - return get_cwidth(text) - - def create_margin( - self, window_render_info: WindowRenderInfo, width: int, height: int - ) -> StyleAndTextTuples: - get_continuation = self.get_continuation - result: StyleAndTextTuples = [] - - # First line. - result.extend(to_formatted_text(self.get_prompt())) - - # Next lines. - if get_continuation: - last_y = None - - for y in window_render_info.displayed_lines[1:]: - result.append(("", "\n")) - result.extend( - to_formatted_text(get_continuation(width, y, y == last_y)) - ) - last_y = y - - return result diff --git a/voxvera/vendor/prompt_toolkit/layout/menus.py b/voxvera/vendor/prompt_toolkit/layout/menus.py deleted file mode 100644 index 612e8ab..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/menus.py +++ /dev/null @@ -1,748 +0,0 @@ -from __future__ import annotations - -import math -from itertools import zip_longest -from typing import TYPE_CHECKING, Callable, Iterable, Sequence, TypeVar, cast -from weakref import WeakKeyDictionary - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.buffer import CompletionState -from prompt_toolkit.completion import Completion -from prompt_toolkit.data_structures import Point -from prompt_toolkit.filters import ( - Condition, - FilterOrBool, - has_completions, - is_done, - to_filter, -) -from prompt_toolkit.formatted_text import ( - StyleAndTextTuples, - fragment_list_width, - to_formatted_text, -) -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.layout.utils import explode_text_fragments -from prompt_toolkit.mouse_events import MouseEvent, MouseEventType -from prompt_toolkit.utils import get_cwidth - -from .containers import ConditionalContainer, HSplit, ScrollOffsets, Window -from .controls import GetLinePrefixCallable, UIContent, UIControl -from .dimension import Dimension -from .margins import ScrollbarMargin - -if TYPE_CHECKING: - from prompt_toolkit.key_binding.key_bindings import ( - KeyBindings, - NotImplementedOrNone, - ) - - -__all__ = [ - "CompletionsMenu", - "MultiColumnCompletionsMenu", -] - -E = KeyPressEvent - - -class CompletionsMenuControl(UIControl): - """ - Helper for drawing the complete menu to the screen. - - :param scroll_offset: Number (integer) representing the preferred amount of - completions to be displayed before and after the current one. When this - is a very high number, the current completion will be shown in the - middle most of the time. - """ - - # Preferred minimum size of the menu control. - # The CompletionsMenu class defines a width of 8, and there is a scrollbar - # of 1.) - MIN_WIDTH = 7 - - def has_focus(self) -> bool: - return False - - def preferred_width(self, max_available_width: int) -> int | None: - complete_state = get_app().current_buffer.complete_state - if complete_state: - menu_width = self._get_menu_width(500, complete_state) - menu_meta_width = self._get_menu_meta_width(500, complete_state) - - return menu_width + menu_meta_width - else: - return 0 - - def preferred_height( - self, - width: int, - max_available_height: int, - wrap_lines: bool, - get_line_prefix: GetLinePrefixCallable | None, - ) -> int | None: - complete_state = get_app().current_buffer.complete_state - if complete_state: - return len(complete_state.completions) - else: - return 0 - - def create_content(self, width: int, height: int) -> UIContent: - """ - Create a UIContent object for this control. - """ - complete_state = get_app().current_buffer.complete_state - if complete_state: - completions = complete_state.completions - index = complete_state.complete_index # Can be None! - - # Calculate width of completions menu. - menu_width = self._get_menu_width(width, complete_state) - menu_meta_width = self._get_menu_meta_width( - width - menu_width, complete_state - ) - show_meta = self._show_meta(complete_state) - - def get_line(i: int) -> StyleAndTextTuples: - c = completions[i] - is_current_completion = i == index - result = _get_menu_item_fragments( - c, is_current_completion, menu_width, space_after=True - ) - - if show_meta: - result += self._get_menu_item_meta_fragments( - c, is_current_completion, menu_meta_width - ) - return result - - return UIContent( - get_line=get_line, - cursor_position=Point(x=0, y=index or 0), - line_count=len(completions), - ) - - return UIContent() - - def _show_meta(self, complete_state: CompletionState) -> bool: - """ - Return ``True`` if we need to show a column with meta information. - """ - return any(c.display_meta_text for c in complete_state.completions) - - def _get_menu_width(self, max_width: int, complete_state: CompletionState) -> int: - """ - Return the width of the main column. - """ - return min( - max_width, - max( - self.MIN_WIDTH, - max(get_cwidth(c.display_text) for c in complete_state.completions) + 2, - ), - ) - - def _get_menu_meta_width( - self, max_width: int, complete_state: CompletionState - ) -> int: - """ - Return the width of the meta column. - """ - - def meta_width(completion: Completion) -> int: - return get_cwidth(completion.display_meta_text) - - if self._show_meta(complete_state): - # If the amount of completions is over 200, compute the width based - # on the first 200 completions, otherwise this can be very slow. - completions = complete_state.completions - if len(completions) > 200: - completions = completions[:200] - - return min(max_width, max(meta_width(c) for c in completions) + 2) - else: - return 0 - - def _get_menu_item_meta_fragments( - self, completion: Completion, is_current_completion: bool, width: int - ) -> StyleAndTextTuples: - if is_current_completion: - style_str = "class:completion-menu.meta.completion.current" - else: - style_str = "class:completion-menu.meta.completion" - - text, tw = _trim_formatted_text(completion.display_meta, width - 2) - padding = " " * (width - 1 - tw) - - return to_formatted_text( - cast(StyleAndTextTuples, []) + [("", " ")] + text + [("", padding)], - style=style_str, - ) - - def mouse_handler(self, mouse_event: MouseEvent) -> NotImplementedOrNone: - """ - Handle mouse events: clicking and scrolling. - """ - b = get_app().current_buffer - - if mouse_event.event_type == MouseEventType.MOUSE_UP: - # Select completion. - b.go_to_completion(mouse_event.position.y) - b.complete_state = None - - elif mouse_event.event_type == MouseEventType.SCROLL_DOWN: - # Scroll up. - b.complete_next(count=3, disable_wrap_around=True) - - elif mouse_event.event_type == MouseEventType.SCROLL_UP: - # Scroll down. - b.complete_previous(count=3, disable_wrap_around=True) - - return None - - -def _get_menu_item_fragments( - completion: Completion, - is_current_completion: bool, - width: int, - space_after: bool = False, -) -> StyleAndTextTuples: - """ - Get the style/text tuples for a menu item, styled and trimmed to the given - width. - """ - if is_current_completion: - style_str = f"class:completion-menu.completion.current {completion.style} {completion.selected_style}" - else: - style_str = "class:completion-menu.completion " + completion.style - - text, tw = _trim_formatted_text( - completion.display, (width - 2 if space_after else width - 1) - ) - - padding = " " * (width - 1 - tw) - - return to_formatted_text( - cast(StyleAndTextTuples, []) + [("", " ")] + text + [("", padding)], - style=style_str, - ) - - -def _trim_formatted_text( - formatted_text: StyleAndTextTuples, max_width: int -) -> tuple[StyleAndTextTuples, int]: - """ - Trim the text to `max_width`, append dots when the text is too long. - Returns (text, width) tuple. - """ - width = fragment_list_width(formatted_text) - - # When the text is too wide, trim it. - if width > max_width: - result = [] # Text fragments. - remaining_width = max_width - 3 - - for style_and_ch in explode_text_fragments(formatted_text): - ch_width = get_cwidth(style_and_ch[1]) - - if ch_width <= remaining_width: - result.append(style_and_ch) - remaining_width -= ch_width - else: - break - - result.append(("", "...")) - - return result, max_width - remaining_width - else: - return formatted_text, width - - -class CompletionsMenu(ConditionalContainer): - # NOTE: We use a pretty big z_index by default. Menus are supposed to be - # above anything else. We also want to make sure that the content is - # visible at the point where we draw this menu. - def __init__( - self, - max_height: int | None = None, - scroll_offset: int | Callable[[], int] = 0, - extra_filter: FilterOrBool = True, - display_arrows: FilterOrBool = False, - z_index: int = 10**8, - ) -> None: - extra_filter = to_filter(extra_filter) - display_arrows = to_filter(display_arrows) - - super().__init__( - content=Window( - content=CompletionsMenuControl(), - width=Dimension(min=8), - height=Dimension(min=1, max=max_height), - scroll_offsets=ScrollOffsets(top=scroll_offset, bottom=scroll_offset), - right_margins=[ScrollbarMargin(display_arrows=display_arrows)], - dont_extend_width=True, - style="class:completion-menu", - z_index=z_index, - ), - # Show when there are completions but not at the point we are - # returning the input. - filter=extra_filter & has_completions & ~is_done, - ) - - -class MultiColumnCompletionMenuControl(UIControl): - """ - Completion menu that displays all the completions in several columns. - When there are more completions than space for them to be displayed, an - arrow is shown on the left or right side. - - `min_rows` indicates how many rows will be available in any possible case. - When this is larger than one, it will try to use less columns and more - rows until this value is reached. - Be careful passing in a too big value, if less than the given amount of - rows are available, more columns would have been required, but - `preferred_width` doesn't know about that and reports a too small value. - This results in less completions displayed and additional scrolling. - (It's a limitation of how the layout engine currently works: first the - widths are calculated, then the heights.) - - :param suggested_max_column_width: The suggested max width of a column. - The column can still be bigger than this, but if there is place for two - columns of this width, we will display two columns. This to avoid that - if there is one very wide completion, that it doesn't significantly - reduce the amount of columns. - """ - - _required_margin = 3 # One extra padding on the right + space for arrows. - - def __init__(self, min_rows: int = 3, suggested_max_column_width: int = 30) -> None: - assert min_rows >= 1 - - self.min_rows = min_rows - self.suggested_max_column_width = suggested_max_column_width - self.scroll = 0 - - # Cache for column width computations. This computation is not cheap, - # so we don't want to do it over and over again while the user - # navigates through the completions. - # (map `completion_state` to `(completion_count, width)`. We remember - # the count, because a completer can add new completions to the - # `CompletionState` while loading.) - self._column_width_for_completion_state: WeakKeyDictionary[ - CompletionState, tuple[int, int] - ] = WeakKeyDictionary() - - # Info of last rendering. - self._rendered_rows = 0 - self._rendered_columns = 0 - self._total_columns = 0 - self._render_pos_to_completion: dict[tuple[int, int], Completion] = {} - self._render_left_arrow = False - self._render_right_arrow = False - self._render_width = 0 - - def reset(self) -> None: - self.scroll = 0 - - def has_focus(self) -> bool: - return False - - def preferred_width(self, max_available_width: int) -> int | None: - """ - Preferred width: prefer to use at least min_rows, but otherwise as much - as possible horizontally. - """ - complete_state = get_app().current_buffer.complete_state - if complete_state is None: - return 0 - - column_width = self._get_column_width(complete_state) - result = int( - column_width - * math.ceil(len(complete_state.completions) / float(self.min_rows)) - ) - - # When the desired width is still more than the maximum available, - # reduce by removing columns until we are less than the available - # width. - while ( - result > column_width - and result > max_available_width - self._required_margin - ): - result -= column_width - return result + self._required_margin - - def preferred_height( - self, - width: int, - max_available_height: int, - wrap_lines: bool, - get_line_prefix: GetLinePrefixCallable | None, - ) -> int | None: - """ - Preferred height: as much as needed in order to display all the completions. - """ - complete_state = get_app().current_buffer.complete_state - if complete_state is None: - return 0 - - column_width = self._get_column_width(complete_state) - column_count = max(1, (width - self._required_margin) // column_width) - - return int(math.ceil(len(complete_state.completions) / float(column_count))) - - def create_content(self, width: int, height: int) -> UIContent: - """ - Create a UIContent object for this menu. - """ - complete_state = get_app().current_buffer.complete_state - if complete_state is None: - return UIContent() - - column_width = self._get_column_width(complete_state) - self._render_pos_to_completion = {} - - _T = TypeVar("_T") - - def grouper( - n: int, iterable: Iterable[_T], fillvalue: _T | None = None - ) -> Iterable[Sequence[_T | None]]: - "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" - args = [iter(iterable)] * n - return zip_longest(fillvalue=fillvalue, *args) - - def is_current_completion(completion: Completion) -> bool: - "Returns True when this completion is the currently selected one." - return ( - complete_state is not None - and complete_state.complete_index is not None - and c == complete_state.current_completion - ) - - # Space required outside of the regular columns, for displaying the - # left and right arrow. - HORIZONTAL_MARGIN_REQUIRED = 3 - - # There should be at least one column, but it cannot be wider than - # the available width. - column_width = min(width - HORIZONTAL_MARGIN_REQUIRED, column_width) - - # However, when the columns tend to be very wide, because there are - # some very wide entries, shrink it anyway. - if column_width > self.suggested_max_column_width: - # `column_width` can still be bigger that `suggested_max_column_width`, - # but if there is place for two columns, we divide by two. - column_width //= column_width // self.suggested_max_column_width - - visible_columns = max(1, (width - self._required_margin) // column_width) - - columns_ = list(grouper(height, complete_state.completions)) - rows_ = list(zip(*columns_)) - - # Make sure the current completion is always visible: update scroll offset. - selected_column = (complete_state.complete_index or 0) // height - self.scroll = min( - selected_column, max(self.scroll, selected_column - visible_columns + 1) - ) - - render_left_arrow = self.scroll > 0 - render_right_arrow = self.scroll < len(rows_[0]) - visible_columns - - # Write completions to screen. - fragments_for_line = [] - - for row_index, row in enumerate(rows_): - fragments: StyleAndTextTuples = [] - middle_row = row_index == len(rows_) // 2 - - # Draw left arrow if we have hidden completions on the left. - if render_left_arrow: - fragments.append(("class:scrollbar", "<" if middle_row else " ")) - elif render_right_arrow: - # Reserve one column empty space. (If there is a right - # arrow right now, there can be a left arrow as well.) - fragments.append(("", " ")) - - # Draw row content. - for column_index, c in enumerate(row[self.scroll :][:visible_columns]): - if c is not None: - fragments += _get_menu_item_fragments( - c, is_current_completion(c), column_width, space_after=False - ) - - # Remember render position for mouse click handler. - for x in range(column_width): - self._render_pos_to_completion[ - (column_index * column_width + x, row_index) - ] = c - else: - fragments.append(("class:completion", " " * column_width)) - - # Draw trailing padding for this row. - # (_get_menu_item_fragments only returns padding on the left.) - if render_left_arrow or render_right_arrow: - fragments.append(("class:completion", " ")) - - # Draw right arrow if we have hidden completions on the right. - if render_right_arrow: - fragments.append(("class:scrollbar", ">" if middle_row else " ")) - elif render_left_arrow: - fragments.append(("class:completion", " ")) - - # Add line. - fragments_for_line.append( - to_formatted_text(fragments, style="class:completion-menu") - ) - - self._rendered_rows = height - self._rendered_columns = visible_columns - self._total_columns = len(columns_) - self._render_left_arrow = render_left_arrow - self._render_right_arrow = render_right_arrow - self._render_width = ( - column_width * visible_columns + render_left_arrow + render_right_arrow + 1 - ) - - def get_line(i: int) -> StyleAndTextTuples: - return fragments_for_line[i] - - return UIContent(get_line=get_line, line_count=len(rows_)) - - def _get_column_width(self, completion_state: CompletionState) -> int: - """ - Return the width of each column. - """ - try: - count, width = self._column_width_for_completion_state[completion_state] - if count != len(completion_state.completions): - # Number of completions changed, recompute. - raise KeyError - return width - except KeyError: - result = ( - max(get_cwidth(c.display_text) for c in completion_state.completions) - + 1 - ) - self._column_width_for_completion_state[completion_state] = ( - len(completion_state.completions), - result, - ) - return result - - def mouse_handler(self, mouse_event: MouseEvent) -> NotImplementedOrNone: - """ - Handle scroll and click events. - """ - b = get_app().current_buffer - - def scroll_left() -> None: - b.complete_previous(count=self._rendered_rows, disable_wrap_around=True) - self.scroll = max(0, self.scroll - 1) - - def scroll_right() -> None: - b.complete_next(count=self._rendered_rows, disable_wrap_around=True) - self.scroll = min( - self._total_columns - self._rendered_columns, self.scroll + 1 - ) - - if mouse_event.event_type == MouseEventType.SCROLL_DOWN: - scroll_right() - - elif mouse_event.event_type == MouseEventType.SCROLL_UP: - scroll_left() - - elif mouse_event.event_type == MouseEventType.MOUSE_UP: - x = mouse_event.position.x - y = mouse_event.position.y - - # Mouse click on left arrow. - if x == 0: - if self._render_left_arrow: - scroll_left() - - # Mouse click on right arrow. - elif x == self._render_width - 1: - if self._render_right_arrow: - scroll_right() - - # Mouse click on completion. - else: - completion = self._render_pos_to_completion.get((x, y)) - if completion: - b.apply_completion(completion) - - return None - - def get_key_bindings(self) -> KeyBindings: - """ - Expose key bindings that handle the left/right arrow keys when the menu - is displayed. - """ - from prompt_toolkit.key_binding.key_bindings import KeyBindings - - kb = KeyBindings() - - @Condition - def filter() -> bool: - "Only handle key bindings if this menu is visible." - app = get_app() - complete_state = app.current_buffer.complete_state - - # There need to be completions, and one needs to be selected. - if complete_state is None or complete_state.complete_index is None: - return False - - # This menu needs to be visible. - return any(window.content == self for window in app.layout.visible_windows) - - def move(right: bool = False) -> None: - buff = get_app().current_buffer - complete_state = buff.complete_state - - if complete_state is not None and complete_state.complete_index is not None: - # Calculate new complete index. - new_index = complete_state.complete_index - if right: - new_index += self._rendered_rows - else: - new_index -= self._rendered_rows - - if 0 <= new_index < len(complete_state.completions): - buff.go_to_completion(new_index) - - # NOTE: the is_global is required because the completion menu will - # never be focussed. - - @kb.add("left", is_global=True, filter=filter) - def _left(event: E) -> None: - move() - - @kb.add("right", is_global=True, filter=filter) - def _right(event: E) -> None: - move(True) - - return kb - - -class MultiColumnCompletionsMenu(HSplit): - """ - Container that displays the completions in several columns. - When `show_meta` (a :class:`~prompt_toolkit.filters.Filter`) evaluates - to True, it shows the meta information at the bottom. - """ - - def __init__( - self, - min_rows: int = 3, - suggested_max_column_width: int = 30, - show_meta: FilterOrBool = True, - extra_filter: FilterOrBool = True, - z_index: int = 10**8, - ) -> None: - show_meta = to_filter(show_meta) - extra_filter = to_filter(extra_filter) - - # Display filter: show when there are completions but not at the point - # we are returning the input. - full_filter = extra_filter & has_completions & ~is_done - - @Condition - def any_completion_has_meta() -> bool: - complete_state = get_app().current_buffer.complete_state - return complete_state is not None and any( - c.display_meta for c in complete_state.completions - ) - - # Create child windows. - # NOTE: We don't set style='class:completion-menu' to the - # `MultiColumnCompletionMenuControl`, because this is used in a - # Float that is made transparent, and the size of the control - # doesn't always correspond exactly with the size of the - # generated content. - completions_window = ConditionalContainer( - content=Window( - content=MultiColumnCompletionMenuControl( - min_rows=min_rows, - suggested_max_column_width=suggested_max_column_width, - ), - width=Dimension(min=8), - height=Dimension(min=1), - ), - filter=full_filter, - ) - - meta_window = ConditionalContainer( - content=Window(content=_SelectedCompletionMetaControl()), - filter=full_filter & show_meta & any_completion_has_meta, - ) - - # Initialize split. - super().__init__([completions_window, meta_window], z_index=z_index) - - -class _SelectedCompletionMetaControl(UIControl): - """ - Control that shows the meta information of the selected completion. - """ - - def preferred_width(self, max_available_width: int) -> int | None: - """ - Report the width of the longest meta text as the preferred width of this control. - - It could be that we use less width, but this way, we're sure that the - layout doesn't change when we select another completion (E.g. that - completions are suddenly shown in more or fewer columns.) - """ - app = get_app() - if app.current_buffer.complete_state: - state = app.current_buffer.complete_state - - if len(state.completions) >= 30: - # When there are many completions, calling `get_cwidth` for - # every `display_meta_text` is too expensive. In this case, - # just return the max available width. There will be enough - # columns anyway so that the whole screen is filled with - # completions and `create_content` will then take up as much - # space as needed. - return max_available_width - - return 2 + max( - get_cwidth(c.display_meta_text) for c in state.completions[:100] - ) - else: - return 0 - - def preferred_height( - self, - width: int, - max_available_height: int, - wrap_lines: bool, - get_line_prefix: GetLinePrefixCallable | None, - ) -> int | None: - return 1 - - def create_content(self, width: int, height: int) -> UIContent: - fragments = self._get_text_fragments() - - def get_line(i: int) -> StyleAndTextTuples: - return fragments - - return UIContent(get_line=get_line, line_count=1 if fragments else 0) - - def _get_text_fragments(self) -> StyleAndTextTuples: - style = "class:completion-menu.multi-column-meta" - state = get_app().current_buffer.complete_state - - if ( - state - and state.current_completion - and state.current_completion.display_meta_text - ): - return to_formatted_text( - cast(StyleAndTextTuples, [("", " ")]) - + state.current_completion.display_meta - + [("", " ")], - style=style, - ) - - return [] diff --git a/voxvera/vendor/prompt_toolkit/layout/mouse_handlers.py b/voxvera/vendor/prompt_toolkit/layout/mouse_handlers.py deleted file mode 100644 index 52deac1..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/mouse_handlers.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -from collections import defaultdict -from typing import TYPE_CHECKING, Callable - -from prompt_toolkit.mouse_events import MouseEvent - -if TYPE_CHECKING: - from prompt_toolkit.key_binding.key_bindings import NotImplementedOrNone - -__all__ = [ - "MouseHandler", - "MouseHandlers", -] - - -MouseHandler = Callable[[MouseEvent], "NotImplementedOrNone"] - - -class MouseHandlers: - """ - Two dimensional raster of callbacks for mouse events. - """ - - def __init__(self) -> None: - def dummy_callback(mouse_event: MouseEvent) -> NotImplementedOrNone: - """ - :param mouse_event: `MouseEvent` instance. - """ - return NotImplemented - - # NOTE: Previously, the data structure was a dictionary mapping (x,y) - # to the handlers. This however would be more inefficient when copying - # over the mouse handlers of the visible region in the scrollable pane. - - # Map y (row) to x (column) to handlers. - self.mouse_handlers: defaultdict[int, defaultdict[int, MouseHandler]] = ( - defaultdict(lambda: defaultdict(lambda: dummy_callback)) - ) - - def set_mouse_handler_for_range( - self, - x_min: int, - x_max: int, - y_min: int, - y_max: int, - handler: Callable[[MouseEvent], NotImplementedOrNone], - ) -> None: - """ - Set mouse handler for a region. - """ - for y in range(y_min, y_max): - row = self.mouse_handlers[y] - - for x in range(x_min, x_max): - row[x] = handler diff --git a/voxvera/vendor/prompt_toolkit/layout/processors.py b/voxvera/vendor/prompt_toolkit/layout/processors.py deleted file mode 100644 index 666e79c..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/processors.py +++ /dev/null @@ -1,1016 +0,0 @@ -""" -Processors are little transformation blocks that transform the fragments list -from a buffer before the BufferControl will render it to the screen. - -They can insert fragments before or after, or highlight fragments by replacing the -fragment types. -""" - -from __future__ import annotations - -import re -from abc import ABCMeta, abstractmethod -from typing import TYPE_CHECKING, Callable, Hashable, cast - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.cache import SimpleCache -from prompt_toolkit.document import Document -from prompt_toolkit.filters import FilterOrBool, to_filter, vi_insert_multiple_mode -from prompt_toolkit.formatted_text import ( - AnyFormattedText, - StyleAndTextTuples, - to_formatted_text, -) -from prompt_toolkit.formatted_text.utils import fragment_list_len, fragment_list_to_text -from prompt_toolkit.search import SearchDirection -from prompt_toolkit.utils import to_int, to_str - -from .utils import explode_text_fragments - -if TYPE_CHECKING: - from .controls import BufferControl, UIContent - -__all__ = [ - "Processor", - "TransformationInput", - "Transformation", - "DummyProcessor", - "HighlightSearchProcessor", - "HighlightIncrementalSearchProcessor", - "HighlightSelectionProcessor", - "PasswordProcessor", - "HighlightMatchingBracketProcessor", - "DisplayMultipleCursors", - "BeforeInput", - "ShowArg", - "AfterInput", - "AppendAutoSuggestion", - "ConditionalProcessor", - "ShowLeadingWhiteSpaceProcessor", - "ShowTrailingWhiteSpaceProcessor", - "TabsProcessor", - "ReverseSearchProcessor", - "DynamicProcessor", - "merge_processors", -] - - -class Processor(metaclass=ABCMeta): - """ - Manipulate the fragments for a given line in a - :class:`~prompt_toolkit.layout.controls.BufferControl`. - """ - - @abstractmethod - def apply_transformation( - self, transformation_input: TransformationInput - ) -> Transformation: - """ - Apply transformation. Returns a :class:`.Transformation` instance. - - :param transformation_input: :class:`.TransformationInput` object. - """ - return Transformation(transformation_input.fragments) - - -SourceToDisplay = Callable[[int], int] -DisplayToSource = Callable[[int], int] - - -class TransformationInput: - """ - :param buffer_control: :class:`.BufferControl` instance. - :param lineno: The number of the line to which we apply the processor. - :param source_to_display: A function that returns the position in the - `fragments` for any position in the source string. (This takes - previous processors into account.) - :param fragments: List of fragments that we can transform. (Received from the - previous processor.) - :param get_line: Optional ; a callable that returns the fragments of another - line in the current buffer; This can be used to create processors capable - of affecting transforms across multiple lines. - """ - - def __init__( - self, - buffer_control: BufferControl, - document: Document, - lineno: int, - source_to_display: SourceToDisplay, - fragments: StyleAndTextTuples, - width: int, - height: int, - get_line: Callable[[int], StyleAndTextTuples] | None = None, - ) -> None: - self.buffer_control = buffer_control - self.document = document - self.lineno = lineno - self.source_to_display = source_to_display - self.fragments = fragments - self.width = width - self.height = height - self.get_line = get_line - - def unpack( - self, - ) -> tuple[ - BufferControl, Document, int, SourceToDisplay, StyleAndTextTuples, int, int - ]: - return ( - self.buffer_control, - self.document, - self.lineno, - self.source_to_display, - self.fragments, - self.width, - self.height, - ) - - -class Transformation: - """ - Transformation result, as returned by :meth:`.Processor.apply_transformation`. - - Important: Always make sure that the length of `document.text` is equal to - the length of all the text in `fragments`! - - :param fragments: The transformed fragments. To be displayed, or to pass to - the next processor. - :param source_to_display: Cursor position transformation from original - string to transformed string. - :param display_to_source: Cursor position transformed from source string to - original string. - """ - - def __init__( - self, - fragments: StyleAndTextTuples, - source_to_display: SourceToDisplay | None = None, - display_to_source: DisplayToSource | None = None, - ) -> None: - self.fragments = fragments - self.source_to_display = source_to_display or (lambda i: i) - self.display_to_source = display_to_source or (lambda i: i) - - -class DummyProcessor(Processor): - """ - A `Processor` that doesn't do anything. - """ - - def apply_transformation( - self, transformation_input: TransformationInput - ) -> Transformation: - return Transformation(transformation_input.fragments) - - -class HighlightSearchProcessor(Processor): - """ - Processor that highlights search matches in the document. - Note that this doesn't support multiline search matches yet. - - The style classes 'search' and 'search.current' will be applied to the - content. - """ - - _classname = "search" - _classname_current = "search.current" - - def _get_search_text(self, buffer_control: BufferControl) -> str: - """ - The text we are searching for. - """ - return buffer_control.search_state.text - - def apply_transformation( - self, transformation_input: TransformationInput - ) -> Transformation: - ( - buffer_control, - document, - lineno, - source_to_display, - fragments, - _, - _, - ) = transformation_input.unpack() - - search_text = self._get_search_text(buffer_control) - searchmatch_fragment = f" class:{self._classname} " - searchmatch_current_fragment = f" class:{self._classname_current} " - - if search_text and not get_app().is_done: - # For each search match, replace the style string. - line_text = fragment_list_to_text(fragments) - fragments = explode_text_fragments(fragments) - - if buffer_control.search_state.ignore_case(): - flags = re.IGNORECASE - else: - flags = re.RegexFlag(0) - - # Get cursor column. - cursor_column: int | None - if document.cursor_position_row == lineno: - cursor_column = source_to_display(document.cursor_position_col) - else: - cursor_column = None - - for match in re.finditer(re.escape(search_text), line_text, flags=flags): - if cursor_column is not None: - on_cursor = match.start() <= cursor_column < match.end() - else: - on_cursor = False - - for i in range(match.start(), match.end()): - old_fragment, text, *_ = fragments[i] - if on_cursor: - fragments[i] = ( - old_fragment + searchmatch_current_fragment, - fragments[i][1], - ) - else: - fragments[i] = ( - old_fragment + searchmatch_fragment, - fragments[i][1], - ) - - return Transformation(fragments) - - -class HighlightIncrementalSearchProcessor(HighlightSearchProcessor): - """ - Highlight the search terms that are used for highlighting the incremental - search. The style class 'incsearch' will be applied to the content. - - Important: this requires the `preview_search=True` flag to be set for the - `BufferControl`. Otherwise, the cursor position won't be set to the search - match while searching, and nothing happens. - """ - - _classname = "incsearch" - _classname_current = "incsearch.current" - - def _get_search_text(self, buffer_control: BufferControl) -> str: - """ - The text we are searching for. - """ - # When the search buffer has focus, take that text. - search_buffer = buffer_control.search_buffer - if search_buffer is not None and search_buffer.text: - return search_buffer.text - return "" - - -class HighlightSelectionProcessor(Processor): - """ - Processor that highlights the selection in the document. - """ - - def apply_transformation( - self, transformation_input: TransformationInput - ) -> Transformation: - ( - buffer_control, - document, - lineno, - source_to_display, - fragments, - _, - _, - ) = transformation_input.unpack() - - selected_fragment = " class:selected " - - # In case of selection, highlight all matches. - selection_at_line = document.selection_range_at_line(lineno) - - if selection_at_line: - from_, to = selection_at_line - from_ = source_to_display(from_) - to = source_to_display(to) - - fragments = explode_text_fragments(fragments) - - if from_ == 0 and to == 0 and len(fragments) == 0: - # When this is an empty line, insert a space in order to - # visualize the selection. - return Transformation([(selected_fragment, " ")]) - else: - for i in range(from_, to): - if i < len(fragments): - old_fragment, old_text, *_ = fragments[i] - fragments[i] = (old_fragment + selected_fragment, old_text) - elif i == len(fragments): - fragments.append((selected_fragment, " ")) - - return Transformation(fragments) - - -class PasswordProcessor(Processor): - """ - Processor that masks the input. (For passwords.) - - :param char: (string) Character to be used. "*" by default. - """ - - def __init__(self, char: str = "*") -> None: - self.char = char - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - fragments: StyleAndTextTuples = cast( - StyleAndTextTuples, - [ - (style, self.char * len(text), *handler) - for style, text, *handler in ti.fragments - ], - ) - - return Transformation(fragments) - - -class HighlightMatchingBracketProcessor(Processor): - """ - When the cursor is on or right after a bracket, it highlights the matching - bracket. - - :param max_cursor_distance: Only highlight matching brackets when the - cursor is within this distance. (From inside a `Processor`, we can't - know which lines will be visible on the screen. But we also don't want - to scan the whole document for matching brackets on each key press, so - we limit to this value.) - """ - - _closing_braces = "])}>" - - def __init__( - self, chars: str = "[](){}<>", max_cursor_distance: int = 1000 - ) -> None: - self.chars = chars - self.max_cursor_distance = max_cursor_distance - - self._positions_cache: SimpleCache[Hashable, list[tuple[int, int]]] = ( - SimpleCache(maxsize=8) - ) - - def _get_positions_to_highlight(self, document: Document) -> list[tuple[int, int]]: - """ - Return a list of (row, col) tuples that need to be highlighted. - """ - pos: int | None - - # Try for the character under the cursor. - if document.current_char and document.current_char in self.chars: - pos = document.find_matching_bracket_position( - start_pos=document.cursor_position - self.max_cursor_distance, - end_pos=document.cursor_position + self.max_cursor_distance, - ) - - # Try for the character before the cursor. - elif ( - document.char_before_cursor - and document.char_before_cursor in self._closing_braces - and document.char_before_cursor in self.chars - ): - document = Document(document.text, document.cursor_position - 1) - - pos = document.find_matching_bracket_position( - start_pos=document.cursor_position - self.max_cursor_distance, - end_pos=document.cursor_position + self.max_cursor_distance, - ) - else: - pos = None - - # Return a list of (row, col) tuples that need to be highlighted. - if pos: - pos += document.cursor_position # pos is relative. - row, col = document.translate_index_to_position(pos) - return [ - (row, col), - (document.cursor_position_row, document.cursor_position_col), - ] - else: - return [] - - def apply_transformation( - self, transformation_input: TransformationInput - ) -> Transformation: - ( - buffer_control, - document, - lineno, - source_to_display, - fragments, - _, - _, - ) = transformation_input.unpack() - - # When the application is in the 'done' state, don't highlight. - if get_app().is_done: - return Transformation(fragments) - - # Get the highlight positions. - key = (get_app().render_counter, document.text, document.cursor_position) - positions = self._positions_cache.get( - key, lambda: self._get_positions_to_highlight(document) - ) - - # Apply if positions were found at this line. - if positions: - for row, col in positions: - if row == lineno: - col = source_to_display(col) - fragments = explode_text_fragments(fragments) - style, text, *_ = fragments[col] - - if col == document.cursor_position_col: - style += " class:matching-bracket.cursor " - else: - style += " class:matching-bracket.other " - - fragments[col] = (style, text) - - return Transformation(fragments) - - -class DisplayMultipleCursors(Processor): - """ - When we're in Vi block insert mode, display all the cursors. - """ - - def apply_transformation( - self, transformation_input: TransformationInput - ) -> Transformation: - ( - buffer_control, - document, - lineno, - source_to_display, - fragments, - _, - _, - ) = transformation_input.unpack() - - buff = buffer_control.buffer - - if vi_insert_multiple_mode(): - cursor_positions = buff.multiple_cursor_positions - fragments = explode_text_fragments(fragments) - - # If any cursor appears on the current line, highlight that. - start_pos = document.translate_row_col_to_index(lineno, 0) - end_pos = start_pos + len(document.lines[lineno]) - - fragment_suffix = " class:multiple-cursors" - - for p in cursor_positions: - if start_pos <= p <= end_pos: - column = source_to_display(p - start_pos) - - # Replace fragment. - try: - style, text, *_ = fragments[column] - except IndexError: - # Cursor needs to be displayed after the current text. - fragments.append((fragment_suffix, " ")) - else: - style += fragment_suffix - fragments[column] = (style, text) - - return Transformation(fragments) - else: - return Transformation(fragments) - - -class BeforeInput(Processor): - """ - Insert text before the input. - - :param text: This can be either plain text or formatted text - (or a callable that returns any of those). - :param style: style to be applied to this prompt/prefix. - """ - - def __init__(self, text: AnyFormattedText, style: str = "") -> None: - self.text = text - self.style = style - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - source_to_display: SourceToDisplay | None - display_to_source: DisplayToSource | None - - if ti.lineno == 0: - # Get fragments. - fragments_before = to_formatted_text(self.text, self.style) - fragments = fragments_before + ti.fragments - - shift_position = fragment_list_len(fragments_before) - source_to_display = lambda i: i + shift_position - display_to_source = lambda i: i - shift_position - else: - fragments = ti.fragments - source_to_display = None - display_to_source = None - - return Transformation( - fragments, - source_to_display=source_to_display, - display_to_source=display_to_source, - ) - - def __repr__(self) -> str: - return f"BeforeInput({self.text!r}, {self.style!r})" - - -class ShowArg(BeforeInput): - """ - Display the 'arg' in front of the input. - - This was used by the `PromptSession`, but now it uses the - `Window.get_line_prefix` function instead. - """ - - def __init__(self) -> None: - super().__init__(self._get_text_fragments) - - def _get_text_fragments(self) -> StyleAndTextTuples: - app = get_app() - if app.key_processor.arg is None: - return [] - else: - arg = app.key_processor.arg - - return [ - ("class:prompt.arg", "(arg: "), - ("class:prompt.arg.text", str(arg)), - ("class:prompt.arg", ") "), - ] - - def __repr__(self) -> str: - return "ShowArg()" - - -class AfterInput(Processor): - """ - Insert text after the input. - - :param text: This can be either plain text or formatted text - (or a callable that returns any of those). - :param style: style to be applied to this prompt/prefix. - """ - - def __init__(self, text: AnyFormattedText, style: str = "") -> None: - self.text = text - self.style = style - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - # Insert fragments after the last line. - if ti.lineno == ti.document.line_count - 1: - # Get fragments. - fragments_after = to_formatted_text(self.text, self.style) - return Transformation(fragments=ti.fragments + fragments_after) - else: - return Transformation(fragments=ti.fragments) - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.text!r}, style={self.style!r})" - - -class AppendAutoSuggestion(Processor): - """ - Append the auto suggestion to the input. - (The user can then press the right arrow the insert the suggestion.) - """ - - def __init__(self, style: str = "class:auto-suggestion") -> None: - self.style = style - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - # Insert fragments after the last line. - if ti.lineno == ti.document.line_count - 1: - buffer = ti.buffer_control.buffer - - if buffer.suggestion and ti.document.is_cursor_at_the_end: - suggestion = buffer.suggestion.text - else: - suggestion = "" - - return Transformation(fragments=ti.fragments + [(self.style, suggestion)]) - else: - return Transformation(fragments=ti.fragments) - - -class ShowLeadingWhiteSpaceProcessor(Processor): - """ - Make leading whitespace visible. - - :param get_char: Callable that returns one character. - """ - - def __init__( - self, - get_char: Callable[[], str] | None = None, - style: str = "class:leading-whitespace", - ) -> None: - def default_get_char() -> str: - if "\xb7".encode(get_app().output.encoding(), "replace") == b"?": - return "." - else: - return "\xb7" - - self.style = style - self.get_char = get_char or default_get_char - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - fragments = ti.fragments - - # Walk through all te fragments. - if fragments and fragment_list_to_text(fragments).startswith(" "): - t = (self.style, self.get_char()) - fragments = explode_text_fragments(fragments) - - for i in range(len(fragments)): - if fragments[i][1] == " ": - fragments[i] = t - else: - break - - return Transformation(fragments) - - -class ShowTrailingWhiteSpaceProcessor(Processor): - """ - Make trailing whitespace visible. - - :param get_char: Callable that returns one character. - """ - - def __init__( - self, - get_char: Callable[[], str] | None = None, - style: str = "class:training-whitespace", - ) -> None: - def default_get_char() -> str: - if "\xb7".encode(get_app().output.encoding(), "replace") == b"?": - return "." - else: - return "\xb7" - - self.style = style - self.get_char = get_char or default_get_char - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - fragments = ti.fragments - - if fragments and fragments[-1][1].endswith(" "): - t = (self.style, self.get_char()) - fragments = explode_text_fragments(fragments) - - # Walk backwards through all te fragments and replace whitespace. - for i in range(len(fragments) - 1, -1, -1): - char = fragments[i][1] - if char == " ": - fragments[i] = t - else: - break - - return Transformation(fragments) - - -class TabsProcessor(Processor): - """ - Render tabs as spaces (instead of ^I) or make them visible (for instance, - by replacing them with dots.) - - :param tabstop: Horizontal space taken by a tab. (`int` or callable that - returns an `int`). - :param char1: Character or callable that returns a character (text of - length one). This one is used for the first space taken by the tab. - :param char2: Like `char1`, but for the rest of the space. - """ - - def __init__( - self, - tabstop: int | Callable[[], int] = 4, - char1: str | Callable[[], str] = "|", - char2: str | Callable[[], str] = "\u2508", - style: str = "class:tab", - ) -> None: - self.char1 = char1 - self.char2 = char2 - self.tabstop = tabstop - self.style = style - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - tabstop = to_int(self.tabstop) - style = self.style - - # Create separator for tabs. - separator1 = to_str(self.char1) - separator2 = to_str(self.char2) - - # Transform fragments. - fragments = explode_text_fragments(ti.fragments) - - position_mappings = {} - result_fragments: StyleAndTextTuples = [] - pos = 0 - - for i, fragment_and_text in enumerate(fragments): - position_mappings[i] = pos - - if fragment_and_text[1] == "\t": - # Calculate how many characters we have to insert. - count = tabstop - (pos % tabstop) - if count == 0: - count = tabstop - - # Insert tab. - result_fragments.append((style, separator1)) - result_fragments.append((style, separator2 * (count - 1))) - pos += count - else: - result_fragments.append(fragment_and_text) - pos += 1 - - position_mappings[len(fragments)] = pos - # Add `pos+1` to mapping, because the cursor can be right after the - # line as well. - position_mappings[len(fragments) + 1] = pos + 1 - - def source_to_display(from_position: int) -> int: - "Maps original cursor position to the new one." - return position_mappings[from_position] - - def display_to_source(display_pos: int) -> int: - "Maps display cursor position to the original one." - position_mappings_reversed = {v: k for k, v in position_mappings.items()} - - while display_pos >= 0: - try: - return position_mappings_reversed[display_pos] - except KeyError: - display_pos -= 1 - return 0 - - return Transformation( - result_fragments, - source_to_display=source_to_display, - display_to_source=display_to_source, - ) - - -class ReverseSearchProcessor(Processor): - """ - Process to display the "(reverse-i-search)`...`:..." stuff around - the search buffer. - - Note: This processor is meant to be applied to the BufferControl that - contains the search buffer, it's not meant for the original input. - """ - - _excluded_input_processors: list[type[Processor]] = [ - HighlightSearchProcessor, - HighlightSelectionProcessor, - BeforeInput, - AfterInput, - ] - - def _get_main_buffer(self, buffer_control: BufferControl) -> BufferControl | None: - from prompt_toolkit.layout.controls import BufferControl - - prev_control = get_app().layout.search_target_buffer_control - if ( - isinstance(prev_control, BufferControl) - and prev_control.search_buffer_control == buffer_control - ): - return prev_control - return None - - def _content( - self, main_control: BufferControl, ti: TransformationInput - ) -> UIContent: - from prompt_toolkit.layout.controls import BufferControl - - # Emulate the BufferControl through which we are searching. - # For this we filter out some of the input processors. - excluded_processors = tuple(self._excluded_input_processors) - - def filter_processor(item: Processor) -> Processor | None: - """Filter processors from the main control that we want to disable - here. This returns either an accepted processor or None.""" - # For a `_MergedProcessor`, check each individual processor, recursively. - if isinstance(item, _MergedProcessor): - accepted_processors = [filter_processor(p) for p in item.processors] - return merge_processors( - [p for p in accepted_processors if p is not None] - ) - - # For a `ConditionalProcessor`, check the body. - elif isinstance(item, ConditionalProcessor): - p = filter_processor(item.processor) - if p: - return ConditionalProcessor(p, item.filter) - - # Otherwise, check the processor itself. - else: - if not isinstance(item, excluded_processors): - return item - - return None - - filtered_processor = filter_processor( - merge_processors(main_control.input_processors or []) - ) - highlight_processor = HighlightIncrementalSearchProcessor() - - if filtered_processor: - new_processors = [filtered_processor, highlight_processor] - else: - new_processors = [highlight_processor] - - from .controls import SearchBufferControl - - assert isinstance(ti.buffer_control, SearchBufferControl) - - buffer_control = BufferControl( - buffer=main_control.buffer, - input_processors=new_processors, - include_default_input_processors=False, - lexer=main_control.lexer, - preview_search=True, - search_buffer_control=ti.buffer_control, - ) - - return buffer_control.create_content(ti.width, ti.height, preview_search=True) - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - from .controls import SearchBufferControl - - assert isinstance(ti.buffer_control, SearchBufferControl), ( - "`ReverseSearchProcessor` should be applied to a `SearchBufferControl` only." - ) - - source_to_display: SourceToDisplay | None - display_to_source: DisplayToSource | None - - main_control = self._get_main_buffer(ti.buffer_control) - - if ti.lineno == 0 and main_control: - content = self._content(main_control, ti) - - # Get the line from the original document for this search. - line_fragments = content.get_line(content.cursor_position.y) - - if main_control.search_state.direction == SearchDirection.FORWARD: - direction_text = "i-search" - else: - direction_text = "reverse-i-search" - - fragments_before: StyleAndTextTuples = [ - ("class:prompt.search", "("), - ("class:prompt.search", direction_text), - ("class:prompt.search", ")`"), - ] - - fragments = ( - fragments_before - + [ - ("class:prompt.search.text", fragment_list_to_text(ti.fragments)), - ("", "': "), - ] - + line_fragments - ) - - shift_position = fragment_list_len(fragments_before) - source_to_display = lambda i: i + shift_position - display_to_source = lambda i: i - shift_position - else: - source_to_display = None - display_to_source = None - fragments = ti.fragments - - return Transformation( - fragments, - source_to_display=source_to_display, - display_to_source=display_to_source, - ) - - -class ConditionalProcessor(Processor): - """ - Processor that applies another processor, according to a certain condition. - Example:: - - # Create a function that returns whether or not the processor should - # currently be applied. - def highlight_enabled(): - return true_or_false - - # Wrapped it in a `ConditionalProcessor` for usage in a `BufferControl`. - BufferControl(input_processors=[ - ConditionalProcessor(HighlightSearchProcessor(), - Condition(highlight_enabled))]) - - :param processor: :class:`.Processor` instance. - :param filter: :class:`~prompt_toolkit.filters.Filter` instance. - """ - - def __init__(self, processor: Processor, filter: FilterOrBool) -> None: - self.processor = processor - self.filter = to_filter(filter) - - def apply_transformation( - self, transformation_input: TransformationInput - ) -> Transformation: - # Run processor when enabled. - if self.filter(): - return self.processor.apply_transformation(transformation_input) - else: - return Transformation(transformation_input.fragments) - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(processor={self.processor!r}, filter={self.filter!r})" - - -class DynamicProcessor(Processor): - """ - Processor class that dynamically returns any Processor. - - :param get_processor: Callable that returns a :class:`.Processor` instance. - """ - - def __init__(self, get_processor: Callable[[], Processor | None]) -> None: - self.get_processor = get_processor - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - processor = self.get_processor() or DummyProcessor() - return processor.apply_transformation(ti) - - -def merge_processors(processors: list[Processor]) -> Processor: - """ - Merge multiple `Processor` objects into one. - """ - if len(processors) == 0: - return DummyProcessor() - - if len(processors) == 1: - return processors[0] # Nothing to merge. - - return _MergedProcessor(processors) - - -class _MergedProcessor(Processor): - """ - Processor that groups multiple other `Processor` objects, but exposes an - API as if it is one `Processor`. - """ - - def __init__(self, processors: list[Processor]): - self.processors = processors - - def apply_transformation(self, ti: TransformationInput) -> Transformation: - source_to_display_functions = [ti.source_to_display] - display_to_source_functions = [] - fragments = ti.fragments - - def source_to_display(i: int) -> int: - """Translate x position from the buffer to the x position in the - processor fragments list.""" - for f in source_to_display_functions: - i = f(i) - return i - - for p in self.processors: - transformation = p.apply_transformation( - TransformationInput( - ti.buffer_control, - ti.document, - ti.lineno, - source_to_display, - fragments, - ti.width, - ti.height, - ti.get_line, - ) - ) - fragments = transformation.fragments - display_to_source_functions.append(transformation.display_to_source) - source_to_display_functions.append(transformation.source_to_display) - - def display_to_source(i: int) -> int: - for f in reversed(display_to_source_functions): - i = f(i) - return i - - # In the case of a nested _MergedProcessor, each processor wants to - # receive a 'source_to_display' function (as part of the - # TransformationInput) that has everything in the chain before - # included, because it can be called as part of the - # `apply_transformation` function. However, this first - # `source_to_display` should not be part of the output that we are - # returning. (This is the most consistent with `display_to_source`.) - del source_to_display_functions[:1] - - return Transformation(fragments, source_to_display, display_to_source) diff --git a/voxvera/vendor/prompt_toolkit/layout/screen.py b/voxvera/vendor/prompt_toolkit/layout/screen.py deleted file mode 100644 index 475f540..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/screen.py +++ /dev/null @@ -1,323 +0,0 @@ -from __future__ import annotations - -from collections import defaultdict -from typing import TYPE_CHECKING, Callable - -from prompt_toolkit.cache import FastDictCache -from prompt_toolkit.data_structures import Point -from prompt_toolkit.utils import get_cwidth - -if TYPE_CHECKING: - from .containers import Window - - -__all__ = [ - "Screen", - "Char", -] - - -class Char: - """ - Represent a single character in a :class:`.Screen`. - - This should be considered immutable. - - :param char: A single character (can be a double-width character). - :param style: A style string. (Can contain classnames.) - """ - - __slots__ = ("char", "style", "width") - - # If we end up having one of these special control sequences in the input string, - # we should display them as follows: - # Usually this happens after a "quoted insert". - display_mappings: dict[str, str] = { - "\x00": "^@", # Control space - "\x01": "^A", - "\x02": "^B", - "\x03": "^C", - "\x04": "^D", - "\x05": "^E", - "\x06": "^F", - "\x07": "^G", - "\x08": "^H", - "\x09": "^I", - "\x0a": "^J", - "\x0b": "^K", - "\x0c": "^L", - "\x0d": "^M", - "\x0e": "^N", - "\x0f": "^O", - "\x10": "^P", - "\x11": "^Q", - "\x12": "^R", - "\x13": "^S", - "\x14": "^T", - "\x15": "^U", - "\x16": "^V", - "\x17": "^W", - "\x18": "^X", - "\x19": "^Y", - "\x1a": "^Z", - "\x1b": "^[", # Escape - "\x1c": "^\\", - "\x1d": "^]", - "\x1e": "^^", - "\x1f": "^_", - "\x7f": "^?", # ASCII Delete (backspace). - # Special characters. All visualized like Vim does. - "\x80": "<80>", - "\x81": "<81>", - "\x82": "<82>", - "\x83": "<83>", - "\x84": "<84>", - "\x85": "<85>", - "\x86": "<86>", - "\x87": "<87>", - "\x88": "<88>", - "\x89": "<89>", - "\x8a": "<8a>", - "\x8b": "<8b>", - "\x8c": "<8c>", - "\x8d": "<8d>", - "\x8e": "<8e>", - "\x8f": "<8f>", - "\x90": "<90>", - "\x91": "<91>", - "\x92": "<92>", - "\x93": "<93>", - "\x94": "<94>", - "\x95": "<95>", - "\x96": "<96>", - "\x97": "<97>", - "\x98": "<98>", - "\x99": "<99>", - "\x9a": "<9a>", - "\x9b": "<9b>", - "\x9c": "<9c>", - "\x9d": "<9d>", - "\x9e": "<9e>", - "\x9f": "<9f>", - # For the non-breaking space: visualize like Emacs does by default. - # (Print a space, but attach the 'nbsp' class that applies the - # underline style.) - "\xa0": " ", - } - - def __init__(self, char: str = " ", style: str = "") -> None: - # If this character has to be displayed otherwise, take that one. - if char in self.display_mappings: - if char == "\xa0": - style += " class:nbsp " # Will be underlined. - else: - style += " class:control-character " - - char = self.display_mappings[char] - - self.char = char - self.style = style - - # Calculate width. (We always need this, so better to store it directly - # as a member for performance.) - self.width = get_cwidth(char) - - # In theory, `other` can be any type of object, but because of performance - # we don't want to do an `isinstance` check every time. We assume "other" - # is always a "Char". - def _equal(self, other: Char) -> bool: - return self.char == other.char and self.style == other.style - - def _not_equal(self, other: Char) -> bool: - # Not equal: We don't do `not char.__eq__` here, because of the - # performance of calling yet another function. - return self.char != other.char or self.style != other.style - - if not TYPE_CHECKING: - __eq__ = _equal - __ne__ = _not_equal - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.char!r}, {self.style!r})" - - -_CHAR_CACHE: FastDictCache[tuple[str, str], Char] = FastDictCache( - Char, size=1000 * 1000 -) -Transparent = "[transparent]" - - -class Screen: - """ - Two dimensional buffer of :class:`.Char` instances. - """ - - def __init__( - self, - default_char: Char | None = None, - initial_width: int = 0, - initial_height: int = 0, - ) -> None: - if default_char is None: - default_char2 = _CHAR_CACHE[" ", Transparent] - else: - default_char2 = default_char - - self.data_buffer: defaultdict[int, defaultdict[int, Char]] = defaultdict( - lambda: defaultdict(lambda: default_char2) - ) - - #: Escape sequences to be injected. - self.zero_width_escapes: defaultdict[int, defaultdict[int, str]] = defaultdict( - lambda: defaultdict(str) - ) - - #: Position of the cursor. - self.cursor_positions: dict[ - Window, Point - ] = {} # Map `Window` objects to `Point` objects. - - #: Visibility of the cursor. - self.show_cursor = True - - #: (Optional) Where to position the menu. E.g. at the start of a completion. - #: (We can't use the cursor position, because we don't want the - #: completion menu to change its position when we browse through all the - #: completions.) - self.menu_positions: dict[ - Window, Point - ] = {} # Map `Window` objects to `Point` objects. - - #: Currently used width/height of the screen. This will increase when - #: data is written to the screen. - self.width = initial_width or 0 - self.height = initial_height or 0 - - # Windows that have been drawn. (Each `Window` class will add itself to - # this list.) - self.visible_windows_to_write_positions: dict[Window, WritePosition] = {} - - # List of (z_index, draw_func) - self._draw_float_functions: list[tuple[int, Callable[[], None]]] = [] - - @property - def visible_windows(self) -> list[Window]: - return list(self.visible_windows_to_write_positions.keys()) - - def set_cursor_position(self, window: Window, position: Point) -> None: - """ - Set the cursor position for a given window. - """ - self.cursor_positions[window] = position - - def set_menu_position(self, window: Window, position: Point) -> None: - """ - Set the cursor position for a given window. - """ - self.menu_positions[window] = position - - def get_cursor_position(self, window: Window) -> Point: - """ - Get the cursor position for a given window. - Returns a `Point`. - """ - try: - return self.cursor_positions[window] - except KeyError: - return Point(x=0, y=0) - - def get_menu_position(self, window: Window) -> Point: - """ - Get the menu position for a given window. - (This falls back to the cursor position if no menu position was set.) - """ - try: - return self.menu_positions[window] - except KeyError: - try: - return self.cursor_positions[window] - except KeyError: - return Point(x=0, y=0) - - def draw_with_z_index(self, z_index: int, draw_func: Callable[[], None]) -> None: - """ - Add a draw-function for a `Window` which has a >= 0 z_index. - This will be postponed until `draw_all_floats` is called. - """ - self._draw_float_functions.append((z_index, draw_func)) - - def draw_all_floats(self) -> None: - """ - Draw all float functions in order of z-index. - """ - # We keep looping because some draw functions could add new functions - # to this list. See `FloatContainer`. - while self._draw_float_functions: - # Sort the floats that we have so far by z_index. - functions = sorted(self._draw_float_functions, key=lambda item: item[0]) - - # Draw only one at a time, then sort everything again. Now floats - # might have been added. - self._draw_float_functions = functions[1:] - functions[0][1]() - - def append_style_to_content(self, style_str: str) -> None: - """ - For all the characters in the screen. - Set the style string to the given `style_str`. - """ - b = self.data_buffer - char_cache = _CHAR_CACHE - - append_style = " " + style_str - - for y, row in b.items(): - for x, char in row.items(): - row[x] = char_cache[char.char, char.style + append_style] - - def fill_area( - self, write_position: WritePosition, style: str = "", after: bool = False - ) -> None: - """ - Fill the content of this area, using the given `style`. - The style is prepended before whatever was here before. - """ - if not style.strip(): - return - - xmin = write_position.xpos - xmax = write_position.xpos + write_position.width - char_cache = _CHAR_CACHE - data_buffer = self.data_buffer - - if after: - append_style = " " + style - prepend_style = "" - else: - append_style = "" - prepend_style = style + " " - - for y in range( - write_position.ypos, write_position.ypos + write_position.height - ): - row = data_buffer[y] - for x in range(xmin, xmax): - cell = row[x] - row[x] = char_cache[ - cell.char, prepend_style + cell.style + append_style - ] - - -class WritePosition: - def __init__(self, xpos: int, ypos: int, width: int, height: int) -> None: - assert height >= 0 - assert width >= 0 - # xpos and ypos can be negative. (A float can be partially visible.) - - self.xpos = xpos - self.ypos = ypos - self.width = width - self.height = height - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(x={self.xpos!r}, y={self.ypos!r}, width={self.width!r}, height={self.height!r})" diff --git a/voxvera/vendor/prompt_toolkit/layout/scrollable_pane.py b/voxvera/vendor/prompt_toolkit/layout/scrollable_pane.py deleted file mode 100644 index e38fd76..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/scrollable_pane.py +++ /dev/null @@ -1,494 +0,0 @@ -from __future__ import annotations - -from prompt_toolkit.data_structures import Point -from prompt_toolkit.filters import FilterOrBool, to_filter -from prompt_toolkit.key_binding import KeyBindingsBase -from prompt_toolkit.mouse_events import MouseEvent - -from .containers import Container, ScrollOffsets -from .dimension import AnyDimension, Dimension, sum_layout_dimensions, to_dimension -from .mouse_handlers import MouseHandler, MouseHandlers -from .screen import Char, Screen, WritePosition - -__all__ = ["ScrollablePane"] - -# Never go beyond this height, because performance will degrade. -MAX_AVAILABLE_HEIGHT = 10_000 - - -class ScrollablePane(Container): - """ - Container widget that exposes a larger virtual screen to its content and - displays it in a vertical scrollbale region. - - Typically this is wrapped in a large `HSplit` container. Make sure in that - case to not specify a `height` dimension of the `HSplit`, so that it will - scale according to the content. - - .. note:: - - If you want to display a completion menu for widgets in this - `ScrollablePane`, then it's still a good practice to use a - `FloatContainer` with a `CompletionsMenu` in a `Float` at the top-level - of the layout hierarchy, rather then nesting a `FloatContainer` in this - `ScrollablePane`. (Otherwise, it's possible that the completion menu - is clipped.) - - :param content: The content container. - :param scrolloffset: Try to keep the cursor within this distance from the - top/bottom (left/right offset is not used). - :param keep_cursor_visible: When `True`, automatically scroll the pane so - that the cursor (of the focused window) is always visible. - :param keep_focused_window_visible: When `True`, automatically scroll the - pane so that the focused window is visible, or as much visible as - possible if it doesn't completely fit the screen. - :param max_available_height: Always constraint the height to this amount - for performance reasons. - :param width: When given, use this width instead of looking at the children. - :param height: When given, use this height instead of looking at the children. - :param show_scrollbar: When `True` display a scrollbar on the right. - """ - - def __init__( - self, - content: Container, - scroll_offsets: ScrollOffsets | None = None, - keep_cursor_visible: FilterOrBool = True, - keep_focused_window_visible: FilterOrBool = True, - max_available_height: int = MAX_AVAILABLE_HEIGHT, - width: AnyDimension = None, - height: AnyDimension = None, - show_scrollbar: FilterOrBool = True, - display_arrows: FilterOrBool = True, - up_arrow_symbol: str = "^", - down_arrow_symbol: str = "v", - ) -> None: - self.content = content - self.scroll_offsets = scroll_offsets or ScrollOffsets(top=1, bottom=1) - self.keep_cursor_visible = to_filter(keep_cursor_visible) - self.keep_focused_window_visible = to_filter(keep_focused_window_visible) - self.max_available_height = max_available_height - self.width = width - self.height = height - self.show_scrollbar = to_filter(show_scrollbar) - self.display_arrows = to_filter(display_arrows) - self.up_arrow_symbol = up_arrow_symbol - self.down_arrow_symbol = down_arrow_symbol - - self.vertical_scroll = 0 - - def __repr__(self) -> str: - return f"ScrollablePane({self.content!r})" - - def reset(self) -> None: - self.content.reset() - - def preferred_width(self, max_available_width: int) -> Dimension: - if self.width is not None: - return to_dimension(self.width) - - # We're only scrolling vertical. So the preferred width is equal to - # that of the content. - content_width = self.content.preferred_width(max_available_width) - - # If a scrollbar needs to be displayed, add +1 to the content width. - if self.show_scrollbar(): - return sum_layout_dimensions([Dimension.exact(1), content_width]) - - return content_width - - def preferred_height(self, width: int, max_available_height: int) -> Dimension: - if self.height is not None: - return to_dimension(self.height) - - # Prefer a height large enough so that it fits all the content. If not, - # we'll make the pane scrollable. - if self.show_scrollbar(): - # If `show_scrollbar` is set. Always reserve space for the scrollbar. - width -= 1 - - dimension = self.content.preferred_height(width, self.max_available_height) - - # Only take 'preferred' into account. Min/max can be anything. - return Dimension(min=0, preferred=dimension.preferred) - - def write_to_screen( - self, - screen: Screen, - mouse_handlers: MouseHandlers, - write_position: WritePosition, - parent_style: str, - erase_bg: bool, - z_index: int | None, - ) -> None: - """ - Render scrollable pane content. - - This works by rendering on an off-screen canvas, and copying over the - visible region. - """ - show_scrollbar = self.show_scrollbar() - - if show_scrollbar: - virtual_width = write_position.width - 1 - else: - virtual_width = write_position.width - - # Compute preferred height again. - virtual_height = self.content.preferred_height( - virtual_width, self.max_available_height - ).preferred - - # Ensure virtual height is at least the available height. - virtual_height = max(virtual_height, write_position.height) - virtual_height = min(virtual_height, self.max_available_height) - - # First, write the content to a virtual screen, then copy over the - # visible part to the real screen. - temp_screen = Screen(default_char=Char(char=" ", style=parent_style)) - temp_screen.show_cursor = screen.show_cursor - temp_write_position = WritePosition( - xpos=0, ypos=0, width=virtual_width, height=virtual_height - ) - - temp_mouse_handlers = MouseHandlers() - - self.content.write_to_screen( - temp_screen, - temp_mouse_handlers, - temp_write_position, - parent_style, - erase_bg, - z_index, - ) - temp_screen.draw_all_floats() - - # If anything in the virtual screen is focused, move vertical scroll to - from prompt_toolkit.application import get_app - - focused_window = get_app().layout.current_window - - try: - visible_win_write_pos = temp_screen.visible_windows_to_write_positions[ - focused_window - ] - except KeyError: - pass # No window focused here. Don't scroll. - else: - # Make sure this window is visible. - self._make_window_visible( - write_position.height, - virtual_height, - visible_win_write_pos, - temp_screen.cursor_positions.get(focused_window), - ) - - # Copy over virtual screen and zero width escapes to real screen. - self._copy_over_screen(screen, temp_screen, write_position, virtual_width) - - # Copy over mouse handlers. - self._copy_over_mouse_handlers( - mouse_handlers, temp_mouse_handlers, write_position, virtual_width - ) - - # Set screen.width/height. - ypos = write_position.ypos - xpos = write_position.xpos - - screen.width = max(screen.width, xpos + virtual_width) - screen.height = max(screen.height, ypos + write_position.height) - - # Copy over window write positions. - self._copy_over_write_positions(screen, temp_screen, write_position) - - if temp_screen.show_cursor: - screen.show_cursor = True - - # Copy over cursor positions, if they are visible. - for window, point in temp_screen.cursor_positions.items(): - if ( - 0 <= point.x < write_position.width - and self.vertical_scroll - <= point.y - < write_position.height + self.vertical_scroll - ): - screen.cursor_positions[window] = Point( - x=point.x + xpos, y=point.y + ypos - self.vertical_scroll - ) - - # Copy over menu positions, but clip them to the visible area. - for window, point in temp_screen.menu_positions.items(): - screen.menu_positions[window] = self._clip_point_to_visible_area( - Point(x=point.x + xpos, y=point.y + ypos - self.vertical_scroll), - write_position, - ) - - # Draw scrollbar. - if show_scrollbar: - self._draw_scrollbar( - write_position, - virtual_height, - screen, - ) - - def _clip_point_to_visible_area( - self, point: Point, write_position: WritePosition - ) -> Point: - """ - Ensure that the cursor and menu positions always are always reported - """ - if point.x < write_position.xpos: - point = point._replace(x=write_position.xpos) - if point.y < write_position.ypos: - point = point._replace(y=write_position.ypos) - if point.x >= write_position.xpos + write_position.width: - point = point._replace(x=write_position.xpos + write_position.width - 1) - if point.y >= write_position.ypos + write_position.height: - point = point._replace(y=write_position.ypos + write_position.height - 1) - - return point - - def _copy_over_screen( - self, - screen: Screen, - temp_screen: Screen, - write_position: WritePosition, - virtual_width: int, - ) -> None: - """ - Copy over visible screen content and "zero width escape sequences". - """ - ypos = write_position.ypos - xpos = write_position.xpos - - for y in range(write_position.height): - temp_row = temp_screen.data_buffer[y + self.vertical_scroll] - row = screen.data_buffer[y + ypos] - temp_zero_width_escapes = temp_screen.zero_width_escapes[ - y + self.vertical_scroll - ] - zero_width_escapes = screen.zero_width_escapes[y + ypos] - - for x in range(virtual_width): - row[x + xpos] = temp_row[x] - - if x in temp_zero_width_escapes: - zero_width_escapes[x + xpos] = temp_zero_width_escapes[x] - - def _copy_over_mouse_handlers( - self, - mouse_handlers: MouseHandlers, - temp_mouse_handlers: MouseHandlers, - write_position: WritePosition, - virtual_width: int, - ) -> None: - """ - Copy over mouse handlers from virtual screen to real screen. - - Note: we take `virtual_width` because we don't want to copy over mouse - handlers that we possibly have behind the scrollbar. - """ - ypos = write_position.ypos - xpos = write_position.xpos - - # Cache mouse handlers when wrapping them. Very often the same mouse - # handler is registered for many positions. - mouse_handler_wrappers: dict[MouseHandler, MouseHandler] = {} - - def wrap_mouse_handler(handler: MouseHandler) -> MouseHandler: - "Wrap mouse handler. Translate coordinates in `MouseEvent`." - if handler not in mouse_handler_wrappers: - - def new_handler(event: MouseEvent) -> None: - new_event = MouseEvent( - position=Point( - x=event.position.x - xpos, - y=event.position.y + self.vertical_scroll - ypos, - ), - event_type=event.event_type, - button=event.button, - modifiers=event.modifiers, - ) - handler(new_event) - - mouse_handler_wrappers[handler] = new_handler - return mouse_handler_wrappers[handler] - - # Copy handlers. - mouse_handlers_dict = mouse_handlers.mouse_handlers - temp_mouse_handlers_dict = temp_mouse_handlers.mouse_handlers - - for y in range(write_position.height): - if y in temp_mouse_handlers_dict: - temp_mouse_row = temp_mouse_handlers_dict[y + self.vertical_scroll] - mouse_row = mouse_handlers_dict[y + ypos] - for x in range(virtual_width): - if x in temp_mouse_row: - mouse_row[x + xpos] = wrap_mouse_handler(temp_mouse_row[x]) - - def _copy_over_write_positions( - self, screen: Screen, temp_screen: Screen, write_position: WritePosition - ) -> None: - """ - Copy over window write positions. - """ - ypos = write_position.ypos - xpos = write_position.xpos - - for win, write_pos in temp_screen.visible_windows_to_write_positions.items(): - screen.visible_windows_to_write_positions[win] = WritePosition( - xpos=write_pos.xpos + xpos, - ypos=write_pos.ypos + ypos - self.vertical_scroll, - # TODO: if the window is only partly visible, then truncate width/height. - # This could be important if we have nested ScrollablePanes. - height=write_pos.height, - width=write_pos.width, - ) - - def is_modal(self) -> bool: - return self.content.is_modal() - - def get_key_bindings(self) -> KeyBindingsBase | None: - return self.content.get_key_bindings() - - def get_children(self) -> list[Container]: - return [self.content] - - def _make_window_visible( - self, - visible_height: int, - virtual_height: int, - visible_win_write_pos: WritePosition, - cursor_position: Point | None, - ) -> None: - """ - Scroll the scrollable pane, so that this window becomes visible. - - :param visible_height: Height of this `ScrollablePane` that is rendered. - :param virtual_height: Height of the virtual, temp screen. - :param visible_win_write_pos: `WritePosition` of the nested window on the - temp screen. - :param cursor_position: The location of the cursor position of this - window on the temp screen. - """ - # Start with maximum allowed scroll range, and then reduce according to - # the focused window and cursor position. - min_scroll = 0 - max_scroll = virtual_height - visible_height - - if self.keep_cursor_visible(): - # Reduce min/max scroll according to the cursor in the focused window. - if cursor_position is not None: - offsets = self.scroll_offsets - cpos_min_scroll = ( - cursor_position.y - visible_height + 1 + offsets.bottom - ) - cpos_max_scroll = cursor_position.y - offsets.top - min_scroll = max(min_scroll, cpos_min_scroll) - max_scroll = max(0, min(max_scroll, cpos_max_scroll)) - - if self.keep_focused_window_visible(): - # Reduce min/max scroll according to focused window position. - # If the window is small enough, bot the top and bottom of the window - # should be visible. - if visible_win_write_pos.height <= visible_height: - window_min_scroll = ( - visible_win_write_pos.ypos - + visible_win_write_pos.height - - visible_height - ) - window_max_scroll = visible_win_write_pos.ypos - else: - # Window does not fit on the screen. Make sure at least the whole - # screen is occupied with this window, and nothing else is shown. - window_min_scroll = visible_win_write_pos.ypos - window_max_scroll = ( - visible_win_write_pos.ypos - + visible_win_write_pos.height - - visible_height - ) - - min_scroll = max(min_scroll, window_min_scroll) - max_scroll = min(max_scroll, window_max_scroll) - - if min_scroll > max_scroll: - min_scroll = max_scroll # Should not happen. - - # Finally, properly clip the vertical scroll. - if self.vertical_scroll > max_scroll: - self.vertical_scroll = max_scroll - if self.vertical_scroll < min_scroll: - self.vertical_scroll = min_scroll - - def _draw_scrollbar( - self, write_position: WritePosition, content_height: int, screen: Screen - ) -> None: - """ - Draw the scrollbar on the screen. - - Note: There is some code duplication with the `ScrollbarMargin` - implementation. - """ - - window_height = write_position.height - display_arrows = self.display_arrows() - - if display_arrows: - window_height -= 2 - - try: - fraction_visible = write_position.height / float(content_height) - fraction_above = self.vertical_scroll / float(content_height) - - scrollbar_height = int( - min(window_height, max(1, window_height * fraction_visible)) - ) - scrollbar_top = int(window_height * fraction_above) - except ZeroDivisionError: - return - else: - - def is_scroll_button(row: int) -> bool: - "True if we should display a button on this row." - return scrollbar_top <= row <= scrollbar_top + scrollbar_height - - xpos = write_position.xpos + write_position.width - 1 - ypos = write_position.ypos - data_buffer = screen.data_buffer - - # Up arrow. - if display_arrows: - data_buffer[ypos][xpos] = Char( - self.up_arrow_symbol, "class:scrollbar.arrow" - ) - ypos += 1 - - # Scrollbar body. - scrollbar_background = "class:scrollbar.background" - scrollbar_background_start = "class:scrollbar.background,scrollbar.start" - scrollbar_button = "class:scrollbar.button" - scrollbar_button_end = "class:scrollbar.button,scrollbar.end" - - for i in range(window_height): - style = "" - if is_scroll_button(i): - if not is_scroll_button(i + 1): - # Give the last cell a different style, because we want - # to underline this. - style = scrollbar_button_end - else: - style = scrollbar_button - else: - if is_scroll_button(i + 1): - style = scrollbar_background_start - else: - style = scrollbar_background - - data_buffer[ypos][xpos] = Char(" ", style) - ypos += 1 - - # Down arrow - if display_arrows: - data_buffer[ypos][xpos] = Char( - self.down_arrow_symbol, "class:scrollbar.arrow" - ) diff --git a/voxvera/vendor/prompt_toolkit/layout/utils.py b/voxvera/vendor/prompt_toolkit/layout/utils.py deleted file mode 100644 index 373fe52..0000000 --- a/voxvera/vendor/prompt_toolkit/layout/utils.py +++ /dev/null @@ -1,80 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Iterable, List, TypeVar, cast, overload - -from prompt_toolkit.formatted_text.base import OneStyleAndTextTuple - -if TYPE_CHECKING: - from typing_extensions import SupportsIndex - -__all__ = [ - "explode_text_fragments", -] - -_T = TypeVar("_T", bound=OneStyleAndTextTuple) - - -class _ExplodedList(List[_T]): - """ - Wrapper around a list, that marks it as 'exploded'. - - As soon as items are added or the list is extended, the new items are - automatically exploded as well. - """ - - exploded = True - - def append(self, item: _T) -> None: - self.extend([item]) - - def extend(self, lst: Iterable[_T]) -> None: - super().extend(explode_text_fragments(lst)) - - def insert(self, index: SupportsIndex, item: _T) -> None: - raise NotImplementedError # TODO - - # TODO: When creating a copy() or [:], return also an _ExplodedList. - - @overload - def __setitem__(self, index: SupportsIndex, value: _T) -> None: ... - - @overload - def __setitem__(self, index: slice, value: Iterable[_T]) -> None: ... - - def __setitem__( - self, index: SupportsIndex | slice, value: _T | Iterable[_T] - ) -> None: - """ - Ensure that when `(style_str, 'long string')` is set, the string will be - exploded. - """ - if not isinstance(index, slice): - int_index = index.__index__() - index = slice(int_index, int_index + 1) - if isinstance(value, tuple): # In case of `OneStyleAndTextTuple`. - value = cast("List[_T]", [value]) - - super().__setitem__(index, explode_text_fragments(value)) - - -def explode_text_fragments(fragments: Iterable[_T]) -> _ExplodedList[_T]: - """ - Turn a list of (style_str, text) tuples into another list where each string is - exactly one character. - - It should be fine to call this function several times. Calling this on a - list that is already exploded, is a null operation. - - :param fragments: List of (style, text) tuples. - """ - # When the fragments is already exploded, don't explode again. - if isinstance(fragments, _ExplodedList): - return fragments - - result: list[_T] = [] - - for style, string, *rest in fragments: - for c in string: - result.append((style, c, *rest)) # type: ignore - - return _ExplodedList(result) diff --git a/voxvera/vendor/prompt_toolkit/lexers/__init__.py b/voxvera/vendor/prompt_toolkit/lexers/__init__.py deleted file mode 100644 index 8f72d07..0000000 --- a/voxvera/vendor/prompt_toolkit/lexers/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Lexer interface and implementations. -Used for syntax highlighting. -""" - -from __future__ import annotations - -from .base import DynamicLexer, Lexer, SimpleLexer -from .pygments import PygmentsLexer, RegexSync, SyncFromStart, SyntaxSync - -__all__ = [ - # Base. - "Lexer", - "SimpleLexer", - "DynamicLexer", - # Pygments. - "PygmentsLexer", - "RegexSync", - "SyncFromStart", - "SyntaxSync", -] diff --git a/voxvera/vendor/prompt_toolkit/lexers/base.py b/voxvera/vendor/prompt_toolkit/lexers/base.py deleted file mode 100644 index c61e2b9..0000000 --- a/voxvera/vendor/prompt_toolkit/lexers/base.py +++ /dev/null @@ -1,85 +0,0 @@ -""" -Base classes for prompt_toolkit lexers. -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import Callable, Hashable - -from prompt_toolkit.document import Document -from prompt_toolkit.formatted_text.base import StyleAndTextTuples - -__all__ = [ - "Lexer", - "SimpleLexer", - "DynamicLexer", -] - - -class Lexer(metaclass=ABCMeta): - """ - Base class for all lexers. - """ - - @abstractmethod - def lex_document(self, document: Document) -> Callable[[int], StyleAndTextTuples]: - """ - Takes a :class:`~prompt_toolkit.document.Document` and returns a - callable that takes a line number and returns a list of - ``(style_str, text)`` tuples for that line. - - XXX: Note that in the past, this was supposed to return a list - of ``(Token, text)`` tuples, just like a Pygments lexer. - """ - - def invalidation_hash(self) -> Hashable: - """ - When this changes, `lex_document` could give a different output. - (Only used for `DynamicLexer`.) - """ - return id(self) - - -class SimpleLexer(Lexer): - """ - Lexer that doesn't do any tokenizing and returns the whole input as one - token. - - :param style: The style string for this lexer. - """ - - def __init__(self, style: str = "") -> None: - self.style = style - - def lex_document(self, document: Document) -> Callable[[int], StyleAndTextTuples]: - lines = document.lines - - def get_line(lineno: int) -> StyleAndTextTuples: - "Return the tokens for the given line." - try: - return [(self.style, lines[lineno])] - except IndexError: - return [] - - return get_line - - -class DynamicLexer(Lexer): - """ - Lexer class that can dynamically returns any Lexer. - - :param get_lexer: Callable that returns a :class:`.Lexer` instance. - """ - - def __init__(self, get_lexer: Callable[[], Lexer | None]) -> None: - self.get_lexer = get_lexer - self._dummy = SimpleLexer() - - def lex_document(self, document: Document) -> Callable[[int], StyleAndTextTuples]: - lexer = self.get_lexer() or self._dummy - return lexer.lex_document(document) - - def invalidation_hash(self) -> Hashable: - lexer = self.get_lexer() or self._dummy - return id(lexer) diff --git a/voxvera/vendor/prompt_toolkit/lexers/pygments.py b/voxvera/vendor/prompt_toolkit/lexers/pygments.py deleted file mode 100644 index d5a39c4..0000000 --- a/voxvera/vendor/prompt_toolkit/lexers/pygments.py +++ /dev/null @@ -1,328 +0,0 @@ -""" -Adaptor classes for using Pygments lexers within prompt_toolkit. - -This includes syntax synchronization code, so that we don't have to start -lexing at the beginning of a document, when displaying a very large text. -""" - -from __future__ import annotations - -import re -from abc import ABCMeta, abstractmethod -from typing import TYPE_CHECKING, Callable, Dict, Generator, Iterable, Tuple - -from prompt_toolkit.document import Document -from prompt_toolkit.filters import FilterOrBool, to_filter -from prompt_toolkit.formatted_text.base import StyleAndTextTuples -from prompt_toolkit.formatted_text.utils import split_lines -from prompt_toolkit.styles.pygments import pygments_token_to_classname - -from .base import Lexer, SimpleLexer - -if TYPE_CHECKING: - from pygments.lexer import Lexer as PygmentsLexerCls - -__all__ = [ - "PygmentsLexer", - "SyntaxSync", - "SyncFromStart", - "RegexSync", -] - - -class SyntaxSync(metaclass=ABCMeta): - """ - Syntax synchronizer. This is a tool that finds a start position for the - lexer. This is especially important when editing big documents; we don't - want to start the highlighting by running the lexer from the beginning of - the file. That is very slow when editing. - """ - - @abstractmethod - def get_sync_start_position( - self, document: Document, lineno: int - ) -> tuple[int, int]: - """ - Return the position from where we can start lexing as a (row, column) - tuple. - - :param document: `Document` instance that contains all the lines. - :param lineno: The line that we want to highlight. (We need to return - this line, or an earlier position.) - """ - - -class SyncFromStart(SyntaxSync): - """ - Always start the syntax highlighting from the beginning. - """ - - def get_sync_start_position( - self, document: Document, lineno: int - ) -> tuple[int, int]: - return 0, 0 - - -class RegexSync(SyntaxSync): - """ - Synchronize by starting at a line that matches the given regex pattern. - """ - - # Never go more than this amount of lines backwards for synchronization. - # That would be too CPU intensive. - MAX_BACKWARDS = 500 - - # Start lexing at the start, if we are in the first 'n' lines and no - # synchronization position was found. - FROM_START_IF_NO_SYNC_POS_FOUND = 100 - - def __init__(self, pattern: str) -> None: - self._compiled_pattern = re.compile(pattern) - - def get_sync_start_position( - self, document: Document, lineno: int - ) -> tuple[int, int]: - """ - Scan backwards, and find a possible position to start. - """ - pattern = self._compiled_pattern - lines = document.lines - - # Scan upwards, until we find a point where we can start the syntax - # synchronization. - for i in range(lineno, max(-1, lineno - self.MAX_BACKWARDS), -1): - match = pattern.match(lines[i]) - if match: - return i, match.start() - - # No synchronization point found. If we aren't that far from the - # beginning, start at the very beginning, otherwise, just try to start - # at the current line. - if lineno < self.FROM_START_IF_NO_SYNC_POS_FOUND: - return 0, 0 - else: - return lineno, 0 - - @classmethod - def from_pygments_lexer_cls(cls, lexer_cls: PygmentsLexerCls) -> RegexSync: - """ - Create a :class:`.RegexSync` instance for this Pygments lexer class. - """ - patterns = { - # For Python, start highlighting at any class/def block. - "Python": r"^\s*(class|def)\s+", - "Python 3": r"^\s*(class|def)\s+", - # For HTML, start at any open/close tag definition. - "HTML": r"<[/a-zA-Z]", - # For javascript, start at a function. - "JavaScript": r"\bfunction\b", - # TODO: Add definitions for other languages. - # By default, we start at every possible line. - } - p = patterns.get(lexer_cls.name, "^") - return cls(p) - - -class _TokenCache(Dict[Tuple[str, ...], str]): - """ - Cache that converts Pygments tokens into `prompt_toolkit` style objects. - - ``Token.A.B.C`` will be converted into: - ``class:pygments,pygments.A,pygments.A.B,pygments.A.B.C`` - """ - - def __missing__(self, key: tuple[str, ...]) -> str: - result = "class:" + pygments_token_to_classname(key) - self[key] = result - return result - - -_token_cache = _TokenCache() - - -class PygmentsLexer(Lexer): - """ - Lexer that calls a pygments lexer. - - Example:: - - from pygments.lexers.html import HtmlLexer - lexer = PygmentsLexer(HtmlLexer) - - Note: Don't forget to also load a Pygments compatible style. E.g.:: - - from prompt_toolkit.styles.from_pygments import style_from_pygments_cls - from pygments.styles import get_style_by_name - style = style_from_pygments_cls(get_style_by_name('monokai')) - - :param pygments_lexer_cls: A `Lexer` from Pygments. - :param sync_from_start: Start lexing at the start of the document. This - will always give the best results, but it will be slow for bigger - documents. (When the last part of the document is display, then the - whole document will be lexed by Pygments on every key stroke.) It is - recommended to disable this for inputs that are expected to be more - than 1,000 lines. - :param syntax_sync: `SyntaxSync` object. - """ - - # Minimum amount of lines to go backwards when starting the parser. - # This is important when the lines are retrieved in reverse order, or when - # scrolling upwards. (Due to the complexity of calculating the vertical - # scroll offset in the `Window` class, lines are not always retrieved in - # order.) - MIN_LINES_BACKWARDS = 50 - - # When a parser was started this amount of lines back, read the parser - # until we get the current line. Otherwise, start a new parser. - # (This should probably be bigger than MIN_LINES_BACKWARDS.) - REUSE_GENERATOR_MAX_DISTANCE = 100 - - def __init__( - self, - pygments_lexer_cls: type[PygmentsLexerCls], - sync_from_start: FilterOrBool = True, - syntax_sync: SyntaxSync | None = None, - ) -> None: - self.pygments_lexer_cls = pygments_lexer_cls - self.sync_from_start = to_filter(sync_from_start) - - # Instantiate the Pygments lexer. - self.pygments_lexer = pygments_lexer_cls( - stripnl=False, stripall=False, ensurenl=False - ) - - # Create syntax sync instance. - self.syntax_sync = syntax_sync or RegexSync.from_pygments_lexer_cls( - pygments_lexer_cls - ) - - @classmethod - def from_filename( - cls, filename: str, sync_from_start: FilterOrBool = True - ) -> Lexer: - """ - Create a `Lexer` from a filename. - """ - # Inline imports: the Pygments dependency is optional! - from pygments.lexers import get_lexer_for_filename - from pygments.util import ClassNotFound - - try: - pygments_lexer = get_lexer_for_filename(filename) - except ClassNotFound: - return SimpleLexer() - else: - return cls(pygments_lexer.__class__, sync_from_start=sync_from_start) - - def lex_document(self, document: Document) -> Callable[[int], StyleAndTextTuples]: - """ - Create a lexer function that takes a line number and returns the list - of (style_str, text) tuples as the Pygments lexer returns for that line. - """ - LineGenerator = Generator[Tuple[int, StyleAndTextTuples], None, None] - - # Cache of already lexed lines. - cache: dict[int, StyleAndTextTuples] = {} - - # Pygments generators that are currently lexing. - # Map lexer generator to the line number. - line_generators: dict[LineGenerator, int] = {} - - def get_syntax_sync() -> SyntaxSync: - "The Syntax synchronization object that we currently use." - if self.sync_from_start(): - return SyncFromStart() - else: - return self.syntax_sync - - def find_closest_generator(i: int) -> LineGenerator | None: - "Return a generator close to line 'i', or None if none was found." - for generator, lineno in line_generators.items(): - if lineno < i and i - lineno < self.REUSE_GENERATOR_MAX_DISTANCE: - return generator - return None - - def create_line_generator(start_lineno: int, column: int = 0) -> LineGenerator: - """ - Create a generator that yields the lexed lines. - Each iteration it yields a (line_number, [(style_str, text), ...]) tuple. - """ - - def get_text_fragments() -> Iterable[tuple[str, str]]: - text = "\n".join(document.lines[start_lineno:])[column:] - - # We call `get_text_fragments_unprocessed`, because `get_tokens` will - # still replace \r\n and \r by \n. (We don't want that, - # Pygments should return exactly the same amount of text, as we - # have given as input.) - for _, t, v in self.pygments_lexer.get_tokens_unprocessed(text): - # Turn Pygments `Token` object into prompt_toolkit style - # strings. - yield _token_cache[t], v - - yield from enumerate(split_lines(list(get_text_fragments())), start_lineno) - - def get_generator(i: int) -> LineGenerator: - """ - Find an already started generator that is close, or create a new one. - """ - # Find closest line generator. - generator = find_closest_generator(i) - if generator: - return generator - - # No generator found. Determine starting point for the syntax - # synchronization first. - - # Go at least x lines back. (Make scrolling upwards more - # efficient.) - i = max(0, i - self.MIN_LINES_BACKWARDS) - - if i == 0: - row = 0 - column = 0 - else: - row, column = get_syntax_sync().get_sync_start_position(document, i) - - # Find generator close to this point, or otherwise create a new one. - generator = find_closest_generator(i) - if generator: - return generator - else: - generator = create_line_generator(row, column) - - # If the column is not 0, ignore the first line. (Which is - # incomplete. This happens when the synchronization algorithm tells - # us to start parsing in the middle of a line.) - if column: - next(generator) - row += 1 - - line_generators[generator] = row - return generator - - def get_line(i: int) -> StyleAndTextTuples: - "Return the tokens for a given line number." - try: - return cache[i] - except KeyError: - generator = get_generator(i) - - # Exhaust the generator, until we find the requested line. - for num, line in generator: - cache[num] = line - if num == i: - line_generators[generator] = i - - # Remove the next item from the cache. - # (It could happen that it's already there, because of - # another generator that started filling these lines, - # but we want to synchronize these lines with the - # current lexer's state.) - if num + 1 in cache: - del cache[num + 1] - - return cache[num] - return [] - - return get_line diff --git a/voxvera/vendor/prompt_toolkit/log.py b/voxvera/vendor/prompt_toolkit/log.py deleted file mode 100644 index 2853579..0000000 --- a/voxvera/vendor/prompt_toolkit/log.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Logging configuration. -""" - -from __future__ import annotations - -import logging - -__all__ = [ - "logger", -] - -logger = logging.getLogger(__package__) diff --git a/voxvera/vendor/prompt_toolkit/mouse_events.py b/voxvera/vendor/prompt_toolkit/mouse_events.py deleted file mode 100644 index f244f8e..0000000 --- a/voxvera/vendor/prompt_toolkit/mouse_events.py +++ /dev/null @@ -1,85 +0,0 @@ -""" -Mouse events. - - -How it works ------------- - -The renderer has a 2 dimensional grid of mouse event handlers. -(`prompt_toolkit.layout.MouseHandlers`.) When the layout is rendered, the -`Window` class will make sure that this grid will also be filled with -callbacks. For vt100 terminals, mouse events are received through stdin, just -like any other key press. There is a handler among the key bindings that -catches these events and forwards them to such a mouse event handler. It passes -through the `Window` class where the coordinates are translated from absolute -coordinates to coordinates relative to the user control, and there -`UIControl.mouse_handler` is called. -""" - -from __future__ import annotations - -from enum import Enum - -from .data_structures import Point - -__all__ = ["MouseEventType", "MouseButton", "MouseModifier", "MouseEvent"] - - -class MouseEventType(Enum): - # Mouse up: This same event type is fired for all three events: left mouse - # up, right mouse up, or middle mouse up - MOUSE_UP = "MOUSE_UP" - - # Mouse down: This implicitly refers to the left mouse down (this event is - # not fired upon pressing the middle or right mouse buttons). - MOUSE_DOWN = "MOUSE_DOWN" - - SCROLL_UP = "SCROLL_UP" - SCROLL_DOWN = "SCROLL_DOWN" - - # Triggered when the left mouse button is held down, and the mouse moves - MOUSE_MOVE = "MOUSE_MOVE" - - -class MouseButton(Enum): - LEFT = "LEFT" - MIDDLE = "MIDDLE" - RIGHT = "RIGHT" - - # When we're scrolling, or just moving the mouse and not pressing a button. - NONE = "NONE" - - # This is for when we don't know which mouse button was pressed, but we do - # know that one has been pressed during this mouse event (as opposed to - # scrolling, for example) - UNKNOWN = "UNKNOWN" - - -class MouseModifier(Enum): - SHIFT = "SHIFT" - ALT = "ALT" - CONTROL = "CONTROL" - - -class MouseEvent: - """ - Mouse event, sent to `UIControl.mouse_handler`. - - :param position: `Point` instance. - :param event_type: `MouseEventType`. - """ - - def __init__( - self, - position: Point, - event_type: MouseEventType, - button: MouseButton, - modifiers: frozenset[MouseModifier], - ) -> None: - self.position = position - self.event_type = event_type - self.button = button - self.modifiers = modifiers - - def __repr__(self) -> str: - return f"MouseEvent({self.position!r},{self.event_type!r},{self.button!r},{self.modifiers!r})" diff --git a/voxvera/vendor/prompt_toolkit/output/__init__.py b/voxvera/vendor/prompt_toolkit/output/__init__.py deleted file mode 100644 index 6b4c5f3..0000000 --- a/voxvera/vendor/prompt_toolkit/output/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -from __future__ import annotations - -from .base import DummyOutput, Output -from .color_depth import ColorDepth -from .defaults import create_output - -__all__ = [ - # Base. - "Output", - "DummyOutput", - # Color depth. - "ColorDepth", - # Defaults. - "create_output", -] diff --git a/voxvera/vendor/prompt_toolkit/output/base.py b/voxvera/vendor/prompt_toolkit/output/base.py deleted file mode 100644 index 6ba09fd..0000000 --- a/voxvera/vendor/prompt_toolkit/output/base.py +++ /dev/null @@ -1,332 +0,0 @@ -""" -Interface for an output. -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import TextIO - -from prompt_toolkit.cursor_shapes import CursorShape -from prompt_toolkit.data_structures import Size -from prompt_toolkit.styles import Attrs - -from .color_depth import ColorDepth - -__all__ = [ - "Output", - "DummyOutput", -] - - -class Output(metaclass=ABCMeta): - """ - Base class defining the output interface for a - :class:`~prompt_toolkit.renderer.Renderer`. - - Actual implementations are - :class:`~prompt_toolkit.output.vt100.Vt100_Output` and - :class:`~prompt_toolkit.output.win32.Win32Output`. - """ - - stdout: TextIO | None = None - - @abstractmethod - def fileno(self) -> int: - "Return the file descriptor to which we can write for the output." - - @abstractmethod - def encoding(self) -> str: - """ - Return the encoding for this output, e.g. 'utf-8'. - (This is used mainly to know which characters are supported by the - output the data, so that the UI can provide alternatives, when - required.) - """ - - @abstractmethod - def write(self, data: str) -> None: - "Write text (Terminal escape sequences will be removed/escaped.)" - - @abstractmethod - def write_raw(self, data: str) -> None: - "Write text." - - @abstractmethod - def set_title(self, title: str) -> None: - "Set terminal title." - - @abstractmethod - def clear_title(self) -> None: - "Clear title again. (or restore previous title.)" - - @abstractmethod - def flush(self) -> None: - "Write to output stream and flush." - - @abstractmethod - def erase_screen(self) -> None: - """ - Erases the screen with the background color and moves the cursor to - home. - """ - - @abstractmethod - def enter_alternate_screen(self) -> None: - "Go to the alternate screen buffer. (For full screen applications)." - - @abstractmethod - def quit_alternate_screen(self) -> None: - "Leave the alternate screen buffer." - - @abstractmethod - def enable_mouse_support(self) -> None: - "Enable mouse." - - @abstractmethod - def disable_mouse_support(self) -> None: - "Disable mouse." - - @abstractmethod - def erase_end_of_line(self) -> None: - """ - Erases from the current cursor position to the end of the current line. - """ - - @abstractmethod - def erase_down(self) -> None: - """ - Erases the screen from the current line down to the bottom of the - screen. - """ - - @abstractmethod - def reset_attributes(self) -> None: - "Reset color and styling attributes." - - @abstractmethod - def set_attributes(self, attrs: Attrs, color_depth: ColorDepth) -> None: - "Set new color and styling attributes." - - @abstractmethod - def disable_autowrap(self) -> None: - "Disable auto line wrapping." - - @abstractmethod - def enable_autowrap(self) -> None: - "Enable auto line wrapping." - - @abstractmethod - def cursor_goto(self, row: int = 0, column: int = 0) -> None: - "Move cursor position." - - @abstractmethod - def cursor_up(self, amount: int) -> None: - "Move cursor `amount` place up." - - @abstractmethod - def cursor_down(self, amount: int) -> None: - "Move cursor `amount` place down." - - @abstractmethod - def cursor_forward(self, amount: int) -> None: - "Move cursor `amount` place forward." - - @abstractmethod - def cursor_backward(self, amount: int) -> None: - "Move cursor `amount` place backward." - - @abstractmethod - def hide_cursor(self) -> None: - "Hide cursor." - - @abstractmethod - def show_cursor(self) -> None: - "Show cursor." - - @abstractmethod - def set_cursor_shape(self, cursor_shape: CursorShape) -> None: - "Set cursor shape to block, beam or underline." - - @abstractmethod - def reset_cursor_shape(self) -> None: - "Reset cursor shape." - - def ask_for_cpr(self) -> None: - """ - Asks for a cursor position report (CPR). - (VT100 only.) - """ - - @property - def responds_to_cpr(self) -> bool: - """ - `True` if the `Application` can expect to receive a CPR response after - calling `ask_for_cpr` (this will come back through the corresponding - `Input`). - - This is used to determine the amount of available rows we have below - the cursor position. In the first place, we have this so that the drop - down autocompletion menus are sized according to the available space. - - On Windows, we don't need this, there we have - `get_rows_below_cursor_position`. - """ - return False - - @abstractmethod - def get_size(self) -> Size: - "Return the size of the output window." - - def bell(self) -> None: - "Sound bell." - - def enable_bracketed_paste(self) -> None: - "For vt100 only." - - def disable_bracketed_paste(self) -> None: - "For vt100 only." - - def reset_cursor_key_mode(self) -> None: - """ - For vt100 only. - Put the terminal in normal cursor mode (instead of application mode). - - See: https://vt100.net/docs/vt100-ug/chapter3.html - """ - - def scroll_buffer_to_prompt(self) -> None: - "For Win32 only." - - def get_rows_below_cursor_position(self) -> int: - "For Windows only." - raise NotImplementedError - - @abstractmethod - def get_default_color_depth(self) -> ColorDepth: - """ - Get default color depth for this output. - - This value will be used if no color depth was explicitly passed to the - `Application`. - - .. note:: - - If the `$PROMPT_TOOLKIT_COLOR_DEPTH` environment variable has been - set, then `outputs.defaults.create_output` will pass this value to - the implementation as the default_color_depth, which is returned - here. (This is not used when the output corresponds to a - prompt_toolkit SSH/Telnet session.) - """ - - -class DummyOutput(Output): - """ - For testing. An output class that doesn't render anything. - """ - - def fileno(self) -> int: - "There is no sensible default for fileno()." - raise NotImplementedError - - def encoding(self) -> str: - return "utf-8" - - def write(self, data: str) -> None: - pass - - def write_raw(self, data: str) -> None: - pass - - def set_title(self, title: str) -> None: - pass - - def clear_title(self) -> None: - pass - - def flush(self) -> None: - pass - - def erase_screen(self) -> None: - pass - - def enter_alternate_screen(self) -> None: - pass - - def quit_alternate_screen(self) -> None: - pass - - def enable_mouse_support(self) -> None: - pass - - def disable_mouse_support(self) -> None: - pass - - def erase_end_of_line(self) -> None: - pass - - def erase_down(self) -> None: - pass - - def reset_attributes(self) -> None: - pass - - def set_attributes(self, attrs: Attrs, color_depth: ColorDepth) -> None: - pass - - def disable_autowrap(self) -> None: - pass - - def enable_autowrap(self) -> None: - pass - - def cursor_goto(self, row: int = 0, column: int = 0) -> None: - pass - - def cursor_up(self, amount: int) -> None: - pass - - def cursor_down(self, amount: int) -> None: - pass - - def cursor_forward(self, amount: int) -> None: - pass - - def cursor_backward(self, amount: int) -> None: - pass - - def hide_cursor(self) -> None: - pass - - def show_cursor(self) -> None: - pass - - def set_cursor_shape(self, cursor_shape: CursorShape) -> None: - pass - - def reset_cursor_shape(self) -> None: - pass - - def ask_for_cpr(self) -> None: - pass - - def bell(self) -> None: - pass - - def enable_bracketed_paste(self) -> None: - pass - - def disable_bracketed_paste(self) -> None: - pass - - def scroll_buffer_to_prompt(self) -> None: - pass - - def get_size(self) -> Size: - return Size(rows=40, columns=80) - - def get_rows_below_cursor_position(self) -> int: - return 40 - - def get_default_color_depth(self) -> ColorDepth: - return ColorDepth.DEPTH_1_BIT diff --git a/voxvera/vendor/prompt_toolkit/output/color_depth.py b/voxvera/vendor/prompt_toolkit/output/color_depth.py deleted file mode 100644 index f66d2be..0000000 --- a/voxvera/vendor/prompt_toolkit/output/color_depth.py +++ /dev/null @@ -1,64 +0,0 @@ -from __future__ import annotations - -import os -from enum import Enum - -__all__ = [ - "ColorDepth", -] - - -class ColorDepth(str, Enum): - """ - Possible color depth values for the output. - """ - - value: str - - #: One color only. - DEPTH_1_BIT = "DEPTH_1_BIT" - - #: ANSI Colors. - DEPTH_4_BIT = "DEPTH_4_BIT" - - #: The default. - DEPTH_8_BIT = "DEPTH_8_BIT" - - #: 24 bit True color. - DEPTH_24_BIT = "DEPTH_24_BIT" - - # Aliases. - MONOCHROME = DEPTH_1_BIT - ANSI_COLORS_ONLY = DEPTH_4_BIT - DEFAULT = DEPTH_8_BIT - TRUE_COLOR = DEPTH_24_BIT - - @classmethod - def from_env(cls) -> ColorDepth | None: - """ - Return the color depth if the $PROMPT_TOOLKIT_COLOR_DEPTH environment - variable has been set. - - This is a way to enforce a certain color depth in all prompt_toolkit - applications. - """ - # Disable color if a `NO_COLOR` environment variable is set. - # See: https://no-color.org/ - if os.environ.get("NO_COLOR"): - return cls.DEPTH_1_BIT - - # Check the `PROMPT_TOOLKIT_COLOR_DEPTH` environment variable. - all_values = [i.value for i in ColorDepth] - if os.environ.get("PROMPT_TOOLKIT_COLOR_DEPTH") in all_values: - return cls(os.environ["PROMPT_TOOLKIT_COLOR_DEPTH"]) - - return None - - @classmethod - def default(cls) -> ColorDepth: - """ - Return the default color depth for the default output. - """ - from .defaults import create_output - - return create_output().get_default_color_depth() diff --git a/voxvera/vendor/prompt_toolkit/output/conemu.py b/voxvera/vendor/prompt_toolkit/output/conemu.py deleted file mode 100644 index 6369944..0000000 --- a/voxvera/vendor/prompt_toolkit/output/conemu.py +++ /dev/null @@ -1,65 +0,0 @@ -from __future__ import annotations - -import sys - -assert sys.platform == "win32" - -from typing import Any, TextIO - -from prompt_toolkit.data_structures import Size - -from .base import Output -from .color_depth import ColorDepth -from .vt100 import Vt100_Output -from .win32 import Win32Output - -__all__ = [ - "ConEmuOutput", -] - - -class ConEmuOutput: - """ - ConEmu (Windows) output abstraction. - - ConEmu is a Windows console application, but it also supports ANSI escape - sequences. This output class is actually a proxy to both `Win32Output` and - `Vt100_Output`. It uses `Win32Output` for console sizing and scrolling, but - all cursor movements and scrolling happens through the `Vt100_Output`. - - This way, we can have 256 colors in ConEmu and Cmder. Rendering will be - even a little faster as well. - - http://conemu.github.io/ - http://gooseberrycreative.com/cmder/ - """ - - def __init__( - self, stdout: TextIO, default_color_depth: ColorDepth | None = None - ) -> None: - self.win32_output = Win32Output(stdout, default_color_depth=default_color_depth) - self.vt100_output = Vt100_Output( - stdout, lambda: Size(0, 0), default_color_depth=default_color_depth - ) - - @property - def responds_to_cpr(self) -> bool: - return False # We don't need this on Windows. - - def __getattr__(self, name: str) -> Any: - if name in ( - "get_size", - "get_rows_below_cursor_position", - "enable_mouse_support", - "disable_mouse_support", - "scroll_buffer_to_prompt", - "get_win32_screen_buffer_info", - "enable_bracketed_paste", - "disable_bracketed_paste", - ): - return getattr(self.win32_output, name) - else: - return getattr(self.vt100_output, name) - - -Output.register(ConEmuOutput) diff --git a/voxvera/vendor/prompt_toolkit/output/defaults.py b/voxvera/vendor/prompt_toolkit/output/defaults.py deleted file mode 100644 index 6b06ed4..0000000 --- a/voxvera/vendor/prompt_toolkit/output/defaults.py +++ /dev/null @@ -1,106 +0,0 @@ -from __future__ import annotations - -import sys -from typing import TYPE_CHECKING, TextIO, cast - -from prompt_toolkit.utils import ( - get_bell_environment_variable, - get_term_environment_variable, - is_conemu_ansi, -) - -from .base import DummyOutput, Output -from .color_depth import ColorDepth -from .plain_text import PlainTextOutput - -if TYPE_CHECKING: - from prompt_toolkit.patch_stdout import StdoutProxy - - -__all__ = [ - "create_output", -] - - -def create_output( - stdout: TextIO | StdoutProxy | None = None, always_prefer_tty: bool = False -) -> Output: - """ - Return an :class:`~prompt_toolkit.output.Output` instance for the command - line. - - :param stdout: The stdout object - :param always_prefer_tty: When set, look for `sys.stderr` if `sys.stdout` - is not a TTY. Useful if `sys.stdout` is redirected to a file, but we - still want user input and output on the terminal. - - By default, this is `False`. If `sys.stdout` is not a terminal (maybe - it's redirected to a file), then a `PlainTextOutput` will be returned. - That way, tools like `print_formatted_text` will write plain text into - that file. - """ - # Consider TERM, PROMPT_TOOLKIT_BELL, and PROMPT_TOOLKIT_COLOR_DEPTH - # environment variables. Notice that PROMPT_TOOLKIT_COLOR_DEPTH value is - # the default that's used if the Application doesn't override it. - term_from_env = get_term_environment_variable() - bell_from_env = get_bell_environment_variable() - color_depth_from_env = ColorDepth.from_env() - - if stdout is None: - # By default, render to stdout. If the output is piped somewhere else, - # render to stderr. - stdout = sys.stdout - - if always_prefer_tty: - for io in [sys.stdout, sys.stderr]: - if io is not None and io.isatty(): - # (This is `None` when using `pythonw.exe` on Windows.) - stdout = io - break - - # If the patch_stdout context manager has been used, then sys.stdout is - # replaced by this proxy. For prompt_toolkit applications, we want to use - # the real stdout. - from prompt_toolkit.patch_stdout import StdoutProxy - - while isinstance(stdout, StdoutProxy): - stdout = stdout.original_stdout - - # If the output is still `None`, use a DummyOutput. - # This happens for instance on Windows, when running the application under - # `pythonw.exe`. In that case, there won't be a terminal Window, and - # stdin/stdout/stderr are `None`. - if stdout is None: - return DummyOutput() - - if sys.platform == "win32": - from .conemu import ConEmuOutput - from .win32 import Win32Output - from .windows10 import Windows10_Output, is_win_vt100_enabled - - if is_win_vt100_enabled(): - return cast( - Output, - Windows10_Output(stdout, default_color_depth=color_depth_from_env), - ) - if is_conemu_ansi(): - return cast( - Output, ConEmuOutput(stdout, default_color_depth=color_depth_from_env) - ) - else: - return Win32Output(stdout, default_color_depth=color_depth_from_env) - else: - from .vt100 import Vt100_Output - - # Stdout is not a TTY? Render as plain text. - # This is mostly useful if stdout is redirected to a file, and - # `print_formatted_text` is used. - if not stdout.isatty(): - return PlainTextOutput(stdout) - - return Vt100_Output.from_pty( - stdout, - term=term_from_env, - default_color_depth=color_depth_from_env, - enable_bell=bell_from_env, - ) diff --git a/voxvera/vendor/prompt_toolkit/output/flush_stdout.py b/voxvera/vendor/prompt_toolkit/output/flush_stdout.py deleted file mode 100644 index daf58ef..0000000 --- a/voxvera/vendor/prompt_toolkit/output/flush_stdout.py +++ /dev/null @@ -1,87 +0,0 @@ -from __future__ import annotations - -import errno -import os -import sys -from contextlib import contextmanager -from typing import IO, Iterator, TextIO - -__all__ = ["flush_stdout"] - - -def flush_stdout(stdout: TextIO, data: str) -> None: - # If the IO object has an `encoding` and `buffer` attribute, it means that - # we can access the underlying BinaryIO object and write into it in binary - # mode. This is preferred if possible. - # NOTE: When used in a Jupyter notebook, don't write binary. - # `ipykernel.iostream.OutStream` has an `encoding` attribute, but not - # a `buffer` attribute, so we can't write binary in it. - has_binary_io = hasattr(stdout, "encoding") and hasattr(stdout, "buffer") - - try: - # Ensure that `stdout` is made blocking when writing into it. - # Otherwise, when uvloop is activated (which makes stdout - # non-blocking), and we write big amounts of text, then we get a - # `BlockingIOError` here. - with _blocking_io(stdout): - # (We try to encode ourself, because that way we can replace - # characters that don't exist in the character set, avoiding - # UnicodeEncodeError crashes. E.g. u'\xb7' does not appear in 'ascii'.) - # My Arch Linux installation of july 2015 reported 'ANSI_X3.4-1968' - # for sys.stdout.encoding in xterm. - if has_binary_io: - stdout.buffer.write(data.encode(stdout.encoding or "utf-8", "replace")) - else: - stdout.write(data) - - stdout.flush() - except OSError as e: - if e.args and e.args[0] == errno.EINTR: - # Interrupted system call. Can happen in case of a window - # resize signal. (Just ignore. The resize handler will render - # again anyway.) - pass - elif e.args and e.args[0] == 0: - # This can happen when there is a lot of output and the user - # sends a KeyboardInterrupt by pressing Control-C. E.g. in - # a Python REPL when we execute "while True: print('test')". - # (The `ptpython` REPL uses this `Output` class instead of - # `stdout` directly -- in order to be network transparent.) - # So, just ignore. - pass - else: - raise - - -@contextmanager -def _blocking_io(io: IO[str]) -> Iterator[None]: - """ - Ensure that the FD for `io` is set to blocking in here. - """ - if sys.platform == "win32": - # On Windows, the `os` module doesn't have a `get/set_blocking` - # function. - yield - return - - try: - fd = io.fileno() - blocking = os.get_blocking(fd) - except: # noqa - # Failed somewhere. - # `get_blocking` can raise `OSError`. - # The io object can raise `AttributeError` when no `fileno()` method is - # present if we're not a real file object. - blocking = True # Assume we're good, and don't do anything. - - try: - # Make blocking if we weren't blocking yet. - if not blocking: - os.set_blocking(fd, True) - - yield - - finally: - # Restore original blocking mode. - if not blocking: - os.set_blocking(fd, blocking) diff --git a/voxvera/vendor/prompt_toolkit/output/plain_text.py b/voxvera/vendor/prompt_toolkit/output/plain_text.py deleted file mode 100644 index 4b24ad9..0000000 --- a/voxvera/vendor/prompt_toolkit/output/plain_text.py +++ /dev/null @@ -1,143 +0,0 @@ -from __future__ import annotations - -from typing import TextIO - -from prompt_toolkit.cursor_shapes import CursorShape -from prompt_toolkit.data_structures import Size -from prompt_toolkit.styles import Attrs - -from .base import Output -from .color_depth import ColorDepth -from .flush_stdout import flush_stdout - -__all__ = ["PlainTextOutput"] - - -class PlainTextOutput(Output): - """ - Output that won't include any ANSI escape sequences. - - Useful when stdout is not a terminal. Maybe stdout is redirected to a file. - In this case, if `print_formatted_text` is used, for instance, we don't - want to include formatting. - - (The code is mostly identical to `Vt100_Output`, but without the - formatting.) - """ - - def __init__(self, stdout: TextIO) -> None: - assert all(hasattr(stdout, a) for a in ("write", "flush")) - - self.stdout: TextIO = stdout - self._buffer: list[str] = [] - - def fileno(self) -> int: - "There is no sensible default for fileno()." - return self.stdout.fileno() - - def encoding(self) -> str: - return "utf-8" - - def write(self, data: str) -> None: - self._buffer.append(data) - - def write_raw(self, data: str) -> None: - self._buffer.append(data) - - def set_title(self, title: str) -> None: - pass - - def clear_title(self) -> None: - pass - - def flush(self) -> None: - if not self._buffer: - return - - data = "".join(self._buffer) - self._buffer = [] - flush_stdout(self.stdout, data) - - def erase_screen(self) -> None: - pass - - def enter_alternate_screen(self) -> None: - pass - - def quit_alternate_screen(self) -> None: - pass - - def enable_mouse_support(self) -> None: - pass - - def disable_mouse_support(self) -> None: - pass - - def erase_end_of_line(self) -> None: - pass - - def erase_down(self) -> None: - pass - - def reset_attributes(self) -> None: - pass - - def set_attributes(self, attrs: Attrs, color_depth: ColorDepth) -> None: - pass - - def disable_autowrap(self) -> None: - pass - - def enable_autowrap(self) -> None: - pass - - def cursor_goto(self, row: int = 0, column: int = 0) -> None: - pass - - def cursor_up(self, amount: int) -> None: - pass - - def cursor_down(self, amount: int) -> None: - self._buffer.append("\n") - - def cursor_forward(self, amount: int) -> None: - self._buffer.append(" " * amount) - - def cursor_backward(self, amount: int) -> None: - pass - - def hide_cursor(self) -> None: - pass - - def show_cursor(self) -> None: - pass - - def set_cursor_shape(self, cursor_shape: CursorShape) -> None: - pass - - def reset_cursor_shape(self) -> None: - pass - - def ask_for_cpr(self) -> None: - pass - - def bell(self) -> None: - pass - - def enable_bracketed_paste(self) -> None: - pass - - def disable_bracketed_paste(self) -> None: - pass - - def scroll_buffer_to_prompt(self) -> None: - pass - - def get_size(self) -> Size: - return Size(rows=40, columns=80) - - def get_rows_below_cursor_position(self) -> int: - return 8 - - def get_default_color_depth(self) -> ColorDepth: - return ColorDepth.DEPTH_1_BIT diff --git a/voxvera/vendor/prompt_toolkit/output/vt100.py b/voxvera/vendor/prompt_toolkit/output/vt100.py deleted file mode 100644 index 57826b9..0000000 --- a/voxvera/vendor/prompt_toolkit/output/vt100.py +++ /dev/null @@ -1,760 +0,0 @@ -""" -Output for vt100 terminals. - -A lot of thanks, regarding outputting of colors, goes to the Pygments project: -(We don't rely on Pygments anymore, because many things are very custom, and -everything has been highly optimized.) -http://pygments.org/ -""" - -from __future__ import annotations - -import io -import os -import sys -from typing import Callable, Dict, Hashable, Iterable, Sequence, TextIO, Tuple - -from prompt_toolkit.cursor_shapes import CursorShape -from prompt_toolkit.data_structures import Size -from prompt_toolkit.output import Output -from prompt_toolkit.styles import ANSI_COLOR_NAMES, Attrs -from prompt_toolkit.utils import is_dumb_terminal - -from .color_depth import ColorDepth -from .flush_stdout import flush_stdout - -__all__ = [ - "Vt100_Output", -] - - -FG_ANSI_COLORS = { - "ansidefault": 39, - # Low intensity. - "ansiblack": 30, - "ansired": 31, - "ansigreen": 32, - "ansiyellow": 33, - "ansiblue": 34, - "ansimagenta": 35, - "ansicyan": 36, - "ansigray": 37, - # High intensity. - "ansibrightblack": 90, - "ansibrightred": 91, - "ansibrightgreen": 92, - "ansibrightyellow": 93, - "ansibrightblue": 94, - "ansibrightmagenta": 95, - "ansibrightcyan": 96, - "ansiwhite": 97, -} - -BG_ANSI_COLORS = { - "ansidefault": 49, - # Low intensity. - "ansiblack": 40, - "ansired": 41, - "ansigreen": 42, - "ansiyellow": 43, - "ansiblue": 44, - "ansimagenta": 45, - "ansicyan": 46, - "ansigray": 47, - # High intensity. - "ansibrightblack": 100, - "ansibrightred": 101, - "ansibrightgreen": 102, - "ansibrightyellow": 103, - "ansibrightblue": 104, - "ansibrightmagenta": 105, - "ansibrightcyan": 106, - "ansiwhite": 107, -} - - -ANSI_COLORS_TO_RGB = { - "ansidefault": ( - 0x00, - 0x00, - 0x00, - ), # Don't use, 'default' doesn't really have a value. - "ansiblack": (0x00, 0x00, 0x00), - "ansigray": (0xE5, 0xE5, 0xE5), - "ansibrightblack": (0x7F, 0x7F, 0x7F), - "ansiwhite": (0xFF, 0xFF, 0xFF), - # Low intensity. - "ansired": (0xCD, 0x00, 0x00), - "ansigreen": (0x00, 0xCD, 0x00), - "ansiyellow": (0xCD, 0xCD, 0x00), - "ansiblue": (0x00, 0x00, 0xCD), - "ansimagenta": (0xCD, 0x00, 0xCD), - "ansicyan": (0x00, 0xCD, 0xCD), - # High intensity. - "ansibrightred": (0xFF, 0x00, 0x00), - "ansibrightgreen": (0x00, 0xFF, 0x00), - "ansibrightyellow": (0xFF, 0xFF, 0x00), - "ansibrightblue": (0x00, 0x00, 0xFF), - "ansibrightmagenta": (0xFF, 0x00, 0xFF), - "ansibrightcyan": (0x00, 0xFF, 0xFF), -} - - -assert set(FG_ANSI_COLORS) == set(ANSI_COLOR_NAMES) -assert set(BG_ANSI_COLORS) == set(ANSI_COLOR_NAMES) -assert set(ANSI_COLORS_TO_RGB) == set(ANSI_COLOR_NAMES) - - -def _get_closest_ansi_color(r: int, g: int, b: int, exclude: Sequence[str] = ()) -> str: - """ - Find closest ANSI color. Return it by name. - - :param r: Red (Between 0 and 255.) - :param g: Green (Between 0 and 255.) - :param b: Blue (Between 0 and 255.) - :param exclude: A tuple of color names to exclude. (E.g. ``('ansired', )``.) - """ - exclude = list(exclude) - - # When we have a bit of saturation, avoid the gray-like colors, otherwise, - # too often the distance to the gray color is less. - saturation = abs(r - g) + abs(g - b) + abs(b - r) # Between 0..510 - - if saturation > 30: - exclude.extend(["ansilightgray", "ansidarkgray", "ansiwhite", "ansiblack"]) - - # Take the closest color. - # (Thanks to Pygments for this part.) - distance = 257 * 257 * 3 # "infinity" (>distance from #000000 to #ffffff) - match = "ansidefault" - - for name, (r2, g2, b2) in ANSI_COLORS_TO_RGB.items(): - if name != "ansidefault" and name not in exclude: - d = (r - r2) ** 2 + (g - g2) ** 2 + (b - b2) ** 2 - - if d < distance: - match = name - distance = d - - return match - - -_ColorCodeAndName = Tuple[int, str] - - -class _16ColorCache: - """ - Cache which maps (r, g, b) tuples to 16 ansi colors. - - :param bg: Cache for background colors, instead of foreground. - """ - - def __init__(self, bg: bool = False) -> None: - self.bg = bg - self._cache: dict[Hashable, _ColorCodeAndName] = {} - - def get_code( - self, value: tuple[int, int, int], exclude: Sequence[str] = () - ) -> _ColorCodeAndName: - """ - Return a (ansi_code, ansi_name) tuple. (E.g. ``(44, 'ansiblue')``.) for - a given (r,g,b) value. - """ - key: Hashable = (value, tuple(exclude)) - cache = self._cache - - if key not in cache: - cache[key] = self._get(value, exclude) - - return cache[key] - - def _get( - self, value: tuple[int, int, int], exclude: Sequence[str] = () - ) -> _ColorCodeAndName: - r, g, b = value - match = _get_closest_ansi_color(r, g, b, exclude=exclude) - - # Turn color name into code. - if self.bg: - code = BG_ANSI_COLORS[match] - else: - code = FG_ANSI_COLORS[match] - - return code, match - - -class _256ColorCache(Dict[Tuple[int, int, int], int]): - """ - Cache which maps (r, g, b) tuples to 256 colors. - """ - - def __init__(self) -> None: - # Build color table. - colors: list[tuple[int, int, int]] = [] - - # colors 0..15: 16 basic colors - colors.append((0x00, 0x00, 0x00)) # 0 - colors.append((0xCD, 0x00, 0x00)) # 1 - colors.append((0x00, 0xCD, 0x00)) # 2 - colors.append((0xCD, 0xCD, 0x00)) # 3 - colors.append((0x00, 0x00, 0xEE)) # 4 - colors.append((0xCD, 0x00, 0xCD)) # 5 - colors.append((0x00, 0xCD, 0xCD)) # 6 - colors.append((0xE5, 0xE5, 0xE5)) # 7 - colors.append((0x7F, 0x7F, 0x7F)) # 8 - colors.append((0xFF, 0x00, 0x00)) # 9 - colors.append((0x00, 0xFF, 0x00)) # 10 - colors.append((0xFF, 0xFF, 0x00)) # 11 - colors.append((0x5C, 0x5C, 0xFF)) # 12 - colors.append((0xFF, 0x00, 0xFF)) # 13 - colors.append((0x00, 0xFF, 0xFF)) # 14 - colors.append((0xFF, 0xFF, 0xFF)) # 15 - - # colors 16..232: the 6x6x6 color cube - valuerange = (0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF) - - for i in range(217): - r = valuerange[(i // 36) % 6] - g = valuerange[(i // 6) % 6] - b = valuerange[i % 6] - colors.append((r, g, b)) - - # colors 233..253: grayscale - for i in range(1, 22): - v = 8 + i * 10 - colors.append((v, v, v)) - - self.colors = colors - - def __missing__(self, value: tuple[int, int, int]) -> int: - r, g, b = value - - # Find closest color. - # (Thanks to Pygments for this!) - distance = 257 * 257 * 3 # "infinity" (>distance from #000000 to #ffffff) - match = 0 - - for i, (r2, g2, b2) in enumerate(self.colors): - if i >= 16: # XXX: We ignore the 16 ANSI colors when mapping RGB - # to the 256 colors, because these highly depend on - # the color scheme of the terminal. - d = (r - r2) ** 2 + (g - g2) ** 2 + (b - b2) ** 2 - - if d < distance: - match = i - distance = d - - # Turn color name into code. - self[value] = match - return match - - -_16_fg_colors = _16ColorCache(bg=False) -_16_bg_colors = _16ColorCache(bg=True) -_256_colors = _256ColorCache() - - -class _EscapeCodeCache(Dict[Attrs, str]): - """ - Cache for VT100 escape codes. It maps - (fgcolor, bgcolor, bold, underline, strike, italic, blink, reverse, hidden, dim) tuples to VT100 - escape sequences. - - :param true_color: When True, use 24bit colors instead of 256 colors. - """ - - def __init__(self, color_depth: ColorDepth) -> None: - self.color_depth = color_depth - - def __missing__(self, attrs: Attrs) -> str: - ( - fgcolor, - bgcolor, - bold, - underline, - strike, - italic, - blink, - reverse, - hidden, - dim, - ) = attrs - parts: list[str] = [] - - parts.extend(self._colors_to_code(fgcolor or "", bgcolor or "")) - - if bold: - parts.append("1") - if dim: - parts.append("2") - if italic: - parts.append("3") - if blink: - parts.append("5") - if underline: - parts.append("4") - if reverse: - parts.append("7") - if hidden: - parts.append("8") - if strike: - parts.append("9") - - if parts: - result = "\x1b[0;" + ";".join(parts) + "m" - else: - result = "\x1b[0m" - - self[attrs] = result - return result - - def _color_name_to_rgb(self, color: str) -> tuple[int, int, int]: - "Turn 'ffffff', into (0xff, 0xff, 0xff)." - try: - rgb = int(color, 16) - except ValueError: - raise - else: - r = (rgb >> 16) & 0xFF - g = (rgb >> 8) & 0xFF - b = rgb & 0xFF - return r, g, b - - def _colors_to_code(self, fg_color: str, bg_color: str) -> Iterable[str]: - """ - Return a tuple with the vt100 values that represent this color. - """ - # When requesting ANSI colors only, and both fg/bg color were converted - # to ANSI, ensure that the foreground and background color are not the - # same. (Unless they were explicitly defined to be the same color.) - fg_ansi = "" - - def get(color: str, bg: bool) -> list[int]: - nonlocal fg_ansi - - table = BG_ANSI_COLORS if bg else FG_ANSI_COLORS - - if not color or self.color_depth == ColorDepth.DEPTH_1_BIT: - return [] - - # 16 ANSI colors. (Given by name.) - elif color in table: - return [table[color]] - - # RGB colors. (Defined as 'ffffff'.) - else: - try: - rgb = self._color_name_to_rgb(color) - except ValueError: - return [] - - # When only 16 colors are supported, use that. - if self.color_depth == ColorDepth.DEPTH_4_BIT: - if bg: # Background. - if fg_color != bg_color: - exclude = [fg_ansi] - else: - exclude = [] - code, name = _16_bg_colors.get_code(rgb, exclude=exclude) - return [code] - else: # Foreground. - code, name = _16_fg_colors.get_code(rgb) - fg_ansi = name - return [code] - - # True colors. (Only when this feature is enabled.) - elif self.color_depth == ColorDepth.DEPTH_24_BIT: - r, g, b = rgb - return [(48 if bg else 38), 2, r, g, b] - - # 256 RGB colors. - else: - return [(48 if bg else 38), 5, _256_colors[rgb]] - - result: list[int] = [] - result.extend(get(fg_color, False)) - result.extend(get(bg_color, True)) - - return map(str, result) - - -def _get_size(fileno: int) -> tuple[int, int]: - """ - Get the size of this pseudo terminal. - - :param fileno: stdout.fileno() - :returns: A (rows, cols) tuple. - """ - size = os.get_terminal_size(fileno) - return size.lines, size.columns - - -class Vt100_Output(Output): - """ - :param get_size: A callable which returns the `Size` of the output terminal. - :param stdout: Any object with has a `write` and `flush` method + an 'encoding' property. - :param term: The terminal environment variable. (xterm, xterm-256color, linux, ...) - :param enable_cpr: When `True` (the default), send "cursor position - request" escape sequences to the output in order to detect the cursor - position. That way, we can properly determine how much space there is - available for the UI (especially for drop down menus) to render. The - `Renderer` will still try to figure out whether the current terminal - does respond to CPR escapes. When `False`, never attempt to send CPR - requests. - """ - - # For the error messages. Only display "Output is not a terminal" once per - # file descriptor. - _fds_not_a_terminal: set[int] = set() - - def __init__( - self, - stdout: TextIO, - get_size: Callable[[], Size], - term: str | None = None, - default_color_depth: ColorDepth | None = None, - enable_bell: bool = True, - enable_cpr: bool = True, - ) -> None: - assert all(hasattr(stdout, a) for a in ("write", "flush")) - - self._buffer: list[str] = [] - self.stdout: TextIO = stdout - self.default_color_depth = default_color_depth - self._get_size = get_size - self.term = term - self.enable_bell = enable_bell - self.enable_cpr = enable_cpr - - # Cache for escape codes. - self._escape_code_caches: dict[ColorDepth, _EscapeCodeCache] = { - ColorDepth.DEPTH_1_BIT: _EscapeCodeCache(ColorDepth.DEPTH_1_BIT), - ColorDepth.DEPTH_4_BIT: _EscapeCodeCache(ColorDepth.DEPTH_4_BIT), - ColorDepth.DEPTH_8_BIT: _EscapeCodeCache(ColorDepth.DEPTH_8_BIT), - ColorDepth.DEPTH_24_BIT: _EscapeCodeCache(ColorDepth.DEPTH_24_BIT), - } - - # Keep track of whether the cursor shape was ever changed. - # (We don't restore the cursor shape if it was never changed - by - # default, we don't change them.) - self._cursor_shape_changed = False - - # Don't hide/show the cursor when this was already done. - # (`None` means that we don't know whether the cursor is visible or - # not.) - self._cursor_visible: bool | None = None - - @classmethod - def from_pty( - cls, - stdout: TextIO, - term: str | None = None, - default_color_depth: ColorDepth | None = None, - enable_bell: bool = True, - ) -> Vt100_Output: - """ - Create an Output class from a pseudo terminal. - (This will take the dimensions by reading the pseudo - terminal attributes.) - """ - fd: int | None - # Normally, this requires a real TTY device, but people instantiate - # this class often during unit tests as well. For convenience, we print - # an error message, use standard dimensions, and go on. - try: - fd = stdout.fileno() - except io.UnsupportedOperation: - fd = None - - if not stdout.isatty() and (fd is None or fd not in cls._fds_not_a_terminal): - msg = "Warning: Output is not a terminal (fd=%r).\n" - sys.stderr.write(msg % fd) - sys.stderr.flush() - if fd is not None: - cls._fds_not_a_terminal.add(fd) - - def get_size() -> Size: - # If terminal (incorrectly) reports its size as 0, pick a - # reasonable default. See - # https://github.com/ipython/ipython/issues/10071 - rows, columns = (None, None) - - # It is possible that `stdout` is no longer a TTY device at this - # point. In that case we get an `OSError` in the ioctl call in - # `get_size`. See: - # https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1021 - try: - rows, columns = _get_size(stdout.fileno()) - except OSError: - pass - return Size(rows=rows or 24, columns=columns or 80) - - return cls( - stdout, - get_size, - term=term, - default_color_depth=default_color_depth, - enable_bell=enable_bell, - ) - - def get_size(self) -> Size: - return self._get_size() - - def fileno(self) -> int: - "Return file descriptor." - return self.stdout.fileno() - - def encoding(self) -> str: - "Return encoding used for stdout." - return self.stdout.encoding - - def write_raw(self, data: str) -> None: - """ - Write raw data to output. - """ - self._buffer.append(data) - - def write(self, data: str) -> None: - """ - Write text to output. - (Removes vt100 escape codes. -- used for safely writing text.) - """ - self._buffer.append(data.replace("\x1b", "?")) - - def set_title(self, title: str) -> None: - """ - Set terminal title. - """ - if self.term not in ( - "linux", - "eterm-color", - ): # Not supported by the Linux console. - self.write_raw( - "\x1b]2;{}\x07".format(title.replace("\x1b", "").replace("\x07", "")) - ) - - def clear_title(self) -> None: - self.set_title("") - - def erase_screen(self) -> None: - """ - Erases the screen with the background color and moves the cursor to - home. - """ - self.write_raw("\x1b[2J") - - def enter_alternate_screen(self) -> None: - self.write_raw("\x1b[?1049h\x1b[H") - - def quit_alternate_screen(self) -> None: - self.write_raw("\x1b[?1049l") - - def enable_mouse_support(self) -> None: - self.write_raw("\x1b[?1000h") - - # Enable mouse-drag support. - self.write_raw("\x1b[?1003h") - - # Enable urxvt Mouse mode. (For terminals that understand this.) - self.write_raw("\x1b[?1015h") - - # Also enable Xterm SGR mouse mode. (For terminals that understand this.) - self.write_raw("\x1b[?1006h") - - # Note: E.g. lxterminal understands 1000h, but not the urxvt or sgr - # extensions. - - def disable_mouse_support(self) -> None: - self.write_raw("\x1b[?1000l") - self.write_raw("\x1b[?1015l") - self.write_raw("\x1b[?1006l") - self.write_raw("\x1b[?1003l") - - def erase_end_of_line(self) -> None: - """ - Erases from the current cursor position to the end of the current line. - """ - self.write_raw("\x1b[K") - - def erase_down(self) -> None: - """ - Erases the screen from the current line down to the bottom of the - screen. - """ - self.write_raw("\x1b[J") - - def reset_attributes(self) -> None: - self.write_raw("\x1b[0m") - - def set_attributes(self, attrs: Attrs, color_depth: ColorDepth) -> None: - """ - Create new style and output. - - :param attrs: `Attrs` instance. - """ - # Get current depth. - escape_code_cache = self._escape_code_caches[color_depth] - - # Write escape character. - self.write_raw(escape_code_cache[attrs]) - - def disable_autowrap(self) -> None: - self.write_raw("\x1b[?7l") - - def enable_autowrap(self) -> None: - self.write_raw("\x1b[?7h") - - def enable_bracketed_paste(self) -> None: - self.write_raw("\x1b[?2004h") - - def disable_bracketed_paste(self) -> None: - self.write_raw("\x1b[?2004l") - - def reset_cursor_key_mode(self) -> None: - """ - For vt100 only. - Put the terminal in cursor mode (instead of application mode). - """ - # Put the terminal in cursor mode. (Instead of application mode.) - self.write_raw("\x1b[?1l") - - def cursor_goto(self, row: int = 0, column: int = 0) -> None: - """ - Move cursor position. - """ - self.write_raw("\x1b[%i;%iH" % (row, column)) - - def cursor_up(self, amount: int) -> None: - if amount == 0: - pass - elif amount == 1: - self.write_raw("\x1b[A") - else: - self.write_raw("\x1b[%iA" % amount) - - def cursor_down(self, amount: int) -> None: - if amount == 0: - pass - elif amount == 1: - # Note: Not the same as '\n', '\n' can cause the window content to - # scroll. - self.write_raw("\x1b[B") - else: - self.write_raw("\x1b[%iB" % amount) - - def cursor_forward(self, amount: int) -> None: - if amount == 0: - pass - elif amount == 1: - self.write_raw("\x1b[C") - else: - self.write_raw("\x1b[%iC" % amount) - - def cursor_backward(self, amount: int) -> None: - if amount == 0: - pass - elif amount == 1: - self.write_raw("\b") # '\x1b[D' - else: - self.write_raw("\x1b[%iD" % amount) - - def hide_cursor(self) -> None: - if self._cursor_visible in (True, None): - self._cursor_visible = False - self.write_raw("\x1b[?25l") - - def show_cursor(self) -> None: - if self._cursor_visible in (False, None): - self._cursor_visible = True - self.write_raw("\x1b[?12l\x1b[?25h") # Stop blinking cursor and show. - - def set_cursor_shape(self, cursor_shape: CursorShape) -> None: - if cursor_shape == CursorShape._NEVER_CHANGE: - return - - self._cursor_shape_changed = True - self.write_raw( - { - CursorShape.BLOCK: "\x1b[2 q", - CursorShape.BEAM: "\x1b[6 q", - CursorShape.UNDERLINE: "\x1b[4 q", - CursorShape.BLINKING_BLOCK: "\x1b[1 q", - CursorShape.BLINKING_BEAM: "\x1b[5 q", - CursorShape.BLINKING_UNDERLINE: "\x1b[3 q", - }.get(cursor_shape, "") - ) - - def reset_cursor_shape(self) -> None: - "Reset cursor shape." - # (Only reset cursor shape, if we ever changed it.) - if self._cursor_shape_changed: - self._cursor_shape_changed = False - - # Reset cursor shape. - self.write_raw("\x1b[0 q") - - def flush(self) -> None: - """ - Write to output stream and flush. - """ - if not self._buffer: - return - - data = "".join(self._buffer) - self._buffer = [] - - flush_stdout(self.stdout, data) - - def ask_for_cpr(self) -> None: - """ - Asks for a cursor position report (CPR). - """ - self.write_raw("\x1b[6n") - self.flush() - - @property - def responds_to_cpr(self) -> bool: - if not self.enable_cpr: - return False - - # When the input is a tty, we assume that CPR is supported. - # It's not when the input is piped from Pexpect. - if os.environ.get("PROMPT_TOOLKIT_NO_CPR", "") == "1": - return False - - if is_dumb_terminal(self.term): - return False - try: - return self.stdout.isatty() - except ValueError: - return False # ValueError: I/O operation on closed file - - def bell(self) -> None: - "Sound bell." - if self.enable_bell: - self.write_raw("\a") - self.flush() - - def get_default_color_depth(self) -> ColorDepth: - """ - Return the default color depth for a vt100 terminal, according to the - our term value. - - We prefer 256 colors almost always, because this is what most terminals - support these days, and is a good default. - """ - if self.default_color_depth is not None: - return self.default_color_depth - - term = self.term - - if term is None: - return ColorDepth.DEFAULT - - if is_dumb_terminal(term): - return ColorDepth.DEPTH_1_BIT - - if term in ("linux", "eterm-color"): - return ColorDepth.DEPTH_4_BIT - - return ColorDepth.DEFAULT diff --git a/voxvera/vendor/prompt_toolkit/output/win32.py b/voxvera/vendor/prompt_toolkit/output/win32.py deleted file mode 100644 index 1c0cc4e..0000000 --- a/voxvera/vendor/prompt_toolkit/output/win32.py +++ /dev/null @@ -1,684 +0,0 @@ -from __future__ import annotations - -import sys - -assert sys.platform == "win32" - -import os -from ctypes import ArgumentError, byref, c_char, c_long, c_uint, c_ulong, pointer -from ctypes.wintypes import DWORD, HANDLE -from typing import Callable, TextIO, TypeVar - -from prompt_toolkit.cursor_shapes import CursorShape -from prompt_toolkit.data_structures import Size -from prompt_toolkit.styles import ANSI_COLOR_NAMES, Attrs -from prompt_toolkit.utils import get_cwidth -from prompt_toolkit.win32_types import ( - CONSOLE_SCREEN_BUFFER_INFO, - COORD, - SMALL_RECT, - STD_INPUT_HANDLE, - STD_OUTPUT_HANDLE, -) - -from ..utils import SPHINX_AUTODOC_RUNNING -from .base import Output -from .color_depth import ColorDepth - -# Do not import win32-specific stuff when generating documentation. -# Otherwise RTD would be unable to generate docs for this module. -if not SPHINX_AUTODOC_RUNNING: - from ctypes import windll - - -__all__ = [ - "Win32Output", -] - - -def _coord_byval(coord: COORD) -> c_long: - """ - Turns a COORD object into a c_long. - This will cause it to be passed by value instead of by reference. (That is what I think at least.) - - When running ``ptipython`` is run (only with IPython), we often got the following error:: - - Error in 'SetConsoleCursorPosition'. - ArgumentError("argument 2: : wrong type",) - argument 2: : wrong type - - It was solved by turning ``COORD`` parameters into a ``c_long`` like this. - - More info: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686025(v=vs.85).aspx - """ - return c_long(coord.Y * 0x10000 | coord.X & 0xFFFF) - - -#: If True: write the output of the renderer also to the following file. This -#: is very useful for debugging. (e.g.: to see that we don't write more bytes -#: than required.) -_DEBUG_RENDER_OUTPUT = False -_DEBUG_RENDER_OUTPUT_FILENAME = r"prompt-toolkit-windows-output.log" - - -class NoConsoleScreenBufferError(Exception): - """ - Raised when the application is not running inside a Windows Console, but - the user tries to instantiate Win32Output. - """ - - def __init__(self) -> None: - # Are we running in 'xterm' on Windows, like git-bash for instance? - xterm = "xterm" in os.environ.get("TERM", "") - - if xterm: - message = ( - "Found {}, while expecting a Windows console. " - 'Maybe try to run this program using "winpty" ' - "or run it in cmd.exe instead. Or otherwise, " - "in case of Cygwin, use the Python executable " - "that is compiled for Cygwin.".format(os.environ["TERM"]) - ) - else: - message = "No Windows console found. Are you running cmd.exe?" - super().__init__(message) - - -_T = TypeVar("_T") - - -class Win32Output(Output): - """ - I/O abstraction for rendering to Windows consoles. - (cmd.exe and similar.) - """ - - def __init__( - self, - stdout: TextIO, - use_complete_width: bool = False, - default_color_depth: ColorDepth | None = None, - ) -> None: - self.use_complete_width = use_complete_width - self.default_color_depth = default_color_depth - - self._buffer: list[str] = [] - self.stdout: TextIO = stdout - self.hconsole = HANDLE(windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)) - - self._in_alternate_screen = False - self._hidden = False - - self.color_lookup_table = ColorLookupTable() - - # Remember the default console colors. - info = self.get_win32_screen_buffer_info() - self.default_attrs = info.wAttributes if info else 15 - - if _DEBUG_RENDER_OUTPUT: - self.LOG = open(_DEBUG_RENDER_OUTPUT_FILENAME, "ab") - - def fileno(self) -> int: - "Return file descriptor." - return self.stdout.fileno() - - def encoding(self) -> str: - "Return encoding used for stdout." - return self.stdout.encoding - - def write(self, data: str) -> None: - if self._hidden: - data = " " * get_cwidth(data) - - self._buffer.append(data) - - def write_raw(self, data: str) -> None: - "For win32, there is no difference between write and write_raw." - self.write(data) - - def get_size(self) -> Size: - info = self.get_win32_screen_buffer_info() - - # We take the width of the *visible* region as the size. Not the width - # of the complete screen buffer. (Unless use_complete_width has been - # set.) - if self.use_complete_width: - width = info.dwSize.X - else: - width = info.srWindow.Right - info.srWindow.Left - - height = info.srWindow.Bottom - info.srWindow.Top + 1 - - # We avoid the right margin, windows will wrap otherwise. - maxwidth = info.dwSize.X - 1 - width = min(maxwidth, width) - - # Create `Size` object. - return Size(rows=height, columns=width) - - def _winapi(self, func: Callable[..., _T], *a: object, **kw: object) -> _T: - """ - Flush and call win API function. - """ - self.flush() - - if _DEBUG_RENDER_OUTPUT: - self.LOG.write((f"{func.__name__!r}").encode() + b"\n") - self.LOG.write( - b" " + ", ".join([f"{i!r}" for i in a]).encode("utf-8") + b"\n" - ) - self.LOG.write( - b" " - + ", ".join([f"{type(i)!r}" for i in a]).encode("utf-8") - + b"\n" - ) - self.LOG.flush() - - try: - return func(*a, **kw) - except ArgumentError as e: - if _DEBUG_RENDER_OUTPUT: - self.LOG.write((f" Error in {func.__name__!r} {e!r} {e}\n").encode()) - - raise - - def get_win32_screen_buffer_info(self) -> CONSOLE_SCREEN_BUFFER_INFO: - """ - Return Screen buffer info. - """ - # NOTE: We don't call the `GetConsoleScreenBufferInfo` API through - # `self._winapi`. Doing so causes Python to crash on certain 64bit - # Python versions. (Reproduced with 64bit Python 2.7.6, on Windows - # 10). It is not clear why. Possibly, it has to do with passing - # these objects as an argument, or through *args. - - # The Python documentation contains the following - possibly related - warning: - # ctypes does not support passing unions or structures with - # bit-fields to functions by value. While this may work on 32-bit - # x86, it's not guaranteed by the library to work in the general - # case. Unions and structures with bit-fields should always be - # passed to functions by pointer. - - # Also see: - # - https://github.com/ipython/ipython/issues/10070 - # - https://github.com/jonathanslenders/python-prompt-toolkit/issues/406 - # - https://github.com/jonathanslenders/python-prompt-toolkit/issues/86 - - self.flush() - sbinfo = CONSOLE_SCREEN_BUFFER_INFO() - success = windll.kernel32.GetConsoleScreenBufferInfo( - self.hconsole, byref(sbinfo) - ) - - # success = self._winapi(windll.kernel32.GetConsoleScreenBufferInfo, - # self.hconsole, byref(sbinfo)) - - if success: - return sbinfo - else: - raise NoConsoleScreenBufferError - - def set_title(self, title: str) -> None: - """ - Set terminal title. - """ - self._winapi(windll.kernel32.SetConsoleTitleW, title) - - def clear_title(self) -> None: - self._winapi(windll.kernel32.SetConsoleTitleW, "") - - def erase_screen(self) -> None: - start = COORD(0, 0) - sbinfo = self.get_win32_screen_buffer_info() - length = sbinfo.dwSize.X * sbinfo.dwSize.Y - - self.cursor_goto(row=0, column=0) - self._erase(start, length) - - def erase_down(self) -> None: - sbinfo = self.get_win32_screen_buffer_info() - size = sbinfo.dwSize - - start = sbinfo.dwCursorPosition - length = (size.X - size.X) + size.X * (size.Y - sbinfo.dwCursorPosition.Y) - - self._erase(start, length) - - def erase_end_of_line(self) -> None: - """""" - sbinfo = self.get_win32_screen_buffer_info() - start = sbinfo.dwCursorPosition - length = sbinfo.dwSize.X - sbinfo.dwCursorPosition.X - - self._erase(start, length) - - def _erase(self, start: COORD, length: int) -> None: - chars_written = c_ulong() - - self._winapi( - windll.kernel32.FillConsoleOutputCharacterA, - self.hconsole, - c_char(b" "), - DWORD(length), - _coord_byval(start), - byref(chars_written), - ) - - # Reset attributes. - sbinfo = self.get_win32_screen_buffer_info() - self._winapi( - windll.kernel32.FillConsoleOutputAttribute, - self.hconsole, - sbinfo.wAttributes, - length, - _coord_byval(start), - byref(chars_written), - ) - - def reset_attributes(self) -> None: - "Reset the console foreground/background color." - self._winapi( - windll.kernel32.SetConsoleTextAttribute, self.hconsole, self.default_attrs - ) - self._hidden = False - - def set_attributes(self, attrs: Attrs, color_depth: ColorDepth) -> None: - ( - fgcolor, - bgcolor, - bold, - underline, - strike, - italic, - blink, - reverse, - hidden, - dim, - ) = attrs - self._hidden = bool(hidden) - - # Start from the default attributes. - win_attrs: int = self.default_attrs - - if color_depth != ColorDepth.DEPTH_1_BIT: - # Override the last four bits: foreground color. - if fgcolor: - win_attrs = win_attrs & ~0xF - win_attrs |= self.color_lookup_table.lookup_fg_color(fgcolor) - - # Override the next four bits: background color. - if bgcolor: - win_attrs = win_attrs & ~0xF0 - win_attrs |= self.color_lookup_table.lookup_bg_color(bgcolor) - - # Reverse: swap these four bits groups. - if reverse: - win_attrs = ( - (win_attrs & ~0xFF) - | ((win_attrs & 0xF) << 4) - | ((win_attrs & 0xF0) >> 4) - ) - - self._winapi(windll.kernel32.SetConsoleTextAttribute, self.hconsole, win_attrs) - - def disable_autowrap(self) -> None: - # Not supported by Windows. - pass - - def enable_autowrap(self) -> None: - # Not supported by Windows. - pass - - def cursor_goto(self, row: int = 0, column: int = 0) -> None: - pos = COORD(X=column, Y=row) - self._winapi( - windll.kernel32.SetConsoleCursorPosition, self.hconsole, _coord_byval(pos) - ) - - def cursor_up(self, amount: int) -> None: - sr = self.get_win32_screen_buffer_info().dwCursorPosition - pos = COORD(X=sr.X, Y=sr.Y - amount) - self._winapi( - windll.kernel32.SetConsoleCursorPosition, self.hconsole, _coord_byval(pos) - ) - - def cursor_down(self, amount: int) -> None: - self.cursor_up(-amount) - - def cursor_forward(self, amount: int) -> None: - sr = self.get_win32_screen_buffer_info().dwCursorPosition - # assert sr.X + amount >= 0, 'Negative cursor position: x=%r amount=%r' % (sr.X, amount) - - pos = COORD(X=max(0, sr.X + amount), Y=sr.Y) - self._winapi( - windll.kernel32.SetConsoleCursorPosition, self.hconsole, _coord_byval(pos) - ) - - def cursor_backward(self, amount: int) -> None: - self.cursor_forward(-amount) - - def flush(self) -> None: - """ - Write to output stream and flush. - """ - if not self._buffer: - # Only flush stdout buffer. (It could be that Python still has - # something in its buffer. -- We want to be sure to print that in - # the correct color.) - self.stdout.flush() - return - - data = "".join(self._buffer) - - if _DEBUG_RENDER_OUTPUT: - self.LOG.write((f"{data!r}").encode() + b"\n") - self.LOG.flush() - - # Print characters one by one. This appears to be the best solution - # in order to avoid traces of vertical lines when the completion - # menu disappears. - for b in data: - written = DWORD() - - retval = windll.kernel32.WriteConsoleW( - self.hconsole, b, 1, byref(written), None - ) - assert retval != 0 - - self._buffer = [] - - def get_rows_below_cursor_position(self) -> int: - info = self.get_win32_screen_buffer_info() - return info.srWindow.Bottom - info.dwCursorPosition.Y + 1 - - def scroll_buffer_to_prompt(self) -> None: - """ - To be called before drawing the prompt. This should scroll the console - to left, with the cursor at the bottom (if possible). - """ - # Get current window size - info = self.get_win32_screen_buffer_info() - sr = info.srWindow - cursor_pos = info.dwCursorPosition - - result = SMALL_RECT() - - # Scroll to the left. - result.Left = 0 - result.Right = sr.Right - sr.Left - - # Scroll vertical - win_height = sr.Bottom - sr.Top - if 0 < sr.Bottom - cursor_pos.Y < win_height - 1: - # no vertical scroll if cursor already on the screen - result.Bottom = sr.Bottom - else: - result.Bottom = max(win_height, cursor_pos.Y) - result.Top = result.Bottom - win_height - - # Scroll API - self._winapi( - windll.kernel32.SetConsoleWindowInfo, self.hconsole, True, byref(result) - ) - - def enter_alternate_screen(self) -> None: - """ - Go to alternate screen buffer. - """ - if not self._in_alternate_screen: - GENERIC_READ = 0x80000000 - GENERIC_WRITE = 0x40000000 - - # Create a new console buffer and activate that one. - handle = HANDLE( - self._winapi( - windll.kernel32.CreateConsoleScreenBuffer, - GENERIC_READ | GENERIC_WRITE, - DWORD(0), - None, - DWORD(1), - None, - ) - ) - - self._winapi(windll.kernel32.SetConsoleActiveScreenBuffer, handle) - self.hconsole = handle - self._in_alternate_screen = True - - def quit_alternate_screen(self) -> None: - """ - Make stdout again the active buffer. - """ - if self._in_alternate_screen: - stdout = HANDLE( - self._winapi(windll.kernel32.GetStdHandle, STD_OUTPUT_HANDLE) - ) - self._winapi(windll.kernel32.SetConsoleActiveScreenBuffer, stdout) - self._winapi(windll.kernel32.CloseHandle, self.hconsole) - self.hconsole = stdout - self._in_alternate_screen = False - - def enable_mouse_support(self) -> None: - ENABLE_MOUSE_INPUT = 0x10 - - # This `ENABLE_QUICK_EDIT_MODE` flag needs to be cleared for mouse - # support to work, but it's possible that it was already cleared - # before. - ENABLE_QUICK_EDIT_MODE = 0x0040 - - handle = HANDLE(windll.kernel32.GetStdHandle(STD_INPUT_HANDLE)) - - original_mode = DWORD() - self._winapi(windll.kernel32.GetConsoleMode, handle, pointer(original_mode)) - self._winapi( - windll.kernel32.SetConsoleMode, - handle, - (original_mode.value | ENABLE_MOUSE_INPUT) & ~ENABLE_QUICK_EDIT_MODE, - ) - - def disable_mouse_support(self) -> None: - ENABLE_MOUSE_INPUT = 0x10 - handle = HANDLE(windll.kernel32.GetStdHandle(STD_INPUT_HANDLE)) - - original_mode = DWORD() - self._winapi(windll.kernel32.GetConsoleMode, handle, pointer(original_mode)) - self._winapi( - windll.kernel32.SetConsoleMode, - handle, - original_mode.value & ~ENABLE_MOUSE_INPUT, - ) - - def hide_cursor(self) -> None: - pass - - def show_cursor(self) -> None: - pass - - def set_cursor_shape(self, cursor_shape: CursorShape) -> None: - pass - - def reset_cursor_shape(self) -> None: - pass - - @classmethod - def win32_refresh_window(cls) -> None: - """ - Call win32 API to refresh the whole Window. - - This is sometimes necessary when the application paints background - for completion menus. When the menu disappears, it leaves traces due - to a bug in the Windows Console. Sending a repaint request solves it. - """ - # Get console handle - handle = HANDLE(windll.kernel32.GetConsoleWindow()) - - RDW_INVALIDATE = 0x0001 - windll.user32.RedrawWindow(handle, None, None, c_uint(RDW_INVALIDATE)) - - def get_default_color_depth(self) -> ColorDepth: - """ - Return the default color depth for a windows terminal. - - Contrary to the Vt100 implementation, this doesn't depend on a $TERM - variable. - """ - if self.default_color_depth is not None: - return self.default_color_depth - - return ColorDepth.DEPTH_4_BIT - - -class FOREGROUND_COLOR: - BLACK = 0x0000 - BLUE = 0x0001 - GREEN = 0x0002 - CYAN = 0x0003 - RED = 0x0004 - MAGENTA = 0x0005 - YELLOW = 0x0006 - GRAY = 0x0007 - INTENSITY = 0x0008 # Foreground color is intensified. - - -class BACKGROUND_COLOR: - BLACK = 0x0000 - BLUE = 0x0010 - GREEN = 0x0020 - CYAN = 0x0030 - RED = 0x0040 - MAGENTA = 0x0050 - YELLOW = 0x0060 - GRAY = 0x0070 - INTENSITY = 0x0080 # Background color is intensified. - - -def _create_ansi_color_dict( - color_cls: type[FOREGROUND_COLOR] | type[BACKGROUND_COLOR], -) -> dict[str, int]: - "Create a table that maps the 16 named ansi colors to their Windows code." - return { - "ansidefault": color_cls.BLACK, - "ansiblack": color_cls.BLACK, - "ansigray": color_cls.GRAY, - "ansibrightblack": color_cls.BLACK | color_cls.INTENSITY, - "ansiwhite": color_cls.GRAY | color_cls.INTENSITY, - # Low intensity. - "ansired": color_cls.RED, - "ansigreen": color_cls.GREEN, - "ansiyellow": color_cls.YELLOW, - "ansiblue": color_cls.BLUE, - "ansimagenta": color_cls.MAGENTA, - "ansicyan": color_cls.CYAN, - # High intensity. - "ansibrightred": color_cls.RED | color_cls.INTENSITY, - "ansibrightgreen": color_cls.GREEN | color_cls.INTENSITY, - "ansibrightyellow": color_cls.YELLOW | color_cls.INTENSITY, - "ansibrightblue": color_cls.BLUE | color_cls.INTENSITY, - "ansibrightmagenta": color_cls.MAGENTA | color_cls.INTENSITY, - "ansibrightcyan": color_cls.CYAN | color_cls.INTENSITY, - } - - -FG_ANSI_COLORS = _create_ansi_color_dict(FOREGROUND_COLOR) -BG_ANSI_COLORS = _create_ansi_color_dict(BACKGROUND_COLOR) - -assert set(FG_ANSI_COLORS) == set(ANSI_COLOR_NAMES) -assert set(BG_ANSI_COLORS) == set(ANSI_COLOR_NAMES) - - -class ColorLookupTable: - """ - Inspired by pygments/formatters/terminal256.py - """ - - def __init__(self) -> None: - self._win32_colors = self._build_color_table() - - # Cache (map color string to foreground and background code). - self.best_match: dict[str, tuple[int, int]] = {} - - @staticmethod - def _build_color_table() -> list[tuple[int, int, int, int, int]]: - """ - Build an RGB-to-256 color conversion table - """ - FG = FOREGROUND_COLOR - BG = BACKGROUND_COLOR - - return [ - (0x00, 0x00, 0x00, FG.BLACK, BG.BLACK), - (0x00, 0x00, 0xAA, FG.BLUE, BG.BLUE), - (0x00, 0xAA, 0x00, FG.GREEN, BG.GREEN), - (0x00, 0xAA, 0xAA, FG.CYAN, BG.CYAN), - (0xAA, 0x00, 0x00, FG.RED, BG.RED), - (0xAA, 0x00, 0xAA, FG.MAGENTA, BG.MAGENTA), - (0xAA, 0xAA, 0x00, FG.YELLOW, BG.YELLOW), - (0x88, 0x88, 0x88, FG.GRAY, BG.GRAY), - (0x44, 0x44, 0xFF, FG.BLUE | FG.INTENSITY, BG.BLUE | BG.INTENSITY), - (0x44, 0xFF, 0x44, FG.GREEN | FG.INTENSITY, BG.GREEN | BG.INTENSITY), - (0x44, 0xFF, 0xFF, FG.CYAN | FG.INTENSITY, BG.CYAN | BG.INTENSITY), - (0xFF, 0x44, 0x44, FG.RED | FG.INTENSITY, BG.RED | BG.INTENSITY), - (0xFF, 0x44, 0xFF, FG.MAGENTA | FG.INTENSITY, BG.MAGENTA | BG.INTENSITY), - (0xFF, 0xFF, 0x44, FG.YELLOW | FG.INTENSITY, BG.YELLOW | BG.INTENSITY), - (0x44, 0x44, 0x44, FG.BLACK | FG.INTENSITY, BG.BLACK | BG.INTENSITY), - (0xFF, 0xFF, 0xFF, FG.GRAY | FG.INTENSITY, BG.GRAY | BG.INTENSITY), - ] - - def _closest_color(self, r: int, g: int, b: int) -> tuple[int, int]: - distance = 257 * 257 * 3 # "infinity" (>distance from #000000 to #ffffff) - fg_match = 0 - bg_match = 0 - - for r_, g_, b_, fg_, bg_ in self._win32_colors: - rd = r - r_ - gd = g - g_ - bd = b - b_ - - d = rd * rd + gd * gd + bd * bd - - if d < distance: - fg_match = fg_ - bg_match = bg_ - distance = d - return fg_match, bg_match - - def _color_indexes(self, color: str) -> tuple[int, int]: - indexes = self.best_match.get(color, None) - if indexes is None: - try: - rgb = int(str(color), 16) - except ValueError: - rgb = 0 - - r = (rgb >> 16) & 0xFF - g = (rgb >> 8) & 0xFF - b = rgb & 0xFF - indexes = self._closest_color(r, g, b) - self.best_match[color] = indexes - return indexes - - def lookup_fg_color(self, fg_color: str) -> int: - """ - Return the color for use in the - `windll.kernel32.SetConsoleTextAttribute` API call. - - :param fg_color: Foreground as text. E.g. 'ffffff' or 'red' - """ - # Foreground. - if fg_color in FG_ANSI_COLORS: - return FG_ANSI_COLORS[fg_color] - else: - return self._color_indexes(fg_color)[0] - - def lookup_bg_color(self, bg_color: str) -> int: - """ - Return the color for use in the - `windll.kernel32.SetConsoleTextAttribute` API call. - - :param bg_color: Background as text. E.g. 'ffffff' or 'red' - """ - # Background. - if bg_color in BG_ANSI_COLORS: - return BG_ANSI_COLORS[bg_color] - else: - return self._color_indexes(bg_color)[1] diff --git a/voxvera/vendor/prompt_toolkit/output/windows10.py b/voxvera/vendor/prompt_toolkit/output/windows10.py deleted file mode 100644 index 2b7e596..0000000 --- a/voxvera/vendor/prompt_toolkit/output/windows10.py +++ /dev/null @@ -1,133 +0,0 @@ -from __future__ import annotations - -import sys - -assert sys.platform == "win32" - -from ctypes import byref, windll -from ctypes.wintypes import DWORD, HANDLE -from typing import Any, TextIO - -from prompt_toolkit.data_structures import Size -from prompt_toolkit.win32_types import STD_OUTPUT_HANDLE - -from .base import Output -from .color_depth import ColorDepth -from .vt100 import Vt100_Output -from .win32 import Win32Output - -__all__ = [ - "Windows10_Output", -] - -# See: https://msdn.microsoft.com/pl-pl/library/windows/desktop/ms686033(v=vs.85).aspx -ENABLE_PROCESSED_INPUT = 0x0001 -ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004 - - -class Windows10_Output: - """ - Windows 10 output abstraction. This enables and uses vt100 escape sequences. - """ - - def __init__( - self, stdout: TextIO, default_color_depth: ColorDepth | None = None - ) -> None: - self.default_color_depth = default_color_depth - self.win32_output = Win32Output(stdout, default_color_depth=default_color_depth) - self.vt100_output = Vt100_Output( - stdout, lambda: Size(0, 0), default_color_depth=default_color_depth - ) - self._hconsole = HANDLE(windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)) - - def flush(self) -> None: - """ - Write to output stream and flush. - """ - original_mode = DWORD(0) - - # Remember the previous console mode. - windll.kernel32.GetConsoleMode(self._hconsole, byref(original_mode)) - - # Enable processing of vt100 sequences. - windll.kernel32.SetConsoleMode( - self._hconsole, - DWORD(ENABLE_PROCESSED_INPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING), - ) - - try: - self.vt100_output.flush() - finally: - # Restore console mode. - windll.kernel32.SetConsoleMode(self._hconsole, original_mode) - - @property - def responds_to_cpr(self) -> bool: - return False # We don't need this on Windows. - - def __getattr__(self, name: str) -> Any: - # NOTE: Now that we use "virtual terminal input" on - # Windows, both input and output are done through - # ANSI escape sequences on Windows. This means, we - # should enable bracketed paste like on Linux, and - # enable mouse support by calling the vt100_output. - if name in ( - "get_size", - "get_rows_below_cursor_position", - "scroll_buffer_to_prompt", - "get_win32_screen_buffer_info", - # "enable_mouse_support", - # "disable_mouse_support", - # "enable_bracketed_paste", - # "disable_bracketed_paste", - ): - return getattr(self.win32_output, name) - else: - return getattr(self.vt100_output, name) - - def get_default_color_depth(self) -> ColorDepth: - """ - Return the default color depth for a windows terminal. - - Contrary to the Vt100 implementation, this doesn't depend on a $TERM - variable. - """ - if self.default_color_depth is not None: - return self.default_color_depth - - # Previously, we used `DEPTH_4_BIT`, even on Windows 10. This was - # because true color support was added after "Console Virtual Terminal - # Sequences" support was added, and there was no good way to detect - # what support was given. - # 24bit color support was added in 2016, so let's assume it's safe to - # take that as a default: - # https://devblogs.microsoft.com/commandline/24-bit-color-in-the-windows-console/ - return ColorDepth.TRUE_COLOR - - -Output.register(Windows10_Output) - - -def is_win_vt100_enabled() -> bool: - """ - Returns True when we're running Windows and VT100 escape sequences are - supported. - """ - if sys.platform != "win32": - return False - - hconsole = HANDLE(windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)) - - # Get original console mode. - original_mode = DWORD(0) - windll.kernel32.GetConsoleMode(hconsole, byref(original_mode)) - - try: - # Try to enable VT100 sequences. - result: int = windll.kernel32.SetConsoleMode( - hconsole, DWORD(ENABLE_PROCESSED_INPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING) - ) - - return result == 1 - finally: - windll.kernel32.SetConsoleMode(hconsole, original_mode) diff --git a/voxvera/vendor/prompt_toolkit/patch_stdout.py b/voxvera/vendor/prompt_toolkit/patch_stdout.py deleted file mode 100644 index e1f2a7a..0000000 --- a/voxvera/vendor/prompt_toolkit/patch_stdout.py +++ /dev/null @@ -1,297 +0,0 @@ -""" -patch_stdout -============ - -This implements a context manager that ensures that print statements within -it won't destroy the user interface. The context manager will replace -`sys.stdout` by something that draws the output above the current prompt, -rather than overwriting the UI. - -Usage:: - - with patch_stdout(application): - ... - application.run() - ... - -Multiple applications can run in the body of the context manager, one after the -other. -""" - -from __future__ import annotations - -import asyncio -import queue -import sys -import threading -import time -from contextlib import contextmanager -from typing import Generator, TextIO, cast - -from .application import get_app_session, run_in_terminal -from .output import Output - -__all__ = [ - "patch_stdout", - "StdoutProxy", -] - - -@contextmanager -def patch_stdout(raw: bool = False) -> Generator[None, None, None]: - """ - Replace `sys.stdout` by an :class:`_StdoutProxy` instance. - - Writing to this proxy will make sure that the text appears above the - prompt, and that it doesn't destroy the output from the renderer. If no - application is curring, the behavior should be identical to writing to - `sys.stdout` directly. - - Warning: If a new event loop is installed using `asyncio.set_event_loop()`, - then make sure that the context manager is applied after the event loop - is changed. Printing to stdout will be scheduled in the event loop - that's active when the context manager is created. - - :param raw: (`bool`) When True, vt100 terminal escape sequences are not - removed/escaped. - """ - with StdoutProxy(raw=raw) as proxy: - original_stdout = sys.stdout - original_stderr = sys.stderr - - # Enter. - sys.stdout = cast(TextIO, proxy) - sys.stderr = cast(TextIO, proxy) - - try: - yield - finally: - sys.stdout = original_stdout - sys.stderr = original_stderr - - -class _Done: - "Sentinel value for stopping the stdout proxy." - - -class StdoutProxy: - """ - File-like object, which prints everything written to it, output above the - current application/prompt. This class is compatible with other file - objects and can be used as a drop-in replacement for `sys.stdout` or can - for instance be passed to `logging.StreamHandler`. - - The current application, above which we print, is determined by looking - what application currently runs in the `AppSession` that is active during - the creation of this instance. - - This class can be used as a context manager. - - In order to avoid having to repaint the prompt continuously for every - little write, a short delay of `sleep_between_writes` seconds will be added - between writes in order to bundle many smaller writes in a short timespan. - """ - - def __init__( - self, - sleep_between_writes: float = 0.2, - raw: bool = False, - ) -> None: - self.sleep_between_writes = sleep_between_writes - self.raw = raw - - self._lock = threading.RLock() - self._buffer: list[str] = [] - - # Keep track of the curret app session. - self.app_session = get_app_session() - - # See what output is active *right now*. We should do it at this point, - # before this `StdoutProxy` instance is possibly assigned to `sys.stdout`. - # Otherwise, if `patch_stdout` is used, and no `Output` instance has - # been created, then the default output creation code will see this - # proxy object as `sys.stdout`, and get in a recursive loop trying to - # access `StdoutProxy.isatty()` which will again retrieve the output. - self._output: Output = self.app_session.output - - # Flush thread - self._flush_queue: queue.Queue[str | _Done] = queue.Queue() - self._flush_thread = self._start_write_thread() - self.closed = False - - def __enter__(self) -> StdoutProxy: - return self - - def __exit__(self, *args: object) -> None: - self.close() - - def close(self) -> None: - """ - Stop `StdoutProxy` proxy. - - This will terminate the write thread, make sure everything is flushed - and wait for the write thread to finish. - """ - if not self.closed: - self._flush_queue.put(_Done()) - self._flush_thread.join() - self.closed = True - - def _start_write_thread(self) -> threading.Thread: - thread = threading.Thread( - target=self._write_thread, - name="patch-stdout-flush-thread", - daemon=True, - ) - thread.start() - return thread - - def _write_thread(self) -> None: - done = False - - while not done: - item = self._flush_queue.get() - - if isinstance(item, _Done): - break - - # Don't bother calling when we got an empty string. - if not item: - continue - - text = [] - text.append(item) - - # Read the rest of the queue if more data was queued up. - while True: - try: - item = self._flush_queue.get_nowait() - except queue.Empty: - break - else: - if isinstance(item, _Done): - done = True - else: - text.append(item) - - app_loop = self._get_app_loop() - self._write_and_flush(app_loop, "".join(text)) - - # If an application was running that requires repainting, then wait - # for a very short time, in order to bundle actual writes and avoid - # having to repaint to often. - if app_loop is not None: - time.sleep(self.sleep_between_writes) - - def _get_app_loop(self) -> asyncio.AbstractEventLoop | None: - """ - Return the event loop for the application currently running in our - `AppSession`. - """ - app = self.app_session.app - - if app is None: - return None - - return app.loop - - def _write_and_flush( - self, loop: asyncio.AbstractEventLoop | None, text: str - ) -> None: - """ - Write the given text to stdout and flush. - If an application is running, use `run_in_terminal`. - """ - - def write_and_flush() -> None: - # Ensure that autowrap is enabled before calling `write`. - # XXX: On Windows, the `Windows10_Output` enables/disables VT - # terminal processing for every flush. It turns out that this - # causes autowrap to be reset (disabled) after each flush. So, - # we have to enable it again before writing text. - self._output.enable_autowrap() - - if self.raw: - self._output.write_raw(text) - else: - self._output.write(text) - - self._output.flush() - - def write_and_flush_in_loop() -> None: - # If an application is running, use `run_in_terminal`, otherwise - # call it directly. - run_in_terminal(write_and_flush, in_executor=False) - - if loop is None: - # No loop, write immediately. - write_and_flush() - else: - # Make sure `write_and_flush` is executed *in* the event loop, not - # in another thread. - loop.call_soon_threadsafe(write_and_flush_in_loop) - - def _write(self, data: str) -> None: - """ - Note: print()-statements cause to multiple write calls. - (write('line') and write('\n')). Of course we don't want to call - `run_in_terminal` for every individual call, because that's too - expensive, and as long as the newline hasn't been written, the - text itself is again overwritten by the rendering of the input - command line. Therefor, we have a little buffer which holds the - text until a newline is written to stdout. - """ - if "\n" in data: - # When there is a newline in the data, write everything before the - # newline, including the newline itself. - before, after = data.rsplit("\n", 1) - to_write = self._buffer + [before, "\n"] - self._buffer = [after] - - text = "".join(to_write) - self._flush_queue.put(text) - else: - # Otherwise, cache in buffer. - self._buffer.append(data) - - def _flush(self) -> None: - text = "".join(self._buffer) - self._buffer = [] - self._flush_queue.put(text) - - def write(self, data: str) -> int: - with self._lock: - self._write(data) - - return len(data) # Pretend everything was written. - - def flush(self) -> None: - """ - Flush buffered output. - """ - with self._lock: - self._flush() - - @property - def original_stdout(self) -> TextIO | None: - return self._output.stdout or sys.__stdout__ - - # Attributes for compatibility with sys.__stdout__: - - def fileno(self) -> int: - return self._output.fileno() - - def isatty(self) -> bool: - stdout = self._output.stdout - if stdout is None: - return False - - return stdout.isatty() - - @property - def encoding(self) -> str: - return self._output.encoding() - - @property - def errors(self) -> str: - return "strict" diff --git a/voxvera/vendor/prompt_toolkit/py.typed b/voxvera/vendor/prompt_toolkit/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/prompt_toolkit/renderer.py b/voxvera/vendor/prompt_toolkit/renderer.py deleted file mode 100644 index 8d5e03c..0000000 --- a/voxvera/vendor/prompt_toolkit/renderer.py +++ /dev/null @@ -1,820 +0,0 @@ -""" -Renders the command line on the console. -(Redraws parts of the input line that were changed.) -""" - -from __future__ import annotations - -from asyncio import FIRST_COMPLETED, Future, ensure_future, sleep, wait -from collections import deque -from enum import Enum -from typing import TYPE_CHECKING, Any, Callable, Dict, Hashable - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.cursor_shapes import CursorShape -from prompt_toolkit.data_structures import Point, Size -from prompt_toolkit.filters import FilterOrBool, to_filter -from prompt_toolkit.formatted_text import AnyFormattedText, to_formatted_text -from prompt_toolkit.layout.mouse_handlers import MouseHandlers -from prompt_toolkit.layout.screen import Char, Screen, WritePosition -from prompt_toolkit.output import ColorDepth, Output -from prompt_toolkit.styles import ( - Attrs, - BaseStyle, - DummyStyleTransformation, - StyleTransformation, -) - -if TYPE_CHECKING: - from prompt_toolkit.application import Application - from prompt_toolkit.layout.layout import Layout - - -__all__ = [ - "Renderer", - "print_formatted_text", -] - - -def _output_screen_diff( - app: Application[Any], - output: Output, - screen: Screen, - current_pos: Point, - color_depth: ColorDepth, - previous_screen: Screen | None, - last_style: str | None, - is_done: bool, # XXX: drop is_done - full_screen: bool, - attrs_for_style_string: _StyleStringToAttrsCache, - style_string_has_style: _StyleStringHasStyleCache, - size: Size, - previous_width: int, -) -> tuple[Point, str | None]: - """ - Render the diff between this screen and the previous screen. - - This takes two `Screen` instances. The one that represents the output like - it was during the last rendering and one that represents the current - output raster. Looking at these two `Screen` instances, this function will - render the difference by calling the appropriate methods of the `Output` - object that only paint the changes to the terminal. - - This is some performance-critical code which is heavily optimized. - Don't change things without profiling first. - - :param current_pos: Current cursor position. - :param last_style: The style string, used for drawing the last drawn - character. (Color/attributes.) - :param attrs_for_style_string: :class:`._StyleStringToAttrsCache` instance. - :param width: The width of the terminal. - :param previous_width: The width of the terminal during the last rendering. - """ - width, height = size.columns, size.rows - - #: Variable for capturing the output. - write = output.write - write_raw = output.write_raw - - # Create locals for the most used output methods. - # (Save expensive attribute lookups.) - _output_set_attributes = output.set_attributes - _output_reset_attributes = output.reset_attributes - _output_cursor_forward = output.cursor_forward - _output_cursor_up = output.cursor_up - _output_cursor_backward = output.cursor_backward - - # Hide cursor before rendering. (Avoid flickering.) - output.hide_cursor() - - def reset_attributes() -> None: - "Wrapper around Output.reset_attributes." - nonlocal last_style - _output_reset_attributes() - last_style = None # Forget last char after resetting attributes. - - def move_cursor(new: Point) -> Point: - "Move cursor to this `new` point. Returns the given Point." - current_x, current_y = current_pos.x, current_pos.y - - if new.y > current_y: - # Use newlines instead of CURSOR_DOWN, because this might add new lines. - # CURSOR_DOWN will never create new lines at the bottom. - # Also reset attributes, otherwise the newline could draw a - # background color. - reset_attributes() - write("\r\n" * (new.y - current_y)) - current_x = 0 - _output_cursor_forward(new.x) - return new - elif new.y < current_y: - _output_cursor_up(current_y - new.y) - - if current_x >= width - 1: - write("\r") - _output_cursor_forward(new.x) - elif new.x < current_x or current_x >= width - 1: - _output_cursor_backward(current_x - new.x) - elif new.x > current_x: - _output_cursor_forward(new.x - current_x) - - return new - - def output_char(char: Char) -> None: - """ - Write the output of this character. - """ - nonlocal last_style - - # If the last printed character has the same style, don't output the - # style again. - if last_style == char.style: - write(char.char) - else: - # Look up `Attr` for this style string. Only set attributes if different. - # (Two style strings can still have the same formatting.) - # Note that an empty style string can have formatting that needs to - # be applied, because of style transformations. - new_attrs = attrs_for_style_string[char.style] - if not last_style or new_attrs != attrs_for_style_string[last_style]: - _output_set_attributes(new_attrs, color_depth) - - write(char.char) - last_style = char.style - - def get_max_column_index(row: dict[int, Char]) -> int: - """ - Return max used column index, ignoring whitespace (without style) at - the end of the line. This is important for people that copy/paste - terminal output. - - There are two reasons we are sometimes seeing whitespace at the end: - - `BufferControl` adds a trailing space to each line, because it's a - possible cursor position, so that the line wrapping won't change if - the cursor position moves around. - - The `Window` adds a style class to the current line for highlighting - (cursor-line). - """ - numbers = ( - index - for index, cell in row.items() - if cell.char != " " or style_string_has_style[cell.style] - ) - return max(numbers, default=0) - - # Render for the first time: reset styling. - if not previous_screen: - reset_attributes() - - # Disable autowrap. (When entering a the alternate screen, or anytime when - # we have a prompt. - In the case of a REPL, like IPython, people can have - # background threads, and it's hard for debugging if their output is not - # wrapped.) - if not previous_screen or not full_screen: - output.disable_autowrap() - - # When the previous screen has a different size, redraw everything anyway. - # Also when we are done. (We might take up less rows, so clearing is important.) - if ( - is_done or not previous_screen or previous_width != width - ): # XXX: also consider height?? - current_pos = move_cursor(Point(x=0, y=0)) - reset_attributes() - output.erase_down() - - previous_screen = Screen() - - # Get height of the screen. - # (height changes as we loop over data_buffer, so remember the current value.) - # (Also make sure to clip the height to the size of the output.) - current_height = min(screen.height, height) - - # Loop over the rows. - row_count = min(max(screen.height, previous_screen.height), height) - - for y in range(row_count): - new_row = screen.data_buffer[y] - previous_row = previous_screen.data_buffer[y] - zero_width_escapes_row = screen.zero_width_escapes[y] - - new_max_line_len = min(width - 1, get_max_column_index(new_row)) - previous_max_line_len = min(width - 1, get_max_column_index(previous_row)) - - # Loop over the columns. - c = 0 # Column counter. - while c <= new_max_line_len: - new_char = new_row[c] - old_char = previous_row[c] - char_width = new_char.width or 1 - - # When the old and new character at this position are different, - # draw the output. (Because of the performance, we don't call - # `Char.__ne__`, but inline the same expression.) - if new_char.char != old_char.char or new_char.style != old_char.style: - current_pos = move_cursor(Point(x=c, y=y)) - - # Send injected escape sequences to output. - if c in zero_width_escapes_row: - write_raw(zero_width_escapes_row[c]) - - output_char(new_char) - current_pos = Point(x=current_pos.x + char_width, y=current_pos.y) - - c += char_width - - # If the new line is shorter, trim it. - if previous_screen and new_max_line_len < previous_max_line_len: - current_pos = move_cursor(Point(x=new_max_line_len + 1, y=y)) - reset_attributes() - output.erase_end_of_line() - - # Correctly reserve vertical space as required by the layout. - # When this is a new screen (drawn for the first time), or for some reason - # higher than the previous one. Move the cursor once to the bottom of the - # output. That way, we're sure that the terminal scrolls up, even when the - # lower lines of the canvas just contain whitespace. - - # The most obvious reason that we actually want this behavior is the avoid - # the artifact of the input scrolling when the completion menu is shown. - # (If the scrolling is actually wanted, the layout can still be build in a - # way to behave that way by setting a dynamic height.) - if current_height > previous_screen.height: - current_pos = move_cursor(Point(x=0, y=current_height - 1)) - - # Move cursor: - if is_done: - current_pos = move_cursor(Point(x=0, y=current_height)) - output.erase_down() - else: - current_pos = move_cursor(screen.get_cursor_position(app.layout.current_window)) - - if is_done or not full_screen: - output.enable_autowrap() - - # Always reset the color attributes. This is important because a background - # thread could print data to stdout and we want that to be displayed in the - # default colors. (Also, if a background color has been set, many terminals - # give weird artifacts on resize events.) - reset_attributes() - - if screen.show_cursor: - output.show_cursor() - - return current_pos, last_style - - -class HeightIsUnknownError(Exception): - "Information unavailable. Did not yet receive the CPR response." - - -class _StyleStringToAttrsCache(Dict[str, Attrs]): - """ - A cache structure that maps style strings to :class:`.Attr`. - (This is an important speed up.) - """ - - def __init__( - self, - get_attrs_for_style_str: Callable[[str], Attrs], - style_transformation: StyleTransformation, - ) -> None: - self.get_attrs_for_style_str = get_attrs_for_style_str - self.style_transformation = style_transformation - - def __missing__(self, style_str: str) -> Attrs: - attrs = self.get_attrs_for_style_str(style_str) - attrs = self.style_transformation.transform_attrs(attrs) - - self[style_str] = attrs - return attrs - - -class _StyleStringHasStyleCache(Dict[str, bool]): - """ - Cache for remember which style strings don't render the default output - style (default fg/bg, no underline and no reverse and no blink). That way - we know that we should render these cells, even when they're empty (when - they contain a space). - - Note: we don't consider bold/italic/hidden because they don't change the - output if there's no text in the cell. - """ - - def __init__(self, style_string_to_attrs: dict[str, Attrs]) -> None: - self.style_string_to_attrs = style_string_to_attrs - - def __missing__(self, style_str: str) -> bool: - attrs = self.style_string_to_attrs[style_str] - is_default = bool( - attrs.color - or attrs.bgcolor - or attrs.underline - or attrs.strike - or attrs.blink - or attrs.reverse - ) - - self[style_str] = is_default - return is_default - - -class CPR_Support(Enum): - "Enum: whether or not CPR is supported." - - SUPPORTED = "SUPPORTED" - NOT_SUPPORTED = "NOT_SUPPORTED" - UNKNOWN = "UNKNOWN" - - -class Renderer: - """ - Typical usage: - - :: - - output = Vt100_Output.from_pty(sys.stdout) - r = Renderer(style, output) - r.render(app, layout=...) - """ - - CPR_TIMEOUT = 2 # Time to wait until we consider CPR to be not supported. - - def __init__( - self, - style: BaseStyle, - output: Output, - full_screen: bool = False, - mouse_support: FilterOrBool = False, - cpr_not_supported_callback: Callable[[], None] | None = None, - ) -> None: - self.style = style - self.output = output - self.full_screen = full_screen - self.mouse_support = to_filter(mouse_support) - self.cpr_not_supported_callback = cpr_not_supported_callback - - # TODO: Move following state flags into `Vt100_Output`, similar to - # `_cursor_shape_changed` and `_cursor_visible`. But then also - # adjust the `Win32Output` to not call win32 APIs if nothing has - # to be changed. - - self._in_alternate_screen = False - self._mouse_support_enabled = False - self._bracketed_paste_enabled = False - self._cursor_key_mode_reset = False - - # Future set when we are waiting for a CPR flag. - self._waiting_for_cpr_futures: deque[Future[None]] = deque() - self.cpr_support = CPR_Support.UNKNOWN - - if not output.responds_to_cpr: - self.cpr_support = CPR_Support.NOT_SUPPORTED - - # Cache for the style. - self._attrs_for_style: _StyleStringToAttrsCache | None = None - self._style_string_has_style: _StyleStringHasStyleCache | None = None - self._last_style_hash: Hashable | None = None - self._last_transformation_hash: Hashable | None = None - self._last_color_depth: ColorDepth | None = None - - self.reset(_scroll=True) - - def reset(self, _scroll: bool = False, leave_alternate_screen: bool = True) -> None: - # Reset position - self._cursor_pos = Point(x=0, y=0) - - # Remember the last screen instance between renderers. This way, - # we can create a `diff` between two screens and only output the - # difference. It's also to remember the last height. (To show for - # instance a toolbar at the bottom position.) - self._last_screen: Screen | None = None - self._last_size: Size | None = None - self._last_style: str | None = None - self._last_cursor_shape: CursorShape | None = None - - # Default MouseHandlers. (Just empty.) - self.mouse_handlers = MouseHandlers() - - #: Space from the top of the layout, until the bottom of the terminal. - #: We don't know this until a `report_absolute_cursor_row` call. - self._min_available_height = 0 - - # In case of Windows, also make sure to scroll to the current cursor - # position. (Only when rendering the first time.) - # It does nothing for vt100 terminals. - if _scroll: - self.output.scroll_buffer_to_prompt() - - # Quit alternate screen. - if self._in_alternate_screen and leave_alternate_screen: - self.output.quit_alternate_screen() - self._in_alternate_screen = False - - # Disable mouse support. - if self._mouse_support_enabled: - self.output.disable_mouse_support() - self._mouse_support_enabled = False - - # Disable bracketed paste. - if self._bracketed_paste_enabled: - self.output.disable_bracketed_paste() - self._bracketed_paste_enabled = False - - self.output.reset_cursor_shape() - self.output.show_cursor() - - # NOTE: No need to set/reset cursor key mode here. - - # Flush output. `disable_mouse_support` needs to write to stdout. - self.output.flush() - - @property - def last_rendered_screen(self) -> Screen | None: - """ - The `Screen` class that was generated during the last rendering. - This can be `None`. - """ - return self._last_screen - - @property - def height_is_known(self) -> bool: - """ - True when the height from the cursor until the bottom of the terminal - is known. (It's often nicer to draw bottom toolbars only if the height - is known, in order to avoid flickering when the CPR response arrives.) - """ - if self.full_screen or self._min_available_height > 0: - return True - try: - self._min_available_height = self.output.get_rows_below_cursor_position() - return True - except NotImplementedError: - return False - - @property - def rows_above_layout(self) -> int: - """ - Return the number of rows visible in the terminal above the layout. - """ - if self._in_alternate_screen: - return 0 - elif self._min_available_height > 0: - total_rows = self.output.get_size().rows - last_screen_height = self._last_screen.height if self._last_screen else 0 - return total_rows - max(self._min_available_height, last_screen_height) - else: - raise HeightIsUnknownError("Rows above layout is unknown.") - - def request_absolute_cursor_position(self) -> None: - """ - Get current cursor position. - - We do this to calculate the minimum available height that we can - consume for rendering the prompt. This is the available space below te - cursor. - - For vt100: Do CPR request. (answer will arrive later.) - For win32: Do API call. (Answer comes immediately.) - """ - # Only do this request when the cursor is at the top row. (after a - # clear or reset). We will rely on that in `report_absolute_cursor_row`. - assert self._cursor_pos.y == 0 - - # In full-screen mode, always use the total height as min-available-height. - if self.full_screen: - self._min_available_height = self.output.get_size().rows - return - - # For Win32, we have an API call to get the number of rows below the - # cursor. - try: - self._min_available_height = self.output.get_rows_below_cursor_position() - return - except NotImplementedError: - pass - - # Use CPR. - if self.cpr_support == CPR_Support.NOT_SUPPORTED: - return - - def do_cpr() -> None: - # Asks for a cursor position report (CPR). - self._waiting_for_cpr_futures.append(Future()) - self.output.ask_for_cpr() - - if self.cpr_support == CPR_Support.SUPPORTED: - do_cpr() - return - - # If we don't know whether CPR is supported, only do a request if - # none is pending, and test it, using a timer. - if self.waiting_for_cpr: - return - - do_cpr() - - async def timer() -> None: - await sleep(self.CPR_TIMEOUT) - - # Not set in the meantime -> not supported. - if self.cpr_support == CPR_Support.UNKNOWN: - self.cpr_support = CPR_Support.NOT_SUPPORTED - - if self.cpr_not_supported_callback: - # Make sure to call this callback in the main thread. - self.cpr_not_supported_callback() - - get_app().create_background_task(timer()) - - def report_absolute_cursor_row(self, row: int) -> None: - """ - To be called when we know the absolute cursor position. - (As an answer of a "Cursor Position Request" response.) - """ - self.cpr_support = CPR_Support.SUPPORTED - - # Calculate the amount of rows from the cursor position until the - # bottom of the terminal. - total_rows = self.output.get_size().rows - rows_below_cursor = total_rows - row + 1 - - # Set the minimum available height. - self._min_available_height = rows_below_cursor - - # Pop and set waiting for CPR future. - try: - f = self._waiting_for_cpr_futures.popleft() - except IndexError: - pass # Received CPR response without having a CPR. - else: - f.set_result(None) - - @property - def waiting_for_cpr(self) -> bool: - """ - Waiting for CPR flag. True when we send the request, but didn't got a - response. - """ - return bool(self._waiting_for_cpr_futures) - - async def wait_for_cpr_responses(self, timeout: int = 1) -> None: - """ - Wait for a CPR response. - """ - cpr_futures = list(self._waiting_for_cpr_futures) # Make copy. - - # When there are no CPRs in the queue. Don't do anything. - if not cpr_futures or self.cpr_support == CPR_Support.NOT_SUPPORTED: - return None - - async def wait_for_responses() -> None: - for response_f in cpr_futures: - await response_f - - async def wait_for_timeout() -> None: - await sleep(timeout) - - # Got timeout, erase queue. - for response_f in cpr_futures: - response_f.cancel() - self._waiting_for_cpr_futures = deque() - - tasks = { - ensure_future(wait_for_responses()), - ensure_future(wait_for_timeout()), - } - _, pending = await wait(tasks, return_when=FIRST_COMPLETED) - for task in pending: - task.cancel() - - def render( - self, app: Application[Any], layout: Layout, is_done: bool = False - ) -> None: - """ - Render the current interface to the output. - - :param is_done: When True, put the cursor at the end of the interface. We - won't print any changes to this part. - """ - output = self.output - - # Enter alternate screen. - if self.full_screen and not self._in_alternate_screen: - self._in_alternate_screen = True - output.enter_alternate_screen() - - # Enable bracketed paste. - if not self._bracketed_paste_enabled: - self.output.enable_bracketed_paste() - self._bracketed_paste_enabled = True - - # Reset cursor key mode. - if not self._cursor_key_mode_reset: - self.output.reset_cursor_key_mode() - self._cursor_key_mode_reset = True - - # Enable/disable mouse support. - needs_mouse_support = self.mouse_support() - - if needs_mouse_support and not self._mouse_support_enabled: - output.enable_mouse_support() - self._mouse_support_enabled = True - - elif not needs_mouse_support and self._mouse_support_enabled: - output.disable_mouse_support() - self._mouse_support_enabled = False - - # Create screen and write layout to it. - size = output.get_size() - screen = Screen() - screen.show_cursor = False # Hide cursor by default, unless one of the - # containers decides to display it. - mouse_handlers = MouseHandlers() - - # Calculate height. - if self.full_screen: - height = size.rows - elif is_done: - # When we are done, we don't necessary want to fill up until the bottom. - height = layout.container.preferred_height( - size.columns, size.rows - ).preferred - else: - last_height = self._last_screen.height if self._last_screen else 0 - height = max( - self._min_available_height, - last_height, - layout.container.preferred_height(size.columns, size.rows).preferred, - ) - - height = min(height, size.rows) - - # When the size changes, don't consider the previous screen. - if self._last_size != size: - self._last_screen = None - - # When we render using another style or another color depth, do a full - # repaint. (Forget about the previous rendered screen.) - # (But note that we still use _last_screen to calculate the height.) - if ( - self.style.invalidation_hash() != self._last_style_hash - or app.style_transformation.invalidation_hash() - != self._last_transformation_hash - or app.color_depth != self._last_color_depth - ): - self._last_screen = None - self._attrs_for_style = None - self._style_string_has_style = None - - if self._attrs_for_style is None: - self._attrs_for_style = _StyleStringToAttrsCache( - self.style.get_attrs_for_style_str, app.style_transformation - ) - if self._style_string_has_style is None: - self._style_string_has_style = _StyleStringHasStyleCache( - self._attrs_for_style - ) - - self._last_style_hash = self.style.invalidation_hash() - self._last_transformation_hash = app.style_transformation.invalidation_hash() - self._last_color_depth = app.color_depth - - layout.container.write_to_screen( - screen, - mouse_handlers, - WritePosition(xpos=0, ypos=0, width=size.columns, height=height), - parent_style="", - erase_bg=False, - z_index=None, - ) - screen.draw_all_floats() - - # When grayed. Replace all styles in the new screen. - if app.exit_style: - screen.append_style_to_content(app.exit_style) - - # Process diff and write to output. - self._cursor_pos, self._last_style = _output_screen_diff( - app, - output, - screen, - self._cursor_pos, - app.color_depth, - self._last_screen, - self._last_style, - is_done, - full_screen=self.full_screen, - attrs_for_style_string=self._attrs_for_style, - style_string_has_style=self._style_string_has_style, - size=size, - previous_width=(self._last_size.columns if self._last_size else 0), - ) - self._last_screen = screen - self._last_size = size - self.mouse_handlers = mouse_handlers - - # Handle cursor shapes. - new_cursor_shape = app.cursor.get_cursor_shape(app) - if ( - self._last_cursor_shape is None - or self._last_cursor_shape != new_cursor_shape - ): - output.set_cursor_shape(new_cursor_shape) - self._last_cursor_shape = new_cursor_shape - - # Flush buffered output. - output.flush() - - # Set visible windows in layout. - app.layout.visible_windows = screen.visible_windows - - if is_done: - self.reset() - - def erase(self, leave_alternate_screen: bool = True) -> None: - """ - Hide all output and put the cursor back at the first line. This is for - instance used for running a system command (while hiding the CLI) and - later resuming the same CLI.) - - :param leave_alternate_screen: When True, and when inside an alternate - screen buffer, quit the alternate screen. - """ - output = self.output - - output.cursor_backward(self._cursor_pos.x) - output.cursor_up(self._cursor_pos.y) - output.erase_down() - output.reset_attributes() - output.enable_autowrap() - - output.flush() - - self.reset(leave_alternate_screen=leave_alternate_screen) - - def clear(self) -> None: - """ - Clear screen and go to 0,0 - """ - # Erase current output first. - self.erase() - - # Send "Erase Screen" command and go to (0, 0). - output = self.output - - output.erase_screen() - output.cursor_goto(0, 0) - output.flush() - - self.request_absolute_cursor_position() - - -def print_formatted_text( - output: Output, - formatted_text: AnyFormattedText, - style: BaseStyle, - style_transformation: StyleTransformation | None = None, - color_depth: ColorDepth | None = None, -) -> None: - """ - Print a list of (style_str, text) tuples in the given style to the output. - """ - fragments = to_formatted_text(formatted_text) - style_transformation = style_transformation or DummyStyleTransformation() - color_depth = color_depth or output.get_default_color_depth() - - # Reset first. - output.reset_attributes() - output.enable_autowrap() - last_attrs: Attrs | None = None - - # Print all (style_str, text) tuples. - attrs_for_style_string = _StyleStringToAttrsCache( - style.get_attrs_for_style_str, style_transformation - ) - - for style_str, text, *_ in fragments: - attrs = attrs_for_style_string[style_str] - - # Set style attributes if something changed. - if attrs != last_attrs: - if attrs: - output.set_attributes(attrs, color_depth) - else: - output.reset_attributes() - last_attrs = attrs - - # Print escape sequences as raw output - if "[ZeroWidthEscape]" in style_str: - output.write_raw(text) - else: - # Eliminate carriage returns - text = text.replace("\r", "") - # Insert a carriage return before every newline (important when the - # front-end is a telnet client). - text = text.replace("\n", "\r\n") - output.write(text) - - # Reset again. - output.reset_attributes() - output.flush() diff --git a/voxvera/vendor/prompt_toolkit/search.py b/voxvera/vendor/prompt_toolkit/search.py deleted file mode 100644 index d1cf7ac..0000000 --- a/voxvera/vendor/prompt_toolkit/search.py +++ /dev/null @@ -1,226 +0,0 @@ -""" -Search operations. - -For the key bindings implementation with attached filters, check -`prompt_toolkit.key_binding.bindings.search`. (Use these for new key bindings -instead of calling these function directly.) -""" - -from __future__ import annotations - -from enum import Enum -from typing import TYPE_CHECKING - -from .application.current import get_app -from .filters import FilterOrBool, is_searching, to_filter -from .key_binding.vi_state import InputMode - -if TYPE_CHECKING: - from prompt_toolkit.layout.controls import BufferControl, SearchBufferControl - from prompt_toolkit.layout.layout import Layout - -__all__ = [ - "SearchDirection", - "start_search", - "stop_search", -] - - -class SearchDirection(Enum): - FORWARD = "FORWARD" - BACKWARD = "BACKWARD" - - -class SearchState: - """ - A search 'query', associated with a search field (like a SearchToolbar). - - Every searchable `BufferControl` points to a `search_buffer_control` - (another `BufferControls`) which represents the search field. The - `SearchState` attached to that search field is used for storing the current - search query. - - It is possible to have one searchfield for multiple `BufferControls`. In - that case, they'll share the same `SearchState`. - If there are multiple `BufferControls` that display the same `Buffer`, then - they can have a different `SearchState` each (if they have a different - search control). - """ - - __slots__ = ("text", "direction", "ignore_case") - - def __init__( - self, - text: str = "", - direction: SearchDirection = SearchDirection.FORWARD, - ignore_case: FilterOrBool = False, - ) -> None: - self.text = text - self.direction = direction - self.ignore_case = to_filter(ignore_case) - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.text!r}, direction={self.direction!r}, ignore_case={self.ignore_case!r})" - - def __invert__(self) -> SearchState: - """ - Create a new SearchState where backwards becomes forwards and the other - way around. - """ - if self.direction == SearchDirection.BACKWARD: - direction = SearchDirection.FORWARD - else: - direction = SearchDirection.BACKWARD - - return SearchState( - text=self.text, direction=direction, ignore_case=self.ignore_case - ) - - -def start_search( - buffer_control: BufferControl | None = None, - direction: SearchDirection = SearchDirection.FORWARD, -) -> None: - """ - Start search through the given `buffer_control` using the - `search_buffer_control`. - - :param buffer_control: Start search for this `BufferControl`. If not given, - search through the current control. - """ - from prompt_toolkit.layout.controls import BufferControl - - assert buffer_control is None or isinstance(buffer_control, BufferControl) - - layout = get_app().layout - - # When no control is given, use the current control if that's a BufferControl. - if buffer_control is None: - if not isinstance(layout.current_control, BufferControl): - return - buffer_control = layout.current_control - - # Only if this control is searchable. - search_buffer_control = buffer_control.search_buffer_control - - if search_buffer_control: - buffer_control.search_state.direction = direction - - # Make sure to focus the search BufferControl - layout.focus(search_buffer_control) - - # Remember search link. - layout.search_links[search_buffer_control] = buffer_control - - # If we're in Vi mode, make sure to go into insert mode. - get_app().vi_state.input_mode = InputMode.INSERT - - -def stop_search(buffer_control: BufferControl | None = None) -> None: - """ - Stop search through the given `buffer_control`. - """ - layout = get_app().layout - - if buffer_control is None: - buffer_control = layout.search_target_buffer_control - if buffer_control is None: - # (Should not happen, but possible when `stop_search` is called - # when we're not searching.) - return - search_buffer_control = buffer_control.search_buffer_control - else: - assert buffer_control in layout.search_links.values() - search_buffer_control = _get_reverse_search_links(layout)[buffer_control] - - # Focus the original buffer again. - layout.focus(buffer_control) - - if search_buffer_control is not None: - # Remove the search link. - del layout.search_links[search_buffer_control] - - # Reset content of search control. - search_buffer_control.buffer.reset() - - # If we're in Vi mode, go back to navigation mode. - get_app().vi_state.input_mode = InputMode.NAVIGATION - - -def do_incremental_search(direction: SearchDirection, count: int = 1) -> None: - """ - Apply search, but keep search buffer focused. - """ - assert is_searching() - - layout = get_app().layout - - # Only search if the current control is a `BufferControl`. - from prompt_toolkit.layout.controls import BufferControl - - search_control = layout.current_control - if not isinstance(search_control, BufferControl): - return - - prev_control = layout.search_target_buffer_control - if prev_control is None: - return - search_state = prev_control.search_state - - # Update search_state. - direction_changed = search_state.direction != direction - - search_state.text = search_control.buffer.text - search_state.direction = direction - - # Apply search to current buffer. - if not direction_changed: - prev_control.buffer.apply_search( - search_state, include_current_position=False, count=count - ) - - -def accept_search() -> None: - """ - Accept current search query. Focus original `BufferControl` again. - """ - layout = get_app().layout - - search_control = layout.current_control - target_buffer_control = layout.search_target_buffer_control - - from prompt_toolkit.layout.controls import BufferControl - - if not isinstance(search_control, BufferControl): - return - if target_buffer_control is None: - return - - search_state = target_buffer_control.search_state - - # Update search state. - if search_control.buffer.text: - search_state.text = search_control.buffer.text - - # Apply search. - target_buffer_control.buffer.apply_search( - search_state, include_current_position=True - ) - - # Add query to history of search line. - search_control.buffer.append_to_history() - - # Stop search and focus previous control again. - stop_search(target_buffer_control) - - -def _get_reverse_search_links( - layout: Layout, -) -> dict[BufferControl, SearchBufferControl]: - """ - Return mapping from BufferControl to SearchBufferControl. - """ - return { - buffer_control: search_buffer_control - for search_buffer_control, buffer_control in layout.search_links.items() - } diff --git a/voxvera/vendor/prompt_toolkit/selection.py b/voxvera/vendor/prompt_toolkit/selection.py deleted file mode 100644 index ff88535..0000000 --- a/voxvera/vendor/prompt_toolkit/selection.py +++ /dev/null @@ -1,58 +0,0 @@ -""" -Data structures for the selection. -""" - -from __future__ import annotations - -from enum import Enum - -__all__ = [ - "SelectionType", - "PasteMode", - "SelectionState", -] - - -class SelectionType(Enum): - """ - Type of selection. - """ - - #: Characters. (Visual in Vi.) - CHARACTERS = "CHARACTERS" - - #: Whole lines. (Visual-Line in Vi.) - LINES = "LINES" - - #: A block selection. (Visual-Block in Vi.) - BLOCK = "BLOCK" - - -class PasteMode(Enum): - EMACS = "EMACS" # Yank like emacs. - VI_AFTER = "VI_AFTER" # When pressing 'p' in Vi. - VI_BEFORE = "VI_BEFORE" # When pressing 'P' in Vi. - - -class SelectionState: - """ - State of the current selection. - - :param original_cursor_position: int - :param type: :class:`~.SelectionType` - """ - - def __init__( - self, - original_cursor_position: int = 0, - type: SelectionType = SelectionType.CHARACTERS, - ) -> None: - self.original_cursor_position = original_cursor_position - self.type = type - self.shift_mode = False - - def enter_shift_mode(self) -> None: - self.shift_mode = True - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(original_cursor_position={self.original_cursor_position!r}, type={self.type!r})" diff --git a/voxvera/vendor/prompt_toolkit/shortcuts/__init__.py b/voxvera/vendor/prompt_toolkit/shortcuts/__init__.py deleted file mode 100644 index d93d3b6..0000000 --- a/voxvera/vendor/prompt_toolkit/shortcuts/__init__.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations - -from .choice_input import choice -from .dialogs import ( - button_dialog, - checkboxlist_dialog, - input_dialog, - message_dialog, - progress_dialog, - radiolist_dialog, - yes_no_dialog, -) -from .progress_bar import ProgressBar, ProgressBarCounter -from .prompt import ( - CompleteStyle, - PromptSession, - confirm, - create_confirm_session, - prompt, -) -from .utils import clear, clear_title, print_container, print_formatted_text, set_title - -__all__ = [ - # Dialogs. - "input_dialog", - "message_dialog", - "progress_dialog", - "checkboxlist_dialog", - "radiolist_dialog", - "yes_no_dialog", - "button_dialog", - # Prompts. - "PromptSession", - "prompt", - "confirm", - "create_confirm_session", - "CompleteStyle", - # Progress bars. - "ProgressBar", - "ProgressBarCounter", - # Choice selection. - "choice", - # Utils. - "clear", - "clear_title", - "print_container", - "print_formatted_text", - "set_title", -] diff --git a/voxvera/vendor/prompt_toolkit/shortcuts/choice_input.py b/voxvera/vendor/prompt_toolkit/shortcuts/choice_input.py deleted file mode 100644 index 95ffd0b..0000000 --- a/voxvera/vendor/prompt_toolkit/shortcuts/choice_input.py +++ /dev/null @@ -1,311 +0,0 @@ -from __future__ import annotations - -from typing import Generic, Sequence, TypeVar - -from prompt_toolkit.application import Application -from prompt_toolkit.filters import ( - Condition, - FilterOrBool, - is_done, - renderer_height_is_known, - to_filter, -) -from prompt_toolkit.formatted_text import AnyFormattedText -from prompt_toolkit.key_binding.key_bindings import ( - DynamicKeyBindings, - KeyBindings, - KeyBindingsBase, - merge_key_bindings, -) -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.layout import ( - AnyContainer, - ConditionalContainer, - HSplit, - Layout, - Window, -) -from prompt_toolkit.layout.controls import FormattedTextControl -from prompt_toolkit.layout.dimension import Dimension -from prompt_toolkit.styles import BaseStyle, Style -from prompt_toolkit.utils import suspend_to_background_supported -from prompt_toolkit.widgets import Box, Frame, Label, RadioList - -__all__ = [ - "ChoiceInput", - "choice", -] - -_T = TypeVar("_T") -E = KeyPressEvent - - -def create_default_choice_input_style() -> BaseStyle: - return Style.from_dict( - { - "frame.border": "#884444", - "selected-option": "bold", - } - ) - - -class ChoiceInput(Generic[_T]): - """ - Input selection prompt. Ask the user to choose among a set of options. - - Example usage:: - - input_selection = ChoiceInput( - message="Please select a dish:", - options=[ - ("pizza", "Pizza with mushrooms"), - ("salad", "Salad with tomatoes"), - ("sushi", "Sushi"), - ], - default="pizza", - ) - result = input_selection.prompt() - - :param message: Plain text or formatted text to be shown before the options. - :param options: Sequence of ``(value, label)`` tuples. The labels can be - formatted text. - :param default: Default value. If none is given, the first option is - considered the default. - :param mouse_support: Enable mouse support. - :param style: :class:`.Style` instance for the color scheme. - :param symbol: Symbol to be displayed in front of the selected choice. - :param bottom_toolbar: Formatted text or callable that returns formatted - text to be displayed at the bottom of the screen. - :param show_frame: `bool` or - :class:`~prompt_toolkit.filters.Filter`. When True, surround the input - with a frame. - :param enable_interrupt: `bool` or - :class:`~prompt_toolkit.filters.Filter`. When True, raise - the ``interrupt_exception`` (``KeyboardInterrupt`` by default) when - control-c has been pressed. - :param interrupt_exception: The exception type that will be raised when - there is a keyboard interrupt (control-c keypress). - """ - - def __init__( - self, - *, - message: AnyFormattedText, - options: Sequence[tuple[_T, AnyFormattedText]], - default: _T | None = None, - mouse_support: bool = False, - style: BaseStyle | None = None, - symbol: str = ">", - bottom_toolbar: AnyFormattedText = None, - show_frame: FilterOrBool = False, - enable_suspend: FilterOrBool = False, - enable_interrupt: FilterOrBool = True, - interrupt_exception: type[BaseException] = KeyboardInterrupt, - key_bindings: KeyBindingsBase | None = None, - ) -> None: - if style is None: - style = create_default_choice_input_style() - - self.message = message - self.default = default - self.options = options - self.mouse_support = mouse_support - self.style = style - self.symbol = symbol - self.show_frame = show_frame - self.enable_suspend = enable_suspend - self.interrupt_exception = interrupt_exception - self.enable_interrupt = enable_interrupt - self.bottom_toolbar = bottom_toolbar - self.key_bindings = key_bindings - - def _create_application(self) -> Application[_T]: - radio_list = RadioList( - values=self.options, - default=self.default, - select_on_focus=True, - open_character="", - select_character=self.symbol, - close_character="", - show_cursor=False, - show_numbers=True, - container_style="class:input-selection", - default_style="class:option", - selected_style="", - checked_style="class:selected-option", - number_style="class:number", - show_scrollbar=False, - ) - container: AnyContainer = HSplit( - [ - Box( - Label(text=self.message, dont_extend_height=True), - padding_top=0, - padding_left=1, - padding_right=1, - padding_bottom=0, - ), - Box( - radio_list, - padding_top=0, - padding_left=3, - padding_right=1, - padding_bottom=0, - ), - ] - ) - - @Condition - def show_frame_filter() -> bool: - return to_filter(self.show_frame)() - - show_bottom_toolbar = ( - Condition(lambda: self.bottom_toolbar is not None) - & ~is_done - & renderer_height_is_known - ) - - container = ConditionalContainer( - Frame(container), - alternative_content=container, - filter=show_frame_filter, - ) - - bottom_toolbar = ConditionalContainer( - Window( - FormattedTextControl( - lambda: self.bottom_toolbar, style="class:bottom-toolbar.text" - ), - style="class:bottom-toolbar", - dont_extend_height=True, - height=Dimension(min=1), - ), - filter=show_bottom_toolbar, - ) - - layout = Layout( - HSplit( - [ - container, - # Add an empty window between the selection input and the - # bottom toolbar, if the bottom toolbar is visible, in - # order to allow the bottom toolbar to be displayed at the - # bottom of the screen. - ConditionalContainer(Window(), filter=show_bottom_toolbar), - bottom_toolbar, - ] - ), - focused_element=radio_list, - ) - - kb = KeyBindings() - - @kb.add("enter", eager=True) - def _accept_input(event: E) -> None: - "Accept input when enter has been pressed." - event.app.exit(result=radio_list.current_value, style="class:accepted") - - @Condition - def enable_interrupt() -> bool: - return to_filter(self.enable_interrupt)() - - @kb.add("c-c", filter=enable_interrupt) - @kb.add("", filter=enable_interrupt) - def _keyboard_interrupt(event: E) -> None: - "Abort when Control-C has been pressed." - event.app.exit(exception=self.interrupt_exception(), style="class:aborting") - - suspend_supported = Condition(suspend_to_background_supported) - - @Condition - def enable_suspend() -> bool: - return to_filter(self.enable_suspend)() - - @kb.add("c-z", filter=suspend_supported & enable_suspend) - def _suspend(event: E) -> None: - """ - Suspend process to background. - """ - event.app.suspend_to_background() - - return Application( - layout=layout, - full_screen=False, - mouse_support=self.mouse_support, - key_bindings=merge_key_bindings( - [kb, DynamicKeyBindings(lambda: self.key_bindings)] - ), - style=self.style, - ) - - def prompt(self) -> _T: - return self._create_application().run() - - async def prompt_async(self) -> _T: - return await self._create_application().run_async() - - -def choice( - message: AnyFormattedText, - *, - options: Sequence[tuple[_T, AnyFormattedText]], - default: _T | None = None, - mouse_support: bool = False, - style: BaseStyle | None = None, - symbol: str = ">", - bottom_toolbar: AnyFormattedText = None, - show_frame: bool = False, - enable_suspend: FilterOrBool = False, - enable_interrupt: FilterOrBool = True, - interrupt_exception: type[BaseException] = KeyboardInterrupt, - key_bindings: KeyBindingsBase | None = None, -) -> _T: - """ - Choice selection prompt. Ask the user to choose among a set of options. - - Example usage:: - - result = choice( - message="Please select a dish:", - options=[ - ("pizza", "Pizza with mushrooms"), - ("salad", "Salad with tomatoes"), - ("sushi", "Sushi"), - ], - default="pizza", - ) - - :param message: Plain text or formatted text to be shown before the options. - :param options: Sequence of ``(value, label)`` tuples. The labels can be - formatted text. - :param default: Default value. If none is given, the first option is - considered the default. - :param mouse_support: Enable mouse support. - :param style: :class:`.Style` instance for the color scheme. - :param symbol: Symbol to be displayed in front of the selected choice. - :param bottom_toolbar: Formatted text or callable that returns formatted - text to be displayed at the bottom of the screen. - :param show_frame: `bool` or - :class:`~prompt_toolkit.filters.Filter`. When True, surround the input - with a frame. - :param enable_interrupt: `bool` or - :class:`~prompt_toolkit.filters.Filter`. When True, raise - the ``interrupt_exception`` (``KeyboardInterrupt`` by default) when - control-c has been pressed. - :param interrupt_exception: The exception type that will be raised when - there is a keyboard interrupt (control-c keypress). - """ - return ChoiceInput[_T]( - message=message, - options=options, - default=default, - mouse_support=mouse_support, - style=style, - symbol=symbol, - bottom_toolbar=bottom_toolbar, - show_frame=show_frame, - enable_suspend=enable_suspend, - enable_interrupt=enable_interrupt, - interrupt_exception=interrupt_exception, - key_bindings=key_bindings, - ).prompt() diff --git a/voxvera/vendor/prompt_toolkit/shortcuts/dialogs.py b/voxvera/vendor/prompt_toolkit/shortcuts/dialogs.py deleted file mode 100644 index d78e7db..0000000 --- a/voxvera/vendor/prompt_toolkit/shortcuts/dialogs.py +++ /dev/null @@ -1,330 +0,0 @@ -from __future__ import annotations - -import functools -from asyncio import get_running_loop -from typing import Any, Callable, Sequence, TypeVar - -from prompt_toolkit.application import Application -from prompt_toolkit.application.current import get_app -from prompt_toolkit.buffer import Buffer -from prompt_toolkit.completion import Completer -from prompt_toolkit.eventloop import run_in_executor_with_context -from prompt_toolkit.filters import FilterOrBool -from prompt_toolkit.formatted_text import AnyFormattedText -from prompt_toolkit.key_binding.bindings.focus import focus_next, focus_previous -from prompt_toolkit.key_binding.defaults import load_key_bindings -from prompt_toolkit.key_binding.key_bindings import KeyBindings, merge_key_bindings -from prompt_toolkit.layout import Layout -from prompt_toolkit.layout.containers import AnyContainer, HSplit -from prompt_toolkit.layout.dimension import Dimension as D -from prompt_toolkit.styles import BaseStyle -from prompt_toolkit.validation import Validator -from prompt_toolkit.widgets import ( - Box, - Button, - CheckboxList, - Dialog, - Label, - ProgressBar, - RadioList, - TextArea, - ValidationToolbar, -) - -__all__ = [ - "yes_no_dialog", - "button_dialog", - "input_dialog", - "message_dialog", - "radiolist_dialog", - "checkboxlist_dialog", - "progress_dialog", -] - - -def yes_no_dialog( - title: AnyFormattedText = "", - text: AnyFormattedText = "", - yes_text: str = "Yes", - no_text: str = "No", - style: BaseStyle | None = None, -) -> Application[bool]: - """ - Display a Yes/No dialog. - Return a boolean. - """ - - def yes_handler() -> None: - get_app().exit(result=True) - - def no_handler() -> None: - get_app().exit(result=False) - - dialog = Dialog( - title=title, - body=Label(text=text, dont_extend_height=True), - buttons=[ - Button(text=yes_text, handler=yes_handler), - Button(text=no_text, handler=no_handler), - ], - with_background=True, - ) - - return _create_app(dialog, style) - - -_T = TypeVar("_T") - - -def button_dialog( - title: AnyFormattedText = "", - text: AnyFormattedText = "", - buttons: list[tuple[str, _T]] = [], - style: BaseStyle | None = None, -) -> Application[_T]: - """ - Display a dialog with button choices (given as a list of tuples). - Return the value associated with button. - """ - - def button_handler(v: _T) -> None: - get_app().exit(result=v) - - dialog = Dialog( - title=title, - body=Label(text=text, dont_extend_height=True), - buttons=[ - Button(text=t, handler=functools.partial(button_handler, v)) - for t, v in buttons - ], - with_background=True, - ) - - return _create_app(dialog, style) - - -def input_dialog( - title: AnyFormattedText = "", - text: AnyFormattedText = "", - ok_text: str = "OK", - cancel_text: str = "Cancel", - completer: Completer | None = None, - validator: Validator | None = None, - password: FilterOrBool = False, - style: BaseStyle | None = None, - default: str = "", -) -> Application[str]: - """ - Display a text input box. - Return the given text, or None when cancelled. - """ - - def accept(buf: Buffer) -> bool: - get_app().layout.focus(ok_button) - return True # Keep text. - - def ok_handler() -> None: - get_app().exit(result=textfield.text) - - ok_button = Button(text=ok_text, handler=ok_handler) - cancel_button = Button(text=cancel_text, handler=_return_none) - - textfield = TextArea( - text=default, - multiline=False, - password=password, - completer=completer, - validator=validator, - accept_handler=accept, - ) - - dialog = Dialog( - title=title, - body=HSplit( - [ - Label(text=text, dont_extend_height=True), - textfield, - ValidationToolbar(), - ], - padding=D(preferred=1, max=1), - ), - buttons=[ok_button, cancel_button], - with_background=True, - ) - - return _create_app(dialog, style) - - -def message_dialog( - title: AnyFormattedText = "", - text: AnyFormattedText = "", - ok_text: str = "Ok", - style: BaseStyle | None = None, -) -> Application[None]: - """ - Display a simple message box and wait until the user presses enter. - """ - dialog = Dialog( - title=title, - body=Label(text=text, dont_extend_height=True), - buttons=[Button(text=ok_text, handler=_return_none)], - with_background=True, - ) - - return _create_app(dialog, style) - - -def radiolist_dialog( - title: AnyFormattedText = "", - text: AnyFormattedText = "", - ok_text: str = "Ok", - cancel_text: str = "Cancel", - values: Sequence[tuple[_T, AnyFormattedText]] | None = None, - default: _T | None = None, - style: BaseStyle | None = None, -) -> Application[_T]: - """ - Display a simple list of element the user can choose amongst. - - Only one element can be selected at a time using Arrow keys and Enter. - The focus can be moved between the list and the Ok/Cancel button with tab. - """ - if values is None: - values = [] - - def ok_handler() -> None: - get_app().exit(result=radio_list.current_value) - - radio_list = RadioList(values=values, default=default) - - dialog = Dialog( - title=title, - body=HSplit( - [Label(text=text, dont_extend_height=True), radio_list], - padding=1, - ), - buttons=[ - Button(text=ok_text, handler=ok_handler), - Button(text=cancel_text, handler=_return_none), - ], - with_background=True, - ) - - return _create_app(dialog, style) - - -def checkboxlist_dialog( - title: AnyFormattedText = "", - text: AnyFormattedText = "", - ok_text: str = "Ok", - cancel_text: str = "Cancel", - values: Sequence[tuple[_T, AnyFormattedText]] | None = None, - default_values: Sequence[_T] | None = None, - style: BaseStyle | None = None, -) -> Application[list[_T]]: - """ - Display a simple list of element the user can choose multiple values amongst. - - Several elements can be selected at a time using Arrow keys and Enter. - The focus can be moved between the list and the Ok/Cancel button with tab. - """ - if values is None: - values = [] - - def ok_handler() -> None: - get_app().exit(result=cb_list.current_values) - - cb_list = CheckboxList(values=values, default_values=default_values) - - dialog = Dialog( - title=title, - body=HSplit( - [Label(text=text, dont_extend_height=True), cb_list], - padding=1, - ), - buttons=[ - Button(text=ok_text, handler=ok_handler), - Button(text=cancel_text, handler=_return_none), - ], - with_background=True, - ) - - return _create_app(dialog, style) - - -def progress_dialog( - title: AnyFormattedText = "", - text: AnyFormattedText = "", - run_callback: Callable[[Callable[[int], None], Callable[[str], None]], None] = ( - lambda *a: None - ), - style: BaseStyle | None = None, -) -> Application[None]: - """ - :param run_callback: A function that receives as input a `set_percentage` - function and it does the work. - """ - loop = get_running_loop() - progressbar = ProgressBar() - text_area = TextArea( - focusable=False, - # Prefer this text area as big as possible, to avoid having a window - # that keeps resizing when we add text to it. - height=D(preferred=10**10), - ) - - dialog = Dialog( - body=HSplit( - [ - Box(Label(text=text)), - Box(text_area, padding=D.exact(1)), - progressbar, - ] - ), - title=title, - with_background=True, - ) - app = _create_app(dialog, style) - - def set_percentage(value: int) -> None: - progressbar.percentage = int(value) - app.invalidate() - - def log_text(text: str) -> None: - loop.call_soon_threadsafe(text_area.buffer.insert_text, text) - app.invalidate() - - # Run the callback in the executor. When done, set a return value for the - # UI, so that it quits. - def start() -> None: - try: - run_callback(set_percentage, log_text) - finally: - app.exit() - - def pre_run() -> None: - run_in_executor_with_context(start) - - app.pre_run_callables.append(pre_run) - - return app - - -def _create_app(dialog: AnyContainer, style: BaseStyle | None) -> Application[Any]: - # Key bindings. - bindings = KeyBindings() - bindings.add("tab")(focus_next) - bindings.add("s-tab")(focus_previous) - - return Application( - layout=Layout(dialog), - key_bindings=merge_key_bindings([load_key_bindings(), bindings]), - mouse_support=True, - style=style, - full_screen=True, - ) - - -def _return_none() -> None: - "Button handler that returns None." - get_app().exit() diff --git a/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/__init__.py b/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/__init__.py deleted file mode 100644 index 2261a5b..0000000 --- a/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from .base import ProgressBar, ProgressBarCounter -from .formatters import ( - Bar, - Formatter, - IterationsPerSecond, - Label, - Percentage, - Progress, - Rainbow, - SpinningWheel, - Text, - TimeElapsed, - TimeLeft, -) - -__all__ = [ - "ProgressBar", - "ProgressBarCounter", - # Formatters. - "Formatter", - "Text", - "Label", - "Percentage", - "Bar", - "Progress", - "TimeElapsed", - "TimeLeft", - "IterationsPerSecond", - "SpinningWheel", - "Rainbow", -] diff --git a/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/base.py b/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/base.py deleted file mode 100644 index a7c2a52..0000000 --- a/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/base.py +++ /dev/null @@ -1,449 +0,0 @@ -""" -Progress bar implementation on top of prompt_toolkit. - -:: - - with ProgressBar(...) as pb: - for item in pb(data): - ... -""" - -from __future__ import annotations - -import contextvars -import datetime -import functools -import os -import signal -import threading -import traceback -from typing import ( - Callable, - Generic, - Iterable, - Iterator, - Sequence, - Sized, - TextIO, - TypeVar, - cast, -) - -from prompt_toolkit.application import Application -from prompt_toolkit.application.current import get_app_session -from prompt_toolkit.filters import Condition, is_done, renderer_height_is_known -from prompt_toolkit.formatted_text import ( - AnyFormattedText, - StyleAndTextTuples, - to_formatted_text, -) -from prompt_toolkit.input import Input -from prompt_toolkit.key_binding import KeyBindings -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.layout import ( - ConditionalContainer, - FormattedTextControl, - HSplit, - Layout, - VSplit, - Window, -) -from prompt_toolkit.layout.controls import UIContent, UIControl -from prompt_toolkit.layout.dimension import AnyDimension, D -from prompt_toolkit.output import ColorDepth, Output -from prompt_toolkit.styles import BaseStyle -from prompt_toolkit.utils import in_main_thread - -from .formatters import Formatter, create_default_formatters - -__all__ = ["ProgressBar"] - -E = KeyPressEvent - -_SIGWINCH = getattr(signal, "SIGWINCH", None) - - -def create_key_bindings(cancel_callback: Callable[[], None] | None) -> KeyBindings: - """ - Key bindings handled by the progress bar. - (The main thread is not supposed to handle any key bindings.) - """ - kb = KeyBindings() - - @kb.add("c-l") - def _clear(event: E) -> None: - event.app.renderer.clear() - - if cancel_callback is not None: - - @kb.add("c-c") - def _interrupt(event: E) -> None: - "Kill the 'body' of the progress bar, but only if we run from the main thread." - assert cancel_callback is not None - cancel_callback() - - return kb - - -_T = TypeVar("_T") - - -class ProgressBar: - """ - Progress bar context manager. - - Usage :: - - with ProgressBar(...) as pb: - for item in pb(data): - ... - - :param title: Text to be displayed above the progress bars. This can be a - callable or formatted text as well. - :param formatters: List of :class:`.Formatter` instances. - :param bottom_toolbar: Text to be displayed in the bottom toolbar. This - can be a callable or formatted text. - :param style: :class:`prompt_toolkit.styles.BaseStyle` instance. - :param key_bindings: :class:`.KeyBindings` instance. - :param cancel_callback: Callback function that's called when control-c is - pressed by the user. This can be used for instance to start "proper" - cancellation if the wrapped code supports it. - :param file: The file object used for rendering, by default `sys.stderr` is used. - - :param color_depth: `prompt_toolkit` `ColorDepth` instance. - :param output: :class:`~prompt_toolkit.output.Output` instance. - :param input: :class:`~prompt_toolkit.input.Input` instance. - """ - - def __init__( - self, - title: AnyFormattedText = None, - formatters: Sequence[Formatter] | None = None, - bottom_toolbar: AnyFormattedText = None, - style: BaseStyle | None = None, - key_bindings: KeyBindings | None = None, - cancel_callback: Callable[[], None] | None = None, - file: TextIO | None = None, - color_depth: ColorDepth | None = None, - output: Output | None = None, - input: Input | None = None, - ) -> None: - self.title = title - self.formatters = formatters or create_default_formatters() - self.bottom_toolbar = bottom_toolbar - self.counters: list[ProgressBarCounter[object]] = [] - self.style = style - self.key_bindings = key_bindings - self.cancel_callback = cancel_callback - - # If no `cancel_callback` was given, and we're creating the progress - # bar from the main thread. Cancel by sending a `KeyboardInterrupt` to - # the main thread. - if self.cancel_callback is None and in_main_thread(): - - def keyboard_interrupt_to_main_thread() -> None: - os.kill(os.getpid(), signal.SIGINT) - - self.cancel_callback = keyboard_interrupt_to_main_thread - - # Note that we use __stderr__ as default error output, because that - # works best with `patch_stdout`. - self.color_depth = color_depth - self.output = output or get_app_session().output - self.input = input or get_app_session().input - - self._thread: threading.Thread | None = None - - self._has_sigwinch = False - self._app_started = threading.Event() - - def __enter__(self) -> ProgressBar: - # Create UI Application. - title_toolbar = ConditionalContainer( - Window( - FormattedTextControl(lambda: self.title), - height=1, - style="class:progressbar,title", - ), - filter=Condition(lambda: self.title is not None), - ) - - bottom_toolbar = ConditionalContainer( - Window( - FormattedTextControl( - lambda: self.bottom_toolbar, style="class:bottom-toolbar.text" - ), - style="class:bottom-toolbar", - height=1, - ), - filter=~is_done - & renderer_height_is_known - & Condition(lambda: self.bottom_toolbar is not None), - ) - - def width_for_formatter(formatter: Formatter) -> AnyDimension: - # Needs to be passed as callable (partial) to the 'width' - # parameter, because we want to call it on every resize. - return formatter.get_width(progress_bar=self) - - progress_controls = [ - Window( - content=_ProgressControl(self, f, self.cancel_callback), - width=functools.partial(width_for_formatter, f), - ) - for f in self.formatters - ] - - self.app: Application[None] = Application( - min_redraw_interval=0.05, - layout=Layout( - HSplit( - [ - title_toolbar, - VSplit( - progress_controls, - height=lambda: D( - preferred=len(self.counters), max=len(self.counters) - ), - ), - Window(), - bottom_toolbar, - ] - ) - ), - style=self.style, - key_bindings=self.key_bindings, - refresh_interval=0.3, - color_depth=self.color_depth, - output=self.output, - input=self.input, - ) - - # Run application in different thread. - def run() -> None: - try: - self.app.run(pre_run=self._app_started.set) - except BaseException as e: - traceback.print_exc() - print(e) - - ctx: contextvars.Context = contextvars.copy_context() - - self._thread = threading.Thread(target=ctx.run, args=(run,)) - self._thread.start() - - return self - - def __exit__(self, *a: object) -> None: - # Wait for the app to be started. Make sure we don't quit earlier, - # otherwise `self.app.exit` won't terminate the app because - # `self.app.future` has not yet been set. - self._app_started.wait() - - # Quit UI application. - if self.app.is_running and self.app.loop is not None: - self.app.loop.call_soon_threadsafe(self.app.exit) - - if self._thread is not None: - self._thread.join() - - def __call__( - self, - data: Iterable[_T] | None = None, - label: AnyFormattedText = "", - remove_when_done: bool = False, - total: int | None = None, - ) -> ProgressBarCounter[_T]: - """ - Start a new counter. - - :param label: Title text or description for this progress. (This can be - formatted text as well). - :param remove_when_done: When `True`, hide this progress bar. - :param total: Specify the maximum value if it can't be calculated by - calling ``len``. - """ - counter = ProgressBarCounter( - self, data, label=label, remove_when_done=remove_when_done, total=total - ) - self.counters.append(counter) - return counter - - def invalidate(self) -> None: - self.app.invalidate() - - -class _ProgressControl(UIControl): - """ - User control for the progress bar. - """ - - def __init__( - self, - progress_bar: ProgressBar, - formatter: Formatter, - cancel_callback: Callable[[], None] | None, - ) -> None: - self.progress_bar = progress_bar - self.formatter = formatter - self._key_bindings = create_key_bindings(cancel_callback) - - def create_content(self, width: int, height: int) -> UIContent: - items: list[StyleAndTextTuples] = [] - - for pr in self.progress_bar.counters: - try: - text = self.formatter.format(self.progress_bar, pr, width) - except BaseException: - traceback.print_exc() - text = "ERROR" - - items.append(to_formatted_text(text)) - - def get_line(i: int) -> StyleAndTextTuples: - return items[i] - - return UIContent(get_line=get_line, line_count=len(items), show_cursor=False) - - def is_focusable(self) -> bool: - return True # Make sure that the key bindings work. - - def get_key_bindings(self) -> KeyBindings: - return self._key_bindings - - -_CounterItem = TypeVar("_CounterItem", covariant=True) - - -class ProgressBarCounter(Generic[_CounterItem]): - """ - An individual counter (A progress bar can have multiple counters). - """ - - def __init__( - self, - progress_bar: ProgressBar, - data: Iterable[_CounterItem] | None = None, - label: AnyFormattedText = "", - remove_when_done: bool = False, - total: int | None = None, - ) -> None: - self.start_time = datetime.datetime.now() - self.stop_time: datetime.datetime | None = None - self.progress_bar = progress_bar - self.data = data - self.items_completed = 0 - self.label = label - self.remove_when_done = remove_when_done - self._done = False - self.total: int | None - - if total is None: - try: - self.total = len(cast(Sized, data)) - except TypeError: - self.total = None # We don't know the total length. - else: - self.total = total - - def __iter__(self) -> Iterator[_CounterItem]: - if self.data is not None: - try: - for item in self.data: - yield item - self.item_completed() - - # Only done if we iterate to the very end. - self.done = True - finally: - # Ensure counter has stopped even if we did not iterate to the - # end (e.g. break or exceptions). - self.stopped = True - else: - raise NotImplementedError("No data defined to iterate over.") - - def item_completed(self) -> None: - """ - Start handling the next item. - - (Can be called manually in case we don't have a collection to loop through.) - """ - self.items_completed += 1 - self.progress_bar.invalidate() - - @property - def done(self) -> bool: - """Whether a counter has been completed. - - Done counter have been stopped (see stopped) and removed depending on - remove_when_done value. - - Contrast this with stopped. A stopped counter may be terminated before - 100% completion. A done counter has reached its 100% completion. - """ - return self._done - - @done.setter - def done(self, value: bool) -> None: - self._done = value - self.stopped = value - - if value and self.remove_when_done: - self.progress_bar.counters.remove(self) - - @property - def stopped(self) -> bool: - """Whether a counter has been stopped. - - Stopped counters no longer have increasing time_elapsed. This distinction is - also used to prevent the Bar formatter with unknown totals from continuing to run. - - A stopped counter (but not done) can be used to signal that a given counter has - encountered an error but allows other counters to continue - (e.g. download X of Y failed). Given how only done counters are removed - (see remove_when_done) this can help aggregate failures from a large number of - successes. - - Contrast this with done. A done counter has reached its 100% completion. - A stopped counter may be terminated before 100% completion. - """ - return self.stop_time is not None - - @stopped.setter - def stopped(self, value: bool) -> None: - if value: - # This counter has not already been stopped. - if not self.stop_time: - self.stop_time = datetime.datetime.now() - else: - # Clearing any previously set stop_time. - self.stop_time = None - - @property - def percentage(self) -> float: - if self.total is None: - return 0 - else: - return self.items_completed * 100 / max(self.total, 1) - - @property - def time_elapsed(self) -> datetime.timedelta: - """ - Return how much time has been elapsed since the start. - """ - if self.stop_time is None: - return datetime.datetime.now() - self.start_time - else: - return self.stop_time - self.start_time - - @property - def time_left(self) -> datetime.timedelta | None: - """ - Timedelta representing the time left. - """ - if self.total is None or not self.percentage: - return None - elif self.done or self.stopped: - return datetime.timedelta(0) - else: - return self.time_elapsed * (100 - self.percentage) / self.percentage diff --git a/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/formatters.py b/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/formatters.py deleted file mode 100644 index 202949c..0000000 --- a/voxvera/vendor/prompt_toolkit/shortcuts/progress_bar/formatters.py +++ /dev/null @@ -1,431 +0,0 @@ -""" -Formatter classes for the progress bar. -Each progress bar consists of a list of these formatters. -""" - -from __future__ import annotations - -import datetime -import time -from abc import ABCMeta, abstractmethod -from typing import TYPE_CHECKING - -from prompt_toolkit.formatted_text import ( - HTML, - AnyFormattedText, - StyleAndTextTuples, - to_formatted_text, -) -from prompt_toolkit.formatted_text.utils import fragment_list_width -from prompt_toolkit.layout.dimension import AnyDimension, D -from prompt_toolkit.layout.utils import explode_text_fragments -from prompt_toolkit.utils import get_cwidth - -if TYPE_CHECKING: - from .base import ProgressBar, ProgressBarCounter - -__all__ = [ - "Formatter", - "Text", - "Label", - "Percentage", - "Bar", - "Progress", - "TimeElapsed", - "TimeLeft", - "IterationsPerSecond", - "SpinningWheel", - "Rainbow", - "create_default_formatters", -] - - -class Formatter(metaclass=ABCMeta): - """ - Base class for any formatter. - """ - - @abstractmethod - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - pass - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - return D() - - -class Text(Formatter): - """ - Display plain text. - """ - - def __init__(self, text: AnyFormattedText, style: str = "") -> None: - self.text = to_formatted_text(text, style=style) - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - return self.text - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - return fragment_list_width(self.text) - - -class Label(Formatter): - """ - Display the name of the current task. - - :param width: If a `width` is given, use this width. Scroll the text if it - doesn't fit in this width. - :param suffix: String suffix to be added after the task name, e.g. ': '. - If no task name was given, no suffix will be added. - """ - - def __init__(self, width: AnyDimension = None, suffix: str = "") -> None: - self.width = width - self.suffix = suffix - - def _add_suffix(self, label: AnyFormattedText) -> StyleAndTextTuples: - label = to_formatted_text(label, style="class:label") - return label + [("", self.suffix)] - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - label = self._add_suffix(progress.label) - cwidth = fragment_list_width(label) - - if cwidth > width: - # It doesn't fit -> scroll task name. - label = explode_text_fragments(label) - max_scroll = cwidth - width - current_scroll = int(time.time() * 3 % max_scroll) - label = label[current_scroll:] - - return label - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - if self.width: - return self.width - - all_labels = [self._add_suffix(c.label) for c in progress_bar.counters] - if all_labels: - max_widths = max(fragment_list_width(l) for l in all_labels) - return D(preferred=max_widths, max=max_widths) - else: - return D() - - -class Percentage(Formatter): - """ - Display the progress as a percentage. - """ - - template = HTML("{percentage:>5}%") - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - return self.template.format(percentage=round(progress.percentage, 1)) - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - return D.exact(6) - - -class Bar(Formatter): - """ - Display the progress bar itself. - """ - - template = HTML( - "{start}{bar_a}{bar_b}{bar_c}{end}" - ) - - def __init__( - self, - start: str = "[", - end: str = "]", - sym_a: str = "=", - sym_b: str = ">", - sym_c: str = " ", - unknown: str = "#", - ) -> None: - assert len(sym_a) == 1 and get_cwidth(sym_a) == 1 - assert len(sym_c) == 1 and get_cwidth(sym_c) == 1 - - self.start = start - self.end = end - self.sym_a = sym_a - self.sym_b = sym_b - self.sym_c = sym_c - self.unknown = unknown - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - if progress.done or progress.total or progress.stopped: - sym_a, sym_b, sym_c = self.sym_a, self.sym_b, self.sym_c - - # Compute pb_a based on done, total, or stopped states. - if progress.done: - # 100% completed irrelevant of how much was actually marked as completed. - percent = 1.0 - else: - # Show percentage completed. - percent = progress.percentage / 100 - else: - # Total is unknown and bar is still running. - sym_a, sym_b, sym_c = self.sym_c, self.unknown, self.sym_c - - # Compute percent based on the time. - percent = time.time() * 20 % 100 / 100 - - # Subtract left, sym_b, and right. - width -= get_cwidth(self.start + sym_b + self.end) - - # Scale percent by width - pb_a = int(percent * width) - bar_a = sym_a * pb_a - bar_b = sym_b - bar_c = sym_c * (width - pb_a) - - return self.template.format( - start=self.start, end=self.end, bar_a=bar_a, bar_b=bar_b, bar_c=bar_c - ) - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - return D(min=9) - - -class Progress(Formatter): - """ - Display the progress as text. E.g. "8/20" - """ - - template = HTML("{current:>3}/{total:>3}") - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - return self.template.format( - current=progress.items_completed, total=progress.total or "?" - ) - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - all_lengths = [ - len("{:>3}".format(c.total or "?")) for c in progress_bar.counters - ] - all_lengths.append(1) - return D.exact(max(all_lengths) * 2 + 1) - - -def _format_timedelta(timedelta: datetime.timedelta) -> str: - """ - Return hh:mm:ss, or mm:ss if the amount of hours is zero. - """ - result = f"{timedelta}".split(".")[0] - if result.startswith("0:"): - result = result[2:] - return result - - -class TimeElapsed(Formatter): - """ - Display the elapsed time. - """ - - template = HTML("{time_elapsed}") - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - text = _format_timedelta(progress.time_elapsed).rjust(width) - return self.template.format(time_elapsed=text) - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - all_values = [ - len(_format_timedelta(c.time_elapsed)) for c in progress_bar.counters - ] - if all_values: - return max(all_values) - return 0 - - -class TimeLeft(Formatter): - """ - Display the time left. - """ - - template = HTML("{time_left}") - unknown = "?:??:??" - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - time_left = progress.time_left - if time_left is not None: - formatted_time_left = _format_timedelta(time_left) - else: - formatted_time_left = self.unknown - - return self.template.format(time_left=formatted_time_left.rjust(width)) - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - all_values = [ - len(_format_timedelta(c.time_left)) if c.time_left is not None else 7 - for c in progress_bar.counters - ] - if all_values: - return max(all_values) - return 0 - - -class IterationsPerSecond(Formatter): - """ - Display the iterations per second. - """ - - template = HTML( - "{iterations_per_second:.2f}" - ) - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - value = progress.items_completed / progress.time_elapsed.total_seconds() - return self.template.format(iterations_per_second=value) - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - all_values = [ - len(f"{c.items_completed / c.time_elapsed.total_seconds():.2f}") - for c in progress_bar.counters - ] - if all_values: - return max(all_values) - return 0 - - -class SpinningWheel(Formatter): - """ - Display a spinning wheel. - """ - - template = HTML("{0}") - characters = r"/-\|" - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - index = int(time.time() * 3) % len(self.characters) - return self.template.format(self.characters[index]) - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - return D.exact(1) - - -def _hue_to_rgb(hue: float) -> tuple[int, int, int]: - """ - Take hue between 0 and 1, return (r, g, b). - """ - i = int(hue * 6.0) - f = (hue * 6.0) - i - - q = int(255 * (1.0 - f)) - t = int(255 * (1.0 - (1.0 - f))) - - i %= 6 - - return [ - (255, t, 0), - (q, 255, 0), - (0, 255, t), - (0, q, 255), - (t, 0, 255), - (255, 0, q), - ][i] - - -class Rainbow(Formatter): - """ - For the fun. Add rainbow colors to any of the other formatters. - """ - - colors = ["#%.2x%.2x%.2x" % _hue_to_rgb(h / 100.0) for h in range(0, 100)] - - def __init__(self, formatter: Formatter) -> None: - self.formatter = formatter - - def format( - self, - progress_bar: ProgressBar, - progress: ProgressBarCounter[object], - width: int, - ) -> AnyFormattedText: - # Get formatted text from nested formatter, and explode it in - # text/style tuples. - result = self.formatter.format(progress_bar, progress, width) - result = explode_text_fragments(to_formatted_text(result)) - - # Insert colors. - result2: StyleAndTextTuples = [] - shift = int(time.time() * 3) % len(self.colors) - - for i, (style, text, *_) in enumerate(result): - result2.append( - (style + " " + self.colors[(i + shift) % len(self.colors)], text) - ) - return result2 - - def get_width(self, progress_bar: ProgressBar) -> AnyDimension: - return self.formatter.get_width(progress_bar) - - -def create_default_formatters() -> list[Formatter]: - """ - Return the list of default formatters. - """ - return [ - Label(), - Text(" "), - Percentage(), - Text(" "), - Bar(), - Text(" "), - Progress(), - Text(" "), - Text("eta [", style="class:time-left"), - TimeLeft(), - Text("]", style="class:time-left"), - Text(" "), - ] diff --git a/voxvera/vendor/prompt_toolkit/shortcuts/prompt.py b/voxvera/vendor/prompt_toolkit/shortcuts/prompt.py deleted file mode 100644 index 68cfeb9..0000000 --- a/voxvera/vendor/prompt_toolkit/shortcuts/prompt.py +++ /dev/null @@ -1,1538 +0,0 @@ -""" -Line editing functionality. ---------------------------- - -This provides a UI for a line input, similar to GNU Readline, libedit and -linenoise. - -Either call the `prompt` function for every line input. Or create an instance -of the :class:`.PromptSession` class and call the `prompt` method from that -class. In the second case, we'll have a 'session' that keeps all the state like -the history in between several calls. - -There is a lot of overlap between the arguments taken by the `prompt` function -and the `PromptSession` (like `completer`, `style`, etcetera). There we have -the freedom to decide which settings we want for the whole 'session', and which -we want for an individual `prompt`. - -Example:: - - # Simple `prompt` call. - result = prompt('Say something: ') - - # Using a 'session'. - s = PromptSession() - result = s.prompt('Say something: ') -""" - -from __future__ import annotations - -from asyncio import get_running_loop -from contextlib import contextmanager -from enum import Enum -from functools import partial -from typing import TYPE_CHECKING, Callable, Generic, Iterator, TypeVar, Union, cast - -from prompt_toolkit.application import Application -from prompt_toolkit.application.current import get_app -from prompt_toolkit.auto_suggest import AutoSuggest, DynamicAutoSuggest -from prompt_toolkit.buffer import Buffer -from prompt_toolkit.clipboard import Clipboard, DynamicClipboard, InMemoryClipboard -from prompt_toolkit.completion import Completer, DynamicCompleter, ThreadedCompleter -from prompt_toolkit.cursor_shapes import ( - AnyCursorShapeConfig, - CursorShapeConfig, - DynamicCursorShapeConfig, -) -from prompt_toolkit.document import Document -from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER, EditingMode -from prompt_toolkit.eventloop import InputHook -from prompt_toolkit.filters import ( - Condition, - FilterOrBool, - has_arg, - has_focus, - is_done, - is_true, - renderer_height_is_known, - to_filter, -) -from prompt_toolkit.formatted_text import ( - AnyFormattedText, - StyleAndTextTuples, - fragment_list_to_text, - merge_formatted_text, - to_formatted_text, -) -from prompt_toolkit.history import History, InMemoryHistory -from prompt_toolkit.input.base import Input -from prompt_toolkit.key_binding.bindings.auto_suggest import load_auto_suggest_bindings -from prompt_toolkit.key_binding.bindings.completion import ( - display_completions_like_readline, -) -from prompt_toolkit.key_binding.bindings.open_in_editor import ( - load_open_in_editor_bindings, -) -from prompt_toolkit.key_binding.key_bindings import ( - ConditionalKeyBindings, - DynamicKeyBindings, - KeyBindings, - KeyBindingsBase, - merge_key_bindings, -) -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.keys import Keys -from prompt_toolkit.layout import Float, FloatContainer, HSplit, Window -from prompt_toolkit.layout.containers import ConditionalContainer, WindowAlign -from prompt_toolkit.layout.controls import ( - BufferControl, - FormattedTextControl, - SearchBufferControl, -) -from prompt_toolkit.layout.dimension import Dimension -from prompt_toolkit.layout.layout import Layout -from prompt_toolkit.layout.menus import CompletionsMenu, MultiColumnCompletionsMenu -from prompt_toolkit.layout.processors import ( - AfterInput, - AppendAutoSuggestion, - ConditionalProcessor, - DisplayMultipleCursors, - DynamicProcessor, - HighlightIncrementalSearchProcessor, - HighlightSelectionProcessor, - PasswordProcessor, - Processor, - ReverseSearchProcessor, - merge_processors, -) -from prompt_toolkit.layout.utils import explode_text_fragments -from prompt_toolkit.lexers import DynamicLexer, Lexer -from prompt_toolkit.output import ColorDepth, DummyOutput, Output -from prompt_toolkit.styles import ( - BaseStyle, - ConditionalStyleTransformation, - DynamicStyle, - DynamicStyleTransformation, - StyleTransformation, - SwapLightAndDarkStyleTransformation, - merge_style_transformations, -) -from prompt_toolkit.utils import ( - get_cwidth, - is_dumb_terminal, - suspend_to_background_supported, - to_str, -) -from prompt_toolkit.validation import DynamicValidator, Validator -from prompt_toolkit.widgets import Frame -from prompt_toolkit.widgets.toolbars import ( - SearchToolbar, - SystemToolbar, - ValidationToolbar, -) - -if TYPE_CHECKING: - from prompt_toolkit.formatted_text.base import MagicFormattedText - -__all__ = [ - "PromptSession", - "prompt", - "confirm", - "create_confirm_session", # Used by '_display_completions_like_readline'. - "CompleteStyle", -] - -_StyleAndTextTuplesCallable = Callable[[], StyleAndTextTuples] -E = KeyPressEvent - - -def _split_multiline_prompt( - get_prompt_text: _StyleAndTextTuplesCallable, -) -> tuple[ - Callable[[], bool], _StyleAndTextTuplesCallable, _StyleAndTextTuplesCallable -]: - """ - Take a `get_prompt_text` function and return three new functions instead. - One that tells whether this prompt consists of multiple lines; one that - returns the fragments to be shown on the lines above the input; and another - one with the fragments to be shown at the first line of the input. - """ - - def has_before_fragments() -> bool: - for fragment, char, *_ in get_prompt_text(): - if "\n" in char: - return True - return False - - def before() -> StyleAndTextTuples: - result: StyleAndTextTuples = [] - found_nl = False - for fragment, char, *_ in reversed(explode_text_fragments(get_prompt_text())): - if found_nl: - result.insert(0, (fragment, char)) - elif char == "\n": - found_nl = True - return result - - def first_input_line() -> StyleAndTextTuples: - result: StyleAndTextTuples = [] - for fragment, char, *_ in reversed(explode_text_fragments(get_prompt_text())): - if char == "\n": - break - else: - result.insert(0, (fragment, char)) - return result - - return has_before_fragments, before, first_input_line - - -class _RPrompt(Window): - """ - The prompt that is displayed on the right side of the Window. - """ - - def __init__(self, text: AnyFormattedText) -> None: - super().__init__( - FormattedTextControl(text=text), - align=WindowAlign.RIGHT, - style="class:rprompt", - ) - - -class CompleteStyle(str, Enum): - """ - How to display autocompletions for the prompt. - """ - - value: str - - COLUMN = "COLUMN" - MULTI_COLUMN = "MULTI_COLUMN" - READLINE_LIKE = "READLINE_LIKE" - - -# Formatted text for the continuation prompt. It's the same like other -# formatted text, except that if it's a callable, it takes three arguments. -PromptContinuationText = Union[ - str, - "MagicFormattedText", - StyleAndTextTuples, - # (prompt_width, line_number, wrap_count) -> AnyFormattedText. - Callable[[int, int, int], AnyFormattedText], -] - -_T = TypeVar("_T") - - -class PromptSession(Generic[_T]): - """ - PromptSession for a prompt application, which can be used as a GNU Readline - replacement. - - This is a wrapper around a lot of ``prompt_toolkit`` functionality and can - be a replacement for `raw_input`. - - All parameters that expect "formatted text" can take either just plain text - (a unicode object), a list of ``(style_str, text)`` tuples or an HTML object. - - Example usage:: - - s = PromptSession(message='>') - text = s.prompt() - - :param message: Plain text or formatted text to be shown before the prompt. - This can also be a callable that returns formatted text. - :param multiline: `bool` or :class:`~prompt_toolkit.filters.Filter`. - When True, prefer a layout that is more adapted for multiline input. - Text after newlines is automatically indented, and search/arg input is - shown below the input, instead of replacing the prompt. - :param wrap_lines: `bool` or :class:`~prompt_toolkit.filters.Filter`. - When True (the default), automatically wrap long lines instead of - scrolling horizontally. - :param is_password: Show asterisks instead of the actual typed characters. - :param editing_mode: ``EditingMode.VI`` or ``EditingMode.EMACS``. - :param vi_mode: `bool`, if True, Identical to ``editing_mode=EditingMode.VI``. - :param complete_while_typing: `bool` or - :class:`~prompt_toolkit.filters.Filter`. Enable autocompletion while - typing. - :param validate_while_typing: `bool` or - :class:`~prompt_toolkit.filters.Filter`. Enable input validation while - typing. - :param enable_history_search: `bool` or - :class:`~prompt_toolkit.filters.Filter`. Enable up-arrow parting - string matching. - :param search_ignore_case: - :class:`~prompt_toolkit.filters.Filter`. Search case insensitive. - :param lexer: :class:`~prompt_toolkit.lexers.Lexer` to be used for the - syntax highlighting. - :param validator: :class:`~prompt_toolkit.validation.Validator` instance - for input validation. - :param completer: :class:`~prompt_toolkit.completion.Completer` instance - for input completion. - :param complete_in_thread: `bool` or - :class:`~prompt_toolkit.filters.Filter`. Run the completer code in a - background thread in order to avoid blocking the user interface. - For ``CompleteStyle.READLINE_LIKE``, this setting has no effect. There - we always run the completions in the main thread. - :param reserve_space_for_menu: Space to be reserved for displaying the menu. - (0 means that no space needs to be reserved.) - :param auto_suggest: :class:`~prompt_toolkit.auto_suggest.AutoSuggest` - instance for input suggestions. - :param style: :class:`.Style` instance for the color scheme. - :param include_default_pygments_style: `bool` or - :class:`~prompt_toolkit.filters.Filter`. Tell whether the default - styling for Pygments lexers has to be included. By default, this is - true, but it is recommended to be disabled if another Pygments style is - passed as the `style` argument, otherwise, two Pygments styles will be - merged. - :param style_transformation: - :class:`~prompt_toolkit.style.StyleTransformation` instance. - :param swap_light_and_dark_colors: `bool` or - :class:`~prompt_toolkit.filters.Filter`. When enabled, apply - :class:`~prompt_toolkit.style.SwapLightAndDarkStyleTransformation`. - This is useful for switching between dark and light terminal - backgrounds. - :param enable_system_prompt: `bool` or - :class:`~prompt_toolkit.filters.Filter`. Pressing Meta+'!' will show - a system prompt. - :param enable_suspend: `bool` or :class:`~prompt_toolkit.filters.Filter`. - Enable Control-Z style suspension. - :param enable_open_in_editor: `bool` or - :class:`~prompt_toolkit.filters.Filter`. Pressing 'v' in Vi mode or - C-X C-E in emacs mode will open an external editor. - :param history: :class:`~prompt_toolkit.history.History` instance. - :param clipboard: :class:`~prompt_toolkit.clipboard.Clipboard` instance. - (e.g. :class:`~prompt_toolkit.clipboard.InMemoryClipboard`) - :param rprompt: Text or formatted text to be displayed on the right side. - This can also be a callable that returns (formatted) text. - :param bottom_toolbar: Formatted text or callable that returns formatted - text to be displayed at the bottom of the screen. - :param prompt_continuation: Text that needs to be displayed for a multiline - prompt continuation. This can either be formatted text or a callable - that takes a `prompt_width`, `line_number` and `wrap_count` as input - and returns formatted text. When this is `None` (the default), then - `prompt_width` spaces will be used. - :param complete_style: ``CompleteStyle.COLUMN``, - ``CompleteStyle.MULTI_COLUMN`` or ``CompleteStyle.READLINE_LIKE``. - :param mouse_support: `bool` or :class:`~prompt_toolkit.filters.Filter` - to enable mouse support. - :param placeholder: Text to be displayed when no input has been given - yet. Unlike the `default` parameter, this won't be returned as part of - the output ever. This can be formatted text or a callable that returns - formatted text. - :param show_frame: `bool` or - :class:`~prompt_toolkit.filters.Filter`. When True, surround the input - with a frame. - :param refresh_interval: (number; in seconds) When given, refresh the UI - every so many seconds. - :param input: `Input` object. (Note that the preferred way to change the - input/output is by creating an `AppSession`.) - :param output: `Output` object. - :param interrupt_exception: The exception type that will be raised when - there is a keyboard interrupt (control-c keypress). - :param eof_exception: The exception type that will be raised when there is - an end-of-file/exit event (control-d keypress). - """ - - _fields = ( - "message", - "lexer", - "completer", - "complete_in_thread", - "is_password", - "editing_mode", - "key_bindings", - "is_password", - "bottom_toolbar", - "style", - "style_transformation", - "swap_light_and_dark_colors", - "color_depth", - "cursor", - "include_default_pygments_style", - "rprompt", - "multiline", - "prompt_continuation", - "wrap_lines", - "enable_history_search", - "search_ignore_case", - "complete_while_typing", - "validate_while_typing", - "complete_style", - "mouse_support", - "auto_suggest", - "clipboard", - "validator", - "refresh_interval", - "input_processors", - "placeholder", - "enable_system_prompt", - "enable_suspend", - "enable_open_in_editor", - "reserve_space_for_menu", - "tempfile_suffix", - "tempfile", - "show_frame", - ) - - def __init__( - self, - message: AnyFormattedText = "", - *, - multiline: FilterOrBool = False, - wrap_lines: FilterOrBool = True, - is_password: FilterOrBool = False, - vi_mode: bool = False, - editing_mode: EditingMode = EditingMode.EMACS, - complete_while_typing: FilterOrBool = True, - validate_while_typing: FilterOrBool = True, - enable_history_search: FilterOrBool = False, - search_ignore_case: FilterOrBool = False, - lexer: Lexer | None = None, - enable_system_prompt: FilterOrBool = False, - enable_suspend: FilterOrBool = False, - enable_open_in_editor: FilterOrBool = False, - validator: Validator | None = None, - completer: Completer | None = None, - complete_in_thread: bool = False, - reserve_space_for_menu: int = 8, - complete_style: CompleteStyle = CompleteStyle.COLUMN, - auto_suggest: AutoSuggest | None = None, - style: BaseStyle | None = None, - style_transformation: StyleTransformation | None = None, - swap_light_and_dark_colors: FilterOrBool = False, - color_depth: ColorDepth | None = None, - cursor: AnyCursorShapeConfig = None, - include_default_pygments_style: FilterOrBool = True, - history: History | None = None, - clipboard: Clipboard | None = None, - prompt_continuation: PromptContinuationText | None = None, - rprompt: AnyFormattedText = None, - bottom_toolbar: AnyFormattedText = None, - mouse_support: FilterOrBool = False, - input_processors: list[Processor] | None = None, - placeholder: AnyFormattedText | None = None, - key_bindings: KeyBindingsBase | None = None, - erase_when_done: bool = False, - tempfile_suffix: str | Callable[[], str] | None = ".txt", - tempfile: str | Callable[[], str] | None = None, - refresh_interval: float = 0, - show_frame: FilterOrBool = False, - input: Input | None = None, - output: Output | None = None, - interrupt_exception: type[BaseException] = KeyboardInterrupt, - eof_exception: type[BaseException] = EOFError, - ) -> None: - history = history or InMemoryHistory() - clipboard = clipboard or InMemoryClipboard() - - # Ensure backwards-compatibility, when `vi_mode` is passed. - if vi_mode: - editing_mode = EditingMode.VI - - # Store all settings in this class. - self._input = input - self._output = output - - # Store attributes. - # (All except 'editing_mode'.) - self.message = message - self.lexer = lexer - self.completer = completer - self.complete_in_thread = complete_in_thread - self.is_password = is_password - self.key_bindings = key_bindings - self.bottom_toolbar = bottom_toolbar - self.style = style - self.style_transformation = style_transformation - self.swap_light_and_dark_colors = swap_light_and_dark_colors - self.color_depth = color_depth - self.cursor = cursor - self.include_default_pygments_style = include_default_pygments_style - self.rprompt = rprompt - self.multiline = multiline - self.prompt_continuation = prompt_continuation - self.wrap_lines = wrap_lines - self.enable_history_search = enable_history_search - self.search_ignore_case = search_ignore_case - self.complete_while_typing = complete_while_typing - self.validate_while_typing = validate_while_typing - self.complete_style = complete_style - self.mouse_support = mouse_support - self.auto_suggest = auto_suggest - self.clipboard = clipboard - self.validator = validator - self.refresh_interval = refresh_interval - self.input_processors = input_processors - self.placeholder = placeholder - self.enable_system_prompt = enable_system_prompt - self.enable_suspend = enable_suspend - self.enable_open_in_editor = enable_open_in_editor - self.reserve_space_for_menu = reserve_space_for_menu - self.tempfile_suffix = tempfile_suffix - self.tempfile = tempfile - self.show_frame = show_frame - self.interrupt_exception = interrupt_exception - self.eof_exception = eof_exception - - # Create buffers, layout and Application. - self.history = history - self.default_buffer = self._create_default_buffer() - self.search_buffer = self._create_search_buffer() - self.layout = self._create_layout() - self.app = self._create_application(editing_mode, erase_when_done) - - def _dyncond(self, attr_name: str) -> Condition: - """ - Dynamically take this setting from this 'PromptSession' class. - `attr_name` represents an attribute name of this class. Its value - can either be a boolean or a `Filter`. - - This returns something that can be used as either a `Filter` - or `Filter`. - """ - - @Condition - def dynamic() -> bool: - value = cast(FilterOrBool, getattr(self, attr_name)) - return to_filter(value)() - - return dynamic - - def _create_default_buffer(self) -> Buffer: - """ - Create and return the default input buffer. - """ - dyncond = self._dyncond - - # Create buffers list. - def accept(buff: Buffer) -> bool: - """Accept the content of the default buffer. This is called when - the validation succeeds.""" - cast(Application[str], get_app()).exit( - result=buff.document.text, style="class:accepted" - ) - return True # Keep text, we call 'reset' later on. - - return Buffer( - name=DEFAULT_BUFFER, - # Make sure that complete_while_typing is disabled when - # enable_history_search is enabled. (First convert to Filter, - # to avoid doing bitwise operations on bool objects.) - complete_while_typing=Condition( - lambda: is_true(self.complete_while_typing) - and not is_true(self.enable_history_search) - and not self.complete_style == CompleteStyle.READLINE_LIKE - ), - validate_while_typing=dyncond("validate_while_typing"), - enable_history_search=dyncond("enable_history_search"), - validator=DynamicValidator(lambda: self.validator), - completer=DynamicCompleter( - lambda: ThreadedCompleter(self.completer) - if self.complete_in_thread and self.completer - else self.completer - ), - history=self.history, - auto_suggest=DynamicAutoSuggest(lambda: self.auto_suggest), - accept_handler=accept, - tempfile_suffix=lambda: to_str(self.tempfile_suffix or ""), - tempfile=lambda: to_str(self.tempfile or ""), - ) - - def _create_search_buffer(self) -> Buffer: - return Buffer(name=SEARCH_BUFFER) - - def _create_layout(self) -> Layout: - """ - Create `Layout` for this prompt. - """ - dyncond = self._dyncond - - # Create functions that will dynamically split the prompt. (If we have - # a multiline prompt.) - ( - has_before_fragments, - get_prompt_text_1, - get_prompt_text_2, - ) = _split_multiline_prompt(self._get_prompt) - - default_buffer = self.default_buffer - search_buffer = self.search_buffer - - # Create processors list. - @Condition - def display_placeholder() -> bool: - return self.placeholder is not None and self.default_buffer.text == "" - - all_input_processors = [ - HighlightIncrementalSearchProcessor(), - HighlightSelectionProcessor(), - ConditionalProcessor( - AppendAutoSuggestion(), has_focus(default_buffer) & ~is_done - ), - ConditionalProcessor(PasswordProcessor(), dyncond("is_password")), - DisplayMultipleCursors(), - # Users can insert processors here. - DynamicProcessor(lambda: merge_processors(self.input_processors or [])), - ConditionalProcessor( - AfterInput(lambda: self.placeholder), - filter=display_placeholder, - ), - ] - - # Create bottom toolbars. - bottom_toolbar = ConditionalContainer( - Window( - FormattedTextControl( - lambda: self.bottom_toolbar, style="class:bottom-toolbar.text" - ), - style="class:bottom-toolbar", - dont_extend_height=True, - height=Dimension(min=1), - ), - filter=Condition(lambda: self.bottom_toolbar is not None) - & ~is_done - & renderer_height_is_known, - ) - - search_toolbar = SearchToolbar( - search_buffer, ignore_case=dyncond("search_ignore_case") - ) - - search_buffer_control = SearchBufferControl( - buffer=search_buffer, - input_processors=[ReverseSearchProcessor()], - ignore_case=dyncond("search_ignore_case"), - ) - - system_toolbar = SystemToolbar( - enable_global_bindings=dyncond("enable_system_prompt") - ) - - def get_search_buffer_control() -> SearchBufferControl: - "Return the UIControl to be focused when searching start." - if is_true(self.multiline): - return search_toolbar.control - else: - return search_buffer_control - - default_buffer_control = BufferControl( - buffer=default_buffer, - search_buffer_control=get_search_buffer_control, - input_processors=all_input_processors, - include_default_input_processors=False, - lexer=DynamicLexer(lambda: self.lexer), - preview_search=True, - ) - - default_buffer_window = Window( - default_buffer_control, - height=self._get_default_buffer_control_height, - get_line_prefix=partial( - self._get_line_prefix, get_prompt_text_2=get_prompt_text_2 - ), - wrap_lines=dyncond("wrap_lines"), - ) - - @Condition - def multi_column_complete_style() -> bool: - return self.complete_style == CompleteStyle.MULTI_COLUMN - - # Build the layout. - - # The main input, with completion menus floating on top of it. - main_input_container = FloatContainer( - HSplit( - [ - ConditionalContainer( - Window( - FormattedTextControl(get_prompt_text_1), - dont_extend_height=True, - ), - Condition(has_before_fragments), - ), - ConditionalContainer( - default_buffer_window, - Condition( - lambda: get_app().layout.current_control - != search_buffer_control - ), - ), - ConditionalContainer( - Window(search_buffer_control), - Condition( - lambda: get_app().layout.current_control - == search_buffer_control - ), - ), - ] - ), - [ - # Completion menus. - # NOTE: Especially the multi-column menu needs to be - # transparent, because the shape is not always - # rectangular due to the meta-text below the menu. - Float( - xcursor=True, - ycursor=True, - transparent=True, - content=CompletionsMenu( - max_height=16, - scroll_offset=1, - extra_filter=has_focus(default_buffer) - & ~multi_column_complete_style, - ), - ), - Float( - xcursor=True, - ycursor=True, - transparent=True, - content=MultiColumnCompletionsMenu( - show_meta=True, - extra_filter=has_focus(default_buffer) - & multi_column_complete_style, - ), - ), - # The right prompt. - Float( - right=0, - top=0, - hide_when_covering_content=True, - content=_RPrompt(lambda: self.rprompt), - ), - ], - ) - - layout = HSplit( - [ - # Wrap the main input in a frame, if requested. - ConditionalContainer( - Frame(main_input_container), - filter=dyncond("show_frame"), - alternative_content=main_input_container, - ), - ConditionalContainer(ValidationToolbar(), filter=~is_done), - ConditionalContainer( - system_toolbar, dyncond("enable_system_prompt") & ~is_done - ), - # In multiline mode, we use two toolbars for 'arg' and 'search'. - ConditionalContainer( - Window(FormattedTextControl(self._get_arg_text), height=1), - dyncond("multiline") & has_arg, - ), - ConditionalContainer(search_toolbar, dyncond("multiline") & ~is_done), - bottom_toolbar, - ] - ) - - return Layout(layout, default_buffer_window) - - def _create_application( - self, editing_mode: EditingMode, erase_when_done: bool - ) -> Application[_T]: - """ - Create the `Application` object. - """ - dyncond = self._dyncond - - # Default key bindings. - auto_suggest_bindings = load_auto_suggest_bindings() - open_in_editor_bindings = load_open_in_editor_bindings() - prompt_bindings = self._create_prompt_bindings() - - # Create application - application: Application[_T] = Application( - layout=self.layout, - style=DynamicStyle(lambda: self.style), - style_transformation=merge_style_transformations( - [ - DynamicStyleTransformation(lambda: self.style_transformation), - ConditionalStyleTransformation( - SwapLightAndDarkStyleTransformation(), - dyncond("swap_light_and_dark_colors"), - ), - ] - ), - include_default_pygments_style=dyncond("include_default_pygments_style"), - clipboard=DynamicClipboard(lambda: self.clipboard), - key_bindings=merge_key_bindings( - [ - merge_key_bindings( - [ - auto_suggest_bindings, - ConditionalKeyBindings( - open_in_editor_bindings, - dyncond("enable_open_in_editor") - & has_focus(DEFAULT_BUFFER), - ), - prompt_bindings, - ] - ), - DynamicKeyBindings(lambda: self.key_bindings), - ] - ), - mouse_support=dyncond("mouse_support"), - editing_mode=editing_mode, - erase_when_done=erase_when_done, - reverse_vi_search_direction=True, - color_depth=lambda: self.color_depth, - cursor=DynamicCursorShapeConfig(lambda: self.cursor), - refresh_interval=self.refresh_interval, - input=self._input, - output=self._output, - ) - - # During render time, make sure that we focus the right search control - # (if we are searching). - This could be useful if people make the - # 'multiline' property dynamic. - """ - def on_render(app): - multiline = is_true(self.multiline) - current_control = app.layout.current_control - - if multiline: - if current_control == search_buffer_control: - app.layout.current_control = search_toolbar.control - app.invalidate() - else: - if current_control == search_toolbar.control: - app.layout.current_control = search_buffer_control - app.invalidate() - - app.on_render += on_render - """ - - return application - - def _create_prompt_bindings(self) -> KeyBindings: - """ - Create the KeyBindings for a prompt application. - """ - kb = KeyBindings() - handle = kb.add - default_focused = has_focus(DEFAULT_BUFFER) - - @Condition - def do_accept() -> bool: - return not is_true(self.multiline) and self.app.layout.has_focus( - DEFAULT_BUFFER - ) - - @handle("enter", filter=do_accept & default_focused) - def _accept_input(event: E) -> None: - "Accept input when enter has been pressed." - self.default_buffer.validate_and_handle() - - @Condition - def readline_complete_style() -> bool: - return self.complete_style == CompleteStyle.READLINE_LIKE - - @handle("tab", filter=readline_complete_style & default_focused) - def _complete_like_readline(event: E) -> None: - "Display completions (like Readline)." - display_completions_like_readline(event) - - @handle("c-c", filter=default_focused) - @handle("") - def _keyboard_interrupt(event: E) -> None: - "Abort when Control-C has been pressed." - event.app.exit(exception=self.interrupt_exception(), style="class:aborting") - - @Condition - def ctrl_d_condition() -> bool: - """Ctrl-D binding is only active when the default buffer is selected - and empty.""" - app = get_app() - return ( - app.current_buffer.name == DEFAULT_BUFFER - and not app.current_buffer.text - ) - - @handle("c-d", filter=ctrl_d_condition & default_focused) - def _eof(event: E) -> None: - "Exit when Control-D has been pressed." - event.app.exit(exception=self.eof_exception(), style="class:exiting") - - suspend_supported = Condition(suspend_to_background_supported) - - @Condition - def enable_suspend() -> bool: - return to_filter(self.enable_suspend)() - - @handle("c-z", filter=suspend_supported & enable_suspend) - def _suspend(event: E) -> None: - """ - Suspend process to background. - """ - event.app.suspend_to_background() - - return kb - - def prompt( - self, - # When any of these arguments are passed, this value is overwritten - # in this PromptSession. - message: AnyFormattedText | None = None, - # `message` should go first, because people call it as - # positional argument. - *, - editing_mode: EditingMode | None = None, - refresh_interval: float | None = None, - vi_mode: bool | None = None, - lexer: Lexer | None = None, - completer: Completer | None = None, - complete_in_thread: bool | None = None, - is_password: bool | None = None, - key_bindings: KeyBindingsBase | None = None, - bottom_toolbar: AnyFormattedText | None = None, - style: BaseStyle | None = None, - color_depth: ColorDepth | None = None, - cursor: AnyCursorShapeConfig | None = None, - include_default_pygments_style: FilterOrBool | None = None, - style_transformation: StyleTransformation | None = None, - swap_light_and_dark_colors: FilterOrBool | None = None, - rprompt: AnyFormattedText | None = None, - multiline: FilterOrBool | None = None, - prompt_continuation: PromptContinuationText | None = None, - wrap_lines: FilterOrBool | None = None, - enable_history_search: FilterOrBool | None = None, - search_ignore_case: FilterOrBool | None = None, - complete_while_typing: FilterOrBool | None = None, - validate_while_typing: FilterOrBool | None = None, - complete_style: CompleteStyle | None = None, - auto_suggest: AutoSuggest | None = None, - validator: Validator | None = None, - clipboard: Clipboard | None = None, - mouse_support: FilterOrBool | None = None, - input_processors: list[Processor] | None = None, - placeholder: AnyFormattedText | None = None, - reserve_space_for_menu: int | None = None, - enable_system_prompt: FilterOrBool | None = None, - enable_suspend: FilterOrBool | None = None, - enable_open_in_editor: FilterOrBool | None = None, - tempfile_suffix: str | Callable[[], str] | None = None, - tempfile: str | Callable[[], str] | None = None, - show_frame: FilterOrBool | None = None, - # Following arguments are specific to the current `prompt()` call. - default: str | Document = "", - accept_default: bool = False, - pre_run: Callable[[], None] | None = None, - set_exception_handler: bool = True, - handle_sigint: bool = True, - in_thread: bool = False, - inputhook: InputHook | None = None, - ) -> _T: - """ - Display the prompt. - - The first set of arguments is a subset of the :class:`~.PromptSession` - class itself. For these, passing in ``None`` will keep the current - values that are active in the session. Passing in a value will set the - attribute for the session, which means that it applies to the current, - but also to the next prompts. - - Note that in order to erase a ``Completer``, ``Validator`` or - ``AutoSuggest``, you can't use ``None``. Instead pass in a - ``DummyCompleter``, ``DummyValidator`` or ``DummyAutoSuggest`` instance - respectively. For a ``Lexer`` you can pass in an empty ``SimpleLexer``. - - Additional arguments, specific for this prompt: - - :param default: The default input text to be shown. (This can be edited - by the user). - :param accept_default: When `True`, automatically accept the default - value without allowing the user to edit the input. - :param pre_run: Callable, called at the start of `Application.run`. - :param in_thread: Run the prompt in a background thread; block the - current thread. This avoids interference with an event loop in the - current thread. Like `Application.run(in_thread=True)`. - - This method will raise ``KeyboardInterrupt`` when control-c has been - pressed (for abort) and ``EOFError`` when control-d has been pressed - (for exit). - """ - # NOTE: We used to create a backup of the PromptSession attributes and - # restore them after exiting the prompt. This code has been - # removed, because it was confusing and didn't really serve a use - # case. (People were changing `Application.editing_mode` - # dynamically and surprised that it was reset after every call.) - - # NOTE 2: YES, this is a lot of repeation below... - # However, it is a very convenient for a user to accept all - # these parameters in this `prompt` method as well. We could - # use `locals()` and `setattr` to avoid the repetition, but - # then we loose the advantage of mypy and pyflakes to be able - # to verify the code. - if message is not None: - self.message = message - if editing_mode is not None: - self.editing_mode = editing_mode - if refresh_interval is not None: - self.refresh_interval = refresh_interval - if vi_mode: - self.editing_mode = EditingMode.VI - if lexer is not None: - self.lexer = lexer - if completer is not None: - self.completer = completer - if complete_in_thread is not None: - self.complete_in_thread = complete_in_thread - if is_password is not None: - self.is_password = is_password - if key_bindings is not None: - self.key_bindings = key_bindings - if bottom_toolbar is not None: - self.bottom_toolbar = bottom_toolbar - if style is not None: - self.style = style - if color_depth is not None: - self.color_depth = color_depth - if cursor is not None: - self.cursor = cursor - if include_default_pygments_style is not None: - self.include_default_pygments_style = include_default_pygments_style - if style_transformation is not None: - self.style_transformation = style_transformation - if swap_light_and_dark_colors is not None: - self.swap_light_and_dark_colors = swap_light_and_dark_colors - if rprompt is not None: - self.rprompt = rprompt - if multiline is not None: - self.multiline = multiline - if prompt_continuation is not None: - self.prompt_continuation = prompt_continuation - if wrap_lines is not None: - self.wrap_lines = wrap_lines - if enable_history_search is not None: - self.enable_history_search = enable_history_search - if search_ignore_case is not None: - self.search_ignore_case = search_ignore_case - if complete_while_typing is not None: - self.complete_while_typing = complete_while_typing - if validate_while_typing is not None: - self.validate_while_typing = validate_while_typing - if complete_style is not None: - self.complete_style = complete_style - if auto_suggest is not None: - self.auto_suggest = auto_suggest - if validator is not None: - self.validator = validator - if clipboard is not None: - self.clipboard = clipboard - if mouse_support is not None: - self.mouse_support = mouse_support - if input_processors is not None: - self.input_processors = input_processors - if placeholder is not None: - self.placeholder = placeholder - if reserve_space_for_menu is not None: - self.reserve_space_for_menu = reserve_space_for_menu - if enable_system_prompt is not None: - self.enable_system_prompt = enable_system_prompt - if enable_suspend is not None: - self.enable_suspend = enable_suspend - if enable_open_in_editor is not None: - self.enable_open_in_editor = enable_open_in_editor - if tempfile_suffix is not None: - self.tempfile_suffix = tempfile_suffix - if tempfile is not None: - self.tempfile = tempfile - if show_frame is not None: - self.show_frame = show_frame - - self._add_pre_run_callables(pre_run, accept_default) - self.default_buffer.reset( - default if isinstance(default, Document) else Document(default) - ) - self.app.refresh_interval = self.refresh_interval # This is not reactive. - - # If we are using the default output, and have a dumb terminal. Use the - # dumb prompt. - if self._output is None and is_dumb_terminal(): - with self._dumb_prompt(self.message) as dump_app: - return dump_app.run(in_thread=in_thread, handle_sigint=handle_sigint) - - return self.app.run( - set_exception_handler=set_exception_handler, - in_thread=in_thread, - handle_sigint=handle_sigint, - inputhook=inputhook, - ) - - @contextmanager - def _dumb_prompt(self, message: AnyFormattedText = "") -> Iterator[Application[_T]]: - """ - Create prompt `Application` for prompt function for dumb terminals. - - Dumb terminals have minimum rendering capabilities. We can only print - text to the screen. We can't use colors, and we can't do cursor - movements. The Emacs inferior shell is an example of a dumb terminal. - - We will show the prompt, and wait for the input. We still handle arrow - keys, and all custom key bindings, but we don't really render the - cursor movements. Instead we only print the typed character that's - right before the cursor. - """ - # Send prompt to output. - self.output.write(fragment_list_to_text(to_formatted_text(self.message))) - self.output.flush() - - # Key bindings for the dumb prompt: mostly the same as the full prompt. - key_bindings: KeyBindingsBase = self._create_prompt_bindings() - if self.key_bindings: - key_bindings = merge_key_bindings([self.key_bindings, key_bindings]) - - # Create and run application. - application = cast( - Application[_T], - Application( - input=self.input, - output=DummyOutput(), - layout=self.layout, - key_bindings=key_bindings, - ), - ) - - def on_text_changed(_: object) -> None: - self.output.write(self.default_buffer.document.text_before_cursor[-1:]) - self.output.flush() - - self.default_buffer.on_text_changed += on_text_changed - - try: - yield application - finally: - # Render line ending. - self.output.write("\r\n") - self.output.flush() - - self.default_buffer.on_text_changed -= on_text_changed - - async def prompt_async( - self, - # When any of these arguments are passed, this value is overwritten - # in this PromptSession. - message: AnyFormattedText | None = None, - # `message` should go first, because people call it as - # positional argument. - *, - editing_mode: EditingMode | None = None, - refresh_interval: float | None = None, - vi_mode: bool | None = None, - lexer: Lexer | None = None, - completer: Completer | None = None, - complete_in_thread: bool | None = None, - is_password: bool | None = None, - key_bindings: KeyBindingsBase | None = None, - bottom_toolbar: AnyFormattedText | None = None, - style: BaseStyle | None = None, - color_depth: ColorDepth | None = None, - cursor: CursorShapeConfig | None = None, - include_default_pygments_style: FilterOrBool | None = None, - style_transformation: StyleTransformation | None = None, - swap_light_and_dark_colors: FilterOrBool | None = None, - rprompt: AnyFormattedText | None = None, - multiline: FilterOrBool | None = None, - prompt_continuation: PromptContinuationText | None = None, - wrap_lines: FilterOrBool | None = None, - enable_history_search: FilterOrBool | None = None, - search_ignore_case: FilterOrBool | None = None, - complete_while_typing: FilterOrBool | None = None, - validate_while_typing: FilterOrBool | None = None, - complete_style: CompleteStyle | None = None, - auto_suggest: AutoSuggest | None = None, - validator: Validator | None = None, - clipboard: Clipboard | None = None, - mouse_support: FilterOrBool | None = None, - input_processors: list[Processor] | None = None, - placeholder: AnyFormattedText | None = None, - reserve_space_for_menu: int | None = None, - enable_system_prompt: FilterOrBool | None = None, - enable_suspend: FilterOrBool | None = None, - enable_open_in_editor: FilterOrBool | None = None, - tempfile_suffix: str | Callable[[], str] | None = None, - tempfile: str | Callable[[], str] | None = None, - show_frame: FilterOrBool = False, - # Following arguments are specific to the current `prompt()` call. - default: str | Document = "", - accept_default: bool = False, - pre_run: Callable[[], None] | None = None, - set_exception_handler: bool = True, - handle_sigint: bool = True, - ) -> _T: - if message is not None: - self.message = message - if editing_mode is not None: - self.editing_mode = editing_mode - if refresh_interval is not None: - self.refresh_interval = refresh_interval - if vi_mode: - self.editing_mode = EditingMode.VI - if lexer is not None: - self.lexer = lexer - if completer is not None: - self.completer = completer - if complete_in_thread is not None: - self.complete_in_thread = complete_in_thread - if is_password is not None: - self.is_password = is_password - if key_bindings is not None: - self.key_bindings = key_bindings - if bottom_toolbar is not None: - self.bottom_toolbar = bottom_toolbar - if style is not None: - self.style = style - if color_depth is not None: - self.color_depth = color_depth - if cursor is not None: - self.cursor = cursor - if include_default_pygments_style is not None: - self.include_default_pygments_style = include_default_pygments_style - if style_transformation is not None: - self.style_transformation = style_transformation - if swap_light_and_dark_colors is not None: - self.swap_light_and_dark_colors = swap_light_and_dark_colors - if rprompt is not None: - self.rprompt = rprompt - if multiline is not None: - self.multiline = multiline - if prompt_continuation is not None: - self.prompt_continuation = prompt_continuation - if wrap_lines is not None: - self.wrap_lines = wrap_lines - if enable_history_search is not None: - self.enable_history_search = enable_history_search - if search_ignore_case is not None: - self.search_ignore_case = search_ignore_case - if complete_while_typing is not None: - self.complete_while_typing = complete_while_typing - if validate_while_typing is not None: - self.validate_while_typing = validate_while_typing - if complete_style is not None: - self.complete_style = complete_style - if auto_suggest is not None: - self.auto_suggest = auto_suggest - if validator is not None: - self.validator = validator - if clipboard is not None: - self.clipboard = clipboard - if mouse_support is not None: - self.mouse_support = mouse_support - if input_processors is not None: - self.input_processors = input_processors - if placeholder is not None: - self.placeholder = placeholder - if reserve_space_for_menu is not None: - self.reserve_space_for_menu = reserve_space_for_menu - if enable_system_prompt is not None: - self.enable_system_prompt = enable_system_prompt - if enable_suspend is not None: - self.enable_suspend = enable_suspend - if enable_open_in_editor is not None: - self.enable_open_in_editor = enable_open_in_editor - if tempfile_suffix is not None: - self.tempfile_suffix = tempfile_suffix - if tempfile is not None: - self.tempfile = tempfile - if show_frame is not None: - self.show_frame = show_frame - - self._add_pre_run_callables(pre_run, accept_default) - self.default_buffer.reset( - default if isinstance(default, Document) else Document(default) - ) - self.app.refresh_interval = self.refresh_interval # This is not reactive. - - # If we are using the default output, and have a dumb terminal. Use the - # dumb prompt. - if self._output is None and is_dumb_terminal(): - with self._dumb_prompt(self.message) as dump_app: - return await dump_app.run_async(handle_sigint=handle_sigint) - - return await self.app.run_async( - set_exception_handler=set_exception_handler, handle_sigint=handle_sigint - ) - - def _add_pre_run_callables( - self, pre_run: Callable[[], None] | None, accept_default: bool - ) -> None: - def pre_run2() -> None: - if pre_run: - pre_run() - - if accept_default: - # Validate and handle input. We use `call_from_executor` in - # order to run it "soon" (during the next iteration of the - # event loop), instead of right now. Otherwise, it won't - # display the default value. - get_running_loop().call_soon(self.default_buffer.validate_and_handle) - - self.app.pre_run_callables.append(pre_run2) - - @property - def editing_mode(self) -> EditingMode: - return self.app.editing_mode - - @editing_mode.setter - def editing_mode(self, value: EditingMode) -> None: - self.app.editing_mode = value - - def _get_default_buffer_control_height(self) -> Dimension: - # If there is an autocompletion menu to be shown, make sure that our - # layout has at least a minimal height in order to display it. - if ( - self.completer is not None - and self.complete_style != CompleteStyle.READLINE_LIKE - ): - space = self.reserve_space_for_menu - else: - space = 0 - - if space and not get_app().is_done: - buff = self.default_buffer - - # Reserve the space, either when there are completions, or when - # `complete_while_typing` is true and we expect completions very - # soon. - if buff.complete_while_typing() or buff.complete_state is not None: - return Dimension(min=space) - - return Dimension() - - def _get_prompt(self) -> StyleAndTextTuples: - return to_formatted_text(self.message, style="class:prompt") - - def _get_continuation( - self, width: int, line_number: int, wrap_count: int - ) -> StyleAndTextTuples: - """ - Insert the prompt continuation. - - :param width: The width that was used for the prompt. (more or less can - be used.) - :param line_number: - :param wrap_count: Amount of times that the line has been wrapped. - """ - prompt_continuation = self.prompt_continuation - - if callable(prompt_continuation): - continuation: AnyFormattedText = prompt_continuation( - width, line_number, wrap_count - ) - else: - continuation = prompt_continuation - - # When the continuation prompt is not given, choose the same width as - # the actual prompt. - if continuation is None and is_true(self.multiline): - continuation = " " * width - - return to_formatted_text(continuation, style="class:prompt-continuation") - - def _get_line_prefix( - self, - line_number: int, - wrap_count: int, - get_prompt_text_2: _StyleAndTextTuplesCallable, - ) -> StyleAndTextTuples: - """ - Return whatever needs to be inserted before every line. - (the prompt, or a line continuation.) - """ - # First line: display the "arg" or the prompt. - if line_number == 0 and wrap_count == 0: - if not is_true(self.multiline) and get_app().key_processor.arg is not None: - return self._inline_arg() - else: - return get_prompt_text_2() - - # For the next lines, display the appropriate continuation. - prompt_width = get_cwidth(fragment_list_to_text(get_prompt_text_2())) - return self._get_continuation(prompt_width, line_number, wrap_count) - - def _get_arg_text(self) -> StyleAndTextTuples: - "'arg' toolbar, for in multiline mode." - arg = self.app.key_processor.arg - if arg is None: - # Should not happen because of the `has_arg` filter in the layout. - return [] - - if arg == "-": - arg = "-1" - - return [("class:arg-toolbar", "Repeat: "), ("class:arg-toolbar.text", arg)] - - def _inline_arg(self) -> StyleAndTextTuples: - "'arg' prefix, for in single line mode." - app = get_app() - if app.key_processor.arg is None: - return [] - else: - arg = app.key_processor.arg - - return [ - ("class:prompt.arg", "(arg: "), - ("class:prompt.arg.text", str(arg)), - ("class:prompt.arg", ") "), - ] - - # Expose the Input and Output objects as attributes, mainly for - # backward-compatibility. - - @property - def input(self) -> Input: - return self.app.input - - @property - def output(self) -> Output: - return self.app.output - - -def prompt( - message: AnyFormattedText | None = None, - *, - history: History | None = None, - editing_mode: EditingMode | None = None, - refresh_interval: float | None = None, - vi_mode: bool | None = None, - lexer: Lexer | None = None, - completer: Completer | None = None, - complete_in_thread: bool | None = None, - is_password: bool | None = None, - key_bindings: KeyBindingsBase | None = None, - bottom_toolbar: AnyFormattedText | None = None, - style: BaseStyle | None = None, - color_depth: ColorDepth | None = None, - cursor: AnyCursorShapeConfig = None, - include_default_pygments_style: FilterOrBool | None = None, - style_transformation: StyleTransformation | None = None, - swap_light_and_dark_colors: FilterOrBool | None = None, - rprompt: AnyFormattedText | None = None, - multiline: FilterOrBool | None = None, - prompt_continuation: PromptContinuationText | None = None, - wrap_lines: FilterOrBool | None = None, - enable_history_search: FilterOrBool | None = None, - search_ignore_case: FilterOrBool | None = None, - complete_while_typing: FilterOrBool | None = None, - validate_while_typing: FilterOrBool | None = None, - complete_style: CompleteStyle | None = None, - auto_suggest: AutoSuggest | None = None, - validator: Validator | None = None, - clipboard: Clipboard | None = None, - mouse_support: FilterOrBool | None = None, - input_processors: list[Processor] | None = None, - placeholder: AnyFormattedText | None = None, - reserve_space_for_menu: int | None = None, - enable_system_prompt: FilterOrBool | None = None, - enable_suspend: FilterOrBool | None = None, - enable_open_in_editor: FilterOrBool | None = None, - tempfile_suffix: str | Callable[[], str] | None = None, - tempfile: str | Callable[[], str] | None = None, - show_frame: FilterOrBool | None = None, - # Following arguments are specific to the current `prompt()` call. - default: str = "", - accept_default: bool = False, - pre_run: Callable[[], None] | None = None, - set_exception_handler: bool = True, - handle_sigint: bool = True, - in_thread: bool = False, - inputhook: InputHook | None = None, -) -> str: - """ - The global `prompt` function. This will create a new `PromptSession` - instance for every call. - """ - # The history is the only attribute that has to be passed to the - # `PromptSession`, it can't be passed into the `prompt()` method. - session: PromptSession[str] = PromptSession(history=history) - - return session.prompt( - message, - editing_mode=editing_mode, - refresh_interval=refresh_interval, - vi_mode=vi_mode, - lexer=lexer, - completer=completer, - complete_in_thread=complete_in_thread, - is_password=is_password, - key_bindings=key_bindings, - bottom_toolbar=bottom_toolbar, - style=style, - color_depth=color_depth, - cursor=cursor, - include_default_pygments_style=include_default_pygments_style, - style_transformation=style_transformation, - swap_light_and_dark_colors=swap_light_and_dark_colors, - rprompt=rprompt, - multiline=multiline, - prompt_continuation=prompt_continuation, - wrap_lines=wrap_lines, - enable_history_search=enable_history_search, - search_ignore_case=search_ignore_case, - complete_while_typing=complete_while_typing, - validate_while_typing=validate_while_typing, - complete_style=complete_style, - auto_suggest=auto_suggest, - validator=validator, - clipboard=clipboard, - mouse_support=mouse_support, - input_processors=input_processors, - placeholder=placeholder, - reserve_space_for_menu=reserve_space_for_menu, - enable_system_prompt=enable_system_prompt, - enable_suspend=enable_suspend, - enable_open_in_editor=enable_open_in_editor, - tempfile_suffix=tempfile_suffix, - tempfile=tempfile, - show_frame=show_frame, - default=default, - accept_default=accept_default, - pre_run=pre_run, - set_exception_handler=set_exception_handler, - handle_sigint=handle_sigint, - in_thread=in_thread, - inputhook=inputhook, - ) - - -prompt.__doc__ = PromptSession.prompt.__doc__ - - -def create_confirm_session( - message: AnyFormattedText, suffix: str = " (y/n) " -) -> PromptSession[bool]: - """ - Create a `PromptSession` object for the 'confirm' function. - """ - bindings = KeyBindings() - - @bindings.add("y") - @bindings.add("Y") - def yes(event: E) -> None: - session.default_buffer.text = "y" - event.app.exit(result=True) - - @bindings.add("n") - @bindings.add("N") - def no(event: E) -> None: - session.default_buffer.text = "n" - event.app.exit(result=False) - - @bindings.add(Keys.Any) - def _(event: E) -> None: - "Disallow inserting other text." - pass - - complete_message = merge_formatted_text([message, suffix]) - session: PromptSession[bool] = PromptSession( - complete_message, key_bindings=bindings - ) - return session - - -def confirm(message: AnyFormattedText = "Confirm?", suffix: str = " (y/n) ") -> bool: - """ - Display a confirmation prompt that returns True/False. - """ - session = create_confirm_session(message, suffix) - return session.prompt() diff --git a/voxvera/vendor/prompt_toolkit/shortcuts/utils.py b/voxvera/vendor/prompt_toolkit/shortcuts/utils.py deleted file mode 100644 index abf4fd2..0000000 --- a/voxvera/vendor/prompt_toolkit/shortcuts/utils.py +++ /dev/null @@ -1,239 +0,0 @@ -from __future__ import annotations - -from asyncio.events import AbstractEventLoop -from typing import TYPE_CHECKING, Any, TextIO - -from prompt_toolkit.application import Application -from prompt_toolkit.application.current import get_app_or_none, get_app_session -from prompt_toolkit.application.run_in_terminal import run_in_terminal -from prompt_toolkit.formatted_text import ( - FormattedText, - StyleAndTextTuples, - to_formatted_text, -) -from prompt_toolkit.input import DummyInput -from prompt_toolkit.layout import Layout -from prompt_toolkit.output import ColorDepth, Output -from prompt_toolkit.output.defaults import create_output -from prompt_toolkit.renderer import ( - print_formatted_text as renderer_print_formatted_text, -) -from prompt_toolkit.styles import ( - BaseStyle, - StyleTransformation, - default_pygments_style, - default_ui_style, - merge_styles, -) - -if TYPE_CHECKING: - from prompt_toolkit.layout.containers import AnyContainer - -__all__ = [ - "print_formatted_text", - "print_container", - "clear", - "set_title", - "clear_title", -] - - -def print_formatted_text( - *values: Any, - sep: str = " ", - end: str = "\n", - file: TextIO | None = None, - flush: bool = False, - style: BaseStyle | None = None, - output: Output | None = None, - color_depth: ColorDepth | None = None, - style_transformation: StyleTransformation | None = None, - include_default_pygments_style: bool = True, -) -> None: - """ - :: - - print_formatted_text(*values, sep=' ', end='\\n', file=None, flush=False, style=None, output=None) - - Print text to stdout. This is supposed to be compatible with Python's print - function, but supports printing of formatted text. You can pass a - :class:`~prompt_toolkit.formatted_text.FormattedText`, - :class:`~prompt_toolkit.formatted_text.HTML` or - :class:`~prompt_toolkit.formatted_text.ANSI` object to print formatted - text. - - * Print HTML as follows:: - - print_formatted_text(HTML('Some italic text This is red!')) - - style = Style.from_dict({ - 'hello': '#ff0066', - 'world': '#884444 italic', - }) - print_formatted_text(HTML('Hello world!'), style=style) - - * Print a list of (style_str, text) tuples in the given style to the - output. E.g.:: - - style = Style.from_dict({ - 'hello': '#ff0066', - 'world': '#884444 italic', - }) - fragments = FormattedText([ - ('class:hello', 'Hello'), - ('class:world', 'World'), - ]) - print_formatted_text(fragments, style=style) - - If you want to print a list of Pygments tokens, wrap it in - :class:`~prompt_toolkit.formatted_text.PygmentsTokens` to do the - conversion. - - If a prompt_toolkit `Application` is currently running, this will always - print above the application or prompt (similar to `patch_stdout`). So, - `print_formatted_text` will erase the current application, print the text, - and render the application again. - - :param values: Any kind of printable object, or formatted string. - :param sep: String inserted between values, default a space. - :param end: String appended after the last value, default a newline. - :param style: :class:`.Style` instance for the color scheme. - :param include_default_pygments_style: `bool`. Include the default Pygments - style when set to `True` (the default). - """ - assert not (output and file) - - # Create Output object. - if output is None: - if file: - output = create_output(stdout=file) - else: - output = get_app_session().output - - assert isinstance(output, Output) - - # Get color depth. - color_depth = color_depth or output.get_default_color_depth() - - # Merges values. - def to_text(val: Any) -> StyleAndTextTuples: - # Normal lists which are not instances of `FormattedText` are - # considered plain text. - if isinstance(val, list) and not isinstance(val, FormattedText): - return to_formatted_text(f"{val}") - return to_formatted_text(val, auto_convert=True) - - fragments = [] - for i, value in enumerate(values): - fragments.extend(to_text(value)) - - if sep and i != len(values) - 1: - fragments.extend(to_text(sep)) - - fragments.extend(to_text(end)) - - # Print output. - def render() -> None: - assert isinstance(output, Output) - - renderer_print_formatted_text( - output, - fragments, - _create_merged_style( - style, include_default_pygments_style=include_default_pygments_style - ), - color_depth=color_depth, - style_transformation=style_transformation, - ) - - # Flush the output stream. - if flush: - output.flush() - - # If an application is running, print above the app. This does not require - # `patch_stdout`. - loop: AbstractEventLoop | None = None - - app = get_app_or_none() - if app is not None: - loop = app.loop - - if loop is not None: - loop.call_soon_threadsafe(lambda: run_in_terminal(render)) - else: - render() - - -def print_container( - container: AnyContainer, - file: TextIO | None = None, - style: BaseStyle | None = None, - include_default_pygments_style: bool = True, -) -> None: - """ - Print any layout to the output in a non-interactive way. - - Example usage:: - - from prompt_toolkit.widgets import Frame, TextArea - print_container( - Frame(TextArea(text='Hello world!'))) - """ - if file: - output = create_output(stdout=file) - else: - output = get_app_session().output - - app: Application[None] = Application( - layout=Layout(container=container), - output=output, - # `DummyInput` will cause the application to terminate immediately. - input=DummyInput(), - style=_create_merged_style( - style, include_default_pygments_style=include_default_pygments_style - ), - ) - try: - app.run(in_thread=True) - except EOFError: - pass - - -def _create_merged_style( - style: BaseStyle | None, include_default_pygments_style: bool -) -> BaseStyle: - """ - Merge user defined style with built-in style. - """ - styles = [default_ui_style()] - if include_default_pygments_style: - styles.append(default_pygments_style()) - if style: - styles.append(style) - - return merge_styles(styles) - - -def clear() -> None: - """ - Clear the screen. - """ - output = get_app_session().output - output.erase_screen() - output.cursor_goto(0, 0) - output.flush() - - -def set_title(text: str) -> None: - """ - Set the terminal title. - """ - output = get_app_session().output - output.set_title(text) - - -def clear_title() -> None: - """ - Erase the current title. - """ - set_title("") diff --git a/voxvera/vendor/prompt_toolkit/styles/__init__.py b/voxvera/vendor/prompt_toolkit/styles/__init__.py deleted file mode 100644 index 39e97ca..0000000 --- a/voxvera/vendor/prompt_toolkit/styles/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -""" -Styling for prompt_toolkit applications. -""" - -from __future__ import annotations - -from .base import ( - ANSI_COLOR_NAMES, - DEFAULT_ATTRS, - Attrs, - BaseStyle, - DummyStyle, - DynamicStyle, -) -from .defaults import default_pygments_style, default_ui_style -from .named_colors import NAMED_COLORS -from .pygments import ( - pygments_token_to_classname, - style_from_pygments_cls, - style_from_pygments_dict, -) -from .style import Priority, Style, merge_styles, parse_color -from .style_transformation import ( - AdjustBrightnessStyleTransformation, - ConditionalStyleTransformation, - DummyStyleTransformation, - DynamicStyleTransformation, - ReverseStyleTransformation, - SetDefaultColorStyleTransformation, - StyleTransformation, - SwapLightAndDarkStyleTransformation, - merge_style_transformations, -) - -__all__ = [ - # Base. - "Attrs", - "DEFAULT_ATTRS", - "ANSI_COLOR_NAMES", - "BaseStyle", - "DummyStyle", - "DynamicStyle", - # Defaults. - "default_ui_style", - "default_pygments_style", - # Style. - "Style", - "Priority", - "merge_styles", - "parse_color", - # Style transformation. - "StyleTransformation", - "SwapLightAndDarkStyleTransformation", - "ReverseStyleTransformation", - "SetDefaultColorStyleTransformation", - "AdjustBrightnessStyleTransformation", - "DummyStyleTransformation", - "ConditionalStyleTransformation", - "DynamicStyleTransformation", - "merge_style_transformations", - # Pygments. - "style_from_pygments_cls", - "style_from_pygments_dict", - "pygments_token_to_classname", - # Named colors. - "NAMED_COLORS", -] diff --git a/voxvera/vendor/prompt_toolkit/styles/base.py b/voxvera/vendor/prompt_toolkit/styles/base.py deleted file mode 100644 index 1e04467..0000000 --- a/voxvera/vendor/prompt_toolkit/styles/base.py +++ /dev/null @@ -1,188 +0,0 @@ -""" -The base classes for the styling. -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import Callable, Hashable, NamedTuple - -__all__ = [ - "Attrs", - "DEFAULT_ATTRS", - "ANSI_COLOR_NAMES", - "ANSI_COLOR_NAMES_ALIASES", - "BaseStyle", - "DummyStyle", - "DynamicStyle", -] - - -#: Style attributes. -class Attrs(NamedTuple): - color: str | None - bgcolor: str | None - bold: bool | None - underline: bool | None - strike: bool | None - italic: bool | None - blink: bool | None - reverse: bool | None - hidden: bool | None - dim: bool | None - - -""" -:param color: Hexadecimal string. E.g. '000000' or Ansi color name: e.g. 'ansiblue' -:param bgcolor: Hexadecimal string. E.g. 'ffffff' or Ansi color name: e.g. 'ansired' -:param bold: Boolean -:param underline: Boolean -:param strike: Boolean -:param italic: Boolean -:param blink: Boolean -:param reverse: Boolean -:param hidden: Boolean -:param dim: Boolean -""" - -#: The default `Attrs`. -DEFAULT_ATTRS = Attrs( - color="", - bgcolor="", - bold=False, - underline=False, - strike=False, - italic=False, - blink=False, - reverse=False, - hidden=False, - dim=False, -) - - -#: ``Attrs.bgcolor/fgcolor`` can be in either 'ffffff' format, or can be any of -#: the following in case we want to take colors from the 8/16 color palette. -#: Usually, in that case, the terminal application allows to configure the RGB -#: values for these names. -#: ISO 6429 colors -ANSI_COLOR_NAMES = [ - "ansidefault", - # Low intensity, dark. (One or two components 0x80, the other 0x00.) - "ansiblack", - "ansired", - "ansigreen", - "ansiyellow", - "ansiblue", - "ansimagenta", - "ansicyan", - "ansigray", - # High intensity, bright. (One or two components 0xff, the other 0x00. Not supported everywhere.) - "ansibrightblack", - "ansibrightred", - "ansibrightgreen", - "ansibrightyellow", - "ansibrightblue", - "ansibrightmagenta", - "ansibrightcyan", - "ansiwhite", -] - - -# People don't use the same ANSI color names everywhere. In prompt_toolkit 1.0 -# we used some unconventional names (which were contributed like that to -# Pygments). This is fixed now, but we still support the old names. - -# The table below maps the old aliases to the current names. -ANSI_COLOR_NAMES_ALIASES: dict[str, str] = { - "ansidarkgray": "ansibrightblack", - "ansiteal": "ansicyan", - "ansiturquoise": "ansibrightcyan", - "ansibrown": "ansiyellow", - "ansipurple": "ansimagenta", - "ansifuchsia": "ansibrightmagenta", - "ansilightgray": "ansigray", - "ansidarkred": "ansired", - "ansidarkgreen": "ansigreen", - "ansidarkblue": "ansiblue", -} -assert set(ANSI_COLOR_NAMES_ALIASES.values()).issubset(set(ANSI_COLOR_NAMES)) -assert not (set(ANSI_COLOR_NAMES_ALIASES.keys()) & set(ANSI_COLOR_NAMES)) - - -class BaseStyle(metaclass=ABCMeta): - """ - Abstract base class for prompt_toolkit styles. - """ - - @abstractmethod - def get_attrs_for_style_str( - self, style_str: str, default: Attrs = DEFAULT_ATTRS - ) -> Attrs: - """ - Return :class:`.Attrs` for the given style string. - - :param style_str: The style string. This can contain inline styling as - well as classnames (e.g. "class:title"). - :param default: `Attrs` to be used if no styling was defined. - """ - - @property - @abstractmethod - def style_rules(self) -> list[tuple[str, str]]: - """ - The list of style rules, used to create this style. - (Required for `DynamicStyle` and `_MergedStyle` to work.) - """ - return [] - - @abstractmethod - def invalidation_hash(self) -> Hashable: - """ - Invalidation hash for the style. When this changes over time, the - renderer knows that something in the style changed, and that everything - has to be redrawn. - """ - - -class DummyStyle(BaseStyle): - """ - A style that doesn't style anything. - """ - - def get_attrs_for_style_str( - self, style_str: str, default: Attrs = DEFAULT_ATTRS - ) -> Attrs: - return default - - def invalidation_hash(self) -> Hashable: - return 1 # Always the same value. - - @property - def style_rules(self) -> list[tuple[str, str]]: - return [] - - -class DynamicStyle(BaseStyle): - """ - Style class that can dynamically returns an other Style. - - :param get_style: Callable that returns a :class:`.Style` instance. - """ - - def __init__(self, get_style: Callable[[], BaseStyle | None]): - self.get_style = get_style - self._dummy = DummyStyle() - - def get_attrs_for_style_str( - self, style_str: str, default: Attrs = DEFAULT_ATTRS - ) -> Attrs: - style = self.get_style() or self._dummy - - return style.get_attrs_for_style_str(style_str, default) - - def invalidation_hash(self) -> Hashable: - return (self.get_style() or self._dummy).invalidation_hash() - - @property - def style_rules(self) -> list[tuple[str, str]]: - return (self.get_style() or self._dummy).style_rules diff --git a/voxvera/vendor/prompt_toolkit/styles/defaults.py b/voxvera/vendor/prompt_toolkit/styles/defaults.py deleted file mode 100644 index 2faba94..0000000 --- a/voxvera/vendor/prompt_toolkit/styles/defaults.py +++ /dev/null @@ -1,236 +0,0 @@ -""" -The default styling. -""" - -from __future__ import annotations - -from prompt_toolkit.cache import memoized - -from .base import ANSI_COLOR_NAMES, BaseStyle -from .named_colors import NAMED_COLORS -from .style import Style, merge_styles - -__all__ = [ - "default_ui_style", - "default_pygments_style", -] - -#: Default styling. Mapping from classnames to their style definition. -PROMPT_TOOLKIT_STYLE = [ - # Highlighting of search matches in document. - ("search", "bg:ansibrightyellow ansiblack"), - ("search.current", ""), - # Incremental search. - ("incsearch", ""), - ("incsearch.current", "reverse"), - # Highlighting of select text in document. - ("selected", "reverse"), - ("cursor-column", "bg:#dddddd"), - ("cursor-line", "underline"), - ("color-column", "bg:#ccaacc"), - # Highlighting of matching brackets. - ("matching-bracket", ""), - ("matching-bracket.other", "#000000 bg:#aacccc"), - ("matching-bracket.cursor", "#ff8888 bg:#880000"), - # Styling of other cursors, in case of block editing. - ("multiple-cursors", "#000000 bg:#ccccaa"), - # Line numbers. - ("line-number", "#888888"), - ("line-number.current", "bold"), - ("tilde", "#8888ff"), - # Default prompt. - ("prompt", ""), - ("prompt.arg", "noinherit"), - ("prompt.arg.text", ""), - ("prompt.search", "noinherit"), - ("prompt.search.text", ""), - # Search toolbar. - ("search-toolbar", "bold"), - ("search-toolbar.text", "nobold"), - # System toolbar - ("system-toolbar", "bold"), - ("system-toolbar.text", "nobold"), - # "arg" toolbar. - ("arg-toolbar", "bold"), - ("arg-toolbar.text", "nobold"), - # Validation toolbar. - ("validation-toolbar", "bg:#550000 #ffffff"), - ("window-too-small", "bg:#550000 #ffffff"), - # Completions toolbar. - ("completion-toolbar", "bg:#bbbbbb #000000"), - ("completion-toolbar.arrow", "bg:#bbbbbb #000000 bold"), - ("completion-toolbar.completion", "bg:#bbbbbb #000000"), - ("completion-toolbar.completion.current", "bg:#444444 #ffffff"), - # Completions menu. - ("completion-menu", "bg:#bbbbbb #000000"), - ("completion-menu.completion", ""), - # (Note: for the current completion, we use 'reverse' on top of fg/bg - # colors. This is to have proper rendering with NO_COLOR=1). - ("completion-menu.completion.current", "fg:#888888 bg:#ffffff reverse"), - ("completion-menu.meta.completion", "bg:#999999 #000000"), - ("completion-menu.meta.completion.current", "bg:#aaaaaa #000000"), - ("completion-menu.multi-column-meta", "bg:#aaaaaa #000000"), - # Fuzzy matches in completion menu (for FuzzyCompleter). - ("completion-menu.completion fuzzymatch.outside", "fg:#444444"), - ("completion-menu.completion fuzzymatch.inside", "bold"), - ("completion-menu.completion fuzzymatch.inside.character", "underline"), - ("completion-menu.completion.current fuzzymatch.outside", "fg:default"), - ("completion-menu.completion.current fuzzymatch.inside", "nobold"), - # Styling of readline-like completions. - ("readline-like-completions", ""), - ("readline-like-completions.completion", ""), - ("readline-like-completions.completion fuzzymatch.outside", "#888888"), - ("readline-like-completions.completion fuzzymatch.inside", ""), - ("readline-like-completions.completion fuzzymatch.inside.character", "underline"), - # Scrollbars. - ("scrollbar.background", "bg:#aaaaaa"), - ("scrollbar.button", "bg:#444444"), - ("scrollbar.arrow", "noinherit bold"), - # Start/end of scrollbars. Adding 'underline' here provides a nice little - # detail to the progress bar, but it doesn't look good on all terminals. - # ('scrollbar.start', 'underline #ffffff'), - # ('scrollbar.end', 'underline #000000'), - # Auto suggestion text. - ("auto-suggestion", "#666666"), - # Trailing whitespace and tabs. - ("trailing-whitespace", "#999999"), - ("tab", "#999999"), - # When Control-C/D has been pressed. Grayed. - ("aborting", "#888888 bg:default noreverse noitalic nounderline noblink"), - ("exiting", "#888888 bg:default noreverse noitalic nounderline noblink"), - # Entering a Vi digraph. - ("digraph", "#4444ff"), - # Control characters, like ^C, ^X. - ("control-character", "ansiblue"), - # Non-breaking space. - ("nbsp", "underline ansiyellow"), - # Default styling of HTML elements. - ("i", "italic"), - ("u", "underline"), - ("s", "strike"), - ("b", "bold"), - ("em", "italic"), - ("strong", "bold"), - ("del", "strike"), - ("hidden", "hidden"), - # It should be possible to use the style names in HTML. - # ... or .... - ("italic", "italic"), - ("underline", "underline"), - ("strike", "strike"), - ("bold", "bold"), - ("reverse", "reverse"), - ("noitalic", "noitalic"), - ("nounderline", "nounderline"), - ("nostrike", "nostrike"), - ("nobold", "nobold"), - ("noreverse", "noreverse"), - # Prompt bottom toolbar - ("bottom-toolbar", "reverse"), -] - - -# Style that will turn for instance the class 'red' into 'red'. -COLORS_STYLE = [(name, "fg:" + name) for name in ANSI_COLOR_NAMES] + [ - (name.lower(), "fg:" + name) for name in NAMED_COLORS -] - - -WIDGETS_STYLE = [ - # Dialog windows. - ("dialog", "bg:#4444ff"), - ("dialog.body", "bg:#ffffff #000000"), - ("dialog.body text-area", "bg:#cccccc"), - ("dialog.body text-area last-line", "underline"), - ("dialog frame.label", "#ff0000 bold"), - # Scrollbars in dialogs. - ("dialog.body scrollbar.background", ""), - ("dialog.body scrollbar.button", "bg:#000000"), - ("dialog.body scrollbar.arrow", ""), - ("dialog.body scrollbar.start", "nounderline"), - ("dialog.body scrollbar.end", "nounderline"), - # Buttons. - ("button", ""), - ("button.arrow", "bold"), - ("button.focused", "bg:#aa0000 #ffffff"), - # Menu bars. - ("menu-bar", "bg:#aaaaaa #000000"), - ("menu-bar.selected-item", "bg:#ffffff #000000"), - ("menu", "bg:#888888 #ffffff"), - ("menu.border", "#aaaaaa"), - ("menu.border shadow", "#444444"), - # Shadows. - ("dialog shadow", "bg:#000088"), - ("dialog.body shadow", "bg:#aaaaaa"), - ("progress-bar", "bg:#000088"), - ("progress-bar.used", "bg:#ff0000"), -] - - -# The default Pygments style, include this by default in case a Pygments lexer -# is used. -PYGMENTS_DEFAULT_STYLE = { - "pygments.whitespace": "#bbbbbb", - "pygments.comment": "italic #408080", - "pygments.comment.preproc": "noitalic #bc7a00", - "pygments.keyword": "bold #008000", - "pygments.keyword.pseudo": "nobold", - "pygments.keyword.type": "nobold #b00040", - "pygments.operator": "#666666", - "pygments.operator.word": "bold #aa22ff", - "pygments.name.builtin": "#008000", - "pygments.name.function": "#0000ff", - "pygments.name.class": "bold #0000ff", - "pygments.name.namespace": "bold #0000ff", - "pygments.name.exception": "bold #d2413a", - "pygments.name.variable": "#19177c", - "pygments.name.constant": "#880000", - "pygments.name.label": "#a0a000", - "pygments.name.entity": "bold #999999", - "pygments.name.attribute": "#7d9029", - "pygments.name.tag": "bold #008000", - "pygments.name.decorator": "#aa22ff", - # Note: In Pygments, Token.String is an alias for Token.Literal.String, - # and Token.Number as an alias for Token.Literal.Number. - "pygments.literal.string": "#ba2121", - "pygments.literal.string.doc": "italic", - "pygments.literal.string.interpol": "bold #bb6688", - "pygments.literal.string.escape": "bold #bb6622", - "pygments.literal.string.regex": "#bb6688", - "pygments.literal.string.symbol": "#19177c", - "pygments.literal.string.other": "#008000", - "pygments.literal.number": "#666666", - "pygments.generic.heading": "bold #000080", - "pygments.generic.subheading": "bold #800080", - "pygments.generic.deleted": "#a00000", - "pygments.generic.inserted": "#00a000", - "pygments.generic.error": "#ff0000", - "pygments.generic.emph": "italic", - "pygments.generic.strong": "bold", - "pygments.generic.prompt": "bold #000080", - "pygments.generic.output": "#888", - "pygments.generic.traceback": "#04d", - "pygments.error": "border:#ff0000", -} - - -@memoized() -def default_ui_style() -> BaseStyle: - """ - Create a default `Style` object. - """ - return merge_styles( - [ - Style(PROMPT_TOOLKIT_STYLE), - Style(COLORS_STYLE), - Style(WIDGETS_STYLE), - ] - ) - - -@memoized() -def default_pygments_style() -> Style: - """ - Create a `Style` object that contains the default Pygments style. - """ - return Style.from_dict(PYGMENTS_DEFAULT_STYLE) diff --git a/voxvera/vendor/prompt_toolkit/styles/named_colors.py b/voxvera/vendor/prompt_toolkit/styles/named_colors.py deleted file mode 100644 index b6290a4..0000000 --- a/voxvera/vendor/prompt_toolkit/styles/named_colors.py +++ /dev/null @@ -1,162 +0,0 @@ -""" -All modern web browsers support these 140 color names. -Taken from: https://www.w3schools.com/colors/colors_names.asp -""" - -from __future__ import annotations - -__all__ = [ - "NAMED_COLORS", -] - - -NAMED_COLORS: dict[str, str] = { - "AliceBlue": "#f0f8ff", - "AntiqueWhite": "#faebd7", - "Aqua": "#00ffff", - "Aquamarine": "#7fffd4", - "Azure": "#f0ffff", - "Beige": "#f5f5dc", - "Bisque": "#ffe4c4", - "Black": "#000000", - "BlanchedAlmond": "#ffebcd", - "Blue": "#0000ff", - "BlueViolet": "#8a2be2", - "Brown": "#a52a2a", - "BurlyWood": "#deb887", - "CadetBlue": "#5f9ea0", - "Chartreuse": "#7fff00", - "Chocolate": "#d2691e", - "Coral": "#ff7f50", - "CornflowerBlue": "#6495ed", - "Cornsilk": "#fff8dc", - "Crimson": "#dc143c", - "Cyan": "#00ffff", - "DarkBlue": "#00008b", - "DarkCyan": "#008b8b", - "DarkGoldenRod": "#b8860b", - "DarkGray": "#a9a9a9", - "DarkGreen": "#006400", - "DarkGrey": "#a9a9a9", - "DarkKhaki": "#bdb76b", - "DarkMagenta": "#8b008b", - "DarkOliveGreen": "#556b2f", - "DarkOrange": "#ff8c00", - "DarkOrchid": "#9932cc", - "DarkRed": "#8b0000", - "DarkSalmon": "#e9967a", - "DarkSeaGreen": "#8fbc8f", - "DarkSlateBlue": "#483d8b", - "DarkSlateGray": "#2f4f4f", - "DarkSlateGrey": "#2f4f4f", - "DarkTurquoise": "#00ced1", - "DarkViolet": "#9400d3", - "DeepPink": "#ff1493", - "DeepSkyBlue": "#00bfff", - "DimGray": "#696969", - "DimGrey": "#696969", - "DodgerBlue": "#1e90ff", - "FireBrick": "#b22222", - "FloralWhite": "#fffaf0", - "ForestGreen": "#228b22", - "Fuchsia": "#ff00ff", - "Gainsboro": "#dcdcdc", - "GhostWhite": "#f8f8ff", - "Gold": "#ffd700", - "GoldenRod": "#daa520", - "Gray": "#808080", - "Green": "#008000", - "GreenYellow": "#adff2f", - "Grey": "#808080", - "HoneyDew": "#f0fff0", - "HotPink": "#ff69b4", - "IndianRed": "#cd5c5c", - "Indigo": "#4b0082", - "Ivory": "#fffff0", - "Khaki": "#f0e68c", - "Lavender": "#e6e6fa", - "LavenderBlush": "#fff0f5", - "LawnGreen": "#7cfc00", - "LemonChiffon": "#fffacd", - "LightBlue": "#add8e6", - "LightCoral": "#f08080", - "LightCyan": "#e0ffff", - "LightGoldenRodYellow": "#fafad2", - "LightGray": "#d3d3d3", - "LightGreen": "#90ee90", - "LightGrey": "#d3d3d3", - "LightPink": "#ffb6c1", - "LightSalmon": "#ffa07a", - "LightSeaGreen": "#20b2aa", - "LightSkyBlue": "#87cefa", - "LightSlateGray": "#778899", - "LightSlateGrey": "#778899", - "LightSteelBlue": "#b0c4de", - "LightYellow": "#ffffe0", - "Lime": "#00ff00", - "LimeGreen": "#32cd32", - "Linen": "#faf0e6", - "Magenta": "#ff00ff", - "Maroon": "#800000", - "MediumAquaMarine": "#66cdaa", - "MediumBlue": "#0000cd", - "MediumOrchid": "#ba55d3", - "MediumPurple": "#9370db", - "MediumSeaGreen": "#3cb371", - "MediumSlateBlue": "#7b68ee", - "MediumSpringGreen": "#00fa9a", - "MediumTurquoise": "#48d1cc", - "MediumVioletRed": "#c71585", - "MidnightBlue": "#191970", - "MintCream": "#f5fffa", - "MistyRose": "#ffe4e1", - "Moccasin": "#ffe4b5", - "NavajoWhite": "#ffdead", - "Navy": "#000080", - "OldLace": "#fdf5e6", - "Olive": "#808000", - "OliveDrab": "#6b8e23", - "Orange": "#ffa500", - "OrangeRed": "#ff4500", - "Orchid": "#da70d6", - "PaleGoldenRod": "#eee8aa", - "PaleGreen": "#98fb98", - "PaleTurquoise": "#afeeee", - "PaleVioletRed": "#db7093", - "PapayaWhip": "#ffefd5", - "PeachPuff": "#ffdab9", - "Peru": "#cd853f", - "Pink": "#ffc0cb", - "Plum": "#dda0dd", - "PowderBlue": "#b0e0e6", - "Purple": "#800080", - "RebeccaPurple": "#663399", - "Red": "#ff0000", - "RosyBrown": "#bc8f8f", - "RoyalBlue": "#4169e1", - "SaddleBrown": "#8b4513", - "Salmon": "#fa8072", - "SandyBrown": "#f4a460", - "SeaGreen": "#2e8b57", - "SeaShell": "#fff5ee", - "Sienna": "#a0522d", - "Silver": "#c0c0c0", - "SkyBlue": "#87ceeb", - "SlateBlue": "#6a5acd", - "SlateGray": "#708090", - "SlateGrey": "#708090", - "Snow": "#fffafa", - "SpringGreen": "#00ff7f", - "SteelBlue": "#4682b4", - "Tan": "#d2b48c", - "Teal": "#008080", - "Thistle": "#d8bfd8", - "Tomato": "#ff6347", - "Turquoise": "#40e0d0", - "Violet": "#ee82ee", - "Wheat": "#f5deb3", - "White": "#ffffff", - "WhiteSmoke": "#f5f5f5", - "Yellow": "#ffff00", - "YellowGreen": "#9acd32", -} diff --git a/voxvera/vendor/prompt_toolkit/styles/pygments.py b/voxvera/vendor/prompt_toolkit/styles/pygments.py deleted file mode 100644 index c0f6031..0000000 --- a/voxvera/vendor/prompt_toolkit/styles/pygments.py +++ /dev/null @@ -1,70 +0,0 @@ -""" -Adaptor for building prompt_toolkit styles, starting from a Pygments style. - -Usage:: - - from pygments.styles.tango import TangoStyle - style = style_from_pygments_cls(pygments_style_cls=TangoStyle) -""" - -from __future__ import annotations - -from typing import TYPE_CHECKING - -from .style import Style - -if TYPE_CHECKING: - from pygments.style import Style as PygmentsStyle - from pygments.token import Token - - -__all__ = [ - "style_from_pygments_cls", - "style_from_pygments_dict", - "pygments_token_to_classname", -] - - -def style_from_pygments_cls(pygments_style_cls: type[PygmentsStyle]) -> Style: - """ - Shortcut to create a :class:`.Style` instance from a Pygments style class - and a style dictionary. - - Example:: - - from prompt_toolkit.styles.from_pygments import style_from_pygments_cls - from pygments.styles import get_style_by_name - style = style_from_pygments_cls(get_style_by_name('monokai')) - - :param pygments_style_cls: Pygments style class to start from. - """ - # Import inline. - from pygments.style import Style as PygmentsStyle - - assert issubclass(pygments_style_cls, PygmentsStyle) - - return style_from_pygments_dict(pygments_style_cls.styles) - - -def style_from_pygments_dict(pygments_dict: dict[Token, str]) -> Style: - """ - Create a :class:`.Style` instance from a Pygments style dictionary. - (One that maps Token objects to style strings.) - """ - pygments_style = [] - - for token, style in pygments_dict.items(): - pygments_style.append((pygments_token_to_classname(token), style)) - - return Style(pygments_style) - - -def pygments_token_to_classname(token: Token) -> str: - """ - Turn e.g. `Token.Name.Exception` into `'pygments.name.exception'`. - - (Our Pygments lexer will also turn the tokens that pygments produces in a - prompt_toolkit list of fragments that match these styling rules.) - """ - parts = ("pygments",) + token - return ".".join(parts).lower() diff --git a/voxvera/vendor/prompt_toolkit/styles/style.py b/voxvera/vendor/prompt_toolkit/styles/style.py deleted file mode 100644 index 8aab8e1..0000000 --- a/voxvera/vendor/prompt_toolkit/styles/style.py +++ /dev/null @@ -1,407 +0,0 @@ -""" -Tool for creating styles from a dictionary. -""" - -from __future__ import annotations - -import itertools -import re -from enum import Enum -from typing import Hashable, TypeVar - -from prompt_toolkit.cache import SimpleCache - -from .base import ( - ANSI_COLOR_NAMES, - ANSI_COLOR_NAMES_ALIASES, - DEFAULT_ATTRS, - Attrs, - BaseStyle, -) -from .named_colors import NAMED_COLORS - -__all__ = [ - "Style", - "parse_color", - "Priority", - "merge_styles", -] - -_named_colors_lowercase = {k.lower(): v.lstrip("#") for k, v in NAMED_COLORS.items()} - - -def parse_color(text: str) -> str: - """ - Parse/validate color format. - - Like in Pygments, but also support the ANSI color names. - (These will map to the colors of the 16 color palette.) - """ - # ANSI color names. - if text in ANSI_COLOR_NAMES: - return text - if text in ANSI_COLOR_NAMES_ALIASES: - return ANSI_COLOR_NAMES_ALIASES[text] - - # 140 named colors. - try: - # Replace by 'hex' value. - return _named_colors_lowercase[text.lower()] - except KeyError: - pass - - # Hex codes. - if text[0:1] == "#": - col = text[1:] - - # Keep this for backwards-compatibility (Pygments does it). - # I don't like the '#' prefix for named colors. - if col in ANSI_COLOR_NAMES: - return col - elif col in ANSI_COLOR_NAMES_ALIASES: - return ANSI_COLOR_NAMES_ALIASES[col] - - # 6 digit hex color. - elif len(col) == 6: - return col - - # 3 digit hex color. - elif len(col) == 3: - return col[0] * 2 + col[1] * 2 + col[2] * 2 - - # Default. - elif text in ("", "default"): - return text - - raise ValueError(f"Wrong color format {text!r}") - - -# Attributes, when they are not filled in by a style. None means that we take -# the value from the parent. -_EMPTY_ATTRS = Attrs( - color=None, - bgcolor=None, - bold=None, - underline=None, - strike=None, - italic=None, - blink=None, - reverse=None, - hidden=None, - dim=None, -) - - -def _expand_classname(classname: str) -> list[str]: - """ - Split a single class name at the `.` operator, and build a list of classes. - - E.g. 'a.b.c' becomes ['a', 'a.b', 'a.b.c'] - """ - result = [] - parts = classname.split(".") - - for i in range(1, len(parts) + 1): - result.append(".".join(parts[:i]).lower()) - - return result - - -def _parse_style_str(style_str: str) -> Attrs: - """ - Take a style string, e.g. 'bg:red #88ff00 class:title' - and return a `Attrs` instance. - """ - # Start from default Attrs. - if "noinherit" in style_str: - attrs = DEFAULT_ATTRS - else: - attrs = _EMPTY_ATTRS - - # Now update with the given attributes. - for part in style_str.split(): - if part == "noinherit": - pass - elif part == "bold": - attrs = attrs._replace(bold=True) - elif part == "nobold": - attrs = attrs._replace(bold=False) - elif part == "italic": - attrs = attrs._replace(italic=True) - elif part == "noitalic": - attrs = attrs._replace(italic=False) - elif part == "underline": - attrs = attrs._replace(underline=True) - elif part == "nounderline": - attrs = attrs._replace(underline=False) - elif part == "strike": - attrs = attrs._replace(strike=True) - elif part == "nostrike": - attrs = attrs._replace(strike=False) - - # prompt_toolkit extensions. Not in Pygments. - elif part == "blink": - attrs = attrs._replace(blink=True) - elif part == "noblink": - attrs = attrs._replace(blink=False) - elif part == "reverse": - attrs = attrs._replace(reverse=True) - elif part == "noreverse": - attrs = attrs._replace(reverse=False) - elif part == "hidden": - attrs = attrs._replace(hidden=True) - elif part == "nohidden": - attrs = attrs._replace(hidden=False) - elif part == "dim": - attrs = attrs._replace(dim=True) - elif part == "nodim": - attrs = attrs._replace(dim=False) - - # Pygments properties that we ignore. - elif part in ("roman", "sans", "mono"): - pass - elif part.startswith("border:"): - pass - - # Ignore pieces in between square brackets. This is internal stuff. - # Like '[transparent]' or '[set-cursor-position]'. - elif part.startswith("[") and part.endswith("]"): - pass - - # Colors. - elif part.startswith("bg:"): - attrs = attrs._replace(bgcolor=parse_color(part[3:])) - elif part.startswith("fg:"): # The 'fg:' prefix is optional. - attrs = attrs._replace(color=parse_color(part[3:])) - else: - attrs = attrs._replace(color=parse_color(part)) - - return attrs - - -CLASS_NAMES_RE = re.compile(r"^[a-z0-9.\s_-]*$") # This one can't contain a comma! - - -class Priority(Enum): - """ - The priority of the rules, when a style is created from a dictionary. - - In a `Style`, rules that are defined later will always override previous - defined rules, however in a dictionary, the key order was arbitrary before - Python 3.6. This means that the style could change at random between rules. - - We have two options: - - - `DICT_KEY_ORDER`: This means, iterate through the dictionary, and take - the key/value pairs in order as they come. This is a good option if you - have Python >3.6. Rules at the end will override rules at the beginning. - - `MOST_PRECISE`: keys that are defined with most precision will get higher - priority. (More precise means: more elements.) - """ - - DICT_KEY_ORDER = "KEY_ORDER" - MOST_PRECISE = "MOST_PRECISE" - - -# We don't support Python versions older than 3.6 anymore, so we can always -# depend on dictionary ordering. This is the default. -default_priority = Priority.DICT_KEY_ORDER - - -class Style(BaseStyle): - """ - Create a ``Style`` instance from a list of style rules. - - The `style_rules` is supposed to be a list of ('classnames', 'style') tuples. - The classnames are a whitespace separated string of class names and the - style string is just like a Pygments style definition, but with a few - additions: it supports 'reverse' and 'blink'. - - Later rules always override previous rules. - - Usage:: - - Style([ - ('title', '#ff0000 bold underline'), - ('something-else', 'reverse'), - ('class1 class2', 'reverse'), - ]) - - The ``from_dict`` classmethod is similar, but takes a dictionary as input. - """ - - def __init__(self, style_rules: list[tuple[str, str]]) -> None: - class_names_and_attrs = [] - - # Loop through the rules in the order they were defined. - # Rules that are defined later get priority. - for class_names, style_str in style_rules: - assert CLASS_NAMES_RE.match(class_names), repr(class_names) - - # The order of the class names doesn't matter. - # (But the order of rules does matter.) - class_names_set = frozenset(class_names.lower().split()) - attrs = _parse_style_str(style_str) - - class_names_and_attrs.append((class_names_set, attrs)) - - self._style_rules = style_rules - self.class_names_and_attrs = class_names_and_attrs - - @property - def style_rules(self) -> list[tuple[str, str]]: - return self._style_rules - - @classmethod - def from_dict( - cls, style_dict: dict[str, str], priority: Priority = default_priority - ) -> Style: - """ - :param style_dict: Style dictionary. - :param priority: `Priority` value. - """ - if priority == Priority.MOST_PRECISE: - - def key(item: tuple[str, str]) -> int: - # Split on '.' and whitespace. Count elements. - return sum(len(i.split(".")) for i in item[0].split()) - - return cls(sorted(style_dict.items(), key=key)) - else: - return cls(list(style_dict.items())) - - def get_attrs_for_style_str( - self, style_str: str, default: Attrs = DEFAULT_ATTRS - ) -> Attrs: - """ - Get `Attrs` for the given style string. - """ - list_of_attrs = [default] - class_names: set[str] = set() - - # Apply default styling. - for names, attr in self.class_names_and_attrs: - if not names: - list_of_attrs.append(attr) - - # Go from left to right through the style string. Things on the right - # take precedence. - for part in style_str.split(): - # This part represents a class. - # Do lookup of this class name in the style definition, as well - # as all class combinations that we have so far. - if part.startswith("class:"): - # Expand all class names (comma separated list). - new_class_names = [] - for p in part[6:].lower().split(","): - new_class_names.extend(_expand_classname(p)) - - for new_name in new_class_names: - # Build a set of all possible class combinations to be applied. - combos = set() - combos.add(frozenset([new_name])) - - for count in range(1, len(class_names) + 1): - for c2 in itertools.combinations(class_names, count): - combos.add(frozenset(c2 + (new_name,))) - - # Apply the styles that match these class names. - for names, attr in self.class_names_and_attrs: - if names in combos: - list_of_attrs.append(attr) - - class_names.add(new_name) - - # Process inline style. - else: - inline_attrs = _parse_style_str(part) - list_of_attrs.append(inline_attrs) - - return _merge_attrs(list_of_attrs) - - def invalidation_hash(self) -> Hashable: - return id(self.class_names_and_attrs) - - -_T = TypeVar("_T") - - -def _merge_attrs(list_of_attrs: list[Attrs]) -> Attrs: - """ - Take a list of :class:`.Attrs` instances and merge them into one. - Every `Attr` in the list can override the styling of the previous one. So, - the last one has highest priority. - """ - - def _or(*values: _T) -> _T: - "Take first not-None value, starting at the end." - for v in values[::-1]: - if v is not None: - return v - raise ValueError # Should not happen, there's always one non-null value. - - return Attrs( - color=_or("", *[a.color for a in list_of_attrs]), - bgcolor=_or("", *[a.bgcolor for a in list_of_attrs]), - bold=_or(False, *[a.bold for a in list_of_attrs]), - underline=_or(False, *[a.underline for a in list_of_attrs]), - strike=_or(False, *[a.strike for a in list_of_attrs]), - italic=_or(False, *[a.italic for a in list_of_attrs]), - blink=_or(False, *[a.blink for a in list_of_attrs]), - reverse=_or(False, *[a.reverse for a in list_of_attrs]), - hidden=_or(False, *[a.hidden for a in list_of_attrs]), - dim=_or(False, *[a.dim for a in list_of_attrs]), - ) - - -def merge_styles(styles: list[BaseStyle]) -> _MergedStyle: - """ - Merge multiple `Style` objects. - """ - styles = [s for s in styles if s is not None] - return _MergedStyle(styles) - - -class _MergedStyle(BaseStyle): - """ - Merge multiple `Style` objects into one. - This is supposed to ensure consistency: if any of the given styles changes, - then this style will be updated. - """ - - # NOTE: previously, we used an algorithm where we did not generate the - # combined style. Instead this was a proxy that called one style - # after the other, passing the outcome of the previous style as the - # default for the next one. This did not work, because that way, the - # priorities like described in the `Style` class don't work. - # 'class:aborted' was for instance never displayed in gray, because - # the next style specified a default color for any text. (The - # explicit styling of class:aborted should have taken priority, - # because it was more precise.) - def __init__(self, styles: list[BaseStyle]) -> None: - self.styles = styles - self._style: SimpleCache[Hashable, Style] = SimpleCache(maxsize=1) - - @property - def _merged_style(self) -> Style: - "The `Style` object that has the other styles merged together." - - def get() -> Style: - return Style(self.style_rules) - - return self._style.get(self.invalidation_hash(), get) - - @property - def style_rules(self) -> list[tuple[str, str]]: - style_rules = [] - for s in self.styles: - style_rules.extend(s.style_rules) - return style_rules - - def get_attrs_for_style_str( - self, style_str: str, default: Attrs = DEFAULT_ATTRS - ) -> Attrs: - return self._merged_style.get_attrs_for_style_str(style_str, default) - - def invalidation_hash(self) -> Hashable: - return tuple(s.invalidation_hash() for s in self.styles) diff --git a/voxvera/vendor/prompt_toolkit/styles/style_transformation.py b/voxvera/vendor/prompt_toolkit/styles/style_transformation.py deleted file mode 100644 index e8d5b0a..0000000 --- a/voxvera/vendor/prompt_toolkit/styles/style_transformation.py +++ /dev/null @@ -1,374 +0,0 @@ -""" -Collection of style transformations. - -Think of it as a kind of color post processing after the rendering is done. -This could be used for instance to change the contrast/saturation; swap light -and dark colors or even change certain colors for other colors. - -When the UI is rendered, these transformations can be applied right after the -style strings are turned into `Attrs` objects that represent the actual -formatting. -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from colorsys import hls_to_rgb, rgb_to_hls -from typing import Callable, Hashable, Sequence - -from prompt_toolkit.cache import memoized -from prompt_toolkit.filters import FilterOrBool, to_filter -from prompt_toolkit.utils import AnyFloat, to_float, to_str - -from .base import ANSI_COLOR_NAMES, Attrs -from .style import parse_color - -__all__ = [ - "StyleTransformation", - "SwapLightAndDarkStyleTransformation", - "ReverseStyleTransformation", - "SetDefaultColorStyleTransformation", - "AdjustBrightnessStyleTransformation", - "DummyStyleTransformation", - "ConditionalStyleTransformation", - "DynamicStyleTransformation", - "merge_style_transformations", -] - - -class StyleTransformation(metaclass=ABCMeta): - """ - Base class for any style transformation. - """ - - @abstractmethod - def transform_attrs(self, attrs: Attrs) -> Attrs: - """ - Take an `Attrs` object and return a new `Attrs` object. - - Remember that the color formats can be either "ansi..." or a 6 digit - lowercase hexadecimal color (without '#' prefix). - """ - - def invalidation_hash(self) -> Hashable: - """ - When this changes, the cache should be invalidated. - """ - return f"{self.__class__.__name__}-{id(self)}" - - -class SwapLightAndDarkStyleTransformation(StyleTransformation): - """ - Turn dark colors into light colors and the other way around. - - This is meant to make color schemes that work on a dark background usable - on a light background (and the other way around). - - Notice that this doesn't swap foreground and background like "reverse" - does. It turns light green into dark green and the other way around. - Foreground and background colors are considered individually. - - Also notice that when is used somewhere and no colors are given - in particular (like what is the default for the bottom toolbar), then this - doesn't change anything. This is what makes sense, because when the - 'default' color is chosen, it's what works best for the terminal, and - reverse works good with that. - """ - - def transform_attrs(self, attrs: Attrs) -> Attrs: - """ - Return the `Attrs` used when opposite luminosity should be used. - """ - # Reverse colors. - attrs = attrs._replace(color=get_opposite_color(attrs.color)) - attrs = attrs._replace(bgcolor=get_opposite_color(attrs.bgcolor)) - - return attrs - - -class ReverseStyleTransformation(StyleTransformation): - """ - Swap the 'reverse' attribute. - - (This is still experimental.) - """ - - def transform_attrs(self, attrs: Attrs) -> Attrs: - return attrs._replace(reverse=not attrs.reverse) - - -class SetDefaultColorStyleTransformation(StyleTransformation): - """ - Set default foreground/background color for output that doesn't specify - anything. This is useful for overriding the terminal default colors. - - :param fg: Color string or callable that returns a color string for the - foreground. - :param bg: Like `fg`, but for the background. - """ - - def __init__( - self, fg: str | Callable[[], str], bg: str | Callable[[], str] - ) -> None: - self.fg = fg - self.bg = bg - - def transform_attrs(self, attrs: Attrs) -> Attrs: - if attrs.bgcolor in ("", "default"): - attrs = attrs._replace(bgcolor=parse_color(to_str(self.bg))) - - if attrs.color in ("", "default"): - attrs = attrs._replace(color=parse_color(to_str(self.fg))) - - return attrs - - def invalidation_hash(self) -> Hashable: - return ( - "set-default-color", - to_str(self.fg), - to_str(self.bg), - ) - - -class AdjustBrightnessStyleTransformation(StyleTransformation): - """ - Adjust the brightness to improve the rendering on either dark or light - backgrounds. - - For dark backgrounds, it's best to increase `min_brightness`. For light - backgrounds it's best to decrease `max_brightness`. Usually, only one - setting is adjusted. - - This will only change the brightness for text that has a foreground color - defined, but no background color. It works best for 256 or true color - output. - - .. note:: Notice that there is no universal way to detect whether the - application is running in a light or dark terminal. As a - developer of an command line application, you'll have to make - this configurable for the user. - - :param min_brightness: Float between 0.0 and 1.0 or a callable that returns - a float. - :param max_brightness: Float between 0.0 and 1.0 or a callable that returns - a float. - """ - - def __init__( - self, min_brightness: AnyFloat = 0.0, max_brightness: AnyFloat = 1.0 - ) -> None: - self.min_brightness = min_brightness - self.max_brightness = max_brightness - - def transform_attrs(self, attrs: Attrs) -> Attrs: - min_brightness = to_float(self.min_brightness) - max_brightness = to_float(self.max_brightness) - assert 0 <= min_brightness <= 1 - assert 0 <= max_brightness <= 1 - - # Don't do anything if the whole brightness range is acceptable. - # This also avoids turning ansi colors into RGB sequences. - if min_brightness == 0.0 and max_brightness == 1.0: - return attrs - - # If a foreground color is given without a background color. - no_background = not attrs.bgcolor or attrs.bgcolor == "default" - has_fgcolor = attrs.color and attrs.color != "ansidefault" - - if has_fgcolor and no_background: - # Calculate new RGB values. - r, g, b = self._color_to_rgb(attrs.color or "") - hue, brightness, saturation = rgb_to_hls(r, g, b) - brightness = self._interpolate_brightness( - brightness, min_brightness, max_brightness - ) - r, g, b = hls_to_rgb(hue, brightness, saturation) - new_color = f"{int(r * 255):02x}{int(g * 255):02x}{int(b * 255):02x}" - - attrs = attrs._replace(color=new_color) - - return attrs - - def _color_to_rgb(self, color: str) -> tuple[float, float, float]: - """ - Parse `style.Attrs` color into RGB tuple. - """ - # Do RGB lookup for ANSI colors. - try: - from prompt_toolkit.output.vt100 import ANSI_COLORS_TO_RGB - - r, g, b = ANSI_COLORS_TO_RGB[color] - return r / 255.0, g / 255.0, b / 255.0 - except KeyError: - pass - - # Parse RRGGBB format. - return ( - int(color[0:2], 16) / 255.0, - int(color[2:4], 16) / 255.0, - int(color[4:6], 16) / 255.0, - ) - - # NOTE: we don't have to support named colors here. They are already - # transformed into RGB values in `style.parse_color`. - - def _interpolate_brightness( - self, value: float, min_brightness: float, max_brightness: float - ) -> float: - """ - Map the brightness to the (min_brightness..max_brightness) range. - """ - return min_brightness + (max_brightness - min_brightness) * value - - def invalidation_hash(self) -> Hashable: - return ( - "adjust-brightness", - to_float(self.min_brightness), - to_float(self.max_brightness), - ) - - -class DummyStyleTransformation(StyleTransformation): - """ - Don't transform anything at all. - """ - - def transform_attrs(self, attrs: Attrs) -> Attrs: - return attrs - - def invalidation_hash(self) -> Hashable: - # Always return the same hash for these dummy instances. - return "dummy-style-transformation" - - -class DynamicStyleTransformation(StyleTransformation): - """ - StyleTransformation class that can dynamically returns any - `StyleTransformation`. - - :param get_style_transformation: Callable that returns a - :class:`.StyleTransformation` instance. - """ - - def __init__( - self, get_style_transformation: Callable[[], StyleTransformation | None] - ) -> None: - self.get_style_transformation = get_style_transformation - - def transform_attrs(self, attrs: Attrs) -> Attrs: - style_transformation = ( - self.get_style_transformation() or DummyStyleTransformation() - ) - return style_transformation.transform_attrs(attrs) - - def invalidation_hash(self) -> Hashable: - style_transformation = ( - self.get_style_transformation() or DummyStyleTransformation() - ) - return style_transformation.invalidation_hash() - - -class ConditionalStyleTransformation(StyleTransformation): - """ - Apply the style transformation depending on a condition. - """ - - def __init__( - self, style_transformation: StyleTransformation, filter: FilterOrBool - ) -> None: - self.style_transformation = style_transformation - self.filter = to_filter(filter) - - def transform_attrs(self, attrs: Attrs) -> Attrs: - if self.filter(): - return self.style_transformation.transform_attrs(attrs) - return attrs - - def invalidation_hash(self) -> Hashable: - return (self.filter(), self.style_transformation.invalidation_hash()) - - -class _MergedStyleTransformation(StyleTransformation): - def __init__(self, style_transformations: Sequence[StyleTransformation]) -> None: - self.style_transformations = style_transformations - - def transform_attrs(self, attrs: Attrs) -> Attrs: - for transformation in self.style_transformations: - attrs = transformation.transform_attrs(attrs) - return attrs - - def invalidation_hash(self) -> Hashable: - return tuple(t.invalidation_hash() for t in self.style_transformations) - - -def merge_style_transformations( - style_transformations: Sequence[StyleTransformation], -) -> StyleTransformation: - """ - Merge multiple transformations together. - """ - return _MergedStyleTransformation(style_transformations) - - -# Dictionary that maps ANSI color names to their opposite. This is useful for -# turning color schemes that are optimized for a black background usable for a -# white background. -OPPOSITE_ANSI_COLOR_NAMES = { - "ansidefault": "ansidefault", - "ansiblack": "ansiwhite", - "ansired": "ansibrightred", - "ansigreen": "ansibrightgreen", - "ansiyellow": "ansibrightyellow", - "ansiblue": "ansibrightblue", - "ansimagenta": "ansibrightmagenta", - "ansicyan": "ansibrightcyan", - "ansigray": "ansibrightblack", - "ansiwhite": "ansiblack", - "ansibrightred": "ansired", - "ansibrightgreen": "ansigreen", - "ansibrightyellow": "ansiyellow", - "ansibrightblue": "ansiblue", - "ansibrightmagenta": "ansimagenta", - "ansibrightcyan": "ansicyan", - "ansibrightblack": "ansigray", -} -assert set(OPPOSITE_ANSI_COLOR_NAMES.keys()) == set(ANSI_COLOR_NAMES) -assert set(OPPOSITE_ANSI_COLOR_NAMES.values()) == set(ANSI_COLOR_NAMES) - - -@memoized() -def get_opposite_color(colorname: str | None) -> str | None: - """ - Take a color name in either 'ansi...' format or 6 digit RGB, return the - color of opposite luminosity (same hue/saturation). - - This is used for turning color schemes that work on a light background - usable on a dark background. - """ - if colorname is None: # Because color/bgcolor can be None in `Attrs`. - return None - - # Special values. - if colorname in ("", "default"): - return colorname - - # Try ANSI color names. - try: - return OPPOSITE_ANSI_COLOR_NAMES[colorname] - except KeyError: - # Try 6 digit RGB colors. - r = int(colorname[:2], 16) / 255.0 - g = int(colorname[2:4], 16) / 255.0 - b = int(colorname[4:6], 16) / 255.0 - - h, l, s = rgb_to_hls(r, g, b) - - l = 1 - l - - r, g, b = hls_to_rgb(h, l, s) - - r = int(r * 255) - g = int(g * 255) - b = int(b * 255) - - return f"{r:02x}{g:02x}{b:02x}" diff --git a/voxvera/vendor/prompt_toolkit/token.py b/voxvera/vendor/prompt_toolkit/token.py deleted file mode 100644 index e97893d..0000000 --- a/voxvera/vendor/prompt_toolkit/token.py +++ /dev/null @@ -1,9 +0,0 @@ -""" """ - -from __future__ import annotations - -__all__ = [ - "ZeroWidthEscape", -] - -ZeroWidthEscape = "[ZeroWidthEscape]" diff --git a/voxvera/vendor/prompt_toolkit/utils.py b/voxvera/vendor/prompt_toolkit/utils.py deleted file mode 100644 index 1a99a28..0000000 --- a/voxvera/vendor/prompt_toolkit/utils.py +++ /dev/null @@ -1,327 +0,0 @@ -from __future__ import annotations - -import os -import signal -import sys -import threading -from collections import deque -from typing import ( - Callable, - ContextManager, - Dict, - Generator, - Generic, - TypeVar, - Union, -) - -from wcwidth import wcwidth - -__all__ = [ - "Event", - "DummyContext", - "get_cwidth", - "suspend_to_background_supported", - "is_conemu_ansi", - "is_windows", - "in_main_thread", - "get_bell_environment_variable", - "get_term_environment_variable", - "take_using_weights", - "to_str", - "to_int", - "AnyFloat", - "to_float", - "is_dumb_terminal", -] - -# Used to ensure sphinx autodoc does not try to import platform-specific -# stuff when documenting win32.py modules. -SPHINX_AUTODOC_RUNNING = "sphinx.ext.autodoc" in sys.modules - -_Sender = TypeVar("_Sender", covariant=True) - - -class Event(Generic[_Sender]): - """ - Simple event to which event handlers can be attached. For instance:: - - class Cls: - def __init__(self): - # Define event. The first parameter is the sender. - self.event = Event(self) - - obj = Cls() - - def handler(sender): - pass - - # Add event handler by using the += operator. - obj.event += handler - - # Fire event. - obj.event() - """ - - def __init__( - self, sender: _Sender, handler: Callable[[_Sender], None] | None = None - ) -> None: - self.sender = sender - self._handlers: list[Callable[[_Sender], None]] = [] - - if handler is not None: - self += handler - - def __call__(self) -> None: - "Fire event." - for handler in self._handlers: - handler(self.sender) - - def fire(self) -> None: - "Alias for just calling the event." - self() - - def add_handler(self, handler: Callable[[_Sender], None]) -> None: - """ - Add another handler to this callback. - (Handler should be a callable that takes exactly one parameter: the - sender object.) - """ - # Add to list of event handlers. - self._handlers.append(handler) - - def remove_handler(self, handler: Callable[[_Sender], None]) -> None: - """ - Remove a handler from this callback. - """ - if handler in self._handlers: - self._handlers.remove(handler) - - def __iadd__(self, handler: Callable[[_Sender], None]) -> Event[_Sender]: - """ - `event += handler` notation for adding a handler. - """ - self.add_handler(handler) - return self - - def __isub__(self, handler: Callable[[_Sender], None]) -> Event[_Sender]: - """ - `event -= handler` notation for removing a handler. - """ - self.remove_handler(handler) - return self - - -class DummyContext(ContextManager[None]): - """ - (contextlib.nested is not available on Py3) - """ - - def __enter__(self) -> None: - pass - - def __exit__(self, *a: object) -> None: - pass - - -class _CharSizesCache(Dict[str, int]): - """ - Cache for wcwidth sizes. - """ - - LONG_STRING_MIN_LEN = 64 # Minimum string length for considering it long. - MAX_LONG_STRINGS = 16 # Maximum number of long strings to remember. - - def __init__(self) -> None: - super().__init__() - # Keep track of the "long" strings in this cache. - self._long_strings: deque[str] = deque() - - def __missing__(self, string: str) -> int: - # Note: We use the `max(0, ...` because some non printable control - # characters, like e.g. Ctrl-underscore get a -1 wcwidth value. - # It can be possible that these characters end up in the input - # text. - result: int - if len(string) == 1: - result = max(0, wcwidth(string)) - else: - result = sum(self[c] for c in string) - - # Store in cache. - self[string] = result - - # Rotate long strings. - # (It's hard to tell what we can consider short...) - if len(string) > self.LONG_STRING_MIN_LEN: - long_strings = self._long_strings - long_strings.append(string) - - if len(long_strings) > self.MAX_LONG_STRINGS: - key_to_remove = long_strings.popleft() - if key_to_remove in self: - del self[key_to_remove] - - return result - - -_CHAR_SIZES_CACHE = _CharSizesCache() - - -def get_cwidth(string: str) -> int: - """ - Return width of a string. Wrapper around ``wcwidth``. - """ - return _CHAR_SIZES_CACHE[string] - - -def suspend_to_background_supported() -> bool: - """ - Returns `True` when the Python implementation supports - suspend-to-background. This is typically `False' on Windows systems. - """ - return hasattr(signal, "SIGTSTP") - - -def is_windows() -> bool: - """ - True when we are using Windows. - """ - return sys.platform == "win32" # Not 'darwin' or 'linux2' - - -def is_windows_vt100_supported() -> bool: - """ - True when we are using Windows, but VT100 escape sequences are supported. - """ - if sys.platform == "win32": - # Import needs to be inline. Windows libraries are not always available. - from prompt_toolkit.output.windows10 import is_win_vt100_enabled - - return is_win_vt100_enabled() - - return False - - -def is_conemu_ansi() -> bool: - """ - True when the ConEmu Windows console is used. - """ - return sys.platform == "win32" and os.environ.get("ConEmuANSI", "OFF") == "ON" - - -def in_main_thread() -> bool: - """ - True when the current thread is the main thread. - """ - return threading.current_thread().__class__.__name__ == "_MainThread" - - -def get_bell_environment_variable() -> bool: - """ - True if env variable is set to true (true, TRUE, True, 1). - """ - value = os.environ.get("PROMPT_TOOLKIT_BELL", "true") - return value.lower() in ("1", "true") - - -def get_term_environment_variable() -> str: - "Return the $TERM environment variable." - return os.environ.get("TERM", "") - - -_T = TypeVar("_T") - - -def take_using_weights( - items: list[_T], weights: list[int] -) -> Generator[_T, None, None]: - """ - Generator that keeps yielding items from the items list, in proportion to - their weight. For instance:: - - # Getting the first 70 items from this generator should have yielded 10 - # times A, 20 times B and 40 times C, all distributed equally.. - take_using_weights(['A', 'B', 'C'], [5, 10, 20]) - - :param items: List of items to take from. - :param weights: Integers representing the weight. (Numbers have to be - integers, not floats.) - """ - assert len(items) == len(weights) - assert len(items) > 0 - - # Remove items with zero-weight. - items2 = [] - weights2 = [] - for item, w in zip(items, weights): - if w > 0: - items2.append(item) - weights2.append(w) - - items = items2 - weights = weights2 - - # Make sure that we have some items left. - if not items: - raise ValueError("Did't got any items with a positive weight.") - - # - already_taken = [0 for i in items] - item_count = len(items) - max_weight = max(weights) - - i = 0 - while True: - # Each iteration of this loop, we fill up until by (total_weight/max_weight). - adding = True - while adding: - adding = False - - for item_i, item, weight in zip(range(item_count), items, weights): - if already_taken[item_i] < i * weight / float(max_weight): - yield item - already_taken[item_i] += 1 - adding = True - - i += 1 - - -def to_str(value: Callable[[], str] | str) -> str: - "Turn callable or string into string." - if callable(value): - return to_str(value()) - else: - return str(value) - - -def to_int(value: Callable[[], int] | int) -> int: - "Turn callable or int into int." - if callable(value): - return to_int(value()) - else: - return int(value) - - -AnyFloat = Union[Callable[[], float], float] - - -def to_float(value: AnyFloat) -> float: - "Turn callable or float into float." - if callable(value): - return to_float(value()) - else: - return float(value) - - -def is_dumb_terminal(term: str | None = None) -> bool: - """ - True if this terminal type is considered "dumb". - - If so, we should fall back to the simplest possible form of line editing, - without cursor positioning and color support. - """ - if term is None: - return is_dumb_terminal(os.environ.get("TERM", "")) - - return term.lower() in ["dumb", "unknown"] diff --git a/voxvera/vendor/prompt_toolkit/validation.py b/voxvera/vendor/prompt_toolkit/validation.py deleted file mode 100644 index 2b35d1f..0000000 --- a/voxvera/vendor/prompt_toolkit/validation.py +++ /dev/null @@ -1,192 +0,0 @@ -""" -Input validation for a `Buffer`. -(Validators will be called before accepting input.) -""" - -from __future__ import annotations - -from abc import ABCMeta, abstractmethod -from typing import Callable - -from prompt_toolkit.eventloop import run_in_executor_with_context - -from .document import Document -from .filters import FilterOrBool, to_filter - -__all__ = [ - "ConditionalValidator", - "ValidationError", - "Validator", - "ThreadedValidator", - "DummyValidator", - "DynamicValidator", -] - - -class ValidationError(Exception): - """ - Error raised by :meth:`.Validator.validate`. - - :param cursor_position: The cursor position where the error occurred. - :param message: Text. - """ - - def __init__(self, cursor_position: int = 0, message: str = "") -> None: - super().__init__(message) - self.cursor_position = cursor_position - self.message = message - - def __repr__(self) -> str: - return f"{self.__class__.__name__}(cursor_position={self.cursor_position!r}, message={self.message!r})" - - -class Validator(metaclass=ABCMeta): - """ - Abstract base class for an input validator. - - A validator is typically created in one of the following two ways: - - - Either by overriding this class and implementing the `validate` method. - - Or by passing a callable to `Validator.from_callable`. - - If the validation takes some time and needs to happen in a background - thread, this can be wrapped in a :class:`.ThreadedValidator`. - """ - - @abstractmethod - def validate(self, document: Document) -> None: - """ - Validate the input. - If invalid, this should raise a :class:`.ValidationError`. - - :param document: :class:`~prompt_toolkit.document.Document` instance. - """ - pass - - async def validate_async(self, document: Document) -> None: - """ - Return a `Future` which is set when the validation is ready. - This function can be overloaded in order to provide an asynchronous - implementation. - """ - try: - self.validate(document) - except ValidationError: - raise - - @classmethod - def from_callable( - cls, - validate_func: Callable[[str], bool], - error_message: str = "Invalid input", - move_cursor_to_end: bool = False, - ) -> Validator: - """ - Create a validator from a simple validate callable. E.g.: - - .. code:: python - - def is_valid(text): - return text in ['hello', 'world'] - Validator.from_callable(is_valid, error_message='Invalid input') - - :param validate_func: Callable that takes the input string, and returns - `True` if the input is valid input. - :param error_message: Message to be displayed if the input is invalid. - :param move_cursor_to_end: Move the cursor to the end of the input, if - the input is invalid. - """ - return _ValidatorFromCallable(validate_func, error_message, move_cursor_to_end) - - -class _ValidatorFromCallable(Validator): - """ - Validate input from a simple callable. - """ - - def __init__( - self, func: Callable[[str], bool], error_message: str, move_cursor_to_end: bool - ) -> None: - self.func = func - self.error_message = error_message - self.move_cursor_to_end = move_cursor_to_end - - def __repr__(self) -> str: - return f"Validator.from_callable({self.func!r})" - - def validate(self, document: Document) -> None: - if not self.func(document.text): - if self.move_cursor_to_end: - index = len(document.text) - else: - index = 0 - - raise ValidationError(cursor_position=index, message=self.error_message) - - -class ThreadedValidator(Validator): - """ - Wrapper that runs input validation in a thread. - (Use this to prevent the user interface from becoming unresponsive if the - input validation takes too much time.) - """ - - def __init__(self, validator: Validator) -> None: - self.validator = validator - - def validate(self, document: Document) -> None: - self.validator.validate(document) - - async def validate_async(self, document: Document) -> None: - """ - Run the `validate` function in a thread. - """ - - def run_validation_thread() -> None: - return self.validate(document) - - await run_in_executor_with_context(run_validation_thread) - - -class DummyValidator(Validator): - """ - Validator class that accepts any input. - """ - - def validate(self, document: Document) -> None: - pass # Don't raise any exception. - - -class ConditionalValidator(Validator): - """ - Validator that can be switched on/off according to - a filter. (This wraps around another validator.) - """ - - def __init__(self, validator: Validator, filter: FilterOrBool) -> None: - self.validator = validator - self.filter = to_filter(filter) - - def validate(self, document: Document) -> None: - # Call the validator only if the filter is active. - if self.filter(): - self.validator.validate(document) - - -class DynamicValidator(Validator): - """ - Validator class that can dynamically returns any Validator. - - :param get_validator: Callable that returns a :class:`.Validator` instance. - """ - - def __init__(self, get_validator: Callable[[], Validator | None]) -> None: - self.get_validator = get_validator - - def validate(self, document: Document) -> None: - validator = self.get_validator() or DummyValidator() - validator.validate(document) - - async def validate_async(self, document: Document) -> None: - validator = self.get_validator() or DummyValidator() - await validator.validate_async(document) diff --git a/voxvera/vendor/prompt_toolkit/widgets/__init__.py b/voxvera/vendor/prompt_toolkit/widgets/__init__.py deleted file mode 100644 index 53cc3e1..0000000 --- a/voxvera/vendor/prompt_toolkit/widgets/__init__.py +++ /dev/null @@ -1,63 +0,0 @@ -""" -Collection of reusable components for building full screen applications. -These are higher level abstractions on top of the `prompt_toolkit.layout` -module. - -Most of these widgets implement the ``__pt_container__`` method, which makes it -possible to embed these in the layout like any other container. -""" - -from __future__ import annotations - -from .base import ( - Box, - Button, - Checkbox, - CheckboxList, - Frame, - HorizontalLine, - Label, - ProgressBar, - RadioList, - Shadow, - TextArea, - VerticalLine, -) -from .dialogs import Dialog -from .menus import MenuContainer, MenuItem -from .toolbars import ( - ArgToolbar, - CompletionsToolbar, - FormattedTextToolbar, - SearchToolbar, - SystemToolbar, - ValidationToolbar, -) - -__all__ = [ - # Base. - "TextArea", - "Label", - "Button", - "Frame", - "Shadow", - "Box", - "VerticalLine", - "HorizontalLine", - "CheckboxList", - "RadioList", - "Checkbox", - "ProgressBar", - # Toolbars. - "ArgToolbar", - "CompletionsToolbar", - "FormattedTextToolbar", - "SearchToolbar", - "SystemToolbar", - "ValidationToolbar", - # Dialogs. - "Dialog", - # Menus. - "MenuContainer", - "MenuItem", -] diff --git a/voxvera/vendor/prompt_toolkit/widgets/base.py b/voxvera/vendor/prompt_toolkit/widgets/base.py deleted file mode 100644 index b8c2d67..0000000 --- a/voxvera/vendor/prompt_toolkit/widgets/base.py +++ /dev/null @@ -1,1080 +0,0 @@ -""" -Collection of reusable components for building full screen applications. - -All of these widgets implement the ``__pt_container__`` method, which makes -them usable in any situation where we are expecting a `prompt_toolkit` -container object. - -.. warning:: - - At this point, the API for these widgets is considered unstable, and can - potentially change between minor releases (we try not too, but no - guarantees are made yet). The public API in - `prompt_toolkit.shortcuts.dialogs` on the other hand is considered stable. -""" - -from __future__ import annotations - -from functools import partial -from typing import Callable, Generic, Sequence, TypeVar - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.auto_suggest import AutoSuggest, DynamicAutoSuggest -from prompt_toolkit.buffer import Buffer, BufferAcceptHandler -from prompt_toolkit.completion import Completer, DynamicCompleter -from prompt_toolkit.document import Document -from prompt_toolkit.filters import ( - Condition, - FilterOrBool, - has_focus, - is_done, - is_true, - to_filter, -) -from prompt_toolkit.formatted_text import ( - AnyFormattedText, - StyleAndTextTuples, - Template, - to_formatted_text, -) -from prompt_toolkit.formatted_text.utils import fragment_list_to_text -from prompt_toolkit.history import History -from prompt_toolkit.key_binding.key_bindings import KeyBindings -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.keys import Keys -from prompt_toolkit.layout.containers import ( - AnyContainer, - ConditionalContainer, - Container, - DynamicContainer, - Float, - FloatContainer, - HSplit, - VSplit, - Window, - WindowAlign, -) -from prompt_toolkit.layout.controls import ( - BufferControl, - FormattedTextControl, - GetLinePrefixCallable, -) -from prompt_toolkit.layout.dimension import AnyDimension -from prompt_toolkit.layout.dimension import Dimension as D -from prompt_toolkit.layout.margins import ( - ConditionalMargin, - NumberedMargin, - ScrollbarMargin, -) -from prompt_toolkit.layout.processors import ( - AppendAutoSuggestion, - BeforeInput, - ConditionalProcessor, - PasswordProcessor, - Processor, -) -from prompt_toolkit.lexers import DynamicLexer, Lexer -from prompt_toolkit.mouse_events import MouseEvent, MouseEventType -from prompt_toolkit.utils import get_cwidth -from prompt_toolkit.validation import DynamicValidator, Validator - -from .toolbars import SearchToolbar - -__all__ = [ - "TextArea", - "Label", - "Button", - "Frame", - "Shadow", - "Box", - "VerticalLine", - "HorizontalLine", - "RadioList", - "CheckboxList", - "Checkbox", # backward compatibility - "ProgressBar", -] - -E = KeyPressEvent - - -class Border: - "Box drawing characters. (Thin)" - - HORIZONTAL = "\u2500" - VERTICAL = "\u2502" - TOP_LEFT = "\u250c" - TOP_RIGHT = "\u2510" - BOTTOM_LEFT = "\u2514" - BOTTOM_RIGHT = "\u2518" - - -class TextArea: - """ - A simple input field. - - This is a higher level abstraction on top of several other classes with - sane defaults. - - This widget does have the most common options, but it does not intend to - cover every single use case. For more configurations options, you can - always build a text area manually, using a - :class:`~prompt_toolkit.buffer.Buffer`, - :class:`~prompt_toolkit.layout.BufferControl` and - :class:`~prompt_toolkit.layout.Window`. - - Buffer attributes: - - :param text: The initial text. - :param multiline: If True, allow multiline input. - :param completer: :class:`~prompt_toolkit.completion.Completer` instance - for auto completion. - :param complete_while_typing: Boolean. - :param accept_handler: Called when `Enter` is pressed (This should be a - callable that takes a buffer as input). - :param history: :class:`~prompt_toolkit.history.History` instance. - :param auto_suggest: :class:`~prompt_toolkit.auto_suggest.AutoSuggest` - instance for input suggestions. - - BufferControl attributes: - - :param password: When `True`, display using asterisks. - :param focusable: When `True`, allow this widget to receive the focus. - :param focus_on_click: When `True`, focus after mouse click. - :param input_processors: `None` or a list of - :class:`~prompt_toolkit.layout.Processor` objects. - :param validator: `None` or a :class:`~prompt_toolkit.validation.Validator` - object. - - Window attributes: - - :param lexer: :class:`~prompt_toolkit.lexers.Lexer` instance for syntax - highlighting. - :param wrap_lines: When `True`, don't scroll horizontally, but wrap lines. - :param width: Window width. (:class:`~prompt_toolkit.layout.Dimension` object.) - :param height: Window height. (:class:`~prompt_toolkit.layout.Dimension` object.) - :param scrollbar: When `True`, display a scroll bar. - :param style: A style string. - :param dont_extend_width: When `True`, don't take up more width then the - preferred width reported by the control. - :param dont_extend_height: When `True`, don't take up more width then the - preferred height reported by the control. - :param get_line_prefix: None or a callable that returns formatted text to - be inserted before a line. It takes a line number (int) and a - wrap_count and returns formatted text. This can be used for - implementation of line continuations, things like Vim "breakindent" and - so on. - - Other attributes: - - :param search_field: An optional `SearchToolbar` object. - """ - - def __init__( - self, - text: str = "", - multiline: FilterOrBool = True, - password: FilterOrBool = False, - lexer: Lexer | None = None, - auto_suggest: AutoSuggest | None = None, - completer: Completer | None = None, - complete_while_typing: FilterOrBool = True, - validator: Validator | None = None, - accept_handler: BufferAcceptHandler | None = None, - history: History | None = None, - focusable: FilterOrBool = True, - focus_on_click: FilterOrBool = False, - wrap_lines: FilterOrBool = True, - read_only: FilterOrBool = False, - width: AnyDimension = None, - height: AnyDimension = None, - dont_extend_height: FilterOrBool = False, - dont_extend_width: FilterOrBool = False, - line_numbers: bool = False, - get_line_prefix: GetLinePrefixCallable | None = None, - scrollbar: bool = False, - style: str = "", - search_field: SearchToolbar | None = None, - preview_search: FilterOrBool = True, - prompt: AnyFormattedText = "", - input_processors: list[Processor] | None = None, - name: str = "", - ) -> None: - if search_field is None: - search_control = None - elif isinstance(search_field, SearchToolbar): - search_control = search_field.control - - if input_processors is None: - input_processors = [] - - # Writeable attributes. - self.completer = completer - self.complete_while_typing = complete_while_typing - self.lexer = lexer - self.auto_suggest = auto_suggest - self.read_only = read_only - self.wrap_lines = wrap_lines - self.validator = validator - - self.buffer = Buffer( - document=Document(text, 0), - multiline=multiline, - read_only=Condition(lambda: is_true(self.read_only)), - completer=DynamicCompleter(lambda: self.completer), - complete_while_typing=Condition( - lambda: is_true(self.complete_while_typing) - ), - validator=DynamicValidator(lambda: self.validator), - auto_suggest=DynamicAutoSuggest(lambda: self.auto_suggest), - accept_handler=accept_handler, - history=history, - name=name, - ) - - self.control = BufferControl( - buffer=self.buffer, - lexer=DynamicLexer(lambda: self.lexer), - input_processors=[ - ConditionalProcessor( - AppendAutoSuggestion(), has_focus(self.buffer) & ~is_done - ), - ConditionalProcessor( - processor=PasswordProcessor(), filter=to_filter(password) - ), - BeforeInput(prompt, style="class:text-area.prompt"), - ] - + input_processors, - search_buffer_control=search_control, - preview_search=preview_search, - focusable=focusable, - focus_on_click=focus_on_click, - ) - - if multiline: - if scrollbar: - right_margins = [ScrollbarMargin(display_arrows=True)] - else: - right_margins = [] - if line_numbers: - left_margins = [NumberedMargin()] - else: - left_margins = [] - else: - height = D.exact(1) - left_margins = [] - right_margins = [] - - style = "class:text-area " + style - - # If no height was given, guarantee height of at least 1. - if height is None: - height = D(min=1) - - self.window = Window( - height=height, - width=width, - dont_extend_height=dont_extend_height, - dont_extend_width=dont_extend_width, - content=self.control, - style=style, - wrap_lines=Condition(lambda: is_true(self.wrap_lines)), - left_margins=left_margins, - right_margins=right_margins, - get_line_prefix=get_line_prefix, - ) - - @property - def text(self) -> str: - """ - The `Buffer` text. - """ - return self.buffer.text - - @text.setter - def text(self, value: str) -> None: - self.document = Document(value, 0) - - @property - def document(self) -> Document: - """ - The `Buffer` document (text + cursor position). - """ - return self.buffer.document - - @document.setter - def document(self, value: Document) -> None: - self.buffer.set_document(value, bypass_readonly=True) - - @property - def accept_handler(self) -> BufferAcceptHandler | None: - """ - The accept handler. Called when the user accepts the input. - """ - return self.buffer.accept_handler - - @accept_handler.setter - def accept_handler(self, value: BufferAcceptHandler) -> None: - self.buffer.accept_handler = value - - def __pt_container__(self) -> Container: - return self.window - - -class Label: - """ - Widget that displays the given text. It is not editable or focusable. - - :param text: Text to display. Can be multiline. All value types accepted by - :class:`prompt_toolkit.layout.FormattedTextControl` are allowed, - including a callable. - :param style: A style string. - :param width: When given, use this width, rather than calculating it from - the text size. - :param dont_extend_width: When `True`, don't take up more width than - preferred, i.e. the length of the longest line of - the text, or value of `width` parameter, if - given. `True` by default - :param dont_extend_height: When `True`, don't take up more width than the - preferred height, i.e. the number of lines of - the text. `False` by default. - """ - - def __init__( - self, - text: AnyFormattedText, - style: str = "", - width: AnyDimension = None, - dont_extend_height: bool = True, - dont_extend_width: bool = False, - align: WindowAlign | Callable[[], WindowAlign] = WindowAlign.LEFT, - # There is no cursor navigation in a label, so it makes sense to always - # wrap lines by default. - wrap_lines: FilterOrBool = True, - ) -> None: - self.text = text - - def get_width() -> AnyDimension: - if width is None: - text_fragments = to_formatted_text(self.text) - text = fragment_list_to_text(text_fragments) - if text: - longest_line = max(get_cwidth(line) for line in text.splitlines()) - else: - return D(preferred=0) - return D(preferred=longest_line) - else: - return width - - self.formatted_text_control = FormattedTextControl(text=lambda: self.text) - - self.window = Window( - content=self.formatted_text_control, - width=get_width, - height=D(min=1), - style="class:label " + style, - dont_extend_height=dont_extend_height, - dont_extend_width=dont_extend_width, - align=align, - wrap_lines=wrap_lines, - ) - - def __pt_container__(self) -> Container: - return self.window - - -class Button: - """ - Clickable button. - - :param text: The caption for the button. - :param handler: `None` or callable. Called when the button is clicked. No - parameters are passed to this callable. Use for instance Python's - `functools.partial` to pass parameters to this callable if needed. - :param width: Width of the button. - """ - - def __init__( - self, - text: str, - handler: Callable[[], None] | None = None, - width: int = 12, - left_symbol: str = "<", - right_symbol: str = ">", - ) -> None: - self.text = text - self.left_symbol = left_symbol - self.right_symbol = right_symbol - self.handler = handler - self.width = width - self.control = FormattedTextControl( - self._get_text_fragments, - key_bindings=self._get_key_bindings(), - focusable=True, - ) - - def get_style() -> str: - if get_app().layout.has_focus(self): - return "class:button.focused" - else: - return "class:button" - - # Note: `dont_extend_width` is False, because we want to allow buttons - # to take more space if the parent container provides more space. - # Otherwise, we will also truncate the text. - # Probably we need a better way here to adjust to width of the - # button to the text. - - self.window = Window( - self.control, - align=WindowAlign.CENTER, - height=1, - width=width, - style=get_style, - dont_extend_width=False, - dont_extend_height=True, - ) - - def _get_text_fragments(self) -> StyleAndTextTuples: - width = ( - self.width - - (get_cwidth(self.left_symbol) + get_cwidth(self.right_symbol)) - + (len(self.text) - get_cwidth(self.text)) - ) - text = (f"{{:^{max(0, width)}}}").format(self.text) - - def handler(mouse_event: MouseEvent) -> None: - if ( - self.handler is not None - and mouse_event.event_type == MouseEventType.MOUSE_UP - ): - self.handler() - - return [ - ("class:button.arrow", self.left_symbol, handler), - ("[SetCursorPosition]", ""), - ("class:button.text", text, handler), - ("class:button.arrow", self.right_symbol, handler), - ] - - def _get_key_bindings(self) -> KeyBindings: - "Key bindings for the Button." - kb = KeyBindings() - - @kb.add(" ") - @kb.add("enter") - def _(event: E) -> None: - if self.handler is not None: - self.handler() - - return kb - - def __pt_container__(self) -> Container: - return self.window - - -class Frame: - """ - Draw a border around any container, optionally with a title text. - - Changing the title and body of the frame is possible at runtime by - assigning to the `body` and `title` attributes of this class. - - :param body: Another container object. - :param title: Text to be displayed in the top of the frame (can be formatted text). - :param style: Style string to be applied to this widget. - """ - - def __init__( - self, - body: AnyContainer, - title: AnyFormattedText = "", - style: str = "", - width: AnyDimension = None, - height: AnyDimension = None, - key_bindings: KeyBindings | None = None, - modal: bool = False, - ) -> None: - self.title = title - self.body = body - - fill = partial(Window, style="class:frame.border") - style = "class:frame " + style - - top_row_with_title = VSplit( - [ - fill(width=1, height=1, char=Border.TOP_LEFT), - fill(char=Border.HORIZONTAL), - fill(width=1, height=1, char="|"), - # Notice: we use `Template` here, because `self.title` can be an - # `HTML` object for instance. - Label( - lambda: Template(" {} ").format(self.title), - style="class:frame.label", - dont_extend_width=True, - ), - fill(width=1, height=1, char="|"), - fill(char=Border.HORIZONTAL), - fill(width=1, height=1, char=Border.TOP_RIGHT), - ], - height=1, - ) - - top_row_without_title = VSplit( - [ - fill(width=1, height=1, char=Border.TOP_LEFT), - fill(char=Border.HORIZONTAL), - fill(width=1, height=1, char=Border.TOP_RIGHT), - ], - height=1, - ) - - @Condition - def has_title() -> bool: - return bool(self.title) - - self.container = HSplit( - [ - ConditionalContainer( - content=top_row_with_title, - filter=has_title, - alternative_content=top_row_without_title, - ), - VSplit( - [ - fill(width=1, char=Border.VERTICAL), - DynamicContainer(lambda: self.body), - fill(width=1, char=Border.VERTICAL), - # Padding is required to make sure that if the content is - # too small, the right frame border is still aligned. - ], - padding=0, - ), - VSplit( - [ - fill(width=1, height=1, char=Border.BOTTOM_LEFT), - fill(char=Border.HORIZONTAL), - fill(width=1, height=1, char=Border.BOTTOM_RIGHT), - ], - # specifying height here will increase the rendering speed. - height=1, - ), - ], - width=width, - height=height, - style=style, - key_bindings=key_bindings, - modal=modal, - ) - - def __pt_container__(self) -> Container: - return self.container - - -class Shadow: - """ - Draw a shadow underneath/behind this container. - (This applies `class:shadow` the the cells under the shadow. The Style - should define the colors for the shadow.) - - :param body: Another container object. - """ - - def __init__(self, body: AnyContainer) -> None: - self.container = FloatContainer( - content=body, - floats=[ - Float( - bottom=-1, - height=1, - left=1, - right=-1, - transparent=True, - content=Window(style="class:shadow"), - ), - Float( - bottom=-1, - top=1, - width=1, - right=-1, - transparent=True, - content=Window(style="class:shadow"), - ), - ], - ) - - def __pt_container__(self) -> Container: - return self.container - - -class Box: - """ - Add padding around a container. - - This also makes sure that the parent can provide more space than required by - the child. This is very useful when wrapping a small element with a fixed - size into a ``VSplit`` or ``HSplit`` object. The ``HSplit`` and ``VSplit`` - try to make sure to adapt respectively the width and height, possibly - shrinking other elements. Wrapping something in a ``Box`` makes it flexible. - - :param body: Another container object. - :param padding: The margin to be used around the body. This can be - overridden by `padding_left`, padding_right`, `padding_top` and - `padding_bottom`. - :param style: A style string. - :param char: Character to be used for filling the space around the body. - (This is supposed to be a character with a terminal width of 1.) - """ - - def __init__( - self, - body: AnyContainer, - padding: AnyDimension = None, - padding_left: AnyDimension = None, - padding_right: AnyDimension = None, - padding_top: AnyDimension = None, - padding_bottom: AnyDimension = None, - width: AnyDimension = None, - height: AnyDimension = None, - style: str = "", - char: None | str | Callable[[], str] = None, - modal: bool = False, - key_bindings: KeyBindings | None = None, - ) -> None: - self.padding = padding - self.padding_left = padding_left - self.padding_right = padding_right - self.padding_top = padding_top - self.padding_bottom = padding_bottom - self.body = body - - def left() -> AnyDimension: - if self.padding_left is None: - return self.padding - return self.padding_left - - def right() -> AnyDimension: - if self.padding_right is None: - return self.padding - return self.padding_right - - def top() -> AnyDimension: - if self.padding_top is None: - return self.padding - return self.padding_top - - def bottom() -> AnyDimension: - if self.padding_bottom is None: - return self.padding - return self.padding_bottom - - self.container = HSplit( - [ - Window(height=top, char=char), - VSplit( - [ - Window(width=left, char=char), - body, - Window(width=right, char=char), - ] - ), - Window(height=bottom, char=char), - ], - width=width, - height=height, - style=style, - modal=modal, - key_bindings=None, - ) - - def __pt_container__(self) -> Container: - return self.container - - -_T = TypeVar("_T") - - -class _DialogList(Generic[_T]): - """ - Common code for `RadioList` and `CheckboxList`. - """ - - def __init__( - self, - values: Sequence[tuple[_T, AnyFormattedText]], - default_values: Sequence[_T] | None = None, - select_on_focus: bool = False, - open_character: str = "", - select_character: str = "*", - close_character: str = "", - container_style: str = "", - default_style: str = "", - number_style: str = "", - selected_style: str = "", - checked_style: str = "", - multiple_selection: bool = False, - show_scrollbar: bool = True, - show_cursor: bool = True, - show_numbers: bool = False, - ) -> None: - assert len(values) > 0 - default_values = default_values or [] - - self.values = values - self.show_numbers = show_numbers - - self.open_character = open_character - self.select_character = select_character - self.close_character = close_character - self.container_style = container_style - self.default_style = default_style - self.number_style = number_style - self.selected_style = selected_style - self.checked_style = checked_style - self.multiple_selection = multiple_selection - self.show_scrollbar = show_scrollbar - - # current_values will be used in multiple_selection, - # current_value will be used otherwise. - keys: list[_T] = [value for (value, _) in values] - self.current_values: list[_T] = [ - value for value in default_values if value in keys - ] - self.current_value: _T = ( - default_values[0] - if len(default_values) and default_values[0] in keys - else values[0][0] - ) - - # Cursor index: take first selected item or first item otherwise. - if len(self.current_values) > 0: - self._selected_index = keys.index(self.current_values[0]) - else: - self._selected_index = 0 - - # Key bindings. - kb = KeyBindings() - - @kb.add("up") - @kb.add("k") # Vi-like. - def _up(event: E) -> None: - self._selected_index = max(0, self._selected_index - 1) - if select_on_focus: - self._handle_enter() - - @kb.add("down") - @kb.add("j") # Vi-like. - def _down(event: E) -> None: - self._selected_index = min(len(self.values) - 1, self._selected_index + 1) - if select_on_focus: - self._handle_enter() - - @kb.add("pageup") - def _pageup(event: E) -> None: - w = event.app.layout.current_window - if w.render_info: - self._selected_index = max( - 0, self._selected_index - len(w.render_info.displayed_lines) - ) - - @kb.add("pagedown") - def _pagedown(event: E) -> None: - w = event.app.layout.current_window - if w.render_info: - self._selected_index = min( - len(self.values) - 1, - self._selected_index + len(w.render_info.displayed_lines), - ) - - @kb.add("enter") - @kb.add(" ") - def _click(event: E) -> None: - self._handle_enter() - - @kb.add(Keys.Any) - def _find(event: E) -> None: - # We first check values after the selected value, then all values. - values = list(self.values) - for value in values[self._selected_index + 1 :] + values: - text = fragment_list_to_text(to_formatted_text(value[1])).lower() - - if text.startswith(event.data.lower()): - self._selected_index = self.values.index(value) - return - - numbers_visible = Condition(lambda: self.show_numbers) - - for i in range(1, 10): - - @kb.add(str(i), filter=numbers_visible) - def _select_i(event: E, index: int = i) -> None: - self._selected_index = min(len(self.values) - 1, index - 1) - if select_on_focus: - self._handle_enter() - - # Control and window. - self.control = FormattedTextControl( - self._get_text_fragments, - key_bindings=kb, - focusable=True, - show_cursor=show_cursor, - ) - - self.window = Window( - content=self.control, - style=self.container_style, - right_margins=[ - ConditionalMargin( - margin=ScrollbarMargin(display_arrows=True), - filter=Condition(lambda: self.show_scrollbar), - ), - ], - dont_extend_height=True, - ) - - def _handle_enter(self) -> None: - if self.multiple_selection: - val = self.values[self._selected_index][0] - if val in self.current_values: - self.current_values.remove(val) - else: - self.current_values.append(val) - else: - self.current_value = self.values[self._selected_index][0] - - def _get_text_fragments(self) -> StyleAndTextTuples: - def mouse_handler(mouse_event: MouseEvent) -> None: - """ - Set `_selected_index` and `current_value` according to the y - position of the mouse click event. - """ - if mouse_event.event_type == MouseEventType.MOUSE_UP: - self._selected_index = mouse_event.position.y - self._handle_enter() - - result: StyleAndTextTuples = [] - for i, value in enumerate(self.values): - if self.multiple_selection: - checked = value[0] in self.current_values - else: - checked = value[0] == self.current_value - selected = i == self._selected_index - - style = "" - if checked: - style += " " + self.checked_style - if selected: - style += " " + self.selected_style - - result.append((style, self.open_character)) - - if selected: - result.append(("[SetCursorPosition]", "")) - - if checked: - result.append((style, self.select_character)) - else: - result.append((style, " ")) - - result.append((style, self.close_character)) - result.append((f"{style} {self.default_style}", " ")) - - if self.show_numbers: - result.append((f"{style} {self.number_style}", f"{i + 1:2d}. ")) - - result.extend( - to_formatted_text(value[1], style=f"{style} {self.default_style}") - ) - result.append(("", "\n")) - - # Add mouse handler to all fragments. - for i in range(len(result)): - result[i] = (result[i][0], result[i][1], mouse_handler) - - result.pop() # Remove last newline. - return result - - def __pt_container__(self) -> Container: - return self.window - - -class RadioList(_DialogList[_T]): - """ - List of radio buttons. Only one can be checked at the same time. - - :param values: List of (value, label) tuples. - """ - - def __init__( - self, - values: Sequence[tuple[_T, AnyFormattedText]], - default: _T | None = None, - show_numbers: bool = False, - select_on_focus: bool = False, - open_character: str = "(", - select_character: str = "*", - close_character: str = ")", - container_style: str = "class:radio-list", - default_style: str = "class:radio", - selected_style: str = "class:radio-selected", - checked_style: str = "class:radio-checked", - number_style: str = "class:radio-number", - multiple_selection: bool = False, - show_cursor: bool = True, - show_scrollbar: bool = True, - ) -> None: - if default is None: - default_values = None - else: - default_values = [default] - - super().__init__( - values, - default_values=default_values, - select_on_focus=select_on_focus, - show_numbers=show_numbers, - open_character=open_character, - select_character=select_character, - close_character=close_character, - container_style=container_style, - default_style=default_style, - selected_style=selected_style, - checked_style=checked_style, - number_style=number_style, - multiple_selection=False, - show_cursor=show_cursor, - show_scrollbar=show_scrollbar, - ) - - -class CheckboxList(_DialogList[_T]): - """ - List of checkbox buttons. Several can be checked at the same time. - - :param values: List of (value, label) tuples. - """ - - def __init__( - self, - values: Sequence[tuple[_T, AnyFormattedText]], - default_values: Sequence[_T] | None = None, - open_character: str = "[", - select_character: str = "*", - close_character: str = "]", - container_style: str = "class:checkbox-list", - default_style: str = "class:checkbox", - selected_style: str = "class:checkbox-selected", - checked_style: str = "class:checkbox-checked", - ) -> None: - super().__init__( - values, - default_values=default_values, - open_character=open_character, - select_character=select_character, - close_character=close_character, - container_style=container_style, - default_style=default_style, - selected_style=selected_style, - checked_style=checked_style, - multiple_selection=True, - ) - - -class Checkbox(CheckboxList[str]): - """Backward compatibility util: creates a 1-sized CheckboxList - - :param text: the text - """ - - show_scrollbar = False - - def __init__(self, text: AnyFormattedText = "", checked: bool = False) -> None: - values = [("value", text)] - super().__init__(values=values) - self.checked = checked - - @property - def checked(self) -> bool: - return "value" in self.current_values - - @checked.setter - def checked(self, value: bool) -> None: - if value: - self.current_values = ["value"] - else: - self.current_values = [] - - -class VerticalLine: - """ - A simple vertical line with a width of 1. - """ - - def __init__(self) -> None: - self.window = Window( - char=Border.VERTICAL, style="class:line,vertical-line", width=1 - ) - - def __pt_container__(self) -> Container: - return self.window - - -class HorizontalLine: - """ - A simple horizontal line with a height of 1. - """ - - def __init__(self) -> None: - self.window = Window( - char=Border.HORIZONTAL, style="class:line,horizontal-line", height=1 - ) - - def __pt_container__(self) -> Container: - return self.window - - -class ProgressBar: - def __init__(self) -> None: - self._percentage = 60 - - self.label = Label("60%") - self.container = FloatContainer( - content=Window(height=1), - floats=[ - # We first draw the label, then the actual progress bar. Right - # now, this is the only way to have the colors of the progress - # bar appear on top of the label. The problem is that our label - # can't be part of any `Window` below. - Float(content=self.label, top=0, bottom=0), - Float( - left=0, - top=0, - right=0, - bottom=0, - content=VSplit( - [ - Window( - style="class:progress-bar.used", - width=lambda: D(weight=int(self._percentage)), - ), - Window( - style="class:progress-bar", - width=lambda: D(weight=int(100 - self._percentage)), - ), - ] - ), - ), - ], - ) - - @property - def percentage(self) -> int: - return self._percentage - - @percentage.setter - def percentage(self, value: int) -> None: - self._percentage = value - self.label.text = f"{value}%" - - def __pt_container__(self) -> Container: - return self.container diff --git a/voxvera/vendor/prompt_toolkit/widgets/dialogs.py b/voxvera/vendor/prompt_toolkit/widgets/dialogs.py deleted file mode 100644 index 5f5f170..0000000 --- a/voxvera/vendor/prompt_toolkit/widgets/dialogs.py +++ /dev/null @@ -1,108 +0,0 @@ -""" -Collection of reusable components for building full screen applications. -""" - -from __future__ import annotations - -from typing import Sequence - -from prompt_toolkit.filters import has_completions, has_focus -from prompt_toolkit.formatted_text import AnyFormattedText -from prompt_toolkit.key_binding.bindings.focus import focus_next, focus_previous -from prompt_toolkit.key_binding.key_bindings import KeyBindings -from prompt_toolkit.layout.containers import ( - AnyContainer, - DynamicContainer, - HSplit, - VSplit, -) -from prompt_toolkit.layout.dimension import AnyDimension -from prompt_toolkit.layout.dimension import Dimension as D - -from .base import Box, Button, Frame, Shadow - -__all__ = [ - "Dialog", -] - - -class Dialog: - """ - Simple dialog window. This is the base for input dialogs, message dialogs - and confirmation dialogs. - - Changing the title and body of the dialog is possible at runtime by - assigning to the `body` and `title` attributes of this class. - - :param body: Child container object. - :param title: Text to be displayed in the heading of the dialog. - :param buttons: A list of `Button` widgets, displayed at the bottom. - """ - - def __init__( - self, - body: AnyContainer, - title: AnyFormattedText = "", - buttons: Sequence[Button] | None = None, - modal: bool = True, - width: AnyDimension = None, - with_background: bool = False, - ) -> None: - self.body = body - self.title = title - - buttons = buttons or [] - - # When a button is selected, handle left/right key bindings. - buttons_kb = KeyBindings() - if len(buttons) > 1: - first_selected = has_focus(buttons[0]) - last_selected = has_focus(buttons[-1]) - - buttons_kb.add("left", filter=~first_selected)(focus_previous) - buttons_kb.add("right", filter=~last_selected)(focus_next) - - frame_body: AnyContainer - if buttons: - frame_body = HSplit( - [ - # Add optional padding around the body. - Box( - body=DynamicContainer(lambda: self.body), - padding=D(preferred=1, max=1), - padding_bottom=0, - ), - # The buttons. - Box( - body=VSplit(buttons, padding=1, key_bindings=buttons_kb), - height=D(min=1, max=3, preferred=3), - ), - ] - ) - else: - frame_body = body - - # Key bindings for whole dialog. - kb = KeyBindings() - kb.add("tab", filter=~has_completions)(focus_next) - kb.add("s-tab", filter=~has_completions)(focus_previous) - - frame = Shadow( - body=Frame( - title=lambda: self.title, - body=frame_body, - style="class:dialog.body", - width=(None if with_background is None else width), - key_bindings=kb, - modal=modal, - ) - ) - - self.container: Box | Shadow - if with_background: - self.container = Box(body=frame, style="class:dialog", width=width) - else: - self.container = frame - - def __pt_container__(self) -> AnyContainer: - return self.container diff --git a/voxvera/vendor/prompt_toolkit/widgets/menus.py b/voxvera/vendor/prompt_toolkit/widgets/menus.py deleted file mode 100644 index c574c06..0000000 --- a/voxvera/vendor/prompt_toolkit/widgets/menus.py +++ /dev/null @@ -1,374 +0,0 @@ -from __future__ import annotations - -from typing import Callable, Iterable, Sequence - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.filters import Condition -from prompt_toolkit.formatted_text.base import OneStyleAndTextTuple, StyleAndTextTuples -from prompt_toolkit.key_binding.key_bindings import KeyBindings, KeyBindingsBase -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.keys import Keys -from prompt_toolkit.layout.containers import ( - AnyContainer, - ConditionalContainer, - Container, - Float, - FloatContainer, - HSplit, - Window, -) -from prompt_toolkit.layout.controls import FormattedTextControl -from prompt_toolkit.mouse_events import MouseEvent, MouseEventType -from prompt_toolkit.utils import get_cwidth -from prompt_toolkit.widgets import Shadow - -from .base import Border - -__all__ = [ - "MenuContainer", - "MenuItem", -] - -E = KeyPressEvent - - -class MenuContainer: - """ - :param floats: List of extra Float objects to display. - :param menu_items: List of `MenuItem` objects. - """ - - def __init__( - self, - body: AnyContainer, - menu_items: list[MenuItem], - floats: list[Float] | None = None, - key_bindings: KeyBindingsBase | None = None, - ) -> None: - self.body = body - self.menu_items = menu_items - self.selected_menu = [0] - - # Key bindings. - kb = KeyBindings() - - @Condition - def in_main_menu() -> bool: - return len(self.selected_menu) == 1 - - @Condition - def in_sub_menu() -> bool: - return len(self.selected_menu) > 1 - - # Navigation through the main menu. - - @kb.add("left", filter=in_main_menu) - def _left(event: E) -> None: - self.selected_menu[0] = max(0, self.selected_menu[0] - 1) - - @kb.add("right", filter=in_main_menu) - def _right(event: E) -> None: - self.selected_menu[0] = min( - len(self.menu_items) - 1, self.selected_menu[0] + 1 - ) - - @kb.add("down", filter=in_main_menu) - def _down(event: E) -> None: - self.selected_menu.append(0) - - @kb.add("c-c", filter=in_main_menu) - @kb.add("c-g", filter=in_main_menu) - def _cancel(event: E) -> None: - "Leave menu." - event.app.layout.focus_last() - - # Sub menu navigation. - - @kb.add("left", filter=in_sub_menu) - @kb.add("c-g", filter=in_sub_menu) - @kb.add("c-c", filter=in_sub_menu) - def _back(event: E) -> None: - "Go back to parent menu." - if len(self.selected_menu) > 1: - self.selected_menu.pop() - - @kb.add("right", filter=in_sub_menu) - def _submenu(event: E) -> None: - "go into sub menu." - if self._get_menu(len(self.selected_menu) - 1).children: - self.selected_menu.append(0) - - # If This item does not have a sub menu. Go up in the parent menu. - elif ( - len(self.selected_menu) == 2 - and self.selected_menu[0] < len(self.menu_items) - 1 - ): - self.selected_menu = [ - min(len(self.menu_items) - 1, self.selected_menu[0] + 1) - ] - if self.menu_items[self.selected_menu[0]].children: - self.selected_menu.append(0) - - @kb.add("up", filter=in_sub_menu) - def _up_in_submenu(event: E) -> None: - "Select previous (enabled) menu item or return to main menu." - # Look for previous enabled items in this sub menu. - menu = self._get_menu(len(self.selected_menu) - 2) - index = self.selected_menu[-1] - - previous_indexes = [ - i - for i, item in enumerate(menu.children) - if i < index and not item.disabled - ] - - if previous_indexes: - self.selected_menu[-1] = previous_indexes[-1] - elif len(self.selected_menu) == 2: - # Return to main menu. - self.selected_menu.pop() - - @kb.add("down", filter=in_sub_menu) - def _down_in_submenu(event: E) -> None: - "Select next (enabled) menu item." - menu = self._get_menu(len(self.selected_menu) - 2) - index = self.selected_menu[-1] - - next_indexes = [ - i - for i, item in enumerate(menu.children) - if i > index and not item.disabled - ] - - if next_indexes: - self.selected_menu[-1] = next_indexes[0] - - @kb.add("enter") - def _click(event: E) -> None: - "Click the selected menu item." - item = self._get_menu(len(self.selected_menu) - 1) - if item.handler: - event.app.layout.focus_last() - item.handler() - - # Controls. - self.control = FormattedTextControl( - self._get_menu_fragments, key_bindings=kb, focusable=True, show_cursor=False - ) - - self.window = Window(height=1, content=self.control, style="class:menu-bar") - - submenu = self._submenu(0) - submenu2 = self._submenu(1) - submenu3 = self._submenu(2) - - @Condition - def has_focus() -> bool: - return get_app().layout.current_window == self.window - - self.container = FloatContainer( - content=HSplit( - [ - # The titlebar. - self.window, - # The 'body', like defined above. - body, - ] - ), - floats=[ - Float( - xcursor=True, - ycursor=True, - content=ConditionalContainer( - content=Shadow(body=submenu), filter=has_focus - ), - ), - Float( - attach_to_window=submenu, - xcursor=True, - ycursor=True, - allow_cover_cursor=True, - content=ConditionalContainer( - content=Shadow(body=submenu2), - filter=has_focus - & Condition(lambda: len(self.selected_menu) >= 1), - ), - ), - Float( - attach_to_window=submenu2, - xcursor=True, - ycursor=True, - allow_cover_cursor=True, - content=ConditionalContainer( - content=Shadow(body=submenu3), - filter=has_focus - & Condition(lambda: len(self.selected_menu) >= 2), - ), - ), - # -- - ] - + (floats or []), - key_bindings=key_bindings, - ) - - def _get_menu(self, level: int) -> MenuItem: - menu = self.menu_items[self.selected_menu[0]] - - for i, index in enumerate(self.selected_menu[1:]): - if i < level: - try: - menu = menu.children[index] - except IndexError: - return MenuItem("debug") - - return menu - - def _get_menu_fragments(self) -> StyleAndTextTuples: - focused = get_app().layout.has_focus(self.window) - - # This is called during the rendering. When we discover that this - # widget doesn't have the focus anymore. Reset menu state. - if not focused: - self.selected_menu = [0] - - # Generate text fragments for the main menu. - def one_item(i: int, item: MenuItem) -> Iterable[OneStyleAndTextTuple]: - def mouse_handler(mouse_event: MouseEvent) -> None: - hover = mouse_event.event_type == MouseEventType.MOUSE_MOVE - if ( - mouse_event.event_type == MouseEventType.MOUSE_DOWN - or hover - and focused - ): - # Toggle focus. - app = get_app() - if not hover: - if app.layout.has_focus(self.window): - if self.selected_menu == [i]: - app.layout.focus_last() - else: - app.layout.focus(self.window) - self.selected_menu = [i] - - yield ("class:menu-bar", " ", mouse_handler) - if i == self.selected_menu[0] and focused: - yield ("[SetMenuPosition]", "", mouse_handler) - style = "class:menu-bar.selected-item" - else: - style = "class:menu-bar" - yield style, item.text, mouse_handler - - result: StyleAndTextTuples = [] - for i, item in enumerate(self.menu_items): - result.extend(one_item(i, item)) - - return result - - def _submenu(self, level: int = 0) -> Window: - def get_text_fragments() -> StyleAndTextTuples: - result: StyleAndTextTuples = [] - if level < len(self.selected_menu): - menu = self._get_menu(level) - if menu.children: - result.append(("class:menu", Border.TOP_LEFT)) - result.append(("class:menu", Border.HORIZONTAL * (menu.width + 4))) - result.append(("class:menu", Border.TOP_RIGHT)) - result.append(("", "\n")) - try: - selected_item = self.selected_menu[level + 1] - except IndexError: - selected_item = -1 - - def one_item( - i: int, item: MenuItem - ) -> Iterable[OneStyleAndTextTuple]: - def mouse_handler(mouse_event: MouseEvent) -> None: - if item.disabled: - # The arrow keys can't interact with menu items that are disabled. - # The mouse shouldn't be able to either. - return - hover = mouse_event.event_type == MouseEventType.MOUSE_MOVE - if ( - mouse_event.event_type == MouseEventType.MOUSE_UP - or hover - ): - app = get_app() - if not hover and item.handler: - app.layout.focus_last() - item.handler() - else: - self.selected_menu = self.selected_menu[ - : level + 1 - ] + [i] - - if i == selected_item: - yield ("[SetCursorPosition]", "") - style = "class:menu-bar.selected-item" - else: - style = "" - - yield ("class:menu", Border.VERTICAL) - if item.text == "-": - yield ( - style + "class:menu-border", - f"{Border.HORIZONTAL * (menu.width + 3)}", - mouse_handler, - ) - else: - yield ( - style, - f" {item.text}".ljust(menu.width + 3), - mouse_handler, - ) - - if item.children: - yield (style, ">", mouse_handler) - else: - yield (style, " ", mouse_handler) - - if i == selected_item: - yield ("[SetMenuPosition]", "") - yield ("class:menu", Border.VERTICAL) - - yield ("", "\n") - - for i, item in enumerate(menu.children): - result.extend(one_item(i, item)) - - result.append(("class:menu", Border.BOTTOM_LEFT)) - result.append(("class:menu", Border.HORIZONTAL * (menu.width + 4))) - result.append(("class:menu", Border.BOTTOM_RIGHT)) - return result - - return Window(FormattedTextControl(get_text_fragments), style="class:menu") - - @property - def floats(self) -> list[Float] | None: - return self.container.floats - - def __pt_container__(self) -> Container: - return self.container - - -class MenuItem: - def __init__( - self, - text: str = "", - handler: Callable[[], None] | None = None, - children: list[MenuItem] | None = None, - shortcut: Sequence[Keys | str] | None = None, - disabled: bool = False, - ) -> None: - self.text = text - self.handler = handler - self.children = children or [] - self.shortcut = shortcut - self.disabled = disabled - self.selected_item = 0 - - @property - def width(self) -> int: - if self.children: - return max(get_cwidth(c.text) for c in self.children) - else: - return 0 diff --git a/voxvera/vendor/prompt_toolkit/widgets/toolbars.py b/voxvera/vendor/prompt_toolkit/widgets/toolbars.py deleted file mode 100644 index c5deffc..0000000 --- a/voxvera/vendor/prompt_toolkit/widgets/toolbars.py +++ /dev/null @@ -1,370 +0,0 @@ -from __future__ import annotations - -from typing import Any - -from prompt_toolkit.application.current import get_app -from prompt_toolkit.buffer import Buffer -from prompt_toolkit.enums import SYSTEM_BUFFER -from prompt_toolkit.filters import ( - Condition, - FilterOrBool, - emacs_mode, - has_arg, - has_completions, - has_focus, - has_validation_error, - to_filter, - vi_mode, - vi_navigation_mode, -) -from prompt_toolkit.formatted_text import ( - AnyFormattedText, - StyleAndTextTuples, - fragment_list_len, - to_formatted_text, -) -from prompt_toolkit.key_binding.key_bindings import ( - ConditionalKeyBindings, - KeyBindings, - KeyBindingsBase, - merge_key_bindings, -) -from prompt_toolkit.key_binding.key_processor import KeyPressEvent -from prompt_toolkit.key_binding.vi_state import InputMode -from prompt_toolkit.keys import Keys -from prompt_toolkit.layout.containers import ConditionalContainer, Container, Window -from prompt_toolkit.layout.controls import ( - BufferControl, - FormattedTextControl, - SearchBufferControl, - UIContent, - UIControl, -) -from prompt_toolkit.layout.dimension import Dimension -from prompt_toolkit.layout.processors import BeforeInput -from prompt_toolkit.lexers import SimpleLexer -from prompt_toolkit.search import SearchDirection - -__all__ = [ - "ArgToolbar", - "CompletionsToolbar", - "FormattedTextToolbar", - "SearchToolbar", - "SystemToolbar", - "ValidationToolbar", -] - -E = KeyPressEvent - - -class FormattedTextToolbar(Window): - def __init__(self, text: AnyFormattedText, style: str = "", **kw: Any) -> None: - # Note: The style needs to be applied to the toolbar as a whole, not - # just the `FormattedTextControl`. - super().__init__( - FormattedTextControl(text, **kw), - style=style, - dont_extend_height=True, - height=Dimension(min=1), - ) - - -class SystemToolbar: - """ - Toolbar for a system prompt. - - :param prompt: Prompt to be displayed to the user. - """ - - def __init__( - self, - prompt: AnyFormattedText = "Shell command: ", - enable_global_bindings: FilterOrBool = True, - ) -> None: - self.prompt = prompt - self.enable_global_bindings = to_filter(enable_global_bindings) - - self.system_buffer = Buffer(name=SYSTEM_BUFFER) - - self._bindings = self._build_key_bindings() - - self.buffer_control = BufferControl( - buffer=self.system_buffer, - lexer=SimpleLexer(style="class:system-toolbar.text"), - input_processors=[ - BeforeInput(lambda: self.prompt, style="class:system-toolbar") - ], - key_bindings=self._bindings, - ) - - self.window = Window( - self.buffer_control, height=1, style="class:system-toolbar" - ) - - self.container = ConditionalContainer( - content=self.window, filter=has_focus(self.system_buffer) - ) - - def _get_display_before_text(self) -> StyleAndTextTuples: - return [ - ("class:system-toolbar", "Shell command: "), - ("class:system-toolbar.text", self.system_buffer.text), - ("", "\n"), - ] - - def _build_key_bindings(self) -> KeyBindingsBase: - focused = has_focus(self.system_buffer) - - # Emacs - emacs_bindings = KeyBindings() - handle = emacs_bindings.add - - @handle("escape", filter=focused) - @handle("c-g", filter=focused) - @handle("c-c", filter=focused) - def _cancel(event: E) -> None: - "Hide system prompt." - self.system_buffer.reset() - event.app.layout.focus_last() - - @handle("enter", filter=focused) - async def _accept(event: E) -> None: - "Run system command." - await event.app.run_system_command( - self.system_buffer.text, - display_before_text=self._get_display_before_text(), - ) - self.system_buffer.reset(append_to_history=True) - event.app.layout.focus_last() - - # Vi. - vi_bindings = KeyBindings() - handle = vi_bindings.add - - @handle("escape", filter=focused) - @handle("c-c", filter=focused) - def _cancel_vi(event: E) -> None: - "Hide system prompt." - event.app.vi_state.input_mode = InputMode.NAVIGATION - self.system_buffer.reset() - event.app.layout.focus_last() - - @handle("enter", filter=focused) - async def _accept_vi(event: E) -> None: - "Run system command." - event.app.vi_state.input_mode = InputMode.NAVIGATION - await event.app.run_system_command( - self.system_buffer.text, - display_before_text=self._get_display_before_text(), - ) - self.system_buffer.reset(append_to_history=True) - event.app.layout.focus_last() - - # Global bindings. (Listen to these bindings, even when this widget is - # not focussed.) - global_bindings = KeyBindings() - handle = global_bindings.add - - @handle(Keys.Escape, "!", filter=~focused & emacs_mode, is_global=True) - def _focus_me(event: E) -> None: - "M-'!' will focus this user control." - event.app.layout.focus(self.window) - - @handle("!", filter=~focused & vi_mode & vi_navigation_mode, is_global=True) - def _focus_me_vi(event: E) -> None: - "Focus." - event.app.vi_state.input_mode = InputMode.INSERT - event.app.layout.focus(self.window) - - return merge_key_bindings( - [ - ConditionalKeyBindings(emacs_bindings, emacs_mode), - ConditionalKeyBindings(vi_bindings, vi_mode), - ConditionalKeyBindings(global_bindings, self.enable_global_bindings), - ] - ) - - def __pt_container__(self) -> Container: - return self.container - - -class ArgToolbar: - def __init__(self) -> None: - def get_formatted_text() -> StyleAndTextTuples: - arg = get_app().key_processor.arg or "" - if arg == "-": - arg = "-1" - - return [ - ("class:arg-toolbar", "Repeat: "), - ("class:arg-toolbar.text", arg), - ] - - self.window = Window(FormattedTextControl(get_formatted_text), height=1) - - self.container = ConditionalContainer(content=self.window, filter=has_arg) - - def __pt_container__(self) -> Container: - return self.container - - -class SearchToolbar: - """ - :param vi_mode: Display '/' and '?' instead of I-search. - :param ignore_case: Search case insensitive. - """ - - def __init__( - self, - search_buffer: Buffer | None = None, - vi_mode: bool = False, - text_if_not_searching: AnyFormattedText = "", - forward_search_prompt: AnyFormattedText = "I-search: ", - backward_search_prompt: AnyFormattedText = "I-search backward: ", - ignore_case: FilterOrBool = False, - ) -> None: - if search_buffer is None: - search_buffer = Buffer() - - @Condition - def is_searching() -> bool: - return self.control in get_app().layout.search_links - - def get_before_input() -> AnyFormattedText: - if not is_searching(): - return text_if_not_searching - elif ( - self.control.searcher_search_state.direction == SearchDirection.BACKWARD - ): - return "?" if vi_mode else backward_search_prompt - else: - return "/" if vi_mode else forward_search_prompt - - self.search_buffer = search_buffer - - self.control = SearchBufferControl( - buffer=search_buffer, - input_processors=[ - BeforeInput(get_before_input, style="class:search-toolbar.prompt") - ], - lexer=SimpleLexer(style="class:search-toolbar.text"), - ignore_case=ignore_case, - ) - - self.container = ConditionalContainer( - content=Window(self.control, height=1, style="class:search-toolbar"), - filter=is_searching, - ) - - def __pt_container__(self) -> Container: - return self.container - - -class _CompletionsToolbarControl(UIControl): - def create_content(self, width: int, height: int) -> UIContent: - all_fragments: StyleAndTextTuples = [] - - complete_state = get_app().current_buffer.complete_state - if complete_state: - completions = complete_state.completions - index = complete_state.complete_index # Can be None! - - # Width of the completions without the left/right arrows in the margins. - content_width = width - 6 - - # Booleans indicating whether we stripped from the left/right - cut_left = False - cut_right = False - - # Create Menu content. - fragments: StyleAndTextTuples = [] - - for i, c in enumerate(completions): - # When there is no more place for the next completion - if fragment_list_len(fragments) + len(c.display_text) >= content_width: - # If the current one was not yet displayed, page to the next sequence. - if i <= (index or 0): - fragments = [] - cut_left = True - # If the current one is visible, stop here. - else: - cut_right = True - break - - fragments.extend( - to_formatted_text( - c.display_text, - style=( - "class:completion-toolbar.completion.current" - if i == index - else "class:completion-toolbar.completion" - ), - ) - ) - fragments.append(("", " ")) - - # Extend/strip until the content width. - fragments.append(("", " " * (content_width - fragment_list_len(fragments)))) - fragments = fragments[:content_width] - - # Return fragments - all_fragments.append(("", " ")) - all_fragments.append( - ("class:completion-toolbar.arrow", "<" if cut_left else " ") - ) - all_fragments.append(("", " ")) - - all_fragments.extend(fragments) - - all_fragments.append(("", " ")) - all_fragments.append( - ("class:completion-toolbar.arrow", ">" if cut_right else " ") - ) - all_fragments.append(("", " ")) - - def get_line(i: int) -> StyleAndTextTuples: - return all_fragments - - return UIContent(get_line=get_line, line_count=1) - - -class CompletionsToolbar: - def __init__(self) -> None: - self.container = ConditionalContainer( - content=Window( - _CompletionsToolbarControl(), height=1, style="class:completion-toolbar" - ), - filter=has_completions, - ) - - def __pt_container__(self) -> Container: - return self.container - - -class ValidationToolbar: - def __init__(self, show_position: bool = False) -> None: - def get_formatted_text() -> StyleAndTextTuples: - buff = get_app().current_buffer - - if buff.validation_error: - row, column = buff.document.translate_index_to_position( - buff.validation_error.cursor_position - ) - - if show_position: - text = f"{buff.validation_error.message} (line={row + 1} column={column + 1})" - else: - text = buff.validation_error.message - - return [("class:validation-toolbar", text)] - else: - return [] - - self.control = FormattedTextControl(get_formatted_text) - - self.container = ConditionalContainer( - content=Window(self.control, height=1), filter=has_validation_error - ) - - def __pt_container__(self) -> Container: - return self.container diff --git a/voxvera/vendor/prompt_toolkit/win32_types.py b/voxvera/vendor/prompt_toolkit/win32_types.py deleted file mode 100644 index 79283b8..0000000 --- a/voxvera/vendor/prompt_toolkit/win32_types.py +++ /dev/null @@ -1,229 +0,0 @@ -from __future__ import annotations - -from ctypes import Structure, Union, c_char, c_long, c_short, c_ulong -from ctypes.wintypes import BOOL, DWORD, LPVOID, WCHAR, WORD -from typing import TYPE_CHECKING - -# Input/Output standard device numbers. Note that these are not handle objects. -# It's the `windll.kernel32.GetStdHandle` system call that turns them into a -# real handle object. -STD_INPUT_HANDLE = c_ulong(-10) -STD_OUTPUT_HANDLE = c_ulong(-11) -STD_ERROR_HANDLE = c_ulong(-12) - - -class COORD(Structure): - """ - Struct in wincon.h - http://msdn.microsoft.com/en-us/library/windows/desktop/ms682119(v=vs.85).aspx - """ - - if TYPE_CHECKING: - X: int - Y: int - - _fields_ = [ - ("X", c_short), # Short - ("Y", c_short), # Short - ] - - def __repr__(self) -> str: - return "{}(X={!r}, Y={!r}, type_x={!r}, type_y={!r})".format( - self.__class__.__name__, - self.X, - self.Y, - type(self.X), - type(self.Y), - ) - - -class UNICODE_OR_ASCII(Union): - if TYPE_CHECKING: - AsciiChar: bytes - UnicodeChar: str - - _fields_ = [ - ("AsciiChar", c_char), - ("UnicodeChar", WCHAR), - ] - - -class KEY_EVENT_RECORD(Structure): - """ - http://msdn.microsoft.com/en-us/library/windows/desktop/ms684166(v=vs.85).aspx - """ - - if TYPE_CHECKING: - KeyDown: int - RepeatCount: int - VirtualKeyCode: int - VirtualScanCode: int - uChar: UNICODE_OR_ASCII - ControlKeyState: int - - _fields_ = [ - ("KeyDown", c_long), # bool - ("RepeatCount", c_short), # word - ("VirtualKeyCode", c_short), # word - ("VirtualScanCode", c_short), # word - ("uChar", UNICODE_OR_ASCII), # Unicode or ASCII. - ("ControlKeyState", c_long), # double word - ] - - -class MOUSE_EVENT_RECORD(Structure): - """ - http://msdn.microsoft.com/en-us/library/windows/desktop/ms684239(v=vs.85).aspx - """ - - if TYPE_CHECKING: - MousePosition: COORD - ButtonState: int - ControlKeyState: int - EventFlags: int - - _fields_ = [ - ("MousePosition", COORD), - ("ButtonState", c_long), # dword - ("ControlKeyState", c_long), # dword - ("EventFlags", c_long), # dword - ] - - -class WINDOW_BUFFER_SIZE_RECORD(Structure): - """ - http://msdn.microsoft.com/en-us/library/windows/desktop/ms687093(v=vs.85).aspx - """ - - if TYPE_CHECKING: - Size: COORD - - _fields_ = [("Size", COORD)] - - -class MENU_EVENT_RECORD(Structure): - """ - http://msdn.microsoft.com/en-us/library/windows/desktop/ms684213(v=vs.85).aspx - """ - - if TYPE_CHECKING: - CommandId: int - - _fields_ = [("CommandId", c_long)] # uint - - -class FOCUS_EVENT_RECORD(Structure): - """ - http://msdn.microsoft.com/en-us/library/windows/desktop/ms683149(v=vs.85).aspx - """ - - if TYPE_CHECKING: - SetFocus: int - - _fields_ = [("SetFocus", c_long)] # bool - - -class EVENT_RECORD(Union): - if TYPE_CHECKING: - KeyEvent: KEY_EVENT_RECORD - MouseEvent: MOUSE_EVENT_RECORD - WindowBufferSizeEvent: WINDOW_BUFFER_SIZE_RECORD - MenuEvent: MENU_EVENT_RECORD - FocusEvent: FOCUS_EVENT_RECORD - - _fields_ = [ - ("KeyEvent", KEY_EVENT_RECORD), - ("MouseEvent", MOUSE_EVENT_RECORD), - ("WindowBufferSizeEvent", WINDOW_BUFFER_SIZE_RECORD), - ("MenuEvent", MENU_EVENT_RECORD), - ("FocusEvent", FOCUS_EVENT_RECORD), - ] - - -class INPUT_RECORD(Structure): - """ - http://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx - """ - - if TYPE_CHECKING: - EventType: int - Event: EVENT_RECORD - - _fields_ = [("EventType", c_short), ("Event", EVENT_RECORD)] # word # Union. - - -EventTypes = { - 1: "KeyEvent", - 2: "MouseEvent", - 4: "WindowBufferSizeEvent", - 8: "MenuEvent", - 16: "FocusEvent", -} - - -class SMALL_RECT(Structure): - """struct in wincon.h.""" - - if TYPE_CHECKING: - Left: int - Top: int - Right: int - Bottom: int - - _fields_ = [ - ("Left", c_short), - ("Top", c_short), - ("Right", c_short), - ("Bottom", c_short), - ] - - -class CONSOLE_SCREEN_BUFFER_INFO(Structure): - """struct in wincon.h.""" - - if TYPE_CHECKING: - dwSize: COORD - dwCursorPosition: COORD - wAttributes: int - srWindow: SMALL_RECT - dwMaximumWindowSize: COORD - - _fields_ = [ - ("dwSize", COORD), - ("dwCursorPosition", COORD), - ("wAttributes", WORD), - ("srWindow", SMALL_RECT), - ("dwMaximumWindowSize", COORD), - ] - - def __repr__(self) -> str: - return "CONSOLE_SCREEN_BUFFER_INFO({!r},{!r},{!r},{!r},{!r},{!r},{!r},{!r},{!r},{!r},{!r})".format( - self.dwSize.Y, - self.dwSize.X, - self.dwCursorPosition.Y, - self.dwCursorPosition.X, - self.wAttributes, - self.srWindow.Top, - self.srWindow.Left, - self.srWindow.Bottom, - self.srWindow.Right, - self.dwMaximumWindowSize.Y, - self.dwMaximumWindowSize.X, - ) - - -class SECURITY_ATTRIBUTES(Structure): - """ - http://msdn.microsoft.com/en-us/library/windows/desktop/aa379560(v=vs.85).aspx - """ - - if TYPE_CHECKING: - nLength: int - lpSecurityDescriptor: int - bInheritHandle: int # BOOL comes back as 'int'. - - _fields_ = [ - ("nLength", DWORD), - ("lpSecurityDescriptor", LPVOID), - ("bInheritHandle", BOOL), - ] diff --git a/voxvera/vendor/pygments-2.19.2.dist-info/INSTALLER b/voxvera/vendor/pygments-2.19.2.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/pygments-2.19.2.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/pygments-2.19.2.dist-info/METADATA b/voxvera/vendor/pygments-2.19.2.dist-info/METADATA deleted file mode 100644 index 2eff6a0..0000000 --- a/voxvera/vendor/pygments-2.19.2.dist-info/METADATA +++ /dev/null @@ -1,58 +0,0 @@ -Metadata-Version: 2.4 -Name: Pygments -Version: 2.19.2 -Summary: Pygments is a syntax highlighting package written in Python. -Project-URL: Homepage, https://pygments.org -Project-URL: Documentation, https://pygments.org/docs -Project-URL: Source, https://github.com/pygments/pygments -Project-URL: Bug Tracker, https://github.com/pygments/pygments/issues -Project-URL: Changelog, https://github.com/pygments/pygments/blob/master/CHANGES -Author-email: Georg Brandl -Maintainer: Matthäus G. Chajdas -Maintainer-email: Georg Brandl , Jean Abou Samra -License: BSD-2-Clause -License-File: AUTHORS -License-File: LICENSE -Keywords: syntax highlighting -Classifier: Development Status :: 6 - Mature -Classifier: Intended Audience :: Developers -Classifier: Intended Audience :: End Users/Desktop -Classifier: Intended Audience :: System Administrators -Classifier: License :: OSI Approved :: BSD License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: 3.13 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Topic :: Text Processing :: Filters -Classifier: Topic :: Utilities -Requires-Python: >=3.8 -Provides-Extra: plugins -Provides-Extra: windows-terminal -Requires-Dist: colorama>=0.4.6; extra == 'windows-terminal' -Description-Content-Type: text/x-rst - -Pygments -~~~~~~~~ - -Pygments is a syntax highlighting package written in Python. - -It is a generic syntax highlighter suitable for use in code hosting, forums, -wikis or other applications that need to prettify source code. Highlights -are: - -* a wide range of over 500 languages and other text formats is supported -* special attention is paid to details, increasing quality by a fair amount -* support for new languages and formats are added easily -* a number of output formats, presently HTML, LaTeX, RTF, SVG, all image - formats that PIL supports and ANSI sequences -* it is usable as a command-line tool and as a library - -Copyright 2006-2025 by the Pygments team, see ``AUTHORS``. -Licensed under the BSD, see ``LICENSE`` for details. diff --git a/voxvera/vendor/pygments-2.19.2.dist-info/RECORD b/voxvera/vendor/pygments-2.19.2.dist-info/RECORD deleted file mode 100644 index 3a2a19b..0000000 --- a/voxvera/vendor/pygments-2.19.2.dist-info/RECORD +++ /dev/null @@ -1,346 +0,0 @@ -../../bin/pygmentize,sha256=0Ek1aUsGndfaDY0X6CNhSbklx2Y_C_tUQCb8kdWf4BI,215 -pygments-2.19.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pygments-2.19.2.dist-info/METADATA,sha256=euEA1n1nAGxkeYA92DX89HqbWfrHlEQeqOZqp_WYTYI,2512 -pygments-2.19.2.dist-info/RECORD,, -pygments-2.19.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87 -pygments-2.19.2.dist-info/entry_points.txt,sha256=uUXw-XhMKBEX4pWcCtpuTTnPhL3h7OEE2jWi51VQsa8,53 -pygments-2.19.2.dist-info/licenses/AUTHORS,sha256=BmDjGKbyFYAq3Icxq4XQxl_yfPzKP10oWX8wZHYZW9k,10824 -pygments-2.19.2.dist-info/licenses/LICENSE,sha256=qdZvHVJt8C4p3Oc0NtNOVuhjL0bCdbvf_HBWnogvnxc,1331 -pygments/__init__.py,sha256=_3UT86TGpHuW8FekdZ8uLidEZH1NhmcLiOy2KKNPCt4,2959 -pygments/__main__.py,sha256=p8AJyoyCOMYGvzWHdnq0_A9qaaVqaj02nIu3xhJp1_4,348 -pygments/cmdline.py,sha256=4pL9Kpn2PUEKPobgrsQgg-vCx2NjsrapKzQ6LxQR7Q0,23536 -pygments/console.py,sha256=AagDWqwea2yBWf10KC9ptBgMpMjxKp8yABAmh-NQOVk,1718 -pygments/filter.py,sha256=YLtpTnZiu07nY3oK9nfR6E9Y1FBHhP5PX8gvkJWcfag,1910 -pygments/filters/__init__.py,sha256=B00KqPCQh5E0XhzaDK74Qa1E4fDSTlD6b0Pvr1v-vEQ,40344 -pygments/formatter.py,sha256=H_4J-moKkKfRWUOW9J0u7hhw6n1LiO-2Xu1q2B0sE5w,4366 -pygments/formatters/__init__.py,sha256=7OuvmoYLyoPzoOQV_brHG8GSKYB_wjFSkAQng6x2y9g,5349 -pygments/formatters/_mapping.py,sha256=1Cw37FuQlNacnxRKmtlPX4nyLoX9_ttko5ZwscNUZZ4,4176 -pygments/formatters/bbcode.py,sha256=s0Ka35OKuIchoSgEAGf6rj0rl2a9ym9L31JVNSRbZFQ,3296 -pygments/formatters/groff.py,sha256=pLcIHj4jJS_lRAVFnyJODKDu1Xlyl9_AEIdOtbl3DT0,5082 -pygments/formatters/html.py,sha256=FrHJ69FUliEyPY0zTfab0C1gPf7LXsKgeRlhwkniqIs,35953 -pygments/formatters/img.py,sha256=aRpFo8mBmWTL3sBUjRCWkeS3rc6FZrSFC4EksDrl53g,23301 -pygments/formatters/irc.py,sha256=R0Js0TYWySlI2yE9sW6tN4d4X-x3k9ZmudsijGPnLmU,4945 -pygments/formatters/latex.py,sha256=BRYtbLeW_YD1kwhhnFInhJIKylurnri8CF1lP069KWE,19258 -pygments/formatters/other.py,sha256=8pYW27sU_7XicLUqOEt2yWSO0h1IEUM3TIv34KODLwo,4986 -pygments/formatters/pangomarkup.py,sha256=pcFvEC7K1Me0EjGeOZth4oCnEY85bfqc77XzZASEPpY,2206 -pygments/formatters/rtf.py,sha256=kcKMCxTXu-2-hpgEftlGJRm7Ss-yA_Sy8OsHH_qzykA,11921 -pygments/formatters/svg.py,sha256=R6A2ME6JsMQWFiyn8wcKwFUOD6vsu-HLwiIztLu-77E,7138 -pygments/formatters/terminal.py,sha256=J_F_dFXwR9LHWvatIDnwqRYJyjVmSo1Zx8K_XDh6SyM,4626 -pygments/formatters/terminal256.py,sha256=7GQFLE5cfmeu53CAzANO74-kBk2BFkXfn5phmZjYkhM,11717 -pygments/lexer.py,sha256=ib-F_0GxHkwGpb6vWP0DeLMLc7EYgjo3hWFKN5IgOq0,35109 -pygments/lexers/__init__.py,sha256=6YhzxGKlWk38P6JpIJUQ1rVvV0DEZjEmdYsdMQ58hSk,12067 -pygments/lexers/_ada_builtins.py,sha256=CA_OnShtdc7wWh9oYcRlcrkDAQwYUKl6w7tdSbALQd4,1543 -pygments/lexers/_asy_builtins.py,sha256=cd9M00YH19w5ZL7aqucmC3nwpJGTS04U-01NLy5E2_4,27287 -pygments/lexers/_cl_builtins.py,sha256=kQeUIyZjP4kX0frkICDcKxBYQCLqzIDXa5WV5cevhDo,13994 -pygments/lexers/_cocoa_builtins.py,sha256=Ka1lLJe7JfWtdho4IFIB82X9yBvrbfHCCmEG-peXXhQ,105173 -pygments/lexers/_csound_builtins.py,sha256=qnQYKeI26ZHim316uqy_hDiRiCoHo2RHjD3sYBALyXs,18414 -pygments/lexers/_css_builtins.py,sha256=aD-dhLFXVd1Atn_bZd7gEdQn7Mhe60_VHpvZ340WzDI,12446 -pygments/lexers/_googlesql_builtins.py,sha256=IkrOk-T2v1yzbGzUEEQh5_Cf4uC_cmL_uuhwDpZlTug,16132 -pygments/lexers/_julia_builtins.py,sha256=N2WdSw5zgI2fhDat_i4YeVqurRTC_P8x71ez00SCN6U,11883 -pygments/lexers/_lasso_builtins.py,sha256=8q1gbsrMJeaeUhxIYKhaOxC9j_B-NBpq_XFj2Ze41X0,134510 -pygments/lexers/_lilypond_builtins.py,sha256=XTbGL1z1oKMoqWLEktG33jx5GdGTI9CpeO5NheEi4Y0,108094 -pygments/lexers/_lua_builtins.py,sha256=PhFdZV5-Tzz2j_q4lvG9lr84ELGfL41BhnrSDNNTaG4,8108 -pygments/lexers/_luau_builtins.py,sha256=-IDrU04kUVfjXwSQzMMpXmMYhNsQxZVVZk8cuAA0Lo0,955 -pygments/lexers/_mapping.py,sha256=9fv7xYOUAOr6LzfdFS4MDbPu78o4OQQH-2nsI1bNZf4,70438 -pygments/lexers/_mql_builtins.py,sha256=ybRQjlb7Cul0sDstnzxJl3h0qS6Ieqsr811fqrxyumU,24713 -pygments/lexers/_mysql_builtins.py,sha256=y0kAWZVAs0z2dTFJJV42OZpILgRnd8T3zSlBFv-g_oA,25838 -pygments/lexers/_openedge_builtins.py,sha256=Sz4j9-CPWIaxMa-2fZgY66j7igcu1ob1GR2UtI8zAkg,49398 -pygments/lexers/_php_builtins.py,sha256=Jd4BZpjMDELPi4EVoSxK1-8BFTc63HUwYfm1rLrGj0M,107922 -pygments/lexers/_postgres_builtins.py,sha256=Pqh4z0RBRbnW6rCQtWUdzWCJxNyqpJ7_0HOktxHDxk4,13343 -pygments/lexers/_qlik_builtins.py,sha256=xuJy9c9uZDXv6h8z582P5PrxqkxTZ_nS8gPl9OD9VN8,12595 -pygments/lexers/_scheme_builtins.py,sha256=2hNtJOJmP21lUsikpqMJ2gAmLT3Rwn_KEeqhXwCjgfk,32564 -pygments/lexers/_scilab_builtins.py,sha256=oZYPB1XPdIEz3pII11pFDe6extRRyWGA7pY06X8KZ8w,52411 -pygments/lexers/_sourcemod_builtins.py,sha256=H8AFLsNDdEpymIWOpDwbDJGCP1w-x-1gSlzPDioMF4o,26777 -pygments/lexers/_sql_builtins.py,sha256=oe8F9wWuO2iS6nEsZAdJtCUChBTjgM1Sq_aipu74jXM,6767 -pygments/lexers/_stan_builtins.py,sha256=dwi1hllM_NsaCv-aXJy7lEi57X5Hh5gSD97aCQyT9KM,13445 -pygments/lexers/_stata_builtins.py,sha256=Hqrr6j77zWU3cGGpBPohwexZci43YA4_sVYE4E1sNow,27227 -pygments/lexers/_tsql_builtins.py,sha256=Pi2RhTXcLE3glI9oxNhyVsOMn-fK_1TRxJ-EsYP5LcI,15460 -pygments/lexers/_usd_builtins.py,sha256=c9hbU1cwqBUCFIhNfu_Dob8ywv1rlPhi9w2OTj3kR8s,1658 -pygments/lexers/_vbscript_builtins.py,sha256=MqJ2ABywD21aSRtWYZRG64CCbGstC1kfsiHGJmZzxiw,4225 -pygments/lexers/_vim_builtins.py,sha256=bA4mH8t1mPPQfEiUCKEqRO1O0rL2DUG0Ux1Bt8ZSu0E,57066 -pygments/lexers/actionscript.py,sha256=JBngCe5UhYT_0dLD2j7PnPO0xRRJhmypEuQ-C5in8pY,11727 -pygments/lexers/ada.py,sha256=58k5ra1vGS4iLpW3h1ItY9ftzF3WevaeAAXzAYTiYkQ,5353 -pygments/lexers/agile.py,sha256=DN-7AVIqtG1MshA94rtSGYI_884hVHgzq405wD0_dl8,896 -pygments/lexers/algebra.py,sha256=yGTu9Tt-cQzAISQYIC5MS5a3z4QmL-tGcXnd_pkWGbk,9952 -pygments/lexers/ambient.py,sha256=UnzKpIlfSm3iitHvMd7XTMSY8TjZYYhKOC3AiARS_cE,2605 -pygments/lexers/amdgpu.py,sha256=S8qjn2UMLhBFm3Yn_c06XAGf8cl5x_ZeluelWG_-JAw,1723 -pygments/lexers/ampl.py,sha256=ZBRfDXm760gR1a1gqItnsHuoO3JdUcTBjJ5tFY9UtPA,4176 -pygments/lexers/apdlexer.py,sha256=Zr5-jgjxC8PKzRlEeclakZXPHci7FHBZghQ6wwiuT7A,30800 -pygments/lexers/apl.py,sha256=PTQMp-bxT5P-DbrEvFha10HBTcsDJ5srL3I1s9ljz58,3404 -pygments/lexers/archetype.py,sha256=pQVlP1Fb5OA8nn7QwmFaaaOSvvpoIsQVw43FVCQCve4,11538 -pygments/lexers/arrow.py,sha256=2PKdbWq3xQLF1KoDbWvSxpjwKRrznnDiArTflRGZzBo,3564 -pygments/lexers/arturo.py,sha256=U5MtRNHJtnBn4ZOeWmW6MKlVRG7SX6KhTRamDqzn9tA,11414 -pygments/lexers/asc.py,sha256=-DgZl9jccBDHPlDmjCsrEqx0-Q7ap7XVdNKtxLNWG1w,1693 -pygments/lexers/asm.py,sha256=xm2Y5mcT-sF3oQvair4SWs9EWTyndoaUoSsDy5v6shI,41967 -pygments/lexers/asn1.py,sha256=BlcloIX2bu6Q7BxGcksuhYFHGsXLVKyB4B9mFd4Pj6E,4262 -pygments/lexers/automation.py,sha256=Q61qon8EwpfakMh_2MS2E2zUUT16rG3UNIKPYjITeTs,19831 -pygments/lexers/bare.py,sha256=tWoei86JJX1k-ADhaXd5TgX6ItDTici9yFWpkTPhnfM,3020 -pygments/lexers/basic.py,sha256=qpVe5h8Fa7NJo1EihN-4R_UZpHO6my2Ssgkb-BktkKs,27989 -pygments/lexers/bdd.py,sha256=yysefcOFAEyk9kJ2y4EXmzJTecgLYUHlWixt_3YzPMU,1641 -pygments/lexers/berry.py,sha256=zxGowFb8HMIyN15-m8nmWnW6bPRR4esKtSEVugc9uXM,3209 -pygments/lexers/bibtex.py,sha256=yuNoPxwrJf9DCGUT17hxfDzbq_HtCLkQkRbBtiTVmeQ,4811 -pygments/lexers/blueprint.py,sha256=NzvWHMxCLDWt8hc6gB5jokltxVJgNa7Jwh4c61ng388,6188 -pygments/lexers/boa.py,sha256=dOot1XWNZThPIio2UyAX67K6EpISjSRCFjotD7dcnwE,3921 -pygments/lexers/bqn.py,sha256=nJiwrPKKbRF-qdai5tfqipwBkkko2P3weiZAjHUMimY,3671 -pygments/lexers/business.py,sha256=lRtekOJfsDkb12AGbuz10-G67OJrVJgCBtihTQ8_aoY,28345 -pygments/lexers/c_cpp.py,sha256=D7ZIswaHASlGBgoTlwnSqTQHf8_JyvvSt2L2q1W-F6g,18059 -pygments/lexers/c_like.py,sha256=FTGp17ds6X2rDZOHup2hH6BEn3gKK4nLm9pydNEhm0E,32021 -pygments/lexers/capnproto.py,sha256=XQJAh1WS-0ulqbTn9TdzR6gEgWLcuBqb4sj3jNsrhsY,2174 -pygments/lexers/carbon.py,sha256=av12YuTGZGpOa1Cmxp3lppx3LfSJUWbvOu0ixmUVll0,3211 -pygments/lexers/cddl.py,sha256=MKa70IwABgjBjYu15_Q9v8rsu2sr1a-i2jkiaPTI6sM,5076 -pygments/lexers/chapel.py,sha256=0n_fL3ehLC4pw4YKnmq9jxIXOJcxGPka1Wr1t1zsXPc,5156 -pygments/lexers/clean.py,sha256=dkDPAwF5BTALPeuKFoRKOSD3RfsKcGWbaRo6_G8LHng,6418 -pygments/lexers/codeql.py,sha256=ebvghn2zbrnETV4buVozMDmRCVKSdGiIN8ycLlHpGsE,2576 -pygments/lexers/comal.py,sha256=TC3NzcJ58ew5jw7qwK0kJ-okTA47psZje0yAIS39HR4,3179 -pygments/lexers/compiled.py,sha256=Slfo1sjWqcPawUwf0dIIZLBCL5pkOIoAX2S8Lxs02Mc,1426 -pygments/lexers/configs.py,sha256=wW8pY0Sa5a10pnAeTLGf48HhixQTVageIyHEf1aYMCc,50913 -pygments/lexers/console.py,sha256=-jAG120dupvV3kG3zC70brLJvSLwTFqMubBQuj_GVnU,4180 -pygments/lexers/cplint.py,sha256=DkbyE5EKydLgf6BRr1FhQrK-IeQPL7Zmjk0DVdlRFnQ,1389 -pygments/lexers/crystal.py,sha256=xU-RnpIkpjrquoxtOuOcP8fcesSJl4xhU7kO9m42LZY,15754 -pygments/lexers/csound.py,sha256=ioSw4Q04wdwjUAbnTZ1qLhUq1vxdWFxhh3QtEl5RAJc,16998 -pygments/lexers/css.py,sha256=JN1RBYsee-jrpHWrSmhN3TKc4TkOBn-_BEGpgTCzcqE,25376 -pygments/lexers/d.py,sha256=piOy0EJeiAwPHugiM3gVv0z7HNh3u2gZQoCUSASRbY4,9920 -pygments/lexers/dalvik.py,sha256=deFg2JPBktJ9mEGb9EgxNkmd6vaMjJFQVzUHo8NKIa8,4606 -pygments/lexers/data.py,sha256=o0x0SmB5ms_CPUPljEEEenOON4IQWn86DkwFjkJYCOg,27026 -pygments/lexers/dax.py,sha256=ASi73qmr7OA7cVZXF2GTYGt01Ly1vY8CgD_Pnpm8k-4,8098 -pygments/lexers/devicetree.py,sha256=RecSQCidt8DRE1QFCPUbwwR0hiRlNtsFihdGldeUn3k,4019 -pygments/lexers/diff.py,sha256=F6vxZ64wm5Nag_97de1H_3F700ZwCVnYjKvtT5jilww,5382 -pygments/lexers/dns.py,sha256=Hh5hJ7MXfrq36KgfyIRwK3X8o1LdR98IKERcV4eZ7HY,3891 -pygments/lexers/dotnet.py,sha256=NDE0kOmpe96GLO-zwNLazmj77E9ORGmKpa4ZMCXDXxQ,39441 -pygments/lexers/dsls.py,sha256=GnHKhGL5GxsRFnqC7-65NTPZLOZdmnllNrGP86x_fQE,36746 -pygments/lexers/dylan.py,sha256=7zZ1EbHWXeVHqTD36AqykKqo3fhuIh4sM-whcxUaH_Y,10409 -pygments/lexers/ecl.py,sha256=vhmpa2LBrHxsPkYcf3kPZ1ItVaLRDTebi186wY0xGZA,6371 -pygments/lexers/eiffel.py,sha256=5ydYIEFcgcMoEj4BlK31hZ0aJb8OX0RdAvuCNdlxwqw,2690 -pygments/lexers/elm.py,sha256=uRCddU8jK5vVkH6Y66y8KOsDJprIfrOgeYq3hv1PxAM,3152 -pygments/lexers/elpi.py,sha256=O9j_WKBPyvNFjCRuPciVpW4etVSnILm_T79BhCPZYmo,6877 -pygments/lexers/email.py,sha256=ZZL6yvwCRl1CEQyysuOu0lbabp5tjMutS7f3efFKGR4,4804 -pygments/lexers/erlang.py,sha256=bU11eVHvooLwmVknzN6Xkb2DMk7HbenqdNlYSzhThDM,19147 -pygments/lexers/esoteric.py,sha256=Jfp8UUKyKYsqLaqXRZT3GSM9dzkF65zduwfnH1GoGhU,10500 -pygments/lexers/ezhil.py,sha256=22r-xjvvBVpExTqCI-HycAwunDb1p5gY4tIfDmM0vDw,3272 -pygments/lexers/factor.py,sha256=urZ4En4uKFCLXdEkXLWg9EYUFGHQTTDCwNXtyq-ngok,19530 -pygments/lexers/fantom.py,sha256=JJ13-NwykD-iIESnuzCefCYeQDO95cHMJA8TasF4gHA,10231 -pygments/lexers/felix.py,sha256=F-v0si4zPtRelqzDQWXI1-tarCE-BvawziODxRU7378,9655 -pygments/lexers/fift.py,sha256=rOCwp3v5ocK5YOWvt7Td3Md--97_8e-7Sonx52uS8mA,1644 -pygments/lexers/floscript.py,sha256=aHh82k52jMuDuzl9LatrcSANJiXTCyjGU3SO53bwbb0,2667 -pygments/lexers/forth.py,sha256=ZMtsHdNbnS_0IdSYlfAlfTSPEr0MEsRo-YZriQNueTQ,7193 -pygments/lexers/fortran.py,sha256=1PE5dTxf4Df6LUeXFcmNtyeXWsC8tSiK5dYwPHIJeeQ,10382 -pygments/lexers/foxpro.py,sha256=CBkW62Fuibz3yfyelZCaEO8GGdFJWsuRhqwtsSeBwLM,26295 -pygments/lexers/freefem.py,sha256=LFBQk-m1-nNCgrl-VDH3QwnVWurvb7W29i06LoT207A,26913 -pygments/lexers/func.py,sha256=OR2rkM7gf9fKvad5WcFQln-_U_pb-RUCM9eQatToF4A,3700 -pygments/lexers/functional.py,sha256=fYT2AGZ642cRkIAId0rnXFBsx1c8LLEDRN_VuCEkUyM,693 -pygments/lexers/futhark.py,sha256=Vf1i4t-tR3zqaktVjhTzFNg_ts_9CcyA4ZDfDizbCmk,3743 -pygments/lexers/gcodelexer.py,sha256=4Xs9ax4-JZGupW_qSnHon39wQGpb-tNA3xorMKg841E,874 -pygments/lexers/gdscript.py,sha256=Ws7JKxy0M0IyZ_1iMfRvJPrizEwmeCNLDoeMIFaM-CU,7566 -pygments/lexers/gleam.py,sha256=XIlTcq6cB743pCqbNYo8PocSkjZyDPR6hHgdaJNJ1Vc,2392 -pygments/lexers/go.py,sha256=4LezefgyuqZWHzLZHieUkKTi-ssY6aHJxx7Z-LFaLK0,3783 -pygments/lexers/grammar_notation.py,sha256=LvzhRQHgwZzq9oceukZS_hwnKK58ee7Z5d0cwXOR734,8043 -pygments/lexers/graph.py,sha256=WFqoPA1c_hHYrV0i_F7-eUw3Co4_HmZY3GJ-TyDr670,4108 -pygments/lexers/graphics.py,sha256=tmF9NNALnvPnax8ywYC3pLOla45YXtp9UA0H-5EiTQY,39145 -pygments/lexers/graphql.py,sha256=O_zcrGrBaDaKTlUoJGRruxqk7CJi-NR92Y0Cs-KkCvw,5601 -pygments/lexers/graphviz.py,sha256=mzdXOMpwz9_V-be1eTAMyhkKCBl6UxCIXuq6C2yrtsw,1934 -pygments/lexers/gsql.py,sha256=VPZk9sb26-DumRkWfEaSTeoc0lx5xt5n-6eDDLezMtc,3990 -pygments/lexers/hare.py,sha256=PGCOuILktJsmtTpCZZKkMFtObfJuBpei8HM8HHuq1Tw,2649 -pygments/lexers/haskell.py,sha256=MYr74-PAC8kGJRX-dZmvZsHTc7a2u6yFS2B19LfDD7g,33262 -pygments/lexers/haxe.py,sha256=WHCy_nrXHnfLITfbdp3Ji3lqQU4HAsTUpXsLCp2_4sk,30974 -pygments/lexers/hdl.py,sha256=MOWxhmAuE4Ei0CKDqqaON7T8tl43geancrNYM136Z0U,22738 -pygments/lexers/hexdump.py,sha256=1lj9oJ-KiZXSVYvTMfGmEAQzNEW08WlMcC2I5aYvHK4,3653 -pygments/lexers/html.py,sha256=MxYTI4EeT7QxoGleCAyQq-8n_Sgly6tD95H5zanCNmk,21977 -pygments/lexers/idl.py,sha256=rcihUAGhfuGEaSW6pgFq6NzplT_pv0DagUoefg4zAmk,15449 -pygments/lexers/igor.py,sha256=wVefbUjb3ftaW3LCKGtX1JgLgiY4EmRor5gVOn8vQA8,31633 -pygments/lexers/inferno.py,sha256=ChE_5y5SLH_75Uv7D2dKWQMk2dlN6z1gY1IDjlJZ8rU,3135 -pygments/lexers/installers.py,sha256=ZHliit4Pxz1tYKOIjKkDXI5djTkpzYUMVIPR1xvUrL8,14435 -pygments/lexers/int_fiction.py,sha256=0ZzIa1sZDUQsltd1oHuS-BoNiOF8zKQfcVuDyK1Ttv8,56544 -pygments/lexers/iolang.py,sha256=L6dNDCLH0kxkIUi00fI4Z14QnRu79UcNDrgv02c5Zw8,1905 -pygments/lexers/j.py,sha256=DqNdwQGFLiZW3mCNLRg81gpmsy4Hgcai_9NP3LbWhNU,4853 -pygments/lexers/javascript.py,sha256=TGKQLSrCprCKfhLLGAq_0EOdvqvJKX9pOdKo7tCRurQ,63243 -pygments/lexers/jmespath.py,sha256=R5yA5LJ2nTIaDwnFIpSNGAThd0sAYFccwawA9xBptlg,2082 -pygments/lexers/jslt.py,sha256=OeYQf8O2_9FCaf9W6Q3a7rPdAFLthePCtVSgCrOTcl8,3700 -pygments/lexers/json5.py,sha256=8JZbc8EiTEZdKaIdQg3hXEh0mHWSzPlwd473a0nUuT0,2502 -pygments/lexers/jsonnet.py,sha256=bx2G6J4tJqGrJV1PyZrIWzWHXcoefCX-4lIxxtbn2gw,5636 -pygments/lexers/jsx.py,sha256=wGsoGSB40qAJrVfXwRPtan7OcK0O87RVsHHk0m6gogk,2693 -pygments/lexers/julia.py,sha256=0ZDJ9X83V5GqJzA6T6p0TTN8WHy2JAjvu-FSBXvfXdc,11710 -pygments/lexers/jvm.py,sha256=Yt1iQ3QodXRY-x_HUOGedhyuBBHn5jYH-I8NzOzHTlE,72667 -pygments/lexers/kuin.py,sha256=3dKKJVJlskgrvMKv2tY9NOsFfDjyo-3MLcJ1lFKdXSg,11405 -pygments/lexers/kusto.py,sha256=kaxkoPpEBDsBTCvCOkZZx7oGfv0jk_UNIRIRbfVAsBE,3477 -pygments/lexers/ldap.py,sha256=77vF4t_19x9V522cxRCM5d3HW8Ne3giYsFsMPVYYBw4,6551 -pygments/lexers/lean.py,sha256=7HWRgxFsxS1N9XKqw0vfKwaxl27s5YiVYtZeRUoTHFo,8570 -pygments/lexers/lilypond.py,sha256=yd2Tuv67um6EyCIr-VwBnlPhTHxMaQsBJ4nGgO5fjIk,9752 -pygments/lexers/lisp.py,sha256=EHUy1g4pzEsYPE-zGj2rAXm3YATE1j9dCQOr5-JPSkU,157668 -pygments/lexers/macaulay2.py,sha256=zkV-vxjQYa0Jj9TGfFP1iMgpTZ4ApQuAAIdJVGWb2is,33366 -pygments/lexers/make.py,sha256=YMI5DBCrxWca-pz9cVXcyfuHLcikPx9R_3pW_98Myqo,7831 -pygments/lexers/maple.py,sha256=Rs0dEmOMD3C1YQPd0mntN-vzReq4XfHegH6xV4lvJWo,7960 -pygments/lexers/markup.py,sha256=zWtxsyIx_1OxQzS6wLe8bEqglePv4RqvJjbia8AvV5c,65088 -pygments/lexers/math.py,sha256=P3ZK1ePd8ZnLdlmHezo2irCA8T2-nlHBoSaBoT5mEVI,695 -pygments/lexers/matlab.py,sha256=F9KO4qowIhfP8oVhCRRzE_1sqg4zmQbsB2NZH193PiM,133027 -pygments/lexers/maxima.py,sha256=a0h9Ggs9JEovTrzbJT-BLVbOqI29yPnaMZlkU5f_FeY,2715 -pygments/lexers/meson.py,sha256=BMrsDo6BH2lzTFw7JDwQ9SDNMTrRkXCNRDVf4aFHdsI,4336 -pygments/lexers/mime.py,sha256=yGrf3h37LK4b6ERBpFiL_qzn3JgOfGR5KLagnbWFl6c,7582 -pygments/lexers/minecraft.py,sha256=Nu88snDDPzM0D-742fFdUriczL-EE911pAd4_I4-pAw,13696 -pygments/lexers/mips.py,sha256=STKiZT67b3QERXXn7XKVxlPBu7vwbPC5EyCpuf3Jfbw,4656 -pygments/lexers/ml.py,sha256=t8sCv4BjvuBq6AihKKUwStEONIgdXCC2RMtO0RopNbM,35390 -pygments/lexers/modeling.py,sha256=M7B58bGB-Zwd1EmPxKqtRvg7TgNCyem3MVUHv0_H2SQ,13683 -pygments/lexers/modula2.py,sha256=NtpXBRoUCeHfflgB39LknSkCwhBHBKv2Er_pinjVsNE,53072 -pygments/lexers/mojo.py,sha256=8JRVoftN1E-W2woG0K-4n8PQXTUM9iY6Sl5sWb2uGNg,24233 -pygments/lexers/monte.py,sha256=baWU6zlXloenw9MO1MtEVGE9i3CfiXAYhqU621MIjRk,6289 -pygments/lexers/mosel.py,sha256=gjRdedhA1jTjoYoM1Gpaoog_I9o7TRbYMHk97N1TXwg,9297 -pygments/lexers/ncl.py,sha256=zJ6ahlitit4S0pBXc7Wu96PB7xOn59MwfR2HdY5_C60,63999 -pygments/lexers/nimrod.py,sha256=Q1NSqEkLC5wWt7xJyKC-vzWw_Iw2SfDNP_pyMFBuIfA,6413 -pygments/lexers/nit.py,sha256=p_hVD8GzMRl3CABVKHtYgnXFUQk0i5F2FbWFA6WXm6s,2725 -pygments/lexers/nix.py,sha256=NOrv20gdq-2A7eZ6c2gElPHv1Xx2pvv20-qOymL9GMg,4421 -pygments/lexers/numbair.py,sha256=fxkp2CXeXWKBMewfi1H4JSYkmm4kU58wZ2Sh9BDYAWQ,1758 -pygments/lexers/oberon.py,sha256=jw403qUUs7zpTHAs5CbLjb8qiuwtxLk0spDIYqGZwAw,4210 -pygments/lexers/objective.py,sha256=Fo1WB3JMj8sNeYnvB84H4_qwhOt4WNJtJWjVEOwrJGk,23297 -pygments/lexers/ooc.py,sha256=kD1XaJZaihDF_s-Vyu1Bx68S_9zFt2rhox7NF8LpOZM,3002 -pygments/lexers/openscad.py,sha256=h9I1k8kiuQmhX5vZm6VDSr2fa5Finy0sN8ZDIE-jx1c,3700 -pygments/lexers/other.py,sha256=WLVyqPsvm9oSXIbZwbfyJloS6HGgoFW5nVTaU1uQpTw,1763 -pygments/lexers/parasail.py,sha256=DWMGhtyQgGTXbIgQl_mID6CKqi-Dhbvs_dTkmvrZXfE,2719 -pygments/lexers/parsers.py,sha256=feNgxroPoWRf0NEsON2mtmKDUfslIQppukw6ndEsQ3M,26596 -pygments/lexers/pascal.py,sha256=N2tRAjlXnTxggAzzk2tOOAVzeC2MBzrXy97_HQl5n44,30989 -pygments/lexers/pawn.py,sha256=LWUYQYsebMMt2d5oxX1HYWvBqbakR1h7Av_z8Vw94Wg,8253 -pygments/lexers/pddl.py,sha256=Mk4_BzlROJCd0xR4KKRRSrbj0F7LLQcBRjmsmtWmrCg,2989 -pygments/lexers/perl.py,sha256=9BXn3tyHMA49NvzbM9E2czSCHjeU7bvaPLUcoZrhz-4,39192 -pygments/lexers/phix.py,sha256=hZqychqo5sFMBDESzDPXg1DYHQe_9sn294UfbjihaFk,23249 -pygments/lexers/php.py,sha256=l4hzQrlm0525i5dSw9Vmjcai3TzbPT6DkjzxPg9l6Zc,13061 -pygments/lexers/pointless.py,sha256=WSDjqQyGrNIGmTCdaMxl4zk7OZTlJAMzeUZ02kfgcTI,1974 -pygments/lexers/pony.py,sha256=EXrMkacqMZblI7v4AvBRQe-3Py8__bx5FOgjCLdfXxQ,3279 -pygments/lexers/praat.py,sha256=4UFK-nbC6WkZBhJgcQqEGqq9CocJkW7AmT_OJQbjWzk,12676 -pygments/lexers/procfile.py,sha256=05W2fyofLTP-FbEdSXD1eles-PPqVNfF6RWXjQdW2us,1155 -pygments/lexers/prolog.py,sha256=9Kc5YNUFqkfWu2sYoyzC3RX65abf1bm7oHr86z1s4kQ,12866 -pygments/lexers/promql.py,sha256=n-0vo-o8-ZasqP3Va4ujs562UfZSLfZF-RzT71yL0Tk,4738 -pygments/lexers/prql.py,sha256=PFReuvhbv4K5aeu6lvDfw4m-3hULkB3r43bKAy948os,8747 -pygments/lexers/ptx.py,sha256=KSHAvbiNVUntKilQ6EPYoLFocmJpRsBy_7fW6_Nrs1Y,4501 -pygments/lexers/python.py,sha256=WZe7fBAHKZ_BxPg8qIU26UGhk8qwUYyENJ3IyPW64mc,53805 -pygments/lexers/q.py,sha256=WQFUh3JrpK2j-VGW_Ytn3uJ5frUNmQIFnLtMVGRA9DI,6936 -pygments/lexers/qlik.py,sha256=2wqwdfIjrAz6RNBsP4MyeLX8Z7QpIGzxtf1CvaOlr_g,3693 -pygments/lexers/qvt.py,sha256=XMBnsWRrvCDf989OuDeb-KpszAkeETiACyaghZeL1ns,6103 -pygments/lexers/r.py,sha256=B6WgrD9SY1UTCV1fQBSlZbezPfpYsARn3FQIHcFYOiM,6474 -pygments/lexers/rdf.py,sha256=qUzxLna9v071bHhZAjdsBi8dKaJNk_h9g1ZRUAYCfoo,16056 -pygments/lexers/rebol.py,sha256=4u3N4kzui55HapopXDu3Kt0jczxDZ4buzwR7Mt4tQiM,18259 -pygments/lexers/rego.py,sha256=Rx5Gphbktr9ojg5DbqlyxHeQqqtF7g8W-oF0rmloDNY,1748 -pygments/lexers/resource.py,sha256=ioEzgWksB5HCjoz85XNkQPSd7n5kL0SZiuPkJP1hunQ,2927 -pygments/lexers/ride.py,sha256=kCWdxuR3PclVi4wiA0uUx4CYEFwuTqoMsKjhSW4X3yg,5035 -pygments/lexers/rita.py,sha256=Mj1QNxx1sWAZYC02kw8piVckaiw9B0MqQtiIiDFH0pA,1127 -pygments/lexers/rnc.py,sha256=g7ZD334PMGUqy_Ij64laSN1vJerwHqVkegfMCa3E-y8,1972 -pygments/lexers/roboconf.py,sha256=HbYuK5CqmQdd63SRY2nle01r7-p7mil0SnoauYDmEOY,2074 -pygments/lexers/robotframework.py,sha256=c4U1B9Q9ITBCTohqJTZOvkfyeVbenN4xhzSWIoZh5eU,18448 -pygments/lexers/ruby.py,sha256=uG617E5abBZcECRCqkhIfc-IbZcRb5cGuUZq_xpax90,22753 -pygments/lexers/rust.py,sha256=ZY-9vtsreBP0NfDd0WCouLSp_9MChAL8U8Abe-m9PB8,8260 -pygments/lexers/sas.py,sha256=C1Uz2s9DU6_s2kL-cB_PAGPtpyK5THlmhNmCumC1l48,9456 -pygments/lexers/savi.py,sha256=jrmruK0GnXktgBTWXW3oN3TXtofn3HBbkMlHnR84cko,4878 -pygments/lexers/scdoc.py,sha256=DXRmFDmYuc7h3gPAAVhfcL1OEbNBK5RdPpJqQzF3ZTk,2524 -pygments/lexers/scripting.py,sha256=eaYlkDK-_cAwTcCBHP6QXBCz8n6OzbhzdkRe0uV0xWY,81814 -pygments/lexers/sgf.py,sha256=w6C513ENaO2YCnqrduK7k03NaMDf-pgygvfzq2NaSRk,1985 -pygments/lexers/shell.py,sha256=dCS1zwkf5KwTog4__MnMC7h3Xmwv4_d3fnEV29tSwXI,36381 -pygments/lexers/sieve.py,sha256=eob-L84yf2jmhdNyYZUlbUJozdcd6GXcHW68lmAe8WE,2514 -pygments/lexers/slash.py,sha256=I-cRepmaxhL1SgYvD1hHX3gNBFI8NPszdU7hn1o5JlA,8484 -pygments/lexers/smalltalk.py,sha256=ue2PmqDK2sw0j75WdseiiENJBdZ1OwysH2Op1QN1r24,7204 -pygments/lexers/smithy.py,sha256=VREWoeuz7ANap_Uiopn7rs0Tnsfc-xBisDJKRGQY_y8,2659 -pygments/lexers/smv.py,sha256=He_VBSMbWONMWZmkrB5RYR0cfHVnMyKIXz68IFYl-a8,2805 -pygments/lexers/snobol.py,sha256=qDzb41xQQWMNmjB2MtZs23pFoFgZ2gbRZhK_Ir03r7I,2778 -pygments/lexers/solidity.py,sha256=Tixfnwku4Yezj6nNm8xVaw7EdV1qgAgdwahdTFP0St8,3163 -pygments/lexers/soong.py,sha256=Vm18vV4g6T8UPgjjY2yTRlSXGDpZowmuqQUBFfm4A9A,2339 -pygments/lexers/sophia.py,sha256=2YtYIT8iwAoW0B7TZuuoG_ZILhJV-2A7oBGat-98naE,3376 -pygments/lexers/special.py,sha256=8JuR2Vex8X-RWnC36S0HXTHWp2qmZclc90-TrLUWyaY,3585 -pygments/lexers/spice.py,sha256=m4nK0q4Sq_OFQez7kGWfki0No4ZV24YrONfHVj1Piqs,2790 -pygments/lexers/sql.py,sha256=WSG6vOsR87EEEwSQefP_Z7TauUG_BjqMHUFmPaSOVj4,41476 -pygments/lexers/srcinfo.py,sha256=B8vDs-sJogG3mWa5Hp_7JfHHUMyYRwGvKv6cKbFQXLM,1746 -pygments/lexers/stata.py,sha256=Zr9BC52D5O_3BbdW0N-tzoUmy0NTguL2sC-saXRVM-c,6415 -pygments/lexers/supercollider.py,sha256=_H5wDrn0DiGnlhB_cz6Rt_lo2TvqjSm0o6NPTd9R4Ko,3697 -pygments/lexers/tablegen.py,sha256=1JjedXYY18BNiY9JtNGLOtGfiwduNDZpQLBGTeQ6jAw,3987 -pygments/lexers/tact.py,sha256=X_lsxjFUMaC1TmYysXJq9tmAGifRnil83Bt1zA86Xdo,10809 -pygments/lexers/tal.py,sha256=xS9PlaWQOPj8MVr56fUNq31vUQKRWoLTlyWj9ZHm8AM,2904 -pygments/lexers/tcl.py,sha256=lK97ju4nikkt-oGOzIeyFEM98yq4dZSI8uEmYsq0R6c,5512 -pygments/lexers/teal.py,sha256=t3dqy_Arwv8_yExbX_xiFxv1TqJLPv4vh1MVKjKwS4Y,3522 -pygments/lexers/templates.py,sha256=BVdjYeoacIUuFyHTG39j4PxeNCe5E1oUURjH1rITrI4,75731 -pygments/lexers/teraterm.py,sha256=ciwztagW5Drg2gr17Qykrh6GwMsKy7e4xdQshX95GyQ,9718 -pygments/lexers/testing.py,sha256=YZgDgUEaLEYKSKEqpDsUi3Bn-Db_D42IlyiSsr1oX8U,10810 -pygments/lexers/text.py,sha256=nOCQPssIlKdVWU3PKxZiBPkf_KFM2V48IOssSyqhFY8,1068 -pygments/lexers/textedit.py,sha256=ttT4Ph-hIdgFLG6maRy_GskkziTFK0Wcg28yU0s6lek,7760 -pygments/lexers/textfmts.py,sha256=mi9KLEq4mrzDJbEc8G3VM-mSki_Tylkzodu47yH6z84,15524 -pygments/lexers/theorem.py,sha256=51ppBAEdhJmwU_lC916zMyjEoKLXqf89VAE_Lr0PNCc,17855 -pygments/lexers/thingsdb.py,sha256=x_fHNkLA-hIJyeIs6rg_X8n5OLYvFqaSu1FhI3apI5Y,6017 -pygments/lexers/tlb.py,sha256=ue2gqm45BI512lM13O8skAky9zAb7pLMrxZ8pbt5zRU,1450 -pygments/lexers/tls.py,sha256=_uQUVuMRDOhN-XUyGR5DIlVCk1CUZ1fIOSN4_WQYPKk,1540 -pygments/lexers/tnt.py,sha256=pK4LgoKON7u1xF66JYFncAPSbD8DZaeI_WTZ9HqEFlY,10456 -pygments/lexers/trafficscript.py,sha256=X3B8kgxS54ecuok9ic6Hkp-UMn5DvOmCK0p70Tz27Cw,1506 -pygments/lexers/typoscript.py,sha256=mBuePiVZUoAORPKsHwrx6fBWiy3fAIqG-2O67QmMiFI,8332 -pygments/lexers/typst.py,sha256=zIJBEhUXtWp5OiyAmvFA5m8d1EQG-ocwrJ677dvTUAk,7167 -pygments/lexers/ul4.py,sha256=rCaw0J9j3cdql9lX_HTilg65k9-9S118zOA6TAYfxaM,10499 -pygments/lexers/unicon.py,sha256=RAqoCnAAJBYOAGdR8ng0g6FtB39bGemLRlIqv5mcg9E,18625 -pygments/lexers/urbi.py,sha256=ajNP70NJg32jNnFDZsLvr_-4TToSGqRGkFyAPIJLfCU,6082 -pygments/lexers/usd.py,sha256=2eEGouolodYS402P_gtBrn4lLzpg1z8uHwPCKqjUb_k,3304 -pygments/lexers/varnish.py,sha256=dSh0Ku9SrjmlB29Fi_mWdWavN7M0cMKeepR4a34sOyI,7473 -pygments/lexers/verification.py,sha256=Qu433Q_h3EK3uS4bJoLRFZK0kIVwzX5AFKsa4Z-qnxA,3934 -pygments/lexers/verifpal.py,sha256=buyOOzCo_dGnoC40h0tthylHVVpgDt8qXu4olLvYy_4,2661 -pygments/lexers/vip.py,sha256=2lEV4cLV9p4E37wctBL7zkZ4ZU4p3HVsiLJFzB1bie0,5711 -pygments/lexers/vyper.py,sha256=Zq6sQIUBk6mBdpgOVgu3A6swGoBne0kDlRyjZznm2BY,5615 -pygments/lexers/web.py,sha256=4W9a7vcskrGJnxt4KmoE3SZydWB1qLq7lP2XS85J_m8,913 -pygments/lexers/webassembly.py,sha256=zgcMouzLawcbeFr6w_SOvGoUR68ZtqnnsbOcWEVleLk,5698 -pygments/lexers/webidl.py,sha256=ODtVmw4gVzI8HQWxuEckP6KMwm8WP2G2lSZEjagDXts,10516 -pygments/lexers/webmisc.py,sha256=-_-INDVdk47e2jlj-9bFcuLtntqVorBqIjlnwPfZFdI,40564 -pygments/lexers/wgsl.py,sha256=9igd9dzixGIgNewruv9mPnFms-c9BahkZcCCrZygv84,11880 -pygments/lexers/whiley.py,sha256=lMr750lA4MZsB4xqzVsIRtVMJIC3_dArhFYTHvOPwvA,4017 -pygments/lexers/wowtoc.py,sha256=8xxvf0xGeYtf4PE7KtkHZ_ly9xY_XXHrpCitdKE42Ro,4076 -pygments/lexers/wren.py,sha256=goGXnAMKKa13LLL40ybT3aMGPrk3gCRwZQFYAkKB_w0,3229 -pygments/lexers/x10.py,sha256=Q-AmgdF2E-N7mtOPpZ07CsxrTVnikyqC4uRRv6H75sk,1943 -pygments/lexers/xorg.py,sha256=9ttrBd3_Y2nXANsqtMposSgblYmMYqWXQ-Iz5RH9RsU,925 -pygments/lexers/yang.py,sha256=13CWbSaNr9giOHz4o0SXSklh0bfWt0ah14jJGpTvcn0,4499 -pygments/lexers/yara.py,sha256=jUSv78KTDfguCoAoAZKbYzQERkkyxBBWv5dInVrkDxo,2427 -pygments/lexers/zig.py,sha256=f-80MVOSp1KnczAMokQLVM-_wAEOD16EcGFnaCNlsN0,3976 -pygments/modeline.py,sha256=K5eSkR8GS1r5OkXXTHOcV0aM_6xpk9eWNEIAW-OOJ2g,1005 -pygments/plugin.py,sha256=tPx0rJCTIZ9ioRgLNYG4pifCbAwTRUZddvLw-NfAk2w,1891 -pygments/regexopt.py,sha256=wXaP9Gjp_hKAdnICqoDkRxAOQJSc4v3X6mcxx3z-TNs,3072 -pygments/scanner.py,sha256=nNcETRR1tRuiTaHmHSTTECVYFPcLf6mDZu1e4u91A9E,3092 -pygments/sphinxext.py,sha256=VEe_oHNgLoEGMHc2ROfbee2mF2PPREFyE6_m_JN5FvQ,7898 -pygments/style.py,sha256=Cpw9dCAyW3_JAwFRXOJXmtKb5ZwO2_5KSmlq6q4fZw4,6408 -pygments/styles/__init__.py,sha256=f9KCQXN4uKbe8aI8-L3qTC-_XPfT563FwTg6VTGVfwI,2006 -pygments/styles/_mapping.py,sha256=6lovFUE29tz6EsV3XYY4hgozJ7q1JL7cfO3UOlgnS8w,3312 -pygments/styles/abap.py,sha256=64Uwr8uPdEdcT-tE-Y2VveTXfH3SkqH9qdMgY49YHQI,749 -pygments/styles/algol.py,sha256=fCuk8ITTehvbJSufiaKlgnFsKbl-xFxxR82xhltc-cQ,2262 -pygments/styles/algol_nu.py,sha256=Gv9WfHJvYegGcUk1zcufQgsdXPNjCUNk8sAHyrSGGh4,2283 -pygments/styles/arduino.py,sha256=NoUB8xk7M1HGPoLfuySOLU0sVwoTuLcZqllXl2EO_iE,4557 -pygments/styles/autumn.py,sha256=fLLfjHXjxCl6crBAxEsBLH372ALMkFacA2bG6KFbJi4,2195 -pygments/styles/borland.py,sha256=_0ySKp4KGCSgtYjPe8uzD6gQhlmAIR4T43i-FoRYNOM,1611 -pygments/styles/bw.py,sha256=vhk8Xoj64fLPdA9IQU6mUVsYMel255jR-FDU7BjIHtI,1406 -pygments/styles/coffee.py,sha256=NqLt-fc7LONma1BGggbceVRY9uDE70WBuZXqK4zwaco,2308 -pygments/styles/colorful.py,sha256=mYcSbehtH7itH_QV9NqJp4Wna1X4lrwl2wkVXS2u-5A,2832 -pygments/styles/default.py,sha256=RTgG2zKWWUxPTDCFxhTnyZI_WZBIVgu5XsUpNvFisCA,2588 -pygments/styles/dracula.py,sha256=vRJmixBoSKV9o8NVQhXGViQqchhIYugfikLmvX0DoBw,2182 -pygments/styles/emacs.py,sha256=TiOG9oc83qToMCRMnJrXtWYqnzAqYycRz_50OoCKtxc,2535 -pygments/styles/friendly.py,sha256=oAi-l9anQTs9STDmUzXGDlOegatEOH4hpD0j6o6dZGM,2604 -pygments/styles/friendly_grayscale.py,sha256=a7Cqkzt6-uTiXvj6GoYBXzRvX5_zviCjjRB04Kf_-Q0,2828 -pygments/styles/fruity.py,sha256=GfSUTG0stlJr5Ow_saCaxbI2IB4-34Dp2TuRTpfUJBs,1324 -pygments/styles/gh_dark.py,sha256=ruNX3d4rf22rx-8HnwvGbNbXRQpXCNcHU1HNq6N4uNg,3590 -pygments/styles/gruvbox.py,sha256=KrFoHEoVnZW6XM9udyXncPomeGyZgIDsNWOH3kCrxFQ,3387 -pygments/styles/igor.py,sha256=fYYPhM0dRCvcDTMVrMVO5oFKnYm-8YVlsuVBoczFLtY,737 -pygments/styles/inkpot.py,sha256=jggSeX9NV15eOL2oJaVmZ6vmV7LWRzXJQRUqcWEqGRs,2404 -pygments/styles/lightbulb.py,sha256=Y8u1qdvlHfBqI2jJex55SkvVatVo_FjEUzE6h-X7m-0,3172 -pygments/styles/lilypond.py,sha256=Y6fp_sEL-zESmxAaMxzjtrKk90cuDC_DalNdC8wj0nw,2066 -pygments/styles/lovelace.py,sha256=cA9uhmbnzY04MccsiYSgMY7fvb4WMRbegWBUrGvXh1M,3178 -pygments/styles/manni.py,sha256=g9FyO7plTwfMm2cU4iiKgdlkMlvQLG6l2Lwkgz5ITS4,2443 -pygments/styles/material.py,sha256=LDmgomAbgtJDZhbv446_zIwgYh50UAqEEtgYNUns1rQ,4201 -pygments/styles/monokai.py,sha256=lrxTJpkBarV9gTLkBQryZ6oNSjekAVheJueKJP5iEYA,5184 -pygments/styles/murphy.py,sha256=-AKZiLkpiWej-otjHMsYCE-I-_IzCOLJY-_GBdKRZRw,2805 -pygments/styles/native.py,sha256=l6tezGSQTB8p_SyOXJ0PWI7KzCeEdtsPmVc4Yn4_CwU,2043 -pygments/styles/nord.py,sha256=GDt3WAaqaWsiCeqpIBPxd8TEUX708fGfwaA7S0w0oy0,5391 -pygments/styles/onedark.py,sha256=k80cZEppCEF-HLoxy_FEA0QmQDZze68nHVMNGyUVa28,1719 -pygments/styles/paraiso_dark.py,sha256=Jkrg4nUKIVNF8U4fPNV_Smq_g9NFbb9eiUrjYpVgQZg,5662 -pygments/styles/paraiso_light.py,sha256=MxN964ZEpze3wF0ss-igaa2I7E684MHe-Zq0rWPH3wo,5668 -pygments/styles/pastie.py,sha256=ZvAs9UpBNYFC-5PFrCRGYnm3FoPKb-eKR-ozbWZP-4g,2525 -pygments/styles/perldoc.py,sha256=HSxB93e4UpQkZspReQ34FeJbZ-59ksGvdaH-hToehi8,2230 -pygments/styles/rainbow_dash.py,sha256=4ugL18Or7aNtaLfPfCLFRiFy0Gu2RA4a9G2LQUE9SrM,2390 -pygments/styles/rrt.py,sha256=fgzfpC0PC_SCcLOMCNEIQTjPUMOncRe7SR10GfSRbXY,1006 -pygments/styles/sas.py,sha256=yzoXmbfQ2ND1WWq93b4vVGYkQSZHPqb4ymes9YYRT3w,1440 -pygments/styles/solarized.py,sha256=qupILFZn02WspnAF5SPYb-W8guo9xnUtjb1HeLw3XgE,4247 -pygments/styles/staroffice.py,sha256=CLbBeMoxay21Xyu3Af2p4xUXyG1_6ydCbvs5RJKYe5w,831 -pygments/styles/stata_dark.py,sha256=vX8SwHV__sG92F4CKribG08MJfSVq98dgs7gEA_n9yc,1257 -pygments/styles/stata_light.py,sha256=uV3GE-ylvffQ0yN3py1YAVqBB5wflIKZbceyK1Lqvrc,1289 -pygments/styles/tango.py,sha256=O2wcM4hHuU1Yt071M9CK7JPtiiSCqyxtT9tbiQICV28,7137 -pygments/styles/trac.py,sha256=9kMv1ZZyMKACWlx2fQVjRP0I2pgcRYCNrd7iGGZg9qk,1981 -pygments/styles/vim.py,sha256=J7_TqvrGkTX_XuTHW0In5wqPLAUPRWyr1122XueZWmM,2019 -pygments/styles/vs.py,sha256=s7YnzbIPuFU3LIke27mc4lAQSn2R3vbbHc1baMGSU_U,1130 -pygments/styles/xcode.py,sha256=PbQdzgGaA4a9LAU1i58alY9kM4IFlQX5jHQwOYmf_Rk,1504 -pygments/styles/zenburn.py,sha256=suZEKzBTCYdhf2cxNwcY7UATJK1tq5eYhGdBcXdf6MU,2203 -pygments/token.py,sha256=WbdWGhYm_Vosb0DDxW9lHNPgITXfWTsQmHt6cy9RbcM,6226 -pygments/unistring.py,sha256=al-_rBemRuGvinsrM6atNsHTmJ6DUbw24q2O2Ru1cBc,63208 -pygments/util.py,sha256=oRtSpiAo5jM9ulntkvVbgXUdiAW57jnuYGB7t9fYuhc,10031 diff --git a/voxvera/vendor/pygments-2.19.2.dist-info/WHEEL b/voxvera/vendor/pygments-2.19.2.dist-info/WHEEL deleted file mode 100644 index 12228d4..0000000 --- a/voxvera/vendor/pygments-2.19.2.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: hatchling 1.27.0 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/voxvera/vendor/pygments-2.19.2.dist-info/entry_points.txt b/voxvera/vendor/pygments-2.19.2.dist-info/entry_points.txt deleted file mode 100644 index 15498e3..0000000 --- a/voxvera/vendor/pygments-2.19.2.dist-info/entry_points.txt +++ /dev/null @@ -1,2 +0,0 @@ -[console_scripts] -pygmentize = pygments.cmdline:main diff --git a/voxvera/vendor/pygments-2.19.2.dist-info/licenses/AUTHORS b/voxvera/vendor/pygments-2.19.2.dist-info/licenses/AUTHORS deleted file mode 100644 index 811c66a..0000000 --- a/voxvera/vendor/pygments-2.19.2.dist-info/licenses/AUTHORS +++ /dev/null @@ -1,291 +0,0 @@ -Pygments is written and maintained by Georg Brandl . - -Major developers are Tim Hatch and Armin Ronacher -. - -Other contributors, listed alphabetically, are: - -* Sam Aaron -- Ioke lexer -* Jean Abou Samra -- LilyPond lexer -* João Abecasis -- JSLT lexer -* Ali Afshar -- image formatter -* Thomas Aglassinger -- Easytrieve, JCL, Rexx, Transact-SQL and VBScript - lexers -* Maxence Ahlouche -- PostgreSQL Explain lexer -* Muthiah Annamalai -- Ezhil lexer -* Nikolay Antipov -- OpenSCAD lexer -* Kumar Appaiah -- Debian control lexer -* Andreas Amann -- AppleScript lexer -* Timothy Armstrong -- Dart lexer fixes -* Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers -* Eiríkr Åsheim -- Uxntal lexer -* Jeremy Ashkenas -- CoffeeScript lexer -* José Joaquín Atria -- Praat lexer -* Stefan Matthias Aust -- Smalltalk lexer -* Lucas Bajolet -- Nit lexer -* Ben Bangert -- Mako lexers -* Max Battcher -- Darcs patch lexer -* Thomas Baruchel -- APL lexer -* Tim Baumann -- (Literate) Agda lexer -* Paul Baumgart, 280 North, Inc. -- Objective-J lexer -* Michael Bayer -- Myghty lexers -* Thomas Beale -- Archetype lexers -* John Benediktsson -- Factor lexer -* David Benjamin, Google LLC -- TLS lexer -* Trevor Bergeron -- mIRC formatter -* Vincent Bernat -- LessCSS lexer -* Christopher Bertels -- Fancy lexer -* Sébastien Bigaret -- QVT Operational lexer -* Jarrett Billingsley -- MiniD lexer -* Adam Blinkinsop -- Haskell, Redcode lexers -* Stéphane Blondon -- Procfile, SGF and Sieve lexers -* Frits van Bommel -- assembler lexers -* Pierre Bourdon -- bugfixes -* Martijn Braam -- Kernel log lexer, BARE lexer -* JD Browne, Google LLC -- GoogleSQL lexer -* Matthias Bussonnier -- ANSI style handling for terminal-256 formatter -* chebee7i -- Python traceback lexer improvements -* Hiram Chirino -- Scaml and Jade lexers -* Mauricio Caceres -- SAS and Stata lexers. -* Michael Camilleri, John Gabriele, sogaiu -- Janet lexer -* Daren Chandisingh -- Gleam lexer -* Ian Cooper -- VGL lexer -* David Corbett -- Inform, Jasmin, JSGF, Snowball, and TADS 3 lexers -* Leaf Corcoran -- MoonScript lexer -* Fraser Cormack -- TableGen lexer -* Gabriel Corona -- ASN.1 lexer -* Christopher Creutzig -- MuPAD lexer -* Daniël W. Crompton -- Pike lexer -* Pete Curry -- bugfixes -* Bryan Davis -- EBNF lexer -* Bruno Deferrari -- Shen lexer -* Walter Dörwald -- UL4 lexer -* Luke Drummond -- Meson lexer -* Giedrius Dubinskas -- HTML formatter improvements -* Owen Durni -- Haxe lexer -* Alexander Dutton, Oxford University Computing Services -- SPARQL lexer -* James Edwards -- Terraform lexer -* Nick Efford -- Python 3 lexer -* Sven Efftinge -- Xtend lexer -* Artem Egorkine -- terminal256 formatter -* Matthew Fernandez -- CAmkES lexer -* Paweł Fertyk -- GDScript lexer, HTML formatter improvements -* Michael Ficarra -- CPSA lexer -* James H. Fisher -- PostScript lexer -* Amanda Fitch, Google LLC -- GoogleSQL lexer -* William S. Fulton -- SWIG lexer -* Carlos Galdino -- Elixir and Elixir Console lexers -* Michael Galloy -- IDL lexer -* Naveen Garg -- Autohotkey lexer -* Simon Garnotel -- FreeFem++ lexer -* Laurent Gautier -- R/S lexer -* Alex Gaynor -- PyPy log lexer -* Richard Gerkin -- Igor Pro lexer -* Alain Gilbert -- TypeScript lexer -* Alex Gilding -- BlitzBasic lexer -* GitHub, Inc -- DASM16, Augeas, TOML, and Slash lexers -* Bertrand Goetzmann -- Groovy lexer -* Krzysiek Goj -- Scala lexer -* Rostyslav Golda -- FloScript lexer -* Andrey Golovizin -- BibTeX lexers -* Matt Good -- Genshi, Cheetah lexers -* Michał Górny -- vim modeline support -* Alex Gosse -- TrafficScript lexer -* Patrick Gotthardt -- PHP namespaces support -* Hubert Gruniaux -- C and C++ lexer improvements -* Olivier Guibe -- Asymptote lexer -* Phil Hagelberg -- Fennel lexer -* Florian Hahn -- Boogie lexer -* Martin Harriman -- SNOBOL lexer -* Matthew Harrison -- SVG formatter -* Steven Hazel -- Tcl lexer -* Dan Michael Heggø -- Turtle lexer -* Aslak Hellesøy -- Gherkin lexer -* Greg Hendershott -- Racket lexer -* Justin Hendrick -- ParaSail lexer -* Jordi Gutiérrez Hermoso -- Octave lexer -* David Hess, Fish Software, Inc. -- Objective-J lexer -* Ken Hilton -- Typographic Number Theory and Arrow lexers -* Varun Hiremath -- Debian control lexer -* Rob Hoelz -- Perl 6 lexer -* Doug Hogan -- Mscgen lexer -* Ben Hollis -- Mason lexer -* Max Horn -- GAP lexer -* Fred Hornsey -- OMG IDL Lexer -* Alastair Houghton -- Lexer inheritance facility -* Tim Howard -- BlitzMax lexer -* Dustin Howett -- Logos lexer -* Ivan Inozemtsev -- Fantom lexer -* Hiroaki Itoh -- Shell console rewrite, Lexers for PowerShell session, - MSDOS session, BC, WDiff -* Brian R. Jackson -- Tea lexer -* Christian Jann -- ShellSession lexer -* Jonas Camillus Jeppesen -- Line numbers and line highlighting for - RTF-formatter -* Dennis Kaarsemaker -- sources.list lexer -* Dmitri Kabak -- Inferno Limbo lexer -* Igor Kalnitsky -- vhdl lexer -* Colin Kennedy - USD lexer -* Alexander Kit -- MaskJS lexer -* Pekka Klärck -- Robot Framework lexer -* Gerwin Klein -- Isabelle lexer -* Eric Knibbe -- Lasso lexer -* Stepan Koltsov -- Clay lexer -* Oliver Kopp - Friendly grayscale style -* Adam Koprowski -- Opa lexer -* Benjamin Kowarsch -- Modula-2 lexer -* Domen Kožar -- Nix lexer -* Oleh Krekel -- Emacs Lisp lexer -* Alexander Kriegisch -- Kconfig and AspectJ lexers -* Marek Kubica -- Scheme lexer -* Jochen Kupperschmidt -- Markdown processor -* Gerd Kurzbach -- Modelica lexer -* Jon Larimer, Google Inc. -- Smali lexer -* Olov Lassus -- Dart lexer -* Matt Layman -- TAP lexer -* Dan Lazin, Google LLC -- GoogleSQL lexer -* Kristian Lyngstøl -- Varnish lexers -* Sylvestre Ledru -- Scilab lexer -* Chee Sing Lee -- Flatline lexer -* Mark Lee -- Vala lexer -* Thomas Linder Puls -- Visual Prolog lexer -* Pete Lomax -- Phix lexer -* Valentin Lorentz -- C++ lexer improvements -* Ben Mabey -- Gherkin lexer -* Angus MacArthur -- QML lexer -* Louis Mandel -- X10 lexer -* Louis Marchand -- Eiffel lexer -* Simone Margaritelli -- Hybris lexer -* Tim Martin - World of Warcraft TOC lexer -* Kirk McDonald -- D lexer -* Gordon McGregor -- SystemVerilog lexer -* Stephen McKamey -- Duel/JBST lexer -* Brian McKenna -- F# lexer -* Charles McLaughlin -- Puppet lexer -* Kurt McKee -- Tera Term macro lexer, PostgreSQL updates, MySQL overhaul, JSON lexer -* Joe Eli McIlvain -- Savi lexer -* Lukas Meuser -- BBCode formatter, Lua lexer -* Cat Miller -- Pig lexer -* Paul Miller -- LiveScript lexer -* Hong Minhee -- HTTP lexer -* Michael Mior -- Awk lexer -* Bruce Mitchener -- Dylan lexer rewrite -* Reuben Morais -- SourcePawn lexer -* Jon Morton -- Rust lexer -* Paulo Moura -- Logtalk lexer -* Mher Movsisyan -- DTD lexer -* Dejan Muhamedagic -- Crmsh lexer -* Adrien Nayrat -- PostgreSQL Explain lexer -* Ana Nelson -- Ragel, ANTLR, R console lexers -* David Neto, Google LLC -- WebGPU Shading Language lexer -* Kurt Neufeld -- Markdown lexer -* Nam T. Nguyen -- Monokai style -* Jesper Noehr -- HTML formatter "anchorlinenos" -* Mike Nolta -- Julia lexer -* Avery Nortonsmith -- Pointless lexer -* Jonas Obrist -- BBCode lexer -* Edward O'Callaghan -- Cryptol lexer -* David Oliva -- Rebol lexer -* Pat Pannuto -- nesC lexer -* Jon Parise -- Protocol buffers and Thrift lexers -* Benjamin Peterson -- Test suite refactoring -* Ronny Pfannschmidt -- BBCode lexer -* Dominik Picheta -- Nimrod lexer -* Andrew Pinkham -- RTF Formatter Refactoring -* Clément Prévost -- UrbiScript lexer -* Tanner Prynn -- cmdline -x option and loading lexers from files -* Oleh Prypin -- Crystal lexer (based on Ruby lexer) -* Nick Psaris -- K and Q lexers -* Xidorn Quan -- Web IDL lexer -* Elias Rabel -- Fortran fixed form lexer -* raichoo -- Idris lexer -* Daniel Ramirez -- GDScript lexer -* Kashif Rasul -- CUDA lexer -* Nathan Reed -- HLSL lexer -* Justin Reidy -- MXML lexer -* Jonathon Reinhart, Google LLC -- Soong lexer -* Norman Richards -- JSON lexer -* Corey Richardson -- Rust lexer updates -* Fabrizio Riguzzi -- cplint leder -* Lubomir Rintel -- GoodData MAQL and CL lexers -* Andre Roberge -- Tango style -* Georg Rollinger -- HSAIL lexer -* Michiel Roos -- TypoScript lexer -* Konrad Rudolph -- LaTeX formatter enhancements -* Mario Ruggier -- Evoque lexers -* Miikka Salminen -- Lovelace style, Hexdump lexer, lexer enhancements -* Stou Sandalski -- NumPy, FORTRAN, tcsh and XSLT lexers -* Matteo Sasso -- Common Lisp lexer -* Joe Schafer -- Ada lexer -* Max Schillinger -- TiddlyWiki5 lexer -* Andrew Schmidt -- X++ lexer -* Ken Schutte -- Matlab lexers -* René Schwaiger -- Rainbow Dash style -* Sebastian Schweizer -- Whiley lexer -* Tassilo Schweyer -- Io, MOOCode lexers -* Pablo Seminario -- PromQL lexer -* Ted Shaw -- AutoIt lexer -* Joerg Sieker -- ABAP lexer -* Robert Simmons -- Standard ML lexer -* Kirill Simonov -- YAML lexer -* Corbin Simpson -- Monte lexer -* Ville Skyttä -- ASCII armored lexer -* Alexander Smishlajev -- Visual FoxPro lexer -* Steve Spigarelli -- XQuery lexer -* Jerome St-Louis -- eC lexer -* Camil Staps -- Clean and NuSMV lexers; Solarized style -* James Strachan -- Kotlin lexer -* Tom Stuart -- Treetop lexer -* Colin Sullivan -- SuperCollider lexer -* Ben Swift -- Extempore lexer -* tatt61880 -- Kuin lexer -* Edoardo Tenani -- Arduino lexer -* Tiberius Teng -- default style overhaul -* Jeremy Thurgood -- Erlang, Squid config lexers -* Brian Tiffin -- OpenCOBOL lexer -* Bob Tolbert -- Hy lexer -* Doug Torrance -- Macaulay2 lexer -* Matthias Trute -- Forth lexer -* Tuoa Spi T4 -- Bdd lexer -* Erick Tryzelaar -- Felix lexer -* Alexander Udalov -- Kotlin lexer improvements -* Thomas Van Doren -- Chapel lexer -* Dave Van Ee -- Uxntal lexer updates -* Daniele Varrazzo -- PostgreSQL lexers -* Abe Voelker -- OpenEdge ABL lexer -* Pepijn de Vos -- HTML formatter CTags support -* Matthias Vallentin -- Bro lexer -* Benoît Vinot -- AMPL lexer -* Linh Vu Hong -- RSL lexer -* Taavi Väänänen -- Debian control lexer -* Immanuel Washington -- Smithy lexer -* Nathan Weizenbaum -- Haml and Sass lexers -* Nathan Whetsell -- Csound lexers -* Dietmar Winkler -- Modelica lexer -* Nils Winter -- Smalltalk lexer -* Davy Wybiral -- Clojure lexer -* Whitney Young -- ObjectiveC lexer -* Diego Zamboni -- CFengine3 lexer -* Enrique Zamudio -- Ceylon lexer -* Alex Zimin -- Nemerle lexer -* Rob Zimmerman -- Kal lexer -* Evgenii Zheltonozhskii -- Maple lexer -* Vincent Zurczak -- Roboconf lexer -* Hubert Gruniaux -- C and C++ lexer improvements -* Thomas Symalla -- AMDGPU Lexer -* 15b3 -- Image Formatter improvements -* Fabian Neumann -- CDDL lexer -* Thomas Duboucher -- CDDL lexer -* Philipp Imhof -- Pango Markup formatter -* Thomas Voss -- Sed lexer -* Martin Fischer -- WCAG contrast testing -* Marc Auberer -- Spice lexer -* Amr Hesham -- Carbon lexer -* diskdance -- Wikitext lexer -* vanillajonathan -- PRQL lexer -* Nikolay Antipov -- OpenSCAD lexer -* Markus Meyer, Nextron Systems -- YARA lexer -* Hannes Römer -- Mojo lexer -* Jan Frederik Schaefer -- PDDL lexer - -Many thanks for all contributions! diff --git a/voxvera/vendor/pygments-2.19.2.dist-info/licenses/LICENSE b/voxvera/vendor/pygments-2.19.2.dist-info/licenses/LICENSE deleted file mode 100644 index 446a1a8..0000000 --- a/voxvera/vendor/pygments-2.19.2.dist-info/licenses/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2006-2022 by the respective authors (see AUTHORS file). -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/voxvera/vendor/pygments/__init__.py b/voxvera/vendor/pygments/__init__.py deleted file mode 100644 index 2a391c3..0000000 --- a/voxvera/vendor/pygments/__init__.py +++ /dev/null @@ -1,82 +0,0 @@ -""" - Pygments - ~~~~~~~~ - - Pygments is a syntax highlighting package written in Python. - - It is a generic syntax highlighter for general use in all kinds of software - such as forum systems, wikis or other applications that need to prettify - source code. Highlights are: - - * a wide range of common languages and markup formats is supported - * special attention is paid to details, increasing quality by a fair amount - * support for new languages and formats are added easily - * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image - formats that PIL supports, and ANSI sequences - * it is usable as a command-line tool and as a library - * ... and it highlights even Brainfuck! - - The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``. - - .. _Pygments master branch: - https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" -from io import StringIO, BytesIO - -__version__ = '2.19.2' -__docformat__ = 'restructuredtext' - -__all__ = ['lex', 'format', 'highlight'] - - -def lex(code, lexer): - """ - Lex `code` with the `lexer` (must be a `Lexer` instance) - and return an iterable of tokens. Currently, this only calls - `lexer.get_tokens()`. - """ - try: - return lexer.get_tokens(code) - except TypeError: - # Heuristic to catch a common mistake. - from pygments.lexer import RegexLexer - if isinstance(lexer, type) and issubclass(lexer, RegexLexer): - raise TypeError('lex() argument must be a lexer instance, ' - 'not a class') - raise - - -def format(tokens, formatter, outfile=None): # pylint: disable=redefined-builtin - """ - Format ``tokens`` (an iterable of tokens) with the formatter ``formatter`` - (a `Formatter` instance). - - If ``outfile`` is given and a valid file object (an object with a - ``write`` method), the result will be written to it, otherwise it - is returned as a string. - """ - try: - if not outfile: - realoutfile = getattr(formatter, 'encoding', None) and BytesIO() or StringIO() - formatter.format(tokens, realoutfile) - return realoutfile.getvalue() - else: - formatter.format(tokens, outfile) - except TypeError: - # Heuristic to catch a common mistake. - from pygments.formatter import Formatter - if isinstance(formatter, type) and issubclass(formatter, Formatter): - raise TypeError('format() argument must be a formatter instance, ' - 'not a class') - raise - - -def highlight(code, lexer, formatter, outfile=None): - """ - This is the most high-level highlighting function. It combines `lex` and - `format` in one function. - """ - return format(lex(code, lexer), formatter, outfile) diff --git a/voxvera/vendor/pygments/__main__.py b/voxvera/vendor/pygments/__main__.py deleted file mode 100644 index 4890a6c..0000000 --- a/voxvera/vendor/pygments/__main__.py +++ /dev/null @@ -1,17 +0,0 @@ -""" - pygments.__main__ - ~~~~~~~~~~~~~~~~~ - - Main entry point for ``python -m pygments``. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import sys -import pygments.cmdline - -try: - sys.exit(pygments.cmdline.main(sys.argv)) -except KeyboardInterrupt: - sys.exit(1) diff --git a/voxvera/vendor/pygments/cmdline.py b/voxvera/vendor/pygments/cmdline.py deleted file mode 100644 index 2878fd5..0000000 --- a/voxvera/vendor/pygments/cmdline.py +++ /dev/null @@ -1,668 +0,0 @@ -""" - pygments.cmdline - ~~~~~~~~~~~~~~~~ - - Command line interface. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import os -import sys -import shutil -import argparse -from textwrap import dedent - -from pygments import __version__, highlight -from pygments.util import ClassNotFound, OptionError, docstring_headline, \ - guess_decode, guess_decode_from_terminal, terminal_encoding, \ - UnclosingTextIOWrapper -from pygments.lexers import get_all_lexers, get_lexer_by_name, guess_lexer, \ - load_lexer_from_file, get_lexer_for_filename, find_lexer_class_for_filename -from pygments.lexers.special import TextLexer -from pygments.formatters.latex import LatexEmbeddedLexer, LatexFormatter -from pygments.formatters import get_all_formatters, get_formatter_by_name, \ - load_formatter_from_file, get_formatter_for_filename, find_formatter_class -from pygments.formatters.terminal import TerminalFormatter -from pygments.formatters.terminal256 import Terminal256Formatter, TerminalTrueColorFormatter -from pygments.filters import get_all_filters, find_filter_class -from pygments.styles import get_all_styles, get_style_by_name - - -def _parse_options(o_strs): - opts = {} - if not o_strs: - return opts - for o_str in o_strs: - if not o_str.strip(): - continue - o_args = o_str.split(',') - for o_arg in o_args: - o_arg = o_arg.strip() - try: - o_key, o_val = o_arg.split('=', 1) - o_key = o_key.strip() - o_val = o_val.strip() - except ValueError: - opts[o_arg] = True - else: - opts[o_key] = o_val - return opts - - -def _parse_filters(f_strs): - filters = [] - if not f_strs: - return filters - for f_str in f_strs: - if ':' in f_str: - fname, fopts = f_str.split(':', 1) - filters.append((fname, _parse_options([fopts]))) - else: - filters.append((f_str, {})) - return filters - - -def _print_help(what, name): - try: - if what == 'lexer': - cls = get_lexer_by_name(name) - print(f"Help on the {cls.name} lexer:") - print(dedent(cls.__doc__)) - elif what == 'formatter': - cls = find_formatter_class(name) - print(f"Help on the {cls.name} formatter:") - print(dedent(cls.__doc__)) - elif what == 'filter': - cls = find_filter_class(name) - print(f"Help on the {name} filter:") - print(dedent(cls.__doc__)) - return 0 - except (AttributeError, ValueError): - print(f"{what} not found!", file=sys.stderr) - return 1 - - -def _print_list(what): - if what == 'lexer': - print() - print("Lexers:") - print("~~~~~~~") - - info = [] - for fullname, names, exts, _ in get_all_lexers(): - tup = (', '.join(names)+':', fullname, - exts and '(filenames ' + ', '.join(exts) + ')' or '') - info.append(tup) - info.sort() - for i in info: - print(('* {}\n {} {}').format(*i)) - - elif what == 'formatter': - print() - print("Formatters:") - print("~~~~~~~~~~~") - - info = [] - for cls in get_all_formatters(): - doc = docstring_headline(cls) - tup = (', '.join(cls.aliases) + ':', doc, cls.filenames and - '(filenames ' + ', '.join(cls.filenames) + ')' or '') - info.append(tup) - info.sort() - for i in info: - print(('* {}\n {} {}').format(*i)) - - elif what == 'filter': - print() - print("Filters:") - print("~~~~~~~~") - - for name in get_all_filters(): - cls = find_filter_class(name) - print("* " + name + ':') - print(f" {docstring_headline(cls)}") - - elif what == 'style': - print() - print("Styles:") - print("~~~~~~~") - - for name in get_all_styles(): - cls = get_style_by_name(name) - print("* " + name + ':') - print(f" {docstring_headline(cls)}") - - -def _print_list_as_json(requested_items): - import json - result = {} - if 'lexer' in requested_items: - info = {} - for fullname, names, filenames, mimetypes in get_all_lexers(): - info[fullname] = { - 'aliases': names, - 'filenames': filenames, - 'mimetypes': mimetypes - } - result['lexers'] = info - - if 'formatter' in requested_items: - info = {} - for cls in get_all_formatters(): - doc = docstring_headline(cls) - info[cls.name] = { - 'aliases': cls.aliases, - 'filenames': cls.filenames, - 'doc': doc - } - result['formatters'] = info - - if 'filter' in requested_items: - info = {} - for name in get_all_filters(): - cls = find_filter_class(name) - info[name] = { - 'doc': docstring_headline(cls) - } - result['filters'] = info - - if 'style' in requested_items: - info = {} - for name in get_all_styles(): - cls = get_style_by_name(name) - info[name] = { - 'doc': docstring_headline(cls) - } - result['styles'] = info - - json.dump(result, sys.stdout) - -def main_inner(parser, argns): - if argns.help: - parser.print_help() - return 0 - - if argns.V: - print(f'Pygments version {__version__}, (c) 2006-2024 by Georg Brandl, Matthäus ' - 'Chajdas and contributors.') - return 0 - - def is_only_option(opt): - return not any(v for (k, v) in vars(argns).items() if k != opt) - - # handle ``pygmentize -L`` - if argns.L is not None: - arg_set = set() - for k, v in vars(argns).items(): - if v: - arg_set.add(k) - - arg_set.discard('L') - arg_set.discard('json') - - if arg_set: - parser.print_help(sys.stderr) - return 2 - - # print version - if not argns.json: - main(['', '-V']) - allowed_types = {'lexer', 'formatter', 'filter', 'style'} - largs = [arg.rstrip('s') for arg in argns.L] - if any(arg not in allowed_types for arg in largs): - parser.print_help(sys.stderr) - return 0 - if not largs: - largs = allowed_types - if not argns.json: - for arg in largs: - _print_list(arg) - else: - _print_list_as_json(largs) - return 0 - - # handle ``pygmentize -H`` - if argns.H: - if not is_only_option('H'): - parser.print_help(sys.stderr) - return 2 - what, name = argns.H - if what not in ('lexer', 'formatter', 'filter'): - parser.print_help(sys.stderr) - return 2 - return _print_help(what, name) - - # parse -O options - parsed_opts = _parse_options(argns.O or []) - - # parse -P options - for p_opt in argns.P or []: - try: - name, value = p_opt.split('=', 1) - except ValueError: - parsed_opts[p_opt] = True - else: - parsed_opts[name] = value - - # encodings - inencoding = parsed_opts.get('inencoding', parsed_opts.get('encoding')) - outencoding = parsed_opts.get('outencoding', parsed_opts.get('encoding')) - - # handle ``pygmentize -N`` - if argns.N: - lexer = find_lexer_class_for_filename(argns.N) - if lexer is None: - lexer = TextLexer - - print(lexer.aliases[0]) - return 0 - - # handle ``pygmentize -C`` - if argns.C: - inp = sys.stdin.buffer.read() - try: - lexer = guess_lexer(inp, inencoding=inencoding) - except ClassNotFound: - lexer = TextLexer - - print(lexer.aliases[0]) - return 0 - - # handle ``pygmentize -S`` - S_opt = argns.S - a_opt = argns.a - if S_opt is not None: - f_opt = argns.f - if not f_opt: - parser.print_help(sys.stderr) - return 2 - if argns.l or argns.INPUTFILE: - parser.print_help(sys.stderr) - return 2 - - try: - parsed_opts['style'] = S_opt - fmter = get_formatter_by_name(f_opt, **parsed_opts) - except ClassNotFound as err: - print(err, file=sys.stderr) - return 1 - - print(fmter.get_style_defs(a_opt or '')) - return 0 - - # if no -S is given, -a is not allowed - if argns.a is not None: - parser.print_help(sys.stderr) - return 2 - - # parse -F options - F_opts = _parse_filters(argns.F or []) - - # -x: allow custom (eXternal) lexers and formatters - allow_custom_lexer_formatter = bool(argns.x) - - # select lexer - lexer = None - - # given by name? - lexername = argns.l - if lexername: - # custom lexer, located relative to user's cwd - if allow_custom_lexer_formatter and '.py' in lexername: - try: - filename = None - name = None - if ':' in lexername: - filename, name = lexername.rsplit(':', 1) - - if '.py' in name: - # This can happen on Windows: If the lexername is - # C:\lexer.py -- return to normal load path in that case - name = None - - if filename and name: - lexer = load_lexer_from_file(filename, name, - **parsed_opts) - else: - lexer = load_lexer_from_file(lexername, **parsed_opts) - except ClassNotFound as err: - print('Error:', err, file=sys.stderr) - return 1 - else: - try: - lexer = get_lexer_by_name(lexername, **parsed_opts) - except (OptionError, ClassNotFound) as err: - print('Error:', err, file=sys.stderr) - return 1 - - # read input code - code = None - - if argns.INPUTFILE: - if argns.s: - print('Error: -s option not usable when input file specified', - file=sys.stderr) - return 2 - - infn = argns.INPUTFILE - try: - with open(infn, 'rb') as infp: - code = infp.read() - except Exception as err: - print('Error: cannot read infile:', err, file=sys.stderr) - return 1 - if not inencoding: - code, inencoding = guess_decode(code) - - # do we have to guess the lexer? - if not lexer: - try: - lexer = get_lexer_for_filename(infn, code, **parsed_opts) - except ClassNotFound as err: - if argns.g: - try: - lexer = guess_lexer(code, **parsed_opts) - except ClassNotFound: - lexer = TextLexer(**parsed_opts) - else: - print('Error:', err, file=sys.stderr) - return 1 - except OptionError as err: - print('Error:', err, file=sys.stderr) - return 1 - - elif not argns.s: # treat stdin as full file (-s support is later) - # read code from terminal, always in binary mode since we want to - # decode ourselves and be tolerant with it - code = sys.stdin.buffer.read() # use .buffer to get a binary stream - if not inencoding: - code, inencoding = guess_decode_from_terminal(code, sys.stdin) - # else the lexer will do the decoding - if not lexer: - try: - lexer = guess_lexer(code, **parsed_opts) - except ClassNotFound: - lexer = TextLexer(**parsed_opts) - - else: # -s option needs a lexer with -l - if not lexer: - print('Error: when using -s a lexer has to be selected with -l', - file=sys.stderr) - return 2 - - # process filters - for fname, fopts in F_opts: - try: - lexer.add_filter(fname, **fopts) - except ClassNotFound as err: - print('Error:', err, file=sys.stderr) - return 1 - - # select formatter - outfn = argns.o - fmter = argns.f - if fmter: - # custom formatter, located relative to user's cwd - if allow_custom_lexer_formatter and '.py' in fmter: - try: - filename = None - name = None - if ':' in fmter: - # Same logic as above for custom lexer - filename, name = fmter.rsplit(':', 1) - - if '.py' in name: - name = None - - if filename and name: - fmter = load_formatter_from_file(filename, name, - **parsed_opts) - else: - fmter = load_formatter_from_file(fmter, **parsed_opts) - except ClassNotFound as err: - print('Error:', err, file=sys.stderr) - return 1 - else: - try: - fmter = get_formatter_by_name(fmter, **parsed_opts) - except (OptionError, ClassNotFound) as err: - print('Error:', err, file=sys.stderr) - return 1 - - if outfn: - if not fmter: - try: - fmter = get_formatter_for_filename(outfn, **parsed_opts) - except (OptionError, ClassNotFound) as err: - print('Error:', err, file=sys.stderr) - return 1 - try: - outfile = open(outfn, 'wb') - except Exception as err: - print('Error: cannot open outfile:', err, file=sys.stderr) - return 1 - else: - if not fmter: - if os.environ.get('COLORTERM','') in ('truecolor', '24bit'): - fmter = TerminalTrueColorFormatter(**parsed_opts) - elif '256' in os.environ.get('TERM', ''): - fmter = Terminal256Formatter(**parsed_opts) - else: - fmter = TerminalFormatter(**parsed_opts) - outfile = sys.stdout.buffer - - # determine output encoding if not explicitly selected - if not outencoding: - if outfn: - # output file? use lexer encoding for now (can still be None) - fmter.encoding = inencoding - else: - # else use terminal encoding - fmter.encoding = terminal_encoding(sys.stdout) - - # provide coloring under Windows, if possible - if not outfn and sys.platform in ('win32', 'cygwin') and \ - fmter.name in ('Terminal', 'Terminal256'): # pragma: no cover - # unfortunately colorama doesn't support binary streams on Py3 - outfile = UnclosingTextIOWrapper(outfile, encoding=fmter.encoding) - fmter.encoding = None - try: - import colorama.initialise - except ImportError: - pass - else: - outfile = colorama.initialise.wrap_stream( - outfile, convert=None, strip=None, autoreset=False, wrap=True) - - # When using the LaTeX formatter and the option `escapeinside` is - # specified, we need a special lexer which collects escaped text - # before running the chosen language lexer. - escapeinside = parsed_opts.get('escapeinside', '') - if len(escapeinside) == 2 and isinstance(fmter, LatexFormatter): - left = escapeinside[0] - right = escapeinside[1] - lexer = LatexEmbeddedLexer(left, right, lexer) - - # ... and do it! - if not argns.s: - # process whole input as per normal... - try: - highlight(code, lexer, fmter, outfile) - finally: - if outfn: - outfile.close() - return 0 - else: - # line by line processing of stdin (eg: for 'tail -f')... - try: - while 1: - line = sys.stdin.buffer.readline() - if not line: - break - if not inencoding: - line = guess_decode_from_terminal(line, sys.stdin)[0] - highlight(line, lexer, fmter, outfile) - if hasattr(outfile, 'flush'): - outfile.flush() - return 0 - except KeyboardInterrupt: # pragma: no cover - return 0 - finally: - if outfn: - outfile.close() - - -class HelpFormatter(argparse.HelpFormatter): - def __init__(self, prog, indent_increment=2, max_help_position=16, width=None): - if width is None: - try: - width = shutil.get_terminal_size().columns - 2 - except Exception: - pass - argparse.HelpFormatter.__init__(self, prog, indent_increment, - max_help_position, width) - - -def main(args=sys.argv): - """ - Main command line entry point. - """ - desc = "Highlight an input file and write the result to an output file." - parser = argparse.ArgumentParser(description=desc, add_help=False, - formatter_class=HelpFormatter) - - operation = parser.add_argument_group('Main operation') - lexersel = operation.add_mutually_exclusive_group() - lexersel.add_argument( - '-l', metavar='LEXER', - help='Specify the lexer to use. (Query names with -L.) If not ' - 'given and -g is not present, the lexer is guessed from the filename.') - lexersel.add_argument( - '-g', action='store_true', - help='Guess the lexer from the file contents, or pass through ' - 'as plain text if nothing can be guessed.') - operation.add_argument( - '-F', metavar='FILTER[:options]', action='append', - help='Add a filter to the token stream. (Query names with -L.) ' - 'Filter options are given after a colon if necessary.') - operation.add_argument( - '-f', metavar='FORMATTER', - help='Specify the formatter to use. (Query names with -L.) ' - 'If not given, the formatter is guessed from the output filename, ' - 'and defaults to the terminal formatter if the output is to the ' - 'terminal or an unknown file extension.') - operation.add_argument( - '-O', metavar='OPTION=value[,OPTION=value,...]', action='append', - help='Give options to the lexer and formatter as a comma-separated ' - 'list of key-value pairs. ' - 'Example: `-O bg=light,python=cool`.') - operation.add_argument( - '-P', metavar='OPTION=value', action='append', - help='Give a single option to the lexer and formatter - with this ' - 'you can pass options whose value contains commas and equal signs. ' - 'Example: `-P "heading=Pygments, the Python highlighter"`.') - operation.add_argument( - '-o', metavar='OUTPUTFILE', - help='Where to write the output. Defaults to standard output.') - - operation.add_argument( - 'INPUTFILE', nargs='?', - help='Where to read the input. Defaults to standard input.') - - flags = parser.add_argument_group('Operation flags') - flags.add_argument( - '-v', action='store_true', - help='Print a detailed traceback on unhandled exceptions, which ' - 'is useful for debugging and bug reports.') - flags.add_argument( - '-s', action='store_true', - help='Process lines one at a time until EOF, rather than waiting to ' - 'process the entire file. This only works for stdin, only for lexers ' - 'with no line-spanning constructs, and is intended for streaming ' - 'input such as you get from `tail -f`. ' - 'Example usage: `tail -f sql.log | pygmentize -s -l sql`.') - flags.add_argument( - '-x', action='store_true', - help='Allow custom lexers and formatters to be loaded from a .py file ' - 'relative to the current working directory. For example, ' - '`-l ./customlexer.py -x`. By default, this option expects a file ' - 'with a class named CustomLexer or CustomFormatter; you can also ' - 'specify your own class name with a colon (`-l ./lexer.py:MyLexer`). ' - 'Users should be very careful not to use this option with untrusted ' - 'files, because it will import and run them.') - flags.add_argument('--json', help='Output as JSON. This can ' - 'be only used in conjunction with -L.', - default=False, - action='store_true') - - special_modes_group = parser.add_argument_group( - 'Special modes - do not do any highlighting') - special_modes = special_modes_group.add_mutually_exclusive_group() - special_modes.add_argument( - '-S', metavar='STYLE -f formatter', - help='Print style definitions for STYLE for a formatter ' - 'given with -f. The argument given by -a is formatter ' - 'dependent.') - special_modes.add_argument( - '-L', nargs='*', metavar='WHAT', - help='List lexers, formatters, styles or filters -- ' - 'give additional arguments for the thing(s) you want to list ' - '(e.g. "styles"), or omit them to list everything.') - special_modes.add_argument( - '-N', metavar='FILENAME', - help='Guess and print out a lexer name based solely on the given ' - 'filename. Does not take input or highlight anything. If no specific ' - 'lexer can be determined, "text" is printed.') - special_modes.add_argument( - '-C', action='store_true', - help='Like -N, but print out a lexer name based solely on ' - 'a given content from standard input.') - special_modes.add_argument( - '-H', action='store', nargs=2, metavar=('NAME', 'TYPE'), - help='Print detailed help for the object of type , ' - 'where is one of "lexer", "formatter" or "filter".') - special_modes.add_argument( - '-V', action='store_true', - help='Print the package version.') - special_modes.add_argument( - '-h', '--help', action='store_true', - help='Print this help.') - special_modes_group.add_argument( - '-a', metavar='ARG', - help='Formatter-specific additional argument for the -S (print ' - 'style sheet) mode.') - - argns = parser.parse_args(args[1:]) - - try: - return main_inner(parser, argns) - except BrokenPipeError: - # someone closed our stdout, e.g. by quitting a pager. - return 0 - except Exception: - if argns.v: - print(file=sys.stderr) - print('*' * 65, file=sys.stderr) - print('An unhandled exception occurred while highlighting.', - file=sys.stderr) - print('Please report the whole traceback to the issue tracker at', - file=sys.stderr) - print('.', - file=sys.stderr) - print('*' * 65, file=sys.stderr) - print(file=sys.stderr) - raise - import traceback - info = traceback.format_exception(*sys.exc_info()) - msg = info[-1].strip() - if len(info) >= 3: - # extract relevant file and position info - msg += '\n (f{})'.format(info[-2].split('\n')[0].strip()[1:]) - print(file=sys.stderr) - print('*** Error while highlighting:', file=sys.stderr) - print(msg, file=sys.stderr) - print('*** If this is a bug you want to report, please rerun with -v.', - file=sys.stderr) - return 1 diff --git a/voxvera/vendor/pygments/console.py b/voxvera/vendor/pygments/console.py deleted file mode 100644 index ee1ac27..0000000 --- a/voxvera/vendor/pygments/console.py +++ /dev/null @@ -1,70 +0,0 @@ -""" - pygments.console - ~~~~~~~~~~~~~~~~ - - Format colored console output. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -esc = "\x1b[" - -codes = {} -codes[""] = "" -codes["reset"] = esc + "39;49;00m" - -codes["bold"] = esc + "01m" -codes["faint"] = esc + "02m" -codes["standout"] = esc + "03m" -codes["underline"] = esc + "04m" -codes["blink"] = esc + "05m" -codes["overline"] = esc + "06m" - -dark_colors = ["black", "red", "green", "yellow", "blue", - "magenta", "cyan", "gray"] -light_colors = ["brightblack", "brightred", "brightgreen", "brightyellow", "brightblue", - "brightmagenta", "brightcyan", "white"] - -x = 30 -for dark, light in zip(dark_colors, light_colors): - codes[dark] = esc + "%im" % x - codes[light] = esc + "%im" % (60 + x) - x += 1 - -del dark, light, x - -codes["white"] = codes["bold"] - - -def reset_color(): - return codes["reset"] - - -def colorize(color_key, text): - return codes[color_key] + text + codes["reset"] - - -def ansiformat(attr, text): - """ - Format ``text`` with a color and/or some attributes:: - - color normal color - *color* bold color - _color_ underlined color - +color+ blinking color - """ - result = [] - if attr[:1] == attr[-1:] == '+': - result.append(codes['blink']) - attr = attr[1:-1] - if attr[:1] == attr[-1:] == '*': - result.append(codes['bold']) - attr = attr[1:-1] - if attr[:1] == attr[-1:] == '_': - result.append(codes['underline']) - attr = attr[1:-1] - result.append(codes[attr]) - result.append(text) - result.append(codes['reset']) - return ''.join(result) diff --git a/voxvera/vendor/pygments/filter.py b/voxvera/vendor/pygments/filter.py deleted file mode 100644 index 5efff43..0000000 --- a/voxvera/vendor/pygments/filter.py +++ /dev/null @@ -1,70 +0,0 @@ -""" - pygments.filter - ~~~~~~~~~~~~~~~ - - Module that implements the default filter. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - - -def apply_filters(stream, filters, lexer=None): - """ - Use this method to apply an iterable of filters to - a stream. If lexer is given it's forwarded to the - filter, otherwise the filter receives `None`. - """ - def _apply(filter_, stream): - yield from filter_.filter(lexer, stream) - for filter_ in filters: - stream = _apply(filter_, stream) - return stream - - -def simplefilter(f): - """ - Decorator that converts a function into a filter:: - - @simplefilter - def lowercase(self, lexer, stream, options): - for ttype, value in stream: - yield ttype, value.lower() - """ - return type(f.__name__, (FunctionFilter,), { - '__module__': getattr(f, '__module__'), - '__doc__': f.__doc__, - 'function': f, - }) - - -class Filter: - """ - Default filter. Subclass this class or use the `simplefilter` - decorator to create own filters. - """ - - def __init__(self, **options): - self.options = options - - def filter(self, lexer, stream): - raise NotImplementedError() - - -class FunctionFilter(Filter): - """ - Abstract class used by `simplefilter` to create simple - function filters on the fly. The `simplefilter` decorator - automatically creates subclasses of this class for - functions passed to it. - """ - function = None - - def __init__(self, **options): - if not hasattr(self, 'function'): - raise TypeError(f'{self.__class__.__name__!r} used without bound function') - Filter.__init__(self, **options) - - def filter(self, lexer, stream): - # pylint: disable=not-callable - yield from self.function(lexer, stream, self.options) diff --git a/voxvera/vendor/pygments/filters/__init__.py b/voxvera/vendor/pygments/filters/__init__.py deleted file mode 100644 index 2fed761..0000000 --- a/voxvera/vendor/pygments/filters/__init__.py +++ /dev/null @@ -1,940 +0,0 @@ -""" - pygments.filters - ~~~~~~~~~~~~~~~~ - - Module containing filter lookup functions and default - filters. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.token import String, Comment, Keyword, Name, Error, Whitespace, \ - string_to_tokentype -from pygments.filter import Filter -from pygments.util import get_list_opt, get_int_opt, get_bool_opt, \ - get_choice_opt, ClassNotFound, OptionError -from pygments.plugin import find_plugin_filters - - -def find_filter_class(filtername): - """Lookup a filter by name. Return None if not found.""" - if filtername in FILTERS: - return FILTERS[filtername] - for name, cls in find_plugin_filters(): - if name == filtername: - return cls - return None - - -def get_filter_by_name(filtername, **options): - """Return an instantiated filter. - - Options are passed to the filter initializer if wanted. - Raise a ClassNotFound if not found. - """ - cls = find_filter_class(filtername) - if cls: - return cls(**options) - else: - raise ClassNotFound(f'filter {filtername!r} not found') - - -def get_all_filters(): - """Return a generator of all filter names.""" - yield from FILTERS - for name, _ in find_plugin_filters(): - yield name - - -def _replace_special(ttype, value, regex, specialttype, - replacefunc=lambda x: x): - last = 0 - for match in regex.finditer(value): - start, end = match.start(), match.end() - if start != last: - yield ttype, value[last:start] - yield specialttype, replacefunc(value[start:end]) - last = end - if last != len(value): - yield ttype, value[last:] - - -class CodeTagFilter(Filter): - """Highlight special code tags in comments and docstrings. - - Options accepted: - - `codetags` : list of strings - A list of strings that are flagged as code tags. The default is to - highlight ``XXX``, ``TODO``, ``FIXME``, ``BUG`` and ``NOTE``. - - .. versionchanged:: 2.13 - Now recognizes ``FIXME`` by default. - """ - - def __init__(self, **options): - Filter.__init__(self, **options) - tags = get_list_opt(options, 'codetags', - ['XXX', 'TODO', 'FIXME', 'BUG', 'NOTE']) - self.tag_re = re.compile(r'\b({})\b'.format('|'.join([ - re.escape(tag) for tag in tags if tag - ]))) - - def filter(self, lexer, stream): - regex = self.tag_re - for ttype, value in stream: - if ttype in String.Doc or \ - ttype in Comment and \ - ttype not in Comment.Preproc: - yield from _replace_special(ttype, value, regex, Comment.Special) - else: - yield ttype, value - - -class SymbolFilter(Filter): - """Convert mathematical symbols such as \\ in Isabelle - or \\longrightarrow in LaTeX into Unicode characters. - - This is mostly useful for HTML or console output when you want to - approximate the source rendering you'd see in an IDE. - - Options accepted: - - `lang` : string - The symbol language. Must be one of ``'isabelle'`` or - ``'latex'``. The default is ``'isabelle'``. - """ - - latex_symbols = { - '\\alpha' : '\U000003b1', - '\\beta' : '\U000003b2', - '\\gamma' : '\U000003b3', - '\\delta' : '\U000003b4', - '\\varepsilon' : '\U000003b5', - '\\zeta' : '\U000003b6', - '\\eta' : '\U000003b7', - '\\vartheta' : '\U000003b8', - '\\iota' : '\U000003b9', - '\\kappa' : '\U000003ba', - '\\lambda' : '\U000003bb', - '\\mu' : '\U000003bc', - '\\nu' : '\U000003bd', - '\\xi' : '\U000003be', - '\\pi' : '\U000003c0', - '\\varrho' : '\U000003c1', - '\\sigma' : '\U000003c3', - '\\tau' : '\U000003c4', - '\\upsilon' : '\U000003c5', - '\\varphi' : '\U000003c6', - '\\chi' : '\U000003c7', - '\\psi' : '\U000003c8', - '\\omega' : '\U000003c9', - '\\Gamma' : '\U00000393', - '\\Delta' : '\U00000394', - '\\Theta' : '\U00000398', - '\\Lambda' : '\U0000039b', - '\\Xi' : '\U0000039e', - '\\Pi' : '\U000003a0', - '\\Sigma' : '\U000003a3', - '\\Upsilon' : '\U000003a5', - '\\Phi' : '\U000003a6', - '\\Psi' : '\U000003a8', - '\\Omega' : '\U000003a9', - '\\leftarrow' : '\U00002190', - '\\longleftarrow' : '\U000027f5', - '\\rightarrow' : '\U00002192', - '\\longrightarrow' : '\U000027f6', - '\\Leftarrow' : '\U000021d0', - '\\Longleftarrow' : '\U000027f8', - '\\Rightarrow' : '\U000021d2', - '\\Longrightarrow' : '\U000027f9', - '\\leftrightarrow' : '\U00002194', - '\\longleftrightarrow' : '\U000027f7', - '\\Leftrightarrow' : '\U000021d4', - '\\Longleftrightarrow' : '\U000027fa', - '\\mapsto' : '\U000021a6', - '\\longmapsto' : '\U000027fc', - '\\relbar' : '\U00002500', - '\\Relbar' : '\U00002550', - '\\hookleftarrow' : '\U000021a9', - '\\hookrightarrow' : '\U000021aa', - '\\leftharpoondown' : '\U000021bd', - '\\rightharpoondown' : '\U000021c1', - '\\leftharpoonup' : '\U000021bc', - '\\rightharpoonup' : '\U000021c0', - '\\rightleftharpoons' : '\U000021cc', - '\\leadsto' : '\U0000219d', - '\\downharpoonleft' : '\U000021c3', - '\\downharpoonright' : '\U000021c2', - '\\upharpoonleft' : '\U000021bf', - '\\upharpoonright' : '\U000021be', - '\\restriction' : '\U000021be', - '\\uparrow' : '\U00002191', - '\\Uparrow' : '\U000021d1', - '\\downarrow' : '\U00002193', - '\\Downarrow' : '\U000021d3', - '\\updownarrow' : '\U00002195', - '\\Updownarrow' : '\U000021d5', - '\\langle' : '\U000027e8', - '\\rangle' : '\U000027e9', - '\\lceil' : '\U00002308', - '\\rceil' : '\U00002309', - '\\lfloor' : '\U0000230a', - '\\rfloor' : '\U0000230b', - '\\flqq' : '\U000000ab', - '\\frqq' : '\U000000bb', - '\\bot' : '\U000022a5', - '\\top' : '\U000022a4', - '\\wedge' : '\U00002227', - '\\bigwedge' : '\U000022c0', - '\\vee' : '\U00002228', - '\\bigvee' : '\U000022c1', - '\\forall' : '\U00002200', - '\\exists' : '\U00002203', - '\\nexists' : '\U00002204', - '\\neg' : '\U000000ac', - '\\Box' : '\U000025a1', - '\\Diamond' : '\U000025c7', - '\\vdash' : '\U000022a2', - '\\models' : '\U000022a8', - '\\dashv' : '\U000022a3', - '\\surd' : '\U0000221a', - '\\le' : '\U00002264', - '\\ge' : '\U00002265', - '\\ll' : '\U0000226a', - '\\gg' : '\U0000226b', - '\\lesssim' : '\U00002272', - '\\gtrsim' : '\U00002273', - '\\lessapprox' : '\U00002a85', - '\\gtrapprox' : '\U00002a86', - '\\in' : '\U00002208', - '\\notin' : '\U00002209', - '\\subset' : '\U00002282', - '\\supset' : '\U00002283', - '\\subseteq' : '\U00002286', - '\\supseteq' : '\U00002287', - '\\sqsubset' : '\U0000228f', - '\\sqsupset' : '\U00002290', - '\\sqsubseteq' : '\U00002291', - '\\sqsupseteq' : '\U00002292', - '\\cap' : '\U00002229', - '\\bigcap' : '\U000022c2', - '\\cup' : '\U0000222a', - '\\bigcup' : '\U000022c3', - '\\sqcup' : '\U00002294', - '\\bigsqcup' : '\U00002a06', - '\\sqcap' : '\U00002293', - '\\Bigsqcap' : '\U00002a05', - '\\setminus' : '\U00002216', - '\\propto' : '\U0000221d', - '\\uplus' : '\U0000228e', - '\\bigplus' : '\U00002a04', - '\\sim' : '\U0000223c', - '\\doteq' : '\U00002250', - '\\simeq' : '\U00002243', - '\\approx' : '\U00002248', - '\\asymp' : '\U0000224d', - '\\cong' : '\U00002245', - '\\equiv' : '\U00002261', - '\\Join' : '\U000022c8', - '\\bowtie' : '\U00002a1d', - '\\prec' : '\U0000227a', - '\\succ' : '\U0000227b', - '\\preceq' : '\U0000227c', - '\\succeq' : '\U0000227d', - '\\parallel' : '\U00002225', - '\\mid' : '\U000000a6', - '\\pm' : '\U000000b1', - '\\mp' : '\U00002213', - '\\times' : '\U000000d7', - '\\div' : '\U000000f7', - '\\cdot' : '\U000022c5', - '\\star' : '\U000022c6', - '\\circ' : '\U00002218', - '\\dagger' : '\U00002020', - '\\ddagger' : '\U00002021', - '\\lhd' : '\U000022b2', - '\\rhd' : '\U000022b3', - '\\unlhd' : '\U000022b4', - '\\unrhd' : '\U000022b5', - '\\triangleleft' : '\U000025c3', - '\\triangleright' : '\U000025b9', - '\\triangle' : '\U000025b3', - '\\triangleq' : '\U0000225c', - '\\oplus' : '\U00002295', - '\\bigoplus' : '\U00002a01', - '\\otimes' : '\U00002297', - '\\bigotimes' : '\U00002a02', - '\\odot' : '\U00002299', - '\\bigodot' : '\U00002a00', - '\\ominus' : '\U00002296', - '\\oslash' : '\U00002298', - '\\dots' : '\U00002026', - '\\cdots' : '\U000022ef', - '\\sum' : '\U00002211', - '\\prod' : '\U0000220f', - '\\coprod' : '\U00002210', - '\\infty' : '\U0000221e', - '\\int' : '\U0000222b', - '\\oint' : '\U0000222e', - '\\clubsuit' : '\U00002663', - '\\diamondsuit' : '\U00002662', - '\\heartsuit' : '\U00002661', - '\\spadesuit' : '\U00002660', - '\\aleph' : '\U00002135', - '\\emptyset' : '\U00002205', - '\\nabla' : '\U00002207', - '\\partial' : '\U00002202', - '\\flat' : '\U0000266d', - '\\natural' : '\U0000266e', - '\\sharp' : '\U0000266f', - '\\angle' : '\U00002220', - '\\copyright' : '\U000000a9', - '\\textregistered' : '\U000000ae', - '\\textonequarter' : '\U000000bc', - '\\textonehalf' : '\U000000bd', - '\\textthreequarters' : '\U000000be', - '\\textordfeminine' : '\U000000aa', - '\\textordmasculine' : '\U000000ba', - '\\euro' : '\U000020ac', - '\\pounds' : '\U000000a3', - '\\yen' : '\U000000a5', - '\\textcent' : '\U000000a2', - '\\textcurrency' : '\U000000a4', - '\\textdegree' : '\U000000b0', - } - - isabelle_symbols = { - '\\' : '\U0001d7ec', - '\\' : '\U0001d7ed', - '\\' : '\U0001d7ee', - '\\' : '\U0001d7ef', - '\\' : '\U0001d7f0', - '\\' : '\U0001d7f1', - '\\' : '\U0001d7f2', - '\\' : '\U0001d7f3', - '\\' : '\U0001d7f4', - '\\' : '\U0001d7f5', - '\\
' : '\U0001d49c', - '\\' : '\U0000212c', - '\\' : '\U0001d49e', - '\\' : '\U0001d49f', - '\\' : '\U00002130', - '\\' : '\U00002131', - '\\' : '\U0001d4a2', - '\\' : '\U0000210b', - '\\' : '\U00002110', - '\\' : '\U0001d4a5', - '\\' : '\U0001d4a6', - '\\' : '\U00002112', - '\\' : '\U00002133', - '\\' : '\U0001d4a9', - '\\' : '\U0001d4aa', - '\\

' : '\U0001d5c9', - '\\' : '\U0001d5ca', - '\\' : '\U0001d5cb', - '\\' : '\U0001d5cc', - '\\' : '\U0001d5cd', - '\\' : '\U0001d5ce', - '\\' : '\U0001d5cf', - '\\' : '\U0001d5d0', - '\\' : '\U0001d5d1', - '\\' : '\U0001d5d2', - '\\' : '\U0001d5d3', - '\\' : '\U0001d504', - '\\' : '\U0001d505', - '\\' : '\U0000212d', - '\\

' : '\U0001d507', - '\\' : '\U0001d508', - '\\' : '\U0001d509', - '\\' : '\U0001d50a', - '\\' : '\U0000210c', - '\\' : '\U00002111', - '\\' : '\U0001d50d', - '\\' : '\U0001d50e', - '\\' : '\U0001d50f', - '\\' : '\U0001d510', - '\\' : '\U0001d511', - '\\' : '\U0001d512', - '\\' : '\U0001d513', - '\\' : '\U0001d514', - '\\' : '\U0000211c', - '\\' : '\U0001d516', - '\\' : '\U0001d517', - '\\' : '\U0001d518', - '\\' : '\U0001d519', - '\\' : '\U0001d51a', - '\\' : '\U0001d51b', - '\\' : '\U0001d51c', - '\\' : '\U00002128', - '\\' : '\U0001d51e', - '\\' : '\U0001d51f', - '\\' : '\U0001d520', - '\\
' : '\U0001d521', - '\\' : '\U0001d522', - '\\' : '\U0001d523', - '\\' : '\U0001d524', - '\\' : '\U0001d525', - '\\' : '\U0001d526', - '\\' : '\U0001d527', - '\\' : '\U0001d528', - '\\' : '\U0001d529', - '\\' : '\U0001d52a', - '\\' : '\U0001d52b', - '\\' : '\U0001d52c', - '\\' : '\U0001d52d', - '\\' : '\U0001d52e', - '\\' : '\U0001d52f', - '\\' : '\U0001d530', - '\\' : '\U0001d531', - '\\' : '\U0001d532', - '\\' : '\U0001d533', - '\\' : '\U0001d534', - '\\' : '\U0001d535', - '\\' : '\U0001d536', - '\\' : '\U0001d537', - '\\' : '\U000003b1', - '\\' : '\U000003b2', - '\\' : '\U000003b3', - '\\' : '\U000003b4', - '\\' : '\U000003b5', - '\\' : '\U000003b6', - '\\' : '\U000003b7', - '\\' : '\U000003b8', - '\\' : '\U000003b9', - '\\' : '\U000003ba', - '\\' : '\U000003bb', - '\\' : '\U000003bc', - '\\' : '\U000003bd', - '\\' : '\U000003be', - '\\' : '\U000003c0', - '\\' : '\U000003c1', - '\\' : '\U000003c3', - '\\' : '\U000003c4', - '\\' : '\U000003c5', - '\\' : '\U000003c6', - '\\' : '\U000003c7', - '\\' : '\U000003c8', - '\\' : '\U000003c9', - '\\' : '\U00000393', - '\\' : '\U00000394', - '\\' : '\U00000398', - '\\' : '\U0000039b', - '\\' : '\U0000039e', - '\\' : '\U000003a0', - '\\' : '\U000003a3', - '\\' : '\U000003a5', - '\\' : '\U000003a6', - '\\' : '\U000003a8', - '\\' : '\U000003a9', - '\\' : '\U0001d539', - '\\' : '\U00002102', - '\\' : '\U00002115', - '\\' : '\U0000211a', - '\\' : '\U0000211d', - '\\' : '\U00002124', - '\\' : '\U00002190', - '\\' : '\U000027f5', - '\\' : '\U00002192', - '\\' : '\U000027f6', - '\\' : '\U000021d0', - '\\' : '\U000027f8', - '\\' : '\U000021d2', - '\\' : '\U000027f9', - '\\' : '\U00002194', - '\\' : '\U000027f7', - '\\' : '\U000021d4', - '\\' : '\U000027fa', - '\\' : '\U000021a6', - '\\' : '\U000027fc', - '\\' : '\U00002500', - '\\' : '\U00002550', - '\\' : '\U000021a9', - '\\' : '\U000021aa', - '\\' : '\U000021bd', - '\\' : '\U000021c1', - '\\' : '\U000021bc', - '\\' : '\U000021c0', - '\\' : '\U000021cc', - '\\' : '\U0000219d', - '\\' : '\U000021c3', - '\\' : '\U000021c2', - '\\' : '\U000021bf', - '\\' : '\U000021be', - '\\' : '\U000021be', - '\\' : '\U00002237', - '\\' : '\U00002191', - '\\' : '\U000021d1', - '\\' : '\U00002193', - '\\' : '\U000021d3', - '\\' : '\U00002195', - '\\' : '\U000021d5', - '\\' : '\U000027e8', - '\\' : '\U000027e9', - '\\' : '\U00002308', - '\\' : '\U00002309', - '\\' : '\U0000230a', - '\\' : '\U0000230b', - '\\' : '\U00002987', - '\\' : '\U00002988', - '\\' : '\U000027e6', - '\\' : '\U000027e7', - '\\' : '\U00002983', - '\\' : '\U00002984', - '\\' : '\U000000ab', - '\\' : '\U000000bb', - '\\' : '\U000022a5', - '\\' : '\U000022a4', - '\\' : '\U00002227', - '\\' : '\U000022c0', - '\\' : '\U00002228', - '\\' : '\U000022c1', - '\\' : '\U00002200', - '\\' : '\U00002203', - '\\' : '\U00002204', - '\\' : '\U000000ac', - '\\' : '\U000025a1', - '\\' : '\U000025c7', - '\\' : '\U000022a2', - '\\' : '\U000022a8', - '\\' : '\U000022a9', - '\\' : '\U000022ab', - '\\' : '\U000022a3', - '\\' : '\U0000221a', - '\\' : '\U00002264', - '\\' : '\U00002265', - '\\' : '\U0000226a', - '\\' : '\U0000226b', - '\\' : '\U00002272', - '\\' : '\U00002273', - '\\' : '\U00002a85', - '\\' : '\U00002a86', - '\\' : '\U00002208', - '\\' : '\U00002209', - '\\' : '\U00002282', - '\\' : '\U00002283', - '\\' : '\U00002286', - '\\' : '\U00002287', - '\\' : '\U0000228f', - '\\' : '\U00002290', - '\\' : '\U00002291', - '\\' : '\U00002292', - '\\' : '\U00002229', - '\\' : '\U000022c2', - '\\' : '\U0000222a', - '\\' : '\U000022c3', - '\\' : '\U00002294', - '\\' : '\U00002a06', - '\\' : '\U00002293', - '\\' : '\U00002a05', - '\\' : '\U00002216', - '\\' : '\U0000221d', - '\\' : '\U0000228e', - '\\' : '\U00002a04', - '\\' : '\U00002260', - '\\' : '\U0000223c', - '\\' : '\U00002250', - '\\' : '\U00002243', - '\\' : '\U00002248', - '\\' : '\U0000224d', - '\\' : '\U00002245', - '\\' : '\U00002323', - '\\' : '\U00002261', - '\\' : '\U00002322', - '\\' : '\U000022c8', - '\\' : '\U00002a1d', - '\\' : '\U0000227a', - '\\' : '\U0000227b', - '\\' : '\U0000227c', - '\\' : '\U0000227d', - '\\' : '\U00002225', - '\\' : '\U000000a6', - '\\' : '\U000000b1', - '\\' : '\U00002213', - '\\' : '\U000000d7', - '\\
' : '\U000000f7', - '\\' : '\U000022c5', - '\\' : '\U000022c6', - '\\' : '\U00002219', - '\\' : '\U00002218', - '\\' : '\U00002020', - '\\' : '\U00002021', - '\\' : '\U000022b2', - '\\' : '\U000022b3', - '\\' : '\U000022b4', - '\\' : '\U000022b5', - '\\' : '\U000025c3', - '\\' : '\U000025b9', - '\\' : '\U000025b3', - '\\' : '\U0000225c', - '\\' : '\U00002295', - '\\' : '\U00002a01', - '\\' : '\U00002297', - '\\' : '\U00002a02', - '\\' : '\U00002299', - '\\' : '\U00002a00', - '\\' : '\U00002296', - '\\' : '\U00002298', - '\\' : '\U00002026', - '\\' : '\U000022ef', - '\\' : '\U00002211', - '\\' : '\U0000220f', - '\\' : '\U00002210', - '\\' : '\U0000221e', - '\\' : '\U0000222b', - '\\' : '\U0000222e', - '\\' : '\U00002663', - '\\' : '\U00002662', - '\\' : '\U00002661', - '\\' : '\U00002660', - '\\' : '\U00002135', - '\\' : '\U00002205', - '\\' : '\U00002207', - '\\' : '\U00002202', - '\\' : '\U0000266d', - '\\' : '\U0000266e', - '\\' : '\U0000266f', - '\\' : '\U00002220', - '\\' : '\U000000a9', - '\\' : '\U000000ae', - '\\' : '\U000000ad', - '\\' : '\U000000af', - '\\' : '\U000000bc', - '\\' : '\U000000bd', - '\\' : '\U000000be', - '\\' : '\U000000aa', - '\\' : '\U000000ba', - '\\
' : '\U000000a7', - '\\' : '\U000000b6', - '\\' : '\U000000a1', - '\\' : '\U000000bf', - '\\' : '\U000020ac', - '\\' : '\U000000a3', - '\\' : '\U000000a5', - '\\' : '\U000000a2', - '\\' : '\U000000a4', - '\\' : '\U000000b0', - '\\' : '\U00002a3f', - '\\' : '\U00002127', - '\\' : '\U000025ca', - '\\' : '\U00002118', - '\\' : '\U00002240', - '\\' : '\U000022c4', - '\\' : '\U000000b4', - '\\' : '\U00000131', - '\\' : '\U000000a8', - '\\' : '\U000000b8', - '\\' : '\U000002dd', - '\\' : '\U000003f5', - '\\' : '\U000023ce', - '\\' : '\U00002039', - '\\' : '\U0000203a', - '\\' : '\U00002302', - '\\<^sub>' : '\U000021e9', - '\\<^sup>' : '\U000021e7', - '\\<^bold>' : '\U00002759', - '\\<^bsub>' : '\U000021d8', - '\\<^esub>' : '\U000021d9', - '\\<^bsup>' : '\U000021d7', - '\\<^esup>' : '\U000021d6', - } - - lang_map = {'isabelle' : isabelle_symbols, 'latex' : latex_symbols} - - def __init__(self, **options): - Filter.__init__(self, **options) - lang = get_choice_opt(options, 'lang', - ['isabelle', 'latex'], 'isabelle') - self.symbols = self.lang_map[lang] - - def filter(self, lexer, stream): - for ttype, value in stream: - if value in self.symbols: - yield ttype, self.symbols[value] - else: - yield ttype, value - - -class KeywordCaseFilter(Filter): - """Convert keywords to lowercase or uppercase or capitalize them, which - means first letter uppercase, rest lowercase. - - This can be useful e.g. if you highlight Pascal code and want to adapt the - code to your styleguide. - - Options accepted: - - `case` : string - The casing to convert keywords to. Must be one of ``'lower'``, - ``'upper'`` or ``'capitalize'``. The default is ``'lower'``. - """ - - def __init__(self, **options): - Filter.__init__(self, **options) - case = get_choice_opt(options, 'case', - ['lower', 'upper', 'capitalize'], 'lower') - self.convert = getattr(str, case) - - def filter(self, lexer, stream): - for ttype, value in stream: - if ttype in Keyword: - yield ttype, self.convert(value) - else: - yield ttype, value - - -class NameHighlightFilter(Filter): - """Highlight a normal Name (and Name.*) token with a different token type. - - Example:: - - filter = NameHighlightFilter( - names=['foo', 'bar', 'baz'], - tokentype=Name.Function, - ) - - This would highlight the names "foo", "bar" and "baz" - as functions. `Name.Function` is the default token type. - - Options accepted: - - `names` : list of strings - A list of names that should be given the different token type. - There is no default. - `tokentype` : TokenType or string - A token type or a string containing a token type name that is - used for highlighting the strings in `names`. The default is - `Name.Function`. - """ - - def __init__(self, **options): - Filter.__init__(self, **options) - self.names = set(get_list_opt(options, 'names', [])) - tokentype = options.get('tokentype') - if tokentype: - self.tokentype = string_to_tokentype(tokentype) - else: - self.tokentype = Name.Function - - def filter(self, lexer, stream): - for ttype, value in stream: - if ttype in Name and value in self.names: - yield self.tokentype, value - else: - yield ttype, value - - -class ErrorToken(Exception): - pass - - -class RaiseOnErrorTokenFilter(Filter): - """Raise an exception when the lexer generates an error token. - - Options accepted: - - `excclass` : Exception class - The exception class to raise. - The default is `pygments.filters.ErrorToken`. - - .. versionadded:: 0.8 - """ - - def __init__(self, **options): - Filter.__init__(self, **options) - self.exception = options.get('excclass', ErrorToken) - try: - # issubclass() will raise TypeError if first argument is not a class - if not issubclass(self.exception, Exception): - raise TypeError - except TypeError: - raise OptionError('excclass option is not an exception class') - - def filter(self, lexer, stream): - for ttype, value in stream: - if ttype is Error: - raise self.exception(value) - yield ttype, value - - -class VisibleWhitespaceFilter(Filter): - """Convert tabs, newlines and/or spaces to visible characters. - - Options accepted: - - `spaces` : string or bool - If this is a one-character string, spaces will be replaces by this string. - If it is another true value, spaces will be replaced by ``·`` (unicode - MIDDLE DOT). If it is a false value, spaces will not be replaced. The - default is ``False``. - `tabs` : string or bool - The same as for `spaces`, but the default replacement character is ``»`` - (unicode RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK). The default value - is ``False``. Note: this will not work if the `tabsize` option for the - lexer is nonzero, as tabs will already have been expanded then. - `tabsize` : int - If tabs are to be replaced by this filter (see the `tabs` option), this - is the total number of characters that a tab should be expanded to. - The default is ``8``. - `newlines` : string or bool - The same as for `spaces`, but the default replacement character is ``¶`` - (unicode PILCROW SIGN). The default value is ``False``. - `wstokentype` : bool - If true, give whitespace the special `Whitespace` token type. This allows - styling the visible whitespace differently (e.g. greyed out), but it can - disrupt background colors. The default is ``True``. - - .. versionadded:: 0.8 - """ - - def __init__(self, **options): - Filter.__init__(self, **options) - for name, default in [('spaces', '·'), - ('tabs', '»'), - ('newlines', '¶')]: - opt = options.get(name, False) - if isinstance(opt, str) and len(opt) == 1: - setattr(self, name, opt) - else: - setattr(self, name, (opt and default or '')) - tabsize = get_int_opt(options, 'tabsize', 8) - if self.tabs: - self.tabs += ' ' * (tabsize - 1) - if self.newlines: - self.newlines += '\n' - self.wstt = get_bool_opt(options, 'wstokentype', True) - - def filter(self, lexer, stream): - if self.wstt: - spaces = self.spaces or ' ' - tabs = self.tabs or '\t' - newlines = self.newlines or '\n' - regex = re.compile(r'\s') - - def replacefunc(wschar): - if wschar == ' ': - return spaces - elif wschar == '\t': - return tabs - elif wschar == '\n': - return newlines - return wschar - - for ttype, value in stream: - yield from _replace_special(ttype, value, regex, Whitespace, - replacefunc) - else: - spaces, tabs, newlines = self.spaces, self.tabs, self.newlines - # simpler processing - for ttype, value in stream: - if spaces: - value = value.replace(' ', spaces) - if tabs: - value = value.replace('\t', tabs) - if newlines: - value = value.replace('\n', newlines) - yield ttype, value - - -class GobbleFilter(Filter): - """Gobbles source code lines (eats initial characters). - - This filter drops the first ``n`` characters off every line of code. This - may be useful when the source code fed to the lexer is indented by a fixed - amount of space that isn't desired in the output. - - Options accepted: - - `n` : int - The number of characters to gobble. - - .. versionadded:: 1.2 - """ - def __init__(self, **options): - Filter.__init__(self, **options) - self.n = get_int_opt(options, 'n', 0) - - def gobble(self, value, left): - if left < len(value): - return value[left:], 0 - else: - return '', left - len(value) - - def filter(self, lexer, stream): - n = self.n - left = n # How many characters left to gobble. - for ttype, value in stream: - # Remove ``left`` tokens from first line, ``n`` from all others. - parts = value.split('\n') - (parts[0], left) = self.gobble(parts[0], left) - for i in range(1, len(parts)): - (parts[i], left) = self.gobble(parts[i], n) - value = '\n'.join(parts) - - if value != '': - yield ttype, value - - -class TokenMergeFilter(Filter): - """Merges consecutive tokens with the same token type in the output - stream of a lexer. - - .. versionadded:: 1.2 - """ - def __init__(self, **options): - Filter.__init__(self, **options) - - def filter(self, lexer, stream): - current_type = None - current_value = None - for ttype, value in stream: - if ttype is current_type: - current_value += value - else: - if current_type is not None: - yield current_type, current_value - current_type = ttype - current_value = value - if current_type is not None: - yield current_type, current_value - - -FILTERS = { - 'codetagify': CodeTagFilter, - 'keywordcase': KeywordCaseFilter, - 'highlight': NameHighlightFilter, - 'raiseonerror': RaiseOnErrorTokenFilter, - 'whitespace': VisibleWhitespaceFilter, - 'gobble': GobbleFilter, - 'tokenmerge': TokenMergeFilter, - 'symbols': SymbolFilter, -} diff --git a/voxvera/vendor/pygments/formatter.py b/voxvera/vendor/pygments/formatter.py deleted file mode 100644 index a20d303..0000000 --- a/voxvera/vendor/pygments/formatter.py +++ /dev/null @@ -1,129 +0,0 @@ -""" - pygments.formatter - ~~~~~~~~~~~~~~~~~~ - - Base formatter class. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import codecs - -from pygments.util import get_bool_opt -from pygments.styles import get_style_by_name - -__all__ = ['Formatter'] - - -def _lookup_style(style): - if isinstance(style, str): - return get_style_by_name(style) - return style - - -class Formatter: - """ - Converts a token stream to text. - - Formatters should have attributes to help selecting them. These - are similar to the corresponding :class:`~pygments.lexer.Lexer` - attributes. - - .. autoattribute:: name - :no-value: - - .. autoattribute:: aliases - :no-value: - - .. autoattribute:: filenames - :no-value: - - You can pass options as keyword arguments to the constructor. - All formatters accept these basic options: - - ``style`` - The style to use, can be a string or a Style subclass - (default: "default"). Not used by e.g. the - TerminalFormatter. - ``full`` - Tells the formatter to output a "full" document, i.e. - a complete self-contained document. This doesn't have - any effect for some formatters (default: false). - ``title`` - If ``full`` is true, the title that should be used to - caption the document (default: ''). - ``encoding`` - If given, must be an encoding name. This will be used to - convert the Unicode token strings to byte strings in the - output. If it is "" or None, Unicode strings will be written - to the output file, which most file-like objects do not - support (default: None). - ``outencoding`` - Overrides ``encoding`` if given. - - """ - - #: Full name for the formatter, in human-readable form. - name = None - - #: A list of short, unique identifiers that can be used to lookup - #: the formatter from a list, e.g. using :func:`.get_formatter_by_name()`. - aliases = [] - - #: A list of fnmatch patterns that match filenames for which this - #: formatter can produce output. The patterns in this list should be unique - #: among all formatters. - filenames = [] - - #: If True, this formatter outputs Unicode strings when no encoding - #: option is given. - unicodeoutput = True - - def __init__(self, **options): - """ - As with lexers, this constructor takes arbitrary optional arguments, - and if you override it, you should first process your own options, then - call the base class implementation. - """ - self.style = _lookup_style(options.get('style', 'default')) - self.full = get_bool_opt(options, 'full', False) - self.title = options.get('title', '') - self.encoding = options.get('encoding', None) or None - if self.encoding in ('guess', 'chardet'): - # can happen for e.g. pygmentize -O encoding=guess - self.encoding = 'utf-8' - self.encoding = options.get('outencoding') or self.encoding - self.options = options - - def get_style_defs(self, arg=''): - """ - This method must return statements or declarations suitable to define - the current style for subsequent highlighted text (e.g. CSS classes - in the `HTMLFormatter`). - - The optional argument `arg` can be used to modify the generation and - is formatter dependent (it is standardized because it can be given on - the command line). - - This method is called by the ``-S`` :doc:`command-line option `, - the `arg` is then given by the ``-a`` option. - """ - return '' - - def format(self, tokensource, outfile): - """ - This method must format the tokens from the `tokensource` iterable and - write the formatted version to the file object `outfile`. - - Formatter options can control how exactly the tokens are converted. - """ - if self.encoding: - # wrap the outfile in a StreamWriter - outfile = codecs.lookup(self.encoding)[3](outfile) - return self.format_unencoded(tokensource, outfile) - - # Allow writing Formatter[str] or Formatter[bytes]. That's equivalent to - # Formatter. This helps when using third-party type stubs from typeshed. - def __class_getitem__(cls, name): - return cls diff --git a/voxvera/vendor/pygments/formatters/__init__.py b/voxvera/vendor/pygments/formatters/__init__.py deleted file mode 100644 index b24931c..0000000 --- a/voxvera/vendor/pygments/formatters/__init__.py +++ /dev/null @@ -1,157 +0,0 @@ -""" - pygments.formatters - ~~~~~~~~~~~~~~~~~~~ - - Pygments formatters. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re -import sys -import types -import fnmatch -from os.path import basename - -from pygments.formatters._mapping import FORMATTERS -from pygments.plugin import find_plugin_formatters -from pygments.util import ClassNotFound - -__all__ = ['get_formatter_by_name', 'get_formatter_for_filename', - 'get_all_formatters', 'load_formatter_from_file'] + list(FORMATTERS) - -_formatter_cache = {} # classes by name -_pattern_cache = {} - - -def _fn_matches(fn, glob): - """Return whether the supplied file name fn matches pattern filename.""" - if glob not in _pattern_cache: - pattern = _pattern_cache[glob] = re.compile(fnmatch.translate(glob)) - return pattern.match(fn) - return _pattern_cache[glob].match(fn) - - -def _load_formatters(module_name): - """Load a formatter (and all others in the module too).""" - mod = __import__(module_name, None, None, ['__all__']) - for formatter_name in mod.__all__: - cls = getattr(mod, formatter_name) - _formatter_cache[cls.name] = cls - - -def get_all_formatters(): - """Return a generator for all formatter classes.""" - # NB: this returns formatter classes, not info like get_all_lexers(). - for info in FORMATTERS.values(): - if info[1] not in _formatter_cache: - _load_formatters(info[0]) - yield _formatter_cache[info[1]] - for _, formatter in find_plugin_formatters(): - yield formatter - - -def find_formatter_class(alias): - """Lookup a formatter by alias. - - Returns None if not found. - """ - for module_name, name, aliases, _, _ in FORMATTERS.values(): - if alias in aliases: - if name not in _formatter_cache: - _load_formatters(module_name) - return _formatter_cache[name] - for _, cls in find_plugin_formatters(): - if alias in cls.aliases: - return cls - - -def get_formatter_by_name(_alias, **options): - """ - Return an instance of a :class:`.Formatter` subclass that has `alias` in its - aliases list. The formatter is given the `options` at its instantiation. - - Will raise :exc:`pygments.util.ClassNotFound` if no formatter with that - alias is found. - """ - cls = find_formatter_class(_alias) - if cls is None: - raise ClassNotFound(f"no formatter found for name {_alias!r}") - return cls(**options) - - -def load_formatter_from_file(filename, formattername="CustomFormatter", **options): - """ - Return a `Formatter` subclass instance loaded from the provided file, relative - to the current directory. - - The file is expected to contain a Formatter class named ``formattername`` - (by default, CustomFormatter). Users should be very careful with the input, because - this method is equivalent to running ``eval()`` on the input file. The formatter is - given the `options` at its instantiation. - - :exc:`pygments.util.ClassNotFound` is raised if there are any errors loading - the formatter. - - .. versionadded:: 2.2 - """ - try: - # This empty dict will contain the namespace for the exec'd file - custom_namespace = {} - with open(filename, 'rb') as f: - exec(f.read(), custom_namespace) - # Retrieve the class `formattername` from that namespace - if formattername not in custom_namespace: - raise ClassNotFound(f'no valid {formattername} class found in {filename}') - formatter_class = custom_namespace[formattername] - # And finally instantiate it with the options - return formatter_class(**options) - except OSError as err: - raise ClassNotFound(f'cannot read {filename}: {err}') - except ClassNotFound: - raise - except Exception as err: - raise ClassNotFound(f'error when loading custom formatter: {err}') - - -def get_formatter_for_filename(fn, **options): - """ - Return a :class:`.Formatter` subclass instance that has a filename pattern - matching `fn`. The formatter is given the `options` at its instantiation. - - Will raise :exc:`pygments.util.ClassNotFound` if no formatter for that filename - is found. - """ - fn = basename(fn) - for modname, name, _, filenames, _ in FORMATTERS.values(): - for filename in filenames: - if _fn_matches(fn, filename): - if name not in _formatter_cache: - _load_formatters(modname) - return _formatter_cache[name](**options) - for _name, cls in find_plugin_formatters(): - for filename in cls.filenames: - if _fn_matches(fn, filename): - return cls(**options) - raise ClassNotFound(f"no formatter found for file name {fn!r}") - - -class _automodule(types.ModuleType): - """Automatically import formatters.""" - - def __getattr__(self, name): - info = FORMATTERS.get(name) - if info: - _load_formatters(info[0]) - cls = _formatter_cache[info[1]] - setattr(self, name, cls) - return cls - raise AttributeError(name) - - -oldmod = sys.modules[__name__] -newmod = _automodule(__name__) -newmod.__dict__.update(oldmod.__dict__) -sys.modules[__name__] = newmod -del newmod.newmod, newmod.oldmod, newmod.sys, newmod.types diff --git a/voxvera/vendor/pygments/formatters/_mapping.py b/voxvera/vendor/pygments/formatters/_mapping.py deleted file mode 100644 index 72ca840..0000000 --- a/voxvera/vendor/pygments/formatters/_mapping.py +++ /dev/null @@ -1,23 +0,0 @@ -# Automatically generated by scripts/gen_mapfiles.py. -# DO NOT EDIT BY HAND; run `tox -e mapfiles` instead. - -FORMATTERS = { - 'BBCodeFormatter': ('pygments.formatters.bbcode', 'BBCode', ('bbcode', 'bb'), (), 'Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight your sourcecode with pygments before posting it there.'), - 'BmpImageFormatter': ('pygments.formatters.img', 'img_bmp', ('bmp', 'bitmap'), ('*.bmp',), 'Create a bitmap image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'), - 'GifImageFormatter': ('pygments.formatters.img', 'img_gif', ('gif',), ('*.gif',), 'Create a GIF image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'), - 'GroffFormatter': ('pygments.formatters.groff', 'groff', ('groff', 'troff', 'roff'), (), 'Format tokens with groff escapes to change their color and font style.'), - 'HtmlFormatter': ('pygments.formatters.html', 'HTML', ('html',), ('*.html', '*.htm'), "Format tokens as HTML 4 ```` tags. By default, the content is enclosed in a ``
`` tag, itself wrapped in a ``
`` tag (but see the `nowrap` option). The ``
``'s CSS class can be set by the `cssclass` option."), - 'IRCFormatter': ('pygments.formatters.irc', 'IRC', ('irc', 'IRC'), (), 'Format tokens with IRC color sequences'), - 'ImageFormatter': ('pygments.formatters.img', 'img', ('img', 'IMG', 'png'), ('*.png',), 'Create a PNG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'), - 'JpgImageFormatter': ('pygments.formatters.img', 'img_jpg', ('jpg', 'jpeg'), ('*.jpg',), 'Create a JPEG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'), - 'LatexFormatter': ('pygments.formatters.latex', 'LaTeX', ('latex', 'tex'), ('*.tex',), 'Format tokens as LaTeX code. This needs the `fancyvrb` and `color` standard packages.'), - 'NullFormatter': ('pygments.formatters.other', 'Text only', ('text', 'null'), ('*.txt',), 'Output the text unchanged without any formatting.'), - 'PangoMarkupFormatter': ('pygments.formatters.pangomarkup', 'Pango Markup', ('pango', 'pangomarkup'), (), 'Format tokens as Pango Markup code. It can then be rendered to an SVG.'), - 'RawTokenFormatter': ('pygments.formatters.other', 'Raw tokens', ('raw', 'tokens'), ('*.raw',), 'Format tokens as a raw representation for storing token streams.'), - 'RtfFormatter': ('pygments.formatters.rtf', 'RTF', ('rtf',), ('*.rtf',), 'Format tokens as RTF markup. This formatter automatically outputs full RTF documents with color information and other useful stuff. Perfect for Copy and Paste into Microsoft(R) Word(R) documents.'), - 'SvgFormatter': ('pygments.formatters.svg', 'SVG', ('svg',), ('*.svg',), 'Format tokens as an SVG graphics file. This formatter is still experimental. Each line of code is a ```` element with explicit ``x`` and ``y`` coordinates containing ```` elements with the individual token styles.'), - 'Terminal256Formatter': ('pygments.formatters.terminal256', 'Terminal256', ('terminal256', 'console256', '256'), (), 'Format tokens with ANSI color sequences, for output in a 256-color terminal or console. Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.'), - 'TerminalFormatter': ('pygments.formatters.terminal', 'Terminal', ('terminal', 'console'), (), 'Format tokens with ANSI color sequences, for output in a text console. Color sequences are terminated at newlines, so that paging the output works correctly.'), - 'TerminalTrueColorFormatter': ('pygments.formatters.terminal256', 'TerminalTrueColor', ('terminal16m', 'console16m', '16m'), (), 'Format tokens with ANSI color sequences, for output in a true-color terminal or console. Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.'), - 'TestcaseFormatter': ('pygments.formatters.other', 'Testcase', ('testcase',), (), 'Format tokens as appropriate for a new testcase.'), -} diff --git a/voxvera/vendor/pygments/formatters/bbcode.py b/voxvera/vendor/pygments/formatters/bbcode.py deleted file mode 100644 index 339edf9..0000000 --- a/voxvera/vendor/pygments/formatters/bbcode.py +++ /dev/null @@ -1,108 +0,0 @@ -""" - pygments.formatters.bbcode - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - - BBcode formatter. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - - -from pygments.formatter import Formatter -from pygments.util import get_bool_opt - -__all__ = ['BBCodeFormatter'] - - -class BBCodeFormatter(Formatter): - """ - Format tokens with BBcodes. These formatting codes are used by many - bulletin boards, so you can highlight your sourcecode with pygments before - posting it there. - - This formatter has no support for background colors and borders, as there - are no common BBcode tags for that. - - Some board systems (e.g. phpBB) don't support colors in their [code] tag, - so you can't use the highlighting together with that tag. - Text in a [code] tag usually is shown with a monospace font (which this - formatter can do with the ``monofont`` option) and no spaces (which you - need for indentation) are removed. - - Additional options accepted: - - `style` - The style to use, can be a string or a Style subclass (default: - ``'default'``). - - `codetag` - If set to true, put the output into ``[code]`` tags (default: - ``false``) - - `monofont` - If set to true, add a tag to show the code with a monospace font - (default: ``false``). - """ - name = 'BBCode' - aliases = ['bbcode', 'bb'] - filenames = [] - - def __init__(self, **options): - Formatter.__init__(self, **options) - self._code = get_bool_opt(options, 'codetag', False) - self._mono = get_bool_opt(options, 'monofont', False) - - self.styles = {} - self._make_styles() - - def _make_styles(self): - for ttype, ndef in self.style: - start = end = '' - if ndef['color']: - start += '[color=#{}]'.format(ndef['color']) - end = '[/color]' + end - if ndef['bold']: - start += '[b]' - end = '[/b]' + end - if ndef['italic']: - start += '[i]' - end = '[/i]' + end - if ndef['underline']: - start += '[u]' - end = '[/u]' + end - # there are no common BBcodes for background-color and border - - self.styles[ttype] = start, end - - def format_unencoded(self, tokensource, outfile): - if self._code: - outfile.write('[code]') - if self._mono: - outfile.write('[font=monospace]') - - lastval = '' - lasttype = None - - for ttype, value in tokensource: - while ttype not in self.styles: - ttype = ttype.parent - if ttype == lasttype: - lastval += value - else: - if lastval: - start, end = self.styles[lasttype] - outfile.write(''.join((start, lastval, end))) - lastval = value - lasttype = ttype - - if lastval: - start, end = self.styles[lasttype] - outfile.write(''.join((start, lastval, end))) - - if self._mono: - outfile.write('[/font]') - if self._code: - outfile.write('[/code]') - if self._code or self._mono: - outfile.write('\n') diff --git a/voxvera/vendor/pygments/formatters/groff.py b/voxvera/vendor/pygments/formatters/groff.py deleted file mode 100644 index 028fec4..0000000 --- a/voxvera/vendor/pygments/formatters/groff.py +++ /dev/null @@ -1,170 +0,0 @@ -""" - pygments.formatters.groff - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - Formatter for groff output. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import math -from pygments.formatter import Formatter -from pygments.util import get_bool_opt, get_int_opt - -__all__ = ['GroffFormatter'] - - -class GroffFormatter(Formatter): - """ - Format tokens with groff escapes to change their color and font style. - - .. versionadded:: 2.11 - - Additional options accepted: - - `style` - The style to use, can be a string or a Style subclass (default: - ``'default'``). - - `monospaced` - If set to true, monospace font will be used (default: ``true``). - - `linenos` - If set to true, print the line numbers (default: ``false``). - - `wrap` - Wrap lines to the specified number of characters. Disabled if set to 0 - (default: ``0``). - """ - - name = 'groff' - aliases = ['groff','troff','roff'] - filenames = [] - - def __init__(self, **options): - Formatter.__init__(self, **options) - - self.monospaced = get_bool_opt(options, 'monospaced', True) - self.linenos = get_bool_opt(options, 'linenos', False) - self._lineno = 0 - self.wrap = get_int_opt(options, 'wrap', 0) - self._linelen = 0 - - self.styles = {} - self._make_styles() - - - def _make_styles(self): - regular = '\\f[CR]' if self.monospaced else '\\f[R]' - bold = '\\f[CB]' if self.monospaced else '\\f[B]' - italic = '\\f[CI]' if self.monospaced else '\\f[I]' - - for ttype, ndef in self.style: - start = end = '' - if ndef['color']: - start += '\\m[{}]'.format(ndef['color']) - end = '\\m[]' + end - if ndef['bold']: - start += bold - end = regular + end - if ndef['italic']: - start += italic - end = regular + end - if ndef['bgcolor']: - start += '\\M[{}]'.format(ndef['bgcolor']) - end = '\\M[]' + end - - self.styles[ttype] = start, end - - - def _define_colors(self, outfile): - colors = set() - for _, ndef in self.style: - if ndef['color'] is not None: - colors.add(ndef['color']) - - for color in sorted(colors): - outfile.write('.defcolor ' + color + ' rgb #' + color + '\n') - - - def _write_lineno(self, outfile): - self._lineno += 1 - outfile.write("%s% 4d " % (self._lineno != 1 and '\n' or '', self._lineno)) - - - def _wrap_line(self, line): - length = len(line.rstrip('\n')) - space = ' ' if self.linenos else '' - newline = '' - - if length > self.wrap: - for i in range(0, math.floor(length / self.wrap)): - chunk = line[i*self.wrap:i*self.wrap+self.wrap] - newline += (chunk + '\n' + space) - remainder = length % self.wrap - if remainder > 0: - newline += line[-remainder-1:] - self._linelen = remainder - elif self._linelen + length > self.wrap: - newline = ('\n' + space) + line - self._linelen = length - else: - newline = line - self._linelen += length - - return newline - - - def _escape_chars(self, text): - text = text.replace('\\', '\\[u005C]'). \ - replace('.', '\\[char46]'). \ - replace('\'', '\\[u0027]'). \ - replace('`', '\\[u0060]'). \ - replace('~', '\\[u007E]') - copy = text - - for char in copy: - if len(char) != len(char.encode()): - uni = char.encode('unicode_escape') \ - .decode()[1:] \ - .replace('x', 'u00') \ - .upper() - text = text.replace(char, '\\[u' + uni[1:] + ']') - - return text - - - def format_unencoded(self, tokensource, outfile): - self._define_colors(outfile) - - outfile.write('.nf\n\\f[CR]\n') - - if self.linenos: - self._write_lineno(outfile) - - for ttype, value in tokensource: - while ttype not in self.styles: - ttype = ttype.parent - start, end = self.styles[ttype] - - for line in value.splitlines(True): - if self.wrap > 0: - line = self._wrap_line(line) - - if start and end: - text = self._escape_chars(line.rstrip('\n')) - if text != '': - outfile.write(''.join((start, text, end))) - else: - outfile.write(self._escape_chars(line.rstrip('\n'))) - - if line.endswith('\n'): - if self.linenos: - self._write_lineno(outfile) - self._linelen = 0 - else: - outfile.write('\n') - self._linelen = 0 - - outfile.write('\n.fi') diff --git a/voxvera/vendor/pygments/formatters/html.py b/voxvera/vendor/pygments/formatters/html.py deleted file mode 100644 index 4ef1836..0000000 --- a/voxvera/vendor/pygments/formatters/html.py +++ /dev/null @@ -1,995 +0,0 @@ -""" - pygments.formatters.html - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Formatter for HTML output. - - :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import functools -import os -import sys -import os.path -from io import StringIO - -from pygments.formatter import Formatter -from pygments.token import Token, Text, STANDARD_TYPES -from pygments.util import get_bool_opt, get_int_opt, get_list_opt - -try: - import ctags -except ImportError: - ctags = None - -__all__ = ['HtmlFormatter'] - - -_escape_html_table = { - ord('&'): '&', - ord('<'): '<', - ord('>'): '>', - ord('"'): '"', - ord("'"): ''', -} - - -def escape_html(text, table=_escape_html_table): - """Escape &, <, > as well as single and double quotes for HTML.""" - return text.translate(table) - - -def webify(color): - if color.startswith('calc') or color.startswith('var'): - return color - else: - # Check if the color can be shortened from 6 to 3 characters - color = color.upper() - if (len(color) == 6 and - ( color[0] == color[1] - and color[2] == color[3] - and color[4] == color[5])): - return f'#{color[0]}{color[2]}{color[4]}' - else: - return f'#{color}' - - -def _get_ttype_class(ttype): - fname = STANDARD_TYPES.get(ttype) - if fname: - return fname - aname = '' - while fname is None: - aname = '-' + ttype[-1] + aname - ttype = ttype.parent - fname = STANDARD_TYPES.get(ttype) - return fname + aname - - -CSSFILE_TEMPLATE = '''\ -/* -generated by Pygments -Copyright 2006-2025 by the Pygments team. -Licensed under the BSD license, see LICENSE for details. -*/ -%(styledefs)s -''' - -DOC_HEADER = '''\ - - - - - %(title)s - - - - -

%(title)s

- -''' - -DOC_HEADER_EXTERNALCSS = '''\ - - - - - %(title)s - - - - -

%(title)s

- -''' - -DOC_FOOTER = '''\ - - -''' - - -class HtmlFormatter(Formatter): - r""" - Format tokens as HTML 4 ```` tags. By default, the content is enclosed - in a ``
`` tag, itself wrapped in a ``
`` tag (but see the `nowrap` option). - The ``
``'s CSS class can be set by the `cssclass` option. - - If the `linenos` option is set to ``"table"``, the ``
`` is
-    additionally wrapped inside a ```` which has one row and two
-    cells: one containing the line numbers and one containing the code.
-    Example:
-
-    .. sourcecode:: html
-
-        
-
- - -
-
1
-            2
-
-
def foo(bar):
-              pass
-            
-
- - (whitespace added to improve clarity). - - A list of lines can be specified using the `hl_lines` option to make these - lines highlighted (as of Pygments 0.11). - - With the `full` option, a complete HTML 4 document is output, including - the style definitions inside a ``$)', _handle_cssblock), - - include('keywords'), - include('inline'), - ], - 'keywords': [ - (words(( - '\\define', '\\end', 'caption', 'created', 'modified', 'tags', - 'title', 'type'), prefix=r'^', suffix=r'\b'), - Keyword), - ], - 'inline': [ - # escape - (r'\\.', Text), - # created or modified date - (r'\d{17}', Number.Integer), - # italics - (r'(\s)(//[^/]+//)((?=\W|\n))', - bygroups(Text, Generic.Emph, Text)), - # superscript - (r'(\s)(\^\^[^\^]+\^\^)', bygroups(Text, Generic.Emph)), - # subscript - (r'(\s)(,,[^,]+,,)', bygroups(Text, Generic.Emph)), - # underscore - (r'(\s)(__[^_]+__)', bygroups(Text, Generic.Strong)), - # bold - (r"(\s)(''[^']+'')((?=\W|\n))", - bygroups(Text, Generic.Strong, Text)), - # strikethrough - (r'(\s)(~~[^~]+~~)((?=\W|\n))', - bygroups(Text, Generic.Deleted, Text)), - # TiddlyWiki variables - (r'<<[^>]+>>', Name.Tag), - (r'\$\$[^$]+\$\$', Name.Tag), - (r'\$\([^)]+\)\$', Name.Tag), - # TiddlyWiki style or class - (r'^@@.*$', Name.Tag), - # HTML tags - (r']+>', Name.Tag), - # inline code - (r'`[^`]+`', String.Backtick), - # HTML escaped symbols - (r'&\S*?;', String.Regex), - # Wiki links - (r'(\[{2})([^]\|]+)(\]{2})', bygroups(Text, Name.Tag, Text)), - # External links - (r'(\[{2})([^]\|]+)(\|)([^]\|]+)(\]{2})', - bygroups(Text, Name.Tag, Text, Name.Attribute, Text)), - # Transclusion - (r'(\{{2})([^}]+)(\}{2})', bygroups(Text, Name.Tag, Text)), - # URLs - (r'(\b.?.?tps?://[^\s"]+)', bygroups(Name.Attribute)), - - # general text, must come last! - (r'[\w]+', Text), - (r'.', Text) - ], - } - - def __init__(self, **options): - self.handlecodeblocks = get_bool_opt(options, 'handlecodeblocks', True) - RegexLexer.__init__(self, **options) - - -class WikitextLexer(RegexLexer): - """ - For MediaWiki Wikitext. - - Parsing Wikitext is tricky, and results vary between different MediaWiki - installations, so we only highlight common syntaxes (built-in or from - popular extensions), and also assume templates produce no unbalanced - syntaxes. - """ - name = 'Wikitext' - url = 'https://www.mediawiki.org/wiki/Wikitext' - aliases = ['wikitext', 'mediawiki'] - filenames = [] - mimetypes = ['text/x-wiki'] - version_added = '2.15' - flags = re.MULTILINE - - def nowiki_tag_rules(tag_name): - return [ - (rf'(?i)()', bygroups(Punctuation, - Name.Tag, Whitespace, Punctuation), '#pop'), - include('entity'), - include('text'), - ] - - def plaintext_tag_rules(tag_name): - return [ - (rf'(?si)(.*?)()', bygroups(Text, - Punctuation, Name.Tag, Whitespace, Punctuation), '#pop'), - ] - - def delegate_tag_rules(tag_name, lexer, **lexer_kwargs): - return [ - (rf'(?i)()', bygroups(Punctuation, - Name.Tag, Whitespace, Punctuation), '#pop'), - (rf'(?si).+?(?=)', using(lexer, **lexer_kwargs)), - ] - - def text_rules(token): - return [ - (r'\w+', token), - (r'[^\S\n]+', token), - (r'(?s).', token), - ] - - def handle_syntaxhighlight(self, match, ctx): - from pygments.lexers import get_lexer_by_name - - attr_content = match.group() - start = 0 - index = 0 - while True: - index = attr_content.find('>', start) - # Exclude comment end (-->) - if attr_content[index-2:index] != '--': - break - start = index + 1 - - if index == -1: - # No tag end - yield from self.get_tokens_unprocessed(attr_content, stack=['root', 'attr']) - return - attr = attr_content[:index] - yield from self.get_tokens_unprocessed(attr, stack=['root', 'attr']) - yield match.start(3) + index, Punctuation, '>' - - lexer = None - content = attr_content[index+1:] - lang_match = re.findall(r'\blang=("|\'|)(\w+)(\1)', attr) - - if len(lang_match) >= 1: - # Pick the last match in case of multiple matches - lang = lang_match[-1][1] - try: - lexer = get_lexer_by_name(lang) - except ClassNotFound: - pass - - if lexer is None: - yield match.start() + index + 1, Text, content - else: - yield from lexer.get_tokens_unprocessed(content) - - def handle_score(self, match, ctx): - attr_content = match.group() - start = 0 - index = 0 - while True: - index = attr_content.find('>', start) - # Exclude comment end (-->) - if attr_content[index-2:index] != '--': - break - start = index + 1 - - if index == -1: - # No tag end - yield from self.get_tokens_unprocessed(attr_content, stack=['root', 'attr']) - return - attr = attr_content[:index] - content = attr_content[index+1:] - yield from self.get_tokens_unprocessed(attr, stack=['root', 'attr']) - yield match.start(3) + index, Punctuation, '>' - - lang_match = re.findall(r'\blang=("|\'|)(\w+)(\1)', attr) - # Pick the last match in case of multiple matches - lang = lang_match[-1][1] if len(lang_match) >= 1 else 'lilypond' - - if lang == 'lilypond': # Case sensitive - yield from LilyPondLexer().get_tokens_unprocessed(content) - else: # ABC - # FIXME: Use ABC lexer in the future - yield match.start() + index + 1, Text, content - - # a-z removed to prevent linter from complaining, REMEMBER to use (?i) - title_char = r' %!"$&\'()*,\-./0-9:;=?@A-Z\\\^_`~+\u0080-\uFFFF' - nbsp_char = r'(?:\t| |&\#0*160;|&\#[Xx]0*[Aa]0;|[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000])' - link_address = r'(?:[0-9.]+|\[[0-9a-f:.]+\]|[^\x00-\x20"<>\[\]\x7F\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFFFD])' - link_char_class = r'[^\x00-\x20"<>\[\]\x7F\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFFFD]' - double_slashes_i = { - '__FORCETOC__', '__NOCONTENTCONVERT__', '__NOCC__', '__NOEDITSECTION__', '__NOGALLERY__', - '__NOTITLECONVERT__', '__NOTC__', '__NOTOC__', '__TOC__', - } - double_slashes = { - '__EXPECTUNUSEDCATEGORY__', '__HIDDENCAT__', '__INDEX__', '__NEWSECTIONLINK__', - '__NOINDEX__', '__NONEWSECTIONLINK__', '__STATICREDIRECT__', '__NOGLOBAL__', - '__DISAMBIG__', '__EXPECTED_UNCONNECTED_PAGE__', - } - protocols = { - 'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://', 'https://', - 'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:', 'nntp://', 'redis://', - 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://', 'svn://', 'tel:', 'telnet://', 'urn:', - 'worldwind://', 'xmpp:', '//', - } - non_relative_protocols = protocols - {'//'} - html_tags = { - 'abbr', 'b', 'bdi', 'bdo', 'big', 'blockquote', 'br', 'caption', 'center', 'cite', 'code', - 'data', 'dd', 'del', 'dfn', 'div', 'dl', 'dt', 'em', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', - 'h6', 'hr', 'i', 'ins', 'kbd', 'li', 'link', 'mark', 'meta', 'ol', 'p', 'q', 'rb', 'rp', - 'rt', 'rtc', 'ruby', 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', - 'table', 'td', 'th', 'time', 'tr', 'tt', 'u', 'ul', 'var', 'wbr', - } - parser_tags = { - 'graph', 'charinsert', 'rss', 'chem', 'categorytree', 'nowiki', 'inputbox', 'math', - 'hiero', 'score', 'pre', 'ref', 'translate', 'imagemap', 'templatestyles', 'languages', - 'noinclude', 'mapframe', 'section', 'poem', 'syntaxhighlight', 'includeonly', 'tvar', - 'onlyinclude', 'templatedata', 'langconvert', 'timeline', 'dynamicpagelist', 'gallery', - 'maplink', 'ce', 'references', - } - variant_langs = { - # ZhConverter.php - 'zh', 'zh-hans', 'zh-hant', 'zh-cn', 'zh-hk', 'zh-mo', 'zh-my', 'zh-sg', 'zh-tw', - # WuuConverter.php - 'wuu', 'wuu-hans', 'wuu-hant', - # UzConverter.php - 'uz', 'uz-latn', 'uz-cyrl', - # TlyConverter.php - 'tly', 'tly-cyrl', - # TgConverter.php - 'tg', 'tg-latn', - # SrConverter.php - 'sr', 'sr-ec', 'sr-el', - # ShiConverter.php - 'shi', 'shi-tfng', 'shi-latn', - # ShConverter.php - 'sh-latn', 'sh-cyrl', - # KuConverter.php - 'ku', 'ku-arab', 'ku-latn', - # IuConverter.php - 'iu', 'ike-cans', 'ike-latn', - # GanConverter.php - 'gan', 'gan-hans', 'gan-hant', - # EnConverter.php - 'en', 'en-x-piglatin', - # CrhConverter.php - 'crh', 'crh-cyrl', 'crh-latn', - # BanConverter.php - 'ban', 'ban-bali', 'ban-x-dharma', 'ban-x-palmleaf', 'ban-x-pku', - } - magic_vars_i = { - 'ARTICLEPATH', 'INT', 'PAGEID', 'SCRIPTPATH', 'SERVER', 'SERVERNAME', 'STYLEPATH', - } - magic_vars = { - '!', '=', 'BASEPAGENAME', 'BASEPAGENAMEE', 'CASCADINGSOURCES', 'CONTENTLANGUAGE', - 'CONTENTLANG', 'CURRENTDAY', 'CURRENTDAY2', 'CURRENTDAYNAME', 'CURRENTDOW', 'CURRENTHOUR', - 'CURRENTMONTH', 'CURRENTMONTH2', 'CURRENTMONTH1', 'CURRENTMONTHABBREV', 'CURRENTMONTHNAME', - 'CURRENTMONTHNAMEGEN', 'CURRENTTIME', 'CURRENTTIMESTAMP', 'CURRENTVERSION', 'CURRENTWEEK', - 'CURRENTYEAR', 'DIRECTIONMARK', 'DIRMARK', 'FULLPAGENAME', 'FULLPAGENAMEE', 'LOCALDAY', - 'LOCALDAY2', 'LOCALDAYNAME', 'LOCALDOW', 'LOCALHOUR', 'LOCALMONTH', 'LOCALMONTH2', - 'LOCALMONTH1', 'LOCALMONTHABBREV', 'LOCALMONTHNAME', 'LOCALMONTHNAMEGEN', 'LOCALTIME', - 'LOCALTIMESTAMP', 'LOCALWEEK', 'LOCALYEAR', 'NAMESPACE', 'NAMESPACEE', 'NAMESPACENUMBER', - 'NUMBEROFACTIVEUSERS', 'NUMBEROFADMINS', 'NUMBEROFARTICLES', 'NUMBEROFEDITS', - 'NUMBEROFFILES', 'NUMBEROFPAGES', 'NUMBEROFUSERS', 'PAGELANGUAGE', 'PAGENAME', 'PAGENAMEE', - 'REVISIONDAY', 'REVISIONDAY2', 'REVISIONID', 'REVISIONMONTH', 'REVISIONMONTH1', - 'REVISIONSIZE', 'REVISIONTIMESTAMP', 'REVISIONUSER', 'REVISIONYEAR', 'ROOTPAGENAME', - 'ROOTPAGENAMEE', 'SITENAME', 'SUBJECTPAGENAME', 'ARTICLEPAGENAME', 'SUBJECTPAGENAMEE', - 'ARTICLEPAGENAMEE', 'SUBJECTSPACE', 'ARTICLESPACE', 'SUBJECTSPACEE', 'ARTICLESPACEE', - 'SUBPAGENAME', 'SUBPAGENAMEE', 'TALKPAGENAME', 'TALKPAGENAMEE', 'TALKSPACE', 'TALKSPACEE', - } - parser_functions_i = { - 'ANCHORENCODE', 'BIDI', 'CANONICALURL', 'CANONICALURLE', 'FILEPATH', 'FORMATNUM', - 'FULLURL', 'FULLURLE', 'GENDER', 'GRAMMAR', 'INT', r'\#LANGUAGE', 'LC', 'LCFIRST', 'LOCALURL', - 'LOCALURLE', 'NS', 'NSE', 'PADLEFT', 'PADRIGHT', 'PAGEID', 'PLURAL', 'UC', 'UCFIRST', - 'URLENCODE', - } - parser_functions = { - 'BASEPAGENAME', 'BASEPAGENAMEE', 'CASCADINGSOURCES', 'DEFAULTSORT', 'DEFAULTSORTKEY', - 'DEFAULTCATEGORYSORT', 'FULLPAGENAME', 'FULLPAGENAMEE', 'NAMESPACE', 'NAMESPACEE', - 'NAMESPACENUMBER', 'NUMBERINGROUP', 'NUMINGROUP', 'NUMBEROFACTIVEUSERS', 'NUMBEROFADMINS', - 'NUMBEROFARTICLES', 'NUMBEROFEDITS', 'NUMBEROFFILES', 'NUMBEROFPAGES', 'NUMBEROFUSERS', - 'PAGENAME', 'PAGENAMEE', 'PAGESINCATEGORY', 'PAGESINCAT', 'PAGESIZE', 'PROTECTIONEXPIRY', - 'PROTECTIONLEVEL', 'REVISIONDAY', 'REVISIONDAY2', 'REVISIONID', 'REVISIONMONTH', - 'REVISIONMONTH1', 'REVISIONTIMESTAMP', 'REVISIONUSER', 'REVISIONYEAR', 'ROOTPAGENAME', - 'ROOTPAGENAMEE', 'SUBJECTPAGENAME', 'ARTICLEPAGENAME', 'SUBJECTPAGENAMEE', - 'ARTICLEPAGENAMEE', 'SUBJECTSPACE', 'ARTICLESPACE', 'SUBJECTSPACEE', 'ARTICLESPACEE', - 'SUBPAGENAME', 'SUBPAGENAMEE', 'TALKPAGENAME', 'TALKPAGENAMEE', 'TALKSPACE', 'TALKSPACEE', - 'INT', 'DISPLAYTITLE', 'PAGESINNAMESPACE', 'PAGESINNS', - } - - tokens = { - 'root': [ - # Redirects - (r"""(?xi) - (\A\s*?)(\#REDIRECT:?) # may contain a colon - (\s+)(\[\[) (?=[^\]\n]* \]\]$) - """, - bygroups(Whitespace, Keyword, Whitespace, Punctuation), 'redirect-inner'), - # Subheadings - (r'^(={2,6})(.+?)(\1)(\s*$\n)', - bygroups(Generic.Subheading, Generic.Subheading, Generic.Subheading, Whitespace)), - # Headings - (r'^(=.+?=)(\s*$\n)', - bygroups(Generic.Heading, Whitespace)), - # Double-slashed magic words - (words(double_slashes_i, prefix=r'(?i)'), Name.Function.Magic), - (words(double_slashes), Name.Function.Magic), - # Raw URLs - (r'(?i)\b(?:{}){}{}*'.format('|'.join(protocols), - link_address, link_char_class), Name.Label), - # Magic links - (rf'\b(?:RFC|PMID){nbsp_char}+[0-9]+\b', - Name.Function.Magic), - (r"""(?x) - \bISBN {nbsp_char} - (?: 97[89] {nbsp_dash}? )? - (?: [0-9] {nbsp_dash}? ){{9}} # escape format() - [0-9Xx]\b - """.format(nbsp_char=nbsp_char, nbsp_dash=f'(?:-|{nbsp_char})'), Name.Function.Magic), - include('list'), - include('inline'), - include('text'), - ], - 'redirect-inner': [ - (r'(\]\])(\s*?\n)', bygroups(Punctuation, Whitespace), '#pop'), - (r'(\#)([^#]*?)', bygroups(Punctuation, Name.Label)), - (rf'(?i)[{title_char}]+', Name.Tag), - ], - 'list': [ - # Description lists - (r'^;', Keyword, 'dt'), - # Ordered lists, unordered lists and indents - (r'^[#:*]+', Keyword), - # Horizontal rules - (r'^-{4,}', Keyword), - ], - 'inline': [ - # Signatures - (r'~{3,5}', Keyword), - # Entities - include('entity'), - # Bold & italic - (r"('')(''')(?!')", bygroups(Generic.Emph, - Generic.EmphStrong), 'inline-italic-bold'), - (r"'''(?!')", Generic.Strong, 'inline-bold'), - (r"''(?!')", Generic.Emph, 'inline-italic'), - # Comments & parameters & templates - include('replaceable'), - # Media links - ( - r"""(?xi) - (\[\[) - (File|Image) (:) - ((?: [{}] | \{{{{2,3}}[^{{}}]*?\}}{{2,3}} | )*) - (?: (\#) ([{}]*?) )? - """.format(title_char, f'{title_char}#'), - bygroups(Punctuation, Name.Namespace, Punctuation, - using(this, state=['wikilink-name']), Punctuation, Name.Label), - 'medialink-inner' - ), - # Wikilinks - ( - r"""(?xi) - (\[\[)(?!{}) # Should not contain URLs - (?: ([{}]*) (:))? - ((?: [{}] | \{{{{2,3}}[^{{}}]*?\}}{{2,3}} | )*?) - (?: (\#) ([{}]*?) )? - (\]\]) - """.format('|'.join(protocols), title_char.replace('/', ''), - title_char, f'{title_char}#'), - bygroups(Punctuation, Name.Namespace, Punctuation, - using(this, state=['wikilink-name']), Punctuation, Name.Label, Punctuation) - ), - ( - r"""(?xi) - (\[\[)(?!{}) - (?: ([{}]*) (:))? - ((?: [{}] | \{{{{2,3}}[^{{}}]*?\}}{{2,3}} | )*?) - (?: (\#) ([{}]*?) )? - (\|) - """.format('|'.join(protocols), title_char.replace('/', ''), - title_char, f'{title_char}#'), - bygroups(Punctuation, Name.Namespace, Punctuation, - using(this, state=['wikilink-name']), Punctuation, Name.Label, Punctuation), - 'wikilink-inner' - ), - # External links - ( - r"""(?xi) - (\[) - ((?:{}) {} {}*) - (\s*) - """.format('|'.join(protocols), link_address, link_char_class), - bygroups(Punctuation, Name.Label, Whitespace), - 'extlink-inner' - ), - # Tables - (r'^(:*)(\s*?)(\{\|)([^\n]*)$', bygroups(Keyword, - Whitespace, Punctuation, using(this, state=['root', 'attr'])), 'table'), - # HTML tags - (r'(?i)(<)({})\b'.format('|'.join(html_tags)), - bygroups(Punctuation, Name.Tag), 'tag-inner-ordinary'), - (r'(?i)()'.format('|'.join(html_tags)), - bygroups(Punctuation, Name.Tag, Whitespace, Punctuation)), - # - (r'(?i)(<)(nowiki)\b', bygroups(Punctuation, - Name.Tag), ('tag-nowiki', 'tag-inner')), - #
-            (r'(?i)(<)(pre)\b', bygroups(Punctuation,
-             Name.Tag), ('tag-pre', 'tag-inner')),
-            # 
-            (r'(?i)(<)(categorytree)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-categorytree', 'tag-inner')),
-            # 
-            (r'(?i)(<)(hiero)\b', bygroups(Punctuation,
-             Name.Tag), ('tag-hiero', 'tag-inner')),
-            # 
-            (r'(?i)(<)(math)\b', bygroups(Punctuation,
-             Name.Tag), ('tag-math', 'tag-inner')),
-            # 
-            (r'(?i)(<)(chem)\b', bygroups(Punctuation,
-             Name.Tag), ('tag-chem', 'tag-inner')),
-            # 
-            (r'(?i)(<)(ce)\b', bygroups(Punctuation,
-             Name.Tag), ('tag-ce', 'tag-inner')),
-            # 
-            (r'(?i)(<)(charinsert)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-charinsert', 'tag-inner')),
-            # 
-            (r'(?i)(<)(templatedata)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-templatedata', 'tag-inner')),
-            # 
-            (r'(?i)(<)(gallery)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-gallery', 'tag-inner')),
-            # 
-            (r'(?i)(<)(gallery)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-graph', 'tag-inner')),
-            # 
-            (r'(?i)(<)(dynamicpagelist)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-dynamicpagelist', 'tag-inner')),
-            # 
-            (r'(?i)(<)(inputbox)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-inputbox', 'tag-inner')),
-            # 
-            (r'(?i)(<)(rss)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-rss', 'tag-inner')),
-            # 
-            (r'(?i)(<)(imagemap)\b', bygroups(
-                Punctuation, Name.Tag), ('tag-imagemap', 'tag-inner')),
-            # 
-            (r'(?i)()',
-             bygroups(Punctuation, Name.Tag, Whitespace, Punctuation)),
-            (r'(?si)(<)(syntaxhighlight)\b([^>]*?(?.*?)(?=)',
-             bygroups(Punctuation, Name.Tag, handle_syntaxhighlight)),
-            # : Fallback case for self-closing tags
-            (r'(?i)(<)(syntaxhighlight)\b(\s*?)((?:[^>]|-->)*?)(/\s*?(?)*?)(/\s*?(?)*?)(/\s*?(?|\Z)', Comment.Multiline),
-            # Parameters
-            (
-                r"""(?x)
-                (\{{3})
-                    ([^|]*?)
-                    (?=\}{3}|\|)
-                """,
-                bygroups(Punctuation, Name.Variable),
-                'parameter-inner',
-            ),
-            # Magic variables
-            (r'(?i)(\{{\{{)(\s*)({})(\s*)(\}}\}})'.format('|'.join(magic_vars_i)),
-             bygroups(Punctuation, Whitespace, Name.Function, Whitespace, Punctuation)),
-            (r'(\{{\{{)(\s*)({})(\s*)(\}}\}})'.format('|'.join(magic_vars)),
-                bygroups(Punctuation, Whitespace, Name.Function, Whitespace, Punctuation)),
-            # Parser functions & templates
-            (r'\{\{', Punctuation, 'template-begin-space'),
-            #  legacy syntax
-            (r'(?i)(<)(tvar)\b(\|)([^>]*?)(>)', bygroups(Punctuation,
-             Name.Tag, Punctuation, String, Punctuation)),
-            (r'', Punctuation, '#pop'),
-            # 
-            (r'(?i)(<)(tvar)\b', bygroups(Punctuation, Name.Tag), 'tag-inner-ordinary'),
-            (r'(?i)()',
-             bygroups(Punctuation, Name.Tag, Whitespace, Punctuation)),
-        ],
-        'parameter-inner': [
-            (r'\}{3}', Punctuation, '#pop'),
-            (r'\|', Punctuation),
-            include('inline'),
-            include('text'),
-        ],
-        'template-begin-space': [
-            # Templates allow line breaks at the beginning, and due to how MediaWiki handles
-            # comments, an extra state is required to handle things like {{\n\n name}}
-            (r'|\Z)', Comment.Multiline),
-            (r'\s+', Whitespace),
-            # Parser functions
-            (
-                r'(?i)(\#[{}]*?|{})(:)'.format(title_char,
-                                           '|'.join(parser_functions_i)),
-                bygroups(Name.Function, Punctuation), ('#pop', 'template-inner')
-            ),
-            (
-                r'({})(:)'.format('|'.join(parser_functions)),
-                bygroups(Name.Function, Punctuation), ('#pop', 'template-inner')
-            ),
-            # Templates
-            (
-                rf'(?i)([{title_char}]*?)(:)',
-                bygroups(Name.Namespace, Punctuation), ('#pop', 'template-name')
-            ),
-            default(('#pop', 'template-name'),),
-        ],
-        'template-name': [
-            (r'(\s*?)(\|)', bygroups(Text, Punctuation), ('#pop', 'template-inner')),
-            (r'\}\}', Punctuation, '#pop'),
-            (r'\n', Text, '#pop'),
-            include('replaceable'),
-            *text_rules(Name.Tag),
-        ],
-        'template-inner': [
-            (r'\}\}', Punctuation, '#pop'),
-            (r'\|', Punctuation),
-            (
-                r"""(?x)
-                    (?<=\|)
-                    ( (?: (?! \{\{ | \}\} )[^=\|<])*? ) # Exclude templates and tags
-                    (=)
-                """,
-                bygroups(Name.Label, Operator)
-            ),
-            include('inline'),
-            include('text'),
-        ],
-        'table': [
-            # Use [ \t\n\r\0\x0B] instead of \s to follow PHP trim() behavior
-            # Endings
-            (r'^([ \t\n\r\0\x0B]*?)(\|\})',
-             bygroups(Whitespace, Punctuation), '#pop'),
-            # Table rows
-            (r'^([ \t\n\r\0\x0B]*?)(\|-+)(.*)$', bygroups(Whitespace, Punctuation,
-             using(this, state=['root', 'attr']))),
-            # Captions
-            (
-                r"""(?x)
-                ^([ \t\n\r\0\x0B]*?)(\|\+)
-                # Exclude links, template and tags
-                (?: ( (?: (?! \[\[ | \{\{ )[^|\n<] )*? )(\|) )?
-                (.*?)$
-                """,
-                bygroups(Whitespace, Punctuation, using(this, state=[
-                         'root', 'attr']), Punctuation, Generic.Heading),
-            ),
-            # Table data
-            (
-                r"""(?x)
-                ( ^(?:[ \t\n\r\0\x0B]*?)\| | \|\| )
-                (?: ( (?: (?! \[\[ | \{\{ )[^|\n<] )*? )(\|)(?!\|) )?
-                """,
-                bygroups(Punctuation, using(this, state=[
-                         'root', 'attr']), Punctuation),
-            ),
-            # Table headers
-            (
-                r"""(?x)
-                ( ^(?:[ \t\n\r\0\x0B]*?)!  )
-                (?: ( (?: (?! \[\[ | \{\{ )[^|\n<] )*? )(\|)(?!\|) )?
-                """,
-                bygroups(Punctuation, using(this, state=[
-                         'root', 'attr']), Punctuation),
-                'table-header',
-            ),
-            include('list'),
-            include('inline'),
-            include('text'),
-        ],
-        'table-header': [
-            # Requires another state for || handling inside headers
-            (r'\n', Text, '#pop'),
-            (
-                r"""(?x)
-                (!!|\|\|)
-                (?:
-                    ( (?: (?! \[\[ | \{\{ )[^|\n<] )*? )
-                    (\|)(?!\|)
-                )?
-                """,
-                bygroups(Punctuation, using(this, state=[
-                         'root', 'attr']), Punctuation)
-            ),
-            *text_rules(Generic.Subheading),
-        ],
-        'entity': [
-            (r'&\S*?;', Name.Entity),
-        ],
-        'dt': [
-            (r'\n', Text, '#pop'),
-            include('inline'),
-            (r':', Keyword, '#pop'),
-            include('text'),
-        ],
-        'extlink-inner': [
-            (r'\]', Punctuation, '#pop'),
-            include('inline'),
-            include('text'),
-        ],
-        'nowiki-ish': [
-            include('entity'),
-            include('text'),
-        ],
-        'attr': [
-            include('replaceable'),
-            (r'\s+', Whitespace),
-            (r'(=)(\s*)(")', bygroups(Operator, Whitespace, String.Double), 'attr-val-2'),
-            (r"(=)(\s*)(')", bygroups(Operator, Whitespace, String.Single), 'attr-val-1'),
-            (r'(=)(\s*)', bygroups(Operator, Whitespace), 'attr-val-0'),
-            (r'[\w:-]+', Name.Attribute),
-
-        ],
-        'attr-val-0': [
-            (r'\s', Whitespace, '#pop'),
-            include('replaceable'),
-            *text_rules(String),
-        ],
-        'attr-val-1': [
-            (r"'", String.Single, '#pop'),
-            include('replaceable'),
-            *text_rules(String.Single),
-        ],
-        'attr-val-2': [
-            (r'"', String.Double, '#pop'),
-            include('replaceable'),
-            *text_rules(String.Double),
-        ],
-        'tag-inner-ordinary': [
-            (r'/?\s*>', Punctuation, '#pop'),
-            include('tag-attr'),
-        ],
-        'tag-inner': [
-            # Return to root state for self-closing tags
-            (r'/\s*>', Punctuation, '#pop:2'),
-            (r'\s*>', Punctuation, '#pop'),
-            include('tag-attr'),
-        ],
-        # There states below are just like their non-tag variants, the key difference is
-        # they forcibly quit when encountering tag closing markup
-        'tag-attr': [
-            include('replaceable'),
-            (r'\s+', Whitespace),
-            (r'(=)(\s*)(")', bygroups(Operator,
-             Whitespace, String.Double), 'tag-attr-val-2'),
-            (r"(=)(\s*)(')", bygroups(Operator,
-             Whitespace, String.Single), 'tag-attr-val-1'),
-            (r'(=)(\s*)', bygroups(Operator, Whitespace), 'tag-attr-val-0'),
-            (r'[\w:-]+', Name.Attribute),
-
-        ],
-        'tag-attr-val-0': [
-            (r'\s', Whitespace, '#pop'),
-            (r'/?>', Punctuation, '#pop:2'),
-            include('replaceable'),
-            *text_rules(String),
-        ],
-        'tag-attr-val-1': [
-            (r"'", String.Single, '#pop'),
-            (r'/?>', Punctuation, '#pop:2'),
-            include('replaceable'),
-            *text_rules(String.Single),
-        ],
-        'tag-attr-val-2': [
-            (r'"', String.Double, '#pop'),
-            (r'/?>', Punctuation, '#pop:2'),
-            include('replaceable'),
-            *text_rules(String.Double),
-        ],
-        'tag-nowiki': nowiki_tag_rules('nowiki'),
-        'tag-pre': nowiki_tag_rules('pre'),
-        'tag-categorytree': plaintext_tag_rules('categorytree'),
-        'tag-dynamicpagelist': plaintext_tag_rules('dynamicpagelist'),
-        'tag-hiero': plaintext_tag_rules('hiero'),
-        'tag-inputbox': plaintext_tag_rules('inputbox'),
-        'tag-imagemap': plaintext_tag_rules('imagemap'),
-        'tag-charinsert': plaintext_tag_rules('charinsert'),
-        'tag-timeline': plaintext_tag_rules('timeline'),
-        'tag-gallery': plaintext_tag_rules('gallery'),
-        'tag-graph': plaintext_tag_rules('graph'),
-        'tag-rss': plaintext_tag_rules('rss'),
-        'tag-math': delegate_tag_rules('math', TexLexer, state='math'),
-        'tag-chem': delegate_tag_rules('chem', TexLexer, state='math'),
-        'tag-ce': delegate_tag_rules('ce', TexLexer, state='math'),
-        'tag-templatedata': delegate_tag_rules('templatedata', JsonLexer),
-        'text-italic': text_rules(Generic.Emph),
-        'text-bold': text_rules(Generic.Strong),
-        'text-bold-italic': text_rules(Generic.EmphStrong),
-        'text': text_rules(Text),
-    }
diff --git a/voxvera/vendor/pygments/lexers/math.py b/voxvera/vendor/pygments/lexers/math.py
deleted file mode 100644
index b225ffc..0000000
--- a/voxvera/vendor/pygments/lexers/math.py
+++ /dev/null
@@ -1,21 +0,0 @@
-"""
-    pygments.lexers.math
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Just export lexers that were contained in this module.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-# ruff: noqa: F401
-from pygments.lexers.python import NumPyLexer
-from pygments.lexers.matlab import MatlabLexer, MatlabSessionLexer, \
-    OctaveLexer, ScilabLexer
-from pygments.lexers.julia import JuliaLexer, JuliaConsoleLexer
-from pygments.lexers.r import RConsoleLexer, SLexer, RdLexer
-from pygments.lexers.modeling import BugsLexer, JagsLexer, StanLexer
-from pygments.lexers.idl import IDLLexer
-from pygments.lexers.algebra import MuPADLexer
-
-__all__ = []
diff --git a/voxvera/vendor/pygments/lexers/matlab.py b/voxvera/vendor/pygments/lexers/matlab.py
deleted file mode 100644
index 8eeffc9..0000000
--- a/voxvera/vendor/pygments/lexers/matlab.py
+++ /dev/null
@@ -1,3307 +0,0 @@
-"""
-    pygments.lexers.matlab
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Matlab and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import Lexer, RegexLexer, bygroups, default, words, \
-    do_insertions, include
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Generic, Whitespace
-
-from pygments.lexers import _scilab_builtins
-
-__all__ = ['MatlabLexer', 'MatlabSessionLexer', 'OctaveLexer', 'ScilabLexer']
-
-
-class MatlabLexer(RegexLexer):
-    """
-    For Matlab source code.
-    """
-    name = 'Matlab'
-    aliases = ['matlab']
-    filenames = ['*.m']
-    mimetypes = ['text/matlab']
-    url = 'https://www.mathworks.com/products/matlab.html'
-    version_added = '0.10'
-
-    _operators = r'-|==|~=|<=|>=|<|>|&&|&|~|\|\|?|\.\*|\*|\+|\.\^|\^|\.\\|\./|/|\\'
-
-    tokens = {
-        'expressions': [
-            # operators:
-            (_operators, Operator),
-
-            # numbers (must come before punctuation to handle `.5`; cannot use
-            # `\b` due to e.g. `5. + .5`).  The negative lookahead on operators
-            # avoids including the dot in `1./x` (the dot is part of `./`).
-            (rf'(? and then
-            # (equal | open-parenthesis |  | ).
-            (rf'(?:^|(?<=;))(\s*)(\w+)(\s+)(?!=|\(|{_operators}\s|\s)',
-             bygroups(Whitespace, Name, Whitespace), 'commandargs'),
-
-            include('expressions')
-        ],
-        'blockcomment': [
-            (r'^\s*%\}', Comment.Multiline, '#pop'),
-            (r'^.*\n', Comment.Multiline),
-            (r'.', Comment.Multiline),
-        ],
-        'deffunc': [
-            (r'(\s*)(?:(\S+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
-             bygroups(Whitespace, Text, Whitespace, Punctuation,
-                      Whitespace, Name.Function, Punctuation, Text,
-                      Punctuation, Whitespace), '#pop'),
-            # function with no args
-            (r'(\s*)([a-zA-Z_]\w*)',
-             bygroups(Whitespace, Name.Function), '#pop'),
-        ],
-        'propattrs': [
-            (r'(\w+)(\s*)(=)(\s*)(\d+)',
-             bygroups(Name.Builtin, Whitespace, Punctuation, Whitespace,
-                      Number)),
-            (r'(\w+)(\s*)(=)(\s*)([a-zA-Z]\w*)',
-             bygroups(Name.Builtin, Whitespace, Punctuation, Whitespace,
-                      Keyword)),
-            (r',', Punctuation),
-            (r'\)', Punctuation, '#pop'),
-            (r'\s+', Whitespace),
-            (r'.', Text),
-        ],
-        'defprops': [
-            (r'%\{\s*\n', Comment.Multiline, 'blockcomment'),
-            (r'%.*$', Comment),
-            (r'(?.
-    """
-    name = 'Matlab session'
-    aliases = ['matlabsession']
-    url = 'https://www.mathworks.com/products/matlab.html'
-    version_added = '0.10'
-    _example = "matlabsession/matlabsession_sample.txt"
-
-    def get_tokens_unprocessed(self, text):
-        mlexer = MatlabLexer(**self.options)
-
-        curcode = ''
-        insertions = []
-        continuation = False
-
-        for match in line_re.finditer(text):
-            line = match.group()
-
-            if line.startswith('>> '):
-                insertions.append((len(curcode),
-                                   [(0, Generic.Prompt, line[:3])]))
-                curcode += line[3:]
-
-            elif line.startswith('>>'):
-                insertions.append((len(curcode),
-                                   [(0, Generic.Prompt, line[:2])]))
-                curcode += line[2:]
-
-            elif line.startswith('???'):
-
-                idx = len(curcode)
-
-                # without is showing error on same line as before...?
-                # line = "\n" + line
-                token = (0, Generic.Traceback, line)
-                insertions.append((idx, [token]))
-            elif continuation and insertions:
-                # line_start is the length of the most recent prompt symbol
-                line_start = len(insertions[-1][-1][-1])
-                # Set leading spaces with the length of the prompt to be a generic prompt
-                # This keeps code aligned when prompts are removed, say with some Javascript
-                if line.startswith(' '*line_start):
-                    insertions.append(
-                        (len(curcode), [(0, Generic.Prompt, line[:line_start])]))
-                    curcode += line[line_start:]
-                else:
-                    curcode += line
-            else:
-                if curcode:
-                    yield from do_insertions(
-                        insertions, mlexer.get_tokens_unprocessed(curcode))
-                    curcode = ''
-                    insertions = []
-
-                yield match.start(), Generic.Output, line
-
-            # Does not allow continuation if a comment is included after the ellipses.
-            # Continues any line that ends with ..., even comments (lines that start with %)
-            if line.strip().endswith('...'):
-                continuation = True
-            else:
-                continuation = False
-
-        if curcode:  # or item:
-            yield from do_insertions(
-                insertions, mlexer.get_tokens_unprocessed(curcode))
-
-
-class OctaveLexer(RegexLexer):
-    """
-    For GNU Octave source code.
-    """
-    name = 'Octave'
-    url = 'https://www.gnu.org/software/octave/index'
-    aliases = ['octave']
-    filenames = ['*.m']
-    mimetypes = ['text/octave']
-    version_added = '1.5'
-
-    # These lists are generated automatically.
-    # Run the following in bash shell:
-    #
-    # First dump all of the Octave manual into a plain text file:
-    #
-    #   $ info octave --subnodes -o octave-manual
-    #
-    # Now grep through it:
-
-    # for i in \
-    #     "Built-in Function" "Command" "Function File" \
-    #     "Loadable Function" "Mapping Function";
-    # do
-    #     perl -e '@name = qw('"$i"');
-    #              print lc($name[0]),"_kw = [\n"';
-    #
-    #     perl -n -e 'print "\"$1\",\n" if /-- '"$i"': .* (\w*) \(/;' \
-    #         octave-manual | sort | uniq ;
-    #     echo "]" ;
-    #     echo;
-    # done
-
-    # taken from Octave Mercurial changeset 8cc154f45e37 (30-jan-2011)
-
-    builtin_kw = (
-        "addlistener", "addpath", "addproperty", "all",
-        "and", "any", "argnames", "argv", "assignin",
-        "atexit", "autoload",
-        "available_graphics_toolkits", "beep_on_error",
-        "bitand", "bitmax", "bitor", "bitshift", "bitxor",
-        "cat", "cell", "cellstr", "char", "class", "clc",
-        "columns", "command_line_path",
-        "completion_append_char", "completion_matches",
-        "complex", "confirm_recursive_rmdir", "cputime",
-        "crash_dumps_octave_core", "ctranspose", "cumprod",
-        "cumsum", "debug_on_error", "debug_on_interrupt",
-        "debug_on_warning", "default_save_options",
-        "dellistener", "diag", "diff", "disp",
-        "doc_cache_file", "do_string_escapes", "double",
-        "drawnow", "e", "echo_executing_commands", "eps",
-        "eq", "errno", "errno_list", "error", "eval",
-        "evalin", "exec", "exist", "exit", "eye", "false",
-        "fclear", "fclose", "fcntl", "fdisp", "feof",
-        "ferror", "feval", "fflush", "fgetl", "fgets",
-        "fieldnames", "file_in_loadpath", "file_in_path",
-        "filemarker", "filesep", "find_dir_in_path",
-        "fixed_point_format", "fnmatch", "fopen", "fork",
-        "formula", "fprintf", "fputs", "fread", "freport",
-        "frewind", "fscanf", "fseek", "fskipl", "ftell",
-        "functions", "fwrite", "ge", "genpath", "get",
-        "getegid", "getenv", "geteuid", "getgid",
-        "getpgrp", "getpid", "getppid", "getuid", "glob",
-        "gt", "gui_mode", "history_control",
-        "history_file", "history_size",
-        "history_timestamp_format_string", "home",
-        "horzcat", "hypot", "ifelse",
-        "ignore_function_time_stamp", "inferiorto",
-        "info_file", "info_program", "inline", "input",
-        "intmax", "intmin", "ipermute",
-        "is_absolute_filename", "isargout", "isbool",
-        "iscell", "iscellstr", "ischar", "iscomplex",
-        "isempty", "isfield", "isfloat", "isglobal",
-        "ishandle", "isieee", "isindex", "isinteger",
-        "islogical", "ismatrix", "ismethod", "isnull",
-        "isnumeric", "isobject", "isreal",
-        "is_rooted_relative_filename", "issorted",
-        "isstruct", "isvarname", "kbhit", "keyboard",
-        "kill", "lasterr", "lasterror", "lastwarn",
-        "ldivide", "le", "length", "link", "linspace",
-        "logical", "lstat", "lt", "make_absolute_filename",
-        "makeinfo_program", "max_recursion_depth", "merge",
-        "methods", "mfilename", "minus", "mislocked",
-        "mkdir", "mkfifo", "mkstemp", "mldivide", "mlock",
-        "mouse_wheel_zoom", "mpower", "mrdivide", "mtimes",
-        "munlock", "nargin", "nargout",
-        "native_float_format", "ndims", "ne", "nfields",
-        "nnz", "norm", "not", "numel", "nzmax",
-        "octave_config_info", "octave_core_file_limit",
-        "octave_core_file_name",
-        "octave_core_file_options", "ones", "or",
-        "output_max_field_width", "output_precision",
-        "page_output_immediately", "page_screen_output",
-        "path", "pathsep", "pause", "pclose", "permute",
-        "pi", "pipe", "plus", "popen", "power",
-        "print_empty_dimensions", "printf",
-        "print_struct_array_contents", "prod",
-        "program_invocation_name", "program_name",
-        "putenv", "puts", "pwd", "quit", "rats", "rdivide",
-        "readdir", "readlink", "read_readline_init_file",
-        "realmax", "realmin", "rehash", "rename",
-        "repelems", "re_read_readline_init_file", "reset",
-        "reshape", "resize", "restoredefaultpath",
-        "rethrow", "rmdir", "rmfield", "rmpath", "rows",
-        "save_header_format_string", "save_precision",
-        "saving_history", "scanf", "set", "setenv",
-        "shell_cmd", "sighup_dumps_octave_core",
-        "sigterm_dumps_octave_core", "silent_functions",
-        "single", "size", "size_equal", "sizemax",
-        "sizeof", "sleep", "source", "sparse_auto_mutate",
-        "split_long_rows", "sprintf", "squeeze", "sscanf",
-        "stat", "stderr", "stdin", "stdout", "strcmp",
-        "strcmpi", "string_fill_char", "strncmp",
-        "strncmpi", "struct", "struct_levels_to_print",
-        "strvcat", "subsasgn", "subsref", "sum", "sumsq",
-        "superiorto", "suppress_verbose_help_message",
-        "symlink", "system", "tic", "tilde_expand",
-        "times", "tmpfile", "tmpnam", "toc", "toupper",
-        "transpose", "true", "typeinfo", "umask", "uminus",
-        "uname", "undo_string_escapes", "unlink", "uplus",
-        "upper", "usage", "usleep", "vec", "vectorize",
-        "vertcat", "waitpid", "warning", "warranty",
-        "whos_line_format", "yes_or_no", "zeros",
-        "inf", "Inf", "nan", "NaN")
-
-    command_kw = ("close", "load", "who", "whos")
-
-    function_kw = (
-        "accumarray", "accumdim", "acosd", "acotd",
-        "acscd", "addtodate", "allchild", "ancestor",
-        "anova", "arch_fit", "arch_rnd", "arch_test",
-        "area", "arma_rnd", "arrayfun", "ascii", "asctime",
-        "asecd", "asind", "assert", "atand",
-        "autoreg_matrix", "autumn", "axes", "axis", "bar",
-        "barh", "bartlett", "bartlett_test", "beep",
-        "betacdf", "betainv", "betapdf", "betarnd",
-        "bicgstab", "bicubic", "binary", "binocdf",
-        "binoinv", "binopdf", "binornd", "bitcmp",
-        "bitget", "bitset", "blackman", "blanks",
-        "blkdiag", "bone", "box", "brighten", "calendar",
-        "cast", "cauchy_cdf", "cauchy_inv", "cauchy_pdf",
-        "cauchy_rnd", "caxis", "celldisp", "center", "cgs",
-        "chisquare_test_homogeneity",
-        "chisquare_test_independence", "circshift", "cla",
-        "clabel", "clf", "clock", "cloglog", "closereq",
-        "colon", "colorbar", "colormap", "colperm",
-        "comet", "common_size", "commutation_matrix",
-        "compan", "compare_versions", "compass",
-        "computer", "cond", "condest", "contour",
-        "contourc", "contourf", "contrast", "conv",
-        "convhull", "cool", "copper", "copyfile", "cor",
-        "corrcoef", "cor_test", "cosd", "cotd", "cov",
-        "cplxpair", "cross", "cscd", "cstrcat", "csvread",
-        "csvwrite", "ctime", "cumtrapz", "curl", "cut",
-        "cylinder", "date", "datenum", "datestr",
-        "datetick", "datevec", "dblquad", "deal",
-        "deblank", "deconv", "delaunay", "delaunayn",
-        "delete", "demo", "detrend", "diffpara", "diffuse",
-        "dir", "discrete_cdf", "discrete_inv",
-        "discrete_pdf", "discrete_rnd", "display",
-        "divergence", "dlmwrite", "dos", "dsearch",
-        "dsearchn", "duplication_matrix", "durbinlevinson",
-        "ellipsoid", "empirical_cdf", "empirical_inv",
-        "empirical_pdf", "empirical_rnd", "eomday",
-        "errorbar", "etime", "etreeplot", "example",
-        "expcdf", "expinv", "expm", "exppdf", "exprnd",
-        "ezcontour", "ezcontourf", "ezmesh", "ezmeshc",
-        "ezplot", "ezpolar", "ezsurf", "ezsurfc", "factor",
-        "factorial", "fail", "fcdf", "feather", "fftconv",
-        "fftfilt", "fftshift", "figure", "fileattrib",
-        "fileparts", "fill", "findall", "findobj",
-        "findstr", "finv", "flag", "flipdim", "fliplr",
-        "flipud", "fpdf", "fplot", "fractdiff", "freqz",
-        "freqz_plot", "frnd", "fsolve",
-        "f_test_regression", "ftp", "fullfile", "fzero",
-        "gamcdf", "gaminv", "gampdf", "gamrnd", "gca",
-        "gcbf", "gcbo", "gcf", "genvarname", "geocdf",
-        "geoinv", "geopdf", "geornd", "getfield", "ginput",
-        "glpk", "gls", "gplot", "gradient",
-        "graphics_toolkit", "gray", "grid", "griddata",
-        "griddatan", "gtext", "gunzip", "gzip", "hadamard",
-        "hamming", "hankel", "hanning", "hggroup",
-        "hidden", "hilb", "hist", "histc", "hold", "hot",
-        "hotelling_test", "housh", "hsv", "hurst",
-        "hygecdf", "hygeinv", "hygepdf", "hygernd",
-        "idivide", "ifftshift", "image", "imagesc",
-        "imfinfo", "imread", "imshow", "imwrite", "index",
-        "info", "inpolygon", "inputname", "interpft",
-        "interpn", "intersect", "invhilb", "iqr", "isa",
-        "isdefinite", "isdir", "is_duplicate_entry",
-        "isequal", "isequalwithequalnans", "isfigure",
-        "ishermitian", "ishghandle", "is_leap_year",
-        "isletter", "ismac", "ismember", "ispc", "isprime",
-        "isprop", "isscalar", "issquare", "isstrprop",
-        "issymmetric", "isunix", "is_valid_file_id",
-        "isvector", "jet", "kendall",
-        "kolmogorov_smirnov_cdf",
-        "kolmogorov_smirnov_test", "kruskal_wallis_test",
-        "krylov", "kurtosis", "laplace_cdf", "laplace_inv",
-        "laplace_pdf", "laplace_rnd", "legend", "legendre",
-        "license", "line", "linkprop", "list_primes",
-        "loadaudio", "loadobj", "logistic_cdf",
-        "logistic_inv", "logistic_pdf", "logistic_rnd",
-        "logit", "loglog", "loglogerr", "logm", "logncdf",
-        "logninv", "lognpdf", "lognrnd", "logspace",
-        "lookfor", "ls_command", "lsqnonneg", "magic",
-        "mahalanobis", "manova", "matlabroot",
-        "mcnemar_test", "mean", "meansq", "median", "menu",
-        "mesh", "meshc", "meshgrid", "meshz", "mexext",
-        "mget", "mkpp", "mode", "moment", "movefile",
-        "mpoles", "mput", "namelengthmax", "nargchk",
-        "nargoutchk", "nbincdf", "nbininv", "nbinpdf",
-        "nbinrnd", "nchoosek", "ndgrid", "newplot", "news",
-        "nonzeros", "normcdf", "normest", "norminv",
-        "normpdf", "normrnd", "now", "nthroot", "null",
-        "ocean", "ols", "onenormest", "optimget",
-        "optimset", "orderfields", "orient", "orth",
-        "pack", "pareto", "parseparams", "pascal", "patch",
-        "pathdef", "pcg", "pchip", "pcolor", "pcr",
-        "peaks", "periodogram", "perl", "perms", "pie",
-        "pink", "planerot", "playaudio", "plot",
-        "plotmatrix", "plotyy", "poisscdf", "poissinv",
-        "poisspdf", "poissrnd", "polar", "poly",
-        "polyaffine", "polyarea", "polyderiv", "polyfit",
-        "polygcd", "polyint", "polyout", "polyreduce",
-        "polyval", "polyvalm", "postpad", "powerset",
-        "ppder", "ppint", "ppjumps", "ppplot", "ppval",
-        "pqpnonneg", "prepad", "primes", "print",
-        "print_usage", "prism", "probit", "qp", "qqplot",
-        "quadcc", "quadgk", "quadl", "quadv", "quiver",
-        "qzhess", "rainbow", "randi", "range", "rank",
-        "ranks", "rat", "reallog", "realpow", "realsqrt",
-        "record", "rectangle_lw", "rectangle_sw",
-        "rectint", "refresh", "refreshdata",
-        "regexptranslate", "repmat", "residue", "ribbon",
-        "rindex", "roots", "rose", "rosser", "rotdim",
-        "rref", "run", "run_count", "rundemos", "run_test",
-        "runtests", "saveas", "saveaudio", "saveobj",
-        "savepath", "scatter", "secd", "semilogx",
-        "semilogxerr", "semilogy", "semilogyerr",
-        "setaudio", "setdiff", "setfield", "setxor",
-        "shading", "shift", "shiftdim", "sign_test",
-        "sinc", "sind", "sinetone", "sinewave", "skewness",
-        "slice", "sombrero", "sortrows", "spaugment",
-        "spconvert", "spdiags", "spearman", "spectral_adf",
-        "spectral_xdf", "specular", "speed", "spencer",
-        "speye", "spfun", "sphere", "spinmap", "spline",
-        "spones", "sprand", "sprandn", "sprandsym",
-        "spring", "spstats", "spy", "sqp", "stairs",
-        "statistics", "std", "stdnormal_cdf",
-        "stdnormal_inv", "stdnormal_pdf", "stdnormal_rnd",
-        "stem", "stft", "strcat", "strchr", "strjust",
-        "strmatch", "strread", "strsplit", "strtok",
-        "strtrim", "strtrunc", "structfun", "studentize",
-        "subplot", "subsindex", "subspace", "substr",
-        "substruct", "summer", "surf", "surface", "surfc",
-        "surfl", "surfnorm", "svds", "swapbytes",
-        "sylvester_matrix", "symvar", "synthesis", "table",
-        "tand", "tar", "tcdf", "tempdir", "tempname",
-        "test", "text", "textread", "textscan", "tinv",
-        "title", "toeplitz", "tpdf", "trace", "trapz",
-        "treelayout", "treeplot", "triangle_lw",
-        "triangle_sw", "tril", "trimesh", "triplequad",
-        "triplot", "trisurf", "triu", "trnd", "tsearchn",
-        "t_test", "t_test_regression", "type", "unidcdf",
-        "unidinv", "unidpdf", "unidrnd", "unifcdf",
-        "unifinv", "unifpdf", "unifrnd", "union", "unique",
-        "unix", "unmkpp", "unpack", "untabify", "untar",
-        "unwrap", "unzip", "u_test", "validatestring",
-        "vander", "var", "var_test", "vech", "ver",
-        "version", "view", "voronoi", "voronoin",
-        "waitforbuttonpress", "wavread", "wavwrite",
-        "wblcdf", "wblinv", "wblpdf", "wblrnd", "weekday",
-        "welch_test", "what", "white", "whitebg",
-        "wienrnd", "wilcoxon_test", "wilkinson", "winter",
-        "xlabel", "xlim", "ylabel", "yulewalker", "zip",
-        "zlabel", "z_test")
-
-    loadable_kw = (
-        "airy", "amd", "balance", "besselh", "besseli",
-        "besselj", "besselk", "bessely", "bitpack",
-        "bsxfun", "builtin", "ccolamd", "cellfun",
-        "cellslices", "chol", "choldelete", "cholinsert",
-        "cholinv", "cholshift", "cholupdate", "colamd",
-        "colloc", "convhulln", "convn", "csymamd",
-        "cummax", "cummin", "daspk", "daspk_options",
-        "dasrt", "dasrt_options", "dassl", "dassl_options",
-        "dbclear", "dbdown", "dbstack", "dbstatus",
-        "dbstop", "dbtype", "dbup", "dbwhere", "det",
-        "dlmread", "dmperm", "dot", "eig", "eigs",
-        "endgrent", "endpwent", "etree", "fft", "fftn",
-        "fftw", "filter", "find", "full", "gcd",
-        "getgrent", "getgrgid", "getgrnam", "getpwent",
-        "getpwnam", "getpwuid", "getrusage", "givens",
-        "gmtime", "gnuplot_binary", "hess", "ifft",
-        "ifftn", "inv", "isdebugmode", "issparse", "kron",
-        "localtime", "lookup", "lsode", "lsode_options",
-        "lu", "luinc", "luupdate", "matrix_type", "max",
-        "min", "mktime", "pinv", "qr", "qrdelete",
-        "qrinsert", "qrshift", "qrupdate", "quad",
-        "quad_options", "qz", "rand", "rande", "randg",
-        "randn", "randp", "randperm", "rcond", "regexp",
-        "regexpi", "regexprep", "schur", "setgrent",
-        "setpwent", "sort", "spalloc", "sparse", "spparms",
-        "sprank", "sqrtm", "strfind", "strftime",
-        "strptime", "strrep", "svd", "svd_driver", "syl",
-        "symamd", "symbfact", "symrcm", "time", "tsearch",
-        "typecast", "urlread", "urlwrite")
-
-    mapping_kw = (
-        "abs", "acos", "acosh", "acot", "acoth", "acsc",
-        "acsch", "angle", "arg", "asec", "asech", "asin",
-        "asinh", "atan", "atanh", "beta", "betainc",
-        "betaln", "bincoeff", "cbrt", "ceil", "conj", "cos",
-        "cosh", "cot", "coth", "csc", "csch", "erf", "erfc",
-        "erfcx", "erfinv", "exp", "finite", "fix", "floor",
-        "fmod", "gamma", "gammainc", "gammaln", "imag",
-        "isalnum", "isalpha", "isascii", "iscntrl",
-        "isdigit", "isfinite", "isgraph", "isinf",
-        "islower", "isna", "isnan", "isprint", "ispunct",
-        "isspace", "isupper", "isxdigit", "lcm", "lgamma",
-        "log", "lower", "mod", "real", "rem", "round",
-        "roundb", "sec", "sech", "sign", "sin", "sinh",
-        "sqrt", "tan", "tanh", "toascii", "tolower", "xor")
-
-    builtin_consts = (
-        "EDITOR", "EXEC_PATH", "I", "IMAGE_PATH", "NA",
-        "OCTAVE_HOME", "OCTAVE_VERSION", "PAGER",
-        "PAGER_FLAGS", "SEEK_CUR", "SEEK_END", "SEEK_SET",
-        "SIG", "S_ISBLK", "S_ISCHR", "S_ISDIR", "S_ISFIFO",
-        "S_ISLNK", "S_ISREG", "S_ISSOCK", "WCONTINUE",
-        "WCOREDUMP", "WEXITSTATUS", "WIFCONTINUED",
-        "WIFEXITED", "WIFSIGNALED", "WIFSTOPPED", "WNOHANG",
-        "WSTOPSIG", "WTERMSIG", "WUNTRACED")
-
-    tokens = {
-        'root': [
-            (r'%\{\s*\n', Comment.Multiline, 'percentblockcomment'),
-            (r'#\{\s*\n', Comment.Multiline, 'hashblockcomment'),
-            (r'[%#].*$', Comment),
-            (r'^\s*function\b', Keyword, 'deffunc'),
-
-            # from 'iskeyword' on hg changeset 8cc154f45e37
-            (words((
-                '__FILE__', '__LINE__', 'break', 'case', 'catch', 'classdef',
-                'continue', 'do', 'else', 'elseif', 'end', 'end_try_catch',
-                'end_unwind_protect', 'endclassdef', 'endevents', 'endfor',
-                'endfunction', 'endif', 'endmethods', 'endproperties', 'endswitch',
-                'endwhile', 'events', 'for', 'function', 'get', 'global', 'if',
-                'methods', 'otherwise', 'persistent', 'properties', 'return',
-                'set', 'static', 'switch', 'try', 'until', 'unwind_protect',
-                'unwind_protect_cleanup', 'while'), suffix=r'\b'),
-             Keyword),
-
-            (words(builtin_kw + command_kw + function_kw + loadable_kw + mapping_kw,
-                   suffix=r'\b'),  Name.Builtin),
-
-            (words(builtin_consts, suffix=r'\b'), Name.Constant),
-
-            # operators in Octave but not Matlab:
-            (r'-=|!=|!|/=|--', Operator),
-            # operators:
-            (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
-            # operators in Octave but not Matlab requiring escape for re:
-            (r'\*=|\+=|\^=|\/=|\\=|\*\*|\+\+|\.\*\*', Operator),
-            # operators requiring escape for re:
-            (r'\.\*|\*|\+|\.\^|\^|\.\\|\.\/|\/|\\', Operator),
-
-
-            # punctuation:
-            (r'[\[\](){}:@.,]', Punctuation),
-            (r'=|:|;', Punctuation),
-
-            (r'"[^"]*"', String),
-
-            (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
-            (r'\d+[eEf][+-]?[0-9]+', Number.Float),
-            (r'\d+', Number.Integer),
-
-            # quote can be transpose, instead of string:
-            # (not great, but handles common cases...)
-            (r'(?<=[\w)\].])\'+', Operator),
-            (r'(?|<=|>=|&&|&|~|\|\|?', Operator),
-            # operators requiring escape for re:
-            (r'\.\*|\*|\+|\.\^|\^|\.\\|\.\/|\/|\\', Operator),
-
-            # punctuation:
-            (r'[\[\](){}@.,=:;]+', Punctuation),
-
-            (r'"[^"]*"', String),
-
-            # quote can be transpose, instead of string:
-            # (not great, but handles common cases...)
-            (r'(?<=[\w)\].])\'+', Operator),
-            (r'(?', r'<', r'|', r'!', r"'")
-
-    operator_words = ('and', 'or', 'not')
-
-    tokens = {
-        'root': [
-            (r'/\*', Comment.Multiline, 'comment'),
-            (r'"(?:[^"\\]|\\.)*"', String),
-            (r'\(|\)|\[|\]|\{|\}', Punctuation),
-            (r'[,;$]', Punctuation),
-            (words (constants), Name.Constant),
-            (words (keywords), Keyword),
-            (words (operators), Operator),
-            (words (operator_words), Operator.Word),
-            (r'''(?x)
-              ((?:[a-zA-Z_#][\w#]*|`[^`]*`)
-              (?:::[a-zA-Z_#][\w#]*|`[^`]*`)*)(\s*)([(])''',
-             bygroups(Name.Function, Text.Whitespace, Punctuation)),
-            (r'''(?x)
-              (?:[a-zA-Z_#%][\w#%]*|`[^`]*`)
-              (?:::[a-zA-Z_#%][\w#%]*|`[^`]*`)*''', Name.Variable),
-            (r'[-+]?(\d*\.\d+([bdefls][-+]?\d+)?|\d+(\.\d*)?[bdefls][-+]?\d+)', Number.Float),
-            (r'[-+]?\d+', Number.Integer),
-            (r'\s+', Text.Whitespace),
-            (r'.', Text)
-        ],
-        'comment': [
-            (r'[^*/]+', Comment.Multiline),
-            (r'/\*', Comment.Multiline, '#push'),
-            (r'\*/', Comment.Multiline, '#pop'),
-            (r'[*/]', Comment.Multiline)
-        ]
-    }
-
-    def analyse_text (text):
-        strength = 0.0
-        # Input expression terminator.
-        if re.search (r'\$\s*$', text, re.MULTILINE):
-            strength += 0.05
-        # Function definition operator.
-        if ':=' in text:
-            strength += 0.02
-        return strength
diff --git a/voxvera/vendor/pygments/lexers/meson.py b/voxvera/vendor/pygments/lexers/meson.py
deleted file mode 100644
index 6f2c6da..0000000
--- a/voxvera/vendor/pygments/lexers/meson.py
+++ /dev/null
@@ -1,139 +0,0 @@
-"""
-    pygments.lexers.meson
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Pygments lexer for the Meson build system
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, words, include
-from pygments.token import Comment, Name, Number, Punctuation, Operator, \
-    Keyword, String, Whitespace
-
-__all__ = ['MesonLexer']
-
-
-class MesonLexer(RegexLexer):
-    """Meson language lexer.
-
-    The grammar definition use to transcribe the syntax was retrieved from
-    https://mesonbuild.com/Syntax.html#grammar for version 0.58.
-    Some of those definitions are improperly transcribed, so the Meson++
-    implementation was also checked: https://github.com/dcbaker/meson-plus-plus.
-    """
-
-    # TODO String interpolation @VARNAME@ inner matches
-    # TODO keyword_arg: value inner matches
-
-    name = 'Meson'
-    url = 'https://mesonbuild.com/'
-    aliases = ['meson', 'meson.build']
-    filenames = ['meson.build', 'meson_options.txt']
-    mimetypes = ['text/x-meson']
-    version_added = '2.10'
-
-    tokens = {
-        'root': [
-            (r'#.*?$', Comment),
-            (r"'''.*'''", String.Single),
-            (r'[1-9][0-9]*', Number.Integer),
-            (r'0o[0-7]+', Number.Oct),
-            (r'0x[a-fA-F0-9]+', Number.Hex),
-            include('string'),
-            include('keywords'),
-            include('expr'),
-            (r'[a-zA-Z_][a-zA-Z_0-9]*', Name),
-            (r'\s+', Whitespace),
-        ],
-        'string': [
-            (r"[']{3}([']{0,2}([^\\']|\\(.|\n)))*[']{3}", String),
-            (r"'.*?(?`_.
-    """
-
-    name = "MCFunction"
-    url = "https://minecraft.wiki/w/Commands"
-    aliases = ["mcfunction", "mcf"]
-    filenames = ["*.mcfunction"]
-    mimetypes = ["text/mcfunction"]
-    version_added = '2.12'
-
-    # Used to denotate the start of a block comment, borrowed from Github's mcfunction
-    _block_comment_prefix = "[>!]"
-
-    tokens = {
-        "root": [
-            include("names"),
-            include("comments"),
-            include("literals"),
-            include("whitespace"),
-            include("property"),
-            include("operators"),
-            include("selectors"),
-        ],
-
-        "names": [
-            # The start of a command (either beginning of line OR after the run keyword)
-            #  We don't encode a list of keywords since mods, plugins, or even pre-processors
-            #  may add new commands, so we have a 'close-enough' regex which catches them.
-            (r"^(\s*)([a-z_]+)", bygroups(Whitespace, Name.Builtin)),
-            (r"(?<=run)\s+[a-z_]+", Name.Builtin),
-
-            # UUID
-            (r"\b[0-9a-fA-F]+(?:-[0-9a-fA-F]+){4}\b", Name.Variable),
-            include("resource-name"),
-            # normal command names and scoreboards
-            #  there's no way to know the differences unfortuntely
-            (r"[A-Za-z_][\w.#%$]+", Keyword.Constant),
-            (r"[#%$][\w.#%$]+", Name.Variable.Magic),
-        ],
-
-        "resource-name": [
-            # resource names have to be lowercase
-            (r"#?[a-z_][a-z_.-]*:[a-z0-9_./-]+", Name.Function),
-            # similar to above except optional `:``
-            #  a `/` must be present "somewhere"
-            (r"#?[a-z0-9_\.\-]+\/[a-z0-9_\.\-\/]+", Name.Function),
-        ],
-
-        "whitespace": [
-            (r"\s+", Whitespace),
-        ],
-
-        "comments": [
-            (rf"^\s*(#{_block_comment_prefix})", Comment.Multiline,
-             ("comments.block", "comments.block.emphasized")),
-            (r"#.*$", Comment.Single),
-        ],
-        "comments.block": [
-            (rf"^\s*#{_block_comment_prefix}", Comment.Multiline,
-             "comments.block.emphasized"),
-            (r"^\s*#", Comment.Multiline, "comments.block.normal"),
-            default("#pop"),
-        ],
-        "comments.block.normal": [
-            include("comments.block.special"),
-            (r"\S+", Comment.Multiline),
-            (r"\n", Text, "#pop"),
-            include("whitespace"),
-        ],
-        "comments.block.emphasized": [
-            include("comments.block.special"),
-            (r"\S+", String.Doc),
-            (r"\n", Text, "#pop"),
-            include("whitespace"),
-        ],
-        "comments.block.special": [
-            # Params
-            (r"@\S+", Name.Decorator),
-
-            include("resource-name"),
-
-            # Scoreboard player names
-            (r"[#%$][\w.#%$]+", Name.Variable.Magic),
-        ],
-
-        "operators": [
-            (r"[\-~%^?!+*<>\\/|&=.]", Operator),
-        ],
-
-        "literals": [
-            (r"\.\.", Literal),
-            (r"(true|false)", Keyword.Pseudo),
-
-            # these are like unquoted strings and appear in many places
-            (r"[A-Za-z_]+", Name.Variable.Class),
-
-            (r"[0-7]b", Number.Byte),
-            (r"[+-]?\d*\.?\d+([eE]?[+-]?\d+)?[df]?\b", Number.Float),
-            (r"[+-]?\d+\b", Number.Integer),
-            (r'"', String.Double, "literals.string-double"),
-            (r"'", String.Single, "literals.string-single"),
-        ],
-        "literals.string-double": [
-            (r"\\.", String.Escape),
-            (r'[^\\"\n]+', String.Double),
-            (r'"', String.Double, "#pop"),
-        ],
-        "literals.string-single": [
-            (r"\\.", String.Escape),
-            (r"[^\\'\n]+", String.Single),
-            (r"'", String.Single, "#pop"),
-        ],
-
-        "selectors": [
-            (r"@[a-z]", Name.Variable),
-        ],
-
-
-        ## Generic Property Container
-        # There are several, differing instances where the language accepts
-        #  specific contained keys or contained key, value pairings.
-        #
-        # Property Maps:
-        # - Starts with either `[` or `{`
-        # - Key separated by `:` or `=`
-        # - Deliminated by `,`
-        #
-        # Property Lists:
-        # - Starts with `[`
-        # - Deliminated by `,`
-        #
-        # For simplicity, these patterns match a generic, nestable structure
-        #  which follow a key, value pattern. For normal lists, there's only keys.
-        # This allow some "illegal" structures, but we'll accept those for
-        #  sake of simplicity
-        #
-        # Examples:
-        # - `[facing=up, powered=true]` (blockstate)
-        # - `[name="hello world", nbt={key: 1b}]` (selector + nbt)
-        # - `[{"text": "value"}, "literal"]` (json)
-        ##
-        "property": [
-            # This state gets included in root and also several substates
-            # We do this to shortcut the starting of new properties
-            #  within other properties. Lists can have sublists and compounds
-            #  and values can start a new property (see the `difficult_1.txt`
-            #  snippet).
-            (r"\{", Punctuation, ("property.curly", "property.key")),
-            (r"\[", Punctuation, ("property.square", "property.key")),
-        ],
-        "property.curly": [
-            include("whitespace"),
-            include("property"),
-            (r"\}", Punctuation, "#pop"),
-        ],
-        "property.square": [
-            include("whitespace"),
-            include("property"),
-            (r"\]", Punctuation, "#pop"),
-
-            # lists can have sequences of items
-            (r",", Punctuation),
-        ],
-        "property.key": [
-            include("whitespace"),
-
-            # resource names (for advancements)
-            #  can omit `:` to default `minecraft:`
-            # must check if there is a future equals sign if `:` is in the name
-            (r"#?[a-z_][a-z_\.\-]*\:[a-z0-9_\.\-/]+(?=\s*\=)", Name.Attribute, "property.delimiter"),
-            (r"#?[a-z_][a-z0-9_\.\-/]+", Name.Attribute, "property.delimiter"),
-
-            # unquoted NBT key
-            (r"[A-Za-z_\-\+]+", Name.Attribute, "property.delimiter"),
-
-            # quoted JSON or NBT key
-            (r'"', Name.Attribute, "property.delimiter", "literals.string-double"),
-            (r"'", Name.Attribute, "property.delimiter", "literals.string-single"),
-
-            # index for a list
-            (r"-?\d+", Number.Integer, "property.delimiter"),
-
-            default("#pop"),
-        ],
-        "property.key.string-double": [
-            (r"\\.", String.Escape),
-            (r'[^\\"\n]+', Name.Attribute),
-            (r'"', Name.Attribute, "#pop"),
-        ],
-        "property.key.string-single": [
-            (r"\\.", String.Escape),
-            (r"[^\\'\n]+", Name.Attribute),
-            (r"'", Name.Attribute, "#pop"),
-        ],
-        "property.delimiter": [
-            include("whitespace"),
-
-            (r"[:=]!?", Punctuation, "property.value"),
-            (r",", Punctuation),
-
-            default("#pop"),
-        ],
-        "property.value": [
-            include("whitespace"),
-
-            # unquoted resource names are valid literals here
-            (r"#?[a-z_][a-z_\.\-]*\:[a-z0-9_\.\-/]+", Name.Tag),
-            (r"#?[a-z_][a-z0-9_\.\-/]+", Name.Tag),
-
-            include("literals"),
-            include("property"),
-
-            default("#pop"),
-        ],
-    }
-
-
-class MCSchemaLexer(RegexLexer):
-    """Lexer for Minecraft Add-ons data Schemas, an interface structure standard used in Minecraft
-    """
-
-    name = 'MCSchema'
-    url = 'https://learn.microsoft.com/en-us/minecraft/creator/reference/content/schemasreference/'
-    aliases = ['mcschema']
-    filenames = ['*.mcschema']
-    mimetypes = ['text/mcschema']
-    version_added = '2.14'
-
-    tokens = {
-        'commentsandwhitespace': [
-            (r'\s+', Whitespace),
-            (r'//.*?$', Comment.Single),
-            (r'/\*.*?\*/', Comment.Multiline)
-        ],
-        'slashstartsregex': [
-            include('commentsandwhitespace'),
-            (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/'
-             r'([gimuysd]+\b|\B)', String.Regex, '#pop'),
-            (r'(?=/)', Text, ('#pop', 'badregex')),
-            default('#pop')
-        ],
-        'badregex': [
-            (r'\n', Whitespace, '#pop')
-        ],
-        'singlestring': [
-            (r'\\.', String.Escape),
-            (r"'", String.Single, '#pop'),
-            (r"[^\\']+", String.Single),
-        ],
-        'doublestring': [
-            (r'\\.', String.Escape),
-            (r'"', String.Double, '#pop'),
-            (r'[^\\"]+', String.Double),
-        ],
-        'root': [
-            (r'^(?=\s|/|', Comment, '#pop'),
-            (r'[^\-]+|-', Comment),
-        ],
-    }
-
-
-class ReasonLexer(RegexLexer):
-    """
-    For the ReasonML language.
-    """
-
-    name = 'ReasonML'
-    url = 'https://reasonml.github.io/'
-    aliases = ['reasonml', 'reason']
-    filenames = ['*.re', '*.rei']
-    mimetypes = ['text/x-reasonml']
-    version_added = '2.6'
-
-    keywords = (
-        'as', 'assert', 'begin', 'class', 'constraint', 'do', 'done', 'downto',
-        'else', 'end', 'exception', 'external', 'false', 'for', 'fun', 'esfun',
-        'function', 'functor', 'if', 'in', 'include', 'inherit', 'initializer', 'lazy',
-        'let', 'switch', 'module', 'pub', 'mutable', 'new', 'nonrec', 'object', 'of',
-        'open', 'pri', 'rec', 'sig', 'struct', 'then', 'to', 'true', 'try',
-        'type', 'val', 'virtual', 'when', 'while', 'with',
-    )
-    keyopts = (
-        '!=', '#', '&', '&&', r'\(', r'\)', r'\*', r'\+', ',', '-',
-        r'-\.', '=>', r'\.', r'\.\.', r'\.\.\.', ':', '::', ':=', ':>', ';', ';;', '<',
-        '<-', '=', '>', '>]', r'>\}', r'\?', r'\?\?', r'\[', r'\[<', r'\[>',
-        r'\[\|', ']', '_', '`', r'\{', r'\{<', r'\|', r'\|\|', r'\|]', r'\}', '~'
-    )
-
-    operators = r'[!$%&*+\./:<=>?@^|~-]'
-    word_operators = ('and', 'asr', 'land', 'lor', 'lsl', 'lsr', 'lxor', 'mod', 'or')
-    prefix_syms = r'[!?~]'
-    infix_syms = r'[=<>@^|&+\*/$%-]'
-    primitives = ('unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array')
-
-    tokens = {
-        'escape-sequence': [
-            (r'\\[\\"\'ntbr]', String.Escape),
-            (r'\\[0-9]{3}', String.Escape),
-            (r'\\x[0-9a-fA-F]{2}', String.Escape),
-        ],
-        'root': [
-            (r'\s+', Text),
-            (r'false|true|\(\)|\[\]', Name.Builtin.Pseudo),
-            (r'\b([A-Z][\w\']*)(?=\s*\.)', Name.Namespace, 'dotted'),
-            (r'\b([A-Z][\w\']*)', Name.Class),
-            (r'//.*?\n', Comment.Single),
-            (r'\/\*(?!/)', Comment.Multiline, 'comment'),
-            (r'\b({})\b'.format('|'.join(keywords)), Keyword),
-            (r'({})'.format('|'.join(keyopts[::-1])), Operator.Word),
-            (rf'({infix_syms}|{prefix_syms})?{operators}', Operator),
-            (r'\b({})\b'.format('|'.join(word_operators)), Operator.Word),
-            (r'\b({})\b'.format('|'.join(primitives)), Keyword.Type),
-
-            (r"[^\W\d][\w']*", Name),
-
-            (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
-            (r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
-            (r'0[oO][0-7][0-7_]*', Number.Oct),
-            (r'0[bB][01][01_]*', Number.Bin),
-            (r'\d[\d_]*', Number.Integer),
-
-            (r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'",
-             String.Char),
-            (r"'.'", String.Char),
-            (r"'", Keyword),
-
-            (r'"', String.Double, 'string'),
-
-            (r'[~?][a-z][\w\']*:', Name.Variable),
-        ],
-        'comment': [
-            (r'[^/*]+', Comment.Multiline),
-            (r'\/\*', Comment.Multiline, '#push'),
-            (r'\*\/', Comment.Multiline, '#pop'),
-            (r'\*', Comment.Multiline),
-        ],
-        'string': [
-            (r'[^\\"]+', String.Double),
-            include('escape-sequence'),
-            (r'\\\n', String.Double),
-            (r'"', String.Double, '#pop'),
-        ],
-        'dotted': [
-            (r'\s+', Text),
-            (r'\.', Punctuation),
-            (r'[A-Z][\w\']*(?=\s*\.)', Name.Namespace),
-            (r'[A-Z][\w\']*', Name.Class, '#pop'),
-            (r'[a-z_][\w\']*', Name, '#pop'),
-            default('#pop'),
-        ],
-    }
-
-
-class FStarLexer(RegexLexer):
-    """
-    For the F* language.
-    """
-
-    name = 'FStar'
-    url = 'https://www.fstar-lang.org/'
-    aliases = ['fstar']
-    filenames = ['*.fst', '*.fsti']
-    mimetypes = ['text/x-fstar']
-    version_added = '2.7'
-
-    keywords = (
-        'abstract', 'attributes', 'noeq', 'unopteq', 'and'
-        'begin', 'by', 'default', 'effect', 'else', 'end', 'ensures',
-        'exception', 'exists', 'false', 'forall', 'fun', 'function', 'if',
-        'in', 'include', 'inline', 'inline_for_extraction', 'irreducible',
-        'logic', 'match', 'module', 'mutable', 'new', 'new_effect', 'noextract',
-        'of', 'open', 'opaque', 'private', 'range_of', 'reifiable',
-        'reify', 'reflectable', 'requires', 'set_range_of', 'sub_effect',
-        'synth', 'then', 'total', 'true', 'try', 'type', 'unfold', 'unfoldable',
-        'val', 'when', 'with', 'not'
-    )
-    decl_keywords = ('let', 'rec')
-    assume_keywords = ('assume', 'admit', 'assert', 'calc')
-    keyopts = (
-        r'~', r'-', r'/\\', r'\\/', r'<:', r'<@', r'\(\|', r'\|\)', r'#', r'u#',
-        r'&', r'\(', r'\)', r'\(\)', r',', r'~>', r'->', r'<-', r'<--', r'<==>',
-        r'==>', r'\.', r'\?', r'\?\.', r'\.\[', r'\.\(', r'\.\(\|', r'\.\[\|',
-        r'\{:pattern', r':', r'::', r':=', r';', r';;', r'=', r'%\[', r'!\{',
-        r'\[', r'\[@', r'\[\|', r'\|>', r'\]', r'\|\]', r'\{', r'\|', r'\}', r'\$'
-    )
-
-    operators = r'[!$%&*+\./:<=>?@^|~-]'
-    prefix_syms = r'[!?~]'
-    infix_syms = r'[=<>@^|&+\*/$%-]'
-    primitives = ('unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array')
-
-    tokens = {
-        'escape-sequence': [
-            (r'\\[\\"\'ntbr]', String.Escape),
-            (r'\\[0-9]{3}', String.Escape),
-            (r'\\x[0-9a-fA-F]{2}', String.Escape),
-        ],
-        'root': [
-            (r'\s+', Text),
-            (r'false|true|False|True|\(\)|\[\]', Name.Builtin.Pseudo),
-            (r'\b([A-Z][\w\']*)(?=\s*\.)', Name.Namespace, 'dotted'),
-            (r'\b([A-Z][\w\']*)', Name.Class),
-            (r'\(\*(?![)])', Comment, 'comment'),
-            (r'\/\/.+$', Comment),
-            (r'\b({})\b'.format('|'.join(keywords)), Keyword),
-            (r'\b({})\b'.format('|'.join(assume_keywords)), Name.Exception),
-            (r'\b({})\b'.format('|'.join(decl_keywords)), Keyword.Declaration),
-            (r'({})'.format('|'.join(keyopts[::-1])), Operator),
-            (rf'({infix_syms}|{prefix_syms})?{operators}', Operator),
-            (r'\b({})\b'.format('|'.join(primitives)), Keyword.Type),
-
-            (r"[^\W\d][\w']*", Name),
-
-            (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
-            (r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
-            (r'0[oO][0-7][0-7_]*', Number.Oct),
-            (r'0[bB][01][01_]*', Number.Bin),
-            (r'\d[\d_]*', Number.Integer),
-
-            (r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'",
-             String.Char),
-            (r"'.'", String.Char),
-            (r"'", Keyword),  # a stray quote is another syntax element
-            (r"\`([\w\'.]+)\`", Operator.Word),  # for infix applications
-            (r"\`", Keyword),  # for quoting
-            (r'"', String.Double, 'string'),
-
-            (r'[~?][a-z][\w\']*:', Name.Variable),
-        ],
-        'comment': [
-            (r'[^(*)]+', Comment),
-            (r'\(\*', Comment, '#push'),
-            (r'\*\)', Comment, '#pop'),
-            (r'[(*)]', Comment),
-        ],
-        'string': [
-            (r'[^\\"]+', String.Double),
-            include('escape-sequence'),
-            (r'\\\n', String.Double),
-            (r'"', String.Double, '#pop'),
-        ],
-        'dotted': [
-            (r'\s+', Text),
-            (r'\.', Punctuation),
-            (r'[A-Z][\w\']*(?=\s*\.)', Name.Namespace),
-            (r'[A-Z][\w\']*', Name.Class, '#pop'),
-            (r'[a-z_][\w\']*', Name, '#pop'),
-            default('#pop'),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/modeling.py b/voxvera/vendor/pygments/lexers/modeling.py
deleted file mode 100644
index d681e7f..0000000
--- a/voxvera/vendor/pygments/lexers/modeling.py
+++ /dev/null
@@ -1,366 +0,0 @@
-"""
-    pygments.lexers.modeling
-    ~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for modeling languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include, bygroups, using, default
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Whitespace
-
-from pygments.lexers.html import HtmlLexer
-from pygments.lexers import _stan_builtins
-
-__all__ = ['ModelicaLexer', 'BugsLexer', 'JagsLexer', 'StanLexer']
-
-
-class ModelicaLexer(RegexLexer):
-    """
-    For Modelica source code.
-    """
-    name = 'Modelica'
-    url = 'http://www.modelica.org/'
-    aliases = ['modelica']
-    filenames = ['*.mo']
-    mimetypes = ['text/x-modelica']
-    version_added = '1.1'
-
-    flags = re.DOTALL | re.MULTILINE
-
-    _name = r"(?:'(?:[^\\']|\\.)+'|[a-zA-Z_]\w*)"
-
-    tokens = {
-        'whitespace': [
-            (r'[\s\ufeff]+', Text),
-            (r'//[^\n]*\n?', Comment.Single),
-            (r'/\*.*?\*/', Comment.Multiline)
-        ],
-        'root': [
-            include('whitespace'),
-            (r'"', String.Double, 'string'),
-            (r'[()\[\]{},;]+', Punctuation),
-            (r'\.?[*^/+-]|\.|<>|[<>:=]=?', Operator),
-            (r'\d+(\.?\d*[eE][-+]?\d+|\.\d*)', Number.Float),
-            (r'\d+', Number.Integer),
-            (r'(abs|acos|actualStream|array|asin|assert|AssertionLevel|atan|'
-             r'atan2|backSample|Boolean|cardinality|cat|ceil|change|Clock|'
-             r'Connections|cos|cosh|cross|delay|diagonal|div|edge|exp|'
-             r'ExternalObject|fill|floor|getInstanceName|hold|homotopy|'
-             r'identity|inStream|integer|Integer|interval|inverse|isPresent|'
-             r'linspace|log|log10|matrix|max|min|mod|ndims|noClock|noEvent|'
-             r'ones|outerProduct|pre|previous|product|Real|reinit|rem|rooted|'
-             r'sample|scalar|semiLinear|shiftSample|sign|sin|sinh|size|skew|'
-             r'smooth|spatialDistribution|sqrt|StateSelect|String|subSample|'
-             r'sum|superSample|symmetric|tan|tanh|terminal|terminate|time|'
-             r'transpose|vector|zeros)\b', Name.Builtin),
-            (r'(algorithm|annotation|break|connect|constant|constrainedby|der|'
-             r'discrete|each|else|elseif|elsewhen|encapsulated|enumeration|'
-             r'equation|exit|expandable|extends|external|firstTick|final|flow|for|if|'
-             r'import|impure|in|initial|inner|input|interval|loop|nondiscrete|outer|'
-             r'output|parameter|partial|protected|public|pure|redeclare|'
-             r'replaceable|return|stream|then|when|while)\b',
-             Keyword.Reserved),
-            (r'(and|not|or)\b', Operator.Word),
-            (r'(block|class|connector|end|function|model|operator|package|'
-             r'record|type)\b', Keyword.Reserved, 'class'),
-            (r'(false|true)\b', Keyword.Constant),
-            (r'within\b', Keyword.Reserved, 'package-prefix'),
-            (_name, Name)
-        ],
-        'class': [
-            include('whitespace'),
-            (r'(function|record)\b', Keyword.Reserved),
-            (r'(if|for|when|while)\b', Keyword.Reserved, '#pop'),
-            (_name, Name.Class, '#pop'),
-            default('#pop')
-        ],
-        'package-prefix': [
-            include('whitespace'),
-            (_name, Name.Namespace, '#pop'),
-            default('#pop')
-        ],
-        'string': [
-            (r'"', String.Double, '#pop'),
-            (r'\\[\'"?\\abfnrtv]', String.Escape),
-            (r'(?i)<\s*html\s*>([^\\"]|\\.)+?(<\s*/\s*html\s*>|(?="))',
-             using(HtmlLexer)),
-            (r'<|\\?[^"\\<]+', String.Double)
-        ]
-    }
-
-
-class BugsLexer(RegexLexer):
-    """
-    Pygments Lexer for OpenBugs and WinBugs
-    models.
-    """
-
-    name = 'BUGS'
-    aliases = ['bugs', 'winbugs', 'openbugs']
-    filenames = ['*.bug']
-    url = 'https://www.mrc-bsu.cam.ac.uk/software/bugs/openbugs'
-    version_added = '1.6'
-
-    _FUNCTIONS = (
-        # Scalar functions
-        'abs', 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctanh',
-        'cloglog', 'cos', 'cosh', 'cumulative', 'cut', 'density', 'deviance',
-        'equals', 'expr', 'gammap', 'ilogit', 'icloglog', 'integral', 'log',
-        'logfact', 'loggam', 'logit', 'max', 'min', 'phi', 'post.p.value',
-        'pow', 'prior.p.value', 'probit', 'replicate.post', 'replicate.prior',
-        'round', 'sin', 'sinh', 'solution', 'sqrt', 'step', 'tan', 'tanh',
-        'trunc',
-        # Vector functions
-        'inprod', 'interp.lin', 'inverse', 'logdet', 'mean', 'eigen.vals',
-        'ode', 'prod', 'p.valueM', 'rank', 'ranked', 'replicate.postM',
-        'sd', 'sort', 'sum',
-        # Special
-        'D', 'I', 'F', 'T', 'C')
-    """ OpenBUGS built-in functions
-
-    From http://www.openbugs.info/Manuals/ModelSpecification.html#ContentsAII
-
-    This also includes
-
-    - T, C, I : Truncation and censoring.
-      ``T`` and ``C`` are in OpenBUGS. ``I`` in WinBUGS.
-    - D : ODE
-    - F : Functional http://www.openbugs.info/Examples/Functionals.html
-
-    """
-
-    _DISTRIBUTIONS = ('dbern', 'dbin', 'dcat', 'dnegbin', 'dpois',
-                      'dhyper', 'dbeta', 'dchisqr', 'ddexp', 'dexp',
-                      'dflat', 'dgamma', 'dgev', 'df', 'dggamma', 'dgpar',
-                      'dloglik', 'dlnorm', 'dlogis', 'dnorm', 'dpar',
-                      'dt', 'dunif', 'dweib', 'dmulti', 'ddirch', 'dmnorm',
-                      'dmt', 'dwish')
-    """ OpenBUGS built-in distributions
-
-    Functions from
-    http://www.openbugs.info/Manuals/ModelSpecification.html#ContentsAI
-    """
-
-    tokens = {
-        'whitespace': [
-            (r"\s+", Text),
-        ],
-        'comments': [
-            # Comments
-            (r'#.*$', Comment.Single),
-        ],
-        'root': [
-            # Comments
-            include('comments'),
-            include('whitespace'),
-            # Block start
-            (r'(model)(\s+)(\{)',
-             bygroups(Keyword.Namespace, Text, Punctuation)),
-            # Reserved Words
-            (r'(for|in)(?![\w.])', Keyword.Reserved),
-            # Built-in Functions
-            (r'({})(?=\s*\()'.format(r'|'.join(_FUNCTIONS + _DISTRIBUTIONS)),
-             Name.Builtin),
-            # Regular variable names
-            (r'[A-Za-z][\w.]*', Name),
-            # Number Literals
-            (r'[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?', Number),
-            # Punctuation
-            (r'\[|\]|\(|\)|:|,|;', Punctuation),
-            # Assignment operators
-            # SLexer makes these tokens Operators.
-            (r'<-|~', Operator),
-            # Infix and prefix operators
-            (r'\+|-|\*|/', Operator),
-            # Block
-            (r'[{}]', Punctuation),
-        ]
-    }
-
-    def analyse_text(text):
-        if re.search(r"^\s*model\s*{", text, re.M):
-            return 0.7
-        else:
-            return 0.0
-
-
-class JagsLexer(RegexLexer):
-    """
-    Pygments Lexer for JAGS.
-    """
-
-    name = 'JAGS'
-    aliases = ['jags']
-    filenames = ['*.jag', '*.bug']
-    url = 'https://mcmc-jags.sourceforge.io'
-    version_added = '1.6'
-
-    # JAGS
-    _FUNCTIONS = (
-        'abs', 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctanh',
-        'cos', 'cosh', 'cloglog',
-        'equals', 'exp', 'icloglog', 'ifelse', 'ilogit', 'log', 'logfact',
-        'loggam', 'logit', 'phi', 'pow', 'probit', 'round', 'sin', 'sinh',
-        'sqrt', 'step', 'tan', 'tanh', 'trunc', 'inprod', 'interp.lin',
-        'logdet', 'max', 'mean', 'min', 'prod', 'sum', 'sd', 'inverse',
-        'rank', 'sort', 't', 'acos', 'acosh', 'asin', 'asinh', 'atan',
-        # Truncation/Censoring (should I include)
-        'T', 'I')
-    # Distributions with density, probability and quartile functions
-    _DISTRIBUTIONS = tuple(f'[dpq]{x}' for x in
-                           ('bern', 'beta', 'dchiqsqr', 'ddexp', 'dexp',
-                            'df', 'gamma', 'gen.gamma', 'logis', 'lnorm',
-                            'negbin', 'nchisqr', 'norm', 'par', 'pois', 'weib'))
-    # Other distributions without density and probability
-    _OTHER_DISTRIBUTIONS = (
-        'dt', 'dunif', 'dbetabin', 'dbern', 'dbin', 'dcat', 'dhyper',
-        'ddirch', 'dmnorm', 'dwish', 'dmt', 'dmulti', 'dbinom', 'dchisq',
-        'dnbinom', 'dweibull', 'ddirich')
-
-    tokens = {
-        'whitespace': [
-            (r"\s+", Text),
-        ],
-        'names': [
-            # Regular variable names
-            (r'[a-zA-Z][\w.]*\b', Name),
-        ],
-        'comments': [
-            # do not use stateful comments
-            (r'(?s)/\*.*?\*/', Comment.Multiline),
-            # Comments
-            (r'#.*$', Comment.Single),
-        ],
-        'root': [
-            # Comments
-            include('comments'),
-            include('whitespace'),
-            # Block start
-            (r'(model|data)(\s+)(\{)',
-             bygroups(Keyword.Namespace, Text, Punctuation)),
-            (r'var(?![\w.])', Keyword.Declaration),
-            # Reserved Words
-            (r'(for|in)(?![\w.])', Keyword.Reserved),
-            # Builtins
-            # Need to use lookahead because . is a valid char
-            (r'({})(?=\s*\()'.format(r'|'.join(_FUNCTIONS
-                                          + _DISTRIBUTIONS
-                                          + _OTHER_DISTRIBUTIONS)),
-             Name.Builtin),
-            # Names
-            include('names'),
-            # Number Literals
-            (r'[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?', Number),
-            (r'\[|\]|\(|\)|:|,|;', Punctuation),
-            # Assignment operators
-            (r'<-|~', Operator),
-            # # JAGS includes many more than OpenBUGS
-            (r'\+|-|\*|\/|\|\|[&]{2}|[<>=]=?|\^|%.*?%', Operator),
-            (r'[{}]', Punctuation),
-        ]
-    }
-
-    def analyse_text(text):
-        if re.search(r'^\s*model\s*\{', text, re.M):
-            if re.search(r'^\s*data\s*\{', text, re.M):
-                return 0.9
-            elif re.search(r'^\s*var', text, re.M):
-                return 0.9
-            else:
-                return 0.3
-        else:
-            return 0
-
-
-class StanLexer(RegexLexer):
-    """Pygments Lexer for Stan models.
-
-    The Stan modeling language is specified in the *Stan Modeling Language
-    User's Guide and Reference Manual, v2.17.0*,
-    `pdf `__.
-    """
-
-    name = 'Stan'
-    aliases = ['stan']
-    filenames = ['*.stan']
-    url = 'https://mc-stan.org'
-    version_added = '1.6'
-
-    tokens = {
-        'whitespace': [
-            (r"\s+", Text),
-        ],
-        'comments': [
-            (r'(?s)/\*.*?\*/', Comment.Multiline),
-            # Comments
-            (r'(//|#).*$', Comment.Single),
-        ],
-        'root': [
-            (r'"[^"]*"', String),
-            # Comments
-            include('comments'),
-            # block start
-            include('whitespace'),
-            # Block start
-            (r'({})(\s*)(\{{)'.format(r'|'.join(('functions', 'data', r'transformed\s+?data',
-                        'parameters', r'transformed\s+parameters',
-                        'model', r'generated\s+quantities'))),
-             bygroups(Keyword.Namespace, Text, Punctuation)),
-            # target keyword
-            (r'target\s*\+=', Keyword),
-            # Reserved Words
-            (r'({})\b'.format(r'|'.join(_stan_builtins.KEYWORDS)), Keyword),
-            # Truncation
-            (r'T(?=\s*\[)', Keyword),
-            # Data types
-            (r'({})\b'.format(r'|'.join(_stan_builtins.TYPES)), Keyword.Type),
-             # < should be punctuation, but elsewhere I can't tell if it is in
-             # a range constraint
-            (r'(<)(\s*)(upper|lower|offset|multiplier)(\s*)(=)',
-             bygroups(Operator, Whitespace, Keyword, Whitespace, Punctuation)),
-            (r'(,)(\s*)(upper)(\s*)(=)',
-             bygroups(Punctuation, Whitespace, Keyword, Whitespace, Punctuation)),
-            # Punctuation
-            (r"[;,\[\]()]", Punctuation),
-            # Builtin
-            (r'({})(?=\s*\()'.format('|'.join(_stan_builtins.FUNCTIONS)), Name.Builtin),
-            (r'(~)(\s*)({})(?=\s*\()'.format('|'.join(_stan_builtins.DISTRIBUTIONS)),
-                bygroups(Operator, Whitespace, Name.Builtin)),
-            # Special names ending in __, like lp__
-            (r'[A-Za-z]\w*__\b', Name.Builtin.Pseudo),
-            (r'({})\b'.format(r'|'.join(_stan_builtins.RESERVED)), Keyword.Reserved),
-            # user-defined functions
-            (r'[A-Za-z]\w*(?=\s*\()]', Name.Function),
-            # Imaginary Literals
-            (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?i', Number.Float),
-            (r'\.[0-9]+([eE][+-]?[0-9]+)?i', Number.Float),
-            (r'[0-9]+i', Number.Float),
-            # Real Literals
-            (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?', Number.Float),
-            (r'\.[0-9]+([eE][+-]?[0-9]+)?', Number.Float),
-            # Integer Literals
-            (r'[0-9]+', Number.Integer),
-            # Regular variable names
-            (r'[A-Za-z]\w*\b', Name),
-            # Assignment operators
-            (r'<-|(?:\+|-|\.?/|\.?\*|=)?=|~', Operator),
-            # Infix, prefix and postfix operators (and = )
-            (r"\+|-|\.?\*|\.?/|\\|'|\.?\^|!=?|<=?|>=?|\|\||&&|%|\?|:|%/%|!", Operator),
-            # Block delimiters
-            (r'[{}]', Punctuation),
-            # Distribution |
-            (r'\|', Punctuation)
-        ]
-    }
-
-    def analyse_text(text):
-        if re.search(r'^\s*parameters\s*\{', text, re.M):
-            return 1.0
-        else:
-            return 0.0
diff --git a/voxvera/vendor/pygments/lexers/modula2.py b/voxvera/vendor/pygments/lexers/modula2.py
deleted file mode 100644
index 713f472..0000000
--- a/voxvera/vendor/pygments/lexers/modula2.py
+++ /dev/null
@@ -1,1579 +0,0 @@
-"""
-    pygments.lexers.modula2
-    ~~~~~~~~~~~~~~~~~~~~~~~
-
-    Multi-Dialect Lexer for Modula-2.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include
-from pygments.util import get_bool_opt, get_list_opt
-from pygments.token import Text, Comment, Operator, Keyword, Name, \
-    String, Number, Punctuation, Error
-
-__all__ = ['Modula2Lexer']
-
-
-# Multi-Dialect Modula-2 Lexer
-class Modula2Lexer(RegexLexer):
-    """
-    For Modula-2 source code.
-
-    The Modula-2 lexer supports several dialects.  By default, it operates in
-    fallback mode, recognising the *combined* literals, punctuation symbols
-    and operators of all supported dialects, and the *combined* reserved words
-    and builtins of PIM Modula-2, ISO Modula-2 and Modula-2 R10, while not
-    differentiating between library defined identifiers.
-
-    To select a specific dialect, a dialect option may be passed
-    or a dialect tag may be embedded into a source file.
-
-    Dialect Options:
-
-    `m2pim`
-        Select PIM Modula-2 dialect.
-    `m2iso`
-        Select ISO Modula-2 dialect.
-    `m2r10`
-        Select Modula-2 R10 dialect.
-    `objm2`
-        Select Objective Modula-2 dialect.
-
-    The PIM and ISO dialect options may be qualified with a language extension.
-
-    Language Extensions:
-
-    `+aglet`
-        Select Aglet Modula-2 extensions, available with m2iso.
-    `+gm2`
-        Select GNU Modula-2 extensions, available with m2pim.
-    `+p1`
-        Select p1 Modula-2 extensions, available with m2iso.
-    `+xds`
-        Select XDS Modula-2 extensions, available with m2iso.
-
-
-    Passing a Dialect Option via Unix Commandline Interface
-
-    Dialect options may be passed to the lexer using the `dialect` key.
-    Only one such option should be passed. If multiple dialect options are
-    passed, the first valid option is used, any subsequent options are ignored.
-
-    Examples:
-
-    `$ pygmentize -O full,dialect=m2iso -f html -o /path/to/output /path/to/input`
-        Use ISO dialect to render input to HTML output
-    `$ pygmentize -O full,dialect=m2iso+p1 -f rtf -o /path/to/output /path/to/input`
-        Use ISO dialect with p1 extensions to render input to RTF output
-
-
-    Embedding a Dialect Option within a source file
-
-    A dialect option may be embedded in a source file in form of a dialect
-    tag, a specially formatted comment that specifies a dialect option.
-
-    Dialect Tag EBNF::
-
-       dialectTag :
-           OpeningCommentDelim Prefix dialectOption ClosingCommentDelim ;
-
-       dialectOption :
-           'm2pim' | 'm2iso' | 'm2r10' | 'objm2' |
-           'm2iso+aglet' | 'm2pim+gm2' | 'm2iso+p1' | 'm2iso+xds' ;
-
-       Prefix : '!' ;
-
-       OpeningCommentDelim : '(*' ;
-
-       ClosingCommentDelim : '*)' ;
-
-    No whitespace is permitted between the tokens of a dialect tag.
-
-    In the event that a source file contains multiple dialect tags, the first
-    tag that contains a valid dialect option will be used and any subsequent
-    dialect tags will be ignored.  Ideally, a dialect tag should be placed
-    at the beginning of a source file.
-
-    An embedded dialect tag overrides a dialect option set via command line.
-
-    Examples:
-
-    ``(*!m2r10*) DEFINITION MODULE Foobar; ...``
-        Use Modula2 R10 dialect to render this source file.
-    ``(*!m2pim+gm2*) DEFINITION MODULE Bazbam; ...``
-        Use PIM dialect with GNU extensions to render this source file.
-
-
-    Algol Publication Mode:
-
-    In Algol publication mode, source text is rendered for publication of
-    algorithms in scientific papers and academic texts, following the format
-    of the Revised Algol-60 Language Report.  It is activated by passing
-    one of two corresponding styles as an option:
-
-    `algol`
-        render reserved words lowercase underline boldface
-        and builtins lowercase boldface italic
-    `algol_nu`
-        render reserved words lowercase boldface (no underlining)
-        and builtins lowercase boldface italic
-
-    The lexer automatically performs the required lowercase conversion when
-    this mode is activated.
-
-    Example:
-
-    ``$ pygmentize -O full,style=algol -f latex -o /path/to/output /path/to/input``
-        Render input file in Algol publication mode to LaTeX output.
-
-
-    Rendering Mode of First Class ADT Identifiers:
-
-    The rendering of standard library first class ADT identifiers is controlled
-    by option flag "treat_stdlib_adts_as_builtins".
-
-    When this option is turned on, standard library ADT identifiers are rendered
-    as builtins.  When it is turned off, they are rendered as ordinary library
-    identifiers.
-
-    `treat_stdlib_adts_as_builtins` (default: On)
-
-    The option is useful for dialects that support ADTs as first class objects
-    and provide ADTs in the standard library that would otherwise be built-in.
-
-    At present, only Modula-2 R10 supports library ADTs as first class objects
-    and therefore, no ADT identifiers are defined for any other dialects.
-
-    Example:
-
-    ``$ pygmentize -O full,dialect=m2r10,treat_stdlib_adts_as_builtins=Off ...``
-        Render standard library ADTs as ordinary library types.
-
-    .. versionchanged:: 2.1
-       Added multi-dialect support.
-    """
-    name = 'Modula-2'
-    url = 'http://www.modula2.org/'
-    aliases = ['modula2', 'm2']
-    filenames = ['*.def', '*.mod']
-    mimetypes = ['text/x-modula2']
-    version_added = '1.3'
-
-    flags = re.MULTILINE | re.DOTALL
-
-    tokens = {
-        'whitespace': [
-            (r'\n+', Text),  # blank lines
-            (r'\s+', Text),  # whitespace
-        ],
-        'dialecttags': [
-            # PIM Dialect Tag
-            (r'\(\*!m2pim\*\)', Comment.Special),
-            # ISO Dialect Tag
-            (r'\(\*!m2iso\*\)', Comment.Special),
-            # M2R10 Dialect Tag
-            (r'\(\*!m2r10\*\)', Comment.Special),
-            # ObjM2 Dialect Tag
-            (r'\(\*!objm2\*\)', Comment.Special),
-            # Aglet Extensions Dialect Tag
-            (r'\(\*!m2iso\+aglet\*\)', Comment.Special),
-            # GNU Extensions Dialect Tag
-            (r'\(\*!m2pim\+gm2\*\)', Comment.Special),
-            # p1 Extensions Dialect Tag
-            (r'\(\*!m2iso\+p1\*\)', Comment.Special),
-            # XDS Extensions Dialect Tag
-            (r'\(\*!m2iso\+xds\*\)', Comment.Special),
-        ],
-        'identifiers': [
-            (r'([a-zA-Z_$][\w$]*)', Name),
-        ],
-        'prefixed_number_literals': [
-            #
-            # Base-2, whole number
-            (r'0b[01]+(\'[01]+)*', Number.Bin),
-            #
-            # Base-16, whole number
-            (r'0[ux][0-9A-F]+(\'[0-9A-F]+)*', Number.Hex),
-        ],
-        'plain_number_literals': [
-            #
-            # Base-10, real number with exponent
-            (r'[0-9]+(\'[0-9]+)*'  # integral part
-             r'\.[0-9]+(\'[0-9]+)*'  # fractional part
-             r'[eE][+-]?[0-9]+(\'[0-9]+)*',  # exponent
-             Number.Float),
-            #
-            # Base-10, real number without exponent
-            (r'[0-9]+(\'[0-9]+)*'  # integral part
-             r'\.[0-9]+(\'[0-9]+)*',  # fractional part
-             Number.Float),
-            #
-            # Base-10, whole number
-            (r'[0-9]+(\'[0-9]+)*', Number.Integer),
-        ],
-        'suffixed_number_literals': [
-            #
-            # Base-8, whole number
-            (r'[0-7]+B', Number.Oct),
-            #
-            # Base-8, character code
-            (r'[0-7]+C', Number.Oct),
-            #
-            # Base-16, number
-            (r'[0-9A-F]+H', Number.Hex),
-        ],
-        'string_literals': [
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
-            (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
-        ],
-        'digraph_operators': [
-            # Dot Product Operator
-            (r'\*\.', Operator),
-            # Array Concatenation Operator
-            (r'\+>', Operator),  # M2R10 + ObjM2
-            # Inequality Operator
-            (r'<>', Operator),  # ISO + PIM
-            # Less-Or-Equal, Subset
-            (r'<=', Operator),
-            # Greater-Or-Equal, Superset
-            (r'>=', Operator),
-            # Identity Operator
-            (r'==', Operator),  # M2R10 + ObjM2
-            # Type Conversion Operator
-            (r'::', Operator),  # M2R10 + ObjM2
-            # Assignment Symbol
-            (r':=', Operator),
-            # Postfix Increment Mutator
-            (r'\+\+', Operator),  # M2R10 + ObjM2
-            # Postfix Decrement Mutator
-            (r'--', Operator),  # M2R10 + ObjM2
-        ],
-        'unigraph_operators': [
-            # Arithmetic Operators
-            (r'[+-]', Operator),
-            (r'[*/]', Operator),
-            # ISO 80000-2 compliant Set Difference Operator
-            (r'\\', Operator),  # M2R10 + ObjM2
-            # Relational Operators
-            (r'[=#<>]', Operator),
-            # Dereferencing Operator
-            (r'\^', Operator),
-            # Dereferencing Operator Synonym
-            (r'@', Operator),  # ISO
-            # Logical AND Operator Synonym
-            (r'&', Operator),  # PIM + ISO
-            # Logical NOT Operator Synonym
-            (r'~', Operator),  # PIM + ISO
-            # Smalltalk Message Prefix
-            (r'`', Operator),  # ObjM2
-        ],
-        'digraph_punctuation': [
-            # Range Constructor
-            (r'\.\.', Punctuation),
-            # Opening Chevron Bracket
-            (r'<<', Punctuation),  # M2R10 + ISO
-            # Closing Chevron Bracket
-            (r'>>', Punctuation),  # M2R10 + ISO
-            # Blueprint Punctuation
-            (r'->', Punctuation),  # M2R10 + ISO
-            # Distinguish |# and # in M2 R10
-            (r'\|#', Punctuation),
-            # Distinguish ## and # in M2 R10
-            (r'##', Punctuation),
-            # Distinguish |* and * in M2 R10
-            (r'\|\*', Punctuation),
-        ],
-        'unigraph_punctuation': [
-            # Common Punctuation
-            (r'[()\[\]{},.:;|]', Punctuation),
-            # Case Label Separator Synonym
-            (r'!', Punctuation),  # ISO
-            # Blueprint Punctuation
-            (r'\?', Punctuation),  # M2R10 + ObjM2
-        ],
-        'comments': [
-            # Single Line Comment
-            (r'^//.*?\n', Comment.Single),  # M2R10 + ObjM2
-            # Block Comment
-            (r'\(\*([^$].*?)\*\)', Comment.Multiline),
-            # Template Block Comment
-            (r'/\*(.*?)\*/', Comment.Multiline),  # M2R10 + ObjM2
-        ],
-        'pragmas': [
-            # ISO Style Pragmas
-            (r'<\*.*?\*>', Comment.Preproc),  # ISO, M2R10 + ObjM2
-            # Pascal Style Pragmas
-            (r'\(\*\$.*?\*\)', Comment.Preproc),  # PIM
-        ],
-        'root': [
-            include('whitespace'),
-            include('dialecttags'),
-            include('pragmas'),
-            include('comments'),
-            include('identifiers'),
-            include('suffixed_number_literals'),  # PIM + ISO
-            include('prefixed_number_literals'),  # M2R10 + ObjM2
-            include('plain_number_literals'),
-            include('string_literals'),
-            include('digraph_punctuation'),
-            include('digraph_operators'),
-            include('unigraph_punctuation'),
-            include('unigraph_operators'),
-        ]
-    }
-
-#  C o m m o n   D a t a s e t s
-
-    # Common Reserved Words Dataset
-    common_reserved_words = (
-        # 37 common reserved words
-        'AND', 'ARRAY', 'BEGIN', 'BY', 'CASE', 'CONST', 'DEFINITION', 'DIV',
-        'DO', 'ELSE', 'ELSIF', 'END', 'EXIT', 'FOR', 'FROM', 'IF',
-        'IMPLEMENTATION', 'IMPORT', 'IN', 'LOOP', 'MOD', 'MODULE', 'NOT',
-        'OF', 'OR', 'POINTER', 'PROCEDURE', 'RECORD', 'REPEAT', 'RETURN',
-        'SET', 'THEN', 'TO', 'TYPE', 'UNTIL', 'VAR', 'WHILE',
-    )
-
-    # Common Builtins Dataset
-    common_builtins = (
-        # 16 common builtins
-        'ABS', 'BOOLEAN', 'CARDINAL', 'CHAR', 'CHR', 'FALSE', 'INTEGER',
-        'LONGINT', 'LONGREAL', 'MAX', 'MIN', 'NIL', 'ODD', 'ORD', 'REAL',
-        'TRUE',
-    )
-
-    # Common Pseudo-Module Builtins Dataset
-    common_pseudo_builtins = (
-        # 4 common pseudo builtins
-        'ADDRESS', 'BYTE', 'WORD', 'ADR'
-    )
-
-#  P I M   M o d u l a - 2   D a t a s e t s
-
-    # Lexemes to Mark as Error Tokens for PIM Modula-2
-    pim_lexemes_to_reject = (
-        '!', '`', '@', '$', '%', '?', '\\', '==', '++', '--', '::', '*.',
-        '+>', '->', '<<', '>>', '|#', '##',
-    )
-
-    # PIM Modula-2 Additional Reserved Words Dataset
-    pim_additional_reserved_words = (
-        # 3 additional reserved words
-        'EXPORT', 'QUALIFIED', 'WITH',
-    )
-
-    # PIM Modula-2 Additional Builtins Dataset
-    pim_additional_builtins = (
-        # 16 additional builtins
-        'BITSET', 'CAP', 'DEC', 'DISPOSE', 'EXCL', 'FLOAT', 'HALT', 'HIGH',
-        'INC', 'INCL', 'NEW', 'NIL', 'PROC', 'SIZE', 'TRUNC', 'VAL',
-    )
-
-    # PIM Modula-2 Additional Pseudo-Module Builtins Dataset
-    pim_additional_pseudo_builtins = (
-        # 5 additional pseudo builtins
-        'SYSTEM', 'PROCESS', 'TSIZE', 'NEWPROCESS', 'TRANSFER',
-    )
-
-#  I S O   M o d u l a - 2   D a t a s e t s
-
-    # Lexemes to Mark as Error Tokens for ISO Modula-2
-    iso_lexemes_to_reject = (
-        '`', '$', '%', '?', '\\', '==', '++', '--', '::', '*.', '+>', '->',
-        '<<', '>>', '|#', '##',
-    )
-
-    # ISO Modula-2 Additional Reserved Words Dataset
-    iso_additional_reserved_words = (
-        # 9 additional reserved words (ISO 10514-1)
-        'EXCEPT', 'EXPORT', 'FINALLY', 'FORWARD', 'PACKEDSET', 'QUALIFIED',
-        'REM', 'RETRY', 'WITH',
-        # 10 additional reserved words (ISO 10514-2 & ISO 10514-3)
-        'ABSTRACT', 'AS', 'CLASS', 'GUARD', 'INHERIT', 'OVERRIDE', 'READONLY',
-        'REVEAL', 'TRACED', 'UNSAFEGUARDED',
-    )
-
-    # ISO Modula-2 Additional Builtins Dataset
-    iso_additional_builtins = (
-        # 26 additional builtins (ISO 10514-1)
-        'BITSET', 'CAP', 'CMPLX', 'COMPLEX', 'DEC', 'DISPOSE', 'EXCL', 'FLOAT',
-        'HALT', 'HIGH', 'IM', 'INC', 'INCL', 'INT', 'INTERRUPTIBLE',  'LENGTH',
-        'LFLOAT', 'LONGCOMPLEX', 'NEW', 'PROC', 'PROTECTION', 'RE', 'SIZE',
-        'TRUNC', 'UNINTERRUBTIBLE', 'VAL',
-        # 5 additional builtins (ISO 10514-2 & ISO 10514-3)
-        'CREATE', 'DESTROY', 'EMPTY', 'ISMEMBER', 'SELF',
-    )
-
-    # ISO Modula-2 Additional Pseudo-Module Builtins Dataset
-    iso_additional_pseudo_builtins = (
-        # 14 additional builtins (SYSTEM)
-        'SYSTEM', 'BITSPERLOC', 'LOCSPERBYTE', 'LOCSPERWORD', 'LOC',
-        'ADDADR', 'SUBADR', 'DIFADR', 'MAKEADR', 'ADR',
-        'ROTATE', 'SHIFT', 'CAST', 'TSIZE',
-        # 13 additional builtins (COROUTINES)
-        'COROUTINES', 'ATTACH', 'COROUTINE', 'CURRENT', 'DETACH', 'HANDLER',
-        'INTERRUPTSOURCE', 'IOTRANSFER', 'IsATTACHED', 'LISTEN',
-        'NEWCOROUTINE', 'PROT', 'TRANSFER',
-        # 9 additional builtins (EXCEPTIONS)
-        'EXCEPTIONS', 'AllocateSource', 'CurrentNumber', 'ExceptionNumber',
-        'ExceptionSource', 'GetMessage', 'IsCurrentSource',
-        'IsExceptionalExecution', 'RAISE',
-        # 3 additional builtins (TERMINATION)
-        'TERMINATION', 'IsTerminating', 'HasHalted',
-        # 4 additional builtins (M2EXCEPTION)
-        'M2EXCEPTION', 'M2Exceptions', 'M2Exception', 'IsM2Exception',
-        'indexException', 'rangeException', 'caseSelectException',
-        'invalidLocation', 'functionException', 'wholeValueException',
-        'wholeDivException', 'realValueException', 'realDivException',
-        'complexValueException', 'complexDivException', 'protException',
-        'sysException', 'coException', 'exException',
-    )
-
-#  M o d u l a - 2   R 1 0   D a t a s e t s
-
-    # Lexemes to Mark as Error Tokens for Modula-2 R10
-    m2r10_lexemes_to_reject = (
-        '!', '`', '@', '$', '%', '&', '<>',
-    )
-
-    # Modula-2 R10 reserved words in addition to the common set
-    m2r10_additional_reserved_words = (
-        # 12 additional reserved words
-        'ALIAS', 'ARGLIST', 'BLUEPRINT', 'COPY', 'GENLIB', 'INDETERMINATE',
-        'NEW', 'NONE', 'OPAQUE', 'REFERENTIAL', 'RELEASE', 'RETAIN',
-        # 2 additional reserved words with symbolic assembly option
-        'ASM', 'REG',
-    )
-
-    # Modula-2 R10 builtins in addition to the common set
-    m2r10_additional_builtins = (
-        # 26 additional builtins
-        'CARDINAL', 'COUNT', 'EMPTY', 'EXISTS', 'INSERT', 'LENGTH', 'LONGCARD',
-        'OCTET', 'PTR', 'PRED', 'READ', 'READNEW', 'REMOVE', 'RETRIEVE', 'SORT',
-        'STORE', 'SUBSET', 'SUCC', 'TLIMIT', 'TMAX', 'TMIN', 'TRUE', 'TSIZE',
-        'UNICHAR', 'WRITE', 'WRITEF',
-    )
-
-    # Modula-2 R10 Additional Pseudo-Module Builtins Dataset
-    m2r10_additional_pseudo_builtins = (
-        # 13 additional builtins (TPROPERTIES)
-        'TPROPERTIES', 'PROPERTY', 'LITERAL', 'TPROPERTY', 'TLITERAL',
-        'TBUILTIN', 'TDYN', 'TREFC', 'TNIL', 'TBASE', 'TPRECISION',
-        'TMAXEXP', 'TMINEXP',
-        # 4 additional builtins (CONVERSION)
-        'CONVERSION', 'TSXFSIZE', 'SXF', 'VAL',
-        # 35 additional builtins (UNSAFE)
-        'UNSAFE', 'CAST', 'INTRINSIC', 'AVAIL', 'ADD', 'SUB', 'ADDC', 'SUBC',
-        'FETCHADD', 'FETCHSUB', 'SHL', 'SHR', 'ASHR', 'ROTL', 'ROTR', 'ROTLC',
-        'ROTRC', 'BWNOT', 'BWAND', 'BWOR', 'BWXOR', 'BWNAND', 'BWNOR',
-        'SETBIT', 'TESTBIT', 'LSBIT', 'MSBIT', 'CSBITS', 'BAIL', 'HALT',
-        'TODO', 'FFI', 'ADDR', 'VARGLIST', 'VARGC',
-        # 11 additional builtins (ATOMIC)
-        'ATOMIC', 'INTRINSIC', 'AVAIL', 'SWAP', 'CAS', 'INC', 'DEC', 'BWAND',
-        'BWNAND', 'BWOR', 'BWXOR',
-        # 7 additional builtins (COMPILER)
-        'COMPILER', 'DEBUG', 'MODNAME', 'PROCNAME', 'LINENUM', 'DEFAULT',
-        'HASH',
-        # 5 additional builtins (ASSEMBLER)
-        'ASSEMBLER', 'REGISTER', 'SETREG', 'GETREG', 'CODE',
-    )
-
-#  O b j e c t i v e   M o d u l a - 2   D a t a s e t s
-
-    # Lexemes to Mark as Error Tokens for Objective Modula-2
-    objm2_lexemes_to_reject = (
-        '!', '$', '%', '&', '<>',
-    )
-
-    # Objective Modula-2 Extensions
-    # reserved words in addition to Modula-2 R10
-    objm2_additional_reserved_words = (
-        # 16 additional reserved words
-        'BYCOPY', 'BYREF', 'CLASS', 'CONTINUE', 'CRITICAL', 'INOUT', 'METHOD',
-        'ON', 'OPTIONAL', 'OUT', 'PRIVATE', 'PROTECTED', 'PROTOCOL', 'PUBLIC',
-        'SUPER', 'TRY',
-    )
-
-    # Objective Modula-2 Extensions
-    # builtins in addition to Modula-2 R10
-    objm2_additional_builtins = (
-        # 3 additional builtins
-        'OBJECT', 'NO', 'YES',
-    )
-
-    # Objective Modula-2 Extensions
-    # pseudo-module builtins in addition to Modula-2 R10
-    objm2_additional_pseudo_builtins = (
-        # None
-    )
-
-#  A g l e t   M o d u l a - 2   D a t a s e t s
-
-    # Aglet Extensions
-    # reserved words in addition to ISO Modula-2
-    aglet_additional_reserved_words = (
-        # None
-    )
-
-    # Aglet Extensions
-    # builtins in addition to ISO Modula-2
-    aglet_additional_builtins = (
-        # 9 additional builtins
-        'BITSET8', 'BITSET16', 'BITSET32', 'CARDINAL8', 'CARDINAL16',
-        'CARDINAL32', 'INTEGER8', 'INTEGER16', 'INTEGER32',
-    )
-
-    # Aglet Modula-2 Extensions
-    # pseudo-module builtins in addition to ISO Modula-2
-    aglet_additional_pseudo_builtins = (
-        # None
-    )
-
-#  G N U   M o d u l a - 2   D a t a s e t s
-
-    # GNU Extensions
-    # reserved words in addition to PIM Modula-2
-    gm2_additional_reserved_words = (
-        # 10 additional reserved words
-        'ASM', '__ATTRIBUTE__', '__BUILTIN__', '__COLUMN__', '__DATE__',
-        '__FILE__', '__FUNCTION__', '__LINE__', '__MODULE__', 'VOLATILE',
-    )
-
-    # GNU Extensions
-    # builtins in addition to PIM Modula-2
-    gm2_additional_builtins = (
-        # 21 additional builtins
-        'BITSET8', 'BITSET16', 'BITSET32', 'CARDINAL8', 'CARDINAL16',
-        'CARDINAL32', 'CARDINAL64', 'COMPLEX32', 'COMPLEX64', 'COMPLEX96',
-        'COMPLEX128', 'INTEGER8', 'INTEGER16', 'INTEGER32', 'INTEGER64',
-        'REAL8', 'REAL16', 'REAL32', 'REAL96', 'REAL128', 'THROW',
-    )
-
-    # GNU Extensions
-    # pseudo-module builtins in addition to PIM Modula-2
-    gm2_additional_pseudo_builtins = (
-        # None
-    )
-
-#  p 1   M o d u l a - 2   D a t a s e t s
-
-    # p1 Extensions
-    # reserved words in addition to ISO Modula-2
-    p1_additional_reserved_words = (
-        # None
-    )
-
-    # p1 Extensions
-    # builtins in addition to ISO Modula-2
-    p1_additional_builtins = (
-        # None
-    )
-
-    # p1 Modula-2 Extensions
-    # pseudo-module builtins in addition to ISO Modula-2
-    p1_additional_pseudo_builtins = (
-        # 1 additional builtin
-        'BCD',
-    )
-
-#  X D S   M o d u l a - 2   D a t a s e t s
-
-    # XDS Extensions
-    # reserved words in addition to ISO Modula-2
-    xds_additional_reserved_words = (
-        # 1 additional reserved word
-        'SEQ',
-    )
-
-    # XDS Extensions
-    # builtins in addition to ISO Modula-2
-    xds_additional_builtins = (
-        # 9 additional builtins
-        'ASH', 'ASSERT', 'DIFFADR_TYPE', 'ENTIER', 'INDEX', 'LEN',
-        'LONGCARD', 'SHORTCARD', 'SHORTINT',
-    )
-
-    # XDS Modula-2 Extensions
-    # pseudo-module builtins in addition to ISO Modula-2
-    xds_additional_pseudo_builtins = (
-        # 22 additional builtins (SYSTEM)
-        'PROCESS', 'NEWPROCESS', 'BOOL8', 'BOOL16', 'BOOL32', 'CARD8',
-        'CARD16', 'CARD32', 'INT8', 'INT16', 'INT32', 'REF', 'MOVE',
-        'FILL', 'GET', 'PUT', 'CC', 'int', 'unsigned', 'size_t', 'void'
-        # 3 additional builtins (COMPILER)
-        'COMPILER', 'OPTION', 'EQUATION'
-    )
-
-#  P I M   S t a n d a r d   L i b r a r y   D a t a s e t s
-
-    # PIM Modula-2 Standard Library Modules Dataset
-    pim_stdlib_module_identifiers = (
-        'Terminal', 'FileSystem', 'InOut', 'RealInOut', 'MathLib0', 'Storage',
-    )
-
-    # PIM Modula-2 Standard Library Types Dataset
-    pim_stdlib_type_identifiers = (
-        'Flag', 'FlagSet', 'Response', 'Command', 'Lock', 'Permission',
-        'MediumType', 'File', 'FileProc', 'DirectoryProc', 'FileCommand',
-        'DirectoryCommand',
-    )
-
-    # PIM Modula-2 Standard Library Procedures Dataset
-    pim_stdlib_proc_identifiers = (
-        'Read', 'BusyRead', 'ReadAgain', 'Write', 'WriteString', 'WriteLn',
-        'Create', 'Lookup', 'Close', 'Delete', 'Rename', 'SetRead', 'SetWrite',
-        'SetModify', 'SetOpen', 'Doio', 'SetPos', 'GetPos', 'Length', 'Reset',
-        'Again', 'ReadWord', 'WriteWord', 'ReadChar', 'WriteChar',
-        'CreateMedium', 'DeleteMedium', 'AssignName', 'DeassignName',
-        'ReadMedium', 'LookupMedium', 'OpenInput', 'OpenOutput', 'CloseInput',
-        'CloseOutput', 'ReadString', 'ReadInt', 'ReadCard', 'ReadWrd',
-        'WriteInt', 'WriteCard', 'WriteOct', 'WriteHex', 'WriteWrd',
-        'ReadReal', 'WriteReal', 'WriteFixPt', 'WriteRealOct', 'sqrt', 'exp',
-        'ln', 'sin', 'cos', 'arctan', 'entier', 'ALLOCATE', 'DEALLOCATE',
-    )
-
-    # PIM Modula-2 Standard Library Variables Dataset
-    pim_stdlib_var_identifiers = (
-        'Done', 'termCH', 'in', 'out'
-    )
-
-    # PIM Modula-2 Standard Library Constants Dataset
-    pim_stdlib_const_identifiers = (
-        'EOL',
-    )
-
-#  I S O   S t a n d a r d   L i b r a r y   D a t a s e t s
-
-    # ISO Modula-2 Standard Library Modules Dataset
-    iso_stdlib_module_identifiers = (
-        # TO DO
-    )
-
-    # ISO Modula-2 Standard Library Types Dataset
-    iso_stdlib_type_identifiers = (
-        # TO DO
-    )
-
-    # ISO Modula-2 Standard Library Procedures Dataset
-    iso_stdlib_proc_identifiers = (
-        # TO DO
-    )
-
-    # ISO Modula-2 Standard Library Variables Dataset
-    iso_stdlib_var_identifiers = (
-        # TO DO
-    )
-
-    # ISO Modula-2 Standard Library Constants Dataset
-    iso_stdlib_const_identifiers = (
-        # TO DO
-    )
-
-#  M 2   R 1 0   S t a n d a r d   L i b r a r y   D a t a s e t s
-
-    # Modula-2 R10 Standard Library ADTs Dataset
-    m2r10_stdlib_adt_identifiers = (
-        'BCD', 'LONGBCD', 'BITSET', 'SHORTBITSET', 'LONGBITSET',
-        'LONGLONGBITSET', 'COMPLEX', 'LONGCOMPLEX', 'SHORTCARD', 'LONGLONGCARD',
-        'SHORTINT', 'LONGLONGINT', 'POSINT', 'SHORTPOSINT', 'LONGPOSINT',
-        'LONGLONGPOSINT', 'BITSET8', 'BITSET16', 'BITSET32', 'BITSET64',
-        'BITSET128', 'BS8', 'BS16', 'BS32', 'BS64', 'BS128', 'CARDINAL8',
-        'CARDINAL16', 'CARDINAL32', 'CARDINAL64', 'CARDINAL128', 'CARD8',
-        'CARD16', 'CARD32', 'CARD64', 'CARD128', 'INTEGER8', 'INTEGER16',
-        'INTEGER32', 'INTEGER64', 'INTEGER128', 'INT8', 'INT16', 'INT32',
-        'INT64', 'INT128', 'STRING', 'UNISTRING',
-    )
-
-    # Modula-2 R10 Standard Library Blueprints Dataset
-    m2r10_stdlib_blueprint_identifiers = (
-        'ProtoRoot', 'ProtoComputational', 'ProtoNumeric', 'ProtoScalar',
-        'ProtoNonScalar', 'ProtoCardinal', 'ProtoInteger', 'ProtoReal',
-        'ProtoComplex', 'ProtoVector', 'ProtoTuple', 'ProtoCompArray',
-        'ProtoCollection', 'ProtoStaticArray', 'ProtoStaticSet',
-        'ProtoStaticString', 'ProtoArray', 'ProtoString', 'ProtoSet',
-        'ProtoMultiSet', 'ProtoDictionary', 'ProtoMultiDict', 'ProtoExtension',
-        'ProtoIO', 'ProtoCardMath', 'ProtoIntMath', 'ProtoRealMath',
-    )
-
-    # Modula-2 R10 Standard Library Modules Dataset
-    m2r10_stdlib_module_identifiers = (
-        'ASCII', 'BooleanIO', 'CharIO', 'UnicharIO', 'OctetIO',
-        'CardinalIO', 'LongCardIO', 'IntegerIO', 'LongIntIO', 'RealIO',
-        'LongRealIO', 'BCDIO', 'LongBCDIO', 'CardMath', 'LongCardMath',
-        'IntMath', 'LongIntMath', 'RealMath', 'LongRealMath', 'BCDMath',
-        'LongBCDMath', 'FileIO', 'FileSystem', 'Storage', 'IOSupport',
-    )
-
-    # Modula-2 R10 Standard Library Types Dataset
-    m2r10_stdlib_type_identifiers = (
-        'File', 'Status',
-        # TO BE COMPLETED
-    )
-
-    # Modula-2 R10 Standard Library Procedures Dataset
-    m2r10_stdlib_proc_identifiers = (
-        'ALLOCATE', 'DEALLOCATE', 'SIZE',
-        # TO BE COMPLETED
-    )
-
-    # Modula-2 R10 Standard Library Variables Dataset
-    m2r10_stdlib_var_identifiers = (
-        'stdIn', 'stdOut', 'stdErr',
-    )
-
-    # Modula-2 R10 Standard Library Constants Dataset
-    m2r10_stdlib_const_identifiers = (
-        'pi', 'tau',
-    )
-
-#  D i a l e c t s
-
-    # Dialect modes
-    dialects = (
-        'unknown',
-        'm2pim', 'm2iso', 'm2r10', 'objm2',
-        'm2iso+aglet', 'm2pim+gm2', 'm2iso+p1', 'm2iso+xds',
-    )
-
-#   D a t a b a s e s
-
-    # Lexemes to Mark as Errors Database
-    lexemes_to_reject_db = {
-        # Lexemes to reject for unknown dialect
-        'unknown': (
-            # LEAVE THIS EMPTY
-        ),
-        # Lexemes to reject for PIM Modula-2
-        'm2pim': (
-            pim_lexemes_to_reject,
-        ),
-        # Lexemes to reject for ISO Modula-2
-        'm2iso': (
-            iso_lexemes_to_reject,
-        ),
-        # Lexemes to reject for Modula-2 R10
-        'm2r10': (
-            m2r10_lexemes_to_reject,
-        ),
-        # Lexemes to reject for Objective Modula-2
-        'objm2': (
-            objm2_lexemes_to_reject,
-        ),
-        # Lexemes to reject for Aglet Modula-2
-        'm2iso+aglet': (
-            iso_lexemes_to_reject,
-        ),
-        # Lexemes to reject for GNU Modula-2
-        'm2pim+gm2': (
-            pim_lexemes_to_reject,
-        ),
-        # Lexemes to reject for p1 Modula-2
-        'm2iso+p1': (
-            iso_lexemes_to_reject,
-        ),
-        # Lexemes to reject for XDS Modula-2
-        'm2iso+xds': (
-            iso_lexemes_to_reject,
-        ),
-    }
-
-    # Reserved Words Database
-    reserved_words_db = {
-        # Reserved words for unknown dialect
-        'unknown': (
-            common_reserved_words,
-            pim_additional_reserved_words,
-            iso_additional_reserved_words,
-            m2r10_additional_reserved_words,
-        ),
-
-        # Reserved words for PIM Modula-2
-        'm2pim': (
-            common_reserved_words,
-            pim_additional_reserved_words,
-        ),
-
-        # Reserved words for Modula-2 R10
-        'm2iso': (
-            common_reserved_words,
-            iso_additional_reserved_words,
-        ),
-
-        # Reserved words for ISO Modula-2
-        'm2r10': (
-            common_reserved_words,
-            m2r10_additional_reserved_words,
-        ),
-
-        # Reserved words for Objective Modula-2
-        'objm2': (
-            common_reserved_words,
-            m2r10_additional_reserved_words,
-            objm2_additional_reserved_words,
-        ),
-
-        # Reserved words for Aglet Modula-2 Extensions
-        'm2iso+aglet': (
-            common_reserved_words,
-            iso_additional_reserved_words,
-            aglet_additional_reserved_words,
-        ),
-
-        # Reserved words for GNU Modula-2 Extensions
-        'm2pim+gm2': (
-            common_reserved_words,
-            pim_additional_reserved_words,
-            gm2_additional_reserved_words,
-        ),
-
-        # Reserved words for p1 Modula-2 Extensions
-        'm2iso+p1': (
-            common_reserved_words,
-            iso_additional_reserved_words,
-            p1_additional_reserved_words,
-        ),
-
-        # Reserved words for XDS Modula-2 Extensions
-        'm2iso+xds': (
-            common_reserved_words,
-            iso_additional_reserved_words,
-            xds_additional_reserved_words,
-        ),
-    }
-
-    # Builtins Database
-    builtins_db = {
-        # Builtins for unknown dialect
-        'unknown': (
-            common_builtins,
-            pim_additional_builtins,
-            iso_additional_builtins,
-            m2r10_additional_builtins,
-        ),
-
-        # Builtins for PIM Modula-2
-        'm2pim': (
-            common_builtins,
-            pim_additional_builtins,
-        ),
-
-        # Builtins for ISO Modula-2
-        'm2iso': (
-            common_builtins,
-            iso_additional_builtins,
-        ),
-
-        # Builtins for ISO Modula-2
-        'm2r10': (
-            common_builtins,
-            m2r10_additional_builtins,
-        ),
-
-        # Builtins for Objective Modula-2
-        'objm2': (
-            common_builtins,
-            m2r10_additional_builtins,
-            objm2_additional_builtins,
-        ),
-
-        # Builtins for Aglet Modula-2 Extensions
-        'm2iso+aglet': (
-            common_builtins,
-            iso_additional_builtins,
-            aglet_additional_builtins,
-        ),
-
-        # Builtins for GNU Modula-2 Extensions
-        'm2pim+gm2': (
-            common_builtins,
-            pim_additional_builtins,
-            gm2_additional_builtins,
-        ),
-
-        # Builtins for p1 Modula-2 Extensions
-        'm2iso+p1': (
-            common_builtins,
-            iso_additional_builtins,
-            p1_additional_builtins,
-        ),
-
-        # Builtins for XDS Modula-2 Extensions
-        'm2iso+xds': (
-            common_builtins,
-            iso_additional_builtins,
-            xds_additional_builtins,
-        ),
-    }
-
-    # Pseudo-Module Builtins Database
-    pseudo_builtins_db = {
-        # Builtins for unknown dialect
-        'unknown': (
-            common_pseudo_builtins,
-            pim_additional_pseudo_builtins,
-            iso_additional_pseudo_builtins,
-            m2r10_additional_pseudo_builtins,
-        ),
-
-        # Builtins for PIM Modula-2
-        'm2pim': (
-            common_pseudo_builtins,
-            pim_additional_pseudo_builtins,
-        ),
-
-        # Builtins for ISO Modula-2
-        'm2iso': (
-            common_pseudo_builtins,
-            iso_additional_pseudo_builtins,
-        ),
-
-        # Builtins for ISO Modula-2
-        'm2r10': (
-            common_pseudo_builtins,
-            m2r10_additional_pseudo_builtins,
-        ),
-
-        # Builtins for Objective Modula-2
-        'objm2': (
-            common_pseudo_builtins,
-            m2r10_additional_pseudo_builtins,
-            objm2_additional_pseudo_builtins,
-        ),
-
-        # Builtins for Aglet Modula-2 Extensions
-        'm2iso+aglet': (
-            common_pseudo_builtins,
-            iso_additional_pseudo_builtins,
-            aglet_additional_pseudo_builtins,
-        ),
-
-        # Builtins for GNU Modula-2 Extensions
-        'm2pim+gm2': (
-            common_pseudo_builtins,
-            pim_additional_pseudo_builtins,
-            gm2_additional_pseudo_builtins,
-        ),
-
-        # Builtins for p1 Modula-2 Extensions
-        'm2iso+p1': (
-            common_pseudo_builtins,
-            iso_additional_pseudo_builtins,
-            p1_additional_pseudo_builtins,
-        ),
-
-        # Builtins for XDS Modula-2 Extensions
-        'm2iso+xds': (
-            common_pseudo_builtins,
-            iso_additional_pseudo_builtins,
-            xds_additional_pseudo_builtins,
-        ),
-    }
-
-    # Standard Library ADTs Database
-    stdlib_adts_db = {
-        # Empty entry for unknown dialect
-        'unknown': (
-            # LEAVE THIS EMPTY
-        ),
-        # Standard Library ADTs for PIM Modula-2
-        'm2pim': (
-            # No first class library types
-        ),
-
-        # Standard Library ADTs for ISO Modula-2
-        'm2iso': (
-            # No first class library types
-        ),
-
-        # Standard Library ADTs for Modula-2 R10
-        'm2r10': (
-            m2r10_stdlib_adt_identifiers,
-        ),
-
-        # Standard Library ADTs for Objective Modula-2
-        'objm2': (
-            m2r10_stdlib_adt_identifiers,
-        ),
-
-        # Standard Library ADTs for Aglet Modula-2
-        'm2iso+aglet': (
-            # No first class library types
-        ),
-
-        # Standard Library ADTs for GNU Modula-2
-        'm2pim+gm2': (
-            # No first class library types
-        ),
-
-        # Standard Library ADTs for p1 Modula-2
-        'm2iso+p1': (
-            # No first class library types
-        ),
-
-        # Standard Library ADTs for XDS Modula-2
-        'm2iso+xds': (
-            # No first class library types
-        ),
-    }
-
-    # Standard Library Modules Database
-    stdlib_modules_db = {
-        # Empty entry for unknown dialect
-        'unknown': (
-            # LEAVE THIS EMPTY
-        ),
-        # Standard Library Modules for PIM Modula-2
-        'm2pim': (
-            pim_stdlib_module_identifiers,
-        ),
-
-        # Standard Library Modules for ISO Modula-2
-        'm2iso': (
-            iso_stdlib_module_identifiers,
-        ),
-
-        # Standard Library Modules for Modula-2 R10
-        'm2r10': (
-            m2r10_stdlib_blueprint_identifiers,
-            m2r10_stdlib_module_identifiers,
-            m2r10_stdlib_adt_identifiers,
-        ),
-
-        # Standard Library Modules for Objective Modula-2
-        'objm2': (
-            m2r10_stdlib_blueprint_identifiers,
-            m2r10_stdlib_module_identifiers,
-        ),
-
-        # Standard Library Modules for Aglet Modula-2
-        'm2iso+aglet': (
-            iso_stdlib_module_identifiers,
-        ),
-
-        # Standard Library Modules for GNU Modula-2
-        'm2pim+gm2': (
-            pim_stdlib_module_identifiers,
-        ),
-
-        # Standard Library Modules for p1 Modula-2
-        'm2iso+p1': (
-            iso_stdlib_module_identifiers,
-        ),
-
-        # Standard Library Modules for XDS Modula-2
-        'm2iso+xds': (
-            iso_stdlib_module_identifiers,
-        ),
-    }
-
-    # Standard Library Types Database
-    stdlib_types_db = {
-        # Empty entry for unknown dialect
-        'unknown': (
-            # LEAVE THIS EMPTY
-        ),
-        # Standard Library Types for PIM Modula-2
-        'm2pim': (
-            pim_stdlib_type_identifiers,
-        ),
-
-        # Standard Library Types for ISO Modula-2
-        'm2iso': (
-            iso_stdlib_type_identifiers,
-        ),
-
-        # Standard Library Types for Modula-2 R10
-        'm2r10': (
-            m2r10_stdlib_type_identifiers,
-        ),
-
-        # Standard Library Types for Objective Modula-2
-        'objm2': (
-            m2r10_stdlib_type_identifiers,
-        ),
-
-        # Standard Library Types for Aglet Modula-2
-        'm2iso+aglet': (
-            iso_stdlib_type_identifiers,
-        ),
-
-        # Standard Library Types for GNU Modula-2
-        'm2pim+gm2': (
-            pim_stdlib_type_identifiers,
-        ),
-
-        # Standard Library Types for p1 Modula-2
-        'm2iso+p1': (
-            iso_stdlib_type_identifiers,
-        ),
-
-        # Standard Library Types for XDS Modula-2
-        'm2iso+xds': (
-            iso_stdlib_type_identifiers,
-        ),
-    }
-
-    # Standard Library Procedures Database
-    stdlib_procedures_db = {
-        # Empty entry for unknown dialect
-        'unknown': (
-            # LEAVE THIS EMPTY
-        ),
-        # Standard Library Procedures for PIM Modula-2
-        'm2pim': (
-            pim_stdlib_proc_identifiers,
-        ),
-
-        # Standard Library Procedures for ISO Modula-2
-        'm2iso': (
-            iso_stdlib_proc_identifiers,
-        ),
-
-        # Standard Library Procedures for Modula-2 R10
-        'm2r10': (
-            m2r10_stdlib_proc_identifiers,
-        ),
-
-        # Standard Library Procedures for Objective Modula-2
-        'objm2': (
-            m2r10_stdlib_proc_identifiers,
-        ),
-
-        # Standard Library Procedures for Aglet Modula-2
-        'm2iso+aglet': (
-            iso_stdlib_proc_identifiers,
-        ),
-
-        # Standard Library Procedures for GNU Modula-2
-        'm2pim+gm2': (
-            pim_stdlib_proc_identifiers,
-        ),
-
-        # Standard Library Procedures for p1 Modula-2
-        'm2iso+p1': (
-            iso_stdlib_proc_identifiers,
-        ),
-
-        # Standard Library Procedures for XDS Modula-2
-        'm2iso+xds': (
-            iso_stdlib_proc_identifiers,
-        ),
-    }
-
-    # Standard Library Variables Database
-    stdlib_variables_db = {
-        # Empty entry for unknown dialect
-        'unknown': (
-            # LEAVE THIS EMPTY
-        ),
-        # Standard Library Variables for PIM Modula-2
-        'm2pim': (
-            pim_stdlib_var_identifiers,
-        ),
-
-        # Standard Library Variables for ISO Modula-2
-        'm2iso': (
-            iso_stdlib_var_identifiers,
-        ),
-
-        # Standard Library Variables for Modula-2 R10
-        'm2r10': (
-            m2r10_stdlib_var_identifiers,
-        ),
-
-        # Standard Library Variables for Objective Modula-2
-        'objm2': (
-            m2r10_stdlib_var_identifiers,
-        ),
-
-        # Standard Library Variables for Aglet Modula-2
-        'm2iso+aglet': (
-            iso_stdlib_var_identifiers,
-        ),
-
-        # Standard Library Variables for GNU Modula-2
-        'm2pim+gm2': (
-            pim_stdlib_var_identifiers,
-        ),
-
-        # Standard Library Variables for p1 Modula-2
-        'm2iso+p1': (
-            iso_stdlib_var_identifiers,
-        ),
-
-        # Standard Library Variables for XDS Modula-2
-        'm2iso+xds': (
-            iso_stdlib_var_identifiers,
-        ),
-    }
-
-    # Standard Library Constants Database
-    stdlib_constants_db = {
-        # Empty entry for unknown dialect
-        'unknown': (
-            # LEAVE THIS EMPTY
-        ),
-        # Standard Library Constants for PIM Modula-2
-        'm2pim': (
-            pim_stdlib_const_identifiers,
-        ),
-
-        # Standard Library Constants for ISO Modula-2
-        'm2iso': (
-            iso_stdlib_const_identifiers,
-        ),
-
-        # Standard Library Constants for Modula-2 R10
-        'm2r10': (
-            m2r10_stdlib_const_identifiers,
-        ),
-
-        # Standard Library Constants for Objective Modula-2
-        'objm2': (
-            m2r10_stdlib_const_identifiers,
-        ),
-
-        # Standard Library Constants for Aglet Modula-2
-        'm2iso+aglet': (
-            iso_stdlib_const_identifiers,
-        ),
-
-        # Standard Library Constants for GNU Modula-2
-        'm2pim+gm2': (
-            pim_stdlib_const_identifiers,
-        ),
-
-        # Standard Library Constants for p1 Modula-2
-        'm2iso+p1': (
-            iso_stdlib_const_identifiers,
-        ),
-
-        # Standard Library Constants for XDS Modula-2
-        'm2iso+xds': (
-            iso_stdlib_const_identifiers,
-        ),
-    }
-
-#   M e t h o d s
-
-    # initialise a lexer instance
-    def __init__(self, **options):
-        #
-        # check dialect options
-        #
-        dialects = get_list_opt(options, 'dialect', [])
-        #
-        for dialect_option in dialects:
-            if dialect_option in self.dialects[1:-1]:
-                # valid dialect option found
-                self.set_dialect(dialect_option)
-                break
-        #
-        # Fallback Mode (DEFAULT)
-        else:
-            # no valid dialect option
-            self.set_dialect('unknown')
-        #
-        self.dialect_set_by_tag = False
-        #
-        # check style options
-        #
-        styles = get_list_opt(options, 'style', [])
-        #
-        # use lowercase mode for Algol style
-        if 'algol' in styles or 'algol_nu' in styles:
-            self.algol_publication_mode = True
-        else:
-            self.algol_publication_mode = False
-        #
-        # Check option flags
-        #
-        self.treat_stdlib_adts_as_builtins = get_bool_opt(
-            options, 'treat_stdlib_adts_as_builtins', True)
-        #
-        # call superclass initialiser
-        RegexLexer.__init__(self, **options)
-
-    # Set lexer to a specified dialect
-    def set_dialect(self, dialect_id):
-        #
-        # if __debug__:
-        #    print 'entered set_dialect with arg: ', dialect_id
-        #
-        # check dialect name against known dialects
-        if dialect_id not in self.dialects:
-            dialect = 'unknown'  # default
-        else:
-            dialect = dialect_id
-        #
-        # compose lexemes to reject set
-        lexemes_to_reject_set = set()
-        # add each list of reject lexemes for this dialect
-        for list in self.lexemes_to_reject_db[dialect]:
-            lexemes_to_reject_set.update(set(list))
-        #
-        # compose reserved words set
-        reswords_set = set()
-        # add each list of reserved words for this dialect
-        for list in self.reserved_words_db[dialect]:
-            reswords_set.update(set(list))
-        #
-        # compose builtins set
-        builtins_set = set()
-        # add each list of builtins for this dialect excluding reserved words
-        for list in self.builtins_db[dialect]:
-            builtins_set.update(set(list).difference(reswords_set))
-        #
-        # compose pseudo-builtins set
-        pseudo_builtins_set = set()
-        # add each list of builtins for this dialect excluding reserved words
-        for list in self.pseudo_builtins_db[dialect]:
-            pseudo_builtins_set.update(set(list).difference(reswords_set))
-        #
-        # compose ADTs set
-        adts_set = set()
-        # add each list of ADTs for this dialect excluding reserved words
-        for list in self.stdlib_adts_db[dialect]:
-            adts_set.update(set(list).difference(reswords_set))
-        #
-        # compose modules set
-        modules_set = set()
-        # add each list of builtins for this dialect excluding builtins
-        for list in self.stdlib_modules_db[dialect]:
-            modules_set.update(set(list).difference(builtins_set))
-        #
-        # compose types set
-        types_set = set()
-        # add each list of types for this dialect excluding builtins
-        for list in self.stdlib_types_db[dialect]:
-            types_set.update(set(list).difference(builtins_set))
-        #
-        # compose procedures set
-        procedures_set = set()
-        # add each list of procedures for this dialect excluding builtins
-        for list in self.stdlib_procedures_db[dialect]:
-            procedures_set.update(set(list).difference(builtins_set))
-        #
-        # compose variables set
-        variables_set = set()
-        # add each list of variables for this dialect excluding builtins
-        for list in self.stdlib_variables_db[dialect]:
-            variables_set.update(set(list).difference(builtins_set))
-        #
-        # compose constants set
-        constants_set = set()
-        # add each list of constants for this dialect excluding builtins
-        for list in self.stdlib_constants_db[dialect]:
-            constants_set.update(set(list).difference(builtins_set))
-        #
-        # update lexer state
-        self.dialect = dialect
-        self.lexemes_to_reject = lexemes_to_reject_set
-        self.reserved_words = reswords_set
-        self.builtins = builtins_set
-        self.pseudo_builtins = pseudo_builtins_set
-        self.adts = adts_set
-        self.modules = modules_set
-        self.types = types_set
-        self.procedures = procedures_set
-        self.variables = variables_set
-        self.constants = constants_set
-        #
-        # if __debug__:
-        #    print 'exiting set_dialect'
-        #    print ' self.dialect: ', self.dialect
-        #    print ' self.lexemes_to_reject: ', self.lexemes_to_reject
-        #    print ' self.reserved_words: ', self.reserved_words
-        #    print ' self.builtins: ', self.builtins
-        #    print ' self.pseudo_builtins: ', self.pseudo_builtins
-        #    print ' self.adts: ', self.adts
-        #    print ' self.modules: ', self.modules
-        #    print ' self.types: ', self.types
-        #    print ' self.procedures: ', self.procedures
-        #    print ' self.variables: ', self.variables
-        #    print ' self.types: ', self.types
-        #    print ' self.constants: ', self.constants
-
-    # Extracts a dialect name from a dialect tag comment string  and checks
-    # the extracted name against known dialects.  If a match is found,  the
-    # matching name is returned, otherwise dialect id 'unknown' is returned
-    def get_dialect_from_dialect_tag(self, dialect_tag):
-        #
-        # if __debug__:
-        #    print 'entered get_dialect_from_dialect_tag with arg: ', dialect_tag
-        #
-        # constants
-        left_tag_delim = '(*!'
-        right_tag_delim = '*)'
-        left_tag_delim_len = len(left_tag_delim)
-        right_tag_delim_len = len(right_tag_delim)
-        indicator_start = left_tag_delim_len
-        indicator_end = -(right_tag_delim_len)
-        #
-        # check comment string for dialect indicator
-        if len(dialect_tag) > (left_tag_delim_len + right_tag_delim_len) \
-           and dialect_tag.startswith(left_tag_delim) \
-           and dialect_tag.endswith(right_tag_delim):
-            #
-            # if __debug__:
-            #    print 'dialect tag found'
-            #
-            # extract dialect indicator
-            indicator = dialect_tag[indicator_start:indicator_end]
-            #
-            # if __debug__:
-            #    print 'extracted: ', indicator
-            #
-            # check against known dialects
-            for index in range(1, len(self.dialects)):
-                #
-                # if __debug__:
-                #    print 'dialects[', index, ']: ', self.dialects[index]
-                #
-                if indicator == self.dialects[index]:
-                    #
-                    # if __debug__:
-                    #    print 'matching dialect found'
-                    #
-                    # indicator matches known dialect
-                    return indicator
-            else:
-                # indicator does not match any dialect
-                return 'unknown'  # default
-        else:
-            # invalid indicator string
-            return 'unknown'  # default
-
-    # intercept the token stream, modify token attributes and return them
-    def get_tokens_unprocessed(self, text):
-        for index, token, value in RegexLexer.get_tokens_unprocessed(self, text):
-            #
-            # check for dialect tag if dialect has not been set by tag
-            if not self.dialect_set_by_tag and token == Comment.Special:
-                indicated_dialect = self.get_dialect_from_dialect_tag(value)
-                if indicated_dialect != 'unknown':
-                    # token is a dialect indicator
-                    # reset reserved words and builtins
-                    self.set_dialect(indicated_dialect)
-                    self.dialect_set_by_tag = True
-            #
-            # check for reserved words, predefined and stdlib identifiers
-            if token is Name:
-                if value in self.reserved_words:
-                    token = Keyword.Reserved
-                    if self.algol_publication_mode:
-                        value = value.lower()
-                #
-                elif value in self.builtins:
-                    token = Name.Builtin
-                    if self.algol_publication_mode:
-                        value = value.lower()
-                #
-                elif value in self.pseudo_builtins:
-                    token = Name.Builtin.Pseudo
-                    if self.algol_publication_mode:
-                        value = value.lower()
-                #
-                elif value in self.adts:
-                    if not self.treat_stdlib_adts_as_builtins:
-                        token = Name.Namespace
-                    else:
-                        token = Name.Builtin.Pseudo
-                        if self.algol_publication_mode:
-                            value = value.lower()
-                #
-                elif value in self.modules:
-                    token = Name.Namespace
-                #
-                elif value in self.types:
-                    token = Name.Class
-                #
-                elif value in self.procedures:
-                    token = Name.Function
-                #
-                elif value in self.variables:
-                    token = Name.Variable
-                #
-                elif value in self.constants:
-                    token = Name.Constant
-            #
-            elif token in Number:
-                #
-                # mark prefix number literals as error for PIM and ISO dialects
-                if self.dialect not in ('unknown', 'm2r10', 'objm2'):
-                    if "'" in value or value[0:2] in ('0b', '0x', '0u'):
-                        token = Error
-                #
-                elif self.dialect in ('m2r10', 'objm2'):
-                    # mark base-8 number literals as errors for M2 R10 and ObjM2
-                    if token is Number.Oct:
-                        token = Error
-                    # mark suffix base-16 literals as errors for M2 R10 and ObjM2
-                    elif token is Number.Hex and 'H' in value:
-                        token = Error
-                    # mark real numbers with E as errors for M2 R10 and ObjM2
-                    elif token is Number.Float and 'E' in value:
-                        token = Error
-            #
-            elif token in Comment:
-                #
-                # mark single line comment as error for PIM and ISO dialects
-                if token is Comment.Single:
-                    if self.dialect not in ('unknown', 'm2r10', 'objm2'):
-                        token = Error
-                #
-                if token is Comment.Preproc:
-                    # mark ISO pragma as error for PIM dialects
-                    if value.startswith('<*') and \
-                       self.dialect.startswith('m2pim'):
-                        token = Error
-                    # mark PIM pragma as comment for other dialects
-                    elif value.startswith('(*$') and \
-                            self.dialect != 'unknown' and \
-                            not self.dialect.startswith('m2pim'):
-                        token = Comment.Multiline
-            #
-            else:  # token is neither Name nor Comment
-                #
-                # mark lexemes matching the dialect's error token set as errors
-                if value in self.lexemes_to_reject:
-                    token = Error
-                #
-                # substitute lexemes when in Algol mode
-                if self.algol_publication_mode:
-                    if value == '#':
-                        value = '≠'
-                    elif value == '<=':
-                        value = '≤'
-                    elif value == '>=':
-                        value = '≥'
-                    elif value == '==':
-                        value = '≡'
-                    elif value == '*.':
-                        value = '•'
-
-            # return result
-            yield index, token, value
-
-    def analyse_text(text):
-        """It's Pascal-like, but does not use FUNCTION -- uses PROCEDURE
-        instead."""
-
-        # Check if this looks like Pascal, if not, bail out early
-        if not ('(*' in text and '*)' in text and ':=' in text):
-            return
-
-        result = 0
-        # Procedure is in Modula2
-        if re.search(r'\bPROCEDURE\b', text):
-            result += 0.6
-
-        # FUNCTION is only valid in Pascal, but not in Modula2
-        if re.search(r'\bFUNCTION\b', text):
-            result = 0.0
-
-        return result
diff --git a/voxvera/vendor/pygments/lexers/mojo.py b/voxvera/vendor/pygments/lexers/mojo.py
deleted file mode 100644
index 4df18c4..0000000
--- a/voxvera/vendor/pygments/lexers/mojo.py
+++ /dev/null
@@ -1,707 +0,0 @@
-"""
-    pygments.lexers.mojo
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Mojo and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import keyword
-
-from pygments import unistring as uni
-from pygments.lexer import (
-    RegexLexer,
-    bygroups,
-    combined,
-    default,
-    include,
-    this,
-    using,
-    words,
-)
-from pygments.token import (
-    Comment,
-    # Error,
-    Keyword,
-    Name,
-    Number,
-    Operator,
-    Punctuation,
-    String,
-    Text,
-    Whitespace,
-)
-from pygments.util import shebang_matches
-
-__all__ = ["MojoLexer"]
-
-
-class MojoLexer(RegexLexer):
-    """
-    For Mojo source code (version 24.2.1).
-    """
-
-    name = "Mojo"
-    url = "https://docs.modular.com/mojo/"
-    aliases = ["mojo", "🔥"]
-    filenames = [
-        "*.mojo",
-        "*.🔥",
-    ]
-    mimetypes = [
-        "text/x-mojo",
-        "application/x-mojo",
-    ]
-    version_added = "2.18"
-
-    uni_name = f"[{uni.xid_start}][{uni.xid_continue}]*"
-
-    def innerstring_rules(ttype):
-        return [
-            # the old style '%s' % (...) string formatting (still valid in Py3)
-            (
-                r"%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?"
-                "[hlL]?[E-GXc-giorsaux%]",
-                String.Interpol,
-            ),
-            # the new style '{}'.format(...) string formatting
-            (
-                r"\{"
-                r"((\w+)((\.\w+)|(\[[^\]]+\]))*)?"  # field name
-                r"(\![sra])?"  # conversion
-                r"(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?"
-                r"\}",
-                String.Interpol,
-            ),
-            # backslashes, quotes and formatting signs must be parsed one at a time
-            (r'[^\\\'"%{\n]+', ttype),
-            (r'[\'"\\]', ttype),
-            # unhandled string formatting sign
-            (r"%|(\{{1,2})", ttype),
-            # newlines are an error (use "nl" state)
-        ]
-
-    def fstring_rules(ttype):
-        return [
-            # Assuming that a '}' is the closing brace after format specifier.
-            # Sadly, this means that we won't detect syntax error. But it's
-            # more important to parse correct syntax correctly, than to
-            # highlight invalid syntax.
-            (r"\}", String.Interpol),
-            (r"\{", String.Interpol, "expr-inside-fstring"),
-            # backslashes, quotes and formatting signs must be parsed one at a time
-            (r'[^\\\'"{}\n]+', ttype),
-            (r'[\'"\\]', ttype),
-            # newlines are an error (use "nl" state)
-        ]
-
-    tokens = {
-        "root": [
-            (r"\s+", Whitespace),
-            (
-                r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")',
-                bygroups(Whitespace, String.Affix, String.Doc),
-            ),
-            (
-                r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')",
-                bygroups(Whitespace, String.Affix, String.Doc),
-            ),
-            (r"\A#!.+$", Comment.Hashbang),
-            (r"#.*$", Comment.Single),
-            (r"\\\n", Whitespace),
-            (r"\\", Whitespace),
-            include("keywords"),
-            include("soft-keywords"),
-            # In the original PR, all the below here used ((?:\s|\\\s)+) to
-            # designate whitespace, but I can't find any example of this being
-            # needed in the example file, so we're replacing it with `\s+`.
-            (
-                r"(alias)(\s+)",
-                bygroups(Keyword, Whitespace),
-                "varname",  # TODO varname the right fit?
-            ),
-            (r"(var)(\s+)", bygroups(Keyword, Whitespace), "varname"),
-            (r"(def)(\s+)", bygroups(Keyword, Whitespace), "funcname"),
-            (r"(fn)(\s+)", bygroups(Keyword, Whitespace), "funcname"),
-            (
-                r"(class)(\s+)",
-                bygroups(Keyword, Whitespace),
-                "classname",
-            ),  # not implemented yet
-            (r"(struct)(\s+)", bygroups(Keyword, Whitespace), "structname"),
-            (r"(trait)(\s+)", bygroups(Keyword, Whitespace), "structname"),
-            (r"(from)(\s+)", bygroups(Keyword.Namespace, Whitespace), "fromimport"),
-            (r"(import)(\s+)", bygroups(Keyword.Namespace, Whitespace), "import"),
-            include("expr"),
-        ],
-        "expr": [
-            # raw f-strings
-            (
-                '(?i)(rf|fr)(""")',
-                bygroups(String.Affix, String.Double),
-                combined("rfstringescape", "tdqf"),
-            ),
-            (
-                "(?i)(rf|fr)(''')",
-                bygroups(String.Affix, String.Single),
-                combined("rfstringescape", "tsqf"),
-            ),
-            (
-                '(?i)(rf|fr)(")',
-                bygroups(String.Affix, String.Double),
-                combined("rfstringescape", "dqf"),
-            ),
-            (
-                "(?i)(rf|fr)(')",
-                bygroups(String.Affix, String.Single),
-                combined("rfstringescape", "sqf"),
-            ),
-            # non-raw f-strings
-            (
-                '([fF])(""")',
-                bygroups(String.Affix, String.Double),
-                combined("fstringescape", "tdqf"),
-            ),
-            (
-                "([fF])(''')",
-                bygroups(String.Affix, String.Single),
-                combined("fstringescape", "tsqf"),
-            ),
-            (
-                '([fF])(")',
-                bygroups(String.Affix, String.Double),
-                combined("fstringescape", "dqf"),
-            ),
-            (
-                "([fF])(')",
-                bygroups(String.Affix, String.Single),
-                combined("fstringescape", "sqf"),
-            ),
-            # raw bytes and strings
-            ('(?i)(rb|br|r)(""")', bygroups(String.Affix, String.Double), "tdqs"),
-            ("(?i)(rb|br|r)(''')", bygroups(String.Affix, String.Single), "tsqs"),
-            ('(?i)(rb|br|r)(")', bygroups(String.Affix, String.Double), "dqs"),
-            ("(?i)(rb|br|r)(')", bygroups(String.Affix, String.Single), "sqs"),
-            # non-raw strings
-            (
-                '([uU]?)(""")',
-                bygroups(String.Affix, String.Double),
-                combined("stringescape", "tdqs"),
-            ),
-            (
-                "([uU]?)(''')",
-                bygroups(String.Affix, String.Single),
-                combined("stringescape", "tsqs"),
-            ),
-            (
-                '([uU]?)(")',
-                bygroups(String.Affix, String.Double),
-                combined("stringescape", "dqs"),
-            ),
-            (
-                "([uU]?)(')",
-                bygroups(String.Affix, String.Single),
-                combined("stringescape", "sqs"),
-            ),
-            # non-raw bytes
-            (
-                '([bB])(""")',
-                bygroups(String.Affix, String.Double),
-                combined("bytesescape", "tdqs"),
-            ),
-            (
-                "([bB])(''')",
-                bygroups(String.Affix, String.Single),
-                combined("bytesescape", "tsqs"),
-            ),
-            (
-                '([bB])(")',
-                bygroups(String.Affix, String.Double),
-                combined("bytesescape", "dqs"),
-            ),
-            (
-                "([bB])(')",
-                bygroups(String.Affix, String.Single),
-                combined("bytesescape", "sqs"),
-            ),
-            (r"[^\S\n]+", Text),
-            include("numbers"),
-            (r"!=|==|<<|>>|:=|[-~+/*%=<>&^|.]", Operator),
-            (r"([]{}:\(\),;[])+", Punctuation),
-            (r"(in|is|and|or|not)\b", Operator.Word),
-            include("expr-keywords"),
-            include("builtins"),
-            include("magicfuncs"),
-            include("magicvars"),
-            include("name"),
-        ],
-        "expr-inside-fstring": [
-            (r"[{([]", Punctuation, "expr-inside-fstring-inner"),
-            # without format specifier
-            (
-                r"(=\s*)?"  # debug (https://bugs.python.org/issue36817)
-                r"(\![sraf])?"  # conversion
-                r"\}",
-                String.Interpol,
-                "#pop",
-            ),
-            # with format specifier
-            # we'll catch the remaining '}' in the outer scope
-            (
-                r"(=\s*)?"  # debug (https://bugs.python.org/issue36817)
-                r"(\![sraf])?"  # conversion
-                r":",
-                String.Interpol,
-                "#pop",
-            ),
-            (r"\s+", Whitespace),  # allow new lines
-            include("expr"),
-        ],
-        "expr-inside-fstring-inner": [
-            (r"[{([]", Punctuation, "expr-inside-fstring-inner"),
-            (r"[])}]", Punctuation, "#pop"),
-            (r"\s+", Whitespace),  # allow new lines
-            include("expr"),
-        ],
-        "expr-keywords": [
-            # Based on https://docs.python.org/3/reference/expressions.html
-            (
-                words(
-                    (
-                        "async for",  # TODO https://docs.modular.com/mojo/roadmap#no-async-for-or-async-with
-                        "async with",  # TODO https://docs.modular.com/mojo/roadmap#no-async-for-or-async-with
-                        "await",
-                        "else",
-                        "for",
-                        "if",
-                        "lambda",
-                        "yield",
-                        "yield from",
-                    ),
-                    suffix=r"\b",
-                ),
-                Keyword,
-            ),
-            (words(("True", "False", "None"), suffix=r"\b"), Keyword.Constant),
-        ],
-        "keywords": [
-            (
-                words(
-                    (
-                        "assert",
-                        "async",
-                        "await",
-                        "borrowed",
-                        "break",
-                        "continue",
-                        "del",
-                        "elif",
-                        "else",
-                        "except",
-                        "finally",
-                        "for",
-                        "global",
-                        "if",
-                        "lambda",
-                        "pass",
-                        "raise",
-                        "nonlocal",
-                        "return",
-                        "try",
-                        "while",
-                        "yield",
-                        "yield from",
-                        "as",
-                        "with",
-                    ),
-                    suffix=r"\b",
-                ),
-                Keyword,
-            ),
-            (words(("True", "False", "None"), suffix=r"\b"), Keyword.Constant),
-        ],
-        "soft-keywords": [
-            # `match`, `case` and `_` soft keywords
-            (
-                r"(^[ \t]*)"  # at beginning of line + possible indentation
-                r"(match|case)\b"  # a possible keyword
-                r"(?![ \t]*(?:"  # not followed by...
-                r"[:,;=^&|@~)\]}]|(?:" +  # characters and keywords that mean this isn't
-                # pattern matching (but None/True/False is ok)
-                r"|".join(k for k in keyword.kwlist if k[0].islower())
-                + r")\b))",
-                bygroups(Whitespace, Keyword),
-                "soft-keywords-inner",
-            ),
-        ],
-        "soft-keywords-inner": [
-            # optional `_` keyword
-            (r"(\s+)([^\n_]*)(_\b)", bygroups(Whitespace, using(this), Keyword)),
-            default("#pop"),
-        ],
-        "builtins": [
-            (
-                words(
-                    (
-                        "__import__",
-                        "abs",
-                        "aiter",
-                        "all",
-                        "any",
-                        "bin",
-                        "bool",
-                        "bytearray",
-                        "breakpoint",
-                        "bytes",
-                        "callable",
-                        "chr",
-                        "classmethod",
-                        "compile",
-                        "complex",
-                        "delattr",
-                        "dict",
-                        "dir",
-                        "divmod",
-                        "enumerate",
-                        "eval",
-                        "filter",
-                        "float",
-                        "format",
-                        "frozenset",
-                        "getattr",
-                        "globals",
-                        "hasattr",
-                        "hash",
-                        "hex",
-                        "id",
-                        "input",
-                        "int",
-                        "isinstance",
-                        "issubclass",
-                        "iter",
-                        "len",
-                        "list",
-                        "locals",
-                        "map",
-                        "max",
-                        "memoryview",
-                        "min",
-                        "next",
-                        "object",
-                        "oct",
-                        "open",
-                        "ord",
-                        "pow",
-                        "print",
-                        "property",
-                        "range",
-                        "repr",
-                        "reversed",
-                        "round",
-                        "set",
-                        "setattr",
-                        "slice",
-                        "sorted",
-                        "staticmethod",
-                        "str",
-                        "sum",
-                        "super",
-                        "tuple",
-                        "type",
-                        "vars",
-                        "zip",
-                        # Mojo builtin types: https://docs.modular.com/mojo/stdlib/builtin/
-                        "AnyType",
-                        "Coroutine",
-                        "DType",
-                        "Error",
-                        "Int",
-                        "List",
-                        "ListLiteral",
-                        "Scalar",
-                        "Int8",
-                        "UInt8",
-                        "Int16",
-                        "UInt16",
-                        "Int32",
-                        "UInt32",
-                        "Int64",
-                        "UInt64",
-                        "BFloat16",
-                        "Float16",
-                        "Float32",
-                        "Float64",
-                        "SIMD",
-                        "String",
-                        "Tensor",
-                        "Tuple",
-                        "Movable",
-                        "Copyable",
-                        "CollectionElement",
-                    ),
-                    prefix=r"(?>',
-    # Binary augmented
-    '+=', '-=', '*=', '/=', '%=', '**=', '&=', '|=', '^=', '<<=', '>>=',
-    # Comparison
-    '==', '!=', '<', '<=', '>', '>=', '<=>',
-    # Patterns and assignment
-    ':=', '?', '=~', '!~', '=>',
-    # Calls and sends
-    '.', '<-', '->',
-]
-_escape_pattern = (
-    r'(?:\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|'
-    r'\\["\'\\bftnr])')
-# _char = _escape_chars + [('.', String.Char)]
-_identifier = r'[_a-zA-Z]\w*'
-
-_constants = [
-    # Void constants
-    'null',
-    # Bool constants
-    'false', 'true',
-    # Double constants
-    'Infinity', 'NaN',
-    # Special objects
-    'M', 'Ref', 'throw', 'traceln',
-]
-
-_guards = [
-    'Any', 'Binding', 'Bool', 'Bytes', 'Char', 'DeepFrozen', 'Double',
-    'Empty', 'Int', 'List', 'Map', 'Near', 'NullOk', 'Same', 'Selfless',
-    'Set', 'Str', 'SubrangeGuard', 'Transparent', 'Void',
-]
-
-_safeScope = [
-    '_accumulateList', '_accumulateMap', '_auditedBy', '_bind',
-    '_booleanFlow', '_comparer', '_equalizer', '_iterForever', '_loop',
-    '_makeBytes', '_makeDouble', '_makeFinalSlot', '_makeInt', '_makeList',
-    '_makeMap', '_makeMessageDesc', '_makeOrderedSpace', '_makeParamDesc',
-    '_makeProtocolDesc', '_makeSourceSpan', '_makeString', '_makeVarSlot',
-    '_makeVerbFacet', '_mapExtract', '_matchSame', '_quasiMatcher',
-    '_slotToBinding', '_splitList', '_suchThat', '_switchFailed',
-    '_validateFor', 'b__quasiParser', 'eval', 'import', 'm__quasiParser',
-    'makeBrandPair', 'makeLazySlot', 'safeScope', 'simple__quasiParser',
-]
-
-
-class MonteLexer(RegexLexer):
-    """
-    Lexer for the Monte programming language.
-    """
-    name = 'Monte'
-    url = 'https://monte.readthedocs.io/'
-    aliases = ['monte']
-    filenames = ['*.mt']
-    version_added = '2.2'
-
-    tokens = {
-        'root': [
-            # Comments
-            (r'#[^\n]*\n', Comment),
-
-            # Docstrings
-            # Apologies for the non-greedy matcher here.
-            (r'/\*\*.*?\*/', String.Doc),
-
-            # `var` declarations
-            (r'\bvar\b', Keyword.Declaration, 'var'),
-
-            # `interface` declarations
-            (r'\binterface\b', Keyword.Declaration, 'interface'),
-
-            # method declarations
-            (words(_methods, prefix='\\b', suffix='\\b'),
-             Keyword, 'method'),
-
-            # All other declarations
-            (words(_declarations, prefix='\\b', suffix='\\b'),
-             Keyword.Declaration),
-
-            # Keywords
-            (words(_keywords, prefix='\\b', suffix='\\b'), Keyword),
-
-            # Literals
-            ('[+-]?0x[_0-9a-fA-F]+', Number.Hex),
-            (r'[+-]?[_0-9]+\.[_0-9]*([eE][+-]?[_0-9]+)?', Number.Float),
-            ('[+-]?[_0-9]+', Number.Integer),
-            ("'", String.Double, 'char'),
-            ('"', String.Double, 'string'),
-
-            # Quasiliterals
-            ('`', String.Backtick, 'ql'),
-
-            # Operators
-            (words(_operators), Operator),
-
-            # Verb operators
-            (_identifier + '=', Operator.Word),
-
-            # Safe scope constants
-            (words(_constants, prefix='\\b', suffix='\\b'),
-             Keyword.Pseudo),
-
-            # Safe scope guards
-            (words(_guards, prefix='\\b', suffix='\\b'), Keyword.Type),
-
-            # All other safe scope names
-            (words(_safeScope, prefix='\\b', suffix='\\b'),
-             Name.Builtin),
-
-            # Identifiers
-            (_identifier, Name),
-
-            # Punctuation
-            (r'\(|\)|\{|\}|\[|\]|:|,', Punctuation),
-
-            # Whitespace
-            (' +', Whitespace),
-
-            # Definite lexer errors
-            ('=', Error),
-        ],
-        'char': [
-            # It is definitely an error to have a char of width == 0.
-            ("'", Error, 'root'),
-            (_escape_pattern, String.Escape, 'charEnd'),
-            ('.', String.Char, 'charEnd'),
-        ],
-        'charEnd': [
-            ("'", String.Char, '#pop:2'),
-            # It is definitely an error to have a char of width > 1.
-            ('.', Error),
-        ],
-        # The state of things coming into an interface.
-        'interface': [
-            (' +', Whitespace),
-            (_identifier, Name.Class, '#pop'),
-            include('root'),
-        ],
-        # The state of things coming into a method.
-        'method': [
-            (' +', Whitespace),
-            (_identifier, Name.Function, '#pop'),
-            include('root'),
-        ],
-        'string': [
-            ('"', String.Double, 'root'),
-            (_escape_pattern, String.Escape),
-            (r'\n', String.Double),
-            ('.', String.Double),
-        ],
-        'ql': [
-            ('`', String.Backtick, 'root'),
-            (r'\$' + _escape_pattern, String.Escape),
-            (r'\$\$', String.Escape),
-            (r'@@', String.Escape),
-            (r'\$\{', String.Interpol, 'qlNest'),
-            (r'@\{', String.Interpol, 'qlNest'),
-            (r'\$' + _identifier, Name),
-            ('@' + _identifier, Name),
-            ('.', String.Backtick),
-        ],
-        'qlNest': [
-            (r'\}', String.Interpol, '#pop'),
-            include('root'),
-        ],
-        # The state of things immediately following `var`.
-        'var': [
-            (' +', Whitespace),
-            (_identifier, Name.Variable, '#pop'),
-            include('root'),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/mosel.py b/voxvera/vendor/pygments/lexers/mosel.py
deleted file mode 100644
index 426c9a1..0000000
--- a/voxvera/vendor/pygments/lexers/mosel.py
+++ /dev/null
@@ -1,447 +0,0 @@
-"""
-    pygments.lexers.mosel
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the mosel language.
-    http://www.fico.com/en/products/fico-xpress-optimization
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation
-
-__all__ = ['MoselLexer']
-
-FUNCTIONS = (
-    # core functions
-    '_',
-    'abs',
-    'arctan',
-    'asproc',
-    'assert',
-    'bitflip',
-    'bitneg',
-    'bitset',
-    'bitshift',
-    'bittest',
-    'bitval',
-    'ceil',
-    'cos',
-    'create',
-    'currentdate',
-    'currenttime',
-    'cutelt',
-    'cutfirst',
-    'cuthead',
-    'cutlast',
-    'cuttail',
-    'datablock',
-    'delcell',
-    'exists',
-    'exit',
-    'exp',
-    'exportprob',
-    'fclose',
-    'fflush',
-    'finalize',
-    'findfirst',
-    'findlast',
-    'floor',
-    'fopen',
-    'fselect',
-    'fskipline',
-    'fwrite',
-    'fwrite_',
-    'fwriteln',
-    'fwriteln_',
-    'getact',
-    'getcoeff',
-    'getcoeffs',
-    'getdual',
-    'getelt',
-    'getfid',
-    'getfirst',
-    'getfname',
-    'gethead',
-    'getlast',
-    'getobjval',
-    'getparam',
-    'getrcost',
-    'getreadcnt',
-    'getreverse',
-    'getsize',
-    'getslack',
-    'getsol',
-    'gettail',
-    'gettype',
-    'getvars',
-    'isdynamic',
-    'iseof',
-    'isfinite',
-    'ishidden',
-    'isinf',
-    'isnan',
-    'isodd',
-    'ln',
-    'localsetparam',
-    'log',
-    'makesos1',
-    'makesos2',
-    'maxlist',
-    'memoryuse',
-    'minlist',
-    'newmuid',
-    'publish',
-    'random',
-    'read',
-    'readln',
-    'reset',
-    'restoreparam',
-    'reverse',
-    'round',
-    'setcoeff',
-    'sethidden',
-    'setioerr',
-    'setmatherr',
-    'setname',
-    'setparam',
-    'setrandseed',
-    'setrange',
-    'settype',
-    'sin',
-    'splithead',
-    'splittail',
-    'sqrt',
-    'strfmt',
-    'substr',
-    'timestamp',
-    'unpublish',
-    'versionnum',
-    'versionstr',
-    'write',
-    'write_',
-    'writeln',
-    'writeln_',
-
-    # mosel exam mmxprs | sed -n -e "s/ [pf][a-z]* \([a-zA-Z0-9_]*\).*/'\1',/p" | sort -u
-    'addcut',
-    'addcuts',
-    'addmipsol',
-    'basisstability',
-    'calcsolinfo',
-    'clearmipdir',
-    'clearmodcut',
-    'command',
-    'copysoltoinit',
-    'crossoverlpsol',
-    'defdelayedrows',
-    'defsecurevecs',
-    'delcuts',
-    'dropcuts',
-    'estimatemarginals',
-    'fixglobal',
-    'flushmsgq',
-    'getbstat',
-    'getcnlist',
-    'getcplist',
-    'getdualray',
-    'getiis',
-    'getiissense',
-    'getiistype',
-    'getinfcause',
-    'getinfeas',
-    'getlb',
-    'getlct',
-    'getleft',
-    'getloadedlinctrs',
-    'getloadedmpvars',
-    'getname',
-    'getprimalray',
-    'getprobstat',
-    'getrange',
-    'getright',
-    'getsensrng',
-    'getsize',
-    'getsol',
-    'gettype',
-    'getub',
-    'getvars',
-    'gety',
-    'hasfeature',
-    'implies',
-    'indicator',
-    'initglobal',
-    'ishidden',
-    'isiisvalid',
-    'isintegral',
-    'loadbasis',
-    'loadcuts',
-    'loadlpsol',
-    'loadmipsol',
-    'loadprob',
-    'maximise',
-    'maximize',
-    'minimise',
-    'minimize',
-    'postsolve',
-    'readbasis',
-    'readdirs',
-    'readsol',
-    'refinemipsol',
-    'rejectintsol',
-    'repairinfeas',
-    'repairinfeas_deprec',
-    'resetbasis',
-    'resetiis',
-    'resetsol',
-    'savebasis',
-    'savemipsol',
-    'savesol',
-    'savestate',
-    'selectsol',
-    'setarchconsistency',
-    'setbstat',
-    'setcallback',
-    'setcbcutoff',
-    'setgndata',
-    'sethidden',
-    'setlb',
-    'setmipdir',
-    'setmodcut',
-    'setsol',
-    'setub',
-    'setucbdata',
-    'stopoptimise',
-    'stopoptimize',
-    'storecut',
-    'storecuts',
-    'unloadprob',
-    'uselastbarsol',
-    'writebasis',
-    'writedirs',
-    'writeprob',
-    'writesol',
-    'xor',
-    'xprs_addctr',
-    'xprs_addindic',
-
-    # mosel exam mmsystem | sed -n -e "s/ [pf][a-z]* \([a-zA-Z0-9_]*\).*/'\1',/p" | sort -u
-    'addmonths',
-    'copytext',
-    'cuttext',
-    'deltext',
-    'endswith',
-    'erase',
-    'expandpath',
-    'fcopy',
-    'fdelete',
-    'findfiles',
-    'findtext',
-    'fmove',
-    'formattext',
-    'getasnumber',
-    'getchar',
-    'getcwd',
-    'getdate',
-    'getday',
-    'getdaynum',
-    'getdays',
-    'getdirsep',
-    'getdsoparam',
-    'getendparse',
-    'getenv',
-    'getfsize',
-    'getfstat',
-    'getftime',
-    'gethour',
-    'getminute',
-    'getmonth',
-    'getmsec',
-    'getoserrmsg',
-    'getoserror',
-    'getpathsep',
-    'getqtype',
-    'getsecond',
-    'getsepchar',
-    'getsize',
-    'getstart',
-    'getsucc',
-    'getsysinfo',
-    'getsysstat',
-    'gettime',
-    'gettmpdir',
-    'gettrim',
-    'getweekday',
-    'getyear',
-    'inserttext',
-    'isvalid',
-    'jointext',
-    'makedir',
-    'makepath',
-    'newtar',
-    'newzip',
-    'nextfield',
-    'openpipe',
-    'parseextn',
-    'parseint',
-    'parsereal',
-    'parsetext',
-    'pastetext',
-    'pathmatch',
-    'pathsplit',
-    'qsort',
-    'quote',
-    'readtextline',
-    'regmatch',
-    'regreplace',
-    'removedir',
-    'removefiles',
-    'setchar',
-    'setdate',
-    'setday',
-    'setdsoparam',
-    'setendparse',
-    'setenv',
-    'sethour',
-    'setminute',
-    'setmonth',
-    'setmsec',
-    'setoserror',
-    'setqtype',
-    'setsecond',
-    'setsepchar',
-    'setstart',
-    'setsucc',
-    'settime',
-    'settrim',
-    'setyear',
-    'sleep',
-    'splittext',
-    'startswith',
-    'system',
-    'tarlist',
-    'textfmt',
-    'tolower',
-    'toupper',
-    'trim',
-    'untar',
-    'unzip',
-    'ziplist',
-
-    # mosel exam mmjobs | sed -n -e "s/ [pf][a-z]* \([a-zA-Z0-9_]*\).*/'\1',/p" | sort -u
-    'canceltimer',
-    'clearaliases',
-    'compile',
-    'connect',
-    'detach',
-    'disconnect',
-    'dropnextevent',
-    'findxsrvs',
-    'getaliases',
-    'getannidents',
-    'getannotations',
-    'getbanner',
-    'getclass',
-    'getdsoprop',
-    'getdsopropnum',
-    'getexitcode',
-    'getfromgid',
-    'getfromid',
-    'getfromuid',
-    'getgid',
-    'gethostalias',
-    'getid',
-    'getmodprop',
-    'getmodpropnum',
-    'getnextevent',
-    'getnode',
-    'getrmtid',
-    'getstatus',
-    'getsysinfo',
-    'gettimer',
-    'getuid',
-    'getvalue',
-    'isqueueempty',
-    'load',
-    'nullevent',
-    'peeknextevent',
-    'resetmodpar',
-    'run',
-    'send',
-    'setcontrol',
-    'setdefstream',
-    'setgid',
-    'sethostalias',
-    'setmodpar',
-    'settimer',
-    'setuid',
-    'setworkdir',
-    'stop',
-    'unload',
-    'wait',
-    'waitexpired',
-    'waitfor',
-    'waitforend',
-)
-
-
-class MoselLexer(RegexLexer):
-    """
-    For the Mosel optimization language.
-    """
-    name = 'Mosel'
-    aliases = ['mosel']
-    filenames = ['*.mos']
-    url = 'https://www.fico.com/fico-xpress-optimization/docs/latest/mosel/mosel_lang/dhtml/moselreflang.html'
-    version_added = '2.6'
-
-    tokens = {
-        'root': [
-            (r'\n', Text),
-            (r'\s+', Text.Whitespace),
-            (r'!.*?\n', Comment.Single),
-            (r'\(!(.|\n)*?!\)', Comment.Multiline),
-            (words((
-                'and', 'as', 'break', 'case', 'count', 'declarations', 'do',
-                'dynamic', 'elif', 'else', 'end-', 'end', 'evaluation', 'false',
-                'forall', 'forward', 'from', 'function', 'hashmap', 'if',
-                'imports', 'include', 'initialisations', 'initializations', 'inter',
-                'max', 'min', 'model', 'namespace', 'next', 'not', 'nsgroup',
-                'nssearch', 'of', 'options', 'or', 'package', 'parameters',
-                'procedure', 'public', 'prod', 'record', 'repeat', 'requirements',
-                'return', 'sum', 'then', 'to', 'true', 'union', 'until', 'uses',
-                'version', 'while', 'with'), prefix=r'\b', suffix=r'\b'),
-             Keyword.Builtin),
-            (words((
-                'range', 'array', 'set', 'list', 'mpvar', 'mpproblem', 'linctr',
-                'nlctr', 'integer', 'string', 'real', 'boolean', 'text', 'time',
-                'date', 'datetime', 'returned', 'Model', 'Mosel', 'counter',
-                'xmldoc', 'is_sos1', 'is_sos2', 'is_integer', 'is_binary',
-                'is_continuous', 'is_free', 'is_semcont', 'is_semint',
-                'is_partint'), prefix=r'\b', suffix=r'\b'),
-             Keyword.Type),
-            (r'(\+|\-|\*|/|=|<=|>=|\||\^|<|>|<>|\.\.|\.|:=|::|:|in|mod|div)',
-             Operator),
-            (r'[()\[\]{},;]+', Punctuation),
-            (words(FUNCTIONS,  prefix=r'\b', suffix=r'\b'), Name.Function),
-            (r'(\d+\.(?!\.)\d*|\.(?!.)\d+)([eE][+-]?\d+)?', Number.Float),
-            (r'\d+([eE][+-]?\d+)?', Number.Integer),
-            (r'[+-]?Infinity', Number.Integer),
-            (r'0[xX][0-9a-fA-F]+', Number),
-            (r'"', String.Double, 'double_quote'),
-            (r'\'', String.Single, 'single_quote'),
-            (r'(\w+|(\.(?!\.)))', Text),
-        ],
-        'single_quote': [
-            (r'\'', String.Single, '#pop'),
-            (r'[^\']+', String.Single),
-        ],
-        'double_quote': [
-            (r'(\\"|\\[0-7]{1,3}\D|\\[abfnrtv]|\\\\)', String.Escape),
-            (r'\"', String.Double, '#pop'),
-            (r'[^"\\]+', String.Double),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/ncl.py b/voxvera/vendor/pygments/lexers/ncl.py
deleted file mode 100644
index d2f4760..0000000
--- a/voxvera/vendor/pygments/lexers/ncl.py
+++ /dev/null
@@ -1,894 +0,0 @@
-"""
-    pygments.lexers.ncl
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexers for NCAR Command Language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation
-
-__all__ = ['NCLLexer']
-
-
-class NCLLexer(RegexLexer):
-    """
-    Lexer for NCL code.
-    """
-    name = 'NCL'
-    aliases = ['ncl']
-    filenames = ['*.ncl']
-    mimetypes = ['text/ncl']
-    url = 'https://www.ncl.ucar.edu'
-    version_added = '2.2'
-
-    flags = re.MULTILINE
-
-    tokens = {
-        'root': [
-            (r';.*\n', Comment),
-            include('strings'),
-            include('core'),
-            (r'[a-zA-Z_]\w*', Name),
-            include('nums'),
-            (r'[\s]+', Text),
-        ],
-        'core': [
-            # Statements
-            (words((
-                'begin', 'break', 'continue', 'create', 'defaultapp', 'do',
-                'else', 'end', 'external', 'exit', 'True', 'False', 'file', 'function',
-                'getvalues', 'graphic', 'group', 'if', 'list', 'load', 'local',
-                'new', '_Missing', 'Missing', 'noparent', 'procedure',
-                'quit', 'QUIT', 'Quit', 'record', 'return', 'setvalues', 'stop',
-                'then', 'while'), prefix=r'\b', suffix=r'\s*\b'),
-             Keyword),
-
-            # Data Types
-            (words((
-                'ubyte', 'uint', 'uint64', 'ulong', 'string', 'byte',
-                'character', 'double', 'float', 'integer', 'int64', 'logical',
-                'long', 'short', 'ushort', 'enumeric', 'numeric', 'snumeric'),
-                prefix=r'\b', suffix=r'\s*\b'),
-             Keyword.Type),
-
-            # Operators
-            (r'[\%^*+\-/<>]', Operator),
-
-            # punctuation:
-            (r'[\[\]():@$!&|.,\\{}]', Punctuation),
-            (r'[=:]', Punctuation),
-
-            # Intrinsics
-            (words((
-                'abs', 'acos', 'addfile', 'addfiles', 'all', 'angmom_atm', 'any',
-                'area_conserve_remap', 'area_hi2lores', 'area_poly_sphere',
-                'asciiread', 'asciiwrite', 'asin', 'atan', 'atan2', 'attsetvalues',
-                'avg', 'betainc', 'bin_avg', 'bin_sum', 'bw_bandpass_filter',
-                'cancor', 'cbinread', 'cbinwrite', 'cd_calendar', 'cd_inv_calendar',
-                'cdfbin_p', 'cdfbin_pr', 'cdfbin_s', 'cdfbin_xn', 'cdfchi_p',
-                'cdfchi_x', 'cdfgam_p', 'cdfgam_x', 'cdfnor_p', 'cdfnor_x',
-                'cdft_p', 'cdft_t', 'ceil', 'center_finite_diff',
-                'center_finite_diff_n', 'cfftb', 'cfftf', 'cfftf_frq_reorder',
-                'charactertodouble', 'charactertofloat', 'charactertointeger',
-                'charactertolong', 'charactertoshort', 'charactertostring',
-                'chartodouble', 'chartofloat', 'chartoint', 'chartointeger',
-                'chartolong', 'chartoshort', 'chartostring', 'chiinv', 'clear',
-                'color_index_to_rgba', 'conform', 'conform_dims', 'cos', 'cosh',
-                'count_unique_values', 'covcorm', 'covcorm_xy', 'craybinnumrec',
-                'craybinrecread', 'create_graphic', 'csa1', 'csa1d', 'csa1s',
-                'csa1x', 'csa1xd', 'csa1xs', 'csa2', 'csa2d', 'csa2l', 'csa2ld',
-                'csa2ls', 'csa2lx', 'csa2lxd', 'csa2lxs', 'csa2s', 'csa2x',
-                'csa2xd', 'csa2xs', 'csa3', 'csa3d', 'csa3l', 'csa3ld', 'csa3ls',
-                'csa3lx', 'csa3lxd', 'csa3lxs', 'csa3s', 'csa3x', 'csa3xd',
-                'csa3xs', 'csc2s', 'csgetp', 'css2c', 'cssetp', 'cssgrid', 'csstri',
-                'csvoro', 'cumsum', 'cz2ccm', 'datatondc', 'day_of_week',
-                'day_of_year', 'days_in_month', 'default_fillvalue', 'delete',
-                'depth_to_pres', 'destroy', 'determinant', 'dewtemp_trh',
-                'dgeevx_lapack', 'dim_acumrun_n', 'dim_avg', 'dim_avg_n',
-                'dim_avg_wgt', 'dim_avg_wgt_n', 'dim_cumsum', 'dim_cumsum_n',
-                'dim_gamfit_n', 'dim_gbits', 'dim_max', 'dim_max_n', 'dim_median',
-                'dim_median_n', 'dim_min', 'dim_min_n', 'dim_num', 'dim_num_n',
-                'dim_numrun_n', 'dim_pqsort', 'dim_pqsort_n', 'dim_product',
-                'dim_product_n', 'dim_rmsd', 'dim_rmsd_n', 'dim_rmvmean',
-                'dim_rmvmean_n', 'dim_rmvmed', 'dim_rmvmed_n', 'dim_spi_n',
-                'dim_standardize', 'dim_standardize_n', 'dim_stat4', 'dim_stat4_n',
-                'dim_stddev', 'dim_stddev_n', 'dim_sum', 'dim_sum_n', 'dim_sum_wgt',
-                'dim_sum_wgt_n', 'dim_variance', 'dim_variance_n', 'dimsizes',
-                'doubletobyte', 'doubletochar', 'doubletocharacter',
-                'doubletofloat', 'doubletoint', 'doubletointeger', 'doubletolong',
-                'doubletoshort', 'dpres_hybrid_ccm', 'dpres_plevel', 'draw',
-                'draw_color_palette', 'dsgetp', 'dsgrid2', 'dsgrid2d', 'dsgrid2s',
-                'dsgrid3', 'dsgrid3d', 'dsgrid3s', 'dspnt2', 'dspnt2d', 'dspnt2s',
-                'dspnt3', 'dspnt3d', 'dspnt3s', 'dssetp', 'dtrend', 'dtrend_msg',
-                'dtrend_msg_n', 'dtrend_n', 'dtrend_quadratic',
-                'dtrend_quadratic_msg_n', 'dv2uvf', 'dv2uvg', 'dz_height',
-                'echo_off', 'echo_on', 'eof2data', 'eof_varimax', 'eofcor',
-                'eofcor_pcmsg', 'eofcor_ts', 'eofcov', 'eofcov_pcmsg', 'eofcov_ts',
-                'eofunc', 'eofunc_ts', 'eofunc_varimax', 'equiv_sample_size', 'erf',
-                'erfc', 'esacr', 'esacv', 'esccr', 'esccv', 'escorc', 'escorc_n',
-                'escovc', 'exit', 'exp', 'exp_tapersh', 'exp_tapersh_wgts',
-                'exp_tapershC', 'ezfftb', 'ezfftb_n', 'ezfftf', 'ezfftf_n',
-                'f2fosh', 'f2foshv', 'f2fsh', 'f2fshv', 'f2gsh', 'f2gshv', 'fabs',
-                'fbindirread', 'fbindirwrite', 'fbinnumrec', 'fbinread',
-                'fbinrecread', 'fbinrecwrite', 'fbinwrite', 'fft2db', 'fft2df',
-                'fftshift', 'fileattdef', 'filechunkdimdef', 'filedimdef',
-                'fileexists', 'filegrpdef', 'filevarattdef', 'filevarchunkdef',
-                'filevarcompressleveldef', 'filevardef', 'filevardimsizes',
-                'filwgts_lancos', 'filwgts_lanczos', 'filwgts_normal',
-                'floattobyte', 'floattochar', 'floattocharacter', 'floattoint',
-                'floattointeger', 'floattolong', 'floattoshort', 'floor',
-                'fluxEddy', 'fo2fsh', 'fo2fshv', 'fourier_info', 'frame', 'fspan',
-                'ftcurv', 'ftcurvd', 'ftcurvi', 'ftcurvp', 'ftcurvpi', 'ftcurvps',
-                'ftcurvs', 'ftest', 'ftgetp', 'ftkurv', 'ftkurvd', 'ftkurvp',
-                'ftkurvpd', 'ftsetp', 'ftsurf', 'g2fsh', 'g2fshv', 'g2gsh',
-                'g2gshv', 'gamma', 'gammainc', 'gaus', 'gaus_lobat',
-                'gaus_lobat_wgt', 'gc_aangle', 'gc_clkwise', 'gc_dangle',
-                'gc_inout', 'gc_latlon', 'gc_onarc', 'gc_pnt2gc', 'gc_qarea',
-                'gc_tarea', 'generate_2d_array', 'get_color_index',
-                'get_color_rgba', 'get_cpu_time', 'get_isolines', 'get_ncl_version',
-                'get_script_name', 'get_script_prefix_name', 'get_sphere_radius',
-                'get_unique_values', 'getbitsone', 'getenv', 'getfiledimsizes',
-                'getfilegrpnames', 'getfilepath', 'getfilevaratts',
-                'getfilevarchunkdimsizes', 'getfilevardims', 'getfilevardimsizes',
-                'getfilevarnames', 'getfilevartypes', 'getvaratts', 'getvardims',
-                'gradsf', 'gradsg', 'greg2jul', 'grid2triple', 'hlsrgb', 'hsvrgb',
-                'hydro', 'hyi2hyo', 'idsfft', 'igradsf', 'igradsg', 'ilapsf',
-                'ilapsg', 'ilapvf', 'ilapvg', 'ind', 'ind_resolve', 'int2p',
-                'int2p_n', 'integertobyte', 'integertochar', 'integertocharacter',
-                'integertoshort', 'inttobyte', 'inttochar', 'inttoshort',
-                'inverse_matrix', 'isatt', 'isbigendian', 'isbyte', 'ischar',
-                'iscoord', 'isdefined', 'isdim', 'isdimnamed', 'isdouble',
-                'isenumeric', 'isfile', 'isfilepresent', 'isfilevar',
-                'isfilevaratt', 'isfilevarcoord', 'isfilevardim', 'isfloat',
-                'isfunc', 'isgraphic', 'isint', 'isint64', 'isinteger',
-                'isleapyear', 'islogical', 'islong', 'ismissing', 'isnan_ieee',
-                'isnumeric', 'ispan', 'isproc', 'isshort', 'issnumeric', 'isstring',
-                'isubyte', 'isuint', 'isuint64', 'isulong', 'isunlimited',
-                'isunsigned', 'isushort', 'isvar', 'jul2greg', 'kmeans_as136',
-                'kolsm2_n', 'kron_product', 'lapsf', 'lapsg', 'lapvf', 'lapvg',
-                'latlon2utm', 'lclvl', 'lderuvf', 'lderuvg', 'linint1', 'linint1_n',
-                'linint2', 'linint2_points', 'linmsg', 'linmsg_n', 'linrood_latwgt',
-                'linrood_wgt', 'list_files', 'list_filevars', 'list_hlus',
-                'list_procfuncs', 'list_vars', 'ListAppend', 'ListCount',
-                'ListGetType', 'ListIndex', 'ListIndexFromName', 'ListPop',
-                'ListPush', 'ListSetType', 'loadscript', 'local_max', 'local_min',
-                'log', 'log10', 'longtobyte', 'longtochar', 'longtocharacter',
-                'longtoint', 'longtointeger', 'longtoshort', 'lspoly', 'lspoly_n',
-                'mask', 'max', 'maxind', 'min', 'minind', 'mixed_layer_depth',
-                'mixhum_ptd', 'mixhum_ptrh', 'mjo_cross_coh2pha',
-                'mjo_cross_segment', 'moc_globe_atl', 'monthday', 'natgrid',
-                'natgridd', 'natgrids', 'ncargpath', 'ncargversion', 'ndctodata',
-                'ndtooned', 'new', 'NewList', 'ngezlogo', 'nggcog', 'nggetp',
-                'nglogo', 'ngsetp', 'NhlAddAnnotation', 'NhlAddData',
-                'NhlAddOverlay', 'NhlAddPrimitive', 'NhlAppGetDefaultParentId',
-                'NhlChangeWorkstation', 'NhlClassName', 'NhlClearWorkstation',
-                'NhlDataPolygon', 'NhlDataPolyline', 'NhlDataPolymarker',
-                'NhlDataToNDC', 'NhlDestroy', 'NhlDraw', 'NhlFrame', 'NhlFreeColor',
-                'NhlGetBB', 'NhlGetClassResources', 'NhlGetErrorObjectId',
-                'NhlGetNamedColorIndex', 'NhlGetParentId',
-                'NhlGetParentWorkstation', 'NhlGetWorkspaceObjectId',
-                'NhlIsAllocatedColor', 'NhlIsApp', 'NhlIsDataComm', 'NhlIsDataItem',
-                'NhlIsDataSpec', 'NhlIsTransform', 'NhlIsView', 'NhlIsWorkstation',
-                'NhlName', 'NhlNDCPolygon', 'NhlNDCPolyline', 'NhlNDCPolymarker',
-                'NhlNDCToData', 'NhlNewColor', 'NhlNewDashPattern', 'NhlNewMarker',
-                'NhlPalGetDefined', 'NhlRemoveAnnotation', 'NhlRemoveData',
-                'NhlRemoveOverlay', 'NhlRemovePrimitive', 'NhlSetColor',
-                'NhlSetDashPattern', 'NhlSetMarker', 'NhlUpdateData',
-                'NhlUpdateWorkstation', 'nice_mnmxintvl', 'nngetaspectd',
-                'nngetaspects', 'nngetp', 'nngetsloped', 'nngetslopes', 'nngetwts',
-                'nngetwtsd', 'nnpnt', 'nnpntd', 'nnpntend', 'nnpntendd',
-                'nnpntinit', 'nnpntinitd', 'nnpntinits', 'nnpnts', 'nnsetp', 'num',
-                'obj_anal_ic', 'omega_ccm', 'onedtond', 'overlay', 'paleo_outline',
-                'pdfxy_bin', 'poisson_grid_fill', 'pop_remap', 'potmp_insitu_ocn',
-                'prcwater_dp', 'pres2hybrid', 'pres_hybrid_ccm', 'pres_sigma',
-                'print', 'print_table', 'printFileVarSummary', 'printVarSummary',
-                'product', 'pslec', 'pslhor', 'pslhyp', 'qsort', 'rand',
-                'random_chi', 'random_gamma', 'random_normal', 'random_setallseed',
-                'random_uniform', 'rcm2points', 'rcm2rgrid', 'rdsstoi',
-                'read_colormap_file', 'reg_multlin', 'regcoef', 'regCoef_n',
-                'regline', 'relhum', 'replace_ieeenan', 'reshape', 'reshape_ind',
-                'rgba_to_color_index', 'rgbhls', 'rgbhsv', 'rgbyiq', 'rgrid2rcm',
-                'rhomb_trunc', 'rip_cape_2d', 'rip_cape_3d', 'round', 'rtest',
-                'runave', 'runave_n', 'set_default_fillvalue', 'set_sphere_radius',
-                'setfileoption', 'sfvp2uvf', 'sfvp2uvg', 'shaec', 'shagc',
-                'shgetnp', 'shgetp', 'shgrid', 'shorttobyte', 'shorttochar',
-                'shorttocharacter', 'show_ascii', 'shsec', 'shsetp', 'shsgc',
-                'shsgc_R42', 'sigma2hybrid', 'simpeq', 'simpne', 'sin',
-                'sindex_yrmo', 'sinh', 'sizeof', 'sleep', 'smth9', 'snindex_yrmo',
-                'solve_linsys', 'span_color_indexes', 'span_color_rgba',
-                'sparse_matrix_mult', 'spcorr', 'spcorr_n', 'specx_anal',
-                'specxy_anal', 'spei', 'sprintf', 'sprinti', 'sqrt', 'sqsort',
-                'srand', 'stat2', 'stat4', 'stat_medrng', 'stat_trim',
-                'status_exit', 'stdatmus_p2tdz', 'stdatmus_z2tdp', 'stddev',
-                'str_capital', 'str_concat', 'str_fields_count', 'str_get_cols',
-                'str_get_dq', 'str_get_field', 'str_get_nl', 'str_get_sq',
-                'str_get_tab', 'str_index_of_substr', 'str_insert', 'str_is_blank',
-                'str_join', 'str_left_strip', 'str_lower', 'str_match',
-                'str_match_ic', 'str_match_ic_regex', 'str_match_ind',
-                'str_match_ind_ic', 'str_match_ind_ic_regex', 'str_match_ind_regex',
-                'str_match_regex', 'str_right_strip', 'str_split',
-                'str_split_by_length', 'str_split_csv', 'str_squeeze', 'str_strip',
-                'str_sub_str', 'str_switch', 'str_upper', 'stringtochar',
-                'stringtocharacter', 'stringtodouble', 'stringtofloat',
-                'stringtoint', 'stringtointeger', 'stringtolong', 'stringtoshort',
-                'strlen', 'student_t', 'sum', 'svd_lapack', 'svdcov', 'svdcov_sv',
-                'svdstd', 'svdstd_sv', 'system', 'systemfunc', 'tan', 'tanh',
-                'taper', 'taper_n', 'tdclrs', 'tdctri', 'tdcudp', 'tdcurv',
-                'tddtri', 'tdez2d', 'tdez3d', 'tdgetp', 'tdgrds', 'tdgrid',
-                'tdgtrs', 'tdinit', 'tditri', 'tdlbla', 'tdlblp', 'tdlbls',
-                'tdline', 'tdlndp', 'tdlnpa', 'tdlpdp', 'tdmtri', 'tdotri',
-                'tdpara', 'tdplch', 'tdprpa', 'tdprpi', 'tdprpt', 'tdsetp',
-                'tdsort', 'tdstri', 'tdstrs', 'tdttri', 'thornthwaite', 'tobyte',
-                'tochar', 'todouble', 'tofloat', 'toint', 'toint64', 'tointeger',
-                'tolong', 'toshort', 'tosigned', 'tostring', 'tostring_with_format',
-                'totype', 'toubyte', 'touint', 'touint64', 'toulong', 'tounsigned',
-                'toushort', 'trend_manken', 'tri_trunc', 'triple2grid',
-                'triple2grid2d', 'trop_wmo', 'ttest', 'typeof', 'undef',
-                'unique_string', 'update', 'ushorttoint', 'ut_calendar',
-                'ut_inv_calendar', 'utm2latlon', 'uv2dv_cfd', 'uv2dvf', 'uv2dvg',
-                'uv2sfvpf', 'uv2sfvpg', 'uv2vr_cfd', 'uv2vrdvf', 'uv2vrdvg',
-                'uv2vrf', 'uv2vrg', 'v5d_close', 'v5d_create', 'v5d_setLowLev',
-                'v5d_setUnits', 'v5d_write', 'v5d_write_var', 'variance', 'vhaec',
-                'vhagc', 'vhsec', 'vhsgc', 'vibeta', 'vinth2p', 'vinth2p_ecmwf',
-                'vinth2p_ecmwf_nodes', 'vinth2p_nodes', 'vintp2p_ecmwf', 'vr2uvf',
-                'vr2uvg', 'vrdv2uvf', 'vrdv2uvg', 'wavelet', 'wavelet_default',
-                'weibull', 'wgt_area_smooth', 'wgt_areaave', 'wgt_areaave2',
-                'wgt_arearmse', 'wgt_arearmse2', 'wgt_areasum2', 'wgt_runave',
-                'wgt_runave_n', 'wgt_vert_avg_beta', 'wgt_volave', 'wgt_volave_ccm',
-                'wgt_volrmse', 'wgt_volrmse_ccm', 'where', 'wk_smooth121', 'wmbarb',
-                'wmbarbmap', 'wmdrft', 'wmgetp', 'wmlabs', 'wmsetp', 'wmstnm',
-                'wmvect', 'wmvectmap', 'wmvlbl', 'wrf_avo', 'wrf_cape_2d',
-                'wrf_cape_3d', 'wrf_dbz', 'wrf_eth', 'wrf_helicity', 'wrf_ij_to_ll',
-                'wrf_interp_1d', 'wrf_interp_2d_xy', 'wrf_interp_3d_z',
-                'wrf_latlon_to_ij', 'wrf_ll_to_ij', 'wrf_omega', 'wrf_pvo',
-                'wrf_rh', 'wrf_slp', 'wrf_smooth_2d', 'wrf_td', 'wrf_tk',
-                'wrf_updraft_helicity', 'wrf_uvmet', 'wrf_virtual_temp',
-                'wrf_wetbulb', 'wrf_wps_close_int', 'wrf_wps_open_int',
-                'wrf_wps_rddata_int', 'wrf_wps_rdhead_int', 'wrf_wps_read_int',
-                'wrf_wps_write_int', 'write_matrix', 'write_table', 'yiqrgb',
-                'z2geouv', 'zonal_mpsi', 'addfiles_GetVar', 'advect_variable',
-                'area_conserve_remap_Wrap', 'area_hi2lores_Wrap',
-                'array_append_record', 'assignFillValue', 'byte2flt',
-                'byte2flt_hdf', 'calcDayAnomTLL', 'calcMonAnomLLLT',
-                'calcMonAnomLLT', 'calcMonAnomTLL', 'calcMonAnomTLLL',
-                'calculate_monthly_values', 'cd_convert', 'changeCase',
-                'changeCaseChar', 'clmDayTLL', 'clmDayTLLL', 'clmMon2clmDay',
-                'clmMonLLLT', 'clmMonLLT', 'clmMonTLL', 'clmMonTLLL', 'closest_val',
-                'copy_VarAtts', 'copy_VarCoords', 'copy_VarCoords_1',
-                'copy_VarCoords_2', 'copy_VarMeta', 'copyatt', 'crossp3',
-                'cshstringtolist', 'cssgrid_Wrap', 'dble2flt', 'decimalPlaces',
-                'delete_VarAtts', 'dim_avg_n_Wrap', 'dim_avg_wgt_n_Wrap',
-                'dim_avg_wgt_Wrap', 'dim_avg_Wrap', 'dim_cumsum_n_Wrap',
-                'dim_cumsum_Wrap', 'dim_max_n_Wrap', 'dim_min_n_Wrap',
-                'dim_rmsd_n_Wrap', 'dim_rmsd_Wrap', 'dim_rmvmean_n_Wrap',
-                'dim_rmvmean_Wrap', 'dim_rmvmed_n_Wrap', 'dim_rmvmed_Wrap',
-                'dim_standardize_n_Wrap', 'dim_standardize_Wrap',
-                'dim_stddev_n_Wrap', 'dim_stddev_Wrap', 'dim_sum_n_Wrap',
-                'dim_sum_wgt_n_Wrap', 'dim_sum_wgt_Wrap', 'dim_sum_Wrap',
-                'dim_variance_n_Wrap', 'dim_variance_Wrap', 'dpres_plevel_Wrap',
-                'dtrend_leftdim', 'dv2uvF_Wrap', 'dv2uvG_Wrap', 'eof_north',
-                'eofcor_Wrap', 'eofcov_Wrap', 'eofunc_north', 'eofunc_ts_Wrap',
-                'eofunc_varimax_reorder', 'eofunc_varimax_Wrap', 'eofunc_Wrap',
-                'epsZero', 'f2fosh_Wrap', 'f2foshv_Wrap', 'f2fsh_Wrap',
-                'f2fshv_Wrap', 'f2gsh_Wrap', 'f2gshv_Wrap', 'fbindirSwap',
-                'fbinseqSwap1', 'fbinseqSwap2', 'flt2dble', 'flt2string',
-                'fo2fsh_Wrap', 'fo2fshv_Wrap', 'g2fsh_Wrap', 'g2fshv_Wrap',
-                'g2gsh_Wrap', 'g2gshv_Wrap', 'generate_resample_indices',
-                'generate_sample_indices', 'generate_unique_indices',
-                'genNormalDist', 'get1Dindex', 'get1Dindex_Collapse',
-                'get1Dindex_Exclude', 'get_file_suffix', 'GetFillColor',
-                'GetFillColorIndex', 'getFillValue', 'getind_latlon2d',
-                'getVarDimNames', 'getVarFillValue', 'grib_stime2itime',
-                'hyi2hyo_Wrap', 'ilapsF_Wrap', 'ilapsG_Wrap', 'ind_nearest_coord',
-                'indStrSubset', 'int2dble', 'int2flt', 'int2p_n_Wrap', 'int2p_Wrap',
-                'isMonotonic', 'isStrSubset', 'latGau', 'latGauWgt', 'latGlobeF',
-                'latGlobeFo', 'latRegWgt', 'linint1_n_Wrap', 'linint1_Wrap',
-                'linint2_points_Wrap', 'linint2_Wrap', 'local_max_1d',
-                'local_min_1d', 'lonFlip', 'lonGlobeF', 'lonGlobeFo', 'lonPivot',
-                'merge_levels_sfc', 'mod', 'month_to_annual',
-                'month_to_annual_weighted', 'month_to_season', 'month_to_season12',
-                'month_to_seasonN', 'monthly_total_to_daily_mean', 'nameDim',
-                'natgrid_Wrap', 'NewCosWeight', 'niceLatLon2D', 'NormCosWgtGlobe',
-                'numAsciiCol', 'numAsciiRow', 'numeric2int',
-                'obj_anal_ic_deprecated', 'obj_anal_ic_Wrap', 'omega_ccm_driver',
-                'omega_to_w', 'oneDtostring', 'pack_values', 'pattern_cor', 'pdfx',
-                'pdfxy', 'pdfxy_conform', 'pot_temp', 'pot_vort_hybrid',
-                'pot_vort_isobaric', 'pres2hybrid_Wrap', 'print_clock',
-                'printMinMax', 'quadroots', 'rcm2points_Wrap', 'rcm2rgrid_Wrap',
-                'readAsciiHead', 'readAsciiTable', 'reg_multlin_stats',
-                'region_ind', 'regline_stats', 'relhum_ttd', 'replaceSingleChar',
-                'RGBtoCmap', 'rgrid2rcm_Wrap', 'rho_mwjf', 'rm_single_dims',
-                'rmAnnCycle1D', 'rmInsufData', 'rmMonAnnCycLLLT', 'rmMonAnnCycLLT',
-                'rmMonAnnCycTLL', 'runave_n_Wrap', 'runave_Wrap', 'short2flt',
-                'short2flt_hdf', 'shsgc_R42_Wrap', 'sign_f90', 'sign_matlab',
-                'smth9_Wrap', 'smthClmDayTLL', 'smthClmDayTLLL', 'SqrtCosWeight',
-                'stat_dispersion', 'static_stability', 'stdMonLLLT', 'stdMonLLT',
-                'stdMonTLL', 'stdMonTLLL', 'symMinMaxPlt', 'table_attach_columns',
-                'table_attach_rows', 'time_to_newtime', 'transpose',
-                'triple2grid_Wrap', 'ut_convert', 'uv2dvF_Wrap', 'uv2dvG_Wrap',
-                'uv2vrF_Wrap', 'uv2vrG_Wrap', 'vr2uvF_Wrap', 'vr2uvG_Wrap',
-                'w_to_omega', 'wallClockElapseTime', 'wave_number_spc',
-                'wgt_areaave_Wrap', 'wgt_runave_leftdim', 'wgt_runave_n_Wrap',
-                'wgt_runave_Wrap', 'wgt_vertical_n', 'wind_component',
-                'wind_direction', 'yyyyddd_to_yyyymmdd', 'yyyymm_time',
-                'yyyymm_to_yyyyfrac', 'yyyymmdd_time', 'yyyymmdd_to_yyyyddd',
-                'yyyymmdd_to_yyyyfrac', 'yyyymmddhh_time', 'yyyymmddhh_to_yyyyfrac',
-                'zonal_mpsi_Wrap', 'zonalAve', 'calendar_decode2', 'cd_string',
-                'kf_filter', 'run_cor', 'time_axis_labels', 'ut_string',
-                'wrf_contour', 'wrf_map', 'wrf_map_overlay', 'wrf_map_overlays',
-                'wrf_map_resources', 'wrf_map_zoom', 'wrf_overlay', 'wrf_overlays',
-                'wrf_user_getvar', 'wrf_user_ij_to_ll', 'wrf_user_intrp2d',
-                'wrf_user_intrp3d', 'wrf_user_latlon_to_ij', 'wrf_user_list_times',
-                'wrf_user_ll_to_ij', 'wrf_user_unstagger', 'wrf_user_vert_interp',
-                'wrf_vector', 'gsn_add_annotation', 'gsn_add_polygon',
-                'gsn_add_polyline', 'gsn_add_polymarker',
-                'gsn_add_shapefile_polygons', 'gsn_add_shapefile_polylines',
-                'gsn_add_shapefile_polymarkers', 'gsn_add_text', 'gsn_attach_plots',
-                'gsn_blank_plot', 'gsn_contour', 'gsn_contour_map',
-                'gsn_contour_shade', 'gsn_coordinates', 'gsn_create_labelbar',
-                'gsn_create_legend', 'gsn_create_text',
-                'gsn_csm_attach_zonal_means', 'gsn_csm_blank_plot',
-                'gsn_csm_contour', 'gsn_csm_contour_map', 'gsn_csm_contour_map_ce',
-                'gsn_csm_contour_map_overlay', 'gsn_csm_contour_map_polar',
-                'gsn_csm_hov', 'gsn_csm_lat_time', 'gsn_csm_map', 'gsn_csm_map_ce',
-                'gsn_csm_map_polar', 'gsn_csm_pres_hgt',
-                'gsn_csm_pres_hgt_streamline', 'gsn_csm_pres_hgt_vector',
-                'gsn_csm_streamline', 'gsn_csm_streamline_contour_map',
-                'gsn_csm_streamline_contour_map_ce',
-                'gsn_csm_streamline_contour_map_polar', 'gsn_csm_streamline_map',
-                'gsn_csm_streamline_map_ce', 'gsn_csm_streamline_map_polar',
-                'gsn_csm_streamline_scalar', 'gsn_csm_streamline_scalar_map',
-                'gsn_csm_streamline_scalar_map_ce',
-                'gsn_csm_streamline_scalar_map_polar', 'gsn_csm_time_lat',
-                'gsn_csm_vector', 'gsn_csm_vector_map', 'gsn_csm_vector_map_ce',
-                'gsn_csm_vector_map_polar', 'gsn_csm_vector_scalar',
-                'gsn_csm_vector_scalar_map', 'gsn_csm_vector_scalar_map_ce',
-                'gsn_csm_vector_scalar_map_polar', 'gsn_csm_x2y', 'gsn_csm_x2y2',
-                'gsn_csm_xy', 'gsn_csm_xy2', 'gsn_csm_xy3', 'gsn_csm_y',
-                'gsn_define_colormap', 'gsn_draw_colormap', 'gsn_draw_named_colors',
-                'gsn_histogram', 'gsn_labelbar_ndc', 'gsn_legend_ndc', 'gsn_map',
-                'gsn_merge_colormaps', 'gsn_open_wks', 'gsn_panel', 'gsn_polygon',
-                'gsn_polygon_ndc', 'gsn_polyline', 'gsn_polyline_ndc',
-                'gsn_polymarker', 'gsn_polymarker_ndc', 'gsn_retrieve_colormap',
-                'gsn_reverse_colormap', 'gsn_streamline', 'gsn_streamline_map',
-                'gsn_streamline_scalar', 'gsn_streamline_scalar_map', 'gsn_table',
-                'gsn_text', 'gsn_text_ndc', 'gsn_vector', 'gsn_vector_map',
-                'gsn_vector_scalar', 'gsn_vector_scalar_map', 'gsn_xy', 'gsn_y',
-                'hsv2rgb', 'maximize_output', 'namedcolor2rgb', 'namedcolor2rgba',
-                'reset_device_coordinates', 'span_named_colors'), prefix=r'\b'),
-             Name.Builtin),
-
-            # Resources
-            (words((
-                'amDataXF', 'amDataYF', 'amJust', 'amOn', 'amOrthogonalPosF',
-                'amParallelPosF', 'amResizeNotify', 'amSide', 'amTrackData',
-                'amViewId', 'amZone', 'appDefaultParent', 'appFileSuffix',
-                'appResources', 'appSysDir', 'appUsrDir', 'caCopyArrays',
-                'caXArray', 'caXCast', 'caXMaxV', 'caXMinV', 'caXMissingV',
-                'caYArray', 'caYCast', 'caYMaxV', 'caYMinV', 'caYMissingV',
-                'cnCellFillEdgeColor', 'cnCellFillMissingValEdgeColor',
-                'cnConpackParams', 'cnConstFEnableFill', 'cnConstFLabelAngleF',
-                'cnConstFLabelBackgroundColor', 'cnConstFLabelConstantSpacingF',
-                'cnConstFLabelFont', 'cnConstFLabelFontAspectF',
-                'cnConstFLabelFontColor', 'cnConstFLabelFontHeightF',
-                'cnConstFLabelFontQuality', 'cnConstFLabelFontThicknessF',
-                'cnConstFLabelFormat', 'cnConstFLabelFuncCode', 'cnConstFLabelJust',
-                'cnConstFLabelOn', 'cnConstFLabelOrthogonalPosF',
-                'cnConstFLabelParallelPosF', 'cnConstFLabelPerimColor',
-                'cnConstFLabelPerimOn', 'cnConstFLabelPerimSpaceF',
-                'cnConstFLabelPerimThicknessF', 'cnConstFLabelSide',
-                'cnConstFLabelString', 'cnConstFLabelTextDirection',
-                'cnConstFLabelZone', 'cnConstFUseInfoLabelRes',
-                'cnExplicitLabelBarLabelsOn', 'cnExplicitLegendLabelsOn',
-                'cnExplicitLineLabelsOn', 'cnFillBackgroundColor', 'cnFillColor',
-                'cnFillColors', 'cnFillDotSizeF', 'cnFillDrawOrder', 'cnFillMode',
-                'cnFillOn', 'cnFillOpacityF', 'cnFillPalette', 'cnFillPattern',
-                'cnFillPatterns', 'cnFillScaleF', 'cnFillScales', 'cnFixFillBleed',
-                'cnGridBoundFillColor', 'cnGridBoundFillPattern',
-                'cnGridBoundFillScaleF', 'cnGridBoundPerimColor',
-                'cnGridBoundPerimDashPattern', 'cnGridBoundPerimOn',
-                'cnGridBoundPerimThicknessF', 'cnHighLabelAngleF',
-                'cnHighLabelBackgroundColor', 'cnHighLabelConstantSpacingF',
-                'cnHighLabelCount', 'cnHighLabelFont', 'cnHighLabelFontAspectF',
-                'cnHighLabelFontColor', 'cnHighLabelFontHeightF',
-                'cnHighLabelFontQuality', 'cnHighLabelFontThicknessF',
-                'cnHighLabelFormat', 'cnHighLabelFuncCode', 'cnHighLabelPerimColor',
-                'cnHighLabelPerimOn', 'cnHighLabelPerimSpaceF',
-                'cnHighLabelPerimThicknessF', 'cnHighLabelString', 'cnHighLabelsOn',
-                'cnHighLowLabelOverlapMode', 'cnHighUseLineLabelRes',
-                'cnInfoLabelAngleF', 'cnInfoLabelBackgroundColor',
-                'cnInfoLabelConstantSpacingF', 'cnInfoLabelFont',
-                'cnInfoLabelFontAspectF', 'cnInfoLabelFontColor',
-                'cnInfoLabelFontHeightF', 'cnInfoLabelFontQuality',
-                'cnInfoLabelFontThicknessF', 'cnInfoLabelFormat',
-                'cnInfoLabelFuncCode', 'cnInfoLabelJust', 'cnInfoLabelOn',
-                'cnInfoLabelOrthogonalPosF', 'cnInfoLabelParallelPosF',
-                'cnInfoLabelPerimColor', 'cnInfoLabelPerimOn',
-                'cnInfoLabelPerimSpaceF', 'cnInfoLabelPerimThicknessF',
-                'cnInfoLabelSide', 'cnInfoLabelString', 'cnInfoLabelTextDirection',
-                'cnInfoLabelZone', 'cnLabelBarEndLabelsOn', 'cnLabelBarEndStyle',
-                'cnLabelDrawOrder', 'cnLabelMasking', 'cnLabelScaleFactorF',
-                'cnLabelScaleValueF', 'cnLabelScalingMode', 'cnLegendLevelFlags',
-                'cnLevelCount', 'cnLevelFlag', 'cnLevelFlags', 'cnLevelSelectionMode',
-                'cnLevelSpacingF', 'cnLevels', 'cnLineColor', 'cnLineColors',
-                'cnLineDashPattern', 'cnLineDashPatterns', 'cnLineDashSegLenF',
-                'cnLineDrawOrder', 'cnLineLabelAngleF', 'cnLineLabelBackgroundColor',
-                'cnLineLabelConstantSpacingF', 'cnLineLabelCount',
-                'cnLineLabelDensityF', 'cnLineLabelFont', 'cnLineLabelFontAspectF',
-                'cnLineLabelFontColor', 'cnLineLabelFontColors',
-                'cnLineLabelFontHeightF', 'cnLineLabelFontQuality',
-                'cnLineLabelFontThicknessF', 'cnLineLabelFormat',
-                'cnLineLabelFuncCode', 'cnLineLabelInterval', 'cnLineLabelPerimColor',
-                'cnLineLabelPerimOn', 'cnLineLabelPerimSpaceF',
-                'cnLineLabelPerimThicknessF', 'cnLineLabelPlacementMode',
-                'cnLineLabelStrings', 'cnLineLabelsOn', 'cnLinePalette',
-                'cnLineThicknessF', 'cnLineThicknesses', 'cnLinesOn',
-                'cnLowLabelAngleF', 'cnLowLabelBackgroundColor',
-                'cnLowLabelConstantSpacingF', 'cnLowLabelCount', 'cnLowLabelFont',
-                'cnLowLabelFontAspectF', 'cnLowLabelFontColor',
-                'cnLowLabelFontHeightF', 'cnLowLabelFontQuality',
-                'cnLowLabelFontThicknessF', 'cnLowLabelFormat', 'cnLowLabelFuncCode',
-                'cnLowLabelPerimColor', 'cnLowLabelPerimOn', 'cnLowLabelPerimSpaceF',
-                'cnLowLabelPerimThicknessF', 'cnLowLabelString', 'cnLowLabelsOn',
-                'cnLowUseHighLabelRes', 'cnMaxDataValueFormat', 'cnMaxLevelCount',
-                'cnMaxLevelValF', 'cnMaxPointDistanceF', 'cnMinLevelValF',
-                'cnMissingValFillColor', 'cnMissingValFillPattern',
-                'cnMissingValFillScaleF', 'cnMissingValPerimColor',
-                'cnMissingValPerimDashPattern', 'cnMissingValPerimGridBoundOn',
-                'cnMissingValPerimOn', 'cnMissingValPerimThicknessF',
-                'cnMonoFillColor', 'cnMonoFillPattern', 'cnMonoFillScale',
-                'cnMonoLevelFlag', 'cnMonoLineColor', 'cnMonoLineDashPattern',
-                'cnMonoLineLabelFontColor', 'cnMonoLineThickness', 'cnNoDataLabelOn',
-                'cnNoDataLabelString', 'cnOutOfRangeFillColor',
-                'cnOutOfRangeFillPattern', 'cnOutOfRangeFillScaleF',
-                'cnOutOfRangePerimColor', 'cnOutOfRangePerimDashPattern',
-                'cnOutOfRangePerimOn', 'cnOutOfRangePerimThicknessF',
-                'cnRasterCellSizeF', 'cnRasterMinCellSizeF', 'cnRasterModeOn',
-                'cnRasterSampleFactorF', 'cnRasterSmoothingOn', 'cnScalarFieldData',
-                'cnSmoothingDistanceF', 'cnSmoothingOn', 'cnSmoothingTensionF',
-                'cnSpanFillPalette', 'cnSpanLinePalette', 'ctCopyTables',
-                'ctXElementSize', 'ctXMaxV', 'ctXMinV', 'ctXMissingV', 'ctXTable',
-                'ctXTableLengths', 'ctXTableType', 'ctYElementSize', 'ctYMaxV',
-                'ctYMinV', 'ctYMissingV', 'ctYTable', 'ctYTableLengths',
-                'ctYTableType', 'dcDelayCompute', 'errBuffer',
-                'errFileName', 'errFilePtr', 'errLevel', 'errPrint', 'errUnitNumber',
-                'gsClipOn', 'gsColors', 'gsEdgeColor', 'gsEdgeDashPattern',
-                'gsEdgeDashSegLenF', 'gsEdgeThicknessF', 'gsEdgesOn',
-                'gsFillBackgroundColor', 'gsFillColor', 'gsFillDotSizeF',
-                'gsFillIndex', 'gsFillLineThicknessF', 'gsFillOpacityF',
-                'gsFillScaleF', 'gsFont', 'gsFontAspectF', 'gsFontColor',
-                'gsFontHeightF', 'gsFontOpacityF', 'gsFontQuality',
-                'gsFontThicknessF', 'gsLineColor', 'gsLineDashPattern',
-                'gsLineDashSegLenF', 'gsLineLabelConstantSpacingF', 'gsLineLabelFont',
-                'gsLineLabelFontAspectF', 'gsLineLabelFontColor',
-                'gsLineLabelFontHeightF', 'gsLineLabelFontQuality',
-                'gsLineLabelFontThicknessF', 'gsLineLabelFuncCode',
-                'gsLineLabelString', 'gsLineOpacityF', 'gsLineThicknessF',
-                'gsMarkerColor', 'gsMarkerIndex', 'gsMarkerOpacityF', 'gsMarkerSizeF',
-                'gsMarkerThicknessF', 'gsSegments', 'gsTextAngleF',
-                'gsTextConstantSpacingF', 'gsTextDirection', 'gsTextFuncCode',
-                'gsTextJustification', 'gsnAboveYRefLineBarColors',
-                'gsnAboveYRefLineBarFillScales', 'gsnAboveYRefLineBarPatterns',
-                'gsnAboveYRefLineColor', 'gsnAddCyclic', 'gsnAttachBorderOn',
-                'gsnAttachPlotsXAxis', 'gsnBelowYRefLineBarColors',
-                'gsnBelowYRefLineBarFillScales', 'gsnBelowYRefLineBarPatterns',
-                'gsnBelowYRefLineColor', 'gsnBoxMargin', 'gsnCenterString',
-                'gsnCenterStringFontColor', 'gsnCenterStringFontHeightF',
-                'gsnCenterStringFuncCode', 'gsnCenterStringOrthogonalPosF',
-                'gsnCenterStringParallelPosF', 'gsnContourLineThicknessesScale',
-                'gsnContourNegLineDashPattern', 'gsnContourPosLineDashPattern',
-                'gsnContourZeroLineThicknessF', 'gsnDebugWriteFileName', 'gsnDraw',
-                'gsnFrame', 'gsnHistogramBarWidthPercent', 'gsnHistogramBinIntervals',
-                'gsnHistogramBinMissing', 'gsnHistogramBinWidth',
-                'gsnHistogramClassIntervals', 'gsnHistogramCompare',
-                'gsnHistogramComputePercentages',
-                'gsnHistogramComputePercentagesNoMissing',
-                'gsnHistogramDiscreteBinValues', 'gsnHistogramDiscreteClassValues',
-                'gsnHistogramHorizontal', 'gsnHistogramMinMaxBinsOn',
-                'gsnHistogramNumberOfBins', 'gsnHistogramPercentSign',
-                'gsnHistogramSelectNiceIntervals', 'gsnLeftString',
-                'gsnLeftStringFontColor', 'gsnLeftStringFontHeightF',
-                'gsnLeftStringFuncCode', 'gsnLeftStringOrthogonalPosF',
-                'gsnLeftStringParallelPosF', 'gsnMajorLatSpacing',
-                'gsnMajorLonSpacing', 'gsnMaskLambertConformal',
-                'gsnMaskLambertConformalOutlineOn', 'gsnMaximize',
-                'gsnMinorLatSpacing', 'gsnMinorLonSpacing', 'gsnPanelBottom',
-                'gsnPanelCenter', 'gsnPanelDebug', 'gsnPanelFigureStrings',
-                'gsnPanelFigureStringsBackgroundFillColor',
-                'gsnPanelFigureStringsFontHeightF', 'gsnPanelFigureStringsJust',
-                'gsnPanelFigureStringsPerimOn', 'gsnPanelLabelBar', 'gsnPanelLeft',
-                'gsnPanelMainFont', 'gsnPanelMainFontColor',
-                'gsnPanelMainFontHeightF', 'gsnPanelMainString', 'gsnPanelRight',
-                'gsnPanelRowSpec', 'gsnPanelScalePlotIndex', 'gsnPanelTop',
-                'gsnPanelXF', 'gsnPanelXWhiteSpacePercent', 'gsnPanelYF',
-                'gsnPanelYWhiteSpacePercent', 'gsnPaperHeight', 'gsnPaperMargin',
-                'gsnPaperOrientation', 'gsnPaperWidth', 'gsnPolar',
-                'gsnPolarLabelDistance', 'gsnPolarLabelFont',
-                'gsnPolarLabelFontHeightF', 'gsnPolarLabelSpacing', 'gsnPolarTime',
-                'gsnPolarUT', 'gsnRightString', 'gsnRightStringFontColor',
-                'gsnRightStringFontHeightF', 'gsnRightStringFuncCode',
-                'gsnRightStringOrthogonalPosF', 'gsnRightStringParallelPosF',
-                'gsnScalarContour', 'gsnScale', 'gsnShape', 'gsnSpreadColorEnd',
-                'gsnSpreadColorStart', 'gsnSpreadColors', 'gsnStringFont',
-                'gsnStringFontColor', 'gsnStringFontHeightF', 'gsnStringFuncCode',
-                'gsnTickMarksOn', 'gsnXAxisIrregular2Linear', 'gsnXAxisIrregular2Log',
-                'gsnXRefLine', 'gsnXRefLineColor', 'gsnXRefLineDashPattern',
-                'gsnXRefLineThicknessF', 'gsnXYAboveFillColors', 'gsnXYBarChart',
-                'gsnXYBarChartBarWidth', 'gsnXYBarChartColors',
-                'gsnXYBarChartColors2', 'gsnXYBarChartFillDotSizeF',
-                'gsnXYBarChartFillLineThicknessF', 'gsnXYBarChartFillOpacityF',
-                'gsnXYBarChartFillScaleF', 'gsnXYBarChartOutlineOnly',
-                'gsnXYBarChartOutlineThicknessF', 'gsnXYBarChartPatterns',
-                'gsnXYBarChartPatterns2', 'gsnXYBelowFillColors', 'gsnXYFillColors',
-                'gsnXYFillOpacities', 'gsnXYLeftFillColors', 'gsnXYRightFillColors',
-                'gsnYAxisIrregular2Linear', 'gsnYAxisIrregular2Log', 'gsnYRefLine',
-                'gsnYRefLineColor', 'gsnYRefLineColors', 'gsnYRefLineDashPattern',
-                'gsnYRefLineDashPatterns', 'gsnYRefLineThicknessF',
-                'gsnYRefLineThicknesses', 'gsnZonalMean', 'gsnZonalMeanXMaxF',
-                'gsnZonalMeanXMinF', 'gsnZonalMeanYRefLine', 'lbAutoManage',
-                'lbBottomMarginF', 'lbBoxCount', 'lbBoxEndCapStyle', 'lbBoxFractions',
-                'lbBoxLineColor', 'lbBoxLineDashPattern', 'lbBoxLineDashSegLenF',
-                'lbBoxLineThicknessF', 'lbBoxLinesOn', 'lbBoxMajorExtentF',
-                'lbBoxMinorExtentF', 'lbBoxSeparatorLinesOn', 'lbBoxSizing',
-                'lbFillBackground', 'lbFillColor', 'lbFillColors', 'lbFillDotSizeF',
-                'lbFillLineThicknessF', 'lbFillPattern', 'lbFillPatterns',
-                'lbFillScaleF', 'lbFillScales', 'lbJustification', 'lbLabelAlignment',
-                'lbLabelAngleF', 'lbLabelAutoStride', 'lbLabelBarOn',
-                'lbLabelConstantSpacingF', 'lbLabelDirection', 'lbLabelFont',
-                'lbLabelFontAspectF', 'lbLabelFontColor', 'lbLabelFontHeightF',
-                'lbLabelFontQuality', 'lbLabelFontThicknessF', 'lbLabelFuncCode',
-                'lbLabelJust', 'lbLabelOffsetF', 'lbLabelPosition', 'lbLabelStride',
-                'lbLabelStrings', 'lbLabelsOn', 'lbLeftMarginF', 'lbMaxLabelLenF',
-                'lbMinLabelSpacingF', 'lbMonoFillColor', 'lbMonoFillPattern',
-                'lbMonoFillScale', 'lbOrientation', 'lbPerimColor',
-                'lbPerimDashPattern', 'lbPerimDashSegLenF', 'lbPerimFill',
-                'lbPerimFillColor', 'lbPerimOn', 'lbPerimThicknessF',
-                'lbRasterFillOn', 'lbRightMarginF', 'lbTitleAngleF',
-                'lbTitleConstantSpacingF', 'lbTitleDirection', 'lbTitleExtentF',
-                'lbTitleFont', 'lbTitleFontAspectF', 'lbTitleFontColor',
-                'lbTitleFontHeightF', 'lbTitleFontQuality', 'lbTitleFontThicknessF',
-                'lbTitleFuncCode', 'lbTitleJust', 'lbTitleOffsetF', 'lbTitleOn',
-                'lbTitlePosition', 'lbTitleString', 'lbTopMarginF', 'lgAutoManage',
-                'lgBottomMarginF', 'lgBoxBackground', 'lgBoxLineColor',
-                'lgBoxLineDashPattern', 'lgBoxLineDashSegLenF', 'lgBoxLineThicknessF',
-                'lgBoxLinesOn', 'lgBoxMajorExtentF', 'lgBoxMinorExtentF',
-                'lgDashIndex', 'lgDashIndexes', 'lgItemCount', 'lgItemOrder',
-                'lgItemPlacement', 'lgItemPositions', 'lgItemType', 'lgItemTypes',
-                'lgJustification', 'lgLabelAlignment', 'lgLabelAngleF',
-                'lgLabelAutoStride', 'lgLabelConstantSpacingF', 'lgLabelDirection',
-                'lgLabelFont', 'lgLabelFontAspectF', 'lgLabelFontColor',
-                'lgLabelFontHeightF', 'lgLabelFontQuality', 'lgLabelFontThicknessF',
-                'lgLabelFuncCode', 'lgLabelJust', 'lgLabelOffsetF', 'lgLabelPosition',
-                'lgLabelStride', 'lgLabelStrings', 'lgLabelsOn', 'lgLeftMarginF',
-                'lgLegendOn', 'lgLineColor', 'lgLineColors', 'lgLineDashSegLenF',
-                'lgLineDashSegLens', 'lgLineLabelConstantSpacingF', 'lgLineLabelFont',
-                'lgLineLabelFontAspectF', 'lgLineLabelFontColor',
-                'lgLineLabelFontColors', 'lgLineLabelFontHeightF',
-                'lgLineLabelFontHeights', 'lgLineLabelFontQuality',
-                'lgLineLabelFontThicknessF', 'lgLineLabelFuncCode',
-                'lgLineLabelStrings', 'lgLineLabelsOn', 'lgLineThicknessF',
-                'lgLineThicknesses', 'lgMarkerColor', 'lgMarkerColors',
-                'lgMarkerIndex', 'lgMarkerIndexes', 'lgMarkerSizeF', 'lgMarkerSizes',
-                'lgMarkerThicknessF', 'lgMarkerThicknesses', 'lgMonoDashIndex',
-                'lgMonoItemType', 'lgMonoLineColor', 'lgMonoLineDashSegLen',
-                'lgMonoLineLabelFontColor', 'lgMonoLineLabelFontHeight',
-                'lgMonoLineThickness', 'lgMonoMarkerColor', 'lgMonoMarkerIndex',
-                'lgMonoMarkerSize', 'lgMonoMarkerThickness', 'lgOrientation',
-                'lgPerimColor', 'lgPerimDashPattern', 'lgPerimDashSegLenF',
-                'lgPerimFill', 'lgPerimFillColor', 'lgPerimOn', 'lgPerimThicknessF',
-                'lgRightMarginF', 'lgTitleAngleF', 'lgTitleConstantSpacingF',
-                'lgTitleDirection', 'lgTitleExtentF', 'lgTitleFont',
-                'lgTitleFontAspectF', 'lgTitleFontColor', 'lgTitleFontHeightF',
-                'lgTitleFontQuality', 'lgTitleFontThicknessF', 'lgTitleFuncCode',
-                'lgTitleJust', 'lgTitleOffsetF', 'lgTitleOn', 'lgTitlePosition',
-                'lgTitleString', 'lgTopMarginF', 'mpAreaGroupCount',
-                'mpAreaMaskingOn', 'mpAreaNames', 'mpAreaTypes', 'mpBottomAngleF',
-                'mpBottomMapPosF', 'mpBottomNDCF', 'mpBottomNPCF',
-                'mpBottomPointLatF', 'mpBottomPointLonF', 'mpBottomWindowF',
-                'mpCenterLatF', 'mpCenterLonF', 'mpCenterRotF', 'mpCountyLineColor',
-                'mpCountyLineDashPattern', 'mpCountyLineDashSegLenF',
-                'mpCountyLineThicknessF', 'mpDataBaseVersion', 'mpDataResolution',
-                'mpDataSetName', 'mpDefaultFillColor', 'mpDefaultFillPattern',
-                'mpDefaultFillScaleF', 'mpDynamicAreaGroups', 'mpEllipticalBoundary',
-                'mpFillAreaSpecifiers', 'mpFillBoundarySets', 'mpFillColor',
-                'mpFillColors', 'mpFillColors-default', 'mpFillDotSizeF',
-                'mpFillDrawOrder', 'mpFillOn', 'mpFillPatternBackground',
-                'mpFillPattern', 'mpFillPatterns', 'mpFillPatterns-default',
-                'mpFillScaleF', 'mpFillScales', 'mpFillScales-default',
-                'mpFixedAreaGroups', 'mpGeophysicalLineColor',
-                'mpGeophysicalLineDashPattern', 'mpGeophysicalLineDashSegLenF',
-                'mpGeophysicalLineThicknessF', 'mpGreatCircleLinesOn',
-                'mpGridAndLimbDrawOrder', 'mpGridAndLimbOn', 'mpGridLatSpacingF',
-                'mpGridLineColor', 'mpGridLineDashPattern', 'mpGridLineDashSegLenF',
-                'mpGridLineThicknessF', 'mpGridLonSpacingF', 'mpGridMaskMode',
-                'mpGridMaxLatF', 'mpGridPolarLonSpacingF', 'mpGridSpacingF',
-                'mpInlandWaterFillColor', 'mpInlandWaterFillPattern',
-                'mpInlandWaterFillScaleF', 'mpLabelDrawOrder', 'mpLabelFontColor',
-                'mpLabelFontHeightF', 'mpLabelsOn', 'mpLambertMeridianF',
-                'mpLambertParallel1F', 'mpLambertParallel2F', 'mpLandFillColor',
-                'mpLandFillPattern', 'mpLandFillScaleF', 'mpLeftAngleF',
-                'mpLeftCornerLatF', 'mpLeftCornerLonF', 'mpLeftMapPosF',
-                'mpLeftNDCF', 'mpLeftNPCF', 'mpLeftPointLatF',
-                'mpLeftPointLonF', 'mpLeftWindowF', 'mpLimbLineColor',
-                'mpLimbLineDashPattern', 'mpLimbLineDashSegLenF',
-                'mpLimbLineThicknessF', 'mpLimitMode', 'mpMaskAreaSpecifiers',
-                'mpMaskOutlineSpecifiers', 'mpMaxLatF', 'mpMaxLonF',
-                'mpMinLatF', 'mpMinLonF', 'mpMonoFillColor', 'mpMonoFillPattern',
-                'mpMonoFillScale', 'mpNationalLineColor', 'mpNationalLineDashPattern',
-                'mpNationalLineThicknessF', 'mpOceanFillColor', 'mpOceanFillPattern',
-                'mpOceanFillScaleF', 'mpOutlineBoundarySets', 'mpOutlineDrawOrder',
-                'mpOutlineMaskingOn', 'mpOutlineOn', 'mpOutlineSpecifiers',
-                'mpPerimDrawOrder', 'mpPerimLineColor', 'mpPerimLineDashPattern',
-                'mpPerimLineDashSegLenF', 'mpPerimLineThicknessF', 'mpPerimOn',
-                'mpPolyMode', 'mpProjection', 'mpProvincialLineColor',
-                'mpProvincialLineDashPattern', 'mpProvincialLineDashSegLenF',
-                'mpProvincialLineThicknessF', 'mpRelativeCenterLat',
-                'mpRelativeCenterLon', 'mpRightAngleF', 'mpRightCornerLatF',
-                'mpRightCornerLonF', 'mpRightMapPosF', 'mpRightNDCF',
-                'mpRightNPCF', 'mpRightPointLatF', 'mpRightPointLonF',
-                'mpRightWindowF', 'mpSatelliteAngle1F', 'mpSatelliteAngle2F',
-                'mpSatelliteDistF', 'mpShapeMode', 'mpSpecifiedFillColors',
-                'mpSpecifiedFillDirectIndexing', 'mpSpecifiedFillPatterns',
-                'mpSpecifiedFillPriority', 'mpSpecifiedFillScales',
-                'mpTopAngleF', 'mpTopMapPosF', 'mpTopNDCF', 'mpTopNPCF',
-                'mpTopPointLatF', 'mpTopPointLonF', 'mpTopWindowF',
-                'mpUSStateLineColor', 'mpUSStateLineDashPattern',
-                'mpUSStateLineDashSegLenF', 'mpUSStateLineThicknessF',
-                'pmAnnoManagers', 'pmAnnoViews', 'pmLabelBarDisplayMode',
-                'pmLabelBarHeightF', 'pmLabelBarKeepAspect', 'pmLabelBarOrthogonalPosF',
-                'pmLabelBarParallelPosF', 'pmLabelBarSide', 'pmLabelBarWidthF',
-                'pmLabelBarZone', 'pmLegendDisplayMode', 'pmLegendHeightF',
-                'pmLegendKeepAspect', 'pmLegendOrthogonalPosF',
-                'pmLegendParallelPosF', 'pmLegendSide', 'pmLegendWidthF',
-                'pmLegendZone', 'pmOverlaySequenceIds', 'pmTickMarkDisplayMode',
-                'pmTickMarkZone', 'pmTitleDisplayMode', 'pmTitleZone',
-                'prGraphicStyle', 'prPolyType', 'prXArray', 'prYArray',
-                'sfCopyData', 'sfDataArray', 'sfDataMaxV', 'sfDataMinV',
-                'sfElementNodes', 'sfExchangeDimensions', 'sfFirstNodeIndex',
-                'sfMissingValueV', 'sfXArray', 'sfXCActualEndF', 'sfXCActualStartF',
-                'sfXCEndIndex', 'sfXCEndSubsetV', 'sfXCEndV', 'sfXCStartIndex',
-                'sfXCStartSubsetV', 'sfXCStartV', 'sfXCStride', 'sfXCellBounds',
-                'sfYArray', 'sfYCActualEndF', 'sfYCActualStartF', 'sfYCEndIndex',
-                'sfYCEndSubsetV', 'sfYCEndV', 'sfYCStartIndex', 'sfYCStartSubsetV',
-                'sfYCStartV', 'sfYCStride', 'sfYCellBounds', 'stArrowLengthF',
-                'stArrowStride', 'stCrossoverCheckCount',
-                'stExplicitLabelBarLabelsOn', 'stLabelBarEndLabelsOn',
-                'stLabelFormat', 'stLengthCheckCount', 'stLevelColors',
-                'stLevelCount', 'stLevelPalette', 'stLevelSelectionMode',
-                'stLevelSpacingF', 'stLevels', 'stLineColor', 'stLineOpacityF',
-                'stLineStartStride', 'stLineThicknessF', 'stMapDirection',
-                'stMaxLevelCount', 'stMaxLevelValF', 'stMinArrowSpacingF',
-                'stMinDistanceF', 'stMinLevelValF', 'stMinLineSpacingF',
-                'stMinStepFactorF', 'stMonoLineColor', 'stNoDataLabelOn',
-                'stNoDataLabelString', 'stScalarFieldData', 'stScalarMissingValColor',
-                'stSpanLevelPalette', 'stStepSizeF', 'stStreamlineDrawOrder',
-                'stUseScalarArray', 'stVectorFieldData', 'stZeroFLabelAngleF',
-                'stZeroFLabelBackgroundColor', 'stZeroFLabelConstantSpacingF',
-                'stZeroFLabelFont', 'stZeroFLabelFontAspectF',
-                'stZeroFLabelFontColor', 'stZeroFLabelFontHeightF',
-                'stZeroFLabelFontQuality', 'stZeroFLabelFontThicknessF',
-                'stZeroFLabelFuncCode', 'stZeroFLabelJust', 'stZeroFLabelOn',
-                'stZeroFLabelOrthogonalPosF', 'stZeroFLabelParallelPosF',
-                'stZeroFLabelPerimColor', 'stZeroFLabelPerimOn',
-                'stZeroFLabelPerimSpaceF', 'stZeroFLabelPerimThicknessF',
-                'stZeroFLabelSide', 'stZeroFLabelString', 'stZeroFLabelTextDirection',
-                'stZeroFLabelZone', 'tfDoNDCOverlay', 'tfPlotManagerOn',
-                'tfPolyDrawList', 'tfPolyDrawOrder', 'tiDeltaF', 'tiMainAngleF',
-                'tiMainConstantSpacingF', 'tiMainDirection', 'tiMainFont',
-                'tiMainFontAspectF', 'tiMainFontColor', 'tiMainFontHeightF',
-                'tiMainFontQuality', 'tiMainFontThicknessF', 'tiMainFuncCode',
-                'tiMainJust', 'tiMainOffsetXF', 'tiMainOffsetYF', 'tiMainOn',
-                'tiMainPosition', 'tiMainSide', 'tiMainString', 'tiUseMainAttributes',
-                'tiXAxisAngleF', 'tiXAxisConstantSpacingF', 'tiXAxisDirection',
-                'tiXAxisFont', 'tiXAxisFontAspectF', 'tiXAxisFontColor',
-                'tiXAxisFontHeightF', 'tiXAxisFontQuality', 'tiXAxisFontThicknessF',
-                'tiXAxisFuncCode', 'tiXAxisJust', 'tiXAxisOffsetXF',
-                'tiXAxisOffsetYF', 'tiXAxisOn', 'tiXAxisPosition', 'tiXAxisSide',
-                'tiXAxisString', 'tiYAxisAngleF', 'tiYAxisConstantSpacingF',
-                'tiYAxisDirection', 'tiYAxisFont', 'tiYAxisFontAspectF',
-                'tiYAxisFontColor', 'tiYAxisFontHeightF', 'tiYAxisFontQuality',
-                'tiYAxisFontThicknessF', 'tiYAxisFuncCode', 'tiYAxisJust',
-                'tiYAxisOffsetXF', 'tiYAxisOffsetYF', 'tiYAxisOn', 'tiYAxisPosition',
-                'tiYAxisSide', 'tiYAxisString', 'tmBorderLineColor',
-                'tmBorderThicknessF', 'tmEqualizeXYSizes', 'tmLabelAutoStride',
-                'tmSciNoteCutoff', 'tmXBAutoPrecision', 'tmXBBorderOn',
-                'tmXBDataLeftF', 'tmXBDataRightF', 'tmXBFormat', 'tmXBIrrTensionF',
-                'tmXBIrregularPoints', 'tmXBLabelAngleF', 'tmXBLabelConstantSpacingF',
-                'tmXBLabelDeltaF', 'tmXBLabelDirection', 'tmXBLabelFont',
-                'tmXBLabelFontAspectF', 'tmXBLabelFontColor', 'tmXBLabelFontHeightF',
-                'tmXBLabelFontQuality', 'tmXBLabelFontThicknessF',
-                'tmXBLabelFuncCode', 'tmXBLabelJust', 'tmXBLabelStride', 'tmXBLabels',
-                'tmXBLabelsOn', 'tmXBMajorLengthF', 'tmXBMajorLineColor',
-                'tmXBMajorOutwardLengthF', 'tmXBMajorThicknessF', 'tmXBMaxLabelLenF',
-                'tmXBMaxTicks', 'tmXBMinLabelSpacingF', 'tmXBMinorLengthF',
-                'tmXBMinorLineColor', 'tmXBMinorOn', 'tmXBMinorOutwardLengthF',
-                'tmXBMinorPerMajor', 'tmXBMinorThicknessF', 'tmXBMinorValues',
-                'tmXBMode', 'tmXBOn', 'tmXBPrecision', 'tmXBStyle', 'tmXBTickEndF',
-                'tmXBTickSpacingF', 'tmXBTickStartF', 'tmXBValues', 'tmXMajorGrid',
-                'tmXMajorGridLineColor', 'tmXMajorGridLineDashPattern',
-                'tmXMajorGridThicknessF', 'tmXMinorGrid', 'tmXMinorGridLineColor',
-                'tmXMinorGridLineDashPattern', 'tmXMinorGridThicknessF',
-                'tmXTAutoPrecision', 'tmXTBorderOn', 'tmXTDataLeftF',
-                'tmXTDataRightF', 'tmXTFormat', 'tmXTIrrTensionF',
-                'tmXTIrregularPoints', 'tmXTLabelAngleF', 'tmXTLabelConstantSpacingF',
-                'tmXTLabelDeltaF', 'tmXTLabelDirection', 'tmXTLabelFont',
-                'tmXTLabelFontAspectF', 'tmXTLabelFontColor', 'tmXTLabelFontHeightF',
-                'tmXTLabelFontQuality', 'tmXTLabelFontThicknessF',
-                'tmXTLabelFuncCode', 'tmXTLabelJust', 'tmXTLabelStride', 'tmXTLabels',
-                'tmXTLabelsOn', 'tmXTMajorLengthF', 'tmXTMajorLineColor',
-                'tmXTMajorOutwardLengthF', 'tmXTMajorThicknessF', 'tmXTMaxLabelLenF',
-                'tmXTMaxTicks', 'tmXTMinLabelSpacingF', 'tmXTMinorLengthF',
-                'tmXTMinorLineColor', 'tmXTMinorOn', 'tmXTMinorOutwardLengthF',
-                'tmXTMinorPerMajor', 'tmXTMinorThicknessF', 'tmXTMinorValues',
-                'tmXTMode', 'tmXTOn', 'tmXTPrecision', 'tmXTStyle', 'tmXTTickEndF',
-                'tmXTTickSpacingF', 'tmXTTickStartF', 'tmXTValues', 'tmXUseBottom',
-                'tmYLAutoPrecision', 'tmYLBorderOn', 'tmYLDataBottomF',
-                'tmYLDataTopF', 'tmYLFormat', 'tmYLIrrTensionF',
-                'tmYLIrregularPoints', 'tmYLLabelAngleF', 'tmYLLabelConstantSpacingF',
-                'tmYLLabelDeltaF', 'tmYLLabelDirection', 'tmYLLabelFont',
-                'tmYLLabelFontAspectF', 'tmYLLabelFontColor', 'tmYLLabelFontHeightF',
-                'tmYLLabelFontQuality', 'tmYLLabelFontThicknessF',
-                'tmYLLabelFuncCode', 'tmYLLabelJust', 'tmYLLabelStride', 'tmYLLabels',
-                'tmYLLabelsOn', 'tmYLMajorLengthF', 'tmYLMajorLineColor',
-                'tmYLMajorOutwardLengthF', 'tmYLMajorThicknessF', 'tmYLMaxLabelLenF',
-                'tmYLMaxTicks', 'tmYLMinLabelSpacingF', 'tmYLMinorLengthF',
-                'tmYLMinorLineColor', 'tmYLMinorOn', 'tmYLMinorOutwardLengthF',
-                'tmYLMinorPerMajor', 'tmYLMinorThicknessF', 'tmYLMinorValues',
-                'tmYLMode', 'tmYLOn', 'tmYLPrecision', 'tmYLStyle', 'tmYLTickEndF',
-                'tmYLTickSpacingF', 'tmYLTickStartF', 'tmYLValues', 'tmYMajorGrid',
-                'tmYMajorGridLineColor', 'tmYMajorGridLineDashPattern',
-                'tmYMajorGridThicknessF', 'tmYMinorGrid', 'tmYMinorGridLineColor',
-                'tmYMinorGridLineDashPattern', 'tmYMinorGridThicknessF',
-                'tmYRAutoPrecision', 'tmYRBorderOn', 'tmYRDataBottomF',
-                'tmYRDataTopF', 'tmYRFormat', 'tmYRIrrTensionF',
-                'tmYRIrregularPoints', 'tmYRLabelAngleF', 'tmYRLabelConstantSpacingF',
-                'tmYRLabelDeltaF', 'tmYRLabelDirection', 'tmYRLabelFont',
-                'tmYRLabelFontAspectF', 'tmYRLabelFontColor', 'tmYRLabelFontHeightF',
-                'tmYRLabelFontQuality', 'tmYRLabelFontThicknessF',
-                'tmYRLabelFuncCode', 'tmYRLabelJust', 'tmYRLabelStride', 'tmYRLabels',
-                'tmYRLabelsOn', 'tmYRMajorLengthF', 'tmYRMajorLineColor',
-                'tmYRMajorOutwardLengthF', 'tmYRMajorThicknessF', 'tmYRMaxLabelLenF',
-                'tmYRMaxTicks', 'tmYRMinLabelSpacingF', 'tmYRMinorLengthF',
-                'tmYRMinorLineColor', 'tmYRMinorOn', 'tmYRMinorOutwardLengthF',
-                'tmYRMinorPerMajor', 'tmYRMinorThicknessF', 'tmYRMinorValues',
-                'tmYRMode', 'tmYROn', 'tmYRPrecision', 'tmYRStyle', 'tmYRTickEndF',
-                'tmYRTickSpacingF', 'tmYRTickStartF', 'tmYRValues', 'tmYUseLeft',
-                'trGridType', 'trLineInterpolationOn',
-                'trXAxisType', 'trXCoordPoints', 'trXInterPoints', 'trXLog',
-                'trXMaxF', 'trXMinF', 'trXReverse', 'trXSamples', 'trXTensionF',
-                'trYAxisType', 'trYCoordPoints', 'trYInterPoints', 'trYLog',
-                'trYMaxF', 'trYMinF', 'trYReverse', 'trYSamples', 'trYTensionF',
-                'txAngleF', 'txBackgroundFillColor', 'txConstantSpacingF', 'txDirection',
-                'txFont', 'HLU-Fonts', 'txFontAspectF', 'txFontColor',
-                'txFontHeightF', 'txFontOpacityF', 'txFontQuality',
-                'txFontThicknessF', 'txFuncCode', 'txJust', 'txPerimColor',
-                'txPerimDashLengthF', 'txPerimDashPattern', 'txPerimOn',
-                'txPerimSpaceF', 'txPerimThicknessF', 'txPosXF', 'txPosYF',
-                'txString', 'vcExplicitLabelBarLabelsOn', 'vcFillArrowEdgeColor',
-                'vcFillArrowEdgeThicknessF', 'vcFillArrowFillColor',
-                'vcFillArrowHeadInteriorXF', 'vcFillArrowHeadMinFracXF',
-                'vcFillArrowHeadMinFracYF', 'vcFillArrowHeadXF', 'vcFillArrowHeadYF',
-                'vcFillArrowMinFracWidthF', 'vcFillArrowWidthF', 'vcFillArrowsOn',
-                'vcFillOverEdge', 'vcGlyphOpacityF', 'vcGlyphStyle',
-                'vcLabelBarEndLabelsOn', 'vcLabelFontColor', 'vcLabelFontHeightF',
-                'vcLabelsOn', 'vcLabelsUseVectorColor', 'vcLevelColors',
-                'vcLevelCount', 'vcLevelPalette', 'vcLevelSelectionMode',
-                'vcLevelSpacingF', 'vcLevels', 'vcLineArrowColor',
-                'vcLineArrowHeadMaxSizeF', 'vcLineArrowHeadMinSizeF',
-                'vcLineArrowThicknessF', 'vcMagnitudeFormat',
-                'vcMagnitudeScaleFactorF', 'vcMagnitudeScaleValueF',
-                'vcMagnitudeScalingMode', 'vcMapDirection', 'vcMaxLevelCount',
-                'vcMaxLevelValF', 'vcMaxMagnitudeF', 'vcMinAnnoAngleF',
-                'vcMinAnnoArrowAngleF', 'vcMinAnnoArrowEdgeColor',
-                'vcMinAnnoArrowFillColor', 'vcMinAnnoArrowLineColor',
-                'vcMinAnnoArrowMinOffsetF', 'vcMinAnnoArrowSpaceF',
-                'vcMinAnnoArrowUseVecColor', 'vcMinAnnoBackgroundColor',
-                'vcMinAnnoConstantSpacingF', 'vcMinAnnoExplicitMagnitudeF',
-                'vcMinAnnoFont', 'vcMinAnnoFontAspectF', 'vcMinAnnoFontColor',
-                'vcMinAnnoFontHeightF', 'vcMinAnnoFontQuality',
-                'vcMinAnnoFontThicknessF', 'vcMinAnnoFuncCode', 'vcMinAnnoJust',
-                'vcMinAnnoOn', 'vcMinAnnoOrientation', 'vcMinAnnoOrthogonalPosF',
-                'vcMinAnnoParallelPosF', 'vcMinAnnoPerimColor', 'vcMinAnnoPerimOn',
-                'vcMinAnnoPerimSpaceF', 'vcMinAnnoPerimThicknessF', 'vcMinAnnoSide',
-                'vcMinAnnoString1', 'vcMinAnnoString1On', 'vcMinAnnoString2',
-                'vcMinAnnoString2On', 'vcMinAnnoTextDirection', 'vcMinAnnoZone',
-                'vcMinDistanceF', 'vcMinFracLengthF', 'vcMinLevelValF',
-                'vcMinMagnitudeF', 'vcMonoFillArrowEdgeColor',
-                'vcMonoFillArrowFillColor', 'vcMonoLineArrowColor',
-                'vcMonoWindBarbColor', 'vcNoDataLabelOn', 'vcNoDataLabelString',
-                'vcPositionMode', 'vcRefAnnoAngleF', 'vcRefAnnoArrowAngleF',
-                'vcRefAnnoArrowEdgeColor', 'vcRefAnnoArrowFillColor',
-                'vcRefAnnoArrowLineColor', 'vcRefAnnoArrowMinOffsetF',
-                'vcRefAnnoArrowSpaceF', 'vcRefAnnoArrowUseVecColor',
-                'vcRefAnnoBackgroundColor', 'vcRefAnnoConstantSpacingF',
-                'vcRefAnnoExplicitMagnitudeF', 'vcRefAnnoFont',
-                'vcRefAnnoFontAspectF', 'vcRefAnnoFontColor', 'vcRefAnnoFontHeightF',
-                'vcRefAnnoFontQuality', 'vcRefAnnoFontThicknessF',
-                'vcRefAnnoFuncCode', 'vcRefAnnoJust', 'vcRefAnnoOn',
-                'vcRefAnnoOrientation', 'vcRefAnnoOrthogonalPosF',
-                'vcRefAnnoParallelPosF', 'vcRefAnnoPerimColor', 'vcRefAnnoPerimOn',
-                'vcRefAnnoPerimSpaceF', 'vcRefAnnoPerimThicknessF', 'vcRefAnnoSide',
-                'vcRefAnnoString1', 'vcRefAnnoString1On', 'vcRefAnnoString2',
-                'vcRefAnnoString2On', 'vcRefAnnoTextDirection', 'vcRefAnnoZone',
-                'vcRefLengthF', 'vcRefMagnitudeF', 'vcScalarFieldData',
-                'vcScalarMissingValColor', 'vcScalarValueFormat',
-                'vcScalarValueScaleFactorF', 'vcScalarValueScaleValueF',
-                'vcScalarValueScalingMode', 'vcSpanLevelPalette', 'vcUseRefAnnoRes',
-                'vcUseScalarArray', 'vcVectorDrawOrder', 'vcVectorFieldData',
-                'vcWindBarbCalmCircleSizeF', 'vcWindBarbColor',
-                'vcWindBarbLineThicknessF', 'vcWindBarbScaleFactorF',
-                'vcWindBarbTickAngleF', 'vcWindBarbTickLengthF',
-                'vcWindBarbTickSpacingF', 'vcZeroFLabelAngleF',
-                'vcZeroFLabelBackgroundColor', 'vcZeroFLabelConstantSpacingF',
-                'vcZeroFLabelFont', 'vcZeroFLabelFontAspectF',
-                'vcZeroFLabelFontColor', 'vcZeroFLabelFontHeightF',
-                'vcZeroFLabelFontQuality', 'vcZeroFLabelFontThicknessF',
-                'vcZeroFLabelFuncCode', 'vcZeroFLabelJust', 'vcZeroFLabelOn',
-                'vcZeroFLabelOrthogonalPosF', 'vcZeroFLabelParallelPosF',
-                'vcZeroFLabelPerimColor', 'vcZeroFLabelPerimOn',
-                'vcZeroFLabelPerimSpaceF', 'vcZeroFLabelPerimThicknessF',
-                'vcZeroFLabelSide', 'vcZeroFLabelString', 'vcZeroFLabelTextDirection',
-                'vcZeroFLabelZone', 'vfCopyData', 'vfDataArray',
-                'vfExchangeDimensions', 'vfExchangeUVData', 'vfMagMaxV', 'vfMagMinV',
-                'vfMissingUValueV', 'vfMissingVValueV', 'vfPolarData',
-                'vfSingleMissingValue', 'vfUDataArray', 'vfUMaxV', 'vfUMinV',
-                'vfVDataArray', 'vfVMaxV', 'vfVMinV', 'vfXArray', 'vfXCActualEndF',
-                'vfXCActualStartF', 'vfXCEndIndex', 'vfXCEndSubsetV', 'vfXCEndV',
-                'vfXCStartIndex', 'vfXCStartSubsetV', 'vfXCStartV', 'vfXCStride',
-                'vfYArray', 'vfYCActualEndF', 'vfYCActualStartF', 'vfYCEndIndex',
-                'vfYCEndSubsetV', 'vfYCEndV', 'vfYCStartIndex', 'vfYCStartSubsetV',
-                'vfYCStartV', 'vfYCStride', 'vpAnnoManagerId', 'vpClipOn',
-                'vpHeightF', 'vpKeepAspect', 'vpOn', 'vpUseSegments', 'vpWidthF',
-                'vpXF', 'vpYF', 'wkAntiAlias', 'wkBackgroundColor', 'wkBackgroundOpacityF',
-                'wkColorMapLen', 'wkColorMap', 'wkColorModel', 'wkDashTableLength',
-                'wkDefGraphicStyleId', 'wkDeviceLowerX', 'wkDeviceLowerY',
-                'wkDeviceUpperX', 'wkDeviceUpperY', 'wkFileName', 'wkFillTableLength',
-                'wkForegroundColor', 'wkFormat', 'wkFullBackground', 'wkGksWorkId',
-                'wkHeight', 'wkMarkerTableLength', 'wkMetaName', 'wkOrientation',
-                'wkPDFFileName', 'wkPDFFormat', 'wkPDFResolution', 'wkPSFileName',
-                'wkPSFormat', 'wkPSResolution', 'wkPaperHeightF', 'wkPaperSize',
-                'wkPaperWidthF', 'wkPause', 'wkTopLevelViews', 'wkViews',
-                'wkVisualType', 'wkWidth', 'wkWindowId', 'wkXColorMode', 'wsCurrentSize',
-                'wsMaximumSize', 'wsThresholdSize', 'xyComputeXMax',
-                'xyComputeXMin', 'xyComputeYMax', 'xyComputeYMin', 'xyCoordData',
-                'xyCoordDataSpec', 'xyCurveDrawOrder', 'xyDashPattern',
-                'xyDashPatterns', 'xyExplicitLabels', 'xyExplicitLegendLabels',
-                'xyLabelMode', 'xyLineColor', 'xyLineColors', 'xyLineDashSegLenF',
-                'xyLineLabelConstantSpacingF', 'xyLineLabelFont',
-                'xyLineLabelFontAspectF', 'xyLineLabelFontColor',
-                'xyLineLabelFontColors', 'xyLineLabelFontHeightF',
-                'xyLineLabelFontQuality', 'xyLineLabelFontThicknessF',
-                'xyLineLabelFuncCode', 'xyLineThicknessF', 'xyLineThicknesses',
-                'xyMarkLineMode', 'xyMarkLineModes', 'xyMarker', 'xyMarkerColor',
-                'xyMarkerColors', 'xyMarkerSizeF', 'xyMarkerSizes',
-                'xyMarkerThicknessF', 'xyMarkerThicknesses', 'xyMarkers',
-                'xyMonoDashPattern', 'xyMonoLineColor', 'xyMonoLineLabelFontColor',
-                'xyMonoLineThickness', 'xyMonoMarkLineMode', 'xyMonoMarker',
-                'xyMonoMarkerColor', 'xyMonoMarkerSize', 'xyMonoMarkerThickness',
-                'xyXIrrTensionF', 'xyXIrregularPoints', 'xyXStyle', 'xyYIrrTensionF',
-                'xyYIrregularPoints', 'xyYStyle'), prefix=r'\b'),
-             Name.Builtin),
-
-            # Booleans
-            (r'\.(True|False)\.', Name.Builtin),
-            # Comparing Operators
-            (r'\.(eq|ne|lt|le|gt|ge|not|and|or|xor)\.', Operator.Word),
-        ],
-
-        'strings': [
-            (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
-        ],
-
-        'nums': [
-            (r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer),
-            (r'[+-]?\d*\.\d+(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float),
-            (r'[+-]?\d+\.\d*(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/nimrod.py b/voxvera/vendor/pygments/lexers/nimrod.py
deleted file mode 100644
index 365a8dc..0000000
--- a/voxvera/vendor/pygments/lexers/nimrod.py
+++ /dev/null
@@ -1,199 +0,0 @@
-"""
-    pygments.lexers.nimrod
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for the Nim language (formerly known as Nimrod).
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include, default, bygroups
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Error
-
-__all__ = ['NimrodLexer']
-
-
-class NimrodLexer(RegexLexer):
-    """
-    For Nim source code.
-    """
-
-    name = 'Nimrod'
-    url = 'http://nim-lang.org/'
-    aliases = ['nimrod', 'nim']
-    filenames = ['*.nim', '*.nimrod']
-    mimetypes = ['text/x-nim']
-    version_added = '1.5'
-
-    flags = re.MULTILINE | re.IGNORECASE
-
-    def underscorize(words):
-        newWords = []
-        new = []
-        for word in words:
-            for ch in word:
-                new.append(ch)
-                new.append("_?")
-            newWords.append(''.join(new))
-            new = []
-        return "|".join(newWords)
-
-    keywords = [
-        'addr', 'and', 'as', 'asm', 'bind', 'block', 'break', 'case',
-        'cast', 'concept', 'const', 'continue', 'converter', 'defer', 'discard',
-        'distinct', 'div', 'do', 'elif', 'else', 'end', 'enum', 'except',
-        'export', 'finally', 'for', 'if', 'in', 'yield', 'interface',
-        'is', 'isnot', 'iterator', 'let', 'mixin', 'mod',
-        'not', 'notin', 'object', 'of', 'or', 'out', 'ptr', 'raise',
-        'ref', 'return', 'shl', 'shr', 'static', 'try',
-        'tuple', 'type', 'using', 'when', 'while', 'xor'
-    ]
-
-    keywordsPseudo = [
-        'nil', 'true', 'false'
-    ]
-
-    opWords = [
-        'and', 'or', 'not', 'xor', 'shl', 'shr', 'div', 'mod', 'in',
-        'notin', 'is', 'isnot'
-    ]
-
-    types = [
-        'int', 'int8', 'int16', 'int32', 'int64', 'float', 'float32', 'float64',
-        'bool', 'char', 'range', 'array', 'seq', 'set', 'string'
-    ]
-
-    tokens = {
-        'root': [
-            # Comments
-            (r'##\[', String.Doc, 'doccomment'),
-            (r'##.*$', String.Doc),
-            (r'#\[', Comment.Multiline, 'comment'),
-            (r'#.*$', Comment),
-
-            # Pragmas
-            (r'\{\.', String.Other, 'pragma'),
-
-            # Operators
-            (r'[*=><+\-/@$~&%!?|\\\[\]]', Operator),
-            (r'\.\.|\.|,|\[\.|\.\]|\{\.|\.\}|\(\.|\.\)|\{|\}|\(|\)|:|\^|`|;',
-             Punctuation),
-
-            # Case statement branch
-            (r'(\n\s*)(of)(\s)', bygroups(Text.Whitespace, Keyword,
-                                          Text.Whitespace), 'casebranch'),
-
-            # Strings
-            (r'(?:[\w]+)"', String, 'rdqs'),
-            (r'"""', String.Double, 'tdqs'),
-            ('"', String, 'dqs'),
-
-            # Char
-            ("'", String.Char, 'chars'),
-
-            # Keywords
-            (rf'({underscorize(opWords)})\b', Operator.Word),
-            (r'(proc|func|method|macro|template)(\s)(?![(\[\]])',
-             bygroups(Keyword, Text.Whitespace), 'funcname'),
-            (rf'({underscorize(keywords)})\b', Keyword),
-            (r'({})\b'.format(underscorize(['from', 'import', 'include', 'export'])),
-             Keyword.Namespace),
-            (r'(v_?a_?r)\b', Keyword.Declaration),
-            (rf'({underscorize(types)})\b', Name.Builtin),
-            (rf'({underscorize(keywordsPseudo)})\b', Keyword.Pseudo),
-
-            # Identifiers
-            (r'\b((?![_\d])\w)(((?!_)\w)|(_(?!_)\w))*', Name),
-
-            # Numbers
-            (r'[0-9][0-9_]*(?=([e.]|\'f(32|64)))',
-             Number.Float, ('float-suffix', 'float-number')),
-            (r'0x[a-f0-9][a-f0-9_]*', Number.Hex, 'int-suffix'),
-            (r'0b[01][01_]*', Number.Bin, 'int-suffix'),
-            (r'0o[0-7][0-7_]*', Number.Oct, 'int-suffix'),
-            (r'[0-9][0-9_]*', Number.Integer, 'int-suffix'),
-
-            # Whitespace
-            (r'\s+', Text.Whitespace),
-            (r'.+$', Error),
-        ],
-        'chars': [
-            (r'\\([\\abcefnrtvl"\']|x[a-f0-9]{2}|[0-9]{1,3})', String.Escape),
-            (r"'", String.Char, '#pop'),
-            (r".", String.Char)
-        ],
-        'strings': [
-            (r'(?|>=|>>|>|<=|<<|<|\+|-|=|/|\*|%|\+=|-=|!|@', Operator),
-            (r'\(|\)|\[|\]|,|\.\.\.|\.\.|\.|::|:', Punctuation),
-            (r'`\{[^`]*`\}', Text),  # Extern blocks won't be Lexed by Nit
-            (r'[\r\n\t ]+', Text),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/nix.py b/voxvera/vendor/pygments/lexers/nix.py
deleted file mode 100644
index 3fa88c6..0000000
--- a/voxvera/vendor/pygments/lexers/nix.py
+++ /dev/null
@@ -1,144 +0,0 @@
-"""
-    pygments.lexers.nix
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the NixOS Nix language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Literal
-
-__all__ = ['NixLexer']
-
-
-class NixLexer(RegexLexer):
-    """
-    For the Nix language.
-    """
-
-    name = 'Nix'
-    url = 'http://nixos.org/nix/'
-    aliases = ['nixos', 'nix']
-    filenames = ['*.nix']
-    mimetypes = ['text/x-nix']
-    version_added = '2.0'
-
-    keywords = ['rec', 'with', 'let', 'in', 'inherit', 'assert', 'if',
-                'else', 'then', '...']
-    builtins = ['import', 'abort', 'baseNameOf', 'dirOf', 'isNull', 'builtins',
-                'map', 'removeAttrs', 'throw', 'toString', 'derivation']
-    operators = ['++', '+', '?', '.', '!', '//', '==', '/',
-                 '!=', '&&', '||', '->', '=', '<', '>', '*', '-']
-
-    punctuations = ["(", ")", "[", "]", ";", "{", "}", ":", ",", "@"]
-
-    tokens = {
-        'root': [
-            # comments starting with #
-            (r'#.*$', Comment.Single),
-
-            # multiline comments
-            (r'/\*', Comment.Multiline, 'comment'),
-
-            # whitespace
-            (r'\s+', Text),
-
-            # keywords
-            ('({})'.format('|'.join(re.escape(entry) + '\\b' for entry in keywords)), Keyword),
-
-            # highlight the builtins
-            ('({})'.format('|'.join(re.escape(entry) + '\\b' for entry in builtins)),
-             Name.Builtin),
-
-            (r'\b(true|false|null)\b', Name.Constant),
-
-            # floats
-            (r'-?(\d+\.\d*|\.\d+)([eE][-+]?\d+)?', Number.Float),
-
-            # integers
-            (r'-?[0-9]+', Number.Integer),
-
-            # paths
-            (r'[\w.+-]*(\/[\w.+-]+)+', Literal),
-            (r'~(\/[\w.+-]+)+', Literal),
-            (r'\<[\w.+-]+(\/[\w.+-]+)*\>', Literal),
-
-            # operators
-            ('({})'.format('|'.join(re.escape(entry) for entry in operators)),
-             Operator),
-
-            # word operators
-            (r'\b(or|and)\b', Operator.Word),
-
-            (r'\{', Punctuation, 'block'),
-
-            # punctuations
-            ('({})'.format('|'.join(re.escape(entry) for entry in punctuations)), Punctuation),
-
-            # strings
-            (r'"', String.Double, 'doublequote'),
-            (r"''", String.Multiline, 'multiline'),
-
-            # urls
-            (r'[a-zA-Z][a-zA-Z0-9\+\-\.]*\:[\w%/?:@&=+$,\\.!~*\'-]+', Literal),
-
-            # names of variables
-            (r'[\w-]+(?=\s*=)', String.Symbol),
-            (r'[a-zA-Z_][\w\'-]*', Text),
-
-            (r"\$\{", String.Interpol, 'antiquote'),
-        ],
-        'comment': [
-            (r'[^/*]+', Comment.Multiline),
-            (r'/\*', Comment.Multiline, '#push'),
-            (r'\*/', Comment.Multiline, '#pop'),
-            (r'[*/]', Comment.Multiline),
-        ],
-        'multiline': [
-            (r"''(\$|'|\\n|\\r|\\t|\\)", String.Escape),
-            (r"''", String.Multiline, '#pop'),
-            (r'\$\{', String.Interpol, 'antiquote'),
-            (r"[^'\$]+", String.Multiline),
-            (r"\$[^\{']", String.Multiline),
-            (r"'[^']", String.Multiline),
-            (r"\$(?=')", String.Multiline),
-        ],
-        'doublequote': [
-            (r'\\(\\|"|\$|n)', String.Escape),
-            (r'"', String.Double, '#pop'),
-            (r'\$\{', String.Interpol, 'antiquote'),
-            (r'[^"\\\$]+', String.Double),
-            (r'\$[^\{"]', String.Double),
-            (r'\$(?=")', String.Double),
-            (r'\\', String.Double),
-        ],
-        'antiquote': [
-            (r"\}", String.Interpol, '#pop'),
-            # TODO: we should probably escape also here ''${ \${
-            (r"\$\{", String.Interpol, '#push'),
-            include('root'),
-        ],
-        'block': [
-            (r"\}", Punctuation, '#pop'),
-            include('root'),
-        ],
-    }
-
-    def analyse_text(text):
-        rv = 0.0
-        # TODO: let/in
-        if re.search(r'import.+?<[^>]+>', text):
-            rv += 0.4
-        if re.search(r'mkDerivation\s+(\(|\{|rec)', text):
-            rv += 0.4
-        if re.search(r'=\s+mkIf\s+', text):
-            rv += 0.4
-        if re.search(r'\{[a-zA-Z,\s]+\}:', text):
-            rv += 0.1
-        return rv
diff --git a/voxvera/vendor/pygments/lexers/numbair.py b/voxvera/vendor/pygments/lexers/numbair.py
deleted file mode 100644
index 435863e..0000000
--- a/voxvera/vendor/pygments/lexers/numbair.py
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-    pygments.lexers.numbair
-    ~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for other Numba Intermediate Representation.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, include, bygroups, words
-from pygments.token import Whitespace, Name, String,  Punctuation, Keyword, \
-    Operator, Number
-
-__all__ = ["NumbaIRLexer"]
-
-class NumbaIRLexer(RegexLexer):
-    """
-    Lexer for Numba IR
-    """
-    name = 'Numba_IR'
-    url = "https://numba.readthedocs.io/en/stable/developer/architecture.html#stage-2-generate-the-numba-ir"
-    aliases = ['numba_ir', 'numbair']
-    filenames = ['*.numba_ir']
-    mimetypes = ['text/x-numba_ir', 'text/x-numbair']
-    version_added = '2.19'
-
-    identifier = r'\$[a-zA-Z0-9._]+'
-    fun_or_var = r'([a-zA-Z_]+[a-zA-Z0-9]*)'
-
-    tokens = {
-        'root' : [
-            (r'(label)(\ [0-9]+)(:)$',
-                bygroups(Keyword, Name.Label, Punctuation)),
-
-            (r'=', Operator),
-            include('whitespace'),
-            include('keyword'),
-
-            (identifier, Name.Variable),
-            (fun_or_var + r'(\()',
-                bygroups(Name.Function, Punctuation)),
-            (fun_or_var + r'(\=)',
-                bygroups(Name.Attribute, Punctuation)),
-            (fun_or_var, Name.Constant),
-            (r'[0-9]+', Number),
-
-            # 
-            (r'<[^>\n]*>', String),
-
-            (r'[=<>{}\[\]()*.,!\':]|x\b', Punctuation)
-        ],
-
-        'keyword':[
-            (words((
-                'del', 'jump', 'call', 'branch',
-            ), suffix=' '), Keyword),
-        ],
-
-        'whitespace': [
-            (r'(\n|\s)+', Whitespace),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/oberon.py b/voxvera/vendor/pygments/lexers/oberon.py
deleted file mode 100644
index 61f3c2d..0000000
--- a/voxvera/vendor/pygments/lexers/oberon.py
+++ /dev/null
@@ -1,120 +0,0 @@
-"""
-    pygments.lexers.oberon
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Oberon family languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation
-
-__all__ = ['ComponentPascalLexer']
-
-
-class ComponentPascalLexer(RegexLexer):
-    """
-    For Component Pascal source code.
-    """
-    name = 'Component Pascal'
-    aliases = ['componentpascal', 'cp']
-    filenames = ['*.cp', '*.cps']
-    mimetypes = ['text/x-component-pascal']
-    url = 'https://blackboxframework.org'
-    version_added = '2.1'
-
-    flags = re.MULTILINE | re.DOTALL
-
-    tokens = {
-        'root': [
-            include('whitespace'),
-            include('comments'),
-            include('punctuation'),
-            include('numliterals'),
-            include('strings'),
-            include('operators'),
-            include('builtins'),
-            include('identifiers'),
-        ],
-        'whitespace': [
-            (r'\n+', Text),  # blank lines
-            (r'\s+', Text),  # whitespace
-        ],
-        'comments': [
-            (r'\(\*([^$].*?)\*\)', Comment.Multiline),
-            # TODO: nested comments (* (* ... *) ... (* ... *) *) not supported!
-        ],
-        'punctuation': [
-            (r'[()\[\]{},.:;|]', Punctuation),
-        ],
-        'numliterals': [
-            (r'[0-9A-F]+X\b', Number.Hex),                 # char code
-            (r'[0-9A-F]+[HL]\b', Number.Hex),              # hexadecimal number
-            (r'[0-9]+\.[0-9]+E[+-][0-9]+', Number.Float),  # real number
-            (r'[0-9]+\.[0-9]+', Number.Float),             # real number
-            (r'[0-9]+', Number.Integer),                   # decimal whole number
-        ],
-        'strings': [
-            (r"'[^\n']*'", String),  # single quoted string
-            (r'"[^\n"]*"', String),  # double quoted string
-        ],
-        'operators': [
-            # Arithmetic Operators
-            (r'[+-]', Operator),
-            (r'[*/]', Operator),
-            # Relational Operators
-            (r'[=#<>]', Operator),
-            # Dereferencing Operator
-            (r'\^', Operator),
-            # Logical AND Operator
-            (r'&', Operator),
-            # Logical NOT Operator
-            (r'~', Operator),
-            # Assignment Symbol
-            (r':=', Operator),
-            # Range Constructor
-            (r'\.\.', Operator),
-            (r'\$', Operator),
-        ],
-        'identifiers': [
-            (r'([a-zA-Z_$][\w$]*)', Name),
-        ],
-        'builtins': [
-            (words((
-                'ANYPTR', 'ANYREC', 'BOOLEAN', 'BYTE', 'CHAR', 'INTEGER', 'LONGINT',
-                'REAL', 'SET', 'SHORTCHAR', 'SHORTINT', 'SHORTREAL'
-                ), suffix=r'\b'), Keyword.Type),
-            (words((
-                'ABS', 'ABSTRACT', 'ARRAY', 'ASH', 'ASSERT', 'BEGIN', 'BITS', 'BY',
-                'CAP', 'CASE', 'CHR', 'CLOSE', 'CONST', 'DEC', 'DIV', 'DO', 'ELSE',
-                'ELSIF', 'EMPTY', 'END', 'ENTIER', 'EXCL', 'EXIT', 'EXTENSIBLE', 'FOR',
-                'HALT', 'IF', 'IMPORT', 'IN', 'INC', 'INCL', 'IS', 'LEN', 'LIMITED',
-                'LONG', 'LOOP', 'MAX', 'MIN', 'MOD', 'MODULE', 'NEW', 'ODD', 'OF',
-                'OR', 'ORD', 'OUT', 'POINTER', 'PROCEDURE', 'RECORD', 'REPEAT', 'RETURN',
-                'SHORT', 'SHORTCHAR', 'SHORTINT', 'SIZE', 'THEN', 'TYPE', 'TO', 'UNTIL',
-                'VAR', 'WHILE', 'WITH'
-                ), suffix=r'\b'), Keyword.Reserved),
-            (r'(TRUE|FALSE|NIL|INF)\b', Keyword.Constant),
-        ]
-    }
-
-    def analyse_text(text):
-        """The only other lexer using .cp is the C++ one, so we check if for
-        a few common Pascal keywords here. Those are unfortunately quite
-        common across various business languages as well."""
-        result = 0
-        if 'BEGIN' in text:
-            result += 0.01
-        if 'END' in text:
-            result += 0.01
-        if 'PROCEDURE' in text:
-            result += 0.01
-        if 'END' in text:
-            result += 0.01
-
-        return result
diff --git a/voxvera/vendor/pygments/lexers/objective.py b/voxvera/vendor/pygments/lexers/objective.py
deleted file mode 100644
index 899c2c4..0000000
--- a/voxvera/vendor/pygments/lexers/objective.py
+++ /dev/null
@@ -1,513 +0,0 @@
-"""
-    pygments.lexers.objective
-    ~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Objective-C family languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include, bygroups, using, this, words, \
-    inherit, default
-from pygments.token import Text, Keyword, Name, String, Operator, \
-    Number, Punctuation, Literal, Comment, Whitespace
-
-from pygments.lexers.c_cpp import CLexer, CppLexer
-
-__all__ = ['ObjectiveCLexer', 'ObjectiveCppLexer', 'LogosLexer', 'SwiftLexer']
-
-
-def objective(baselexer):
-    """
-    Generate a subclass of baselexer that accepts the Objective-C syntax
-    extensions.
-    """
-
-    # Have to be careful not to accidentally match JavaDoc/Doxygen syntax here,
-    # since that's quite common in ordinary C/C++ files.  It's OK to match
-    # JavaDoc/Doxygen keywords that only apply to Objective-C, mind.
-    #
-    # The upshot of this is that we CANNOT match @class or @interface
-    _oc_keywords = re.compile(r'@(?:end|implementation|protocol)')
-
-    # Matches [ ? identifier  ( identifier ? ] |  identifier? : )
-    # (note the identifier is *optional* when there is a ':'!)
-    _oc_message = re.compile(r'\[\s*[a-zA-Z_]\w*\s+'
-                             r'(?:[a-zA-Z_]\w*\s*\]|'
-                             r'(?:[a-zA-Z_]\w*)?:)')
-
-    class GeneratedObjectiveCVariant(baselexer):
-        """
-        Implements Objective-C syntax on top of an existing C family lexer.
-        """
-
-        tokens = {
-            'statements': [
-                (r'@"', String, 'string'),
-                (r'@(YES|NO)', Number),
-                (r"@'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
-                (r'@(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
-                (r'@(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
-                (r'@0x[0-9a-fA-F]+[Ll]?', Number.Hex),
-                (r'@0[0-7]+[Ll]?', Number.Oct),
-                (r'@\d+[Ll]?', Number.Integer),
-                (r'@\(', Literal, 'literal_number'),
-                (r'@\[', Literal, 'literal_array'),
-                (r'@\{', Literal, 'literal_dictionary'),
-                (words((
-                    '@selector', '@private', '@protected', '@public', '@encode',
-                    '@synchronized', '@try', '@throw', '@catch', '@finally',
-                    '@end', '@property', '@synthesize', '__bridge', '__bridge_transfer',
-                    '__autoreleasing', '__block', '__weak', '__strong', 'weak', 'strong',
-                    'copy', 'retain', 'assign', 'unsafe_unretained', 'atomic', 'nonatomic',
-                    'readonly', 'readwrite', 'setter', 'getter', 'typeof', 'in',
-                    'out', 'inout', 'release', 'class', '@dynamic', '@optional',
-                    '@required', '@autoreleasepool', '@import'), suffix=r'\b'),
-                 Keyword),
-                (words(('id', 'instancetype', 'Class', 'IMP', 'SEL', 'BOOL',
-                        'IBOutlet', 'IBAction', 'unichar'), suffix=r'\b'),
-                 Keyword.Type),
-                (r'@(true|false|YES|NO)\n', Name.Builtin),
-                (r'(YES|NO|nil|self|super)\b', Name.Builtin),
-                # Carbon types
-                (r'(Boolean|UInt8|SInt8|UInt16|SInt16|UInt32|SInt32)\b', Keyword.Type),
-                # Carbon built-ins
-                (r'(TRUE|FALSE)\b', Name.Builtin),
-                (r'(@interface|@implementation)(\s+)', bygroups(Keyword, Text),
-                 ('#pop', 'oc_classname')),
-                (r'(@class|@protocol)(\s+)', bygroups(Keyword, Text),
-                 ('#pop', 'oc_forward_classname')),
-                # @ can also prefix other expressions like @{...} or @(...)
-                (r'@', Punctuation),
-                inherit,
-            ],
-            'oc_classname': [
-                # interface definition that inherits
-                (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?(\s*)(\{)',
-                 bygroups(Name.Class, Text, Name.Class, Text, Punctuation),
-                 ('#pop', 'oc_ivars')),
-                (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?',
-                 bygroups(Name.Class, Text, Name.Class), '#pop'),
-                # interface definition for a category
-                (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))(\s*)(\{)',
-                 bygroups(Name.Class, Text, Name.Label, Text, Punctuation),
-                 ('#pop', 'oc_ivars')),
-                (r'([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))',
-                 bygroups(Name.Class, Text, Name.Label), '#pop'),
-                # simple interface / implementation
-                (r'([a-zA-Z$_][\w$]*)(\s*)(\{)',
-                 bygroups(Name.Class, Text, Punctuation), ('#pop', 'oc_ivars')),
-                (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop')
-            ],
-            'oc_forward_classname': [
-                (r'([a-zA-Z$_][\w$]*)(\s*,\s*)',
-                 bygroups(Name.Class, Text), 'oc_forward_classname'),
-                (r'([a-zA-Z$_][\w$]*)(\s*;?)',
-                 bygroups(Name.Class, Text), '#pop')
-            ],
-            'oc_ivars': [
-                include('whitespace'),
-                include('statements'),
-                (';', Punctuation),
-                (r'\{', Punctuation, '#push'),
-                (r'\}', Punctuation, '#pop'),
-            ],
-            'root': [
-                # methods
-                (r'^([-+])(\s*)'                         # method marker
-                 r'(\(.*?\))?(\s*)'                      # return type
-                 r'([a-zA-Z$_][\w$]*:?)',        # begin of method name
-                 bygroups(Punctuation, Text, using(this),
-                          Text, Name.Function),
-                 'method'),
-                inherit,
-            ],
-            'method': [
-                include('whitespace'),
-                # TODO unsure if ellipses are allowed elsewhere, see
-                # discussion in Issue 789
-                (r',', Punctuation),
-                (r'\.\.\.', Punctuation),
-                (r'(\(.*?\))(\s*)([a-zA-Z$_][\w$]*)',
-                 bygroups(using(this), Text, Name.Variable)),
-                (r'[a-zA-Z$_][\w$]*:', Name.Function),
-                (';', Punctuation, '#pop'),
-                (r'\{', Punctuation, 'function'),
-                default('#pop'),
-            ],
-            'literal_number': [
-                (r'\(', Punctuation, 'literal_number_inner'),
-                (r'\)', Literal, '#pop'),
-                include('statement'),
-            ],
-            'literal_number_inner': [
-                (r'\(', Punctuation, '#push'),
-                (r'\)', Punctuation, '#pop'),
-                include('statement'),
-            ],
-            'literal_array': [
-                (r'\[', Punctuation, 'literal_array_inner'),
-                (r'\]', Literal, '#pop'),
-                include('statement'),
-            ],
-            'literal_array_inner': [
-                (r'\[', Punctuation, '#push'),
-                (r'\]', Punctuation, '#pop'),
-                include('statement'),
-            ],
-            'literal_dictionary': [
-                (r'\}', Literal, '#pop'),
-                include('statement'),
-            ],
-        }
-
-        def analyse_text(text):
-            if _oc_keywords.search(text):
-                return 1.0
-            elif '@"' in text:  # strings
-                return 0.8
-            elif re.search('@[0-9]+', text):
-                return 0.7
-            elif _oc_message.search(text):
-                return 0.8
-            return 0
-
-        def get_tokens_unprocessed(self, text, stack=('root',)):
-            from pygments.lexers._cocoa_builtins import COCOA_INTERFACES, \
-                COCOA_PROTOCOLS, COCOA_PRIMITIVES
-
-            for index, token, value in \
-                    baselexer.get_tokens_unprocessed(self, text, stack):
-                if token is Name or token is Name.Class:
-                    if value in COCOA_INTERFACES or value in COCOA_PROTOCOLS \
-                       or value in COCOA_PRIMITIVES:
-                        token = Name.Builtin.Pseudo
-
-                yield index, token, value
-
-    return GeneratedObjectiveCVariant
-
-
-class ObjectiveCLexer(objective(CLexer)):
-    """
-    For Objective-C source code with preprocessor directives.
-    """
-
-    name = 'Objective-C'
-    url = 'https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html'
-    aliases = ['objective-c', 'objectivec', 'obj-c', 'objc']
-    filenames = ['*.m', '*.h']
-    mimetypes = ['text/x-objective-c']
-    version_added = ''
-    priority = 0.05    # Lower than C
-
-
-class ObjectiveCppLexer(objective(CppLexer)):
-    """
-    For Objective-C++ source code with preprocessor directives.
-    """
-
-    name = 'Objective-C++'
-    aliases = ['objective-c++', 'objectivec++', 'obj-c++', 'objc++']
-    filenames = ['*.mm', '*.hh']
-    mimetypes = ['text/x-objective-c++']
-    version_added = ''
-    priority = 0.05    # Lower than C++
-
-
-class LogosLexer(ObjectiveCppLexer):
-    """
-    For Logos + Objective-C source code with preprocessor directives.
-    """
-
-    name = 'Logos'
-    aliases = ['logos']
-    filenames = ['*.x', '*.xi', '*.xm', '*.xmi']
-    mimetypes = ['text/x-logos']
-    version_added = '1.6'
-    priority = 0.25
-
-    tokens = {
-        'statements': [
-            (r'(%orig|%log)\b', Keyword),
-            (r'(%c)\b(\()(\s*)([a-zA-Z$_][\w$]*)(\s*)(\))',
-             bygroups(Keyword, Punctuation, Text, Name.Class, Text, Punctuation)),
-            (r'(%init)\b(\()',
-             bygroups(Keyword, Punctuation), 'logos_init_directive'),
-            (r'(%init)(?=\s*;)', bygroups(Keyword)),
-            (r'(%hook|%group)(\s+)([a-zA-Z$_][\w$]+)',
-             bygroups(Keyword, Text, Name.Class), '#pop'),
-            (r'(%subclass)(\s+)', bygroups(Keyword, Text),
-             ('#pop', 'logos_classname')),
-            inherit,
-        ],
-        'logos_init_directive': [
-            (r'\s+', Text),
-            (',', Punctuation, ('logos_init_directive', '#pop')),
-            (r'([a-zA-Z$_][\w$]*)(\s*)(=)(\s*)([^);]*)',
-             bygroups(Name.Class, Text, Punctuation, Text, Text)),
-            (r'([a-zA-Z$_][\w$]*)', Name.Class),
-            (r'\)', Punctuation, '#pop'),
-        ],
-        'logos_classname': [
-            (r'([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?',
-             bygroups(Name.Class, Text, Name.Class), '#pop'),
-            (r'([a-zA-Z$_][\w$]*)', Name.Class, '#pop')
-        ],
-        'root': [
-            (r'(%subclass)(\s+)', bygroups(Keyword, Text),
-             'logos_classname'),
-            (r'(%hook|%group)(\s+)([a-zA-Z$_][\w$]+)',
-             bygroups(Keyword, Text, Name.Class)),
-            (r'(%config)(\s*\(\s*)(\w+)(\s*=)(.*?)(\)\s*)',
-             bygroups(Keyword, Text, Name.Variable, Text, String, Text)),
-            (r'(%ctor)(\s*)(\{)', bygroups(Keyword, Text, Punctuation),
-             'function'),
-            (r'(%new)(\s*)(\()(.*?)(\))',
-             bygroups(Keyword, Text, Keyword, String, Keyword)),
-            (r'(\s*)(%end)(\s*)', bygroups(Text, Keyword, Text)),
-            inherit,
-        ],
-    }
-
-    _logos_keywords = re.compile(r'%(?:hook|ctor|init|c\()')
-
-    def analyse_text(text):
-        if LogosLexer._logos_keywords.search(text):
-            return 1.0
-        return 0
-
-
-class SwiftLexer(RegexLexer):
-    """
-    For Swift source.
-    """
-    name = 'Swift'
-    url = 'https://www.swift.org/'
-    filenames = ['*.swift']
-    aliases = ['swift']
-    mimetypes = ['text/x-swift']
-    version_added = '2.0'
-
-    tokens = {
-        'root': [
-            # Whitespace and Comments
-            (r'\n', Text),
-            (r'\s+', Whitespace),
-            (r'//', Comment.Single, 'comment-single'),
-            (r'/\*', Comment.Multiline, 'comment-multi'),
-            (r'#(if|elseif|else|endif|available)\b', Comment.Preproc, 'preproc'),
-
-            # Keywords
-            include('keywords'),
-
-            # Global Types
-            (words((
-                'Array', 'AutoreleasingUnsafeMutablePointer', 'BidirectionalReverseView',
-                'Bit', 'Bool', 'CFunctionPointer', 'COpaquePointer', 'CVaListPointer',
-                'Character', 'ClosedInterval', 'CollectionOfOne', 'ContiguousArray',
-                'Dictionary', 'DictionaryGenerator', 'DictionaryIndex', 'Double',
-                'EmptyCollection', 'EmptyGenerator', 'EnumerateGenerator',
-                'EnumerateSequence', 'FilterCollectionView',
-                'FilterCollectionViewIndex', 'FilterGenerator', 'FilterSequenceView',
-                'Float', 'Float80', 'FloatingPointClassification', 'GeneratorOf',
-                'GeneratorOfOne', 'GeneratorSequence', 'HalfOpenInterval', 'HeapBuffer',
-                'HeapBufferStorage', 'ImplicitlyUnwrappedOptional', 'IndexingGenerator',
-                'Int', 'Int16', 'Int32', 'Int64', 'Int8', 'LazyBidirectionalCollection',
-                'LazyForwardCollection', 'LazyRandomAccessCollection',
-                'LazySequence', 'MapCollectionView', 'MapSequenceGenerator',
-                'MapSequenceView', 'MirrorDisposition', 'ObjectIdentifier', 'OnHeap',
-                'Optional', 'PermutationGenerator', 'QuickLookObject',
-                'RandomAccessReverseView', 'Range', 'RangeGenerator', 'RawByte', 'Repeat',
-                'ReverseBidirectionalIndex', 'ReverseRandomAccessIndex', 'SequenceOf',
-                'SinkOf', 'Slice', 'StaticString', 'StrideThrough', 'StrideThroughGenerator',
-                'StrideTo', 'StrideToGenerator', 'String', 'UInt', 'UInt16', 'UInt32',
-                'UInt64', 'UInt8', 'UTF16', 'UTF32', 'UTF8', 'UnicodeDecodingResult',
-                'UnicodeScalar', 'Unmanaged', 'UnsafeBufferPointer',
-                'UnsafeBufferPointerGenerator', 'UnsafeMutableBufferPointer',
-                'UnsafeMutablePointer', 'UnsafePointer', 'Zip2', 'ZipGenerator2',
-                # Protocols
-                'AbsoluteValuable', 'AnyObject', 'ArrayLiteralConvertible',
-                'BidirectionalIndexType', 'BitwiseOperationsType',
-                'BooleanLiteralConvertible', 'BooleanType', 'CVarArgType',
-                'CollectionType', 'Comparable', 'DebugPrintable',
-                'DictionaryLiteralConvertible', 'Equatable',
-                'ExtendedGraphemeClusterLiteralConvertible',
-                'ExtensibleCollectionType', 'FloatLiteralConvertible',
-                'FloatingPointType', 'ForwardIndexType', 'GeneratorType', 'Hashable',
-                'IntegerArithmeticType', 'IntegerLiteralConvertible', 'IntegerType',
-                'IntervalType', 'MirrorType', 'MutableCollectionType', 'MutableSliceable',
-                'NilLiteralConvertible', 'OutputStreamType', 'Printable',
-                'RandomAccessIndexType', 'RangeReplaceableCollectionType',
-                'RawOptionSetType', 'RawRepresentable', 'Reflectable', 'SequenceType',
-                'SignedIntegerType', 'SignedNumberType', 'SinkType', 'Sliceable',
-                'Streamable', 'Strideable', 'StringInterpolationConvertible',
-                'StringLiteralConvertible', 'UnicodeCodecType',
-                'UnicodeScalarLiteralConvertible', 'UnsignedIntegerType',
-                '_ArrayBufferType', '_BidirectionalIndexType', '_CocoaStringType',
-                '_CollectionType', '_Comparable', '_ExtensibleCollectionType',
-                '_ForwardIndexType', '_Incrementable', '_IntegerArithmeticType',
-                '_IntegerType', '_ObjectiveCBridgeable', '_RandomAccessIndexType',
-                '_RawOptionSetType', '_SequenceType', '_Sequence_Type',
-                '_SignedIntegerType', '_SignedNumberType', '_Sliceable', '_Strideable',
-                '_SwiftNSArrayRequiredOverridesType', '_SwiftNSArrayType',
-                '_SwiftNSCopyingType', '_SwiftNSDictionaryRequiredOverridesType',
-                '_SwiftNSDictionaryType', '_SwiftNSEnumeratorType',
-                '_SwiftNSFastEnumerationType', '_SwiftNSStringRequiredOverridesType',
-                '_SwiftNSStringType', '_UnsignedIntegerType',
-                # Variables
-                'C_ARGC', 'C_ARGV', 'Process',
-                # Typealiases
-                'Any', 'AnyClass', 'BooleanLiteralType', 'CBool', 'CChar', 'CChar16',
-                'CChar32', 'CDouble', 'CFloat', 'CInt', 'CLong', 'CLongLong', 'CShort',
-                'CSignedChar', 'CUnsignedInt', 'CUnsignedLong', 'CUnsignedShort',
-                'CWideChar', 'ExtendedGraphemeClusterType', 'Float32', 'Float64',
-                'FloatLiteralType', 'IntMax', 'IntegerLiteralType', 'StringLiteralType',
-                'UIntMax', 'UWord', 'UnicodeScalarType', 'Void', 'Word',
-                # Foundation/Cocoa
-                'NSErrorPointer', 'NSObjectProtocol', 'Selector'), suffix=r'\b'),
-             Name.Builtin),
-            # Functions
-            (words((
-                'abs', 'advance', 'alignof', 'alignofValue', 'assert', 'assertionFailure',
-                'contains', 'count', 'countElements', 'debugPrint', 'debugPrintln',
-                'distance', 'dropFirst', 'dropLast', 'dump', 'enumerate', 'equal',
-                'extend', 'fatalError', 'filter', 'find', 'first', 'getVaList', 'indices',
-                'insert', 'isEmpty', 'join', 'last', 'lazy', 'lexicographicalCompare',
-                'map', 'max', 'maxElement', 'min', 'minElement', 'numericCast', 'overlaps',
-                'partition', 'precondition', 'preconditionFailure', 'prefix', 'print',
-                'println', 'reduce', 'reflect', 'removeAll', 'removeAtIndex', 'removeLast',
-                'removeRange', 'reverse', 'sizeof', 'sizeofValue', 'sort', 'sorted',
-                'splice', 'split', 'startsWith', 'stride', 'strideof', 'strideofValue',
-                'suffix', 'swap', 'toDebugString', 'toString', 'transcode',
-                'underestimateCount', 'unsafeAddressOf', 'unsafeBitCast', 'unsafeDowncast',
-                'withExtendedLifetime', 'withUnsafeMutablePointer',
-                'withUnsafeMutablePointers', 'withUnsafePointer', 'withUnsafePointers',
-                'withVaList'), suffix=r'\b'),
-             Name.Builtin.Pseudo),
-
-            # Implicit Block Variables
-            (r'\$\d+', Name.Variable),
-
-            # Binary Literal
-            (r'0b[01_]+', Number.Bin),
-            # Octal Literal
-            (r'0o[0-7_]+', Number.Oct),
-            # Hexadecimal Literal
-            (r'0x[0-9a-fA-F_]+', Number.Hex),
-            # Decimal Literal
-            (r'[0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|'
-             r'\.[0-9_]*|[eE][+\-]?[0-9_]+)', Number.Float),
-            (r'[0-9][0-9_]*', Number.Integer),
-            # String Literal
-            (r'"""', String, 'string-multi'),
-            (r'"', String, 'string'),
-
-            # Operators and Punctuation
-            (r'[(){}\[\].,:;=@#`?]|->|[<&?](?=\w)|(?<=\w)[>!?]', Punctuation),
-            (r'[/=\-+!*%<>&|^?~]+', Operator),
-
-            # Identifier
-            (r'[a-zA-Z_]\w*', Name)
-        ],
-        'keywords': [
-            (words((
-                'as', 'async', 'await', 'break', 'case', 'catch', 'continue', 'default', 'defer',
-                'do', 'else', 'fallthrough', 'for', 'guard', 'if', 'in', 'is',
-                'repeat', 'return', '#selector', 'switch', 'throw', 'try',
-                'where', 'while'), suffix=r'\b'),
-             Keyword),
-            (r'@availability\([^)]+\)', Keyword.Reserved),
-            (words((
-                'associativity', 'convenience', 'dynamic', 'didSet', 'final',
-                'get', 'indirect', 'infix', 'inout', 'lazy', 'left', 'mutating',
-                'none', 'nonmutating', 'optional', 'override', 'postfix',
-                'precedence', 'prefix', 'Protocol', 'required', 'rethrows',
-                'right', 'set', 'throws', 'Type', 'unowned', 'weak', 'willSet',
-                '@availability', '@autoclosure', '@noreturn',
-                '@NSApplicationMain', '@NSCopying', '@NSManaged', '@objc',
-                '@UIApplicationMain', '@IBAction', '@IBDesignable',
-                '@IBInspectable', '@IBOutlet'), suffix=r'\b'),
-             Keyword.Reserved),
-            (r'(as|dynamicType|false|is|nil|self|Self|super|true|__COLUMN__'
-             r'|__FILE__|__FUNCTION__|__LINE__|_'
-             r'|#(?:file|line|column|function))\b', Keyword.Constant),
-            (r'import\b', Keyword.Declaration, 'module'),
-            (r'(class|enum|extension|struct|protocol)(\s+)([a-zA-Z_]\w*)',
-             bygroups(Keyword.Declaration, Whitespace, Name.Class)),
-            (r'(func)(\s+)([a-zA-Z_]\w*)',
-             bygroups(Keyword.Declaration, Whitespace, Name.Function)),
-            (r'(var|let)(\s+)([a-zA-Z_]\w*)', bygroups(Keyword.Declaration,
-             Whitespace, Name.Variable)),
-            (words((
-                'actor', 'associatedtype', 'class', 'deinit', 'enum', 'extension', 'func', 'import',
-                'init', 'internal', 'let', 'operator', 'private', 'protocol', 'public',
-                'static', 'struct', 'subscript', 'typealias', 'var'), suffix=r'\b'),
-             Keyword.Declaration)
-        ],
-        'comment': [
-            (r':param: [a-zA-Z_]\w*|:returns?:|(FIXME|MARK|TODO):',
-             Comment.Special)
-        ],
-
-        # Nested
-        'comment-single': [
-            (r'\n', Whitespace, '#pop'),
-            include('comment'),
-            (r'[^\n]+', Comment.Single)
-        ],
-        'comment-multi': [
-            include('comment'),
-            (r'[^*/]+', Comment.Multiline),
-            (r'/\*', Comment.Multiline, '#push'),
-            (r'\*/', Comment.Multiline, '#pop'),
-            (r'[*/]+', Comment.Multiline)
-        ],
-        'module': [
-            (r'\n', Whitespace, '#pop'),
-            (r'[a-zA-Z_]\w*', Name.Class),
-            include('root')
-        ],
-        'preproc': [
-            (r'\n', Whitespace, '#pop'),
-            include('keywords'),
-            (r'[A-Za-z]\w*', Comment.Preproc),
-            include('root')
-        ],
-        'string': [
-            (r'"', String, '#pop'),
-            include("string-common"),
-        ],
-        'string-multi': [
-            (r'"""', String, '#pop'),
-            include("string-common"),
-        ],
-        'string-common': [
-            (r'\\\(', String.Interpol, 'string-intp'),
-            (r"""\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}"""
-             r"""|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}""", String.Escape),
-            (r'[^\\"]+', String),
-            (r'\\', String)
-        ],
-        'string-intp': [
-            (r'\(', String.Interpol, '#push'),
-            (r'\)', String.Interpol, '#pop'),
-            include('root')
-        ]
-    }
-
-    def get_tokens_unprocessed(self, text):
-        from pygments.lexers._cocoa_builtins import COCOA_INTERFACES, \
-            COCOA_PROTOCOLS, COCOA_PRIMITIVES
-
-        for index, token, value in \
-                RegexLexer.get_tokens_unprocessed(self, text):
-            if token is Name or token is Name.Class:
-                if value in COCOA_INTERFACES or value in COCOA_PROTOCOLS \
-                   or value in COCOA_PRIMITIVES:
-                    token = Name.Builtin.Pseudo
-
-            yield index, token, value
diff --git a/voxvera/vendor/pygments/lexers/ooc.py b/voxvera/vendor/pygments/lexers/ooc.py
deleted file mode 100644
index 8a99080..0000000
--- a/voxvera/vendor/pygments/lexers/ooc.py
+++ /dev/null
@@ -1,84 +0,0 @@
-"""
-    pygments.lexers.ooc
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the Ooc language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation
-
-__all__ = ['OocLexer']
-
-
-class OocLexer(RegexLexer):
-    """
-    For Ooc source code
-    """
-    name = 'Ooc'
-    url = 'https://ooc-lang.github.io/'
-    aliases = ['ooc']
-    filenames = ['*.ooc']
-    mimetypes = ['text/x-ooc']
-    version_added = '1.2'
-
-    tokens = {
-        'root': [
-            (words((
-                'class', 'interface', 'implement', 'abstract', 'extends', 'from',
-                'this', 'super', 'new', 'const', 'final', 'static', 'import',
-                'use', 'extern', 'inline', 'proto', 'break', 'continue',
-                'fallthrough', 'operator', 'if', 'else', 'for', 'while', 'do',
-                'switch', 'case', 'as', 'in', 'version', 'return', 'true',
-                'false', 'null'), prefix=r'\b', suffix=r'\b'),
-             Keyword),
-            (r'include\b', Keyword, 'include'),
-            (r'(cover)([ \t]+)(from)([ \t]+)(\w+[*@]?)',
-             bygroups(Keyword, Text, Keyword, Text, Name.Class)),
-            (r'(func)((?:[ \t]|\\\n)+)(~[a-z_]\w*)',
-             bygroups(Keyword, Text, Name.Function)),
-            (r'\bfunc\b', Keyword),
-            # Note: %= not listed on https://ooc-lang.github.io/docs/lang/operators/
-            (r'//.*', Comment),
-            (r'(?s)/\*.*?\*/', Comment.Multiline),
-            (r'(==?|\+=?|-[=>]?|\*=?|/=?|:=|!=?|%=?|\?|>{1,3}=?|<{1,3}=?|\.\.|'
-             r'&&?|\|\|?|\^=?)', Operator),
-            (r'(\.)([ \t]*)([a-z]\w*)', bygroups(Operator, Text,
-                                                 Name.Function)),
-            (r'[A-Z][A-Z0-9_]+', Name.Constant),
-            (r'[A-Z]\w*([@*]|\[[ \t]*\])?', Name.Class),
-
-            (r'([a-z]\w*(?:~[a-z]\w*)?)((?:[ \t]|\\\n)*)(?=\()',
-             bygroups(Name.Function, Text)),
-            (r'[a-z]\w*', Name.Variable),
-
-            # : introduces types
-            (r'[:(){}\[\];,]', Punctuation),
-
-            (r'0x[0-9a-fA-F]+', Number.Hex),
-            (r'0c[0-9]+', Number.Oct),
-            (r'0b[01]+', Number.Bin),
-            (r'[0-9_]\.[0-9_]*(?!\.)', Number.Float),
-            (r'[0-9_]+', Number.Decimal),
-
-            (r'"(?:\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\"])*"',
-             String.Double),
-            (r"'(?:\\.|\\[0-9]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'",
-             String.Char),
-            (r'@', Punctuation),  # pointer dereference
-            (r'\.', Punctuation),  # imports or chain operator
-
-            (r'\\[ \t\n]', Text),
-            (r'[ \t]+', Text),
-        ],
-        'include': [
-            (r'[\w/]+', Name),
-            (r',', Punctuation),
-            (r'[ \t]', Text),
-            (r'[;\n]', Text, '#pop'),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/openscad.py b/voxvera/vendor/pygments/lexers/openscad.py
deleted file mode 100644
index b06de22..0000000
--- a/voxvera/vendor/pygments/lexers/openscad.py
+++ /dev/null
@@ -1,96 +0,0 @@
-"""
-    pygments.lexers.openscad
-    ~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the OpenSCAD languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, words, include
-from pygments.token import Text, Comment, Punctuation, Operator, Keyword, Name, Number, Whitespace, Literal, String
-
-__all__ = ['OpenScadLexer']
-
-
-class OpenScadLexer(RegexLexer):
-    """For openSCAD code.
-    """
-    name = "OpenSCAD"
-    url = "https://openscad.org/"
-    aliases = ["openscad"]
-    filenames = ["*.scad"]
-    mimetypes = ["application/x-openscad"]
-    version_added = '2.16'
-
-    tokens = {
-        "root": [
-            (r"[^\S\n]+", Whitespace),
-            (r'//', Comment.Single, 'comment-single'),
-            (r'/\*', Comment.Multiline, 'comment-multi'),
-            (r"[{}\[\]\(\),;:]", Punctuation),
-            (r"[*!#%\-+=?/]", Operator),
-            (r"<=|<|==|!=|>=|>|&&|\|\|", Operator),
-            (r"\$(f[asn]|t|vp[rtd]|children)", Operator),
-            (r"(undef|PI)\b", Keyword.Constant),
-            (
-                r"(use|include)((?:\s|\\\\s)+)",
-                bygroups(Keyword.Namespace, Text),
-                "includes",
-            ),
-            (r"(module)(\s*)([^\s\(]+)",
-             bygroups(Keyword.Namespace, Whitespace, Name.Namespace)),
-            (r"(function)(\s*)([^\s\(]+)",
-             bygroups(Keyword.Declaration, Whitespace, Name.Function)),
-            (words(("true", "false"), prefix=r"\b", suffix=r"\b"), Literal),
-            (words((
-                "function", "module", "include", "use", "for",
-                "intersection_for", "if", "else", "return"
-                ), prefix=r"\b", suffix=r"\b"), Keyword
-            ),
-            (words((
-                "circle", "square", "polygon", "text", "sphere", "cube",
-                "cylinder", "polyhedron", "translate", "rotate", "scale",
-                "resize", "mirror", "multmatrix", "color", "offset", "hull",
-                "minkowski", "union", "difference", "intersection", "abs",
-                "sign", "sin", "cos", "tan", "acos", "asin", "atan", "atan2",
-                "floor", "round", "ceil", "ln", "log", "pow", "sqrt", "exp",
-                "rands", "min", "max", "concat", "lookup", "str", "chr",
-                "search", "version", "version_num", "norm", "cross",
-                "parent_module", "echo", "import", "import_dxf",
-                "dxf_linear_extrude", "linear_extrude", "rotate_extrude",
-                "surface", "projection", "render", "dxf_cross",
-                "dxf_dim", "let", "assign", "len"
-                ), prefix=r"\b", suffix=r"\b"),
-                Name.Builtin
-            ),
-            (r"\bchildren\b", Name.Builtin.Pseudo),
-            (r'""".*?"""', String.Double),
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
-            (r"-?\d+(\.\d+)?(e[+-]?\d+)?", Number),
-            (r"\w+", Name),
-        ],
-        "includes": [
-            (
-                r"(<)([^>]*)(>)",
-                bygroups(Punctuation, Comment.PreprocFile, Punctuation),
-            ),
-        ],
-        'comment': [
-            (r':param: [a-zA-Z_]\w*|:returns?:|(FIXME|MARK|TODO):',
-             Comment.Special)
-        ],
-        'comment-single': [
-            (r'\n', Text, '#pop'),
-            include('comment'),
-            (r'[^\n]+', Comment.Single)
-        ],
-        'comment-multi': [
-            include('comment'),
-            (r'[^*/]+', Comment.Multiline),
-            (r'/\*', Comment.Multiline, '#push'),
-            (r'\*/', Comment.Multiline, '#pop'),
-            (r'[*/]', Comment.Multiline)
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/other.py b/voxvera/vendor/pygments/lexers/other.py
deleted file mode 100644
index 2b7dfb4..0000000
--- a/voxvera/vendor/pygments/lexers/other.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-    pygments.lexers.other
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Just export lexer classes previously contained in this module.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-# ruff: noqa: F401
-from pygments.lexers.sql import SqlLexer, MySqlLexer, SqliteConsoleLexer
-from pygments.lexers.shell import BashLexer, BashSessionLexer, BatchLexer, \
-    TcshLexer
-from pygments.lexers.robotframework import RobotFrameworkLexer
-from pygments.lexers.testing import GherkinLexer
-from pygments.lexers.esoteric import BrainfuckLexer, BefungeLexer, RedcodeLexer
-from pygments.lexers.prolog import LogtalkLexer
-from pygments.lexers.snobol import SnobolLexer
-from pygments.lexers.rebol import RebolLexer
-from pygments.lexers.configs import KconfigLexer, Cfengine3Lexer
-from pygments.lexers.modeling import ModelicaLexer
-from pygments.lexers.scripting import AppleScriptLexer, MOOCodeLexer, \
-    HybrisLexer
-from pygments.lexers.graphics import PostScriptLexer, GnuplotLexer, \
-    AsymptoteLexer, PovrayLexer
-from pygments.lexers.business import ABAPLexer, OpenEdgeLexer, \
-    GoodDataCLLexer, MaqlLexer
-from pygments.lexers.automation import AutoItLexer, AutohotkeyLexer
-from pygments.lexers.dsls import ProtoBufLexer, BroLexer, PuppetLexer, \
-    MscgenLexer, VGLLexer
-from pygments.lexers.basic import CbmBasicV2Lexer
-from pygments.lexers.pawn import SourcePawnLexer, PawnLexer
-from pygments.lexers.ecl import ECLLexer
-from pygments.lexers.urbi import UrbiscriptLexer
-from pygments.lexers.smalltalk import SmalltalkLexer, NewspeakLexer
-from pygments.lexers.installers import NSISLexer, RPMSpecLexer
-from pygments.lexers.textedit import AwkLexer
-from pygments.lexers.smv import NuSMVLexer
-
-__all__ = []
diff --git a/voxvera/vendor/pygments/lexers/parasail.py b/voxvera/vendor/pygments/lexers/parasail.py
deleted file mode 100644
index 150d6a9..0000000
--- a/voxvera/vendor/pygments/lexers/parasail.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-    pygments.lexers.parasail
-    ~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for ParaSail.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Literal
-
-__all__ = ['ParaSailLexer']
-
-
-class ParaSailLexer(RegexLexer):
-    """
-    For ParaSail source code.
-    """
-
-    name = 'ParaSail'
-    url = 'http://www.parasail-lang.org'
-    aliases = ['parasail']
-    filenames = ['*.psi', '*.psl']
-    mimetypes = ['text/x-parasail']
-    version_added = '2.1'
-
-    flags = re.MULTILINE
-
-    tokens = {
-        'root': [
-            (r'[^\S\n]+', Text),
-            (r'//.*?\n', Comment.Single),
-            (r'\b(and|or|xor)=', Operator.Word),
-            (r'\b(and(\s+then)?|or(\s+else)?|xor|rem|mod|'
-             r'(is|not)\s+null)\b',
-             Operator.Word),
-            # Keywords
-            (r'\b(abs|abstract|all|block|class|concurrent|const|continue|'
-             r'each|end|exit|extends|exports|forward|func|global|implements|'
-             r'import|in|interface|is|lambda|locked|new|not|null|of|op|'
-             r'optional|private|queued|ref|return|reverse|separate|some|'
-             r'type|until|var|with|'
-             # Control flow
-             r'if|then|else|elsif|case|for|while|loop)\b',
-             Keyword.Reserved),
-            (r'(abstract\s+)?(interface|class|op|func|type)',
-             Keyword.Declaration),
-            # Literals
-            (r'"[^"]*"', String),
-            (r'\\[\'ntrf"0]', String.Escape),
-            (r'#[a-zA-Z]\w*', Literal),       # Enumeration
-            include('numbers'),
-            (r"'[^']'", String.Char),
-            (r'[a-zA-Z]\w*', Name),
-            # Operators and Punctuation
-            (r'(<==|==>|<=>|\*\*=|<\|=|<<=|>>=|==|!=|=\?|<=|>=|'
-             r'\*\*|<<|>>|=>|:=|\+=|-=|\*=|\|=|\||/=|\+|-|\*|/|'
-             r'\.\.|<\.\.|\.\.<|<\.\.<)',
-             Operator),
-            (r'(<|>|\[|\]|\(|\)|\||:|;|,|.|\{|\}|->)',
-             Punctuation),
-            (r'\n+', Text),
-        ],
-        'numbers': [
-            (r'\d[0-9_]*#[0-9a-fA-F][0-9a-fA-F_]*#', Number.Hex),  # any base
-            (r'0[xX][0-9a-fA-F][0-9a-fA-F_]*', Number.Hex),        # C-like hex
-            (r'0[bB][01][01_]*', Number.Bin),                      # C-like bin
-            (r'\d[0-9_]*\.\d[0-9_]*[eE][+-]\d[0-9_]*',             # float exp
-             Number.Float),
-            (r'\d[0-9_]*\.\d[0-9_]*', Number.Float),               # float
-            (r'\d[0-9_]*', Number.Integer),                        # integer
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/parsers.py b/voxvera/vendor/pygments/lexers/parsers.py
deleted file mode 100644
index 7a4ed9d..0000000
--- a/voxvera/vendor/pygments/lexers/parsers.py
+++ /dev/null
@@ -1,798 +0,0 @@
-"""
-    pygments.lexers.parsers
-    ~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for parser generators.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, DelegatingLexer, \
-    include, bygroups, using
-from pygments.token import Punctuation, Other, Text, Comment, Operator, \
-    Keyword, Name, String, Number, Whitespace
-from pygments.lexers.jvm import JavaLexer
-from pygments.lexers.c_cpp import CLexer, CppLexer
-from pygments.lexers.objective import ObjectiveCLexer
-from pygments.lexers.d import DLexer
-from pygments.lexers.dotnet import CSharpLexer
-from pygments.lexers.ruby import RubyLexer
-from pygments.lexers.python import PythonLexer
-from pygments.lexers.perl import PerlLexer
-
-__all__ = ['RagelLexer', 'RagelEmbeddedLexer', 'RagelCLexer', 'RagelDLexer',
-           'RagelCppLexer', 'RagelObjectiveCLexer', 'RagelRubyLexer',
-           'RagelJavaLexer', 'AntlrLexer', 'AntlrPythonLexer',
-           'AntlrPerlLexer', 'AntlrRubyLexer', 'AntlrCppLexer',
-           'AntlrCSharpLexer', 'AntlrObjectiveCLexer',
-           'AntlrJavaLexer', 'AntlrActionScriptLexer',
-           'TreetopLexer', 'EbnfLexer']
-
-
-class RagelLexer(RegexLexer):
-    """A pure `Ragel `_ lexer.  Use this
-    for fragments of Ragel.  For ``.rl`` files, use
-    :class:`RagelEmbeddedLexer` instead (or one of the
-    language-specific subclasses).
-
-    """
-
-    name = 'Ragel'
-    url = 'http://www.colm.net/open-source/ragel/'
-    aliases = ['ragel']
-    filenames = []
-    version_added = '1.1'
-
-    tokens = {
-        'whitespace': [
-            (r'\s+', Whitespace)
-        ],
-        'comments': [
-            (r'\#.*$', Comment),
-        ],
-        'keywords': [
-            (r'(access|action|alphtype)\b', Keyword),
-            (r'(getkey|write|machine|include)\b', Keyword),
-            (r'(any|ascii|extend|alpha|digit|alnum|lower|upper)\b', Keyword),
-            (r'(xdigit|cntrl|graph|print|punct|space|zlen|empty)\b', Keyword)
-        ],
-        'numbers': [
-            (r'0x[0-9A-Fa-f]+', Number.Hex),
-            (r'[+-]?[0-9]+', Number.Integer),
-        ],
-        'literals': [
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
-            (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
-            (r'\[(\\\\|\\[^\\]|[^\\\]])*\]', String),          # square bracket literals
-            (r'/(?!\*)(\\\\|\\[^\\]|[^/\\])*/', String.Regex),  # regular expressions
-        ],
-        'identifiers': [
-            (r'[a-zA-Z_]\w*', Name.Variable),
-        ],
-        'operators': [
-            (r',', Operator),                           # Join
-            (r'\||&|--?', Operator),                    # Union, Intersection and Subtraction
-            (r'\.|<:|:>>?', Operator),                  # Concatention
-            (r':', Operator),                           # Label
-            (r'->', Operator),                          # Epsilon Transition
-            (r'(>|\$|%|<|@|<>)(/|eof\b)', Operator),    # EOF Actions
-            (r'(>|\$|%|<|@|<>)(!|err\b)', Operator),    # Global Error Actions
-            (r'(>|\$|%|<|@|<>)(\^|lerr\b)', Operator),  # Local Error Actions
-            (r'(>|\$|%|<|@|<>)(~|to\b)', Operator),     # To-State Actions
-            (r'(>|\$|%|<|@|<>)(\*|from\b)', Operator),  # From-State Actions
-            (r'>|@|\$|%', Operator),                    # Transition Actions and Priorities
-            (r'\*|\?|\+|\{[0-9]*,[0-9]*\}', Operator),  # Repetition
-            (r'!|\^', Operator),                        # Negation
-            (r'\(|\)', Operator),                       # Grouping
-        ],
-        'root': [
-            include('literals'),
-            include('whitespace'),
-            include('comments'),
-            include('keywords'),
-            include('numbers'),
-            include('identifiers'),
-            include('operators'),
-            (r'\{', Punctuation, 'host'),
-            (r'=', Operator),
-            (r';', Punctuation),
-        ],
-        'host': [
-            (r'(' + r'|'.join((  # keep host code in largest possible chunks
-                r'[^{}\'"/#]+',  # exclude unsafe characters
-                r'[^\\]\\[{}]',  # allow escaped { or }
-
-                # strings and comments may safely contain unsafe characters
-                r'"(\\\\|\\[^\\]|[^"\\])*"',
-                r"'(\\\\|\\[^\\]|[^'\\])*'",
-                r'//.*$\n?',            # single line comment
-                r'/\*(.|\n)*?\*/',      # multi-line javadoc-style comment
-                r'\#.*$\n?',            # ruby comment
-
-                # regular expression: There's no reason for it to start
-                # with a * and this stops confusion with comments.
-                r'/(?!\*)(\\\\|\\[^\\]|[^/\\])*/',
-
-                # / is safe now that we've handled regex and javadoc comments
-                r'/',
-            )) + r')+', Other),
-
-            (r'\{', Punctuation, '#push'),
-            (r'\}', Punctuation, '#pop'),
-        ],
-    }
-
-
-class RagelEmbeddedLexer(RegexLexer):
-    """
-    A lexer for Ragel embedded in a host language file.
-
-    This will only highlight Ragel statements. If you want host language
-    highlighting then call the language-specific Ragel lexer.
-    """
-
-    name = 'Embedded Ragel'
-    aliases = ['ragel-em']
-    filenames = ['*.rl']
-    url = 'http://www.colm.net/open-source/ragel/'
-    version_added = '1.1'
-
-    tokens = {
-        'root': [
-            (r'(' + r'|'.join((   # keep host code in largest possible chunks
-                r'[^%\'"/#]+',    # exclude unsafe characters
-                r'%(?=[^%]|$)',   # a single % sign is okay, just not 2 of them
-
-                # strings and comments may safely contain unsafe characters
-                r'"(\\\\|\\[^\\]|[^"\\])*"',
-                r"'(\\\\|\\[^\\]|[^'\\])*'",
-                r'/\*(.|\n)*?\*/',      # multi-line javadoc-style comment
-                r'//.*$\n?',  # single line comment
-                r'\#.*$\n?',  # ruby/ragel comment
-                r'/(?!\*)(\\\\|\\[^\\]|[^/\\])*/',  # regular expression
-
-                # / is safe now that we've handled regex and javadoc comments
-                r'/',
-            )) + r')+', Other),
-
-            # Single Line FSM.
-            # Please don't put a quoted newline in a single line FSM.
-            # That's just mean. It will break this.
-            (r'(%%)(?![{%])(.*)($|;)(\n?)', bygroups(Punctuation,
-                                                     using(RagelLexer),
-                                                     Punctuation, Text)),
-
-            # Multi Line FSM.
-            (r'(%%%%|%%)\{', Punctuation, 'multi-line-fsm'),
-        ],
-        'multi-line-fsm': [
-            (r'(' + r'|'.join((  # keep ragel code in largest possible chunks.
-                r'(' + r'|'.join((
-                    r'[^}\'"\[/#]',   # exclude unsafe characters
-                    r'\}(?=[^%]|$)',   # } is okay as long as it's not followed by %
-                    r'\}%(?=[^%]|$)',  # ...well, one %'s okay, just not two...
-                    r'[^\\]\\[{}]',   # ...and } is okay if it's escaped
-
-                    # allow / if it's preceded with one of these symbols
-                    # (ragel EOF actions)
-                    r'(>|\$|%|<|@|<>)/',
-
-                    # specifically allow regex followed immediately by *
-                    # so it doesn't get mistaken for a comment
-                    r'/(?!\*)(\\\\|\\[^\\]|[^/\\])*/\*',
-
-                    # allow / as long as it's not followed by another / or by a *
-                    r'/(?=[^/*]|$)',
-
-                    # We want to match as many of these as we can in one block.
-                    # Not sure if we need the + sign here,
-                    # does it help performance?
-                )) + r')+',
-
-                # strings and comments may safely contain unsafe characters
-                r'"(\\\\|\\[^\\]|[^"\\])*"',
-                r"'(\\\\|\\[^\\]|[^'\\])*'",
-                r"\[(\\\\|\\[^\\]|[^\]\\])*\]",  # square bracket literal
-                r'/\*(.|\n)*?\*/',          # multi-line javadoc-style comment
-                r'//.*$\n?',                # single line comment
-                r'\#.*$\n?',                # ruby/ragel comment
-            )) + r')+', using(RagelLexer)),
-
-            (r'\}%%', Punctuation, '#pop'),
-        ]
-    }
-
-    def analyse_text(text):
-        return '@LANG: indep' in text
-
-
-class RagelRubyLexer(DelegatingLexer):
-    """
-    A lexer for Ragel in a Ruby host file.
-    """
-
-    name = 'Ragel in Ruby Host'
-    aliases = ['ragel-ruby', 'ragel-rb']
-    filenames = ['*.rl']
-    url = 'http://www.colm.net/open-source/ragel/'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(RubyLexer, RagelEmbeddedLexer, **options)
-
-    def analyse_text(text):
-        return '@LANG: ruby' in text
-
-
-class RagelCLexer(DelegatingLexer):
-    """
-    A lexer for Ragel in a C host file.
-    """
-
-    name = 'Ragel in C Host'
-    aliases = ['ragel-c']
-    filenames = ['*.rl']
-    url = 'http://www.colm.net/open-source/ragel/'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(CLexer, RagelEmbeddedLexer, **options)
-
-    def analyse_text(text):
-        return '@LANG: c' in text
-
-
-class RagelDLexer(DelegatingLexer):
-    """
-    A lexer for Ragel in a D host file.
-    """
-
-    name = 'Ragel in D Host'
-    aliases = ['ragel-d']
-    filenames = ['*.rl']
-    url = 'http://www.colm.net/open-source/ragel/'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(DLexer, RagelEmbeddedLexer, **options)
-
-    def analyse_text(text):
-        return '@LANG: d' in text
-
-
-class RagelCppLexer(DelegatingLexer):
-    """
-    A lexer for Ragel in a C++ host file.
-    """
-
-    name = 'Ragel in CPP Host'
-    aliases = ['ragel-cpp']
-    filenames = ['*.rl']
-    url = 'http://www.colm.net/open-source/ragel/'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(CppLexer, RagelEmbeddedLexer, **options)
-
-    def analyse_text(text):
-        return '@LANG: c++' in text
-
-
-class RagelObjectiveCLexer(DelegatingLexer):
-    """
-    A lexer for Ragel in an Objective C host file.
-    """
-
-    name = 'Ragel in Objective C Host'
-    aliases = ['ragel-objc']
-    filenames = ['*.rl']
-    url = 'http://www.colm.net/open-source/ragel/'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(ObjectiveCLexer, RagelEmbeddedLexer, **options)
-
-    def analyse_text(text):
-        return '@LANG: objc' in text
-
-
-class RagelJavaLexer(DelegatingLexer):
-    """
-    A lexer for Ragel in a Java host file.
-    """
-
-    name = 'Ragel in Java Host'
-    aliases = ['ragel-java']
-    filenames = ['*.rl']
-    url = 'http://www.colm.net/open-source/ragel/'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(JavaLexer, RagelEmbeddedLexer, **options)
-
-    def analyse_text(text):
-        return '@LANG: java' in text
-
-
-class AntlrLexer(RegexLexer):
-    """
-    Generic ANTLR Lexer.
-    Should not be called directly, instead
-    use DelegatingLexer for your target language.
-    """
-
-    name = 'ANTLR'
-    aliases = ['antlr']
-    filenames = []
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    _id = r'[A-Za-z]\w*'
-    _TOKEN_REF = r'[A-Z]\w*'
-    _RULE_REF = r'[a-z]\w*'
-    _STRING_LITERAL = r'\'(?:\\\\|\\\'|[^\']*)\''
-    _INT = r'[0-9]+'
-
-    tokens = {
-        'whitespace': [
-            (r'\s+', Whitespace),
-        ],
-        'comments': [
-            (r'//.*$', Comment),
-            (r'/\*(.|\n)*?\*/', Comment),
-        ],
-        'root': [
-            include('whitespace'),
-            include('comments'),
-
-            (r'(lexer|parser|tree)?(\s*)(grammar\b)(\s*)(' + _id + ')(;)',
-             bygroups(Keyword, Whitespace, Keyword, Whitespace, Name.Class,
-                      Punctuation)),
-            # optionsSpec
-            (r'options\b', Keyword, 'options'),
-            # tokensSpec
-            (r'tokens\b', Keyword, 'tokens'),
-            # attrScope
-            (r'(scope)(\s*)(' + _id + r')(\s*)(\{)',
-             bygroups(Keyword, Whitespace, Name.Variable, Whitespace,
-                      Punctuation), 'action'),
-            # exception
-            (r'(catch|finally)\b', Keyword, 'exception'),
-            # action
-            (r'(@' + _id + r')(\s*)(::)?(\s*)(' + _id + r')(\s*)(\{)',
-             bygroups(Name.Label, Whitespace, Punctuation, Whitespace,
-                      Name.Label, Whitespace, Punctuation), 'action'),
-            # rule
-            (r'((?:protected|private|public|fragment)\b)?(\s*)(' + _id + ')(!)?',
-             bygroups(Keyword, Whitespace, Name.Label, Punctuation),
-             ('rule-alts', 'rule-prelims')),
-        ],
-        'exception': [
-            (r'\n', Whitespace, '#pop'),
-            (r'\s', Whitespace),
-            include('comments'),
-
-            (r'\[', Punctuation, 'nested-arg-action'),
-            (r'\{', Punctuation, 'action'),
-        ],
-        'rule-prelims': [
-            include('whitespace'),
-            include('comments'),
-
-            (r'returns\b', Keyword),
-            (r'\[', Punctuation, 'nested-arg-action'),
-            (r'\{', Punctuation, 'action'),
-            # throwsSpec
-            (r'(throws)(\s+)(' + _id + ')',
-             bygroups(Keyword, Whitespace, Name.Label)),
-            (r'(,)(\s*)(' + _id + ')',
-             bygroups(Punctuation, Whitespace, Name.Label)),  # Additional throws
-            # optionsSpec
-            (r'options\b', Keyword, 'options'),
-            # ruleScopeSpec - scope followed by target language code or name of action
-            # TODO finish implementing other possibilities for scope
-            # L173 ANTLRv3.g from ANTLR book
-            (r'(scope)(\s+)(\{)', bygroups(Keyword, Whitespace, Punctuation),
-             'action'),
-            (r'(scope)(\s+)(' + _id + r')(\s*)(;)',
-             bygroups(Keyword, Whitespace, Name.Label, Whitespace, Punctuation)),
-            # ruleAction
-            (r'(@' + _id + r')(\s*)(\{)',
-             bygroups(Name.Label, Whitespace, Punctuation), 'action'),
-            # finished prelims, go to rule alts!
-            (r':', Punctuation, '#pop')
-        ],
-        'rule-alts': [
-            include('whitespace'),
-            include('comments'),
-
-            # These might need to go in a separate 'block' state triggered by (
-            (r'options\b', Keyword, 'options'),
-            (r':', Punctuation),
-
-            # literals
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
-            (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
-            (r'<<([^>]|>[^>])>>', String),
-            # identifiers
-            # Tokens start with capital letter.
-            (r'\$?[A-Z_]\w*', Name.Constant),
-            # Rules start with small letter.
-            (r'\$?[a-z_]\w*', Name.Variable),
-            # operators
-            (r'(\+|\||->|=>|=|\(|\)|\.\.|\.|\?|\*|\^|!|\#|~)', Operator),
-            (r',', Punctuation),
-            (r'\[', Punctuation, 'nested-arg-action'),
-            (r'\{', Punctuation, 'action'),
-            (r';', Punctuation, '#pop')
-        ],
-        'tokens': [
-            include('whitespace'),
-            include('comments'),
-            (r'\{', Punctuation),
-            (r'(' + _TOKEN_REF + r')(\s*)(=)?(\s*)(' + _STRING_LITERAL
-             + r')?(\s*)(;)',
-             bygroups(Name.Label, Whitespace, Punctuation, Whitespace,
-                      String, Whitespace, Punctuation)),
-            (r'\}', Punctuation, '#pop'),
-        ],
-        'options': [
-            include('whitespace'),
-            include('comments'),
-            (r'\{', Punctuation),
-            (r'(' + _id + r')(\s*)(=)(\s*)(' +
-             '|'.join((_id, _STRING_LITERAL, _INT, r'\*')) + r')(\s*)(;)',
-             bygroups(Name.Variable, Whitespace, Punctuation, Whitespace,
-                      Text, Whitespace, Punctuation)),
-            (r'\}', Punctuation, '#pop'),
-        ],
-        'action': [
-            (r'(' + r'|'.join((    # keep host code in largest possible chunks
-                r'[^${}\'"/\\]+',  # exclude unsafe characters
-
-                # strings and comments may safely contain unsafe characters
-                r'"(\\\\|\\[^\\]|[^"\\])*"',
-                r"'(\\\\|\\[^\\]|[^'\\])*'",
-                r'//.*$\n?',            # single line comment
-                r'/\*(.|\n)*?\*/',      # multi-line javadoc-style comment
-
-                # regular expression: There's no reason for it to start
-                # with a * and this stops confusion with comments.
-                r'/(?!\*)(\\\\|\\[^\\]|[^/\\])*/',
-
-                # backslashes are okay, as long as we are not backslashing a %
-                r'\\(?!%)',
-
-                # Now that we've handled regex and javadoc comments
-                # it's safe to let / through.
-                r'/',
-            )) + r')+', Other),
-            (r'(\\)(%)', bygroups(Punctuation, Other)),
-            (r'(\$[a-zA-Z]+)(\.?)(text|value)?',
-             bygroups(Name.Variable, Punctuation, Name.Property)),
-            (r'\{', Punctuation, '#push'),
-            (r'\}', Punctuation, '#pop'),
-        ],
-        'nested-arg-action': [
-            (r'(' + r'|'.join((    # keep host code in largest possible chunks.
-                r'[^$\[\]\'"/]+',  # exclude unsafe characters
-
-                # strings and comments may safely contain unsafe characters
-                r'"(\\\\|\\[^\\]|[^"\\])*"',
-                r"'(\\\\|\\[^\\]|[^'\\])*'",
-                r'//.*$\n?',            # single line comment
-                r'/\*(.|\n)*?\*/',      # multi-line javadoc-style comment
-
-                # regular expression: There's no reason for it to start
-                # with a * and this stops confusion with comments.
-                r'/(?!\*)(\\\\|\\[^\\]|[^/\\])*/',
-
-                # Now that we've handled regex and javadoc comments
-                # it's safe to let / through.
-                r'/',
-            )) + r')+', Other),
-
-
-            (r'\[', Punctuation, '#push'),
-            (r'\]', Punctuation, '#pop'),
-            (r'(\$[a-zA-Z]+)(\.?)(text|value)?',
-             bygroups(Name.Variable, Punctuation, Name.Property)),
-            (r'(\\\\|\\\]|\\\[|[^\[\]])+', Other),
-        ]
-    }
-
-    def analyse_text(text):
-        return re.search(r'^\s*grammar\s+[a-zA-Z0-9]+\s*;', text, re.M)
-
-
-# http://www.antlr.org/wiki/display/ANTLR3/Code+Generation+Targets
-
-class AntlrCppLexer(DelegatingLexer):
-    """
-    ANTLR with C++ Target
-    """
-
-    name = 'ANTLR With CPP Target'
-    aliases = ['antlr-cpp']
-    filenames = ['*.G', '*.g']
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(CppLexer, AntlrLexer, **options)
-
-    def analyse_text(text):
-        return AntlrLexer.analyse_text(text) and \
-            re.search(r'^\s*language\s*=\s*C\s*;', text, re.M)
-
-
-class AntlrObjectiveCLexer(DelegatingLexer):
-    """
-    ANTLR with Objective-C Target
-    """
-
-    name = 'ANTLR With ObjectiveC Target'
-    aliases = ['antlr-objc']
-    filenames = ['*.G', '*.g']
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(ObjectiveCLexer, AntlrLexer, **options)
-
-    def analyse_text(text):
-        return AntlrLexer.analyse_text(text) and \
-            re.search(r'^\s*language\s*=\s*ObjC\s*;', text)
-
-
-class AntlrCSharpLexer(DelegatingLexer):
-    """
-    ANTLR with C# Target
-    """
-
-    name = 'ANTLR With C# Target'
-    aliases = ['antlr-csharp', 'antlr-c#']
-    filenames = ['*.G', '*.g']
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(CSharpLexer, AntlrLexer, **options)
-
-    def analyse_text(text):
-        return AntlrLexer.analyse_text(text) and \
-            re.search(r'^\s*language\s*=\s*CSharp2\s*;', text, re.M)
-
-
-class AntlrPythonLexer(DelegatingLexer):
-    """
-    ANTLR with Python Target
-    """
-
-    name = 'ANTLR With Python Target'
-    aliases = ['antlr-python']
-    filenames = ['*.G', '*.g']
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(PythonLexer, AntlrLexer, **options)
-
-    def analyse_text(text):
-        return AntlrLexer.analyse_text(text) and \
-            re.search(r'^\s*language\s*=\s*Python\s*;', text, re.M)
-
-
-class AntlrJavaLexer(DelegatingLexer):
-    """
-    ANTLR with Java Target
-    """
-
-    name = 'ANTLR With Java Target'
-    aliases = ['antlr-java']
-    filenames = ['*.G', '*.g']
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(JavaLexer, AntlrLexer, **options)
-
-    def analyse_text(text):
-        # Antlr language is Java by default
-        return AntlrLexer.analyse_text(text) and 0.9
-
-
-class AntlrRubyLexer(DelegatingLexer):
-    """
-    ANTLR with Ruby Target
-    """
-
-    name = 'ANTLR With Ruby Target'
-    aliases = ['antlr-ruby', 'antlr-rb']
-    filenames = ['*.G', '*.g']
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(RubyLexer, AntlrLexer, **options)
-
-    def analyse_text(text):
-        return AntlrLexer.analyse_text(text) and \
-            re.search(r'^\s*language\s*=\s*Ruby\s*;', text, re.M)
-
-
-class AntlrPerlLexer(DelegatingLexer):
-    """
-    ANTLR with Perl Target
-    """
-
-    name = 'ANTLR With Perl Target'
-    aliases = ['antlr-perl']
-    filenames = ['*.G', '*.g']
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        super().__init__(PerlLexer, AntlrLexer, **options)
-
-    def analyse_text(text):
-        return AntlrLexer.analyse_text(text) and \
-            re.search(r'^\s*language\s*=\s*Perl5\s*;', text, re.M)
-
-
-class AntlrActionScriptLexer(DelegatingLexer):
-    """
-    ANTLR with ActionScript Target
-    """
-
-    name = 'ANTLR With ActionScript Target'
-    aliases = ['antlr-actionscript', 'antlr-as']
-    filenames = ['*.G', '*.g']
-    url = 'https://www.antlr.org'
-    version_added = '1.1'
-
-    def __init__(self, **options):
-        from pygments.lexers.actionscript import ActionScriptLexer
-        super().__init__(ActionScriptLexer, AntlrLexer, **options)
-
-    def analyse_text(text):
-        return AntlrLexer.analyse_text(text) and \
-            re.search(r'^\s*language\s*=\s*ActionScript\s*;', text, re.M)
-
-
-class TreetopBaseLexer(RegexLexer):
-    """
-    A base lexer for `Treetop `_ grammars.
-    Not for direct use; use :class:`TreetopLexer` instead.
-
-    .. versionadded:: 1.6
-    """
-
-    tokens = {
-        'root': [
-            include('space'),
-            (r'require[ \t]+[^\n\r]+[\n\r]', Other),
-            (r'module\b', Keyword.Namespace, 'module'),
-            (r'grammar\b', Keyword, 'grammar'),
-        ],
-        'module': [
-            include('space'),
-            include('end'),
-            (r'module\b', Keyword, '#push'),
-            (r'grammar\b', Keyword, 'grammar'),
-            (r'[A-Z]\w*(?:::[A-Z]\w*)*', Name.Namespace),
-        ],
-        'grammar': [
-            include('space'),
-            include('end'),
-            (r'rule\b', Keyword, 'rule'),
-            (r'include\b', Keyword, 'include'),
-            (r'[A-Z]\w*', Name),
-        ],
-        'include': [
-            include('space'),
-            (r'[A-Z]\w*(?:::[A-Z]\w*)*', Name.Class, '#pop'),
-        ],
-        'rule': [
-            include('space'),
-            include('end'),
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
-            (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
-            (r'([A-Za-z_]\w*)(:)', bygroups(Name.Label, Punctuation)),
-            (r'[A-Za-z_]\w*', Name),
-            (r'[()]', Punctuation),
-            (r'[?+*/&!~]', Operator),
-            (r'\[(?:\\.|\[:\^?[a-z]+:\]|[^\\\]])+\]', String.Regex),
-            (r'([0-9]*)(\.\.)([0-9]*)',
-             bygroups(Number.Integer, Operator, Number.Integer)),
-            (r'(<)([^>]+)(>)', bygroups(Punctuation, Name.Class, Punctuation)),
-            (r'\{', Punctuation, 'inline_module'),
-            (r'\.', String.Regex),
-        ],
-        'inline_module': [
-            (r'\{', Other, 'ruby'),
-            (r'\}', Punctuation, '#pop'),
-            (r'[^{}]+', Other),
-        ],
-        'ruby': [
-            (r'\{', Other, '#push'),
-            (r'\}', Other, '#pop'),
-            (r'[^{}]+', Other),
-        ],
-        'space': [
-            (r'[ \t\n\r]+', Whitespace),
-            (r'#[^\n]*', Comment.Single),
-        ],
-        'end': [
-            (r'end\b', Keyword, '#pop'),
-        ],
-    }
-
-
-class TreetopLexer(DelegatingLexer):
-    """
-    A lexer for Treetop grammars.
-    """
-
-    name = 'Treetop'
-    aliases = ['treetop']
-    filenames = ['*.treetop', '*.tt']
-    url = 'https://cjheath.github.io/treetop'
-    version_added = '1.6'
-
-    def __init__(self, **options):
-        super().__init__(RubyLexer, TreetopBaseLexer, **options)
-
-
-class EbnfLexer(RegexLexer):
-    """
-    Lexer for `ISO/IEC 14977 EBNF
-    `_
-    grammars.
-    """
-
-    name = 'EBNF'
-    aliases = ['ebnf']
-    filenames = ['*.ebnf']
-    mimetypes = ['text/x-ebnf']
-    url = 'https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_Form'
-    version_added = '2.0'
-
-    tokens = {
-        'root': [
-            include('whitespace'),
-            include('comment_start'),
-            include('identifier'),
-            (r'=', Operator, 'production'),
-        ],
-        'production': [
-            include('whitespace'),
-            include('comment_start'),
-            include('identifier'),
-            (r'"[^"]*"', String.Double),
-            (r"'[^']*'", String.Single),
-            (r'(\?[^?]*\?)', Name.Entity),
-            (r'[\[\]{}(),|]', Punctuation),
-            (r'-', Operator),
-            (r';', Punctuation, '#pop'),
-            (r'\.', Punctuation, '#pop'),
-        ],
-        'whitespace': [
-            (r'\s+', Text),
-        ],
-        'comment_start': [
-            (r'\(\*', Comment.Multiline, 'comment'),
-        ],
-        'comment': [
-            (r'[^*)]', Comment.Multiline),
-            include('comment_start'),
-            (r'\*\)', Comment.Multiline, '#pop'),
-            (r'[*)]', Comment.Multiline),
-        ],
-        'identifier': [
-            (r'([a-zA-Z][\w \-]*)', Keyword),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/pascal.py b/voxvera/vendor/pygments/lexers/pascal.py
deleted file mode 100644
index 5f40dcc..0000000
--- a/voxvera/vendor/pygments/lexers/pascal.py
+++ /dev/null
@@ -1,644 +0,0 @@
-"""
-    pygments.lexers.pascal
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Pascal family languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import Lexer
-from pygments.util import get_bool_opt, get_list_opt
-from pygments.token import Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Error, Whitespace
-from pygments.scanner import Scanner
-
-# compatibility import
-from pygments.lexers.modula2 import Modula2Lexer # noqa: F401
-
-__all__ = ['DelphiLexer', 'PortugolLexer']
-
-
-class PortugolLexer(Lexer):
-    """For Portugol, a Pascal dialect with keywords in Portuguese."""
-    name = 'Portugol'
-    aliases = ['portugol']
-    filenames = ['*.alg', '*.portugol']
-    mimetypes = []
-    url = "https://www.apoioinformatica.inf.br/produtos/visualg/linguagem"
-    version_added = ''
-
-    def __init__(self, **options):
-        Lexer.__init__(self, **options)
-        self.lexer = DelphiLexer(**options, portugol=True)
-
-    def get_tokens_unprocessed(self, text):
-        return self.lexer.get_tokens_unprocessed(text)
-
-
-class DelphiLexer(Lexer):
-    """
-    For Delphi (Borland Object Pascal),
-    Turbo Pascal and Free Pascal source code.
-
-    Additional options accepted:
-
-    `turbopascal`
-        Highlight Turbo Pascal specific keywords (default: ``True``).
-    `delphi`
-        Highlight Borland Delphi specific keywords (default: ``True``).
-    `freepascal`
-        Highlight Free Pascal specific keywords (default: ``True``).
-    `units`
-        A list of units that should be considered builtin, supported are
-        ``System``, ``SysUtils``, ``Classes`` and ``Math``.
-        Default is to consider all of them builtin.
-    """
-    name = 'Delphi'
-    aliases = ['delphi', 'pas', 'pascal', 'objectpascal']
-    filenames = ['*.pas', '*.dpr']
-    mimetypes = ['text/x-pascal']
-    url = 'https://www.embarcadero.com/products/delphi'
-    version_added = ''
-
-    TURBO_PASCAL_KEYWORDS = (
-        'absolute', 'and', 'array', 'asm', 'begin', 'break', 'case',
-        'const', 'constructor', 'continue', 'destructor', 'div', 'do',
-        'downto', 'else', 'end', 'file', 'for', 'function', 'goto',
-        'if', 'implementation', 'in', 'inherited', 'inline', 'interface',
-        'label', 'mod', 'nil', 'not', 'object', 'of', 'on', 'operator',
-        'or', 'packed', 'procedure', 'program', 'record', 'reintroduce',
-        'repeat', 'self', 'set', 'shl', 'shr', 'string', 'then', 'to',
-        'type', 'unit', 'until', 'uses', 'var', 'while', 'with', 'xor'
-    )
-
-    DELPHI_KEYWORDS = (
-        'as', 'class', 'except', 'exports', 'finalization', 'finally',
-        'initialization', 'is', 'library', 'on', 'property', 'raise',
-        'threadvar', 'try'
-    )
-
-    FREE_PASCAL_KEYWORDS = (
-        'dispose', 'exit', 'false', 'new', 'true'
-    )
-
-    BLOCK_KEYWORDS = {
-        'begin', 'class', 'const', 'constructor', 'destructor', 'end',
-        'finalization', 'function', 'implementation', 'initialization',
-        'label', 'library', 'operator', 'procedure', 'program', 'property',
-        'record', 'threadvar', 'type', 'unit', 'uses', 'var'
-    }
-
-    FUNCTION_MODIFIERS = {
-        'alias', 'cdecl', 'export', 'inline', 'interrupt', 'nostackframe',
-        'pascal', 'register', 'safecall', 'softfloat', 'stdcall',
-        'varargs', 'name', 'dynamic', 'near', 'virtual', 'external',
-        'override', 'assembler'
-    }
-
-    # XXX: those aren't global. but currently we know no way for defining
-    #      them just for the type context.
-    DIRECTIVES = {
-        'absolute', 'abstract', 'assembler', 'cppdecl', 'default', 'far',
-        'far16', 'forward', 'index', 'oldfpccall', 'private', 'protected',
-        'published', 'public'
-    }
-
-    BUILTIN_TYPES = {
-        'ansichar', 'ansistring', 'bool', 'boolean', 'byte', 'bytebool',
-        'cardinal', 'char', 'comp', 'currency', 'double', 'dword',
-        'extended', 'int64', 'integer', 'iunknown', 'longbool', 'longint',
-        'longword', 'pansichar', 'pansistring', 'pbool', 'pboolean',
-        'pbyte', 'pbytearray', 'pcardinal', 'pchar', 'pcomp', 'pcurrency',
-        'pdate', 'pdatetime', 'pdouble', 'pdword', 'pextended', 'phandle',
-        'pint64', 'pinteger', 'plongint', 'plongword', 'pointer',
-        'ppointer', 'pshortint', 'pshortstring', 'psingle', 'psmallint',
-        'pstring', 'pvariant', 'pwidechar', 'pwidestring', 'pword',
-        'pwordarray', 'pwordbool', 'real', 'real48', 'shortint',
-        'shortstring', 'single', 'smallint', 'string', 'tclass', 'tdate',
-        'tdatetime', 'textfile', 'thandle', 'tobject', 'ttime', 'variant',
-        'widechar', 'widestring', 'word', 'wordbool'
-    }
-
-    BUILTIN_UNITS = {
-        'System': (
-            'abs', 'acquireexceptionobject', 'addr', 'ansitoutf8',
-            'append', 'arctan', 'assert', 'assigned', 'assignfile',
-            'beginthread', 'blockread', 'blockwrite', 'break', 'chdir',
-            'chr', 'close', 'closefile', 'comptocurrency', 'comptodouble',
-            'concat', 'continue', 'copy', 'cos', 'dec', 'delete',
-            'dispose', 'doubletocomp', 'endthread', 'enummodules',
-            'enumresourcemodules', 'eof', 'eoln', 'erase', 'exceptaddr',
-            'exceptobject', 'exclude', 'exit', 'exp', 'filepos', 'filesize',
-            'fillchar', 'finalize', 'findclasshinstance', 'findhinstance',
-            'findresourcehinstance', 'flush', 'frac', 'freemem',
-            'get8087cw', 'getdir', 'getlasterror', 'getmem',
-            'getmemorymanager', 'getmodulefilename', 'getvariantmanager',
-            'halt', 'hi', 'high', 'inc', 'include', 'initialize', 'insert',
-            'int', 'ioresult', 'ismemorymanagerset', 'isvariantmanagerset',
-            'length', 'ln', 'lo', 'low', 'mkdir', 'move', 'new', 'odd',
-            'olestrtostring', 'olestrtostrvar', 'ord', 'paramcount',
-            'paramstr', 'pi', 'pos', 'pred', 'ptr', 'pucs4chars', 'random',
-            'randomize', 'read', 'readln', 'reallocmem',
-            'releaseexceptionobject', 'rename', 'reset', 'rewrite', 'rmdir',
-            'round', 'runerror', 'seek', 'seekeof', 'seekeoln',
-            'set8087cw', 'setlength', 'setlinebreakstyle',
-            'setmemorymanager', 'setstring', 'settextbuf',
-            'setvariantmanager', 'sin', 'sizeof', 'slice', 'sqr', 'sqrt',
-            'str', 'stringofchar', 'stringtoolestr', 'stringtowidechar',
-            'succ', 'swap', 'trunc', 'truncate', 'typeinfo',
-            'ucs4stringtowidestring', 'unicodetoutf8', 'uniquestring',
-            'upcase', 'utf8decode', 'utf8encode', 'utf8toansi',
-            'utf8tounicode', 'val', 'vararrayredim', 'varclear',
-            'widecharlentostring', 'widecharlentostrvar',
-            'widechartostring', 'widechartostrvar',
-            'widestringtoucs4string', 'write', 'writeln'
-        ),
-        'SysUtils': (
-            'abort', 'addexitproc', 'addterminateproc', 'adjustlinebreaks',
-            'allocmem', 'ansicomparefilename', 'ansicomparestr',
-            'ansicomparetext', 'ansidequotedstr', 'ansiextractquotedstr',
-            'ansilastchar', 'ansilowercase', 'ansilowercasefilename',
-            'ansipos', 'ansiquotedstr', 'ansisamestr', 'ansisametext',
-            'ansistrcomp', 'ansistricomp', 'ansistrlastchar', 'ansistrlcomp',
-            'ansistrlicomp', 'ansistrlower', 'ansistrpos', 'ansistrrscan',
-            'ansistrscan', 'ansistrupper', 'ansiuppercase',
-            'ansiuppercasefilename', 'appendstr', 'assignstr', 'beep',
-            'booltostr', 'bytetocharindex', 'bytetocharlen', 'bytetype',
-            'callterminateprocs', 'changefileext', 'charlength',
-            'chartobyteindex', 'chartobytelen', 'comparemem', 'comparestr',
-            'comparetext', 'createdir', 'createguid', 'currentyear',
-            'currtostr', 'currtostrf', 'date', 'datetimetofiledate',
-            'datetimetostr', 'datetimetostring', 'datetimetosystemtime',
-            'datetimetotimestamp', 'datetostr', 'dayofweek', 'decodedate',
-            'decodedatefully', 'decodetime', 'deletefile', 'directoryexists',
-            'diskfree', 'disksize', 'disposestr', 'encodedate', 'encodetime',
-            'exceptionerrormessage', 'excludetrailingbackslash',
-            'excludetrailingpathdelimiter', 'expandfilename',
-            'expandfilenamecase', 'expanduncfilename', 'extractfiledir',
-            'extractfiledrive', 'extractfileext', 'extractfilename',
-            'extractfilepath', 'extractrelativepath', 'extractshortpathname',
-            'fileage', 'fileclose', 'filecreate', 'filedatetodatetime',
-            'fileexists', 'filegetattr', 'filegetdate', 'fileisreadonly',
-            'fileopen', 'fileread', 'filesearch', 'fileseek', 'filesetattr',
-            'filesetdate', 'filesetreadonly', 'filewrite', 'finalizepackage',
-            'findclose', 'findcmdlineswitch', 'findfirst', 'findnext',
-            'floattocurr', 'floattodatetime', 'floattodecimal', 'floattostr',
-            'floattostrf', 'floattotext', 'floattotextfmt', 'fmtloadstr',
-            'fmtstr', 'forcedirectories', 'format', 'formatbuf', 'formatcurr',
-            'formatdatetime', 'formatfloat', 'freeandnil', 'getcurrentdir',
-            'getenvironmentvariable', 'getfileversion', 'getformatsettings',
-            'getlocaleformatsettings', 'getmodulename', 'getpackagedescription',
-            'getpackageinfo', 'gettime', 'guidtostring', 'incamonth',
-            'includetrailingbackslash', 'includetrailingpathdelimiter',
-            'incmonth', 'initializepackage', 'interlockeddecrement',
-            'interlockedexchange', 'interlockedexchangeadd',
-            'interlockedincrement', 'inttohex', 'inttostr', 'isdelimiter',
-            'isequalguid', 'isleapyear', 'ispathdelimiter', 'isvalidident',
-            'languages', 'lastdelimiter', 'loadpackage', 'loadstr',
-            'lowercase', 'msecstotimestamp', 'newstr', 'nextcharindex', 'now',
-            'outofmemoryerror', 'quotedstr', 'raiselastoserror',
-            'raiselastwin32error', 'removedir', 'renamefile', 'replacedate',
-            'replacetime', 'safeloadlibrary', 'samefilename', 'sametext',
-            'setcurrentdir', 'showexception', 'sleep', 'stralloc', 'strbufsize',
-            'strbytetype', 'strcat', 'strcharlength', 'strcomp', 'strcopy',
-            'strdispose', 'strecopy', 'strend', 'strfmt', 'stricomp',
-            'stringreplace', 'stringtoguid', 'strlcat', 'strlcomp', 'strlcopy',
-            'strlen', 'strlfmt', 'strlicomp', 'strlower', 'strmove', 'strnew',
-            'strnextchar', 'strpas', 'strpcopy', 'strplcopy', 'strpos',
-            'strrscan', 'strscan', 'strtobool', 'strtobooldef', 'strtocurr',
-            'strtocurrdef', 'strtodate', 'strtodatedef', 'strtodatetime',
-            'strtodatetimedef', 'strtofloat', 'strtofloatdef', 'strtoint',
-            'strtoint64', 'strtoint64def', 'strtointdef', 'strtotime',
-            'strtotimedef', 'strupper', 'supports', 'syserrormessage',
-            'systemtimetodatetime', 'texttofloat', 'time', 'timestamptodatetime',
-            'timestamptomsecs', 'timetostr', 'trim', 'trimleft', 'trimright',
-            'tryencodedate', 'tryencodetime', 'tryfloattocurr', 'tryfloattodatetime',
-            'trystrtobool', 'trystrtocurr', 'trystrtodate', 'trystrtodatetime',
-            'trystrtofloat', 'trystrtoint', 'trystrtoint64', 'trystrtotime',
-            'unloadpackage', 'uppercase', 'widecomparestr', 'widecomparetext',
-            'widefmtstr', 'wideformat', 'wideformatbuf', 'widelowercase',
-            'widesamestr', 'widesametext', 'wideuppercase', 'win32check',
-            'wraptext'
-        ),
-        'Classes': (
-            'activateclassgroup', 'allocatehwnd', 'bintohex', 'checksynchronize',
-            'collectionsequal', 'countgenerations', 'deallocatehwnd', 'equalrect',
-            'extractstrings', 'findclass', 'findglobalcomponent', 'getclass',
-            'groupdescendantswith', 'hextobin', 'identtoint',
-            'initinheritedcomponent', 'inttoident', 'invalidpoint',
-            'isuniqueglobalcomponentname', 'linestart', 'objectbinarytotext',
-            'objectresourcetotext', 'objecttexttobinary', 'objecttexttoresource',
-            'pointsequal', 'readcomponentres', 'readcomponentresex',
-            'readcomponentresfile', 'rect', 'registerclass', 'registerclassalias',
-            'registerclasses', 'registercomponents', 'registerintegerconsts',
-            'registernoicon', 'registernonactivex', 'smallpoint', 'startclassgroup',
-            'teststreamformat', 'unregisterclass', 'unregisterclasses',
-            'unregisterintegerconsts', 'unregistermoduleclasses',
-            'writecomponentresfile'
-        ),
-        'Math': (
-            'arccos', 'arccosh', 'arccot', 'arccoth', 'arccsc', 'arccsch', 'arcsec',
-            'arcsech', 'arcsin', 'arcsinh', 'arctan2', 'arctanh', 'ceil',
-            'comparevalue', 'cosecant', 'cosh', 'cot', 'cotan', 'coth', 'csc',
-            'csch', 'cycletodeg', 'cycletograd', 'cycletorad', 'degtocycle',
-            'degtograd', 'degtorad', 'divmod', 'doubledecliningbalance',
-            'ensurerange', 'floor', 'frexp', 'futurevalue', 'getexceptionmask',
-            'getprecisionmode', 'getroundmode', 'gradtocycle', 'gradtodeg',
-            'gradtorad', 'hypot', 'inrange', 'interestpayment', 'interestrate',
-            'internalrateofreturn', 'intpower', 'isinfinite', 'isnan', 'iszero',
-            'ldexp', 'lnxp1', 'log10', 'log2', 'logn', 'max', 'maxintvalue',
-            'maxvalue', 'mean', 'meanandstddev', 'min', 'minintvalue', 'minvalue',
-            'momentskewkurtosis', 'netpresentvalue', 'norm', 'numberofperiods',
-            'payment', 'periodpayment', 'poly', 'popnstddev', 'popnvariance',
-            'power', 'presentvalue', 'radtocycle', 'radtodeg', 'radtograd',
-            'randg', 'randomrange', 'roundto', 'samevalue', 'sec', 'secant',
-            'sech', 'setexceptionmask', 'setprecisionmode', 'setroundmode',
-            'sign', 'simpleroundto', 'sincos', 'sinh', 'slndepreciation', 'stddev',
-            'sum', 'sumint', 'sumofsquares', 'sumsandsquares', 'syddepreciation',
-            'tan', 'tanh', 'totalvariance', 'variance'
-        )
-    }
-
-    ASM_REGISTERS = {
-        'ah', 'al', 'ax', 'bh', 'bl', 'bp', 'bx', 'ch', 'cl', 'cr0',
-        'cr1', 'cr2', 'cr3', 'cr4', 'cs', 'cx', 'dh', 'di', 'dl', 'dr0',
-        'dr1', 'dr2', 'dr3', 'dr4', 'dr5', 'dr6', 'dr7', 'ds', 'dx',
-        'eax', 'ebp', 'ebx', 'ecx', 'edi', 'edx', 'es', 'esi', 'esp',
-        'fs', 'gs', 'mm0', 'mm1', 'mm2', 'mm3', 'mm4', 'mm5', 'mm6',
-        'mm7', 'si', 'sp', 'ss', 'st0', 'st1', 'st2', 'st3', 'st4', 'st5',
-        'st6', 'st7', 'xmm0', 'xmm1', 'xmm2', 'xmm3', 'xmm4', 'xmm5',
-        'xmm6', 'xmm7'
-    }
-
-    ASM_INSTRUCTIONS = {
-        'aaa', 'aad', 'aam', 'aas', 'adc', 'add', 'and', 'arpl', 'bound',
-        'bsf', 'bsr', 'bswap', 'bt', 'btc', 'btr', 'bts', 'call', 'cbw',
-        'cdq', 'clc', 'cld', 'cli', 'clts', 'cmc', 'cmova', 'cmovae',
-        'cmovb', 'cmovbe', 'cmovc', 'cmovcxz', 'cmove', 'cmovg',
-        'cmovge', 'cmovl', 'cmovle', 'cmovna', 'cmovnae', 'cmovnb',
-        'cmovnbe', 'cmovnc', 'cmovne', 'cmovng', 'cmovnge', 'cmovnl',
-        'cmovnle', 'cmovno', 'cmovnp', 'cmovns', 'cmovnz', 'cmovo',
-        'cmovp', 'cmovpe', 'cmovpo', 'cmovs', 'cmovz', 'cmp', 'cmpsb',
-        'cmpsd', 'cmpsw', 'cmpxchg', 'cmpxchg486', 'cmpxchg8b', 'cpuid',
-        'cwd', 'cwde', 'daa', 'das', 'dec', 'div', 'emms', 'enter', 'hlt',
-        'ibts', 'icebp', 'idiv', 'imul', 'in', 'inc', 'insb', 'insd',
-        'insw', 'int', 'int01', 'int03', 'int1', 'int3', 'into', 'invd',
-        'invlpg', 'iret', 'iretd', 'iretw', 'ja', 'jae', 'jb', 'jbe',
-        'jc', 'jcxz', 'jcxz', 'je', 'jecxz', 'jg', 'jge', 'jl', 'jle',
-        'jmp', 'jna', 'jnae', 'jnb', 'jnbe', 'jnc', 'jne', 'jng', 'jnge',
-        'jnl', 'jnle', 'jno', 'jnp', 'jns', 'jnz', 'jo', 'jp', 'jpe',
-        'jpo', 'js', 'jz', 'lahf', 'lar', 'lcall', 'lds', 'lea', 'leave',
-        'les', 'lfs', 'lgdt', 'lgs', 'lidt', 'ljmp', 'lldt', 'lmsw',
-        'loadall', 'loadall286', 'lock', 'lodsb', 'lodsd', 'lodsw',
-        'loop', 'loope', 'loopne', 'loopnz', 'loopz', 'lsl', 'lss', 'ltr',
-        'mov', 'movd', 'movq', 'movsb', 'movsd', 'movsw', 'movsx',
-        'movzx', 'mul', 'neg', 'nop', 'not', 'or', 'out', 'outsb', 'outsd',
-        'outsw', 'pop', 'popa', 'popad', 'popaw', 'popf', 'popfd', 'popfw',
-        'push', 'pusha', 'pushad', 'pushaw', 'pushf', 'pushfd', 'pushfw',
-        'rcl', 'rcr', 'rdmsr', 'rdpmc', 'rdshr', 'rdtsc', 'rep', 'repe',
-        'repne', 'repnz', 'repz', 'ret', 'retf', 'retn', 'rol', 'ror',
-        'rsdc', 'rsldt', 'rsm', 'sahf', 'sal', 'salc', 'sar', 'sbb',
-        'scasb', 'scasd', 'scasw', 'seta', 'setae', 'setb', 'setbe',
-        'setc', 'setcxz', 'sete', 'setg', 'setge', 'setl', 'setle',
-        'setna', 'setnae', 'setnb', 'setnbe', 'setnc', 'setne', 'setng',
-        'setnge', 'setnl', 'setnle', 'setno', 'setnp', 'setns', 'setnz',
-        'seto', 'setp', 'setpe', 'setpo', 'sets', 'setz', 'sgdt', 'shl',
-        'shld', 'shr', 'shrd', 'sidt', 'sldt', 'smi', 'smint', 'smintold',
-        'smsw', 'stc', 'std', 'sti', 'stosb', 'stosd', 'stosw', 'str',
-        'sub', 'svdc', 'svldt', 'svts', 'syscall', 'sysenter', 'sysexit',
-        'sysret', 'test', 'ud1', 'ud2', 'umov', 'verr', 'verw', 'wait',
-        'wbinvd', 'wrmsr', 'wrshr', 'xadd', 'xbts', 'xchg', 'xlat',
-        'xlatb', 'xor'
-    }
-
-    PORTUGOL_KEYWORDS = (
-        'aleatorio',
-        'algoritmo',
-        'arquivo',
-        'ate',
-        'caso',
-        'cronometro',
-        'debug',
-        'e',
-        'eco',
-        'enquanto',
-        'entao',
-        'escolha',
-        'escreva',
-        'escreval',
-        'faca',
-        'falso',
-        'fimalgoritmo',
-        'fimenquanto',
-        'fimescolha',
-        'fimfuncao',
-        'fimpara',
-        'fimprocedimento',
-        'fimrepita',
-        'fimse',
-        'funcao',
-        'inicio',
-        'int',
-        'interrompa',
-        'leia',
-        'limpatela',
-        'mod',
-        'nao',
-        'ou',
-        'outrocaso',
-        'para',
-        'passo',
-        'pausa',
-        'procedimento',
-        'repita',
-        'retorne',
-        'se',
-        'senao',
-        'timer',
-        'var',
-        'vetor',
-        'verdadeiro',
-        'xou',
-        'div',
-        'mod',
-        'abs',
-        'arccos',
-        'arcsen',
-        'arctan',
-        'cos',
-        'cotan',
-        'Exp',
-        'grauprad',
-        'int',
-        'log',
-        'logn',
-        'pi',
-        'quad',
-        'radpgrau',
-        'raizq',
-        'rand',
-        'randi',
-        'sen',
-        'Tan',
-        'asc',
-        'carac',
-        'caracpnum',
-        'compr',
-        'copia',
-        'maiusc',
-        'minusc',
-        'numpcarac',
-        'pos',
-    )
-
-    PORTUGOL_BUILTIN_TYPES = {
-        'inteiro', 'real', 'caractere', 'logico'
-    }
-
-    def __init__(self, **options):
-        Lexer.__init__(self, **options)
-        self.keywords = set()
-        self.builtins = set()
-        if get_bool_opt(options, 'portugol', False):
-            self.keywords.update(self.PORTUGOL_KEYWORDS)
-            self.builtins.update(self.PORTUGOL_BUILTIN_TYPES)
-            self.is_portugol = True
-        else:
-            self.is_portugol = False
-
-            if get_bool_opt(options, 'turbopascal', True):
-                self.keywords.update(self.TURBO_PASCAL_KEYWORDS)
-            if get_bool_opt(options, 'delphi', True):
-                self.keywords.update(self.DELPHI_KEYWORDS)
-            if get_bool_opt(options, 'freepascal', True):
-                self.keywords.update(self.FREE_PASCAL_KEYWORDS)
-            for unit in get_list_opt(options, 'units', list(self.BUILTIN_UNITS)):
-                self.builtins.update(self.BUILTIN_UNITS[unit])
-
-    def get_tokens_unprocessed(self, text):
-        scanner = Scanner(text, re.DOTALL | re.MULTILINE | re.IGNORECASE)
-        stack = ['initial']
-        in_function_block = False
-        in_property_block = False
-        was_dot = False
-        next_token_is_function = False
-        next_token_is_property = False
-        collect_labels = False
-        block_labels = set()
-        brace_balance = [0, 0]
-
-        while not scanner.eos:
-            token = Error
-
-            if stack[-1] == 'initial':
-                if scanner.scan(r'\s+'):
-                    token = Whitespace
-                elif not self.is_portugol and scanner.scan(r'\{.*?\}|\(\*.*?\*\)'):
-                    if scanner.match.startswith('$'):
-                        token = Comment.Preproc
-                    else:
-                        token = Comment.Multiline
-                elif scanner.scan(r'//.*?$'):
-                    token = Comment.Single
-                elif self.is_portugol and scanner.scan(r'(<\-)|(>=)|(<=)|%|<|>|-|\+|\*|\=|(<>)|\/|\.|:|,'):
-                    token = Operator
-                elif not self.is_portugol and scanner.scan(r'[-+*\/=<>:;,.@\^]'):
-                    token = Operator
-                    # stop label highlighting on next ";"
-                    if collect_labels and scanner.match == ';':
-                        collect_labels = False
-                elif scanner.scan(r'[\(\)\[\]]+'):
-                    token = Punctuation
-                    # abort function naming ``foo = Function(...)``
-                    next_token_is_function = False
-                    # if we are in a function block we count the open
-                    # braces because ootherwise it's impossible to
-                    # determine the end of the modifier context
-                    if in_function_block or in_property_block:
-                        if scanner.match == '(':
-                            brace_balance[0] += 1
-                        elif scanner.match == ')':
-                            brace_balance[0] -= 1
-                        elif scanner.match == '[':
-                            brace_balance[1] += 1
-                        elif scanner.match == ']':
-                            brace_balance[1] -= 1
-                elif scanner.scan(r'[A-Za-z_][A-Za-z_0-9]*'):
-                    lowercase_name = scanner.match.lower()
-                    if lowercase_name == 'result':
-                        token = Name.Builtin.Pseudo
-                    elif lowercase_name in self.keywords:
-                        token = Keyword
-                        # if we are in a special block and a
-                        # block ending keyword occurs (and the parenthesis
-                        # is balanced) we end the current block context
-                        if self.is_portugol:
-                            if lowercase_name in ('funcao', 'procedimento'):
-                                in_function_block = True
-                                next_token_is_function = True
-                        else:
-                            if (in_function_block or in_property_block) and \
-                                    lowercase_name in self.BLOCK_KEYWORDS and \
-                                    brace_balance[0] <= 0 and \
-                                    brace_balance[1] <= 0:
-                                in_function_block = False
-                                in_property_block = False
-                                brace_balance = [0, 0]
-                                block_labels = set()
-                            if lowercase_name in ('label', 'goto'):
-                                collect_labels = True
-                            elif lowercase_name == 'asm':
-                                stack.append('asm')
-                            elif lowercase_name == 'property':
-                                in_property_block = True
-                                next_token_is_property = True
-                            elif lowercase_name in ('procedure', 'operator',
-                                                    'function', 'constructor',
-                                                    'destructor'):
-                                in_function_block = True
-                                next_token_is_function = True
-                    # we are in a function block and the current name
-                    # is in the set of registered modifiers. highlight
-                    # it as pseudo keyword
-                    elif not self.is_portugol and in_function_block and \
-                            lowercase_name in self.FUNCTION_MODIFIERS:
-                        token = Keyword.Pseudo
-                    # if we are in a property highlight some more
-                    # modifiers
-                    elif not self.is_portugol and in_property_block and \
-                            lowercase_name in ('read', 'write'):
-                        token = Keyword.Pseudo
-                        next_token_is_function = True
-                    # if the last iteration set next_token_is_function
-                    # to true we now want this name highlighted as
-                    # function. so do that and reset the state
-                    elif next_token_is_function:
-                        # Look if the next token is a dot. If yes it's
-                        # not a function, but a class name and the
-                        # part after the dot a function name
-                        if not self.is_portugol and scanner.test(r'\s*\.\s*'):
-                            token = Name.Class
-                        # it's not a dot, our job is done
-                        else:
-                            token = Name.Function
-                            next_token_is_function = False
-
-                            if self.is_portugol:
-                                block_labels.add(scanner.match.lower())
-
-                    # same for properties
-                    elif not self.is_portugol and next_token_is_property:
-                        token = Name.Property
-                        next_token_is_property = False
-                    # Highlight this token as label and add it
-                    # to the list of known labels
-                    elif not self.is_portugol and collect_labels:
-                        token = Name.Label
-                        block_labels.add(scanner.match.lower())
-                    # name is in list of known labels
-                    elif lowercase_name in block_labels:
-                        token = Name.Label
-                    elif self.is_portugol and lowercase_name in self.PORTUGOL_BUILTIN_TYPES:
-                        token = Keyword.Type
-                    elif not self.is_portugol and lowercase_name in self.BUILTIN_TYPES:
-                        token = Keyword.Type
-                    elif not self.is_portugol and lowercase_name in self.DIRECTIVES:
-                        token = Keyword.Pseudo
-                    # builtins are just builtins if the token
-                    # before isn't a dot
-                    elif not self.is_portugol and not was_dot and lowercase_name in self.builtins:
-                        token = Name.Builtin
-                    else:
-                        token = Name
-                elif self.is_portugol and scanner.scan(r"\""):
-                    token = String
-                    stack.append('string')
-                elif not self.is_portugol and scanner.scan(r"'"):
-                    token = String
-                    stack.append('string')
-                elif not self.is_portugol and scanner.scan(r'\#(\d+|\$[0-9A-Fa-f]+)'):
-                    token = String.Char
-                elif not self.is_portugol and scanner.scan(r'\$[0-9A-Fa-f]+'):
-                    token = Number.Hex
-                elif scanner.scan(r'\d+(?![eE]|\.[^.])'):
-                    token = Number.Integer
-                elif scanner.scan(r'\d+(\.\d+([eE][+-]?\d+)?|[eE][+-]?\d+)'):
-                    token = Number.Float
-                else:
-                    # if the stack depth is deeper than once, pop
-                    if len(stack) > 1:
-                        stack.pop()
-                    scanner.get_char()
-
-            elif stack[-1] == 'string':
-                if self.is_portugol:
-                    if scanner.scan(r"''"):
-                        token = String.Escape
-                    elif scanner.scan(r"\""):
-                        token = String
-                        stack.pop()
-                    elif scanner.scan(r"[^\"]*"):
-                        token = String
-                    else:
-                        scanner.get_char()
-                        stack.pop()
-                else:
-                    if scanner.scan(r"''"):
-                        token = String.Escape
-                    elif scanner.scan(r"'"):
-                        token = String
-                        stack.pop()
-                    elif scanner.scan(r"[^']*"):
-                        token = String
-                    else:
-                        scanner.get_char()
-                        stack.pop()
-            elif not self.is_portugol and stack[-1] == 'asm':
-                if scanner.scan(r'\s+'):
-                    token = Whitespace
-                elif scanner.scan(r'end'):
-                    token = Keyword
-                    stack.pop()
-                elif scanner.scan(r'\{.*?\}|\(\*.*?\*\)'):
-                    if scanner.match.startswith('$'):
-                        token = Comment.Preproc
-                    else:
-                        token = Comment.Multiline
-                elif scanner.scan(r'//.*?$'):
-                    token = Comment.Single
-                elif scanner.scan(r"'"):
-                    token = String
-                    stack.append('string')
-                elif scanner.scan(r'@@[A-Za-z_][A-Za-z_0-9]*'):
-                    token = Name.Label
-                elif scanner.scan(r'[A-Za-z_][A-Za-z_0-9]*'):
-                    lowercase_name = scanner.match.lower()
-                    if lowercase_name in self.ASM_INSTRUCTIONS:
-                        token = Keyword
-                    elif lowercase_name in self.ASM_REGISTERS:
-                        token = Name.Builtin
-                    else:
-                        token = Name
-                elif scanner.scan(r'[-+*\/=<>:;,.@\^]+'):
-                    token = Operator
-                elif scanner.scan(r'[\(\)\[\]]+'):
-                    token = Punctuation
-                elif scanner.scan(r'\$[0-9A-Fa-f]+'):
-                    token = Number.Hex
-                elif scanner.scan(r'\d+(?![eE]|\.[^.])'):
-                    token = Number.Integer
-                elif scanner.scan(r'\d+(\.\d+([eE][+-]?\d+)?|[eE][+-]?\d+)'):
-                    token = Number.Float
-                else:
-                    scanner.get_char()
-                    stack.pop()
-
-            # save the dot!!!11
-            if not self.is_portugol and scanner.match.strip():
-                was_dot = scanner.match == '.'
-
-            yield scanner.start_pos, token, scanner.match or ''
diff --git a/voxvera/vendor/pygments/lexers/pawn.py b/voxvera/vendor/pygments/lexers/pawn.py
deleted file mode 100644
index 99d9c96..0000000
--- a/voxvera/vendor/pygments/lexers/pawn.py
+++ /dev/null
@@ -1,202 +0,0 @@
-"""
-    pygments.lexers.pawn
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the Pawn languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation
-from pygments.util import get_bool_opt
-
-__all__ = ['SourcePawnLexer', 'PawnLexer']
-
-
-class SourcePawnLexer(RegexLexer):
-    """
-    For SourcePawn source code with preprocessor directives.
-    """
-    name = 'SourcePawn'
-    aliases = ['sp']
-    filenames = ['*.sp']
-    mimetypes = ['text/x-sourcepawn']
-    url = 'https://github.com/alliedmodders/sourcepawn'
-    version_added = '1.6'
-
-    #: optional Comment or Whitespace
-    _ws = r'(?:\s|//.*?\n|/\*.*?\*/)+'
-    #: only one /* */ style comment
-    _ws1 = r'\s*(?:/[*].*?[*]/\s*)*'
-
-    tokens = {
-        'root': [
-            # preprocessor directives: without whitespace
-            (r'^#if\s+0', Comment.Preproc, 'if0'),
-            ('^#', Comment.Preproc, 'macro'),
-            # or with whitespace
-            ('^' + _ws1 + r'#if\s+0', Comment.Preproc, 'if0'),
-            ('^' + _ws1 + '#', Comment.Preproc, 'macro'),
-            (r'\n', Text),
-            (r'\s+', Text),
-            (r'\\\n', Text),  # line continuation
-            (r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
-            (r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline),
-            (r'[{}]', Punctuation),
-            (r'L?"', String, 'string'),
-            (r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
-            (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
-            (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
-            (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
-            (r'0[0-7]+[LlUu]*', Number.Oct),
-            (r'\d+[LlUu]*', Number.Integer),
-            (r'[~!%^&*+=|?:<>/-]', Operator),
-            (r'[()\[\],.;]', Punctuation),
-            (r'(case|const|continue|native|'
-             r'default|else|enum|for|if|new|operator|'
-             r'public|return|sizeof|static|decl|struct|switch)\b', Keyword),
-            (r'(bool|Float)\b', Keyword.Type),
-            (r'(true|false)\b', Keyword.Constant),
-            (r'[a-zA-Z_]\w*', Name),
-        ],
-        'string': [
-            (r'"', String, '#pop'),
-            (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
-            (r'[^\\"\n]+', String),  # all other characters
-            (r'\\\n', String),       # line continuation
-            (r'\\', String),         # stray backslash
-        ],
-        'macro': [
-            (r'[^/\n]+', Comment.Preproc),
-            (r'/\*(.|\n)*?\*/', Comment.Multiline),
-            (r'//.*?\n', Comment.Single, '#pop'),
-            (r'/', Comment.Preproc),
-            (r'(?<=\\)\n', Comment.Preproc),
-            (r'\n', Comment.Preproc, '#pop'),
-        ],
-        'if0': [
-            (r'^\s*#if.*?(?/-]', Operator),
-            (r'[()\[\],.;]', Punctuation),
-            (r'(switch|case|default|const|new|static|char|continue|break|'
-             r'if|else|for|while|do|operator|enum|'
-             r'public|return|sizeof|tagof|state|goto)\b', Keyword),
-            (r'(bool|Float)\b', Keyword.Type),
-            (r'(true|false)\b', Keyword.Constant),
-            (r'[a-zA-Z_]\w*', Name),
-        ],
-        'string': [
-            (r'"', String, '#pop'),
-            (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
-            (r'[^\\"\n]+', String),  # all other characters
-            (r'\\\n', String),       # line continuation
-            (r'\\', String),         # stray backslash
-        ],
-        'macro': [
-            (r'[^/\n]+', Comment.Preproc),
-            (r'/\*(.|\n)*?\*/', Comment.Multiline),
-            (r'//.*?\n', Comment.Single, '#pop'),
-            (r'/', Comment.Preproc),
-            (r'(?<=\\)\n', Comment.Preproc),
-            (r'\n', Comment.Preproc, '#pop'),
-        ],
-        'if0': [
-            (r'^\s*#if.*?(?<-]', Operator),
-            (r'[a-zA-Z][a-zA-Z0-9_-]*', Name),
-            (r'\?[a-zA-Z][a-zA-Z0-9_-]*', Name.Variable),
-            (r'[0-9]+\.[0-9]+', Number.Float),
-            (r'[0-9]+', Number.Integer),
-        ],
-        'keywords': [
-            (words((
-                ':requirements', ':types', ':constants',
-                ':predicates', ':functions', ':action', ':agent',
-                ':parameters', ':precondition', ':effect',
-                ':durative-action', ':duration', ':condition',
-                ':derived', ':domain', ':objects', ':init',
-                ':goal', ':metric', ':length', ':serial', ':parallel',
-                # the following are requirements
-                ':strips', ':typing', ':negative-preconditions',
-                ':disjunctive-preconditions', ':equality',
-                ':existential-preconditions', ':universal-preconditions',
-                ':conditional-effects', ':fluents', ':numeric-fluents',
-                ':object-fluents', ':adl', ':durative-actions',
-                ':continuous-effects', ':derived-predicates',
-                ':time-intial-literals', ':preferences',
-                ':constraints', ':action-costs', ':multi-agent',
-                ':unfactored-privacy', ':factored-privacy',
-                ':non-deterministic'
-                ), suffix=r'\b'), Keyword)
-        ],
-        'builtins': [
-            (words((
-                'define', 'domain', 'object', 'either', 'and',
-                'forall', 'preference', 'imply', 'or', 'exists',
-                'not', 'when', 'assign', 'scale-up', 'scale-down',
-                'increase', 'decrease', 'at', 'over', 'start',
-                'end', 'all', 'problem', 'always', 'sometime',
-                'within', 'at-most-once', 'sometime-after',
-                'sometime-before', 'always-within', 'hold-during',
-                'hold-after', 'minimize', 'maximize',
-                'total-time', 'is-violated'), suffix=r'\b'),
-                Name.Builtin)
-        ]
-    }
-
diff --git a/voxvera/vendor/pygments/lexers/perl.py b/voxvera/vendor/pygments/lexers/perl.py
deleted file mode 100644
index 33f91f5..0000000
--- a/voxvera/vendor/pygments/lexers/perl.py
+++ /dev/null
@@ -1,733 +0,0 @@
-"""
-    pygments.lexers.perl
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Perl, Raku and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, bygroups, \
-    using, this, default, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Whitespace
-from pygments.util import shebang_matches
-
-__all__ = ['PerlLexer', 'Perl6Lexer']
-
-
-class PerlLexer(RegexLexer):
-    """
-    For Perl source code.
-    """
-
-    name = 'Perl'
-    url = 'https://www.perl.org'
-    aliases = ['perl', 'pl']
-    filenames = ['*.pl', '*.pm', '*.t', '*.perl']
-    mimetypes = ['text/x-perl', 'application/x-perl']
-    version_added = ''
-
-    flags = re.DOTALL | re.MULTILINE
-    # TODO: give this to a perl guy who knows how to parse perl...
-    tokens = {
-        'balanced-regex': [
-            (r'/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*', String.Regex, '#pop'),
-            (r'!(\\\\|\\[^\\]|[^\\!])*![egimosx]*', String.Regex, '#pop'),
-            (r'\\(\\\\|[^\\])*\\[egimosx]*', String.Regex, '#pop'),
-            (r'\{(\\\\|\\[^\\]|[^\\}])*\}[egimosx]*', String.Regex, '#pop'),
-            (r'<(\\\\|\\[^\\]|[^\\>])*>[egimosx]*', String.Regex, '#pop'),
-            (r'\[(\\\\|\\[^\\]|[^\\\]])*\][egimosx]*', String.Regex, '#pop'),
-            (r'\((\\\\|\\[^\\]|[^\\)])*\)[egimosx]*', String.Regex, '#pop'),
-            (r'@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*', String.Regex, '#pop'),
-            (r'%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*', String.Regex, '#pop'),
-            (r'\$(\\\\|\\[^\\]|[^\\$])*\$[egimosx]*', String.Regex, '#pop'),
-        ],
-        'root': [
-            (r'\A\#!.+?$', Comment.Hashbang),
-            (r'\#.*?$', Comment.Single),
-            (r'^=[a-zA-Z0-9]+\s+.*?\n=cut', Comment.Multiline),
-            (words((
-                'case', 'continue', 'do', 'else', 'elsif', 'for', 'foreach',
-                'if', 'last', 'my', 'next', 'our', 'redo', 'reset', 'then',
-                'unless', 'until', 'while', 'print', 'new', 'BEGIN',
-                'CHECK', 'INIT', 'END', 'return'), suffix=r'\b'),
-             Keyword),
-            (r'(format)(\s+)(\w+)(\s*)(=)(\s*\n)',
-             bygroups(Keyword, Whitespace, Name, Whitespace, Punctuation, Whitespace), 'format'),
-            (r'(eq|lt|gt|le|ge|ne|not|and|or|cmp)\b', Operator.Word),
-            # common delimiters
-            (r's/(\\\\|\\[^\\]|[^\\/])*/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*',
-                String.Regex),
-            (r's!(\\\\|\\!|[^!])*!(\\\\|\\!|[^!])*![egimosx]*', String.Regex),
-            (r's\\(\\\\|[^\\])*\\(\\\\|[^\\])*\\[egimosx]*', String.Regex),
-            (r's@(\\\\|\\[^\\]|[^\\@])*@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*',
-                String.Regex),
-            (r's%(\\\\|\\[^\\]|[^\\%])*%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*',
-                String.Regex),
-            # balanced delimiters
-            (r's\{(\\\\|\\[^\\]|[^\\}])*\}\s*', String.Regex, 'balanced-regex'),
-            (r's<(\\\\|\\[^\\]|[^\\>])*>\s*', String.Regex, 'balanced-regex'),
-            (r's\[(\\\\|\\[^\\]|[^\\\]])*\]\s*', String.Regex,
-                'balanced-regex'),
-            (r's\((\\\\|\\[^\\]|[^\\)])*\)\s*', String.Regex,
-                'balanced-regex'),
-
-            (r'm?/(\\\\|\\[^\\]|[^\\/\n])*/[gcimosx]*', String.Regex),
-            (r'm(?=[/!\\{<\[(@%$])', String.Regex, 'balanced-regex'),
-            (r'((?<==~)|(?<=\())\s*/(\\\\|\\[^\\]|[^\\/])*/[gcimosx]*',
-                String.Regex),
-            (r'\s+', Whitespace),
-            (words((
-                'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', 'caller', 'chdir',
-                'chmod', 'chomp', 'chop', 'chown', 'chr', 'chroot', 'close', 'closedir', 'connect',
-                'continue', 'cos', 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die',
-                'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent',
-                'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit', 'exp', 'fcntl',
-                'fileno', 'flock', 'fork', 'format', 'formline', 'getc', 'getgrent', 'getgrgid',
-                'getgrnam', 'gethostbyaddr', 'gethostbyname', 'gethostent', 'getlogin',
-                'getnetbyaddr', 'getnetbyname', 'getnetent', 'getpeername', 'getpgrp',
-                'getppid', 'getpriority', 'getprotobyname', 'getprotobynumber',
-                'getprotoent', 'getpwent', 'getpwnam', 'getpwuid', 'getservbyname',
-                'getservbyport', 'getservent', 'getsockname', 'getsockopt', 'glob', 'gmtime',
-                'goto', 'grep', 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill', 'last',
-                'lc', 'lcfirst', 'length', 'link', 'listen', 'local', 'localtime', 'log', 'lstat',
-                'map', 'mkdir', 'msgctl', 'msgget', 'msgrcv', 'msgsnd', 'my', 'next', 'oct', 'open',
-                'opendir', 'ord', 'our', 'pack', 'pipe', 'pop', 'pos', 'printf',
-                'prototype', 'push', 'quotemeta', 'rand', 'read', 'readdir',
-                'readline', 'readlink', 'readpipe', 'recv', 'redo', 'ref', 'rename',
-                'reverse', 'rewinddir', 'rindex', 'rmdir', 'scalar', 'seek', 'seekdir',
-                'select', 'semctl', 'semget', 'semop', 'send', 'setgrent', 'sethostent', 'setnetent',
-                'setpgrp', 'setpriority', 'setprotoent', 'setpwent', 'setservent',
-                'setsockopt', 'shift', 'shmctl', 'shmget', 'shmread', 'shmwrite', 'shutdown',
-                'sin', 'sleep', 'socket', 'socketpair', 'sort', 'splice', 'split', 'sprintf', 'sqrt',
-                'srand', 'stat', 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread',
-                'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied', 'time', 'times', 'tr',
-                'truncate', 'uc', 'ucfirst', 'umask', 'undef', 'unlink', 'unpack', 'unshift', 'untie',
-                'utime', 'values', 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write'), suffix=r'\b'),
-             Name.Builtin),
-            (r'((__(DATA|DIE|WARN)__)|(STD(IN|OUT|ERR)))\b', Name.Builtin.Pseudo),
-            (r'(<<)([\'"]?)([a-zA-Z_]\w*)(\2;?\n.*?\n)(\3)(\n)',
-             bygroups(String, String, String.Delimiter, String, String.Delimiter, Whitespace)),
-            (r'__END__', Comment.Preproc, 'end-part'),
-            (r'\$\^[ADEFHILMOPSTWX]', Name.Variable.Global),
-            (r"\$[\\\"\[\]'&`+*.,;=%~?@$!<>(^|/-](?!\w)", Name.Variable.Global),
-            (r'[$@%#]+', Name.Variable, 'varname'),
-            (r'0_?[0-7]+(_[0-7]+)*', Number.Oct),
-            (r'0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*', Number.Hex),
-            (r'0b[01]+(_[01]+)*', Number.Bin),
-            (r'(?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?',
-             Number.Float),
-            (r'(?i)\d+(_\d*)*e[+-]?\d+(_\d*)*', Number.Float),
-            (r'\d+(_\d+)*', Number.Integer),
-            (r"'(\\\\|\\[^\\]|[^'\\])*'", String),
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
-            (r'`(\\\\|\\[^\\]|[^`\\])*`', String.Backtick),
-            (r'<([^\s>]+)>', String.Regex),
-            (r'(q|qq|qw|qr|qx)\{', String.Other, 'cb-string'),
-            (r'(q|qq|qw|qr|qx)\(', String.Other, 'rb-string'),
-            (r'(q|qq|qw|qr|qx)\[', String.Other, 'sb-string'),
-            (r'(q|qq|qw|qr|qx)\<', String.Other, 'lt-string'),
-            (r'(q|qq|qw|qr|qx)([\W_])(.|\n)*?\2', String.Other),
-            (r'(package)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)',
-             bygroups(Keyword, Whitespace, Name.Namespace)),
-            (r'(use|require|no)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)',
-             bygroups(Keyword, Whitespace, Name.Namespace)),
-            (r'(sub)(\s+)', bygroups(Keyword, Whitespace), 'funcname'),
-            (words((
-                'no', 'package', 'require', 'use'), suffix=r'\b'),
-             Keyword),
-            (r'(\[\]|\*\*|::|<<|>>|>=|<=>|<=|={3}|!=|=~|'
-             r'!~|&&?|\|\||\.{1,3})', Operator),
-            (r'[-+/*%=<>&^|!\\~]=?', Operator),
-            (r'[()\[\]:;,<>/?{}]', Punctuation),  # yes, there's no shortage
-                                                  # of punctuation in Perl!
-            (r'(?=\w)', Name, 'name'),
-        ],
-        'format': [
-            (r'\.\n', String.Interpol, '#pop'),
-            (r'[^\n]*\n', String.Interpol),
-        ],
-        'varname': [
-            (r'\s+', Whitespace),
-            (r'\{', Punctuation, '#pop'),    # hash syntax?
-            (r'\)|,', Punctuation, '#pop'),  # argument specifier
-            (r'\w+::', Name.Namespace),
-            (r'[\w:]+', Name.Variable, '#pop'),
-        ],
-        'name': [
-            (r'[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*(::)?(?=\s*->)', Name.Namespace, '#pop'),
-            (r'[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*::', Name.Namespace, '#pop'),
-            (r'[\w:]+', Name, '#pop'),
-            (r'[A-Z_]+(?=\W)', Name.Constant, '#pop'),
-            (r'(?=\W)', Text, '#pop'),
-        ],
-        'funcname': [
-            (r'[a-zA-Z_]\w*[!?]?', Name.Function),
-            (r'\s+', Whitespace),
-            # argument declaration
-            (r'(\([$@%]*\))(\s*)', bygroups(Punctuation, Whitespace)),
-            (r';', Punctuation, '#pop'),
-            (r'.*?\{', Punctuation, '#pop'),
-        ],
-        'cb-string': [
-            (r'\\[{}\\]', String.Other),
-            (r'\\', String.Other),
-            (r'\{', String.Other, 'cb-string'),
-            (r'\}', String.Other, '#pop'),
-            (r'[^{}\\]+', String.Other)
-        ],
-        'rb-string': [
-            (r'\\[()\\]', String.Other),
-            (r'\\', String.Other),
-            (r'\(', String.Other, 'rb-string'),
-            (r'\)', String.Other, '#pop'),
-            (r'[^()]+', String.Other)
-        ],
-        'sb-string': [
-            (r'\\[\[\]\\]', String.Other),
-            (r'\\', String.Other),
-            (r'\[', String.Other, 'sb-string'),
-            (r'\]', String.Other, '#pop'),
-            (r'[^\[\]]+', String.Other)
-        ],
-        'lt-string': [
-            (r'\\[<>\\]', String.Other),
-            (r'\\', String.Other),
-            (r'\<', String.Other, 'lt-string'),
-            (r'\>', String.Other, '#pop'),
-            (r'[^<>]+', String.Other)
-        ],
-        'end-part': [
-            (r'.+', Comment.Preproc, '#pop')
-        ]
-    }
-
-    def analyse_text(text):
-        if shebang_matches(text, r'perl'):
-            return True
-
-        result = 0
-
-        if re.search(r'(?:my|our)\s+[$@%(]', text):
-            result += 0.9
-
-        if ':=' in text:
-            # := is not valid Perl, but it appears in unicon, so we should
-            # become less confident if we think we found Perl with :=
-            result /= 2
-
-        return result
-
-
-class Perl6Lexer(ExtendedRegexLexer):
-    """
-    For Raku (a.k.a. Perl 6) source code.
-    """
-
-    name = 'Perl6'
-    url = 'https://www.raku.org'
-    aliases = ['perl6', 'pl6', 'raku']
-    filenames = ['*.pl', '*.pm', '*.nqp', '*.p6', '*.6pl', '*.p6l', '*.pl6',
-                 '*.6pm', '*.p6m', '*.pm6', '*.t', '*.raku', '*.rakumod',
-                 '*.rakutest', '*.rakudoc']
-    mimetypes = ['text/x-perl6', 'application/x-perl6']
-    version_added = '2.0'
-    flags = re.MULTILINE | re.DOTALL
-
-    PERL6_IDENTIFIER_RANGE = r"['\w:-]"
-
-    PERL6_KEYWORDS = (
-        #Phasers
-        'BEGIN','CATCH','CHECK','CLOSE','CONTROL','DOC','END','ENTER','FIRST',
-        'INIT','KEEP','LAST','LEAVE','NEXT','POST','PRE','QUIT','UNDO',
-        #Keywords
-        'anon','augment','but','class','constant','default','does','else',
-        'elsif','enum','for','gather','given','grammar','has','if','import',
-        'is','let','loop','made','make','method','module','multi','my','need',
-        'orwith','our','proceed','proto','repeat','require','return',
-        'return-rw','returns','role','rule','state','sub','submethod','subset',
-        'succeed','supersede','token','try','unit','unless','until','use',
-        'when','while','with','without',
-        #Traits
-        'export','native','repr','required','rw','symbol',
-    )
-
-    PERL6_BUILTINS = (
-        'ACCEPTS','abs','abs2rel','absolute','accept','accessed','acos',
-        'acosec','acosech','acosh','acotan','acotanh','acquire','act','action',
-        'actions','add','add_attribute','add_enum_value','add_fallback',
-        'add_method','add_parent','add_private_method','add_role','add_trustee',
-        'adverb','after','all','allocate','allof','allowed','alternative-names',
-        'annotations','antipair','antipairs','any','anyof','app_lifetime',
-        'append','arch','archname','args','arity','Array','asec','asech','asin',
-        'asinh','ASSIGN-KEY','ASSIGN-POS','assuming','ast','at','atan','atan2',
-        'atanh','AT-KEY','atomic-assign','atomic-dec-fetch','atomic-fetch',
-        'atomic-fetch-add','atomic-fetch-dec','atomic-fetch-inc',
-        'atomic-fetch-sub','atomic-inc-fetch','AT-POS','attributes','auth',
-        'await','backtrace','Bag','BagHash','bail-out','base','basename',
-        'base-repeating','batch','BIND-KEY','BIND-POS','bind-stderr',
-        'bind-stdin','bind-stdout','bind-udp','bits','bless','block','Bool',
-        'bool-only','bounds','break','Bridge','broken','BUILD','build-date',
-        'bytes','cache','callframe','calling-package','CALL-ME','callsame',
-        'callwith','can','cancel','candidates','cando','can-ok','canonpath',
-        'caps','caption','Capture','cas','catdir','categorize','categorize-list',
-        'catfile','catpath','cause','ceiling','cglobal','changed','Channel',
-        'chars','chdir','child','child-name','child-typename','chmod','chomp',
-        'chop','chr','chrs','chunks','cis','classify','classify-list','cleanup',
-        'clone','close','closed','close-stdin','cmp-ok','code','codes','collate',
-        'column','comb','combinations','command','comment','compiler','Complex',
-        'compose','compose_type','composer','condition','config',
-        'configure_destroy','configure_type_checking','conj','connect',
-        'constraints','construct','contains','contents','copy','cos','cosec',
-        'cosech','cosh','cotan','cotanh','count','count-only','cpu-cores',
-        'cpu-usage','CREATE','create_type','cross','cue','curdir','curupdir','d',
-        'Date','DateTime','day','daycount','day-of-month','day-of-week',
-        'day-of-year','days-in-month','declaration','decode','decoder','deepmap',
-        'default','defined','DEFINITE','delayed','DELETE-KEY','DELETE-POS',
-        'denominator','desc','DESTROY','destroyers','devnull','diag',
-        'did-you-mean','die','dies-ok','dir','dirname','dir-sep','DISTROnames',
-        'do','does','does-ok','done','done-testing','duckmap','dynamic','e',
-        'eager','earlier','elems','emit','enclosing','encode','encoder',
-        'encoding','end','ends-with','enum_from_value','enum_value_list',
-        'enum_values','enums','eof','EVAL','eval-dies-ok','EVALFILE',
-        'eval-lives-ok','exception','excludes-max','excludes-min','EXISTS-KEY',
-        'EXISTS-POS','exit','exitcode','exp','expected','explicitly-manage',
-        'expmod','extension','f','fail','fails-like','fc','feature','file',
-        'filename','find_method','find_method_qualified','finish','first','flat',
-        'flatmap','flip','floor','flunk','flush','fmt','format','formatter',
-        'freeze','from','from-list','from-loop','from-posix','full',
-        'full-barrier','get','get_value','getc','gist','got','grab','grabpairs',
-        'grep','handle','handled','handles','hardware','has_accessor','Hash',
-        'head','headers','hh-mm-ss','hidden','hides','hour','how','hyper','id',
-        'illegal','im','in','indent','index','indices','indir','infinite',
-        'infix','infix:<+>','infix:<->','install_method_cache','Instant',
-        'instead','Int','int-bounds','interval','in-timezone','invalid-str',
-        'invert','invocant','IO','IO::Notification.watch-path','is_trusted',
-        'is_type','isa','is-absolute','isa-ok','is-approx','is-deeply',
-        'is-hidden','is-initial-thread','is-int','is-lazy','is-leap-year',
-        'isNaN','isnt','is-prime','is-relative','is-routine','is-setting',
-        'is-win','item','iterator','join','keep','kept','KERNELnames','key',
-        'keyof','keys','kill','kv','kxxv','l','lang','last','lastcall','later',
-        'lazy','lc','leading','level','like','line','lines','link','List',
-        'listen','live','lives-ok','local','lock','log','log10','lookup','lsb',
-        'made','MAIN','make','Map','match','max','maxpairs','merge','message',
-        'method','method_table','methods','migrate','min','minmax','minpairs',
-        'minute','misplaced','Mix','MixHash','mkdir','mode','modified','month',
-        'move','mro','msb','multi','multiness','my','name','named','named_names',
-        'narrow','nativecast','native-descriptor','nativesizeof','new','new_type',
-        'new-from-daycount','new-from-pairs','next','nextcallee','next-handle',
-        'nextsame','nextwith','NFC','NFD','NFKC','NFKD','nl-in','nl-out',
-        'nodemap','nok','none','norm','not','note','now','nude','Num',
-        'numerator','Numeric','of','offset','offset-in-hours','offset-in-minutes',
-        'ok','old','on-close','one','on-switch','open','opened','operation',
-        'optional','ord','ords','orig','os-error','osname','out-buffer','pack',
-        'package','package-kind','package-name','packages','pair','pairs',
-        'pairup','parameter','params','parent','parent-name','parents','parse',
-        'parse-base','parsefile','parse-names','parts','pass','path','path-sep',
-        'payload','peer-host','peer-port','periods','perl','permutations','phaser',
-        'pick','pickpairs','pid','placeholder','plan','plus','polar','poll',
-        'polymod','pop','pos','positional','posix','postfix','postmatch',
-        'precomp-ext','precomp-target','pred','prefix','prematch','prepend',
-        'print','printf','print-nl','print-to','private','private_method_table',
-        'proc','produce','Promise','prompt','protect','pull-one','push',
-        'push-all','push-at-least','push-exactly','push-until-lazy','put',
-        'qualifier-type','quit','r','race','radix','rand','range','Rat','raw',
-        're','read','readchars','readonly','ready','Real','reallocate','reals',
-        'reason','rebless','receive','recv','redispatcher','redo','reduce',
-        'rel2abs','relative','release','rename','repeated','replacement',
-        'report','reserved','resolve','restore','result','resume','rethrow',
-        'reverse','right','rindex','rmdir','role','roles_to_compose','rolish',
-        'roll','rootdir','roots','rotate','rotor','round','roundrobin',
-        'routine-type','run','rwx','s','samecase','samemark','samewith','say',
-        'schedule-on','scheduler','scope','sec','sech','second','seek','self',
-        'send','Set','set_hidden','set_name','set_package','set_rw','set_value',
-        'SetHash','set-instruments','setup_finalization','shape','share','shell',
-        'shift','sibling','sigil','sign','signal','signals','signature','sin',
-        'sinh','sink','sink-all','skip','skip-at-least','skip-at-least-pull-one',
-        'skip-one','skip-rest','sleep','sleep-timer','sleep-until','Slip','slurp',
-        'slurp-rest','slurpy','snap','snapper','so','socket-host','socket-port',
-        'sort','source','source-package','spawn','SPEC','splice','split',
-        'splitdir','splitpath','sprintf','spurt','sqrt','squish','srand','stable',
-        'start','started','starts-with','status','stderr','stdout','Str',
-        'sub_signature','subbuf','subbuf-rw','subname','subparse','subst',
-        'subst-mutate','substr','substr-eq','substr-rw','subtest','succ','sum',
-        'Supply','symlink','t','tail','take','take-rw','tan','tanh','tap',
-        'target','target-name','tc','tclc','tell','then','throttle','throw',
-        'throws-like','timezone','tmpdir','to','today','todo','toggle','to-posix',
-        'total','trailing','trans','tree','trim','trim-leading','trim-trailing',
-        'truncate','truncated-to','trusts','try_acquire','trying','twigil','type',
-        'type_captures','typename','uc','udp','uncaught_handler','unimatch',
-        'uniname','uninames','uniparse','uniprop','uniprops','unique','unival',
-        'univals','unlike','unlink','unlock','unpack','unpolar','unshift',
-        'unwrap','updir','USAGE','use-ok','utc','val','value','values','VAR',
-        'variable','verbose-config','version','VMnames','volume','vow','w','wait',
-        'warn','watch','watch-path','week','weekday-of-month','week-number',
-        'week-year','WHAT','when','WHERE','WHEREFORE','WHICH','WHO',
-        'whole-second','WHY','wordcase','words','workaround','wrap','write',
-        'write-to','x','yada','year','yield','yyyy-mm-dd','z','zip','zip-latest',
-
-    )
-
-    PERL6_BUILTIN_CLASSES = (
-        #Booleans
-        'False','True',
-        #Classes
-        'Any','Array','Associative','AST','atomicint','Attribute','Backtrace',
-        'Backtrace::Frame','Bag','Baggy','BagHash','Blob','Block','Bool','Buf',
-        'Callable','CallFrame','Cancellation','Capture','CArray','Channel','Code',
-        'compiler','Complex','ComplexStr','Cool','CurrentThreadScheduler',
-        'Cursor','Date','Dateish','DateTime','Distro','Duration','Encoding',
-        'Exception','Failure','FatRat','Grammar','Hash','HyperWhatever','Instant',
-        'Int','int16','int32','int64','int8','IntStr','IO','IO::ArgFiles',
-        'IO::CatHandle','IO::Handle','IO::Notification','IO::Path',
-        'IO::Path::Cygwin','IO::Path::QNX','IO::Path::Unix','IO::Path::Win32',
-        'IO::Pipe','IO::Socket','IO::Socket::Async','IO::Socket::INET','IO::Spec',
-        'IO::Spec::Cygwin','IO::Spec::QNX','IO::Spec::Unix','IO::Spec::Win32',
-        'IO::Special','Iterable','Iterator','Junction','Kernel','Label','List',
-        'Lock','Lock::Async','long','longlong','Macro','Map','Match',
-        'Metamodel::AttributeContainer','Metamodel::C3MRO','Metamodel::ClassHOW',
-        'Metamodel::EnumHOW','Metamodel::Finalization','Metamodel::MethodContainer',
-        'Metamodel::MROBasedMethodDispatch','Metamodel::MultipleInheritance',
-        'Metamodel::Naming','Metamodel::Primitives','Metamodel::PrivateMethodContainer',
-        'Metamodel::RoleContainer','Metamodel::Trusting','Method','Mix','MixHash',
-        'Mixy','Mu','NFC','NFD','NFKC','NFKD','Nil','Num','num32','num64',
-        'Numeric','NumStr','ObjAt','Order','Pair','Parameter','Perl','Pod::Block',
-        'Pod::Block::Code','Pod::Block::Comment','Pod::Block::Declarator',
-        'Pod::Block::Named','Pod::Block::Para','Pod::Block::Table','Pod::Heading',
-        'Pod::Item','Pointer','Positional','PositionalBindFailover','Proc',
-        'Proc::Async','Promise','Proxy','PseudoStash','QuantHash','Range','Rat',
-        'Rational','RatStr','Real','Regex','Routine','Scalar','Scheduler',
-        'Semaphore','Seq','Set','SetHash','Setty','Signature','size_t','Slip',
-        'Stash','Str','StrDistance','Stringy','Sub','Submethod','Supplier',
-        'Supplier::Preserving','Supply','Systemic','Tap','Telemetry',
-        'Telemetry::Instrument::Thread','Telemetry::Instrument::Usage',
-        'Telemetry::Period','Telemetry::Sampler','Thread','ThreadPoolScheduler',
-        'UInt','uint16','uint32','uint64','uint8','Uni','utf8','Variable',
-        'Version','VM','Whatever','WhateverCode','WrapHandle'
-    )
-
-    PERL6_OPERATORS = (
-        'X', 'Z', 'after', 'also', 'and', 'andthen', 'before', 'cmp', 'div',
-        'eq', 'eqv', 'extra', 'ff', 'fff', 'ge', 'gt', 'le', 'leg', 'lt', 'm',
-        'mm', 'mod', 'ne', 'or', 'orelse', 'rx', 's', 'tr', 'x', 'xor', 'xx',
-        '++', '--', '**', '!', '+', '-', '~', '?', '|', '||', '+^', '~^', '?^',
-        '^', '*', '/', '%', '%%', '+&', '+<', '+>', '~&', '~<', '~>', '?&',
-        'gcd', 'lcm', '+', '-', '+|', '+^', '~|', '~^', '?|', '?^',
-        '~', '&', '^', 'but', 'does', '<=>', '..', '..^', '^..', '^..^',
-        '!=', '==', '<', '<=', '>', '>=', '~~', '===', '!eqv',
-        '&&', '||', '^^', '//', 'min', 'max', '??', '!!', 'ff', 'fff', 'so',
-        'not', '<==', '==>', '<<==', '==>>','unicmp',
-    )
-
-    # Perl 6 has a *lot* of possible bracketing characters
-    # this list was lifted from STD.pm6 (https://github.com/perl6/std)
-    PERL6_BRACKETS = {
-        '\u0028': '\u0029', '\u003c': '\u003e', '\u005b': '\u005d',
-        '\u007b': '\u007d', '\u00ab': '\u00bb', '\u0f3a': '\u0f3b',
-        '\u0f3c': '\u0f3d', '\u169b': '\u169c', '\u2018': '\u2019',
-        '\u201a': '\u2019', '\u201b': '\u2019', '\u201c': '\u201d',
-        '\u201e': '\u201d', '\u201f': '\u201d', '\u2039': '\u203a',
-        '\u2045': '\u2046', '\u207d': '\u207e', '\u208d': '\u208e',
-        '\u2208': '\u220b', '\u2209': '\u220c', '\u220a': '\u220d',
-        '\u2215': '\u29f5', '\u223c': '\u223d', '\u2243': '\u22cd',
-        '\u2252': '\u2253', '\u2254': '\u2255', '\u2264': '\u2265',
-        '\u2266': '\u2267', '\u2268': '\u2269', '\u226a': '\u226b',
-        '\u226e': '\u226f', '\u2270': '\u2271', '\u2272': '\u2273',
-        '\u2274': '\u2275', '\u2276': '\u2277', '\u2278': '\u2279',
-        '\u227a': '\u227b', '\u227c': '\u227d', '\u227e': '\u227f',
-        '\u2280': '\u2281', '\u2282': '\u2283', '\u2284': '\u2285',
-        '\u2286': '\u2287', '\u2288': '\u2289', '\u228a': '\u228b',
-        '\u228f': '\u2290', '\u2291': '\u2292', '\u2298': '\u29b8',
-        '\u22a2': '\u22a3', '\u22a6': '\u2ade', '\u22a8': '\u2ae4',
-        '\u22a9': '\u2ae3', '\u22ab': '\u2ae5', '\u22b0': '\u22b1',
-        '\u22b2': '\u22b3', '\u22b4': '\u22b5', '\u22b6': '\u22b7',
-        '\u22c9': '\u22ca', '\u22cb': '\u22cc', '\u22d0': '\u22d1',
-        '\u22d6': '\u22d7', '\u22d8': '\u22d9', '\u22da': '\u22db',
-        '\u22dc': '\u22dd', '\u22de': '\u22df', '\u22e0': '\u22e1',
-        '\u22e2': '\u22e3', '\u22e4': '\u22e5', '\u22e6': '\u22e7',
-        '\u22e8': '\u22e9', '\u22ea': '\u22eb', '\u22ec': '\u22ed',
-        '\u22f0': '\u22f1', '\u22f2': '\u22fa', '\u22f3': '\u22fb',
-        '\u22f4': '\u22fc', '\u22f6': '\u22fd', '\u22f7': '\u22fe',
-        '\u2308': '\u2309', '\u230a': '\u230b', '\u2329': '\u232a',
-        '\u23b4': '\u23b5', '\u2768': '\u2769', '\u276a': '\u276b',
-        '\u276c': '\u276d', '\u276e': '\u276f', '\u2770': '\u2771',
-        '\u2772': '\u2773', '\u2774': '\u2775', '\u27c3': '\u27c4',
-        '\u27c5': '\u27c6', '\u27d5': '\u27d6', '\u27dd': '\u27de',
-        '\u27e2': '\u27e3', '\u27e4': '\u27e5', '\u27e6': '\u27e7',
-        '\u27e8': '\u27e9', '\u27ea': '\u27eb', '\u2983': '\u2984',
-        '\u2985': '\u2986', '\u2987': '\u2988', '\u2989': '\u298a',
-        '\u298b': '\u298c', '\u298d': '\u298e', '\u298f': '\u2990',
-        '\u2991': '\u2992', '\u2993': '\u2994', '\u2995': '\u2996',
-        '\u2997': '\u2998', '\u29c0': '\u29c1', '\u29c4': '\u29c5',
-        '\u29cf': '\u29d0', '\u29d1': '\u29d2', '\u29d4': '\u29d5',
-        '\u29d8': '\u29d9', '\u29da': '\u29db', '\u29f8': '\u29f9',
-        '\u29fc': '\u29fd', '\u2a2b': '\u2a2c', '\u2a2d': '\u2a2e',
-        '\u2a34': '\u2a35', '\u2a3c': '\u2a3d', '\u2a64': '\u2a65',
-        '\u2a79': '\u2a7a', '\u2a7d': '\u2a7e', '\u2a7f': '\u2a80',
-        '\u2a81': '\u2a82', '\u2a83': '\u2a84', '\u2a8b': '\u2a8c',
-        '\u2a91': '\u2a92', '\u2a93': '\u2a94', '\u2a95': '\u2a96',
-        '\u2a97': '\u2a98', '\u2a99': '\u2a9a', '\u2a9b': '\u2a9c',
-        '\u2aa1': '\u2aa2', '\u2aa6': '\u2aa7', '\u2aa8': '\u2aa9',
-        '\u2aaa': '\u2aab', '\u2aac': '\u2aad', '\u2aaf': '\u2ab0',
-        '\u2ab3': '\u2ab4', '\u2abb': '\u2abc', '\u2abd': '\u2abe',
-        '\u2abf': '\u2ac0', '\u2ac1': '\u2ac2', '\u2ac3': '\u2ac4',
-        '\u2ac5': '\u2ac6', '\u2acd': '\u2ace', '\u2acf': '\u2ad0',
-        '\u2ad1': '\u2ad2', '\u2ad3': '\u2ad4', '\u2ad5': '\u2ad6',
-        '\u2aec': '\u2aed', '\u2af7': '\u2af8', '\u2af9': '\u2afa',
-        '\u2e02': '\u2e03', '\u2e04': '\u2e05', '\u2e09': '\u2e0a',
-        '\u2e0c': '\u2e0d', '\u2e1c': '\u2e1d', '\u2e20': '\u2e21',
-        '\u3008': '\u3009', '\u300a': '\u300b', '\u300c': '\u300d',
-        '\u300e': '\u300f', '\u3010': '\u3011', '\u3014': '\u3015',
-        '\u3016': '\u3017', '\u3018': '\u3019', '\u301a': '\u301b',
-        '\u301d': '\u301e', '\ufd3e': '\ufd3f', '\ufe17': '\ufe18',
-        '\ufe35': '\ufe36', '\ufe37': '\ufe38', '\ufe39': '\ufe3a',
-        '\ufe3b': '\ufe3c', '\ufe3d': '\ufe3e', '\ufe3f': '\ufe40',
-        '\ufe41': '\ufe42', '\ufe43': '\ufe44', '\ufe47': '\ufe48',
-        '\ufe59': '\ufe5a', '\ufe5b': '\ufe5c', '\ufe5d': '\ufe5e',
-        '\uff08': '\uff09', '\uff1c': '\uff1e', '\uff3b': '\uff3d',
-        '\uff5b': '\uff5d', '\uff5f': '\uff60', '\uff62': '\uff63',
-    }
-
-    def _build_word_match(words, boundary_regex_fragment=None, prefix='', suffix=''):
-        if boundary_regex_fragment is None:
-            return r'\b(' + prefix + r'|'.join(re.escape(x) for x in words) + \
-                suffix + r')\b'
-        else:
-            return r'(? 0:
-                    next_open_pos = text.find(opening_chars, search_pos + n_chars)
-                    next_close_pos = text.find(closing_chars, search_pos + n_chars)
-
-                    if next_close_pos == -1:
-                        next_close_pos = len(text)
-                        nesting_level = 0
-                    elif next_open_pos != -1 and next_open_pos < next_close_pos:
-                        nesting_level += 1
-                        search_pos = next_open_pos
-                    else:  # next_close_pos < next_open_pos
-                        nesting_level -= 1
-                        search_pos = next_close_pos
-
-                end_pos = next_close_pos
-
-            if end_pos < 0:     # if we didn't find a closer, just highlight the
-                                # rest of the text in this class
-                end_pos = len(text)
-
-            if adverbs is not None and re.search(r':to\b', adverbs):
-                heredoc_terminator = text[match.start('delimiter') + n_chars:end_pos]
-                end_heredoc = re.search(r'^\s*' + re.escape(heredoc_terminator) +
-                                        r'\s*$', text[end_pos:], re.MULTILINE)
-
-                if end_heredoc:
-                    end_pos += end_heredoc.end()
-                else:
-                    end_pos = len(text)
-
-            yield match.start(), token_class, text[match.start():end_pos + n_chars]
-            context.pos = end_pos + n_chars
-
-        return callback
-
-    def opening_brace_callback(lexer, match, context):
-        stack = context.stack
-
-        yield match.start(), Text, context.text[match.start():match.end()]
-        context.pos = match.end()
-
-        # if we encounter an opening brace and we're one level
-        # below a token state, it means we need to increment
-        # the nesting level for braces so we know later when
-        # we should return to the token rules.
-        if len(stack) > 2 and stack[-2] == 'token':
-            context.perl6_token_nesting_level += 1
-
-    def closing_brace_callback(lexer, match, context):
-        stack = context.stack
-
-        yield match.start(), Text, context.text[match.start():match.end()]
-        context.pos = match.end()
-
-        # if we encounter a free closing brace and we're one level
-        # below a token state, it means we need to check the nesting
-        # level to see if we need to return to the token state.
-        if len(stack) > 2 and stack[-2] == 'token':
-            context.perl6_token_nesting_level -= 1
-            if context.perl6_token_nesting_level == 0:
-                stack.pop()
-
-    def embedded_perl6_callback(lexer, match, context):
-        context.perl6_token_nesting_level = 1
-        yield match.start(), Text, context.text[match.start():match.end()]
-        context.pos = match.end()
-        context.stack.append('root')
-
-    # If you're modifying these rules, be careful if you need to process '{' or '}'
-    # characters. We have special logic for processing these characters (due to the fact
-    # that you can nest Perl 6 code in regex blocks), so if you need to process one of
-    # them, make sure you also process the corresponding one!
-    tokens = {
-        'common': [
-            (r'#[`|=](?P(?P[' + ''.join(PERL6_BRACKETS) + r'])(?P=first_char)*)',
-             brackets_callback(Comment.Multiline)),
-            (r'#[^\n]*$', Comment.Single),
-            (r'^(\s*)=begin\s+(\w+)\b.*?^\1=end\s+\2', Comment.Multiline),
-            (r'^(\s*)=for.*?\n\s*?\n', Comment.Multiline),
-            (r'^=.*?\n\s*?\n', Comment.Multiline),
-            (r'(regex|token|rule)(\s*' + PERL6_IDENTIFIER_RANGE + '+:sym)',
-             bygroups(Keyword, Name), 'token-sym-brackets'),
-            (r'(regex|token|rule)(?!' + PERL6_IDENTIFIER_RANGE + r')(\s*' + PERL6_IDENTIFIER_RANGE + '+)?',
-             bygroups(Keyword, Name), 'pre-token'),
-            # deal with a special case in the Perl 6 grammar (role q { ... })
-            (r'(role)(\s+)(q)(\s*)', bygroups(Keyword, Whitespace, Name, Whitespace)),
-            (_build_word_match(PERL6_KEYWORDS, PERL6_IDENTIFIER_RANGE), Keyword),
-            (_build_word_match(PERL6_BUILTIN_CLASSES, PERL6_IDENTIFIER_RANGE, suffix='(?::[UD])?'),
-             Name.Builtin),
-            (_build_word_match(PERL6_BUILTINS, PERL6_IDENTIFIER_RANGE), Name.Builtin),
-            # copied from PerlLexer
-            (r'[$@%&][.^:?=!~]?' + PERL6_IDENTIFIER_RANGE + '+(?:<<.*?>>|<.*?>|«.*?»)*',
-             Name.Variable),
-            (r'\$[!/](?:<<.*?>>|<.*?>|«.*?»)*', Name.Variable.Global),
-            (r'::\?\w+', Name.Variable.Global),
-            (r'[$@%&]\*' + PERL6_IDENTIFIER_RANGE + '+(?:<<.*?>>|<.*?>|«.*?»)*',
-             Name.Variable.Global),
-            (r'\$(?:<.*?>)+', Name.Variable),
-            (r'(?:q|qq|Q)[a-zA-Z]?\s*(?P:[\w\s:]+)?\s*(?P(?P[^0-9a-zA-Z:\s])'
-             r'(?P=first_char)*)', brackets_callback(String)),
-            # copied from PerlLexer
-            (r'0_?[0-7]+(_[0-7]+)*', Number.Oct),
-            (r'0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*', Number.Hex),
-            (r'0b[01]+(_[01]+)*', Number.Bin),
-            (r'(?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?',
-             Number.Float),
-            (r'(?i)\d+(_\d*)*e[+-]?\d+(_\d*)*', Number.Float),
-            (r'\d+(_\d+)*', Number.Integer),
-            (r'(?<=~~)\s*/(?:\\\\|\\/|.)*?/', String.Regex),
-            (r'(?<=[=(,])\s*/(?:\\\\|\\/|.)*?/', String.Regex),
-            (r'm\w+(?=\()', Name),
-            (r'(?:m|ms|rx)\s*(?P:[\w\s:]+)?\s*(?P(?P[^\w:\s])'
-             r'(?P=first_char)*)', brackets_callback(String.Regex)),
-            (r'(?:s|ss|tr)\s*(?::[\w\s:]+)?\s*/(?:\\\\|\\/|.)*?/(?:\\\\|\\/|.)*?/',
-             String.Regex),
-            (r'<[^\s=].*?\S>', String),
-            (_build_word_match(PERL6_OPERATORS), Operator),
-            (r'\w' + PERL6_IDENTIFIER_RANGE + '*', Name),
-            (r"'(\\\\|\\[^\\]|[^'\\])*'", String),
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
-        ],
-        'root': [
-            include('common'),
-            (r'\{', opening_brace_callback),
-            (r'\}', closing_brace_callback),
-            (r'.+?', Text),
-        ],
-        'pre-token': [
-            include('common'),
-            (r'\{', Text, ('#pop', 'token')),
-            (r'.+?', Text),
-        ],
-        'token-sym-brackets': [
-            (r'(?P(?P[' + ''.join(PERL6_BRACKETS) + '])(?P=first_char)*)',
-             brackets_callback(Name), ('#pop', 'pre-token')),
-            default(('#pop', 'pre-token')),
-        ],
-        'token': [
-            (r'\}', Text, '#pop'),
-            (r'(?<=:)(?:my|our|state|constant|temp|let).*?;', using(this)),
-            # make sure that quotes in character classes aren't treated as strings
-            (r'<(?:[-!?+.]\s*)?\[.*?\]>', String.Regex),
-            # make sure that '#' characters in quotes aren't treated as comments
-            (r"(?my|our)\s+)?(?:module|class|role|enum|grammar)', line)
-            if class_decl:
-                if saw_perl_decl or class_decl.group('scope') is not None:
-                    return True
-                rating = 0.05
-                continue
-            break
-
-        if ':=' in text:
-            # Same logic as above for PerlLexer
-            rating /= 2
-
-        return rating
-
-    def __init__(self, **options):
-        super().__init__(**options)
-        self.encoding = options.get('encoding', 'utf-8')
diff --git a/voxvera/vendor/pygments/lexers/phix.py b/voxvera/vendor/pygments/lexers/phix.py
deleted file mode 100644
index f0b0377..0000000
--- a/voxvera/vendor/pygments/lexers/phix.py
+++ /dev/null
@@ -1,363 +0,0 @@
-"""
-    pygments.lexers.phix
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Phix.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Whitespace
-
-__all__ = ['PhixLexer']
-
-
-class PhixLexer(RegexLexer):
-    """
-    Pygments Lexer for Phix files (.exw).
-    See http://phix.x10.mx
-    """
-
-    name = 'Phix'
-    url = 'http://phix.x10.mx'
-    aliases = ['phix']
-    filenames = ['*.exw']
-    mimetypes = ['text/x-phix']
-    version_added = '2.14'
-
-    flags = re.MULTILINE    # nb: **NOT** re.DOTALL! (totally spanners comment handling)
-
-    preproc = (
-        'ifdef', 'elsifdef', 'elsedef'
-    )
-    # Note these lists are auto-generated by pwa/p2js.exw, when pwa\src\p2js_keywords.e (etc)
-    #     change, though of course subsequent copy/commit/pull requests are all manual steps.
-    types = (
-        'string', 'nullable_string', 'atom_string', 'atom', 'bool', 'boolean',
-        'cdCanvan', 'cdCanvas', 'complex', 'CURLcode', 'dictionary', 'int',
-        'integer', 'Ihandle', 'Ihandles', 'Ihandln', 'mpfr', 'mpq', 'mpz',
-        'mpz_or_string', 'number', 'rid_string', 'seq', 'sequence', 'timedate',
-        'object'
-    )
-    keywords = (
-        'abstract', 'class', 'continue', 'export', 'extends', 'nullable',
-        'private', 'public', 'static', 'struct', 'trace',
-        'and', 'break', 'by', 'case', 'catch', 'const', 'constant', 'debug',
-        'default', 'do', 'else', 'elsif', 'end', 'enum', 'exit', 'fallthru',
-        'fallthrough', 'for', 'forward', 'function', 'global', 'if', 'in',
-        'include', 'js', 'javascript', 'javascript_semantics', 'let', 'not',
-        'or', 'procedure', 'profile', 'profile_time', 'return', 'safe_mode',
-        'switch', 'then', 'to', 'try', 'type', 'type_check', 'until', 'warning',
-        'while', 'with', 'without', 'xor'
-    )
-    routines = (
-        'abort', 'abs', 'adjust_timedate', 'and_bits', 'and_bitsu', 'apply',
-        'append', 'arccos', 'arcsin', 'arctan', 'assert', 'atan2',
-        'atom_to_float32', 'atom_to_float64', 'bankers_rounding', 'beep',
-        'begins', 'binary_search', 'bits_to_int', 'bk_color', 'bytes_to_int',
-        'call_func', 'call_proc', 'cdCanvasActivate', 'cdCanvasArc',
-        'cdCanvasBegin', 'cdCanvasBox', 'cdCanvasChord', 'cdCanvasCircle',
-        'cdCanvasClear', 'cdCanvasEnd', 'cdCanvasFlush', 'cdCanvasFont',
-        'cdCanvasGetImageRGB', 'cdCanvasGetSize', 'cdCanvasGetTextAlignment',
-        'cdCanvasGetTextSize', 'cdCanvasLine', 'cdCanvasMark',
-        'cdCanvasMarkSize', 'cdCanvasMultiLineVectorText', 'cdCanvasPixel',
-        'cdCanvasRect', 'cdCanvasRoundedBox', 'cdCanvasRoundedRect',
-        'cdCanvasSector', 'cdCanvasSetAttribute', 'cdCanvasSetBackground',
-        'cdCanvasSetFillMode', 'cdCanvasSetForeground',
-        'cdCanvasSetInteriorStyle', 'cdCanvasSetLineStyle',
-        'cdCanvasSetLineWidth', 'cdCanvasSetTextAlignment', 'cdCanvasText',
-        'cdCanvasSetTextOrientation', 'cdCanvasGetTextOrientation',
-        'cdCanvasVectorText', 'cdCanvasVectorTextDirection',
-        'cdCanvasVectorTextSize', 'cdCanvasVertex', 'cdCreateCanvas',
-        'cdDecodeAlpha', 'cdDecodeColor', 'cdDecodeColorAlpha', 'cdEncodeAlpha',
-        'cdEncodeColor', 'cdEncodeColorAlpha', 'cdKillCanvas', 'cdVersion',
-        'cdVersionDate', 'ceil', 'change_timezone', 'choose', 'clear_screen',
-        'columnize', 'command_line', 'compare', 'complex_abs', 'complex_add',
-        'complex_arg', 'complex_conjugate', 'complex_cos', 'complex_cosh',
-        'complex_div', 'complex_exp', 'complex_imag', 'complex_inv',
-        'complex_log', 'complex_mul', 'complex_neg', 'complex_new',
-        'complex_norm', 'complex_power', 'complex_rho', 'complex_real',
-        'complex_round', 'complex_sin', 'complex_sinh', 'complex_sprint',
-        'complex_sqrt', 'complex_sub', 'complex_theta', 'concat', 'cos',
-        'crash', 'custom_sort', 'date', 'day_of_week', 'day_of_year',
-        'days_in_month', 'decode_base64', 'decode_flags', 'deep_copy', 'deld',
-        'deserialize', 'destroy_dict', 'destroy_queue', 'destroy_stack',
-        'dict_name', 'dict_size', 'elapsed', 'elapsed_short', 'encode_base64',
-        'equal', 'even', 'exp', 'extract', 'factorial', 'factors',
-        'file_size_k', 'find', 'find_all', 'find_any', 'find_replace', 'filter',
-        'flatten', 'float32_to_atom', 'float64_to_atom', 'floor',
-        'format_timedate', 'free_console', 'from_polar', 'gcd', 'get_file_base',
-        'get_file_extension', 'get_file_name', 'get_file_name_and_path',
-        'get_file_path', 'get_file_path_and_name', 'get_maxprime', 'get_prime',
-        'get_primes', 'get_primes_le', 'get_proper_dir', 'get_proper_path',
-        'get_rand', 'get_routine_info', 'get_test_abort', 'get_test_logfile',
-        'get_test_pause', 'get_test_verbosity', 'get_tzid', 'getd', 'getdd',
-        'getd_all_keys', 'getd_by_index', 'getd_index', 'getd_partial_key',
-        'glAttachShader', 'glBindBuffer', 'glBindTexture', 'glBufferData',
-        'glCanvasSpecialText', 'glClear', 'glClearColor', 'glColor',
-        'glCompileShader', 'glCreateBuffer', 'glCreateProgram',
-        'glCreateShader', 'glCreateTexture', 'glDeleteProgram',
-        'glDeleteShader', 'glDrawArrays', 'glEnable',
-        'glEnableVertexAttribArray', 'glFloat32Array', 'glInt32Array',
-        'glFlush', 'glGetAttribLocation', 'glGetError', 'glGetProgramInfoLog',
-        'glGetProgramParameter', 'glGetShaderInfoLog', 'glGetShaderParameter',
-        'glGetUniformLocation', 'glLinkProgram', 'glLoadIdentity',
-        'glMatrixMode', 'glOrtho', 'glRotatef', 'glShadeModel',
-        'glShaderSource', 'glSimpleA7texcoords', 'glTexImage2Dc',
-        'glTexParameteri', 'glTranslate', 'glUniform1f', 'glUniform1i',
-        'glUniformMatrix4fv', 'glUseProgram', 'glVertex',
-        'glVertexAttribPointer', 'glViewport', 'head', 'hsv_to_rgb', 'iff',
-        'iif', 'include_file', 'incl0de_file', 'insert', 'instance',
-        'int_to_bits', 'int_to_bytes', 'is_dict', 'is_integer', 's_leap_year',
-        'is_prime', 'is_prime2', 'islower', 'isupper', 'Icallback',
-        'iup_isdouble', 'iup_isprint', 'iup_XkeyBase', 'IupAppend', 'IupAlarm',
-        'IupBackgroundBox', 'IupButton', 'IupCalendar', 'IupCanvas',
-        'IupClipboard', 'IupClose', 'IupCloseOnEscape', 'IupControlsOpen',
-        'IupDatePick', 'IupDestroy', 'IupDialog', 'IupDrawArc', 'IupDrawBegin',
-        'IupDrawEnd', 'IupDrawGetSize', 'IupDrawGetTextSize', 'IupDrawLine',
-        'IupDrawRectangle', 'IupDrawText', 'IupExpander', 'IupFill',
-        'IupFlatLabel', 'IupFlatList', 'IupFlatTree', 'IupFlush', 'IupFrame',
-        'IupGetAttribute', 'IupGetAttributeId', 'IupGetAttributePtr',
-        'IupGetBrother', 'IupGetChild', 'IupGetChildCount', 'IupGetClassName',
-        'IupGetDialog', 'IupGetDialogChild', 'IupGetDouble', 'IupGetFocus',
-        'IupGetGlobal', 'IupGetGlobalInt', 'IupGetGlobalIntInt', 'IupGetInt',
-        'IupGetInt2', 'IupGetIntId', 'IupGetIntInt', 'IupGetParent',
-        'IupGLCanvas', 'IupGLCanvasOpen', 'IupGLMakeCurrent', 'IupGraph',
-        'IupHbox', 'IupHide', 'IupImage', 'IupImageRGBA', 'IupItem',
-        'iupKeyCodeToName', 'IupLabel', 'IupLink', 'IupList', 'IupMap',
-        'IupMenu', 'IupMenuItem', 'IupMessage', 'IupMessageDlg', 'IupMultiBox',
-        'IupMultiLine', 'IupNextField', 'IupNormaliser', 'IupOpen',
-        'IupPlayInput', 'IupPopup', 'IupPreviousField', 'IupProgressBar',
-        'IupRadio', 'IupRecordInput', 'IupRedraw', 'IupRefresh',
-        'IupRefreshChildren', 'IupSeparator', 'IupSetAttribute',
-        'IupSetAttributes', 'IupSetAttributeHandle', 'IupSetAttributeId',
-        'IupSetAttributePtr', 'IupSetCallback', 'IupSetCallbacks',
-        'IupSetDouble', 'IupSetFocus', 'IupSetGlobal', 'IupSetGlobalInt',
-        'IupSetGlobalFunction', 'IupSetHandle', 'IupSetInt',
-        'IupSetStrAttribute', 'IupSetStrGlobal', 'IupShow', 'IupShowXY',
-        'IupSplit', 'IupStoreAttribute', 'IupSubmenu', 'IupTable',
-        'IupTableClearSelected', 'IupTableClick_cb', 'IupTableGetSelected',
-        'IupTableResize_cb', 'IupTableSetData', 'IupTabs', 'IupText',
-        'IupTimer', 'IupToggle', 'IupTreeAddNodes', 'IupTreeView', 'IupUpdate',
-        'IupValuator', 'IupVbox', 'join', 'join_by', 'join_path', 'k_perm',
-        'largest', 'lcm', 'length', 'log', 'log10', 'log2', 'lower',
-        'm4_crossProduct', 'm4_inverse', 'm4_lookAt', 'm4_multiply',
-        'm4_normalize', 'm4_perspective', 'm4_subtractVectors', 'm4_xRotate',
-        'm4_yRotate', 'machine_bits', 'machine_word', 'match', 'match_all',
-        'match_replace', 'max', 'maxsq', 'min', 'minsq', 'mod', 'mpfr_add',
-        'mpfr_ceil', 'mpfr_cmp', 'mpfr_cmp_si', 'mpfr_const_pi', 'mpfr_div',
-        'mpfr_div_si', 'mpfr_div_z', 'mpfr_floor', 'mpfr_free', 'mpfr_get_d',
-        'mpfr_get_default_precision', 'mpfr_get_default_rounding_mode',
-        'mpfr_get_fixed', 'mpfr_get_precision', 'mpfr_get_si', 'mpfr_init',
-        'mpfr_inits', 'mpfr_init_set', 'mpfr_init_set_q', 'mpfr_init_set_z',
-        'mpfr_mul', 'mpfr_mul_si', 'mpfr_pow_si', 'mpfr_set', 'mpfr_set_d',
-        'mpfr_set_default_precision', 'mpfr_set_default_rounding_mode',
-        'mpfr_set_precision', 'mpfr_set_q', 'mpfr_set_si', 'mpfr_set_str',
-        'mpfr_set_z', 'mpfr_si_div', 'mpfr_si_sub', 'mpfr_sqrt', 'mpfr_sub',
-        'mpfr_sub_si', 'mpq_abs', 'mpq_add', 'mpq_add_si', 'mpq_canonicalize',
-        'mpq_cmp', 'mpq_cmp_si', 'mpq_div', 'mpq_div_2exp', 'mpq_free',
-        'mpq_get_den', 'mpq_get_num', 'mpq_get_str', 'mpq_init', 'mpq_init_set',
-        'mpq_init_set_si', 'mpq_init_set_str', 'mpq_init_set_z', 'mpq_inits',
-        'mpq_inv', 'mpq_mul', 'mpq_neg', 'mpq_set', 'mpq_set_si', 'mpq_set_str',
-        'mpq_set_z', 'mpq_sub', 'mpz_abs', 'mpz_add', 'mpz_addmul',
-        'mpz_addmul_ui', 'mpz_addmul_si', 'mpz_add_si', 'mpz_add_ui', 'mpz_and',
-        'mpz_bin_uiui', 'mpz_cdiv_q', 'mpz_cmp', 'mpz_cmp_si', 'mpz_divexact',
-        'mpz_divexact_ui', 'mpz_divisible_p', 'mpz_divisible_ui_p', 'mpz_even',
-        'mpz_fac_ui', 'mpz_factorstring', 'mpz_fdiv_q', 'mpz_fdiv_q_2exp',
-        'mpz_fdiv_q_ui', 'mpz_fdiv_qr', 'mpz_fdiv_r', 'mpz_fdiv_ui',
-        'mpz_fib_ui', 'mpz_fib2_ui', 'mpz_fits_atom', 'mpz_fits_integer',
-        'mpz_free', 'mpz_gcd', 'mpz_gcd_ui', 'mpz_get_atom', 'mpz_get_integer',
-        'mpz_get_short_str', 'mpz_get_str', 'mpz_init', 'mpz_init_set',
-        'mpz_inits', 'mpz_invert', 'mpz_lcm', 'mpz_lcm_ui', 'mpz_max',
-        'mpz_min', 'mpz_mod', 'mpz_mod_ui', 'mpz_mul', 'mpz_mul_2exp',
-        'mpz_mul_d', 'mpz_mul_si', 'mpz_neg', 'mpz_nthroot', 'mpz_odd',
-        'mpz_pollard_rho', 'mpz_pow_ui', 'mpz_powm', 'mpz_powm_ui', 'mpz_prime',
-        'mpz_prime_factors', 'mpz_prime_mr', 'mpz_rand', 'mpz_rand_ui',
-        'mpz_re_compose', 'mpz_remove', 'mpz_scan0', 'mpz_scan1', 'mpz_set',
-        'mpz_set_d', 'mpz_set_si', 'mpz_set_str', 'mpz_set_v', 'mpz_sign',
-        'mpz_sizeinbase', 'mpz_sqrt', 'mpz_sub', 'mpz_sub_si', 'mpz_sub_ui',
-        'mpz_si_sub', 'mpz_tdiv_q_2exp', 'mpz_tdiv_r_2exp', 'mpz_tstbit',
-        'mpz_ui_pow_ui', 'mpz_xor', 'named_dict', 'new_dict', 'new_queue',
-        'new_stack', 'not_bits', 'not_bitsu', 'odd', 'or_all', 'or_allu',
-        'or_bits', 'or_bitsu', 'ord', 'ordinal', 'ordinant',
-        'override_timezone', 'pad', 'pad_head', 'pad_tail', 'parse_date_string',
-        'papply', 'peep', 'peepn', 'peep_dict', 'permute', 'permutes',
-        'platform', 'pop', 'popn', 'pop_dict', 'power', 'pp', 'ppEx', 'ppExf',
-        'ppf', 'ppOpt', 'pq_add', 'pq_destroy', 'pq_empty', 'pq_new', 'pq_peek',
-        'pq_pop', 'pq_pop_data', 'pq_size', 'prepend', 'prime_factors',
-        'printf', 'product', 'proper', 'push', 'pushn', 'putd', 'puts',
-        'queue_empty', 'queue_size', 'rand', 'rand_range', 'reinstate',
-        'remainder', 'remove', 'remove_all', 'repeat', 'repeatch', 'replace',
-        'requires', 'reverse', 'rfind', 'rgb', 'rmatch', 'rmdr', 'rnd', 'round',
-        'routine_id', 'scanf', 'serialize', 'series', 'set_rand',
-        'set_test_abort', 'set_test_logfile', 'set_test_module',
-        'set_test_pause', 'set_test_verbosity', 'set_timedate_formats',
-        'set_timezone', 'setd', 'setd_default', 'shorten', 'sha256',
-        'shift_bits', 'shuffle', 'sign', 'sin', 'smallest', 'sort',
-        'sort_columns', 'speak', 'splice', 'split', 'split_any', 'split_by',
-        'sprint', 'sprintf', 'sq_abs', 'sq_add', 'sq_and', 'sq_and_bits',
-        'sq_arccos', 'sq_arcsin', 'sq_arctan', 'sq_atom', 'sq_ceil', 'sq_cmp',
-        'sq_cos', 'sq_div', 'sq_even', 'sq_eq', 'sq_floor', 'sq_floor_div',
-        'sq_ge', 'sq_gt', 'sq_int', 'sq_le', 'sq_log', 'sq_log10', 'sq_log2',
-        'sq_lt', 'sq_max', 'sq_min', 'sq_mod', 'sq_mul', 'sq_ne', 'sq_not',
-        'sq_not_bits', 'sq_odd', 'sq_or', 'sq_or_bits', 'sq_power', 'sq_rand',
-        'sq_remainder', 'sq_rmdr', 'sq_rnd', 'sq_round', 'sq_seq', 'sq_sign',
-        'sq_sin', 'sq_sqrt', 'sq_str', 'sq_sub', 'sq_tan', 'sq_trunc',
-        'sq_uminus', 'sq_xor', 'sq_xor_bits', 'sqrt', 'square_free',
-        'stack_empty', 'stack_size', 'substitute', 'substitute_all', 'sum',
-        'tail', 'tan', 'test_equal', 'test_fail', 'test_false',
-        'test_not_equal', 'test_pass', 'test_summary', 'test_true',
-        'text_color', 'throw', 'time', 'timedate_diff', 'timedelta',
-        'to_integer', 'to_number', 'to_rgb', 'to_string', 'traverse_dict',
-        'traverse_dict_partial_key', 'trim', 'trim_head', 'trim_tail', 'trunc',
-        'tagset', 'tagstart', 'typeof', 'unique', 'unix_dict', 'upper',
-        'utf8_to_utf32', 'utf32_to_utf8', 'version', 'vlookup', 'vslice',
-        'wglGetProcAddress', 'wildcard_file', 'wildcard_match', 'with_rho',
-        'with_theta', 'xml_new_doc', 'xml_new_element', 'xml_set_attribute',
-        'xml_sprint', 'xor_bits', 'xor_bitsu',
-        'accept', 'allocate', 'allocate_string', 'allow_break', 'ARM',
-        'atom_to_float80', 'c_func', 'c_proc', 'call_back', 'chdir',
-        'check_break', 'clearDib', 'close', 'closesocket', 'console',
-        'copy_file', 'create', 'create_directory', 'create_thread',
-        'curl_easy_cleanup', 'curl_easy_get_file', 'curl_easy_init',
-        'curl_easy_perform', 'curl_easy_perform_ex', 'curl_easy_setopt',
-        'curl_easy_strerror', 'curl_global_cleanup', 'curl_global_init',
-        'curl_slist_append', 'curl_slist_free_all', 'current_dir', 'cursor',
-        'define_c_func', 'define_c_proc', 'delete', 'delete_cs', 'delete_file',
-        'dir', 'DLL', 'drawDib', 'drawShadedPolygonToDib', 'ELF32', 'ELF64',
-        'enter_cs', 'eval', 'exit_thread', 'free', 'file_exists', 'final',
-        'float80_to_atom', 'format', 'get_bytes', 'get_file_date',
-        'get_file_size', 'get_file_type', 'get_interpreter', 'get_key',
-        'get_socket_error', 'get_text', 'get_thread_exitcode', 'get_thread_id',
-        'getc', 'getenv', 'gets', 'getsockaddr', 'glBegin', 'glCallList',
-        'glFrustum', 'glGenLists', 'glGetString', 'glLight', 'glMaterial',
-        'glNewList', 'glNormal', 'glPopMatrix', 'glPushMatrix', 'glRotate',
-        'glEnd', 'glEndList', 'glTexImage2D', 'goto', 'GUI', 'icons', 'ilASM',
-        'include_files', 'include_paths', 'init_cs', 'ip_to_string',
-        'IupConfig', 'IupConfigDialogClosed', 'IupConfigDialogShow',
-        'IupConfigGetVariableInt', 'IupConfigLoad', 'IupConfigSave',
-        'IupConfigSetVariableInt', 'IupExitLoop', 'IupFileDlg', 'IupFileList',
-        'IupGLSwapBuffers', 'IupHelp', 'IupLoopStep', 'IupMainLoop',
-        'IupNormalizer', 'IupPlot', 'IupPlotAdd', 'IupPlotBegin', 'IupPlotEnd',
-        'IupPlotInsert', 'IupSaveImage', 'IupTreeGetUserId', 'IupUser',
-        'IupVersion', 'IupVersionDate', 'IupVersionNumber', 'IupVersionShow',
-        'killDib', 'leave_cs', 'listen', 'manifest', 'mem_copy', 'mem_set',
-        'mpfr_gamma', 'mpfr_printf', 'mpfr_sprintf', 'mpz_export', 'mpz_import',
-        'namespace', 'new', 'newDib', 'open', 'open_dll', 'PE32', 'PE64',
-        'peek', 'peek_string', 'peek1s', 'peek1u', 'peek2s', 'peek2u', 'peek4s',
-        'peek4u', 'peek8s', 'peek8u', 'peekNS', 'peekns', 'peeknu', 'poke',
-        'poke2', 'poke4', 'poke8', 'pokeN', 'poke_string', 'poke_wstring',
-        'position', 'progress', 'prompt_number', 'prompt_string', 'read_file',
-        'read_lines', 'recv', 'resume_thread', 'seek', 'select', 'send',
-        'setHandler', 'shutdown', 'sleep', 'SO', 'sockaddr_in', 'socket',
-        'split_path', 'suspend_thread', 'system', 'system_exec', 'system_open',
-        'system_wait', 'task_clock_start', 'task_clock_stop', 'task_create',
-        'task_delay', 'task_list', 'task_schedule', 'task_self', 'task_status',
-        'task_suspend', 'task_yield', 'thread_safe_string', 'try_cs',
-        'utf8_to_utf16', 'utf16_to_utf8', 'utf16_to_utf32', 'utf32_to_utf16',
-        'video_config', 'WSACleanup', 'wait_thread', 'walk_dir', 'where',
-        'write_lines', 'wait_key'
-    )
-    constants = (
-        'ANY_QUEUE', 'ASCENDING', 'BLACK', 'BLOCK_CURSOR', 'BLUE',
-        'BRIGHT_CYAN', 'BRIGHT_BLUE', 'BRIGHT_GREEN', 'BRIGHT_MAGENTA',
-        'BRIGHT_RED', 'BRIGHT_WHITE', 'BROWN', 'C_DWORD', 'C_INT', 'C_POINTER',
-        'C_USHORT', 'C_WORD', 'CD_AMBER', 'CD_BLACK', 'CD_BLUE', 'CD_BOLD',
-        'CD_BOLD_ITALIC', 'CD_BOX', 'CD_CENTER', 'CD_CIRCLE', 'CD_CLOSED_LINES',
-        'CD_CONTINUOUS', 'CD_CUSTOM', 'CD_CYAN', 'CD_DARK_BLUE', 'CD_DARK_CYAN',
-        'CD_DARK_GRAY', 'CD_DARK_GREY', 'CD_DARK_GREEN', 'CD_DARK_MAGENTA',
-        'CD_DARK_RED', 'CD_DARK_YELLOW', 'CD_DASH_DOT', 'CD_DASH_DOT_DOT',
-        'CD_DASHED', 'CD_DBUFFER', 'CD_DEG2RAD', 'CD_DIAMOND', 'CD_DOTTED',
-        'CD_EAST', 'CD_EVENODD', 'CD_FILL', 'CD_GL', 'CD_GRAY', 'CD_GREY',
-        'CD_GREEN', 'CD_HATCH', 'CD_HOLLOW', 'CD_HOLLOW_BOX',
-        'CD_HOLLOW_CIRCLE', 'CD_HOLLOW_DIAMOND', 'CD_INDIGO', 'CD_ITALIC',
-        'CD_IUP', 'CD_IUPDBUFFER', 'CD_LIGHT_BLUE', 'CD_LIGHT_GRAY',
-        'CD_LIGHT_GREY', 'CD_LIGHT_GREEN', 'CD_LIGHT_PARCHMENT', 'CD_MAGENTA',
-        'CD_NAVY', 'CD_NORTH', 'CD_NORTH_EAST', 'CD_NORTH_WEST', 'CD_OLIVE',
-        'CD_OPEN_LINES', 'CD_ORANGE', 'CD_PARCHMENT', 'CD_PATTERN',
-        'CD_PRINTER', 'CD_PURPLE', 'CD_PLAIN', 'CD_PLUS', 'CD_QUERY',
-        'CD_RAD2DEG', 'CD_RED', 'CD_SILVER', 'CD_SOLID', 'CD_SOUTH_EAST',
-        'CD_SOUTH_WEST', 'CD_STAR', 'CD_STIPPLE', 'CD_STRIKEOUT',
-        'CD_UNDERLINE', 'CD_WEST', 'CD_WHITE', 'CD_WINDING', 'CD_VIOLET',
-        'CD_X', 'CD_YELLOW', 'CURLE_OK', 'CURLOPT_MAIL_FROM',
-        'CURLOPT_MAIL_RCPT', 'CURLOPT_PASSWORD', 'CURLOPT_READDATA',
-        'CURLOPT_READFUNCTION', 'CURLOPT_SSL_VERIFYPEER',
-        'CURLOPT_SSL_VERIFYHOST', 'CURLOPT_UPLOAD', 'CURLOPT_URL',
-        'CURLOPT_USE_SSL', 'CURLOPT_USERNAME', 'CURLOPT_VERBOSE',
-        'CURLOPT_WRITEFUNCTION', 'CURLUSESSL_ALL', 'CYAN', 'D_NAME',
-        'D_ATTRIBUTES', 'D_SIZE', 'D_YEAR', 'D_MONTH', 'D_DAY', 'D_HOUR',
-        'D_MINUTE', 'D_SECOND', 'D_CREATION', 'D_LASTACCESS', 'D_MODIFICATION',
-        'DT_YEAR', 'DT_MONTH', 'DT_DAY', 'DT_HOUR', 'DT_MINUTE', 'DT_SECOND',
-        'DT_DOW', 'DT_MSEC', 'DT_DOY', 'DT_GMT', 'EULER', 'E_CODE', 'E_ADDR',
-        'E_LINE', 'E_RTN', 'E_NAME', 'E_FILE', 'E_PATH', 'E_USER', 'false',
-        'False', 'FALSE', 'FIFO_QUEUE', 'FILETYPE_DIRECTORY', 'FILETYPE_FILE',
-        'GET_EOF', 'GET_FAIL', 'GET_IGNORE', 'GET_SUCCESS',
-        'GL_AMBIENT_AND_DIFFUSE', 'GL_ARRAY_BUFFER', 'GL_CLAMP',
-        'GL_CLAMP_TO_BORDER', 'GL_CLAMP_TO_EDGE', 'GL_COLOR_BUFFER_BIT',
-        'GL_COMPILE', 'GL_COMPILE_STATUS', 'GL_CULL_FACE',
-        'GL_DEPTH_BUFFER_BIT', 'GL_DEPTH_TEST', 'GL_EXTENSIONS', 'GL_FLAT',
-        'GL_FLOAT', 'GL_FRAGMENT_SHADER', 'GL_FRONT', 'GL_LIGHT0',
-        'GL_LIGHTING', 'GL_LINEAR', 'GL_LINK_STATUS', 'GL_MODELVIEW',
-        'GL_NEAREST', 'GL_NO_ERROR', 'GL_NORMALIZE', 'GL_POSITION',
-        'GL_PROJECTION', 'GL_QUAD_STRIP', 'GL_QUADS', 'GL_RENDERER',
-        'GL_REPEAT', 'GL_RGB', 'GL_RGBA', 'GL_SMOOTH', 'GL_STATIC_DRAW',
-        'GL_TEXTURE_2D', 'GL_TEXTURE_MAG_FILTER', 'GL_TEXTURE_MIN_FILTER',
-        'GL_TEXTURE_WRAP_S', 'GL_TEXTURE_WRAP_T', 'GL_TRIANGLES',
-        'GL_UNSIGNED_BYTE', 'GL_VENDOR', 'GL_VERSION', 'GL_VERTEX_SHADER',
-        'GRAY', 'GREEN', 'GT_LF_STRIPPED', 'GT_WHOLE_FILE', 'INVLN10',
-        'IUP_CLOSE', 'IUP_CONTINUE', 'IUP_DEFAULT', 'IUP_BLACK', 'IUP_BLUE',
-        'IUP_BUTTON1', 'IUP_BUTTON3', 'IUP_CENTER', 'IUP_CYAN', 'IUP_DARK_BLUE',
-        'IUP_DARK_CYAN', 'IUP_DARK_GRAY', 'IUP_DARK_GREY', 'IUP_DARK_GREEN',
-        'IUP_DARK_MAGENTA', 'IUP_DARK_RED', 'IUP_GRAY', 'IUP_GREY', 'IUP_GREEN',
-        'IUP_IGNORE', 'IUP_INDIGO', 'IUP_MAGENTA', 'IUP_MASK_INT',
-        'IUP_MASK_UINT', 'IUP_MOUSEPOS', 'IUP_NAVY', 'IUP_OLIVE', 'IUP_RECTEXT',
-        'IUP_RED', 'IUP_LIGHT_BLUE', 'IUP_LIGHT_GRAY', 'IUP_LIGHT_GREY',
-        'IUP_LIGHT_GREEN', 'IUP_ORANGE', 'IUP_PARCHMENT', 'IUP_PURPLE',
-        'IUP_SILVER', 'IUP_TEAL', 'IUP_VIOLET', 'IUP_WHITE', 'IUP_YELLOW',
-        'K_BS', 'K_cA', 'K_cC', 'K_cD', 'K_cF5', 'K_cK', 'K_cM', 'K_cN', 'K_cO',
-        'K_cP', 'K_cR', 'K_cS', 'K_cT', 'K_cW', 'K_CR', 'K_DEL', 'K_DOWN',
-        'K_END', 'K_ESC', 'K_F1', 'K_F2', 'K_F3', 'K_F4', 'K_F5', 'K_F6',
-        'K_F7', 'K_F8', 'K_F9', 'K_F10', 'K_F11', 'K_F12', 'K_HOME', 'K_INS',
-        'K_LEFT', 'K_MIDDLE', 'K_PGDN', 'K_PGUP', 'K_RIGHT', 'K_SP', 'K_TAB',
-        'K_UP', 'K_h', 'K_i', 'K_j', 'K_p', 'K_r', 'K_s', 'JS', 'LIFO_QUEUE',
-        'LINUX', 'MAX_HEAP', 'MAGENTA', 'MIN_HEAP', 'Nan', 'NO_CURSOR', 'null',
-        'NULL', 'PI', 'pp_Ascii', 'pp_Brkt', 'pp_Date', 'pp_File', 'pp_FltFmt',
-        'pp_Indent', 'pp_IntCh', 'pp_IntFmt', 'pp_Maxlen', 'pp_Nest',
-        'pp_Pause', 'pp_Q22', 'pp_StrFmt', 'RED', 'SEEK_OK', 'SLASH',
-        'TEST_ABORT', 'TEST_CRASH', 'TEST_PAUSE', 'TEST_PAUSE_FAIL',
-        'TEST_QUIET', 'TEST_SHOW_ALL', 'TEST_SHOW_FAILED', 'TEST_SUMMARY',
-        'true', 'True', 'TRUE', 'VC_SCRNLINES', 'WHITE', 'WINDOWS', 'YELLOW'
-    )
-
-    tokens = {
-        'root': [
-            (r"\s+", Whitespace),
-            (r'/\*|--/\*|#\[', Comment.Multiline, 'comment'),
-            (r'(?://|--|#!).*$', Comment.Single),
-#Alt:
-#           (r'//.*$|--.*$|#!.*$', Comment.Single),
-            (r'"([^"\\]|\\.)*"', String.Other),
-            (r'\'[^\']*\'', String.Other),
-            (r'`[^`]*`', String.Other),
-
-            (words(types, prefix=r'\b', suffix=r'\b'), Name.Function),
-            (words(routines, prefix=r'\b', suffix=r'\b'), Name.Function),
-            (words(preproc, prefix=r'\b', suffix=r'\b'), Keyword.Declaration),
-            (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword.Declaration),
-            (words(constants, prefix=r'\b', suffix=r'\b'), Name.Constant),
-            # Aside: Phix only supports/uses the ascii/non-unicode tilde
-            (r'!=|==|<<|>>|:=|[-~+/*%=<>&^|\.(){},?:\[\]$\\;#]', Operator),
-            (r'[\w-]+', Text)
-        ],
-        'comment': [
-            (r'[^*/#]+', Comment.Multiline),
-            (r'/\*|#\[', Comment.Multiline, '#push'),
-            (r'\*/|#\]', Comment.Multiline, '#pop'),
-            (r'[*/#]', Comment.Multiline)
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/php.py b/voxvera/vendor/pygments/lexers/php.py
deleted file mode 100644
index 82d4aeb..0000000
--- a/voxvera/vendor/pygments/lexers/php.py
+++ /dev/null
@@ -1,334 +0,0 @@
-"""
-    pygments.lexers.php
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexers for PHP and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import Lexer, RegexLexer, include, bygroups, default, \
-    using, this, words, do_insertions, line_re
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Other, Generic
-from pygments.util import get_bool_opt, get_list_opt, shebang_matches
-
-__all__ = ['ZephirLexer', 'PsyshConsoleLexer', 'PhpLexer']
-
-
-class ZephirLexer(RegexLexer):
-    """
-    For Zephir language source code.
-
-    Zephir is a compiled high level language aimed
-    to the creation of C-extensions for PHP.
-    """
-
-    name = 'Zephir'
-    url = 'http://zephir-lang.com/'
-    aliases = ['zephir']
-    filenames = ['*.zep']
-    version_added = '2.0'
-
-    zephir_keywords = ['fetch', 'echo', 'isset', 'empty']
-    zephir_type = ['bit', 'bits', 'string']
-
-    flags = re.DOTALL | re.MULTILINE
-
-    tokens = {
-        'commentsandwhitespace': [
-            (r'\s+', Text),
-            (r'//.*?\n', Comment.Single),
-            (r'/\*.*?\*/', Comment.Multiline)
-        ],
-        'slashstartsregex': [
-            include('commentsandwhitespace'),
-            (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/'
-             r'([gim]+\b|\B)', String.Regex, '#pop'),
-            (r'/', Operator, '#pop'),
-            default('#pop')
-        ],
-        'badregex': [
-            (r'\n', Text, '#pop')
-        ],
-        'root': [
-            (r'^(?=\s|/)', Text, 'slashstartsregex'),
-            include('commentsandwhitespace'),
-            (r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'
-             r'(<<|>>>?|==?|!=?|->|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'),
-            (r'[{(\[;,]', Punctuation, 'slashstartsregex'),
-            (r'[})\].]', Punctuation),
-            (r'(for|in|while|do|break|return|continue|switch|case|default|if|else|loop|'
-             r'require|inline|throw|try|catch|finally|new|delete|typeof|instanceof|void|'
-             r'namespace|use|extends|this|fetch|isset|unset|echo|fetch|likely|unlikely|'
-             r'empty)\b', Keyword, 'slashstartsregex'),
-            (r'(var|let|with|function)\b', Keyword.Declaration, 'slashstartsregex'),
-            (r'(abstract|boolean|bool|char|class|const|double|enum|export|extends|final|'
-             r'native|goto|implements|import|int|string|interface|long|ulong|char|uchar|'
-             r'float|unsigned|private|protected|public|short|static|self|throws|reverse|'
-             r'transient|volatile|readonly)\b', Keyword.Reserved),
-            (r'(true|false|null|undefined)\b', Keyword.Constant),
-            (r'(Array|Boolean|Date|_REQUEST|_COOKIE|_SESSION|'
-             r'_GET|_POST|_SERVER|this|stdClass|range|count|iterator|'
-             r'window)\b', Name.Builtin),
-            (r'[$a-zA-Z_][\w\\]*', Name.Other),
-            (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
-            (r'0x[0-9a-fA-F]+', Number.Hex),
-            (r'[0-9]+', Number.Integer),
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
-            (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
-        ]
-    }
-
-
-class PsyshConsoleLexer(Lexer):
-    """
-    For PsySH console output, such as:
-
-    .. sourcecode:: psysh
-
-        >>> $greeting = function($name): string {
-        ...     return "Hello, {$name}";
-        ... };
-        => Closure($name): string {#2371 …3}
-        >>> $greeting('World')
-        => "Hello, World"
-    """
-    name = 'PsySH console session for PHP'
-    url = 'https://psysh.org/'
-    aliases = ['psysh']
-    version_added = '2.7'
-
-    def __init__(self, **options):
-        options['startinline'] = True
-        Lexer.__init__(self, **options)
-
-    def get_tokens_unprocessed(self, text):
-        phplexer = PhpLexer(**self.options)
-        curcode = ''
-        insertions = []
-        for match in line_re.finditer(text):
-            line = match.group()
-            if line.startswith('>>> ') or line.startswith('... '):
-                insertions.append((len(curcode),
-                                   [(0, Generic.Prompt, line[:4])]))
-                curcode += line[4:]
-            elif line.rstrip() == '...':
-                insertions.append((len(curcode),
-                                   [(0, Generic.Prompt, '...')]))
-                curcode += line[3:]
-            else:
-                if curcode:
-                    yield from do_insertions(
-                        insertions, phplexer.get_tokens_unprocessed(curcode))
-                    curcode = ''
-                    insertions = []
-                yield match.start(), Generic.Output, line
-        if curcode:
-            yield from do_insertions(insertions,
-                                     phplexer.get_tokens_unprocessed(curcode))
-
-
-class PhpLexer(RegexLexer):
-    """
-    For PHP source code.
-    For PHP embedded in HTML, use the `HtmlPhpLexer`.
-
-    Additional options accepted:
-
-    `startinline`
-        If given and ``True`` the lexer starts highlighting with
-        php code (i.e.: no starting ``>> from pygments.lexers._php_builtins import MODULES
-            >>> MODULES.keys()
-            ['PHP Options/Info', 'Zip', 'dba', ...]
-
-        In fact the names of those modules match the module names from
-        the php documentation.
-    """
-
-    name = 'PHP'
-    url = 'https://www.php.net/'
-    aliases = ['php', 'php3', 'php4', 'php5']
-    filenames = ['*.php', '*.php[345]', '*.inc']
-    mimetypes = ['text/x-php']
-    version_added = ''
-
-    # Note that a backslash is included, PHP uses a backslash as a namespace
-    # separator.
-    _ident_inner = r'(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*'
-    # But not inside strings.
-    _ident_nons = r'(?:[_a-z]|[^\x00-\x7f])(?:\w|[^\x00-\x7f])*'
-
-    flags = re.IGNORECASE | re.DOTALL | re.MULTILINE
-    tokens = {
-        'root': [
-            (r'<\?(php)?', Comment.Preproc, 'php'),
-            (r'[^<]+', Other),
-            (r'<', Other)
-        ],
-        'php': [
-            (r'\?>', Comment.Preproc, '#pop'),
-            (r'(<<<)([\'"]?)(' + _ident_nons + r')(\2\n.*?\n\s*)(\3)(;?)(\n)',
-             bygroups(String, String, String.Delimiter, String, String.Delimiter,
-                      Punctuation, Text)),
-            (r'\s+', Text),
-            (r'#\[', Punctuation, 'attribute'),
-            (r'#.*?\n', Comment.Single),
-            (r'//.*?\n', Comment.Single),
-            # put the empty comment here, it is otherwise seen as
-            # the start of a docstring
-            (r'/\*\*/', Comment.Multiline),
-            (r'/\*\*.*?\*/', String.Doc),
-            (r'/\*.*?\*/', Comment.Multiline),
-            (r'(->|::)(\s*)(' + _ident_nons + ')',
-             bygroups(Operator, Text, Name.Attribute)),
-            (r'[~!%^&*+=|:.<>/@-]+', Operator),
-            (r'\?', Operator),  # don't add to the charclass above!
-            (r'[\[\]{}();,]+', Punctuation),
-            (r'(new)(\s+)(class)\b', bygroups(Keyword, Text, Keyword)),
-            (r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
-            (r'(function)(\s*)(?=\()', bygroups(Keyword, Text)),
-            (r'(function)(\s+)(&?)(\s*)',
-             bygroups(Keyword, Text, Operator, Text), 'functionname'),
-            (r'(const)(\s+)(' + _ident_inner + ')',
-             bygroups(Keyword, Text, Name.Constant)),
-            (r'(and|E_PARSE|old_function|E_ERROR|or|as|E_WARNING|parent|'
-             r'eval|PHP_OS|break|exit|case|extends|PHP_VERSION|cfunction|'
-             r'FALSE|print|for|require|continue|foreach|require_once|'
-             r'declare|return|default|static|do|switch|die|stdClass|'
-             r'echo|else|TRUE|elseif|var|empty|if|xor|enddeclare|include|'
-             r'virtual|endfor|include_once|while|endforeach|global|'
-             r'endif|list|endswitch|new|endwhile|not|'
-             r'array|E_ALL|NULL|final|php_user_filter|interface|'
-             r'implements|public|private|protected|abstract|clone|try|'
-             r'catch|throw|this|use|namespace|trait|yield|'
-             r'finally|match)\b', Keyword),
-            (r'(true|false|null)\b', Keyword.Constant),
-            include('magicconstants'),
-            (r'\$\{', Name.Variable, 'variablevariable'),
-            (r'\$+' + _ident_inner, Name.Variable),
-            (_ident_inner, Name.Other),
-            (r'(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?', Number.Float),
-            (r'\d+e[+-]?[0-9]+', Number.Float),
-            (r'0[0-7]+', Number.Oct),
-            (r'0x[a-f0-9]+', Number.Hex),
-            (r'\d+', Number.Integer),
-            (r'0b[01]+', Number.Bin),
-            (r"'([^'\\]*(?:\\.[^'\\]*)*)'", String.Single),
-            (r'`([^`\\]*(?:\\.[^`\\]*)*)`', String.Backtick),
-            (r'"', String.Double, 'string'),
-        ],
-        'variablevariable': [
-            (r'\}', Name.Variable, '#pop'),
-            include('php')
-        ],
-        'magicfuncs': [
-            # source: http://php.net/manual/en/language.oop5.magic.php
-            (words((
-                '__construct', '__destruct', '__call', '__callStatic', '__get', '__set',
-                '__isset', '__unset', '__sleep', '__wakeup', '__toString', '__invoke',
-                '__set_state', '__clone', '__debugInfo',), suffix=r'\b'),
-             Name.Function.Magic),
-        ],
-        'magicconstants': [
-            # source: http://php.net/manual/en/language.constants.predefined.php
-            (words((
-                '__LINE__', '__FILE__', '__DIR__', '__FUNCTION__', '__CLASS__',
-                '__TRAIT__', '__METHOD__', '__NAMESPACE__',),
-                suffix=r'\b'),
-             Name.Constant),
-        ],
-        'classname': [
-            (_ident_inner, Name.Class, '#pop')
-        ],
-        'functionname': [
-            include('magicfuncs'),
-            (_ident_inner, Name.Function, '#pop'),
-            default('#pop')
-        ],
-        'string': [
-            (r'"', String.Double, '#pop'),
-            (r'[^{$"\\]+', String.Double),
-            (r'\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})', String.Escape),
-            (r'\$' + _ident_nons + r'(\[\S+?\]|->' + _ident_nons + ')?',
-             String.Interpol),
-            (r'(\{\$\{)(.*?)(\}\})',
-             bygroups(String.Interpol, using(this, _startinline=True),
-                      String.Interpol)),
-            (r'(\{)(\$.*?)(\})',
-             bygroups(String.Interpol, using(this, _startinline=True),
-                      String.Interpol)),
-            (r'(\$\{)(\S+)(\})',
-             bygroups(String.Interpol, Name.Variable, String.Interpol)),
-            (r'[${\\]', String.Double)
-        ],
-        'attribute': [
-            (r'\]', Punctuation, '#pop'),
-            (r'\(', Punctuation, 'attributeparams'),
-            (_ident_inner, Name.Decorator),
-            include('php')
-        ],
-        'attributeparams': [
-            (r'\)', Punctuation, '#pop'),
-            include('php')
-        ],
-    }
-
-    def __init__(self, **options):
-        self.funcnamehighlighting = get_bool_opt(
-            options, 'funcnamehighlighting', True)
-        self.disabledmodules = get_list_opt(
-            options, 'disabledmodules', ['unknown'])
-        self.startinline = get_bool_opt(options, 'startinline', False)
-
-        # private option argument for the lexer itself
-        if '_startinline' in options:
-            self.startinline = options.pop('_startinline')
-
-        # collect activated functions in a set
-        self._functions = set()
-        if self.funcnamehighlighting:
-            from pygments.lexers._php_builtins import MODULES
-            for key, value in MODULES.items():
-                if key not in self.disabledmodules:
-                    self._functions.update(value)
-        RegexLexer.__init__(self, **options)
-
-    def get_tokens_unprocessed(self, text):
-        stack = ['root']
-        if self.startinline:
-            stack.append('php')
-        for index, token, value in \
-                RegexLexer.get_tokens_unprocessed(self, text, stack):
-            if token is Name.Other:
-                if value in self._functions:
-                    yield index, Name.Builtin, value
-                    continue
-            yield index, token, value
-
-    def analyse_text(text):
-        if shebang_matches(text, r'php'):
-            return True
-        rv = 0.0
-        if re.search(r'<\?(?!xml)', text):
-            rv += 0.3
-        return rv
diff --git a/voxvera/vendor/pygments/lexers/pointless.py b/voxvera/vendor/pygments/lexers/pointless.py
deleted file mode 100644
index adedb75..0000000
--- a/voxvera/vendor/pygments/lexers/pointless.py
+++ /dev/null
@@ -1,70 +0,0 @@
-"""
-    pygments.lexers.pointless
-    ~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Pointless.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, words
-from pygments.token import Comment, Error, Keyword, Name, Number, Operator, \
-    Punctuation, String, Text
-
-__all__ = ['PointlessLexer']
-
-
-class PointlessLexer(RegexLexer):
-    """
-    For Pointless source code.
-    """
-
-    name = 'Pointless'
-    url = 'https://ptls.dev'
-    aliases = ['pointless']
-    filenames = ['*.ptls']
-    version_added = '2.7'
-
-    ops = words([
-        "+", "-", "*", "/", "**", "%", "+=", "-=", "*=",
-        "/=", "**=", "%=", "|>", "=", "==", "!=", "<", ">",
-        "<=", ">=", "=>", "$", "++",
-    ])
-
-    keywords = words([
-        "if", "then", "else", "where", "with", "cond",
-        "case", "and", "or", "not", "in", "as", "for",
-        "requires", "throw", "try", "catch", "when",
-        "yield", "upval",
-    ], suffix=r'\b')
-
-    tokens = {
-        'root': [
-            (r'[ \n\r]+', Text),
-            (r'--.*$', Comment.Single),
-            (r'"""', String, 'multiString'),
-            (r'"', String, 'string'),
-            (r'[\[\](){}:;,.]', Punctuation),
-            (ops, Operator),
-            (keywords, Keyword),
-            (r'\d+|\d*\.\d+', Number),
-            (r'(true|false)\b', Name.Builtin),
-            (r'[A-Z][a-zA-Z0-9]*\b', String.Symbol),
-            (r'output\b', Name.Variable.Magic),
-            (r'(export|import)\b', Keyword.Namespace),
-            (r'[a-z][a-zA-Z0-9]*\b', Name.Variable)
-        ],
-        'multiString': [
-            (r'\\.', String.Escape),
-            (r'"""', String, '#pop'),
-            (r'"', String),
-            (r'[^\\"]+', String),
-        ],
-        'string': [
-            (r'\\.', String.Escape),
-            (r'"', String, '#pop'),
-            (r'\n', Error),
-            (r'[^\\"]+', String),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/pony.py b/voxvera/vendor/pygments/lexers/pony.py
deleted file mode 100644
index 055423a..0000000
--- a/voxvera/vendor/pygments/lexers/pony.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-    pygments.lexers.pony
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Pony and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation
-
-__all__ = ['PonyLexer']
-
-
-class PonyLexer(RegexLexer):
-    """
-    For Pony source code.
-    """
-
-    name = 'Pony'
-    aliases = ['pony']
-    filenames = ['*.pony']
-    url = 'https://www.ponylang.io'
-    version_added = '2.4'
-
-    _caps = r'(iso|trn|ref|val|box|tag)'
-
-    tokens = {
-        'root': [
-            (r'\n', Text),
-            (r'[^\S\n]+', Text),
-            (r'//.*\n', Comment.Single),
-            (r'/\*', Comment.Multiline, 'nested_comment'),
-            (r'"""(?:.|\n)*?"""', String.Doc),
-            (r'"', String, 'string'),
-            (r'\'.*\'', String.Char),
-            (r'=>|[]{}:().~;,|&!^?[]', Punctuation),
-            (words((
-                'addressof', 'and', 'as', 'consume', 'digestof', 'is', 'isnt',
-                'not', 'or'),
-                suffix=r'\b'),
-             Operator.Word),
-            (r'!=|==|<<|>>|[-+/*%=<>]', Operator),
-            (words((
-                'box', 'break', 'compile_error', 'compile_intrinsic',
-                'continue', 'do', 'else', 'elseif', 'embed', 'end', 'error',
-                'for', 'if', 'ifdef', 'in', 'iso', 'lambda', 'let', 'match',
-                'object', 'recover', 'ref', 'repeat', 'return', 'tag', 'then',
-                'this', 'trn', 'try', 'until', 'use', 'var', 'val', 'where',
-                'while', 'with', '#any', '#read', '#send', '#share'),
-                suffix=r'\b'),
-             Keyword),
-            (r'(actor|class|struct|primitive|interface|trait|type)((?:\s)+)',
-             bygroups(Keyword, Text), 'typename'),
-            (r'(new|fun|be)((?:\s)+)', bygroups(Keyword, Text), 'methodname'),
-            (words((
-                'I8', 'U8', 'I16', 'U16', 'I32', 'U32', 'I64', 'U64', 'I128',
-                'U128', 'ILong', 'ULong', 'ISize', 'USize', 'F32', 'F64',
-                'Bool', 'Pointer', 'None', 'Any', 'Array', 'String',
-                'Iterator'),
-                suffix=r'\b'),
-             Name.Builtin.Type),
-            (r'_?[A-Z]\w*', Name.Type),
-            (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
-            (r'0x[0-9a-fA-F]+', Number.Hex),
-            (r'\d+', Number.Integer),
-            (r'(true|false)\b', Name.Builtin),
-            (r'_\d*', Name),
-            (r'_?[a-z][\w\']*', Name)
-        ],
-        'typename': [
-            (_caps + r'?((?:\s)*)(_?[A-Z]\w*)',
-             bygroups(Keyword, Text, Name.Class), '#pop')
-        ],
-        'methodname': [
-            (_caps + r'?((?:\s)*)(_?[a-z]\w*)',
-             bygroups(Keyword, Text, Name.Function), '#pop')
-        ],
-        'nested_comment': [
-            (r'[^*/]+', Comment.Multiline),
-            (r'/\*', Comment.Multiline, '#push'),
-            (r'\*/', Comment.Multiline, '#pop'),
-            (r'[*/]', Comment.Multiline)
-        ],
-        'string': [
-            (r'"', String, '#pop'),
-            (r'\\"', String),
-            (r'[^\\"]+', String)
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/praat.py b/voxvera/vendor/pygments/lexers/praat.py
deleted file mode 100644
index 054f5b6..0000000
--- a/voxvera/vendor/pygments/lexers/praat.py
+++ /dev/null
@@ -1,303 +0,0 @@
-"""
-    pygments.lexers.praat
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for Praat
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, words, bygroups, include
-from pygments.token import Name, Text, Comment, Keyword, String, Punctuation, \
-    Number, Operator, Whitespace
-
-__all__ = ['PraatLexer']
-
-
-class PraatLexer(RegexLexer):
-    """
-    For Praat scripts.
-    """
-
-    name = 'Praat'
-    url = 'http://www.praat.org'
-    aliases = ['praat']
-    filenames = ['*.praat', '*.proc', '*.psc']
-    version_added = '2.1'
-
-    keywords = (
-        'if', 'then', 'else', 'elsif', 'elif', 'endif', 'fi', 'for', 'from', 'to',
-        'endfor', 'endproc', 'while', 'endwhile', 'repeat', 'until', 'select', 'plus',
-        'minus', 'demo', 'assert', 'stopwatch', 'nocheck', 'nowarn', 'noprogress',
-        'editor', 'endeditor', 'clearinfo',
-    )
-
-    functions_string = (
-        'backslashTrigraphsToUnicode', 'chooseDirectory', 'chooseReadFile',
-        'chooseWriteFile', 'date', 'demoKey', 'do', 'environment', 'extractLine',
-        'extractWord', 'fixed', 'info', 'left', 'mid', 'percent', 'readFile', 'replace',
-        'replace_regex', 'right', 'selected', 'string', 'unicodeToBackslashTrigraphs',
-    )
-
-    functions_numeric = (
-        'abs', 'appendFile', 'appendFileLine', 'appendInfo', 'appendInfoLine', 'arccos',
-        'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh', 'barkToHertz',
-        'beginPause', 'beginSendPraat', 'besselI', 'besselK', 'beta', 'beta2',
-        'binomialP', 'binomialQ', 'boolean', 'ceiling', 'chiSquareP', 'chiSquareQ',
-        'choice', 'comment', 'cos', 'cosh', 'createDirectory', 'deleteFile',
-        'demoClicked', 'demoClickedIn', 'demoCommandKeyPressed',
-        'demoExtraControlKeyPressed', 'demoInput', 'demoKeyPressed',
-        'demoOptionKeyPressed', 'demoShiftKeyPressed', 'demoShow', 'demoWaitForInput',
-        'demoWindowTitle', 'demoX', 'demoY', 'differenceLimensToPhon', 'do', 'editor',
-        'endPause', 'endSendPraat', 'endsWith', 'erb', 'erbToHertz', 'erf', 'erfc',
-        'exitScript', 'exp', 'extractNumber', 'fileReadable', 'fisherP', 'fisherQ',
-        'floor', 'gaussP', 'gaussQ', 'hertzToBark', 'hertzToErb', 'hertzToMel',
-        'hertzToSemitones', 'imax', 'imin', 'incompleteBeta', 'incompleteGammaP', 'index',
-        'index_regex', 'integer', 'invBinomialP', 'invBinomialQ', 'invChiSquareQ', 'invFisherQ',
-        'invGaussQ', 'invSigmoid', 'invStudentQ', 'length', 'ln', 'lnBeta', 'lnGamma',
-        'log10', 'log2', 'max', 'melToHertz', 'min', 'minusObject', 'natural', 'number',
-        'numberOfColumns', 'numberOfRows', 'numberOfSelected', 'objectsAreIdentical',
-        'option', 'optionMenu', 'pauseScript', 'phonToDifferenceLimens', 'plusObject',
-        'positive', 'randomBinomial', 'randomGauss', 'randomInteger', 'randomPoisson',
-        'randomUniform', 'real', 'readFile', 'removeObject', 'rindex', 'rindex_regex',
-        'round', 'runScript', 'runSystem', 'runSystem_nocheck', 'selectObject',
-        'selected', 'semitonesToHertz', 'sentence', 'sentencetext', 'sigmoid', 'sin', 'sinc',
-        'sincpi', 'sinh', 'soundPressureToPhon', 'sqrt', 'startsWith', 'studentP',
-        'studentQ', 'tan', 'tanh', 'text', 'variableExists', 'word', 'writeFile', 'writeFileLine',
-        'writeInfo', 'writeInfoLine',
-    )
-
-    functions_array = (
-        'linear', 'randomGauss', 'randomInteger', 'randomUniform', 'zero',
-    )
-
-    objects = (
-        'Activation', 'AffineTransform', 'AmplitudeTier', 'Art', 'Artword',
-        'Autosegment', 'BarkFilter', 'BarkSpectrogram', 'CCA', 'Categories',
-        'Cepstrogram', 'Cepstrum', 'Cepstrumc', 'ChebyshevSeries', 'ClassificationTable',
-        'Cochleagram', 'Collection', 'ComplexSpectrogram', 'Configuration', 'Confusion',
-        'ContingencyTable', 'Corpus', 'Correlation', 'Covariance',
-        'CrossCorrelationTable', 'CrossCorrelationTables', 'DTW', 'DataModeler',
-        'Diagonalizer', 'Discriminant', 'Dissimilarity', 'Distance', 'Distributions',
-        'DurationTier', 'EEG', 'ERP', 'ERPTier', 'EditCostsTable', 'EditDistanceTable',
-        'Eigen', 'Excitation', 'Excitations', 'ExperimentMFC', 'FFNet', 'FeatureWeights',
-        'FileInMemory', 'FilesInMemory', 'Formant', 'FormantFilter', 'FormantGrid',
-        'FormantModeler', 'FormantPoint', 'FormantTier', 'GaussianMixture', 'HMM',
-        'HMM_Observation', 'HMM_ObservationSequence', 'HMM_State', 'HMM_StateSequence',
-        'Harmonicity', 'ISpline', 'Index', 'Intensity', 'IntensityTier', 'IntervalTier',
-        'KNN', 'KlattGrid', 'KlattTable', 'LFCC', 'LPC', 'Label', 'LegendreSeries',
-        'LinearRegression', 'LogisticRegression', 'LongSound', 'Ltas', 'MFCC', 'MSpline',
-        'ManPages', 'Manipulation', 'Matrix', 'MelFilter', 'MelSpectrogram',
-        'MixingMatrix', 'Movie', 'Network', 'Object', 'OTGrammar', 'OTHistory', 'OTMulti',
-        'PCA', 'PairDistribution', 'ParamCurve', 'Pattern', 'Permutation', 'Photo',
-        'Pitch', 'PitchModeler', 'PitchTier', 'PointProcess', 'Polygon', 'Polynomial',
-        'PowerCepstrogram', 'PowerCepstrum', 'Procrustes', 'RealPoint', 'RealTier',
-        'ResultsMFC', 'Roots', 'SPINET', 'SSCP', 'SVD', 'Salience', 'ScalarProduct',
-        'Similarity', 'SimpleString', 'SortedSetOfString', 'Sound', 'Speaker',
-        'Spectrogram', 'Spectrum', 'SpectrumTier', 'SpeechSynthesizer', 'SpellingChecker',
-        'Strings', 'StringsIndex', 'Table', 'TableOfReal', 'TextGrid', 'TextInterval',
-        'TextPoint', 'TextTier', 'Tier', 'Transition', 'VocalTract', 'VocalTractTier',
-        'Weight', 'WordList',
-    )
-
-    variables_numeric = (
-        'macintosh', 'windows', 'unix', 'praatVersion', 'pi', 'e', 'undefined',
-    )
-
-    variables_string = (
-        'praatVersion', 'tab', 'shellDirectory', 'homeDirectory',
-        'preferencesDirectory', 'newline', 'temporaryDirectory',
-        'defaultDirectory',
-    )
-
-    object_attributes = (
-        'ncol', 'nrow', 'xmin', 'ymin', 'xmax', 'ymax', 'nx', 'ny', 'dx', 'dy',
-    )
-
-    tokens = {
-        'root': [
-            (r'(\s+)(#.*?$)',  bygroups(Whitespace, Comment.Single)),
-            (r'^#.*?$',        Comment.Single),
-            (r';[^\n]*',       Comment.Single),
-            (r'\s+',           Whitespace),
-
-            (r'\bprocedure\b', Keyword,       'procedure_definition'),
-            (r'\bcall\b',      Keyword,       'procedure_call'),
-            (r'@',             Name.Function, 'procedure_call'),
-
-            include('function_call'),
-
-            (words(keywords, suffix=r'\b'), Keyword),
-
-            (r'(\bform\b)(\s+)([^\n]+)',
-             bygroups(Keyword, Whitespace, String), 'old_form'),
-
-            (r'(print(?:line|tab)?|echo|exit|asserterror|pause|send(?:praat|socket)|'
-             r'include|execute|system(?:_nocheck)?)(\s+)',
-             bygroups(Keyword, Whitespace), 'string_unquoted'),
-
-            (r'(goto|label)(\s+)(\w+)', bygroups(Keyword, Whitespace, Name.Label)),
-
-            include('variable_name'),
-            include('number'),
-
-            (r'"', String, 'string'),
-
-            (words((objects), suffix=r'(?=\s+\S+\n)'), Name.Class, 'string_unquoted'),
-
-            (r'\b[A-Z]', Keyword, 'command'),
-            (r'(\.{3}|[)(,])', Punctuation),
-        ],
-        'command': [
-            (r'( ?[\w()-]+ ?)', Keyword),
-
-            include('string_interpolated'),
-
-            (r'\.{3}', Keyword, ('#pop', 'old_arguments')),
-            (r':', Keyword, ('#pop', 'comma_list')),
-            (r'\s', Whitespace, '#pop'),
-        ],
-        'procedure_call': [
-            (r'\s+', Whitespace),
-            (r'([\w.]+)(?:(:)|(?:(\s*)(\()))',
-             bygroups(Name.Function, Punctuation,
-                      Text.Whitespace, Punctuation), '#pop'),
-            (r'([\w.]+)', Name.Function, ('#pop', 'old_arguments')),
-        ],
-        'procedure_definition': [
-            (r'\s', Whitespace),
-            (r'([\w.]+)(\s*?[(:])',
-             bygroups(Name.Function, Whitespace), '#pop'),
-            (r'([\w.]+)([^\n]*)',
-             bygroups(Name.Function, Text), '#pop'),
-        ],
-        'function_call': [
-            (words(functions_string, suffix=r'\$(?=\s*[:(])'), Name.Function, 'function'),
-            (words(functions_array, suffix=r'#(?=\s*[:(])'),   Name.Function, 'function'),
-            (words(functions_numeric, suffix=r'(?=\s*[:(])'),  Name.Function, 'function'),
-        ],
-        'function': [
-            (r'\s+',   Whitespace),
-            (r':',     Punctuation, ('#pop', 'comma_list')),
-            (r'\s*\(', Punctuation, ('#pop', 'comma_list')),
-        ],
-        'comma_list': [
-            (r'(\s*\n\s*)(\.{3})', bygroups(Whitespace, Punctuation)),
-
-            (r'(\s*)(?:([)\]])|(\n))', bygroups(
-                Whitespace, Punctuation, Whitespace), '#pop'),
-
-            (r'\s+', Whitespace),
-            (r'"',   String, 'string'),
-            (r'\b(if|then|else|fi|endif)\b', Keyword),
-
-            include('function_call'),
-            include('variable_name'),
-            include('operator'),
-            include('number'),
-
-            (r'[()]', Text),
-            (r',', Punctuation),
-        ],
-        'old_arguments': [
-            (r'\n', Whitespace, '#pop'),
-
-            include('variable_name'),
-            include('operator'),
-            include('number'),
-
-            (r'"', String, 'string'),
-            (r'[^\n]', Text),
-        ],
-        'number': [
-            (r'\n', Whitespace, '#pop'),
-            (r'\b\d+(\.\d*)?([eE][-+]?\d+)?%?', Number),
-        ],
-        'object_reference': [
-            include('string_interpolated'),
-            (r'([a-z][a-zA-Z0-9_]*|\d+)', Name.Builtin),
-
-            (words(object_attributes, prefix=r'\.'), Name.Builtin, '#pop'),
-
-            (r'\$', Name.Builtin),
-            (r'\[', Text, '#pop'),
-        ],
-        'variable_name': [
-            include('operator'),
-            include('number'),
-
-            (words(variables_string,  suffix=r'\$'), Name.Variable.Global),
-            (words(variables_numeric,
-             suffix=r'(?=[^a-zA-Z0-9_."\'$#\[:(]|\s|^|$)'),
-             Name.Variable.Global),
-
-            (words(objects, prefix=r'\b', suffix=r"(_)"),
-             bygroups(Name.Builtin, Name.Builtin),
-             'object_reference'),
-
-            (r'\.?_?[a-z][\w.]*(\$|#)?', Text),
-            (r'[\[\]]', Punctuation, 'comma_list'),
-
-            include('string_interpolated'),
-        ],
-        'operator': [
-            (r'([+\/*<>=!-]=?|[&*|][&*|]?|\^|<>)',       Operator),
-            (r'(?', Punctuation),
-            (r'"(?:\\x[0-9a-fA-F]+\\|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|'
-             r'\\[0-7]+\\|\\["\\abcefnrstv]|[^\\"])*"', String.Double),
-            (r"'(?:''|[^'])*'", String.Atom),  # quoted atom
-            # Needs to not be followed by an atom.
-            # (r'=(?=\s|[a-zA-Z\[])', Operator),
-            (r'is\b', Operator),
-            (r'(<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])',
-             Operator),
-            (r'(mod|div|not)\b', Operator),
-            (r'_', Keyword),  # The don't-care variable
-            (r'([a-z]+)(:)', bygroups(Name.Namespace, Punctuation)),
-            (r'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
-             r'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)'
-             r'(\s*)(:-|-->)',
-             bygroups(Name.Function, Text, Operator)),  # function defn
-            (r'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
-             r'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)'
-             r'(\s*)(\()',
-             bygroups(Name.Function, Text, Punctuation)),
-            (r'[a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
-             r'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*',
-             String.Atom),  # atom, characters
-            # This one includes !
-            (r'[#&*+\-./:<=>?@\\^~\u00a1-\u00bf\u2010-\u303f]+',
-             String.Atom),  # atom, graphics
-            (r'[A-Z_]\w*', Name.Variable),
-            (r'\s+|[\u2000-\u200f\ufff0-\ufffe\uffef]', Text),
-        ],
-        'nested-comment': [
-            (r'\*/', Comment.Multiline, '#pop'),
-            (r'/\*', Comment.Multiline, '#push'),
-            (r'[^*/]+', Comment.Multiline),
-            (r'[*/]', Comment.Multiline),
-        ],
-    }
-
-    def analyse_text(text):
-        """Competes with IDL and Visual Prolog on *.pro"""
-        if ':-' in text:
-            # Visual Prolog also uses :-
-            return 0.5
-        else:
-            return 0
-
-
-class LogtalkLexer(RegexLexer):
-    """
-    For Logtalk source code.
-    """
-
-    name = 'Logtalk'
-    url = 'http://logtalk.org/'
-    aliases = ['logtalk']
-    filenames = ['*.lgt', '*.logtalk']
-    mimetypes = ['text/x-logtalk']
-    version_added = '0.10'
-
-    tokens = {
-        'root': [
-            # Directives
-            (r'^\s*:-\s', Punctuation, 'directive'),
-            # Comments
-            (r'%.*?\n', Comment),
-            (r'/\*(.|\n)*?\*/', Comment),
-            # Whitespace
-            (r'\n', Text),
-            (r'\s+', Text),
-            # Numbers
-            (r"0'[\\]?.", Number),
-            (r'0b[01]+', Number.Bin),
-            (r'0o[0-7]+', Number.Oct),
-            (r'0x[0-9a-fA-F]+', Number.Hex),
-            (r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number),
-            # Variables
-            (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
-            # Event handlers
-            (r'(after|before)(?=[(])', Keyword),
-            # Message forwarding handler
-            (r'forward(?=[(])', Keyword),
-            # Execution-context methods
-            (r'(context|parameter|this|se(lf|nder))(?=[(])', Keyword),
-            # Reflection
-            (r'(current_predicate|predicate_property)(?=[(])', Keyword),
-            # DCGs and term expansion
-            (r'(expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])', Keyword),
-            # Entity
-            (r'(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])', Keyword),
-            (r'(object|protocol|category)_property(?=[(])', Keyword),
-            # Entity relations
-            (r'co(mplements_object|nforms_to_protocol)(?=[(])', Keyword),
-            (r'extends_(object|protocol|category)(?=[(])', Keyword),
-            (r'imp(lements_protocol|orts_category)(?=[(])', Keyword),
-            (r'(instantiat|specializ)es_class(?=[(])', Keyword),
-            # Events
-            (r'(current_event|(abolish|define)_events)(?=[(])', Keyword),
-            # Flags
-            (r'(create|current|set)_logtalk_flag(?=[(])', Keyword),
-            # Compiling, loading, and library paths
-            (r'logtalk_(compile|l(ibrary_path|oad|oad_context)|make(_target_action)?)(?=[(])', Keyword),
-            (r'\blogtalk_make\b', Keyword),
-            # Database
-            (r'(clause|retract(all)?)(?=[(])', Keyword),
-            (r'a(bolish|ssert(a|z))(?=[(])', Keyword),
-            # Control constructs
-            (r'(ca(ll|tch)|throw)(?=[(])', Keyword),
-            (r'(fa(il|lse)|true|(instantiation|system)_error)\b', Keyword),
-            (r'(uninstantiation|type|domain|existence|permission|representation|evaluation|resource|syntax)_error(?=[(])', Keyword),
-            # All solutions
-            (r'((bag|set)of|f(ind|or)all)(?=[(])', Keyword),
-            # Multi-threading predicates
-            (r'threaded(_(ca(ll|ncel)|once|ignore|exit|peek|wait|notify))?(?=[(])', Keyword),
-            # Engine predicates
-            (r'threaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?(?=[(])', Keyword),
-            # Term unification
-            (r'(subsumes_term|unify_with_occurs_check)(?=[(])', Keyword),
-            # Term creation and decomposition
-            (r'(functor|arg|copy_term|numbervars|term_variables)(?=[(])', Keyword),
-            # Evaluable functors
-            (r'(div|rem|m(ax|in|od)|abs|sign)(?=[(])', Keyword),
-            (r'float(_(integer|fractional)_part)?(?=[(])', Keyword),
-            (r'(floor|t(an|runcate)|round|ceiling)(?=[(])', Keyword),
-            # Other arithmetic functors
-            (r'(cos|a(cos|sin|tan|tan2)|exp|log|s(in|qrt)|xor)(?=[(])', Keyword),
-            # Term testing
-            (r'(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground|acyclic_term)(?=[(])', Keyword),
-            # Term comparison
-            (r'compare(?=[(])', Keyword),
-            # Stream selection and control
-            (r'(curren|se)t_(in|out)put(?=[(])', Keyword),
-            (r'(open|close)(?=[(])', Keyword),
-            (r'flush_output(?=[(])', Keyword),
-            (r'(at_end_of_stream|flush_output)\b', Keyword),
-            (r'(stream_property|at_end_of_stream|set_stream_position)(?=[(])', Keyword),
-            # Character and byte input/output
-            (r'(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])', Keyword),
-            (r'\bnl\b', Keyword),
-            # Term input/output
-            (r'read(_term)?(?=[(])', Keyword),
-            (r'write(q|_(canonical|term))?(?=[(])', Keyword),
-            (r'(current_)?op(?=[(])', Keyword),
-            (r'(current_)?char_conversion(?=[(])', Keyword),
-            # Atomic term processing
-            (r'atom_(length|c(hars|o(ncat|des)))(?=[(])', Keyword),
-            (r'(char_code|sub_atom)(?=[(])', Keyword),
-            (r'number_c(har|ode)s(?=[(])', Keyword),
-            # Implementation defined hooks functions
-            (r'(se|curren)t_prolog_flag(?=[(])', Keyword),
-            (r'\bhalt\b', Keyword),
-            (r'halt(?=[(])', Keyword),
-            # Message sending operators
-            (r'(::|:|\^\^)', Operator),
-            # External call
-            (r'[{}]', Keyword),
-            # Logic and control
-            (r'(ignore|once)(?=[(])', Keyword),
-            (r'\brepeat\b', Keyword),
-            # Sorting
-            (r'(key)?sort(?=[(])', Keyword),
-            # Bitwise functors
-            (r'(>>|<<|/\\|\\\\|\\)', Operator),
-            # Predicate aliases
-            (r'\bas\b', Operator),
-            # Arithmetic evaluation
-            (r'\bis\b', Keyword),
-            # Arithmetic comparison
-            (r'(=:=|=\\=|<|=<|>=|>)', Operator),
-            # Term creation and decomposition
-            (r'=\.\.', Operator),
-            # Term unification
-            (r'(=|\\=)', Operator),
-            # Term comparison
-            (r'(==|\\==|@=<|@<|@>=|@>)', Operator),
-            # Evaluable functors
-            (r'(//|[-+*/])', Operator),
-            (r'\b(e|pi|div|mod|rem)\b', Operator),
-            # Other arithmetic functors
-            (r'\b\*\*\b', Operator),
-            # DCG rules
-            (r'-->', Operator),
-            # Control constructs
-            (r'([!;]|->)', Operator),
-            # Logic and control
-            (r'\\+', Operator),
-            # Mode operators
-            (r'[?@]', Operator),
-            # Existential quantifier
-            (r'\^', Operator),
-            # Punctuation
-            (r'[()\[\],.|]', Text),
-            # Atoms
-            (r"[a-z][a-zA-Z0-9_]*", Text),
-            (r"'", String, 'quoted_atom'),
-            # Double-quoted terms
-            (r'"', String, 'double_quoted_term'),
-        ],
-
-        'quoted_atom': [
-            (r"''", String),
-            (r"'", String, '#pop'),
-            (r'\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)', String.Escape),
-            (r"[^\\'\n]+", String),
-            (r'\\', String),
-        ],
-
-        'double_quoted_term': [
-            (r'""', String),
-            (r'"', String, '#pop'),
-            (r'\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)', String.Escape),
-            (r'[^\\"\n]+', String),
-            (r'\\', String),
-        ],
-
-        'directive': [
-            # Conditional compilation directives
-            (r'(el)?if(?=[(])', Keyword, 'root'),
-            (r'(e(lse|ndif))(?=[.])', Keyword, 'root'),
-            # Entity directives
-            (r'(category|object|protocol)(?=[(])', Keyword, 'entityrelations'),
-            (r'(end_(category|object|protocol))(?=[.])', Keyword, 'root'),
-            # Predicate scope directives
-            (r'(public|protected|private)(?=[(])', Keyword, 'root'),
-            # Other directives
-            (r'e(n(coding|sure_loaded)|xport)(?=[(])', Keyword, 'root'),
-            (r'in(clude|itialization|fo)(?=[(])', Keyword, 'root'),
-            (r'(built_in|dynamic|synchronized|threaded)(?=[.])', Keyword, 'root'),
-            (r'(alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])', Keyword, 'root'),
-            (r'op(?=[(])', Keyword, 'root'),
-            (r'(c(alls|oinductive)|module|reexport|use(s|_module))(?=[(])', Keyword, 'root'),
-            (r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'),
-            (r'[a-z][a-zA-Z0-9_]*(?=[.])', Text, 'root'),
-        ],
-
-        'entityrelations': [
-            (r'(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])', Keyword),
-            # Numbers
-            (r"0'[\\]?.", Number),
-            (r'0b[01]+', Number.Bin),
-            (r'0o[0-7]+', Number.Oct),
-            (r'0x[0-9a-fA-F]+', Number.Hex),
-            (r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number),
-            # Variables
-            (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
-            # Atoms
-            (r"[a-z][a-zA-Z0-9_]*", Text),
-            (r"'", String, 'quoted_atom'),
-            # Double-quoted terms
-            (r'"', String, 'double_quoted_term'),
-            # End of entity-opening directive
-            (r'([)]\.)', Text, 'root'),
-            # Scope operator
-            (r'(::)', Operator),
-            # Punctuation
-            (r'[()\[\],.|]', Text),
-            # Comments
-            (r'%.*?\n', Comment),
-            (r'/\*(.|\n)*?\*/', Comment),
-            # Whitespace
-            (r'\n', Text),
-            (r'\s+', Text),
-        ]
-    }
-
-    def analyse_text(text):
-        if ':- object(' in text:
-            return 1.0
-        elif ':- protocol(' in text:
-            return 1.0
-        elif ':- category(' in text:
-            return 1.0
-        elif re.search(r'^:-\s[a-z]', text, re.M):
-            return 0.9
-        else:
-            return 0.0
diff --git a/voxvera/vendor/pygments/lexers/promql.py b/voxvera/vendor/pygments/lexers/promql.py
deleted file mode 100644
index cad3c25..0000000
--- a/voxvera/vendor/pygments/lexers/promql.py
+++ /dev/null
@@ -1,176 +0,0 @@
-"""
-    pygments.lexers.promql
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for Prometheus Query Language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, default, words
-from pygments.token import Comment, Keyword, Name, Number, Operator, \
-    Punctuation, String, Whitespace
-
-__all__ = ["PromQLLexer"]
-
-
-class PromQLLexer(RegexLexer):
-    """
-    For PromQL queries.
-
-    For details about the grammar see:
-    https://github.com/prometheus/prometheus/tree/master/promql/parser
-
-    .. versionadded: 2.7
-    """
-
-    name = "PromQL"
-    url = 'https://prometheus.io/docs/prometheus/latest/querying/basics/'
-    aliases = ["promql"]
-    filenames = ["*.promql"]
-    version_added = ''
-
-    base_keywords = (
-        words(
-            (
-                "bool",
-                "by",
-                "group_left",
-                "group_right",
-                "ignoring",
-                "offset",
-                "on",
-                "without",
-            ),
-            suffix=r"\b",
-        ),
-        Keyword,
-    )
-
-    aggregator_keywords = (
-        words(
-            (
-                "sum",
-                "min",
-                "max",
-                "avg",
-                "group",
-                "stddev",
-                "stdvar",
-                "count",
-                "count_values",
-                "bottomk",
-                "topk",
-                "quantile",
-            ),
-            suffix=r"\b",
-        ),
-        Keyword,
-    )
-
-    function_keywords = (
-        words(
-            (
-                "abs",
-                "absent",
-                "absent_over_time",
-                "avg_over_time",
-                "ceil",
-                "changes",
-                "clamp_max",
-                "clamp_min",
-                "count_over_time",
-                "day_of_month",
-                "day_of_week",
-                "days_in_month",
-                "delta",
-                "deriv",
-                "exp",
-                "floor",
-                "histogram_quantile",
-                "holt_winters",
-                "hour",
-                "idelta",
-                "increase",
-                "irate",
-                "label_join",
-                "label_replace",
-                "ln",
-                "log10",
-                "log2",
-                "max_over_time",
-                "min_over_time",
-                "minute",
-                "month",
-                "predict_linear",
-                "quantile_over_time",
-                "rate",
-                "resets",
-                "round",
-                "scalar",
-                "sort",
-                "sort_desc",
-                "sqrt",
-                "stddev_over_time",
-                "stdvar_over_time",
-                "sum_over_time",
-                "time",
-                "timestamp",
-                "vector",
-                "year",
-            ),
-            suffix=r"\b",
-        ),
-        Keyword.Reserved,
-    )
-
-    tokens = {
-        "root": [
-            (r"\n", Whitespace),
-            (r"\s+", Whitespace),
-            (r",", Punctuation),
-            # Keywords
-            base_keywords,
-            aggregator_keywords,
-            function_keywords,
-            # Offsets
-            (r"[1-9][0-9]*[smhdwy]", String),
-            # Numbers
-            (r"-?[0-9]+\.[0-9]+", Number.Float),
-            (r"-?[0-9]+", Number.Integer),
-            # Comments
-            (r"#.*?$", Comment.Single),
-            # Operators
-            (r"(\+|\-|\*|\/|\%|\^)", Operator),
-            (r"==|!=|>=|<=|<|>", Operator),
-            (r"and|or|unless", Operator.Word),
-            # Metrics
-            (r"[_a-zA-Z][a-zA-Z0-9_]+", Name.Variable),
-            # Params
-            (r'(["\'])(.*?)(["\'])', bygroups(Punctuation, String, Punctuation)),
-            # Other states
-            (r"\(", Operator, "function"),
-            (r"\)", Operator),
-            (r"\{", Punctuation, "labels"),
-            (r"\[", Punctuation, "range"),
-        ],
-        "labels": [
-            (r"\}", Punctuation, "#pop"),
-            (r"\n", Whitespace),
-            (r"\s+", Whitespace),
-            (r",", Punctuation),
-            (r'([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|!~)(\s*?)("|\')(.*?)("|\')',
-             bygroups(Name.Label, Whitespace, Operator, Whitespace,
-                      Punctuation, String, Punctuation)),
-        ],
-        "range": [
-            (r"\]", Punctuation, "#pop"),
-            (r"[1-9][0-9]*[smhdwy]", String),
-        ],
-        "function": [
-            (r"\)", Operator, "#pop"),
-            (r"\(", Operator, "#push"),
-            default("#pop"),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/prql.py b/voxvera/vendor/pygments/lexers/prql.py
deleted file mode 100644
index ee95d2d..0000000
--- a/voxvera/vendor/pygments/lexers/prql.py
+++ /dev/null
@@ -1,251 +0,0 @@
-"""
-    pygments.lexers.prql
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for the PRQL query language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, combined, words, include, bygroups
-from pygments.token import Comment, Literal, Keyword, Name, Number, Operator, \
-    Punctuation, String, Text, Whitespace
-
-__all__ = ['PrqlLexer']
-
-
-class PrqlLexer(RegexLexer):
-    """
-    For PRQL source code.
-
-    grammar: https://github.com/PRQL/prql/tree/main/grammars
-    """
-
-    name = 'PRQL'
-    url = 'https://prql-lang.org/'
-    aliases = ['prql']
-    filenames = ['*.prql']
-    mimetypes = ['application/prql', 'application/x-prql']
-    version_added = '2.17'
-
-    builtinTypes = words((
-        "bool",
-        "int",
-        "int8", "int16", "int32", "int64", "int128",
-        "float",
-        "text",
-        "set"), suffix=r'\b')
-
-    def innerstring_rules(ttype):
-        return [
-            # the new style '{}'.format(...) string formatting
-            (r'\{'
-             r'((\w+)((\.\w+)|(\[[^\]]+\]))*)?'  # field name
-             r'(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?'
-             r'\}', String.Interpol),
-
-            (r'[^\\\'"%{\n]+', ttype),
-            (r'[\'"\\]', ttype),
-            (r'%|(\{{1,2})', ttype)
-        ]
-
-    def fstring_rules(ttype):
-        return [
-            (r'\}', String.Interpol),
-            (r'\{', String.Interpol, 'expr-inside-fstring'),
-            (r'[^\\\'"{}\n]+', ttype),
-            (r'[\'"\\]', ttype),
-        ]
-
-    tokens = {
-        'root': [
-
-            # Comments
-            (r'#!.*', String.Doc),
-            (r'#.*', Comment.Single),
-
-            # Whitespace
-            (r'\s+', Whitespace),
-
-            # Modules
-            (r'^(\s*)(module)(\s*)',
-             bygroups(Whitespace, Keyword.Namespace, Whitespace),
-             'imports'),
-
-            (builtinTypes, Keyword.Type),
-
-            # Main
-            (r'^prql ', Keyword.Reserved),
-
-            ('let', Keyword.Declaration),
-
-            include('keywords'),
-            include('expr'),
-
-            # Transforms
-            (r'^[A-Za-z_][a-zA-Z0-9_]*', Keyword),
-        ],
-        'expr': [
-            # non-raw f-strings
-            ('(f)(""")', bygroups(String.Affix, String.Double),
-             combined('fstringescape', 'tdqf')),
-            ("(f)(''')", bygroups(String.Affix, String.Single),
-             combined('fstringescape', 'tsqf')),
-            ('(f)(")', bygroups(String.Affix, String.Double),
-             combined('fstringescape', 'dqf')),
-            ("(f)(')", bygroups(String.Affix, String.Single),
-             combined('fstringescape', 'sqf')),
-
-            # non-raw s-strings
-            ('(s)(""")', bygroups(String.Affix, String.Double),
-             combined('stringescape', 'tdqf')),
-            ("(s)(''')", bygroups(String.Affix, String.Single),
-             combined('stringescape', 'tsqf')),
-            ('(s)(")', bygroups(String.Affix, String.Double),
-             combined('stringescape', 'dqf')),
-            ("(s)(')", bygroups(String.Affix, String.Single),
-             combined('stringescape', 'sqf')),
-
-            # raw strings
-            ('(?i)(r)(""")',
-             bygroups(String.Affix, String.Double), 'tdqs'),
-            ("(?i)(r)(''')",
-             bygroups(String.Affix, String.Single), 'tsqs'),
-            ('(?i)(r)(")',
-             bygroups(String.Affix, String.Double), 'dqs'),
-            ("(?i)(r)(')",
-             bygroups(String.Affix, String.Single), 'sqs'),
-
-            # non-raw strings
-            ('"""', String.Double, combined('stringescape', 'tdqs')),
-            ("'''", String.Single, combined('stringescape', 'tsqs')),
-            ('"', String.Double, combined('stringescape', 'dqs')),
-            ("'", String.Single, combined('stringescape', 'sqs')),
-
-            # Time and dates
-            (r'@\d{4}-\d{2}-\d{2}T\d{2}(:\d{2})?(:\d{2})?(\.\d{1,6})?(Z|[+-]\d{1,2}(:\d{1,2})?)?', Literal.Date),
-            (r'@\d{4}-\d{2}-\d{2}', Literal.Date),
-            (r'@\d{2}(:\d{2})?(:\d{2})?(\.\d{1,6})?(Z|[+-]\d{1,2}(:\d{1,2})?)?', Literal.Date),
-
-            (r'[^\S\n]+', Text),
-            include('numbers'),
-            (r'->|=>|==|!=|>=|<=|~=|&&|\|\||\?\?|\/\/', Operator),
-            (r'[-~+/*%=<>&^|.@]', Operator),
-            (r'[]{}:(),;[]', Punctuation),
-            include('functions'),
-
-            # Variable Names
-            (r'[A-Za-z_][a-zA-Z0-9_]*', Name.Variable),
-        ],
-        'numbers': [
-            (r'(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)'
-             r'([eE][+-]?\d(?:_?\d)*)?', Number.Float),
-            (r'\d(?:_?\d)*[eE][+-]?\d(?:_?\d)*j?', Number.Float),
-            (r'0[oO](?:_?[0-7])+', Number.Oct),
-            (r'0[bB](?:_?[01])+', Number.Bin),
-            (r'0[xX](?:_?[a-fA-F0-9])+', Number.Hex),
-            (r'\d(?:_?\d)*', Number.Integer),
-        ],
-        'fstringescape': [
-            include('stringescape'),
-        ],
-        'bytesescape': [
-            (r'\\([\\bfnrt"\']|\n|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape)
-        ],
-        'stringescape': [
-            (r'\\(N\{.*?\}|u\{[a-fA-F0-9]{1,6}\})', String.Escape),
-            include('bytesescape')
-        ],
-        'fstrings-single': fstring_rules(String.Single),
-        'fstrings-double': fstring_rules(String.Double),
-        'strings-single': innerstring_rules(String.Single),
-        'strings-double': innerstring_rules(String.Double),
-        'dqf': [
-            (r'"', String.Double, '#pop'),
-            (r'\\\\|\\"|\\\n', String.Escape),  # included here for raw strings
-            include('fstrings-double')
-        ],
-        'sqf': [
-            (r"'", String.Single, '#pop'),
-            (r"\\\\|\\'|\\\n", String.Escape),  # included here for raw strings
-            include('fstrings-single')
-        ],
-        'dqs': [
-            (r'"', String.Double, '#pop'),
-            (r'\\\\|\\"|\\\n', String.Escape),  # included here for raw strings
-            include('strings-double')
-        ],
-        'sqs': [
-            (r"'", String.Single, '#pop'),
-            (r"\\\\|\\'|\\\n", String.Escape),  # included here for raw strings
-            include('strings-single')
-        ],
-        'tdqf': [
-            (r'"""', String.Double, '#pop'),
-            include('fstrings-double'),
-            (r'\n', String.Double)
-        ],
-        'tsqf': [
-            (r"'''", String.Single, '#pop'),
-            include('fstrings-single'),
-            (r'\n', String.Single)
-        ],
-        'tdqs': [
-            (r'"""', String.Double, '#pop'),
-            include('strings-double'),
-            (r'\n', String.Double)
-        ],
-        'tsqs': [
-            (r"'''", String.Single, '#pop'),
-            include('strings-single'),
-            (r'\n', String.Single)
-        ],
-
-        'expr-inside-fstring': [
-            (r'[{([]', Punctuation, 'expr-inside-fstring-inner'),
-            # without format specifier
-            (r'(=\s*)?'         # debug (https://bugs.python.org/issue36817)
-             r'\}', String.Interpol, '#pop'),
-            # with format specifier
-            # we'll catch the remaining '}' in the outer scope
-            (r'(=\s*)?'         # debug (https://bugs.python.org/issue36817)
-             r':', String.Interpol, '#pop'),
-            (r'\s+', Whitespace),  # allow new lines
-            include('expr'),
-        ],
-        'expr-inside-fstring-inner': [
-            (r'[{([]', Punctuation, 'expr-inside-fstring-inner'),
-            (r'[])}]', Punctuation, '#pop'),
-            (r'\s+', Whitespace),  # allow new lines
-            include('expr'),
-        ],
-        'keywords': [
-            (words((
-                'into', 'case', 'type', 'module', 'internal',
-            ), suffix=r'\b'),
-                Keyword),
-            (words(('true', 'false', 'null'), suffix=r'\b'), Keyword.Constant),
-        ],
-        'functions': [
-            (words((
-                "min", "max", "sum", "average", "stddev", "every", "any",
-                "concat_array", "count", "lag", "lead", "first", "last",
-                "rank", "rank_dense", "row_number", "round", "as", "in",
-                "tuple_every", "tuple_map", "tuple_zip", "_eq", "_is_null",
-                "from_text", "lower", "upper", "read_parquet", "read_csv"),
-                suffix=r'\b'),
-             Name.Function),
-        ],
-
-        'comment': [
-            (r'-(?!\})', Comment.Multiline),
-            (r'\{-', Comment.Multiline, 'comment'),
-            (r'[^-}]', Comment.Multiline),
-            (r'-\}', Comment.Multiline, '#pop'),
-        ],
-
-        'imports': [
-            (r'\w+(\.\w+)*', Name.Class, '#pop'),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/ptx.py b/voxvera/vendor/pygments/lexers/ptx.py
deleted file mode 100644
index 784ca13..0000000
--- a/voxvera/vendor/pygments/lexers/ptx.py
+++ /dev/null
@@ -1,119 +0,0 @@
-"""
-    pygments.lexers.ptx
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexer for other PTX language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, include, words
-from pygments.token import Comment, Keyword, Name, String, Number, \
-    Punctuation, Whitespace, Operator
-
-__all__ = ["PtxLexer"]
-
-
-class PtxLexer(RegexLexer):
-    """
-    For NVIDIA `PTX `_
-    source.
-    """
-    name = 'PTX'
-    url = "https://docs.nvidia.com/cuda/parallel-thread-execution/"
-    filenames = ['*.ptx']
-    aliases = ['ptx']
-    mimetypes = ['text/x-ptx']
-    version_added = '2.16'
-
-    #: optional Comment or Whitespace
-    string = r'"[^"]*?"'
-    followsym = r'[a-zA-Z0-9_$]'
-    identifier = r'([-a-zA-Z$._][\w\-$.]*|' + string + ')'
-    block_label = r'(' + identifier + r'|(\d+))'
-
-    tokens = {
-        'root': [
-            include('whitespace'),
-
-            (block_label + r'\s*:', Name.Label),
-
-            include('keyword'),
-
-            (r'%' + identifier, Name.Variable),
-            (r'%\d+', Name.Variable.Anonymous),
-            (r'c?' + string, String),
-            (identifier, Name.Variable),
-            (r';', Punctuation),
-            (r'[*+-/]', Operator),
-
-            (r'0[xX][a-fA-F0-9]+', Number),
-            (r'-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?', Number),
-
-            (r'[=<>{}\[\]()*.,!]|x\b', Punctuation)
-
-        ],
-        'whitespace': [
-            (r'(\n|\s+)+', Whitespace),
-            (r'//.*?\n', Comment)
-        ],
-
-        'keyword': [
-            # Instruction keywords
-            (words((
-                'abs', 'discard', 'min', 'shf', 'vadd',
-                'activemask', 'div', 'mma', 'shfl', 'vadd2',
-                'add', 'dp2a', 'mov', 'shl', 'vadd4',
-                'addc', 'dp4a', 'movmatrix', 'shr', 'vavrg2',
-                'alloca', 'elect', 'mul', 'sin', 'vavrg4',
-                'and', 'ex2', 'mul24', 'slct', 'vmad',
-                'applypriority', 'exit', 'multimem', 'sqrt', 'vmax',
-                'atom', 'fence', 'nanosleep', 'st', 'vmax2',
-                'bar', 'fma', 'neg', 'stackrestore', 'vmax4',
-                'barrier', 'fns', 'not', 'stacksave', 'vmin',
-                'bfe', 'getctarank', 'or', 'stmatrix', 'vmin2',
-                'bfi', 'griddepcontrol', 'pmevent', 'sub', 'vmin4',
-                'bfind', 'isspacep', 'popc', 'subc', 'vote',
-                'bmsk', 'istypep', 'prefetch', 'suld', 'vset',
-                'bra', 'ld', 'prefetchu', 'suq', 'vset2',
-                'brev', 'ldmatrix', 'prmt', 'sured', 'vset4',
-                'brkpt', 'ldu', 'rcp', 'sust', 'vshl',
-                'brx', 'lg2', 'red', 'szext', 'vshr',
-                'call', 'lop3', 'redux', 'tanh', 'vsub',
-                'clz', 'mad', 'rem', 'testp', 'vsub2',
-                'cnot', 'mad24', 'ret', 'tex', 'vsub4',
-                'copysign', 'madc', 'rsqrt', 'tld4', 'wgmma',
-                'cos', 'mapa', 'sad', 'trap', 'wmma',
-                'cp', 'match', 'selp', 'txq', 'xor',
-                'createpolicy', 'max', 'set', 'vabsdiff', 'cvt',
-                'mbarrier', 'setmaxnreg', 'vabsdiff2', 'cvta',
-                'membar', 'setp', 'vabsdiff4')), Keyword),
-            # State Spaces and Suffixes
-            (words((
-                'reg', '.sreg', '.const', '.global',
-                '.local', '.param', '.shared', '.tex',
-                '.wide', '.loc'
-            )), Keyword.Pseudo),
-            # PTX Directives
-            (words((
-                '.address_size', '.explicitcluster', '.maxnreg', '.section',
-                '.alias', '.extern', '.maxntid', '.shared',
-                '.align', '.file', '.minnctapersm', '.sreg',
-                '.branchtargets', '.func', '.noreturn', '.target',
-                '.callprototype', '.global', '.param', '.tex',
-                '.calltargets', '.loc', '.pragma', '.version',
-                '.common', '.local', '.reg', '.visible',
-                '.const', '.maxclusterrank', '.reqnctapercluster', '.weak',
-                '.entry', '.maxnctapersm', '.reqntid')), Keyword.Reserved),
-            # Fundamental Types
-            (words((
-                '.s8', '.s16', '.s32', '.s64',
-                '.u8', '.u16', '.u32', '.u64',
-                '.f16', '.f16x2', '.f32', '.f64',
-                '.b8', '.b16', '.b32', '.b64',
-                '.pred'
-            )), Keyword.Type)
-        ],
-
-    }
diff --git a/voxvera/vendor/pygments/lexers/python.py b/voxvera/vendor/pygments/lexers/python.py
deleted file mode 100644
index 805f6ff..0000000
--- a/voxvera/vendor/pygments/lexers/python.py
+++ /dev/null
@@ -1,1201 +0,0 @@
-"""
-    pygments.lexers.python
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Python and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import keyword
-
-from pygments.lexer import DelegatingLexer, RegexLexer, include, \
-    bygroups, using, default, words, combined, this
-from pygments.util import get_bool_opt, shebang_matches
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Generic, Other, Error, Whitespace
-from pygments import unistring as uni
-
-__all__ = ['PythonLexer', 'PythonConsoleLexer', 'PythonTracebackLexer',
-           'Python2Lexer', 'Python2TracebackLexer',
-           'CythonLexer', 'DgLexer', 'NumPyLexer']
-
-
-class PythonLexer(RegexLexer):
-    """
-    For Python source code (version 3.x).
-
-    .. versionchanged:: 2.5
-       This is now the default ``PythonLexer``.  It is still available as the
-       alias ``Python3Lexer``.
-    """
-
-    name = 'Python'
-    url = 'https://www.python.org'
-    aliases = ['python', 'py', 'sage', 'python3', 'py3', 'bazel', 'starlark', 'pyi']
-    filenames = [
-        '*.py',
-        '*.pyw',
-        # Type stubs
-        '*.pyi',
-        # Jython
-        '*.jy',
-        # Sage
-        '*.sage',
-        # SCons
-        '*.sc',
-        'SConstruct',
-        'SConscript',
-        # Skylark/Starlark (used by Bazel, Buck, and Pants)
-        '*.bzl',
-        'BUCK',
-        'BUILD',
-        'BUILD.bazel',
-        'WORKSPACE',
-        # Twisted Application infrastructure
-        '*.tac',
-    ]
-    mimetypes = ['text/x-python', 'application/x-python',
-                 'text/x-python3', 'application/x-python3']
-    version_added = '0.10'
-
-    uni_name = f"[{uni.xid_start}][{uni.xid_continue}]*"
-
-    def innerstring_rules(ttype):
-        return [
-            # the old style '%s' % (...) string formatting (still valid in Py3)
-            (r'%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?'
-             '[hlL]?[E-GXc-giorsaux%]', String.Interpol),
-            # the new style '{}'.format(...) string formatting
-            (r'\{'
-             r'((\w+)((\.\w+)|(\[[^\]]+\]))*)?'  # field name
-             r'(\![sra])?'                       # conversion
-             r'(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?'
-             r'\}', String.Interpol),
-
-            # backslashes, quotes and formatting signs must be parsed one at a time
-            (r'[^\\\'"%{\n]+', ttype),
-            (r'[\'"\\]', ttype),
-            # unhandled string formatting sign
-            (r'%|(\{{1,2})', ttype)
-            # newlines are an error (use "nl" state)
-        ]
-
-    def fstring_rules(ttype):
-        return [
-            # Assuming that a '}' is the closing brace after format specifier.
-            # Sadly, this means that we won't detect syntax error. But it's
-            # more important to parse correct syntax correctly, than to
-            # highlight invalid syntax.
-            (r'\}', String.Interpol),
-            (r'\{', String.Interpol, 'expr-inside-fstring'),
-            # backslashes, quotes and formatting signs must be parsed one at a time
-            (r'[^\\\'"{}\n]+', ttype),
-            (r'[\'"\\]', ttype),
-            # newlines are an error (use "nl" state)
-        ]
-
-    tokens = {
-        'root': [
-            (r'\n', Whitespace),
-            (r'^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")',
-             bygroups(Whitespace, String.Affix, String.Doc)),
-            (r"^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')",
-             bygroups(Whitespace, String.Affix, String.Doc)),
-            (r'\A#!.+$', Comment.Hashbang),
-            (r'#.*$', Comment.Single),
-            (r'\\\n', Text),
-            (r'\\', Text),
-            include('keywords'),
-            include('soft-keywords'),
-            (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Whitespace), 'funcname'),
-            (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Whitespace), 'classname'),
-            (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Whitespace),
-             'fromimport'),
-            (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Whitespace),
-             'import'),
-            include('expr'),
-        ],
-        'expr': [
-            # raw f-strings
-            ('(?i)(rf|fr)(""")',
-             bygroups(String.Affix, String.Double),
-             combined('rfstringescape', 'tdqf')),
-            ("(?i)(rf|fr)(''')",
-             bygroups(String.Affix, String.Single),
-             combined('rfstringescape', 'tsqf')),
-            ('(?i)(rf|fr)(")',
-             bygroups(String.Affix, String.Double),
-             combined('rfstringescape', 'dqf')),
-            ("(?i)(rf|fr)(')",
-             bygroups(String.Affix, String.Single),
-             combined('rfstringescape', 'sqf')),
-            # non-raw f-strings
-            ('([fF])(""")', bygroups(String.Affix, String.Double),
-             combined('fstringescape', 'tdqf')),
-            ("([fF])(''')", bygroups(String.Affix, String.Single),
-             combined('fstringescape', 'tsqf')),
-            ('([fF])(")', bygroups(String.Affix, String.Double),
-             combined('fstringescape', 'dqf')),
-            ("([fF])(')", bygroups(String.Affix, String.Single),
-             combined('fstringescape', 'sqf')),
-            # raw bytes and strings
-            ('(?i)(rb|br|r)(""")',
-             bygroups(String.Affix, String.Double), 'tdqs'),
-            ("(?i)(rb|br|r)(''')",
-             bygroups(String.Affix, String.Single), 'tsqs'),
-            ('(?i)(rb|br|r)(")',
-             bygroups(String.Affix, String.Double), 'dqs'),
-            ("(?i)(rb|br|r)(')",
-             bygroups(String.Affix, String.Single), 'sqs'),
-            # non-raw strings
-            ('([uU]?)(""")', bygroups(String.Affix, String.Double),
-             combined('stringescape', 'tdqs')),
-            ("([uU]?)(''')", bygroups(String.Affix, String.Single),
-             combined('stringescape', 'tsqs')),
-            ('([uU]?)(")', bygroups(String.Affix, String.Double),
-             combined('stringescape', 'dqs')),
-            ("([uU]?)(')", bygroups(String.Affix, String.Single),
-             combined('stringescape', 'sqs')),
-            # non-raw bytes
-            ('([bB])(""")', bygroups(String.Affix, String.Double),
-             combined('bytesescape', 'tdqs')),
-            ("([bB])(''')", bygroups(String.Affix, String.Single),
-             combined('bytesescape', 'tsqs')),
-            ('([bB])(")', bygroups(String.Affix, String.Double),
-             combined('bytesescape', 'dqs')),
-            ("([bB])(')", bygroups(String.Affix, String.Single),
-             combined('bytesescape', 'sqs')),
-
-            (r'[^\S\n]+', Text),
-            include('numbers'),
-            (r'!=|==|<<|>>|:=|[-~+/*%=<>&^|.]', Operator),
-            (r'[]{}:(),;[]', Punctuation),
-            (r'(in|is|and|or|not)\b', Operator.Word),
-            include('expr-keywords'),
-            include('builtins'),
-            include('magicfuncs'),
-            include('magicvars'),
-            include('name'),
-        ],
-        'expr-inside-fstring': [
-            (r'[{([]', Punctuation, 'expr-inside-fstring-inner'),
-            # without format specifier
-            (r'(=\s*)?'         # debug (https://bugs.python.org/issue36817)
-             r'(\![sraf])?'     # conversion
-             r'\}', String.Interpol, '#pop'),
-            # with format specifier
-            # we'll catch the remaining '}' in the outer scope
-            (r'(=\s*)?'         # debug (https://bugs.python.org/issue36817)
-             r'(\![sraf])?'     # conversion
-             r':', String.Interpol, '#pop'),
-            (r'\s+', Whitespace),  # allow new lines
-            include('expr'),
-        ],
-        'expr-inside-fstring-inner': [
-            (r'[{([]', Punctuation, 'expr-inside-fstring-inner'),
-            (r'[])}]', Punctuation, '#pop'),
-            (r'\s+', Whitespace),  # allow new lines
-            include('expr'),
-        ],
-        'expr-keywords': [
-            # Based on https://docs.python.org/3/reference/expressions.html
-            (words((
-                'async for', 'await', 'else', 'for', 'if', 'lambda',
-                'yield', 'yield from'), suffix=r'\b'),
-             Keyword),
-            (words(('True', 'False', 'None'), suffix=r'\b'), Keyword.Constant),
-        ],
-        'keywords': [
-            (words((
-                'assert', 'async', 'await', 'break', 'continue', 'del', 'elif',
-                'else', 'except', 'finally', 'for', 'global', 'if', 'lambda',
-                'pass', 'raise', 'nonlocal', 'return', 'try', 'while', 'yield',
-                'yield from', 'as', 'with'), suffix=r'\b'),
-             Keyword),
-            (words(('True', 'False', 'None'), suffix=r'\b'), Keyword.Constant),
-        ],
-        'soft-keywords': [
-            # `match`, `case` and `_` soft keywords
-            (r'(^[ \t]*)'              # at beginning of line + possible indentation
-             r'(match|case)\b'         # a possible keyword
-             r'(?![ \t]*(?:'           # not followed by...
-             r'[:,;=^&|@~)\]}]|(?:' +  # characters and keywords that mean this isn't
-                                       # pattern matching (but None/True/False is ok)
-             r'|'.join(k for k in keyword.kwlist if k[0].islower()) + r')\b))',
-             bygroups(Text, Keyword), 'soft-keywords-inner'),
-        ],
-        'soft-keywords-inner': [
-            # optional `_` keyword
-            (r'(\s+)([^\n_]*)(_\b)', bygroups(Whitespace, using(this), Keyword)),
-            default('#pop')
-        ],
-        'builtins': [
-            (words((
-                '__import__', 'abs', 'aiter', 'all', 'any', 'bin', 'bool', 'bytearray',
-                'breakpoint', 'bytes', 'callable', 'chr', 'classmethod', 'compile',
-                'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval',
-                'filter', 'float', 'format', 'frozenset', 'getattr', 'globals',
-                'hasattr', 'hash', 'hex', 'id', 'input', 'int', 'isinstance',
-                'issubclass', 'iter', 'len', 'list', 'locals', 'map', 'max',
-                'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow',
-                'print', 'property', 'range', 'repr', 'reversed', 'round', 'set',
-                'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super',
-                'tuple', 'type', 'vars', 'zip'), prefix=r'(?>|[-~+/*%=<>&^|.]', Operator),
-            include('keywords'),
-            (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Whitespace), 'funcname'),
-            (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Whitespace), 'classname'),
-            (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Whitespace),
-             'fromimport'),
-            (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Whitespace),
-             'import'),
-            include('builtins'),
-            include('magicfuncs'),
-            include('magicvars'),
-            include('backtick'),
-            ('([rR]|[uUbB][rR]|[rR][uUbB])(""")',
-             bygroups(String.Affix, String.Double), 'tdqs'),
-            ("([rR]|[uUbB][rR]|[rR][uUbB])(''')",
-             bygroups(String.Affix, String.Single), 'tsqs'),
-            ('([rR]|[uUbB][rR]|[rR][uUbB])(")',
-             bygroups(String.Affix, String.Double), 'dqs'),
-            ("([rR]|[uUbB][rR]|[rR][uUbB])(')",
-             bygroups(String.Affix, String.Single), 'sqs'),
-            ('([uUbB]?)(""")', bygroups(String.Affix, String.Double),
-             combined('stringescape', 'tdqs')),
-            ("([uUbB]?)(''')", bygroups(String.Affix, String.Single),
-             combined('stringescape', 'tsqs')),
-            ('([uUbB]?)(")', bygroups(String.Affix, String.Double),
-             combined('stringescape', 'dqs')),
-            ("([uUbB]?)(')", bygroups(String.Affix, String.Single),
-             combined('stringescape', 'sqs')),
-            include('name'),
-            include('numbers'),
-        ],
-        'keywords': [
-            (words((
-                'assert', 'break', 'continue', 'del', 'elif', 'else', 'except',
-                'exec', 'finally', 'for', 'global', 'if', 'lambda', 'pass',
-                'print', 'raise', 'return', 'try', 'while', 'yield',
-                'yield from', 'as', 'with'), suffix=r'\b'),
-             Keyword),
-        ],
-        'builtins': [
-            (words((
-                '__import__', 'abs', 'all', 'any', 'apply', 'basestring', 'bin',
-                'bool', 'buffer', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod',
-                'cmp', 'coerce', 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod',
-                'enumerate', 'eval', 'execfile', 'exit', 'file', 'filter', 'float',
-                'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'hex', 'id',
-                'input', 'int', 'intern', 'isinstance', 'issubclass', 'iter', 'len',
-                'list', 'locals', 'long', 'map', 'max', 'min', 'next', 'object',
-                'oct', 'open', 'ord', 'pow', 'property', 'range', 'raw_input', 'reduce',
-                'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',
-                'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type',
-                'unichr', 'unicode', 'vars', 'xrange', 'zip'),
-                prefix=r'(?>> )(.*\n)', bygroups(Generic.Prompt, Other.Code), 'continuations'),
-            # This happens, e.g., when tracebacks are embedded in documentation;
-            # trailing whitespaces are often stripped in such contexts.
-            (r'(>>>)(\n)', bygroups(Generic.Prompt, Whitespace)),
-            (r'(\^C)?Traceback \(most recent call last\):\n', Other.Traceback, 'traceback'),
-            # SyntaxError starts with this
-            (r'  File "[^"]+", line \d+', Other.Traceback, 'traceback'),
-            (r'.*\n', Generic.Output),
-        ],
-        'continuations': [
-            (r'(\.\.\. )(.*\n)', bygroups(Generic.Prompt, Other.Code)),
-            # See above.
-            (r'(\.\.\.)(\n)', bygroups(Generic.Prompt, Whitespace)),
-            default('#pop'),
-        ],
-        'traceback': [
-            # As soon as we see a traceback, consume everything until the next
-            # >>> prompt.
-            (r'(?=>>>( |$))', Text, '#pop'),
-            (r'(KeyboardInterrupt)(\n)', bygroups(Name.Class, Whitespace)),
-            (r'.*\n', Other.Traceback),
-        ],
-    }
-
-
-class PythonConsoleLexer(DelegatingLexer):
-    """
-    For Python console output or doctests, such as:
-
-    .. sourcecode:: pycon
-
-        >>> a = 'foo'
-        >>> print(a)
-        foo
-        >>> 1 / 0
-        Traceback (most recent call last):
-          File "", line 1, in 
-        ZeroDivisionError: integer division or modulo by zero
-
-    Additional options:
-
-    `python3`
-        Use Python 3 lexer for code.  Default is ``True``.
-
-        .. versionadded:: 1.0
-        .. versionchanged:: 2.5
-           Now defaults to ``True``.
-    """
-
-    name = 'Python console session'
-    aliases = ['pycon', 'python-console']
-    mimetypes = ['text/x-python-doctest']
-    url = 'https://python.org'
-    version_added = ''
-
-    def __init__(self, **options):
-        python3 = get_bool_opt(options, 'python3', True)
-        if python3:
-            pylexer = PythonLexer
-            tblexer = PythonTracebackLexer
-        else:
-            pylexer = Python2Lexer
-            tblexer = Python2TracebackLexer
-        # We have two auxiliary lexers. Use DelegatingLexer twice with
-        # different tokens.  TODO: DelegatingLexer should support this
-        # directly, by accepting a tuplet of auxiliary lexers and a tuple of
-        # distinguishing tokens. Then we wouldn't need this intermediary
-        # class.
-        class _ReplaceInnerCode(DelegatingLexer):
-            def __init__(self, **options):
-                super().__init__(pylexer, _PythonConsoleLexerBase, Other.Code, **options)
-        super().__init__(tblexer, _ReplaceInnerCode, Other.Traceback, **options)
-
-
-class PythonTracebackLexer(RegexLexer):
-    """
-    For Python 3.x tracebacks, with support for chained exceptions.
-
-    .. versionchanged:: 2.5
-       This is now the default ``PythonTracebackLexer``.  It is still available
-       as the alias ``Python3TracebackLexer``.
-    """
-
-    name = 'Python Traceback'
-    aliases = ['pytb', 'py3tb']
-    filenames = ['*.pytb', '*.py3tb']
-    mimetypes = ['text/x-python-traceback', 'text/x-python3-traceback']
-    url = 'https://python.org'
-    version_added = '1.0'
-
-    tokens = {
-        'root': [
-            (r'\n', Whitespace),
-            (r'^(\^C)?Traceback \(most recent call last\):\n', Generic.Traceback, 'intb'),
-            (r'^During handling of the above exception, another '
-             r'exception occurred:\n\n', Generic.Traceback),
-            (r'^The above exception was the direct cause of the '
-             r'following exception:\n\n', Generic.Traceback),
-            (r'^(?=  File "[^"]+", line \d+)', Generic.Traceback, 'intb'),
-            (r'^.*\n', Other),
-        ],
-        'intb': [
-            (r'^(  File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)',
-             bygroups(Text, Name.Builtin, Text, Number, Text, Name, Whitespace)),
-            (r'^(  File )("[^"]+")(, line )(\d+)(\n)',
-             bygroups(Text, Name.Builtin, Text, Number, Whitespace)),
-            (r'^(    )(.+)(\n)',
-             bygroups(Whitespace, using(PythonLexer), Whitespace), 'markers'),
-            (r'^([ \t]*)(\.\.\.)(\n)',
-             bygroups(Whitespace, Comment, Whitespace)),  # for doctests...
-            (r'^([^:]+)(: )(.+)(\n)',
-             bygroups(Generic.Error, Text, Name, Whitespace), '#pop'),
-            (r'^([a-zA-Z_][\w.]*)(:?\n)',
-             bygroups(Generic.Error, Whitespace), '#pop'),
-            default('#pop'),
-        ],
-        'markers': [
-            # Either `PEP 657 `
-            # error locations in Python 3.11+, or single-caret markers
-            # for syntax errors before that.
-            (r'^( {4,})([~^]+)(\n)',
-             bygroups(Whitespace, Punctuation.Marker, Whitespace),
-             '#pop'),
-            default('#pop'),
-        ],
-    }
-
-
-Python3TracebackLexer = PythonTracebackLexer
-
-
-class Python2TracebackLexer(RegexLexer):
-    """
-    For Python tracebacks.
-
-    .. versionchanged:: 2.5
-       This class has been renamed from ``PythonTracebackLexer``.
-       ``PythonTracebackLexer`` now refers to the Python 3 variant.
-    """
-
-    name = 'Python 2.x Traceback'
-    aliases = ['py2tb']
-    filenames = ['*.py2tb']
-    mimetypes = ['text/x-python2-traceback']
-    url = 'https://python.org'
-    version_added = '0.7'
-
-    tokens = {
-        'root': [
-            # Cover both (most recent call last) and (innermost last)
-            # The optional ^C allows us to catch keyboard interrupt signals.
-            (r'^(\^C)?(Traceback.*\n)',
-             bygroups(Text, Generic.Traceback), 'intb'),
-            # SyntaxError starts with this.
-            (r'^(?=  File "[^"]+", line \d+)', Generic.Traceback, 'intb'),
-            (r'^.*\n', Other),
-        ],
-        'intb': [
-            (r'^(  File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)',
-             bygroups(Text, Name.Builtin, Text, Number, Text, Name, Whitespace)),
-            (r'^(  File )("[^"]+")(, line )(\d+)(\n)',
-             bygroups(Text, Name.Builtin, Text, Number, Whitespace)),
-            (r'^(    )(.+)(\n)',
-             bygroups(Text, using(Python2Lexer), Whitespace), 'marker'),
-            (r'^([ \t]*)(\.\.\.)(\n)',
-             bygroups(Text, Comment, Whitespace)),  # for doctests...
-            (r'^([^:]+)(: )(.+)(\n)',
-             bygroups(Generic.Error, Text, Name, Whitespace), '#pop'),
-            (r'^([a-zA-Z_]\w*)(:?\n)',
-             bygroups(Generic.Error, Whitespace), '#pop')
-        ],
-        'marker': [
-            # For syntax errors.
-            (r'( {4,})(\^)', bygroups(Text, Punctuation.Marker), '#pop'),
-            default('#pop'),
-        ],
-    }
-
-
-class CythonLexer(RegexLexer):
-    """
-    For Pyrex and Cython source code.
-    """
-
-    name = 'Cython'
-    url = 'https://cython.org'
-    aliases = ['cython', 'pyx', 'pyrex']
-    filenames = ['*.pyx', '*.pxd', '*.pxi']
-    mimetypes = ['text/x-cython', 'application/x-cython']
-    version_added = '1.1'
-
-    tokens = {
-        'root': [
-            (r'\n', Whitespace),
-            (r'^(\s*)("""(?:.|\n)*?""")', bygroups(Whitespace, String.Doc)),
-            (r"^(\s*)('''(?:.|\n)*?''')", bygroups(Whitespace, String.Doc)),
-            (r'[^\S\n]+', Text),
-            (r'#.*$', Comment),
-            (r'[]{}:(),;[]', Punctuation),
-            (r'\\\n', Whitespace),
-            (r'\\', Text),
-            (r'(in|is|and|or|not)\b', Operator.Word),
-            (r'(<)([a-zA-Z0-9.?]+)(>)',
-             bygroups(Punctuation, Keyword.Type, Punctuation)),
-            (r'!=|==|<<|>>|[-~+/*%=<>&^|.?]', Operator),
-            (r'(from)(\d+)(<=)(\s+)(<)(\d+)(:)',
-             bygroups(Keyword, Number.Integer, Operator, Whitespace, Operator,
-                      Name, Punctuation)),
-            include('keywords'),
-            (r'(def|property)(\s+)', bygroups(Keyword, Whitespace), 'funcname'),
-            (r'(cp?def)(\s+)', bygroups(Keyword, Whitespace), 'cdef'),
-            # (should actually start a block with only cdefs)
-            (r'(cdef)(:)', bygroups(Keyword, Punctuation)),
-            (r'(class|struct)(\s+)', bygroups(Keyword, Whitespace), 'classname'),
-            (r'(from)(\s+)', bygroups(Keyword, Whitespace), 'fromimport'),
-            (r'(c?import)(\s+)', bygroups(Keyword, Whitespace), 'import'),
-            include('builtins'),
-            include('backtick'),
-            ('(?:[rR]|[uU][rR]|[rR][uU])"""', String, 'tdqs'),
-            ("(?:[rR]|[uU][rR]|[rR][uU])'''", String, 'tsqs'),
-            ('(?:[rR]|[uU][rR]|[rR][uU])"', String, 'dqs'),
-            ("(?:[rR]|[uU][rR]|[rR][uU])'", String, 'sqs'),
-            ('[uU]?"""', String, combined('stringescape', 'tdqs')),
-            ("[uU]?'''", String, combined('stringescape', 'tsqs')),
-            ('[uU]?"', String, combined('stringescape', 'dqs')),
-            ("[uU]?'", String, combined('stringescape', 'sqs')),
-            include('name'),
-            include('numbers'),
-        ],
-        'keywords': [
-            (words((
-                'assert', 'async', 'await', 'break', 'by', 'continue', 'ctypedef', 'del', 'elif',
-                'else', 'except', 'except?', 'exec', 'finally', 'for', 'fused', 'gil',
-                'global', 'if', 'include', 'lambda', 'nogil', 'pass', 'print',
-                'raise', 'return', 'try', 'while', 'yield', 'as', 'with'), suffix=r'\b'),
-             Keyword),
-            (r'(DEF|IF|ELIF|ELSE)\b', Comment.Preproc),
-        ],
-        'builtins': [
-            (words((
-                '__import__', 'abs', 'all', 'any', 'apply', 'basestring', 'bin', 'bint',
-                'bool', 'buffer', 'bytearray', 'bytes', 'callable', 'chr',
-                'classmethod', 'cmp', 'coerce', 'compile', 'complex', 'delattr',
-                'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', 'exit',
-                'file', 'filter', 'float', 'frozenset', 'getattr', 'globals',
-                'hasattr', 'hash', 'hex', 'id', 'input', 'int', 'intern', 'isinstance',
-                'issubclass', 'iter', 'len', 'list', 'locals', 'long', 'map', 'max',
-                'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'Py_ssize_t',
-                'range', 'raw_input', 'reduce', 'reload', 'repr', 'reversed',
-                'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod',
-                'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 'unsigned',
-                'vars', 'xrange', 'zip'), prefix=r'(??/\\:']?:)(\s*)(\{)",
-             bygroups(Name.Function, Whitespace, Operator, Whitespace, Punctuation),
-             "functions"),
-            # Variable Names
-            (r"([.]?[a-zA-Z][\w.]*)(\s*)([-.~=!@#$%^&*_+|,<>?/\\:']?:)",
-             bygroups(Name.Variable, Whitespace, Operator)),
-            # Functions
-            (r"\{", Punctuation, "functions"),
-            # Parentheses
-            (r"\(", Punctuation, "parentheses"),
-            # Brackets
-            (r"\[", Punctuation, "brackets"),
-            # Errors
-            (r"'`([a-zA-Z][\w.]*)?", Name.Exception),
-            # File Symbols
-            (r"`:([a-zA-Z/][\w./]*)?", String.Symbol),
-            # Symbols
-            (r"`([a-zA-Z][\w.]*)?", String.Symbol),
-            # Numbers
-            include("numbers"),
-            # Variable Names
-            (r"[a-zA-Z][\w.]*", Name),
-            # Operators
-            (r"[-=+*#$%@!~^&:.,<>'\\|/?_]", Operator),
-            # Punctuation
-            (r";", Punctuation),
-        ],
-        "functions": [
-            include("root"),
-            (r"\}", Punctuation, "#pop"),
-        ],
-        "parentheses": [
-            include("root"),
-            (r"\)", Punctuation, "#pop"),
-        ],
-        "brackets": [
-            include("root"),
-            (r"\]", Punctuation, "#pop"),
-        ],
-        "numbers": [
-            # Binary Values
-            (r"[01]+b", Number.Bin),
-            # Nulls/Infinities
-            (r"0[nNwW][cefghijmndzuvtp]?", Number),
-            # Timestamps
-            ((r"(?:[0-9]{4}[.][0-9]{2}[.][0-9]{2}|[0-9]+)"
-              "D(?:[0-9](?:[0-9](?::[0-9]{2}"
-              "(?::[0-9]{2}(?:[.][0-9]*)?)?)?)?)?"), Literal.Date),
-            # Datetimes
-            ((r"[0-9]{4}[.][0-9]{2}"
-              "(?:m|[.][0-9]{2}(?:T(?:[0-9]{2}:[0-9]{2}"
-              "(?::[0-9]{2}(?:[.][0-9]*)?)?)?)?)"), Literal.Date),
-            # Times
-            (r"[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:[.][0-9]{1,3})?)?",
-             Literal.Date),
-            # GUIDs
-            (r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
-             Number.Hex),
-            # Byte Vectors
-            (r"0x[0-9a-fA-F]+", Number.Hex),
-            # Floats
-            (r"([0-9]*[.]?[0-9]+|[0-9]+[.]?[0-9]*)[eE][+-]?[0-9]+[ef]?",
-             Number.Float),
-            (r"([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)[ef]?", Number.Float),
-            (r"[0-9]+[ef]", Number.Float),
-            # Characters
-            (r"[0-9]+c", Number),
-            # Integers
-            (r"[0-9]+[ihtuv]", Number.Integer),
-            # Long Integers
-            (r"[0-9]+[jnp]?", Number.Integer.Long),
-        ],
-        "comments": [
-            (r"[^\\]+", Comment.Multiline),
-            (r"^\\", Comment.Multiline, "#pop"),
-            (r"\\", Comment.Multiline),
-        ],
-        "strings": [
-            (r'[^"\\]+', String.Double),
-            (r"\\.", String.Escape),
-            (r'"', String.Double, "#pop"),
-        ],
-    }
-
-
-class QLexer(KLexer):
-    """
-    For `Q `_ source code.
-    """
-
-    name = "Q"
-    aliases = ["q"]
-    filenames = ["*.q"]
-    version_added = '2.12'
-
-    tokens = {
-        "root": [
-            (words(("aj", "aj0", "ajf", "ajf0", "all", "and", "any", "asc",
-                    "asof", "attr", "avgs", "ceiling", "cols", "count", "cross",
-                    "csv", "cut", "deltas", "desc", "differ", "distinct", "dsave",
-                    "each", "ej", "ema", "eval", "except", "fby", "fills", "first",
-                    "fkeys", "flip", "floor", "get", "group", "gtime", "hclose",
-                    "hcount", "hdel", "hsym", "iasc", "idesc", "ij", "ijf",
-                    "inter", "inv", "key", "keys", "lj", "ljf", "load", "lower",
-                    "lsq", "ltime", "ltrim", "mavg", "maxs", "mcount", "md5",
-                    "mdev", "med", "meta", "mins", "mmax", "mmin", "mmu", "mod",
-                    "msum", "neg", "next", "not", "null", "or", "over", "parse",
-                    "peach", "pj", "prds", "prior", "prev", "rand", "rank", "ratios",
-                    "raze", "read0", "read1", "reciprocal", "reval", "reverse",
-                    "rload", "rotate", "rsave", "rtrim", "save", "scan", "scov",
-                    "sdev", "set", "show", "signum", "ssr", "string", "sublist",
-                    "sums", "sv", "svar", "system", "tables", "til", "trim", "txf",
-                    "type", "uj", "ujf", "ungroup", "union", "upper", "upsert",
-                    "value", "view", "views", "vs", "where", "wj", "wj1", "ww",
-                    "xasc", "xbar", "xcol", "xcols", "xdesc", "xgroup", "xkey",
-                    "xlog", "xprev", "xrank"),
-                    suffix=r"\b"), Name.Builtin,
-            ),
-            inherit,
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/qlik.py b/voxvera/vendor/pygments/lexers/qlik.py
deleted file mode 100644
index a29f89f..0000000
--- a/voxvera/vendor/pygments/lexers/qlik.py
+++ /dev/null
@@ -1,117 +0,0 @@
-"""
-    pygments.lexers.qlik
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for the qlik scripting language
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include, bygroups, words
-from pygments.token import Comment, Keyword, Name, Number, Operator, \
-    Punctuation, String, Text
-from pygments.lexers._qlik_builtins import OPERATORS_LIST, STATEMENT_LIST, \
-    SCRIPT_FUNCTIONS, CONSTANT_LIST
-
-__all__ = ["QlikLexer"]
-
-
-class QlikLexer(RegexLexer):
-    """
-    Lexer for qlik code, including .qvs files
-    """
-
-    name = "Qlik"
-    aliases = ["qlik", "qlikview", "qliksense", "qlikscript"]
-    filenames = ["*.qvs", "*.qvw"]
-    url = "https://qlik.com"
-    version_added = '2.12'
-
-    flags = re.IGNORECASE
-
-    tokens = {
-        # Handle multi-line comments
-        "comment": [
-            (r"\*/", Comment.Multiline, "#pop"),
-            (r"[^*]+", Comment.Multiline),
-        ],
-        # Handle numbers
-        "numerics": [
-            (r"\b\d+\.\d+(e\d+)?[fd]?\b", Number.Float),
-            (r"\b\d+\b", Number.Integer),
-        ],
-        # Handle variable names in things
-        "interp": [
-            (
-                r"(\$\()(\w+)(\))",
-                bygroups(String.Interpol, Name.Variable, String.Interpol),
-            ),
-        ],
-        # Handle strings
-        "string": [
-            (r"'", String, "#pop"),
-            include("interp"),
-            (r"[^'$]+", String),
-            (r"\$", String),
-        ],
-        #
-        "assignment": [
-            (r";", Punctuation, "#pop"),
-            include("root"),
-        ],
-        "field_name_quote": [
-            (r'"', String.Symbol, "#pop"),
-            include("interp"),
-            (r"[^\"$]+", String.Symbol),
-            (r"\$", String.Symbol),
-        ],
-        "field_name_bracket": [
-            (r"\]", String.Symbol, "#pop"),
-            include("interp"),
-            (r"[^\]$]+", String.Symbol),
-            (r"\$", String.Symbol),
-        ],
-        "function": [(r"\)", Punctuation, "#pop"), include("root")],
-        "root": [
-            # Whitespace and comments
-            (r"\s+", Text.Whitespace),
-            (r"/\*", Comment.Multiline, "comment"),
-            (r"//.*\n", Comment.Single),
-            # variable assignment
-            (r"(let|set)(\s+)", bygroups(Keyword.Declaration, Text.Whitespace),
-             "assignment"),
-            # Word operators
-            (words(OPERATORS_LIST["words"], prefix=r"\b", suffix=r"\b"),
-             Operator.Word),
-            # Statements
-            (words(STATEMENT_LIST, suffix=r"\b"), Keyword),
-            # Table names
-            (r"[a-z]\w*:", Keyword.Declaration),
-            # Constants
-            (words(CONSTANT_LIST, suffix=r"\b"), Keyword.Constant),
-            # Functions
-            (words(SCRIPT_FUNCTIONS, suffix=r"(?=\s*\()"), Name.Builtin,
-             "function"),
-            # interpolation - e.g. $(variableName)
-            include("interp"),
-            # Quotes denote a field/file name
-            (r'"', String.Symbol, "field_name_quote"),
-            # Square brackets denote a field/file name
-            (r"\[", String.Symbol, "field_name_bracket"),
-            # Strings
-            (r"'", String, "string"),
-            # Numbers
-            include("numerics"),
-            # Operator symbols
-            (words(OPERATORS_LIST["symbols"]), Operator),
-            # Strings denoted by single quotes
-            (r"'.+?'", String),
-            # Words as text
-            (r"\b\w+\b", Text),
-            # Basic punctuation
-            (r"[,;.()\\/]", Punctuation),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/qvt.py b/voxvera/vendor/pygments/lexers/qvt.py
deleted file mode 100644
index 302d1b6..0000000
--- a/voxvera/vendor/pygments/lexers/qvt.py
+++ /dev/null
@@ -1,153 +0,0 @@
-"""
-    pygments.lexers.qvt
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexer for QVT Operational language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, include, combined, default, \
-    words
-from pygments.token import Text, Comment, Operator, Keyword, Punctuation, \
-    Name, String, Number
-
-__all__ = ['QVToLexer']
-
-
-class QVToLexer(RegexLexer):
-    """
-    For the QVT Operational Mapping language.
-
-    Reference for implementing this: «Meta Object Facility (MOF) 2.0
-    Query/View/Transformation Specification», Version 1.1 - January 2011
-    (https://www.omg.org/spec/QVT/1.1/), see §8.4, «Concrete Syntax» in
-    particular.
-
-    Notable tokens assignments:
-
-    - Name.Class is assigned to the identifier following any of the following
-      keywords: metamodel, class, exception, primitive, enum, transformation
-      or library
-
-    - Name.Function is assigned to the names of mappings and queries
-
-    - Name.Builtin.Pseudo is assigned to the pre-defined variables 'this',
-      'self' and 'result'.
-    """
-    # With obvious borrowings & inspiration from the Java, Python and C lexers
-
-    name = 'QVTO'
-    aliases = ['qvto', 'qvt']
-    filenames = ['*.qvto']
-    url = 'https://www.omg.org/spec/QVT/1.1'
-    version_added = ''
-
-    tokens = {
-        'root': [
-            (r'\n', Text),
-            (r'[^\S\n]+', Text),
-            (r'(--|//)(\s*)(directive:)?(.*)$',
-             bygroups(Comment, Comment, Comment.Preproc, Comment)),
-            # Uncomment the following if you want to distinguish between
-            # '/*' and '/**', à la javadoc
-            # (r'/[*]{2}(.|\n)*?[*]/', Comment.Multiline),
-            (r'/[*](.|\n)*?[*]/', Comment.Multiline),
-            (r'\\\n', Text),
-            (r'(and|not|or|xor|##?)\b', Operator.Word),
-            (r'(:{1,2}=|[-+]=)\b', Operator.Word),
-            (r'(@|<<|>>)\b', Keyword),  # stereotypes
-            (r'!=|<>|==|=|!->|->|>=|<=|[.]{3}|[+/*%=<>&|.~]', Operator),
-            (r'[]{}:(),;[]', Punctuation),
-            (r'(true|false|unlimited|null)\b', Keyword.Constant),
-            (r'(this|self|result)\b', Name.Builtin.Pseudo),
-            (r'(var)\b', Keyword.Declaration),
-            (r'(from|import)\b', Keyword.Namespace, 'fromimport'),
-            (r'(metamodel|class|exception|primitive|enum|transformation|'
-             r'library)(\s+)(\w+)',
-             bygroups(Keyword.Word, Text, Name.Class)),
-            (r'(exception)(\s+)(\w+)',
-             bygroups(Keyword.Word, Text, Name.Exception)),
-            (r'(main)\b', Name.Function),
-            (r'(mapping|helper|query)(\s+)',
-             bygroups(Keyword.Declaration, Text), 'operation'),
-            (r'(assert)(\s+)\b', bygroups(Keyword, Text), 'assert'),
-            (r'(Bag|Collection|Dict|OrderedSet|Sequence|Set|Tuple|List)\b',
-             Keyword.Type),
-            include('keywords'),
-            ('"', String, combined('stringescape', 'dqs')),
-            ("'", String, combined('stringescape', 'sqs')),
-            include('name'),
-            include('numbers'),
-            # (r'([a-zA-Z_]\w*)(::)([a-zA-Z_]\w*)',
-            # bygroups(Text, Text, Text)),
-        ],
-
-        'fromimport': [
-            (r'(?:[ \t]|\\\n)+', Text),
-            (r'[a-zA-Z_][\w.]*', Name.Namespace),
-            default('#pop'),
-        ],
-
-        'operation': [
-            (r'::', Text),
-            (r'(.*::)([a-zA-Z_]\w*)([ \t]*)(\()',
-             bygroups(Text, Name.Function, Text, Punctuation), '#pop')
-        ],
-
-        'assert': [
-            (r'(warning|error|fatal)\b', Keyword, '#pop'),
-            default('#pop'),  # all else: go back
-        ],
-
-        'keywords': [
-            (words((
-                'abstract', 'access', 'any', 'assert', 'blackbox', 'break',
-                'case', 'collect', 'collectNested', 'collectOne', 'collectselect',
-                'collectselectOne', 'composes', 'compute', 'configuration',
-                'constructor', 'continue', 'datatype', 'default', 'derived',
-                'disjuncts', 'do', 'elif', 'else', 'end', 'endif', 'except',
-                'exists', 'extends', 'forAll', 'forEach', 'forOne', 'from', 'if',
-                'implies', 'in', 'inherits', 'init', 'inout', 'intermediate',
-                'invresolve', 'invresolveIn', 'invresolveone', 'invresolveoneIn',
-                'isUnique', 'iterate', 'late', 'let', 'literal', 'log', 'map',
-                'merges', 'modeltype', 'new', 'object', 'one', 'ordered', 'out',
-                'package', 'population', 'property', 'raise', 'readonly',
-                'references', 'refines', 'reject', 'resolve', 'resolveIn',
-                'resolveone', 'resolveoneIn', 'return', 'select', 'selectOne',
-                'sortedBy', 'static', 'switch', 'tag', 'then', 'try', 'typedef',
-                'unlimited', 'uses', 'when', 'where', 'while', 'with', 'xcollect',
-                'xmap', 'xselect'), suffix=r'\b'), Keyword),
-        ],
-
-        # There is no need to distinguish between String.Single and
-        # String.Double: 'strings' is factorised for 'dqs' and 'sqs'
-        'strings': [
-            (r'[^\\\'"\n]+', String),
-            # quotes, percents and backslashes must be parsed one at a time
-            (r'[\'"\\]', String),
-        ],
-        'stringescape': [
-            (r'\\([\\btnfr"\']|u[0-3][0-7]{2}|u[0-7]{1,2})', String.Escape)
-        ],
-        'dqs': [  # double-quoted string
-            (r'"', String, '#pop'),
-            (r'\\\\|\\"', String.Escape),
-            include('strings')
-        ],
-        'sqs': [  # single-quoted string
-            (r"'", String, '#pop'),
-            (r"\\\\|\\'", String.Escape),
-            include('strings')
-        ],
-        'name': [
-            (r'[a-zA-Z_]\w*', Name),
-        ],
-        # numbers: excerpt taken from the python lexer
-        'numbers': [
-            (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
-            (r'\d+[eE][+-]?[0-9]+', Number.Float),
-            (r'\d+', Number.Integer)
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/r.py b/voxvera/vendor/pygments/lexers/r.py
deleted file mode 100644
index d3f65ba..0000000
--- a/voxvera/vendor/pygments/lexers/r.py
+++ /dev/null
@@ -1,196 +0,0 @@
-"""
-    pygments.lexers.r
-    ~~~~~~~~~~~~~~~~~
-
-    Lexers for the R/S languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import Lexer, RegexLexer, include, do_insertions
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Generic, Whitespace
-
-__all__ = ['RConsoleLexer', 'SLexer', 'RdLexer']
-
-
-line_re  = re.compile('.*?\n')
-
-
-class RConsoleLexer(Lexer):
-    """
-    For R console transcripts or R CMD BATCH output files.
-    """
-
-    name = 'RConsole'
-    aliases = ['rconsole', 'rout']
-    filenames = ['*.Rout']
-    url = 'https://www.r-project.org'
-    version_added = ''
-    _example = "rconsole/r-console-transcript.Rout"
-
-    def get_tokens_unprocessed(self, text):
-        slexer = SLexer(**self.options)
-
-        current_code_block = ''
-        insertions = []
-
-        for match in line_re.finditer(text):
-            line = match.group()
-            if line.startswith('>') or line.startswith('+'):
-                # Colorize the prompt as such,
-                # then put rest of line into current_code_block
-                insertions.append((len(current_code_block),
-                                   [(0, Generic.Prompt, line[:2])]))
-                current_code_block += line[2:]
-            else:
-                # We have reached a non-prompt line!
-                # If we have stored prompt lines, need to process them first.
-                if current_code_block:
-                    # Weave together the prompts and highlight code.
-                    yield from do_insertions(
-                        insertions, slexer.get_tokens_unprocessed(current_code_block))
-                    # Reset vars for next code block.
-                    current_code_block = ''
-                    insertions = []
-                # Now process the actual line itself, this is output from R.
-                yield match.start(), Generic.Output, line
-
-        # If we happen to end on a code block with nothing after it, need to
-        # process the last code block. This is neither elegant nor DRY so
-        # should be changed.
-        if current_code_block:
-            yield from do_insertions(
-                insertions, slexer.get_tokens_unprocessed(current_code_block))
-
-
-class SLexer(RegexLexer):
-    """
-    For S, S-plus, and R source code.
-    """
-
-    name = 'S'
-    aliases = ['splus', 's', 'r']
-    filenames = ['*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron']
-    mimetypes = ['text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r',
-                 'text/x-R', 'text/x-r-history', 'text/x-r-profile']
-    url = 'https://www.r-project.org'
-    version_added = '0.10'
-
-    valid_name = r'`[^`\\]*(?:\\.[^`\\]*)*`|(?:[a-zA-Z]|\.[A-Za-z_.])[\w.]*|\.'
-    tokens = {
-        'comments': [
-            (r'#.*$', Comment.Single),
-        ],
-        'valid_name': [
-            (valid_name, Name),
-        ],
-        'function_name': [
-            (rf'({valid_name})\s*(?=\()', Name.Function),
-        ],
-        'punctuation': [
-            (r'\[{1,2}|\]{1,2}|\(|\)|;|,', Punctuation),
-        ],
-        'keywords': [
-            (r'(if|else|for|while|repeat|in|next|break|return|switch|function)'
-             r'(?![\w.])',
-             Keyword.Reserved),
-        ],
-        'operators': [
-            (r'<>?|-|==|<=|>=|\|>|<|>|&&?|!=|\|\|?|\?', Operator),
-            (r'\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}', Operator),
-        ],
-        'builtin_symbols': [
-            (r'(NULL|NA(_(integer|real|complex|character)_)?|'
-             r'letters|LETTERS|Inf|TRUE|FALSE|NaN|pi|\.\.(\.|[0-9]+))'
-             r'(?![\w.])',
-             Keyword.Constant),
-            (r'(T|F)\b', Name.Builtin.Pseudo),
-        ],
-        'numbers': [
-            # hex number
-            (r'0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?', Number.Hex),
-            # decimal number
-            (r'[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)([eE][+-]?[0-9]+)?[Li]?',
-             Number),
-        ],
-        'statements': [
-            include('comments'),
-            # whitespaces
-            (r'\s+', Whitespace),
-            (r'\'', String, 'string_squote'),
-            (r'\"', String, 'string_dquote'),
-            include('builtin_symbols'),
-            include('keywords'),
-            include('function_name'),
-            include('valid_name'),
-            include('numbers'),
-            include('punctuation'),
-            include('operators'),
-        ],
-        'root': [
-            # calls:
-            include('statements'),
-            # blocks:
-            (r'\{|\}', Punctuation),
-            # (r'\{', Punctuation, 'block'),
-            (r'.', Text),
-        ],
-        # 'block': [
-        #    include('statements'),
-        #    ('\{', Punctuation, '#push'),
-        #    ('\}', Punctuation, '#pop')
-        # ],
-        'string_squote': [
-            (r'([^\'\\]|\\.)*\'', String, '#pop'),
-        ],
-        'string_dquote': [
-            (r'([^"\\]|\\.)*"', String, '#pop'),
-        ],
-    }
-
-    def analyse_text(text):
-        if re.search(r'[a-z0-9_\])\s]<-(?!-)', text):
-            return 0.11
-
-
-class RdLexer(RegexLexer):
-    """
-    Pygments Lexer for R documentation (Rd) files
-
-    This is a very minimal implementation, highlighting little more
-    than the macros. A description of Rd syntax is found in `Writing R
-    Extensions `_
-    and `Parsing Rd files `_.
-    """
-    name = 'Rd'
-    aliases = ['rd']
-    filenames = ['*.Rd']
-    mimetypes = ['text/x-r-doc']
-    url = 'http://cran.r-project.org/doc/manuals/R-exts.html'
-    version_added = '1.6'
-
-    # To account for verbatim / LaTeX-like / and R-like areas
-    # would require parsing.
-    tokens = {
-        'root': [
-            # catch escaped brackets and percent sign
-            (r'\\[\\{}%]', String.Escape),
-            # comments
-            (r'%.*$', Comment),
-            # special macros with no arguments
-            (r'\\(?:cr|l?dots|R|tab)\b', Keyword.Constant),
-            # macros
-            (r'\\[a-zA-Z]+\b', Keyword),
-            # special preprocessor macros
-            (r'^\s*#(?:ifn?def|endif).*\b', Comment.Preproc),
-            # non-escaped brackets
-            (r'[{}]', Name.Builtin),
-            # everything else
-            (r'[^\\%\n{}]+', Text),
-            (r'.', Text),
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/rdf.py b/voxvera/vendor/pygments/lexers/rdf.py
deleted file mode 100644
index 4930c1b..0000000
--- a/voxvera/vendor/pygments/lexers/rdf.py
+++ /dev/null
@@ -1,468 +0,0 @@
-"""
-    pygments.lexers.rdf
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexers for semantic web and RDF query languages and markup.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, bygroups, default
-from pygments.token import Keyword, Punctuation, String, Number, Operator, \
-    Generic, Whitespace, Name, Literal, Comment, Text
-
-__all__ = ['SparqlLexer', 'TurtleLexer', 'ShExCLexer']
-
-
-class SparqlLexer(RegexLexer):
-    """
-    Lexer for SPARQL query language.
-    """
-    name = 'SPARQL'
-    aliases = ['sparql']
-    filenames = ['*.rq', '*.sparql']
-    mimetypes = ['application/sparql-query']
-    url = 'https://www.w3.org/TR/sparql11-query'
-    version_added = '2.0'
-
-    # character group definitions ::
-
-    PN_CHARS_BASE_GRP = ('a-zA-Z'
-                         '\u00c0-\u00d6'
-                         '\u00d8-\u00f6'
-                         '\u00f8-\u02ff'
-                         '\u0370-\u037d'
-                         '\u037f-\u1fff'
-                         '\u200c-\u200d'
-                         '\u2070-\u218f'
-                         '\u2c00-\u2fef'
-                         '\u3001-\ud7ff'
-                         '\uf900-\ufdcf'
-                         '\ufdf0-\ufffd')
-
-    PN_CHARS_U_GRP = (PN_CHARS_BASE_GRP + '_')
-
-    PN_CHARS_GRP = (PN_CHARS_U_GRP +
-                    r'\-' +
-                    r'0-9' +
-                    '\u00b7' +
-                    '\u0300-\u036f' +
-                    '\u203f-\u2040')
-
-    HEX_GRP = '0-9A-Fa-f'
-
-    PN_LOCAL_ESC_CHARS_GRP = r' _~.\-!$&"()*+,;=/?#@%'
-
-    # terminal productions ::
-
-    PN_CHARS_BASE = '[' + PN_CHARS_BASE_GRP + ']'
-
-    PN_CHARS_U = '[' + PN_CHARS_U_GRP + ']'
-
-    PN_CHARS = '[' + PN_CHARS_GRP + ']'
-
-    HEX = '[' + HEX_GRP + ']'
-
-    PN_LOCAL_ESC_CHARS = '[' + PN_LOCAL_ESC_CHARS_GRP + ']'
-
-    IRIREF = r'<(?:[^<>"{}|^`\\\x00-\x20])*>'
-
-    BLANK_NODE_LABEL = '_:[0-9' + PN_CHARS_U_GRP + '](?:[' + PN_CHARS_GRP + \
-                       '.]*' + PN_CHARS + ')?'
-
-    PN_PREFIX = PN_CHARS_BASE + '(?:[' + PN_CHARS_GRP + '.]*' + PN_CHARS + ')?'
-
-    VARNAME = '[0-9' + PN_CHARS_U_GRP + '][' + PN_CHARS_U_GRP + \
-              '0-9\u00b7\u0300-\u036f\u203f-\u2040]*'
-
-    PERCENT = '%' + HEX + HEX
-
-    PN_LOCAL_ESC = r'\\' + PN_LOCAL_ESC_CHARS
-
-    PLX = '(?:' + PERCENT + ')|(?:' + PN_LOCAL_ESC + ')'
-
-    PN_LOCAL = ('(?:[' + PN_CHARS_U_GRP + ':0-9' + ']|' + PLX + ')' +
-                '(?:(?:[' + PN_CHARS_GRP + '.:]|' + PLX + ')*(?:[' +
-                PN_CHARS_GRP + ':]|' + PLX + '))?')
-
-    EXPONENT = r'[eE][+-]?\d+'
-
-    # Lexer token definitions ::
-
-    tokens = {
-        'root': [
-            (r'\s+', Text),
-            # keywords ::
-            (r'(?i)(select|construct|describe|ask|where|filter|group\s+by|minus|'
-             r'distinct|reduced|from\s+named|from|order\s+by|desc|asc|limit|'
-             r'offset|values|bindings|load|into|clear|drop|create|add|move|copy|'
-             r'insert\s+data|delete\s+data|delete\s+where|with|delete|insert|'
-             r'using\s+named|using|graph|default|named|all|optional|service|'
-             r'silent|bind|undef|union|not\s+in|in|as|having|to|prefix|base)\b', Keyword),
-            (r'(a)\b', Keyword),
-            # IRIs ::
-            ('(' + IRIREF + ')', Name.Label),
-            # blank nodes ::
-            ('(' + BLANK_NODE_LABEL + ')', Name.Label),
-            #  # variables ::
-            ('[?$]' + VARNAME, Name.Variable),
-            # prefixed names ::
-            (r'(' + PN_PREFIX + r')?(\:)(' + PN_LOCAL + r')?',
-             bygroups(Name.Namespace, Punctuation, Name.Tag)),
-            # function names ::
-            (r'(?i)(str|lang|langmatches|datatype|bound|iri|uri|bnode|rand|abs|'
-             r'ceil|floor|round|concat|strlen|ucase|lcase|encode_for_uri|'
-             r'contains|strstarts|strends|strbefore|strafter|year|month|day|'
-             r'hours|minutes|seconds|timezone|tz|now|uuid|struuid|md5|sha1|sha256|sha384|'
-             r'sha512|coalesce|if|strlang|strdt|sameterm|isiri|isuri|isblank|'
-             r'isliteral|isnumeric|regex|substr|replace|exists|not\s+exists|'
-             r'count|sum|min|max|avg|sample|group_concat|separator)\b',
-             Name.Function),
-            # boolean literals ::
-            (r'(true|false)', Keyword.Constant),
-            # double literals ::
-            (r'[+\-]?(\d+\.\d*' + EXPONENT + r'|\.?\d+' + EXPONENT + ')', Number.Float),
-            # decimal literals ::
-            (r'[+\-]?(\d+\.\d*|\.\d+)', Number.Float),
-            # integer literals ::
-            (r'[+\-]?\d+', Number.Integer),
-            # operators ::
-            (r'(\|\||&&|=|\*|\-|\+|/|!=|<=|>=|!|<|>)', Operator),
-            # punctuation characters ::
-            (r'[(){}.;,:^\[\]]', Punctuation),
-            # line comments ::
-            (r'#[^\n]*', Comment),
-            # strings ::
-            (r'"""', String, 'triple-double-quoted-string'),
-            (r'"', String, 'single-double-quoted-string'),
-            (r"'''", String, 'triple-single-quoted-string'),
-            (r"'", String, 'single-single-quoted-string'),
-        ],
-        'triple-double-quoted-string': [
-            (r'"""', String, 'end-of-string'),
-            (r'[^\\]+', String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'single-double-quoted-string': [
-            (r'"', String, 'end-of-string'),
-            (r'[^"\\\n]+', String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'triple-single-quoted-string': [
-            (r"'''", String, 'end-of-string'),
-            (r'[^\\]+', String),
-            (r'\\', String.Escape, 'string-escape'),
-        ],
-        'single-single-quoted-string': [
-            (r"'", String, 'end-of-string'),
-            (r"[^'\\\n]+", String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'string-escape': [
-            (r'u' + HEX + '{4}', String.Escape, '#pop'),
-            (r'U' + HEX + '{8}', String.Escape, '#pop'),
-            (r'.', String.Escape, '#pop'),
-        ],
-        'end-of-string': [
-            (r'(@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)',
-             bygroups(Operator, Name.Function), '#pop:2'),
-            (r'\^\^', Operator, '#pop:2'),
-            default('#pop:2'),
-        ],
-    }
-
-
-class TurtleLexer(RegexLexer):
-    """
-    Lexer for Turtle data language.
-    """
-    name = 'Turtle'
-    aliases = ['turtle']
-    filenames = ['*.ttl']
-    mimetypes = ['text/turtle', 'application/x-turtle']
-    url = 'https://www.w3.org/TR/turtle'
-    version_added = '2.1'
-
-    # character group definitions ::
-    PN_CHARS_BASE_GRP = ('a-zA-Z'
-                         '\u00c0-\u00d6'
-                         '\u00d8-\u00f6'
-                         '\u00f8-\u02ff'
-                         '\u0370-\u037d'
-                         '\u037f-\u1fff'
-                         '\u200c-\u200d'
-                         '\u2070-\u218f'
-                         '\u2c00-\u2fef'
-                         '\u3001-\ud7ff'
-                         '\uf900-\ufdcf'
-                         '\ufdf0-\ufffd')
-
-    PN_CHARS_U_GRP = (PN_CHARS_BASE_GRP + '_')
-
-    PN_CHARS_GRP = (PN_CHARS_U_GRP +
-                    r'\-' +
-                    r'0-9' +
-                    '\u00b7' +
-                    '\u0300-\u036f' +
-                    '\u203f-\u2040')
-
-    PN_CHARS = '[' + PN_CHARS_GRP + ']'
-
-    PN_CHARS_BASE = '[' + PN_CHARS_BASE_GRP + ']'
-
-    PN_PREFIX = PN_CHARS_BASE + '(?:[' + PN_CHARS_GRP + '.]*' + PN_CHARS + ')?'
-
-    HEX_GRP = '0-9A-Fa-f'
-
-    HEX = '[' + HEX_GRP + ']'
-
-    PERCENT = '%' + HEX + HEX
-
-    PN_LOCAL_ESC_CHARS_GRP = r' _~.\-!$&"()*+,;=/?#@%'
-
-    PN_LOCAL_ESC_CHARS = '[' + PN_LOCAL_ESC_CHARS_GRP + ']'
-
-    PN_LOCAL_ESC = r'\\' + PN_LOCAL_ESC_CHARS
-
-    PLX = '(?:' + PERCENT + ')|(?:' + PN_LOCAL_ESC + ')'
-
-    PN_LOCAL = ('(?:[' + PN_CHARS_U_GRP + ':0-9' + ']|' + PLX + ')' +
-                '(?:(?:[' + PN_CHARS_GRP + '.:]|' + PLX + ')*(?:[' +
-                PN_CHARS_GRP + ':]|' + PLX + '))?')
-
-    patterns = {
-        'PNAME_NS': r'((?:[a-zA-Z][\w-]*)?\:)',  # Simplified character range
-        'IRIREF': r'(<[^<>"{}|^`\\\x00-\x20]*>)'
-    }
-
-    tokens = {
-        'root': [
-            (r'\s+', Text),
-
-            # Base / prefix
-            (r'(@base|BASE)(\s+){IRIREF}(\s*)(\.?)'.format(**patterns),
-             bygroups(Keyword, Whitespace, Name.Variable, Whitespace,
-                      Punctuation)),
-            (r'(@prefix|PREFIX)(\s+){PNAME_NS}(\s+){IRIREF}(\s*)(\.?)'.format(**patterns),
-             bygroups(Keyword, Whitespace, Name.Namespace, Whitespace,
-                      Name.Variable, Whitespace, Punctuation)),
-
-            # The shorthand predicate 'a'
-            (r'(?<=\s)a(?=\s)', Keyword.Type),
-
-            # IRIREF
-            (r'{IRIREF}'.format(**patterns), Name.Variable),
-
-            # PrefixedName
-            (r'(' + PN_PREFIX + r')?(\:)(' + PN_LOCAL + r')?',
-             bygroups(Name.Namespace, Punctuation, Name.Tag)),
-
-            # BlankNodeLabel
-            (r'(_)(:)([' + PN_CHARS_U_GRP + r'0-9]([' + PN_CHARS_GRP + r'.]*' + PN_CHARS + ')?)',
-             bygroups(Name.Namespace, Punctuation, Name.Tag)),
-
-            # Comment
-            (r'#[^\n]+', Comment),
-
-            (r'\b(true|false)\b', Literal),
-            (r'[+\-]?\d*\.\d+', Number.Float),
-            (r'[+\-]?\d*(:?\.\d+)?E[+\-]?\d+', Number.Float),
-            (r'[+\-]?\d+', Number.Integer),
-            (r'[\[\](){}.;,:^]', Punctuation),
-
-            (r'"""', String, 'triple-double-quoted-string'),
-            (r'"', String, 'single-double-quoted-string'),
-            (r"'''", String, 'triple-single-quoted-string'),
-            (r"'", String, 'single-single-quoted-string'),
-        ],
-        'triple-double-quoted-string': [
-            (r'"""', String, 'end-of-string'),
-            (r'[^\\]+(?=""")', String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'single-double-quoted-string': [
-            (r'"', String, 'end-of-string'),
-            (r'[^"\\\n]+', String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'triple-single-quoted-string': [
-            (r"'''", String, 'end-of-string'),
-            (r"[^\\]+(?=''')", String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'single-single-quoted-string': [
-            (r"'", String, 'end-of-string'),
-            (r"[^'\\\n]+", String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'string-escape': [
-            (r'.', String, '#pop'),
-        ],
-        'end-of-string': [
-            (r'(@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)',
-             bygroups(Operator, Generic.Emph), '#pop:2'),
-
-            (r'(\^\^){IRIREF}'.format(**patterns), bygroups(Operator, Generic.Emph), '#pop:2'),
-
-            default('#pop:2'),
-
-        ],
-    }
-
-    # Turtle and Tera Term macro files share the same file extension
-    # but each has a recognizable and distinct syntax.
-    def analyse_text(text):
-        for t in ('@base ', 'BASE ', '@prefix ', 'PREFIX '):
-            if re.search(rf'^\s*{t}', text):
-                return 0.80
-
-
-class ShExCLexer(RegexLexer):
-    """
-    Lexer for ShExC shape expressions language syntax.
-    """
-    name = 'ShExC'
-    aliases = ['shexc', 'shex']
-    filenames = ['*.shex']
-    mimetypes = ['text/shex']
-    url = 'https://shex.io/shex-semantics/#shexc'
-    version_added = ''
-
-    # character group definitions ::
-
-    PN_CHARS_BASE_GRP = ('a-zA-Z'
-                         '\u00c0-\u00d6'
-                         '\u00d8-\u00f6'
-                         '\u00f8-\u02ff'
-                         '\u0370-\u037d'
-                         '\u037f-\u1fff'
-                         '\u200c-\u200d'
-                         '\u2070-\u218f'
-                         '\u2c00-\u2fef'
-                         '\u3001-\ud7ff'
-                         '\uf900-\ufdcf'
-                         '\ufdf0-\ufffd')
-
-    PN_CHARS_U_GRP = (PN_CHARS_BASE_GRP + '_')
-
-    PN_CHARS_GRP = (PN_CHARS_U_GRP +
-                    r'\-' +
-                    r'0-9' +
-                    '\u00b7' +
-                    '\u0300-\u036f' +
-                    '\u203f-\u2040')
-
-    HEX_GRP = '0-9A-Fa-f'
-
-    PN_LOCAL_ESC_CHARS_GRP = r"_~.\-!$&'()*+,;=/?#@%"
-
-    # terminal productions ::
-
-    PN_CHARS_BASE = '[' + PN_CHARS_BASE_GRP + ']'
-
-    PN_CHARS_U = '[' + PN_CHARS_U_GRP + ']'
-
-    PN_CHARS = '[' + PN_CHARS_GRP + ']'
-
-    HEX = '[' + HEX_GRP + ']'
-
-    PN_LOCAL_ESC_CHARS = '[' + PN_LOCAL_ESC_CHARS_GRP + ']'
-
-    UCHAR_NO_BACKSLASH = '(?:u' + HEX + '{4}|U' + HEX + '{8})'
-
-    UCHAR = r'\\' + UCHAR_NO_BACKSLASH
-
-    IRIREF = r'<(?:[^\x00-\x20<>"{}|^`\\]|' + UCHAR + ')*>'
-
-    BLANK_NODE_LABEL = '_:[0-9' + PN_CHARS_U_GRP + '](?:[' + PN_CHARS_GRP + \
-                       '.]*' + PN_CHARS + ')?'
-
-    PN_PREFIX = PN_CHARS_BASE + '(?:[' + PN_CHARS_GRP + '.]*' + PN_CHARS + ')?'
-
-    PERCENT = '%' + HEX + HEX
-
-    PN_LOCAL_ESC = r'\\' + PN_LOCAL_ESC_CHARS
-
-    PLX = '(?:' + PERCENT + ')|(?:' + PN_LOCAL_ESC + ')'
-
-    PN_LOCAL = ('(?:[' + PN_CHARS_U_GRP + ':0-9' + ']|' + PLX + ')' +
-                '(?:(?:[' + PN_CHARS_GRP + '.:]|' + PLX + ')*(?:[' +
-                PN_CHARS_GRP + ':]|' + PLX + '))?')
-
-    EXPONENT = r'[eE][+-]?\d+'
-
-    # Lexer token definitions ::
-
-    tokens = {
-        'root': [
-            (r'\s+', Text),
-            # keywords ::
-            (r'(?i)(base|prefix|start|external|'
-             r'literal|iri|bnode|nonliteral|length|minlength|maxlength|'
-             r'mininclusive|minexclusive|maxinclusive|maxexclusive|'
-             r'totaldigits|fractiondigits|'
-             r'closed|extra)\b', Keyword),
-            (r'(a)\b', Keyword),
-            # IRIs ::
-            ('(' + IRIREF + ')', Name.Label),
-            # blank nodes ::
-            ('(' + BLANK_NODE_LABEL + ')', Name.Label),
-            # prefixed names ::
-            (r'(' + PN_PREFIX + r')?(\:)(' + PN_LOCAL + ')?',
-             bygroups(Name.Namespace, Punctuation, Name.Tag)),
-            # boolean literals ::
-            (r'(true|false)', Keyword.Constant),
-            # double literals ::
-            (r'[+\-]?(\d+\.\d*' + EXPONENT + r'|\.?\d+' + EXPONENT + ')', Number.Float),
-            # decimal literals ::
-            (r'[+\-]?(\d+\.\d*|\.\d+)', Number.Float),
-            # integer literals ::
-            (r'[+\-]?\d+', Number.Integer),
-            # operators ::
-            (r'[@|$&=*+?^\-~]', Operator),
-            # operator keywords ::
-            (r'(?i)(and|or|not)\b', Operator.Word),
-            # punctuation characters ::
-            (r'[(){}.;,:^\[\]]', Punctuation),
-            # line comments ::
-            (r'#[^\n]*', Comment),
-            # strings ::
-            (r'"""', String, 'triple-double-quoted-string'),
-            (r'"', String, 'single-double-quoted-string'),
-            (r"'''", String, 'triple-single-quoted-string'),
-            (r"'", String, 'single-single-quoted-string'),
-        ],
-        'triple-double-quoted-string': [
-            (r'"""', String, 'end-of-string'),
-            (r'[^\\]+', String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'single-double-quoted-string': [
-            (r'"', String, 'end-of-string'),
-            (r'[^"\\\n]+', String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'triple-single-quoted-string': [
-            (r"'''", String, 'end-of-string'),
-            (r'[^\\]+', String),
-            (r'\\', String.Escape, 'string-escape'),
-        ],
-        'single-single-quoted-string': [
-            (r"'", String, 'end-of-string'),
-            (r"[^'\\\n]+", String),
-            (r'\\', String, 'string-escape'),
-        ],
-        'string-escape': [
-            (UCHAR_NO_BACKSLASH, String.Escape, '#pop'),
-            (r'.', String.Escape, '#pop'),
-        ],
-        'end-of-string': [
-            (r'(@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)',
-             bygroups(Operator, Name.Function), '#pop:2'),
-            (r'\^\^', Operator, '#pop:2'),
-            default('#pop:2'),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/rebol.py b/voxvera/vendor/pygments/lexers/rebol.py
deleted file mode 100644
index 4b37a74..0000000
--- a/voxvera/vendor/pygments/lexers/rebol.py
+++ /dev/null
@@ -1,419 +0,0 @@
-"""
-    pygments.lexers.rebol
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the REBOL and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, bygroups
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Generic, Whitespace
-
-__all__ = ['RebolLexer', 'RedLexer']
-
-
-class RebolLexer(RegexLexer):
-    """
-    A REBOL lexer.
-    """
-    name = 'REBOL'
-    aliases = ['rebol']
-    filenames = ['*.r', '*.r3', '*.reb']
-    mimetypes = ['text/x-rebol']
-    url = 'http://www.rebol.com'
-    version_added = '1.1'
-
-    flags = re.IGNORECASE | re.MULTILINE
-
-    escape_re = r'(?:\^\([0-9a-f]{1,4}\)*)'
-
-    def word_callback(lexer, match):
-        word = match.group()
-
-        if re.match(".*:$", word):
-            yield match.start(), Generic.Subheading, word
-        elif re.match(
-            r'(native|alias|all|any|as-string|as-binary|bind|bound\?|case|'
-            r'catch|checksum|comment|debase|dehex|exclude|difference|disarm|'
-            r'either|else|enbase|foreach|remove-each|form|free|get|get-env|if|'
-            r'in|intersect|loop|minimum-of|maximum-of|mold|new-line|'
-            r'new-line\?|not|now|prin|print|reduce|compose|construct|repeat|'
-            r'reverse|save|script\?|set|shift|switch|throw|to-hex|trace|try|'
-            r'type\?|union|unique|unless|unprotect|unset|until|use|value\?|'
-            r'while|compress|decompress|secure|open|close|read|read-io|'
-            r'write-io|write|update|query|wait|input\?|exp|log-10|log-2|'
-            r'log-e|square-root|cosine|sine|tangent|arccosine|arcsine|'
-            r'arctangent|protect|lowercase|uppercase|entab|detab|connected\?|'
-            r'browse|launch|stats|get-modes|set-modes|to-local-file|'
-            r'to-rebol-file|encloak|decloak|create-link|do-browser|bind\?|'
-            r'hide|draw|show|size-text|textinfo|offset-to-caret|'
-            r'caret-to-offset|local-request-file|rgb-to-hsv|hsv-to-rgb|'
-            r'crypt-strength\?|dh-make-key|dh-generate-key|dh-compute-key|'
-            r'dsa-make-key|dsa-generate-key|dsa-make-signature|'
-            r'dsa-verify-signature|rsa-make-key|rsa-generate-key|'
-            r'rsa-encrypt)$', word):
-            yield match.start(), Name.Builtin, word
-        elif re.match(
-            r'(add|subtract|multiply|divide|remainder|power|and~|or~|xor~|'
-            r'minimum|maximum|negate|complement|absolute|random|head|tail|'
-            r'next|back|skip|at|pick|first|second|third|fourth|fifth|sixth|'
-            r'seventh|eighth|ninth|tenth|last|path|find|select|make|to|copy\*|'
-            r'insert|remove|change|poke|clear|trim|sort|min|max|abs|cp|'
-            r'copy)$', word):
-            yield match.start(), Name.Function, word
-        elif re.match(
-            r'(error|source|input|license|help|install|echo|Usage|with|func|'
-            r'throw-on-error|function|does|has|context|probe|\?\?|as-pair|'
-            r'mod|modulo|round|repend|about|set-net|append|join|rejoin|reform|'
-            r'remold|charset|array|replace|move|extract|forskip|forall|alter|'
-            r'first+|also|take|for|forever|dispatch|attempt|what-dir|'
-            r'change-dir|clean-path|list-dir|dirize|rename|split-path|delete|'
-            r'make-dir|delete-dir|in-dir|confirm|dump-obj|upgrade|what|'
-            r'build-tag|process-source|build-markup|decode-cgi|read-cgi|'
-            r'write-user|save-user|set-user-name|protect-system|parse-xml|'
-            r'cvs-date|cvs-version|do-boot|get-net-info|desktop|layout|'
-            r'scroll-para|get-face|alert|set-face|uninstall|unfocus|'
-            r'request-dir|center-face|do-events|net-error|decode-url|'
-            r'parse-header|parse-header-date|parse-email-addrs|import-email|'
-            r'send|build-attach-body|resend|show-popup|hide-popup|open-events|'
-            r'find-key-face|do-face|viewtop|confine|find-window|'
-            r'insert-event-func|remove-event-func|inform|dump-pane|dump-face|'
-            r'flag-face|deflag-face|clear-fields|read-net|vbug|path-thru|'
-            r'read-thru|load-thru|do-thru|launch-thru|load-image|'
-            r'request-download|do-face-alt|set-font|set-para|get-style|'
-            r'set-style|make-face|stylize|choose|hilight-text|hilight-all|'
-            r'unlight-text|focus|scroll-drag|clear-face|reset-face|scroll-face|'
-            r'resize-face|load-stock|load-stock-block|notify|request|flash|'
-            r'request-color|request-pass|request-text|request-list|'
-            r'request-date|request-file|dbug|editor|link-relative-path|'
-            r'emailer|parse-error)$', word):
-            yield match.start(), Keyword.Namespace, word
-        elif re.match(
-            r'(halt|quit|do|load|q|recycle|call|run|ask|parse|view|unview|'
-            r'return|exit|break)$', word):
-            yield match.start(), Name.Exception, word
-        elif re.match('REBOL$', word):
-            yield match.start(), Generic.Heading, word
-        elif re.match("to-.*", word):
-            yield match.start(), Keyword, word
-        elif re.match(r'(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$',
-                      word):
-            yield match.start(), Operator, word
-        elif re.match(r".*\?$", word):
-            yield match.start(), Keyword, word
-        elif re.match(r".*\!$", word):
-            yield match.start(), Keyword.Type, word
-        elif re.match("'.*", word):
-            yield match.start(), Name.Variable.Instance, word  # lit-word
-        elif re.match("#.*", word):
-            yield match.start(), Name.Label, word  # issue
-        elif re.match("%.*", word):
-            yield match.start(), Name.Decorator, word  # file
-        else:
-            yield match.start(), Name.Variable, word
-
-    tokens = {
-        'root': [
-            (r'\s+', Text),
-            (r'#"', String.Char, 'char'),
-            (r'#\{[0-9a-f]*\}', Number.Hex),
-            (r'2#\{', Number.Hex, 'bin2'),
-            (r'64#\{[0-9a-z+/=\s]*\}', Number.Hex),
-            (r'"', String, 'string'),
-            (r'\{', String, 'string2'),
-            (r';#+.*\n', Comment.Special),
-            (r';\*+.*\n', Comment.Preproc),
-            (r';.*\n', Comment),
-            (r'%"', Name.Decorator, 'stringFile'),
-            (r'%[^(^{")\s\[\]]+', Name.Decorator),
-            (r'[+-]?([a-z]{1,3})?\$\d+(\.\d+)?', Number.Float),  # money
-            (r'[+-]?\d+\:\d+(\:\d+)?(\.\d+)?', String.Other),    # time
-            (r'\d+[\-/][0-9a-z]+[\-/]\d+(\/\d+\:\d+((\:\d+)?'
-             r'([.\d+]?([+-]?\d+:\d+)?)?)?)?', String.Other),   # date
-            (r'\d+(\.\d+)+\.\d+', Keyword.Constant),             # tuple
-            (r'\d+X\d+', Keyword.Constant),                   # pair
-            (r'[+-]?\d+(\'\d+)?([.,]\d*)?E[+-]?\d+', Number.Float),
-            (r'[+-]?\d+(\'\d+)?[.,]\d*', Number.Float),
-            (r'[+-]?\d+(\'\d+)?', Number),
-            (r'[\[\]()]', Generic.Strong),
-            (r'[a-z]+[^(^{"\s:)]*://[^(^{"\s)]*', Name.Decorator),  # url
-            (r'mailto:[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator),  # url
-            (r'[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator),         # email
-            (r'comment\s"', Comment, 'commentString1'),
-            (r'comment\s\{', Comment, 'commentString2'),
-            (r'comment\s\[', Comment, 'commentBlock'),
-            (r'comment\s[^(\s{"\[]+', Comment),
-            (r'/[^(^{")\s/[\]]*', Name.Attribute),
-            (r'([^(^{")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback),
-            (r'<[\w:.-]*>', Name.Tag),
-            (r'<[^(<>\s")]+', Name.Tag, 'tag'),
-            (r'([^(^{")\s]+)', Text),
-        ],
-        'string': [
-            (r'[^(^")]+', String),
-            (escape_re, String.Escape),
-            (r'[(|)]+', String),
-            (r'\^.', String.Escape),
-            (r'"', String, '#pop'),
-        ],
-        'string2': [
-            (r'[^(^{})]+', String),
-            (escape_re, String.Escape),
-            (r'[(|)]+', String),
-            (r'\^.', String.Escape),
-            (r'\{', String, '#push'),
-            (r'\}', String, '#pop'),
-        ],
-        'stringFile': [
-            (r'[^(^")]+', Name.Decorator),
-            (escape_re, Name.Decorator),
-            (r'\^.', Name.Decorator),
-            (r'"', Name.Decorator, '#pop'),
-        ],
-        'char': [
-            (escape_re + '"', String.Char, '#pop'),
-            (r'\^."', String.Char, '#pop'),
-            (r'."', String.Char, '#pop'),
-        ],
-        'tag': [
-            (escape_re, Name.Tag),
-            (r'"', Name.Tag, 'tagString'),
-            (r'[^(<>\r\n")]+', Name.Tag),
-            (r'>', Name.Tag, '#pop'),
-        ],
-        'tagString': [
-            (r'[^(^")]+', Name.Tag),
-            (escape_re, Name.Tag),
-            (r'[(|)]+', Name.Tag),
-            (r'\^.', Name.Tag),
-            (r'"', Name.Tag, '#pop'),
-        ],
-        'tuple': [
-            (r'(\d+\.)+', Keyword.Constant),
-            (r'\d+', Keyword.Constant, '#pop'),
-        ],
-        'bin2': [
-            (r'\s+', Number.Hex),
-            (r'([01]\s*){8}', Number.Hex),
-            (r'\}', Number.Hex, '#pop'),
-        ],
-        'commentString1': [
-            (r'[^(^")]+', Comment),
-            (escape_re, Comment),
-            (r'[(|)]+', Comment),
-            (r'\^.', Comment),
-            (r'"', Comment, '#pop'),
-        ],
-        'commentString2': [
-            (r'[^(^{})]+', Comment),
-            (escape_re, Comment),
-            (r'[(|)]+', Comment),
-            (r'\^.', Comment),
-            (r'\{', Comment, '#push'),
-            (r'\}', Comment, '#pop'),
-        ],
-        'commentBlock': [
-            (r'\[', Comment, '#push'),
-            (r'\]', Comment, '#pop'),
-            (r'"', Comment, "commentString1"),
-            (r'\{', Comment, "commentString2"),
-            (r'[^(\[\]"{)]+', Comment),
-        ],
-    }
-
-    def analyse_text(text):
-        """
-        Check if code contains REBOL header and so it probably not R code
-        """
-        if re.match(r'^\s*REBOL\s*\[', text, re.IGNORECASE):
-            # The code starts with REBOL header
-            return 1.0
-        elif re.search(r'\s*REBOL\s*\[', text, re.IGNORECASE):
-            # The code contains REBOL header but also some text before it
-            return 0.5
-
-
-class RedLexer(RegexLexer):
-    """
-    A Red-language lexer.
-    """
-    name = 'Red'
-    aliases = ['red', 'red/system']
-    filenames = ['*.red', '*.reds']
-    mimetypes = ['text/x-red', 'text/x-red-system']
-    url = 'https://www.red-lang.org'
-    version_added = '2.0'
-
-    flags = re.IGNORECASE | re.MULTILINE
-
-    escape_re = r'(?:\^\([0-9a-f]{1,4}\)*)'
-
-    def word_callback(lexer, match):
-        word = match.group()
-
-        if re.match(".*:$", word):
-            yield match.start(), Generic.Subheading, word
-        elif re.match(r'(if|unless|either|any|all|while|until|loop|repeat|'
-                      r'foreach|forall|func|function|does|has|switch|'
-                      r'case|reduce|compose|get|set|print|prin|equal\?|'
-                      r'not-equal\?|strict-equal\?|lesser\?|greater\?|lesser-or-equal\?|'
-                      r'greater-or-equal\?|same\?|not|type\?|stats|'
-                      r'bind|union|replace|charset|routine)$', word):
-            yield match.start(), Name.Builtin, word
-        elif re.match(r'(make|random|reflect|to|form|mold|absolute|add|divide|multiply|negate|'
-                      r'power|remainder|round|subtract|even\?|odd\?|and~|complement|or~|xor~|'
-                      r'append|at|back|change|clear|copy|find|head|head\?|index\?|insert|'
-                      r'length\?|next|pick|poke|remove|reverse|select|sort|skip|swap|tail|tail\?|'
-                      r'take|trim|create|close|delete|modify|open|open\?|query|read|rename|'
-                      r'update|write)$', word):
-            yield match.start(), Name.Function, word
-        elif re.match(r'(yes|on|no|off|true|false|tab|cr|lf|newline|escape|slash|sp|space|null|'
-                      r'none|crlf|dot|null-byte)$', word):
-            yield match.start(), Name.Builtin.Pseudo, word
-        elif re.match(r'(#system-global|#include|#enum|#define|#either|#if|#import|#export|'
-                      r'#switch|#default|#get-definition)$', word):
-            yield match.start(), Keyword.Namespace, word
-        elif re.match(r'(system|halt|quit|quit-return|do|load|q|recycle|call|run|ask|parse|'
-                      r'raise-error|return|exit|break|alias|push|pop|probe|\?\?|spec-of|body-of|'
-                      r'quote|forever)$', word):
-            yield match.start(), Name.Exception, word
-        elif re.match(r'(action\?|block\?|char\?|datatype\?|file\?|function\?|get-path\?|zero\?|'
-                      r'get-word\?|integer\?|issue\?|lit-path\?|lit-word\?|logic\?|native\?|'
-                      r'op\?|paren\?|path\?|refinement\?|set-path\?|set-word\?|string\?|unset\?|'
-                      r'any-struct\?|none\?|word\?|any-series\?)$', word):
-            yield match.start(), Keyword, word
-        elif re.match(r'(JNICALL|stdcall|cdecl|infix)$', word):
-            yield match.start(), Keyword.Namespace, word
-        elif re.match("to-.*", word):
-            yield match.start(), Keyword, word
-        elif re.match(r'(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|'
-                      r'<<<|>>>|<<|>>|<|>%)$', word):
-            yield match.start(), Operator, word
-        elif re.match(r".*\!$", word):
-            yield match.start(), Keyword.Type, word
-        elif re.match("'.*", word):
-            yield match.start(), Name.Variable.Instance, word  # lit-word
-        elif re.match("#.*", word):
-            yield match.start(), Name.Label, word  # issue
-        elif re.match("%.*", word):
-            yield match.start(), Name.Decorator, word  # file
-        elif re.match(":.*", word):
-            yield match.start(), Generic.Subheading, word  # get-word
-        else:
-            yield match.start(), Name.Variable, word
-
-    tokens = {
-        'root': [
-            (r'\s+', Text),
-            (r'#"', String.Char, 'char'),
-            (r'#\{[0-9a-f\s]*\}', Number.Hex),
-            (r'2#\{', Number.Hex, 'bin2'),
-            (r'64#\{[0-9a-z+/=\s]*\}', Number.Hex),
-            (r'([0-9a-f]+)(h)((\s)|(?=[\[\]{}"()]))',
-             bygroups(Number.Hex, Name.Variable, Whitespace)),
-            (r'"', String, 'string'),
-            (r'\{', String, 'string2'),
-            (r';#+.*\n', Comment.Special),
-            (r';\*+.*\n', Comment.Preproc),
-            (r';.*\n', Comment),
-            (r'%"', Name.Decorator, 'stringFile'),
-            (r'%[^(^{")\s\[\]]+', Name.Decorator),
-            (r'[+-]?([a-z]{1,3})?\$\d+(\.\d+)?', Number.Float),  # money
-            (r'[+-]?\d+\:\d+(\:\d+)?(\.\d+)?', String.Other),    # time
-            (r'\d+[\-/][0-9a-z]+[\-/]\d+(/\d+:\d+((:\d+)?'
-             r'([\.\d+]?([+-]?\d+:\d+)?)?)?)?', String.Other),   # date
-            (r'\d+(\.\d+)+\.\d+', Keyword.Constant),             # tuple
-            (r'\d+X\d+', Keyword.Constant),                   # pair
-            (r'[+-]?\d+(\'\d+)?([.,]\d*)?E[+-]?\d+', Number.Float),
-            (r'[+-]?\d+(\'\d+)?[.,]\d*', Number.Float),
-            (r'[+-]?\d+(\'\d+)?', Number),
-            (r'[\[\]()]', Generic.Strong),
-            (r'[a-z]+[^(^{"\s:)]*://[^(^{"\s)]*', Name.Decorator),  # url
-            (r'mailto:[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator),  # url
-            (r'[^(^{"@\s)]+@[^(^{"@\s)]+', Name.Decorator),         # email
-            (r'comment\s"', Comment, 'commentString1'),
-            (r'comment\s\{', Comment, 'commentString2'),
-            (r'comment\s\[', Comment, 'commentBlock'),
-            (r'comment\s[^(\s{"\[]+', Comment),
-            (r'/[^(^{^")\s/[\]]*', Name.Attribute),
-            (r'([^(^{^")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback),
-            (r'<[\w:.-]*>', Name.Tag),
-            (r'<[^(<>\s")]+', Name.Tag, 'tag'),
-            (r'([^(^{")\s]+)', Text),
-        ],
-        'string': [
-            (r'[^(^")]+', String),
-            (escape_re, String.Escape),
-            (r'[(|)]+', String),
-            (r'\^.', String.Escape),
-            (r'"', String, '#pop'),
-        ],
-        'string2': [
-            (r'[^(^{})]+', String),
-            (escape_re, String.Escape),
-            (r'[(|)]+', String),
-            (r'\^.', String.Escape),
-            (r'\{', String, '#push'),
-            (r'\}', String, '#pop'),
-        ],
-        'stringFile': [
-            (r'[^(^")]+', Name.Decorator),
-            (escape_re, Name.Decorator),
-            (r'\^.', Name.Decorator),
-            (r'"', Name.Decorator, '#pop'),
-        ],
-        'char': [
-            (escape_re + '"', String.Char, '#pop'),
-            (r'\^."', String.Char, '#pop'),
-            (r'."', String.Char, '#pop'),
-        ],
-        'tag': [
-            (escape_re, Name.Tag),
-            (r'"', Name.Tag, 'tagString'),
-            (r'[^(<>\r\n")]+', Name.Tag),
-            (r'>', Name.Tag, '#pop'),
-        ],
-        'tagString': [
-            (r'[^(^")]+', Name.Tag),
-            (escape_re, Name.Tag),
-            (r'[(|)]+', Name.Tag),
-            (r'\^.', Name.Tag),
-            (r'"', Name.Tag, '#pop'),
-        ],
-        'tuple': [
-            (r'(\d+\.)+', Keyword.Constant),
-            (r'\d+', Keyword.Constant, '#pop'),
-        ],
-        'bin2': [
-            (r'\s+', Number.Hex),
-            (r'([01]\s*){8}', Number.Hex),
-            (r'\}', Number.Hex, '#pop'),
-        ],
-        'commentString1': [
-            (r'[^(^")]+', Comment),
-            (escape_re, Comment),
-            (r'[(|)]+', Comment),
-            (r'\^.', Comment),
-            (r'"', Comment, '#pop'),
-        ],
-        'commentString2': [
-            (r'[^(^{})]+', Comment),
-            (escape_re, Comment),
-            (r'[(|)]+', Comment),
-            (r'\^.', Comment),
-            (r'\{', Comment, '#push'),
-            (r'\}', Comment, '#pop'),
-        ],
-        'commentBlock': [
-            (r'\[', Comment, '#push'),
-            (r'\]', Comment, '#pop'),
-            (r'"', Comment, "commentString1"),
-            (r'\{', Comment, "commentString2"),
-            (r'[^(\[\]"{)]+', Comment),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/rego.py b/voxvera/vendor/pygments/lexers/rego.py
deleted file mode 100644
index 6f2e3e9..0000000
--- a/voxvera/vendor/pygments/lexers/rego.py
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-    pygments.lexers.rego
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the Rego policy languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, words
-from pygments.token import Comment, Operator, Keyword, Name, String, Number, Punctuation, Whitespace
-
-class RegoLexer(RegexLexer):
-    """
-    For Rego source.
-    """
-    name = 'Rego'
-    url = 'https://www.openpolicyagent.org/docs/latest/policy-language/'
-    filenames = ['*.rego']
-    aliases = ['rego']
-    mimetypes = ['text/x-rego']
-    version_added = '2.19'
-
-    reserved_words = (
-        'as', 'contains', 'data', 'default', 'else', 'every', 'false',
-        'if', 'in', 'import', 'package', 'not', 'null',
-        'some', 'true', 'with'
-    )
-
-    builtins = (
-        # https://www.openpolicyagent.org/docs/latest/philosophy/#the-opa-document-model
-        'data',  # Global variable for accessing base and virtual documents
-        'input', # Represents synchronously pushed base documents
-    )
-
-    tokens = {
-        'root': [
-            (r'\n', Whitespace),
-            (r'\s+', Whitespace),
-            (r'#.*?$', Comment.Single),
-            (words(reserved_words, suffix=r'\b'), Keyword),
-            (words(builtins, suffix=r'\b'), Name.Builtin),
-            (r'[a-zA-Z_][a-zA-Z0-9_]*', Name),
-            (r'"(\\\\|\\"|[^"])*"', String.Double),
-            (r'`[^`]*`', String.Backtick),
-            (r'-?\d+(\.\d+)?', Number),
-            (r'(==|!=|<=|>=|:=)', Operator),  # Compound operators
-            (r'[=<>+\-*/%&|]', Operator),     # Single-character operators
-            (r'[\[\]{}(),.:;]', Punctuation),
-        ]
-    }
-
-__all__ = ['RegoLexer']
-
-
-
diff --git a/voxvera/vendor/pygments/lexers/resource.py b/voxvera/vendor/pygments/lexers/resource.py
deleted file mode 100644
index 9593c21..0000000
--- a/voxvera/vendor/pygments/lexers/resource.py
+++ /dev/null
@@ -1,83 +0,0 @@
-"""
-    pygments.lexers.resource
-    ~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for resource definition files.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, bygroups, words
-from pygments.token import Comment, String, Number, Operator, Text, \
-    Keyword, Name
-
-__all__ = ['ResourceLexer']
-
-
-class ResourceLexer(RegexLexer):
-    """Lexer for ICU Resource bundles.
-    """
-    name = 'ResourceBundle'
-    aliases = ['resourcebundle', 'resource']
-    filenames = []
-    url = 'https://unicode-org.github.io/icu/userguide/locale/resources.html'
-    version_added = '2.0'
-
-    _types = (':table', ':array', ':string', ':bin', ':import', ':intvector',
-              ':int', ':alias')
-
-    flags = re.MULTILINE | re.IGNORECASE
-    tokens = {
-        'root': [
-            (r'//.*?$', Comment),
-            (r'"', String, 'string'),
-            (r'-?\d+', Number.Integer),
-            (r'[,{}]', Operator),
-            (r'([^\s{{:]+)(\s*)({}?)'.format('|'.join(_types)),
-             bygroups(Name, Text, Keyword)),
-            (r'\s+', Text),
-            (words(_types), Keyword),
-        ],
-        'string': [
-            (r'(\\x[0-9a-f]{2}|\\u[0-9a-f]{4}|\\U00[0-9a-f]{6}|'
-             r'\\[0-7]{1,3}|\\c.|\\[abtnvfre\'"?\\]|\\\{|[^"{\\])+', String),
-            (r'\{', String.Escape, 'msgname'),
-            (r'"', String, '#pop')
-        ],
-        'msgname': [
-            (r'([^{},]+)(\s*)', bygroups(Name, String.Escape), ('#pop', 'message'))
-        ],
-        'message': [
-            (r'\{', String.Escape, 'msgname'),
-            (r'\}', String.Escape, '#pop'),
-            (r'(,)(\s*)([a-z]+)(\s*\})',
-             bygroups(Operator, String.Escape, Keyword, String.Escape), '#pop'),
-            (r'(,)(\s*)([a-z]+)(\s*)(,)(\s*)(offset)(\s*)(:)(\s*)(-?\d+)(\s*)',
-             bygroups(Operator, String.Escape, Keyword, String.Escape, Operator,
-                      String.Escape, Operator.Word, String.Escape, Operator,
-                      String.Escape, Number.Integer, String.Escape), 'choice'),
-            (r'(,)(\s*)([a-z]+)(\s*)(,)(\s*)',
-             bygroups(Operator, String.Escape, Keyword, String.Escape, Operator,
-                      String.Escape), 'choice'),
-            (r'\s+', String.Escape)
-        ],
-        'choice': [
-            (r'(=|<|>|<=|>=|!=)(-?\d+)(\s*\{)',
-             bygroups(Operator, Number.Integer, String.Escape), 'message'),
-            (r'([a-z]+)(\s*\{)', bygroups(Keyword.Type, String.Escape), 'str'),
-            (r'\}', String.Escape, ('#pop', '#pop')),
-            (r'\s+', String.Escape)
-        ],
-        'str': [
-            (r'\}', String.Escape, '#pop'),
-            (r'\{', String.Escape, 'msgname'),
-            (r'[^{}]+', String)
-        ]
-    }
-
-    def analyse_text(text):
-        if text.startswith('root:table'):
-            return 1.0
diff --git a/voxvera/vendor/pygments/lexers/ride.py b/voxvera/vendor/pygments/lexers/ride.py
deleted file mode 100644
index 4d60c29..0000000
--- a/voxvera/vendor/pygments/lexers/ride.py
+++ /dev/null
@@ -1,138 +0,0 @@
-"""
-    pygments.lexers.ride
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for the Ride programming language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, words, include
-from pygments.token import Comment, Keyword, Name, Number, Punctuation, \
-    String, Text
-
-__all__ = ['RideLexer']
-
-
-class RideLexer(RegexLexer):
-    """
-    For Ride source code.
-    """
-
-    name = 'Ride'
-    aliases = ['ride']
-    filenames = ['*.ride']
-    mimetypes = ['text/x-ride']
-    url = 'https://docs.waves.tech/en/ride'
-    version_added = '2.6'
-
-    validName = r'[a-zA-Z_][a-zA-Z0-9_\']*'
-
-    builtinOps = (
-        '||', '|', '>=', '>', '==', '!',
-        '=', '<=', '<', '::', ':+', ':', '!=', '/',
-        '.', '=>', '-', '+', '*', '&&', '%', '++',
-    )
-
-    globalVariablesName = (
-        'NOALG', 'MD5', 'SHA1', 'SHA224', 'SHA256', 'SHA384', 'SHA512',
-        'SHA3224', 'SHA3256', 'SHA3384', 'SHA3512', 'nil', 'this', 'unit',
-        'height', 'lastBlock', 'Buy', 'Sell', 'CEILING', 'FLOOR', 'DOWN',
-        'HALFDOWN', 'HALFEVEN', 'HALFUP', 'UP',
-    )
-
-    typesName = (
-        'Unit', 'Int', 'Boolean', 'ByteVector', 'String', 'Address', 'Alias',
-        'Transfer', 'AssetPair', 'DataEntry', 'Order', 'Transaction',
-        'GenesisTransaction', 'PaymentTransaction', 'ReissueTransaction',
-        'BurnTransaction', 'MassTransferTransaction', 'ExchangeTransaction',
-        'TransferTransaction', 'SetAssetScriptTransaction',
-        'InvokeScriptTransaction', 'IssueTransaction', 'LeaseTransaction',
-        'LeaseCancelTransaction', 'CreateAliasTransaction',
-        'SetScriptTransaction', 'SponsorFeeTransaction', 'DataTransaction',
-        'WriteSet', 'AttachedPayment', 'ScriptTransfer', 'TransferSet',
-        'ScriptResult', 'Invocation', 'Asset', 'BlockInfo', 'Issue', 'Reissue',
-        'Burn', 'NoAlg', 'Md5', 'Sha1', 'Sha224', 'Sha256', 'Sha384', 'Sha512',
-        'Sha3224', 'Sha3256', 'Sha3384', 'Sha3512', 'BinaryEntry',
-        'BooleanEntry', 'IntegerEntry', 'StringEntry', 'List', 'Ceiling',
-        'Down', 'Floor', 'HalfDown', 'HalfEven', 'HalfUp', 'Up',
-    )
-
-    functionsName = (
-        'fraction', 'size', 'toBytes', 'take', 'drop', 'takeRight', 'dropRight',
-        'toString', 'isDefined', 'extract', 'throw', 'getElement', 'value',
-        'cons', 'toUtf8String', 'toInt', 'indexOf', 'lastIndexOf', 'split',
-        'parseInt', 'parseIntValue', 'keccak256', 'blake2b256', 'sha256',
-        'sigVerify', 'toBase58String', 'fromBase58String', 'toBase64String',
-        'fromBase64String', 'transactionById', 'transactionHeightById',
-        'getInteger', 'getBoolean', 'getBinary', 'getString',
-        'addressFromPublicKey', 'addressFromString', 'addressFromRecipient',
-        'assetBalance', 'wavesBalance', 'getIntegerValue', 'getBooleanValue',
-        'getBinaryValue', 'getStringValue', 'addressFromStringValue',
-        'assetInfo', 'rsaVerify', 'checkMerkleProof', 'median',
-        'valueOrElse', 'valueOrErrorMessage', 'contains', 'log', 'pow',
-        'toBase16String', 'fromBase16String', 'blockInfoByHeight',
-        'transferTransactionById',
-    )
-
-    reservedWords = words((
-        'match', 'case', 'else', 'func', 'if',
-        'let', 'then', '@Callable', '@Verifier',
-    ), suffix=r'\b')
-
-    tokens = {
-        'root': [
-            # Comments
-            (r'#.*', Comment.Single),
-            # Whitespace
-            (r'\s+', Text),
-            # Strings
-            (r'"', String, 'doublequote'),
-            (r'utf8\'', String, 'utf8quote'),
-            (r'base(58|64|16)\'', String, 'singlequote'),
-            # Keywords
-            (reservedWords, Keyword.Reserved),
-            (r'\{-#.*?#-\}', Keyword.Reserved),
-            (r'FOLD<\d+>', Keyword.Reserved),
-            # Types
-            (words(typesName), Keyword.Type),
-            # Main
-            # (specialName, Keyword.Reserved),
-            # Prefix Operators
-            (words(builtinOps, prefix=r'\(', suffix=r'\)'), Name.Function),
-            # Infix Operators
-            (words(builtinOps), Name.Function),
-            (words(globalVariablesName), Name.Function),
-            (words(functionsName), Name.Function),
-            # Numbers
-            include('numbers'),
-            # Variable Names
-            (validName, Name.Variable),
-            # Parens
-            (r'[,()\[\]{}]', Punctuation),
-        ],
-
-        'doublequote': [
-            (r'\\u[0-9a-fA-F]{4}', String.Escape),
-            (r'\\[nrfvb\\"]', String.Escape),
-            (r'[^"]', String),
-            (r'"', String, '#pop'),
-        ],
-
-        'utf8quote': [
-            (r'\\u[0-9a-fA-F]{4}', String.Escape),
-            (r'\\[nrfvb\\\']', String.Escape),
-            (r'[^\']', String),
-            (r'\'', String, '#pop'),
-        ],
-
-        'singlequote': [
-            (r'[^\']', String),
-            (r'\'', String, '#pop'),
-        ],
-
-        'numbers': [
-            (r'_?\d+', Number.Integer),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/rita.py b/voxvera/vendor/pygments/lexers/rita.py
deleted file mode 100644
index 536aaff..0000000
--- a/voxvera/vendor/pygments/lexers/rita.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-    pygments.lexers.rita
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for RITA language
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer
-from pygments.token import Comment, Operator, Keyword, Name, Literal, \
-    Punctuation, Whitespace
-
-__all__ = ['RitaLexer']
-
-
-class RitaLexer(RegexLexer):
-    """
-    Lexer for RITA.
-    """
-    name = 'Rita'
-    url = 'https://github.com/zaibacu/rita-dsl'
-    filenames = ['*.rita']
-    aliases = ['rita']
-    mimetypes = ['text/rita']
-    version_added = '2.11'
-
-    tokens = {
-        'root': [
-            (r'\n', Whitespace),
-            (r'\s+', Whitespace),
-            (r'#(.*?)\n', Comment.Single),
-            (r'@(.*?)\n', Operator),  # Yes, whole line as an operator
-            (r'"(\w|\d|\s|(\\")|[\'_\-./,\?\!])+?"', Literal),
-            (r'\'(\w|\d|\s|(\\\')|["_\-./,\?\!])+?\'', Literal),
-            (r'([A-Z_]+)', Keyword),
-            (r'([a-z0-9_]+)', Name),
-            (r'((->)|[!?+*|=])', Operator),
-            (r'[\(\),\{\}]', Punctuation)
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/rnc.py b/voxvera/vendor/pygments/lexers/rnc.py
deleted file mode 100644
index b7a06bb..0000000
--- a/voxvera/vendor/pygments/lexers/rnc.py
+++ /dev/null
@@ -1,66 +0,0 @@
-"""
-    pygments.lexers.rnc
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexer for Relax-NG Compact syntax
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Punctuation
-
-__all__ = ['RNCCompactLexer']
-
-
-class RNCCompactLexer(RegexLexer):
-    """
-    For RelaxNG-compact syntax.
-    """
-
-    name = 'Relax-NG Compact'
-    url = 'http://relaxng.org'
-    aliases = ['rng-compact', 'rnc']
-    filenames = ['*.rnc']
-    version_added = '2.2'
-
-    tokens = {
-        'root': [
-            (r'namespace\b', Keyword.Namespace),
-            (r'(?:default|datatypes)\b', Keyword.Declaration),
-            (r'##.*$', Comment.Preproc),
-            (r'#.*$', Comment.Single),
-            (r'"[^"]*"', String.Double),
-            # TODO single quoted strings and escape sequences outside of
-            # double-quoted strings
-            (r'(?:element|attribute|mixed)\b', Keyword.Declaration, 'variable'),
-            (r'(text\b|xsd:[^ ]+)', Keyword.Type, 'maybe_xsdattributes'),
-            (r'[,?&*=|~]|>>', Operator),
-            (r'[(){}]', Punctuation),
-            (r'.', Text),
-        ],
-
-        # a variable has been declared using `element` or `attribute`
-        'variable': [
-            (r'[^{]+', Name.Variable),
-            (r'\{', Punctuation, '#pop'),
-        ],
-
-        # after an xsd: declaration there may be attributes
-        'maybe_xsdattributes': [
-            (r'\{', Punctuation, 'xsdattributes'),
-            (r'\}', Punctuation, '#pop'),
-            (r'.', Text),
-        ],
-
-        # attributes take the form { key1 = value1 key2 = value2 ... }
-        'xsdattributes': [
-            (r'[^ =}]', Name.Attribute),
-            (r'=', Operator),
-            (r'"[^"]*"', String.Double),
-            (r'\}', Punctuation, '#pop'),
-            (r'.', Text),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/roboconf.py b/voxvera/vendor/pygments/lexers/roboconf.py
deleted file mode 100644
index 31adba9..0000000
--- a/voxvera/vendor/pygments/lexers/roboconf.py
+++ /dev/null
@@ -1,81 +0,0 @@
-"""
-    pygments.lexers.roboconf
-    ~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Roboconf DSL.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, words, re
-from pygments.token import Text, Operator, Keyword, Name, Comment
-
-__all__ = ['RoboconfGraphLexer', 'RoboconfInstancesLexer']
-
-
-class RoboconfGraphLexer(RegexLexer):
-    """
-    Lexer for Roboconf graph files.
-    """
-    name = 'Roboconf Graph'
-    aliases = ['roboconf-graph']
-    filenames = ['*.graph']
-    url = 'https://roboconf.github.io/en/user-guide/graph-definition.html'
-    version_added = '2.1'
-
-    flags = re.IGNORECASE | re.MULTILINE
-    tokens = {
-        'root': [
-            # Skip white spaces
-            (r'\s+', Text),
-
-            # There is one operator
-            (r'=', Operator),
-
-            # Keywords
-            (words(('facet', 'import'), suffix=r'\s*\b', prefix=r'\b'), Keyword),
-            (words((
-                'installer', 'extends', 'exports', 'imports', 'facets',
-                'children'), suffix=r'\s*:?', prefix=r'\b'), Name),
-
-            # Comments
-            (r'#.*\n', Comment),
-
-            # Default
-            (r'[^#]', Text),
-            (r'.*\n', Text)
-        ]
-    }
-
-
-class RoboconfInstancesLexer(RegexLexer):
-    """
-    Lexer for Roboconf instances files.
-    """
-    name = 'Roboconf Instances'
-    aliases = ['roboconf-instances']
-    filenames = ['*.instances']
-    url = 'https://roboconf.github.io'
-    version_added = '2.1'
-
-    flags = re.IGNORECASE | re.MULTILINE
-    tokens = {
-        'root': [
-
-            # Skip white spaces
-            (r'\s+', Text),
-
-            # Keywords
-            (words(('instance of', 'import'), suffix=r'\s*\b', prefix=r'\b'), Keyword),
-            (words(('name', 'count'), suffix=r's*:?', prefix=r'\b'), Name),
-            (r'\s*[\w.-]+\s*:', Name),
-
-            # Comments
-            (r'#.*\n', Comment),
-
-            # Default
-            (r'[^#]', Text),
-            (r'.*\n', Text)
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/robotframework.py b/voxvera/vendor/pygments/lexers/robotframework.py
deleted file mode 100644
index f92d567..0000000
--- a/voxvera/vendor/pygments/lexers/robotframework.py
+++ /dev/null
@@ -1,551 +0,0 @@
-"""
-    pygments.lexers.robotframework
-    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for Robot Framework.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-#  Copyright 2012 Nokia Siemens Networks Oyj
-#
-#  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.
-
-import re
-
-from pygments.lexer import Lexer
-from pygments.token import Token
-
-__all__ = ['RobotFrameworkLexer']
-
-
-HEADING = Token.Generic.Heading
-SETTING = Token.Keyword.Namespace
-IMPORT = Token.Name.Namespace
-TC_KW_NAME = Token.Generic.Subheading
-KEYWORD = Token.Name.Function
-ARGUMENT = Token.String
-VARIABLE = Token.Name.Variable
-COMMENT = Token.Comment
-SEPARATOR = Token.Punctuation
-SYNTAX = Token.Punctuation
-GHERKIN = Token.Generic.Emph
-ERROR = Token.Error
-
-
-def normalize(string, remove=''):
-    string = string.lower()
-    for char in remove + ' ':
-        if char in string:
-            string = string.replace(char, '')
-    return string
-
-
-class RobotFrameworkLexer(Lexer):
-    """
-    For Robot Framework test data.
-
-    Supports both space and pipe separated plain text formats.
-    """
-    name = 'RobotFramework'
-    url = 'http://robotframework.org'
-    aliases = ['robotframework']
-    filenames = ['*.robot', '*.resource']
-    mimetypes = ['text/x-robotframework']
-    version_added = '1.6'
-
-    def __init__(self, **options):
-        options['tabsize'] = 2
-        options['encoding'] = 'UTF-8'
-        Lexer.__init__(self, **options)
-
-    def get_tokens_unprocessed(self, text):
-        row_tokenizer = RowTokenizer()
-        var_tokenizer = VariableTokenizer()
-        index = 0
-        for row in text.splitlines():
-            for value, token in row_tokenizer.tokenize(row):
-                for value, token in var_tokenizer.tokenize(value, token):
-                    if value:
-                        yield index, token, str(value)
-                        index += len(value)
-
-
-class VariableTokenizer:
-
-    def tokenize(self, string, token):
-        var = VariableSplitter(string, identifiers='$@%&')
-        if var.start < 0 or token in (COMMENT, ERROR):
-            yield string, token
-            return
-        for value, token in self._tokenize(var, string, token):
-            if value:
-                yield value, token
-
-    def _tokenize(self, var, string, orig_token):
-        before = string[:var.start]
-        yield before, orig_token
-        yield var.identifier + '{', SYNTAX
-        yield from self.tokenize(var.base, VARIABLE)
-        yield '}', SYNTAX
-        if var.index is not None:
-            yield '[', SYNTAX
-            yield from self.tokenize(var.index, VARIABLE)
-            yield ']', SYNTAX
-        yield from self.tokenize(string[var.end:], orig_token)
-
-
-class RowTokenizer:
-
-    def __init__(self):
-        self._table = UnknownTable()
-        self._splitter = RowSplitter()
-        testcases = TestCaseTable()
-        settings = SettingTable(testcases.set_default_template)
-        variables = VariableTable()
-        keywords = KeywordTable()
-        self._tables = {'settings': settings, 'setting': settings,
-                        'metadata': settings,
-                        'variables': variables, 'variable': variables,
-                        'testcases': testcases, 'testcase': testcases,
-                        'tasks': testcases, 'task': testcases,
-                        'keywords': keywords, 'keyword': keywords,
-                        'userkeywords': keywords, 'userkeyword': keywords}
-
-    def tokenize(self, row):
-        commented = False
-        heading = False
-        for index, value in enumerate(self._splitter.split(row)):
-            # First value, and every second after that, is a separator.
-            index, separator = divmod(index-1, 2)
-            if value.startswith('#'):
-                commented = True
-            elif index == 0 and value.startswith('*'):
-                self._table = self._start_table(value)
-                heading = True
-            yield from self._tokenize(value, index, commented,
-                                      separator, heading)
-        self._table.end_row()
-
-    def _start_table(self, header):
-        name = normalize(header, remove='*')
-        return self._tables.get(name, UnknownTable())
-
-    def _tokenize(self, value, index, commented, separator, heading):
-        if commented:
-            yield value, COMMENT
-        elif separator:
-            yield value, SEPARATOR
-        elif heading:
-            yield value, HEADING
-        else:
-            yield from self._table.tokenize(value, index)
-
-
-class RowSplitter:
-    _space_splitter = re.compile('( {2,})')
-    _pipe_splitter = re.compile(r'((?:^| +)\|(?: +|$))')
-
-    def split(self, row):
-        splitter = (row.startswith('| ') and self._split_from_pipes
-                    or self._split_from_spaces)
-        yield from splitter(row)
-        yield '\n'
-
-    def _split_from_spaces(self, row):
-        yield ''  # Start with (pseudo)separator similarly as with pipes
-        yield from self._space_splitter.split(row)
-
-    def _split_from_pipes(self, row):
-        _, separator, rest = self._pipe_splitter.split(row, 1)
-        yield separator
-        while self._pipe_splitter.search(rest):
-            cell, separator, rest = self._pipe_splitter.split(rest, 1)
-            yield cell
-            yield separator
-        yield rest
-
-
-class Tokenizer:
-    _tokens = None
-
-    def __init__(self):
-        self._index = 0
-
-    def tokenize(self, value):
-        values_and_tokens = self._tokenize(value, self._index)
-        self._index += 1
-        if isinstance(values_and_tokens, type(Token)):
-            values_and_tokens = [(value, values_and_tokens)]
-        return values_and_tokens
-
-    def _tokenize(self, value, index):
-        index = min(index, len(self._tokens) - 1)
-        return self._tokens[index]
-
-    def _is_assign(self, value):
-        if value.endswith('='):
-            value = value[:-1].strip()
-        var = VariableSplitter(value, identifiers='$@&')
-        return var.start == 0 and var.end == len(value)
-
-
-class Comment(Tokenizer):
-    _tokens = (COMMENT,)
-
-
-class Setting(Tokenizer):
-    _tokens = (SETTING, ARGUMENT)
-    _keyword_settings = ('suitesetup', 'suiteprecondition', 'suiteteardown',
-                         'suitepostcondition', 'testsetup', 'tasksetup', 'testprecondition',
-                         'testteardown','taskteardown', 'testpostcondition', 'testtemplate', 'tasktemplate')
-    _import_settings = ('library', 'resource', 'variables')
-    _other_settings = ('documentation', 'metadata', 'forcetags', 'defaulttags',
-                       'testtimeout','tasktimeout')
-    _custom_tokenizer = None
-
-    def __init__(self, template_setter=None):
-        Tokenizer.__init__(self)
-        self._template_setter = template_setter
-
-    def _tokenize(self, value, index):
-        if index == 1 and self._template_setter:
-            self._template_setter(value)
-        if index == 0:
-            normalized = normalize(value)
-            if normalized in self._keyword_settings:
-                self._custom_tokenizer = KeywordCall(support_assign=False)
-            elif normalized in self._import_settings:
-                self._custom_tokenizer = ImportSetting()
-            elif normalized not in self._other_settings:
-                return ERROR
-        elif self._custom_tokenizer:
-            return self._custom_tokenizer.tokenize(value)
-        return Tokenizer._tokenize(self, value, index)
-
-
-class ImportSetting(Tokenizer):
-    _tokens = (IMPORT, ARGUMENT)
-
-
-class TestCaseSetting(Setting):
-    _keyword_settings = ('setup', 'precondition', 'teardown', 'postcondition',
-                         'template')
-    _import_settings = ()
-    _other_settings = ('documentation', 'tags', 'timeout')
-
-    def _tokenize(self, value, index):
-        if index == 0:
-            type = Setting._tokenize(self, value[1:-1], index)
-            return [('[', SYNTAX), (value[1:-1], type), (']', SYNTAX)]
-        return Setting._tokenize(self, value, index)
-
-
-class KeywordSetting(TestCaseSetting):
-    _keyword_settings = ('teardown',)
-    _other_settings = ('documentation', 'arguments', 'return', 'timeout', 'tags')
-
-
-class Variable(Tokenizer):
-    _tokens = (SYNTAX, ARGUMENT)
-
-    def _tokenize(self, value, index):
-        if index == 0 and not self._is_assign(value):
-            return ERROR
-        return Tokenizer._tokenize(self, value, index)
-
-
-class KeywordCall(Tokenizer):
-    _tokens = (KEYWORD, ARGUMENT)
-
-    def __init__(self, support_assign=True):
-        Tokenizer.__init__(self)
-        self._keyword_found = not support_assign
-        self._assigns = 0
-
-    def _tokenize(self, value, index):
-        if not self._keyword_found and self._is_assign(value):
-            self._assigns += 1
-            return SYNTAX  # VariableTokenizer tokenizes this later.
-        if self._keyword_found:
-            return Tokenizer._tokenize(self, value, index - self._assigns)
-        self._keyword_found = True
-        return GherkinTokenizer().tokenize(value, KEYWORD)
-
-
-class GherkinTokenizer:
-    _gherkin_prefix = re.compile('^(Given|When|Then|And|But) ', re.IGNORECASE)
-
-    def tokenize(self, value, token):
-        match = self._gherkin_prefix.match(value)
-        if not match:
-            return [(value, token)]
-        end = match.end()
-        return [(value[:end], GHERKIN), (value[end:], token)]
-
-
-class TemplatedKeywordCall(Tokenizer):
-    _tokens = (ARGUMENT,)
-
-
-class ForLoop(Tokenizer):
-
-    def __init__(self):
-        Tokenizer.__init__(self)
-        self._in_arguments = False
-
-    def _tokenize(self, value, index):
-        token = self._in_arguments and ARGUMENT or SYNTAX
-        if value.upper() in ('IN', 'IN RANGE'):
-            self._in_arguments = True
-        return token
-
-
-class _Table:
-    _tokenizer_class = None
-
-    def __init__(self, prev_tokenizer=None):
-        self._tokenizer = self._tokenizer_class()
-        self._prev_tokenizer = prev_tokenizer
-        self._prev_values_on_row = []
-
-    def tokenize(self, value, index):
-        if self._continues(value, index):
-            self._tokenizer = self._prev_tokenizer
-            yield value, SYNTAX
-        else:
-            yield from self._tokenize(value, index)
-        self._prev_values_on_row.append(value)
-
-    def _continues(self, value, index):
-        return value == '...' and all(self._is_empty(t)
-                                      for t in self._prev_values_on_row)
-
-    def _is_empty(self, value):
-        return value in ('', '\\')
-
-    def _tokenize(self, value, index):
-        return self._tokenizer.tokenize(value)
-
-    def end_row(self):
-        self.__init__(prev_tokenizer=self._tokenizer)
-
-
-class UnknownTable(_Table):
-    _tokenizer_class = Comment
-
-    def _continues(self, value, index):
-        return False
-
-
-class VariableTable(_Table):
-    _tokenizer_class = Variable
-
-
-class SettingTable(_Table):
-    _tokenizer_class = Setting
-
-    def __init__(self, template_setter, prev_tokenizer=None):
-        _Table.__init__(self, prev_tokenizer)
-        self._template_setter = template_setter
-
-    def _tokenize(self, value, index):
-        if index == 0 and normalize(value) == 'testtemplate':
-            self._tokenizer = Setting(self._template_setter)
-        return _Table._tokenize(self, value, index)
-
-    def end_row(self):
-        self.__init__(self._template_setter, prev_tokenizer=self._tokenizer)
-
-
-class TestCaseTable(_Table):
-    _setting_class = TestCaseSetting
-    _test_template = None
-    _default_template = None
-
-    @property
-    def _tokenizer_class(self):
-        if self._test_template or (self._default_template and
-                                   self._test_template is not False):
-            return TemplatedKeywordCall
-        return KeywordCall
-
-    def _continues(self, value, index):
-        return index > 0 and _Table._continues(self, value, index)
-
-    def _tokenize(self, value, index):
-        if index == 0:
-            if value:
-                self._test_template = None
-            return GherkinTokenizer().tokenize(value, TC_KW_NAME)
-        if index == 1 and self._is_setting(value):
-            if self._is_template(value):
-                self._test_template = False
-                self._tokenizer = self._setting_class(self.set_test_template)
-            else:
-                self._tokenizer = self._setting_class()
-        if index == 1 and self._is_for_loop(value):
-            self._tokenizer = ForLoop()
-        if index == 1 and self._is_empty(value):
-            return [(value, SYNTAX)]
-        return _Table._tokenize(self, value, index)
-
-    def _is_setting(self, value):
-        return value.startswith('[') and value.endswith(']')
-
-    def _is_template(self, value):
-        return normalize(value) == '[template]'
-
-    def _is_for_loop(self, value):
-        return value.startswith(':') and normalize(value, remove=':') == 'for'
-
-    def set_test_template(self, template):
-        self._test_template = self._is_template_set(template)
-
-    def set_default_template(self, template):
-        self._default_template = self._is_template_set(template)
-
-    def _is_template_set(self, template):
-        return normalize(template) not in ('', '\\', 'none', '${empty}')
-
-
-class KeywordTable(TestCaseTable):
-    _tokenizer_class = KeywordCall
-    _setting_class = KeywordSetting
-
-    def _is_template(self, value):
-        return False
-
-
-# Following code copied directly from Robot Framework 2.7.5.
-
-class VariableSplitter:
-
-    def __init__(self, string, identifiers):
-        self.identifier = None
-        self.base = None
-        self.index = None
-        self.start = -1
-        self.end = -1
-        self._identifiers = identifiers
-        self._may_have_internal_variables = False
-        try:
-            self._split(string)
-        except ValueError:
-            pass
-        else:
-            self._finalize()
-
-    def get_replaced_base(self, variables):
-        if self._may_have_internal_variables:
-            return variables.replace_string(self.base)
-        return self.base
-
-    def _finalize(self):
-        self.identifier = self._variable_chars[0]
-        self.base = ''.join(self._variable_chars[2:-1])
-        self.end = self.start + len(self._variable_chars)
-        if self._has_list_or_dict_variable_index():
-            self.index = ''.join(self._list_and_dict_variable_index_chars[1:-1])
-            self.end += len(self._list_and_dict_variable_index_chars)
-
-    def _has_list_or_dict_variable_index(self):
-        return self._list_and_dict_variable_index_chars\
-        and self._list_and_dict_variable_index_chars[-1] == ']'
-
-    def _split(self, string):
-        start_index, max_index = self._find_variable(string)
-        self.start = start_index
-        self._open_curly = 1
-        self._state = self._variable_state
-        self._variable_chars = [string[start_index], '{']
-        self._list_and_dict_variable_index_chars = []
-        self._string = string
-        start_index += 2
-        for index, char in enumerate(string[start_index:]):
-            index += start_index  # Giving start to enumerate only in Py 2.6+
-            try:
-                self._state(char, index)
-            except StopIteration:
-                return
-            if index  == max_index and not self._scanning_list_variable_index():
-                return
-
-    def _scanning_list_variable_index(self):
-        return self._state in [self._waiting_list_variable_index_state,
-                               self._list_variable_index_state]
-
-    def _find_variable(self, string):
-        max_end_index = string.rfind('}')
-        if max_end_index == -1:
-            raise ValueError('No variable end found')
-        if self._is_escaped(string, max_end_index):
-            return self._find_variable(string[:max_end_index])
-        start_index = self._find_start_index(string, 1, max_end_index)
-        if start_index == -1:
-            raise ValueError('No variable start found')
-        return start_index, max_end_index
-
-    def _find_start_index(self, string, start, end):
-        index = string.find('{', start, end) - 1
-        if index < 0:
-            return -1
-        if self._start_index_is_ok(string, index):
-            return index
-        return self._find_start_index(string, index+2, end)
-
-    def _start_index_is_ok(self, string, index):
-        return string[index] in self._identifiers\
-        and not self._is_escaped(string, index)
-
-    def _is_escaped(self, string, index):
-        escaped = False
-        while index > 0 and string[index-1] == '\\':
-            index -= 1
-            escaped = not escaped
-        return escaped
-
-    def _variable_state(self, char, index):
-        self._variable_chars.append(char)
-        if char == '}' and not self._is_escaped(self._string, index):
-            self._open_curly -= 1
-            if self._open_curly == 0:
-                if not self._is_list_or_dict_variable():
-                    raise StopIteration
-                self._state = self._waiting_list_variable_index_state
-        elif char in self._identifiers:
-            self._state = self._internal_variable_start_state
-
-    def _is_list_or_dict_variable(self):
-        return self._variable_chars[0] in ('@','&')
-
-    def _internal_variable_start_state(self, char, index):
-        self._state = self._variable_state
-        if char == '{':
-            self._variable_chars.append(char)
-            self._open_curly += 1
-            self._may_have_internal_variables = True
-        else:
-            self._variable_state(char, index)
-
-    def _waiting_list_variable_index_state(self, char, index):
-        if char != '[':
-            raise StopIteration
-        self._list_and_dict_variable_index_chars.append(char)
-        self._state = self._list_variable_index_state
-
-    def _list_variable_index_state(self, char, index):
-        self._list_and_dict_variable_index_chars.append(char)
-        if char == ']':
-            raise StopIteration
diff --git a/voxvera/vendor/pygments/lexers/ruby.py b/voxvera/vendor/pygments/lexers/ruby.py
deleted file mode 100644
index 72aaeb5..0000000
--- a/voxvera/vendor/pygments/lexers/ruby.py
+++ /dev/null
@@ -1,518 +0,0 @@
-"""
-    pygments.lexers.ruby
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Ruby and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import Lexer, RegexLexer, ExtendedRegexLexer, include, \
-    bygroups, default, LexerContext, do_insertions, words, line_re
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Error, Generic, Whitespace
-from pygments.util import shebang_matches
-
-__all__ = ['RubyLexer', 'RubyConsoleLexer', 'FancyLexer']
-
-
-RUBY_OPERATORS = (
-    '*', '**', '-', '+', '-@', '+@', '/', '%', '&', '|', '^', '`', '~',
-    '[]', '[]=', '<<', '>>', '<', '<>', '<=>', '>', '>=', '==', '==='
-)
-
-
-class RubyLexer(ExtendedRegexLexer):
-    """
-    For Ruby source code.
-    """
-
-    name = 'Ruby'
-    url = 'http://www.ruby-lang.org'
-    aliases = ['ruby', 'rb', 'duby']
-    filenames = ['*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec',
-                 '*.rbx', '*.duby', 'Gemfile', 'Vagrantfile']
-    mimetypes = ['text/x-ruby', 'application/x-ruby']
-    version_added = ''
-
-    flags = re.DOTALL | re.MULTILINE
-
-    def heredoc_callback(self, match, ctx):
-        # okay, this is the hardest part of parsing Ruby...
-        # match: 1 = <<[-~]?, 2 = quote? 3 = name 4 = quote? 5 = rest of line
-
-        start = match.start(1)
-        yield start, Operator, match.group(1)        # <<[-~]?
-        yield match.start(2), String.Heredoc, match.group(2)   # quote ", ', `
-        yield match.start(3), String.Delimiter, match.group(3) # heredoc name
-        yield match.start(4), String.Heredoc, match.group(4)   # quote again
-
-        heredocstack = ctx.__dict__.setdefault('heredocstack', [])
-        outermost = not bool(heredocstack)
-        heredocstack.append((match.group(1) in ('<<-', '<<~'), match.group(3)))
-
-        ctx.pos = match.start(5)
-        ctx.end = match.end(5)
-        # this may find other heredocs, so limit the recursion depth
-        if len(heredocstack) < 100:
-            yield from self.get_tokens_unprocessed(context=ctx)
-        else:
-            yield ctx.pos, String.Heredoc, match.group(5)
-        ctx.pos = match.end()
-
-        if outermost:
-            # this is the outer heredoc again, now we can process them all
-            for tolerant, hdname in heredocstack:
-                lines = []
-                for match in line_re.finditer(ctx.text, ctx.pos):
-                    if tolerant:
-                        check = match.group().strip()
-                    else:
-                        check = match.group().rstrip()
-                    if check == hdname:
-                        for amatch in lines:
-                            yield amatch.start(), String.Heredoc, amatch.group()
-                        yield match.start(), String.Delimiter, match.group()
-                        ctx.pos = match.end()
-                        break
-                    else:
-                        lines.append(match)
-                else:
-                    # end of heredoc not found -- error!
-                    for amatch in lines:
-                        yield amatch.start(), Error, amatch.group()
-            ctx.end = len(ctx.text)
-            del heredocstack[:]
-
-    def gen_rubystrings_rules():
-        def intp_regex_callback(self, match, ctx):
-            yield match.start(1), String.Regex, match.group(1)  # begin
-            nctx = LexerContext(match.group(3), 0, ['interpolated-regex'])
-            for i, t, v in self.get_tokens_unprocessed(context=nctx):
-                yield match.start(3)+i, t, v
-            yield match.start(4), String.Regex, match.group(4)  # end[mixounse]*
-            ctx.pos = match.end()
-
-        def intp_string_callback(self, match, ctx):
-            yield match.start(1), String.Other, match.group(1)
-            nctx = LexerContext(match.group(3), 0, ['interpolated-string'])
-            for i, t, v in self.get_tokens_unprocessed(context=nctx):
-                yield match.start(3)+i, t, v
-            yield match.start(4), String.Other, match.group(4)  # end
-            ctx.pos = match.end()
-
-        states = {}
-        states['strings'] = [
-            # easy ones
-            (r'\:@{0,2}[a-zA-Z_]\w*[!?]?', String.Symbol),
-            (words(RUBY_OPERATORS, prefix=r'\:@{0,2}'), String.Symbol),
-            (r":'(\\\\|\\[^\\]|[^'\\])*'", String.Symbol),
-            (r':"', String.Symbol, 'simple-sym'),
-            (r'([a-zA-Z_]\w*)(:)(?!:)',
-             bygroups(String.Symbol, Punctuation)),  # Since Ruby 1.9
-            (r'"', String.Double, 'simple-string-double'),
-            (r"'", String.Single, 'simple-string-single'),
-            (r'(?', '<>', 'ab'):
-            states[name+'-intp-string'] = [
-                (r'\\[\\' + bracecc + ']', String.Other),
-                (lbrace, String.Other, '#push'),
-                (rbrace, String.Other, '#pop'),
-                include('string-intp-escaped'),
-                (r'[\\#' + bracecc + ']', String.Other),
-                (r'[^\\#' + bracecc + ']+', String.Other),
-            ]
-            states['strings'].append((r'%[QWx]?' + lbrace, String.Other,
-                                      name+'-intp-string'))
-            states[name+'-string'] = [
-                (r'\\[\\' + bracecc + ']', String.Other),
-                (lbrace, String.Other, '#push'),
-                (rbrace, String.Other, '#pop'),
-                (r'[\\#' + bracecc + ']', String.Other),
-                (r'[^\\#' + bracecc + ']+', String.Other),
-            ]
-            states['strings'].append((r'%[qsw]' + lbrace, String.Other,
-                                      name+'-string'))
-            states[name+'-regex'] = [
-                (r'\\[\\' + bracecc + ']', String.Regex),
-                (lbrace, String.Regex, '#push'),
-                (rbrace + '[mixounse]*', String.Regex, '#pop'),
-                include('string-intp'),
-                (r'[\\#' + bracecc + ']', String.Regex),
-                (r'[^\\#' + bracecc + ']+', String.Regex),
-            ]
-            states['strings'].append((r'%r' + lbrace, String.Regex,
-                                      name+'-regex'))
-
-        # these must come after %!
-        states['strings'] += [
-            # %r regex
-            (r'(%r([\W_]))((?:\\\2|(?!\2).)*)(\2[mixounse]*)',
-             intp_regex_callback),
-            # regular fancy strings with qsw
-            (r'%[qsw]([\W_])((?:\\\1|(?!\1).)*)\1', String.Other),
-            (r'(%[QWx]([\W_]))((?:\\\2|(?!\2).)*)(\2)',
-             intp_string_callback),
-            # special forms of fancy strings after operators or
-            # in method calls with braces
-            (r'(?<=[-+/*%=<>&!^|~,(])(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)',
-             bygroups(Whitespace, String.Other, None)),
-            # and because of fixed width lookbehinds the whole thing a
-            # second time for line startings...
-            (r'^(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)',
-             bygroups(Whitespace, String.Other, None)),
-            # all regular fancy strings without qsw
-            (r'(%([^a-zA-Z0-9\s]))((?:\\\2|(?!\2).)*)(\2)',
-             intp_string_callback),
-        ]
-
-        return states
-
-    tokens = {
-        'root': [
-            (r'\A#!.+?$', Comment.Hashbang),
-            (r'#.*?$', Comment.Single),
-            (r'=begin\s.*?\n=end.*?$', Comment.Multiline),
-            # keywords
-            (words((
-                'BEGIN', 'END', 'alias', 'begin', 'break', 'case', 'defined?',
-                'do', 'else', 'elsif', 'end', 'ensure', 'for', 'if', 'in', 'next', 'redo',
-                'rescue', 'raise', 'retry', 'return', 'super', 'then', 'undef',
-                'unless', 'until', 'when', 'while', 'yield'), suffix=r'\b'),
-             Keyword),
-            # start of function, class and module names
-            (r'(module)(\s+)([a-zA-Z_]\w*'
-             r'(?:::[a-zA-Z_]\w*)*)',
-             bygroups(Keyword, Whitespace, Name.Namespace)),
-            (r'(def)(\s+)', bygroups(Keyword, Whitespace), 'funcname'),
-            (r'def(?=[*%&^`~+-/\[<>=])', Keyword, 'funcname'),
-            (r'(class)(\s+)', bygroups(Keyword, Whitespace), 'classname'),
-            # special methods
-            (words((
-                'initialize', 'new', 'loop', 'include', 'extend', 'raise', 'attr_reader',
-                'attr_writer', 'attr_accessor', 'attr', 'catch', 'throw', 'private',
-                'module_function', 'public', 'protected', 'true', 'false', 'nil'),
-                suffix=r'\b'),
-             Keyword.Pseudo),
-            (r'(not|and|or)\b', Operator.Word),
-            (words((
-                'autoload', 'block_given', 'const_defined', 'eql', 'equal', 'frozen', 'include',
-                'instance_of', 'is_a', 'iterator', 'kind_of', 'method_defined', 'nil',
-                'private_method_defined', 'protected_method_defined',
-                'public_method_defined', 'respond_to', 'tainted'), suffix=r'\?'),
-             Name.Builtin),
-            (r'(chomp|chop|exit|gsub|sub)!', Name.Builtin),
-            (words((
-                'Array', 'Float', 'Integer', 'String', '__id__', '__send__', 'abort',
-                'ancestors', 'at_exit', 'autoload', 'binding', 'callcc', 'caller',
-                'catch', 'chomp', 'chop', 'class_eval', 'class_variables',
-                'clone', 'const_defined?', 'const_get', 'const_missing', 'const_set',
-                'constants', 'display', 'dup', 'eval', 'exec', 'exit', 'extend', 'fail', 'fork',
-                'format', 'freeze', 'getc', 'gets', 'global_variables', 'gsub',
-                'hash', 'id', 'included_modules', 'inspect', 'instance_eval',
-                'instance_method', 'instance_methods',
-                'instance_variable_get', 'instance_variable_set', 'instance_variables',
-                'lambda', 'load', 'local_variables', 'loop',
-                'method', 'method_missing', 'methods', 'module_eval', 'name',
-                'object_id', 'open', 'p', 'print', 'printf', 'private_class_method',
-                'private_instance_methods',
-                'private_methods', 'proc', 'protected_instance_methods',
-                'protected_methods', 'public_class_method',
-                'public_instance_methods', 'public_methods',
-                'putc', 'puts', 'raise', 'rand', 'readline', 'readlines', 'require',
-                'scan', 'select', 'self', 'send', 'set_trace_func', 'singleton_methods', 'sleep',
-                'split', 'sprintf', 'srand', 'sub', 'syscall', 'system', 'taint',
-                'test', 'throw', 'to_a', 'to_s', 'trace_var', 'trap', 'untaint',
-                'untrace_var', 'warn'), prefix=r'(?~!:])|'
-             r'(?<=(?:\s|;)when\s)|'
-             r'(?<=(?:\s|;)or\s)|'
-             r'(?<=(?:\s|;)and\s)|'
-             r'(?<=\.index\s)|'
-             r'(?<=\.scan\s)|'
-             r'(?<=\.sub\s)|'
-             r'(?<=\.sub!\s)|'
-             r'(?<=\.gsub\s)|'
-             r'(?<=\.gsub!\s)|'
-             r'(?<=\.match\s)|'
-             r'(?<=(?:\s|;)if\s)|'
-             r'(?<=(?:\s|;)elsif\s)|'
-             r'(?<=^when\s)|'
-             r'(?<=^index\s)|'
-             r'(?<=^scan\s)|'
-             r'(?<=^sub\s)|'
-             r'(?<=^gsub\s)|'
-             r'(?<=^sub!\s)|'
-             r'(?<=^gsub!\s)|'
-             r'(?<=^match\s)|'
-             r'(?<=^if\s)|'
-             r'(?<=^elsif\s)'
-             r')(\s*)(/)', bygroups(Text, String.Regex), 'multiline-regex'),
-            # multiline regex (in method calls or subscripts)
-            (r'(?<=\(|,|\[)/', String.Regex, 'multiline-regex'),
-            # multiline regex (this time the funny no whitespace rule)
-            (r'(\s+)(/)(?![\s=])', bygroups(Whitespace, String.Regex),
-             'multiline-regex'),
-            # lex numbers and ignore following regular expressions which
-            # are division operators in fact (grrrr. i hate that. any
-            # better ideas?)
-            # since pygments 0.7 we also eat a "?" operator after numbers
-            # so that the char operator does not work. Chars are not allowed
-            # there so that you can use the ternary operator.
-            # stupid example:
-            #   x>=0?n[x]:""
-            (r'(0_?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?',
-             bygroups(Number.Oct, Whitespace, Operator)),
-            (r'(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*)(\s*)([/?])?',
-             bygroups(Number.Hex, Whitespace, Operator)),
-            (r'(0b[01]+(?:_[01]+)*)(\s*)([/?])?',
-             bygroups(Number.Bin, Whitespace, Operator)),
-            (r'([\d]+(?:_\d+)*)(\s*)([/?])?',
-             bygroups(Number.Integer, Whitespace, Operator)),
-            # Names
-            (r'@@[a-zA-Z_]\w*', Name.Variable.Class),
-            (r'@[a-zA-Z_]\w*', Name.Variable.Instance),
-            (r'\$\w+', Name.Variable.Global),
-            (r'\$[!@&`\'+~=/\\,;.<>_*$?:"^-]', Name.Variable.Global),
-            (r'\$-[0adFiIlpvw]', Name.Variable.Global),
-            (r'::', Operator),
-            include('strings'),
-            # chars
-            (r'\?(\\[MC]-)*'  # modifiers
-             r'(\\([\\abefnrstv#"\']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})|\S)'
-             r'(?!\w)',
-             String.Char),
-            (r'[A-Z]\w+', Name.Constant),
-            # this is needed because ruby attributes can look
-            # like keywords (class) or like this: ` ?!?
-            (words(RUBY_OPERATORS, prefix=r'(\.|::)'),
-             bygroups(Operator, Name.Operator)),
-            (r'(\.|::)([a-zA-Z_]\w*[!?]?|[*%&^`~+\-/\[<>=])',
-             bygroups(Operator, Name)),
-            (r'[a-zA-Z_]\w*[!?]?', Name),
-            (r'(\[|\]|\*\*|<>?|>=|<=|<=>|=~|={3}|'
-             r'!~|&&?|\|\||\.{1,3})', Operator),
-            (r'[-+/*%=<>&!^|~]=?', Operator),
-            (r'[(){};,/?:\\]', Punctuation),
-            (r'\s+', Whitespace)
-        ],
-        'funcname': [
-            (r'\(', Punctuation, 'defexpr'),
-            (r'(?:([a-zA-Z_]\w*)(\.))?'  # optional scope name, like "self."
-             r'('
-                r'[a-zA-Z\u0080-\uffff][a-zA-Z0-9_\u0080-\uffff]*[!?=]?'  # method name
-                r'|!=|!~|=~|\*\*?|[-+!~]@?|[/%&|^]|<=>|<[<=]?|>[>=]?|===?'  # or operator override
-                r'|\[\]=?'  # or element reference/assignment override
-                r'|`'  # or the undocumented backtick override
-             r')',
-             bygroups(Name.Class, Operator, Name.Function), '#pop'),
-            default('#pop')
-        ],
-        'classname': [
-            (r'\(', Punctuation, 'defexpr'),
-            (r'<<', Operator, '#pop'),
-            (r'[A-Z_]\w*', Name.Class, '#pop'),
-            default('#pop')
-        ],
-        'defexpr': [
-            (r'(\))(\.|::)?', bygroups(Punctuation, Operator), '#pop'),
-            (r'\(', Operator, '#push'),
-            include('root')
-        ],
-        'in-intp': [
-            (r'\{', String.Interpol, '#push'),
-            (r'\}', String.Interpol, '#pop'),
-            include('root'),
-        ],
-        'string-intp': [
-            (r'#\{', String.Interpol, 'in-intp'),
-            (r'#@@?[a-zA-Z_]\w*', String.Interpol),
-            (r'#\$[a-zA-Z_]\w*', String.Interpol)
-        ],
-        'string-intp-escaped': [
-            include('string-intp'),
-            (r'\\([\\abefnrstv#"\']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})',
-             String.Escape)
-        ],
-        'interpolated-regex': [
-            include('string-intp'),
-            (r'[\\#]', String.Regex),
-            (r'[^\\#]+', String.Regex),
-        ],
-        'interpolated-string': [
-            include('string-intp'),
-            (r'[\\#]', String.Other),
-            (r'[^\\#]+', String.Other),
-        ],
-        'multiline-regex': [
-            include('string-intp'),
-            (r'\\\\', String.Regex),
-            (r'\\/', String.Regex),
-            (r'[\\#]', String.Regex),
-            (r'[^\\/#]+', String.Regex),
-            (r'/[mixounse]*', String.Regex, '#pop'),
-        ],
-        'end-part': [
-            (r'.+', Comment.Preproc, '#pop')
-        ]
-    }
-    tokens.update(gen_rubystrings_rules())
-
-    def analyse_text(text):
-        return shebang_matches(text, r'ruby(1\.\d)?')
-
-
-class RubyConsoleLexer(Lexer):
-    """
-    For Ruby interactive console (**irb**) output.
-    """
-    name = 'Ruby irb session'
-    aliases = ['rbcon', 'irb']
-    mimetypes = ['text/x-ruby-shellsession']
-    url = 'https://www.ruby-lang.org'
-    version_added = ''
-    _example = 'rbcon/console'
-
-    _prompt_re = re.compile(r'irb\([a-zA-Z_]\w*\):\d{3}:\d+[>*"\'] '
-                            r'|>> |\?> ')
-
-    def get_tokens_unprocessed(self, text):
-        rblexer = RubyLexer(**self.options)
-
-        curcode = ''
-        insertions = []
-        for match in line_re.finditer(text):
-            line = match.group()
-            m = self._prompt_re.match(line)
-            if m is not None:
-                end = m.end()
-                insertions.append((len(curcode),
-                                   [(0, Generic.Prompt, line[:end])]))
-                curcode += line[end:]
-            else:
-                if curcode:
-                    yield from do_insertions(
-                        insertions, rblexer.get_tokens_unprocessed(curcode))
-                    curcode = ''
-                    insertions = []
-                yield match.start(), Generic.Output, line
-        if curcode:
-            yield from do_insertions(
-                insertions, rblexer.get_tokens_unprocessed(curcode))
-
-
-class FancyLexer(RegexLexer):
-    """
-    Pygments Lexer For Fancy.
-
-    Fancy is a self-hosted, pure object-oriented, dynamic,
-    class-based, concurrent general-purpose programming language
-    running on Rubinius, the Ruby VM.
-    """
-    name = 'Fancy'
-    url = 'https://github.com/bakkdoor/fancy'
-    filenames = ['*.fy', '*.fancypack']
-    aliases = ['fancy', 'fy']
-    mimetypes = ['text/x-fancysrc']
-    version_added = '1.5'
-
-    tokens = {
-        # copied from PerlLexer:
-        'balanced-regex': [
-            (r'/(\\\\|\\[^\\]|[^/\\])*/[egimosx]*', String.Regex, '#pop'),
-            (r'!(\\\\|\\[^\\]|[^!\\])*![egimosx]*', String.Regex, '#pop'),
-            (r'\\(\\\\|[^\\])*\\[egimosx]*', String.Regex, '#pop'),
-            (r'\{(\\\\|\\[^\\]|[^}\\])*\}[egimosx]*', String.Regex, '#pop'),
-            (r'<(\\\\|\\[^\\]|[^>\\])*>[egimosx]*', String.Regex, '#pop'),
-            (r'\[(\\\\|\\[^\\]|[^\]\\])*\][egimosx]*', String.Regex, '#pop'),
-            (r'\((\\\\|\\[^\\]|[^)\\])*\)[egimosx]*', String.Regex, '#pop'),
-            (r'@(\\\\|\\[^\\]|[^@\\])*@[egimosx]*', String.Regex, '#pop'),
-            (r'%(\\\\|\\[^\\]|[^%\\])*%[egimosx]*', String.Regex, '#pop'),
-            (r'\$(\\\\|\\[^\\]|[^$\\])*\$[egimosx]*', String.Regex, '#pop'),
-        ],
-        'root': [
-            (r'\s+', Whitespace),
-
-            # balanced delimiters (copied from PerlLexer):
-            (r's\{(\\\\|\\[^\\]|[^}\\])*\}\s*', String.Regex, 'balanced-regex'),
-            (r's<(\\\\|\\[^\\]|[^>\\])*>\s*', String.Regex, 'balanced-regex'),
-            (r's\[(\\\\|\\[^\\]|[^\]\\])*\]\s*', String.Regex, 'balanced-regex'),
-            (r's\((\\\\|\\[^\\]|[^)\\])*\)\s*', String.Regex, 'balanced-regex'),
-            (r'm?/(\\\\|\\[^\\]|[^///\n])*/[gcimosx]*', String.Regex),
-            (r'm(?=[/!\\{<\[(@%$])', String.Regex, 'balanced-regex'),
-
-            # Comments
-            (r'#(.*?)\n', Comment.Single),
-            # Symbols
-            (r'\'([^\'\s\[\](){}]+|\[\])', String.Symbol),
-            # Multi-line DoubleQuotedString
-            (r'"""(\\\\|\\[^\\]|[^\\])*?"""', String),
-            # DoubleQuotedString
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
-            # keywords
-            (r'(def|class|try|catch|finally|retry|return|return_local|match|'
-             r'case|->|=>)\b', Keyword),
-            # constants
-            (r'(self|super|nil|false|true)\b', Name.Constant),
-            (r'[(){};,/?|:\\]', Punctuation),
-            # names
-            (words((
-                'Object', 'Array', 'Hash', 'Directory', 'File', 'Class', 'String',
-                'Number', 'Enumerable', 'FancyEnumerable', 'Block', 'TrueClass',
-                'NilClass', 'FalseClass', 'Tuple', 'Symbol', 'Stack', 'Set',
-                'FancySpec', 'Method', 'Package', 'Range'), suffix=r'\b'),
-             Name.Builtin),
-            # functions
-            (r'[a-zA-Z](\w|[-+?!=*/^><%])*:', Name.Function),
-            # operators, must be below functions
-            (r'[-+*/~,<>=&!?%^\[\].$]+', Operator),
-            (r'[A-Z]\w*', Name.Constant),
-            (r'@[a-zA-Z_]\w*', Name.Variable.Instance),
-            (r'@@[a-zA-Z_]\w*', Name.Variable.Class),
-            ('@@?', Operator),
-            (r'[a-zA-Z_]\w*', Name),
-            # numbers - / checks are necessary to avoid mismarking regexes,
-            # see comment in RubyLexer
-            (r'(0[oO]?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?',
-             bygroups(Number.Oct, Whitespace, Operator)),
-            (r'(0[xX][0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*)(\s*)([/?])?',
-             bygroups(Number.Hex, Whitespace, Operator)),
-            (r'(0[bB][01]+(?:_[01]+)*)(\s*)([/?])?',
-             bygroups(Number.Bin, Whitespace, Operator)),
-            (r'([\d]+(?:_\d+)*)(\s*)([/?])?',
-             bygroups(Number.Integer, Whitespace, Operator)),
-            (r'\d+([eE][+-]?[0-9]+)|\d+\.\d+([eE][+-]?[0-9]+)?', Number.Float),
-            (r'\d+', Number.Integer)
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/rust.py b/voxvera/vendor/pygments/lexers/rust.py
deleted file mode 100644
index 6341047..0000000
--- a/voxvera/vendor/pygments/lexers/rust.py
+++ /dev/null
@@ -1,222 +0,0 @@
-"""
-    pygments.lexers.rust
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the Rust language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, include, bygroups, words, default
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Whitespace
-
-__all__ = ['RustLexer']
-
-
-class RustLexer(RegexLexer):
-    """
-    Lexer for the Rust programming language (version 1.47).
-    """
-    name = 'Rust'
-    url = 'https://www.rust-lang.org/'
-    filenames = ['*.rs', '*.rs.in']
-    aliases = ['rust', 'rs']
-    mimetypes = ['text/rust', 'text/x-rust']
-    version_added = '1.6'
-
-    keyword_types = (words((
-        'u8', 'u16', 'u32', 'u64', 'u128', 'i8', 'i16', 'i32', 'i64', 'i128',
-        'usize', 'isize', 'f32', 'f64', 'char', 'str', 'bool',
-    ), suffix=r'\b'), Keyword.Type)
-
-    builtin_funcs_types = (words((
-        'Copy', 'Send', 'Sized', 'Sync', 'Unpin',
-        'Drop', 'Fn', 'FnMut', 'FnOnce', 'drop',
-        'Box', 'ToOwned', 'Clone',
-        'PartialEq', 'PartialOrd', 'Eq', 'Ord',
-        'AsRef', 'AsMut', 'Into', 'From', 'Default',
-        'Iterator', 'Extend', 'IntoIterator', 'DoubleEndedIterator',
-        'ExactSizeIterator',
-        'Option', 'Some', 'None',
-        'Result', 'Ok', 'Err',
-        'String', 'ToString', 'Vec',
-    ), suffix=r'\b'), Name.Builtin)
-
-    builtin_macros = (words((
-        'asm', 'assert', 'assert_eq', 'assert_ne', 'cfg', 'column',
-        'compile_error', 'concat', 'concat_idents', 'dbg', 'debug_assert',
-        'debug_assert_eq', 'debug_assert_ne', 'env', 'eprint', 'eprintln',
-        'file', 'format', 'format_args', 'format_args_nl', 'global_asm',
-        'include', 'include_bytes', 'include_str',
-        'is_aarch64_feature_detected',
-        'is_arm_feature_detected',
-        'is_mips64_feature_detected',
-        'is_mips_feature_detected',
-        'is_powerpc64_feature_detected',
-        'is_powerpc_feature_detected',
-        'is_x86_feature_detected',
-        'line', 'llvm_asm', 'log_syntax', 'macro_rules', 'matches',
-        'module_path', 'option_env', 'panic', 'print', 'println', 'stringify',
-        'thread_local', 'todo', 'trace_macros', 'unimplemented', 'unreachable',
-        'vec', 'write', 'writeln',
-    ), suffix=r'!'), Name.Function.Magic)
-
-    tokens = {
-        'root': [
-            # rust allows a file to start with a shebang, but if the first line
-            # starts with #![ then it's not a shebang but a crate attribute.
-            (r'#![^[\r\n].*$', Comment.Preproc),
-            default('base'),
-        ],
-        'base': [
-            # Whitespace and Comments
-            (r'\n', Whitespace),
-            (r'\s+', Whitespace),
-            (r'//!.*?\n', String.Doc),
-            (r'///(\n|[^/].*?\n)', String.Doc),
-            (r'//(.*?)\n', Comment.Single),
-            (r'/\*\*(\n|[^/*])', String.Doc, 'doccomment'),
-            (r'/\*!', String.Doc, 'doccomment'),
-            (r'/\*', Comment.Multiline, 'comment'),
-
-            # Macro parameters
-            (r"""\$([a-zA-Z_]\w*|\(,?|\),?|,?)""", Comment.Preproc),
-            # Keywords
-            (words(('as', 'async', 'await', 'box', 'const', 'crate', 'dyn',
-                    'else', 'extern', 'for', 'if', 'impl', 'in', 'loop',
-                    'match', 'move', 'mut', 'pub', 'ref', 'return', 'static',
-                    'super', 'trait', 'unsafe', 'use', 'where', 'while'),
-                   suffix=r'\b'), Keyword),
-            (words(('abstract', 'become', 'do', 'final', 'macro', 'override',
-                    'priv', 'typeof', 'try', 'unsized', 'virtual', 'yield'),
-                   suffix=r'\b'), Keyword.Reserved),
-            (r'(true|false)\b', Keyword.Constant),
-            (r'self\b', Name.Builtin.Pseudo),
-            (r'mod\b', Keyword, 'modname'),
-            (r'let\b', Keyword.Declaration),
-            (r'fn\b', Keyword, 'funcname'),
-            (r'(struct|enum|type|union)\b', Keyword, 'typename'),
-            (r'(default)(\s+)(type|fn)\b', bygroups(Keyword, Whitespace, Keyword)),
-            keyword_types,
-            (r'[sS]elf\b', Name.Builtin.Pseudo),
-            # Prelude (taken from Rust's src/libstd/prelude.rs)
-            builtin_funcs_types,
-            builtin_macros,
-            # Path separators, so types don't catch them.
-            (r'::\b', Punctuation),
-            # Types in positions.
-            (r'(?::|->)', Punctuation, 'typename'),
-            # Labels
-            (r'(break|continue)(\b\s*)(\'[A-Za-z_]\w*)?',
-             bygroups(Keyword, Text.Whitespace, Name.Label)),
-
-            # Character literals
-            (r"""'(\\['"\\nrt]|\\x[0-7][0-9a-fA-F]|\\0"""
-             r"""|\\u\{[0-9a-fA-F]{1,6}\}|.)'""",
-             String.Char),
-            (r"""b'(\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\0"""
-             r"""|\\u\{[0-9a-fA-F]{1,6}\}|.)'""",
-             String.Char),
-
-            # Binary literals
-            (r'0b[01_]+', Number.Bin, 'number_lit'),
-            # Octal literals
-            (r'0o[0-7_]+', Number.Oct, 'number_lit'),
-            # Hexadecimal literals
-            (r'0[xX][0-9a-fA-F_]+', Number.Hex, 'number_lit'),
-            # Decimal literals
-            (r'[0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|'
-             r'\.[0-9_]*(?!\.)|[eE][+\-]?[0-9_]+)', Number.Float,
-             'number_lit'),
-            (r'[0-9][0-9_]*', Number.Integer, 'number_lit'),
-
-            # String literals
-            (r'b"', String, 'bytestring'),
-            (r'"', String, 'string'),
-            (r'(?s)b?r(#*)".*?"\1', String),
-
-            # Lifetime names
-            (r"'", Operator, 'lifetime'),
-
-            # Operators and Punctuation
-            (r'\.\.=?', Operator),
-            (r'[{}()\[\],.;]', Punctuation),
-            (r'[+\-*/%&|<>^!~@=:?]', Operator),
-
-            # Identifiers
-            (r'[a-zA-Z_]\w*', Name),
-            # Raw identifiers
-            (r'r#[a-zA-Z_]\w*', Name),
-
-            # Attributes
-            (r'#!?\[', Comment.Preproc, 'attribute['),
-
-            # Misc
-            # Lone hashes: not used in Rust syntax, but allowed in macro
-            # arguments, most famously for quote::quote!()
-            (r'#', Punctuation),
-        ],
-        'comment': [
-            (r'[^*/]+', Comment.Multiline),
-            (r'/\*', Comment.Multiline, '#push'),
-            (r'\*/', Comment.Multiline, '#pop'),
-            (r'[*/]', Comment.Multiline),
-        ],
-        'doccomment': [
-            (r'[^*/]+', String.Doc),
-            (r'/\*', String.Doc, '#push'),
-            (r'\*/', String.Doc, '#pop'),
-            (r'[*/]', String.Doc),
-        ],
-        'modname': [
-            (r'\s+', Whitespace),
-            (r'[a-zA-Z_]\w*', Name.Namespace, '#pop'),
-            default('#pop'),
-        ],
-        'funcname': [
-            (r'\s+', Whitespace),
-            (r'[a-zA-Z_]\w*', Name.Function, '#pop'),
-            default('#pop'),
-        ],
-        'typename': [
-            (r'\s+', Whitespace),
-            (r'&', Keyword.Pseudo),
-            (r"'", Operator, 'lifetime'),
-            builtin_funcs_types,
-            keyword_types,
-            (r'[a-zA-Z_]\w*', Name.Class, '#pop'),
-            default('#pop'),
-        ],
-        'lifetime': [
-            (r"(static|_)", Name.Builtin),
-            (r"[a-zA-Z_]+\w*", Name.Attribute),
-            default('#pop'),
-        ],
-        'number_lit': [
-            (r'[ui](8|16|32|64|size)', Keyword, '#pop'),
-            (r'f(32|64)', Keyword, '#pop'),
-            default('#pop'),
-        ],
-        'string': [
-            (r'"', String, '#pop'),
-            (r"""\\['"\\nrt]|\\x[0-7][0-9a-fA-F]|\\0"""
-             r"""|\\u\{[0-9a-fA-F]{1,6}\}""", String.Escape),
-            (r'[^\\"]+', String),
-            (r'\\', String),
-        ],
-        'bytestring': [
-            (r"""\\x[89a-fA-F][0-9a-fA-F]""", String.Escape),
-            include('string'),
-        ],
-        'attribute_common': [
-            (r'"', String, 'string'),
-            (r'\[', Comment.Preproc, 'attribute['),
-        ],
-        'attribute[': [
-            include('attribute_common'),
-            (r'\]', Comment.Preproc, '#pop'),
-            (r'[^"\]\[]+', Comment.Preproc),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/sas.py b/voxvera/vendor/pygments/lexers/sas.py
deleted file mode 100644
index 1b2ad43..0000000
--- a/voxvera/vendor/pygments/lexers/sas.py
+++ /dev/null
@@ -1,227 +0,0 @@
-"""
-    pygments.lexers.sas
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexer for SAS.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-from pygments.lexer import RegexLexer, include, words
-from pygments.token import Comment, Keyword, Name, Number, String, Text, \
-    Other, Generic
-
-__all__ = ['SASLexer']
-
-
-class SASLexer(RegexLexer):
-    """
-    For SAS files.
-    """
-    # Syntax from syntax/sas.vim by James Kidd 
-
-    name      = 'SAS'
-    aliases   = ['sas']
-    filenames = ['*.SAS', '*.sas']
-    mimetypes = ['text/x-sas', 'text/sas', 'application/x-sas']
-    url = 'https://en.wikipedia.org/wiki/SAS_(software)'
-    version_added = '2.2'
-    flags     = re.IGNORECASE | re.MULTILINE
-
-    builtins_macros = (
-        "bquote", "nrbquote", "cmpres", "qcmpres", "compstor", "datatyp",
-        "display", "do", "else", "end", "eval", "global", "goto", "if",
-        "index", "input", "keydef", "label", "left", "length", "let",
-        "local", "lowcase", "macro", "mend", "nrquote",
-        "nrstr", "put", "qleft", "qlowcase", "qscan",
-        "qsubstr", "qsysfunc", "qtrim", "quote", "qupcase", "scan",
-        "str", "substr", "superq", "syscall", "sysevalf", "sysexec",
-        "sysfunc", "sysget", "syslput", "sysprod", "sysrc", "sysrput",
-        "then", "to", "trim", "unquote", "until", "upcase", "verify",
-        "while", "window"
-    )
-
-    builtins_conditionals = (
-        "do", "if", "then", "else", "end", "until", "while"
-    )
-
-    builtins_statements = (
-        "abort", "array", "attrib", "by", "call", "cards", "cards4",
-        "catname", "continue", "datalines", "datalines4", "delete", "delim",
-        "delimiter", "display", "dm", "drop", "endsas", "error", "file",
-        "filename", "footnote", "format", "goto", "in", "infile", "informat",
-        "input", "keep", "label", "leave", "length", "libname", "link",
-        "list", "lostcard", "merge", "missing", "modify", "options", "output",
-        "out", "page", "put", "redirect", "remove", "rename", "replace",
-        "retain", "return", "select", "set", "skip", "startsas", "stop",
-        "title", "update", "waitsas", "where", "window", "x", "systask"
-    )
-
-    builtins_sql = (
-        "add", "and", "alter", "as", "cascade", "check", "create",
-        "delete", "describe", "distinct", "drop", "foreign", "from",
-        "group", "having", "index", "insert", "into", "in", "key", "like",
-        "message", "modify", "msgtype", "not", "null", "on", "or",
-        "order", "primary", "references", "reset", "restrict", "select",
-        "set", "table", "unique", "update", "validate", "view", "where"
-    )
-
-    builtins_functions = (
-        "abs", "addr", "airy", "arcos", "arsin", "atan", "attrc",
-        "attrn", "band", "betainv", "blshift", "bnot", "bor",
-        "brshift", "bxor", "byte", "cdf", "ceil", "cexist", "cinv",
-        "close", "cnonct", "collate", "compbl", "compound",
-        "compress", "cos", "cosh", "css", "curobs", "cv", "daccdb",
-        "daccdbsl", "daccsl", "daccsyd", "dacctab", "dairy", "date",
-        "datejul", "datepart", "datetime", "day", "dclose", "depdb",
-        "depdbsl", "depsl", "depsyd",
-        "deptab", "dequote", "dhms", "dif", "digamma",
-        "dim", "dinfo", "dnum", "dopen", "doptname", "doptnum",
-        "dread", "dropnote", "dsname", "erf", "erfc", "exist", "exp",
-        "fappend", "fclose", "fcol", "fdelete", "fetch", "fetchobs",
-        "fexist", "fget", "fileexist", "filename", "fileref",
-        "finfo", "finv", "fipname", "fipnamel", "fipstate", "floor",
-        "fnonct", "fnote", "fopen", "foptname", "foptnum", "fpoint",
-        "fpos", "fput", "fread", "frewind", "frlen", "fsep", "fuzz",
-        "fwrite", "gaminv", "gamma", "getoption", "getvarc", "getvarn",
-        "hbound", "hms", "hosthelp", "hour", "ibessel", "index",
-        "indexc", "indexw", "input", "inputc", "inputn", "int",
-        "intck", "intnx", "intrr", "irr", "jbessel", "juldate",
-        "kurtosis", "lag", "lbound", "left", "length", "lgamma",
-        "libname", "libref", "log", "log10", "log2", "logpdf", "logpmf",
-        "logsdf", "lowcase", "max", "mdy", "mean", "min", "minute",
-        "mod", "month", "mopen", "mort", "n", "netpv", "nmiss",
-        "normal", "note", "npv", "open", "ordinal", "pathname",
-        "pdf", "peek", "peekc", "pmf", "point", "poisson", "poke",
-        "probbeta", "probbnml", "probchi", "probf", "probgam",
-        "probhypr", "probit", "probnegb", "probnorm", "probt",
-        "put", "putc", "putn", "qtr", "quote", "ranbin", "rancau",
-        "ranexp", "rangam", "range", "rank", "rannor", "ranpoi",
-        "rantbl", "rantri", "ranuni", "repeat", "resolve", "reverse",
-        "rewind", "right", "round", "saving", "scan", "sdf", "second",
-        "sign", "sin", "sinh", "skewness", "soundex", "spedis",
-        "sqrt", "std", "stderr", "stfips", "stname", "stnamel",
-        "substr", "sum", "symget", "sysget", "sysmsg", "sysprod",
-        "sysrc", "system", "tan", "tanh", "time", "timepart", "tinv",
-        "tnonct", "today", "translate", "tranwrd", "trigamma",
-        "trim", "trimn", "trunc", "uniform", "upcase", "uss", "var",
-        "varfmt", "varinfmt", "varlabel", "varlen", "varname",
-        "varnum", "varray", "varrayx", "vartype", "verify", "vformat",
-        "vformatd", "vformatdx", "vformatn", "vformatnx", "vformatw",
-        "vformatwx", "vformatx", "vinarray", "vinarrayx", "vinformat",
-        "vinformatd", "vinformatdx", "vinformatn", "vinformatnx",
-        "vinformatw", "vinformatwx", "vinformatx", "vlabel",
-        "vlabelx", "vlength", "vlengthx", "vname", "vnamex", "vtype",
-        "vtypex", "weekday", "year", "yyq", "zipfips", "zipname",
-        "zipnamel", "zipstate"
-    )
-
-    tokens = {
-        'root': [
-            include('comments'),
-            include('proc-data'),
-            include('cards-datalines'),
-            include('logs'),
-            include('general'),
-            (r'.', Text),
-        ],
-        # SAS is multi-line regardless, but * is ended by ;
-        'comments': [
-            (r'^\s*\*.*?;', Comment),
-            (r'/\*.*?\*/', Comment),
-            (r'^\s*\*(.|\n)*?;', Comment.Multiline),
-            (r'/[*](.|\n)*?[*]/', Comment.Multiline),
-        ],
-        # Special highlight for proc, data, quit, run
-        'proc-data': [
-            (r'(^|;)\s*(proc \w+|data|run|quit)[\s;]',
-             Keyword.Reserved),
-        ],
-        # Special highlight cards and datalines
-        'cards-datalines': [
-            (r'^\s*(datalines|cards)\s*;\s*$', Keyword, 'data'),
-        ],
-        'data': [
-            (r'(.|\n)*^\s*;\s*$', Other, '#pop'),
-        ],
-        # Special highlight for put NOTE|ERROR|WARNING (order matters)
-        'logs': [
-            (r'\n?^\s*%?put ', Keyword, 'log-messages'),
-        ],
-        'log-messages': [
-            (r'NOTE(:|-).*', Generic, '#pop'),
-            (r'WARNING(:|-).*', Generic.Emph, '#pop'),
-            (r'ERROR(:|-).*', Generic.Error, '#pop'),
-            include('general'),
-        ],
-        'general': [
-            include('keywords'),
-            include('vars-strings'),
-            include('special'),
-            include('numbers'),
-        ],
-        # Keywords, statements, functions, macros
-        'keywords': [
-            (words(builtins_statements,
-                   prefix = r'\b',
-                   suffix = r'\b'),
-             Keyword),
-            (words(builtins_sql,
-                   prefix = r'\b',
-                   suffix = r'\b'),
-             Keyword),
-            (words(builtins_conditionals,
-                   prefix = r'\b',
-                   suffix = r'\b'),
-             Keyword),
-            (words(builtins_macros,
-                   prefix = r'%',
-                   suffix = r'\b'),
-             Name.Builtin),
-            (words(builtins_functions,
-                   prefix = r'\b',
-                   suffix = r'\('),
-             Name.Builtin),
-        ],
-        # Strings and user-defined variables and macros (order matters)
-        'vars-strings': [
-            (r'&[a-z_]\w{0,31}\.?', Name.Variable),
-            (r'%[a-z_]\w{0,31}', Name.Function),
-            (r'\'', String, 'string_squote'),
-            (r'"', String, 'string_dquote'),
-        ],
-        'string_squote': [
-            ('\'', String, '#pop'),
-            (r'\\\\|\\"|\\\n', String.Escape),
-            # AFAIK, macro variables are not evaluated in single quotes
-            # (r'&', Name.Variable, 'validvar'),
-            (r'[^$\'\\]+', String),
-            (r'[$\'\\]', String),
-        ],
-        'string_dquote': [
-            (r'"', String, '#pop'),
-            (r'\\\\|\\"|\\\n', String.Escape),
-            (r'&', Name.Variable, 'validvar'),
-            (r'[^$&"\\]+', String),
-            (r'[$"\\]', String),
-        ],
-        'validvar': [
-            (r'[a-z_]\w{0,31}\.?', Name.Variable, '#pop'),
-        ],
-        # SAS numbers and special variables
-        'numbers': [
-            (r'\b[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)(E[+-]?[0-9]+)?i?\b',
-             Number),
-        ],
-        'special': [
-            (r'(null|missing|_all_|_automatic_|_character_|_n_|'
-             r'_infile_|_name_|_null_|_numeric_|_user_|_webout_)',
-             Keyword.Constant),
-        ],
-        # 'operators': [
-        #     (r'(-|=|<=|>=|<|>|<>|&|!=|'
-        #      r'\||\*|\+|\^|/|!|~|~=)', Operator)
-        # ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/savi.py b/voxvera/vendor/pygments/lexers/savi.py
deleted file mode 100644
index 1e443ae..0000000
--- a/voxvera/vendor/pygments/lexers/savi.py
+++ /dev/null
@@ -1,171 +0,0 @@
-"""
-    pygments.lexers.savi
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for Savi.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, include
-from pygments.token import Whitespace, Keyword, Name, String, Number, \
-  Operator, Punctuation, Comment, Generic, Error
-
-__all__ = ['SaviLexer']
-
-
-# The canonical version of this file can be found in the following repository,
-# where it is kept in sync with any language changes, as well as the other
-# pygments-like lexers that are maintained for use with other tools:
-# - https://github.com/savi-lang/savi/blob/main/tooling/pygments/lexers/savi.py
-#
-# If you're changing this file in the pygments repository, please ensure that
-# any changes you make are also propagated to the official Savi repository,
-# in order to avoid accidental clobbering of your changes later when an update
-# from the Savi repository flows forward into the pygments repository.
-#
-# If you're changing this file in the Savi repository, please ensure that
-# any changes you make are also reflected in the other pygments-like lexers
-# (rouge, vscode, etc) so that all of the lexers can be kept cleanly in sync.
-
-class SaviLexer(RegexLexer):
-    """
-    For Savi source code.
-
-    .. versionadded: 2.10
-    """
-
-    name = 'Savi'
-    url = 'https://github.com/savi-lang/savi'
-    aliases = ['savi']
-    filenames = ['*.savi']
-    version_added = ''
-
-    tokens = {
-      "root": [
-        # Line Comment
-        (r'//.*?$', Comment.Single),
-
-        # Doc Comment
-        (r'::.*?$', Comment.Single),
-
-        # Capability Operator
-        (r'(\')(\w+)(?=[^\'])', bygroups(Operator, Name)),
-
-        # Double-Quote String
-        (r'\w?"', String.Double, "string.double"),
-
-        # Single-Char String
-        (r"'", String.Char, "string.char"),
-
-        # Type Name
-        (r'(_?[A-Z]\w*)', Name.Class),
-
-        # Nested Type Name
-        (r'(\.)(\s*)(_?[A-Z]\w*)', bygroups(Punctuation, Whitespace, Name.Class)),
-
-        # Declare
-        (r'^([ \t]*)(:\w+)',
-          bygroups(Whitespace, Name.Tag),
-          "decl"),
-
-        # Error-Raising Calls/Names
-        (r'((\w+|\+|\-|\*)\!)', Generic.Deleted),
-
-        # Numeric Values
-        (r'\b\d([\d_]*(\.[\d_]+)?)\b', Number),
-
-        # Hex Numeric Values
-        (r'\b0x([0-9a-fA-F_]+)\b', Number.Hex),
-
-        # Binary Numeric Values
-        (r'\b0b([01_]+)\b', Number.Bin),
-
-        # Function Call (with braces)
-        (r'\w+(?=\()', Name.Function),
-
-        # Function Call (with receiver)
-        (r'(\.)(\s*)(\w+)', bygroups(Punctuation, Whitespace, Name.Function)),
-
-        # Function Call (with self receiver)
-        (r'(@)(\w+)', bygroups(Punctuation, Name.Function)),
-
-        # Parenthesis
-        (r'\(', Punctuation, "root"),
-        (r'\)', Punctuation, "#pop"),
-
-        # Brace
-        (r'\{', Punctuation, "root"),
-        (r'\}', Punctuation, "#pop"),
-
-        # Bracket
-        (r'\[', Punctuation, "root"),
-        (r'(\])(\!)', bygroups(Punctuation, Generic.Deleted), "#pop"),
-        (r'\]', Punctuation, "#pop"),
-
-        # Punctuation
-        (r'[,;:\.@]', Punctuation),
-
-        # Piping Operators
-        (r'(\|\>)', Operator),
-
-        # Branching Operators
-        (r'(\&\&|\|\||\?\?|\&\?|\|\?|\.\?)', Operator),
-
-        # Comparison Operators
-        (r'(\<\=\>|\=\~|\=\=|\<\=|\>\=|\<|\>)', Operator),
-
-        # Arithmetic Operators
-        (r'(\+|\-|\/|\*|\%)', Operator),
-
-        # Assignment Operators
-        (r'(\=)', Operator),
-
-        # Other Operators
-        (r'(\!|\<\<|\<|\&|\|)', Operator),
-
-        # Identifiers
-        (r'\b\w+\b', Name),
-
-        # Whitespace
-        (r'[ \t\r]+\n*|\n+', Whitespace),
-      ],
-
-      # Declare (nested rules)
-      "decl": [
-        (r'\b[a-z_]\w*\b(?!\!)', Keyword.Declaration),
-        (r':', Punctuation, "#pop"),
-        (r'\n', Whitespace, "#pop"),
-        include("root"),
-      ],
-
-      # Double-Quote String (nested rules)
-      "string.double": [
-        (r'\\\(', String.Interpol, "string.interpolation"),
-        (r'\\u[0-9a-fA-F]{4}', String.Escape),
-        (r'\\x[0-9a-fA-F]{2}', String.Escape),
-        (r'\\[bfnrt\\\']', String.Escape),
-        (r'\\"', String.Escape),
-        (r'"', String.Double, "#pop"),
-        (r'[^\\"]+', String.Double),
-        (r'.', Error),
-      ],
-
-      # Single-Char String (nested rules)
-      "string.char": [
-        (r'\\u[0-9a-fA-F]{4}', String.Escape),
-        (r'\\x[0-9a-fA-F]{2}', String.Escape),
-        (r'\\[bfnrt\\\']', String.Escape),
-        (r"\\'", String.Escape),
-        (r"'", String.Char, "#pop"),
-        (r"[^\\']+", String.Char),
-        (r'.', Error),
-      ],
-
-      # Interpolation inside String (nested rules)
-      "string.interpolation": [
-        (r"\)", String.Interpol, "#pop"),
-        include("root"),
-      ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/scdoc.py b/voxvera/vendor/pygments/lexers/scdoc.py
deleted file mode 100644
index 8e850d0..0000000
--- a/voxvera/vendor/pygments/lexers/scdoc.py
+++ /dev/null
@@ -1,85 +0,0 @@
-"""
-    pygments.lexers.scdoc
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for scdoc, a simple man page generator.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include, bygroups, using, this
-from pygments.token import Text, Comment, Keyword, String, Generic
-
-__all__ = ['ScdocLexer']
-
-
-class ScdocLexer(RegexLexer):
-    """
-    `scdoc` is a simple man page generator for POSIX systems written in C99.
-    """
-    name = 'scdoc'
-    url = 'https://git.sr.ht/~sircmpwn/scdoc'
-    aliases = ['scdoc', 'scd']
-    filenames = ['*.scd', '*.scdoc']
-    version_added = '2.5'
-    flags = re.MULTILINE
-
-    tokens = {
-        'root': [
-            # comment
-            (r'^(;.+\n)', bygroups(Comment)),
-
-            # heading with pound prefix
-            (r'^(#)([^#].+\n)', bygroups(Generic.Heading, Text)),
-            (r'^(#{2})(.+\n)', bygroups(Generic.Subheading, Text)),
-            # bulleted lists
-            (r'^(\s*)([*-])(\s)(.+\n)',
-            bygroups(Text, Keyword, Text, using(this, state='inline'))),
-            # numbered lists
-            (r'^(\s*)(\.+\.)( .+\n)',
-            bygroups(Text, Keyword, using(this, state='inline'))),
-            # quote
-            (r'^(\s*>\s)(.+\n)', bygroups(Keyword, Generic.Emph)),
-            # text block
-            (r'^(```\n)([\w\W]*?)(^```$)', bygroups(String, Text, String)),
-
-            include('inline'),
-        ],
-        'inline': [
-            # escape
-            (r'\\.', Text),
-            # underlines
-            (r'(\s)(_[^_]+_)(\W|\n)', bygroups(Text, Generic.Emph, Text)),
-            # bold
-            (r'(\s)(\*[^*]+\*)(\W|\n)', bygroups(Text, Generic.Strong, Text)),
-            # inline code
-            (r'`[^`]+`', String.Backtick),
-
-            # general text, must come last!
-            (r'[^\\\s]+', Text),
-            (r'.', Text),
-        ],
-    }
-
-    def analyse_text(text):
-        """We checks for bold and underline text with * and _. Also
-        every scdoc file must start with a strictly defined first line."""
-        result = 0
-
-        if '*' in text:
-            result += 0.01
-
-        if '_' in text:
-            result += 0.01
-
-        # name(section) ["left_footer" ["center_header"]]
-        first_line = text.partition('\n')[0]
-        scdoc_preamble_pattern = r'^.*\([1-7]\)( "[^"]+"){0,2}$'
-
-        if re.search(scdoc_preamble_pattern, first_line):
-            result += 0.5
-
-        return result
diff --git a/voxvera/vendor/pygments/lexers/scripting.py b/voxvera/vendor/pygments/lexers/scripting.py
deleted file mode 100644
index 6e494c3..0000000
--- a/voxvera/vendor/pygments/lexers/scripting.py
+++ /dev/null
@@ -1,1616 +0,0 @@
-"""
-    pygments.lexers.scripting
-    ~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for scripting and embedded languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import RegexLexer, include, bygroups, default, combined, \
-    words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Error, Whitespace, Other
-from pygments.util import get_bool_opt, get_list_opt
-
-__all__ = ['LuaLexer', 'LuauLexer', 'MoonScriptLexer', 'ChaiscriptLexer', 'LSLLexer',
-           'AppleScriptLexer', 'RexxLexer', 'MOOCodeLexer', 'HybrisLexer',
-           'EasytrieveLexer', 'JclLexer', 'MiniScriptLexer']
-
-
-def all_lua_builtins():
-    from pygments.lexers._lua_builtins import MODULES
-    return [w for values in MODULES.values() for w in values]
-
-class LuaLexer(RegexLexer):
-    """
-    For Lua source code.
-
-    Additional options accepted:
-
-    `func_name_highlighting`
-        If given and ``True``, highlight builtin function names
-        (default: ``True``).
-    `disabled_modules`
-        If given, must be a list of module names whose function names
-        should not be highlighted. By default all modules are highlighted.
-
-        To get a list of allowed modules have a look into the
-        `_lua_builtins` module:
-
-        .. sourcecode:: pycon
-
-            >>> from pygments.lexers._lua_builtins import MODULES
-            >>> MODULES.keys()
-            ['string', 'coroutine', 'modules', 'io', 'basic', ...]
-    """
-
-    name = 'Lua'
-    url = 'https://www.lua.org/'
-    aliases = ['lua']
-    filenames = ['*.lua', '*.wlua']
-    mimetypes = ['text/x-lua', 'application/x-lua']
-    version_added = ''
-
-    _comment_multiline = r'(?:--\[(?P=*)\[[\w\W]*?\](?P=level)\])'
-    _comment_single = r'(?:--.*$)'
-    _space = r'(?:\s+(?!\s))'
-    _s = rf'(?:{_comment_multiline}|{_comment_single}|{_space})'
-    _name = r'(?:[^\W\d]\w*)'
-
-    tokens = {
-        'root': [
-            # Lua allows a file to start with a shebang.
-            (r'#!.*', Comment.Preproc),
-            default('base'),
-        ],
-        'ws': [
-            (_comment_multiline, Comment.Multiline),
-            (_comment_single, Comment.Single),
-            (_space, Whitespace),
-        ],
-        'base': [
-            include('ws'),
-
-            (r'(?i)0x[\da-f]*(\.[\da-f]*)?(p[+-]?\d+)?', Number.Hex),
-            (r'(?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?', Number.Float),
-            (r'(?i)\d+e[+-]?\d+', Number.Float),
-            (r'\d+', Number.Integer),
-
-            # multiline strings
-            (r'(?s)\[(=*)\[.*?\]\1\]', String),
-
-            (r'::', Punctuation, 'label'),
-            (r'\.{3}', Punctuation),
-            (r'[=<>|~&+\-*/%#^]+|\.\.', Operator),
-            (r'[\[\]{}().,:;]+', Punctuation),
-            (r'(and|or|not)\b', Operator.Word),
-
-            (words([
-                'break', 'do', 'else', 'elseif', 'end', 'for', 'if', 'in',
-                'repeat', 'return', 'then', 'until', 'while'
-            ], suffix=r'\b'), Keyword.Reserved),
-            (r'goto\b', Keyword.Reserved, 'goto'),
-            (r'(local)\b', Keyword.Declaration),
-            (r'(true|false|nil)\b', Keyword.Constant),
-
-            (r'(function)\b', Keyword.Reserved, 'funcname'),
-
-            (words(all_lua_builtins(), suffix=r"\b"), Name.Builtin),
-            (fr'[A-Za-z_]\w*(?={_s}*[.:])', Name.Variable, 'varname'),
-            (fr'[A-Za-z_]\w*(?={_s}*\()', Name.Function),
-            (r'[A-Za-z_]\w*', Name.Variable),
-
-            ("'", String.Single, combined('stringescape', 'sqs')),
-            ('"', String.Double, combined('stringescape', 'dqs'))
-        ],
-
-        'varname': [
-            include('ws'),
-            (r'\.\.', Operator, '#pop'),
-            (r'[.:]', Punctuation),
-            (rf'{_name}(?={_s}*[.:])', Name.Property),
-            (rf'{_name}(?={_s}*\()', Name.Function, '#pop'),
-            (_name, Name.Property, '#pop'),
-        ],
-
-        'funcname': [
-            include('ws'),
-            (r'[.:]', Punctuation),
-            (rf'{_name}(?={_s}*[.:])', Name.Class),
-            (_name, Name.Function, '#pop'),
-            # inline function
-            (r'\(', Punctuation, '#pop'),
-        ],
-
-        'goto': [
-            include('ws'),
-            (_name, Name.Label, '#pop'),
-        ],
-
-        'label': [
-            include('ws'),
-            (r'::', Punctuation, '#pop'),
-            (_name, Name.Label),
-        ],
-
-        'stringescape': [
-            (r'\\([abfnrtv\\"\']|[\r\n]{1,2}|z\s*|x[0-9a-fA-F]{2}|\d{1,3}|'
-             r'u\{[0-9a-fA-F]+\})', String.Escape),
-        ],
-
-        'sqs': [
-            (r"'", String.Single, '#pop'),
-            (r"[^\\']+", String.Single),
-        ],
-
-        'dqs': [
-            (r'"', String.Double, '#pop'),
-            (r'[^\\"]+', String.Double),
-        ]
-    }
-
-    def __init__(self, **options):
-        self.func_name_highlighting = get_bool_opt(
-            options, 'func_name_highlighting', True)
-        self.disabled_modules = get_list_opt(options, 'disabled_modules', [])
-
-        self._functions = set()
-        if self.func_name_highlighting:
-            from pygments.lexers._lua_builtins import MODULES
-            for mod, func in MODULES.items():
-                if mod not in self.disabled_modules:
-                    self._functions.update(func)
-        RegexLexer.__init__(self, **options)
-
-    def get_tokens_unprocessed(self, text):
-        for index, token, value in \
-                RegexLexer.get_tokens_unprocessed(self, text):
-            if token is Name.Builtin and value not in self._functions:
-                if '.' in value:
-                    a, b = value.split('.')
-                    yield index, Name, a
-                    yield index + len(a), Punctuation, '.'
-                    yield index + len(a) + 1, Name, b
-                else:
-                    yield index, Name, value
-                continue
-            yield index, token, value
-
-def _luau_make_expression(should_pop, _s):
-    temp_list = [
-        (r'0[xX][\da-fA-F_]*', Number.Hex, '#pop'),
-        (r'0[bB][\d_]*', Number.Bin, '#pop'),
-        (r'\.?\d[\d_]*(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?', Number.Float, '#pop'),
-
-        (words((
-            'true', 'false', 'nil'
-        ), suffix=r'\b'), Keyword.Constant, '#pop'),
-
-        (r'\[(=*)\[[.\n]*?\]\1\]', String, '#pop'),
-
-        (r'(\.)([a-zA-Z_]\w*)(?=%s*[({"\'])', bygroups(Punctuation, Name.Function), '#pop'),
-        (r'(\.)([a-zA-Z_]\w*)', bygroups(Punctuation, Name.Variable), '#pop'),
-
-        (rf'[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*(?={_s}*[({{"\'])', Name.Other, '#pop'),
-        (r'[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*', Name, '#pop'),
-    ]
-    if should_pop:
-        return temp_list
-    return [entry[:2] for entry in temp_list]
-
-def _luau_make_expression_special(should_pop):
-    temp_list = [
-        (r'\{', Punctuation, ('#pop', 'closing_brace_base', 'expression')),
-        (r'\(', Punctuation, ('#pop', 'closing_parenthesis_base', 'expression')),
-
-        (r'::?', Punctuation, ('#pop', 'type_end', 'type_start')),
-
-        (r"'", String.Single, ('#pop', 'string_single')),
-        (r'"', String.Double, ('#pop', 'string_double')),
-        (r'`', String.Backtick, ('#pop', 'string_interpolated')),
-    ]
-    if should_pop:
-        return temp_list
-    return [(entry[0], entry[1], entry[2][1:]) for entry in temp_list]
-
-class LuauLexer(RegexLexer):
-    """
-    For Luau source code.
-
-    Additional options accepted:
-
-    `include_luau_builtins`
-        If given and ``True``, automatically highlight Luau builtins
-        (default: ``True``).
-    `include_roblox_builtins`
-        If given and ``True``, automatically highlight Roblox-specific builtins
-        (default: ``False``).
-    `additional_builtins`
-        If given, must be a list of additional builtins to highlight.
-    `disabled_builtins`
-        If given, must be a list of builtins that will not be highlighted.
-    """
-
-    name = 'Luau'
-    url = 'https://luau-lang.org/'
-    aliases = ['luau']
-    filenames = ['*.luau']
-    version_added = '2.18'
-
-    _comment_multiline = r'(?:--\[(?P=*)\[[\w\W]*?\](?P=level)\])'
-    _comment_single = r'(?:--.*$)'
-    _s = r'(?:{}|{}|{})'.format(_comment_multiline, _comment_single, r'\s+')
-
-    tokens = {
-        'root': [
-            (r'#!.*', Comment.Hashbang, 'base'),
-            default('base'),
-        ],
-
-        'ws': [
-            (_comment_multiline, Comment.Multiline),
-            (_comment_single, Comment.Single),
-            (r'\s+', Whitespace),
-        ],
-
-        'base': [
-            include('ws'),
-
-            *_luau_make_expression_special(False),
-            (r'\.\.\.', Punctuation),
-
-            (rf'type\b(?={_s}+[a-zA-Z_])', Keyword.Reserved, 'type_declaration'),
-            (rf'export\b(?={_s}+[a-zA-Z_])', Keyword.Reserved),
-
-            (r'(?:\.\.|//|[+\-*\/%^<>=])=?', Operator, 'expression'),
-            (r'~=', Operator, 'expression'),
-
-            (words((
-                'and', 'or', 'not'
-            ), suffix=r'\b'), Operator.Word, 'expression'),
-
-            (words((
-                'elseif', 'for', 'if', 'in', 'repeat', 'return', 'until',
-                'while'), suffix=r'\b'), Keyword.Reserved, 'expression'),
-            (r'local\b', Keyword.Declaration, 'expression'),
-
-            (r'function\b', Keyword.Reserved, ('expression', 'func_name')),
-
-            (r'[\])};]+', Punctuation),
-
-            include('expression_static'),
-            *_luau_make_expression(False, _s),
-
-            (r'[\[.,]', Punctuation, 'expression'),
-        ],
-        'expression_static': [
-            (words((
-                'break', 'continue', 'do', 'else', 'elseif', 'end', 'for',
-                'if', 'in', 'repeat', 'return', 'then', 'until', 'while'),
-                suffix=r'\b'), Keyword.Reserved),
-        ],
-        'expression': [
-            include('ws'),
-
-            (r'if\b', Keyword.Reserved, ('ternary', 'expression')),
-
-            (r'local\b', Keyword.Declaration),
-            *_luau_make_expression_special(True),
-            (r'\.\.\.', Punctuation, '#pop'),
-
-            (r'function\b', Keyword.Reserved, 'func_name'),
-
-            include('expression_static'),
-            *_luau_make_expression(True, _s),
-
-            default('#pop'),
-        ],
-        'ternary': [
-            include('ws'),
-
-            (r'else\b', Keyword.Reserved, '#pop'),
-            (words((
-                'then', 'elseif',
-            ), suffix=r'\b'), Operator.Reserved, 'expression'),
-
-            default('#pop'),
-        ],
-
-        'closing_brace_pop': [
-            (r'\}', Punctuation, '#pop'),
-        ],
-        'closing_parenthesis_pop': [
-            (r'\)', Punctuation, '#pop'),
-        ],
-        'closing_gt_pop': [
-            (r'>', Punctuation, '#pop'),
-        ],
-
-        'closing_parenthesis_base': [
-            include('closing_parenthesis_pop'),
-            include('base'),
-        ],
-        'closing_parenthesis_type': [
-            include('closing_parenthesis_pop'),
-            include('type'),
-        ],
-        'closing_brace_base': [
-            include('closing_brace_pop'),
-            include('base'),
-        ],
-        'closing_brace_type': [
-            include('closing_brace_pop'),
-            include('type'),
-        ],
-        'closing_gt_type': [
-            include('closing_gt_pop'),
-            include('type'),
-        ],
-
-        'string_escape': [
-            (r'\\z\s*', String.Escape),
-            (r'\\(?:[abfnrtvz\\"\'`\{\n])|[\r\n]{1,2}|x[\da-fA-F]{2}|\d{1,3}|'
-             r'u\{\}[\da-fA-F]*\}', String.Escape),
-        ],
-        'string_single': [
-            include('string_escape'),
-
-            (r"'", String.Single, "#pop"),
-            (r"[^\\']+", String.Single),
-        ],
-        'string_double': [
-            include('string_escape'),
-
-            (r'"', String.Double, "#pop"),
-            (r'[^\\"]+', String.Double),
-        ],
-        'string_interpolated': [
-            include('string_escape'),
-
-            (r'\{', Punctuation, ('closing_brace_base', 'expression')),
-
-            (r'`', String.Backtick, "#pop"),
-            (r'[^\\`\{]+', String.Backtick),
-        ],
-
-        'func_name': [
-            include('ws'),
-
-            (r'[.:]', Punctuation),
-            (rf'[a-zA-Z_]\w*(?={_s}*[.:])', Name.Class),
-            (r'[a-zA-Z_]\w*', Name.Function),
-
-            (r'<', Punctuation, 'closing_gt_type'),
-
-            (r'\(', Punctuation, '#pop'),
-        ],
-
-        'type': [
-            include('ws'),
-
-            (r'\(', Punctuation, 'closing_parenthesis_type'),
-            (r'\{', Punctuation, 'closing_brace_type'),
-            (r'<', Punctuation, 'closing_gt_type'),
-
-            (r"'", String.Single, 'string_single'),
-            (r'"', String.Double, 'string_double'),
-
-            (r'[|&\.,\[\]:=]+', Punctuation),
-            (r'->', Punctuation),
-
-            (r'typeof\(', Name.Builtin, ('closing_parenthesis_base',
-                                         'expression')),
-            (r'[a-zA-Z_]\w*', Name.Class),
-        ],
-        'type_start': [
-            include('ws'),
-
-            (r'\(', Punctuation, ('#pop', 'closing_parenthesis_type')),
-            (r'\{', Punctuation, ('#pop', 'closing_brace_type')),
-            (r'<', Punctuation, ('#pop', 'closing_gt_type')),
-
-            (r"'", String.Single, ('#pop', 'string_single')),
-            (r'"', String.Double, ('#pop', 'string_double')),
-
-            (r'typeof\(', Name.Builtin, ('#pop', 'closing_parenthesis_base',
-                                         'expression')),
-            (r'[a-zA-Z_]\w*', Name.Class, '#pop'),
-        ],
-        'type_end': [
-            include('ws'),
-
-            (r'[|&\.]', Punctuation, 'type_start'),
-            (r'->', Punctuation, 'type_start'),
-
-            (r'<', Punctuation, 'closing_gt_type'),
-
-            default('#pop'),
-        ],
-        'type_declaration': [
-            include('ws'),
-
-            (r'[a-zA-Z_]\w*', Name.Class),
-            (r'<', Punctuation, 'closing_gt_type'),
-
-            (r'=', Punctuation, ('#pop', 'type_end', 'type_start')),
-        ],
-    }
-
-    def __init__(self, **options):
-        self.include_luau_builtins = get_bool_opt(
-            options, 'include_luau_builtins', True)
-        self.include_roblox_builtins = get_bool_opt(
-            options, 'include_roblox_builtins', False)
-        self.additional_builtins = get_list_opt(options, 'additional_builtins', [])
-        self.disabled_builtins = get_list_opt(options, 'disabled_builtins', [])
-
-        self._builtins = set(self.additional_builtins)
-        if self.include_luau_builtins:
-            from pygments.lexers._luau_builtins import LUAU_BUILTINS
-            self._builtins.update(LUAU_BUILTINS)
-        if self.include_roblox_builtins:
-            from pygments.lexers._luau_builtins import ROBLOX_BUILTINS
-            self._builtins.update(ROBLOX_BUILTINS)
-        if self.additional_builtins:
-            self._builtins.update(self.additional_builtins)
-        self._builtins.difference_update(self.disabled_builtins)
-
-        RegexLexer.__init__(self, **options)
-
-    def get_tokens_unprocessed(self, text):
-        for index, token, value in \
-                RegexLexer.get_tokens_unprocessed(self, text):
-            if token is Name or token is Name.Other:
-                split_value = value.split('.')
-                complete_value = []
-                new_index = index
-                for position in range(len(split_value), 0, -1):
-                    potential_string = '.'.join(split_value[:position])
-                    if potential_string in self._builtins:
-                        yield index, Name.Builtin, potential_string
-                        new_index += len(potential_string)
-
-                        if complete_value:
-                            yield new_index, Punctuation, '.'
-                            new_index += 1
-                        break
-                    complete_value.insert(0, split_value[position - 1])
-
-                for position, substring in enumerate(complete_value):
-                    if position + 1 == len(complete_value):
-                        if token is Name:
-                            yield new_index, Name.Variable, substring
-                            continue
-                        yield new_index, Name.Function, substring
-                        continue
-                    yield new_index, Name.Variable, substring
-                    new_index += len(substring)
-                    yield new_index, Punctuation, '.'
-                    new_index += 1
-
-                continue
-            yield index, token, value
-
-class MoonScriptLexer(LuaLexer):
-    """
-    For MoonScript source code.
-    """
-
-    name = 'MoonScript'
-    url = 'http://moonscript.org'
-    aliases = ['moonscript', 'moon']
-    filenames = ['*.moon']
-    mimetypes = ['text/x-moonscript', 'application/x-moonscript']
-    version_added = '1.5'
-
-    tokens = {
-        'root': [
-            (r'#!(.*?)$', Comment.Preproc),
-            default('base'),
-        ],
-        'base': [
-            ('--.*$', Comment.Single),
-            (r'(?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?', Number.Float),
-            (r'(?i)\d+e[+-]?\d+', Number.Float),
-            (r'(?i)0x[0-9a-f]*', Number.Hex),
-            (r'\d+', Number.Integer),
-            (r'\n', Whitespace),
-            (r'[^\S\n]+', Text),
-            (r'(?s)\[(=*)\[.*?\]\1\]', String),
-            (r'(->|=>)', Name.Function),
-            (r':[a-zA-Z_]\w*', Name.Variable),
-            (r'(==|!=|~=|<=|>=|\.\.\.|\.\.|[=+\-*/%^<>#!.\\:])', Operator),
-            (r'[;,]', Punctuation),
-            (r'[\[\]{}()]', Keyword.Type),
-            (r'[a-zA-Z_]\w*:', Name.Variable),
-            (words((
-                'class', 'extends', 'if', 'then', 'super', 'do', 'with',
-                'import', 'export', 'while', 'elseif', 'return', 'for', 'in',
-                'from', 'when', 'using', 'else', 'and', 'or', 'not', 'switch',
-                'break'), suffix=r'\b'),
-             Keyword),
-            (r'(true|false|nil)\b', Keyword.Constant),
-            (r'(and|or|not)\b', Operator.Word),
-            (r'(self)\b', Name.Builtin.Pseudo),
-            (r'@@?([a-zA-Z_]\w*)?', Name.Variable.Class),
-            (r'[A-Z]\w*', Name.Class),  # proper name
-            (words(all_lua_builtins(), suffix=r"\b"), Name.Builtin),
-            (r'[A-Za-z_]\w*', Name),
-            ("'", String.Single, combined('stringescape', 'sqs')),
-            ('"', String.Double, combined('stringescape', 'dqs'))
-        ],
-        'stringescape': [
-            (r'''\\([abfnrtv\\"']|\d{1,3})''', String.Escape)
-        ],
-        'sqs': [
-            ("'", String.Single, '#pop'),
-            ("[^']+", String)
-        ],
-        'dqs': [
-            ('"', String.Double, '#pop'),
-            ('[^"]+', String)
-        ]
-    }
-
-    def get_tokens_unprocessed(self, text):
-        # set . as Operator instead of Punctuation
-        for index, token, value in LuaLexer.get_tokens_unprocessed(self, text):
-            if token == Punctuation and value == ".":
-                token = Operator
-            yield index, token, value
-
-
-class ChaiscriptLexer(RegexLexer):
-    """
-    For ChaiScript source code.
-    """
-
-    name = 'ChaiScript'
-    url = 'http://chaiscript.com/'
-    aliases = ['chaiscript', 'chai']
-    filenames = ['*.chai']
-    mimetypes = ['text/x-chaiscript', 'application/x-chaiscript']
-    version_added = '2.0'
-
-    flags = re.DOTALL | re.MULTILINE
-
-    tokens = {
-        'commentsandwhitespace': [
-            (r'\s+', Text),
-            (r'//.*?\n', Comment.Single),
-            (r'/\*.*?\*/', Comment.Multiline),
-            (r'^\#.*?\n', Comment.Single)
-        ],
-        'slashstartsregex': [
-            include('commentsandwhitespace'),
-            (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/'
-             r'([gim]+\b|\B)', String.Regex, '#pop'),
-            (r'(?=/)', Text, ('#pop', 'badregex')),
-            default('#pop')
-        ],
-        'badregex': [
-            (r'\n', Text, '#pop')
-        ],
-        'root': [
-            include('commentsandwhitespace'),
-            (r'\n', Text),
-            (r'[^\S\n]+', Text),
-            (r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|\.\.'
-             r'(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'),
-            (r'[{(\[;,]', Punctuation, 'slashstartsregex'),
-            (r'[})\].]', Punctuation),
-            (r'[=+\-*/]', Operator),
-            (r'(for|in|while|do|break|return|continue|if|else|'
-             r'throw|try|catch'
-             r')\b', Keyword, 'slashstartsregex'),
-            (r'(var)\b', Keyword.Declaration, 'slashstartsregex'),
-            (r'(attr|def|fun)\b', Keyword.Reserved),
-            (r'(true|false)\b', Keyword.Constant),
-            (r'(eval|throw)\b', Name.Builtin),
-            (r'`\S+`', Name.Builtin),
-            (r'[$a-zA-Z_]\w*', Name.Other),
-            (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
-            (r'0x[0-9a-fA-F]+', Number.Hex),
-            (r'[0-9]+', Number.Integer),
-            (r'"', String.Double, 'dqstring'),
-            (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
-        ],
-        'dqstring': [
-            (r'\$\{[^"}]+?\}', String.Interpol),
-            (r'\$', String.Double),
-            (r'\\\\', String.Double),
-            (r'\\"', String.Double),
-            (r'[^\\"$]+', String.Double),
-            (r'"', String.Double, '#pop'),
-        ],
-    }
-
-
-class LSLLexer(RegexLexer):
-    """
-    For Second Life's Linden Scripting Language source code.
-    """
-
-    name = 'LSL'
-    aliases = ['lsl']
-    filenames = ['*.lsl']
-    mimetypes = ['text/x-lsl']
-    url = 'https://wiki.secondlife.com/wiki/Linden_Scripting_Language'
-    version_added = '2.0'
-
-    flags = re.MULTILINE
-
-    lsl_keywords = r'\b(?:do|else|for|if|jump|return|while)\b'
-    lsl_types = r'\b(?:float|integer|key|list|quaternion|rotation|string|vector)\b'
-    lsl_states = r'\b(?:(?:state)\s+\w+|default)\b'
-    lsl_events = r'\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\b'
-    lsl_functions_builtin = r'\b(?:ll(?:ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|RequestPermissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\b'
-    lsl_constants_float = r'\b(?:DEG_TO_RAD|PI(?:_BY_TWO)?|RAD_TO_DEG|SQRT2|TWO_PI)\b'
-    lsl_constants_integer = r'\b(?:JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASSIVE|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_EQUIVALENCE|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|ROO?T|VELOCITY|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|PATHFINDING_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?))|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE|SET_MODE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[A-D]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\b'
-    lsl_constants_integer_boolean = r'\b(?:FALSE|TRUE)\b'
-    lsl_constants_rotation = r'\b(?:ZERO_ROTATION)\b'
-    lsl_constants_string = r'\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\b'
-    lsl_constants_vector = r'\b(?:TOUCH_INVALID_(?:TEXCOORD|VECTOR)|ZERO_VECTOR)\b'
-    lsl_invalid_broken = r'\b(?:LAND_(?:LARGE|MEDIUM|SMALL)_BRUSH)\b'
-    lsl_invalid_deprecated = r'\b(?:ATTACH_[LR]PEC|DATA_RATING|OBJECT_ATTACHMENT_(?:GEOMETRY_BYTES|SURFACE_AREA)|PRIM_(?:CAST_SHADOWS|MATERIAL_LIGHT|TYPE_LEGACY)|PSYS_SRC_(?:INNER|OUTER)ANGLE|VEHICLE_FLAG_NO_FLY_UP|ll(?:Cloud|Make(?:Explosion|Fountain|Smoke|Fire)|RemoteDataSetRegion|Sound(?:Preload)?|XorBase64Strings(?:Correct)?))\b'
-    lsl_invalid_illegal = r'\b(?:event)\b'
-    lsl_invalid_unimplemented = r'\b(?:CHARACTER_(?:MAX_ANGULAR_(?:ACCEL|SPEED)|TURN_SPEED_MULTIPLIER)|PERMISSION_(?:CHANGE_(?:JOINTS|PERMISSIONS)|RELEASE_OWNERSHIP|REMAP_CONTROLS)|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|ll(?:CollisionSprite|(?:Stop)?PointAt|(?:(?:Refresh|Set)Prim)URL|(?:Take|Release)Camera|RemoteLoadScript))\b'
-    lsl_reserved_godmode = r'\b(?:ll(?:GodLikeRezObject|Set(?:Inventory|Object)PermMask))\b'
-    lsl_reserved_log = r'\b(?:print)\b'
-    lsl_operators = r'\+\+|\-\-|<<|>>|&&?|\|\|?|\^|~|[!%<>=*+\-/]=?'
-
-    tokens = {
-        'root':
-        [
-            (r'//.*?\n',                          Comment.Single),
-            (r'/\*',                              Comment.Multiline, 'comment'),
-            (r'"',                                String.Double, 'string'),
-            (lsl_keywords,                        Keyword),
-            (lsl_types,                           Keyword.Type),
-            (lsl_states,                          Name.Class),
-            (lsl_events,                          Name.Builtin),
-            (lsl_functions_builtin,               Name.Function),
-            (lsl_constants_float,                 Keyword.Constant),
-            (lsl_constants_integer,               Keyword.Constant),
-            (lsl_constants_integer_boolean,       Keyword.Constant),
-            (lsl_constants_rotation,              Keyword.Constant),
-            (lsl_constants_string,                Keyword.Constant),
-            (lsl_constants_vector,                Keyword.Constant),
-            (lsl_invalid_broken,                  Error),
-            (lsl_invalid_deprecated,              Error),
-            (lsl_invalid_illegal,                 Error),
-            (lsl_invalid_unimplemented,           Error),
-            (lsl_reserved_godmode,                Keyword.Reserved),
-            (lsl_reserved_log,                    Keyword.Reserved),
-            (r'\b([a-zA-Z_]\w*)\b',     Name.Variable),
-            (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d*', Number.Float),
-            (r'(\d+\.\d*|\.\d+)',                 Number.Float),
-            (r'0[xX][0-9a-fA-F]+',                Number.Hex),
-            (r'\d+',                              Number.Integer),
-            (lsl_operators,                       Operator),
-            (r':=?',                              Error),
-            (r'[,;{}()\[\]]',                     Punctuation),
-            (r'\n+',                              Whitespace),
-            (r'\s+',                              Whitespace)
-        ],
-        'comment':
-        [
-            (r'[^*/]+',                           Comment.Multiline),
-            (r'/\*',                              Comment.Multiline, '#push'),
-            (r'\*/',                              Comment.Multiline, '#pop'),
-            (r'[*/]',                             Comment.Multiline)
-        ],
-        'string':
-        [
-            (r'\\([nt"\\])',                      String.Escape),
-            (r'"',                                String.Double, '#pop'),
-            (r'\\.',                              Error),
-            (r'[^"\\]+',                          String.Double),
-        ]
-    }
-
-
-class AppleScriptLexer(RegexLexer):
-    """
-    For AppleScript source code,
-    including `AppleScript Studio
-    `_.
-    Contributed by Andreas Amann .
-    """
-
-    name = 'AppleScript'
-    url = 'https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html'
-    aliases = ['applescript']
-    filenames = ['*.applescript']
-    version_added = '1.0'
-
-    flags = re.MULTILINE | re.DOTALL
-
-    Identifiers = r'[a-zA-Z]\w*'
-
-    # XXX: use words() for all of these
-    Literals = ('AppleScript', 'current application', 'false', 'linefeed',
-                'missing value', 'pi', 'quote', 'result', 'return', 'space',
-                'tab', 'text item delimiters', 'true', 'version')
-    Classes = ('alias ', 'application ', 'boolean ', 'class ', 'constant ',
-               'date ', 'file ', 'integer ', 'list ', 'number ', 'POSIX file ',
-               'real ', 'record ', 'reference ', 'RGB color ', 'script ',
-               'text ', 'unit types', '(?:Unicode )?text', 'string')
-    BuiltIn = ('attachment', 'attribute run', 'character', 'day', 'month',
-               'paragraph', 'word', 'year')
-    HandlerParams = ('about', 'above', 'against', 'apart from', 'around',
-                     'aside from', 'at', 'below', 'beneath', 'beside',
-                     'between', 'for', 'given', 'instead of', 'on', 'onto',
-                     'out of', 'over', 'since')
-    Commands = ('ASCII (character|number)', 'activate', 'beep', 'choose URL',
-                'choose application', 'choose color', 'choose file( name)?',
-                'choose folder', 'choose from list',
-                'choose remote application', 'clipboard info',
-                'close( access)?', 'copy', 'count', 'current date', 'delay',
-                'delete', 'display (alert|dialog)', 'do shell script',
-                'duplicate', 'exists', 'get eof', 'get volume settings',
-                'info for', 'launch', 'list (disks|folder)', 'load script',
-                'log', 'make', 'mount volume', 'new', 'offset',
-                'open( (for access|location))?', 'path to', 'print', 'quit',
-                'random number', 'read', 'round', 'run( script)?',
-                'say', 'scripting components',
-                'set (eof|the clipboard to|volume)', 'store script',
-                'summarize', 'system attribute', 'system info',
-                'the clipboard', 'time to GMT', 'write', 'quoted form')
-    References = ('(in )?back of', '(in )?front of', '[0-9]+(st|nd|rd|th)',
-                  'first', 'second', 'third', 'fourth', 'fifth', 'sixth',
-                  'seventh', 'eighth', 'ninth', 'tenth', 'after', 'back',
-                  'before', 'behind', 'every', 'front', 'index', 'last',
-                  'middle', 'some', 'that', 'through', 'thru', 'where', 'whose')
-    Operators = ("and", "or", "is equal", "equals", "(is )?equal to", "is not",
-                 "isn't", "isn't equal( to)?", "is not equal( to)?",
-                 "doesn't equal", "does not equal", "(is )?greater than",
-                 "comes after", "is not less than or equal( to)?",
-                 "isn't less than or equal( to)?", "(is )?less than",
-                 "comes before", "is not greater than or equal( to)?",
-                 "isn't greater than or equal( to)?",
-                 "(is  )?greater than or equal( to)?", "is not less than",
-                 "isn't less than", "does not come before",
-                 "doesn't come before", "(is )?less than or equal( to)?",
-                 "is not greater than", "isn't greater than",
-                 "does not come after", "doesn't come after", "starts? with",
-                 "begins? with", "ends? with", "contains?", "does not contain",
-                 "doesn't contain", "is in", "is contained by", "is not in",
-                 "is not contained by", "isn't contained by", "div", "mod",
-                 "not", "(a  )?(ref( to)?|reference to)", "is", "does")
-    Control = ('considering', 'else', 'error', 'exit', 'from', 'if',
-               'ignoring', 'in', 'repeat', 'tell', 'then', 'times', 'to',
-               'try', 'until', 'using terms from', 'while', 'whith',
-               'with timeout( of)?', 'with transaction', 'by', 'continue',
-               'end', 'its?', 'me', 'my', 'return', 'of', 'as')
-    Declarations = ('global', 'local', 'prop(erty)?', 'set', 'get')
-    Reserved = ('but', 'put', 'returning', 'the')
-    StudioClasses = ('action cell', 'alert reply', 'application', 'box',
-                     'browser( cell)?', 'bundle', 'button( cell)?', 'cell',
-                     'clip view', 'color well', 'color-panel',
-                     'combo box( item)?', 'control',
-                     'data( (cell|column|item|row|source))?', 'default entry',
-                     'dialog reply', 'document', 'drag info', 'drawer',
-                     'event', 'font(-panel)?', 'formatter',
-                     'image( (cell|view))?', 'matrix', 'menu( item)?', 'item',
-                     'movie( view)?', 'open-panel', 'outline view', 'panel',
-                     'pasteboard', 'plugin', 'popup button',
-                     'progress indicator', 'responder', 'save-panel',
-                     'scroll view', 'secure text field( cell)?', 'slider',
-                     'sound', 'split view', 'stepper', 'tab view( item)?',
-                     'table( (column|header cell|header view|view))',
-                     'text( (field( cell)?|view))?', 'toolbar( item)?',
-                     'user-defaults', 'view', 'window')
-    StudioEvents = ('accept outline drop', 'accept table drop', 'action',
-                    'activated', 'alert ended', 'awake from nib', 'became key',
-                    'became main', 'begin editing', 'bounds changed',
-                    'cell value', 'cell value changed', 'change cell value',
-                    'change item value', 'changed', 'child of item',
-                    'choose menu item', 'clicked', 'clicked toolbar item',
-                    'closed', 'column clicked', 'column moved',
-                    'column resized', 'conclude drop', 'data representation',
-                    'deminiaturized', 'dialog ended', 'document nib name',
-                    'double clicked', 'drag( (entered|exited|updated))?',
-                    'drop', 'end editing', 'exposed', 'idle', 'item expandable',
-                    'item value', 'item value changed', 'items changed',
-                    'keyboard down', 'keyboard up', 'launched',
-                    'load data representation', 'miniaturized', 'mouse down',
-                    'mouse dragged', 'mouse entered', 'mouse exited',
-                    'mouse moved', 'mouse up', 'moved',
-                    'number of browser rows', 'number of items',
-                    'number of rows', 'open untitled', 'opened', 'panel ended',
-                    'parameters updated', 'plugin loaded', 'prepare drop',
-                    'prepare outline drag', 'prepare outline drop',
-                    'prepare table drag', 'prepare table drop',
-                    'read from file', 'resigned active', 'resigned key',
-                    'resigned main', 'resized( sub views)?',
-                    'right mouse down', 'right mouse dragged',
-                    'right mouse up', 'rows changed', 'scroll wheel',
-                    'selected tab view item', 'selection changed',
-                    'selection changing', 'should begin editing',
-                    'should close', 'should collapse item',
-                    'should end editing', 'should expand item',
-                    'should open( untitled)?',
-                    'should quit( after last window closed)?',
-                    'should select column', 'should select item',
-                    'should select row', 'should select tab view item',
-                    'should selection change', 'should zoom', 'shown',
-                    'update menu item', 'update parameters',
-                    'update toolbar item', 'was hidden', 'was miniaturized',
-                    'will become active', 'will close', 'will dismiss',
-                    'will display browser cell', 'will display cell',
-                    'will display item cell', 'will display outline cell',
-                    'will finish launching', 'will hide', 'will miniaturize',
-                    'will move', 'will open', 'will pop up', 'will quit',
-                    'will resign active', 'will resize( sub views)?',
-                    'will select tab view item', 'will show', 'will zoom',
-                    'write to file', 'zoomed')
-    StudioCommands = ('animate', 'append', 'call method', 'center',
-                      'close drawer', 'close panel', 'display',
-                      'display alert', 'display dialog', 'display panel', 'go',
-                      'hide', 'highlight', 'increment', 'item for',
-                      'load image', 'load movie', 'load nib', 'load panel',
-                      'load sound', 'localized string', 'lock focus', 'log',
-                      'open drawer', 'path for', 'pause', 'perform action',
-                      'play', 'register', 'resume', 'scroll', 'select( all)?',
-                      'show', 'size to fit', 'start', 'step back',
-                      'step forward', 'stop', 'synchronize', 'unlock focus',
-                      'update')
-    StudioProperties = ('accepts arrow key', 'action method', 'active',
-                        'alignment', 'allowed identifiers',
-                        'allows branch selection', 'allows column reordering',
-                        'allows column resizing', 'allows column selection',
-                        'allows customization',
-                        'allows editing text attributes',
-                        'allows empty selection', 'allows mixed state',
-                        'allows multiple selection', 'allows reordering',
-                        'allows undo', 'alpha( value)?', 'alternate image',
-                        'alternate increment value', 'alternate title',
-                        'animation delay', 'associated file name',
-                        'associated object', 'auto completes', 'auto display',
-                        'auto enables items', 'auto repeat',
-                        'auto resizes( outline column)?',
-                        'auto save expanded items', 'auto save name',
-                        'auto save table columns', 'auto saves configuration',
-                        'auto scroll', 'auto sizes all columns to fit',
-                        'auto sizes cells', 'background color', 'bezel state',
-                        'bezel style', 'bezeled', 'border rect', 'border type',
-                        'bordered', 'bounds( rotation)?', 'box type',
-                        'button returned', 'button type',
-                        'can choose directories', 'can choose files',
-                        'can draw', 'can hide',
-                        'cell( (background color|size|type))?', 'characters',
-                        'class', 'click count', 'clicked( data)? column',
-                        'clicked data item', 'clicked( data)? row',
-                        'closeable', 'collating', 'color( (mode|panel))',
-                        'command key down', 'configuration',
-                        'content(s| (size|view( margins)?))?', 'context',
-                        'continuous', 'control key down', 'control size',
-                        'control tint', 'control view',
-                        'controller visible', 'coordinate system',
-                        'copies( on scroll)?', 'corner view', 'current cell',
-                        'current column', 'current( field)?  editor',
-                        'current( menu)? item', 'current row',
-                        'current tab view item', 'data source',
-                        'default identifiers', 'delta (x|y|z)',
-                        'destination window', 'directory', 'display mode',
-                        'displayed cell', 'document( (edited|rect|view))?',
-                        'double value', 'dragged column', 'dragged distance',
-                        'dragged items', 'draws( cell)? background',
-                        'draws grid', 'dynamically scrolls', 'echos bullets',
-                        'edge', 'editable', 'edited( data)? column',
-                        'edited data item', 'edited( data)? row', 'enabled',
-                        'enclosing scroll view', 'ending page',
-                        'error handling', 'event number', 'event type',
-                        'excluded from windows menu', 'executable path',
-                        'expanded', 'fax number', 'field editor', 'file kind',
-                        'file name', 'file type', 'first responder',
-                        'first visible column', 'flipped', 'floating',
-                        'font( panel)?', 'formatter', 'frameworks path',
-                        'frontmost', 'gave up', 'grid color', 'has data items',
-                        'has horizontal ruler', 'has horizontal scroller',
-                        'has parent data item', 'has resize indicator',
-                        'has shadow', 'has sub menu', 'has vertical ruler',
-                        'has vertical scroller', 'header cell', 'header view',
-                        'hidden', 'hides when deactivated', 'highlights by',
-                        'horizontal line scroll', 'horizontal page scroll',
-                        'horizontal ruler view', 'horizontally resizable',
-                        'icon image', 'id', 'identifier',
-                        'ignores multiple clicks',
-                        'image( (alignment|dims when disabled|frame style|scaling))?',
-                        'imports graphics', 'increment value',
-                        'indentation per level', 'indeterminate', 'index',
-                        'integer value', 'intercell spacing', 'item height',
-                        'key( (code|equivalent( modifier)?|window))?',
-                        'knob thickness', 'label', 'last( visible)? column',
-                        'leading offset', 'leaf', 'level', 'line scroll',
-                        'loaded', 'localized sort', 'location', 'loop mode',
-                        'main( (bunde|menu|window))?', 'marker follows cell',
-                        'matrix mode', 'maximum( content)? size',
-                        'maximum visible columns',
-                        'menu( form representation)?', 'miniaturizable',
-                        'miniaturized', 'minimized image', 'minimized title',
-                        'minimum column width', 'minimum( content)? size',
-                        'modal', 'modified', 'mouse down state',
-                        'movie( (controller|file|rect))?', 'muted', 'name',
-                        'needs display', 'next state', 'next text',
-                        'number of tick marks', 'only tick mark values',
-                        'opaque', 'open panel', 'option key down',
-                        'outline table column', 'page scroll', 'pages across',
-                        'pages down', 'palette label', 'pane splitter',
-                        'parent data item', 'parent window', 'pasteboard',
-                        'path( (names|separator))?', 'playing',
-                        'plays every frame', 'plays selection only', 'position',
-                        'preferred edge', 'preferred type', 'pressure',
-                        'previous text', 'prompt', 'properties',
-                        'prototype cell', 'pulls down', 'rate',
-                        'released when closed', 'repeated',
-                        'requested print time', 'required file type',
-                        'resizable', 'resized column', 'resource path',
-                        'returns records', 'reuses columns', 'rich text',
-                        'roll over', 'row height', 'rulers visible',
-                        'save panel', 'scripts path', 'scrollable',
-                        'selectable( identifiers)?', 'selected cell',
-                        'selected( data)? columns?', 'selected data items?',
-                        'selected( data)? rows?', 'selected item identifier',
-                        'selection by rect', 'send action on arrow key',
-                        'sends action when done editing', 'separates columns',
-                        'separator item', 'sequence number', 'services menu',
-                        'shared frameworks path', 'shared support path',
-                        'sheet', 'shift key down', 'shows alpha',
-                        'shows state by', 'size( mode)?',
-                        'smart insert delete enabled', 'sort case sensitivity',
-                        'sort column', 'sort order', 'sort type',
-                        'sorted( data rows)?', 'sound', 'source( mask)?',
-                        'spell checking enabled', 'starting page', 'state',
-                        'string value', 'sub menu', 'super menu', 'super view',
-                        'tab key traverses cells', 'tab state', 'tab type',
-                        'tab view', 'table view', 'tag', 'target( printer)?',
-                        'text color', 'text container insert',
-                        'text container origin', 'text returned',
-                        'tick mark position', 'time stamp',
-                        'title(d| (cell|font|height|position|rect))?',
-                        'tool tip', 'toolbar', 'trailing offset', 'transparent',
-                        'treat packages as directories', 'truncated labels',
-                        'types', 'unmodified characters', 'update views',
-                        'use sort indicator', 'user defaults',
-                        'uses data source', 'uses ruler',
-                        'uses threaded animation',
-                        'uses title from previous column', 'value wraps',
-                        'version',
-                        'vertical( (line scroll|page scroll|ruler view))?',
-                        'vertically resizable', 'view',
-                        'visible( document rect)?', 'volume', 'width', 'window',
-                        'windows menu', 'wraps', 'zoomable', 'zoomed')
-
-    tokens = {
-        'root': [
-            (r'\s+', Text),
-            (r'¬\n', String.Escape),
-            (r"'s\s+", Text),  # This is a possessive, consider moving
-            (r'(--|#).*?$', Comment),
-            (r'\(\*', Comment.Multiline, 'comment'),
-            (r'[(){}!,.:]', Punctuation),
-            (r'(«)([^»]+)(»)',
-             bygroups(Text, Name.Builtin, Text)),
-            (r'\b((?:considering|ignoring)\s*)'
-             r'(application responses|case|diacriticals|hyphens|'
-             r'numeric strings|punctuation|white space)',
-             bygroups(Keyword, Name.Builtin)),
-            (r'(-|\*|\+|&|≠|>=?|<=?|=|≥|≤|/|÷|\^)', Operator),
-            (r"\b({})\b".format('|'.join(Operators)), Operator.Word),
-            (r'^(\s*(?:on|end)\s+)'
-             r'({})'.format('|'.join(StudioEvents[::-1])),
-             bygroups(Keyword, Name.Function)),
-            (r'^(\s*)(in|on|script|to)(\s+)', bygroups(Text, Keyword, Text)),
-            (r'\b(as )({})\b'.format('|'.join(Classes)),
-             bygroups(Keyword, Name.Class)),
-            (r'\b({})\b'.format('|'.join(Literals)), Name.Constant),
-            (r'\b({})\b'.format('|'.join(Commands)), Name.Builtin),
-            (r'\b({})\b'.format('|'.join(Control)), Keyword),
-            (r'\b({})\b'.format('|'.join(Declarations)), Keyword),
-            (r'\b({})\b'.format('|'.join(Reserved)), Name.Builtin),
-            (r'\b({})s?\b'.format('|'.join(BuiltIn)), Name.Builtin),
-            (r'\b({})\b'.format('|'.join(HandlerParams)), Name.Builtin),
-            (r'\b({})\b'.format('|'.join(StudioProperties)), Name.Attribute),
-            (r'\b({})s?\b'.format('|'.join(StudioClasses)), Name.Builtin),
-            (r'\b({})\b'.format('|'.join(StudioCommands)), Name.Builtin),
-            (r'\b({})\b'.format('|'.join(References)), Name.Builtin),
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
-            (rf'\b({Identifiers})\b', Name.Variable),
-            (r'[-+]?(\d+\.\d*|\d*\.\d+)(E[-+][0-9]+)?', Number.Float),
-            (r'[-+]?\d+', Number.Integer),
-        ],
-        'comment': [
-            (r'\(\*', Comment.Multiline, '#push'),
-            (r'\*\)', Comment.Multiline, '#pop'),
-            ('[^*(]+', Comment.Multiline),
-            ('[*(]', Comment.Multiline),
-        ],
-    }
-
-
-class RexxLexer(RegexLexer):
-    """
-    Rexx is a scripting language available for
-    a wide range of different platforms with its roots found on mainframe
-    systems. It is popular for I/O- and data based tasks and can act as glue
-    language to bind different applications together.
-    """
-    name = 'Rexx'
-    url = 'http://www.rexxinfo.org/'
-    aliases = ['rexx', 'arexx']
-    filenames = ['*.rexx', '*.rex', '*.rx', '*.arexx']
-    mimetypes = ['text/x-rexx']
-    version_added = '2.0'
-    flags = re.IGNORECASE
-
-    tokens = {
-        'root': [
-            (r'\s+', Whitespace),
-            (r'/\*', Comment.Multiline, 'comment'),
-            (r'"', String, 'string_double'),
-            (r"'", String, 'string_single'),
-            (r'[0-9]+(\.[0-9]+)?(e[+-]?[0-9])?', Number),
-            (r'([a-z_]\w*)(\s*)(:)(\s*)(procedure)\b',
-             bygroups(Name.Function, Whitespace, Operator, Whitespace,
-                      Keyword.Declaration)),
-            (r'([a-z_]\w*)(\s*)(:)',
-             bygroups(Name.Label, Whitespace, Operator)),
-            include('function'),
-            include('keyword'),
-            include('operator'),
-            (r'[a-z_]\w*', Text),
-        ],
-        'function': [
-            (words((
-                'abbrev', 'abs', 'address', 'arg', 'b2x', 'bitand', 'bitor', 'bitxor',
-                'c2d', 'c2x', 'center', 'charin', 'charout', 'chars', 'compare',
-                'condition', 'copies', 'd2c', 'd2x', 'datatype', 'date', 'delstr',
-                'delword', 'digits', 'errortext', 'form', 'format', 'fuzz', 'insert',
-                'lastpos', 'left', 'length', 'linein', 'lineout', 'lines', 'max',
-                'min', 'overlay', 'pos', 'queued', 'random', 'reverse', 'right', 'sign',
-                'sourceline', 'space', 'stream', 'strip', 'substr', 'subword', 'symbol',
-                'time', 'trace', 'translate', 'trunc', 'value', 'verify', 'word',
-                'wordindex', 'wordlength', 'wordpos', 'words', 'x2b', 'x2c', 'x2d',
-                'xrange'), suffix=r'(\s*)(\()'),
-             bygroups(Name.Builtin, Whitespace, Operator)),
-        ],
-        'keyword': [
-            (r'(address|arg|by|call|do|drop|else|end|exit|for|forever|if|'
-             r'interpret|iterate|leave|nop|numeric|off|on|options|parse|'
-             r'pull|push|queue|return|say|select|signal|to|then|trace|until|'
-             r'while)\b', Keyword.Reserved),
-        ],
-        'operator': [
-            (r'(-|//|/|\(|\)|\*\*|\*|\\<<|\\<|\\==|\\=|\\>>|\\>|\\|\|\||\||'
-             r'&&|&|%|\+|<<=|<<|<=|<>|<|==|=|><|>=|>>=|>>|>|¬<<|¬<|¬==|¬=|'
-             r'¬>>|¬>|¬|\.|,)', Operator),
-        ],
-        'string_double': [
-            (r'[^"\n]+', String),
-            (r'""', String),
-            (r'"', String, '#pop'),
-            (r'\n', Text, '#pop'),  # Stray linefeed also terminates strings.
-        ],
-        'string_single': [
-            (r'[^\'\n]+', String),
-            (r'\'\'', String),
-            (r'\'', String, '#pop'),
-            (r'\n', Text, '#pop'),  # Stray linefeed also terminates strings.
-        ],
-        'comment': [
-            (r'[^*]+', Comment.Multiline),
-            (r'\*/', Comment.Multiline, '#pop'),
-            (r'\*', Comment.Multiline),
-        ]
-    }
-
-    def _c(s):
-        return re.compile(s, re.MULTILINE)
-    _ADDRESS_COMMAND_PATTERN = _c(r'^\s*address\s+command\b')
-    _ADDRESS_PATTERN = _c(r'^\s*address\s+')
-    _DO_WHILE_PATTERN = _c(r'^\s*do\s+while\b')
-    _IF_THEN_DO_PATTERN = _c(r'^\s*if\b.+\bthen\s+do\s*$')
-    _PROCEDURE_PATTERN = _c(r'^\s*([a-z_]\w*)(\s*)(:)(\s*)(procedure)\b')
-    _ELSE_DO_PATTERN = _c(r'\belse\s+do\s*$')
-    _PARSE_ARG_PATTERN = _c(r'^\s*parse\s+(upper\s+)?(arg|value)\b')
-    PATTERNS_AND_WEIGHTS = (
-        (_ADDRESS_COMMAND_PATTERN, 0.2),
-        (_ADDRESS_PATTERN, 0.05),
-        (_DO_WHILE_PATTERN, 0.1),
-        (_ELSE_DO_PATTERN, 0.1),
-        (_IF_THEN_DO_PATTERN, 0.1),
-        (_PROCEDURE_PATTERN, 0.5),
-        (_PARSE_ARG_PATTERN, 0.2),
-    )
-
-    def analyse_text(text):
-        """
-        Check for initial comment and patterns that distinguish Rexx from other
-        C-like languages.
-        """
-        if re.search(r'/\*\**\s*rexx', text, re.IGNORECASE):
-            # Header matches MVS Rexx requirements, this is certainly a Rexx
-            # script.
-            return 1.0
-        elif text.startswith('/*'):
-            # Header matches general Rexx requirements; the source code might
-            # still be any language using C comments such as C++, C# or Java.
-            lowerText = text.lower()
-            result = sum(weight
-                         for (pattern, weight) in RexxLexer.PATTERNS_AND_WEIGHTS
-                         if pattern.search(lowerText)) + 0.01
-            return min(result, 1.0)
-
-
-class MOOCodeLexer(RegexLexer):
-    """
-    For MOOCode (the MOO scripting language).
-    """
-    name = 'MOOCode'
-    url = 'http://www.moo.mud.org/'
-    filenames = ['*.moo']
-    aliases = ['moocode', 'moo']
-    mimetypes = ['text/x-moocode']
-    version_added = '0.9'
-
-    tokens = {
-        'root': [
-            # Numbers
-            (r'(0|[1-9][0-9_]*)', Number.Integer),
-            # Strings
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
-            # exceptions
-            (r'(E_PERM|E_DIV)', Name.Exception),
-            # db-refs
-            (r'((#[-0-9]+)|(\$\w+))', Name.Entity),
-            # Keywords
-            (r'\b(if|else|elseif|endif|for|endfor|fork|endfork|while'
-             r'|endwhile|break|continue|return|try'
-             r'|except|endtry|finally|in)\b', Keyword),
-            # builtins
-            (r'(random|length)', Name.Builtin),
-            # special variables
-            (r'(player|caller|this|args)', Name.Variable.Instance),
-            # skip whitespace
-            (r'\s+', Text),
-            (r'\n', Text),
-            # other operators
-            (r'([!;=,{}&|:.\[\]@()<>?]+)', Operator),
-            # function call
-            (r'(\w+)(\()', bygroups(Name.Function, Operator)),
-            # variables
-            (r'(\w+)', Text),
-        ]
-    }
-
-
-class HybrisLexer(RegexLexer):
-    """
-    For Hybris source code.
-    """
-
-    name = 'Hybris'
-    aliases = ['hybris']
-    filenames = ['*.hyb']
-    mimetypes = ['text/x-hybris', 'application/x-hybris']
-    url = 'https://github.com/evilsocket/hybris'
-    version_added = '1.4'
-
-    flags = re.MULTILINE | re.DOTALL
-
-    tokens = {
-        'root': [
-            # method names
-            (r'^(\s*(?:function|method|operator\s+)+?)'
-             r'([a-zA-Z_]\w*)'
-             r'(\s*)(\()', bygroups(Keyword, Name.Function, Text, Operator)),
-            (r'[^\S\n]+', Text),
-            (r'//.*?\n', Comment.Single),
-            (r'/\*.*?\*/', Comment.Multiline),
-            (r'@[a-zA-Z_][\w.]*', Name.Decorator),
-            (r'(break|case|catch|next|default|do|else|finally|for|foreach|of|'
-             r'unless|if|new|return|switch|me|throw|try|while)\b', Keyword),
-            (r'(extends|private|protected|public|static|throws|function|method|'
-             r'operator)\b', Keyword.Declaration),
-            (r'(true|false|null|__FILE__|__LINE__|__VERSION__|__LIB_PATH__|'
-             r'__INC_PATH__)\b', Keyword.Constant),
-            (r'(class|struct)(\s+)',
-             bygroups(Keyword.Declaration, Text), 'class'),
-            (r'(import|include)(\s+)',
-             bygroups(Keyword.Namespace, Text), 'import'),
-            (words((
-                'gc_collect', 'gc_mm_items', 'gc_mm_usage', 'gc_collect_threshold',
-                'urlencode', 'urldecode', 'base64encode', 'base64decode', 'sha1', 'crc32',
-                'sha2', 'md5', 'md5_file', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos',
-                'cosh', 'exp', 'fabs', 'floor', 'fmod', 'log', 'log10', 'pow', 'sin',
-                'sinh', 'sqrt', 'tan', 'tanh', 'isint', 'isfloat', 'ischar', 'isstring',
-                'isarray', 'ismap', 'isalias', 'typeof', 'sizeof', 'toint', 'tostring',
-                'fromxml', 'toxml', 'binary', 'pack', 'load', 'eval', 'var_names',
-                'var_values', 'user_functions', 'dyn_functions', 'methods', 'call',
-                'call_method', 'mknod', 'mkfifo', 'mount', 'umount2', 'umount', 'ticks',
-                'usleep', 'sleep', 'time', 'strtime', 'strdate', 'dllopen', 'dlllink',
-                'dllcall', 'dllcall_argv', 'dllclose', 'env', 'exec', 'fork', 'getpid',
-                'wait', 'popen', 'pclose', 'exit', 'kill', 'pthread_create',
-                'pthread_create_argv', 'pthread_exit', 'pthread_join', 'pthread_kill',
-                'smtp_send', 'http_get', 'http_post', 'http_download', 'socket', 'bind',
-                'listen', 'accept', 'getsockname', 'getpeername', 'settimeout', 'connect',
-                'server', 'recv', 'send', 'close', 'print', 'println', 'printf', 'input',
-                'readline', 'serial_open', 'serial_fcntl', 'serial_get_attr',
-                'serial_get_ispeed', 'serial_get_ospeed', 'serial_set_attr',
-                'serial_set_ispeed', 'serial_set_ospeed', 'serial_write', 'serial_read',
-                'serial_close', 'xml_load', 'xml_parse', 'fopen', 'fseek', 'ftell',
-                'fsize', 'fread', 'fwrite', 'fgets', 'fclose', 'file', 'readdir',
-                'pcre_replace', 'size', 'pop', 'unmap', 'has', 'keys', 'values',
-                'length', 'find', 'substr', 'replace', 'split', 'trim', 'remove',
-                'contains', 'join'), suffix=r'\b'),
-             Name.Builtin),
-            (words((
-                'MethodReference', 'Runner', 'Dll', 'Thread', 'Pipe', 'Process',
-                'Runnable', 'CGI', 'ClientSocket', 'Socket', 'ServerSocket',
-                'File', 'Console', 'Directory', 'Exception'), suffix=r'\b'),
-             Keyword.Type),
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
-            (r"'\\.'|'[^\\]'|'\\u[0-9a-f]{4}'", String.Char),
-            (r'(\.)([a-zA-Z_]\w*)',
-             bygroups(Operator, Name.Attribute)),
-            (r'[a-zA-Z_]\w*:', Name.Label),
-            (r'[a-zA-Z_$]\w*', Name),
-            (r'[~^*!%&\[\](){}<>|+=:;,./?\-@]+', Operator),
-            (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
-            (r'0x[0-9a-f]+', Number.Hex),
-            (r'[0-9]+L?', Number.Integer),
-            (r'\n', Text),
-        ],
-        'class': [
-            (r'[a-zA-Z_]\w*', Name.Class, '#pop')
-        ],
-        'import': [
-            (r'[\w.]+\*?', Name.Namespace, '#pop')
-        ],
-    }
-
-    def analyse_text(text):
-        """public method and private method don't seem to be quite common
-        elsewhere."""
-        result = 0
-        if re.search(r'\b(?:public|private)\s+method\b', text):
-            result += 0.01
-        return result
-
-
-
-class EasytrieveLexer(RegexLexer):
-    """
-    Easytrieve Plus is a programming language for extracting, filtering and
-    converting sequential data. Furthermore it can layout data for reports.
-    It is mainly used on mainframe platforms and can access several of the
-    mainframe's native file formats. It is somewhat comparable to awk.
-    """
-    name = 'Easytrieve'
-    aliases = ['easytrieve']
-    filenames = ['*.ezt', '*.mac']
-    mimetypes = ['text/x-easytrieve']
-    url = 'https://www.broadcom.com/products/mainframe/application-development/easytrieve-report-generator'
-    version_added = '2.1'
-    flags = 0
-
-    # Note: We cannot use r'\b' at the start and end of keywords because
-    # Easytrieve Plus delimiter characters are:
-    #
-    #   * space ( )
-    #   * apostrophe (')
-    #   * period (.)
-    #   * comma (,)
-    #   * parenthesis ( and )
-    #   * colon (:)
-    #
-    # Additionally words end once a '*' appears, indicatins a comment.
-    _DELIMITERS = r' \'.,():\n'
-    _DELIMITERS_OR_COMENT = _DELIMITERS + '*'
-    _DELIMITER_PATTERN = '[' + _DELIMITERS + ']'
-    _DELIMITER_PATTERN_CAPTURE = '(' + _DELIMITER_PATTERN + ')'
-    _NON_DELIMITER_OR_COMMENT_PATTERN = '[^' + _DELIMITERS_OR_COMENT + ']'
-    _OPERATORS_PATTERN = '[.+\\-/=\\[\\](){}<>;,&%¬]'
-    _KEYWORDS = [
-        'AFTER-BREAK', 'AFTER-LINE', 'AFTER-SCREEN', 'AIM', 'AND', 'ATTR',
-        'BEFORE', 'BEFORE-BREAK', 'BEFORE-LINE', 'BEFORE-SCREEN', 'BUSHU',
-        'BY', 'CALL', 'CASE', 'CHECKPOINT', 'CHKP', 'CHKP-STATUS', 'CLEAR',
-        'CLOSE', 'COL', 'COLOR', 'COMMIT', 'CONTROL', 'COPY', 'CURSOR', 'D',
-        'DECLARE', 'DEFAULT', 'DEFINE', 'DELETE', 'DENWA', 'DISPLAY', 'DLI',
-        'DO', 'DUPLICATE', 'E', 'ELSE', 'ELSE-IF', 'END', 'END-CASE',
-        'END-DO', 'END-IF', 'END-PROC', 'ENDPAGE', 'ENDTABLE', 'ENTER', 'EOF',
-        'EQ', 'ERROR', 'EXIT', 'EXTERNAL', 'EZLIB', 'F1', 'F10', 'F11', 'F12',
-        'F13', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19', 'F2', 'F20', 'F21',
-        'F22', 'F23', 'F24', 'F25', 'F26', 'F27', 'F28', 'F29', 'F3', 'F30',
-        'F31', 'F32', 'F33', 'F34', 'F35', 'F36', 'F4', 'F5', 'F6', 'F7',
-        'F8', 'F9', 'FETCH', 'FILE-STATUS', 'FILL', 'FINAL', 'FIRST',
-        'FIRST-DUP', 'FOR', 'GE', 'GET', 'GO', 'GOTO', 'GQ', 'GR', 'GT',
-        'HEADING', 'HEX', 'HIGH-VALUES', 'IDD', 'IDMS', 'IF', 'IN', 'INSERT',
-        'JUSTIFY', 'KANJI-DATE', 'KANJI-DATE-LONG', 'KANJI-TIME', 'KEY',
-        'KEY-PRESSED', 'KOKUGO', 'KUN', 'LAST-DUP', 'LE', 'LEVEL', 'LIKE',
-        'LINE', 'LINE-COUNT', 'LINE-NUMBER', 'LINK', 'LIST', 'LOW-VALUES',
-        'LQ', 'LS', 'LT', 'MACRO', 'MASK', 'MATCHED', 'MEND', 'MESSAGE',
-        'MOVE', 'MSTART', 'NE', 'NEWPAGE', 'NOMASK', 'NOPRINT', 'NOT',
-        'NOTE', 'NOVERIFY', 'NQ', 'NULL', 'OF', 'OR', 'OTHERWISE', 'PA1',
-        'PA2', 'PA3', 'PAGE-COUNT', 'PAGE-NUMBER', 'PARM-REGISTER',
-        'PATH-ID', 'PATTERN', 'PERFORM', 'POINT', 'POS', 'PRIMARY', 'PRINT',
-        'PROCEDURE', 'PROGRAM', 'PUT', 'READ', 'RECORD', 'RECORD-COUNT',
-        'RECORD-LENGTH', 'REFRESH', 'RELEASE', 'RENUM', 'REPEAT', 'REPORT',
-        'REPORT-INPUT', 'RESHOW', 'RESTART', 'RETRIEVE', 'RETURN-CODE',
-        'ROLLBACK', 'ROW', 'S', 'SCREEN', 'SEARCH', 'SECONDARY', 'SELECT',
-        'SEQUENCE', 'SIZE', 'SKIP', 'SOKAKU', 'SORT', 'SQL', 'STOP', 'SUM',
-        'SYSDATE', 'SYSDATE-LONG', 'SYSIN', 'SYSIPT', 'SYSLST', 'SYSPRINT',
-        'SYSSNAP', 'SYSTIME', 'TALLY', 'TERM-COLUMNS', 'TERM-NAME',
-        'TERM-ROWS', 'TERMINATION', 'TITLE', 'TO', 'TRANSFER', 'TRC',
-        'UNIQUE', 'UNTIL', 'UPDATE', 'UPPERCASE', 'USER', 'USERID', 'VALUE',
-        'VERIFY', 'W', 'WHEN', 'WHILE', 'WORK', 'WRITE', 'X', 'XDM', 'XRST'
-    ]
-
-    tokens = {
-        'root': [
-            (r'\*.*\n', Comment.Single),
-            (r'\n+', Whitespace),
-            # Macro argument
-            (r'&' + _NON_DELIMITER_OR_COMMENT_PATTERN + r'+\.', Name.Variable,
-             'after_macro_argument'),
-            # Macro call
-            (r'%' + _NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name.Variable),
-            (r'(FILE|MACRO|REPORT)(\s+)',
-             bygroups(Keyword.Declaration, Whitespace), 'after_declaration'),
-            (r'(JOB|PARM)' + r'(' + _DELIMITER_PATTERN + r')',
-             bygroups(Keyword.Declaration, Operator)),
-            (words(_KEYWORDS, suffix=_DELIMITER_PATTERN_CAPTURE),
-             bygroups(Keyword.Reserved, Operator)),
-            (_OPERATORS_PATTERN, Operator),
-            # Procedure declaration
-            (r'(' + _NON_DELIMITER_OR_COMMENT_PATTERN + r'+)(\s*)(\.?)(\s*)(PROC)(\s*\n)',
-             bygroups(Name.Function, Whitespace, Operator, Whitespace,
-                      Keyword.Declaration, Whitespace)),
-            (r'[0-9]+\.[0-9]*', Number.Float),
-            (r'[0-9]+', Number.Integer),
-            (r"'(''|[^'])*'", String),
-            (r'\s+', Whitespace),
-            # Everything else just belongs to a name
-            (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name),
-         ],
-        'after_declaration': [
-            (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name.Function),
-            default('#pop'),
-        ],
-        'after_macro_argument': [
-            (r'\*.*\n', Comment.Single, '#pop'),
-            (r'\s+', Whitespace, '#pop'),
-            (_OPERATORS_PATTERN, Operator, '#pop'),
-            (r"'(''|[^'])*'", String, '#pop'),
-            # Everything else just belongs to a name
-            (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name),
-        ],
-    }
-    _COMMENT_LINE_REGEX = re.compile(r'^\s*\*')
-    _MACRO_HEADER_REGEX = re.compile(r'^\s*MACRO')
-
-    def analyse_text(text):
-        """
-        Perform a structural analysis for basic Easytrieve constructs.
-        """
-        result = 0.0
-        lines = text.split('\n')
-        hasEndProc = False
-        hasHeaderComment = False
-        hasFile = False
-        hasJob = False
-        hasProc = False
-        hasParm = False
-        hasReport = False
-
-        def isCommentLine(line):
-            return EasytrieveLexer._COMMENT_LINE_REGEX.match(lines[0]) is not None
-
-        def isEmptyLine(line):
-            return not bool(line.strip())
-
-        # Remove possible empty lines and header comments.
-        while lines and (isEmptyLine(lines[0]) or isCommentLine(lines[0])):
-            if not isEmptyLine(lines[0]):
-                hasHeaderComment = True
-            del lines[0]
-
-        if EasytrieveLexer._MACRO_HEADER_REGEX.match(lines[0]):
-            # Looks like an Easytrieve macro.
-            result = 0.4
-            if hasHeaderComment:
-                result += 0.4
-        else:
-            # Scan the source for lines starting with indicators.
-            for line in lines:
-                words = line.split()
-                if (len(words) >= 2):
-                    firstWord = words[0]
-                    if not hasReport:
-                        if not hasJob:
-                            if not hasFile:
-                                if not hasParm:
-                                    if firstWord == 'PARM':
-                                        hasParm = True
-                                if firstWord == 'FILE':
-                                    hasFile = True
-                            if firstWord == 'JOB':
-                                hasJob = True
-                        elif firstWord == 'PROC':
-                            hasProc = True
-                        elif firstWord == 'END-PROC':
-                            hasEndProc = True
-                        elif firstWord == 'REPORT':
-                            hasReport = True
-
-            # Weight the findings.
-            if hasJob and (hasProc == hasEndProc):
-                if hasHeaderComment:
-                    result += 0.1
-                if hasParm:
-                    if hasProc:
-                        # Found PARM, JOB and PROC/END-PROC:
-                        # pretty sure this is Easytrieve.
-                        result += 0.8
-                    else:
-                        # Found PARAM and  JOB: probably this is Easytrieve
-                        result += 0.5
-                else:
-                    # Found JOB and possibly other keywords: might be Easytrieve
-                    result += 0.11
-                    if hasParm:
-                        # Note: PARAM is not a proper English word, so this is
-                        # regarded a much better indicator for Easytrieve than
-                        # the other words.
-                        result += 0.2
-                    if hasFile:
-                        result += 0.01
-                    if hasReport:
-                        result += 0.01
-        assert 0.0 <= result <= 1.0
-        return result
-
-
-class JclLexer(RegexLexer):
-    """
-    Job Control Language (JCL)
-    is a scripting language used on mainframe platforms to instruct the system
-    on how to run a batch job or start a subsystem. It is somewhat
-    comparable to MS DOS batch and Unix shell scripts.
-    """
-    name = 'JCL'
-    aliases = ['jcl']
-    filenames = ['*.jcl']
-    mimetypes = ['text/x-jcl']
-    url = 'https://en.wikipedia.org/wiki/Job_Control_Language'
-    version_added = '2.1'
-
-    flags = re.IGNORECASE
-
-    tokens = {
-        'root': [
-            (r'//\*.*\n', Comment.Single),
-            (r'//', Keyword.Pseudo, 'statement'),
-            (r'/\*', Keyword.Pseudo, 'jes2_statement'),
-            # TODO: JES3 statement
-            (r'.*\n', Other)  # Input text or inline code in any language.
-        ],
-        'statement': [
-            (r'\s*\n', Whitespace, '#pop'),
-            (r'([a-z]\w*)(\s+)(exec|job)(\s*)',
-             bygroups(Name.Label, Whitespace, Keyword.Reserved, Whitespace),
-             'option'),
-            (r'[a-z]\w*', Name.Variable, 'statement_command'),
-            (r'\s+', Whitespace, 'statement_command'),
-        ],
-        'statement_command': [
-            (r'\s+(command|cntl|dd|endctl|endif|else|include|jcllib|'
-             r'output|pend|proc|set|then|xmit)\s+', Keyword.Reserved, 'option'),
-            include('option')
-        ],
-        'jes2_statement': [
-            (r'\s*\n', Whitespace, '#pop'),
-            (r'\$', Keyword, 'option'),
-            (r'\b(jobparam|message|netacct|notify|output|priority|route|'
-             r'setup|signoff|xeq|xmit)\b', Keyword, 'option'),
-        ],
-        'option': [
-            # (r'\n', Text, 'root'),
-            (r'\*', Name.Builtin),
-            (r'[\[\](){}<>;,]', Punctuation),
-            (r'[-+*/=&%]', Operator),
-            (r'[a-z_]\w*', Name),
-            (r'\d+\.\d*', Number.Float),
-            (r'\.\d+', Number.Float),
-            (r'\d+', Number.Integer),
-            (r"'", String, 'option_string'),
-            (r'[ \t]+', Whitespace, 'option_comment'),
-            (r'\.', Punctuation),
-        ],
-        'option_string': [
-            (r"(\n)(//)", bygroups(Text, Keyword.Pseudo)),
-            (r"''", String),
-            (r"[^']", String),
-            (r"'", String, '#pop'),
-        ],
-        'option_comment': [
-            # (r'\n', Text, 'root'),
-            (r'.+', Comment.Single),
-        ]
-    }
-
-    _JOB_HEADER_PATTERN = re.compile(r'^//[a-z#$@][a-z0-9#$@]{0,7}\s+job(\s+.*)?$',
-                                     re.IGNORECASE)
-
-    def analyse_text(text):
-        """
-        Recognize JCL job by header.
-        """
-        result = 0.0
-        lines = text.split('\n')
-        if len(lines) > 0:
-            if JclLexer._JOB_HEADER_PATTERN.match(lines[0]):
-                result = 1.0
-        assert 0.0 <= result <= 1.0
-        return result
-
-
-class MiniScriptLexer(RegexLexer):
-    """
-    For MiniScript source code.
-    """
-
-    name = 'MiniScript'
-    url = 'https://miniscript.org'
-    aliases = ['miniscript', 'ms']
-    filenames = ['*.ms']
-    mimetypes = ['text/x-minicript', 'application/x-miniscript']
-    version_added = '2.6'
-
-    tokens = {
-        'root': [
-            (r'#!(.*?)$', Comment.Preproc),
-            default('base'),
-        ],
-        'base': [
-            ('//.*$', Comment.Single),
-            (r'(?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?', Number),
-            (r'(?i)\d+e[+-]?\d+', Number),
-            (r'\d+', Number),
-            (r'\n', Text),
-            (r'[^\S\n]+', Text),
-            (r'"', String, 'string_double'),
-            (r'(==|!=|<=|>=|[=+\-*/%^<>.:])', Operator),
-            (r'[;,\[\]{}()]', Punctuation),
-            (words((
-                'break', 'continue', 'else', 'end', 'for', 'function', 'if',
-                'in', 'isa', 'then', 'repeat', 'return', 'while'), suffix=r'\b'),
-             Keyword),
-            (words((
-                'abs', 'acos', 'asin', 'atan', 'ceil', 'char', 'cos', 'floor',
-                'log', 'round', 'rnd', 'pi', 'sign', 'sin', 'sqrt', 'str', 'tan',
-                'hasIndex', 'indexOf', 'len', 'val', 'code', 'remove', 'lower',
-                'upper', 'replace', 'split', 'indexes', 'values', 'join', 'sum',
-                'sort', 'shuffle', 'push', 'pop', 'pull', 'range',
-                'print', 'input', 'time', 'wait', 'locals', 'globals', 'outer',
-                'yield'), suffix=r'\b'),
-             Name.Builtin),
-            (r'(true|false|null)\b', Keyword.Constant),
-            (r'(and|or|not|new)\b', Operator.Word),
-            (r'(self|super|__isa)\b', Name.Builtin.Pseudo),
-            (r'[a-zA-Z_]\w*', Name.Variable)
-        ],
-        'string_double': [
-            (r'[^"\n]+', String),
-            (r'""', String),
-            (r'"', String, '#pop'),
-            (r'\n', Text, '#pop'),  # Stray linefeed also terminates strings.
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/sgf.py b/voxvera/vendor/pygments/lexers/sgf.py
deleted file mode 100644
index f0e56cb..0000000
--- a/voxvera/vendor/pygments/lexers/sgf.py
+++ /dev/null
@@ -1,59 +0,0 @@
-"""
-    pygments.lexers.sgf
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexer for Smart Game Format (sgf) file format.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups
-from pygments.token import Name, Literal, String, Punctuation, Whitespace
-
-__all__ = ["SmartGameFormatLexer"]
-
-
-class SmartGameFormatLexer(RegexLexer):
-    """
-    Lexer for Smart Game Format (sgf) file format.
-
-    The format is used to store game records of board games for two players
-    (mainly Go game).
-    """
-    name = 'SmartGameFormat'
-    url = 'https://www.red-bean.com/sgf/'
-    aliases = ['sgf']
-    filenames = ['*.sgf']
-    version_added = '2.4'
-
-    tokens = {
-        'root': [
-            (r'[():;]+', Punctuation),
-            # tokens:
-            (r'(A[BW]|AE|AN|AP|AR|AS|[BW]L|BM|[BW]R|[BW]S|[BW]T|CA|CH|CP|CR|'
-             r'DD|DM|DO|DT|EL|EV|EX|FF|FG|G[BW]|GC|GM|GN|HA|HO|ID|IP|IT|IY|KM|'
-             r'KO|LB|LN|LT|L|MA|MN|M|N|OB|OM|ON|OP|OT|OV|P[BW]|PC|PL|PM|RE|RG|'
-             r'RO|RU|SO|SC|SE|SI|SL|SO|SQ|ST|SU|SZ|T[BW]|TC|TE|TM|TR|UC|US|VW|'
-             r'V|[BW]|C)',
-             Name.Builtin),
-            # number:
-            (r'(\[)([0-9.]+)(\])',
-             bygroups(Punctuation, Literal.Number, Punctuation)),
-            # date:
-            (r'(\[)([0-9]{4}-[0-9]{2}-[0-9]{2})(\])',
-             bygroups(Punctuation, Literal.Date, Punctuation)),
-            # point:
-            (r'(\[)([a-z]{2})(\])',
-             bygroups(Punctuation, String, Punctuation)),
-            # double points:
-            (r'(\[)([a-z]{2})(:)([a-z]{2})(\])',
-             bygroups(Punctuation, String, Punctuation, String, Punctuation)),
-
-            (r'(\[)([\w\s#()+,\-.:?]+)(\])',
-             bygroups(Punctuation, String, Punctuation)),
-            (r'(\[)(\s.*)(\])',
-             bygroups(Punctuation, Whitespace, Punctuation)),
-            (r'\s+', Whitespace)
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/shell.py b/voxvera/vendor/pygments/lexers/shell.py
deleted file mode 100644
index 744767a..0000000
--- a/voxvera/vendor/pygments/lexers/shell.py
+++ /dev/null
@@ -1,902 +0,0 @@
-"""
-    pygments.lexers.shell
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for various shells.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import re
-
-from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, \
-    include, default, this, using, words, line_re
-from pygments.token import Punctuation, Whitespace, \
-    Text, Comment, Operator, Keyword, Name, String, Number, Generic
-from pygments.util import shebang_matches
-
-__all__ = ['BashLexer', 'BashSessionLexer', 'TcshLexer', 'BatchLexer',
-           'SlurmBashLexer', 'MSDOSSessionLexer', 'PowerShellLexer',
-           'PowerShellSessionLexer', 'TcshSessionLexer', 'FishShellLexer',
-           'ExeclineLexer']
-
-
-class BashLexer(RegexLexer):
-    """
-    Lexer for (ba|k|z|)sh shell scripts.
-    """
-
-    name = 'Bash'
-    aliases = ['bash', 'sh', 'ksh', 'zsh', 'shell', 'openrc']
-    filenames = ['*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass',
-                 '*.exheres-0', '*.exlib', '*.zsh',
-                 '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc',
-                 '.kshrc', 'kshrc',
-                 'PKGBUILD']
-    mimetypes = ['application/x-sh', 'application/x-shellscript', 'text/x-shellscript']
-    url = 'https://en.wikipedia.org/wiki/Unix_shell'
-    version_added = '0.6'
-
-    tokens = {
-        'root': [
-            include('basic'),
-            (r'`', String.Backtick, 'backticks'),
-            include('data'),
-            include('interp'),
-        ],
-        'interp': [
-            (r'\$\(\(', Keyword, 'math'),
-            (r'\$\(', Keyword, 'paren'),
-            (r'\$\{#?', String.Interpol, 'curly'),
-            (r'\$[a-zA-Z_]\w*', Name.Variable),  # user variable
-            (r'\$(?:\d+|[#$?!_*@-])', Name.Variable),      # builtin
-            (r'\$', Text),
-        ],
-        'basic': [
-            (r'\b(if|fi|else|while|in|do|done|for|then|return|function|case|'
-             r'select|break|continue|until|esac|elif)(\s*)\b',
-             bygroups(Keyword, Whitespace)),
-            (r'\b(alias|bg|bind|builtin|caller|cd|command|compgen|'
-             r'complete|declare|dirs|disown|echo|enable|eval|exec|exit|'
-             r'export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|'
-             r'local|logout|popd|printf|pushd|pwd|read|readonly|set|shift|'
-             r'shopt|source|suspend|test|time|times|trap|true|type|typeset|'
-             r'ulimit|umask|unalias|unset|wait)(?=[\s)`])',
-             Name.Builtin),
-            (r'\A#!.+\n', Comment.Hashbang),
-            (r'#.*\n', Comment.Single),
-            (r'\\[\w\W]', String.Escape),
-            (r'(\b\w+)(\s*)(\+?=)', bygroups(Name.Variable, Whitespace, Operator)),
-            (r'[\[\]{}()=]', Operator),
-            (r'<<<', Operator),  # here-string
-            (r'<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2', String),
-            (r'&&|\|\|', Operator),
-        ],
-        'data': [
-            (r'(?s)\$?"(\\.|[^"\\$])*"', String.Double),
-            (r'"', String.Double, 'string'),
-            (r"(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
-            (r"(?s)'.*?'", String.Single),
-            (r';', Punctuation),
-            (r'&', Punctuation),
-            (r'\|', Punctuation),
-            (r'\s+', Whitespace),
-            (r'\d+\b', Number),
-            (r'[^=\s\[\]{}()$"\'`\\<&|;]+', Text),
-            (r'<', Text),
-        ],
-        'string': [
-            (r'"', String.Double, '#pop'),
-            (r'(?s)(\\\\|\\[0-7]+|\\.|[^"\\$])+', String.Double),
-            include('interp'),
-        ],
-        'curly': [
-            (r'\}', String.Interpol, '#pop'),
-            (r':-', Keyword),
-            (r'\w+', Name.Variable),
-            (r'[^}:"\'`$\\]+', Punctuation),
-            (r':', Punctuation),
-            include('root'),
-        ],
-        'paren': [
-            (r'\)', Keyword, '#pop'),
-            include('root'),
-        ],
-        'math': [
-            (r'\)\)', Keyword, '#pop'),
-            (r'\*\*|\|\||<<|>>|[-+*/%^|&<>]', Operator),
-            (r'\d+#[\da-zA-Z]+', Number),
-            (r'\d+#(?! )', Number),
-            (r'0[xX][\da-fA-F]+', Number),
-            (r'\d+', Number),
-            (r'[a-zA-Z_]\w*', Name.Variable),  # user variable
-            include('root'),
-        ],
-        'backticks': [
-            (r'`', String.Backtick, '#pop'),
-            include('root'),
-        ],
-    }
-
-    def analyse_text(text):
-        if shebang_matches(text, r'(ba|z|)sh'):
-            return 1
-        if text.startswith('$ '):
-            return 0.2
-
-
-class SlurmBashLexer(BashLexer):
-    """
-    Lexer for (ba|k|z|)sh Slurm scripts.
-    """
-
-    name = 'Slurm'
-    aliases = ['slurm', 'sbatch']
-    filenames = ['*.sl']
-    mimetypes = []
-    version_added = '2.4'
-    EXTRA_KEYWORDS = {'srun'}
-
-    def get_tokens_unprocessed(self, text):
-        for index, token, value in BashLexer.get_tokens_unprocessed(self, text):
-            if token is Text and value in self.EXTRA_KEYWORDS:
-                yield index, Name.Builtin, value
-            elif token is Comment.Single and 'SBATCH' in value:
-                yield index, Keyword.Pseudo, value
-            else:
-                yield index, token, value
-
-
-class ShellSessionBaseLexer(Lexer):
-    """
-    Base lexer for shell sessions.
-
-    .. versionadded:: 2.1
-    """
-
-    _bare_continuation = False
-    _venv = re.compile(r'^(\([^)]*\))(\s*)')
-
-    def get_tokens_unprocessed(self, text):
-        innerlexer = self._innerLexerCls(**self.options)
-
-        pos = 0
-        curcode = ''
-        insertions = []
-        backslash_continuation = False
-
-        for match in line_re.finditer(text):
-            line = match.group()
-
-            venv_match = self._venv.match(line)
-            if venv_match:
-                venv = venv_match.group(1)
-                venv_whitespace = venv_match.group(2)
-                insertions.append((len(curcode),
-                                   [(0, Generic.Prompt.VirtualEnv, venv)]))
-                if venv_whitespace:
-                    insertions.append((len(curcode),
-                                       [(0, Text, venv_whitespace)]))
-                line = line[venv_match.end():]
-
-            m = self._ps1rgx.match(line)
-            if m:
-                # To support output lexers (say diff output), the output
-                # needs to be broken by prompts whenever the output lexer
-                # changes.
-                if not insertions:
-                    pos = match.start()
-
-                insertions.append((len(curcode),
-                                   [(0, Generic.Prompt, m.group(1))]))
-                curcode += m.group(2)
-                backslash_continuation = curcode.endswith('\\\n')
-            elif backslash_continuation:
-                if line.startswith(self._ps2):
-                    insertions.append((len(curcode),
-                                       [(0, Generic.Prompt,
-                                         line[:len(self._ps2)])]))
-                    curcode += line[len(self._ps2):]
-                else:
-                    curcode += line
-                backslash_continuation = curcode.endswith('\\\n')
-            elif self._bare_continuation and line.startswith(self._ps2):
-                insertions.append((len(curcode),
-                                   [(0, Generic.Prompt,
-                                     line[:len(self._ps2)])]))
-                curcode += line[len(self._ps2):]
-            else:
-                if insertions:
-                    toks = innerlexer.get_tokens_unprocessed(curcode)
-                    for i, t, v in do_insertions(insertions, toks):
-                        yield pos+i, t, v
-                yield match.start(), Generic.Output, line
-                insertions = []
-                curcode = ''
-        if insertions:
-            for i, t, v in do_insertions(insertions,
-                                         innerlexer.get_tokens_unprocessed(curcode)):
-                yield pos+i, t, v
-
-
-class BashSessionLexer(ShellSessionBaseLexer):
-    """
-    Lexer for Bash shell sessions, i.e. command lines, including a
-    prompt, interspersed with output.
-    """
-
-    name = 'Bash Session'
-    aliases = ['console', 'shell-session']
-    filenames = ['*.sh-session', '*.shell-session']
-    mimetypes = ['application/x-shell-session', 'application/x-sh-session']
-    url = 'https://en.wikipedia.org/wiki/Unix_shell'
-    version_added = '1.1'
-    _example = "console/example.sh-session"
-
-    _innerLexerCls = BashLexer
-    _ps1rgx = re.compile(
-        r'^((?:(?:\[.*?\])|(?:\(\S+\))?(?:| |sh\S*?|\w+\S+[@:]\S+(?:\s+\S+)' \
-        r'?|\[\S+[@:][^\n]+\].+))\s*[$#%]\s*)(.*\n?)')
-    _ps2 = '> '
-
-
-class BatchLexer(RegexLexer):
-    """
-    Lexer for the DOS/Windows Batch file format.
-    """
-    name = 'Batchfile'
-    aliases = ['batch', 'bat', 'dosbatch', 'winbatch']
-    filenames = ['*.bat', '*.cmd']
-    mimetypes = ['application/x-dos-batch']
-    url = 'https://en.wikipedia.org/wiki/Batch_file'
-    version_added = '0.7'
-
-    flags = re.MULTILINE | re.IGNORECASE
-
-    _nl = r'\n\x1a'
-    _punct = r'&<>|'
-    _ws = r'\t\v\f\r ,;=\xa0'
-    _nlws = r'\s\x1a\xa0,;='
-    _space = rf'(?:(?:(?:\^[{_nl}])?[{_ws}])+)'
-    _keyword_terminator = (rf'(?=(?:\^[{_nl}]?)?[{_ws}+./:[\\\]]|[{_nl}{_punct}(])')
-    _token_terminator = rf'(?=\^?[{_ws}]|[{_punct}{_nl}])'
-    _start_label = rf'((?:(?<=^[^:])|^[^:]?)[{_ws}]*)(:)'
-    _label = rf'(?:(?:[^{_nlws}{_punct}+:^]|\^[{_nl}]?[\w\W])*)'
-    _label_compound = rf'(?:(?:[^{_nlws}{_punct}+:^)]|\^[{_nl}]?[^)])*)'
-    _number = rf'(?:-?(?:0[0-7]+|0x[\da-f]+|\d+){_token_terminator})'
-    _opword = r'(?:equ|geq|gtr|leq|lss|neq)'
-    _string = rf'(?:"[^{_nl}"]*(?:"|(?=[{_nl}])))'
-    _variable = (r'(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|'
-                 rf'[^%:{_nl}]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%{_nl}^]|'
-                 rf'\^[^%{_nl}])[^={_nl}]*=(?:[^%{_nl}^]|\^[^%{_nl}])*)?)?%))|'
-                 rf'(?:\^?![^!:{_nl}]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:'
-                 rf'[^!{_nl}^]|\^[^!{_nl}])[^={_nl}]*=(?:[^!{_nl}^]|\^[^!{_nl}])*)?)?\^?!))')
-    _core_token = rf'(?:(?:(?:\^[{_nl}]?)?[^"{_nlws}{_punct}])+)'
-    _core_token_compound = rf'(?:(?:(?:\^[{_nl}]?)?[^"{_nlws}{_punct})])+)'
-    _token = rf'(?:[{_punct}]+|{_core_token})'
-    _token_compound = rf'(?:[{_punct}]+|{_core_token_compound})'
-    _stoken = (rf'(?:[{_punct}]+|(?:{_string}|{_variable}|{_core_token})+)')
-
-    def _make_begin_state(compound, _core_token=_core_token,
-                          _core_token_compound=_core_token_compound,
-                          _keyword_terminator=_keyword_terminator,
-                          _nl=_nl, _punct=_punct, _string=_string,
-                          _space=_space, _start_label=_start_label,
-                          _stoken=_stoken, _token_terminator=_token_terminator,
-                          _variable=_variable, _ws=_ws):
-        rest = '(?:{}|{}|[^"%{}{}{}])*'.format(_string, _variable, _nl, _punct,
-                                            ')' if compound else '')
-        rest_of_line = rf'(?:(?:[^{_nl}^]|\^[{_nl}]?[\w\W])*)'
-        rest_of_line_compound = rf'(?:(?:[^{_nl}^)]|\^[{_nl}]?[^)])*)'
-        set_space = rf'((?:(?:\^[{_nl}]?)?[^\S\n])*)'
-        suffix = ''
-        if compound:
-            _keyword_terminator = rf'(?:(?=\))|{_keyword_terminator})'
-            _token_terminator = rf'(?:(?=\))|{_token_terminator})'
-            suffix = '/compound'
-        return [
-            ((r'\)', Punctuation, '#pop') if compound else
-             (rf'\)((?=\()|{_token_terminator}){rest_of_line}',
-              Comment.Single)),
-            (rf'(?={_start_label})', Text, f'follow{suffix}'),
-            (_space, using(this, state='text')),
-            include(f'redirect{suffix}'),
-            (rf'[{_nl}]+', Text),
-            (r'\(', Punctuation, 'root/compound'),
-            (r'@+', Punctuation),
-            (rf'((?:for|if|rem)(?:(?=(?:\^[{_nl}]?)?/)|(?:(?!\^)|'
-             rf'(?<=m))(?:(?=\()|{_token_terminator})))({_space}?{_core_token_compound if compound else _core_token}?(?:\^[{_nl}]?)?/(?:\^[{_nl}]?)?\?)',
-             bygroups(Keyword, using(this, state='text')),
-             f'follow{suffix}'),
-            (rf'(goto{_keyword_terminator})({rest}(?:\^[{_nl}]?)?/(?:\^[{_nl}]?)?\?{rest})',
-             bygroups(Keyword, using(this, state='text')),
-             f'follow{suffix}'),
-            (words(('assoc', 'break', 'cd', 'chdir', 'cls', 'color', 'copy',
-                    'date', 'del', 'dir', 'dpath', 'echo', 'endlocal', 'erase',
-                    'exit', 'ftype', 'keys', 'md', 'mkdir', 'mklink', 'move',
-                    'path', 'pause', 'popd', 'prompt', 'pushd', 'rd', 'ren',
-                    'rename', 'rmdir', 'setlocal', 'shift', 'start', 'time',
-                    'title', 'type', 'ver', 'verify', 'vol'),
-                   suffix=_keyword_terminator), Keyword, f'follow{suffix}'),
-            (rf'(call)({_space}?)(:)',
-             bygroups(Keyword, using(this, state='text'), Punctuation),
-             f'call{suffix}'),
-            (rf'call{_keyword_terminator}', Keyword),
-            (rf'(for{_token_terminator}(?!\^))({_space})(/f{_token_terminator})',
-             bygroups(Keyword, using(this, state='text'), Keyword),
-             ('for/f', 'for')),
-            (rf'(for{_token_terminator}(?!\^))({_space})(/l{_token_terminator})',
-             bygroups(Keyword, using(this, state='text'), Keyword),
-             ('for/l', 'for')),
-            (rf'for{_token_terminator}(?!\^)', Keyword, ('for2', 'for')),
-            (rf'(goto{_keyword_terminator})({_space}?)(:?)',
-             bygroups(Keyword, using(this, state='text'), Punctuation),
-             f'label{suffix}'),
-            (rf'(if(?:(?=\()|{_token_terminator})(?!\^))({_space}?)((?:/i{_token_terminator})?)({_space}?)((?:not{_token_terminator})?)({_space}?)',
-             bygroups(Keyword, using(this, state='text'), Keyword,
-                      using(this, state='text'), Keyword,
-                      using(this, state='text')), ('(?', 'if')),
-            (rf'rem(((?=\()|{_token_terminator}){_space}?{_stoken}?.*|{_keyword_terminator}{rest_of_line_compound if compound else rest_of_line})',
-             Comment.Single, f'follow{suffix}'),
-            (rf'(set{_keyword_terminator}){set_space}(/a)',
-             bygroups(Keyword, using(this, state='text'), Keyword),
-             f'arithmetic{suffix}'),
-            (r'(set{}){}((?:/p)?){}((?:(?:(?:\^[{}]?)?[^"{}{}^={}]|'
-             r'\^[{}]?[^"=])+)?)((?:(?:\^[{}]?)?=)?)'.format(_keyword_terminator, set_space, set_space, _nl, _nl, _punct,
-              ')' if compound else '', _nl, _nl),
-             bygroups(Keyword, using(this, state='text'), Keyword,
-                      using(this, state='text'), using(this, state='variable'),
-                      Punctuation),
-             f'follow{suffix}'),
-            default(f'follow{suffix}')
-        ]
-
-    def _make_follow_state(compound, _label=_label,
-                           _label_compound=_label_compound, _nl=_nl,
-                           _space=_space, _start_label=_start_label,
-                           _token=_token, _token_compound=_token_compound,
-                           _ws=_ws):
-        suffix = '/compound' if compound else ''
-        state = []
-        if compound:
-            state.append((r'(?=\))', Text, '#pop'))
-        state += [
-            (rf'{_start_label}([{_ws}]*)({_label_compound if compound else _label})(.*)',
-             bygroups(Text, Punctuation, Text, Name.Label, Comment.Single)),
-            include(f'redirect{suffix}'),
-            (rf'(?=[{_nl}])', Text, '#pop'),
-            (r'\|\|?|&&?', Punctuation, '#pop'),
-            include('text')
-        ]
-        return state
-
-    def _make_arithmetic_state(compound, _nl=_nl, _punct=_punct,
-                               _string=_string, _variable=_variable,
-                               _ws=_ws, _nlws=_nlws):
-        op = r'=+\-*/!~'
-        state = []
-        if compound:
-            state.append((r'(?=\))', Text, '#pop'))
-        state += [
-            (r'0[0-7]+', Number.Oct),
-            (r'0x[\da-f]+', Number.Hex),
-            (r'\d+', Number.Integer),
-            (r'[(),]+', Punctuation),
-            (rf'([{op}]|%|\^\^)+', Operator),
-            (r'({}|{}|(\^[{}]?)?[^(){}%\^"{}{}]|\^[{}]?{})+'.format(_string, _variable, _nl, op, _nlws, _punct, _nlws,
-              r'[^)]' if compound else r'[\w\W]'),
-             using(this, state='variable')),
-            (r'(?=[\x00|&])', Text, '#pop'),
-            include('follow')
-        ]
-        return state
-
-    def _make_call_state(compound, _label=_label,
-                         _label_compound=_label_compound):
-        state = []
-        if compound:
-            state.append((r'(?=\))', Text, '#pop'))
-        state.append((r'(:?)(%s)' % (_label_compound if compound else _label),
-                      bygroups(Punctuation, Name.Label), '#pop'))
-        return state
-
-    def _make_label_state(compound, _label=_label,
-                          _label_compound=_label_compound, _nl=_nl,
-                          _punct=_punct, _string=_string, _variable=_variable):
-        state = []
-        if compound:
-            state.append((r'(?=\))', Text, '#pop'))
-        state.append((r'({}?)((?:{}|{}|\^[{}]?{}|[^"%^{}{}{}])*)'.format(_label_compound if compound else _label, _string,
-                       _variable, _nl, r'[^)]' if compound else r'[\w\W]', _nl,
-                       _punct, r')' if compound else ''),
-                      bygroups(Name.Label, Comment.Single), '#pop'))
-        return state
-
-    def _make_redirect_state(compound,
-                             _core_token_compound=_core_token_compound,
-                             _nl=_nl, _punct=_punct, _stoken=_stoken,
-                             _string=_string, _space=_space,
-                             _variable=_variable, _nlws=_nlws):
-        stoken_compound = (rf'(?:[{_punct}]+|(?:{_string}|{_variable}|{_core_token_compound})+)')
-        return [
-            (rf'((?:(?<=[{_nlws}])\d)?)(>>?&|<&)([{_nlws}]*)(\d)',
-             bygroups(Number.Integer, Punctuation, Text, Number.Integer)),
-            (rf'((?:(?<=[{_nlws}])(?>?|<)({_space}?{stoken_compound if compound else _stoken})',
-             bygroups(Number.Integer, Punctuation, using(this, state='text')))
-        ]
-
-    tokens = {
-        'root': _make_begin_state(False),
-        'follow': _make_follow_state(False),
-        'arithmetic': _make_arithmetic_state(False),
-        'call': _make_call_state(False),
-        'label': _make_label_state(False),
-        'redirect': _make_redirect_state(False),
-        'root/compound': _make_begin_state(True),
-        'follow/compound': _make_follow_state(True),
-        'arithmetic/compound': _make_arithmetic_state(True),
-        'call/compound': _make_call_state(True),
-        'label/compound': _make_label_state(True),
-        'redirect/compound': _make_redirect_state(True),
-        'variable-or-escape': [
-            (_variable, Name.Variable),
-            (rf'%%|\^[{_nl}]?(\^!|[\w\W])', String.Escape)
-        ],
-        'string': [
-            (r'"', String.Double, '#pop'),
-            (_variable, Name.Variable),
-            (r'\^!|%%', String.Escape),
-            (rf'[^"%^{_nl}]+|[%^]', String.Double),
-            default('#pop')
-        ],
-        'sqstring': [
-            include('variable-or-escape'),
-            (r'[^%]+|%', String.Single)
-        ],
-        'bqstring': [
-            include('variable-or-escape'),
-            (r'[^%]+|%', String.Backtick)
-        ],
-        'text': [
-            (r'"', String.Double, 'string'),
-            include('variable-or-escape'),
-            (rf'[^"%^{_nlws}{_punct}\d)]+|.', Text)
-        ],
-        'variable': [
-            (r'"', String.Double, 'string'),
-            include('variable-or-escape'),
-            (rf'[^"%^{_nl}]+|.', Name.Variable)
-        ],
-        'for': [
-            (rf'({_space})(in)({_space})(\()',
-             bygroups(using(this, state='text'), Keyword,
-                      using(this, state='text'), Punctuation), '#pop'),
-            include('follow')
-        ],
-        'for2': [
-            (r'\)', Punctuation),
-            (rf'({_space})(do{_token_terminator})',
-             bygroups(using(this, state='text'), Keyword), '#pop'),
-            (rf'[{_nl}]+', Text),
-            include('follow')
-        ],
-        'for/f': [
-            (rf'(")((?:{_variable}|[^"])*?")([{_nlws}]*)(\))',
-             bygroups(String.Double, using(this, state='string'), Text,
-                      Punctuation)),
-            (r'"', String.Double, ('#pop', 'for2', 'string')),
-            (rf"('(?:%%|{_variable}|[\w\W])*?')([{_nlws}]*)(\))",
-             bygroups(using(this, state='sqstring'), Text, Punctuation)),
-            (rf'(`(?:%%|{_variable}|[\w\W])*?`)([{_nlws}]*)(\))',
-             bygroups(using(this, state='bqstring'), Text, Punctuation)),
-            include('for2')
-        ],
-        'for/l': [
-            (r'-?\d+', Number.Integer),
-            include('for2')
-        ],
-        'if': [
-            (rf'((?:cmdextversion|errorlevel){_token_terminator})({_space})(\d+)',
-             bygroups(Keyword, using(this, state='text'),
-                      Number.Integer), '#pop'),
-            (rf'(defined{_token_terminator})({_space})({_stoken})',
-             bygroups(Keyword, using(this, state='text'),
-                      using(this, state='variable')), '#pop'),
-            (rf'(exist{_token_terminator})({_space}{_stoken})',
-             bygroups(Keyword, using(this, state='text')), '#pop'),
-            (rf'({_number}{_space})({_opword})({_space}{_number})',
-             bygroups(using(this, state='arithmetic'), Operator.Word,
-                      using(this, state='arithmetic')), '#pop'),
-            (_stoken, using(this, state='text'), ('#pop', 'if2')),
-        ],
-        'if2': [
-            (rf'({_space}?)(==)({_space}?{_stoken})',
-             bygroups(using(this, state='text'), Operator,
-                      using(this, state='text')), '#pop'),
-            (rf'({_space})({_opword})({_space}{_stoken})',
-             bygroups(using(this, state='text'), Operator.Word,
-                      using(this, state='text')), '#pop')
-        ],
-        '(?': [
-            (_space, using(this, state='text')),
-            (r'\(', Punctuation, ('#pop', 'else?', 'root/compound')),
-            default('#pop')
-        ],
-        'else?': [
-            (_space, using(this, state='text')),
-            (rf'else{_token_terminator}', Keyword, '#pop'),
-            default('#pop')
-        ]
-    }
-
-
-class MSDOSSessionLexer(ShellSessionBaseLexer):
-    """
-    Lexer for MS DOS shell sessions, i.e. command lines, including a
-    prompt, interspersed with output.
-    """
-
-    name = 'MSDOS Session'
-    aliases = ['doscon']
-    filenames = []
-    mimetypes = []
-    url = 'https://en.wikipedia.org/wiki/MS-DOS'
-    version_added = '2.1'
-    _example = "doscon/session"
-
-    _innerLexerCls = BatchLexer
-    _ps1rgx = re.compile(r'^([^>]*>)(.*\n?)')
-    _ps2 = 'More? '
-
-
-class TcshLexer(RegexLexer):
-    """
-    Lexer for tcsh scripts.
-    """
-
-    name = 'Tcsh'
-    aliases = ['tcsh', 'csh']
-    filenames = ['*.tcsh', '*.csh']
-    mimetypes = ['application/x-csh']
-    url = 'https://www.tcsh.org'
-    version_added = '0.10'
-
-    tokens = {
-        'root': [
-            include('basic'),
-            (r'\$\(', Keyword, 'paren'),
-            (r'\$\{#?', Keyword, 'curly'),
-            (r'`', String.Backtick, 'backticks'),
-            include('data'),
-        ],
-        'basic': [
-            (r'\b(if|endif|else|while|then|foreach|case|default|'
-             r'break|continue|goto|breaksw|end|switch|endsw)\s*\b',
-             Keyword),
-            (r'\b(alias|alloc|bg|bindkey|builtins|bye|caller|cd|chdir|'
-             r'complete|dirs|echo|echotc|eval|exec|exit|fg|filetest|getxvers|'
-             r'glob|getspath|hashstat|history|hup|inlib|jobs|kill|'
-             r'limit|log|login|logout|ls-F|migrate|newgrp|nice|nohup|notify|'
-             r'onintr|popd|printenv|pushd|rehash|repeat|rootnode|popd|pushd|'
-             r'set|shift|sched|setenv|setpath|settc|setty|setxvers|shift|'
-             r'source|stop|suspend|source|suspend|telltc|time|'
-             r'umask|unalias|uncomplete|unhash|universe|unlimit|unset|unsetenv|'
-             r'ver|wait|warp|watchlog|where|which)\s*\b',
-             Name.Builtin),
-            (r'#.*', Comment),
-            (r'\\[\w\W]', String.Escape),
-            (r'(\b\w+)(\s*)(=)', bygroups(Name.Variable, Text, Operator)),
-            (r'[\[\]{}()=]+', Operator),
-            (r'<<\s*(\'?)\\?(\w+)[\w\W]+?\2', String),
-            (r';', Punctuation),
-        ],
-        'data': [
-            (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
-            (r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
-            (r'\s+', Text),
-            (r'[^=\s\[\]{}()$"\'`\\;#]+', Text),
-            (r'\d+(?= |\Z)', Number),
-            (r'\$#?(\w+|.)', Name.Variable),
-        ],
-        'curly': [
-            (r'\}', Keyword, '#pop'),
-            (r':-', Keyword),
-            (r'\w+', Name.Variable),
-            (r'[^}:"\'`$]+', Punctuation),
-            (r':', Punctuation),
-            include('root'),
-        ],
-        'paren': [
-            (r'\)', Keyword, '#pop'),
-            include('root'),
-        ],
-        'backticks': [
-            (r'`', String.Backtick, '#pop'),
-            include('root'),
-        ],
-    }
-
-
-class TcshSessionLexer(ShellSessionBaseLexer):
-    """
-    Lexer for Tcsh sessions, i.e. command lines, including a
-    prompt, interspersed with output.
-    """
-
-    name = 'Tcsh Session'
-    aliases = ['tcshcon']
-    filenames = []
-    mimetypes = []
-    url = 'https://www.tcsh.org'
-    version_added = '2.1'
-    _example = "tcshcon/session"
-
-    _innerLexerCls = TcshLexer
-    _ps1rgx = re.compile(r'^([^>]+>)(.*\n?)')
-    _ps2 = '? '
-
-
-class PowerShellLexer(RegexLexer):
-    """
-    For Windows PowerShell code.
-    """
-    name = 'PowerShell'
-    aliases = ['powershell', 'pwsh', 'posh', 'ps1', 'psm1']
-    filenames = ['*.ps1', '*.psm1']
-    mimetypes = ['text/x-powershell']
-    url = 'https://learn.microsoft.com/en-us/powershell'
-    version_added = '1.5'
-
-    flags = re.DOTALL | re.IGNORECASE | re.MULTILINE
-
-    keywords = (
-        'while validateset validaterange validatepattern validatelength '
-        'validatecount until trap switch return ref process param parameter in '
-        'if global: local: function foreach for finally filter end elseif else '
-        'dynamicparam do default continue cmdletbinding break begin alias \\? '
-        '% #script #private #local #global mandatory parametersetname position '
-        'valuefrompipeline valuefrompipelinebypropertyname '
-        'valuefromremainingarguments helpmessage try catch throw').split()
-
-    operators = (
-        'and as band bnot bor bxor casesensitive ccontains ceq cge cgt cle '
-        'clike clt cmatch cne cnotcontains cnotlike cnotmatch contains '
-        'creplace eq exact f file ge gt icontains ieq ige igt ile ilike ilt '
-        'imatch ine inotcontains inotlike inotmatch ireplace is isnot le like '
-        'lt match ne not notcontains notlike notmatch or regex replace '
-        'wildcard').split()
-
-    verbs = (
-        'write where watch wait use update unregister unpublish unprotect '
-        'unlock uninstall undo unblock trace test tee take sync switch '
-        'suspend submit stop step start split sort skip show set send select '
-        'search scroll save revoke resume restore restart resolve resize '
-        'reset request repair rename remove register redo receive read push '
-        'publish protect pop ping out optimize open new move mount merge '
-        'measure lock limit join invoke install initialize import hide group '
-        'grant get format foreach find export expand exit enter enable edit '
-        'dismount disconnect disable deny debug cxnew copy convertto '
-        'convertfrom convert connect confirm compress complete compare close '
-        'clear checkpoint block backup assert approve aggregate add').split()
-
-    aliases_ = (
-        'ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn '
-        'compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal '
-        'epcsv epsn erase etsn exsn fc fhx fl foreach ft fw gal gbp gc gci gcm '
-        'gcs gdr ghy gi gjb gl gm gmo gp gps gpv group gsn gsnp gsv gu gv gwmi '
-        'h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp '
-        'ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv '
-        'oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo '
-        'rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc select '
-        'set shcm si sl sleep sls sort sp spjb spps spsv start sujb sv swmi tee '
-        'trcm type wget where wjb write').split()
-
-    commenthelp = (
-        'component description example externalhelp forwardhelpcategory '
-        'forwardhelptargetname functionality inputs link '
-        'notes outputs parameter remotehelprunspace role synopsis').split()
-
-    tokens = {
-        'root': [
-            # we need to count pairs of parentheses for correct highlight
-            # of '$(...)' blocks in strings
-            (r'\(', Punctuation, 'child'),
-            (r'\s+', Text),
-            (r'^(\s*#[#\s]*)(\.(?:{}))([^\n]*$)'.format('|'.join(commenthelp)),
-             bygroups(Comment, String.Doc, Comment)),
-            (r'#[^\n]*?$', Comment),
-            (r'(<|<)#', Comment.Multiline, 'multline'),
-            (r'@"\n', String.Heredoc, 'heredoc-double'),
-            (r"@'\n.*?\n'@", String.Heredoc),
-            # escaped syntax
-            (r'`[\'"$@-]', Punctuation),
-            (r'"', String.Double, 'string'),
-            (r"'([^']|'')*'", String.Single),
-            (r'(\$|@@|@)((global|script|private|env):)?\w+',
-             Name.Variable),
-            (r'({})\b'.format('|'.join(keywords)), Keyword),
-            (r'-({})\b'.format('|'.join(operators)), Operator),
-            (r'({})-[a-z_]\w*\b'.format('|'.join(verbs)), Name.Builtin),
-            (r'({})\s'.format('|'.join(aliases_)), Name.Builtin),
-            (r'\[[a-z_\[][\w. `,\[\]]*\]', Name.Constant),  # .net [type]s
-            (r'-[a-z_]\w*', Name),
-            (r'\w+', Name),
-            (r'[.,;:@{}\[\]$()=+*/\\&%!~?^`|<>-]', Punctuation),
-        ],
-        'child': [
-            (r'\)', Punctuation, '#pop'),
-            include('root'),
-        ],
-        'multline': [
-            (r'[^#&.]+', Comment.Multiline),
-            (r'#(>|>)', Comment.Multiline, '#pop'),
-            (r'\.({})'.format('|'.join(commenthelp)), String.Doc),
-            (r'[#&.]', Comment.Multiline),
-        ],
-        'string': [
-            (r"`[0abfnrtv'\"$`]", String.Escape),
-            (r'[^$`"]+', String.Double),
-            (r'\$\(', Punctuation, 'child'),
-            (r'""', String.Double),
-            (r'[`$]', String.Double),
-            (r'"', String.Double, '#pop'),
-        ],
-        'heredoc-double': [
-            (r'\n"@', String.Heredoc, '#pop'),
-            (r'\$\(', Punctuation, 'child'),
-            (r'[^@\n]+"]', String.Heredoc),
-            (r".", String.Heredoc),
-        ]
-    }
-
-
-class PowerShellSessionLexer(ShellSessionBaseLexer):
-    """
-    Lexer for PowerShell sessions, i.e. command lines, including a
-    prompt, interspersed with output.
-    """
-
-    name = 'PowerShell Session'
-    aliases = ['pwsh-session', 'ps1con']
-    filenames = []
-    mimetypes = []
-    url = 'https://learn.microsoft.com/en-us/powershell'
-    version_added = '2.1'
-    _example = "pwsh-session/session"
-
-    _innerLexerCls = PowerShellLexer
-    _bare_continuation = True
-    _ps1rgx = re.compile(r'^((?:\[[^]]+\]: )?PS[^>]*> ?)(.*\n?)')
-    _ps2 = '> '
-
-
-class FishShellLexer(RegexLexer):
-    """
-    Lexer for Fish shell scripts.
-    """
-
-    name = 'Fish'
-    aliases = ['fish', 'fishshell']
-    filenames = ['*.fish', '*.load']
-    mimetypes = ['application/x-fish']
-    url = 'https://fishshell.com'
-    version_added = '2.1'
-
-    tokens = {
-        'root': [
-            include('basic'),
-            include('data'),
-            include('interp'),
-        ],
-        'interp': [
-            (r'\$\(\(', Keyword, 'math'),
-            (r'\(', Keyword, 'paren'),
-            (r'\$#?(\w+|.)', Name.Variable),
-        ],
-        'basic': [
-            (r'\b(begin|end|if|else|while|break|for|in|return|function|block|'
-             r'case|continue|switch|not|and|or|set|echo|exit|pwd|true|false|'
-             r'cd|count|test)(\s*)\b',
-             bygroups(Keyword, Text)),
-            (r'\b(alias|bg|bind|breakpoint|builtin|command|commandline|'
-             r'complete|contains|dirh|dirs|emit|eval|exec|fg|fish|fish_config|'
-             r'fish_indent|fish_pager|fish_prompt|fish_right_prompt|'
-             r'fish_update_completions|fishd|funced|funcsave|functions|help|'
-             r'history|isatty|jobs|math|mimedb|nextd|open|popd|prevd|psub|'
-             r'pushd|random|read|set_color|source|status|trap|type|ulimit|'
-             r'umask|vared|fc|getopts|hash|kill|printf|time|wait)\s*\b(?!\.)',
-             Name.Builtin),
-            (r'#.*\n', Comment),
-            (r'\\[\w\W]', String.Escape),
-            (r'(\b\w+)(\s*)(=)', bygroups(Name.Variable, Whitespace, Operator)),
-            (r'[\[\]()=]', Operator),
-            (r'<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2', String),
-        ],
-        'data': [
-            (r'(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"', String.Double),
-            (r'"', String.Double, 'string'),
-            (r"(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
-            (r"(?s)'.*?'", String.Single),
-            (r';', Punctuation),
-            (r'&|\||\^|<|>', Operator),
-            (r'\s+', Text),
-            (r'\d+(?= |\Z)', Number),
-            (r'[^=\s\[\]{}()$"\'`\\<&|;]+', Text),
-        ],
-        'string': [
-            (r'"', String.Double, '#pop'),
-            (r'(?s)(\\\\|\\[0-7]+|\\.|[^"\\$])+', String.Double),
-            include('interp'),
-        ],
-        'paren': [
-            (r'\)', Keyword, '#pop'),
-            include('root'),
-        ],
-        'math': [
-            (r'\)\)', Keyword, '#pop'),
-            (r'[-+*/%^|&]|\*\*|\|\|', Operator),
-            (r'\d+#\d+', Number),
-            (r'\d+#(?! )', Number),
-            (r'\d+', Number),
-            include('root'),
-        ],
-    }
-
-class ExeclineLexer(RegexLexer):
-    """
-    Lexer for Laurent Bercot's execline language.
-    """
-
-    name = 'execline'
-    aliases = ['execline']
-    filenames = ['*.exec']
-    url = 'https://skarnet.org/software/execline'
-    version_added = '2.7'
-
-    tokens = {
-        'root': [
-            include('basic'),
-            include('data'),
-            include('interp')
-        ],
-        'interp': [
-            (r'\$\{', String.Interpol, 'curly'),
-            (r'\$[\w@#]+', Name.Variable),  # user variable
-            (r'\$', Text),
-        ],
-        'basic': [
-            (r'\b(background|backtick|cd|define|dollarat|elgetopt|'
-             r'elgetpositionals|elglob|emptyenv|envfile|exec|execlineb|'
-             r'exit|export|fdblock|fdclose|fdmove|fdreserve|fdswap|'
-             r'forbacktickx|foreground|forstdin|forx|getcwd|getpid|heredoc|'
-             r'homeof|if|ifelse|ifte|ifthenelse|importas|loopwhilex|'
-             r'multidefine|multisubstitute|pipeline|piperw|posix-cd|'
-             r'redirfd|runblock|shift|trap|tryexec|umask|unexport|wait|'
-             r'withstdinas)\b', Name.Builtin),
-            (r'\A#!.+\n', Comment.Hashbang),
-            (r'#.*\n', Comment.Single),
-            (r'[{}]', Operator)
-        ],
-        'data': [
-            (r'(?s)"(\\.|[^"\\$])*"', String.Double),
-            (r'"', String.Double, 'string'),
-            (r'\s+', Text),
-            (r'[^\s{}$"\\]+', Text)
-        ],
-        'string': [
-            (r'"', String.Double, '#pop'),
-            (r'(?s)(\\\\|\\.|[^"\\$])+', String.Double),
-            include('interp'),
-        ],
-        'curly': [
-            (r'\}', String.Interpol, '#pop'),
-            (r'[\w#@]+', Name.Variable),
-            include('root')
-        ]
-
-    }
-
-    def analyse_text(text):
-        if shebang_matches(text, r'execlineb'):
-            return 1
diff --git a/voxvera/vendor/pygments/lexers/sieve.py b/voxvera/vendor/pygments/lexers/sieve.py
deleted file mode 100644
index fc48980..0000000
--- a/voxvera/vendor/pygments/lexers/sieve.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-    pygments.lexers.sieve
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for Sieve file format.
-
-    https://tools.ietf.org/html/rfc5228
-    https://tools.ietf.org/html/rfc5173
-    https://tools.ietf.org/html/rfc5229
-    https://tools.ietf.org/html/rfc5230
-    https://tools.ietf.org/html/rfc5232
-    https://tools.ietf.org/html/rfc5235
-    https://tools.ietf.org/html/rfc5429
-    https://tools.ietf.org/html/rfc8580
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups
-from pygments.token import Comment, Name, Literal, String, Text, Punctuation, \
-    Keyword
-
-__all__ = ["SieveLexer"]
-
-
-class SieveLexer(RegexLexer):
-    """
-    Lexer for sieve format.
-    """
-    name = 'Sieve'
-    filenames = ['*.siv', '*.sieve']
-    aliases = ['sieve']
-    url = 'https://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)'
-    version_added = '2.6'
-
-    tokens = {
-        'root': [
-            (r'\s+', Text),
-            (r'[();,{}\[\]]', Punctuation),
-            # import:
-            (r'(?i)require',
-             Keyword.Namespace),
-            # tags:
-            (r'(?i)(:)(addresses|all|contains|content|create|copy|comparator|'
-             r'count|days|detail|domain|fcc|flags|from|handle|importance|is|'
-             r'localpart|length|lowerfirst|lower|matches|message|mime|options|'
-             r'over|percent|quotewildcard|raw|regex|specialuse|subject|text|'
-             r'under|upperfirst|upper|value)',
-             bygroups(Name.Tag, Name.Tag)),
-            # tokens:
-            (r'(?i)(address|addflag|allof|anyof|body|discard|elsif|else|envelope|'
-             r'ereject|exists|false|fileinto|if|hasflag|header|keep|'
-             r'notify_method_capability|notify|not|redirect|reject|removeflag|'
-             r'setflag|size|spamtest|stop|string|true|vacation|virustest)',
-             Name.Builtin),
-            (r'(?i)set',
-             Keyword.Declaration),
-            # number:
-            (r'([0-9.]+)([kmgKMG])?',
-             bygroups(Literal.Number, Literal.Number)),
-            # comment:
-            (r'#.*$',
-             Comment.Single),
-            (r'/\*.*\*/',
-             Comment.Multiline),
-            # string:
-            (r'"[^"]*?"',
-             String),
-            # text block:
-            (r'text:',
-             Name.Tag, 'text'),
-        ],
-        'text': [
-            (r'[^.].*?\n', String),
-            (r'^\.', Punctuation, "#pop"),
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/slash.py b/voxvera/vendor/pygments/lexers/slash.py
deleted file mode 100644
index 1c439d0..0000000
--- a/voxvera/vendor/pygments/lexers/slash.py
+++ /dev/null
@@ -1,183 +0,0 @@
-"""
-    pygments.lexers.slash
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for the Slash programming language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import ExtendedRegexLexer, bygroups, DelegatingLexer
-from pygments.token import Name, Number, String, Comment, Punctuation, \
-    Other, Keyword, Operator, Whitespace
-
-__all__ = ['SlashLexer']
-
-
-class SlashLanguageLexer(ExtendedRegexLexer):
-    _nkw = r'(?=[^a-zA-Z_0-9])'
-
-    def move_state(new_state):
-        return ("#pop", new_state)
-
-    def right_angle_bracket(lexer, match, ctx):
-        if len(ctx.stack) > 1 and ctx.stack[-2] == "string":
-            ctx.stack.pop()
-        yield match.start(), String.Interpol, '}'
-        ctx.pos = match.end()
-        pass
-
-    tokens = {
-        "root": [
-            (r"<%=",        Comment.Preproc,    move_state("slash")),
-            (r"<%!!",       Comment.Preproc,    move_state("slash")),
-            (r"<%#.*?%>",   Comment.Multiline),
-            (r"<%",         Comment.Preproc,    move_state("slash")),
-            (r".|\n",       Other),
-        ],
-        "string": [
-            (r"\\",         String.Escape,      move_state("string_e")),
-            (r"\"",         String,             move_state("slash")),
-            (r"#\{",        String.Interpol,    "slash"),
-            (r'.|\n',       String),
-        ],
-        "string_e": [
-            (r'n',                  String.Escape,      move_state("string")),
-            (r't',                  String.Escape,      move_state("string")),
-            (r'r',                  String.Escape,      move_state("string")),
-            (r'e',                  String.Escape,      move_state("string")),
-            (r'x[a-fA-F0-9]{2}',    String.Escape,      move_state("string")),
-            (r'.',                  String.Escape,      move_state("string")),
-        ],
-        "regexp": [
-            (r'}[a-z]*',            String.Regex,       move_state("slash")),
-            (r'\\(.|\n)',           String.Regex),
-            (r'{',                  String.Regex,       "regexp_r"),
-            (r'.|\n',               String.Regex),
-        ],
-        "regexp_r": [
-            (r'}[a-z]*',            String.Regex,       "#pop"),
-            (r'\\(.|\n)',           String.Regex),
-            (r'{',                  String.Regex,       "regexp_r"),
-        ],
-        "slash": [
-            (r"%>",                     Comment.Preproc,    move_state("root")),
-            (r"\"",                     String,             move_state("string")),
-            (r"'[a-zA-Z0-9_]+",         String),
-            (r'%r{',                    String.Regex,       move_state("regexp")),
-            (r'/\*.*?\*/',              Comment.Multiline),
-            (r"(#|//).*?\n",            Comment.Single),
-            (r'-?[0-9]+e[+-]?[0-9]+',   Number.Float),
-            (r'-?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?', Number.Float),
-            (r'-?[0-9]+',               Number.Integer),
-            (r'nil'+_nkw,               Name.Builtin),
-            (r'true'+_nkw,              Name.Builtin),
-            (r'false'+_nkw,             Name.Builtin),
-            (r'self'+_nkw,              Name.Builtin),
-            (r'(class)(\s+)([A-Z][a-zA-Z0-9_\']*)',
-                bygroups(Keyword, Whitespace, Name.Class)),
-            (r'class'+_nkw,             Keyword),
-            (r'extends'+_nkw,           Keyword),
-            (r'(def)(\s+)(self)(\s*)(\.)(\s*)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)',
-                bygroups(Keyword, Whitespace, Name.Builtin, Whitespace, Punctuation, Whitespace, Name.Function)),
-            (r'(def)(\s+)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)',
-                bygroups(Keyword, Whitespace, Name.Function)),
-            (r'def'+_nkw,               Keyword),
-            (r'if'+_nkw,                Keyword),
-            (r'elsif'+_nkw,             Keyword),
-            (r'else'+_nkw,              Keyword),
-            (r'unless'+_nkw,            Keyword),
-            (r'for'+_nkw,               Keyword),
-            (r'in'+_nkw,                Keyword),
-            (r'while'+_nkw,             Keyword),
-            (r'until'+_nkw,             Keyword),
-            (r'and'+_nkw,               Keyword),
-            (r'or'+_nkw,                Keyword),
-            (r'not'+_nkw,               Keyword),
-            (r'lambda'+_nkw,            Keyword),
-            (r'try'+_nkw,               Keyword),
-            (r'catch'+_nkw,             Keyword),
-            (r'return'+_nkw,            Keyword),
-            (r'next'+_nkw,              Keyword),
-            (r'last'+_nkw,              Keyword),
-            (r'throw'+_nkw,             Keyword),
-            (r'use'+_nkw,               Keyword),
-            (r'switch'+_nkw,            Keyword),
-            (r'\\',                     Keyword),
-            (r'λ',                      Keyword),
-            (r'__FILE__'+_nkw,          Name.Builtin.Pseudo),
-            (r'__LINE__'+_nkw,          Name.Builtin.Pseudo),
-            (r'[A-Z][a-zA-Z0-9_\']*'+_nkw, Name.Constant),
-            (r'[a-z_][a-zA-Z0-9_\']*'+_nkw, Name),
-            (r'@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Instance),
-            (r'@@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Class),
-            (r'\(',                     Punctuation),
-            (r'\)',                     Punctuation),
-            (r'\[',                     Punctuation),
-            (r'\]',                     Punctuation),
-            (r'\{',                     Punctuation),
-            (r'\}',                     right_angle_bracket),
-            (r';',                      Punctuation),
-            (r',',                      Punctuation),
-            (r'<<=',                    Operator),
-            (r'>>=',                    Operator),
-            (r'<<',                     Operator),
-            (r'>>',                     Operator),
-            (r'==',                     Operator),
-            (r'!=',                     Operator),
-            (r'=>',                     Operator),
-            (r'=',                      Operator),
-            (r'<=>',                    Operator),
-            (r'<=',                     Operator),
-            (r'>=',                     Operator),
-            (r'<',                      Operator),
-            (r'>',                      Operator),
-            (r'\+\+',                   Operator),
-            (r'\+=',                    Operator),
-            (r'-=',                     Operator),
-            (r'\*\*=',                  Operator),
-            (r'\*=',                    Operator),
-            (r'\*\*',                   Operator),
-            (r'\*',                     Operator),
-            (r'/=',                     Operator),
-            (r'\+',                     Operator),
-            (r'-',                      Operator),
-            (r'/',                      Operator),
-            (r'%=',                     Operator),
-            (r'%',                      Operator),
-            (r'^=',                     Operator),
-            (r'&&=',                    Operator),
-            (r'&=',                     Operator),
-            (r'&&',                     Operator),
-            (r'&',                      Operator),
-            (r'\|\|=',                  Operator),
-            (r'\|=',                    Operator),
-            (r'\|\|',                   Operator),
-            (r'\|',                     Operator),
-            (r'!',                      Operator),
-            (r'\.\.\.',                 Operator),
-            (r'\.\.',                   Operator),
-            (r'\.',                     Operator),
-            (r'::',                     Operator),
-            (r':',                      Operator),
-            (r'(\s|\n)+',               Whitespace),
-            (r'[a-z_][a-zA-Z0-9_\']*',  Name.Variable),
-        ],
-    }
-
-
-class SlashLexer(DelegatingLexer):
-    """
-    Lexer for the Slash programming language.
-    """
-
-    name = 'Slash'
-    aliases = ['slash']
-    filenames = ['*.sla']
-    url = 'https://github.com/arturadib/Slash-A'
-    version_added = '2.4'
-
-    def __init__(self, **options):
-        from pygments.lexers.web import HtmlLexer
-        super().__init__(HtmlLexer, SlashLanguageLexer, **options)
diff --git a/voxvera/vendor/pygments/lexers/smalltalk.py b/voxvera/vendor/pygments/lexers/smalltalk.py
deleted file mode 100644
index 674b7b4..0000000
--- a/voxvera/vendor/pygments/lexers/smalltalk.py
+++ /dev/null
@@ -1,194 +0,0 @@
-"""
-    pygments.lexers.smalltalk
-    ~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Smalltalk and related languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, include, bygroups, default
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation
-
-__all__ = ['SmalltalkLexer', 'NewspeakLexer']
-
-
-class SmalltalkLexer(RegexLexer):
-    """
-    For Smalltalk syntax.
-    Contributed by Stefan Matthias Aust.
-    Rewritten by Nils Winter.
-    """
-    name = 'Smalltalk'
-    url = 'http://www.smalltalk.org/'
-    filenames = ['*.st']
-    aliases = ['smalltalk', 'squeak', 'st']
-    mimetypes = ['text/x-smalltalk']
-    version_added = '0.10'
-
-    tokens = {
-        'root': [
-            (r'(<)(\w+:)(.*?)(>)', bygroups(Text, Keyword, Text, Text)),
-            include('squeak fileout'),
-            include('whitespaces'),
-            include('method definition'),
-            (r'(\|)([\w\s]*)(\|)', bygroups(Operator, Name.Variable, Operator)),
-            include('objects'),
-            (r'\^|\:=|\_', Operator),
-            # temporaries
-            (r'[\]({}.;!]', Text),
-        ],
-        'method definition': [
-            # Not perfect can't allow whitespaces at the beginning and the
-            # without breaking everything
-            (r'([a-zA-Z]+\w*:)(\s*)(\w+)',
-             bygroups(Name.Function, Text, Name.Variable)),
-            (r'^(\b[a-zA-Z]+\w*\b)(\s*)$', bygroups(Name.Function, Text)),
-            (r'^([-+*/\\~<>=|&!?,@%]+)(\s*)(\w+)(\s*)$',
-             bygroups(Name.Function, Text, Name.Variable, Text)),
-        ],
-        'blockvariables': [
-            include('whitespaces'),
-            (r'(:)(\s*)(\w+)',
-             bygroups(Operator, Text, Name.Variable)),
-            (r'\|', Operator, '#pop'),
-            default('#pop'),  # else pop
-        ],
-        'literals': [
-            (r"'(''|[^'])*'", String, 'afterobject'),
-            (r'\$.', String.Char, 'afterobject'),
-            (r'#\(', String.Symbol, 'parenth'),
-            (r'\)', Text, 'afterobject'),
-            (r'(\d+r)?-?\d+(\.\d+)?(e-?\d+)?', Number, 'afterobject'),
-        ],
-        '_parenth_helper': [
-            include('whitespaces'),
-            (r'(\d+r)?-?\d+(\.\d+)?(e-?\d+)?', Number),
-            (r'[-+*/\\~<>=|&#!?,@%\w:]+', String.Symbol),
-            # literals
-            (r"'(''|[^'])*'", String),
-            (r'\$.', String.Char),
-            (r'#*\(', String.Symbol, 'inner_parenth'),
-        ],
-        'parenth': [
-            # This state is a bit tricky since
-            # we can't just pop this state
-            (r'\)', String.Symbol, ('root', 'afterobject')),
-            include('_parenth_helper'),
-        ],
-        'inner_parenth': [
-            (r'\)', String.Symbol, '#pop'),
-            include('_parenth_helper'),
-        ],
-        'whitespaces': [
-            # skip whitespace and comments
-            (r'\s+', Text),
-            (r'"(""|[^"])*"', Comment),
-        ],
-        'objects': [
-            (r'\[', Text, 'blockvariables'),
-            (r'\]', Text, 'afterobject'),
-            (r'\b(self|super|true|false|nil|thisContext)\b',
-             Name.Builtin.Pseudo, 'afterobject'),
-            (r'\b[A-Z]\w*(?!:)\b', Name.Class, 'afterobject'),
-            (r'\b[a-z]\w*(?!:)\b', Name.Variable, 'afterobject'),
-            (r'#("(""|[^"])*"|[-+*/\\~<>=|&!?,@%]+|[\w:]+)',
-             String.Symbol, 'afterobject'),
-            include('literals'),
-        ],
-        'afterobject': [
-            (r'! !$', Keyword, '#pop'),  # squeak chunk delimiter
-            include('whitespaces'),
-            (r'\b(ifTrue:|ifFalse:|whileTrue:|whileFalse:|timesRepeat:)',
-             Name.Builtin, '#pop'),
-            (r'\b(new\b(?!:))', Name.Builtin),
-            (r'\:=|\_', Operator, '#pop'),
-            (r'\b[a-zA-Z]+\w*:', Name.Function, '#pop'),
-            (r'\b[a-zA-Z]+\w*', Name.Function),
-            (r'\w+:?|[-+*/\\~<>=|&!?,@%]+', Name.Function, '#pop'),
-            (r'\.', Punctuation, '#pop'),
-            (r';', Punctuation),
-            (r'[\])}]', Text),
-            (r'[\[({]', Text, '#pop'),
-        ],
-        'squeak fileout': [
-            # Squeak fileout format (optional)
-            (r'^"(""|[^"])*"!', Keyword),
-            (r"^'(''|[^'])*'!", Keyword),
-            (r'^(!)(\w+)( commentStamp: )(.*?)( prior: .*?!\n)(.*?)(!)',
-                bygroups(Keyword, Name.Class, Keyword, String, Keyword, Text, Keyword)),
-            (r"^(!)(\w+(?: class)?)( methodsFor: )('(?:''|[^'])*')(.*?!)",
-                bygroups(Keyword, Name.Class, Keyword, String, Keyword)),
-            (r'^(\w+)( subclass: )(#\w+)'
-             r'(\s+instanceVariableNames: )(.*?)'
-             r'(\s+classVariableNames: )(.*?)'
-             r'(\s+poolDictionaries: )(.*?)'
-             r'(\s+category: )(.*?)(!)',
-                bygroups(Name.Class, Keyword, String.Symbol, Keyword, String, Keyword,
-                         String, Keyword, String, Keyword, String, Keyword)),
-            (r'^(\w+(?: class)?)(\s+instanceVariableNames: )(.*?)(!)',
-                bygroups(Name.Class, Keyword, String, Keyword)),
-            (r'(!\n)(\].*)(! !)$', bygroups(Keyword, Text, Keyword)),
-            (r'! !$', Keyword),
-        ],
-    }
-
-
-class NewspeakLexer(RegexLexer):
-    """
-    For Newspeak syntax.
-    """
-    name = 'Newspeak'
-    url = 'http://newspeaklanguage.org/'
-    filenames = ['*.ns2']
-    aliases = ['newspeak', ]
-    mimetypes = ['text/x-newspeak']
-    version_added = '1.1'
-
-    tokens = {
-        'root': [
-            (r'\b(Newsqueak2)\b', Keyword.Declaration),
-            (r"'[^']*'", String),
-            (r'\b(class)(\s+)(\w+)(\s*)',
-             bygroups(Keyword.Declaration, Text, Name.Class, Text)),
-            (r'\b(mixin|self|super|private|public|protected|nil|true|false)\b',
-             Keyword),
-            (r'(\w+\:)(\s*)([a-zA-Z_]\w+)',
-             bygroups(Name.Function, Text, Name.Variable)),
-            (r'(\w+)(\s*)(=)',
-             bygroups(Name.Attribute, Text, Operator)),
-            (r'<\w+>', Comment.Special),
-            include('expressionstat'),
-            include('whitespace')
-        ],
-
-        'expressionstat': [
-            (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
-            (r'\d+', Number.Integer),
-            (r':\w+', Name.Variable),
-            (r'(\w+)(::)', bygroups(Name.Variable, Operator)),
-            (r'\w+:', Name.Function),
-            (r'\w+', Name.Variable),
-            (r'\(|\)', Punctuation),
-            (r'\[|\]', Punctuation),
-            (r'\{|\}', Punctuation),
-
-            (r'(\^|\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-|:)', Operator),
-            (r'\.|;', Punctuation),
-            include('whitespace'),
-            include('literals'),
-        ],
-        'literals': [
-            (r'\$.', String),
-            (r"'[^']*'", String),
-            (r"#'[^']*'", String.Symbol),
-            (r"#\w+:?", String.Symbol),
-            (r"#(\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-)+", String.Symbol)
-        ],
-        'whitespace': [
-            (r'\s+', Text),
-            (r'"[^"]*"', Comment)
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/smithy.py b/voxvera/vendor/pygments/lexers/smithy.py
deleted file mode 100644
index bd479ae..0000000
--- a/voxvera/vendor/pygments/lexers/smithy.py
+++ /dev/null
@@ -1,77 +0,0 @@
-"""
-    pygments.lexers.smithy
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the Smithy IDL.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, words
-from pygments.token import Text, Comment, Keyword, Name, String, \
-    Number, Whitespace, Punctuation
-
-__all__ = ['SmithyLexer']
-
-
-class SmithyLexer(RegexLexer):
-    """
-    For Smithy IDL
-    """
-    name = 'Smithy'
-    url = 'https://awslabs.github.io/smithy/'
-    filenames = ['*.smithy']
-    aliases = ['smithy']
-    version_added = '2.10'
-
-    unquoted = r'[A-Za-z0-9_\.#$-]+'
-    identifier = r"[A-Za-z0-9_\.#$-]+"
-
-    simple_shapes = (
-        'use', 'byte', 'short', 'integer', 'long', 'float', 'document',
-        'double', 'bigInteger', 'bigDecimal', 'boolean', 'blob', 'string',
-        'timestamp',
-    )
-
-    aggregate_shapes = (
-       'apply', 'list', 'map', 'set', 'structure', 'union', 'resource',
-       'operation', 'service', 'trait'
-    )
-
-    tokens = {
-        'root': [
-            (r'///.*$', Comment.Multiline),
-            (r'//.*$', Comment),
-            (r'@[0-9a-zA-Z\.#-]*', Name.Decorator),
-            (r'(=)', Name.Decorator),
-            (r'^(\$version)(:)(.+)',
-                bygroups(Keyword.Declaration, Name.Decorator, Name.Class)),
-            (r'^(namespace)(\s+' + identifier + r')\b',
-                bygroups(Keyword.Declaration, Name.Class)),
-            (words(simple_shapes,
-                   prefix=r'^', suffix=r'(\s+' + identifier + r')\b'),
-                bygroups(Keyword.Declaration, Name.Class)),
-            (words(aggregate_shapes,
-                   prefix=r'^', suffix=r'(\s+' + identifier + r')'),
-                bygroups(Keyword.Declaration, Name.Class)),
-            (r'^(metadata)(\s+)((?:\S+)|(?:\"[^"]+\"))(\s*)(=)',
-                bygroups(Keyword.Declaration, Whitespace, Name.Class,
-                         Whitespace, Name.Decorator)),
-            (r"(true|false|null)", Keyword.Constant),
-            (r"(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)", Number),
-            (identifier + ":", Name.Label),
-            (identifier, Name.Variable.Class),
-            (r'\[', Text, "#push"),
-            (r'\]', Text, "#pop"),
-            (r'\(', Text, "#push"),
-            (r'\)', Text, "#pop"),
-            (r'\{', Text, "#push"),
-            (r'\}', Text, "#pop"),
-            (r'"{3}(\\\\|\n|\\")*"{3}', String.Doc),
-            (r'"(\\\\|\n|\\"|[^"])*"', String.Double),
-            (r"'(\\\\|\n|\\'|[^'])*'", String.Single),
-            (r'[:,]+', Punctuation),
-            (r'\s+', Whitespace),
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/smv.py b/voxvera/vendor/pygments/lexers/smv.py
deleted file mode 100644
index bf97b52..0000000
--- a/voxvera/vendor/pygments/lexers/smv.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-    pygments.lexers.smv
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the SMV languages.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, words
-from pygments.token import Comment, Keyword, Name, Number, Operator, \
-    Punctuation, Text
-
-__all__ = ['NuSMVLexer']
-
-
-class NuSMVLexer(RegexLexer):
-    """
-    Lexer for the NuSMV language.
-    """
-
-    name = 'NuSMV'
-    aliases = ['nusmv']
-    filenames = ['*.smv']
-    mimetypes = []
-    url = 'https://nusmv.fbk.eu'
-    version_added = '2.2'
-
-    tokens = {
-        'root': [
-            # Comments
-            (r'(?s)\/\-\-.*?\-\-/', Comment),
-            (r'--.*\n', Comment),
-
-            # Reserved
-            (words(('MODULE', 'DEFINE', 'MDEFINE', 'CONSTANTS', 'VAR', 'IVAR',
-                    'FROZENVAR', 'INIT', 'TRANS', 'INVAR', 'SPEC', 'CTLSPEC',
-                    'LTLSPEC', 'PSLSPEC', 'COMPUTE', 'NAME', 'INVARSPEC',
-                    'FAIRNESS', 'JUSTICE', 'COMPASSION', 'ISA', 'ASSIGN',
-                    'CONSTRAINT', 'SIMPWFF', 'CTLWFF', 'LTLWFF', 'PSLWFF',
-                    'COMPWFF', 'IN', 'MIN', 'MAX', 'MIRROR', 'PRED',
-                    'PREDICATES'), suffix=r'(?![\w$#-])'),
-             Keyword.Declaration),
-            (r'process(?![\w$#-])', Keyword),
-            (words(('array', 'of', 'boolean', 'integer', 'real', 'word'),
-                   suffix=r'(?![\w$#-])'), Keyword.Type),
-            (words(('case', 'esac'), suffix=r'(?![\w$#-])'), Keyword),
-            (words(('word1', 'bool', 'signed', 'unsigned', 'extend', 'resize',
-                    'sizeof', 'uwconst', 'swconst', 'init', 'self', 'count',
-                    'abs', 'max', 'min'), suffix=r'(?![\w$#-])'),
-             Name.Builtin),
-            (words(('EX', 'AX', 'EF', 'AF', 'EG', 'AG', 'E', 'F', 'O', 'G',
-                    'H', 'X', 'Y', 'Z', 'A', 'U', 'S', 'V', 'T', 'BU', 'EBF',
-                    'ABF', 'EBG', 'ABG', 'next', 'mod', 'union', 'in', 'xor',
-                    'xnor'), suffix=r'(?![\w$#-])'),
-                Operator.Word),
-            (words(('TRUE', 'FALSE'), suffix=r'(?![\w$#-])'), Keyword.Constant),
-
-            # Names
-            (r'[a-zA-Z_][\w$#-]*', Name.Variable),
-
-            # Operators
-            (r':=', Operator),
-            (r'[-&|+*/<>!=]', Operator),
-
-            # Literals
-            (r'\-?\d+\b', Number.Integer),
-            (r'0[su][bB]\d*_[01_]+', Number.Bin),
-            (r'0[su][oO]\d*_[0-7_]+', Number.Oct),
-            (r'0[su][dD]\d*_[\d_]+', Number.Decimal),
-            (r'0[su][hH]\d*_[\da-fA-F_]+', Number.Hex),
-
-            # Whitespace, punctuation and the rest
-            (r'\s+', Text.Whitespace),
-            (r'[()\[\]{};?:.,]', Punctuation),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/snobol.py b/voxvera/vendor/pygments/lexers/snobol.py
deleted file mode 100644
index bab51e9..0000000
--- a/voxvera/vendor/pygments/lexers/snobol.py
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-    pygments.lexers.snobol
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the SNOBOL language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation
-
-__all__ = ['SnobolLexer']
-
-
-class SnobolLexer(RegexLexer):
-    """
-    Lexer for the SNOBOL4 programming language.
-
-    Recognizes the common ASCII equivalents of the original SNOBOL4 operators.
-    Does not require spaces around binary operators.
-    """
-
-    name = "Snobol"
-    aliases = ["snobol"]
-    filenames = ['*.snobol']
-    mimetypes = ['text/x-snobol']
-    url = 'https://www.regressive.org/snobol4'
-    version_added = '1.5'
-
-    tokens = {
-        # root state, start of line
-        # comments, continuation lines, and directives start in column 1
-        # as do labels
-        'root': [
-            (r'\*.*\n', Comment),
-            (r'[+.] ', Punctuation, 'statement'),
-            (r'-.*\n', Comment),
-            (r'END\s*\n', Name.Label, 'heredoc'),
-            (r'[A-Za-z$][\w$]*', Name.Label, 'statement'),
-            (r'\s+', Text, 'statement'),
-        ],
-        # statement state, line after continuation or label
-        'statement': [
-            (r'\s*\n', Text, '#pop'),
-            (r'\s+', Text),
-            (r'(?<=[^\w.])(LT|LE|EQ|NE|GE|GT|INTEGER|IDENT|DIFFER|LGT|SIZE|'
-             r'REPLACE|TRIM|DUPL|REMDR|DATE|TIME|EVAL|APPLY|OPSYN|LOAD|UNLOAD|'
-             r'LEN|SPAN|BREAK|ANY|NOTANY|TAB|RTAB|REM|POS|RPOS|FAIL|FENCE|'
-             r'ABORT|ARB|ARBNO|BAL|SUCCEED|INPUT|OUTPUT|TERMINAL)(?=[^\w.])',
-             Name.Builtin),
-            (r'[A-Za-z][\w.]*', Name),
-            # ASCII equivalents of original operators
-            # | for the EBCDIC equivalent, ! likewise
-            # \ for EBCDIC negation
-            (r'\*\*|[?$.!%*/#+\-@|&\\=]', Operator),
-            (r'"[^"]*"', String),
-            (r"'[^']*'", String),
-            # Accept SPITBOL syntax for real numbers
-            # as well as Macro SNOBOL4
-            (r'[0-9]+(?=[^.EeDd])', Number.Integer),
-            (r'[0-9]+(\.[0-9]*)?([EDed][-+]?[0-9]+)?', Number.Float),
-            # Goto
-            (r':', Punctuation, 'goto'),
-            (r'[()<>,;]', Punctuation),
-        ],
-        # Goto block
-        'goto': [
-            (r'\s*\n', Text, "#pop:2"),
-            (r'\s+', Text),
-            (r'F|S', Keyword),
-            (r'(\()([A-Za-z][\w.]*)(\))',
-             bygroups(Punctuation, Name.Label, Punctuation))
-        ],
-        # everything after the END statement is basically one
-        # big heredoc.
-        'heredoc': [
-            (r'.*\n', String.Heredoc)
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/solidity.py b/voxvera/vendor/pygments/lexers/solidity.py
deleted file mode 100644
index 3182a14..0000000
--- a/voxvera/vendor/pygments/lexers/solidity.py
+++ /dev/null
@@ -1,87 +0,0 @@
-"""
-    pygments.lexers.solidity
-    ~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Solidity.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, include, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Whitespace
-
-__all__ = ['SolidityLexer']
-
-
-class SolidityLexer(RegexLexer):
-    """
-    For Solidity source code.
-    """
-
-    name = 'Solidity'
-    aliases = ['solidity']
-    filenames = ['*.sol']
-    mimetypes = []
-    url = 'https://soliditylang.org'
-    version_added = '2.5'
-
-    datatype = (
-        r'\b(address|bool|(?:(?:bytes|hash|int|string|uint)(?:8|16|24|32|40|48|56|64'
-        r'|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208'
-        r'|216|224|232|240|248|256)?))\b'
-    )
-
-    tokens = {
-        'root': [
-            include('whitespace'),
-            include('comments'),
-            (r'\bpragma\s+solidity\b', Keyword, 'pragma'),
-            (r'\b(contract)(\s+)([a-zA-Z_]\w*)',
-             bygroups(Keyword, Whitespace, Name.Entity)),
-            (datatype + r'(\s+)((?:external|public|internal|private)\s+)?' +
-             r'([a-zA-Z_]\w*)',
-             bygroups(Keyword.Type, Whitespace, Keyword, Name.Variable)),
-            (r'\b(enum|event|function|struct)(\s+)([a-zA-Z_]\w*)',
-             bygroups(Keyword.Type, Whitespace, Name.Variable)),
-            (r'\b(msg|block|tx)\.([A-Za-z_][a-zA-Z0-9_]*)\b', Keyword),
-            (words((
-                'block', 'break', 'constant', 'constructor', 'continue',
-                'contract', 'do', 'else', 'external', 'false', 'for',
-                'function', 'if', 'import', 'inherited', 'internal', 'is',
-                'library', 'mapping', 'memory', 'modifier', 'msg', 'new',
-                'payable', 'private', 'public', 'require', 'return',
-                'returns', 'struct', 'suicide', 'throw', 'this', 'true',
-                'tx', 'var', 'while'), prefix=r'\b', suffix=r'\b'),
-             Keyword.Type),
-            (words(('keccak256',), prefix=r'\b', suffix=r'\b'), Name.Builtin),
-            (datatype, Keyword.Type),
-            include('constants'),
-            (r'[a-zA-Z_]\w*', Text),
-            (r'[~!%^&*+=|?:<>/-]', Operator),
-            (r'[.;{}(),\[\]]', Punctuation)
-        ],
-        'comments': [
-            (r'//(\n|[\w\W]*?[^\\]\n)', Comment.Single),
-            (r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline),
-            (r'/(\\\n)?[*][\w\W]*', Comment.Multiline)
-        ],
-        'constants': [
-            (r'("(\\"|.)*?")', String.Double),
-            (r"('(\\'|.)*?')", String.Single),
-            (r'\b0[xX][0-9a-fA-F]+\b', Number.Hex),
-            (r'\b\d+\b', Number.Decimal),
-        ],
-        'pragma': [
-            include('whitespace'),
-            include('comments'),
-            (r'(\^|>=|<)(\s*)(\d+\.\d+\.\d+)',
-             bygroups(Operator, Whitespace, Keyword)),
-            (r';', Punctuation, '#pop')
-        ],
-        'whitespace': [
-            (r'\s+', Whitespace),
-            (r'\n', Whitespace)
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/soong.py b/voxvera/vendor/pygments/lexers/soong.py
deleted file mode 100644
index bbf204d..0000000
--- a/voxvera/vendor/pygments/lexers/soong.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-    pygments.lexers.soong
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for Soong (Android.bp Blueprint) files.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, include
-from pygments.token import Comment, Name, Number, Operator, Punctuation, \
-        String, Whitespace
-
-__all__ = ['SoongLexer']
-
-class SoongLexer(RegexLexer):
-    name = 'Soong'
-    version_added = '2.18'
-    url = 'https://source.android.com/docs/setup/reference/androidbp'
-    aliases = ['androidbp', 'bp', 'soong']
-    filenames = ['Android.bp']
-
-    tokens = {
-        'root': [
-            # A variable assignment
-            (r'(\w*)(\s*)(\+?=)(\s*)',
-             bygroups(Name.Variable, Whitespace, Operator, Whitespace),
-             'assign-rhs'),
-
-            # A top-level module
-            (r'(\w*)(\s*)(\{)',
-             bygroups(Name.Function, Whitespace, Punctuation),
-             'in-rule'),
-
-            # Everything else
-            include('comments'),
-            (r'\s+', Whitespace),  # newlines okay
-        ],
-        'assign-rhs': [
-            include('expr'),
-            (r'\n', Whitespace, '#pop'),
-        ],
-        'in-list': [
-            include('expr'),
-            include('comments'),
-            (r'\s+', Whitespace),  # newlines okay in a list
-            (r',', Punctuation),
-            (r'\]', Punctuation, '#pop'),
-        ],
-        'in-map': [
-            # A map key
-            (r'(\w+)(:)(\s*)', bygroups(Name, Punctuation, Whitespace)),
-
-            include('expr'),
-            include('comments'),
-            (r'\s+', Whitespace),  # newlines okay in a map
-            (r',', Punctuation),
-            (r'\}', Punctuation, '#pop'),
-        ],
-        'in-rule': [
-            # Just re-use map syntax
-            include('in-map'),
-        ],
-        'comments': [
-            (r'//.*', Comment.Single),
-            (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
-        ],
-        'expr': [
-            (r'(true|false)\b', Name.Builtin),
-            (r'0x[0-9a-fA-F]+', Number.Hex),
-            (r'\d+', Number.Integer),
-            (r'".*?"', String),
-            (r'\{', Punctuation, 'in-map'),
-            (r'\[', Punctuation, 'in-list'),
-            (r'\w+', Name),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/sophia.py b/voxvera/vendor/pygments/lexers/sophia.py
deleted file mode 100644
index 37fcec5..0000000
--- a/voxvera/vendor/pygments/lexers/sophia.py
+++ /dev/null
@@ -1,102 +0,0 @@
-"""
-    pygments.lexers.sophia
-    ~~~~~~~~~~~~~~~~~~~~~~
-
-    Lexer for Sophia.
-
-    Derived from pygments/lexers/reason.py.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, include, default, words
-from pygments.token import Comment, Keyword, Name, Number, Operator, \
-    Punctuation, String, Text
-
-__all__ = ['SophiaLexer']
-
-class SophiaLexer(RegexLexer):
-    """
-    A Sophia lexer.
-    """
-
-    name = 'Sophia'
-    aliases = ['sophia']
-    filenames = ['*.aes']
-    mimetypes = []
-    url = 'https://docs.aeternity.com/aesophia'
-    version_added = '2.11'
-
-    keywords = (
-        'contract', 'include', 'let', 'switch', 'type', 'record', 'datatype',
-        'if', 'elif', 'else', 'function', 'stateful', 'payable', 'public',
-        'entrypoint', 'private', 'indexed', 'namespace', 'interface', 'main',
-        'using', 'as', 'for', 'hiding',
-    )
-
-    builtins = ('state', 'put', 'abort', 'require')
-
-    word_operators = ('mod', 'band', 'bor', 'bxor', 'bnot')
-
-    primitive_types = ('int', 'address', 'bool', 'bits', 'bytes', 'string',
-                       'list', 'option', 'char', 'unit', 'map', 'event',
-                       'hash', 'signature', 'oracle', 'oracle_query')
-
-    tokens = {
-        'escape-sequence': [
-            (r'\\[\\"\'ntbr]', String.Escape),
-            (r'\\[0-9]{3}', String.Escape),
-            (r'\\x[0-9a-fA-F]{2}', String.Escape),
-        ],
-        'root': [
-            (r'\s+', Text.Whitespace),
-            (r'(true|false)\b', Keyword.Constant),
-            (r'\b([A-Z][\w\']*)(?=\s*\.)', Name.Class, 'dotted'),
-            (r'\b([A-Z][\w\']*)', Name.Function),
-            (r'//.*?\n', Comment.Single),
-            (r'\/\*(?!/)', Comment.Multiline, 'comment'),
-
-            (r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
-            (r'#[\da-fA-F][\da-fA-F_]*', Name.Label),
-            (r'\d[\d_]*', Number.Integer),
-
-            (words(keywords, suffix=r'\b'), Keyword),
-            (words(builtins, suffix=r'\b'), Name.Builtin),
-            (words(word_operators, prefix=r'\b', suffix=r'\b'), Operator.Word),
-            (words(primitive_types, prefix=r'\b', suffix=r'\b'), Keyword.Type),
-
-            (r'[=!<>+\\*/:&|?~@^-]', Operator.Word),
-            (r'[.;:{}(),\[\]]', Punctuation),
-
-            (r"(ak_|ok_|oq_|ct_)[\w']*", Name.Label),
-            (r"[^\W\d][\w']*", Name),
-
-            (r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'",
-             String.Char),
-            (r"'.'", String.Char),
-            (r"'[a-z][\w]*", Name.Variable),
-
-            (r'"', String.Double, 'string')
-        ],
-        'comment': [
-            (r'[^/*]+', Comment.Multiline),
-            (r'\/\*', Comment.Multiline, '#push'),
-            (r'\*\/', Comment.Multiline, '#pop'),
-            (r'\*', Comment.Multiline),
-        ],
-        'string': [
-            (r'[^\\"]+', String.Double),
-            include('escape-sequence'),
-            (r'\\\n', String.Double),
-            (r'"', String.Double, '#pop'),
-        ],
-        'dotted': [
-            (r'\s+', Text),
-            (r'\.', Punctuation),
-            (r'[A-Z][\w\']*(?=\s*\.)', Name.Function),
-            (r'[A-Z][\w\']*', Name.Function, '#pop'),
-            (r'[a-z_][\w\']*', Name, '#pop'),
-            default('#pop'),
-        ],
-    }
diff --git a/voxvera/vendor/pygments/lexers/special.py b/voxvera/vendor/pygments/lexers/special.py
deleted file mode 100644
index 524946f..0000000
--- a/voxvera/vendor/pygments/lexers/special.py
+++ /dev/null
@@ -1,122 +0,0 @@
-"""
-    pygments.lexers.special
-    ~~~~~~~~~~~~~~~~~~~~~~~
-
-    Special lexers.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-import ast
-
-from pygments.lexer import Lexer, line_re
-from pygments.token import Token, Error, Text, Generic
-from pygments.util import get_choice_opt
-
-
-__all__ = ['TextLexer', 'OutputLexer', 'RawTokenLexer']
-
-
-class TextLexer(Lexer):
-    """
-    "Null" lexer, doesn't highlight anything.
-    """
-    name = 'Text only'
-    aliases = ['text']
-    filenames = ['*.txt']
-    mimetypes = ['text/plain']
-    url = ""
-    version_added = ''
-
-    priority = 0.01
-
-    def get_tokens_unprocessed(self, text):
-        yield 0, Text, text
-
-    def analyse_text(text):
-        return TextLexer.priority
-
-
-class OutputLexer(Lexer):
-    """
-    Simple lexer that highlights everything as ``Token.Generic.Output``.
-    """
-    name = 'Text output'
-    aliases = ['output']
-    url = ""
-    version_added = '2.10'
-    _example = "output/output"
-
-    def get_tokens_unprocessed(self, text):
-        yield 0, Generic.Output, text
-
-
-_ttype_cache = {}
-
-
-class RawTokenLexer(Lexer):
-    """
-    Recreate a token stream formatted with the `RawTokenFormatter`.
-
-    Additional options accepted:
-
-    `compress`
-        If set to ``"gz"`` or ``"bz2"``, decompress the token stream with
-        the given compression algorithm before lexing (default: ``""``).
-    """
-    name = 'Raw token data'
-    aliases = []
-    filenames = []
-    mimetypes = ['application/x-pygments-tokens']
-    url = 'https://pygments.org/docs/formatters/#RawTokenFormatter'
-    version_added = ''
-
-    def __init__(self, **options):
-        self.compress = get_choice_opt(options, 'compress',
-                                       ['', 'none', 'gz', 'bz2'], '')
-        Lexer.__init__(self, **options)
-
-    def get_tokens(self, text):
-        if self.compress:
-            if isinstance(text, str):
-                text = text.encode('latin1')
-            try:
-                if self.compress == 'gz':
-                    import gzip
-                    text = gzip.decompress(text)
-                elif self.compress == 'bz2':
-                    import bz2
-                    text = bz2.decompress(text)
-            except OSError:
-                yield Error, text.decode('latin1')
-        if isinstance(text, bytes):
-            text = text.decode('latin1')
-
-        # do not call Lexer.get_tokens() because stripping is not optional.
-        text = text.strip('\n') + '\n'
-        for i, t, v in self.get_tokens_unprocessed(text):
-            yield t, v
-
-    def get_tokens_unprocessed(self, text):
-        length = 0
-        for match in line_re.finditer(text):
-            try:
-                ttypestr, val = match.group().rstrip().split('\t', 1)
-                ttype = _ttype_cache.get(ttypestr)
-                if not ttype:
-                    ttype = Token
-                    ttypes = ttypestr.split('.')[1:]
-                    for ttype_ in ttypes:
-                        if not ttype_ or not ttype_[0].isupper():
-                            raise ValueError('malformed token name')
-                        ttype = getattr(ttype, ttype_)
-                    _ttype_cache[ttypestr] = ttype
-                val = ast.literal_eval(val)
-                if not isinstance(val, str):
-                    raise ValueError('expected str')
-            except (SyntaxError, ValueError):
-                val = match.group()
-                ttype = Error
-            yield length, ttype, val
-            length += len(val)
diff --git a/voxvera/vendor/pygments/lexers/spice.py b/voxvera/vendor/pygments/lexers/spice.py
deleted file mode 100644
index 9d2b1a1..0000000
--- a/voxvera/vendor/pygments/lexers/spice.py
+++ /dev/null
@@ -1,70 +0,0 @@
-"""
-    pygments.lexers.spice
-    ~~~~~~~~~~~~~~~~~~~~~
-
-    Lexers for the Spice programming language.
-
-    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, bygroups, words
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
-    Number, Punctuation, Whitespace
-
-__all__ = ['SpiceLexer']
-
-
-class SpiceLexer(RegexLexer):
-    """
-    For Spice source.
-    """
-    name = 'Spice'
-    url = 'https://www.spicelang.com'
-    filenames = ['*.spice']
-    aliases = ['spice', 'spicelang']
-    mimetypes = ['text/x-spice']
-    version_added = '2.11'
-
-    tokens = {
-        'root': [
-            (r'\n', Whitespace),
-            (r'\s+', Whitespace),
-            (r'\\\n', Text),
-            # comments
-            (r'//(.*?)\n', Comment.Single),
-            (r'/(\\\n)?[*]{2}(.|\n)*?[*](\\\n)?/', String.Doc),
-            (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
-            # keywords
-            (r'(import|as)\b', Keyword.Namespace),
-            (r'(f|p|type|struct|interface|enum|alias|operator)\b', Keyword.Declaration),
-            (words(('if', 'else', 'switch', 'case', 'default', 'for', 'foreach', 'do',
-                    'while', 'break', 'continue', 'fallthrough', 'return', 'assert',
-                    'unsafe', 'ext'), suffix=r'\b'), Keyword),
-            (words(('const', 'signed', 'unsigned', 'inline', 'public', 'heap', 'compose'),
-                   suffix=r'\b'), Keyword.Pseudo),
-            (words(('new', 'yield', 'stash', 'pick', 'sync', 'class'), suffix=r'\b'),
-                   Keyword.Reserved),
-            (r'(true|false|nil)\b', Keyword.Constant),
-            (words(('double', 'int', 'short', 'long', 'byte', 'char', 'string',
-                    'bool', 'dyn'), suffix=r'\b'), Keyword.Type),
-            (words(('printf', 'sizeof', 'alignof', 'len', 'panic'), suffix=r'\b(\()'),
-             bygroups(Name.Builtin, Punctuation)),
-            # numeric literals
-            (r'[-]?[0-9]*[.][0-9]+([eE][+-]?[0-9]+)?', Number.Double),
-            (r'0[bB][01]+[slu]?', Number.Bin),
-            (r'0[oO][0-7]+[slu]?', Number.Oct),
-            (r'0[xXhH][0-9a-fA-F]+[slu]?', Number.Hex),
-            (r'(0[dD])?[0-9]+[slu]?', Number.Integer),
-            # string literal
-            (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
-            # char literal
-            (r'\'(\\\\|\\[^\\]|[^\'\\])\'', String.Char),
-            # tokens
-            (r'<<=|>>=|<<|>>|<=|>=|\+=|-=|\*=|/=|\%=|\|=|&=|\^=|&&|\|\||&|\||'
-             r'\+\+|--|\%|\^|\~|==|!=|->|::|[.]{3}|#!|#|[+\-*/&]', Operator),
-            (r'[|<>=!()\[\]{}.,;:\?]', Punctuation),
-            # identifiers
-            (r'[^\W\d]\w*', Name.Other),
-        ]
-    }
diff --git a/voxvera/vendor/pygments/lexers/sql.py b/voxvera/vendor/pygments/lexers/sql.py
deleted file mode 100644
index d3e6f17..0000000
--- a/voxvera/vendor/pygments/lexers/sql.py
+++ /dev/null
@@ -1,1109 +0,0 @@
-"""
-    pygments.lexers.sql
-    ~~~~~~~~~~~~~~~~~~~
-
-    Lexers for various SQL dialects and related interactive sessions.
-
-    Postgres specific lexers:
-
-    `PostgresLexer`
-        A SQL lexer for the PostgreSQL dialect. Differences w.r.t. the SQL
-        lexer are:
-
-        - keywords and data types list parsed from the PG docs (run the
-          `_postgres_builtins` module to update them);
-        - Content of $-strings parsed using a specific lexer, e.g. the content
-          of a PL/Python function is parsed using the Python lexer;
-        - parse PG specific constructs: E-strings, $-strings, U&-strings,
-          different operators and punctuation.
-
-    `PlPgsqlLexer`
-        A lexer for the PL/pgSQL language. Adds a few specific construct on
-        top of the PG SQL lexer (such as <{text}' if rule else text
-                    append(text)
-            else:
-                styles: Dict[str, int] = {}
-                for text, style, _ in Segment.filter_control(
-                    Segment.simplify(self._record_buffer)
-                ):
-                    text = escape(text)
-                    if style:
-                        rule = style.get_html_style(_theme)
-                        style_number = styles.setdefault(rule, len(styles) + 1)
-                        if style.link:
-                            text = f'{text}'
-                        else:
-                            text = f'{text}'
-                    append(text)
-                stylesheet_rules: List[str] = []
-                stylesheet_append = stylesheet_rules.append
-                for style_rule, style_number in styles.items():
-                    if style_rule:
-                        stylesheet_append(f".r{style_number} {{{style_rule}}}")
-                stylesheet = "\n".join(stylesheet_rules)
-
-            rendered_code = render_code_format.format(
-                code="".join(fragments),
-                stylesheet=stylesheet,
-                foreground=_theme.foreground_color.hex,
-                background=_theme.background_color.hex,
-            )
-            if clear:
-                del self._record_buffer[:]
-        return rendered_code
-
-    def save_html(
-        self,
-        path: str,
-        *,
-        theme: Optional[TerminalTheme] = None,
-        clear: bool = True,
-        code_format: str = CONSOLE_HTML_FORMAT,
-        inline_styles: bool = False,
-    ) -> None:
-        """Generate HTML from console contents and write to a file (requires record=True argument in constructor).
-
-        Args:
-            path (str): Path to write html file.
-            theme (TerminalTheme, optional): TerminalTheme object containing console colors.
-            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
-            code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
-                '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
-            inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
-                larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
-                Defaults to False.
-
-        """
-        html = self.export_html(
-            theme=theme,
-            clear=clear,
-            code_format=code_format,
-            inline_styles=inline_styles,
-        )
-        with open(path, "w", encoding="utf-8") as write_file:
-            write_file.write(html)
-
-    def export_svg(
-        self,
-        *,
-        title: str = "Rich",
-        theme: Optional[TerminalTheme] = None,
-        clear: bool = True,
-        code_format: str = CONSOLE_SVG_FORMAT,
-        font_aspect_ratio: float = 0.61,
-        unique_id: Optional[str] = None,
-    ) -> str:
-        """
-        Generate an SVG from the console contents (requires record=True in Console constructor).
-
-        Args:
-            title (str, optional): The title of the tab in the output image
-            theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
-            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
-            code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
-                into the string in order to form the final SVG output. The default template used and the variables
-                injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
-            font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
-                string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
-                If you aren't specifying a different font inside ``code_format``, you probably don't need this.
-            unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
-                ids). If not set, this defaults to a computed value based on the recorded content.
-        """
-
-        from rich.cells import cell_len
-
-        style_cache: Dict[Style, str] = {}
-
-        def get_svg_style(style: Style) -> str:
-            """Convert a Style to CSS rules for SVG."""
-            if style in style_cache:
-                return style_cache[style]
-            css_rules = []
-            color = (
-                _theme.foreground_color
-                if (style.color is None or style.color.is_default)
-                else style.color.get_truecolor(_theme)
-            )
-            bgcolor = (
-                _theme.background_color
-                if (style.bgcolor is None or style.bgcolor.is_default)
-                else style.bgcolor.get_truecolor(_theme)
-            )
-            if style.reverse:
-                color, bgcolor = bgcolor, color
-            if style.dim:
-                color = blend_rgb(color, bgcolor, 0.4)
-            css_rules.append(f"fill: {color.hex}")
-            if style.bold:
-                css_rules.append("font-weight: bold")
-            if style.italic:
-                css_rules.append("font-style: italic;")
-            if style.underline:
-                css_rules.append("text-decoration: underline;")
-            if style.strike:
-                css_rules.append("text-decoration: line-through;")
-
-            css = ";".join(css_rules)
-            style_cache[style] = css
-            return css
-
-        _theme = theme or SVG_EXPORT_THEME
-
-        width = self.width
-        char_height = 20
-        char_width = char_height * font_aspect_ratio
-        line_height = char_height * 1.22
-
-        margin_top = 1
-        margin_right = 1
-        margin_bottom = 1
-        margin_left = 1
-
-        padding_top = 40
-        padding_right = 8
-        padding_bottom = 8
-        padding_left = 8
-
-        padding_width = padding_left + padding_right
-        padding_height = padding_top + padding_bottom
-        margin_width = margin_left + margin_right
-        margin_height = margin_top + margin_bottom
-
-        text_backgrounds: List[str] = []
-        text_group: List[str] = []
-        classes: Dict[str, int] = {}
-        style_no = 1
-
-        def escape_text(text: str) -> str:
-            """HTML escape text and replace spaces with nbsp."""
-            return escape(text).replace(" ", " ")
-
-        def make_tag(
-            name: str, content: Optional[str] = None, **attribs: object
-        ) -> str:
-            """Make a tag from name, content, and attributes."""
-
-            def stringify(value: object) -> str:
-                if isinstance(value, (float)):
-                    return format(value, "g")
-                return str(value)
-
-            tag_attribs = " ".join(
-                f'{k.lstrip("_").replace("_", "-")}="{stringify(v)}"'
-                for k, v in attribs.items()
-            )
-            return (
-                f"<{name} {tag_attribs}>{content}"
-                if content
-                else f"<{name} {tag_attribs}/>"
-            )
-
-        with self._record_buffer_lock:
-            segments = list(Segment.filter_control(self._record_buffer))
-            if clear:
-                self._record_buffer.clear()
-
-        if unique_id is None:
-            unique_id = "terminal-" + str(
-                zlib.adler32(
-                    ("".join(repr(segment) for segment in segments)).encode(
-                        "utf-8",
-                        "ignore",
-                    )
-                    + title.encode("utf-8", "ignore")
-                )
-            )
-        y = 0
-        for y, line in enumerate(Segment.split_and_crop_lines(segments, length=width)):
-            x = 0
-            for text, style, _control in line:
-                style = style or Style()
-                rules = get_svg_style(style)
-                if rules not in classes:
-                    classes[rules] = style_no
-                    style_no += 1
-                class_name = f"r{classes[rules]}"
-
-                if style.reverse:
-                    has_background = True
-                    background = (
-                        _theme.foreground_color.hex
-                        if style.color is None
-                        else style.color.get_truecolor(_theme).hex
-                    )
-                else:
-                    bgcolor = style.bgcolor
-                    has_background = bgcolor is not None and not bgcolor.is_default
-                    background = (
-                        _theme.background_color.hex
-                        if style.bgcolor is None
-                        else style.bgcolor.get_truecolor(_theme).hex
-                    )
-
-                text_length = cell_len(text)
-                if has_background:
-                    text_backgrounds.append(
-                        make_tag(
-                            "rect",
-                            fill=background,
-                            x=x * char_width,
-                            y=y * line_height + 1.5,
-                            width=char_width * text_length,
-                            height=line_height + 0.25,
-                            shape_rendering="crispEdges",
-                        )
-                    )
-
-                if text != " " * len(text):
-                    text_group.append(
-                        make_tag(
-                            "text",
-                            escape_text(text),
-                            _class=f"{unique_id}-{class_name}",
-                            x=x * char_width,
-                            y=y * line_height + char_height,
-                            textLength=char_width * len(text),
-                            clip_path=f"url(#{unique_id}-line-{y})",
-                        )
-                    )
-                x += cell_len(text)
-
-        line_offsets = [line_no * line_height + 1.5 for line_no in range(y)]
-        lines = "\n".join(
-            f"""
-    {make_tag("rect", x=0, y=offset, width=char_width * width, height=line_height + 0.25)}
-            """
-            for line_no, offset in enumerate(line_offsets)
-        )
-
-        styles = "\n".join(
-            f".{unique_id}-r{rule_no} {{ {css} }}" for css, rule_no in classes.items()
-        )
-        backgrounds = "".join(text_backgrounds)
-        matrix = "".join(text_group)
-
-        terminal_width = ceil(width * char_width + padding_width)
-        terminal_height = (y + 1) * line_height + padding_height
-        chrome = make_tag(
-            "rect",
-            fill=_theme.background_color.hex,
-            stroke="rgba(255,255,255,0.35)",
-            stroke_width="1",
-            x=margin_left,
-            y=margin_top,
-            width=terminal_width,
-            height=terminal_height,
-            rx=8,
-        )
-
-        title_color = _theme.foreground_color.hex
-        if title:
-            chrome += make_tag(
-                "text",
-                escape_text(title),
-                _class=f"{unique_id}-title",
-                fill=title_color,
-                text_anchor="middle",
-                x=terminal_width // 2,
-                y=margin_top + char_height + 6,
-            )
-        chrome += f"""
-            
-            
-            
-            
-            
-        """
-
-        svg = code_format.format(
-            unique_id=unique_id,
-            char_width=char_width,
-            char_height=char_height,
-            line_height=line_height,
-            terminal_width=char_width * width - 1,
-            terminal_height=(y + 1) * line_height - 1,
-            width=terminal_width + margin_width,
-            height=terminal_height + margin_height,
-            terminal_x=margin_left + padding_left,
-            terminal_y=margin_top + padding_top,
-            styles=styles,
-            chrome=chrome,
-            backgrounds=backgrounds,
-            matrix=matrix,
-            lines=lines,
-        )
-        return svg
-
-    def save_svg(
-        self,
-        path: str,
-        *,
-        title: str = "Rich",
-        theme: Optional[TerminalTheme] = None,
-        clear: bool = True,
-        code_format: str = CONSOLE_SVG_FORMAT,
-        font_aspect_ratio: float = 0.61,
-        unique_id: Optional[str] = None,
-    ) -> None:
-        """Generate an SVG file from the console contents (requires record=True in Console constructor).
-
-        Args:
-            path (str): The path to write the SVG to.
-            title (str, optional): The title of the tab in the output image
-            theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
-            clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
-            code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
-                into the string in order to form the final SVG output. The default template used and the variables
-                injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
-            font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
-                string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
-                If you aren't specifying a different font inside ``code_format``, you probably don't need this.
-            unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
-                ids). If not set, this defaults to a computed value based on the recorded content.
-        """
-        svg = self.export_svg(
-            title=title,
-            theme=theme,
-            clear=clear,
-            code_format=code_format,
-            font_aspect_ratio=font_aspect_ratio,
-            unique_id=unique_id,
-        )
-        with open(path, "w", encoding="utf-8") as write_file:
-            write_file.write(svg)
-
-
-def _svg_hash(svg_main_code: str) -> str:
-    """Returns a unique hash for the given SVG main code.
-
-    Args:
-        svg_main_code (str): The content we're going to inject in the SVG envelope.
-
-    Returns:
-        str: a hash of the given content
-    """
-    return str(zlib.adler32(svg_main_code.encode()))
-
-
-if __name__ == "__main__":  # pragma: no cover
-    console = Console(record=True)
-
-    console.log(
-        "JSONRPC [i]request[/i]",
-        5,
-        1.3,
-        True,
-        False,
-        None,
-        {
-            "jsonrpc": "2.0",
-            "method": "subtract",
-            "params": {"minuend": 42, "subtrahend": 23},
-            "id": 3,
-        },
-    )
-
-    console.log("Hello, World!", "{'a': 1}", repr(console))
-
-    console.print(
-        {
-            "name": None,
-            "empty": [],
-            "quiz": {
-                "sport": {
-                    "answered": True,
-                    "q1": {
-                        "question": "Which one is correct team name in NBA?",
-                        "options": [
-                            "New York Bulls",
-                            "Los Angeles Kings",
-                            "Golden State Warriors",
-                            "Huston Rocket",
-                        ],
-                        "answer": "Huston Rocket",
-                    },
-                },
-                "maths": {
-                    "answered": False,
-                    "q1": {
-                        "question": "5 + 7 = ?",
-                        "options": [10, 11, 12, 13],
-                        "answer": 12,
-                    },
-                    "q2": {
-                        "question": "12 - 8 = ?",
-                        "options": [1, 2, 3, 4],
-                        "answer": 4,
-                    },
-                },
-            },
-        }
-    )
diff --git a/voxvera/vendor/rich/constrain.py b/voxvera/vendor/rich/constrain.py
deleted file mode 100644
index 65fdf56..0000000
--- a/voxvera/vendor/rich/constrain.py
+++ /dev/null
@@ -1,37 +0,0 @@
-from typing import Optional, TYPE_CHECKING
-
-from .jupyter import JupyterMixin
-from .measure import Measurement
-
-if TYPE_CHECKING:
-    from .console import Console, ConsoleOptions, RenderableType, RenderResult
-
-
-class Constrain(JupyterMixin):
-    """Constrain the width of a renderable to a given number of characters.
-
-    Args:
-        renderable (RenderableType): A renderable object.
-        width (int, optional): The maximum width (in characters) to render. Defaults to 80.
-    """
-
-    def __init__(self, renderable: "RenderableType", width: Optional[int] = 80) -> None:
-        self.renderable = renderable
-        self.width = width
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        if self.width is None:
-            yield self.renderable
-        else:
-            child_options = options.update_width(min(self.width, options.max_width))
-            yield from console.render(self.renderable, child_options)
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "Measurement":
-        if self.width is not None:
-            options = options.update_width(self.width)
-        measurement = Measurement.get(console, options, self.renderable)
-        return measurement
diff --git a/voxvera/vendor/rich/containers.py b/voxvera/vendor/rich/containers.py
deleted file mode 100644
index 901ff8b..0000000
--- a/voxvera/vendor/rich/containers.py
+++ /dev/null
@@ -1,167 +0,0 @@
-from itertools import zip_longest
-from typing import (
-    TYPE_CHECKING,
-    Iterable,
-    Iterator,
-    List,
-    Optional,
-    TypeVar,
-    Union,
-    overload,
-)
-
-if TYPE_CHECKING:
-    from .console import (
-        Console,
-        ConsoleOptions,
-        JustifyMethod,
-        OverflowMethod,
-        RenderResult,
-        RenderableType,
-    )
-    from .text import Text
-
-from .cells import cell_len
-from .measure import Measurement
-
-T = TypeVar("T")
-
-
-class Renderables:
-    """A list subclass which renders its contents to the console."""
-
-    def __init__(
-        self, renderables: Optional[Iterable["RenderableType"]] = None
-    ) -> None:
-        self._renderables: List["RenderableType"] = (
-            list(renderables) if renderables is not None else []
-        )
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        """Console render method to insert line-breaks."""
-        yield from self._renderables
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "Measurement":
-        dimensions = [
-            Measurement.get(console, options, renderable)
-            for renderable in self._renderables
-        ]
-        if not dimensions:
-            return Measurement(1, 1)
-        _min = max(dimension.minimum for dimension in dimensions)
-        _max = max(dimension.maximum for dimension in dimensions)
-        return Measurement(_min, _max)
-
-    def append(self, renderable: "RenderableType") -> None:
-        self._renderables.append(renderable)
-
-    def __iter__(self) -> Iterable["RenderableType"]:
-        return iter(self._renderables)
-
-
-class Lines:
-    """A list subclass which can render to the console."""
-
-    def __init__(self, lines: Iterable["Text"] = ()) -> None:
-        self._lines: List["Text"] = list(lines)
-
-    def __repr__(self) -> str:
-        return f"Lines({self._lines!r})"
-
-    def __iter__(self) -> Iterator["Text"]:
-        return iter(self._lines)
-
-    @overload
-    def __getitem__(self, index: int) -> "Text":
-        ...
-
-    @overload
-    def __getitem__(self, index: slice) -> List["Text"]:
-        ...
-
-    def __getitem__(self, index: Union[slice, int]) -> Union["Text", List["Text"]]:
-        return self._lines[index]
-
-    def __setitem__(self, index: int, value: "Text") -> "Lines":
-        self._lines[index] = value
-        return self
-
-    def __len__(self) -> int:
-        return self._lines.__len__()
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        """Console render method to insert line-breaks."""
-        yield from self._lines
-
-    def append(self, line: "Text") -> None:
-        self._lines.append(line)
-
-    def extend(self, lines: Iterable["Text"]) -> None:
-        self._lines.extend(lines)
-
-    def pop(self, index: int = -1) -> "Text":
-        return self._lines.pop(index)
-
-    def justify(
-        self,
-        console: "Console",
-        width: int,
-        justify: "JustifyMethod" = "left",
-        overflow: "OverflowMethod" = "fold",
-    ) -> None:
-        """Justify and overflow text to a given width.
-
-        Args:
-            console (Console): Console instance.
-            width (int): Number of cells available per line.
-            justify (str, optional): Default justify method for text: "left", "center", "full" or "right". Defaults to "left".
-            overflow (str, optional): Default overflow for text: "crop", "fold", or "ellipsis". Defaults to "fold".
-
-        """
-        from .text import Text
-
-        if justify == "left":
-            for line in self._lines:
-                line.truncate(width, overflow=overflow, pad=True)
-        elif justify == "center":
-            for line in self._lines:
-                line.rstrip()
-                line.truncate(width, overflow=overflow)
-                line.pad_left((width - cell_len(line.plain)) // 2)
-                line.pad_right(width - cell_len(line.plain))
-        elif justify == "right":
-            for line in self._lines:
-                line.rstrip()
-                line.truncate(width, overflow=overflow)
-                line.pad_left(width - cell_len(line.plain))
-        elif justify == "full":
-            for line_index, line in enumerate(self._lines):
-                if line_index == len(self._lines) - 1:
-                    break
-                words = line.split(" ")
-                words_size = sum(cell_len(word.plain) for word in words)
-                num_spaces = len(words) - 1
-                spaces = [1 for _ in range(num_spaces)]
-                index = 0
-                if spaces:
-                    while words_size + num_spaces < width:
-                        spaces[len(spaces) - index - 1] += 1
-                        num_spaces += 1
-                        index = (index + 1) % len(spaces)
-                tokens: List[Text] = []
-                for index, (word, next_word) in enumerate(
-                    zip_longest(words, words[1:])
-                ):
-                    tokens.append(word)
-                    if index < len(spaces):
-                        style = word.get_style_at_offset(console, -1)
-                        next_style = next_word.get_style_at_offset(console, 0)
-                        space_style = style if style == next_style else line.style
-                        tokens.append(Text(" " * spaces[index], style=space_style))
-                self[line_index] = Text("").join(tokens)
diff --git a/voxvera/vendor/rich/control.py b/voxvera/vendor/rich/control.py
deleted file mode 100644
index 248b0f5..0000000
--- a/voxvera/vendor/rich/control.py
+++ /dev/null
@@ -1,219 +0,0 @@
-import time
-from typing import TYPE_CHECKING, Callable, Dict, Iterable, List, Union, Final
-
-from .segment import ControlCode, ControlType, Segment
-
-if TYPE_CHECKING:
-    from .console import Console, ConsoleOptions, RenderResult
-
-STRIP_CONTROL_CODES: Final = [
-    7,  # Bell
-    8,  # Backspace
-    11,  # Vertical tab
-    12,  # Form feed
-    13,  # Carriage return
-]
-_CONTROL_STRIP_TRANSLATE: Final = {
-    _codepoint: None for _codepoint in STRIP_CONTROL_CODES
-}
-
-CONTROL_ESCAPE: Final = {
-    7: "\\a",
-    8: "\\b",
-    11: "\\v",
-    12: "\\f",
-    13: "\\r",
-}
-
-CONTROL_CODES_FORMAT: Dict[int, Callable[..., str]] = {
-    ControlType.BELL: lambda: "\x07",
-    ControlType.CARRIAGE_RETURN: lambda: "\r",
-    ControlType.HOME: lambda: "\x1b[H",
-    ControlType.CLEAR: lambda: "\x1b[2J",
-    ControlType.ENABLE_ALT_SCREEN: lambda: "\x1b[?1049h",
-    ControlType.DISABLE_ALT_SCREEN: lambda: "\x1b[?1049l",
-    ControlType.SHOW_CURSOR: lambda: "\x1b[?25h",
-    ControlType.HIDE_CURSOR: lambda: "\x1b[?25l",
-    ControlType.CURSOR_UP: lambda param: f"\x1b[{param}A",
-    ControlType.CURSOR_DOWN: lambda param: f"\x1b[{param}B",
-    ControlType.CURSOR_FORWARD: lambda param: f"\x1b[{param}C",
-    ControlType.CURSOR_BACKWARD: lambda param: f"\x1b[{param}D",
-    ControlType.CURSOR_MOVE_TO_COLUMN: lambda param: f"\x1b[{param+1}G",
-    ControlType.ERASE_IN_LINE: lambda param: f"\x1b[{param}K",
-    ControlType.CURSOR_MOVE_TO: lambda x, y: f"\x1b[{y+1};{x+1}H",
-    ControlType.SET_WINDOW_TITLE: lambda title: f"\x1b]0;{title}\x07",
-}
-
-
-class Control:
-    """A renderable that inserts a control code (non printable but may move cursor).
-
-    Args:
-        *codes (str): Positional arguments are either a :class:`~rich.segment.ControlType` enum or a
-            tuple of ControlType and an integer parameter
-    """
-
-    __slots__ = ["segment"]
-
-    def __init__(self, *codes: Union[ControlType, ControlCode]) -> None:
-        control_codes: List[ControlCode] = [
-            (code,) if isinstance(code, ControlType) else code for code in codes
-        ]
-        _format_map = CONTROL_CODES_FORMAT
-        rendered_codes = "".join(
-            _format_map[code](*parameters) for code, *parameters in control_codes
-        )
-        self.segment = Segment(rendered_codes, None, control_codes)
-
-    @classmethod
-    def bell(cls) -> "Control":
-        """Ring the 'bell'."""
-        return cls(ControlType.BELL)
-
-    @classmethod
-    def home(cls) -> "Control":
-        """Move cursor to 'home' position."""
-        return cls(ControlType.HOME)
-
-    @classmethod
-    def move(cls, x: int = 0, y: int = 0) -> "Control":
-        """Move cursor relative to current position.
-
-        Args:
-            x (int): X offset.
-            y (int): Y offset.
-
-        Returns:
-            ~Control: Control object.
-
-        """
-
-        def get_codes() -> Iterable[ControlCode]:
-            control = ControlType
-            if x:
-                yield (
-                    control.CURSOR_FORWARD if x > 0 else control.CURSOR_BACKWARD,
-                    abs(x),
-                )
-            if y:
-                yield (
-                    control.CURSOR_DOWN if y > 0 else control.CURSOR_UP,
-                    abs(y),
-                )
-
-        control = cls(*get_codes())
-        return control
-
-    @classmethod
-    def move_to_column(cls, x: int, y: int = 0) -> "Control":
-        """Move to the given column, optionally add offset to row.
-
-        Returns:
-            x (int): absolute x (column)
-            y (int): optional y offset (row)
-
-        Returns:
-            ~Control: Control object.
-        """
-
-        return (
-            cls(
-                (ControlType.CURSOR_MOVE_TO_COLUMN, x),
-                (
-                    ControlType.CURSOR_DOWN if y > 0 else ControlType.CURSOR_UP,
-                    abs(y),
-                ),
-            )
-            if y
-            else cls((ControlType.CURSOR_MOVE_TO_COLUMN, x))
-        )
-
-    @classmethod
-    def move_to(cls, x: int, y: int) -> "Control":
-        """Move cursor to absolute position.
-
-        Args:
-            x (int): x offset (column)
-            y (int): y offset (row)
-
-        Returns:
-            ~Control: Control object.
-        """
-        return cls((ControlType.CURSOR_MOVE_TO, x, y))
-
-    @classmethod
-    def clear(cls) -> "Control":
-        """Clear the screen."""
-        return cls(ControlType.CLEAR)
-
-    @classmethod
-    def show_cursor(cls, show: bool) -> "Control":
-        """Show or hide the cursor."""
-        return cls(ControlType.SHOW_CURSOR if show else ControlType.HIDE_CURSOR)
-
-    @classmethod
-    def alt_screen(cls, enable: bool) -> "Control":
-        """Enable or disable alt screen."""
-        if enable:
-            return cls(ControlType.ENABLE_ALT_SCREEN, ControlType.HOME)
-        else:
-            return cls(ControlType.DISABLE_ALT_SCREEN)
-
-    @classmethod
-    def title(cls, title: str) -> "Control":
-        """Set the terminal window title
-
-        Args:
-            title (str): The new terminal window title
-        """
-        return cls((ControlType.SET_WINDOW_TITLE, title))
-
-    def __str__(self) -> str:
-        return self.segment.text
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        if self.segment.text:
-            yield self.segment
-
-
-def strip_control_codes(
-    text: str, _translate_table: Dict[int, None] = _CONTROL_STRIP_TRANSLATE
-) -> str:
-    """Remove control codes from text.
-
-    Args:
-        text (str): A string possibly contain control codes.
-
-    Returns:
-        str: String with control codes removed.
-    """
-    return text.translate(_translate_table)
-
-
-def escape_control_codes(
-    text: str,
-    _translate_table: Dict[int, str] = CONTROL_ESCAPE,
-) -> str:
-    """Replace control codes with their "escaped" equivalent in the given text.
-    (e.g. "\b" becomes "\\b")
-
-    Args:
-        text (str): A string possibly containing control codes.
-
-    Returns:
-        str: String with control codes replaced with their escaped version.
-    """
-    return text.translate(_translate_table)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from rich.console import Console
-
-    console = Console()
-    console.print("Look at the title of your terminal window ^")
-    # console.print(Control((ControlType.SET_WINDOW_TITLE, "Hello, world!")))
-    for i in range(10):
-        console.set_window_title("🚀 Loading" + "." * i)
-        time.sleep(0.5)
diff --git a/voxvera/vendor/rich/default_styles.py b/voxvera/vendor/rich/default_styles.py
deleted file mode 100644
index c18b609..0000000
--- a/voxvera/vendor/rich/default_styles.py
+++ /dev/null
@@ -1,195 +0,0 @@
-from typing import Dict
-
-from .style import Style
-
-DEFAULT_STYLES: Dict[str, Style] = {
-    "none": Style.null(),
-    "reset": Style(
-        color="default",
-        bgcolor="default",
-        dim=False,
-        bold=False,
-        italic=False,
-        underline=False,
-        blink=False,
-        blink2=False,
-        reverse=False,
-        conceal=False,
-        strike=False,
-    ),
-    "dim": Style(dim=True),
-    "bright": Style(dim=False),
-    "bold": Style(bold=True),
-    "strong": Style(bold=True),
-    "code": Style(reverse=True, bold=True),
-    "italic": Style(italic=True),
-    "emphasize": Style(italic=True),
-    "underline": Style(underline=True),
-    "blink": Style(blink=True),
-    "blink2": Style(blink2=True),
-    "reverse": Style(reverse=True),
-    "strike": Style(strike=True),
-    "black": Style(color="black"),
-    "red": Style(color="red"),
-    "green": Style(color="green"),
-    "yellow": Style(color="yellow"),
-    "magenta": Style(color="magenta"),
-    "cyan": Style(color="cyan"),
-    "white": Style(color="white"),
-    "inspect.attr": Style(color="yellow", italic=True),
-    "inspect.attr.dunder": Style(color="yellow", italic=True, dim=True),
-    "inspect.callable": Style(bold=True, color="red"),
-    "inspect.async_def": Style(italic=True, color="bright_cyan"),
-    "inspect.def": Style(italic=True, color="bright_cyan"),
-    "inspect.class": Style(italic=True, color="bright_cyan"),
-    "inspect.error": Style(bold=True, color="red"),
-    "inspect.equals": Style(),
-    "inspect.help": Style(color="cyan"),
-    "inspect.doc": Style(dim=True),
-    "inspect.value.border": Style(color="green"),
-    "live.ellipsis": Style(bold=True, color="red"),
-    "layout.tree.row": Style(dim=False, color="red"),
-    "layout.tree.column": Style(dim=False, color="blue"),
-    "logging.keyword": Style(bold=True, color="yellow"),
-    "logging.level.notset": Style(dim=True),
-    "logging.level.debug": Style(color="green"),
-    "logging.level.info": Style(color="blue"),
-    "logging.level.warning": Style(color="yellow"),
-    "logging.level.error": Style(color="red", bold=True),
-    "logging.level.critical": Style(color="red", bold=True, reverse=True),
-    "log.level": Style.null(),
-    "log.time": Style(color="cyan", dim=True),
-    "log.message": Style.null(),
-    "log.path": Style(dim=True),
-    "repr.ellipsis": Style(color="yellow"),
-    "repr.indent": Style(color="green", dim=True),
-    "repr.error": Style(color="red", bold=True),
-    "repr.str": Style(color="green", italic=False, bold=False),
-    "repr.brace": Style(bold=True),
-    "repr.comma": Style(bold=True),
-    "repr.ipv4": Style(bold=True, color="bright_green"),
-    "repr.ipv6": Style(bold=True, color="bright_green"),
-    "repr.eui48": Style(bold=True, color="bright_green"),
-    "repr.eui64": Style(bold=True, color="bright_green"),
-    "repr.tag_start": Style(bold=True),
-    "repr.tag_name": Style(color="bright_magenta", bold=True),
-    "repr.tag_contents": Style(color="default"),
-    "repr.tag_end": Style(bold=True),
-    "repr.attrib_name": Style(color="yellow", italic=False),
-    "repr.attrib_equal": Style(bold=True),
-    "repr.attrib_value": Style(color="magenta", italic=False),
-    "repr.number": Style(color="cyan", bold=True, italic=False),
-    "repr.number_complex": Style(color="cyan", bold=True, italic=False),  # same
-    "repr.bool_true": Style(color="bright_green", italic=True),
-    "repr.bool_false": Style(color="bright_red", italic=True),
-    "repr.none": Style(color="magenta", italic=True),
-    "repr.url": Style(underline=True, color="bright_blue", italic=False, bold=False),
-    "repr.uuid": Style(color="bright_yellow", bold=False),
-    "repr.call": Style(color="magenta", bold=True),
-    "repr.path": Style(color="magenta"),
-    "repr.filename": Style(color="bright_magenta"),
-    "rule.line": Style(color="bright_green"),
-    "rule.text": Style.null(),
-    "json.brace": Style(bold=True),
-    "json.bool_true": Style(color="bright_green", italic=True),
-    "json.bool_false": Style(color="bright_red", italic=True),
-    "json.null": Style(color="magenta", italic=True),
-    "json.number": Style(color="cyan", bold=True, italic=False),
-    "json.str": Style(color="green", italic=False, bold=False),
-    "json.key": Style(color="blue", bold=True),
-    "prompt": Style.null(),
-    "prompt.choices": Style(color="magenta", bold=True),
-    "prompt.default": Style(color="cyan", bold=True),
-    "prompt.invalid": Style(color="red"),
-    "prompt.invalid.choice": Style(color="red"),
-    "pretty": Style.null(),
-    "scope.border": Style(color="blue"),
-    "scope.key": Style(color="yellow", italic=True),
-    "scope.key.special": Style(color="yellow", italic=True, dim=True),
-    "scope.equals": Style(color="red"),
-    "table.header": Style(bold=True),
-    "table.footer": Style(bold=True),
-    "table.cell": Style.null(),
-    "table.title": Style(italic=True),
-    "table.caption": Style(italic=True, dim=True),
-    "traceback.error": Style(color="red", italic=True),
-    "traceback.border.syntax_error": Style(color="bright_red"),
-    "traceback.border": Style(color="red"),
-    "traceback.text": Style.null(),
-    "traceback.title": Style(color="red", bold=True),
-    "traceback.exc_type": Style(color="bright_red", bold=True),
-    "traceback.exc_value": Style.null(),
-    "traceback.offset": Style(color="bright_red", bold=True),
-    "traceback.error_range": Style(underline=True, bold=True),
-    "traceback.note": Style(color="green", bold=True),
-    "traceback.group.border": Style(color="magenta"),
-    "bar.back": Style(color="grey23"),
-    "bar.complete": Style(color="rgb(249,38,114)"),
-    "bar.finished": Style(color="rgb(114,156,31)"),
-    "bar.pulse": Style(color="rgb(249,38,114)"),
-    "progress.description": Style.null(),
-    "progress.filesize": Style(color="green"),
-    "progress.filesize.total": Style(color="green"),
-    "progress.download": Style(color="green"),
-    "progress.elapsed": Style(color="yellow"),
-    "progress.percentage": Style(color="magenta"),
-    "progress.remaining": Style(color="cyan"),
-    "progress.data.speed": Style(color="red"),
-    "progress.spinner": Style(color="green"),
-    "status.spinner": Style(color="green"),
-    "tree": Style(),
-    "tree.line": Style(),
-    "markdown.paragraph": Style(),
-    "markdown.text": Style(),
-    "markdown.em": Style(italic=True),
-    "markdown.emph": Style(italic=True),  # For commonmark backwards compatibility
-    "markdown.strong": Style(bold=True),
-    "markdown.code": Style(bold=True, color="cyan", bgcolor="black"),
-    "markdown.code_block": Style(color="cyan", bgcolor="black"),
-    "markdown.block_quote": Style(color="magenta"),
-    "markdown.list": Style(color="cyan"),
-    "markdown.item": Style(),
-    "markdown.item.bullet": Style(bold=True),
-    "markdown.item.number": Style(color="cyan"),
-    "markdown.hr": Style(dim=True),
-    "markdown.h1.border": Style(),
-    "markdown.h1": Style(bold=True, underline=True),
-    "markdown.h2": Style(color="magenta", underline=True),
-    "markdown.h3": Style(color="magenta", bold=True),
-    "markdown.h4": Style(color="magenta", italic=True),
-    "markdown.h5": Style(italic=True),
-    "markdown.h6": Style(dim=True),
-    "markdown.h7": Style(italic=True, dim=True),
-    "markdown.link": Style(color="bright_blue"),
-    "markdown.link_url": Style(color="blue", underline=True),
-    "markdown.s": Style(strike=True),
-    "markdown.table.border": Style(color="cyan"),
-    "markdown.table.header": Style(color="cyan", bold=False),
-    "iso8601.date": Style(color="blue"),
-    "iso8601.time": Style(color="magenta"),
-    "iso8601.timezone": Style(color="yellow"),
-}
-
-
-if __name__ == "__main__":  # pragma: no cover
-    import argparse
-    import io
-
-    from rich.console import Console
-    from rich.table import Table
-    from rich.text import Text
-
-    parser = argparse.ArgumentParser()
-    parser.add_argument("--html", action="store_true", help="Export as HTML table")
-    args = parser.parse_args()
-    html: bool = args.html
-    console = Console(record=True, width=70, file=io.StringIO()) if html else Console()
-
-    table = Table("Name", "Styling")
-
-    for style_name, style in DEFAULT_STYLES.items():
-        table.add_row(Text(style_name, style=style), str(style))
-
-    console.print(table)
-    if html:
-        print(console.export_html(inline_styles=True))
diff --git a/voxvera/vendor/rich/diagnose.py b/voxvera/vendor/rich/diagnose.py
deleted file mode 100644
index 9d5ff3e..0000000
--- a/voxvera/vendor/rich/diagnose.py
+++ /dev/null
@@ -1,39 +0,0 @@
-import os
-import platform
-
-from rich import inspect
-from rich.console import Console, get_windows_console_features
-from rich.panel import Panel
-from rich.pretty import Pretty
-
-
-def report() -> None:  # pragma: no cover
-    """Print a report to the terminal with debugging information"""
-    console = Console()
-    inspect(console)
-    features = get_windows_console_features()
-    inspect(features)
-
-    env_names = (
-        "CLICOLOR",
-        "COLORTERM",
-        "COLUMNS",
-        "JPY_PARENT_PID",
-        "JUPYTER_COLUMNS",
-        "JUPYTER_LINES",
-        "LINES",
-        "NO_COLOR",
-        "TERM_PROGRAM",
-        "TERM",
-        "TTY_COMPATIBLE",
-        "TTY_INTERACTIVE",
-        "VSCODE_VERBOSE_LOGGING",
-    )
-    env = {name: os.getenv(name) for name in env_names}
-    console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables"))
-
-    console.print(f'platform="{platform.system()}"')
-
-
-if __name__ == "__main__":  # pragma: no cover
-    report()
diff --git a/voxvera/vendor/rich/emoji.py b/voxvera/vendor/rich/emoji.py
deleted file mode 100644
index 9433e6f..0000000
--- a/voxvera/vendor/rich/emoji.py
+++ /dev/null
@@ -1,91 +0,0 @@
-import sys
-from typing import TYPE_CHECKING, Optional, Union, Literal
-
-from .jupyter import JupyterMixin
-from .segment import Segment
-from .style import Style
-from ._emoji_codes import EMOJI
-from ._emoji_replace import _emoji_replace
-
-
-if TYPE_CHECKING:
-    from .console import Console, ConsoleOptions, RenderResult
-
-
-EmojiVariant = Literal["emoji", "text"]
-
-
-class NoEmoji(Exception):
-    """No emoji by that name."""
-
-
-class Emoji(JupyterMixin):
-    __slots__ = ["name", "style", "_char", "variant"]
-
-    VARIANTS = {"text": "\uFE0E", "emoji": "\uFE0F"}
-
-    def __init__(
-        self,
-        name: str,
-        style: Union[str, Style] = "none",
-        variant: Optional[EmojiVariant] = None,
-    ) -> None:
-        """A single emoji character.
-
-        Args:
-            name (str): Name of emoji.
-            style (Union[str, Style], optional): Optional style. Defaults to None.
-
-        Raises:
-            NoEmoji: If the emoji doesn't exist.
-        """
-        self.name = name
-        self.style = style
-        self.variant = variant
-        try:
-            self._char = EMOJI[name]
-        except KeyError:
-            raise NoEmoji(f"No emoji called {name!r}")
-        if variant is not None:
-            self._char += self.VARIANTS.get(variant, "")
-
-    @classmethod
-    def replace(cls, text: str) -> str:
-        """Replace emoji markup with corresponding unicode characters.
-
-        Args:
-            text (str): A string with emojis codes, e.g. "Hello :smiley:!"
-
-        Returns:
-            str: A string with emoji codes replaces with actual emoji.
-        """
-        return _emoji_replace(text)
-
-    def __repr__(self) -> str:
-        return f""
-
-    def __str__(self) -> str:
-        return self._char
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        yield Segment(self._char, console.get_style(self.style))
-
-
-if __name__ == "__main__":  # pragma: no cover
-    import sys
-
-    from rich.columns import Columns
-    from rich.console import Console
-
-    console = Console(record=True)
-
-    columns = Columns(
-        (f":{name}: {name}" for name in sorted(EMOJI.keys()) if "\u200D" not in name),
-        column_first=True,
-    )
-
-    console.print(columns)
-    if len(sys.argv) > 1:
-        console.save_html(sys.argv[1])
diff --git a/voxvera/vendor/rich/errors.py b/voxvera/vendor/rich/errors.py
deleted file mode 100644
index 0bcbe53..0000000
--- a/voxvera/vendor/rich/errors.py
+++ /dev/null
@@ -1,34 +0,0 @@
-class ConsoleError(Exception):
-    """An error in console operation."""
-
-
-class StyleError(Exception):
-    """An error in styles."""
-
-
-class StyleSyntaxError(ConsoleError):
-    """Style was badly formatted."""
-
-
-class MissingStyle(StyleError):
-    """No such style."""
-
-
-class StyleStackError(ConsoleError):
-    """Style stack is invalid."""
-
-
-class NotRenderableError(ConsoleError):
-    """Object is not renderable."""
-
-
-class MarkupError(ConsoleError):
-    """Markup was badly formatted."""
-
-
-class LiveError(ConsoleError):
-    """Error related to Live display."""
-
-
-class NoAltScreen(ConsoleError):
-    """Alt screen mode was required."""
diff --git a/voxvera/vendor/rich/file_proxy.py b/voxvera/vendor/rich/file_proxy.py
deleted file mode 100644
index 4b0b0da..0000000
--- a/voxvera/vendor/rich/file_proxy.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import io
-from typing import IO, TYPE_CHECKING, Any, List
-
-from .ansi import AnsiDecoder
-from .text import Text
-
-if TYPE_CHECKING:
-    from .console import Console
-
-
-class FileProxy(io.TextIOBase):
-    """Wraps a file (e.g. sys.stdout) and redirects writes to a console."""
-
-    def __init__(self, console: "Console", file: IO[str]) -> None:
-        self.__console = console
-        self.__file = file
-        self.__buffer: List[str] = []
-        self.__ansi_decoder = AnsiDecoder()
-
-    @property
-    def rich_proxied_file(self) -> IO[str]:
-        """Get proxied file."""
-        return self.__file
-
-    def __getattr__(self, name: str) -> Any:
-        return getattr(self.__file, name)
-
-    def write(self, text: str) -> int:
-        if not isinstance(text, str):
-            raise TypeError(f"write() argument must be str, not {type(text).__name__}")
-        buffer = self.__buffer
-        lines: List[str] = []
-        while text:
-            line, new_line, text = text.partition("\n")
-            if new_line:
-                lines.append("".join(buffer) + line)
-                buffer.clear()
-            else:
-                buffer.append(line)
-                break
-        if lines:
-            console = self.__console
-            with console:
-                output = Text("\n").join(
-                    self.__ansi_decoder.decode_line(line) for line in lines
-                )
-                console.print(output)
-        return len(text)
-
-    def flush(self) -> None:
-        output = "".join(self.__buffer)
-        if output:
-            self.__console.print(output)
-        del self.__buffer[:]
-
-    def fileno(self) -> int:
-        return self.__file.fileno()
diff --git a/voxvera/vendor/rich/filesize.py b/voxvera/vendor/rich/filesize.py
deleted file mode 100644
index 83bc911..0000000
--- a/voxvera/vendor/rich/filesize.py
+++ /dev/null
@@ -1,88 +0,0 @@
-"""Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2
-
-The functions declared in this module should cover the different
-use cases needed to generate a string representation of a file size
-using several different units. Since there are many standards regarding
-file size units, three different functions have been implemented.
-
-See Also:
-    * `Wikipedia: Binary prefix `_
-
-"""
-
-__all__ = ["decimal"]
-
-from typing import Iterable, List, Optional, Tuple
-
-
-def _to_str(
-    size: int,
-    suffixes: Iterable[str],
-    base: int,
-    *,
-    precision: Optional[int] = 1,
-    separator: Optional[str] = " ",
-) -> str:
-    if size == 1:
-        return "1 byte"
-    elif size < base:
-        return f"{size:,} bytes"
-
-    for i, suffix in enumerate(suffixes, 2):  # noqa: B007
-        unit = base**i
-        if size < unit:
-            break
-    return "{:,.{precision}f}{separator}{}".format(
-        (base * size / unit),
-        suffix,
-        precision=precision,
-        separator=separator,
-    )
-
-
-def pick_unit_and_suffix(size: int, suffixes: List[str], base: int) -> Tuple[int, str]:
-    """Pick a suffix and base for the given size."""
-    for i, suffix in enumerate(suffixes):
-        unit = base**i
-        if size < unit * base:
-            break
-    return unit, suffix
-
-
-def decimal(
-    size: int,
-    *,
-    precision: Optional[int] = 1,
-    separator: Optional[str] = " ",
-) -> str:
-    """Convert a filesize in to a string (powers of 1000, SI prefixes).
-
-    In this convention, ``1000 B = 1 kB``.
-
-    This is typically the format used to advertise the storage
-    capacity of USB flash drives and the like (*256 MB* meaning
-    actually a storage capacity of more than *256 000 000 B*),
-    or used by **Mac OS X** since v10.6 to report file sizes.
-
-    Arguments:
-        int (size): A file size.
-        int (precision): The number of decimal places to include (default = 1).
-        str (separator): The string to separate the value from the units (default = " ").
-
-    Returns:
-        `str`: A string containing a abbreviated file size and units.
-
-    Example:
-        >>> filesize.decimal(30000)
-        '30.0 kB'
-        >>> filesize.decimal(30000, precision=2, separator="")
-        '30.00kB'
-
-    """
-    return _to_str(
-        size,
-        ("kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"),
-        1000,
-        precision=precision,
-        separator=separator,
-    )
diff --git a/voxvera/vendor/rich/highlighter.py b/voxvera/vendor/rich/highlighter.py
deleted file mode 100644
index df28048..0000000
--- a/voxvera/vendor/rich/highlighter.py
+++ /dev/null
@@ -1,232 +0,0 @@
-import re
-from abc import ABC, abstractmethod
-from typing import ClassVar, Sequence, Union
-
-from .text import Span, Text
-
-
-def _combine_regex(*regexes: str) -> str:
-    """Combine a number of regexes in to a single regex.
-
-    Returns:
-        str: New regex with all regexes ORed together.
-    """
-    return "|".join(regexes)
-
-
-class Highlighter(ABC):
-    """Abstract base class for highlighters."""
-
-    def __call__(self, text: Union[str, Text]) -> Text:
-        """Highlight a str or Text instance.
-
-        Args:
-            text (Union[str, ~Text]): Text to highlight.
-
-        Raises:
-            TypeError: If not called with text or str.
-
-        Returns:
-            Text: A test instance with highlighting applied.
-        """
-        if isinstance(text, str):
-            highlight_text = Text(text)
-        elif isinstance(text, Text):
-            highlight_text = text.copy()
-        else:
-            raise TypeError(f"str or Text instance required, not {text!r}")
-        self.highlight(highlight_text)
-        return highlight_text
-
-    @abstractmethod
-    def highlight(self, text: Text) -> None:
-        """Apply highlighting in place to text.
-
-        Args:
-            text (~Text): A text object highlight.
-        """
-
-
-class NullHighlighter(Highlighter):
-    """A highlighter object that doesn't highlight.
-
-    May be used to disable highlighting entirely.
-
-    """
-
-    def highlight(self, text: Text) -> None:
-        """Nothing to do"""
-
-
-class RegexHighlighter(Highlighter):
-    """Applies highlighting from a list of regular expressions."""
-
-    highlights: ClassVar[Sequence[str]] = []
-    base_style: ClassVar[str] = ""
-
-    def highlight(self, text: Text) -> None:
-        """Highlight :class:`rich.text.Text` using regular expressions.
-
-        Args:
-            text (~Text): Text to highlighted.
-
-        """
-
-        highlight_regex = text.highlight_regex
-        for re_highlight in self.highlights:
-            highlight_regex(re_highlight, style_prefix=self.base_style)
-
-
-class ReprHighlighter(RegexHighlighter):
-    """Highlights the text typically produced from ``__repr__`` methods."""
-
-    base_style = "repr."
-    highlights: ClassVar[Sequence[str]] = [
-        r"(?P<)(?P[-\w.:|]*)(?P[\w\W]*)(?P>)",
-        r'(?P[\w_]{1,50})=(?P"?[\w_]+"?)?',
-        r"(?P[][{}()])",
-        _combine_regex(
-            r"(?P[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})",
-            r"(?P([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})",
-            r"(?P(?:[0-9A-Fa-f]{1,2}-){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){3}[0-9A-Fa-f]{4})",
-            r"(?P(?:[0-9A-Fa-f]{1,2}-){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4})",
-            r"(?P[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})",
-            r"(?P[\w.]*?)\(",
-            r"\b(?PTrue)\b|\b(?PFalse)\b|\b(?PNone)\b",
-            r"(?P\.\.\.)",
-            r"(?P(?(?\B(/[-\w._+]+)*\/)(?P[-\w._+]*)?",
-            r"(?b?'''.*?(?(file|https|http|ws|wss)://[-0-9a-zA-Z$_+!`(),.?/;:&=%#~@]*)",
-        ),
-    ]
-
-
-class JSONHighlighter(RegexHighlighter):
-    """Highlights JSON"""
-
-    # Captures the start and end of JSON strings, handling escaped quotes
-    JSON_STR = r"(?b?\".*?(?[\{\[\(\)\]\}])",
-            r"\b(?Ptrue)\b|\b(?Pfalse)\b|\b(?Pnull)\b",
-            r"(?P(? None:
-        super().highlight(text)
-
-        # Additional work to handle highlighting JSON keys
-        plain = text.plain
-        append = text.spans.append
-        whitespace = self.JSON_WHITESPACE
-        for match in re.finditer(self.JSON_STR, plain):
-            start, end = match.span()
-            cursor = end
-            while cursor < len(plain):
-                char = plain[cursor]
-                cursor += 1
-                if char == ":":
-                    append(Span(start, end, "json.key"))
-                elif char in whitespace:
-                    continue
-                break
-
-
-class ISO8601Highlighter(RegexHighlighter):
-    """Highlights the ISO8601 date time strings.
-    Regex reference: https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s07.html
-    """
-
-    base_style: ClassVar[str] = "iso8601."
-    highlights: ClassVar[Sequence[str]] = [
-        #
-        # Dates
-        #
-        # Calendar month (e.g. 2008-08). The hyphen is required
-        r"^(?P[0-9]{4})-(?P1[0-2]|0[1-9])$",
-        # Calendar date w/o hyphens (e.g. 20080830)
-        r"^(?P(?P[0-9]{4})(?P1[0-2]|0[1-9])(?P3[01]|0[1-9]|[12][0-9]))$",
-        # Ordinal date (e.g. 2008-243). The hyphen is optional
-        r"^(?P(?P[0-9]{4})-?(?P36[0-6]|3[0-5][0-9]|[12][0-9]{2}|0[1-9][0-9]|00[1-9]))$",
-        #
-        # Weeks
-        #
-        # Week of the year (e.g., 2008-W35). The hyphen is optional
-        r"^(?P(?P[0-9]{4})-?W(?P5[0-3]|[1-4][0-9]|0[1-9]))$",
-        # Week date (e.g., 2008-W35-6). The hyphens are optional
-        r"^(?P(?P[0-9]{4})-?W(?P5[0-3]|[1-4][0-9]|0[1-9])-?(?P[1-7]))$",
-        #
-        # Times
-        #
-        # Hours and minutes (e.g., 17:21). The colon is optional
-        r"^(?P{text}'
-        append_fragment(text)
-
-    code = "".join(fragments)
-    html = JUPYTER_HTML_FORMAT.format(code=code)
-
-    return html
-
-
-def display(segments: Iterable[Segment], text: str) -> None:
-    """Render segments to Jupyter."""
-    html = _render_segments(segments)
-    jupyter_renderable = JupyterRenderable(html, text)
-    try:
-        from IPython.display import display as ipython_display
-
-        ipython_display(jupyter_renderable)
-    except ModuleNotFoundError:
-        # Handle the case where the Console has force_jupyter=True,
-        # but IPython is not installed.
-        pass
-
-
-def print(*args: Any, **kwargs: Any) -> None:
-    """Proxy for Console print."""
-    console = get_console()
-    return console.print(*args, **kwargs)
diff --git a/voxvera/vendor/rich/layout.py b/voxvera/vendor/rich/layout.py
deleted file mode 100644
index 7fa2852..0000000
--- a/voxvera/vendor/rich/layout.py
+++ /dev/null
@@ -1,442 +0,0 @@
-from abc import ABC, abstractmethod
-from itertools import islice
-from operator import itemgetter
-from threading import RLock
-from typing import (
-    TYPE_CHECKING,
-    Dict,
-    Iterable,
-    List,
-    NamedTuple,
-    Optional,
-    Sequence,
-    Tuple,
-    Union,
-)
-
-from ._ratio import ratio_resolve
-from .align import Align
-from .console import Console, ConsoleOptions, RenderableType, RenderResult
-from .highlighter import ReprHighlighter
-from .panel import Panel
-from .pretty import Pretty
-from .region import Region
-from .repr import Result, rich_repr
-from .segment import Segment
-from .style import StyleType
-
-if TYPE_CHECKING:
-    from rich.tree import Tree
-
-
-class LayoutRender(NamedTuple):
-    """An individual layout render."""
-
-    region: Region
-    render: List[List[Segment]]
-
-
-RegionMap = Dict["Layout", Region]
-RenderMap = Dict["Layout", LayoutRender]
-
-
-class LayoutError(Exception):
-    """Layout related error."""
-
-
-class NoSplitter(LayoutError):
-    """Requested splitter does not exist."""
-
-
-class _Placeholder:
-    """An internal renderable used as a Layout placeholder."""
-
-    highlighter = ReprHighlighter()
-
-    def __init__(self, layout: "Layout", style: StyleType = "") -> None:
-        self.layout = layout
-        self.style = style
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        width = options.max_width
-        height = options.height or options.size.height
-        layout = self.layout
-        title = (
-            f"{layout.name!r} ({width} x {height})"
-            if layout.name
-            else f"({width} x {height})"
-        )
-        yield Panel(
-            Align.center(Pretty(layout), vertical="middle"),
-            style=self.style,
-            title=self.highlighter(title),
-            border_style="blue",
-            height=height,
-        )
-
-
-class Splitter(ABC):
-    """Base class for a splitter."""
-
-    name: str = ""
-
-    @abstractmethod
-    def get_tree_icon(self) -> str:
-        """Get the icon (emoji) used in layout.tree"""
-
-    @abstractmethod
-    def divide(
-        self, children: Sequence["Layout"], region: Region
-    ) -> Iterable[Tuple["Layout", Region]]:
-        """Divide a region amongst several child layouts.
-
-        Args:
-            children (Sequence(Layout)): A number of child layouts.
-            region (Region): A rectangular region to divide.
-        """
-
-
-class RowSplitter(Splitter):
-    """Split a layout region in to rows."""
-
-    name = "row"
-
-    def get_tree_icon(self) -> str:
-        return "[layout.tree.row]⬌"
-
-    def divide(
-        self, children: Sequence["Layout"], region: Region
-    ) -> Iterable[Tuple["Layout", Region]]:
-        x, y, width, height = region
-        render_widths = ratio_resolve(width, children)
-        offset = 0
-        _Region = Region
-        for child, child_width in zip(children, render_widths):
-            yield child, _Region(x + offset, y, child_width, height)
-            offset += child_width
-
-
-class ColumnSplitter(Splitter):
-    """Split a layout region in to columns."""
-
-    name = "column"
-
-    def get_tree_icon(self) -> str:
-        return "[layout.tree.column]⬍"
-
-    def divide(
-        self, children: Sequence["Layout"], region: Region
-    ) -> Iterable[Tuple["Layout", Region]]:
-        x, y, width, height = region
-        render_heights = ratio_resolve(height, children)
-        offset = 0
-        _Region = Region
-        for child, child_height in zip(children, render_heights):
-            yield child, _Region(x, y + offset, width, child_height)
-            offset += child_height
-
-
-@rich_repr
-class Layout:
-    """A renderable to divide a fixed height in to rows or columns.
-
-    Args:
-        renderable (RenderableType, optional): Renderable content, or None for placeholder. Defaults to None.
-        name (str, optional): Optional identifier for Layout. Defaults to None.
-        size (int, optional): Optional fixed size of layout. Defaults to None.
-        minimum_size (int, optional): Minimum size of layout. Defaults to 1.
-        ratio (int, optional): Optional ratio for flexible layout. Defaults to 1.
-        visible (bool, optional): Visibility of layout. Defaults to True.
-    """
-
-    splitters = {"row": RowSplitter, "column": ColumnSplitter}
-
-    def __init__(
-        self,
-        renderable: Optional[RenderableType] = None,
-        *,
-        name: Optional[str] = None,
-        size: Optional[int] = None,
-        minimum_size: int = 1,
-        ratio: int = 1,
-        visible: bool = True,
-    ) -> None:
-        self._renderable = renderable or _Placeholder(self)
-        self.size = size
-        self.minimum_size = minimum_size
-        self.ratio = ratio
-        self.name = name
-        self.visible = visible
-        self.splitter: Splitter = self.splitters["column"]()
-        self._children: List[Layout] = []
-        self._render_map: RenderMap = {}
-        self._lock = RLock()
-
-    def __rich_repr__(self) -> Result:
-        yield "name", self.name, None
-        yield "size", self.size, None
-        yield "minimum_size", self.minimum_size, 1
-        yield "ratio", self.ratio, 1
-
-    @property
-    def renderable(self) -> RenderableType:
-        """Layout renderable."""
-        return self if self._children else self._renderable
-
-    @property
-    def children(self) -> List["Layout"]:
-        """Gets (visible) layout children."""
-        return [child for child in self._children if child.visible]
-
-    @property
-    def map(self) -> RenderMap:
-        """Get a map of the last render."""
-        return self._render_map
-
-    def get(self, name: str) -> Optional["Layout"]:
-        """Get a named layout, or None if it doesn't exist.
-
-        Args:
-            name (str): Name of layout.
-
-        Returns:
-            Optional[Layout]: Layout instance or None if no layout was found.
-        """
-        if self.name == name:
-            return self
-        else:
-            for child in self._children:
-                named_layout = child.get(name)
-                if named_layout is not None:
-                    return named_layout
-        return None
-
-    def __getitem__(self, name: str) -> "Layout":
-        layout = self.get(name)
-        if layout is None:
-            raise KeyError(f"No layout with name {name!r}")
-        return layout
-
-    @property
-    def tree(self) -> "Tree":
-        """Get a tree renderable to show layout structure."""
-        from rich.styled import Styled
-        from rich.table import Table
-        from rich.tree import Tree
-
-        def summary(layout: "Layout") -> Table:
-            icon = layout.splitter.get_tree_icon()
-
-            table = Table.grid(padding=(0, 1, 0, 0))
-
-            text: RenderableType = (
-                Pretty(layout) if layout.visible else Styled(Pretty(layout), "dim")
-            )
-            table.add_row(icon, text)
-            _summary = table
-            return _summary
-
-        layout = self
-        tree = Tree(
-            summary(layout),
-            guide_style=f"layout.tree.{layout.splitter.name}",
-            highlight=True,
-        )
-
-        def recurse(tree: "Tree", layout: "Layout") -> None:
-            for child in layout._children:
-                recurse(
-                    tree.add(
-                        summary(child),
-                        guide_style=f"layout.tree.{child.splitter.name}",
-                    ),
-                    child,
-                )
-
-        recurse(tree, self)
-        return tree
-
-    def split(
-        self,
-        *layouts: Union["Layout", RenderableType],
-        splitter: Union[Splitter, str] = "column",
-    ) -> None:
-        """Split the layout in to multiple sub-layouts.
-
-        Args:
-            *layouts (Layout): Positional arguments should be (sub) Layout instances.
-            splitter (Union[Splitter, str]): Splitter instance or name of splitter.
-        """
-        _layouts = [
-            layout if isinstance(layout, Layout) else Layout(layout)
-            for layout in layouts
-        ]
-        try:
-            self.splitter = (
-                splitter
-                if isinstance(splitter, Splitter)
-                else self.splitters[splitter]()
-            )
-        except KeyError:
-            raise NoSplitter(f"No splitter called {splitter!r}")
-        self._children[:] = _layouts
-
-    def add_split(self, *layouts: Union["Layout", RenderableType]) -> None:
-        """Add a new layout(s) to existing split.
-
-        Args:
-            *layouts (Union[Layout, RenderableType]): Positional arguments should be renderables or (sub) Layout instances.
-
-        """
-        _layouts = (
-            layout if isinstance(layout, Layout) else Layout(layout)
-            for layout in layouts
-        )
-        self._children.extend(_layouts)
-
-    def split_row(self, *layouts: Union["Layout", RenderableType]) -> None:
-        """Split the layout in to a row (layouts side by side).
-
-        Args:
-            *layouts (Layout): Positional arguments should be (sub) Layout instances.
-        """
-        self.split(*layouts, splitter="row")
-
-    def split_column(self, *layouts: Union["Layout", RenderableType]) -> None:
-        """Split the layout in to a column (layouts stacked on top of each other).
-
-        Args:
-            *layouts (Layout): Positional arguments should be (sub) Layout instances.
-        """
-        self.split(*layouts, splitter="column")
-
-    def unsplit(self) -> None:
-        """Reset splits to initial state."""
-        del self._children[:]
-
-    def update(self, renderable: RenderableType) -> None:
-        """Update renderable.
-
-        Args:
-            renderable (RenderableType): New renderable object.
-        """
-        with self._lock:
-            self._renderable = renderable
-
-    def refresh_screen(self, console: "Console", layout_name: str) -> None:
-        """Refresh a sub-layout.
-
-        Args:
-            console (Console): Console instance where Layout is to be rendered.
-            layout_name (str): Name of layout.
-        """
-        with self._lock:
-            layout = self[layout_name]
-            region, _lines = self._render_map[layout]
-            (x, y, width, height) = region
-            lines = console.render_lines(
-                layout, console.options.update_dimensions(width, height)
-            )
-            self._render_map[layout] = LayoutRender(region, lines)
-            console.update_screen_lines(lines, x, y)
-
-    def _make_region_map(self, width: int, height: int) -> RegionMap:
-        """Create a dict that maps layout on to Region."""
-        stack: List[Tuple[Layout, Region]] = [(self, Region(0, 0, width, height))]
-        push = stack.append
-        pop = stack.pop
-        layout_regions: List[Tuple[Layout, Region]] = []
-        append_layout_region = layout_regions.append
-        while stack:
-            append_layout_region(pop())
-            layout, region = layout_regions[-1]
-            children = layout.children
-            if children:
-                for child_and_region in layout.splitter.divide(children, region):
-                    push(child_and_region)
-
-        region_map = {
-            layout: region
-            for layout, region in sorted(layout_regions, key=itemgetter(1))
-        }
-        return region_map
-
-    def render(self, console: Console, options: ConsoleOptions) -> RenderMap:
-        """Render the sub_layouts.
-
-        Args:
-            console (Console): Console instance.
-            options (ConsoleOptions): Console options.
-
-        Returns:
-            RenderMap: A dict that maps Layout on to a tuple of Region, lines
-        """
-        render_width = options.max_width
-        render_height = options.height or console.height
-        region_map = self._make_region_map(render_width, render_height)
-        layout_regions = [
-            (layout, region)
-            for layout, region in region_map.items()
-            if not layout.children
-        ]
-        render_map: Dict["Layout", "LayoutRender"] = {}
-        render_lines = console.render_lines
-        update_dimensions = options.update_dimensions
-
-        for layout, region in layout_regions:
-            lines = render_lines(
-                layout.renderable, update_dimensions(region.width, region.height)
-            )
-            render_map[layout] = LayoutRender(region, lines)
-        return render_map
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        with self._lock:
-            width = options.max_width or console.width
-            height = options.height or console.height
-            render_map = self.render(console, options.update_dimensions(width, height))
-            self._render_map = render_map
-            layout_lines: List[List[Segment]] = [[] for _ in range(height)]
-            _islice = islice
-            for region, lines in render_map.values():
-                _x, y, _layout_width, layout_height = region
-                for row, line in zip(
-                    _islice(layout_lines, y, y + layout_height), lines
-                ):
-                    row.extend(line)
-
-            new_line = Segment.line()
-            for layout_row in layout_lines:
-                yield from layout_row
-                yield new_line
-
-
-if __name__ == "__main__":
-    from rich.console import Console
-
-    console = Console()
-    layout = Layout()
-
-    layout.split_column(
-        Layout(name="header", size=3),
-        Layout(ratio=1, name="main"),
-        Layout(size=10, name="footer"),
-    )
-
-    layout["main"].split_row(Layout(name="side"), Layout(name="body", ratio=2))
-
-    layout["body"].split_row(Layout(name="content", ratio=2), Layout(name="s2"))
-
-    layout["s2"].split_column(
-        Layout(name="top"), Layout(name="middle"), Layout(name="bottom")
-    )
-
-    layout["side"].split_column(Layout(layout.tree, name="left1"), Layout(name="left2"))
-
-    layout["content"].update("foo")
-
-    console.print(layout)
diff --git a/voxvera/vendor/rich/live.py b/voxvera/vendor/rich/live.py
deleted file mode 100644
index 2fd893b..0000000
--- a/voxvera/vendor/rich/live.py
+++ /dev/null
@@ -1,404 +0,0 @@
-from __future__ import annotations
-
-import sys
-from threading import Event, RLock, Thread
-from types import TracebackType
-from typing import IO, TYPE_CHECKING, Any, Callable, List, Optional, TextIO, Type, cast
-
-from . import get_console
-from .console import Console, ConsoleRenderable, Group, RenderableType, RenderHook
-from .control import Control
-from .file_proxy import FileProxy
-from .jupyter import JupyterMixin
-from .live_render import LiveRender, VerticalOverflowMethod
-from .screen import Screen
-from .text import Text
-
-if TYPE_CHECKING:
-    # Can be replaced with `from typing import Self` in Python 3.11+
-    from typing_extensions import Self  # pragma: no cover
-
-
-class _RefreshThread(Thread):
-    """A thread that calls refresh() at regular intervals."""
-
-    def __init__(self, live: "Live", refresh_per_second: float) -> None:
-        self.live = live
-        self.refresh_per_second = refresh_per_second
-        self.done = Event()
-        super().__init__(daemon=True)
-
-    def stop(self) -> None:
-        self.done.set()
-
-    def run(self) -> None:
-        while not self.done.wait(1 / self.refresh_per_second):
-            with self.live._lock:
-                if not self.done.is_set():
-                    self.live.refresh()
-
-
-class Live(JupyterMixin, RenderHook):
-    """Renders an auto-updating live display of any given renderable.
-
-    Args:
-        renderable (RenderableType, optional): The renderable to live display. Defaults to displaying nothing.
-        console (Console, optional): Optional Console instance. Defaults to an internal Console instance writing to stdout.
-        screen (bool, optional): Enable alternate screen mode. Defaults to False.
-        auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()` or `update()` with refresh flag. Defaults to True
-        refresh_per_second (float, optional): Number of times per second to refresh the live display. Defaults to 4.
-        transient (bool, optional): Clear the renderable on exit (has no effect when screen=True). Defaults to False.
-        redirect_stdout (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
-        redirect_stderr (bool, optional): Enable redirection of stderr. Defaults to True.
-        vertical_overflow (VerticalOverflowMethod, optional): How to handle renderable when it is too tall for the console. Defaults to "ellipsis".
-        get_renderable (Callable[[], RenderableType], optional): Optional callable to get renderable. Defaults to None.
-    """
-
-    def __init__(
-        self,
-        renderable: Optional[RenderableType] = None,
-        *,
-        console: Optional[Console] = None,
-        screen: bool = False,
-        auto_refresh: bool = True,
-        refresh_per_second: float = 4,
-        transient: bool = False,
-        redirect_stdout: bool = True,
-        redirect_stderr: bool = True,
-        vertical_overflow: VerticalOverflowMethod = "ellipsis",
-        get_renderable: Optional[Callable[[], RenderableType]] = None,
-    ) -> None:
-        assert refresh_per_second > 0, "refresh_per_second must be > 0"
-        self._renderable = renderable
-        self.console = console if console is not None else get_console()
-        self._screen = screen
-        self._alt_screen = False
-
-        self._redirect_stdout = redirect_stdout
-        self._redirect_stderr = redirect_stderr
-        self._restore_stdout: Optional[IO[str]] = None
-        self._restore_stderr: Optional[IO[str]] = None
-
-        self._lock = RLock()
-        self.ipy_widget: Optional[Any] = None
-        self.auto_refresh = auto_refresh
-        self._started: bool = False
-        self.transient = True if screen else transient
-
-        self._refresh_thread: Optional[_RefreshThread] = None
-        self.refresh_per_second = refresh_per_second
-
-        self.vertical_overflow = vertical_overflow
-        self._get_renderable = get_renderable
-        self._live_render = LiveRender(
-            self.get_renderable(), vertical_overflow=vertical_overflow
-        )
-        self._nested = False
-
-    @property
-    def is_started(self) -> bool:
-        """Check if live display has been started."""
-        return self._started
-
-    def get_renderable(self) -> RenderableType:
-        renderable = (
-            self._get_renderable()
-            if self._get_renderable is not None
-            else self._renderable
-        )
-        return renderable or ""
-
-    def start(self, refresh: bool = False) -> None:
-        """Start live rendering display.
-
-        Args:
-            refresh (bool, optional): Also refresh. Defaults to False.
-        """
-        with self._lock:
-            if self._started:
-                return
-            self._started = True
-
-            if not self.console.set_live(self):
-                self._nested = True
-                return
-
-            if self._screen:
-                self._alt_screen = self.console.set_alt_screen(True)
-            self.console.show_cursor(False)
-            self._enable_redirect_io()
-            self.console.push_render_hook(self)
-            if refresh:
-                try:
-                    self.refresh()
-                except Exception:
-                    # If refresh fails, we want to stop the redirection of sys.stderr,
-                    # so the error stacktrace is properly displayed in the terminal.
-                    # (or, if the code that calls Rich captures the exception and wants to display something,
-                    # let this be displayed in the terminal).
-                    self.stop()
-                    raise
-            if self.auto_refresh:
-                self._refresh_thread = _RefreshThread(self, self.refresh_per_second)
-                self._refresh_thread.start()
-
-    def stop(self) -> None:
-        """Stop live rendering display."""
-        with self._lock:
-            if not self._started:
-                return
-            self._started = False
-            self.console.clear_live()
-            if self._nested:
-                if not self.transient:
-                    self.console.print(self.renderable)
-                return
-
-            if self.auto_refresh and self._refresh_thread is not None:
-                self._refresh_thread.stop()
-                self._refresh_thread = None
-            # allow it to fully render on the last even if overflow
-            self.vertical_overflow = "visible"
-            with self.console:
-                try:
-                    if not self._alt_screen and not self.console.is_jupyter:
-                        self.refresh()
-                finally:
-                    self._disable_redirect_io()
-                    self.console.pop_render_hook()
-                    if (
-                        not self._alt_screen
-                        and self.console.is_terminal
-                        and self._live_render.last_render_height
-                    ):
-                        self.console.line()
-                    self.console.show_cursor(True)
-                    if self._alt_screen:
-                        self.console.set_alt_screen(False)
-                    if self.transient and not self._alt_screen:
-                        self.console.control(self._live_render.restore_cursor())
-                    if self.ipy_widget is not None and self.transient:
-                        self.ipy_widget.close()  # pragma: no cover
-
-    def __enter__(self) -> Self:
-        self.start(refresh=self._renderable is not None)
-        return self
-
-    def __exit__(
-        self,
-        exc_type: Optional[Type[BaseException]],
-        exc_val: Optional[BaseException],
-        exc_tb: Optional[TracebackType],
-    ) -> None:
-        self.stop()
-
-    def _enable_redirect_io(self) -> None:
-        """Enable redirecting of stdout / stderr."""
-        if self.console.is_terminal or self.console.is_jupyter:
-            if self._redirect_stdout and not isinstance(sys.stdout, FileProxy):
-                self._restore_stdout = sys.stdout
-                sys.stdout = cast("TextIO", FileProxy(self.console, sys.stdout))
-            if self._redirect_stderr and not isinstance(sys.stderr, FileProxy):
-                self._restore_stderr = sys.stderr
-                sys.stderr = cast("TextIO", FileProxy(self.console, sys.stderr))
-
-    def _disable_redirect_io(self) -> None:
-        """Disable redirecting of stdout / stderr."""
-        if self._restore_stdout:
-            sys.stdout = cast("TextIO", self._restore_stdout)
-            self._restore_stdout = None
-        if self._restore_stderr:
-            sys.stderr = cast("TextIO", self._restore_stderr)
-            self._restore_stderr = None
-
-    @property
-    def renderable(self) -> RenderableType:
-        """Get the renderable that is being displayed
-
-        Returns:
-            RenderableType: Displayed renderable.
-        """
-        live_stack = self.console._live_stack
-        renderable: RenderableType
-        if live_stack and self is live_stack[0]:
-            # The first Live instance will render everything in the Live stack
-            renderable = Group(*[live.get_renderable() for live in live_stack])
-        else:
-            renderable = self.get_renderable()
-        return Screen(renderable) if self._alt_screen else renderable
-
-    def update(self, renderable: RenderableType, *, refresh: bool = False) -> None:
-        """Update the renderable that is being displayed
-
-        Args:
-            renderable (RenderableType): New renderable to use.
-            refresh (bool, optional): Refresh the display. Defaults to False.
-        """
-        if isinstance(renderable, str):
-            renderable = self.console.render_str(renderable)
-        with self._lock:
-            self._renderable = renderable
-            if refresh:
-                self.refresh()
-
-    def refresh(self) -> None:
-        """Update the display of the Live Render."""
-        with self._lock:
-            self._live_render.set_renderable(self.renderable)
-            if self._nested:
-                if self.console._live_stack:
-                    self.console._live_stack[0].refresh()
-                return
-
-            if self.console.is_jupyter:  # pragma: no cover
-                try:
-                    from IPython.display import display
-                    from ipywidgets import Output
-                except ImportError:
-                    import warnings
-
-                    warnings.warn('install "ipywidgets" for Jupyter support')
-                else:
-                    if self.ipy_widget is None:
-                        self.ipy_widget = Output()
-                        display(self.ipy_widget)
-
-                    with self.ipy_widget:
-                        self.ipy_widget.clear_output(wait=True)
-                        self.console.print(self._live_render.renderable)
-            elif self.console.is_terminal and not self.console.is_dumb_terminal:
-                with self.console:
-                    self.console.print(Control())
-            elif (
-                not self._started and not self.transient
-            ):  # if it is finished allow files or dumb-terminals to see final result
-                with self.console:
-                    self.console.print(Control())
-
-    def process_renderables(
-        self, renderables: List[ConsoleRenderable]
-    ) -> List[ConsoleRenderable]:
-        """Process renderables to restore cursor and display progress."""
-        self._live_render.vertical_overflow = self.vertical_overflow
-        if self.console.is_interactive:
-            # lock needs acquiring as user can modify live_render renderable at any time unlike in Progress.
-            with self._lock:
-                reset = (
-                    Control.home()
-                    if self._alt_screen
-                    else self._live_render.position_cursor()
-                )
-                renderables = [reset, *renderables, self._live_render]
-        elif (
-            not self._started and not self.transient
-        ):  # if it is finished render the final output for files or dumb_terminals
-            renderables = [*renderables, self._live_render]
-
-        return renderables
-
-
-if __name__ == "__main__":  # pragma: no cover
-    import random
-    import time
-    from itertools import cycle
-    from typing import Dict, List, Tuple
-
-    from .align import Align
-    from .console import Console
-    from .live import Live as Live
-    from .panel import Panel
-    from .rule import Rule
-    from .syntax import Syntax
-    from .table import Table
-
-    console = Console()
-
-    syntax = Syntax(
-        '''def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
-    """Iterate and generate a tuple with a flag for last value."""
-    iter_values = iter(values)
-    try:
-        previous_value = next(iter_values)
-    except StopIteration:
-        return
-    for value in iter_values:
-        yield False, previous_value
-        previous_value = value
-    yield True, previous_value''',
-        "python",
-        line_numbers=True,
-    )
-
-    table = Table("foo", "bar", "baz")
-    table.add_row("1", "2", "3")
-
-    progress_renderables = [
-        "You can make the terminal shorter and taller to see the live table hide"
-        "Text may be printed while the progress bars are rendering.",
-        Panel("In fact, [i]any[/i] renderable will work"),
-        "Such as [magenta]tables[/]...",
-        table,
-        "Pretty printed structures...",
-        {"type": "example", "text": "Pretty printed"},
-        "Syntax...",
-        syntax,
-        Rule("Give it a try!"),
-    ]
-
-    examples = cycle(progress_renderables)
-
-    exchanges = [
-        "SGD",
-        "MYR",
-        "EUR",
-        "USD",
-        "AUD",
-        "JPY",
-        "CNH",
-        "HKD",
-        "CAD",
-        "INR",
-        "DKK",
-        "GBP",
-        "RUB",
-        "NZD",
-        "MXN",
-        "IDR",
-        "TWD",
-        "THB",
-        "VND",
-    ]
-    with Live(console=console) as live_table:
-        exchange_rate_dict: Dict[Tuple[str, str], float] = {}
-
-        for index in range(100):
-            select_exchange = exchanges[index % len(exchanges)]
-
-            for exchange in exchanges:
-                if exchange == select_exchange:
-                    continue
-                time.sleep(0.4)
-                if random.randint(0, 10) < 1:
-                    console.log(next(examples))
-                exchange_rate_dict[(select_exchange, exchange)] = 200 / (
-                    (random.random() * 320) + 1
-                )
-                if len(exchange_rate_dict) > len(exchanges) - 1:
-                    exchange_rate_dict.pop(list(exchange_rate_dict.keys())[0])
-                table = Table(title="Exchange Rates")
-
-                table.add_column("Source Currency")
-                table.add_column("Destination Currency")
-                table.add_column("Exchange Rate")
-
-                for (source, dest), exchange_rate in exchange_rate_dict.items():
-                    table.add_row(
-                        source,
-                        dest,
-                        Text(
-                            f"{exchange_rate:.4f}",
-                            style="red" if exchange_rate < 1.0 else "green",
-                        ),
-                    )
-
-                live_table.update(Align.center(table))
diff --git a/voxvera/vendor/rich/live_render.py b/voxvera/vendor/rich/live_render.py
deleted file mode 100644
index e7ec970..0000000
--- a/voxvera/vendor/rich/live_render.py
+++ /dev/null
@@ -1,116 +0,0 @@
-from typing import Literal, Optional, Tuple
-
-from ._loop import loop_last
-from .console import Console, ConsoleOptions, RenderableType, RenderResult
-from .control import Control
-from .segment import ControlType, Segment
-from .style import StyleType
-from .text import Text
-
-VerticalOverflowMethod = Literal["crop", "ellipsis", "visible"]
-
-
-class LiveRender:
-    """Creates a renderable that may be updated.
-
-    Args:
-        renderable (RenderableType): Any renderable object.
-        style (StyleType, optional): An optional style to apply to the renderable. Defaults to "".
-    """
-
-    def __init__(
-        self,
-        renderable: RenderableType,
-        style: StyleType = "",
-        vertical_overflow: VerticalOverflowMethod = "ellipsis",
-    ) -> None:
-        self.renderable = renderable
-        self.style = style
-        self.vertical_overflow = vertical_overflow
-        self._shape: Optional[Tuple[int, int]] = None
-
-    @property
-    def last_render_height(self) -> int:
-        """The number of lines in the last render (may be 0 if nothing was rendered).
-
-        Returns:
-            Height in lines
-        """
-        if self._shape is None:
-            return 0
-        return self._shape[1]
-
-    def set_renderable(self, renderable: RenderableType) -> None:
-        """Set a new renderable.
-
-        Args:
-            renderable (RenderableType): Any renderable object, including str.
-        """
-        self.renderable = renderable
-
-    def position_cursor(self) -> Control:
-        """Get control codes to move cursor to beginning of live render.
-
-        Returns:
-            Control: A control instance that may be printed.
-        """
-        if self._shape is not None:
-            _, height = self._shape
-            return Control(
-                ControlType.CARRIAGE_RETURN,
-                (ControlType.ERASE_IN_LINE, 2),
-                *(
-                    (
-                        (ControlType.CURSOR_UP, 1),
-                        (ControlType.ERASE_IN_LINE, 2),
-                    )
-                    * (height - 1)
-                )
-            )
-        return Control()
-
-    def restore_cursor(self) -> Control:
-        """Get control codes to clear the render and restore the cursor to its previous position.
-
-        Returns:
-            Control: A Control instance that may be printed.
-        """
-        if self._shape is not None:
-            _, height = self._shape
-            return Control(
-                ControlType.CARRIAGE_RETURN,
-                *((ControlType.CURSOR_UP, 1), (ControlType.ERASE_IN_LINE, 2)) * height
-            )
-        return Control()
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        renderable = self.renderable
-        style = console.get_style(self.style)
-        lines = console.render_lines(renderable, options, style=style, pad=False)
-        shape = Segment.get_shape(lines)
-
-        _, height = shape
-        if height > options.size.height:
-            if self.vertical_overflow == "crop":
-                lines = lines[: options.size.height]
-                shape = Segment.get_shape(lines)
-            elif self.vertical_overflow == "ellipsis":
-                lines = lines[: (options.size.height - 1)]
-                overflow_text = Text(
-                    "...",
-                    overflow="crop",
-                    justify="center",
-                    end="",
-                    style="live.ellipsis",
-                )
-                lines.append(list(console.render(overflow_text)))
-                shape = Segment.get_shape(lines)
-        self._shape = shape
-
-        new_line = Segment.line()
-        for last, line in loop_last(lines):
-            yield from line
-            if not last:
-                yield new_line
diff --git a/voxvera/vendor/rich/logging.py b/voxvera/vendor/rich/logging.py
deleted file mode 100644
index c3e7a5f..0000000
--- a/voxvera/vendor/rich/logging.py
+++ /dev/null
@@ -1,297 +0,0 @@
-import logging
-from datetime import datetime
-from logging import Handler, LogRecord
-from pathlib import Path
-from types import ModuleType
-from typing import ClassVar, Iterable, List, Optional, Type, Union
-
-from rich._null_file import NullFile
-
-from . import get_console
-from ._log_render import FormatTimeCallable, LogRender
-from .console import Console, ConsoleRenderable
-from .highlighter import Highlighter, ReprHighlighter
-from .text import Text
-from .traceback import Traceback
-
-
-class RichHandler(Handler):
-    """A logging handler that renders output with Rich. The time / level / message and file are displayed in columns.
-    The level is color coded, and the message is syntax highlighted.
-
-    Note:
-        Be careful when enabling console markup in log messages if you have configured logging for libraries not
-        under your control. If a dependency writes messages containing square brackets, it may not produce the intended output.
-
-    Args:
-        level (Union[int, str], optional): Log level. Defaults to logging.NOTSET.
-        console (:class:`~rich.console.Console`, optional): Optional console instance to write logs.
-            Default will use a global console instance writing to stdout.
-        show_time (bool, optional): Show a column for the time. Defaults to True.
-        omit_repeated_times (bool, optional): Omit repetition of the same time. Defaults to True.
-        show_level (bool, optional): Show a column for the level. Defaults to True.
-        show_path (bool, optional): Show the path to the original log call. Defaults to True.
-        enable_link_path (bool, optional): Enable terminal link of path column to file. Defaults to True.
-        highlighter (Highlighter, optional): Highlighter to style log messages, or None to use ReprHighlighter. Defaults to None.
-        markup (bool, optional): Enable console markup in log messages. Defaults to False.
-        rich_tracebacks (bool, optional): Enable rich tracebacks with syntax highlighting and formatting. Defaults to False.
-        tracebacks_width (Optional[int], optional): Number of characters used to render tracebacks, or None for full width. Defaults to None.
-        tracebacks_code_width (int, optional): Number of code characters used to render tracebacks, or None for full width. Defaults to 88.
-        tracebacks_extra_lines (int, optional): Additional lines of code to render tracebacks, or None for full width. Defaults to None.
-        tracebacks_theme (str, optional): Override pygments theme used in traceback.
-        tracebacks_word_wrap (bool, optional): Enable word wrapping of long tracebacks lines. Defaults to True.
-        tracebacks_show_locals (bool, optional): Enable display of locals in tracebacks. Defaults to False.
-        tracebacks_suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
-        tracebacks_max_frames (int, optional): Optional maximum number of frames returned by traceback.
-        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to 10.
-        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
-        log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%x %X] ".
-        keywords (List[str], optional): List of words to highlight instead of ``RichHandler.KEYWORDS``.
-    """
-
-    KEYWORDS: ClassVar[Optional[List[str]]] = [
-        "GET",
-        "POST",
-        "HEAD",
-        "PUT",
-        "DELETE",
-        "OPTIONS",
-        "TRACE",
-        "PATCH",
-    ]
-    HIGHLIGHTER_CLASS: ClassVar[Type[Highlighter]] = ReprHighlighter
-
-    def __init__(
-        self,
-        level: Union[int, str] = logging.NOTSET,
-        console: Optional[Console] = None,
-        *,
-        show_time: bool = True,
-        omit_repeated_times: bool = True,
-        show_level: bool = True,
-        show_path: bool = True,
-        enable_link_path: bool = True,
-        highlighter: Optional[Highlighter] = None,
-        markup: bool = False,
-        rich_tracebacks: bool = False,
-        tracebacks_width: Optional[int] = None,
-        tracebacks_code_width: Optional[int] = 88,
-        tracebacks_extra_lines: int = 3,
-        tracebacks_theme: Optional[str] = None,
-        tracebacks_word_wrap: bool = True,
-        tracebacks_show_locals: bool = False,
-        tracebacks_suppress: Iterable[Union[str, ModuleType]] = (),
-        tracebacks_max_frames: int = 100,
-        locals_max_length: int = 10,
-        locals_max_string: int = 80,
-        log_time_format: Union[str, FormatTimeCallable] = "[%x %X]",
-        keywords: Optional[List[str]] = None,
-    ) -> None:
-        super().__init__(level=level)
-        self.console = console or get_console()
-        self.highlighter = highlighter or self.HIGHLIGHTER_CLASS()
-        self._log_render = LogRender(
-            show_time=show_time,
-            show_level=show_level,
-            show_path=show_path,
-            time_format=log_time_format,
-            omit_repeated_times=omit_repeated_times,
-            level_width=None,
-        )
-        self.enable_link_path = enable_link_path
-        self.markup = markup
-        self.rich_tracebacks = rich_tracebacks
-        self.tracebacks_width = tracebacks_width
-        self.tracebacks_extra_lines = tracebacks_extra_lines
-        self.tracebacks_theme = tracebacks_theme
-        self.tracebacks_word_wrap = tracebacks_word_wrap
-        self.tracebacks_show_locals = tracebacks_show_locals
-        self.tracebacks_suppress = tracebacks_suppress
-        self.tracebacks_max_frames = tracebacks_max_frames
-        self.tracebacks_code_width = tracebacks_code_width
-        self.locals_max_length = locals_max_length
-        self.locals_max_string = locals_max_string
-        self.keywords = keywords
-
-    def get_level_text(self, record: LogRecord) -> Text:
-        """Get the level name from the record.
-
-        Args:
-            record (LogRecord): LogRecord instance.
-
-        Returns:
-            Text: A tuple of the style and level name.
-        """
-        level_name = record.levelname
-        level_text = Text.styled(
-            level_name.ljust(8), f"logging.level.{level_name.lower()}"
-        )
-        return level_text
-
-    def emit(self, record: LogRecord) -> None:
-        """Invoked by logging."""
-        message = self.format(record)
-        traceback = None
-        if (
-            self.rich_tracebacks
-            and record.exc_info
-            and record.exc_info != (None, None, None)
-        ):
-            exc_type, exc_value, exc_traceback = record.exc_info
-            assert exc_type is not None
-            assert exc_value is not None
-            traceback = Traceback.from_exception(
-                exc_type,
-                exc_value,
-                exc_traceback,
-                width=self.tracebacks_width,
-                code_width=self.tracebacks_code_width,
-                extra_lines=self.tracebacks_extra_lines,
-                theme=self.tracebacks_theme,
-                word_wrap=self.tracebacks_word_wrap,
-                show_locals=self.tracebacks_show_locals,
-                locals_max_length=self.locals_max_length,
-                locals_max_string=self.locals_max_string,
-                suppress=self.tracebacks_suppress,
-                max_frames=self.tracebacks_max_frames,
-            )
-            message = record.getMessage()
-            if self.formatter:
-                record.message = record.getMessage()
-                formatter = self.formatter
-                if hasattr(formatter, "usesTime") and formatter.usesTime():
-                    record.asctime = formatter.formatTime(record, formatter.datefmt)
-                message = formatter.formatMessage(record)
-
-        message_renderable = self.render_message(record, message)
-        log_renderable = self.render(
-            record=record, traceback=traceback, message_renderable=message_renderable
-        )
-        if isinstance(self.console.file, NullFile):
-            # Handles pythonw, where stdout/stderr are null, and we return NullFile
-            # instance from Console.file. In this case, we still want to make a log record
-            # even though we won't be writing anything to a file.
-            self.handleError(record)
-        else:
-            try:
-                self.console.print(log_renderable)
-            except Exception:
-                self.handleError(record)
-
-    def render_message(self, record: LogRecord, message: str) -> "ConsoleRenderable":
-        """Render message text in to Text.
-
-        Args:
-            record (LogRecord): logging Record.
-            message (str): String containing log message.
-
-        Returns:
-            ConsoleRenderable: Renderable to display log message.
-        """
-        use_markup = getattr(record, "markup", self.markup)
-        message_text = Text.from_markup(message) if use_markup else Text(message)
-
-        highlighter = getattr(record, "highlighter", self.highlighter)
-        if highlighter:
-            message_text = highlighter(message_text)
-
-        if self.keywords is None:
-            self.keywords = self.KEYWORDS
-
-        if self.keywords:
-            message_text.highlight_words(self.keywords, "logging.keyword")
-
-        return message_text
-
-    def render(
-        self,
-        *,
-        record: LogRecord,
-        traceback: Optional[Traceback],
-        message_renderable: "ConsoleRenderable",
-    ) -> "ConsoleRenderable":
-        """Render log for display.
-
-        Args:
-            record (LogRecord): logging Record.
-            traceback (Optional[Traceback]): Traceback instance or None for no Traceback.
-            message_renderable (ConsoleRenderable): Renderable (typically Text) containing log message contents.
-
-        Returns:
-            ConsoleRenderable: Renderable to display log.
-        """
-        path = Path(record.pathname).name
-        level = self.get_level_text(record)
-        time_format = None if self.formatter is None else self.formatter.datefmt
-        log_time = datetime.fromtimestamp(record.created)
-
-        log_renderable = self._log_render(
-            self.console,
-            [message_renderable] if not traceback else [message_renderable, traceback],
-            log_time=log_time,
-            time_format=time_format,
-            level=level,
-            path=path,
-            line_no=record.lineno,
-            link_path=record.pathname if self.enable_link_path else None,
-        )
-        return log_renderable
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from time import sleep
-
-    FORMAT = "%(message)s"
-    # FORMAT = "%(asctime)-15s - %(levelname)s - %(message)s"
-    logging.basicConfig(
-        level="NOTSET",
-        format=FORMAT,
-        datefmt="[%X]",
-        handlers=[RichHandler(rich_tracebacks=True, tracebacks_show_locals=True)],
-    )
-    log = logging.getLogger("rich")
-
-    log.info("Server starting...")
-    log.info("Listening on http://127.0.0.1:8080")
-    sleep(1)
-
-    log.info("GET /index.html 200 1298")
-    log.info("GET /imgs/backgrounds/back1.jpg 200 54386")
-    log.info("GET /css/styles.css 200 54386")
-    log.warning("GET /favicon.ico 404 242")
-    sleep(1)
-
-    log.debug(
-        "JSONRPC request\n--> %r\n<-- %r",
-        {
-            "version": "1.1",
-            "method": "confirmFruitPurchase",
-            "params": [["apple", "orange", "mangoes", "pomelo"], 1.123],
-            "id": "194521489",
-        },
-        {"version": "1.1", "result": True, "error": None, "id": "194521489"},
-    )
-    log.debug(
-        "Loading configuration file /adasd/asdasd/qeqwe/qwrqwrqwr/sdgsdgsdg/werwerwer/dfgerert/ertertert/ertetert/werwerwer"
-    )
-    log.error("Unable to find 'pomelo' in database!")
-    log.info("POST /jsonrpc/ 200 65532")
-    log.info("POST /admin/ 401 42234")
-    log.warning("password was rejected for admin site.")
-
-    def divide() -> None:
-        number = 1
-        divisor = 0
-        foos = ["foo"] * 100
-        log.debug("in divide")
-        try:
-            number / divisor
-        except:
-            log.exception("An error of some kind occurred!")
-
-    divide()
-    sleep(1)
-    log.critical("Out of memory!")
-    log.info("Server exited with code=-1")
-    log.info("[bold]EXITING...[/bold]", extra=dict(markup=True))
diff --git a/voxvera/vendor/rich/markdown.py b/voxvera/vendor/rich/markdown.py
deleted file mode 100644
index 5db183b..0000000
--- a/voxvera/vendor/rich/markdown.py
+++ /dev/null
@@ -1,793 +0,0 @@
-from __future__ import annotations
-
-import sys
-from dataclasses import dataclass
-from typing import ClassVar, Iterable, get_args
-
-from markdown_it import MarkdownIt
-from markdown_it.token import Token
-
-from rich.table import Table
-
-from . import box
-from ._loop import loop_first
-from ._stack import Stack
-from .console import Console, ConsoleOptions, JustifyMethod, RenderResult
-from .containers import Renderables
-from .jupyter import JupyterMixin
-from .rule import Rule
-from .segment import Segment
-from .style import Style, StyleStack
-from .syntax import Syntax
-from .text import Text, TextType
-
-
-class MarkdownElement:
-    new_line: ClassVar[bool] = True
-
-    @classmethod
-    def create(cls, markdown: Markdown, token: Token) -> MarkdownElement:
-        """Factory to create markdown element,
-
-        Args:
-            markdown (Markdown): The parent Markdown object.
-            token (Token): A node from markdown-it.
-
-        Returns:
-            MarkdownElement: A new markdown element
-        """
-        return cls()
-
-    def on_enter(self, context: MarkdownContext) -> None:
-        """Called when the node is entered.
-
-        Args:
-            context (MarkdownContext): The markdown context.
-        """
-
-    def on_text(self, context: MarkdownContext, text: TextType) -> None:
-        """Called when text is parsed.
-
-        Args:
-            context (MarkdownContext): The markdown context.
-        """
-
-    def on_leave(self, context: MarkdownContext) -> None:
-        """Called when the parser leaves the element.
-
-        Args:
-            context (MarkdownContext): [description]
-        """
-
-    def on_child_close(self, context: MarkdownContext, child: MarkdownElement) -> bool:
-        """Called when a child element is closed.
-
-        This method allows a parent element to take over rendering of its children.
-
-        Args:
-            context (MarkdownContext): The markdown context.
-            child (MarkdownElement): The child markdown element.
-
-        Returns:
-            bool: Return True to render the element, or False to not render the element.
-        """
-        return True
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        return ()
-
-
-class UnknownElement(MarkdownElement):
-    """An unknown element.
-
-    Hopefully there will be no unknown elements, and we will have a MarkdownElement for
-    everything in the document.
-
-    """
-
-
-class TextElement(MarkdownElement):
-    """Base class for elements that render text."""
-
-    style_name = "none"
-
-    def on_enter(self, context: MarkdownContext) -> None:
-        self.style = context.enter_style(self.style_name)
-        self.text = Text(justify="left")
-
-    def on_text(self, context: MarkdownContext, text: TextType) -> None:
-        self.text.append(text, context.current_style if isinstance(text, str) else None)
-
-    def on_leave(self, context: MarkdownContext) -> None:
-        context.leave_style()
-
-
-class Paragraph(TextElement):
-    """A Paragraph."""
-
-    style_name = "markdown.paragraph"
-    justify: JustifyMethod
-
-    @classmethod
-    def create(cls, markdown: Markdown, token: Token) -> Paragraph:
-        return cls(justify=markdown.justify or "left")
-
-    def __init__(self, justify: JustifyMethod) -> None:
-        self.justify = justify
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        self.text.justify = self.justify
-        yield self.text
-
-
-@dataclass
-class HeadingFormat:
-    justify: JustifyMethod = "left"
-    style: str = ""
-
-
-class Heading(TextElement):
-    """A heading."""
-
-    LEVEL_ALIGN: ClassVar[dict[str, JustifyMethod]] = {
-        "h1": "center",
-        "h2": "left",
-        "h3": "left",
-        "h4": "left",
-        "h5": "left",
-        "h6": "left",
-    }
-
-    @classmethod
-    def create(cls, markdown: Markdown, token: Token) -> Heading:
-        return cls(token.tag)
-
-    def on_enter(self, context: MarkdownContext) -> None:
-        self.text = Text()
-        context.enter_style(self.style_name)
-
-    def __init__(self, tag: str) -> None:
-        self.tag = tag
-        self.style_name = f"markdown.{tag}"
-        super().__init__()
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        text = self.text.copy()
-        heading_justify = self.LEVEL_ALIGN.get(self.tag, "left")
-        text.justify = heading_justify
-        yield text
-
-
-class CodeBlock(TextElement):
-    """A code block with syntax highlighting."""
-
-    style_name = "markdown.code_block"
-
-    @classmethod
-    def create(cls, markdown: Markdown, token: Token) -> CodeBlock:
-        node_info = token.info or ""
-        lexer_name = node_info.partition(" ")[0]
-        return cls(lexer_name or "text", markdown.code_theme)
-
-    def __init__(self, lexer_name: str, theme: str) -> None:
-        self.lexer_name = lexer_name
-        self.theme = theme
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        code = str(self.text).rstrip()
-        syntax = Syntax(
-            code, self.lexer_name, theme=self.theme, word_wrap=True, padding=1
-        )
-        yield syntax
-
-
-class BlockQuote(TextElement):
-    """A block quote."""
-
-    style_name = "markdown.block_quote"
-
-    def __init__(self) -> None:
-        self.elements: Renderables = Renderables()
-
-    def on_child_close(self, context: MarkdownContext, child: MarkdownElement) -> bool:
-        self.elements.append(child)
-        return False
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        render_options = options.update(width=options.max_width - 4)
-        lines = console.render_lines(self.elements, render_options, style=self.style)
-        style = self.style
-        new_line = Segment("\n")
-        padding = Segment("▌ ", style)
-        for line in lines:
-            yield padding
-            yield from line
-            yield new_line
-
-
-class HorizontalRule(MarkdownElement):
-    """A horizontal rule to divide sections."""
-
-    new_line = False
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        style = console.get_style("markdown.hr", default="none")
-        yield Rule(style=style, characters="-")
-        yield Text()
-
-
-class TableElement(MarkdownElement):
-    """MarkdownElement corresponding to `table_open`."""
-
-    def __init__(self) -> None:
-        self.header: TableHeaderElement | None = None
-        self.body: TableBodyElement | None = None
-
-    def on_child_close(self, context: MarkdownContext, child: MarkdownElement) -> bool:
-        if isinstance(child, TableHeaderElement):
-            self.header = child
-        elif isinstance(child, TableBodyElement):
-            self.body = child
-        else:
-            raise RuntimeError("Couldn't process markdown table.")
-        return False
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        table = Table(
-            box=box.SIMPLE,
-            pad_edge=False,
-            style="markdown.table.border",
-            show_edge=True,
-            collapse_padding=True,
-        )
-
-        if self.header is not None and self.header.row is not None:
-            for column in self.header.row.cells:
-                heading = column.content.copy()
-                heading.stylize("markdown.table.header")
-                table.add_column(heading)
-
-        if self.body is not None:
-            for row in self.body.rows:
-                row_content = [element.content for element in row.cells]
-                table.add_row(*row_content)
-
-        yield table
-
-
-class TableHeaderElement(MarkdownElement):
-    """MarkdownElement corresponding to `thead_open` and `thead_close`."""
-
-    def __init__(self) -> None:
-        self.row: TableRowElement | None = None
-
-    def on_child_close(self, context: MarkdownContext, child: MarkdownElement) -> bool:
-        assert isinstance(child, TableRowElement)
-        self.row = child
-        return False
-
-
-class TableBodyElement(MarkdownElement):
-    """MarkdownElement corresponding to `tbody_open` and `tbody_close`."""
-
-    def __init__(self) -> None:
-        self.rows: list[TableRowElement] = []
-
-    def on_child_close(self, context: MarkdownContext, child: MarkdownElement) -> bool:
-        assert isinstance(child, TableRowElement)
-        self.rows.append(child)
-        return False
-
-
-class TableRowElement(MarkdownElement):
-    """MarkdownElement corresponding to `tr_open` and `tr_close`."""
-
-    def __init__(self) -> None:
-        self.cells: list[TableDataElement] = []
-
-    def on_child_close(self, context: MarkdownContext, child: MarkdownElement) -> bool:
-        assert isinstance(child, TableDataElement)
-        self.cells.append(child)
-        return False
-
-
-class TableDataElement(MarkdownElement):
-    """MarkdownElement corresponding to `td_open` and `td_close`
-    and `th_open` and `th_close`."""
-
-    @classmethod
-    def create(cls, markdown: Markdown, token: Token) -> MarkdownElement:
-        style = str(token.attrs.get("style")) or ""
-
-        justify: JustifyMethod
-        if "text-align:right" in style:
-            justify = "right"
-        elif "text-align:center" in style:
-            justify = "center"
-        elif "text-align:left" in style:
-            justify = "left"
-        else:
-            justify = "default"
-
-        assert justify in get_args(JustifyMethod)
-        return cls(justify=justify)
-
-    def __init__(self, justify: JustifyMethod) -> None:
-        self.content: Text = Text("", justify=justify)
-        self.justify = justify
-
-    def on_text(self, context: MarkdownContext, text: TextType) -> None:
-        text = Text(text) if isinstance(text, str) else text
-        text.stylize(context.current_style)
-        self.content.append_text(text)
-
-
-class ListElement(MarkdownElement):
-    """A list element."""
-
-    @classmethod
-    def create(cls, markdown: Markdown, token: Token) -> ListElement:
-        return cls(token.type, int(token.attrs.get("start", 1)))
-
-    def __init__(self, list_type: str, list_start: int | None) -> None:
-        self.items: list[ListItem] = []
-        self.list_type = list_type
-        self.list_start = list_start
-
-    def on_child_close(self, context: MarkdownContext, child: MarkdownElement) -> bool:
-        assert isinstance(child, ListItem)
-        self.items.append(child)
-        return False
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        if self.list_type == "bullet_list_open":
-            for item in self.items:
-                yield from item.render_bullet(console, options)
-        else:
-            number = 1 if self.list_start is None else self.list_start
-            last_number = number + len(self.items)
-            for index, item in enumerate(self.items):
-                yield from item.render_number(
-                    console, options, number + index, last_number
-                )
-
-
-class ListItem(TextElement):
-    """An item in a list."""
-
-    style_name = "markdown.item"
-
-    def __init__(self) -> None:
-        self.elements: Renderables = Renderables()
-
-    def on_child_close(self, context: MarkdownContext, child: MarkdownElement) -> bool:
-        self.elements.append(child)
-        return False
-
-    def render_bullet(self, console: Console, options: ConsoleOptions) -> RenderResult:
-        render_options = options.update(width=options.max_width - 3)
-        lines = console.render_lines(self.elements, render_options, style=self.style)
-        bullet_style = console.get_style("markdown.item.bullet", default="none")
-
-        bullet = Segment(" • ", bullet_style)
-        padding = Segment(" " * 3, bullet_style)
-        new_line = Segment("\n")
-        for first, line in loop_first(lines):
-            yield bullet if first else padding
-            yield from line
-            yield new_line
-
-    def render_number(
-        self, console: Console, options: ConsoleOptions, number: int, last_number: int
-    ) -> RenderResult:
-        number_width = len(str(last_number)) + 2
-        render_options = options.update(width=options.max_width - number_width)
-        lines = console.render_lines(self.elements, render_options, style=self.style)
-        number_style = console.get_style("markdown.item.number", default="none")
-
-        new_line = Segment("\n")
-        padding = Segment(" " * number_width, number_style)
-        numeral = Segment(f"{number}".rjust(number_width - 1) + " ", number_style)
-        for first, line in loop_first(lines):
-            yield numeral if first else padding
-            yield from line
-            yield new_line
-
-
-class Link(TextElement):
-    @classmethod
-    def create(cls, markdown: Markdown, token: Token) -> MarkdownElement:
-        url = token.attrs.get("href", "#")
-        return cls(token.content, str(url))
-
-    def __init__(self, text: str, href: str):
-        self.text = Text(text)
-        self.href = href
-
-
-class ImageItem(TextElement):
-    """Renders a placeholder for an image."""
-
-    new_line = False
-
-    @classmethod
-    def create(cls, markdown: Markdown, token: Token) -> MarkdownElement:
-        """Factory to create markdown element,
-
-        Args:
-            markdown (Markdown): The parent Markdown object.
-            token (Any): A token from markdown-it.
-
-        Returns:
-            MarkdownElement: A new markdown element
-        """
-        return cls(str(token.attrs.get("src", "")), markdown.hyperlinks)
-
-    def __init__(self, destination: str, hyperlinks: bool) -> None:
-        self.destination = destination
-        self.hyperlinks = hyperlinks
-        self.link: str | None = None
-        super().__init__()
-
-    def on_enter(self, context: MarkdownContext) -> None:
-        self.link = context.current_style.link
-        self.text = Text(justify="left")
-        super().on_enter(context)
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        link_style = Style(link=self.link or self.destination or None)
-        title = self.text or Text(self.destination.strip("/").rsplit("/", 1)[-1])
-        if self.hyperlinks:
-            title.stylize(link_style)
-        text = Text.assemble("🌆 ", title, " ", end="")
-        yield text
-
-
-class MarkdownContext:
-    """Manages the console render state."""
-
-    def __init__(
-        self,
-        console: Console,
-        options: ConsoleOptions,
-        style: Style,
-        inline_code_lexer: str | None = None,
-        inline_code_theme: str = "monokai",
-    ) -> None:
-        self.console = console
-        self.options = options
-        self.style_stack: StyleStack = StyleStack(style)
-        self.stack: Stack[MarkdownElement] = Stack()
-
-        self._syntax: Syntax | None = None
-        if inline_code_lexer is not None:
-            self._syntax = Syntax("", inline_code_lexer, theme=inline_code_theme)
-
-    @property
-    def current_style(self) -> Style:
-        """Current style which is the product of all styles on the stack."""
-        return self.style_stack.current
-
-    def on_text(self, text: str, node_type: str) -> None:
-        """Called when the parser visits text."""
-        if node_type in {"fence", "code_inline"} and self._syntax is not None:
-            highlight_text = self._syntax.highlight(text)
-            highlight_text.rstrip()
-            self.stack.top.on_text(
-                self, Text.assemble(highlight_text, style=self.style_stack.current)
-            )
-        else:
-            self.stack.top.on_text(self, text)
-
-    def enter_style(self, style_name: str | Style) -> Style:
-        """Enter a style context."""
-        style = self.console.get_style(style_name, default="none")
-        self.style_stack.push(style)
-        return self.current_style
-
-    def leave_style(self) -> Style:
-        """Leave a style context."""
-        style = self.style_stack.pop()
-        return style
-
-
-class Markdown(JupyterMixin):
-    """A Markdown renderable.
-
-    Args:
-        markup (str): A string containing markdown.
-        code_theme (str, optional): Pygments theme for code blocks. Defaults to "monokai". See https://pygments.org/styles/ for code themes.
-        justify (JustifyMethod, optional): Justify value for paragraphs. Defaults to None.
-        style (Union[str, Style], optional): Optional style to apply to markdown.
-        hyperlinks (bool, optional): Enable hyperlinks. Defaults to ``True``.
-        inline_code_lexer: (str, optional): Lexer to use if inline code highlighting is
-            enabled. Defaults to None.
-        inline_code_theme: (Optional[str], optional): Pygments theme for inline code
-            highlighting, or None for no highlighting. Defaults to None.
-    """
-
-    elements: ClassVar[dict[str, type[MarkdownElement]]] = {
-        "paragraph_open": Paragraph,
-        "heading_open": Heading,
-        "fence": CodeBlock,
-        "code_block": CodeBlock,
-        "blockquote_open": BlockQuote,
-        "hr": HorizontalRule,
-        "bullet_list_open": ListElement,
-        "ordered_list_open": ListElement,
-        "list_item_open": ListItem,
-        "image": ImageItem,
-        "table_open": TableElement,
-        "tbody_open": TableBodyElement,
-        "thead_open": TableHeaderElement,
-        "tr_open": TableRowElement,
-        "td_open": TableDataElement,
-        "th_open": TableDataElement,
-    }
-
-    inlines = {"em", "strong", "code", "s"}
-
-    def __init__(
-        self,
-        markup: str,
-        code_theme: str = "monokai",
-        justify: JustifyMethod | None = None,
-        style: str | Style = "none",
-        hyperlinks: bool = True,
-        inline_code_lexer: str | None = None,
-        inline_code_theme: str | None = None,
-    ) -> None:
-        parser = MarkdownIt().enable("strikethrough").enable("table")
-        self.markup = markup
-        self.parsed = parser.parse(markup)
-        self.code_theme = code_theme
-        self.justify: JustifyMethod | None = justify
-        self.style = style
-        self.hyperlinks = hyperlinks
-        self.inline_code_lexer = inline_code_lexer
-        self.inline_code_theme = inline_code_theme or code_theme
-
-    def _flatten_tokens(self, tokens: Iterable[Token]) -> Iterable[Token]:
-        """Flattens the token stream."""
-        for token in tokens:
-            is_fence = token.type == "fence"
-            is_image = token.tag == "img"
-            if token.children and not (is_image or is_fence):
-                yield from self._flatten_tokens(token.children)
-            else:
-                yield token
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        """Render markdown to the console."""
-        style = console.get_style(self.style, default="none")
-        options = options.update(height=None)
-        context = MarkdownContext(
-            console,
-            options,
-            style,
-            inline_code_lexer=self.inline_code_lexer,
-            inline_code_theme=self.inline_code_theme,
-        )
-        tokens = self.parsed
-        inline_style_tags = self.inlines
-        new_line = False
-        _new_line_segment = Segment.line()
-
-        for token in self._flatten_tokens(tokens):
-            node_type = token.type
-            tag = token.tag
-
-            entering = token.nesting == 1
-            exiting = token.nesting == -1
-            self_closing = token.nesting == 0
-
-            if node_type == "text":
-                context.on_text(token.content, node_type)
-            elif node_type == "hardbreak":
-                context.on_text("\n", node_type)
-            elif node_type == "softbreak":
-                context.on_text(" ", node_type)
-            elif node_type == "link_open":
-                href = str(token.attrs.get("href", ""))
-                if self.hyperlinks:
-                    link_style = console.get_style("markdown.link_url", default="none")
-                    link_style += Style(link=href)
-                    context.enter_style(link_style)
-                else:
-                    context.stack.push(Link.create(self, token))
-            elif node_type == "link_close":
-                if self.hyperlinks:
-                    context.leave_style()
-                else:
-                    element = context.stack.pop()
-                    assert isinstance(element, Link)
-                    link_style = console.get_style("markdown.link", default="none")
-                    context.enter_style(link_style)
-                    context.on_text(element.text.plain, node_type)
-                    context.leave_style()
-                    context.on_text(" (", node_type)
-                    link_url_style = console.get_style(
-                        "markdown.link_url", default="none"
-                    )
-                    context.enter_style(link_url_style)
-                    context.on_text(element.href, node_type)
-                    context.leave_style()
-                    context.on_text(")", node_type)
-            elif (
-                tag in inline_style_tags
-                and node_type != "fence"
-                and node_type != "code_block"
-            ):
-                if entering:
-                    # If it's an opening inline token e.g. strong, em, etc.
-                    # Then we move into a style context i.e. push to stack.
-                    context.enter_style(f"markdown.{tag}")
-                elif exiting:
-                    # If it's a closing inline style, then we pop the style
-                    # off of the stack, to move out of the context of it...
-                    context.leave_style()
-                else:
-                    # If it's a self-closing inline style e.g. `code_inline`
-                    context.enter_style(f"markdown.{tag}")
-                    if token.content:
-                        context.on_text(token.content, node_type)
-                    context.leave_style()
-            else:
-                # Map the markdown tag -> MarkdownElement renderable
-                element_class = self.elements.get(token.type) or UnknownElement
-                element = element_class.create(self, token)
-
-                if entering or self_closing:
-                    context.stack.push(element)
-                    element.on_enter(context)
-
-                if exiting:  # CLOSING tag
-                    element = context.stack.pop()
-
-                    should_render = not context.stack or (
-                        context.stack
-                        and context.stack.top.on_child_close(context, element)
-                    )
-
-                    if should_render:
-                        if new_line:
-                            yield _new_line_segment
-
-                        yield from console.render(element, context.options)
-                elif self_closing:  # SELF-CLOSING tags (e.g. text, code, image)
-                    context.stack.pop()
-                    text = token.content
-                    if text is not None:
-                        element.on_text(context, text)
-
-                    should_render = (
-                        not context.stack
-                        or context.stack
-                        and context.stack.top.on_child_close(context, element)
-                    )
-                    if should_render:
-                        if new_line and node_type != "inline":
-                            yield _new_line_segment
-                        yield from console.render(element, context.options)
-
-                if exiting or self_closing:
-                    element.on_leave(context)
-                    new_line = element.new_line
-
-
-if __name__ == "__main__":  # pragma: no cover
-    import argparse
-    import sys
-
-    parser = argparse.ArgumentParser(
-        description="Render Markdown to the console with Rich"
-    )
-    parser.add_argument(
-        "path",
-        metavar="PATH",
-        help="path to markdown file, or - for stdin",
-    )
-    parser.add_argument(
-        "-c",
-        "--force-color",
-        dest="force_color",
-        action="store_true",
-        default=None,
-        help="force color for non-terminals",
-    )
-    parser.add_argument(
-        "-t",
-        "--code-theme",
-        dest="code_theme",
-        default="monokai",
-        help="pygments code theme",
-    )
-    parser.add_argument(
-        "-i",
-        "--inline-code-lexer",
-        dest="inline_code_lexer",
-        default=None,
-        help="inline_code_lexer",
-    )
-    parser.add_argument(
-        "-y",
-        "--hyperlinks",
-        dest="hyperlinks",
-        action="store_true",
-        help="enable hyperlinks",
-    )
-    parser.add_argument(
-        "-w",
-        "--width",
-        type=int,
-        dest="width",
-        default=None,
-        help="width of output (default will auto-detect)",
-    )
-    parser.add_argument(
-        "-j",
-        "--justify",
-        dest="justify",
-        action="store_true",
-        help="enable full text justify",
-    )
-    parser.add_argument(
-        "-p",
-        "--page",
-        dest="page",
-        action="store_true",
-        help="use pager to scroll output",
-    )
-    args = parser.parse_args()
-
-    from rich.console import Console
-
-    if args.path == "-":
-        markdown_body = sys.stdin.read()
-    else:
-        with open(args.path, encoding="utf-8") as markdown_file:
-            markdown_body = markdown_file.read()
-
-    markdown = Markdown(
-        markdown_body,
-        justify="full" if args.justify else "left",
-        code_theme=args.code_theme,
-        hyperlinks=args.hyperlinks,
-        inline_code_lexer=args.inline_code_lexer,
-    )
-    if args.page:
-        import io
-        import pydoc
-
-        fileio = io.StringIO()
-        console = Console(
-            file=fileio, force_terminal=args.force_color, width=args.width
-        )
-        console.print(markdown)
-        pydoc.pager(fileio.getvalue())
-
-    else:
-        console = Console(
-            force_terminal=args.force_color, width=args.width, record=True
-        )
-        console.print(markdown)
diff --git a/voxvera/vendor/rich/markup.py b/voxvera/vendor/rich/markup.py
deleted file mode 100644
index bd9c05a..0000000
--- a/voxvera/vendor/rich/markup.py
+++ /dev/null
@@ -1,251 +0,0 @@
-import re
-from ast import literal_eval
-from operator import attrgetter
-from typing import Callable, Iterable, List, Match, NamedTuple, Optional, Tuple, Union
-
-from ._emoji_replace import _emoji_replace
-from .emoji import EmojiVariant
-from .errors import MarkupError
-from .style import Style
-from .text import Span, Text
-
-RE_TAGS = re.compile(
-    r"""((\\*)\[([a-z#/@][^[]*?)])""",
-    re.VERBOSE,
-)
-
-RE_HANDLER = re.compile(r"^([\w.]*?)(\(.*?\))?$")
-
-
-class Tag(NamedTuple):
-    """A tag in console markup."""
-
-    name: str
-    """The tag name. e.g. 'bold'."""
-    parameters: Optional[str]
-    """Any additional parameters after the name."""
-
-    def __str__(self) -> str:
-        return (
-            self.name if self.parameters is None else f"{self.name} {self.parameters}"
-        )
-
-    @property
-    def markup(self) -> str:
-        """Get the string representation of this tag."""
-        return (
-            f"[{self.name}]"
-            if self.parameters is None
-            else f"[{self.name}={self.parameters}]"
-        )
-
-
-_ReStringMatch = Match[str]  # regex match object
-_ReSubCallable = Callable[[_ReStringMatch], str]  # Callable invoked by re.sub
-_EscapeSubMethod = Callable[[_ReSubCallable, str], str]  # Sub method of a compiled re
-
-
-def escape(
-    markup: str,
-    _escape: _EscapeSubMethod = re.compile(r"(\\*)(\[[a-z#/@][^[]*?])").sub,
-) -> str:
-    """Escapes text so that it won't be interpreted as markup.
-
-    Args:
-        markup (str): Content to be inserted in to markup.
-
-    Returns:
-        str: Markup with square brackets escaped.
-    """
-
-    def escape_backslashes(match: Match[str]) -> str:
-        """Called by re.sub replace matches."""
-        backslashes, text = match.groups()
-        return f"{backslashes}{backslashes}\\{text}"
-
-    markup = _escape(escape_backslashes, markup)
-    if markup.endswith("\\") and not markup.endswith("\\\\"):
-        return markup + "\\"
-
-    return markup
-
-
-def _parse(markup: str) -> Iterable[Tuple[int, Optional[str], Optional[Tag]]]:
-    """Parse markup in to an iterable of tuples of (position, text, tag).
-
-    Args:
-        markup (str): A string containing console markup
-
-    """
-    position = 0
-    _divmod = divmod
-    _Tag = Tag
-    for match in RE_TAGS.finditer(markup):
-        full_text, escapes, tag_text = match.groups()
-        start, end = match.span()
-        if start > position:
-            yield start, markup[position:start], None
-        if escapes:
-            backslashes, escaped = _divmod(len(escapes), 2)
-            if backslashes:
-                # Literal backslashes
-                yield start, "\\" * backslashes, None
-                start += backslashes * 2
-            if escaped:
-                # Escape of tag
-                yield start, full_text[len(escapes) :], None
-                position = end
-                continue
-        text, equals, parameters = tag_text.partition("=")
-        yield start, None, _Tag(text, parameters if equals else None)
-        position = end
-    if position < len(markup):
-        yield position, markup[position:], None
-
-
-def render(
-    markup: str,
-    style: Union[str, Style] = "",
-    emoji: bool = True,
-    emoji_variant: Optional[EmojiVariant] = None,
-) -> Text:
-    """Render console markup in to a Text instance.
-
-    Args:
-        markup (str): A string containing console markup.
-        style: (Union[str, Style]): The style to use.
-        emoji (bool, optional): Also render emoji code. Defaults to True.
-        emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.
-
-
-    Raises:
-        MarkupError: If there is a syntax error in the markup.
-
-    Returns:
-        Text: A test instance.
-    """
-    emoji_replace = _emoji_replace
-    if "[" not in markup:
-        return Text(
-            emoji_replace(markup, default_variant=emoji_variant) if emoji else markup,
-            style=style,
-        )
-    text = Text(style=style)
-    append = text.append
-    normalize = Style.normalize
-
-    style_stack: List[Tuple[int, Tag]] = []
-    pop = style_stack.pop
-
-    spans: List[Span] = []
-    append_span = spans.append
-
-    _Span = Span
-    _Tag = Tag
-
-    def pop_style(style_name: str) -> Tuple[int, Tag]:
-        """Pop tag matching given style name."""
-        for index, (_, tag) in enumerate(reversed(style_stack), 1):
-            if tag.name == style_name:
-                return pop(-index)
-        raise KeyError(style_name)
-
-    for position, plain_text, tag in _parse(markup):
-        if plain_text is not None:
-            # Handle open brace escapes, where the brace is not part of a tag.
-            plain_text = plain_text.replace("\\[", "[")
-            append(emoji_replace(plain_text) if emoji else plain_text)
-        elif tag is not None:
-            if tag.name.startswith("/"):  # Closing tag
-                style_name = tag.name[1:].strip()
-
-                if style_name:  # explicit close
-                    style_name = normalize(style_name)
-                    try:
-                        start, open_tag = pop_style(style_name)
-                    except KeyError:
-                        raise MarkupError(
-                            f"closing tag '{tag.markup}' at position {position} doesn't match any open tag"
-                        ) from None
-                else:  # implicit close
-                    try:
-                        start, open_tag = pop()
-                    except IndexError:
-                        raise MarkupError(
-                            f"closing tag '[/]' at position {position} has nothing to close"
-                        ) from None
-
-                if open_tag.name.startswith("@"):
-                    if open_tag.parameters:
-                        handler_name = ""
-                        parameters = open_tag.parameters.strip()
-                        handler_match = RE_HANDLER.match(parameters)
-                        if handler_match is not None:
-                            handler_name, match_parameters = handler_match.groups()
-                            parameters = (
-                                "()" if match_parameters is None else match_parameters
-                            )
-
-                        try:
-                            meta_params = literal_eval(parameters)
-                        except SyntaxError as error:
-                            raise MarkupError(
-                                f"error parsing {parameters!r} in {open_tag.parameters!r}; {error.msg}"
-                            )
-                        except Exception as error:
-                            raise MarkupError(
-                                f"error parsing {open_tag.parameters!r}; {error}"
-                            ) from None
-
-                        if handler_name:
-                            meta_params = (
-                                handler_name,
-                                meta_params
-                                if isinstance(meta_params, tuple)
-                                else (meta_params,),
-                            )
-
-                    else:
-                        meta_params = ()
-
-                    append_span(
-                        _Span(
-                            start, len(text), Style(meta={open_tag.name: meta_params})
-                        )
-                    )
-                else:
-                    append_span(_Span(start, len(text), str(open_tag)))
-
-            else:  # Opening tag
-                normalized_tag = _Tag(normalize(tag.name), tag.parameters)
-                style_stack.append((len(text), normalized_tag))
-
-    text_length = len(text)
-    while style_stack:
-        start, tag = style_stack.pop()
-        style = str(tag)
-        if style:
-            append_span(_Span(start, text_length, style))
-
-    text.spans = sorted(spans[::-1], key=attrgetter("start"))
-    return text
-
-
-if __name__ == "__main__":  # pragma: no cover
-    MARKUP = [
-        "[red]Hello World[/red]",
-        "[magenta]Hello [b]World[/b]",
-        "[bold]Bold[italic] bold and italic [/bold]italic[/italic]",
-        "Click [link=https://www.willmcgugan.com]here[/link] to visit my Blog",
-        ":warning-emoji: [bold red blink] DANGER![/]",
-    ]
-
-    from rich import print
-    from rich.table import Table
-
-    grid = Table("Markup", "Result", padding=(0, 1))
-
-    for markup in MARKUP:
-        grid.add_row(Text(markup), markup)
-
-    print(grid)
diff --git a/voxvera/vendor/rich/measure.py b/voxvera/vendor/rich/measure.py
deleted file mode 100644
index a508ffa..0000000
--- a/voxvera/vendor/rich/measure.py
+++ /dev/null
@@ -1,151 +0,0 @@
-from operator import itemgetter
-from typing import TYPE_CHECKING, Callable, NamedTuple, Optional, Sequence
-
-from . import errors
-from .protocol import is_renderable, rich_cast
-
-if TYPE_CHECKING:
-    from .console import Console, ConsoleOptions, RenderableType
-
-
-class Measurement(NamedTuple):
-    """Stores the minimum and maximum widths (in characters) required to render an object."""
-
-    minimum: int
-    """Minimum number of cells required to render."""
-    maximum: int
-    """Maximum number of cells required to render."""
-
-    @property
-    def span(self) -> int:
-        """Get difference between maximum and minimum."""
-        return self.maximum - self.minimum
-
-    def normalize(self) -> "Measurement":
-        """Get measurement that ensures that minimum <= maximum and minimum >= 0
-
-        Returns:
-            Measurement: A normalized measurement.
-        """
-        minimum, maximum = self
-        minimum = min(max(0, minimum), maximum)
-        return Measurement(max(0, minimum), max(0, max(minimum, maximum)))
-
-    def with_maximum(self, width: int) -> "Measurement":
-        """Get a RenderableWith where the widths are <= width.
-
-        Args:
-            width (int): Maximum desired width.
-
-        Returns:
-            Measurement: New Measurement object.
-        """
-        minimum, maximum = self
-        return Measurement(min(minimum, width), min(maximum, width))
-
-    def with_minimum(self, width: int) -> "Measurement":
-        """Get a RenderableWith where the widths are >= width.
-
-        Args:
-            width (int): Minimum desired width.
-
-        Returns:
-            Measurement: New Measurement object.
-        """
-        minimum, maximum = self
-        width = max(0, width)
-        return Measurement(max(minimum, width), max(maximum, width))
-
-    def clamp(
-        self, min_width: Optional[int] = None, max_width: Optional[int] = None
-    ) -> "Measurement":
-        """Clamp a measurement within the specified range.
-
-        Args:
-            min_width (int): Minimum desired width, or ``None`` for no minimum. Defaults to None.
-            max_width (int): Maximum desired width, or ``None`` for no maximum. Defaults to None.
-
-        Returns:
-            Measurement: New Measurement object.
-        """
-        measurement = self
-        if min_width is not None:
-            measurement = measurement.with_minimum(min_width)
-        if max_width is not None:
-            measurement = measurement.with_maximum(max_width)
-        return measurement
-
-    @classmethod
-    def get(
-        cls, console: "Console", options: "ConsoleOptions", renderable: "RenderableType"
-    ) -> "Measurement":
-        """Get a measurement for a renderable.
-
-        Args:
-            console (~rich.console.Console): Console instance.
-            options (~rich.console.ConsoleOptions): Console options.
-            renderable (RenderableType): An object that may be rendered with Rich.
-
-        Raises:
-            errors.NotRenderableError: If the object is not renderable.
-
-        Returns:
-            Measurement: Measurement object containing range of character widths required to render the object.
-        """
-        _max_width = options.max_width
-        if _max_width < 1:
-            return Measurement(0, 0)
-        if isinstance(renderable, str):
-            renderable = console.render_str(
-                renderable, markup=options.markup, highlight=False
-            )
-        renderable = rich_cast(renderable)
-        if is_renderable(renderable):
-            get_console_width: Optional[
-                Callable[["Console", "ConsoleOptions"], "Measurement"]
-            ] = getattr(renderable, "__rich_measure__", None)
-            if get_console_width is not None:
-                render_width = (
-                    get_console_width(console, options)
-                    .normalize()
-                    .with_maximum(_max_width)
-                )
-                if render_width.maximum < 1:
-                    return Measurement(0, 0)
-                return render_width.normalize()
-            else:
-                return Measurement(0, _max_width)
-        else:
-            raise errors.NotRenderableError(
-                f"Unable to get render width for {renderable!r}; "
-                "a str, Segment, or object with __rich_console__ method is required"
-            )
-
-
-def measure_renderables(
-    console: "Console",
-    options: "ConsoleOptions",
-    renderables: Sequence["RenderableType"],
-) -> "Measurement":
-    """Get a measurement that would fit a number of renderables.
-
-    Args:
-        console (~rich.console.Console): Console instance.
-        options (~rich.console.ConsoleOptions): Console options.
-        renderables (Iterable[RenderableType]): One or more renderable objects.
-
-    Returns:
-        Measurement: Measurement object containing range of character widths required to
-            contain all given renderables.
-    """
-    if not renderables:
-        return Measurement(0, 0)
-    get_measurement = Measurement.get
-    measurements = [
-        get_measurement(console, options, renderable) for renderable in renderables
-    ]
-    measured_width = Measurement(
-        max(measurements, key=itemgetter(0)).minimum,
-        max(measurements, key=itemgetter(1)).maximum,
-    )
-    return measured_width
diff --git a/voxvera/vendor/rich/padding.py b/voxvera/vendor/rich/padding.py
deleted file mode 100644
index d1aa01b..0000000
--- a/voxvera/vendor/rich/padding.py
+++ /dev/null
@@ -1,141 +0,0 @@
-from typing import TYPE_CHECKING, List, Optional, Tuple, Union
-
-if TYPE_CHECKING:
-    from .console import (
-        Console,
-        ConsoleOptions,
-        RenderableType,
-        RenderResult,
-    )
-
-from .jupyter import JupyterMixin
-from .measure import Measurement
-from .segment import Segment
-from .style import Style
-
-PaddingDimensions = Union[int, Tuple[int], Tuple[int, int], Tuple[int, int, int, int]]
-
-
-class Padding(JupyterMixin):
-    """Draw space around content.
-
-    Example:
-        >>> print(Padding("Hello", (2, 4), style="on blue"))
-
-    Args:
-        renderable (RenderableType): String or other renderable.
-        pad (Union[int, Tuple[int]]): Padding for top, right, bottom, and left borders.
-            May be specified with 1, 2, or 4 integers (CSS style).
-        style (Union[str, Style], optional): Style for padding characters. Defaults to "none".
-        expand (bool, optional): Expand padding to fit available width. Defaults to True.
-    """
-
-    def __init__(
-        self,
-        renderable: "RenderableType",
-        pad: "PaddingDimensions" = (0, 0, 0, 0),
-        *,
-        style: Union[str, Style] = "none",
-        expand: bool = True,
-    ):
-        self.renderable = renderable
-        self.top, self.right, self.bottom, self.left = self.unpack(pad)
-        self.style = style
-        self.expand = expand
-
-    @classmethod
-    def indent(cls, renderable: "RenderableType", level: int) -> "Padding":
-        """Make padding instance to render an indent.
-
-        Args:
-            renderable (RenderableType): String or other renderable.
-            level (int): Number of characters to indent.
-
-        Returns:
-            Padding: A Padding instance.
-        """
-
-        return Padding(renderable, pad=(0, 0, 0, level), expand=False)
-
-    @staticmethod
-    def unpack(pad: "PaddingDimensions") -> Tuple[int, int, int, int]:
-        """Unpack padding specified in CSS style."""
-        if isinstance(pad, int):
-            return (pad, pad, pad, pad)
-        if len(pad) == 1:
-            _pad = pad[0]
-            return (_pad, _pad, _pad, _pad)
-        if len(pad) == 2:
-            pad_top, pad_right = pad
-            return (pad_top, pad_right, pad_top, pad_right)
-        if len(pad) == 4:
-            top, right, bottom, left = pad
-            return (top, right, bottom, left)
-        raise ValueError(f"1, 2 or 4 integers required for padding; {len(pad)} given")
-
-    def __repr__(self) -> str:
-        return f"Padding({self.renderable!r}, ({self.top},{self.right},{self.bottom},{self.left}))"
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        style = console.get_style(self.style)
-        if self.expand:
-            width = options.max_width
-        else:
-            width = min(
-                Measurement.get(console, options, self.renderable).maximum
-                + self.left
-                + self.right,
-                options.max_width,
-            )
-        render_options = options.update_width(width - self.left - self.right)
-        if render_options.height is not None:
-            render_options = render_options.update_height(
-                height=render_options.height - self.top - self.bottom
-            )
-        lines = console.render_lines(
-            self.renderable, render_options, style=style, pad=True
-        )
-        _Segment = Segment
-
-        left = _Segment(" " * self.left, style) if self.left else None
-        right = (
-            [_Segment(f'{" " * self.right}', style), _Segment.line()]
-            if self.right
-            else [_Segment.line()]
-        )
-        blank_line: Optional[List[Segment]] = None
-        if self.top:
-            blank_line = [_Segment(f'{" " * width}\n', style)]
-            yield from blank_line * self.top
-        if left:
-            for line in lines:
-                yield left
-                yield from line
-                yield from right
-        else:
-            for line in lines:
-                yield from line
-                yield from right
-        if self.bottom:
-            blank_line = blank_line or [_Segment(f'{" " * width}\n', style)]
-            yield from blank_line * self.bottom
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "Measurement":
-        max_width = options.max_width
-        extra_width = self.left + self.right
-        if max_width - extra_width < 1:
-            return Measurement(max_width, max_width)
-        measure_min, measure_max = Measurement.get(console, options, self.renderable)
-        measurement = Measurement(measure_min + extra_width, measure_max + extra_width)
-        measurement = measurement.with_maximum(max_width)
-        return measurement
-
-
-if __name__ == "__main__":  #  pragma: no cover
-    from rich import print
-
-    print(Padding("Hello, World", (2, 4), style="on blue"))
diff --git a/voxvera/vendor/rich/pager.py b/voxvera/vendor/rich/pager.py
deleted file mode 100644
index a3f7aa6..0000000
--- a/voxvera/vendor/rich/pager.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from abc import ABC, abstractmethod
-from typing import Any
-
-
-class Pager(ABC):
-    """Base class for a pager."""
-
-    @abstractmethod
-    def show(self, content: str) -> None:
-        """Show content in pager.
-
-        Args:
-            content (str): Content to be displayed.
-        """
-
-
-class SystemPager(Pager):
-    """Uses the pager installed on the system."""
-
-    def _pager(self, content: str) -> Any:  #  pragma: no cover
-        return __import__("pydoc").pager(content)
-
-    def show(self, content: str) -> None:
-        """Use the same pager used by pydoc."""
-        self._pager(content)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from .__main__ import make_test_card
-    from .console import Console
-
-    console = Console()
-    with console.pager(styles=True):
-        console.print(make_test_card())
diff --git a/voxvera/vendor/rich/palette.py b/voxvera/vendor/rich/palette.py
deleted file mode 100644
index f295879..0000000
--- a/voxvera/vendor/rich/palette.py
+++ /dev/null
@@ -1,100 +0,0 @@
-from math import sqrt
-from functools import lru_cache
-from typing import Sequence, Tuple, TYPE_CHECKING
-
-from .color_triplet import ColorTriplet
-
-if TYPE_CHECKING:
-    from rich.table import Table
-
-
-class Palette:
-    """A palette of available colors."""
-
-    def __init__(self, colors: Sequence[Tuple[int, int, int]]):
-        self._colors = colors
-
-    def __getitem__(self, number: int) -> ColorTriplet:
-        return ColorTriplet(*self._colors[number])
-
-    def __rich__(self) -> "Table":
-        from rich.color import Color
-        from rich.style import Style
-        from rich.text import Text
-        from rich.table import Table
-
-        table = Table(
-            "index",
-            "RGB",
-            "Color",
-            title="Palette",
-            caption=f"{len(self._colors)} colors",
-            highlight=True,
-            caption_justify="right",
-        )
-        for index, color in enumerate(self._colors):
-            table.add_row(
-                str(index),
-                repr(color),
-                Text(" " * 16, style=Style(bgcolor=Color.from_rgb(*color))),
-            )
-        return table
-
-    # This is somewhat inefficient and needs caching
-    @lru_cache(maxsize=1024)
-    def match(self, color: Tuple[int, int, int]) -> int:
-        """Find a color from a palette that most closely matches a given color.
-
-        Args:
-            color (Tuple[int, int, int]): RGB components in range 0 > 255.
-
-        Returns:
-            int: Index of closes matching color.
-        """
-        red1, green1, blue1 = color
-        _sqrt = sqrt
-        get_color = self._colors.__getitem__
-
-        def get_color_distance(index: int) -> float:
-            """Get the distance to a color."""
-            red2, green2, blue2 = get_color(index)
-            red_mean = (red1 + red2) // 2
-            red = red1 - red2
-            green = green1 - green2
-            blue = blue1 - blue2
-            return _sqrt(
-                (((512 + red_mean) * red * red) >> 8)
-                + 4 * green * green
-                + (((767 - red_mean) * blue * blue) >> 8)
-            )
-
-        min_index = min(range(len(self._colors)), key=get_color_distance)
-        return min_index
-
-
-if __name__ == "__main__":  # pragma: no cover
-    import colorsys
-    from typing import Iterable
-    from rich.color import Color
-    from rich.console import Console, ConsoleOptions
-    from rich.segment import Segment
-    from rich.style import Style
-
-    class ColorBox:
-        def __rich_console__(
-            self, console: Console, options: ConsoleOptions
-        ) -> Iterable[Segment]:
-            height = console.size.height - 3
-            for y in range(0, height):
-                for x in range(options.max_width):
-                    h = x / options.max_width
-                    l = y / (height + 1)
-                    r1, g1, b1 = colorsys.hls_to_rgb(h, l, 1.0)
-                    r2, g2, b2 = colorsys.hls_to_rgb(h, l + (1 / height / 2), 1.0)
-                    bgcolor = Color.from_rgb(r1 * 255, g1 * 255, b1 * 255)
-                    color = Color.from_rgb(r2 * 255, g2 * 255, b2 * 255)
-                    yield Segment("▄", Style(color=color, bgcolor=bgcolor))
-                yield Segment.line()
-
-    console = Console()
-    console.print(ColorBox())
diff --git a/voxvera/vendor/rich/panel.py b/voxvera/vendor/rich/panel.py
deleted file mode 100644
index 07587e3..0000000
--- a/voxvera/vendor/rich/panel.py
+++ /dev/null
@@ -1,317 +0,0 @@
-from typing import TYPE_CHECKING, Optional
-
-from .align import AlignMethod
-from .box import ROUNDED, Box
-from .cells import cell_len
-from .jupyter import JupyterMixin
-from .measure import Measurement, measure_renderables
-from .padding import Padding, PaddingDimensions
-from .segment import Segment
-from .style import Style, StyleType
-from .text import Text, TextType
-
-if TYPE_CHECKING:
-    from .console import Console, ConsoleOptions, RenderableType, RenderResult
-
-
-class Panel(JupyterMixin):
-    """A console renderable that draws a border around its contents.
-
-    Example:
-        >>> console.print(Panel("Hello, World!"))
-
-    Args:
-        renderable (RenderableType): A console renderable object.
-        box (Box): A Box instance that defines the look of the border (see :ref:`appendix_box`. Defaults to box.ROUNDED.
-        title (Optional[TextType], optional): Optional title displayed in panel header. Defaults to None.
-        title_align (AlignMethod, optional): Alignment of title. Defaults to "center".
-        subtitle (Optional[TextType], optional): Optional subtitle displayed in panel footer. Defaults to None.
-        subtitle_align (AlignMethod, optional): Alignment of subtitle. Defaults to "center".
-        safe_box (bool, optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
-        expand (bool, optional): If True the panel will stretch to fill the console width, otherwise it will be sized to fit the contents. Defaults to True.
-        style (str, optional): The style of the panel (border and contents). Defaults to "none".
-        border_style (str, optional): The style of the border. Defaults to "none".
-        width (Optional[int], optional): Optional width of panel. Defaults to None to auto-detect.
-        height (Optional[int], optional): Optional height of panel. Defaults to None to auto-detect.
-        padding (Optional[PaddingDimensions]): Optional padding around renderable. Defaults to 0.
-        highlight (bool, optional): Enable automatic highlighting of panel title (if str). Defaults to False.
-    """
-
-    def __init__(
-        self,
-        renderable: "RenderableType",
-        box: Box = ROUNDED,
-        *,
-        title: Optional[TextType] = None,
-        title_align: AlignMethod = "center",
-        subtitle: Optional[TextType] = None,
-        subtitle_align: AlignMethod = "center",
-        safe_box: Optional[bool] = None,
-        expand: bool = True,
-        style: StyleType = "none",
-        border_style: StyleType = "none",
-        width: Optional[int] = None,
-        height: Optional[int] = None,
-        padding: PaddingDimensions = (0, 1),
-        highlight: bool = False,
-    ) -> None:
-        self.renderable = renderable
-        self.box = box
-        self.title = title
-        self.title_align: AlignMethod = title_align
-        self.subtitle = subtitle
-        self.subtitle_align = subtitle_align
-        self.safe_box = safe_box
-        self.expand = expand
-        self.style = style
-        self.border_style = border_style
-        self.width = width
-        self.height = height
-        self.padding = padding
-        self.highlight = highlight
-
-    @classmethod
-    def fit(
-        cls,
-        renderable: "RenderableType",
-        box: Box = ROUNDED,
-        *,
-        title: Optional[TextType] = None,
-        title_align: AlignMethod = "center",
-        subtitle: Optional[TextType] = None,
-        subtitle_align: AlignMethod = "center",
-        safe_box: Optional[bool] = None,
-        style: StyleType = "none",
-        border_style: StyleType = "none",
-        width: Optional[int] = None,
-        height: Optional[int] = None,
-        padding: PaddingDimensions = (0, 1),
-        highlight: bool = False,
-    ) -> "Panel":
-        """An alternative constructor that sets expand=False."""
-        return cls(
-            renderable,
-            box,
-            title=title,
-            title_align=title_align,
-            subtitle=subtitle,
-            subtitle_align=subtitle_align,
-            safe_box=safe_box,
-            style=style,
-            border_style=border_style,
-            width=width,
-            height=height,
-            padding=padding,
-            highlight=highlight,
-            expand=False,
-        )
-
-    @property
-    def _title(self) -> Optional[Text]:
-        if self.title:
-            title_text = (
-                Text.from_markup(self.title)
-                if isinstance(self.title, str)
-                else self.title.copy()
-            )
-            title_text.end = ""
-            title_text.plain = title_text.plain.replace("\n", " ")
-            title_text.no_wrap = True
-            title_text.expand_tabs()
-            title_text.pad(1)
-            return title_text
-        return None
-
-    @property
-    def _subtitle(self) -> Optional[Text]:
-        if self.subtitle:
-            subtitle_text = (
-                Text.from_markup(self.subtitle)
-                if isinstance(self.subtitle, str)
-                else self.subtitle.copy()
-            )
-            subtitle_text.end = ""
-            subtitle_text.plain = subtitle_text.plain.replace("\n", " ")
-            subtitle_text.no_wrap = True
-            subtitle_text.expand_tabs()
-            subtitle_text.pad(1)
-            return subtitle_text
-        return None
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        _padding = Padding.unpack(self.padding)
-        renderable = (
-            Padding(self.renderable, _padding) if any(_padding) else self.renderable
-        )
-        style = console.get_style(self.style)
-        border_style = style + console.get_style(self.border_style)
-        width = (
-            options.max_width
-            if self.width is None
-            else min(options.max_width, self.width)
-        )
-
-        safe_box: bool = console.safe_box if self.safe_box is None else self.safe_box
-        box = self.box.substitute(options, safe=safe_box)
-
-        def align_text(
-            text: Text, width: int, align: str, character: str, style: Style
-        ) -> Text:
-            """Gets new aligned text.
-
-            Args:
-                text (Text): Title or subtitle text.
-                width (int): Desired width.
-                align (str): Alignment.
-                character (str): Character for alignment.
-                style (Style): Border style
-
-            Returns:
-                Text: New text instance
-            """
-            text = text.copy()
-            text.truncate(width)
-            excess_space = width - cell_len(text.plain)
-            if text.style:
-                text.stylize(console.get_style(text.style))
-
-            if excess_space:
-                if align == "left":
-                    return Text.assemble(
-                        text,
-                        (character * excess_space, style),
-                        no_wrap=True,
-                        end="",
-                    )
-                elif align == "center":
-                    left = excess_space // 2
-                    return Text.assemble(
-                        (character * left, style),
-                        text,
-                        (character * (excess_space - left), style),
-                        no_wrap=True,
-                        end="",
-                    )
-                else:
-                    return Text.assemble(
-                        (character * excess_space, style),
-                        text,
-                        no_wrap=True,
-                        end="",
-                    )
-            return text
-
-        title_text = self._title
-        if title_text is not None:
-            title_text.stylize_before(border_style)
-
-        child_width = (
-            width - 2
-            if self.expand
-            else console.measure(
-                renderable, options=options.update_width(width - 2)
-            ).maximum
-        )
-        child_height = self.height or options.height or None
-        if child_height:
-            child_height -= 2
-        if title_text is not None:
-            child_width = min(
-                options.max_width - 2, max(child_width, title_text.cell_len + 2)
-            )
-
-        width = child_width + 2
-        child_options = options.update(
-            width=child_width, height=child_height, highlight=self.highlight
-        )
-        lines = console.render_lines(renderable, child_options, style=style)
-
-        line_start = Segment(box.mid_left, border_style)
-        line_end = Segment(f"{box.mid_right}", border_style)
-        new_line = Segment.line()
-        if title_text is None or width <= 4:
-            yield Segment(box.get_top([width - 2]), border_style)
-        else:
-            title_text = align_text(
-                title_text,
-                width - 4,
-                self.title_align,
-                box.top,
-                border_style,
-            )
-            yield Segment(box.top_left + box.top, border_style)
-            yield from console.render(title_text, child_options.update_width(width - 4))
-            yield Segment(box.top + box.top_right, border_style)
-
-        yield new_line
-        for line in lines:
-            yield line_start
-            yield from line
-            yield line_end
-            yield new_line
-
-        subtitle_text = self._subtitle
-        if subtitle_text is not None:
-            subtitle_text.stylize_before(border_style)
-
-        if subtitle_text is None or width <= 4:
-            yield Segment(box.get_bottom([width - 2]), border_style)
-        else:
-            subtitle_text = align_text(
-                subtitle_text,
-                width - 4,
-                self.subtitle_align,
-                box.bottom,
-                border_style,
-            )
-            yield Segment(box.bottom_left + box.bottom, border_style)
-            yield from console.render(
-                subtitle_text, child_options.update_width(width - 4)
-            )
-            yield Segment(box.bottom + box.bottom_right, border_style)
-
-        yield new_line
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "Measurement":
-        _title = self._title
-        _, right, _, left = Padding.unpack(self.padding)
-        padding = left + right
-        renderables = [self.renderable, _title] if _title else [self.renderable]
-
-        if self.width is None:
-            width = (
-                measure_renderables(
-                    console,
-                    options.update_width(options.max_width - padding - 2),
-                    renderables,
-                ).maximum
-                + padding
-                + 2
-            )
-        else:
-            width = self.width
-        return Measurement(width, width)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from .console import Console
-
-    c = Console()
-
-    from .box import DOUBLE, ROUNDED
-    from .padding import Padding
-
-    p = Panel(
-        "Hello, World!",
-        title="rich.Panel",
-        style="white on blue",
-        box=DOUBLE,
-        padding=1,
-    )
-
-    c.print()
-    c.print(p)
diff --git a/voxvera/vendor/rich/pretty.py b/voxvera/vendor/rich/pretty.py
deleted file mode 100644
index 00abeca..0000000
--- a/voxvera/vendor/rich/pretty.py
+++ /dev/null
@@ -1,1016 +0,0 @@
-import builtins
-import collections
-import dataclasses
-import inspect
-import os
-import reprlib
-import sys
-from array import array
-from collections import Counter, UserDict, UserList, defaultdict, deque
-from dataclasses import dataclass, fields, is_dataclass
-from inspect import isclass
-from itertools import islice
-from types import MappingProxyType
-from typing import (
-    TYPE_CHECKING,
-    Any,
-    Callable,
-    DefaultDict,
-    Deque,
-    Dict,
-    Iterable,
-    List,
-    Optional,
-    Sequence,
-    Set,
-    Tuple,
-    Union,
-)
-
-from rich.repr import RichReprResult
-
-try:
-    import attr as _attr_module
-
-    _has_attrs = hasattr(_attr_module, "ib")
-except ImportError:  # pragma: no cover
-    _has_attrs = False
-
-from . import get_console
-from ._loop import loop_last
-from ._pick import pick_bool
-from .abc import RichRenderable
-from .cells import cell_len
-from .highlighter import ReprHighlighter
-from .jupyter import JupyterMixin, JupyterRenderable
-from .measure import Measurement
-from .text import Text
-
-if TYPE_CHECKING:
-    from .console import (
-        Console,
-        ConsoleOptions,
-        HighlighterType,
-        JustifyMethod,
-        OverflowMethod,
-        RenderResult,
-    )
-
-
-def _is_attr_object(obj: Any) -> bool:
-    """Check if an object was created with attrs module."""
-    return _has_attrs and _attr_module.has(type(obj))
-
-
-def _get_attr_fields(obj: Any) -> Sequence["_attr_module.Attribute[Any]"]:
-    """Get fields for an attrs object."""
-    return _attr_module.fields(type(obj)) if _has_attrs else []
-
-
-def _is_dataclass_repr(obj: object) -> bool:
-    """Check if an instance of a dataclass contains the default repr.
-
-    Args:
-        obj (object): A dataclass instance.
-
-    Returns:
-        bool: True if the default repr is used, False if there is a custom repr.
-    """
-    # Digging in to a lot of internals here
-    # Catching all exceptions in case something is missing on a non CPython implementation
-    try:
-        return obj.__repr__.__code__.co_filename in (
-            dataclasses.__file__,
-            reprlib.__file__,
-        )
-    except Exception:  # pragma: no coverage
-        return False
-
-
-_dummy_namedtuple = collections.namedtuple("_dummy_namedtuple", [])
-
-
-def _has_default_namedtuple_repr(obj: object) -> bool:
-    """Check if an instance of namedtuple contains the default repr
-
-    Args:
-        obj (object): A namedtuple
-
-    Returns:
-        bool: True if the default repr is used, False if there's a custom repr.
-    """
-    obj_file = None
-    try:
-        obj_file = inspect.getfile(obj.__repr__)
-    except (OSError, TypeError):
-        # OSError handles case where object is defined in __main__ scope, e.g. REPL - no filename available.
-        # TypeError trapped defensively, in case of object without filename slips through.
-        pass
-    default_repr_file = inspect.getfile(_dummy_namedtuple.__repr__)
-    return obj_file == default_repr_file
-
-
-def _ipy_display_hook(
-    value: Any,
-    console: Optional["Console"] = None,
-    overflow: "OverflowMethod" = "ignore",
-    crop: bool = False,
-    indent_guides: bool = False,
-    max_length: Optional[int] = None,
-    max_string: Optional[int] = None,
-    max_depth: Optional[int] = None,
-    expand_all: bool = False,
-) -> Union[str, None]:
-    # needed here to prevent circular import:
-    from .console import ConsoleRenderable
-
-    # always skip rich generated jupyter renderables or None values
-    if _safe_isinstance(value, JupyterRenderable) or value is None:
-        return None
-
-    console = console or get_console()
-
-    with console.capture() as capture:
-        # certain renderables should start on a new line
-        if _safe_isinstance(value, ConsoleRenderable):
-            console.line()
-        console.print(
-            (
-                value
-                if _safe_isinstance(value, RichRenderable)
-                else Pretty(
-                    value,
-                    overflow=overflow,
-                    indent_guides=indent_guides,
-                    max_length=max_length,
-                    max_string=max_string,
-                    max_depth=max_depth,
-                    expand_all=expand_all,
-                    margin=12,
-                )
-            ),
-            crop=crop,
-            new_line_start=True,
-            end="",
-        )
-    # strip trailing newline, not usually part of a text repr
-    # I'm not sure if this should be prevented at a lower level
-    return capture.get().rstrip("\n")
-
-
-def _safe_isinstance(
-    obj: object, class_or_tuple: Union[type, Tuple[type, ...]]
-) -> bool:
-    """isinstance can fail in rare cases, for example types with no __class__"""
-    try:
-        return isinstance(obj, class_or_tuple)
-    except Exception:
-        return False
-
-
-def install(
-    console: Optional["Console"] = None,
-    overflow: "OverflowMethod" = "ignore",
-    crop: bool = False,
-    indent_guides: bool = False,
-    max_length: Optional[int] = None,
-    max_string: Optional[int] = None,
-    max_depth: Optional[int] = None,
-    expand_all: bool = False,
-) -> None:
-    """Install automatic pretty printing in the Python REPL.
-
-    Args:
-        console (Console, optional): Console instance or ``None`` to use global console. Defaults to None.
-        overflow (Optional[OverflowMethod], optional): Overflow method. Defaults to "ignore".
-        crop (Optional[bool], optional): Enable cropping of long lines. Defaults to False.
-        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
-        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to None.
-        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
-        max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
-        expand_all (bool, optional): Expand all containers. Defaults to False.
-        max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
-    """
-    from rich import get_console
-
-    console = console or get_console()
-    assert console is not None
-
-    def display_hook(value: Any) -> None:
-        """Replacement sys.displayhook which prettifies objects with Rich."""
-        if value is not None:
-            assert console is not None
-            builtins._ = None  # type: ignore[attr-defined]
-            console.print(
-                (
-                    value
-                    if _safe_isinstance(value, RichRenderable)
-                    else Pretty(
-                        value,
-                        overflow=overflow,
-                        indent_guides=indent_guides,
-                        max_length=max_length,
-                        max_string=max_string,
-                        max_depth=max_depth,
-                        expand_all=expand_all,
-                    )
-                ),
-                crop=crop,
-            )
-            builtins._ = value  # type: ignore[attr-defined]
-
-    try:
-        ip = get_ipython()  # type: ignore[name-defined]
-    except NameError:
-        sys.displayhook = display_hook
-    else:
-        from IPython.core.formatters import BaseFormatter
-
-        class RichFormatter(BaseFormatter):  # type: ignore[misc]
-            pprint: bool = True
-
-            def __call__(self, value: Any) -> Any:
-                if self.pprint:
-                    return _ipy_display_hook(
-                        value,
-                        console=console,
-                        overflow=overflow,
-                        indent_guides=indent_guides,
-                        max_length=max_length,
-                        max_string=max_string,
-                        max_depth=max_depth,
-                        expand_all=expand_all,
-                    )
-                else:
-                    return repr(value)
-
-        # replace plain text formatter with rich formatter
-        rich_formatter = RichFormatter()
-        ip.display_formatter.formatters["text/plain"] = rich_formatter
-
-
-class Pretty(JupyterMixin):
-    """A rich renderable that pretty prints an object.
-
-    Args:
-        _object (Any): An object to pretty print.
-        highlighter (HighlighterType, optional): Highlighter object to apply to result, or None for ReprHighlighter. Defaults to None.
-        indent_size (int, optional): Number of spaces in indent. Defaults to 4.
-        justify (JustifyMethod, optional): Justify method, or None for default. Defaults to None.
-        overflow (OverflowMethod, optional): Overflow method, or None for default. Defaults to None.
-        no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to False.
-        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
-        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to None.
-        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
-        max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
-        expand_all (bool, optional): Expand all containers. Defaults to False.
-        margin (int, optional): Subtrace a margin from width to force containers to expand earlier. Defaults to 0.
-        insert_line (bool, optional): Insert a new line if the output has multiple new lines. Defaults to False.
-    """
-
-    def __init__(
-        self,
-        _object: Any,
-        highlighter: Optional["HighlighterType"] = None,
-        *,
-        indent_size: int = 4,
-        justify: Optional["JustifyMethod"] = None,
-        overflow: Optional["OverflowMethod"] = None,
-        no_wrap: Optional[bool] = False,
-        indent_guides: bool = False,
-        max_length: Optional[int] = None,
-        max_string: Optional[int] = None,
-        max_depth: Optional[int] = None,
-        expand_all: bool = False,
-        margin: int = 0,
-        insert_line: bool = False,
-    ) -> None:
-        self._object = _object
-        self.highlighter = highlighter or ReprHighlighter()
-        self.indent_size = indent_size
-        self.justify: Optional["JustifyMethod"] = justify
-        self.overflow: Optional["OverflowMethod"] = overflow
-        self.no_wrap = no_wrap
-        self.indent_guides = indent_guides
-        self.max_length = max_length
-        self.max_string = max_string
-        self.max_depth = max_depth
-        self.expand_all = expand_all
-        self.margin = margin
-        self.insert_line = insert_line
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        pretty_str = pretty_repr(
-            self._object,
-            max_width=options.max_width - self.margin,
-            indent_size=self.indent_size,
-            max_length=self.max_length,
-            max_string=self.max_string,
-            max_depth=self.max_depth,
-            expand_all=self.expand_all,
-        )
-        pretty_text = Text.from_ansi(
-            pretty_str,
-            justify=self.justify or options.justify,
-            overflow=self.overflow or options.overflow,
-            no_wrap=pick_bool(self.no_wrap, options.no_wrap),
-            style="pretty",
-        )
-        pretty_text = (
-            self.highlighter(pretty_text)
-            if pretty_text
-            else Text(
-                f"{type(self._object)}.__repr__ returned empty string",
-                style="dim italic",
-            )
-        )
-        if self.indent_guides and not options.ascii_only:
-            pretty_text = pretty_text.with_indent_guides(
-                self.indent_size, style="repr.indent"
-            )
-        if self.insert_line and "\n" in pretty_text:
-            yield ""
-        yield pretty_text
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "Measurement":
-        pretty_str = pretty_repr(
-            self._object,
-            max_width=options.max_width,
-            indent_size=self.indent_size,
-            max_length=self.max_length,
-            max_string=self.max_string,
-            max_depth=self.max_depth,
-            expand_all=self.expand_all,
-        )
-        text_width = (
-            max(cell_len(line) for line in pretty_str.splitlines()) if pretty_str else 0
-        )
-        return Measurement(text_width, text_width)
-
-
-def _get_braces_for_defaultdict(_object: DefaultDict[Any, Any]) -> Tuple[str, str, str]:
-    return (
-        f"defaultdict({_object.default_factory!r}, {{",
-        "})",
-        f"defaultdict({_object.default_factory!r}, {{}})",
-    )
-
-
-def _get_braces_for_deque(_object: Deque[Any]) -> Tuple[str, str, str]:
-    if _object.maxlen is None:
-        return ("deque([", "])", "deque()")
-    return (
-        "deque([",
-        f"], maxlen={_object.maxlen})",
-        f"deque(maxlen={_object.maxlen})",
-    )
-
-
-def _get_braces_for_array(_object: "array[Any]") -> Tuple[str, str, str]:
-    return (f"array({_object.typecode!r}, [", "])", f"array({_object.typecode!r})")
-
-
-_BRACES: Dict[type, Callable[[Any], Tuple[str, str, str]]] = {
-    os._Environ: lambda _object: ("environ({", "})", "environ({})"),
-    array: _get_braces_for_array,
-    defaultdict: _get_braces_for_defaultdict,
-    Counter: lambda _object: ("Counter({", "})", "Counter()"),
-    deque: _get_braces_for_deque,
-    dict: lambda _object: ("{", "}", "{}"),
-    UserDict: lambda _object: ("{", "}", "{}"),
-    frozenset: lambda _object: ("frozenset({", "})", "frozenset()"),
-    list: lambda _object: ("[", "]", "[]"),
-    UserList: lambda _object: ("[", "]", "[]"),
-    set: lambda _object: ("{", "}", "set()"),
-    tuple: lambda _object: ("(", ")", "()"),
-    MappingProxyType: lambda _object: ("mappingproxy({", "})", "mappingproxy({})"),
-}
-_CONTAINERS = tuple(_BRACES.keys())
-_MAPPING_CONTAINERS = (dict, os._Environ, MappingProxyType, UserDict)
-
-
-def is_expandable(obj: Any) -> bool:
-    """Check if an object may be expanded by pretty print."""
-    return (
-        _safe_isinstance(obj, _CONTAINERS)
-        or (is_dataclass(obj))
-        or (hasattr(obj, "__rich_repr__"))
-        or _is_attr_object(obj)
-    ) and not isclass(obj)
-
-
-@dataclass
-class Node:
-    """A node in a repr tree. May be atomic or a container."""
-
-    key_repr: str = ""
-    value_repr: str = ""
-    open_brace: str = ""
-    close_brace: str = ""
-    empty: str = ""
-    last: bool = False
-    is_tuple: bool = False
-    is_namedtuple: bool = False
-    children: Optional[List["Node"]] = None
-    key_separator: str = ": "
-    separator: str = ", "
-
-    def iter_tokens(self) -> Iterable[str]:
-        """Generate tokens for this node."""
-        if self.key_repr:
-            yield self.key_repr
-            yield self.key_separator
-        if self.value_repr:
-            yield self.value_repr
-        elif self.children is not None:
-            if self.children:
-                yield self.open_brace
-                if self.is_tuple and not self.is_namedtuple and len(self.children) == 1:
-                    yield from self.children[0].iter_tokens()
-                    yield ","
-                else:
-                    for child in self.children:
-                        yield from child.iter_tokens()
-                        if not child.last:
-                            yield self.separator
-                yield self.close_brace
-            else:
-                yield self.empty
-
-    def check_length(self, start_length: int, max_length: int) -> bool:
-        """Check the length fits within a limit.
-
-        Args:
-            start_length (int): Starting length of the line (indent, prefix, suffix).
-            max_length (int): Maximum length.
-
-        Returns:
-            bool: True if the node can be rendered within max length, otherwise False.
-        """
-        total_length = start_length
-        for token in self.iter_tokens():
-            total_length += cell_len(token)
-            if total_length > max_length:
-                return False
-        return True
-
-    def __str__(self) -> str:
-        repr_text = "".join(self.iter_tokens())
-        return repr_text
-
-    def render(
-        self, max_width: int = 80, indent_size: int = 4, expand_all: bool = False
-    ) -> str:
-        """Render the node to a pretty repr.
-
-        Args:
-            max_width (int, optional): Maximum width of the repr. Defaults to 80.
-            indent_size (int, optional): Size of indents. Defaults to 4.
-            expand_all (bool, optional): Expand all levels. Defaults to False.
-
-        Returns:
-            str: A repr string of the original object.
-        """
-        lines = [_Line(node=self, is_root=True)]
-        line_no = 0
-        while line_no < len(lines):
-            line = lines[line_no]
-            if line.expandable and not line.expanded:
-                if expand_all or not line.check_length(max_width):
-                    lines[line_no : line_no + 1] = line.expand(indent_size)
-            line_no += 1
-
-        repr_str = "\n".join(str(line) for line in lines)
-        return repr_str
-
-
-@dataclass
-class _Line:
-    """A line in repr output."""
-
-    parent: Optional["_Line"] = None
-    is_root: bool = False
-    node: Optional[Node] = None
-    text: str = ""
-    suffix: str = ""
-    whitespace: str = ""
-    expanded: bool = False
-    last: bool = False
-
-    @property
-    def expandable(self) -> bool:
-        """Check if the line may be expanded."""
-        return bool(self.node is not None and self.node.children)
-
-    def check_length(self, max_length: int) -> bool:
-        """Check this line fits within a given number of cells."""
-        start_length = (
-            len(self.whitespace) + cell_len(self.text) + cell_len(self.suffix)
-        )
-        assert self.node is not None
-        return self.node.check_length(start_length, max_length)
-
-    def expand(self, indent_size: int) -> Iterable["_Line"]:
-        """Expand this line by adding children on their own line."""
-        node = self.node
-        assert node is not None
-        whitespace = self.whitespace
-        assert node.children
-        if node.key_repr:
-            new_line = yield _Line(
-                text=f"{node.key_repr}{node.key_separator}{node.open_brace}",
-                whitespace=whitespace,
-            )
-        else:
-            new_line = yield _Line(text=node.open_brace, whitespace=whitespace)
-        child_whitespace = self.whitespace + " " * indent_size
-        tuple_of_one = node.is_tuple and len(node.children) == 1
-        for last, child in loop_last(node.children):
-            separator = "," if tuple_of_one else node.separator
-            line = _Line(
-                parent=new_line,
-                node=child,
-                whitespace=child_whitespace,
-                suffix=separator,
-                last=last and not tuple_of_one,
-            )
-            yield line
-
-        yield _Line(
-            text=node.close_brace,
-            whitespace=whitespace,
-            suffix=self.suffix,
-            last=self.last,
-        )
-
-    def __str__(self) -> str:
-        if self.last:
-            return f"{self.whitespace}{self.text}{self.node or ''}"
-        else:
-            return (
-                f"{self.whitespace}{self.text}{self.node or ''}{self.suffix.rstrip()}"
-            )
-
-
-def _is_namedtuple(obj: Any) -> bool:
-    """Checks if an object is most likely a namedtuple. It is possible
-    to craft an object that passes this check and isn't a namedtuple, but
-    there is only a minuscule chance of this happening unintentionally.
-
-    Args:
-        obj (Any): The object to test
-
-    Returns:
-        bool: True if the object is a namedtuple. False otherwise.
-    """
-    try:
-        fields = getattr(obj, "_fields", None)
-    except Exception:
-        # Being very defensive - if we cannot get the attr then its not a namedtuple
-        return False
-    return isinstance(obj, tuple) and isinstance(fields, tuple)
-
-
-def traverse(
-    _object: Any,
-    max_length: Optional[int] = None,
-    max_string: Optional[int] = None,
-    max_depth: Optional[int] = None,
-) -> Node:
-    """Traverse object and generate a tree.
-
-    Args:
-        _object (Any): Object to be traversed.
-        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to None.
-        max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
-            Defaults to None.
-        max_depth (int, optional): Maximum depth of data structures, or None for no maximum.
-            Defaults to None.
-
-    Returns:
-        Node: The root of a tree structure which can be used to render a pretty repr.
-    """
-
-    def to_repr(obj: Any) -> str:
-        """Get repr string for an object, but catch errors."""
-        if (
-            max_string is not None
-            and _safe_isinstance(obj, (bytes, str))
-            and len(obj) > max_string
-        ):
-            truncated = len(obj) - max_string
-            obj_repr = f"{obj[:max_string]!r}+{truncated}"
-        else:
-            try:
-                obj_repr = repr(obj)
-            except Exception as error:
-                obj_repr = f""
-        return obj_repr
-
-    visited_ids: Set[int] = set()
-    push_visited = visited_ids.add
-    pop_visited = visited_ids.remove
-
-    def _traverse(obj: Any, root: bool = False, depth: int = 0) -> Node:
-        """Walk the object depth first."""
-
-        obj_id = id(obj)
-        if obj_id in visited_ids:
-            # Recursion detected
-            return Node(value_repr="...")
-
-        obj_type = type(obj)
-        children: List[Node]
-        reached_max_depth = max_depth is not None and depth >= max_depth
-
-        def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
-            for arg in rich_args:
-                if _safe_isinstance(arg, tuple):
-                    if len(arg) == 3:
-                        key, child, default = arg
-                        if default == child:
-                            continue
-                        yield key, child
-                    elif len(arg) == 2:
-                        key, child = arg
-                        yield key, child
-                    elif len(arg) == 1:
-                        yield arg[0]
-                else:
-                    yield arg
-
-        try:
-            fake_attributes = hasattr(
-                obj, "awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492"
-            )
-        except Exception:
-            fake_attributes = False
-
-        rich_repr_result: Optional[RichReprResult] = None
-        if not fake_attributes:
-            try:
-                if hasattr(obj, "__rich_repr__") and not isclass(obj):
-                    rich_repr_result = obj.__rich_repr__()
-            except Exception:
-                pass
-
-        if rich_repr_result is not None:
-            push_visited(obj_id)
-            angular = getattr(obj.__rich_repr__, "angular", False)
-            args = list(iter_rich_args(rich_repr_result))
-            class_name = obj.__class__.__name__
-
-            if args:
-                children = []
-                append = children.append
-
-                if reached_max_depth:
-                    if angular:
-                        node = Node(value_repr=f"<{class_name}...>")
-                    else:
-                        node = Node(value_repr=f"{class_name}(...)")
-                else:
-                    if angular:
-                        node = Node(
-                            open_brace=f"<{class_name} ",
-                            close_brace=">",
-                            children=children,
-                            last=root,
-                            separator=" ",
-                        )
-                    else:
-                        node = Node(
-                            open_brace=f"{class_name}(",
-                            close_brace=")",
-                            children=children,
-                            last=root,
-                        )
-                    for last, arg in loop_last(args):
-                        if _safe_isinstance(arg, tuple):
-                            key, child = arg
-                            child_node = _traverse(child, depth=depth + 1)
-                            child_node.last = last
-                            child_node.key_repr = key
-                            child_node.key_separator = "="
-                            append(child_node)
-                        else:
-                            child_node = _traverse(arg, depth=depth + 1)
-                            child_node.last = last
-                            append(child_node)
-            else:
-                node = Node(
-                    value_repr=f"<{class_name}>" if angular else f"{class_name}()",
-                    children=[],
-                    last=root,
-                )
-            pop_visited(obj_id)
-        elif _is_attr_object(obj) and not fake_attributes:
-            push_visited(obj_id)
-            children = []
-            append = children.append
-
-            attr_fields = _get_attr_fields(obj)
-            if attr_fields:
-                if reached_max_depth:
-                    node = Node(value_repr=f"{obj.__class__.__name__}(...)")
-                else:
-                    node = Node(
-                        open_brace=f"{obj.__class__.__name__}(",
-                        close_brace=")",
-                        children=children,
-                        last=root,
-                    )
-
-                    def iter_attrs() -> (
-                        Iterable[Tuple[str, Any, Optional[Callable[[Any], str]]]]
-                    ):
-                        """Iterate over attr fields and values."""
-                        for attr in attr_fields:
-                            if attr.repr:
-                                try:
-                                    value = getattr(obj, attr.name)
-                                except Exception as error:
-                                    # Can happen, albeit rarely
-                                    yield (attr.name, error, None)
-                                else:
-                                    yield (
-                                        attr.name,
-                                        value,
-                                        attr.repr if callable(attr.repr) else None,
-                                    )
-
-                    for last, (name, value, repr_callable) in loop_last(iter_attrs()):
-                        if repr_callable:
-                            child_node = Node(value_repr=str(repr_callable(value)))
-                        else:
-                            child_node = _traverse(value, depth=depth + 1)
-                        child_node.last = last
-                        child_node.key_repr = name
-                        child_node.key_separator = "="
-                        append(child_node)
-            else:
-                node = Node(
-                    value_repr=f"{obj.__class__.__name__}()", children=[], last=root
-                )
-            pop_visited(obj_id)
-        elif (
-            is_dataclass(obj)
-            and not _safe_isinstance(obj, type)
-            and not fake_attributes
-            and _is_dataclass_repr(obj)
-        ):
-            push_visited(obj_id)
-            children = []
-            append = children.append
-            if reached_max_depth:
-                node = Node(value_repr=f"{obj.__class__.__name__}(...)")
-            else:
-                node = Node(
-                    open_brace=f"{obj.__class__.__name__}(",
-                    close_brace=")",
-                    children=children,
-                    last=root,
-                    empty=f"{obj.__class__.__name__}()",
-                )
-
-                for last, field in loop_last(
-                    field
-                    for field in fields(obj)
-                    if field.repr and hasattr(obj, field.name)
-                ):
-                    child_node = _traverse(getattr(obj, field.name), depth=depth + 1)
-                    child_node.key_repr = field.name
-                    child_node.last = last
-                    child_node.key_separator = "="
-                    append(child_node)
-
-            pop_visited(obj_id)
-        elif _is_namedtuple(obj) and _has_default_namedtuple_repr(obj):
-            push_visited(obj_id)
-            class_name = obj.__class__.__name__
-            if reached_max_depth:
-                # If we've reached the max depth, we still show the class name, but not its contents
-                node = Node(
-                    value_repr=f"{class_name}(...)",
-                )
-            else:
-                children = []
-                append = children.append
-                node = Node(
-                    open_brace=f"{class_name}(",
-                    close_brace=")",
-                    children=children,
-                    empty=f"{class_name}()",
-                )
-                for last, (key, value) in loop_last(obj._asdict().items()):
-                    child_node = _traverse(value, depth=depth + 1)
-                    child_node.key_repr = key
-                    child_node.last = last
-                    child_node.key_separator = "="
-                    append(child_node)
-            pop_visited(obj_id)
-        elif _safe_isinstance(obj, _CONTAINERS):
-            for container_type in _CONTAINERS:
-                if _safe_isinstance(obj, container_type):
-                    obj_type = container_type
-                    break
-
-            push_visited(obj_id)
-
-            open_brace, close_brace, empty = _BRACES[obj_type](obj)
-
-            if reached_max_depth:
-                node = Node(value_repr=f"{open_brace}...{close_brace}")
-            elif obj_type.__repr__ != type(obj).__repr__:
-                node = Node(value_repr=to_repr(obj), last=root)
-            elif obj:
-                children = []
-                node = Node(
-                    open_brace=open_brace,
-                    close_brace=close_brace,
-                    children=children,
-                    last=root,
-                )
-                append = children.append
-                num_items = len(obj)
-                last_item_index = num_items - 1
-
-                if _safe_isinstance(obj, _MAPPING_CONTAINERS):
-                    iter_items = iter(obj.items())
-                    if max_length is not None:
-                        iter_items = islice(iter_items, max_length)
-                    for index, (key, child) in enumerate(iter_items):
-                        child_node = _traverse(child, depth=depth + 1)
-                        child_node.key_repr = to_repr(key)
-                        child_node.last = index == last_item_index
-                        append(child_node)
-                else:
-                    iter_values = iter(obj)
-                    if max_length is not None:
-                        iter_values = islice(iter_values, max_length)
-                    for index, child in enumerate(iter_values):
-                        child_node = _traverse(child, depth=depth + 1)
-                        child_node.last = index == last_item_index
-                        append(child_node)
-                if max_length is not None and num_items > max_length:
-                    append(Node(value_repr=f"... +{num_items - max_length}", last=True))
-            else:
-                node = Node(empty=empty, children=[], last=root)
-
-            pop_visited(obj_id)
-        else:
-            node = Node(value_repr=to_repr(obj), last=root)
-        node.is_tuple = type(obj) == tuple
-        node.is_namedtuple = _is_namedtuple(obj)
-        return node
-
-    node = _traverse(_object, root=True)
-    return node
-
-
-def pretty_repr(
-    _object: Any,
-    *,
-    max_width: int = 80,
-    indent_size: int = 4,
-    max_length: Optional[int] = None,
-    max_string: Optional[int] = None,
-    max_depth: Optional[int] = None,
-    expand_all: bool = False,
-) -> str:
-    """Prettify repr string by expanding on to new lines to fit within a given width.
-
-    Args:
-        _object (Any): Object to repr.
-        max_width (int, optional): Desired maximum width of repr string. Defaults to 80.
-        indent_size (int, optional): Number of spaces to indent. Defaults to 4.
-        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to None.
-        max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
-            Defaults to None.
-        max_depth (int, optional): Maximum depth of nested data structure, or None for no depth.
-            Defaults to None.
-        expand_all (bool, optional): Expand all containers regardless of available width. Defaults to False.
-
-    Returns:
-        str: A possibly multi-line representation of the object.
-    """
-
-    if _safe_isinstance(_object, Node):
-        node = _object
-    else:
-        node = traverse(
-            _object, max_length=max_length, max_string=max_string, max_depth=max_depth
-        )
-    repr_str: str = node.render(
-        max_width=max_width, indent_size=indent_size, expand_all=expand_all
-    )
-    return repr_str
-
-
-def pprint(
-    _object: Any,
-    *,
-    console: Optional["Console"] = None,
-    indent_guides: bool = True,
-    max_length: Optional[int] = None,
-    max_string: Optional[int] = None,
-    max_depth: Optional[int] = None,
-    expand_all: bool = False,
-) -> None:
-    """A convenience function for pretty printing.
-
-    Args:
-        _object (Any): Object to pretty print.
-        console (Console, optional): Console instance, or None to use default. Defaults to None.
-        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to None.
-        max_string (int, optional): Maximum length of strings before truncating, or None to disable. Defaults to None.
-        max_depth (int, optional): Maximum depth for nested data structures, or None for unlimited depth. Defaults to None.
-        indent_guides (bool, optional): Enable indentation guides. Defaults to True.
-        expand_all (bool, optional): Expand all containers. Defaults to False.
-    """
-    _console = get_console() if console is None else console
-    _console.print(
-        Pretty(
-            _object,
-            max_length=max_length,
-            max_string=max_string,
-            max_depth=max_depth,
-            indent_guides=indent_guides,
-            expand_all=expand_all,
-            overflow="ignore",
-        ),
-        soft_wrap=True,
-    )
-
-
-if __name__ == "__main__":  # pragma: no cover
-
-    class BrokenRepr:
-        def __repr__(self) -> str:
-            1 / 0
-            return "this will fail"
-
-    from typing import NamedTuple
-
-    class StockKeepingUnit(NamedTuple):
-        name: str
-        description: str
-        price: float
-        category: str
-        reviews: List[str]
-
-    d = defaultdict(int)
-    d["foo"] = 5
-    data = {
-        "foo": [
-            1,
-            "Hello World!",
-            100.123,
-            323.232,
-            432324.0,
-            {5, 6, 7, (1, 2, 3, 4), 8},
-        ],
-        "bar": frozenset({1, 2, 3}),
-        "defaultdict": defaultdict(
-            list, {"crumble": ["apple", "rhubarb", "butter", "sugar", "flour"]}
-        ),
-        "counter": Counter(
-            [
-                "apple",
-                "orange",
-                "pear",
-                "kumquat",
-                "kumquat",
-                "durian" * 100,
-            ]
-        ),
-        "atomic": (False, True, None),
-        "namedtuple": StockKeepingUnit(
-            "Sparkling British Spring Water",
-            "Carbonated spring water",
-            0.9,
-            "water",
-            ["its amazing!", "its terrible!"],
-        ),
-        "Broken": BrokenRepr(),
-    }
-    data["foo"].append(data)  # type: ignore[attr-defined]
-
-    from rich import print
-
-    print(Pretty(data, indent_guides=True, max_string=20))
-
-    class Thing:
-        def __repr__(self) -> str:
-            return "Hello\x1b[38;5;239m World!"
-
-    print(Pretty(Thing()))
diff --git a/voxvera/vendor/rich/progress.py b/voxvera/vendor/rich/progress.py
deleted file mode 100644
index c2de125..0000000
--- a/voxvera/vendor/rich/progress.py
+++ /dev/null
@@ -1,1716 +0,0 @@
-from __future__ import annotations
-
-import io
-import typing
-import warnings
-from abc import ABC, abstractmethod
-from collections import deque
-from dataclasses import dataclass, field
-from datetime import timedelta
-from io import RawIOBase, UnsupportedOperation
-from math import ceil
-from mmap import mmap
-from operator import length_hint
-from os import PathLike, stat
-from threading import Event, RLock, Thread
-from types import TracebackType
-from typing import (
-    TYPE_CHECKING,
-    Any,
-    BinaryIO,
-    Callable,
-    ContextManager,
-    Deque,
-    Dict,
-    Generic,
-    Iterable,
-    List,
-    Literal,
-    NamedTuple,
-    NewType,
-    Optional,
-    TextIO,
-    Tuple,
-    Type,
-    TypeVar,
-    Union,
-)
-
-if TYPE_CHECKING:
-    # Can be replaced with `from typing import Self` in Python 3.11+
-    from typing_extensions import Self  # pragma: no cover
-
-from . import filesize, get_console
-from .console import Console, Group, JustifyMethod, RenderableType
-from .highlighter import Highlighter
-from .jupyter import JupyterMixin
-from .live import Live
-from .progress_bar import ProgressBar
-from .spinner import Spinner
-from .style import StyleType
-from .table import Column, Table
-from .text import Text, TextType
-
-TaskID = NewType("TaskID", int)
-
-ProgressType = TypeVar("ProgressType")
-
-GetTimeCallable = Callable[[], float]
-
-
-_I = typing.TypeVar("_I", TextIO, BinaryIO)
-
-
-class _TrackThread(Thread):
-    """A thread to periodically update progress."""
-
-    def __init__(self, progress: "Progress", task_id: "TaskID", update_period: float):
-        self.progress = progress
-        self.task_id = task_id
-        self.update_period = update_period
-        self.done = Event()
-
-        self.completed = 0
-        super().__init__(daemon=True)
-
-    def run(self) -> None:
-        task_id = self.task_id
-        advance = self.progress.advance
-        update_period = self.update_period
-        last_completed = 0
-        wait = self.done.wait
-        while not wait(update_period) and self.progress.live.is_started:
-            completed = self.completed
-            if last_completed != completed:
-                advance(task_id, completed - last_completed)
-                last_completed = completed
-
-        self.progress.update(self.task_id, completed=self.completed, refresh=True)
-
-    def __enter__(self) -> "_TrackThread":
-        self.start()
-        return self
-
-    def __exit__(
-        self,
-        exc_type: Optional[Type[BaseException]],
-        exc_val: Optional[BaseException],
-        exc_tb: Optional[TracebackType],
-    ) -> None:
-        self.done.set()
-        self.join()
-
-
-def track(
-    sequence: Iterable[ProgressType],
-    description: str = "Working...",
-    total: Optional[float] = None,
-    completed: int = 0,
-    auto_refresh: bool = True,
-    console: Optional[Console] = None,
-    transient: bool = False,
-    get_time: Optional[Callable[[], float]] = None,
-    refresh_per_second: float = 10,
-    style: StyleType = "bar.back",
-    complete_style: StyleType = "bar.complete",
-    finished_style: StyleType = "bar.finished",
-    pulse_style: StyleType = "bar.pulse",
-    update_period: float = 0.1,
-    disable: bool = False,
-    show_speed: bool = True,
-) -> Iterable[ProgressType]:
-    """Track progress by iterating over a sequence.
-
-    You can also track progress of an iterable, which might require that you additionally specify ``total``.
-
-    Args:
-        sequence (Iterable[ProgressType]): Values you wish to iterate over and track progress.
-        description (str, optional): Description of task show next to progress bar. Defaults to "Working".
-        total: (float, optional): Total number of steps. Default is len(sequence).
-        completed (int, optional): Number of steps completed so far. Defaults to 0.
-        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
-        transient: (bool, optional): Clear the progress on exit. Defaults to False.
-        console (Console, optional): Console to write to. Default creates internal Console instance.
-        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
-        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
-        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
-        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
-        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
-        update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.
-        disable (bool, optional): Disable display of progress.
-        show_speed (bool, optional): Show speed if total isn't known. Defaults to True.
-    Returns:
-        Iterable[ProgressType]: An iterable of the values in the sequence.
-
-    """
-
-    columns: List["ProgressColumn"] = (
-        [TextColumn("[progress.description]{task.description}")] if description else []
-    )
-    columns.extend(
-        (
-            BarColumn(
-                style=style,
-                complete_style=complete_style,
-                finished_style=finished_style,
-                pulse_style=pulse_style,
-            ),
-            TaskProgressColumn(show_speed=show_speed),
-            TimeRemainingColumn(elapsed_when_finished=True),
-        )
-    )
-    progress = Progress(
-        *columns,
-        auto_refresh=auto_refresh,
-        console=console,
-        transient=transient,
-        get_time=get_time,
-        refresh_per_second=refresh_per_second or 10,
-        disable=disable,
-    )
-
-    with progress:
-        yield from progress.track(
-            sequence,
-            total=total,
-            completed=completed,
-            description=description,
-            update_period=update_period,
-        )
-
-
-class _Reader(RawIOBase, BinaryIO):
-    """A reader that tracks progress while it's being read from."""
-
-    def __init__(
-        self,
-        handle: BinaryIO,
-        progress: "Progress",
-        task: TaskID,
-        close_handle: bool = True,
-    ) -> None:
-        self.handle = handle
-        self.progress = progress
-        self.task = task
-        self.close_handle = close_handle
-        self._closed = False
-
-    def __enter__(self) -> "_Reader":
-        self.handle.__enter__()
-        return self
-
-    def __exit__(
-        self,
-        exc_type: Optional[Type[BaseException]],
-        exc_val: Optional[BaseException],
-        exc_tb: Optional[TracebackType],
-    ) -> None:
-        self.close()
-
-    def __iter__(self) -> BinaryIO:
-        return self
-
-    def __next__(self) -> bytes:
-        line = next(self.handle)
-        self.progress.advance(self.task, advance=len(line))
-        return line
-
-    @property
-    def closed(self) -> bool:
-        return self._closed
-
-    def fileno(self) -> int:
-        return self.handle.fileno()
-
-    def isatty(self) -> bool:
-        return self.handle.isatty()
-
-    @property
-    def mode(self) -> str:
-        return self.handle.mode
-
-    @property
-    def name(self) -> str:
-        return self.handle.name
-
-    def readable(self) -> bool:
-        return self.handle.readable()
-
-    def seekable(self) -> bool:
-        return self.handle.seekable()
-
-    def writable(self) -> bool:
-        return False
-
-    def read(self, size: int = -1) -> bytes:
-        block = self.handle.read(size)
-        self.progress.advance(self.task, advance=len(block))
-        return block
-
-    def readinto(self, b: Union[bytearray, memoryview, mmap]):  # type: ignore[no-untyped-def, override]
-        n = self.handle.readinto(b)  # type: ignore[attr-defined]
-        self.progress.advance(self.task, advance=n)
-        return n
-
-    def readline(self, size: int = -1) -> bytes:  # type: ignore[override]
-        line = self.handle.readline(size)
-        self.progress.advance(self.task, advance=len(line))
-        return line
-
-    def readlines(self, hint: int = -1) -> List[bytes]:
-        lines = self.handle.readlines(hint)
-        self.progress.advance(self.task, advance=sum(map(len, lines)))
-        return lines
-
-    def close(self) -> None:
-        if self.close_handle:
-            self.handle.close()
-        self._closed = True
-
-    def seek(self, offset: int, whence: int = 0) -> int:
-        pos = self.handle.seek(offset, whence)
-        self.progress.update(self.task, completed=pos)
-        return pos
-
-    def tell(self) -> int:
-        return self.handle.tell()
-
-    def write(self, s: Any) -> int:
-        raise UnsupportedOperation("write")
-
-    def writelines(self, lines: Iterable[Any]) -> None:
-        raise UnsupportedOperation("writelines")
-
-
-class _ReadContext(ContextManager[_I], Generic[_I]):
-    """A utility class to handle a context for both a reader and a progress."""
-
-    def __init__(self, progress: "Progress", reader: _I) -> None:
-        self.progress = progress
-        self.reader: _I = reader
-
-    def __enter__(self) -> _I:
-        self.progress.start()
-        return self.reader.__enter__()
-
-    def __exit__(
-        self,
-        exc_type: Optional[Type[BaseException]],
-        exc_val: Optional[BaseException],
-        exc_tb: Optional[TracebackType],
-    ) -> None:
-        self.progress.stop()
-        self.reader.__exit__(exc_type, exc_val, exc_tb)
-
-
-def wrap_file(
-    file: BinaryIO,
-    total: int,
-    *,
-    description: str = "Reading...",
-    auto_refresh: bool = True,
-    console: Optional[Console] = None,
-    transient: bool = False,
-    get_time: Optional[Callable[[], float]] = None,
-    refresh_per_second: float = 10,
-    style: StyleType = "bar.back",
-    complete_style: StyleType = "bar.complete",
-    finished_style: StyleType = "bar.finished",
-    pulse_style: StyleType = "bar.pulse",
-    disable: bool = False,
-) -> ContextManager[BinaryIO]:
-    """Read bytes from a file while tracking progress.
-
-    Args:
-        file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
-        total (int): Total number of bytes to read.
-        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
-        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
-        transient: (bool, optional): Clear the progress on exit. Defaults to False.
-        console (Console, optional): Console to write to. Default creates internal Console instance.
-        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
-        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
-        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
-        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
-        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
-        disable (bool, optional): Disable display of progress.
-    Returns:
-        ContextManager[BinaryIO]: A context manager yielding a progress reader.
-
-    """
-
-    columns: List["ProgressColumn"] = (
-        [TextColumn("[progress.description]{task.description}")] if description else []
-    )
-    columns.extend(
-        (
-            BarColumn(
-                style=style,
-                complete_style=complete_style,
-                finished_style=finished_style,
-                pulse_style=pulse_style,
-            ),
-            DownloadColumn(),
-            TimeRemainingColumn(),
-        )
-    )
-    progress = Progress(
-        *columns,
-        auto_refresh=auto_refresh,
-        console=console,
-        transient=transient,
-        get_time=get_time,
-        refresh_per_second=refresh_per_second or 10,
-        disable=disable,
-    )
-
-    reader = progress.wrap_file(file, total=total, description=description)
-    return _ReadContext(progress, reader)
-
-
-@typing.overload
-def open(
-    file: Union[str, "PathLike[str]", bytes],
-    mode: Union[Literal["rt"], Literal["r"]],
-    buffering: int = -1,
-    encoding: Optional[str] = None,
-    errors: Optional[str] = None,
-    newline: Optional[str] = None,
-    *,
-    total: Optional[int] = None,
-    description: str = "Reading...",
-    auto_refresh: bool = True,
-    console: Optional[Console] = None,
-    transient: bool = False,
-    get_time: Optional[Callable[[], float]] = None,
-    refresh_per_second: float = 10,
-    style: StyleType = "bar.back",
-    complete_style: StyleType = "bar.complete",
-    finished_style: StyleType = "bar.finished",
-    pulse_style: StyleType = "bar.pulse",
-    disable: bool = False,
-) -> ContextManager[TextIO]:
-    pass
-
-
-@typing.overload
-def open(
-    file: Union[str, "PathLike[str]", bytes],
-    mode: Literal["rb"],
-    buffering: int = -1,
-    encoding: Optional[str] = None,
-    errors: Optional[str] = None,
-    newline: Optional[str] = None,
-    *,
-    total: Optional[int] = None,
-    description: str = "Reading...",
-    auto_refresh: bool = True,
-    console: Optional[Console] = None,
-    transient: bool = False,
-    get_time: Optional[Callable[[], float]] = None,
-    refresh_per_second: float = 10,
-    style: StyleType = "bar.back",
-    complete_style: StyleType = "bar.complete",
-    finished_style: StyleType = "bar.finished",
-    pulse_style: StyleType = "bar.pulse",
-    disable: bool = False,
-) -> ContextManager[BinaryIO]:
-    pass
-
-
-def open(
-    file: Union[str, "PathLike[str]", bytes],
-    mode: Union[Literal["rb"], Literal["rt"], Literal["r"]] = "r",
-    buffering: int = -1,
-    encoding: Optional[str] = None,
-    errors: Optional[str] = None,
-    newline: Optional[str] = None,
-    *,
-    total: Optional[int] = None,
-    description: str = "Reading...",
-    auto_refresh: bool = True,
-    console: Optional[Console] = None,
-    transient: bool = False,
-    get_time: Optional[Callable[[], float]] = None,
-    refresh_per_second: float = 10,
-    style: StyleType = "bar.back",
-    complete_style: StyleType = "bar.complete",
-    finished_style: StyleType = "bar.finished",
-    pulse_style: StyleType = "bar.pulse",
-    disable: bool = False,
-) -> Union[ContextManager[BinaryIO], ContextManager[TextIO]]:
-    """Read bytes from a file while tracking progress.
-
-    Args:
-        path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
-        mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
-        buffering (int): The buffering strategy to use, see :func:`io.open`.
-        encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
-        errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
-        newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`
-        total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size.
-        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
-        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
-        transient: (bool, optional): Clear the progress on exit. Defaults to False.
-        console (Console, optional): Console to write to. Default creates internal Console instance.
-        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
-        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
-        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
-        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
-        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
-        disable (bool, optional): Disable display of progress.
-        encoding (str, optional): The encoding to use when reading in text mode.
-
-    Returns:
-        ContextManager[BinaryIO]: A context manager yielding a progress reader.
-
-    """
-
-    columns: List["ProgressColumn"] = (
-        [TextColumn("[progress.description]{task.description}")] if description else []
-    )
-    columns.extend(
-        (
-            BarColumn(
-                style=style,
-                complete_style=complete_style,
-                finished_style=finished_style,
-                pulse_style=pulse_style,
-            ),
-            DownloadColumn(),
-            TimeRemainingColumn(),
-        )
-    )
-    progress = Progress(
-        *columns,
-        auto_refresh=auto_refresh,
-        console=console,
-        transient=transient,
-        get_time=get_time,
-        refresh_per_second=refresh_per_second or 10,
-        disable=disable,
-    )
-
-    reader = progress.open(
-        file,
-        mode=mode,
-        buffering=buffering,
-        encoding=encoding,
-        errors=errors,
-        newline=newline,
-        total=total,
-        description=description,
-    )
-    return _ReadContext(progress, reader)  # type: ignore[return-value, type-var]
-
-
-class ProgressColumn(ABC):
-    """Base class for a widget to use in progress display."""
-
-    max_refresh: Optional[float] = None
-
-    def __init__(self, table_column: Optional[Column] = None) -> None:
-        self._table_column = table_column
-        self._renderable_cache: Dict[TaskID, Tuple[float, RenderableType]] = {}
-        self._update_time: Optional[float] = None
-
-    def get_table_column(self) -> Column:
-        """Get a table column, used to build tasks table."""
-        return self._table_column or Column()
-
-    def __call__(self, task: "Task") -> RenderableType:
-        """Called by the Progress object to return a renderable for the given task.
-
-        Args:
-            task (Task): An object containing information regarding the task.
-
-        Returns:
-            RenderableType: Anything renderable (including str).
-        """
-        current_time = task.get_time()
-        if self.max_refresh is not None and not task.completed:
-            try:
-                timestamp, renderable = self._renderable_cache[task.id]
-            except KeyError:
-                pass
-            else:
-                if timestamp + self.max_refresh > current_time:
-                    return renderable
-
-        renderable = self.render(task)
-        self._renderable_cache[task.id] = (current_time, renderable)
-        return renderable
-
-    @abstractmethod
-    def render(self, task: "Task") -> RenderableType:
-        """Should return a renderable object."""
-
-
-class RenderableColumn(ProgressColumn):
-    """A column to insert an arbitrary column.
-
-    Args:
-        renderable (RenderableType, optional): Any renderable. Defaults to empty string.
-    """
-
-    def __init__(
-        self, renderable: RenderableType = "", *, table_column: Optional[Column] = None
-    ):
-        self.renderable = renderable
-        super().__init__(table_column=table_column)
-
-    def render(self, task: "Task") -> RenderableType:
-        return self.renderable
-
-
-class SpinnerColumn(ProgressColumn):
-    """A column with a 'spinner' animation.
-
-    Args:
-        spinner_name (str, optional): Name of spinner animation. Defaults to "dots".
-        style (StyleType, optional): Style of spinner. Defaults to "progress.spinner".
-        speed (float, optional): Speed factor of spinner. Defaults to 1.0.
-        finished_text (TextType, optional): Text used when task is finished. Defaults to " ".
-    """
-
-    def __init__(
-        self,
-        spinner_name: str = "dots",
-        style: Optional[StyleType] = "progress.spinner",
-        speed: float = 1.0,
-        finished_text: TextType = " ",
-        table_column: Optional[Column] = None,
-    ):
-        self.spinner = Spinner(spinner_name, style=style, speed=speed)
-        self.finished_text = (
-            Text.from_markup(finished_text)
-            if isinstance(finished_text, str)
-            else finished_text
-        )
-        super().__init__(table_column=table_column)
-
-    def set_spinner(
-        self,
-        spinner_name: str,
-        spinner_style: Optional[StyleType] = "progress.spinner",
-        speed: float = 1.0,
-    ) -> None:
-        """Set a new spinner.
-
-        Args:
-            spinner_name (str): Spinner name, see python -m rich.spinner.
-            spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner".
-            speed (float, optional): Speed factor of spinner. Defaults to 1.0.
-        """
-        self.spinner = Spinner(spinner_name, style=spinner_style, speed=speed)
-
-    def render(self, task: "Task") -> RenderableType:
-        text = (
-            self.finished_text
-            if task.finished
-            else self.spinner.render(task.get_time())
-        )
-        return text
-
-
-class TextColumn(ProgressColumn):
-    """A column containing text."""
-
-    def __init__(
-        self,
-        text_format: str,
-        style: StyleType = "none",
-        justify: JustifyMethod = "left",
-        markup: bool = True,
-        highlighter: Optional[Highlighter] = None,
-        table_column: Optional[Column] = None,
-    ) -> None:
-        self.text_format = text_format
-        self.justify: JustifyMethod = justify
-        self.style = style
-        self.markup = markup
-        self.highlighter = highlighter
-        super().__init__(table_column=table_column or Column(no_wrap=True))
-
-    def render(self, task: "Task") -> Text:
-        _text = self.text_format.format(task=task)
-        if self.markup:
-            text = Text.from_markup(_text, style=self.style, justify=self.justify)
-        else:
-            text = Text(_text, style=self.style, justify=self.justify)
-        if self.highlighter:
-            self.highlighter.highlight(text)
-        return text
-
-
-class BarColumn(ProgressColumn):
-    """Renders a visual progress bar.
-
-    Args:
-        bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40.
-        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
-        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
-        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
-        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
-    """
-
-    def __init__(
-        self,
-        bar_width: Optional[int] = 40,
-        style: StyleType = "bar.back",
-        complete_style: StyleType = "bar.complete",
-        finished_style: StyleType = "bar.finished",
-        pulse_style: StyleType = "bar.pulse",
-        table_column: Optional[Column] = None,
-    ) -> None:
-        self.bar_width = bar_width
-        self.style = style
-        self.complete_style = complete_style
-        self.finished_style = finished_style
-        self.pulse_style = pulse_style
-        super().__init__(table_column=table_column)
-
-    def render(self, task: "Task") -> ProgressBar:
-        """Gets a progress bar widget for a task."""
-        return ProgressBar(
-            total=max(0, task.total) if task.total is not None else None,
-            completed=max(0, task.completed),
-            width=None if self.bar_width is None else max(1, self.bar_width),
-            pulse=not task.started,
-            animation_time=task.get_time(),
-            style=self.style,
-            complete_style=self.complete_style,
-            finished_style=self.finished_style,
-            pulse_style=self.pulse_style,
-        )
-
-
-class TimeElapsedColumn(ProgressColumn):
-    """Renders time elapsed."""
-
-    def render(self, task: "Task") -> Text:
-        """Show time elapsed."""
-        elapsed = task.finished_time if task.finished else task.elapsed
-        if elapsed is None:
-            return Text("-:--:--", style="progress.elapsed")
-        delta = timedelta(seconds=max(0, int(elapsed)))
-        return Text(str(delta), style="progress.elapsed")
-
-
-class TaskProgressColumn(TextColumn):
-    """Show task progress as a percentage.
-
-    Args:
-        text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%".
-        text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "".
-        style (StyleType, optional): Style of output. Defaults to "none".
-        justify (JustifyMethod, optional): Text justification. Defaults to "left".
-        markup (bool, optional): Enable markup. Defaults to True.
-        highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None.
-        table_column (Optional[Column], optional): Table Column to use. Defaults to None.
-        show_speed (bool, optional): Show speed if total is unknown. Defaults to False.
-    """
-
-    def __init__(
-        self,
-        text_format: str = "[progress.percentage]{task.percentage:>3.0f}%",
-        text_format_no_percentage: str = "",
-        style: StyleType = "none",
-        justify: JustifyMethod = "left",
-        markup: bool = True,
-        highlighter: Optional[Highlighter] = None,
-        table_column: Optional[Column] = None,
-        show_speed: bool = False,
-    ) -> None:
-        self.text_format_no_percentage = text_format_no_percentage
-        self.show_speed = show_speed
-        super().__init__(
-            text_format=text_format,
-            style=style,
-            justify=justify,
-            markup=markup,
-            highlighter=highlighter,
-            table_column=table_column,
-        )
-
-    @classmethod
-    def render_speed(cls, speed: Optional[float]) -> Text:
-        """Render the speed in iterations per second.
-
-        Args:
-            task (Task): A Task object.
-
-        Returns:
-            Text: Text object containing the task speed.
-        """
-        if speed is None:
-            return Text("", style="progress.percentage")
-        unit, suffix = filesize.pick_unit_and_suffix(
-            int(speed),
-            ["", "×10³", "×10⁶", "×10⁹", "×10¹²"],
-            1000,
-        )
-        data_speed = speed / unit
-        return Text(f"{data_speed:.1f}{suffix} it/s", style="progress.percentage")
-
-    def render(self, task: "Task") -> Text:
-        if task.total is None and self.show_speed:
-            return self.render_speed(task.finished_speed or task.speed)
-        text_format = (
-            self.text_format_no_percentage if task.total is None else self.text_format
-        )
-        _text = text_format.format(task=task)
-        if self.markup:
-            text = Text.from_markup(_text, style=self.style, justify=self.justify)
-        else:
-            text = Text(_text, style=self.style, justify=self.justify)
-        if self.highlighter:
-            self.highlighter.highlight(text)
-        return text
-
-
-class TimeRemainingColumn(ProgressColumn):
-    """Renders estimated time remaining.
-
-    Args:
-        compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False.
-        elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False.
-    """
-
-    # Only refresh twice a second to prevent jitter
-    max_refresh = 0.5
-
-    def __init__(
-        self,
-        compact: bool = False,
-        elapsed_when_finished: bool = False,
-        table_column: Optional[Column] = None,
-    ):
-        self.compact = compact
-        self.elapsed_when_finished = elapsed_when_finished
-        super().__init__(table_column=table_column)
-
-    def render(self, task: "Task") -> Text:
-        """Show time remaining."""
-        if self.elapsed_when_finished and task.finished:
-            task_time = task.finished_time
-            style = "progress.elapsed"
-        else:
-            task_time = task.time_remaining
-            style = "progress.remaining"
-
-        if task.total is None:
-            return Text("", style=style)
-
-        if task_time is None:
-            return Text("--:--" if self.compact else "-:--:--", style=style)
-
-        # Based on https://github.com/tqdm/tqdm/blob/master/tqdm/std.py
-        minutes, seconds = divmod(int(task_time), 60)
-        hours, minutes = divmod(minutes, 60)
-
-        if self.compact and not hours:
-            formatted = f"{minutes:02d}:{seconds:02d}"
-        else:
-            formatted = f"{hours:d}:{minutes:02d}:{seconds:02d}"
-
-        return Text(formatted, style=style)
-
-
-class FileSizeColumn(ProgressColumn):
-    """Renders completed filesize."""
-
-    def render(self, task: "Task") -> Text:
-        """Show data completed."""
-        data_size = filesize.decimal(int(task.completed))
-        return Text(data_size, style="progress.filesize")
-
-
-class TotalFileSizeColumn(ProgressColumn):
-    """Renders total filesize."""
-
-    def render(self, task: "Task") -> Text:
-        """Show data completed."""
-        data_size = filesize.decimal(int(task.total)) if task.total is not None else ""
-        return Text(data_size, style="progress.filesize.total")
-
-
-class MofNCompleteColumn(ProgressColumn):
-    """Renders completed count/total, e.g. '  10/1000'.
-
-    Best for bounded tasks with int quantities.
-
-    Space pads the completed count so that progress length does not change as task progresses
-    past powers of 10.
-
-    Args:
-        separator (str, optional): Text to separate completed and total values. Defaults to "/".
-    """
-
-    def __init__(self, separator: str = "/", table_column: Optional[Column] = None):
-        self.separator = separator
-        super().__init__(table_column=table_column)
-
-    def render(self, task: "Task") -> Text:
-        """Show completed/total."""
-        completed = int(task.completed)
-        total = int(task.total) if task.total is not None else "?"
-        total_width = len(str(total))
-        return Text(
-            f"{completed:{total_width}d}{self.separator}{total}",
-            style="progress.download",
-        )
-
-
-class DownloadColumn(ProgressColumn):
-    """Renders file size downloaded and total, e.g. '0.5/2.3 GB'.
-
-    Args:
-        binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False.
-    """
-
-    def __init__(
-        self, binary_units: bool = False, table_column: Optional[Column] = None
-    ) -> None:
-        self.binary_units = binary_units
-        super().__init__(table_column=table_column)
-
-    def render(self, task: "Task") -> Text:
-        """Calculate common unit for completed and total."""
-        completed = int(task.completed)
-
-        unit_and_suffix_calculation_base = (
-            int(task.total) if task.total is not None else completed
-        )
-        if self.binary_units:
-            unit, suffix = filesize.pick_unit_and_suffix(
-                unit_and_suffix_calculation_base,
-                ["bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"],
-                1024,
-            )
-        else:
-            unit, suffix = filesize.pick_unit_and_suffix(
-                unit_and_suffix_calculation_base,
-                ["bytes", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
-                1000,
-            )
-        precision = 0 if unit == 1 else 1
-
-        completed_ratio = completed / unit
-        completed_str = f"{completed_ratio:,.{precision}f}"
-
-        if task.total is not None:
-            total = int(task.total)
-            total_ratio = total / unit
-            total_str = f"{total_ratio:,.{precision}f}"
-        else:
-            total_str = "?"
-
-        download_status = f"{completed_str}/{total_str} {suffix}"
-        download_text = Text(download_status, style="progress.download")
-        return download_text
-
-
-class TransferSpeedColumn(ProgressColumn):
-    """Renders human readable transfer speed."""
-
-    def render(self, task: "Task") -> Text:
-        """Show data transfer speed."""
-        speed = task.finished_speed or task.speed
-        if speed is None:
-            return Text("?", style="progress.data.speed")
-        data_speed = filesize.decimal(int(speed))
-        return Text(f"{data_speed}/s", style="progress.data.speed")
-
-
-class ProgressSample(NamedTuple):
-    """Sample of progress for a given time."""
-
-    timestamp: float
-    """Timestamp of sample."""
-    completed: float
-    """Number of steps completed."""
-
-
-@dataclass
-class Task:
-    """Information regarding a progress task.
-
-    This object should be considered read-only outside of the :class:`~Progress` class.
-
-    """
-
-    id: TaskID
-    """Task ID associated with this task (used in Progress methods)."""
-
-    description: str
-    """str: Description of the task."""
-
-    total: Optional[float]
-    """Optional[float]: Total number of steps in this task."""
-
-    completed: float
-    """float: Number of steps completed"""
-
-    _get_time: GetTimeCallable
-    """Callable to get the current time."""
-
-    finished_time: Optional[float] = None
-    """float: Time task was finished."""
-
-    visible: bool = True
-    """bool: Indicates if this task is visible in the progress display."""
-
-    fields: Dict[str, Any] = field(default_factory=dict)
-    """dict: Arbitrary fields passed in via Progress.update."""
-
-    start_time: Optional[float] = field(default=None, init=False, repr=False)
-    """Optional[float]: Time this task was started, or None if not started."""
-
-    stop_time: Optional[float] = field(default=None, init=False, repr=False)
-    """Optional[float]: Time this task was stopped, or None if not stopped."""
-
-    finished_speed: Optional[float] = None
-    """Optional[float]: The last speed for a finished task."""
-
-    _progress: Deque[ProgressSample] = field(
-        default_factory=lambda: deque(maxlen=1000), init=False, repr=False
-    )
-
-    _lock: RLock = field(repr=False, default_factory=RLock)
-    """Thread lock."""
-
-    def get_time(self) -> float:
-        """float: Get the current time, in seconds."""
-        return self._get_time()
-
-    @property
-    def started(self) -> bool:
-        """bool: Check if the task as started."""
-        return self.start_time is not None
-
-    @property
-    def remaining(self) -> Optional[float]:
-        """Optional[float]: Get the number of steps remaining, if a non-None total was set."""
-        if self.total is None:
-            return None
-        return self.total - self.completed
-
-    @property
-    def elapsed(self) -> Optional[float]:
-        """Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started."""
-        if self.start_time is None:
-            return None
-        if self.stop_time is not None:
-            return self.stop_time - self.start_time
-        return self.get_time() - self.start_time
-
-    @property
-    def finished(self) -> bool:
-        """Check if the task has finished."""
-        return self.finished_time is not None
-
-    @property
-    def percentage(self) -> float:
-        """float: Get progress of task as a percentage. If a None total was set, returns 0"""
-        if not self.total:
-            return 0.0
-        completed = (self.completed / self.total) * 100.0
-        completed = min(100.0, max(0.0, completed))
-        return completed
-
-    @property
-    def speed(self) -> Optional[float]:
-        """Optional[float]: Get the estimated speed in steps per second."""
-        if self.start_time is None:
-            return None
-        with self._lock:
-            progress = self._progress
-            if not progress:
-                return None
-            total_time = progress[-1].timestamp - progress[0].timestamp
-            if total_time == 0:
-                return None
-            iter_progress = iter(progress)
-            next(iter_progress)
-            total_completed = sum(sample.completed for sample in iter_progress)
-            speed = total_completed / total_time
-            return speed
-
-    @property
-    def time_remaining(self) -> Optional[float]:
-        """Optional[float]: Get estimated time to completion, or ``None`` if no data."""
-        if self.finished:
-            return 0.0
-        speed = self.speed
-        if not speed:
-            return None
-        remaining = self.remaining
-        if remaining is None:
-            return None
-        estimate = ceil(remaining / speed)
-        return estimate
-
-    def _reset(self) -> None:
-        """Reset progress."""
-        self._progress.clear()
-        self.finished_time = None
-        self.finished_speed = None
-
-
-class Progress(JupyterMixin):
-    """Renders an auto-updating progress bar(s).
-
-    Args:
-        console (Console, optional): Optional Console instance. Defaults to an internal Console instance writing to stdout.
-        auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`.
-        refresh_per_second (float, optional): Number of times per second to refresh the progress information. Defaults to 10.
-        speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.
-        transient: (bool, optional): Clear the progress on exit. Defaults to False.
-        redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
-        redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True.
-        get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None.
-        disable (bool, optional): Disable progress display. Defaults to False
-        expand (bool, optional): Expand tasks table to fit width. Defaults to False.
-    """
-
-    def __init__(
-        self,
-        *columns: Union[str, ProgressColumn],
-        console: Optional[Console] = None,
-        auto_refresh: bool = True,
-        refresh_per_second: float = 10,
-        speed_estimate_period: float = 30.0,
-        transient: bool = False,
-        redirect_stdout: bool = True,
-        redirect_stderr: bool = True,
-        get_time: Optional[GetTimeCallable] = None,
-        disable: bool = False,
-        expand: bool = False,
-    ) -> None:
-        assert refresh_per_second > 0, "refresh_per_second must be > 0"
-        self._lock = RLock()
-        self.columns = columns or self.get_default_columns()
-        self.speed_estimate_period = speed_estimate_period
-
-        self.disable = disable
-        self.expand = expand
-        self._tasks: Dict[TaskID, Task] = {}
-        self._task_index: TaskID = TaskID(0)
-        self.live = Live(
-            console=console or get_console(),
-            auto_refresh=auto_refresh,
-            refresh_per_second=refresh_per_second,
-            transient=transient,
-            redirect_stdout=redirect_stdout,
-            redirect_stderr=redirect_stderr,
-            get_renderable=self.get_renderable,
-        )
-        self.get_time = get_time or self.console.get_time
-        self.print = self.console.print
-        self.log = self.console.log
-
-    @classmethod
-    def get_default_columns(cls) -> Tuple[ProgressColumn, ...]:
-        """Get the default columns used for a new Progress instance:
-           - a text column for the description (TextColumn)
-           - the bar itself (BarColumn)
-           - a text column showing completion percentage (TextColumn)
-           - an estimated-time-remaining column (TimeRemainingColumn)
-        If the Progress instance is created without passing a columns argument,
-        the default columns defined here will be used.
-
-        You can also create a Progress instance using custom columns before
-        and/or after the defaults, as in this example:
-
-            progress = Progress(
-                SpinnerColumn(),
-                *Progress.get_default_columns(),
-                "Elapsed:",
-                TimeElapsedColumn(),
-            )
-
-        This code shows the creation of a Progress display, containing
-        a spinner to the left, the default columns, and a labeled elapsed
-        time column.
-        """
-        return (
-            TextColumn("[progress.description]{task.description}"),
-            BarColumn(),
-            TaskProgressColumn(),
-            TimeRemainingColumn(),
-        )
-
-    @property
-    def console(self) -> Console:
-        return self.live.console
-
-    @property
-    def tasks(self) -> List[Task]:
-        """Get a list of Task instances."""
-        with self._lock:
-            return list(self._tasks.values())
-
-    @property
-    def task_ids(self) -> List[TaskID]:
-        """A list of task IDs."""
-        with self._lock:
-            return list(self._tasks.keys())
-
-    @property
-    def finished(self) -> bool:
-        """Check if all tasks have been completed."""
-        with self._lock:
-            if not self._tasks:
-                return True
-            return all(task.finished for task in self._tasks.values())
-
-    def start(self) -> None:
-        """Start the progress display."""
-        if not self.disable:
-            self.live.start(refresh=True)
-
-    def stop(self) -> None:
-        """Stop the progress display."""
-        if not self.disable:
-            self.live.stop()
-            if not self.console.is_interactive and not self.console.is_jupyter:
-                self.console.print()
-
-    def __enter__(self) -> Self:
-        self.start()
-        return self
-
-    def __exit__(
-        self,
-        exc_type: Optional[Type[BaseException]],
-        exc_val: Optional[BaseException],
-        exc_tb: Optional[TracebackType],
-    ) -> None:
-        self.stop()
-
-    def track(
-        self,
-        sequence: Iterable[ProgressType],
-        total: Optional[float] = None,
-        completed: int = 0,
-        task_id: Optional[TaskID] = None,
-        description: str = "Working...",
-        update_period: float = 0.1,
-    ) -> Iterable[ProgressType]:
-        """Track progress by iterating over a sequence.
-
-        You can also track progress of an iterable, which might require that you additionally specify ``total``.
-
-        Args:
-            sequence (Iterable[ProgressType]): Values you want to iterate over and track progress.
-            total: (float, optional): Total number of steps. Default is len(sequence).
-            completed (int, optional): Number of steps completed so far. Defaults to 0.
-            task_id: (TaskID): Task to track. Default is new task.
-            description: (str, optional): Description of task, if new task is created.
-            update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.
-
-        Returns:
-            Iterable[ProgressType]: An iterable of values taken from the provided sequence.
-        """
-        if total is None:
-            total = float(length_hint(sequence)) or None
-
-        if task_id is None:
-            task_id = self.add_task(description, total=total, completed=completed)
-        else:
-            self.update(task_id, total=total, completed=completed)
-
-        if self.live.auto_refresh:
-            with _TrackThread(self, task_id, update_period) as track_thread:
-                for value in sequence:
-                    yield value
-                    track_thread.completed += 1
-        else:
-            advance = self.advance
-            refresh = self.refresh
-            for value in sequence:
-                yield value
-                advance(task_id, 1)
-                refresh()
-
-    def wrap_file(
-        self,
-        file: BinaryIO,
-        total: Optional[int] = None,
-        *,
-        task_id: Optional[TaskID] = None,
-        description: str = "Reading...",
-    ) -> BinaryIO:
-        """Track progress file reading from a binary file.
-
-        Args:
-            file (BinaryIO): A file-like object opened in binary mode.
-            total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given.
-            task_id (TaskID): Task to track. Default is new task.
-            description (str, optional): Description of task, if new task is created.
-
-        Returns:
-            BinaryIO: A readable file-like object in binary mode.
-
-        Raises:
-            ValueError: When no total value can be extracted from the arguments or the task.
-        """
-        # attempt to recover the total from the task
-        total_bytes: Optional[float] = None
-        if total is not None:
-            total_bytes = total
-        elif task_id is not None:
-            with self._lock:
-                total_bytes = self._tasks[task_id].total
-        if total_bytes is None:
-            raise ValueError(
-                f"unable to get the total number of bytes, please specify 'total'"
-            )
-
-        # update total of task or create new task
-        if task_id is None:
-            task_id = self.add_task(description, total=total_bytes)
-        else:
-            self.update(task_id, total=total_bytes)
-
-        return _Reader(file, self, task_id, close_handle=False)
-
-    @typing.overload
-    def open(
-        self,
-        file: Union[str, "PathLike[str]", bytes],
-        mode: Literal["rb"],
-        buffering: int = -1,
-        encoding: Optional[str] = None,
-        errors: Optional[str] = None,
-        newline: Optional[str] = None,
-        *,
-        total: Optional[int] = None,
-        task_id: Optional[TaskID] = None,
-        description: str = "Reading...",
-    ) -> BinaryIO:
-        pass
-
-    @typing.overload
-    def open(
-        self,
-        file: Union[str, "PathLike[str]", bytes],
-        mode: Union[Literal["r"], Literal["rt"]],
-        buffering: int = -1,
-        encoding: Optional[str] = None,
-        errors: Optional[str] = None,
-        newline: Optional[str] = None,
-        *,
-        total: Optional[int] = None,
-        task_id: Optional[TaskID] = None,
-        description: str = "Reading...",
-    ) -> TextIO:
-        pass
-
-    def open(
-        self,
-        file: Union[str, "PathLike[str]", bytes],
-        mode: Union[Literal["rb"], Literal["rt"], Literal["r"]] = "r",
-        buffering: int = -1,
-        encoding: Optional[str] = None,
-        errors: Optional[str] = None,
-        newline: Optional[str] = None,
-        *,
-        total: Optional[int] = None,
-        task_id: Optional[TaskID] = None,
-        description: str = "Reading...",
-    ) -> Union[BinaryIO, TextIO]:
-        """Track progress while reading from a binary file.
-
-        Args:
-            path (Union[str, PathLike[str]]): The path to the file to read.
-            mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
-            buffering (int): The buffering strategy to use, see :func:`io.open`.
-            encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
-            errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
-            newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`.
-            total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used.
-            task_id (TaskID): Task to track. Default is new task.
-            description (str, optional): Description of task, if new task is created.
-
-        Returns:
-            BinaryIO: A readable file-like object in binary mode.
-
-        Raises:
-            ValueError: When an invalid mode is given.
-        """
-        # normalize the mode (always rb, rt)
-        _mode = "".join(sorted(mode, reverse=False))
-        if _mode not in ("br", "rt", "r"):
-            raise ValueError(f"invalid mode {mode!r}")
-
-        # patch buffering to provide the same behaviour as the builtin `open`
-        line_buffering = buffering == 1
-        if _mode == "br" and buffering == 1:
-            warnings.warn(
-                "line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used",
-                RuntimeWarning,
-            )
-            buffering = -1
-        elif _mode in ("rt", "r"):
-            if buffering == 0:
-                raise ValueError("can't have unbuffered text I/O")
-            elif buffering == 1:
-                buffering = -1
-
-        # attempt to get the total with `os.stat`
-        if total is None:
-            total = stat(file).st_size
-
-        # update total of task or create new task
-        if task_id is None:
-            task_id = self.add_task(description, total=total)
-        else:
-            self.update(task_id, total=total)
-
-        # open the file in binary mode,
-        handle = io.open(file, "rb", buffering=buffering)
-        reader = _Reader(handle, self, task_id, close_handle=True)
-
-        # wrap the reader in a `TextIOWrapper` if text mode
-        if mode in ("r", "rt"):
-            return io.TextIOWrapper(
-                reader,
-                encoding=encoding,
-                errors=errors,
-                newline=newline,
-                line_buffering=line_buffering,
-            )
-
-        return reader
-
-    def start_task(self, task_id: TaskID) -> None:
-        """Start a task.
-
-        Starts a task (used when calculating elapsed time). You may need to call this manually,
-        if you called ``add_task`` with ``start=False``.
-
-        Args:
-            task_id (TaskID): ID of task.
-        """
-        with self._lock:
-            task = self._tasks[task_id]
-            if task.start_time is None:
-                task.start_time = self.get_time()
-
-    def stop_task(self, task_id: TaskID) -> None:
-        """Stop a task.
-
-        This will freeze the elapsed time on the task.
-
-        Args:
-            task_id (TaskID): ID of task.
-        """
-        with self._lock:
-            task = self._tasks[task_id]
-            current_time = self.get_time()
-            if task.start_time is None:
-                task.start_time = current_time
-            task.stop_time = current_time
-
-    def update(
-        self,
-        task_id: TaskID,
-        *,
-        total: Optional[float] = None,
-        completed: Optional[float] = None,
-        advance: Optional[float] = None,
-        description: Optional[str] = None,
-        visible: Optional[bool] = None,
-        refresh: bool = False,
-        **fields: Any,
-    ) -> None:
-        """Update information associated with a task.
-
-        Args:
-            task_id (TaskID): Task id (returned by add_task).
-            total (float, optional): Updates task.total if not None.
-            completed (float, optional): Updates task.completed if not None.
-            advance (float, optional): Add a value to task.completed if not None.
-            description (str, optional): Change task description if not None.
-            visible (bool, optional): Set visible flag if not None.
-            refresh (bool): Force a refresh of progress information. Default is False.
-            **fields (Any): Additional data fields required for rendering.
-        """
-        with self._lock:
-            task = self._tasks[task_id]
-            completed_start = task.completed
-
-            if total is not None and total != task.total:
-                task.total = total
-                task._reset()
-            if advance is not None:
-                task.completed += advance
-            if completed is not None:
-                task.completed = completed
-            if description is not None:
-                task.description = description
-            if visible is not None:
-                task.visible = visible
-            task.fields.update(fields)
-            update_completed = task.completed - completed_start
-
-            current_time = self.get_time()
-            old_sample_time = current_time - self.speed_estimate_period
-            _progress = task._progress
-
-            popleft = _progress.popleft
-            while _progress and _progress[0].timestamp < old_sample_time:
-                popleft()
-            if update_completed > 0:
-                _progress.append(ProgressSample(current_time, update_completed))
-            if (
-                task.total is not None
-                and task.completed >= task.total
-                and task.finished_time is None
-            ):
-                task.finished_time = task.elapsed
-
-        if refresh:
-            self.refresh()
-
-    def reset(
-        self,
-        task_id: TaskID,
-        *,
-        start: bool = True,
-        total: Optional[float] = None,
-        completed: int = 0,
-        visible: Optional[bool] = None,
-        description: Optional[str] = None,
-        **fields: Any,
-    ) -> None:
-        """Reset a task so completed is 0 and the clock is reset.
-
-        Args:
-            task_id (TaskID): ID of task.
-            start (bool, optional): Start the task after reset. Defaults to True.
-            total (float, optional): New total steps in task, or None to use current total. Defaults to None.
-            completed (int, optional): Number of steps completed. Defaults to 0.
-            visible (bool, optional): Set visible flag if not None.
-            description (str, optional): Change task description if not None. Defaults to None.
-            **fields (str): Additional data fields required for rendering.
-        """
-        current_time = self.get_time()
-        with self._lock:
-            task = self._tasks[task_id]
-            task._reset()
-            task.start_time = current_time if start else None
-            if total is not None:
-                task.total = total
-            task.completed = completed
-            if visible is not None:
-                task.visible = visible
-            if fields:
-                task.fields = fields
-            if description is not None:
-                task.description = description
-            task.finished_time = None
-        self.refresh()
-
-    def advance(self, task_id: TaskID, advance: float = 1) -> None:
-        """Advance task by a number of steps.
-
-        Args:
-            task_id (TaskID): ID of task.
-            advance (float): Number of steps to advance. Default is 1.
-        """
-        current_time = self.get_time()
-        with self._lock:
-            task = self._tasks[task_id]
-            completed_start = task.completed
-            task.completed += advance
-            update_completed = task.completed - completed_start
-            old_sample_time = current_time - self.speed_estimate_period
-            _progress = task._progress
-
-            popleft = _progress.popleft
-            while _progress and _progress[0].timestamp < old_sample_time:
-                popleft()
-            while len(_progress) > 1000:
-                popleft()
-            _progress.append(ProgressSample(current_time, update_completed))
-            if (
-                task.total is not None
-                and task.completed >= task.total
-                and task.finished_time is None
-            ):
-                task.finished_time = task.elapsed
-                task.finished_speed = task.speed
-
-    def refresh(self) -> None:
-        """Refresh (render) the progress information."""
-        if not self.disable and self.live.is_started:
-            self.live.refresh()
-
-    def get_renderable(self) -> RenderableType:
-        """Get a renderable for the progress display."""
-        renderable = Group(*self.get_renderables())
-        return renderable
-
-    def get_renderables(self) -> Iterable[RenderableType]:
-        """Get a number of renderables for the progress display."""
-        table = self.make_tasks_table(self.tasks)
-        yield table
-
-    def make_tasks_table(self, tasks: Iterable[Task]) -> Table:
-        """Get a table to render the Progress display.
-
-        Args:
-            tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.
-
-        Returns:
-            Table: A table instance.
-        """
-        table_columns = (
-            (
-                Column(no_wrap=True)
-                if isinstance(_column, str)
-                else _column.get_table_column().copy()
-            )
-            for _column in self.columns
-        )
-        table = Table.grid(*table_columns, padding=(0, 1), expand=self.expand)
-
-        for task in tasks:
-            if task.visible:
-                table.add_row(
-                    *(
-                        (
-                            column.format(task=task)
-                            if isinstance(column, str)
-                            else column(task)
-                        )
-                        for column in self.columns
-                    )
-                )
-        return table
-
-    def __rich__(self) -> RenderableType:
-        """Makes the Progress class itself renderable."""
-        with self._lock:
-            return self.get_renderable()
-
-    def add_task(
-        self,
-        description: str,
-        start: bool = True,
-        total: Optional[float] = 100.0,
-        completed: int = 0,
-        visible: bool = True,
-        **fields: Any,
-    ) -> TaskID:
-        """Add a new 'task' to the Progress display.
-
-        Args:
-            description (str): A description of the task.
-            start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False,
-                you will need to call `start` manually. Defaults to True.
-            total (float, optional): Number of total steps in the progress if known.
-                Set to None to render a pulsing animation. Defaults to 100.
-            completed (int, optional): Number of steps completed so far. Defaults to 0.
-            visible (bool, optional): Enable display of the task. Defaults to True.
-            **fields (str): Additional data fields required for rendering.
-
-        Returns:
-            TaskID: An ID you can use when calling `update`.
-        """
-        with self._lock:
-            task = Task(
-                self._task_index,
-                description,
-                total,
-                completed,
-                visible=visible,
-                fields=fields,
-                _get_time=self.get_time,
-                _lock=self._lock,
-            )
-            self._tasks[self._task_index] = task
-            if start:
-                self.start_task(self._task_index)
-            new_task_index = self._task_index
-            self._task_index = TaskID(int(self._task_index) + 1)
-        self.refresh()
-        return new_task_index
-
-    def remove_task(self, task_id: TaskID) -> None:
-        """Delete a task if it exists.
-
-        Args:
-            task_id (TaskID): A task ID.
-
-        """
-        with self._lock:
-            del self._tasks[task_id]
-
-
-if __name__ == "__main__":  # pragma: no coverage
-    import random
-    import time
-
-    from .panel import Panel
-    from .rule import Rule
-    from .syntax import Syntax
-    from .table import Table
-
-    syntax = Syntax(
-        '''def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
-    """Iterate and generate a tuple with a flag for last value."""
-    iter_values = iter(values)
-    try:
-        previous_value = next(iter_values)
-    except StopIteration:
-        return
-    for value in iter_values:
-        yield False, previous_value
-        previous_value = value
-    yield True, previous_value''',
-        "python",
-        line_numbers=True,
-    )
-
-    table = Table("foo", "bar", "baz")
-    table.add_row("1", "2", "3")
-
-    progress_renderables = [
-        "Text may be printed while the progress bars are rendering.",
-        Panel("In fact, [i]any[/i] renderable will work"),
-        "Such as [magenta]tables[/]...",
-        table,
-        "Pretty printed structures...",
-        {"type": "example", "text": "Pretty printed"},
-        "Syntax...",
-        syntax,
-        Rule("Give it a try!"),
-    ]
-
-    from itertools import cycle
-
-    examples = cycle(progress_renderables)
-
-    console = Console(record=True)
-
-    with Progress(
-        SpinnerColumn(),
-        *Progress.get_default_columns(),
-        TimeElapsedColumn(),
-        console=console,
-        transient=False,
-    ) as progress:
-        task1 = progress.add_task("[red]Downloading", total=1000)
-        task2 = progress.add_task("[green]Processing", total=1000)
-        task3 = progress.add_task("[yellow]Thinking", total=None)
-
-        while not progress.finished:
-            progress.update(task1, advance=0.5)
-            progress.update(task2, advance=0.3)
-            time.sleep(0.01)
-            if random.randint(0, 100) < 1:
-                progress.log(next(examples))
diff --git a/voxvera/vendor/rich/progress_bar.py b/voxvera/vendor/rich/progress_bar.py
deleted file mode 100644
index 41794f7..0000000
--- a/voxvera/vendor/rich/progress_bar.py
+++ /dev/null
@@ -1,223 +0,0 @@
-import math
-from functools import lru_cache
-from time import monotonic
-from typing import Iterable, List, Optional
-
-from .color import Color, blend_rgb
-from .color_triplet import ColorTriplet
-from .console import Console, ConsoleOptions, RenderResult
-from .jupyter import JupyterMixin
-from .measure import Measurement
-from .segment import Segment
-from .style import Style, StyleType
-
-# Number of characters before 'pulse' animation repeats
-PULSE_SIZE = 20
-
-
-class ProgressBar(JupyterMixin):
-    """Renders a (progress) bar. Used by rich.progress.
-
-    Args:
-        total (float, optional): Number of steps in the bar. Defaults to 100. Set to None to render a pulsing animation.
-        completed (float, optional): Number of steps completed. Defaults to 0.
-        width (int, optional): Width of the bar, or ``None`` for maximum width. Defaults to None.
-        pulse (bool, optional): Enable pulse effect. Defaults to False. Will pulse if a None total was passed.
-        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
-        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
-        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
-        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
-        animation_time (Optional[float], optional): Time in seconds to use for animation, or None to use system time.
-    """
-
-    def __init__(
-        self,
-        total: Optional[float] = 100.0,
-        completed: float = 0,
-        width: Optional[int] = None,
-        pulse: bool = False,
-        style: StyleType = "bar.back",
-        complete_style: StyleType = "bar.complete",
-        finished_style: StyleType = "bar.finished",
-        pulse_style: StyleType = "bar.pulse",
-        animation_time: Optional[float] = None,
-    ):
-        self.total = total
-        self.completed = completed
-        self.width = width
-        self.pulse = pulse
-        self.style = style
-        self.complete_style = complete_style
-        self.finished_style = finished_style
-        self.pulse_style = pulse_style
-        self.animation_time = animation_time
-
-        self._pulse_segments: Optional[List[Segment]] = None
-
-    def __repr__(self) -> str:
-        return f""
-
-    @property
-    def percentage_completed(self) -> Optional[float]:
-        """Calculate percentage complete."""
-        if self.total is None:
-            return None
-        completed = (self.completed / self.total) * 100.0
-        completed = min(100, max(0.0, completed))
-        return completed
-
-    @lru_cache(maxsize=16)
-    def _get_pulse_segments(
-        self,
-        fore_style: Style,
-        back_style: Style,
-        color_system: str,
-        no_color: bool,
-        ascii: bool = False,
-    ) -> List[Segment]:
-        """Get a list of segments to render a pulse animation.
-
-        Returns:
-            List[Segment]: A list of segments, one segment per character.
-        """
-        bar = "-" if ascii else "━"
-        segments: List[Segment] = []
-        if color_system not in ("standard", "eight_bit", "truecolor") or no_color:
-            segments += [Segment(bar, fore_style)] * (PULSE_SIZE // 2)
-            segments += [Segment(" " if no_color else bar, back_style)] * (
-                PULSE_SIZE - (PULSE_SIZE // 2)
-            )
-            return segments
-
-        append = segments.append
-        fore_color = (
-            fore_style.color.get_truecolor()
-            if fore_style.color
-            else ColorTriplet(255, 0, 255)
-        )
-        back_color = (
-            back_style.color.get_truecolor()
-            if back_style.color
-            else ColorTriplet(0, 0, 0)
-        )
-        cos = math.cos
-        pi = math.pi
-        _Segment = Segment
-        _Style = Style
-        from_triplet = Color.from_triplet
-
-        for index in range(PULSE_SIZE):
-            position = index / PULSE_SIZE
-            fade = 0.5 + cos(position * pi * 2) / 2.0
-            color = blend_rgb(fore_color, back_color, cross_fade=fade)
-            append(_Segment(bar, _Style(color=from_triplet(color))))
-        return segments
-
-    def update(self, completed: float, total: Optional[float] = None) -> None:
-        """Update progress with new values.
-
-        Args:
-            completed (float): Number of steps completed.
-            total (float, optional): Total number of steps, or ``None`` to not change. Defaults to None.
-        """
-        self.completed = completed
-        self.total = total if total is not None else self.total
-
-    def _render_pulse(
-        self, console: Console, width: int, ascii: bool = False
-    ) -> Iterable[Segment]:
-        """Renders the pulse animation.
-
-        Args:
-            console (Console): Console instance.
-            width (int): Width in characters of pulse animation.
-
-        Returns:
-            RenderResult: [description]
-
-        Yields:
-            Iterator[Segment]: Segments to render pulse
-        """
-        fore_style = console.get_style(self.pulse_style, default="white")
-        back_style = console.get_style(self.style, default="black")
-
-        pulse_segments = self._get_pulse_segments(
-            fore_style, back_style, console.color_system, console.no_color, ascii=ascii
-        )
-        segment_count = len(pulse_segments)
-        current_time = (
-            monotonic() if self.animation_time is None else self.animation_time
-        )
-        segments = pulse_segments * (int(width / segment_count) + 2)
-        offset = int(-current_time * 15) % segment_count
-        segments = segments[offset : offset + width]
-        yield from segments
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        width = min(self.width or options.max_width, options.max_width)
-        ascii = options.legacy_windows or options.ascii_only
-        should_pulse = self.pulse or self.total is None
-        if should_pulse:
-            yield from self._render_pulse(console, width, ascii=ascii)
-            return
-
-        completed: Optional[float] = (
-            min(self.total, max(0, self.completed)) if self.total is not None else None
-        )
-
-        bar = "-" if ascii else "━"
-        half_bar_right = " " if ascii else "╸"
-        half_bar_left = " " if ascii else "╺"
-        complete_halves = (
-            int(width * 2 * completed / self.total)
-            if self.total and completed is not None
-            else width * 2
-        )
-        bar_count = complete_halves // 2
-        half_bar_count = complete_halves % 2
-        style = console.get_style(self.style)
-        is_finished = self.total is None or self.completed >= self.total
-        complete_style = console.get_style(
-            self.finished_style if is_finished else self.complete_style
-        )
-        _Segment = Segment
-        if bar_count:
-            yield _Segment(bar * bar_count, complete_style)
-        if half_bar_count:
-            yield _Segment(half_bar_right * half_bar_count, complete_style)
-
-        if not console.no_color:
-            remaining_bars = width - bar_count - half_bar_count
-            if remaining_bars and console.color_system is not None:
-                if not half_bar_count and bar_count:
-                    yield _Segment(half_bar_left, style)
-                    remaining_bars -= 1
-                if remaining_bars:
-                    yield _Segment(bar * remaining_bars, style)
-
-    def __rich_measure__(
-        self, console: Console, options: ConsoleOptions
-    ) -> Measurement:
-        return (
-            Measurement(self.width, self.width)
-            if self.width is not None
-            else Measurement(4, options.max_width)
-        )
-
-
-if __name__ == "__main__":  # pragma: no cover
-    console = Console()
-    bar = ProgressBar(width=50, total=100)
-
-    import time
-
-    console.show_cursor(False)
-    for n in range(0, 101, 1):
-        bar.update(n)
-        console.print(bar)
-        console.file.write("\r")
-        time.sleep(0.05)
-    console.show_cursor(True)
-    console.print()
diff --git a/voxvera/vendor/rich/prompt.py b/voxvera/vendor/rich/prompt.py
deleted file mode 100644
index ae94d9b..0000000
--- a/voxvera/vendor/rich/prompt.py
+++ /dev/null
@@ -1,400 +0,0 @@
-from typing import Any, Generic, List, Optional, TextIO, TypeVar, Union, overload
-
-from . import get_console
-from .console import Console
-from .text import Text, TextType
-
-PromptType = TypeVar("PromptType")
-DefaultType = TypeVar("DefaultType")
-
-
-class PromptError(Exception):
-    """Exception base class for prompt related errors."""
-
-
-class InvalidResponse(PromptError):
-    """Exception to indicate a response was invalid. Raise this within process_response() to indicate an error
-    and provide an error message.
-
-    Args:
-        message (Union[str, Text]): Error message.
-    """
-
-    def __init__(self, message: TextType) -> None:
-        self.message = message
-
-    def __rich__(self) -> TextType:
-        return self.message
-
-
-class PromptBase(Generic[PromptType]):
-    """Ask the user for input until a valid response is received. This is the base class, see one of
-    the concrete classes for examples.
-
-    Args:
-        prompt (TextType, optional): Prompt text. Defaults to "".
-        console (Console, optional): A Console instance or None to use global console. Defaults to None.
-        password (bool, optional): Enable password input. Defaults to False.
-        choices (List[str], optional): A list of valid choices. Defaults to None.
-        case_sensitive (bool, optional): Matching of choices should be case-sensitive. Defaults to True.
-        show_default (bool, optional): Show default in prompt. Defaults to True.
-        show_choices (bool, optional): Show choices in prompt. Defaults to True.
-    """
-
-    response_type: type = str
-
-    validate_error_message = "[prompt.invalid]Please enter a valid value"
-    illegal_choice_message = (
-        "[prompt.invalid.choice]Please select one of the available options"
-    )
-    prompt_suffix = ": "
-
-    choices: Optional[List[str]] = None
-
-    def __init__(
-        self,
-        prompt: TextType = "",
-        *,
-        console: Optional[Console] = None,
-        password: bool = False,
-        choices: Optional[List[str]] = None,
-        case_sensitive: bool = True,
-        show_default: bool = True,
-        show_choices: bool = True,
-    ) -> None:
-        self.console = console or get_console()
-        self.prompt = (
-            Text.from_markup(prompt, style="prompt")
-            if isinstance(prompt, str)
-            else prompt
-        )
-        self.password = password
-        if choices is not None:
-            self.choices = choices
-        self.case_sensitive = case_sensitive
-        self.show_default = show_default
-        self.show_choices = show_choices
-
-    @classmethod
-    @overload
-    def ask(
-        cls,
-        prompt: TextType = "",
-        *,
-        console: Optional[Console] = None,
-        password: bool = False,
-        choices: Optional[List[str]] = None,
-        case_sensitive: bool = True,
-        show_default: bool = True,
-        show_choices: bool = True,
-        default: DefaultType,
-        stream: Optional[TextIO] = None,
-    ) -> Union[DefaultType, PromptType]:
-        ...
-
-    @classmethod
-    @overload
-    def ask(
-        cls,
-        prompt: TextType = "",
-        *,
-        console: Optional[Console] = None,
-        password: bool = False,
-        choices: Optional[List[str]] = None,
-        case_sensitive: bool = True,
-        show_default: bool = True,
-        show_choices: bool = True,
-        stream: Optional[TextIO] = None,
-    ) -> PromptType:
-        ...
-
-    @classmethod
-    def ask(
-        cls,
-        prompt: TextType = "",
-        *,
-        console: Optional[Console] = None,
-        password: bool = False,
-        choices: Optional[List[str]] = None,
-        case_sensitive: bool = True,
-        show_default: bool = True,
-        show_choices: bool = True,
-        default: Any = ...,
-        stream: Optional[TextIO] = None,
-    ) -> Any:
-        """Shortcut to construct and run a prompt loop and return the result.
-
-        Example:
-            >>> filename = Prompt.ask("Enter a filename")
-
-        Args:
-            prompt (TextType, optional): Prompt text. Defaults to "".
-            console (Console, optional): A Console instance or None to use global console. Defaults to None.
-            password (bool, optional): Enable password input. Defaults to False.
-            choices (List[str], optional): A list of valid choices. Defaults to None.
-            case_sensitive (bool, optional): Matching of choices should be case-sensitive. Defaults to True.
-            show_default (bool, optional): Show default in prompt. Defaults to True.
-            show_choices (bool, optional): Show choices in prompt. Defaults to True.
-            stream (TextIO, optional): Optional text file open for reading to get input. Defaults to None.
-        """
-        _prompt = cls(
-            prompt,
-            console=console,
-            password=password,
-            choices=choices,
-            case_sensitive=case_sensitive,
-            show_default=show_default,
-            show_choices=show_choices,
-        )
-        return _prompt(default=default, stream=stream)
-
-    def render_default(self, default: DefaultType) -> Text:
-        """Turn the supplied default in to a Text instance.
-
-        Args:
-            default (DefaultType): Default value.
-
-        Returns:
-            Text: Text containing rendering of default value.
-        """
-        return Text(f"({default})", "prompt.default")
-
-    def make_prompt(self, default: DefaultType) -> Text:
-        """Make prompt text.
-
-        Args:
-            default (DefaultType): Default value.
-
-        Returns:
-            Text: Text to display in prompt.
-        """
-        prompt = self.prompt.copy()
-        prompt.end = ""
-
-        if self.show_choices and self.choices:
-            _choices = "/".join(self.choices)
-            choices = f"[{_choices}]"
-            prompt.append(" ")
-            prompt.append(choices, "prompt.choices")
-
-        if (
-            default != ...
-            and self.show_default
-            and isinstance(default, (str, self.response_type))
-        ):
-            prompt.append(" ")
-            _default = self.render_default(default)
-            prompt.append(_default)
-
-        prompt.append(self.prompt_suffix)
-
-        return prompt
-
-    @classmethod
-    def get_input(
-        cls,
-        console: Console,
-        prompt: TextType,
-        password: bool,
-        stream: Optional[TextIO] = None,
-    ) -> str:
-        """Get input from user.
-
-        Args:
-            console (Console): Console instance.
-            prompt (TextType): Prompt text.
-            password (bool): Enable password entry.
-
-        Returns:
-            str: String from user.
-        """
-        return console.input(prompt, password=password, stream=stream)
-
-    def check_choice(self, value: str) -> bool:
-        """Check value is in the list of valid choices.
-
-        Args:
-            value (str): Value entered by user.
-
-        Returns:
-            bool: True if choice was valid, otherwise False.
-        """
-        assert self.choices is not None
-        if self.case_sensitive:
-            return value.strip() in self.choices
-        return value.strip().lower() in [choice.lower() for choice in self.choices]
-
-    def process_response(self, value: str) -> PromptType:
-        """Process response from user, convert to prompt type.
-
-        Args:
-            value (str): String typed by user.
-
-        Raises:
-            InvalidResponse: If ``value`` is invalid.
-
-        Returns:
-            PromptType: The value to be returned from ask method.
-        """
-        value = value.strip()
-        try:
-            return_value: PromptType = self.response_type(value)
-        except ValueError:
-            raise InvalidResponse(self.validate_error_message)
-
-        if self.choices is not None:
-            if not self.check_choice(value):
-                raise InvalidResponse(self.illegal_choice_message)
-
-            if not self.case_sensitive:
-                # return the original choice, not the lower case version
-                return_value = self.response_type(
-                    self.choices[
-                        [choice.lower() for choice in self.choices].index(value.lower())
-                    ]
-                )
-        return return_value
-
-    def on_validate_error(self, value: str, error: InvalidResponse) -> None:
-        """Called to handle validation error.
-
-        Args:
-            value (str): String entered by user.
-            error (InvalidResponse): Exception instance the initiated the error.
-        """
-        self.console.print(error, markup=True)
-
-    def pre_prompt(self) -> None:
-        """Hook to display something before the prompt."""
-
-    @overload
-    def __call__(self, *, stream: Optional[TextIO] = None) -> PromptType:
-        ...
-
-    @overload
-    def __call__(
-        self, *, default: DefaultType, stream: Optional[TextIO] = None
-    ) -> Union[PromptType, DefaultType]:
-        ...
-
-    def __call__(self, *, default: Any = ..., stream: Optional[TextIO] = None) -> Any:
-        """Run the prompt loop.
-
-        Args:
-            default (Any, optional): Optional default value.
-
-        Returns:
-            PromptType: Processed value.
-        """
-        while True:
-            self.pre_prompt()
-            prompt = self.make_prompt(default)
-            value = self.get_input(self.console, prompt, self.password, stream=stream)
-            if value == "" and default != ...:
-                return default
-            try:
-                return_value = self.process_response(value)
-            except InvalidResponse as error:
-                self.on_validate_error(value, error)
-                continue
-            else:
-                return return_value
-
-
-class Prompt(PromptBase[str]):
-    """A prompt that returns a str.
-
-    Example:
-        >>> name = Prompt.ask("Enter your name")
-
-
-    """
-
-    response_type = str
-
-
-class IntPrompt(PromptBase[int]):
-    """A prompt that returns an integer.
-
-    Example:
-        >>> burrito_count = IntPrompt.ask("How many burritos do you want to order")
-
-    """
-
-    response_type = int
-    validate_error_message = "[prompt.invalid]Please enter a valid integer number"
-
-
-class FloatPrompt(PromptBase[float]):
-    """A prompt that returns a float.
-
-    Example:
-        >>> temperature = FloatPrompt.ask("Enter desired temperature")
-
-    """
-
-    response_type = float
-    validate_error_message = "[prompt.invalid]Please enter a number"
-
-
-class Confirm(PromptBase[bool]):
-    """A yes / no confirmation prompt.
-
-    Example:
-        >>> if Confirm.ask("Continue"):
-                run_job()
-
-    """
-
-    response_type = bool
-    validate_error_message = "[prompt.invalid]Please enter Y or N"
-    choices: List[str] = ["y", "n"]
-
-    def render_default(self, default: DefaultType) -> Text:
-        """Render the default as (y) or (n) rather than True/False."""
-        yes, no = self.choices
-        return Text(f"({yes})" if default else f"({no})", style="prompt.default")
-
-    def process_response(self, value: str) -> bool:
-        """Convert choices to a bool."""
-        value = value.strip().lower()
-        if value not in self.choices:
-            raise InvalidResponse(self.validate_error_message)
-        return value == self.choices[0]
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from rich import print
-
-    if Confirm.ask("Run [i]prompt[/i] tests?", default=True):
-        while True:
-            result = IntPrompt.ask(
-                ":rocket: Enter a number between [b]1[/b] and [b]10[/b]", default=5
-            )
-            if result >= 1 and result <= 10:
-                break
-            print(":pile_of_poo: [prompt.invalid]Number must be between 1 and 10")
-        print(f"number={result}")
-
-        while True:
-            password = Prompt.ask(
-                "Please enter a password [cyan](must be at least 5 characters)",
-                password=True,
-            )
-            if len(password) >= 5:
-                break
-            print("[prompt.invalid]password too short")
-        print(f"password={password!r}")
-
-        fruit = Prompt.ask("Enter a fruit", choices=["apple", "orange", "pear"])
-        print(f"fruit={fruit!r}")
-
-        doggie = Prompt.ask(
-            "What's the best Dog? (Case INSENSITIVE)",
-            choices=["Border Terrier", "Collie", "Labradoodle"],
-            case_sensitive=False,
-        )
-        print(f"doggie={doggie!r}")
-
-    else:
-        print("[b]OK :loudly_crying_face:")
diff --git a/voxvera/vendor/rich/protocol.py b/voxvera/vendor/rich/protocol.py
deleted file mode 100644
index c6923dd..0000000
--- a/voxvera/vendor/rich/protocol.py
+++ /dev/null
@@ -1,42 +0,0 @@
-from typing import Any, cast, Set, TYPE_CHECKING
-from inspect import isclass
-
-if TYPE_CHECKING:
-    from rich.console import RenderableType
-
-_GIBBERISH = """aihwerij235234ljsdnp34ksodfipwoe234234jlskjdf"""
-
-
-def is_renderable(check_object: Any) -> bool:
-    """Check if an object may be rendered by Rich."""
-    return (
-        isinstance(check_object, str)
-        or hasattr(check_object, "__rich__")
-        or hasattr(check_object, "__rich_console__")
-    )
-
-
-def rich_cast(renderable: object) -> "RenderableType":
-    """Cast an object to a renderable by calling __rich__ if present.
-
-    Args:
-        renderable (object): A potentially renderable object
-
-    Returns:
-        object: The result of recursively calling __rich__.
-    """
-    from rich.console import RenderableType
-
-    rich_visited_set: Set[type] = set()  # Prevent potential infinite loop
-    while hasattr(renderable, "__rich__") and not isclass(renderable):
-        # Detect object which claim to have all the attributes
-        if hasattr(renderable, _GIBBERISH):
-            return repr(renderable)
-        cast_method = getattr(renderable, "__rich__")
-        renderable = cast_method()
-        renderable_type = type(renderable)
-        if renderable_type in rich_visited_set:
-            break
-        rich_visited_set.add(renderable_type)
-
-    return cast(RenderableType, renderable)
diff --git a/voxvera/vendor/rich/py.typed b/voxvera/vendor/rich/py.typed
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/rich/region.py b/voxvera/vendor/rich/region.py
deleted file mode 100644
index 75b3631..0000000
--- a/voxvera/vendor/rich/region.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from typing import NamedTuple
-
-
-class Region(NamedTuple):
-    """Defines a rectangular region of the screen."""
-
-    x: int
-    y: int
-    width: int
-    height: int
diff --git a/voxvera/vendor/rich/repr.py b/voxvera/vendor/rich/repr.py
deleted file mode 100644
index 9533100..0000000
--- a/voxvera/vendor/rich/repr.py
+++ /dev/null
@@ -1,149 +0,0 @@
-import inspect
-from functools import partial
-from typing import (
-    Any,
-    Callable,
-    Iterable,
-    List,
-    Optional,
-    Tuple,
-    Type,
-    TypeVar,
-    Union,
-    overload,
-)
-
-T = TypeVar("T")
-
-
-Result = Iterable[Union[Any, Tuple[Any], Tuple[str, Any], Tuple[str, Any, Any]]]
-RichReprResult = Result
-
-
-class ReprError(Exception):
-    """An error occurred when attempting to build a repr."""
-
-
-@overload
-def auto(cls: Optional[Type[T]]) -> Type[T]:
-    ...
-
-
-@overload
-def auto(*, angular: bool = False) -> Callable[[Type[T]], Type[T]]:
-    ...
-
-
-def auto(
-    cls: Optional[Type[T]] = None, *, angular: Optional[bool] = None
-) -> Union[Type[T], Callable[[Type[T]], Type[T]]]:
-    """Class decorator to create __repr__ from __rich_repr__"""
-
-    def do_replace(cls: Type[T], angular: Optional[bool] = None) -> Type[T]:
-        def auto_repr(self: T) -> str:
-            """Create repr string from __rich_repr__"""
-            repr_str: List[str] = []
-            append = repr_str.append
-
-            angular: bool = getattr(self.__rich_repr__, "angular", False)  # type: ignore[attr-defined]
-            for arg in self.__rich_repr__():  # type: ignore[attr-defined]
-                if isinstance(arg, tuple):
-                    if len(arg) == 1:
-                        append(repr(arg[0]))
-                    else:
-                        key, value, *default = arg
-                        if key is None:
-                            append(repr(value))
-                        else:
-                            if default and default[0] == value:
-                                continue
-                            append(f"{key}={value!r}")
-                else:
-                    append(repr(arg))
-            if angular:
-                return f"<{self.__class__.__name__} {' '.join(repr_str)}>"
-            else:
-                return f"{self.__class__.__name__}({', '.join(repr_str)})"
-
-        def auto_rich_repr(self: Type[T]) -> Result:
-            """Auto generate __rich_rep__ from signature of __init__"""
-            try:
-                signature = inspect.signature(self.__init__)
-                for name, param in signature.parameters.items():
-                    if param.kind == param.POSITIONAL_ONLY:
-                        yield getattr(self, name)
-                    elif param.kind in (
-                        param.POSITIONAL_OR_KEYWORD,
-                        param.KEYWORD_ONLY,
-                    ):
-                        if param.default is param.empty:
-                            yield getattr(self, param.name)
-                        else:
-                            yield param.name, getattr(self, param.name), param.default
-            except Exception as error:
-                raise ReprError(
-                    f"Failed to auto generate __rich_repr__; {error}"
-                ) from None
-
-        if not hasattr(cls, "__rich_repr__"):
-            auto_rich_repr.__doc__ = "Build a rich repr"
-            cls.__rich_repr__ = auto_rich_repr  # type: ignore[attr-defined]
-
-        auto_repr.__doc__ = "Return repr(self)"
-        cls.__repr__ = auto_repr  # type: ignore[assignment]
-        if angular is not None:
-            cls.__rich_repr__.angular = angular  # type: ignore[attr-defined]
-        return cls
-
-    if cls is None:
-        return partial(do_replace, angular=angular)
-    else:
-        return do_replace(cls, angular=angular)
-
-
-@overload
-def rich_repr(cls: Optional[Type[T]]) -> Type[T]:
-    ...
-
-
-@overload
-def rich_repr(*, angular: bool = False) -> Callable[[Type[T]], Type[T]]:
-    ...
-
-
-def rich_repr(
-    cls: Optional[Type[T]] = None, *, angular: bool = False
-) -> Union[Type[T], Callable[[Type[T]], Type[T]]]:
-    if cls is None:
-        return auto(angular=angular)
-    else:
-        return auto(cls)
-
-
-if __name__ == "__main__":
-
-    @auto
-    class Foo:
-        def __rich_repr__(self) -> Result:
-            yield "foo"
-            yield "bar", {"shopping": ["eggs", "ham", "pineapple"]}
-            yield "buy", "hand sanitizer"
-
-    foo = Foo()
-    from rich.console import Console
-
-    console = Console()
-
-    console.rule("Standard repr")
-    console.print(foo)
-
-    console.print(foo, width=60)
-    console.print(foo, width=30)
-
-    console.rule("Angular repr")
-    Foo.__rich_repr__.angular = True  # type: ignore[attr-defined]
-
-    console.print(foo)
-
-    console.print(foo, width=60)
-    console.print(foo, width=30)
diff --git a/voxvera/vendor/rich/rule.py b/voxvera/vendor/rich/rule.py
deleted file mode 100644
index fb3d432..0000000
--- a/voxvera/vendor/rich/rule.py
+++ /dev/null
@@ -1,130 +0,0 @@
-from typing import Union
-
-from .align import AlignMethod
-from .cells import cell_len, set_cell_size
-from .console import Console, ConsoleOptions, RenderResult
-from .jupyter import JupyterMixin
-from .measure import Measurement
-from .style import Style
-from .text import Text
-
-
-class Rule(JupyterMixin):
-    """A console renderable to draw a horizontal rule (line).
-
-    Args:
-        title (Union[str, Text], optional): Text to render in the rule. Defaults to "".
-        characters (str, optional): Character(s) used to draw the line. Defaults to "─".
-        style (StyleType, optional): Style of Rule. Defaults to "rule.line".
-        end (str, optional): Character at end of Rule. defaults to "\\\\n"
-        align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center".
-    """
-
-    def __init__(
-        self,
-        title: Union[str, Text] = "",
-        *,
-        characters: str = "─",
-        style: Union[str, Style] = "rule.line",
-        end: str = "\n",
-        align: AlignMethod = "center",
-    ) -> None:
-        if cell_len(characters) < 1:
-            raise ValueError(
-                "'characters' argument must have a cell width of at least 1"
-            )
-        if align not in ("left", "center", "right"):
-            raise ValueError(
-                f'invalid value for align, expected "left", "center", "right" (not {align!r})'
-            )
-        self.title = title
-        self.characters = characters
-        self.style = style
-        self.end = end
-        self.align = align
-
-    def __repr__(self) -> str:
-        return f"Rule({self.title!r}, {self.characters!r})"
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        width = options.max_width
-
-        characters = (
-            "-"
-            if (options.ascii_only and not self.characters.isascii())
-            else self.characters
-        )
-
-        chars_len = cell_len(characters)
-        if not self.title:
-            yield self._rule_line(chars_len, width)
-            return
-
-        if isinstance(self.title, Text):
-            title_text = self.title
-        else:
-            title_text = console.render_str(self.title, style="rule.text")
-
-        title_text.plain = title_text.plain.replace("\n", " ")
-        title_text.expand_tabs()
-
-        required_space = 4 if self.align == "center" else 2
-        truncate_width = max(0, width - required_space)
-        if not truncate_width:
-            yield self._rule_line(chars_len, width)
-            return
-
-        rule_text = Text(end=self.end)
-        if self.align == "center":
-            title_text.truncate(truncate_width, overflow="ellipsis")
-            side_width = (width - cell_len(title_text.plain)) // 2
-            left = Text(characters * (side_width // chars_len + 1))
-            left.truncate(side_width - 1)
-            right_length = width - cell_len(left.plain) - cell_len(title_text.plain)
-            right = Text(characters * (side_width // chars_len + 1))
-            right.truncate(right_length)
-            rule_text.append(left.plain + " ", self.style)
-            rule_text.append(title_text)
-            rule_text.append(" " + right.plain, self.style)
-        elif self.align == "left":
-            title_text.truncate(truncate_width, overflow="ellipsis")
-            rule_text.append(title_text)
-            rule_text.append(" ")
-            rule_text.append(characters * (width - rule_text.cell_len), self.style)
-        elif self.align == "right":
-            title_text.truncate(truncate_width, overflow="ellipsis")
-            rule_text.append(characters * (width - title_text.cell_len - 1), self.style)
-            rule_text.append(" ")
-            rule_text.append(title_text)
-
-        rule_text.plain = set_cell_size(rule_text.plain, width)
-        yield rule_text
-
-    def _rule_line(self, chars_len: int, width: int) -> Text:
-        rule_text = Text(self.characters * ((width // chars_len) + 1), self.style)
-        rule_text.truncate(width)
-        rule_text.plain = set_cell_size(rule_text.plain, width)
-        return rule_text
-
-    def __rich_measure__(
-        self, console: Console, options: ConsoleOptions
-    ) -> Measurement:
-        return Measurement(1, 1)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    import sys
-
-    from rich.console import Console
-
-    try:
-        text = sys.argv[1]
-    except IndexError:
-        text = "Hello, World"
-    console = Console()
-    console.print(Rule(title=text))
-
-    console = Console()
-    console.print(Rule("foo"), width=4)
diff --git a/voxvera/vendor/rich/scope.py b/voxvera/vendor/rich/scope.py
deleted file mode 100644
index 41d0299..0000000
--- a/voxvera/vendor/rich/scope.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, Any, Optional, Tuple
-
-from .highlighter import ReprHighlighter
-from .panel import Panel
-from .pretty import Pretty
-from .table import Table
-from .text import Text, TextType
-
-if TYPE_CHECKING:
-    from .console import ConsoleRenderable, OverflowMethod
-
-
-def render_scope(
-    scope: "Mapping[str, Any]",
-    *,
-    title: Optional[TextType] = None,
-    sort_keys: bool = True,
-    indent_guides: bool = False,
-    max_length: Optional[int] = None,
-    max_string: Optional[int] = None,
-    max_depth: Optional[int] = None,
-    overflow: Optional["OverflowMethod"] = None,
-) -> "ConsoleRenderable":
-    """Render python variables in a given scope.
-
-    Args:
-        scope (Mapping): A mapping containing variable names and values.
-        title (str, optional): Optional title. Defaults to None.
-        sort_keys (bool, optional): Enable sorting of items. Defaults to True.
-        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
-        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to None.
-        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
-        max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None.
-        overflow (OverflowMethod, optional): How to handle overflowing locals, or None to disable. Defaults to None.
-
-    Returns:
-        ConsoleRenderable: A renderable object.
-    """
-    highlighter = ReprHighlighter()
-    items_table = Table.grid(padding=(0, 1), expand=False)
-    items_table.add_column(justify="right")
-
-    def sort_items(item: Tuple[str, Any]) -> Tuple[bool, str]:
-        """Sort special variables first, then alphabetically."""
-        key, _ = item
-        return (not key.startswith("__"), key.lower())
-
-    items = sorted(scope.items(), key=sort_items) if sort_keys else scope.items()
-    for key, value in items:
-        key_text = Text.assemble(
-            (key, "scope.key.special" if key.startswith("__") else "scope.key"),
-            (" =", "scope.equals"),
-        )
-        items_table.add_row(
-            key_text,
-            Pretty(
-                value,
-                highlighter=highlighter,
-                indent_guides=indent_guides,
-                max_length=max_length,
-                max_string=max_string,
-                max_depth=max_depth,
-                overflow=overflow,
-            ),
-        )
-    return Panel.fit(
-        items_table,
-        title=title,
-        border_style="scope.border",
-        padding=(0, 1),
-    )
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from rich import print
-
-    print()
-
-    def test(foo: float, bar: float) -> None:
-        list_of_things = [1, 2, 3, None, 4, True, False, "Hello World"]
-        dict_of_things = {
-            "version": "1.1",
-            "method": "confirmFruitPurchase",
-            "params": [["apple", "orange", "mangoes", "pomelo"], 1.123],
-            "id": "194521489",
-        }
-        print(render_scope(locals(), title="[i]locals", sort_keys=False))
-
-    test(20.3423, 3.1427)
-    print()
diff --git a/voxvera/vendor/rich/screen.py b/voxvera/vendor/rich/screen.py
deleted file mode 100644
index b4f7fd1..0000000
--- a/voxvera/vendor/rich/screen.py
+++ /dev/null
@@ -1,54 +0,0 @@
-from typing import Optional, TYPE_CHECKING
-
-from .segment import Segment
-from .style import StyleType
-from ._loop import loop_last
-
-
-if TYPE_CHECKING:
-    from .console import (
-        Console,
-        ConsoleOptions,
-        RenderResult,
-        RenderableType,
-        Group,
-    )
-
-
-class Screen:
-    """A renderable that fills the terminal screen and crops excess.
-
-    Args:
-        renderable (RenderableType): Child renderable.
-        style (StyleType, optional): Optional background style. Defaults to None.
-    """
-
-    renderable: "RenderableType"
-
-    def __init__(
-        self,
-        *renderables: "RenderableType",
-        style: Optional[StyleType] = None,
-        application_mode: bool = False,
-    ) -> None:
-        from rich.console import Group
-
-        self.renderable = Group(*renderables)
-        self.style = style
-        self.application_mode = application_mode
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        width, height = options.size
-        style = console.get_style(self.style) if self.style else None
-        render_options = options.update(width=width, height=height)
-        lines = console.render_lines(
-            self.renderable or "", render_options, style=style, pad=True
-        )
-        lines = Segment.set_shape(lines, width, height, style=style)
-        new_line = Segment("\n\r") if self.application_mode else Segment.line()
-        for last, line in loop_last(lines):
-            yield from line
-            if not last:
-                yield new_line
diff --git a/voxvera/vendor/rich/segment.py b/voxvera/vendor/rich/segment.py
deleted file mode 100644
index 0df63fd..0000000
--- a/voxvera/vendor/rich/segment.py
+++ /dev/null
@@ -1,783 +0,0 @@
-from enum import IntEnum
-from functools import lru_cache
-from itertools import filterfalse
-from logging import getLogger
-from operator import attrgetter
-from typing import (
-    TYPE_CHECKING,
-    Dict,
-    Iterable,
-    List,
-    NamedTuple,
-    Optional,
-    Sequence,
-    Tuple,
-    Type,
-    Union,
-)
-
-from .cells import (
-    _is_single_cell_widths,
-    cached_cell_len,
-    cell_len,
-    get_character_cell_size,
-    set_cell_size,
-)
-from .repr import Result, rich_repr
-from .style import Style
-
-if TYPE_CHECKING:
-    from .console import Console, ConsoleOptions, RenderResult
-
-log = getLogger("rich")
-
-
-class ControlType(IntEnum):
-    """Non-printable control codes which typically translate to ANSI codes."""
-
-    BELL = 1
-    CARRIAGE_RETURN = 2
-    HOME = 3
-    CLEAR = 4
-    SHOW_CURSOR = 5
-    HIDE_CURSOR = 6
-    ENABLE_ALT_SCREEN = 7
-    DISABLE_ALT_SCREEN = 8
-    CURSOR_UP = 9
-    CURSOR_DOWN = 10
-    CURSOR_FORWARD = 11
-    CURSOR_BACKWARD = 12
-    CURSOR_MOVE_TO_COLUMN = 13
-    CURSOR_MOVE_TO = 14
-    ERASE_IN_LINE = 15
-    SET_WINDOW_TITLE = 16
-
-
-ControlCode = Union[
-    Tuple[ControlType],
-    Tuple[ControlType, Union[int, str]],
-    Tuple[ControlType, int, int],
-]
-
-
-@rich_repr()
-class Segment(NamedTuple):
-    """A piece of text with associated style. Segments are produced by the Console render process and
-    are ultimately converted in to strings to be written to the terminal.
-
-    Args:
-        text (str): A piece of text.
-        style (:class:`~rich.style.Style`, optional): An optional style to apply to the text.
-        control (Tuple[ControlCode], optional): Optional sequence of control codes.
-
-    Attributes:
-        cell_length (int): The cell length of this Segment.
-    """
-
-    text: str
-    style: Optional[Style] = None
-    control: Optional[Sequence[ControlCode]] = None
-
-    @property
-    def cell_length(self) -> int:
-        """The number of terminal cells required to display self.text.
-
-        Returns:
-            int: A number of cells.
-        """
-        text, _style, control = self
-        return 0 if control else cell_len(text)
-
-    def __rich_repr__(self) -> Result:
-        yield self.text
-        if self.control is None:
-            if self.style is not None:
-                yield self.style
-        else:
-            yield self.style
-            yield self.control
-
-    def __bool__(self) -> bool:
-        """Check if the segment contains text."""
-        return bool(self.text)
-
-    @property
-    def is_control(self) -> bool:
-        """Check if the segment contains control codes."""
-        return self.control is not None
-
-    @classmethod
-    @lru_cache(1024 * 16)
-    def _split_cells(cls, segment: "Segment", cut: int) -> Tuple["Segment", "Segment"]:
-        """Split a segment in to two at a given cell position.
-
-        Note that splitting a double-width character, may result in that character turning
-        into two spaces.
-
-        Args:
-            segment (Segment): A segment to split.
-            cut (int): A cell position to cut on.
-
-        Returns:
-            A tuple of two segments.
-        """
-        text, style, control = segment
-        _Segment = Segment
-        cell_length = segment.cell_length
-        if cut >= cell_length:
-            return segment, _Segment("", style, control)
-
-        cell_size = get_character_cell_size
-
-        pos = int((cut / cell_length) * len(text))
-
-        while True:
-            before = text[:pos]
-            cell_pos = cell_len(before)
-            out_by = cell_pos - cut
-            if not out_by:
-                return (
-                    _Segment(before, style, control),
-                    _Segment(text[pos:], style, control),
-                )
-            if out_by == -1 and cell_size(text[pos]) == 2:
-                return (
-                    _Segment(text[:pos] + " ", style, control),
-                    _Segment(" " + text[pos + 1 :], style, control),
-                )
-            if out_by == +1 and cell_size(text[pos - 1]) == 2:
-                return (
-                    _Segment(text[: pos - 1] + " ", style, control),
-                    _Segment(" " + text[pos:], style, control),
-                )
-            if cell_pos < cut:
-                pos += 1
-            else:
-                pos -= 1
-
-    def split_cells(self, cut: int) -> Tuple["Segment", "Segment"]:
-        """Split segment in to two segments at the specified column.
-
-        If the cut point falls in the middle of a 2-cell wide character then it is replaced
-        by two spaces, to preserve the display width of the parent segment.
-
-        Args:
-            cut (int): Offset within the segment to cut.
-
-        Returns:
-            Tuple[Segment, Segment]: Two segments.
-        """
-        text, style, control = self
-        assert cut >= 0
-
-        if _is_single_cell_widths(text):
-            # Fast path with all 1 cell characters
-            if cut >= len(text):
-                return self, Segment("", style, control)
-            return (
-                Segment(text[:cut], style, control),
-                Segment(text[cut:], style, control),
-            )
-
-        return self._split_cells(self, cut)
-
-    @classmethod
-    def line(cls) -> "Segment":
-        """Make a new line segment."""
-        return cls("\n")
-
-    @classmethod
-    def apply_style(
-        cls,
-        segments: Iterable["Segment"],
-        style: Optional[Style] = None,
-        post_style: Optional[Style] = None,
-    ) -> Iterable["Segment"]:
-        """Apply style(s) to an iterable of segments.
-
-        Returns an iterable of segments where the style is replaced by ``style + segment.style + post_style``.
-
-        Args:
-            segments (Iterable[Segment]): Segments to process.
-            style (Style, optional): Base style. Defaults to None.
-            post_style (Style, optional): Style to apply on top of segment style. Defaults to None.
-
-        Returns:
-            Iterable[Segments]: A new iterable of segments (possibly the same iterable).
-        """
-        result_segments = segments
-        if style:
-            apply = style.__add__
-            result_segments = (
-                cls(text, None if control else apply(_style), control)
-                for text, _style, control in result_segments
-            )
-        if post_style:
-            result_segments = (
-                cls(
-                    text,
-                    (
-                        None
-                        if control
-                        else (_style + post_style if _style else post_style)
-                    ),
-                    control,
-                )
-                for text, _style, control in result_segments
-            )
-        return result_segments
-
-    @classmethod
-    def filter_control(
-        cls, segments: Iterable["Segment"], is_control: bool = False
-    ) -> Iterable["Segment"]:
-        """Filter segments by ``is_control`` attribute.
-
-        Args:
-            segments (Iterable[Segment]): An iterable of Segment instances.
-            is_control (bool, optional): is_control flag to match in search.
-
-        Returns:
-            Iterable[Segment]: And iterable of Segment instances.
-
-        """
-        if is_control:
-            return filter(attrgetter("control"), segments)
-        else:
-            return filterfalse(attrgetter("control"), segments)
-
-    @classmethod
-    def split_lines(cls, segments: Iterable["Segment"]) -> Iterable[List["Segment"]]:
-        """Split a sequence of segments in to a list of lines.
-
-        Args:
-            segments (Iterable[Segment]): Segments potentially containing line feeds.
-
-        Yields:
-            Iterable[List[Segment]]: Iterable of segment lists, one per line.
-        """
-        line: List[Segment] = []
-        append = line.append
-
-        for segment in segments:
-            if "\n" in segment.text and not segment.control:
-                text, style, _ = segment
-                while text:
-                    _text, new_line, text = text.partition("\n")
-                    if _text:
-                        append(cls(_text, style))
-                    if new_line:
-                        yield line
-                        line = []
-                        append = line.append
-            else:
-                append(segment)
-        if line:
-            yield line
-
-    @classmethod
-    def split_lines_terminator(
-        cls, segments: Iterable["Segment"]
-    ) -> Iterable[Tuple[List["Segment"], bool]]:
-        """Split a sequence of segments in to a list of lines and a boolean to indicate if there was a new line.
-
-        Args:
-            segments (Iterable[Segment]): Segments potentially containing line feeds.
-
-        Yields:
-            Iterable[List[Segment]]: Iterable of segment lists, one per line.
-        """
-        line: List[Segment] = []
-        append = line.append
-
-        for segment in segments:
-            if "\n" in segment.text and not segment.control:
-                text, style, _ = segment
-                while text:
-                    _text, new_line, text = text.partition("\n")
-                    if _text:
-                        append(cls(_text, style))
-                    if new_line:
-                        yield (line, True)
-                        line = []
-                        append = line.append
-            else:
-                append(segment)
-        if line:
-            yield (line, False)
-
-    @classmethod
-    def split_and_crop_lines(
-        cls,
-        segments: Iterable["Segment"],
-        length: int,
-        style: Optional[Style] = None,
-        pad: bool = True,
-        include_new_lines: bool = True,
-    ) -> Iterable[List["Segment"]]:
-        """Split segments in to lines, and crop lines greater than a given length.
-
-        Args:
-            segments (Iterable[Segment]): An iterable of segments, probably
-                generated from console.render.
-            length (int): Desired line length.
-            style (Style, optional): Style to use for any padding.
-            pad (bool): Enable padding of lines that are less than `length`.
-
-        Returns:
-            Iterable[List[Segment]]: An iterable of lines of segments.
-        """
-        line: List[Segment] = []
-        append = line.append
-
-        adjust_line_length = cls.adjust_line_length
-        new_line_segment = cls("\n")
-
-        for segment in segments:
-            if "\n" in segment.text and not segment.control:
-                text, segment_style, _ = segment
-                while text:
-                    _text, new_line, text = text.partition("\n")
-                    if _text:
-                        append(cls(_text, segment_style))
-                    if new_line:
-                        cropped_line = adjust_line_length(
-                            line, length, style=style, pad=pad
-                        )
-                        if include_new_lines:
-                            cropped_line.append(new_line_segment)
-                        yield cropped_line
-                        line.clear()
-            else:
-                append(segment)
-        if line:
-            yield adjust_line_length(line, length, style=style, pad=pad)
-
-    @classmethod
-    def adjust_line_length(
-        cls,
-        line: List["Segment"],
-        length: int,
-        style: Optional[Style] = None,
-        pad: bool = True,
-    ) -> List["Segment"]:
-        """Adjust a line to a given width (cropping or padding as required).
-
-        Args:
-            segments (Iterable[Segment]): A list of segments in a single line.
-            length (int): The desired width of the line.
-            style (Style, optional): The style of padding if used (space on the end). Defaults to None.
-            pad (bool, optional): Pad lines with spaces if they are shorter than `length`. Defaults to True.
-
-        Returns:
-            List[Segment]: A line of segments with the desired length.
-        """
-        line_length = sum(segment.cell_length for segment in line)
-        new_line: List[Segment]
-
-        if line_length < length:
-            if pad:
-                new_line = line + [cls(" " * (length - line_length), style)]
-            else:
-                new_line = line[:]
-        elif line_length > length:
-            new_line = []
-            append = new_line.append
-            line_length = 0
-            for segment in line:
-                segment_length = segment.cell_length
-                if line_length + segment_length < length or segment.control:
-                    append(segment)
-                    line_length += segment_length
-                else:
-                    text, segment_style, _ = segment
-                    text = set_cell_size(text, length - line_length)
-                    append(cls(text, segment_style))
-                    break
-        else:
-            new_line = line[:]
-        return new_line
-
-    @classmethod
-    def get_line_length(cls, line: List["Segment"]) -> int:
-        """Get the length of list of segments.
-
-        Args:
-            line (List[Segment]): A line encoded as a list of Segments (assumes no '\\\\n' characters),
-
-        Returns:
-            int: The length of the line.
-        """
-        _cell_len = cell_len
-        return sum(_cell_len(text) for text, style, control in line if not control)
-
-    @classmethod
-    def get_shape(cls, lines: List[List["Segment"]]) -> Tuple[int, int]:
-        """Get the shape (enclosing rectangle) of a list of lines.
-
-        Args:
-            lines (List[List[Segment]]): A list of lines (no '\\\\n' characters).
-
-        Returns:
-            Tuple[int, int]: Width and height in characters.
-        """
-        get_line_length = cls.get_line_length
-        max_width = max(get_line_length(line) for line in lines) if lines else 0
-        return (max_width, len(lines))
-
-    @classmethod
-    def set_shape(
-        cls,
-        lines: List[List["Segment"]],
-        width: int,
-        height: Optional[int] = None,
-        style: Optional[Style] = None,
-        new_lines: bool = False,
-    ) -> List[List["Segment"]]:
-        """Set the shape of a list of lines (enclosing rectangle).
-
-        Args:
-            lines (List[List[Segment]]): A list of lines.
-            width (int): Desired width.
-            height (int, optional): Desired height or None for no change.
-            style (Style, optional): Style of any padding added.
-            new_lines (bool, optional): Padded lines should include "\n". Defaults to False.
-
-        Returns:
-            List[List[Segment]]: New list of lines.
-        """
-        _height = height or len(lines)
-
-        blank = (
-            [cls(" " * width + "\n", style)] if new_lines else [cls(" " * width, style)]
-        )
-
-        adjust_line_length = cls.adjust_line_length
-        shaped_lines = lines[:_height]
-        shaped_lines[:] = [
-            adjust_line_length(line, width, style=style) for line in lines
-        ]
-        if len(shaped_lines) < _height:
-            shaped_lines.extend([blank] * (_height - len(shaped_lines)))
-        return shaped_lines
-
-    @classmethod
-    def align_top(
-        cls: Type["Segment"],
-        lines: List[List["Segment"]],
-        width: int,
-        height: int,
-        style: Style,
-        new_lines: bool = False,
-    ) -> List[List["Segment"]]:
-        """Aligns lines to top (adds extra lines to bottom as required).
-
-        Args:
-            lines (List[List[Segment]]): A list of lines.
-            width (int): Desired width.
-            height (int, optional): Desired height or None for no change.
-            style (Style): Style of any padding added.
-            new_lines (bool, optional): Padded lines should include "\n". Defaults to False.
-
-        Returns:
-            List[List[Segment]]: New list of lines.
-        """
-        extra_lines = height - len(lines)
-        if not extra_lines:
-            return lines[:]
-        lines = lines[:height]
-        blank = cls(" " * width + "\n", style) if new_lines else cls(" " * width, style)
-        lines = lines + [[blank]] * extra_lines
-        return lines
-
-    @classmethod
-    def align_bottom(
-        cls: Type["Segment"],
-        lines: List[List["Segment"]],
-        width: int,
-        height: int,
-        style: Style,
-        new_lines: bool = False,
-    ) -> List[List["Segment"]]:
-        """Aligns render to bottom (adds extra lines above as required).
-
-        Args:
-            lines (List[List[Segment]]): A list of lines.
-            width (int): Desired width.
-            height (int, optional): Desired height or None for no change.
-            style (Style): Style of any padding added. Defaults to None.
-            new_lines (bool, optional): Padded lines should include "\n". Defaults to False.
-
-        Returns:
-            List[List[Segment]]: New list of lines.
-        """
-        extra_lines = height - len(lines)
-        if not extra_lines:
-            return lines[:]
-        lines = lines[:height]
-        blank = cls(" " * width + "\n", style) if new_lines else cls(" " * width, style)
-        lines = [[blank]] * extra_lines + lines
-        return lines
-
-    @classmethod
-    def align_middle(
-        cls: Type["Segment"],
-        lines: List[List["Segment"]],
-        width: int,
-        height: int,
-        style: Style,
-        new_lines: bool = False,
-    ) -> List[List["Segment"]]:
-        """Aligns lines to middle (adds extra lines to above and below as required).
-
-        Args:
-            lines (List[List[Segment]]): A list of lines.
-            width (int): Desired width.
-            height (int, optional): Desired height or None for no change.
-            style (Style): Style of any padding added.
-            new_lines (bool, optional): Padded lines should include "\n". Defaults to False.
-
-        Returns:
-            List[List[Segment]]: New list of lines.
-        """
-        extra_lines = height - len(lines)
-        if not extra_lines:
-            return lines[:]
-        lines = lines[:height]
-        blank = cls(" " * width + "\n", style) if new_lines else cls(" " * width, style)
-        top_lines = extra_lines // 2
-        bottom_lines = extra_lines - top_lines
-        lines = [[blank]] * top_lines + lines + [[blank]] * bottom_lines
-        return lines
-
-    @classmethod
-    def simplify(cls, segments: Iterable["Segment"]) -> Iterable["Segment"]:
-        """Simplify an iterable of segments by combining contiguous segments with the same style.
-
-        Args:
-            segments (Iterable[Segment]): An iterable of segments.
-
-        Returns:
-            Iterable[Segment]: A possibly smaller iterable of segments that will render the same way.
-        """
-        iter_segments = iter(segments)
-        try:
-            last_segment = next(iter_segments)
-        except StopIteration:
-            return
-
-        _Segment = Segment
-        for segment in iter_segments:
-            if last_segment.style == segment.style and not segment.control:
-                last_segment = _Segment(
-                    last_segment.text + segment.text, last_segment.style
-                )
-            else:
-                yield last_segment
-                last_segment = segment
-        yield last_segment
-
-    @classmethod
-    def strip_links(cls, segments: Iterable["Segment"]) -> Iterable["Segment"]:
-        """Remove all links from an iterable of styles.
-
-        Args:
-            segments (Iterable[Segment]): An iterable segments.
-
-        Yields:
-            Segment: Segments with link removed.
-        """
-        for segment in segments:
-            if segment.control or segment.style is None:
-                yield segment
-            else:
-                text, style, _control = segment
-                yield cls(text, style.update_link(None) if style else None)
-
-    @classmethod
-    def strip_styles(cls, segments: Iterable["Segment"]) -> Iterable["Segment"]:
-        """Remove all styles from an iterable of segments.
-
-        Args:
-            segments (Iterable[Segment]): An iterable segments.
-
-        Yields:
-            Segment: Segments with styles replace with None
-        """
-        for text, _style, control in segments:
-            yield cls(text, None, control)
-
-    @classmethod
-    def remove_color(cls, segments: Iterable["Segment"]) -> Iterable["Segment"]:
-        """Remove all color from an iterable of segments.
-
-        Args:
-            segments (Iterable[Segment]): An iterable segments.
-
-        Yields:
-            Segment: Segments with colorless style.
-        """
-
-        cache: Dict[Style, Style] = {}
-        for text, style, control in segments:
-            if style:
-                colorless_style = cache.get(style)
-                if colorless_style is None:
-                    colorless_style = style.without_color
-                    cache[style] = colorless_style
-                yield cls(text, colorless_style, control)
-            else:
-                yield cls(text, None, control)
-
-    @classmethod
-    def divide(
-        cls, segments: Iterable["Segment"], cuts: Iterable[int]
-    ) -> Iterable[List["Segment"]]:
-        """Divides an iterable of segments in to portions.
-
-        Args:
-            cuts (Iterable[int]): Cell positions where to divide.
-
-        Yields:
-            [Iterable[List[Segment]]]: An iterable of Segments in List.
-        """
-        split_segments: List["Segment"] = []
-        add_segment = split_segments.append
-
-        iter_cuts = iter(cuts)
-
-        while True:
-            cut = next(iter_cuts, -1)
-            if cut == -1:
-                return
-            if cut != 0:
-                break
-            yield []
-        pos = 0
-
-        segments_clear = split_segments.clear
-        segments_copy = split_segments.copy
-
-        _cell_len = cached_cell_len
-        for segment in segments:
-            text, _style, control = segment
-            while text:
-                end_pos = pos if control else pos + _cell_len(text)
-                if end_pos < cut:
-                    add_segment(segment)
-                    pos = end_pos
-                    break
-
-                if end_pos == cut:
-                    add_segment(segment)
-                    yield segments_copy()
-                    segments_clear()
-                    pos = end_pos
-
-                    cut = next(iter_cuts, -1)
-                    if cut == -1:
-                        if split_segments:
-                            yield segments_copy()
-                        return
-
-                    break
-
-                else:
-                    before, segment = segment.split_cells(cut - pos)
-                    text, _style, control = segment
-                    add_segment(before)
-                    yield segments_copy()
-                    segments_clear()
-                    pos = cut
-
-                cut = next(iter_cuts, -1)
-                if cut == -1:
-                    if split_segments:
-                        yield segments_copy()
-                    return
-
-        yield segments_copy()
-
-
-class Segments:
-    """A simple renderable to render an iterable of segments. This class may be useful if
-    you want to print segments outside of a __rich_console__ method.
-
-    Args:
-        segments (Iterable[Segment]): An iterable of segments.
-        new_lines (bool, optional): Add new lines between segments. Defaults to False.
-    """
-
-    def __init__(self, segments: Iterable[Segment], new_lines: bool = False) -> None:
-        self.segments = list(segments)
-        self.new_lines = new_lines
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        if self.new_lines:
-            line = Segment.line()
-            for segment in self.segments:
-                yield segment
-                yield line
-        else:
-            yield from self.segments
-
-
-class SegmentLines:
-    def __init__(self, lines: Iterable[List[Segment]], new_lines: bool = False) -> None:
-        """A simple renderable containing a number of lines of segments. May be used as an intermediate
-        in rendering process.
-
-        Args:
-            lines (Iterable[List[Segment]]): Lists of segments forming lines.
-            new_lines (bool, optional): Insert new lines after each line. Defaults to False.
-        """
-        self.lines = list(lines)
-        self.new_lines = new_lines
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        if self.new_lines:
-            new_line = Segment.line()
-            for line in self.lines:
-                yield from line
-                yield new_line
-        else:
-            for line in self.lines:
-                yield from line
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from rich.console import Console
-    from rich.syntax import Syntax
-    from rich.text import Text
-
-    code = """from rich.console import Console
-console = Console()
-text = Text.from_markup("Hello, [bold magenta]World[/]!")
-console.print(text)"""
-
-    text = Text.from_markup("Hello, [bold magenta]World[/]!")
-
-    console = Console()
-
-    console.rule("rich.Segment")
-    console.print(
-        "A Segment is the last step in the Rich render process before generating text with ANSI codes."
-    )
-    console.print("\nConsider the following code:\n")
-    console.print(Syntax(code, "python", line_numbers=True))
-    console.print()
-    console.print(
-        "When you call [b]print()[/b], Rich [i]renders[/i] the object in to the following:\n"
-    )
-    fragments = list(console.render(text))
-    console.print(fragments)
-    console.print()
-    console.print("The Segments are then processed to produce the following output:\n")
-    console.print(text)
-    console.print(
-        "\nYou will only need to know this if you are implementing your own Rich renderables."
-    )
diff --git a/voxvera/vendor/rich/spinner.py b/voxvera/vendor/rich/spinner.py
deleted file mode 100644
index a3a3caf..0000000
--- a/voxvera/vendor/rich/spinner.py
+++ /dev/null
@@ -1,132 +0,0 @@
-from typing import TYPE_CHECKING, List, Optional, Union, cast
-
-from ._spinners import SPINNERS
-from .measure import Measurement
-from .table import Table
-from .text import Text
-
-if TYPE_CHECKING:
-    from .console import Console, ConsoleOptions, RenderableType, RenderResult
-    from .style import StyleType
-
-
-class Spinner:
-    """A spinner animation.
-
-    Args:
-        name (str): Name of spinner (run python -m rich.spinner).
-        text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
-        style (StyleType, optional): Style for spinner animation. Defaults to None.
-        speed (float, optional): Speed factor for animation. Defaults to 1.0.
-
-    Raises:
-        KeyError: If name isn't one of the supported spinner animations.
-    """
-
-    def __init__(
-        self,
-        name: str,
-        text: "RenderableType" = "",
-        *,
-        style: Optional["StyleType"] = None,
-        speed: float = 1.0,
-    ) -> None:
-        try:
-            spinner = SPINNERS[name]
-        except KeyError:
-            raise KeyError(f"no spinner called {name!r}")
-        self.text: "Union[RenderableType, Text]" = (
-            Text.from_markup(text) if isinstance(text, str) else text
-        )
-        self.name = name
-        self.frames = cast(List[str], spinner["frames"])[:]
-        self.interval = cast(float, spinner["interval"])
-        self.start_time: Optional[float] = None
-        self.style = style
-        self.speed = speed
-        self.frame_no_offset: float = 0.0
-        self._update_speed = 0.0
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        yield self.render(console.get_time())
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> Measurement:
-        text = self.render(0)
-        return Measurement.get(console, options, text)
-
-    def render(self, time: float) -> "RenderableType":
-        """Render the spinner for a given time.
-
-        Args:
-            time (float): Time in seconds.
-
-        Returns:
-            RenderableType: A renderable containing animation frame.
-        """
-        if self.start_time is None:
-            self.start_time = time
-
-        frame_no = ((time - self.start_time) * self.speed) / (
-            self.interval / 1000.0
-        ) + self.frame_no_offset
-        frame = Text(
-            self.frames[int(frame_no) % len(self.frames)], style=self.style or ""
-        )
-
-        if self._update_speed:
-            self.frame_no_offset = frame_no
-            self.start_time = time
-            self.speed = self._update_speed
-            self._update_speed = 0.0
-
-        if not self.text:
-            return frame
-        elif isinstance(self.text, (str, Text)):
-            return Text.assemble(frame, " ", self.text)
-        else:
-            table = Table.grid(padding=1)
-            table.add_row(frame, self.text)
-            return table
-
-    def update(
-        self,
-        *,
-        text: "RenderableType" = "",
-        style: Optional["StyleType"] = None,
-        speed: Optional[float] = None,
-    ) -> None:
-        """Updates attributes of a spinner after it has been started.
-
-        Args:
-            text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
-            style (StyleType, optional): Style for spinner animation. Defaults to None.
-            speed (float, optional): Speed factor for animation. Defaults to None.
-        """
-        if text:
-            self.text = Text.from_markup(text) if isinstance(text, str) else text
-        if style:
-            self.style = style
-        if speed:
-            self._update_speed = speed
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from time import sleep
-
-    from .console import Group
-    from .live import Live
-
-    all_spinners = Group(
-        *[
-            Spinner(spinner_name, text=Text(repr(spinner_name), style="green"))
-            for spinner_name in sorted(SPINNERS.keys())
-        ]
-    )
-
-    with Live(all_spinners, refresh_per_second=20) as live:
-        while True:
-            sleep(0.1)
diff --git a/voxvera/vendor/rich/status.py b/voxvera/vendor/rich/status.py
deleted file mode 100644
index 6574483..0000000
--- a/voxvera/vendor/rich/status.py
+++ /dev/null
@@ -1,131 +0,0 @@
-from types import TracebackType
-from typing import Optional, Type
-
-from .console import Console, RenderableType
-from .jupyter import JupyterMixin
-from .live import Live
-from .spinner import Spinner
-from .style import StyleType
-
-
-class Status(JupyterMixin):
-    """Displays a status indicator with a 'spinner' animation.
-
-    Args:
-        status (RenderableType): A status renderable (str or Text typically).
-        console (Console, optional): Console instance to use, or None for global console. Defaults to None.
-        spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
-        spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
-        speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
-        refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.
-    """
-
-    def __init__(
-        self,
-        status: RenderableType,
-        *,
-        console: Optional[Console] = None,
-        spinner: str = "dots",
-        spinner_style: StyleType = "status.spinner",
-        speed: float = 1.0,
-        refresh_per_second: float = 12.5,
-    ):
-        self.status = status
-        self.spinner_style = spinner_style
-        self.speed = speed
-        self._spinner = Spinner(spinner, text=status, style=spinner_style, speed=speed)
-        self._live = Live(
-            self.renderable,
-            console=console,
-            refresh_per_second=refresh_per_second,
-            transient=True,
-        )
-
-    @property
-    def renderable(self) -> Spinner:
-        return self._spinner
-
-    @property
-    def console(self) -> "Console":
-        """Get the Console used by the Status objects."""
-        return self._live.console
-
-    def update(
-        self,
-        status: Optional[RenderableType] = None,
-        *,
-        spinner: Optional[str] = None,
-        spinner_style: Optional[StyleType] = None,
-        speed: Optional[float] = None,
-    ) -> None:
-        """Update status.
-
-        Args:
-            status (Optional[RenderableType], optional): New status renderable or None for no change. Defaults to None.
-            spinner (Optional[str], optional): New spinner or None for no change. Defaults to None.
-            spinner_style (Optional[StyleType], optional): New spinner style or None for no change. Defaults to None.
-            speed (Optional[float], optional): Speed factor for spinner animation or None for no change. Defaults to None.
-        """
-        if status is not None:
-            self.status = status
-        if spinner_style is not None:
-            self.spinner_style = spinner_style
-        if speed is not None:
-            self.speed = speed
-        if spinner is not None:
-            self._spinner = Spinner(
-                spinner, text=self.status, style=self.spinner_style, speed=self.speed
-            )
-            self._live.update(self.renderable, refresh=True)
-        else:
-            self._spinner.update(
-                text=self.status, style=self.spinner_style, speed=self.speed
-            )
-
-    def start(self) -> None:
-        """Start the status animation."""
-        self._live.start()
-
-    def stop(self) -> None:
-        """Stop the spinner animation."""
-        self._live.stop()
-
-    def __rich__(self) -> RenderableType:
-        return self.renderable
-
-    def __enter__(self) -> "Status":
-        self.start()
-        return self
-
-    def __exit__(
-        self,
-        exc_type: Optional[Type[BaseException]],
-        exc_val: Optional[BaseException],
-        exc_tb: Optional[TracebackType],
-    ) -> None:
-        self.stop()
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from time import sleep
-
-    from .console import Console
-
-    console = Console()
-    with console.status("[magenta]Covid detector booting up") as status:
-        sleep(3)
-        console.log("Importing advanced AI")
-        sleep(3)
-        console.log("Advanced Covid AI Ready")
-        sleep(3)
-        status.update(status="[bold blue] Scanning for Covid", spinner="earth")
-        sleep(3)
-        console.log("Found 10,000,000,000 copies of Covid32.exe")
-        sleep(3)
-        status.update(
-            status="[bold red]Moving Covid32.exe to Trash",
-            spinner="bouncingBall",
-            spinner_style="yellow",
-        )
-        sleep(5)
-    console.print("[bold green]Covid deleted successfully")
diff --git a/voxvera/vendor/rich/style.py b/voxvera/vendor/rich/style.py
deleted file mode 100644
index 5294241..0000000
--- a/voxvera/vendor/rich/style.py
+++ /dev/null
@@ -1,792 +0,0 @@
-import sys
-from functools import lru_cache
-from operator import attrgetter
-from pickle import dumps, loads
-from random import randint
-from typing import Any, Dict, Iterable, List, Optional, Type, Union, cast
-
-from . import errors
-from .color import Color, ColorParseError, ColorSystem, blend_rgb
-from .repr import Result, rich_repr
-from .terminal_theme import DEFAULT_TERMINAL_THEME, TerminalTheme
-
-_hash_getter = attrgetter(
-    "_color", "_bgcolor", "_attributes", "_set_attributes", "_link", "_meta"
-)
-
-# Style instances and style definitions are often interchangeable
-StyleType = Union[str, "Style"]
-
-
-class _Bit:
-    """A descriptor to get/set a style attribute bit."""
-
-    __slots__ = ["bit"]
-
-    def __init__(self, bit_no: int) -> None:
-        self.bit = 1 << bit_no
-
-    def __get__(self, obj: "Style", objtype: Type["Style"]) -> Optional[bool]:
-        if obj._set_attributes & self.bit:
-            return obj._attributes & self.bit != 0
-        return None
-
-
-@rich_repr
-class Style:
-    """A terminal style.
-
-    A terminal style consists of a color (`color`), a background color (`bgcolor`), and a number of attributes, such
-    as bold, italic etc. The attributes have 3 states: they can either be on
-    (``True``), off (``False``), or not set (``None``).
-
-    Args:
-        color (Union[Color, str], optional): Color of terminal text. Defaults to None.
-        bgcolor (Union[Color, str], optional): Color of terminal background. Defaults to None.
-        bold (bool, optional): Enable bold text. Defaults to None.
-        dim (bool, optional): Enable dim text. Defaults to None.
-        italic (bool, optional): Enable italic text. Defaults to None.
-        underline (bool, optional): Enable underlined text. Defaults to None.
-        blink (bool, optional): Enabled blinking text. Defaults to None.
-        blink2 (bool, optional): Enable fast blinking text. Defaults to None.
-        reverse (bool, optional): Enabled reverse text. Defaults to None.
-        conceal (bool, optional): Enable concealed text. Defaults to None.
-        strike (bool, optional): Enable strikethrough text. Defaults to None.
-        underline2 (bool, optional): Enable doubly underlined text. Defaults to None.
-        frame (bool, optional): Enable framed text. Defaults to None.
-        encircle (bool, optional): Enable encircled text. Defaults to None.
-        overline (bool, optional): Enable overlined text. Defaults to None.
-        link (str, link): Link URL. Defaults to None.
-
-    """
-
-    _color: Optional[Color]
-    _bgcolor: Optional[Color]
-    _attributes: int
-    _set_attributes: int
-    _hash: Optional[int]
-    _null: bool
-    _meta: Optional[bytes]
-
-    __slots__ = [
-        "_color",
-        "_bgcolor",
-        "_attributes",
-        "_set_attributes",
-        "_link",
-        "_link_id",
-        "_ansi",
-        "_style_definition",
-        "_hash",
-        "_null",
-        "_meta",
-    ]
-
-    # maps bits on to SGR parameter
-    _style_map = {
-        0: "1",
-        1: "2",
-        2: "3",
-        3: "4",
-        4: "5",
-        5: "6",
-        6: "7",
-        7: "8",
-        8: "9",
-        9: "21",
-        10: "51",
-        11: "52",
-        12: "53",
-    }
-
-    STYLE_ATTRIBUTES = {
-        "dim": "dim",
-        "d": "dim",
-        "bold": "bold",
-        "b": "bold",
-        "italic": "italic",
-        "i": "italic",
-        "underline": "underline",
-        "u": "underline",
-        "blink": "blink",
-        "blink2": "blink2",
-        "reverse": "reverse",
-        "r": "reverse",
-        "conceal": "conceal",
-        "c": "conceal",
-        "strike": "strike",
-        "s": "strike",
-        "underline2": "underline2",
-        "uu": "underline2",
-        "frame": "frame",
-        "encircle": "encircle",
-        "overline": "overline",
-        "o": "overline",
-    }
-
-    def __init__(
-        self,
-        *,
-        color: Optional[Union[Color, str]] = None,
-        bgcolor: Optional[Union[Color, str]] = None,
-        bold: Optional[bool] = None,
-        dim: Optional[bool] = None,
-        italic: Optional[bool] = None,
-        underline: Optional[bool] = None,
-        blink: Optional[bool] = None,
-        blink2: Optional[bool] = None,
-        reverse: Optional[bool] = None,
-        conceal: Optional[bool] = None,
-        strike: Optional[bool] = None,
-        underline2: Optional[bool] = None,
-        frame: Optional[bool] = None,
-        encircle: Optional[bool] = None,
-        overline: Optional[bool] = None,
-        link: Optional[str] = None,
-        meta: Optional[Dict[str, Any]] = None,
-    ):
-        self._ansi: Optional[str] = None
-        self._style_definition: Optional[str] = None
-
-        def _make_color(color: Union[Color, str]) -> Color:
-            return color if isinstance(color, Color) else Color.parse(color)
-
-        self._color = None if color is None else _make_color(color)
-        self._bgcolor = None if bgcolor is None else _make_color(bgcolor)
-        self._set_attributes = sum(
-            (
-                bold is not None,
-                dim is not None and 2,
-                italic is not None and 4,
-                underline is not None and 8,
-                blink is not None and 16,
-                blink2 is not None and 32,
-                reverse is not None and 64,
-                conceal is not None and 128,
-                strike is not None and 256,
-                underline2 is not None and 512,
-                frame is not None and 1024,
-                encircle is not None and 2048,
-                overline is not None and 4096,
-            )
-        )
-        self._attributes = (
-            sum(
-                (
-                    bold and 1 or 0,
-                    dim and 2 or 0,
-                    italic and 4 or 0,
-                    underline and 8 or 0,
-                    blink and 16 or 0,
-                    blink2 and 32 or 0,
-                    reverse and 64 or 0,
-                    conceal and 128 or 0,
-                    strike and 256 or 0,
-                    underline2 and 512 or 0,
-                    frame and 1024 or 0,
-                    encircle and 2048 or 0,
-                    overline and 4096 or 0,
-                )
-            )
-            if self._set_attributes
-            else 0
-        )
-
-        self._link = link
-        self._meta = None if meta is None else dumps(meta)
-        self._link_id = (
-            f"{randint(0, 999999)}{hash(self._meta)}" if (link or meta) else ""
-        )
-        self._hash: Optional[int] = None
-        self._null = not (self._set_attributes or color or bgcolor or link or meta)
-
-    @classmethod
-    def null(cls) -> "Style":
-        """Create an 'null' style, equivalent to Style(), but more performant."""
-        return NULL_STYLE
-
-    @classmethod
-    def from_color(
-        cls, color: Optional[Color] = None, bgcolor: Optional[Color] = None
-    ) -> "Style":
-        """Create a new style with colors and no attributes.
-
-        Returns:
-            color (Optional[Color]): A (foreground) color, or None for no color. Defaults to None.
-            bgcolor (Optional[Color]): A (background) color, or None for no color. Defaults to None.
-        """
-        style: Style = cls.__new__(Style)
-        style._ansi = None
-        style._style_definition = None
-        style._color = color
-        style._bgcolor = bgcolor
-        style._set_attributes = 0
-        style._attributes = 0
-        style._link = None
-        style._link_id = ""
-        style._meta = None
-        style._null = not (color or bgcolor)
-        style._hash = None
-        return style
-
-    @classmethod
-    def from_meta(cls, meta: Optional[Dict[str, Any]]) -> "Style":
-        """Create a new style with meta data.
-
-        Returns:
-            meta (Optional[Dict[str, Any]]): A dictionary of meta data. Defaults to None.
-        """
-        style: Style = cls.__new__(Style)
-        style._ansi = None
-        style._style_definition = None
-        style._color = None
-        style._bgcolor = None
-        style._set_attributes = 0
-        style._attributes = 0
-        style._link = None
-        style._meta = dumps(meta)
-        style._link_id = f"{randint(0, 999999)}{hash(style._meta)}"
-        style._hash = None
-        style._null = not (meta)
-        return style
-
-    @classmethod
-    def on(cls, meta: Optional[Dict[str, Any]] = None, **handlers: Any) -> "Style":
-        """Create a blank style with meta information.
-
-        Example:
-            style = Style.on(click=self.on_click)
-
-        Args:
-            meta (Optional[Dict[str, Any]], optional): An optional dict of meta information.
-            **handlers (Any): Keyword arguments are translated in to handlers.
-
-        Returns:
-            Style: A Style with meta information attached.
-        """
-        meta = {} if meta is None else meta
-        meta.update({f"@{key}": value for key, value in handlers.items()})
-        return cls.from_meta(meta)
-
-    bold = _Bit(0)
-    dim = _Bit(1)
-    italic = _Bit(2)
-    underline = _Bit(3)
-    blink = _Bit(4)
-    blink2 = _Bit(5)
-    reverse = _Bit(6)
-    conceal = _Bit(7)
-    strike = _Bit(8)
-    underline2 = _Bit(9)
-    frame = _Bit(10)
-    encircle = _Bit(11)
-    overline = _Bit(12)
-
-    @property
-    def link_id(self) -> str:
-        """Get a link id, used in ansi code for links."""
-        return self._link_id
-
-    def __str__(self) -> str:
-        """Re-generate style definition from attributes."""
-        if self._style_definition is None:
-            attributes: List[str] = []
-            append = attributes.append
-            bits = self._set_attributes
-            if bits & 0b0000000001111:
-                if bits & 1:
-                    append("bold" if self.bold else "not bold")
-                if bits & (1 << 1):
-                    append("dim" if self.dim else "not dim")
-                if bits & (1 << 2):
-                    append("italic" if self.italic else "not italic")
-                if bits & (1 << 3):
-                    append("underline" if self.underline else "not underline")
-            if bits & 0b0000111110000:
-                if bits & (1 << 4):
-                    append("blink" if self.blink else "not blink")
-                if bits & (1 << 5):
-                    append("blink2" if self.blink2 else "not blink2")
-                if bits & (1 << 6):
-                    append("reverse" if self.reverse else "not reverse")
-                if bits & (1 << 7):
-                    append("conceal" if self.conceal else "not conceal")
-                if bits & (1 << 8):
-                    append("strike" if self.strike else "not strike")
-            if bits & 0b1111000000000:
-                if bits & (1 << 9):
-                    append("underline2" if self.underline2 else "not underline2")
-                if bits & (1 << 10):
-                    append("frame" if self.frame else "not frame")
-                if bits & (1 << 11):
-                    append("encircle" if self.encircle else "not encircle")
-                if bits & (1 << 12):
-                    append("overline" if self.overline else "not overline")
-            if self._color is not None:
-                append(self._color.name)
-            if self._bgcolor is not None:
-                append("on")
-                append(self._bgcolor.name)
-            if self._link:
-                append("link")
-                append(self._link)
-            self._style_definition = " ".join(attributes) or "none"
-        return self._style_definition
-
-    def __bool__(self) -> bool:
-        """A Style is false if it has no attributes, colors, or links."""
-        return not self._null
-
-    def _make_ansi_codes(self, color_system: ColorSystem) -> str:
-        """Generate ANSI codes for this style.
-
-        Args:
-            color_system (ColorSystem): Color system.
-
-        Returns:
-            str: String containing codes.
-        """
-
-        if self._ansi is None:
-            sgr: List[str] = []
-            append = sgr.append
-            _style_map = self._style_map
-            attributes = self._attributes & self._set_attributes
-            if attributes:
-                if attributes & 1:
-                    append(_style_map[0])
-                if attributes & 2:
-                    append(_style_map[1])
-                if attributes & 4:
-                    append(_style_map[2])
-                if attributes & 8:
-                    append(_style_map[3])
-                if attributes & 0b0000111110000:
-                    for bit in range(4, 9):
-                        if attributes & (1 << bit):
-                            append(_style_map[bit])
-                if attributes & 0b1111000000000:
-                    for bit in range(9, 13):
-                        if attributes & (1 << bit):
-                            append(_style_map[bit])
-            if self._color is not None:
-                sgr.extend(self._color.downgrade(color_system).get_ansi_codes())
-            if self._bgcolor is not None:
-                sgr.extend(
-                    self._bgcolor.downgrade(color_system).get_ansi_codes(
-                        foreground=False
-                    )
-                )
-            self._ansi = ";".join(sgr)
-        return self._ansi
-
-    @classmethod
-    @lru_cache(maxsize=1024)
-    def normalize(cls, style: str) -> str:
-        """Normalize a style definition so that styles with the same effect have the same string
-        representation.
-
-        Args:
-            style (str): A style definition.
-
-        Returns:
-            str: Normal form of style definition.
-        """
-        try:
-            return str(cls.parse(style))
-        except errors.StyleSyntaxError:
-            return style.strip().lower()
-
-    @classmethod
-    def pick_first(cls, *values: Optional[StyleType]) -> StyleType:
-        """Pick first non-None style."""
-        for value in values:
-            if value is not None:
-                return value
-        raise ValueError("expected at least one non-None style")
-
-    def __rich_repr__(self) -> Result:
-        yield "color", self.color, None
-        yield "bgcolor", self.bgcolor, None
-        yield "bold", self.bold, None,
-        yield "dim", self.dim, None,
-        yield "italic", self.italic, None
-        yield "underline", self.underline, None,
-        yield "blink", self.blink, None
-        yield "blink2", self.blink2, None
-        yield "reverse", self.reverse, None
-        yield "conceal", self.conceal, None
-        yield "strike", self.strike, None
-        yield "underline2", self.underline2, None
-        yield "frame", self.frame, None
-        yield "encircle", self.encircle, None
-        yield "link", self.link, None
-        if self._meta:
-            yield "meta", self.meta
-
-    def __eq__(self, other: Any) -> bool:
-        if not isinstance(other, Style):
-            return NotImplemented
-        return self.__hash__() == other.__hash__()
-
-    def __ne__(self, other: Any) -> bool:
-        if not isinstance(other, Style):
-            return NotImplemented
-        return self.__hash__() != other.__hash__()
-
-    def __hash__(self) -> int:
-        if self._hash is not None:
-            return self._hash
-        self._hash = hash(_hash_getter(self))
-        return self._hash
-
-    @property
-    def color(self) -> Optional[Color]:
-        """The foreground color or None if it is not set."""
-        return self._color
-
-    @property
-    def bgcolor(self) -> Optional[Color]:
-        """The background color or None if it is not set."""
-        return self._bgcolor
-
-    @property
-    def link(self) -> Optional[str]:
-        """Link text, if set."""
-        return self._link
-
-    @property
-    def transparent_background(self) -> bool:
-        """Check if the style specified a transparent background."""
-        return self.bgcolor is None or self.bgcolor.is_default
-
-    @property
-    def background_style(self) -> "Style":
-        """A Style with background only."""
-        return Style(bgcolor=self.bgcolor)
-
-    @property
-    def meta(self) -> Dict[str, Any]:
-        """Get meta information (can not be changed after construction)."""
-        return {} if self._meta is None else cast(Dict[str, Any], loads(self._meta))
-
-    @property
-    def without_color(self) -> "Style":
-        """Get a copy of the style with color removed."""
-        if self._null:
-            return NULL_STYLE
-        style: Style = self.__new__(Style)
-        style._ansi = None
-        style._style_definition = None
-        style._color = None
-        style._bgcolor = None
-        style._attributes = self._attributes
-        style._set_attributes = self._set_attributes
-        style._link = self._link
-        style._link_id = f"{randint(0, 999999)}" if self._link else ""
-        style._null = False
-        style._meta = None
-        style._hash = None
-        return style
-
-    @classmethod
-    @lru_cache(maxsize=4096)
-    def parse(cls, style_definition: str) -> "Style":
-        """Parse a style definition.
-
-        Args:
-            style_definition (str): A string containing a style.
-
-        Raises:
-            errors.StyleSyntaxError: If the style definition syntax is invalid.
-
-        Returns:
-            `Style`: A Style instance.
-        """
-        if style_definition.strip() == "none" or not style_definition:
-            return cls.null()
-
-        STYLE_ATTRIBUTES = cls.STYLE_ATTRIBUTES
-        color: Optional[str] = None
-        bgcolor: Optional[str] = None
-        attributes: Dict[str, Optional[Any]] = {}
-        link: Optional[str] = None
-
-        words = iter(style_definition.split())
-        for original_word in words:
-            word = original_word.lower()
-            if word == "on":
-                word = next(words, "")
-                if not word:
-                    raise errors.StyleSyntaxError("color expected after 'on'")
-                try:
-                    Color.parse(word)
-                except ColorParseError as error:
-                    raise errors.StyleSyntaxError(
-                        f"unable to parse {word!r} as background color; {error}"
-                    ) from None
-                bgcolor = word
-
-            elif word == "not":
-                word = next(words, "")
-                attribute = STYLE_ATTRIBUTES.get(word)
-                if attribute is None:
-                    raise errors.StyleSyntaxError(
-                        f"expected style attribute after 'not', found {word!r}"
-                    )
-                attributes[attribute] = False
-
-            elif word == "link":
-                word = next(words, "")
-                if not word:
-                    raise errors.StyleSyntaxError("URL expected after 'link'")
-                link = word
-
-            elif word in STYLE_ATTRIBUTES:
-                attributes[STYLE_ATTRIBUTES[word]] = True
-
-            else:
-                try:
-                    Color.parse(word)
-                except ColorParseError as error:
-                    raise errors.StyleSyntaxError(
-                        f"unable to parse {word!r} as color; {error}"
-                    ) from None
-                color = word
-        style = Style(color=color, bgcolor=bgcolor, link=link, **attributes)
-        return style
-
-    @lru_cache(maxsize=1024)
-    def get_html_style(self, theme: Optional[TerminalTheme] = None) -> str:
-        """Get a CSS style rule."""
-        theme = theme or DEFAULT_TERMINAL_THEME
-        css: List[str] = []
-        append = css.append
-
-        color = self.color
-        bgcolor = self.bgcolor
-        if self.reverse:
-            color, bgcolor = bgcolor, color
-        if self.dim:
-            foreground_color = (
-                theme.foreground_color if color is None else color.get_truecolor(theme)
-            )
-            color = Color.from_triplet(
-                blend_rgb(foreground_color, theme.background_color, 0.5)
-            )
-        if color is not None:
-            theme_color = color.get_truecolor(theme)
-            append(f"color: {theme_color.hex}")
-            append(f"text-decoration-color: {theme_color.hex}")
-        if bgcolor is not None:
-            theme_color = bgcolor.get_truecolor(theme, foreground=False)
-            append(f"background-color: {theme_color.hex}")
-        if self.bold:
-            append("font-weight: bold")
-        if self.italic:
-            append("font-style: italic")
-        if self.underline:
-            append("text-decoration: underline")
-        if self.strike:
-            append("text-decoration: line-through")
-        if self.overline:
-            append("text-decoration: overline")
-        return "; ".join(css)
-
-    @classmethod
-    def combine(cls, styles: Iterable["Style"]) -> "Style":
-        """Combine styles and get result.
-
-        Args:
-            styles (Iterable[Style]): Styles to combine.
-
-        Returns:
-            Style: A new style instance.
-        """
-        iter_styles = iter(styles)
-        return sum(iter_styles, next(iter_styles))
-
-    @classmethod
-    def chain(cls, *styles: "Style") -> "Style":
-        """Combine styles from positional argument in to a single style.
-
-        Args:
-            *styles (Iterable[Style]): Styles to combine.
-
-        Returns:
-            Style: A new style instance.
-        """
-        iter_styles = iter(styles)
-        return sum(iter_styles, next(iter_styles))
-
-    def copy(self) -> "Style":
-        """Get a copy of this style.
-
-        Returns:
-            Style: A new Style instance with identical attributes.
-        """
-        if self._null:
-            return NULL_STYLE
-        style: Style = self.__new__(Style)
-        style._ansi = self._ansi
-        style._style_definition = self._style_definition
-        style._color = self._color
-        style._bgcolor = self._bgcolor
-        style._attributes = self._attributes
-        style._set_attributes = self._set_attributes
-        style._link = self._link
-        style._link_id = f"{randint(0, 999999)}" if self._link else ""
-        style._hash = self._hash
-        style._null = False
-        style._meta = self._meta
-        return style
-
-    @lru_cache(maxsize=128)
-    def clear_meta_and_links(self) -> "Style":
-        """Get a copy of this style with link and meta information removed.
-
-        Returns:
-            Style: New style object.
-        """
-        if self._null:
-            return NULL_STYLE
-        style: Style = self.__new__(Style)
-        style._ansi = self._ansi
-        style._style_definition = self._style_definition
-        style._color = self._color
-        style._bgcolor = self._bgcolor
-        style._attributes = self._attributes
-        style._set_attributes = self._set_attributes
-        style._link = None
-        style._link_id = ""
-        style._hash = None
-        style._null = False
-        style._meta = None
-        return style
-
-    def update_link(self, link: Optional[str] = None) -> "Style":
-        """Get a copy with a different value for link.
-
-        Args:
-            link (str, optional): New value for link. Defaults to None.
-
-        Returns:
-            Style: A new Style instance.
-        """
-        style: Style = self.__new__(Style)
-        style._ansi = self._ansi
-        style._style_definition = self._style_definition
-        style._color = self._color
-        style._bgcolor = self._bgcolor
-        style._attributes = self._attributes
-        style._set_attributes = self._set_attributes
-        style._link = link
-        style._link_id = f"{randint(0, 999999)}" if link else ""
-        style._hash = None
-        style._null = False
-        style._meta = self._meta
-        return style
-
-    def render(
-        self,
-        text: str = "",
-        *,
-        color_system: Optional[ColorSystem] = ColorSystem.TRUECOLOR,
-        legacy_windows: bool = False,
-    ) -> str:
-        """Render the ANSI codes for the style.
-
-        Args:
-            text (str, optional): A string to style. Defaults to "".
-            color_system (Optional[ColorSystem], optional): Color system to render to. Defaults to ColorSystem.TRUECOLOR.
-
-        Returns:
-            str: A string containing ANSI style codes.
-        """
-        if not text or color_system is None:
-            return text
-        attrs = self._ansi or self._make_ansi_codes(color_system)
-        rendered = f"\x1b[{attrs}m{text}\x1b[0m" if attrs else text
-        if self._link and not legacy_windows:
-            rendered = (
-                f"\x1b]8;id={self._link_id};{self._link}\x1b\\{rendered}\x1b]8;;\x1b\\"
-            )
-        return rendered
-
-    def test(self, text: Optional[str] = None) -> None:
-        """Write text with style directly to terminal.
-
-        This method is for testing purposes only.
-
-        Args:
-            text (Optional[str], optional): Text to style or None for style name.
-
-        """
-        text = text or str(self)
-        sys.stdout.write(f"{self.render(text)}\n")
-
-    @lru_cache(maxsize=1024)
-    def _add(self, style: Optional["Style"]) -> "Style":
-        if style is None or style._null:
-            return self
-        if self._null:
-            return style
-        new_style: Style = self.__new__(Style)
-        new_style._ansi = None
-        new_style._style_definition = None
-        new_style._color = style._color or self._color
-        new_style._bgcolor = style._bgcolor or self._bgcolor
-        new_style._attributes = (self._attributes & ~style._set_attributes) | (
-            style._attributes & style._set_attributes
-        )
-        new_style._set_attributes = self._set_attributes | style._set_attributes
-        new_style._link = style._link or self._link
-        new_style._link_id = style._link_id or self._link_id
-        new_style._null = style._null
-        if self._meta and style._meta:
-            new_style._meta = dumps({**self.meta, **style.meta})
-        else:
-            new_style._meta = self._meta or style._meta
-        new_style._hash = None
-        return new_style
-
-    def __add__(self, style: Optional["Style"]) -> "Style":
-        combined_style = self._add(style)
-        return combined_style.copy() if combined_style.link else combined_style
-
-
-NULL_STYLE = Style()
-
-
-class StyleStack:
-    """A stack of styles."""
-
-    __slots__ = ["_stack"]
-
-    def __init__(self, default_style: "Style") -> None:
-        self._stack: List[Style] = [default_style]
-
-    def __repr__(self) -> str:
-        return f""
-
-    @property
-    def current(self) -> Style:
-        """Get the Style at the top of the stack."""
-        return self._stack[-1]
-
-    def push(self, style: Style) -> None:
-        """Push a new style on to the stack.
-
-        Args:
-            style (Style): New style to combine with current style.
-        """
-        self._stack.append(self._stack[-1] + style)
-
-    def pop(self) -> Style:
-        """Pop last style and discard.
-
-        Returns:
-            Style: New current style (also available as stack.current)
-        """
-        self._stack.pop()
-        return self._stack[-1]
diff --git a/voxvera/vendor/rich/styled.py b/voxvera/vendor/rich/styled.py
deleted file mode 100644
index 27243be..0000000
--- a/voxvera/vendor/rich/styled.py
+++ /dev/null
@@ -1,42 +0,0 @@
-from typing import TYPE_CHECKING
-
-from .measure import Measurement
-from .segment import Segment
-from .style import StyleType
-
-if TYPE_CHECKING:
-    from .console import Console, ConsoleOptions, RenderResult, RenderableType
-
-
-class Styled:
-    """Apply a style to a renderable.
-
-    Args:
-        renderable (RenderableType): Any renderable.
-        style (StyleType): A style to apply across the entire renderable.
-    """
-
-    def __init__(self, renderable: "RenderableType", style: "StyleType") -> None:
-        self.renderable = renderable
-        self.style = style
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        style = console.get_style(self.style)
-        rendered_segments = console.render(self.renderable, options)
-        segments = Segment.apply_style(rendered_segments, style)
-        return segments
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> Measurement:
-        return Measurement.get(console, options, self.renderable)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from rich import print
-    from rich.panel import Panel
-
-    panel = Styled(Panel("hello"), "on blue")
-    print(panel)
diff --git a/voxvera/vendor/rich/syntax.py b/voxvera/vendor/rich/syntax.py
deleted file mode 100644
index 5e17b48..0000000
--- a/voxvera/vendor/rich/syntax.py
+++ /dev/null
@@ -1,985 +0,0 @@
-from __future__ import annotations
-
-import os.path
-import re
-import sys
-import textwrap
-from abc import ABC, abstractmethod
-from pathlib import Path
-from typing import (
-    Any,
-    Dict,
-    Iterable,
-    List,
-    NamedTuple,
-    Optional,
-    Sequence,
-    Set,
-    Tuple,
-    Type,
-    Union,
-)
-
-from pygments.lexer import Lexer
-from pygments.lexers import get_lexer_by_name, guess_lexer_for_filename
-from pygments.style import Style as PygmentsStyle
-from pygments.styles import get_style_by_name
-from pygments.token import (
-    Comment,
-    Error,
-    Generic,
-    Keyword,
-    Name,
-    Number,
-    Operator,
-    String,
-    Token,
-    Whitespace,
-)
-from pygments.util import ClassNotFound
-
-from rich.containers import Lines
-from rich.padding import Padding, PaddingDimensions
-
-from ._loop import loop_first
-from .cells import cell_len
-from .color import Color, blend_rgb
-from .console import Console, ConsoleOptions, JustifyMethod, RenderResult
-from .jupyter import JupyterMixin
-from .measure import Measurement
-from .segment import Segment, Segments
-from .style import Style, StyleType
-from .text import Text
-
-TokenType = Tuple[str, ...]
-
-WINDOWS = sys.platform == "win32"
-DEFAULT_THEME = "monokai"
-
-# The following styles are based on https://github.com/pygments/pygments/blob/master/pygments/formatters/terminal.py
-# A few modifications were made
-
-ANSI_LIGHT: Dict[TokenType, Style] = {
-    Token: Style(),
-    Whitespace: Style(color="white"),
-    Comment: Style(dim=True),
-    Comment.Preproc: Style(color="cyan"),
-    Keyword: Style(color="blue"),
-    Keyword.Type: Style(color="cyan"),
-    Operator.Word: Style(color="magenta"),
-    Name.Builtin: Style(color="cyan"),
-    Name.Function: Style(color="green"),
-    Name.Namespace: Style(color="cyan", underline=True),
-    Name.Class: Style(color="green", underline=True),
-    Name.Exception: Style(color="cyan"),
-    Name.Decorator: Style(color="magenta", bold=True),
-    Name.Variable: Style(color="red"),
-    Name.Constant: Style(color="red"),
-    Name.Attribute: Style(color="cyan"),
-    Name.Tag: Style(color="bright_blue"),
-    String: Style(color="yellow"),
-    Number: Style(color="blue"),
-    Generic.Deleted: Style(color="bright_red"),
-    Generic.Inserted: Style(color="green"),
-    Generic.Heading: Style(bold=True),
-    Generic.Subheading: Style(color="magenta", bold=True),
-    Generic.Prompt: Style(bold=True),
-    Generic.Error: Style(color="bright_red"),
-    Error: Style(color="red", underline=True),
-}
-
-ANSI_DARK: Dict[TokenType, Style] = {
-    Token: Style(),
-    Whitespace: Style(color="bright_black"),
-    Comment: Style(dim=True),
-    Comment.Preproc: Style(color="bright_cyan"),
-    Keyword: Style(color="bright_blue"),
-    Keyword.Type: Style(color="bright_cyan"),
-    Operator.Word: Style(color="bright_magenta"),
-    Name.Builtin: Style(color="bright_cyan"),
-    Name.Function: Style(color="bright_green"),
-    Name.Namespace: Style(color="bright_cyan", underline=True),
-    Name.Class: Style(color="bright_green", underline=True),
-    Name.Exception: Style(color="bright_cyan"),
-    Name.Decorator: Style(color="bright_magenta", bold=True),
-    Name.Variable: Style(color="bright_red"),
-    Name.Constant: Style(color="bright_red"),
-    Name.Attribute: Style(color="bright_cyan"),
-    Name.Tag: Style(color="bright_blue"),
-    String: Style(color="yellow"),
-    Number: Style(color="bright_blue"),
-    Generic.Deleted: Style(color="bright_red"),
-    Generic.Inserted: Style(color="bright_green"),
-    Generic.Heading: Style(bold=True),
-    Generic.Subheading: Style(color="bright_magenta", bold=True),
-    Generic.Prompt: Style(bold=True),
-    Generic.Error: Style(color="bright_red"),
-    Error: Style(color="red", underline=True),
-}
-
-RICH_SYNTAX_THEMES = {"ansi_light": ANSI_LIGHT, "ansi_dark": ANSI_DARK}
-NUMBERS_COLUMN_DEFAULT_PADDING = 2
-
-
-class SyntaxTheme(ABC):
-    """Base class for a syntax theme."""
-
-    @abstractmethod
-    def get_style_for_token(self, token_type: TokenType) -> Style:
-        """Get a style for a given Pygments token."""
-        raise NotImplementedError  # pragma: no cover
-
-    @abstractmethod
-    def get_background_style(self) -> Style:
-        """Get the background color."""
-        raise NotImplementedError  # pragma: no cover
-
-
-class PygmentsSyntaxTheme(SyntaxTheme):
-    """Syntax theme that delegates to Pygments theme."""
-
-    def __init__(self, theme: Union[str, Type[PygmentsStyle]]) -> None:
-        self._style_cache: Dict[TokenType, Style] = {}
-        if isinstance(theme, str):
-            try:
-                self._pygments_style_class = get_style_by_name(theme)
-            except ClassNotFound:
-                self._pygments_style_class = get_style_by_name("default")
-        else:
-            self._pygments_style_class = theme
-
-        self._background_color = self._pygments_style_class.background_color
-        self._background_style = Style(bgcolor=self._background_color)
-
-    def get_style_for_token(self, token_type: TokenType) -> Style:
-        """Get a style from a Pygments class."""
-        try:
-            return self._style_cache[token_type]
-        except KeyError:
-            try:
-                pygments_style = self._pygments_style_class.style_for_token(token_type)
-            except KeyError:
-                style = Style.null()
-            else:
-                color = pygments_style["color"]
-                bgcolor = pygments_style["bgcolor"]
-                style = Style(
-                    color="#" + color if color else "#000000",
-                    bgcolor="#" + bgcolor if bgcolor else self._background_color,
-                    bold=pygments_style["bold"],
-                    italic=pygments_style["italic"],
-                    underline=pygments_style["underline"],
-                )
-            self._style_cache[token_type] = style
-        return style
-
-    def get_background_style(self) -> Style:
-        return self._background_style
-
-
-class ANSISyntaxTheme(SyntaxTheme):
-    """Syntax theme to use standard colors."""
-
-    def __init__(self, style_map: Dict[TokenType, Style]) -> None:
-        self.style_map = style_map
-        self._missing_style = Style.null()
-        self._background_style = Style.null()
-        self._style_cache: Dict[TokenType, Style] = {}
-
-    def get_style_for_token(self, token_type: TokenType) -> Style:
-        """Look up style in the style map."""
-        try:
-            return self._style_cache[token_type]
-        except KeyError:
-            # Styles form a hierarchy
-            # We need to go from most to least specific
-            # e.g. ("foo", "bar", "baz") to ("foo", "bar")  to ("foo",)
-            get_style = self.style_map.get
-            token = tuple(token_type)
-            style = self._missing_style
-            while token:
-                _style = get_style(token)
-                if _style is not None:
-                    style = _style
-                    break
-                token = token[:-1]
-            self._style_cache[token_type] = style
-            return style
-
-    def get_background_style(self) -> Style:
-        return self._background_style
-
-
-SyntaxPosition = Tuple[int, int]
-
-
-class _SyntaxHighlightRange(NamedTuple):
-    """
-    A range to highlight in a Syntax object.
-    `start` and `end` are 2-integers tuples, where the first integer is the line number
-    (starting from 1) and the second integer is the column index (starting from 0).
-    """
-
-    style: StyleType
-    start: SyntaxPosition
-    end: SyntaxPosition
-    style_before: bool = False
-
-
-class PaddingProperty:
-    """Descriptor to get and set padding."""
-
-    def __get__(self, obj: Syntax, objtype: Type[Syntax]) -> Tuple[int, int, int, int]:
-        """Space around the Syntax."""
-        return obj._padding
-
-    def __set__(self, obj: Syntax, padding: PaddingDimensions) -> None:
-        obj._padding = Padding.unpack(padding)
-
-
-class Syntax(JupyterMixin):
-    """Construct a Syntax object to render syntax highlighted code.
-
-    Args:
-        code (str): Code to highlight.
-        lexer (Lexer | str): Lexer to use (see https://pygments.org/docs/lexers/)
-        theme (str, optional): Color theme, aka Pygments style (see https://pygments.org/docs/styles/#getting-a-list-of-available-styles). Defaults to "monokai".
-        dedent (bool, optional): Enable stripping of initial whitespace. Defaults to False.
-        line_numbers (bool, optional): Enable rendering of line numbers. Defaults to False.
-        start_line (int, optional): Starting number for line numbers. Defaults to 1.
-        line_range (Tuple[int | None, int | None], optional): If given should be a tuple of the start and end line to render.
-            A value of None in the tuple indicates the range is open in that direction.
-        highlight_lines (Set[int]): A set of line numbers to highlight.
-        code_width: Width of code to render (not including line numbers), or ``None`` to use all available width.
-        tab_size (int, optional): Size of tabs. Defaults to 4.
-        word_wrap (bool, optional): Enable word wrapping.
-        background_color (str, optional): Optional background color, or None to use theme color. Defaults to None.
-        indent_guides (bool, optional): Show indent guides. Defaults to False.
-        padding (PaddingDimensions): Padding to apply around the syntax. Defaults to 0 (no padding).
-    """
-
-    _pygments_style_class: Type[PygmentsStyle]
-    _theme: SyntaxTheme
-
-    @classmethod
-    def get_theme(cls, name: Union[str, SyntaxTheme]) -> SyntaxTheme:
-        """Get a syntax theme instance."""
-        if isinstance(name, SyntaxTheme):
-            return name
-        theme: SyntaxTheme
-        if name in RICH_SYNTAX_THEMES:
-            theme = ANSISyntaxTheme(RICH_SYNTAX_THEMES[name])
-        else:
-            theme = PygmentsSyntaxTheme(name)
-        return theme
-
-    def __init__(
-        self,
-        code: str,
-        lexer: Union[Lexer, str],
-        *,
-        theme: Union[str, SyntaxTheme] = DEFAULT_THEME,
-        dedent: bool = False,
-        line_numbers: bool = False,
-        start_line: int = 1,
-        line_range: Optional[Tuple[Optional[int], Optional[int]]] = None,
-        highlight_lines: Optional[Set[int]] = None,
-        code_width: Optional[int] = None,
-        tab_size: int = 4,
-        word_wrap: bool = False,
-        background_color: Optional[str] = None,
-        indent_guides: bool = False,
-        padding: PaddingDimensions = 0,
-    ) -> None:
-        self.code = code
-        self._lexer = lexer
-        self.dedent = dedent
-        self.line_numbers = line_numbers
-        self.start_line = start_line
-        self.line_range = line_range
-        self.highlight_lines = highlight_lines or set()
-        self.code_width = code_width
-        self.tab_size = tab_size
-        self.word_wrap = word_wrap
-        self.background_color = background_color
-        self.background_style = (
-            Style(bgcolor=background_color) if background_color else Style()
-        )
-        self.indent_guides = indent_guides
-        self._padding = Padding.unpack(padding)
-
-        self._theme = self.get_theme(theme)
-        self._stylized_ranges: List[_SyntaxHighlightRange] = []
-
-    padding = PaddingProperty()
-
-    @classmethod
-    def from_path(
-        cls,
-        path: str,
-        encoding: str = "utf-8",
-        lexer: Optional[Union[Lexer, str]] = None,
-        theme: Union[str, SyntaxTheme] = DEFAULT_THEME,
-        dedent: bool = False,
-        line_numbers: bool = False,
-        line_range: Optional[Tuple[int, int]] = None,
-        start_line: int = 1,
-        highlight_lines: Optional[Set[int]] = None,
-        code_width: Optional[int] = None,
-        tab_size: int = 4,
-        word_wrap: bool = False,
-        background_color: Optional[str] = None,
-        indent_guides: bool = False,
-        padding: PaddingDimensions = 0,
-    ) -> "Syntax":
-        """Construct a Syntax object from a file.
-
-        Args:
-            path (str): Path to file to highlight.
-            encoding (str): Encoding of file.
-            lexer (str | Lexer, optional): Lexer to use. If None, lexer will be auto-detected from path/file content.
-            theme (str, optional): Color theme, aka Pygments style (see https://pygments.org/docs/styles/#getting-a-list-of-available-styles). Defaults to "emacs".
-            dedent (bool, optional): Enable stripping of initial whitespace. Defaults to True.
-            line_numbers (bool, optional): Enable rendering of line numbers. Defaults to False.
-            start_line (int, optional): Starting number for line numbers. Defaults to 1.
-            line_range (Tuple[int, int], optional): If given should be a tuple of the start and end line to render.
-            highlight_lines (Set[int]): A set of line numbers to highlight.
-            code_width: Width of code to render (not including line numbers), or ``None`` to use all available width.
-            tab_size (int, optional): Size of tabs. Defaults to 4.
-            word_wrap (bool, optional): Enable word wrapping of code.
-            background_color (str, optional): Optional background color, or None to use theme color. Defaults to None.
-            indent_guides (bool, optional): Show indent guides. Defaults to False.
-            padding (PaddingDimensions): Padding to apply around the syntax. Defaults to 0 (no padding).
-
-        Returns:
-            [Syntax]: A Syntax object that may be printed to the console
-        """
-        code = Path(path).read_text(encoding=encoding)
-
-        if not lexer:
-            lexer = cls.guess_lexer(path, code=code)
-
-        return cls(
-            code,
-            lexer,
-            theme=theme,
-            dedent=dedent,
-            line_numbers=line_numbers,
-            line_range=line_range,
-            start_line=start_line,
-            highlight_lines=highlight_lines,
-            code_width=code_width,
-            tab_size=tab_size,
-            word_wrap=word_wrap,
-            background_color=background_color,
-            indent_guides=indent_guides,
-            padding=padding,
-        )
-
-    @classmethod
-    def guess_lexer(cls, path: str, code: Optional[str] = None) -> str:
-        """Guess the alias of the Pygments lexer to use based on a path and an optional string of code.
-        If code is supplied, it will use a combination of the code and the filename to determine the
-        best lexer to use. For example, if the file is ``index.html`` and the file contains Django
-        templating syntax, then "html+django" will be returned. If the file is ``index.html``, and no
-        templating language is used, the "html" lexer will be used. If no string of code
-        is supplied, the lexer will be chosen based on the file extension..
-
-        Args:
-            path (AnyStr): The path to the file containing the code you wish to know the lexer for.
-            code (str, optional): Optional string of code that will be used as a fallback if no lexer
-                is found for the supplied path.
-
-        Returns:
-            str: The name of the Pygments lexer that best matches the supplied path/code.
-        """
-        lexer: Optional[Lexer] = None
-        lexer_name = "default"
-        if code:
-            try:
-                lexer = guess_lexer_for_filename(path, code)
-            except ClassNotFound:
-                pass
-
-        if not lexer:
-            try:
-                _, ext = os.path.splitext(path)
-                if ext:
-                    extension = ext.lstrip(".").lower()
-                    lexer = get_lexer_by_name(extension)
-            except ClassNotFound:
-                pass
-
-        if lexer:
-            if lexer.aliases:
-                lexer_name = lexer.aliases[0]
-            else:
-                lexer_name = lexer.name
-
-        return lexer_name
-
-    def _get_base_style(self) -> Style:
-        """Get the base style."""
-        default_style = self._theme.get_background_style() + self.background_style
-        return default_style
-
-    def _get_token_color(self, token_type: TokenType) -> Optional[Color]:
-        """Get a color (if any) for the given token.
-
-        Args:
-            token_type (TokenType): A token type tuple from Pygments.
-
-        Returns:
-            Optional[Color]: Color from theme, or None for no color.
-        """
-        style = self._theme.get_style_for_token(token_type)
-        return style.color
-
-    @property
-    def lexer(self) -> Optional[Lexer]:
-        """The lexer for this syntax, or None if no lexer was found.
-
-        Tries to find the lexer by name if a string was passed to the constructor.
-        """
-
-        if isinstance(self._lexer, Lexer):
-            return self._lexer
-        try:
-            return get_lexer_by_name(
-                self._lexer,
-                stripnl=False,
-                ensurenl=True,
-                tabsize=self.tab_size,
-            )
-        except ClassNotFound:
-            return None
-
-    @property
-    def default_lexer(self) -> Lexer:
-        """A Pygments Lexer to use if one is not specified or invalid."""
-        return get_lexer_by_name(
-            "text",
-            stripnl=False,
-            ensurenl=True,
-            tabsize=self.tab_size,
-        )
-
-    def highlight(
-        self,
-        code: str,
-        line_range: Optional[Tuple[Optional[int], Optional[int]]] = None,
-    ) -> Text:
-        """Highlight code and return a Text instance.
-
-        Args:
-            code (str): Code to highlight.
-            line_range(Tuple[int, int], optional): Optional line range to highlight.
-
-        Returns:
-            Text: A text instance containing highlighted syntax.
-        """
-
-        base_style = self._get_base_style()
-        justify: JustifyMethod = (
-            "default" if base_style.transparent_background else "left"
-        )
-
-        text = Text(
-            justify=justify,
-            style=base_style,
-            tab_size=self.tab_size,
-            no_wrap=not self.word_wrap,
-        )
-        _get_theme_style = self._theme.get_style_for_token
-
-        lexer = self.lexer or self.default_lexer
-
-        if lexer is None:
-            text.append(code)
-        else:
-            if line_range:
-                # More complicated path to only stylize a portion of the code
-                # This speeds up further operations as there are less spans to process
-                line_start, line_end = line_range
-
-                def line_tokenize() -> Iterable[Tuple[Any, str]]:
-                    """Split tokens to one per line."""
-                    assert lexer  # required to make MyPy happy - we know lexer is not None at this point
-
-                    for token_type, token in lexer.get_tokens(code):
-                        while token:
-                            line_token, new_line, token = token.partition("\n")
-                            yield token_type, line_token + new_line
-
-                def tokens_to_spans() -> Iterable[Tuple[str, Optional[Style]]]:
-                    """Convert tokens to spans."""
-                    tokens = iter(line_tokenize())
-                    line_no = 0
-                    _line_start = line_start - 1 if line_start else 0
-
-                    # Skip over tokens until line start
-                    while line_no < _line_start:
-                        try:
-                            _token_type, token = next(tokens)
-                        except StopIteration:
-                            break
-                        yield (token, None)
-                        if token.endswith("\n"):
-                            line_no += 1
-                    # Generate spans until line end
-                    for token_type, token in tokens:
-                        yield (token, _get_theme_style(token_type))
-                        if token.endswith("\n"):
-                            line_no += 1
-                            if line_end and line_no >= line_end:
-                                break
-
-                text.append_tokens(tokens_to_spans())
-
-            else:
-                text.append_tokens(
-                    (token, _get_theme_style(token_type))
-                    for token_type, token in lexer.get_tokens(code)
-                )
-            if self.background_color is not None:
-                text.stylize(f"on {self.background_color}")
-
-        if self._stylized_ranges:
-            self._apply_stylized_ranges(text)
-
-        return text
-
-    def stylize_range(
-        self,
-        style: StyleType,
-        start: SyntaxPosition,
-        end: SyntaxPosition,
-        style_before: bool = False,
-    ) -> None:
-        """
-        Adds a custom style on a part of the code, that will be applied to the syntax display when it's rendered.
-        Line numbers are 1-based, while column indexes are 0-based.
-
-        Args:
-            style (StyleType): The style to apply.
-            start (Tuple[int, int]): The start of the range, in the form `[line number, column index]`.
-            end (Tuple[int, int]): The end of the range, in the form `[line number, column index]`.
-            style_before (bool): Apply the style before any existing styles.
-        """
-        self._stylized_ranges.append(
-            _SyntaxHighlightRange(style, start, end, style_before)
-        )
-
-    def _get_line_numbers_color(self, blend: float = 0.3) -> Color:
-        background_style = self._theme.get_background_style() + self.background_style
-        background_color = background_style.bgcolor
-        if background_color is None or background_color.is_system_defined:
-            return Color.default()
-        foreground_color = self._get_token_color(Token.Text)
-        if foreground_color is None or foreground_color.is_system_defined:
-            return foreground_color or Color.default()
-        new_color = blend_rgb(
-            background_color.get_truecolor(),
-            foreground_color.get_truecolor(),
-            cross_fade=blend,
-        )
-        return Color.from_triplet(new_color)
-
-    @property
-    def _numbers_column_width(self) -> int:
-        """Get the number of characters used to render the numbers column."""
-        column_width = 0
-        if self.line_numbers:
-            column_width = (
-                len(str(self.start_line + self.code.count("\n")))
-                + NUMBERS_COLUMN_DEFAULT_PADDING
-            )
-        return column_width
-
-    def _get_number_styles(self, console: Console) -> Tuple[Style, Style, Style]:
-        """Get background, number, and highlight styles for line numbers."""
-        background_style = self._get_base_style()
-        if background_style.transparent_background:
-            return Style.null(), Style(dim=True), Style.null()
-        if console.color_system in ("256", "truecolor"):
-            number_style = Style.chain(
-                background_style,
-                self._theme.get_style_for_token(Token.Text),
-                Style(color=self._get_line_numbers_color()),
-                self.background_style,
-            )
-            highlight_number_style = Style.chain(
-                background_style,
-                self._theme.get_style_for_token(Token.Text),
-                Style(bold=True, color=self._get_line_numbers_color(0.9)),
-                self.background_style,
-            )
-        else:
-            number_style = background_style + Style(dim=True)
-            highlight_number_style = background_style + Style(dim=False)
-        return background_style, number_style, highlight_number_style
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "Measurement":
-        _, right, _, left = self.padding
-        padding = left + right
-        if self.code_width is not None:
-            width = self.code_width + self._numbers_column_width + padding + 1
-            return Measurement(self._numbers_column_width, width)
-        lines = self.code.splitlines()
-        width = (
-            self._numbers_column_width
-            + padding
-            + (max(cell_len(line) for line in lines) if lines else 0)
-        )
-        if self.line_numbers:
-            width += 1
-        return Measurement(self._numbers_column_width, width)
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        segments = Segments(self._get_syntax(console, options))
-        if any(self.padding):
-            yield Padding(segments, style=self._get_base_style(), pad=self.padding)
-        else:
-            yield segments
-
-    def _get_syntax(
-        self,
-        console: Console,
-        options: ConsoleOptions,
-    ) -> Iterable[Segment]:
-        """
-        Get the Segments for the Syntax object, excluding any vertical/horizontal padding
-        """
-        transparent_background = self._get_base_style().transparent_background
-        _pad_top, pad_right, _pad_bottom, pad_left = self.padding
-        horizontal_padding = pad_left + pad_right
-        code_width = (
-            (
-                (options.max_width - self._numbers_column_width - 1)
-                if self.line_numbers
-                else options.max_width
-            )
-            - horizontal_padding
-            if self.code_width is None
-            else self.code_width
-        )
-        code_width = max(0, code_width)
-
-        ends_on_nl, processed_code = self._process_code(self.code)
-        text = self.highlight(processed_code, self.line_range)
-
-        if not self.line_numbers and not self.word_wrap and not self.line_range:
-            if not ends_on_nl:
-                text.remove_suffix("\n")
-            # Simple case of just rendering text
-            style = (
-                self._get_base_style()
-                + self._theme.get_style_for_token(Comment)
-                + Style(dim=True)
-                + self.background_style
-            )
-            if self.indent_guides and not options.ascii_only:
-                text = text.with_indent_guides(self.tab_size, style=style)
-                text.overflow = "crop"
-            if style.transparent_background:
-                yield from console.render(
-                    text, options=options.update(width=code_width)
-                )
-            else:
-                syntax_lines = console.render_lines(
-                    text,
-                    options.update(width=code_width, height=None, justify="left"),
-                    style=self.background_style,
-                    pad=True,
-                    new_lines=True,
-                )
-                for syntax_line in syntax_lines:
-                    yield from syntax_line
-            return
-
-        start_line, end_line = self.line_range or (None, None)
-        line_offset = 0
-        if start_line:
-            line_offset = max(0, start_line - 1)
-        lines: Union[List[Text], Lines] = text.split("\n", allow_blank=ends_on_nl)
-        if self.line_range:
-            if line_offset > len(lines):
-                return
-            lines = lines[line_offset:end_line]
-
-        if self.indent_guides and not options.ascii_only:
-            style = (
-                self._get_base_style()
-                + self._theme.get_style_for_token(Comment)
-                + Style(dim=True)
-                + self.background_style
-            )
-            lines = (
-                Text("\n")
-                .join(lines)
-                .with_indent_guides(self.tab_size, style=style + Style(italic=False))
-                .split("\n", allow_blank=True)
-            )
-
-        numbers_column_width = self._numbers_column_width
-        render_options = options.update(width=code_width)
-
-        highlight_line = self.highlight_lines.__contains__
-        _Segment = Segment
-        new_line = _Segment("\n")
-
-        line_pointer = "> " if options.legacy_windows else "❱ "
-
-        (
-            background_style,
-            number_style,
-            highlight_number_style,
-        ) = self._get_number_styles(console)
-
-        for line_no, line in enumerate(lines, self.start_line + line_offset):
-            if self.word_wrap:
-                wrapped_lines = console.render_lines(
-                    line,
-                    render_options.update(height=None, justify="left"),
-                    style=background_style,
-                    pad=not transparent_background,
-                )
-            else:
-                segments = list(line.render(console, end=""))
-                if options.no_wrap:
-                    wrapped_lines = [segments]
-                else:
-                    wrapped_lines = [
-                        _Segment.adjust_line_length(
-                            segments,
-                            render_options.max_width,
-                            style=background_style,
-                            pad=not transparent_background,
-                        )
-                    ]
-
-            if self.line_numbers:
-                wrapped_line_left_pad = _Segment(
-                    " " * numbers_column_width + " ", background_style
-                )
-                for first, wrapped_line in loop_first(wrapped_lines):
-                    if first:
-                        line_column = str(line_no).rjust(numbers_column_width - 2) + " "
-                        if highlight_line(line_no):
-                            yield _Segment(line_pointer, Style(color="red"))
-                            yield _Segment(line_column, highlight_number_style)
-                        else:
-                            yield _Segment("  ", highlight_number_style)
-                            yield _Segment(line_column, number_style)
-                    else:
-                        yield wrapped_line_left_pad
-                    yield from wrapped_line
-                    yield new_line
-            else:
-                for wrapped_line in wrapped_lines:
-                    yield from wrapped_line
-                    yield new_line
-
-    def _apply_stylized_ranges(self, text: Text) -> None:
-        """
-        Apply stylized ranges to a text instance,
-        using the given code to determine the right portion to apply the style to.
-
-        Args:
-            text (Text): Text instance to apply the style to.
-        """
-        code = text.plain
-        newlines_offsets = [
-            # Let's add outer boundaries at each side of the list:
-            0,
-            # N.B. using "\n" here is much faster than using metacharacters such as "^" or "\Z":
-            *[
-                match.start() + 1
-                for match in re.finditer("\n", code, flags=re.MULTILINE)
-            ],
-            len(code) + 1,
-        ]
-
-        for stylized_range in self._stylized_ranges:
-            start = _get_code_index_for_syntax_position(
-                newlines_offsets, stylized_range.start
-            )
-            end = _get_code_index_for_syntax_position(
-                newlines_offsets, stylized_range.end
-            )
-            if start is not None and end is not None:
-                if stylized_range.style_before:
-                    text.stylize_before(stylized_range.style, start, end)
-                else:
-                    text.stylize(stylized_range.style, start, end)
-
-    def _process_code(self, code: str) -> Tuple[bool, str]:
-        """
-        Applies various processing to a raw code string
-        (normalises it so it always ends with a line return, dedents it if necessary, etc.)
-
-        Args:
-            code (str): The raw code string to process
-
-        Returns:
-            Tuple[bool, str]: the boolean indicates whether the raw code ends with a line return,
-                while the string is the processed code.
-        """
-        ends_on_nl = code.endswith("\n")
-        processed_code = code if ends_on_nl else code + "\n"
-        processed_code = (
-            textwrap.dedent(processed_code) if self.dedent else processed_code
-        )
-        processed_code = processed_code.expandtabs(self.tab_size)
-        return ends_on_nl, processed_code
-
-
-def _get_code_index_for_syntax_position(
-    newlines_offsets: Sequence[int], position: SyntaxPosition
-) -> Optional[int]:
-    """
-    Returns the index of the code string for the given positions.
-
-    Args:
-        newlines_offsets (Sequence[int]): The offset of each newline character found in the code snippet.
-        position (SyntaxPosition): The position to search for.
-
-    Returns:
-        Optional[int]: The index of the code string for this position, or `None`
-            if the given position's line number is out of range (if it's the column that is out of range
-            we silently clamp its value so that it reaches the end of the line)
-    """
-    lines_count = len(newlines_offsets)
-
-    line_number, column_index = position
-    if line_number > lines_count or len(newlines_offsets) < (line_number + 1):
-        return None  # `line_number` is out of range
-    line_index = line_number - 1
-    line_length = newlines_offsets[line_index + 1] - newlines_offsets[line_index] - 1
-    # If `column_index` is out of range: let's silently clamp it:
-    column_index = min(line_length, column_index)
-    return newlines_offsets[line_index] + column_index
-
-
-if __name__ == "__main__":  # pragma: no cover
-    import argparse
-    import sys
-
-    parser = argparse.ArgumentParser(
-        description="Render syntax to the console with Rich"
-    )
-    parser.add_argument(
-        "path",
-        metavar="PATH",
-        help="path to file, or - for stdin",
-    )
-    parser.add_argument(
-        "-c",
-        "--force-color",
-        dest="force_color",
-        action="store_true",
-        default=None,
-        help="force color for non-terminals",
-    )
-    parser.add_argument(
-        "-i",
-        "--indent-guides",
-        dest="indent_guides",
-        action="store_true",
-        default=False,
-        help="display indent guides",
-    )
-    parser.add_argument(
-        "-l",
-        "--line-numbers",
-        dest="line_numbers",
-        action="store_true",
-        help="render line numbers",
-    )
-    parser.add_argument(
-        "-w",
-        "--width",
-        type=int,
-        dest="width",
-        default=None,
-        help="width of output (default will auto-detect)",
-    )
-    parser.add_argument(
-        "-r",
-        "--wrap",
-        dest="word_wrap",
-        action="store_true",
-        default=False,
-        help="word wrap long lines",
-    )
-    parser.add_argument(
-        "-s",
-        "--soft-wrap",
-        action="store_true",
-        dest="soft_wrap",
-        default=False,
-        help="enable soft wrapping mode",
-    )
-    parser.add_argument(
-        "-t", "--theme", dest="theme", default="monokai", help="pygments theme"
-    )
-    parser.add_argument(
-        "-b",
-        "--background-color",
-        dest="background_color",
-        default=None,
-        help="Override background color",
-    )
-    parser.add_argument(
-        "-x",
-        "--lexer",
-        default=None,
-        dest="lexer_name",
-        help="Lexer name",
-    )
-    parser.add_argument(
-        "-p", "--padding", type=int, default=0, dest="padding", help="Padding"
-    )
-    parser.add_argument(
-        "--highlight-line",
-        type=int,
-        default=None,
-        dest="highlight_line",
-        help="The line number (not index!) to highlight",
-    )
-    args = parser.parse_args()
-
-    from rich.console import Console
-
-    console = Console(force_terminal=args.force_color, width=args.width)
-
-    if args.path == "-":
-        code = sys.stdin.read()
-        syntax = Syntax(
-            code=code,
-            lexer=args.lexer_name,
-            line_numbers=args.line_numbers,
-            word_wrap=args.word_wrap,
-            theme=args.theme,
-            background_color=args.background_color,
-            indent_guides=args.indent_guides,
-            padding=args.padding,
-            highlight_lines={args.highlight_line},
-        )
-    else:
-        syntax = Syntax.from_path(
-            args.path,
-            lexer=args.lexer_name,
-            line_numbers=args.line_numbers,
-            word_wrap=args.word_wrap,
-            theme=args.theme,
-            background_color=args.background_color,
-            indent_guides=args.indent_guides,
-            padding=args.padding,
-            highlight_lines={args.highlight_line},
-        )
-    console.print(syntax, soft_wrap=args.soft_wrap)
diff --git a/voxvera/vendor/rich/table.py b/voxvera/vendor/rich/table.py
deleted file mode 100644
index 1e2eb2b..0000000
--- a/voxvera/vendor/rich/table.py
+++ /dev/null
@@ -1,1015 +0,0 @@
-from dataclasses import dataclass, field, replace
-from typing import (
-    TYPE_CHECKING,
-    Dict,
-    Iterable,
-    List,
-    NamedTuple,
-    Optional,
-    Sequence,
-    Tuple,
-    Union,
-)
-
-from . import box, errors
-from ._loop import loop_first_last, loop_last
-from ._pick import pick_bool
-from ._ratio import ratio_distribute, ratio_reduce
-from .align import VerticalAlignMethod
-from .jupyter import JupyterMixin
-from .measure import Measurement
-from .padding import Padding, PaddingDimensions
-from .protocol import is_renderable
-from .segment import Segment
-from .style import Style, StyleType
-from .text import Text, TextType
-
-if TYPE_CHECKING:
-    from .console import (
-        Console,
-        ConsoleOptions,
-        JustifyMethod,
-        OverflowMethod,
-        RenderableType,
-        RenderResult,
-    )
-
-
-@dataclass
-class Column:
-    """Defines a column within a ~Table.
-
-    Args:
-        title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
-        caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
-        width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
-        min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
-        box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
-        safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
-        padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
-        collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
-        pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
-        show_header (bool, optional): Show a header row. Defaults to True.
-        show_footer (bool, optional): Show a footer row. Defaults to False.
-        show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
-        show_lines (bool, optional): Draw lines between every row. Defaults to False.
-        leading (int, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
-        style (Union[str, Style], optional): Default style for the table. Defaults to "none".
-        row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
-        header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
-        footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
-        border_style (Union[str, Style], optional): Style of the border. Defaults to None.
-        title_style (Union[str, Style], optional): Style of the title. Defaults to None.
-        caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
-        title_justify (str, optional): Justify method for title. Defaults to "center".
-        caption_justify (str, optional): Justify method for caption. Defaults to "center".
-        highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
-    """
-
-    header: "RenderableType" = ""
-    """RenderableType: Renderable for the header (typically a string)"""
-
-    footer: "RenderableType" = ""
-    """RenderableType: Renderable for the footer (typically a string)"""
-
-    header_style: StyleType = ""
-    """StyleType: The style of the header."""
-
-    footer_style: StyleType = ""
-    """StyleType: The style of the footer."""
-
-    style: StyleType = ""
-    """StyleType: The style of the column."""
-
-    justify: "JustifyMethod" = "left"
-    """str: How to justify text within the column ("left", "center", "right", or "full")"""
-
-    vertical: "VerticalAlignMethod" = "top"
-    """str: How to vertically align content ("top", "middle", or "bottom")"""
-
-    overflow: "OverflowMethod" = "ellipsis"
-    """str: Overflow method."""
-
-    width: Optional[int] = None
-    """Optional[int]: Width of the column, or ``None`` (default) to auto calculate width."""
-
-    min_width: Optional[int] = None
-    """Optional[int]: Minimum width of column, or ``None`` for no minimum. Defaults to None."""
-
-    max_width: Optional[int] = None
-    """Optional[int]: Maximum width of column, or ``None`` for no maximum. Defaults to None."""
-
-    ratio: Optional[int] = None
-    """Optional[int]: Ratio to use when calculating column width, or ``None`` (default) to adapt to column contents."""
-
-    no_wrap: bool = False
-    """bool: Prevent wrapping of text within the column. Defaults to ``False``."""
-
-    highlight: bool = False
-    """bool: Apply highlighter to column. Defaults to ``False``."""
-
-    _index: int = 0
-    """Index of column."""
-
-    _cells: List["RenderableType"] = field(default_factory=list)
-
-    def copy(self) -> "Column":
-        """Return a copy of this Column."""
-        return replace(self, _cells=[])
-
-    @property
-    def cells(self) -> Iterable["RenderableType"]:
-        """Get all cells in the column, not including header."""
-        yield from self._cells
-
-    @property
-    def flexible(self) -> bool:
-        """Check if this column is flexible."""
-        return self.ratio is not None
-
-
-@dataclass
-class Row:
-    """Information regarding a row."""
-
-    style: Optional[StyleType] = None
-    """Style to apply to row."""
-
-    end_section: bool = False
-    """Indicated end of section, which will force a line beneath the row."""
-
-
-class _Cell(NamedTuple):
-    """A single cell in a table."""
-
-    style: StyleType
-    """Style to apply to cell."""
-    renderable: "RenderableType"
-    """Cell renderable."""
-    vertical: VerticalAlignMethod
-    """Cell vertical alignment."""
-
-
-class Table(JupyterMixin):
-    """A console renderable to draw a table.
-
-    Args:
-        *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
-        title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
-        caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
-        width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
-        min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
-        box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
-        safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
-        padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
-        collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
-        pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
-        expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
-        show_header (bool, optional): Show a header row. Defaults to True.
-        show_footer (bool, optional): Show a footer row. Defaults to False.
-        show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
-        show_lines (bool, optional): Draw lines between every row. Defaults to False.
-        leading (int, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
-        style (Union[str, Style], optional): Default style for the table. Defaults to "none".
-        row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
-        header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
-        footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
-        border_style (Union[str, Style], optional): Style of the border. Defaults to None.
-        title_style (Union[str, Style], optional): Style of the title. Defaults to None.
-        caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
-        title_justify (str, optional): Justify method for title. Defaults to "center".
-        caption_justify (str, optional): Justify method for caption. Defaults to "center".
-        highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
-    """
-
-    columns: List[Column]
-    rows: List[Row]
-
-    def __init__(
-        self,
-        *headers: Union[Column, str],
-        title: Optional[TextType] = None,
-        caption: Optional[TextType] = None,
-        width: Optional[int] = None,
-        min_width: Optional[int] = None,
-        box: Optional[box.Box] = box.HEAVY_HEAD,
-        safe_box: Optional[bool] = None,
-        padding: PaddingDimensions = (0, 1),
-        collapse_padding: bool = False,
-        pad_edge: bool = True,
-        expand: bool = False,
-        show_header: bool = True,
-        show_footer: bool = False,
-        show_edge: bool = True,
-        show_lines: bool = False,
-        leading: int = 0,
-        style: StyleType = "none",
-        row_styles: Optional[Iterable[StyleType]] = None,
-        header_style: Optional[StyleType] = "table.header",
-        footer_style: Optional[StyleType] = "table.footer",
-        border_style: Optional[StyleType] = None,
-        title_style: Optional[StyleType] = None,
-        caption_style: Optional[StyleType] = None,
-        title_justify: "JustifyMethod" = "center",
-        caption_justify: "JustifyMethod" = "center",
-        highlight: bool = False,
-    ) -> None:
-        self.columns: List[Column] = []
-        self.rows: List[Row] = []
-        self.title = title
-        self.caption = caption
-        self.width = width
-        self.min_width = min_width
-        self.box = box
-        self.safe_box = safe_box
-        self._padding = Padding.unpack(padding)
-        self.pad_edge = pad_edge
-        self._expand = expand
-        self.show_header = show_header
-        self.show_footer = show_footer
-        self.show_edge = show_edge
-        self.show_lines = show_lines
-        self.leading = leading
-        self.collapse_padding = collapse_padding
-        self.style = style
-        self.header_style = header_style or ""
-        self.footer_style = footer_style or ""
-        self.border_style = border_style
-        self.title_style = title_style
-        self.caption_style = caption_style
-        self.title_justify: "JustifyMethod" = title_justify
-        self.caption_justify: "JustifyMethod" = caption_justify
-        self.highlight = highlight
-        self.row_styles: Sequence[StyleType] = list(row_styles or [])
-        append_column = self.columns.append
-        for header in headers:
-            if isinstance(header, str):
-                self.add_column(header=header)
-            else:
-                header._index = len(self.columns)
-                append_column(header)
-
-    @classmethod
-    def grid(
-        cls,
-        *headers: Union[Column, str],
-        padding: PaddingDimensions = 0,
-        collapse_padding: bool = True,
-        pad_edge: bool = False,
-        expand: bool = False,
-    ) -> "Table":
-        """Get a table with no lines, headers, or footer.
-
-        Args:
-            *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
-            padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0.
-            collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to True.
-            pad_edge (bool, optional): Enable padding around edges of table. Defaults to False.
-            expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
-
-        Returns:
-            Table: A table instance.
-        """
-        return cls(
-            *headers,
-            box=None,
-            padding=padding,
-            collapse_padding=collapse_padding,
-            show_header=False,
-            show_footer=False,
-            show_edge=False,
-            pad_edge=pad_edge,
-            expand=expand,
-        )
-
-    @property
-    def expand(self) -> bool:
-        """Setting a non-None self.width implies expand."""
-        return self._expand or self.width is not None
-
-    @expand.setter
-    def expand(self, expand: bool) -> None:
-        """Set expand."""
-        self._expand = expand
-
-    @property
-    def _extra_width(self) -> int:
-        """Get extra width to add to cell content."""
-        width = 0
-        if self.box and self.show_edge:
-            width += 2
-        if self.box:
-            width += len(self.columns) - 1
-        return width
-
-    @property
-    def row_count(self) -> int:
-        """Get the current number of rows."""
-        return len(self.rows)
-
-    def get_row_style(self, console: "Console", index: int) -> StyleType:
-        """Get the current row style."""
-        style = Style.null()
-        if self.row_styles:
-            style += console.get_style(self.row_styles[index % len(self.row_styles)])
-        row_style = self.rows[index].style
-        if row_style is not None:
-            style += console.get_style(row_style)
-        return style
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> Measurement:
-        max_width = options.max_width
-        if self.width is not None:
-            max_width = self.width
-        if max_width < 0:
-            return Measurement(0, 0)
-
-        extra_width = self._extra_width
-        max_width = sum(
-            self._calculate_column_widths(
-                console, options.update_width(max_width - extra_width)
-            )
-        )
-        _measure_column = self._measure_column
-
-        measurements = [
-            _measure_column(console, options.update_width(max_width), column)
-            for column in self.columns
-        ]
-        minimum_width = (
-            sum(measurement.minimum for measurement in measurements) + extra_width
-        )
-        maximum_width = (
-            sum(measurement.maximum for measurement in measurements) + extra_width
-            if (self.width is None)
-            else self.width
-        )
-        measurement = Measurement(minimum_width, maximum_width)
-        measurement = measurement.clamp(self.min_width)
-        return measurement
-
-    @property
-    def padding(self) -> Tuple[int, int, int, int]:
-        """Get cell padding."""
-        return self._padding
-
-    @padding.setter
-    def padding(self, padding: PaddingDimensions) -> "Table":
-        """Set cell padding."""
-        self._padding = Padding.unpack(padding)
-        return self
-
-    def add_column(
-        self,
-        header: "RenderableType" = "",
-        footer: "RenderableType" = "",
-        *,
-        header_style: Optional[StyleType] = None,
-        highlight: Optional[bool] = None,
-        footer_style: Optional[StyleType] = None,
-        style: Optional[StyleType] = None,
-        justify: "JustifyMethod" = "left",
-        vertical: "VerticalAlignMethod" = "top",
-        overflow: "OverflowMethod" = "ellipsis",
-        width: Optional[int] = None,
-        min_width: Optional[int] = None,
-        max_width: Optional[int] = None,
-        ratio: Optional[int] = None,
-        no_wrap: bool = False,
-    ) -> None:
-        """Add a column to the table.
-
-        Args:
-            header (RenderableType, optional): Text or renderable for the header.
-                Defaults to "".
-            footer (RenderableType, optional): Text or renderable for the footer.
-                Defaults to "".
-            header_style (Union[str, Style], optional): Style for the header, or None for default. Defaults to None.
-            highlight (bool, optional): Whether to highlight the text. The default of None uses the value of the table (self) object.
-            footer_style (Union[str, Style], optional): Style for the footer, or None for default. Defaults to None.
-            style (Union[str, Style], optional): Style for the column cells, or None for default. Defaults to None.
-            justify (JustifyMethod, optional): Alignment for cells. Defaults to "left".
-            vertical (VerticalAlignMethod, optional): Vertical alignment, one of "top", "middle", or "bottom". Defaults to "top".
-            overflow (OverflowMethod): Overflow method: "crop", "fold", "ellipsis". Defaults to "ellipsis".
-            width (int, optional): Desired width of column in characters, or None to fit to contents. Defaults to None.
-            min_width (Optional[int], optional): Minimum width of column, or ``None`` for no minimum. Defaults to None.
-            max_width (Optional[int], optional): Maximum width of column, or ``None`` for no maximum. Defaults to None.
-            ratio (int, optional): Flexible ratio for the column (requires ``Table.expand`` or ``Table.width``). Defaults to None.
-            no_wrap (bool, optional): Set to ``True`` to disable wrapping of this column.
-        """
-
-        column = Column(
-            _index=len(self.columns),
-            header=header,
-            footer=footer,
-            header_style=header_style or "",
-            highlight=highlight if highlight is not None else self.highlight,
-            footer_style=footer_style or "",
-            style=style or "",
-            justify=justify,
-            vertical=vertical,
-            overflow=overflow,
-            width=width,
-            min_width=min_width,
-            max_width=max_width,
-            ratio=ratio,
-            no_wrap=no_wrap,
-        )
-        self.columns.append(column)
-
-    def add_row(
-        self,
-        *renderables: Optional["RenderableType"],
-        style: Optional[StyleType] = None,
-        end_section: bool = False,
-    ) -> None:
-        """Add a row of renderables.
-
-        Args:
-            *renderables (None or renderable): Each cell in a row must be a renderable object (including str),
-                or ``None`` for a blank cell.
-            style (StyleType, optional): An optional style to apply to the entire row. Defaults to None.
-            end_section (bool, optional): End a section and draw a line. Defaults to False.
-
-        Raises:
-            errors.NotRenderableError: If you add something that can't be rendered.
-        """
-
-        def add_cell(column: Column, renderable: "RenderableType") -> None:
-            column._cells.append(renderable)
-
-        cell_renderables: List[Optional["RenderableType"]] = list(renderables)
-
-        columns = self.columns
-        if len(cell_renderables) < len(columns):
-            cell_renderables = [
-                *cell_renderables,
-                *[None] * (len(columns) - len(cell_renderables)),
-            ]
-        for index, renderable in enumerate(cell_renderables):
-            if index == len(columns):
-                column = Column(_index=index, highlight=self.highlight)
-                for _ in self.rows:
-                    add_cell(column, Text(""))
-                self.columns.append(column)
-            else:
-                column = columns[index]
-            if renderable is None:
-                add_cell(column, "")
-            elif is_renderable(renderable):
-                add_cell(column, renderable)
-            else:
-                raise errors.NotRenderableError(
-                    f"unable to render {type(renderable).__name__}; a string or other renderable object is required"
-                )
-        self.rows.append(Row(style=style, end_section=end_section))
-
-    def add_section(self) -> None:
-        """Add a new section (draw a line after current row)."""
-
-        if self.rows:
-            self.rows[-1].end_section = True
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        if not self.columns:
-            yield Segment("\n")
-            return
-
-        max_width = options.max_width
-        if self.width is not None:
-            max_width = self.width
-
-        extra_width = self._extra_width
-
-        widths = self._calculate_column_widths(
-            console, options.update_width(max_width - extra_width)
-        )
-        table_width = sum(widths) + extra_width
-
-        render_options = options.update(
-            width=table_width, highlight=self.highlight, height=None
-        )
-
-        def render_annotation(
-            text: TextType, style: StyleType, justify: "JustifyMethod" = "center"
-        ) -> "RenderResult":
-            render_text = (
-                console.render_str(text, style=style, highlight=False)
-                if isinstance(text, str)
-                else text
-            )
-            return console.render(
-                render_text, options=render_options.update(justify=justify)
-            )
-
-        if self.title:
-            yield from render_annotation(
-                self.title,
-                style=Style.pick_first(self.title_style, "table.title"),
-                justify=self.title_justify,
-            )
-        yield from self._render(console, render_options, widths)
-        if self.caption:
-            yield from render_annotation(
-                self.caption,
-                style=Style.pick_first(self.caption_style, "table.caption"),
-                justify=self.caption_justify,
-            )
-
-    def _calculate_column_widths(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> List[int]:
-        """Calculate the widths of each column, including padding, not including borders."""
-        max_width = options.max_width
-        columns = self.columns
-        width_ranges = [
-            self._measure_column(console, options, column) for column in columns
-        ]
-        widths = [_range.maximum or 1 for _range in width_ranges]
-
-        get_padding_width = self._get_padding_width
-        extra_width = self._extra_width
-        if self.expand:
-            ratios = [col.ratio or 0 for col in columns if col.flexible]
-            if any(ratios):
-                fixed_widths = [
-                    0 if column.flexible else _range.maximum
-                    for _range, column in zip(width_ranges, columns)
-                ]
-                flex_minimum = [
-                    (column.width or 1) + get_padding_width(column._index)
-                    for column in columns
-                    if column.flexible
-                ]
-                flexible_width = max_width - sum(fixed_widths)
-                flex_widths = ratio_distribute(flexible_width, ratios, flex_minimum)
-                iter_flex_widths = iter(flex_widths)
-                for index, column in enumerate(columns):
-                    if column.flexible:
-                        widths[index] = fixed_widths[index] + next(iter_flex_widths)
-        table_width = sum(widths)
-
-        if table_width > max_width:
-            widths = self._collapse_widths(
-                widths,
-                [(column.width is None and not column.no_wrap) for column in columns],
-                max_width,
-            )
-            table_width = sum(widths)
-            # last resort, reduce columns evenly
-            if table_width > max_width:
-                excess_width = table_width - max_width
-                widths = ratio_reduce(excess_width, [1] * len(widths), widths, widths)
-                table_width = sum(widths)
-
-            width_ranges = [
-                self._measure_column(console, options.update_width(width), column)
-                for width, column in zip(widths, columns)
-            ]
-            widths = [_range.maximum or 0 for _range in width_ranges]
-
-        if (table_width < max_width and self.expand) or (
-            self.min_width is not None and table_width < (self.min_width - extra_width)
-        ):
-            _max_width = (
-                max_width
-                if self.min_width is None
-                else min(self.min_width - extra_width, max_width)
-            )
-            pad_widths = ratio_distribute(_max_width - table_width, widths)
-            widths = [_width + pad for _width, pad in zip(widths, pad_widths)]
-
-        return widths
-
-    @classmethod
-    def _collapse_widths(
-        cls, widths: List[int], wrapable: List[bool], max_width: int
-    ) -> List[int]:
-        """Reduce widths so that the total is under max_width.
-
-        Args:
-            widths (List[int]): List of widths.
-            wrapable (List[bool]): List of booleans that indicate if a column may shrink.
-            max_width (int): Maximum width to reduce to.
-
-        Returns:
-            List[int]: A new list of widths.
-        """
-        total_width = sum(widths)
-        excess_width = total_width - max_width
-        if any(wrapable):
-            while total_width and excess_width > 0:
-                max_column = max(
-                    width for width, allow_wrap in zip(widths, wrapable) if allow_wrap
-                )
-                second_max_column = max(
-                    width if allow_wrap and width != max_column else 0
-                    for width, allow_wrap in zip(widths, wrapable)
-                )
-                column_difference = max_column - second_max_column
-                ratios = [
-                    (1 if (width == max_column and allow_wrap) else 0)
-                    for width, allow_wrap in zip(widths, wrapable)
-                ]
-                if not any(ratios) or not column_difference:
-                    break
-                max_reduce = [min(excess_width, column_difference)] * len(widths)
-                widths = ratio_reduce(excess_width, ratios, max_reduce, widths)
-
-                total_width = sum(widths)
-                excess_width = total_width - max_width
-        return widths
-
-    def _get_cells(
-        self, console: "Console", column_index: int, column: Column
-    ) -> Iterable[_Cell]:
-        """Get all the cells with padding and optional header."""
-
-        collapse_padding = self.collapse_padding
-        pad_edge = self.pad_edge
-        padding = self.padding
-        any_padding = any(padding)
-
-        first_column = column_index == 0
-        last_column = column_index == len(self.columns) - 1
-
-        _padding_cache: Dict[Tuple[bool, bool], Tuple[int, int, int, int]] = {}
-
-        def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
-            cached = _padding_cache.get((first_row, last_row))
-            if cached:
-                return cached
-            top, right, bottom, left = padding
-
-            if collapse_padding:
-                if not first_column:
-                    left = max(0, left - right)
-                if not last_row:
-                    bottom = max(0, top - bottom)
-
-            if not pad_edge:
-                if first_column:
-                    left = 0
-                if last_column:
-                    right = 0
-                if first_row:
-                    top = 0
-                if last_row:
-                    bottom = 0
-            _padding = (top, right, bottom, left)
-            _padding_cache[(first_row, last_row)] = _padding
-            return _padding
-
-        raw_cells: List[Tuple[StyleType, "RenderableType"]] = []
-        _append = raw_cells.append
-        get_style = console.get_style
-        if self.show_header:
-            header_style = get_style(self.header_style or "") + get_style(
-                column.header_style
-            )
-            _append((header_style, column.header))
-        cell_style = get_style(column.style or "")
-        for cell in column.cells:
-            _append((cell_style, cell))
-        if self.show_footer:
-            footer_style = get_style(self.footer_style or "") + get_style(
-                column.footer_style
-            )
-            _append((footer_style, column.footer))
-
-        if any_padding:
-            _Padding = Padding
-            for first, last, (style, renderable) in loop_first_last(raw_cells):
-                yield _Cell(
-                    style,
-                    _Padding(renderable, get_padding(first, last)),
-                    getattr(renderable, "vertical", None) or column.vertical,
-                )
-        else:
-            for style, renderable in raw_cells:
-                yield _Cell(
-                    style,
-                    renderable,
-                    getattr(renderable, "vertical", None) or column.vertical,
-                )
-
-    def _get_padding_width(self, column_index: int) -> int:
-        """Get extra width from padding."""
-        _, pad_right, _, pad_left = self.padding
-
-        if self.collapse_padding:
-            pad_left = 0
-            pad_right = abs(pad_left - pad_right)
-
-        if not self.pad_edge:
-            if column_index == 0:
-                pad_left = 0
-            if column_index == len(self.columns) - 1:
-                pad_right = 0
-
-        return pad_left + pad_right
-
-    def _measure_column(
-        self,
-        console: "Console",
-        options: "ConsoleOptions",
-        column: Column,
-    ) -> Measurement:
-        """Get the minimum and maximum width of the column."""
-
-        max_width = options.max_width
-        if max_width < 1:
-            return Measurement(0, 0)
-
-        padding_width = self._get_padding_width(column._index)
-        if column.width is not None:
-            # Fixed width column
-            return Measurement(
-                column.width + padding_width, column.width + padding_width
-            ).with_maximum(max_width)
-        # Flexible column, we need to measure contents
-        min_widths: List[int] = []
-        max_widths: List[int] = []
-        append_min = min_widths.append
-        append_max = max_widths.append
-        get_render_width = Measurement.get
-        for cell in self._get_cells(console, column._index, column):
-            _min, _max = get_render_width(console, options, cell.renderable)
-            append_min(_min)
-            append_max(_max)
-
-        measurement = Measurement(
-            max(min_widths) if min_widths else 1,
-            max(max_widths) if max_widths else max_width,
-        ).with_maximum(max_width)
-        measurement = measurement.clamp(
-            None if column.min_width is None else column.min_width + padding_width,
-            None if column.max_width is None else column.max_width + padding_width,
-        )
-        return measurement
-
-    def _render(
-        self, console: "Console", options: "ConsoleOptions", widths: List[int]
-    ) -> "RenderResult":
-        table_style = console.get_style(self.style or "")
-
-        border_style = table_style + console.get_style(self.border_style or "")
-        _column_cells = (
-            self._get_cells(console, column_index, column)
-            for column_index, column in enumerate(self.columns)
-        )
-
-        row_cells: List[Tuple[_Cell, ...]] = list(zip(*_column_cells))
-        _box = (
-            self.box.substitute(
-                options, safe=pick_bool(self.safe_box, console.safe_box)
-            )
-            if self.box
-            else None
-        )
-        _box = _box.get_plain_headed_box() if _box and not self.show_header else _box
-
-        new_line = Segment.line()
-
-        columns = self.columns
-        show_header = self.show_header
-        show_footer = self.show_footer
-        show_edge = self.show_edge
-        show_lines = self.show_lines
-        leading = self.leading
-
-        _Segment = Segment
-        if _box:
-            box_segments = [
-                (
-                    _Segment(_box.head_left, border_style),
-                    _Segment(_box.head_right, border_style),
-                    _Segment(_box.head_vertical, border_style),
-                ),
-                (
-                    _Segment(_box.mid_left, border_style),
-                    _Segment(_box.mid_right, border_style),
-                    _Segment(_box.mid_vertical, border_style),
-                ),
-                (
-                    _Segment(_box.foot_left, border_style),
-                    _Segment(_box.foot_right, border_style),
-                    _Segment(_box.foot_vertical, border_style),
-                ),
-            ]
-            if show_edge:
-                yield _Segment(_box.get_top(widths), border_style)
-                yield new_line
-        else:
-            box_segments = []
-
-        get_row_style = self.get_row_style
-        get_style = console.get_style
-
-        for index, (first, last, row_cell) in enumerate(loop_first_last(row_cells)):
-            header_row = first and show_header
-            footer_row = last and show_footer
-            row = (
-                self.rows[index - show_header]
-                if (not header_row and not footer_row)
-                else None
-            )
-            max_height = 1
-            cells: List[List[List[Segment]]] = []
-            if header_row or footer_row:
-                row_style = Style.null()
-            else:
-                row_style = get_style(
-                    get_row_style(console, index - 1 if show_header else index)
-                )
-            for width, cell, column in zip(widths, row_cell, columns):
-                render_options = options.update(
-                    width=width,
-                    justify=column.justify,
-                    no_wrap=column.no_wrap,
-                    overflow=column.overflow,
-                    height=None,
-                    highlight=column.highlight,
-                )
-                lines = console.render_lines(
-                    cell.renderable,
-                    render_options,
-                    style=get_style(cell.style) + row_style,
-                )
-                max_height = max(max_height, len(lines))
-                cells.append(lines)
-
-            row_height = max(len(cell) for cell in cells)
-
-            def align_cell(
-                cell: List[List[Segment]],
-                vertical: "VerticalAlignMethod",
-                width: int,
-                style: Style,
-            ) -> List[List[Segment]]:
-                if header_row:
-                    vertical = "bottom"
-                elif footer_row:
-                    vertical = "top"
-
-                if vertical == "top":
-                    return _Segment.align_top(cell, width, row_height, style)
-                elif vertical == "middle":
-                    return _Segment.align_middle(cell, width, row_height, style)
-                return _Segment.align_bottom(cell, width, row_height, style)
-
-            cells[:] = [
-                _Segment.set_shape(
-                    align_cell(
-                        cell,
-                        _cell.vertical,
-                        width,
-                        get_style(_cell.style) + row_style,
-                    ),
-                    width,
-                    max_height,
-                )
-                for width, _cell, cell, column in zip(widths, row_cell, cells, columns)
-            ]
-
-            if _box:
-                if last and show_footer:
-                    yield _Segment(
-                        _box.get_row(widths, "foot", edge=show_edge), border_style
-                    )
-                    yield new_line
-                left, right, _divider = box_segments[0 if first else (2 if last else 1)]
-
-                # If the column divider is whitespace also style it with the row background
-                divider = (
-                    _divider
-                    if _divider.text.strip()
-                    else _Segment(
-                        _divider.text, row_style.background_style + _divider.style
-                    )
-                )
-                for line_no in range(max_height):
-                    if show_edge:
-                        yield left
-                    for last_cell, rendered_cell in loop_last(cells):
-                        yield from rendered_cell[line_no]
-                        if not last_cell:
-                            yield divider
-                    if show_edge:
-                        yield right
-                    yield new_line
-            else:
-                for line_no in range(max_height):
-                    for rendered_cell in cells:
-                        yield from rendered_cell[line_no]
-                    yield new_line
-            if _box and first and show_header:
-                yield _Segment(
-                    _box.get_row(widths, "head", edge=show_edge), border_style
-                )
-                yield new_line
-            end_section = row and row.end_section
-            if _box and (show_lines or leading or end_section):
-                if (
-                    not last
-                    and not (show_footer and index >= len(row_cells) - 2)
-                    and not (show_header and header_row)
-                ):
-                    if leading:
-                        yield _Segment(
-                            _box.get_row(widths, "mid", edge=show_edge) * leading,
-                            border_style,
-                        )
-                    else:
-                        yield _Segment(
-                            _box.get_row(widths, "row", edge=show_edge), border_style
-                        )
-                    yield new_line
-
-        if _box and show_edge:
-            yield _Segment(_box.get_bottom(widths), border_style)
-            yield new_line
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from rich.console import Console
-    from rich.highlighter import ReprHighlighter
-
-    from ._timer import timer
-
-    with timer("Table render"):
-        table = Table(
-            title="Star Wars Movies",
-            caption="Rich example table",
-            caption_justify="right",
-        )
-
-        table.add_column(
-            "Released", header_style="bright_cyan", style="cyan", no_wrap=True
-        )
-        table.add_column("Title", style="magenta")
-        table.add_column("Box Office", justify="right", style="green")
-
-        table.add_row(
-            "Dec 20, 2019",
-            "Star Wars: The Rise of Skywalker",
-            "$952,110,690",
-        )
-        table.add_row("May 25, 2018", "Solo: A Star Wars Story", "$393,151,347")
-        table.add_row(
-            "Dec 15, 2017",
-            "Star Wars Ep. V111: The Last Jedi",
-            "$1,332,539,889",
-            style="on black",
-            end_section=True,
-        )
-        table.add_row(
-            "Dec 16, 2016",
-            "Rogue One: A Star Wars Story",
-            "$1,332,439,889",
-        )
-
-        def header(text: str) -> None:
-            console.print()
-            console.rule(highlight(text))
-            console.print()
-
-        console = Console()
-        highlight = ReprHighlighter()
-        header("Example Table")
-        console.print(table, justify="center")
-
-        table.expand = True
-        header("expand=True")
-        console.print(table)
-
-        table.width = 50
-        header("width=50")
-
-        console.print(table, justify="center")
-
-        table.width = None
-        table.expand = False
-        table.row_styles = ["dim", "none"]
-        header("row_styles=['dim', 'none']")
-
-        console.print(table, justify="center")
-
-        table.width = None
-        table.expand = False
-        table.row_styles = ["dim", "none"]
-        table.leading = 1
-        header("leading=1, row_styles=['dim', 'none']")
-        console.print(table, justify="center")
-
-        table.width = None
-        table.expand = False
-        table.row_styles = ["dim", "none"]
-        table.show_lines = True
-        table.leading = 0
-        header("show_lines=True, row_styles=['dim', 'none']")
-        console.print(table, justify="center")
diff --git a/voxvera/vendor/rich/terminal_theme.py b/voxvera/vendor/rich/terminal_theme.py
deleted file mode 100644
index 565e9d9..0000000
--- a/voxvera/vendor/rich/terminal_theme.py
+++ /dev/null
@@ -1,153 +0,0 @@
-from typing import List, Optional, Tuple
-
-from .color_triplet import ColorTriplet
-from .palette import Palette
-
-_ColorTuple = Tuple[int, int, int]
-
-
-class TerminalTheme:
-    """A color theme used when exporting console content.
-
-    Args:
-        background (Tuple[int, int, int]): The background color.
-        foreground (Tuple[int, int, int]): The foreground (text) color.
-        normal (List[Tuple[int, int, int]]): A list of 8 normal intensity colors.
-        bright (List[Tuple[int, int, int]], optional): A list of 8 bright colors, or None
-            to repeat normal intensity. Defaults to None.
-    """
-
-    def __init__(
-        self,
-        background: _ColorTuple,
-        foreground: _ColorTuple,
-        normal: List[_ColorTuple],
-        bright: Optional[List[_ColorTuple]] = None,
-    ) -> None:
-        self.background_color = ColorTriplet(*background)
-        self.foreground_color = ColorTriplet(*foreground)
-        self.ansi_colors = Palette(normal + (bright or normal))
-
-
-DEFAULT_TERMINAL_THEME = TerminalTheme(
-    (255, 255, 255),
-    (0, 0, 0),
-    [
-        (0, 0, 0),
-        (128, 0, 0),
-        (0, 128, 0),
-        (128, 128, 0),
-        (0, 0, 128),
-        (128, 0, 128),
-        (0, 128, 128),
-        (192, 192, 192),
-    ],
-    [
-        (128, 128, 128),
-        (255, 0, 0),
-        (0, 255, 0),
-        (255, 255, 0),
-        (0, 0, 255),
-        (255, 0, 255),
-        (0, 255, 255),
-        (255, 255, 255),
-    ],
-)
-
-MONOKAI = TerminalTheme(
-    (12, 12, 12),
-    (217, 217, 217),
-    [
-        (26, 26, 26),
-        (244, 0, 95),
-        (152, 224, 36),
-        (253, 151, 31),
-        (157, 101, 255),
-        (244, 0, 95),
-        (88, 209, 235),
-        (196, 197, 181),
-        (98, 94, 76),
-    ],
-    [
-        (244, 0, 95),
-        (152, 224, 36),
-        (224, 213, 97),
-        (157, 101, 255),
-        (244, 0, 95),
-        (88, 209, 235),
-        (246, 246, 239),
-    ],
-)
-DIMMED_MONOKAI = TerminalTheme(
-    (25, 25, 25),
-    (185, 188, 186),
-    [
-        (58, 61, 67),
-        (190, 63, 72),
-        (135, 154, 59),
-        (197, 166, 53),
-        (79, 118, 161),
-        (133, 92, 141),
-        (87, 143, 164),
-        (185, 188, 186),
-        (136, 137, 135),
-    ],
-    [
-        (251, 0, 31),
-        (15, 114, 47),
-        (196, 112, 51),
-        (24, 109, 227),
-        (251, 0, 103),
-        (46, 112, 109),
-        (253, 255, 185),
-    ],
-)
-NIGHT_OWLISH = TerminalTheme(
-    (255, 255, 255),
-    (64, 63, 83),
-    [
-        (1, 22, 39),
-        (211, 66, 62),
-        (42, 162, 152),
-        (218, 170, 1),
-        (72, 118, 214),
-        (64, 63, 83),
-        (8, 145, 106),
-        (122, 129, 129),
-        (122, 129, 129),
-    ],
-    [
-        (247, 110, 110),
-        (73, 208, 197),
-        (218, 194, 107),
-        (92, 167, 228),
-        (105, 112, 152),
-        (0, 201, 144),
-        (152, 159, 177),
-    ],
-)
-
-SVG_EXPORT_THEME = TerminalTheme(
-    (41, 41, 41),
-    (197, 200, 198),
-    [
-        (75, 78, 85),
-        (204, 85, 90),
-        (152, 168, 75),
-        (208, 179, 68),
-        (96, 138, 177),
-        (152, 114, 159),
-        (104, 160, 179),
-        (197, 200, 198),
-        (154, 155, 153),
-    ],
-    [
-        (255, 38, 39),
-        (0, 130, 61),
-        (208, 132, 66),
-        (25, 132, 233),
-        (255, 44, 122),
-        (57, 130, 128),
-        (253, 253, 197),
-    ],
-)
diff --git a/voxvera/vendor/rich/text.py b/voxvera/vendor/rich/text.py
deleted file mode 100644
index 7e087a4..0000000
--- a/voxvera/vendor/rich/text.py
+++ /dev/null
@@ -1,1363 +0,0 @@
-import re
-from functools import partial, reduce
-from math import gcd
-from operator import itemgetter
-from typing import (
-    TYPE_CHECKING,
-    Any,
-    Callable,
-    Dict,
-    Iterable,
-    List,
-    NamedTuple,
-    Optional,
-    Pattern,
-    Tuple,
-    Union,
-)
-
-from ._loop import loop_last
-from ._pick import pick_bool
-from ._wrap import divide_line
-from .align import AlignMethod
-from .cells import cell_len, set_cell_size
-from .containers import Lines
-from .control import strip_control_codes
-from .emoji import EmojiVariant
-from .jupyter import JupyterMixin
-from .measure import Measurement
-from .segment import Segment
-from .style import Style, StyleType
-
-if TYPE_CHECKING:  # pragma: no cover
-    from .console import Console, ConsoleOptions, JustifyMethod, OverflowMethod
-
-DEFAULT_JUSTIFY: "JustifyMethod" = "default"
-DEFAULT_OVERFLOW: "OverflowMethod" = "fold"
-
-
-_re_whitespace = re.compile(r"\s+$")
-
-TextType = Union[str, "Text"]
-"""A plain string or a :class:`Text` instance."""
-
-GetStyleCallable = Callable[[str], Optional[StyleType]]
-
-
-class Span(NamedTuple):
-    """A marked up region in some text."""
-
-    start: int
-    """Span start index."""
-    end: int
-    """Span end index."""
-    style: Union[str, Style]
-    """Style associated with the span."""
-
-    def __repr__(self) -> str:
-        return f"Span({self.start}, {self.end}, {self.style!r})"
-
-    def __bool__(self) -> bool:
-        return self.end > self.start
-
-    def split(self, offset: int) -> Tuple["Span", Optional["Span"]]:
-        """Split a span in to 2 from a given offset."""
-
-        if offset < self.start:
-            return self, None
-        if offset >= self.end:
-            return self, None
-
-        start, end, style = self
-        span1 = Span(start, min(end, offset), style)
-        span2 = Span(span1.end, end, style)
-        return span1, span2
-
-    def move(self, offset: int) -> "Span":
-        """Move start and end by a given offset.
-
-        Args:
-            offset (int): Number of characters to add to start and end.
-
-        Returns:
-            TextSpan: A new TextSpan with adjusted position.
-        """
-        start, end, style = self
-        return Span(start + offset, end + offset, style)
-
-    def right_crop(self, offset: int) -> "Span":
-        """Crop the span at the given offset.
-
-        Args:
-            offset (int): A value between start and end.
-
-        Returns:
-            Span: A new (possibly smaller) span.
-        """
-        start, end, style = self
-        if offset >= end:
-            return self
-        return Span(start, min(offset, end), style)
-
-    def extend(self, cells: int) -> "Span":
-        """Extend the span by the given number of cells.
-
-        Args:
-            cells (int): Additional space to add to end of span.
-
-        Returns:
-            Span: A span.
-        """
-        if cells:
-            start, end, style = self
-            return Span(start, end + cells, style)
-        else:
-            return self
-
-
-class Text(JupyterMixin):
-    """Text with color / style.
-
-    Args:
-        text (str, optional): Default unstyled text. Defaults to "".
-        style (Union[str, Style], optional): Base style for text. Defaults to "".
-        justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
-        overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
-        no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
-        end (str, optional): Character to end text with. Defaults to "\\\\n".
-        tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None.
-        spans (List[Span], optional). A list of predefined style spans. Defaults to None.
-    """
-
-    __slots__ = [
-        "_text",
-        "style",
-        "justify",
-        "overflow",
-        "no_wrap",
-        "end",
-        "tab_size",
-        "_spans",
-        "_length",
-    ]
-
-    def __init__(
-        self,
-        text: str = "",
-        style: Union[str, Style] = "",
-        *,
-        justify: Optional["JustifyMethod"] = None,
-        overflow: Optional["OverflowMethod"] = None,
-        no_wrap: Optional[bool] = None,
-        end: str = "\n",
-        tab_size: Optional[int] = None,
-        spans: Optional[List[Span]] = None,
-    ) -> None:
-        sanitized_text = strip_control_codes(text)
-        self._text = [sanitized_text]
-        self.style = style
-        self.justify: Optional["JustifyMethod"] = justify
-        self.overflow: Optional["OverflowMethod"] = overflow
-        self.no_wrap = no_wrap
-        self.end = end
-        self.tab_size = tab_size
-        self._spans: List[Span] = spans or []
-        self._length: int = len(sanitized_text)
-
-    def __len__(self) -> int:
-        return self._length
-
-    def __bool__(self) -> bool:
-        return bool(self._length)
-
-    def __str__(self) -> str:
-        return self.plain
-
-    def __repr__(self) -> str:
-        return f""
-
-    def __add__(self, other: Any) -> "Text":
-        if isinstance(other, (str, Text)):
-            result = self.copy()
-            result.append(other)
-            return result
-        return NotImplemented
-
-    def __eq__(self, other: object) -> bool:
-        if not isinstance(other, Text):
-            return NotImplemented
-        return self.plain == other.plain and self._spans == other._spans
-
-    def __contains__(self, other: object) -> bool:
-        if isinstance(other, str):
-            return other in self.plain
-        elif isinstance(other, Text):
-            return other.plain in self.plain
-        return False
-
-    def __getitem__(self, slice: Union[int, slice]) -> "Text":
-        def get_text_at(offset: int) -> "Text":
-            _Span = Span
-            text = Text(
-                self.plain[offset],
-                spans=[
-                    _Span(0, 1, style)
-                    for start, end, style in self._spans
-                    if end > offset >= start
-                ],
-                end="",
-            )
-            return text
-
-        if isinstance(slice, int):
-            return get_text_at(slice)
-        else:
-            start, stop, step = slice.indices(len(self.plain))
-            if step == 1:
-                lines = self.divide([start, stop])
-                return lines[1]
-            else:
-                # This would be a bit of work to implement efficiently
-                # For now, its not required
-                raise TypeError("slices with step!=1 are not supported")
-
-    @property
-    def cell_len(self) -> int:
-        """Get the number of cells required to render this text."""
-        return cell_len(self.plain)
-
-    @property
-    def markup(self) -> str:
-        """Get console markup to render this Text.
-
-        Returns:
-            str: A string potentially creating markup tags.
-        """
-        from .markup import escape
-
-        output: List[str] = []
-
-        plain = self.plain
-        markup_spans = [
-            (0, False, self.style),
-            *((span.start, False, span.style) for span in self._spans),
-            *((span.end, True, span.style) for span in self._spans),
-            (len(plain), True, self.style),
-        ]
-        markup_spans.sort(key=itemgetter(0, 1))
-        position = 0
-        append = output.append
-        for offset, closing, style in markup_spans:
-            if offset > position:
-                append(escape(plain[position:offset]))
-                position = offset
-            if style:
-                append(f"[/{style}]" if closing else f"[{style}]")
-        markup = "".join(output)
-        return markup
-
-    @classmethod
-    def from_markup(
-        cls,
-        text: str,
-        *,
-        style: Union[str, Style] = "",
-        emoji: bool = True,
-        emoji_variant: Optional[EmojiVariant] = None,
-        justify: Optional["JustifyMethod"] = None,
-        overflow: Optional["OverflowMethod"] = None,
-        end: str = "\n",
-    ) -> "Text":
-        """Create Text instance from markup.
-
-        Args:
-            text (str): A string containing console markup.
-            style (Union[str, Style], optional): Base style for text. Defaults to "".
-            emoji (bool, optional): Also render emoji code. Defaults to True.
-            emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.
-            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
-            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
-            end (str, optional): Character to end text with. Defaults to "\\\\n".
-
-        Returns:
-            Text: A Text instance with markup rendered.
-        """
-        from .markup import render
-
-        rendered_text = render(text, style, emoji=emoji, emoji_variant=emoji_variant)
-        rendered_text.justify = justify
-        rendered_text.overflow = overflow
-        rendered_text.end = end
-        return rendered_text
-
-    @classmethod
-    def from_ansi(
-        cls,
-        text: str,
-        *,
-        style: Union[str, Style] = "",
-        justify: Optional["JustifyMethod"] = None,
-        overflow: Optional["OverflowMethod"] = None,
-        no_wrap: Optional[bool] = None,
-        end: str = "\n",
-        tab_size: Optional[int] = 8,
-    ) -> "Text":
-        """Create a Text object from a string containing ANSI escape codes.
-
-        Args:
-            text (str): A string containing escape codes.
-            style (Union[str, Style], optional): Base style for text. Defaults to "".
-            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
-            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
-            no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
-            end (str, optional): Character to end text with. Defaults to "\\\\n".
-            tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None.
-        """
-        from .ansi import AnsiDecoder
-
-        joiner = Text(
-            "\n",
-            justify=justify,
-            overflow=overflow,
-            no_wrap=no_wrap,
-            end=end,
-            tab_size=tab_size,
-            style=style,
-        )
-        decoder = AnsiDecoder()
-        result = joiner.join(line for line in decoder.decode(text))
-        return result
-
-    @classmethod
-    def styled(
-        cls,
-        text: str,
-        style: StyleType = "",
-        *,
-        justify: Optional["JustifyMethod"] = None,
-        overflow: Optional["OverflowMethod"] = None,
-    ) -> "Text":
-        """Construct a Text instance with a pre-applied styled. A style applied in this way won't be used
-        to pad the text when it is justified.
-
-        Args:
-            text (str): A string containing console markup.
-            style (Union[str, Style]): Style to apply to the text. Defaults to "".
-            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
-            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
-
-        Returns:
-            Text: A text instance with a style applied to the entire string.
-        """
-        styled_text = cls(text, justify=justify, overflow=overflow)
-        styled_text.stylize(style)
-        return styled_text
-
-    @classmethod
-    def assemble(
-        cls,
-        *parts: Union[str, "Text", Tuple[str, StyleType]],
-        style: Union[str, Style] = "",
-        justify: Optional["JustifyMethod"] = None,
-        overflow: Optional["OverflowMethod"] = None,
-        no_wrap: Optional[bool] = None,
-        end: str = "\n",
-        tab_size: int = 8,
-        meta: Optional[Dict[str, Any]] = None,
-    ) -> "Text":
-        """Construct a text instance by combining a sequence of strings with optional styles.
-        The positional arguments should be either strings, or a tuple of string + style.
-
-        Args:
-            style (Union[str, Style], optional): Base style for text. Defaults to "".
-            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
-            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
-            no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
-            end (str, optional): Character to end text with. Defaults to "\\\\n".
-            tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None.
-            meta (Dict[str, Any], optional). Meta data to apply to text, or None for no meta data. Default to None
-
-        Returns:
-            Text: A new text instance.
-        """
-        text = cls(
-            style=style,
-            justify=justify,
-            overflow=overflow,
-            no_wrap=no_wrap,
-            end=end,
-            tab_size=tab_size,
-        )
-        append = text.append
-        _Text = Text
-        for part in parts:
-            if isinstance(part, (_Text, str)):
-                append(part)
-            else:
-                append(*part)
-        if meta:
-            text.apply_meta(meta)
-        return text
-
-    @property
-    def plain(self) -> str:
-        """Get the text as a single string."""
-        if len(self._text) != 1:
-            self._text[:] = ["".join(self._text)]
-        return self._text[0]
-
-    @plain.setter
-    def plain(self, new_text: str) -> None:
-        """Set the text to a new value."""
-        if new_text != self.plain:
-            sanitized_text = strip_control_codes(new_text)
-            self._text[:] = [sanitized_text]
-            old_length = self._length
-            self._length = len(sanitized_text)
-            if old_length > self._length:
-                self._trim_spans()
-
-    @property
-    def spans(self) -> List[Span]:
-        """Get a reference to the internal list of spans."""
-        return self._spans
-
-    @spans.setter
-    def spans(self, spans: List[Span]) -> None:
-        """Set spans."""
-        self._spans = spans[:]
-
-    def blank_copy(self, plain: str = "") -> "Text":
-        """Return a new Text instance with copied metadata (but not the string or spans)."""
-        copy_self = Text(
-            plain,
-            style=self.style,
-            justify=self.justify,
-            overflow=self.overflow,
-            no_wrap=self.no_wrap,
-            end=self.end,
-            tab_size=self.tab_size,
-        )
-        return copy_self
-
-    def copy(self) -> "Text":
-        """Return a copy of this instance."""
-        copy_self = Text(
-            self.plain,
-            style=self.style,
-            justify=self.justify,
-            overflow=self.overflow,
-            no_wrap=self.no_wrap,
-            end=self.end,
-            tab_size=self.tab_size,
-        )
-        copy_self._spans[:] = self._spans
-        return copy_self
-
-    def stylize(
-        self,
-        style: Union[str, Style],
-        start: int = 0,
-        end: Optional[int] = None,
-    ) -> None:
-        """Apply a style to the text, or a portion of the text.
-
-        Args:
-            style (Union[str, Style]): Style instance or style definition to apply.
-            start (int): Start offset (negative indexing is supported). Defaults to 0.
-            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
-        """
-        if style:
-            length = len(self)
-            if start < 0:
-                start = length + start
-            if end is None:
-                end = length
-            if end < 0:
-                end = length + end
-            if start >= length or end <= start:
-                # Span not in text or not valid
-                return
-            self._spans.append(Span(start, min(length, end), style))
-
-    def stylize_before(
-        self,
-        style: Union[str, Style],
-        start: int = 0,
-        end: Optional[int] = None,
-    ) -> None:
-        """Apply a style to the text, or a portion of the text. Styles will be applied before other styles already present.
-
-        Args:
-            style (Union[str, Style]): Style instance or style definition to apply.
-            start (int): Start offset (negative indexing is supported). Defaults to 0.
-            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
-        """
-        if style:
-            length = len(self)
-            if start < 0:
-                start = length + start
-            if end is None:
-                end = length
-            if end < 0:
-                end = length + end
-            if start >= length or end <= start:
-                # Span not in text or not valid
-                return
-            self._spans.insert(0, Span(start, min(length, end), style))
-
-    def apply_meta(
-        self, meta: Dict[str, Any], start: int = 0, end: Optional[int] = None
-    ) -> None:
-        """Apply metadata to the text, or a portion of the text.
-
-        Args:
-            meta (Dict[str, Any]): A dict of meta information.
-            start (int): Start offset (negative indexing is supported). Defaults to 0.
-            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
-
-        """
-        style = Style.from_meta(meta)
-        self.stylize(style, start=start, end=end)
-
-    def on(self, meta: Optional[Dict[str, Any]] = None, **handlers: Any) -> "Text":
-        """Apply event handlers (used by Textual project).
-
-        Example:
-            >>> from rich.text import Text
-            >>> text = Text("hello world")
-            >>> text.on(click="view.toggle('world')")
-
-        Args:
-            meta (Dict[str, Any]): Mapping of meta information.
-            **handlers: Keyword args are prefixed with "@" to defined handlers.
-
-        Returns:
-            Text: Self is returned to method may be chained.
-        """
-        meta = {} if meta is None else meta
-        meta.update({f"@{key}": value for key, value in handlers.items()})
-        self.stylize(Style.from_meta(meta))
-        return self
-
-    def remove_suffix(self, suffix: str) -> None:
-        """Remove a suffix if it exists.
-
-        Args:
-            suffix (str): Suffix to remove.
-        """
-        if self.plain.endswith(suffix):
-            self.right_crop(len(suffix))
-
-    def get_style_at_offset(self, console: "Console", offset: int) -> Style:
-        """Get the style of a character at give offset.
-
-        Args:
-            console (~Console): Console where text will be rendered.
-            offset (int): Offset in to text (negative indexing supported)
-
-        Returns:
-            Style: A Style instance.
-        """
-        # TODO: This is a little inefficient, it is only used by full justify
-        if offset < 0:
-            offset = len(self) + offset
-        get_style = console.get_style
-        style = get_style(self.style).copy()
-        for start, end, span_style in self._spans:
-            if end > offset >= start:
-                style += get_style(span_style, default="")
-        return style
-
-    def extend_style(self, spaces: int) -> None:
-        """Extend the Text given number of spaces where the spaces have the same style as the last character.
-
-        Args:
-            spaces (int): Number of spaces to add to the Text.
-        """
-        if spaces <= 0:
-            return
-        spans = self.spans
-        new_spaces = " " * spaces
-        if spans:
-            end_offset = len(self)
-            self._spans[:] = [
-                span.extend(spaces) if span.end >= end_offset else span
-                for span in spans
-            ]
-            self._text.append(new_spaces)
-            self._length += spaces
-        else:
-            self.plain += new_spaces
-
-    def highlight_regex(
-        self,
-        re_highlight: Union[Pattern[str], str],
-        style: Optional[Union[GetStyleCallable, StyleType]] = None,
-        *,
-        style_prefix: str = "",
-    ) -> int:
-        """Highlight text with a regular expression, where group names are
-        translated to styles.
-
-        Args:
-            re_highlight (Union[re.Pattern, str]): A regular expression object or string.
-            style (Union[GetStyleCallable, StyleType]): Optional style to apply to whole match, or a callable
-                which accepts the matched text and returns a style. Defaults to None.
-            style_prefix (str, optional): Optional prefix to add to style group names.
-
-        Returns:
-            int: Number of regex matches
-        """
-        count = 0
-        append_span = self._spans.append
-        _Span = Span
-        plain = self.plain
-        if isinstance(re_highlight, str):
-            re_highlight = re.compile(re_highlight)
-        for match in re_highlight.finditer(plain):
-            get_span = match.span
-            if style:
-                start, end = get_span()
-                match_style = style(plain[start:end]) if callable(style) else style
-                if match_style is not None and end > start:
-                    append_span(_Span(start, end, match_style))
-
-            count += 1
-            for name in match.groupdict().keys():
-                start, end = get_span(name)
-                if start != -1 and end > start:
-                    append_span(_Span(start, end, f"{style_prefix}{name}"))
-        return count
-
-    def highlight_words(
-        self,
-        words: Iterable[str],
-        style: Union[str, Style],
-        *,
-        case_sensitive: bool = True,
-    ) -> int:
-        """Highlight words with a style.
-
-        Args:
-            words (Iterable[str]): Words to highlight.
-            style (Union[str, Style]): Style to apply.
-            case_sensitive (bool, optional): Enable case sensitive matching. Defaults to True.
-
-        Returns:
-            int: Number of words highlighted.
-        """
-        re_words = "|".join(re.escape(word) for word in words)
-        add_span = self._spans.append
-        count = 0
-        _Span = Span
-        for match in re.finditer(
-            re_words, self.plain, flags=0 if case_sensitive else re.IGNORECASE
-        ):
-            start, end = match.span(0)
-            add_span(_Span(start, end, style))
-            count += 1
-        return count
-
-    def rstrip(self) -> None:
-        """Strip whitespace from end of text."""
-        self.plain = self.plain.rstrip()
-
-    def rstrip_end(self, size: int) -> None:
-        """Remove whitespace beyond a certain width at the end of the text.
-
-        Args:
-            size (int): The desired size of the text.
-        """
-        text_length = len(self)
-        if text_length > size:
-            excess = text_length - size
-            whitespace_match = _re_whitespace.search(self.plain)
-            if whitespace_match is not None:
-                whitespace_count = len(whitespace_match.group(0))
-                self.right_crop(min(whitespace_count, excess))
-
-    def set_length(self, new_length: int) -> None:
-        """Set new length of the text, clipping or padding is required."""
-        length = len(self)
-        if length != new_length:
-            if length < new_length:
-                self.pad_right(new_length - length)
-            else:
-                self.right_crop(length - new_length)
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> Iterable[Segment]:
-        tab_size: int = console.tab_size if self.tab_size is None else self.tab_size
-        justify = self.justify or options.justify or DEFAULT_JUSTIFY
-        overflow = self.overflow or options.overflow or DEFAULT_OVERFLOW
-
-        lines = self.wrap(
-            console,
-            options.max_width,
-            justify=justify,
-            overflow=overflow,
-            tab_size=tab_size or 8,
-            no_wrap=pick_bool(self.no_wrap, options.no_wrap, False),
-        )
-        all_lines = Text("\n").join(lines)
-        yield from all_lines.render(console, end=self.end)
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> Measurement:
-        text = self.plain
-        lines = text.splitlines()
-        max_text_width = max(cell_len(line) for line in lines) if lines else 0
-        words = text.split()
-        min_text_width = (
-            max(cell_len(word) for word in words) if words else max_text_width
-        )
-        return Measurement(min_text_width, max_text_width)
-
-    def render(self, console: "Console", end: str = "") -> Iterable["Segment"]:
-        """Render the text as Segments.
-
-        Args:
-            console (Console): Console instance.
-            end (Optional[str], optional): Optional end character.
-
-        Returns:
-            Iterable[Segment]: Result of render that may be written to the console.
-        """
-        _Segment = Segment
-        text = self.plain
-        if not self._spans:
-            yield Segment(text)
-            if end:
-                yield _Segment(end)
-            return
-        get_style = partial(console.get_style, default=Style.null())
-
-        enumerated_spans = list(enumerate(self._spans, 1))
-        style_map = {index: get_style(span.style) for index, span in enumerated_spans}
-        style_map[0] = get_style(self.style)
-
-        spans = [
-            (0, False, 0),
-            *((span.start, False, index) for index, span in enumerated_spans),
-            *((span.end, True, index) for index, span in enumerated_spans),
-            (len(text), True, 0),
-        ]
-        spans.sort(key=itemgetter(0, 1))
-
-        stack: List[int] = []
-        stack_append = stack.append
-        stack_pop = stack.remove
-
-        style_cache: Dict[Tuple[Style, ...], Style] = {}
-        style_cache_get = style_cache.get
-        combine = Style.combine
-
-        def get_current_style() -> Style:
-            """Construct current style from stack."""
-            styles = tuple(style_map[_style_id] for _style_id in sorted(stack))
-            cached_style = style_cache_get(styles)
-            if cached_style is not None:
-                return cached_style
-            current_style = combine(styles)
-            style_cache[styles] = current_style
-            return current_style
-
-        for (offset, leaving, style_id), (next_offset, _, _) in zip(spans, spans[1:]):
-            if leaving:
-                stack_pop(style_id)
-            else:
-                stack_append(style_id)
-            if next_offset > offset:
-                yield _Segment(text[offset:next_offset], get_current_style())
-        if end:
-            yield _Segment(end)
-
-    def join(self, lines: Iterable["Text"]) -> "Text":
-        """Join text together with this instance as the separator.
-
-        Args:
-            lines (Iterable[Text]): An iterable of Text instances to join.
-
-        Returns:
-            Text: A new text instance containing join text.
-        """
-
-        new_text = self.blank_copy()
-
-        def iter_text() -> Iterable["Text"]:
-            if self.plain:
-                for last, line in loop_last(lines):
-                    yield line
-                    if not last:
-                        yield self
-            else:
-                yield from lines
-
-        extend_text = new_text._text.extend
-        append_span = new_text._spans.append
-        extend_spans = new_text._spans.extend
-        offset = 0
-        _Span = Span
-
-        for text in iter_text():
-            extend_text(text._text)
-            if text.style:
-                append_span(_Span(offset, offset + len(text), text.style))
-            extend_spans(
-                _Span(offset + start, offset + end, style)
-                for start, end, style in text._spans
-            )
-            offset += len(text)
-        new_text._length = offset
-        return new_text
-
-    def expand_tabs(self, tab_size: Optional[int] = None) -> None:
-        """Converts tabs to spaces.
-
-        Args:
-            tab_size (int, optional): Size of tabs. Defaults to 8.
-
-        """
-        if "\t" not in self.plain:
-            return
-        if tab_size is None:
-            tab_size = self.tab_size
-        if tab_size is None:
-            tab_size = 8
-
-        new_text: List[Text] = []
-        append = new_text.append
-
-        for line in self.split("\n", include_separator=True):
-            if "\t" not in line.plain:
-                append(line)
-            else:
-                cell_position = 0
-                parts = line.split("\t", include_separator=True)
-                for part in parts:
-                    if part.plain.endswith("\t"):
-                        part._text[-1] = part._text[-1][:-1] + " "
-                        cell_position += part.cell_len
-                        tab_remainder = cell_position % tab_size
-                        if tab_remainder:
-                            spaces = tab_size - tab_remainder
-                            part.extend_style(spaces)
-                            cell_position += spaces
-                    else:
-                        cell_position += part.cell_len
-                    append(part)
-
-        result = Text("").join(new_text)
-
-        self._text = [result.plain]
-        self._length = len(self.plain)
-        self._spans[:] = result._spans
-
-    def truncate(
-        self,
-        max_width: int,
-        *,
-        overflow: Optional["OverflowMethod"] = None,
-        pad: bool = False,
-    ) -> None:
-        """Truncate text if it is longer that a given width.
-
-        Args:
-            max_width (int): Maximum number of characters in text.
-            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None, to use self.overflow.
-            pad (bool, optional): Pad with spaces if the length is less than max_width. Defaults to False.
-        """
-        _overflow = overflow or self.overflow or DEFAULT_OVERFLOW
-        if _overflow != "ignore":
-            length = cell_len(self.plain)
-            if length > max_width:
-                if _overflow == "ellipsis":
-                    self.plain = set_cell_size(self.plain, max_width - 1) + "…"
-                else:
-                    self.plain = set_cell_size(self.plain, max_width)
-            if pad and length < max_width:
-                spaces = max_width - length
-                self._text = [f"{self.plain}{' ' * spaces}"]
-                self._length = len(self.plain)
-
-    def _trim_spans(self) -> None:
-        """Remove or modify any spans that are over the end of the text."""
-        max_offset = len(self.plain)
-        _Span = Span
-        self._spans[:] = [
-            (
-                span
-                if span.end < max_offset
-                else _Span(span.start, min(max_offset, span.end), span.style)
-            )
-            for span in self._spans
-            if span.start < max_offset
-        ]
-
-    def pad(self, count: int, character: str = " ") -> None:
-        """Pad left and right with a given number of characters.
-
-        Args:
-            count (int): Width of padding.
-            character (str): The character to pad with. Must be a string of length 1.
-        """
-        assert len(character) == 1, "Character must be a string of length 1"
-        if count:
-            pad_characters = character * count
-            self.plain = f"{pad_characters}{self.plain}{pad_characters}"
-            _Span = Span
-            self._spans[:] = [
-                _Span(start + count, end + count, style)
-                for start, end, style in self._spans
-            ]
-
-    def pad_left(self, count: int, character: str = " ") -> None:
-        """Pad the left with a given character.
-
-        Args:
-            count (int): Number of characters to pad.
-            character (str, optional): Character to pad with. Defaults to " ".
-        """
-        assert len(character) == 1, "Character must be a string of length 1"
-        if count:
-            self.plain = f"{character * count}{self.plain}"
-            _Span = Span
-            self._spans[:] = [
-                _Span(start + count, end + count, style)
-                for start, end, style in self._spans
-            ]
-
-    def pad_right(self, count: int, character: str = " ") -> None:
-        """Pad the right with a given character.
-
-        Args:
-            count (int): Number of characters to pad.
-            character (str, optional): Character to pad with. Defaults to " ".
-        """
-        assert len(character) == 1, "Character must be a string of length 1"
-        if count:
-            self.plain = f"{self.plain}{character * count}"
-
-    def align(self, align: AlignMethod, width: int, character: str = " ") -> None:
-        """Align text to a given width.
-
-        Args:
-            align (AlignMethod): One of "left", "center", or "right".
-            width (int): Desired width.
-            character (str, optional): Character to pad with. Defaults to " ".
-        """
-        self.truncate(width)
-        excess_space = width - cell_len(self.plain)
-        if excess_space:
-            if align == "left":
-                self.pad_right(excess_space, character)
-            elif align == "center":
-                left = excess_space // 2
-                self.pad_left(left, character)
-                self.pad_right(excess_space - left, character)
-            else:
-                self.pad_left(excess_space, character)
-
-    def append(
-        self, text: Union["Text", str], style: Optional[Union[str, "Style"]] = None
-    ) -> "Text":
-        """Add text with an optional style.
-
-        Args:
-            text (Union[Text, str]): A str or Text to append.
-            style (str, optional): A style name. Defaults to None.
-
-        Returns:
-            Text: Returns self for chaining.
-        """
-
-        if not isinstance(text, (str, Text)):
-            raise TypeError("Only str or Text can be appended to Text")
-
-        if len(text):
-            if isinstance(text, str):
-                sanitized_text = strip_control_codes(text)
-                self._text.append(sanitized_text)
-                offset = len(self)
-                text_length = len(sanitized_text)
-                if style:
-                    self._spans.append(Span(offset, offset + text_length, style))
-                self._length += text_length
-            elif isinstance(text, Text):
-                _Span = Span
-                if style is not None:
-                    raise ValueError(
-                        "style must not be set when appending Text instance"
-                    )
-                text_length = self._length
-                if text.style:
-                    self._spans.append(
-                        _Span(text_length, text_length + len(text), text.style)
-                    )
-                self._text.append(text.plain)
-                self._spans.extend(
-                    _Span(start + text_length, end + text_length, style)
-                    for start, end, style in text._spans.copy()
-                )
-                self._length += len(text)
-        return self
-
-    def append_text(self, text: "Text") -> "Text":
-        """Append another Text instance. This method is more performant than Text.append, but
-        only works for Text.
-
-        Args:
-            text (Text): The Text instance to append to this instance.
-
-        Returns:
-            Text: Returns self for chaining.
-        """
-        _Span = Span
-        text_length = self._length
-        if text.style:
-            self._spans.append(_Span(text_length, text_length + len(text), text.style))
-        self._text.append(text.plain)
-        self._spans.extend(
-            _Span(start + text_length, end + text_length, style)
-            for start, end, style in text._spans.copy()
-        )
-        self._length += len(text)
-        return self
-
-    def append_tokens(
-        self, tokens: Iterable[Tuple[str, Optional[StyleType]]]
-    ) -> "Text":
-        """Append iterable of str and style. Style may be a Style instance or a str style definition.
-
-        Args:
-            tokens (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style.
-
-        Returns:
-            Text: Returns self for chaining.
-        """
-        append_text = self._text.append
-        append_span = self._spans.append
-        _Span = Span
-        offset = len(self)
-        for content, style in tokens:
-            content = strip_control_codes(content)
-            append_text(content)
-            if style:
-                append_span(_Span(offset, offset + len(content), style))
-            offset += len(content)
-        self._length = offset
-        return self
-
-    def copy_styles(self, text: "Text") -> None:
-        """Copy styles from another Text instance.
-
-        Args:
-            text (Text): A Text instance to copy styles from, must be the same length.
-        """
-        self._spans.extend(text._spans)
-
-    def split(
-        self,
-        separator: str = "\n",
-        *,
-        include_separator: bool = False,
-        allow_blank: bool = False,
-    ) -> Lines:
-        """Split rich text in to lines, preserving styles.
-
-        Args:
-            separator (str, optional): String to split on. Defaults to "\\\\n".
-            include_separator (bool, optional): Include the separator in the lines. Defaults to False.
-            allow_blank (bool, optional): Return a blank line if the text ends with a separator. Defaults to False.
-
-        Returns:
-            List[RichText]: A list of rich text, one per line of the original.
-        """
-        assert separator, "separator must not be empty"
-
-        text = self.plain
-        if separator not in text:
-            return Lines([self.copy()])
-
-        if include_separator:
-            lines = self.divide(
-                match.end() for match in re.finditer(re.escape(separator), text)
-            )
-        else:
-
-            def flatten_spans() -> Iterable[int]:
-                for match in re.finditer(re.escape(separator), text):
-                    start, end = match.span()
-                    yield start
-                    yield end
-
-            lines = Lines(
-                line for line in self.divide(flatten_spans()) if line.plain != separator
-            )
-
-        if not allow_blank and text.endswith(separator):
-            lines.pop()
-
-        return lines
-
-    def divide(self, offsets: Iterable[int]) -> Lines:
-        """Divide text into a number of lines at given offsets.
-
-        Args:
-            offsets (Iterable[int]): Offsets used to divide text.
-
-        Returns:
-            Lines: New RichText instances between offsets.
-        """
-        _offsets = list(offsets)
-
-        if not _offsets:
-            return Lines([self.copy()])
-
-        text = self.plain
-        text_length = len(text)
-        divide_offsets = [0, *_offsets, text_length]
-        line_ranges = list(zip(divide_offsets, divide_offsets[1:]))
-
-        style = self.style
-        justify = self.justify
-        overflow = self.overflow
-        _Text = Text
-        new_lines = Lines(
-            _Text(
-                text[start:end],
-                style=style,
-                justify=justify,
-                overflow=overflow,
-            )
-            for start, end in line_ranges
-        )
-        if not self._spans:
-            return new_lines
-
-        _line_appends = [line._spans.append for line in new_lines._lines]
-        line_count = len(line_ranges)
-        _Span = Span
-
-        for span_start, span_end, style in self._spans:
-            lower_bound = 0
-            upper_bound = line_count
-            start_line_no = (lower_bound + upper_bound) // 2
-
-            while True:
-                line_start, line_end = line_ranges[start_line_no]
-                if span_start < line_start:
-                    upper_bound = start_line_no - 1
-                elif span_start > line_end:
-                    lower_bound = start_line_no + 1
-                else:
-                    break
-                start_line_no = (lower_bound + upper_bound) // 2
-
-            if span_end < line_end:
-                end_line_no = start_line_no
-            else:
-                end_line_no = lower_bound = start_line_no
-                upper_bound = line_count
-
-                while True:
-                    line_start, line_end = line_ranges[end_line_no]
-                    if span_end < line_start:
-                        upper_bound = end_line_no - 1
-                    elif span_end > line_end:
-                        lower_bound = end_line_no + 1
-                    else:
-                        break
-                    end_line_no = (lower_bound + upper_bound) // 2
-
-            for line_no in range(start_line_no, end_line_no + 1):
-                line_start, line_end = line_ranges[line_no]
-                new_start = max(0, span_start - line_start)
-                new_end = min(span_end - line_start, line_end - line_start)
-                if new_end > new_start:
-                    _line_appends[line_no](_Span(new_start, new_end, style))
-
-        return new_lines
-
-    def right_crop(self, amount: int = 1) -> None:
-        """Remove a number of characters from the end of the text."""
-        max_offset = len(self.plain) - amount
-        _Span = Span
-        self._spans[:] = [
-            (
-                span
-                if span.end < max_offset
-                else _Span(span.start, min(max_offset, span.end), span.style)
-            )
-            for span in self._spans
-            if span.start < max_offset
-        ]
-        self._text = [self.plain[:-amount]]
-        self._length -= amount
-
-    def wrap(
-        self,
-        console: "Console",
-        width: int,
-        *,
-        justify: Optional["JustifyMethod"] = None,
-        overflow: Optional["OverflowMethod"] = None,
-        tab_size: int = 8,
-        no_wrap: Optional[bool] = None,
-    ) -> Lines:
-        """Word wrap the text.
-
-        Args:
-            console (Console): Console instance.
-            width (int): Number of cells available per line.
-            justify (str, optional): Justify method: "default", "left", "center", "full", "right". Defaults to "default".
-            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None.
-            tab_size (int, optional): Default tab size. Defaults to 8.
-            no_wrap (bool, optional): Disable wrapping, Defaults to False.
-
-        Returns:
-            Lines: Number of lines.
-        """
-        wrap_justify = justify or self.justify or DEFAULT_JUSTIFY
-        wrap_overflow = overflow or self.overflow or DEFAULT_OVERFLOW
-
-        no_wrap = pick_bool(no_wrap, self.no_wrap, False) or overflow == "ignore"
-
-        lines = Lines()
-        for line in self.split(allow_blank=True):
-            if "\t" in line:
-                line.expand_tabs(tab_size)
-            if no_wrap:
-                if overflow == "ignore":
-                    lines.append(line)
-                    continue
-                new_lines = Lines([line])
-            else:
-                offsets = divide_line(str(line), width, fold=wrap_overflow == "fold")
-                new_lines = line.divide(offsets)
-                for line in new_lines:
-                    line.rstrip_end(width)
-            if wrap_justify:
-                new_lines.justify(
-                    console, width, justify=wrap_justify, overflow=wrap_overflow
-                )
-            for line in new_lines:
-                line.truncate(width, overflow=wrap_overflow)
-            lines.extend(new_lines)
-        return lines
-
-    def fit(self, width: int) -> Lines:
-        """Fit the text in to given width by chopping in to lines.
-
-        Args:
-            width (int): Maximum characters in a line.
-
-        Returns:
-            Lines: Lines container.
-        """
-        lines: Lines = Lines()
-        append = lines.append
-        for line in self.split():
-            line.set_length(width)
-            append(line)
-        return lines
-
-    def detect_indentation(self) -> int:
-        """Auto-detect indentation of code.
-
-        Returns:
-            int: Number of spaces used to indent code.
-        """
-
-        _indentations = {
-            len(match.group(1))
-            for match in re.finditer(r"^( *)(.*)$", self.plain, flags=re.MULTILINE)
-        }
-
-        try:
-            indentation = (
-                reduce(gcd, [indent for indent in _indentations if not indent % 2]) or 1
-            )
-        except TypeError:
-            indentation = 1
-
-        return indentation
-
-    def with_indent_guides(
-        self,
-        indent_size: Optional[int] = None,
-        *,
-        character: str = "│",
-        style: StyleType = "dim green",
-    ) -> "Text":
-        """Adds indent guide lines to text.
-
-        Args:
-            indent_size (Optional[int]): Size of indentation, or None to auto detect. Defaults to None.
-            character (str, optional): Character to use for indentation. Defaults to "│".
-            style (Union[Style, str], optional): Style of indent guides.
-
-        Returns:
-            Text: New text with indentation guides.
-        """
-
-        _indent_size = self.detect_indentation() if indent_size is None else indent_size
-
-        text = self.copy()
-        text.expand_tabs()
-        indent_line = f"{character}{' ' * (_indent_size - 1)}"
-
-        re_indent = re.compile(r"^( *)(.*)$")
-        new_lines: List[Text] = []
-        add_line = new_lines.append
-        blank_lines = 0
-        for line in text.split(allow_blank=True):
-            match = re_indent.match(line.plain)
-            if not match or not match.group(2):
-                blank_lines += 1
-                continue
-            indent = match.group(1)
-            full_indents, remaining_space = divmod(len(indent), _indent_size)
-            new_indent = f"{indent_line * full_indents}{' ' * remaining_space}"
-            line.plain = new_indent + line.plain[len(new_indent) :]
-            line.stylize(style, 0, len(new_indent))
-            if blank_lines:
-                new_lines.extend([Text(new_indent, style=style)] * blank_lines)
-                blank_lines = 0
-            add_line(line)
-        if blank_lines:
-            new_lines.extend([Text("", style=style)] * blank_lines)
-
-        new_text = text.blank_copy("\n").join(new_lines)
-        return new_text
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from rich.console import Console
-
-    text = Text(
-        """\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n"""
-    )
-    text.highlight_words(["Lorem"], "bold")
-    text.highlight_words(["ipsum"], "italic")
-
-    console = Console()
-
-    console.rule("justify='left'")
-    console.print(text, style="red")
-    console.print()
-
-    console.rule("justify='center'")
-    console.print(text, style="green", justify="center")
-    console.print()
-
-    console.rule("justify='right'")
-    console.print(text, style="blue", justify="right")
-    console.print()
-
-    console.rule("justify='full'")
-    console.print(text, style="magenta", justify="full")
-    console.print()
diff --git a/voxvera/vendor/rich/theme.py b/voxvera/vendor/rich/theme.py
deleted file mode 100644
index 227f1d8..0000000
--- a/voxvera/vendor/rich/theme.py
+++ /dev/null
@@ -1,115 +0,0 @@
-import configparser
-from typing import IO, Dict, List, Mapping, Optional
-
-from .default_styles import DEFAULT_STYLES
-from .style import Style, StyleType
-
-
-class Theme:
-    """A container for style information, used by :class:`~rich.console.Console`.
-
-    Args:
-        styles (Dict[str, Style], optional): A mapping of style names on to styles. Defaults to None for a theme with no styles.
-        inherit (bool, optional): Inherit default styles. Defaults to True.
-    """
-
-    styles: Dict[str, Style]
-
-    def __init__(
-        self, styles: Optional[Mapping[str, StyleType]] = None, inherit: bool = True
-    ):
-        self.styles = DEFAULT_STYLES.copy() if inherit else {}
-        if styles is not None:
-            self.styles.update(
-                {
-                    name: style if isinstance(style, Style) else Style.parse(style)
-                    for name, style in styles.items()
-                }
-            )
-
-    @property
-    def config(self) -> str:
-        """Get contents of a config file for this theme."""
-        config = "[styles]\n" + "\n".join(
-            f"{name} = {style}" for name, style in sorted(self.styles.items())
-        )
-        return config
-
-    @classmethod
-    def from_file(
-        cls, config_file: IO[str], source: Optional[str] = None, inherit: bool = True
-    ) -> "Theme":
-        """Load a theme from a text mode file.
-
-        Args:
-            config_file (IO[str]): An open conf file.
-            source (str, optional): The filename of the open file. Defaults to None.
-            inherit (bool, optional): Inherit default styles. Defaults to True.
-
-        Returns:
-            Theme: A New theme instance.
-        """
-        config = configparser.ConfigParser()
-        config.read_file(config_file, source=source)
-        styles = {name: Style.parse(value) for name, value in config.items("styles")}
-        theme = Theme(styles, inherit=inherit)
-        return theme
-
-    @classmethod
-    def read(
-        cls, path: str, inherit: bool = True, encoding: Optional[str] = None
-    ) -> "Theme":
-        """Read a theme from a path.
-
-        Args:
-            path (str): Path to a config file readable by Python configparser module.
-            inherit (bool, optional): Inherit default styles. Defaults to True.
-            encoding (str, optional): Encoding of the config file. Defaults to None.
-
-        Returns:
-            Theme: A new theme instance.
-        """
-        with open(path, encoding=encoding) as config_file:
-            return cls.from_file(config_file, source=path, inherit=inherit)
-
-
-class ThemeStackError(Exception):
-    """Base exception for errors related to the theme stack."""
-
-
-class ThemeStack:
-    """A stack of themes.
-
-    Args:
-        theme (Theme): A theme instance
-    """
-
-    def __init__(self, theme: Theme) -> None:
-        self._entries: List[Dict[str, Style]] = [theme.styles]
-        self.get = self._entries[-1].get
-
-    def push_theme(self, theme: Theme, inherit: bool = True) -> None:
-        """Push a theme on the top of the stack.
-
-        Args:
-            theme (Theme): A Theme instance.
-            inherit (boolean, optional): Inherit styles from current top of stack.
-        """
-        styles: Dict[str, Style]
-        styles = (
-            {**self._entries[-1], **theme.styles} if inherit else theme.styles.copy()
-        )
-        self._entries.append(styles)
-        self.get = self._entries[-1].get
-
-    def pop_theme(self) -> None:
-        """Pop (and discard) the top-most theme."""
-        if len(self._entries) == 1:
-            raise ThemeStackError("Unable to pop base theme")
-        self._entries.pop()
-        self.get = self._entries[-1].get
-
-
-if __name__ == "__main__":  # pragma: no cover
-    theme = Theme()
-    print(theme.config)
diff --git a/voxvera/vendor/rich/themes.py b/voxvera/vendor/rich/themes.py
deleted file mode 100644
index bf6db10..0000000
--- a/voxvera/vendor/rich/themes.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from .default_styles import DEFAULT_STYLES
-from .theme import Theme
-
-
-DEFAULT = Theme(DEFAULT_STYLES)
diff --git a/voxvera/vendor/rich/traceback.py b/voxvera/vendor/rich/traceback.py
deleted file mode 100644
index 66eaeca..0000000
--- a/voxvera/vendor/rich/traceback.py
+++ /dev/null
@@ -1,924 +0,0 @@
-import inspect
-import linecache
-import os
-import sys
-from dataclasses import dataclass, field
-from itertools import islice
-from traceback import walk_tb
-from types import ModuleType, TracebackType
-from typing import (
-    Any,
-    Callable,
-    Dict,
-    Iterable,
-    List,
-    Optional,
-    Sequence,
-    Set,
-    Tuple,
-    Type,
-    Union,
-)
-
-from pygments.lexers import guess_lexer_for_filename
-from pygments.token import Comment, Keyword, Name, Number, Operator, String
-from pygments.token import Text as TextToken
-from pygments.token import Token
-from pygments.util import ClassNotFound
-
-from . import pretty
-from ._loop import loop_first_last, loop_last
-from .columns import Columns
-from .console import (
-    Console,
-    ConsoleOptions,
-    ConsoleRenderable,
-    OverflowMethod,
-    Group,
-    RenderResult,
-    group,
-)
-from .constrain import Constrain
-from .highlighter import RegexHighlighter, ReprHighlighter
-from .panel import Panel
-from .scope import render_scope
-from .style import Style
-from .syntax import Syntax, SyntaxPosition
-from .text import Text
-from .theme import Theme
-
-WINDOWS = sys.platform == "win32"
-
-LOCALS_MAX_LENGTH = 10
-LOCALS_MAX_STRING = 80
-
-
-def _iter_syntax_lines(
-    start: SyntaxPosition, end: SyntaxPosition
-) -> Iterable[Tuple[int, int, int]]:
-    """Yield start and end positions per line.
-
-    Args:
-        start: Start position.
-        end: End position.
-
-    Returns:
-        Iterable of (LINE, COLUMN1, COLUMN2).
-    """
-
-    line1, column1 = start
-    line2, column2 = end
-
-    if line1 == line2:
-        yield line1, column1, column2
-    else:
-        for first, last, line_no in loop_first_last(range(line1, line2 + 1)):
-            if first:
-                yield line_no, column1, -1
-            elif last:
-                yield line_no, 0, column2
-            else:
-                yield line_no, 0, -1
-
-
-def install(
-    *,
-    console: Optional[Console] = None,
-    width: Optional[int] = 100,
-    code_width: Optional[int] = 88,
-    extra_lines: int = 3,
-    theme: Optional[str] = None,
-    word_wrap: bool = False,
-    show_locals: bool = False,
-    locals_max_length: int = LOCALS_MAX_LENGTH,
-    locals_max_string: int = LOCALS_MAX_STRING,
-    locals_max_depth: Optional[int] = None,
-    locals_hide_dunder: bool = True,
-    locals_hide_sunder: Optional[bool] = None,
-    locals_overflow: Optional[OverflowMethod] = None,
-    indent_guides: bool = True,
-    suppress: Iterable[Union[str, ModuleType]] = (),
-    max_frames: int = 100,
-) -> Callable[[Type[BaseException], BaseException, Optional[TracebackType]], Any]:
-    """Install a rich traceback handler.
-
-    Once installed, any tracebacks will be printed with syntax highlighting and rich formatting.
-
-
-    Args:
-        console (Optional[Console], optional): Console to write exception to. Default uses internal Console instance.
-        width (Optional[int], optional): Width (in characters) of traceback. Defaults to 100.
-        code_width (Optional[int], optional): Code width (in characters) of traceback. Defaults to 88.
-        extra_lines (int, optional): Extra lines of code. Defaults to 3.
-        theme (Optional[str], optional): Pygments theme to use in traceback. Defaults to ``None`` which will pick
-            a theme appropriate for the platform.
-        word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
-        show_locals (bool, optional): Enable display of local variables. Defaults to False.
-        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to 10.
-        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
-        locals_max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None.
-        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
-        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
-        locals_overflow (OverflowMethod, optional): How to handle overflowing locals, or None to disable. Defaults to None.
-        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
-        suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
-
-    Returns:
-        Callable: The previous exception handler that was replaced.
-
-    """
-    traceback_console = Console(stderr=True) if console is None else console
-
-    locals_hide_sunder = (
-        True
-        if (traceback_console.is_jupyter and locals_hide_sunder is None)
-        else locals_hide_sunder
-    )
-
-    def excepthook(
-        type_: Type[BaseException],
-        value: BaseException,
-        traceback: Optional[TracebackType],
-    ) -> None:
-        exception_traceback = Traceback.from_exception(
-            type_,
-            value,
-            traceback,
-            width=width,
-            code_width=code_width,
-            extra_lines=extra_lines,
-            theme=theme,
-            word_wrap=word_wrap,
-            show_locals=show_locals,
-            locals_max_length=locals_max_length,
-            locals_max_string=locals_max_string,
-            locals_max_depth=locals_max_depth,
-            locals_hide_dunder=locals_hide_dunder,
-            locals_hide_sunder=bool(locals_hide_sunder),
-            locals_overflow=locals_overflow,
-            indent_guides=indent_guides,
-            suppress=suppress,
-            max_frames=max_frames,
-        )
-        traceback_console.print(exception_traceback)
-
-    def ipy_excepthook_closure(ip: Any) -> None:  # pragma: no cover
-        tb_data = {}  # store information about showtraceback call
-        default_showtraceback = ip.showtraceback  # keep reference of default traceback
-
-        def ipy_show_traceback(*args: Any, **kwargs: Any) -> None:
-            """wrap the default ip.showtraceback to store info for ip._showtraceback"""
-            nonlocal tb_data
-            tb_data = kwargs
-            default_showtraceback(*args, **kwargs)
-
-        def ipy_display_traceback(
-            *args: Any, is_syntax: bool = False, **kwargs: Any
-        ) -> None:
-            """Internally called traceback from ip._showtraceback"""
-            nonlocal tb_data
-            exc_tuple = ip._get_exc_info()
-
-            # do not display trace on syntax error
-            tb: Optional[TracebackType] = None if is_syntax else exc_tuple[2]
-
-            # determine correct tb_offset
-            compiled = tb_data.get("running_compiled_code", False)
-            tb_offset = tb_data.get("tb_offset")
-            if tb_offset is None:
-                tb_offset = 1 if compiled else 0
-            # remove ipython internal frames from trace with tb_offset
-            for _ in range(tb_offset):
-                if tb is None:
-                    break
-                tb = tb.tb_next
-
-            excepthook(exc_tuple[0], exc_tuple[1], tb)
-            tb_data = {}  # clear data upon usage
-
-        # replace _showtraceback instead of showtraceback to allow ipython features such as debugging to work
-        # this is also what the ipython docs recommends to modify when subclassing InteractiveShell
-        ip._showtraceback = ipy_display_traceback
-        # add wrapper to capture tb_data
-        ip.showtraceback = ipy_show_traceback
-        ip.showsyntaxerror = lambda *args, **kwargs: ipy_display_traceback(
-            *args, is_syntax=True, **kwargs
-        )
-
-    try:  # pragma: no cover
-        # if within ipython, use customized traceback
-        ip = get_ipython()  # type: ignore[name-defined]
-        ipy_excepthook_closure(ip)
-        return sys.excepthook
-    except Exception:
-        # otherwise use default system hook
-        old_excepthook = sys.excepthook
-        sys.excepthook = excepthook
-        return old_excepthook
-
-
-@dataclass
-class Frame:
-    filename: str
-    lineno: int
-    name: str
-    line: str = ""
-    locals: Optional[Dict[str, pretty.Node]] = None
-    last_instruction: Optional[Tuple[Tuple[int, int], Tuple[int, int]]] = None
-
-
-@dataclass
-class _SyntaxError:
-    offset: int
-    filename: str
-    line: str
-    lineno: int
-    msg: str
-    notes: List[str] = field(default_factory=list)
-
-
-@dataclass
-class Stack:
-    exc_type: str
-    exc_value: str
-    syntax_error: Optional[_SyntaxError] = None
-    is_cause: bool = False
-    frames: List[Frame] = field(default_factory=list)
-    notes: List[str] = field(default_factory=list)
-    is_group: bool = False
-    exceptions: List["Trace"] = field(default_factory=list)
-
-
-@dataclass
-class Trace:
-    stacks: List[Stack]
-
-
-class PathHighlighter(RegexHighlighter):
-    highlights = [r"(?P.*/)(?P.+)"]
-
-
-class Traceback:
-    """A Console renderable that renders a traceback.
-
-    Args:
-        trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses
-            the last exception.
-        width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
-        code_width (Optional[int], optional): Number of code characters used to traceback. Defaults to 88.
-        extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
-        theme (str, optional): Override pygments theme used in traceback.
-        word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
-        show_locals (bool, optional): Enable display of local variables. Defaults to False.
-        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
-        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-            Defaults to 10.
-        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
-        locals_max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None.
-        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
-        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
-        locals_overflow (OverflowMethod, optional): How to handle overflowing locals, or None to disable. Defaults to None.
-        suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
-        max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
-
-    """
-
-    LEXERS = {
-        "": "text",
-        ".py": "python",
-        ".pxd": "cython",
-        ".pyx": "cython",
-        ".pxi": "pyrex",
-    }
-
-    def __init__(
-        self,
-        trace: Optional[Trace] = None,
-        *,
-        width: Optional[int] = 100,
-        code_width: Optional[int] = 88,
-        extra_lines: int = 3,
-        theme: Optional[str] = None,
-        word_wrap: bool = False,
-        show_locals: bool = False,
-        locals_max_length: int = LOCALS_MAX_LENGTH,
-        locals_max_string: int = LOCALS_MAX_STRING,
-        locals_max_depth: Optional[int] = None,
-        locals_hide_dunder: bool = True,
-        locals_hide_sunder: bool = False,
-        locals_overlow: Optional[OverflowMethod] = None,
-        indent_guides: bool = True,
-        suppress: Iterable[Union[str, ModuleType]] = (),
-        max_frames: int = 100,
-    ):
-        if trace is None:
-            exc_type, exc_value, traceback = sys.exc_info()
-            if exc_type is None or exc_value is None or traceback is None:
-                raise ValueError(
-                    "Value for 'trace' required if not called in except: block"
-                )
-            trace = self.extract(
-                exc_type, exc_value, traceback, show_locals=show_locals
-            )
-        self.trace = trace
-        self.width = width
-        self.code_width = code_width
-        self.extra_lines = extra_lines
-        self.theme = Syntax.get_theme(theme or "ansi_dark")
-        self.word_wrap = word_wrap
-        self.show_locals = show_locals
-        self.indent_guides = indent_guides
-        self.locals_max_length = locals_max_length
-        self.locals_max_string = locals_max_string
-        self.locals_max_depth = locals_max_depth
-        self.locals_hide_dunder = locals_hide_dunder
-        self.locals_hide_sunder = locals_hide_sunder
-        self.locals_overflow = locals_overlow
-
-        self.suppress: Sequence[str] = []
-        for suppress_entity in suppress:
-            if not isinstance(suppress_entity, str):
-                assert (
-                    suppress_entity.__file__ is not None
-                ), f"{suppress_entity!r} must be a module with '__file__' attribute"
-                path = os.path.dirname(suppress_entity.__file__)
-            else:
-                path = suppress_entity
-            path = os.path.normpath(os.path.abspath(path))
-            self.suppress.append(path)
-        self.max_frames = max(4, max_frames) if max_frames > 0 else 0
-
-    @classmethod
-    def from_exception(
-        cls,
-        exc_type: Type[Any],
-        exc_value: BaseException,
-        traceback: Optional[TracebackType],
-        *,
-        width: Optional[int] = 100,
-        code_width: Optional[int] = 88,
-        extra_lines: int = 3,
-        theme: Optional[str] = None,
-        word_wrap: bool = False,
-        show_locals: bool = False,
-        locals_max_length: int = LOCALS_MAX_LENGTH,
-        locals_max_string: int = LOCALS_MAX_STRING,
-        locals_max_depth: Optional[int] = None,
-        locals_hide_dunder: bool = True,
-        locals_hide_sunder: bool = False,
-        locals_overflow: Optional[OverflowMethod] = None,
-        indent_guides: bool = True,
-        suppress: Iterable[Union[str, ModuleType]] = (),
-        max_frames: int = 100,
-    ) -> "Traceback":
-        """Create a traceback from exception info
-
-        Args:
-            exc_type (Type[BaseException]): Exception type.
-            exc_value (BaseException): Exception value.
-            traceback (TracebackType): Python Traceback object.
-            width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
-            code_width (Optional[int], optional): Number of code characters used to traceback. Defaults to 88.
-            extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
-            theme (str, optional): Override pygments theme used in traceback.
-            word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
-            show_locals (bool, optional): Enable display of local variables. Defaults to False.
-            indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
-            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-                Defaults to 10.
-            locals_max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None.
-            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
-            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
-            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
-            locals_overflow (OverflowMethod, optional): How to handle overflowing locals, or None to disable. Defaults to None.
-            suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
-            max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
-
-        Returns:
-            Traceback: A Traceback instance that may be printed.
-        """
-        rich_traceback = cls.extract(
-            exc_type,
-            exc_value,
-            traceback,
-            show_locals=show_locals,
-            locals_max_length=locals_max_length,
-            locals_max_string=locals_max_string,
-            locals_max_depth=locals_max_depth,
-            locals_hide_dunder=locals_hide_dunder,
-            locals_hide_sunder=locals_hide_sunder,
-        )
-
-        return cls(
-            rich_traceback,
-            width=width,
-            code_width=code_width,
-            extra_lines=extra_lines,
-            theme=theme,
-            word_wrap=word_wrap,
-            show_locals=show_locals,
-            indent_guides=indent_guides,
-            locals_max_length=locals_max_length,
-            locals_max_string=locals_max_string,
-            locals_max_depth=locals_max_depth,
-            locals_hide_dunder=locals_hide_dunder,
-            locals_hide_sunder=locals_hide_sunder,
-            locals_overlow=locals_overflow,
-            suppress=suppress,
-            max_frames=max_frames,
-        )
-
-    @classmethod
-    def extract(
-        cls,
-        exc_type: Type[BaseException],
-        exc_value: BaseException,
-        traceback: Optional[TracebackType],
-        *,
-        show_locals: bool = False,
-        locals_max_length: int = LOCALS_MAX_LENGTH,
-        locals_max_string: int = LOCALS_MAX_STRING,
-        locals_max_depth: Optional[int] = None,
-        locals_hide_dunder: bool = True,
-        locals_hide_sunder: bool = False,
-        _visited_exceptions: Optional[Set[BaseException]] = None,
-    ) -> Trace:
-        """Extract traceback information.
-
-        Args:
-            exc_type (Type[BaseException]): Exception type.
-            exc_value (BaseException): Exception value.
-            traceback (TracebackType): Python Traceback object.
-            show_locals (bool, optional): Enable display of local variables. Defaults to False.
-            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
-                Defaults to 10.
-            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
-            locals_max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None.
-            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
-            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
-
-        Returns:
-            Trace: A Trace instance which you can use to construct a `Traceback`.
-        """
-
-        stacks: List[Stack] = []
-        is_cause = False
-
-        from rich import _IMPORT_CWD
-
-        notes: List[str] = getattr(exc_value, "__notes__", None) or []
-
-        grouped_exceptions: Set[BaseException] = (
-            set() if _visited_exceptions is None else _visited_exceptions
-        )
-
-        def safe_str(_object: Any) -> str:
-            """Don't allow exceptions from __str__ to propagate."""
-            try:
-                return str(_object)
-            except Exception:
-                return ""
-
-        while True:
-            stack = Stack(
-                exc_type=safe_str(exc_type.__name__),
-                exc_value=safe_str(exc_value),
-                is_cause=is_cause,
-                notes=notes,
-            )
-
-            if sys.version_info >= (3, 11):
-                if isinstance(exc_value, (BaseExceptionGroup, ExceptionGroup)):
-                    stack.is_group = True
-                    for exception in exc_value.exceptions:
-                        if exception in grouped_exceptions:
-                            continue
-                        grouped_exceptions.add(exception)
-                        stack.exceptions.append(
-                            Traceback.extract(
-                                type(exception),
-                                exception,
-                                exception.__traceback__,
-                                show_locals=show_locals,
-                                locals_max_length=locals_max_length,
-                                locals_hide_dunder=locals_hide_dunder,
-                                locals_hide_sunder=locals_hide_sunder,
-                                _visited_exceptions=grouped_exceptions,
-                            )
-                        )
-
-            if isinstance(exc_value, SyntaxError):
-                stack.syntax_error = _SyntaxError(
-                    offset=exc_value.offset or 0,
-                    filename=exc_value.filename or "?",
-                    lineno=exc_value.lineno or 0,
-                    line=exc_value.text or "",
-                    msg=exc_value.msg,
-                    notes=notes,
-                )
-
-            stacks.append(stack)
-            append = stack.frames.append
-
-            def get_locals(
-                iter_locals: Iterable[Tuple[str, object]],
-            ) -> Iterable[Tuple[str, object]]:
-                """Extract locals from an iterator of key pairs."""
-                if not (locals_hide_dunder or locals_hide_sunder):
-                    yield from iter_locals
-                    return
-                for key, value in iter_locals:
-                    if locals_hide_dunder and key.startswith("__"):
-                        continue
-                    if locals_hide_sunder and key.startswith("_"):
-                        continue
-                    yield key, value
-
-            for frame_summary, line_no in walk_tb(traceback):
-                filename = frame_summary.f_code.co_filename
-
-                last_instruction: Optional[Tuple[Tuple[int, int], Tuple[int, int]]]
-                last_instruction = None
-                if sys.version_info >= (3, 11):
-                    instruction_index = frame_summary.f_lasti // 2
-                    instruction_position = next(
-                        islice(
-                            frame_summary.f_code.co_positions(),
-                            instruction_index,
-                            instruction_index + 1,
-                        )
-                    )
-                    (
-                        start_line,
-                        end_line,
-                        start_column,
-                        end_column,
-                    ) = instruction_position
-                    if (
-                        start_line is not None
-                        and end_line is not None
-                        and start_column is not None
-                        and end_column is not None
-                    ):
-                        last_instruction = (
-                            (start_line, start_column),
-                            (end_line, end_column),
-                        )
-
-                if filename and not filename.startswith("<"):
-                    if not os.path.isabs(filename):
-                        filename = os.path.join(_IMPORT_CWD, filename)
-                if frame_summary.f_locals.get("_rich_traceback_omit", False):
-                    continue
-
-                frame = Frame(
-                    filename=filename or "?",
-                    lineno=line_no,
-                    name=frame_summary.f_code.co_name,
-                    locals=(
-                        {
-                            key: pretty.traverse(
-                                value,
-                                max_length=locals_max_length,
-                                max_string=locals_max_string,
-                                max_depth=locals_max_depth,
-                            )
-                            for key, value in get_locals(frame_summary.f_locals.items())
-                            if not (inspect.isfunction(value) or inspect.isclass(value))
-                        }
-                        if show_locals
-                        else None
-                    ),
-                    last_instruction=last_instruction,
-                )
-                append(frame)
-                if frame_summary.f_locals.get("_rich_traceback_guard", False):
-                    del stack.frames[:]
-
-            if not grouped_exceptions:
-                cause = getattr(exc_value, "__cause__", None)
-                if cause is not None and cause is not exc_value:
-                    exc_type = cause.__class__
-                    exc_value = cause
-                    # __traceback__ can be None, e.g. for exceptions raised by the
-                    # 'multiprocessing' module
-                    traceback = cause.__traceback__
-                    is_cause = True
-                    continue
-
-                cause = exc_value.__context__
-                if cause is not None and not getattr(
-                    exc_value, "__suppress_context__", False
-                ):
-                    exc_type = cause.__class__
-                    exc_value = cause
-                    traceback = cause.__traceback__
-                    is_cause = False
-                    continue
-            # No cover, code is reached but coverage doesn't recognize it.
-            break  # pragma: no cover
-
-        trace = Trace(stacks=stacks)
-
-        return trace
-
-    def __rich_console__(
-        self, console: Console, options: ConsoleOptions
-    ) -> RenderResult:
-        theme = self.theme
-        background_style = theme.get_background_style()
-        token_style = theme.get_style_for_token
-
-        traceback_theme = Theme(
-            {
-                "pretty": token_style(TextToken),
-                "pygments.text": token_style(Token),
-                "pygments.string": token_style(String),
-                "pygments.function": token_style(Name.Function),
-                "pygments.number": token_style(Number),
-                "repr.indent": token_style(Comment) + Style(dim=True),
-                "repr.str": token_style(String),
-                "repr.brace": token_style(TextToken) + Style(bold=True),
-                "repr.number": token_style(Number),
-                "repr.bool_true": token_style(Keyword.Constant),
-                "repr.bool_false": token_style(Keyword.Constant),
-                "repr.none": token_style(Keyword.Constant),
-                "scope.border": token_style(String.Delimiter),
-                "scope.equals": token_style(Operator),
-                "scope.key": token_style(Name),
-                "scope.key.special": token_style(Name.Constant) + Style(dim=True),
-            },
-            inherit=False,
-        )
-
-        highlighter = ReprHighlighter()
-
-        @group()
-        def render_stack(stack: Stack, last: bool) -> RenderResult:
-            if stack.frames:
-                stack_renderable: ConsoleRenderable = Panel(
-                    self._render_stack(stack),
-                    title="[traceback.title]Traceback [dim](most recent call last)",
-                    style=background_style,
-                    border_style="traceback.border",
-                    expand=True,
-                    padding=(0, 1),
-                )
-                stack_renderable = Constrain(stack_renderable, self.width)
-                with console.use_theme(traceback_theme):
-                    yield stack_renderable
-
-            if stack.syntax_error is not None:
-                with console.use_theme(traceback_theme):
-                    yield Constrain(
-                        Panel(
-                            self._render_syntax_error(stack.syntax_error),
-                            style=background_style,
-                            border_style="traceback.border.syntax_error",
-                            expand=True,
-                            padding=(0, 1),
-                            width=self.width,
-                        ),
-                        self.width,
-                    )
-                yield Text.assemble(
-                    (f"{stack.exc_type}: ", "traceback.exc_type"),
-                    highlighter(stack.syntax_error.msg),
-                )
-            elif stack.exc_value:
-                yield Text.assemble(
-                    (f"{stack.exc_type}: ", "traceback.exc_type"),
-                    highlighter(stack.exc_value),
-                )
-            else:
-                yield Text.assemble((f"{stack.exc_type}", "traceback.exc_type"))
-
-            for note in stack.notes:
-                yield Text.assemble(("[NOTE] ", "traceback.note"), highlighter(note))
-
-            if stack.is_group:
-                for group_no, group_exception in enumerate(stack.exceptions, 1):
-                    grouped_exceptions: List[Group] = []
-                    for group_last, group_stack in loop_last(group_exception.stacks):
-                        grouped_exceptions.append(render_stack(group_stack, group_last))
-                    yield ""
-                    yield Constrain(
-                        Panel(
-                            Group(*grouped_exceptions),
-                            title=f"Sub-exception #{group_no}",
-                            border_style="traceback.group.border",
-                        ),
-                        self.width,
-                    )
-
-            if not last:
-                if stack.is_cause:
-                    yield Text.from_markup(
-                        "\n[i]The above exception was the direct cause of the following exception:\n",
-                    )
-                else:
-                    yield Text.from_markup(
-                        "\n[i]During handling of the above exception, another exception occurred:\n",
-                    )
-
-        for last, stack in loop_last(reversed(self.trace.stacks)):
-            yield render_stack(stack, last)
-
-    @group()
-    def _render_syntax_error(self, syntax_error: _SyntaxError) -> RenderResult:
-        highlighter = ReprHighlighter()
-        path_highlighter = PathHighlighter()
-        if syntax_error.filename != "":
-            if os.path.exists(syntax_error.filename):
-                text = Text.assemble(
-                    (f" {syntax_error.filename}", "pygments.string"),
-                    (":", "pygments.text"),
-                    (str(syntax_error.lineno), "pygments.number"),
-                    style="pygments.text",
-                )
-                yield path_highlighter(text)
-        syntax_error_text = highlighter(syntax_error.line.rstrip())
-        syntax_error_text.no_wrap = True
-        offset = min(syntax_error.offset - 1, len(syntax_error_text))
-        syntax_error_text.stylize("bold underline", offset, offset)
-        syntax_error_text += Text.from_markup(
-            "\n" + " " * offset + "[traceback.offset]▲[/]",
-            style="pygments.text",
-        )
-        yield syntax_error_text
-
-    @classmethod
-    def _guess_lexer(cls, filename: str, code: str) -> str:
-        ext = os.path.splitext(filename)[-1]
-        if not ext:
-            # No extension, look at first line to see if it is a hashbang
-            # Note, this is an educated guess and not a guarantee
-            # If it fails, the only downside is that the code is highlighted strangely
-            new_line_index = code.index("\n")
-            first_line = code[:new_line_index] if new_line_index != -1 else code
-            if first_line.startswith("#!") and "python" in first_line.lower():
-                return "python"
-        try:
-            return cls.LEXERS.get(ext) or guess_lexer_for_filename(filename, code).name
-        except ClassNotFound:
-            return "text"
-
-    @group()
-    def _render_stack(self, stack: Stack) -> RenderResult:
-        path_highlighter = PathHighlighter()
-        theme = self.theme
-
-        def render_locals(frame: Frame) -> Iterable[ConsoleRenderable]:
-            if frame.locals:
-                yield render_scope(
-                    frame.locals,
-                    title="locals",
-                    indent_guides=self.indent_guides,
-                    max_length=self.locals_max_length,
-                    max_string=self.locals_max_string,
-                    max_depth=self.locals_max_depth,
-                    overflow=self.locals_overflow,
-                )
-
-        exclude_frames: Optional[range] = None
-        if self.max_frames != 0:
-            exclude_frames = range(
-                self.max_frames // 2,
-                len(stack.frames) - self.max_frames // 2,
-            )
-
-        excluded = False
-        for frame_index, frame in enumerate(stack.frames):
-            if exclude_frames and frame_index in exclude_frames:
-                excluded = True
-                continue
-
-            if excluded:
-                assert exclude_frames is not None
-                yield Text(
-                    f"\n... {len(exclude_frames)} frames hidden ...",
-                    justify="center",
-                    style="traceback.error",
-                )
-                excluded = False
-
-            first = frame_index == 0
-            frame_filename = frame.filename
-            suppressed = any(frame_filename.startswith(path) for path in self.suppress)
-
-            if os.path.exists(frame.filename):
-                text = Text.assemble(
-                    path_highlighter(Text(frame.filename, style="pygments.string")),
-                    (":", "pygments.text"),
-                    (str(frame.lineno), "pygments.number"),
-                    " in ",
-                    (frame.name, "pygments.function"),
-                    style="pygments.text",
-                )
-            else:
-                text = Text.assemble(
-                    "in ",
-                    (frame.name, "pygments.function"),
-                    (":", "pygments.text"),
-                    (str(frame.lineno), "pygments.number"),
-                    style="pygments.text",
-                )
-            if not frame.filename.startswith("<") and not first:
-                yield ""
-            yield text
-            if frame.filename.startswith("<"):
-                yield from render_locals(frame)
-                continue
-            if not suppressed:
-                try:
-                    code_lines = linecache.getlines(frame.filename)
-                    code = "".join(code_lines)
-                    if not code:
-                        # code may be an empty string if the file doesn't exist, OR
-                        # if the traceback filename is generated dynamically
-                        continue
-                    lexer_name = self._guess_lexer(frame.filename, code)
-                    syntax = Syntax(
-                        code,
-                        lexer_name,
-                        theme=theme,
-                        line_numbers=True,
-                        line_range=(
-                            frame.lineno - self.extra_lines,
-                            frame.lineno + self.extra_lines,
-                        ),
-                        highlight_lines={frame.lineno},
-                        word_wrap=self.word_wrap,
-                        code_width=self.code_width,
-                        indent_guides=self.indent_guides,
-                        dedent=False,
-                    )
-                    yield ""
-                except Exception as error:
-                    yield Text.assemble(
-                        (f"\n{error}", "traceback.error"),
-                    )
-                else:
-                    if frame.last_instruction is not None:
-                        start, end = frame.last_instruction
-
-                        # Stylize a line at a time
-                        # So that indentation isn't underlined (which looks bad)
-                        for line1, column1, column2 in _iter_syntax_lines(start, end):
-                            try:
-                                if column1 == 0:
-                                    line = code_lines[line1 - 1]
-                                    column1 = len(line) - len(line.lstrip())
-                                if column2 == -1:
-                                    column2 = len(code_lines[line1 - 1])
-                            except IndexError:
-                                # Being defensive here
-                                # If last_instruction reports a line out-of-bounds, we don't want to crash
-                                continue
-
-                            syntax.stylize_range(
-                                style="traceback.error_range",
-                                start=(line1, column1),
-                                end=(line1, column2),
-                            )
-                    yield (
-                        Columns(
-                            [
-                                syntax,
-                                *render_locals(frame),
-                            ],
-                            padding=1,
-                        )
-                        if frame.locals
-                        else syntax
-                    )
-
-
-if __name__ == "__main__":  # pragma: no cover
-    install(show_locals=True)
-    import sys
-
-    def bar(
-        a: Any,
-    ) -> None:  # 这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑
-        one = 1
-        print(one / a)
-
-    def foo(a: Any) -> None:
-        _rich_traceback_guard = True
-        zed = {
-            "characters": {
-                "Paul Atreides",
-                "Vladimir Harkonnen",
-                "Thufir Hawat",
-                "Duncan Idaho",
-            },
-            "atomic_types": (None, False, True),
-        }
-        bar(a)
-
-    def error() -> None:
-        foo(0)
-
-    error()
diff --git a/voxvera/vendor/rich/tree.py b/voxvera/vendor/rich/tree.py
deleted file mode 100644
index 9a87d60..0000000
--- a/voxvera/vendor/rich/tree.py
+++ /dev/null
@@ -1,257 +0,0 @@
-from typing import Iterator, List, Optional, Tuple
-
-from ._loop import loop_first, loop_last
-from .console import Console, ConsoleOptions, RenderableType, RenderResult
-from .jupyter import JupyterMixin
-from .measure import Measurement
-from .segment import Segment
-from .style import Style, StyleStack, StyleType
-from .styled import Styled
-
-GuideType = Tuple[str, str, str, str]
-
-
-class Tree(JupyterMixin):
-    """A renderable for a tree structure.
-
-    Attributes:
-        ASCII_GUIDES (GuideType): Guide lines used when Console.ascii_only is True.
-        TREE_GUIDES (List[GuideType, GuideType, GuideType]): Default guide lines.
-
-    Args:
-        label (RenderableType): The renderable or str for the tree label.
-        style (StyleType, optional): Style of this tree. Defaults to "tree".
-        guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
-        expanded (bool, optional): Also display children. Defaults to True.
-        highlight (bool, optional): Highlight renderable (if str). Defaults to False.
-        hide_root (bool, optional): Hide the root node. Defaults to False.
-    """
-
-    ASCII_GUIDES = ("    ", "|   ", "+-- ", "`-- ")
-    TREE_GUIDES = [
-        ("    ", "│   ", "├── ", "└── "),
-        ("    ", "┃   ", "┣━━ ", "┗━━ "),
-        ("    ", "║   ", "╠══ ", "╚══ "),
-    ]
-
-    def __init__(
-        self,
-        label: RenderableType,
-        *,
-        style: StyleType = "tree",
-        guide_style: StyleType = "tree.line",
-        expanded: bool = True,
-        highlight: bool = False,
-        hide_root: bool = False,
-    ) -> None:
-        self.label = label
-        self.style = style
-        self.guide_style = guide_style
-        self.children: List[Tree] = []
-        self.expanded = expanded
-        self.highlight = highlight
-        self.hide_root = hide_root
-
-    def add(
-        self,
-        label: RenderableType,
-        *,
-        style: Optional[StyleType] = None,
-        guide_style: Optional[StyleType] = None,
-        expanded: bool = True,
-        highlight: Optional[bool] = False,
-    ) -> "Tree":
-        """Add a child tree.
-
-        Args:
-            label (RenderableType): The renderable or str for the tree label.
-            style (StyleType, optional): Style of this tree. Defaults to "tree".
-            guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
-            expanded (bool, optional): Also display children. Defaults to True.
-            highlight (Optional[bool], optional): Highlight renderable (if str). Defaults to False.
-
-        Returns:
-            Tree: A new child Tree, which may be further modified.
-        """
-        node = Tree(
-            label,
-            style=self.style if style is None else style,
-            guide_style=self.guide_style if guide_style is None else guide_style,
-            expanded=expanded,
-            highlight=self.highlight if highlight is None else highlight,
-        )
-        self.children.append(node)
-        return node
-
-    def __rich_console__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "RenderResult":
-        stack: List[Iterator[Tuple[bool, Tree]]] = []
-        pop = stack.pop
-        push = stack.append
-        new_line = Segment.line()
-
-        get_style = console.get_style
-        null_style = Style.null()
-        guide_style = get_style(self.guide_style, default="") or null_style
-        SPACE, CONTINUE, FORK, END = range(4)
-
-        _Segment = Segment
-
-        def make_guide(index: int, style: Style) -> Segment:
-            """Make a Segment for a level of the guide lines."""
-            if options.ascii_only:
-                line = self.ASCII_GUIDES[index]
-            else:
-                guide = 1 if style.bold else (2 if style.underline2 else 0)
-                line = self.TREE_GUIDES[0 if options.legacy_windows else guide][index]
-            return _Segment(line, style)
-
-        levels: List[Segment] = [make_guide(CONTINUE, guide_style)]
-        push(iter(loop_last([self])))
-
-        guide_style_stack = StyleStack(get_style(self.guide_style))
-        style_stack = StyleStack(get_style(self.style))
-        remove_guide_styles = Style(bold=False, underline2=False)
-
-        depth = 0
-
-        while stack:
-            stack_node = pop()
-            try:
-                last, node = next(stack_node)
-            except StopIteration:
-                levels.pop()
-                if levels:
-                    guide_style = levels[-1].style or null_style
-                    levels[-1] = make_guide(FORK, guide_style)
-                    guide_style_stack.pop()
-                    style_stack.pop()
-                continue
-            push(stack_node)
-            if last:
-                levels[-1] = make_guide(END, levels[-1].style or null_style)
-
-            guide_style = guide_style_stack.current + get_style(node.guide_style)
-            style = style_stack.current + get_style(node.style)
-            prefix = levels[(2 if self.hide_root else 1) :]
-            renderable_lines = console.render_lines(
-                Styled(node.label, style),
-                options.update(
-                    width=options.max_width
-                    - sum(level.cell_length for level in prefix),
-                    highlight=self.highlight,
-                    height=None,
-                ),
-                pad=options.justify is not None,
-            )
-
-            if not (depth == 0 and self.hide_root):
-                for first, line in loop_first(renderable_lines):
-                    if prefix:
-                        yield from _Segment.apply_style(
-                            prefix,
-                            style.background_style,
-                            post_style=remove_guide_styles,
-                        )
-                    yield from line
-                    yield new_line
-                    if first and prefix:
-                        prefix[-1] = make_guide(
-                            SPACE if last else CONTINUE, prefix[-1].style or null_style
-                        )
-
-            if node.expanded and node.children:
-                levels[-1] = make_guide(
-                    SPACE if last else CONTINUE, levels[-1].style or null_style
-                )
-                levels.append(
-                    make_guide(END if len(node.children) == 1 else FORK, guide_style)
-                )
-                style_stack.push(get_style(node.style))
-                guide_style_stack.push(get_style(node.guide_style))
-                push(iter(loop_last(node.children)))
-                depth += 1
-
-    def __rich_measure__(
-        self, console: "Console", options: "ConsoleOptions"
-    ) -> "Measurement":
-        stack: List[Iterator[Tree]] = [iter([self])]
-        pop = stack.pop
-        push = stack.append
-        minimum = 0
-        maximum = 0
-        measure = Measurement.get
-        level = 0
-        while stack:
-            iter_tree = pop()
-            try:
-                tree = next(iter_tree)
-            except StopIteration:
-                level -= 1
-                continue
-            push(iter_tree)
-            min_measure, max_measure = measure(console, options, tree.label)
-            indent = level * 4
-            minimum = max(min_measure + indent, minimum)
-            maximum = max(max_measure + indent, maximum)
-            if tree.expanded and tree.children:
-                push(iter(tree.children))
-                level += 1
-        return Measurement(minimum, maximum)
-
-
-if __name__ == "__main__":  # pragma: no cover
-    from rich.console import Group
-    from rich.markdown import Markdown
-    from rich.panel import Panel
-    from rich.syntax import Syntax
-    from rich.table import Table
-
-    table = Table(row_styles=["", "dim"])
-
-    table.add_column("Released", style="cyan", no_wrap=True)
-    table.add_column("Title", style="magenta")
-    table.add_column("Box Office", justify="right", style="green")
-
-    table.add_row("Dec 20, 2019", "Star Wars: The Rise of Skywalker", "$952,110,690")
-    table.add_row("May 25, 2018", "Solo: A Star Wars Story", "$393,151,347")
-    table.add_row("Dec 15, 2017", "Star Wars Ep. V111: The Last Jedi", "$1,332,539,889")
-    table.add_row("Dec 16, 2016", "Rogue One: A Star Wars Story", "$1,332,439,889")
-
-    code = """\
-class Segment(NamedTuple):
-    text: str = ""
-    style: Optional[Style] = None
-    is_control: bool = False
-"""
-    syntax = Syntax(code, "python", theme="monokai", line_numbers=True)
-
-    markdown = Markdown(
-        """\
-### example.md
-> Hello, World!
->
-> Markdown _all_ the things
-"""
-    )
-
-    root = Tree("🌲 [b green]Rich Tree", highlight=True, hide_root=True)
-
-    node = root.add(":file_folder: Renderables", guide_style="red")
-    simple_node = node.add(":file_folder: [bold yellow]Atomic", guide_style="uu green")
-    simple_node.add(Group("📄 Syntax", syntax))
-    simple_node.add(Group("📄 Markdown", Panel(markdown, border_style="green")))
-
-    containers_node = node.add(
-        ":file_folder: [bold magenta]Containers", guide_style="bold magenta"
-    )
-    containers_node.expanded = True
-    panel = Panel.fit("Just a panel", border_style="red")
-    containers_node.add(Group("📄 Panels", panel))
-
-    containers_node.add(Group("📄 [b magenta]Table", table))
-
-    console = Console()
-
-    console.print(root)
diff --git a/voxvera/vendor/setuptools-82.0.1.dist-info/INSTALLER b/voxvera/vendor/setuptools-82.0.1.dist-info/INSTALLER
deleted file mode 100644
index a1b589e..0000000
--- a/voxvera/vendor/setuptools-82.0.1.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-pip
diff --git a/voxvera/vendor/setuptools-82.0.1.dist-info/METADATA b/voxvera/vendor/setuptools-82.0.1.dist-info/METADATA
deleted file mode 100644
index 6a6b6fc..0000000
--- a/voxvera/vendor/setuptools-82.0.1.dist-info/METADATA
+++ /dev/null
@@ -1,140 +0,0 @@
-Metadata-Version: 2.4
-Name: setuptools
-Version: 82.0.1
-Summary: Most extensible Python build backend with support for C/C++ extension modules
-Author-email: Python Packaging Authority 
-License-Expression: MIT
-Project-URL: Source, https://github.com/pypa/setuptools
-Project-URL: Documentation, https://setuptools.pypa.io/
-Project-URL: Changelog, https://setuptools.pypa.io/en/stable/history.html
-Keywords: CPAN PyPI distutils eggs package management
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: System :: Archiving :: Packaging
-Classifier: Topic :: System :: Systems Administration
-Classifier: Topic :: Utilities
-Requires-Python: >=3.9
-Description-Content-Type: text/x-rst
-License-File: LICENSE
-Provides-Extra: test
-Requires-Dist: pytest!=8.1.*,>=6; extra == "test"
-Requires-Dist: virtualenv>=13.0.0; extra == "test"
-Requires-Dist: wheel>=0.44.0; extra == "test"
-Requires-Dist: pip>=19.1; extra == "test"
-Requires-Dist: packaging>=24.2; extra == "test"
-Requires-Dist: jaraco.envs>=2.2; extra == "test"
-Requires-Dist: pytest-xdist>=3; extra == "test"
-Requires-Dist: jaraco.path>=3.7.2; extra == "test"
-Requires-Dist: build[virtualenv]>=1.0.3; extra == "test"
-Requires-Dist: filelock>=3.4.0; extra == "test"
-Requires-Dist: ini2toml[lite]>=0.14; extra == "test"
-Requires-Dist: tomli-w>=1.0.0; extra == "test"
-Requires-Dist: pytest-timeout; extra == "test"
-Requires-Dist: pytest-perf; sys_platform != "cygwin" and extra == "test"
-Requires-Dist: jaraco.develop>=7.21; (python_version >= "3.9" and sys_platform != "cygwin") and extra == "test"
-Requires-Dist: pytest-home>=0.5; extra == "test"
-Requires-Dist: pytest-subprocess; extra == "test"
-Requires-Dist: pyproject-hooks!=1.1; extra == "test"
-Requires-Dist: jaraco.test>=5.5; extra == "test"
-Provides-Extra: doc
-Requires-Dist: sphinx>=3.5; extra == "doc"
-Requires-Dist: jaraco.packaging>=9.3; extra == "doc"
-Requires-Dist: rst.linker>=1.9; extra == "doc"
-Requires-Dist: furo; extra == "doc"
-Requires-Dist: sphinx-lint; extra == "doc"
-Requires-Dist: jaraco.tidelift>=1.4; extra == "doc"
-Requires-Dist: pygments-github-lexers==0.0.5; extra == "doc"
-Requires-Dist: sphinx-favicon; extra == "doc"
-Requires-Dist: sphinx-inline-tabs; extra == "doc"
-Requires-Dist: sphinx-reredirects; extra == "doc"
-Requires-Dist: sphinxcontrib-towncrier; extra == "doc"
-Requires-Dist: sphinx-notfound-page<2,>=1; extra == "doc"
-Requires-Dist: pyproject-hooks!=1.1; extra == "doc"
-Requires-Dist: towncrier<24.7; extra == "doc"
-Provides-Extra: ssl
-Provides-Extra: certs
-Provides-Extra: core
-Requires-Dist: packaging>=24.2; extra == "core"
-Requires-Dist: more_itertools>=8.8; extra == "core"
-Requires-Dist: jaraco.text>=3.7; extra == "core"
-Requires-Dist: importlib_metadata>=6; python_version < "3.10" and extra == "core"
-Requires-Dist: tomli>=2.0.1; python_version < "3.11" and extra == "core"
-Requires-Dist: wheel>=0.43.0; extra == "core"
-Requires-Dist: jaraco.functools>=4; extra == "core"
-Requires-Dist: more_itertools; extra == "core"
-Provides-Extra: check
-Requires-Dist: pytest-checkdocs>=2.4; extra == "check"
-Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check"
-Requires-Dist: ruff>=0.13.0; sys_platform != "cygwin" and extra == "check"
-Provides-Extra: cover
-Requires-Dist: pytest-cov; extra == "cover"
-Provides-Extra: enabler
-Requires-Dist: pytest-enabler>=2.2; extra == "enabler"
-Provides-Extra: type
-Requires-Dist: pytest-mypy; extra == "type"
-Requires-Dist: mypy==1.18.*; extra == "type"
-Requires-Dist: importlib_metadata>=7.0.2; python_version < "3.10" and extra == "type"
-Requires-Dist: jaraco.develop>=7.21; sys_platform != "cygwin" and extra == "type"
-Dynamic: license-file
-
-.. |pypi-version| image:: https://img.shields.io/pypi/v/setuptools.svg
-   :target: https://pypi.org/project/setuptools
-
-.. |py-version| image:: https://img.shields.io/pypi/pyversions/setuptools.svg
-
-.. |test-badge| image:: https://github.com/pypa/setuptools/actions/workflows/main.yml/badge.svg
-   :target: https://github.com/pypa/setuptools/actions?query=workflow%3A%22tests%22
-   :alt: tests
-
-.. |ruff-badge| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
-   :target: https://github.com/astral-sh/ruff
-   :alt: Ruff
-
-.. |docs-badge| image:: https://img.shields.io/readthedocs/setuptools/latest.svg
-   :target: https://setuptools.pypa.io
-
-.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2025-informational
-   :target: https://blog.jaraco.com/skeleton
-
-.. |codecov-badge| image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
-   :target: https://codecov.io/gh/pypa/setuptools
-
-.. |tidelift-badge| image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
-   :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme
-
-.. |discord-badge| image:: https://img.shields.io/discord/803025117553754132
-   :target: https://discord.com/channels/803025117553754132/815945031150993468
-   :alt: Discord
-
-|pypi-version| |py-version| |test-badge| |ruff-badge| |docs-badge| |skeleton-badge| |codecov-badge| |discord-badge|
-
-See the `Quickstart `_
-and the `User's Guide `_ for
-instructions on how to use Setuptools.
-
-Questions and comments should be directed to `GitHub Discussions
-`_.
-Bug reports and especially tested patches may be
-submitted directly to the `bug tracker
-`_.
-
-
-Code of Conduct
-===============
-
-Everyone interacting in the setuptools project's codebases, issue trackers,
-chat rooms, and fora is expected to follow the
-`PSF Code of Conduct `_.
-
-
-For Enterprise
-==============
-
-Available as part of the Tidelift Subscription.
-
-Setuptools and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.
-
-`Learn more `_.
diff --git a/voxvera/vendor/setuptools-82.0.1.dist-info/RECORD b/voxvera/vendor/setuptools-82.0.1.dist-info/RECORD
deleted file mode 100644
index 48e12af..0000000
--- a/voxvera/vendor/setuptools-82.0.1.dist-info/RECORD
+++ /dev/null
@@ -1,440 +0,0 @@
-_distutils_hack/__init__.py,sha256=34HmvLo07j45Uvd2VR-2aRQ7lJD91sTK6zJgn5fphbQ,6755
-_distutils_hack/override.py,sha256=Eu_s-NF6VIZ4Cqd0tbbA5wtWky2IZPNd8et6GLt1mzo,44
-distutils-precedence.pth,sha256=JjjOniUA5XKl4N5_rtZmHrVp0baW_LoHsN0iPaX10iQ,151
-setuptools-82.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
-setuptools-82.0.1.dist-info/METADATA,sha256=dWg_QOESHrzLvKTWea4tv4oL4LqRUx3yhbKKvpJ6Q_g,6527
-setuptools-82.0.1.dist-info/RECORD,,
-setuptools-82.0.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
-setuptools-82.0.1.dist-info/entry_points.txt,sha256=zkgthpf_Fa9NVE9p6FKT3Xk9DR1faAcRU4coggsV7jA,2449
-setuptools-82.0.1.dist-info/licenses/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
-setuptools-82.0.1.dist-info/top_level.txt,sha256=Wsln-wPBdc8NXLNXsnCRyTXUhGi0mUw_l0ZVThaim-I,27
-setuptools/__init__.py,sha256=-UtTG9pdeEZkYiIFT69RckMCqxUdVILjj24g3qeJ_rc,9521
-setuptools/_core_metadata.py,sha256=T7Tjp-WSoN881adev3R1wzXCPnkDHqbC2MgylN1yjS8,11978
-setuptools/_discovery.py,sha256=HxEpgYQ8zUaLOOSp8JIA4y2Mdvn9ysVxspPT-ppfzM4,836
-setuptools/_distutils/__init__.py,sha256=xGYuhWwLG07J0Q49BVnEjPy6wyDcd6veJMDJX7ljlyM,359
-setuptools/_distutils/_log.py,sha256=i-lNTTcXS8TmWITJ6DODGvtW5z5tMattJQ76h8rZxQU,42
-setuptools/_distutils/_macos_compat.py,sha256=JzUGhF4E5yIITHbUaPobZEWjGHdrrcNV63z86S4RjBc,239
-setuptools/_distutils/_modified.py,sha256=RF1n1CexyDYV3lvGbeXS0s-XCJVboDOIUbA8wEQqYTY,3211
-setuptools/_distutils/_msvccompiler.py,sha256=9PSfSHxvJnHnQL6Sqz4Xcz7iaBIT62p6BheQzGsSlwo,335
-setuptools/_distutils/archive_util.py,sha256=dDZjw4BwhNIyt20hHlrIely4WSiN20HVTGdaPRKGI0o,8484
-setuptools/_distutils/ccompiler.py,sha256=FKVjqzGJ7c-FtouNjhLiaMPm5LKMZHHAruXf8LU216c,524
-setuptools/_distutils/cmd.py,sha256=lzqM-3rwYJNUhJiCYOv04aeUPenym2vyOndFPEOdZgo,21344
-setuptools/_distutils/command/__init__.py,sha256=GfFAzbBqk1qxSH4BdaKioKS4hRRnD44BAmwEN85C4u8,386
-setuptools/_distutils/command/_framework_compat.py,sha256=0iZdSJYzGRWCCvzRDKE-R0-_yaAYvFMd1ylXb2eYXug,1609
-setuptools/_distutils/command/bdist.py,sha256=jWtk61R7fWNUUNxJV0thTZzU5n80L3Ay1waSiP9kiLA,5854
-setuptools/_distutils/command/bdist_dumb.py,sha256=FF0FpuC3IgFpOjJ1ub3hGU5ERFMBnJOiUjrAI-u4auw,4609
-setuptools/_distutils/command/bdist_rpm.py,sha256=WRRB3k65qubgZO6zwiRMpaEEuG391mju_iJDRJTPvT8,21672
-setuptools/_distutils/command/build.py,sha256=SpHlagf0iNaKVyIhxDfhPFZ8X1-LAWOCQACy-yt2K0w,5923
-setuptools/_distutils/command/build_clib.py,sha256=6u-R8qjmWr6FPECuzDoAyVl1xRBtuEmXJZ2cz2Zk2zg,7733
-setuptools/_distutils/command/build_ext.py,sha256=vnInlUvOVbCS7eCpp3ThqTY4NkQ7WBHcmsROGn8upKw,32676
-setuptools/_distutils/command/build_py.py,sha256=BAJI_X9QlfiTyokU3ZgfDnsy3Xn6aWdxl2T_lToagbk,16606
-setuptools/_distutils/command/build_scripts.py,sha256=UKhGKyXLjGCAQoQVfP2t-DnlMaUVjcXWac6UCs6GWMI,4833
-setuptools/_distutils/command/check.py,sha256=yoNe2MPY4JcTM7rwoIQdfZ75q5Ri058I2coi-Gq9CjM,4946
-setuptools/_distutils/command/clean.py,sha256=UWkfAMmpOZGl0_PjiZJFdyLV2yzGnoimygF8fka907I,2551
-setuptools/_distutils/command/config.py,sha256=zE7F8mSQavwiZwNZj8WtrF6T92lt-K1dUNq9rYIQpgc,12206
-setuptools/_distutils/command/install.py,sha256=-JenB-mua4hc2RI_-W8F9PnP_J-OaFO7E0PJGKxLo1o,30072
-setuptools/_distutils/command/install_data.py,sha256=GzBlUWWKubTYJlP-L0auUriq9cL-5RKOcoyHTttKj0Q,2875
-setuptools/_distutils/command/install_egg_info.py,sha256=0tJ0AqFr8P1bf5wFH9eO7ssx1G3_SLhO9bCbWN-h0f4,2809
-setuptools/_distutils/command/install_headers.py,sha256=5ciKCj8c3XKsYNKdkdMvnypaUCKcoWCDeeZij3fD-Z4,1272
-setuptools/_distutils/command/install_lib.py,sha256=3VQc5P06dv-1QVl8G-raVpTD-bMlPTj1c3NE7adJiyk,8512
-setuptools/_distutils/command/install_scripts.py,sha256=CTzga_-kEjYWguL-Dg_GP83Jax6uw2VnFFwlR8XoAls,1877
-setuptools/_distutils/command/sdist.py,sha256=XGEO5UMznLzPT-F3ftbryqkMsMWLKd15tjObiZJsm8k,19107
-setuptools/_distutils/compat/__init__.py,sha256=J20aXGjJ86Rg41xFLIWlcWCgZ9edMdJ9vvdNEQ87vPQ,522
-setuptools/_distutils/compat/numpy.py,sha256=UFgneZw9w97g4c-yGoAIOyLxUOWQ-fPRIhhfMs7_Ouc,167
-setuptools/_distutils/compat/py39.py,sha256=hOsD6lwZLqZoMnacNJ3P6nUA-LJQhEpVtYTzVH0o96M,1964
-setuptools/_distutils/compilers/C/base.py,sha256=0b6_nCJiQtmUkdxL6tFKxVx8vv8AkLZOfRkIS2zGXCc,54550
-setuptools/_distutils/compilers/C/cygwin.py,sha256=QFW4oBPylt6-uR4mdrXbFtGMQQ_mXJ4gB0qPUklbMWQ,11802
-setuptools/_distutils/compilers/C/errors.py,sha256=sKOVzJajMUmNdfywo9UM_QQGsKFcclDhtI5TlCiXMLc,573
-setuptools/_distutils/compilers/C/msvc.py,sha256=c-12nYp2XpD-fUvxfgd559rWZqmmRx9f9mWFwWTsoP4,21386
-setuptools/_distutils/compilers/C/tests/test_base.py,sha256=rdhHc56bhXtm5NnN9BSHwr6c69UqzMItZQzlw2AsdMc,2706
-setuptools/_distutils/compilers/C/tests/test_cygwin.py,sha256=UgV2VgUXj3VulcbDc0UBWfEyJDx42tgSwS4LzHix3mY,2701
-setuptools/_distutils/compilers/C/tests/test_mingw.py,sha256=hCmwyywISpRoyOySbFHBL4TprWRV0mUWDKmOLO8XBXE,1900
-setuptools/_distutils/compilers/C/tests/test_msvc.py,sha256=DlGjmZ1mBSMXIgmlu80BKc7V-EJOZuYucwJwFh5dn28,4151
-setuptools/_distutils/compilers/C/tests/test_unix.py,sha256=AyadWw1fR-UeDl2TvIbYBzOJVHkpE_oRRQ3JTJWqaEA,14642
-setuptools/_distutils/compilers/C/unix.py,sha256=YH-y9g_pjBFjaJyHJQkDEBQ7q4D20I2-cWJNdgw-Yho,16531
-setuptools/_distutils/compilers/C/zos.py,sha256=WnGA_PR51_FP89wKbl85_2rcLA28BIKbeG5rPZ7JUig,6568
-setuptools/_distutils/core.py,sha256=GEHKaFC48T3o-_SmH4864GvKyx1IgbVC6ISIPVlx7a4,9364
-setuptools/_distutils/cygwinccompiler.py,sha256=mG_cU8SVZ4amD_VtF5vH6BXP0-kghGsDPbDSXrQ963c,594
-setuptools/_distutils/debug.py,sha256=N6MrTAqK6l9SVk6tWweR108PM8Ol7qNlfyV-nHcLhsY,139
-setuptools/_distutils/dep_util.py,sha256=xN75p6ZpHhMiHEc-rpL2XilJQynHnDNiafHteaZ4tjU,349
-setuptools/_distutils/dir_util.py,sha256=1i-puqc3g8sTggEPX6NSuqNtGSNEdSy-Qw9qQfC3PSo,6864
-setuptools/_distutils/dist.py,sha256=kPQ81tTJdZikPayJ7OIunkFAh-m8-YqjbpQYQSuMTeI,55699
-setuptools/_distutils/errors.py,sha256=PPE2oDRh5y9Q1beKK9rhdvDaCzQhi4HCXs4KcqfqgZY,3092
-setuptools/_distutils/extension.py,sha256=Foyu4gULcPqm1_U9zrYYHxNk4NqglXv1rbsOk_QrSds,11155
-setuptools/_distutils/fancy_getopt.py,sha256=PjdO-bWCW0imV_UN-MGEw9R2GP2OiE8pHjITgmTAY3Q,17895
-setuptools/_distutils/file_util.py,sha256=O3hNtKxcs4jhCdOtGN23wIrLSvMwoRmMV2caEeXbvdU,7811
-setuptools/_distutils/filelist.py,sha256=MBeSRJmPcKmDv8ooZgSU4BiQPZ0Khwv8l_jhD50XycI,15337
-setuptools/_distutils/log.py,sha256=VyBs5j7z4-K6XTEEBThUc9HyMpoPLGtQpERqbz5ylww,1200
-setuptools/_distutils/spawn.py,sha256=sPnZ3Q3gsBzNBB2zsbfFxzkHJ-AveB6lyK9YqBHQiIw,3963
-setuptools/_distutils/sysconfig.py,sha256=KeI8OHbMuEzHJ8Q0cBez9KZny8iRy6Z6Y0AkMz1jlsU,19728
-setuptools/_distutils/tests/__init__.py,sha256=j-IoPZEtQv3EOPuqNTwalr6GLyRjzCC-OOaNvZzmHsI,1485
-setuptools/_distutils/tests/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_distutils/tests/compat/py39.py,sha256=t0GBTM-30jX-9zCfkwlNBFtzzabemx6065mJ0d9_VRw,1026
-setuptools/_distutils/tests/support.py,sha256=tjsYsyxvpTK4NrkCseh2ujvDIGV0Mf_b5SI5fP2T0yM,4099
-setuptools/_distutils/tests/test_archive_util.py,sha256=VaXLjV8kup-Z6rIVXCBW7u21pubcAH_R3hEtSmS81Xs,11441
-setuptools/_distutils/tests/test_bdist.py,sha256=xNHxUsLlHsZQRwkzLb_iSD24s-9Mk-NX2ffBWwOyPyc,1396
-setuptools/_distutils/tests/test_bdist_dumb.py,sha256=QF05MHNhPOdZyh88Xpw8KsO64s7pRFkl8KL-RoV4XK0,2247
-setuptools/_distutils/tests/test_bdist_rpm.py,sha256=Hdm-pwWgyaoGdGbEcGZa8cRhGU45y8gHK8umOanTjik,3932
-setuptools/_distutils/tests/test_build.py,sha256=JJY5XpOZco25ZY0pstxl-iI8mHsWP0ujf5o8aOtuZYY,1742
-setuptools/_distutils/tests/test_build_clib.py,sha256=Mo1ZFb4C1VXBYOGvnallwN7YCnTtr24akLDO8Zi4CsY,4331
-setuptools/_distutils/tests/test_build_ext.py,sha256=QFO9qYVhWWdJu17HXc4x9RMnLZlhk0lAHi9HVppbuX4,22545
-setuptools/_distutils/tests/test_build_py.py,sha256=NsfmRrojOHBXNMqWR_mp5g4PLTgjhD7iZFUffGZFIdw,6882
-setuptools/_distutils/tests/test_build_scripts.py,sha256=cD-FRy-oX55sXRX5Ez5xQCaeHrWajyKc4Xuwv2fe48w,2880
-setuptools/_distutils/tests/test_check.py,sha256=hHSV07qf7YoSxGsTbbsUQ9tssZz5RRNdbrY1s2SwaFI,6226
-setuptools/_distutils/tests/test_clean.py,sha256=hPH6jfIpGFUrvWbF1txkiNVSNaAxt2wq5XjV499zO4E,1240
-setuptools/_distutils/tests/test_cmd.py,sha256=bgRB79mitoOKR1OiyZHnCogvGxt3pWkxeTqIC04lQWQ,3254
-setuptools/_distutils/tests/test_config_cmd.py,sha256=Zs6WX0IfxDvmuC19XzuVNnYCnTr9Y-hl73TAmDSBN4Y,2664
-setuptools/_distutils/tests/test_core.py,sha256=L7XKVAxa-MGoAZeANopnuK9fRKneYhkSQpgw8XQvcF8,3829
-setuptools/_distutils/tests/test_dir_util.py,sha256=E84lC-k4riVUwURyWaQ0Jqx2ui2-io-0RuJa3M7qkJs,4500
-setuptools/_distutils/tests/test_dist.py,sha256=a6wlc5fQJd5qQ6HOndzcupNhjTxvj6-_JLtpuYvaP1M,18793
-setuptools/_distutils/tests/test_extension.py,sha256=-YejLgZCuycFrOBd64pVH0JvwMc9NwhzHvQxvvjXHqk,3670
-setuptools/_distutils/tests/test_file_util.py,sha256=livjnl3FkilQlrB2rFdFQq9nvjEVZHynNya0bfzv_b4,3522
-setuptools/_distutils/tests/test_filelist.py,sha256=rJwkqCUfkGDgWlD22TozsT8ycbupMHB8DXqThzwT1T4,10766
-setuptools/_distutils/tests/test_install.py,sha256=TfCB0ykhIxydIC2Q4SuTAZzSHvteMHgrBL9whoSgK9Q,8618
-setuptools/_distutils/tests/test_install_data.py,sha256=vKq3K97k0hBAnOg38nmwEdf7cEDVr9rTVyCeJolgb4A,2464
-setuptools/_distutils/tests/test_install_headers.py,sha256=PVAYpo_tYl980Qf64DPOmmSvyefIHdU06f7VsJeZykE,936
-setuptools/_distutils/tests/test_install_lib.py,sha256=qri6Rl-maNTQrNDV8DbeXNl0hjsfRIKiI4rfZLrmWBI,3612
-setuptools/_distutils/tests/test_install_scripts.py,sha256=KE3v0cDkFW-90IOID-OmZZGM2mhy-ZkEuuW7UXS2SHw,1600
-setuptools/_distutils/tests/test_log.py,sha256=isFtOufloCyEdZaQOV7cVUr46GwtdVMj43mGBB5XH7k,323
-setuptools/_distutils/tests/test_modified.py,sha256=h1--bOWmtJo1bpVV6uRhdnS9br71CBiNDM1MDwSGpug,4221
-setuptools/_distutils/tests/test_sdist.py,sha256=cfzUhlCA418-1vH9ta3IBs26c_jUBbkJoFOK5GnAyNk,15062
-setuptools/_distutils/tests/test_spawn.py,sha256=eS8w9D7bTxyFLSyRahJWeuh8Kc1F8RWWiY_dSG5B5Bc,4803
-setuptools/_distutils/tests/test_sysconfig.py,sha256=lxM8LsUi1TomjDV4HoYK8u5nUoBkeNL60Uq8PY1DcwU,11986
-setuptools/_distutils/tests/test_text_file.py,sha256=WQWSB5AfdBDZaMA8BFgipJPnsJb_2SKMfL90fSkRVtw,3460
-setuptools/_distutils/tests/test_util.py,sha256=H9zlZ4z4Vh4TfjNYDBsxP7wguQLpxCfJYyOcm1yZU3c,7988
-setuptools/_distutils/tests/test_version.py,sha256=ahfg_mP8wRy1sgwY-_Px5hrjgf6_upTIpnCgpR4yWRk,2750
-setuptools/_distutils/tests/test_versionpredicate.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_distutils/tests/unix_compat.py,sha256=z-op6C2iVdX1aq5BIBR7cqOxijKE97alNwJqHNdLpoI,386
-setuptools/_distutils/text_file.py,sha256=z4dkOJBr9Bo2LG0TNqm8sD63LEEaKSSP0J0bWBrFG3c,12101
-setuptools/_distutils/unixccompiler.py,sha256=1bXJWH4fiu_A2WfriHzf88xjllQTXnnjUkZdRKs9cWU,212
-setuptools/_distutils/util.py,sha256=iGaXP9t2-SQo7vaDR7bKUoEbrGO5QN69xTEtS5eihvk,17534
-setuptools/_distutils/version.py,sha256=vImT5-ECXkQ21oKL0XYFiTqK6NyM09cpzBNoA_34CQU,12619
-setuptools/_distutils/versionpredicate.py,sha256=qBWQ6wTj12ODytoTmIydefIY2jb4uY1sdbgbuLn-IJM,5205
-setuptools/_distutils/zosccompiler.py,sha256=svdiXZ2kdcwKrJKfhUhib03y8gz7aGZKukXH3I7YkBc,58
-setuptools/_entry_points.py,sha256=10TjbzfGdqWGH06lQuPPGDDci-OnXoIzrfpIWba5AZw,2468
-setuptools/_imp.py,sha256=YY1EjZEN-0zYci1cxO10B_adAEOr7i8eK8JoCc9Ierc,2435
-setuptools/_importlib.py,sha256=aKIjcK0HKXNz2D-XTrxaixGn_juTkONwmu3dcheMOF0,223
-setuptools/_itertools.py,sha256=jWRfsIrpC7myooz3hDURj9GtvpswZeKXg2HakmEhNjo,657
-setuptools/_normalization.py,sha256=1H0YXdCuVkUcNX2zQqDyqa-4eWC8VI5vWjGGsbj7n8I,5798
-setuptools/_path.py,sha256=2Bv1q9_Hrd4oizKwcH3pv_05YVR6meovQE6ZtyD45yI,2976
-setuptools/_reqs.py,sha256=RRX-qYsz_fy6K66XchCHcIszK3bSAtU6aO1s3ZaLV14,1380
-setuptools/_scripts.py,sha256=5TrIWDVOuO3cRcfzcZAUBKPRH7K4svQRdQLZKKiD1bQ,11247
-setuptools/_shutil.py,sha256=IQQ1gcPX4X_wPilYGJGxChyMCqG43VOejoQZTIrCTY8,1578
-setuptools/_static.py,sha256=GTR79gESF1_JaK4trLkpDrEuCeEtPlwQW0MRv7VNQX4,4855
-setuptools/_vendor/.lock,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/autocommand-2.2.2.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/autocommand-2.2.2.dist-info/LICENSE,sha256=reeNBJgtaZctREqOFKlPh6IzTdOFXMgDSOqOJAqg3y0,7634
-setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA,sha256=OADZuR3O6iBlpu1ieTgzYul6w4uOVrk0P0BO5TGGAJk,15006
-setuptools/_vendor/autocommand-2.2.2.dist-info/RECORD,sha256=K-5gcsvOxjkMVxB8jfywQikYqY7NtaLMNiGH8T1C6W8,1072
-setuptools/_vendor/autocommand-2.2.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/autocommand-2.2.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
-setuptools/_vendor/autocommand-2.2.2.dist-info/top_level.txt,sha256=AzfhgKKS8EdAwWUTSF8mgeVQbXOY9kokHB6kSqwwqu0,12
-setuptools/_vendor/autocommand/__init__.py,sha256=zko5Rnvolvb-UXjCx_2ArPTGBWwUK5QY4LIQIKYR7As,1037
-setuptools/_vendor/autocommand/autoasync.py,sha256=AMdyrxNS4pqWJfP_xuoOcImOHWD-qT7x06wmKN1Vp-U,5680
-setuptools/_vendor/autocommand/autocommand.py,sha256=hmkEmQ72HtL55gnURVjDOnsfYlGd5lLXbvT4KG496Qw,2505
-setuptools/_vendor/autocommand/automain.py,sha256=A2b8i754Mxc_DjU9WFr6vqYDWlhz0cn8miu8d8EsxV8,2076
-setuptools/_vendor/autocommand/autoparse.py,sha256=WVWmZJPcbzUKXP40raQw_0HD8qPJ2V9VG1eFFmmnFxw,11642
-setuptools/_vendor/autocommand/errors.py,sha256=7aa3roh9Herd6nIKpQHNWEslWE8oq7GiHYVUuRqORnA,886
-setuptools/_vendor/backports.tarfile-1.2.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/backports.tarfile-1.2.0.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
-setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA,sha256=ghXFTq132dxaEIolxr3HK1mZqm9iyUmaRANZQSr6WlE,2020
-setuptools/_vendor/backports.tarfile-1.2.0.dist-info/RECORD,sha256=D2nbcZtUIg1qSt_4v7BKyYr_6j3ItUBUoaeHoXVn9NE,1056
-setuptools/_vendor/backports.tarfile-1.2.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/backports.tarfile-1.2.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
-setuptools/_vendor/backports.tarfile-1.2.0.dist-info/top_level.txt,sha256=cGjaLMOoBR1FK0ApojtzWVmViTtJ7JGIK_HwXiEsvtU,10
-setuptools/_vendor/backports/__init__.py,sha256=iOEMwnlORWezdO8-2vxBIPSR37D7JGjluZ8f55vzxls,81
-setuptools/_vendor/backports/tarfile/__init__.py,sha256=Pwf2qUIfB0SolJPCKcx3vz3UEu_aids4g4sAfxy94qg,108491
-setuptools/_vendor/backports/tarfile/__main__.py,sha256=Yw2oGT1afrz2eBskzdPYL8ReB_3liApmhFkN2EbDmc4,59
-setuptools/_vendor/backports/tarfile/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/backports/tarfile/compat/py38.py,sha256=iYkyt_gvWjLzGUTJD9TuTfMMjOk-ersXZmRlvQYN2qE,568
-setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA,sha256=o-OLnuQyYonUhkcE8w4pnudp4jCc6fSnXw3hpQrQo1Y,4670
-setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD,sha256=Uqa47g3hXPf9mWJfQ7l80uOUKshvFgVOqQ3kjmbyk1U,1868
-setuptools/_vendor/importlib_metadata-8.7.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/importlib_metadata-8.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
-setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE,sha256=RYUC4S2Xu_ZEOGBqIARKqF6wX7CoqAe7NdvsJT_R_AQ,10278
-setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt,sha256=CO3fD9yylANiXkrMo4qHLV_mqXL2sC5JFKgt1yWAT-A,19
-setuptools/_vendor/importlib_metadata/__init__.py,sha256=u7Ew4-UkpzNY-ka6k-WRkDhQZS1akkLMfWs2eEnUmGo,37734
-setuptools/_vendor/importlib_metadata/_adapters.py,sha256=r5i8XLrKT6xmrpoREZhZrfczOYDmrVZeJBW5u0HzIGU,3797
-setuptools/_vendor/importlib_metadata/_collections.py,sha256=CxAhzlF3g1rwu_fMiB53JtRQiUFh0RgiMpoOvmK_ocg,760
-setuptools/_vendor/importlib_metadata/_compat.py,sha256=VC5ZDLlT-BcshauCShdFJvMNLntJJfZzNK1meGa-enw,1313
-setuptools/_vendor/importlib_metadata/_functools.py,sha256=0pA2OoiVK6wnsGq8HvVIzgdkvLiZ0nfnfw7IsndjoHk,3510
-setuptools/_vendor/importlib_metadata/_itertools.py,sha256=nMvp9SfHAQ_JYwK4L2i64lr3GRXGlYlikGTVzWbys_E,5351
-setuptools/_vendor/importlib_metadata/_meta.py,sha256=EtHyiJ5kGzWFDfKyQ2XQp6Vu113CeadKW1Vf6aGc1B4,1765
-setuptools/_vendor/importlib_metadata/_text.py,sha256=HCsFksZpJLeTP3NEk_ngrAeXVRRtTrtyh9eOABoRP4A,2166
-setuptools/_vendor/importlib_metadata/_typing.py,sha256=EQKhhsEgz_Sa-FnePI-faC72rNOOQwopjA1i5pG8FDU,367
-setuptools/_vendor/importlib_metadata/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/importlib_metadata/compat/py311.py,sha256=uqm-K-uohyj1042TH4a9Er_I5o7667DvulcD-gC_fSA,608
-setuptools/_vendor/importlib_metadata/compat/py39.py,sha256=J3W7PUVRPNYMmcvT12RF8ndBU9e8_T0Ac4U87Bsrq70,1187
-setuptools/_vendor/importlib_metadata/diagnose.py,sha256=nkSRMiowlmkhLYhKhvCg9glmt_11Cox-EmLzEbqYTa8,379
-setuptools/_vendor/importlib_metadata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/jaraco.text-4.0.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/jaraco.text-4.0.0.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
-setuptools/_vendor/jaraco.text-4.0.0.dist-info/METADATA,sha256=XC_QkBLJVPE5sQYkl41TNaZUw0AUzQb29GbKaD28nFY,3731
-setuptools/_vendor/jaraco.text-4.0.0.dist-info/RECORD,sha256=Y7k2wwjQ_L4TkOgkVnzAB1NsMqhJrbAieOlfHUxzbDE,1157
-setuptools/_vendor/jaraco.text-4.0.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/jaraco.text-4.0.0.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
-setuptools/_vendor/jaraco.text-4.0.0.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7
-setuptools/_vendor/jaraco/context/__init__.py,sha256=br1ydYGo1Xr_Pu1anuEdd-QrjUiz_EY5L_5E4C03L4w,9809
-setuptools/_vendor/jaraco/context/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/jaraco/functools/__init__.py,sha256=ZJx9cMs2Nvk2xGUl8OjVGkpjdOaNlSzJrN4dGglgX2g,18599
-setuptools/_vendor/jaraco/functools/__init__.pyi,sha256=K4DcbnYIHE5QlMxqf9-cVp-WhycrhuTao4J7O7TMq4Y,3907
-setuptools/_vendor/jaraco/functools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/jaraco/text/Lorem ipsum.txt,sha256=N_7c_79zxOufBY9HZ3yzMgOkNv-TkOTTio4BydrSjgs,1335
-setuptools/_vendor/jaraco/text/__init__.py,sha256=lazNYXo8IhOR1bFigLAyGiiQao6jtO3KGWh8bZZPx3c,16762
-setuptools/_vendor/jaraco/text/layouts.py,sha256=HTC8aSTLZ7uXipyOXapRMC158juecjK6RVwitfmZ9_w,643
-setuptools/_vendor/jaraco/text/show-newlines.py,sha256=jT0vp4gLhG20hX2lTB-zKo_i3NgKzj79yRAdz4eMzIM,903
-setuptools/_vendor/jaraco/text/strip-prefix.py,sha256=NfVXV8JVNo6nqcuYASfMV7_y4Eo8zMQqlCOGvAnRIVw,412
-setuptools/_vendor/jaraco/text/to-dvorak.py,sha256=36nPPsiifwv6RfpAb--3zpgbIx8ohnnI1aR29IJTO9s,118
-setuptools/_vendor/jaraco/text/to-qwerty.py,sha256=IQoFY9v7vLTEybcput4KBYm_5GR35pmtgZ_xyrmdTgI,118
-setuptools/_vendor/jaraco_context-6.1.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/jaraco_context-6.1.0.dist-info/METADATA,sha256=BDXr_FIFXFqZdO0gwXG2RUOD6vnbsVCIFLp62XxZ1xI,4270
-setuptools/_vendor/jaraco_context-6.1.0.dist-info/RECORD,sha256=RZnYds60K37vA6o54jXE6-q2rqJAnb5jRJaFI5PR-Dc,777
-setuptools/_vendor/jaraco_context-6.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/jaraco_context-6.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
-setuptools/_vendor/jaraco_context-6.1.0.dist-info/licenses/LICENSE,sha256=l1WhhRlmbl8PTK49qtPXASvK5IpgCzEjfXXp_hNOZoM,1076
-setuptools/_vendor/jaraco_context-6.1.0.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7
-setuptools/_vendor/jaraco_functools-4.4.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/jaraco_functools-4.4.0.dist-info/METADATA,sha256=LnnajcNGmSSr46yLIqP-tWkqeb-fR7vIa2U11hhkGEk,2960
-setuptools/_vendor/jaraco_functools-4.4.0.dist-info/RECORD,sha256=uq_S1tlMG95FPkyAWsBVEdxTmG4KY7AvZ07w94i-wUY,882
-setuptools/_vendor/jaraco_functools-4.4.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/jaraco_functools-4.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
-setuptools/_vendor/jaraco_functools-4.4.0.dist-info/licenses/LICENSE,sha256=WlfLTbheKi3YjCkGKJCK3VfjRRRJ4KmnH9-zh3b9dZ0,1076
-setuptools/_vendor/jaraco_functools-4.4.0.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7
-setuptools/_vendor/more_itertools-10.8.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/more_itertools-10.8.0.dist-info/METADATA,sha256=arNRUUWr5YsGfwh8hnYxz0z11lP-2BuWQu4SCGw5BLg,39413
-setuptools/_vendor/more_itertools-10.8.0.dist-info/RECORD,sha256=ntGxNMCqg3IvNumfORiqlhDOOgpRTXk7u3SjaNRBoB0,1095
-setuptools/_vendor/more_itertools-10.8.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/more_itertools-10.8.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
-setuptools/_vendor/more_itertools-10.8.0.dist-info/licenses/LICENSE,sha256=CfHIyelBrz5YTVlkHqm4fYPAyw_QB-te85Gn4mQ8GkY,1053
-setuptools/_vendor/more_itertools/__init__.py,sha256=5F7E_zpoGcEBW_T_3WE0WYYt8j-gJodIuiBcOJxrOv8,149
-setuptools/_vendor/more_itertools/__init__.pyi,sha256=5B3eTzON1BBuOLob1vCflyEb2lSd6usXQQ-Cv-hXkeA,43
-setuptools/_vendor/more_itertools/more.py,sha256=mNPKKu5UI7lRL460vgm0QTCWFiGMVCMosSPxVSdibos,163690
-setuptools/_vendor/more_itertools/more.pyi,sha256=fpEgNX3O66wY5cnT-s5VYDKNUpAcaCyU3iP84It3OOM,27119
-setuptools/_vendor/more_itertools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/more_itertools/recipes.py,sha256=Ma-kuBNZDFhaQDbIJgRmnrG86WzaupbOyUV3v8je3xw,41811
-setuptools/_vendor/more_itertools/recipes.pyi,sha256=LNRwN-OL3nkMfQAqx-PPc1fBaetUObb_Z6mdePyzh1c,6226
-setuptools/_vendor/packaging-26.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/packaging-26.0.dist-info/METADATA,sha256=M2K7fWom2iliuo2qpHhc0LrKwhq6kIoRlcyPWVgKJlo,3309
-setuptools/_vendor/packaging-26.0.dist-info/RECORD,sha256=9QUDMzqulReAfS-02B_CfLYKpkRmb1AXaBJibWIkzl0,2113
-setuptools/_vendor/packaging-26.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/packaging-26.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
-setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
-setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
-setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
-setuptools/_vendor/packaging/__init__.py,sha256=y4lVbpeBzCGk-IPDw5BGBZ_b0P3ukEEJZAbGYc6Ey8c,494
-setuptools/_vendor/packaging/_elffile.py,sha256=-sKkptYqzYw2-x3QByJa5mB4rfPWu1pxkZHRx1WAFCY,3211
-setuptools/_vendor/packaging/_manylinux.py,sha256=Hf6nB0cOrayEs96-p3oIXAgGnFquv20DO5l-o2_Xnv0,9559
-setuptools/_vendor/packaging/_musllinux.py,sha256=Z6swjH3MA7XS3qXnmMN7QPhqP3fnoYI0eQ18e9-HgAE,2707
-setuptools/_vendor/packaging/_parser.py,sha256=U_DajsEx2VoC_F46fSVV3hDKNCWoQYkPkasO3dld0ig,10518
-setuptools/_vendor/packaging/_structures.py,sha256=Hn49Ta8zV9Wo8GiCL8Nl2ARZY983Un3pruZGVNldPwE,1514
-setuptools/_vendor/packaging/_tokenizer.py,sha256=M8EwNIdXeL9NMFuFrQtiOKwjka_xFx8KjRQnfE8O_z8,5421
-setuptools/_vendor/packaging/licenses/__init__.py,sha256=TwXLHZCXwSgdFwRLPxW602T6mSieunSFHM6fp8pgW78,5819
-setuptools/_vendor/packaging/licenses/_spdx.py,sha256=WW7DXiyg68up_YND_wpRYlr1SHhiV4FfJLQffghhMxQ,51122
-setuptools/_vendor/packaging/markers.py,sha256=ZX-cLvW1S3cZcEc0fHI4z7zSx5U2T19yMpDP_mE-CYw,12771
-setuptools/_vendor/packaging/metadata.py,sha256=CWVZpN_HfoYMSSDuCP7igOvGgqA9AOmpW8f3qTisfnc,39360
-setuptools/_vendor/packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/packaging/pylock.py,sha256=-R1uNfJ4PaLto7Mg62YsGOHgvskuiIEqPwxOywl42Jk,22537
-setuptools/_vendor/packaging/requirements.py,sha256=PMCAWD8aNMnVD-6uZMedhBuAVX2573eZ4yPBLXmz04I,2870
-setuptools/_vendor/packaging/specifiers.py,sha256=EPNPimY_zFivthv1vdjZYz5IqkKGsnKR2yKh-EVyvZw,40797
-setuptools/_vendor/packaging/tags.py,sha256=cXLV1pJD3UtJlDg7Wz3zrfdQhRZqr8jumSAKKAAd2xE,22856
-setuptools/_vendor/packaging/utils.py,sha256=N4c6oZzFJy6klTZ3AnkNz7sSkJesuFWPp68LA3B5dAo,5040
-setuptools/_vendor/packaging/version.py,sha256=7XWlL2IDYLwDYC0ht6cFEhapLwLWbmyo4rb7sEFj0x8,23272
-setuptools/_vendor/platformdirs-4.4.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/platformdirs-4.4.0.dist-info/METADATA,sha256=u8UhbV9Md7-8VyJyZNUuZrzN5xzPeedeGmBG0CnTAiM,12831
-setuptools/_vendor/platformdirs-4.4.0.dist-info/RECORD,sha256=PQ0vHMAYWTxNi6ojlbrwscHGRbvYwYzQZPSctOTJXqA,1218
-setuptools/_vendor/platformdirs-4.4.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/platformdirs-4.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
-setuptools/_vendor/platformdirs-4.4.0.dist-info/licenses/LICENSE,sha256=KeD9YukphQ6G6yjD_czwzv30-pSHkBHP-z0NS-1tTbY,1089
-setuptools/_vendor/platformdirs/__init__.py,sha256=iORRy6_lZ9tXLvO0W6fJPn8QV7F532ivl-f2WGmabBc,22284
-setuptools/_vendor/platformdirs/__main__.py,sha256=HnsUQHpiBaiTxwcmwVw-nFaPdVNZtQIdi1eWDtI-MzI,1493
-setuptools/_vendor/platformdirs/android.py,sha256=r0DshVBf-RO1jXJGX8C4Til7F1XWt-bkdWMgmvEiaYg,9013
-setuptools/_vendor/platformdirs/api.py,sha256=wPHOlwOsfz2oqQZ6A2FcCu5kEAj-JondzoNOHYFQ0h8,9281
-setuptools/_vendor/platformdirs/macos.py,sha256=0XoOgin1NK7Qki7iskD-oS8xKxw6bXgoKEgdqpCRAFQ,6322
-setuptools/_vendor/platformdirs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/platformdirs/unix.py,sha256=WZmkUA--L3JNRGmz32s35YfoD3ica6xKIPdCV_HhLcs,10458
-setuptools/_vendor/platformdirs/version.py,sha256=i31fi3nNO19D2FdSx8aldD7IFLSqm2YrAo6SmkV0FLM,704
-setuptools/_vendor/platformdirs/windows.py,sha256=IFpiohUBwxPtCzlyKwNtxyW4Jk8haa6W8o59mfrDXVo,10125
-setuptools/_vendor/tomli-2.4.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/tomli-2.4.0.dist-info/METADATA,sha256=9awKH4-6kItGRs1lUwnpGq2Wm2eHYWrFccpGKjgy_84,10567
-setuptools/_vendor/tomli-2.4.0.dist-info/RECORD,sha256=IlQwzpVkDo1Pzbk82uL8ONaFrsAW0OKT1fuZppWIb-0,822
-setuptools/_vendor/tomli-2.4.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/tomli-2.4.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
-setuptools/_vendor/tomli-2.4.0.dist-info/licenses/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
-setuptools/_vendor/tomli/__init__.py,sha256=ahtDjGJA2M_wWVvGpzx4YJtWxrWBx6qE-GH5-UYoECA,314
-setuptools/_vendor/tomli/_parser.py,sha256=txeATLE3zHyZ-ushXtYfrZ3LoIs7JzQF2W2KL1gwJPg,25958
-setuptools/_vendor/tomli/_re.py,sha256=oSNZ_ilFI6chEuQ01YRSoUydBQr_okF_mSdHTkFmv90,3396
-setuptools/_vendor/tomli/_types.py,sha256=-GTG2VUqkpxwMqzmVO4F7ybKddIbAnuAHXfmWQcTi3Q,254
-setuptools/_vendor/tomli/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
-setuptools/_vendor/wheel-0.46.3.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/wheel-0.46.3.dist-info/METADATA,sha256=IpEKqXyonLzCCgGeJ_4xNgt5KaS9ZsoNMQ-ZpE9szTU,2410
-setuptools/_vendor/wheel-0.46.3.dist-info/RECORD,sha256=sCl8OtoXuHJ-Fd3W0eOMipCpl_d5_Pl4mW9v7GLstwI,1734
-setuptools/_vendor/wheel-0.46.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/wheel-0.46.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
-setuptools/_vendor/wheel-0.46.3.dist-info/entry_points.txt,sha256=JJdtSAGTvMLbIkTVZUAMvGKO39FtWfCVF8mp_NH6e4g,110
-setuptools/_vendor/wheel-0.46.3.dist-info/licenses/LICENSE.txt,sha256=MMI2GGeRCPPo6h0qZYx8pBe9_IkcmO8aifpP8MmChlQ,1107
-setuptools/_vendor/wheel/__init__.py,sha256=UweKvhe4SyP7zFyDoYo8BOuwTA6q3-_WpMmY2NNO54c,59
-setuptools/_vendor/wheel/__main__.py,sha256=_83wl9tyGU2cHiqfudpubGHdRL5uonPXnzeznznkxzs,512
-setuptools/_vendor/wheel/_bdist_wheel.py,sha256=bpmNa7_s-CYFkVgXf9ENAYTiJ01XBhRW4pxH1T8XYsI,21729
-setuptools/_vendor/wheel/_commands/__init__.py,sha256=fCRAQZNDyj2JLrufdgPsBlaRS_t_j_aBUMpXj09KZ4E,4432
-setuptools/_vendor/wheel/_commands/convert.py,sha256=0wSJMU0m-6LY16Om8Wmmloy-hJWFZeOmI8hT-2Z7Qms,12743
-setuptools/_vendor/wheel/_commands/pack.py,sha256=o3iwjfRHl7N9ul-M2kHbewLJZnqBLAWf0tzUCwoiTMw,3078
-setuptools/_vendor/wheel/_commands/tags.py,sha256=Rv2ySVb8-qX3osKp3uJgxcIMXkjt43XUD0-zvC6KvnY,4775
-setuptools/_vendor/wheel/_commands/unpack.py,sha256=AjDSS23XYyCSFfifnMutinrpPv-DK_2wbNHkKAUFwgM,1016
-setuptools/_vendor/wheel/_metadata.py,sha256=BP5jC9uC1hyicp7nL4FJ2LYixNFpEJIV_uMDY1KBZBg,6188
-setuptools/_vendor/wheel/_setuptools_logging.py,sha256=-5KC-lne0ilOUWIDfOkqapUWGMFZhuKYDIavIZiB5kM,781
-setuptools/_vendor/wheel/bdist_wheel.py,sha256=HrzYiSzMkh5ohAAhlQnYBS1p8qbr85X6F59xqxd9kBg,1102
-setuptools/_vendor/wheel/macosx_libfile.py,sha256=pL0wm88jRMl_4ASgGlNg_mz69Zmv5xm8JSkjLdwyvIQ,16712
-setuptools/_vendor/wheel/metadata.py,sha256=GknOO7JJiZMlcEe_fiD7nqnDTTLd0sX_-IgipM4L3-4,757
-setuptools/_vendor/wheel/wheelfile.py,sha256=m_g_7TNsEp-j-xnvSr5yDLEFb1nhyObueq9Q5_1_lBA,8720
-setuptools/_vendor/zipp-3.23.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-setuptools/_vendor/zipp-3.23.0.dist-info/METADATA,sha256=vdZ9TRbPC_O4k-fRjNPS13StuC837Zhbx3cMYHIms1s,3563
-setuptools/_vendor/zipp-3.23.0.dist-info/RECORD,sha256=O_q2YKJHBPhCKOS7HOHw4_qf-A5cgGNSpiay9GDq2DY,1078
-setuptools/_vendor/zipp-3.23.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/zipp-3.23.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
-setuptools/_vendor/zipp-3.23.0.dist-info/licenses/LICENSE,sha256=WlfLTbheKi3YjCkGKJCK3VfjRRRJ4KmnH9-zh3b9dZ0,1076
-setuptools/_vendor/zipp-3.23.0.dist-info/top_level.txt,sha256=iAbdoSHfaGqBfVb2XuR9JqSQHCoOsOtG6y9C_LSpqFw,5
-setuptools/_vendor/zipp/__init__.py,sha256=ieXh9GIMdABjKRX_JUJtP9k5wdBLK4Mt5X4nszSkmYE,11976
-setuptools/_vendor/zipp/_functools.py,sha256=f6Kt9LxZ4TE-cY1lJVdXSId3memSXmH9IdgMbU-_x2k,575
-setuptools/_vendor/zipp/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/_vendor/zipp/compat/overlay.py,sha256=oEIGAnbr8yGjuKTrVSO2ByewPui71uppbX18BLnYTKE,783
-setuptools/_vendor/zipp/compat/py310.py,sha256=S7i6N9mToEn3asNb2ILyjnzvITOXrATD_J4emjyBbDU,256
-setuptools/_vendor/zipp/compat/py313.py,sha256=RndvDNtuY7H2D9ecnnzcPBMZ8mZc42gmXD_IwQAXXAE,654
-setuptools/_vendor/zipp/glob.py,sha256=DLV9LBsDxA6YVW82e3-tkoNrus1h4R-j3BR6VqS0AzE,3382
-setuptools/archive_util.py,sha256=Tl_64hSTtc4y8x7xa98rFVUbG24oArpjzLAYGYP2_sI,7356
-setuptools/build_meta.py,sha256=x3a7i1m4K6gGYC03yj20LRnEtvZpZjetXCJbpgNo6Cg,20234
-setuptools/cli-32.exe,sha256=MqzBvFQxFsviz_EMuGd3LfLyVP8mNMhwrvC0bEtpb9s,11776
-setuptools/cli-64.exe,sha256=u7PeVwdinmpgoMI4zUd7KPB_AGaYL9qVP6b87DkHOko,14336
-setuptools/cli-arm64.exe,sha256=uafQjaiA36yLz1SOuksG-1m28JsX0zFIoPZhgyiSbGE,13824
-setuptools/cli.exe,sha256=MqzBvFQxFsviz_EMuGd3LfLyVP8mNMhwrvC0bEtpb9s,11776
-setuptools/command/__init__.py,sha256=wdSrlNR0P6nCz9_oFtCAiAkeFJMsZa1jPcpXT53f0SM,803
-setuptools/command/_requirestxt.py,sha256=ItYMTJGh_i5TlQstX_nFopqEhkC4PJFadBL2Zd3V670,4228
-setuptools/command/alias.py,sha256=vVxEYVEFMTZznxuXLg-62Y07VV2U-rfhVqmqhTc62Cg,2366
-setuptools/command/bdist_egg.py,sha256=1kWCzqsiDUGw-HiHu6aGcH16Cf7TjV8oe86ILNLLHTM,16832
-setuptools/command/bdist_rpm.py,sha256=LyqI49w48SKk0FmuHsE9MLzX1SuXjL7YMNbZMFZqFII,1435
-setuptools/command/bdist_wheel.py,sha256=2TMl21f7WWeH3m0NhJLVZPVOSWE0w-wZcG2pFseP8Qw,22210
-setuptools/command/build.py,sha256=eI7STMERGGZEpzk1tvJN8p9IOjAAXMcGLzljv2mwI3M,6052
-setuptools/command/build_clib.py,sha256=AbgpPIF_3qL8fZr3JIebI-WHTMTBiMfrFkVQz8K40G4,4528
-setuptools/command/build_ext.py,sha256=SaurTvvtJuOSOD8cm_6Wj1T0DFiyl5Nazv4GYINAgWA,18270
-setuptools/command/build_py.py,sha256=eHhfo9z7Qf79vSzrCnq-oEXayQC0R_nx3hWaTgWGv5M,15826
-setuptools/command/develop.py,sha256=TYKWIzfv3c3wjAYhH5UD8tW6S6ozZi_fpF6IJILm8Kg,1751
-setuptools/command/dist_info.py,sha256=HU752iLLmmYMHbsDBgz2ubRjkgJobugOp8H71LzzDys,3450
-setuptools/command/easy_install.py,sha256=XrN5cV51mfzbCDoapZ6iT8nCzaLpumdwJYRKeMHEjCQ,780
-setuptools/command/editable_wheel.py,sha256=xJOPl_0s5DbwpeLw-SNh75mvEnmwE7OFpnpChlOaNgg,34862
-setuptools/command/egg_info.py,sha256=_yZYJz5CrLh0aYeT2GXBp6bjF0a0QgYvoDR3uBdKJZc,25754
-setuptools/command/install.py,sha256=4x2hiNgBGQrFEXKuPBQMrb8ecSwIfYF4TYHZQLjPVAg,5066
-setuptools/command/install_egg_info.py,sha256=gYOkfDM-G0agy2aMCE8HzreIi4LzUy6acZ6Ka-rKahQ,2020
-setuptools/command/install_lib.py,sha256=9n1_U83eHcERL_a_rv_LhHCkhXlLdqyZ4SdBow-9qcE,4319
-setuptools/command/install_scripts.py,sha256=ZYfF_-viovV5HSLsRzBlNQv5pHv2H0t2ZnL5qzZ4xfM,2445
-setuptools/command/rotate.py,sha256=PywuJoufmiO_5JykOg-oatrYsBnZfA0pG1HJy7Bsb9Q,2134
-setuptools/command/saveopts.py,sha256=k9hiQ_wOKweXWgBWV548PISmFKfYJkV2XHhi92ejz5o,678
-setuptools/command/sdist.py,sha256=nS2xogcTfQZwbZH1AQ5WYh13KCvNda9xwUT57sVxTec,7426
-setuptools/command/setopt.py,sha256=MCM9SM92LwGUC-E2nnvQxX8Yf2ukMj1YAa6KCRlqt_8,5047
-setuptools/command/test.py,sha256=x9z3DDCQi-_3-TRf8yNeQ9QH-G6yR1au7kX0ijedKqU,1400
-setuptools/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/compat/py310.py,sha256=JwjQZ3cNTizfpDLNl9GLsUGzBr-tVlMPxmMYVDTlhiI,344
-setuptools/compat/py311.py,sha256=e6tJAFwZEP82hmMBl10HYeSypelo_Ti2wTjKZVKLwOE,790
-setuptools/compat/py312.py,sha256=vYKVtdrdOTsO_R90dJkEXsFwfMJFuIFJflhIgHrjJ-Y,366
-setuptools/compat/py39.py,sha256=BJMtnkfcqyTfccqjYQxfoRtU2nTnWaEESBVkshTiXqY,493
-setuptools/config/NOTICE,sha256=Ld3wiBgpejuJ1D2V_2WdjahXQRCMkTbfo6TYVsBiO9g,493
-setuptools/config/__init__.py,sha256=aiPnL9BJn1O6MfmuNXyn8W2Lp8u9qizRVqwPiOdPIjY,1499
-setuptools/config/_apply_pyprojecttoml.py,sha256=jIpYyQNibH64jOllJhVUtVSpKHySylKJ6IMW7GX3_GI,19442
-setuptools/config/_validate_pyproject/NOTICE,sha256=Ccm86pXKCG-Lxb7RdOQLyDWyl9QPtfhru7Vw_gpVgac,18737
-setuptools/config/_validate_pyproject/__init__.py,sha256=dnp6T7ePP1R5z4OuC7Fd2dkFlIrtIfizUfvpGJP6nz0,1042
-setuptools/config/_validate_pyproject/error_reporting.py,sha256=5jGbcg7zQCEiEA8fAilSkaXnEfXyD7fq5CG-OkmFZmk,11803
-setuptools/config/_validate_pyproject/extra_validations.py,sha256=lQnu5wASBL8iDToODpw5sX21kev01_PjUIGldu1proY,5066
-setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py,sha256=w749JgqKi8clBFcObdcbZVqsmF4oJ_QByhZ1SGbUFNw,1612
-setuptools/config/_validate_pyproject/fastjsonschema_validations.py,sha256=XjMh9s9ezEzqM9yoZ4KoUQ7jCoHAqsRl-KSf30Rlgxo,365819
-setuptools/config/_validate_pyproject/formats.py,sha256=LNRajleuZtyP8BWhMcbuA92APppdiItpEpEeqCjA54Q,15373
-setuptools/config/distutils.schema.json,sha256=Tcp32kRnhwORGw_9p6GEi08lj2h15tQRzOYBbzGmcBU,972
-setuptools/config/expand.py,sha256=STKJ6oNAo6avEBVUiR25WpfIthVPVZQG65Z-5-t78QI,16064
-setuptools/config/pyprojecttoml.py,sha256=UDrCvQGO2c8WvrbwTYUZOdTRhDPFbVNZo5i72sbJ3D0,18786
-setuptools/config/setupcfg.py,sha256=Wnfbrk6D0GQV-Z2AE0b0KnL-WGrw-KQUcsem3naImBw,26695
-setuptools/config/setuptools.schema.json,sha256=Bp6tTwRvSy96_dCd5OqKTifuIcTWOd5wDGRCrwYBzjQ,16047
-setuptools/depends.py,sha256=jKYfjmt_2ZQYVghb8L9bU7LJ6erHJ5ze-K_fKV1BMXk,5965
-setuptools/discovery.py,sha256=XYIeFN20WEsEtssmpzCFlnda-Qxilj8KlLYKaJphAto,21286
-setuptools/dist.py,sha256=aa181F7kGdfeL6To3X2ZvQ8zSiQCSacWRJdhL0v49xk,45184
-setuptools/errors.py,sha256=gY2x2PIaIgy01yRANRC-zcCwxDCqCScgJoCOZFe0yio,3024
-setuptools/extension.py,sha256=GbCxJ9rRk2rZcXS4qgmnzWNG36HlhLfUEvNwB-OKGk8,6818
-setuptools/glob.py,sha256=AC_B33DY8g-CHELxDsJrtwFrpiucSAZsakPFdSOQzhc,6062
-setuptools/gui-32.exe,sha256=hdrh6V13hF8stZvKw9Sv50u-TJGpvMW_SnHNQxBNvnw,11776
-setuptools/gui-64.exe,sha256=NHG2FA6txkEid9u-_j_vjDRaDxpZd2CGuAo2GMOoPjs,14336
-setuptools/gui-arm64.exe,sha256=5pT0dDQFyLWSb_RX22_n8aEt7HwWqcOGR4TT9OB64Jc,13824
-setuptools/gui.exe,sha256=hdrh6V13hF8stZvKw9Sv50u-TJGpvMW_SnHNQxBNvnw,11776
-setuptools/installer.py,sha256=Wy_hG1g1r-45E6IWh7lvQ0Pk0QHNl6JJbu3hQmr1_Ek,5184
-setuptools/launch.py,sha256=IBb5lEv69CyuZ9ewIrmKlXh154kdLmP29LKfTMkximE,820
-setuptools/launcher manifest.xml,sha256=xlLbjWrB01tKC0-hlVkOKkiSPbzMml2eOPtJ_ucCnbE,628
-setuptools/logging.py,sha256=W16iHJ1HcCXYQ0RxyrEfJ83FT4175tCtoYg-E6uSpVI,1261
-setuptools/modified.py,sha256=ZwbfBfCFP88ltvbv_dJDz-t1LsQjnM-JUpgZnnQZjjM,568
-setuptools/monkey.py,sha256=nOD5vgLG7IpKAs7LrnpJxGPaCW54Rzj-onJmm91otoY,3733
-setuptools/msvc.py,sha256=IdCsRhdJLeyZG3gyDrGx2DqZymoay3ndBXC77taHHCA,42909
-setuptools/namespaces.py,sha256=eE1hI5X86TNWvY5u5BC1WiGiOrrJyGOv0pp9vycCmK0,3045
-setuptools/script (dev).tmpl,sha256=RUzQzCQUaXtwdLtYHWYbIQmOaES5Brqq1FvUA_tu-5I,218
-setuptools/script.tmpl,sha256=WGTt5piezO27c-Dbx6l5Q4T3Ff20A5z7872hv3aAhYY,138
-setuptools/tests/__init__.py,sha256=AnBfls2iJbTDQzmMKeLRt-9lxhaOHUVOZEgXv89Uwvs,335
-setuptools/tests/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/tests/compat/py39.py,sha256=eUy7_F-6KRTOIKl-veshUu6I0EdTSdBZMh0EV0lZ1-g,135
-setuptools/tests/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/tests/config/downloads/__init__.py,sha256=9ixnDEdyL_arKbUzfuiJftAj9bGxKz8M9alOFZMjx9Y,1827
-setuptools/tests/config/downloads/preload.py,sha256=sIGGZpY3cmMpMwiJYYYYHG2ifZJkvJgEotRFtiulV1I,450
-setuptools/tests/config/setupcfg_examples.txt,sha256=cAbVvCbkFZuTUL6xRRzRgqyB0rLvJTfvw3D30glo2OE,1912
-setuptools/tests/config/test_apply_pyprojecttoml.py,sha256=qBOXnCwZVQ7wTYfwq83zAAtsGGooJgFh_H9L2avrv4Y,29609
-setuptools/tests/config/test_expand.py,sha256=S0oT6JvgA_oujR4YS4RUuf5gmOt1CTQV66RQDzV8xd4,8933
-setuptools/tests/config/test_pyprojecttoml.py,sha256=tP7iaVmpnv3wAY2eplDLFXzfHGuvxT71SQX9O9Jrwl0,13182
-setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py,sha256=1MRtzcxZag-ElRwVGt0kUk4KPRA-RSwKkibO8-Vy51w,3265
-setuptools/tests/config/test_setupcfg.py,sha256=iwViCQFLGVWZLgCDrBv8HKBBCj-Onr8aNdioD9_lBEo,33712
-setuptools/tests/contexts.py,sha256=Ozdfc2KydF9x9wODUsdun800myLuP27uxoeT06Gbk7M,3166
-setuptools/tests/environment.py,sha256=95_UtTaRiuvwYC9eXKEHbn02kDtZysvZq3UZJmPUj1I,3102
-setuptools/tests/fixtures.py,sha256=jE7pIFQt91dZIUc6Btsffi8OdBqmY_7DNeWI1Stv7i8,12224
-setuptools/tests/indexes/test_links_priority/external.html,sha256=eL9euOuE93JKZdqlXxBOlHbKwIuNuIdq7GBRpsaPMcU,92
-setuptools/tests/indexes/test_links_priority/simple/foobar/index.html,sha256=DD-TKr7UU4zAjHHz4VexYDNSAzR27levSh1c-k3ZdLE,174
-setuptools/tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-setuptools/tests/integration/helpers.py,sha256=ieQtGuIohqNI_RHMH0yxE602Uz4E8wysUj7XaXYH30Y,2688
-setuptools/tests/integration/test_pbr.py,sha256=2eKuklFNmpnBgA_eEhYPBr6rLLG2Xm4MY6PlcmzZgGU,432
-setuptools/tests/integration/test_pip_install_sdist.py,sha256=SFbvuYF_hDzt6OtsQ5GjFNnxmoJ_eElfvpYsiyyGJ-g,8256
-setuptools/tests/mod_with_constant.py,sha256=X_Kj80M55w1tmQ4f7uZY91ZTALo4hKVT6EHxgYocUMQ,22
-setuptools/tests/namespaces.py,sha256=HPcI3nR5MCFWXpaADIJ1fwKxymcQgBkuw87Ic5PUSAQ,2774
-setuptools/tests/script-with-bom.py,sha256=hRRgIizEULGiG_ZTNoMY46HhKhxpWfy5FGcD6Qbh5fc,18
-setuptools/tests/test_archive_util.py,sha256=buuKdY8XkW26Pe3IKAoBRGHG0MDumnuNoPg2WsAQzIg,845
-setuptools/tests/test_bdist_deprecations.py,sha256=75Xq3gYn79LIIyusEltbHan0bEgAt2e_CaL7KLS8-KQ,775
-setuptools/tests/test_bdist_egg.py,sha256=6PaYN1F3JDbIh1uK0urv7yJFcx98z5dn9SOJ8Mv91l8,1957
-setuptools/tests/test_bdist_wheel.py,sha256=xGHVaggiYobkOuGwkLK2bNejcSh8z2Fiuq-ge_S-yKo,23091
-setuptools/tests/test_build.py,sha256=wJgMz2hwHADcLFg-nXrwRVhus7hjmAeEGgrpIQwCGnA,798
-setuptools/tests/test_build_clib.py,sha256=bX51XRAf4uO7IuHFpjePnoK8mE74N2gsoeEqF-ofgws,3123
-setuptools/tests/test_build_ext.py,sha256=e4ZSxsYPB5zq1KSqGEuATZ0t0PJQzMhjjkKJ-hIjcgc,10099
-setuptools/tests/test_build_meta.py,sha256=ToI7-2LUnHuIPhKN8EkDkSEfLCvLqLI6VJhqwR5pVuU,33320
-setuptools/tests/test_build_py.py,sha256=SIcHFX3YNErcVkWjf0eDRuKmsO9kTymKjfK-PkOi9M0,14201
-setuptools/tests/test_config_discovery.py,sha256=FqV-lOtkqaI-ayzU2zocSdD5TaRAgCZnixNDilKA6FQ,22580
-setuptools/tests/test_core_metadata.py,sha256=p8mW920afKVdL8sC_Fce8zpmfWDCRylBa3dd39Y-qWo,18038
-setuptools/tests/test_depends.py,sha256=yQBXoQbNQlJit6mbRVoz6Bb553f3sNrq02lZimNz5XY,424
-setuptools/tests/test_develop.py,sha256=k-agNgB8DIGR8zlaYMBILu8KOPrL2plorNCexxzNm-s,3136
-setuptools/tests/test_dist.py,sha256=M4FikA-vL0_lZdA_5wry2Z9CBuSugr0Pj54dBZ3peBM,8951
-setuptools/tests/test_dist_info.py,sha256=EihdrU9UZkPV7d19G-K_OtOByp64GvGnf4or-f8Iq54,5005
-setuptools/tests/test_distutils_adoption.py,sha256=_eynrOfyEqXFEmjUJhzpe8GXPyTUPvNSObs4qAAmBy8,5987
-setuptools/tests/test_editable_install.py,sha256=o4DkoytkiL-_rzES8p1q8XYRa9-ha_m6uhrm-EWzdwI,42498
-setuptools/tests/test_egg_info.py,sha256=R7nT27YhVz9oSuDyimAGerWglkbRWiMSPBs5FzcSnBM,44941
-setuptools/tests/test_extern.py,sha256=rpKU6oCcksumLwf5TeKlDluFQ0TUfbPwTLQbpxcFrCU,296
-setuptools/tests/test_find_packages.py,sha256=CTLAcTzWGWBLCcd2aAsUVkvO3ibrlqexFBdDKOWPoq8,7819
-setuptools/tests/test_find_py_modules.py,sha256=zQjuhIG5TQN2SJPix9ARo4DL_w84Ln8QsHDUjjbrtAQ,2404
-setuptools/tests/test_glob.py,sha256=P3JvpH-kXQ4BZ3zvRF-zKxOgwyWzwIaQIz0WHdxS0kk,887
-setuptools/tests/test_install_scripts.py,sha256=scIrJ6a_ssKqg4vIBNaUjmAKHEYLUUZ9WKnPeKnE6gc,3433
-setuptools/tests/test_logging.py,sha256=czGLLdGxUBZKXbea3A0HnSW9lf-3K_CUwaI0gDkVbOM,2096
-setuptools/tests/test_manifest.py,sha256=eMg65pIA52DizB6mpktSU-b8CjwaNCS5MSgL_V1LrFI,18562
-setuptools/tests/test_namespaces.py,sha256=e84seD5g6KIPVSDpawE9Ihc25Je7shooybV1flUsW20,2508
-setuptools/tests/test_scripts.py,sha256=_ra506yQF7n72ROUDcz2r3CTsGsawO1m-1oqA9EQCfw,379
-setuptools/tests/test_sdist.py,sha256=oKMgvBrkfTsPH5jqsrhFxRMbtUDoOy4vKfwll3kGCg0,32808
-setuptools/tests/test_setopt.py,sha256=3VxxM4ATfP-P4AGnDjoWCnHr5-i9CSEQTFYU1-FTnvI,1365
-setuptools/tests/test_setuptools.py,sha256=WqrZ8qbv9uJh2xzRn-wXam-YGzmG8od2spru3L3sMbg,9323
-setuptools/tests/test_shutil_wrapper.py,sha256=g15E11PtZxG-InB2BWNFyH-svObXx2XcMhgMLJPuFnc,641
-setuptools/tests/test_unicode_utils.py,sha256=xWfEEl8jkQCt9othUTXJfFmdyATAFggJs2tTxjbumbw,316
-setuptools/tests/test_virtualenv.py,sha256=g-njC_9JTAs1YVx_1dGJ_Q6RlInO4qKVu9-XAgNb6TY,3730
-setuptools/tests/test_warnings.py,sha256=zwR2zcnCeCeDqILZlJOPAcuyPHoDvGu1OtOVYiLMk74,3347
-setuptools/tests/test_wheel.py,sha256=iMfVTNixu4puf6xvRYjQDw4Zg_OHVCQjSy7SztvVYqE,18722
-setuptools/tests/test_windows_wrappers.py,sha256=wBjXN3iGldkzRGTgKTrx99xqUqwPJ0V-ldyiB1pWD-g,7868
-setuptools/tests/text.py,sha256=a12197pMVTvB6FAWQ0ujT8fIQiLIWJlFAl1UCaDUDfg,123
-setuptools/tests/textwrap.py,sha256=FNNNq_MiaEJx88PnsbJQIRxmj1qmgcAOCXXRsODPJN4,98
-setuptools/unicode_utils.py,sha256=ukMGh8pEAw6F_Ezb-K5D3c-078RgA_GcF0oW6lg4lSs,3189
-setuptools/version.py,sha256=WJCeUuyq74Aok2TeK9-OexZOu8XrlQy7-y0BEuWNovQ,161
-setuptools/warnings.py,sha256=oY0Se5eOqje_FEyjTgonUc0XGwgsrI5cgm1kkwulz_w,3796
-setuptools/wheel.py,sha256=iI-LSDrgHMlJIzQMALVlJRq3Qesgbj7xa6hWZYJyZl4,9532
-setuptools/windows_support.py,sha256=wW4IYLM1Bv7Z1MaauP2xmPjyy-wkmQnXdyvXscAf9fw,726
diff --git a/voxvera/vendor/setuptools-82.0.1.dist-info/WHEEL b/voxvera/vendor/setuptools-82.0.1.dist-info/WHEEL
deleted file mode 100644
index 14a883f..0000000
--- a/voxvera/vendor/setuptools-82.0.1.dist-info/WHEEL
+++ /dev/null
@@ -1,5 +0,0 @@
-Wheel-Version: 1.0
-Generator: setuptools (82.0.1)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
diff --git a/voxvera/vendor/setuptools-82.0.1.dist-info/entry_points.txt b/voxvera/vendor/setuptools-82.0.1.dist-info/entry_points.txt
deleted file mode 100644
index 0db0a6c..0000000
--- a/voxvera/vendor/setuptools-82.0.1.dist-info/entry_points.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-[distutils.commands]
-alias = setuptools.command.alias:alias
-bdist_egg = setuptools.command.bdist_egg:bdist_egg
-bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
-bdist_wheel = setuptools.command.bdist_wheel:bdist_wheel
-build = setuptools.command.build:build
-build_clib = setuptools.command.build_clib:build_clib
-build_ext = setuptools.command.build_ext:build_ext
-build_py = setuptools.command.build_py:build_py
-develop = setuptools.command.develop:develop
-dist_info = setuptools.command.dist_info:dist_info
-easy_install = setuptools.command.easy_install:easy_install
-editable_wheel = setuptools.command.editable_wheel:editable_wheel
-egg_info = setuptools.command.egg_info:egg_info
-install = setuptools.command.install:install
-install_egg_info = setuptools.command.install_egg_info:install_egg_info
-install_lib = setuptools.command.install_lib:install_lib
-install_scripts = setuptools.command.install_scripts:install_scripts
-rotate = setuptools.command.rotate:rotate
-saveopts = setuptools.command.saveopts:saveopts
-sdist = setuptools.command.sdist:sdist
-setopt = setuptools.command.setopt:setopt
-
-[distutils.setup_keywords]
-dependency_links = setuptools.dist:assert_string_list
-eager_resources = setuptools.dist:assert_string_list
-entry_points = setuptools.dist:check_entry_points
-exclude_package_data = setuptools.dist:check_package_data
-extras_require = setuptools.dist:check_extras
-include_package_data = setuptools.dist:assert_bool
-install_requires = setuptools.dist:check_requirements
-namespace_packages = setuptools.dist:check_nsp
-package_data = setuptools.dist:check_package_data
-packages = setuptools.dist:check_packages
-python_requires = setuptools.dist:check_specifier
-setup_requires = setuptools.dist:check_requirements
-use_2to3 = setuptools.dist:invalid_unless_false
-zip_safe = setuptools.dist:assert_bool
-
-[egg_info.writers]
-PKG-INFO = setuptools.command.egg_info:write_pkg_info
-dependency_links.txt = setuptools.command.egg_info:overwrite_arg
-eager_resources.txt = setuptools.command.egg_info:overwrite_arg
-entry_points.txt = setuptools.command.egg_info:write_entries
-namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
-requires.txt = setuptools.command.egg_info:write_requirements
-top_level.txt = setuptools.command.egg_info:write_toplevel_names
-
-[setuptools.finalize_distribution_options]
-keywords = setuptools.dist:Distribution._finalize_setup_keywords
-parent_finalize = setuptools.dist:_Distribution.finalize_options
diff --git a/voxvera/vendor/setuptools-82.0.1.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools-82.0.1.dist-info/licenses/LICENSE
deleted file mode 100644
index 1bb5a44..0000000
--- a/voxvera/vendor/setuptools-82.0.1.dist-info/licenses/LICENSE
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/voxvera/vendor/setuptools-82.0.1.dist-info/top_level.txt b/voxvera/vendor/setuptools-82.0.1.dist-info/top_level.txt
deleted file mode 100644
index 11b11fe..0000000
--- a/voxvera/vendor/setuptools-82.0.1.dist-info/top_level.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-_distutils_hack
-setuptools
diff --git a/voxvera/vendor/setuptools/__init__.py b/voxvera/vendor/setuptools/__init__.py
deleted file mode 100644
index 87ca47b..0000000
--- a/voxvera/vendor/setuptools/__init__.py
+++ /dev/null
@@ -1,256 +0,0 @@
-"""Extensions to the 'distutils' for large or complex distributions"""
-# mypy: disable_error_code=override
-# Command.reinitialize_command has an extra **kw param that distutils doesn't have
-# Can't disable on the exact line because distutils doesn't exists on Python 3.12
-# and mypy isn't aware of distutils_hack, causing distutils.core.Command to be Any,
-# and a [unused-ignore] to be raised on 3.12+
-
-from __future__ import annotations
-
-import functools
-import os
-import sys
-from abc import abstractmethod
-from collections.abc import Mapping
-from typing import TYPE_CHECKING, TypeVar, overload
-
-sys.path.extend(((vendor_path := os.path.join(os.path.dirname(os.path.dirname(__file__)), 'setuptools', '_vendor')) not in sys.path) * [vendor_path])  # fmt: skip
-# workaround for #4476
-sys.modules.pop('backports', None)
-
-import _distutils_hack.override  # noqa: F401
-
-from . import logging, monkey
-from .depends import Require
-from .discovery import PackageFinder, PEP420PackageFinder
-from .dist import Distribution
-from .extension import Extension
-from .version import __version__ as __version__
-from .warnings import SetuptoolsDeprecationWarning
-
-import distutils.core
-
-__all__ = [
-    'setup',
-    'Distribution',
-    'Command',
-    'Extension',
-    'Require',
-    'SetuptoolsDeprecationWarning',
-    'find_packages',
-    'find_namespace_packages',
-]
-
-_CommandT = TypeVar("_CommandT", bound="_Command")
-
-bootstrap_install_from = None
-
-find_packages = PackageFinder.find
-find_namespace_packages = PEP420PackageFinder.find
-
-
-def _install_setup_requires(attrs):
-    # Note: do not use `setuptools.Distribution` directly, as
-    # our PEP 517 backend patch `distutils.core.Distribution`.
-    class MinimalDistribution(distutils.core.Distribution):
-        """
-        A minimal version of a distribution for supporting the
-        fetch_build_eggs interface.
-        """
-
-        def __init__(self, attrs: Mapping[str, object]) -> None:
-            _incl = 'dependency_links', 'setup_requires'
-            filtered = {k: attrs[k] for k in set(_incl) & set(attrs)}
-            super().__init__(filtered)
-            # Prevent accidentally triggering discovery with incomplete set of attrs
-            self.set_defaults._disable()
-
-        def _get_project_config_files(self, filenames=None):
-            """Ignore ``pyproject.toml``, they are not related to setup_requires"""
-            try:
-                cfg, _toml = super()._split_standard_project_metadata(filenames)
-            except Exception:
-                return filenames, ()
-            return cfg, ()
-
-        def finalize_options(self):
-            """
-            Disable finalize_options to avoid building the working set.
-            Ref #2158.
-            """
-
-    dist = MinimalDistribution(attrs)
-
-    # Honor setup.cfg's options.
-    dist.parse_config_files(ignore_option_errors=True)
-    if dist.setup_requires:
-        _fetch_build_eggs(dist)
-
-
-def _fetch_build_eggs(dist: Distribution):
-    try:
-        dist.fetch_build_eggs(dist.setup_requires)
-    except Exception as ex:
-        msg = """
-        It is possible a package already installed in your system
-        contains an version that is invalid according to PEP 440.
-        You can try `pip install --use-pep517` as a workaround for this problem,
-        or rely on a new virtual environment.
-
-        If the problem refers to a package that is not installed yet,
-        please contact that package's maintainers or distributors.
-        """
-        if "InvalidVersion" in ex.__class__.__name__:
-            if hasattr(ex, "add_note"):
-                ex.add_note(msg)  # PEP 678
-            else:
-                dist.announce(f"\n{msg}\n")
-        raise
-
-
-def setup(**attrs) -> Distribution:
-    logging.configure()
-    # Make sure we have any requirements needed to interpret 'attrs'.
-    _install_setup_requires(attrs)
-    # Override return type of distutils.core.Distribution with setuptools.dist.Distribution
-    # (implicitly implemented via `setuptools.monkey.patch_all`).
-    return distutils.core.setup(**attrs)  # type: ignore[return-value]
-
-
-setup.__doc__ = distutils.core.setup.__doc__
-
-if TYPE_CHECKING:
-    # Work around a mypy issue where type[T] can't be used as a base: https://github.com/python/mypy/issues/10962
-    from distutils.core import Command as _Command
-else:
-    _Command = monkey.get_unpatched(distutils.core.Command)
-
-
-class Command(_Command):
-    """
-    Setuptools internal actions are organized using a *command design pattern*.
-    This means that each action (or group of closely related actions) executed during
-    the build should be implemented as a ``Command`` subclass.
-
-    These commands are abstractions and do not necessarily correspond to a command that
-    can (or should) be executed via a terminal, in a CLI fashion (although historically
-    they would).
-
-    When creating a new command from scratch, custom defined classes **SHOULD** inherit
-    from ``setuptools.Command`` and implement a few mandatory methods.
-    Between these mandatory methods, are listed:
-    :meth:`initialize_options`, :meth:`finalize_options` and :meth:`run`.
-
-    A useful analogy for command classes is to think of them as subroutines with local
-    variables called "options".  The options are "declared" in :meth:`initialize_options`
-    and "defined" (given their final values, aka "finalized") in :meth:`finalize_options`,
-    both of which must be defined by every command class. The "body" of the subroutine,
-    (where it does all the work) is the :meth:`run` method.
-    Between :meth:`initialize_options` and :meth:`finalize_options`, ``setuptools`` may set
-    the values for options/attributes based on user's input (or circumstance),
-    which means that the implementation should be careful to not overwrite values in
-    :meth:`finalize_options` unless necessary.
-
-    Please note that other commands (or other parts of setuptools) may also overwrite
-    the values of the command's options/attributes multiple times during the build
-    process.
-    Therefore it is important to consistently implement :meth:`initialize_options` and
-    :meth:`finalize_options`. For example, all derived attributes (or attributes that
-    depend on the value of other attributes) **SHOULD** be recomputed in
-    :meth:`finalize_options`.
-
-    When overwriting existing commands, custom defined classes **MUST** abide by the
-    same APIs implemented by the original class. They also **SHOULD** inherit from the
-    original class.
-    """
-
-    command_consumes_arguments = False
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-
-    dry_run = False  # type: ignore[assignment] # pyright: ignore[reportAssignmentType] (until #4689; see #4872)
-    """
-    For compatibility with vendored bdist_wheel.
-    https://github.com/pypa/setuptools/pull/4872/files#r1986395142
-    """
-
-    def __init__(self, dist: Distribution, **kw) -> None:
-        """
-        Construct the command for dist, updating
-        vars(self) with any keyword parameters.
-        """
-        super().__init__(dist)
-        vars(self).update(kw)
-
-    @overload
-    def reinitialize_command(
-        self, command: str, reinit_subcommands: bool = False, **kw
-    ) -> Command: ...  # override distutils.cmd.Command with setuptools.Command
-    @overload
-    def reinitialize_command(
-        self, command: _CommandT, reinit_subcommands: bool = False, **kw
-    ) -> _CommandT: ...
-    def reinitialize_command(
-        self, command: str | _Command, reinit_subcommands: bool = False, **kw
-    ) -> Command | _Command:
-        cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
-        vars(cmd).update(kw)
-        return cmd  # pyright: ignore[reportReturnType] # pypa/distutils#307
-
-    @abstractmethod
-    def initialize_options(self) -> None:
-        """
-        Set or (reset) all options/attributes/caches used by the command
-        to their default values. Note that these values may be overwritten during
-        the build.
-        """
-        raise NotImplementedError
-
-    @abstractmethod
-    def finalize_options(self) -> None:
-        """
-        Set final values for all options/attributes used by the command.
-        Most of the time, each option/attribute/cache should only be set if it does not
-        have any value yet (e.g. ``if self.attr is None: self.attr = val``).
-        """
-        raise NotImplementedError
-
-    @abstractmethod
-    def run(self) -> None:
-        """
-        Execute the actions intended by the command.
-        (Side effects **SHOULD** only take place when :meth:`run` is executed,
-        for example, creating new files or writing to the terminal output).
-        """
-        raise NotImplementedError
-
-
-def _find_all_simple(path):
-    """
-    Find all files under 'path'
-    """
-    results = (
-        os.path.join(base, file)
-        for base, dirs, files in os.walk(path, followlinks=True)
-        for file in files
-    )
-    return filter(os.path.isfile, results)
-
-
-def findall(dir=os.curdir):
-    """
-    Find all files under 'dir' and return the list of full filenames.
-    Unless dir is '.', return full filenames with dir prepended.
-    """
-    files = _find_all_simple(dir)
-    if dir == os.curdir:
-        make_rel = functools.partial(os.path.relpath, start=dir)
-        files = map(make_rel, files)
-    return list(files)
-
-
-class sic(str):
-    """Treat this string as-is (https://en.wikipedia.org/wiki/Sic)"""
-
-
-# Apply monkey patches
-monkey.patch_all()
diff --git a/voxvera/vendor/setuptools/_core_metadata.py b/voxvera/vendor/setuptools/_core_metadata.py
deleted file mode 100644
index a52d5cf..0000000
--- a/voxvera/vendor/setuptools/_core_metadata.py
+++ /dev/null
@@ -1,337 +0,0 @@
-"""
-Handling of Core Metadata for Python packages (including reading and writing).
-
-See: https://packaging.python.org/en/latest/specifications/core-metadata/
-"""
-
-from __future__ import annotations
-
-import os
-import stat
-import textwrap
-from email import message_from_file
-from email.message import Message
-from tempfile import NamedTemporaryFile
-
-from packaging.markers import Marker
-from packaging.requirements import Requirement
-from packaging.utils import canonicalize_name, canonicalize_version
-from packaging.version import Version
-
-from . import _normalization, _reqs
-from ._static import is_static
-from .warnings import SetuptoolsDeprecationWarning
-
-from distutils.util import rfc822_escape
-
-
-def get_metadata_version(self):
-    mv = getattr(self, 'metadata_version', None)
-    if mv is None:
-        mv = Version('2.4')
-        self.metadata_version = mv
-    return mv
-
-
-def rfc822_unescape(content: str) -> str:
-    """Reverse RFC-822 escaping by removing leading whitespaces from content."""
-    lines = content.splitlines()
-    if len(lines) == 1:
-        return lines[0].lstrip()
-    return '\n'.join((lines[0].lstrip(), textwrap.dedent('\n'.join(lines[1:]))))
-
-
-def _read_field_from_msg(msg: Message, field: str) -> str | None:
-    """Read Message header field."""
-    value = msg[field]
-    if value == 'UNKNOWN':
-        return None
-    return value
-
-
-def _read_field_unescaped_from_msg(msg: Message, field: str) -> str | None:
-    """Read Message header field and apply rfc822_unescape."""
-    value = _read_field_from_msg(msg, field)
-    if value is None:
-        return value
-    return rfc822_unescape(value)
-
-
-def _read_list_from_msg(msg: Message, field: str) -> list[str] | None:
-    """Read Message header field and return all results as list."""
-    values = msg.get_all(field, None)
-    if values == []:
-        return None
-    return values
-
-
-def _read_payload_from_msg(msg: Message) -> str | None:
-    value = str(msg.get_payload()).strip()
-    if value == 'UNKNOWN' or not value:
-        return None
-    return value
-
-
-def read_pkg_file(self, file):
-    """Reads the metadata values from a file object."""
-    msg = message_from_file(file)
-
-    self.metadata_version = Version(msg['metadata-version'])
-    self.name = _read_field_from_msg(msg, 'name')
-    self.version = _read_field_from_msg(msg, 'version')
-    self.description = _read_field_from_msg(msg, 'summary')
-    # we are filling author only.
-    self.author = _read_field_from_msg(msg, 'author')
-    self.maintainer = None
-    self.author_email = _read_field_from_msg(msg, 'author-email')
-    self.maintainer_email = None
-    self.url = _read_field_from_msg(msg, 'home-page')
-    self.download_url = _read_field_from_msg(msg, 'download-url')
-    self.license = _read_field_unescaped_from_msg(msg, 'license')
-    self.license_expression = _read_field_unescaped_from_msg(msg, 'license-expression')
-
-    self.long_description = _read_field_unescaped_from_msg(msg, 'description')
-    if self.long_description is None and self.metadata_version >= Version('2.1'):
-        self.long_description = _read_payload_from_msg(msg)
-    self.description = _read_field_from_msg(msg, 'summary')
-
-    if 'keywords' in msg:
-        self.keywords = _read_field_from_msg(msg, 'keywords').split(',')
-
-    self.platforms = _read_list_from_msg(msg, 'platform')
-    self.classifiers = _read_list_from_msg(msg, 'classifier')
-
-    # PEP 314 - these fields only exist in 1.1
-    if self.metadata_version == Version('1.1'):
-        self.requires = _read_list_from_msg(msg, 'requires')
-        self.provides = _read_list_from_msg(msg, 'provides')
-        self.obsoletes = _read_list_from_msg(msg, 'obsoletes')
-    else:
-        self.requires = None
-        self.provides = None
-        self.obsoletes = None
-
-    self.license_files = _read_list_from_msg(msg, 'license-file')
-
-
-def single_line(val):
-    """
-    Quick and dirty validation for Summary pypa/setuptools#1390.
-    """
-    if '\n' in val:
-        # TODO: Replace with `raise ValueError("newlines not allowed")`
-        # after reviewing #2893.
-        msg = "newlines are not allowed in `summary` and will break in the future"
-        SetuptoolsDeprecationWarning.emit("Invalid config.", msg)
-        # due_date is undefined. Controversial change, there was a lot of push back.
-        val = val.strip().split('\n')[0]
-    return val
-
-
-def write_pkg_info(self, base_dir):
-    """Write the PKG-INFO file into the release tree."""
-    temp = ""
-    final = os.path.join(base_dir, 'PKG-INFO')
-    try:
-        # Use a temporary file while writing to avoid race conditions
-        # (e.g. `importlib.metadata` reading `.egg-info/PKG-INFO`):
-        with NamedTemporaryFile("w", encoding="utf-8", dir=base_dir, delete=False) as f:
-            temp = f.name
-            self.write_pkg_file(f)
-        permissions = stat.S_IMODE(os.lstat(temp).st_mode)
-        os.chmod(temp, permissions | stat.S_IRGRP | stat.S_IROTH)
-        os.replace(temp, final)  # atomic operation.
-    finally:
-        if temp and os.path.exists(temp):
-            os.remove(temp)
-
-
-# Based on Python 3.5 version
-def write_pkg_file(self, file):  # noqa: C901  # is too complex (14)  # FIXME
-    """Write the PKG-INFO format data to a file object."""
-    version = self.get_metadata_version()
-
-    def write_field(key, value):
-        file.write(f"{key}: {value}\n")
-
-    write_field('Metadata-Version', str(version))
-    write_field('Name', self.get_name())
-    write_field('Version', self.get_version())
-
-    summary = self.get_description()
-    if summary:
-        write_field('Summary', single_line(summary))
-
-    optional_fields = (
-        ('Home-page', 'url'),
-        ('Download-URL', 'download_url'),
-        ('Author', 'author'),
-        ('Author-email', 'author_email'),
-        ('Maintainer', 'maintainer'),
-        ('Maintainer-email', 'maintainer_email'),
-    )
-
-    for field, attr in optional_fields:
-        attr_val = getattr(self, attr, None)
-        if attr_val is not None:
-            write_field(field, attr_val)
-
-    if license_expression := self.license_expression:
-        write_field('License-Expression', license_expression)
-    elif license := self.get_license():
-        write_field('License', rfc822_escape(license))
-
-    for label, url in self.project_urls.items():
-        write_field('Project-URL', f'{label}, {url}')
-
-    keywords = ','.join(self.get_keywords())
-    if keywords:
-        write_field('Keywords', keywords)
-
-    platforms = self.get_platforms() or []
-    for platform in platforms:
-        write_field('Platform', platform)
-
-    self._write_list(file, 'Classifier', self.get_classifiers())
-
-    # PEP 314
-    self._write_list(file, 'Requires', self.get_requires())
-    self._write_list(file, 'Provides', self.get_provides())
-    self._write_list(file, 'Obsoletes', self.get_obsoletes())
-
-    # Setuptools specific for PEP 345
-    if hasattr(self, 'python_requires'):
-        write_field('Requires-Python', self.python_requires)
-
-    # PEP 566
-    if self.long_description_content_type:
-        write_field('Description-Content-Type', self.long_description_content_type)
-
-    safe_license_files = map(_safe_license_file, self.license_files or [])
-    self._write_list(file, 'License-File', safe_license_files)
-    _write_requirements(self, file)
-
-    for field, attr in _POSSIBLE_DYNAMIC_FIELDS.items():
-        if (val := getattr(self, attr, None)) and not is_static(val):
-            write_field('Dynamic', field)
-
-    long_description = self.get_long_description()
-    if long_description:
-        file.write(f"\n{long_description}")
-        if not long_description.endswith("\n"):
-            file.write("\n")
-
-
-def _write_requirements(self, file):
-    for req in _reqs.parse(self.install_requires):
-        file.write(f"Requires-Dist: {req}\n")
-
-    processed_extras = {}
-    for augmented_extra, reqs in self.extras_require.items():
-        # Historically, setuptools allows "augmented extras": `:`
-        unsafe_extra, _, condition = augmented_extra.partition(":")
-        unsafe_extra = unsafe_extra.strip()
-        extra = _normalization.safe_extra(unsafe_extra)
-
-        if extra:
-            _write_provides_extra(file, processed_extras, extra, unsafe_extra)
-        for req in _reqs.parse_strings(reqs):
-            r = _include_extra(req, extra, condition.strip())
-            file.write(f"Requires-Dist: {r}\n")
-
-    return processed_extras
-
-
-def _include_extra(req: str, extra: str, condition: str) -> Requirement:
-    r = Requirement(req)  # create a fresh object that can be modified
-    parts = (
-        f"({r.marker})" if r.marker else None,
-        f"({condition})" if condition else None,
-        f"extra == {extra!r}" if extra else None,
-    )
-    r.marker = Marker(" and ".join(x for x in parts if x))
-    return r
-
-
-def _write_provides_extra(file, processed_extras, safe, unsafe):
-    previous = processed_extras.get(safe)
-    if previous == unsafe:
-        SetuptoolsDeprecationWarning.emit(
-            'Ambiguity during "extra" normalization for dependencies.',
-            f"""
-            {previous!r} and {unsafe!r} normalize to the same value:\n
-                {safe!r}\n
-            In future versions, setuptools might halt the build process.
-            """,
-            see_url="https://peps.python.org/pep-0685/",
-        )
-    else:
-        processed_extras[safe] = unsafe
-        file.write(f"Provides-Extra: {safe}\n")
-
-
-# from pypa/distutils#244; needed only until that logic is always available
-def get_fullname(self):
-    return _distribution_fullname(self.get_name(), self.get_version())
-
-
-def _distribution_fullname(name: str, version: str) -> str:
-    """
-    >>> _distribution_fullname('setup.tools', '1.0-2')
-    'setup_tools-1.0.post2'
-    >>> _distribution_fullname('setup-tools', '1.2post2')
-    'setup_tools-1.2.post2'
-    >>> _distribution_fullname('setup-tools', '1.0-r2')
-    'setup_tools-1.0.post2'
-    >>> _distribution_fullname('setup.tools', '1.0.post')
-    'setup_tools-1.0.post0'
-    >>> _distribution_fullname('setup.tools', '1.0+ubuntu-1')
-    'setup_tools-1.0+ubuntu.1'
-    """
-    return "{}-{}".format(
-        canonicalize_name(name).replace('-', '_'),
-        canonicalize_version(version, strip_trailing_zero=False),
-    )
-
-
-def _safe_license_file(file):
-    # XXX: Do we need this after the deprecation discussed in #4892, #4896??
-    normalized = os.path.normpath(file).replace(os.sep, "/")
-    if "../" in normalized:
-        return os.path.basename(normalized)  # Temporarily restore pre PEP639 behaviour
-    return normalized
-
-
-_POSSIBLE_DYNAMIC_FIELDS = {
-    # Core Metadata Field x related Distribution attribute
-    "author": "author",
-    "author-email": "author_email",
-    "classifier": "classifiers",
-    "description": "long_description",
-    "description-content-type": "long_description_content_type",
-    "download-url": "download_url",
-    "home-page": "url",
-    "keywords": "keywords",
-    "license": "license",
-    # XXX: License-File is complicated because the user gives globs that are expanded
-    #      during the build. Without special handling it is likely always
-    #      marked as Dynamic, which is an acceptable outcome according to:
-    #      https://github.com/pypa/setuptools/issues/4629#issuecomment-2331233677
-    "license-file": "license_files",
-    "license-expression": "license_expression",  # PEP 639
-    "maintainer": "maintainer",
-    "maintainer-email": "maintainer_email",
-    "obsoletes": "obsoletes",
-    # "obsoletes-dist": "obsoletes_dist",  # NOT USED
-    "platform": "platforms",
-    "project-url": "project_urls",
-    "provides": "provides",
-    # "provides-dist": "provides_dist",  # NOT USED
-    "provides-extra": "extras_require",
-    "requires": "requires",
-    "requires-dist": "install_requires",
-    # "requires-external": "requires_external",  # NOT USED
-    "requires-python": "python_requires",
-    "summary": "description",
-    # "supported-platform": "supported_platforms",  # NOT USED
-}
diff --git a/voxvera/vendor/setuptools/_discovery.py b/voxvera/vendor/setuptools/_discovery.py
deleted file mode 100644
index d1b4a0e..0000000
--- a/voxvera/vendor/setuptools/_discovery.py
+++ /dev/null
@@ -1,33 +0,0 @@
-import functools
-import operator
-
-import packaging.requirements
-
-
-# from coherent.build.discovery
-def extras_from_dep(dep):
-    try:
-        markers = packaging.requirements.Requirement(dep).marker._markers
-    except AttributeError:
-        markers = ()
-    return set(
-        marker[2].value
-        for marker in markers
-        if isinstance(marker, tuple) and marker[0].value == 'extra'
-    )
-
-
-def extras_from_deps(deps):
-    """
-    >>> extras_from_deps(['requests'])
-    set()
-    >>> extras_from_deps(['pytest; extra == "test"'])
-    {'test'}
-    >>> sorted(extras_from_deps([
-    ...     'requests',
-    ...     'pytest; extra == "test"',
-    ...     'pytest-cov; extra == "test"',
-    ...     'sphinx; extra=="doc"']))
-    ['doc', 'test']
-    """
-    return functools.reduce(operator.or_, map(extras_from_dep, deps), set())
diff --git a/voxvera/vendor/setuptools/_distutils/__init__.py b/voxvera/vendor/setuptools/_distutils/__init__.py
deleted file mode 100644
index e374d5c..0000000
--- a/voxvera/vendor/setuptools/_distutils/__init__.py
+++ /dev/null
@@ -1,14 +0,0 @@
-import importlib
-import sys
-
-__version__, _, _ = sys.version.partition(' ')
-
-
-try:
-    # Allow Debian and pkgsrc (only) to customize system
-    # behavior. Ref pypa/distutils#2 and pypa/distutils#16.
-    # This hook is deprecated and no other environments
-    # should use it.
-    importlib.import_module('_distutils_system_mod')
-except ImportError:
-    pass
diff --git a/voxvera/vendor/setuptools/_distutils/_log.py b/voxvera/vendor/setuptools/_distutils/_log.py
deleted file mode 100644
index 0148f15..0000000
--- a/voxvera/vendor/setuptools/_distutils/_log.py
+++ /dev/null
@@ -1,3 +0,0 @@
-import logging
-
-log = logging.getLogger()
diff --git a/voxvera/vendor/setuptools/_distutils/_macos_compat.py b/voxvera/vendor/setuptools/_distutils/_macos_compat.py
deleted file mode 100644
index 76ecb96..0000000
--- a/voxvera/vendor/setuptools/_distutils/_macos_compat.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import importlib
-import sys
-
-
-def bypass_compiler_fixup(cmd, args):
-    return cmd
-
-
-if sys.platform == 'darwin':
-    compiler_fixup = importlib.import_module('_osx_support').compiler_fixup
-else:
-    compiler_fixup = bypass_compiler_fixup
diff --git a/voxvera/vendor/setuptools/_distutils/_modified.py b/voxvera/vendor/setuptools/_distutils/_modified.py
deleted file mode 100644
index f64cab7..0000000
--- a/voxvera/vendor/setuptools/_distutils/_modified.py
+++ /dev/null
@@ -1,95 +0,0 @@
-"""Timestamp comparison of files and groups of files."""
-
-from __future__ import annotations
-
-import functools
-import os.path
-from collections.abc import Callable, Iterable
-from typing import Literal, TypeVar
-
-from jaraco.functools import splat
-
-from .compat.py39 import zip_strict
-from .errors import DistutilsFileError
-
-_SourcesT = TypeVar(
-    "_SourcesT", bound="str | bytes | os.PathLike[str] | os.PathLike[bytes]"
-)
-_TargetsT = TypeVar(
-    "_TargetsT", bound="str | bytes | os.PathLike[str] | os.PathLike[bytes]"
-)
-
-
-def _newer(source, target):
-    return not os.path.exists(target) or (
-        os.path.getmtime(source) > os.path.getmtime(target)
-    )
-
-
-def newer(
-    source: str | bytes | os.PathLike[str] | os.PathLike[bytes],
-    target: str | bytes | os.PathLike[str] | os.PathLike[bytes],
-) -> bool:
-    """
-    Is source modified more recently than target.
-
-    Returns True if 'source' is modified more recently than
-    'target' or if 'target' does not exist.
-
-    Raises DistutilsFileError if 'source' does not exist.
-    """
-    if not os.path.exists(source):
-        raise DistutilsFileError(f"file {os.path.abspath(source)!r} does not exist")
-
-    return _newer(source, target)
-
-
-def newer_pairwise(
-    sources: Iterable[_SourcesT],
-    targets: Iterable[_TargetsT],
-    newer: Callable[[_SourcesT, _TargetsT], bool] = newer,
-) -> tuple[list[_SourcesT], list[_TargetsT]]:
-    """
-    Filter filenames where sources are newer than targets.
-
-    Walk two filename iterables in parallel, testing if each source is newer
-    than its corresponding target.  Returns a pair of lists (sources,
-    targets) where source is newer than target, according to the semantics
-    of 'newer()'.
-    """
-    newer_pairs = filter(splat(newer), zip_strict(sources, targets))
-    return tuple(map(list, zip(*newer_pairs))) or ([], [])
-
-
-def newer_group(
-    sources: Iterable[str | bytes | os.PathLike[str] | os.PathLike[bytes]],
-    target: str | bytes | os.PathLike[str] | os.PathLike[bytes],
-    missing: Literal["error", "ignore", "newer"] = "error",
-) -> bool:
-    """
-    Is target out-of-date with respect to any file in sources.
-
-    Return True if 'target' is out-of-date with respect to any file
-    listed in 'sources'. In other words, if 'target' exists and is newer
-    than every file in 'sources', return False; otherwise return True.
-    ``missing`` controls how to handle a missing source file:
-
-    - error (default): allow the ``stat()`` call to fail.
-    - ignore: silently disregard any missing source files.
-    - newer: treat missing source files as "target out of date". This
-      mode is handy in "dry-run" mode: it will pretend to carry out
-      commands that wouldn't work because inputs are missing, but
-      that doesn't matter because dry-run won't run the commands.
-    """
-
-    def missing_as_newer(source):
-        return missing == 'newer' and not os.path.exists(source)
-
-    ignored = os.path.exists if missing == 'ignore' else None
-    return not os.path.exists(target) or any(
-        missing_as_newer(source) or _newer(source, target)
-        for source in filter(ignored, sources)
-    )
-
-
-newer_pairwise_group = functools.partial(newer_pairwise, newer=newer_group)
diff --git a/voxvera/vendor/setuptools/_distutils/_msvccompiler.py b/voxvera/vendor/setuptools/_distutils/_msvccompiler.py
deleted file mode 100644
index d07c86e..0000000
--- a/voxvera/vendor/setuptools/_distutils/_msvccompiler.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import warnings
-
-from .compilers.C import msvc
-
-__all__ = ["MSVCCompiler"]
-
-MSVCCompiler = msvc.Compiler
-
-
-def __getattr__(name):
-    if name == '_get_vc_env':
-        warnings.warn(
-            "_get_vc_env is private; find an alternative (pypa/distutils#340)"
-        )
-        return msvc._get_vc_env
-    raise AttributeError(name)
diff --git a/voxvera/vendor/setuptools/_distutils/archive_util.py b/voxvera/vendor/setuptools/_distutils/archive_util.py
deleted file mode 100644
index 4a7fb9c..0000000
--- a/voxvera/vendor/setuptools/_distutils/archive_util.py
+++ /dev/null
@@ -1,284 +0,0 @@
-"""distutils.archive_util
-
-Utility functions for creating archive files (tarballs, zip files,
-that sort of thing)."""
-
-from __future__ import annotations
-
-import os
-from typing import Literal, overload
-
-try:
-    import zipfile
-except ImportError:
-    zipfile = None
-
-
-from ._log import log
-from .dir_util import mkpath
-from .errors import DistutilsExecError
-from .spawn import spawn
-
-try:
-    from pwd import getpwnam
-except ImportError:
-    getpwnam = None
-
-try:
-    from grp import getgrnam
-except ImportError:
-    getgrnam = None
-
-
-def _get_gid(name):
-    """Returns a gid, given a group name."""
-    if getgrnam is None or name is None:
-        return None
-    try:
-        result = getgrnam(name)
-    except KeyError:
-        result = None
-    if result is not None:
-        return result[2]
-    return None
-
-
-def _get_uid(name):
-    """Returns an uid, given a user name."""
-    if getpwnam is None or name is None:
-        return None
-    try:
-        result = getpwnam(name)
-    except KeyError:
-        result = None
-    if result is not None:
-        return result[2]
-    return None
-
-
-def make_tarball(
-    base_name: str,
-    base_dir: str | os.PathLike[str],
-    compress: Literal["gzip", "bzip2", "xz"] | None = "gzip",
-    verbose: bool = False,
-    owner: str | None = None,
-    group: str | None = None,
-) -> str:
-    """Create a (possibly compressed) tar file from all the files under
-    'base_dir'.
-
-    'compress' must be "gzip" (the default), "bzip2", "xz", or None.
-
-    'owner' and 'group' can be used to define an owner and a group for the
-    archive that is being built. If not provided, the current owner and group
-    will be used.
-
-    The output tar file will be named 'base_dir' +  ".tar", possibly plus
-    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").
-
-    Returns the output filename.
-    """
-    tar_compression = {
-        'gzip': 'gz',
-        'bzip2': 'bz2',
-        'xz': 'xz',
-        None: '',
-    }
-    compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'xz': '.xz'}
-
-    # flags for compression program, each element of list will be an argument
-    if compress is not None and compress not in compress_ext.keys():
-        raise ValueError(
-            "bad value for 'compress': must be None, 'gzip', 'bzip2', 'xz'"
-        )
-
-    archive_name = base_name + '.tar'
-    archive_name += compress_ext.get(compress, '')
-
-    mkpath(os.path.dirname(archive_name))
-
-    # creating the tarball
-    import tarfile  # late import so Python build itself doesn't break
-
-    log.info('Creating tar archive')
-
-    uid = _get_uid(owner)
-    gid = _get_gid(group)
-
-    def _set_uid_gid(tarinfo):
-        if gid is not None:
-            tarinfo.gid = gid
-            tarinfo.gname = group
-        if uid is not None:
-            tarinfo.uid = uid
-            tarinfo.uname = owner
-        return tarinfo
-
-    tar = tarfile.open(archive_name, f'w|{tar_compression[compress]}')
-    try:
-        tar.add(base_dir, filter=_set_uid_gid)
-    finally:
-        tar.close()
-
-    return archive_name
-
-
-def make_zipfile(
-    base_name: str,
-    base_dir: str | os.PathLike[str],
-    verbose: bool = False,
-) -> str:
-    """Create a zip file from all the files under 'base_dir'.
-
-    The output zip file will be named 'base_name' + ".zip".  Uses either the
-    "zipfile" Python module (if available) or the InfoZIP "zip" utility
-    (if installed and found on the default search path).  If neither tool is
-    available, raises DistutilsExecError.  Returns the name of the output zip
-    file.
-    """
-    zip_filename = base_name + ".zip"
-    mkpath(os.path.dirname(zip_filename))
-
-    # If zipfile module is not available, try spawning an external
-    # 'zip' command.
-    if zipfile is None:
-        if verbose:
-            zipoptions = "-r"
-        else:
-            zipoptions = "-rq"
-
-        try:
-            spawn(["zip", zipoptions, zip_filename, base_dir])
-        except DistutilsExecError:
-            # XXX really should distinguish between "couldn't find
-            # external 'zip' command" and "zip failed".
-            raise DistutilsExecError(
-                f"unable to create zip file '{zip_filename}': "
-                "could neither import the 'zipfile' module nor "
-                "find a standalone zip utility"
-            )
-
-    else:
-        log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir)
-
-        try:
-            zip = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_DEFLATED)
-        except RuntimeError:
-            zip = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_STORED)
-
-        with zip:
-            if base_dir != os.curdir:
-                path = os.path.normpath(os.path.join(base_dir, ''))
-                zip.write(path, path)
-                log.info("adding '%s'", path)
-            for dirpath, dirnames, filenames in os.walk(base_dir):
-                for name in dirnames:
-                    path = os.path.normpath(os.path.join(dirpath, name, ''))
-                    zip.write(path, path)
-                    log.info("adding '%s'", path)
-                for name in filenames:
-                    path = os.path.normpath(os.path.join(dirpath, name))
-                    if os.path.isfile(path):
-                        zip.write(path, path)
-                        log.info("adding '%s'", path)
-
-    return zip_filename
-
-
-ARCHIVE_FORMATS = {
-    'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
-    'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
-    'xztar': (make_tarball, [('compress', 'xz')], "xz'ed tar-file"),
-    'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"),
-    'tar': (make_tarball, [('compress', None)], "uncompressed tar file"),
-    'zip': (make_zipfile, [], "ZIP file"),
-}
-
-
-def check_archive_formats(formats):
-    """Returns the first format from the 'format' list that is unknown.
-
-    If all formats are known, returns None
-    """
-    for format in formats:
-        if format not in ARCHIVE_FORMATS:
-            return format
-    return None
-
-
-@overload
-def make_archive(
-    base_name: str,
-    format: str,
-    root_dir: str | os.PathLike[str] | bytes | os.PathLike[bytes] | None = None,
-    base_dir: str | None = None,
-    verbose: bool = False,
-    owner: str | None = None,
-    group: str | None = None,
-) -> str: ...
-@overload
-def make_archive(
-    base_name: str | os.PathLike[str],
-    format: str,
-    root_dir: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-    base_dir: str | None = None,
-    verbose: bool = False,
-    owner: str | None = None,
-    group: str | None = None,
-) -> str: ...
-def make_archive(
-    base_name: str | os.PathLike[str],
-    format: str,
-    root_dir: str | os.PathLike[str] | bytes | os.PathLike[bytes] | None = None,
-    base_dir: str | None = None,
-    verbose: bool = False,
-    owner: str | None = None,
-    group: str | None = None,
-) -> str:
-    """Create an archive file (eg. zip or tar).
-
-    'base_name' is the name of the file to create, minus any format-specific
-    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
-    "bztar", "xztar", or "ztar".
-
-    'root_dir' is a directory that will be the root directory of the
-    archive; ie. we typically chdir into 'root_dir' before creating the
-    archive.  'base_dir' is the directory where we start archiving from;
-    ie. 'base_dir' will be the common prefix of all files and
-    directories in the archive.  'root_dir' and 'base_dir' both default
-    to the current directory.  Returns the name of the archive file.
-
-    'owner' and 'group' are used when creating a tar archive. By default,
-    uses the current owner and group.
-    """
-    save_cwd = os.getcwd()
-    if root_dir is not None:
-        log.debug("changing into '%s'", root_dir)
-        base_name = os.path.abspath(base_name)
-        os.chdir(root_dir)
-
-    if base_dir is None:
-        base_dir = os.curdir
-
-    kwargs: dict[str, bool | None] = {}
-
-    try:
-        format_info = ARCHIVE_FORMATS[format]
-    except KeyError:
-        raise ValueError(f"unknown archive format '{format}'")
-
-    func = format_info[0]
-    kwargs.update(format_info[1])
-
-    if format != 'zip':
-        kwargs['owner'] = owner
-        kwargs['group'] = group
-
-    try:
-        filename = func(base_name, base_dir, **kwargs)
-    finally:
-        if root_dir is not None:
-            log.debug("changing back to '%s'", save_cwd)
-            os.chdir(save_cwd)
-
-    return filename
diff --git a/voxvera/vendor/setuptools/_distutils/ccompiler.py b/voxvera/vendor/setuptools/_distutils/ccompiler.py
deleted file mode 100644
index 58bc6a5..0000000
--- a/voxvera/vendor/setuptools/_distutils/ccompiler.py
+++ /dev/null
@@ -1,26 +0,0 @@
-from .compat.numpy import (  # noqa: F401
-    _default_compilers,
-    compiler_class,
-)
-from .compilers.C import base
-from .compilers.C.base import (
-    gen_lib_options,
-    gen_preprocess_options,
-    get_default_compiler,
-    new_compiler,
-    show_compilers,
-)
-from .compilers.C.errors import CompileError, LinkError
-
-__all__ = [
-    'CompileError',
-    'LinkError',
-    'gen_lib_options',
-    'gen_preprocess_options',
-    'get_default_compiler',
-    'new_compiler',
-    'show_compilers',
-]
-
-
-CCompiler = base.Compiler
diff --git a/voxvera/vendor/setuptools/_distutils/cmd.py b/voxvera/vendor/setuptools/_distutils/cmd.py
deleted file mode 100644
index 530cc10..0000000
--- a/voxvera/vendor/setuptools/_distutils/cmd.py
+++ /dev/null
@@ -1,535 +0,0 @@
-"""distutils.cmd
-
-Provides the Command class, the base class for the command classes
-in the distutils.command package.
-"""
-
-from __future__ import annotations
-
-import logging
-import os
-import re
-import sys
-from abc import abstractmethod
-from collections.abc import Callable, MutableSequence
-from typing import TYPE_CHECKING, Any, ClassVar, TypeVar, overload
-
-from . import _modified, archive_util, dir_util, file_util, util
-from ._log import log
-from .errors import DistutilsOptionError
-
-if TYPE_CHECKING:
-    # type-only import because of mutual dependence between these classes
-    from distutils.dist import Distribution
-
-    from typing_extensions import TypeVarTuple, Unpack
-
-    _Ts = TypeVarTuple("_Ts")
-
-_StrPathT = TypeVar("_StrPathT", bound="str | os.PathLike[str]")
-_BytesPathT = TypeVar("_BytesPathT", bound="bytes | os.PathLike[bytes]")
-_CommandT = TypeVar("_CommandT", bound="Command")
-
-
-class Command:
-    """Abstract base class for defining command classes, the "worker bees"
-    of the Distutils.  A useful analogy for command classes is to think of
-    them as subroutines with local variables called "options".  The options
-    are "declared" in 'initialize_options()' and "defined" (given their
-    final values, aka "finalized") in 'finalize_options()', both of which
-    must be defined by every command class.  The distinction between the
-    two is necessary because option values might come from the outside
-    world (command line, config file, ...), and any options dependent on
-    other options must be computed *after* these outside influences have
-    been processed -- hence 'finalize_options()'.  The "body" of the
-    subroutine, where it does all its work based on the values of its
-    options, is the 'run()' method, which must also be implemented by every
-    command class.
-    """
-
-    # 'sub_commands' formalizes the notion of a "family" of commands,
-    # eg. "install" as the parent with sub-commands "install_lib",
-    # "install_headers", etc.  The parent of a family of commands
-    # defines 'sub_commands' as a class attribute; it's a list of
-    #    (command_name : string, predicate : unbound_method | string | None)
-    # tuples, where 'predicate' is a method of the parent command that
-    # determines whether the corresponding command is applicable in the
-    # current situation.  (Eg. we "install_headers" is only applicable if
-    # we have any C header files to install.)  If 'predicate' is None,
-    # that command is always applicable.
-    #
-    # 'sub_commands' is usually defined at the *end* of a class, because
-    # predicates can be unbound methods, so they must already have been
-    # defined.  The canonical example is the "install" command.
-    sub_commands: ClassVar[  # Any to work around variance issues
-        list[tuple[str, Callable[[Any], bool] | None]]
-    ] = []
-
-    user_options: ClassVar[
-        # Specifying both because list is invariant. Avoids mypy override assignment issues
-        list[tuple[str, str, str]] | list[tuple[str, str | None, str]]
-    ] = []
-
-    # -- Creation/initialization methods -------------------------------
-
-    def __init__(self, dist: Distribution) -> None:
-        """Create and initialize a new Command object.  Most importantly,
-        invokes the 'initialize_options()' method, which is the real
-        initializer and depends on the actual command being
-        instantiated.
-        """
-        # late import because of mutual dependence between these classes
-        from distutils.dist import Distribution
-
-        if not isinstance(dist, Distribution):
-            raise TypeError("dist must be a Distribution instance")
-        if self.__class__ is Command:
-            raise RuntimeError("Command is an abstract class")
-
-        self.distribution = dist
-        self.initialize_options()
-
-        # Per-command versions of the global flags, so that the user can
-        # customize Distutils' behaviour command-by-command and let some
-        # commands fall back on the Distribution's behaviour. None means
-        # "not defined, check self.distribution's copy".
-
-        # verbose is largely ignored, but needs to be set for
-        # backwards compatibility (I think)?
-        self.verbose = dist.verbose
-
-        # Some commands define a 'self.force' option to ignore file
-        # timestamps, but methods defined *here* assume that
-        # 'self.force' exists for all commands.  So define it here
-        # just to be safe.
-        self.force = None
-
-        # The 'help' flag is just used for command-line parsing, so
-        # none of that complicated bureaucracy is needed.
-        self.help = False
-
-        # 'finalized' records whether or not 'finalize_options()' has been
-        # called.  'finalize_options()' itself should not pay attention to
-        # this flag: it is the business of 'ensure_finalized()', which
-        # always calls 'finalize_options()', to respect/update it.
-        self.finalized = False
-
-    def ensure_finalized(self) -> None:
-        if not self.finalized:
-            self.finalize_options()
-        self.finalized = True
-
-    # Subclasses must define:
-    #   initialize_options()
-    #     provide default values for all options; may be customized by
-    #     setup script, by options from config file(s), or by command-line
-    #     options
-    #   finalize_options()
-    #     decide on the final values for all options; this is called
-    #     after all possible intervention from the outside world
-    #     (command-line, option file, etc.) has been processed
-    #   run()
-    #     run the command: do whatever it is we're here to do,
-    #     controlled by the command's various option values
-
-    @abstractmethod
-    def initialize_options(self) -> None:
-        """Set default values for all the options that this command
-        supports.  Note that these defaults may be overridden by other
-        commands, by the setup script, by config files, or by the
-        command-line.  Thus, this is not the place to code dependencies
-        between options; generally, 'initialize_options()' implementations
-        are just a bunch of "self.foo = None" assignments.
-
-        This method must be implemented by all command classes.
-        """
-        raise RuntimeError(
-            f"abstract method -- subclass {self.__class__} must override"
-        )
-
-    @abstractmethod
-    def finalize_options(self) -> None:
-        """Set final values for all the options that this command supports.
-        This is always called as late as possible, ie.  after any option
-        assignments from the command-line or from other commands have been
-        done.  Thus, this is the place to code option dependencies: if
-        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
-        long as 'foo' still has the same value it was assigned in
-        'initialize_options()'.
-
-        This method must be implemented by all command classes.
-        """
-        raise RuntimeError(
-            f"abstract method -- subclass {self.__class__} must override"
-        )
-
-    def dump_options(self, header=None, indent=""):
-        from distutils.fancy_getopt import longopt_xlate
-
-        if header is None:
-            header = f"command options for '{self.get_command_name()}':"
-        self.announce(indent + header, level=logging.INFO)
-        indent = indent + "  "
-        for option, _, _ in self.user_options:
-            option = option.translate(longopt_xlate)
-            if option[-1] == "=":
-                option = option[:-1]
-            value = getattr(self, option)
-            self.announce(indent + f"{option} = {value}", level=logging.INFO)
-
-    @abstractmethod
-    def run(self) -> None:
-        """A command's raison d'etre: carry out the action it exists to
-        perform, controlled by the options initialized in
-        'initialize_options()', customized by other commands, the setup
-        script, the command-line, and config files, and finalized in
-        'finalize_options()'.  All terminal output and filesystem
-        interaction should be done by 'run()'.
-
-        This method must be implemented by all command classes.
-        """
-        raise RuntimeError(
-            f"abstract method -- subclass {self.__class__} must override"
-        )
-
-    def announce(self, msg: object, level: int = logging.DEBUG) -> None:
-        log.log(level, msg)
-
-    def debug_print(self, msg: object) -> None:
-        """Print 'msg' to stdout if the global DEBUG (taken from the
-        DISTUTILS_DEBUG environment variable) flag is true.
-        """
-        from distutils.debug import DEBUG
-
-        if DEBUG:
-            print(msg)
-            sys.stdout.flush()
-
-    # -- Option validation methods -------------------------------------
-    # (these are very handy in writing the 'finalize_options()' method)
-    #
-    # NB. the general philosophy here is to ensure that a particular option
-    # value meets certain type and value constraints.  If not, we try to
-    # force it into conformance (eg. if we expect a list but have a string,
-    # split the string on comma and/or whitespace).  If we can't force the
-    # option into conformance, raise DistutilsOptionError.  Thus, command
-    # classes need do nothing more than (eg.)
-    #   self.ensure_string_list('foo')
-    # and they can be guaranteed that thereafter, self.foo will be
-    # a list of strings.
-
-    def _ensure_stringlike(self, option, what, default=None):
-        val = getattr(self, option)
-        if val is None:
-            setattr(self, option, default)
-            return default
-        elif not isinstance(val, str):
-            raise DistutilsOptionError(f"'{option}' must be a {what} (got `{val}`)")
-        return val
-
-    def ensure_string(self, option: str, default: str | None = None) -> None:
-        """Ensure that 'option' is a string; if not defined, set it to
-        'default'.
-        """
-        self._ensure_stringlike(option, "string", default)
-
-    def ensure_string_list(self, option: str) -> None:
-        r"""Ensure that 'option' is a list of strings.  If 'option' is
-        currently a string, we split it either on /,\s*/ or /\s+/, so
-        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
-        ["foo", "bar", "baz"].
-        """
-        val = getattr(self, option)
-        if val is None:
-            return
-        elif isinstance(val, str):
-            setattr(self, option, re.split(r',\s*|\s+', val))
-        else:
-            if isinstance(val, list):
-                ok = all(isinstance(v, str) for v in val)
-            else:
-                ok = False
-            if not ok:
-                raise DistutilsOptionError(
-                    f"'{option}' must be a list of strings (got {val!r})"
-                )
-
-    def _ensure_tested_string(self, option, tester, what, error_fmt, default=None):
-        val = self._ensure_stringlike(option, what, default)
-        if val is not None and not tester(val):
-            raise DistutilsOptionError(
-                ("error in '%s' option: " + error_fmt) % (option, val)
-            )
-
-    def ensure_filename(self, option: str) -> None:
-        """Ensure that 'option' is the name of an existing file."""
-        self._ensure_tested_string(
-            option, os.path.isfile, "filename", "'%s' does not exist or is not a file"
-        )
-
-    def ensure_dirname(self, option: str) -> None:
-        self._ensure_tested_string(
-            option,
-            os.path.isdir,
-            "directory name",
-            "'%s' does not exist or is not a directory",
-        )
-
-    # -- Convenience methods for commands ------------------------------
-
-    def get_command_name(self) -> str:
-        if hasattr(self, 'command_name'):
-            return self.command_name
-        else:
-            return self.__class__.__name__
-
-    def set_undefined_options(
-        self, src_cmd: str, *option_pairs: tuple[str, str]
-    ) -> None:
-        """Set the values of any "undefined" options from corresponding
-        option values in some other command object.  "Undefined" here means
-        "is None", which is the convention used to indicate that an option
-        has not been changed between 'initialize_options()' and
-        'finalize_options()'.  Usually called from 'finalize_options()' for
-        options that depend on some other command rather than another
-        option of the same command.  'src_cmd' is the other command from
-        which option values will be taken (a command object will be created
-        for it if necessary); the remaining arguments are
-        '(src_option,dst_option)' tuples which mean "take the value of
-        'src_option' in the 'src_cmd' command object, and copy it to
-        'dst_option' in the current command object".
-        """
-        # Option_pairs: list of (src_option, dst_option) tuples
-        src_cmd_obj = self.distribution.get_command_obj(src_cmd)
-        src_cmd_obj.ensure_finalized()
-        for src_option, dst_option in option_pairs:
-            if getattr(self, dst_option) is None:
-                setattr(self, dst_option, getattr(src_cmd_obj, src_option))
-
-    # NOTE: Because distutils is private to Setuptools and not all commands are exposed here,
-    # not every possible command is enumerated in the signature.
-    def get_finalized_command(self, command: str, create: bool = True) -> Command:
-        """Wrapper around Distribution's 'get_command_obj()' method: find
-        (create if necessary and 'create' is true) the command object for
-        'command', call its 'ensure_finalized()' method, and return the
-        finalized command object.
-        """
-        cmd_obj = self.distribution.get_command_obj(command, create)
-        cmd_obj.ensure_finalized()
-        return cmd_obj
-
-    # XXX rename to 'get_reinitialized_command()'? (should do the
-    # same in dist.py, if so)
-    @overload
-    def reinitialize_command(
-        self, command: str, reinit_subcommands: bool = False
-    ) -> Command: ...
-    @overload
-    def reinitialize_command(
-        self, command: _CommandT, reinit_subcommands: bool = False
-    ) -> _CommandT: ...
-    def reinitialize_command(
-        self, command: str | Command, reinit_subcommands=False
-    ) -> Command:
-        return self.distribution.reinitialize_command(command, reinit_subcommands)
-
-    def run_command(self, command: str) -> None:
-        """Run some other command: uses the 'run_command()' method of
-        Distribution, which creates and finalizes the command object if
-        necessary and then invokes its 'run()' method.
-        """
-        self.distribution.run_command(command)
-
-    def get_sub_commands(self) -> list[str]:
-        """Determine the sub-commands that are relevant in the current
-        distribution (ie., that need to be run).  This is based on the
-        'sub_commands' class attribute: each tuple in that list may include
-        a method that we call to determine if the subcommand needs to be
-        run for the current distribution.  Return a list of command names.
-        """
-        commands = []
-        for cmd_name, method in self.sub_commands:
-            if method is None or method(self):
-                commands.append(cmd_name)
-        return commands
-
-    # -- External world manipulation -----------------------------------
-
-    def warn(self, msg: object) -> None:
-        log.warning("warning: %s: %s\n", self.get_command_name(), msg)
-
-    def execute(
-        self,
-        func: Callable[[Unpack[_Ts]], object],
-        args: tuple[Unpack[_Ts]],
-        msg: object = None,
-        level: int = 1,
-    ) -> None:
-        util.execute(func, args, msg)
-
-    def mkpath(self, name: str, mode: int = 0o777) -> None:
-        dir_util.mkpath(name, mode)
-
-    @overload
-    def copy_file(
-        self,
-        infile: str | os.PathLike[str],
-        outfile: _StrPathT,
-        preserve_mode: bool = True,
-        preserve_times: bool = True,
-        link: str | None = None,
-        level: int = 1,
-    ) -> tuple[_StrPathT | str, bool]: ...
-    @overload
-    def copy_file(
-        self,
-        infile: bytes | os.PathLike[bytes],
-        outfile: _BytesPathT,
-        preserve_mode: bool = True,
-        preserve_times: bool = True,
-        link: str | None = None,
-        level: int = 1,
-    ) -> tuple[_BytesPathT | bytes, bool]: ...
-    def copy_file(
-        self,
-        infile: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-        outfile: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-        preserve_mode: bool = True,
-        preserve_times: bool = True,
-        link: str | None = None,
-        level: int = 1,
-    ) -> tuple[str | os.PathLike[str] | bytes | os.PathLike[bytes], bool]:
-        """Copy a file respecting verbose, dry-run and force flags.  (The
-        former two default to whatever is in the Distribution object, and
-        the latter defaults to false for commands that don't define it.)"""
-        return file_util.copy_file(
-            infile,
-            outfile,
-            preserve_mode,
-            preserve_times,
-            not self.force,
-            link,
-        )
-
-    def copy_tree(
-        self,
-        infile: str | os.PathLike[str],
-        outfile: str,
-        preserve_mode: bool = True,
-        preserve_times: bool = True,
-        preserve_symlinks: bool = False,
-        level: int = 1,
-    ) -> list[str]:
-        """Copy an entire directory tree respecting verbose, dry-run,
-        and force flags.
-        """
-        return dir_util.copy_tree(
-            infile,
-            outfile,
-            preserve_mode,
-            preserve_times,
-            preserve_symlinks,
-            not self.force,
-        )
-
-    @overload
-    def move_file(
-        self, src: str | os.PathLike[str], dst: _StrPathT, level: int = 1
-    ) -> _StrPathT | str: ...
-    @overload
-    def move_file(
-        self, src: bytes | os.PathLike[bytes], dst: _BytesPathT, level: int = 1
-    ) -> _BytesPathT | bytes: ...
-    def move_file(
-        self,
-        src: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-        dst: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-        level: int = 1,
-    ) -> str | os.PathLike[str] | bytes | os.PathLike[bytes]:
-        """Move a file respecting dry-run flag."""
-        return file_util.move_file(src, dst)
-
-    def spawn(
-        self, cmd: MutableSequence[str], search_path: bool = True, level: int = 1
-    ) -> None:
-        """Spawn an external command respecting dry-run flag."""
-        from distutils.spawn import spawn
-
-        spawn(cmd, search_path)
-
-    @overload
-    def make_archive(
-        self,
-        base_name: str,
-        format: str,
-        root_dir: str | os.PathLike[str] | bytes | os.PathLike[bytes] | None = None,
-        base_dir: str | None = None,
-        owner: str | None = None,
-        group: str | None = None,
-    ) -> str: ...
-    @overload
-    def make_archive(
-        self,
-        base_name: str | os.PathLike[str],
-        format: str,
-        root_dir: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-        base_dir: str | None = None,
-        owner: str | None = None,
-        group: str | None = None,
-    ) -> str: ...
-    def make_archive(
-        self,
-        base_name: str | os.PathLike[str],
-        format: str,
-        root_dir: str | os.PathLike[str] | bytes | os.PathLike[bytes] | None = None,
-        base_dir: str | None = None,
-        owner: str | None = None,
-        group: str | None = None,
-    ) -> str:
-        return archive_util.make_archive(
-            base_name,
-            format,
-            root_dir,
-            base_dir,
-            owner=owner,
-            group=group,
-        )
-
-    def make_file(
-        self,
-        infiles: str | list[str] | tuple[str, ...],
-        outfile: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-        func: Callable[[Unpack[_Ts]], object],
-        args: tuple[Unpack[_Ts]],
-        exec_msg: object = None,
-        skip_msg: object = None,
-        level: int = 1,
-    ) -> None:
-        """Special case of 'execute()' for operations that process one or
-        more input files and generate one output file.  Works just like
-        'execute()', except the operation is skipped and a different
-        message printed if 'outfile' already exists and is newer than all
-        files listed in 'infiles'.  If the command defined 'self.force',
-        and it is true, then the command is unconditionally run -- does no
-        timestamp checks.
-        """
-        if skip_msg is None:
-            skip_msg = f"skipping {outfile} (inputs unchanged)"
-
-        # Allow 'infiles' to be a single string
-        if isinstance(infiles, str):
-            infiles = (infiles,)
-        elif not isinstance(infiles, (list, tuple)):
-            raise TypeError("'infiles' must be a string, or a list or tuple of strings")
-
-        if exec_msg is None:
-            exec_msg = "generating {} from {}".format(outfile, ', '.join(infiles))
-
-        # If 'outfile' must be regenerated (either because it doesn't
-        # exist, is out-of-date, or the 'force' flag is true) then
-        # perform the action that presumably regenerates it
-        if self.force or _modified.newer_group(infiles, outfile):
-            self.execute(func, args, exec_msg, level)
-        # Otherwise, print the "skip" message
-        else:
-            log.debug(skip_msg)
diff --git a/voxvera/vendor/setuptools/_distutils/command/__init__.py b/voxvera/vendor/setuptools/_distutils/command/__init__.py
deleted file mode 100644
index 0f8a169..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-"""distutils.command
-
-Package containing implementation of all the standard Distutils
-commands."""
-
-__all__ = [
-    'build',
-    'build_py',
-    'build_ext',
-    'build_clib',
-    'build_scripts',
-    'clean',
-    'install',
-    'install_lib',
-    'install_headers',
-    'install_scripts',
-    'install_data',
-    'sdist',
-    'bdist',
-    'bdist_dumb',
-    'bdist_rpm',
-    'check',
-]
diff --git a/voxvera/vendor/setuptools/_distutils/command/_framework_compat.py b/voxvera/vendor/setuptools/_distutils/command/_framework_compat.py
deleted file mode 100644
index 00d34bc..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/_framework_compat.py
+++ /dev/null
@@ -1,54 +0,0 @@
-"""
-Backward compatibility for homebrew builds on macOS.
-"""
-
-import functools
-import os
-import subprocess
-import sys
-import sysconfig
-
-
-@functools.lru_cache
-def enabled():
-    """
-    Only enabled for Python 3.9 framework homebrew builds
-    except ensurepip and venv.
-    """
-    PY39 = (3, 9) < sys.version_info < (3, 10)
-    framework = sys.platform == 'darwin' and sys._framework
-    homebrew = "Cellar" in sysconfig.get_config_var('projectbase')
-    venv = sys.prefix != sys.base_prefix
-    ensurepip = os.environ.get("ENSUREPIP_OPTIONS")
-    return PY39 and framework and homebrew and not venv and not ensurepip
-
-
-schemes = dict(
-    osx_framework_library=dict(
-        stdlib='{installed_base}/{platlibdir}/python{py_version_short}',
-        platstdlib='{platbase}/{platlibdir}/python{py_version_short}',
-        purelib='{homebrew_prefix}/lib/python{py_version_short}/site-packages',
-        platlib='{homebrew_prefix}/{platlibdir}/python{py_version_short}/site-packages',
-        include='{installed_base}/include/python{py_version_short}{abiflags}',
-        platinclude='{installed_platbase}/include/python{py_version_short}{abiflags}',
-        scripts='{homebrew_prefix}/bin',
-        data='{homebrew_prefix}',
-    )
-)
-
-
-@functools.lru_cache
-def vars():
-    if not enabled():
-        return {}
-    homebrew_prefix = subprocess.check_output(['brew', '--prefix'], text=True).strip()
-    return locals()
-
-
-def scheme(name):
-    """
-    Override the selected scheme for posix_prefix.
-    """
-    if not enabled() or not name.endswith('_prefix'):
-        return name
-    return 'osx_framework_library'
diff --git a/voxvera/vendor/setuptools/_distutils/command/bdist.py b/voxvera/vendor/setuptools/_distutils/command/bdist.py
deleted file mode 100644
index 07811aa..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/bdist.py
+++ /dev/null
@@ -1,167 +0,0 @@
-"""distutils.command.bdist
-
-Implements the Distutils 'bdist' command (create a built [binary]
-distribution)."""
-
-from __future__ import annotations
-
-import os
-import warnings
-from collections.abc import Callable
-from typing import TYPE_CHECKING, ClassVar
-
-from ..core import Command
-from ..errors import DistutilsOptionError, DistutilsPlatformError
-from ..util import get_platform
-
-if TYPE_CHECKING:
-    from typing_extensions import deprecated
-else:
-
-    def deprecated(message):
-        return lambda fn: fn
-
-
-def show_formats():
-    """Print list of available formats (arguments to "--format" option)."""
-    from ..fancy_getopt import FancyGetopt
-
-    formats = [
-        ("formats=" + format, None, bdist.format_commands[format][1])
-        for format in bdist.format_commands
-    ]
-    pretty_printer = FancyGetopt(formats)
-    pretty_printer.print_help("List of available distribution formats:")
-
-
-class ListCompat(dict[str, tuple[str, str]]):
-    # adapter to allow for Setuptools compatibility in format_commands
-    @deprecated("format_commands is now a dict. append is deprecated.")
-    def append(self, item: object) -> None:
-        warnings.warn(
-            "format_commands is now a dict. append is deprecated.",
-            DeprecationWarning,
-            stacklevel=2,
-        )
-
-
-class bdist(Command):
-    description = "create a built (binary) distribution"
-
-    user_options = [
-        ('bdist-base=', 'b', "temporary directory for creating built distributions"),
-        (
-            'plat-name=',
-            'p',
-            "platform name to embed in generated filenames "
-            f"[default: {get_platform()}]",
-        ),
-        ('formats=', None, "formats for distribution (comma-separated list)"),
-        (
-            'dist-dir=',
-            'd',
-            "directory to put final built distributions in [default: dist]",
-        ),
-        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
-        (
-            'owner=',
-            'u',
-            "Owner name used when creating a tar file [default: current user]",
-        ),
-        (
-            'group=',
-            'g',
-            "Group name used when creating a tar file [default: current group]",
-        ),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['skip-build']
-
-    help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [
-        ('help-formats', None, "lists available distribution formats", show_formats),
-    ]
-
-    # The following commands do not take a format option from bdist
-    no_format_option: ClassVar[tuple[str, ...]] = ('bdist_rpm',)
-
-    # This won't do in reality: will need to distinguish RPM-ish Linux,
-    # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS.
-    default_format: ClassVar[dict[str, str]] = {'posix': 'gztar', 'nt': 'zip'}
-
-    # Define commands in preferred order for the --help-formats option
-    format_commands = ListCompat({
-        'rpm': ('bdist_rpm', "RPM distribution"),
-        'gztar': ('bdist_dumb', "gzip'ed tar file"),
-        'bztar': ('bdist_dumb', "bzip2'ed tar file"),
-        'xztar': ('bdist_dumb', "xz'ed tar file"),
-        'ztar': ('bdist_dumb', "compressed tar file"),
-        'tar': ('bdist_dumb', "tar file"),
-        'zip': ('bdist_dumb', "ZIP file"),
-    })
-
-    # for compatibility until consumers only reference format_commands
-    format_command = format_commands
-
-    def initialize_options(self):
-        self.bdist_base = None
-        self.plat_name = None
-        self.formats = None
-        self.dist_dir = None
-        self.skip_build = False
-        self.group = None
-        self.owner = None
-
-    def finalize_options(self) -> None:
-        # have to finalize 'plat_name' before 'bdist_base'
-        if self.plat_name is None:
-            if self.skip_build:
-                self.plat_name = get_platform()
-            else:
-                self.plat_name = self.get_finalized_command('build').plat_name
-
-        # 'bdist_base' -- parent of per-built-distribution-format
-        # temporary directories (eg. we'll probably have
-        # "build/bdist./dumb", "build/bdist./rpm", etc.)
-        if self.bdist_base is None:
-            build_base = self.get_finalized_command('build').build_base
-            self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name)
-
-        self.ensure_string_list('formats')
-        if self.formats is None:
-            try:
-                self.formats = [self.default_format[os.name]]
-            except KeyError:
-                raise DistutilsPlatformError(
-                    "don't know how to create built distributions "
-                    f"on platform {os.name}"
-                )
-
-        if self.dist_dir is None:
-            self.dist_dir = "dist"
-
-    def run(self) -> None:
-        # Figure out which sub-commands we need to run.
-        commands = []
-        for format in self.formats:
-            try:
-                commands.append(self.format_commands[format][0])
-            except KeyError:
-                raise DistutilsOptionError(f"invalid format '{format}'")
-
-        # Reinitialize and run each command.
-        for i in range(len(self.formats)):
-            cmd_name = commands[i]
-            sub_cmd = self.reinitialize_command(cmd_name)
-            if cmd_name not in self.no_format_option:
-                sub_cmd.format = self.formats[i]
-
-            # passing the owner and group names for tar archiving
-            if cmd_name == 'bdist_dumb':
-                sub_cmd.owner = self.owner
-                sub_cmd.group = self.group
-
-            # If we're going to need to run this command again, tell it to
-            # keep its temporary files around so subsequent runs go faster.
-            if cmd_name in commands[i + 1 :]:
-                sub_cmd.keep_temp = True
-            self.run_command(cmd_name)
diff --git a/voxvera/vendor/setuptools/_distutils/command/bdist_dumb.py b/voxvera/vendor/setuptools/_distutils/command/bdist_dumb.py
deleted file mode 100644
index c49ef25..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/bdist_dumb.py
+++ /dev/null
@@ -1,141 +0,0 @@
-"""distutils.command.bdist_dumb
-
-Implements the Distutils 'bdist_dumb' command (create a "dumb" built
-distribution -- i.e., just an archive to be unpacked under $prefix or
-$exec_prefix)."""
-
-import os
-from distutils._log import log
-from typing import ClassVar
-
-from ..core import Command
-from ..dir_util import ensure_relative, remove_tree
-from ..errors import DistutilsPlatformError
-from ..sysconfig import get_python_version
-from ..util import get_platform
-
-
-class bdist_dumb(Command):
-    description = "create a \"dumb\" built distribution"
-
-    user_options = [
-        ('bdist-dir=', 'd', "temporary directory for creating the distribution"),
-        (
-            'plat-name=',
-            'p',
-            "platform name to embed in generated filenames "
-            f"[default: {get_platform()}]",
-        ),
-        (
-            'format=',
-            'f',
-            "archive format to create (tar, gztar, bztar, xztar, ztar, zip)",
-        ),
-        (
-            'keep-temp',
-            'k',
-            "keep the pseudo-installation tree around after creating the distribution archive",
-        ),
-        ('dist-dir=', 'd', "directory to put final built distributions in"),
-        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
-        (
-            'relative',
-            None,
-            "build the archive using relative paths [default: false]",
-        ),
-        (
-            'owner=',
-            'u',
-            "Owner name used when creating a tar file [default: current user]",
-        ),
-        (
-            'group=',
-            'g',
-            "Group name used when creating a tar file [default: current group]",
-        ),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['keep-temp', 'skip-build', 'relative']
-
-    default_format = {'posix': 'gztar', 'nt': 'zip'}
-
-    def initialize_options(self):
-        self.bdist_dir = None
-        self.plat_name = None
-        self.format = None
-        self.keep_temp = False
-        self.dist_dir = None
-        self.skip_build = None
-        self.relative = False
-        self.owner = None
-        self.group = None
-
-    def finalize_options(self):
-        if self.bdist_dir is None:
-            bdist_base = self.get_finalized_command('bdist').bdist_base
-            self.bdist_dir = os.path.join(bdist_base, 'dumb')
-
-        if self.format is None:
-            try:
-                self.format = self.default_format[os.name]
-            except KeyError:
-                raise DistutilsPlatformError(
-                    "don't know how to create dumb built distributions "
-                    f"on platform {os.name}"
-                )
-
-        self.set_undefined_options(
-            'bdist',
-            ('dist_dir', 'dist_dir'),
-            ('plat_name', 'plat_name'),
-            ('skip_build', 'skip_build'),
-        )
-
-    def run(self):
-        if not self.skip_build:
-            self.run_command('build')
-
-        install = self.reinitialize_command('install', reinit_subcommands=True)
-        install.root = self.bdist_dir
-        install.skip_build = self.skip_build
-        install.warn_dir = False
-
-        log.info("installing to %s", self.bdist_dir)
-        self.run_command('install')
-
-        # And make an archive relative to the root of the
-        # pseudo-installation tree.
-        archive_basename = f"{self.distribution.get_fullname()}.{self.plat_name}"
-
-        pseudoinstall_root = os.path.join(self.dist_dir, archive_basename)
-        if not self.relative:
-            archive_root = self.bdist_dir
-        else:
-            if self.distribution.has_ext_modules() and (
-                install.install_base != install.install_platbase
-            ):
-                raise DistutilsPlatformError(
-                    "can't make a dumb built distribution where "
-                    f"base and platbase are different ({install.install_base!r}, {install.install_platbase!r})"
-                )
-            else:
-                archive_root = os.path.join(
-                    self.bdist_dir, ensure_relative(install.install_base)
-                )
-
-        # Make the archive
-        filename = self.make_archive(
-            pseudoinstall_root,
-            self.format,
-            root_dir=archive_root,
-            owner=self.owner,
-            group=self.group,
-        )
-        if self.distribution.has_ext_modules():
-            pyversion = get_python_version()
-        else:
-            pyversion = 'any'
-        self.distribution.dist_files.append(('bdist_dumb', pyversion, filename))
-
-        if not self.keep_temp:
-            remove_tree(self.bdist_dir)
diff --git a/voxvera/vendor/setuptools/_distutils/command/bdist_rpm.py b/voxvera/vendor/setuptools/_distutils/command/bdist_rpm.py
deleted file mode 100644
index dfa5f99..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/bdist_rpm.py
+++ /dev/null
@@ -1,597 +0,0 @@
-"""distutils.command.bdist_rpm
-
-Implements the Distutils 'bdist_rpm' command (create RPM source and binary
-distributions)."""
-
-import os
-import subprocess
-import sys
-from distutils._log import log
-from typing import ClassVar
-
-from ..core import Command
-from ..debug import DEBUG
-from ..errors import (
-    DistutilsExecError,
-    DistutilsFileError,
-    DistutilsOptionError,
-    DistutilsPlatformError,
-)
-from ..file_util import write_file
-from ..sysconfig import get_python_version
-
-
-class bdist_rpm(Command):
-    description = "create an RPM distribution"
-
-    user_options = [
-        ('bdist-base=', None, "base directory for creating built distributions"),
-        (
-            'rpm-base=',
-            None,
-            "base directory for creating RPMs (defaults to \"rpm\" under "
-            "--bdist-base; must be specified for RPM 2)",
-        ),
-        (
-            'dist-dir=',
-            'd',
-            "directory to put final RPM files in (and .spec files if --spec-only)",
-        ),
-        (
-            'python=',
-            None,
-            "path to Python interpreter to hard-code in the .spec file "
-            "[default: \"python\"]",
-        ),
-        (
-            'fix-python',
-            None,
-            "hard-code the exact path to the current Python interpreter in "
-            "the .spec file",
-        ),
-        ('spec-only', None, "only regenerate spec file"),
-        ('source-only', None, "only generate source RPM"),
-        ('binary-only', None, "only generate binary RPM"),
-        ('use-bzip2', None, "use bzip2 instead of gzip to create source distribution"),
-        # More meta-data: too RPM-specific to put in the setup script,
-        # but needs to go in the .spec file -- so we make these options
-        # to "bdist_rpm".  The idea is that packagers would put this
-        # info in setup.cfg, although they are of course free to
-        # supply it on the command line.
-        (
-            'distribution-name=',
-            None,
-            "name of the (Linux) distribution to which this "
-            "RPM applies (*not* the name of the module distribution!)",
-        ),
-        ('group=', None, "package classification [default: \"Development/Libraries\"]"),
-        ('release=', None, "RPM release number"),
-        ('serial=', None, "RPM serial number"),
-        (
-            'vendor=',
-            None,
-            "RPM \"vendor\" (eg. \"Joe Blow \") "
-            "[default: maintainer or author from setup script]",
-        ),
-        (
-            'packager=',
-            None,
-            "RPM packager (eg. \"Jane Doe \") [default: vendor]",
-        ),
-        ('doc-files=', None, "list of documentation files (space or comma-separated)"),
-        ('changelog=', None, "RPM changelog"),
-        ('icon=', None, "name of icon file"),
-        ('provides=', None, "capabilities provided by this package"),
-        ('requires=', None, "capabilities required by this package"),
-        ('conflicts=', None, "capabilities which conflict with this package"),
-        ('build-requires=', None, "capabilities required to build this package"),
-        ('obsoletes=', None, "capabilities made obsolete by this package"),
-        ('no-autoreq', None, "do not automatically calculate dependencies"),
-        # Actions to take when building RPM
-        ('keep-temp', 'k', "don't clean up RPM build directory"),
-        ('no-keep-temp', None, "clean up RPM build directory [default]"),
-        (
-            'use-rpm-opt-flags',
-            None,
-            "compile with RPM_OPT_FLAGS when building from source RPM",
-        ),
-        ('no-rpm-opt-flags', None, "do not pass any RPM CFLAGS to compiler"),
-        ('rpm3-mode', None, "RPM 3 compatibility mode (default)"),
-        ('rpm2-mode', None, "RPM 2 compatibility mode"),
-        # Add the hooks necessary for specifying custom scripts
-        ('prep-script=', None, "Specify a script for the PREP phase of RPM building"),
-        ('build-script=', None, "Specify a script for the BUILD phase of RPM building"),
-        (
-            'pre-install=',
-            None,
-            "Specify a script for the pre-INSTALL phase of RPM building",
-        ),
-        (
-            'install-script=',
-            None,
-            "Specify a script for the INSTALL phase of RPM building",
-        ),
-        (
-            'post-install=',
-            None,
-            "Specify a script for the post-INSTALL phase of RPM building",
-        ),
-        (
-            'pre-uninstall=',
-            None,
-            "Specify a script for the pre-UNINSTALL phase of RPM building",
-        ),
-        (
-            'post-uninstall=',
-            None,
-            "Specify a script for the post-UNINSTALL phase of RPM building",
-        ),
-        ('clean-script=', None, "Specify a script for the CLEAN phase of RPM building"),
-        (
-            'verify-script=',
-            None,
-            "Specify a script for the VERIFY phase of the RPM build",
-        ),
-        # Allow a packager to explicitly force an architecture
-        ('force-arch=', None, "Force an architecture onto the RPM build process"),
-        ('quiet', 'q', "Run the INSTALL phase of RPM building in quiet mode"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = [
-        'keep-temp',
-        'use-rpm-opt-flags',
-        'rpm3-mode',
-        'no-autoreq',
-        'quiet',
-    ]
-
-    negative_opt: ClassVar[dict[str, str]] = {
-        'no-keep-temp': 'keep-temp',
-        'no-rpm-opt-flags': 'use-rpm-opt-flags',
-        'rpm2-mode': 'rpm3-mode',
-    }
-
-    def initialize_options(self):
-        self.bdist_base = None
-        self.rpm_base = None
-        self.dist_dir = None
-        self.python = None
-        self.fix_python = None
-        self.spec_only = None
-        self.binary_only = None
-        self.source_only = None
-        self.use_bzip2 = None
-
-        self.distribution_name = None
-        self.group = None
-        self.release = None
-        self.serial = None
-        self.vendor = None
-        self.packager = None
-        self.doc_files = None
-        self.changelog = None
-        self.icon = None
-
-        self.prep_script = None
-        self.build_script = None
-        self.install_script = None
-        self.clean_script = None
-        self.verify_script = None
-        self.pre_install = None
-        self.post_install = None
-        self.pre_uninstall = None
-        self.post_uninstall = None
-        self.prep = None
-        self.provides = None
-        self.requires = None
-        self.conflicts = None
-        self.build_requires = None
-        self.obsoletes = None
-
-        self.keep_temp = False
-        self.use_rpm_opt_flags = True
-        self.rpm3_mode = True
-        self.no_autoreq = False
-
-        self.force_arch = None
-        self.quiet = False
-
-    def finalize_options(self) -> None:
-        self.set_undefined_options('bdist', ('bdist_base', 'bdist_base'))
-        if self.rpm_base is None:
-            if not self.rpm3_mode:
-                raise DistutilsOptionError("you must specify --rpm-base in RPM 2 mode")
-            self.rpm_base = os.path.join(self.bdist_base, "rpm")
-
-        if self.python is None:
-            if self.fix_python:
-                self.python = sys.executable
-            else:
-                self.python = "python3"
-        elif self.fix_python:
-            raise DistutilsOptionError(
-                "--python and --fix-python are mutually exclusive options"
-            )
-
-        if os.name != 'posix':
-            raise DistutilsPlatformError(
-                f"don't know how to create RPM distributions on platform {os.name}"
-            )
-        if self.binary_only and self.source_only:
-            raise DistutilsOptionError(
-                "cannot supply both '--source-only' and '--binary-only'"
-            )
-
-        # don't pass CFLAGS to pure python distributions
-        if not self.distribution.has_ext_modules():
-            self.use_rpm_opt_flags = False
-
-        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
-        self.finalize_package_data()
-
-    def finalize_package_data(self) -> None:
-        self.ensure_string('group', "Development/Libraries")
-        self.ensure_string(
-            'vendor',
-            f"{self.distribution.get_contact()} <{self.distribution.get_contact_email()}>",
-        )
-        self.ensure_string('packager')
-        self.ensure_string_list('doc_files')
-        if isinstance(self.doc_files, list):
-            for readme in ('README', 'README.txt'):
-                if os.path.exists(readme) and readme not in self.doc_files:
-                    self.doc_files.append(readme)
-
-        self.ensure_string('release', "1")
-        self.ensure_string('serial')  # should it be an int?
-
-        self.ensure_string('distribution_name')
-
-        self.ensure_string('changelog')
-        # Format changelog correctly
-        self.changelog = self._format_changelog(self.changelog)
-
-        self.ensure_filename('icon')
-
-        self.ensure_filename('prep_script')
-        self.ensure_filename('build_script')
-        self.ensure_filename('install_script')
-        self.ensure_filename('clean_script')
-        self.ensure_filename('verify_script')
-        self.ensure_filename('pre_install')
-        self.ensure_filename('post_install')
-        self.ensure_filename('pre_uninstall')
-        self.ensure_filename('post_uninstall')
-
-        # XXX don't forget we punted on summaries and descriptions -- they
-        # should be handled here eventually!
-
-        # Now *this* is some meta-data that belongs in the setup script...
-        self.ensure_string_list('provides')
-        self.ensure_string_list('requires')
-        self.ensure_string_list('conflicts')
-        self.ensure_string_list('build_requires')
-        self.ensure_string_list('obsoletes')
-
-        self.ensure_string('force_arch')
-
-    def run(self) -> None:  # noqa: C901
-        if DEBUG:
-            print("before _get_package_data():")
-            print("vendor =", self.vendor)
-            print("packager =", self.packager)
-            print("doc_files =", self.doc_files)
-            print("changelog =", self.changelog)
-
-        # make directories
-        if self.spec_only:
-            spec_dir = self.dist_dir
-            self.mkpath(spec_dir)
-        else:
-            rpm_dir = {}
-            for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'):
-                rpm_dir[d] = os.path.join(self.rpm_base, d)
-                self.mkpath(rpm_dir[d])
-            spec_dir = rpm_dir['SPECS']
-
-        # Spec file goes into 'dist_dir' if '--spec-only specified',
-        # build/rpm. otherwise.
-        spec_path = os.path.join(spec_dir, f"{self.distribution.get_name()}.spec")
-        self.execute(
-            write_file, (spec_path, self._make_spec_file()), f"writing '{spec_path}'"
-        )
-
-        if self.spec_only:  # stop if requested
-            return
-
-        # Make a source distribution and copy to SOURCES directory with
-        # optional icon.
-        saved_dist_files = self.distribution.dist_files[:]
-        sdist = self.reinitialize_command('sdist')
-        if self.use_bzip2:
-            sdist.formats = ['bztar']
-        else:
-            sdist.formats = ['gztar']
-        self.run_command('sdist')
-        self.distribution.dist_files = saved_dist_files
-
-        source = sdist.get_archive_files()[0]
-        source_dir = rpm_dir['SOURCES']
-        self.copy_file(source, source_dir)
-
-        if self.icon:
-            if os.path.exists(self.icon):
-                self.copy_file(self.icon, source_dir)
-            else:
-                raise DistutilsFileError(f"icon file '{self.icon}' does not exist")
-
-        # build package
-        log.info("building RPMs")
-        rpm_cmd = ['rpmbuild']
-
-        if self.source_only:  # what kind of RPMs?
-            rpm_cmd.append('-bs')
-        elif self.binary_only:
-            rpm_cmd.append('-bb')
-        else:
-            rpm_cmd.append('-ba')
-        rpm_cmd.extend(['--define', f'__python {self.python}'])
-        if self.rpm3_mode:
-            rpm_cmd.extend(['--define', f'_topdir {os.path.abspath(self.rpm_base)}'])
-        if not self.keep_temp:
-            rpm_cmd.append('--clean')
-
-        if self.quiet:
-            rpm_cmd.append('--quiet')
-
-        rpm_cmd.append(spec_path)
-        # Determine the binary rpm names that should be built out of this spec
-        # file
-        # Note that some of these may not be really built (if the file
-        # list is empty)
-        nvr_string = "%{name}-%{version}-%{release}"
-        src_rpm = nvr_string + ".src.rpm"
-        non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm"
-        q_cmd = rf"rpm -q --qf '{src_rpm} {non_src_rpm}\n' --specfile '{spec_path}'"
-
-        out = os.popen(q_cmd)
-        try:
-            binary_rpms = []
-            source_rpm = None
-            while True:
-                line = out.readline()
-                if not line:
-                    break
-                ell = line.strip().split()
-                assert len(ell) == 2
-                binary_rpms.append(ell[1])
-                # The source rpm is named after the first entry in the spec file
-                if source_rpm is None:
-                    source_rpm = ell[0]
-
-            status = out.close()
-            if status:
-                raise DistutilsExecError(f"Failed to execute: {q_cmd!r}")
-
-        finally:
-            out.close()
-
-        self.spawn(rpm_cmd)
-
-        if self.distribution.has_ext_modules():
-            pyversion = get_python_version()
-        else:
-            pyversion = 'any'
-
-        if not self.binary_only:
-            srpm = os.path.join(rpm_dir['SRPMS'], source_rpm)
-            assert os.path.exists(srpm)
-            self.move_file(srpm, self.dist_dir)
-            filename = os.path.join(self.dist_dir, source_rpm)
-            self.distribution.dist_files.append(('bdist_rpm', pyversion, filename))
-
-        if not self.source_only:
-            for rpm in binary_rpms:
-                rpm = os.path.join(rpm_dir['RPMS'], rpm)
-                if os.path.exists(rpm):
-                    self.move_file(rpm, self.dist_dir)
-                    filename = os.path.join(self.dist_dir, os.path.basename(rpm))
-                    self.distribution.dist_files.append((
-                        'bdist_rpm',
-                        pyversion,
-                        filename,
-                    ))
-
-    def _dist_path(self, path):
-        return os.path.join(self.dist_dir, os.path.basename(path))
-
-    def _make_spec_file(self):  # noqa: C901
-        """Generate the text of an RPM spec file and return it as a
-        list of strings (one per line).
-        """
-        # definitions and headers
-        spec_file = [
-            '%define name ' + self.distribution.get_name(),
-            '%define version ' + self.distribution.get_version().replace('-', '_'),
-            '%define unmangled_version ' + self.distribution.get_version(),
-            '%define release ' + self.release.replace('-', '_'),
-            '',
-            'Summary: ' + (self.distribution.get_description() or "UNKNOWN"),
-        ]
-
-        # Workaround for #14443 which affects some RPM based systems such as
-        # RHEL6 (and probably derivatives)
-        vendor_hook = subprocess.getoutput('rpm --eval %{__os_install_post}')
-        # Generate a potential replacement value for __os_install_post (whilst
-        # normalizing the whitespace to simplify the test for whether the
-        # invocation of brp-python-bytecompile passes in __python):
-        vendor_hook = '\n'.join([
-            f'  {line.strip()} \\' for line in vendor_hook.splitlines()
-        ])
-        problem = "brp-python-bytecompile \\\n"
-        fixed = "brp-python-bytecompile %{__python} \\\n"
-        fixed_hook = vendor_hook.replace(problem, fixed)
-        if fixed_hook != vendor_hook:
-            spec_file.append('# Workaround for https://bugs.python.org/issue14443')
-            spec_file.append('%define __os_install_post ' + fixed_hook + '\n')
-
-        # put locale summaries into spec file
-        # XXX not supported for now (hard to put a dictionary
-        # in a config file -- arg!)
-        # for locale in self.summaries.keys():
-        #    spec_file.append('Summary(%s): %s' % (locale,
-        #                                          self.summaries[locale]))
-
-        spec_file.extend([
-            'Name: %{name}',
-            'Version: %{version}',
-            'Release: %{release}',
-        ])
-
-        # XXX yuck! this filename is available from the "sdist" command,
-        # but only after it has run: and we create the spec file before
-        # running "sdist", in case of --spec-only.
-        if self.use_bzip2:
-            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2')
-        else:
-            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz')
-
-        spec_file.extend([
-            'License: ' + (self.distribution.get_license() or "UNKNOWN"),
-            'Group: ' + self.group,
-            'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot',
-            'Prefix: %{_prefix}',
-        ])
-
-        if not self.force_arch:
-            # noarch if no extension modules
-            if not self.distribution.has_ext_modules():
-                spec_file.append('BuildArch: noarch')
-        else:
-            spec_file.append(f'BuildArch: {self.force_arch}')
-
-        for field in (
-            'Vendor',
-            'Packager',
-            'Provides',
-            'Requires',
-            'Conflicts',
-            'Obsoletes',
-        ):
-            val = getattr(self, field.lower())
-            if isinstance(val, list):
-                spec_file.append('{}: {}'.format(field, ' '.join(val)))
-            elif val is not None:
-                spec_file.append(f'{field}: {val}')
-
-        if self.distribution.get_url():
-            spec_file.append('Url: ' + self.distribution.get_url())
-
-        if self.distribution_name:
-            spec_file.append('Distribution: ' + self.distribution_name)
-
-        if self.build_requires:
-            spec_file.append('BuildRequires: ' + ' '.join(self.build_requires))
-
-        if self.icon:
-            spec_file.append('Icon: ' + os.path.basename(self.icon))
-
-        if self.no_autoreq:
-            spec_file.append('AutoReq: 0')
-
-        spec_file.extend([
-            '',
-            '%description',
-            self.distribution.get_long_description() or "",
-        ])
-
-        # put locale descriptions into spec file
-        # XXX again, suppressed because config file syntax doesn't
-        # easily support this ;-(
-        # for locale in self.descriptions.keys():
-        #    spec_file.extend([
-        #        '',
-        #        '%description -l ' + locale,
-        #        self.descriptions[locale],
-        #        ])
-
-        # rpm scripts
-        # figure out default build script
-        def_setup_call = f"{self.python} {os.path.basename(sys.argv[0])}"
-        def_build = f"{def_setup_call} build"
-        if self.use_rpm_opt_flags:
-            def_build = 'env CFLAGS="$RPM_OPT_FLAGS" ' + def_build
-
-        # insert contents of files
-
-        # XXX this is kind of misleading: user-supplied options are files
-        # that we open and interpolate into the spec file, but the defaults
-        # are just text that we drop in as-is.  Hmmm.
-
-        install_cmd = f'{def_setup_call} install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES'
-
-        script_options = [
-            ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"),
-            ('build', 'build_script', def_build),
-            ('install', 'install_script', install_cmd),
-            ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"),
-            ('verifyscript', 'verify_script', None),
-            ('pre', 'pre_install', None),
-            ('post', 'post_install', None),
-            ('preun', 'pre_uninstall', None),
-            ('postun', 'post_uninstall', None),
-        ]
-
-        for rpm_opt, attr, default in script_options:
-            # Insert contents of file referred to, if no file is referred to
-            # use 'default' as contents of script
-            val = getattr(self, attr)
-            if val or default:
-                spec_file.extend([
-                    '',
-                    '%' + rpm_opt,
-                ])
-                if val:
-                    with open(val) as f:
-                        spec_file.extend(f.read().split('\n'))
-                else:
-                    spec_file.append(default)
-
-        # files section
-        spec_file.extend([
-            '',
-            '%files -f INSTALLED_FILES',
-            '%defattr(-,root,root)',
-        ])
-
-        if self.doc_files:
-            spec_file.append('%doc ' + ' '.join(self.doc_files))
-
-        if self.changelog:
-            spec_file.extend([
-                '',
-                '%changelog',
-            ])
-            spec_file.extend(self.changelog)
-
-        return spec_file
-
-    def _format_changelog(self, changelog):
-        """Format the changelog correctly and convert it to a list of strings"""
-        if not changelog:
-            return changelog
-        new_changelog = []
-        for line in changelog.strip().split('\n'):
-            line = line.strip()
-            if line[0] == '*':
-                new_changelog.extend(['', line])
-            elif line[0] == '-':
-                new_changelog.append(line)
-            else:
-                new_changelog.append('  ' + line)
-
-        # strip trailing newline inserted by first changelog entry
-        if not new_changelog[0]:
-            del new_changelog[0]
-
-        return new_changelog
diff --git a/voxvera/vendor/setuptools/_distutils/command/build.py b/voxvera/vendor/setuptools/_distutils/command/build.py
deleted file mode 100644
index 6a8303a..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/build.py
+++ /dev/null
@@ -1,156 +0,0 @@
-"""distutils.command.build
-
-Implements the Distutils 'build' command."""
-
-from __future__ import annotations
-
-import os
-import sys
-import sysconfig
-from collections.abc import Callable
-from typing import ClassVar
-
-from ..ccompiler import show_compilers
-from ..core import Command
-from ..errors import DistutilsOptionError
-from ..util import get_platform
-
-
-class build(Command):
-    description = "build everything needed to install"
-
-    user_options = [
-        ('build-base=', 'b', "base directory for build library"),
-        ('build-purelib=', None, "build directory for platform-neutral distributions"),
-        ('build-platlib=', None, "build directory for platform-specific distributions"),
-        (
-            'build-lib=',
-            None,
-            "build directory for all distribution (defaults to either build-purelib or build-platlib",
-        ),
-        ('build-scripts=', None, "build directory for scripts"),
-        ('build-temp=', 't', "temporary build directory"),
-        (
-            'plat-name=',
-            'p',
-            f"platform name to build for, if supported [default: {get_platform()}]",
-        ),
-        ('compiler=', 'c', "specify the compiler type"),
-        ('parallel=', 'j', "number of parallel build jobs"),
-        ('debug', 'g', "compile extensions and libraries with debugging information"),
-        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
-        ('executable=', 'e', "specify final destination interpreter path (build.py)"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['debug', 'force']
-
-    help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [
-        ('help-compiler', None, "list available compilers", show_compilers),
-    ]
-
-    def initialize_options(self):
-        self.build_base = 'build'
-        # these are decided only after 'build_base' has its final value
-        # (unless overridden by the user or client)
-        self.build_purelib = None
-        self.build_platlib = None
-        self.build_lib = None
-        self.build_temp = None
-        self.build_scripts = None
-        self.compiler = None
-        self.plat_name = None
-        self.debug = None
-        self.force = False
-        self.executable = None
-        self.parallel = None
-
-    def finalize_options(self) -> None:  # noqa: C901
-        if self.plat_name is None:
-            self.plat_name = get_platform()
-        else:
-            # plat-name only supported for windows (other platforms are
-            # supported via ./configure flags, if at all).  Avoid misleading
-            # other platforms.
-            if os.name != 'nt':
-                raise DistutilsOptionError(
-                    "--plat-name only supported on Windows (try "
-                    "using './configure --help' on your platform)"
-                )
-
-        plat_specifier = f".{self.plat_name}-{sys.implementation.cache_tag}"
-
-        # Python 3.13+ with --disable-gil shouldn't share build directories
-        if sysconfig.get_config_var('Py_GIL_DISABLED'):
-            plat_specifier += 't'
-
-        # Make it so Python 2.x and Python 2.x with --with-pydebug don't
-        # share the same build directories. Doing so confuses the build
-        # process for C modules
-        if hasattr(sys, 'gettotalrefcount'):
-            plat_specifier += '-pydebug'
-
-        # 'build_purelib' and 'build_platlib' just default to 'lib' and
-        # 'lib.' under the base build directory.  We only use one of
-        # them for a given distribution, though --
-        if self.build_purelib is None:
-            self.build_purelib = os.path.join(self.build_base, 'lib')
-        if self.build_platlib is None:
-            self.build_platlib = os.path.join(self.build_base, 'lib' + plat_specifier)
-
-        # 'build_lib' is the actual directory that we will use for this
-        # particular module distribution -- if user didn't supply it, pick
-        # one of 'build_purelib' or 'build_platlib'.
-        if self.build_lib is None:
-            if self.distribution.has_ext_modules():
-                self.build_lib = self.build_platlib
-            else:
-                self.build_lib = self.build_purelib
-
-        # 'build_temp' -- temporary directory for compiler turds,
-        # "build/temp."
-        if self.build_temp is None:
-            self.build_temp = os.path.join(self.build_base, 'temp' + plat_specifier)
-        if self.build_scripts is None:
-            self.build_scripts = os.path.join(
-                self.build_base,
-                f'scripts-{sys.version_info.major}.{sys.version_info.minor}',
-            )
-
-        if self.executable is None and sys.executable:
-            self.executable = os.path.normpath(sys.executable)
-
-        if isinstance(self.parallel, str):
-            try:
-                self.parallel = int(self.parallel)
-            except ValueError:
-                raise DistutilsOptionError("parallel should be an integer")
-
-    def run(self) -> None:
-        # Run all relevant sub-commands.  This will be some subset of:
-        #  - build_py      - pure Python modules
-        #  - build_clib    - standalone C libraries
-        #  - build_ext     - Python extensions
-        #  - build_scripts - (Python) scripts
-        for cmd_name in self.get_sub_commands():
-            self.run_command(cmd_name)
-
-    # -- Predicates for the sub-command list ---------------------------
-
-    def has_pure_modules(self):
-        return self.distribution.has_pure_modules()
-
-    def has_c_libraries(self):
-        return self.distribution.has_c_libraries()
-
-    def has_ext_modules(self):
-        return self.distribution.has_ext_modules()
-
-    def has_scripts(self):
-        return self.distribution.has_scripts()
-
-    sub_commands = [
-        ('build_py', has_pure_modules),
-        ('build_clib', has_c_libraries),
-        ('build_ext', has_ext_modules),
-        ('build_scripts', has_scripts),
-    ]
diff --git a/voxvera/vendor/setuptools/_distutils/command/build_clib.py b/voxvera/vendor/setuptools/_distutils/command/build_clib.py
deleted file mode 100644
index 8de5df2..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/build_clib.py
+++ /dev/null
@@ -1,199 +0,0 @@
-"""distutils.command.build_clib
-
-Implements the Distutils 'build_clib' command, to build a C/C++ library
-that is included in the module distribution and needed by an extension
-module."""
-
-# XXX this module has *lots* of code ripped-off quite transparently from
-# build_ext.py -- not surprisingly really, as the work required to build
-# a static library from a collection of C source files is not really all
-# that different from what's required to build a shared object file from
-# a collection of C source files.  Nevertheless, I haven't done the
-# necessary refactoring to account for the overlap in code between the
-# two modules, mainly because a number of subtle details changed in the
-# cut 'n paste.  Sigh.
-from __future__ import annotations
-
-import os
-from collections.abc import Callable
-from distutils._log import log
-from typing import ClassVar
-
-from ..ccompiler import new_compiler, show_compilers
-from ..core import Command
-from ..errors import DistutilsSetupError
-from ..sysconfig import customize_compiler
-
-
-class build_clib(Command):
-    description = "build C/C++ libraries used by Python extensions"
-
-    user_options: ClassVar[list[tuple[str, str, str]]] = [
-        ('build-clib=', 'b', "directory to build C/C++ libraries to"),
-        ('build-temp=', 't', "directory to put temporary build by-products"),
-        ('debug', 'g', "compile with debugging information"),
-        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
-        ('compiler=', 'c', "specify the compiler type"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['debug', 'force']
-
-    help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [
-        ('help-compiler', None, "list available compilers", show_compilers),
-    ]
-
-    def initialize_options(self):
-        self.build_clib = None
-        self.build_temp = None
-
-        # List of libraries to build
-        self.libraries = None
-
-        # Compilation options for all libraries
-        self.include_dirs = None
-        self.define = None
-        self.undef = None
-        self.debug = None
-        self.force = False
-        self.compiler = None
-
-    def finalize_options(self) -> None:
-        # This might be confusing: both build-clib and build-temp default
-        # to build-temp as defined by the "build" command.  This is because
-        # I think that C libraries are really just temporary build
-        # by-products, at least from the point of view of building Python
-        # extensions -- but I want to keep my options open.
-        self.set_undefined_options(
-            'build',
-            ('build_temp', 'build_clib'),
-            ('build_temp', 'build_temp'),
-            ('compiler', 'compiler'),
-            ('debug', 'debug'),
-            ('force', 'force'),
-        )
-
-        self.libraries = self.distribution.libraries
-        if self.libraries:
-            self.check_library_list(self.libraries)
-
-        if self.include_dirs is None:
-            self.include_dirs = self.distribution.include_dirs or []
-        if isinstance(self.include_dirs, str):
-            self.include_dirs = self.include_dirs.split(os.pathsep)
-
-        # XXX same as for build_ext -- what about 'self.define' and
-        # 'self.undef' ?
-
-    def run(self) -> None:
-        if not self.libraries:
-            return
-
-        self.compiler = new_compiler(compiler=self.compiler, force=self.force)
-        customize_compiler(self.compiler)
-
-        if self.include_dirs is not None:
-            self.compiler.set_include_dirs(self.include_dirs)
-        if self.define is not None:
-            # 'define' option is a list of (name,value) tuples
-            for name, value in self.define:
-                self.compiler.define_macro(name, value)
-        if self.undef is not None:
-            for macro in self.undef:
-                self.compiler.undefine_macro(macro)
-
-        self.build_libraries(self.libraries)
-
-    def check_library_list(self, libraries) -> None:
-        """Ensure that the list of libraries is valid.
-
-        `library` is presumably provided as a command option 'libraries'.
-        This method checks that it is a list of 2-tuples, where the tuples
-        are (library_name, build_info_dict).
-
-        Raise DistutilsSetupError if the structure is invalid anywhere;
-        just returns otherwise.
-        """
-        if not isinstance(libraries, list):
-            raise DistutilsSetupError("'libraries' option must be a list of tuples")
-
-        for lib in libraries:
-            if not isinstance(lib, tuple) and len(lib) != 2:
-                raise DistutilsSetupError("each element of 'libraries' must a 2-tuple")
-
-            name, build_info = lib
-
-            if not isinstance(name, str):
-                raise DistutilsSetupError(
-                    "first element of each tuple in 'libraries' "
-                    "must be a string (the library name)"
-                )
-
-            if '/' in name or (os.sep != '/' and os.sep in name):
-                raise DistutilsSetupError(
-                    f"bad library name '{lib[0]}': may not contain directory separators"
-                )
-
-            if not isinstance(build_info, dict):
-                raise DistutilsSetupError(
-                    "second element of each tuple in 'libraries' "
-                    "must be a dictionary (build info)"
-                )
-
-    def get_library_names(self):
-        # Assume the library list is valid -- 'check_library_list()' is
-        # called from 'finalize_options()', so it should be!
-        if not self.libraries:
-            return None
-
-        lib_names = []
-        for lib_name, _build_info in self.libraries:
-            lib_names.append(lib_name)
-        return lib_names
-
-    def get_source_files(self):
-        self.check_library_list(self.libraries)
-        filenames = []
-        for lib_name, build_info in self.libraries:
-            sources = build_info.get('sources')
-            if sources is None or not isinstance(sources, (list, tuple)):
-                raise DistutilsSetupError(
-                    f"in 'libraries' option (library '{lib_name}'), "
-                    "'sources' must be present and must be "
-                    "a list of source filenames"
-                )
-
-            filenames.extend(sources)
-        return filenames
-
-    def build_libraries(self, libraries) -> None:
-        for lib_name, build_info in libraries:
-            sources = build_info.get('sources')
-            if sources is None or not isinstance(sources, (list, tuple)):
-                raise DistutilsSetupError(
-                    f"in 'libraries' option (library '{lib_name}'), "
-                    "'sources' must be present and must be "
-                    "a list of source filenames"
-                )
-            sources = list(sources)
-
-            log.info("building '%s' library", lib_name)
-
-            # First, compile the source code to object files in the library
-            # directory.  (This should probably change to putting object
-            # files in a temporary build directory.)
-            macros = build_info.get('macros')
-            include_dirs = build_info.get('include_dirs')
-            objects = self.compiler.compile(
-                sources,
-                output_dir=self.build_temp,
-                macros=macros,
-                include_dirs=include_dirs,
-                debug=self.debug,
-            )
-
-            # Now "link" the object files together into a static library.
-            # (On Unix at least, this isn't really linking -- it just
-            # builds an archive.  Whatever.)
-            self.compiler.create_static_lib(
-                objects, lib_name, output_dir=self.build_clib, debug=self.debug
-            )
diff --git a/voxvera/vendor/setuptools/_distutils/command/build_ext.py b/voxvera/vendor/setuptools/_distutils/command/build_ext.py
deleted file mode 100644
index df623d7..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/build_ext.py
+++ /dev/null
@@ -1,811 +0,0 @@
-"""distutils.command.build_ext
-
-Implements the Distutils 'build_ext' command, for building extension
-modules (currently limited to C extensions, should accommodate C++
-extensions ASAP)."""
-
-from __future__ import annotations
-
-import contextlib
-import os
-import re
-import sys
-from collections.abc import Callable
-from distutils._log import log
-from site import USER_BASE
-from typing import ClassVar
-
-from .._modified import newer_group
-from ..ccompiler import new_compiler, show_compilers
-from ..core import Command
-from ..errors import (
-    CCompilerError,
-    CompileError,
-    DistutilsError,
-    DistutilsOptionError,
-    DistutilsPlatformError,
-    DistutilsSetupError,
-)
-from ..extension import Extension
-from ..sysconfig import customize_compiler, get_config_h_filename, get_python_version
-from ..util import get_platform, is_freethreaded, is_mingw
-
-# An extension name is just a dot-separated list of Python NAMEs (ie.
-# the same as a fully-qualified module name).
-extension_name_re = re.compile(r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$')
-
-
-class build_ext(Command):
-    description = "build C/C++ extensions (compile/link to build directory)"
-
-    # XXX thoughts on how to deal with complex command-line options like
-    # these, i.e. how to make it so fancy_getopt can suck them off the
-    # command line and make it look like setup.py defined the appropriate
-    # lists of tuples of what-have-you.
-    #   - each command needs a callback to process its command-line options
-    #   - Command.__init__() needs access to its share of the whole
-    #     command line (must ultimately come from
-    #     Distribution.parse_command_line())
-    #   - it then calls the current command class' option-parsing
-    #     callback to deal with weird options like -D, which have to
-    #     parse the option text and churn out some custom data
-    #     structure
-    #   - that data structure (in this case, a list of 2-tuples)
-    #     will then be present in the command object by the time
-    #     we get to finalize_options() (i.e. the constructor
-    #     takes care of both command-line and client options
-    #     in between initialize_options() and finalize_options())
-
-    sep_by = f" (separated by '{os.pathsep}')"
-    user_options = [
-        ('build-lib=', 'b', "directory for compiled extension modules"),
-        ('build-temp=', 't', "directory for temporary files (build by-products)"),
-        (
-            'plat-name=',
-            'p',
-            "platform name to cross-compile for, if supported "
-            f"[default: {get_platform()}]",
-        ),
-        (
-            'inplace',
-            'i',
-            "ignore build-lib and put compiled extensions into the source "
-            "directory alongside your pure Python modules",
-        ),
-        (
-            'include-dirs=',
-            'I',
-            "list of directories to search for header files" + sep_by,
-        ),
-        ('define=', 'D', "C preprocessor macros to define"),
-        ('undef=', 'U', "C preprocessor macros to undefine"),
-        ('libraries=', 'l', "external C libraries to link with"),
-        (
-            'library-dirs=',
-            'L',
-            "directories to search for external C libraries" + sep_by,
-        ),
-        ('rpath=', 'R', "directories to search for shared C libraries at runtime"),
-        ('link-objects=', 'O', "extra explicit link objects to include in the link"),
-        ('debug', 'g', "compile/link with debugging information"),
-        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
-        ('compiler=', 'c', "specify the compiler type"),
-        ('parallel=', 'j', "number of parallel build jobs"),
-        ('swig-cpp', None, "make SWIG create C++ files (default is C)"),
-        ('swig-opts=', None, "list of SWIG command line options"),
-        ('swig=', None, "path to the SWIG executable"),
-        ('user', None, "add user include, library and rpath"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = [
-        'inplace',
-        'debug',
-        'force',
-        'swig-cpp',
-        'user',
-    ]
-
-    help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [
-        ('help-compiler', None, "list available compilers", show_compilers),
-    ]
-
-    def initialize_options(self):
-        self.extensions = None
-        self.build_lib = None
-        self.plat_name = None
-        self.build_temp = None
-        self.inplace = False
-        self.package = None
-
-        self.include_dirs = None
-        self.define = None
-        self.undef = None
-        self.libraries = None
-        self.library_dirs = None
-        self.rpath = None
-        self.link_objects = None
-        self.debug = None
-        self.force = None
-        self.compiler = None
-        self.swig = None
-        self.swig_cpp = None
-        self.swig_opts = None
-        self.user = None
-        self.parallel = None
-
-    @staticmethod
-    def _python_lib_dir(sysconfig):
-        """
-        Resolve Python's library directory for building extensions
-        that rely on a shared Python library.
-
-        See python/cpython#44264 and python/cpython#48686
-        """
-        if not sysconfig.get_config_var('Py_ENABLE_SHARED'):
-            return
-
-        if sysconfig.python_build:
-            yield '.'
-            return
-
-        if sys.platform == 'zos':
-            # On z/OS, a user is not required to install Python to
-            # a predetermined path, but can use Python portably
-            installed_dir = sysconfig.get_config_var('base')
-            lib_dir = sysconfig.get_config_var('platlibdir')
-            yield os.path.join(installed_dir, lib_dir)
-        else:
-            # building third party extensions
-            yield sysconfig.get_config_var('LIBDIR')
-
-    def finalize_options(self) -> None:  # noqa: C901
-        from distutils import sysconfig
-
-        self.set_undefined_options(
-            'build',
-            ('build_lib', 'build_lib'),
-            ('build_temp', 'build_temp'),
-            ('compiler', 'compiler'),
-            ('debug', 'debug'),
-            ('force', 'force'),
-            ('parallel', 'parallel'),
-            ('plat_name', 'plat_name'),
-        )
-
-        if self.package is None:
-            self.package = self.distribution.ext_package
-
-        self.extensions = self.distribution.ext_modules
-
-        # Make sure Python's include directories (for Python.h, pyconfig.h,
-        # etc.) are in the include search path.
-        py_include = sysconfig.get_python_inc()
-        plat_py_include = sysconfig.get_python_inc(plat_specific=True)
-        if self.include_dirs is None:
-            self.include_dirs = self.distribution.include_dirs or []
-        if isinstance(self.include_dirs, str):
-            self.include_dirs = self.include_dirs.split(os.pathsep)
-
-        # If in a virtualenv, add its include directory
-        # Issue 16116
-        if sys.exec_prefix != sys.base_exec_prefix:
-            self.include_dirs.append(os.path.join(sys.exec_prefix, 'include'))
-
-        # Put the Python "system" include dir at the end, so that
-        # any local include dirs take precedence.
-        self.include_dirs.extend(py_include.split(os.path.pathsep))
-        if plat_py_include != py_include:
-            self.include_dirs.extend(plat_py_include.split(os.path.pathsep))
-
-        self.ensure_string_list('libraries')
-        self.ensure_string_list('link_objects')
-
-        # Life is easier if we're not forever checking for None, so
-        # simplify these options to empty lists if unset
-        if self.libraries is None:
-            self.libraries = []
-        if self.library_dirs is None:
-            self.library_dirs = []
-        elif isinstance(self.library_dirs, str):
-            self.library_dirs = self.library_dirs.split(os.pathsep)
-
-        if self.rpath is None:
-            self.rpath = []
-        elif isinstance(self.rpath, str):
-            self.rpath = self.rpath.split(os.pathsep)
-
-        # for extensions under windows use different directories
-        # for Release and Debug builds.
-        # also Python's library directory must be appended to library_dirs
-        if os.name == 'nt' and not is_mingw():
-            # the 'libs' directory is for binary installs - we assume that
-            # must be the *native* platform.  But we don't really support
-            # cross-compiling via a binary install anyway, so we let it go.
-            self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs'))
-            if sys.base_exec_prefix != sys.prefix:  # Issue 16116
-                self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs'))
-            if self.debug:
-                self.build_temp = os.path.join(self.build_temp, "Debug")
-            else:
-                self.build_temp = os.path.join(self.build_temp, "Release")
-
-            # Append the source distribution include and library directories,
-            # this allows distutils on windows to work in the source tree
-            self.include_dirs.append(os.path.dirname(get_config_h_filename()))
-            self.library_dirs.append(sys.base_exec_prefix)
-
-            # Use the .lib files for the correct architecture
-            if self.plat_name == 'win32':
-                suffix = 'win32'
-            else:
-                # win-amd64
-                suffix = self.plat_name[4:]
-            new_lib = os.path.join(sys.exec_prefix, 'PCbuild')
-            if suffix:
-                new_lib = os.path.join(new_lib, suffix)
-            self.library_dirs.append(new_lib)
-
-        # For extensions under Cygwin, Python's library directory must be
-        # appended to library_dirs
-        if sys.platform[:6] == 'cygwin':
-            if not sysconfig.python_build:
-                # building third party extensions
-                self.library_dirs.append(
-                    os.path.join(
-                        sys.prefix, "lib", "python" + get_python_version(), "config"
-                    )
-                )
-            else:
-                # building python standard extensions
-                self.library_dirs.append('.')
-
-        self.library_dirs.extend(self._python_lib_dir(sysconfig))
-
-        # The argument parsing will result in self.define being a string, but
-        # it has to be a list of 2-tuples.  All the preprocessor symbols
-        # specified by the 'define' option will be set to '1'.  Multiple
-        # symbols can be separated with commas.
-
-        if self.define:
-            defines = self.define.split(',')
-            self.define = [(symbol, '1') for symbol in defines]
-
-        # The option for macros to undefine is also a string from the
-        # option parsing, but has to be a list.  Multiple symbols can also
-        # be separated with commas here.
-        if self.undef:
-            self.undef = self.undef.split(',')
-
-        if self.swig_opts is None:
-            self.swig_opts = []
-        else:
-            self.swig_opts = self.swig_opts.split(' ')
-
-        # Finally add the user include and library directories if requested
-        if self.user:
-            user_include = os.path.join(USER_BASE, "include")
-            user_lib = os.path.join(USER_BASE, "lib")
-            if os.path.isdir(user_include):
-                self.include_dirs.append(user_include)
-            if os.path.isdir(user_lib):
-                self.library_dirs.append(user_lib)
-                self.rpath.append(user_lib)
-
-        if isinstance(self.parallel, str):
-            try:
-                self.parallel = int(self.parallel)
-            except ValueError:
-                raise DistutilsOptionError("parallel should be an integer")
-
-    def run(self) -> None:  # noqa: C901
-        # 'self.extensions', as supplied by setup.py, is a list of
-        # Extension instances.  See the documentation for Extension (in
-        # distutils.extension) for details.
-        #
-        # For backwards compatibility with Distutils 0.8.2 and earlier, we
-        # also allow the 'extensions' list to be a list of tuples:
-        #    (ext_name, build_info)
-        # where build_info is a dictionary containing everything that
-        # Extension instances do except the name, with a few things being
-        # differently named.  We convert these 2-tuples to Extension
-        # instances as needed.
-
-        if not self.extensions:
-            return
-
-        # If we were asked to build any C/C++ libraries, make sure that the
-        # directory where we put them is in the library search path for
-        # linking extensions.
-        if self.distribution.has_c_libraries():
-            build_clib = self.get_finalized_command('build_clib')
-            self.libraries.extend(build_clib.get_library_names() or [])
-            self.library_dirs.append(build_clib.build_clib)
-
-        # Setup the CCompiler object that we'll use to do all the
-        # compiling and linking
-        self.compiler = new_compiler(
-            compiler=self.compiler,
-            verbose=self.verbose,
-            force=self.force,
-        )
-        customize_compiler(self.compiler)
-        # If we are cross-compiling, init the compiler now (if we are not
-        # cross-compiling, init would not hurt, but people may rely on
-        # late initialization of compiler even if they shouldn't...)
-        if os.name == 'nt' and self.plat_name != get_platform():
-            self.compiler.initialize(self.plat_name)
-
-        # The official Windows free threaded Python installer doesn't set
-        # Py_GIL_DISABLED because its pyconfig.h is shared with the
-        # default build, so define it here (pypa/setuptools#4662).
-        if os.name == 'nt' and is_freethreaded():
-            self.compiler.define_macro('Py_GIL_DISABLED', '1')
-
-        # And make sure that any compile/link-related options (which might
-        # come from the command-line or from the setup script) are set in
-        # that CCompiler object -- that way, they automatically apply to
-        # all compiling and linking done here.
-        if self.include_dirs is not None:
-            self.compiler.set_include_dirs(self.include_dirs)
-        if self.define is not None:
-            # 'define' option is a list of (name,value) tuples
-            for name, value in self.define:
-                self.compiler.define_macro(name, value)
-        if self.undef is not None:
-            for macro in self.undef:
-                self.compiler.undefine_macro(macro)
-        if self.libraries is not None:
-            self.compiler.set_libraries(self.libraries)
-        if self.library_dirs is not None:
-            self.compiler.set_library_dirs(self.library_dirs)
-        if self.rpath is not None:
-            self.compiler.set_runtime_library_dirs(self.rpath)
-        if self.link_objects is not None:
-            self.compiler.set_link_objects(self.link_objects)
-
-        # Now actually compile and link everything.
-        self.build_extensions()
-
-    def check_extensions_list(self, extensions) -> None:  # noqa: C901
-        """Ensure that the list of extensions (presumably provided as a
-        command option 'extensions') is valid, i.e. it is a list of
-        Extension objects.  We also support the old-style list of 2-tuples,
-        where the tuples are (ext_name, build_info), which are converted to
-        Extension instances here.
-
-        Raise DistutilsSetupError if the structure is invalid anywhere;
-        just returns otherwise.
-        """
-        if not isinstance(extensions, list):
-            raise DistutilsSetupError(
-                "'ext_modules' option must be a list of Extension instances"
-            )
-
-        for i, ext in enumerate(extensions):
-            if isinstance(ext, Extension):
-                continue  # OK! (assume type-checking done
-                # by Extension constructor)
-
-            if not isinstance(ext, tuple) or len(ext) != 2:
-                raise DistutilsSetupError(
-                    "each element of 'ext_modules' option must be an "
-                    "Extension instance or 2-tuple"
-                )
-
-            ext_name, build_info = ext
-
-            log.warning(
-                "old-style (ext_name, build_info) tuple found in "
-                "ext_modules for extension '%s' "
-                "-- please convert to Extension instance",
-                ext_name,
-            )
-
-            if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)):
-                raise DistutilsSetupError(
-                    "first element of each tuple in 'ext_modules' "
-                    "must be the extension name (a string)"
-                )
-
-            if not isinstance(build_info, dict):
-                raise DistutilsSetupError(
-                    "second element of each tuple in 'ext_modules' "
-                    "must be a dictionary (build info)"
-                )
-
-            # OK, the (ext_name, build_info) dict is type-safe: convert it
-            # to an Extension instance.
-            ext = Extension(ext_name, build_info['sources'])
-
-            # Easy stuff: one-to-one mapping from dict elements to
-            # instance attributes.
-            for key in (
-                'include_dirs',
-                'library_dirs',
-                'libraries',
-                'extra_objects',
-                'extra_compile_args',
-                'extra_link_args',
-            ):
-                val = build_info.get(key)
-                if val is not None:
-                    setattr(ext, key, val)
-
-            # Medium-easy stuff: same syntax/semantics, different names.
-            ext.runtime_library_dirs = build_info.get('rpath')
-            if 'def_file' in build_info:
-                log.warning("'def_file' element of build info dict no longer supported")
-
-            # Non-trivial stuff: 'macros' split into 'define_macros'
-            # and 'undef_macros'.
-            macros = build_info.get('macros')
-            if macros:
-                ext.define_macros = []
-                ext.undef_macros = []
-                for macro in macros:
-                    if not (isinstance(macro, tuple) and len(macro) in (1, 2)):
-                        raise DistutilsSetupError(
-                            "'macros' element of build info dict must be 1- or 2-tuple"
-                        )
-                    if len(macro) == 1:
-                        ext.undef_macros.append(macro[0])
-                    elif len(macro) == 2:
-                        ext.define_macros.append(macro)
-
-            extensions[i] = ext
-
-    def get_source_files(self):
-        self.check_extensions_list(self.extensions)
-        filenames = []
-
-        # Wouldn't it be neat if we knew the names of header files too...
-        for ext in self.extensions:
-            filenames.extend(ext.sources)
-        return filenames
-
-    def get_outputs(self):
-        # Sanity check the 'extensions' list -- can't assume this is being
-        # done in the same run as a 'build_extensions()' call (in fact, we
-        # can probably assume that it *isn't*!).
-        self.check_extensions_list(self.extensions)
-
-        # And build the list of output (built) filenames.  Note that this
-        # ignores the 'inplace' flag, and assumes everything goes in the
-        # "build" tree.
-        return [self.get_ext_fullpath(ext.name) for ext in self.extensions]
-
-    def build_extensions(self) -> None:
-        # First, sanity-check the 'extensions' list
-        self.check_extensions_list(self.extensions)
-        if self.parallel:
-            self._build_extensions_parallel()
-        else:
-            self._build_extensions_serial()
-
-    def _build_extensions_parallel(self):
-        workers = self.parallel
-        if self.parallel is True:
-            workers = os.cpu_count()  # may return None
-        try:
-            from concurrent.futures import ThreadPoolExecutor
-        except ImportError:
-            workers = None
-
-        if workers is None:
-            self._build_extensions_serial()
-            return
-
-        with ThreadPoolExecutor(max_workers=workers) as executor:
-            futures = [
-                executor.submit(self.build_extension, ext) for ext in self.extensions
-            ]
-            for ext, fut in zip(self.extensions, futures):
-                with self._filter_build_errors(ext):
-                    fut.result()
-
-    def _build_extensions_serial(self):
-        for ext in self.extensions:
-            with self._filter_build_errors(ext):
-                self.build_extension(ext)
-
-    @contextlib.contextmanager
-    def _filter_build_errors(self, ext):
-        try:
-            yield
-        except (CCompilerError, DistutilsError, CompileError) as e:
-            if not ext.optional:
-                raise
-            self.warn(f'building extension "{ext.name}" failed: {e}')
-
-    def build_extension(self, ext) -> None:
-        sources = ext.sources
-        if sources is None or not isinstance(sources, (list, tuple)):
-            raise DistutilsSetupError(
-                f"in 'ext_modules' option (extension '{ext.name}'), "
-                "'sources' must be present and must be "
-                "a list of source filenames"
-            )
-        # sort to make the resulting .so file build reproducible
-        sources = sorted(sources)
-
-        ext_path = self.get_ext_fullpath(ext.name)
-        depends = sources + ext.depends
-        if not (self.force or newer_group(depends, ext_path, 'newer')):
-            log.debug("skipping '%s' extension (up-to-date)", ext.name)
-            return
-        else:
-            log.info("building '%s' extension", ext.name)
-
-        # First, scan the sources for SWIG definition files (.i), run
-        # SWIG on 'em to create .c files, and modify the sources list
-        # accordingly.
-        sources = self.swig_sources(sources, ext)
-
-        # Next, compile the source code to object files.
-
-        # XXX not honouring 'define_macros' or 'undef_macros' -- the
-        # CCompiler API needs to change to accommodate this, and I
-        # want to do one thing at a time!
-
-        # Two possible sources for extra compiler arguments:
-        #   - 'extra_compile_args' in Extension object
-        #   - CFLAGS environment variable (not particularly
-        #     elegant, but people seem to expect it and I
-        #     guess it's useful)
-        # The environment variable should take precedence, and
-        # any sensible compiler will give precedence to later
-        # command line args.  Hence we combine them in order:
-        extra_args = ext.extra_compile_args or []
-
-        macros = ext.define_macros[:]
-        for undef in ext.undef_macros:
-            macros.append((undef,))
-
-        objects = self.compiler.compile(
-            sources,
-            output_dir=self.build_temp,
-            macros=macros,
-            include_dirs=ext.include_dirs,
-            debug=self.debug,
-            extra_postargs=extra_args,
-            depends=ext.depends,
-        )
-
-        # XXX outdated variable, kept here in case third-part code
-        # needs it.
-        self._built_objects = objects[:]
-
-        # Now link the object files together into a "shared object" --
-        # of course, first we have to figure out all the other things
-        # that go into the mix.
-        if ext.extra_objects:
-            objects.extend(ext.extra_objects)
-        extra_args = ext.extra_link_args or []
-
-        # Detect target language, if not provided
-        language = ext.language or self.compiler.detect_language(sources)
-
-        self.compiler.link_shared_object(
-            objects,
-            ext_path,
-            libraries=self.get_libraries(ext),
-            library_dirs=ext.library_dirs,
-            runtime_library_dirs=ext.runtime_library_dirs,
-            extra_postargs=extra_args,
-            export_symbols=self.get_export_symbols(ext),
-            debug=self.debug,
-            build_temp=self.build_temp,
-            target_lang=language,
-        )
-
-    def swig_sources(self, sources, extension):
-        """Walk the list of source files in 'sources', looking for SWIG
-        interface (.i) files.  Run SWIG on all that are found, and
-        return a modified 'sources' list with SWIG source files replaced
-        by the generated C (or C++) files.
-        """
-        new_sources = []
-        swig_sources = []
-        swig_targets = {}
-
-        # XXX this drops generated C/C++ files into the source tree, which
-        # is fine for developers who want to distribute the generated
-        # source -- but there should be an option to put SWIG output in
-        # the temp dir.
-
-        if self.swig_cpp:
-            log.warning("--swig-cpp is deprecated - use --swig-opts=-c++")
-
-        if (
-            self.swig_cpp
-            or ('-c++' in self.swig_opts)
-            or ('-c++' in extension.swig_opts)
-        ):
-            target_ext = '.cpp'
-        else:
-            target_ext = '.c'
-
-        for source in sources:
-            (base, ext) = os.path.splitext(source)
-            if ext == ".i":  # SWIG interface file
-                new_sources.append(base + '_wrap' + target_ext)
-                swig_sources.append(source)
-                swig_targets[source] = new_sources[-1]
-            else:
-                new_sources.append(source)
-
-        if not swig_sources:
-            return new_sources
-
-        swig = self.swig or self.find_swig()
-        swig_cmd = [swig, "-python"]
-        swig_cmd.extend(self.swig_opts)
-        if self.swig_cpp:
-            swig_cmd.append("-c++")
-
-        # Do not override commandline arguments
-        if not self.swig_opts:
-            swig_cmd.extend(extension.swig_opts)
-
-        for source in swig_sources:
-            target = swig_targets[source]
-            log.info("swigging %s to %s", source, target)
-            self.spawn(swig_cmd + ["-o", target, source])
-
-        return new_sources
-
-    def find_swig(self):
-        """Return the name of the SWIG executable.  On Unix, this is
-        just "swig" -- it should be in the PATH.  Tries a bit harder on
-        Windows.
-        """
-        if os.name == "posix":
-            return "swig"
-        elif os.name == "nt":
-            # Look for SWIG in its standard installation directory on
-            # Windows (or so I presume!).  If we find it there, great;
-            # if not, act like Unix and assume it's in the PATH.
-            for vers in ("1.3", "1.2", "1.1"):
-                fn = os.path.join(f"c:\\swig{vers}", "swig.exe")
-                if os.path.isfile(fn):
-                    return fn
-            else:
-                return "swig.exe"
-        else:
-            raise DistutilsPlatformError(
-                f"I don't know how to find (much less run) SWIG on platform '{os.name}'"
-            )
-
-    # -- Name generators -----------------------------------------------
-    # (extension names, filenames, whatever)
-    def get_ext_fullpath(self, ext_name: str) -> str:
-        """Returns the path of the filename for a given extension.
-
-        The file is located in `build_lib` or directly in the package
-        (inplace option).
-        """
-        fullname = self.get_ext_fullname(ext_name)
-        modpath = fullname.split('.')
-        filename = self.get_ext_filename(modpath[-1])
-
-        if not self.inplace:
-            # no further work needed
-            # returning :
-            #   build_dir/package/path/filename
-            filename = os.path.join(*modpath[:-1] + [filename])
-            return os.path.join(self.build_lib, filename)
-
-        # the inplace option requires to find the package directory
-        # using the build_py command for that
-        package = '.'.join(modpath[0:-1])
-        build_py = self.get_finalized_command('build_py')
-        package_dir = os.path.abspath(build_py.get_package_dir(package))
-
-        # returning
-        #   package_dir/filename
-        return os.path.join(package_dir, filename)
-
-    def get_ext_fullname(self, ext_name: str) -> str:
-        """Returns the fullname of a given extension name.
-
-        Adds the `package.` prefix"""
-        if self.package is None:
-            return ext_name
-        else:
-            return self.package + '.' + ext_name
-
-    def get_ext_filename(self, ext_name: str) -> str:
-        r"""Convert the name of an extension (eg. "foo.bar") into the name
-        of the file from which it will be loaded (eg. "foo/bar.so", or
-        "foo\bar.pyd").
-        """
-        from ..sysconfig import get_config_var
-
-        ext_path = ext_name.split('.')
-        ext_suffix = get_config_var('EXT_SUFFIX')
-        return os.path.join(*ext_path) + ext_suffix
-
-    def get_export_symbols(self, ext: Extension) -> list[str]:
-        """Return the list of symbols that a shared extension has to
-        export.  This either uses 'ext.export_symbols' or, if it's not
-        provided, "PyInit_" + module_name.  Only relevant on Windows, where
-        the .pyd file (DLL) must export the module "PyInit_" function.
-        """
-        name = self._get_module_name_for_symbol(ext)
-        try:
-            # Unicode module name support as defined in PEP-489
-            # https://peps.python.org/pep-0489/#export-hook-name
-            name.encode('ascii')
-        except UnicodeEncodeError:
-            suffix = 'U_' + name.encode('punycode').replace(b'-', b'_').decode('ascii')
-        else:
-            suffix = "_" + name
-
-        initfunc_name = "PyInit" + suffix
-        if initfunc_name not in ext.export_symbols:
-            ext.export_symbols.append(initfunc_name)
-        return ext.export_symbols
-
-    def _get_module_name_for_symbol(self, ext):
-        # Package name should be used for `__init__` modules
-        # https://github.com/python/cpython/issues/80074
-        # https://github.com/pypa/setuptools/issues/4826
-        parts = ext.name.split(".")
-        if parts[-1] == "__init__" and len(parts) >= 2:
-            return parts[-2]
-        return parts[-1]
-
-    def get_libraries(self, ext: Extension) -> list[str]:  # noqa: C901
-        """Return the list of libraries to link against when building a
-        shared extension.  On most platforms, this is just 'ext.libraries';
-        on Windows, we add the Python library (eg. python20.dll).
-        """
-        # The python library is always needed on Windows.  For MSVC, this
-        # is redundant, since the library is mentioned in a pragma in
-        # pyconfig.h that MSVC groks.  The other Windows compilers all seem
-        # to need it mentioned explicitly, though, so that's what we do.
-        # Append '_d' to the python import library on debug builds.
-        if sys.platform == "win32" and not is_mingw():
-            from .._msvccompiler import MSVCCompiler
-
-            if not isinstance(self.compiler, MSVCCompiler):
-                template = "python%d%d"
-                if self.debug:
-                    template = template + '_d'
-                pythonlib = template % (
-                    sys.hexversion >> 24,
-                    (sys.hexversion >> 16) & 0xFF,
-                )
-                # don't extend ext.libraries, it may be shared with other
-                # extensions, it is a reference to the original list
-                return ext.libraries + [pythonlib]
-        else:
-            # On Android only the main executable and LD_PRELOADs are considered
-            # to be RTLD_GLOBAL, all the dependencies of the main executable
-            # remain RTLD_LOCAL and so the shared libraries must be linked with
-            # libpython when python is built with a shared python library (issue
-            # bpo-21536).
-            # On Cygwin (and if required, other POSIX-like platforms based on
-            # Windows like MinGW) it is simply necessary that all symbols in
-            # shared libraries are resolved at link time.
-            from ..sysconfig import get_config_var
-
-            link_libpython = False
-            if get_config_var('Py_ENABLE_SHARED'):
-                # A native build on an Android device or on Cygwin
-                if hasattr(sys, 'getandroidapilevel'):
-                    link_libpython = True
-                elif sys.platform == 'cygwin' or is_mingw():
-                    link_libpython = True
-                elif '_PYTHON_HOST_PLATFORM' in os.environ:
-                    # We are cross-compiling for one of the relevant platforms
-                    if get_config_var('ANDROID_API_LEVEL') != 0:
-                        link_libpython = True
-                    elif get_config_var('MACHDEP') == 'cygwin':
-                        link_libpython = True
-
-            if link_libpython:
-                ldversion = get_config_var('LDVERSION')
-                return ext.libraries + ['python' + ldversion]
-
-        return ext.libraries
diff --git a/voxvera/vendor/setuptools/_distutils/command/build_py.py b/voxvera/vendor/setuptools/_distutils/command/build_py.py
deleted file mode 100644
index d6ec7d1..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/build_py.py
+++ /dev/null
@@ -1,404 +0,0 @@
-"""distutils.command.build_py
-
-Implements the Distutils 'build_py' command."""
-
-import glob
-import importlib.util
-import os
-import sys
-from distutils._log import log
-from typing import ClassVar
-
-from ..core import Command
-from ..errors import DistutilsFileError, DistutilsOptionError
-from ..util import convert_path
-
-
-class build_py(Command):
-    description = "\"build\" pure Python modules (copy to build directory)"
-
-    user_options = [
-        ('build-lib=', 'd', "directory to \"build\" (copy) to"),
-        ('compile', 'c', "compile .py to .pyc"),
-        ('no-compile', None, "don't compile .py files [default]"),
-        (
-            'optimize=',
-            'O',
-            "also compile with optimization: -O1 for \"python -O\", "
-            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
-        ),
-        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['compile', 'force']
-    negative_opt: ClassVar[dict[str, str]] = {'no-compile': 'compile'}
-
-    def initialize_options(self):
-        self.build_lib = None
-        self.py_modules = None
-        self.package = None
-        self.package_data = None
-        self.package_dir = None
-        self.compile = False
-        self.optimize = 0
-        self.force = None
-
-    def finalize_options(self) -> None:
-        self.set_undefined_options(
-            'build', ('build_lib', 'build_lib'), ('force', 'force')
-        )
-
-        # Get the distribution options that are aliases for build_py
-        # options -- list of packages and list of modules.
-        self.packages = self.distribution.packages
-        self.py_modules = self.distribution.py_modules
-        self.package_data = self.distribution.package_data
-        self.package_dir = {}
-        if self.distribution.package_dir:
-            for name, path in self.distribution.package_dir.items():
-                self.package_dir[name] = convert_path(path)
-        self.data_files = self.get_data_files()
-
-        # Ick, copied straight from install_lib.py (fancy_getopt needs a
-        # type system!  Hell, *everything* needs a type system!!!)
-        if not isinstance(self.optimize, int):
-            try:
-                self.optimize = int(self.optimize)
-                assert 0 <= self.optimize <= 2
-            except (ValueError, AssertionError):
-                raise DistutilsOptionError("optimize must be 0, 1, or 2")
-
-    def run(self) -> None:
-        # XXX copy_file by default preserves atime and mtime.  IMHO this is
-        # the right thing to do, but perhaps it should be an option -- in
-        # particular, a site administrator might want installed files to
-        # reflect the time of installation rather than the last
-        # modification time before the installed release.
-
-        # XXX copy_file by default preserves mode, which appears to be the
-        # wrong thing to do: if a file is read-only in the working
-        # directory, we want it to be installed read/write so that the next
-        # installation of the same module distribution can overwrite it
-        # without problems.  (This might be a Unix-specific issue.)  Thus
-        # we turn off 'preserve_mode' when copying to the build directory,
-        # since the build directory is supposed to be exactly what the
-        # installation will look like (ie. we preserve mode when
-        # installing).
-
-        # Two options control which modules will be installed: 'packages'
-        # and 'py_modules'.  The former lets us work with whole packages, not
-        # specifying individual modules at all; the latter is for
-        # specifying modules one-at-a-time.
-
-        if self.py_modules:
-            self.build_modules()
-        if self.packages:
-            self.build_packages()
-            self.build_package_data()
-
-        self.byte_compile(self.get_outputs(include_bytecode=False))
-
-    def get_data_files(self):
-        """Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
-        data = []
-        if not self.packages:
-            return data
-        for package in self.packages:
-            # Locate package source directory
-            src_dir = self.get_package_dir(package)
-
-            # Compute package build directory
-            build_dir = os.path.join(*([self.build_lib] + package.split('.')))
-
-            # Length of path to strip from found files
-            plen = 0
-            if src_dir:
-                plen = len(src_dir) + 1
-
-            # Strip directory from globbed filenames
-            filenames = [file[plen:] for file in self.find_data_files(package, src_dir)]
-            data.append((package, src_dir, build_dir, filenames))
-        return data
-
-    def find_data_files(self, package, src_dir):
-        """Return filenames for package's data files in 'src_dir'"""
-        globs = self.package_data.get('', []) + self.package_data.get(package, [])
-        files = []
-        for pattern in globs:
-            # Each pattern has to be converted to a platform-specific path
-            filelist = glob.glob(
-                os.path.join(glob.escape(src_dir), convert_path(pattern))
-            )
-            # Files that match more than one pattern are only added once
-            files.extend([
-                fn for fn in filelist if fn not in files and os.path.isfile(fn)
-            ])
-        return files
-
-    def build_package_data(self) -> None:
-        """Copy data files into build directory"""
-        for _package, src_dir, build_dir, filenames in self.data_files:
-            for filename in filenames:
-                target = os.path.join(build_dir, filename)
-                self.mkpath(os.path.dirname(target))
-                self.copy_file(
-                    os.path.join(src_dir, filename), target, preserve_mode=False
-                )
-
-    def get_package_dir(self, package):
-        """Return the directory, relative to the top of the source
-        distribution, where package 'package' should be found
-        (at least according to the 'package_dir' option, if any)."""
-        path = package.split('.')
-
-        if not self.package_dir:
-            if path:
-                return os.path.join(*path)
-            else:
-                return ''
-        else:
-            tail = []
-            while path:
-                try:
-                    pdir = self.package_dir['.'.join(path)]
-                except KeyError:
-                    tail.insert(0, path[-1])
-                    del path[-1]
-                else:
-                    tail.insert(0, pdir)
-                    return os.path.join(*tail)
-            else:
-                # Oops, got all the way through 'path' without finding a
-                # match in package_dir.  If package_dir defines a directory
-                # for the root (nameless) package, then fallback on it;
-                # otherwise, we might as well have not consulted
-                # package_dir at all, as we just use the directory implied
-                # by 'tail' (which should be the same as the original value
-                # of 'path' at this point).
-                pdir = self.package_dir.get('')
-                if pdir is not None:
-                    tail.insert(0, pdir)
-
-                if tail:
-                    return os.path.join(*tail)
-                else:
-                    return ''
-
-    def check_package(self, package, package_dir):
-        # Empty dir name means current directory, which we can probably
-        # assume exists.  Also, os.path.exists and isdir don't know about
-        # my "empty string means current dir" convention, so we have to
-        # circumvent them.
-        if package_dir != "":
-            if not os.path.exists(package_dir):
-                raise DistutilsFileError(
-                    f"package directory '{package_dir}' does not exist"
-                )
-            if not os.path.isdir(package_dir):
-                raise DistutilsFileError(
-                    f"supposed package directory '{package_dir}' exists, "
-                    "but is not a directory"
-                )
-
-        # Directories without __init__.py are namespace packages (PEP 420).
-        if package:
-            init_py = os.path.join(package_dir, "__init__.py")
-            if os.path.isfile(init_py):
-                return init_py
-
-        # Either not in a package at all (__init__.py not expected), or
-        # __init__.py doesn't exist -- so don't return the filename.
-        return None
-
-    def check_module(self, module, module_file):
-        if not os.path.isfile(module_file):
-            log.warning("file %s (for module %s) not found", module_file, module)
-            return False
-        else:
-            return True
-
-    def find_package_modules(self, package, package_dir):
-        self.check_package(package, package_dir)
-        module_files = glob.glob(os.path.join(glob.escape(package_dir), "*.py"))
-        modules = []
-        setup_script = os.path.abspath(self.distribution.script_name)
-
-        for f in module_files:
-            abs_f = os.path.abspath(f)
-            if abs_f != setup_script:
-                module = os.path.splitext(os.path.basename(f))[0]
-                modules.append((package, module, f))
-            else:
-                self.debug_print(f"excluding {setup_script}")
-        return modules
-
-    def find_modules(self):
-        """Finds individually-specified Python modules, ie. those listed by
-        module name in 'self.py_modules'.  Returns a list of tuples (package,
-        module_base, filename): 'package' is a tuple of the path through
-        package-space to the module; 'module_base' is the bare (no
-        packages, no dots) module name, and 'filename' is the path to the
-        ".py" file (relative to the distribution root) that implements the
-        module.
-        """
-        # Map package names to tuples of useful info about the package:
-        #    (package_dir, checked)
-        # package_dir - the directory where we'll find source files for
-        #   this package
-        # checked - true if we have checked that the package directory
-        #   is valid (exists, contains __init__.py, ... ?)
-        packages = {}
-
-        # List of (package, module, filename) tuples to return
-        modules = []
-
-        # We treat modules-in-packages almost the same as toplevel modules,
-        # just the "package" for a toplevel is empty (either an empty
-        # string or empty list, depending on context).  Differences:
-        #   - don't check for __init__.py in directory for empty package
-        for module in self.py_modules:
-            path = module.split('.')
-            package = '.'.join(path[0:-1])
-            module_base = path[-1]
-
-            try:
-                (package_dir, checked) = packages[package]
-            except KeyError:
-                package_dir = self.get_package_dir(package)
-                checked = False
-
-            if not checked:
-                init_py = self.check_package(package, package_dir)
-                packages[package] = (package_dir, 1)
-                if init_py:
-                    modules.append((package, "__init__", init_py))
-
-            # XXX perhaps we should also check for just .pyc files
-            # (so greedy closed-source bastards can distribute Python
-            # modules too)
-            module_file = os.path.join(package_dir, module_base + ".py")
-            if not self.check_module(module, module_file):
-                continue
-
-            modules.append((package, module_base, module_file))
-
-        return modules
-
-    def find_all_modules(self):
-        """Compute the list of all modules that will be built, whether
-        they are specified one-module-at-a-time ('self.py_modules') or
-        by whole packages ('self.packages').  Return a list of tuples
-        (package, module, module_file), just like 'find_modules()' and
-        'find_package_modules()' do."""
-        modules = []
-        if self.py_modules:
-            modules.extend(self.find_modules())
-        if self.packages:
-            for package in self.packages:
-                package_dir = self.get_package_dir(package)
-                m = self.find_package_modules(package, package_dir)
-                modules.extend(m)
-        return modules
-
-    def get_source_files(self):
-        return [module[-1] for module in self.find_all_modules()]
-
-    def get_module_outfile(self, build_dir, package, module):
-        outfile_path = [build_dir] + list(package) + [module + ".py"]
-        return os.path.join(*outfile_path)
-
-    def get_outputs(self, include_bytecode: bool = True) -> list[str]:
-        modules = self.find_all_modules()
-        outputs = []
-        for package, module, _module_file in modules:
-            package = package.split('.')
-            filename = self.get_module_outfile(self.build_lib, package, module)
-            outputs.append(filename)
-            if include_bytecode:
-                if self.compile:
-                    outputs.append(
-                        importlib.util.cache_from_source(filename, optimization='')
-                    )
-                if self.optimize > 0:
-                    outputs.append(
-                        importlib.util.cache_from_source(
-                            filename, optimization=self.optimize
-                        )
-                    )
-
-        outputs += [
-            os.path.join(build_dir, filename)
-            for package, src_dir, build_dir, filenames in self.data_files
-            for filename in filenames
-        ]
-
-        return outputs
-
-    def build_module(self, module, module_file, package):
-        if isinstance(package, str):
-            package = package.split('.')
-        elif not isinstance(package, (list, tuple)):
-            raise TypeError(
-                "'package' must be a string (dot-separated), list, or tuple"
-            )
-
-        # Now put the module source file into the "build" area -- this is
-        # easy, we just copy it somewhere under self.build_lib (the build
-        # directory for Python source).
-        outfile = self.get_module_outfile(self.build_lib, package, module)
-        dir = os.path.dirname(outfile)
-        self.mkpath(dir)
-        return self.copy_file(module_file, outfile, preserve_mode=False)
-
-    def build_modules(self) -> None:
-        modules = self.find_modules()
-        for package, module, module_file in modules:
-            # Now "build" the module -- ie. copy the source file to
-            # self.build_lib (the build directory for Python source).
-            # (Actually, it gets copied to the directory for this package
-            # under self.build_lib.)
-            self.build_module(module, module_file, package)
-
-    def build_packages(self) -> None:
-        for package in self.packages:
-            # Get list of (package, module, module_file) tuples based on
-            # scanning the package directory.  'package' is only included
-            # in the tuple so that 'find_modules()' and
-            # 'find_package_tuples()' have a consistent interface; it's
-            # ignored here (apart from a sanity check).  Also, 'module' is
-            # the *unqualified* module name (ie. no dots, no package -- we
-            # already know its package!), and 'module_file' is the path to
-            # the .py file, relative to the current directory
-            # (ie. including 'package_dir').
-            package_dir = self.get_package_dir(package)
-            modules = self.find_package_modules(package, package_dir)
-
-            # Now loop over the modules we found, "building" each one (just
-            # copy it to self.build_lib).
-            for package_, module, module_file in modules:
-                assert package == package_
-                self.build_module(module, module_file, package)
-
-    def byte_compile(self, files) -> None:
-        if sys.dont_write_bytecode:
-            self.warn('byte-compiling is disabled, skipping.')
-            return
-
-        from ..util import byte_compile
-
-        prefix = self.build_lib
-        if prefix[-1] != os.sep:
-            prefix = prefix + os.sep
-
-        # XXX this code is essentially the same as the 'byte_compile()
-        # method of the "install_lib" command, except for the determination
-        # of the 'prefix' string.  Hmmm.
-        if self.compile:
-            byte_compile(files, optimize=0, force=self.force, prefix=prefix)
-        if self.optimize > 0:
-            byte_compile(
-                files,
-                optimize=self.optimize,
-                force=self.force,
-                prefix=prefix,
-            )
diff --git a/voxvera/vendor/setuptools/_distutils/command/build_scripts.py b/voxvera/vendor/setuptools/_distutils/command/build_scripts.py
deleted file mode 100644
index 0b551d1..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/build_scripts.py
+++ /dev/null
@@ -1,150 +0,0 @@
-"""distutils.command.build_scripts
-
-Implements the Distutils 'build_scripts' command."""
-
-import os
-import re
-import tokenize
-from distutils._log import log
-from stat import ST_MODE
-from typing import ClassVar
-
-from .._modified import newer
-from ..core import Command
-from ..util import convert_path
-
-shebang_pattern = re.compile('^#!.*python[0-9.]*([ \t].*)?$')
-"""
-Pattern matching a Python interpreter indicated in first line of a script.
-"""
-
-# for Setuptools compatibility
-first_line_re = shebang_pattern
-
-
-class build_scripts(Command):
-    description = "\"build\" scripts (copy and fixup #! line)"
-
-    user_options: ClassVar[list[tuple[str, str, str]]] = [
-        ('build-dir=', 'd', "directory to \"build\" (copy) to"),
-        ('force', 'f', "forcibly build everything (ignore file timestamps"),
-        ('executable=', 'e', "specify final destination interpreter path"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['force']
-
-    def initialize_options(self):
-        self.build_dir = None
-        self.scripts = None
-        self.force = None
-        self.executable = None
-
-    def finalize_options(self):
-        self.set_undefined_options(
-            'build',
-            ('build_scripts', 'build_dir'),
-            ('force', 'force'),
-            ('executable', 'executable'),
-        )
-        self.scripts = self.distribution.scripts
-
-    def get_source_files(self):
-        return self.scripts
-
-    def run(self):
-        if not self.scripts:
-            return
-        self.copy_scripts()
-
-    def copy_scripts(self):
-        """
-        Copy each script listed in ``self.scripts``.
-
-        If a script is marked as a Python script (first line matches
-        'shebang_pattern', i.e. starts with ``#!`` and contains
-        "python"), then adjust in the copy the first line to refer to
-        the current Python interpreter.
-        """
-        self.mkpath(self.build_dir)
-        outfiles = []
-        updated_files = []
-        for script in self.scripts:
-            self._copy_script(script, outfiles, updated_files)
-
-        self._change_modes(outfiles)
-
-        return outfiles, updated_files
-
-    def _copy_script(self, script, outfiles, updated_files):
-        shebang_match = None
-        script = convert_path(script)
-        outfile = os.path.join(self.build_dir, os.path.basename(script))
-        outfiles.append(outfile)
-
-        if not self.force and not newer(script, outfile):
-            log.debug("not copying %s (up-to-date)", script)
-            return
-
-        # Always open the file, but ignore failures in dry-run mode
-        # in order to attempt to copy directly.
-        f = tokenize.open(script)
-
-        first_line = f.readline()
-        if not first_line:
-            self.warn(f"{script} is an empty file (skipping)")
-            return
-
-        shebang_match = shebang_pattern.match(first_line)
-
-        updated_files.append(outfile)
-        if shebang_match:
-            log.info("copying and adjusting %s -> %s", script, self.build_dir)
-            post_interp = shebang_match.group(1) or ''
-            shebang = "#!" + self.executable + post_interp + "\n"
-            self._validate_shebang(shebang, f.encoding)
-            with open(outfile, "w", encoding=f.encoding) as outf:
-                outf.write(shebang)
-                outf.writelines(f.readlines())
-            if f:
-                f.close()
-        else:
-            if f:
-                f.close()
-            self.copy_file(script, outfile)
-
-    def _change_modes(self, outfiles):
-        if os.name != 'posix':
-            return
-
-        for file in outfiles:
-            self._change_mode(file)
-
-    def _change_mode(self, file):
-        oldmode = os.stat(file)[ST_MODE] & 0o7777
-        newmode = (oldmode | 0o555) & 0o7777
-        if newmode != oldmode:
-            log.info("changing mode of %s from %o to %o", file, oldmode, newmode)
-            os.chmod(file, newmode)
-
-    @staticmethod
-    def _validate_shebang(shebang, encoding):
-        # Python parser starts to read a script using UTF-8 until
-        # it gets a #coding:xxx cookie. The shebang has to be the
-        # first line of a file, the #coding:xxx cookie cannot be
-        # written before. So the shebang has to be encodable to
-        # UTF-8.
-        try:
-            shebang.encode('utf-8')
-        except UnicodeEncodeError:
-            raise ValueError(f"The shebang ({shebang!r}) is not encodable to utf-8")
-
-        # If the script is encoded to a custom encoding (use a
-        # #coding:xxx cookie), the shebang has to be encodable to
-        # the script encoding too.
-        try:
-            shebang.encode(encoding)
-        except UnicodeEncodeError:
-            raise ValueError(
-                f"The shebang ({shebang!r}) is not encodable "
-                f"to the script encoding ({encoding})"
-            )
diff --git a/voxvera/vendor/setuptools/_distutils/command/check.py b/voxvera/vendor/setuptools/_distutils/command/check.py
deleted file mode 100644
index 58a823d..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/check.py
+++ /dev/null
@@ -1,152 +0,0 @@
-"""distutils.command.check
-
-Implements the Distutils 'check' command.
-"""
-
-import contextlib
-from typing import ClassVar
-
-from ..core import Command
-from ..errors import DistutilsSetupError
-
-with contextlib.suppress(ImportError):
-    import docutils.frontend
-    import docutils.nodes
-    import docutils.parsers.rst
-    import docutils.utils
-
-    class SilentReporter(docutils.utils.Reporter):
-        def __init__(
-            self,
-            source,
-            report_level,
-            halt_level,
-            stream=None,
-            debug=False,
-            encoding='ascii',
-            error_handler='replace',
-        ):
-            self.messages = []
-            super().__init__(
-                source, report_level, halt_level, stream, debug, encoding, error_handler
-            )
-
-        def system_message(self, level, message, *children, **kwargs):
-            self.messages.append((level, message, children, kwargs))
-            return docutils.nodes.system_message(
-                message, *children, level=level, type=self.levels[level], **kwargs
-            )
-
-
-class check(Command):
-    """This command checks the meta-data of the package."""
-
-    description = "perform some checks on the package"
-    user_options: ClassVar[list[tuple[str, str, str]]] = [
-        ('metadata', 'm', 'Verify meta-data'),
-        (
-            'restructuredtext',
-            'r',
-            'Checks if long string meta-data syntax are reStructuredText-compliant',
-        ),
-        ('strict', 's', 'Will exit with an error if a check fails'),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['metadata', 'restructuredtext', 'strict']
-
-    def initialize_options(self):
-        """Sets default values for options."""
-        self.restructuredtext = False
-        self.metadata = 1
-        self.strict = False
-        self._warnings = 0
-
-    def finalize_options(self):
-        pass
-
-    def warn(self, msg):
-        """Counts the number of warnings that occurs."""
-        self._warnings += 1
-        return Command.warn(self, msg)
-
-    def run(self):
-        """Runs the command."""
-        # perform the various tests
-        if self.metadata:
-            self.check_metadata()
-        if self.restructuredtext:
-            if 'docutils' in globals():
-                try:
-                    self.check_restructuredtext()
-                except TypeError as exc:
-                    raise DistutilsSetupError(str(exc))
-            elif self.strict:
-                raise DistutilsSetupError('The docutils package is needed.')
-
-        # let's raise an error in strict mode, if we have at least
-        # one warning
-        if self.strict and self._warnings > 0:
-            raise DistutilsSetupError('Please correct your package.')
-
-    def check_metadata(self):
-        """Ensures that all required elements of meta-data are supplied.
-
-        Required fields:
-            name, version
-
-        Warns if any are missing.
-        """
-        metadata = self.distribution.metadata
-
-        missing = [
-            attr for attr in ('name', 'version') if not getattr(metadata, attr, None)
-        ]
-
-        if missing:
-            self.warn("missing required meta-data: {}".format(', '.join(missing)))
-
-    def check_restructuredtext(self):
-        """Checks if the long string fields are reST-compliant."""
-        data = self.distribution.get_long_description()
-        for warning in self._check_rst_data(data):
-            line = warning[-1].get('line')
-            if line is None:
-                warning = warning[1]
-            else:
-                warning = f'{warning[1]} (line {line})'
-            self.warn(warning)
-
-    def _check_rst_data(self, data):
-        """Returns warnings when the provided data doesn't compile."""
-        # the include and csv_table directives need this to be a path
-        source_path = self.distribution.script_name or 'setup.py'
-        parser = docutils.parsers.rst.Parser()
-        settings = docutils.frontend.OptionParser(
-            components=(docutils.parsers.rst.Parser,)
-        ).get_default_values()
-        settings.tab_width = 4
-        settings.pep_references = None
-        settings.rfc_references = None
-        reporter = SilentReporter(
-            source_path,
-            settings.report_level,
-            settings.halt_level,
-            stream=settings.warning_stream,
-            debug=settings.debug,
-            encoding=settings.error_encoding,
-            error_handler=settings.error_encoding_error_handler,
-        )
-
-        document = docutils.nodes.document(settings, reporter, source=source_path)
-        document.note_source(source_path, -1)
-        try:
-            parser.parse(data, document)
-        except (AttributeError, TypeError) as e:
-            reporter.messages.append((
-                -1,
-                f'Could not finish the parsing: {e}.',
-                '',
-                {},
-            ))
-
-        return reporter.messages
diff --git a/voxvera/vendor/setuptools/_distutils/command/clean.py b/voxvera/vendor/setuptools/_distutils/command/clean.py
deleted file mode 100644
index fc1711b..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/clean.py
+++ /dev/null
@@ -1,76 +0,0 @@
-"""distutils.command.clean
-
-Implements the Distutils 'clean' command."""
-
-# contributed by Bastian Kleineidam , added 2000-03-18
-
-import os
-from distutils._log import log
-from typing import ClassVar
-
-from ..core import Command
-from ..dir_util import remove_tree
-
-
-class clean(Command):
-    description = "clean up temporary files from 'build' command"
-    user_options = [
-        ('build-base=', 'b', "base build directory [default: 'build.build-base']"),
-        (
-            'build-lib=',
-            None,
-            "build directory for all modules [default: 'build.build-lib']",
-        ),
-        ('build-temp=', 't', "temporary build directory [default: 'build.build-temp']"),
-        (
-            'build-scripts=',
-            None,
-            "build directory for scripts [default: 'build.build-scripts']",
-        ),
-        ('bdist-base=', None, "temporary directory for built distributions"),
-        ('all', 'a', "remove all build output, not just temporary by-products"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['all']
-
-    def initialize_options(self):
-        self.build_base = None
-        self.build_lib = None
-        self.build_temp = None
-        self.build_scripts = None
-        self.bdist_base = None
-        self.all = None
-
-    def finalize_options(self):
-        self.set_undefined_options(
-            'build',
-            ('build_base', 'build_base'),
-            ('build_lib', 'build_lib'),
-            ('build_scripts', 'build_scripts'),
-            ('build_temp', 'build_temp'),
-        )
-        self.set_undefined_options('bdist', ('bdist_base', 'bdist_base'))
-
-    def run(self):
-        # remove the build/temp. directory (unless it's already
-        # gone)
-        if os.path.exists(self.build_temp):
-            remove_tree(self.build_temp)
-        else:
-            log.debug("'%s' does not exist -- can't clean it", self.build_temp)
-
-        if self.all:
-            # remove build directories
-            for directory in (self.build_lib, self.bdist_base, self.build_scripts):
-                if os.path.exists(directory):
-                    remove_tree(directory)
-                else:
-                    log.warning("'%s' does not exist -- can't clean it", directory)
-
-        # just for the heck of it, try to remove the base build directory:
-        # we might have emptied it right now, but if not we don't care
-        try:
-            os.rmdir(self.build_base)
-            log.info("removing '%s'", self.build_base)
-        except OSError:
-            pass
diff --git a/voxvera/vendor/setuptools/_distutils/command/config.py b/voxvera/vendor/setuptools/_distutils/command/config.py
deleted file mode 100644
index 9818418..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/config.py
+++ /dev/null
@@ -1,348 +0,0 @@
-"""distutils.command.config
-
-Implements the Distutils 'config' command, a (mostly) empty command class
-that exists mainly to be sub-classed by specific module distributions and
-applications.  The idea is that while every "config" command is different,
-at least they're all named the same, and users always see "config" in the
-list of standard commands.  Also, this is a good place to put common
-configure-like tasks: "try to compile this C code", or "figure out where
-this header file lives".
-"""
-
-from __future__ import annotations
-
-import os
-import pathlib
-import re
-from collections.abc import Sequence
-from distutils._log import log
-
-from ..ccompiler import CCompiler, CompileError, LinkError, new_compiler
-from ..core import Command
-from ..errors import DistutilsExecError
-from ..sysconfig import customize_compiler
-
-LANG_EXT = {"c": ".c", "c++": ".cxx"}
-
-
-class config(Command):
-    description = "prepare to build"
-
-    user_options = [
-        ('compiler=', None, "specify the compiler type"),
-        ('cc=', None, "specify the compiler executable"),
-        ('include-dirs=', 'I', "list of directories to search for header files"),
-        ('define=', 'D', "C preprocessor macros to define"),
-        ('undef=', 'U', "C preprocessor macros to undefine"),
-        ('libraries=', 'l', "external C libraries to link with"),
-        ('library-dirs=', 'L', "directories to search for external C libraries"),
-        ('noisy', None, "show every action (compile, link, run, ...) taken"),
-        (
-            'dump-source',
-            None,
-            "dump generated source files before attempting to compile them",
-        ),
-    ]
-
-    # The three standard command methods: since the "config" command
-    # does nothing by default, these are empty.
-
-    def initialize_options(self):
-        self.compiler = None
-        self.cc = None
-        self.include_dirs = None
-        self.libraries = None
-        self.library_dirs = None
-
-        # maximal output for now
-        self.noisy = 1
-        self.dump_source = 1
-
-        # list of temporary files generated along-the-way that we have
-        # to clean at some point
-        self.temp_files = []
-
-    def finalize_options(self):
-        if self.include_dirs is None:
-            self.include_dirs = self.distribution.include_dirs or []
-        elif isinstance(self.include_dirs, str):
-            self.include_dirs = self.include_dirs.split(os.pathsep)
-
-        if self.libraries is None:
-            self.libraries = []
-        elif isinstance(self.libraries, str):
-            self.libraries = [self.libraries]
-
-        if self.library_dirs is None:
-            self.library_dirs = []
-        elif isinstance(self.library_dirs, str):
-            self.library_dirs = self.library_dirs.split(os.pathsep)
-
-    def run(self):
-        pass
-
-    # Utility methods for actual "config" commands.  The interfaces are
-    # loosely based on Autoconf macros of similar names.  Sub-classes
-    # may use these freely.
-
-    def _check_compiler(self):
-        """Check that 'self.compiler' really is a CCompiler object;
-        if not, make it one.
-        """
-        if not isinstance(self.compiler, CCompiler):
-            self.compiler = new_compiler(compiler=self.compiler, force=True)
-            customize_compiler(self.compiler)
-            if self.include_dirs:
-                self.compiler.set_include_dirs(self.include_dirs)
-            if self.libraries:
-                self.compiler.set_libraries(self.libraries)
-            if self.library_dirs:
-                self.compiler.set_library_dirs(self.library_dirs)
-
-    def _gen_temp_sourcefile(self, body, headers, lang):
-        filename = "_configtest" + LANG_EXT[lang]
-        with open(filename, "w", encoding='utf-8') as file:
-            if headers:
-                for header in headers:
-                    file.write(f"#include <{header}>\n")
-                file.write("\n")
-            file.write(body)
-            if body[-1] != "\n":
-                file.write("\n")
-        return filename
-
-    def _preprocess(self, body, headers, include_dirs, lang):
-        src = self._gen_temp_sourcefile(body, headers, lang)
-        out = "_configtest.i"
-        self.temp_files.extend([src, out])
-        self.compiler.preprocess(src, out, include_dirs=include_dirs)
-        return (src, out)
-
-    def _compile(self, body, headers, include_dirs, lang):
-        src = self._gen_temp_sourcefile(body, headers, lang)
-        if self.dump_source:
-            dump_file(src, f"compiling '{src}':")
-        (obj,) = self.compiler.object_filenames([src])
-        self.temp_files.extend([src, obj])
-        self.compiler.compile([src], include_dirs=include_dirs)
-        return (src, obj)
-
-    def _link(self, body, headers, include_dirs, libraries, library_dirs, lang):
-        (src, obj) = self._compile(body, headers, include_dirs, lang)
-        prog = os.path.splitext(os.path.basename(src))[0]
-        self.compiler.link_executable(
-            [obj],
-            prog,
-            libraries=libraries,
-            library_dirs=library_dirs,
-            target_lang=lang,
-        )
-
-        if self.compiler.exe_extension is not None:
-            prog = prog + self.compiler.exe_extension
-        self.temp_files.append(prog)
-
-        return (src, obj, prog)
-
-    def _clean(self, *filenames):
-        if not filenames:
-            filenames = self.temp_files
-            self.temp_files = []
-        log.info("removing: %s", ' '.join(filenames))
-        for filename in filenames:
-            try:
-                os.remove(filename)
-            except OSError:
-                pass
-
-    # XXX need access to the header search path and maybe default macros.
-
-    def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"):
-        """Construct a source file from 'body' (a string containing lines
-        of C/C++ code) and 'headers' (a list of header files to include)
-        and run it through the preprocessor.  Return true if the
-        preprocessor succeeded, false if there were any errors.
-        ('body' probably isn't of much use, but what the heck.)
-        """
-        self._check_compiler()
-        ok = True
-        try:
-            self._preprocess(body, headers, include_dirs, lang)
-        except CompileError:
-            ok = False
-
-        self._clean()
-        return ok
-
-    def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, lang="c"):
-        """Construct a source file (just like 'try_cpp()'), run it through
-        the preprocessor, and return true if any line of the output matches
-        'pattern'.  'pattern' should either be a compiled regex object or a
-        string containing a regex.  If both 'body' and 'headers' are None,
-        preprocesses an empty file -- which can be useful to determine the
-        symbols the preprocessor and compiler set by default.
-        """
-        self._check_compiler()
-        src, out = self._preprocess(body, headers, include_dirs, lang)
-
-        if isinstance(pattern, str):
-            pattern = re.compile(pattern)
-
-        with open(out, encoding='utf-8') as file:
-            match = any(pattern.search(line) for line in file)
-
-        self._clean()
-        return match
-
-    def try_compile(self, body, headers=None, include_dirs=None, lang="c"):
-        """Try to compile a source file built from 'body' and 'headers'.
-        Return true on success, false otherwise.
-        """
-        self._check_compiler()
-        try:
-            self._compile(body, headers, include_dirs, lang)
-            ok = True
-        except CompileError:
-            ok = False
-
-        log.info(ok and "success!" or "failure.")
-        self._clean()
-        return ok
-
-    def try_link(
-        self,
-        body,
-        headers=None,
-        include_dirs=None,
-        libraries=None,
-        library_dirs=None,
-        lang="c",
-    ):
-        """Try to compile and link a source file, built from 'body' and
-        'headers', to executable form.  Return true on success, false
-        otherwise.
-        """
-        self._check_compiler()
-        try:
-            self._link(body, headers, include_dirs, libraries, library_dirs, lang)
-            ok = True
-        except (CompileError, LinkError):
-            ok = False
-
-        log.info(ok and "success!" or "failure.")
-        self._clean()
-        return ok
-
-    def try_run(
-        self,
-        body,
-        headers=None,
-        include_dirs=None,
-        libraries=None,
-        library_dirs=None,
-        lang="c",
-    ):
-        """Try to compile, link to an executable, and run a program
-        built from 'body' and 'headers'.  Return true on success, false
-        otherwise.
-        """
-        self._check_compiler()
-        try:
-            src, obj, exe = self._link(
-                body, headers, include_dirs, libraries, library_dirs, lang
-            )
-            self.spawn([exe])
-            ok = True
-        except (CompileError, LinkError, DistutilsExecError):
-            ok = False
-
-        log.info(ok and "success!" or "failure.")
-        self._clean()
-        return ok
-
-    # -- High-level methods --------------------------------------------
-    # (these are the ones that are actually likely to be useful
-    # when implementing a real-world config command!)
-
-    def check_func(
-        self,
-        func,
-        headers=None,
-        include_dirs=None,
-        libraries=None,
-        library_dirs=None,
-        decl=False,
-        call=False,
-    ):
-        """Determine if function 'func' is available by constructing a
-        source file that refers to 'func', and compiles and links it.
-        If everything succeeds, returns true; otherwise returns false.
-
-        The constructed source file starts out by including the header
-        files listed in 'headers'.  If 'decl' is true, it then declares
-        'func' (as "int func()"); you probably shouldn't supply 'headers'
-        and set 'decl' true in the same call, or you might get errors about
-        a conflicting declarations for 'func'.  Finally, the constructed
-        'main()' function either references 'func' or (if 'call' is true)
-        calls it.  'libraries' and 'library_dirs' are used when
-        linking.
-        """
-        self._check_compiler()
-        body = []
-        if decl:
-            body.append(f"int {func} ();")
-        body.append("int main () {")
-        if call:
-            body.append(f"  {func}();")
-        else:
-            body.append(f"  {func};")
-        body.append("}")
-        body = "\n".join(body) + "\n"
-
-        return self.try_link(body, headers, include_dirs, libraries, library_dirs)
-
-    def check_lib(
-        self,
-        library,
-        library_dirs=None,
-        headers=None,
-        include_dirs=None,
-        other_libraries: Sequence[str] = [],
-    ):
-        """Determine if 'library' is available to be linked against,
-        without actually checking that any particular symbols are provided
-        by it.  'headers' will be used in constructing the source file to
-        be compiled, but the only effect of this is to check if all the
-        header files listed are available.  Any libraries listed in
-        'other_libraries' will be included in the link, in case 'library'
-        has symbols that depend on other libraries.
-        """
-        self._check_compiler()
-        return self.try_link(
-            "int main (void) { }",
-            headers,
-            include_dirs,
-            [library] + list(other_libraries),
-            library_dirs,
-        )
-
-    def check_header(self, header, include_dirs=None, library_dirs=None, lang="c"):
-        """Determine if the system header file named by 'header_file'
-        exists and can be found by the preprocessor; return true if so,
-        false otherwise.
-        """
-        return self.try_cpp(
-            body="/* No body */", headers=[header], include_dirs=include_dirs
-        )
-
-
-def dump_file(filename, head=None):
-    """Dumps a file content into log.info.
-
-    If head is not None, will be dumped before the file content.
-    """
-    if head is None:
-        log.info('%s', filename)
-    else:
-        log.info(head)
-    log.info(pathlib.Path(filename).read_text(encoding='utf-8'))
diff --git a/voxvera/vendor/setuptools/_distutils/command/install.py b/voxvera/vendor/setuptools/_distutils/command/install.py
deleted file mode 100644
index dc17e56..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/install.py
+++ /dev/null
@@ -1,805 +0,0 @@
-"""distutils.command.install
-
-Implements the Distutils 'install' command."""
-
-from __future__ import annotations
-
-import collections
-import contextlib
-import itertools
-import os
-import sys
-import sysconfig
-from distutils._log import log
-from site import USER_BASE, USER_SITE
-from typing import ClassVar
-
-from ..core import Command
-from ..debug import DEBUG
-from ..errors import DistutilsOptionError, DistutilsPlatformError
-from ..file_util import write_file
-from ..sysconfig import get_config_vars
-from ..util import change_root, convert_path, get_platform, subst_vars
-from . import _framework_compat as fw
-
-HAS_USER_SITE = True
-
-WINDOWS_SCHEME = {
-    'purelib': '{base}/Lib/site-packages',
-    'platlib': '{base}/Lib/site-packages',
-    'headers': '{base}/Include/{dist_name}',
-    'scripts': '{base}/Scripts',
-    'data': '{base}',
-}
-
-INSTALL_SCHEMES = {
-    'posix_prefix': {
-        'purelib': '{base}/lib/{implementation_lower}{py_version_short}/site-packages',
-        'platlib': '{platbase}/{platlibdir}/{implementation_lower}'
-        '{py_version_short}/site-packages',
-        'headers': '{base}/include/{implementation_lower}'
-        '{py_version_short}{abiflags}/{dist_name}',
-        'scripts': '{base}/bin',
-        'data': '{base}',
-    },
-    'posix_home': {
-        'purelib': '{base}/lib/{implementation_lower}',
-        'platlib': '{base}/{platlibdir}/{implementation_lower}',
-        'headers': '{base}/include/{implementation_lower}/{dist_name}',
-        'scripts': '{base}/bin',
-        'data': '{base}',
-    },
-    'nt': WINDOWS_SCHEME,
-    'pypy': {
-        'purelib': '{base}/site-packages',
-        'platlib': '{base}/site-packages',
-        'headers': '{base}/include/{dist_name}',
-        'scripts': '{base}/bin',
-        'data': '{base}',
-    },
-    'pypy_nt': {
-        'purelib': '{base}/site-packages',
-        'platlib': '{base}/site-packages',
-        'headers': '{base}/include/{dist_name}',
-        'scripts': '{base}/Scripts',
-        'data': '{base}',
-    },
-}
-
-# user site schemes
-if HAS_USER_SITE:
-    INSTALL_SCHEMES['nt_user'] = {
-        'purelib': '{usersite}',
-        'platlib': '{usersite}',
-        'headers': '{userbase}/{implementation}{py_version_nodot_plat}'
-        '/Include/{dist_name}',
-        'scripts': '{userbase}/{implementation}{py_version_nodot_plat}/Scripts',
-        'data': '{userbase}',
-    }
-
-    INSTALL_SCHEMES['posix_user'] = {
-        'purelib': '{usersite}',
-        'platlib': '{usersite}',
-        'headers': '{userbase}/include/{implementation_lower}'
-        '{py_version_short}{abiflags}/{dist_name}',
-        'scripts': '{userbase}/bin',
-        'data': '{userbase}',
-    }
-
-
-INSTALL_SCHEMES.update(fw.schemes)
-
-
-# The keys to an installation scheme; if any new types of files are to be
-# installed, be sure to add an entry to every installation scheme above,
-# and to SCHEME_KEYS here.
-SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data')
-
-
-def _load_sysconfig_schemes():
-    with contextlib.suppress(AttributeError):
-        return {
-            scheme: sysconfig.get_paths(scheme, expand=False)
-            for scheme in sysconfig.get_scheme_names()
-        }
-
-
-def _load_schemes():
-    """
-    Extend default schemes with schemes from sysconfig.
-    """
-
-    sysconfig_schemes = _load_sysconfig_schemes() or {}
-
-    return {
-        scheme: {
-            **INSTALL_SCHEMES.get(scheme, {}),
-            **sysconfig_schemes.get(scheme, {}),
-        }
-        for scheme in set(itertools.chain(INSTALL_SCHEMES, sysconfig_schemes))
-    }
-
-
-def _get_implementation():
-    if hasattr(sys, 'pypy_version_info'):
-        return 'PyPy'
-    else:
-        return 'Python'
-
-
-def _select_scheme(ob, name):
-    scheme = _inject_headers(name, _load_scheme(_resolve_scheme(name)))
-    vars(ob).update(_remove_set(ob, _scheme_attrs(scheme)))
-
-
-def _remove_set(ob, attrs):
-    """
-    Include only attrs that are None in ob.
-    """
-    return {key: value for key, value in attrs.items() if getattr(ob, key) is None}
-
-
-def _resolve_scheme(name):
-    os_name, sep, key = name.partition('_')
-    try:
-        resolved = sysconfig.get_preferred_scheme(key)
-    except Exception:
-        resolved = fw.scheme(name)
-    return resolved
-
-
-def _load_scheme(name):
-    return _load_schemes()[name]
-
-
-def _inject_headers(name, scheme):
-    """
-    Given a scheme name and the resolved scheme,
-    if the scheme does not include headers, resolve
-    the fallback scheme for the name and use headers
-    from it. pypa/distutils#88
-    """
-    # Bypass the preferred scheme, which may not
-    # have defined headers.
-    fallback = _load_scheme(name)
-    scheme.setdefault('headers', fallback['headers'])
-    return scheme
-
-
-def _scheme_attrs(scheme):
-    """Resolve install directories by applying the install schemes."""
-    return {f'install_{key}': scheme[key] for key in SCHEME_KEYS}
-
-
-class install(Command):
-    description = "install everything from build directory"
-
-    user_options = [
-        # Select installation scheme and set base director(y|ies)
-        ('prefix=', None, "installation prefix"),
-        ('exec-prefix=', None, "(Unix only) prefix for platform-specific files"),
-        ('home=', None, "(Unix only) home directory to install under"),
-        # Or, just set the base director(y|ies)
-        (
-            'install-base=',
-            None,
-            "base installation directory (instead of --prefix or --home)",
-        ),
-        (
-            'install-platbase=',
-            None,
-            "base installation directory for platform-specific files (instead of --exec-prefix or --home)",
-        ),
-        ('root=', None, "install everything relative to this alternate root directory"),
-        # Or, explicitly set the installation scheme
-        (
-            'install-purelib=',
-            None,
-            "installation directory for pure Python module distributions",
-        ),
-        (
-            'install-platlib=',
-            None,
-            "installation directory for non-pure module distributions",
-        ),
-        (
-            'install-lib=',
-            None,
-            "installation directory for all module distributions (overrides --install-purelib and --install-platlib)",
-        ),
-        ('install-headers=', None, "installation directory for C/C++ headers"),
-        ('install-scripts=', None, "installation directory for Python scripts"),
-        ('install-data=', None, "installation directory for data files"),
-        # Byte-compilation options -- see install_lib.py for details, as
-        # these are duplicated from there (but only install_lib does
-        # anything with them).
-        ('compile', 'c', "compile .py to .pyc [default]"),
-        ('no-compile', None, "don't compile .py files"),
-        (
-            'optimize=',
-            'O',
-            "also compile with optimization: -O1 for \"python -O\", "
-            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
-        ),
-        # Miscellaneous control options
-        ('force', 'f', "force installation (overwrite any existing files)"),
-        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
-        # Where to install documentation (eventually!)
-        # ('doc-format=', None, "format of documentation to generate"),
-        # ('install-man=', None, "directory for Unix man pages"),
-        # ('install-html=', None, "directory for HTML documentation"),
-        # ('install-info=', None, "directory for GNU info files"),
-        ('record=', None, "filename in which to record list of installed files"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['compile', 'force', 'skip-build']
-
-    if HAS_USER_SITE:
-        user_options.append((
-            'user',
-            None,
-            f"install in user site-package '{USER_SITE}'",
-        ))
-        boolean_options.append('user')
-
-    negative_opt: ClassVar[dict[str, str]] = {'no-compile': 'compile'}
-
-    def initialize_options(self) -> None:
-        """Initializes options."""
-        # High-level options: these select both an installation base
-        # and scheme.
-        self.prefix: str | None = None
-        self.exec_prefix: str | None = None
-        self.home: str | None = None
-        self.user = False
-
-        # These select only the installation base; it's up to the user to
-        # specify the installation scheme (currently, that means supplying
-        # the --install-{platlib,purelib,scripts,data} options).
-        self.install_base = None
-        self.install_platbase = None
-        self.root: str | None = None
-
-        # These options are the actual installation directories; if not
-        # supplied by the user, they are filled in using the installation
-        # scheme implied by prefix/exec-prefix/home and the contents of
-        # that installation scheme.
-        self.install_purelib = None  # for pure module distributions
-        self.install_platlib = None  # non-pure (dists w/ extensions)
-        self.install_headers = None  # for C/C++ headers
-        self.install_lib: str | None = None  # set to either purelib or platlib
-        self.install_scripts = None
-        self.install_data = None
-        self.install_userbase = USER_BASE
-        self.install_usersite = USER_SITE
-
-        self.compile = None
-        self.optimize = None
-
-        # Deprecated
-        # These two are for putting non-packagized distributions into their
-        # own directory and creating a .pth file if it makes sense.
-        # 'extra_path' comes from the setup file; 'install_path_file' can
-        # be turned off if it makes no sense to install a .pth file.  (But
-        # better to install it uselessly than to guess wrong and not
-        # install it when it's necessary and would be used!)  Currently,
-        # 'install_path_file' is always true unless some outsider meddles
-        # with it.
-        self.extra_path = None
-        self.install_path_file = True
-
-        # 'force' forces installation, even if target files are not
-        # out-of-date.  'skip_build' skips running the "build" command,
-        # handy if you know it's not necessary.  'warn_dir' (which is *not*
-        # a user option, it's just there so the bdist_* commands can turn
-        # it off) determines whether we warn about installing to a
-        # directory not in sys.path.
-        self.force = False
-        self.skip_build = False
-        self.warn_dir = True
-
-        # These are only here as a conduit from the 'build' command to the
-        # 'install_*' commands that do the real work.  ('build_base' isn't
-        # actually used anywhere, but it might be useful in future.)  They
-        # are not user options, because if the user told the install
-        # command where the build directory is, that wouldn't affect the
-        # build command.
-        self.build_base = None
-        self.build_lib = None
-
-        # Not defined yet because we don't know anything about
-        # documentation yet.
-        # self.install_man = None
-        # self.install_html = None
-        # self.install_info = None
-
-        self.record = None
-
-    # -- Option finalizing methods -------------------------------------
-    # (This is rather more involved than for most commands,
-    # because this is where the policy for installing third-
-    # party Python modules on various platforms given a wide
-    # array of user input is decided.  Yes, it's quite complex!)
-
-    def finalize_options(self) -> None:  # noqa: C901
-        """Finalizes options."""
-        # This method (and its helpers, like 'finalize_unix()',
-        # 'finalize_other()', and 'select_scheme()') is where the default
-        # installation directories for modules, extension modules, and
-        # anything else we care to install from a Python module
-        # distribution.  Thus, this code makes a pretty important policy
-        # statement about how third-party stuff is added to a Python
-        # installation!  Note that the actual work of installation is done
-        # by the relatively simple 'install_*' commands; they just take
-        # their orders from the installation directory options determined
-        # here.
-
-        # Check for errors/inconsistencies in the options; first, stuff
-        # that's wrong on any platform.
-
-        if (self.prefix or self.exec_prefix or self.home) and (
-            self.install_base or self.install_platbase
-        ):
-            raise DistutilsOptionError(
-                "must supply either prefix/exec-prefix/home or install-base/install-platbase -- not both"
-            )
-
-        if self.home and (self.prefix or self.exec_prefix):
-            raise DistutilsOptionError(
-                "must supply either home or prefix/exec-prefix -- not both"
-            )
-
-        if self.user and (
-            self.prefix
-            or self.exec_prefix
-            or self.home
-            or self.install_base
-            or self.install_platbase
-        ):
-            raise DistutilsOptionError(
-                "can't combine user with prefix, "
-                "exec_prefix/home, or install_(plat)base"
-            )
-
-        # Next, stuff that's wrong (or dubious) only on certain platforms.
-        if os.name != "posix":
-            if self.exec_prefix:
-                self.warn("exec-prefix option ignored on this platform")
-                self.exec_prefix = None
-
-        # Now the interesting logic -- so interesting that we farm it out
-        # to other methods.  The goal of these methods is to set the final
-        # values for the install_{lib,scripts,data,...}  options, using as
-        # input a heady brew of prefix, exec_prefix, home, install_base,
-        # install_platbase, user-supplied versions of
-        # install_{purelib,platlib,lib,scripts,data,...}, and the
-        # install schemes.  Phew!
-
-        self.dump_dirs("pre-finalize_{unix,other}")
-
-        if os.name == 'posix':
-            self.finalize_unix()
-        else:
-            self.finalize_other()
-
-        self.dump_dirs("post-finalize_{unix,other}()")
-
-        # Expand configuration variables, tilde, etc. in self.install_base
-        # and self.install_platbase -- that way, we can use $base or
-        # $platbase in the other installation directories and not worry
-        # about needing recursive variable expansion (shudder).
-
-        py_version = sys.version.split()[0]
-        (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
-        try:
-            abiflags = sys.abiflags
-        except AttributeError:
-            # sys.abiflags may not be defined on all platforms.
-            abiflags = ''
-        local_vars = {
-            'dist_name': self.distribution.get_name(),
-            'dist_version': self.distribution.get_version(),
-            'dist_fullname': self.distribution.get_fullname(),
-            'py_version': py_version,
-            'py_version_short': f'{sys.version_info.major}.{sys.version_info.minor}',
-            'py_version_nodot': f'{sys.version_info.major}{sys.version_info.minor}',
-            'sys_prefix': prefix,
-            'prefix': prefix,
-            'sys_exec_prefix': exec_prefix,
-            'exec_prefix': exec_prefix,
-            'abiflags': abiflags,
-            'platlibdir': getattr(sys, 'platlibdir', 'lib'),
-            'implementation_lower': _get_implementation().lower(),
-            'implementation': _get_implementation(),
-        }
-
-        # vars for compatibility on older Pythons
-        compat_vars = dict(
-            # Python 3.9 and earlier
-            py_version_nodot_plat=getattr(sys, 'winver', '').replace('.', ''),
-        )
-
-        if HAS_USER_SITE:
-            local_vars['userbase'] = self.install_userbase
-            local_vars['usersite'] = self.install_usersite
-
-        self.config_vars = collections.ChainMap(
-            local_vars,
-            sysconfig.get_config_vars(),
-            compat_vars,
-            fw.vars(),
-        )
-
-        self.expand_basedirs()
-
-        self.dump_dirs("post-expand_basedirs()")
-
-        # Now define config vars for the base directories so we can expand
-        # everything else.
-        local_vars['base'] = self.install_base
-        local_vars['platbase'] = self.install_platbase
-
-        if DEBUG:
-            from pprint import pprint
-
-            print("config vars:")
-            pprint(dict(self.config_vars))
-
-        # Expand "~" and configuration variables in the installation
-        # directories.
-        self.expand_dirs()
-
-        self.dump_dirs("post-expand_dirs()")
-
-        # Create directories in the home dir:
-        if self.user:
-            self.create_home_path()
-
-        # Pick the actual directory to install all modules to: either
-        # install_purelib or install_platlib, depending on whether this
-        # module distribution is pure or not.  Of course, if the user
-        # already specified install_lib, use their selection.
-        if self.install_lib is None:
-            if self.distribution.has_ext_modules():  # has extensions: non-pure
-                self.install_lib = self.install_platlib
-            else:
-                self.install_lib = self.install_purelib
-
-        # Convert directories from Unix /-separated syntax to the local
-        # convention.
-        self.convert_paths(
-            'lib',
-            'purelib',
-            'platlib',
-            'scripts',
-            'data',
-            'headers',
-            'userbase',
-            'usersite',
-        )
-
-        # Deprecated
-        # Well, we're not actually fully completely finalized yet: we still
-        # have to deal with 'extra_path', which is the hack for allowing
-        # non-packagized module distributions (hello, Numerical Python!) to
-        # get their own directories.
-        self.handle_extra_path()
-        self.install_libbase = self.install_lib  # needed for .pth file
-        self.install_lib = os.path.join(self.install_lib, self.extra_dirs)
-
-        # If a new root directory was supplied, make all the installation
-        # dirs relative to it.
-        if self.root is not None:
-            self.change_roots(
-                'libbase', 'lib', 'purelib', 'platlib', 'scripts', 'data', 'headers'
-            )
-
-        self.dump_dirs("after prepending root")
-
-        # Find out the build directories, ie. where to install from.
-        self.set_undefined_options(
-            'build', ('build_base', 'build_base'), ('build_lib', 'build_lib')
-        )
-
-        # Punt on doc directories for now -- after all, we're punting on
-        # documentation completely!
-
-    def dump_dirs(self, msg) -> None:
-        """Dumps the list of user options."""
-        if not DEBUG:
-            return
-        from ..fancy_getopt import longopt_xlate
-
-        log.debug(msg + ":")
-        for opt in self.user_options:
-            opt_name = opt[0]
-            if opt_name[-1] == "=":
-                opt_name = opt_name[0:-1]
-            if opt_name in self.negative_opt:
-                opt_name = self.negative_opt[opt_name]
-                opt_name = opt_name.translate(longopt_xlate)
-                val = not getattr(self, opt_name)
-            else:
-                opt_name = opt_name.translate(longopt_xlate)
-                val = getattr(self, opt_name)
-            log.debug("  %s: %s", opt_name, val)
-
-    def finalize_unix(self) -> None:
-        """Finalizes options for posix platforms."""
-        if self.install_base is not None or self.install_platbase is not None:
-            incomplete_scheme = (
-                (
-                    self.install_lib is None
-                    and self.install_purelib is None
-                    and self.install_platlib is None
-                )
-                or self.install_headers is None
-                or self.install_scripts is None
-                or self.install_data is None
-            )
-            if incomplete_scheme:
-                raise DistutilsOptionError(
-                    "install-base or install-platbase supplied, but "
-                    "installation scheme is incomplete"
-                )
-            return
-
-        if self.user:
-            if self.install_userbase is None:
-                raise DistutilsPlatformError("User base directory is not specified")
-            self.install_base = self.install_platbase = self.install_userbase
-            self.select_scheme("posix_user")
-        elif self.home is not None:
-            self.install_base = self.install_platbase = self.home
-            self.select_scheme("posix_home")
-        else:
-            if self.prefix is None:
-                if self.exec_prefix is not None:
-                    raise DistutilsOptionError(
-                        "must not supply exec-prefix without prefix"
-                    )
-
-                # Allow Fedora to add components to the prefix
-                _prefix_addition = getattr(sysconfig, '_prefix_addition', "")
-
-                self.prefix = os.path.normpath(sys.prefix) + _prefix_addition
-                self.exec_prefix = os.path.normpath(sys.exec_prefix) + _prefix_addition
-
-            else:
-                if self.exec_prefix is None:
-                    self.exec_prefix = self.prefix
-
-            self.install_base = self.prefix
-            self.install_platbase = self.exec_prefix
-            self.select_scheme("posix_prefix")
-
-    def finalize_other(self) -> None:
-        """Finalizes options for non-posix platforms"""
-        if self.user:
-            if self.install_userbase is None:
-                raise DistutilsPlatformError("User base directory is not specified")
-            self.install_base = self.install_platbase = self.install_userbase
-            self.select_scheme(os.name + "_user")
-        elif self.home is not None:
-            self.install_base = self.install_platbase = self.home
-            self.select_scheme("posix_home")
-        else:
-            if self.prefix is None:
-                self.prefix = os.path.normpath(sys.prefix)
-
-            self.install_base = self.install_platbase = self.prefix
-            try:
-                self.select_scheme(os.name)
-            except KeyError:
-                raise DistutilsPlatformError(
-                    f"I don't know how to install stuff on '{os.name}'"
-                )
-
-    def select_scheme(self, name) -> None:
-        _select_scheme(self, name)
-
-    def _expand_attrs(self, attrs):
-        for attr in attrs:
-            val = getattr(self, attr)
-            if val is not None:
-                if os.name in ('posix', 'nt'):
-                    val = os.path.expanduser(val)
-                val = subst_vars(val, self.config_vars)
-                setattr(self, attr, val)
-
-    def expand_basedirs(self) -> None:
-        """Calls `os.path.expanduser` on install_base, install_platbase and
-        root."""
-        self._expand_attrs(['install_base', 'install_platbase', 'root'])
-
-    def expand_dirs(self) -> None:
-        """Calls `os.path.expanduser` on install dirs."""
-        self._expand_attrs([
-            'install_purelib',
-            'install_platlib',
-            'install_lib',
-            'install_headers',
-            'install_scripts',
-            'install_data',
-        ])
-
-    def convert_paths(self, *names) -> None:
-        """Call `convert_path` over `names`."""
-        for name in names:
-            attr = "install_" + name
-            setattr(self, attr, convert_path(getattr(self, attr)))
-
-    def handle_extra_path(self) -> None:
-        """Set `path_file` and `extra_dirs` using `extra_path`."""
-        if self.extra_path is None:
-            self.extra_path = self.distribution.extra_path
-
-        if self.extra_path is not None:
-            log.warning(
-                "Distribution option extra_path is deprecated. "
-                "See issue27919 for details."
-            )
-            if isinstance(self.extra_path, str):
-                self.extra_path = self.extra_path.split(',')
-
-            if len(self.extra_path) == 1:
-                path_file = extra_dirs = self.extra_path[0]
-            elif len(self.extra_path) == 2:
-                path_file, extra_dirs = self.extra_path
-            else:
-                raise DistutilsOptionError(
-                    "'extra_path' option must be a list, tuple, or "
-                    "comma-separated string with 1 or 2 elements"
-                )
-
-            # convert to local form in case Unix notation used (as it
-            # should be in setup scripts)
-            extra_dirs = convert_path(extra_dirs)
-        else:
-            path_file = None
-            extra_dirs = ''
-
-        # XXX should we warn if path_file and not extra_dirs? (in which
-        # case the path file would be harmless but pointless)
-        self.path_file = path_file
-        self.extra_dirs = extra_dirs
-
-    def change_roots(self, *names) -> None:
-        """Change the install directories pointed by name using root."""
-        for name in names:
-            attr = "install_" + name
-            setattr(self, attr, change_root(self.root, getattr(self, attr)))
-
-    def create_home_path(self) -> None:
-        """Create directories under ~."""
-        if not self.user:
-            return
-        home = convert_path(os.path.expanduser("~"))
-        for path in self.config_vars.values():
-            if str(path).startswith(home) and not os.path.isdir(path):
-                self.debug_print(f"os.makedirs('{path}', 0o700)")
-                os.makedirs(path, 0o700)
-
-    # -- Command execution methods -------------------------------------
-
-    def run(self):
-        """Runs the command."""
-        # Obviously have to build before we can install
-        if not self.skip_build:
-            self.run_command('build')
-            # If we built for any other platform, we can't install.
-            build_plat = self.distribution.get_command_obj('build').plat_name
-            # check warn_dir - it is a clue that the 'install' is happening
-            # internally, and not to sys.path, so we don't check the platform
-            # matches what we are running.
-            if self.warn_dir and build_plat != get_platform():
-                raise DistutilsPlatformError("Can't install when cross-compiling")
-
-        # Run all sub-commands (at least those that need to be run)
-        for cmd_name in self.get_sub_commands():
-            self.run_command(cmd_name)
-
-        if self.path_file:
-            self.create_path_file()
-
-        # write list of installed files, if requested.
-        if self.record:
-            outputs = self.get_outputs()
-            if self.root:  # strip any package prefix
-                root_len = len(self.root)
-                for counter in range(len(outputs)):
-                    outputs[counter] = outputs[counter][root_len:]
-            self.execute(
-                write_file,
-                (self.record, outputs),
-                f"writing list of installed files to '{self.record}'",
-            )
-
-        sys_path = map(os.path.normpath, sys.path)
-        sys_path = map(os.path.normcase, sys_path)
-        install_lib = os.path.normcase(os.path.normpath(self.install_lib))
-        if (
-            self.warn_dir
-            and not (self.path_file and self.install_path_file)
-            and install_lib not in sys_path
-        ):
-            log.debug(
-                (
-                    "modules installed to '%s', which is not in "
-                    "Python's module search path (sys.path) -- "
-                    "you'll have to change the search path yourself"
-                ),
-                self.install_lib,
-            )
-
-    def create_path_file(self):
-        """Creates the .pth file"""
-        filename = os.path.join(self.install_libbase, self.path_file + ".pth")
-        if self.install_path_file:
-            self.execute(
-                write_file, (filename, [self.extra_dirs]), f"creating {filename}"
-            )
-        else:
-            self.warn(f"path file '{filename}' not created")
-
-    # -- Reporting methods ---------------------------------------------
-
-    def get_outputs(self):
-        """Assembles the outputs of all the sub-commands."""
-        outputs = []
-        for cmd_name in self.get_sub_commands():
-            cmd = self.get_finalized_command(cmd_name)
-            # Add the contents of cmd.get_outputs(), ensuring
-            # that outputs doesn't contain duplicate entries
-            for filename in cmd.get_outputs():
-                if filename not in outputs:
-                    outputs.append(filename)
-
-        if self.path_file and self.install_path_file:
-            outputs.append(os.path.join(self.install_libbase, self.path_file + ".pth"))
-
-        return outputs
-
-    def get_inputs(self):
-        """Returns the inputs of all the sub-commands"""
-        # XXX gee, this looks familiar ;-(
-        inputs = []
-        for cmd_name in self.get_sub_commands():
-            cmd = self.get_finalized_command(cmd_name)
-            inputs.extend(cmd.get_inputs())
-
-        return inputs
-
-    # -- Predicates for sub-command list -------------------------------
-
-    def has_lib(self):
-        """Returns true if the current distribution has any Python
-        modules to install."""
-        return (
-            self.distribution.has_pure_modules() or self.distribution.has_ext_modules()
-        )
-
-    def has_headers(self):
-        """Returns true if the current distribution has any headers to
-        install."""
-        return self.distribution.has_headers()
-
-    def has_scripts(self):
-        """Returns true if the current distribution has any scripts to.
-        install."""
-        return self.distribution.has_scripts()
-
-    def has_data(self):
-        """Returns true if the current distribution has any data to.
-        install."""
-        return self.distribution.has_data_files()
-
-    # 'sub_commands': a list of commands this command might have to run to
-    # get its work done.  See cmd.py for more info.
-    sub_commands = [
-        ('install_lib', has_lib),
-        ('install_headers', has_headers),
-        ('install_scripts', has_scripts),
-        ('install_data', has_data),
-        ('install_egg_info', lambda self: True),
-    ]
diff --git a/voxvera/vendor/setuptools/_distutils/command/install_data.py b/voxvera/vendor/setuptools/_distutils/command/install_data.py
deleted file mode 100644
index 4ad186e..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/install_data.py
+++ /dev/null
@@ -1,94 +0,0 @@
-"""distutils.command.install_data
-
-Implements the Distutils 'install_data' command, for installing
-platform-independent data files."""
-
-# contributed by Bastian Kleineidam
-
-from __future__ import annotations
-
-import functools
-import os
-from collections.abc import Iterable
-from typing import ClassVar
-
-from ..core import Command
-from ..util import change_root, convert_path
-
-
-class install_data(Command):
-    description = "install data files"
-
-    user_options = [
-        (
-            'install-dir=',
-            'd',
-            "base directory for installing data files [default: installation base dir]",
-        ),
-        ('root=', None, "install everything relative to this alternate root directory"),
-        ('force', 'f', "force installation (overwrite existing files)"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['force']
-
-    def initialize_options(self):
-        self.install_dir = None
-        self.outfiles = []
-        self.root = None
-        self.force = False
-        self.data_files = self.distribution.data_files
-        self.warn_dir = True
-
-    def finalize_options(self) -> None:
-        self.set_undefined_options(
-            'install',
-            ('install_data', 'install_dir'),
-            ('root', 'root'),
-            ('force', 'force'),
-        )
-
-    def run(self) -> None:
-        self.mkpath(self.install_dir)
-        for f in self.data_files:
-            self._copy(f)
-
-    @functools.singledispatchmethod
-    def _copy(self, f: tuple[str | os.PathLike, Iterable[str | os.PathLike]]):
-        # it's a tuple with path to install to and a list of files
-        dir = convert_path(f[0])
-        if not os.path.isabs(dir):
-            dir = os.path.join(self.install_dir, dir)
-        elif self.root:
-            dir = change_root(self.root, dir)
-        self.mkpath(dir)
-
-        if f[1] == []:
-            # If there are no files listed, the user must be
-            # trying to create an empty directory, so add the
-            # directory to the list of output files.
-            self.outfiles.append(dir)
-        else:
-            # Copy files, adding them to the list of output files.
-            for data in f[1]:
-                data = convert_path(data)
-                (out, _) = self.copy_file(data, dir)
-                self.outfiles.append(out)
-
-    @_copy.register(str)
-    @_copy.register(os.PathLike)
-    def _(self, f: str | os.PathLike):
-        # it's a simple file, so copy it
-        f = convert_path(f)
-        if self.warn_dir:
-            self.warn(
-                "setup script did not provide a directory for "
-                f"'{f}' -- installing right in '{self.install_dir}'"
-            )
-        (out, _) = self.copy_file(f, self.install_dir)
-        self.outfiles.append(out)
-
-    def get_inputs(self):
-        return self.data_files or []
-
-    def get_outputs(self):
-        return self.outfiles
diff --git a/voxvera/vendor/setuptools/_distutils/command/install_egg_info.py b/voxvera/vendor/setuptools/_distutils/command/install_egg_info.py
deleted file mode 100644
index 6840b34..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/install_egg_info.py
+++ /dev/null
@@ -1,90 +0,0 @@
-"""
-distutils.command.install_egg_info
-
-Implements the Distutils 'install_egg_info' command, for installing
-a package's PKG-INFO metadata.
-"""
-
-import os
-import re
-import sys
-from typing import ClassVar
-
-from .. import dir_util
-from .._log import log
-from ..cmd import Command
-
-
-class install_egg_info(Command):
-    """Install an .egg-info file for the package"""
-
-    description = "Install package's PKG-INFO metadata as an .egg-info file"
-    user_options: ClassVar[list[tuple[str, str, str]]] = [
-        ('install-dir=', 'd', "directory to install to"),
-    ]
-
-    def initialize_options(self):
-        self.install_dir = None
-
-    @property
-    def basename(self):
-        """
-        Allow basename to be overridden by child class.
-        Ref pypa/distutils#2.
-        """
-        name = to_filename(safe_name(self.distribution.get_name()))
-        version = to_filename(safe_version(self.distribution.get_version()))
-        return f"{name}-{version}-py{sys.version_info.major}.{sys.version_info.minor}.egg-info"
-
-    def finalize_options(self):
-        self.set_undefined_options('install_lib', ('install_dir', 'install_dir'))
-        self.target = os.path.join(self.install_dir, self.basename)
-        self.outputs = [self.target]
-
-    def run(self):
-        target = self.target
-        if os.path.isdir(target) and not os.path.islink(target):
-            dir_util.remove_tree(target)
-        elif os.path.exists(target):
-            self.execute(os.unlink, (self.target,), "Removing " + target)
-        elif not os.path.isdir(self.install_dir):
-            self.execute(
-                os.makedirs, (self.install_dir,), "Creating " + self.install_dir
-            )
-        log.info("Writing %s", target)
-        with open(target, 'w', encoding='UTF-8') as f:
-            self.distribution.metadata.write_pkg_file(f)
-
-    def get_outputs(self):
-        return self.outputs
-
-
-# The following routines are taken from setuptools' pkg_resources module and
-# can be replaced by importing them from pkg_resources once it is included
-# in the stdlib.
-
-
-def safe_name(name):
-    """Convert an arbitrary string to a standard distribution name
-
-    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
-    """
-    return re.sub('[^A-Za-z0-9.]+', '-', name)
-
-
-def safe_version(version):
-    """Convert an arbitrary string to a standard version string
-
-    Spaces become dots, and all other non-alphanumeric characters become
-    dashes, with runs of multiple dashes condensed to a single dash.
-    """
-    version = version.replace(' ', '.')
-    return re.sub('[^A-Za-z0-9.]+', '-', version)
-
-
-def to_filename(name):
-    """Convert a project or version name to its filename-escaped form
-
-    Any '-' characters are currently replaced with '_'.
-    """
-    return name.replace('-', '_')
diff --git a/voxvera/vendor/setuptools/_distutils/command/install_headers.py b/voxvera/vendor/setuptools/_distutils/command/install_headers.py
deleted file mode 100644
index 97af137..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/install_headers.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""distutils.command.install_headers
-
-Implements the Distutils 'install_headers' command, to install C/C++ header
-files to the Python include directory."""
-
-from typing import ClassVar
-
-from ..core import Command
-
-
-# XXX force is never used
-class install_headers(Command):
-    description = "install C/C++ header files"
-
-    user_options: ClassVar[list[tuple[str, str, str]]] = [
-        ('install-dir=', 'd', "directory to install header files to"),
-        ('force', 'f', "force installation (overwrite existing files)"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['force']
-
-    def initialize_options(self):
-        self.install_dir = None
-        self.force = False
-        self.outfiles = []
-
-    def finalize_options(self):
-        self.set_undefined_options(
-            'install', ('install_headers', 'install_dir'), ('force', 'force')
-        )
-
-    def run(self):
-        headers = self.distribution.headers
-        if not headers:
-            return
-
-        self.mkpath(self.install_dir)
-        for header in headers:
-            (out, _) = self.copy_file(header, self.install_dir)
-            self.outfiles.append(out)
-
-    def get_inputs(self):
-        return self.distribution.headers or []
-
-    def get_outputs(self):
-        return self.outfiles
diff --git a/voxvera/vendor/setuptools/_distutils/command/install_lib.py b/voxvera/vendor/setuptools/_distutils/command/install_lib.py
deleted file mode 100644
index 9909a61..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/install_lib.py
+++ /dev/null
@@ -1,236 +0,0 @@
-"""distutils.command.install_lib
-
-Implements the Distutils 'install_lib' command
-(install all Python modules)."""
-
-from __future__ import annotations
-
-import importlib.util
-import os
-import sys
-from typing import Any, ClassVar
-
-from ..core import Command
-from ..errors import DistutilsOptionError
-
-# Extension for Python source files.
-PYTHON_SOURCE_EXTENSION = ".py"
-
-
-class install_lib(Command):
-    description = "install all Python modules (extensions and pure Python)"
-
-    # The byte-compilation options are a tad confusing.  Here are the
-    # possible scenarios:
-    #   1) no compilation at all (--no-compile --no-optimize)
-    #   2) compile .pyc only (--compile --no-optimize; default)
-    #   3) compile .pyc and "opt-1" .pyc (--compile --optimize)
-    #   4) compile "opt-1" .pyc only (--no-compile --optimize)
-    #   5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
-    #   6) compile "opt-2" .pyc only (--no-compile --optimize-more)
-    #
-    # The UI for this is two options, 'compile' and 'optimize'.
-    # 'compile' is strictly boolean, and only decides whether to
-    # generate .pyc files.  'optimize' is three-way (0, 1, or 2), and
-    # decides both whether to generate .pyc files and what level of
-    # optimization to use.
-
-    user_options = [
-        ('install-dir=', 'd', "directory to install to"),
-        ('build-dir=', 'b', "build directory (where to install from)"),
-        ('force', 'f', "force installation (overwrite existing files)"),
-        ('compile', 'c', "compile .py to .pyc [default]"),
-        ('no-compile', None, "don't compile .py files"),
-        (
-            'optimize=',
-            'O',
-            "also compile with optimization: -O1 for \"python -O\", "
-            "-O2 for \"python -OO\", and -O0 to disable [default: -O0]",
-        ),
-        ('skip-build', None, "skip the build steps"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['force', 'compile', 'skip-build']
-    negative_opt: ClassVar[dict[str, str]] = {'no-compile': 'compile'}
-
-    def initialize_options(self):
-        # let the 'install' command dictate our installation directory
-        self.install_dir = None
-        self.build_dir = None
-        self.force = False
-        self.compile = None
-        self.optimize = None
-        self.skip_build = None
-
-    def finalize_options(self) -> None:
-        # Get all the information we need to install pure Python modules
-        # from the umbrella 'install' command -- build (source) directory,
-        # install (target) directory, and whether to compile .py files.
-        self.set_undefined_options(
-            'install',
-            ('build_lib', 'build_dir'),
-            ('install_lib', 'install_dir'),
-            ('force', 'force'),
-            ('compile', 'compile'),
-            ('optimize', 'optimize'),
-            ('skip_build', 'skip_build'),
-        )
-
-        if self.compile is None:
-            self.compile = True
-        if self.optimize is None:
-            self.optimize = False
-
-        if not isinstance(self.optimize, int):
-            try:
-                self.optimize = int(self.optimize)
-            except ValueError:
-                pass
-            if self.optimize not in (0, 1, 2):
-                raise DistutilsOptionError("optimize must be 0, 1, or 2")
-
-    def run(self) -> None:
-        # Make sure we have built everything we need first
-        self.build()
-
-        # Install everything: simply dump the entire contents of the build
-        # directory to the installation directory (that's the beauty of
-        # having a build directory!)
-        outfiles = self.install()
-
-        # (Optionally) compile .py to .pyc
-        if outfiles is not None and self.distribution.has_pure_modules():
-            self.byte_compile(outfiles)
-
-    # -- Top-level worker functions ------------------------------------
-    # (called from 'run()')
-
-    def build(self) -> None:
-        if not self.skip_build:
-            if self.distribution.has_pure_modules():
-                self.run_command('build_py')
-            if self.distribution.has_ext_modules():
-                self.run_command('build_ext')
-
-    # Any: https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#the-any-trick
-    def install(self) -> list[str] | Any:
-        if os.path.isdir(self.build_dir):
-            outfiles = self.copy_tree(self.build_dir, self.install_dir)
-        else:
-            self.warn(
-                f"'{self.build_dir}' does not exist -- no Python modules to install"
-            )
-            return
-        return outfiles
-
-    def byte_compile(self, files) -> None:
-        if sys.dont_write_bytecode:
-            self.warn('byte-compiling is disabled, skipping.')
-            return
-
-        from ..util import byte_compile
-
-        # Get the "--root" directory supplied to the "install" command,
-        # and use it as a prefix to strip off the purported filename
-        # encoded in bytecode files.  This is far from complete, but it
-        # should at least generate usable bytecode in RPM distributions.
-        install_root = self.get_finalized_command('install').root
-
-        if self.compile:
-            byte_compile(
-                files,
-                optimize=0,
-                force=self.force,
-                prefix=install_root,
-            )
-        if self.optimize > 0:
-            byte_compile(
-                files,
-                optimize=self.optimize,
-                force=self.force,
-                prefix=install_root,
-                verbose=self.verbose,
-            )
-
-    # -- Utility methods -----------------------------------------------
-
-    def _mutate_outputs(self, has_any, build_cmd, cmd_option, output_dir):
-        if not has_any:
-            return []
-
-        build_cmd = self.get_finalized_command(build_cmd)
-        build_files = build_cmd.get_outputs()
-        build_dir = getattr(build_cmd, cmd_option)
-
-        prefix_len = len(build_dir) + len(os.sep)
-        outputs = [os.path.join(output_dir, file[prefix_len:]) for file in build_files]
-
-        return outputs
-
-    def _bytecode_filenames(self, py_filenames):
-        bytecode_files = []
-        for py_file in py_filenames:
-            # Since build_py handles package data installation, the
-            # list of outputs can contain more than just .py files.
-            # Make sure we only report bytecode for the .py files.
-            ext = os.path.splitext(os.path.normcase(py_file))[1]
-            if ext != PYTHON_SOURCE_EXTENSION:
-                continue
-            if self.compile:
-                bytecode_files.append(
-                    importlib.util.cache_from_source(py_file, optimization='')
-                )
-            if self.optimize > 0:
-                bytecode_files.append(
-                    importlib.util.cache_from_source(
-                        py_file, optimization=self.optimize
-                    )
-                )
-
-        return bytecode_files
-
-    # -- External interface --------------------------------------------
-    # (called by outsiders)
-
-    def get_outputs(self):
-        """Return the list of files that would be installed if this command
-        were actually run.  Not affected by the "dry-run" flag or whether
-        modules have actually been built yet.
-        """
-        pure_outputs = self._mutate_outputs(
-            self.distribution.has_pure_modules(),
-            'build_py',
-            'build_lib',
-            self.install_dir,
-        )
-        if self.compile:
-            bytecode_outputs = self._bytecode_filenames(pure_outputs)
-        else:
-            bytecode_outputs = []
-
-        ext_outputs = self._mutate_outputs(
-            self.distribution.has_ext_modules(),
-            'build_ext',
-            'build_lib',
-            self.install_dir,
-        )
-
-        return pure_outputs + bytecode_outputs + ext_outputs
-
-    def get_inputs(self):
-        """Get the list of files that are input to this command, ie. the
-        files that get installed as they are named in the build tree.
-        The files in this list correspond one-to-one to the output
-        filenames returned by 'get_outputs()'.
-        """
-        inputs = []
-
-        if self.distribution.has_pure_modules():
-            build_py = self.get_finalized_command('build_py')
-            inputs.extend(build_py.get_outputs())
-
-        if self.distribution.has_ext_modules():
-            build_ext = self.get_finalized_command('build_ext')
-            inputs.extend(build_ext.get_outputs())
-
-        return inputs
diff --git a/voxvera/vendor/setuptools/_distutils/command/install_scripts.py b/voxvera/vendor/setuptools/_distutils/command/install_scripts.py
deleted file mode 100644
index 33d235d..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/install_scripts.py
+++ /dev/null
@@ -1,59 +0,0 @@
-"""distutils.command.install_scripts
-
-Implements the Distutils 'install_scripts' command, for installing
-Python scripts."""
-
-# contributed by Bastian Kleineidam
-
-import os
-from distutils._log import log
-from stat import ST_MODE
-from typing import ClassVar
-
-from ..core import Command
-
-
-class install_scripts(Command):
-    description = "install scripts (Python or otherwise)"
-
-    user_options = [
-        ('install-dir=', 'd', "directory to install scripts to"),
-        ('build-dir=', 'b', "build directory (where to install from)"),
-        ('force', 'f', "force installation (overwrite existing files)"),
-        ('skip-build', None, "skip the build steps"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = ['force', 'skip-build']
-
-    def initialize_options(self):
-        self.install_dir = None
-        self.force = False
-        self.build_dir = None
-        self.skip_build = None
-
-    def finalize_options(self) -> None:
-        self.set_undefined_options('build', ('build_scripts', 'build_dir'))
-        self.set_undefined_options(
-            'install',
-            ('install_scripts', 'install_dir'),
-            ('force', 'force'),
-            ('skip_build', 'skip_build'),
-        )
-
-    def run(self) -> None:
-        if not self.skip_build:
-            self.run_command('build_scripts')
-        self.outfiles = self.copy_tree(self.build_dir, self.install_dir)
-        if os.name == 'posix':
-            # Set the executable bits (owner, group, and world) on
-            # all the scripts we just installed.
-            for file in self.get_outputs():
-                mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777
-                log.info("changing mode of %s to %o", file, mode)
-                os.chmod(file, mode)
-
-    def get_inputs(self):
-        return self.distribution.scripts or []
-
-    def get_outputs(self):
-        return self.outfiles or []
diff --git a/voxvera/vendor/setuptools/_distutils/command/sdist.py b/voxvera/vendor/setuptools/_distutils/command/sdist.py
deleted file mode 100644
index e64cc82..0000000
--- a/voxvera/vendor/setuptools/_distutils/command/sdist.py
+++ /dev/null
@@ -1,521 +0,0 @@
-"""distutils.command.sdist
-
-Implements the Distutils 'sdist' command (create a source distribution)."""
-
-from __future__ import annotations
-
-import os
-import sys
-from collections.abc import Callable
-from distutils import archive_util, dir_util, file_util
-from distutils._log import log
-from glob import glob
-from itertools import filterfalse
-from typing import ClassVar
-
-from ..core import Command
-from ..errors import DistutilsOptionError, DistutilsTemplateError
-from ..filelist import FileList
-from ..text_file import TextFile
-from ..util import convert_path
-
-
-def show_formats():
-    """Print all possible values for the 'formats' option (used by
-    the "--help-formats" command-line option).
-    """
-    from ..archive_util import ARCHIVE_FORMATS
-    from ..fancy_getopt import FancyGetopt
-
-    formats = sorted(
-        ("formats=" + format, None, ARCHIVE_FORMATS[format][2])
-        for format in ARCHIVE_FORMATS.keys()
-    )
-    FancyGetopt(formats).print_help("List of available source distribution formats:")
-
-
-class sdist(Command):
-    description = "create a source distribution (tarball, zip file, etc.)"
-
-    def checking_metadata(self) -> bool:
-        """Callable used for the check sub-command.
-
-        Placed here so user_options can view it"""
-        return self.metadata_check
-
-    user_options = [
-        ('template=', 't', "name of manifest template file [default: MANIFEST.in]"),
-        ('manifest=', 'm', "name of manifest file [default: MANIFEST]"),
-        (
-            'use-defaults',
-            None,
-            "include the default file set in the manifest "
-            "[default; disable with --no-defaults]",
-        ),
-        ('no-defaults', None, "don't include the default file set"),
-        (
-            'prune',
-            None,
-            "specifically exclude files/directories that should not be "
-            "distributed (build tree, RCS/CVS dirs, etc.) "
-            "[default; disable with --no-prune]",
-        ),
-        ('no-prune', None, "don't automatically exclude anything"),
-        (
-            'manifest-only',
-            'o',
-            "just regenerate the manifest and then stop (implies --force-manifest)",
-        ),
-        (
-            'force-manifest',
-            'f',
-            "forcibly regenerate the manifest and carry on as usual. "
-            "Deprecated: now the manifest is always regenerated.",
-        ),
-        ('formats=', None, "formats for source distribution (comma-separated list)"),
-        (
-            'keep-temp',
-            'k',
-            "keep the distribution tree around after creating " + "archive file(s)",
-        ),
-        (
-            'dist-dir=',
-            'd',
-            "directory to put the source distribution archive(s) in [default: dist]",
-        ),
-        (
-            'metadata-check',
-            None,
-            "Ensure that all required elements of meta-data "
-            "are supplied. Warn if any missing. [default]",
-        ),
-        (
-            'owner=',
-            'u',
-            "Owner name used when creating a tar file [default: current user]",
-        ),
-        (
-            'group=',
-            'g',
-            "Group name used when creating a tar file [default: current group]",
-        ),
-    ]
-
-    boolean_options: ClassVar[list[str]] = [
-        'use-defaults',
-        'prune',
-        'manifest-only',
-        'force-manifest',
-        'keep-temp',
-        'metadata-check',
-    ]
-
-    help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [
-        ('help-formats', None, "list available distribution formats", show_formats),
-    ]
-
-    negative_opt: ClassVar[dict[str, str]] = {
-        'no-defaults': 'use-defaults',
-        'no-prune': 'prune',
-    }
-
-    sub_commands = [('check', checking_metadata)]
-
-    READMES: ClassVar[tuple[str, ...]] = ('README', 'README.txt', 'README.rst')
-
-    def initialize_options(self):
-        # 'template' and 'manifest' are, respectively, the names of
-        # the manifest template and manifest file.
-        self.template = None
-        self.manifest = None
-
-        # 'use_defaults': if true, we will include the default file set
-        # in the manifest
-        self.use_defaults = True
-        self.prune = True
-
-        self.manifest_only = False
-        self.force_manifest = False
-
-        self.formats = ['gztar']
-        self.keep_temp = False
-        self.dist_dir = None
-
-        self.archive_files = None
-        self.metadata_check = True
-        self.owner = None
-        self.group = None
-
-    def finalize_options(self) -> None:
-        if self.manifest is None:
-            self.manifest = "MANIFEST"
-        if self.template is None:
-            self.template = "MANIFEST.in"
-
-        self.ensure_string_list('formats')
-
-        bad_format = archive_util.check_archive_formats(self.formats)
-        if bad_format:
-            raise DistutilsOptionError(f"unknown archive format '{bad_format}'")
-
-        if self.dist_dir is None:
-            self.dist_dir = "dist"
-
-    def run(self) -> None:
-        # 'filelist' contains the list of files that will make up the
-        # manifest
-        self.filelist = FileList()
-
-        # Run sub commands
-        for cmd_name in self.get_sub_commands():
-            self.run_command(cmd_name)
-
-        # Do whatever it takes to get the list of files to process
-        # (process the manifest template, read an existing manifest,
-        # whatever).  File list is accumulated in 'self.filelist'.
-        self.get_file_list()
-
-        # If user just wanted us to regenerate the manifest, stop now.
-        if self.manifest_only:
-            return
-
-        # Otherwise, go ahead and create the source distribution tarball,
-        # or zipfile, or whatever.
-        self.make_distribution()
-
-    def get_file_list(self) -> None:
-        """Figure out the list of files to include in the source
-        distribution, and put it in 'self.filelist'.  This might involve
-        reading the manifest template (and writing the manifest), or just
-        reading the manifest, or just using the default file set -- it all
-        depends on the user's options.
-        """
-        # new behavior when using a template:
-        # the file list is recalculated every time because
-        # even if MANIFEST.in or setup.py are not changed
-        # the user might have added some files in the tree that
-        # need to be included.
-        #
-        #  This makes --force the default and only behavior with templates.
-        template_exists = os.path.isfile(self.template)
-        if not template_exists and self._manifest_is_not_generated():
-            self.read_manifest()
-            self.filelist.sort()
-            self.filelist.remove_duplicates()
-            return
-
-        if not template_exists:
-            self.warn(
-                ("manifest template '%s' does not exist " + "(using default file list)")
-                % self.template
-            )
-        self.filelist.findall()
-
-        if self.use_defaults:
-            self.add_defaults()
-
-        if template_exists:
-            self.read_template()
-
-        if self.prune:
-            self.prune_file_list()
-
-        self.filelist.sort()
-        self.filelist.remove_duplicates()
-        self.write_manifest()
-
-    def add_defaults(self) -> None:
-        """Add all the default files to self.filelist:
-          - README or README.txt
-          - setup.py
-          - tests/test*.py and test/test*.py
-          - all pure Python modules mentioned in setup script
-          - all files pointed by package_data (build_py)
-          - all files defined in data_files.
-          - all files defined as scripts.
-          - all C sources listed as part of extensions or C libraries
-            in the setup script (doesn't catch C headers!)
-        Warns if (README or README.txt) or setup.py are missing; everything
-        else is optional.
-        """
-        self._add_defaults_standards()
-        self._add_defaults_optional()
-        self._add_defaults_python()
-        self._add_defaults_data_files()
-        self._add_defaults_ext()
-        self._add_defaults_c_libs()
-        self._add_defaults_scripts()
-
-    @staticmethod
-    def _cs_path_exists(fspath):
-        """
-        Case-sensitive path existence check
-
-        >>> sdist._cs_path_exists(__file__)
-        True
-        >>> sdist._cs_path_exists(__file__.upper())
-        False
-        """
-        if not os.path.exists(fspath):
-            return False
-        # make absolute so we always have a directory
-        abspath = os.path.abspath(fspath)
-        directory, filename = os.path.split(abspath)
-        return filename in os.listdir(directory)
-
-    def _add_defaults_standards(self):
-        standards = [self.READMES, self.distribution.script_name]
-        for fn in standards:
-            if isinstance(fn, tuple):
-                alts = fn
-                got_it = False
-                for fn in alts:
-                    if self._cs_path_exists(fn):
-                        got_it = True
-                        self.filelist.append(fn)
-                        break
-
-                if not got_it:
-                    self.warn(
-                        "standard file not found: should have one of " + ', '.join(alts)
-                    )
-            else:
-                if self._cs_path_exists(fn):
-                    self.filelist.append(fn)
-                else:
-                    self.warn(f"standard file '{fn}' not found")
-
-    def _add_defaults_optional(self):
-        optional = ['tests/test*.py', 'test/test*.py', 'setup.cfg']
-        for pattern in optional:
-            files = filter(os.path.isfile, glob(pattern))
-            self.filelist.extend(files)
-
-    def _add_defaults_python(self):
-        # build_py is used to get:
-        #  - python modules
-        #  - files defined in package_data
-        build_py = self.get_finalized_command('build_py')
-
-        # getting python files
-        if self.distribution.has_pure_modules():
-            self.filelist.extend(build_py.get_source_files())
-
-        # getting package_data files
-        # (computed in build_py.data_files by build_py.finalize_options)
-        for _pkg, src_dir, _build_dir, filenames in build_py.data_files:
-            for filename in filenames:
-                self.filelist.append(os.path.join(src_dir, filename))
-
-    def _add_defaults_data_files(self):
-        # getting distribution.data_files
-        if self.distribution.has_data_files():
-            for item in self.distribution.data_files:
-                if isinstance(item, str):
-                    # plain file
-                    item = convert_path(item)
-                    if os.path.isfile(item):
-                        self.filelist.append(item)
-                else:
-                    # a (dirname, filenames) tuple
-                    dirname, filenames = item
-                    for f in filenames:
-                        f = convert_path(f)
-                        if os.path.isfile(f):
-                            self.filelist.append(f)
-
-    def _add_defaults_ext(self):
-        if self.distribution.has_ext_modules():
-            build_ext = self.get_finalized_command('build_ext')
-            self.filelist.extend(build_ext.get_source_files())
-
-    def _add_defaults_c_libs(self):
-        if self.distribution.has_c_libraries():
-            build_clib = self.get_finalized_command('build_clib')
-            self.filelist.extend(build_clib.get_source_files())
-
-    def _add_defaults_scripts(self):
-        if self.distribution.has_scripts():
-            build_scripts = self.get_finalized_command('build_scripts')
-            self.filelist.extend(build_scripts.get_source_files())
-
-    def read_template(self) -> None:
-        """Read and parse manifest template file named by self.template.
-
-        (usually "MANIFEST.in") The parsing and processing is done by
-        'self.filelist', which updates itself accordingly.
-        """
-        log.info("reading manifest template '%s'", self.template)
-        template = TextFile(
-            self.template,
-            strip_comments=True,
-            skip_blanks=True,
-            join_lines=True,
-            lstrip_ws=True,
-            rstrip_ws=True,
-            collapse_join=True,
-        )
-
-        try:
-            while True:
-                line = template.readline()
-                if line is None:  # end of file
-                    break
-
-                try:
-                    self.filelist.process_template_line(line)
-                # the call above can raise a DistutilsTemplateError for
-                # malformed lines, or a ValueError from the lower-level
-                # convert_path function
-                except (DistutilsTemplateError, ValueError) as msg:
-                    self.warn(
-                        f"{template.filename}, line {int(template.current_line)}: {msg}"
-                    )
-        finally:
-            template.close()
-
-    def prune_file_list(self) -> None:
-        """Prune off branches that might slip into the file list as created
-        by 'read_template()', but really don't belong there:
-          * the build tree (typically "build")
-          * the release tree itself (only an issue if we ran "sdist"
-            previously with --keep-temp, or it aborted)
-          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
-        """
-        build = self.get_finalized_command('build')
-        base_dir = self.distribution.get_fullname()
-
-        self.filelist.exclude_pattern(None, prefix=os.fspath(build.build_base))
-        self.filelist.exclude_pattern(None, prefix=base_dir)
-
-        if sys.platform == 'win32':
-            seps = r'/|\\'
-        else:
-            seps = '/'
-
-        vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr', '_darcs']
-        vcs_ptrn = r'(^|{})({})({}).*'.format(seps, '|'.join(vcs_dirs), seps)
-        self.filelist.exclude_pattern(vcs_ptrn, is_regex=True)
-
-    def write_manifest(self) -> None:
-        """Write the file list in 'self.filelist' (presumably as filled in
-        by 'add_defaults()' and 'read_template()') to the manifest file
-        named by 'self.manifest'.
-        """
-        if self._manifest_is_not_generated():
-            log.info(
-                f"not writing to manually maintained manifest file '{self.manifest}'"
-            )
-            return
-
-        content = self.filelist.files[:]
-        content.insert(0, '# file GENERATED by distutils, do NOT edit')
-        self.execute(
-            file_util.write_file,
-            (self.manifest, content),
-            f"writing manifest file '{self.manifest}'",
-        )
-
-    def _manifest_is_not_generated(self):
-        # check for special comment used in 3.1.3 and higher
-        if not os.path.isfile(self.manifest):
-            return False
-
-        with open(self.manifest, encoding='utf-8') as fp:
-            first_line = next(fp)
-        return first_line != '# file GENERATED by distutils, do NOT edit\n'
-
-    def read_manifest(self) -> None:
-        """Read the manifest file (named by 'self.manifest') and use it to
-        fill in 'self.filelist', the list of files to include in the source
-        distribution.
-        """
-        log.info("reading manifest file '%s'", self.manifest)
-        with open(self.manifest, encoding='utf-8') as lines:
-            self.filelist.extend(
-                # ignore comments and blank lines
-                filter(None, filterfalse(is_comment, map(str.strip, lines)))
-            )
-
-    def make_release_tree(self, base_dir, files) -> None:
-        """Create the directory tree that will become the source
-        distribution archive.  All directories implied by the filenames in
-        'files' are created under 'base_dir', and then we hard link or copy
-        (if hard linking is unavailable) those files into place.
-        Essentially, this duplicates the developer's source tree, but in a
-        directory named after the distribution, containing only the files
-        to be distributed.
-        """
-        # Create all the directories under 'base_dir' necessary to
-        # put 'files' there; the 'mkpath()' is just so we don't die
-        # if the manifest happens to be empty.
-        self.mkpath(base_dir)
-        dir_util.create_tree(base_dir, files)
-
-        # And walk over the list of files, either making a hard link (if
-        # os.link exists) to each one that doesn't already exist in its
-        # corresponding location under 'base_dir', or copying each file
-        # that's out-of-date in 'base_dir'.  (Usually, all files will be
-        # out-of-date, because by default we blow away 'base_dir' when
-        # we're done making the distribution archives.)
-
-        if hasattr(os, 'link'):  # can make hard links on this system
-            link = 'hard'
-            msg = f"making hard links in {base_dir}..."
-        else:  # nope, have to copy
-            link = None
-            msg = f"copying files to {base_dir}..."
-
-        if not files:
-            log.warning("no files to distribute -- empty manifest?")
-        else:
-            log.info(msg)
-        for file in files:
-            if not os.path.isfile(file):
-                log.warning("'%s' not a regular file -- skipping", file)
-            else:
-                dest = os.path.join(base_dir, file)
-                self.copy_file(file, dest, link=link)
-
-        self.distribution.metadata.write_pkg_info(base_dir)
-
-    def make_distribution(self) -> None:
-        """Create the source distribution(s).  First, we create the release
-        tree with 'make_release_tree()'; then, we create all required
-        archive files (according to 'self.formats') from the release tree.
-        Finally, we clean up by blowing away the release tree (unless
-        'self.keep_temp' is true).  The list of archive files created is
-        stored so it can be retrieved later by 'get_archive_files()'.
-        """
-        # Don't warn about missing meta-data here -- should be (and is!)
-        # done elsewhere.
-        base_dir = self.distribution.get_fullname()
-        base_name = os.path.join(self.dist_dir, base_dir)
-
-        self.make_release_tree(base_dir, self.filelist.files)
-        archive_files = []  # remember names of files we create
-        # tar archive must be created last to avoid overwrite and remove
-        if 'tar' in self.formats:
-            self.formats.append(self.formats.pop(self.formats.index('tar')))
-
-        for fmt in self.formats:
-            file = self.make_archive(
-                base_name, fmt, base_dir=base_dir, owner=self.owner, group=self.group
-            )
-            archive_files.append(file)
-            self.distribution.dist_files.append(('sdist', '', file))
-
-        self.archive_files = archive_files
-
-        if not self.keep_temp:
-            dir_util.remove_tree(base_dir)
-
-    def get_archive_files(self):
-        """Return the list of archive files created when the command
-        was run, or None if the command hasn't run yet.
-        """
-        return self.archive_files
-
-
-def is_comment(line: str) -> bool:
-    return line.startswith('#')
diff --git a/voxvera/vendor/setuptools/_distutils/compat/__init__.py b/voxvera/vendor/setuptools/_distutils/compat/__init__.py
deleted file mode 100644
index 2c43729..0000000
--- a/voxvera/vendor/setuptools/_distutils/compat/__init__.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from __future__ import annotations
-
-from collections.abc import Iterable
-from typing import TypeVar
-
-_IterableT = TypeVar("_IterableT", bound="Iterable[str]")
-
-
-def consolidate_linker_args(args: _IterableT) -> _IterableT | str:
-    """
-    Ensure the return value is a string for backward compatibility.
-
-    Retain until at least 2025-04-31. See pypa/distutils#246
-    """
-
-    if not all(arg.startswith('-Wl,') for arg in args):
-        return args
-    return '-Wl,' + ','.join(arg.removeprefix('-Wl,') for arg in args)
diff --git a/voxvera/vendor/setuptools/_distutils/compat/numpy.py b/voxvera/vendor/setuptools/_distutils/compat/numpy.py
deleted file mode 100644
index 73eca7a..0000000
--- a/voxvera/vendor/setuptools/_distutils/compat/numpy.py
+++ /dev/null
@@ -1,2 +0,0 @@
-# required for older numpy versions on Pythons prior to 3.12; see pypa/setuptools#4876
-from ..compilers.C.base import _default_compilers, compiler_class  # noqa: F401
diff --git a/voxvera/vendor/setuptools/_distutils/compat/py39.py b/voxvera/vendor/setuptools/_distutils/compat/py39.py
deleted file mode 100644
index 1b436d7..0000000
--- a/voxvera/vendor/setuptools/_distutils/compat/py39.py
+++ /dev/null
@@ -1,66 +0,0 @@
-import functools
-import itertools
-import platform
-import sys
-
-
-def add_ext_suffix_39(vars):
-    """
-    Ensure vars contains 'EXT_SUFFIX'. pypa/distutils#130
-    """
-    import _imp
-
-    ext_suffix = _imp.extension_suffixes()[0]
-    vars.update(
-        EXT_SUFFIX=ext_suffix,
-        # sysconfig sets SO to match EXT_SUFFIX, so maintain
-        # that expectation.
-        # https://github.com/python/cpython/blob/785cc6770588de087d09e89a69110af2542be208/Lib/sysconfig.py#L671-L673
-        SO=ext_suffix,
-    )
-
-
-needs_ext_suffix = sys.version_info < (3, 10) and platform.system() == 'Windows'
-add_ext_suffix = add_ext_suffix_39 if needs_ext_suffix else lambda vars: None
-
-
-# from more_itertools
-class UnequalIterablesError(ValueError):
-    def __init__(self, details=None):
-        msg = 'Iterables have different lengths'
-        if details is not None:
-            msg += (': index 0 has length {}; index {} has length {}').format(*details)
-
-        super().__init__(msg)
-
-
-# from more_itertools
-def _zip_equal_generator(iterables):
-    _marker = object()
-    for combo in itertools.zip_longest(*iterables, fillvalue=_marker):
-        for val in combo:
-            if val is _marker:
-                raise UnequalIterablesError()
-        yield combo
-
-
-# from more_itertools
-def _zip_equal(*iterables):
-    # Check whether the iterables are all the same size.
-    try:
-        first_size = len(iterables[0])
-        for i, it in enumerate(iterables[1:], 1):
-            size = len(it)
-            if size != first_size:
-                raise UnequalIterablesError(details=(first_size, i, size))
-        # All sizes are equal, we can use the built-in zip.
-        return zip(*iterables)
-    # If any one of the iterables didn't have a length, start reading
-    # them until one runs out.
-    except TypeError:
-        return _zip_equal_generator(iterables)
-
-
-zip_strict = (
-    _zip_equal if sys.version_info < (3, 10) else functools.partial(zip, strict=True)
-)
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/base.py b/voxvera/vendor/setuptools/_distutils/compilers/C/base.py
deleted file mode 100644
index ea6b545..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/base.py
+++ /dev/null
@@ -1,1386 +0,0 @@
-"""distutils.ccompiler
-
-Contains Compiler, an abstract base class that defines the interface
-for the Distutils compiler abstraction model."""
-
-from __future__ import annotations
-
-import os
-import pathlib
-import re
-import sys
-import warnings
-from collections.abc import Callable, Iterable, MutableSequence, Sequence
-from typing import (
-    TYPE_CHECKING,
-    ClassVar,
-    Literal,
-    TypeVar,
-    Union,
-    overload,
-)
-
-from more_itertools import always_iterable
-
-from ..._log import log
-from ..._modified import newer_group
-from ...dir_util import mkpath
-from ...errors import (
-    DistutilsModuleError,
-    DistutilsPlatformError,
-)
-from ...file_util import move_file
-from ...spawn import spawn
-from ...util import execute, is_mingw, split_quoted
-from .errors import (
-    CompileError,
-    LinkError,
-    UnknownFileType,
-)
-
-if TYPE_CHECKING:
-    from typing_extensions import TypeAlias, TypeVarTuple, Unpack
-
-    _Ts = TypeVarTuple("_Ts")
-
-_Macro: TypeAlias = Union[tuple[str], tuple[str, Union[str, None]]]
-_StrPathT = TypeVar("_StrPathT", bound="str | os.PathLike[str]")
-_BytesPathT = TypeVar("_BytesPathT", bound="bytes | os.PathLike[bytes]")
-
-
-class Compiler:
-    """Abstract base class to define the interface that must be implemented
-    by real compiler classes.  Also has some utility methods used by
-    several compiler classes.
-
-    The basic idea behind a compiler abstraction class is that each
-    instance can be used for all the compile/link steps in building a
-    single project.  Thus, attributes common to all of those compile and
-    link steps -- include directories, macros to define, libraries to link
-    against, etc. -- are attributes of the compiler instance.  To allow for
-    variability in how individual files are treated, most of those
-    attributes may be varied on a per-compilation or per-link basis.
-    """
-
-    # 'compiler_type' is a class attribute that identifies this class.  It
-    # keeps code that wants to know what kind of compiler it's dealing with
-    # from having to import all possible compiler classes just to do an
-    # 'isinstance'.  In concrete CCompiler subclasses, 'compiler_type'
-    # should really, really be one of the keys of the 'compiler_class'
-    # dictionary (see below -- used by the 'new_compiler()' factory
-    # function) -- authors of new compiler interface classes are
-    # responsible for updating 'compiler_class'!
-    compiler_type: ClassVar[str] = None  # type: ignore[assignment]
-
-    # XXX things not handled by this compiler abstraction model:
-    #   * client can't provide additional options for a compiler,
-    #     e.g. warning, optimization, debugging flags.  Perhaps this
-    #     should be the domain of concrete compiler abstraction classes
-    #     (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base
-    #     class should have methods for the common ones.
-    #   * can't completely override the include or library searchg
-    #     path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2".
-    #     I'm not sure how widely supported this is even by Unix
-    #     compilers, much less on other platforms.  And I'm even less
-    #     sure how useful it is; maybe for cross-compiling, but
-    #     support for that is a ways off.  (And anyways, cross
-    #     compilers probably have a dedicated binary with the
-    #     right paths compiled in.  I hope.)
-    #   * can't do really freaky things with the library list/library
-    #     dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against
-    #     different versions of libfoo.a in different locations.  I
-    #     think this is useless without the ability to null out the
-    #     library search path anyways.
-
-    executables: ClassVar[dict]
-
-    # Subclasses that rely on the standard filename generation methods
-    # implemented below should override these; see the comment near
-    # those methods ('object_filenames()' et. al.) for details:
-    src_extensions: ClassVar[list[str] | None] = None
-    obj_extension: ClassVar[str | None] = None
-    static_lib_extension: ClassVar[str | None] = None
-    shared_lib_extension: ClassVar[str | None] = None
-    static_lib_format: ClassVar[str | None] = None  # format string
-    shared_lib_format: ClassVar[str | None] = None  # prob. same as static_lib_format
-    exe_extension: ClassVar[str | None] = None
-
-    # Default language settings. language_map is used to detect a source
-    # file or Extension target language, checking source filenames.
-    # language_order is used to detect the language precedence, when deciding
-    # what language to use when mixing source types. For example, if some
-    # extension has two files with ".c" extension, and one with ".cpp", it
-    # is still linked as c++.
-    language_map: ClassVar[dict[str, str]] = {
-        ".c": "c",
-        ".cc": "c++",
-        ".cpp": "c++",
-        ".cxx": "c++",
-        ".m": "objc",
-    }
-    language_order: ClassVar[list[str]] = ["c++", "objc", "c"]
-
-    include_dirs: list[str] = []
-    """
-    include dirs specific to this compiler class
-    """
-
-    library_dirs: list[str] = []
-    """
-    library dirs specific to this compiler class
-    """
-
-    def __init__(self, verbose: bool = False, force: bool = False) -> None:
-        self.force = force
-        self.verbose = verbose
-
-        # 'output_dir': a common output directory for object, library,
-        # shared object, and shared library files
-        self.output_dir: str | None = None
-
-        # 'macros': a list of macro definitions (or undefinitions).  A
-        # macro definition is a 2-tuple (name, value), where the value is
-        # either a string or None (no explicit value).  A macro
-        # undefinition is a 1-tuple (name,).
-        self.macros: list[_Macro] = []
-
-        # 'include_dirs': a list of directories to search for include files
-        self.include_dirs = []
-
-        # 'libraries': a list of libraries to include in any link
-        # (library names, not filenames: eg. "foo" not "libfoo.a")
-        self.libraries: list[str] = []
-
-        # 'library_dirs': a list of directories to search for libraries
-        self.library_dirs = []
-
-        # 'runtime_library_dirs': a list of directories to search for
-        # shared libraries/objects at runtime
-        self.runtime_library_dirs: list[str] = []
-
-        # 'objects': a list of object files (or similar, such as explicitly
-        # named library files) to include on any link
-        self.objects: list[str] = []
-
-        for key in self.executables.keys():
-            self.set_executable(key, self.executables[key])
-
-    def set_executables(self, **kwargs: str) -> None:
-        """Define the executables (and options for them) that will be run
-        to perform the various stages of compilation.  The exact set of
-        executables that may be specified here depends on the compiler
-        class (via the 'executables' class attribute), but most will have:
-          compiler      the C/C++ compiler
-          linker_so     linker used to create shared objects and libraries
-          linker_exe    linker used to create binary executables
-          archiver      static library creator
-
-        On platforms with a command-line (Unix, DOS/Windows), each of these
-        is a string that will be split into executable name and (optional)
-        list of arguments.  (Splitting the string is done similarly to how
-        Unix shells operate: words are delimited by spaces, but quotes and
-        backslashes can override this.  See
-        'distutils.util.split_quoted()'.)
-        """
-
-        # Note that some CCompiler implementation classes will define class
-        # attributes 'cpp', 'cc', etc. with hard-coded executable names;
-        # this is appropriate when a compiler class is for exactly one
-        # compiler/OS combination (eg. MSVCCompiler).  Other compiler
-        # classes (UnixCCompiler, in particular) are driven by information
-        # discovered at run-time, since there are many different ways to do
-        # basically the same things with Unix C compilers.
-
-        for key in kwargs:
-            if key not in self.executables:
-                raise ValueError(
-                    f"unknown executable '{key}' for class {self.__class__.__name__}"
-                )
-            self.set_executable(key, kwargs[key])
-
-    def set_executable(self, key, value):
-        if isinstance(value, str):
-            setattr(self, key, split_quoted(value))
-        else:
-            setattr(self, key, value)
-
-    def _find_macro(self, name):
-        i = 0
-        for defn in self.macros:
-            if defn[0] == name:
-                return i
-            i += 1
-        return None
-
-    def _check_macro_definitions(self, definitions):
-        """Ensure that every element of 'definitions' is valid."""
-        for defn in definitions:
-            self._check_macro_definition(*defn)
-
-    def _check_macro_definition(self, defn):
-        """
-        Raise a TypeError if defn is not valid.
-
-        A valid definition is either a (name, value) 2-tuple or a (name,) tuple.
-        """
-        if not isinstance(defn, tuple) or not self._is_valid_macro(*defn):
-            raise TypeError(
-                f"invalid macro definition '{defn}': "
-                "must be tuple (string,), (string, string), or (string, None)"
-            )
-
-    @staticmethod
-    def _is_valid_macro(name, value=None):
-        """
-        A valid macro is a ``name : str`` and a ``value : str | None``.
-
-        >>> Compiler._is_valid_macro('foo', None)
-        True
-        """
-        return isinstance(name, str) and isinstance(value, (str, type(None)))
-
-    # -- Bookkeeping methods -------------------------------------------
-
-    def define_macro(self, name: str, value: str | None = None) -> None:
-        """Define a preprocessor macro for all compilations driven by this
-        compiler object.  The optional parameter 'value' should be a
-        string; if it is not supplied, then the macro will be defined
-        without an explicit value and the exact outcome depends on the
-        compiler used (XXX true? does ANSI say anything about this?)
-        """
-        # Delete from the list of macro definitions/undefinitions if
-        # already there (so that this one will take precedence).
-        i = self._find_macro(name)
-        if i is not None:
-            del self.macros[i]
-
-        self.macros.append((name, value))
-
-    def undefine_macro(self, name: str) -> None:
-        """Undefine a preprocessor macro for all compilations driven by
-        this compiler object.  If the same macro is defined by
-        'define_macro()' and undefined by 'undefine_macro()' the last call
-        takes precedence (including multiple redefinitions or
-        undefinitions).  If the macro is redefined/undefined on a
-        per-compilation basis (ie. in the call to 'compile()'), then that
-        takes precedence.
-        """
-        # Delete from the list of macro definitions/undefinitions if
-        # already there (so that this one will take precedence).
-        i = self._find_macro(name)
-        if i is not None:
-            del self.macros[i]
-
-        undefn = (name,)
-        self.macros.append(undefn)
-
-    def add_include_dir(self, dir: str) -> None:
-        """Add 'dir' to the list of directories that will be searched for
-        header files.  The compiler is instructed to search directories in
-        the order in which they are supplied by successive calls to
-        'add_include_dir()'.
-        """
-        self.include_dirs.append(dir)
-
-    def set_include_dirs(self, dirs: list[str]) -> None:
-        """Set the list of directories that will be searched to 'dirs' (a
-        list of strings).  Overrides any preceding calls to
-        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
-        to the list passed to 'set_include_dirs()'.  This does not affect
-        any list of standard include directories that the compiler may
-        search by default.
-        """
-        self.include_dirs = dirs[:]
-
-    def add_library(self, libname: str) -> None:
-        """Add 'libname' to the list of libraries that will be included in
-        all links driven by this compiler object.  Note that 'libname'
-        should *not* be the name of a file containing a library, but the
-        name of the library itself: the actual filename will be inferred by
-        the linker, the compiler, or the compiler class (depending on the
-        platform).
-
-        The linker will be instructed to link against libraries in the
-        order they were supplied to 'add_library()' and/or
-        'set_libraries()'.  It is perfectly valid to duplicate library
-        names; the linker will be instructed to link against libraries as
-        many times as they are mentioned.
-        """
-        self.libraries.append(libname)
-
-    def set_libraries(self, libnames: list[str]) -> None:
-        """Set the list of libraries to be included in all links driven by
-        this compiler object to 'libnames' (a list of strings).  This does
-        not affect any standard system libraries that the linker may
-        include by default.
-        """
-        self.libraries = libnames[:]
-
-    def add_library_dir(self, dir: str) -> None:
-        """Add 'dir' to the list of directories that will be searched for
-        libraries specified to 'add_library()' and 'set_libraries()'.  The
-        linker will be instructed to search for libraries in the order they
-        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
-        """
-        self.library_dirs.append(dir)
-
-    def set_library_dirs(self, dirs: list[str]) -> None:
-        """Set the list of library search directories to 'dirs' (a list of
-        strings).  This does not affect any standard library search path
-        that the linker may search by default.
-        """
-        self.library_dirs = dirs[:]
-
-    def add_runtime_library_dir(self, dir: str) -> None:
-        """Add 'dir' to the list of directories that will be searched for
-        shared libraries at runtime.
-        """
-        self.runtime_library_dirs.append(dir)
-
-    def set_runtime_library_dirs(self, dirs: list[str]) -> None:
-        """Set the list of directories to search for shared libraries at
-        runtime to 'dirs' (a list of strings).  This does not affect any
-        standard search path that the runtime linker may search by
-        default.
-        """
-        self.runtime_library_dirs = dirs[:]
-
-    def add_link_object(self, object: str) -> None:
-        """Add 'object' to the list of object files (or analogues, such as
-        explicitly named library files or the output of "resource
-        compilers") to be included in every link driven by this compiler
-        object.
-        """
-        self.objects.append(object)
-
-    def set_link_objects(self, objects: list[str]) -> None:
-        """Set the list of object files (or analogues) to be included in
-        every link to 'objects'.  This does not affect any standard object
-        files that the linker may include by default (such as system
-        libraries).
-        """
-        self.objects = objects[:]
-
-    # -- Private utility methods --------------------------------------
-    # (here for the convenience of subclasses)
-
-    # Helper method to prep compiler in subclass compile() methods
-
-    def _setup_compile(
-        self,
-        outdir: str | None,
-        macros: list[_Macro] | None,
-        incdirs: list[str] | tuple[str, ...] | None,
-        sources,
-        depends,
-        extra,
-    ):
-        """Process arguments and decide which source files to compile."""
-        outdir, macros, incdirs = self._fix_compile_args(outdir, macros, incdirs)
-
-        if extra is None:
-            extra = []
-
-        # Get the list of expected output (object) files
-        objects = self.object_filenames(sources, strip_dir=False, output_dir=outdir)
-        assert len(objects) == len(sources)
-
-        pp_opts = gen_preprocess_options(macros, incdirs)
-
-        build = {}
-        for i in range(len(sources)):
-            src = sources[i]
-            obj = objects[i]
-            ext = os.path.splitext(src)[1]
-            self.mkpath(os.path.dirname(obj))
-            build[obj] = (src, ext)
-
-        return macros, objects, extra, pp_opts, build
-
-    def _get_cc_args(self, pp_opts, debug, before):
-        # works for unixccompiler, cygwinccompiler
-        cc_args = pp_opts + ['-c']
-        if debug:
-            cc_args[:0] = ['-g']
-        if before:
-            cc_args[:0] = before
-        return cc_args
-
-    def _fix_compile_args(
-        self,
-        output_dir: str | None,
-        macros: list[_Macro] | None,
-        include_dirs: list[str] | tuple[str, ...] | None,
-    ) -> tuple[str, list[_Macro], list[str]]:
-        """Typecheck and fix-up some of the arguments to the 'compile()'
-        method, and return fixed-up values.  Specifically: if 'output_dir'
-        is None, replaces it with 'self.output_dir'; ensures that 'macros'
-        is a list, and augments it with 'self.macros'; ensures that
-        'include_dirs' is a list, and augments it with 'self.include_dirs'.
-        Guarantees that the returned values are of the correct type,
-        i.e. for 'output_dir' either string or None, and for 'macros' and
-        'include_dirs' either list or None.
-        """
-        if output_dir is None:
-            output_dir = self.output_dir
-        elif not isinstance(output_dir, str):
-            raise TypeError("'output_dir' must be a string or None")
-
-        if macros is None:
-            macros = list(self.macros)
-        elif isinstance(macros, list):
-            macros = macros + (self.macros or [])
-        else:
-            raise TypeError("'macros' (if supplied) must be a list of tuples")
-
-        if include_dirs is None:
-            include_dirs = list(self.include_dirs)
-        elif isinstance(include_dirs, (list, tuple)):
-            include_dirs = list(include_dirs) + (self.include_dirs or [])
-        else:
-            raise TypeError("'include_dirs' (if supplied) must be a list of strings")
-
-        # add include dirs for class
-        include_dirs += self.__class__.include_dirs
-
-        return output_dir, macros, include_dirs
-
-    def _prep_compile(self, sources, output_dir, depends=None):
-        """Decide which source files must be recompiled.
-
-        Determine the list of object files corresponding to 'sources',
-        and figure out which ones really need to be recompiled.
-        Return a list of all object files and a dictionary telling
-        which source files can be skipped.
-        """
-        # Get the list of expected output (object) files
-        objects = self.object_filenames(sources, output_dir=output_dir)
-        assert len(objects) == len(sources)
-
-        # Return an empty dict for the "which source files can be skipped"
-        # return value to preserve API compatibility.
-        return objects, {}
-
-    def _fix_object_args(
-        self, objects: list[str] | tuple[str, ...], output_dir: str | None
-    ) -> tuple[list[str], str]:
-        """Typecheck and fix up some arguments supplied to various methods.
-        Specifically: ensure that 'objects' is a list; if output_dir is
-        None, replace with self.output_dir.  Return fixed versions of
-        'objects' and 'output_dir'.
-        """
-        if not isinstance(objects, (list, tuple)):
-            raise TypeError("'objects' must be a list or tuple of strings")
-        objects = list(objects)
-
-        if output_dir is None:
-            output_dir = self.output_dir
-        elif not isinstance(output_dir, str):
-            raise TypeError("'output_dir' must be a string or None")
-
-        return (objects, output_dir)
-
-    def _fix_lib_args(
-        self,
-        libraries: list[str] | tuple[str, ...] | None,
-        library_dirs: list[str] | tuple[str, ...] | None,
-        runtime_library_dirs: list[str] | tuple[str, ...] | None,
-    ) -> tuple[list[str], list[str], list[str]]:
-        """Typecheck and fix up some of the arguments supplied to the
-        'link_*' methods.  Specifically: ensure that all arguments are
-        lists, and augment them with their permanent versions
-        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
-        fixed versions of all arguments.
-        """
-        if libraries is None:
-            libraries = list(self.libraries)
-        elif isinstance(libraries, (list, tuple)):
-            libraries = list(libraries) + (self.libraries or [])
-        else:
-            raise TypeError("'libraries' (if supplied) must be a list of strings")
-
-        if library_dirs is None:
-            library_dirs = list(self.library_dirs)
-        elif isinstance(library_dirs, (list, tuple)):
-            library_dirs = list(library_dirs) + (self.library_dirs or [])
-        else:
-            raise TypeError("'library_dirs' (if supplied) must be a list of strings")
-
-        # add library dirs for class
-        library_dirs += self.__class__.library_dirs
-
-        if runtime_library_dirs is None:
-            runtime_library_dirs = list(self.runtime_library_dirs)
-        elif isinstance(runtime_library_dirs, (list, tuple)):
-            runtime_library_dirs = list(runtime_library_dirs) + (
-                self.runtime_library_dirs or []
-            )
-        else:
-            raise TypeError(
-                "'runtime_library_dirs' (if supplied) must be a list of strings"
-            )
-
-        return (libraries, library_dirs, runtime_library_dirs)
-
-    def _need_link(self, objects, output_file):
-        """Return true if we need to relink the files listed in 'objects'
-        to recreate 'output_file'.
-        """
-        if self.force:
-            return True
-        newer = newer_group(objects, output_file)
-        return newer
-
-    def detect_language(self, sources: str | list[str]) -> str | None:
-        """Detect the language of a given file, or list of files. Uses
-        language_map, and language_order to do the job.
-        """
-        if not isinstance(sources, list):
-            sources = [sources]
-        lang = None
-        index = len(self.language_order)
-        for source in sources:
-            base, ext = os.path.splitext(source)
-            extlang = self.language_map.get(ext)
-            try:
-                extindex = self.language_order.index(extlang)
-                if extindex < index:
-                    lang = extlang
-                    index = extindex
-            except ValueError:
-                pass
-        return lang
-
-    # -- Worker methods ------------------------------------------------
-    # (must be implemented by subclasses)
-
-    def preprocess(
-        self,
-        source: str | os.PathLike[str],
-        output_file: str | os.PathLike[str] | None = None,
-        macros: list[_Macro] | None = None,
-        include_dirs: list[str] | tuple[str, ...] | None = None,
-        extra_preargs: list[str] | None = None,
-        extra_postargs: Iterable[str] | None = None,
-    ):
-        """Preprocess a single C/C++ source file, named in 'source'.
-        Output will be written to file named 'output_file', or stdout if
-        'output_file' not supplied.  'macros' is a list of macro
-        definitions as for 'compile()', which will augment the macros set
-        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
-        list of directory names that will be added to the default list.
-
-        Raises PreprocessError on failure.
-        """
-        pass
-
-    def compile(
-        self,
-        sources: Sequence[str | os.PathLike[str]],
-        output_dir: str | None = None,
-        macros: list[_Macro] | None = None,
-        include_dirs: list[str] | tuple[str, ...] | None = None,
-        debug: bool = False,
-        extra_preargs: list[str] | None = None,
-        extra_postargs: list[str] | None = None,
-        depends: list[str] | tuple[str, ...] | None = None,
-    ) -> list[str]:
-        """Compile one or more source files.
-
-        'sources' must be a list of filenames, most likely C/C++
-        files, but in reality anything that can be handled by a
-        particular compiler and compiler class (eg. MSVCCompiler can
-        handle resource files in 'sources').  Return a list of object
-        filenames, one per source filename in 'sources'.  Depending on
-        the implementation, not all source files will necessarily be
-        compiled, but all corresponding object filenames will be
-        returned.
-
-        If 'output_dir' is given, object files will be put under it, while
-        retaining their original path component.  That is, "foo/bar.c"
-        normally compiles to "foo/bar.o" (for a Unix implementation); if
-        'output_dir' is "build", then it would compile to
-        "build/foo/bar.o".
-
-        'macros', if given, must be a list of macro definitions.  A macro
-        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
-        The former defines a macro; if the value is None, the macro is
-        defined without an explicit value.  The 1-tuple case undefines a
-        macro.  Later definitions/redefinitions/ undefinitions take
-        precedence.
-
-        'include_dirs', if given, must be a list of strings, the
-        directories to add to the default include file search path for this
-        compilation only.
-
-        'debug' is a boolean; if true, the compiler will be instructed to
-        output debug symbols in (or alongside) the object file(s).
-
-        'extra_preargs' and 'extra_postargs' are implementation- dependent.
-        On platforms that have the notion of a command-line (e.g. Unix,
-        DOS/Windows), they are most likely lists of strings: extra
-        command-line arguments to prepend/append to the compiler command
-        line.  On other platforms, consult the implementation class
-        documentation.  In any event, they are intended as an escape hatch
-        for those occasions when the abstract compiler framework doesn't
-        cut the mustard.
-
-        'depends', if given, is a list of filenames that all targets
-        depend on.  If a source file is older than any file in
-        depends, then the source file will be recompiled.  This
-        supports dependency tracking, but only at a coarse
-        granularity.
-
-        Raises CompileError on failure.
-        """
-        # A concrete compiler class can either override this method
-        # entirely or implement _compile().
-        macros, objects, extra_postargs, pp_opts, build = self._setup_compile(
-            output_dir, macros, include_dirs, sources, depends, extra_postargs
-        )
-        cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
-
-        for obj in objects:
-            try:
-                src, ext = build[obj]
-            except KeyError:
-                continue
-            self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
-
-        # Return *all* object filenames, not just the ones we just built.
-        return objects
-
-    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-        """Compile 'src' to product 'obj'."""
-        # A concrete compiler class that does not override compile()
-        # should implement _compile().
-        pass
-
-    def create_static_lib(
-        self,
-        objects: list[str] | tuple[str, ...],
-        output_libname: str,
-        output_dir: str | None = None,
-        debug: bool = False,
-        target_lang: str | None = None,
-    ) -> None:
-        """Link a bunch of stuff together to create a static library file.
-        The "bunch of stuff" consists of the list of object files supplied
-        as 'objects', the extra object files supplied to
-        'add_link_object()' and/or 'set_link_objects()', the libraries
-        supplied to 'add_library()' and/or 'set_libraries()', and the
-        libraries supplied as 'libraries' (if any).
-
-        'output_libname' should be a library name, not a filename; the
-        filename will be inferred from the library name.  'output_dir' is
-        the directory where the library file will be put.
-
-        'debug' is a boolean; if true, debugging information will be
-        included in the library (note that on most platforms, it is the
-        compile step where this matters: the 'debug' flag is included here
-        just for consistency).
-
-        'target_lang' is the target language for which the given objects
-        are being compiled. This allows specific linkage time treatment of
-        certain languages.
-
-        Raises LibError on failure.
-        """
-        pass
-
-    # values for target_desc parameter in link()
-    SHARED_OBJECT = "shared_object"
-    SHARED_LIBRARY = "shared_library"
-    EXECUTABLE = "executable"
-
-    def link(
-        self,
-        target_desc: str,
-        objects: list[str] | tuple[str, ...],
-        output_filename: str,
-        output_dir: str | None = None,
-        libraries: list[str] | tuple[str, ...] | None = None,
-        library_dirs: list[str] | tuple[str, ...] | None = None,
-        runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
-        export_symbols: Iterable[str] | None = None,
-        debug: bool = False,
-        extra_preargs: list[str] | None = None,
-        extra_postargs: list[str] | None = None,
-        build_temp: str | os.PathLike[str] | None = None,
-        target_lang: str | None = None,
-    ):
-        """Link a bunch of stuff together to create an executable or
-        shared library file.
-
-        The "bunch of stuff" consists of the list of object files supplied
-        as 'objects'.  'output_filename' should be a filename.  If
-        'output_dir' is supplied, 'output_filename' is relative to it
-        (i.e. 'output_filename' can provide directory components if
-        needed).
-
-        'libraries' is a list of libraries to link against.  These are
-        library names, not filenames, since they're translated into
-        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
-        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
-        directory component, which means the linker will look in that
-        specific directory rather than searching all the normal locations.
-
-        'library_dirs', if supplied, should be a list of directories to
-        search for libraries that were specified as bare library names
-        (ie. no directory component).  These are on top of the system
-        default and those supplied to 'add_library_dir()' and/or
-        'set_library_dirs()'.  'runtime_library_dirs' is a list of
-        directories that will be embedded into the shared library and used
-        to search for other shared libraries that *it* depends on at
-        run-time.  (This may only be relevant on Unix.)
-
-        'export_symbols' is a list of symbols that the shared library will
-        export.  (This appears to be relevant only on Windows.)
-
-        'debug' is as for 'compile()' and 'create_static_lib()', with the
-        slight distinction that it actually matters on most platforms (as
-        opposed to 'create_static_lib()', which includes a 'debug' flag
-        mostly for form's sake).
-
-        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
-        of course that they supply command-line arguments for the
-        particular linker being used).
-
-        'target_lang' is the target language for which the given objects
-        are being compiled. This allows specific linkage time treatment of
-        certain languages.
-
-        Raises LinkError on failure.
-        """
-        raise NotImplementedError
-
-    # Old 'link_*()' methods, rewritten to use the new 'link()' method.
-
-    def link_shared_lib(
-        self,
-        objects: list[str] | tuple[str, ...],
-        output_libname: str,
-        output_dir: str | None = None,
-        libraries: list[str] | tuple[str, ...] | None = None,
-        library_dirs: list[str] | tuple[str, ...] | None = None,
-        runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
-        export_symbols: Iterable[str] | None = None,
-        debug: bool = False,
-        extra_preargs: list[str] | None = None,
-        extra_postargs: list[str] | None = None,
-        build_temp: str | os.PathLike[str] | None = None,
-        target_lang: str | None = None,
-    ):
-        self.link(
-            Compiler.SHARED_LIBRARY,
-            objects,
-            self.library_filename(output_libname, lib_type='shared'),
-            output_dir,
-            libraries,
-            library_dirs,
-            runtime_library_dirs,
-            export_symbols,
-            debug,
-            extra_preargs,
-            extra_postargs,
-            build_temp,
-            target_lang,
-        )
-
-    def link_shared_object(
-        self,
-        objects: list[str] | tuple[str, ...],
-        output_filename: str,
-        output_dir: str | None = None,
-        libraries: list[str] | tuple[str, ...] | None = None,
-        library_dirs: list[str] | tuple[str, ...] | None = None,
-        runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
-        export_symbols: Iterable[str] | None = None,
-        debug: bool = False,
-        extra_preargs: list[str] | None = None,
-        extra_postargs: list[str] | None = None,
-        build_temp: str | os.PathLike[str] | None = None,
-        target_lang: str | None = None,
-    ):
-        self.link(
-            Compiler.SHARED_OBJECT,
-            objects,
-            output_filename,
-            output_dir,
-            libraries,
-            library_dirs,
-            runtime_library_dirs,
-            export_symbols,
-            debug,
-            extra_preargs,
-            extra_postargs,
-            build_temp,
-            target_lang,
-        )
-
-    def link_executable(
-        self,
-        objects: list[str] | tuple[str, ...],
-        output_progname: str,
-        output_dir: str | None = None,
-        libraries: list[str] | tuple[str, ...] | None = None,
-        library_dirs: list[str] | tuple[str, ...] | None = None,
-        runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
-        debug: bool = False,
-        extra_preargs: list[str] | None = None,
-        extra_postargs: list[str] | None = None,
-        target_lang: str | None = None,
-    ):
-        self.link(
-            Compiler.EXECUTABLE,
-            objects,
-            self.executable_filename(output_progname),
-            output_dir,
-            libraries,
-            library_dirs,
-            runtime_library_dirs,
-            None,
-            debug,
-            extra_preargs,
-            extra_postargs,
-            None,
-            target_lang,
-        )
-
-    # -- Miscellaneous methods -----------------------------------------
-    # These are all used by the 'gen_lib_options() function; there is
-    # no appropriate default implementation so subclasses should
-    # implement all of these.
-
-    def library_dir_option(self, dir: str) -> str:
-        """Return the compiler option to add 'dir' to the list of
-        directories searched for libraries.
-        """
-        raise NotImplementedError
-
-    def runtime_library_dir_option(self, dir: str) -> str:
-        """Return the compiler option to add 'dir' to the list of
-        directories searched for runtime libraries.
-        """
-        raise NotImplementedError
-
-    def library_option(self, lib: str) -> str:
-        """Return the compiler option to add 'lib' to the list of libraries
-        linked into the shared library or executable.
-        """
-        raise NotImplementedError
-
-    def has_function(  # noqa: C901
-        self,
-        funcname: str,
-        includes: Iterable[str] | None = None,
-        include_dirs: list[str] | tuple[str, ...] | None = None,
-        libraries: list[str] | None = None,
-        library_dirs: list[str] | tuple[str, ...] | None = None,
-    ) -> bool:
-        """Return a boolean indicating whether funcname is provided as
-        a symbol on the current platform.  The optional arguments can
-        be used to augment the compilation environment.
-
-        The libraries argument is a list of flags to be passed to the
-        linker to make additional symbol definitions available for
-        linking.
-
-        The includes and include_dirs arguments are deprecated.
-        Usually, supplying include files with function declarations
-        will cause function detection to fail even in cases where the
-        symbol is available for linking.
-
-        """
-        # this can't be included at module scope because it tries to
-        # import math which might not be available at that point - maybe
-        # the necessary logic should just be inlined?
-        import tempfile
-
-        if includes is None:
-            includes = []
-        else:
-            warnings.warn("includes is deprecated", DeprecationWarning)
-        if include_dirs is None:
-            include_dirs = []
-        else:
-            warnings.warn("include_dirs is deprecated", DeprecationWarning)
-        if libraries is None:
-            libraries = []
-        if library_dirs is None:
-            library_dirs = []
-        fd, fname = tempfile.mkstemp(".c", funcname, text=True)
-        with os.fdopen(fd, "w", encoding='utf-8') as f:
-            for incl in includes:
-                f.write(f"""#include "{incl}"\n""")
-            if not includes:
-                # Use "char func(void);" as the prototype to follow
-                # what autoconf does.  This prototype does not match
-                # any well-known function the compiler might recognize
-                # as a builtin, so this ends up as a true link test.
-                # Without a fake prototype, the test would need to
-                # know the exact argument types, and the has_function
-                # interface does not provide that level of information.
-                f.write(
-                    f"""\
-#ifdef __cplusplus
-extern "C"
-#endif
-char {funcname}(void);
-"""
-                )
-            f.write(
-                f"""\
-int main (int argc, char **argv) {{
-    {funcname}();
-    return 0;
-}}
-"""
-            )
-
-        try:
-            objects = self.compile([fname], include_dirs=include_dirs)
-        except CompileError:
-            return False
-        finally:
-            os.remove(fname)
-
-        try:
-            self.link_executable(
-                objects, "a.out", libraries=libraries, library_dirs=library_dirs
-            )
-        except (LinkError, TypeError):
-            return False
-        else:
-            os.remove(
-                self.executable_filename("a.out", output_dir=self.output_dir or '')
-            )
-        finally:
-            for fn in objects:
-                os.remove(fn)
-        return True
-
-    def find_library_file(
-        self, dirs: Iterable[str], lib: str, debug: bool = False
-    ) -> str | None:
-        """Search the specified list of directories for a static or shared
-        library file 'lib' and return the full path to that file.  If
-        'debug' true, look for a debugging version (if that makes sense on
-        the current platform).  Return None if 'lib' wasn't found in any of
-        the specified directories.
-        """
-        raise NotImplementedError
-
-    # -- Filename generation methods -----------------------------------
-
-    # The default implementation of the filename generating methods are
-    # prejudiced towards the Unix/DOS/Windows view of the world:
-    #   * object files are named by replacing the source file extension
-    #     (eg. .c/.cpp -> .o/.obj)
-    #   * library files (shared or static) are named by plugging the
-    #     library name and extension into a format string, eg.
-    #     "lib%s.%s" % (lib_name, ".a") for Unix static libraries
-    #   * executables are named by appending an extension (possibly
-    #     empty) to the program name: eg. progname + ".exe" for
-    #     Windows
-    #
-    # To reduce redundant code, these methods expect to find
-    # several attributes in the current object (presumably defined
-    # as class attributes):
-    #   * src_extensions -
-    #     list of C/C++ source file extensions, eg. ['.c', '.cpp']
-    #   * obj_extension -
-    #     object file extension, eg. '.o' or '.obj'
-    #   * static_lib_extension -
-    #     extension for static library files, eg. '.a' or '.lib'
-    #   * shared_lib_extension -
-    #     extension for shared library/object files, eg. '.so', '.dll'
-    #   * static_lib_format -
-    #     format string for generating static library filenames,
-    #     eg. 'lib%s.%s' or '%s.%s'
-    #   * shared_lib_format
-    #     format string for generating shared library filenames
-    #     (probably same as static_lib_format, since the extension
-    #     is one of the intended parameters to the format string)
-    #   * exe_extension -
-    #     extension for executable files, eg. '' or '.exe'
-
-    def object_filenames(
-        self,
-        source_filenames: Iterable[str | os.PathLike[str]],
-        strip_dir: bool = False,
-        output_dir: str | os.PathLike[str] | None = '',
-    ) -> list[str]:
-        if output_dir is None:
-            output_dir = ''
-        return list(
-            self._make_out_path(output_dir, strip_dir, src_name)
-            for src_name in source_filenames
-        )
-
-    @property
-    def out_extensions(self):
-        return dict.fromkeys(self.src_extensions, self.obj_extension)
-
-    def _make_out_path(self, output_dir, strip_dir, src_name):
-        return self._make_out_path_exts(
-            output_dir, strip_dir, src_name, self.out_extensions
-        )
-
-    @classmethod
-    def _make_out_path_exts(cls, output_dir, strip_dir, src_name, extensions):
-        r"""
-        >>> exts = {'.c': '.o'}
-        >>> Compiler._make_out_path_exts('.', False, '/foo/bar.c', exts).replace('\\', '/')
-        './foo/bar.o'
-        >>> Compiler._make_out_path_exts('.', True, '/foo/bar.c', exts).replace('\\', '/')
-        './bar.o'
-        """
-        src = pathlib.PurePath(src_name)
-        # Ensure base is relative to honor output_dir (python/cpython#37775).
-        base = cls._make_relative(src)
-        try:
-            new_ext = extensions[src.suffix]
-        except LookupError:
-            raise UnknownFileType(f"unknown file type '{src.suffix}' (from '{src}')")
-        if strip_dir:
-            base = pathlib.PurePath(base.name)
-        return os.path.join(output_dir, base.with_suffix(new_ext))
-
-    @staticmethod
-    def _make_relative(base: pathlib.Path):
-        return base.relative_to(base.anchor)
-
-    @overload
-    def shared_object_filename(
-        self,
-        basename: str,
-        strip_dir: Literal[False] = False,
-        output_dir: str | os.PathLike[str] = "",
-    ) -> str: ...
-    @overload
-    def shared_object_filename(
-        self,
-        basename: str | os.PathLike[str],
-        strip_dir: Literal[True],
-        output_dir: str | os.PathLike[str] = "",
-    ) -> str: ...
-    def shared_object_filename(
-        self,
-        basename: str | os.PathLike[str],
-        strip_dir: bool = False,
-        output_dir: str | os.PathLike[str] = '',
-    ) -> str:
-        assert output_dir is not None
-        if strip_dir:
-            basename = os.path.basename(basename)
-        return os.path.join(output_dir, basename + self.shared_lib_extension)
-
-    @overload
-    def executable_filename(
-        self,
-        basename: str,
-        strip_dir: Literal[False] = False,
-        output_dir: str | os.PathLike[str] = "",
-    ) -> str: ...
-    @overload
-    def executable_filename(
-        self,
-        basename: str | os.PathLike[str],
-        strip_dir: Literal[True],
-        output_dir: str | os.PathLike[str] = "",
-    ) -> str: ...
-    def executable_filename(
-        self,
-        basename: str | os.PathLike[str],
-        strip_dir: bool = False,
-        output_dir: str | os.PathLike[str] = '',
-    ) -> str:
-        assert output_dir is not None
-        if strip_dir:
-            basename = os.path.basename(basename)
-        return os.path.join(output_dir, basename + (self.exe_extension or ''))
-
-    def library_filename(
-        self,
-        libname: str,
-        lib_type: str = "static",
-        strip_dir: bool = False,
-        output_dir: str | os.PathLike[str] = "",  # or 'shared'
-    ):
-        assert output_dir is not None
-        expected = '"static", "shared", "dylib", "xcode_stub"'
-        if lib_type not in eval(expected):
-            raise ValueError(f"'lib_type' must be {expected}")
-        fmt = getattr(self, lib_type + "_lib_format")
-        ext = getattr(self, lib_type + "_lib_extension")
-
-        dir, base = os.path.split(libname)
-        filename = fmt % (base, ext)
-        if strip_dir:
-            dir = ''
-
-        return os.path.join(output_dir, dir, filename)
-
-    # -- Utility methods -----------------------------------------------
-
-    def announce(self, msg: object, level: int = 1) -> None:
-        log.debug(msg)
-
-    def debug_print(self, msg: object) -> None:
-        from distutils.debug import DEBUG
-
-        if DEBUG:
-            print(msg)
-
-    def warn(self, msg: object) -> None:
-        sys.stderr.write(f"warning: {msg}\n")
-
-    def execute(
-        self,
-        func: Callable[[Unpack[_Ts]], object],
-        args: tuple[Unpack[_Ts]],
-        msg: object = None,
-        level: int = 1,
-    ) -> None:
-        execute(func, args, msg)
-
-    def spawn(
-        self, cmd: MutableSequence[bytes | str | os.PathLike[str]], **kwargs
-    ) -> None:
-        spawn(cmd, **kwargs)
-
-    @overload
-    def move_file(
-        self, src: str | os.PathLike[str], dst: _StrPathT
-    ) -> _StrPathT | str: ...
-    @overload
-    def move_file(
-        self, src: bytes | os.PathLike[bytes], dst: _BytesPathT
-    ) -> _BytesPathT | bytes: ...
-    def move_file(
-        self,
-        src: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-        dst: str | os.PathLike[str] | bytes | os.PathLike[bytes],
-    ) -> str | os.PathLike[str] | bytes | os.PathLike[bytes]:
-        return move_file(src, dst)
-
-    def mkpath(self, name, mode=0o777):
-        mkpath(name, mode)
-
-
-# Map a sys.platform/os.name ('posix', 'nt') to the default compiler
-# type for that platform. Keys are interpreted as re match
-# patterns. Order is important; platform mappings are preferred over
-# OS names.
-_default_compilers = (
-    # Platform string mappings
-    # on a cygwin built python we can use gcc like an ordinary UNIXish
-    # compiler
-    ('cygwin.*', 'unix'),
-    ('zos', 'zos'),
-    # OS name mappings
-    ('posix', 'unix'),
-    ('nt', 'msvc'),
-)
-
-
-def get_default_compiler(osname: str | None = None, platform: str | None = None) -> str:
-    """Determine the default compiler to use for the given platform.
-
-    osname should be one of the standard Python OS names (i.e. the
-    ones returned by os.name) and platform the common value
-    returned by sys.platform for the platform in question.
-
-    The default values are os.name and sys.platform in case the
-    parameters are not given.
-    """
-    if osname is None:
-        osname = os.name
-    if platform is None:
-        platform = sys.platform
-    # Mingw is a special case where sys.platform is 'win32' but we
-    # want to use the 'mingw32' compiler, so check it first
-    if is_mingw():
-        return 'mingw32'
-    for pattern, compiler in _default_compilers:
-        if (
-            re.match(pattern, platform) is not None
-            or re.match(pattern, osname) is not None
-        ):
-            return compiler
-    # Default to Unix compiler
-    return 'unix'
-
-
-# Map compiler types to (module_name, class_name) pairs -- ie. where to
-# find the code that implements an interface to this compiler.  (The module
-# is assumed to be in the 'distutils' package.)
-compiler_class = {
-    'unix': ('unixccompiler', 'UnixCCompiler', "standard UNIX-style compiler"),
-    'msvc': ('_msvccompiler', 'MSVCCompiler', "Microsoft Visual C++"),
-    'cygwin': (
-        'cygwinccompiler',
-        'CygwinCCompiler',
-        "Cygwin port of GNU C Compiler for Win32",
-    ),
-    'mingw32': (
-        'cygwinccompiler',
-        'Mingw32CCompiler',
-        "Mingw32 port of GNU C Compiler for Win32",
-    ),
-    'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"),
-    'zos': ('zosccompiler', 'zOSCCompiler', 'IBM XL C/C++ Compilers'),
-}
-
-
-def show_compilers() -> None:
-    """Print list of available compilers (used by the "--help-compiler"
-    options to "build", "build_ext", "build_clib").
-    """
-    # XXX this "knows" that the compiler option it's describing is
-    # "--compiler", which just happens to be the case for the three
-    # commands that use it.
-    from distutils.fancy_getopt import FancyGetopt
-
-    compilers = sorted(
-        ("compiler=" + compiler, None, compiler_class[compiler][2])
-        for compiler in compiler_class.keys()
-    )
-    pretty_printer = FancyGetopt(compilers)
-    pretty_printer.print_help("List of available compilers:")
-
-
-def new_compiler(
-    plat: str | None = None,
-    compiler: str | None = None,
-    verbose: bool = False,
-    force: bool = False,
-) -> Compiler:
-    """Generate an instance of some CCompiler subclass for the supplied
-    platform/compiler combination.  'plat' defaults to 'os.name'
-    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
-    for that platform.  Currently only 'posix' and 'nt' are supported, and
-    the default compilers are "traditional Unix interface" (UnixCCompiler
-    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
-    possible to ask for a Unix compiler object under Windows, and a
-    Microsoft compiler object under Unix -- if you supply a value for
-    'compiler', 'plat' is ignored.
-    """
-    if plat is None:
-        plat = os.name
-
-    try:
-        if compiler is None:
-            compiler = get_default_compiler(plat)
-
-        (module_name, class_name, long_description) = compiler_class[compiler]
-    except KeyError:
-        msg = f"don't know how to compile C/C++ code on platform '{plat}'"
-        if compiler is not None:
-            msg = msg + f" with '{compiler}' compiler"
-        raise DistutilsPlatformError(msg)
-
-    try:
-        module_name = "distutils." + module_name
-        __import__(module_name)
-        module = sys.modules[module_name]
-        klass = vars(module)[class_name]
-    except ImportError:
-        raise DistutilsModuleError(
-            f"can't compile C/C++ code: unable to load module '{module_name}'"
-        )
-    except KeyError:
-        raise DistutilsModuleError(
-            f"can't compile C/C++ code: unable to find class '{class_name}' "
-            f"in module '{module_name}'"
-        )
-
-    # XXX The None is necessary to preserve backwards compatibility
-    # with classes that expect verbose to be the first positional
-    # argument.
-    return klass(None, force=force)
-
-
-def gen_preprocess_options(
-    macros: Iterable[_Macro], include_dirs: Iterable[str]
-) -> list[str]:
-    """Generate C pre-processor options (-D, -U, -I) as used by at least
-    two types of compilers: the typical Unix compiler and Visual C++.
-    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
-    means undefine (-U) macro 'name', and (name,value) means define (-D)
-    macro 'name' to 'value'.  'include_dirs' is just a list of directory
-    names to be added to the header file search path (-I).  Returns a list
-    of command-line options suitable for either Unix compilers or Visual
-    C++.
-    """
-    # XXX it would be nice (mainly aesthetic, and so we don't generate
-    # stupid-looking command lines) to go over 'macros' and eliminate
-    # redundant definitions/undefinitions (ie. ensure that only the
-    # latest mention of a particular macro winds up on the command
-    # line).  I don't think it's essential, though, since most (all?)
-    # Unix C compilers only pay attention to the latest -D or -U
-    # mention of a macro on their command line.  Similar situation for
-    # 'include_dirs'.  I'm punting on both for now.  Anyways, weeding out
-    # redundancies like this should probably be the province of
-    # CCompiler, since the data structures used are inherited from it
-    # and therefore common to all CCompiler classes.
-    pp_opts = []
-    for macro in macros:
-        if not (isinstance(macro, tuple) and 1 <= len(macro) <= 2):
-            raise TypeError(
-                f"bad macro definition '{macro}': "
-                "each element of 'macros' list must be a 1- or 2-tuple"
-            )
-
-        if len(macro) == 1:  # undefine this macro
-            pp_opts.append(f"-U{macro[0]}")
-        elif len(macro) == 2:
-            if macro[1] is None:  # define with no explicit value
-                pp_opts.append(f"-D{macro[0]}")
-            else:
-                # XXX *don't* need to be clever about quoting the
-                # macro value here, because we're going to avoid the
-                # shell at all costs when we spawn the command!
-                pp_opts.append("-D{}={}".format(*macro))
-
-    pp_opts.extend(f"-I{dir}" for dir in include_dirs)
-    return pp_opts
-
-
-def gen_lib_options(
-    compiler: Compiler,
-    library_dirs: Iterable[str],
-    runtime_library_dirs: Iterable[str],
-    libraries: Iterable[str],
-) -> list[str]:
-    """Generate linker options for searching library directories and
-    linking with specific libraries.  'libraries' and 'library_dirs' are,
-    respectively, lists of library names (not filenames!) and search
-    directories.  Returns a list of command-line options suitable for use
-    with some compiler (depending on the two format strings passed in).
-    """
-    lib_opts = [compiler.library_dir_option(dir) for dir in library_dirs]
-
-    for dir in runtime_library_dirs:
-        lib_opts.extend(always_iterable(compiler.runtime_library_dir_option(dir)))
-
-    # XXX it's important that we *not* remove redundant library mentions!
-    # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to
-    # resolve all symbols.  I just hope we never have to say "-lfoo obj.o
-    # -lbar" to get things to work -- that's certainly a possibility, but a
-    # pretty nasty way to arrange your C code.
-
-    for lib in libraries:
-        (lib_dir, lib_name) = os.path.split(lib)
-        if lib_dir:
-            lib_file = compiler.find_library_file([lib_dir], lib_name)
-            if lib_file:
-                lib_opts.append(lib_file)
-            else:
-                compiler.warn(
-                    f"no library file corresponding to '{lib}' found (skipping)"
-                )
-        else:
-            lib_opts.append(compiler.library_option(lib))
-    return lib_opts
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/cygwin.py b/voxvera/vendor/setuptools/_distutils/compilers/C/cygwin.py
deleted file mode 100644
index f349e9d..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/cygwin.py
+++ /dev/null
@@ -1,340 +0,0 @@
-"""distutils.cygwinccompiler
-
-Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
-handles the Cygwin port of the GNU C compiler to Windows.  It also contains
-the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
-cygwin in no-cygwin mode).
-"""
-
-import copy
-import os
-import pathlib
-import shlex
-import sys
-import warnings
-from subprocess import check_output
-
-from ...errors import (
-    DistutilsExecError,
-    DistutilsPlatformError,
-)
-from ...file_util import write_file
-from ...sysconfig import get_config_vars
-from ...version import LooseVersion, suppress_known_deprecation
-from . import unix
-from .errors import (
-    CompileError,
-    Error,
-)
-
-
-def get_msvcr():
-    """No longer needed, but kept for backward compatibility."""
-    return []
-
-
-_runtime_library_dirs_msg = (
-    "Unable to set runtime library search path on Windows, "
-    "usually indicated by `runtime_library_dirs` parameter to Extension"
-)
-
-
-class Compiler(unix.Compiler):
-    """Handles the Cygwin port of the GNU C compiler to Windows."""
-
-    compiler_type = 'cygwin'
-    obj_extension = ".o"
-    static_lib_extension = ".a"
-    shared_lib_extension = ".dll.a"
-    dylib_lib_extension = ".dll"
-    static_lib_format = "lib%s%s"
-    shared_lib_format = "lib%s%s"
-    dylib_lib_format = "cyg%s%s"
-    exe_extension = ".exe"
-
-    def __init__(self, verbose=False, force=False):
-        super().__init__(verbose, force=force)
-
-        status, details = check_config_h()
-        self.debug_print(f"Python's GCC status: {status} (details: {details})")
-        if status is not CONFIG_H_OK:
-            self.warn(
-                "Python's pyconfig.h doesn't seem to support your compiler. "
-                f"Reason: {details}. "
-                "Compiling may fail because of undefined preprocessor macros."
-            )
-
-        self.cc, self.cxx = get_config_vars('CC', 'CXX')
-
-        # Override 'CC' and 'CXX' environment variables for
-        # building using MINGW compiler for MSVC python.
-        self.cc = os.environ.get('CC', self.cc or 'gcc')
-        self.cxx = os.environ.get('CXX', self.cxx or 'g++')
-
-        self.linker_dll = self.cc
-        self.linker_dll_cxx = self.cxx
-        shared_option = "-shared"
-
-        self.set_executables(
-            compiler=f'{self.cc} -mcygwin -O -Wall',
-            compiler_so=f'{self.cc} -mcygwin -mdll -O -Wall',
-            compiler_cxx=f'{self.cxx} -mcygwin -O -Wall',
-            compiler_so_cxx=f'{self.cxx} -mcygwin -mdll -O -Wall',
-            linker_exe=f'{self.cc} -mcygwin',
-            linker_so=f'{self.linker_dll} -mcygwin {shared_option}',
-            linker_exe_cxx=f'{self.cxx} -mcygwin',
-            linker_so_cxx=f'{self.linker_dll_cxx} -mcygwin {shared_option}',
-        )
-
-        self.dll_libraries = get_msvcr()
-
-    @property
-    def gcc_version(self):
-        # Older numpy depended on this existing to check for ancient
-        # gcc versions. This doesn't make much sense with clang etc so
-        # just hardcode to something recent.
-        # https://github.com/numpy/numpy/pull/20333
-        warnings.warn(
-            "gcc_version attribute of CygwinCCompiler is deprecated. "
-            "Instead of returning actual gcc version a fixed value 11.2.0 is returned.",
-            DeprecationWarning,
-            stacklevel=2,
-        )
-        with suppress_known_deprecation():
-            return LooseVersion("11.2.0")
-
-    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-        """Compiles the source by spawning GCC and windres if needed."""
-        if ext in ('.rc', '.res'):
-            # gcc needs '.res' and '.rc' compiled to object files !!!
-            try:
-                self.spawn(["windres", "-i", src, "-o", obj])
-            except DistutilsExecError as msg:
-                raise CompileError(msg)
-        else:  # for other files use the C-compiler
-            try:
-                if self.detect_language(src) == 'c++':
-                    self.spawn(
-                        self.compiler_so_cxx
-                        + cc_args
-                        + [src, '-o', obj]
-                        + extra_postargs
-                    )
-                else:
-                    self.spawn(
-                        self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs
-                    )
-            except DistutilsExecError as msg:
-                raise CompileError(msg)
-
-    def link(
-        self,
-        target_desc,
-        objects,
-        output_filename,
-        output_dir=None,
-        libraries=None,
-        library_dirs=None,
-        runtime_library_dirs=None,
-        export_symbols=None,
-        debug=False,
-        extra_preargs=None,
-        extra_postargs=None,
-        build_temp=None,
-        target_lang=None,
-    ):
-        """Link the objects."""
-        # use separate copies, so we can modify the lists
-        extra_preargs = copy.copy(extra_preargs or [])
-        libraries = copy.copy(libraries or [])
-        objects = copy.copy(objects or [])
-
-        if runtime_library_dirs:
-            self.warn(_runtime_library_dirs_msg)
-
-        # Additional libraries
-        libraries.extend(self.dll_libraries)
-
-        # handle export symbols by creating a def-file
-        # with executables this only works with gcc/ld as linker
-        if (export_symbols is not None) and (
-            target_desc != self.EXECUTABLE or self.linker_dll == "gcc"
-        ):
-            # (The linker doesn't do anything if output is up-to-date.
-            # So it would probably better to check if we really need this,
-            # but for this we had to insert some unchanged parts of
-            # UnixCCompiler, and this is not what we want.)
-
-            # we want to put some files in the same directory as the
-            # object files are, build_temp doesn't help much
-            # where are the object files
-            temp_dir = os.path.dirname(objects[0])
-            # name of dll to give the helper files the same base name
-            (dll_name, dll_extension) = os.path.splitext(
-                os.path.basename(output_filename)
-            )
-
-            # generate the filenames for these files
-            def_file = os.path.join(temp_dir, dll_name + ".def")
-
-            # Generate .def file
-            contents = [f"LIBRARY {os.path.basename(output_filename)}", "EXPORTS"]
-            contents.extend(export_symbols)
-            self.execute(write_file, (def_file, contents), f"writing {def_file}")
-
-            # next add options for def-file
-
-            # for gcc/ld the def-file is specified as any object files
-            objects.append(def_file)
-
-        # end: if ((export_symbols is not None) and
-        #        (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
-
-        # who wants symbols and a many times larger output file
-        # should explicitly switch the debug mode on
-        # otherwise we let ld strip the output file
-        # (On my machine: 10KiB < stripped_file < ??100KiB
-        #   unstripped_file = stripped_file + XXX KiB
-        #  ( XXX=254 for a typical python extension))
-        if not debug:
-            extra_preargs.append("-s")
-
-        super().link(
-            target_desc,
-            objects,
-            output_filename,
-            output_dir,
-            libraries,
-            library_dirs,
-            runtime_library_dirs,
-            None,  # export_symbols, we do this in our def-file
-            debug,
-            extra_preargs,
-            extra_postargs,
-            build_temp,
-            target_lang,
-        )
-
-    def runtime_library_dir_option(self, dir):
-        # cygwin doesn't support rpath. While in theory we could error
-        # out like MSVC does, code might expect it to work like on Unix, so
-        # just warn and hope for the best.
-        self.warn(_runtime_library_dirs_msg)
-        return []
-
-    # -- Miscellaneous methods -----------------------------------------
-
-    def _make_out_path(self, output_dir, strip_dir, src_name):
-        # use normcase to make sure '.rc' is really '.rc' and not '.RC'
-        norm_src_name = os.path.normcase(src_name)
-        return super()._make_out_path(output_dir, strip_dir, norm_src_name)
-
-    @property
-    def out_extensions(self):
-        """
-        Add support for rc and res files.
-        """
-        return {
-            **super().out_extensions,
-            **{ext: ext + self.obj_extension for ext in ('.res', '.rc')},
-        }
-
-
-# the same as cygwin plus some additional parameters
-class MinGW32Compiler(Compiler):
-    """Handles the Mingw32 port of the GNU C compiler to Windows."""
-
-    compiler_type = 'mingw32'
-
-    def __init__(self, verbose=False, force=False):
-        super().__init__(verbose, force)
-
-        shared_option = "-shared"
-
-        if is_cygwincc(self.cc):
-            raise Error('Cygwin gcc cannot be used with --compiler=mingw32')
-
-        self.set_executables(
-            compiler=f'{self.cc} -O -Wall',
-            compiler_so=f'{self.cc} -shared -O -Wall',
-            compiler_so_cxx=f'{self.cxx} -shared -O -Wall',
-            compiler_cxx=f'{self.cxx} -O -Wall',
-            linker_exe=f'{self.cc}',
-            linker_so=f'{self.linker_dll} {shared_option}',
-            linker_exe_cxx=f'{self.cxx}',
-            linker_so_cxx=f'{self.linker_dll_cxx} {shared_option}',
-        )
-
-    def runtime_library_dir_option(self, dir):
-        raise DistutilsPlatformError(_runtime_library_dirs_msg)
-
-
-# Because these compilers aren't configured in Python's pyconfig.h file by
-# default, we should at least warn the user if he is using an unmodified
-# version.
-
-CONFIG_H_OK = "ok"
-CONFIG_H_NOTOK = "not ok"
-CONFIG_H_UNCERTAIN = "uncertain"
-
-
-def check_config_h():
-    """Check if the current Python installation appears amenable to building
-    extensions with GCC.
-
-    Returns a tuple (status, details), where 'status' is one of the following
-    constants:
-
-    - CONFIG_H_OK: all is well, go ahead and compile
-    - CONFIG_H_NOTOK: doesn't look good
-    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h
-
-    'details' is a human-readable string explaining the situation.
-
-    Note there are two ways to conclude "OK": either 'sys.version' contains
-    the string "GCC" (implying that this Python was built with GCC), or the
-    installed "pyconfig.h" contains the string "__GNUC__".
-    """
-
-    # XXX since this function also checks sys.version, it's not strictly a
-    # "pyconfig.h" check -- should probably be renamed...
-
-    from distutils import sysconfig
-
-    # if sys.version contains GCC then python was compiled with GCC, and the
-    # pyconfig.h file should be OK
-    if "GCC" in sys.version:
-        return CONFIG_H_OK, "sys.version mentions 'GCC'"
-
-    # Clang would also work
-    if "Clang" in sys.version:
-        return CONFIG_H_OK, "sys.version mentions 'Clang'"
-
-    # let's see if __GNUC__ is mentioned in python.h
-    fn = sysconfig.get_config_h_filename()
-    try:
-        config_h = pathlib.Path(fn).read_text(encoding='utf-8')
-    except OSError as exc:
-        return (CONFIG_H_UNCERTAIN, f"couldn't read '{fn}': {exc.strerror}")
-    else:
-        substring = '__GNUC__'
-        if substring in config_h:
-            code = CONFIG_H_OK
-            mention_inflected = 'mentions'
-        else:
-            code = CONFIG_H_NOTOK
-            mention_inflected = 'does not mention'
-        return code, f"{fn!r} {mention_inflected} {substring!r}"
-
-
-def is_cygwincc(cc):
-    """Try to determine if the compiler that would be used is from cygwin."""
-    out_string = check_output(shlex.split(cc) + ['-dumpmachine'])
-    return out_string.strip().endswith(b'cygwin')
-
-
-get_versions = None
-"""
-A stand-in for the previous get_versions() function to prevent failures
-when monkeypatched. See pypa/setuptools#2969.
-"""
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/errors.py b/voxvera/vendor/setuptools/_distutils/compilers/C/errors.py
deleted file mode 100644
index 0132859..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/errors.py
+++ /dev/null
@@ -1,24 +0,0 @@
-class Error(Exception):
-    """Some compile/link operation failed."""
-
-
-class PreprocessError(Error):
-    """Failure to preprocess one or more C/C++ files."""
-
-
-class CompileError(Error):
-    """Failure to compile one or more C/C++ source files."""
-
-
-class LibError(Error):
-    """Failure to create a static library from one or more C/C++ object
-    files."""
-
-
-class LinkError(Error):
-    """Failure to link one or more C/C++ object files into an executable
-    or shared library file."""
-
-
-class UnknownFileType(Error):
-    """Attempt to process an unknown file type."""
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/msvc.py b/voxvera/vendor/setuptools/_distutils/compilers/C/msvc.py
deleted file mode 100644
index 1f50fa5..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/msvc.py
+++ /dev/null
@@ -1,614 +0,0 @@
-"""distutils._msvccompiler
-
-Contains MSVCCompiler, an implementation of the abstract CCompiler class
-for Microsoft Visual Studio 2015.
-
-This module requires VS 2015 or later.
-"""
-
-# Written by Perry Stoll
-# hacked by Robin Becker and Thomas Heller to do a better job of
-#   finding DevStudio (through the registry)
-# ported to VS 2005 and VS 2008 by Christian Heimes
-# ported to VS 2015 by Steve Dower
-from __future__ import annotations
-
-import contextlib
-import os
-import subprocess
-import unittest.mock as mock
-import warnings
-from collections.abc import Iterable
-
-with contextlib.suppress(ImportError):
-    import winreg
-
-from itertools import count
-
-from ..._log import log
-from ...errors import (
-    DistutilsExecError,
-    DistutilsPlatformError,
-)
-from ...util import get_host_platform, get_platform
-from . import base
-from .base import gen_lib_options
-from .errors import (
-    CompileError,
-    LibError,
-    LinkError,
-)
-
-
-def _find_vc2015():
-    try:
-        key = winreg.OpenKeyEx(
-            winreg.HKEY_LOCAL_MACHINE,
-            r"Software\Microsoft\VisualStudio\SxS\VC7",
-            access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY,
-        )
-    except OSError:
-        log.debug("Visual C++ is not registered")
-        return None, None
-
-    best_version = 0
-    best_dir = None
-    with key:
-        for i in count():
-            try:
-                v, vc_dir, vt = winreg.EnumValue(key, i)
-            except OSError:
-                break
-            if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir):
-                try:
-                    version = int(float(v))
-                except (ValueError, TypeError):
-                    continue
-                if version >= 14 and version > best_version:
-                    best_version, best_dir = version, vc_dir
-    return best_version, best_dir
-
-
-def _find_vc2017():
-    """Returns "15, path" based on the result of invoking vswhere.exe
-    If no install is found, returns "None, None"
-
-    The version is returned to avoid unnecessarily changing the function
-    result. It may be ignored when the path is not None.
-
-    If vswhere.exe is not available, by definition, VS 2017 is not
-    installed.
-    """
-    root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
-    if not root:
-        return None, None
-
-    variant = 'arm64' if get_platform() == 'win-arm64' else 'x86.x64'
-    suitable_components = (
-        f"Microsoft.VisualStudio.Component.VC.Tools.{variant}",
-        "Microsoft.VisualStudio.Workload.WDExpress",
-    )
-
-    for component in suitable_components:
-        # Workaround for `-requiresAny` (only available on VS 2017 > 15.6)
-        with contextlib.suppress(
-            subprocess.CalledProcessError, OSError, UnicodeDecodeError
-        ):
-            path = (
-                subprocess.check_output([
-                    os.path.join(
-                        root, "Microsoft Visual Studio", "Installer", "vswhere.exe"
-                    ),
-                    "-latest",
-                    "-prerelease",
-                    "-requires",
-                    component,
-                    "-property",
-                    "installationPath",
-                    "-products",
-                    "*",
-                ])
-                .decode(encoding="mbcs", errors="strict")
-                .strip()
-            )
-
-            path = os.path.join(path, "VC", "Auxiliary", "Build")
-            if os.path.isdir(path):
-                return 15, path
-
-    return None, None  # no suitable component found
-
-
-PLAT_SPEC_TO_RUNTIME = {
-    'x86': 'x86',
-    'x86_amd64': 'x64',
-    'x86_arm': 'arm',
-    'x86_arm64': 'arm64',
-}
-
-
-def _find_vcvarsall(plat_spec):
-    # bpo-38597: Removed vcruntime return value
-    _, best_dir = _find_vc2017()
-
-    if not best_dir:
-        best_version, best_dir = _find_vc2015()
-
-    if not best_dir:
-        log.debug("No suitable Visual C++ version found")
-        return None, None
-
-    vcvarsall = os.path.join(best_dir, "vcvarsall.bat")
-    if not os.path.isfile(vcvarsall):
-        log.debug("%s cannot be found", vcvarsall)
-        return None, None
-
-    return vcvarsall, None
-
-
-def _get_vc_env(plat_spec):
-    if os.getenv("DISTUTILS_USE_SDK"):
-        return {key.lower(): value for key, value in os.environ.items()}
-
-    vcvarsall, _ = _find_vcvarsall(plat_spec)
-    if not vcvarsall:
-        raise DistutilsPlatformError(
-            'Microsoft Visual C++ 14.0 or greater is required. '
-            'Get it with "Microsoft C++ Build Tools": '
-            'https://visualstudio.microsoft.com/visual-cpp-build-tools/'
-        )
-
-    try:
-        out = subprocess.check_output(
-            f'cmd /u /c "{vcvarsall}" {plat_spec} && set',
-            stderr=subprocess.STDOUT,
-        ).decode('utf-16le', errors='replace')
-    except subprocess.CalledProcessError as exc:
-        log.error(exc.output)
-        raise DistutilsPlatformError(f"Error executing {exc.cmd}")
-
-    env = {
-        key.lower(): value
-        for key, _, value in (line.partition('=') for line in out.splitlines())
-        if key and value
-    }
-
-    return env
-
-
-def _find_exe(exe, paths=None):
-    """Return path to an MSVC executable program.
-
-    Tries to find the program in several places: first, one of the
-    MSVC program search paths from the registry; next, the directories
-    in the PATH environment variable.  If any of those work, return an
-    absolute path that is known to exist.  If none of them work, just
-    return the original program name, 'exe'.
-    """
-    if not paths:
-        paths = os.getenv('path').split(os.pathsep)
-    for p in paths:
-        fn = os.path.join(os.path.abspath(p), exe)
-        if os.path.isfile(fn):
-            return fn
-    return exe
-
-
-_vcvars_names = {
-    'win32': 'x86',
-    'win-amd64': 'amd64',
-    'win-arm32': 'arm',
-    'win-arm64': 'arm64',
-}
-
-
-def _get_vcvars_spec(host_platform, platform):
-    """
-    Given a host platform and platform, determine the spec for vcvarsall.
-
-    Uses the native MSVC host if the host platform would need expensive
-    emulation for x86.
-
-    >>> _get_vcvars_spec('win-arm64', 'win32')
-    'arm64_x86'
-    >>> _get_vcvars_spec('win-arm64', 'win-amd64')
-    'arm64_amd64'
-
-    Otherwise, always cross-compile from x86 to work with the
-    lighter-weight MSVC installs that do not include native 64-bit tools.
-
-    >>> _get_vcvars_spec('win32', 'win32')
-    'x86'
-    >>> _get_vcvars_spec('win-arm32', 'win-arm32')
-    'x86_arm'
-    >>> _get_vcvars_spec('win-amd64', 'win-arm64')
-    'x86_arm64'
-    """
-    if host_platform != 'win-arm64':
-        host_platform = 'win32'
-    vc_hp = _vcvars_names[host_platform]
-    vc_plat = _vcvars_names[platform]
-    return vc_hp if vc_hp == vc_plat else f'{vc_hp}_{vc_plat}'
-
-
-class Compiler(base.Compiler):
-    """Concrete class that implements an interface to Microsoft Visual C++,
-    as defined by the CCompiler abstract class."""
-
-    compiler_type = 'msvc'
-
-    # Just set this so CCompiler's constructor doesn't barf.  We currently
-    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
-    # as it really isn't necessary for this sort of single-compiler class.
-    # Would be nice to have a consistent interface with UnixCCompiler,
-    # though, so it's worth thinking about.
-    executables = {}
-
-    # Private class data (need to distinguish C from C++ source for compiler)
-    _c_extensions = ['.c']
-    _cpp_extensions = ['.cc', '.cpp', '.cxx']
-    _rc_extensions = ['.rc']
-    _mc_extensions = ['.mc']
-
-    # Needed for the filename generation methods provided by the
-    # base class, CCompiler.
-    src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions
-    res_extension = '.res'
-    obj_extension = '.obj'
-    static_lib_extension = '.lib'
-    shared_lib_extension = '.dll'
-    static_lib_format = shared_lib_format = '%s%s'
-    exe_extension = '.exe'
-
-    def __init__(self, verbose=False, force=False) -> None:
-        super().__init__(verbose, force=force)
-        # target platform (.plat_name is consistent with 'bdist')
-        self.plat_name = None
-        self.initialized = False
-
-    @classmethod
-    def _configure(cls, vc_env):
-        """
-        Set class-level include/lib dirs.
-        """
-        cls.include_dirs = cls._parse_path(vc_env.get('include', ''))
-        cls.library_dirs = cls._parse_path(vc_env.get('lib', ''))
-
-    @staticmethod
-    def _parse_path(val):
-        return [dir.rstrip(os.sep) for dir in val.split(os.pathsep) if dir]
-
-    def initialize(self, plat_name: str | None = None) -> None:
-        # multi-init means we would need to check platform same each time...
-        assert not self.initialized, "don't init multiple times"
-        if plat_name is None:
-            plat_name = get_platform()
-        # sanity check for platforms to prevent obscure errors later.
-        if plat_name not in _vcvars_names:
-            raise DistutilsPlatformError(
-                f"--plat-name must be one of {tuple(_vcvars_names)}"
-            )
-
-        plat_spec = _get_vcvars_spec(get_host_platform(), plat_name)
-
-        vc_env = _get_vc_env(plat_spec)
-        if not vc_env:
-            raise DistutilsPlatformError(
-                "Unable to find a compatible Visual Studio installation."
-            )
-        self._configure(vc_env)
-
-        self._paths = vc_env.get('path', '')
-        paths = self._paths.split(os.pathsep)
-        self.cc = _find_exe("cl.exe", paths)
-        self.linker = _find_exe("link.exe", paths)
-        self.lib = _find_exe("lib.exe", paths)
-        self.rc = _find_exe("rc.exe", paths)  # resource compiler
-        self.mc = _find_exe("mc.exe", paths)  # message compiler
-        self.mt = _find_exe("mt.exe", paths)  # message compiler
-
-        self.preprocess_options = None
-        # bpo-38597: Always compile with dynamic linking
-        # Future releases of Python 3.x will include all past
-        # versions of vcruntime*.dll for compatibility.
-        self.compile_options = ['/nologo', '/O2', '/W3', '/GL', '/DNDEBUG', '/MD']
-
-        self.compile_options_debug = [
-            '/nologo',
-            '/Od',
-            '/MDd',
-            '/Zi',
-            '/W3',
-            '/D_DEBUG',
-        ]
-
-        ldflags = ['/nologo', '/INCREMENTAL:NO', '/LTCG']
-
-        ldflags_debug = ['/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL']
-
-        self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']
-        self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1']
-        self.ldflags_shared = [
-            *ldflags,
-            '/DLL',
-            '/MANIFEST:EMBED,ID=2',
-            '/MANIFESTUAC:NO',
-        ]
-        self.ldflags_shared_debug = [
-            *ldflags_debug,
-            '/DLL',
-            '/MANIFEST:EMBED,ID=2',
-            '/MANIFESTUAC:NO',
-        ]
-        self.ldflags_static = [*ldflags]
-        self.ldflags_static_debug = [*ldflags_debug]
-
-        self._ldflags = {
-            (base.Compiler.EXECUTABLE, None): self.ldflags_exe,
-            (base.Compiler.EXECUTABLE, False): self.ldflags_exe,
-            (base.Compiler.EXECUTABLE, True): self.ldflags_exe_debug,
-            (base.Compiler.SHARED_OBJECT, None): self.ldflags_shared,
-            (base.Compiler.SHARED_OBJECT, False): self.ldflags_shared,
-            (base.Compiler.SHARED_OBJECT, True): self.ldflags_shared_debug,
-            (base.Compiler.SHARED_LIBRARY, None): self.ldflags_static,
-            (base.Compiler.SHARED_LIBRARY, False): self.ldflags_static,
-            (base.Compiler.SHARED_LIBRARY, True): self.ldflags_static_debug,
-        }
-
-        self.initialized = True
-
-    # -- Worker methods ------------------------------------------------
-
-    @property
-    def out_extensions(self) -> dict[str, str]:
-        return {
-            **super().out_extensions,
-            **{
-                ext: self.res_extension
-                for ext in self._rc_extensions + self._mc_extensions
-            },
-        }
-
-    def compile(  # noqa: C901
-        self,
-        sources,
-        output_dir=None,
-        macros=None,
-        include_dirs=None,
-        debug=False,
-        extra_preargs=None,
-        extra_postargs=None,
-        depends=None,
-    ):
-        if not self.initialized:
-            self.initialize()
-        compile_info = self._setup_compile(
-            output_dir, macros, include_dirs, sources, depends, extra_postargs
-        )
-        macros, objects, extra_postargs, pp_opts, build = compile_info
-
-        compile_opts = extra_preargs or []
-        compile_opts.append('/c')
-        if debug:
-            compile_opts.extend(self.compile_options_debug)
-        else:
-            compile_opts.extend(self.compile_options)
-
-        add_cpp_opts = False
-
-        for obj in objects:
-            try:
-                src, ext = build[obj]
-            except KeyError:
-                continue
-            if debug:
-                # pass the full pathname to MSVC in debug mode,
-                # this allows the debugger to find the source file
-                # without asking the user to browse for it
-                src = os.path.abspath(src)
-
-            if ext in self._c_extensions:
-                input_opt = f"/Tc{src}"
-            elif ext in self._cpp_extensions:
-                input_opt = f"/Tp{src}"
-                add_cpp_opts = True
-            elif ext in self._rc_extensions:
-                # compile .RC to .RES file
-                input_opt = src
-                output_opt = "/fo" + obj
-                try:
-                    self.spawn([self.rc] + pp_opts + [output_opt, input_opt])
-                except DistutilsExecError as msg:
-                    raise CompileError(msg)
-                continue
-            elif ext in self._mc_extensions:
-                # Compile .MC to .RC file to .RES file.
-                #   * '-h dir' specifies the directory for the
-                #     generated include file
-                #   * '-r dir' specifies the target directory of the
-                #     generated RC file and the binary message resource
-                #     it includes
-                #
-                # For now (since there are no options to change this),
-                # we use the source-directory for the include file and
-                # the build directory for the RC file and message
-                # resources. This works at least for win32all.
-                h_dir = os.path.dirname(src)
-                rc_dir = os.path.dirname(obj)
-                try:
-                    # first compile .MC to .RC and .H file
-                    self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src])
-                    base, _ = os.path.splitext(os.path.basename(src))
-                    rc_file = os.path.join(rc_dir, base + '.rc')
-                    # then compile .RC to .RES file
-                    self.spawn([self.rc, "/fo" + obj, rc_file])
-
-                except DistutilsExecError as msg:
-                    raise CompileError(msg)
-                continue
-            else:
-                # how to handle this file?
-                raise CompileError(f"Don't know how to compile {src} to {obj}")
-
-            args = [self.cc] + compile_opts + pp_opts
-            if add_cpp_opts:
-                args.append('/EHsc')
-            args.extend((input_opt, "/Fo" + obj))
-            args.extend(extra_postargs)
-
-            try:
-                self.spawn(args)
-            except DistutilsExecError as msg:
-                raise CompileError(msg)
-
-        return objects
-
-    def create_static_lib(
-        self,
-        objects: list[str] | tuple[str, ...],
-        output_libname: str,
-        output_dir: str | None = None,
-        debug: bool = False,
-        target_lang: str | None = None,
-    ) -> None:
-        if not self.initialized:
-            self.initialize()
-        objects, output_dir = self._fix_object_args(objects, output_dir)
-        output_filename = self.library_filename(output_libname, output_dir=output_dir)
-
-        if self._need_link(objects, output_filename):
-            lib_args = objects + ['/OUT:' + output_filename]
-            if debug:
-                pass  # XXX what goes here?
-            try:
-                log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args))
-                self.spawn([self.lib] + lib_args)
-            except DistutilsExecError as msg:
-                raise LibError(msg)
-        else:
-            log.debug("skipping %s (up-to-date)", output_filename)
-
-    def link(
-        self,
-        target_desc: str,
-        objects: list[str] | tuple[str, ...],
-        output_filename: str,
-        output_dir: str | None = None,
-        libraries: list[str] | tuple[str, ...] | None = None,
-        library_dirs: list[str] | tuple[str, ...] | None = None,
-        runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
-        export_symbols: Iterable[str] | None = None,
-        debug: bool = False,
-        extra_preargs: list[str] | None = None,
-        extra_postargs: Iterable[str] | None = None,
-        build_temp: str | os.PathLike[str] | None = None,
-        target_lang: str | None = None,
-    ) -> None:
-        if not self.initialized:
-            self.initialize()
-        objects, output_dir = self._fix_object_args(objects, output_dir)
-        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
-        libraries, library_dirs, runtime_library_dirs = fixed_args
-
-        if runtime_library_dirs:
-            self.warn(
-                "I don't know what to do with 'runtime_library_dirs': "
-                + str(runtime_library_dirs)
-            )
-
-        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
-        if output_dir is not None:
-            output_filename = os.path.join(output_dir, output_filename)
-
-        if self._need_link(objects, output_filename):
-            ldflags = self._ldflags[target_desc, debug]
-
-            export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
-
-            ld_args = (
-                ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
-            )
-
-            # The MSVC linker generates .lib and .exp files, which cannot be
-            # suppressed by any linker switches. The .lib files may even be
-            # needed! Make sure they are generated in the temporary build
-            # directory. Since they have different names for debug and release
-            # builds, they can go into the same directory.
-            build_temp = os.path.dirname(objects[0])
-            if export_symbols is not None:
-                (dll_name, dll_ext) = os.path.splitext(
-                    os.path.basename(output_filename)
-                )
-                implib_file = os.path.join(build_temp, self.library_filename(dll_name))
-                ld_args.append('/IMPLIB:' + implib_file)
-
-            if extra_preargs:
-                ld_args[:0] = extra_preargs
-            if extra_postargs:
-                ld_args.extend(extra_postargs)
-
-            output_dir = os.path.dirname(os.path.abspath(output_filename))
-            self.mkpath(output_dir)
-            try:
-                log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
-                self.spawn([self.linker] + ld_args)
-            except DistutilsExecError as msg:
-                raise LinkError(msg)
-        else:
-            log.debug("skipping %s (up-to-date)", output_filename)
-
-    def spawn(self, cmd):
-        env = dict(os.environ, PATH=self._paths)
-        with self._fallback_spawn(cmd, env) as fallback:
-            return super().spawn(cmd, env=env)
-        return fallback.value
-
-    @contextlib.contextmanager
-    def _fallback_spawn(self, cmd, env):
-        """
-        Discovered in pypa/distutils#15, some tools monkeypatch the compiler,
-        so the 'env' kwarg causes a TypeError. Detect this condition and
-        restore the legacy, unsafe behavior.
-        """
-        bag = type('Bag', (), {})()
-        try:
-            yield bag
-        except TypeError as exc:
-            if "unexpected keyword argument 'env'" not in str(exc):
-                raise
-        else:
-            return
-        warnings.warn("Fallback spawn triggered. Please update distutils monkeypatch.")
-        with mock.patch.dict('os.environ', env):
-            bag.value = super().spawn(cmd)
-
-    # -- Miscellaneous methods -----------------------------------------
-    # These are all used by the 'gen_lib_options() function, in
-    # ccompiler.py.
-
-    def library_dir_option(self, dir):
-        return "/LIBPATH:" + dir
-
-    def runtime_library_dir_option(self, dir):
-        raise DistutilsPlatformError(
-            "don't know how to set runtime library search path for MSVC"
-        )
-
-    def library_option(self, lib):
-        return self.library_filename(lib)
-
-    def find_library_file(self, dirs, lib, debug=False):
-        # Prefer a debugging library if found (and requested), but deal
-        # with it if we don't have one.
-        if debug:
-            try_names = [lib + "_d", lib]
-        else:
-            try_names = [lib]
-        for dir in dirs:
-            for name in try_names:
-                libfile = os.path.join(dir, self.library_filename(name))
-                if os.path.isfile(libfile):
-                    return libfile
-        else:
-            # Oops, didn't find it in *any* of 'dirs'
-            return None
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_base.py b/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_base.py
deleted file mode 100644
index a762e2b..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_base.py
+++ /dev/null
@@ -1,83 +0,0 @@
-import platform
-import sysconfig
-import textwrap
-
-import pytest
-
-from .. import base
-
-pytestmark = pytest.mark.usefixtures('suppress_path_mangle')
-
-
-@pytest.fixture
-def c_file(tmp_path):
-    c_file = tmp_path / 'foo.c'
-    gen_headers = ('Python.h',)
-    is_windows = platform.system() == "Windows"
-    plat_headers = ('windows.h',) * is_windows
-    all_headers = gen_headers + plat_headers
-    headers = '\n'.join(f'#include <{header}>\n' for header in all_headers)
-    payload = (
-        textwrap.dedent(
-            """
-        #headers
-        void PyInit_foo(void) {}
-        """
-        )
-        .lstrip()
-        .replace('#headers', headers)
-    )
-    c_file.write_text(payload, encoding='utf-8')
-    return c_file
-
-
-def test_set_include_dirs(c_file):
-    """
-    Extensions should build even if set_include_dirs is invoked.
-    In particular, compiler-specific paths should not be overridden.
-    """
-    compiler = base.new_compiler()
-    python = sysconfig.get_paths()['include']
-    compiler.set_include_dirs([python])
-    compiler.compile([c_file])
-
-    # do it again, setting include dirs after any initialization
-    compiler.set_include_dirs([python])
-    compiler.compile([c_file])
-
-
-def test_has_function_prototype():
-    # Issue https://github.com/pypa/setuptools/issues/3648
-    # Test prototype-generating behavior.
-
-    compiler = base.new_compiler()
-
-    # Every C implementation should have these.
-    assert compiler.has_function('abort')
-    assert compiler.has_function('exit')
-    with pytest.deprecated_call(match='includes is deprecated'):
-        # abort() is a valid expression with the  prototype.
-        assert compiler.has_function('abort', includes=['stdlib.h'])
-    with pytest.deprecated_call(match='includes is deprecated'):
-        # But exit() is not valid with the actual prototype in scope.
-        assert not compiler.has_function('exit', includes=['stdlib.h'])
-    # And setuptools_does_not_exist is not declared or defined at all.
-    assert not compiler.has_function('setuptools_does_not_exist')
-    with pytest.deprecated_call(match='includes is deprecated'):
-        assert not compiler.has_function(
-            'setuptools_does_not_exist', includes=['stdio.h']
-        )
-
-
-def test_include_dirs_after_multiple_compile_calls(c_file):
-    """
-    Calling compile multiple times should not change the include dirs
-    (regression test for setuptools issue #3591).
-    """
-    compiler = base.new_compiler()
-    python = sysconfig.get_paths()['include']
-    compiler.set_include_dirs([python])
-    compiler.compile([c_file])
-    assert compiler.include_dirs == [python]
-    compiler.compile([c_file])
-    assert compiler.include_dirs == [python]
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_cygwin.py b/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_cygwin.py
deleted file mode 100644
index 9adf6b8..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_cygwin.py
+++ /dev/null
@@ -1,76 +0,0 @@
-"""Tests for distutils.cygwinccompiler."""
-
-import os
-import sys
-from distutils import sysconfig
-from distutils.tests import support
-
-import pytest
-
-from .. import cygwin
-
-
-@pytest.fixture(autouse=True)
-def stuff(request, monkeypatch, distutils_managed_tempdir):
-    self = request.instance
-    self.python_h = os.path.join(self.mkdtemp(), 'python.h')
-    monkeypatch.setattr(sysconfig, 'get_config_h_filename', self._get_config_h_filename)
-    monkeypatch.setattr(sys, 'version', sys.version)
-
-
-class TestCygwinCCompiler(support.TempdirManager):
-    def _get_config_h_filename(self):
-        return self.python_h
-
-    @pytest.mark.skipif('sys.platform != "cygwin"')
-    @pytest.mark.skipif('not os.path.exists("/usr/lib/libbash.dll.a")')
-    def test_find_library_file(self):
-        from distutils.cygwinccompiler import CygwinCCompiler
-
-        compiler = CygwinCCompiler()
-        link_name = "bash"
-        linkable_file = compiler.find_library_file(["/usr/lib"], link_name)
-        assert linkable_file is not None
-        assert os.path.exists(linkable_file)
-        assert linkable_file == f"/usr/lib/lib{link_name:s}.dll.a"
-
-    @pytest.mark.skipif('sys.platform != "cygwin"')
-    def test_runtime_library_dir_option(self):
-        from distutils.cygwinccompiler import CygwinCCompiler
-
-        compiler = CygwinCCompiler()
-        assert compiler.runtime_library_dir_option('/foo') == []
-
-    def test_check_config_h(self):
-        # check_config_h looks for "GCC" in sys.version first
-        # returns CONFIG_H_OK if found
-        sys.version = (
-            '2.6.1 (r261:67515, Dec  6 2008, 16:42:21) \n[GCC '
-            '4.0.1 (Apple Computer, Inc. build 5370)]'
-        )
-
-        assert cygwin.check_config_h()[0] == cygwin.CONFIG_H_OK
-
-        # then it tries to see if it can find "__GNUC__" in pyconfig.h
-        sys.version = 'something without the *CC word'
-
-        # if the file doesn't exist it returns  CONFIG_H_UNCERTAIN
-        assert cygwin.check_config_h()[0] == cygwin.CONFIG_H_UNCERTAIN
-
-        # if it exists but does not contain __GNUC__, it returns CONFIG_H_NOTOK
-        self.write_file(self.python_h, 'xxx')
-        assert cygwin.check_config_h()[0] == cygwin.CONFIG_H_NOTOK
-
-        # and CONFIG_H_OK if __GNUC__ is found
-        self.write_file(self.python_h, 'xxx __GNUC__ xxx')
-        assert cygwin.check_config_h()[0] == cygwin.CONFIG_H_OK
-
-    def test_get_msvcr(self):
-        assert cygwin.get_msvcr() == []
-
-    @pytest.mark.skipif('sys.platform != "cygwin"')
-    def test_dll_libraries_not_none(self):
-        from distutils.cygwinccompiler import CygwinCCompiler
-
-        compiler = CygwinCCompiler()
-        assert compiler.dll_libraries is not None
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_mingw.py b/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_mingw.py
deleted file mode 100644
index dc45687..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_mingw.py
+++ /dev/null
@@ -1,48 +0,0 @@
-from distutils import sysconfig
-from distutils.errors import DistutilsPlatformError
-from distutils.util import is_mingw, split_quoted
-
-import pytest
-
-from .. import cygwin, errors
-
-
-class TestMinGW32Compiler:
-    @pytest.mark.skipif(not is_mingw(), reason='not on mingw')
-    def test_compiler_type(self):
-        compiler = cygwin.MinGW32Compiler()
-        assert compiler.compiler_type == 'mingw32'
-
-    @pytest.mark.skipif(not is_mingw(), reason='not on mingw')
-    def test_set_executables(self, monkeypatch):
-        monkeypatch.setenv('CC', 'cc')
-        monkeypatch.setenv('CXX', 'c++')
-
-        compiler = cygwin.MinGW32Compiler()
-
-        assert compiler.compiler == split_quoted('cc -O -Wall')
-        assert compiler.compiler_so == split_quoted('cc -shared -O -Wall')
-        assert compiler.compiler_cxx == split_quoted('c++ -O -Wall')
-        assert compiler.linker_exe == split_quoted('cc')
-        assert compiler.linker_so == split_quoted('cc -shared')
-
-    @pytest.mark.skipif(not is_mingw(), reason='not on mingw')
-    def test_runtime_library_dir_option(self):
-        compiler = cygwin.MinGW32Compiler()
-        with pytest.raises(DistutilsPlatformError):
-            compiler.runtime_library_dir_option('/usr/lib')
-
-    @pytest.mark.skipif(not is_mingw(), reason='not on mingw')
-    def test_cygwincc_error(self, monkeypatch):
-        monkeypatch.setattr(cygwin, 'is_cygwincc', lambda _: True)
-
-        with pytest.raises(errors.Error):
-            cygwin.MinGW32Compiler()
-
-    @pytest.mark.skipif('sys.platform == "cygwin"')
-    def test_customize_compiler_with_msvc_python(self):
-        # In case we have an MSVC Python build, but still want to use
-        # MinGW32Compiler, then customize_compiler() shouldn't fail at least.
-        # https://github.com/pypa/setuptools/issues/4456
-        compiler = cygwin.MinGW32Compiler()
-        sysconfig.customize_compiler(compiler)
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_msvc.py b/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_msvc.py
deleted file mode 100644
index eca8319..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_msvc.py
+++ /dev/null
@@ -1,136 +0,0 @@
-import os
-import sys
-import sysconfig
-import threading
-import unittest.mock as mock
-from distutils.errors import DistutilsPlatformError
-from distutils.tests import support
-from distutils.util import get_platform
-
-import pytest
-
-from .. import msvc
-
-needs_winreg = pytest.mark.skipif('not hasattr(msvc, "winreg")')
-
-
-class Testmsvccompiler(support.TempdirManager):
-    def test_no_compiler(self, monkeypatch):
-        # makes sure query_vcvarsall raises
-        # a DistutilsPlatformError if the compiler
-        # is not found
-        def _find_vcvarsall(plat_spec):
-            return None, None
-
-        monkeypatch.setattr(msvc, '_find_vcvarsall', _find_vcvarsall)
-
-        with pytest.raises(DistutilsPlatformError):
-            msvc._get_vc_env(
-                'wont find this version',
-            )
-
-    @pytest.mark.skipif(
-        not sysconfig.get_platform().startswith("win"),
-        reason="Only run test for non-mingw Windows platforms",
-    )
-    @pytest.mark.parametrize(
-        "plat_name, expected",
-        [
-            ("win-arm64", "win-arm64"),
-            ("win-amd64", "win-amd64"),
-            (None, get_platform()),
-        ],
-    )
-    def test_cross_platform_compilation_paths(self, monkeypatch, plat_name, expected):
-        """
-        Ensure a specified target platform is passed to _get_vcvars_spec.
-        """
-        compiler = msvc.Compiler()
-
-        def _get_vcvars_spec(host_platform, platform):
-            assert platform == expected
-
-        monkeypatch.setattr(msvc, '_get_vcvars_spec', _get_vcvars_spec)
-        compiler.initialize(plat_name)
-
-    @needs_winreg
-    def test_get_vc_env_unicode(self):
-        test_var = 'ṰḖṤṪ┅ṼẨṜ'
-        test_value = '₃⁴₅'
-
-        # Ensure we don't early exit from _get_vc_env
-        old_distutils_use_sdk = os.environ.pop('DISTUTILS_USE_SDK', None)
-        os.environ[test_var] = test_value
-        try:
-            env = msvc._get_vc_env('x86')
-            assert test_var.lower() in env
-            assert test_value == env[test_var.lower()]
-        finally:
-            os.environ.pop(test_var)
-            if old_distutils_use_sdk:
-                os.environ['DISTUTILS_USE_SDK'] = old_distutils_use_sdk
-
-    @needs_winreg
-    @pytest.mark.parametrize('ver', (2015, 2017))
-    def test_get_vc(self, ver):
-        # This function cannot be mocked, so pass if VC is found
-        # and skip otherwise.
-        lookup = getattr(msvc, f'_find_vc{ver}')
-        expected_version = {2015: 14, 2017: 15}[ver]
-        version, path = lookup()
-        if not version:
-            pytest.skip(f"VS {ver} is not installed")
-        assert version >= expected_version
-        assert os.path.isdir(path)
-
-
-class CheckThread(threading.Thread):
-    exc_info = None
-
-    def run(self):
-        try:
-            super().run()
-        except Exception:
-            self.exc_info = sys.exc_info()
-
-    def __bool__(self):
-        return not self.exc_info
-
-
-class TestSpawn:
-    def test_concurrent_safe(self):
-        """
-        Concurrent calls to spawn should have consistent results.
-        """
-        compiler = msvc.Compiler()
-        compiler._paths = "expected"
-        inner_cmd = 'import os; assert os.environ["PATH"] == "expected"'
-        command = [sys.executable, '-c', inner_cmd]
-
-        threads = [
-            CheckThread(target=compiler.spawn, args=[command]) for n in range(100)
-        ]
-        for thread in threads:
-            thread.start()
-        for thread in threads:
-            thread.join()
-        assert all(threads)
-
-    def test_concurrent_safe_fallback(self):
-        """
-        If CCompiler.spawn has been monkey-patched without support
-        for an env, it should still execute.
-        """
-        from distutils import ccompiler
-
-        compiler = msvc.Compiler()
-        compiler._paths = "expected"
-
-        def CCompiler_spawn(self, cmd):
-            "A spawn without an env argument."
-            assert os.environ["PATH"] == "expected"
-
-        with mock.patch.object(ccompiler.CCompiler, 'spawn', CCompiler_spawn):
-            compiler.spawn(["n/a"])
-
-        assert os.environ.get("PATH") != "expected"
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_unix.py b/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_unix.py
deleted file mode 100644
index 35b6b0e..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/tests/test_unix.py
+++ /dev/null
@@ -1,413 +0,0 @@
-"""Tests for distutils.unixccompiler."""
-
-import os
-import sys
-import unittest.mock as mock
-from distutils import sysconfig
-from distutils.compat import consolidate_linker_args
-from distutils.errors import DistutilsPlatformError
-from distutils.tests import support
-from distutils.tests.compat.py39 import EnvironmentVarGuard
-from distutils.util import _clear_cached_macosx_ver
-
-import pytest
-
-from .. import unix
-
-
-@pytest.fixture(autouse=True)
-def save_values(monkeypatch):
-    monkeypatch.setattr(sys, 'platform', sys.platform)
-    monkeypatch.setattr(sysconfig, 'get_config_var', sysconfig.get_config_var)
-    monkeypatch.setattr(sysconfig, 'get_config_vars', sysconfig.get_config_vars)
-
-
-@pytest.fixture(autouse=True)
-def compiler_wrapper(request):
-    class CompilerWrapper(unix.Compiler):
-        def rpath_foo(self):
-            return self.runtime_library_dir_option('/foo')
-
-    request.instance.cc = CompilerWrapper()
-
-
-class TestUnixCCompiler(support.TempdirManager):
-    @pytest.mark.skipif('platform.system == "Windows"')
-    def test_runtime_libdir_option(self):  # noqa: C901
-        # Issue #5900; GitHub Issue #37
-        #
-        # Ensure RUNPATH is added to extension modules with RPATH if
-        # GNU ld is used
-
-        # darwin
-        sys.platform = 'darwin'
-        darwin_ver_var = 'MACOSX_DEPLOYMENT_TARGET'
-        darwin_rpath_flag = '-Wl,-rpath,/foo'
-        darwin_lib_flag = '-L/foo'
-
-        # (macOS version from syscfg, macOS version from env var) -> flag
-        # Version value of None generates two tests: as None and as empty string
-        # Expected flag value of None means an mismatch exception is expected
-        darwin_test_cases = [
-            ((None, None), darwin_lib_flag),
-            ((None, '11'), darwin_rpath_flag),
-            (('10', None), darwin_lib_flag),
-            (('10.3', None), darwin_lib_flag),
-            (('10.3.1', None), darwin_lib_flag),
-            (('10.5', None), darwin_rpath_flag),
-            (('10.5.1', None), darwin_rpath_flag),
-            (('10.3', '10.3'), darwin_lib_flag),
-            (('10.3', '10.5'), darwin_rpath_flag),
-            (('10.5', '10.3'), darwin_lib_flag),
-            (('10.5', '11'), darwin_rpath_flag),
-            (('10.4', '10'), None),
-        ]
-
-        def make_darwin_gcv(syscfg_macosx_ver):
-            def gcv(var):
-                if var == darwin_ver_var:
-                    return syscfg_macosx_ver
-                return "xxx"
-
-            return gcv
-
-        def do_darwin_test(syscfg_macosx_ver, env_macosx_ver, expected_flag):
-            env = os.environ
-            msg = f"macOS version = (sysconfig={syscfg_macosx_ver!r}, env={env_macosx_ver!r})"
-
-            # Save
-            old_gcv = sysconfig.get_config_var
-            old_env_macosx_ver = env.get(darwin_ver_var)
-
-            # Setup environment
-            _clear_cached_macosx_ver()
-            sysconfig.get_config_var = make_darwin_gcv(syscfg_macosx_ver)
-            if env_macosx_ver is not None:
-                env[darwin_ver_var] = env_macosx_ver
-            elif darwin_ver_var in env:
-                env.pop(darwin_ver_var)
-
-            # Run the test
-            if expected_flag is not None:
-                assert self.cc.rpath_foo() == expected_flag, msg
-            else:
-                with pytest.raises(
-                    DistutilsPlatformError, match=darwin_ver_var + r' mismatch'
-                ):
-                    self.cc.rpath_foo()
-
-            # Restore
-            if old_env_macosx_ver is not None:
-                env[darwin_ver_var] = old_env_macosx_ver
-            elif darwin_ver_var in env:
-                env.pop(darwin_ver_var)
-            sysconfig.get_config_var = old_gcv
-            _clear_cached_macosx_ver()
-
-        for macosx_vers, expected_flag in darwin_test_cases:
-            syscfg_macosx_ver, env_macosx_ver = macosx_vers
-            do_darwin_test(syscfg_macosx_ver, env_macosx_ver, expected_flag)
-            # Bonus test cases with None interpreted as empty string
-            if syscfg_macosx_ver is None:
-                do_darwin_test("", env_macosx_ver, expected_flag)
-            if env_macosx_ver is None:
-                do_darwin_test(syscfg_macosx_ver, "", expected_flag)
-            if syscfg_macosx_ver is None and env_macosx_ver is None:
-                do_darwin_test("", "", expected_flag)
-
-        old_gcv = sysconfig.get_config_var
-
-        # hp-ux
-        sys.platform = 'hp-ux'
-
-        def gcv(v):
-            return 'xxx'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == ['+s', '-L/foo']
-
-        def gcv(v):
-            return 'gcc'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == ['-Wl,+s', '-L/foo']
-
-        def gcv(v):
-            return 'g++'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == ['-Wl,+s', '-L/foo']
-
-        sysconfig.get_config_var = old_gcv
-
-        # GCC GNULD
-        sys.platform = 'bar'
-
-        def gcv(v):
-            if v == 'CC':
-                return 'gcc'
-            elif v == 'GNULD':
-                return 'yes'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == consolidate_linker_args([
-            '-Wl,--enable-new-dtags',
-            '-Wl,-rpath,/foo',
-        ])
-
-        def gcv(v):
-            if v == 'CC':
-                return 'gcc -pthread -B /bar'
-            elif v == 'GNULD':
-                return 'yes'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == consolidate_linker_args([
-            '-Wl,--enable-new-dtags',
-            '-Wl,-rpath,/foo',
-        ])
-
-        # GCC non-GNULD
-        sys.platform = 'bar'
-
-        def gcv(v):
-            if v == 'CC':
-                return 'gcc'
-            elif v == 'GNULD':
-                return 'no'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == '-Wl,-R/foo'
-
-        # GCC GNULD with fully qualified configuration prefix
-        # see #7617
-        sys.platform = 'bar'
-
-        def gcv(v):
-            if v == 'CC':
-                return 'x86_64-pc-linux-gnu-gcc-4.4.2'
-            elif v == 'GNULD':
-                return 'yes'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == consolidate_linker_args([
-            '-Wl,--enable-new-dtags',
-            '-Wl,-rpath,/foo',
-        ])
-
-        # non-GCC GNULD
-        sys.platform = 'bar'
-
-        def gcv(v):
-            if v == 'CC':
-                return 'cc'
-            elif v == 'GNULD':
-                return 'yes'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == consolidate_linker_args([
-            '-Wl,--enable-new-dtags',
-            '-Wl,-rpath,/foo',
-        ])
-
-        # non-GCC non-GNULD
-        sys.platform = 'bar'
-
-        def gcv(v):
-            if v == 'CC':
-                return 'cc'
-            elif v == 'GNULD':
-                return 'no'
-
-        sysconfig.get_config_var = gcv
-        assert self.cc.rpath_foo() == '-Wl,-R/foo'
-
-    @pytest.mark.skipif('platform.system == "Windows"')
-    def test_cc_overrides_ldshared(self):
-        # Issue #18080:
-        # ensure that setting CC env variable also changes default linker
-        def gcv(v):
-            if v == 'LDSHARED':
-                return 'gcc-4.2 -bundle -undefined dynamic_lookup '
-            return 'gcc-4.2'
-
-        def gcvs(*args, _orig=sysconfig.get_config_vars):
-            if args:
-                return list(map(sysconfig.get_config_var, args))
-            return _orig()
-
-        sysconfig.get_config_var = gcv
-        sysconfig.get_config_vars = gcvs
-        with EnvironmentVarGuard() as env:
-            env['CC'] = 'my_cc'
-            del env['LDSHARED']
-            sysconfig.customize_compiler(self.cc)
-        assert self.cc.linker_so[0] == 'my_cc'
-
-    @pytest.mark.skipif('platform.system == "Windows"')
-    def test_cxx_commands_used_are_correct(self):
-        def gcv(v):
-            if v == 'LDSHARED':
-                return 'ccache gcc-4.2 -bundle -undefined dynamic_lookup'
-            elif v == 'LDCXXSHARED':
-                return 'ccache g++-4.2 -bundle -undefined dynamic_lookup'
-            elif v == 'CXX':
-                return 'ccache g++-4.2'
-            elif v == 'CC':
-                return 'ccache gcc-4.2'
-            return ''
-
-        def gcvs(*args, _orig=sysconfig.get_config_vars):
-            if args:
-                return list(map(sysconfig.get_config_var, args))
-            return _orig()  # pragma: no cover
-
-        sysconfig.get_config_var = gcv
-        sysconfig.get_config_vars = gcvs
-        with (
-            mock.patch.object(self.cc, 'spawn', return_value=None) as mock_spawn,
-            mock.patch.object(self.cc, '_need_link', return_value=True),
-            mock.patch.object(self.cc, 'mkpath', return_value=None),
-            EnvironmentVarGuard() as env,
-        ):
-            # override environment overrides in case they're specified by CI
-            del env['CXX']
-            del env['LDCXXSHARED']
-
-            sysconfig.customize_compiler(self.cc)
-            assert self.cc.linker_so_cxx[0:2] == ['ccache', 'g++-4.2']
-            assert self.cc.linker_exe_cxx[0:2] == ['ccache', 'g++-4.2']
-            self.cc.link(None, [], 'a.out', target_lang='c++')
-            call_args = mock_spawn.call_args[0][0]
-            expected = ['ccache', 'g++-4.2', '-bundle', '-undefined', 'dynamic_lookup']
-            assert call_args[:5] == expected
-
-            self.cc.link_executable([], 'a.out', target_lang='c++')
-            call_args = mock_spawn.call_args[0][0]
-            expected = ['ccache', 'g++-4.2', '-o', self.cc.executable_filename('a.out')]
-            assert call_args[:4] == expected
-
-            env['LDCXXSHARED'] = 'wrapper g++-4.2 -bundle -undefined dynamic_lookup'
-            env['CXX'] = 'wrapper g++-4.2'
-            sysconfig.customize_compiler(self.cc)
-            assert self.cc.linker_so_cxx[0:2] == ['wrapper', 'g++-4.2']
-            assert self.cc.linker_exe_cxx[0:2] == ['wrapper', 'g++-4.2']
-            self.cc.link(None, [], 'a.out', target_lang='c++')
-            call_args = mock_spawn.call_args[0][0]
-            expected = ['wrapper', 'g++-4.2', '-bundle', '-undefined', 'dynamic_lookup']
-            assert call_args[:5] == expected
-
-            self.cc.link_executable([], 'a.out', target_lang='c++')
-            call_args = mock_spawn.call_args[0][0]
-            expected = [
-                'wrapper',
-                'g++-4.2',
-                '-o',
-                self.cc.executable_filename('a.out'),
-            ]
-            assert call_args[:4] == expected
-
-    @pytest.mark.skipif('platform.system == "Windows"')
-    @pytest.mark.usefixtures('disable_macos_customization')
-    def test_cc_overrides_ldshared_for_cxx_correctly(self):
-        """
-        Ensure that setting CC env variable also changes default linker
-        correctly when building C++ extensions.
-
-        pypa/distutils#126
-        """
-
-        def gcv(v):
-            if v == 'LDSHARED':
-                return 'gcc-4.2 -bundle -undefined dynamic_lookup '
-            elif v == 'LDCXXSHARED':
-                return 'g++-4.2 -bundle -undefined dynamic_lookup '
-            elif v == 'CXX':
-                return 'g++-4.2'
-            elif v == 'CC':
-                return 'gcc-4.2'
-            return ''
-
-        def gcvs(*args, _orig=sysconfig.get_config_vars):
-            if args:
-                return list(map(sysconfig.get_config_var, args))
-            return _orig()
-
-        sysconfig.get_config_var = gcv
-        sysconfig.get_config_vars = gcvs
-        with (
-            mock.patch.object(self.cc, 'spawn', return_value=None) as mock_spawn,
-            mock.patch.object(self.cc, '_need_link', return_value=True),
-            mock.patch.object(self.cc, 'mkpath', return_value=None),
-            EnvironmentVarGuard() as env,
-        ):
-            env['CC'] = 'ccache my_cc'
-            env['CXX'] = 'my_cxx'
-            del env['LDSHARED']
-            sysconfig.customize_compiler(self.cc)
-            assert self.cc.linker_so[0:2] == ['ccache', 'my_cc']
-            self.cc.link(None, [], 'a.out', target_lang='c++')
-            call_args = mock_spawn.call_args[0][0]
-            expected = ['my_cxx', '-bundle', '-undefined', 'dynamic_lookup']
-            assert call_args[:4] == expected
-
-    @pytest.mark.skipif('platform.system == "Windows"')
-    def test_explicit_ldshared(self):
-        # Issue #18080:
-        # ensure that setting CC env variable does not change
-        #   explicit LDSHARED setting for linker
-        def gcv(v):
-            if v == 'LDSHARED':
-                return 'gcc-4.2 -bundle -undefined dynamic_lookup '
-            return 'gcc-4.2'
-
-        def gcvs(*args, _orig=sysconfig.get_config_vars):
-            if args:
-                return list(map(sysconfig.get_config_var, args))
-            return _orig()
-
-        sysconfig.get_config_var = gcv
-        sysconfig.get_config_vars = gcvs
-        with EnvironmentVarGuard() as env:
-            env['CC'] = 'my_cc'
-            env['LDSHARED'] = 'my_ld -bundle -dynamic'
-            sysconfig.customize_compiler(self.cc)
-        assert self.cc.linker_so[0] == 'my_ld'
-
-    def test_has_function(self):
-        # Issue https://github.com/pypa/distutils/issues/64:
-        # ensure that setting output_dir does not raise
-        # FileNotFoundError: [Errno 2] No such file or directory: 'a.out'
-        self.cc.output_dir = 'scratch'
-        os.chdir(self.mkdtemp())
-        self.cc.has_function('abort')
-
-    def test_find_library_file(self, monkeypatch):
-        compiler = unix.Compiler()
-        compiler._library_root = lambda dir: dir
-        monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d)
-
-        libname = 'libabc.dylib' if sys.platform != 'cygwin' else 'cygabc.dll'
-        dirs = ('/foo/bar/missing', '/foo/bar/existing')
-        assert (
-            compiler.find_library_file(dirs, 'abc').replace('\\', '/')
-            == f'/foo/bar/existing/{libname}'
-        )
-        assert (
-            compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
-            == f'/foo/bar/existing/{libname}'
-        )
-
-        monkeypatch.setattr(
-            os.path,
-            'exists',
-            lambda d: 'existing' in d and '.a' in d and '.dll.a' not in d,
-        )
-        assert (
-            compiler.find_library_file(dirs, 'abc').replace('\\', '/')
-            == '/foo/bar/existing/libabc.a'
-        )
-        assert (
-            compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
-            == '/foo/bar/existing/libabc.a'
-        )
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/unix.py b/voxvera/vendor/setuptools/_distutils/compilers/C/unix.py
deleted file mode 100644
index 1231b32..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/unix.py
+++ /dev/null
@@ -1,422 +0,0 @@
-"""distutils.unixccompiler
-
-Contains the UnixCCompiler class, a subclass of CCompiler that handles
-the "typical" Unix-style command-line C compiler:
-  * macros defined with -Dname[=value]
-  * macros undefined with -Uname
-  * include search directories specified with -Idir
-  * libraries specified with -lllib
-  * library search directories specified with -Ldir
-  * compile handled by 'cc' (or similar) executable with -c option:
-    compiles .c to .o
-  * link static library handled by 'ar' command (possibly with 'ranlib')
-  * link shared library handled by 'cc -shared'
-"""
-
-from __future__ import annotations
-
-import itertools
-import os
-import re
-import shlex
-import sys
-from collections.abc import Iterable
-
-from ... import sysconfig
-from ..._log import log
-from ..._macos_compat import compiler_fixup
-from ..._modified import newer
-from ...compat import consolidate_linker_args
-from ...errors import DistutilsExecError
-from . import base
-from .base import _Macro, gen_lib_options, gen_preprocess_options
-from .errors import (
-    CompileError,
-    LibError,
-    LinkError,
-)
-
-# XXX Things not currently handled:
-#   * optimization/debug/warning flags; we just use whatever's in Python's
-#     Makefile and live with it.  Is this adequate?  If not, we might
-#     have to have a bunch of subclasses GNUCCompiler, SGICCompiler,
-#     SunCCompiler, and I suspect down that road lies madness.
-#   * even if we don't know a warning flag from an optimization flag,
-#     we need some way for outsiders to feed preprocessor/compiler/linker
-#     flags in to us -- eg. a sysadmin might want to mandate certain flags
-#     via a site config file, or a user might want to set something for
-#     compiling this module distribution only via the setup.py command
-#     line, whatever.  As long as these options come from something on the
-#     current system, they can be as system-dependent as they like, and we
-#     should just happily stuff them into the preprocessor/compiler/linker
-#     options and carry on.
-
-
-def _split_env(cmd):
-    """
-    For macOS, split command into 'env' portion (if any)
-    and the rest of the linker command.
-
-    >>> _split_env(['a', 'b', 'c'])
-    ([], ['a', 'b', 'c'])
-    >>> _split_env(['/usr/bin/env', 'A=3', 'gcc'])
-    (['/usr/bin/env', 'A=3'], ['gcc'])
-    """
-    pivot = 0
-    if os.path.basename(cmd[0]) == "env":
-        pivot = 1
-        while '=' in cmd[pivot]:
-            pivot += 1
-    return cmd[:pivot], cmd[pivot:]
-
-
-def _split_aix(cmd):
-    """
-    AIX platforms prefix the compiler with the ld_so_aix
-    script, so split that from the linker command.
-
-    >>> _split_aix(['a', 'b', 'c'])
-    ([], ['a', 'b', 'c'])
-    >>> _split_aix(['/bin/foo/ld_so_aix', 'gcc'])
-    (['/bin/foo/ld_so_aix'], ['gcc'])
-    """
-    pivot = os.path.basename(cmd[0]) == 'ld_so_aix'
-    return cmd[:pivot], cmd[pivot:]
-
-
-def _linker_params(linker_cmd, compiler_cmd):
-    """
-    The linker command usually begins with the compiler
-    command (possibly multiple elements), followed by zero or more
-    params for shared library building.
-
-    If the LDSHARED env variable overrides the linker command,
-    however, the commands may not match.
-
-    Return the best guess of the linker parameters by stripping
-    the linker command. If the compiler command does not
-    match the linker command, assume the linker command is
-    just the first element.
-
-    >>> _linker_params('gcc foo bar'.split(), ['gcc'])
-    ['foo', 'bar']
-    >>> _linker_params('gcc foo bar'.split(), ['other'])
-    ['foo', 'bar']
-    >>> _linker_params('ccache gcc foo bar'.split(), 'ccache gcc'.split())
-    ['foo', 'bar']
-    >>> _linker_params(['gcc'], ['gcc'])
-    []
-    """
-    c_len = len(compiler_cmd)
-    pivot = c_len if linker_cmd[:c_len] == compiler_cmd else 1
-    return linker_cmd[pivot:]
-
-
-class Compiler(base.Compiler):
-    compiler_type = 'unix'
-
-    # These are used by CCompiler in two places: the constructor sets
-    # instance attributes 'preprocessor', 'compiler', etc. from them, and
-    # 'set_executable()' allows any of these to be set.  The defaults here
-    # are pretty generic; they will probably have to be set by an outsider
-    # (eg. using information discovered by the sysconfig about building
-    # Python extensions).
-    executables = {
-        'preprocessor': None,
-        'compiler': ["cc"],
-        'compiler_so': ["cc"],
-        'compiler_cxx': ["c++"],
-        'compiler_so_cxx': ["c++"],
-        'linker_so': ["cc", "-shared"],
-        'linker_so_cxx': ["c++", "-shared"],
-        'linker_exe': ["cc"],
-        'linker_exe_cxx': ["c++", "-shared"],
-        'archiver': ["ar", "-cr"],
-        'ranlib': None,
-    }
-
-    if sys.platform[:6] == "darwin":
-        executables['ranlib'] = ["ranlib"]
-
-    # Needed for the filename generation methods provided by the base
-    # class, CCompiler.  NB. whoever instantiates/uses a particular
-    # UnixCCompiler instance should set 'shared_lib_ext' -- we set a
-    # reasonable common default here, but it's not necessarily used on all
-    # Unices!
-
-    src_extensions = [".c", ".C", ".cc", ".cxx", ".cpp", ".m"]
-    obj_extension = ".o"
-    static_lib_extension = ".a"
-    shared_lib_extension = ".so"
-    dylib_lib_extension = ".dylib"
-    xcode_stub_lib_extension = ".tbd"
-    static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
-    xcode_stub_lib_format = dylib_lib_format
-    if sys.platform == "cygwin":
-        exe_extension = ".exe"
-        shared_lib_extension = ".dll.a"
-        dylib_lib_extension = ".dll"
-        dylib_lib_format = "cyg%s%s"
-
-    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
-        """Remove standard library path from rpath"""
-        libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args(
-            libraries, library_dirs, runtime_library_dirs
-        )
-        libdir = sysconfig.get_config_var('LIBDIR')
-        if (
-            runtime_library_dirs
-            and libdir.startswith("/usr/lib")
-            and (libdir in runtime_library_dirs)
-        ):
-            runtime_library_dirs.remove(libdir)
-        return libraries, library_dirs, runtime_library_dirs
-
-    def preprocess(
-        self,
-        source: str | os.PathLike[str],
-        output_file: str | os.PathLike[str] | None = None,
-        macros: list[_Macro] | None = None,
-        include_dirs: list[str] | tuple[str, ...] | None = None,
-        extra_preargs: list[str] | None = None,
-        extra_postargs: Iterable[str] | None = None,
-    ):
-        fixed_args = self._fix_compile_args(None, macros, include_dirs)
-        ignore, macros, include_dirs = fixed_args
-        pp_opts = gen_preprocess_options(macros, include_dirs)
-        pp_args = self.preprocessor + pp_opts
-        if output_file:
-            pp_args.extend(['-o', output_file])
-        if extra_preargs:
-            pp_args[:0] = extra_preargs
-        if extra_postargs:
-            pp_args.extend(extra_postargs)
-        pp_args.append(source)
-
-        # reasons to preprocess:
-        # - force is indicated
-        # - output is directed to stdout
-        # - source file is newer than the target
-        preprocess = self.force or output_file is None or newer(source, output_file)
-        if not preprocess:
-            return
-
-        if output_file:
-            self.mkpath(os.path.dirname(output_file))
-
-        try:
-            self.spawn(pp_args)
-        except DistutilsExecError as msg:
-            raise CompileError(msg)
-
-    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-        compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs)
-        compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs)
-        try:
-            if self.detect_language(src) == 'c++':
-                self.spawn(
-                    compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs
-                )
-            else:
-                self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
-        except DistutilsExecError as msg:
-            raise CompileError(msg)
-
-    def create_static_lib(
-        self, objects, output_libname, output_dir=None, debug=False, target_lang=None
-    ):
-        objects, output_dir = self._fix_object_args(objects, output_dir)
-
-        output_filename = self.library_filename(output_libname, output_dir=output_dir)
-
-        if self._need_link(objects, output_filename):
-            self.mkpath(os.path.dirname(output_filename))
-            self.spawn(self.archiver + [output_filename] + objects + self.objects)
-
-            # Not many Unices required ranlib anymore -- SunOS 4.x is, I
-            # think the only major Unix that does.  Maybe we need some
-            # platform intelligence here to skip ranlib if it's not
-            # needed -- or maybe Python's configure script took care of
-            # it for us, hence the check for leading colon.
-            if self.ranlib:
-                try:
-                    self.spawn(self.ranlib + [output_filename])
-                except DistutilsExecError as msg:
-                    raise LibError(msg)
-        else:
-            log.debug("skipping %s (up-to-date)", output_filename)
-
-    def link(
-        self,
-        target_desc,
-        objects: list[str] | tuple[str, ...],
-        output_filename,
-        output_dir: str | None = None,
-        libraries: list[str] | tuple[str, ...] | None = None,
-        library_dirs: list[str] | tuple[str, ...] | None = None,
-        runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
-        export_symbols=None,
-        debug=False,
-        extra_preargs=None,
-        extra_postargs=None,
-        build_temp=None,
-        target_lang=None,
-    ):
-        objects, output_dir = self._fix_object_args(objects, output_dir)
-        fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
-        libraries, library_dirs, runtime_library_dirs = fixed_args
-
-        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
-        if not isinstance(output_dir, (str, type(None))):
-            raise TypeError("'output_dir' must be a string or None")
-        if output_dir is not None:
-            output_filename = os.path.join(output_dir, output_filename)
-
-        if self._need_link(objects, output_filename):
-            ld_args = objects + self.objects + lib_opts + ['-o', output_filename]
-            if debug:
-                ld_args[:0] = ['-g']
-            if extra_preargs:
-                ld_args[:0] = extra_preargs
-            if extra_postargs:
-                ld_args.extend(extra_postargs)
-            self.mkpath(os.path.dirname(output_filename))
-            try:
-                # Select a linker based on context: linker_exe when
-                # building an executable or linker_so (with shared options)
-                # when building a shared library.
-                building_exe = target_desc == base.Compiler.EXECUTABLE
-                target_cxx = target_lang == "c++"
-                linker = (
-                    (self.linker_exe_cxx if target_cxx else self.linker_exe)
-                    if building_exe
-                    else (self.linker_so_cxx if target_cxx else self.linker_so)
-                )[:]
-
-                if target_cxx and self.compiler_cxx:
-                    env, linker_ne = _split_env(linker)
-                    aix, linker_na = _split_aix(linker_ne)
-                    _, compiler_cxx_ne = _split_env(self.compiler_cxx)
-                    _, linker_exe_ne = _split_env(self.linker_exe_cxx)
-
-                    params = _linker_params(linker_na, linker_exe_ne)
-                    linker = env + aix + compiler_cxx_ne + params
-
-                linker = compiler_fixup(linker, ld_args)
-
-                self.spawn(linker + ld_args)
-            except DistutilsExecError as msg:
-                raise LinkError(msg)
-        else:
-            log.debug("skipping %s (up-to-date)", output_filename)
-
-    # -- Miscellaneous methods -----------------------------------------
-    # These are all used by the 'gen_lib_options() function, in
-    # ccompiler.py.
-
-    def library_dir_option(self, dir):
-        return "-L" + dir
-
-    def _is_gcc(self):
-        cc_var = sysconfig.get_config_var("CC")
-        compiler = os.path.basename(shlex.split(cc_var)[0])
-        return "gcc" in compiler or "g++" in compiler
-
-    def runtime_library_dir_option(self, dir: str) -> str | list[str]:  # type: ignore[override] # Fixed in pypa/distutils#339
-        # XXX Hackish, at the very least.  See Python bug #445902:
-        # https://bugs.python.org/issue445902
-        # Linkers on different platforms need different options to
-        # specify that directories need to be added to the list of
-        # directories searched for dependencies when a dynamic library
-        # is sought.  GCC on GNU systems (Linux, FreeBSD, ...) has to
-        # be told to pass the -R option through to the linker, whereas
-        # other compilers and gcc on other systems just know this.
-        # Other compilers may need something slightly different.  At
-        # this time, there's no way to determine this information from
-        # the configuration data stored in the Python installation, so
-        # we use this hack.
-        if sys.platform[:6] == "darwin":
-            from distutils.util import get_macosx_target_ver, split_version
-
-            macosx_target_ver = get_macosx_target_ver()
-            if macosx_target_ver and split_version(macosx_target_ver) >= [10, 5]:
-                return "-Wl,-rpath," + dir
-            else:  # no support for -rpath on earlier macOS versions
-                return "-L" + dir
-        elif sys.platform[:7] == "freebsd":
-            return "-Wl,-rpath=" + dir
-        elif sys.platform[:5] == "hp-ux":
-            return [
-                "-Wl,+s" if self._is_gcc() else "+s",
-                "-L" + dir,
-            ]
-
-        # For all compilers, `-Wl` is the presumed way to pass a
-        # compiler option to the linker
-        if sysconfig.get_config_var("GNULD") == "yes":
-            return consolidate_linker_args([
-                # Force RUNPATH instead of RPATH
-                "-Wl,--enable-new-dtags",
-                "-Wl,-rpath," + dir,
-            ])
-        else:
-            return "-Wl,-R" + dir
-
-    def library_option(self, lib):
-        return "-l" + lib
-
-    @staticmethod
-    def _library_root(dir):
-        """
-        macOS users can specify an alternate SDK using'-isysroot'.
-        Calculate the SDK root if it is specified.
-
-        Note that, as of Xcode 7, Apple SDKs may contain textual stub
-        libraries with .tbd extensions rather than the normal .dylib
-        shared libraries installed in /.  The Apple compiler tool
-        chain handles this transparently but it can cause problems
-        for programs that are being built with an SDK and searching
-        for specific libraries.  Callers of find_library_file need to
-        keep in mind that the base filename of the returned SDK library
-        file might have a different extension from that of the library
-        file installed on the running system, for example:
-          /Applications/Xcode.app/Contents/Developer/Platforms/
-              MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
-              usr/lib/libedit.tbd
-        vs
-          /usr/lib/libedit.dylib
-        """
-        cflags = sysconfig.get_config_var('CFLAGS')
-        match = re.search(r'-isysroot\s*(\S+)', cflags)
-
-        apply_root = (
-            sys.platform == 'darwin'
-            and match
-            and (
-                dir.startswith('/System/')
-                or (dir.startswith('/usr/') and not dir.startswith('/usr/local/'))
-            )
-        )
-
-        return os.path.join(match.group(1), dir[1:]) if apply_root else dir
-
-    def find_library_file(self, dirs, lib, debug=False):
-        """
-        Second-guess the linker with not much hard
-        data to go on: GCC seems to prefer the shared library, so
-        assume that *all* Unix C compilers do,
-        ignoring even GCC's "-static" option.
-        """
-        lib_names = (
-            self.library_filename(lib, lib_type=type)
-            for type in 'dylib xcode_stub shared static'.split()
-        )
-
-        roots = map(self._library_root, dirs)
-
-        searched = itertools.starmap(os.path.join, itertools.product(roots, lib_names))
-
-        found = filter(os.path.exists, searched)
-
-        # Return None if it could not be found in any dir.
-        return next(found, None)
diff --git a/voxvera/vendor/setuptools/_distutils/compilers/C/zos.py b/voxvera/vendor/setuptools/_distutils/compilers/C/zos.py
deleted file mode 100644
index 681c631..0000000
--- a/voxvera/vendor/setuptools/_distutils/compilers/C/zos.py
+++ /dev/null
@@ -1,230 +0,0 @@
-"""distutils.zosccompiler
-
-Contains the selection of the c & c++ compilers on z/OS. There are several
-different c compilers on z/OS, all of them are optional, so the correct
-one needs to be chosen based on the users input. This is compatible with
-the following compilers:
-
-IBM C/C++ For Open Enterprise Languages on z/OS 2.0
-IBM Open XL C/C++ 1.1 for z/OS
-IBM XL C/C++ V2.4.1 for z/OS 2.4 and 2.5
-IBM z/OS XL C/C++
-"""
-
-import os
-
-from ... import sysconfig
-from ...errors import DistutilsExecError
-from . import unix
-from .errors import CompileError
-
-_cc_args = {
-    'ibm-openxl': [
-        '-m64',
-        '-fvisibility=default',
-        '-fzos-le-char-mode=ascii',
-        '-fno-short-enums',
-    ],
-    'ibm-xlclang': [
-        '-q64',
-        '-qexportall',
-        '-qascii',
-        '-qstrict',
-        '-qnocsect',
-        '-Wa,asa,goff',
-        '-Wa,xplink',
-        '-qgonumber',
-        '-qenum=int',
-        '-Wc,DLL',
-    ],
-    'ibm-xlc': [
-        '-q64',
-        '-qexportall',
-        '-qascii',
-        '-qstrict',
-        '-qnocsect',
-        '-Wa,asa,goff',
-        '-Wa,xplink',
-        '-qgonumber',
-        '-qenum=int',
-        '-Wc,DLL',
-        '-qlanglvl=extc99',
-    ],
-}
-
-_cxx_args = {
-    'ibm-openxl': [
-        '-m64',
-        '-fvisibility=default',
-        '-fzos-le-char-mode=ascii',
-        '-fno-short-enums',
-    ],
-    'ibm-xlclang': [
-        '-q64',
-        '-qexportall',
-        '-qascii',
-        '-qstrict',
-        '-qnocsect',
-        '-Wa,asa,goff',
-        '-Wa,xplink',
-        '-qgonumber',
-        '-qenum=int',
-        '-Wc,DLL',
-    ],
-    'ibm-xlc': [
-        '-q64',
-        '-qexportall',
-        '-qascii',
-        '-qstrict',
-        '-qnocsect',
-        '-Wa,asa,goff',
-        '-Wa,xplink',
-        '-qgonumber',
-        '-qenum=int',
-        '-Wc,DLL',
-        '-qlanglvl=extended0x',
-    ],
-}
-
-_asm_args = {
-    'ibm-openxl': ['-fasm', '-fno-integrated-as', '-Wa,--ASA', '-Wa,--GOFF'],
-    'ibm-xlclang': [],
-    'ibm-xlc': [],
-}
-
-_ld_args = {
-    'ibm-openxl': [],
-    'ibm-xlclang': ['-Wl,dll', '-q64'],
-    'ibm-xlc': ['-Wl,dll', '-q64'],
-}
-
-
-# Python on z/OS is built with no compiler specific options in it's CFLAGS.
-# But each compiler requires it's own specific options to build successfully,
-# though some of the options are common between them
-class Compiler(unix.Compiler):
-    src_extensions = ['.c', '.C', '.cc', '.cxx', '.cpp', '.m', '.s']
-    _cpp_extensions = ['.cc', '.cpp', '.cxx', '.C']
-    _asm_extensions = ['.s']
-
-    def _get_zos_compiler_name(self):
-        zos_compiler_names = [
-            os.path.basename(binary)
-            for envvar in ('CC', 'CXX', 'LDSHARED')
-            if (binary := os.environ.get(envvar, None))
-        ]
-        if len(zos_compiler_names) == 0:
-            return 'ibm-openxl'
-
-        zos_compilers = {}
-        for compiler in (
-            'ibm-clang',
-            'ibm-clang64',
-            'ibm-clang++',
-            'ibm-clang++64',
-            'clang',
-            'clang++',
-            'clang-14',
-        ):
-            zos_compilers[compiler] = 'ibm-openxl'
-
-        for compiler in ('xlclang', 'xlclang++', 'njsc', 'njsc++'):
-            zos_compilers[compiler] = 'ibm-xlclang'
-
-        for compiler in ('xlc', 'xlC', 'xlc++'):
-            zos_compilers[compiler] = 'ibm-xlc'
-
-        return zos_compilers.get(zos_compiler_names[0], 'ibm-openxl')
-
-    def __init__(self, verbose=False, force=False):
-        super().__init__(verbose, force=force)
-        self.zos_compiler = self._get_zos_compiler_name()
-        sysconfig.customize_compiler(self)
-
-    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
-        local_args = []
-        if ext in self._cpp_extensions:
-            compiler = self.compiler_cxx
-            local_args.extend(_cxx_args[self.zos_compiler])
-        elif ext in self._asm_extensions:
-            compiler = self.compiler_so
-            local_args.extend(_cc_args[self.zos_compiler])
-            local_args.extend(_asm_args[self.zos_compiler])
-        else:
-            compiler = self.compiler_so
-            local_args.extend(_cc_args[self.zos_compiler])
-        local_args.extend(cc_args)
-
-        try:
-            self.spawn(compiler + local_args + [src, '-o', obj] + extra_postargs)
-        except DistutilsExecError as msg:
-            raise CompileError(msg)
-
-    def runtime_library_dir_option(self, dir):
-        return '-L' + dir
-
-    def link(
-        self,
-        target_desc,
-        objects,
-        output_filename,
-        output_dir=None,
-        libraries=None,
-        library_dirs=None,
-        runtime_library_dirs=None,
-        export_symbols=None,
-        debug=False,
-        extra_preargs=None,
-        extra_postargs=None,
-        build_temp=None,
-        target_lang=None,
-    ):
-        # For a built module to use functions from cpython, it needs to use Pythons
-        # side deck file. The side deck is located beside the libpython3.xx.so
-        ldversion = sysconfig.get_config_var('LDVERSION')
-        if sysconfig.python_build:
-            side_deck_path = os.path.join(
-                sysconfig.get_config_var('abs_builddir'),
-                f'libpython{ldversion}.x',
-            )
-        else:
-            side_deck_path = os.path.join(
-                sysconfig.get_config_var('installed_base'),
-                sysconfig.get_config_var('platlibdir'),
-                f'libpython{ldversion}.x',
-            )
-
-        if os.path.exists(side_deck_path):
-            if extra_postargs:
-                extra_postargs.append(side_deck_path)
-            else:
-                extra_postargs = [side_deck_path]
-
-        # Check and replace libraries included side deck files
-        if runtime_library_dirs:
-            for dir in runtime_library_dirs:
-                for library in libraries[:]:
-                    library_side_deck = os.path.join(dir, f'{library}.x')
-                    if os.path.exists(library_side_deck):
-                        libraries.remove(library)
-                        extra_postargs.append(library_side_deck)
-                        break
-
-        # Any required ld args for the given compiler
-        extra_postargs.extend(_ld_args[self.zos_compiler])
-
-        super().link(
-            target_desc,
-            objects,
-            output_filename,
-            output_dir,
-            libraries,
-            library_dirs,
-            runtime_library_dirs,
-            export_symbols,
-            debug,
-            extra_preargs,
-            extra_postargs,
-            build_temp,
-            target_lang,
-        )
diff --git a/voxvera/vendor/setuptools/_distutils/core.py b/voxvera/vendor/setuptools/_distutils/core.py
deleted file mode 100644
index bd62546..0000000
--- a/voxvera/vendor/setuptools/_distutils/core.py
+++ /dev/null
@@ -1,289 +0,0 @@
-"""distutils.core
-
-The only module that needs to be imported to use the Distutils; provides
-the 'setup' function (which is to be called from the setup script).  Also
-indirectly provides the Distribution and Command classes, although they are
-really defined in distutils.dist and distutils.cmd.
-"""
-
-from __future__ import annotations
-
-import os
-import sys
-import tokenize
-from collections.abc import Iterable
-
-from .cmd import Command
-from .debug import DEBUG
-
-# Mainly import these so setup scripts can "from distutils.core import" them.
-from .dist import Distribution
-from .errors import (
-    CCompilerError,
-    DistutilsArgError,
-    DistutilsError,
-    DistutilsSetupError,
-)
-from .extension import Extension
-
-__all__ = ['Distribution', 'Command', 'Extension', 'setup']
-
-# This is a barebones help message generated displayed when the user
-# runs the setup script with no arguments at all.  More useful help
-# is generated with various --help options: global help, list commands,
-# and per-command help.
-USAGE = """\
-usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
-   or: %(script)s --help [cmd1 cmd2 ...]
-   or: %(script)s --help-commands
-   or: %(script)s cmd --help
-"""
-
-
-def gen_usage(script_name):
-    script = os.path.basename(script_name)
-    return USAGE % locals()
-
-
-# Some mild magic to control the behaviour of 'setup()' from 'run_setup()'.
-_setup_stop_after = None
-_setup_distribution = None
-
-# Legal keyword arguments for the setup() function
-setup_keywords = (
-    'distclass',
-    'script_name',
-    'script_args',
-    'options',
-    'name',
-    'version',
-    'author',
-    'author_email',
-    'maintainer',
-    'maintainer_email',
-    'url',
-    'license',
-    'description',
-    'long_description',
-    'keywords',
-    'platforms',
-    'classifiers',
-    'download_url',
-    'requires',
-    'provides',
-    'obsoletes',
-)
-
-# Legal keyword arguments for the Extension constructor
-extension_keywords = (
-    'name',
-    'sources',
-    'include_dirs',
-    'define_macros',
-    'undef_macros',
-    'library_dirs',
-    'libraries',
-    'runtime_library_dirs',
-    'extra_objects',
-    'extra_compile_args',
-    'extra_link_args',
-    'swig_opts',
-    'export_symbols',
-    'depends',
-    'language',
-)
-
-
-def setup(**attrs):  # noqa: C901
-    """The gateway to the Distutils: do everything your setup script needs
-    to do, in a highly flexible and user-driven way.  Briefly: create a
-    Distribution instance; find and parse config files; parse the command
-    line; run each Distutils command found there, customized by the options
-    supplied to 'setup()' (as keyword arguments), in config files, and on
-    the command line.
-
-    The Distribution instance might be an instance of a class supplied via
-    the 'distclass' keyword argument to 'setup'; if no such class is
-    supplied, then the Distribution class (in dist.py) is instantiated.
-    All other arguments to 'setup' (except for 'cmdclass') are used to set
-    attributes of the Distribution instance.
-
-    The 'cmdclass' argument, if supplied, is a dictionary mapping command
-    names to command classes.  Each command encountered on the command line
-    will be turned into a command class, which is in turn instantiated; any
-    class found in 'cmdclass' is used in place of the default, which is
-    (for command 'foo_bar') class 'foo_bar' in module
-    'distutils.command.foo_bar'.  The command class must provide a
-    'user_options' attribute which is a list of option specifiers for
-    'distutils.fancy_getopt'.  Any command-line options between the current
-    and the next command are used to set attributes of the current command
-    object.
-
-    When the entire command-line has been successfully parsed, calls the
-    'run()' method on each command object in turn.  This method will be
-    driven entirely by the Distribution object (which each command object
-    has a reference to, thanks to its constructor), and the
-    command-specific options that became attributes of each command
-    object.
-    """
-
-    global _setup_stop_after, _setup_distribution
-
-    # Determine the distribution class -- either caller-supplied or
-    # our Distribution (see below).
-    klass = attrs.get('distclass')
-    if klass:
-        attrs.pop('distclass')
-    else:
-        klass = Distribution
-
-    if 'script_name' not in attrs:
-        attrs['script_name'] = os.path.basename(sys.argv[0])
-    if 'script_args' not in attrs:
-        attrs['script_args'] = sys.argv[1:]
-
-    # Create the Distribution instance, using the remaining arguments
-    # (ie. everything except distclass) to initialize it
-    try:
-        _setup_distribution = dist = klass(attrs)
-    except DistutilsSetupError as msg:
-        if 'name' not in attrs:
-            raise SystemExit(f"error in setup command: {msg}")
-        else:
-            raise SystemExit("error in {} setup command: {}".format(attrs['name'], msg))
-
-    if _setup_stop_after == "init":
-        return dist
-
-    # Find and parse the config file(s): they will override options from
-    # the setup script, but be overridden by the command line.
-    dist.parse_config_files()
-
-    if DEBUG:
-        print("options (after parsing config files):")
-        dist.dump_option_dicts()
-
-    if _setup_stop_after == "config":
-        return dist
-
-    # Parse the command line and override config files; any
-    # command-line errors are the end user's fault, so turn them into
-    # SystemExit to suppress tracebacks.
-    try:
-        ok = dist.parse_command_line()
-    except DistutilsArgError as msg:
-        raise SystemExit(gen_usage(dist.script_name) + f"\nerror: {msg}")
-
-    if DEBUG:
-        print("options (after parsing command line):")
-        dist.dump_option_dicts()
-
-    if _setup_stop_after == "commandline":
-        return dist
-
-    # And finally, run all the commands found on the command line.
-    if ok:
-        return run_commands(dist)
-
-    return dist
-
-
-# setup ()
-
-
-def run_commands(dist):
-    """Given a Distribution object run all the commands,
-    raising ``SystemExit`` errors in the case of failure.
-
-    This function assumes that either ``sys.argv`` or ``dist.script_args``
-    is already set accordingly.
-    """
-    try:
-        dist.run_commands()
-    except KeyboardInterrupt:
-        raise SystemExit("interrupted")
-    except OSError as exc:
-        if DEBUG:
-            sys.stderr.write(f"error: {exc}\n")
-            raise
-        else:
-            raise SystemExit(f"error: {exc}")
-
-    except (DistutilsError, CCompilerError) as msg:
-        if DEBUG:
-            raise
-        else:
-            raise SystemExit("error: " + str(msg))
-
-    return dist
-
-
-def run_setup(script_name, script_args: Iterable[str] | None = None, stop_after="run"):
-    """Run a setup script in a somewhat controlled environment, and
-    return the Distribution instance that drives things.  This is useful
-    if you need to find out the distribution meta-data (passed as
-    keyword args from 'script' to 'setup()', or the contents of the
-    config files or command-line.
-
-    'script_name' is a file that will be read and run with 'exec()';
-    'sys.argv[0]' will be replaced with 'script' for the duration of the
-    call.  'script_args' is a list of strings; if supplied,
-    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
-    the call.
-
-    'stop_after' tells 'setup()' when to stop processing; possible
-    values:
-      init
-        stop after the Distribution instance has been created and
-        populated with the keyword arguments to 'setup()'
-      config
-        stop after config files have been parsed (and their data
-        stored in the Distribution instance)
-      commandline
-        stop after the command-line ('sys.argv[1:]' or 'script_args')
-        have been parsed (and the data stored in the Distribution)
-      run [default]
-        stop after all commands have been run (the same as if 'setup()'
-        had been called in the usual way
-
-    Returns the Distribution instance, which provides all information
-    used to drive the Distutils.
-    """
-    if stop_after not in ('init', 'config', 'commandline', 'run'):
-        raise ValueError(f"invalid value for 'stop_after': {stop_after!r}")
-
-    global _setup_stop_after, _setup_distribution
-    _setup_stop_after = stop_after
-
-    save_argv = sys.argv.copy()
-    g = {'__file__': script_name, '__name__': '__main__'}
-    try:
-        try:
-            sys.argv[0] = script_name
-            if script_args is not None:
-                sys.argv[1:] = script_args
-            # tokenize.open supports automatic encoding detection
-            with tokenize.open(script_name) as f:
-                code = f.read().replace(r'\r\n', r'\n')
-                exec(code, g)
-        finally:
-            sys.argv = save_argv
-            _setup_stop_after = None
-    except SystemExit:
-        # Hmm, should we do something if exiting with a non-zero code
-        # (ie. error)?
-        pass
-
-    if _setup_distribution is None:
-        raise RuntimeError(
-            "'distutils.core.setup()' was never called -- "
-            f"perhaps '{script_name}' is not a Distutils setup script?"
-        )
-
-    # I wonder if the setup script's namespace -- g and l -- would be of
-    # any interest to callers?
-    # print "_setup_distribution:", _setup_distribution
-    return _setup_distribution
-
-
-# run_setup ()
diff --git a/voxvera/vendor/setuptools/_distutils/cygwinccompiler.py b/voxvera/vendor/setuptools/_distutils/cygwinccompiler.py
deleted file mode 100644
index de89e3c..0000000
--- a/voxvera/vendor/setuptools/_distutils/cygwinccompiler.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from .compilers.C import cygwin
-from .compilers.C.cygwin import (
-    CONFIG_H_NOTOK,
-    CONFIG_H_OK,
-    CONFIG_H_UNCERTAIN,
-    check_config_h,
-    get_msvcr,
-    is_cygwincc,
-)
-
-__all__ = [
-    'CONFIG_H_NOTOK',
-    'CONFIG_H_OK',
-    'CONFIG_H_UNCERTAIN',
-    'CygwinCCompiler',
-    'Mingw32CCompiler',
-    'check_config_h',
-    'get_msvcr',
-    'is_cygwincc',
-]
-
-
-CygwinCCompiler = cygwin.Compiler
-Mingw32CCompiler = cygwin.MinGW32Compiler
-
-
-get_versions = None
-"""
-A stand-in for the previous get_versions() function to prevent failures
-when monkeypatched. See pypa/setuptools#2969.
-"""
diff --git a/voxvera/vendor/setuptools/_distutils/debug.py b/voxvera/vendor/setuptools/_distutils/debug.py
deleted file mode 100644
index daf1660..0000000
--- a/voxvera/vendor/setuptools/_distutils/debug.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import os
-
-# If DISTUTILS_DEBUG is anything other than the empty string, we run in
-# debug mode.
-DEBUG = os.environ.get('DISTUTILS_DEBUG')
diff --git a/voxvera/vendor/setuptools/_distutils/dep_util.py b/voxvera/vendor/setuptools/_distutils/dep_util.py
deleted file mode 100644
index 09a8a2e..0000000
--- a/voxvera/vendor/setuptools/_distutils/dep_util.py
+++ /dev/null
@@ -1,14 +0,0 @@
-import warnings
-
-from . import _modified
-
-
-def __getattr__(name):
-    if name not in ['newer', 'newer_group', 'newer_pairwise']:
-        raise AttributeError(name)
-    warnings.warn(
-        "dep_util is Deprecated. Use functions from setuptools instead.",
-        DeprecationWarning,
-        stacklevel=2,
-    )
-    return getattr(_modified, name)
diff --git a/voxvera/vendor/setuptools/_distutils/dir_util.py b/voxvera/vendor/setuptools/_distutils/dir_util.py
deleted file mode 100644
index 61b4575..0000000
--- a/voxvera/vendor/setuptools/_distutils/dir_util.py
+++ /dev/null
@@ -1,232 +0,0 @@
-"""distutils.dir_util
-
-Utility functions for manipulating directories and directory trees."""
-
-import functools
-import itertools
-import os
-import pathlib
-
-from . import file_util
-from ._log import log
-from .errors import DistutilsFileError, DistutilsInternalError
-
-
-class SkipRepeatAbsolutePaths(set):
-    """
-    Cache for mkpath.
-
-    In addition to cheapening redundant calls, eliminates redundant
-    "creating /foo/bar/baz" messages in dry-run mode.
-    """
-
-    def __init__(self):
-        SkipRepeatAbsolutePaths.instance = self
-
-    @classmethod
-    def clear(cls):
-        super(cls, cls.instance).clear()
-
-    def wrap(self, func):
-        @functools.wraps(func)
-        def wrapper(path, *args, **kwargs):
-            if path.absolute() in self:
-                return
-            result = func(path, *args, **kwargs)
-            self.add(path.absolute())
-            return result
-
-        return wrapper
-
-
-# Python 3.8 compatibility
-wrapper = SkipRepeatAbsolutePaths().wrap
-
-
-@functools.singledispatch
-@wrapper
-def mkpath(name: pathlib.Path, mode=0o777, verbose=True) -> None:
-    """Create a directory and any missing ancestor directories.
-
-    If the directory already exists (or if 'name' is the empty string, which
-    means the current directory, which of course exists), then do nothing.
-    Raise DistutilsFileError if unable to create some directory along the way
-    (eg. some sub-path exists, but is a file rather than a directory).
-    If 'verbose' is true, log the directory created.
-    """
-    if verbose and not name.is_dir():
-        log.info("creating %s", name)
-
-    try:
-        name.mkdir(mode=mode, parents=True, exist_ok=True)
-    except OSError as exc:
-        raise DistutilsFileError(f"could not create '{name}': {exc.args[-1]}")
-
-
-@mkpath.register
-def _(name: str, *args, **kwargs):
-    return mkpath(pathlib.Path(name), *args, **kwargs)
-
-
-@mkpath.register
-def _(name: None, *args, **kwargs):
-    """
-    Detect a common bug -- name is None.
-    """
-    raise DistutilsInternalError(f"mkpath: 'name' must be a string (got {name!r})")
-
-
-def create_tree(base_dir, files, mode=0o777, verbose=True):
-    """Create all the empty directories under 'base_dir' needed to put 'files'
-    there.
-
-    'base_dir' is just the name of a directory which doesn't necessarily
-    exist yet; 'files' is a list of filenames to be interpreted relative to
-    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
-    will be created if it doesn't already exist.  'mode' and 'verbose'
-    flags are as for 'mkpath()'.
-    """
-    # First get the list of directories to create
-    need_dir = set(os.path.join(base_dir, os.path.dirname(file)) for file in files)
-
-    # Now create them
-    for dir in sorted(need_dir):
-        mkpath(dir, mode, verbose=verbose)
-
-
-def copy_tree(
-    src,
-    dst,
-    preserve_mode=True,
-    preserve_times=True,
-    preserve_symlinks=False,
-    update=False,
-    verbose=True,
-):
-    """Copy an entire directory tree 'src' to a new location 'dst'.
-
-    Both 'src' and 'dst' must be directory names.  If 'src' is not a
-    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
-    created with 'mkpath()'.  The end result of the copy is that every
-    file in 'src' is copied to 'dst', and directories under 'src' are
-    recursively copied to 'dst'.  Return the list of files that were
-    copied or might have been copied, using their output name.  The
-    return value is unaffected by 'update': it is simply
-    the list of all files under 'src', with the names changed to be
-    under 'dst'.
-
-    'preserve_mode' and 'preserve_times' are the same as for
-    'copy_file'; note that they only apply to regular files, not to
-    directories.  If 'preserve_symlinks' is true, symlinks will be
-    copied as symlinks (on platforms that support them!); otherwise
-    (the default), the destination of the symlink will be copied.
-    'update' and 'verbose' are the same as for 'copy_file'.
-    """
-    if not os.path.isdir(src):
-        raise DistutilsFileError(f"cannot copy tree '{src}': not a directory")
-    try:
-        names = os.listdir(src)
-    except OSError as e:
-        raise DistutilsFileError(f"error listing files in '{src}': {e.strerror}")
-
-    mkpath(dst, verbose=verbose)
-
-    copy_one = functools.partial(
-        _copy_one,
-        src=src,
-        dst=dst,
-        preserve_symlinks=preserve_symlinks,
-        verbose=verbose,
-        preserve_mode=preserve_mode,
-        preserve_times=preserve_times,
-        update=update,
-    )
-    return list(itertools.chain.from_iterable(map(copy_one, names)))
-
-
-def _copy_one(
-    name,
-    *,
-    src,
-    dst,
-    preserve_symlinks,
-    verbose,
-    preserve_mode,
-    preserve_times,
-    update,
-):
-    src_name = os.path.join(src, name)
-    dst_name = os.path.join(dst, name)
-
-    if name.startswith('.nfs'):
-        # skip NFS rename files
-        return
-
-    if preserve_symlinks and os.path.islink(src_name):
-        link_dest = os.readlink(src_name)
-        if verbose >= 1:
-            log.info("linking %s -> %s", dst_name, link_dest)
-        os.symlink(link_dest, dst_name)
-        yield dst_name
-
-    elif os.path.isdir(src_name):
-        yield from copy_tree(
-            src_name,
-            dst_name,
-            preserve_mode,
-            preserve_times,
-            preserve_symlinks,
-            update,
-            verbose=verbose,
-        )
-    else:
-        file_util.copy_file(
-            src_name,
-            dst_name,
-            preserve_mode,
-            preserve_times,
-            update,
-            verbose=verbose,
-        )
-        yield dst_name
-
-
-def _build_cmdtuple(path, cmdtuples):
-    """Helper for remove_tree()."""
-    for f in os.listdir(path):
-        real_f = os.path.join(path, f)
-        if os.path.isdir(real_f) and not os.path.islink(real_f):
-            _build_cmdtuple(real_f, cmdtuples)
-        else:
-            cmdtuples.append((os.remove, real_f))
-    cmdtuples.append((os.rmdir, path))
-
-
-def remove_tree(directory, verbose=True):
-    """Recursively remove an entire directory tree.
-
-    Any errors are ignored (apart from being reported to stdout if 'verbose'
-    is true).
-    """
-    if verbose >= 1:
-        log.info("removing '%s' (and everything under it)", directory)
-    cmdtuples = []
-    _build_cmdtuple(directory, cmdtuples)
-    for cmd in cmdtuples:
-        try:
-            cmd[0](cmd[1])
-            # Clear the cache
-            SkipRepeatAbsolutePaths.clear()
-        except OSError as exc:
-            log.warning("error removing %s: %s", directory, exc)
-
-
-def ensure_relative(path):
-    """Take the full path 'path', and make it a relative path.
-
-    This is useful to make 'path' the second argument to os.path.join().
-    """
-    drive, path = os.path.splitdrive(path)
-    if path[0:1] == os.sep:
-        path = drive + path[1:]
-    return path
diff --git a/voxvera/vendor/setuptools/_distutils/dist.py b/voxvera/vendor/setuptools/_distutils/dist.py
deleted file mode 100644
index e04e487..0000000
--- a/voxvera/vendor/setuptools/_distutils/dist.py
+++ /dev/null
@@ -1,1384 +0,0 @@
-"""distutils.dist
-
-Provides the Distribution class, which represents the module distribution
-being built/installed/distributed.
-"""
-
-from __future__ import annotations
-
-import contextlib
-import logging
-import os
-import pathlib
-import re
-import sys
-import warnings
-from collections.abc import Iterable, MutableMapping
-from email import message_from_file
-from typing import (
-    IO,
-    TYPE_CHECKING,
-    Any,
-    ClassVar,
-    Literal,
-    TypeVar,
-    Union,
-    overload,
-)
-
-from packaging.utils import canonicalize_name, canonicalize_version
-
-from ._log import log
-from .debug import DEBUG
-from .errors import (
-    DistutilsArgError,
-    DistutilsClassError,
-    DistutilsModuleError,
-    DistutilsOptionError,
-)
-from .fancy_getopt import FancyGetopt, translate_longopt
-from .util import check_environ, rfc822_escape, strtobool
-
-if TYPE_CHECKING:
-    from _typeshed import SupportsWrite
-    from typing_extensions import TypeAlias
-
-    # type-only import because of mutual dependence between these modules
-    from .cmd import Command
-
-_CommandT = TypeVar("_CommandT", bound="Command")
-_OptionsList: TypeAlias = list[
-    Union[tuple[str, Union[str, None], str, int], tuple[str, Union[str, None], str]]
-]
-
-
-# Regex to define acceptable Distutils command names.  This is not *quite*
-# the same as a Python NAME -- I don't allow leading underscores.  The fact
-# that they're very similar is no coincidence; the default naming scheme is
-# to look for a Python module named after the command.
-command_re = re.compile(r'^[a-zA-Z]([a-zA-Z0-9_]*)$')
-
-
-def _ensure_list(value: str | Iterable[str], fieldname) -> str | list[str]:
-    if isinstance(value, str):
-        # a string containing comma separated values is okay.  It will
-        # be converted to a list by Distribution.finalize_options().
-        pass
-    elif not isinstance(value, list):
-        # passing a tuple or an iterator perhaps, warn and convert
-        typename = type(value).__name__
-        msg = "Warning: '{fieldname}' should be a list, got type '{typename}'"
-        msg = msg.format(**locals())
-        log.warning(msg)
-        value = list(value)
-    return value
-
-
-class Distribution:
-    """The core of the Distutils.  Most of the work hiding behind 'setup'
-    is really done within a Distribution instance, which farms the work out
-    to the Distutils commands specified on the command line.
-
-    Setup scripts will almost never instantiate Distribution directly,
-    unless the 'setup()' function is totally inadequate to their needs.
-    However, it is conceivable that a setup script might wish to subclass
-    Distribution for some specialized purpose, and then pass the subclass
-    to 'setup()' as the 'distclass' keyword argument.  If so, it is
-    necessary to respect the expectations that 'setup' has of Distribution.
-    See the code for 'setup()', in core.py, for details.
-    """
-
-    # 'global_options' describes the command-line options that may be
-    # supplied to the setup script prior to any actual commands.
-    # Eg. "./setup.py -n" or "./setup.py --quiet" both take advantage of
-    # these global options.  This list should be kept to a bare minimum,
-    # since every global option is also valid as a command option -- and we
-    # don't want to pollute the commands with too many options that they
-    # have minimal control over.
-    # The fourth entry for verbose means that it can be repeated.
-    global_options: ClassVar[_OptionsList] = [
-        ('verbose', 'v', "run verbosely (default)", 1),
-        ('quiet', 'q', "run quietly (turns verbosity off)"),
-        ('help', 'h', "show detailed help message"),
-        ('no-user-cfg', None, 'ignore pydistutils.cfg in your home directory'),
-    ]
-
-    # 'common_usage' is a short (2-3 line) string describing the common
-    # usage of the setup script.
-    common_usage: ClassVar[str] = """\
-Common commands: (see '--help-commands' for more)
-
-  setup.py build      will build the package underneath 'build/'
-  setup.py install    will install the package
-"""
-
-    # options that are not propagated to the commands
-    display_options: ClassVar[_OptionsList] = [
-        ('help-commands', None, "list all available commands"),
-        ('name', None, "print package name"),
-        ('version', 'V', "print package version"),
-        ('fullname', None, "print -"),
-        ('author', None, "print the author's name"),
-        ('author-email', None, "print the author's email address"),
-        ('maintainer', None, "print the maintainer's name"),
-        ('maintainer-email', None, "print the maintainer's email address"),
-        ('contact', None, "print the maintainer's name if known, else the author's"),
-        (
-            'contact-email',
-            None,
-            "print the maintainer's email address if known, else the author's",
-        ),
-        ('url', None, "print the URL for this package"),
-        ('license', None, "print the license of the package"),
-        ('licence', None, "alias for --license"),
-        ('description', None, "print the package description"),
-        ('long-description', None, "print the long package description"),
-        ('platforms', None, "print the list of platforms"),
-        ('classifiers', None, "print the list of classifiers"),
-        ('keywords', None, "print the list of keywords"),
-        ('provides', None, "print the list of packages/modules provided"),
-        ('requires', None, "print the list of packages/modules required"),
-        ('obsoletes', None, "print the list of packages/modules made obsolete"),
-    ]
-    display_option_names: ClassVar[list[str]] = [
-        translate_longopt(x[0]) for x in display_options
-    ]
-
-    # negative options are options that exclude other options
-    negative_opt: ClassVar[dict[str, str]] = {'quiet': 'verbose'}
-
-    # -- Creation/initialization methods -------------------------------
-
-    # Can't Unpack a TypedDict with optional properties, so using Any instead
-    def __init__(self, attrs: MutableMapping[str, Any] | None = None) -> None:  # noqa: C901
-        """Construct a new Distribution instance: initialize all the
-        attributes of a Distribution, and then use 'attrs' (a dictionary
-        mapping attribute names to values) to assign some of those
-        attributes their "real" values.  (Any attributes not mentioned in
-        'attrs' will be assigned to some null value: 0, None, an empty list
-        or dictionary, etc.)  Most importantly, initialize the
-        'command_obj' attribute to the empty dictionary; this will be
-        filled in with real command objects by 'parse_command_line()'.
-        """
-
-        # Default values for our command-line options
-        self.verbose = True
-        self.help = False
-        for attr in self.display_option_names:
-            setattr(self, attr, False)
-
-        # Store the distribution meta-data (name, version, author, and so
-        # forth) in a separate object -- we're getting to have enough
-        # information here (and enough command-line options) that it's
-        # worth it.  Also delegate 'get_XXX()' methods to the 'metadata'
-        # object in a sneaky and underhanded (but efficient!) way.
-        self.metadata = DistributionMetadata()
-        for basename in self.metadata._METHOD_BASENAMES:
-            method_name = "get_" + basename
-            setattr(self, method_name, getattr(self.metadata, method_name))
-
-        # 'cmdclass' maps command names to class objects, so we
-        # can 1) quickly figure out which class to instantiate when
-        # we need to create a new command object, and 2) have a way
-        # for the setup script to override command classes
-        self.cmdclass: dict[str, type[Command]] = {}
-
-        # 'command_packages' is a list of packages in which commands
-        # are searched for.  The factory for command 'foo' is expected
-        # to be named 'foo' in the module 'foo' in one of the packages
-        # named here.  This list is searched from the left; an error
-        # is raised if no named package provides the command being
-        # searched for.  (Always access using get_command_packages().)
-        self.command_packages: str | list[str] | None = None
-
-        # 'script_name' and 'script_args' are usually set to sys.argv[0]
-        # and sys.argv[1:], but they can be overridden when the caller is
-        # not necessarily a setup script run from the command-line.
-        self.script_name: str | os.PathLike[str] | None = None
-        self.script_args: list[str] | None = None
-
-        # 'command_options' is where we store command options between
-        # parsing them (from config files, the command-line, etc.) and when
-        # they are actually needed -- ie. when the command in question is
-        # instantiated.  It is a dictionary of dictionaries of 2-tuples:
-        #   command_options = { command_name : { option : (source, value) } }
-        self.command_options: dict[str, dict[str, tuple[str, str]]] = {}
-
-        # 'dist_files' is the list of (command, pyversion, file) that
-        # have been created by any dist commands run so far. This is
-        # filled regardless of whether the run is dry or not. pyversion
-        # gives sysconfig.get_python_version() if the dist file is
-        # specific to a Python version, 'any' if it is good for all
-        # Python versions on the target platform, and '' for a source
-        # file. pyversion should not be used to specify minimum or
-        # maximum required Python versions; use the metainfo for that
-        # instead.
-        self.dist_files: list[tuple[str, str, str]] = []
-
-        # These options are really the business of various commands, rather
-        # than of the Distribution itself.  We provide aliases for them in
-        # Distribution as a convenience to the developer.
-        self.packages = None
-        self.package_data: dict[str, list[str]] = {}
-        self.package_dir = None
-        self.py_modules = None
-        self.libraries = None
-        self.headers = None
-        self.ext_modules = None
-        self.ext_package = None
-        self.include_dirs = None
-        self.extra_path = None
-        self.scripts = None
-        self.data_files = None
-        self.password = ''
-
-        # And now initialize bookkeeping stuff that can't be supplied by
-        # the caller at all.  'command_obj' maps command names to
-        # Command instances -- that's how we enforce that every command
-        # class is a singleton.
-        self.command_obj: dict[str, Command] = {}
-
-        # 'have_run' maps command names to boolean values; it keeps track
-        # of whether we have actually run a particular command, to make it
-        # cheap to "run" a command whenever we think we might need to -- if
-        # it's already been done, no need for expensive filesystem
-        # operations, we just check the 'have_run' dictionary and carry on.
-        # It's only safe to query 'have_run' for a command class that has
-        # been instantiated -- a false value will be inserted when the
-        # command object is created, and replaced with a true value when
-        # the command is successfully run.  Thus it's probably best to use
-        # '.get()' rather than a straight lookup.
-        self.have_run: dict[str, bool] = {}
-
-        # Now we'll use the attrs dictionary (ultimately, keyword args from
-        # the setup script) to possibly override any or all of these
-        # distribution options.
-
-        if attrs:
-            # Pull out the set of command options and work on them
-            # specifically.  Note that this order guarantees that aliased
-            # command options will override any supplied redundantly
-            # through the general options dictionary.
-            options = attrs.get('options')
-            if options is not None:
-                del attrs['options']
-                for command, cmd_options in options.items():
-                    opt_dict = self.get_option_dict(command)
-                    for opt, val in cmd_options.items():
-                        opt_dict[opt] = ("setup script", val)
-
-            if 'licence' in attrs:
-                attrs['license'] = attrs['licence']
-                del attrs['licence']
-                msg = "'licence' distribution option is deprecated; use 'license'"
-                warnings.warn(msg)
-
-            # Now work on the rest of the attributes.  Any attribute that's
-            # not already defined is invalid!
-            for key, val in attrs.items():
-                if hasattr(self.metadata, "set_" + key):
-                    getattr(self.metadata, "set_" + key)(val)
-                elif hasattr(self.metadata, key):
-                    setattr(self.metadata, key, val)
-                elif hasattr(self, key):
-                    setattr(self, key, val)
-                else:
-                    msg = f"Unknown distribution option: {key!r}"
-                    warnings.warn(msg)
-
-        # no-user-cfg is handled before other command line args
-        # because other args override the config files, and this
-        # one is needed before we can load the config files.
-        # If attrs['script_args'] wasn't passed, assume false.
-        #
-        # This also make sure we just look at the global options
-        self.want_user_cfg = True
-
-        if self.script_args is not None:
-            # Coerce any possible iterable from attrs into a list
-            self.script_args = list(self.script_args)
-            for arg in self.script_args:
-                if not arg.startswith('-'):
-                    break
-                if arg == '--no-user-cfg':
-                    self.want_user_cfg = False
-                    break
-
-        self.finalize_options()
-
-    def get_option_dict(self, command):
-        """Get the option dictionary for a given command.  If that
-        command's option dictionary hasn't been created yet, then create it
-        and return the new dictionary; otherwise, return the existing
-        option dictionary.
-        """
-        dict = self.command_options.get(command)
-        if dict is None:
-            dict = self.command_options[command] = {}
-        return dict
-
-    def dump_option_dicts(self, header=None, commands=None, indent: str = "") -> None:
-        from pprint import pformat
-
-        if commands is None:  # dump all command option dicts
-            commands = sorted(self.command_options.keys())
-
-        if header is not None:
-            self.announce(indent + header)
-            indent = indent + "  "
-
-        if not commands:
-            self.announce(indent + "no commands known yet")
-            return
-
-        for cmd_name in commands:
-            opt_dict = self.command_options.get(cmd_name)
-            if opt_dict is None:
-                self.announce(indent + f"no option dict for '{cmd_name}' command")
-            else:
-                self.announce(indent + f"option dict for '{cmd_name}' command:")
-                out = pformat(opt_dict)
-                for line in out.split('\n'):
-                    self.announce(indent + "  " + line)
-
-    # -- Config file finding/parsing methods ---------------------------
-
-    def find_config_files(self):
-        """Find as many configuration files as should be processed for this
-        platform, and return a list of filenames in the order in which they
-        should be parsed.  The filenames returned are guaranteed to exist
-        (modulo nasty race conditions).
-
-        There are multiple possible config files:
-        - distutils.cfg in the Distutils installation directory (i.e.
-          where the top-level Distutils __inst__.py file lives)
-        - a file in the user's home directory named .pydistutils.cfg
-          on Unix and pydistutils.cfg on Windows/Mac; may be disabled
-          with the ``--no-user-cfg`` option
-        - setup.cfg in the current directory
-        - a file named by an environment variable
-        """
-        check_environ()
-        files = [str(path) for path in self._gen_paths() if os.path.isfile(path)]
-
-        if DEBUG:
-            self.announce("using config files: {}".format(', '.join(files)))
-
-        return files
-
-    def _gen_paths(self):
-        # The system-wide Distutils config file
-        sys_dir = pathlib.Path(sys.modules['distutils'].__file__).parent
-        yield sys_dir / "distutils.cfg"
-
-        # The per-user config file
-        prefix = '.' * (os.name == 'posix')
-        filename = prefix + 'pydistutils.cfg'
-        if self.want_user_cfg:
-            with contextlib.suppress(RuntimeError):
-                yield pathlib.Path('~').expanduser() / filename
-
-        # All platforms support local setup.cfg
-        yield pathlib.Path('setup.cfg')
-
-        # Additional config indicated in the environment
-        with contextlib.suppress(TypeError):
-            yield pathlib.Path(os.getenv("DIST_EXTRA_CONFIG"))
-
-    def parse_config_files(self, filenames=None):  # noqa: C901
-        from configparser import ConfigParser
-
-        # Ignore install directory options if we have a venv
-        if sys.prefix != sys.base_prefix:
-            ignore_options = [
-                'install-base',
-                'install-platbase',
-                'install-lib',
-                'install-platlib',
-                'install-purelib',
-                'install-headers',
-                'install-scripts',
-                'install-data',
-                'prefix',
-                'exec-prefix',
-                'home',
-                'user',
-                'root',
-            ]
-        else:
-            ignore_options = []
-
-        ignore_options = frozenset(ignore_options)
-
-        if filenames is None:
-            filenames = self.find_config_files()
-
-        if DEBUG:
-            self.announce("Distribution.parse_config_files():")
-
-        parser = ConfigParser()
-        for filename in filenames:
-            if DEBUG:
-                self.announce(f"  reading {filename}")
-            parser.read(filename, encoding='utf-8')
-            for section in parser.sections():
-                options = parser.options(section)
-                opt_dict = self.get_option_dict(section)
-
-                for opt in options:
-                    if opt != '__name__' and opt not in ignore_options:
-                        val = parser.get(section, opt)
-                        opt = opt.replace('-', '_')
-                        opt_dict[opt] = (filename, val)
-
-            # Make the ConfigParser forget everything (so we retain
-            # the original filenames that options come from)
-            parser.__init__()
-
-        # If there was a "global" section in the config file, use it
-        # to set Distribution options.
-
-        if 'global' in self.command_options:
-            for opt, (_src, val) in self.command_options['global'].items():
-                alias = self.negative_opt.get(opt)
-                try:
-                    if alias:
-                        setattr(self, alias, not strtobool(val))
-                    elif opt in ('verbose',):  # ugh!
-                        setattr(self, opt, strtobool(val))
-                    else:
-                        setattr(self, opt, val)
-                except ValueError as msg:
-                    raise DistutilsOptionError(msg)
-
-    # -- Command-line parsing methods ----------------------------------
-
-    def parse_command_line(self):
-        """Parse the setup script's command line, taken from the
-        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
-        -- see 'setup()' in core.py).  This list is first processed for
-        "global options" -- options that set attributes of the Distribution
-        instance.  Then, it is alternately scanned for Distutils commands
-        and options for that command.  Each new command terminates the
-        options for the previous command.  The allowed options for a
-        command are determined by the 'user_options' attribute of the
-        command class -- thus, we have to be able to load command classes
-        in order to parse the command line.  Any error in that 'options'
-        attribute raises DistutilsGetoptError; any error on the
-        command-line raises DistutilsArgError.  If no Distutils commands
-        were found on the command line, raises DistutilsArgError.  Return
-        true if command-line was successfully parsed and we should carry
-        on with executing commands; false if no errors but we shouldn't
-        execute commands (currently, this only happens if user asks for
-        help).
-        """
-        #
-        # We now have enough information to show the Macintosh dialog
-        # that allows the user to interactively specify the "command line".
-        #
-        toplevel_options = self._get_toplevel_options()
-
-        # We have to parse the command line a bit at a time -- global
-        # options, then the first command, then its options, and so on --
-        # because each command will be handled by a different class, and
-        # the options that are valid for a particular class aren't known
-        # until we have loaded the command class, which doesn't happen
-        # until we know what the command is.
-
-        self.commands = []
-        parser = FancyGetopt(toplevel_options + self.display_options)
-        parser.set_negative_aliases(self.negative_opt)
-        parser.set_aliases({'licence': 'license'})
-        args = parser.getopt(args=self.script_args, object=self)
-        option_order = parser.get_option_order()
-        logging.getLogger().setLevel(logging.WARN - 10 * self.verbose)
-
-        # for display options we return immediately
-        if self.handle_display_options(option_order):
-            return
-        while args:
-            args = self._parse_command_opts(parser, args)
-            if args is None:  # user asked for help (and got it)
-                return
-
-        # Handle the cases of --help as a "global" option, ie.
-        # "setup.py --help" and "setup.py --help command ...".  For the
-        # former, we show global options (--verbose, --dry-run, etc.)
-        # and display-only options (--name, --version, etc.); for the
-        # latter, we omit the display-only options and show help for
-        # each command listed on the command line.
-        if self.help:
-            self._show_help(
-                parser, display_options=len(self.commands) == 0, commands=self.commands
-            )
-            return
-
-        # Oops, no commands found -- an end-user error
-        if not self.commands:
-            raise DistutilsArgError("no commands supplied")
-
-        # All is well: return true
-        return True
-
-    def _get_toplevel_options(self):
-        """Return the non-display options recognized at the top level.
-
-        This includes options that are recognized *only* at the top
-        level as well as options recognized for commands.
-        """
-        return self.global_options + [
-            (
-                "command-packages=",
-                None,
-                "list of packages that provide distutils commands",
-            ),
-        ]
-
-    def _parse_command_opts(self, parser, args):  # noqa: C901
-        """Parse the command-line options for a single command.
-        'parser' must be a FancyGetopt instance; 'args' must be the list
-        of arguments, starting with the current command (whose options
-        we are about to parse).  Returns a new version of 'args' with
-        the next command at the front of the list; will be the empty
-        list if there are no more commands on the command line.  Returns
-        None if the user asked for help on this command.
-        """
-        # late import because of mutual dependence between these modules
-        from distutils.cmd import Command
-
-        # Pull the current command from the head of the command line
-        command = args[0]
-        if not command_re.match(command):
-            raise SystemExit(f"invalid command name '{command}'")
-        self.commands.append(command)
-
-        # Dig up the command class that implements this command, so we
-        # 1) know that it's a valid command, and 2) know which options
-        # it takes.
-        try:
-            cmd_class = self.get_command_class(command)
-        except DistutilsModuleError as msg:
-            raise DistutilsArgError(msg)
-
-        # Require that the command class be derived from Command -- want
-        # to be sure that the basic "command" interface is implemented.
-        if not issubclass(cmd_class, Command):
-            raise DistutilsClassError(
-                f"command class {cmd_class} must subclass Command"
-            )
-
-        # Also make sure that the command object provides a list of its
-        # known options.
-        if not (
-            hasattr(cmd_class, 'user_options')
-            and isinstance(cmd_class.user_options, list)
-        ):
-            msg = (
-                "command class %s must provide "
-                "'user_options' attribute (a list of tuples)"
-            )
-            raise DistutilsClassError(msg % cmd_class)
-
-        # If the command class has a list of negative alias options,
-        # merge it in with the global negative aliases.
-        negative_opt = self.negative_opt
-        if hasattr(cmd_class, 'negative_opt'):
-            negative_opt = negative_opt.copy()
-            negative_opt.update(cmd_class.negative_opt)
-
-        # Check for help_options in command class.  They have a different
-        # format (tuple of four) so we need to preprocess them here.
-        if hasattr(cmd_class, 'help_options') and isinstance(
-            cmd_class.help_options, list
-        ):
-            help_options = fix_help_options(cmd_class.help_options)
-        else:
-            help_options = []
-
-        # All commands support the global options too, just by adding
-        # in 'global_options'.
-        parser.set_option_table(
-            self.global_options + cmd_class.user_options + help_options
-        )
-        parser.set_negative_aliases(negative_opt)
-        (args, opts) = parser.getopt(args[1:])
-        if hasattr(opts, 'help') and opts.help:
-            self._show_help(parser, display_options=False, commands=[cmd_class])
-            return
-
-        if hasattr(cmd_class, 'help_options') and isinstance(
-            cmd_class.help_options, list
-        ):
-            help_option_found = 0
-            for help_option, _short, _desc, func in cmd_class.help_options:
-                if hasattr(opts, parser.get_attr_name(help_option)):
-                    help_option_found = 1
-                    if callable(func):
-                        func()
-                    else:
-                        raise DistutilsClassError(
-                            f"invalid help function {func!r} for help option '{help_option}': "
-                            "must be a callable object (function, etc.)"
-                        )
-
-            if help_option_found:
-                return
-
-        # Put the options from the command-line into their official
-        # holding pen, the 'command_options' dictionary.
-        opt_dict = self.get_option_dict(command)
-        for name, value in vars(opts).items():
-            opt_dict[name] = ("command line", value)
-
-        return args
-
-    def finalize_options(self) -> None:
-        """Set final values for all the options on the Distribution
-        instance, analogous to the .finalize_options() method of Command
-        objects.
-        """
-        for attr in ('keywords', 'platforms'):
-            value = getattr(self.metadata, attr)
-            if value is None:
-                continue
-            if isinstance(value, str):
-                value = [elm.strip() for elm in value.split(',')]
-                setattr(self.metadata, attr, value)
-
-    def _show_help(
-        self, parser, global_options=True, display_options=True, commands: Iterable = ()
-    ):
-        """Show help for the setup script command-line in the form of
-        several lists of command-line options.  'parser' should be a
-        FancyGetopt instance; do not expect it to be returned in the
-        same state, as its option table will be reset to make it
-        generate the correct help text.
-
-        If 'global_options' is true, lists the global options:
-        --verbose, --dry-run, etc.  If 'display_options' is true, lists
-        the "display-only" options: --name, --version, etc.  Finally,
-        lists per-command help for every command name or command class
-        in 'commands'.
-        """
-        # late import because of mutual dependence between these modules
-        from distutils.cmd import Command
-        from distutils.core import gen_usage
-
-        if global_options:
-            if display_options:
-                options = self._get_toplevel_options()
-            else:
-                options = self.global_options
-            parser.set_option_table(options)
-            parser.print_help(self.common_usage + "\nGlobal options:")
-            print()
-
-        if display_options:
-            parser.set_option_table(self.display_options)
-            parser.print_help(
-                "Information display options (just display information, ignore any commands)"
-            )
-            print()
-
-        for command in commands:
-            if isinstance(command, type) and issubclass(command, Command):
-                klass = command
-            else:
-                klass = self.get_command_class(command)
-            if hasattr(klass, 'help_options') and isinstance(klass.help_options, list):
-                parser.set_option_table(
-                    klass.user_options + fix_help_options(klass.help_options)
-                )
-            else:
-                parser.set_option_table(klass.user_options)
-            parser.print_help(f"Options for '{klass.__name__}' command:")
-            print()
-
-        print(gen_usage(self.script_name))
-
-    def handle_display_options(self, option_order):
-        """If there were any non-global "display-only" options
-        (--help-commands or the metadata display options) on the command
-        line, display the requested info and return true; else return
-        false.
-        """
-        from distutils.core import gen_usage
-
-        # User just wants a list of commands -- we'll print it out and stop
-        # processing now (ie. if they ran "setup --help-commands foo bar",
-        # we ignore "foo bar").
-        if self.help_commands:
-            self.print_commands()
-            print()
-            print(gen_usage(self.script_name))
-            return 1
-
-        # If user supplied any of the "display metadata" options, then
-        # display that metadata in the order in which the user supplied the
-        # metadata options.
-        any_display_options = 0
-        is_display_option = set()
-        for option in self.display_options:
-            is_display_option.add(option[0])
-
-        for opt, val in option_order:
-            if val and opt in is_display_option:
-                opt = translate_longopt(opt)
-                value = getattr(self.metadata, "get_" + opt)()
-                if opt in ('keywords', 'platforms'):
-                    print(','.join(value))
-                elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'):
-                    print('\n'.join(value))
-                else:
-                    print(value)
-                any_display_options = 1
-
-        return any_display_options
-
-    def print_command_list(self, commands, header, max_length) -> None:
-        """Print a subset of the list of all commands -- used by
-        'print_commands()'.
-        """
-        print(header + ":")
-
-        for cmd in commands:
-            klass = self.cmdclass.get(cmd)
-            if not klass:
-                klass = self.get_command_class(cmd)
-            try:
-                description = klass.description
-            except AttributeError:
-                description = "(no description available)"
-
-            print(f"  {cmd:<{max_length}}  {description}")
-
-    def print_commands(self) -> None:
-        """Print out a help message listing all available commands with a
-        description of each.  The list is divided into "standard commands"
-        (listed in distutils.command.__all__) and "extra commands"
-        (mentioned in self.cmdclass, but not a standard command).  The
-        descriptions come from the command class attribute
-        'description'.
-        """
-        import distutils.command
-
-        std_commands = distutils.command.__all__
-        is_std = set(std_commands)
-
-        extra_commands = [cmd for cmd in self.cmdclass.keys() if cmd not in is_std]
-
-        max_length = 0
-        for cmd in std_commands + extra_commands:
-            if len(cmd) > max_length:
-                max_length = len(cmd)
-
-        self.print_command_list(std_commands, "Standard commands", max_length)
-        if extra_commands:
-            print()
-            self.print_command_list(extra_commands, "Extra commands", max_length)
-
-    def get_command_list(self):
-        """Get a list of (command, description) tuples.
-        The list is divided into "standard commands" (listed in
-        distutils.command.__all__) and "extra commands" (mentioned in
-        self.cmdclass, but not a standard command).  The descriptions come
-        from the command class attribute 'description'.
-        """
-        # Currently this is only used on Mac OS, for the Mac-only GUI
-        # Distutils interface (by Jack Jansen)
-        import distutils.command
-
-        std_commands = distutils.command.__all__
-        is_std = set(std_commands)
-
-        extra_commands = [cmd for cmd in self.cmdclass.keys() if cmd not in is_std]
-
-        rv = []
-        for cmd in std_commands + extra_commands:
-            klass = self.cmdclass.get(cmd)
-            if not klass:
-                klass = self.get_command_class(cmd)
-            try:
-                description = klass.description
-            except AttributeError:
-                description = "(no description available)"
-            rv.append((cmd, description))
-        return rv
-
-    # -- Command class/object methods ----------------------------------
-
-    def get_command_packages(self):
-        """Return a list of packages from which commands are loaded."""
-        pkgs = self.command_packages
-        if not isinstance(pkgs, list):
-            if pkgs is None:
-                pkgs = ''
-            pkgs = [pkg.strip() for pkg in pkgs.split(',') if pkg != '']
-            if "distutils.command" not in pkgs:
-                pkgs.insert(0, "distutils.command")
-            self.command_packages = pkgs
-        return pkgs
-
-    def get_command_class(self, command: str) -> type[Command]:
-        """Return the class that implements the Distutils command named by
-        'command'.  First we check the 'cmdclass' dictionary; if the
-        command is mentioned there, we fetch the class object from the
-        dictionary and return it.  Otherwise we load the command module
-        ("distutils.command." + command) and fetch the command class from
-        the module.  The loaded class is also stored in 'cmdclass'
-        to speed future calls to 'get_command_class()'.
-
-        Raises DistutilsModuleError if the expected module could not be
-        found, or if that module does not define the expected class.
-        """
-        klass = self.cmdclass.get(command)
-        if klass:
-            return klass
-
-        for pkgname in self.get_command_packages():
-            module_name = f"{pkgname}.{command}"
-            klass_name = command
-
-            try:
-                __import__(module_name)
-                module = sys.modules[module_name]
-            except ImportError:
-                continue
-
-            try:
-                klass = getattr(module, klass_name)
-            except AttributeError:
-                raise DistutilsModuleError(
-                    f"invalid command '{command}' (no class '{klass_name}' in module '{module_name}')"
-                )
-
-            self.cmdclass[command] = klass
-            return klass
-
-        raise DistutilsModuleError(f"invalid command '{command}'")
-
-    @overload
-    def get_command_obj(
-        self, command: str, create: Literal[True] = True
-    ) -> Command: ...
-    @overload
-    def get_command_obj(
-        self, command: str, create: Literal[False]
-    ) -> Command | None: ...
-    def get_command_obj(self, command: str, create: bool = True) -> Command | None:
-        """Return the command object for 'command'.  Normally this object
-        is cached on a previous call to 'get_command_obj()'; if no command
-        object for 'command' is in the cache, then we either create and
-        return it (if 'create' is true) or return None.
-        """
-        cmd_obj = self.command_obj.get(command)
-        if not cmd_obj and create:
-            if DEBUG:
-                self.announce(
-                    "Distribution.get_command_obj(): "
-                    f"creating '{command}' command object"
-                )
-
-            klass = self.get_command_class(command)
-            cmd_obj = self.command_obj[command] = klass(self)
-            self.have_run[command] = False
-
-            # Set any options that were supplied in config files
-            # or on the command line.  (NB. support for error
-            # reporting is lame here: any errors aren't reported
-            # until 'finalize_options()' is called, which means
-            # we won't report the source of the error.)
-            options = self.command_options.get(command)
-            if options:
-                self._set_command_options(cmd_obj, options)
-
-        return cmd_obj
-
-    def _set_command_options(self, command_obj, option_dict=None):  # noqa: C901
-        """Set the options for 'command_obj' from 'option_dict'.  Basically
-        this means copying elements of a dictionary ('option_dict') to
-        attributes of an instance ('command').
-
-        'command_obj' must be a Command instance.  If 'option_dict' is not
-        supplied, uses the standard option dictionary for this command
-        (from 'self.command_options').
-        """
-        command_name = command_obj.get_command_name()
-        if option_dict is None:
-            option_dict = self.get_option_dict(command_name)
-
-        if DEBUG:
-            self.announce(f"  setting options for '{command_name}' command:")
-        for option, (source, value) in option_dict.items():
-            if DEBUG:
-                self.announce(f"    {option} = {value} (from {source})")
-            try:
-                bool_opts = [translate_longopt(o) for o in command_obj.boolean_options]
-            except AttributeError:
-                bool_opts = []
-            try:
-                neg_opt = command_obj.negative_opt
-            except AttributeError:
-                neg_opt = {}
-
-            try:
-                is_string = isinstance(value, str)
-                if option in neg_opt and is_string:
-                    setattr(command_obj, neg_opt[option], not strtobool(value))
-                elif option in bool_opts and is_string:
-                    setattr(command_obj, option, strtobool(value))
-                elif hasattr(command_obj, option):
-                    setattr(command_obj, option, value)
-                else:
-                    raise DistutilsOptionError(
-                        f"error in {source}: command '{command_name}' has no such option '{option}'"
-                    )
-            except ValueError as msg:
-                raise DistutilsOptionError(msg)
-
-    @overload
-    def reinitialize_command(
-        self, command: str, reinit_subcommands: bool = False
-    ) -> Command: ...
-    @overload
-    def reinitialize_command(
-        self, command: _CommandT, reinit_subcommands: bool = False
-    ) -> _CommandT: ...
-    def reinitialize_command(
-        self, command: str | Command, reinit_subcommands=False
-    ) -> Command:
-        """Reinitializes a command to the state it was in when first
-        returned by 'get_command_obj()': ie., initialized but not yet
-        finalized.  This provides the opportunity to sneak option
-        values in programmatically, overriding or supplementing
-        user-supplied values from the config files and command line.
-        You'll have to re-finalize the command object (by calling
-        'finalize_options()' or 'ensure_finalized()') before using it for
-        real.
-
-        'command' should be a command name (string) or command object.  If
-        'reinit_subcommands' is true, also reinitializes the command's
-        sub-commands, as declared by the 'sub_commands' class attribute (if
-        it has one).  See the "install" command for an example.  Only
-        reinitializes the sub-commands that actually matter, ie. those
-        whose test predicates return true.
-
-        Returns the reinitialized command object.
-        """
-        from distutils.cmd import Command
-
-        if not isinstance(command, Command):
-            command_name = command
-            command = self.get_command_obj(command_name)
-        else:
-            command_name = command.get_command_name()
-
-        if not command.finalized:
-            return command
-        command.initialize_options()
-        command.finalized = False
-        self.have_run[command_name] = False
-        self._set_command_options(command)
-
-        if reinit_subcommands:
-            for sub in command.get_sub_commands():
-                self.reinitialize_command(sub, reinit_subcommands)
-
-        return command
-
-    # -- Methods that operate on the Distribution ----------------------
-
-    def announce(self, msg, level: int = logging.INFO) -> None:
-        log.log(level, msg)
-
-    def run_commands(self) -> None:
-        """Run each command that was seen on the setup script command line.
-        Uses the list of commands found and cache of command objects
-        created by 'get_command_obj()'.
-        """
-        for cmd in self.commands:
-            self.run_command(cmd)
-
-    # -- Methods that operate on its Commands --------------------------
-
-    def run_command(self, command: str) -> None:
-        """Do whatever it takes to run a command (including nothing at all,
-        if the command has already been run).  Specifically: if we have
-        already created and run the command named by 'command', return
-        silently without doing anything.  If the command named by 'command'
-        doesn't even have a command object yet, create one.  Then invoke
-        'run()' on that command object (or an existing one).
-        """
-        # Already been here, done that? then return silently.
-        if self.have_run.get(command):
-            return
-
-        log.info("running %s", command)
-        cmd_obj = self.get_command_obj(command)
-        cmd_obj.ensure_finalized()
-        cmd_obj.run()
-        self.have_run[command] = True
-
-    # -- Distribution query methods ------------------------------------
-
-    def has_pure_modules(self) -> bool:
-        return len(self.packages or self.py_modules or []) > 0
-
-    def has_ext_modules(self) -> bool:
-        return self.ext_modules and len(self.ext_modules) > 0
-
-    def has_c_libraries(self) -> bool:
-        return self.libraries and len(self.libraries) > 0
-
-    def has_modules(self) -> bool:
-        return self.has_pure_modules() or self.has_ext_modules()
-
-    def has_headers(self) -> bool:
-        return self.headers and len(self.headers) > 0
-
-    def has_scripts(self) -> bool:
-        return self.scripts and len(self.scripts) > 0
-
-    def has_data_files(self) -> bool:
-        return self.data_files and len(self.data_files) > 0
-
-    def is_pure(self) -> bool:
-        return (
-            self.has_pure_modules()
-            and not self.has_ext_modules()
-            and not self.has_c_libraries()
-        )
-
-    # -- Metadata query methods ----------------------------------------
-
-    # If you're looking for 'get_name()', 'get_version()', and so forth,
-    # they are defined in a sneaky way: the constructor binds self.get_XXX
-    # to self.metadata.get_XXX.  The actual code is in the
-    # DistributionMetadata class, below.
-    if TYPE_CHECKING:
-        # Unfortunately this means we need to specify them manually or not expose statically
-        def _(self) -> None:
-            self.get_name = self.metadata.get_name
-            self.get_version = self.metadata.get_version
-            self.get_fullname = self.metadata.get_fullname
-            self.get_author = self.metadata.get_author
-            self.get_author_email = self.metadata.get_author_email
-            self.get_maintainer = self.metadata.get_maintainer
-            self.get_maintainer_email = self.metadata.get_maintainer_email
-            self.get_contact = self.metadata.get_contact
-            self.get_contact_email = self.metadata.get_contact_email
-            self.get_url = self.metadata.get_url
-            self.get_license = self.metadata.get_license
-            self.get_licence = self.metadata.get_licence
-            self.get_description = self.metadata.get_description
-            self.get_long_description = self.metadata.get_long_description
-            self.get_keywords = self.metadata.get_keywords
-            self.get_platforms = self.metadata.get_platforms
-            self.get_classifiers = self.metadata.get_classifiers
-            self.get_download_url = self.metadata.get_download_url
-            self.get_requires = self.metadata.get_requires
-            self.get_provides = self.metadata.get_provides
-            self.get_obsoletes = self.metadata.get_obsoletes
-
-        # Default attributes generated in __init__ from self.display_option_names
-        help_commands: bool
-        name: str | Literal[False]
-        version: str | Literal[False]
-        fullname: str | Literal[False]
-        author: str | Literal[False]
-        author_email: str | Literal[False]
-        maintainer: str | Literal[False]
-        maintainer_email: str | Literal[False]
-        contact: str | Literal[False]
-        contact_email: str | Literal[False]
-        url: str | Literal[False]
-        license: str | Literal[False]
-        licence: str | Literal[False]
-        description: str | Literal[False]
-        long_description: str | Literal[False]
-        platforms: str | list[str] | Literal[False]
-        classifiers: str | list[str] | Literal[False]
-        keywords: str | list[str] | Literal[False]
-        provides: list[str] | Literal[False]
-        requires: list[str] | Literal[False]
-        obsoletes: list[str] | Literal[False]
-
-
-class DistributionMetadata:
-    """Dummy class to hold the distribution meta-data: name, version,
-    author, and so forth.
-    """
-
-    _METHOD_BASENAMES = (
-        "name",
-        "version",
-        "author",
-        "author_email",
-        "maintainer",
-        "maintainer_email",
-        "url",
-        "license",
-        "description",
-        "long_description",
-        "keywords",
-        "platforms",
-        "fullname",
-        "contact",
-        "contact_email",
-        "classifiers",
-        "download_url",
-        # PEP 314
-        "provides",
-        "requires",
-        "obsoletes",
-    )
-
-    def __init__(
-        self, path: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None = None
-    ) -> None:
-        if path is not None:
-            self.read_pkg_file(open(path))
-        else:
-            self.name: str | None = None
-            self.version: str | None = None
-            self.author: str | None = None
-            self.author_email: str | None = None
-            self.maintainer: str | None = None
-            self.maintainer_email: str | None = None
-            self.url: str | None = None
-            self.license: str | None = None
-            self.description: str | None = None
-            self.long_description: str | None = None
-            self.keywords: str | list[str] | None = None
-            self.platforms: str | list[str] | None = None
-            self.classifiers: str | list[str] | None = None
-            self.download_url: str | None = None
-            # PEP 314
-            self.provides: str | list[str] | None = None
-            self.requires: str | list[str] | None = None
-            self.obsoletes: str | list[str] | None = None
-
-    def read_pkg_file(self, file: IO[str]) -> None:
-        """Reads the metadata values from a file object."""
-        msg = message_from_file(file)
-
-        def _read_field(name: str) -> str | None:
-            value = msg[name]
-            if value and value != "UNKNOWN":
-                return value
-            return None
-
-        def _read_list(name):
-            values = msg.get_all(name, None)
-            if values == []:
-                return None
-            return values
-
-        metadata_version = msg['metadata-version']
-        self.name = _read_field('name')
-        self.version = _read_field('version')
-        self.description = _read_field('summary')
-        # we are filling author only.
-        self.author = _read_field('author')
-        self.maintainer = None
-        self.author_email = _read_field('author-email')
-        self.maintainer_email = None
-        self.url = _read_field('home-page')
-        self.license = _read_field('license')
-
-        if 'download-url' in msg:
-            self.download_url = _read_field('download-url')
-        else:
-            self.download_url = None
-
-        self.long_description = _read_field('description')
-        self.description = _read_field('summary')
-
-        if 'keywords' in msg:
-            self.keywords = _read_field('keywords').split(',')
-
-        self.platforms = _read_list('platform')
-        self.classifiers = _read_list('classifier')
-
-        # PEP 314 - these fields only exist in 1.1
-        if metadata_version == '1.1':
-            self.requires = _read_list('requires')
-            self.provides = _read_list('provides')
-            self.obsoletes = _read_list('obsoletes')
-        else:
-            self.requires = None
-            self.provides = None
-            self.obsoletes = None
-
-    def write_pkg_info(self, base_dir: str | os.PathLike[str]) -> None:
-        """Write the PKG-INFO file into the release tree."""
-        with open(
-            os.path.join(base_dir, 'PKG-INFO'), 'w', encoding='UTF-8'
-        ) as pkg_info:
-            self.write_pkg_file(pkg_info)
-
-    def write_pkg_file(self, file: SupportsWrite[str]) -> None:
-        """Write the PKG-INFO format data to a file object."""
-        version = '1.0'
-        if (
-            self.provides
-            or self.requires
-            or self.obsoletes
-            or self.classifiers
-            or self.download_url
-        ):
-            version = '1.1'
-
-        # required fields
-        file.write(f'Metadata-Version: {version}\n')
-        file.write(f'Name: {self.get_name()}\n')
-        file.write(f'Version: {self.get_version()}\n')
-
-        def maybe_write(header, val):
-            if val:
-                file.write(f"{header}: {val}\n")
-
-        # optional fields
-        maybe_write("Summary", self.get_description())
-        maybe_write("Home-page", self.get_url())
-        maybe_write("Author", self.get_contact())
-        maybe_write("Author-email", self.get_contact_email())
-        maybe_write("License", self.get_license())
-        maybe_write("Download-URL", self.download_url)
-        maybe_write("Description", rfc822_escape(self.get_long_description() or ""))
-        maybe_write("Keywords", ",".join(self.get_keywords()))
-
-        self._write_list(file, 'Platform', self.get_platforms())
-        self._write_list(file, 'Classifier', self.get_classifiers())
-
-        # PEP 314
-        self._write_list(file, 'Requires', self.get_requires())
-        self._write_list(file, 'Provides', self.get_provides())
-        self._write_list(file, 'Obsoletes', self.get_obsoletes())
-
-    def _write_list(self, file, name, values):
-        values = values or []
-        for value in values:
-            file.write(f'{name}: {value}\n')
-
-    # -- Metadata query methods ----------------------------------------
-
-    def get_name(self) -> str:
-        return self.name or "UNKNOWN"
-
-    def get_version(self) -> str:
-        return self.version or "0.0.0"
-
-    def get_fullname(self) -> str:
-        return self._fullname(self.get_name(), self.get_version())
-
-    @staticmethod
-    def _fullname(name: str, version: str) -> str:
-        """
-        >>> DistributionMetadata._fullname('setup.tools', '1.0-2')
-        'setup_tools-1.0.post2'
-        >>> DistributionMetadata._fullname('setup-tools', '1.2post2')
-        'setup_tools-1.2.post2'
-        >>> DistributionMetadata._fullname('setup-tools', '1.0-r2')
-        'setup_tools-1.0.post2'
-        >>> DistributionMetadata._fullname('setup.tools', '1.0.post')
-        'setup_tools-1.0.post0'
-        >>> DistributionMetadata._fullname('setup.tools', '1.0+ubuntu-1')
-        'setup_tools-1.0+ubuntu.1'
-        """
-        return "{}-{}".format(
-            canonicalize_name(name).replace('-', '_'),
-            canonicalize_version(version, strip_trailing_zero=False),
-        )
-
-    def get_author(self) -> str | None:
-        return self.author
-
-    def get_author_email(self) -> str | None:
-        return self.author_email
-
-    def get_maintainer(self) -> str | None:
-        return self.maintainer
-
-    def get_maintainer_email(self) -> str | None:
-        return self.maintainer_email
-
-    def get_contact(self) -> str | None:
-        return self.maintainer or self.author
-
-    def get_contact_email(self) -> str | None:
-        return self.maintainer_email or self.author_email
-
-    def get_url(self) -> str | None:
-        return self.url
-
-    def get_license(self) -> str | None:
-        return self.license
-
-    get_licence = get_license
-
-    def get_description(self) -> str | None:
-        return self.description
-
-    def get_long_description(self) -> str | None:
-        return self.long_description
-
-    def get_keywords(self) -> str | list[str]:
-        return self.keywords or []
-
-    def set_keywords(self, value: str | Iterable[str]) -> None:
-        self.keywords = _ensure_list(value, 'keywords')
-
-    def get_platforms(self) -> str | list[str] | None:
-        return self.platforms
-
-    def set_platforms(self, value: str | Iterable[str]) -> None:
-        self.platforms = _ensure_list(value, 'platforms')
-
-    def get_classifiers(self) -> str | list[str]:
-        return self.classifiers or []
-
-    def set_classifiers(self, value: str | Iterable[str]) -> None:
-        self.classifiers = _ensure_list(value, 'classifiers')
-
-    def get_download_url(self) -> str | None:
-        return self.download_url
-
-    # PEP 314
-    def get_requires(self) -> str | list[str]:
-        return self.requires or []
-
-    def set_requires(self, value: Iterable[str]) -> None:
-        import distutils.versionpredicate
-
-        for v in value:
-            distutils.versionpredicate.VersionPredicate(v)
-        self.requires = list(value)
-
-    def get_provides(self) -> str | list[str]:
-        return self.provides or []
-
-    def set_provides(self, value: Iterable[str]) -> None:
-        value = [v.strip() for v in value]
-        for v in value:
-            import distutils.versionpredicate
-
-            distutils.versionpredicate.split_provision(v)
-        self.provides = value
-
-    def get_obsoletes(self) -> str | list[str]:
-        return self.obsoletes or []
-
-    def set_obsoletes(self, value: Iterable[str]) -> None:
-        import distutils.versionpredicate
-
-        for v in value:
-            distutils.versionpredicate.VersionPredicate(v)
-        self.obsoletes = list(value)
-
-
-def fix_help_options(options):
-    """Convert a 4-tuple 'help_options' list as found in various command
-    classes to the 3-tuple form required by FancyGetopt.
-    """
-    return [opt[0:3] for opt in options]
diff --git a/voxvera/vendor/setuptools/_distutils/errors.py b/voxvera/vendor/setuptools/_distutils/errors.py
deleted file mode 100644
index 409d21f..0000000
--- a/voxvera/vendor/setuptools/_distutils/errors.py
+++ /dev/null
@@ -1,108 +0,0 @@
-"""
-Exceptions used by the Distutils modules.
-
-Distutils modules may raise these or standard exceptions,
-including :exc:`SystemExit`.
-"""
-
-# compiler exceptions aliased for compatibility
-from .compilers.C.errors import CompileError as CompileError
-from .compilers.C.errors import Error as _Error
-from .compilers.C.errors import LibError as LibError
-from .compilers.C.errors import LinkError as LinkError
-from .compilers.C.errors import PreprocessError as PreprocessError
-from .compilers.C.errors import UnknownFileType as _UnknownFileType
-
-CCompilerError = _Error
-UnknownFileError = _UnknownFileType
-
-
-class DistutilsError(Exception):
-    """The root of all Distutils evil."""
-
-    pass
-
-
-class DistutilsModuleError(DistutilsError):
-    """Unable to load an expected module, or to find an expected class
-    within some module (in particular, command modules and classes)."""
-
-    pass
-
-
-class DistutilsClassError(DistutilsError):
-    """Some command class (or possibly distribution class, if anyone
-    feels a need to subclass Distribution) is found not to be holding
-    up its end of the bargain, ie. implementing some part of the
-    "command "interface."""
-
-    pass
-
-
-class DistutilsGetoptError(DistutilsError):
-    """The option table provided to 'fancy_getopt()' is bogus."""
-
-    pass
-
-
-class DistutilsArgError(DistutilsError):
-    """Raised by fancy_getopt in response to getopt.error -- ie. an
-    error in the command line usage."""
-
-    pass
-
-
-class DistutilsFileError(DistutilsError):
-    """Any problems in the filesystem: expected file not found, etc.
-    Typically this is for problems that we detect before OSError
-    could be raised."""
-
-    pass
-
-
-class DistutilsOptionError(DistutilsError):
-    """Syntactic/semantic errors in command options, such as use of
-    mutually conflicting options, or inconsistent options,
-    badly-spelled values, etc.  No distinction is made between option
-    values originating in the setup script, the command line, config
-    files, or what-have-you -- but if we *know* something originated in
-    the setup script, we'll raise DistutilsSetupError instead."""
-
-    pass
-
-
-class DistutilsSetupError(DistutilsError):
-    """For errors that can be definitely blamed on the setup script,
-    such as invalid keyword arguments to 'setup()'."""
-
-    pass
-
-
-class DistutilsPlatformError(DistutilsError):
-    """We don't know how to do something on the current platform (but
-    we do know how to do it on some platform) -- eg. trying to compile
-    C files on a platform not supported by a CCompiler subclass."""
-
-    pass
-
-
-class DistutilsExecError(DistutilsError):
-    """Any problems executing an external program (such as the C
-    compiler, when compiling C files)."""
-
-    pass
-
-
-class DistutilsInternalError(DistutilsError):
-    """Internal inconsistencies or impossibilities (obviously, this
-    should never be seen if the code is working!)."""
-
-    pass
-
-
-class DistutilsTemplateError(DistutilsError):
-    """Syntax error in a file list template."""
-
-
-class DistutilsByteCompileError(DistutilsError):
-    """Byte compile error."""
diff --git a/voxvera/vendor/setuptools/_distutils/extension.py b/voxvera/vendor/setuptools/_distutils/extension.py
deleted file mode 100644
index f514112..0000000
--- a/voxvera/vendor/setuptools/_distutils/extension.py
+++ /dev/null
@@ -1,258 +0,0 @@
-"""distutils.extension
-
-Provides the Extension class, used to describe C/C++ extension
-modules in setup scripts."""
-
-from __future__ import annotations
-
-import os
-import warnings
-from collections.abc import Iterable
-
-# This class is really only used by the "build_ext" command, so it might
-# make sense to put it in distutils.command.build_ext.  However, that
-# module is already big enough, and I want to make this class a bit more
-# complex to simplify some common cases ("foo" module in "foo.c") and do
-# better error-checking ("foo.c" actually exists).
-#
-# Also, putting this in build_ext.py means every setup script would have to
-# import that large-ish module (indirectly, through distutils.core) in
-# order to do anything.
-
-
-class Extension:
-    """Just a collection of attributes that describes an extension
-    module and everything needed to build it (hopefully in a portable
-    way, but there are hooks that let you be as unportable as you need).
-
-    Instance attributes:
-      name : string
-        the full name of the extension, including any packages -- ie.
-        *not* a filename or pathname, but Python dotted name
-      sources : Iterable[string | os.PathLike]
-        iterable of source filenames (except strings, which could be misinterpreted
-        as a single filename), relative to the distribution root (where the setup
-        script lives), in Unix form (slash-separated) for portability. Can be any
-        non-string iterable (list, tuple, set, etc.) containing strings or
-        PathLike objects. Source files may be C, C++, SWIG (.i), platform-specific
-        resource files, or whatever else is recognized by the "build_ext" command
-        as source for a Python extension.
-      include_dirs : [string]
-        list of directories to search for C/C++ header files (in Unix
-        form for portability)
-      define_macros : [(name : string, value : string|None)]
-        list of macros to define; each macro is defined using a 2-tuple,
-        where 'value' is either the string to define it to or None to
-        define it without a particular value (equivalent of "#define
-        FOO" in source or -DFOO on Unix C compiler command line)
-      undef_macros : [string]
-        list of macros to undefine explicitly
-      library_dirs : [string]
-        list of directories to search for C/C++ libraries at link time
-      libraries : [string]
-        list of library names (not filenames or paths) to link against
-      runtime_library_dirs : [string]
-        list of directories to search for C/C++ libraries at run time
-        (for shared extensions, this is when the extension is loaded)
-      extra_objects : [string]
-        list of extra files to link with (eg. object files not implied
-        by 'sources', static library that must be explicitly specified,
-        binary resource files, etc.)
-      extra_compile_args : [string]
-        any extra platform- and compiler-specific information to use
-        when compiling the source files in 'sources'.  For platforms and
-        compilers where "command line" makes sense, this is typically a
-        list of command-line arguments, but for other platforms it could
-        be anything.
-      extra_link_args : [string]
-        any extra platform- and compiler-specific information to use
-        when linking object files together to create the extension (or
-        to create a new static Python interpreter).  Similar
-        interpretation as for 'extra_compile_args'.
-      export_symbols : [string]
-        list of symbols to be exported from a shared extension.  Not
-        used on all platforms, and not generally necessary for Python
-        extensions, which typically export exactly one symbol: "init" +
-        extension_name.
-      swig_opts : [string]
-        any extra options to pass to SWIG if a source file has the .i
-        extension.
-      depends : [string]
-        list of files that the extension depends on
-      language : string
-        extension language (i.e. "c", "c++", "objc"). Will be detected
-        from the source extensions if not provided.
-      optional : boolean
-        specifies that a build failure in the extension should not abort the
-        build process, but simply not install the failing extension.
-    """
-
-    # When adding arguments to this constructor, be sure to update
-    # setup_keywords in core.py.
-    def __init__(
-        self,
-        name: str,
-        sources: Iterable[str | os.PathLike[str]],
-        include_dirs: list[str] | None = None,
-        define_macros: list[tuple[str, str | None]] | None = None,
-        undef_macros: list[str] | None = None,
-        library_dirs: list[str] | None = None,
-        libraries: list[str] | None = None,
-        runtime_library_dirs: list[str] | None = None,
-        extra_objects: list[str] | None = None,
-        extra_compile_args: list[str] | None = None,
-        extra_link_args: list[str] | None = None,
-        export_symbols: list[str] | None = None,
-        swig_opts: list[str] | None = None,
-        depends: list[str] | None = None,
-        language: str | None = None,
-        optional: bool | None = None,
-        **kw,  # To catch unknown keywords
-    ):
-        if not isinstance(name, str):
-            raise TypeError("'name' must be a string")
-
-        # handle the string case first; since strings are iterable, disallow them
-        if isinstance(sources, str):
-            raise TypeError(
-                "'sources' must be an iterable of strings or PathLike objects, not a string"
-            )
-
-        # now we check if it's iterable and contains valid types
-        try:
-            self.sources = list(map(os.fspath, sources))
-        except TypeError:
-            raise TypeError(
-                "'sources' must be an iterable of strings or PathLike objects"
-            )
-
-        self.name = name
-        self.include_dirs = include_dirs or []
-        self.define_macros = define_macros or []
-        self.undef_macros = undef_macros or []
-        self.library_dirs = library_dirs or []
-        self.libraries = libraries or []
-        self.runtime_library_dirs = runtime_library_dirs or []
-        self.extra_objects = extra_objects or []
-        self.extra_compile_args = extra_compile_args or []
-        self.extra_link_args = extra_link_args or []
-        self.export_symbols = export_symbols or []
-        self.swig_opts = swig_opts or []
-        self.depends = depends or []
-        self.language = language
-        self.optional = optional
-
-        # If there are unknown keyword options, warn about them
-        if len(kw) > 0:
-            options = [repr(option) for option in kw]
-            options = ', '.join(sorted(options))
-            msg = f"Unknown Extension options: {options}"
-            warnings.warn(msg)
-
-    def __repr__(self):
-        return f'<{self.__class__.__module__}.{self.__class__.__qualname__}({self.name!r}) at {id(self):#x}>'
-
-
-def read_setup_file(filename):  # noqa: C901
-    """Reads a Setup file and returns Extension instances."""
-    from distutils.sysconfig import _variable_rx, expand_makefile_vars, parse_makefile
-    from distutils.text_file import TextFile
-    from distutils.util import split_quoted
-
-    # First pass over the file to gather "VAR = VALUE" assignments.
-    vars = parse_makefile(filename)
-
-    # Second pass to gobble up the real content: lines of the form
-    #    ... [ ...] [ ...] [ ...]
-    file = TextFile(
-        filename,
-        strip_comments=True,
-        skip_blanks=True,
-        join_lines=True,
-        lstrip_ws=True,
-        rstrip_ws=True,
-    )
-    try:
-        extensions = []
-
-        while True:
-            line = file.readline()
-            if line is None:  # eof
-                break
-            if _variable_rx.match(line):  # VAR=VALUE, handled in first pass
-                continue
-
-            if line[0] == line[-1] == "*":
-                file.warn(f"'{line}' lines not handled yet")
-                continue
-
-            line = expand_makefile_vars(line, vars)
-            words = split_quoted(line)
-
-            # NB. this parses a slightly different syntax than the old
-            # makesetup script: here, there must be exactly one extension per
-            # line, and it must be the first word of the line.  I have no idea
-            # why the old syntax supported multiple extensions per line, as
-            # they all wind up being the same.
-
-            module = words[0]
-            ext = Extension(module, [])
-            append_next_word = None
-
-            for word in words[1:]:
-                if append_next_word is not None:
-                    append_next_word.append(word)
-                    append_next_word = None
-                    continue
-
-                suffix = os.path.splitext(word)[1]
-                switch = word[0:2]
-                value = word[2:]
-
-                if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"):
-                    # hmm, should we do something about C vs. C++ sources?
-                    # or leave it up to the CCompiler implementation to
-                    # worry about?
-                    ext.sources.append(word)
-                elif switch == "-I":
-                    ext.include_dirs.append(value)
-                elif switch == "-D":
-                    equals = value.find("=")
-                    if equals == -1:  # bare "-DFOO" -- no value
-                        ext.define_macros.append((value, None))
-                    else:  # "-DFOO=blah"
-                        ext.define_macros.append((value[0:equals], value[equals + 2 :]))
-                elif switch == "-U":
-                    ext.undef_macros.append(value)
-                elif switch == "-C":  # only here 'cause makesetup has it!
-                    ext.extra_compile_args.append(word)
-                elif switch == "-l":
-                    ext.libraries.append(value)
-                elif switch == "-L":
-                    ext.library_dirs.append(value)
-                elif switch == "-R":
-                    ext.runtime_library_dirs.append(value)
-                elif word == "-rpath":
-                    append_next_word = ext.runtime_library_dirs
-                elif word == "-Xlinker":
-                    append_next_word = ext.extra_link_args
-                elif word == "-Xcompiler":
-                    append_next_word = ext.extra_compile_args
-                elif switch == "-u":
-                    ext.extra_link_args.append(word)
-                    if not value:
-                        append_next_word = ext.extra_link_args
-                elif suffix in (".a", ".so", ".sl", ".o", ".dylib"):
-                    # NB. a really faithful emulation of makesetup would
-                    # append a .o file to extra_objects only if it
-                    # had a slash in it; otherwise, it would s/.o/.c/
-                    # and append it to sources.  Hmmmm.
-                    ext.extra_objects.append(word)
-                else:
-                    file.warn(f"unrecognized argument '{word}'")
-
-            extensions.append(ext)
-    finally:
-        file.close()
-
-    return extensions
diff --git a/voxvera/vendor/setuptools/_distutils/fancy_getopt.py b/voxvera/vendor/setuptools/_distutils/fancy_getopt.py
deleted file mode 100644
index 1a1d3a0..0000000
--- a/voxvera/vendor/setuptools/_distutils/fancy_getopt.py
+++ /dev/null
@@ -1,471 +0,0 @@
-"""distutils.fancy_getopt
-
-Wrapper around the standard getopt module that provides the following
-additional features:
-  * short and long options are tied together
-  * options have help strings, so fancy_getopt could potentially
-    create a complete usage summary
-  * options set attributes of a passed-in object
-"""
-
-from __future__ import annotations
-
-import getopt
-import re
-import string
-import sys
-from collections.abc import Sequence
-from typing import Any
-
-from .errors import DistutilsArgError, DistutilsGetoptError
-
-# Much like command_re in distutils.core, this is close to but not quite
-# the same as a Python NAME -- except, in the spirit of most GNU
-# utilities, we use '-' in place of '_'.  (The spirit of LISP lives on!)
-# The similarities to NAME are again not a coincidence...
-longopt_pat = r'[a-zA-Z](?:[a-zA-Z0-9-]*)'
-longopt_re = re.compile(rf'^{longopt_pat}$')
-
-# For recognizing "negative alias" options, eg. "quiet=!verbose"
-neg_alias_re = re.compile(f"^({longopt_pat})=!({longopt_pat})$")
-
-# This is used to translate long options to legitimate Python identifiers
-# (for use as attributes of some object).
-longopt_xlate = str.maketrans('-', '_')
-
-
-class FancyGetopt:
-    """Wrapper around the standard 'getopt()' module that provides some
-    handy extra functionality:
-      * short and long options are tied together
-      * options have help strings, and help text can be assembled
-        from them
-      * options set attributes of a passed-in object
-      * boolean options can have "negative aliases" -- eg. if
-        --quiet is the "negative alias" of --verbose, then "--quiet"
-        on the command line sets 'verbose' to false
-    """
-
-    def __init__(self, option_table=None):
-        # The option table is (currently) a list of tuples.  The
-        # tuples may have 3 or four values:
-        #   (long_option, short_option, help_string [, repeatable])
-        # if an option takes an argument, its long_option should have '='
-        # appended; short_option should just be a single character, no ':'
-        # in any case.  If a long_option doesn't have a corresponding
-        # short_option, short_option should be None.  All option tuples
-        # must have long options.
-        self.option_table = option_table
-
-        # 'option_index' maps long option names to entries in the option
-        # table (ie. those 3-tuples).
-        self.option_index = {}
-        if self.option_table:
-            self._build_index()
-
-        # 'alias' records (duh) alias options; {'foo': 'bar'} means
-        # --foo is an alias for --bar
-        self.alias = {}
-
-        # 'negative_alias' keeps track of options that are the boolean
-        # opposite of some other option
-        self.negative_alias = {}
-
-        # These keep track of the information in the option table.  We
-        # don't actually populate these structures until we're ready to
-        # parse the command-line, since the 'option_table' passed in here
-        # isn't necessarily the final word.
-        self.short_opts = []
-        self.long_opts = []
-        self.short2long = {}
-        self.attr_name = {}
-        self.takes_arg = {}
-
-        # And 'option_order' is filled up in 'getopt()'; it records the
-        # original order of options (and their values) on the command-line,
-        # but expands short options, converts aliases, etc.
-        self.option_order = []
-
-    def _build_index(self):
-        self.option_index.clear()
-        for option in self.option_table:
-            self.option_index[option[0]] = option
-
-    def set_option_table(self, option_table):
-        self.option_table = option_table
-        self._build_index()
-
-    def add_option(self, long_option, short_option=None, help_string=None):
-        if long_option in self.option_index:
-            raise DistutilsGetoptError(
-                f"option conflict: already an option '{long_option}'"
-            )
-        else:
-            option = (long_option, short_option, help_string)
-            self.option_table.append(option)
-            self.option_index[long_option] = option
-
-    def has_option(self, long_option):
-        """Return true if the option table for this parser has an
-        option with long name 'long_option'."""
-        return long_option in self.option_index
-
-    def get_attr_name(self, long_option):
-        """Translate long option name 'long_option' to the form it
-        has as an attribute of some object: ie., translate hyphens
-        to underscores."""
-        return long_option.translate(longopt_xlate)
-
-    def _check_alias_dict(self, aliases, what):
-        assert isinstance(aliases, dict)
-        for alias, opt in aliases.items():
-            if alias not in self.option_index:
-                raise DistutilsGetoptError(
-                    f"invalid {what} '{alias}': option '{alias}' not defined"
-                )
-            if opt not in self.option_index:
-                raise DistutilsGetoptError(
-                    f"invalid {what} '{alias}': aliased option '{opt}' not defined"
-                )
-
-    def set_aliases(self, alias):
-        """Set the aliases for this option parser."""
-        self._check_alias_dict(alias, "alias")
-        self.alias = alias
-
-    def set_negative_aliases(self, negative_alias):
-        """Set the negative aliases for this option parser.
-        'negative_alias' should be a dictionary mapping option names to
-        option names, both the key and value must already be defined
-        in the option table."""
-        self._check_alias_dict(negative_alias, "negative alias")
-        self.negative_alias = negative_alias
-
-    def _grok_option_table(self):  # noqa: C901
-        """Populate the various data structures that keep tabs on the
-        option table.  Called by 'getopt()' before it can do anything
-        worthwhile.
-        """
-        self.long_opts = []
-        self.short_opts = []
-        self.short2long.clear()
-        self.repeat = {}
-
-        for option in self.option_table:
-            if len(option) == 3:
-                long, short, help = option
-                repeat = 0
-            elif len(option) == 4:
-                long, short, help, repeat = option
-            else:
-                # the option table is part of the code, so simply
-                # assert that it is correct
-                raise ValueError(f"invalid option tuple: {option!r}")
-
-            # Type- and value-check the option names
-            if not isinstance(long, str) or len(long) < 2:
-                raise DistutilsGetoptError(
-                    f"invalid long option '{long}': must be a string of length >= 2"
-                )
-
-            if not ((short is None) or (isinstance(short, str) and len(short) == 1)):
-                raise DistutilsGetoptError(
-                    f"invalid short option '{short}': must a single character or None"
-                )
-
-            self.repeat[long] = repeat
-            self.long_opts.append(long)
-
-            if long[-1] == '=':  # option takes an argument?
-                if short:
-                    short = short + ':'
-                long = long[0:-1]
-                self.takes_arg[long] = True
-            else:
-                # Is option is a "negative alias" for some other option (eg.
-                # "quiet" == "!verbose")?
-                alias_to = self.negative_alias.get(long)
-                if alias_to is not None:
-                    if self.takes_arg[alias_to]:
-                        raise DistutilsGetoptError(
-                            f"invalid negative alias '{long}': "
-                            f"aliased option '{alias_to}' takes a value"
-                        )
-
-                    self.long_opts[-1] = long  # XXX redundant?!
-                self.takes_arg[long] = False
-
-            # If this is an alias option, make sure its "takes arg" flag is
-            # the same as the option it's aliased to.
-            alias_to = self.alias.get(long)
-            if alias_to is not None:
-                if self.takes_arg[long] != self.takes_arg[alias_to]:
-                    raise DistutilsGetoptError(
-                        f"invalid alias '{long}': inconsistent with "
-                        f"aliased option '{alias_to}' (one of them takes a value, "
-                        "the other doesn't"
-                    )
-
-            # Now enforce some bondage on the long option name, so we can
-            # later translate it to an attribute name on some object.  Have
-            # to do this a bit late to make sure we've removed any trailing
-            # '='.
-            if not longopt_re.match(long):
-                raise DistutilsGetoptError(
-                    f"invalid long option name '{long}' "
-                    "(must be letters, numbers, hyphens only"
-                )
-
-            self.attr_name[long] = self.get_attr_name(long)
-            if short:
-                self.short_opts.append(short)
-                self.short2long[short[0]] = long
-
-    def getopt(self, args: Sequence[str] | None = None, object=None):  # noqa: C901
-        """Parse command-line options in args. Store as attributes on object.
-
-        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
-        'object' is None or not supplied, creates a new OptionDummy
-        object, stores option values there, and returns a tuple (args,
-        object).  If 'object' is supplied, it is modified in place and
-        'getopt()' just returns 'args'; in both cases, the returned
-        'args' is a modified copy of the passed-in 'args' list, which
-        is left untouched.
-        """
-        if args is None:
-            args = sys.argv[1:]
-        if object is None:
-            object = OptionDummy()
-            created_object = True
-        else:
-            created_object = False
-
-        self._grok_option_table()
-
-        short_opts = ' '.join(self.short_opts)
-        try:
-            opts, args = getopt.getopt(args, short_opts, self.long_opts)
-        except getopt.error as msg:
-            raise DistutilsArgError(msg)
-
-        for opt, val in opts:
-            if len(opt) == 2 and opt[0] == '-':  # it's a short option
-                opt = self.short2long[opt[1]]
-            else:
-                assert len(opt) > 2 and opt[:2] == '--'
-                opt = opt[2:]
-
-            alias = self.alias.get(opt)
-            if alias:
-                opt = alias
-
-            if not self.takes_arg[opt]:  # boolean option?
-                assert val == '', "boolean option can't have value"
-                alias = self.negative_alias.get(opt)
-                if alias:
-                    opt = alias
-                    val = 0
-                else:
-                    val = 1
-
-            attr = self.attr_name[opt]
-            # The only repeating option at the moment is 'verbose'.
-            # It has a negative option -q quiet, which should set verbose = False.
-            if val and self.repeat.get(attr) is not None:
-                val = getattr(object, attr, 0) + 1
-            setattr(object, attr, val)
-            self.option_order.append((opt, val))
-
-        # for opts
-        if created_object:
-            return args, object
-        else:
-            return args
-
-    def get_option_order(self):
-        """Returns the list of (option, value) tuples processed by the
-        previous run of 'getopt()'.  Raises RuntimeError if
-        'getopt()' hasn't been called yet.
-        """
-        if self.option_order is None:
-            raise RuntimeError("'getopt()' hasn't been called yet")
-        else:
-            return self.option_order
-
-    def generate_help(self, header=None):  # noqa: C901
-        """Generate help text (a list of strings, one per suggested line of
-        output) from the option table for this FancyGetopt object.
-        """
-        # Blithely assume the option table is good: probably wouldn't call
-        # 'generate_help()' unless you've already called 'getopt()'.
-
-        # First pass: determine maximum length of long option names
-        max_opt = 0
-        for option in self.option_table:
-            long = option[0]
-            short = option[1]
-            ell = len(long)
-            if long[-1] == '=':
-                ell = ell - 1
-            if short is not None:
-                ell = ell + 5  # " (-x)" where short == 'x'
-            if ell > max_opt:
-                max_opt = ell
-
-        opt_width = max_opt + 2 + 2 + 2  # room for indent + dashes + gutter
-
-        # Typical help block looks like this:
-        #   --foo       controls foonabulation
-        # Help block for longest option looks like this:
-        #   --flimflam  set the flim-flam level
-        # and with wrapped text:
-        #   --flimflam  set the flim-flam level (must be between
-        #               0 and 100, except on Tuesdays)
-        # Options with short names will have the short name shown (but
-        # it doesn't contribute to max_opt):
-        #   --foo (-f)  controls foonabulation
-        # If adding the short option would make the left column too wide,
-        # we push the explanation off to the next line
-        #   --flimflam (-l)
-        #               set the flim-flam level
-        # Important parameters:
-        #   - 2 spaces before option block start lines
-        #   - 2 dashes for each long option name
-        #   - min. 2 spaces between option and explanation (gutter)
-        #   - 5 characters (incl. space) for short option name
-
-        # Now generate lines of help text.  (If 80 columns were good enough
-        # for Jesus, then 78 columns are good enough for me!)
-        line_width = 78
-        text_width = line_width - opt_width
-        big_indent = ' ' * opt_width
-        if header:
-            lines = [header]
-        else:
-            lines = ['Option summary:']
-
-        for option in self.option_table:
-            long, short, help = option[:3]
-            text = wrap_text(help, text_width)
-            if long[-1] == '=':
-                long = long[0:-1]
-
-            # Case 1: no short option at all (makes life easy)
-            if short is None:
-                if text:
-                    lines.append(f"  --{long:<{max_opt}}  {text[0]}")
-                else:
-                    lines.append(f"  --{long:<{max_opt}}")
-
-            # Case 2: we have a short option, so we have to include it
-            # just after the long option
-            else:
-                opt_names = f"{long} (-{short})"
-                if text:
-                    lines.append(f"  --{opt_names:<{max_opt}}  {text[0]}")
-                else:
-                    lines.append(f"  --{opt_names:<{max_opt}}")
-
-            for ell in text[1:]:
-                lines.append(big_indent + ell)
-        return lines
-
-    def print_help(self, header=None, file=None):
-        if file is None:
-            file = sys.stdout
-        for line in self.generate_help(header):
-            file.write(line + "\n")
-
-
-def fancy_getopt(options, negative_opt, object, args: Sequence[str] | None):
-    parser = FancyGetopt(options)
-    parser.set_negative_aliases(negative_opt)
-    return parser.getopt(args, object)
-
-
-WS_TRANS = {ord(_wschar): ' ' for _wschar in string.whitespace}
-
-
-def wrap_text(text, width):
-    """wrap_text(text : string, width : int) -> [string]
-
-    Split 'text' into multiple lines of no more than 'width' characters
-    each, and return the list of strings that results.
-    """
-    if text is None:
-        return []
-    if len(text) <= width:
-        return [text]
-
-    text = text.expandtabs()
-    text = text.translate(WS_TRANS)
-    chunks = re.split(r'( +|-+)', text)
-    chunks = [ch for ch in chunks if ch]  # ' - ' results in empty strings
-    lines = []
-
-    while chunks:
-        cur_line = []  # list of chunks (to-be-joined)
-        cur_len = 0  # length of current line
-
-        while chunks:
-            ell = len(chunks[0])
-            if cur_len + ell <= width:  # can squeeze (at least) this chunk in
-                cur_line.append(chunks[0])
-                del chunks[0]
-                cur_len = cur_len + ell
-            else:  # this line is full
-                # drop last chunk if all space
-                if cur_line and cur_line[-1][0] == ' ':
-                    del cur_line[-1]
-                break
-
-        if chunks:  # any chunks left to process?
-            # if the current line is still empty, then we had a single
-            # chunk that's too big too fit on a line -- so we break
-            # down and break it up at the line width
-            if cur_len == 0:
-                cur_line.append(chunks[0][0:width])
-                chunks[0] = chunks[0][width:]
-
-            # all-whitespace chunks at the end of a line can be discarded
-            # (and we know from the re.split above that if a chunk has
-            # *any* whitespace, it is *all* whitespace)
-            if chunks[0][0] == ' ':
-                del chunks[0]
-
-        # and store this line in the list-of-all-lines -- as a single
-        # string, of course!
-        lines.append(''.join(cur_line))
-
-    return lines
-
-
-def translate_longopt(opt):
-    """Convert a long option name to a valid Python identifier by
-    changing "-" to "_".
-    """
-    return opt.translate(longopt_xlate)
-
-
-class OptionDummy:
-    """Dummy class just used as a place to hold command-line option
-    values as instance attributes."""
-
-    def __init__(self, options: Sequence[Any] = []):
-        """Create a new OptionDummy instance.  The attributes listed in
-        'options' will be initialized to None."""
-        for opt in options:
-            setattr(self, opt, None)
-
-
-if __name__ == "__main__":
-    text = """\
-Tra-la-la, supercalifragilisticexpialidocious.
-How *do* you spell that odd word, anyways?
-(Someone ask Mary -- she'll know [or she'll
-say, "How should I know?"].)"""
-
-    for w in (10, 20, 30, 40):
-        print(f"width: {w}")
-        print("\n".join(wrap_text(text, w)))
-        print()
diff --git a/voxvera/vendor/setuptools/_distutils/file_util.py b/voxvera/vendor/setuptools/_distutils/file_util.py
deleted file mode 100644
index a9724b1..0000000
--- a/voxvera/vendor/setuptools/_distutils/file_util.py
+++ /dev/null
@@ -1,228 +0,0 @@
-"""distutils.file_util
-
-Utility functions for operating on single files.
-"""
-
-import os
-
-from ._log import log
-from .errors import DistutilsFileError
-
-# for generating verbose output in 'copy_file()'
-_copy_action = {None: 'copying', 'hard': 'hard linking', 'sym': 'symbolically linking'}
-
-
-def _copy_file_contents(src, dst, buffer_size=16 * 1024):  # noqa: C901
-    """Copy the file 'src' to 'dst'; both must be filenames.  Any error
-    opening either file, reading from 'src', or writing to 'dst', raises
-    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
-    bytes (default 16k).  No attempt is made to handle anything apart from
-    regular files.
-    """
-    # Stolen from shutil module in the standard library, but with
-    # custom error-handling added.
-    fsrc = None
-    fdst = None
-    try:
-        try:
-            fsrc = open(src, 'rb')
-        except OSError as e:
-            raise DistutilsFileError(f"could not open '{src}': {e.strerror}")
-
-        if os.path.exists(dst):
-            try:
-                os.unlink(dst)
-            except OSError as e:
-                raise DistutilsFileError(f"could not delete '{dst}': {e.strerror}")
-
-        try:
-            fdst = open(dst, 'wb')
-        except OSError as e:
-            raise DistutilsFileError(f"could not create '{dst}': {e.strerror}")
-
-        while True:
-            try:
-                buf = fsrc.read(buffer_size)
-            except OSError as e:
-                raise DistutilsFileError(f"could not read from '{src}': {e.strerror}")
-
-            if not buf:
-                break
-
-            try:
-                fdst.write(buf)
-            except OSError as e:
-                raise DistutilsFileError(f"could not write to '{dst}': {e.strerror}")
-    finally:
-        if fdst:
-            fdst.close()
-        if fsrc:
-            fsrc.close()
-
-
-def copy_file(  # noqa: C901
-    src,
-    dst,
-    preserve_mode=True,
-    preserve_times=True,
-    update=False,
-    link=None,
-    verbose=True,
-):
-    """Copy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
-    copied there with the same name; otherwise, it must be a filename.  (If
-    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
-    is true (the default), the file's mode (type and permission bits, or
-    whatever is analogous on the current platform) is copied.  If
-    'preserve_times' is true (the default), the last-modified and
-    last-access times are copied as well.  If 'update' is true, 'src' will
-    only be copied if 'dst' does not exist, or if 'dst' does exist but is
-    older than 'src'.
-
-    'link' allows you to make hard links (os.link) or symbolic links
-    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
-    None (the default), files are copied.  Don't set 'link' on systems that
-    don't support it: 'copy_file()' doesn't check if hard or symbolic
-    linking is available. If hardlink fails, falls back to
-    _copy_file_contents().
-
-    Under Mac OS, uses the native file copy function in macostools; on
-    other systems, uses '_copy_file_contents()' to copy file contents.
-
-    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
-    the output file, and 'copied' is true if the file was copied.
-    """
-    # XXX if the destination file already exists, we clobber it if
-    # copying, but blow up if linking.  Hmmm.  And I don't know what
-    # macostools.copyfile() does.  Should definitely be consistent, and
-    # should probably blow up if destination exists and we would be
-    # changing it (ie. it's not already a hard/soft link to src OR
-    # (not update) and (src newer than dst).
-
-    from distutils._modified import newer
-    from stat import S_IMODE, ST_ATIME, ST_MODE, ST_MTIME
-
-    if not os.path.isfile(src):
-        raise DistutilsFileError(
-            f"can't copy '{src}': doesn't exist or not a regular file"
-        )
-
-    if os.path.isdir(dst):
-        dir = dst
-        dst = os.path.join(dst, os.path.basename(src))
-    else:
-        dir = os.path.dirname(dst)
-
-    if update and not newer(src, dst):
-        if verbose >= 1:
-            log.debug("not copying %s (output up-to-date)", src)
-        return (dst, False)
-
-    try:
-        action = _copy_action[link]
-    except KeyError:
-        raise ValueError(f"invalid value '{link}' for 'link' argument")
-
-    if verbose >= 1:
-        if os.path.basename(dst) == os.path.basename(src):
-            log.info("%s %s -> %s", action, src, dir)
-        else:
-            log.info("%s %s -> %s", action, src, dst)
-
-    # If linking (hard or symbolic), use the appropriate system call
-    # (Unix only, of course, but that's the caller's responsibility)
-    if link == 'hard':
-        if not (os.path.exists(dst) and os.path.samefile(src, dst)):
-            try:
-                os.link(src, dst)
-            except OSError:
-                # If hard linking fails, fall back on copying file
-                # (some special filesystems don't support hard linking
-                #  even under Unix, see issue #8876).
-                pass
-            else:
-                return (dst, True)
-    elif link == 'sym':
-        if not (os.path.exists(dst) and os.path.samefile(src, dst)):
-            os.symlink(src, dst)
-            return (dst, True)
-
-    # Otherwise (non-Mac, not linking), copy the file contents and
-    # (optionally) copy the times and mode.
-    _copy_file_contents(src, dst)
-    if preserve_mode or preserve_times:
-        st = os.stat(src)
-
-        # According to David Ascher , utime() should be done
-        # before chmod() (at least under NT).
-        if preserve_times:
-            os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
-        if preserve_mode:
-            os.chmod(dst, S_IMODE(st[ST_MODE]))
-
-    return (dst, True)
-
-
-# XXX I suspect this is Unix-specific -- need porting help!
-def move_file(src, dst, verbose=True):  # noqa: C901
-    """Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
-    be moved into it with the same name; otherwise, 'src' is just renamed
-    to 'dst'.  Return the new full name of the file.
-
-    Handles cross-device moves on Unix using 'copy_file()'.  What about
-    other systems???
-    """
-    import errno
-    from os.path import basename, dirname, exists, isdir, isfile
-
-    if verbose >= 1:
-        log.info("moving %s -> %s", src, dst)
-
-    if not isfile(src):
-        raise DistutilsFileError(f"can't move '{src}': not a regular file")
-
-    if isdir(dst):
-        dst = os.path.join(dst, basename(src))
-    elif exists(dst):
-        raise DistutilsFileError(
-            f"can't move '{src}': destination '{dst}' already exists"
-        )
-
-    if not isdir(dirname(dst)):
-        raise DistutilsFileError(
-            f"can't move '{src}': destination '{dst}' not a valid path"
-        )
-
-    copy_it = False
-    try:
-        os.rename(src, dst)
-    except OSError as e:
-        (num, msg) = e.args
-        if num == errno.EXDEV:
-            copy_it = True
-        else:
-            raise DistutilsFileError(f"couldn't move '{src}' to '{dst}': {msg}")
-
-    if copy_it:
-        copy_file(src, dst, verbose=verbose)
-        try:
-            os.unlink(src)
-        except OSError as e:
-            (num, msg) = e.args
-            try:
-                os.unlink(dst)
-            except OSError:
-                pass
-            raise DistutilsFileError(
-                f"couldn't move '{src}' to '{dst}' by copy/delete: "
-                f"delete '{src}' failed: {msg}"
-            )
-    return dst
-
-
-def write_file(filename, contents):
-    """Create a file with the specified name and write 'contents' (a
-    sequence of strings without line terminators) to it.
-    """
-    with open(filename, 'w', encoding='utf-8') as f:
-        f.writelines(line + '\n' for line in contents)
diff --git a/voxvera/vendor/setuptools/_distutils/filelist.py b/voxvera/vendor/setuptools/_distutils/filelist.py
deleted file mode 100644
index 70dc0fd..0000000
--- a/voxvera/vendor/setuptools/_distutils/filelist.py
+++ /dev/null
@@ -1,431 +0,0 @@
-"""distutils.filelist
-
-Provides the FileList class, used for poking about the filesystem
-and building lists of files.
-"""
-
-from __future__ import annotations
-
-import fnmatch
-import functools
-import os
-import re
-from collections.abc import Iterable
-from typing import Literal, overload
-
-from ._log import log
-from .errors import DistutilsInternalError, DistutilsTemplateError
-from .util import convert_path
-
-
-class FileList:
-    """A list of files built by on exploring the filesystem and filtered by
-    applying various patterns to what we find there.
-
-    Instance attributes:
-      dir
-        directory from which files will be taken -- only used if
-        'allfiles' not supplied to constructor
-      files
-        list of filenames currently being built/filtered/manipulated
-      allfiles
-        complete list of files under consideration (ie. without any
-        filtering applied)
-    """
-
-    def __init__(self, warn: object = None, debug_print: object = None) -> None:
-        # ignore argument to FileList, but keep them for backwards
-        # compatibility
-        self.allfiles: Iterable[str] | None = None
-        self.files: list[str] = []
-
-    def set_allfiles(self, allfiles: Iterable[str]) -> None:
-        self.allfiles = allfiles
-
-    def findall(self, dir: str | os.PathLike[str] = os.curdir) -> None:
-        self.allfiles = findall(dir)
-
-    def debug_print(self, msg: object) -> None:
-        """Print 'msg' to stdout if the global DEBUG (taken from the
-        DISTUTILS_DEBUG environment variable) flag is true.
-        """
-        from distutils.debug import DEBUG
-
-        if DEBUG:
-            print(msg)
-
-    # Collection methods
-
-    def append(self, item: str) -> None:
-        self.files.append(item)
-
-    def extend(self, items: Iterable[str]) -> None:
-        self.files.extend(items)
-
-    def sort(self) -> None:
-        # Not a strict lexical sort!
-        sortable_files = sorted(map(os.path.split, self.files))
-        self.files = []
-        for sort_tuple in sortable_files:
-            self.files.append(os.path.join(*sort_tuple))
-
-    # Other miscellaneous utility methods
-
-    def remove_duplicates(self) -> None:
-        # Assumes list has been sorted!
-        for i in range(len(self.files) - 1, 0, -1):
-            if self.files[i] == self.files[i - 1]:
-                del self.files[i]
-
-    # "File template" methods
-
-    def _parse_template_line(self, line):
-        words = line.split()
-        action = words[0]
-
-        patterns = dir = dir_pattern = None
-
-        if action in ('include', 'exclude', 'global-include', 'global-exclude'):
-            if len(words) < 2:
-                raise DistutilsTemplateError(
-                    f"'{action}' expects   ..."
-                )
-            patterns = [convert_path(w) for w in words[1:]]
-        elif action in ('recursive-include', 'recursive-exclude'):
-            if len(words) < 3:
-                raise DistutilsTemplateError(
-                    f"'{action}' expects    ..."
-                )
-            dir = convert_path(words[1])
-            patterns = [convert_path(w) for w in words[2:]]
-        elif action in ('graft', 'prune'):
-            if len(words) != 2:
-                raise DistutilsTemplateError(
-                    f"'{action}' expects a single "
-                )
-            dir_pattern = convert_path(words[1])
-        else:
-            raise DistutilsTemplateError(f"unknown action '{action}'")
-
-        return (action, patterns, dir, dir_pattern)
-
-    def process_template_line(self, line: str) -> None:  # noqa: C901
-        # Parse the line: split it up, make sure the right number of words
-        # is there, and return the relevant words.  'action' is always
-        # defined: it's the first word of the line.  Which of the other
-        # three are defined depends on the action; it'll be either
-        # patterns, (dir and patterns), or (dir_pattern).
-        (action, patterns, dir, dir_pattern) = self._parse_template_line(line)
-
-        # OK, now we know that the action is valid and we have the
-        # right number of words on the line for that action -- so we
-        # can proceed with minimal error-checking.
-        if action == 'include':
-            self.debug_print("include " + ' '.join(patterns))
-            for pattern in patterns:
-                if not self.include_pattern(pattern, anchor=True):
-                    log.warning("warning: no files found matching '%s'", pattern)
-
-        elif action == 'exclude':
-            self.debug_print("exclude " + ' '.join(patterns))
-            for pattern in patterns:
-                if not self.exclude_pattern(pattern, anchor=True):
-                    log.warning(
-                        "warning: no previously-included files found matching '%s'",
-                        pattern,
-                    )
-
-        elif action == 'global-include':
-            self.debug_print("global-include " + ' '.join(patterns))
-            for pattern in patterns:
-                if not self.include_pattern(pattern, anchor=False):
-                    log.warning(
-                        (
-                            "warning: no files found matching '%s' "
-                            "anywhere in distribution"
-                        ),
-                        pattern,
-                    )
-
-        elif action == 'global-exclude':
-            self.debug_print("global-exclude " + ' '.join(patterns))
-            for pattern in patterns:
-                if not self.exclude_pattern(pattern, anchor=False):
-                    log.warning(
-                        (
-                            "warning: no previously-included files matching "
-                            "'%s' found anywhere in distribution"
-                        ),
-                        pattern,
-                    )
-
-        elif action == 'recursive-include':
-            self.debug_print("recursive-include {} {}".format(dir, ' '.join(patterns)))
-            for pattern in patterns:
-                if not self.include_pattern(pattern, prefix=dir):
-                    msg = "warning: no files found matching '%s' under directory '%s'"
-                    log.warning(msg, pattern, dir)
-
-        elif action == 'recursive-exclude':
-            self.debug_print("recursive-exclude {} {}".format(dir, ' '.join(patterns)))
-            for pattern in patterns:
-                if not self.exclude_pattern(pattern, prefix=dir):
-                    log.warning(
-                        (
-                            "warning: no previously-included files matching "
-                            "'%s' found under directory '%s'"
-                        ),
-                        pattern,
-                        dir,
-                    )
-
-        elif action == 'graft':
-            self.debug_print("graft " + dir_pattern)
-            if not self.include_pattern(None, prefix=dir_pattern):
-                log.warning("warning: no directories found matching '%s'", dir_pattern)
-
-        elif action == 'prune':
-            self.debug_print("prune " + dir_pattern)
-            if not self.exclude_pattern(None, prefix=dir_pattern):
-                log.warning(
-                    ("no previously-included directories found matching '%s'"),
-                    dir_pattern,
-                )
-        else:
-            raise DistutilsInternalError(
-                f"this cannot happen: invalid action '{action}'"
-            )
-
-    # Filtering/selection methods
-    @overload
-    def include_pattern(
-        self,
-        pattern: str,
-        anchor: bool = True,
-        prefix: str | None = None,
-        is_regex: Literal[False] = False,
-    ) -> bool: ...
-    @overload
-    def include_pattern(
-        self,
-        pattern: str | re.Pattern[str],
-        anchor: bool = True,
-        prefix: str | None = None,
-        *,
-        is_regex: Literal[True],
-    ) -> bool: ...
-    @overload
-    def include_pattern(
-        self,
-        pattern: str | re.Pattern[str],
-        anchor: bool,
-        prefix: str | None,
-        is_regex: Literal[True],
-    ) -> bool: ...
-    def include_pattern(
-        self,
-        pattern: str | re.Pattern,
-        anchor: bool = True,
-        prefix: str | None = None,
-        is_regex: bool = False,
-    ) -> bool:
-        """Select strings (presumably filenames) from 'self.files' that
-        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
-        are not quite the same as implemented by the 'fnmatch' module: '*'
-        and '?'  match non-special characters, where "special" is platform-
-        dependent: slash on Unix; colon, slash, and backslash on
-        DOS/Windows; and colon on Mac OS.
-
-        If 'anchor' is true (the default), then the pattern match is more
-        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
-        'anchor' is false, both of these will match.
-
-        If 'prefix' is supplied, then only filenames starting with 'prefix'
-        (itself a pattern) and ending with 'pattern', with anything in between
-        them, will match.  'anchor' is ignored in this case.
-
-        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
-        'pattern' is assumed to be either a string containing a regex or a
-        regex object -- no translation is done, the regex is just compiled
-        and used as-is.
-
-        Selected strings will be added to self.files.
-
-        Return True if files are found, False otherwise.
-        """
-        # XXX docstring lying about what the special chars are?
-        files_found = False
-        pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
-        self.debug_print(f"include_pattern: applying regex r'{pattern_re.pattern}'")
-
-        # delayed loading of allfiles list
-        if self.allfiles is None:
-            self.findall()
-
-        for name in self.allfiles:
-            if pattern_re.search(name):
-                self.debug_print(" adding " + name)
-                self.files.append(name)
-                files_found = True
-        return files_found
-
-    @overload
-    def exclude_pattern(
-        self,
-        pattern: str,
-        anchor: bool = True,
-        prefix: str | None = None,
-        is_regex: Literal[False] = False,
-    ) -> bool: ...
-    @overload
-    def exclude_pattern(
-        self,
-        pattern: str | re.Pattern[str],
-        anchor: bool = True,
-        prefix: str | None = None,
-        *,
-        is_regex: Literal[True],
-    ) -> bool: ...
-    @overload
-    def exclude_pattern(
-        self,
-        pattern: str | re.Pattern[str],
-        anchor: bool,
-        prefix: str | None,
-        is_regex: Literal[True],
-    ) -> bool: ...
-    def exclude_pattern(
-        self,
-        pattern: str | re.Pattern,
-        anchor: bool = True,
-        prefix: str | None = None,
-        is_regex: bool = False,
-    ) -> bool:
-        """Remove strings (presumably filenames) from 'files' that match
-        'pattern'.  Other parameters are the same as for
-        'include_pattern()', above.
-        The list 'self.files' is modified in place.
-        Return True if files are found, False otherwise.
-        """
-        files_found = False
-        pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
-        self.debug_print(f"exclude_pattern: applying regex r'{pattern_re.pattern}'")
-        for i in range(len(self.files) - 1, -1, -1):
-            if pattern_re.search(self.files[i]):
-                self.debug_print(" removing " + self.files[i])
-                del self.files[i]
-                files_found = True
-        return files_found
-
-
-# Utility functions
-
-
-def _find_all_simple(path):
-    """
-    Find all files under 'path'
-    """
-    all_unique = _UniqueDirs.filter(os.walk(path, followlinks=True))
-    results = (
-        os.path.join(base, file) for base, dirs, files in all_unique for file in files
-    )
-    return filter(os.path.isfile, results)
-
-
-class _UniqueDirs(set):
-    """
-    Exclude previously-seen dirs from walk results,
-    avoiding infinite recursion.
-    Ref https://bugs.python.org/issue44497.
-    """
-
-    def __call__(self, walk_item):
-        """
-        Given an item from an os.walk result, determine
-        if the item represents a unique dir for this instance
-        and if not, prevent further traversal.
-        """
-        base, dirs, files = walk_item
-        stat = os.stat(base)
-        candidate = stat.st_dev, stat.st_ino
-        found = candidate in self
-        if found:
-            del dirs[:]
-        self.add(candidate)
-        return not found
-
-    @classmethod
-    def filter(cls, items):
-        return filter(cls(), items)
-
-
-def findall(dir: str | os.PathLike[str] = os.curdir):
-    """
-    Find all files under 'dir' and return the list of full filenames.
-    Unless dir is '.', return full filenames with dir prepended.
-    """
-    files = _find_all_simple(dir)
-    if dir == os.curdir:
-        make_rel = functools.partial(os.path.relpath, start=dir)
-        files = map(make_rel, files)
-    return list(files)
-
-
-def glob_to_re(pattern):
-    """Translate a shell-like glob pattern to a regular expression; return
-    a string containing the regex.  Differs from 'fnmatch.translate()' in
-    that '*' does not match "special characters" (which are
-    platform-specific).
-    """
-    pattern_re = fnmatch.translate(pattern)
-
-    # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
-    # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
-    # and by extension they shouldn't match such "special characters" under
-    # any OS.  So change all non-escaped dots in the RE to match any
-    # character except the special characters (currently: just os.sep).
-    sep = os.sep
-    if os.sep == '\\':
-        # we're using a regex to manipulate a regex, so we need
-        # to escape the backslash twice
-        sep = r'\\\\'
-    escaped = rf'\1[^{sep}]'
-    pattern_re = re.sub(r'((?= 2:
-        set_threshold(logging.DEBUG)
-
-
-class Log(logging.Logger):
-    """distutils.log.Log is deprecated, please use an alternative from `logging`."""
-
-    def __init__(self, threshold=WARN):
-        warnings.warn(Log.__doc__)  # avoid DeprecationWarning to ensure warn is shown
-        super().__init__(__name__, level=threshold)
-
-    @property
-    def threshold(self):
-        return self.level
-
-    @threshold.setter
-    def threshold(self, level):
-        self.setLevel(level)
-
-    warn = logging.Logger.warning
diff --git a/voxvera/vendor/setuptools/_distutils/spawn.py b/voxvera/vendor/setuptools/_distutils/spawn.py
deleted file mode 100644
index e47f1d1..0000000
--- a/voxvera/vendor/setuptools/_distutils/spawn.py
+++ /dev/null
@@ -1,130 +0,0 @@
-"""distutils.spawn
-
-Provides the 'spawn()' function, a front-end to various platform-
-specific functions for launching another program in a sub-process.
-"""
-
-from __future__ import annotations
-
-import os
-import platform
-import shutil
-import subprocess
-import sys
-import warnings
-from collections.abc import Mapping, MutableSequence
-from typing import TYPE_CHECKING, TypeVar, overload
-
-from ._log import log
-from .debug import DEBUG
-from .errors import DistutilsExecError
-
-if TYPE_CHECKING:
-    from subprocess import _ENV
-
-
-_MappingT = TypeVar("_MappingT", bound=Mapping)
-
-
-def _debug(cmd):
-    """
-    Render a subprocess command differently depending on DEBUG.
-    """
-    return cmd if DEBUG else cmd[0]
-
-
-def _inject_macos_ver(env: _MappingT | None) -> _MappingT | dict[str, str | int] | None:
-    if platform.system() != 'Darwin':
-        return env
-
-    from .util import MACOSX_VERSION_VAR, get_macosx_target_ver
-
-    target_ver = get_macosx_target_ver()
-    update = {MACOSX_VERSION_VAR: target_ver} if target_ver else {}
-    return {**_resolve(env), **update}
-
-
-@overload
-def _resolve(env: None) -> os._Environ[str]: ...
-@overload
-def _resolve(env: _MappingT) -> _MappingT: ...
-def _resolve(env: _MappingT | None) -> _MappingT | os._Environ[str]:
-    return os.environ if env is None else env
-
-
-def spawn(
-    cmd: MutableSequence[bytes | str | os.PathLike[str]],
-    search_path: bool = True,
-    verbose: bool = False,
-    env: _ENV | None = None,
-) -> None:
-    """Run another program, specified as a command list 'cmd', in a new process.
-
-    'cmd' is just the argument list for the new process, ie.
-    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
-    There is no way to run a program with a name different from that of its
-    executable.
-
-    If 'search_path' is true (the default), the system's executable
-    search path will be used to find the program; otherwise, cmd[0]
-    must be the exact path to the executable.
-
-    Raise DistutilsExecError if running the program fails in any way; just
-    return on success.
-    """
-    log.info(subprocess.list2cmdline(cmd))
-
-    if search_path:
-        executable = shutil.which(cmd[0])
-        if executable is not None:
-            cmd[0] = executable
-
-    try:
-        subprocess.check_call(cmd, env=_inject_macos_ver(env))
-    except OSError as exc:
-        raise DistutilsExecError(
-            f"command {_debug(cmd)!r} failed: {exc.args[-1]}"
-        ) from exc
-    except subprocess.CalledProcessError as err:
-        raise DistutilsExecError(
-            f"command {_debug(cmd)!r} failed with exit code {err.returncode}"
-        ) from err
-
-
-def find_executable(executable: str, path: str | None = None) -> str | None:
-    """Tries to find 'executable' in the directories listed in 'path'.
-
-    A string listing directories separated by 'os.pathsep'; defaults to
-    os.environ['PATH'].  Returns the complete filename or None if not found.
-    """
-    warnings.warn(
-        'Use shutil.which instead of find_executable', DeprecationWarning, stacklevel=2
-    )
-    _, ext = os.path.splitext(executable)
-    if (sys.platform == 'win32') and (ext != '.exe'):
-        executable = executable + '.exe'
-
-    if os.path.isfile(executable):
-        return executable
-
-    if path is None:
-        path = os.environ.get('PATH', None)
-        # bpo-35755: Don't fall through if PATH is the empty string
-        if path is None:
-            try:
-                path = os.confstr("CS_PATH")
-            except (AttributeError, ValueError):
-                # os.confstr() or CS_PATH is not available
-                path = os.defpath
-
-    # PATH='' doesn't match, whereas PATH=':' looks in the current directory
-    if not path:
-        return None
-
-    paths = path.split(os.pathsep)
-    for p in paths:
-        f = os.path.join(p, executable)
-        if os.path.isfile(f):
-            # the file exists, we have a shot at spawn working
-            return f
-    return None
diff --git a/voxvera/vendor/setuptools/_distutils/sysconfig.py b/voxvera/vendor/setuptools/_distutils/sysconfig.py
deleted file mode 100644
index 7ddc869..0000000
--- a/voxvera/vendor/setuptools/_distutils/sysconfig.py
+++ /dev/null
@@ -1,598 +0,0 @@
-"""Provide access to Python's configuration information.  The specific
-configuration variables available depend heavily on the platform and
-configuration.  The values may be retrieved using
-get_config_var(name), and the list of variables is available via
-get_config_vars().keys().  Additional convenience functions are also
-available.
-
-Written by:   Fred L. Drake, Jr.
-Email:        
-"""
-
-from __future__ import annotations
-
-import functools
-import os
-import pathlib
-import re
-import sys
-import sysconfig
-from typing import TYPE_CHECKING, Literal, overload
-
-from jaraco.functools import pass_none
-
-from .ccompiler import CCompiler
-from .compat import py39
-from .errors import DistutilsPlatformError
-from .util import is_mingw
-
-if TYPE_CHECKING:
-    from typing_extensions import deprecated
-else:
-
-    def deprecated(message):
-        return lambda fn: fn
-
-
-IS_PYPY = '__pypy__' in sys.builtin_module_names
-
-# These are needed in a couple of spots, so just compute them once.
-PREFIX = os.path.normpath(sys.prefix)
-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-BASE_PREFIX = os.path.normpath(sys.base_prefix)
-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
-
-# Path to the base directory of the project. On Windows the binary may
-# live in project/PCbuild/win32 or project/PCbuild/amd64.
-# set for cross builds
-if "_PYTHON_PROJECT_BASE" in os.environ:
-    project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"])
-else:
-    if sys.executable:
-        project_base = os.path.dirname(os.path.abspath(sys.executable))
-    else:
-        # sys.executable can be empty if argv[0] has been changed and Python is
-        # unable to retrieve the real program name
-        project_base = os.getcwd()
-
-
-def _is_python_source_dir(d):
-    """
-    Return True if the target directory appears to point to an
-    un-installed Python.
-    """
-    modules = pathlib.Path(d).joinpath('Modules')
-    return any(modules.joinpath(fn).is_file() for fn in ('Setup', 'Setup.local'))
-
-
-_sys_home = getattr(sys, '_home', None)
-
-
-def _is_parent(dir_a, dir_b):
-    """
-    Return True if a is a parent of b.
-    """
-    return os.path.normcase(dir_a).startswith(os.path.normcase(dir_b))
-
-
-if os.name == 'nt':
-
-    @pass_none
-    def _fix_pcbuild(d):
-        # In a venv, sys._home will be inside BASE_PREFIX rather than PREFIX.
-        prefixes = PREFIX, BASE_PREFIX
-        matched = (
-            prefix
-            for prefix in prefixes
-            if _is_parent(d, os.path.join(prefix, "PCbuild"))
-        )
-        return next(matched, d)
-
-    project_base = _fix_pcbuild(project_base)
-    _sys_home = _fix_pcbuild(_sys_home)
-
-
-def _python_build():
-    if _sys_home:
-        return _is_python_source_dir(_sys_home)
-    return _is_python_source_dir(project_base)
-
-
-python_build = _python_build()
-
-
-# Calculate the build qualifier flags if they are defined.  Adding the flags
-# to the include and lib directories only makes sense for an installation, not
-# an in-source build.
-build_flags = ''
-try:
-    if not python_build:
-        build_flags = sys.abiflags
-except AttributeError:
-    # It's not a configure-based build, so the sys module doesn't have
-    # this attribute, which is fine.
-    pass
-
-
-def get_python_version():
-    """Return a string containing the major and minor Python version,
-    leaving off the patchlevel.  Sample return values could be '1.5'
-    or '2.2'.
-    """
-    return f'{sys.version_info.major}.{sys.version_info.minor}'
-
-
-def get_python_inc(plat_specific: bool = False, prefix: str | None = None) -> str:
-    """Return the directory containing installed Python header files.
-
-    If 'plat_specific' is false (the default), this is the path to the
-    non-platform-specific header files, i.e. Python.h and so on;
-    otherwise, this is the path to platform-specific header files
-    (namely pyconfig.h).
-
-    If 'prefix' is supplied, use it instead of sys.base_prefix or
-    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
-    """
-    default_prefix = BASE_EXEC_PREFIX if plat_specific else BASE_PREFIX
-    resolved_prefix = prefix if prefix is not None else default_prefix
-    # MinGW imitates posix like layout, but os.name != posix
-    os_name = "posix" if is_mingw() else os.name
-    try:
-        getter = globals()[f'_get_python_inc_{os_name}']
-    except KeyError:
-        raise DistutilsPlatformError(
-            "I don't know where Python installs its C header files "
-            f"on platform '{os.name}'"
-        )
-    return getter(resolved_prefix, prefix, plat_specific)
-
-
-@pass_none
-def _extant(path):
-    """
-    Replace path with None if it doesn't exist.
-    """
-    return path if os.path.exists(path) else None
-
-
-def _get_python_inc_posix(prefix, spec_prefix, plat_specific):
-    return (
-        _get_python_inc_posix_python(plat_specific)
-        or _extant(_get_python_inc_from_config(plat_specific, spec_prefix))
-        or _get_python_inc_posix_prefix(prefix)
-    )
-
-
-def _get_python_inc_posix_python(plat_specific):
-    """
-    Assume the executable is in the build directory. The
-    pyconfig.h file should be in the same directory. Since
-    the build directory may not be the source directory,
-    use "srcdir" from the makefile to find the "Include"
-    directory.
-    """
-    if not python_build:
-        return
-    if plat_specific:
-        return _sys_home or project_base
-    incdir = os.path.join(get_config_var('srcdir'), 'Include')
-    return os.path.normpath(incdir)
-
-
-def _get_python_inc_from_config(plat_specific, spec_prefix):
-    """
-    If no prefix was explicitly specified, provide the include
-    directory from the config vars. Useful when
-    cross-compiling, since the config vars may come from
-    the host
-    platform Python installation, while the current Python
-    executable is from the build platform installation.
-
-    >>> monkeypatch = getfixture('monkeypatch')
-    >>> gpifc = _get_python_inc_from_config
-    >>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower)
-    >>> gpifc(False, '/usr/bin/')
-    >>> gpifc(False, '')
-    >>> gpifc(False, None)
-    'includepy'
-    >>> gpifc(True, None)
-    'confincludepy'
-    """
-    if spec_prefix is None:
-        return get_config_var('CONF' * plat_specific + 'INCLUDEPY')
-
-
-def _get_python_inc_posix_prefix(prefix):
-    implementation = 'pypy' if IS_PYPY else 'python'
-    python_dir = implementation + get_python_version() + build_flags
-    return os.path.join(prefix, "include", python_dir)
-
-
-def _get_python_inc_nt(prefix, spec_prefix, plat_specific):
-    if python_build:
-        # Include both include dirs to ensure we can find pyconfig.h
-        return (
-            os.path.join(prefix, "include")
-            + os.path.pathsep
-            + os.path.dirname(sysconfig.get_config_h_filename())
-        )
-    return os.path.join(prefix, "include")
-
-
-# allow this behavior to be monkey-patched. Ref pypa/distutils#2.
-def _posix_lib(standard_lib, libpython, early_prefix, prefix):
-    if standard_lib:
-        return libpython
-    else:
-        return os.path.join(libpython, "site-packages")
-
-
-def get_python_lib(
-    plat_specific: bool = False, standard_lib: bool = False, prefix: str | None = None
-) -> str:
-    """Return the directory containing the Python library (standard or
-    site additions).
-
-    If 'plat_specific' is true, return the directory containing
-    platform-specific modules, i.e. any module from a non-pure-Python
-    module distribution; otherwise, return the platform-shared library
-    directory.  If 'standard_lib' is true, return the directory
-    containing standard Python library modules; otherwise, return the
-    directory for site-specific modules.
-
-    If 'prefix' is supplied, use it instead of sys.base_prefix or
-    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
-    """
-
-    early_prefix = prefix
-
-    if prefix is None:
-        if standard_lib:
-            prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
-        else:
-            prefix = plat_specific and EXEC_PREFIX or PREFIX
-
-    if os.name == "posix" or is_mingw():
-        if plat_specific or standard_lib:
-            # Platform-specific modules (any module from a non-pure-Python
-            # module distribution) or standard Python library modules.
-            libdir = getattr(sys, "platlibdir", "lib")
-        else:
-            # Pure Python
-            libdir = "lib"
-        implementation = 'pypy' if IS_PYPY else 'python'
-        libpython = os.path.join(prefix, libdir, implementation + get_python_version())
-        return _posix_lib(standard_lib, libpython, early_prefix, prefix)
-    elif os.name == "nt":
-        if standard_lib:
-            return os.path.join(prefix, "Lib")
-        else:
-            return os.path.join(prefix, "Lib", "site-packages")
-    else:
-        raise DistutilsPlatformError(
-            f"I don't know where Python installs its library on platform '{os.name}'"
-        )
-
-
-@functools.lru_cache
-def _customize_macos():
-    """
-    Perform first-time customization of compiler-related
-    config vars on macOS. Use after a compiler is known
-    to be needed. This customization exists primarily to support Pythons
-    from binary installers. The kind and paths to build tools on
-    the user system may vary significantly from the system
-    that Python itself was built on.  Also the user OS
-    version and build tools may not support the same set
-    of CPU architectures for universal builds.
-    """
-
-    sys.platform == "darwin" and __import__('_osx_support').customize_compiler(
-        get_config_vars()
-    )
-
-
-def customize_compiler(compiler: CCompiler) -> None:
-    """Do any platform-specific customization of a CCompiler instance.
-
-    Mainly needed on Unix, so we can plug in the information that
-    varies across Unices and is stored in Python's Makefile.
-    """
-    if compiler.compiler_type in ["unix", "cygwin"] or (
-        compiler.compiler_type == "mingw32" and is_mingw()
-    ):
-        _customize_macos()
-
-        (
-            cc,
-            cxx,
-            cflags,
-            ccshared,
-            ldshared,
-            ldcxxshared,
-            shlib_suffix,
-            ar,
-            ar_flags,
-        ) = get_config_vars(
-            'CC',
-            'CXX',
-            'CFLAGS',
-            'CCSHARED',
-            'LDSHARED',
-            'LDCXXSHARED',
-            'SHLIB_SUFFIX',
-            'AR',
-            'ARFLAGS',
-        )
-
-        cxxflags = cflags
-
-        if 'CC' in os.environ:
-            newcc = os.environ['CC']
-            if 'LDSHARED' not in os.environ and ldshared.startswith(cc):
-                # If CC is overridden, use that as the default
-                #       command for LDSHARED as well
-                ldshared = newcc + ldshared[len(cc) :]
-            cc = newcc
-        cxx = os.environ.get('CXX', cxx)
-        ldshared = os.environ.get('LDSHARED', ldshared)
-        ldcxxshared = os.environ.get('LDCXXSHARED', ldcxxshared)
-        cpp = os.environ.get(
-            'CPP',
-            cc + " -E",  # not always
-        )
-
-        ldshared = _add_flags(ldshared, 'LD')
-        ldcxxshared = _add_flags(ldcxxshared, 'LD')
-        cflags = os.environ.get('CFLAGS', cflags)
-        ldshared = _add_flags(ldshared, 'C')
-        cxxflags = os.environ.get('CXXFLAGS', cxxflags)
-        ldcxxshared = _add_flags(ldcxxshared, 'CXX')
-        cpp = _add_flags(cpp, 'CPP')
-        cflags = _add_flags(cflags, 'CPP')
-        cxxflags = _add_flags(cxxflags, 'CPP')
-        ldshared = _add_flags(ldshared, 'CPP')
-        ldcxxshared = _add_flags(ldcxxshared, 'CPP')
-
-        ar = os.environ.get('AR', ar)
-
-        archiver = ar + ' ' + os.environ.get('ARFLAGS', ar_flags)
-        cc_cmd = cc + ' ' + cflags
-        cxx_cmd = cxx + ' ' + cxxflags
-
-        compiler.set_executables(
-            preprocessor=cpp,
-            compiler=cc_cmd,
-            compiler_so=cc_cmd + ' ' + ccshared,
-            compiler_cxx=cxx_cmd,
-            compiler_so_cxx=cxx_cmd + ' ' + ccshared,
-            linker_so=ldshared,
-            linker_so_cxx=ldcxxshared,
-            linker_exe=cc,
-            linker_exe_cxx=cxx,
-            archiver=archiver,
-        )
-
-        if 'RANLIB' in os.environ and compiler.executables.get('ranlib', None):
-            compiler.set_executables(ranlib=os.environ['RANLIB'])
-
-        compiler.shared_lib_extension = shlib_suffix
-
-
-def get_config_h_filename() -> str:
-    """Return full pathname of installed pyconfig.h file."""
-    return sysconfig.get_config_h_filename()
-
-
-def get_makefile_filename() -> str:
-    """Return full pathname of installed Makefile from the Python build."""
-    return sysconfig.get_makefile_filename()
-
-
-def parse_config_h(fp, g=None):
-    """Parse a config.h-style file.
-
-    A dictionary containing name/value pairs is returned.  If an
-    optional dictionary is passed in as the second argument, it is
-    used instead of a new dictionary.
-    """
-    return sysconfig.parse_config_h(fp, vars=g)
-
-
-# Regexes needed for parsing Makefile (and similar syntaxes,
-# like old-style Setup files).
-_variable_rx = re.compile(r"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
-_findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
-_findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")
-
-
-def parse_makefile(fn, g=None):  # noqa: C901
-    """Parse a Makefile-style file.
-
-    A dictionary containing name/value pairs is returned.  If an
-    optional dictionary is passed in as the second argument, it is
-    used instead of a new dictionary.
-    """
-    from distutils.text_file import TextFile
-
-    fp = TextFile(
-        fn,
-        strip_comments=True,
-        skip_blanks=True,
-        join_lines=True,
-        errors="surrogateescape",
-    )
-
-    if g is None:
-        g = {}
-    done = {}
-    notdone = {}
-
-    while True:
-        line = fp.readline()
-        if line is None:  # eof
-            break
-        m = _variable_rx.match(line)
-        if m:
-            n, v = m.group(1, 2)
-            v = v.strip()
-            # `$$' is a literal `$' in make
-            tmpv = v.replace('$$', '')
-
-            if "$" in tmpv:
-                notdone[n] = v
-            else:
-                try:
-                    v = int(v)
-                except ValueError:
-                    # insert literal `$'
-                    done[n] = v.replace('$$', '$')
-                else:
-                    done[n] = v
-
-    # Variables with a 'PY_' prefix in the makefile. These need to
-    # be made available without that prefix through sysconfig.
-    # Special care is needed to ensure that variable expansion works, even
-    # if the expansion uses the name without a prefix.
-    renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')
-
-    # do variable interpolation here
-    while notdone:
-        for name in list(notdone):
-            value = notdone[name]
-            m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
-            if m:
-                n = m.group(1)
-                found = True
-                if n in done:
-                    item = str(done[n])
-                elif n in notdone:
-                    # get it on a subsequent round
-                    found = False
-                elif n in os.environ:
-                    # do it like make: fall back to environment
-                    item = os.environ[n]
-
-                elif n in renamed_variables:
-                    if name.startswith('PY_') and name[3:] in renamed_variables:
-                        item = ""
-
-                    elif 'PY_' + n in notdone:
-                        found = False
-
-                    else:
-                        item = str(done['PY_' + n])
-                else:
-                    done[n] = item = ""
-                if found:
-                    after = value[m.end() :]
-                    value = value[: m.start()] + item + after
-                    if "$" in after:
-                        notdone[name] = value
-                    else:
-                        try:
-                            value = int(value)
-                        except ValueError:
-                            done[name] = value.strip()
-                        else:
-                            done[name] = value
-                        del notdone[name]
-
-                        if name.startswith('PY_') and name[3:] in renamed_variables:
-                            name = name[3:]
-                            if name not in done:
-                                done[name] = value
-            else:
-                # bogus variable reference; just drop it since we can't deal
-                del notdone[name]
-
-    fp.close()
-
-    # strip spurious spaces
-    for k, v in done.items():
-        if isinstance(v, str):
-            done[k] = v.strip()
-
-    # save the results in the global dictionary
-    g.update(done)
-    return g
-
-
-def expand_makefile_vars(s, vars):
-    """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
-    'string' according to 'vars' (a dictionary mapping variable names to
-    values).  Variables not present in 'vars' are silently expanded to the
-    empty string.  The variable values in 'vars' should not contain further
-    variable expansions; if 'vars' is the output of 'parse_makefile()',
-    you're fine.  Returns a variable-expanded version of 's'.
-    """
-
-    # This algorithm does multiple expansion, so if vars['foo'] contains
-    # "${bar}", it will expand ${foo} to ${bar}, and then expand
-    # ${bar}... and so forth.  This is fine as long as 'vars' comes from
-    # 'parse_makefile()', which takes care of such expansions eagerly,
-    # according to make's variable expansion semantics.
-
-    while True:
-        m = _findvar1_rx.search(s) or _findvar2_rx.search(s)
-        if m:
-            (beg, end) = m.span()
-            s = s[0:beg] + vars.get(m.group(1)) + s[end:]
-        else:
-            break
-    return s
-
-
-_config_vars = None
-
-
-@overload
-def get_config_vars() -> dict[str, str | int]: ...
-@overload
-def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ...
-def get_config_vars(*args: str) -> list[str | int] | dict[str, str | int]:
-    """With no arguments, return a dictionary of all configuration
-    variables relevant for the current platform.  Generally this includes
-    everything needed to build extensions and install both pure modules and
-    extensions.  On Unix, this means every variable defined in Python's
-    installed Makefile; on Windows it's a much smaller set.
-
-    With arguments, return a list of values that result from looking up
-    each argument in the configuration variable dictionary.
-    """
-    global _config_vars
-    if _config_vars is None:
-        _config_vars = sysconfig.get_config_vars().copy()
-        py39.add_ext_suffix(_config_vars)
-
-    return [_config_vars.get(name) for name in args] if args else _config_vars
-
-
-@overload
-@deprecated(
-    "SO is deprecated, use EXT_SUFFIX. Support will be removed when this module is synchronized with stdlib Python 3.11"
-)
-def get_config_var(name: Literal["SO"]) -> int | str | None: ...
-@overload
-def get_config_var(name: str) -> int | str | None: ...
-def get_config_var(name: str) -> int | str | None:
-    """Return the value of a single variable using the dictionary
-    returned by 'get_config_vars()'.  Equivalent to
-    get_config_vars().get(name)
-    """
-    if name == 'SO':
-        import warnings
-
-        warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning, 2)
-    return get_config_vars().get(name)
-
-
-@pass_none
-def _add_flags(value: str, type: str) -> str:
-    """
-    Add any flags from the environment for the given type.
-
-    type is the prefix to FLAGS in the environment key (e.g. "C" for "CFLAGS").
-    """
-    flags = os.environ.get(f'{type}FLAGS')
-    return f'{value} {flags}' if flags else value
diff --git a/voxvera/vendor/setuptools/_distutils/tests/__init__.py b/voxvera/vendor/setuptools/_distutils/tests/__init__.py
deleted file mode 100644
index 5a8ab06..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/__init__.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-Test suite for distutils.
-
-Tests for the command classes in the distutils.command package are
-included in distutils.tests as well, instead of using a separate
-distutils.command.tests package, since command identification is done
-by import rather than matching pre-defined names.
-"""
-
-import shutil
-from collections.abc import Sequence
-
-
-def missing_compiler_executable(cmd_names: Sequence[str] = []):  # pragma: no cover
-    """Check if the compiler components used to build the interpreter exist.
-
-    Check for the existence of the compiler executables whose names are listed
-    in 'cmd_names' or all the compiler executables when 'cmd_names' is empty
-    and return the first missing executable or None when none is found
-    missing.
-
-    """
-    from distutils import ccompiler, errors, sysconfig
-
-    compiler = ccompiler.new_compiler()
-    sysconfig.customize_compiler(compiler)
-    if compiler.compiler_type == "msvc":
-        # MSVC has no executables, so check whether initialization succeeds
-        try:
-            compiler.initialize()
-        except errors.DistutilsPlatformError:
-            return "msvc"
-    for name in compiler.executables:
-        if cmd_names and name not in cmd_names:
-            continue
-        cmd = getattr(compiler, name)
-        if cmd_names:
-            assert cmd is not None, f"the '{name}' executable is not configured"
-        elif not cmd:
-            continue
-        if shutil.which(cmd[0]) is None:
-            return cmd[0]
diff --git a/voxvera/vendor/setuptools/_distutils/tests/compat/__init__.py b/voxvera/vendor/setuptools/_distutils/tests/compat/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_distutils/tests/compat/py39.py b/voxvera/vendor/setuptools/_distutils/tests/compat/py39.py
deleted file mode 100644
index aca3939..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/compat/py39.py
+++ /dev/null
@@ -1,40 +0,0 @@
-import sys
-
-if sys.version_info >= (3, 10):
-    from test.support.import_helper import (
-        CleanImport as CleanImport,
-    )
-    from test.support.import_helper import (
-        DirsOnSysPath as DirsOnSysPath,
-    )
-    from test.support.os_helper import (
-        EnvironmentVarGuard as EnvironmentVarGuard,
-    )
-    from test.support.os_helper import (
-        rmtree as rmtree,
-    )
-    from test.support.os_helper import (
-        skip_unless_symlink as skip_unless_symlink,
-    )
-    from test.support.os_helper import (
-        unlink as unlink,
-    )
-else:
-    from test.support import (
-        CleanImport as CleanImport,
-    )
-    from test.support import (
-        DirsOnSysPath as DirsOnSysPath,
-    )
-    from test.support import (
-        EnvironmentVarGuard as EnvironmentVarGuard,
-    )
-    from test.support import (
-        rmtree as rmtree,
-    )
-    from test.support import (
-        skip_unless_symlink as skip_unless_symlink,
-    )
-    from test.support import (
-        unlink as unlink,
-    )
diff --git a/voxvera/vendor/setuptools/_distutils/tests/support.py b/voxvera/vendor/setuptools/_distutils/tests/support.py
deleted file mode 100644
index 9cd2b8a..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/support.py
+++ /dev/null
@@ -1,134 +0,0 @@
-"""Support code for distutils test cases."""
-
-import itertools
-import os
-import pathlib
-import shutil
-import sys
-import sysconfig
-import tempfile
-from distutils.core import Distribution
-
-import pytest
-from more_itertools import always_iterable
-
-
-@pytest.mark.usefixtures('distutils_managed_tempdir')
-class TempdirManager:
-    """
-    Mix-in class that handles temporary directories for test cases.
-    """
-
-    def mkdtemp(self):
-        """Create a temporary directory that will be cleaned up.
-
-        Returns the path of the directory.
-        """
-        d = tempfile.mkdtemp()
-        self.tempdirs.append(d)
-        return d
-
-    def write_file(self, path, content='xxx'):
-        """Writes a file in the given path.
-
-        path can be a string or a sequence.
-        """
-        pathlib.Path(*always_iterable(path)).write_text(content, encoding='utf-8')
-
-    def create_dist(self, pkg_name='foo', **kw):
-        """Will generate a test environment.
-
-        This function creates:
-         - a Distribution instance using keywords
-         - a temporary directory with a package structure
-
-        It returns the package directory and the distribution
-        instance.
-        """
-        tmp_dir = self.mkdtemp()
-        pkg_dir = os.path.join(tmp_dir, pkg_name)
-        os.mkdir(pkg_dir)
-        dist = Distribution(attrs=kw)
-
-        return pkg_dir, dist
-
-
-class DummyCommand:
-    """Class to store options for retrieval via set_undefined_options()."""
-
-    def __init__(self, **kwargs):
-        vars(self).update(kwargs)
-
-    def ensure_finalized(self):
-        pass
-
-
-def copy_xxmodule_c(directory):
-    """Helper for tests that need the xxmodule.c source file.
-
-    Example use:
-
-        def test_compile(self):
-            copy_xxmodule_c(self.tmpdir)
-            self.assertIn('xxmodule.c', os.listdir(self.tmpdir))
-
-    If the source file can be found, it will be copied to *directory*.  If not,
-    the test will be skipped.  Errors during copy are not caught.
-    """
-    shutil.copy(_get_xxmodule_path(), os.path.join(directory, 'xxmodule.c'))
-
-
-def _get_xxmodule_path():
-    source_name = 'xxmodule.c' if sys.version_info > (3, 9) else 'xxmodule-3.8.c'
-    return os.path.join(os.path.dirname(__file__), source_name)
-
-
-def fixup_build_ext(cmd):
-    """Function needed to make build_ext tests pass.
-
-    When Python was built with --enable-shared on Unix, -L. is not enough to
-    find libpython.so, because regrtest runs in a tempdir, not in the
-    source directory where the .so lives.
-
-    When Python was built with in debug mode on Windows, build_ext commands
-    need their debug attribute set, and it is not done automatically for
-    some reason.
-
-    This function handles both of these things.  Example use:
-
-        cmd = build_ext(dist)
-        support.fixup_build_ext(cmd)
-        cmd.ensure_finalized()
-
-    Unlike most other Unix platforms, Mac OS X embeds absolute paths
-    to shared libraries into executables, so the fixup is not needed there.
-    """
-    if os.name == 'nt':
-        cmd.debug = sys.executable.endswith('_d.exe')
-    elif sysconfig.get_config_var('Py_ENABLE_SHARED'):
-        # To further add to the shared builds fun on Unix, we can't just add
-        # library_dirs to the Extension() instance because that doesn't get
-        # plumbed through to the final compiler command.
-        runshared = sysconfig.get_config_var('RUNSHARED')
-        if runshared is None:
-            cmd.library_dirs = ['.']
-        else:
-            if sys.platform == 'darwin':
-                cmd.library_dirs = []
-            else:
-                name, equals, value = runshared.partition('=')
-                cmd.library_dirs = [d for d in value.split(os.pathsep) if d]
-
-
-def combine_markers(cls):
-    """
-    pytest will honor markers as found on the class, but when
-    markers are on multiple subclasses, only one appears. Use
-    this decorator to combine those markers.
-    """
-    cls.pytestmark = [
-        mark
-        for base in itertools.chain([cls], cls.__bases__)
-        for mark in getattr(base, 'pytestmark', [])
-    ]
-    return cls
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_archive_util.py b/voxvera/vendor/setuptools/_distutils/tests/test_archive_util.py
deleted file mode 100644
index a9cc5eb..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_archive_util.py
+++ /dev/null
@@ -1,342 +0,0 @@
-"""Tests for distutils.archive_util."""
-
-import functools
-import operator
-import os
-import pathlib
-import sys
-import tarfile
-from distutils import archive_util
-from distutils.archive_util import (
-    ARCHIVE_FORMATS,
-    check_archive_formats,
-    make_archive,
-    make_tarball,
-    make_zipfile,
-)
-from distutils.spawn import spawn
-from distutils.tests import support
-from os.path import splitdrive
-
-import path
-import pytest
-from test.support import patch
-
-from .unix_compat import UID_0_SUPPORT, grp, pwd, require_uid_0, require_unix_id
-
-
-def can_fs_encode(filename):
-    """
-    Return True if the filename can be saved in the file system.
-    """
-    if os.path.supports_unicode_filenames:
-        return True
-    try:
-        filename.encode(sys.getfilesystemencoding())
-    except UnicodeEncodeError:
-        return False
-    return True
-
-
-def all_equal(values):
-    return functools.reduce(operator.eq, values)
-
-
-def same_drive(*paths):
-    return all_equal(pathlib.Path(path).drive for path in paths)
-
-
-class ArchiveUtilTestCase(support.TempdirManager):
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_make_tarball(self, name='archive'):
-        # creating something to tar
-        tmpdir = self._create_files()
-        self._make_tarball(tmpdir, name, '.tar.gz')
-        # trying an uncompressed one
-        self._make_tarball(tmpdir, name, '.tar', compress=None)
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_make_tarball_gzip(self):
-        tmpdir = self._create_files()
-        self._make_tarball(tmpdir, 'archive', '.tar.gz', compress='gzip')
-
-    def test_make_tarball_bzip2(self):
-        pytest.importorskip('bz2')
-        tmpdir = self._create_files()
-        self._make_tarball(tmpdir, 'archive', '.tar.bz2', compress='bzip2')
-
-    def test_make_tarball_xz(self):
-        pytest.importorskip('lzma')
-        tmpdir = self._create_files()
-        self._make_tarball(tmpdir, 'archive', '.tar.xz', compress='xz')
-
-    @pytest.mark.skipif("not can_fs_encode('årchiv')")
-    def test_make_tarball_latin1(self):
-        """
-        Mirror test_make_tarball, except filename contains latin characters.
-        """
-        self.test_make_tarball('årchiv')  # note this isn't a real word
-
-    @pytest.mark.skipif("not can_fs_encode('のアーカイブ')")
-    def test_make_tarball_extended(self):
-        """
-        Mirror test_make_tarball, except filename contains extended
-        characters outside the latin charset.
-        """
-        self.test_make_tarball('のアーカイブ')  # japanese for archive
-
-    def _make_tarball(self, tmpdir, target_name, suffix, **kwargs):
-        tmpdir2 = self.mkdtemp()
-        if same_drive(tmpdir, tmpdir2):
-            pytest.skip("source and target should be on same drive")
-
-        base_name = os.path.join(tmpdir2, target_name)
-
-        # working with relative paths to avoid tar warnings
-        with path.Path(tmpdir):
-            make_tarball(splitdrive(base_name)[1], 'dist', **kwargs)
-
-        # check if the compressed tarball was created
-        tarball = base_name + suffix
-        assert os.path.exists(tarball)
-        assert self._tarinfo(tarball) == self._created_files
-
-    def _tarinfo(self, path):
-        tar = tarfile.open(path)
-        try:
-            names = tar.getnames()
-            names.sort()
-            return names
-        finally:
-            tar.close()
-
-    _zip_created_files = [
-        'dist/',
-        'dist/file1',
-        'dist/file2',
-        'dist/sub/',
-        'dist/sub/file3',
-        'dist/sub2/',
-    ]
-    _created_files = [p.rstrip('/') for p in _zip_created_files]
-
-    def _create_files(self):
-        # creating something to tar
-        tmpdir = self.mkdtemp()
-        dist = os.path.join(tmpdir, 'dist')
-        os.mkdir(dist)
-        self.write_file([dist, 'file1'], 'xxx')
-        self.write_file([dist, 'file2'], 'xxx')
-        os.mkdir(os.path.join(dist, 'sub'))
-        self.write_file([dist, 'sub', 'file3'], 'xxx')
-        os.mkdir(os.path.join(dist, 'sub2'))
-        return tmpdir
-
-    @pytest.mark.usefixtures('needs_zlib')
-    @pytest.mark.skipif("not (shutil.which('tar') and shutil.which('gzip'))")
-    def test_tarfile_vs_tar(self):
-        tmpdir = self._create_files()
-        tmpdir2 = self.mkdtemp()
-        base_name = os.path.join(tmpdir2, 'archive')
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            make_tarball(base_name, 'dist')
-        finally:
-            os.chdir(old_dir)
-
-        # check if the compressed tarball was created
-        tarball = base_name + '.tar.gz'
-        assert os.path.exists(tarball)
-
-        # now create another tarball using `tar`
-        tarball2 = os.path.join(tmpdir, 'archive2.tar.gz')
-        tar_cmd = ['tar', '-cf', 'archive2.tar', 'dist']
-        gzip_cmd = ['gzip', '-f', '-9', 'archive2.tar']
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            spawn(tar_cmd)
-            spawn(gzip_cmd)
-        finally:
-            os.chdir(old_dir)
-
-        assert os.path.exists(tarball2)
-        # let's compare both tarballs
-        assert self._tarinfo(tarball) == self._created_files
-        assert self._tarinfo(tarball2) == self._created_files
-
-        # trying an uncompressed one
-        base_name = os.path.join(tmpdir2, 'archive')
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            make_tarball(base_name, 'dist', compress=None)
-        finally:
-            os.chdir(old_dir)
-        tarball = base_name + '.tar'
-        assert os.path.exists(tarball)
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_make_zipfile(self):
-        zipfile = pytest.importorskip('zipfile')
-        # creating something to tar
-        tmpdir = self._create_files()
-        base_name = os.path.join(self.mkdtemp(), 'archive')
-        with path.Path(tmpdir):
-            make_zipfile(base_name, 'dist')
-
-        # check if the compressed tarball was created
-        tarball = base_name + '.zip'
-        assert os.path.exists(tarball)
-        with zipfile.ZipFile(tarball) as zf:
-            assert sorted(zf.namelist()) == self._zip_created_files
-
-    def test_make_zipfile_no_zlib(self):
-        zipfile = pytest.importorskip('zipfile')
-        patch(self, archive_util.zipfile, 'zlib', None)  # force zlib ImportError
-
-        called = []
-        zipfile_class = zipfile.ZipFile
-
-        def fake_zipfile(*a, **kw):
-            if kw.get('compression', None) == zipfile.ZIP_STORED:
-                called.append((a, kw))
-            return zipfile_class(*a, **kw)
-
-        patch(self, archive_util.zipfile, 'ZipFile', fake_zipfile)
-
-        # create something to tar and compress
-        tmpdir = self._create_files()
-        base_name = os.path.join(self.mkdtemp(), 'archive')
-        with path.Path(tmpdir):
-            make_zipfile(base_name, 'dist')
-
-        tarball = base_name + '.zip'
-        assert called == [((tarball, "w"), {'compression': zipfile.ZIP_STORED})]
-        assert os.path.exists(tarball)
-        with zipfile.ZipFile(tarball) as zf:
-            assert sorted(zf.namelist()) == self._zip_created_files
-
-    def test_check_archive_formats(self):
-        assert check_archive_formats(['gztar', 'xxx', 'zip']) == 'xxx'
-        assert (
-            check_archive_formats(['gztar', 'bztar', 'xztar', 'ztar', 'tar', 'zip'])
-            is None
-        )
-
-    def test_make_archive(self):
-        tmpdir = self.mkdtemp()
-        base_name = os.path.join(tmpdir, 'archive')
-        with pytest.raises(ValueError):
-            make_archive(base_name, 'xxx')
-
-    def test_make_archive_cwd(self):
-        current_dir = os.getcwd()
-
-        def _breaks(*args, **kw):
-            raise RuntimeError()
-
-        ARCHIVE_FORMATS['xxx'] = (_breaks, [], 'xxx file')
-        try:
-            try:
-                make_archive('xxx', 'xxx', root_dir=self.mkdtemp())
-            except Exception:
-                pass
-            assert os.getcwd() == current_dir
-        finally:
-            ARCHIVE_FORMATS.pop('xxx')
-
-    def test_make_archive_tar(self):
-        base_dir = self._create_files()
-        base_name = os.path.join(self.mkdtemp(), 'archive')
-        res = make_archive(base_name, 'tar', base_dir, 'dist')
-        assert os.path.exists(res)
-        assert os.path.basename(res) == 'archive.tar'
-        assert self._tarinfo(res) == self._created_files
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_make_archive_gztar(self):
-        base_dir = self._create_files()
-        base_name = os.path.join(self.mkdtemp(), 'archive')
-        res = make_archive(base_name, 'gztar', base_dir, 'dist')
-        assert os.path.exists(res)
-        assert os.path.basename(res) == 'archive.tar.gz'
-        assert self._tarinfo(res) == self._created_files
-
-    def test_make_archive_bztar(self):
-        pytest.importorskip('bz2')
-        base_dir = self._create_files()
-        base_name = os.path.join(self.mkdtemp(), 'archive')
-        res = make_archive(base_name, 'bztar', base_dir, 'dist')
-        assert os.path.exists(res)
-        assert os.path.basename(res) == 'archive.tar.bz2'
-        assert self._tarinfo(res) == self._created_files
-
-    def test_make_archive_xztar(self):
-        pytest.importorskip('lzma')
-        base_dir = self._create_files()
-        base_name = os.path.join(self.mkdtemp(), 'archive')
-        res = make_archive(base_name, 'xztar', base_dir, 'dist')
-        assert os.path.exists(res)
-        assert os.path.basename(res) == 'archive.tar.xz'
-        assert self._tarinfo(res) == self._created_files
-
-    def test_make_archive_owner_group(self):
-        # testing make_archive with owner and group, with various combinations
-        # this works even if there's not gid/uid support
-        if UID_0_SUPPORT:
-            group = grp.getgrgid(0)[0]
-            owner = pwd.getpwuid(0)[0]
-        else:
-            group = owner = 'root'
-
-        base_dir = self._create_files()
-        root_dir = self.mkdtemp()
-        base_name = os.path.join(self.mkdtemp(), 'archive')
-        res = make_archive(
-            base_name, 'zip', root_dir, base_dir, owner=owner, group=group
-        )
-        assert os.path.exists(res)
-
-        res = make_archive(base_name, 'zip', root_dir, base_dir)
-        assert os.path.exists(res)
-
-        res = make_archive(
-            base_name, 'tar', root_dir, base_dir, owner=owner, group=group
-        )
-        assert os.path.exists(res)
-
-        res = make_archive(
-            base_name, 'tar', root_dir, base_dir, owner='kjhkjhkjg', group='oihohoh'
-        )
-        assert os.path.exists(res)
-
-    @pytest.mark.usefixtures('needs_zlib')
-    @require_unix_id
-    @require_uid_0
-    def test_tarfile_root_owner(self):
-        tmpdir = self._create_files()
-        base_name = os.path.join(self.mkdtemp(), 'archive')
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        group = grp.getgrgid(0)[0]
-        owner = pwd.getpwuid(0)[0]
-        try:
-            archive_name = make_tarball(
-                base_name, 'dist', compress=None, owner=owner, group=group
-            )
-        finally:
-            os.chdir(old_dir)
-
-        # check if the compressed tarball was created
-        assert os.path.exists(archive_name)
-
-        # now checks the rights
-        archive = tarfile.open(archive_name)
-        try:
-            for member in archive.getmembers():
-                assert member.uid == 0
-                assert member.gid == 0
-        finally:
-            archive.close()
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_bdist.py b/voxvera/vendor/setuptools/_distutils/tests/test_bdist.py
deleted file mode 100644
index d5696fc..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_bdist.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""Tests for distutils.command.bdist."""
-
-from distutils.command.bdist import bdist
-from distutils.tests import support
-
-
-class TestBuild(support.TempdirManager):
-    def test_formats(self):
-        # let's create a command and make sure
-        # we can set the format
-        dist = self.create_dist()[1]
-        cmd = bdist(dist)
-        cmd.formats = ['gztar']
-        cmd.ensure_finalized()
-        assert cmd.formats == ['gztar']
-
-        # what formats does bdist offer?
-        formats = [
-            'bztar',
-            'gztar',
-            'rpm',
-            'tar',
-            'xztar',
-            'zip',
-            'ztar',
-        ]
-        found = sorted(cmd.format_commands)
-        assert found == formats
-
-    def test_skip_build(self):
-        # bug #10946: bdist --skip-build should trickle down to subcommands
-        dist = self.create_dist()[1]
-        cmd = bdist(dist)
-        cmd.skip_build = True
-        cmd.ensure_finalized()
-        dist.command_obj['bdist'] = cmd
-
-        names = [
-            'bdist_dumb',
-        ]  # bdist_rpm does not support --skip-build
-
-        for name in names:
-            subcmd = cmd.get_finalized_command(name)
-            if getattr(subcmd, '_unsupported', False):
-                # command is not supported on this build
-                continue
-            assert subcmd.skip_build, f'{name} should take --skip-build from bdist'
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_bdist_dumb.py b/voxvera/vendor/setuptools/_distutils/tests/test_bdist_dumb.py
deleted file mode 100644
index 1fc51d2..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_bdist_dumb.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""Tests for distutils.command.bdist_dumb."""
-
-import os
-import sys
-import zipfile
-from distutils.command.bdist_dumb import bdist_dumb
-from distutils.core import Distribution
-from distutils.tests import support
-
-import pytest
-
-SETUP_PY = """\
-from distutils.core import setup
-import foo
-
-setup(name='foo', version='0.1', py_modules=['foo'],
-      url='xxx', author='xxx', author_email='xxx')
-
-"""
-
-
-@support.combine_markers
-@pytest.mark.usefixtures('save_env')
-@pytest.mark.usefixtures('save_argv')
-@pytest.mark.usefixtures('save_cwd')
-class TestBuildDumb(
-    support.TempdirManager,
-):
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_simple_built(self):
-        # let's create a simple package
-        tmp_dir = self.mkdtemp()
-        pkg_dir = os.path.join(tmp_dir, 'foo')
-        os.mkdir(pkg_dir)
-        self.write_file((pkg_dir, 'setup.py'), SETUP_PY)
-        self.write_file((pkg_dir, 'foo.py'), '#')
-        self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py')
-        self.write_file((pkg_dir, 'README'), '')
-
-        dist = Distribution({
-            'name': 'foo',
-            'version': '0.1',
-            'py_modules': ['foo'],
-            'url': 'xxx',
-            'author': 'xxx',
-            'author_email': 'xxx',
-        })
-        dist.script_name = 'setup.py'
-        os.chdir(pkg_dir)
-
-        sys.argv = ['setup.py']
-        cmd = bdist_dumb(dist)
-
-        # so the output is the same no matter
-        # what is the platform
-        cmd.format = 'zip'
-
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # see what we have
-        dist_created = os.listdir(os.path.join(pkg_dir, 'dist'))
-        base = f"{dist.get_fullname()}.{cmd.plat_name}.zip"
-
-        assert dist_created == [base]
-
-        # now let's check what we have in the zip file
-        fp = zipfile.ZipFile(os.path.join('dist', base))
-        try:
-            contents = fp.namelist()
-        finally:
-            fp.close()
-
-        contents = sorted(filter(None, map(os.path.basename, contents)))
-        wanted = ['foo-0.1-py{}.{}.egg-info'.format(*sys.version_info[:2]), 'foo.py']
-        if not sys.dont_write_bytecode:
-            wanted.append(f'foo.{sys.implementation.cache_tag}.pyc')
-        assert contents == sorted(wanted)
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_bdist_rpm.py b/voxvera/vendor/setuptools/_distutils/tests/test_bdist_rpm.py
deleted file mode 100644
index 7505143..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_bdist_rpm.py
+++ /dev/null
@@ -1,127 +0,0 @@
-"""Tests for distutils.command.bdist_rpm."""
-
-import os
-import shutil  # noqa: F401
-import sys
-from distutils.command.bdist_rpm import bdist_rpm
-from distutils.core import Distribution
-from distutils.tests import support
-
-import pytest
-from test.support import requires_zlib
-
-SETUP_PY = """\
-from distutils.core import setup
-import foo
-
-setup(name='foo', version='0.1', py_modules=['foo'],
-      url='xxx', author='xxx', author_email='xxx')
-
-"""
-
-
-@pytest.fixture(autouse=True)
-def sys_executable_encodable():
-    try:
-        sys.executable.encode('UTF-8')
-    except UnicodeEncodeError:
-        pytest.skip("sys.executable is not encodable to UTF-8")
-
-
-mac_woes = pytest.mark.skipif(
-    "not sys.platform.startswith('linux')",
-    reason='spurious sdtout/stderr output under macOS',
-)
-
-
-@pytest.mark.usefixtures('save_env')
-@pytest.mark.usefixtures('save_argv')
-@pytest.mark.usefixtures('save_cwd')
-class TestBuildRpm(
-    support.TempdirManager,
-):
-    @mac_woes
-    @requires_zlib()
-    @pytest.mark.skipif("not shutil.which('rpm')")
-    @pytest.mark.skipif("not shutil.which('rpmbuild')")
-    def test_quiet(self):
-        # let's create a package
-        tmp_dir = self.mkdtemp()
-        os.environ['HOME'] = tmp_dir  # to confine dir '.rpmdb' creation
-        pkg_dir = os.path.join(tmp_dir, 'foo')
-        os.mkdir(pkg_dir)
-        self.write_file((pkg_dir, 'setup.py'), SETUP_PY)
-        self.write_file((pkg_dir, 'foo.py'), '#')
-        self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py')
-        self.write_file((pkg_dir, 'README'), '')
-
-        dist = Distribution({
-            'name': 'foo',
-            'version': '0.1',
-            'py_modules': ['foo'],
-            'url': 'xxx',
-            'author': 'xxx',
-            'author_email': 'xxx',
-        })
-        dist.script_name = 'setup.py'
-        os.chdir(pkg_dir)
-
-        sys.argv = ['setup.py']
-        cmd = bdist_rpm(dist)
-        cmd.fix_python = True
-
-        # running in quiet mode
-        cmd.quiet = True
-        cmd.ensure_finalized()
-        cmd.run()
-
-        dist_created = os.listdir(os.path.join(pkg_dir, 'dist'))
-        assert 'foo-0.1-1.noarch.rpm' in dist_created
-
-        # bug #2945: upload ignores bdist_rpm files
-        assert ('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm') in dist.dist_files
-        assert ('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm') in dist.dist_files
-
-    @mac_woes
-    @requires_zlib()
-    # https://bugs.python.org/issue1533164
-    @pytest.mark.skipif("not shutil.which('rpm')")
-    @pytest.mark.skipif("not shutil.which('rpmbuild')")
-    def test_no_optimize_flag(self):
-        # let's create a package that breaks bdist_rpm
-        tmp_dir = self.mkdtemp()
-        os.environ['HOME'] = tmp_dir  # to confine dir '.rpmdb' creation
-        pkg_dir = os.path.join(tmp_dir, 'foo')
-        os.mkdir(pkg_dir)
-        self.write_file((pkg_dir, 'setup.py'), SETUP_PY)
-        self.write_file((pkg_dir, 'foo.py'), '#')
-        self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py')
-        self.write_file((pkg_dir, 'README'), '')
-
-        dist = Distribution({
-            'name': 'foo',
-            'version': '0.1',
-            'py_modules': ['foo'],
-            'url': 'xxx',
-            'author': 'xxx',
-            'author_email': 'xxx',
-        })
-        dist.script_name = 'setup.py'
-        os.chdir(pkg_dir)
-
-        sys.argv = ['setup.py']
-        cmd = bdist_rpm(dist)
-        cmd.fix_python = True
-
-        cmd.quiet = True
-        cmd.ensure_finalized()
-        cmd.run()
-
-        dist_created = os.listdir(os.path.join(pkg_dir, 'dist'))
-        assert 'foo-0.1-1.noarch.rpm' in dist_created
-
-        # bug #2945: upload ignores bdist_rpm files
-        assert ('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm') in dist.dist_files
-        assert ('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm') in dist.dist_files
-
-        os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm'))
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_build.py b/voxvera/vendor/setuptools/_distutils/tests/test_build.py
deleted file mode 100644
index f7fe69a..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_build.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""Tests for distutils.command.build."""
-
-import os
-import sys
-from distutils.command.build import build
-from distutils.tests import support
-from sysconfig import get_config_var, get_platform
-
-
-class TestBuild(support.TempdirManager):
-    def test_finalize_options(self):
-        pkg_dir, dist = self.create_dist()
-        cmd = build(dist)
-        cmd.finalize_options()
-
-        # if not specified, plat_name gets the current platform
-        assert cmd.plat_name == get_platform()
-
-        # build_purelib is build + lib
-        wanted = os.path.join(cmd.build_base, 'lib')
-        assert cmd.build_purelib == wanted
-
-        # build_platlib is 'build/lib.platform-cache_tag[-pydebug]'
-        # examples:
-        #   build/lib.macosx-10.3-i386-cpython39
-        plat_spec = f'.{cmd.plat_name}-{sys.implementation.cache_tag}'
-        if get_config_var('Py_GIL_DISABLED'):
-            plat_spec += 't'
-        if hasattr(sys, 'gettotalrefcount'):
-            assert cmd.build_platlib.endswith('-pydebug')
-            plat_spec += '-pydebug'
-        wanted = os.path.join(cmd.build_base, 'lib' + plat_spec)
-        assert cmd.build_platlib == wanted
-
-        # by default, build_lib = build_purelib
-        assert cmd.build_lib == cmd.build_purelib
-
-        # build_temp is build/temp.
-        wanted = os.path.join(cmd.build_base, 'temp' + plat_spec)
-        assert cmd.build_temp == wanted
-
-        # build_scripts is build/scripts-x.x
-        wanted = os.path.join(
-            cmd.build_base, f'scripts-{sys.version_info.major}.{sys.version_info.minor}'
-        )
-        assert cmd.build_scripts == wanted
-
-        # executable is os.path.normpath(sys.executable)
-        assert cmd.executable == os.path.normpath(sys.executable)
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_build_clib.py b/voxvera/vendor/setuptools/_distutils/tests/test_build_clib.py
deleted file mode 100644
index f76f26b..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_build_clib.py
+++ /dev/null
@@ -1,134 +0,0 @@
-"""Tests for distutils.command.build_clib."""
-
-import os
-from distutils.command.build_clib import build_clib
-from distutils.errors import DistutilsSetupError
-from distutils.tests import missing_compiler_executable, support
-
-import pytest
-
-
-class TestBuildCLib(support.TempdirManager):
-    def test_check_library_dist(self):
-        pkg_dir, dist = self.create_dist()
-        cmd = build_clib(dist)
-
-        # 'libraries' option must be a list
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_library_list('foo')
-
-        # each element of 'libraries' must a 2-tuple
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_library_list(['foo1', 'foo2'])
-
-        # first element of each tuple in 'libraries'
-        # must be a string (the library name)
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_library_list([(1, 'foo1'), ('name', 'foo2')])
-
-        # library name may not contain directory separators
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_library_list(
-                [('name', 'foo1'), ('another/name', 'foo2')],
-            )
-
-        # second element of each tuple must be a dictionary (build info)
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_library_list(
-                [('name', {}), ('another', 'foo2')],
-            )
-
-        # those work
-        libs = [('name', {}), ('name', {'ok': 'good'})]
-        cmd.check_library_list(libs)
-
-    def test_get_source_files(self):
-        pkg_dir, dist = self.create_dist()
-        cmd = build_clib(dist)
-
-        # "in 'libraries' option 'sources' must be present and must be
-        # a list of source filenames
-        cmd.libraries = [('name', {})]
-        with pytest.raises(DistutilsSetupError):
-            cmd.get_source_files()
-
-        cmd.libraries = [('name', {'sources': 1})]
-        with pytest.raises(DistutilsSetupError):
-            cmd.get_source_files()
-
-        cmd.libraries = [('name', {'sources': ['a', 'b']})]
-        assert cmd.get_source_files() == ['a', 'b']
-
-        cmd.libraries = [('name', {'sources': ('a', 'b')})]
-        assert cmd.get_source_files() == ['a', 'b']
-
-        cmd.libraries = [
-            ('name', {'sources': ('a', 'b')}),
-            ('name2', {'sources': ['c', 'd']}),
-        ]
-        assert cmd.get_source_files() == ['a', 'b', 'c', 'd']
-
-    def test_build_libraries(self):
-        pkg_dir, dist = self.create_dist()
-        cmd = build_clib(dist)
-
-        class FakeCompiler:
-            def compile(*args, **kw):
-                pass
-
-            create_static_lib = compile
-
-        cmd.compiler = FakeCompiler()
-
-        # build_libraries is also doing a bit of typo checking
-        lib = [('name', {'sources': 'notvalid'})]
-        with pytest.raises(DistutilsSetupError):
-            cmd.build_libraries(lib)
-
-        lib = [('name', {'sources': list()})]
-        cmd.build_libraries(lib)
-
-        lib = [('name', {'sources': tuple()})]
-        cmd.build_libraries(lib)
-
-    def test_finalize_options(self):
-        pkg_dir, dist = self.create_dist()
-        cmd = build_clib(dist)
-
-        cmd.include_dirs = 'one-dir'
-        cmd.finalize_options()
-        assert cmd.include_dirs == ['one-dir']
-
-        cmd.include_dirs = None
-        cmd.finalize_options()
-        assert cmd.include_dirs == []
-
-        cmd.distribution.libraries = 'WONTWORK'
-        with pytest.raises(DistutilsSetupError):
-            cmd.finalize_options()
-
-    @pytest.mark.skipif('platform.system() == "Windows"')
-    def test_run(self):
-        pkg_dir, dist = self.create_dist()
-        cmd = build_clib(dist)
-
-        foo_c = os.path.join(pkg_dir, 'foo.c')
-        self.write_file(foo_c, 'int main(void) { return 1;}\n')
-        cmd.libraries = [('foo', {'sources': [foo_c]})]
-
-        build_temp = os.path.join(pkg_dir, 'build')
-        os.mkdir(build_temp)
-        cmd.build_temp = build_temp
-        cmd.build_clib = build_temp
-
-        # Before we run the command, we want to make sure
-        # all commands are present on the system.
-        ccmd = missing_compiler_executable()
-        if ccmd is not None:
-            self.skipTest(f'The {ccmd!r} command is not found')
-
-        # this should work
-        cmd.run()
-
-        # let's check the result
-        assert 'libfoo.a' in os.listdir(build_temp)
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_build_ext.py b/voxvera/vendor/setuptools/_distutils/tests/test_build_ext.py
deleted file mode 100644
index dab0507..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_build_ext.py
+++ /dev/null
@@ -1,628 +0,0 @@
-import contextlib
-import glob
-import importlib
-import os.path
-import platform
-import re
-import shutil
-import site
-import subprocess
-import sys
-import tempfile
-import textwrap
-import time
-from distutils import sysconfig
-from distutils.command.build_ext import build_ext
-from distutils.core import Distribution
-from distutils.errors import (
-    CompileError,
-    DistutilsPlatformError,
-    DistutilsSetupError,
-    UnknownFileError,
-)
-from distutils.extension import Extension
-from distutils.tests import missing_compiler_executable
-from distutils.tests.support import TempdirManager, copy_xxmodule_c, fixup_build_ext
-from io import StringIO
-
-import jaraco.path
-import path
-import pytest
-from test import support
-
-from .compat import py39 as import_helper
-
-
-@pytest.fixture()
-def user_site_dir(request):
-    self = request.instance
-    self.tmp_dir = self.mkdtemp()
-    self.tmp_path = path.Path(self.tmp_dir)
-    from distutils.command import build_ext
-
-    orig_user_base = site.USER_BASE
-
-    site.USER_BASE = self.mkdtemp()
-    build_ext.USER_BASE = site.USER_BASE
-
-    # bpo-30132: On Windows, a .pdb file may be created in the current
-    # working directory. Create a temporary working directory to cleanup
-    # everything at the end of the test.
-    with self.tmp_path:
-        yield
-
-    site.USER_BASE = orig_user_base
-    build_ext.USER_BASE = orig_user_base
-
-    if sys.platform == 'cygwin':
-        time.sleep(1)
-
-
-@contextlib.contextmanager
-def safe_extension_import(name, path):
-    with import_helper.CleanImport(name):
-        with extension_redirect(name, path) as new_path:
-            with import_helper.DirsOnSysPath(new_path):
-                yield
-
-
-@contextlib.contextmanager
-def extension_redirect(mod, path):
-    """
-    Tests will fail to tear down an extension module if it's been imported.
-
-    Before importing, copy the file to a temporary directory that won't
-    be cleaned up. Yield the new path.
-    """
-    if platform.system() != "Windows" and sys.platform != "cygwin":
-        yield path
-        return
-    with import_helper.DirsOnSysPath(path):
-        spec = importlib.util.find_spec(mod)
-    filename = os.path.basename(spec.origin)
-    trash_dir = tempfile.mkdtemp(prefix='deleteme')
-    dest = os.path.join(trash_dir, os.path.basename(filename))
-    shutil.copy(spec.origin, dest)
-    yield trash_dir
-    # TODO: can the file be scheduled for deletion?
-
-
-@pytest.mark.usefixtures('user_site_dir')
-class TestBuildExt(TempdirManager):
-    def build_ext(self, *args, **kwargs):
-        return build_ext(*args, **kwargs)
-
-    @pytest.mark.parametrize("copy_so", [False])
-    def test_build_ext(self, copy_so):
-        missing_compiler_executable()
-        copy_xxmodule_c(self.tmp_dir)
-        xx_c = os.path.join(self.tmp_dir, 'xxmodule.c')
-        xx_ext = Extension('xx', [xx_c])
-        if sys.platform != "win32":
-            if not copy_so:
-                xx_ext = Extension(
-                    'xx',
-                    [xx_c],
-                    library_dirs=['/usr/lib'],
-                    libraries=['z'],
-                    runtime_library_dirs=['/usr/lib'],
-                )
-            elif sys.platform == 'linux':
-                libz_so = {
-                    os.path.realpath(name) for name in glob.iglob('/usr/lib*/libz.so*')
-                }
-                libz_so = sorted(libz_so, key=lambda lib_path: len(lib_path))
-                shutil.copyfile(libz_so[-1], '/tmp/libxx_z.so')
-
-                xx_ext = Extension(
-                    'xx',
-                    [xx_c],
-                    library_dirs=['/tmp'],
-                    libraries=['xx_z'],
-                    runtime_library_dirs=['/tmp'],
-                )
-        dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]})
-        dist.package_dir = self.tmp_dir
-        cmd = self.build_ext(dist)
-        fixup_build_ext(cmd)
-        cmd.build_lib = self.tmp_dir
-        cmd.build_temp = self.tmp_dir
-
-        old_stdout = sys.stdout
-        if not support.verbose:
-            # silence compiler output
-            sys.stdout = StringIO()
-        try:
-            cmd.ensure_finalized()
-            cmd.run()
-        finally:
-            sys.stdout = old_stdout
-
-        with safe_extension_import('xx', self.tmp_dir):
-            self._test_xx(copy_so)
-
-        if sys.platform == 'linux' and copy_so:
-            os.unlink('/tmp/libxx_z.so')
-
-    @staticmethod
-    def _test_xx(copy_so):
-        import xx  # type: ignore[import-not-found] # Module generated for tests
-
-        for attr in ('error', 'foo', 'new', 'roj'):
-            assert hasattr(xx, attr)
-
-        assert xx.foo(2, 5) == 7
-        assert xx.foo(13, 15) == 28
-        assert xx.new().demo() is None
-        if support.HAVE_DOCSTRINGS:
-            doc = 'This is a template module just for instruction.'
-            assert xx.__doc__ == doc
-        assert isinstance(xx.Null(), xx.Null)
-        assert isinstance(xx.Str(), xx.Str)
-
-        if sys.platform == 'linux':
-            so_headers = subprocess.check_output(
-                ["readelf", "-d", xx.__file__], universal_newlines=True
-            )
-            import pprint
-
-            pprint.pprint(so_headers)
-            rpaths = [
-                rpath
-                for line in so_headers.split("\n")
-                if "RPATH" in line or "RUNPATH" in line
-                for rpath in line.split()[2][1:-1].split(":")
-            ]
-            if not copy_so:
-                pprint.pprint(rpaths)
-                # Linked against a library in /usr/lib{,64}
-                assert "/usr/lib" not in rpaths and "/usr/lib64" not in rpaths
-            else:
-                # Linked against a library in /tmp
-                assert "/tmp" in rpaths
-                # The import is the real test here
-
-    def test_solaris_enable_shared(self):
-        dist = Distribution({'name': 'xx'})
-        cmd = self.build_ext(dist)
-        old = sys.platform
-
-        sys.platform = 'sunos'  # fooling finalize_options
-        from distutils.sysconfig import _config_vars
-
-        old_var = _config_vars.get('Py_ENABLE_SHARED')
-        _config_vars['Py_ENABLE_SHARED'] = True
-        try:
-            cmd.ensure_finalized()
-        finally:
-            sys.platform = old
-            if old_var is None:
-                del _config_vars['Py_ENABLE_SHARED']
-            else:
-                _config_vars['Py_ENABLE_SHARED'] = old_var
-
-        # make sure we get some library dirs under solaris
-        assert len(cmd.library_dirs) > 0
-
-    def test_user_site(self):
-        import site
-
-        dist = Distribution({'name': 'xx'})
-        cmd = self.build_ext(dist)
-
-        # making sure the user option is there
-        options = [name for name, short, label in cmd.user_options]
-        assert 'user' in options
-
-        # setting a value
-        cmd.user = True
-
-        # setting user based lib and include
-        lib = os.path.join(site.USER_BASE, 'lib')
-        incl = os.path.join(site.USER_BASE, 'include')
-        os.mkdir(lib)
-        os.mkdir(incl)
-
-        # let's run finalize
-        cmd.ensure_finalized()
-
-        # see if include_dirs and library_dirs
-        # were set
-        assert lib in cmd.library_dirs
-        assert lib in cmd.rpath
-        assert incl in cmd.include_dirs
-
-    def test_optional_extension(self):
-        # this extension will fail, but let's ignore this failure
-        # with the optional argument.
-        modules = [Extension('foo', ['xxx'], optional=False)]
-        dist = Distribution({'name': 'xx', 'ext_modules': modules})
-        cmd = self.build_ext(dist)
-        cmd.ensure_finalized()
-        with pytest.raises((UnknownFileError, CompileError)):
-            cmd.run()  # should raise an error
-
-        modules = [Extension('foo', ['xxx'], optional=True)]
-        dist = Distribution({'name': 'xx', 'ext_modules': modules})
-        cmd = self.build_ext(dist)
-        cmd.ensure_finalized()
-        cmd.run()  # should pass
-
-    def test_finalize_options(self):
-        # Make sure Python's include directories (for Python.h, pyconfig.h,
-        # etc.) are in the include search path.
-        modules = [Extension('foo', ['xxx'], optional=False)]
-        dist = Distribution({'name': 'xx', 'ext_modules': modules})
-        cmd = self.build_ext(dist)
-        cmd.finalize_options()
-
-        py_include = sysconfig.get_python_inc()
-        for p in py_include.split(os.path.pathsep):
-            assert p in cmd.include_dirs
-
-        plat_py_include = sysconfig.get_python_inc(plat_specific=True)
-        for p in plat_py_include.split(os.path.pathsep):
-            assert p in cmd.include_dirs
-
-        # make sure cmd.libraries is turned into a list
-        # if it's a string
-        cmd = self.build_ext(dist)
-        cmd.libraries = 'my_lib, other_lib lastlib'
-        cmd.finalize_options()
-        assert cmd.libraries == ['my_lib', 'other_lib', 'lastlib']
-
-        # make sure cmd.library_dirs is turned into a list
-        # if it's a string
-        cmd = self.build_ext(dist)
-        cmd.library_dirs = f'my_lib_dir{os.pathsep}other_lib_dir'
-        cmd.finalize_options()
-        assert 'my_lib_dir' in cmd.library_dirs
-        assert 'other_lib_dir' in cmd.library_dirs
-
-        # make sure rpath is turned into a list
-        # if it's a string
-        cmd = self.build_ext(dist)
-        cmd.rpath = f'one{os.pathsep}two'
-        cmd.finalize_options()
-        assert cmd.rpath == ['one', 'two']
-
-        # make sure cmd.link_objects is turned into a list
-        # if it's a string
-        cmd = build_ext(dist)
-        cmd.link_objects = 'one two,three'
-        cmd.finalize_options()
-        assert cmd.link_objects == ['one', 'two', 'three']
-
-        # XXX more tests to perform for win32
-
-        # make sure define is turned into 2-tuples
-        # strings if they are ','-separated strings
-        cmd = self.build_ext(dist)
-        cmd.define = 'one,two'
-        cmd.finalize_options()
-        assert cmd.define == [('one', '1'), ('two', '1')]
-
-        # make sure undef is turned into a list of
-        # strings if they are ','-separated strings
-        cmd = self.build_ext(dist)
-        cmd.undef = 'one,two'
-        cmd.finalize_options()
-        assert cmd.undef == ['one', 'two']
-
-        # make sure swig_opts is turned into a list
-        cmd = self.build_ext(dist)
-        cmd.swig_opts = None
-        cmd.finalize_options()
-        assert cmd.swig_opts == []
-
-        cmd = self.build_ext(dist)
-        cmd.swig_opts = '1 2'
-        cmd.finalize_options()
-        assert cmd.swig_opts == ['1', '2']
-
-    def test_check_extensions_list(self):
-        dist = Distribution()
-        cmd = self.build_ext(dist)
-        cmd.finalize_options()
-
-        # 'extensions' option must be a list of Extension instances
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_extensions_list('foo')
-
-        # each element of 'ext_modules' option must be an
-        # Extension instance or 2-tuple
-        exts = [('bar', 'foo', 'bar'), 'foo']
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_extensions_list(exts)
-
-        # first element of each tuple in 'ext_modules'
-        # must be the extension name (a string) and match
-        # a python dotted-separated name
-        exts = [('foo-bar', '')]
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_extensions_list(exts)
-
-        # second element of each tuple in 'ext_modules'
-        # must be a dictionary (build info)
-        exts = [('foo.bar', '')]
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_extensions_list(exts)
-
-        # ok this one should pass
-        exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', 'some': 'bar'})]
-        cmd.check_extensions_list(exts)
-        ext = exts[0]
-        assert isinstance(ext, Extension)
-
-        # check_extensions_list adds in ext the values passed
-        # when they are in ('include_dirs', 'library_dirs', 'libraries'
-        # 'extra_objects', 'extra_compile_args', 'extra_link_args')
-        assert ext.libraries == 'foo'
-        assert not hasattr(ext, 'some')
-
-        # 'macros' element of build info dict must be 1- or 2-tuple
-        exts = [
-            (
-                'foo.bar',
-                {
-                    'sources': [''],
-                    'libraries': 'foo',
-                    'some': 'bar',
-                    'macros': [('1', '2', '3'), 'foo'],
-                },
-            )
-        ]
-        with pytest.raises(DistutilsSetupError):
-            cmd.check_extensions_list(exts)
-
-        exts[0][1]['macros'] = [('1', '2'), ('3',)]
-        cmd.check_extensions_list(exts)
-        assert exts[0].undef_macros == ['3']
-        assert exts[0].define_macros == [('1', '2')]
-
-    def test_get_source_files(self):
-        modules = [Extension('foo', ['xxx'], optional=False)]
-        dist = Distribution({'name': 'xx', 'ext_modules': modules})
-        cmd = self.build_ext(dist)
-        cmd.ensure_finalized()
-        assert cmd.get_source_files() == ['xxx']
-
-    def test_unicode_module_names(self):
-        modules = [
-            Extension('foo', ['aaa'], optional=False),
-            Extension('föö', ['uuu'], optional=False),
-        ]
-        dist = Distribution({'name': 'xx', 'ext_modules': modules})
-        cmd = self.build_ext(dist)
-        cmd.ensure_finalized()
-        assert re.search(r'foo(_d)?\..*', cmd.get_ext_filename(modules[0].name))
-        assert re.search(r'föö(_d)?\..*', cmd.get_ext_filename(modules[1].name))
-        assert cmd.get_export_symbols(modules[0]) == ['PyInit_foo']
-        assert cmd.get_export_symbols(modules[1]) == ['PyInitU_f_1gaa']
-
-    def test_export_symbols__init__(self):
-        # https://github.com/python/cpython/issues/80074
-        # https://github.com/pypa/setuptools/issues/4826
-        modules = [
-            Extension('foo.__init__', ['aaa']),
-            Extension('föö.__init__', ['uuu']),
-        ]
-        dist = Distribution({'name': 'xx', 'ext_modules': modules})
-        cmd = self.build_ext(dist)
-        cmd.ensure_finalized()
-        assert cmd.get_export_symbols(modules[0]) == ['PyInit_foo']
-        assert cmd.get_export_symbols(modules[1]) == ['PyInitU_f_1gaa']
-
-    def test_compiler_option(self):
-        # cmd.compiler is an option and
-        # should not be overridden by a compiler instance
-        # when the command is run
-        dist = Distribution()
-        cmd = self.build_ext(dist)
-        cmd.compiler = 'unix'
-        cmd.ensure_finalized()
-        cmd.run()
-        assert cmd.compiler == 'unix'
-
-    def test_get_outputs(self):
-        missing_compiler_executable()
-        tmp_dir = self.mkdtemp()
-        c_file = os.path.join(tmp_dir, 'foo.c')
-        self.write_file(c_file, 'void PyInit_foo(void) {}\n')
-        ext = Extension('foo', [c_file], optional=False)
-        dist = Distribution({'name': 'xx', 'ext_modules': [ext]})
-        cmd = self.build_ext(dist)
-        fixup_build_ext(cmd)
-        cmd.ensure_finalized()
-        assert len(cmd.get_outputs()) == 1
-
-        cmd.build_lib = os.path.join(self.tmp_dir, 'build')
-        cmd.build_temp = os.path.join(self.tmp_dir, 'tempt')
-
-        # issue #5977 : distutils build_ext.get_outputs
-        # returns wrong result with --inplace
-        other_tmp_dir = os.path.realpath(self.mkdtemp())
-        old_wd = os.getcwd()
-        os.chdir(other_tmp_dir)
-        try:
-            cmd.inplace = True
-            cmd.run()
-            so_file = cmd.get_outputs()[0]
-        finally:
-            os.chdir(old_wd)
-        assert os.path.exists(so_file)
-        ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
-        assert so_file.endswith(ext_suffix)
-        so_dir = os.path.dirname(so_file)
-        assert so_dir == other_tmp_dir
-
-        cmd.inplace = False
-        cmd.compiler = None
-        cmd.run()
-        so_file = cmd.get_outputs()[0]
-        assert os.path.exists(so_file)
-        assert so_file.endswith(ext_suffix)
-        so_dir = os.path.dirname(so_file)
-        assert so_dir == cmd.build_lib
-
-        # inplace = False, cmd.package = 'bar'
-        build_py = cmd.get_finalized_command('build_py')
-        build_py.package_dir = {'': 'bar'}
-        path = cmd.get_ext_fullpath('foo')
-        # checking that the last directory is the build_dir
-        path = os.path.split(path)[0]
-        assert path == cmd.build_lib
-
-        # inplace = True, cmd.package = 'bar'
-        cmd.inplace = True
-        other_tmp_dir = os.path.realpath(self.mkdtemp())
-        old_wd = os.getcwd()
-        os.chdir(other_tmp_dir)
-        try:
-            path = cmd.get_ext_fullpath('foo')
-        finally:
-            os.chdir(old_wd)
-        # checking that the last directory is bar
-        path = os.path.split(path)[0]
-        lastdir = os.path.split(path)[-1]
-        assert lastdir == 'bar'
-
-    def test_ext_fullpath(self):
-        ext = sysconfig.get_config_var('EXT_SUFFIX')
-        # building lxml.etree inplace
-        # etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c')
-        # etree_ext = Extension('lxml.etree', [etree_c])
-        # dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]})
-        dist = Distribution()
-        cmd = self.build_ext(dist)
-        cmd.inplace = True
-        cmd.distribution.package_dir = {'': 'src'}
-        cmd.distribution.packages = ['lxml', 'lxml.html']
-        curdir = os.getcwd()
-        wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
-        path = cmd.get_ext_fullpath('lxml.etree')
-        assert wanted == path
-
-        # building lxml.etree not inplace
-        cmd.inplace = False
-        cmd.build_lib = os.path.join(curdir, 'tmpdir')
-        wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext)
-        path = cmd.get_ext_fullpath('lxml.etree')
-        assert wanted == path
-
-        # building twisted.runner.portmap not inplace
-        build_py = cmd.get_finalized_command('build_py')
-        build_py.package_dir = {}
-        cmd.distribution.packages = ['twisted', 'twisted.runner.portmap']
-        path = cmd.get_ext_fullpath('twisted.runner.portmap')
-        wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', 'portmap' + ext)
-        assert wanted == path
-
-        # building twisted.runner.portmap inplace
-        cmd.inplace = True
-        path = cmd.get_ext_fullpath('twisted.runner.portmap')
-        wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext)
-        assert wanted == path
-
-    @pytest.mark.skipif('platform.system() != "Darwin"')
-    @pytest.mark.usefixtures('save_env')
-    def test_deployment_target_default(self):
-        # Issue 9516: Test that, in the absence of the environment variable,
-        # an extension module is compiled with the same deployment target as
-        #  the interpreter.
-        self._try_compile_deployment_target('==', None)
-
-    @pytest.mark.skipif('platform.system() != "Darwin"')
-    @pytest.mark.usefixtures('save_env')
-    def test_deployment_target_too_low(self):
-        # Issue 9516: Test that an extension module is not allowed to be
-        # compiled with a deployment target less than that of the interpreter.
-        with pytest.raises(DistutilsPlatformError):
-            self._try_compile_deployment_target('>', '10.1')
-
-    @pytest.mark.skipif('platform.system() != "Darwin"')
-    @pytest.mark.usefixtures('save_env')
-    def test_deployment_target_higher_ok(self):  # pragma: no cover
-        # Issue 9516: Test that an extension module can be compiled with a
-        # deployment target higher than that of the interpreter: the ext
-        # module may depend on some newer OS feature.
-        deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
-        if deptarget:
-            # increment the minor version number (i.e. 10.6 -> 10.7)
-            deptarget = [int(x) for x in deptarget.split('.')]
-            deptarget[-1] += 1
-            deptarget = '.'.join(str(i) for i in deptarget)
-            self._try_compile_deployment_target('<', deptarget)
-
-    def _try_compile_deployment_target(self, operator, target):  # pragma: no cover
-        if target is None:
-            if os.environ.get('MACOSX_DEPLOYMENT_TARGET'):
-                del os.environ['MACOSX_DEPLOYMENT_TARGET']
-        else:
-            os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
-
-        jaraco.path.build(
-            {
-                'deptargetmodule.c': textwrap.dedent(f"""\
-                    #include 
-
-                    int dummy;
-
-                    #if TARGET {operator} MAC_OS_X_VERSION_MIN_REQUIRED
-                    #else
-                    #error "Unexpected target"
-                    #endif
-
-                    """),
-            },
-            self.tmp_path,
-        )
-
-        # get the deployment target that the interpreter was built with
-        target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
-        target = tuple(map(int, target.split('.')[0:2]))
-        # format the target value as defined in the Apple
-        # Availability Macros.  We can't use the macro names since
-        # at least one value we test with will not exist yet.
-        if target[:2] < (10, 10):
-            # for 10.1 through 10.9.x -> "10n0"
-            tmpl = '{:02}{:01}0'
-        else:
-            # for 10.10 and beyond -> "10nn00"
-            if len(target) >= 2:
-                tmpl = '{:02}{:02}00'
-            else:
-                # 11 and later can have no minor version (11 instead of 11.0)
-                tmpl = '{:02}0000'
-        target = tmpl.format(*target)
-        deptarget_ext = Extension(
-            'deptarget',
-            [self.tmp_path / 'deptargetmodule.c'],
-            extra_compile_args=[f'-DTARGET={target}'],
-        )
-        dist = Distribution({'name': 'deptarget', 'ext_modules': [deptarget_ext]})
-        dist.package_dir = self.tmp_dir
-        cmd = self.build_ext(dist)
-        cmd.build_lib = self.tmp_dir
-        cmd.build_temp = self.tmp_dir
-
-        try:
-            old_stdout = sys.stdout
-            if not support.verbose:
-                # silence compiler output
-                sys.stdout = StringIO()
-            try:
-                cmd.ensure_finalized()
-                cmd.run()
-            finally:
-                sys.stdout = old_stdout
-
-        except CompileError:
-            self.fail("Wrong deployment target during compilation")
-
-
-class TestParallelBuildExt(TestBuildExt):
-    def build_ext(self, *args, **kwargs):
-        build_ext = super().build_ext(*args, **kwargs)
-        build_ext.parallel = True
-        return build_ext
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_build_py.py b/voxvera/vendor/setuptools/_distutils/tests/test_build_py.py
deleted file mode 100644
index b316ed4..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_build_py.py
+++ /dev/null
@@ -1,196 +0,0 @@
-"""Tests for distutils.command.build_py."""
-
-import os
-import sys
-from distutils.command.build_py import build_py
-from distutils.core import Distribution
-from distutils.errors import DistutilsFileError
-from distutils.tests import support
-
-import jaraco.path
-import pytest
-
-
-@support.combine_markers
-class TestBuildPy(support.TempdirManager):
-    def test_package_data(self):
-        sources = self.mkdtemp()
-        jaraco.path.build(
-            {
-                '__init__.py': "# Pretend this is a package.",
-                'README.txt': 'Info about this package',
-            },
-            sources,
-        )
-
-        destination = self.mkdtemp()
-
-        dist = Distribution({"packages": ["pkg"], "package_dir": {"pkg": sources}})
-        # script_name need not exist, it just need to be initialized
-        dist.script_name = os.path.join(sources, "setup.py")
-        dist.command_obj["build"] = support.DummyCommand(
-            force=False, build_lib=destination
-        )
-        dist.packages = ["pkg"]
-        dist.package_data = {"pkg": ["README.txt"]}
-        dist.package_dir = {"pkg": sources}
-
-        cmd = build_py(dist)
-        cmd.compile = True
-        cmd.ensure_finalized()
-        assert cmd.package_data == dist.package_data
-
-        cmd.run()
-
-        # This makes sure the list of outputs includes byte-compiled
-        # files for Python modules but not for package data files
-        # (there shouldn't *be* byte-code files for those!).
-        assert len(cmd.get_outputs()) == 3
-        pkgdest = os.path.join(destination, "pkg")
-        files = os.listdir(pkgdest)
-        pycache_dir = os.path.join(pkgdest, "__pycache__")
-        assert "__init__.py" in files
-        assert "README.txt" in files
-        if sys.dont_write_bytecode:
-            assert not os.path.exists(pycache_dir)
-        else:
-            pyc_files = os.listdir(pycache_dir)
-            assert f"__init__.{sys.implementation.cache_tag}.pyc" in pyc_files
-
-    def test_empty_package_dir(self):
-        # See bugs #1668596/#1720897
-        sources = self.mkdtemp()
-        jaraco.path.build({'__init__.py': '', 'doc': {'testfile': ''}}, sources)
-
-        os.chdir(sources)
-        dist = Distribution({
-            "packages": ["pkg"],
-            "package_dir": {"pkg": ""},
-            "package_data": {"pkg": ["doc/*"]},
-        })
-        # script_name need not exist, it just need to be initialized
-        dist.script_name = os.path.join(sources, "setup.py")
-        dist.script_args = ["build"]
-        dist.parse_command_line()
-
-        try:
-            dist.run_commands()
-        except DistutilsFileError:
-            self.fail("failed package_data test when package_dir is ''")
-
-    @pytest.mark.skipif('sys.dont_write_bytecode')
-    def test_byte_compile(self):
-        project_dir, dist = self.create_dist(py_modules=['boiledeggs'])
-        os.chdir(project_dir)
-        self.write_file('boiledeggs.py', 'import antigravity')
-        cmd = build_py(dist)
-        cmd.compile = True
-        cmd.build_lib = 'here'
-        cmd.finalize_options()
-        cmd.run()
-
-        found = os.listdir(cmd.build_lib)
-        assert sorted(found) == ['__pycache__', 'boiledeggs.py']
-        found = os.listdir(os.path.join(cmd.build_lib, '__pycache__'))
-        assert found == [f'boiledeggs.{sys.implementation.cache_tag}.pyc']
-
-    @pytest.mark.skipif('sys.dont_write_bytecode')
-    def test_byte_compile_optimized(self):
-        project_dir, dist = self.create_dist(py_modules=['boiledeggs'])
-        os.chdir(project_dir)
-        self.write_file('boiledeggs.py', 'import antigravity')
-        cmd = build_py(dist)
-        cmd.compile = False
-        cmd.optimize = 1
-        cmd.build_lib = 'here'
-        cmd.finalize_options()
-        cmd.run()
-
-        found = os.listdir(cmd.build_lib)
-        assert sorted(found) == ['__pycache__', 'boiledeggs.py']
-        found = os.listdir(os.path.join(cmd.build_lib, '__pycache__'))
-        expect = f'boiledeggs.{sys.implementation.cache_tag}.opt-1.pyc'
-        assert sorted(found) == [expect]
-
-    def test_dir_in_package_data(self):
-        """
-        A directory in package_data should not be added to the filelist.
-        """
-        # See bug 19286
-        sources = self.mkdtemp()
-        jaraco.path.build(
-            {
-                'pkg': {
-                    '__init__.py': '',
-                    'doc': {
-                        'testfile': '',
-                        # create a directory that could be incorrectly detected as a file
-                        'otherdir': {},
-                    },
-                }
-            },
-            sources,
-        )
-
-        os.chdir(sources)
-        dist = Distribution({"packages": ["pkg"], "package_data": {"pkg": ["doc/*"]}})
-        # script_name need not exist, it just need to be initialized
-        dist.script_name = os.path.join(sources, "setup.py")
-        dist.script_args = ["build"]
-        dist.parse_command_line()
-
-        try:
-            dist.run_commands()
-        except DistutilsFileError:
-            self.fail("failed package_data when data dir includes a dir")
-
-    def test_dont_write_bytecode(self, caplog):
-        # makes sure byte_compile is not used
-        dist = self.create_dist()[1]
-        cmd = build_py(dist)
-        cmd.compile = True
-        cmd.optimize = 1
-
-        old_dont_write_bytecode = sys.dont_write_bytecode
-        sys.dont_write_bytecode = True
-        try:
-            cmd.byte_compile([])
-        finally:
-            sys.dont_write_bytecode = old_dont_write_bytecode
-
-        assert 'byte-compiling is disabled' in caplog.records[0].message
-
-    def test_namespace_package_does_not_warn(self, caplog):
-        """
-        Originally distutils implementation did not account for PEP 420
-        and included warns for package directories that did not contain
-        ``__init__.py`` files.
-        After the acceptance of PEP 420, these warnings don't make more sense
-        so we want to ensure there are not displayed to not confuse the users.
-        """
-        # Create a fake project structure with a package namespace:
-        tmp = self.mkdtemp()
-        jaraco.path.build({'ns': {'pkg': {'module.py': ''}}}, tmp)
-        os.chdir(tmp)
-
-        # Configure the package:
-        attrs = {
-            "name": "ns.pkg",
-            "packages": ["ns", "ns.pkg"],
-            "script_name": "setup.py",
-        }
-        dist = Distribution(attrs)
-
-        # Run code paths that would trigger the trap:
-        cmd = dist.get_command_obj("build_py")
-        cmd.finalize_options()
-        modules = cmd.find_all_modules()
-        assert len(modules) == 1
-        module_path = modules[0][-1]
-        assert module_path.replace(os.sep, "/") == "ns/pkg/module.py"
-
-        cmd.run()
-
-        assert not any(
-            "package init file" in msg and "not found" in msg for msg in caplog.messages
-        )
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_build_scripts.py b/voxvera/vendor/setuptools/_distutils/tests/test_build_scripts.py
deleted file mode 100644
index 3582f69..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_build_scripts.py
+++ /dev/null
@@ -1,96 +0,0 @@
-"""Tests for distutils.command.build_scripts."""
-
-import os
-import textwrap
-from distutils import sysconfig
-from distutils.command.build_scripts import build_scripts
-from distutils.core import Distribution
-from distutils.tests import support
-
-import jaraco.path
-
-
-class TestBuildScripts(support.TempdirManager):
-    def test_default_settings(self):
-        cmd = self.get_build_scripts_cmd("/foo/bar", [])
-        assert not cmd.force
-        assert cmd.build_dir is None
-
-        cmd.finalize_options()
-
-        assert cmd.force
-        assert cmd.build_dir == "/foo/bar"
-
-    def test_build(self):
-        source = self.mkdtemp()
-        target = self.mkdtemp()
-        expected = self.write_sample_scripts(source)
-
-        cmd = self.get_build_scripts_cmd(
-            target, [os.path.join(source, fn) for fn in expected]
-        )
-        cmd.finalize_options()
-        cmd.run()
-
-        built = os.listdir(target)
-        for name in expected:
-            assert name in built
-
-    def get_build_scripts_cmd(self, target, scripts):
-        import sys
-
-        dist = Distribution()
-        dist.scripts = scripts
-        dist.command_obj["build"] = support.DummyCommand(
-            build_scripts=target, force=True, executable=sys.executable
-        )
-        return build_scripts(dist)
-
-    @staticmethod
-    def write_sample_scripts(dir):
-        spec = {
-            'script1.py': textwrap.dedent("""
-                #! /usr/bin/env python2.3
-                # bogus script w/ Python sh-bang
-                pass
-                """).lstrip(),
-            'script2.py': textwrap.dedent("""
-                #!/usr/bin/python
-                # bogus script w/ Python sh-bang
-                pass
-                """).lstrip(),
-            'shell.sh': textwrap.dedent("""
-                #!/bin/sh
-                # bogus shell script w/ sh-bang
-                exit 0
-                """).lstrip(),
-        }
-        jaraco.path.build(spec, dir)
-        return list(spec)
-
-    def test_version_int(self):
-        source = self.mkdtemp()
-        target = self.mkdtemp()
-        expected = self.write_sample_scripts(source)
-
-        cmd = self.get_build_scripts_cmd(
-            target, [os.path.join(source, fn) for fn in expected]
-        )
-        cmd.finalize_options()
-
-        # https://bugs.python.org/issue4524
-        #
-        # On linux-g++-32 with command line `./configure --enable-ipv6
-        # --with-suffix=3`, python is compiled okay but the build scripts
-        # failed when writing the name of the executable
-        old = sysconfig.get_config_vars().get('VERSION')
-        sysconfig._config_vars['VERSION'] = 4
-        try:
-            cmd.run()
-        finally:
-            if old is not None:
-                sysconfig._config_vars['VERSION'] = old
-
-        built = os.listdir(target)
-        for name in expected:
-            assert name in built
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_check.py b/voxvera/vendor/setuptools/_distutils/tests/test_check.py
deleted file mode 100644
index b672b1f..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_check.py
+++ /dev/null
@@ -1,194 +0,0 @@
-"""Tests for distutils.command.check."""
-
-import os
-import textwrap
-from distutils.command.check import check
-from distutils.errors import DistutilsSetupError
-from distutils.tests import support
-
-import pytest
-
-try:
-    import pygments
-except ImportError:
-    pygments = None
-
-
-HERE = os.path.dirname(__file__)
-
-
-@support.combine_markers
-class TestCheck(support.TempdirManager):
-    def _run(self, metadata=None, cwd=None, **options):
-        if metadata is None:
-            metadata = {}
-        if cwd is not None:
-            old_dir = os.getcwd()
-            os.chdir(cwd)
-        pkg_info, dist = self.create_dist(**metadata)
-        cmd = check(dist)
-        cmd.initialize_options()
-        for name, value in options.items():
-            setattr(cmd, name, value)
-        cmd.ensure_finalized()
-        cmd.run()
-        if cwd is not None:
-            os.chdir(old_dir)
-        return cmd
-
-    def test_check_metadata(self):
-        # let's run the command with no metadata at all
-        # by default, check is checking the metadata
-        # should have some warnings
-        cmd = self._run()
-        assert cmd._warnings == 1
-
-        # now let's add the required fields
-        # and run it again, to make sure we don't get
-        # any warning anymore
-        metadata = {
-            'url': 'xxx',
-            'author': 'xxx',
-            'author_email': 'xxx',
-            'name': 'xxx',
-            'version': 'xxx',
-        }
-        cmd = self._run(metadata)
-        assert cmd._warnings == 0
-
-        # now with the strict mode, we should
-        # get an error if there are missing metadata
-        with pytest.raises(DistutilsSetupError):
-            self._run({}, **{'strict': 1})
-
-        # and of course, no error when all metadata are present
-        cmd = self._run(metadata, strict=True)
-        assert cmd._warnings == 0
-
-        # now a test with non-ASCII characters
-        metadata = {
-            'url': 'xxx',
-            'author': '\u00c9ric',
-            'author_email': 'xxx',
-            'name': 'xxx',
-            'version': 'xxx',
-            'description': 'Something about esszet \u00df',
-            'long_description': 'More things about esszet \u00df',
-        }
-        cmd = self._run(metadata)
-        assert cmd._warnings == 0
-
-    def test_check_author_maintainer(self):
-        for kind in ("author", "maintainer"):
-            # ensure no warning when author_email or maintainer_email is given
-            # (the spec allows these fields to take the form "Name ")
-            metadata = {
-                'url': 'xxx',
-                kind + '_email': 'Name ',
-                'name': 'xxx',
-                'version': 'xxx',
-            }
-            cmd = self._run(metadata)
-            assert cmd._warnings == 0
-
-            # the check should not warn if only email is given
-            metadata[kind + '_email'] = 'name@email.com'
-            cmd = self._run(metadata)
-            assert cmd._warnings == 0
-
-            # the check should not warn if only the name is given
-            metadata[kind] = "Name"
-            del metadata[kind + '_email']
-            cmd = self._run(metadata)
-            assert cmd._warnings == 0
-
-    def test_check_document(self):
-        pytest.importorskip('docutils')
-        pkg_info, dist = self.create_dist()
-        cmd = check(dist)
-
-        # let's see if it detects broken rest
-        broken_rest = 'title\n===\n\ntest'
-        msgs = cmd._check_rst_data(broken_rest)
-        assert len(msgs) == 1
-
-        # and non-broken rest
-        rest = 'title\n=====\n\ntest'
-        msgs = cmd._check_rst_data(rest)
-        assert len(msgs) == 0
-
-    def test_check_restructuredtext(self):
-        pytest.importorskip('docutils')
-        # let's see if it detects broken rest in long_description
-        broken_rest = 'title\n===\n\ntest'
-        pkg_info, dist = self.create_dist(long_description=broken_rest)
-        cmd = check(dist)
-        cmd.check_restructuredtext()
-        assert cmd._warnings == 1
-
-        # let's see if we have an error with strict=True
-        metadata = {
-            'url': 'xxx',
-            'author': 'xxx',
-            'author_email': 'xxx',
-            'name': 'xxx',
-            'version': 'xxx',
-            'long_description': broken_rest,
-        }
-        with pytest.raises(DistutilsSetupError):
-            self._run(metadata, **{'strict': 1, 'restructuredtext': 1})
-
-        # and non-broken rest, including a non-ASCII character to test #12114
-        metadata['long_description'] = 'title\n=====\n\ntest \u00df'
-        cmd = self._run(metadata, strict=True, restructuredtext=True)
-        assert cmd._warnings == 0
-
-        # check that includes work to test #31292
-        metadata['long_description'] = 'title\n=====\n\n.. include:: includetest.rst'
-        cmd = self._run(metadata, cwd=HERE, strict=True, restructuredtext=True)
-        assert cmd._warnings == 0
-
-    def test_check_restructuredtext_with_syntax_highlight(self):
-        pytest.importorskip('docutils')
-        # Don't fail if there is a `code` or `code-block` directive
-
-        example_rst_docs = [
-            textwrap.dedent(
-                """\
-            Here's some code:
-
-            .. code:: python
-
-                def foo():
-                    pass
-            """
-            ),
-            textwrap.dedent(
-                """\
-            Here's some code:
-
-            .. code-block:: python
-
-                def foo():
-                    pass
-            """
-            ),
-        ]
-
-        for rest_with_code in example_rst_docs:
-            pkg_info, dist = self.create_dist(long_description=rest_with_code)
-            cmd = check(dist)
-            cmd.check_restructuredtext()
-            msgs = cmd._check_rst_data(rest_with_code)
-            if pygments is not None:
-                assert len(msgs) == 0
-            else:
-                assert len(msgs) == 1
-                assert (
-                    str(msgs[0][1])
-                    == 'Cannot analyze code. Pygments package not found.'
-                )
-
-    def test_check_all(self):
-        with pytest.raises(DistutilsSetupError):
-            self._run({}, **{'strict': 1, 'restructuredtext': 1})
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_clean.py b/voxvera/vendor/setuptools/_distutils/tests/test_clean.py
deleted file mode 100644
index cc78f30..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_clean.py
+++ /dev/null
@@ -1,45 +0,0 @@
-"""Tests for distutils.command.clean."""
-
-import os
-from distutils.command.clean import clean
-from distutils.tests import support
-
-
-class TestClean(support.TempdirManager):
-    def test_simple_run(self):
-        pkg_dir, dist = self.create_dist()
-        cmd = clean(dist)
-
-        # let's add some elements clean should remove
-        dirs = [
-            (d, os.path.join(pkg_dir, d))
-            for d in (
-                'build_temp',
-                'build_lib',
-                'bdist_base',
-                'build_scripts',
-                'build_base',
-            )
-        ]
-
-        for name, path in dirs:
-            os.mkdir(path)
-            setattr(cmd, name, path)
-            if name == 'build_base':
-                continue
-            for f in ('one', 'two', 'three'):
-                self.write_file(os.path.join(path, f))
-
-        # let's run the command
-        cmd.all = 1
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # make sure the files where removed
-        for _name, path in dirs:
-            assert not os.path.exists(path), f'{path} was not removed'
-
-        # let's run the command again (should spit warnings but succeed)
-        cmd.all = 1
-        cmd.ensure_finalized()
-        cmd.run()
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_cmd.py b/voxvera/vendor/setuptools/_distutils/tests/test_cmd.py
deleted file mode 100644
index 76e8f59..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_cmd.py
+++ /dev/null
@@ -1,107 +0,0 @@
-"""Tests for distutils.cmd."""
-
-import os
-from distutils import debug
-from distutils.cmd import Command
-from distutils.dist import Distribution
-from distutils.errors import DistutilsOptionError
-
-import pytest
-
-
-class MyCmd(Command):
-    def initialize_options(self):
-        pass
-
-
-@pytest.fixture
-def cmd(request):
-    return MyCmd(Distribution())
-
-
-class TestCommand:
-    def test_ensure_string_list(self, cmd):
-        cmd.not_string_list = ['one', 2, 'three']
-        cmd.yes_string_list = ['one', 'two', 'three']
-        cmd.not_string_list2 = object()
-        cmd.yes_string_list2 = 'ok'
-        cmd.ensure_string_list('yes_string_list')
-        cmd.ensure_string_list('yes_string_list2')
-
-        with pytest.raises(DistutilsOptionError):
-            cmd.ensure_string_list('not_string_list')
-
-        with pytest.raises(DistutilsOptionError):
-            cmd.ensure_string_list('not_string_list2')
-
-        cmd.option1 = 'ok,dok'
-        cmd.ensure_string_list('option1')
-        assert cmd.option1 == ['ok', 'dok']
-
-        cmd.option2 = ['xxx', 'www']
-        cmd.ensure_string_list('option2')
-
-        cmd.option3 = ['ok', 2]
-        with pytest.raises(DistutilsOptionError):
-            cmd.ensure_string_list('option3')
-
-    def test_make_file(self, cmd):
-        # making sure it raises when infiles is not a string or a list/tuple
-        with pytest.raises(TypeError):
-            cmd.make_file(infiles=True, outfile='', func='func', args=())
-
-        # making sure execute gets called properly
-        def _execute(func, args, exec_msg, level):
-            assert exec_msg == 'generating out from in'
-
-        cmd.force = True
-        cmd.execute = _execute
-        cmd.make_file(infiles='in', outfile='out', func='func', args=())
-
-    def test_dump_options(self, cmd):
-        msgs = []
-
-        def _announce(msg, level):
-            msgs.append(msg)
-
-        cmd.announce = _announce
-        cmd.option1 = 1
-        cmd.option2 = 1
-        cmd.user_options = [('option1', '', ''), ('option2', '', '')]
-        cmd.dump_options()
-
-        wanted = ["command options for 'MyCmd':", '  option1 = 1', '  option2 = 1']
-        assert msgs == wanted
-
-    def test_ensure_string(self, cmd):
-        cmd.option1 = 'ok'
-        cmd.ensure_string('option1')
-
-        cmd.option2 = None
-        cmd.ensure_string('option2', 'xxx')
-        assert hasattr(cmd, 'option2')
-
-        cmd.option3 = 1
-        with pytest.raises(DistutilsOptionError):
-            cmd.ensure_string('option3')
-
-    def test_ensure_filename(self, cmd):
-        cmd.option1 = __file__
-        cmd.ensure_filename('option1')
-        cmd.option2 = 'xxx'
-        with pytest.raises(DistutilsOptionError):
-            cmd.ensure_filename('option2')
-
-    def test_ensure_dirname(self, cmd):
-        cmd.option1 = os.path.dirname(__file__) or os.curdir
-        cmd.ensure_dirname('option1')
-        cmd.option2 = 'xxx'
-        with pytest.raises(DistutilsOptionError):
-            cmd.ensure_dirname('option2')
-
-    def test_debug_print(self, cmd, capsys, monkeypatch):
-        cmd.debug_print('xxx')
-        assert capsys.readouterr().out == ''
-        monkeypatch.setattr(debug, 'DEBUG', True)
-        cmd.debug_print('xxx')
-        assert capsys.readouterr().out == 'xxx\n'
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_config_cmd.py b/voxvera/vendor/setuptools/_distutils/tests/test_config_cmd.py
deleted file mode 100644
index ebee2ef..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_config_cmd.py
+++ /dev/null
@@ -1,87 +0,0 @@
-"""Tests for distutils.command.config."""
-
-import os
-import sys
-from distutils._log import log
-from distutils.command.config import config, dump_file
-from distutils.tests import missing_compiler_executable, support
-
-import more_itertools
-import path
-import pytest
-
-
-@pytest.fixture(autouse=True)
-def info_log(request, monkeypatch):
-    self = request.instance
-    self._logs = []
-    monkeypatch.setattr(log, 'info', self._info)
-
-
-@support.combine_markers
-class TestConfig(support.TempdirManager):
-    def _info(self, msg, *args):
-        for line in msg.splitlines():
-            self._logs.append(line)
-
-    def test_dump_file(self):
-        this_file = path.Path(__file__).with_suffix('.py')
-        with this_file.open(encoding='utf-8') as f:
-            numlines = more_itertools.ilen(f)
-
-        dump_file(this_file, 'I am the header')
-        assert len(self._logs) == numlines + 1
-
-    @pytest.mark.skipif('platform.system() == "Windows"')
-    def test_search_cpp(self):
-        cmd = missing_compiler_executable(['preprocessor'])
-        if cmd is not None:
-            self.skipTest(f'The {cmd!r} command is not found')
-        pkg_dir, dist = self.create_dist()
-        cmd = config(dist)
-        cmd._check_compiler()
-        compiler = cmd.compiler
-        if sys.platform[:3] == "aix" and "xlc" in compiler.preprocessor[0].lower():
-            self.skipTest(
-                'xlc: The -E option overrides the -P, -o, and -qsyntaxonly options'
-            )
-
-        # simple pattern searches
-        match = cmd.search_cpp(pattern='xxx', body='/* xxx */')
-        assert match == 0
-
-        match = cmd.search_cpp(pattern='_configtest', body='/* xxx */')
-        assert match == 1
-
-    def test_finalize_options(self):
-        # finalize_options does a bit of transformation
-        # on options
-        pkg_dir, dist = self.create_dist()
-        cmd = config(dist)
-        cmd.include_dirs = f'one{os.pathsep}two'
-        cmd.libraries = 'one'
-        cmd.library_dirs = f'three{os.pathsep}four'
-        cmd.ensure_finalized()
-
-        assert cmd.include_dirs == ['one', 'two']
-        assert cmd.libraries == ['one']
-        assert cmd.library_dirs == ['three', 'four']
-
-    def test_clean(self):
-        # _clean removes files
-        tmp_dir = self.mkdtemp()
-        f1 = os.path.join(tmp_dir, 'one')
-        f2 = os.path.join(tmp_dir, 'two')
-
-        self.write_file(f1, 'xxx')
-        self.write_file(f2, 'xxx')
-
-        for f in (f1, f2):
-            assert os.path.exists(f)
-
-        pkg_dir, dist = self.create_dist()
-        cmd = config(dist)
-        cmd._clean(f1, f2)
-
-        for f in (f1, f2):
-            assert not os.path.exists(f)
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_core.py b/voxvera/vendor/setuptools/_distutils/tests/test_core.py
deleted file mode 100644
index bad3fb7..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_core.py
+++ /dev/null
@@ -1,130 +0,0 @@
-"""Tests for distutils.core."""
-
-import distutils.core
-import io
-import os
-import sys
-from distutils.dist import Distribution
-
-import pytest
-
-# setup script that uses __file__
-setup_using___file__ = """\
-
-__file__
-
-from distutils.core import setup
-setup()
-"""
-
-setup_prints_cwd = """\
-
-import os
-print(os.getcwd())
-
-from distutils.core import setup
-setup()
-"""
-
-setup_does_nothing = """\
-from distutils.core import setup
-setup()
-"""
-
-
-setup_defines_subclass = """\
-from distutils.core import setup
-from distutils.command.install import install as _install
-
-class install(_install):
-    sub_commands = _install.sub_commands + ['cmd']
-
-setup(cmdclass={'install': install})
-"""
-
-setup_within_if_main = """\
-from distutils.core import setup
-
-def main():
-    return setup(name="setup_within_if_main")
-
-if __name__ == "__main__":
-    main()
-"""
-
-
-@pytest.fixture(autouse=True)
-def save_stdout(monkeypatch):
-    monkeypatch.setattr(sys, 'stdout', sys.stdout)
-
-
-@pytest.fixture
-def temp_file(tmp_path):
-    return tmp_path / 'file'
-
-
-@pytest.mark.usefixtures('save_env')
-@pytest.mark.usefixtures('save_argv')
-class TestCore:
-    def test_run_setup_provides_file(self, temp_file):
-        # Make sure the script can use __file__; if that's missing, the test
-        # setup.py script will raise NameError.
-        temp_file.write_text(setup_using___file__, encoding='utf-8')
-        distutils.core.run_setup(temp_file)
-
-    def test_run_setup_preserves_sys_argv(self, temp_file):
-        # Make sure run_setup does not clobber sys.argv
-        argv_copy = sys.argv.copy()
-        temp_file.write_text(setup_does_nothing, encoding='utf-8')
-        distutils.core.run_setup(temp_file)
-        assert sys.argv == argv_copy
-
-    def test_run_setup_defines_subclass(self, temp_file):
-        # Make sure the script can use __file__; if that's missing, the test
-        # setup.py script will raise NameError.
-        temp_file.write_text(setup_defines_subclass, encoding='utf-8')
-        dist = distutils.core.run_setup(temp_file)
-        install = dist.get_command_obj('install')
-        assert 'cmd' in install.sub_commands
-
-    def test_run_setup_uses_current_dir(self, tmp_path):
-        """
-        Test that the setup script is run with the current directory
-        as its own current directory.
-        """
-        sys.stdout = io.StringIO()
-        cwd = os.getcwd()
-
-        # Create a directory and write the setup.py file there:
-        setup_py = tmp_path / 'setup.py'
-        setup_py.write_text(setup_prints_cwd, encoding='utf-8')
-        distutils.core.run_setup(setup_py)
-
-        output = sys.stdout.getvalue()
-        if output.endswith("\n"):
-            output = output[:-1]
-        assert cwd == output
-
-    def test_run_setup_within_if_main(self, temp_file):
-        temp_file.write_text(setup_within_if_main, encoding='utf-8')
-        dist = distutils.core.run_setup(temp_file, stop_after="config")
-        assert isinstance(dist, Distribution)
-        assert dist.get_name() == "setup_within_if_main"
-
-    def test_run_commands(self, temp_file):
-        sys.argv = ['setup.py', 'build']
-        temp_file.write_text(setup_within_if_main, encoding='utf-8')
-        dist = distutils.core.run_setup(temp_file, stop_after="commandline")
-        assert 'build' not in dist.have_run
-        distutils.core.run_commands(dist)
-        assert 'build' in dist.have_run
-
-    def test_debug_mode(self, capsys, monkeypatch):
-        # this covers the code called when DEBUG is set
-        sys.argv = ['setup.py', '--name']
-        distutils.core.setup(name='bar')
-        assert capsys.readouterr().out == 'bar\n'
-        monkeypatch.setattr(distutils.core, 'DEBUG', True)
-        distutils.core.setup(name='bar')
-        wanted = "options (after parsing config files):\n"
-        assert capsys.readouterr().out.startswith(wanted)
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_dir_util.py b/voxvera/vendor/setuptools/_distutils/tests/test_dir_util.py
deleted file mode 100644
index 326cb34..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_dir_util.py
+++ /dev/null
@@ -1,139 +0,0 @@
-"""Tests for distutils.dir_util."""
-
-import os
-import pathlib
-import stat
-import sys
-import unittest.mock as mock
-from distutils import dir_util, errors
-from distutils.dir_util import (
-    copy_tree,
-    create_tree,
-    ensure_relative,
-    mkpath,
-    remove_tree,
-)
-from distutils.tests import support
-
-import jaraco.path
-import path
-import pytest
-
-
-@pytest.fixture(autouse=True)
-def stuff(request, monkeypatch, distutils_managed_tempdir):
-    self = request.instance
-    tmp_dir = self.mkdtemp()
-    self.root_target = os.path.join(tmp_dir, 'deep')
-    self.target = os.path.join(self.root_target, 'here')
-    self.target2 = os.path.join(tmp_dir, 'deep2')
-
-
-class TestDirUtil(support.TempdirManager):
-    def test_mkpath_remove_tree_verbosity(self, caplog):
-        mkpath(self.target, verbose=False)
-        assert not caplog.records
-        remove_tree(self.root_target, verbose=False)
-
-        mkpath(self.target, verbose=True)
-        wanted = [f'creating {self.target}']
-        assert caplog.messages == wanted
-        caplog.clear()
-
-        remove_tree(self.root_target, verbose=True)
-        wanted = [f"removing '{self.root_target}' (and everything under it)"]
-        assert caplog.messages == wanted
-
-    @pytest.mark.skipif("platform.system() == 'Windows'")
-    def test_mkpath_with_custom_mode(self):
-        # Get and set the current umask value for testing mode bits.
-        umask = os.umask(0o002)
-        os.umask(umask)
-        mkpath(self.target, 0o700)
-        assert stat.S_IMODE(os.stat(self.target).st_mode) == 0o700 & ~umask
-        mkpath(self.target2, 0o555)
-        assert stat.S_IMODE(os.stat(self.target2).st_mode) == 0o555 & ~umask
-
-    def test_create_tree_verbosity(self, caplog):
-        create_tree(self.root_target, ['one', 'two', 'three'], verbose=False)
-        assert caplog.messages == []
-        remove_tree(self.root_target, verbose=False)
-
-        wanted = [f'creating {self.root_target}']
-        create_tree(self.root_target, ['one', 'two', 'three'], verbose=True)
-        assert caplog.messages == wanted
-
-        remove_tree(self.root_target, verbose=False)
-
-    def test_copy_tree_verbosity(self, caplog):
-        mkpath(self.target, verbose=False)
-
-        copy_tree(self.target, self.target2, verbose=False)
-        assert caplog.messages == []
-
-        remove_tree(self.root_target, verbose=False)
-
-        mkpath(self.target, verbose=False)
-        a_file = path.Path(self.target) / 'ok.txt'
-        jaraco.path.build({'ok.txt': 'some content'}, self.target)
-
-        wanted = [f'copying {a_file} -> {self.target2}']
-        copy_tree(self.target, self.target2, verbose=True)
-        assert caplog.messages == wanted
-
-        remove_tree(self.root_target, verbose=False)
-        remove_tree(self.target2, verbose=False)
-
-    def test_copy_tree_skips_nfs_temp_files(self):
-        mkpath(self.target, verbose=False)
-
-        jaraco.path.build({'ok.txt': 'some content', '.nfs123abc': ''}, self.target)
-
-        copy_tree(self.target, self.target2)
-        assert os.listdir(self.target2) == ['ok.txt']
-
-        remove_tree(self.root_target, verbose=False)
-        remove_tree(self.target2, verbose=False)
-
-    def test_ensure_relative(self):
-        if os.sep == '/':
-            assert ensure_relative('/home/foo') == 'home/foo'
-            assert ensure_relative('some/path') == 'some/path'
-        else:  # \\
-            assert ensure_relative('c:\\home\\foo') == 'c:home\\foo'
-            assert ensure_relative('home\\foo') == 'home\\foo'
-
-    def test_copy_tree_exception_in_listdir(self):
-        """
-        An exception in listdir should raise a DistutilsFileError
-        """
-        with (
-            mock.patch("os.listdir", side_effect=OSError()),
-            pytest.raises(errors.DistutilsFileError),
-        ):
-            src = self.tempdirs[-1]
-            dir_util.copy_tree(src, None)
-
-    def test_mkpath_exception_uncached(self, monkeypatch, tmp_path):
-        """
-        Caching should not remember failed attempts.
-
-        pypa/distutils#304
-        """
-
-        class FailPath(pathlib.Path):
-            def mkdir(self, *args, **kwargs):
-                raise OSError("Failed to create directory")
-
-            if sys.version_info < (3, 12):
-                _flavour = pathlib.Path()._flavour
-
-        target = tmp_path / 'foodir'
-
-        with pytest.raises(errors.DistutilsFileError):
-            mkpath(FailPath(target))
-
-        assert not target.exists()
-
-        mkpath(target)
-        assert target.exists()
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_dist.py b/voxvera/vendor/setuptools/_distutils/tests/test_dist.py
deleted file mode 100644
index 2c5beeb..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_dist.py
+++ /dev/null
@@ -1,552 +0,0 @@
-"""Tests for distutils.dist."""
-
-import email
-import email.generator
-import email.policy
-import functools
-import io
-import os
-import sys
-import textwrap
-import unittest.mock as mock
-import warnings
-from distutils.cmd import Command
-from distutils.dist import Distribution, fix_help_options
-from distutils.tests import support
-from typing import ClassVar
-
-import jaraco.path
-import pytest
-
-pydistutils_cfg = '.' * (os.name == 'posix') + 'pydistutils.cfg'
-
-
-class test_dist(Command):
-    """Sample distutils extension command."""
-
-    user_options: ClassVar[list[tuple[str, str, str]]] = [
-        ("sample-option=", "S", "help text"),
-    ]
-
-    def initialize_options(self):
-        self.sample_option = None
-
-
-class TestDistribution(Distribution):
-    """Distribution subclasses that avoids the default search for
-    configuration files.
-
-    The ._config_files attribute must be set before
-    .parse_config_files() is called.
-    """
-
-    def find_config_files(self):
-        return self._config_files
-
-
-@pytest.fixture
-def clear_argv():
-    del sys.argv[1:]
-
-
-@support.combine_markers
-@pytest.mark.usefixtures('save_env')
-@pytest.mark.usefixtures('save_argv')
-class TestDistributionBehavior(support.TempdirManager):
-    def create_distribution(self, configfiles=()):
-        d = TestDistribution()
-        d._config_files = configfiles
-        d.parse_config_files()
-        d.parse_command_line()
-        return d
-
-    def test_command_packages_unspecified(self, clear_argv):
-        sys.argv.append("build")
-        d = self.create_distribution()
-        assert d.get_command_packages() == ["distutils.command"]
-
-    def test_command_packages_cmdline(self, clear_argv):
-        from distutils.tests.test_dist import test_dist
-
-        sys.argv.extend([
-            "--command-packages",
-            "foo.bar,distutils.tests",
-            "test_dist",
-            "-Ssometext",
-        ])
-        d = self.create_distribution()
-        # let's actually try to load our test command:
-        assert d.get_command_packages() == [
-            "distutils.command",
-            "foo.bar",
-            "distutils.tests",
-        ]
-        cmd = d.get_command_obj("test_dist")
-        assert isinstance(cmd, test_dist)
-        assert cmd.sample_option == "sometext"
-
-    @pytest.mark.skipif(
-        'distutils' not in Distribution.parse_config_files.__module__,
-        reason='Cannot test when virtualenv has monkey-patched Distribution',
-    )
-    def test_venv_install_options(self, tmp_path, clear_argv):
-        sys.argv.append("install")
-        file = str(tmp_path / 'file')
-
-        fakepath = '/somedir'
-
-        jaraco.path.build({
-            file: f"""
-                    [install]
-                    install-base = {fakepath}
-                    install-platbase = {fakepath}
-                    install-lib = {fakepath}
-                    install-platlib = {fakepath}
-                    install-purelib = {fakepath}
-                    install-headers = {fakepath}
-                    install-scripts = {fakepath}
-                    install-data = {fakepath}
-                    prefix = {fakepath}
-                    exec-prefix = {fakepath}
-                    home = {fakepath}
-                    user = {fakepath}
-                    root = {fakepath}
-                    """,
-        })
-
-        # Base case: Not in a Virtual Environment
-        with mock.patch.multiple(sys, prefix='/a', base_prefix='/a'):
-            d = self.create_distribution([file])
-
-        option_tuple = (file, fakepath)
-
-        result_dict = {
-            'install_base': option_tuple,
-            'install_platbase': option_tuple,
-            'install_lib': option_tuple,
-            'install_platlib': option_tuple,
-            'install_purelib': option_tuple,
-            'install_headers': option_tuple,
-            'install_scripts': option_tuple,
-            'install_data': option_tuple,
-            'prefix': option_tuple,
-            'exec_prefix': option_tuple,
-            'home': option_tuple,
-            'user': option_tuple,
-            'root': option_tuple,
-        }
-
-        assert sorted(d.command_options.get('install').keys()) == sorted(
-            result_dict.keys()
-        )
-
-        for key, value in d.command_options.get('install').items():
-            assert value == result_dict[key]
-
-        # Test case: In a Virtual Environment
-        with mock.patch.multiple(sys, prefix='/a', base_prefix='/b'):
-            d = self.create_distribution([file])
-
-        for key in result_dict.keys():
-            assert key not in d.command_options.get('install', {})
-
-    def test_command_packages_configfile(self, tmp_path, clear_argv):
-        sys.argv.append("build")
-        file = str(tmp_path / "file")
-        jaraco.path.build({
-            file: """
-                    [global]
-                    command_packages = foo.bar, splat
-                    """,
-        })
-
-        d = self.create_distribution([file])
-        assert d.get_command_packages() == ["distutils.command", "foo.bar", "splat"]
-
-        # ensure command line overrides config:
-        sys.argv[1:] = ["--command-packages", "spork", "build"]
-        d = self.create_distribution([file])
-        assert d.get_command_packages() == ["distutils.command", "spork"]
-
-        # Setting --command-packages to '' should cause the default to
-        # be used even if a config file specified something else:
-        sys.argv[1:] = ["--command-packages", "", "build"]
-        d = self.create_distribution([file])
-        assert d.get_command_packages() == ["distutils.command"]
-
-    def test_empty_options(self, request):
-        # an empty options dictionary should not stay in the
-        # list of attributes
-
-        # catching warnings
-        warns = []
-
-        def _warn(msg):
-            warns.append(msg)
-
-        request.addfinalizer(
-            functools.partial(setattr, warnings, 'warn', warnings.warn)
-        )
-        warnings.warn = _warn
-        dist = Distribution(
-            attrs={
-                'author': 'xxx',
-                'name': 'xxx',
-                'version': 'xxx',
-                'url': 'xxxx',
-                'options': {},
-            }
-        )
-
-        assert len(warns) == 0
-        assert 'options' not in dir(dist)
-
-    def test_finalize_options(self):
-        attrs = {'keywords': 'one,two', 'platforms': 'one,two'}
-
-        dist = Distribution(attrs=attrs)
-        dist.finalize_options()
-
-        # finalize_option splits platforms and keywords
-        assert dist.metadata.platforms == ['one', 'two']
-        assert dist.metadata.keywords == ['one', 'two']
-
-        attrs = {'keywords': 'foo bar', 'platforms': 'foo bar'}
-        dist = Distribution(attrs=attrs)
-        dist.finalize_options()
-        assert dist.metadata.platforms == ['foo bar']
-        assert dist.metadata.keywords == ['foo bar']
-
-    def test_get_command_packages(self):
-        dist = Distribution()
-        assert dist.command_packages is None
-        cmds = dist.get_command_packages()
-        assert cmds == ['distutils.command']
-        assert dist.command_packages == ['distutils.command']
-
-        dist.command_packages = 'one,two'
-        cmds = dist.get_command_packages()
-        assert cmds == ['distutils.command', 'one', 'two']
-
-    def test_announce(self):
-        # make sure the level is known
-        dist = Distribution()
-        with pytest.raises(TypeError):
-            dist.announce('ok', level='ok2')
-
-    def test_find_config_files_disable(self, temp_home):
-        # Ticket #1180: Allow user to disable their home config file.
-        jaraco.path.build({pydistutils_cfg: '[distutils]\n'}, temp_home)
-
-        d = Distribution()
-        all_files = d.find_config_files()
-
-        d = Distribution(attrs={'script_args': ['--no-user-cfg']})
-        files = d.find_config_files()
-
-        # make sure --no-user-cfg disables the user cfg file
-        assert len(all_files) - 1 == len(files)
-
-    def test_script_args_list_coercion(self):
-        d = Distribution(attrs={'script_args': ('build', '--no-user-cfg')})
-
-        # make sure script_args is a list even if it started as a different iterable
-        assert d.script_args == ['build', '--no-user-cfg']
-
-    @pytest.mark.skipif(
-        'platform.system() == "Windows"',
-        reason='Windows does not honor chmod 000',
-    )
-    def test_find_config_files_permission_error(self, fake_home):
-        """
-        Finding config files should not fail when directory is inaccessible.
-        """
-        fake_home.joinpath(pydistutils_cfg).write_text('', encoding='utf-8')
-        fake_home.chmod(0o000)
-        Distribution().find_config_files()
-
-
-@pytest.mark.usefixtures('save_env')
-@pytest.mark.usefixtures('save_argv')
-class TestMetadata(support.TempdirManager):
-    def format_metadata(self, dist):
-        sio = io.StringIO()
-        dist.metadata.write_pkg_file(sio)
-        return sio.getvalue()
-
-    def test_simple_metadata(self):
-        attrs = {"name": "package", "version": "1.0"}
-        dist = Distribution(attrs)
-        meta = self.format_metadata(dist)
-        assert "Metadata-Version: 1.0" in meta
-        assert "provides:" not in meta.lower()
-        assert "requires:" not in meta.lower()
-        assert "obsoletes:" not in meta.lower()
-
-    def test_provides(self):
-        attrs = {
-            "name": "package",
-            "version": "1.0",
-            "provides": ["package", "package.sub"],
-        }
-        dist = Distribution(attrs)
-        assert dist.metadata.get_provides() == ["package", "package.sub"]
-        assert dist.get_provides() == ["package", "package.sub"]
-        meta = self.format_metadata(dist)
-        assert "Metadata-Version: 1.1" in meta
-        assert "requires:" not in meta.lower()
-        assert "obsoletes:" not in meta.lower()
-
-    def test_provides_illegal(self):
-        with pytest.raises(ValueError):
-            Distribution(
-                {"name": "package", "version": "1.0", "provides": ["my.pkg (splat)"]},
-            )
-
-    def test_requires(self):
-        attrs = {
-            "name": "package",
-            "version": "1.0",
-            "requires": ["other", "another (==1.0)"],
-        }
-        dist = Distribution(attrs)
-        assert dist.metadata.get_requires() == ["other", "another (==1.0)"]
-        assert dist.get_requires() == ["other", "another (==1.0)"]
-        meta = self.format_metadata(dist)
-        assert "Metadata-Version: 1.1" in meta
-        assert "provides:" not in meta.lower()
-        assert "Requires: other" in meta
-        assert "Requires: another (==1.0)" in meta
-        assert "obsoletes:" not in meta.lower()
-
-    def test_requires_illegal(self):
-        with pytest.raises(ValueError):
-            Distribution(
-                {"name": "package", "version": "1.0", "requires": ["my.pkg (splat)"]},
-            )
-
-    def test_requires_to_list(self):
-        attrs = {"name": "package", "requires": iter(["other"])}
-        dist = Distribution(attrs)
-        assert isinstance(dist.metadata.requires, list)
-
-    def test_obsoletes(self):
-        attrs = {
-            "name": "package",
-            "version": "1.0",
-            "obsoletes": ["other", "another (<1.0)"],
-        }
-        dist = Distribution(attrs)
-        assert dist.metadata.get_obsoletes() == ["other", "another (<1.0)"]
-        assert dist.get_obsoletes() == ["other", "another (<1.0)"]
-        meta = self.format_metadata(dist)
-        assert "Metadata-Version: 1.1" in meta
-        assert "provides:" not in meta.lower()
-        assert "requires:" not in meta.lower()
-        assert "Obsoletes: other" in meta
-        assert "Obsoletes: another (<1.0)" in meta
-
-    def test_obsoletes_illegal(self):
-        with pytest.raises(ValueError):
-            Distribution(
-                {"name": "package", "version": "1.0", "obsoletes": ["my.pkg (splat)"]},
-            )
-
-    def test_obsoletes_to_list(self):
-        attrs = {"name": "package", "obsoletes": iter(["other"])}
-        dist = Distribution(attrs)
-        assert isinstance(dist.metadata.obsoletes, list)
-
-    def test_classifier(self):
-        attrs = {
-            'name': 'Boa',
-            'version': '3.0',
-            'classifiers': ['Programming Language :: Python :: 3'],
-        }
-        dist = Distribution(attrs)
-        assert dist.get_classifiers() == ['Programming Language :: Python :: 3']
-        meta = self.format_metadata(dist)
-        assert 'Metadata-Version: 1.1' in meta
-
-    def test_classifier_invalid_type(self, caplog):
-        attrs = {
-            'name': 'Boa',
-            'version': '3.0',
-            'classifiers': ('Programming Language :: Python :: 3',),
-        }
-        d = Distribution(attrs)
-        # should have warning about passing a non-list
-        assert 'should be a list' in caplog.messages[0]
-        # should be converted to a list
-        assert isinstance(d.metadata.classifiers, list)
-        assert d.metadata.classifiers == list(attrs['classifiers'])
-
-    def test_keywords(self):
-        attrs = {
-            'name': 'Monty',
-            'version': '1.0',
-            'keywords': ['spam', 'eggs', 'life of brian'],
-        }
-        dist = Distribution(attrs)
-        assert dist.get_keywords() == ['spam', 'eggs', 'life of brian']
-
-    def test_keywords_invalid_type(self, caplog):
-        attrs = {
-            'name': 'Monty',
-            'version': '1.0',
-            'keywords': ('spam', 'eggs', 'life of brian'),
-        }
-        d = Distribution(attrs)
-        # should have warning about passing a non-list
-        assert 'should be a list' in caplog.messages[0]
-        # should be converted to a list
-        assert isinstance(d.metadata.keywords, list)
-        assert d.metadata.keywords == list(attrs['keywords'])
-
-    def test_platforms(self):
-        attrs = {
-            'name': 'Monty',
-            'version': '1.0',
-            'platforms': ['GNU/Linux', 'Some Evil Platform'],
-        }
-        dist = Distribution(attrs)
-        assert dist.get_platforms() == ['GNU/Linux', 'Some Evil Platform']
-
-    def test_platforms_invalid_types(self, caplog):
-        attrs = {
-            'name': 'Monty',
-            'version': '1.0',
-            'platforms': ('GNU/Linux', 'Some Evil Platform'),
-        }
-        d = Distribution(attrs)
-        # should have warning about passing a non-list
-        assert 'should be a list' in caplog.messages[0]
-        # should be converted to a list
-        assert isinstance(d.metadata.platforms, list)
-        assert d.metadata.platforms == list(attrs['platforms'])
-
-    def test_download_url(self):
-        attrs = {
-            'name': 'Boa',
-            'version': '3.0',
-            'download_url': 'http://example.org/boa',
-        }
-        dist = Distribution(attrs)
-        meta = self.format_metadata(dist)
-        assert 'Metadata-Version: 1.1' in meta
-
-    def test_long_description(self):
-        long_desc = textwrap.dedent(
-            """\
-        example::
-              We start here
-            and continue here
-          and end here."""
-        )
-        attrs = {"name": "package", "version": "1.0", "long_description": long_desc}
-
-        dist = Distribution(attrs)
-        meta = self.format_metadata(dist)
-        meta = meta.replace('\n' + 8 * ' ', '\n')
-        assert long_desc in meta
-
-    def test_custom_pydistutils(self, temp_home):
-        """
-        pydistutils.cfg is found
-        """
-        jaraco.path.build({pydistutils_cfg: ''}, temp_home)
-        config_path = temp_home / pydistutils_cfg
-
-        assert str(config_path) in Distribution().find_config_files()
-
-    def test_extra_pydistutils(self, monkeypatch, tmp_path):
-        jaraco.path.build({'overrides.cfg': ''}, tmp_path)
-        filename = tmp_path / 'overrides.cfg'
-        monkeypatch.setenv('DIST_EXTRA_CONFIG', str(filename))
-        assert str(filename) in Distribution().find_config_files()
-
-    def test_fix_help_options(self):
-        help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)]
-        fancy_options = fix_help_options(help_tuples)
-        assert fancy_options[0] == ('a', 'b', 'c')
-        assert fancy_options[1] == (1, 2, 3)
-
-    def test_show_help(self, request, capsys):
-        # smoke test, just makes sure some help is displayed
-        dist = Distribution()
-        sys.argv = []
-        dist.help = True
-        dist.script_name = 'setup.py'
-        dist.parse_command_line()
-
-        output = [
-            line for line in capsys.readouterr().out.split('\n') if line.strip() != ''
-        ]
-        assert output
-
-    def test_read_metadata(self):
-        attrs = {
-            "name": "package",
-            "version": "1.0",
-            "long_description": "desc",
-            "description": "xxx",
-            "download_url": "http://example.com",
-            "keywords": ['one', 'two'],
-            "requires": ['foo'],
-        }
-
-        dist = Distribution(attrs)
-        metadata = dist.metadata
-
-        # write it then reloads it
-        PKG_INFO = io.StringIO()
-        metadata.write_pkg_file(PKG_INFO)
-        PKG_INFO.seek(0)
-        metadata.read_pkg_file(PKG_INFO)
-
-        assert metadata.name == "package"
-        assert metadata.version == "1.0"
-        assert metadata.description == "xxx"
-        assert metadata.download_url == 'http://example.com'
-        assert metadata.keywords == ['one', 'two']
-        assert metadata.platforms is None
-        assert metadata.obsoletes is None
-        assert metadata.requires == ['foo']
-
-    def test_round_trip_through_email_generator(self):
-        """
-        In pypa/setuptools#4033, it was shown that once PKG-INFO is
-        re-generated using ``email.generator.Generator``, some control
-        characters might cause problems.
-        """
-        # Given a PKG-INFO file ...
-        attrs = {
-            "name": "package",
-            "version": "1.0",
-            "long_description": "hello\x0b\nworld\n",
-        }
-        dist = Distribution(attrs)
-        metadata = dist.metadata
-
-        with io.StringIO() as buffer:
-            metadata.write_pkg_file(buffer)
-            msg = buffer.getvalue()
-
-        # ... when it is read and re-written using stdlib's email library,
-        orig = email.message_from_string(msg)
-        policy = email.policy.EmailPolicy(
-            utf8=True,
-            mangle_from_=False,
-            max_line_length=0,
-        )
-        with io.StringIO() as buffer:
-            email.generator.Generator(buffer, policy=policy).flatten(orig)
-
-            buffer.seek(0)
-            regen = email.message_from_file(buffer)
-
-        # ... then it should be the same as the original
-        # (except for the specific line break characters)
-        orig_desc = set(orig["Description"].splitlines())
-        regen_desc = set(regen["Description"].splitlines())
-        assert regen_desc == orig_desc
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_extension.py b/voxvera/vendor/setuptools/_distutils/tests/test_extension.py
deleted file mode 100644
index 5e8e768..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_extension.py
+++ /dev/null
@@ -1,117 +0,0 @@
-"""Tests for distutils.extension."""
-
-import os
-import pathlib
-import warnings
-from distutils.extension import Extension, read_setup_file
-
-import pytest
-from test.support.warnings_helper import check_warnings
-
-
-class TestExtension:
-    def test_read_setup_file(self):
-        # trying to read a Setup file
-        # (sample extracted from the PyGame project)
-        setup = os.path.join(os.path.dirname(__file__), 'Setup.sample')
-
-        exts = read_setup_file(setup)
-        names = [ext.name for ext in exts]
-        names.sort()
-
-        # here are the extensions read_setup_file should have created
-        # out of the file
-        wanted = [
-            '_arraysurfarray',
-            '_camera',
-            '_numericsndarray',
-            '_numericsurfarray',
-            'base',
-            'bufferproxy',
-            'cdrom',
-            'color',
-            'constants',
-            'display',
-            'draw',
-            'event',
-            'fastevent',
-            'font',
-            'gfxdraw',
-            'image',
-            'imageext',
-            'joystick',
-            'key',
-            'mask',
-            'mixer',
-            'mixer_music',
-            'mouse',
-            'movie',
-            'overlay',
-            'pixelarray',
-            'pypm',
-            'rect',
-            'rwobject',
-            'scrap',
-            'surface',
-            'surflock',
-            'time',
-            'transform',
-        ]
-
-        assert names == wanted
-
-    def test_extension_init(self):
-        # the first argument, which is the name, must be a string
-        with pytest.raises(TypeError):
-            Extension(1, [])
-        ext = Extension('name', [])
-        assert ext.name == 'name'
-
-        # the second argument, which is the list of files, must
-        # be an iterable of strings or PathLike objects, and not a string
-        with pytest.raises(TypeError):
-            Extension('name', 'file')
-        with pytest.raises(TypeError):
-            Extension('name', ['file', 1])
-        ext = Extension('name', ['file1', 'file2'])
-        assert ext.sources == ['file1', 'file2']
-        ext = Extension('name', [pathlib.Path('file1'), pathlib.Path('file2')])
-        assert ext.sources == ['file1', 'file2']
-
-        # any non-string iterable of strings or PathLike objects should work
-        ext = Extension('name', ('file1', 'file2'))  # tuple
-        assert ext.sources == ['file1', 'file2']
-        ext = Extension('name', {'file1', 'file2'})  # set
-        assert sorted(ext.sources) == ['file1', 'file2']
-        ext = Extension('name', iter(['file1', 'file2']))  # iterator
-        assert ext.sources == ['file1', 'file2']
-        ext = Extension('name', [pathlib.Path('file1'), 'file2'])  # mixed types
-        assert ext.sources == ['file1', 'file2']
-
-        # others arguments have defaults
-        for attr in (
-            'include_dirs',
-            'define_macros',
-            'undef_macros',
-            'library_dirs',
-            'libraries',
-            'runtime_library_dirs',
-            'extra_objects',
-            'extra_compile_args',
-            'extra_link_args',
-            'export_symbols',
-            'swig_opts',
-            'depends',
-        ):
-            assert getattr(ext, attr) == []
-
-        assert ext.language is None
-        assert ext.optional is None
-
-        # if there are unknown keyword options, warn about them
-        with check_warnings() as w:
-            warnings.simplefilter('always')
-            ext = Extension('name', ['file1', 'file2'], chic=True)
-
-        assert len(w.warnings) == 1
-        assert str(w.warnings[0].message) == "Unknown Extension options: 'chic'"
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_file_util.py b/voxvera/vendor/setuptools/_distutils/tests/test_file_util.py
deleted file mode 100644
index a75d4a0..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_file_util.py
+++ /dev/null
@@ -1,95 +0,0 @@
-"""Tests for distutils.file_util."""
-
-import errno
-import os
-import unittest.mock as mock
-from distutils.errors import DistutilsFileError
-from distutils.file_util import copy_file, move_file
-
-import jaraco.path
-import pytest
-
-
-@pytest.fixture(autouse=True)
-def stuff(request, tmp_path):
-    self = request.instance
-    self.source = tmp_path / 'f1'
-    self.target = tmp_path / 'f2'
-    self.target_dir = tmp_path / 'd1'
-
-
-class TestFileUtil:
-    def test_move_file_verbosity(self, caplog):
-        jaraco.path.build({self.source: 'some content'})
-
-        move_file(self.source, self.target, verbose=False)
-        assert not caplog.messages
-
-        # back to original state
-        move_file(self.target, self.source, verbose=False)
-
-        move_file(self.source, self.target, verbose=True)
-        wanted = [f'moving {self.source} -> {self.target}']
-        assert caplog.messages == wanted
-
-        # back to original state
-        move_file(self.target, self.source, verbose=False)
-
-        caplog.clear()
-        # now the target is a dir
-        os.mkdir(self.target_dir)
-        move_file(self.source, self.target_dir, verbose=True)
-        wanted = [f'moving {self.source} -> {self.target_dir}']
-        assert caplog.messages == wanted
-
-    def test_move_file_exception_unpacking_rename(self):
-        # see issue 22182
-        with (
-            mock.patch("os.rename", side_effect=OSError("wrong", 1)),
-            pytest.raises(DistutilsFileError),
-        ):
-            jaraco.path.build({self.source: 'spam eggs'})
-            move_file(self.source, self.target, verbose=False)
-
-    def test_move_file_exception_unpacking_unlink(self):
-        # see issue 22182
-        with (
-            mock.patch("os.rename", side_effect=OSError(errno.EXDEV, "wrong")),
-            mock.patch("os.unlink", side_effect=OSError("wrong", 1)),
-            pytest.raises(DistutilsFileError),
-        ):
-            jaraco.path.build({self.source: 'spam eggs'})
-            move_file(self.source, self.target, verbose=False)
-
-    def test_copy_file_hard_link(self):
-        jaraco.path.build({self.source: 'some content'})
-        # Check first that copy_file() will not fall back on copying the file
-        # instead of creating the hard link.
-        try:
-            os.link(self.source, self.target)
-        except OSError as e:
-            self.skipTest(f'os.link: {e}')
-        else:
-            self.target.unlink()
-        st = os.stat(self.source)
-        copy_file(self.source, self.target, link='hard')
-        st2 = os.stat(self.source)
-        st3 = os.stat(self.target)
-        assert os.path.samestat(st, st2), (st, st2)
-        assert os.path.samestat(st2, st3), (st2, st3)
-        assert self.source.read_text(encoding='utf-8') == 'some content'
-
-    def test_copy_file_hard_link_failure(self):
-        # If hard linking fails, copy_file() falls back on copying file
-        # (some special filesystems don't support hard linking even under
-        #  Unix, see issue #8876).
-        jaraco.path.build({self.source: 'some content'})
-        st = os.stat(self.source)
-        with mock.patch("os.link", side_effect=OSError(0, "linking unsupported")):
-            copy_file(self.source, self.target, link='hard')
-        st2 = os.stat(self.source)
-        st3 = os.stat(self.target)
-        assert os.path.samestat(st, st2), (st, st2)
-        assert not os.path.samestat(st2, st3), (st2, st3)
-        for fn in (self.source, self.target):
-            assert fn.read_text(encoding='utf-8') == 'some content'
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_filelist.py b/voxvera/vendor/setuptools/_distutils/tests/test_filelist.py
deleted file mode 100644
index 130e6fb..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_filelist.py
+++ /dev/null
@@ -1,336 +0,0 @@
-"""Tests for distutils.filelist."""
-
-import logging
-import os
-import re
-from distutils import debug, filelist
-from distutils.errors import DistutilsTemplateError
-from distutils.filelist import FileList, glob_to_re, translate_pattern
-
-import jaraco.path
-import pytest
-
-from .compat import py39 as os_helper
-
-MANIFEST_IN = """\
-include ok
-include xo
-exclude xo
-include foo.tmp
-include buildout.cfg
-global-include *.x
-global-include *.txt
-global-exclude *.tmp
-recursive-include f *.oo
-recursive-exclude global *.x
-graft dir
-prune dir3
-"""
-
-
-def make_local_path(s):
-    """Converts '/' in a string to os.sep"""
-    return s.replace('/', os.sep)
-
-
-class TestFileList:
-    def assertNoWarnings(self, caplog):
-        warnings = [rec for rec in caplog.records if rec.levelno == logging.WARNING]
-        assert not warnings
-        caplog.clear()
-
-    def assertWarnings(self, caplog):
-        warnings = [rec for rec in caplog.records if rec.levelno == logging.WARNING]
-        assert warnings
-        caplog.clear()
-
-    def test_glob_to_re(self):
-        sep = os.sep
-        if os.sep == '\\':
-            sep = re.escape(os.sep)
-
-        for glob, regex in (
-            # simple cases
-            ('foo*', r'(?s:foo[^%(sep)s]*)\Z'),
-            ('foo?', r'(?s:foo[^%(sep)s])\Z'),
-            ('foo??', r'(?s:foo[^%(sep)s][^%(sep)s])\Z'),
-            # special cases
-            (r'foo\\*', r'(?s:foo\\\\[^%(sep)s]*)\Z'),
-            (r'foo\\\*', r'(?s:foo\\\\\\[^%(sep)s]*)\Z'),
-            ('foo????', r'(?s:foo[^%(sep)s][^%(sep)s][^%(sep)s][^%(sep)s])\Z'),
-            (r'foo\\??', r'(?s:foo\\\\[^%(sep)s][^%(sep)s])\Z'),
-        ):
-            regex = regex % {'sep': sep}
-            assert glob_to_re(glob) == regex
-
-    def test_process_template_line(self):
-        # testing  all MANIFEST.in template patterns
-        file_list = FileList()
-        mlp = make_local_path
-
-        # simulated file list
-        file_list.allfiles = [
-            'foo.tmp',
-            'ok',
-            'xo',
-            'four.txt',
-            'buildout.cfg',
-            # filelist does not filter out VCS directories,
-            # it's sdist that does
-            mlp('.hg/last-message.txt'),
-            mlp('global/one.txt'),
-            mlp('global/two.txt'),
-            mlp('global/files.x'),
-            mlp('global/here.tmp'),
-            mlp('f/o/f.oo'),
-            mlp('dir/graft-one'),
-            mlp('dir/dir2/graft2'),
-            mlp('dir3/ok'),
-            mlp('dir3/sub/ok.txt'),
-        ]
-
-        for line in MANIFEST_IN.split('\n'):
-            if line.strip() == '':
-                continue
-            file_list.process_template_line(line)
-
-        wanted = [
-            'ok',
-            'buildout.cfg',
-            'four.txt',
-            mlp('.hg/last-message.txt'),
-            mlp('global/one.txt'),
-            mlp('global/two.txt'),
-            mlp('f/o/f.oo'),
-            mlp('dir/graft-one'),
-            mlp('dir/dir2/graft2'),
-        ]
-
-        assert file_list.files == wanted
-
-    def test_debug_print(self, capsys, monkeypatch):
-        file_list = FileList()
-        file_list.debug_print('xxx')
-        assert capsys.readouterr().out == ''
-
-        monkeypatch.setattr(debug, 'DEBUG', True)
-        file_list.debug_print('xxx')
-        assert capsys.readouterr().out == 'xxx\n'
-
-    def test_set_allfiles(self):
-        file_list = FileList()
-        files = ['a', 'b', 'c']
-        file_list.set_allfiles(files)
-        assert file_list.allfiles == files
-
-    def test_remove_duplicates(self):
-        file_list = FileList()
-        file_list.files = ['a', 'b', 'a', 'g', 'c', 'g']
-        # files must be sorted beforehand (sdist does it)
-        file_list.sort()
-        file_list.remove_duplicates()
-        assert file_list.files == ['a', 'b', 'c', 'g']
-
-    def test_translate_pattern(self):
-        # not regex
-        assert hasattr(translate_pattern('a', anchor=True, is_regex=False), 'search')
-
-        # is a regex
-        regex = re.compile('a')
-        assert translate_pattern(regex, anchor=True, is_regex=True) == regex
-
-        # plain string flagged as regex
-        assert hasattr(translate_pattern('a', anchor=True, is_regex=True), 'search')
-
-        # glob support
-        assert translate_pattern('*.py', anchor=True, is_regex=False).search(
-            'filelist.py'
-        )
-
-    def test_exclude_pattern(self):
-        # return False if no match
-        file_list = FileList()
-        assert not file_list.exclude_pattern('*.py')
-
-        # return True if files match
-        file_list = FileList()
-        file_list.files = ['a.py', 'b.py']
-        assert file_list.exclude_pattern('*.py')
-
-        # test excludes
-        file_list = FileList()
-        file_list.files = ['a.py', 'a.txt']
-        file_list.exclude_pattern('*.py')
-        assert file_list.files == ['a.txt']
-
-    def test_include_pattern(self):
-        # return False if no match
-        file_list = FileList()
-        file_list.set_allfiles([])
-        assert not file_list.include_pattern('*.py')
-
-        # return True if files match
-        file_list = FileList()
-        file_list.set_allfiles(['a.py', 'b.txt'])
-        assert file_list.include_pattern('*.py')
-
-        # test * matches all files
-        file_list = FileList()
-        assert file_list.allfiles is None
-        file_list.set_allfiles(['a.py', 'b.txt'])
-        file_list.include_pattern('*')
-        assert file_list.allfiles == ['a.py', 'b.txt']
-
-    def test_process_template(self, caplog):
-        mlp = make_local_path
-        # invalid lines
-        file_list = FileList()
-        for action in (
-            'include',
-            'exclude',
-            'global-include',
-            'global-exclude',
-            'recursive-include',
-            'recursive-exclude',
-            'graft',
-            'prune',
-            'blarg',
-        ):
-            with pytest.raises(DistutilsTemplateError):
-                file_list.process_template_line(action)
-
-        # include
-        file_list = FileList()
-        file_list.set_allfiles(['a.py', 'b.txt', mlp('d/c.py')])
-
-        file_list.process_template_line('include *.py')
-        assert file_list.files == ['a.py']
-        self.assertNoWarnings(caplog)
-
-        file_list.process_template_line('include *.rb')
-        assert file_list.files == ['a.py']
-        self.assertWarnings(caplog)
-
-        # exclude
-        file_list = FileList()
-        file_list.files = ['a.py', 'b.txt', mlp('d/c.py')]
-
-        file_list.process_template_line('exclude *.py')
-        assert file_list.files == ['b.txt', mlp('d/c.py')]
-        self.assertNoWarnings(caplog)
-
-        file_list.process_template_line('exclude *.rb')
-        assert file_list.files == ['b.txt', mlp('d/c.py')]
-        self.assertWarnings(caplog)
-
-        # global-include
-        file_list = FileList()
-        file_list.set_allfiles(['a.py', 'b.txt', mlp('d/c.py')])
-
-        file_list.process_template_line('global-include *.py')
-        assert file_list.files == ['a.py', mlp('d/c.py')]
-        self.assertNoWarnings(caplog)
-
-        file_list.process_template_line('global-include *.rb')
-        assert file_list.files == ['a.py', mlp('d/c.py')]
-        self.assertWarnings(caplog)
-
-        # global-exclude
-        file_list = FileList()
-        file_list.files = ['a.py', 'b.txt', mlp('d/c.py')]
-
-        file_list.process_template_line('global-exclude *.py')
-        assert file_list.files == ['b.txt']
-        self.assertNoWarnings(caplog)
-
-        file_list.process_template_line('global-exclude *.rb')
-        assert file_list.files == ['b.txt']
-        self.assertWarnings(caplog)
-
-        # recursive-include
-        file_list = FileList()
-        file_list.set_allfiles(['a.py', mlp('d/b.py'), mlp('d/c.txt'), mlp('d/d/e.py')])
-
-        file_list.process_template_line('recursive-include d *.py')
-        assert file_list.files == [mlp('d/b.py'), mlp('d/d/e.py')]
-        self.assertNoWarnings(caplog)
-
-        file_list.process_template_line('recursive-include e *.py')
-        assert file_list.files == [mlp('d/b.py'), mlp('d/d/e.py')]
-        self.assertWarnings(caplog)
-
-        # recursive-exclude
-        file_list = FileList()
-        file_list.files = ['a.py', mlp('d/b.py'), mlp('d/c.txt'), mlp('d/d/e.py')]
-
-        file_list.process_template_line('recursive-exclude d *.py')
-        assert file_list.files == ['a.py', mlp('d/c.txt')]
-        self.assertNoWarnings(caplog)
-
-        file_list.process_template_line('recursive-exclude e *.py')
-        assert file_list.files == ['a.py', mlp('d/c.txt')]
-        self.assertWarnings(caplog)
-
-        # graft
-        file_list = FileList()
-        file_list.set_allfiles(['a.py', mlp('d/b.py'), mlp('d/d/e.py'), mlp('f/f.py')])
-
-        file_list.process_template_line('graft d')
-        assert file_list.files == [mlp('d/b.py'), mlp('d/d/e.py')]
-        self.assertNoWarnings(caplog)
-
-        file_list.process_template_line('graft e')
-        assert file_list.files == [mlp('d/b.py'), mlp('d/d/e.py')]
-        self.assertWarnings(caplog)
-
-        # prune
-        file_list = FileList()
-        file_list.files = ['a.py', mlp('d/b.py'), mlp('d/d/e.py'), mlp('f/f.py')]
-
-        file_list.process_template_line('prune d')
-        assert file_list.files == ['a.py', mlp('f/f.py')]
-        self.assertNoWarnings(caplog)
-
-        file_list.process_template_line('prune e')
-        assert file_list.files == ['a.py', mlp('f/f.py')]
-        self.assertWarnings(caplog)
-
-
-class TestFindAll:
-    @os_helper.skip_unless_symlink
-    def test_missing_symlink(self, temp_cwd):
-        os.symlink('foo', 'bar')
-        assert filelist.findall() == []
-
-    def test_basic_discovery(self, temp_cwd):
-        """
-        When findall is called with no parameters or with
-        '.' as the parameter, the dot should be omitted from
-        the results.
-        """
-        jaraco.path.build({'foo': {'file1.txt': ''}, 'bar': {'file2.txt': ''}})
-        file1 = os.path.join('foo', 'file1.txt')
-        file2 = os.path.join('bar', 'file2.txt')
-        expected = [file2, file1]
-        assert sorted(filelist.findall()) == expected
-
-    def test_non_local_discovery(self, tmp_path):
-        """
-        When findall is called with another path, the full
-        path name should be returned.
-        """
-        jaraco.path.build({'file1.txt': ''}, tmp_path)
-        expected = [str(tmp_path / 'file1.txt')]
-        assert filelist.findall(tmp_path) == expected
-
-    @os_helper.skip_unless_symlink
-    def test_symlink_loop(self, tmp_path):
-        jaraco.path.build(
-            {
-                'link-to-parent': jaraco.path.Symlink('.'),
-                'somefile': '',
-            },
-            tmp_path,
-        )
-        files = filelist.findall(tmp_path)
-        assert len(files) == 1
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_install.py b/voxvera/vendor/setuptools/_distutils/tests/test_install.py
deleted file mode 100644
index b3ffb2e..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_install.py
+++ /dev/null
@@ -1,245 +0,0 @@
-"""Tests for distutils.command.install."""
-
-import logging
-import os
-import pathlib
-import site
-import sys
-from distutils import sysconfig
-from distutils.command import install as install_module
-from distutils.command.build_ext import build_ext
-from distutils.command.install import INSTALL_SCHEMES, install
-from distutils.core import Distribution
-from distutils.errors import DistutilsOptionError
-from distutils.extension import Extension
-from distutils.tests import missing_compiler_executable, support
-from distutils.util import is_mingw
-
-import pytest
-
-
-def _make_ext_name(modname):
-    return modname + sysconfig.get_config_var('EXT_SUFFIX')
-
-
-@support.combine_markers
-@pytest.mark.usefixtures('save_env')
-class TestInstall(
-    support.TempdirManager,
-):
-    @pytest.mark.xfail(
-        'platform.system() == "Windows" and sys.version_info > (3, 11)',
-        reason="pypa/distutils#148",
-    )
-    def test_home_installation_scheme(self):
-        # This ensure two things:
-        # - that --home generates the desired set of directory names
-        # - test --home is supported on all platforms
-        builddir = self.mkdtemp()
-        destination = os.path.join(builddir, "installation")
-
-        dist = Distribution({"name": "foopkg"})
-        # script_name need not exist, it just need to be initialized
-        dist.script_name = os.path.join(builddir, "setup.py")
-        dist.command_obj["build"] = support.DummyCommand(
-            build_base=builddir,
-            build_lib=os.path.join(builddir, "lib"),
-        )
-
-        cmd = install(dist)
-        cmd.home = destination
-        cmd.ensure_finalized()
-
-        assert cmd.install_base == destination
-        assert cmd.install_platbase == destination
-
-        def check_path(got, expected):
-            got = os.path.normpath(got)
-            expected = os.path.normpath(expected)
-            assert got == expected
-
-        impl_name = sys.implementation.name.replace("cpython", "python")
-        libdir = os.path.join(destination, "lib", impl_name)
-        check_path(cmd.install_lib, libdir)
-        _platlibdir = getattr(sys, "platlibdir", "lib")
-        platlibdir = os.path.join(destination, _platlibdir, impl_name)
-        check_path(cmd.install_platlib, platlibdir)
-        check_path(cmd.install_purelib, libdir)
-        check_path(
-            cmd.install_headers,
-            os.path.join(destination, "include", impl_name, "foopkg"),
-        )
-        check_path(cmd.install_scripts, os.path.join(destination, "bin"))
-        check_path(cmd.install_data, destination)
-
-    def test_user_site(self, monkeypatch):
-        # test install with --user
-        # preparing the environment for the test
-        self.tmpdir = self.mkdtemp()
-        orig_site = site.USER_SITE
-        orig_base = site.USER_BASE
-        monkeypatch.setattr(site, 'USER_BASE', os.path.join(self.tmpdir, 'B'))
-        monkeypatch.setattr(site, 'USER_SITE', os.path.join(self.tmpdir, 'S'))
-        monkeypatch.setattr(install_module, 'USER_BASE', site.USER_BASE)
-        monkeypatch.setattr(install_module, 'USER_SITE', site.USER_SITE)
-
-        def _expanduser(path):
-            if path.startswith('~'):
-                return os.path.normpath(self.tmpdir + path[1:])
-            return path
-
-        monkeypatch.setattr(os.path, 'expanduser', _expanduser)
-
-        for key in ('nt_user', 'posix_user'):
-            assert key in INSTALL_SCHEMES
-
-        dist = Distribution({'name': 'xx'})
-        cmd = install(dist)
-
-        # making sure the user option is there
-        options = [name for name, short, label in cmd.user_options]
-        assert 'user' in options
-
-        # setting a value
-        cmd.user = True
-
-        # user base and site shouldn't be created yet
-        assert not os.path.exists(site.USER_BASE)
-        assert not os.path.exists(site.USER_SITE)
-
-        # let's run finalize
-        cmd.ensure_finalized()
-
-        # now they should
-        assert os.path.exists(site.USER_BASE)
-        assert os.path.exists(site.USER_SITE)
-
-        assert 'userbase' in cmd.config_vars
-        assert 'usersite' in cmd.config_vars
-
-        actual_headers = os.path.relpath(cmd.install_headers, site.USER_BASE)
-        if os.name == 'nt' and not is_mingw():
-            site_path = os.path.relpath(os.path.dirname(orig_site), orig_base)
-            include = os.path.join(site_path, 'Include')
-        else:
-            include = sysconfig.get_python_inc(0, '')
-        expect_headers = os.path.join(include, 'xx')
-
-        assert os.path.normcase(actual_headers) == os.path.normcase(expect_headers)
-
-    def test_handle_extra_path(self):
-        dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'})
-        cmd = install(dist)
-
-        # two elements
-        cmd.handle_extra_path()
-        assert cmd.extra_path == ['path', 'dirs']
-        assert cmd.extra_dirs == 'dirs'
-        assert cmd.path_file == 'path'
-
-        # one element
-        cmd.extra_path = ['path']
-        cmd.handle_extra_path()
-        assert cmd.extra_path == ['path']
-        assert cmd.extra_dirs == 'path'
-        assert cmd.path_file == 'path'
-
-        # none
-        dist.extra_path = cmd.extra_path = None
-        cmd.handle_extra_path()
-        assert cmd.extra_path is None
-        assert cmd.extra_dirs == ''
-        assert cmd.path_file is None
-
-        # three elements (no way !)
-        cmd.extra_path = 'path,dirs,again'
-        with pytest.raises(DistutilsOptionError):
-            cmd.handle_extra_path()
-
-    def test_finalize_options(self):
-        dist = Distribution({'name': 'xx'})
-        cmd = install(dist)
-
-        # must supply either prefix/exec-prefix/home or
-        # install-base/install-platbase -- not both
-        cmd.prefix = 'prefix'
-        cmd.install_base = 'base'
-        with pytest.raises(DistutilsOptionError):
-            cmd.finalize_options()
-
-        # must supply either home or prefix/exec-prefix -- not both
-        cmd.install_base = None
-        cmd.home = 'home'
-        with pytest.raises(DistutilsOptionError):
-            cmd.finalize_options()
-
-        # can't combine user with prefix/exec_prefix/home or
-        # install_(plat)base
-        cmd.prefix = None
-        cmd.user = 'user'
-        with pytest.raises(DistutilsOptionError):
-            cmd.finalize_options()
-
-    def test_record(self):
-        install_dir = self.mkdtemp()
-        project_dir, dist = self.create_dist(py_modules=['hello'], scripts=['sayhi'])
-        os.chdir(project_dir)
-        self.write_file('hello.py', "def main(): print('o hai')")
-        self.write_file('sayhi', 'from hello import main; main()')
-
-        cmd = install(dist)
-        dist.command_obj['install'] = cmd
-        cmd.root = install_dir
-        cmd.record = os.path.join(project_dir, 'filelist')
-        cmd.ensure_finalized()
-        cmd.run()
-
-        content = pathlib.Path(cmd.record).read_text(encoding='utf-8')
-
-        found = [pathlib.Path(line).name for line in content.splitlines()]
-        expected = [
-            'hello.py',
-            f'hello.{sys.implementation.cache_tag}.pyc',
-            'sayhi',
-            'UNKNOWN-0.0.0-py{}.{}.egg-info'.format(*sys.version_info[:2]),
-        ]
-        assert found == expected
-
-    def test_record_extensions(self):
-        cmd = missing_compiler_executable()
-        if cmd is not None:
-            pytest.skip(f'The {cmd!r} command is not found')
-        install_dir = self.mkdtemp()
-        project_dir, dist = self.create_dist(
-            ext_modules=[Extension('xx', ['xxmodule.c'])]
-        )
-        os.chdir(project_dir)
-        support.copy_xxmodule_c(project_dir)
-
-        buildextcmd = build_ext(dist)
-        support.fixup_build_ext(buildextcmd)
-        buildextcmd.ensure_finalized()
-
-        cmd = install(dist)
-        dist.command_obj['install'] = cmd
-        dist.command_obj['build_ext'] = buildextcmd
-        cmd.root = install_dir
-        cmd.record = os.path.join(project_dir, 'filelist')
-        cmd.ensure_finalized()
-        cmd.run()
-
-        content = pathlib.Path(cmd.record).read_text(encoding='utf-8')
-
-        found = [pathlib.Path(line).name for line in content.splitlines()]
-        expected = [
-            _make_ext_name('xx'),
-            'UNKNOWN-0.0.0-py{}.{}.egg-info'.format(*sys.version_info[:2]),
-        ]
-        assert found == expected
-
-    def test_debug_mode(self, caplog, monkeypatch):
-        # this covers the code called when DEBUG is set
-        monkeypatch.setattr(install_module, 'DEBUG', True)
-        caplog.set_level(logging.DEBUG)
-        self.test_record()
-        assert any(rec for rec in caplog.records if rec.levelno == logging.DEBUG)
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_install_data.py b/voxvera/vendor/setuptools/_distutils/tests/test_install_data.py
deleted file mode 100644
index c800f86..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_install_data.py
+++ /dev/null
@@ -1,74 +0,0 @@
-"""Tests for distutils.command.install_data."""
-
-import os
-import pathlib
-from distutils.command.install_data import install_data
-from distutils.tests import support
-
-import pytest
-
-
-@pytest.mark.usefixtures('save_env')
-class TestInstallData(
-    support.TempdirManager,
-):
-    def test_simple_run(self):
-        pkg_dir, dist = self.create_dist()
-        cmd = install_data(dist)
-        cmd.install_dir = inst = os.path.join(pkg_dir, 'inst')
-
-        # data_files can contain
-        #  - simple files
-        #  - a Path object
-        #  - a tuple with a path, and a list of file
-        one = os.path.join(pkg_dir, 'one')
-        self.write_file(one, 'xxx')
-        inst2 = os.path.join(pkg_dir, 'inst2')
-        two = os.path.join(pkg_dir, 'two')
-        self.write_file(two, 'xxx')
-        three = pathlib.Path(pkg_dir) / 'three'
-        self.write_file(three, 'xxx')
-
-        cmd.data_files = [one, (inst2, [two]), three]
-        assert cmd.get_inputs() == [one, (inst2, [two]), three]
-
-        # let's run the command
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # let's check the result
-        assert len(cmd.get_outputs()) == 3
-        rthree = os.path.split(one)[-1]
-        assert os.path.exists(os.path.join(inst, rthree))
-        rtwo = os.path.split(two)[-1]
-        assert os.path.exists(os.path.join(inst2, rtwo))
-        rone = os.path.split(one)[-1]
-        assert os.path.exists(os.path.join(inst, rone))
-        cmd.outfiles = []
-
-        # let's try with warn_dir one
-        cmd.warn_dir = True
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # let's check the result
-        assert len(cmd.get_outputs()) == 3
-        assert os.path.exists(os.path.join(inst, rthree))
-        assert os.path.exists(os.path.join(inst2, rtwo))
-        assert os.path.exists(os.path.join(inst, rone))
-        cmd.outfiles = []
-
-        # now using root and empty dir
-        cmd.root = os.path.join(pkg_dir, 'root')
-        inst5 = os.path.join(pkg_dir, 'inst5')
-        four = os.path.join(cmd.install_dir, 'four')
-        self.write_file(four, 'xx')
-        cmd.data_files = [one, (inst2, [two]), three, ('inst5', [four]), (inst5, [])]
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # let's check the result
-        assert len(cmd.get_outputs()) == 5
-        assert os.path.exists(os.path.join(inst, rthree))
-        assert os.path.exists(os.path.join(inst2, rtwo))
-        assert os.path.exists(os.path.join(inst, rone))
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_install_headers.py b/voxvera/vendor/setuptools/_distutils/tests/test_install_headers.py
deleted file mode 100644
index 2c74f06..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_install_headers.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""Tests for distutils.command.install_headers."""
-
-import os
-from distutils.command.install_headers import install_headers
-from distutils.tests import support
-
-import pytest
-
-
-@pytest.mark.usefixtures('save_env')
-class TestInstallHeaders(
-    support.TempdirManager,
-):
-    def test_simple_run(self):
-        # we have two headers
-        header_list = self.mkdtemp()
-        header1 = os.path.join(header_list, 'header1')
-        header2 = os.path.join(header_list, 'header2')
-        self.write_file(header1)
-        self.write_file(header2)
-        headers = [header1, header2]
-
-        pkg_dir, dist = self.create_dist(headers=headers)
-        cmd = install_headers(dist)
-        assert cmd.get_inputs() == headers
-
-        # let's run the command
-        cmd.install_dir = os.path.join(pkg_dir, 'inst')
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # let's check the results
-        assert len(cmd.get_outputs()) == 2
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_install_lib.py b/voxvera/vendor/setuptools/_distutils/tests/test_install_lib.py
deleted file mode 100644
index f685a57..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_install_lib.py
+++ /dev/null
@@ -1,110 +0,0 @@
-"""Tests for distutils.command.install_data."""
-
-import importlib.util
-import os
-import sys
-from distutils.command.install_lib import install_lib
-from distutils.errors import DistutilsOptionError
-from distutils.extension import Extension
-from distutils.tests import support
-
-import pytest
-
-
-@support.combine_markers
-@pytest.mark.usefixtures('save_env')
-class TestInstallLib(
-    support.TempdirManager,
-):
-    def test_finalize_options(self):
-        dist = self.create_dist()[1]
-        cmd = install_lib(dist)
-
-        cmd.finalize_options()
-        assert cmd.compile == 1
-        assert cmd.optimize == 0
-
-        # optimize must be 0, 1, or 2
-        cmd.optimize = 'foo'
-        with pytest.raises(DistutilsOptionError):
-            cmd.finalize_options()
-        cmd.optimize = '4'
-        with pytest.raises(DistutilsOptionError):
-            cmd.finalize_options()
-
-        cmd.optimize = '2'
-        cmd.finalize_options()
-        assert cmd.optimize == 2
-
-    @pytest.mark.skipif('sys.dont_write_bytecode')
-    def test_byte_compile(self):
-        project_dir, dist = self.create_dist()
-        os.chdir(project_dir)
-        cmd = install_lib(dist)
-        cmd.compile = cmd.optimize = 1
-
-        f = os.path.join(project_dir, 'foo.py')
-        self.write_file(f, '# python file')
-        cmd.byte_compile([f])
-        pyc_file = importlib.util.cache_from_source('foo.py', optimization='')
-        pyc_opt_file = importlib.util.cache_from_source(
-            'foo.py', optimization=cmd.optimize
-        )
-        assert os.path.exists(pyc_file)
-        assert os.path.exists(pyc_opt_file)
-
-    def test_get_outputs(self):
-        project_dir, dist = self.create_dist()
-        os.chdir(project_dir)
-        os.mkdir('spam')
-        cmd = install_lib(dist)
-
-        # setting up a dist environment
-        cmd.compile = cmd.optimize = 1
-        cmd.install_dir = self.mkdtemp()
-        f = os.path.join(project_dir, 'spam', '__init__.py')
-        self.write_file(f, '# python package')
-        cmd.distribution.ext_modules = [Extension('foo', ['xxx'])]
-        cmd.distribution.packages = ['spam']
-        cmd.distribution.script_name = 'setup.py'
-
-        # get_outputs should return 4 elements: spam/__init__.py and .pyc,
-        # foo.import-tag-abiflags.so / foo.pyd
-        outputs = cmd.get_outputs()
-        assert len(outputs) == 4, outputs
-
-    def test_get_inputs(self):
-        project_dir, dist = self.create_dist()
-        os.chdir(project_dir)
-        os.mkdir('spam')
-        cmd = install_lib(dist)
-
-        # setting up a dist environment
-        cmd.compile = cmd.optimize = 1
-        cmd.install_dir = self.mkdtemp()
-        f = os.path.join(project_dir, 'spam', '__init__.py')
-        self.write_file(f, '# python package')
-        cmd.distribution.ext_modules = [Extension('foo', ['xxx'])]
-        cmd.distribution.packages = ['spam']
-        cmd.distribution.script_name = 'setup.py'
-
-        # get_inputs should return 2 elements: spam/__init__.py and
-        # foo.import-tag-abiflags.so / foo.pyd
-        inputs = cmd.get_inputs()
-        assert len(inputs) == 2, inputs
-
-    def test_dont_write_bytecode(self, caplog):
-        # makes sure byte_compile is not used
-        dist = self.create_dist()[1]
-        cmd = install_lib(dist)
-        cmd.compile = True
-        cmd.optimize = 1
-
-        old_dont_write_bytecode = sys.dont_write_bytecode
-        sys.dont_write_bytecode = True
-        try:
-            cmd.byte_compile([])
-        finally:
-            sys.dont_write_bytecode = old_dont_write_bytecode
-
-        assert 'byte-compiling is disabled' in caplog.messages[0]
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_install_scripts.py b/voxvera/vendor/setuptools/_distutils/tests/test_install_scripts.py
deleted file mode 100644
index 868b1c2..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_install_scripts.py
+++ /dev/null
@@ -1,52 +0,0 @@
-"""Tests for distutils.command.install_scripts."""
-
-import os
-from distutils.command.install_scripts import install_scripts
-from distutils.core import Distribution
-from distutils.tests import support
-
-from . import test_build_scripts
-
-
-class TestInstallScripts(support.TempdirManager):
-    def test_default_settings(self):
-        dist = Distribution()
-        dist.command_obj["build"] = support.DummyCommand(build_scripts="/foo/bar")
-        dist.command_obj["install"] = support.DummyCommand(
-            install_scripts="/splat/funk",
-            force=True,
-            skip_build=True,
-        )
-        cmd = install_scripts(dist)
-        assert not cmd.force
-        assert not cmd.skip_build
-        assert cmd.build_dir is None
-        assert cmd.install_dir is None
-
-        cmd.finalize_options()
-
-        assert cmd.force
-        assert cmd.skip_build
-        assert cmd.build_dir == "/foo/bar"
-        assert cmd.install_dir == "/splat/funk"
-
-    def test_installation(self):
-        source = self.mkdtemp()
-
-        expected = test_build_scripts.TestBuildScripts.write_sample_scripts(source)
-
-        target = self.mkdtemp()
-        dist = Distribution()
-        dist.command_obj["build"] = support.DummyCommand(build_scripts=source)
-        dist.command_obj["install"] = support.DummyCommand(
-            install_scripts=target,
-            force=True,
-            skip_build=True,
-        )
-        cmd = install_scripts(dist)
-        cmd.finalize_options()
-        cmd.run()
-
-        installed = os.listdir(target)
-        for name in expected:
-            assert name in installed
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_log.py b/voxvera/vendor/setuptools/_distutils/tests/test_log.py
deleted file mode 100644
index d67779f..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_log.py
+++ /dev/null
@@ -1,12 +0,0 @@
-"""Tests for distutils.log"""
-
-import logging
-from distutils._log import log
-
-
-class TestLog:
-    def test_non_ascii(self, caplog):
-        caplog.set_level(logging.DEBUG)
-        log.debug('Dεbug\tMėssãge')
-        log.fatal('Fαtal\tÈrrōr')
-        assert caplog.messages == ['Dεbug\tMėssãge', 'Fαtal\tÈrrōr']
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_modified.py b/voxvera/vendor/setuptools/_distutils/tests/test_modified.py
deleted file mode 100644
index e35cec2..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_modified.py
+++ /dev/null
@@ -1,126 +0,0 @@
-"""Tests for distutils._modified."""
-
-import os
-import types
-from distutils._modified import newer, newer_group, newer_pairwise, newer_pairwise_group
-from distutils.errors import DistutilsFileError
-from distutils.tests import support
-
-import pytest
-
-
-class TestDepUtil(support.TempdirManager):
-    def test_newer(self):
-        tmpdir = self.mkdtemp()
-        new_file = os.path.join(tmpdir, 'new')
-        old_file = os.path.abspath(__file__)
-
-        # Raise DistutilsFileError if 'new_file' does not exist.
-        with pytest.raises(DistutilsFileError):
-            newer(new_file, old_file)
-
-        # Return true if 'new_file' exists and is more recently modified than
-        # 'old_file', or if 'new_file' exists and 'old_file' doesn't.
-        self.write_file(new_file)
-        assert newer(new_file, 'I_dont_exist')
-        assert newer(new_file, old_file)
-
-        # Return false if both exist and 'old_file' is the same age or younger
-        # than 'new_file'.
-        assert not newer(old_file, new_file)
-
-    def _setup_1234(self):
-        tmpdir = self.mkdtemp()
-        sources = os.path.join(tmpdir, 'sources')
-        targets = os.path.join(tmpdir, 'targets')
-        os.mkdir(sources)
-        os.mkdir(targets)
-        one = os.path.join(sources, 'one')
-        two = os.path.join(sources, 'two')
-        three = os.path.abspath(__file__)  # I am the old file
-        four = os.path.join(targets, 'four')
-        self.write_file(one)
-        self.write_file(two)
-        self.write_file(four)
-        return one, two, three, four
-
-    def test_newer_pairwise(self):
-        one, two, three, four = self._setup_1234()
-
-        assert newer_pairwise([one, two], [three, four]) == ([one], [three])
-
-    def test_newer_pairwise_mismatch(self):
-        one, two, three, four = self._setup_1234()
-
-        with pytest.raises(ValueError):
-            newer_pairwise([one], [three, four])
-
-        with pytest.raises(ValueError):
-            newer_pairwise([one, two], [three])
-
-    def test_newer_pairwise_empty(self):
-        assert newer_pairwise([], []) == ([], [])
-
-    def test_newer_pairwise_fresh(self):
-        one, two, three, four = self._setup_1234()
-
-        assert newer_pairwise([one, three], [two, four]) == ([], [])
-
-    def test_newer_group(self):
-        tmpdir = self.mkdtemp()
-        sources = os.path.join(tmpdir, 'sources')
-        os.mkdir(sources)
-        one = os.path.join(sources, 'one')
-        two = os.path.join(sources, 'two')
-        three = os.path.join(sources, 'three')
-        old_file = os.path.abspath(__file__)
-
-        # return true if 'old_file' is out-of-date with respect to any file
-        # listed in 'sources'.
-        self.write_file(one)
-        self.write_file(two)
-        self.write_file(three)
-        assert newer_group([one, two, three], old_file)
-        assert not newer_group([one, two, old_file], three)
-
-        # missing handling
-        os.remove(one)
-        with pytest.raises(OSError):
-            newer_group([one, two, old_file], three)
-
-        assert not newer_group([one, two, old_file], three, missing='ignore')
-
-        assert newer_group([one, two, old_file], three, missing='newer')
-
-
-@pytest.fixture
-def groups_target(tmp_path):
-    """
-    Set up some older sources, a target, and newer sources.
-
-    Returns a simple namespace with these values.
-    """
-    filenames = ['older.c', 'older.h', 'target.o', 'newer.c', 'newer.h']
-    paths = [tmp_path / name for name in filenames]
-
-    for mtime, path in enumerate(paths):
-        path.write_text('', encoding='utf-8')
-
-        # make sure modification times are sequential
-        os.utime(path, (mtime, mtime))
-
-    return types.SimpleNamespace(older=paths[:2], target=paths[2], newer=paths[3:])
-
-
-def test_newer_pairwise_group(groups_target):
-    older = newer_pairwise_group([groups_target.older], [groups_target.target])
-    newer = newer_pairwise_group([groups_target.newer], [groups_target.target])
-    assert older == ([], [])
-    assert newer == ([groups_target.newer], [groups_target.target])
-
-
-def test_newer_group_no_sources_no_target(tmp_path):
-    """
-    Consider no sources and no target "newer".
-    """
-    assert newer_group([], str(tmp_path / 'does-not-exist'))
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_sdist.py b/voxvera/vendor/setuptools/_distutils/tests/test_sdist.py
deleted file mode 100644
index 6b1a376..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_sdist.py
+++ /dev/null
@@ -1,470 +0,0 @@
-"""Tests for distutils.command.sdist."""
-
-import os
-import pathlib
-import shutil  # noqa: F401
-import tarfile
-import zipfile
-from distutils.archive_util import ARCHIVE_FORMATS
-from distutils.command.sdist import sdist, show_formats
-from distutils.core import Distribution
-from distutils.errors import DistutilsOptionError
-from distutils.filelist import FileList
-from os.path import join
-from textwrap import dedent
-
-import jaraco.path
-import path
-import pytest
-from more_itertools import ilen
-
-from . import support
-from .unix_compat import grp, pwd, require_uid_0, require_unix_id
-
-SETUP_PY = """
-from distutils.core import setup
-import somecode
-
-setup(name='fake')
-"""
-
-MANIFEST = """\
-# file GENERATED by distutils, do NOT edit
-README
-buildout.cfg
-inroot.txt
-setup.py
-data%(sep)sdata.dt
-scripts%(sep)sscript.py
-some%(sep)sfile.txt
-some%(sep)sother_file.txt
-somecode%(sep)s__init__.py
-somecode%(sep)sdoc.dat
-somecode%(sep)sdoc.txt
-"""
-
-
-@pytest.fixture(autouse=True)
-def project_dir(request, distutils_managed_tempdir):
-    self = request.instance
-    self.tmp_dir = self.mkdtemp()
-    jaraco.path.build(
-        {
-            'somecode': {
-                '__init__.py': '#',
-            },
-            'README': 'xxx',
-            'setup.py': SETUP_PY,
-        },
-        self.tmp_dir,
-    )
-    with path.Path(self.tmp_dir):
-        yield
-
-
-def clean_lines(filepath):
-    with pathlib.Path(filepath).open(encoding='utf-8') as f:
-        yield from filter(None, map(str.strip, f))
-
-
-class TestSDist(support.TempdirManager):
-    def get_cmd(self, metadata=None):
-        """Returns a cmd"""
-        if metadata is None:
-            metadata = {
-                'name': 'ns.fake--pkg',
-                'version': '1.0',
-                'url': 'xxx',
-                'author': 'xxx',
-                'author_email': 'xxx',
-            }
-        dist = Distribution(metadata)
-        dist.script_name = 'setup.py'
-        dist.packages = ['somecode']
-        dist.include_package_data = True
-        cmd = sdist(dist)
-        cmd.dist_dir = 'dist'
-        return dist, cmd
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_prune_file_list(self):
-        # this test creates a project with some VCS dirs and an NFS rename
-        # file, then launches sdist to check they get pruned on all systems
-
-        # creating VCS directories with some files in them
-        os.mkdir(join(self.tmp_dir, 'somecode', '.svn'))
-        self.write_file((self.tmp_dir, 'somecode', '.svn', 'ok.py'), 'xxx')
-
-        os.mkdir(join(self.tmp_dir, 'somecode', '.hg'))
-        self.write_file((self.tmp_dir, 'somecode', '.hg', 'ok'), 'xxx')
-
-        os.mkdir(join(self.tmp_dir, 'somecode', '.git'))
-        self.write_file((self.tmp_dir, 'somecode', '.git', 'ok'), 'xxx')
-
-        self.write_file((self.tmp_dir, 'somecode', '.nfs0001'), 'xxx')
-
-        # now building a sdist
-        dist, cmd = self.get_cmd()
-
-        # zip is available universally
-        # (tar might not be installed under win32)
-        cmd.formats = ['zip']
-
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # now let's check what we have
-        dist_folder = join(self.tmp_dir, 'dist')
-        files = os.listdir(dist_folder)
-        assert files == ['ns_fake_pkg-1.0.zip']
-
-        zip_file = zipfile.ZipFile(join(dist_folder, 'ns_fake_pkg-1.0.zip'))
-        try:
-            content = zip_file.namelist()
-        finally:
-            zip_file.close()
-
-        # making sure everything has been pruned correctly
-        expected = [
-            '',
-            'PKG-INFO',
-            'README',
-            'setup.py',
-            'somecode/',
-            'somecode/__init__.py',
-        ]
-        assert sorted(content) == ['ns_fake_pkg-1.0/' + x for x in expected]
-
-    @pytest.mark.usefixtures('needs_zlib')
-    @pytest.mark.skipif("not shutil.which('tar')")
-    @pytest.mark.skipif("not shutil.which('gzip')")
-    def test_make_distribution(self):
-        # now building a sdist
-        dist, cmd = self.get_cmd()
-
-        # creating a gztar then a tar
-        cmd.formats = ['gztar', 'tar']
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # making sure we have two files
-        dist_folder = join(self.tmp_dir, 'dist')
-        result = os.listdir(dist_folder)
-        result.sort()
-        assert result == ['ns_fake_pkg-1.0.tar', 'ns_fake_pkg-1.0.tar.gz']
-
-        os.remove(join(dist_folder, 'ns_fake_pkg-1.0.tar'))
-        os.remove(join(dist_folder, 'ns_fake_pkg-1.0.tar.gz'))
-
-        # now trying a tar then a gztar
-        cmd.formats = ['tar', 'gztar']
-
-        cmd.ensure_finalized()
-        cmd.run()
-
-        result = os.listdir(dist_folder)
-        result.sort()
-        assert result == ['ns_fake_pkg-1.0.tar', 'ns_fake_pkg-1.0.tar.gz']
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_add_defaults(self):
-        # https://bugs.python.org/issue2279
-
-        # add_default should also include
-        # data_files and package_data
-        dist, cmd = self.get_cmd()
-
-        # filling data_files by pointing files
-        # in package_data
-        dist.package_data = {'': ['*.cfg', '*.dat'], 'somecode': ['*.txt']}
-        self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#')
-        self.write_file((self.tmp_dir, 'somecode', 'doc.dat'), '#')
-
-        # adding some data in data_files
-        data_dir = join(self.tmp_dir, 'data')
-        os.mkdir(data_dir)
-        self.write_file((data_dir, 'data.dt'), '#')
-        some_dir = join(self.tmp_dir, 'some')
-        os.mkdir(some_dir)
-        # make sure VCS directories are pruned (#14004)
-        hg_dir = join(self.tmp_dir, '.hg')
-        os.mkdir(hg_dir)
-        self.write_file((hg_dir, 'last-message.txt'), '#')
-        # a buggy regex used to prevent this from working on windows (#6884)
-        self.write_file((self.tmp_dir, 'buildout.cfg'), '#')
-        self.write_file((self.tmp_dir, 'inroot.txt'), '#')
-        self.write_file((some_dir, 'file.txt'), '#')
-        self.write_file((some_dir, 'other_file.txt'), '#')
-
-        dist.data_files = [
-            ('data', ['data/data.dt', 'buildout.cfg', 'inroot.txt', 'notexisting']),
-            'some/file.txt',
-            'some/other_file.txt',
-        ]
-
-        # adding a script
-        script_dir = join(self.tmp_dir, 'scripts')
-        os.mkdir(script_dir)
-        self.write_file((script_dir, 'script.py'), '#')
-        dist.scripts = [join('scripts', 'script.py')]
-
-        cmd.formats = ['zip']
-        cmd.use_defaults = True
-
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # now let's check what we have
-        dist_folder = join(self.tmp_dir, 'dist')
-        files = os.listdir(dist_folder)
-        assert files == ['ns_fake_pkg-1.0.zip']
-
-        zip_file = zipfile.ZipFile(join(dist_folder, 'ns_fake_pkg-1.0.zip'))
-        try:
-            content = zip_file.namelist()
-        finally:
-            zip_file.close()
-
-        # making sure everything was added
-        expected = [
-            '',
-            'PKG-INFO',
-            'README',
-            'buildout.cfg',
-            'data/',
-            'data/data.dt',
-            'inroot.txt',
-            'scripts/',
-            'scripts/script.py',
-            'setup.py',
-            'some/',
-            'some/file.txt',
-            'some/other_file.txt',
-            'somecode/',
-            'somecode/__init__.py',
-            'somecode/doc.dat',
-            'somecode/doc.txt',
-        ]
-        assert sorted(content) == ['ns_fake_pkg-1.0/' + x for x in expected]
-
-        # checking the MANIFEST
-        manifest = pathlib.Path(self.tmp_dir, 'MANIFEST').read_text(encoding='utf-8')
-        assert manifest == MANIFEST % {'sep': os.sep}
-
-    @staticmethod
-    def warnings(messages, prefix='warning: '):
-        return [msg for msg in messages if msg.startswith(prefix)]
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_metadata_check_option(self, caplog):
-        # testing the `medata-check` option
-        dist, cmd = self.get_cmd(metadata={})
-
-        # this should raise some warnings !
-        # with the `check` subcommand
-        cmd.ensure_finalized()
-        cmd.run()
-        assert len(self.warnings(caplog.messages, 'warning: check: ')) == 1
-
-        # trying with a complete set of metadata
-        caplog.clear()
-        dist, cmd = self.get_cmd()
-        cmd.ensure_finalized()
-        cmd.metadata_check = False
-        cmd.run()
-        assert len(self.warnings(caplog.messages, 'warning: check: ')) == 0
-
-    def test_show_formats(self, capsys):
-        show_formats()
-
-        # the output should be a header line + one line per format
-        num_formats = len(ARCHIVE_FORMATS.keys())
-        output = [
-            line
-            for line in capsys.readouterr().out.split('\n')
-            if line.strip().startswith('--formats=')
-        ]
-        assert len(output) == num_formats
-
-    def test_finalize_options(self):
-        dist, cmd = self.get_cmd()
-        cmd.finalize_options()
-
-        # default options set by finalize
-        assert cmd.manifest == 'MANIFEST'
-        assert cmd.template == 'MANIFEST.in'
-        assert cmd.dist_dir == 'dist'
-
-        # formats has to be a string splitable on (' ', ',') or
-        # a stringlist
-        cmd.formats = 1
-        with pytest.raises(DistutilsOptionError):
-            cmd.finalize_options()
-        cmd.formats = ['zip']
-        cmd.finalize_options()
-
-        # formats has to be known
-        cmd.formats = 'supazipa'
-        with pytest.raises(DistutilsOptionError):
-            cmd.finalize_options()
-
-    # the following tests make sure there is a nice error message instead
-    # of a traceback when parsing an invalid manifest template
-
-    def _check_template(self, content, caplog):
-        dist, cmd = self.get_cmd()
-        os.chdir(self.tmp_dir)
-        self.write_file('MANIFEST.in', content)
-        cmd.ensure_finalized()
-        cmd.filelist = FileList()
-        cmd.read_template()
-        assert len(self.warnings(caplog.messages)) == 1
-
-    def test_invalid_template_unknown_command(self, caplog):
-        self._check_template('taunt knights *', caplog)
-
-    def test_invalid_template_wrong_arguments(self, caplog):
-        # this manifest command takes one argument
-        self._check_template('prune', caplog)
-
-    @pytest.mark.skipif("platform.system() != 'Windows'")
-    def test_invalid_template_wrong_path(self, caplog):
-        # on Windows, trailing slashes are not allowed
-        # this used to crash instead of raising a warning: #8286
-        self._check_template('include examples/', caplog)
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_get_file_list(self):
-        # make sure MANIFEST is recalculated
-        dist, cmd = self.get_cmd()
-
-        # filling data_files by pointing files in package_data
-        dist.package_data = {'somecode': ['*.txt']}
-        self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#')
-        cmd.formats = ['gztar']
-        cmd.ensure_finalized()
-        cmd.run()
-
-        assert ilen(clean_lines(cmd.manifest)) == 5
-
-        # adding a file
-        self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#')
-
-        # make sure build_py is reinitialized, like a fresh run
-        build_py = dist.get_command_obj('build_py')
-        build_py.finalized = False
-        build_py.ensure_finalized()
-
-        cmd.run()
-
-        manifest2 = list(clean_lines(cmd.manifest))
-
-        # do we have the new file in MANIFEST ?
-        assert len(manifest2) == 6
-        assert 'doc2.txt' in manifest2[-1]
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_manifest_marker(self):
-        # check that autogenerated MANIFESTs have a marker
-        dist, cmd = self.get_cmd()
-        cmd.ensure_finalized()
-        cmd.run()
-
-        assert (
-            next(clean_lines(cmd.manifest))
-            == '# file GENERATED by distutils, do NOT edit'
-        )
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_manifest_comments(self):
-        # make sure comments don't cause exceptions or wrong includes
-        contents = dedent(
-            """\
-            # bad.py
-            #bad.py
-            good.py
-            """
-        )
-        dist, cmd = self.get_cmd()
-        cmd.ensure_finalized()
-        self.write_file((self.tmp_dir, cmd.manifest), contents)
-        self.write_file((self.tmp_dir, 'good.py'), '# pick me!')
-        self.write_file((self.tmp_dir, 'bad.py'), "# don't pick me!")
-        self.write_file((self.tmp_dir, '#bad.py'), "# don't pick me!")
-        cmd.run()
-        assert cmd.filelist.files == ['good.py']
-
-    @pytest.mark.usefixtures('needs_zlib')
-    def test_manual_manifest(self):
-        # check that a MANIFEST without a marker is left alone
-        dist, cmd = self.get_cmd()
-        cmd.formats = ['gztar']
-        cmd.ensure_finalized()
-        self.write_file((self.tmp_dir, cmd.manifest), 'README.manual')
-        self.write_file(
-            (self.tmp_dir, 'README.manual'),
-            'This project maintains its MANIFEST file itself.',
-        )
-        cmd.run()
-        assert cmd.filelist.files == ['README.manual']
-
-        assert list(clean_lines(cmd.manifest)) == ['README.manual']
-
-        archive_name = join(self.tmp_dir, 'dist', 'ns_fake_pkg-1.0.tar.gz')
-        archive = tarfile.open(archive_name)
-        try:
-            filenames = [tarinfo.name for tarinfo in archive]
-        finally:
-            archive.close()
-        assert sorted(filenames) == [
-            'ns_fake_pkg-1.0',
-            'ns_fake_pkg-1.0/PKG-INFO',
-            'ns_fake_pkg-1.0/README.manual',
-        ]
-
-    @pytest.mark.usefixtures('needs_zlib')
-    @require_unix_id
-    @require_uid_0
-    @pytest.mark.skipif("not shutil.which('tar')")
-    @pytest.mark.skipif("not shutil.which('gzip')")
-    def test_make_distribution_owner_group(self):
-        # now building a sdist
-        dist, cmd = self.get_cmd()
-
-        # creating a gztar and specifying the owner+group
-        cmd.formats = ['gztar']
-        cmd.owner = pwd.getpwuid(0)[0]
-        cmd.group = grp.getgrgid(0)[0]
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # making sure we have the good rights
-        archive_name = join(self.tmp_dir, 'dist', 'ns_fake_pkg-1.0.tar.gz')
-        archive = tarfile.open(archive_name)
-        try:
-            for member in archive.getmembers():
-                assert member.uid == 0
-                assert member.gid == 0
-        finally:
-            archive.close()
-
-        # building a sdist again
-        dist, cmd = self.get_cmd()
-
-        # creating a gztar
-        cmd.formats = ['gztar']
-        cmd.ensure_finalized()
-        cmd.run()
-
-        # making sure we have the good rights
-        archive_name = join(self.tmp_dir, 'dist', 'ns_fake_pkg-1.0.tar.gz')
-        archive = tarfile.open(archive_name)
-
-        # note that we are not testing the group ownership here
-        # because, depending on the platforms and the container
-        # rights (see #7408)
-        try:
-            for member in archive.getmembers():
-                assert member.uid == os.getuid()
-        finally:
-            archive.close()
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_spawn.py b/voxvera/vendor/setuptools/_distutils/tests/test_spawn.py
deleted file mode 100644
index 3b9fc92..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_spawn.py
+++ /dev/null
@@ -1,141 +0,0 @@
-"""Tests for distutils.spawn."""
-
-import os
-import stat
-import sys
-import unittest.mock as mock
-from distutils.errors import DistutilsExecError
-from distutils.spawn import find_executable, spawn
-from distutils.tests import support
-
-import path
-import pytest
-from test.support import unix_shell
-
-from .compat import py39 as os_helper
-
-
-class TestSpawn(support.TempdirManager):
-    @pytest.mark.skipif("os.name not in ('nt', 'posix')")
-    def test_spawn(self):
-        tmpdir = self.mkdtemp()
-
-        # creating something executable
-        # through the shell that returns 1
-        if sys.platform != 'win32':
-            exe = os.path.join(tmpdir, 'foo.sh')
-            self.write_file(exe, f'#!{unix_shell}\nexit 1')
-        else:
-            exe = os.path.join(tmpdir, 'foo.bat')
-            self.write_file(exe, 'exit 1')
-
-        os.chmod(exe, 0o777)
-        with pytest.raises(DistutilsExecError):
-            spawn([exe])
-
-        # now something that works
-        if sys.platform != 'win32':
-            exe = os.path.join(tmpdir, 'foo.sh')
-            self.write_file(exe, f'#!{unix_shell}\nexit 0')
-        else:
-            exe = os.path.join(tmpdir, 'foo.bat')
-            self.write_file(exe, 'exit 0')
-
-        os.chmod(exe, 0o777)
-        spawn([exe])  # should work without any error
-
-    def test_find_executable(self, tmp_path):
-        program_path = self._make_executable(tmp_path, '.exe')
-        program = program_path.name
-        program_noeext = program_path.with_suffix('').name
-        filename = str(program_path)
-        tmp_dir = path.Path(tmp_path)
-
-        # test path parameter
-        rv = find_executable(program, path=tmp_dir)
-        assert rv == filename
-
-        if sys.platform == 'win32':
-            # test without ".exe" extension
-            rv = find_executable(program_noeext, path=tmp_dir)
-            assert rv == filename
-
-        # test find in the current directory
-        with tmp_dir:
-            rv = find_executable(program)
-            assert rv == program
-
-        # test non-existent program
-        dont_exist_program = "dontexist_" + program
-        rv = find_executable(dont_exist_program, path=tmp_dir)
-        assert rv is None
-
-        # PATH='': no match, except in the current directory
-        with os_helper.EnvironmentVarGuard() as env:
-            env['PATH'] = ''
-            with (
-                mock.patch(
-                    'distutils.spawn.os.confstr', return_value=tmp_dir, create=True
-                ),
-                mock.patch('distutils.spawn.os.defpath', tmp_dir),
-            ):
-                rv = find_executable(program)
-                assert rv is None
-
-                # look in current directory
-                with tmp_dir:
-                    rv = find_executable(program)
-                    assert rv == program
-
-        # PATH=':': explicitly looks in the current directory
-        with os_helper.EnvironmentVarGuard() as env:
-            env['PATH'] = os.pathsep
-            with (
-                mock.patch('distutils.spawn.os.confstr', return_value='', create=True),
-                mock.patch('distutils.spawn.os.defpath', ''),
-            ):
-                rv = find_executable(program)
-                assert rv is None
-
-                # look in current directory
-                with tmp_dir:
-                    rv = find_executable(program)
-                    assert rv == program
-
-        # missing PATH: test os.confstr("CS_PATH") and os.defpath
-        with os_helper.EnvironmentVarGuard() as env:
-            env.pop('PATH', None)
-
-            # without confstr
-            with (
-                mock.patch(
-                    'distutils.spawn.os.confstr', side_effect=ValueError, create=True
-                ),
-                mock.patch('distutils.spawn.os.defpath', tmp_dir),
-            ):
-                rv = find_executable(program)
-                assert rv == filename
-
-            # with confstr
-            with (
-                mock.patch(
-                    'distutils.spawn.os.confstr', return_value=tmp_dir, create=True
-                ),
-                mock.patch('distutils.spawn.os.defpath', ''),
-            ):
-                rv = find_executable(program)
-                assert rv == filename
-
-    @staticmethod
-    def _make_executable(tmp_path, ext):
-        # Give the temporary program a suffix regardless of platform.
-        # It's needed on Windows and not harmful on others.
-        program = tmp_path.joinpath('program').with_suffix(ext)
-        program.write_text("", encoding='utf-8')
-        program.chmod(stat.S_IXUSR)
-        return program
-
-    def test_spawn_missing_exe(self):
-        with pytest.raises(DistutilsExecError) as ctx:
-            spawn(['does-not-exist'])
-        assert "command 'does-not-exist' failed" in str(ctx.value)
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_sysconfig.py b/voxvera/vendor/setuptools/_distutils/tests/test_sysconfig.py
deleted file mode 100644
index 43d77c2..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_sysconfig.py
+++ /dev/null
@@ -1,319 +0,0 @@
-"""Tests for distutils.sysconfig."""
-
-import contextlib
-import distutils
-import os
-import pathlib
-import subprocess
-import sys
-from distutils import sysconfig
-from distutils.ccompiler import new_compiler  # noqa: F401
-from distutils.unixccompiler import UnixCCompiler
-
-import jaraco.envs
-import path
-import pytest
-from jaraco.text import trim
-from test.support import swap_item
-
-
-def _gen_makefile(root, contents):
-    jaraco.path.build({'Makefile': trim(contents)}, root)
-    return root / 'Makefile'
-
-
-@pytest.mark.usefixtures('save_env')
-class TestSysconfig:
-    def test_get_config_h_filename(self):
-        config_h = sysconfig.get_config_h_filename()
-        assert os.path.isfile(config_h)
-
-    @pytest.mark.skipif("platform.system() == 'Windows'")
-    @pytest.mark.skipif("sys.implementation.name != 'cpython'")
-    def test_get_makefile_filename(self):
-        makefile = sysconfig.get_makefile_filename()
-        assert os.path.isfile(makefile)
-
-    def test_get_python_lib(self, tmp_path):
-        assert sysconfig.get_python_lib() != sysconfig.get_python_lib(prefix=tmp_path)
-
-    def test_get_config_vars(self):
-        cvars = sysconfig.get_config_vars()
-        assert isinstance(cvars, dict)
-        assert cvars
-
-    @pytest.mark.skipif('sysconfig.IS_PYPY')
-    @pytest.mark.skipif('sysconfig.python_build')
-    @pytest.mark.xfail('platform.system() == "Windows"')
-    def test_srcdir_simple(self):
-        # See #15364.
-        srcdir = pathlib.Path(sysconfig.get_config_var('srcdir'))
-
-        assert srcdir.absolute()
-        assert srcdir.is_dir()
-
-        makefile = pathlib.Path(sysconfig.get_makefile_filename())
-        assert makefile.parent.samefile(srcdir)
-
-    @pytest.mark.skipif('sysconfig.IS_PYPY')
-    @pytest.mark.skipif('not sysconfig.python_build')
-    def test_srcdir_python_build(self):
-        # See #15364.
-        srcdir = pathlib.Path(sysconfig.get_config_var('srcdir'))
-
-        # The python executable has not been installed so srcdir
-        # should be a full source checkout.
-        Python_h = srcdir.joinpath('Include', 'Python.h')
-        assert Python_h.is_file()
-        assert sysconfig._is_python_source_dir(srcdir)
-        assert sysconfig._is_python_source_dir(str(srcdir))
-
-    def test_srcdir_independent_of_cwd(self):
-        """
-        srcdir should be independent of the current working directory
-        """
-        # See #15364.
-        srcdir = sysconfig.get_config_var('srcdir')
-        with path.Path('..'):
-            srcdir2 = sysconfig.get_config_var('srcdir')
-        assert srcdir == srcdir2
-
-    def customize_compiler(self):
-        # make sure AR gets caught
-        class compiler:
-            compiler_type = 'unix'
-            executables = UnixCCompiler.executables
-
-            def __init__(self):
-                self.exes = {}
-
-            def set_executables(self, **kw):
-                for k, v in kw.items():
-                    self.exes[k] = v
-
-        sysconfig_vars = {
-            'AR': 'sc_ar',
-            'CC': 'sc_cc',
-            'CXX': 'sc_cxx',
-            'ARFLAGS': '--sc-arflags',
-            'CFLAGS': '--sc-cflags',
-            'CCSHARED': '--sc-ccshared',
-            'LDSHARED': 'sc_ldshared',
-            'SHLIB_SUFFIX': 'sc_shutil_suffix',
-        }
-
-        comp = compiler()
-        with contextlib.ExitStack() as cm:
-            for key, value in sysconfig_vars.items():
-                cm.enter_context(swap_item(sysconfig._config_vars, key, value))
-            sysconfig.customize_compiler(comp)
-
-        return comp
-
-    @pytest.mark.skipif("not isinstance(new_compiler(), UnixCCompiler)")
-    @pytest.mark.usefixtures('disable_macos_customization')
-    def test_customize_compiler(self):
-        # Make sure that sysconfig._config_vars is initialized
-        sysconfig.get_config_vars()
-
-        os.environ['AR'] = 'env_ar'
-        os.environ['CC'] = 'env_cc'
-        os.environ['CPP'] = 'env_cpp'
-        os.environ['CXX'] = 'env_cxx --env-cxx-flags'
-        os.environ['LDSHARED'] = 'env_ldshared'
-        os.environ['LDFLAGS'] = '--env-ldflags'
-        os.environ['ARFLAGS'] = '--env-arflags'
-        os.environ['CFLAGS'] = '--env-cflags'
-        os.environ['CPPFLAGS'] = '--env-cppflags'
-        os.environ['RANLIB'] = 'env_ranlib'
-
-        comp = self.customize_compiler()
-        assert comp.exes['archiver'] == 'env_ar --env-arflags'
-        assert comp.exes['preprocessor'] == 'env_cpp --env-cppflags'
-        assert comp.exes['compiler'] == 'env_cc --env-cflags --env-cppflags'
-        assert comp.exes['compiler_so'] == (
-            'env_cc --env-cflags --env-cppflags --sc-ccshared'
-        )
-        assert (
-            comp.exes['compiler_cxx']
-            == 'env_cxx --env-cxx-flags --sc-cflags --env-cppflags'
-        )
-        assert comp.exes['linker_exe'] == 'env_cc'
-        assert comp.exes['linker_so'] == (
-            'env_ldshared --env-ldflags --env-cflags --env-cppflags'
-        )
-        assert comp.shared_lib_extension == 'sc_shutil_suffix'
-
-        if sys.platform == "darwin":
-            assert comp.exes['ranlib'] == 'env_ranlib'
-        else:
-            assert 'ranlib' not in comp.exes
-
-        del os.environ['AR']
-        del os.environ['CC']
-        del os.environ['CPP']
-        del os.environ['CXX']
-        del os.environ['LDSHARED']
-        del os.environ['LDFLAGS']
-        del os.environ['ARFLAGS']
-        del os.environ['CFLAGS']
-        del os.environ['CPPFLAGS']
-        del os.environ['RANLIB']
-
-        comp = self.customize_compiler()
-        assert comp.exes['archiver'] == 'sc_ar --sc-arflags'
-        assert comp.exes['preprocessor'] == 'sc_cc -E'
-        assert comp.exes['compiler'] == 'sc_cc --sc-cflags'
-        assert comp.exes['compiler_so'] == 'sc_cc --sc-cflags --sc-ccshared'
-        assert comp.exes['compiler_cxx'] == 'sc_cxx --sc-cflags'
-        assert comp.exes['linker_exe'] == 'sc_cc'
-        assert comp.exes['linker_so'] == 'sc_ldshared'
-        assert comp.shared_lib_extension == 'sc_shutil_suffix'
-        assert 'ranlib' not in comp.exes
-
-    def test_parse_makefile_base(self, tmp_path):
-        makefile = _gen_makefile(
-            tmp_path,
-            """
-            CONFIG_ARGS=  '--arg1=optarg1' 'ENV=LIB'
-            VAR=$OTHER
-            OTHER=foo
-            """,
-        )
-        d = sysconfig.parse_makefile(makefile)
-        assert d == {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", 'OTHER': 'foo'}
-
-    def test_parse_makefile_literal_dollar(self, tmp_path):
-        makefile = _gen_makefile(
-            tmp_path,
-            """
-            CONFIG_ARGS=  '--arg1=optarg1' 'ENV=\\$$LIB'
-            VAR=$OTHER
-            OTHER=foo
-            """,
-        )
-        d = sysconfig.parse_makefile(makefile)
-        assert d == {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", 'OTHER': 'foo'}
-
-    def test_sysconfig_module(self):
-        import sysconfig as global_sysconfig
-
-        assert global_sysconfig.get_config_var('CFLAGS') == sysconfig.get_config_var(
-            'CFLAGS'
-        )
-        assert global_sysconfig.get_config_var('LDFLAGS') == sysconfig.get_config_var(
-            'LDFLAGS'
-        )
-
-    # On macOS, binary installers support extension module building on
-    # various levels of the operating system with differing Xcode
-    # configurations, requiring customization of some of the
-    # compiler configuration directives to suit the environment on
-    # the installed machine. Some of these customizations may require
-    # running external programs and are thus deferred until needed by
-    # the first extension module build. Only
-    # the Distutils version of sysconfig is used for extension module
-    # builds, which happens earlier in the Distutils tests. This may
-    # cause the following tests to fail since no tests have caused
-    # the global version of sysconfig to call the customization yet.
-    # The solution for now is to simply skip this test in this case.
-    # The longer-term solution is to only have one version of sysconfig.
-    @pytest.mark.skipif("sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER')")
-    def test_sysconfig_compiler_vars(self):
-        import sysconfig as global_sysconfig
-
-        if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'):
-            pytest.skip('compiler flags customized')
-        assert global_sysconfig.get_config_var('LDSHARED') == sysconfig.get_config_var(
-            'LDSHARED'
-        )
-        assert global_sysconfig.get_config_var('CC') == sysconfig.get_config_var('CC')
-
-    @pytest.mark.skipif("not sysconfig.get_config_var('EXT_SUFFIX')")
-    def test_SO_deprecation(self):
-        with pytest.warns(DeprecationWarning):
-            sysconfig.get_config_var('SO')
-
-    def test_customize_compiler_before_get_config_vars(self, tmp_path):
-        # Issue #21923: test that a Distribution compiler
-        # instance can be called without an explicit call to
-        # get_config_vars().
-        jaraco.path.build(
-            {
-                'file': trim("""
-                    from distutils.core import Distribution
-                    config = Distribution().get_command_obj('config')
-                    # try_compile may pass or it may fail if no compiler
-                    # is found but it should not raise an exception.
-                    rc = config.try_compile('int x;')
-                    """)
-            },
-            tmp_path,
-        )
-        p = subprocess.Popen(
-            [sys.executable, tmp_path / 'file'],
-            stdout=subprocess.PIPE,
-            stderr=subprocess.STDOUT,
-            universal_newlines=True,
-            encoding='utf-8',
-        )
-        outs, errs = p.communicate()
-        assert 0 == p.returncode, "Subprocess failed: " + outs
-
-    def test_parse_config_h(self):
-        config_h = sysconfig.get_config_h_filename()
-        input = {}
-        with open(config_h, encoding="utf-8") as f:
-            result = sysconfig.parse_config_h(f, g=input)
-        assert input is result
-        with open(config_h, encoding="utf-8") as f:
-            result = sysconfig.parse_config_h(f)
-        assert isinstance(result, dict)
-
-    @pytest.mark.skipif("platform.system() != 'Windows'")
-    @pytest.mark.skipif("sys.implementation.name != 'cpython'")
-    def test_win_ext_suffix(self):
-        assert sysconfig.get_config_var("EXT_SUFFIX").endswith(".pyd")
-        assert sysconfig.get_config_var("EXT_SUFFIX") != ".pyd"
-
-    @pytest.mark.skipif("platform.system() != 'Windows'")
-    @pytest.mark.skipif("sys.implementation.name != 'cpython'")
-    @pytest.mark.skipif(
-        '\\PCbuild\\'.casefold() not in sys.executable.casefold(),
-        reason='Need sys.executable to be in a source tree',
-    )
-    def test_win_build_venv_from_source_tree(self, tmp_path):
-        """Ensure distutils.sysconfig detects venvs from source tree builds."""
-        env = jaraco.envs.VEnv()
-        env.create_opts = env.clean_opts
-        env.root = tmp_path
-        env.ensure_env()
-        cmd = [
-            env.exe(),
-            "-c",
-            "import distutils.sysconfig; print(distutils.sysconfig.python_build)",
-        ]
-        distutils_path = os.path.dirname(os.path.dirname(distutils.__file__))
-        out = subprocess.check_output(
-            cmd, env={**os.environ, "PYTHONPATH": distutils_path}
-        )
-        assert out == "True"
-
-    def test_get_python_inc_missing_config_dir(self, monkeypatch):
-        """
-        In portable Python installations, the sysconfig will be broken,
-        pointing to the directories where the installation was built and
-        not where it currently is. In this case, ensure that the missing
-        directory isn't used for get_python_inc.
-
-        See pypa/distutils#178.
-        """
-
-        def override(name):
-            if name == 'INCLUDEPY':
-                return '/does-not-exist'
-            return sysconfig.get_config_var(name)
-
-        monkeypatch.setattr(sysconfig, 'get_config_var', override)
-
-        assert os.path.exists(sysconfig.get_python_inc())
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_text_file.py b/voxvera/vendor/setuptools/_distutils/tests/test_text_file.py
deleted file mode 100644
index f511156..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_text_file.py
+++ /dev/null
@@ -1,127 +0,0 @@
-"""Tests for distutils.text_file."""
-
-from distutils.tests import support
-from distutils.text_file import TextFile
-
-import jaraco.path
-import path
-
-TEST_DATA = """# test file
-
-line 3 \\
-# intervening comment
-  continues on next line
-"""
-
-
-class TestTextFile(support.TempdirManager):
-    def test_class(self):
-        # old tests moved from text_file.__main__
-        # so they are really called by the buildbots
-
-        # result 1: no fancy options
-        result1 = [
-            '# test file\n',
-            '\n',
-            'line 3 \\\n',
-            '# intervening comment\n',
-            '  continues on next line\n',
-        ]
-
-        # result 2: just strip comments
-        result2 = ["\n", "line 3 \\\n", "  continues on next line\n"]
-
-        # result 3: just strip blank lines
-        result3 = [
-            "# test file\n",
-            "line 3 \\\n",
-            "# intervening comment\n",
-            "  continues on next line\n",
-        ]
-
-        # result 4: default, strip comments, blank lines,
-        # and trailing whitespace
-        result4 = ["line 3 \\", "  continues on next line"]
-
-        # result 5: strip comments and blanks, plus join lines (but don't
-        # "collapse" joined lines
-        result5 = ["line 3   continues on next line"]
-
-        # result 6: strip comments and blanks, plus join lines (and
-        # "collapse" joined lines
-        result6 = ["line 3 continues on next line"]
-
-        def test_input(count, description, file, expected_result):
-            result = file.readlines()
-            assert result == expected_result
-
-        tmp_path = path.Path(self.mkdtemp())
-        filename = tmp_path / 'test.txt'
-        jaraco.path.build({filename.name: TEST_DATA}, tmp_path)
-
-        in_file = TextFile(
-            filename,
-            strip_comments=False,
-            skip_blanks=False,
-            lstrip_ws=False,
-            rstrip_ws=False,
-        )
-        try:
-            test_input(1, "no processing", in_file, result1)
-        finally:
-            in_file.close()
-
-        in_file = TextFile(
-            filename,
-            strip_comments=True,
-            skip_blanks=False,
-            lstrip_ws=False,
-            rstrip_ws=False,
-        )
-        try:
-            test_input(2, "strip comments", in_file, result2)
-        finally:
-            in_file.close()
-
-        in_file = TextFile(
-            filename,
-            strip_comments=False,
-            skip_blanks=True,
-            lstrip_ws=False,
-            rstrip_ws=False,
-        )
-        try:
-            test_input(3, "strip blanks", in_file, result3)
-        finally:
-            in_file.close()
-
-        in_file = TextFile(filename)
-        try:
-            test_input(4, "default processing", in_file, result4)
-        finally:
-            in_file.close()
-
-        in_file = TextFile(
-            filename,
-            strip_comments=True,
-            skip_blanks=True,
-            join_lines=True,
-            rstrip_ws=True,
-        )
-        try:
-            test_input(5, "join lines without collapsing", in_file, result5)
-        finally:
-            in_file.close()
-
-        in_file = TextFile(
-            filename,
-            strip_comments=True,
-            skip_blanks=True,
-            join_lines=True,
-            rstrip_ws=True,
-            collapse_join=True,
-        )
-        try:
-            test_input(6, "join lines with collapsing", in_file, result6)
-        finally:
-            in_file.close()
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_util.py b/voxvera/vendor/setuptools/_distutils/tests/test_util.py
deleted file mode 100644
index 00c9743..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_util.py
+++ /dev/null
@@ -1,243 +0,0 @@
-"""Tests for distutils.util."""
-
-import email
-import email.generator
-import email.policy
-import io
-import os
-import pathlib
-import sys
-import sysconfig as stdlib_sysconfig
-import unittest.mock as mock
-from copy import copy
-from distutils import sysconfig, util
-from distutils.errors import DistutilsByteCompileError, DistutilsPlatformError
-from distutils.util import (
-    byte_compile,
-    change_root,
-    check_environ,
-    convert_path,
-    get_host_platform,
-    get_platform,
-    grok_environment_error,
-    rfc822_escape,
-    split_quoted,
-    strtobool,
-)
-
-import pytest
-
-
-@pytest.fixture(autouse=True)
-def environment(monkeypatch):
-    monkeypatch.setattr(os, 'name', os.name)
-    monkeypatch.setattr(sys, 'platform', sys.platform)
-    monkeypatch.setattr(sys, 'version', sys.version)
-    monkeypatch.setattr(os, 'sep', os.sep)
-    monkeypatch.setattr(os.path, 'join', os.path.join)
-    monkeypatch.setattr(os.path, 'isabs', os.path.isabs)
-    monkeypatch.setattr(os.path, 'splitdrive', os.path.splitdrive)
-    monkeypatch.setattr(sysconfig, '_config_vars', copy(sysconfig._config_vars))
-
-
-@pytest.mark.usefixtures('save_env')
-class TestUtil:
-    def test_get_host_platform(self):
-        with mock.patch('os.name', 'nt'):
-            with mock.patch('sys.version', '... [... (ARM64)]'):
-                assert get_host_platform() == 'win-arm64'
-            with mock.patch('sys.version', '... [... (ARM)]'):
-                assert get_host_platform() == 'win-arm32'
-
-        with mock.patch('sys.version_info', (3, 9, 0, 'final', 0)):
-            assert get_host_platform() == stdlib_sysconfig.get_platform()
-
-    def test_get_platform(self):
-        with mock.patch('os.name', 'nt'):
-            with mock.patch.dict('os.environ', {'VSCMD_ARG_TGT_ARCH': 'x86'}):
-                assert get_platform() == 'win32'
-            with mock.patch.dict('os.environ', {'VSCMD_ARG_TGT_ARCH': 'x64'}):
-                assert get_platform() == 'win-amd64'
-            with mock.patch.dict('os.environ', {'VSCMD_ARG_TGT_ARCH': 'arm'}):
-                assert get_platform() == 'win-arm32'
-            with mock.patch.dict('os.environ', {'VSCMD_ARG_TGT_ARCH': 'arm64'}):
-                assert get_platform() == 'win-arm64'
-
-    def test_convert_path(self):
-        expected = os.sep.join(('', 'home', 'to', 'my', 'stuff'))
-        assert convert_path('/home/to/my/stuff') == expected
-        assert convert_path(pathlib.Path('/home/to/my/stuff')) == expected
-        assert convert_path('.') == os.curdir
-
-    def test_change_root(self):
-        # linux/mac
-        os.name = 'posix'
-
-        def _isabs(path):
-            return path[0] == '/'
-
-        os.path.isabs = _isabs
-
-        def _join(*path):
-            return '/'.join(path)
-
-        os.path.join = _join
-
-        assert change_root('/root', '/old/its/here') == '/root/old/its/here'
-        assert change_root('/root', 'its/here') == '/root/its/here'
-
-        # windows
-        os.name = 'nt'
-        os.sep = '\\'
-
-        def _isabs(path):
-            return path.startswith('c:\\')
-
-        os.path.isabs = _isabs
-
-        def _splitdrive(path):
-            if path.startswith('c:'):
-                return ('', path.replace('c:', ''))
-            return ('', path)
-
-        os.path.splitdrive = _splitdrive
-
-        def _join(*path):
-            return '\\'.join(path)
-
-        os.path.join = _join
-
-        assert (
-            change_root('c:\\root', 'c:\\old\\its\\here') == 'c:\\root\\old\\its\\here'
-        )
-        assert change_root('c:\\root', 'its\\here') == 'c:\\root\\its\\here'
-
-        # BugsBunny os (it's a great os)
-        os.name = 'BugsBunny'
-        with pytest.raises(DistutilsPlatformError):
-            change_root('c:\\root', 'its\\here')
-
-        # XXX platforms to be covered: mac
-
-    def test_check_environ(self):
-        util.check_environ.cache_clear()
-        os.environ.pop('HOME', None)
-
-        check_environ()
-
-        assert os.environ['PLAT'] == get_platform()
-
-    @pytest.mark.skipif("os.name != 'posix'")
-    def test_check_environ_getpwuid(self):
-        util.check_environ.cache_clear()
-        os.environ.pop('HOME', None)
-
-        import pwd
-
-        # only set pw_dir field, other fields are not used
-        result = pwd.struct_passwd((
-            None,
-            None,
-            None,
-            None,
-            None,
-            '/home/distutils',
-            None,
-        ))
-        with mock.patch.object(pwd, 'getpwuid', return_value=result):
-            check_environ()
-            assert os.environ['HOME'] == '/home/distutils'
-
-        util.check_environ.cache_clear()
-        os.environ.pop('HOME', None)
-
-        # bpo-10496: Catch pwd.getpwuid() error
-        with mock.patch.object(pwd, 'getpwuid', side_effect=KeyError):
-            check_environ()
-            assert 'HOME' not in os.environ
-
-    def test_split_quoted(self):
-        assert split_quoted('""one"" "two" \'three\' \\four') == [
-            'one',
-            'two',
-            'three',
-            'four',
-        ]
-
-    def test_strtobool(self):
-        yes = ('y', 'Y', 'yes', 'True', 't', 'true', 'True', 'On', 'on', '1')
-        no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N')
-
-        for y in yes:
-            assert strtobool(y)
-
-        for n in no:
-            assert not strtobool(n)
-
-    indent = 8 * ' '
-
-    @pytest.mark.parametrize(
-        "given,wanted",
-        [
-            # 0x0b, 0x0c, ..., etc are also considered a line break by Python
-            ("hello\x0b\nworld\n", f"hello\x0b{indent}\n{indent}world\n{indent}"),
-            ("hello\x1eworld", f"hello\x1e{indent}world"),
-            ("", ""),
-            (
-                "I am a\npoor\nlonesome\nheader\n",
-                f"I am a\n{indent}poor\n{indent}lonesome\n{indent}header\n{indent}",
-            ),
-        ],
-    )
-    def test_rfc822_escape(self, given, wanted):
-        """
-        We want to ensure a multi-line header parses correctly.
-
-        For interoperability, the escaped value should also "round-trip" over
-        `email.generator.Generator.flatten` and `email.message_from_*`
-        (see pypa/setuptools#4033).
-
-        The main issue is that internally `email.policy.EmailPolicy` uses
-        `splitlines` which will split on some control chars. If all the new lines
-        are not prefixed with spaces, the parser will interrupt reading
-        the current header and produce an incomplete value, while
-        incorrectly interpreting the rest of the headers as part of the payload.
-        """
-        res = rfc822_escape(given)
-
-        policy = email.policy.EmailPolicy(
-            utf8=True,
-            mangle_from_=False,
-            max_line_length=0,
-        )
-        with io.StringIO() as buffer:
-            raw = f"header: {res}\nother-header: 42\n\npayload\n"
-            orig = email.message_from_string(raw)
-            email.generator.Generator(buffer, policy=policy).flatten(orig)
-            buffer.seek(0)
-            regen = email.message_from_file(buffer)
-
-        for msg in (orig, regen):
-            assert msg.get_payload() == "payload\n"
-            assert msg["other-header"] == "42"
-            # Generator may replace control chars with `\n`
-            assert set(msg["header"].splitlines()) == set(res.splitlines())
-
-        assert res == wanted
-
-    def test_dont_write_bytecode(self):
-        # makes sure byte_compile raise a DistutilsError
-        # if sys.dont_write_bytecode is True
-        old_dont_write_bytecode = sys.dont_write_bytecode
-        sys.dont_write_bytecode = True
-        try:
-            with pytest.raises(DistutilsByteCompileError):
-                byte_compile([])
-        finally:
-            sys.dont_write_bytecode = old_dont_write_bytecode
-
-    def test_grok_environment_error(self):
-        # test obsolete function to ensure backward compat (#4931)
-        exc = OSError("Unable to find batch file")
-        msg = grok_environment_error(exc)
-        assert msg == "error: Unable to find batch file"
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_version.py b/voxvera/vendor/setuptools/_distutils/tests/test_version.py
deleted file mode 100644
index b68f097..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/test_version.py
+++ /dev/null
@@ -1,80 +0,0 @@
-"""Tests for distutils.version."""
-
-import distutils
-from distutils.version import LooseVersion, StrictVersion
-
-import pytest
-
-
-@pytest.fixture(autouse=True)
-def suppress_deprecation():
-    with distutils.version.suppress_known_deprecation():
-        yield
-
-
-class TestVersion:
-    def test_prerelease(self):
-        version = StrictVersion('1.2.3a1')
-        assert version.version == (1, 2, 3)
-        assert version.prerelease == ('a', 1)
-        assert str(version) == '1.2.3a1'
-
-        version = StrictVersion('1.2.0')
-        assert str(version) == '1.2'
-
-    def test_cmp_strict(self):
-        versions = (
-            ('1.5.1', '1.5.2b2', -1),
-            ('161', '3.10a', ValueError),
-            ('8.02', '8.02', 0),
-            ('3.4j', '1996.07.12', ValueError),
-            ('3.2.pl0', '3.1.1.6', ValueError),
-            ('2g6', '11g', ValueError),
-            ('0.9', '2.2', -1),
-            ('1.2.1', '1.2', 1),
-            ('1.1', '1.2.2', -1),
-            ('1.2', '1.1', 1),
-            ('1.2.1', '1.2.2', -1),
-            ('1.2.2', '1.2', 1),
-            ('1.2', '1.2.2', -1),
-            ('0.4.0', '0.4', 0),
-            ('1.13++', '5.5.kw', ValueError),
-        )
-
-        for v1, v2, wanted in versions:
-            try:
-                res = StrictVersion(v1)._cmp(StrictVersion(v2))
-            except ValueError:
-                if wanted is ValueError:
-                    continue
-                else:
-                    raise AssertionError(f"cmp({v1}, {v2}) shouldn't raise ValueError")
-            assert res == wanted, f'cmp({v1}, {v2}) should be {wanted}, got {res}'
-            res = StrictVersion(v1)._cmp(v2)
-            assert res == wanted, f'cmp({v1}, {v2}) should be {wanted}, got {res}'
-            res = StrictVersion(v1)._cmp(object())
-            assert res is NotImplemented, (
-                f'cmp({v1}, {v2}) should be NotImplemented, got {res}'
-            )
-
-    def test_cmp(self):
-        versions = (
-            ('1.5.1', '1.5.2b2', -1),
-            ('161', '3.10a', 1),
-            ('8.02', '8.02', 0),
-            ('3.4j', '1996.07.12', -1),
-            ('3.2.pl0', '3.1.1.6', 1),
-            ('2g6', '11g', -1),
-            ('0.960923', '2.2beta29', -1),
-            ('1.13++', '5.5.kw', -1),
-        )
-
-        for v1, v2, wanted in versions:
-            res = LooseVersion(v1)._cmp(LooseVersion(v2))
-            assert res == wanted, f'cmp({v1}, {v2}) should be {wanted}, got {res}'
-            res = LooseVersion(v1)._cmp(v2)
-            assert res == wanted, f'cmp({v1}, {v2}) should be {wanted}, got {res}'
-            res = LooseVersion(v1)._cmp(object())
-            assert res is NotImplemented, (
-                f'cmp({v1}, {v2}) should be NotImplemented, got {res}'
-            )
diff --git a/voxvera/vendor/setuptools/_distutils/tests/test_versionpredicate.py b/voxvera/vendor/setuptools/_distutils/tests/test_versionpredicate.py
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_distutils/tests/unix_compat.py b/voxvera/vendor/setuptools/_distutils/tests/unix_compat.py
deleted file mode 100644
index a5d9ee4..0000000
--- a/voxvera/vendor/setuptools/_distutils/tests/unix_compat.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import sys
-
-try:
-    import grp
-    import pwd
-except ImportError:
-    grp = pwd = None
-
-import pytest
-
-UNIX_ID_SUPPORT = grp and pwd
-UID_0_SUPPORT = UNIX_ID_SUPPORT and sys.platform != "cygwin"
-
-require_unix_id = pytest.mark.skipif(
-    not UNIX_ID_SUPPORT, reason="Requires grp and pwd support"
-)
-require_uid_0 = pytest.mark.skipif(not UID_0_SUPPORT, reason="Requires UID 0 support")
diff --git a/voxvera/vendor/setuptools/_distutils/text_file.py b/voxvera/vendor/setuptools/_distutils/text_file.py
deleted file mode 100644
index 89d9048..0000000
--- a/voxvera/vendor/setuptools/_distutils/text_file.py
+++ /dev/null
@@ -1,286 +0,0 @@
-"""text_file
-
-provides the TextFile class, which gives an interface to text files
-that (optionally) takes care of stripping comments, ignoring blank
-lines, and joining lines with backslashes."""
-
-import sys
-
-
-class TextFile:
-    """Provides a file-like object that takes care of all the things you
-    commonly want to do when processing a text file that has some
-    line-by-line syntax: strip comments (as long as "#" is your
-    comment character), skip blank lines, join adjacent lines by
-    escaping the newline (ie. backslash at end of line), strip
-    leading and/or trailing whitespace.  All of these are optional
-    and independently controllable.
-
-    Provides a 'warn()' method so you can generate warning messages that
-    report physical line number, even if the logical line in question
-    spans multiple physical lines.  Also provides 'unreadline()' for
-    implementing line-at-a-time lookahead.
-
-    Constructor is called as:
-
-        TextFile (filename=None, file=None, **options)
-
-    It bombs (RuntimeError) if both 'filename' and 'file' are None;
-    'filename' should be a string, and 'file' a file object (or
-    something that provides 'readline()' and 'close()' methods).  It is
-    recommended that you supply at least 'filename', so that TextFile
-    can include it in warning messages.  If 'file' is not supplied,
-    TextFile creates its own using 'io.open()'.
-
-    The options are all boolean, and affect the value returned by
-    'readline()':
-      strip_comments [default: true]
-        strip from "#" to end-of-line, as well as any whitespace
-        leading up to the "#" -- unless it is escaped by a backslash
-      lstrip_ws [default: false]
-        strip leading whitespace from each line before returning it
-      rstrip_ws [default: true]
-        strip trailing whitespace (including line terminator!) from
-        each line before returning it
-      skip_blanks [default: true}
-        skip lines that are empty *after* stripping comments and
-        whitespace.  (If both lstrip_ws and rstrip_ws are false,
-        then some lines may consist of solely whitespace: these will
-        *not* be skipped, even if 'skip_blanks' is true.)
-      join_lines [default: false]
-        if a backslash is the last non-newline character on a line
-        after stripping comments and whitespace, join the following line
-        to it to form one "logical line"; if N consecutive lines end
-        with a backslash, then N+1 physical lines will be joined to
-        form one logical line.
-      collapse_join [default: false]
-        strip leading whitespace from lines that are joined to their
-        predecessor; only matters if (join_lines and not lstrip_ws)
-      errors [default: 'strict']
-        error handler used to decode the file content
-
-    Note that since 'rstrip_ws' can strip the trailing newline, the
-    semantics of 'readline()' must differ from those of the builtin file
-    object's 'readline()' method!  In particular, 'readline()' returns
-    None for end-of-file: an empty string might just be a blank line (or
-    an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
-    not."""
-
-    default_options = {
-        'strip_comments': 1,
-        'skip_blanks': 1,
-        'lstrip_ws': 0,
-        'rstrip_ws': 1,
-        'join_lines': 0,
-        'collapse_join': 0,
-        'errors': 'strict',
-    }
-
-    def __init__(self, filename=None, file=None, **options):
-        """Construct a new TextFile object.  At least one of 'filename'
-        (a string) and 'file' (a file-like object) must be supplied.
-        They keyword argument options are described above and affect
-        the values returned by 'readline()'."""
-        if filename is None and file is None:
-            raise RuntimeError(
-                "you must supply either or both of 'filename' and 'file'"
-            )
-
-        # set values for all options -- either from client option hash
-        # or fallback to default_options
-        for opt in self.default_options.keys():
-            if opt in options:
-                setattr(self, opt, options[opt])
-            else:
-                setattr(self, opt, self.default_options[opt])
-
-        # sanity check client option hash
-        for opt in options.keys():
-            if opt not in self.default_options:
-                raise KeyError(f"invalid TextFile option '{opt}'")
-
-        if file is None:
-            self.open(filename)
-        else:
-            self.filename = filename
-            self.file = file
-            self.current_line = 0  # assuming that file is at BOF!
-
-        # 'linebuf' is a stack of lines that will be emptied before we
-        # actually read from the file; it's only populated by an
-        # 'unreadline()' operation
-        self.linebuf = []
-
-    def open(self, filename):
-        """Open a new file named 'filename'.  This overrides both the
-        'filename' and 'file' arguments to the constructor."""
-        self.filename = filename
-        self.file = open(self.filename, errors=self.errors, encoding='utf-8')
-        self.current_line = 0
-
-    def close(self):
-        """Close the current file and forget everything we know about it
-        (filename, current line number)."""
-        file = self.file
-        self.file = None
-        self.filename = None
-        self.current_line = None
-        file.close()
-
-    def gen_error(self, msg, line=None):
-        outmsg = []
-        if line is None:
-            line = self.current_line
-        outmsg.append(self.filename + ", ")
-        if isinstance(line, (list, tuple)):
-            outmsg.append("lines {}-{}: ".format(*line))
-        else:
-            outmsg.append(f"line {int(line)}: ")
-        outmsg.append(str(msg))
-        return "".join(outmsg)
-
-    def error(self, msg, line=None):
-        raise ValueError("error: " + self.gen_error(msg, line))
-
-    def warn(self, msg, line=None):
-        """Print (to stderr) a warning message tied to the current logical
-        line in the current file.  If the current logical line in the
-        file spans multiple physical lines, the warning refers to the
-        whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
-        the current line number; it may be a list or tuple to indicate a
-        range of physical lines, or an integer for a single physical
-        line."""
-        sys.stderr.write("warning: " + self.gen_error(msg, line) + "\n")
-
-    def readline(self):  # noqa: C901
-        """Read and return a single logical line from the current file (or
-        from an internal buffer if lines have previously been "unread"
-        with 'unreadline()').  If the 'join_lines' option is true, this
-        may involve reading multiple physical lines concatenated into a
-        single string.  Updates the current line number, so calling
-        'warn()' after 'readline()' emits a warning about the physical
-        line(s) just read.  Returns None on end-of-file, since the empty
-        string can occur if 'rstrip_ws' is true but 'strip_blanks' is
-        not."""
-        # If any "unread" lines waiting in 'linebuf', return the top
-        # one.  (We don't actually buffer read-ahead data -- lines only
-        # get put in 'linebuf' if the client explicitly does an
-        # 'unreadline()'.
-        if self.linebuf:
-            line = self.linebuf[-1]
-            del self.linebuf[-1]
-            return line
-
-        buildup_line = ''
-
-        while True:
-            # read the line, make it None if EOF
-            line = self.file.readline()
-            if line == '':
-                line = None
-
-            if self.strip_comments and line:
-                # Look for the first "#" in the line.  If none, never
-                # mind.  If we find one and it's the first character, or
-                # is not preceded by "\", then it starts a comment --
-                # strip the comment, strip whitespace before it, and
-                # carry on.  Otherwise, it's just an escaped "#", so
-                # unescape it (and any other escaped "#"'s that might be
-                # lurking in there) and otherwise leave the line alone.
-
-                pos = line.find("#")
-                if pos == -1:  # no "#" -- no comments
-                    pass
-
-                # It's definitely a comment -- either "#" is the first
-                # character, or it's elsewhere and unescaped.
-                elif pos == 0 or line[pos - 1] != "\\":
-                    # Have to preserve the trailing newline, because it's
-                    # the job of a later step (rstrip_ws) to remove it --
-                    # and if rstrip_ws is false, we'd better preserve it!
-                    # (NB. this means that if the final line is all comment
-                    # and has no trailing newline, we will think that it's
-                    # EOF; I think that's OK.)
-                    eol = (line[-1] == '\n') and '\n' or ''
-                    line = line[0:pos] + eol
-
-                    # If all that's left is whitespace, then skip line
-                    # *now*, before we try to join it to 'buildup_line' --
-                    # that way constructs like
-                    #   hello \\
-                    #   # comment that should be ignored
-                    #   there
-                    # result in "hello there".
-                    if line.strip() == "":
-                        continue
-                else:  # it's an escaped "#"
-                    line = line.replace("\\#", "#")
-
-            # did previous line end with a backslash? then accumulate
-            if self.join_lines and buildup_line:
-                # oops: end of file
-                if line is None:
-                    self.warn("continuation line immediately precedes end-of-file")
-                    return buildup_line
-
-                if self.collapse_join:
-                    line = line.lstrip()
-                line = buildup_line + line
-
-                # careful: pay attention to line number when incrementing it
-                if isinstance(self.current_line, list):
-                    self.current_line[1] = self.current_line[1] + 1
-                else:
-                    self.current_line = [self.current_line, self.current_line + 1]
-            # just an ordinary line, read it as usual
-            else:
-                if line is None:  # eof
-                    return None
-
-                # still have to be careful about incrementing the line number!
-                if isinstance(self.current_line, list):
-                    self.current_line = self.current_line[1] + 1
-                else:
-                    self.current_line = self.current_line + 1
-
-            # strip whitespace however the client wants (leading and
-            # trailing, or one or the other, or neither)
-            if self.lstrip_ws and self.rstrip_ws:
-                line = line.strip()
-            elif self.lstrip_ws:
-                line = line.lstrip()
-            elif self.rstrip_ws:
-                line = line.rstrip()
-
-            # blank line (whether we rstrip'ed or not)? skip to next line
-            # if appropriate
-            if line in ('', '\n') and self.skip_blanks:
-                continue
-
-            if self.join_lines:
-                if line[-1] == '\\':
-                    buildup_line = line[:-1]
-                    continue
-
-                if line[-2:] == '\\\n':
-                    buildup_line = line[0:-2] + '\n'
-                    continue
-
-            # well, I guess there's some actual content there: return it
-            return line
-
-    def readlines(self):
-        """Read and return the list of all logical lines remaining in the
-        current file."""
-        lines = []
-        while True:
-            line = self.readline()
-            if line is None:
-                return lines
-            lines.append(line)
-
-    def unreadline(self, line):
-        """Push 'line' (a string) onto an internal buffer that will be
-        checked by future 'readline()' calls.  Handy for implementing
-        a parser with line-at-a-time lookahead."""
-        self.linebuf.append(line)
diff --git a/voxvera/vendor/setuptools/_distutils/unixccompiler.py b/voxvera/vendor/setuptools/_distutils/unixccompiler.py
deleted file mode 100644
index 20b8ce6..0000000
--- a/voxvera/vendor/setuptools/_distutils/unixccompiler.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import importlib
-
-from .compilers.C import unix
-
-UnixCCompiler = unix.Compiler
-
-# ensure import of unixccompiler implies ccompiler imported
-# (pypa/setuptools#4871)
-importlib.import_module('distutils.ccompiler')
diff --git a/voxvera/vendor/setuptools/_distutils/util.py b/voxvera/vendor/setuptools/_distutils/util.py
deleted file mode 100644
index 47bb5af..0000000
--- a/voxvera/vendor/setuptools/_distutils/util.py
+++ /dev/null
@@ -1,506 +0,0 @@
-"""distutils.util
-
-Miscellaneous utility functions -- anything that doesn't fit into
-one of the other *util.py modules.
-"""
-
-from __future__ import annotations
-
-import functools
-import importlib.util
-import os
-import pathlib
-import re
-import string
-import subprocess
-import sys
-import sysconfig
-import tempfile
-from collections.abc import Callable, Iterable, Mapping
-from typing import TYPE_CHECKING, AnyStr
-
-from jaraco.functools import pass_none
-
-from ._log import log
-from ._modified import newer
-from .errors import DistutilsByteCompileError, DistutilsPlatformError
-from .spawn import spawn
-
-if TYPE_CHECKING:
-    from typing_extensions import TypeVarTuple, Unpack
-
-    _Ts = TypeVarTuple("_Ts")
-
-
-def get_host_platform() -> str:
-    """
-    Return a string that identifies the current platform. Use this
-    function to distinguish platform-specific build directories and
-    platform-specific built distributions.
-    """
-
-    # This function initially exposed platforms as defined in Python 3.9
-    # even with older Python versions when distutils was split out.
-    # Now it delegates to stdlib sysconfig.
-
-    return sysconfig.get_platform()
-
-
-def get_platform() -> str:
-    if os.name == 'nt':
-        TARGET_TO_PLAT = {
-            'x86': 'win32',
-            'x64': 'win-amd64',
-            'arm': 'win-arm32',
-            'arm64': 'win-arm64',
-        }
-        target = os.environ.get('VSCMD_ARG_TGT_ARCH')
-        return TARGET_TO_PLAT.get(target) or get_host_platform()
-    return get_host_platform()
-
-
-if sys.platform == 'darwin':
-    _syscfg_macosx_ver = None  # cache the version pulled from sysconfig
-MACOSX_VERSION_VAR = 'MACOSX_DEPLOYMENT_TARGET'
-
-
-def _clear_cached_macosx_ver():
-    """For testing only. Do not call."""
-    global _syscfg_macosx_ver
-    _syscfg_macosx_ver = None
-
-
-def get_macosx_target_ver_from_syscfg():
-    """Get the version of macOS latched in the Python interpreter configuration.
-    Returns the version as a string or None if can't obtain one. Cached."""
-    global _syscfg_macosx_ver
-    if _syscfg_macosx_ver is None:
-        from distutils import sysconfig
-
-        ver = sysconfig.get_config_var(MACOSX_VERSION_VAR) or ''
-        if ver:
-            _syscfg_macosx_ver = ver
-    return _syscfg_macosx_ver
-
-
-def get_macosx_target_ver():
-    """Return the version of macOS for which we are building.
-
-    The target version defaults to the version in sysconfig latched at time
-    the Python interpreter was built, unless overridden by an environment
-    variable. If neither source has a value, then None is returned"""
-
-    syscfg_ver = get_macosx_target_ver_from_syscfg()
-    env_ver = os.environ.get(MACOSX_VERSION_VAR)
-
-    if env_ver:
-        # Validate overridden version against sysconfig version, if have both.
-        # Ensure that the deployment target of the build process is not less
-        # than 10.3 if the interpreter was built for 10.3 or later.  This
-        # ensures extension modules are built with correct compatibility
-        # values, specifically LDSHARED which can use
-        # '-undefined dynamic_lookup' which only works on >= 10.3.
-        if (
-            syscfg_ver
-            and split_version(syscfg_ver) >= [10, 3]
-            and split_version(env_ver) < [10, 3]
-        ):
-            my_msg = (
-                '$' + MACOSX_VERSION_VAR + ' mismatch: '
-                f'now "{env_ver}" but "{syscfg_ver}" during configure; '
-                'must use 10.3 or later'
-            )
-            raise DistutilsPlatformError(my_msg)
-        return env_ver
-    return syscfg_ver
-
-
-def split_version(s: str) -> list[int]:
-    """Convert a dot-separated string into a list of numbers for comparisons"""
-    return [int(n) for n in s.split('.')]
-
-
-@pass_none
-def convert_path(pathname: str | os.PathLike[str]) -> str:
-    r"""
-    Allow for pathlib.Path inputs, coax to a native path string.
-
-    If None is passed, will just pass it through as
-    Setuptools relies on this behavior.
-
-    >>> convert_path(None) is None
-    True
-
-    Removes empty paths.
-
-    >>> convert_path('foo/./bar').replace('\\', '/')
-    'foo/bar'
-    """
-    return os.fspath(pathlib.PurePath(pathname))
-
-
-def change_root(
-    new_root: AnyStr | os.PathLike[AnyStr], pathname: AnyStr | os.PathLike[AnyStr]
-) -> AnyStr:
-    """Return 'pathname' with 'new_root' prepended.  If 'pathname' is
-    relative, this is equivalent to "os.path.join(new_root,pathname)".
-    Otherwise, it requires making 'pathname' relative and then joining the
-    two, which is tricky on DOS/Windows and Mac OS.
-    """
-    if os.name == 'posix':
-        if not os.path.isabs(pathname):
-            return os.path.join(new_root, pathname)
-        else:
-            return os.path.join(new_root, pathname[1:])
-
-    elif os.name == 'nt':
-        (drive, path) = os.path.splitdrive(pathname)
-        if path[0] == os.sep:
-            path = path[1:]
-        return os.path.join(new_root, path)
-
-    raise DistutilsPlatformError(f"nothing known about platform '{os.name}'")
-
-
-@functools.lru_cache
-def check_environ() -> None:
-    """Ensure that 'os.environ' has all the environment variables we
-    guarantee that users can use in config files, command-line options,
-    etc.  Currently this includes:
-      HOME - user's home directory (Unix only)
-      PLAT - description of the current platform, including hardware
-             and OS (see 'get_platform()')
-    """
-    if os.name == 'posix' and 'HOME' not in os.environ:
-        try:
-            import pwd
-
-            os.environ['HOME'] = pwd.getpwuid(os.getuid())[5]
-        except (ImportError, KeyError):
-            # bpo-10496: if the current user identifier doesn't exist in the
-            # password database, do nothing
-            pass
-
-    if 'PLAT' not in os.environ:
-        os.environ['PLAT'] = get_platform()
-
-
-def subst_vars(s, local_vars: Mapping[str, object]) -> str:
-    """
-    Perform variable substitution on 'string'.
-    Variables are indicated by format-style braces ("{var}").
-    Variable is substituted by the value found in the 'local_vars'
-    dictionary or in 'os.environ' if it's not in 'local_vars'.
-    'os.environ' is first checked/augmented to guarantee that it contains
-    certain values: see 'check_environ()'.  Raise ValueError for any
-    variables not found in either 'local_vars' or 'os.environ'.
-    """
-    check_environ()
-    lookup = dict(os.environ)
-    lookup.update((name, str(value)) for name, value in local_vars.items())
-    try:
-        return _subst_compat(s).format_map(lookup)
-    except KeyError as var:
-        raise ValueError(f"invalid variable {var}")
-
-
-def _subst_compat(s):
-    """
-    Replace shell/Perl-style variable substitution with
-    format-style. For compatibility.
-    """
-
-    def _subst(match):
-        return f'{{{match.group(1)}}}'
-
-    repl = re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s)
-    if repl != s:
-        import warnings
-
-        warnings.warn(
-            "shell/Perl-style substitutions are deprecated",
-            DeprecationWarning,
-        )
-    return repl
-
-
-def grok_environment_error(exc: object, prefix: str = "error: ") -> str:
-    # Function kept for backward compatibility.
-    # Used to try clever things with EnvironmentErrors,
-    # but nowadays str(exception) produces good messages.
-    return prefix + str(exc)
-
-
-# Needed by 'split_quoted()'
-_wordchars_re = _squote_re = _dquote_re = None
-
-
-def _init_regex():
-    global _wordchars_re, _squote_re, _dquote_re
-    _wordchars_re = re.compile(rf'[^\\\'\"{string.whitespace} ]*')
-    _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
-    _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')
-
-
-def split_quoted(s: str) -> list[str]:
-    """Split a string up according to Unix shell-like rules for quotes and
-    backslashes.  In short: words are delimited by spaces, as long as those
-    spaces are not escaped by a backslash, or inside a quoted string.
-    Single and double quotes are equivalent, and the quote characters can
-    be backslash-escaped.  The backslash is stripped from any two-character
-    escape sequence, leaving only the escaped character.  The quote
-    characters are stripped from any quoted string.  Returns a list of
-    words.
-    """
-
-    # This is a nice algorithm for splitting up a single string, since it
-    # doesn't require character-by-character examination.  It was a little
-    # bit of a brain-bender to get it working right, though...
-    if _wordchars_re is None:
-        _init_regex()
-
-    s = s.strip()
-    words = []
-    pos = 0
-
-    while s:
-        m = _wordchars_re.match(s, pos)
-        end = m.end()
-        if end == len(s):
-            words.append(s[:end])
-            break
-
-        if s[end] in string.whitespace:
-            # unescaped, unquoted whitespace: now
-            # we definitely have a word delimiter
-            words.append(s[:end])
-            s = s[end:].lstrip()
-            pos = 0
-
-        elif s[end] == '\\':
-            # preserve whatever is being escaped;
-            # will become part of the current word
-            s = s[:end] + s[end + 1 :]
-            pos = end + 1
-
-        else:
-            if s[end] == "'":  # slurp singly-quoted string
-                m = _squote_re.match(s, end)
-            elif s[end] == '"':  # slurp doubly-quoted string
-                m = _dquote_re.match(s, end)
-            else:
-                raise RuntimeError(f"this can't happen (bad char '{s[end]}')")
-
-            if m is None:
-                raise ValueError(f"bad string (mismatched {s[end]} quotes?)")
-
-            (beg, end) = m.span()
-            s = s[:beg] + s[beg + 1 : end - 1] + s[end:]
-            pos = m.end() - 2
-
-        if pos >= len(s):
-            words.append(s)
-            break
-
-    return words
-
-
-# split_quoted ()
-
-
-def execute(
-    func: Callable[[Unpack[_Ts]], object],
-    args: tuple[Unpack[_Ts]],
-    msg: object = None,
-    verbose: bool = False,
-) -> None:
-    """
-    Perform some action that affects the outside world (e.g. by
-    writing to the filesystem). Was previously used to deal with
-    "dry run" operations, but now runs unconditionally.
-    """
-    if msg is None:
-        msg = f"{func.__name__}{args!r}"
-        if msg[-2:] == ',)':  # correct for singleton tuple
-            msg = msg[0:-2] + ')'
-
-    log.info(msg)
-    func(*args)
-
-
-def strtobool(val: str) -> bool:
-    """Convert a string representation of truth to true (1) or false (0).
-
-    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
-    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
-    'val' is anything else.
-    """
-    val = val.lower()
-    if val in ('y', 'yes', 't', 'true', 'on', '1'):
-        return True
-    elif val in ('n', 'no', 'f', 'false', 'off', '0'):
-        return False
-    else:
-        raise ValueError(f"invalid truth value {val!r}")
-
-
-def byte_compile(  # noqa: C901
-    py_files: Iterable[str],
-    optimize: int = 0,
-    force: bool = False,
-    prefix: str | None = None,
-    base_dir: str | None = None,
-    verbose: bool = True,
-    direct: bool | None = None,
-) -> None:
-    """Byte-compile a collection of Python source files to .pyc
-    files in a __pycache__ subdirectory.  'py_files' is a list
-    of files to compile; any files that don't end in ".py" are silently
-    skipped.  'optimize' must be one of the following:
-      0 - don't optimize
-      1 - normal optimization (like "python -O")
-      2 - extra optimization (like "python -OO")
-    If 'force' is true, all files are recompiled regardless of
-    timestamps.
-
-    The source filename encoded in each bytecode file defaults to the
-    filenames listed in 'py_files'; you can modify these with 'prefix' and
-    'basedir'.  'prefix' is a string that will be stripped off of each
-    source filename, and 'base_dir' is a directory name that will be
-    prepended (after 'prefix' is stripped).  You can supply either or both
-    (or neither) of 'prefix' and 'base_dir', as you wish.
-
-    Byte-compilation is either done directly in this interpreter process
-    with the standard py_compile module, or indirectly by writing a
-    temporary script and executing it.  Normally, you should let
-    'byte_compile()' figure out to use direct compilation or not (see
-    the source for details).  The 'direct' flag is used by the script
-    generated in indirect mode; unless you know what you're doing, leave
-    it set to None.
-    """
-
-    # nothing is done if sys.dont_write_bytecode is True
-    if sys.dont_write_bytecode:
-        raise DistutilsByteCompileError('byte-compiling is disabled.')
-
-    # First, if the caller didn't force us into direct or indirect mode,
-    # figure out which mode we should be in.  We take a conservative
-    # approach: choose direct mode *only* if the current interpreter is
-    # in debug mode and optimize is 0.  If we're not in debug mode (-O
-    # or -OO), we don't know which level of optimization this
-    # interpreter is running with, so we can't do direct
-    # byte-compilation and be certain that it's the right thing.  Thus,
-    # always compile indirectly if the current interpreter is in either
-    # optimize mode, or if either optimization level was requested by
-    # the caller.
-    if direct is None:
-        direct = __debug__ and optimize == 0
-
-    # "Indirect" byte-compilation: write a temporary script and then
-    # run it with the appropriate flags.
-    if not direct:
-        (script_fd, script_name) = tempfile.mkstemp(".py")
-        log.info("writing byte-compilation script '%s'", script_name)
-        script = os.fdopen(script_fd, "w", encoding='utf-8')
-
-        with script:
-            script.write(
-                """\
-from distutils.util import byte_compile
-files = [
-"""
-            )
-
-            # XXX would be nice to write absolute filenames, just for
-            # safety's sake (script should be more robust in the face of
-            # chdir'ing before running it).  But this requires abspath'ing
-            # 'prefix' as well, and that breaks the hack in build_lib's
-            # 'byte_compile()' method that carefully tacks on a trailing
-            # slash (os.sep really) to make sure the prefix here is "just
-            # right".  This whole prefix business is rather delicate -- the
-            # problem is that it's really a directory, but I'm treating it
-            # as a dumb string, so trailing slashes and so forth matter.
-
-            script.write(",\n".join(map(repr, py_files)) + "]\n")
-            script.write(
-                f"""
-byte_compile(files, optimize={optimize!r}, force={force!r},
-         prefix={prefix!r}, base_dir={base_dir!r},
-         verbose={verbose!r},
-         direct=True)
-"""
-            )
-
-        cmd = [sys.executable]
-        cmd.extend(subprocess._optim_args_from_interpreter_flags())
-        cmd.append(script_name)
-        spawn(cmd)
-        execute(os.remove, (script_name,), f"removing {script_name}")
-
-    # "Direct" byte-compilation: use the py_compile module to compile
-    # right here, right now.  Note that the script generated in indirect
-    # mode simply calls 'byte_compile()' in direct mode, a weird sort of
-    # cross-process recursion.  Hey, it works!
-    else:
-        from py_compile import compile
-
-        for file in py_files:
-            if file[-3:] != ".py":
-                # This lets us be lazy and not filter filenames in
-                # the "install_lib" command.
-                continue
-
-            # Terminology from the py_compile module:
-            #   cfile - byte-compiled file
-            #   dfile - purported source filename (same as 'file' by default)
-            if optimize >= 0:
-                opt = '' if optimize == 0 else optimize
-                cfile = importlib.util.cache_from_source(file, optimization=opt)
-            else:
-                cfile = importlib.util.cache_from_source(file)
-            dfile = file
-            if prefix:
-                if file[: len(prefix)] != prefix:
-                    raise ValueError(
-                        f"invalid prefix: filename {file!r} doesn't start with {prefix!r}"
-                    )
-                dfile = dfile[len(prefix) :]
-            if base_dir:
-                dfile = os.path.join(base_dir, dfile)
-
-            cfile_base = os.path.basename(cfile)
-            if direct:
-                if force or newer(file, cfile):
-                    log.info("byte-compiling %s to %s", file, cfile_base)
-                    compile(file, cfile, dfile)
-                else:
-                    log.debug("skipping byte-compilation of %s to %s", file, cfile_base)
-
-
-def rfc822_escape(header: str) -> str:
-    """Return a version of the string escaped for inclusion in an
-    RFC-822 header, by ensuring there are 8 spaces space after each newline.
-    """
-    indent = 8 * " "
-    lines = header.splitlines(keepends=True)
-
-    # Emulate the behaviour of `str.split`
-    # (the terminal line break in `splitlines` does not result in an extra line):
-    ends_in_newline = lines and lines[-1].splitlines()[0] != lines[-1]
-    suffix = indent if ends_in_newline else ""
-
-    return indent.join(lines) + suffix
-
-
-def is_mingw() -> bool:
-    """Returns True if the current platform is mingw.
-
-    Python compiled with Mingw-w64 has sys.platform == 'win32' and
-    get_platform() starts with 'mingw'.
-    """
-    return sys.platform == 'win32' and get_platform().startswith('mingw')
-
-
-def is_freethreaded():
-    """Return True if the Python interpreter is built with free threading support."""
-    return bool(sysconfig.get_config_var('Py_GIL_DISABLED'))
diff --git a/voxvera/vendor/setuptools/_distutils/version.py b/voxvera/vendor/setuptools/_distutils/version.py
deleted file mode 100644
index 2223ee9..0000000
--- a/voxvera/vendor/setuptools/_distutils/version.py
+++ /dev/null
@@ -1,348 +0,0 @@
-#
-# distutils/version.py
-#
-# Implements multiple version numbering conventions for the
-# Python Module Distribution Utilities.
-#
-# $Id$
-#
-
-"""Provides classes to represent module version numbers (one class for
-each style of version numbering).  There are currently two such classes
-implemented: StrictVersion and LooseVersion.
-
-Every version number class implements the following interface:
-  * the 'parse' method takes a string and parses it to some internal
-    representation; if the string is an invalid version number,
-    'parse' raises a ValueError exception
-  * the class constructor takes an optional string argument which,
-    if supplied, is passed to 'parse'
-  * __str__ reconstructs the string that was passed to 'parse' (or
-    an equivalent string -- ie. one that will generate an equivalent
-    version number instance)
-  * __repr__ generates Python code to recreate the version number instance
-  * _cmp compares the current instance with either another instance
-    of the same class or a string (which will be parsed to an instance
-    of the same class, thus must follow the same rules)
-"""
-
-import contextlib
-import re
-import warnings
-
-
-@contextlib.contextmanager
-def suppress_known_deprecation():
-    with warnings.catch_warnings(record=True) as ctx:
-        warnings.filterwarnings(
-            action='default',
-            category=DeprecationWarning,
-            message="distutils Version classes are deprecated.",
-        )
-        yield ctx
-
-
-class Version:
-    """Abstract base class for version numbering classes.  Just provides
-    constructor (__init__) and reproducer (__repr__), because those
-    seem to be the same for all version numbering classes; and route
-    rich comparisons to _cmp.
-    """
-
-    def __init__(self, vstring=None):
-        if vstring:
-            self.parse(vstring)
-        warnings.warn(
-            "distutils Version classes are deprecated. Use packaging.version instead.",
-            DeprecationWarning,
-            stacklevel=2,
-        )
-
-    def __repr__(self):
-        return f"{self.__class__.__name__} ('{self}')"
-
-    def __eq__(self, other):
-        c = self._cmp(other)
-        if c is NotImplemented:
-            return c
-        return c == 0
-
-    def __lt__(self, other):
-        c = self._cmp(other)
-        if c is NotImplemented:
-            return c
-        return c < 0
-
-    def __le__(self, other):
-        c = self._cmp(other)
-        if c is NotImplemented:
-            return c
-        return c <= 0
-
-    def __gt__(self, other):
-        c = self._cmp(other)
-        if c is NotImplemented:
-            return c
-        return c > 0
-
-    def __ge__(self, other):
-        c = self._cmp(other)
-        if c is NotImplemented:
-            return c
-        return c >= 0
-
-
-# Interface for version-number classes -- must be implemented
-# by the following classes (the concrete ones -- Version should
-# be treated as an abstract class).
-#    __init__ (string) - create and take same action as 'parse'
-#                        (string parameter is optional)
-#    parse (string)    - convert a string representation to whatever
-#                        internal representation is appropriate for
-#                        this style of version numbering
-#    __str__ (self)    - convert back to a string; should be very similar
-#                        (if not identical to) the string supplied to parse
-#    __repr__ (self)   - generate Python code to recreate
-#                        the instance
-#    _cmp (self, other) - compare two version numbers ('other' may
-#                        be an unparsed version string, or another
-#                        instance of your version class)
-
-
-class StrictVersion(Version):
-    """Version numbering for anal retentives and software idealists.
-    Implements the standard interface for version number classes as
-    described above.  A version number consists of two or three
-    dot-separated numeric components, with an optional "pre-release" tag
-    on the end.  The pre-release tag consists of the letter 'a' or 'b'
-    followed by a number.  If the numeric components of two version
-    numbers are equal, then one with a pre-release tag will always
-    be deemed earlier (lesser) than one without.
-
-    The following are valid version numbers (shown in the order that
-    would be obtained by sorting according to the supplied cmp function):
-
-        0.4       0.4.0  (these two are equivalent)
-        0.4.1
-        0.5a1
-        0.5b3
-        0.5
-        0.9.6
-        1.0
-        1.0.4a3
-        1.0.4b1
-        1.0.4
-
-    The following are examples of invalid version numbers:
-
-        1
-        2.7.2.2
-        1.3.a4
-        1.3pl1
-        1.3c4
-
-    The rationale for this version numbering system will be explained
-    in the distutils documentation.
-    """
-
-    version_re = re.compile(
-        r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', re.VERBOSE | re.ASCII
-    )
-
-    def parse(self, vstring):
-        match = self.version_re.match(vstring)
-        if not match:
-            raise ValueError(f"invalid version number '{vstring}'")
-
-        (major, minor, patch, prerelease, prerelease_num) = match.group(1, 2, 4, 5, 6)
-
-        if patch:
-            self.version = tuple(map(int, [major, minor, patch]))
-        else:
-            self.version = tuple(map(int, [major, minor])) + (0,)
-
-        if prerelease:
-            self.prerelease = (prerelease[0], int(prerelease_num))
-        else:
-            self.prerelease = None
-
-    def __str__(self):
-        if self.version[2] == 0:
-            vstring = '.'.join(map(str, self.version[0:2]))
-        else:
-            vstring = '.'.join(map(str, self.version))
-
-        if self.prerelease:
-            vstring = vstring + self.prerelease[0] + str(self.prerelease[1])
-
-        return vstring
-
-    def _cmp(self, other):
-        if isinstance(other, str):
-            with suppress_known_deprecation():
-                other = StrictVersion(other)
-        elif not isinstance(other, StrictVersion):
-            return NotImplemented
-
-        if self.version == other.version:
-            # versions match; pre-release drives the comparison
-            return self._cmp_prerelease(other)
-
-        return -1 if self.version < other.version else 1
-
-    def _cmp_prerelease(self, other):
-        """
-        case 1: self has prerelease, other doesn't; other is greater
-        case 2: self doesn't have prerelease, other does: self is greater
-        case 3: both or neither have prerelease: compare them!
-        """
-        if self.prerelease and not other.prerelease:
-            return -1
-        elif not self.prerelease and other.prerelease:
-            return 1
-
-        if self.prerelease == other.prerelease:
-            return 0
-        elif self.prerelease < other.prerelease:
-            return -1
-        else:
-            return 1
-
-
-# end class StrictVersion
-
-
-# The rules according to Greg Stein:
-# 1) a version number has 1 or more numbers separated by a period or by
-#    sequences of letters. If only periods, then these are compared
-#    left-to-right to determine an ordering.
-# 2) sequences of letters are part of the tuple for comparison and are
-#    compared lexicographically
-# 3) recognize the numeric components may have leading zeroes
-#
-# The LooseVersion class below implements these rules: a version number
-# string is split up into a tuple of integer and string components, and
-# comparison is a simple tuple comparison.  This means that version
-# numbers behave in a predictable and obvious way, but a way that might
-# not necessarily be how people *want* version numbers to behave.  There
-# wouldn't be a problem if people could stick to purely numeric version
-# numbers: just split on period and compare the numbers as tuples.
-# However, people insist on putting letters into their version numbers;
-# the most common purpose seems to be:
-#   - indicating a "pre-release" version
-#     ('alpha', 'beta', 'a', 'b', 'pre', 'p')
-#   - indicating a post-release patch ('p', 'pl', 'patch')
-# but of course this can't cover all version number schemes, and there's
-# no way to know what a programmer means without asking him.
-#
-# The problem is what to do with letters (and other non-numeric
-# characters) in a version number.  The current implementation does the
-# obvious and predictable thing: keep them as strings and compare
-# lexically within a tuple comparison.  This has the desired effect if
-# an appended letter sequence implies something "post-release":
-# eg. "0.99" < "0.99pl14" < "1.0", and "5.001" < "5.001m" < "5.002".
-#
-# However, if letters in a version number imply a pre-release version,
-# the "obvious" thing isn't correct.  Eg. you would expect that
-# "1.5.1" < "1.5.2a2" < "1.5.2", but under the tuple/lexical comparison
-# implemented here, this just isn't so.
-#
-# Two possible solutions come to mind.  The first is to tie the
-# comparison algorithm to a particular set of semantic rules, as has
-# been done in the StrictVersion class above.  This works great as long
-# as everyone can go along with bondage and discipline.  Hopefully a
-# (large) subset of Python module programmers will agree that the
-# particular flavour of bondage and discipline provided by StrictVersion
-# provides enough benefit to be worth using, and will submit their
-# version numbering scheme to its domination.  The free-thinking
-# anarchists in the lot will never give in, though, and something needs
-# to be done to accommodate them.
-#
-# Perhaps a "moderately strict" version class could be implemented that
-# lets almost anything slide (syntactically), and makes some heuristic
-# assumptions about non-digits in version number strings.  This could
-# sink into special-case-hell, though; if I was as talented and
-# idiosyncratic as Larry Wall, I'd go ahead and implement a class that
-# somehow knows that "1.2.1" < "1.2.2a2" < "1.2.2" < "1.2.2pl3", and is
-# just as happy dealing with things like "2g6" and "1.13++".  I don't
-# think I'm smart enough to do it right though.
-#
-# In any case, I've coded the test suite for this module (see
-# ../test/test_version.py) specifically to fail on things like comparing
-# "1.2a2" and "1.2".  That's not because the *code* is doing anything
-# wrong, it's because the simple, obvious design doesn't match my
-# complicated, hairy expectations for real-world version numbers.  It
-# would be a snap to fix the test suite to say, "Yep, LooseVersion does
-# the Right Thing" (ie. the code matches the conception).  But I'd rather
-# have a conception that matches common notions about version numbers.
-
-
-class LooseVersion(Version):
-    """Version numbering for anarchists and software realists.
-    Implements the standard interface for version number classes as
-    described above.  A version number consists of a series of numbers,
-    separated by either periods or strings of letters.  When comparing
-    version numbers, the numeric components will be compared
-    numerically, and the alphabetic components lexically.  The following
-    are all valid version numbers, in no particular order:
-
-        1.5.1
-        1.5.2b2
-        161
-        3.10a
-        8.02
-        3.4j
-        1996.07.12
-        3.2.pl0
-        3.1.1.6
-        2g6
-        11g
-        0.960923
-        2.2beta29
-        1.13++
-        5.5.kw
-        2.0b1pl0
-
-    In fact, there is no such thing as an invalid version number under
-    this scheme; the rules for comparison are simple and predictable,
-    but may not always give the results you want (for some definition
-    of "want").
-    """
-
-    component_re = re.compile(r'(\d+ | [a-z]+ | \.)', re.VERBOSE)
-
-    def parse(self, vstring):
-        # I've given up on thinking I can reconstruct the version string
-        # from the parsed tuple -- so I just store the string here for
-        # use by __str__
-        self.vstring = vstring
-        components = [x for x in self.component_re.split(vstring) if x and x != '.']
-        for i, obj in enumerate(components):
-            try:
-                components[i] = int(obj)
-            except ValueError:
-                pass
-
-        self.version = components
-
-    def __str__(self):
-        return self.vstring
-
-    def __repr__(self):
-        return f"LooseVersion ('{self}')"
-
-    def _cmp(self, other):
-        if isinstance(other, str):
-            other = LooseVersion(other)
-        elif not isinstance(other, LooseVersion):
-            return NotImplemented
-
-        if self.version == other.version:
-            return 0
-        if self.version < other.version:
-            return -1
-        if self.version > other.version:
-            return 1
-
-
-# end class LooseVersion
diff --git a/voxvera/vendor/setuptools/_distutils/versionpredicate.py b/voxvera/vendor/setuptools/_distutils/versionpredicate.py
deleted file mode 100644
index fe31b0e..0000000
--- a/voxvera/vendor/setuptools/_distutils/versionpredicate.py
+++ /dev/null
@@ -1,175 +0,0 @@
-"""Module for parsing and testing package version predicate strings."""
-
-import operator
-import re
-
-from . import version
-
-re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)", re.ASCII)
-# (package) (rest)
-
-re_paren = re.compile(r"^\s*\((.*)\)\s*$")  # (list) inside of parentheses
-re_splitComparison = re.compile(r"^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$")
-# (comp) (version)
-
-
-def splitUp(pred):
-    """Parse a single version comparison.
-
-    Return (comparison string, StrictVersion)
-    """
-    res = re_splitComparison.match(pred)
-    if not res:
-        raise ValueError(f"bad package restriction syntax: {pred!r}")
-    comp, verStr = res.groups()
-    with version.suppress_known_deprecation():
-        other = version.StrictVersion(verStr)
-    return (comp, other)
-
-
-compmap = {
-    "<": operator.lt,
-    "<=": operator.le,
-    "==": operator.eq,
-    ">": operator.gt,
-    ">=": operator.ge,
-    "!=": operator.ne,
-}
-
-
-class VersionPredicate:
-    """Parse and test package version predicates.
-
-    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')
-
-    The `name` attribute provides the full dotted name that is given::
-
-    >>> v.name
-    'pyepat.abc'
-
-    The str() of a `VersionPredicate` provides a normalized
-    human-readable version of the expression::
-
-    >>> print(v)
-    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)
-
-    The `satisfied_by()` method can be used to determine with a given
-    version number is included in the set described by the version
-    restrictions::
-
-    >>> v.satisfied_by('1.1')
-    True
-    >>> v.satisfied_by('1.4')
-    True
-    >>> v.satisfied_by('1.0')
-    False
-    >>> v.satisfied_by('4444.4')
-    False
-    >>> v.satisfied_by('1555.1b3')
-    False
-
-    `VersionPredicate` is flexible in accepting extra whitespace::
-
-    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
-    >>> v.name
-    'pat'
-    >>> v.satisfied_by('0.1')
-    True
-    >>> v.satisfied_by('0.2')
-    False
-
-    If any version numbers passed in do not conform to the
-    restrictions of `StrictVersion`, a `ValueError` is raised::
-
-    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
-    Traceback (most recent call last):
-      ...
-    ValueError: invalid version number '1.2zb3'
-
-    It the module or package name given does not conform to what's
-    allowed as a legal module or package name, `ValueError` is
-    raised::
-
-    >>> v = VersionPredicate('foo-bar')
-    Traceback (most recent call last):
-      ...
-    ValueError: expected parenthesized list: '-bar'
-
-    >>> v = VersionPredicate('foo bar (12.21)')
-    Traceback (most recent call last):
-      ...
-    ValueError: expected parenthesized list: 'bar (12.21)'
-
-    """
-
-    def __init__(self, versionPredicateStr):
-        """Parse a version predicate string."""
-        # Fields:
-        #    name:  package name
-        #    pred:  list of (comparison string, StrictVersion)
-
-        versionPredicateStr = versionPredicateStr.strip()
-        if not versionPredicateStr:
-            raise ValueError("empty package restriction")
-        match = re_validPackage.match(versionPredicateStr)
-        if not match:
-            raise ValueError(f"bad package name in {versionPredicateStr!r}")
-        self.name, paren = match.groups()
-        paren = paren.strip()
-        if paren:
-            match = re_paren.match(paren)
-            if not match:
-                raise ValueError(f"expected parenthesized list: {paren!r}")
-            str = match.groups()[0]
-            self.pred = [splitUp(aPred) for aPred in str.split(",")]
-            if not self.pred:
-                raise ValueError(f"empty parenthesized list in {versionPredicateStr!r}")
-        else:
-            self.pred = []
-
-    def __str__(self):
-        if self.pred:
-            seq = [cond + " " + str(ver) for cond, ver in self.pred]
-            return self.name + " (" + ", ".join(seq) + ")"
-        else:
-            return self.name
-
-    def satisfied_by(self, version):
-        """True if version is compatible with all the predicates in self.
-        The parameter version must be acceptable to the StrictVersion
-        constructor.  It may be either a string or StrictVersion.
-        """
-        for cond, ver in self.pred:
-            if not compmap[cond](version, ver):
-                return False
-        return True
-
-
-_provision_rx = None
-
-
-def split_provision(value):
-    """Return the name and optional version number of a provision.
-
-    The version number, if given, will be returned as a `StrictVersion`
-    instance, otherwise it will be `None`.
-
-    >>> split_provision('mypkg')
-    ('mypkg', None)
-    >>> split_provision(' mypkg( 1.2 ) ')
-    ('mypkg', StrictVersion ('1.2'))
-    """
-    global _provision_rx
-    if _provision_rx is None:
-        _provision_rx = re.compile(
-            r"([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$", re.ASCII
-        )
-    value = value.strip()
-    m = _provision_rx.match(value)
-    if not m:
-        raise ValueError(f"illegal provides specification: {value!r}")
-    ver = m.group(2) or None
-    if ver:
-        with version.suppress_known_deprecation():
-            ver = version.StrictVersion(ver)
-    return m.group(1), ver
diff --git a/voxvera/vendor/setuptools/_distutils/zosccompiler.py b/voxvera/vendor/setuptools/_distutils/zosccompiler.py
deleted file mode 100644
index e49630a..0000000
--- a/voxvera/vendor/setuptools/_distutils/zosccompiler.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .compilers.C import zos
-
-zOSCCompiler = zos.Compiler
diff --git a/voxvera/vendor/setuptools/_entry_points.py b/voxvera/vendor/setuptools/_entry_points.py
deleted file mode 100644
index cd5dd2c..0000000
--- a/voxvera/vendor/setuptools/_entry_points.py
+++ /dev/null
@@ -1,94 +0,0 @@
-import functools
-import itertools
-import operator
-
-from jaraco.functools import pass_none
-from jaraco.text import yield_lines
-from more_itertools import consume
-
-from ._importlib import metadata
-from ._itertools import ensure_unique
-from .errors import OptionError
-
-
-def ensure_valid(ep):
-    """
-    Exercise one of the dynamic properties to trigger
-    the pattern match.
-
-    This function is deprecated in favor of importlib_metadata 8.7 and
-    Python 3.14 importlib.metadata, which validates entry points on
-    construction.
-    """
-    try:
-        ep.extras
-    except (AttributeError, AssertionError) as ex:
-        # Why both? See https://github.com/python/importlib_metadata/issues/488
-        msg = (
-            f"Problems to parse {ep}.\nPlease ensure entry-point follows the spec: "
-            "https://packaging.python.org/en/latest/specifications/entry-points/"
-        )
-        raise OptionError(msg) from ex
-
-
-def load_group(value, group):
-    """
-    Given a value of an entry point or series of entry points,
-    return each as an EntryPoint.
-    """
-    # normalize to a single sequence of lines
-    lines = yield_lines(value)
-    text = f'[{group}]\n' + '\n'.join(lines)
-    return metadata.EntryPoints._from_text(text)
-
-
-def by_group_and_name(ep):
-    return ep.group, ep.name
-
-
-def validate(eps: metadata.EntryPoints):
-    """
-    Ensure entry points are unique by group and name and validate each.
-    """
-    consume(map(ensure_valid, ensure_unique(eps, key=by_group_and_name)))
-    return eps
-
-
-@functools.singledispatch
-def load(eps):
-    """
-    Given a Distribution.entry_points, produce EntryPoints.
-    """
-    groups = itertools.chain.from_iterable(
-        load_group(value, group) for group, value in eps.items()
-    )
-    return validate(metadata.EntryPoints(groups))
-
-
-@load.register(str)
-def _(eps):
-    r"""
-    >>> ep, = load('[console_scripts]\nfoo=bar')
-    >>> ep.group
-    'console_scripts'
-    >>> ep.name
-    'foo'
-    >>> ep.value
-    'bar'
-    """
-    return validate(metadata.EntryPoints(metadata.EntryPoints._from_text(eps)))
-
-
-load.register(type(None), lambda x: x)
-
-
-@pass_none
-def render(eps: metadata.EntryPoints):
-    by_group = operator.attrgetter('group')
-    groups = itertools.groupby(sorted(eps, key=by_group), by_group)
-
-    return '\n'.join(f'[{group}]\n{render_items(items)}\n' for group, items in groups)
-
-
-def render_items(eps):
-    return '\n'.join(f'{ep.name} = {ep.value}' for ep in sorted(eps))
diff --git a/voxvera/vendor/setuptools/_imp.py b/voxvera/vendor/setuptools/_imp.py
deleted file mode 100644
index f1d9f29..0000000
--- a/voxvera/vendor/setuptools/_imp.py
+++ /dev/null
@@ -1,87 +0,0 @@
-"""
-Re-implementation of find_module and get_frozen_object
-from the deprecated imp module.
-"""
-
-import importlib.machinery
-import importlib.util
-import os
-import tokenize
-from importlib.util import module_from_spec
-
-PY_SOURCE = 1
-PY_COMPILED = 2
-C_EXTENSION = 3
-C_BUILTIN = 6
-PY_FROZEN = 7
-
-
-def find_spec(module, paths):
-    finder = (
-        importlib.machinery.PathFinder().find_spec
-        if isinstance(paths, list)
-        else importlib.util.find_spec
-    )
-    return finder(module, paths)
-
-
-def find_module(module, paths=None):
-    """Just like 'imp.find_module()', but with package support"""
-    spec = find_spec(module, paths)
-    if spec is None:
-        raise ImportError(f"Can't find {module}")
-    if not spec.has_location and hasattr(spec, 'submodule_search_locations'):
-        spec = importlib.util.spec_from_loader('__init__.py', spec.loader)
-
-    kind = -1
-    file = None
-    static = isinstance(spec.loader, type)
-    if (
-        spec.origin == 'frozen'
-        or static
-        and issubclass(spec.loader, importlib.machinery.FrozenImporter)
-    ):
-        kind = PY_FROZEN
-        path = None  # imp compabilty
-        suffix = mode = ''  # imp compatibility
-    elif (
-        spec.origin == 'built-in'
-        or static
-        and issubclass(spec.loader, importlib.machinery.BuiltinImporter)
-    ):
-        kind = C_BUILTIN
-        path = None  # imp compabilty
-        suffix = mode = ''  # imp compatibility
-    elif spec.has_location:
-        path = spec.origin
-        suffix = os.path.splitext(path)[1]
-        mode = 'r' if suffix in importlib.machinery.SOURCE_SUFFIXES else 'rb'
-
-        if suffix in importlib.machinery.SOURCE_SUFFIXES:
-            kind = PY_SOURCE
-            file = tokenize.open(path)
-        elif suffix in importlib.machinery.BYTECODE_SUFFIXES:
-            kind = PY_COMPILED
-            file = open(path, 'rb')
-        elif suffix in importlib.machinery.EXTENSION_SUFFIXES:
-            kind = C_EXTENSION
-
-    else:
-        path = None
-        suffix = mode = ''
-
-    return file, path, (suffix, mode, kind)
-
-
-def get_frozen_object(module, paths=None):
-    spec = find_spec(module, paths)
-    if not spec:
-        raise ImportError(f"Can't find {module}")
-    return spec.loader.get_code(module)
-
-
-def get_module(module, paths, info):
-    spec = find_spec(module, paths)
-    if not spec:
-        raise ImportError(f"Can't find {module}")
-    return module_from_spec(spec)
diff --git a/voxvera/vendor/setuptools/_importlib.py b/voxvera/vendor/setuptools/_importlib.py
deleted file mode 100644
index ce0fd52..0000000
--- a/voxvera/vendor/setuptools/_importlib.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import sys
-
-if sys.version_info < (3, 10):
-    import importlib_metadata as metadata  # pragma: no cover
-else:
-    import importlib.metadata as metadata  # noqa: F401
-
-
-import importlib.resources as resources  # noqa: F401
diff --git a/voxvera/vendor/setuptools/_itertools.py b/voxvera/vendor/setuptools/_itertools.py
deleted file mode 100644
index d6ca841..0000000
--- a/voxvera/vendor/setuptools/_itertools.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from more_itertools import consume  # noqa: F401
-
-
-# copied from jaraco.itertools 6.1
-def ensure_unique(iterable, key=lambda x: x):
-    """
-    Wrap an iterable to raise a ValueError if non-unique values are encountered.
-
-    >>> list(ensure_unique('abc'))
-    ['a', 'b', 'c']
-    >>> consume(ensure_unique('abca'))
-    Traceback (most recent call last):
-    ...
-    ValueError: Duplicate element 'a' encountered.
-    """
-    seen = set()
-    seen_add = seen.add
-    for element in iterable:
-        k = key(element)
-        if k in seen:
-            raise ValueError(f"Duplicate element {element!r} encountered.")
-        seen_add(k)
-        yield element
diff --git a/voxvera/vendor/setuptools/_normalization.py b/voxvera/vendor/setuptools/_normalization.py
deleted file mode 100644
index 6b8d4dd..0000000
--- a/voxvera/vendor/setuptools/_normalization.py
+++ /dev/null
@@ -1,180 +0,0 @@
-"""
-Helpers for normalization as expected in wheel/sdist/module file names
-and core metadata
-"""
-
-import re
-from typing import TYPE_CHECKING
-
-import packaging
-
-# https://packaging.python.org/en/latest/specifications/core-metadata/#name
-_VALID_NAME = re.compile(r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE)
-_UNSAFE_NAME_CHARS = re.compile(r"[^A-Z0-9._-]+", re.IGNORECASE)
-_NON_ALPHANUMERIC = re.compile(r"[^A-Z0-9]+", re.IGNORECASE)
-_PEP440_FALLBACK = re.compile(
-    r"^v?(?P(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.IGNORECASE
-)
-
-
-def safe_identifier(name: str) -> str:
-    """Make a string safe to be used as Python identifier.
-    >>> safe_identifier("12abc")
-    '_12abc'
-    >>> safe_identifier("__editable__.myns.pkg-78.9.3_local")
-    '__editable___myns_pkg_78_9_3_local'
-    """
-    safe = re.sub(r'\W|^(?=\d)', '_', name)
-    assert safe.isidentifier()
-    return safe
-
-
-def safe_name(component: str) -> str:
-    """Escape a component used as a project name according to Core Metadata.
-    >>> safe_name("hello world")
-    'hello-world'
-    >>> safe_name("hello?world")
-    'hello-world'
-    >>> safe_name("hello_world")
-    'hello_world'
-    """
-    return _UNSAFE_NAME_CHARS.sub("-", component)
-
-
-def safe_version(version: str) -> str:
-    """Convert an arbitrary string into a valid version string.
-    Can still raise an ``InvalidVersion`` exception.
-    To avoid exceptions use ``best_effort_version``.
-    >>> safe_version("1988 12 25")
-    '1988.12.25'
-    >>> safe_version("v0.2.1")
-    '0.2.1'
-    >>> safe_version("v0.2?beta")
-    '0.2b0'
-    >>> safe_version("v0.2 beta")
-    '0.2b0'
-    >>> safe_version("ubuntu lts")
-    Traceback (most recent call last):
-    ...
-    packaging.version.InvalidVersion: Invalid version: 'ubuntu.lts'
-    """
-    v = version.replace(' ', '.')
-    try:
-        return str(packaging.version.Version(v))
-    except packaging.version.InvalidVersion:
-        attempt = _UNSAFE_NAME_CHARS.sub("-", v)
-        return str(packaging.version.Version(attempt))
-
-
-def best_effort_version(version: str) -> str:
-    """Convert an arbitrary string into a version-like string.
-    Fallback when ``safe_version`` is not safe enough.
-    >>> best_effort_version("v0.2 beta")
-    '0.2b0'
-    >>> best_effort_version("ubuntu lts")
-    '0.dev0+sanitized.ubuntu.lts'
-    >>> best_effort_version("0.23ubuntu1")
-    '0.23.dev0+sanitized.ubuntu1'
-    >>> best_effort_version("0.23-")
-    '0.23.dev0+sanitized'
-    >>> best_effort_version("0.-_")
-    '0.dev0+sanitized'
-    >>> best_effort_version("42.+?1")
-    '42.dev0+sanitized.1'
-    """
-    try:
-        return safe_version(version)
-    except packaging.version.InvalidVersion:
-        v = version.replace(' ', '.')
-        match = _PEP440_FALLBACK.search(v)
-        if match:
-            safe = match["safe"]
-            rest = v[len(safe) :]
-        else:
-            safe = "0"
-            rest = version
-        safe_rest = _NON_ALPHANUMERIC.sub(".", rest).strip(".")
-        local = f"sanitized.{safe_rest}".strip(".")
-        return safe_version(f"{safe}.dev0+{local}")
-
-
-def safe_extra(extra: str) -> str:
-    """Normalize extra name according to PEP 685
-    >>> safe_extra("_FrIeNdLy-._.-bArD")
-    'friendly-bard'
-    >>> safe_extra("FrIeNdLy-._.-bArD__._-")
-    'friendly-bard'
-    """
-    return _NON_ALPHANUMERIC.sub("-", extra).strip("-").lower()
-
-
-def filename_component(value: str) -> str:
-    """Normalize each component of a filename (e.g. distribution/version part of wheel)
-    Note: ``value`` needs to be already normalized.
-    >>> filename_component("my-pkg")
-    'my_pkg'
-    """
-    return value.replace("-", "_").strip("_")
-
-
-def filename_component_broken(value: str) -> str:
-    """
-    Produce the incorrect filename component for compatibility.
-
-    See pypa/setuptools#4167 for detailed analysis.
-
-    TODO: replace this with filename_component after pip 24 is
-    nearly-ubiquitous.
-
-    >>> filename_component_broken('foo_bar-baz')
-    'foo-bar-baz'
-    """
-    return value.replace('_', '-')
-
-
-def safer_name(value: str) -> str:
-    """Like ``safe_name`` but can be used as filename component for wheel"""
-    # See bdist_wheel.safer_name
-    return (
-        # Per https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
-        re
-        .sub(r"[-_.]+", "-", safe_name(value))
-        .lower()
-        # Per https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
-        .replace("-", "_")
-    )
-
-
-def safer_best_effort_version(value: str) -> str:
-    """Like ``best_effort_version`` but can be used as filename component for wheel"""
-    # See bdist_wheel.safer_verion
-    # TODO: Replace with only safe_version in the future (no need for best effort)
-    return filename_component(best_effort_version(value))
-
-
-def _missing_canonicalize_license_expression(expression: str) -> str:
-    """
-    Defer import error to affect only users that actually use it
-    https://github.com/pypa/setuptools/issues/4894
-    >>> _missing_canonicalize_license_expression("a OR b")
-    Traceback (most recent call last):
-    ...
-    ImportError: ...Cannot import `packaging.licenses`...
-    """
-    raise ImportError(
-        "Cannot import `packaging.licenses`."
-        """
-        Setuptools>=77.0.0 requires "packaging>=24.2" to work properly.
-        Please make sure you have a suitable version installed.
-        """
-    )
-
-
-try:
-    from packaging.licenses import (
-        canonicalize_license_expression as _canonicalize_license_expression,
-    )
-except ImportError:  # pragma: nocover
-    if not TYPE_CHECKING:
-        # XXX: pyright is still upset even with # pyright: ignore[reportAssignmentType]
-        _canonicalize_license_expression = _missing_canonicalize_license_expression
diff --git a/voxvera/vendor/setuptools/_path.py b/voxvera/vendor/setuptools/_path.py
deleted file mode 100644
index 2b78022..0000000
--- a/voxvera/vendor/setuptools/_path.py
+++ /dev/null
@@ -1,93 +0,0 @@
-from __future__ import annotations
-
-import contextlib
-import os
-import sys
-from typing import TYPE_CHECKING, TypeVar, Union
-
-from more_itertools import unique_everseen
-
-if TYPE_CHECKING:
-    from typing_extensions import TypeAlias
-
-StrPath: TypeAlias = Union[str, os.PathLike[str]]  #  Same as _typeshed.StrPath
-StrPathT = TypeVar("StrPathT", bound=Union[str, os.PathLike[str]])
-
-
-def ensure_directory(path):
-    """Ensure that the parent directory of `path` exists"""
-    dirname = os.path.dirname(path)
-    os.makedirs(dirname, exist_ok=True)
-
-
-def same_path(p1: StrPath, p2: StrPath) -> bool:
-    """Differs from os.path.samefile because it does not require paths to exist.
-    Purely string based (no comparison between i-nodes).
-    >>> same_path("a/b", "./a/b")
-    True
-    >>> same_path("a/b", "a/./b")
-    True
-    >>> same_path("a/b", "././a/b")
-    True
-    >>> same_path("a/b", "./a/b/c/..")
-    True
-    >>> same_path("a/b", "../a/b/c")
-    False
-    >>> same_path("a", "a/b")
-    False
-    """
-    return normpath(p1) == normpath(p2)
-
-
-def _cygwin_patch(filename: StrPath):  # pragma: nocover
-    """
-    Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
-    symlink components. Using
-    os.path.abspath() works around this limitation. A fix in os.getcwd()
-    would probably better, in Cygwin even more so, except
-    that this seems to be by design...
-    """
-    return os.path.abspath(filename) if sys.platform == 'cygwin' else filename
-
-
-def normpath(filename: StrPath) -> str:
-    """Normalize a file/dir name for comparison purposes."""
-    return os.path.normcase(os.path.realpath(os.path.normpath(_cygwin_patch(filename))))
-
-
-@contextlib.contextmanager
-def paths_on_pythonpath(paths):
-    """
-    Add the indicated paths to the head of the PYTHONPATH environment
-    variable so that subprocesses will also see the packages at
-    these paths.
-
-    Do this in a context that restores the value on exit.
-
-    >>> getfixture('monkeypatch').setenv('PYTHONPATH', 'anything')
-    >>> with paths_on_pythonpath(['foo', 'bar']):
-    ...     assert 'foo' in os.environ['PYTHONPATH']
-    ...     assert 'anything' in os.environ['PYTHONPATH']
-    >>> os.environ['PYTHONPATH']
-    'anything'
-
-    >>> getfixture('monkeypatch').delenv('PYTHONPATH')
-    >>> with paths_on_pythonpath(['foo', 'bar']):
-    ...     assert 'foo' in os.environ['PYTHONPATH']
-    >>> os.environ.get('PYTHONPATH')
-    """
-    nothing = object()
-    orig_pythonpath = os.environ.get('PYTHONPATH', nothing)
-    current_pythonpath = os.environ.get('PYTHONPATH', '')
-    try:
-        prefix = os.pathsep.join(unique_everseen(paths))
-        to_join = filter(None, [prefix, current_pythonpath])
-        new_path = os.pathsep.join(to_join)
-        if new_path:
-            os.environ['PYTHONPATH'] = new_path
-        yield
-    finally:
-        if orig_pythonpath is nothing:
-            os.environ.pop('PYTHONPATH', None)
-        else:
-            os.environ['PYTHONPATH'] = orig_pythonpath
diff --git a/voxvera/vendor/setuptools/_reqs.py b/voxvera/vendor/setuptools/_reqs.py
deleted file mode 100644
index 7be56cb..0000000
--- a/voxvera/vendor/setuptools/_reqs.py
+++ /dev/null
@@ -1,42 +0,0 @@
-from __future__ import annotations
-
-from collections.abc import Iterable, Iterator
-from functools import lru_cache
-from typing import TYPE_CHECKING, Callable, TypeVar, Union, overload
-
-import jaraco.text as text
-from packaging.requirements import Requirement
-
-if TYPE_CHECKING:
-    from typing_extensions import TypeAlias
-
-_T = TypeVar("_T")
-_StrOrIter: TypeAlias = Union[str, Iterable[str]]
-
-
-parse_req: Callable[[str], Requirement] = lru_cache()(Requirement)
-# Setuptools parses the same requirement many times
-# (e.g. first for validation than for normalisation),
-# so it might be worth to cache.
-
-
-def parse_strings(strs: _StrOrIter) -> Iterator[str]:
-    """
-    Yield requirement strings for each specification in `strs`.
-
-    `strs` must be a string, or a (possibly-nested) iterable thereof.
-    """
-    return text.join_continuation(map(text.drop_comment, text.yield_lines(strs)))
-
-
-# These overloads are only needed because of a mypy false-positive, pyright gets it right
-# https://github.com/python/mypy/issues/3737
-@overload
-def parse(strs: _StrOrIter) -> Iterator[Requirement]: ...
-@overload
-def parse(strs: _StrOrIter, parser: Callable[[str], _T]) -> Iterator[_T]: ...
-def parse(strs: _StrOrIter, parser: Callable[[str], _T] = parse_req) -> Iterator[_T]:  # type: ignore[assignment]
-    """
-    Parse requirements.
-    """
-    return map(parser, parse_strings(strs))
diff --git a/voxvera/vendor/setuptools/_scripts.py b/voxvera/vendor/setuptools/_scripts.py
deleted file mode 100644
index 88bf02f..0000000
--- a/voxvera/vendor/setuptools/_scripts.py
+++ /dev/null
@@ -1,361 +0,0 @@
-from __future__ import annotations
-
-import os
-import re
-import shlex
-import shutil
-import struct
-import subprocess
-import sys
-import textwrap
-from collections.abc import Iterable
-from typing import TYPE_CHECKING, TypedDict
-
-from ._importlib import metadata, resources
-
-if TYPE_CHECKING:
-    from typing_extensions import Self
-
-from .warnings import SetuptoolsWarning
-
-from distutils.command.build_scripts import first_line_re
-from distutils.util import get_platform
-
-
-class _SplitArgs(TypedDict, total=False):
-    comments: bool
-    posix: bool
-
-
-class CommandSpec(list):
-    """
-    A command spec for a #! header, specified as a list of arguments akin to
-    those passed to Popen.
-    """
-
-    options: list[str] = []
-    split_args = _SplitArgs()
-
-    @classmethod
-    def best(cls):
-        """
-        Choose the best CommandSpec class based on environmental conditions.
-        """
-        return cls
-
-    @classmethod
-    def _sys_executable(cls):
-        _default = os.path.normpath(sys.executable)
-        return os.environ.get('__PYVENV_LAUNCHER__', _default)
-
-    @classmethod
-    def from_param(cls, param: Self | str | Iterable[str] | None) -> Self:
-        """
-        Construct a CommandSpec from a parameter to build_scripts, which may
-        be None.
-        """
-        if isinstance(param, cls):
-            return param
-        if isinstance(param, str):
-            return cls.from_string(param)
-        if isinstance(param, Iterable):
-            return cls(param)
-        if param is None:
-            return cls.from_environment()
-        raise TypeError(f"Argument has an unsupported type {type(param)}")
-
-    @classmethod
-    def from_environment(cls):
-        return cls([cls._sys_executable()])
-
-    @classmethod
-    def from_string(cls, string: str) -> Self:
-        """
-        Construct a command spec from a simple string representing a command
-        line parseable by shlex.split.
-        """
-        items = shlex.split(string, **cls.split_args)
-        return cls(items)
-
-    def install_options(self, script_text: str):
-        self.options = shlex.split(self._extract_options(script_text))
-        cmdline = subprocess.list2cmdline(self)
-        if not isascii(cmdline):
-            self.options[:0] = ['-x']
-
-    @staticmethod
-    def _extract_options(orig_script):
-        """
-        Extract any options from the first line of the script.
-        """
-        first = (orig_script + '\n').splitlines()[0]
-        match = _first_line_re().match(first)
-        options = match.group(1) or '' if match else ''
-        return options.strip()
-
-    def as_header(self):
-        return self._render(self + list(self.options))
-
-    @staticmethod
-    def _strip_quotes(item):
-        _QUOTES = '"\''
-        for q in _QUOTES:
-            if item.startswith(q) and item.endswith(q):
-                return item[1:-1]
-        return item
-
-    @staticmethod
-    def _render(items):
-        cmdline = subprocess.list2cmdline(
-            CommandSpec._strip_quotes(item.strip()) for item in items
-        )
-        return '#!' + cmdline + '\n'
-
-
-class WindowsCommandSpec(CommandSpec):
-    split_args = _SplitArgs(posix=False)
-
-
-class ScriptWriter:
-    """
-    Encapsulates behavior around writing entry point scripts for console and
-    gui apps.
-    """
-
-    template = textwrap.dedent(
-        r"""
-        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
-        import re
-        import sys
-
-        # for compatibility with easy_install; see #2198
-        __requires__ = %(spec)r
-
-        try:
-            from importlib.metadata import distribution
-        except ImportError:
-            try:
-                from importlib_metadata import distribution
-            except ImportError:
-                from pkg_resources import load_entry_point
-
-
-        def importlib_load_entry_point(spec, group, name):
-            dist_name, _, _ = spec.partition('==')
-            matches = (
-                entry_point
-                for entry_point in distribution(dist_name).entry_points
-                if entry_point.group == group and entry_point.name == name
-            )
-            return next(matches).load()
-
-
-        globals().setdefault('load_entry_point', importlib_load_entry_point)
-
-
-        if __name__ == '__main__':
-            sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
-            sys.exit(load_entry_point(%(spec)r, %(group)r, %(name)r)())
-        """
-    ).lstrip()
-
-    command_spec_class = CommandSpec
-
-    @classmethod
-    def get_args(cls, dist, header=None):
-        """
-        Yield write_script() argument tuples for a distribution's
-        console_scripts and gui_scripts entry points.
-        """
-
-        # If distribution is not an importlib.metadata.Distribution, assume
-        # it's a pkg_resources.Distribution and transform it.
-        if not hasattr(dist, 'entry_points'):
-            SetuptoolsWarning.emit("Unsupported distribution encountered.")
-            dist = metadata.Distribution.at(dist.egg_info)
-
-        if header is None:
-            header = cls.get_header()
-        spec = f'{dist.name}=={dist.version}'
-        for type_ in 'console', 'gui':
-            group = f'{type_}_scripts'
-            for ep in dist.entry_points.select(group=group):
-                name = ep.name
-                cls._ensure_safe_name(ep.name)
-                script_text = cls.template % locals()
-                args = cls._get_script_args(type_, ep.name, header, script_text)
-                yield from args
-
-    @staticmethod
-    def _ensure_safe_name(name):
-        """
-        Prevent paths in *_scripts entry point names.
-        """
-        has_path_sep = re.search(r'[\\/]', name)
-        if has_path_sep:
-            raise ValueError("Path separators not allowed in script names")
-
-    @classmethod
-    def best(cls):
-        """
-        Select the best ScriptWriter for this environment.
-        """
-        if sys.platform == 'win32' or (os.name == 'java' and os._name == 'nt'):
-            return WindowsScriptWriter.best()
-        else:
-            return cls
-
-    @classmethod
-    def _get_script_args(cls, type_, name, header, script_text):
-        # Simply write the stub with no extension.
-        yield (name, header + script_text)
-
-    @classmethod
-    def get_header(
-        cls,
-        script_text: str = "",
-        executable: str | CommandSpec | Iterable[str] | None = None,
-    ) -> str:
-        """Create a #! line, getting options (if any) from script_text"""
-        cmd = cls.command_spec_class.best().from_param(executable)
-        cmd.install_options(script_text)
-        return cmd.as_header()
-
-
-class WindowsScriptWriter(ScriptWriter):
-    command_spec_class = WindowsCommandSpec
-
-    @classmethod
-    def best(cls):
-        """
-        Select the best ScriptWriter suitable for Windows
-        """
-        writer_lookup = dict(
-            executable=WindowsExecutableLauncherWriter,
-            natural=cls,
-        )
-        # for compatibility, use the executable launcher by default
-        launcher = os.environ.get('SETUPTOOLS_LAUNCHER', 'executable')
-        return writer_lookup[launcher]
-
-    @classmethod
-    def _get_script_args(cls, type_, name, header, script_text):
-        "For Windows, add a .py extension"
-        ext = dict(console='.pya', gui='.pyw')[type_]
-        if ext not in os.environ['PATHEXT'].lower().split(';'):
-            msg = (
-                "{ext} not listed in PATHEXT; scripts will not be "
-                "recognized as executables."
-            ).format(**locals())
-            SetuptoolsWarning.emit(msg)
-        old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe']
-        old.remove(ext)
-        header = cls._adjust_header(type_, header)
-        blockers = [name + x for x in old]
-        yield name + ext, header + script_text, 't', blockers
-
-    @classmethod
-    def _adjust_header(cls, type_, orig_header):
-        """
-        Make sure 'pythonw' is used for gui and 'python' is used for
-        console (regardless of what sys.executable is).
-        """
-        pattern = 'pythonw.exe'
-        repl = 'python.exe'
-        if type_ == 'gui':
-            pattern, repl = repl, pattern
-        pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE)
-        new_header = pattern_ob.sub(string=orig_header, repl=repl)
-        return new_header if cls._use_header(new_header) else orig_header
-
-    @staticmethod
-    def _use_header(new_header):
-        """
-        Should _adjust_header use the replaced header?
-
-        On non-windows systems, always use. On
-        Windows systems, only use the replaced header if it resolves
-        to an executable on the system.
-        """
-        clean_header = new_header[2:-1].strip('"')
-        return sys.platform != 'win32' or shutil.which(clean_header)
-
-
-class WindowsExecutableLauncherWriter(WindowsScriptWriter):
-    @classmethod
-    def _get_script_args(cls, type_, name, header, script_text):
-        """
-        For Windows, add a .py extension and an .exe launcher
-        """
-        if type_ == 'gui':
-            launcher_type = 'gui'
-            ext = '-script.pyw'
-            old = ['.pyw']
-        else:
-            launcher_type = 'cli'
-            ext = '-script.py'
-            old = ['.py', '.pyc', '.pyo']
-        hdr = cls._adjust_header(type_, header)
-        blockers = [name + x for x in old]
-        yield (name + ext, hdr + script_text, 't', blockers)
-        yield (
-            name + '.exe',
-            get_win_launcher(launcher_type),
-            'b',  # write in binary mode
-        )
-        if not is_64bit():
-            # install a manifest for the launcher to prevent Windows
-            # from detecting it as an installer (which it will for
-            #  launchers like easy_install.exe). Consider only
-            #  adding a manifest for launchers detected as installers.
-            #  See Distribute #143 for details.
-            m_name = name + '.exe.manifest'
-            yield (m_name, load_launcher_manifest(name), 't')
-
-
-def get_win_launcher(type):
-    """
-    Load the Windows launcher (executable) suitable for launching a script.
-
-    `type` should be either 'cli' or 'gui'
-
-    Returns the executable as a byte string.
-    """
-    launcher_fn = f'{type}.exe'
-    if is_64bit():
-        if get_platform() == "win-arm64":
-            launcher_fn = launcher_fn.replace(".", "-arm64.")
-        else:
-            launcher_fn = launcher_fn.replace(".", "-64.")
-    else:
-        launcher_fn = launcher_fn.replace(".", "-32.")
-    return resources.files('setuptools').joinpath(launcher_fn).read_bytes()
-
-
-def load_launcher_manifest(name):
-    res = resources.files(__name__).joinpath('launcher manifest.xml')
-    return res.read_text(encoding='utf-8') % vars()
-
-
-def _first_line_re():
-    """
-    Return a regular expression based on first_line_re suitable for matching
-    strings.
-    """
-    if isinstance(first_line_re.pattern, str):
-        return first_line_re
-
-    # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern.
-    return re.compile(first_line_re.pattern.decode())
-
-
-def is_64bit():
-    return struct.calcsize("P") == 8
-
-
-def isascii(s):
-    try:
-        s.encode('ascii')
-    except UnicodeError:
-        return False
-    return True
diff --git a/voxvera/vendor/setuptools/_shutil.py b/voxvera/vendor/setuptools/_shutil.py
deleted file mode 100644
index 660459a..0000000
--- a/voxvera/vendor/setuptools/_shutil.py
+++ /dev/null
@@ -1,59 +0,0 @@
-"""Convenience layer on top of stdlib's shutil and os"""
-
-import os
-import stat
-from typing import Callable, TypeVar
-
-from .compat import py311
-
-from distutils import log
-
-try:
-    from os import chmod  # pyright: ignore[reportAssignmentType]
-    # Losing type-safety w/ pyright, but that's ok
-except ImportError:  # pragma: no cover
-    # Jython compatibility
-    def chmod(*args: object, **kwargs: object) -> None:  # type: ignore[misc] # Mypy reuses the imported definition anyway
-        pass
-
-
-_T = TypeVar("_T")
-
-
-def attempt_chmod_verbose(path, mode):
-    log.debug("changing mode of %s to %o", path, mode)
-    try:
-        chmod(path, mode)
-    except OSError as e:  # pragma: no cover
-        log.debug("chmod failed: %s", e)
-
-
-# Must match shutil._OnExcCallback
-def _auto_chmod(
-    func: Callable[..., _T], arg: str, exc: BaseException
-) -> _T:  # pragma: no cover
-    """shutils onexc callback to automatically call chmod for certain functions."""
-    # Only retry for scenarios known to have an issue
-    if func in [os.unlink, os.remove] and os.name == 'nt':
-        attempt_chmod_verbose(arg, stat.S_IWRITE)
-        return func(arg)
-    raise exc
-
-
-def rmtree(path, ignore_errors=False, onexc=_auto_chmod):
-    """
-    Similar to ``shutil.rmtree`` but automatically executes ``chmod``
-    for well know Windows failure scenarios.
-    """
-    return py311.shutil_rmtree(path, ignore_errors, onexc)
-
-
-def rmdir(path, **opts):
-    if os.path.isdir(path):
-        rmtree(path, **opts)
-
-
-def current_umask():
-    tmp = os.umask(0o022)
-    os.umask(tmp)
-    return tmp
diff --git a/voxvera/vendor/setuptools/_static.py b/voxvera/vendor/setuptools/_static.py
deleted file mode 100644
index af35862..0000000
--- a/voxvera/vendor/setuptools/_static.py
+++ /dev/null
@@ -1,188 +0,0 @@
-from functools import wraps
-from typing import TypeVar
-
-import packaging.specifiers
-
-from .warnings import SetuptoolsDeprecationWarning
-
-
-class Static:
-    """
-    Wrapper for built-in object types that are allow setuptools to identify
-    static core metadata (in opposition to ``Dynamic``, as defined :pep:`643`).
-
-    The trick is to mark values with :class:`Static` when they come from
-    ``pyproject.toml`` or ``setup.cfg``, so if any plugin overwrite the value
-    with a built-in, setuptools will be able to recognise the change.
-
-    We inherit from built-in classes, so that we don't need to change the existing
-    code base to deal with the new types.
-    We also should strive for immutability objects to avoid changes after the
-    initial parsing.
-    """
-
-    _mutated_: bool = False  # TODO: Remove after deprecation warning is solved
-
-
-def _prevent_modification(target: type, method: str, copying: str) -> None:
-    """
-    Because setuptools is very flexible we cannot fully prevent
-    plugins and user customizations from modifying static values that were
-    parsed from config files.
-    But we can attempt to block "in-place" mutations and identify when they
-    were done.
-    """
-    fn = getattr(target, method, None)
-    if fn is None:
-        return
-
-    @wraps(fn)
-    def _replacement(self: Static, *args, **kwargs):
-        # TODO: After deprecation period raise NotImplementedError instead of warning
-        #       which obviated the existence and checks of the `_mutated_` attribute.
-        self._mutated_ = True
-        SetuptoolsDeprecationWarning.emit(
-            "Direct modification of value will be disallowed",
-            f"""
-            In an effort to implement PEP 643, direct/in-place changes of static values
-            that come from configuration files are deprecated.
-            If you need to modify this value, please first create a copy with {copying}
-            and make sure conform to all relevant standards when overriding setuptools
-            functionality (https://packaging.python.org/en/latest/specifications/).
-            """,
-            due_date=(2025, 10, 10),  # Initially introduced in 2024-09-06
-        )
-        return fn(self, *args, **kwargs)
-
-    _replacement.__doc__ = ""  # otherwise doctest may fail.
-    setattr(target, method, _replacement)
-
-
-class Str(str, Static):
-    pass
-
-
-class Tuple(tuple, Static):
-    pass
-
-
-class List(list, Static):
-    """
-    :meta private:
-    >>> x = List([1, 2, 3])
-    >>> is_static(x)
-    True
-    >>> x += [0]  # doctest: +IGNORE_EXCEPTION_DETAIL
-    Traceback (most recent call last):
-    SetuptoolsDeprecationWarning: Direct modification ...
-    >>> is_static(x)  # no longer static after modification
-    False
-    >>> y = list(x)
-    >>> y.clear()
-    >>> y
-    []
-    >>> y == x
-    False
-    >>> is_static(List(y))
-    True
-    """
-
-
-# Make `List` immutable-ish
-# (certain places of setuptools/distutils issue a warn if we use tuple instead of list)
-for _method in (
-    '__delitem__',
-    '__iadd__',
-    '__setitem__',
-    'append',
-    'clear',
-    'extend',
-    'insert',
-    'remove',
-    'reverse',
-    'pop',
-):
-    _prevent_modification(List, _method, "`list(value)`")
-
-
-class Dict(dict, Static):
-    """
-    :meta private:
-    >>> x = Dict({'a': 1, 'b': 2})
-    >>> is_static(x)
-    True
-    >>> x['c'] = 0  # doctest: +IGNORE_EXCEPTION_DETAIL
-    Traceback (most recent call last):
-    SetuptoolsDeprecationWarning: Direct modification ...
-    >>> x._mutated_
-    True
-    >>> is_static(x)  # no longer static after modification
-    False
-    >>> y = dict(x)
-    >>> y.popitem()
-    ('b', 2)
-    >>> y == x
-    False
-    >>> is_static(Dict(y))
-    True
-    """
-
-
-# Make `Dict` immutable-ish (we cannot inherit from types.MappingProxyType):
-for _method in (
-    '__delitem__',
-    '__ior__',
-    '__setitem__',
-    'clear',
-    'pop',
-    'popitem',
-    'setdefault',
-    'update',
-):
-    _prevent_modification(Dict, _method, "`dict(value)`")
-
-
-class SpecifierSet(packaging.specifiers.SpecifierSet, Static):
-    """Not exactly a built-in type but useful for ``requires-python``"""
-
-
-T = TypeVar("T")
-
-
-def noop(value: T) -> T:
-    """
-    >>> noop(42)
-    42
-    """
-    return value
-
-
-_CONVERSIONS = {str: Str, tuple: Tuple, list: List, dict: Dict}
-
-
-def attempt_conversion(value: T) -> T:
-    """
-    >>> is_static(attempt_conversion("hello"))
-    True
-    >>> is_static(object())
-    False
-    """
-    return _CONVERSIONS.get(type(value), noop)(value)  # type: ignore[call-overload]
-
-
-def is_static(value: object) -> bool:
-    """
-    >>> is_static(a := Dict({'a': 1}))
-    True
-    >>> is_static(dict(a))
-    False
-    >>> is_static(b := List([1, 2, 3]))
-    True
-    >>> is_static(list(b))
-    False
-    """
-    return isinstance(value, Static) and not value._mutated_
-
-
-EMPTY_LIST = List()
-EMPTY_DICT = Dict()
diff --git a/voxvera/vendor/setuptools/_vendor/.lock b/voxvera/vendor/setuptools/_vendor/.lock
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/INSTALLER
deleted file mode 100644
index 5c69047..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-uv
\ No newline at end of file
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/LICENSE b/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/LICENSE
deleted file mode 100644
index b49c3af..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/LICENSE
+++ /dev/null
@@ -1,166 +0,0 @@
-GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. 
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-  This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
-  0. Additional Definitions.
-
-  As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
-  "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
-  An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
-  A "Combined Work" is a work produced by combining or linking an
-Application with the Library.  The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
-  The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
-  The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
-  1. Exception to Section 3 of the GNU GPL.
-
-  You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
-  2. Conveying Modified Versions.
-
-  If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
-   a) under this License, provided that you make a good faith effort to
-   ensure that, in the event an Application does not supply the
-   function or data, the facility still operates, and performs
-   whatever part of its purpose remains meaningful, or
-
-   b) under the GNU GPL, with none of the additional permissions of
-   this License applicable to that copy.
-
-  3. Object Code Incorporating Material from Library Header Files.
-
-  The object code form of an Application may incorporate material from
-a header file that is part of the Library.  You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
-   a) Give prominent notice with each copy of the object code that the
-   Library is used in it and that the Library and its use are
-   covered by this License.
-
-   b) Accompany the object code with a copy of the GNU GPL and this license
-   document.
-
-  4. Combined Works.
-
-  You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
-   a) Give prominent notice with each copy of the Combined Work that
-   the Library is used in it and that the Library and its use are
-   covered by this License.
-
-   b) Accompany the Combined Work with a copy of the GNU GPL and this license
-   document.
-
-   c) For a Combined Work that displays copyright notices during
-   execution, include the copyright notice for the Library among
-   these notices, as well as a reference directing the user to the
-   copies of the GNU GPL and this license document.
-
-   d) Do one of the following:
-
-       0) Convey the Minimal Corresponding Source under the terms of this
-       License, and the Corresponding Application Code in a form
-       suitable for, and under terms that permit, the user to
-       recombine or relink the Application with a modified version of
-       the Linked Version to produce a modified Combined Work, in the
-       manner specified by section 6 of the GNU GPL for conveying
-       Corresponding Source.
-
-       1) Use a suitable shared library mechanism for linking with the
-       Library.  A suitable mechanism is one that (a) uses at run time
-       a copy of the Library already present on the user's computer
-       system, and (b) will operate properly with a modified version
-       of the Library that is interface-compatible with the Linked
-       Version.
-
-   e) Provide Installation Information, but only if you would otherwise
-   be required to provide such information under section 6 of the
-   GNU GPL, and only to the extent that such information is
-   necessary to install and execute a modified version of the
-   Combined Work produced by recombining or relinking the
-   Application with a modified version of the Linked Version. (If
-   you use option 4d0, the Installation Information must accompany
-   the Minimal Corresponding Source and Corresponding Application
-   Code. If you use option 4d1, you must provide the Installation
-   Information in the manner specified by section 6 of the GNU GPL
-   for conveying Corresponding Source.)
-
-  5. Combined Libraries.
-
-  You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
-   a) Accompany the combined library with a copy of the same work based
-   on the Library, uncombined with any other library facilities,
-   conveyed under the terms of this License.
-
-   b) Give prominent notice with the combined library that part of it
-   is a work based on the Library, and explaining where to find the
-   accompanying uncombined form of the same work.
-
-  6. Revised Versions of the GNU Lesser General Public License.
-
-  The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser 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
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
-  If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
-
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA
deleted file mode 100644
index 32214fb..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA
+++ /dev/null
@@ -1,420 +0,0 @@
-Metadata-Version: 2.1
-Name: autocommand
-Version: 2.2.2
-Summary: A library to create a command-line program from a function
-Home-page: https://github.com/Lucretiel/autocommand
-Author: Nathan West
-License: LGPLv3
-Project-URL: Homepage, https://github.com/Lucretiel/autocommand
-Project-URL: Bug Tracker, https://github.com/Lucretiel/autocommand/issues
-Platform: any
-Classifier: Development Status :: 6 - Mature
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Topic :: Software Development
-Classifier: Topic :: Software Development :: Libraries
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Requires-Python: >=3.7
-Description-Content-Type: text/markdown
-License-File: LICENSE
-
-[![PyPI version](https://badge.fury.io/py/autocommand.svg)](https://badge.fury.io/py/autocommand)
-
-# autocommand
-
-A library to automatically generate and run simple argparse parsers from function signatures.
-
-## Installation
-
-Autocommand is installed via pip:
-
-```
-$ pip install autocommand
-```
-
-## Usage
-
-Autocommand turns a function into a command-line program. It converts the function's parameter signature into command-line arguments, and automatically runs the function if the module was called as `__main__`. In effect, it lets your create a smart main function.
-
-```python
-from autocommand import autocommand
-
-# This program takes exactly one argument and echos it.
-@autocommand(__name__)
-def echo(thing):
-    print(thing)
-```
-
-```
-$ python echo.py hello
-hello
-$ python echo.py -h
-usage: echo [-h] thing
-
-positional arguments:
-  thing
-
-optional arguments:
-  -h, --help  show this help message and exit
-$ python echo.py hello world  # too many arguments
-usage: echo.py [-h] thing
-echo.py: error: unrecognized arguments: world
-```
-
-As you can see, autocommand converts the signature of the function into an argument spec. When you run the file as a program, autocommand collects the command-line arguments and turns them into function arguments. The function is executed with these arguments, and then the program exits with the return value of the function, via `sys.exit`. Autocommand also automatically creates a usage message, which can be invoked with `-h` or `--help`, and automatically prints an error message when provided with invalid arguments.
-
-### Types
-
-You can use a type annotation to give an argument a type. Any type (or in fact any callable) that returns an object when given a string argument can be used, though there are a few special cases that are described later.
-
-```python
-@autocommand(__name__)
-def net_client(host, port: int):
-    ...
-```
-
-Autocommand will catch `TypeErrors` raised by the type during argument parsing, so you can supply a callable and do some basic argument validation as well.
-
-### Trailing Arguments
-
-You can add a `*args` parameter to your function to give it trailing arguments. The command will collect 0 or more trailing arguments and supply them to `args` as a tuple. If a type annotation is supplied, the type is applied to each argument.
-
-```python
-# Write the contents of each file, one by one
-@autocommand(__name__)
-def cat(*files):
-    for filename in files:
-        with open(filename) as file:
-            for line in file:
-                print(line.rstrip())
-```
-
-```
-$ python cat.py -h
-usage: ipython [-h] [file [file ...]]
-
-positional arguments:
-  file
-
-optional arguments:
-  -h, --help  show this help message and exit
-```
-
-### Options
-
-To create `--option` switches, just assign a default. Autocommand will automatically create `--long` and `-s`hort switches.
-
-```python
-@autocommand(__name__)
-def do_with_config(argument, config='~/foo.conf'):
-    pass
-```
-
-```
-$ python example.py -h
-usage: example.py [-h] [-c CONFIG] argument
-
-positional arguments:
-  argument
-
-optional arguments:
-  -h, --help            show this help message and exit
-  -c CONFIG, --config CONFIG
-```
-
-The option's type is automatically deduced from the default, unless one is explicitly given in an annotation:
-
-```python
-@autocommand(__name__)
-def http_connect(host, port=80):
-    print('{}:{}'.format(host, port))
-```
-
-```
-$ python http.py -h
-usage: http.py [-h] [-p PORT] host
-
-positional arguments:
-  host
-
-optional arguments:
-  -h, --help            show this help message and exit
-  -p PORT, --port PORT
-$ python http.py localhost
-localhost:80
-$ python http.py localhost -p 8080
-localhost:8080
-$ python http.py localhost -p blah
-usage: http.py [-h] [-p PORT] host
-http.py: error: argument -p/--port: invalid int value: 'blah'
-```
-
-#### None
-
-If an option is given a default value of `None`, it reads in a value as normal, but supplies `None` if the option isn't provided.
-
-#### Switches
-
-If an argument is given a default value of `True` or `False`, or
-given an explicit `bool` type, it becomes an option switch.
-
-```python
-    @autocommand(__name__)
-    def example(verbose=False, quiet=False):
-        pass
-```
-
-```
-$ python example.py -h
-usage: example.py [-h] [-v] [-q]
-
-optional arguments:
-  -h, --help     show this help message and exit
-  -v, --verbose
-  -q, --quiet
-```
-
-Autocommand attempts to do the "correct thing" in these cases- if the default is `True`, then supplying the switch makes the argument `False`; if the type is `bool` and the default is some other `True` value, then supplying the switch makes the argument `False`, while not supplying the switch makes the argument the default value.
-
-Autocommand also supports the creation of switch inverters. Pass `add_nos=True` to `autocommand` to enable this.
-
-```
-    @autocommand(__name__, add_nos=True)
-    def example(verbose=False):
-        pass
-```
-
-```
-$ python example.py -h
-usage: ipython [-h] [-v] [--no-verbose]
-
-optional arguments:
-  -h, --help     show this help message and exit
-  -v, --verbose
-  --no-verbose
-```
-
-Using the `--no-` version of a switch will pass the opposite value in as a function argument. If multiple switches are present, the last one takes precedence.
-
-#### Files
-
-If the default value is a file object, such as `sys.stdout`, then autocommand just looks for a string, for a file path. It doesn't do any special checking on the string, though (such as checking if the file exists); it's better to let the client decide how to handle errors in this case. Instead, it provides a special context manager called `smart_open`, which behaves exactly like `open` if a filename or other openable type is provided, but also lets you use already open files:
-
-```python
-from autocommand import autocommand, smart_open
-import sys
-
-# Write the contents of stdin, or a file, to stdout
-@autocommand(__name__)
-def write_out(infile=sys.stdin):
-    with smart_open(infile) as f:
-        for line in f:
-            print(line.rstrip())
-    # If a file was opened, it is closed here. If it was just stdin, it is untouched.
-```
-
-```
-$ echo "Hello World!" | python write_out.py | tee hello.txt
-Hello World!
-$ python write_out.py --infile hello.txt
-Hello World!
-```
-
-### Descriptions and docstrings
-
-The `autocommand` decorator accepts `description` and `epilog` kwargs, corresponding to the `description `_ and `epilog `_ of the `ArgumentParser`. If no description is given, but the decorated function has a docstring, then it is taken as the `description` for the `ArgumentParser`. You can also provide both the description and epilog in the docstring by splitting it into two sections with 4 or more - characters.
-
-```python
-@autocommand(__name__)
-def copy(infile=sys.stdin, outfile=sys.stdout):
-    '''
-    Copy an the contents of a file (or stdin) to another file (or stdout)
-    ----------
-    Some extra documentation in the epilog
-    '''
-    with smart_open(infile) as istr:
-        with smart_open(outfile, 'w') as ostr:
-            for line in istr:
-                ostr.write(line)
-```
-
-```
-$ python copy.py -h
-usage: copy.py [-h] [-i INFILE] [-o OUTFILE]
-
-Copy an the contents of a file (or stdin) to another file (or stdout)
-
-optional arguments:
-  -h, --help            show this help message and exit
-  -i INFILE, --infile INFILE
-  -o OUTFILE, --outfile OUTFILE
-
-Some extra documentation in the epilog
-$ echo "Hello World" | python copy.py --outfile hello.txt
-$ python copy.py --infile hello.txt --outfile hello2.txt
-$ python copy.py --infile hello2.txt
-Hello World
-```
-
-### Parameter descriptions
-
-You can also attach description text to individual parameters in the annotation. To attach both a type and a description, supply them both in any order in a tuple
-
-```python
-@autocommand(__name__)
-def copy_net(
-    infile: 'The name of the file to send',
-    host: 'The host to send the file to',
-    port: (int, 'The port to connect to')):
-
-    '''
-    Copy a file over raw TCP to a remote destination.
-    '''
-    # Left as an exercise to the reader
-```
-
-### Decorators and wrappers
-
-Autocommand automatically follows wrapper chains created by `@functools.wraps`. This means that you can apply other wrapping decorators to your main function, and autocommand will still correctly detect the signature.
-
-```python
-from functools import wraps
-from autocommand import autocommand
-
-def print_yielded(func):
-    '''
-    Convert a generator into a function that prints all yielded elements
-    '''
-    @wraps(func)
-    def wrapper(*args, **kwargs):
-        for thing in func(*args, **kwargs):
-            print(thing)
-    return wrapper
-
-@autocommand(__name__,
-    description= 'Print all the values from START to STOP, inclusive, in steps of STEP',
-    epilog=      'STOP and STEP default to 1')
-@print_yielded
-def seq(stop, start=1, step=1):
-    for i in range(start, stop + 1, step):
-        yield i
-```
-
-```
-$ seq.py -h
-usage: seq.py [-h] [-s START] [-S STEP] stop
-
-Print all the values from START to STOP, inclusive, in steps of STEP
-
-positional arguments:
-  stop
-
-optional arguments:
-  -h, --help            show this help message and exit
-  -s START, --start START
-  -S STEP, --step STEP
-
-STOP and STEP default to 1
-```
-
-Even though autocommand is being applied to the `wrapper` returned by `print_yielded`, it still retreives the signature of the underlying `seq` function to create the argument parsing.
-
-### Custom Parser
-
-While autocommand's automatic parser generator is a powerful convenience, it doesn't cover all of the different features that argparse provides. If you need these features, you can provide your own parser as a kwarg to `autocommand`:
-
-```python
-from argparse import ArgumentParser
-from autocommand import autocommand
-
-parser = ArgumentParser()
-# autocommand can't do optional positonal parameters
-parser.add_argument('arg', nargs='?')
-# or mutually exclusive options
-group = parser.add_mutually_exclusive_group()
-group.add_argument('-v', '--verbose', action='store_true')
-group.add_argument('-q', '--quiet', action='store_true')
-
-@autocommand(__name__, parser=parser)
-def main(arg, verbose, quiet):
-    print(arg, verbose, quiet)
-```
-
-```
-$ python parser.py -h
-usage: write_file.py [-h] [-v | -q] [arg]
-
-positional arguments:
-  arg
-
-optional arguments:
-  -h, --help     show this help message and exit
-  -v, --verbose
-  -q, --quiet
-$ python parser.py
-None False False
-$ python parser.py hello
-hello False False
-$ python parser.py -v
-None True False
-$ python parser.py -q
-None False True
-$ python parser.py -vq
-usage: parser.py [-h] [-v | -q] [arg]
-parser.py: error: argument -q/--quiet: not allowed with argument -v/--verbose
-```
-
-Any parser should work fine, so long as each of the parser's arguments has a corresponding parameter in the decorated main function. The order of parameters doesn't matter, as long as they are all present. Note that when using a custom parser, autocommand doesn't modify the parser or the retrieved arguments. This means that no description/epilog will be added, and the function's type annotations and defaults (if present) will be ignored.
-
-## Testing and Library use
-
-The decorated function is only called and exited from if the first argument to `autocommand` is `'__main__'` or `True`. If it is neither of these values, or no argument is given, then a new main function is created by the decorator. This function has the signature `main(argv=None)`, and is intended to be called with arguments as if via `main(sys.argv[1:])`. The function has the attributes `parser` and `main`, which are the generated `ArgumentParser` and the original main function that was decorated. This is to facilitate testing and library use of your main. Calling the function triggers a `parse_args()` with the supplied arguments, and returns the result of the main function. Note that, while it returns instead of calling `sys.exit`, the `parse_args()` function will raise a `SystemExit` in the event of a parsing error or `-h/--help` argument.
-
-```python
-    @autocommand()
-    def test_prog(arg1, arg2: int, quiet=False, verbose=False):
-        if not quiet:
-            print(arg1, arg2)
-            if verbose:
-                print("LOUD NOISES")
-
-        return 0
-
-    print(test_prog(['-v', 'hello', '80']))
-```
-
-```
-$ python test_prog.py
-hello 80
-LOUD NOISES
-0
-```
-
-If the function is called with no arguments, `sys.argv[1:]` is used. This is to allow the autocommand function to be used as a setuptools entry point.
-
-## Exceptions and limitations
-
-- There are a few possible exceptions that `autocommand` can raise. All of them derive from `autocommand.AutocommandError`.
-
-  - If an invalid annotation is given (that is, it isn't a `type`, `str`, `(type, str)`, or `(str, type)`, an `AnnotationError` is raised. The `type` may be any callable, as described in the `Types`_ section.
-  - If the function has a `**kwargs` parameter, a `KWargError` is raised.
-  - If, somehow, the function has a positional-only parameter, a `PositionalArgError` is raised. This means that the argument doesn't have a name, which is currently not possible with a plain `def` or `lambda`, though many built-in functions have this kind of parameter.
-
-- There are a few argparse features that are not supported by autocommand.
-
-  - It isn't possible to have an optional positional argument (as opposed to a `--option`). POSIX thinks this is bad form anyway.
-  - It isn't possible to have mutually exclusive arguments or options
-  - It isn't possible to have subcommands or subparsers, though I'm working on a few solutions involving classes or nested function definitions to allow this.
-
-## Development
-
-Autocommand cannot be important from the project root; this is to enforce separation of concerns and prevent accidental importing of `setup.py` or tests. To develop, install the project in editable mode:
-
-```
-$ python setup.py develop
-```
-
-This will create a link to the source files in the deployment directory, so that any source changes are reflected when it is imported.
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/RECORD
deleted file mode 100644
index 8cd7450..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/RECORD
+++ /dev/null
@@ -1,13 +0,0 @@
-autocommand-2.2.2.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-autocommand-2.2.2.dist-info/LICENSE,sha256=reeNBJgtaZctREqOFKlPh6IzTdOFXMgDSOqOJAqg3y0,7634
-autocommand-2.2.2.dist-info/METADATA,sha256=OADZuR3O6iBlpu1ieTgzYul6w4uOVrk0P0BO5TGGAJk,15006
-autocommand-2.2.2.dist-info/RECORD,,
-autocommand-2.2.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-autocommand-2.2.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
-autocommand-2.2.2.dist-info/top_level.txt,sha256=AzfhgKKS8EdAwWUTSF8mgeVQbXOY9kokHB6kSqwwqu0,12
-autocommand/__init__.py,sha256=zko5Rnvolvb-UXjCx_2ArPTGBWwUK5QY4LIQIKYR7As,1037
-autocommand/autoasync.py,sha256=AMdyrxNS4pqWJfP_xuoOcImOHWD-qT7x06wmKN1Vp-U,5680
-autocommand/autocommand.py,sha256=hmkEmQ72HtL55gnURVjDOnsfYlGd5lLXbvT4KG496Qw,2505
-autocommand/automain.py,sha256=A2b8i754Mxc_DjU9WFr6vqYDWlhz0cn8miu8d8EsxV8,2076
-autocommand/autoparse.py,sha256=WVWmZJPcbzUKXP40raQw_0HD8qPJ2V9VG1eFFmmnFxw,11642
-autocommand/errors.py,sha256=7aa3roh9Herd6nIKpQHNWEslWE8oq7GiHYVUuRqORnA,886
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/REQUESTED
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/WHEEL
deleted file mode 100644
index 57e3d84..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/WHEEL
+++ /dev/null
@@ -1,5 +0,0 @@
-Wheel-Version: 1.0
-Generator: bdist_wheel (0.38.4)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/top_level.txt b/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/top_level.txt
deleted file mode 100644
index dda5158..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand-2.2.2.dist-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-autocommand
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand/__init__.py b/voxvera/vendor/setuptools/_vendor/autocommand/__init__.py
deleted file mode 100644
index 73fbfca..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2014-2016 Nathan West
-#
-# This file is part of autocommand.
-#
-# autocommand is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# autocommand is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with autocommand.  If not, see .
-
-# flake8 flags all these imports as unused, hence the NOQAs everywhere.
-
-from .automain import automain  # NOQA
-from .autoparse import autoparse, smart_open  # NOQA
-from .autocommand import autocommand  # NOQA
-
-try:
-    from .autoasync import autoasync  # NOQA
-except ImportError:  # pragma: no cover
-    pass
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand/autoasync.py b/voxvera/vendor/setuptools/_vendor/autocommand/autoasync.py
deleted file mode 100644
index 688f7e0..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand/autoasync.py
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 2014-2015 Nathan West
-#
-# This file is part of autocommand.
-#
-# autocommand is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# autocommand is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with autocommand.  If not, see .
-
-from asyncio import get_event_loop, iscoroutine
-from functools import wraps
-from inspect import signature
-
-
-async def _run_forever_coro(coro, args, kwargs, loop):
-    '''
-    This helper function launches an async main function that was tagged with
-    forever=True. There are two possibilities:
-
-    - The function is a normal function, which handles initializing the event
-      loop, which is then run forever
-    - The function is a coroutine, which needs to be scheduled in the event
-      loop, which is then run forever
-      - There is also the possibility that the function is a normal function
-        wrapping a coroutine function
-
-    The function is therefore called unconditionally and scheduled in the event
-    loop if the return value is a coroutine object.
-
-    The reason this is a separate function is to make absolutely sure that all
-    the objects created are garbage collected after all is said and done; we
-    do this to ensure that any exceptions raised in the tasks are collected
-    ASAP.
-    '''
-
-    # Personal note: I consider this an antipattern, as it relies on the use of
-    # unowned resources. The setup function dumps some stuff into the event
-    # loop where it just whirls in the ether without a well defined owner or
-    # lifetime. For this reason, there's a good chance I'll remove the
-    # forever=True feature from autoasync at some point in the future.
-    thing = coro(*args, **kwargs)
-    if iscoroutine(thing):
-        await thing
-
-
-def autoasync(coro=None, *, loop=None, forever=False, pass_loop=False):
-    '''
-    Convert an asyncio coroutine into a function which, when called, is
-    evaluted in an event loop, and the return value returned. This is intented
-    to make it easy to write entry points into asyncio coroutines, which
-    otherwise need to be explictly evaluted with an event loop's
-    run_until_complete.
-
-    If `loop` is given, it is used as the event loop to run the coro in. If it
-    is None (the default), the loop is retreived using asyncio.get_event_loop.
-    This call is defered until the decorated function is called, so that
-    callers can install custom event loops or event loop policies after
-    @autoasync is applied.
-
-    If `forever` is True, the loop is run forever after the decorated coroutine
-    is finished. Use this for servers created with asyncio.start_server and the
-    like.
-
-    If `pass_loop` is True, the event loop object is passed into the coroutine
-    as the `loop` kwarg when the wrapper function is called. In this case, the
-    wrapper function's __signature__ is updated to remove this parameter, so
-    that autoparse can still be used on it without generating a parameter for
-    `loop`.
-
-    This coroutine can be called with ( @autoasync(...) ) or without
-    ( @autoasync ) arguments.
-
-    Examples:
-
-    @autoasync
-    def get_file(host, port):
-        reader, writer = yield from asyncio.open_connection(host, port)
-        data = reader.read()
-        sys.stdout.write(data.decode())
-
-    get_file(host, port)
-
-    @autoasync(forever=True, pass_loop=True)
-    def server(host, port, loop):
-        yield_from loop.create_server(Proto, host, port)
-
-    server('localhost', 8899)
-
-    '''
-    if coro is None:
-        return lambda c: autoasync(
-            c, loop=loop,
-            forever=forever,
-            pass_loop=pass_loop)
-
-    # The old and new signatures are required to correctly bind the loop
-    # parameter in 100% of cases, even if it's a positional parameter.
-    # NOTE: A future release will probably require the loop parameter to be
-    # a kwonly parameter.
-    if pass_loop:
-        old_sig = signature(coro)
-        new_sig = old_sig.replace(parameters=(
-            param for name, param in old_sig.parameters.items()
-            if name != "loop"))
-
-    @wraps(coro)
-    def autoasync_wrapper(*args, **kwargs):
-        # Defer the call to get_event_loop so that, if a custom policy is
-        # installed after the autoasync decorator, it is respected at call time
-        local_loop = get_event_loop() if loop is None else loop
-
-        # Inject the 'loop' argument. We have to use this signature binding to
-        # ensure it's injected in the correct place (positional, keyword, etc)
-        if pass_loop:
-            bound_args = old_sig.bind_partial()
-            bound_args.arguments.update(
-                loop=local_loop,
-                **new_sig.bind(*args, **kwargs).arguments)
-            args, kwargs = bound_args.args, bound_args.kwargs
-
-        if forever:
-            local_loop.create_task(_run_forever_coro(
-                coro, args, kwargs, local_loop
-            ))
-            local_loop.run_forever()
-        else:
-            return local_loop.run_until_complete(coro(*args, **kwargs))
-
-    # Attach the updated signature. This allows 'pass_loop' to be used with
-    # autoparse
-    if pass_loop:
-        autoasync_wrapper.__signature__ = new_sig
-
-    return autoasync_wrapper
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand/autocommand.py b/voxvera/vendor/setuptools/_vendor/autocommand/autocommand.py
deleted file mode 100644
index 097e86d..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand/autocommand.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 2014-2015 Nathan West
-#
-# This file is part of autocommand.
-#
-# autocommand is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# autocommand is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with autocommand.  If not, see .
-
-from .autoparse import autoparse
-from .automain import automain
-try:
-    from .autoasync import autoasync
-except ImportError:  # pragma: no cover
-    pass
-
-
-def autocommand(
-        module, *,
-        description=None,
-        epilog=None,
-        add_nos=False,
-        parser=None,
-        loop=None,
-        forever=False,
-        pass_loop=False):
-
-    if callable(module):
-        raise TypeError('autocommand requires a module name argument')
-
-    def autocommand_decorator(func):
-        # Step 1: if requested, run it all in an asyncio event loop. autoasync
-        # patches the __signature__ of the decorated function, so that in the
-        # event that pass_loop is True, the `loop` parameter of the original
-        # function will *not* be interpreted as a command-line argument by
-        # autoparse
-        if loop is not None or forever or pass_loop:
-            func = autoasync(
-                func,
-                loop=None if loop is True else loop,
-                pass_loop=pass_loop,
-                forever=forever)
-
-        # Step 2: create parser. We do this second so that the arguments are
-        # parsed and passed *before* entering the asyncio event loop, if it
-        # exists. This simplifies the stack trace and ensures errors are
-        # reported earlier. It also ensures that errors raised during parsing &
-        # passing are still raised if `forever` is True.
-        func = autoparse(
-            func,
-            description=description,
-            epilog=epilog,
-            add_nos=add_nos,
-            parser=parser)
-
-        # Step 3: call the function automatically if __name__ == '__main__' (or
-        # if True was provided)
-        func = automain(module)(func)
-
-        return func
-
-    return autocommand_decorator
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand/automain.py b/voxvera/vendor/setuptools/_vendor/autocommand/automain.py
deleted file mode 100644
index 6cc45db..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand/automain.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 2014-2015 Nathan West
-#
-# This file is part of autocommand.
-#
-# autocommand is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# autocommand is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with autocommand.  If not, see .
-
-import sys
-from .errors import AutocommandError
-
-
-class AutomainRequiresModuleError(AutocommandError, TypeError):
-    pass
-
-
-def automain(module, *, args=(), kwargs=None):
-    '''
-    This decorator automatically invokes a function if the module is being run
-    as the "__main__" module. Optionally, provide args or kwargs with which to
-    call the function. If `module` is "__main__", the function is called, and
-    the program is `sys.exit`ed with the return value. You can also pass `True`
-    to cause the function to be called unconditionally. If the function is not
-    called, it is returned unchanged by the decorator.
-
-    Usage:
-
-    @automain(__name__)  # Pass __name__ to check __name__=="__main__"
-    def main():
-        ...
-
-    If __name__ is "__main__" here, the main function is called, and then
-    sys.exit called with the return value.
-    '''
-
-    # Check that @automain(...) was called, rather than @automain
-    if callable(module):
-        raise AutomainRequiresModuleError(module)
-
-    if module == '__main__' or module is True:
-        if kwargs is None:
-            kwargs = {}
-
-        # Use a function definition instead of a lambda for a neater traceback
-        def automain_decorator(main):
-            sys.exit(main(*args, **kwargs))
-
-        return automain_decorator
-    else:
-        return lambda main: main
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand/autoparse.py b/voxvera/vendor/setuptools/_vendor/autocommand/autoparse.py
deleted file mode 100644
index 0276a3f..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand/autoparse.py
+++ /dev/null
@@ -1,333 +0,0 @@
-# Copyright 2014-2015 Nathan West
-#
-# This file is part of autocommand.
-#
-# autocommand is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# autocommand is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with autocommand.  If not, see .
-
-import sys
-from re import compile as compile_regex
-from inspect import signature, getdoc, Parameter
-from argparse import ArgumentParser
-from contextlib import contextmanager
-from functools import wraps
-from io import IOBase
-from autocommand.errors import AutocommandError
-
-
-_empty = Parameter.empty
-
-
-class AnnotationError(AutocommandError):
-    '''Annotation error: annotation must be a string, type, or tuple of both'''
-
-
-class PositionalArgError(AutocommandError):
-    '''
-    Postional Arg Error: autocommand can't handle postional-only parameters
-    '''
-
-
-class KWArgError(AutocommandError):
-    '''kwarg Error: autocommand can't handle a **kwargs parameter'''
-
-
-class DocstringError(AutocommandError):
-    '''Docstring error'''
-
-
-class TooManySplitsError(DocstringError):
-    '''
-    The docstring had too many ---- section splits. Currently we only support
-    using up to a single split, to split the docstring into description and
-    epilog parts.
-    '''
-
-
-def _get_type_description(annotation):
-    '''
-    Given an annotation, return the (type, description) for the parameter.
-    If you provide an annotation that is somehow both a string and a callable,
-    the behavior is undefined.
-    '''
-    if annotation is _empty:
-        return None, None
-    elif callable(annotation):
-        return annotation, None
-    elif isinstance(annotation, str):
-        return None, annotation
-    elif isinstance(annotation, tuple):
-        try:
-            arg1, arg2 = annotation
-        except ValueError as e:
-            raise AnnotationError(annotation) from e
-        else:
-            if callable(arg1) and isinstance(arg2, str):
-                return arg1, arg2
-            elif isinstance(arg1, str) and callable(arg2):
-                return arg2, arg1
-
-    raise AnnotationError(annotation)
-
-
-def _add_arguments(param, parser, used_char_args, add_nos):
-    '''
-    Add the argument(s) to an ArgumentParser (using add_argument) for a given
-    parameter. used_char_args is the set of -short options currently already in
-    use, and is updated (if necessary) by this function. If add_nos is True,
-    this will also add an inverse switch for all boolean options. For
-    instance, for the boolean parameter "verbose", this will create --verbose
-    and --no-verbose.
-    '''
-
-    # Impl note: This function is kept separate from make_parser because it's
-    # already very long and I wanted to separate out as much as possible into
-    # its own call scope, to prevent even the possibility of suble mutation
-    # bugs.
-    if param.kind is param.POSITIONAL_ONLY:
-        raise PositionalArgError(param)
-    elif param.kind is param.VAR_KEYWORD:
-        raise KWArgError(param)
-
-    # These are the kwargs for the add_argument function.
-    arg_spec = {}
-    is_option = False
-
-    # Get the type and default from the annotation.
-    arg_type, description = _get_type_description(param.annotation)
-
-    # Get the default value
-    default = param.default
-
-    # If there is no explicit type, and the default is present and not None,
-    # infer the type from the default.
-    if arg_type is None and default not in {_empty, None}:
-        arg_type = type(default)
-
-    # Add default. The presence of a default means this is an option, not an
-    # argument.
-    if default is not _empty:
-        arg_spec['default'] = default
-        is_option = True
-
-    # Add the type
-    if arg_type is not None:
-        # Special case for bool: make it just a --switch
-        if arg_type is bool:
-            if not default or default is _empty:
-                arg_spec['action'] = 'store_true'
-            else:
-                arg_spec['action'] = 'store_false'
-
-            # Switches are always options
-            is_option = True
-
-        # Special case for file types: make it a string type, for filename
-        elif isinstance(default, IOBase):
-            arg_spec['type'] = str
-
-        # TODO: special case for list type.
-        #   - How to specificy type of list members?
-        #       - param: [int]
-        #       - param: int =[]
-        #   - action='append' vs nargs='*'
-
-        else:
-            arg_spec['type'] = arg_type
-
-    # nargs: if the signature includes *args, collect them as trailing CLI
-    # arguments in a list. *args can't have a default value, so it can never be
-    # an option.
-    if param.kind is param.VAR_POSITIONAL:
-        # TODO: consider depluralizing metavar/name here.
-        arg_spec['nargs'] = '*'
-
-    # Add description.
-    if description is not None:
-        arg_spec['help'] = description
-
-    # Get the --flags
-    flags = []
-    name = param.name
-
-    if is_option:
-        # Add the first letter as a -short option.
-        for letter in name[0], name[0].swapcase():
-            if letter not in used_char_args:
-                used_char_args.add(letter)
-                flags.append('-{}'.format(letter))
-                break
-
-        # If the parameter is a --long option, or is a -short option that
-        # somehow failed to get a flag, add it.
-        if len(name) > 1 or not flags:
-            flags.append('--{}'.format(name))
-
-        arg_spec['dest'] = name
-    else:
-        flags.append(name)
-
-    parser.add_argument(*flags, **arg_spec)
-
-    # Create the --no- version for boolean switches
-    if add_nos and arg_type is bool:
-        parser.add_argument(
-            '--no-{}'.format(name),
-            action='store_const',
-            dest=name,
-            const=default if default is not _empty else False)
-
-
-def make_parser(func_sig, description, epilog, add_nos):
-    '''
-    Given the signature of a function, create an ArgumentParser
-    '''
-    parser = ArgumentParser(description=description, epilog=epilog)
-
-    used_char_args = {'h'}
-
-    # Arange the params so that single-character arguments are first. This
-    # esnures they don't have to get --long versions. sorted is stable, so the
-    # parameters will otherwise still be in relative order.
-    params = sorted(
-        func_sig.parameters.values(),
-        key=lambda param: len(param.name) > 1)
-
-    for param in params:
-        _add_arguments(param, parser, used_char_args, add_nos)
-
-    return parser
-
-
-_DOCSTRING_SPLIT = compile_regex(r'\n\s*-{4,}\s*\n')
-
-
-def parse_docstring(docstring):
-    '''
-    Given a docstring, parse it into a description and epilog part
-    '''
-    if docstring is None:
-        return '', ''
-
-    parts = _DOCSTRING_SPLIT.split(docstring)
-
-    if len(parts) == 1:
-        return docstring, ''
-    elif len(parts) == 2:
-        return parts[0], parts[1]
-    else:
-        raise TooManySplitsError()
-
-
-def autoparse(
-        func=None, *,
-        description=None,
-        epilog=None,
-        add_nos=False,
-        parser=None):
-    '''
-    This decorator converts a function that takes normal arguments into a
-    function which takes a single optional argument, argv, parses it using an
-    argparse.ArgumentParser, and calls the underlying function with the parsed
-    arguments. If it is not given, sys.argv[1:] is used. This is so that the
-    function can be used as a setuptools entry point, as well as a normal main
-    function. sys.argv[1:] is not evaluated until the function is called, to
-    allow injecting different arguments for testing.
-
-    It uses the argument signature of the function to create an
-    ArgumentParser. Parameters without defaults become positional parameters,
-    while parameters *with* defaults become --options. Use annotations to set
-    the type of the parameter.
-
-    The `desctiption` and `epilog` parameters corrospond to the same respective
-    argparse parameters. If no description is given, it defaults to the
-    decorated functions's docstring, if present.
-
-    If add_nos is True, every boolean option (that is, every parameter with a
-    default of True/False or a type of bool) will have a --no- version created
-    as well, which inverts the option. For instance, the --verbose option will
-    have a --no-verbose counterpart. These are not mutually exclusive-
-    whichever one appears last in the argument list will have precedence.
-
-    If a parser is given, it is used instead of one generated from the function
-    signature. In this case, no parser is created; instead, the given parser is
-    used to parse the argv argument. The parser's results' argument names must
-    match up with the parameter names of the decorated function.
-
-    The decorated function is attached to the result as the `func` attribute,
-    and the parser is attached as the `parser` attribute.
-    '''
-
-    # If @autoparse(...) is used instead of @autoparse
-    if func is None:
-        return lambda f: autoparse(
-            f, description=description,
-            epilog=epilog,
-            add_nos=add_nos,
-            parser=parser)
-
-    func_sig = signature(func)
-
-    docstr_description, docstr_epilog = parse_docstring(getdoc(func))
-
-    if parser is None:
-        parser = make_parser(
-            func_sig,
-            description or docstr_description,
-            epilog or docstr_epilog,
-            add_nos)
-
-    @wraps(func)
-    def autoparse_wrapper(argv=None):
-        if argv is None:
-            argv = sys.argv[1:]
-
-        # Get empty argument binding, to fill with parsed arguments. This
-        # object does all the heavy lifting of turning named arguments into
-        # into correctly bound *args and **kwargs.
-        parsed_args = func_sig.bind_partial()
-        parsed_args.arguments.update(vars(parser.parse_args(argv)))
-
-        return func(*parsed_args.args, **parsed_args.kwargs)
-
-    # TODO: attach an updated __signature__ to autoparse_wrapper, just in case.
-
-    # Attach the wrapped function and parser, and return the wrapper.
-    autoparse_wrapper.func = func
-    autoparse_wrapper.parser = parser
-    return autoparse_wrapper
-
-
-@contextmanager
-def smart_open(filename_or_file, *args, **kwargs):
-    '''
-    This context manager allows you to open a filename, if you want to default
-    some already-existing file object, like sys.stdout, which shouldn't be
-    closed at the end of the context. If the filename argument is a str, bytes,
-    or int, the file object is created via a call to open with the given *args
-    and **kwargs, sent to the context, and closed at the end of the context,
-    just like "with open(filename) as f:". If it isn't one of the openable
-    types, the object simply sent to the context unchanged, and left unclosed
-    at the end of the context. Example:
-
-        def work_with_file(name=sys.stdout):
-            with smart_open(name) as f:
-                # Works correctly if name is a str filename or sys.stdout
-                print("Some stuff", file=f)
-                # If it was a filename, f is closed at the end here.
-    '''
-    if isinstance(filename_or_file, (str, bytes, int)):
-        with open(filename_or_file, *args, **kwargs) as file:
-            yield file
-    else:
-        yield filename_or_file
diff --git a/voxvera/vendor/setuptools/_vendor/autocommand/errors.py b/voxvera/vendor/setuptools/_vendor/autocommand/errors.py
deleted file mode 100644
index 2570607..0000000
--- a/voxvera/vendor/setuptools/_vendor/autocommand/errors.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2014-2016 Nathan West
-#
-# This file is part of autocommand.
-#
-# autocommand is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# autocommand is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with autocommand.  If not, see .
-
-
-class AutocommandError(Exception):
-    '''Base class for autocommand exceptions'''
-    pass
-
-# Individual modules will define errors specific to that module.
diff --git a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/INSTALLER
deleted file mode 100644
index 5c69047..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-uv
\ No newline at end of file
diff --git a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/LICENSE b/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/LICENSE
deleted file mode 100644
index 1bb5a44..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/LICENSE
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA
deleted file mode 100644
index db0a2dc..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA
+++ /dev/null
@@ -1,46 +0,0 @@
-Metadata-Version: 2.1
-Name: backports.tarfile
-Version: 1.2.0
-Summary: Backport of CPython tarfile module
-Author-email: "Jason R. Coombs" 
-Project-URL: Homepage, https://github.com/jaraco/backports.tarfile
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3 :: Only
-Requires-Python: >=3.8
-Description-Content-Type: text/x-rst
-License-File: LICENSE
-Provides-Extra: docs
-Requires-Dist: sphinx >=3.5 ; extra == 'docs'
-Requires-Dist: jaraco.packaging >=9.3 ; extra == 'docs'
-Requires-Dist: rst.linker >=1.9 ; extra == 'docs'
-Requires-Dist: furo ; extra == 'docs'
-Requires-Dist: sphinx-lint ; extra == 'docs'
-Provides-Extra: testing
-Requires-Dist: pytest !=8.1.*,>=6 ; extra == 'testing'
-Requires-Dist: pytest-checkdocs >=2.4 ; extra == 'testing'
-Requires-Dist: pytest-cov ; extra == 'testing'
-Requires-Dist: pytest-enabler >=2.2 ; extra == 'testing'
-Requires-Dist: jaraco.test ; extra == 'testing'
-Requires-Dist: pytest !=8.0.* ; extra == 'testing'
-
-.. image:: https://img.shields.io/pypi/v/backports.tarfile.svg
-   :target: https://pypi.org/project/backports.tarfile
-
-.. image:: https://img.shields.io/pypi/pyversions/backports.tarfile.svg
-
-.. image:: https://github.com/jaraco/backports.tarfile/actions/workflows/main.yml/badge.svg
-   :target: https://github.com/jaraco/backports.tarfile/actions?query=workflow%3A%22tests%22
-   :alt: tests
-
-.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
-    :target: https://github.com/astral-sh/ruff
-    :alt: Ruff
-
-.. .. image:: https://readthedocs.org/projects/backportstarfile/badge/?version=latest
-..    :target: https://backportstarfile.readthedocs.io/en/latest/?badge=latest
-
-.. image:: https://img.shields.io/badge/skeleton-2024-informational
-   :target: https://blog.jaraco.com/skeleton
diff --git a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/RECORD
deleted file mode 100644
index c7d2c25..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/RECORD
+++ /dev/null
@@ -1,12 +0,0 @@
-backports.tarfile-1.2.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-backports.tarfile-1.2.0.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
-backports.tarfile-1.2.0.dist-info/METADATA,sha256=ghXFTq132dxaEIolxr3HK1mZqm9iyUmaRANZQSr6WlE,2020
-backports.tarfile-1.2.0.dist-info/RECORD,,
-backports.tarfile-1.2.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-backports.tarfile-1.2.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
-backports.tarfile-1.2.0.dist-info/top_level.txt,sha256=cGjaLMOoBR1FK0ApojtzWVmViTtJ7JGIK_HwXiEsvtU,10
-backports/__init__.py,sha256=iOEMwnlORWezdO8-2vxBIPSR37D7JGjluZ8f55vzxls,81
-backports/tarfile/__init__.py,sha256=Pwf2qUIfB0SolJPCKcx3vz3UEu_aids4g4sAfxy94qg,108491
-backports/tarfile/__main__.py,sha256=Yw2oGT1afrz2eBskzdPYL8ReB_3liApmhFkN2EbDmc4,59
-backports/tarfile/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-backports/tarfile/compat/py38.py,sha256=iYkyt_gvWjLzGUTJD9TuTfMMjOk-ersXZmRlvQYN2qE,568
diff --git a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/REQUESTED
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/WHEEL
deleted file mode 100644
index bab98d6..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/WHEEL
+++ /dev/null
@@ -1,5 +0,0 @@
-Wheel-Version: 1.0
-Generator: bdist_wheel (0.43.0)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
diff --git a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/top_level.txt b/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/top_level.txt
deleted file mode 100644
index 99d2be5..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-backports
diff --git a/voxvera/vendor/setuptools/_vendor/backports/__init__.py b/voxvera/vendor/setuptools/_vendor/backports/__init__.py
deleted file mode 100644
index 0d1f7ed..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-__path__ = __import__('pkgutil').extend_path(__path__, __name__)  # type: ignore
diff --git a/voxvera/vendor/setuptools/_vendor/backports/tarfile/__init__.py b/voxvera/vendor/setuptools/_vendor/backports/tarfile/__init__.py
deleted file mode 100644
index 8c16881..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports/tarfile/__init__.py
+++ /dev/null
@@ -1,2937 +0,0 @@
-#-------------------------------------------------------------------
-# tarfile.py
-#-------------------------------------------------------------------
-# Copyright (C) 2002 Lars Gustaebel 
-# All rights reserved.
-#
-# Permission  is  hereby granted,  free  of charge,  to  any person
-# obtaining a  copy of  this software  and associated documentation
-# files  (the  "Software"),  to   deal  in  the  Software   without
-# restriction,  including  without limitation  the  rights to  use,
-# copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies  of  the  Software,  and to  permit  persons  to  whom the
-# Software  is  furnished  to  do  so,  subject  to  the  following
-# conditions:
-#
-# The above copyright  notice and this  permission notice shall  be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS  IS", WITHOUT WARRANTY OF ANY  KIND,
-# EXPRESS OR IMPLIED, INCLUDING  BUT NOT LIMITED TO  THE WARRANTIES
-# OF  MERCHANTABILITY,  FITNESS   FOR  A  PARTICULAR   PURPOSE  AND
-# NONINFRINGEMENT.  IN  NO  EVENT SHALL  THE  AUTHORS  OR COPYRIGHT
-# HOLDERS  BE LIABLE  FOR ANY  CLAIM, DAMAGES  OR OTHER  LIABILITY,
-# WHETHER  IN AN  ACTION OF  CONTRACT, TORT  OR OTHERWISE,  ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-"""Read from and write to tar format archives.
-"""
-
-version     = "0.9.0"
-__author__  = "Lars Gust\u00e4bel (lars@gustaebel.de)"
-__credits__ = "Gustavo Niemeyer, Niels Gust\u00e4bel, Richard Townsend."
-
-#---------
-# Imports
-#---------
-from builtins import open as bltn_open
-import sys
-import os
-import io
-import shutil
-import stat
-import time
-import struct
-import copy
-import re
-
-from .compat.py38 import removesuffix
-
-try:
-    import pwd
-except ImportError:
-    pwd = None
-try:
-    import grp
-except ImportError:
-    grp = None
-
-# os.symlink on Windows prior to 6.0 raises NotImplementedError
-# OSError (winerror=1314) will be raised if the caller does not hold the
-# SeCreateSymbolicLinkPrivilege privilege
-symlink_exception = (AttributeError, NotImplementedError, OSError)
-
-# from tarfile import *
-__all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError", "ReadError",
-           "CompressionError", "StreamError", "ExtractError", "HeaderError",
-           "ENCODING", "USTAR_FORMAT", "GNU_FORMAT", "PAX_FORMAT",
-           "DEFAULT_FORMAT", "open","fully_trusted_filter", "data_filter",
-           "tar_filter", "FilterError", "AbsoluteLinkError",
-           "OutsideDestinationError", "SpecialFileError", "AbsolutePathError",
-           "LinkOutsideDestinationError"]
-
-
-#---------------------------------------------------------
-# tar constants
-#---------------------------------------------------------
-NUL = b"\0"                     # the null character
-BLOCKSIZE = 512                 # length of processing blocks
-RECORDSIZE = BLOCKSIZE * 20     # length of records
-GNU_MAGIC = b"ustar  \0"        # magic gnu tar string
-POSIX_MAGIC = b"ustar\x0000"    # magic posix tar string
-
-LENGTH_NAME = 100               # maximum length of a filename
-LENGTH_LINK = 100               # maximum length of a linkname
-LENGTH_PREFIX = 155             # maximum length of the prefix field
-
-REGTYPE = b"0"                  # regular file
-AREGTYPE = b"\0"                # regular file
-LNKTYPE = b"1"                  # link (inside tarfile)
-SYMTYPE = b"2"                  # symbolic link
-CHRTYPE = b"3"                  # character special device
-BLKTYPE = b"4"                  # block special device
-DIRTYPE = b"5"                  # directory
-FIFOTYPE = b"6"                 # fifo special device
-CONTTYPE = b"7"                 # contiguous file
-
-GNUTYPE_LONGNAME = b"L"         # GNU tar longname
-GNUTYPE_LONGLINK = b"K"         # GNU tar longlink
-GNUTYPE_SPARSE = b"S"           # GNU tar sparse file
-
-XHDTYPE = b"x"                  # POSIX.1-2001 extended header
-XGLTYPE = b"g"                  # POSIX.1-2001 global header
-SOLARIS_XHDTYPE = b"X"          # Solaris extended header
-
-USTAR_FORMAT = 0                # POSIX.1-1988 (ustar) format
-GNU_FORMAT = 1                  # GNU tar format
-PAX_FORMAT = 2                  # POSIX.1-2001 (pax) format
-DEFAULT_FORMAT = PAX_FORMAT
-
-#---------------------------------------------------------
-# tarfile constants
-#---------------------------------------------------------
-# File types that tarfile supports:
-SUPPORTED_TYPES = (REGTYPE, AREGTYPE, LNKTYPE,
-                   SYMTYPE, DIRTYPE, FIFOTYPE,
-                   CONTTYPE, CHRTYPE, BLKTYPE,
-                   GNUTYPE_LONGNAME, GNUTYPE_LONGLINK,
-                   GNUTYPE_SPARSE)
-
-# File types that will be treated as a regular file.
-REGULAR_TYPES = (REGTYPE, AREGTYPE,
-                 CONTTYPE, GNUTYPE_SPARSE)
-
-# File types that are part of the GNU tar format.
-GNU_TYPES = (GNUTYPE_LONGNAME, GNUTYPE_LONGLINK,
-             GNUTYPE_SPARSE)
-
-# Fields from a pax header that override a TarInfo attribute.
-PAX_FIELDS = ("path", "linkpath", "size", "mtime",
-              "uid", "gid", "uname", "gname")
-
-# Fields from a pax header that are affected by hdrcharset.
-PAX_NAME_FIELDS = {"path", "linkpath", "uname", "gname"}
-
-# Fields in a pax header that are numbers, all other fields
-# are treated as strings.
-PAX_NUMBER_FIELDS = {
-    "atime": float,
-    "ctime": float,
-    "mtime": float,
-    "uid": int,
-    "gid": int,
-    "size": int
-}
-
-#---------------------------------------------------------
-# initialization
-#---------------------------------------------------------
-if os.name == "nt":
-    ENCODING = "utf-8"
-else:
-    ENCODING = sys.getfilesystemencoding()
-
-#---------------------------------------------------------
-# Some useful functions
-#---------------------------------------------------------
-
-def stn(s, length, encoding, errors):
-    """Convert a string to a null-terminated bytes object.
-    """
-    if s is None:
-        raise ValueError("metadata cannot contain None")
-    s = s.encode(encoding, errors)
-    return s[:length] + (length - len(s)) * NUL
-
-def nts(s, encoding, errors):
-    """Convert a null-terminated bytes object to a string.
-    """
-    p = s.find(b"\0")
-    if p != -1:
-        s = s[:p]
-    return s.decode(encoding, errors)
-
-def nti(s):
-    """Convert a number field to a python number.
-    """
-    # There are two possible encodings for a number field, see
-    # itn() below.
-    if s[0] in (0o200, 0o377):
-        n = 0
-        for i in range(len(s) - 1):
-            n <<= 8
-            n += s[i + 1]
-        if s[0] == 0o377:
-            n = -(256 ** (len(s) - 1) - n)
-    else:
-        try:
-            s = nts(s, "ascii", "strict")
-            n = int(s.strip() or "0", 8)
-        except ValueError:
-            raise InvalidHeaderError("invalid header")
-    return n
-
-def itn(n, digits=8, format=DEFAULT_FORMAT):
-    """Convert a python number to a number field.
-    """
-    # POSIX 1003.1-1988 requires numbers to be encoded as a string of
-    # octal digits followed by a null-byte, this allows values up to
-    # (8**(digits-1))-1. GNU tar allows storing numbers greater than
-    # that if necessary. A leading 0o200 or 0o377 byte indicate this
-    # particular encoding, the following digits-1 bytes are a big-endian
-    # base-256 representation. This allows values up to (256**(digits-1))-1.
-    # A 0o200 byte indicates a positive number, a 0o377 byte a negative
-    # number.
-    original_n = n
-    n = int(n)
-    if 0 <= n < 8 ** (digits - 1):
-        s = bytes("%0*o" % (digits - 1, n), "ascii") + NUL
-    elif format == GNU_FORMAT and -256 ** (digits - 1) <= n < 256 ** (digits - 1):
-        if n >= 0:
-            s = bytearray([0o200])
-        else:
-            s = bytearray([0o377])
-            n = 256 ** digits + n
-
-        for i in range(digits - 1):
-            s.insert(1, n & 0o377)
-            n >>= 8
-    else:
-        raise ValueError("overflow in number field")
-
-    return s
-
-def calc_chksums(buf):
-    """Calculate the checksum for a member's header by summing up all
-       characters except for the chksum field which is treated as if
-       it was filled with spaces. According to the GNU tar sources,
-       some tars (Sun and NeXT) calculate chksum with signed char,
-       which will be different if there are chars in the buffer with
-       the high bit set. So we calculate two checksums, unsigned and
-       signed.
-    """
-    unsigned_chksum = 256 + sum(struct.unpack_from("148B8x356B", buf))
-    signed_chksum = 256 + sum(struct.unpack_from("148b8x356b", buf))
-    return unsigned_chksum, signed_chksum
-
-def copyfileobj(src, dst, length=None, exception=OSError, bufsize=None):
-    """Copy length bytes from fileobj src to fileobj dst.
-       If length is None, copy the entire content.
-    """
-    bufsize = bufsize or 16 * 1024
-    if length == 0:
-        return
-    if length is None:
-        shutil.copyfileobj(src, dst, bufsize)
-        return
-
-    blocks, remainder = divmod(length, bufsize)
-    for b in range(blocks):
-        buf = src.read(bufsize)
-        if len(buf) < bufsize:
-            raise exception("unexpected end of data")
-        dst.write(buf)
-
-    if remainder != 0:
-        buf = src.read(remainder)
-        if len(buf) < remainder:
-            raise exception("unexpected end of data")
-        dst.write(buf)
-    return
-
-def _safe_print(s):
-    encoding = getattr(sys.stdout, 'encoding', None)
-    if encoding is not None:
-        s = s.encode(encoding, 'backslashreplace').decode(encoding)
-    print(s, end=' ')
-
-
-class TarError(Exception):
-    """Base exception."""
-    pass
-class ExtractError(TarError):
-    """General exception for extract errors."""
-    pass
-class ReadError(TarError):
-    """Exception for unreadable tar archives."""
-    pass
-class CompressionError(TarError):
-    """Exception for unavailable compression methods."""
-    pass
-class StreamError(TarError):
-    """Exception for unsupported operations on stream-like TarFiles."""
-    pass
-class HeaderError(TarError):
-    """Base exception for header errors."""
-    pass
-class EmptyHeaderError(HeaderError):
-    """Exception for empty headers."""
-    pass
-class TruncatedHeaderError(HeaderError):
-    """Exception for truncated headers."""
-    pass
-class EOFHeaderError(HeaderError):
-    """Exception for end of file headers."""
-    pass
-class InvalidHeaderError(HeaderError):
-    """Exception for invalid headers."""
-    pass
-class SubsequentHeaderError(HeaderError):
-    """Exception for missing and invalid extended headers."""
-    pass
-
-#---------------------------
-# internal stream interface
-#---------------------------
-class _LowLevelFile:
-    """Low-level file object. Supports reading and writing.
-       It is used instead of a regular file object for streaming
-       access.
-    """
-
-    def __init__(self, name, mode):
-        mode = {
-            "r": os.O_RDONLY,
-            "w": os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
-        }[mode]
-        if hasattr(os, "O_BINARY"):
-            mode |= os.O_BINARY
-        self.fd = os.open(name, mode, 0o666)
-
-    def close(self):
-        os.close(self.fd)
-
-    def read(self, size):
-        return os.read(self.fd, size)
-
-    def write(self, s):
-        os.write(self.fd, s)
-
-class _Stream:
-    """Class that serves as an adapter between TarFile and
-       a stream-like object.  The stream-like object only
-       needs to have a read() or write() method that works with bytes,
-       and the method is accessed blockwise.
-       Use of gzip or bzip2 compression is possible.
-       A stream-like object could be for example: sys.stdin.buffer,
-       sys.stdout.buffer, a socket, a tape device etc.
-
-       _Stream is intended to be used only internally.
-    """
-
-    def __init__(self, name, mode, comptype, fileobj, bufsize,
-                 compresslevel):
-        """Construct a _Stream object.
-        """
-        self._extfileobj = True
-        if fileobj is None:
-            fileobj = _LowLevelFile(name, mode)
-            self._extfileobj = False
-
-        if comptype == '*':
-            # Enable transparent compression detection for the
-            # stream interface
-            fileobj = _StreamProxy(fileobj)
-            comptype = fileobj.getcomptype()
-
-        self.name     = name or ""
-        self.mode     = mode
-        self.comptype = comptype
-        self.fileobj  = fileobj
-        self.bufsize  = bufsize
-        self.buf      = b""
-        self.pos      = 0
-        self.closed   = False
-
-        try:
-            if comptype == "gz":
-                try:
-                    import zlib
-                except ImportError:
-                    raise CompressionError("zlib module is not available") from None
-                self.zlib = zlib
-                self.crc = zlib.crc32(b"")
-                if mode == "r":
-                    self.exception = zlib.error
-                    self._init_read_gz()
-                else:
-                    self._init_write_gz(compresslevel)
-
-            elif comptype == "bz2":
-                try:
-                    import bz2
-                except ImportError:
-                    raise CompressionError("bz2 module is not available") from None
-                if mode == "r":
-                    self.dbuf = b""
-                    self.cmp = bz2.BZ2Decompressor()
-                    self.exception = OSError
-                else:
-                    self.cmp = bz2.BZ2Compressor(compresslevel)
-
-            elif comptype == "xz":
-                try:
-                    import lzma
-                except ImportError:
-                    raise CompressionError("lzma module is not available") from None
-                if mode == "r":
-                    self.dbuf = b""
-                    self.cmp = lzma.LZMADecompressor()
-                    self.exception = lzma.LZMAError
-                else:
-                    self.cmp = lzma.LZMACompressor()
-
-            elif comptype != "tar":
-                raise CompressionError("unknown compression type %r" % comptype)
-
-        except:
-            if not self._extfileobj:
-                self.fileobj.close()
-            self.closed = True
-            raise
-
-    def __del__(self):
-        if hasattr(self, "closed") and not self.closed:
-            self.close()
-
-    def _init_write_gz(self, compresslevel):
-        """Initialize for writing with gzip compression.
-        """
-        self.cmp = self.zlib.compressobj(compresslevel,
-                                         self.zlib.DEFLATED,
-                                         -self.zlib.MAX_WBITS,
-                                         self.zlib.DEF_MEM_LEVEL,
-                                         0)
-        timestamp = struct.pack(" self.bufsize:
-            self.fileobj.write(self.buf[:self.bufsize])
-            self.buf = self.buf[self.bufsize:]
-
-    def close(self):
-        """Close the _Stream object. No operation should be
-           done on it afterwards.
-        """
-        if self.closed:
-            return
-
-        self.closed = True
-        try:
-            if self.mode == "w" and self.comptype != "tar":
-                self.buf += self.cmp.flush()
-
-            if self.mode == "w" and self.buf:
-                self.fileobj.write(self.buf)
-                self.buf = b""
-                if self.comptype == "gz":
-                    self.fileobj.write(struct.pack("= 0:
-            blocks, remainder = divmod(pos - self.pos, self.bufsize)
-            for i in range(blocks):
-                self.read(self.bufsize)
-            self.read(remainder)
-        else:
-            raise StreamError("seeking backwards is not allowed")
-        return self.pos
-
-    def read(self, size):
-        """Return the next size number of bytes from the stream."""
-        assert size is not None
-        buf = self._read(size)
-        self.pos += len(buf)
-        return buf
-
-    def _read(self, size):
-        """Return size bytes from the stream.
-        """
-        if self.comptype == "tar":
-            return self.__read(size)
-
-        c = len(self.dbuf)
-        t = [self.dbuf]
-        while c < size:
-            # Skip underlying buffer to avoid unaligned double buffering.
-            if self.buf:
-                buf = self.buf
-                self.buf = b""
-            else:
-                buf = self.fileobj.read(self.bufsize)
-                if not buf:
-                    break
-            try:
-                buf = self.cmp.decompress(buf)
-            except self.exception as e:
-                raise ReadError("invalid compressed data") from e
-            t.append(buf)
-            c += len(buf)
-        t = b"".join(t)
-        self.dbuf = t[size:]
-        return t[:size]
-
-    def __read(self, size):
-        """Return size bytes from stream. If internal buffer is empty,
-           read another block from the stream.
-        """
-        c = len(self.buf)
-        t = [self.buf]
-        while c < size:
-            buf = self.fileobj.read(self.bufsize)
-            if not buf:
-                break
-            t.append(buf)
-            c += len(buf)
-        t = b"".join(t)
-        self.buf = t[size:]
-        return t[:size]
-# class _Stream
-
-class _StreamProxy(object):
-    """Small proxy class that enables transparent compression
-       detection for the Stream interface (mode 'r|*').
-    """
-
-    def __init__(self, fileobj):
-        self.fileobj = fileobj
-        self.buf = self.fileobj.read(BLOCKSIZE)
-
-    def read(self, size):
-        self.read = self.fileobj.read
-        return self.buf
-
-    def getcomptype(self):
-        if self.buf.startswith(b"\x1f\x8b\x08"):
-            return "gz"
-        elif self.buf[0:3] == b"BZh" and self.buf[4:10] == b"1AY&SY":
-            return "bz2"
-        elif self.buf.startswith((b"\x5d\x00\x00\x80", b"\xfd7zXZ")):
-            return "xz"
-        else:
-            return "tar"
-
-    def close(self):
-        self.fileobj.close()
-# class StreamProxy
-
-#------------------------
-# Extraction file object
-#------------------------
-class _FileInFile(object):
-    """A thin wrapper around an existing file object that
-       provides a part of its data as an individual file
-       object.
-    """
-
-    def __init__(self, fileobj, offset, size, name, blockinfo=None):
-        self.fileobj = fileobj
-        self.offset = offset
-        self.size = size
-        self.position = 0
-        self.name = name
-        self.closed = False
-
-        if blockinfo is None:
-            blockinfo = [(0, size)]
-
-        # Construct a map with data and zero blocks.
-        self.map_index = 0
-        self.map = []
-        lastpos = 0
-        realpos = self.offset
-        for offset, size in blockinfo:
-            if offset > lastpos:
-                self.map.append((False, lastpos, offset, None))
-            self.map.append((True, offset, offset + size, realpos))
-            realpos += size
-            lastpos = offset + size
-        if lastpos < self.size:
-            self.map.append((False, lastpos, self.size, None))
-
-    def flush(self):
-        pass
-
-    @property
-    def mode(self):
-        return 'rb'
-
-    def readable(self):
-        return True
-
-    def writable(self):
-        return False
-
-    def seekable(self):
-        return self.fileobj.seekable()
-
-    def tell(self):
-        """Return the current file position.
-        """
-        return self.position
-
-    def seek(self, position, whence=io.SEEK_SET):
-        """Seek to a position in the file.
-        """
-        if whence == io.SEEK_SET:
-            self.position = min(max(position, 0), self.size)
-        elif whence == io.SEEK_CUR:
-            if position < 0:
-                self.position = max(self.position + position, 0)
-            else:
-                self.position = min(self.position + position, self.size)
-        elif whence == io.SEEK_END:
-            self.position = max(min(self.size + position, self.size), 0)
-        else:
-            raise ValueError("Invalid argument")
-        return self.position
-
-    def read(self, size=None):
-        """Read data from the file.
-        """
-        if size is None:
-            size = self.size - self.position
-        else:
-            size = min(size, self.size - self.position)
-
-        buf = b""
-        while size > 0:
-            while True:
-                data, start, stop, offset = self.map[self.map_index]
-                if start <= self.position < stop:
-                    break
-                else:
-                    self.map_index += 1
-                    if self.map_index == len(self.map):
-                        self.map_index = 0
-            length = min(size, stop - self.position)
-            if data:
-                self.fileobj.seek(offset + (self.position - start))
-                b = self.fileobj.read(length)
-                if len(b) != length:
-                    raise ReadError("unexpected end of data")
-                buf += b
-            else:
-                buf += NUL * length
-            size -= length
-            self.position += length
-        return buf
-
-    def readinto(self, b):
-        buf = self.read(len(b))
-        b[:len(buf)] = buf
-        return len(buf)
-
-    def close(self):
-        self.closed = True
-#class _FileInFile
-
-class ExFileObject(io.BufferedReader):
-
-    def __init__(self, tarfile, tarinfo):
-        fileobj = _FileInFile(tarfile.fileobj, tarinfo.offset_data,
-                tarinfo.size, tarinfo.name, tarinfo.sparse)
-        super().__init__(fileobj)
-#class ExFileObject
-
-
-#-----------------------------
-# extraction filters (PEP 706)
-#-----------------------------
-
-class FilterError(TarError):
-    pass
-
-class AbsolutePathError(FilterError):
-    def __init__(self, tarinfo):
-        self.tarinfo = tarinfo
-        super().__init__(f'member {tarinfo.name!r} has an absolute path')
-
-class OutsideDestinationError(FilterError):
-    def __init__(self, tarinfo, path):
-        self.tarinfo = tarinfo
-        self._path = path
-        super().__init__(f'{tarinfo.name!r} would be extracted to {path!r}, '
-                         + 'which is outside the destination')
-
-class SpecialFileError(FilterError):
-    def __init__(self, tarinfo):
-        self.tarinfo = tarinfo
-        super().__init__(f'{tarinfo.name!r} is a special file')
-
-class AbsoluteLinkError(FilterError):
-    def __init__(self, tarinfo):
-        self.tarinfo = tarinfo
-        super().__init__(f'{tarinfo.name!r} is a link to an absolute path')
-
-class LinkOutsideDestinationError(FilterError):
-    def __init__(self, tarinfo, path):
-        self.tarinfo = tarinfo
-        self._path = path
-        super().__init__(f'{tarinfo.name!r} would link to {path!r}, '
-                         + 'which is outside the destination')
-
-def _get_filtered_attrs(member, dest_path, for_data=True):
-    new_attrs = {}
-    name = member.name
-    dest_path = os.path.realpath(dest_path)
-    # Strip leading / (tar's directory separator) from filenames.
-    # Include os.sep (target OS directory separator) as well.
-    if name.startswith(('/', os.sep)):
-        name = new_attrs['name'] = member.path.lstrip('/' + os.sep)
-    if os.path.isabs(name):
-        # Path is absolute even after stripping.
-        # For example, 'C:/foo' on Windows.
-        raise AbsolutePathError(member)
-    # Ensure we stay in the destination
-    target_path = os.path.realpath(os.path.join(dest_path, name))
-    if os.path.commonpath([target_path, dest_path]) != dest_path:
-        raise OutsideDestinationError(member, target_path)
-    # Limit permissions (no high bits, and go-w)
-    mode = member.mode
-    if mode is not None:
-        # Strip high bits & group/other write bits
-        mode = mode & 0o755
-        if for_data:
-            # For data, handle permissions & file types
-            if member.isreg() or member.islnk():
-                if not mode & 0o100:
-                    # Clear executable bits if not executable by user
-                    mode &= ~0o111
-                # Ensure owner can read & write
-                mode |= 0o600
-            elif member.isdir() or member.issym():
-                # Ignore mode for directories & symlinks
-                mode = None
-            else:
-                # Reject special files
-                raise SpecialFileError(member)
-        if mode != member.mode:
-            new_attrs['mode'] = mode
-    if for_data:
-        # Ignore ownership for 'data'
-        if member.uid is not None:
-            new_attrs['uid'] = None
-        if member.gid is not None:
-            new_attrs['gid'] = None
-        if member.uname is not None:
-            new_attrs['uname'] = None
-        if member.gname is not None:
-            new_attrs['gname'] = None
-        # Check link destination for 'data'
-        if member.islnk() or member.issym():
-            if os.path.isabs(member.linkname):
-                raise AbsoluteLinkError(member)
-            if member.issym():
-                target_path = os.path.join(dest_path,
-                                           os.path.dirname(name),
-                                           member.linkname)
-            else:
-                target_path = os.path.join(dest_path,
-                                           member.linkname)
-            target_path = os.path.realpath(target_path)
-            if os.path.commonpath([target_path, dest_path]) != dest_path:
-                raise LinkOutsideDestinationError(member, target_path)
-    return new_attrs
-
-def fully_trusted_filter(member, dest_path):
-    return member
-
-def tar_filter(member, dest_path):
-    new_attrs = _get_filtered_attrs(member, dest_path, False)
-    if new_attrs:
-        return member.replace(**new_attrs, deep=False)
-    return member
-
-def data_filter(member, dest_path):
-    new_attrs = _get_filtered_attrs(member, dest_path, True)
-    if new_attrs:
-        return member.replace(**new_attrs, deep=False)
-    return member
-
-_NAMED_FILTERS = {
-    "fully_trusted": fully_trusted_filter,
-    "tar": tar_filter,
-    "data": data_filter,
-}
-
-#------------------
-# Exported Classes
-#------------------
-
-# Sentinel for replace() defaults, meaning "don't change the attribute"
-_KEEP = object()
-
-class TarInfo(object):
-    """Informational class which holds the details about an
-       archive member given by a tar header block.
-       TarInfo objects are returned by TarFile.getmember(),
-       TarFile.getmembers() and TarFile.gettarinfo() and are
-       usually created internally.
-    """
-
-    __slots__ = dict(
-        name = 'Name of the archive member.',
-        mode = 'Permission bits.',
-        uid = 'User ID of the user who originally stored this member.',
-        gid = 'Group ID of the user who originally stored this member.',
-        size = 'Size in bytes.',
-        mtime = 'Time of last modification.',
-        chksum = 'Header checksum.',
-        type = ('File type. type is usually one of these constants: '
-                'REGTYPE, AREGTYPE, LNKTYPE, SYMTYPE, DIRTYPE, FIFOTYPE, '
-                'CONTTYPE, CHRTYPE, BLKTYPE, GNUTYPE_SPARSE.'),
-        linkname = ('Name of the target file name, which is only present '
-                    'in TarInfo objects of type LNKTYPE and SYMTYPE.'),
-        uname = 'User name.',
-        gname = 'Group name.',
-        devmajor = 'Device major number.',
-        devminor = 'Device minor number.',
-        offset = 'The tar header starts here.',
-        offset_data = "The file's data starts here.",
-        pax_headers = ('A dictionary containing key-value pairs of an '
-                       'associated pax extended header.'),
-        sparse = 'Sparse member information.',
-        _tarfile = None,
-        _sparse_structs = None,
-        _link_target = None,
-        )
-
-    def __init__(self, name=""):
-        """Construct a TarInfo object. name is the optional name
-           of the member.
-        """
-        self.name = name        # member name
-        self.mode = 0o644       # file permissions
-        self.uid = 0            # user id
-        self.gid = 0            # group id
-        self.size = 0           # file size
-        self.mtime = 0          # modification time
-        self.chksum = 0         # header checksum
-        self.type = REGTYPE     # member type
-        self.linkname = ""      # link name
-        self.uname = ""         # user name
-        self.gname = ""         # group name
-        self.devmajor = 0       # device major number
-        self.devminor = 0       # device minor number
-
-        self.offset = 0         # the tar header starts here
-        self.offset_data = 0    # the file's data starts here
-
-        self.sparse = None      # sparse member information
-        self.pax_headers = {}   # pax header information
-
-    @property
-    def tarfile(self):
-        import warnings
-        warnings.warn(
-            'The undocumented "tarfile" attribute of TarInfo objects '
-            + 'is deprecated and will be removed in Python 3.16',
-            DeprecationWarning, stacklevel=2)
-        return self._tarfile
-
-    @tarfile.setter
-    def tarfile(self, tarfile):
-        import warnings
-        warnings.warn(
-            'The undocumented "tarfile" attribute of TarInfo objects '
-            + 'is deprecated and will be removed in Python 3.16',
-            DeprecationWarning, stacklevel=2)
-        self._tarfile = tarfile
-
-    @property
-    def path(self):
-        'In pax headers, "name" is called "path".'
-        return self.name
-
-    @path.setter
-    def path(self, name):
-        self.name = name
-
-    @property
-    def linkpath(self):
-        'In pax headers, "linkname" is called "linkpath".'
-        return self.linkname
-
-    @linkpath.setter
-    def linkpath(self, linkname):
-        self.linkname = linkname
-
-    def __repr__(self):
-        return "<%s %r at %#x>" % (self.__class__.__name__,self.name,id(self))
-
-    def replace(self, *,
-                name=_KEEP, mtime=_KEEP, mode=_KEEP, linkname=_KEEP,
-                uid=_KEEP, gid=_KEEP, uname=_KEEP, gname=_KEEP,
-                deep=True, _KEEP=_KEEP):
-        """Return a deep copy of self with the given attributes replaced.
-        """
-        if deep:
-            result = copy.deepcopy(self)
-        else:
-            result = copy.copy(self)
-        if name is not _KEEP:
-            result.name = name
-        if mtime is not _KEEP:
-            result.mtime = mtime
-        if mode is not _KEEP:
-            result.mode = mode
-        if linkname is not _KEEP:
-            result.linkname = linkname
-        if uid is not _KEEP:
-            result.uid = uid
-        if gid is not _KEEP:
-            result.gid = gid
-        if uname is not _KEEP:
-            result.uname = uname
-        if gname is not _KEEP:
-            result.gname = gname
-        return result
-
-    def get_info(self):
-        """Return the TarInfo's attributes as a dictionary.
-        """
-        if self.mode is None:
-            mode = None
-        else:
-            mode = self.mode & 0o7777
-        info = {
-            "name":     self.name,
-            "mode":     mode,
-            "uid":      self.uid,
-            "gid":      self.gid,
-            "size":     self.size,
-            "mtime":    self.mtime,
-            "chksum":   self.chksum,
-            "type":     self.type,
-            "linkname": self.linkname,
-            "uname":    self.uname,
-            "gname":    self.gname,
-            "devmajor": self.devmajor,
-            "devminor": self.devminor
-        }
-
-        if info["type"] == DIRTYPE and not info["name"].endswith("/"):
-            info["name"] += "/"
-
-        return info
-
-    def tobuf(self, format=DEFAULT_FORMAT, encoding=ENCODING, errors="surrogateescape"):
-        """Return a tar header as a string of 512 byte blocks.
-        """
-        info = self.get_info()
-        for name, value in info.items():
-            if value is None:
-                raise ValueError("%s may not be None" % name)
-
-        if format == USTAR_FORMAT:
-            return self.create_ustar_header(info, encoding, errors)
-        elif format == GNU_FORMAT:
-            return self.create_gnu_header(info, encoding, errors)
-        elif format == PAX_FORMAT:
-            return self.create_pax_header(info, encoding)
-        else:
-            raise ValueError("invalid format")
-
-    def create_ustar_header(self, info, encoding, errors):
-        """Return the object as a ustar header block.
-        """
-        info["magic"] = POSIX_MAGIC
-
-        if len(info["linkname"].encode(encoding, errors)) > LENGTH_LINK:
-            raise ValueError("linkname is too long")
-
-        if len(info["name"].encode(encoding, errors)) > LENGTH_NAME:
-            info["prefix"], info["name"] = self._posix_split_name(info["name"], encoding, errors)
-
-        return self._create_header(info, USTAR_FORMAT, encoding, errors)
-
-    def create_gnu_header(self, info, encoding, errors):
-        """Return the object as a GNU header block sequence.
-        """
-        info["magic"] = GNU_MAGIC
-
-        buf = b""
-        if len(info["linkname"].encode(encoding, errors)) > LENGTH_LINK:
-            buf += self._create_gnu_long_header(info["linkname"], GNUTYPE_LONGLINK, encoding, errors)
-
-        if len(info["name"].encode(encoding, errors)) > LENGTH_NAME:
-            buf += self._create_gnu_long_header(info["name"], GNUTYPE_LONGNAME, encoding, errors)
-
-        return buf + self._create_header(info, GNU_FORMAT, encoding, errors)
-
-    def create_pax_header(self, info, encoding):
-        """Return the object as a ustar header block. If it cannot be
-           represented this way, prepend a pax extended header sequence
-           with supplement information.
-        """
-        info["magic"] = POSIX_MAGIC
-        pax_headers = self.pax_headers.copy()
-
-        # Test string fields for values that exceed the field length or cannot
-        # be represented in ASCII encoding.
-        for name, hname, length in (
-                ("name", "path", LENGTH_NAME), ("linkname", "linkpath", LENGTH_LINK),
-                ("uname", "uname", 32), ("gname", "gname", 32)):
-
-            if hname in pax_headers:
-                # The pax header has priority.
-                continue
-
-            # Try to encode the string as ASCII.
-            try:
-                info[name].encode("ascii", "strict")
-            except UnicodeEncodeError:
-                pax_headers[hname] = info[name]
-                continue
-
-            if len(info[name]) > length:
-                pax_headers[hname] = info[name]
-
-        # Test number fields for values that exceed the field limit or values
-        # that like to be stored as float.
-        for name, digits in (("uid", 8), ("gid", 8), ("size", 12), ("mtime", 12)):
-            needs_pax = False
-
-            val = info[name]
-            val_is_float = isinstance(val, float)
-            val_int = round(val) if val_is_float else val
-            if not 0 <= val_int < 8 ** (digits - 1):
-                # Avoid overflow.
-                info[name] = 0
-                needs_pax = True
-            elif val_is_float:
-                # Put rounded value in ustar header, and full
-                # precision value in pax header.
-                info[name] = val_int
-                needs_pax = True
-
-            # The existing pax header has priority.
-            if needs_pax and name not in pax_headers:
-                pax_headers[name] = str(val)
-
-        # Create a pax extended header if necessary.
-        if pax_headers:
-            buf = self._create_pax_generic_header(pax_headers, XHDTYPE, encoding)
-        else:
-            buf = b""
-
-        return buf + self._create_header(info, USTAR_FORMAT, "ascii", "replace")
-
-    @classmethod
-    def create_pax_global_header(cls, pax_headers):
-        """Return the object as a pax global header block sequence.
-        """
-        return cls._create_pax_generic_header(pax_headers, XGLTYPE, "utf-8")
-
-    def _posix_split_name(self, name, encoding, errors):
-        """Split a name longer than 100 chars into a prefix
-           and a name part.
-        """
-        components = name.split("/")
-        for i in range(1, len(components)):
-            prefix = "/".join(components[:i])
-            name = "/".join(components[i:])
-            if len(prefix.encode(encoding, errors)) <= LENGTH_PREFIX and \
-                    len(name.encode(encoding, errors)) <= LENGTH_NAME:
-                break
-        else:
-            raise ValueError("name is too long")
-
-        return prefix, name
-
-    @staticmethod
-    def _create_header(info, format, encoding, errors):
-        """Return a header block. info is a dictionary with file
-           information, format must be one of the *_FORMAT constants.
-        """
-        has_device_fields = info.get("type") in (CHRTYPE, BLKTYPE)
-        if has_device_fields:
-            devmajor = itn(info.get("devmajor", 0), 8, format)
-            devminor = itn(info.get("devminor", 0), 8, format)
-        else:
-            devmajor = stn("", 8, encoding, errors)
-            devminor = stn("", 8, encoding, errors)
-
-        # None values in metadata should cause ValueError.
-        # itn()/stn() do this for all fields except type.
-        filetype = info.get("type", REGTYPE)
-        if filetype is None:
-            raise ValueError("TarInfo.type must not be None")
-
-        parts = [
-            stn(info.get("name", ""), 100, encoding, errors),
-            itn(info.get("mode", 0) & 0o7777, 8, format),
-            itn(info.get("uid", 0), 8, format),
-            itn(info.get("gid", 0), 8, format),
-            itn(info.get("size", 0), 12, format),
-            itn(info.get("mtime", 0), 12, format),
-            b"        ", # checksum field
-            filetype,
-            stn(info.get("linkname", ""), 100, encoding, errors),
-            info.get("magic", POSIX_MAGIC),
-            stn(info.get("uname", ""), 32, encoding, errors),
-            stn(info.get("gname", ""), 32, encoding, errors),
-            devmajor,
-            devminor,
-            stn(info.get("prefix", ""), 155, encoding, errors)
-        ]
-
-        buf = struct.pack("%ds" % BLOCKSIZE, b"".join(parts))
-        chksum = calc_chksums(buf[-BLOCKSIZE:])[0]
-        buf = buf[:-364] + bytes("%06o\0" % chksum, "ascii") + buf[-357:]
-        return buf
-
-    @staticmethod
-    def _create_payload(payload):
-        """Return the string payload filled with zero bytes
-           up to the next 512 byte border.
-        """
-        blocks, remainder = divmod(len(payload), BLOCKSIZE)
-        if remainder > 0:
-            payload += (BLOCKSIZE - remainder) * NUL
-        return payload
-
-    @classmethod
-    def _create_gnu_long_header(cls, name, type, encoding, errors):
-        """Return a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
-           for name.
-        """
-        name = name.encode(encoding, errors) + NUL
-
-        info = {}
-        info["name"] = "././@LongLink"
-        info["type"] = type
-        info["size"] = len(name)
-        info["magic"] = GNU_MAGIC
-
-        # create extended header + name blocks.
-        return cls._create_header(info, USTAR_FORMAT, encoding, errors) + \
-                cls._create_payload(name)
-
-    @classmethod
-    def _create_pax_generic_header(cls, pax_headers, type, encoding):
-        """Return a POSIX.1-2008 extended or global header sequence
-           that contains a list of keyword, value pairs. The values
-           must be strings.
-        """
-        # Check if one of the fields contains surrogate characters and thereby
-        # forces hdrcharset=BINARY, see _proc_pax() for more information.
-        binary = False
-        for keyword, value in pax_headers.items():
-            try:
-                value.encode("utf-8", "strict")
-            except UnicodeEncodeError:
-                binary = True
-                break
-
-        records = b""
-        if binary:
-            # Put the hdrcharset field at the beginning of the header.
-            records += b"21 hdrcharset=BINARY\n"
-
-        for keyword, value in pax_headers.items():
-            keyword = keyword.encode("utf-8")
-            if binary:
-                # Try to restore the original byte representation of 'value'.
-                # Needless to say, that the encoding must match the string.
-                value = value.encode(encoding, "surrogateescape")
-            else:
-                value = value.encode("utf-8")
-
-            l = len(keyword) + len(value) + 3   # ' ' + '=' + '\n'
-            n = p = 0
-            while True:
-                n = l + len(str(p))
-                if n == p:
-                    break
-                p = n
-            records += bytes(str(p), "ascii") + b" " + keyword + b"=" + value + b"\n"
-
-        # We use a hardcoded "././@PaxHeader" name like star does
-        # instead of the one that POSIX recommends.
-        info = {}
-        info["name"] = "././@PaxHeader"
-        info["type"] = type
-        info["size"] = len(records)
-        info["magic"] = POSIX_MAGIC
-
-        # Create pax header + record blocks.
-        return cls._create_header(info, USTAR_FORMAT, "ascii", "replace") + \
-                cls._create_payload(records)
-
-    @classmethod
-    def frombuf(cls, buf, encoding, errors):
-        """Construct a TarInfo object from a 512 byte bytes object.
-        """
-        if len(buf) == 0:
-            raise EmptyHeaderError("empty header")
-        if len(buf) != BLOCKSIZE:
-            raise TruncatedHeaderError("truncated header")
-        if buf.count(NUL) == BLOCKSIZE:
-            raise EOFHeaderError("end of file header")
-
-        chksum = nti(buf[148:156])
-        if chksum not in calc_chksums(buf):
-            raise InvalidHeaderError("bad checksum")
-
-        obj = cls()
-        obj.name = nts(buf[0:100], encoding, errors)
-        obj.mode = nti(buf[100:108])
-        obj.uid = nti(buf[108:116])
-        obj.gid = nti(buf[116:124])
-        obj.size = nti(buf[124:136])
-        obj.mtime = nti(buf[136:148])
-        obj.chksum = chksum
-        obj.type = buf[156:157]
-        obj.linkname = nts(buf[157:257], encoding, errors)
-        obj.uname = nts(buf[265:297], encoding, errors)
-        obj.gname = nts(buf[297:329], encoding, errors)
-        obj.devmajor = nti(buf[329:337])
-        obj.devminor = nti(buf[337:345])
-        prefix = nts(buf[345:500], encoding, errors)
-
-        # Old V7 tar format represents a directory as a regular
-        # file with a trailing slash.
-        if obj.type == AREGTYPE and obj.name.endswith("/"):
-            obj.type = DIRTYPE
-
-        # The old GNU sparse format occupies some of the unused
-        # space in the buffer for up to 4 sparse structures.
-        # Save them for later processing in _proc_sparse().
-        if obj.type == GNUTYPE_SPARSE:
-            pos = 386
-            structs = []
-            for i in range(4):
-                try:
-                    offset = nti(buf[pos:pos + 12])
-                    numbytes = nti(buf[pos + 12:pos + 24])
-                except ValueError:
-                    break
-                structs.append((offset, numbytes))
-                pos += 24
-            isextended = bool(buf[482])
-            origsize = nti(buf[483:495])
-            obj._sparse_structs = (structs, isextended, origsize)
-
-        # Remove redundant slashes from directories.
-        if obj.isdir():
-            obj.name = obj.name.rstrip("/")
-
-        # Reconstruct a ustar longname.
-        if prefix and obj.type not in GNU_TYPES:
-            obj.name = prefix + "/" + obj.name
-        return obj
-
-    @classmethod
-    def fromtarfile(cls, tarfile):
-        """Return the next TarInfo object from TarFile object
-           tarfile.
-        """
-        buf = tarfile.fileobj.read(BLOCKSIZE)
-        obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors)
-        obj.offset = tarfile.fileobj.tell() - BLOCKSIZE
-        return obj._proc_member(tarfile)
-
-    #--------------------------------------------------------------------------
-    # The following are methods that are called depending on the type of a
-    # member. The entry point is _proc_member() which can be overridden in a
-    # subclass to add custom _proc_*() methods. A _proc_*() method MUST
-    # implement the following
-    # operations:
-    # 1. Set self.offset_data to the position where the data blocks begin,
-    #    if there is data that follows.
-    # 2. Set tarfile.offset to the position where the next member's header will
-    #    begin.
-    # 3. Return self or another valid TarInfo object.
-    def _proc_member(self, tarfile):
-        """Choose the right processing method depending on
-           the type and call it.
-        """
-        if self.type in (GNUTYPE_LONGNAME, GNUTYPE_LONGLINK):
-            return self._proc_gnulong(tarfile)
-        elif self.type == GNUTYPE_SPARSE:
-            return self._proc_sparse(tarfile)
-        elif self.type in (XHDTYPE, XGLTYPE, SOLARIS_XHDTYPE):
-            return self._proc_pax(tarfile)
-        else:
-            return self._proc_builtin(tarfile)
-
-    def _proc_builtin(self, tarfile):
-        """Process a builtin type or an unknown type which
-           will be treated as a regular file.
-        """
-        self.offset_data = tarfile.fileobj.tell()
-        offset = self.offset_data
-        if self.isreg() or self.type not in SUPPORTED_TYPES:
-            # Skip the following data blocks.
-            offset += self._block(self.size)
-        tarfile.offset = offset
-
-        # Patch the TarInfo object with saved global
-        # header information.
-        self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors)
-
-        # Remove redundant slashes from directories. This is to be consistent
-        # with frombuf().
-        if self.isdir():
-            self.name = self.name.rstrip("/")
-
-        return self
-
-    def _proc_gnulong(self, tarfile):
-        """Process the blocks that hold a GNU longname
-           or longlink member.
-        """
-        buf = tarfile.fileobj.read(self._block(self.size))
-
-        # Fetch the next header and process it.
-        try:
-            next = self.fromtarfile(tarfile)
-        except HeaderError as e:
-            raise SubsequentHeaderError(str(e)) from None
-
-        # Patch the TarInfo object from the next header with
-        # the longname information.
-        next.offset = self.offset
-        if self.type == GNUTYPE_LONGNAME:
-            next.name = nts(buf, tarfile.encoding, tarfile.errors)
-        elif self.type == GNUTYPE_LONGLINK:
-            next.linkname = nts(buf, tarfile.encoding, tarfile.errors)
-
-        # Remove redundant slashes from directories. This is to be consistent
-        # with frombuf().
-        if next.isdir():
-            next.name = removesuffix(next.name, "/")
-
-        return next
-
-    def _proc_sparse(self, tarfile):
-        """Process a GNU sparse header plus extra headers.
-        """
-        # We already collected some sparse structures in frombuf().
-        structs, isextended, origsize = self._sparse_structs
-        del self._sparse_structs
-
-        # Collect sparse structures from extended header blocks.
-        while isextended:
-            buf = tarfile.fileobj.read(BLOCKSIZE)
-            pos = 0
-            for i in range(21):
-                try:
-                    offset = nti(buf[pos:pos + 12])
-                    numbytes = nti(buf[pos + 12:pos + 24])
-                except ValueError:
-                    break
-                if offset and numbytes:
-                    structs.append((offset, numbytes))
-                pos += 24
-            isextended = bool(buf[504])
-        self.sparse = structs
-
-        self.offset_data = tarfile.fileobj.tell()
-        tarfile.offset = self.offset_data + self._block(self.size)
-        self.size = origsize
-        return self
-
-    def _proc_pax(self, tarfile):
-        """Process an extended or global header as described in
-           POSIX.1-2008.
-        """
-        # Read the header information.
-        buf = tarfile.fileobj.read(self._block(self.size))
-
-        # A pax header stores supplemental information for either
-        # the following file (extended) or all following files
-        # (global).
-        if self.type == XGLTYPE:
-            pax_headers = tarfile.pax_headers
-        else:
-            pax_headers = tarfile.pax_headers.copy()
-
-        # Check if the pax header contains a hdrcharset field. This tells us
-        # the encoding of the path, linkpath, uname and gname fields. Normally,
-        # these fields are UTF-8 encoded but since POSIX.1-2008 tar
-        # implementations are allowed to store them as raw binary strings if
-        # the translation to UTF-8 fails.
-        match = re.search(br"\d+ hdrcharset=([^\n]+)\n", buf)
-        if match is not None:
-            pax_headers["hdrcharset"] = match.group(1).decode("utf-8")
-
-        # For the time being, we don't care about anything other than "BINARY".
-        # The only other value that is currently allowed by the standard is
-        # "ISO-IR 10646 2000 UTF-8" in other words UTF-8.
-        hdrcharset = pax_headers.get("hdrcharset")
-        if hdrcharset == "BINARY":
-            encoding = tarfile.encoding
-        else:
-            encoding = "utf-8"
-
-        # Parse pax header information. A record looks like that:
-        # "%d %s=%s\n" % (length, keyword, value). length is the size
-        # of the complete record including the length field itself and
-        # the newline. keyword and value are both UTF-8 encoded strings.
-        regex = re.compile(br"(\d+) ([^=]+)=")
-        pos = 0
-        while match := regex.match(buf, pos):
-            length, keyword = match.groups()
-            length = int(length)
-            if length == 0:
-                raise InvalidHeaderError("invalid header")
-            value = buf[match.end(2) + 1:match.start(1) + length - 1]
-
-            # Normally, we could just use "utf-8" as the encoding and "strict"
-            # as the error handler, but we better not take the risk. For
-            # example, GNU tar <= 1.23 is known to store filenames it cannot
-            # translate to UTF-8 as raw strings (unfortunately without a
-            # hdrcharset=BINARY header).
-            # We first try the strict standard encoding, and if that fails we
-            # fall back on the user's encoding and error handler.
-            keyword = self._decode_pax_field(keyword, "utf-8", "utf-8",
-                    tarfile.errors)
-            if keyword in PAX_NAME_FIELDS:
-                value = self._decode_pax_field(value, encoding, tarfile.encoding,
-                        tarfile.errors)
-            else:
-                value = self._decode_pax_field(value, "utf-8", "utf-8",
-                        tarfile.errors)
-
-            pax_headers[keyword] = value
-            pos += length
-
-        # Fetch the next header.
-        try:
-            next = self.fromtarfile(tarfile)
-        except HeaderError as e:
-            raise SubsequentHeaderError(str(e)) from None
-
-        # Process GNU sparse information.
-        if "GNU.sparse.map" in pax_headers:
-            # GNU extended sparse format version 0.1.
-            self._proc_gnusparse_01(next, pax_headers)
-
-        elif "GNU.sparse.size" in pax_headers:
-            # GNU extended sparse format version 0.0.
-            self._proc_gnusparse_00(next, pax_headers, buf)
-
-        elif pax_headers.get("GNU.sparse.major") == "1" and pax_headers.get("GNU.sparse.minor") == "0":
-            # GNU extended sparse format version 1.0.
-            self._proc_gnusparse_10(next, pax_headers, tarfile)
-
-        if self.type in (XHDTYPE, SOLARIS_XHDTYPE):
-            # Patch the TarInfo object with the extended header info.
-            next._apply_pax_info(pax_headers, tarfile.encoding, tarfile.errors)
-            next.offset = self.offset
-
-            if "size" in pax_headers:
-                # If the extended header replaces the size field,
-                # we need to recalculate the offset where the next
-                # header starts.
-                offset = next.offset_data
-                if next.isreg() or next.type not in SUPPORTED_TYPES:
-                    offset += next._block(next.size)
-                tarfile.offset = offset
-
-        return next
-
-    def _proc_gnusparse_00(self, next, pax_headers, buf):
-        """Process a GNU tar extended sparse header, version 0.0.
-        """
-        offsets = []
-        for match in re.finditer(br"\d+ GNU.sparse.offset=(\d+)\n", buf):
-            offsets.append(int(match.group(1)))
-        numbytes = []
-        for match in re.finditer(br"\d+ GNU.sparse.numbytes=(\d+)\n", buf):
-            numbytes.append(int(match.group(1)))
-        next.sparse = list(zip(offsets, numbytes))
-
-    def _proc_gnusparse_01(self, next, pax_headers):
-        """Process a GNU tar extended sparse header, version 0.1.
-        """
-        sparse = [int(x) for x in pax_headers["GNU.sparse.map"].split(",")]
-        next.sparse = list(zip(sparse[::2], sparse[1::2]))
-
-    def _proc_gnusparse_10(self, next, pax_headers, tarfile):
-        """Process a GNU tar extended sparse header, version 1.0.
-        """
-        fields = None
-        sparse = []
-        buf = tarfile.fileobj.read(BLOCKSIZE)
-        fields, buf = buf.split(b"\n", 1)
-        fields = int(fields)
-        while len(sparse) < fields * 2:
-            if b"\n" not in buf:
-                buf += tarfile.fileobj.read(BLOCKSIZE)
-            number, buf = buf.split(b"\n", 1)
-            sparse.append(int(number))
-        next.offset_data = tarfile.fileobj.tell()
-        next.sparse = list(zip(sparse[::2], sparse[1::2]))
-
-    def _apply_pax_info(self, pax_headers, encoding, errors):
-        """Replace fields with supplemental information from a previous
-           pax extended or global header.
-        """
-        for keyword, value in pax_headers.items():
-            if keyword == "GNU.sparse.name":
-                setattr(self, "path", value)
-            elif keyword == "GNU.sparse.size":
-                setattr(self, "size", int(value))
-            elif keyword == "GNU.sparse.realsize":
-                setattr(self, "size", int(value))
-            elif keyword in PAX_FIELDS:
-                if keyword in PAX_NUMBER_FIELDS:
-                    try:
-                        value = PAX_NUMBER_FIELDS[keyword](value)
-                    except ValueError:
-                        value = 0
-                if keyword == "path":
-                    value = value.rstrip("/")
-                setattr(self, keyword, value)
-
-        self.pax_headers = pax_headers.copy()
-
-    def _decode_pax_field(self, value, encoding, fallback_encoding, fallback_errors):
-        """Decode a single field from a pax record.
-        """
-        try:
-            return value.decode(encoding, "strict")
-        except UnicodeDecodeError:
-            return value.decode(fallback_encoding, fallback_errors)
-
-    def _block(self, count):
-        """Round up a byte count by BLOCKSIZE and return it,
-           e.g. _block(834) => 1024.
-        """
-        blocks, remainder = divmod(count, BLOCKSIZE)
-        if remainder:
-            blocks += 1
-        return blocks * BLOCKSIZE
-
-    def isreg(self):
-        'Return True if the Tarinfo object is a regular file.'
-        return self.type in REGULAR_TYPES
-
-    def isfile(self):
-        'Return True if the Tarinfo object is a regular file.'
-        return self.isreg()
-
-    def isdir(self):
-        'Return True if it is a directory.'
-        return self.type == DIRTYPE
-
-    def issym(self):
-        'Return True if it is a symbolic link.'
-        return self.type == SYMTYPE
-
-    def islnk(self):
-        'Return True if it is a hard link.'
-        return self.type == LNKTYPE
-
-    def ischr(self):
-        'Return True if it is a character device.'
-        return self.type == CHRTYPE
-
-    def isblk(self):
-        'Return True if it is a block device.'
-        return self.type == BLKTYPE
-
-    def isfifo(self):
-        'Return True if it is a FIFO.'
-        return self.type == FIFOTYPE
-
-    def issparse(self):
-        return self.sparse is not None
-
-    def isdev(self):
-        'Return True if it is one of character device, block device or FIFO.'
-        return self.type in (CHRTYPE, BLKTYPE, FIFOTYPE)
-# class TarInfo
-
-class TarFile(object):
-    """The TarFile Class provides an interface to tar archives.
-    """
-
-    debug = 0                   # May be set from 0 (no msgs) to 3 (all msgs)
-
-    dereference = False         # If true, add content of linked file to the
-                                # tar file, else the link.
-
-    ignore_zeros = False        # If true, skips empty or invalid blocks and
-                                # continues processing.
-
-    errorlevel = 1              # If 0, fatal errors only appear in debug
-                                # messages (if debug >= 0). If > 0, errors
-                                # are passed to the caller as exceptions.
-
-    format = DEFAULT_FORMAT     # The format to use when creating an archive.
-
-    encoding = ENCODING         # Encoding for 8-bit character strings.
-
-    errors = None               # Error handler for unicode conversion.
-
-    tarinfo = TarInfo           # The default TarInfo class to use.
-
-    fileobject = ExFileObject   # The file-object for extractfile().
-
-    extraction_filter = None    # The default filter for extraction.
-
-    def __init__(self, name=None, mode="r", fileobj=None, format=None,
-            tarinfo=None, dereference=None, ignore_zeros=None, encoding=None,
-            errors="surrogateescape", pax_headers=None, debug=None,
-            errorlevel=None, copybufsize=None, stream=False):
-        """Open an (uncompressed) tar archive 'name'. 'mode' is either 'r' to
-           read from an existing archive, 'a' to append data to an existing
-           file or 'w' to create a new file overwriting an existing one. 'mode'
-           defaults to 'r'.
-           If 'fileobj' is given, it is used for reading or writing data. If it
-           can be determined, 'mode' is overridden by 'fileobj's mode.
-           'fileobj' is not closed, when TarFile is closed.
-        """
-        modes = {"r": "rb", "a": "r+b", "w": "wb", "x": "xb"}
-        if mode not in modes:
-            raise ValueError("mode must be 'r', 'a', 'w' or 'x'")
-        self.mode = mode
-        self._mode = modes[mode]
-
-        if not fileobj:
-            if self.mode == "a" and not os.path.exists(name):
-                # Create nonexistent files in append mode.
-                self.mode = "w"
-                self._mode = "wb"
-            fileobj = bltn_open(name, self._mode)
-            self._extfileobj = False
-        else:
-            if (name is None and hasattr(fileobj, "name") and
-                isinstance(fileobj.name, (str, bytes))):
-                name = fileobj.name
-            if hasattr(fileobj, "mode"):
-                self._mode = fileobj.mode
-            self._extfileobj = True
-        self.name = os.path.abspath(name) if name else None
-        self.fileobj = fileobj
-
-        self.stream = stream
-
-        # Init attributes.
-        if format is not None:
-            self.format = format
-        if tarinfo is not None:
-            self.tarinfo = tarinfo
-        if dereference is not None:
-            self.dereference = dereference
-        if ignore_zeros is not None:
-            self.ignore_zeros = ignore_zeros
-        if encoding is not None:
-            self.encoding = encoding
-        self.errors = errors
-
-        if pax_headers is not None and self.format == PAX_FORMAT:
-            self.pax_headers = pax_headers
-        else:
-            self.pax_headers = {}
-
-        if debug is not None:
-            self.debug = debug
-        if errorlevel is not None:
-            self.errorlevel = errorlevel
-
-        # Init datastructures.
-        self.copybufsize = copybufsize
-        self.closed = False
-        self.members = []       # list of members as TarInfo objects
-        self._loaded = False    # flag if all members have been read
-        self.offset = self.fileobj.tell()
-                                # current position in the archive file
-        self.inodes = {}        # dictionary caching the inodes of
-                                # archive members already added
-
-        try:
-            if self.mode == "r":
-                self.firstmember = None
-                self.firstmember = self.next()
-
-            if self.mode == "a":
-                # Move to the end of the archive,
-                # before the first empty block.
-                while True:
-                    self.fileobj.seek(self.offset)
-                    try:
-                        tarinfo = self.tarinfo.fromtarfile(self)
-                        self.members.append(tarinfo)
-                    except EOFHeaderError:
-                        self.fileobj.seek(self.offset)
-                        break
-                    except HeaderError as e:
-                        raise ReadError(str(e)) from None
-
-            if self.mode in ("a", "w", "x"):
-                self._loaded = True
-
-                if self.pax_headers:
-                    buf = self.tarinfo.create_pax_global_header(self.pax_headers.copy())
-                    self.fileobj.write(buf)
-                    self.offset += len(buf)
-        except:
-            if not self._extfileobj:
-                self.fileobj.close()
-            self.closed = True
-            raise
-
-    #--------------------------------------------------------------------------
-    # Below are the classmethods which act as alternate constructors to the
-    # TarFile class. The open() method is the only one that is needed for
-    # public use; it is the "super"-constructor and is able to select an
-    # adequate "sub"-constructor for a particular compression using the mapping
-    # from OPEN_METH.
-    #
-    # This concept allows one to subclass TarFile without losing the comfort of
-    # the super-constructor. A sub-constructor is registered and made available
-    # by adding it to the mapping in OPEN_METH.
-
-    @classmethod
-    def open(cls, name=None, mode="r", fileobj=None, bufsize=RECORDSIZE, **kwargs):
-        r"""Open a tar archive for reading, writing or appending. Return
-           an appropriate TarFile class.
-
-           mode:
-           'r' or 'r:\*' open for reading with transparent compression
-           'r:'         open for reading exclusively uncompressed
-           'r:gz'       open for reading with gzip compression
-           'r:bz2'      open for reading with bzip2 compression
-           'r:xz'       open for reading with lzma compression
-           'a' or 'a:'  open for appending, creating the file if necessary
-           'w' or 'w:'  open for writing without compression
-           'w:gz'       open for writing with gzip compression
-           'w:bz2'      open for writing with bzip2 compression
-           'w:xz'       open for writing with lzma compression
-
-           'x' or 'x:'  create a tarfile exclusively without compression, raise
-                        an exception if the file is already created
-           'x:gz'       create a gzip compressed tarfile, raise an exception
-                        if the file is already created
-           'x:bz2'      create a bzip2 compressed tarfile, raise an exception
-                        if the file is already created
-           'x:xz'       create an lzma compressed tarfile, raise an exception
-                        if the file is already created
-
-           'r|\*'        open a stream of tar blocks with transparent compression
-           'r|'         open an uncompressed stream of tar blocks for reading
-           'r|gz'       open a gzip compressed stream of tar blocks
-           'r|bz2'      open a bzip2 compressed stream of tar blocks
-           'r|xz'       open an lzma compressed stream of tar blocks
-           'w|'         open an uncompressed stream for writing
-           'w|gz'       open a gzip compressed stream for writing
-           'w|bz2'      open a bzip2 compressed stream for writing
-           'w|xz'       open an lzma compressed stream for writing
-        """
-
-        if not name and not fileobj:
-            raise ValueError("nothing to open")
-
-        if mode in ("r", "r:*"):
-            # Find out which *open() is appropriate for opening the file.
-            def not_compressed(comptype):
-                return cls.OPEN_METH[comptype] == 'taropen'
-            error_msgs = []
-            for comptype in sorted(cls.OPEN_METH, key=not_compressed):
-                func = getattr(cls, cls.OPEN_METH[comptype])
-                if fileobj is not None:
-                    saved_pos = fileobj.tell()
-                try:
-                    return func(name, "r", fileobj, **kwargs)
-                except (ReadError, CompressionError) as e:
-                    error_msgs.append(f'- method {comptype}: {e!r}')
-                    if fileobj is not None:
-                        fileobj.seek(saved_pos)
-                    continue
-            error_msgs_summary = '\n'.join(error_msgs)
-            raise ReadError(f"file could not be opened successfully:\n{error_msgs_summary}")
-
-        elif ":" in mode:
-            filemode, comptype = mode.split(":", 1)
-            filemode = filemode or "r"
-            comptype = comptype or "tar"
-
-            # Select the *open() function according to
-            # given compression.
-            if comptype in cls.OPEN_METH:
-                func = getattr(cls, cls.OPEN_METH[comptype])
-            else:
-                raise CompressionError("unknown compression type %r" % comptype)
-            return func(name, filemode, fileobj, **kwargs)
-
-        elif "|" in mode:
-            filemode, comptype = mode.split("|", 1)
-            filemode = filemode or "r"
-            comptype = comptype or "tar"
-
-            if filemode not in ("r", "w"):
-                raise ValueError("mode must be 'r' or 'w'")
-
-            compresslevel = kwargs.pop("compresslevel", 9)
-            stream = _Stream(name, filemode, comptype, fileobj, bufsize,
-                             compresslevel)
-            try:
-                t = cls(name, filemode, stream, **kwargs)
-            except:
-                stream.close()
-                raise
-            t._extfileobj = False
-            return t
-
-        elif mode in ("a", "w", "x"):
-            return cls.taropen(name, mode, fileobj, **kwargs)
-
-        raise ValueError("undiscernible mode")
-
-    @classmethod
-    def taropen(cls, name, mode="r", fileobj=None, **kwargs):
-        """Open uncompressed tar archive name for reading or writing.
-        """
-        if mode not in ("r", "a", "w", "x"):
-            raise ValueError("mode must be 'r', 'a', 'w' or 'x'")
-        return cls(name, mode, fileobj, **kwargs)
-
-    @classmethod
-    def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
-        """Open gzip compressed tar archive name for reading or writing.
-           Appending is not allowed.
-        """
-        if mode not in ("r", "w", "x"):
-            raise ValueError("mode must be 'r', 'w' or 'x'")
-
-        try:
-            from gzip import GzipFile
-        except ImportError:
-            raise CompressionError("gzip module is not available") from None
-
-        try:
-            fileobj = GzipFile(name, mode + "b", compresslevel, fileobj)
-        except OSError as e:
-            if fileobj is not None and mode == 'r':
-                raise ReadError("not a gzip file") from e
-            raise
-
-        try:
-            t = cls.taropen(name, mode, fileobj, **kwargs)
-        except OSError as e:
-            fileobj.close()
-            if mode == 'r':
-                raise ReadError("not a gzip file") from e
-            raise
-        except:
-            fileobj.close()
-            raise
-        t._extfileobj = False
-        return t
-
-    @classmethod
-    def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
-        """Open bzip2 compressed tar archive name for reading or writing.
-           Appending is not allowed.
-        """
-        if mode not in ("r", "w", "x"):
-            raise ValueError("mode must be 'r', 'w' or 'x'")
-
-        try:
-            from bz2 import BZ2File
-        except ImportError:
-            raise CompressionError("bz2 module is not available") from None
-
-        fileobj = BZ2File(fileobj or name, mode, compresslevel=compresslevel)
-
-        try:
-            t = cls.taropen(name, mode, fileobj, **kwargs)
-        except (OSError, EOFError) as e:
-            fileobj.close()
-            if mode == 'r':
-                raise ReadError("not a bzip2 file") from e
-            raise
-        except:
-            fileobj.close()
-            raise
-        t._extfileobj = False
-        return t
-
-    @classmethod
-    def xzopen(cls, name, mode="r", fileobj=None, preset=None, **kwargs):
-        """Open lzma compressed tar archive name for reading or writing.
-           Appending is not allowed.
-        """
-        if mode not in ("r", "w", "x"):
-            raise ValueError("mode must be 'r', 'w' or 'x'")
-
-        try:
-            from lzma import LZMAFile, LZMAError
-        except ImportError:
-            raise CompressionError("lzma module is not available") from None
-
-        fileobj = LZMAFile(fileobj or name, mode, preset=preset)
-
-        try:
-            t = cls.taropen(name, mode, fileobj, **kwargs)
-        except (LZMAError, EOFError) as e:
-            fileobj.close()
-            if mode == 'r':
-                raise ReadError("not an lzma file") from e
-            raise
-        except:
-            fileobj.close()
-            raise
-        t._extfileobj = False
-        return t
-
-    # All *open() methods are registered here.
-    OPEN_METH = {
-        "tar": "taropen",   # uncompressed tar
-        "gz":  "gzopen",    # gzip compressed tar
-        "bz2": "bz2open",   # bzip2 compressed tar
-        "xz":  "xzopen"     # lzma compressed tar
-    }
-
-    #--------------------------------------------------------------------------
-    # The public methods which TarFile provides:
-
-    def close(self):
-        """Close the TarFile. In write-mode, two finishing zero blocks are
-           appended to the archive.
-        """
-        if self.closed:
-            return
-
-        self.closed = True
-        try:
-            if self.mode in ("a", "w", "x"):
-                self.fileobj.write(NUL * (BLOCKSIZE * 2))
-                self.offset += (BLOCKSIZE * 2)
-                # fill up the end with zero-blocks
-                # (like option -b20 for tar does)
-                blocks, remainder = divmod(self.offset, RECORDSIZE)
-                if remainder > 0:
-                    self.fileobj.write(NUL * (RECORDSIZE - remainder))
-        finally:
-            if not self._extfileobj:
-                self.fileobj.close()
-
-    def getmember(self, name):
-        """Return a TarInfo object for member 'name'. If 'name' can not be
-           found in the archive, KeyError is raised. If a member occurs more
-           than once in the archive, its last occurrence is assumed to be the
-           most up-to-date version.
-        """
-        tarinfo = self._getmember(name.rstrip('/'))
-        if tarinfo is None:
-            raise KeyError("filename %r not found" % name)
-        return tarinfo
-
-    def getmembers(self):
-        """Return the members of the archive as a list of TarInfo objects. The
-           list has the same order as the members in the archive.
-        """
-        self._check()
-        if not self._loaded:    # if we want to obtain a list of
-            self._load()        # all members, we first have to
-                                # scan the whole archive.
-        return self.members
-
-    def getnames(self):
-        """Return the members of the archive as a list of their names. It has
-           the same order as the list returned by getmembers().
-        """
-        return [tarinfo.name for tarinfo in self.getmembers()]
-
-    def gettarinfo(self, name=None, arcname=None, fileobj=None):
-        """Create a TarInfo object from the result of os.stat or equivalent
-           on an existing file. The file is either named by 'name', or
-           specified as a file object 'fileobj' with a file descriptor. If
-           given, 'arcname' specifies an alternative name for the file in the
-           archive, otherwise, the name is taken from the 'name' attribute of
-           'fileobj', or the 'name' argument. The name should be a text
-           string.
-        """
-        self._check("awx")
-
-        # When fileobj is given, replace name by
-        # fileobj's real name.
-        if fileobj is not None:
-            name = fileobj.name
-
-        # Building the name of the member in the archive.
-        # Backward slashes are converted to forward slashes,
-        # Absolute paths are turned to relative paths.
-        if arcname is None:
-            arcname = name
-        drv, arcname = os.path.splitdrive(arcname)
-        arcname = arcname.replace(os.sep, "/")
-        arcname = arcname.lstrip("/")
-
-        # Now, fill the TarInfo object with
-        # information specific for the file.
-        tarinfo = self.tarinfo()
-        tarinfo._tarfile = self  # To be removed in 3.16.
-
-        # Use os.stat or os.lstat, depending on if symlinks shall be resolved.
-        if fileobj is None:
-            if not self.dereference:
-                statres = os.lstat(name)
-            else:
-                statres = os.stat(name)
-        else:
-            statres = os.fstat(fileobj.fileno())
-        linkname = ""
-
-        stmd = statres.st_mode
-        if stat.S_ISREG(stmd):
-            inode = (statres.st_ino, statres.st_dev)
-            if not self.dereference and statres.st_nlink > 1 and \
-                    inode in self.inodes and arcname != self.inodes[inode]:
-                # Is it a hardlink to an already
-                # archived file?
-                type = LNKTYPE
-                linkname = self.inodes[inode]
-            else:
-                # The inode is added only if its valid.
-                # For win32 it is always 0.
-                type = REGTYPE
-                if inode[0]:
-                    self.inodes[inode] = arcname
-        elif stat.S_ISDIR(stmd):
-            type = DIRTYPE
-        elif stat.S_ISFIFO(stmd):
-            type = FIFOTYPE
-        elif stat.S_ISLNK(stmd):
-            type = SYMTYPE
-            linkname = os.readlink(name)
-        elif stat.S_ISCHR(stmd):
-            type = CHRTYPE
-        elif stat.S_ISBLK(stmd):
-            type = BLKTYPE
-        else:
-            return None
-
-        # Fill the TarInfo object with all
-        # information we can get.
-        tarinfo.name = arcname
-        tarinfo.mode = stmd
-        tarinfo.uid = statres.st_uid
-        tarinfo.gid = statres.st_gid
-        if type == REGTYPE:
-            tarinfo.size = statres.st_size
-        else:
-            tarinfo.size = 0
-        tarinfo.mtime = statres.st_mtime
-        tarinfo.type = type
-        tarinfo.linkname = linkname
-        if pwd:
-            try:
-                tarinfo.uname = pwd.getpwuid(tarinfo.uid)[0]
-            except KeyError:
-                pass
-        if grp:
-            try:
-                tarinfo.gname = grp.getgrgid(tarinfo.gid)[0]
-            except KeyError:
-                pass
-
-        if type in (CHRTYPE, BLKTYPE):
-            if hasattr(os, "major") and hasattr(os, "minor"):
-                tarinfo.devmajor = os.major(statres.st_rdev)
-                tarinfo.devminor = os.minor(statres.st_rdev)
-        return tarinfo
-
-    def list(self, verbose=True, *, members=None):
-        """Print a table of contents to sys.stdout. If 'verbose' is False, only
-           the names of the members are printed. If it is True, an 'ls -l'-like
-           output is produced. 'members' is optional and must be a subset of the
-           list returned by getmembers().
-        """
-        # Convert tarinfo type to stat type.
-        type2mode = {REGTYPE: stat.S_IFREG, SYMTYPE: stat.S_IFLNK,
-                     FIFOTYPE: stat.S_IFIFO, CHRTYPE: stat.S_IFCHR,
-                     DIRTYPE: stat.S_IFDIR, BLKTYPE: stat.S_IFBLK}
-        self._check()
-
-        if members is None:
-            members = self
-        for tarinfo in members:
-            if verbose:
-                if tarinfo.mode is None:
-                    _safe_print("??????????")
-                else:
-                    modetype = type2mode.get(tarinfo.type, 0)
-                    _safe_print(stat.filemode(modetype | tarinfo.mode))
-                _safe_print("%s/%s" % (tarinfo.uname or tarinfo.uid,
-                                       tarinfo.gname or tarinfo.gid))
-                if tarinfo.ischr() or tarinfo.isblk():
-                    _safe_print("%10s" %
-                            ("%d,%d" % (tarinfo.devmajor, tarinfo.devminor)))
-                else:
-                    _safe_print("%10d" % tarinfo.size)
-                if tarinfo.mtime is None:
-                    _safe_print("????-??-?? ??:??:??")
-                else:
-                    _safe_print("%d-%02d-%02d %02d:%02d:%02d" \
-                                % time.localtime(tarinfo.mtime)[:6])
-
-            _safe_print(tarinfo.name + ("/" if tarinfo.isdir() else ""))
-
-            if verbose:
-                if tarinfo.issym():
-                    _safe_print("-> " + tarinfo.linkname)
-                if tarinfo.islnk():
-                    _safe_print("link to " + tarinfo.linkname)
-            print()
-
-    def add(self, name, arcname=None, recursive=True, *, filter=None):
-        """Add the file 'name' to the archive. 'name' may be any type of file
-           (directory, fifo, symbolic link, etc.). If given, 'arcname'
-           specifies an alternative name for the file in the archive.
-           Directories are added recursively by default. This can be avoided by
-           setting 'recursive' to False. 'filter' is a function
-           that expects a TarInfo object argument and returns the changed
-           TarInfo object, if it returns None the TarInfo object will be
-           excluded from the archive.
-        """
-        self._check("awx")
-
-        if arcname is None:
-            arcname = name
-
-        # Skip if somebody tries to archive the archive...
-        if self.name is not None and os.path.abspath(name) == self.name:
-            self._dbg(2, "tarfile: Skipped %r" % name)
-            return
-
-        self._dbg(1, name)
-
-        # Create a TarInfo object from the file.
-        tarinfo = self.gettarinfo(name, arcname)
-
-        if tarinfo is None:
-            self._dbg(1, "tarfile: Unsupported type %r" % name)
-            return
-
-        # Change or exclude the TarInfo object.
-        if filter is not None:
-            tarinfo = filter(tarinfo)
-            if tarinfo is None:
-                self._dbg(2, "tarfile: Excluded %r" % name)
-                return
-
-        # Append the tar header and data to the archive.
-        if tarinfo.isreg():
-            with bltn_open(name, "rb") as f:
-                self.addfile(tarinfo, f)
-
-        elif tarinfo.isdir():
-            self.addfile(tarinfo)
-            if recursive:
-                for f in sorted(os.listdir(name)):
-                    self.add(os.path.join(name, f), os.path.join(arcname, f),
-                            recursive, filter=filter)
-
-        else:
-            self.addfile(tarinfo)
-
-    def addfile(self, tarinfo, fileobj=None):
-        """Add the TarInfo object 'tarinfo' to the archive. If 'tarinfo' represents
-           a non zero-size regular file, the 'fileobj' argument should be a binary file,
-           and tarinfo.size bytes are read from it and added to the archive.
-           You can create TarInfo objects directly, or by using gettarinfo().
-        """
-        self._check("awx")
-
-        if fileobj is None and tarinfo.isreg() and tarinfo.size != 0:
-            raise ValueError("fileobj not provided for non zero-size regular file")
-
-        tarinfo = copy.copy(tarinfo)
-
-        buf = tarinfo.tobuf(self.format, self.encoding, self.errors)
-        self.fileobj.write(buf)
-        self.offset += len(buf)
-        bufsize=self.copybufsize
-        # If there's data to follow, append it.
-        if fileobj is not None:
-            copyfileobj(fileobj, self.fileobj, tarinfo.size, bufsize=bufsize)
-            blocks, remainder = divmod(tarinfo.size, BLOCKSIZE)
-            if remainder > 0:
-                self.fileobj.write(NUL * (BLOCKSIZE - remainder))
-                blocks += 1
-            self.offset += blocks * BLOCKSIZE
-
-        self.members.append(tarinfo)
-
-    def _get_filter_function(self, filter):
-        if filter is None:
-            filter = self.extraction_filter
-            if filter is None:
-                import warnings
-                warnings.warn(
-                    'Python 3.14 will, by default, filter extracted tar '
-                    + 'archives and reject files or modify their metadata. '
-                    + 'Use the filter argument to control this behavior.',
-                    DeprecationWarning, stacklevel=3)
-                return fully_trusted_filter
-            if isinstance(filter, str):
-                raise TypeError(
-                    'String names are not supported for '
-                    + 'TarFile.extraction_filter. Use a function such as '
-                    + 'tarfile.data_filter directly.')
-            return filter
-        if callable(filter):
-            return filter
-        try:
-            return _NAMED_FILTERS[filter]
-        except KeyError:
-            raise ValueError(f"filter {filter!r} not found") from None
-
-    def extractall(self, path=".", members=None, *, numeric_owner=False,
-                   filter=None):
-        """Extract all members from the archive to the current working
-           directory and set owner, modification time and permissions on
-           directories afterwards. 'path' specifies a different directory
-           to extract to. 'members' is optional and must be a subset of the
-           list returned by getmembers(). If 'numeric_owner' is True, only
-           the numbers for user/group names are used and not the names.
-
-           The 'filter' function will be called on each member just
-           before extraction.
-           It can return a changed TarInfo or None to skip the member.
-           String names of common filters are accepted.
-        """
-        directories = []
-
-        filter_function = self._get_filter_function(filter)
-        if members is None:
-            members = self
-
-        for member in members:
-            tarinfo = self._get_extract_tarinfo(member, filter_function, path)
-            if tarinfo is None:
-                continue
-            if tarinfo.isdir():
-                # For directories, delay setting attributes until later,
-                # since permissions can interfere with extraction and
-                # extracting contents can reset mtime.
-                directories.append(tarinfo)
-            self._extract_one(tarinfo, path, set_attrs=not tarinfo.isdir(),
-                              numeric_owner=numeric_owner)
-
-        # Reverse sort directories.
-        directories.sort(key=lambda a: a.name, reverse=True)
-
-        # Set correct owner, mtime and filemode on directories.
-        for tarinfo in directories:
-            dirpath = os.path.join(path, tarinfo.name)
-            try:
-                self.chown(tarinfo, dirpath, numeric_owner=numeric_owner)
-                self.utime(tarinfo, dirpath)
-                self.chmod(tarinfo, dirpath)
-            except ExtractError as e:
-                self._handle_nonfatal_error(e)
-
-    def extract(self, member, path="", set_attrs=True, *, numeric_owner=False,
-                filter=None):
-        """Extract a member from the archive to the current working directory,
-           using its full name. Its file information is extracted as accurately
-           as possible. 'member' may be a filename or a TarInfo object. You can
-           specify a different directory using 'path'. File attributes (owner,
-           mtime, mode) are set unless 'set_attrs' is False. If 'numeric_owner'
-           is True, only the numbers for user/group names are used and not
-           the names.
-
-           The 'filter' function will be called before extraction.
-           It can return a changed TarInfo or None to skip the member.
-           String names of common filters are accepted.
-        """
-        filter_function = self._get_filter_function(filter)
-        tarinfo = self._get_extract_tarinfo(member, filter_function, path)
-        if tarinfo is not None:
-            self._extract_one(tarinfo, path, set_attrs, numeric_owner)
-
-    def _get_extract_tarinfo(self, member, filter_function, path):
-        """Get filtered TarInfo (or None) from member, which might be a str"""
-        if isinstance(member, str):
-            tarinfo = self.getmember(member)
-        else:
-            tarinfo = member
-
-        unfiltered = tarinfo
-        try:
-            tarinfo = filter_function(tarinfo, path)
-        except (OSError, FilterError) as e:
-            self._handle_fatal_error(e)
-        except ExtractError as e:
-            self._handle_nonfatal_error(e)
-        if tarinfo is None:
-            self._dbg(2, "tarfile: Excluded %r" % unfiltered.name)
-            return None
-        # Prepare the link target for makelink().
-        if tarinfo.islnk():
-            tarinfo = copy.copy(tarinfo)
-            tarinfo._link_target = os.path.join(path, tarinfo.linkname)
-        return tarinfo
-
-    def _extract_one(self, tarinfo, path, set_attrs, numeric_owner):
-        """Extract from filtered tarinfo to disk"""
-        self._check("r")
-
-        try:
-            self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
-                                 set_attrs=set_attrs,
-                                 numeric_owner=numeric_owner)
-        except OSError as e:
-            self._handle_fatal_error(e)
-        except ExtractError as e:
-            self._handle_nonfatal_error(e)
-
-    def _handle_nonfatal_error(self, e):
-        """Handle non-fatal error (ExtractError) according to errorlevel"""
-        if self.errorlevel > 1:
-            raise
-        else:
-            self._dbg(1, "tarfile: %s" % e)
-
-    def _handle_fatal_error(self, e):
-        """Handle "fatal" error according to self.errorlevel"""
-        if self.errorlevel > 0:
-            raise
-        elif isinstance(e, OSError):
-            if e.filename is None:
-                self._dbg(1, "tarfile: %s" % e.strerror)
-            else:
-                self._dbg(1, "tarfile: %s %r" % (e.strerror, e.filename))
-        else:
-            self._dbg(1, "tarfile: %s %s" % (type(e).__name__, e))
-
-    def extractfile(self, member):
-        """Extract a member from the archive as a file object. 'member' may be
-           a filename or a TarInfo object. If 'member' is a regular file or
-           a link, an io.BufferedReader object is returned. For all other
-           existing members, None is returned. If 'member' does not appear
-           in the archive, KeyError is raised.
-        """
-        self._check("r")
-
-        if isinstance(member, str):
-            tarinfo = self.getmember(member)
-        else:
-            tarinfo = member
-
-        if tarinfo.isreg() or tarinfo.type not in SUPPORTED_TYPES:
-            # Members with unknown types are treated as regular files.
-            return self.fileobject(self, tarinfo)
-
-        elif tarinfo.islnk() or tarinfo.issym():
-            if isinstance(self.fileobj, _Stream):
-                # A small but ugly workaround for the case that someone tries
-                # to extract a (sym)link as a file-object from a non-seekable
-                # stream of tar blocks.
-                raise StreamError("cannot extract (sym)link as file object")
-            else:
-                # A (sym)link's file object is its target's file object.
-                return self.extractfile(self._find_link_target(tarinfo))
-        else:
-            # If there's no data associated with the member (directory, chrdev,
-            # blkdev, etc.), return None instead of a file object.
-            return None
-
-    def _extract_member(self, tarinfo, targetpath, set_attrs=True,
-                        numeric_owner=False):
-        """Extract the TarInfo object tarinfo to a physical
-           file called targetpath.
-        """
-        # Fetch the TarInfo object for the given name
-        # and build the destination pathname, replacing
-        # forward slashes to platform specific separators.
-        targetpath = targetpath.rstrip("/")
-        targetpath = targetpath.replace("/", os.sep)
-
-        # Create all upper directories.
-        upperdirs = os.path.dirname(targetpath)
-        if upperdirs and not os.path.exists(upperdirs):
-            # Create directories that are not part of the archive with
-            # default permissions.
-            os.makedirs(upperdirs, exist_ok=True)
-
-        if tarinfo.islnk() or tarinfo.issym():
-            self._dbg(1, "%s -> %s" % (tarinfo.name, tarinfo.linkname))
-        else:
-            self._dbg(1, tarinfo.name)
-
-        if tarinfo.isreg():
-            self.makefile(tarinfo, targetpath)
-        elif tarinfo.isdir():
-            self.makedir(tarinfo, targetpath)
-        elif tarinfo.isfifo():
-            self.makefifo(tarinfo, targetpath)
-        elif tarinfo.ischr() or tarinfo.isblk():
-            self.makedev(tarinfo, targetpath)
-        elif tarinfo.islnk() or tarinfo.issym():
-            self.makelink(tarinfo, targetpath)
-        elif tarinfo.type not in SUPPORTED_TYPES:
-            self.makeunknown(tarinfo, targetpath)
-        else:
-            self.makefile(tarinfo, targetpath)
-
-        if set_attrs:
-            self.chown(tarinfo, targetpath, numeric_owner)
-            if not tarinfo.issym():
-                self.chmod(tarinfo, targetpath)
-                self.utime(tarinfo, targetpath)
-
-    #--------------------------------------------------------------------------
-    # Below are the different file methods. They are called via
-    # _extract_member() when extract() is called. They can be replaced in a
-    # subclass to implement other functionality.
-
-    def makedir(self, tarinfo, targetpath):
-        """Make a directory called targetpath.
-        """
-        try:
-            if tarinfo.mode is None:
-                # Use the system's default mode
-                os.mkdir(targetpath)
-            else:
-                # Use a safe mode for the directory, the real mode is set
-                # later in _extract_member().
-                os.mkdir(targetpath, 0o700)
-        except FileExistsError:
-            if not os.path.isdir(targetpath):
-                raise
-
-    def makefile(self, tarinfo, targetpath):
-        """Make a file called targetpath.
-        """
-        source = self.fileobj
-        source.seek(tarinfo.offset_data)
-        bufsize = self.copybufsize
-        with bltn_open(targetpath, "wb") as target:
-            if tarinfo.sparse is not None:
-                for offset, size in tarinfo.sparse:
-                    target.seek(offset)
-                    copyfileobj(source, target, size, ReadError, bufsize)
-                target.seek(tarinfo.size)
-                target.truncate()
-            else:
-                copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
-
-    def makeunknown(self, tarinfo, targetpath):
-        """Make a file from a TarInfo object with an unknown type
-           at targetpath.
-        """
-        self.makefile(tarinfo, targetpath)
-        self._dbg(1, "tarfile: Unknown file type %r, " \
-                     "extracted as regular file." % tarinfo.type)
-
-    def makefifo(self, tarinfo, targetpath):
-        """Make a fifo called targetpath.
-        """
-        if hasattr(os, "mkfifo"):
-            os.mkfifo(targetpath)
-        else:
-            raise ExtractError("fifo not supported by system")
-
-    def makedev(self, tarinfo, targetpath):
-        """Make a character or block device called targetpath.
-        """
-        if not hasattr(os, "mknod") or not hasattr(os, "makedev"):
-            raise ExtractError("special devices not supported by system")
-
-        mode = tarinfo.mode
-        if mode is None:
-            # Use mknod's default
-            mode = 0o600
-        if tarinfo.isblk():
-            mode |= stat.S_IFBLK
-        else:
-            mode |= stat.S_IFCHR
-
-        os.mknod(targetpath, mode,
-                 os.makedev(tarinfo.devmajor, tarinfo.devminor))
-
-    def makelink(self, tarinfo, targetpath):
-        """Make a (symbolic) link called targetpath. If it cannot be created
-          (platform limitation), we try to make a copy of the referenced file
-          instead of a link.
-        """
-        try:
-            # For systems that support symbolic and hard links.
-            if tarinfo.issym():
-                if os.path.lexists(targetpath):
-                    # Avoid FileExistsError on following os.symlink.
-                    os.unlink(targetpath)
-                os.symlink(tarinfo.linkname, targetpath)
-            else:
-                if os.path.exists(tarinfo._link_target):
-                    os.link(tarinfo._link_target, targetpath)
-                else:
-                    self._extract_member(self._find_link_target(tarinfo),
-                                         targetpath)
-        except symlink_exception:
-            try:
-                self._extract_member(self._find_link_target(tarinfo),
-                                     targetpath)
-            except KeyError:
-                raise ExtractError("unable to resolve link inside archive") from None
-
-    def chown(self, tarinfo, targetpath, numeric_owner):
-        """Set owner of targetpath according to tarinfo. If numeric_owner
-           is True, use .gid/.uid instead of .gname/.uname. If numeric_owner
-           is False, fall back to .gid/.uid when the search based on name
-           fails.
-        """
-        if hasattr(os, "geteuid") and os.geteuid() == 0:
-            # We have to be root to do so.
-            g = tarinfo.gid
-            u = tarinfo.uid
-            if not numeric_owner:
-                try:
-                    if grp and tarinfo.gname:
-                        g = grp.getgrnam(tarinfo.gname)[2]
-                except KeyError:
-                    pass
-                try:
-                    if pwd and tarinfo.uname:
-                        u = pwd.getpwnam(tarinfo.uname)[2]
-                except KeyError:
-                    pass
-            if g is None:
-                g = -1
-            if u is None:
-                u = -1
-            try:
-                if tarinfo.issym() and hasattr(os, "lchown"):
-                    os.lchown(targetpath, u, g)
-                else:
-                    os.chown(targetpath, u, g)
-            except (OSError, OverflowError) as e:
-                # OverflowError can be raised if an ID doesn't fit in 'id_t'
-                raise ExtractError("could not change owner") from e
-
-    def chmod(self, tarinfo, targetpath):
-        """Set file permissions of targetpath according to tarinfo.
-        """
-        if tarinfo.mode is None:
-            return
-        try:
-            os.chmod(targetpath, tarinfo.mode)
-        except OSError as e:
-            raise ExtractError("could not change mode") from e
-
-    def utime(self, tarinfo, targetpath):
-        """Set modification time of targetpath according to tarinfo.
-        """
-        mtime = tarinfo.mtime
-        if mtime is None:
-            return
-        if not hasattr(os, 'utime'):
-            return
-        try:
-            os.utime(targetpath, (mtime, mtime))
-        except OSError as e:
-            raise ExtractError("could not change modification time") from e
-
-    #--------------------------------------------------------------------------
-    def next(self):
-        """Return the next member of the archive as a TarInfo object, when
-           TarFile is opened for reading. Return None if there is no more
-           available.
-        """
-        self._check("ra")
-        if self.firstmember is not None:
-            m = self.firstmember
-            self.firstmember = None
-            return m
-
-        # Advance the file pointer.
-        if self.offset != self.fileobj.tell():
-            if self.offset == 0:
-                return None
-            self.fileobj.seek(self.offset - 1)
-            if not self.fileobj.read(1):
-                raise ReadError("unexpected end of data")
-
-        # Read the next block.
-        tarinfo = None
-        while True:
-            try:
-                tarinfo = self.tarinfo.fromtarfile(self)
-            except EOFHeaderError as e:
-                if self.ignore_zeros:
-                    self._dbg(2, "0x%X: %s" % (self.offset, e))
-                    self.offset += BLOCKSIZE
-                    continue
-            except InvalidHeaderError as e:
-                if self.ignore_zeros:
-                    self._dbg(2, "0x%X: %s" % (self.offset, e))
-                    self.offset += BLOCKSIZE
-                    continue
-                elif self.offset == 0:
-                    raise ReadError(str(e)) from None
-            except EmptyHeaderError:
-                if self.offset == 0:
-                    raise ReadError("empty file") from None
-            except TruncatedHeaderError as e:
-                if self.offset == 0:
-                    raise ReadError(str(e)) from None
-            except SubsequentHeaderError as e:
-                raise ReadError(str(e)) from None
-            except Exception as e:
-                try:
-                    import zlib
-                    if isinstance(e, zlib.error):
-                        raise ReadError(f'zlib error: {e}') from None
-                    else:
-                        raise e
-                except ImportError:
-                    raise e
-            break
-
-        if tarinfo is not None:
-            # if streaming the file we do not want to cache the tarinfo
-            if not self.stream:
-                self.members.append(tarinfo)
-        else:
-            self._loaded = True
-
-        return tarinfo
-
-    #--------------------------------------------------------------------------
-    # Little helper methods:
-
-    def _getmember(self, name, tarinfo=None, normalize=False):
-        """Find an archive member by name from bottom to top.
-           If tarinfo is given, it is used as the starting point.
-        """
-        # Ensure that all members have been loaded.
-        members = self.getmembers()
-
-        # Limit the member search list up to tarinfo.
-        skipping = False
-        if tarinfo is not None:
-            try:
-                index = members.index(tarinfo)
-            except ValueError:
-                # The given starting point might be a (modified) copy.
-                # We'll later skip members until we find an equivalent.
-                skipping = True
-            else:
-                # Happy fast path
-                members = members[:index]
-
-        if normalize:
-            name = os.path.normpath(name)
-
-        for member in reversed(members):
-            if skipping:
-                if tarinfo.offset == member.offset:
-                    skipping = False
-                continue
-            if normalize:
-                member_name = os.path.normpath(member.name)
-            else:
-                member_name = member.name
-
-            if name == member_name:
-                return member
-
-        if skipping:
-            # Starting point was not found
-            raise ValueError(tarinfo)
-
-    def _load(self):
-        """Read through the entire archive file and look for readable
-           members. This should not run if the file is set to stream.
-        """
-        if not self.stream:
-            while self.next() is not None:
-                pass
-            self._loaded = True
-
-    def _check(self, mode=None):
-        """Check if TarFile is still open, and if the operation's mode
-           corresponds to TarFile's mode.
-        """
-        if self.closed:
-            raise OSError("%s is closed" % self.__class__.__name__)
-        if mode is not None and self.mode not in mode:
-            raise OSError("bad operation for mode %r" % self.mode)
-
-    def _find_link_target(self, tarinfo):
-        """Find the target member of a symlink or hardlink member in the
-           archive.
-        """
-        if tarinfo.issym():
-            # Always search the entire archive.
-            linkname = "/".join(filter(None, (os.path.dirname(tarinfo.name), tarinfo.linkname)))
-            limit = None
-        else:
-            # Search the archive before the link, because a hard link is
-            # just a reference to an already archived file.
-            linkname = tarinfo.linkname
-            limit = tarinfo
-
-        member = self._getmember(linkname, tarinfo=limit, normalize=True)
-        if member is None:
-            raise KeyError("linkname %r not found" % linkname)
-        return member
-
-    def __iter__(self):
-        """Provide an iterator object.
-        """
-        if self._loaded:
-            yield from self.members
-            return
-
-        # Yield items using TarFile's next() method.
-        # When all members have been read, set TarFile as _loaded.
-        index = 0
-        # Fix for SF #1100429: Under rare circumstances it can
-        # happen that getmembers() is called during iteration,
-        # which will have already exhausted the next() method.
-        if self.firstmember is not None:
-            tarinfo = self.next()
-            index += 1
-            yield tarinfo
-
-        while True:
-            if index < len(self.members):
-                tarinfo = self.members[index]
-            elif not self._loaded:
-                tarinfo = self.next()
-                if not tarinfo:
-                    self._loaded = True
-                    return
-            else:
-                return
-            index += 1
-            yield tarinfo
-
-    def _dbg(self, level, msg):
-        """Write debugging output to sys.stderr.
-        """
-        if level <= self.debug:
-            print(msg, file=sys.stderr)
-
-    def __enter__(self):
-        self._check()
-        return self
-
-    def __exit__(self, type, value, traceback):
-        if type is None:
-            self.close()
-        else:
-            # An exception occurred. We must not call close() because
-            # it would try to write end-of-archive blocks and padding.
-            if not self._extfileobj:
-                self.fileobj.close()
-            self.closed = True
-
-#--------------------
-# exported functions
-#--------------------
-
-def is_tarfile(name):
-    """Return True if name points to a tar archive that we
-       are able to handle, else return False.
-
-       'name' should be a string, file, or file-like object.
-    """
-    try:
-        if hasattr(name, "read"):
-            pos = name.tell()
-            t = open(fileobj=name)
-            name.seek(pos)
-        else:
-            t = open(name)
-        t.close()
-        return True
-    except TarError:
-        return False
-
-open = TarFile.open
-
-
-def main():
-    import argparse
-
-    description = 'A simple command-line interface for tarfile module.'
-    parser = argparse.ArgumentParser(description=description)
-    parser.add_argument('-v', '--verbose', action='store_true', default=False,
-                        help='Verbose output')
-    parser.add_argument('--filter', metavar='',
-                        choices=_NAMED_FILTERS,
-                        help='Filter for extraction')
-
-    group = parser.add_mutually_exclusive_group(required=True)
-    group.add_argument('-l', '--list', metavar='',
-                       help='Show listing of a tarfile')
-    group.add_argument('-e', '--extract', nargs='+',
-                       metavar=('', ''),
-                       help='Extract tarfile into target dir')
-    group.add_argument('-c', '--create', nargs='+',
-                       metavar=('', ''),
-                       help='Create tarfile from sources')
-    group.add_argument('-t', '--test', metavar='',
-                       help='Test if a tarfile is valid')
-
-    args = parser.parse_args()
-
-    if args.filter and args.extract is None:
-        parser.exit(1, '--filter is only valid for extraction\n')
-
-    if args.test is not None:
-        src = args.test
-        if is_tarfile(src):
-            with open(src, 'r') as tar:
-                tar.getmembers()
-                print(tar.getmembers(), file=sys.stderr)
-            if args.verbose:
-                print('{!r} is a tar archive.'.format(src))
-        else:
-            parser.exit(1, '{!r} is not a tar archive.\n'.format(src))
-
-    elif args.list is not None:
-        src = args.list
-        if is_tarfile(src):
-            with TarFile.open(src, 'r:*') as tf:
-                tf.list(verbose=args.verbose)
-        else:
-            parser.exit(1, '{!r} is not a tar archive.\n'.format(src))
-
-    elif args.extract is not None:
-        if len(args.extract) == 1:
-            src = args.extract[0]
-            curdir = os.curdir
-        elif len(args.extract) == 2:
-            src, curdir = args.extract
-        else:
-            parser.exit(1, parser.format_help())
-
-        if is_tarfile(src):
-            with TarFile.open(src, 'r:*') as tf:
-                tf.extractall(path=curdir, filter=args.filter)
-            if args.verbose:
-                if curdir == '.':
-                    msg = '{!r} file is extracted.'.format(src)
-                else:
-                    msg = ('{!r} file is extracted '
-                           'into {!r} directory.').format(src, curdir)
-                print(msg)
-        else:
-            parser.exit(1, '{!r} is not a tar archive.\n'.format(src))
-
-    elif args.create is not None:
-        tar_name = args.create.pop(0)
-        _, ext = os.path.splitext(tar_name)
-        compressions = {
-            # gz
-            '.gz': 'gz',
-            '.tgz': 'gz',
-            # xz
-            '.xz': 'xz',
-            '.txz': 'xz',
-            # bz2
-            '.bz2': 'bz2',
-            '.tbz': 'bz2',
-            '.tbz2': 'bz2',
-            '.tb2': 'bz2',
-        }
-        tar_mode = 'w:' + compressions[ext] if ext in compressions else 'w'
-        tar_files = args.create
-
-        with TarFile.open(tar_name, tar_mode) as tf:
-            for file_name in tar_files:
-                tf.add(file_name)
-
-        if args.verbose:
-            print('{!r} file created.'.format(tar_name))
-
-if __name__ == '__main__':
-    main()
diff --git a/voxvera/vendor/setuptools/_vendor/backports/tarfile/__main__.py b/voxvera/vendor/setuptools/_vendor/backports/tarfile/__main__.py
deleted file mode 100644
index daf5509..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports/tarfile/__main__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from . import main
-
-
-if __name__ == '__main__':
-    main()
diff --git a/voxvera/vendor/setuptools/_vendor/backports/tarfile/compat/__init__.py b/voxvera/vendor/setuptools/_vendor/backports/tarfile/compat/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/backports/tarfile/compat/py38.py b/voxvera/vendor/setuptools/_vendor/backports/tarfile/compat/py38.py
deleted file mode 100644
index 20fbbfc..0000000
--- a/voxvera/vendor/setuptools/_vendor/backports/tarfile/compat/py38.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import sys
-
-
-if sys.version_info < (3, 9):
-
-    def removesuffix(self, suffix):
-        # suffix='' should not call self[:-0].
-        if suffix and self.endswith(suffix):
-            return self[: -len(suffix)]
-        else:
-            return self[:]
-
-    def removeprefix(self, prefix):
-        if self.startswith(prefix):
-            return self[len(prefix) :]
-        else:
-            return self[:]
-else:
-
-    def removesuffix(self, suffix):
-        return self.removesuffix(suffix)
-
-    def removeprefix(self, prefix):
-        return self.removeprefix(prefix)
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER
deleted file mode 100644
index 5c69047..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-uv
\ No newline at end of file
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA
deleted file mode 100644
index 9d894b4..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA
+++ /dev/null
@@ -1,133 +0,0 @@
-Metadata-Version: 2.4
-Name: importlib_metadata
-Version: 8.7.1
-Summary: Read metadata from Python packages
-Author-email: "Jason R. Coombs" 
-License-Expression: Apache-2.0
-Project-URL: Source, https://github.com/python/importlib_metadata
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3 :: Only
-Requires-Python: >=3.9
-Description-Content-Type: text/x-rst
-License-File: LICENSE
-Requires-Dist: zipp>=3.20
-Provides-Extra: test
-Requires-Dist: pytest!=8.1.*,>=6; extra == "test"
-Requires-Dist: packaging; extra == "test"
-Requires-Dist: pyfakefs; extra == "test"
-Requires-Dist: flufl.flake8; extra == "test"
-Requires-Dist: pytest-perf>=0.9.2; extra == "test"
-Requires-Dist: jaraco.test>=5.4; extra == "test"
-Provides-Extra: doc
-Requires-Dist: sphinx>=3.5; extra == "doc"
-Requires-Dist: jaraco.packaging>=9.3; extra == "doc"
-Requires-Dist: rst.linker>=1.9; extra == "doc"
-Requires-Dist: furo; extra == "doc"
-Requires-Dist: sphinx-lint; extra == "doc"
-Requires-Dist: jaraco.tidelift>=1.4; extra == "doc"
-Provides-Extra: perf
-Requires-Dist: ipython; extra == "perf"
-Provides-Extra: check
-Requires-Dist: pytest-checkdocs>=2.4; extra == "check"
-Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check"
-Provides-Extra: cover
-Requires-Dist: pytest-cov; extra == "cover"
-Provides-Extra: enabler
-Requires-Dist: pytest-enabler>=3.4; extra == "enabler"
-Provides-Extra: type
-Requires-Dist: pytest-mypy>=1.0.1; extra == "type"
-Requires-Dist: mypy<1.19; platform_python_implementation == "PyPy" and extra == "type"
-Dynamic: license-file
-
-.. image:: https://img.shields.io/pypi/v/importlib_metadata.svg
-   :target: https://pypi.org/project/importlib_metadata
-
-.. image:: https://img.shields.io/pypi/pyversions/importlib_metadata.svg
-
-.. image:: https://github.com/python/importlib_metadata/actions/workflows/main.yml/badge.svg
-   :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22tests%22
-   :alt: tests
-
-.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
-    :target: https://github.com/astral-sh/ruff
-    :alt: Ruff
-
-.. image:: https://readthedocs.org/projects/importlib-metadata/badge/?version=latest
-   :target: https://importlib-metadata.readthedocs.io/en/latest/?badge=latest
-
-.. image:: https://img.shields.io/badge/skeleton-2025-informational
-   :target: https://blog.jaraco.com/skeleton
-
-.. image:: https://tidelift.com/badges/package/pypi/importlib-metadata
-   :target: https://tidelift.com/subscription/pkg/pypi-importlib-metadata?utm_source=pypi-importlib-metadata&utm_medium=readme
-
-Library to access the metadata for a Python package.
-
-This package supplies third-party access to the functionality of
-`importlib.metadata `_
-including improvements added to subsequent Python versions.
-
-
-Compatibility
-=============
-
-New features are introduced in this third-party library and later merged
-into CPython. The following table indicates which versions of this library
-were contributed to different versions in the standard library:
-
-.. list-table::
-   :header-rows: 1
-
-   * - importlib_metadata
-     - stdlib
-   * - 7.0
-     - 3.13
-   * - 6.5
-     - 3.12
-   * - 4.13
-     - 3.11
-   * - 4.6
-     - 3.10
-   * - 1.4
-     - 3.8
-
-
-Usage
-=====
-
-See the `online documentation `_
-for usage details.
-
-`Finder authors
-`_ can
-also add support for custom package installers.  See the above documentation
-for details.
-
-
-Caveats
-=======
-
-This project primarily supports third-party packages installed by PyPA
-tools (or other conforming packages). It does not support:
-
-- Packages in the stdlib.
-- Packages installed without metadata.
-
-Project details
-===============
-
- * Project home: https://github.com/python/importlib_metadata
- * Report bugs at: https://github.com/python/importlib_metadata/issues
- * Code hosting: https://github.com/python/importlib_metadata
- * Documentation: https://importlib-metadata.readthedocs.io/
-
-For Enterprise
-==============
-
-Available as part of the Tidelift Subscription.
-
-This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.
-
-`Learn more `_.
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD
deleted file mode 100644
index 78aa761..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD
+++ /dev/null
@@ -1,21 +0,0 @@
-importlib_metadata-8.7.1.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-importlib_metadata-8.7.1.dist-info/METADATA,sha256=o-OLnuQyYonUhkcE8w4pnudp4jCc6fSnXw3hpQrQo1Y,4670
-importlib_metadata-8.7.1.dist-info/RECORD,,
-importlib_metadata-8.7.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-importlib_metadata-8.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
-importlib_metadata-8.7.1.dist-info/licenses/LICENSE,sha256=RYUC4S2Xu_ZEOGBqIARKqF6wX7CoqAe7NdvsJT_R_AQ,10278
-importlib_metadata-8.7.1.dist-info/top_level.txt,sha256=CO3fD9yylANiXkrMo4qHLV_mqXL2sC5JFKgt1yWAT-A,19
-importlib_metadata/__init__.py,sha256=u7Ew4-UkpzNY-ka6k-WRkDhQZS1akkLMfWs2eEnUmGo,37734
-importlib_metadata/_adapters.py,sha256=r5i8XLrKT6xmrpoREZhZrfczOYDmrVZeJBW5u0HzIGU,3797
-importlib_metadata/_collections.py,sha256=CxAhzlF3g1rwu_fMiB53JtRQiUFh0RgiMpoOvmK_ocg,760
-importlib_metadata/_compat.py,sha256=VC5ZDLlT-BcshauCShdFJvMNLntJJfZzNK1meGa-enw,1313
-importlib_metadata/_functools.py,sha256=0pA2OoiVK6wnsGq8HvVIzgdkvLiZ0nfnfw7IsndjoHk,3510
-importlib_metadata/_itertools.py,sha256=nMvp9SfHAQ_JYwK4L2i64lr3GRXGlYlikGTVzWbys_E,5351
-importlib_metadata/_meta.py,sha256=EtHyiJ5kGzWFDfKyQ2XQp6Vu113CeadKW1Vf6aGc1B4,1765
-importlib_metadata/_text.py,sha256=HCsFksZpJLeTP3NEk_ngrAeXVRRtTrtyh9eOABoRP4A,2166
-importlib_metadata/_typing.py,sha256=EQKhhsEgz_Sa-FnePI-faC72rNOOQwopjA1i5pG8FDU,367
-importlib_metadata/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-importlib_metadata/compat/py311.py,sha256=uqm-K-uohyj1042TH4a9Er_I5o7667DvulcD-gC_fSA,608
-importlib_metadata/compat/py39.py,sha256=J3W7PUVRPNYMmcvT12RF8ndBU9e8_T0Ac4U87Bsrq70,1187
-importlib_metadata/diagnose.py,sha256=nkSRMiowlmkhLYhKhvCg9glmt_11Cox-EmLzEbqYTa8,379
-importlib_metadata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/REQUESTED
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/WHEEL
deleted file mode 100644
index e7fa31b..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/WHEEL
+++ /dev/null
@@ -1,5 +0,0 @@
-Wheel-Version: 1.0
-Generator: setuptools (80.9.0)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE
deleted file mode 100644
index 5c1d8bb..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE
+++ /dev/null
@@ -1,73 +0,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 2025 [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.
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt b/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt
deleted file mode 100644
index bbb0754..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-importlib_metadata
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/__init__.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/__init__.py
deleted file mode 100644
index 508b02e..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/__init__.py
+++ /dev/null
@@ -1,1191 +0,0 @@
-"""
-APIs exposing metadata from third-party Python packages.
-
-This codebase is shared between importlib.metadata in the stdlib
-and importlib_metadata in PyPI. See
-https://github.com/python/importlib_metadata/wiki/Development-Methodology
-for more detail.
-"""
-
-from __future__ import annotations
-
-import abc
-import collections
-import email
-import functools
-import itertools
-import operator
-import os
-import pathlib
-import posixpath
-import re
-import sys
-import textwrap
-import types
-from collections.abc import Iterable, Mapping
-from contextlib import suppress
-from importlib import import_module
-from importlib.abc import MetaPathFinder
-from itertools import starmap
-from typing import Any
-
-from . import _meta
-from ._collections import FreezableDefaultDict, Pair
-from ._compat import (
-    NullFinder,
-    install,
-)
-from ._functools import method_cache, noop, pass_none, passthrough
-from ._itertools import always_iterable, bucket, unique_everseen
-from ._meta import PackageMetadata, SimplePath
-from ._typing import md_none
-from .compat import py39, py311
-
-__all__ = [
-    'Distribution',
-    'DistributionFinder',
-    'PackageMetadata',
-    'PackageNotFoundError',
-    'SimplePath',
-    'distribution',
-    'distributions',
-    'entry_points',
-    'files',
-    'metadata',
-    'packages_distributions',
-    'requires',
-    'version',
-]
-
-
-class PackageNotFoundError(ModuleNotFoundError):
-    """The package was not found."""
-
-    def __str__(self) -> str:
-        return f"No package metadata was found for {self.name}"
-
-    @property
-    def name(self) -> str:  # type: ignore[override] # make readonly
-        (name,) = self.args
-        return name
-
-
-class Sectioned:
-    """
-    A simple entry point config parser for performance
-
-    >>> for item in Sectioned.read(Sectioned._sample):
-    ...     print(item)
-    Pair(name='sec1', value='# comments ignored')
-    Pair(name='sec1', value='a = 1')
-    Pair(name='sec1', value='b = 2')
-    Pair(name='sec2', value='a = 2')
-
-    >>> res = Sectioned.section_pairs(Sectioned._sample)
-    >>> item = next(res)
-    >>> item.name
-    'sec1'
-    >>> item.value
-    Pair(name='a', value='1')
-    >>> item = next(res)
-    >>> item.value
-    Pair(name='b', value='2')
-    >>> item = next(res)
-    >>> item.name
-    'sec2'
-    >>> item.value
-    Pair(name='a', value='2')
-    >>> list(res)
-    []
-    """
-
-    _sample = textwrap.dedent(
-        """
-        [sec1]
-        # comments ignored
-        a = 1
-        b = 2
-
-        [sec2]
-        a = 2
-        """
-    ).lstrip()
-
-    @classmethod
-    def section_pairs(cls, text):
-        return (
-            section._replace(value=Pair.parse(section.value))
-            for section in cls.read(text, filter_=cls.valid)
-            if section.name is not None
-        )
-
-    @staticmethod
-    def read(text, filter_=None):
-        lines = filter(filter_, map(str.strip, text.splitlines()))
-        name = None
-        for value in lines:
-            section_match = value.startswith('[') and value.endswith(']')
-            if section_match:
-                name = value.strip('[]')
-                continue
-            yield Pair(name, value)
-
-    @staticmethod
-    def valid(line: str):
-        return line and not line.startswith('#')
-
-
-class _EntryPointMatch(types.SimpleNamespace):
-    module: str
-    attr: str
-    extras: str
-
-
-class EntryPoint:
-    """An entry point as defined by Python packaging conventions.
-
-    See `the packaging docs on entry points
-    `_
-    for more information.
-
-    >>> ep = EntryPoint(
-    ...     name=None, group=None, value='package.module:attr [extra1, extra2]')
-    >>> ep.module
-    'package.module'
-    >>> ep.attr
-    'attr'
-    >>> ep.extras
-    ['extra1', 'extra2']
-
-    If the value package or module are not valid identifiers, a
-    ValueError is raised on access.
-
-    >>> EntryPoint(name=None, group=None, value='invalid-name').module
-    Traceback (most recent call last):
-    ...
-    ValueError: ('Invalid object reference...invalid-name...
-    >>> EntryPoint(name=None, group=None, value='invalid-name').attr
-    Traceback (most recent call last):
-    ...
-    ValueError: ('Invalid object reference...invalid-name...
-    >>> EntryPoint(name=None, group=None, value='invalid-name').extras
-    Traceback (most recent call last):
-    ...
-    ValueError: ('Invalid object reference...invalid-name...
-
-    The same thing happens on construction.
-
-    >>> EntryPoint(name=None, group=None, value='invalid-name')
-    Traceback (most recent call last):
-    ...
-    ValueError: ('Invalid object reference...invalid-name...
-
-    """
-
-    pattern = re.compile(
-        r'(?P[\w.]+)\s*'
-        r'(:\s*(?P[\w.]+)\s*)?'
-        r'((?P\[.*\])\s*)?$'
-    )
-    """
-    A regular expression describing the syntax for an entry point,
-    which might look like:
-
-        - module
-        - package.module
-        - package.module:attribute
-        - package.module:object.attribute
-        - package.module:attr [extra1, extra2]
-
-    Other combinations are possible as well.
-
-    The expression is lenient about whitespace around the ':',
-    following the attr, and following any extras.
-    """
-
-    name: str
-    value: str
-    group: str
-
-    dist: Distribution | None = None
-
-    def __init__(self, name: str, value: str, group: str) -> None:
-        vars(self).update(name=name, value=value, group=group)
-        self.module
-
-    def load(self) -> Any:
-        """Load the entry point from its definition. If only a module
-        is indicated by the value, return that module. Otherwise,
-        return the named object.
-        """
-        module = import_module(self.module)
-        attrs = filter(None, (self.attr or '').split('.'))
-        return functools.reduce(getattr, attrs, module)
-
-    @property
-    def module(self) -> str:
-        return self._match.module
-
-    @property
-    def attr(self) -> str:
-        return self._match.attr
-
-    @property
-    def extras(self) -> list[str]:
-        return re.findall(r'\w+', self._match.extras or '')
-
-    @functools.cached_property
-    def _match(self) -> _EntryPointMatch:
-        match = self.pattern.match(self.value)
-        if not match:
-            raise ValueError(
-                'Invalid object reference. '
-                'See https://packaging.python.org'
-                '/en/latest/specifications/entry-points/#data-model',
-                self.value,
-            )
-        return _EntryPointMatch(**match.groupdict())
-
-    def _for(self, dist):
-        vars(self).update(dist=dist)
-        return self
-
-    def matches(self, **params):
-        """
-        EntryPoint matches the given parameters.
-
-        >>> ep = EntryPoint(group='foo', name='bar', value='bing:bong [extra1, extra2]')
-        >>> ep.matches(group='foo')
-        True
-        >>> ep.matches(name='bar', value='bing:bong [extra1, extra2]')
-        True
-        >>> ep.matches(group='foo', name='other')
-        False
-        >>> ep.matches()
-        True
-        >>> ep.matches(extras=['extra1', 'extra2'])
-        True
-        >>> ep.matches(module='bing')
-        True
-        >>> ep.matches(attr='bong')
-        True
-        """
-        self._disallow_dist(params)
-        attrs = (getattr(self, param) for param in params)
-        return all(map(operator.eq, params.values(), attrs))
-
-    @staticmethod
-    def _disallow_dist(params):
-        """
-        Querying by dist is not allowed (dist objects are not comparable).
-        >>> EntryPoint(name='fan', value='fav', group='fag').matches(dist='foo')
-        Traceback (most recent call last):
-        ...
-        ValueError: "dist" is not suitable for matching...
-        """
-        if "dist" in params:
-            raise ValueError(
-                '"dist" is not suitable for matching. '
-                "Instead, use Distribution.entry_points.select() on a "
-                "located distribution."
-            )
-
-    def _key(self):
-        return self.name, self.value, self.group
-
-    def __lt__(self, other):
-        return self._key() < other._key()
-
-    def __eq__(self, other):
-        return self._key() == other._key()
-
-    def __setattr__(self, name, value):
-        raise AttributeError("EntryPoint objects are immutable.")
-
-    def __repr__(self):
-        return (
-            f'EntryPoint(name={self.name!r}, value={self.value!r}, '
-            f'group={self.group!r})'
-        )
-
-    def __hash__(self) -> int:
-        return hash(self._key())
-
-
-class EntryPoints(tuple):
-    """
-    An immutable collection of selectable EntryPoint objects.
-    """
-
-    __slots__ = ()
-
-    def __getitem__(self, name: str) -> EntryPoint:  # type: ignore[override] # Work with str instead of int
-        """
-        Get the EntryPoint in self matching name.
-        """
-        try:
-            return next(iter(self.select(name=name)))
-        except StopIteration:
-            raise KeyError(name)
-
-    def __repr__(self):
-        """
-        Repr with classname and tuple constructor to
-        signal that we deviate from regular tuple behavior.
-        """
-        return '%s(%r)' % (self.__class__.__name__, tuple(self))
-
-    def select(self, **params) -> EntryPoints:
-        """
-        Select entry points from self that match the
-        given parameters (typically group and/or name).
-        """
-        return EntryPoints(ep for ep in self if py39.ep_matches(ep, **params))
-
-    @property
-    def names(self) -> set[str]:
-        """
-        Return the set of all names of all entry points.
-        """
-        return {ep.name for ep in self}
-
-    @property
-    def groups(self) -> set[str]:
-        """
-        Return the set of all groups of all entry points.
-        """
-        return {ep.group for ep in self}
-
-    @classmethod
-    def _from_text_for(cls, text, dist):
-        return cls(ep._for(dist) for ep in cls._from_text(text))
-
-    @staticmethod
-    def _from_text(text):
-        return (
-            EntryPoint(name=item.value.name, value=item.value.value, group=item.name)
-            for item in Sectioned.section_pairs(text or '')
-        )
-
-
-class PackagePath(pathlib.PurePosixPath):
-    """A reference to a path in a package"""
-
-    hash: FileHash | None
-    size: int
-    dist: Distribution
-
-    def read_text(self, encoding: str = 'utf-8') -> str:
-        return self.locate().read_text(encoding=encoding)
-
-    def read_binary(self) -> bytes:
-        return self.locate().read_bytes()
-
-    def locate(self) -> SimplePath:
-        """Return a path-like object for this path"""
-        return self.dist.locate_file(self)
-
-
-class FileHash:
-    def __init__(self, spec: str) -> None:
-        self.mode, _, self.value = spec.partition('=')
-
-    def __repr__(self) -> str:
-        return f''
-
-
-class Distribution(metaclass=abc.ABCMeta):
-    """
-    An abstract Python distribution package.
-
-    Custom providers may derive from this class and define
-    the abstract methods to provide a concrete implementation
-    for their environment. Some providers may opt to override
-    the default implementation of some properties to bypass
-    the file-reading mechanism.
-    """
-
-    @abc.abstractmethod
-    def read_text(self, filename) -> str | None:
-        """Attempt to load metadata file given by the name.
-
-        Python distribution metadata is organized by blobs of text
-        typically represented as "files" in the metadata directory
-        (e.g. package-1.0.dist-info). These files include things
-        like:
-
-        - METADATA: The distribution metadata including fields
-          like Name and Version and Description.
-        - entry_points.txt: A series of entry points as defined in
-          `the entry points spec `_.
-        - RECORD: A record of files according to
-          `this recording spec `_.
-
-        A package may provide any set of files, including those
-        not listed here or none at all.
-
-        :param filename: The name of the file in the distribution info.
-        :return: The text if found, otherwise None.
-        """
-
-    @abc.abstractmethod
-    def locate_file(self, path: str | os.PathLike[str]) -> SimplePath:
-        """
-        Given a path to a file in this distribution, return a SimplePath
-        to it.
-
-        This method is used by callers of ``Distribution.files()`` to
-        locate files within the distribution. If it's possible for a
-        Distribution to represent files in the distribution as
-        ``SimplePath`` objects, it should implement this method
-        to resolve such objects.
-
-        Some Distribution providers may elect not to resolve SimplePath
-        objects within the distribution by raising a
-        NotImplementedError, but consumers of such a Distribution would
-        be unable to invoke ``Distribution.files()``.
-        """
-
-    @classmethod
-    def from_name(cls, name: str) -> Distribution:
-        """Return the Distribution for the given package name.
-
-        :param name: The name of the distribution package to search for.
-        :return: The Distribution instance (or subclass thereof) for the named
-            package, if found.
-        :raises PackageNotFoundError: When the named package's distribution
-            metadata cannot be found.
-        :raises ValueError: When an invalid value is supplied for name.
-        """
-        if not name:
-            raise ValueError("A distribution name is required.")
-        try:
-            return next(iter(cls._prefer_valid(cls.discover(name=name))))
-        except StopIteration:
-            raise PackageNotFoundError(name)
-
-    @classmethod
-    def discover(
-        cls, *, context: DistributionFinder.Context | None = None, **kwargs
-    ) -> Iterable[Distribution]:
-        """Return an iterable of Distribution objects for all packages.
-
-        Pass a ``context`` or pass keyword arguments for constructing
-        a context.
-
-        :context: A ``DistributionFinder.Context`` object.
-        :return: Iterable of Distribution objects for packages matching
-          the context.
-        """
-        if context and kwargs:
-            raise ValueError("cannot accept context and kwargs")
-        context = context or DistributionFinder.Context(**kwargs)
-        return itertools.chain.from_iterable(
-            resolver(context) for resolver in cls._discover_resolvers()
-        )
-
-    @staticmethod
-    def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]:
-        """
-        Prefer (move to the front) distributions that have metadata.
-
-        Ref python/importlib_resources#489.
-        """
-        buckets = bucket(dists, lambda dist: bool(dist.metadata))
-        return itertools.chain(buckets[True], buckets[False])
-
-    @staticmethod
-    def at(path: str | os.PathLike[str]) -> Distribution:
-        """Return a Distribution for the indicated metadata path.
-
-        :param path: a string or path-like object
-        :return: a concrete Distribution instance for the path
-        """
-        return PathDistribution(pathlib.Path(path))
-
-    @staticmethod
-    def _discover_resolvers():
-        """Search the meta_path for resolvers (MetadataPathFinders)."""
-        declared = (
-            getattr(finder, 'find_distributions', None) for finder in sys.meta_path
-        )
-        return filter(None, declared)
-
-    @property
-    def metadata(self) -> _meta.PackageMetadata | None:
-        """Return the parsed metadata for this Distribution.
-
-        The returned object will have keys that name the various bits of
-        metadata per the
-        `Core metadata specifications `_.
-
-        Custom providers may provide the METADATA file or override this
-        property.
-        """
-
-        text = (
-            self.read_text('METADATA')
-            or self.read_text('PKG-INFO')
-            # This last clause is here to support old egg-info files.  Its
-            # effect is to just end up using the PathDistribution's self._path
-            # (which points to the egg-info file) attribute unchanged.
-            or self.read_text('')
-        )
-        return self._assemble_message(text)
-
-    @staticmethod
-    @pass_none
-    def _assemble_message(text: str) -> _meta.PackageMetadata:
-        # deferred for performance (python/cpython#109829)
-        from . import _adapters
-
-        return _adapters.Message(email.message_from_string(text))
-
-    @property
-    def name(self) -> str:
-        """Return the 'Name' metadata for the distribution package."""
-        return md_none(self.metadata)['Name']
-
-    @property
-    def _normalized_name(self):
-        """Return a normalized version of the name."""
-        return Prepared.normalize(self.name)
-
-    @property
-    def version(self) -> str:
-        """Return the 'Version' metadata for the distribution package."""
-        return md_none(self.metadata)['Version']
-
-    @property
-    def entry_points(self) -> EntryPoints:
-        """
-        Return EntryPoints for this distribution.
-
-        Custom providers may provide the ``entry_points.txt`` file
-        or override this property.
-        """
-        return EntryPoints._from_text_for(self.read_text('entry_points.txt'), self)
-
-    @property
-    def files(self) -> list[PackagePath] | None:
-        """Files in this distribution.
-
-        :return: List of PackagePath for this distribution or None
-
-        Result is `None` if the metadata file that enumerates files
-        (i.e. RECORD for dist-info, or installed-files.txt or
-        SOURCES.txt for egg-info) is missing.
-        Result may be empty if the metadata exists but is empty.
-
-        Custom providers are recommended to provide a "RECORD" file (in
-        ``read_text``) or override this property to allow for callers to be
-        able to resolve filenames provided by the package.
-        """
-
-        def make_file(name, hash=None, size_str=None):
-            result = PackagePath(name)
-            result.hash = FileHash(hash) if hash else None
-            result.size = int(size_str) if size_str else None
-            result.dist = self
-            return result
-
-        @pass_none
-        def make_files(lines):
-            # Delay csv import, since Distribution.files is not as widely used
-            # as other parts of importlib.metadata
-            import csv
-
-            return starmap(make_file, csv.reader(lines))
-
-        @pass_none
-        def skip_missing_files(package_paths):
-            return list(filter(lambda path: path.locate().exists(), package_paths))
-
-        return skip_missing_files(
-            make_files(
-                self._read_files_distinfo()
-                or self._read_files_egginfo_installed()
-                or self._read_files_egginfo_sources()
-            )
-        )
-
-    def _read_files_distinfo(self):
-        """
-        Read the lines of RECORD.
-        """
-        text = self.read_text('RECORD')
-        return text and text.splitlines()
-
-    def _read_files_egginfo_installed(self):
-        """
-        Read installed-files.txt and return lines in a similar
-        CSV-parsable format as RECORD: each file must be placed
-        relative to the site-packages directory and must also be
-        quoted (since file names can contain literal commas).
-
-        This file is written when the package is installed by pip,
-        but it might not be written for other installation methods.
-        Assume the file is accurate if it exists.
-        """
-        text = self.read_text('installed-files.txt')
-        # Prepend the .egg-info/ subdir to the lines in this file.
-        # But this subdir is only available from PathDistribution's
-        # self._path.
-        subdir = getattr(self, '_path', None)
-        if not text or not subdir:
-            return
-
-        paths = (
-            py311
-            .relative_fix((subdir / name).resolve())
-            .relative_to(self.locate_file('').resolve(), walk_up=True)
-            .as_posix()
-            for name in text.splitlines()
-        )
-        return map('"{}"'.format, paths)
-
-    def _read_files_egginfo_sources(self):
-        """
-        Read SOURCES.txt and return lines in a similar CSV-parsable
-        format as RECORD: each file name must be quoted (since it
-        might contain literal commas).
-
-        Note that SOURCES.txt is not a reliable source for what
-        files are installed by a package. This file is generated
-        for a source archive, and the files that are present
-        there (e.g. setup.py) may not correctly reflect the files
-        that are present after the package has been installed.
-        """
-        text = self.read_text('SOURCES.txt')
-        return text and map('"{}"'.format, text.splitlines())
-
-    @property
-    def requires(self) -> list[str] | None:
-        """Generated requirements specified for this Distribution"""
-        reqs = self._read_dist_info_reqs() or self._read_egg_info_reqs()
-        return reqs and list(reqs)
-
-    def _read_dist_info_reqs(self):
-        return self.metadata.get_all('Requires-Dist')
-
-    def _read_egg_info_reqs(self):
-        source = self.read_text('requires.txt')
-        return pass_none(self._deps_from_requires_text)(source)
-
-    @classmethod
-    def _deps_from_requires_text(cls, source):
-        return cls._convert_egg_info_reqs_to_simple_reqs(Sectioned.read(source))
-
-    @staticmethod
-    def _convert_egg_info_reqs_to_simple_reqs(sections):
-        """
-        Historically, setuptools would solicit and store 'extra'
-        requirements, including those with environment markers,
-        in separate sections. More modern tools expect each
-        dependency to be defined separately, with any relevant
-        extras and environment markers attached directly to that
-        requirement. This method converts the former to the
-        latter. See _test_deps_from_requires_text for an example.
-        """
-
-        def make_condition(name):
-            return name and f'extra == "{name}"'
-
-        def quoted_marker(section):
-            section = section or ''
-            extra, sep, markers = section.partition(':')
-            if extra and markers:
-                markers = f'({markers})'
-            conditions = list(filter(None, [markers, make_condition(extra)]))
-            return '; ' + ' and '.join(conditions) if conditions else ''
-
-        def url_req_space(req):
-            """
-            PEP 508 requires a space between the url_spec and the quoted_marker.
-            Ref python/importlib_metadata#357.
-            """
-            # '@' is uniquely indicative of a url_req.
-            return ' ' * ('@' in req)
-
-        for section in sections:
-            space = url_req_space(section.value)
-            yield section.value + space + quoted_marker(section.name)
-
-    @property
-    def origin(self):
-        return self._load_json('direct_url.json')
-
-    def _load_json(self, filename):
-        # Deferred for performance (python/importlib_metadata#503)
-        import json
-
-        return pass_none(json.loads)(
-            self.read_text(filename),
-            object_hook=lambda data: types.SimpleNamespace(**data),
-        )
-
-
-class DistributionFinder(MetaPathFinder):
-    """
-    A MetaPathFinder capable of discovering installed distributions.
-
-    Custom providers should implement this interface in order to
-    supply metadata.
-    """
-
-    class Context:
-        """
-        Keyword arguments presented by the caller to
-        ``distributions()`` or ``Distribution.discover()``
-        to narrow the scope of a search for distributions
-        in all DistributionFinders.
-
-        Each DistributionFinder may expect any parameters
-        and should attempt to honor the canonical
-        parameters defined below when appropriate.
-
-        This mechanism gives a custom provider a means to
-        solicit additional details from the caller beyond
-        "name" and "path" when searching distributions.
-        For example, imagine a provider that exposes suites
-        of packages in either a "public" or "private" ``realm``.
-        A caller may wish to query only for distributions in
-        a particular realm and could call
-        ``distributions(realm="private")`` to signal to the
-        custom provider to only include distributions from that
-        realm.
-        """
-
-        name = None
-        """
-        Specific name for which a distribution finder should match.
-        A name of ``None`` matches all distributions.
-        """
-
-        def __init__(self, **kwargs):
-            vars(self).update(kwargs)
-
-        @property
-        def path(self) -> list[str]:
-            """
-            The sequence of directory path that a distribution finder
-            should search.
-
-            Typically refers to Python installed package paths such as
-            "site-packages" directories and defaults to ``sys.path``.
-            """
-            return vars(self).get('path', sys.path)
-
-    @abc.abstractmethod
-    def find_distributions(self, context=Context()) -> Iterable[Distribution]:
-        """
-        Find distributions.
-
-        Return an iterable of all Distribution instances capable of
-        loading the metadata for packages matching the ``context``,
-        a DistributionFinder.Context instance.
-        """
-
-
-@passthrough
-def _clear_after_fork(cached):
-    """Ensure ``func`` clears cached state after ``fork`` when supported.
-
-    ``FastPath`` caches zip-backed ``pathlib.Path`` objects that retain a
-    reference to the parent's open ``ZipFile`` handle. Re-using a cached
-    instance in a forked child can therefore resurrect invalid file pointers
-    and trigger ``BadZipFile``/``OSError`` failures (python/importlib_metadata#520).
-    Registering ``cache_clear`` with ``os.register_at_fork`` keeps each process
-    on its own cache.
-    """
-    getattr(os, 'register_at_fork', noop)(after_in_child=cached.cache_clear)
-
-
-class FastPath:
-    """
-    Micro-optimized class for searching a root for children.
-
-    Root is a path on the file system that may contain metadata
-    directories either as natural directories or within a zip file.
-
-    >>> FastPath('').children()
-    ['...']
-
-    FastPath objects are cached and recycled for any given root.
-
-    >>> FastPath('foobar') is FastPath('foobar')
-    True
-    """
-
-    @_clear_after_fork  # type: ignore[misc]
-    @functools.lru_cache()
-    def __new__(cls, root):
-        return super().__new__(cls)
-
-    def __init__(self, root):
-        self.root = root
-
-    def joinpath(self, child):
-        return pathlib.Path(self.root, child)
-
-    def children(self):
-        with suppress(Exception):
-            return os.listdir(self.root or '.')
-        with suppress(Exception):
-            return self.zip_children()
-        return []
-
-    def zip_children(self):
-        # deferred for performance (python/importlib_metadata#502)
-        from zipp.compat.overlay import zipfile
-
-        zip_path = zipfile.Path(self.root)
-        names = zip_path.root.namelist()
-        self.joinpath = zip_path.joinpath
-
-        return dict.fromkeys(child.split(posixpath.sep, 1)[0] for child in names)
-
-    def search(self, name):
-        return self.lookup(self.mtime).search(name)
-
-    @property
-    def mtime(self):
-        with suppress(OSError):
-            return os.stat(self.root).st_mtime
-        self.lookup.cache_clear()
-
-    @method_cache
-    def lookup(self, mtime):
-        return Lookup(self)
-
-
-class Lookup:
-    """
-    A micro-optimized class for searching a (fast) path for metadata.
-    """
-
-    def __init__(self, path: FastPath):
-        """
-        Calculate all of the children representing metadata.
-
-        From the children in the path, calculate early all of the
-        children that appear to represent metadata (infos) or legacy
-        metadata (eggs).
-        """
-
-        base = os.path.basename(path.root).lower()
-        base_is_egg = base.endswith(".egg")
-        self.infos = FreezableDefaultDict(list)
-        self.eggs = FreezableDefaultDict(list)
-
-        for child in path.children():
-            low = child.lower()
-            if low.endswith((".dist-info", ".egg-info")):
-                # rpartition is faster than splitext and suitable for this purpose.
-                name = low.rpartition(".")[0].partition("-")[0]
-                normalized = Prepared.normalize(name)
-                self.infos[normalized].append(path.joinpath(child))
-            elif base_is_egg and low == "egg-info":
-                name = base.rpartition(".")[0].partition("-")[0]
-                legacy_normalized = Prepared.legacy_normalize(name)
-                self.eggs[legacy_normalized].append(path.joinpath(child))
-
-        self.infos.freeze()
-        self.eggs.freeze()
-
-    def search(self, prepared: Prepared):
-        """
-        Yield all infos and eggs matching the Prepared query.
-        """
-        infos = (
-            self.infos[prepared.normalized]
-            if prepared
-            else itertools.chain.from_iterable(self.infos.values())
-        )
-        eggs = (
-            self.eggs[prepared.legacy_normalized]
-            if prepared
-            else itertools.chain.from_iterable(self.eggs.values())
-        )
-        return itertools.chain(infos, eggs)
-
-
-class Prepared:
-    """
-    A prepared search query for metadata on a possibly-named package.
-
-    Pre-calculates the normalization to prevent repeated operations.
-
-    >>> none = Prepared(None)
-    >>> none.normalized
-    >>> none.legacy_normalized
-    >>> bool(none)
-    False
-    >>> sample = Prepared('Sample__Pkg-name.foo')
-    >>> sample.normalized
-    'sample_pkg_name_foo'
-    >>> sample.legacy_normalized
-    'sample__pkg_name.foo'
-    >>> bool(sample)
-    True
-    """
-
-    normalized = None
-    legacy_normalized = None
-
-    def __init__(self, name: str | None):
-        self.name = name
-        if name is None:
-            return
-        self.normalized = self.normalize(name)
-        self.legacy_normalized = self.legacy_normalize(name)
-
-    @staticmethod
-    def normalize(name):
-        """
-        PEP 503 normalization plus dashes as underscores.
-        """
-        return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
-
-    @staticmethod
-    def legacy_normalize(name):
-        """
-        Normalize the package name as found in the convention in
-        older packaging tools versions and specs.
-        """
-        return name.lower().replace('-', '_')
-
-    def __bool__(self):
-        return bool(self.name)
-
-
-@install
-class MetadataPathFinder(NullFinder, DistributionFinder):
-    """A degenerate finder for distribution packages on the file system.
-
-    This finder supplies only a find_distributions() method for versions
-    of Python that do not have a PathFinder find_distributions().
-    """
-
-    @classmethod
-    def find_distributions(
-        cls, context=DistributionFinder.Context()
-    ) -> Iterable[PathDistribution]:
-        """
-        Find distributions.
-
-        Return an iterable of all Distribution instances capable of
-        loading the metadata for packages matching ``context.name``
-        (or all names if ``None`` indicated) along the paths in the list
-        of directories ``context.path``.
-        """
-        found = cls._search_paths(context.name, context.path)
-        return map(PathDistribution, found)
-
-    @classmethod
-    def _search_paths(cls, name, paths):
-        """Find metadata directories in paths heuristically."""
-        prepared = Prepared(name)
-        return itertools.chain.from_iterable(
-            path.search(prepared) for path in map(FastPath, paths)
-        )
-
-    @classmethod
-    def invalidate_caches(cls) -> None:
-        FastPath.__new__.cache_clear()
-
-
-class PathDistribution(Distribution):
-    def __init__(self, path: SimplePath) -> None:
-        """Construct a distribution.
-
-        :param path: SimplePath indicating the metadata directory.
-        """
-        self._path = path
-
-    def read_text(self, filename: str | os.PathLike[str]) -> str | None:
-        with suppress(
-            FileNotFoundError,
-            IsADirectoryError,
-            KeyError,
-            NotADirectoryError,
-            PermissionError,
-        ):
-            return self._path.joinpath(filename).read_text(encoding='utf-8')
-
-        return None
-
-    read_text.__doc__ = Distribution.read_text.__doc__
-
-    def locate_file(self, path: str | os.PathLike[str]) -> SimplePath:
-        return self._path.parent / path
-
-    @property
-    def _normalized_name(self):
-        """
-        Performance optimization: where possible, resolve the
-        normalized name from the file system path.
-        """
-        stem = os.path.basename(str(self._path))
-        return (
-            pass_none(Prepared.normalize)(self._name_from_stem(stem))
-            or super()._normalized_name
-        )
-
-    @staticmethod
-    def _name_from_stem(stem):
-        """
-        >>> PathDistribution._name_from_stem('foo-3.0.egg-info')
-        'foo'
-        >>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info')
-        'CherryPy'
-        >>> PathDistribution._name_from_stem('face.egg-info')
-        'face'
-        >>> PathDistribution._name_from_stem('foo.bar')
-        """
-        filename, ext = os.path.splitext(stem)
-        if ext not in ('.dist-info', '.egg-info'):
-            return
-        name, sep, rest = filename.partition('-')
-        return name
-
-
-def distribution(distribution_name: str) -> Distribution:
-    """Get the ``Distribution`` instance for the named package.
-
-    :param distribution_name: The name of the distribution package as a string.
-    :return: A ``Distribution`` instance (or subclass thereof).
-    """
-    return Distribution.from_name(distribution_name)
-
-
-def distributions(**kwargs) -> Iterable[Distribution]:
-    """Get all ``Distribution`` instances in the current environment.
-
-    :return: An iterable of ``Distribution`` instances.
-    """
-    return Distribution.discover(**kwargs)
-
-
-def metadata(distribution_name: str) -> _meta.PackageMetadata | None:
-    """Get the metadata for the named package.
-
-    :param distribution_name: The name of the distribution package to query.
-    :return: A PackageMetadata containing the parsed metadata.
-    """
-    return Distribution.from_name(distribution_name).metadata
-
-
-def version(distribution_name: str) -> str:
-    """Get the version string for the named package.
-
-    :param distribution_name: The name of the distribution package to query.
-    :return: The version string for the package as defined in the package's
-        "Version" metadata key.
-    """
-    return distribution(distribution_name).version
-
-
-_unique = functools.partial(
-    unique_everseen,
-    key=py39.normalized_name,
-)
-"""
-Wrapper for ``distributions`` to return unique distributions by name.
-"""
-
-
-def entry_points(**params) -> EntryPoints:
-    """Return EntryPoint objects for all installed packages.
-
-    Pass selection parameters (group or name) to filter the
-    result to entry points matching those properties (see
-    EntryPoints.select()).
-
-    :return: EntryPoints for all installed packages.
-    """
-    eps = itertools.chain.from_iterable(
-        dist.entry_points for dist in _unique(distributions())
-    )
-    return EntryPoints(eps).select(**params)
-
-
-def files(distribution_name: str) -> list[PackagePath] | None:
-    """Return a list of files for the named package.
-
-    :param distribution_name: The name of the distribution package to query.
-    :return: List of files composing the distribution.
-    """
-    return distribution(distribution_name).files
-
-
-def requires(distribution_name: str) -> list[str] | None:
-    """
-    Return a list of requirements for the named package.
-
-    :return: An iterable of requirements, suitable for
-        packaging.requirement.Requirement.
-    """
-    return distribution(distribution_name).requires
-
-
-def packages_distributions() -> Mapping[str, list[str]]:
-    """
-    Return a mapping of top-level packages to their
-    distributions.
-
-    >>> import collections.abc
-    >>> pkgs = packages_distributions()
-    >>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values())
-    True
-    """
-    pkg_to_dist = collections.defaultdict(list)
-    for dist in distributions():
-        for pkg in _top_level_declared(dist) or _top_level_inferred(dist):
-            pkg_to_dist[pkg].append(md_none(dist.metadata)['Name'])
-    return dict(pkg_to_dist)
-
-
-def _top_level_declared(dist):
-    return (dist.read_text('top_level.txt') or '').split()
-
-
-def _topmost(name: PackagePath) -> str | None:
-    """
-    Return the top-most parent as long as there is a parent.
-    """
-    top, *rest = name.parts
-    return top if rest else None
-
-
-def _get_toplevel_name(name: PackagePath) -> str:
-    """
-    Infer a possibly importable module name from a name presumed on
-    sys.path.
-
-    >>> _get_toplevel_name(PackagePath('foo.py'))
-    'foo'
-    >>> _get_toplevel_name(PackagePath('foo'))
-    'foo'
-    >>> _get_toplevel_name(PackagePath('foo.pyc'))
-    'foo'
-    >>> _get_toplevel_name(PackagePath('foo/__init__.py'))
-    'foo'
-    >>> _get_toplevel_name(PackagePath('foo.pth'))
-    'foo.pth'
-    >>> _get_toplevel_name(PackagePath('foo.dist-info'))
-    'foo.dist-info'
-    """
-    # Defer import of inspect for performance (python/cpython#118761)
-    import inspect
-
-    return _topmost(name) or inspect.getmodulename(name) or str(name)
-
-
-def _top_level_inferred(dist):
-    opt_names = set(map(_get_toplevel_name, always_iterable(dist.files)))
-
-    def importable_name(name):
-        return '.' not in name
-
-    return filter(importable_name, opt_names)
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_adapters.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/_adapters.py
deleted file mode 100644
index dede395..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_adapters.py
+++ /dev/null
@@ -1,136 +0,0 @@
-import email.message
-import email.policy
-import re
-import textwrap
-
-from ._text import FoldedCase
-
-
-class RawPolicy(email.policy.EmailPolicy):
-    def fold(self, name, value):
-        folded = self.linesep.join(
-            textwrap
-            .indent(value, prefix=' ' * 8, predicate=lambda line: True)
-            .lstrip()
-            .splitlines()
-        )
-        return f'{name}: {folded}{self.linesep}'
-
-
-class Message(email.message.Message):
-    r"""
-    Specialized Message subclass to handle metadata naturally.
-
-    Reads values that may have newlines in them and converts the
-    payload to the Description.
-
-    >>> msg_text = textwrap.dedent('''
-    ...     Name: Foo
-    ...     Version: 3.0
-    ...     License: blah
-    ...             de-blah
-    ...     
-    ...     First line of description.
-    ...     Second line of description.
-    ...     
-    ...     Fourth line!
-    ...     ''').lstrip().replace('', '')
-    >>> msg = Message(email.message_from_string(msg_text))
-    >>> msg['Description']
-    'First line of description.\nSecond line of description.\n\nFourth line!\n'
-
-    Message should render even if values contain newlines.
-
-    >>> print(msg)
-    Name: Foo
-    Version: 3.0
-    License: blah
-            de-blah
-    Description: First line of description.
-            Second line of description.
-    
-            Fourth line!
-    
-    
-    """
-
-    multiple_use_keys = set(
-        map(
-            FoldedCase,
-            [
-                'Classifier',
-                'Obsoletes-Dist',
-                'Platform',
-                'Project-URL',
-                'Provides-Dist',
-                'Provides-Extra',
-                'Requires-Dist',
-                'Requires-External',
-                'Supported-Platform',
-                'Dynamic',
-            ],
-        )
-    )
-    """
-    Keys that may be indicated multiple times per PEP 566.
-    """
-
-    def __new__(cls, orig: email.message.Message):
-        res = super().__new__(cls)
-        vars(res).update(vars(orig))
-        return res
-
-    def __init__(self, *args, **kwargs):
-        self._headers = self._repair_headers()
-
-    # suppress spurious error from mypy
-    def __iter__(self):
-        return super().__iter__()
-
-    def __getitem__(self, item):
-        """
-        Override parent behavior to typical dict behavior.
-
-        ``email.message.Message`` will emit None values for missing
-        keys. Typical mappings, including this ``Message``, will raise
-        a key error for missing keys.
-
-        Ref python/importlib_metadata#371.
-        """
-        res = super().__getitem__(item)
-        if res is None:
-            raise KeyError(item)
-        return res
-
-    def _repair_headers(self):
-        def redent(value):
-            "Correct for RFC822 indentation"
-            indent = ' ' * 8
-            if not value or '\n' + indent not in value:
-                return value
-            return textwrap.dedent(indent + value)
-
-        headers = [(key, redent(value)) for key, value in vars(self)['_headers']]
-        if self._payload:
-            headers.append(('Description', self.get_payload()))
-            self.set_payload('')
-        return headers
-
-    def as_string(self):
-        return super().as_string(policy=RawPolicy())
-
-    @property
-    def json(self):
-        """
-        Convert PackageMetadata to a JSON-compatible format
-        per PEP 0566.
-        """
-
-        def transform(key):
-            value = self.get_all(key) if key in self.multiple_use_keys else self[key]
-            if key == 'Keywords':
-                value = re.split(r'\s+', value)
-            tk = key.lower().replace('-', '_')
-            return tk, value
-
-        return dict(map(transform, map(FoldedCase, self)))
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_collections.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/_collections.py
deleted file mode 100644
index fc5045d..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_collections.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import collections
-import typing
-
-
-# from jaraco.collections 3.3
-class FreezableDefaultDict(collections.defaultdict):
-    """
-    Often it is desirable to prevent the mutation of
-    a default dict after its initial construction, such
-    as to prevent mutation during iteration.
-
-    >>> dd = FreezableDefaultDict(list)
-    >>> dd[0].append('1')
-    >>> dd.freeze()
-    >>> dd[1]
-    []
-    >>> len(dd)
-    1
-    """
-
-    def __missing__(self, key):
-        return getattr(self, '_frozen', super().__missing__)(key)
-
-    def freeze(self):
-        self._frozen = lambda key: self.default_factory()
-
-
-class Pair(typing.NamedTuple):
-    name: str
-    value: str
-
-    @classmethod
-    def parse(cls, text):
-        return cls(*map(str.strip, text.split("=", 1)))
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_compat.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/_compat.py
deleted file mode 100644
index 01356d6..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_compat.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import platform
-import sys
-
-__all__ = ['install', 'NullFinder']
-
-
-def install(cls):
-    """
-    Class decorator for installation on sys.meta_path.
-
-    Adds the backport DistributionFinder to sys.meta_path and
-    attempts to disable the finder functionality of the stdlib
-    DistributionFinder.
-    """
-    sys.meta_path.append(cls())
-    disable_stdlib_finder()
-    return cls
-
-
-def disable_stdlib_finder():
-    """
-    Give the backport primacy for discovering path-based distributions
-    by monkey-patching the stdlib O_O.
-
-    See #91 for more background for rationale on this sketchy
-    behavior.
-    """
-
-    def matches(finder):
-        return getattr(
-            finder, '__module__', None
-        ) == '_frozen_importlib_external' and hasattr(finder, 'find_distributions')
-
-    for finder in filter(matches, sys.meta_path):  # pragma: nocover
-        del finder.find_distributions
-
-
-class NullFinder:
-    """
-    A "Finder" (aka "MetaPathFinder") that never finds any modules,
-    but may find distributions.
-    """
-
-    @staticmethod
-    def find_spec(*args, **kwargs):
-        return None
-
-
-def pypy_partial(val):
-    """
-    Adjust for variable stacklevel on partial under PyPy.
-
-    Workaround for #327.
-    """
-    is_pypy = platform.python_implementation() == 'PyPy'
-    return val + is_pypy
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_functools.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/_functools.py
deleted file mode 100644
index b1fd04a..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_functools.py
+++ /dev/null
@@ -1,135 +0,0 @@
-import functools
-import types
-from typing import Callable, TypeVar
-
-
-# from jaraco.functools 3.3
-def method_cache(method, cache_wrapper=None):
-    """
-    Wrap lru_cache to support storing the cache data in the object instances.
-
-    Abstracts the common paradigm where the method explicitly saves an
-    underscore-prefixed protected property on first call and returns that
-    subsequently.
-
-    >>> class MyClass:
-    ...     calls = 0
-    ...
-    ...     @method_cache
-    ...     def method(self, value):
-    ...         self.calls += 1
-    ...         return value
-
-    >>> a = MyClass()
-    >>> a.method(3)
-    3
-    >>> for x in range(75):
-    ...     res = a.method(x)
-    >>> a.calls
-    75
-
-    Note that the apparent behavior will be exactly like that of lru_cache
-    except that the cache is stored on each instance, so values in one
-    instance will not flush values from another, and when an instance is
-    deleted, so are the cached values for that instance.
-
-    >>> b = MyClass()
-    >>> for x in range(35):
-    ...     res = b.method(x)
-    >>> b.calls
-    35
-    >>> a.method(0)
-    0
-    >>> a.calls
-    75
-
-    Note that if method had been decorated with ``functools.lru_cache()``,
-    a.calls would have been 76 (due to the cached value of 0 having been
-    flushed by the 'b' instance).
-
-    Clear the cache with ``.cache_clear()``
-
-    >>> a.method.cache_clear()
-
-    Same for a method that hasn't yet been called.
-
-    >>> c = MyClass()
-    >>> c.method.cache_clear()
-
-    Another cache wrapper may be supplied:
-
-    >>> cache = functools.lru_cache(maxsize=2)
-    >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
-    >>> a = MyClass()
-    >>> a.method2()
-    3
-
-    Caution - do not subsequently wrap the method with another decorator, such
-    as ``@property``, which changes the semantics of the function.
-
-    See also
-    http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
-    for another implementation and additional justification.
-    """
-    cache_wrapper = cache_wrapper or functools.lru_cache()
-
-    def wrapper(self, *args, **kwargs):
-        # it's the first call, replace the method with a cached, bound method
-        bound_method = types.MethodType(method, self)
-        cached_method = cache_wrapper(bound_method)
-        setattr(self, method.__name__, cached_method)
-        return cached_method(*args, **kwargs)
-
-    # Support cache clear even before cache has been created.
-    wrapper.cache_clear = lambda: None
-
-    return wrapper
-
-
-# From jaraco.functools 3.3
-def pass_none(func):
-    """
-    Wrap func so it's not called if its first param is None
-
-    >>> print_text = pass_none(print)
-    >>> print_text('text')
-    text
-    >>> print_text(None)
-    """
-
-    @functools.wraps(func)
-    def wrapper(param, *args, **kwargs):
-        if param is not None:
-            return func(param, *args, **kwargs)
-
-    return wrapper
-
-
-# From jaraco.functools 4.4
-def noop(*args, **kwargs):
-    """
-    A no-operation function that does nothing.
-
-    >>> noop(1, 2, three=3)
-    """
-
-
-_T = TypeVar('_T')
-
-
-# From jaraco.functools 4.4
-def passthrough(func: Callable[..., object]) -> Callable[[_T], _T]:
-    """
-    Wrap the function to always return the first parameter.
-
-    >>> passthrough(print)('3')
-    3
-    '3'
-    """
-
-    @functools.wraps(func)
-    def wrapper(first: _T, *args, **kwargs) -> _T:
-        func(first, *args, **kwargs)
-        return first
-
-    return wrapper  # type: ignore[return-value]
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_itertools.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/_itertools.py
deleted file mode 100644
index 79d3719..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_itertools.py
+++ /dev/null
@@ -1,171 +0,0 @@
-from collections import defaultdict, deque
-from itertools import filterfalse
-
-
-def unique_everseen(iterable, key=None):
-    "List unique elements, preserving order. Remember all elements ever seen."
-    # unique_everseen('AAAABBBCCDAABBB') --> A B C D
-    # unique_everseen('ABBCcAD', str.lower) --> A B C D
-    seen = set()
-    seen_add = seen.add
-    if key is None:
-        for element in filterfalse(seen.__contains__, iterable):
-            seen_add(element)
-            yield element
-    else:
-        for element in iterable:
-            k = key(element)
-            if k not in seen:
-                seen_add(k)
-                yield element
-
-
-# copied from more_itertools 8.8
-def always_iterable(obj, base_type=(str, bytes)):
-    """If *obj* is iterable, return an iterator over its items::
-
-        >>> obj = (1, 2, 3)
-        >>> list(always_iterable(obj))
-        [1, 2, 3]
-
-    If *obj* is not iterable, return a one-item iterable containing *obj*::
-
-        >>> obj = 1
-        >>> list(always_iterable(obj))
-        [1]
-
-    If *obj* is ``None``, return an empty iterable:
-
-        >>> obj = None
-        >>> list(always_iterable(None))
-        []
-
-    By default, binary and text strings are not considered iterable::
-
-        >>> obj = 'foo'
-        >>> list(always_iterable(obj))
-        ['foo']
-
-    If *base_type* is set, objects for which ``isinstance(obj, base_type)``
-    returns ``True`` won't be considered iterable.
-
-        >>> obj = {'a': 1}
-        >>> list(always_iterable(obj))  # Iterate over the dict's keys
-        ['a']
-        >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
-        [{'a': 1}]
-
-    Set *base_type* to ``None`` to avoid any special handling and treat objects
-    Python considers iterable as iterable:
-
-        >>> obj = 'foo'
-        >>> list(always_iterable(obj, base_type=None))
-        ['f', 'o', 'o']
-    """
-    if obj is None:
-        return iter(())
-
-    if (base_type is not None) and isinstance(obj, base_type):
-        return iter((obj,))
-
-    try:
-        return iter(obj)
-    except TypeError:
-        return iter((obj,))
-
-
-# Copied from more_itertools 10.3
-class bucket:
-    """Wrap *iterable* and return an object that buckets the iterable into
-    child iterables based on a *key* function.
-
-        >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
-        >>> s = bucket(iterable, key=lambda x: x[0])  # Bucket by 1st character
-        >>> sorted(list(s))  # Get the keys
-        ['a', 'b', 'c']
-        >>> a_iterable = s['a']
-        >>> next(a_iterable)
-        'a1'
-        >>> next(a_iterable)
-        'a2'
-        >>> list(s['b'])
-        ['b1', 'b2', 'b3']
-
-    The original iterable will be advanced and its items will be cached until
-    they are used by the child iterables. This may require significant storage.
-
-    By default, attempting to select a bucket to which no items belong  will
-    exhaust the iterable and cache all values.
-    If you specify a *validator* function, selected buckets will instead be
-    checked against it.
-
-        >>> from itertools import count
-        >>> it = count(1, 2)  # Infinite sequence of odd numbers
-        >>> key = lambda x: x % 10  # Bucket by last digit
-        >>> validator = lambda x: x in {1, 3, 5, 7, 9}  # Odd digits only
-        >>> s = bucket(it, key=key, validator=validator)
-        >>> 2 in s
-        False
-        >>> list(s[2])
-        []
-
-    """
-
-    def __init__(self, iterable, key, validator=None):
-        self._it = iter(iterable)
-        self._key = key
-        self._cache = defaultdict(deque)
-        self._validator = validator or (lambda x: True)
-
-    def __contains__(self, value):
-        if not self._validator(value):
-            return False
-
-        try:
-            item = next(self[value])
-        except StopIteration:
-            return False
-        else:
-            self._cache[value].appendleft(item)
-
-        return True
-
-    def _get_values(self, value):
-        """
-        Helper to yield items from the parent iterator that match *value*.
-        Items that don't match are stored in the local cache as they
-        are encountered.
-        """
-        while True:
-            # If we've cached some items that match the target value, emit
-            # the first one and evict it from the cache.
-            if self._cache[value]:
-                yield self._cache[value].popleft()
-            # Otherwise we need to advance the parent iterator to search for
-            # a matching item, caching the rest.
-            else:
-                while True:
-                    try:
-                        item = next(self._it)
-                    except StopIteration:
-                        return
-                    item_value = self._key(item)
-                    if item_value == value:
-                        yield item
-                        break
-                    elif self._validator(item_value):
-                        self._cache[item_value].append(item)
-
-    def __iter__(self):
-        for item in self._it:
-            item_value = self._key(item)
-            if self._validator(item_value):
-                self._cache[item_value].append(item)
-
-        yield from self._cache.keys()
-
-    def __getitem__(self, value):
-        if not self._validator(value):
-            return iter(())
-
-        return self._get_values(value)
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_meta.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/_meta.py
deleted file mode 100644
index 0c20eff..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_meta.py
+++ /dev/null
@@ -1,71 +0,0 @@
-from __future__ import annotations
-
-import os
-from collections.abc import Iterator
-from typing import (
-    Any,
-    Protocol,
-    TypeVar,
-    overload,
-)
-
-_T = TypeVar("_T")
-
-
-class PackageMetadata(Protocol):
-    def __len__(self) -> int: ...  # pragma: no cover
-
-    def __contains__(self, item: str) -> bool: ...  # pragma: no cover
-
-    def __getitem__(self, key: str) -> str: ...  # pragma: no cover
-
-    def __iter__(self) -> Iterator[str]: ...  # pragma: no cover
-
-    @overload
-    def get(
-        self, name: str, failobj: None = None
-    ) -> str | None: ...  # pragma: no cover
-
-    @overload
-    def get(self, name: str, failobj: _T) -> str | _T: ...  # pragma: no cover
-
-    # overload per python/importlib_metadata#435
-    @overload
-    def get_all(
-        self, name: str, failobj: None = None
-    ) -> list[Any] | None: ...  # pragma: no cover
-
-    @overload
-    def get_all(self, name: str, failobj: _T) -> list[Any] | _T:
-        """
-        Return all values associated with a possibly multi-valued key.
-        """
-
-    @property
-    def json(self) -> dict[str, str | list[str]]:
-        """
-        A JSON-compatible form of the metadata.
-        """
-
-
-class SimplePath(Protocol):
-    """
-    A minimal subset of pathlib.Path required by Distribution.
-    """
-
-    def joinpath(
-        self, other: str | os.PathLike[str]
-    ) -> SimplePath: ...  # pragma: no cover
-
-    def __truediv__(
-        self, other: str | os.PathLike[str]
-    ) -> SimplePath: ...  # pragma: no cover
-
-    @property
-    def parent(self) -> SimplePath: ...  # pragma: no cover
-
-    def read_text(self, encoding=None) -> str: ...  # pragma: no cover
-
-    def read_bytes(self) -> bytes: ...  # pragma: no cover
-
-    def exists(self) -> bool: ...  # pragma: no cover
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_text.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/_text.py
deleted file mode 100644
index c88cfbb..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_text.py
+++ /dev/null
@@ -1,99 +0,0 @@
-import re
-
-from ._functools import method_cache
-
-
-# from jaraco.text 3.5
-class FoldedCase(str):
-    """
-    A case insensitive string class; behaves just like str
-    except compares equal when the only variation is case.
-
-    >>> s = FoldedCase('hello world')
-
-    >>> s == 'Hello World'
-    True
-
-    >>> 'Hello World' == s
-    True
-
-    >>> s != 'Hello World'
-    False
-
-    >>> s.index('O')
-    4
-
-    >>> s.split('O')
-    ['hell', ' w', 'rld']
-
-    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
-    ['alpha', 'Beta', 'GAMMA']
-
-    Sequence membership is straightforward.
-
-    >>> "Hello World" in [s]
-    True
-    >>> s in ["Hello World"]
-    True
-
-    You may test for set inclusion, but candidate and elements
-    must both be folded.
-
-    >>> FoldedCase("Hello World") in {s}
-    True
-    >>> s in {FoldedCase("Hello World")}
-    True
-
-    String inclusion works as long as the FoldedCase object
-    is on the right.
-
-    >>> "hello" in FoldedCase("Hello World")
-    True
-
-    But not if the FoldedCase object is on the left:
-
-    >>> FoldedCase('hello') in 'Hello World'
-    False
-
-    In that case, use in_:
-
-    >>> FoldedCase('hello').in_('Hello World')
-    True
-
-    >>> FoldedCase('hello') > FoldedCase('Hello')
-    False
-    """
-
-    def __lt__(self, other):
-        return self.lower() < other.lower()
-
-    def __gt__(self, other):
-        return self.lower() > other.lower()
-
-    def __eq__(self, other):
-        return self.lower() == other.lower()
-
-    def __ne__(self, other):
-        return self.lower() != other.lower()
-
-    def __hash__(self):
-        return hash(self.lower())
-
-    def __contains__(self, other):
-        return super().lower().__contains__(other.lower())
-
-    def in_(self, other):
-        "Does self appear in other?"
-        return self in FoldedCase(other)
-
-    # cache lower since it's likely to be called frequently.
-    @method_cache
-    def lower(self):
-        return super().lower()
-
-    def index(self, sub):
-        return self.lower().index(sub.lower())
-
-    def split(self, splitter=' ', maxsplit=0):
-        pattern = re.compile(re.escape(splitter), re.I)
-        return pattern.split(self, maxsplit)
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_typing.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/_typing.py
deleted file mode 100644
index 32b1d2b..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/_typing.py
+++ /dev/null
@@ -1,15 +0,0 @@
-import functools
-import typing
-
-from ._meta import PackageMetadata
-
-md_none = functools.partial(typing.cast, PackageMetadata)
-"""
-Suppress type errors for optional metadata.
-
-Although Distribution.metadata can return None when metadata is corrupt
-and thus None, allow callers to assume it's not None and crash if
-that's the case.
-
-# python/importlib_metadata#493
-"""
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/compat/__init__.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/compat/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/compat/py311.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/compat/py311.py
deleted file mode 100644
index 3a53274..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/compat/py311.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import os
-import pathlib
-import sys
-import types
-
-
-def wrap(path):  # pragma: no cover
-    """
-    Workaround for https://github.com/python/cpython/issues/84538
-    to add backward compatibility for walk_up=True.
-    An example affected package is dask-labextension, which uses
-    jupyter-packaging to install JupyterLab javascript files outside
-    of site-packages.
-    """
-
-    def relative_to(root, *, walk_up=False):
-        return pathlib.Path(os.path.relpath(path, root))
-
-    return types.SimpleNamespace(relative_to=relative_to)
-
-
-relative_fix = wrap if sys.version_info < (3, 12) else lambda x: x
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/compat/py39.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/compat/py39.py
deleted file mode 100644
index 3eb9c01..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/compat/py39.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-Compatibility layer with Python 3.8/3.9
-"""
-
-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Any
-
-if TYPE_CHECKING:  # pragma: no cover
-    # Prevent circular imports on runtime.
-    from .. import Distribution, EntryPoint
-else:
-    Distribution = EntryPoint = Any
-
-from .._typing import md_none
-
-
-def normalized_name(dist: Distribution) -> str | None:
-    """
-    Honor name normalization for distributions that don't provide ``_normalized_name``.
-    """
-    try:
-        return dist._normalized_name
-    except AttributeError:
-        from .. import Prepared  # -> delay to prevent circular imports.
-
-        return Prepared.normalize(
-            getattr(dist, "name", None) or md_none(dist.metadata)['Name']
-        )
-
-
-def ep_matches(ep: EntryPoint, **params) -> bool:
-    """
-    Workaround for ``EntryPoint`` objects without the ``matches`` method.
-    """
-    try:
-        return ep.matches(**params)
-    except AttributeError:
-        from .. import EntryPoint  # -> delay to prevent circular imports.
-
-        # Reconstruct the EntryPoint object to make sure it is compatible.
-        return EntryPoint(ep.name, ep.value, ep.group).matches(**params)
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/diagnose.py b/voxvera/vendor/setuptools/_vendor/importlib_metadata/diagnose.py
deleted file mode 100644
index e405471..0000000
--- a/voxvera/vendor/setuptools/_vendor/importlib_metadata/diagnose.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import sys
-
-from . import Distribution
-
-
-def inspect(path):
-    print("Inspecting", path)
-    dists = list(Distribution.discover(path=[path]))
-    if not dists:
-        return
-    print("Found", len(dists), "packages:", end=' ')
-    print(', '.join(dist.name for dist in dists))
-
-
-def run():
-    for path in sys.path:
-        inspect(path)
-
-
-if __name__ == '__main__':
-    run()
diff --git a/voxvera/vendor/setuptools/_vendor/importlib_metadata/py.typed b/voxvera/vendor/setuptools/_vendor/importlib_metadata/py.typed
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/INSTALLER
deleted file mode 100644
index 5c69047..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-uv
\ No newline at end of file
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/LICENSE b/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/LICENSE
deleted file mode 100644
index 1bb5a44..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/LICENSE
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/METADATA
deleted file mode 100644
index 797b9da..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/METADATA
+++ /dev/null
@@ -1,96 +0,0 @@
-Metadata-Version: 2.1
-Name: jaraco.text
-Version: 4.0.0
-Summary: Module for text manipulation
-Author-email: "Jason R. Coombs" 
-Project-URL: Source, https://github.com/jaraco/jaraco.text
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3 :: Only
-Requires-Python: >=3.8
-Description-Content-Type: text/x-rst
-License-File: LICENSE
-Requires-Dist: jaraco.functools
-Requires-Dist: jaraco.context >=4.1
-Requires-Dist: autocommand
-Requires-Dist: more-itertools
-Requires-Dist: importlib-resources ; python_version < "3.9"
-Provides-Extra: doc
-Requires-Dist: sphinx >=3.5 ; extra == 'doc'
-Requires-Dist: jaraco.packaging >=9.3 ; extra == 'doc'
-Requires-Dist: rst.linker >=1.9 ; extra == 'doc'
-Requires-Dist: furo ; extra == 'doc'
-Requires-Dist: sphinx-lint ; extra == 'doc'
-Requires-Dist: jaraco.tidelift >=1.4 ; extra == 'doc'
-Provides-Extra: inflect
-Requires-Dist: inflect ; extra == 'inflect'
-Provides-Extra: test
-Requires-Dist: pytest !=8.1.*,>=6 ; extra == 'test'
-Requires-Dist: pytest-checkdocs >=2.4 ; extra == 'test'
-Requires-Dist: pytest-cov ; extra == 'test'
-Requires-Dist: pytest-mypy ; extra == 'test'
-Requires-Dist: pytest-enabler >=2.2 ; extra == 'test'
-Requires-Dist: pathlib2 ; (python_version < "3.10") and extra == 'test'
-Requires-Dist: pytest-ruff >=0.2.1 ; (sys_platform != "cygwin") and extra == 'test'
-
-.. image:: https://img.shields.io/pypi/v/jaraco.text.svg
-   :target: https://pypi.org/project/jaraco.text
-
-.. image:: https://img.shields.io/pypi/pyversions/jaraco.text.svg
-
-.. image:: https://github.com/jaraco/jaraco.text/actions/workflows/main.yml/badge.svg
-   :target: https://github.com/jaraco/jaraco.text/actions?query=workflow%3A%22tests%22
-   :alt: tests
-
-.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
-    :target: https://github.com/astral-sh/ruff
-    :alt: Ruff
-
-.. image:: https://readthedocs.org/projects/jaracotext/badge/?version=latest
-   :target: https://jaracotext.readthedocs.io/en/latest/?badge=latest
-
-.. image:: https://img.shields.io/badge/skeleton-2024-informational
-   :target: https://blog.jaraco.com/skeleton
-
-.. image:: https://tidelift.com/badges/package/pypi/jaraco.text
-   :target: https://tidelift.com/subscription/pkg/pypi-jaraco.text?utm_source=pypi-jaraco.text&utm_medium=readme
-
-
-This package provides handy routines for dealing with text, such as
-wrapping, substitution, trimming, stripping, prefix and suffix removal,
-line continuation, indentation, comment processing, identifier processing,
-values parsing, case insensitive comparison, and more. See the docs
-(linked in the badge above) for the detailed documentation and examples.
-
-Layouts
-=======
-
-One of the features of this package is the layouts module, which
-provides a simple example of translating keystrokes from one keyboard
-layout to another::
-
-    echo qwerty | python -m jaraco.text.to-dvorak
-    ',.pyf
-    echo  "',.pyf" | python -m jaraco.text.to-qwerty
-    qwerty
-
-Newline Reporting
-=================
-
-Need to know what newlines appear in a file?
-
-::
-
-    $ python -m jaraco.text.show-newlines README.rst
-    newline is '\n'
-
-For Enterprise
-==============
-
-Available as part of the Tidelift Subscription.
-
-This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.
-
-`Learn more `_.
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/RECORD
deleted file mode 100644
index af65a9d..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/RECORD
+++ /dev/null
@@ -1,14 +0,0 @@
-jaraco.text-4.0.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-jaraco.text-4.0.0.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
-jaraco.text-4.0.0.dist-info/METADATA,sha256=XC_QkBLJVPE5sQYkl41TNaZUw0AUzQb29GbKaD28nFY,3731
-jaraco.text-4.0.0.dist-info/RECORD,,
-jaraco.text-4.0.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-jaraco.text-4.0.0.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
-jaraco.text-4.0.0.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7
-jaraco/text/Lorem ipsum.txt,sha256=N_7c_79zxOufBY9HZ3yzMgOkNv-TkOTTio4BydrSjgs,1335
-jaraco/text/__init__.py,sha256=lazNYXo8IhOR1bFigLAyGiiQao6jtO3KGWh8bZZPx3c,16762
-jaraco/text/layouts.py,sha256=HTC8aSTLZ7uXipyOXapRMC158juecjK6RVwitfmZ9_w,643
-jaraco/text/show-newlines.py,sha256=jT0vp4gLhG20hX2lTB-zKo_i3NgKzj79yRAdz4eMzIM,903
-jaraco/text/strip-prefix.py,sha256=NfVXV8JVNo6nqcuYASfMV7_y4Eo8zMQqlCOGvAnRIVw,412
-jaraco/text/to-dvorak.py,sha256=36nPPsiifwv6RfpAb--3zpgbIx8ohnnI1aR29IJTO9s,118
-jaraco/text/to-qwerty.py,sha256=IQoFY9v7vLTEybcput4KBYm_5GR35pmtgZ_xyrmdTgI,118
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/REQUESTED
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/WHEEL
deleted file mode 100644
index ecaf39f..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/WHEEL
+++ /dev/null
@@ -1,5 +0,0 @@
-Wheel-Version: 1.0
-Generator: setuptools (71.1.0)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/top_level.txt b/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/top_level.txt
deleted file mode 100644
index f6205a5..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco.text-4.0.0.dist-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-jaraco
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/context/__init__.py b/voxvera/vendor/setuptools/_vendor/jaraco/context/__init__.py
deleted file mode 100644
index 41ad609..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco/context/__init__.py
+++ /dev/null
@@ -1,367 +0,0 @@
-from __future__ import annotations
-
-import contextlib
-import errno
-import functools
-import operator
-import os
-import platform
-import shutil
-import stat
-import subprocess
-import sys
-import tempfile
-import urllib.request
-from collections.abc import Iterator
-
-if sys.version_info < (3, 12):
-    from backports import tarfile
-else:
-    import tarfile
-
-
-@contextlib.contextmanager
-def pushd(dir: str | os.PathLike) -> Iterator[str | os.PathLike]:
-    """
-    >>> tmp_path = getfixture('tmp_path')
-    >>> with pushd(tmp_path):
-    ...     assert os.getcwd() == os.fspath(tmp_path)
-    >>> assert os.getcwd() != os.fspath(tmp_path)
-    """
-
-    orig = os.getcwd()
-    os.chdir(dir)
-    try:
-        yield dir
-    finally:
-        os.chdir(orig)
-
-
-@contextlib.contextmanager
-def tarball(
-    url, target_dir: str | os.PathLike | None = None
-) -> Iterator[str | os.PathLike]:
-    """
-    Get a URL to a tarball, download, extract, yield, then clean up.
-
-    Assumes everything in the tarball is prefixed with a common
-    directory. That common path is stripped and the contents
-    are extracted to ``target_dir``, similar to passing
-    ``-C {target} --strip-components 1`` to the ``tar`` command.
-
-    Uses the streaming protocol to extract the contents from a
-    stream in a single pass without loading the whole file into
-    memory.
-
-    >>> import urllib.request
-    >>> url = getfixture('tarfile_served')
-    >>> target = getfixture('tmp_path') / 'out'
-    >>> tb = tarball(url, target_dir=target)
-    >>> import pathlib
-    >>> with tb as extracted:
-    ...     contents = pathlib.Path(extracted, 'contents.txt').read_text(encoding='utf-8')
-    >>> assert not os.path.exists(extracted)
-
-    If the target is not specified, contents are extracted to a
-    directory relative to the current working directory named after
-    the name of the file as extracted from the URL.
-
-    >>> target = getfixture('tmp_path')
-    >>> with pushd(target), tarball(url):
-    ...     target.joinpath('served').is_dir()
-    True
-    """
-    if target_dir is None:
-        target_dir = os.path.basename(url).replace('.tar.gz', '').replace('.tgz', '')
-    os.mkdir(target_dir)
-    try:
-        req = urllib.request.urlopen(url)
-        with tarfile.open(fileobj=req, mode='r|*') as tf:
-            tf.extractall(path=target_dir, filter=_default_filter)
-        yield target_dir
-    finally:
-        shutil.rmtree(target_dir)
-
-
-def _compose_tarfile_filters(*filters):
-    def compose_two(f1, f2):
-        return lambda member, path: f1(f2(member, path), path)
-
-    return functools.reduce(compose_two, filters, lambda member, path: member)
-
-
-def strip_first_component(
-    member: tarfile.TarInfo,
-    path,
-) -> tarfile.TarInfo:
-    _, member.name = member.name.split('/', 1)
-    return member
-
-
-_default_filter = _compose_tarfile_filters(tarfile.data_filter, strip_first_component)
-
-
-def _compose(*cmgrs):
-    """
-    Compose any number of dependent context managers into a single one.
-
-    The last, innermost context manager may take arbitrary arguments, but
-    each successive context manager should accept the result from the
-    previous as a single parameter.
-
-    Like :func:`jaraco.functools.compose`, behavior works from right to
-    left, so the context manager should be indicated from outermost to
-    innermost.
-
-    Example, to create a context manager to change to a temporary
-    directory:
-
-    >>> temp_dir_as_cwd = _compose(pushd, temp_dir)
-    >>> with temp_dir_as_cwd() as dir:
-    ...     assert os.path.samefile(os.getcwd(), dir)
-    """
-
-    def compose_two(inner, outer):
-        def composed(*args, **kwargs):
-            with inner(*args, **kwargs) as saved, outer(saved) as res:
-                yield res
-
-        return contextlib.contextmanager(composed)
-
-    return functools.reduce(compose_two, reversed(cmgrs))
-
-
-tarball_cwd = _compose(pushd, tarball)
-"""
-A tarball context with the current working directory pointing to the contents.
-"""
-
-
-def remove_readonly(func, path, exc_info):
-    """
-    Add support for removing read-only files on Windows.
-    """
-    _, exc, _ = exc_info
-    if func in (os.rmdir, os.remove, os.unlink) and exc.errno == errno.EACCES:
-        # change the file to be readable,writable,executable: 0777
-        os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
-        # retry
-        func(path)
-    else:
-        raise
-
-
-def robust_remover():
-    return (
-        functools.partial(shutil.rmtree, onerror=remove_readonly)
-        if platform.system() == 'Windows'
-        else shutil.rmtree
-    )
-
-
-@contextlib.contextmanager
-def temp_dir(remover=shutil.rmtree):
-    """
-    Create a temporary directory context. Pass a custom remover
-    to override the removal behavior.
-
-    >>> import pathlib
-    >>> with temp_dir() as the_dir:
-    ...     assert os.path.isdir(the_dir)
-    >>> assert not os.path.exists(the_dir)
-    """
-    temp_dir = tempfile.mkdtemp()
-    try:
-        yield temp_dir
-    finally:
-        remover(temp_dir)
-
-
-robust_temp_dir = functools.partial(temp_dir, remover=robust_remover())
-
-
-@contextlib.contextmanager
-def repo_context(
-    url, branch: str | None = None, quiet: bool = True, dest_ctx=robust_temp_dir
-):
-    """
-    Check out the repo indicated by url.
-
-    If dest_ctx is supplied, it should be a context manager
-    to yield the target directory for the check out.
-
-    >>> getfixture('ensure_git')
-    >>> getfixture('needs_internet')
-    >>> repo = repo_context('https://github.com/jaraco/jaraco.context')
-    >>> with repo as dest:
-    ...     listing = os.listdir(dest)
-    >>> 'README.rst' in listing
-    True
-    """
-    exe = 'git' if 'git' in url else 'hg'
-    with dest_ctx() as repo_dir:
-        cmd = [exe, 'clone', url, repo_dir]
-        cmd.extend(['--branch', branch] * bool(branch))
-        stream = subprocess.DEVNULL if quiet else None
-        subprocess.check_call(cmd, stdout=stream, stderr=stream)
-        yield repo_dir
-
-
-class ExceptionTrap:
-    """
-    A context manager that will catch certain exceptions and provide an
-    indication they occurred.
-
-    >>> with ExceptionTrap() as trap:
-    ...     raise Exception()
-    >>> bool(trap)
-    True
-
-    >>> with ExceptionTrap() as trap:
-    ...     pass
-    >>> bool(trap)
-    False
-
-    >>> with ExceptionTrap(ValueError) as trap:
-    ...     raise ValueError("1 + 1 is not 3")
-    >>> bool(trap)
-    True
-    >>> trap.value
-    ValueError('1 + 1 is not 3')
-    >>> trap.tb
-    
-
-    >>> with ExceptionTrap(ValueError) as trap:
-    ...     raise Exception()
-    Traceback (most recent call last):
-    ...
-    Exception
-
-    >>> bool(trap)
-    False
-    """
-
-    exc_info = None, None, None
-
-    def __init__(self, exceptions=(Exception,)):
-        self.exceptions = exceptions
-
-    def __enter__(self):
-        return self
-
-    @property
-    def type(self):
-        return self.exc_info[0]
-
-    @property
-    def value(self):
-        return self.exc_info[1]
-
-    @property
-    def tb(self):
-        return self.exc_info[2]
-
-    def __exit__(self, *exc_info):
-        type = exc_info[0]
-        matches = type and issubclass(type, self.exceptions)
-        if matches:
-            self.exc_info = exc_info
-        return matches
-
-    def __bool__(self):
-        return bool(self.type)
-
-    def raises(self, func, *, _test=bool):
-        """
-        Wrap func and replace the result with the truth
-        value of the trap (True if an exception occurred).
-
-        First, give the decorator an alias to support Python 3.8
-        Syntax.
-
-        >>> raises = ExceptionTrap(ValueError).raises
-
-        Now decorate a function that always fails.
-
-        >>> @raises
-        ... def fail():
-        ...     raise ValueError('failed')
-        >>> fail()
-        True
-        """
-
-        @functools.wraps(func)
-        def wrapper(*args, **kwargs):
-            with ExceptionTrap(self.exceptions) as trap:
-                func(*args, **kwargs)
-            return _test(trap)
-
-        return wrapper
-
-    def passes(self, func):
-        """
-        Wrap func and replace the result with the truth
-        value of the trap (True if no exception).
-
-        First, give the decorator an alias to support Python 3.8
-        Syntax.
-
-        >>> passes = ExceptionTrap(ValueError).passes
-
-        Now decorate a function that always fails.
-
-        >>> @passes
-        ... def fail():
-        ...     raise ValueError('failed')
-
-        >>> fail()
-        False
-        """
-        return self.raises(func, _test=operator.not_)
-
-
-class suppress(contextlib.suppress, contextlib.ContextDecorator):
-    """
-    A version of contextlib.suppress with decorator support.
-
-    >>> @suppress(KeyError)
-    ... def key_error():
-    ...     {}['']
-    >>> key_error()
-    """
-
-
-class on_interrupt(contextlib.ContextDecorator):
-    """
-    Replace a KeyboardInterrupt with SystemExit(1).
-
-    Useful in conjunction with console entry point functions.
-
-    >>> def do_interrupt():
-    ...     raise KeyboardInterrupt()
-    >>> on_interrupt('error')(do_interrupt)()
-    Traceback (most recent call last):
-    ...
-    SystemExit: 1
-    >>> on_interrupt('error', code=255)(do_interrupt)()
-    Traceback (most recent call last):
-    ...
-    SystemExit: 255
-    >>> on_interrupt('suppress')(do_interrupt)()
-    >>> with __import__('pytest').raises(KeyboardInterrupt):
-    ...     on_interrupt('ignore')(do_interrupt)()
-    """
-
-    def __init__(self, action='error', /, code=1):
-        self.action = action
-        self.code = code
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, exctype, excinst, exctb):
-        if exctype is not KeyboardInterrupt or self.action == 'ignore':
-            return
-        elif self.action == 'error':
-            raise SystemExit(self.code) from excinst
-        return self.action == 'suppress'
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/context/py.typed b/voxvera/vendor/setuptools/_vendor/jaraco/context/py.typed
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/functools/__init__.py b/voxvera/vendor/setuptools/_vendor/jaraco/functools/__init__.py
deleted file mode 100644
index df32e2e..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco/functools/__init__.py
+++ /dev/null
@@ -1,722 +0,0 @@
-from __future__ import annotations
-
-import collections.abc
-import functools
-import inspect
-import itertools
-import operator
-import time
-import types
-import warnings
-from typing import Callable, TypeVar
-
-import more_itertools
-
-
-def compose(*funcs):
-    """
-    Compose any number of unary functions into a single unary function.
-
-    Comparable to
-    `function composition `_
-    in mathematics:
-
-    ``h = g ∘ f`` implies ``h(x) = g(f(x))``.
-
-    In Python, ``h = compose(g, f)``.
-
-    >>> import textwrap
-    >>> expected = str.strip(textwrap.dedent(compose.__doc__))
-    >>> strip_and_dedent = compose(str.strip, textwrap.dedent)
-    >>> strip_and_dedent(compose.__doc__) == expected
-    True
-
-    Compose also allows the innermost function to take arbitrary arguments.
-
-    >>> round_three = lambda x: round(x, ndigits=3)
-    >>> f = compose(round_three, int.__truediv__)
-    >>> [f(3*x, x+1) for x in range(1,10)]
-    [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]
-    """
-
-    def compose_two(f1, f2):
-        return lambda *args, **kwargs: f1(f2(*args, **kwargs))
-
-    return functools.reduce(compose_two, funcs)
-
-
-def once(func):
-    """
-    Decorate func so it's only ever called the first time.
-
-    This decorator can ensure that an expensive or non-idempotent function
-    will not be expensive on subsequent calls and is idempotent.
-
-    >>> add_three = once(lambda a: a+3)
-    >>> add_three(3)
-    6
-    >>> add_three(9)
-    6
-    >>> add_three('12')
-    6
-
-    To reset the stored value, simply clear the property ``saved_result``.
-
-    >>> del add_three.saved_result
-    >>> add_three(9)
-    12
-    >>> add_three(8)
-    12
-
-    Or invoke 'reset()' on it.
-
-    >>> add_three.reset()
-    >>> add_three(-3)
-    0
-    >>> add_three(0)
-    0
-    """
-
-    @functools.wraps(func)
-    def wrapper(*args, **kwargs):
-        if not hasattr(wrapper, 'saved_result'):
-            wrapper.saved_result = func(*args, **kwargs)
-        return wrapper.saved_result
-
-    wrapper.reset = lambda: vars(wrapper).__delitem__('saved_result')
-    return wrapper
-
-
-def method_cache(method, cache_wrapper=functools.lru_cache()):
-    """
-    Wrap lru_cache to support storing the cache data in the object instances.
-
-    Abstracts the common paradigm where the method explicitly saves an
-    underscore-prefixed protected property on first call and returns that
-    subsequently.
-
-    >>> class MyClass:
-    ...     calls = 0
-    ...
-    ...     @method_cache
-    ...     def method(self, value):
-    ...         self.calls += 1
-    ...         return value
-
-    >>> a = MyClass()
-    >>> a.method(3)
-    3
-    >>> for x in range(75):
-    ...     res = a.method(x)
-    >>> a.calls
-    75
-
-    Note that the apparent behavior will be exactly like that of lru_cache
-    except that the cache is stored on each instance, so values in one
-    instance will not flush values from another, and when an instance is
-    deleted, so are the cached values for that instance.
-
-    >>> b = MyClass()
-    >>> for x in range(35):
-    ...     res = b.method(x)
-    >>> b.calls
-    35
-    >>> a.method(0)
-    0
-    >>> a.calls
-    75
-
-    Note that if method had been decorated with ``functools.lru_cache()``,
-    a.calls would have been 76 (due to the cached value of 0 having been
-    flushed by the 'b' instance).
-
-    Clear the cache with ``.cache_clear()``
-
-    >>> a.method.cache_clear()
-
-    Same for a method that hasn't yet been called.
-
-    >>> c = MyClass()
-    >>> c.method.cache_clear()
-
-    Another cache wrapper may be supplied:
-
-    >>> cache = functools.lru_cache(maxsize=2)
-    >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
-    >>> a = MyClass()
-    >>> a.method2()
-    3
-
-    Caution - do not subsequently wrap the method with another decorator, such
-    as ``@property``, which changes the semantics of the function.
-
-    See also
-    http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
-    for another implementation and additional justification.
-    """
-
-    def wrapper(self, *args, **kwargs):
-        # it's the first call, replace the method with a cached, bound method
-        bound_method = types.MethodType(method, self)
-        cached_method = cache_wrapper(bound_method)
-        setattr(self, method.__name__, cached_method)
-        return cached_method(*args, **kwargs)
-
-    # Support cache clear even before cache has been created.
-    wrapper.cache_clear = lambda: None
-
-    return _special_method_cache(method, cache_wrapper) or wrapper
-
-
-def _special_method_cache(method, cache_wrapper):
-    """
-    Because Python treats special methods differently, it's not
-    possible to use instance attributes to implement the cached
-    methods.
-
-    Instead, install the wrapper method under a different name
-    and return a simple proxy to that wrapper.
-
-    https://github.com/jaraco/jaraco.functools/issues/5
-    """
-    name = method.__name__
-    special_names = '__getattr__', '__getitem__'
-
-    if name not in special_names:
-        return None
-
-    wrapper_name = '__cached' + name
-
-    def proxy(self, /, *args, **kwargs):
-        if wrapper_name not in vars(self):
-            bound = types.MethodType(method, self)
-            cache = cache_wrapper(bound)
-            setattr(self, wrapper_name, cache)
-        else:
-            cache = getattr(self, wrapper_name)
-        return cache(*args, **kwargs)
-
-    return proxy
-
-
-def apply(transform):
-    """
-    Decorate a function with a transform function that is
-    invoked on results returned from the decorated function.
-
-    >>> @apply(reversed)
-    ... def get_numbers(start):
-    ...     "doc for get_numbers"
-    ...     return range(start, start+3)
-    >>> list(get_numbers(4))
-    [6, 5, 4]
-    >>> get_numbers.__doc__
-    'doc for get_numbers'
-    """
-
-    def wrap(func):
-        return functools.wraps(func)(compose(transform, func))
-
-    return wrap
-
-
-def result_invoke(action):
-    r"""
-    Decorate a function with an action function that is
-    invoked on the results returned from the decorated
-    function (for its side effect), then return the original
-    result.
-
-    >>> @result_invoke(print)
-    ... def add_two(a, b):
-    ...     return a + b
-    >>> x = add_two(2, 3)
-    5
-    >>> x
-    5
-    """
-
-    def wrap(func):
-        @functools.wraps(func)
-        def wrapper(*args, **kwargs):
-            result = func(*args, **kwargs)
-            action(result)
-            return result
-
-        return wrapper
-
-    return wrap
-
-
-def invoke(f, /, *args, **kwargs):
-    """
-    Call a function for its side effect after initialization.
-
-    The benefit of using the decorator instead of simply invoking a function
-    after defining it is that it makes explicit the author's intent for the
-    function to be called immediately. Whereas if one simply calls the
-    function immediately, it's less obvious if that was intentional or
-    incidental. It also avoids repeating the name - the two actions, defining
-    the function and calling it immediately are modeled separately, but linked
-    by the decorator construct.
-
-    The benefit of having a function construct (opposed to just invoking some
-    behavior inline) is to serve as a scope in which the behavior occurs. It
-    avoids polluting the global namespace with local variables, provides an
-    anchor on which to attach documentation (docstring), keeps the behavior
-    logically separated (instead of conceptually separated or not separated at
-    all), and provides potential to re-use the behavior for testing or other
-    purposes.
-
-    This function is named as a pithy way to communicate, "call this function
-    primarily for its side effect", or "while defining this function, also
-    take it aside and call it". It exists because there's no Python construct
-    for "define and call" (nor should there be, as decorators serve this need
-    just fine). The behavior happens immediately and synchronously.
-
-    >>> @invoke
-    ... def func(): print("called")
-    called
-    >>> func()
-    called
-
-    Use functools.partial to pass parameters to the initial call
-
-    >>> @functools.partial(invoke, name='bingo')
-    ... def func(name): print('called with', name)
-    called with bingo
-    """
-    f(*args, **kwargs)
-    return f
-
-
-_T = TypeVar('_T')
-
-
-def passthrough(func: Callable[..., object]) -> Callable[[_T], _T]:
-    """
-    Wrap the function to always return the first parameter.
-
-    >>> passthrough(print)('3')
-    3
-    '3'
-    """
-
-    @functools.wraps(func)
-    def wrapper(first: _T, *args, **kwargs) -> _T:
-        func(first, *args, **kwargs)
-        return first
-
-    return wrapper
-
-
-class Throttler:
-    """Rate-limit a function (or other callable)."""
-
-    def __init__(self, func, max_rate=float('Inf')):
-        if isinstance(func, Throttler):
-            func = func.func
-        self.func = func
-        self.max_rate = max_rate
-        self.reset()
-
-    def reset(self):
-        self.last_called = 0
-
-    def __call__(self, *args, **kwargs):
-        self._wait()
-        return self.func(*args, **kwargs)
-
-    def _wait(self):
-        """Ensure at least 1/max_rate seconds from last call."""
-        elapsed = time.time() - self.last_called
-        must_wait = 1 / self.max_rate - elapsed
-        time.sleep(max(0, must_wait))
-        self.last_called = time.time()
-
-    def __get__(self, obj, owner=None):
-        return first_invoke(self._wait, functools.partial(self.func, obj))
-
-
-def first_invoke(func1, func2):
-    """
-    Return a function that when invoked will invoke func1 without
-    any parameters (for its side effect) and then invoke func2
-    with whatever parameters were passed, returning its result.
-    """
-
-    def wrapper(*args, **kwargs):
-        func1()
-        return func2(*args, **kwargs)
-
-    return wrapper
-
-
-method_caller = first_invoke(
-    lambda: warnings.warn(
-        '`jaraco.functools.method_caller` is deprecated, '
-        'use `operator.methodcaller` instead',
-        DeprecationWarning,
-        stacklevel=3,
-    ),
-    operator.methodcaller,
-)
-
-
-def retry_call(func, cleanup=lambda: None, retries=0, trap=()):
-    """
-    Given a callable func, trap the indicated exceptions
-    for up to 'retries' times, invoking cleanup on the
-    exception. On the final attempt, allow any exceptions
-    to propagate.
-    """
-    attempts = itertools.count() if retries == float('inf') else range(retries)
-    for _ in attempts:
-        try:
-            return func()
-        except trap:
-            cleanup()
-
-    return func()
-
-
-def retry(*r_args, **r_kwargs):
-    """
-    Decorator wrapper for retry_call. Accepts arguments to retry_call
-    except func and then returns a decorator for the decorated function.
-
-    Ex:
-
-    >>> @retry(retries=3)
-    ... def my_func(a, b):
-    ...     "this is my funk"
-    ...     print(a, b)
-    >>> my_func.__doc__
-    'this is my funk'
-    """
-
-    def decorate(func):
-        @functools.wraps(func)
-        def wrapper(*f_args, **f_kwargs):
-            bound = functools.partial(func, *f_args, **f_kwargs)
-            return retry_call(bound, *r_args, **r_kwargs)
-
-        return wrapper
-
-    return decorate
-
-
-def print_yielded(func):
-    """
-    Convert a generator into a function that prints all yielded elements.
-
-    >>> @print_yielded
-    ... def x():
-    ...     yield 3; yield None
-    >>> x()
-    3
-    None
-    """
-    print_all = functools.partial(map, print)
-    print_results = compose(more_itertools.consume, print_all, func)
-    return functools.wraps(func)(print_results)
-
-
-def pass_none(func):
-    """
-    Wrap func so it's not called if its first param is None.
-
-    >>> print_text = pass_none(print)
-    >>> print_text('text')
-    text
-    >>> print_text(None)
-    """
-
-    @functools.wraps(func)
-    def wrapper(param, /, *args, **kwargs):
-        if param is not None:
-            return func(param, *args, **kwargs)
-        return None
-
-    return wrapper
-
-
-def none_as(value, replacement=None):
-    """
-    >>> none_as(None, 'foo')
-    'foo'
-    >>> none_as('bar', 'foo')
-    'bar'
-    """
-    return replacement if value is None else value
-
-
-def assign_params(func, namespace):
-    """
-    Assign parameters from namespace where func solicits.
-
-    >>> def func(x, y=3):
-    ...     print(x, y)
-    >>> assigned = assign_params(func, dict(x=2, z=4))
-    >>> assigned()
-    2 3
-
-    The usual errors are raised if a function doesn't receive
-    its required parameters:
-
-    >>> assigned = assign_params(func, dict(y=3, z=4))
-    >>> assigned()
-    Traceback (most recent call last):
-    TypeError: func() ...argument...
-
-    It even works on methods:
-
-    >>> class Handler:
-    ...     def meth(self, arg):
-    ...         print(arg)
-    >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))()
-    crystal
-    """
-    sig = inspect.signature(func)
-    params = sig.parameters.keys()
-    call_ns = {k: namespace[k] for k in params if k in namespace}
-    return functools.partial(func, **call_ns)
-
-
-def save_method_args(method):
-    """
-    Wrap a method such that when it is called, the args and kwargs are
-    saved on the method.
-
-    >>> class MyClass:
-    ...     @save_method_args
-    ...     def method(self, a, b):
-    ...         print(a, b)
-    >>> my_ob = MyClass()
-    >>> my_ob.method(1, 2)
-    1 2
-    >>> my_ob._saved_method.args
-    (1, 2)
-    >>> my_ob._saved_method.kwargs
-    {}
-    >>> my_ob.method(a=3, b='foo')
-    3 foo
-    >>> my_ob._saved_method.args
-    ()
-    >>> my_ob._saved_method.kwargs == dict(a=3, b='foo')
-    True
-
-    The arguments are stored on the instance, allowing for
-    different instance to save different args.
-
-    >>> your_ob = MyClass()
-    >>> your_ob.method({str('x'): 3}, b=[4])
-    {'x': 3} [4]
-    >>> your_ob._saved_method.args
-    ({'x': 3},)
-    >>> my_ob._saved_method.args
-    ()
-    """
-    args_and_kwargs = collections.namedtuple('args_and_kwargs', 'args kwargs')  # noqa: PYI024 # Internal; stubs used for typing
-
-    @functools.wraps(method)
-    def wrapper(self, /, *args, **kwargs):
-        attr_name = '_saved_' + method.__name__
-        attr = args_and_kwargs(args, kwargs)
-        setattr(self, attr_name, attr)
-        return method(self, *args, **kwargs)
-
-    return wrapper
-
-
-def except_(*exceptions, replace=None, use=None):
-    """
-    Replace the indicated exceptions, if raised, with the indicated
-    literal replacement or evaluated expression (if present).
-
-    >>> safe_int = except_(ValueError)(int)
-    >>> safe_int('five')
-    >>> safe_int('5')
-    5
-
-    Specify a literal replacement with ``replace``.
-
-    >>> safe_int_r = except_(ValueError, replace=0)(int)
-    >>> safe_int_r('five')
-    0
-
-    Provide an expression to ``use`` to pass through particular parameters.
-
-    >>> safe_int_pt = except_(ValueError, use='args[0]')(int)
-    >>> safe_int_pt('five')
-    'five'
-
-    """
-
-    def decorate(func):
-        @functools.wraps(func)
-        def wrapper(*args, **kwargs):
-            try:
-                return func(*args, **kwargs)
-            except exceptions:
-                try:
-                    return eval(use)
-                except TypeError:
-                    return replace
-
-        return wrapper
-
-    return decorate
-
-
-def identity(x):
-    """
-    Return the argument.
-
-    >>> o = object()
-    >>> identity(o) is o
-    True
-    """
-    return x
-
-
-def bypass_when(check, *, _op=identity):
-    """
-    Decorate a function to return its parameter when ``check``.
-
-    >>> bypassed = []  # False
-
-    >>> @bypass_when(bypassed)
-    ... def double(x):
-    ...     return x * 2
-    >>> double(2)
-    4
-    >>> bypassed[:] = [object()]  # True
-    >>> double(2)
-    2
-    """
-
-    def decorate(func):
-        @functools.wraps(func)
-        def wrapper(param, /):
-            return param if _op(check) else func(param)
-
-        return wrapper
-
-    return decorate
-
-
-def bypass_unless(check):
-    """
-    Decorate a function to return its parameter unless ``check``.
-
-    >>> enabled = [object()]  # True
-
-    >>> @bypass_unless(enabled)
-    ... def double(x):
-    ...     return x * 2
-    >>> double(2)
-    4
-    >>> del enabled[:]  # False
-    >>> double(2)
-    2
-    """
-    return bypass_when(check, _op=operator.not_)
-
-
-@functools.singledispatch
-def _splat_inner(args, func):
-    """Splat args to func."""
-    return func(*args)
-
-
-@_splat_inner.register
-def _(args: collections.abc.Mapping, func):
-    """Splat kargs to func as kwargs."""
-    return func(**args)
-
-
-def splat(func):
-    """
-    Wrap func to expect its parameters to be passed positionally in a tuple.
-
-    Has a similar effect to that of ``itertools.starmap`` over
-    simple ``map``.
-
-    >>> pairs = [(-1, 1), (0, 2)]
-    >>> more_itertools.consume(itertools.starmap(print, pairs))
-    -1 1
-    0 2
-    >>> more_itertools.consume(map(splat(print), pairs))
-    -1 1
-    0 2
-
-    The approach generalizes to other iterators that don't have a "star"
-    equivalent, such as a "starfilter".
-
-    >>> list(filter(splat(operator.add), pairs))
-    [(0, 2)]
-
-    Splat also accepts a mapping argument.
-
-    >>> def is_nice(msg, code):
-    ...     return "smile" in msg or code == 0
-    >>> msgs = [
-    ...     dict(msg='smile!', code=20),
-    ...     dict(msg='error :(', code=1),
-    ...     dict(msg='unknown', code=0),
-    ... ]
-    >>> for msg in filter(splat(is_nice), msgs):
-    ...     print(msg)
-    {'msg': 'smile!', 'code': 20}
-    {'msg': 'unknown', 'code': 0}
-    """
-    return functools.wraps(func)(functools.partial(_splat_inner, func=func))
-
-
-_T = TypeVar('_T')
-
-
-def chainable(method: Callable[[_T, ...], None]) -> Callable[[_T, ...], _T]:
-    """
-    Wrap an instance method to always return self.
-
-
-    >>> class Dingus:
-    ...     @chainable
-    ...     def set_attr(self, name, val):
-    ...         setattr(self, name, val)
-    >>> d = Dingus().set_attr('a', 'eh!')
-    >>> d.a
-    'eh!'
-    >>> d2 = Dingus().set_attr('a', 'eh!').set_attr('b', 'bee!')
-    >>> d2.a + d2.b
-    'eh!bee!'
-
-    Enforces that the return value is null.
-
-    >>> class BorkedDingus:
-    ...     @chainable
-    ...     def set_attr(self, name, val):
-    ...         setattr(self, name, val)
-    ...         return len(name)
-    >>> BorkedDingus().set_attr('a', 'eh!')
-    Traceback (most recent call last):
-    ...
-    AssertionError
-    """
-
-    @functools.wraps(method)
-    def wrapper(self, *args, **kwargs):
-        assert method(self, *args, **kwargs) is None
-        return self
-
-    return wrapper
-
-
-def noop(*args, **kwargs):
-    """
-    A no-operation function that does nothing.
-
-    >>> noop(1, 2, three=3)
-    """
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/functools/__init__.pyi b/voxvera/vendor/setuptools/_vendor/jaraco/functools/__init__.pyi
deleted file mode 100644
index 6f834bf..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco/functools/__init__.pyi
+++ /dev/null
@@ -1,123 +0,0 @@
-from collections.abc import Callable, Hashable, Iterator
-from functools import partial
-from operator import methodcaller
-from typing import (
-    Any,
-    Generic,
-    Protocol,
-    TypeVar,
-    overload,
-)
-
-from typing_extensions import Concatenate, ParamSpec, TypeVarTuple, Unpack
-
-_P = ParamSpec('_P')
-_R = TypeVar('_R')
-_T = TypeVar('_T')
-_Ts = TypeVarTuple('_Ts')
-_R1 = TypeVar('_R1')
-_R2 = TypeVar('_R2')
-_V = TypeVar('_V')
-_S = TypeVar('_S')
-_R_co = TypeVar('_R_co', covariant=True)
-
-class _OnceCallable(Protocol[_P, _R]):
-    saved_result: _R
-    reset: Callable[[], None]
-    def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _R: ...
-
-class _ProxyMethodCacheWrapper(Protocol[_R_co]):
-    cache_clear: Callable[[], None]
-    def __call__(self, *args: Hashable, **kwargs: Hashable) -> _R_co: ...
-
-class _MethodCacheWrapper(Protocol[_R_co]):
-    def cache_clear(self) -> None: ...
-    def __call__(self, *args: Hashable, **kwargs: Hashable) -> _R_co: ...
-
-# `compose()` overloads below will cover most use cases.
-
-@overload
-def compose(
-    __func1: Callable[[_R], _T],
-    __func2: Callable[_P, _R],
-    /,
-) -> Callable[_P, _T]: ...
-@overload
-def compose(
-    __func1: Callable[[_R], _T],
-    __func2: Callable[[_R1], _R],
-    __func3: Callable[_P, _R1],
-    /,
-) -> Callable[_P, _T]: ...
-@overload
-def compose(
-    __func1: Callable[[_R], _T],
-    __func2: Callable[[_R2], _R],
-    __func3: Callable[[_R1], _R2],
-    __func4: Callable[_P, _R1],
-    /,
-) -> Callable[_P, _T]: ...
-def once(func: Callable[_P, _R]) -> _OnceCallable[_P, _R]: ...
-def method_cache(
-    method: Callable[..., _R],
-    cache_wrapper: Callable[[Callable[..., _R]], _MethodCacheWrapper[_R]] = ...,
-) -> _MethodCacheWrapper[_R] | _ProxyMethodCacheWrapper[_R]: ...
-def apply(
-    transform: Callable[[_R], _T],
-) -> Callable[[Callable[_P, _R]], Callable[_P, _T]]: ...
-def result_invoke(
-    action: Callable[[_R], Any],
-) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: ...
-def invoke(
-    f: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs
-) -> Callable[_P, _R]: ...
-
-class Throttler(Generic[_R]):
-    last_called: float
-    func: Callable[..., _R]
-    max_rate: float
-    def __init__(
-        self, func: Callable[..., _R] | Throttler[_R], max_rate: float = ...
-    ) -> None: ...
-    def reset(self) -> None: ...
-    def __call__(self, *args: Any, **kwargs: Any) -> _R: ...
-    def __get__(self, obj: Any, owner: type[Any] | None = ...) -> Callable[..., _R]: ...
-
-def first_invoke(
-    func1: Callable[..., Any], func2: Callable[_P, _R]
-) -> Callable[_P, _R]: ...
-
-method_caller: Callable[..., methodcaller]
-
-def retry_call(
-    func: Callable[..., _R],
-    cleanup: Callable[..., None] = ...,
-    retries: float = ...,
-    trap: type[BaseException] | tuple[type[BaseException], ...] = ...,
-) -> _R: ...
-def retry(
-    cleanup: Callable[..., None] = ...,
-    retries: float = ...,
-    trap: type[BaseException] | tuple[type[BaseException], ...] = ...,
-) -> Callable[[Callable[..., _R]], Callable[..., _R]]: ...
-def print_yielded(func: Callable[_P, Iterator[Any]]) -> Callable[_P, None]: ...
-def pass_none(
-    func: Callable[Concatenate[_T, _P], _R],
-) -> Callable[Concatenate[_T, _P], _R]: ...
-def assign_params(
-    func: Callable[..., _R], namespace: dict[str, Any]
-) -> partial[_R]: ...
-def save_method_args(
-    method: Callable[Concatenate[_S, _P], _R],
-) -> Callable[Concatenate[_S, _P], _R]: ...
-def except_(
-    *exceptions: type[BaseException], replace: Any = ..., use: Any = ...
-) -> Callable[[Callable[_P, Any]], Callable[_P, Any]]: ...
-def identity(x: _T) -> _T: ...
-def bypass_when(
-    check: _V, *, _op: Callable[[_V], Any] = ...
-) -> Callable[[Callable[[_T], _R]], Callable[[_T], _T | _R]]: ...
-def bypass_unless(
-    check: Any,
-) -> Callable[[Callable[[_T], _R]], Callable[[_T], _T | _R]]: ...
-def splat(func: Callable[[Unpack[_Ts]], _R]) -> Callable[[tuple[Unpack[_Ts]]], _R]: ...
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/functools/py.typed b/voxvera/vendor/setuptools/_vendor/jaraco/functools/py.typed
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/text/Lorem ipsum.txt b/voxvera/vendor/setuptools/_vendor/jaraco/text/Lorem ipsum.txt
deleted file mode 100644
index 986f944..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco/text/Lorem ipsum.txt	
+++ /dev/null
@@ -1,2 +0,0 @@
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/text/__init__.py b/voxvera/vendor/setuptools/_vendor/jaraco/text/__init__.py
deleted file mode 100644
index 8567200..0000000
--- a/voxvera/vendor/setuptools/_vendor/jaraco/text/__init__.py
+++ /dev/null
@@ -1,647 +0,0 @@
-import functools
-import itertools
-import re
-import textwrap
-
-from typing import Iterable
-
-try:
-    from importlib.resources import files  # type: ignore
-except ImportError:  # pragma: nocover
-    from importlib_resources import files  # type: ignore
-
-from jaraco.context import ExceptionTrap
-from jaraco.functools import compose, method_cache
-
-
-def substitution(old, new):
-    """
-    Return a function that will perform a substitution on a string
-    """
-    return lambda s: s.replace(old, new)
-
-
-def multi_substitution(*substitutions):
-    """
-    Take a sequence of pairs specifying substitutions, and create
-    a function that performs those substitutions.
-
-    >>> multi_substitution(('foo', 'bar'), ('bar', 'baz'))('foo')
-    'baz'
-    """
-    substitutions = itertools.starmap(substitution, substitutions)
-    # compose function applies last function first, so reverse the
-    #  substitutions to get the expected order.
-    substitutions = reversed(tuple(substitutions))
-    return compose(*substitutions)
-
-
-class FoldedCase(str):
-    """
-    A case insensitive string class; behaves just like str
-    except compares equal when the only variation is case.
-
-    >>> s = FoldedCase('hello world')
-
-    >>> s == 'Hello World'
-    True
-
-    >>> 'Hello World' == s
-    True
-
-    >>> s != 'Hello World'
-    False
-
-    >>> s.index('O')
-    4
-
-    >>> s.split('O')
-    ['hell', ' w', 'rld']
-
-    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
-    ['alpha', 'Beta', 'GAMMA']
-
-    Sequence membership is straightforward.
-
-    >>> "Hello World" in [s]
-    True
-    >>> s in ["Hello World"]
-    True
-
-    Allows testing for set inclusion, but candidate and elements
-    must both be folded.
-
-    >>> FoldedCase("Hello World") in {s}
-    True
-    >>> s in {FoldedCase("Hello World")}
-    True
-
-    String inclusion works as long as the FoldedCase object
-    is on the right.
-
-    >>> "hello" in FoldedCase("Hello World")
-    True
-
-    But not if the FoldedCase object is on the left:
-
-    >>> FoldedCase('hello') in 'Hello World'
-    False
-
-    In that case, use ``in_``:
-
-    >>> FoldedCase('hello').in_('Hello World')
-    True
-
-    >>> FoldedCase('hello') > FoldedCase('Hello')
-    False
-
-    >>> FoldedCase('ß') == FoldedCase('ss')
-    True
-    """
-
-    def __lt__(self, other):
-        return self.casefold() < other.casefold()
-
-    def __gt__(self, other):
-        return self.casefold() > other.casefold()
-
-    def __eq__(self, other):
-        return self.casefold() == other.casefold()
-
-    def __ne__(self, other):
-        return self.casefold() != other.casefold()
-
-    def __hash__(self):
-        return hash(self.casefold())
-
-    def __contains__(self, other):
-        return super().casefold().__contains__(other.casefold())
-
-    def in_(self, other):
-        "Does self appear in other?"
-        return self in FoldedCase(other)
-
-    # cache casefold since it's likely to be called frequently.
-    @method_cache
-    def casefold(self):
-        return super().casefold()
-
-    def index(self, sub):
-        return self.casefold().index(sub.casefold())
-
-    def split(self, splitter=' ', maxsplit=0):
-        pattern = re.compile(re.escape(splitter), re.I)
-        return pattern.split(self, maxsplit)
-
-
-# Python 3.8 compatibility
-_unicode_trap = ExceptionTrap(UnicodeDecodeError)
-
-
-@_unicode_trap.passes
-def is_decodable(value):
-    r"""
-    Return True if the supplied value is decodable (using the default
-    encoding).
-
-    >>> is_decodable(b'\xff')
-    False
-    >>> is_decodable(b'\x32')
-    True
-    """
-    value.decode()
-
-
-def is_binary(value):
-    r"""
-    Return True if the value appears to be binary (that is, it's a byte
-    string and isn't decodable).
-
-    >>> is_binary(b'\xff')
-    True
-    >>> is_binary('\xff')
-    False
-    """
-    return isinstance(value, bytes) and not is_decodable(value)
-
-
-def trim(s):
-    r"""
-    Trim something like a docstring to remove the whitespace that
-    is common due to indentation and formatting.
-
-    >>> trim("\n\tfoo = bar\n\t\tbar = baz\n")
-    'foo = bar\n\tbar = baz'
-    """
-    return textwrap.dedent(s).strip()
-
-
-def wrap(s):
-    """
-    Wrap lines of text, retaining existing newlines as
-    paragraph markers.
-
-    >>> print(wrap(lorem_ipsum))
-    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
-    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
-    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
-    aliquip ex ea commodo consequat. Duis aute irure dolor in
-    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
-    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
-    culpa qui officia deserunt mollit anim id est laborum.
-    
-    Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam
-    varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus
-    magna felis sollicitudin mauris. Integer in mauris eu nibh euismod
-    gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis
-    risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue,
-    eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas
-    fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla
-    a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis,
-    neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing
-    sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque
-    nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus
-    quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis,
-    molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
-    """
-    paragraphs = s.splitlines()
-    wrapped = ('\n'.join(textwrap.wrap(para)) for para in paragraphs)
-    return '\n\n'.join(wrapped)
-
-
-def unwrap(s):
-    r"""
-    Given a multi-line string, return an unwrapped version.
-
-    >>> wrapped = wrap(lorem_ipsum)
-    >>> wrapped.count('\n')
-    20
-    >>> unwrapped = unwrap(wrapped)
-    >>> unwrapped.count('\n')
-    1
-    >>> print(unwrapped)
-    Lorem ipsum dolor sit amet, consectetur adipiscing ...
-    Curabitur pretium tincidunt lacus. Nulla gravida orci ...
-
-    """
-    paragraphs = re.split(r'\n\n+', s)
-    cleaned = (para.replace('\n', ' ') for para in paragraphs)
-    return '\n'.join(cleaned)
-
-
-lorem_ipsum: str = (
-    files(__name__).joinpath('Lorem ipsum.txt').read_text(encoding='utf-8')
-)
-
-
-class Splitter:
-    """object that will split a string with the given arguments for each call
-
-    >>> s = Splitter(',')
-    >>> s('hello, world, this is your, master calling')
-    ['hello', ' world', ' this is your', ' master calling']
-    """
-
-    def __init__(self, *args):
-        self.args = args
-
-    def __call__(self, s):
-        return s.split(*self.args)
-
-
-def indent(string, prefix=' ' * 4):
-    """
-    >>> indent('foo')
-    '    foo'
-    """
-    return prefix + string
-
-
-class WordSet(tuple):
-    """
-    Given an identifier, return the words that identifier represents,
-    whether in camel case, underscore-separated, etc.
-
-    >>> WordSet.parse("camelCase")
-    ('camel', 'Case')
-
-    >>> WordSet.parse("under_sep")
-    ('under', 'sep')
-
-    Acronyms should be retained
-
-    >>> WordSet.parse("firstSNL")
-    ('first', 'SNL')
-
-    >>> WordSet.parse("you_and_I")
-    ('you', 'and', 'I')
-
-    >>> WordSet.parse("A simple test")
-    ('A', 'simple', 'test')
-
-    Multiple caps should not interfere with the first cap of another word.
-
-    >>> WordSet.parse("myABCClass")
-    ('my', 'ABC', 'Class')
-
-    The result is a WordSet, providing access to other forms.
-
-    >>> WordSet.parse("myABCClass").underscore_separated()
-    'my_ABC_Class'
-
-    >>> WordSet.parse('a-command').camel_case()
-    'ACommand'
-
-    >>> WordSet.parse('someIdentifier').lowered().space_separated()
-    'some identifier'
-
-    Slices of the result should return another WordSet.
-
-    >>> WordSet.parse('taken-out-of-context')[1:].underscore_separated()
-    'out_of_context'
-
-    >>> WordSet.from_class_name(WordSet()).lowered().space_separated()
-    'word set'
-
-    >>> example = WordSet.parse('figured it out')
-    >>> example.headless_camel_case()
-    'figuredItOut'
-    >>> example.dash_separated()
-    'figured-it-out'
-
-    """
-
-    _pattern = re.compile('([A-Z]?[a-z]+)|([A-Z]+(?![a-z]))')
-
-    def capitalized(self):
-        return WordSet(word.capitalize() for word in self)
-
-    def lowered(self):
-        return WordSet(word.lower() for word in self)
-
-    def camel_case(self):
-        return ''.join(self.capitalized())
-
-    def headless_camel_case(self):
-        words = iter(self)
-        first = next(words).lower()
-        new_words = itertools.chain((first,), WordSet(words).camel_case())
-        return ''.join(new_words)
-
-    def underscore_separated(self):
-        return '_'.join(self)
-
-    def dash_separated(self):
-        return '-'.join(self)
-
-    def space_separated(self):
-        return ' '.join(self)
-
-    def trim_right(self, item):
-        """
-        Remove the item from the end of the set.
-
-        >>> WordSet.parse('foo bar').trim_right('foo')
-        ('foo', 'bar')
-        >>> WordSet.parse('foo bar').trim_right('bar')
-        ('foo',)
-        >>> WordSet.parse('').trim_right('bar')
-        ()
-        """
-        return self[:-1] if self and self[-1] == item else self
-
-    def trim_left(self, item):
-        """
-        Remove the item from the beginning of the set.
-
-        >>> WordSet.parse('foo bar').trim_left('foo')
-        ('bar',)
-        >>> WordSet.parse('foo bar').trim_left('bar')
-        ('foo', 'bar')
-        >>> WordSet.parse('').trim_left('bar')
-        ()
-        """
-        return self[1:] if self and self[0] == item else self
-
-    def trim(self, item):
-        """
-        >>> WordSet.parse('foo bar').trim('foo')
-        ('bar',)
-        """
-        return self.trim_left(item).trim_right(item)
-
-    def __getitem__(self, item):
-        result = super().__getitem__(item)
-        if isinstance(item, slice):
-            result = WordSet(result)
-        return result
-
-    @classmethod
-    def parse(cls, identifier):
-        matches = cls._pattern.finditer(identifier)
-        return WordSet(match.group(0) for match in matches)
-
-    @classmethod
-    def from_class_name(cls, subject):
-        return cls.parse(subject.__class__.__name__)
-
-
-# for backward compatibility
-words = WordSet.parse
-
-
-def simple_html_strip(s):
-    r"""
-    Remove HTML from the string `s`.
-
-    >>> str(simple_html_strip(''))
-    ''
-
-    >>> print(simple_html_strip('A stormy day in paradise'))
-    A stormy day in paradise
-
-    >>> print(simple_html_strip('Somebody  tell the truth.'))
-    Somebody  tell the truth.
-
-    >>> print(simple_html_strip('What about
\nmultiple lines?')) - What about - multiple lines? - """ - html_stripper = re.compile('()|(<[^>]*>)|([^<]+)', re.DOTALL) - texts = (match.group(3) or '' for match in html_stripper.finditer(s)) - return ''.join(texts) - - -class SeparatedValues(str): - """ - A string separated by a separator. Overrides __iter__ for getting - the values. - - >>> list(SeparatedValues('a,b,c')) - ['a', 'b', 'c'] - - Whitespace is stripped and empty values are discarded. - - >>> list(SeparatedValues(' a, b , c, ')) - ['a', 'b', 'c'] - """ - - separator = ',' - - def __iter__(self): - parts = self.split(self.separator) - return filter(None, (part.strip() for part in parts)) - - -class Stripper: - r""" - Given a series of lines, find the common prefix and strip it from them. - - >>> lines = [ - ... 'abcdefg\n', - ... 'abc\n', - ... 'abcde\n', - ... ] - >>> res = Stripper.strip_prefix(lines) - >>> res.prefix - 'abc' - >>> list(res.lines) - ['defg\n', '\n', 'de\n'] - - If no prefix is common, nothing should be stripped. - - >>> lines = [ - ... 'abcd\n', - ... '1234\n', - ... ] - >>> res = Stripper.strip_prefix(lines) - >>> res.prefix = '' - >>> list(res.lines) - ['abcd\n', '1234\n'] - """ - - def __init__(self, prefix, lines): - self.prefix = prefix - self.lines = map(self, lines) - - @classmethod - def strip_prefix(cls, lines): - prefix_lines, lines = itertools.tee(lines) - prefix = functools.reduce(cls.common_prefix, prefix_lines) - return cls(prefix, lines) - - def __call__(self, line): - if not self.prefix: - return line - null, prefix, rest = line.partition(self.prefix) - return rest - - @staticmethod - def common_prefix(s1, s2): - """ - Return the common prefix of two lines. - """ - index = min(len(s1), len(s2)) - while s1[:index] != s2[:index]: - index -= 1 - return s1[:index] - - -def remove_prefix(text, prefix): - """ - Remove the prefix from the text if it exists. - - >>> remove_prefix('underwhelming performance', 'underwhelming ') - 'performance' - - >>> remove_prefix('something special', 'sample') - 'something special' - """ - null, prefix, rest = text.rpartition(prefix) - return rest - - -def remove_suffix(text, suffix): - """ - Remove the suffix from the text if it exists. - - >>> remove_suffix('name.git', '.git') - 'name' - - >>> remove_suffix('something special', 'sample') - 'something special' - """ - rest, suffix, null = text.partition(suffix) - return rest - - -def normalize_newlines(text): - r""" - Replace alternate newlines with the canonical newline. - - >>> normalize_newlines('Lorem Ipsum\u2029') - 'Lorem Ipsum\n' - >>> normalize_newlines('Lorem Ipsum\r\n') - 'Lorem Ipsum\n' - >>> normalize_newlines('Lorem Ipsum\x85') - 'Lorem Ipsum\n' - """ - newlines = ['\r\n', '\r', '\n', '\u0085', '\u2028', '\u2029'] - pattern = '|'.join(newlines) - return re.sub(pattern, '\n', text) - - -def _nonblank(str): - return str and not str.startswith('#') - - -@functools.singledispatch -def yield_lines(iterable): - r""" - Yield valid lines of a string or iterable. - - >>> list(yield_lines('')) - [] - >>> list(yield_lines(['foo', 'bar'])) - ['foo', 'bar'] - >>> list(yield_lines('foo\nbar')) - ['foo', 'bar'] - >>> list(yield_lines('\nfoo\n#bar\nbaz #comment')) - ['foo', 'baz #comment'] - >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n'])) - ['foo', 'bar', 'baz', 'bing'] - """ - return itertools.chain.from_iterable(map(yield_lines, iterable)) - - -@yield_lines.register(str) -def _(text): - return clean(text.splitlines()) - - -def clean(lines: Iterable[str]): - """ - Yield non-blank, non-comment elements from lines. - """ - return filter(_nonblank, map(str.strip, lines)) - - -def drop_comment(line): - """ - Drop comments. - - >>> drop_comment('foo # bar') - 'foo' - - A hash without a space may be in a URL. - - >>> drop_comment('http://example.com/foo#bar') - 'http://example.com/foo#bar' - """ - return line.partition(' #')[0] - - -def join_continuation(lines): - r""" - Join lines continued by a trailing backslash. - - >>> list(join_continuation(['foo \\', 'bar', 'baz'])) - ['foobar', 'baz'] - >>> list(join_continuation(['foo \\', 'bar', 'baz'])) - ['foobar', 'baz'] - >>> list(join_continuation(['foo \\', 'bar \\', 'baz'])) - ['foobarbaz'] - - Not sure why, but... - The character preceding the backslash is also elided. - - >>> list(join_continuation(['goo\\', 'dly'])) - ['godly'] - - A terrible idea, but... - If no line is available to continue, suppress the lines. - - >>> list(join_continuation(['foo', 'bar\\', 'baz\\'])) - ['foo'] - """ - lines = iter(lines) - for item in lines: - while item.endswith('\\'): - try: - item = item[:-2].strip() + next(lines) - except StopIteration: - return - yield item - - -def read_newlines(filename, limit=1024): - r""" - >>> tmp_path = getfixture('tmp_path') - >>> filename = tmp_path / 'out.txt' - >>> _ = filename.write_text('foo\n', newline='', encoding='utf-8') - >>> read_newlines(filename) - '\n' - >>> _ = filename.write_text('foo\r\n', newline='', encoding='utf-8') - >>> read_newlines(filename) - '\r\n' - >>> _ = filename.write_text('foo\r\nbar\nbing\r', newline='', encoding='utf-8') - >>> read_newlines(filename) - ('\r', '\n', '\r\n') - """ - with open(filename, encoding='utf-8') as fp: - fp.read(limit) - return fp.newlines - - -def lines_from(input): - """ - Generate lines from a :class:`importlib.resources.abc.Traversable` path. - - >>> lines = lines_from(files(__name__).joinpath('Lorem ipsum.txt')) - >>> next(lines) - 'Lorem ipsum...' - >>> next(lines) - 'Curabitur pretium...' - """ - with input.open(encoding='utf-8') as stream: - yield from stream diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/text/layouts.py b/voxvera/vendor/setuptools/_vendor/jaraco/text/layouts.py deleted file mode 100644 index 9636f0f..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco/text/layouts.py +++ /dev/null @@ -1,25 +0,0 @@ -qwerty = "-=qwertyuiop[]asdfghjkl;'zxcvbnm,./_+QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>?" -dvorak = "[]',.pyfgcrl/=aoeuidhtns-;qjkxbmwvz{}\"<>PYFGCRL?+AOEUIDHTNS_:QJKXBMWVZ" - - -to_dvorak = str.maketrans(qwerty, dvorak) -to_qwerty = str.maketrans(dvorak, qwerty) - - -def translate(input, translation): - """ - >>> translate('dvorak', to_dvorak) - 'ekrpat' - >>> translate('qwerty', to_qwerty) - 'x,dokt' - """ - return input.translate(translation) - - -def _translate_stream(stream, translation): - """ - >>> import io - >>> _translate_stream(io.StringIO('foo'), to_dvorak) - urr - """ - print(translate(stream.read(), translation)) diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/text/show-newlines.py b/voxvera/vendor/setuptools/_vendor/jaraco/text/show-newlines.py deleted file mode 100644 index ef4cc54..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco/text/show-newlines.py +++ /dev/null @@ -1,32 +0,0 @@ -import autocommand -import inflect -from more_itertools import always_iterable - -import jaraco.text - - -def report_newlines(filename): - r""" - Report the newlines in the indicated file. - - >>> tmp_path = getfixture('tmp_path') - >>> filename = tmp_path / 'out.txt' - >>> _ = filename.write_text('foo\nbar\n', newline='', encoding='utf-8') - >>> report_newlines(filename) - newline is '\n' - >>> filename = tmp_path / 'out.txt' - >>> _ = filename.write_text('foo\nbar\r\n', newline='', encoding='utf-8') - >>> report_newlines(filename) - newlines are ('\n', '\r\n') - """ - newlines = jaraco.text.read_newlines(filename) - count = len(tuple(always_iterable(newlines))) - engine = inflect.engine() - print( - engine.plural_noun("newline", count), - engine.plural_verb("is", count), - repr(newlines), - ) - - -autocommand.autocommand(__name__)(report_newlines) diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/text/strip-prefix.py b/voxvera/vendor/setuptools/_vendor/jaraco/text/strip-prefix.py deleted file mode 100644 index 761717a..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco/text/strip-prefix.py +++ /dev/null @@ -1,21 +0,0 @@ -import sys - -import autocommand - -from jaraco.text import Stripper - - -def strip_prefix(): - r""" - Strip any common prefix from stdin. - - >>> import io, pytest - >>> getfixture('monkeypatch').setattr('sys.stdin', io.StringIO('abcdef\nabc123')) - >>> strip_prefix() - def - 123 - """ - sys.stdout.writelines(Stripper.strip_prefix(sys.stdin).lines) - - -autocommand.autocommand(__name__)(strip_prefix) diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/text/to-dvorak.py b/voxvera/vendor/setuptools/_vendor/jaraco/text/to-dvorak.py deleted file mode 100644 index 14c8981..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco/text/to-dvorak.py +++ /dev/null @@ -1,5 +0,0 @@ -import sys - -from . import layouts - -__name__ == '__main__' and layouts._translate_stream(sys.stdin, layouts.to_dvorak) diff --git a/voxvera/vendor/setuptools/_vendor/jaraco/text/to-qwerty.py b/voxvera/vendor/setuptools/_vendor/jaraco/text/to-qwerty.py deleted file mode 100644 index 23596fd..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco/text/to-qwerty.py +++ /dev/null @@ -1,5 +0,0 @@ -import sys - -from . import layouts - -__name__ == '__main__' and layouts._translate_stream(sys.stdin, layouts.to_qwerty) diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/INSTALLER deleted file mode 100644 index 5c69047..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -uv \ No newline at end of file diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/METADATA deleted file mode 100644 index 8fb5e53..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/METADATA +++ /dev/null @@ -1,82 +0,0 @@ -Metadata-Version: 2.4 -Name: jaraco.context -Version: 6.1.0 -Summary: Useful decorators and context managers -Author-email: "Jason R. Coombs" -License-Expression: MIT -Project-URL: Source, https://github.com/jaraco/jaraco.context -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3 :: Only -Requires-Python: >=3.9 -Description-Content-Type: text/x-rst -License-File: LICENSE -Requires-Dist: backports.tarfile; python_version < "3.12" -Provides-Extra: test -Requires-Dist: pytest!=8.1.*,>=6; extra == "test" -Requires-Dist: jaraco.test>=5.6.0; extra == "test" -Requires-Dist: portend; extra == "test" -Provides-Extra: doc -Requires-Dist: sphinx>=3.5; extra == "doc" -Requires-Dist: jaraco.packaging>=9.3; extra == "doc" -Requires-Dist: rst.linker>=1.9; extra == "doc" -Requires-Dist: furo; extra == "doc" -Requires-Dist: sphinx-lint; extra == "doc" -Requires-Dist: jaraco.tidelift>=1.4; extra == "doc" -Provides-Extra: check -Requires-Dist: pytest-checkdocs>=2.4; extra == "check" -Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check" -Provides-Extra: cover -Requires-Dist: pytest-cov; extra == "cover" -Provides-Extra: enabler -Requires-Dist: pytest-enabler>=3.4; extra == "enabler" -Provides-Extra: type -Requires-Dist: pytest-mypy>=1.0.1; extra == "type" -Requires-Dist: mypy<1.19; platform_python_implementation == "PyPy" and extra == "type" -Dynamic: license-file - -.. image:: https://img.shields.io/pypi/v/jaraco.context.svg - :target: https://pypi.org/project/jaraco.context - -.. image:: https://img.shields.io/pypi/pyversions/jaraco.context.svg - -.. image:: https://github.com/jaraco/jaraco.context/actions/workflows/main.yml/badge.svg - :target: https://github.com/jaraco/jaraco.context/actions?query=workflow%3A%22tests%22 - :alt: tests - -.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json - :target: https://github.com/astral-sh/ruff - :alt: Ruff - -.. image:: https://readthedocs.org/projects/jaracocontext/badge/?version=latest - :target: https://jaracocontext.readthedocs.io/en/latest/?badge=latest - -.. image:: https://img.shields.io/badge/skeleton-2025-informational - :target: https://blog.jaraco.com/skeleton - -.. image:: https://tidelift.com/badges/package/pypi/jaraco.context - :target: https://tidelift.com/subscription/pkg/pypi-jaraco.context?utm_source=pypi-jaraco.context&utm_medium=readme - - -Highlights -========== - -See the docs linked from the badge above for the full details, but here are some features that may be of interest. - -- ``ExceptionTrap`` provides a general-purpose wrapper for trapping exceptions and then acting on the outcome. Includes ``passes`` and ``raises`` decorators to replace the result of a wrapped function by a boolean indicating the outcome of the exception trap. See `this keyring commit `_ for an example of it in production. -- ``suppress`` simply enables ``contextlib.suppress`` as a decorator. -- ``on_interrupt`` is a decorator used by CLI entry points to affect the handling of a ``KeyboardInterrupt``. Inspired by `Lucretiel/autocommand#18 `_. -- ``pushd`` is similar to pytest's ``monkeypatch.chdir`` or path's `default context `_, changes the current working directory for the duration of the context. -- ``tarball`` will download a tarball, extract it, change directory, yield, then clean up after. Convenient when working with web assets. -- ``null`` is there for those times when one code branch needs a context and the other doesn't; this null context provides symmetry across those branches. - - -For Enterprise -============== - -Available as part of the Tidelift Subscription. - -This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use. - -`Learn more `_. diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/RECORD deleted file mode 100644 index e5169f6..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/RECORD +++ /dev/null @@ -1,9 +0,0 @@ -jaraco/context/__init__.py,sha256=br1ydYGo1Xr_Pu1anuEdd-QrjUiz_EY5L_5E4C03L4w,9809 -jaraco/context/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -jaraco_context-6.1.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2 -jaraco_context-6.1.0.dist-info/METADATA,sha256=BDXr_FIFXFqZdO0gwXG2RUOD6vnbsVCIFLp62XxZ1xI,4270 -jaraco_context-6.1.0.dist-info/RECORD,, -jaraco_context-6.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -jaraco_context-6.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91 -jaraco_context-6.1.0.dist-info/licenses/LICENSE,sha256=l1WhhRlmbl8PTK49qtPXASvK5IpgCzEjfXXp_hNOZoM,1076 -jaraco_context-6.1.0.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7 diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/WHEEL deleted file mode 100644 index e7fa31b..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/WHEEL +++ /dev/null @@ -1,5 +0,0 @@ -Wheel-Version: 1.0 -Generator: setuptools (80.9.0) -Root-Is-Purelib: true -Tag: py3-none-any - diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/licenses/LICENSE deleted file mode 100644 index c891f41..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/licenses/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -MIT License - -Copyright (c) 2026 - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO -EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/top_level.txt b/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/top_level.txt deleted file mode 100644 index f6205a5..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_context-6.1.0.dist-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -jaraco diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/INSTALLER deleted file mode 100644 index 5c69047..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -uv \ No newline at end of file diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/METADATA deleted file mode 100644 index f2150dd..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/METADATA +++ /dev/null @@ -1,69 +0,0 @@ -Metadata-Version: 2.4 -Name: jaraco.functools -Version: 4.4.0 -Summary: Functools like those found in stdlib -Author-email: "Jason R. Coombs" -License-Expression: MIT -Project-URL: Source, https://github.com/jaraco/jaraco.functools -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3 :: Only -Requires-Python: >=3.9 -Description-Content-Type: text/x-rst -License-File: LICENSE -Requires-Dist: more_itertools -Provides-Extra: test -Requires-Dist: pytest!=8.1.*,>=6; extra == "test" -Requires-Dist: jaraco.classes; extra == "test" -Provides-Extra: doc -Requires-Dist: sphinx>=3.5; extra == "doc" -Requires-Dist: jaraco.packaging>=9.3; extra == "doc" -Requires-Dist: rst.linker>=1.9; extra == "doc" -Requires-Dist: furo; extra == "doc" -Requires-Dist: sphinx-lint; extra == "doc" -Requires-Dist: jaraco.tidelift>=1.4; extra == "doc" -Provides-Extra: check -Requires-Dist: pytest-checkdocs>=2.4; extra == "check" -Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check" -Provides-Extra: cover -Requires-Dist: pytest-cov; extra == "cover" -Provides-Extra: enabler -Requires-Dist: pytest-enabler>=3.4; extra == "enabler" -Provides-Extra: type -Requires-Dist: pytest-mypy>=1.0.1; extra == "type" -Requires-Dist: mypy<1.19; platform_python_implementation == "PyPy" and extra == "type" -Dynamic: license-file - -.. image:: https://img.shields.io/pypi/v/jaraco.functools.svg - :target: https://pypi.org/project/jaraco.functools - -.. image:: https://img.shields.io/pypi/pyversions/jaraco.functools.svg - -.. image:: https://github.com/jaraco/jaraco.functools/actions/workflows/main.yml/badge.svg - :target: https://github.com/jaraco/jaraco.functools/actions?query=workflow%3A%22tests%22 - :alt: tests - -.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json - :target: https://github.com/astral-sh/ruff - :alt: Ruff - -.. image:: https://readthedocs.org/projects/jaracofunctools/badge/?version=latest - :target: https://jaracofunctools.readthedocs.io/en/latest/?badge=latest - -.. image:: https://img.shields.io/badge/skeleton-2025-informational - :target: https://blog.jaraco.com/skeleton - -.. image:: https://tidelift.com/badges/package/pypi/jaraco.functools - :target: https://tidelift.com/subscription/pkg/pypi-jaraco.functools?utm_source=pypi-jaraco.functools&utm_medium=readme - -Additional functools in the spirit of stdlib's functools. - -For Enterprise -============== - -Available as part of the Tidelift Subscription. - -This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use. - -`Learn more `_. diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/RECORD deleted file mode 100644 index 3516c9f..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/RECORD +++ /dev/null @@ -1,10 +0,0 @@ -jaraco/functools/__init__.py,sha256=ZJx9cMs2Nvk2xGUl8OjVGkpjdOaNlSzJrN4dGglgX2g,18599 -jaraco/functools/__init__.pyi,sha256=K4DcbnYIHE5QlMxqf9-cVp-WhycrhuTao4J7O7TMq4Y,3907 -jaraco/functools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -jaraco_functools-4.4.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2 -jaraco_functools-4.4.0.dist-info/METADATA,sha256=LnnajcNGmSSr46yLIqP-tWkqeb-fR7vIa2U11hhkGEk,2960 -jaraco_functools-4.4.0.dist-info/RECORD,, -jaraco_functools-4.4.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -jaraco_functools-4.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91 -jaraco_functools-4.4.0.dist-info/licenses/LICENSE,sha256=WlfLTbheKi3YjCkGKJCK3VfjRRRJ4KmnH9-zh3b9dZ0,1076 -jaraco_functools-4.4.0.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7 diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/WHEEL deleted file mode 100644 index e7fa31b..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/WHEEL +++ /dev/null @@ -1,5 +0,0 @@ -Wheel-Version: 1.0 -Generator: setuptools (80.9.0) -Root-Is-Purelib: true -Tag: py3-none-any - diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/licenses/LICENSE deleted file mode 100644 index f60bd57..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/licenses/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -MIT License - -Copyright (c) 2025 - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO -EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/top_level.txt b/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/top_level.txt deleted file mode 100644 index f6205a5..0000000 --- a/voxvera/vendor/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -jaraco diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/INSTALLER deleted file mode 100644 index 5c69047..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -uv \ No newline at end of file diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/METADATA deleted file mode 100644 index bb7a3db..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/METADATA +++ /dev/null @@ -1,283 +0,0 @@ -Metadata-Version: 2.4 -Name: more-itertools -Version: 10.8.0 -Summary: More routines for operating on iterables, beyond itertools -Keywords: itertools,iterator,iteration,filter,peek,peekable,chunk,chunked -Author-email: Erik Rose -Requires-Python: >=3.9 -Description-Content-Type: text/x-rst -License-Expression: MIT -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: Natural Language :: English -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: 3.13 -Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Topic :: Software Development :: Libraries -License-File: LICENSE -Project-URL: Documentation, https://more-itertools.readthedocs.io/en/stable/ -Project-URL: Homepage, https://github.com/more-itertools/more-itertools - -============== -More Itertools -============== - -.. image:: https://readthedocs.org/projects/more-itertools/badge/?version=latest - :target: https://more-itertools.readthedocs.io/en/stable/ - -Python's ``itertools`` library is a gem - you can compose elegant solutions -for a variety of problems with the functions it provides. In ``more-itertools`` -we collect additional building blocks, recipes, and routines for working with -Python iterables. - -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Grouping | `chunked `_, | -| | `ichunked `_, | -| | `chunked_even `_, | -| | `sliced `_, | -| | `constrained_batches `_, | -| | `distribute `_, | -| | `divide `_, | -| | `split_at `_, | -| | `split_before `_, | -| | `split_after `_, | -| | `split_into `_, | -| | `split_when `_, | -| | `bucket `_, | -| | `unzip `_, | -| | `batched `_, | -| | `grouper `_, | -| | `partition `_, | -| | `transpose `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Lookahead and lookback | `spy `_, | -| | `peekable `_, | -| | `seekable `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Windowing | `windowed `_, | -| | `substrings `_, | -| | `substrings_indexes `_, | -| | `stagger `_, | -| | `windowed_complete `_, | -| | `pairwise `_, | -| | `triplewise `_, | -| | `sliding_window `_, | -| | `subslices `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Augmenting | `count_cycle `_, | -| | `intersperse `_, | -| | `padded `_, | -| | `repeat_each `_, | -| | `mark_ends `_, | -| | `repeat_last `_, | -| | `adjacent `_, | -| | `groupby_transform `_, | -| | `pad_none `_, | -| | `ncycles `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Combining | `collapse `_, | -| | `sort_together `_, | -| | `interleave `_, | -| | `interleave_longest `_, | -| | `interleave_evenly `_, | -| | `interleave_randomly `_, | -| | `zip_offset `_, | -| | `zip_equal `_, | -| | `zip_broadcast `_, | -| | `flatten `_, | -| | `roundrobin `_, | -| | `prepend `_, | -| | `value_chain `_, | -| | `partial_product `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Summarizing | `ilen `_, | -| | `unique_to_each `_, | -| | `sample `_, | -| | `consecutive_groups `_, | -| | `run_length `_, | -| | `map_reduce `_, | -| | `join_mappings `_, | -| | `exactly_n `_, | -| | `is_sorted `_, | -| | `all_equal `_, | -| | `all_unique `_, | -| | `argmin `_, | -| | `argmax `_, | -| | `minmax `_, | -| | `first_true `_, | -| | `quantify `_, | -| | `iequals `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Selecting | `islice_extended `_, | -| | `first `_, | -| | `last `_, | -| | `one `_, | -| | `only `_, | -| | `strictly_n `_, | -| | `strip `_, | -| | `lstrip `_, | -| | `rstrip `_, | -| | `filter_except `_, | -| | `map_except `_, | -| | `filter_map `_, | -| | `iter_suppress `_, | -| | `nth_or_last `_, | -| | `extract `_, | -| | `unique_in_window `_, | -| | `before_and_after `_, | -| | `nth `_, | -| | `take `_, | -| | `tail `_, | -| | `unique_everseen `_, | -| | `unique_justseen `_, | -| | `unique `_, | -| | `duplicates_everseen `_, | -| | `duplicates_justseen `_, | -| | `classify_unique `_, | -| | `longest_common_prefix `_, | -| | `takewhile_inclusive `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Math | `dft `_, | -| | `idft `_, | -| | `convolve `_, | -| | `dotproduct `_, | -| | `matmul `_, | -| | `polynomial_from_roots `_, | -| | `polynomial_derivative `_, | -| | `polynomial_eval `_, | -| | `sum_of_squares `_, | -| | `running_median `_, | -| | `totient `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Integer math | `factor `_, | -| | `is_prime `_, | -| | `multinomial `_, | -| | `nth_prime `_, | -| | `sieve `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Combinatorics | `circular_shifts `_, | -| | `derangements `_, | -| | `gray_product `_, | -| | `outer_product `_, | -| | `partitions `_, | -| | `set_partitions `_, | -| | `powerset `_, | -| | `powerset_of_sets `_ | -| +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| | `distinct_combinations `_, | -| | `distinct_permutations `_ | -| +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| | `combination_index `_, | -| | `combination_with_replacement_index `_, | -| | `permutation_index `_, | -| | `product_index `_ | -| +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| | `nth_combination `_, | -| | `nth_combination_with_replacement `_, | -| | `nth_permutation `_, | -| | `nth_product `_ | -| +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| | `random_combination `_, | -| | `random_combination_with_replacement `_, | -| | `random_permutation `_, | -| | `random_product `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Wrapping | `always_iterable `_, | -| | `always_reversible `_, | -| | `countable `_, | -| | `consumer `_, | -| | `with_iter `_, | -| | `iter_except `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Others | `locate `_, | -| | `rlocate `_, | -| | `replace `_, | -| | `numeric_range `_, | -| | `side_effect `_, | -| | `iterate `_, | -| | `loops `_, | -| | `difference `_, | -| | `make_decorator `_, | -| | `SequenceView `_, | -| | `time_limited `_, | -| | `map_if `_, | -| | `iter_index `_, | -| | `consume `_, | -| | `tabulate `_, | -| | `repeatfunc `_, | -| | `reshape `_, | -| | `doublestarmap `_ | -+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - - -Getting started -=============== - -To get started, install the library with `pip `_: - -.. code-block:: shell - - pip install more-itertools - -The recipes from the `itertools docs `_ -are included in the top-level package: - -.. code-block:: python - - >>> from more_itertools import flatten - >>> iterable = [(0, 1), (2, 3)] - >>> list(flatten(iterable)) - [0, 1, 2, 3] - -Several new recipes are available as well: - -.. code-block:: python - - >>> from more_itertools import chunked - >>> iterable = [0, 1, 2, 3, 4, 5, 6, 7, 8] - >>> list(chunked(iterable, 3)) - [[0, 1, 2], [3, 4, 5], [6, 7, 8]] - - >>> from more_itertools import spy - >>> iterable = (x * x for x in range(1, 6)) - >>> head, iterable = spy(iterable, n=3) - >>> list(head) - [1, 4, 9] - >>> list(iterable) - [1, 4, 9, 16, 25] - - - -For the full listing of functions, see the `API documentation `_. - - -Links elsewhere -=============== - -Blog posts about ``more-itertools``: - -* `Yo, I heard you like decorators `__ -* `Tour of Python Itertools `__ (`Alternate `__) -* `Real-World Python More Itertools `_ - - -Development -=========== - -``more-itertools`` is maintained by `@erikrose `_ -and `@bbayles `_, with help from `many others `_. -If you have a problem or suggestion, please file a bug or pull request in this -repository. Thanks for contributing! - - -Version History -=============== - -The version history can be found in `documentation `_. - diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/RECORD deleted file mode 100644 index 61ef7d6..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/RECORD +++ /dev/null @@ -1,13 +0,0 @@ -more_itertools-10.8.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2 -more_itertools-10.8.0.dist-info/METADATA,sha256=arNRUUWr5YsGfwh8hnYxz0z11lP-2BuWQu4SCGw5BLg,39413 -more_itertools-10.8.0.dist-info/RECORD,, -more_itertools-10.8.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -more_itertools-10.8.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 -more_itertools-10.8.0.dist-info/licenses/LICENSE,sha256=CfHIyelBrz5YTVlkHqm4fYPAyw_QB-te85Gn4mQ8GkY,1053 -more_itertools/__init__.py,sha256=5F7E_zpoGcEBW_T_3WE0WYYt8j-gJodIuiBcOJxrOv8,149 -more_itertools/__init__.pyi,sha256=5B3eTzON1BBuOLob1vCflyEb2lSd6usXQQ-Cv-hXkeA,43 -more_itertools/more.py,sha256=mNPKKu5UI7lRL460vgm0QTCWFiGMVCMosSPxVSdibos,163690 -more_itertools/more.pyi,sha256=fpEgNX3O66wY5cnT-s5VYDKNUpAcaCyU3iP84It3OOM,27119 -more_itertools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -more_itertools/recipes.py,sha256=Ma-kuBNZDFhaQDbIJgRmnrG86WzaupbOyUV3v8je3xw,41811 -more_itertools/recipes.pyi,sha256=LNRwN-OL3nkMfQAqx-PPc1fBaetUObb_Z6mdePyzh1c,6226 diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/WHEEL deleted file mode 100644 index d8b9936..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: flit 3.12.0 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/licenses/LICENSE deleted file mode 100644 index 0a523be..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools-10.8.0.dist-info/licenses/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Erik Rose - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools/__init__.py b/voxvera/vendor/setuptools/_vendor/more_itertools/__init__.py deleted file mode 100644 index 24216c5..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -"""More routines for operating on iterables, beyond itertools""" - -from .more import * # noqa -from .recipes import * # noqa - -__version__ = '10.8.0' diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools/__init__.pyi b/voxvera/vendor/setuptools/_vendor/more_itertools/__init__.pyi deleted file mode 100644 index 96f6e36..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools/__init__.pyi +++ /dev/null @@ -1,2 +0,0 @@ -from .more import * -from .recipes import * diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools/more.py b/voxvera/vendor/setuptools/_vendor/more_itertools/more.py deleted file mode 100644 index bf50195..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools/more.py +++ /dev/null @@ -1,5303 +0,0 @@ -import math -import warnings - -from collections import Counter, defaultdict, deque, abc -from collections.abc import Sequence -from contextlib import suppress -from functools import cached_property, partial, reduce, wraps -from heapq import heapify, heapreplace -from itertools import ( - chain, - combinations, - compress, - count, - cycle, - dropwhile, - groupby, - islice, - permutations, - repeat, - starmap, - takewhile, - tee, - zip_longest, - product, -) -from math import comb, e, exp, factorial, floor, fsum, log, log1p, perm, tau -from math import ceil -from queue import Empty, Queue -from random import random, randrange, shuffle, uniform -from operator import ( - attrgetter, - is_not, - itemgetter, - lt, - mul, - neg, - sub, - gt, -) -from sys import hexversion, maxsize -from time import monotonic - -from .recipes import ( - _marker, - _zip_equal, - UnequalIterablesError, - consume, - first_true, - flatten, - is_prime, - nth, - powerset, - sieve, - take, - unique_everseen, - all_equal, - batched, -) - -__all__ = [ - 'AbortThread', - 'SequenceView', - 'UnequalIterablesError', - 'adjacent', - 'all_unique', - 'always_iterable', - 'always_reversible', - 'argmax', - 'argmin', - 'bucket', - 'callback_iter', - 'chunked', - 'chunked_even', - 'circular_shifts', - 'collapse', - 'combination_index', - 'combination_with_replacement_index', - 'consecutive_groups', - 'constrained_batches', - 'consumer', - 'count_cycle', - 'countable', - 'derangements', - 'dft', - 'difference', - 'distinct_combinations', - 'distinct_permutations', - 'distribute', - 'divide', - 'doublestarmap', - 'duplicates_everseen', - 'duplicates_justseen', - 'classify_unique', - 'exactly_n', - 'extract', - 'filter_except', - 'filter_map', - 'first', - 'gray_product', - 'groupby_transform', - 'ichunked', - 'iequals', - 'idft', - 'ilen', - 'interleave', - 'interleave_evenly', - 'interleave_longest', - 'interleave_randomly', - 'intersperse', - 'is_sorted', - 'islice_extended', - 'iterate', - 'iter_suppress', - 'join_mappings', - 'last', - 'locate', - 'longest_common_prefix', - 'lstrip', - 'make_decorator', - 'map_except', - 'map_if', - 'map_reduce', - 'mark_ends', - 'minmax', - 'nth_or_last', - 'nth_permutation', - 'nth_prime', - 'nth_product', - 'nth_combination_with_replacement', - 'numeric_range', - 'one', - 'only', - 'outer_product', - 'padded', - 'partial_product', - 'partitions', - 'peekable', - 'permutation_index', - 'powerset_of_sets', - 'product_index', - 'raise_', - 'repeat_each', - 'repeat_last', - 'replace', - 'rlocate', - 'rstrip', - 'run_length', - 'sample', - 'seekable', - 'set_partitions', - 'side_effect', - 'sliced', - 'sort_together', - 'split_after', - 'split_at', - 'split_before', - 'split_into', - 'split_when', - 'spy', - 'stagger', - 'strip', - 'strictly_n', - 'substrings', - 'substrings_indexes', - 'takewhile_inclusive', - 'time_limited', - 'unique_in_window', - 'unique_to_each', - 'unzip', - 'value_chain', - 'windowed', - 'windowed_complete', - 'with_iter', - 'zip_broadcast', - 'zip_equal', - 'zip_offset', -] - -# math.sumprod is available for Python 3.12+ -try: - from math import sumprod as _fsumprod - -except ImportError: # pragma: no cover - # Extended precision algorithms from T. J. Dekker, - # "A Floating-Point Technique for Extending the Available Precision" - # https://csclub.uwaterloo.ca/~pbarfuss/dekker1971.pdf - # Formulas: (5.5) (5.6) and (5.8). Code: mul12() - - def dl_split(x: float): - "Split a float into two half-precision components." - t = x * 134217729.0 # Veltkamp constant = 2.0 ** 27 + 1 - hi = t - (t - x) - lo = x - hi - return hi, lo - - def dl_mul(x, y): - "Lossless multiplication." - xx_hi, xx_lo = dl_split(x) - yy_hi, yy_lo = dl_split(y) - p = xx_hi * yy_hi - q = xx_hi * yy_lo + xx_lo * yy_hi - z = p + q - zz = p - z + q + xx_lo * yy_lo - return z, zz - - def _fsumprod(p, q): - return fsum(chain.from_iterable(map(dl_mul, p, q))) - - -def chunked(iterable, n, strict=False): - """Break *iterable* into lists of length *n*: - - >>> list(chunked([1, 2, 3, 4, 5, 6], 3)) - [[1, 2, 3], [4, 5, 6]] - - By the default, the last yielded list will have fewer than *n* elements - if the length of *iterable* is not divisible by *n*: - - >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3)) - [[1, 2, 3], [4, 5, 6], [7, 8]] - - To use a fill-in value instead, see the :func:`grouper` recipe. - - If the length of *iterable* is not divisible by *n* and *strict* is - ``True``, then ``ValueError`` will be raised before the last - list is yielded. - - """ - iterator = iter(partial(take, n, iter(iterable)), []) - if strict: - if n is None: - raise ValueError('n must not be None when using strict mode.') - - def ret(): - for chunk in iterator: - if len(chunk) != n: - raise ValueError('iterable is not divisible by n.') - yield chunk - - return ret() - else: - return iterator - - -def first(iterable, default=_marker): - """Return the first item of *iterable*, or *default* if *iterable* is - empty. - - >>> first([0, 1, 2, 3]) - 0 - >>> first([], 'some default') - 'some default' - - If *default* is not provided and there are no items in the iterable, - raise ``ValueError``. - - :func:`first` is useful when you have a generator of expensive-to-retrieve - values and want any arbitrary one. It is marginally shorter than - ``next(iter(iterable), default)``. - - """ - for item in iterable: - return item - if default is _marker: - raise ValueError( - 'first() was called on an empty iterable, ' - 'and no default value was provided.' - ) - return default - - -def last(iterable, default=_marker): - """Return the last item of *iterable*, or *default* if *iterable* is - empty. - - >>> last([0, 1, 2, 3]) - 3 - >>> last([], 'some default') - 'some default' - - If *default* is not provided and there are no items in the iterable, - raise ``ValueError``. - """ - try: - if isinstance(iterable, Sequence): - return iterable[-1] - # Work around https://bugs.python.org/issue38525 - if getattr(iterable, '__reversed__', None): - return next(reversed(iterable)) - return deque(iterable, maxlen=1)[-1] - except (IndexError, TypeError, StopIteration): - if default is _marker: - raise ValueError( - 'last() was called on an empty iterable, ' - 'and no default value was provided.' - ) - return default - - -def nth_or_last(iterable, n, default=_marker): - """Return the nth or the last item of *iterable*, - or *default* if *iterable* is empty. - - >>> nth_or_last([0, 1, 2, 3], 2) - 2 - >>> nth_or_last([0, 1], 2) - 1 - >>> nth_or_last([], 0, 'some default') - 'some default' - - If *default* is not provided and there are no items in the iterable, - raise ``ValueError``. - """ - return last(islice(iterable, n + 1), default=default) - - -class peekable: - """Wrap an iterator to allow lookahead and prepending elements. - - Call :meth:`peek` on the result to get the value that will be returned - by :func:`next`. This won't advance the iterator: - - >>> p = peekable(['a', 'b']) - >>> p.peek() - 'a' - >>> next(p) - 'a' - - Pass :meth:`peek` a default value to return that instead of raising - ``StopIteration`` when the iterator is exhausted. - - >>> p = peekable([]) - >>> p.peek('hi') - 'hi' - - peekables also offer a :meth:`prepend` method, which "inserts" items - at the head of the iterable: - - >>> p = peekable([1, 2, 3]) - >>> p.prepend(10, 11, 12) - >>> next(p) - 10 - >>> p.peek() - 11 - >>> list(p) - [11, 12, 1, 2, 3] - - peekables can be indexed. Index 0 is the item that will be returned by - :func:`next`, index 1 is the item after that, and so on: - The values up to the given index will be cached. - - >>> p = peekable(['a', 'b', 'c', 'd']) - >>> p[0] - 'a' - >>> p[1] - 'b' - >>> next(p) - 'a' - - Negative indexes are supported, but be aware that they will cache the - remaining items in the source iterator, which may require significant - storage. - - To check whether a peekable is exhausted, check its truth value: - - >>> p = peekable(['a', 'b']) - >>> if p: # peekable has items - ... list(p) - ['a', 'b'] - >>> if not p: # peekable is exhausted - ... list(p) - [] - - """ - - def __init__(self, iterable): - self._it = iter(iterable) - self._cache = deque() - - def __iter__(self): - return self - - def __bool__(self): - try: - self.peek() - except StopIteration: - return False - return True - - def peek(self, default=_marker): - """Return the item that will be next returned from ``next()``. - - Return ``default`` if there are no items left. If ``default`` is not - provided, raise ``StopIteration``. - - """ - if not self._cache: - try: - self._cache.append(next(self._it)) - except StopIteration: - if default is _marker: - raise - return default - return self._cache[0] - - def prepend(self, *items): - """Stack up items to be the next ones returned from ``next()`` or - ``self.peek()``. The items will be returned in - first in, first out order:: - - >>> p = peekable([1, 2, 3]) - >>> p.prepend(10, 11, 12) - >>> next(p) - 10 - >>> list(p) - [11, 12, 1, 2, 3] - - It is possible, by prepending items, to "resurrect" a peekable that - previously raised ``StopIteration``. - - >>> p = peekable([]) - >>> next(p) - Traceback (most recent call last): - ... - StopIteration - >>> p.prepend(1) - >>> next(p) - 1 - >>> next(p) - Traceback (most recent call last): - ... - StopIteration - - """ - self._cache.extendleft(reversed(items)) - - def __next__(self): - if self._cache: - return self._cache.popleft() - - return next(self._it) - - def _get_slice(self, index): - # Normalize the slice's arguments - step = 1 if (index.step is None) else index.step - if step > 0: - start = 0 if (index.start is None) else index.start - stop = maxsize if (index.stop is None) else index.stop - elif step < 0: - start = -1 if (index.start is None) else index.start - stop = (-maxsize - 1) if (index.stop is None) else index.stop - else: - raise ValueError('slice step cannot be zero') - - # If either the start or stop index is negative, we'll need to cache - # the rest of the iterable in order to slice from the right side. - if (start < 0) or (stop < 0): - self._cache.extend(self._it) - # Otherwise we'll need to find the rightmost index and cache to that - # point. - else: - n = min(max(start, stop) + 1, maxsize) - cache_len = len(self._cache) - if n >= cache_len: - self._cache.extend(islice(self._it, n - cache_len)) - - return list(self._cache)[index] - - def __getitem__(self, index): - if isinstance(index, slice): - return self._get_slice(index) - - cache_len = len(self._cache) - if index < 0: - self._cache.extend(self._it) - elif index >= cache_len: - self._cache.extend(islice(self._it, index + 1 - cache_len)) - - return self._cache[index] - - -def consumer(func): - """Decorator that automatically advances a PEP-342-style "reverse iterator" - to its first yield point so you don't have to call ``next()`` on it - manually. - - >>> @consumer - ... def tally(): - ... i = 0 - ... while True: - ... print('Thing number %s is %s.' % (i, (yield))) - ... i += 1 - ... - >>> t = tally() - >>> t.send('red') - Thing number 0 is red. - >>> t.send('fish') - Thing number 1 is fish. - - Without the decorator, you would have to call ``next(t)`` before - ``t.send()`` could be used. - - """ - - @wraps(func) - def wrapper(*args, **kwargs): - gen = func(*args, **kwargs) - next(gen) - return gen - - return wrapper - - -def ilen(iterable): - """Return the number of items in *iterable*. - - For example, there are 168 prime numbers below 1,000: - - >>> ilen(sieve(1000)) - 168 - - Equivalent to, but faster than:: - - def ilen(iterable): - count = 0 - for _ in iterable: - count += 1 - return count - - This fully consumes the iterable, so handle with care. - - """ - # This is the "most beautiful of the fast variants" of this function. - # If you think you can improve on it, please ensure that your version - # is both 10x faster and 10x more beautiful. - return sum(compress(repeat(1), zip(iterable))) - - -def iterate(func, start): - """Return ``start``, ``func(start)``, ``func(func(start))``, ... - - Produces an infinite iterator. To add a stopping condition, - use :func:`take`, ``takewhile``, or :func:`takewhile_inclusive`:. - - >>> take(10, iterate(lambda x: 2*x, 1)) - [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] - - >>> collatz = lambda x: 3*x + 1 if x%2==1 else x // 2 - >>> list(takewhile_inclusive(lambda x: x!=1, iterate(collatz, 10))) - [10, 5, 16, 8, 4, 2, 1] - - """ - with suppress(StopIteration): - while True: - yield start - start = func(start) - - -def with_iter(context_manager): - """Wrap an iterable in a ``with`` statement, so it closes once exhausted. - - For example, this will close the file when the iterator is exhausted:: - - upper_lines = (line.upper() for line in with_iter(open('foo'))) - - Any context manager which returns an iterable is a candidate for - ``with_iter``. - - """ - with context_manager as iterable: - yield from iterable - - -def one(iterable, too_short=None, too_long=None): - """Return the first item from *iterable*, which is expected to contain only - that item. Raise an exception if *iterable* is empty or has more than one - item. - - :func:`one` is useful for ensuring that an iterable contains only one item. - For example, it can be used to retrieve the result of a database query - that is expected to return a single row. - - If *iterable* is empty, ``ValueError`` will be raised. You may specify a - different exception with the *too_short* keyword: - - >>> it = [] - >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - ValueError: too few items in iterable (expected 1)' - >>> too_short = IndexError('too few items') - >>> one(it, too_short=too_short) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - IndexError: too few items - - Similarly, if *iterable* contains more than one item, ``ValueError`` will - be raised. You may specify a different exception with the *too_long* - keyword: - - >>> it = ['too', 'many'] - >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - ValueError: Expected exactly one item in iterable, but got 'too', - 'many', and perhaps more. - >>> too_long = RuntimeError - >>> one(it, too_long=too_long) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - RuntimeError - - Note that :func:`one` attempts to advance *iterable* twice to ensure there - is only one item. See :func:`spy` or :func:`peekable` to check iterable - contents less destructively. - - """ - iterator = iter(iterable) - for first in iterator: - for second in iterator: - msg = ( - f'Expected exactly one item in iterable, but got {first!r}, ' - f'{second!r}, and perhaps more.' - ) - raise too_long or ValueError(msg) - return first - raise too_short or ValueError('too few items in iterable (expected 1)') - - -def raise_(exception, *args): - raise exception(*args) - - -def strictly_n(iterable, n, too_short=None, too_long=None): - """Validate that *iterable* has exactly *n* items and return them if - it does. If it has fewer than *n* items, call function *too_short* - with the actual number of items. If it has more than *n* items, call function - *too_long* with the number ``n + 1``. - - >>> iterable = ['a', 'b', 'c', 'd'] - >>> n = 4 - >>> list(strictly_n(iterable, n)) - ['a', 'b', 'c', 'd'] - - Note that the returned iterable must be consumed in order for the check to - be made. - - By default, *too_short* and *too_long* are functions that raise - ``ValueError``. - - >>> list(strictly_n('ab', 3)) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - ValueError: too few items in iterable (got 2) - - >>> list(strictly_n('abc', 2)) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - ValueError: too many items in iterable (got at least 3) - - You can instead supply functions that do something else. - *too_short* will be called with the number of items in *iterable*. - *too_long* will be called with `n + 1`. - - >>> def too_short(item_count): - ... raise RuntimeError - >>> it = strictly_n('abcd', 6, too_short=too_short) - >>> list(it) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - RuntimeError - - >>> def too_long(item_count): - ... print('The boss is going to hear about this') - >>> it = strictly_n('abcdef', 4, too_long=too_long) - >>> list(it) - The boss is going to hear about this - ['a', 'b', 'c', 'd'] - - """ - if too_short is None: - too_short = lambda item_count: raise_( - ValueError, - f'Too few items in iterable (got {item_count})', - ) - - if too_long is None: - too_long = lambda item_count: raise_( - ValueError, - f'Too many items in iterable (got at least {item_count})', - ) - - it = iter(iterable) - - sent = 0 - for item in islice(it, n): - yield item - sent += 1 - - if sent < n: - too_short(sent) - return - - for item in it: - too_long(n + 1) - return - - -def distinct_permutations(iterable, r=None): - """Yield successive distinct permutations of the elements in *iterable*. - - >>> sorted(distinct_permutations([1, 0, 1])) - [(0, 1, 1), (1, 0, 1), (1, 1, 0)] - - Equivalent to yielding from ``set(permutations(iterable))``, except - duplicates are not generated and thrown away. For larger input sequences - this is much more efficient. - - Duplicate permutations arise when there are duplicated elements in the - input iterable. The number of items returned is - `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of - items input, and each `x_i` is the count of a distinct item in the input - sequence. The function :func:`multinomial` computes this directly. - - If *r* is given, only the *r*-length permutations are yielded. - - >>> sorted(distinct_permutations([1, 0, 1], r=2)) - [(0, 1), (1, 0), (1, 1)] - >>> sorted(distinct_permutations(range(3), r=2)) - [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)] - - *iterable* need not be sortable, but note that using equal (``x == y``) - but non-identical (``id(x) != id(y)``) elements may produce surprising - behavior. For example, ``1`` and ``True`` are equal but non-identical: - - >>> list(distinct_permutations([1, True, '3'])) # doctest: +SKIP - [ - (1, True, '3'), - (1, '3', True), - ('3', 1, True) - ] - >>> list(distinct_permutations([1, 2, '3'])) # doctest: +SKIP - [ - (1, 2, '3'), - (1, '3', 2), - (2, 1, '3'), - (2, '3', 1), - ('3', 1, 2), - ('3', 2, 1) - ] - """ - - # Algorithm: https://w.wiki/Qai - def _full(A): - while True: - # Yield the permutation we have - yield tuple(A) - - # Find the largest index i such that A[i] < A[i + 1] - for i in range(size - 2, -1, -1): - if A[i] < A[i + 1]: - break - # If no such index exists, this permutation is the last one - else: - return - - # Find the largest index j greater than j such that A[i] < A[j] - for j in range(size - 1, i, -1): - if A[i] < A[j]: - break - - # Swap the value of A[i] with that of A[j], then reverse the - # sequence from A[i + 1] to form the new permutation - A[i], A[j] = A[j], A[i] - A[i + 1 :] = A[: i - size : -1] # A[i + 1:][::-1] - - # Algorithm: modified from the above - def _partial(A, r): - # Split A into the first r items and the last r items - head, tail = A[:r], A[r:] - right_head_indexes = range(r - 1, -1, -1) - left_tail_indexes = range(len(tail)) - - while True: - # Yield the permutation we have - yield tuple(head) - - # Starting from the right, find the first index of the head with - # value smaller than the maximum value of the tail - call it i. - pivot = tail[-1] - for i in right_head_indexes: - if head[i] < pivot: - break - pivot = head[i] - else: - return - - # Starting from the left, find the first value of the tail - # with a value greater than head[i] and swap. - for j in left_tail_indexes: - if tail[j] > head[i]: - head[i], tail[j] = tail[j], head[i] - break - # If we didn't find one, start from the right and find the first - # index of the head with a value greater than head[i] and swap. - else: - for j in right_head_indexes: - if head[j] > head[i]: - head[i], head[j] = head[j], head[i] - break - - # Reverse head[i + 1:] and swap it with tail[:r - (i + 1)] - tail += head[: i - r : -1] # head[i + 1:][::-1] - i += 1 - head[i:], tail[:] = tail[: r - i], tail[r - i :] - - items = list(iterable) - - try: - items.sort() - sortable = True - except TypeError: - sortable = False - - indices_dict = defaultdict(list) - - for item in items: - indices_dict[items.index(item)].append(item) - - indices = [items.index(item) for item in items] - indices.sort() - - equivalent_items = {k: cycle(v) for k, v in indices_dict.items()} - - def permuted_items(permuted_indices): - return tuple( - next(equivalent_items[index]) for index in permuted_indices - ) - - size = len(items) - if r is None: - r = size - - # functools.partial(_partial, ... ) - algorithm = _full if (r == size) else partial(_partial, r=r) - - if 0 < r <= size: - if sortable: - return algorithm(items) - else: - return ( - permuted_items(permuted_indices) - for permuted_indices in algorithm(indices) - ) - - return iter(() if r else ((),)) - - -def derangements(iterable, r=None): - """Yield successive derangements of the elements in *iterable*. - - A derangement is a permutation in which no element appears at its original - index. In other words, a derangement is a permutation that has no fixed points. - - Suppose Alice, Bob, Carol, and Dave are playing Secret Santa. - The code below outputs all of the different ways to assign gift recipients - such that nobody is assigned to himself or herself: - - >>> for d in derangements(['Alice', 'Bob', 'Carol', 'Dave']): - ... print(', '.join(d)) - Bob, Alice, Dave, Carol - Bob, Carol, Dave, Alice - Bob, Dave, Alice, Carol - Carol, Alice, Dave, Bob - Carol, Dave, Alice, Bob - Carol, Dave, Bob, Alice - Dave, Alice, Bob, Carol - Dave, Carol, Alice, Bob - Dave, Carol, Bob, Alice - - If *r* is given, only the *r*-length derangements are yielded. - - >>> sorted(derangements(range(3), 2)) - [(1, 0), (1, 2), (2, 0)] - >>> sorted(derangements([0, 2, 3], 2)) - [(2, 0), (2, 3), (3, 0)] - - Elements are treated as unique based on their position, not on their value. - - Consider the Secret Santa example with two *different* people who have - the *same* name. Then there are two valid gift assignments even though - it might appear that a person is assigned to themselves: - - >>> names = ['Alice', 'Bob', 'Bob'] - >>> list(derangements(names)) - [('Bob', 'Bob', 'Alice'), ('Bob', 'Alice', 'Bob')] - - To avoid confusion, make the inputs distinct: - - >>> deduped = [f'{name}{index}' for index, name in enumerate(names)] - >>> list(derangements(deduped)) - [('Bob1', 'Bob2', 'Alice0'), ('Bob2', 'Alice0', 'Bob1')] - - The number of derangements of a set of size *n* is known as the - "subfactorial of n". For n > 0, the subfactorial is: - ``round(math.factorial(n) / math.e)``. - - References: - - * Article: https://www.numberanalytics.com/blog/ultimate-guide-to-derangements-in-combinatorics - * Sizes: https://oeis.org/A000166 - """ - xs = tuple(iterable) - ys = tuple(range(len(xs))) - return compress( - permutations(xs, r=r), - map(all, map(map, repeat(is_not), repeat(ys), permutations(ys, r=r))), - ) - - -def intersperse(e, iterable, n=1): - """Intersperse filler element *e* among the items in *iterable*, leaving - *n* items between each filler element. - - >>> list(intersperse('!', [1, 2, 3, 4, 5])) - [1, '!', 2, '!', 3, '!', 4, '!', 5] - - >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2)) - [1, 2, None, 3, 4, None, 5] - - """ - if n == 0: - raise ValueError('n must be > 0') - elif n == 1: - # interleave(repeat(e), iterable) -> e, x_0, e, x_1, e, x_2... - # islice(..., 1, None) -> x_0, e, x_1, e, x_2... - return islice(interleave(repeat(e), iterable), 1, None) - else: - # interleave(filler, chunks) -> [e], [x_0, x_1], [e], [x_2, x_3]... - # islice(..., 1, None) -> [x_0, x_1], [e], [x_2, x_3]... - # flatten(...) -> x_0, x_1, e, x_2, x_3... - filler = repeat([e]) - chunks = chunked(iterable, n) - return flatten(islice(interleave(filler, chunks), 1, None)) - - -def unique_to_each(*iterables): - """Return the elements from each of the input iterables that aren't in the - other input iterables. - - For example, suppose you have a set of packages, each with a set of - dependencies:: - - {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}} - - If you remove one package, which dependencies can also be removed? - - If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not - associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for - ``pkg_2``, and ``D`` is only needed for ``pkg_3``:: - - >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'}) - [['A'], ['C'], ['D']] - - If there are duplicates in one input iterable that aren't in the others - they will be duplicated in the output. Input order is preserved:: - - >>> unique_to_each("mississippi", "missouri") - [['p', 'p'], ['o', 'u', 'r']] - - It is assumed that the elements of each iterable are hashable. - - """ - pool = [list(it) for it in iterables] - counts = Counter(chain.from_iterable(map(set, pool))) - uniques = {element for element in counts if counts[element] == 1} - return [list(filter(uniques.__contains__, it)) for it in pool] - - -def windowed(seq, n, fillvalue=None, step=1): - """Return a sliding window of width *n* over the given iterable. - - >>> all_windows = windowed([1, 2, 3, 4, 5], 3) - >>> list(all_windows) - [(1, 2, 3), (2, 3, 4), (3, 4, 5)] - - When the window is larger than the iterable, *fillvalue* is used in place - of missing values: - - >>> list(windowed([1, 2, 3], 4)) - [(1, 2, 3, None)] - - Each window will advance in increments of *step*: - - >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2)) - [(1, 2, 3), (3, 4, 5), (5, 6, '!')] - - To slide into the iterable's items, use :func:`chain` to add filler items - to the left: - - >>> iterable = [1, 2, 3, 4] - >>> n = 3 - >>> padding = [None] * (n - 1) - >>> list(windowed(chain(padding, iterable), 3)) - [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)] - """ - if n < 0: - raise ValueError('n must be >= 0') - if n == 0: - yield () - return - if step < 1: - raise ValueError('step must be >= 1') - - iterator = iter(seq) - - # Generate first window - window = deque(islice(iterator, n), maxlen=n) - - # Deal with the first window not being full - if not window: - return - if len(window) < n: - yield tuple(window) + ((fillvalue,) * (n - len(window))) - return - yield tuple(window) - - # Create the filler for the next windows. The padding ensures - # we have just enough elements to fill the last window. - padding = (fillvalue,) * (n - 1 if step >= n else step - 1) - filler = map(window.append, chain(iterator, padding)) - - # Generate the rest of the windows - for _ in islice(filler, step - 1, None, step): - yield tuple(window) - - -def substrings(iterable): - """Yield all of the substrings of *iterable*. - - >>> [''.join(s) for s in substrings('more')] - ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more'] - - Note that non-string iterables can also be subdivided. - - >>> list(substrings([0, 1, 2])) - [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)] - - """ - # The length-1 substrings - seq = [] - for item in iterable: - seq.append(item) - yield (item,) - seq = tuple(seq) - item_count = len(seq) - - # And the rest - for n in range(2, item_count + 1): - for i in range(item_count - n + 1): - yield seq[i : i + n] - - -def substrings_indexes(seq, reverse=False): - """Yield all substrings and their positions in *seq* - - The items yielded will be a tuple of the form ``(substr, i, j)``, where - ``substr == seq[i:j]``. - - This function only works for iterables that support slicing, such as - ``str`` objects. - - >>> for item in substrings_indexes('more'): - ... print(item) - ('m', 0, 1) - ('o', 1, 2) - ('r', 2, 3) - ('e', 3, 4) - ('mo', 0, 2) - ('or', 1, 3) - ('re', 2, 4) - ('mor', 0, 3) - ('ore', 1, 4) - ('more', 0, 4) - - Set *reverse* to ``True`` to yield the same items in the opposite order. - - - """ - r = range(1, len(seq) + 1) - if reverse: - r = reversed(r) - return ( - (seq[i : i + L], i, i + L) for L in r for i in range(len(seq) - L + 1) - ) - - -class bucket: - """Wrap *iterable* and return an object that buckets the iterable into - child iterables based on a *key* function. - - >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] - >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character - >>> sorted(list(s)) # Get the keys - ['a', 'b', 'c'] - >>> a_iterable = s['a'] - >>> next(a_iterable) - 'a1' - >>> next(a_iterable) - 'a2' - >>> list(s['b']) - ['b1', 'b2', 'b3'] - - The original iterable will be advanced and its items will be cached until - they are used by the child iterables. This may require significant storage. - - By default, attempting to select a bucket to which no items belong will - exhaust the iterable and cache all values. - If you specify a *validator* function, selected buckets will instead be - checked against it. - - >>> from itertools import count - >>> it = count(1, 2) # Infinite sequence of odd numbers - >>> key = lambda x: x % 10 # Bucket by last digit - >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only - >>> s = bucket(it, key=key, validator=validator) - >>> 2 in s - False - >>> list(s[2]) - [] - - """ - - def __init__(self, iterable, key, validator=None): - self._it = iter(iterable) - self._key = key - self._cache = defaultdict(deque) - self._validator = validator or (lambda x: True) - - def __contains__(self, value): - if not self._validator(value): - return False - - try: - item = next(self[value]) - except StopIteration: - return False - else: - self._cache[value].appendleft(item) - - return True - - def _get_values(self, value): - """ - Helper to yield items from the parent iterator that match *value*. - Items that don't match are stored in the local cache as they - are encountered. - """ - while True: - # If we've cached some items that match the target value, emit - # the first one and evict it from the cache. - if self._cache[value]: - yield self._cache[value].popleft() - # Otherwise we need to advance the parent iterator to search for - # a matching item, caching the rest. - else: - while True: - try: - item = next(self._it) - except StopIteration: - return - item_value = self._key(item) - if item_value == value: - yield item - break - elif self._validator(item_value): - self._cache[item_value].append(item) - - def __iter__(self): - for item in self._it: - item_value = self._key(item) - if self._validator(item_value): - self._cache[item_value].append(item) - - return iter(self._cache) - - def __getitem__(self, value): - if not self._validator(value): - return iter(()) - - return self._get_values(value) - - -def spy(iterable, n=1): - """Return a 2-tuple with a list containing the first *n* elements of - *iterable*, and an iterator with the same items as *iterable*. - This allows you to "look ahead" at the items in the iterable without - advancing it. - - There is one item in the list by default: - - >>> iterable = 'abcdefg' - >>> head, iterable = spy(iterable) - >>> head - ['a'] - >>> list(iterable) - ['a', 'b', 'c', 'd', 'e', 'f', 'g'] - - You may use unpacking to retrieve items instead of lists: - - >>> (head,), iterable = spy('abcdefg') - >>> head - 'a' - >>> (first, second), iterable = spy('abcdefg', 2) - >>> first - 'a' - >>> second - 'b' - - The number of items requested can be larger than the number of items in - the iterable: - - >>> iterable = [1, 2, 3, 4, 5] - >>> head, iterable = spy(iterable, 10) - >>> head - [1, 2, 3, 4, 5] - >>> list(iterable) - [1, 2, 3, 4, 5] - - """ - p, q = tee(iterable) - return take(n, q), p - - -def interleave(*iterables): - """Return a new iterable yielding from each iterable in turn, - until the shortest is exhausted. - - >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8])) - [1, 4, 6, 2, 5, 7] - - For a version that doesn't terminate after the shortest iterable is - exhausted, see :func:`interleave_longest`. - - """ - return chain.from_iterable(zip(*iterables)) - - -def interleave_longest(*iterables): - """Return a new iterable yielding from each iterable in turn, - skipping any that are exhausted. - - >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8])) - [1, 4, 6, 2, 5, 7, 3, 8] - - This function produces the same output as :func:`roundrobin`, but may - perform better for some inputs (in particular when the number of iterables - is large). - - """ - for xs in zip_longest(*iterables, fillvalue=_marker): - for x in xs: - if x is not _marker: - yield x - - -def interleave_evenly(iterables, lengths=None): - """ - Interleave multiple iterables so that their elements are evenly distributed - throughout the output sequence. - - >>> iterables = [1, 2, 3, 4, 5], ['a', 'b'] - >>> list(interleave_evenly(iterables)) - [1, 2, 'a', 3, 4, 'b', 5] - - >>> iterables = [[1, 2, 3], [4, 5], [6, 7, 8]] - >>> list(interleave_evenly(iterables)) - [1, 6, 4, 2, 7, 3, 8, 5] - - This function requires iterables of known length. Iterables without - ``__len__()`` can be used by manually specifying lengths with *lengths*: - - >>> from itertools import combinations, repeat - >>> iterables = [combinations(range(4), 2), ['a', 'b', 'c']] - >>> lengths = [4 * (4 - 1) // 2, 3] - >>> list(interleave_evenly(iterables, lengths=lengths)) - [(0, 1), (0, 2), 'a', (0, 3), (1, 2), 'b', (1, 3), (2, 3), 'c'] - - Based on Bresenham's algorithm. - """ - if lengths is None: - try: - lengths = [len(it) for it in iterables] - except TypeError: - raise ValueError( - 'Iterable lengths could not be determined automatically. ' - 'Specify them with the lengths keyword.' - ) - elif len(iterables) != len(lengths): - raise ValueError('Mismatching number of iterables and lengths.') - - dims = len(lengths) - - # sort iterables by length, descending - lengths_permute = sorted( - range(dims), key=lambda i: lengths[i], reverse=True - ) - lengths_desc = [lengths[i] for i in lengths_permute] - iters_desc = [iter(iterables[i]) for i in lengths_permute] - - # the longest iterable is the primary one (Bresenham: the longest - # distance along an axis) - delta_primary, deltas_secondary = lengths_desc[0], lengths_desc[1:] - iter_primary, iters_secondary = iters_desc[0], iters_desc[1:] - errors = [delta_primary // dims] * len(deltas_secondary) - - to_yield = sum(lengths) - while to_yield: - yield next(iter_primary) - to_yield -= 1 - # update errors for each secondary iterable - errors = [e - delta for e, delta in zip(errors, deltas_secondary)] - - # those iterables for which the error is negative are yielded - # ("diagonal step" in Bresenham) - for i, e_ in enumerate(errors): - if e_ < 0: - yield next(iters_secondary[i]) - to_yield -= 1 - errors[i] += delta_primary - - -def interleave_randomly(*iterables): - """Repeatedly select one of the input *iterables* at random and yield the next - item from it. - - >>> iterables = [1, 2, 3], 'abc', (True, False, None) - >>> list(interleave_randomly(*iterables)) # doctest: +SKIP - ['a', 'b', 1, 'c', True, False, None, 2, 3] - - The relative order of the items in each input iterable will preserved. Note the - sequences of items with this property are not equally likely to be generated. - - """ - iterators = [iter(e) for e in iterables] - while iterators: - idx = randrange(len(iterators)) - try: - yield next(iterators[idx]) - except StopIteration: - # equivalent to `list.pop` but slightly faster - iterators[idx] = iterators[-1] - del iterators[-1] - - -def collapse(iterable, base_type=None, levels=None): - """Flatten an iterable with multiple levels of nesting (e.g., a list of - lists of tuples) into non-iterable types. - - >>> iterable = [(1, 2), ([3, 4], [[5], [6]])] - >>> list(collapse(iterable)) - [1, 2, 3, 4, 5, 6] - - Binary and text strings are not considered iterable and - will not be collapsed. - - To avoid collapsing other types, specify *base_type*: - - >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']] - >>> list(collapse(iterable, base_type=tuple)) - ['ab', ('cd', 'ef'), 'gh', 'ij'] - - Specify *levels* to stop flattening after a certain level: - - >>> iterable = [('a', ['b']), ('c', ['d'])] - >>> list(collapse(iterable)) # Fully flattened - ['a', 'b', 'c', 'd'] - >>> list(collapse(iterable, levels=1)) # Only one level flattened - ['a', ['b'], 'c', ['d']] - - """ - stack = deque() - # Add our first node group, treat the iterable as a single node - stack.appendleft((0, repeat(iterable, 1))) - - while stack: - node_group = stack.popleft() - level, nodes = node_group - - # Check if beyond max level - if levels is not None and level > levels: - yield from nodes - continue - - for node in nodes: - # Check if done iterating - if isinstance(node, (str, bytes)) or ( - (base_type is not None) and isinstance(node, base_type) - ): - yield node - # Otherwise try to create child nodes - else: - try: - tree = iter(node) - except TypeError: - yield node - else: - # Save our current location - stack.appendleft(node_group) - # Append the new child node - stack.appendleft((level + 1, tree)) - # Break to process child node - break - - -def side_effect(func, iterable, chunk_size=None, before=None, after=None): - """Invoke *func* on each item in *iterable* (or on each *chunk_size* group - of items) before yielding the item. - - `func` must be a function that takes a single argument. Its return value - will be discarded. - - *before* and *after* are optional functions that take no arguments. They - will be executed before iteration starts and after it ends, respectively. - - `side_effect` can be used for logging, updating progress bars, or anything - that is not functionally "pure." - - Emitting a status message: - - >>> from more_itertools import consume - >>> func = lambda item: print('Received {}'.format(item)) - >>> consume(side_effect(func, range(2))) - Received 0 - Received 1 - - Operating on chunks of items: - - >>> pair_sums = [] - >>> func = lambda chunk: pair_sums.append(sum(chunk)) - >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2)) - [0, 1, 2, 3, 4, 5] - >>> list(pair_sums) - [1, 5, 9] - - Writing to a file-like object: - - >>> from io import StringIO - >>> from more_itertools import consume - >>> f = StringIO() - >>> func = lambda x: print(x, file=f) - >>> before = lambda: print(u'HEADER', file=f) - >>> after = f.close - >>> it = [u'a', u'b', u'c'] - >>> consume(side_effect(func, it, before=before, after=after)) - >>> f.closed - True - - """ - try: - if before is not None: - before() - - if chunk_size is None: - for item in iterable: - func(item) - yield item - else: - for chunk in chunked(iterable, chunk_size): - func(chunk) - yield from chunk - finally: - if after is not None: - after() - - -def sliced(seq, n, strict=False): - """Yield slices of length *n* from the sequence *seq*. - - >>> list(sliced((1, 2, 3, 4, 5, 6), 3)) - [(1, 2, 3), (4, 5, 6)] - - By the default, the last yielded slice will have fewer than *n* elements - if the length of *seq* is not divisible by *n*: - - >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3)) - [(1, 2, 3), (4, 5, 6), (7, 8)] - - If the length of *seq* is not divisible by *n* and *strict* is - ``True``, then ``ValueError`` will be raised before the last - slice is yielded. - - This function will only work for iterables that support slicing. - For non-sliceable iterables, see :func:`chunked`. - - """ - iterator = takewhile(len, (seq[i : i + n] for i in count(0, n))) - if strict: - - def ret(): - for _slice in iterator: - if len(_slice) != n: - raise ValueError("seq is not divisible by n.") - yield _slice - - return ret() - else: - return iterator - - -def split_at(iterable, pred, maxsplit=-1, keep_separator=False): - """Yield lists of items from *iterable*, where each list is delimited by - an item where callable *pred* returns ``True``. - - >>> list(split_at('abcdcba', lambda x: x == 'b')) - [['a'], ['c', 'd', 'c'], ['a']] - - >>> list(split_at(range(10), lambda n: n % 2 == 1)) - [[0], [2], [4], [6], [8], []] - - At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, - then there is no limit on the number of splits: - - >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2)) - [[0], [2], [4, 5, 6, 7, 8, 9]] - - By default, the delimiting items are not included in the output. - To include them, set *keep_separator* to ``True``. - - >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True)) - [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']] - - """ - if maxsplit == 0: - yield list(iterable) - return - - buf = [] - it = iter(iterable) - for item in it: - if pred(item): - yield buf - if keep_separator: - yield [item] - if maxsplit == 1: - yield list(it) - return - buf = [] - maxsplit -= 1 - else: - buf.append(item) - yield buf - - -def split_before(iterable, pred, maxsplit=-1): - """Yield lists of items from *iterable*, where each list ends just before - an item for which callable *pred* returns ``True``: - - >>> list(split_before('OneTwo', lambda s: s.isupper())) - [['O', 'n', 'e'], ['T', 'w', 'o']] - - >>> list(split_before(range(10), lambda n: n % 3 == 0)) - [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]] - - At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, - then there is no limit on the number of splits: - - >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2)) - [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]] - """ - if maxsplit == 0: - yield list(iterable) - return - - buf = [] - it = iter(iterable) - for item in it: - if pred(item) and buf: - yield buf - if maxsplit == 1: - yield [item, *it] - return - buf = [] - maxsplit -= 1 - buf.append(item) - if buf: - yield buf - - -def split_after(iterable, pred, maxsplit=-1): - """Yield lists of items from *iterable*, where each list ends with an - item where callable *pred* returns ``True``: - - >>> list(split_after('one1two2', lambda s: s.isdigit())) - [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']] - - >>> list(split_after(range(10), lambda n: n % 3 == 0)) - [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]] - - At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, - then there is no limit on the number of splits: - - >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2)) - [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]] - - """ - if maxsplit == 0: - yield list(iterable) - return - - buf = [] - it = iter(iterable) - for item in it: - buf.append(item) - if pred(item) and buf: - yield buf - if maxsplit == 1: - buf = list(it) - if buf: - yield buf - return - buf = [] - maxsplit -= 1 - if buf: - yield buf - - -def split_when(iterable, pred, maxsplit=-1): - """Split *iterable* into pieces based on the output of *pred*. - *pred* should be a function that takes successive pairs of items and - returns ``True`` if the iterable should be split in between them. - - For example, to find runs of increasing numbers, split the iterable when - element ``i`` is larger than element ``i + 1``: - - >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y)) - [[1, 2, 3, 3], [2, 5], [2, 4], [2]] - - At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, - then there is no limit on the number of splits: - - >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], - ... lambda x, y: x > y, maxsplit=2)) - [[1, 2, 3, 3], [2, 5], [2, 4, 2]] - - """ - if maxsplit == 0: - yield list(iterable) - return - - it = iter(iterable) - try: - cur_item = next(it) - except StopIteration: - return - - buf = [cur_item] - for next_item in it: - if pred(cur_item, next_item): - yield buf - if maxsplit == 1: - yield [next_item, *it] - return - buf = [] - maxsplit -= 1 - - buf.append(next_item) - cur_item = next_item - - yield buf - - -def split_into(iterable, sizes): - """Yield a list of sequential items from *iterable* of length 'n' for each - integer 'n' in *sizes*. - - >>> list(split_into([1,2,3,4,5,6], [1,2,3])) - [[1], [2, 3], [4, 5, 6]] - - If the sum of *sizes* is smaller than the length of *iterable*, then the - remaining items of *iterable* will not be returned. - - >>> list(split_into([1,2,3,4,5,6], [2,3])) - [[1, 2], [3, 4, 5]] - - If the sum of *sizes* is larger than the length of *iterable*, fewer items - will be returned in the iteration that overruns the *iterable* and further - lists will be empty: - - >>> list(split_into([1,2,3,4], [1,2,3,4])) - [[1], [2, 3], [4], []] - - When a ``None`` object is encountered in *sizes*, the returned list will - contain items up to the end of *iterable* the same way that - :func:`itertools.slice` does: - - >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None])) - [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]] - - :func:`split_into` can be useful for grouping a series of items where the - sizes of the groups are not uniform. An example would be where in a row - from a table, multiple columns represent elements of the same feature - (e.g. a point represented by x,y,z) but, the format is not the same for - all columns. - """ - # convert the iterable argument into an iterator so its contents can - # be consumed by islice in case it is a generator - it = iter(iterable) - - for size in sizes: - if size is None: - yield list(it) - return - else: - yield list(islice(it, size)) - - -def padded(iterable, fillvalue=None, n=None, next_multiple=False): - """Yield the elements from *iterable*, followed by *fillvalue*, such that - at least *n* items are emitted. - - >>> list(padded([1, 2, 3], '?', 5)) - [1, 2, 3, '?', '?'] - - If *next_multiple* is ``True``, *fillvalue* will be emitted until the - number of items emitted is a multiple of *n*: - - >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True)) - [1, 2, 3, 4, None, None] - - If *n* is ``None``, *fillvalue* will be emitted indefinitely. - - To create an *iterable* of exactly size *n*, you can truncate with - :func:`islice`. - - >>> list(islice(padded([1, 2, 3], '?'), 5)) - [1, 2, 3, '?', '?'] - >>> list(islice(padded([1, 2, 3, 4, 5, 6, 7, 8], '?'), 5)) - [1, 2, 3, 4, 5] - - """ - iterator = iter(iterable) - iterator_with_repeat = chain(iterator, repeat(fillvalue)) - - if n is None: - return iterator_with_repeat - elif n < 1: - raise ValueError('n must be at least 1') - elif next_multiple: - - def slice_generator(): - for first in iterator: - yield (first,) - yield islice(iterator_with_repeat, n - 1) - - # While elements exist produce slices of size n - return chain.from_iterable(slice_generator()) - else: - # Ensure the first batch is at least size n then iterate - return chain(islice(iterator_with_repeat, n), iterator) - - -def repeat_each(iterable, n=2): - """Repeat each element in *iterable* *n* times. - - >>> list(repeat_each('ABC', 3)) - ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'] - """ - return chain.from_iterable(map(repeat, iterable, repeat(n))) - - -def repeat_last(iterable, default=None): - """After the *iterable* is exhausted, keep yielding its last element. - - >>> list(islice(repeat_last(range(3)), 5)) - [0, 1, 2, 2, 2] - - If the iterable is empty, yield *default* forever:: - - >>> list(islice(repeat_last(range(0), 42), 5)) - [42, 42, 42, 42, 42] - - """ - item = _marker - for item in iterable: - yield item - final = default if item is _marker else item - yield from repeat(final) - - -def distribute(n, iterable): - """Distribute the items from *iterable* among *n* smaller iterables. - - >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6]) - >>> list(group_1) - [1, 3, 5] - >>> list(group_2) - [2, 4, 6] - - If the length of *iterable* is not evenly divisible by *n*, then the - length of the returned iterables will not be identical: - - >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7]) - >>> [list(c) for c in children] - [[1, 4, 7], [2, 5], [3, 6]] - - If the length of *iterable* is smaller than *n*, then the last returned - iterables will be empty: - - >>> children = distribute(5, [1, 2, 3]) - >>> [list(c) for c in children] - [[1], [2], [3], [], []] - - This function uses :func:`itertools.tee` and may require significant - storage. - - If you need the order items in the smaller iterables to match the - original iterable, see :func:`divide`. - - """ - if n < 1: - raise ValueError('n must be at least 1') - - children = tee(iterable, n) - return [islice(it, index, None, n) for index, it in enumerate(children)] - - -def stagger(iterable, offsets=(-1, 0, 1), longest=False, fillvalue=None): - """Yield tuples whose elements are offset from *iterable*. - The amount by which the `i`-th item in each tuple is offset is given by - the `i`-th item in *offsets*. - - >>> list(stagger([0, 1, 2, 3])) - [(None, 0, 1), (0, 1, 2), (1, 2, 3)] - >>> list(stagger(range(8), offsets=(0, 2, 4))) - [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)] - - By default, the sequence will end when the final element of a tuple is the - last item in the iterable. To continue until the first element of a tuple - is the last item in the iterable, set *longest* to ``True``:: - - >>> list(stagger([0, 1, 2, 3], longest=True)) - [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)] - - By default, ``None`` will be used to replace offsets beyond the end of the - sequence. Specify *fillvalue* to use some other value. - - """ - children = tee(iterable, len(offsets)) - - return zip_offset( - *children, offsets=offsets, longest=longest, fillvalue=fillvalue - ) - - -def zip_equal(*iterables): - """``zip`` the input *iterables* together but raise - ``UnequalIterablesError`` if they aren't all the same length. - - >>> it_1 = range(3) - >>> it_2 = iter('abc') - >>> list(zip_equal(it_1, it_2)) - [(0, 'a'), (1, 'b'), (2, 'c')] - - >>> it_1 = range(3) - >>> it_2 = iter('abcd') - >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - more_itertools.more.UnequalIterablesError: Iterables have different - lengths - - """ - if hexversion >= 0x30A00A6: - warnings.warn( - ( - 'zip_equal will be removed in a future version of ' - 'more-itertools. Use the builtin zip function with ' - 'strict=True instead.' - ), - DeprecationWarning, - ) - - return _zip_equal(*iterables) - - -def zip_offset(*iterables, offsets, longest=False, fillvalue=None): - """``zip`` the input *iterables* together, but offset the `i`-th iterable - by the `i`-th item in *offsets*. - - >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1))) - [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')] - - This can be used as a lightweight alternative to SciPy or pandas to analyze - data sets in which some series have a lead or lag relationship. - - By default, the sequence will end when the shortest iterable is exhausted. - To continue until the longest iterable is exhausted, set *longest* to - ``True``. - - >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True)) - [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')] - - By default, ``None`` will be used to replace offsets beyond the end of the - sequence. Specify *fillvalue* to use some other value. - - """ - if len(iterables) != len(offsets): - raise ValueError("Number of iterables and offsets didn't match") - - staggered = [] - for it, n in zip(iterables, offsets): - if n < 0: - staggered.append(chain(repeat(fillvalue, -n), it)) - elif n > 0: - staggered.append(islice(it, n, None)) - else: - staggered.append(it) - - if longest: - return zip_longest(*staggered, fillvalue=fillvalue) - - return zip(*staggered) - - -def sort_together( - iterables, key_list=(0,), key=None, reverse=False, strict=False -): - """Return the input iterables sorted together, with *key_list* as the - priority for sorting. All iterables are trimmed to the length of the - shortest one. - - This can be used like the sorting function in a spreadsheet. If each - iterable represents a column of data, the key list determines which - columns are used for sorting. - - By default, all iterables are sorted using the ``0``-th iterable:: - - >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')] - >>> sort_together(iterables) - [(1, 2, 3, 4), ('d', 'c', 'b', 'a')] - - Set a different key list to sort according to another iterable. - Specifying multiple keys dictates how ties are broken:: - - >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')] - >>> sort_together(iterables, key_list=(1, 2)) - [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')] - - To sort by a function of the elements of the iterable, pass a *key* - function. Its arguments are the elements of the iterables corresponding to - the key list:: - - >>> names = ('a', 'b', 'c') - >>> lengths = (1, 2, 3) - >>> widths = (5, 2, 1) - >>> def area(length, width): - ... return length * width - >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area) - [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)] - - Set *reverse* to ``True`` to sort in descending order. - - >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True) - [(3, 2, 1), ('a', 'b', 'c')] - - If the *strict* keyword argument is ``True``, then - ``UnequalIterablesError`` will be raised if any of the iterables have - different lengths. - - """ - if key is None: - # if there is no key function, the key argument to sorted is an - # itemgetter - key_argument = itemgetter(*key_list) - else: - # if there is a key function, call it with the items at the offsets - # specified by the key function as arguments - key_list = list(key_list) - if len(key_list) == 1: - # if key_list contains a single item, pass the item at that offset - # as the only argument to the key function - key_offset = key_list[0] - key_argument = lambda zipped_items: key(zipped_items[key_offset]) - else: - # if key_list contains multiple items, use itemgetter to return a - # tuple of items, which we pass as *args to the key function - get_key_items = itemgetter(*key_list) - key_argument = lambda zipped_items: key( - *get_key_items(zipped_items) - ) - - zipper = zip_equal if strict else zip - return list( - zipper(*sorted(zipper(*iterables), key=key_argument, reverse=reverse)) - ) - - -def unzip(iterable): - """The inverse of :func:`zip`, this function disaggregates the elements - of the zipped *iterable*. - - The ``i``-th iterable contains the ``i``-th element from each element - of the zipped iterable. The first element is used to determine the - length of the remaining elements. - - >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] - >>> letters, numbers = unzip(iterable) - >>> list(letters) - ['a', 'b', 'c', 'd'] - >>> list(numbers) - [1, 2, 3, 4] - - This is similar to using ``zip(*iterable)``, but it avoids reading - *iterable* into memory. Note, however, that this function uses - :func:`itertools.tee` and thus may require significant storage. - - """ - head, iterable = spy(iterable) - if not head: - # empty iterable, e.g. zip([], [], []) - return () - # spy returns a one-length iterable as head - head = head[0] - iterables = tee(iterable, len(head)) - - # If we have an iterable like iter([(1, 2, 3), (4, 5), (6,)]), - # the second unzipped iterable fails at the third tuple since - # it tries to access (6,)[1]. - # Same with the third unzipped iterable and the second tuple. - # To support these "improperly zipped" iterables, we suppress - # the IndexError, which just stops the unzipped iterables at - # first length mismatch. - return tuple( - iter_suppress(map(itemgetter(i), it), IndexError) - for i, it in enumerate(iterables) - ) - - -def divide(n, iterable): - """Divide the elements from *iterable* into *n* parts, maintaining - order. - - >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6]) - >>> list(group_1) - [1, 2, 3] - >>> list(group_2) - [4, 5, 6] - - If the length of *iterable* is not evenly divisible by *n*, then the - length of the returned iterables will not be identical: - - >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7]) - >>> [list(c) for c in children] - [[1, 2, 3], [4, 5], [6, 7]] - - If the length of the iterable is smaller than n, then the last returned - iterables will be empty: - - >>> children = divide(5, [1, 2, 3]) - >>> [list(c) for c in children] - [[1], [2], [3], [], []] - - This function will exhaust the iterable before returning. - If order is not important, see :func:`distribute`, which does not first - pull the iterable into memory. - - """ - if n < 1: - raise ValueError('n must be at least 1') - - try: - iterable[:0] - except TypeError: - seq = tuple(iterable) - else: - seq = iterable - - q, r = divmod(len(seq), n) - - ret = [] - stop = 0 - for i in range(1, n + 1): - start = stop - stop += q + 1 if i <= r else q - ret.append(iter(seq[start:stop])) - - return ret - - -def always_iterable(obj, base_type=(str, bytes)): - """If *obj* is iterable, return an iterator over its items:: - - >>> obj = (1, 2, 3) - >>> list(always_iterable(obj)) - [1, 2, 3] - - If *obj* is not iterable, return a one-item iterable containing *obj*:: - - >>> obj = 1 - >>> list(always_iterable(obj)) - [1] - - If *obj* is ``None``, return an empty iterable: - - >>> obj = None - >>> list(always_iterable(None)) - [] - - By default, binary and text strings are not considered iterable:: - - >>> obj = 'foo' - >>> list(always_iterable(obj)) - ['foo'] - - If *base_type* is set, objects for which ``isinstance(obj, base_type)`` - returns ``True`` won't be considered iterable. - - >>> obj = {'a': 1} - >>> list(always_iterable(obj)) # Iterate over the dict's keys - ['a'] - >>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit - [{'a': 1}] - - Set *base_type* to ``None`` to avoid any special handling and treat objects - Python considers iterable as iterable: - - >>> obj = 'foo' - >>> list(always_iterable(obj, base_type=None)) - ['f', 'o', 'o'] - """ - if obj is None: - return iter(()) - - if (base_type is not None) and isinstance(obj, base_type): - return iter((obj,)) - - try: - return iter(obj) - except TypeError: - return iter((obj,)) - - -def adjacent(predicate, iterable, distance=1): - """Return an iterable over `(bool, item)` tuples where the `item` is - drawn from *iterable* and the `bool` indicates whether - that item satisfies the *predicate* or is adjacent to an item that does. - - For example, to find whether items are adjacent to a ``3``:: - - >>> list(adjacent(lambda x: x == 3, range(6))) - [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)] - - Set *distance* to change what counts as adjacent. For example, to find - whether items are two places away from a ``3``: - - >>> list(adjacent(lambda x: x == 3, range(6), distance=2)) - [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)] - - This is useful for contextualizing the results of a search function. - For example, a code comparison tool might want to identify lines that - have changed, but also surrounding lines to give the viewer of the diff - context. - - The predicate function will only be called once for each item in the - iterable. - - See also :func:`groupby_transform`, which can be used with this function - to group ranges of items with the same `bool` value. - - """ - # Allow distance=0 mainly for testing that it reproduces results with map() - if distance < 0: - raise ValueError('distance must be at least 0') - - i1, i2 = tee(iterable) - padding = [False] * distance - selected = chain(padding, map(predicate, i1), padding) - adjacent_to_selected = map(any, windowed(selected, 2 * distance + 1)) - return zip(adjacent_to_selected, i2) - - -def groupby_transform(iterable, keyfunc=None, valuefunc=None, reducefunc=None): - """An extension of :func:`itertools.groupby` that can apply transformations - to the grouped data. - - * *keyfunc* is a function computing a key value for each item in *iterable* - * *valuefunc* is a function that transforms the individual items from - *iterable* after grouping - * *reducefunc* is a function that transforms each group of items - - >>> iterable = 'aAAbBBcCC' - >>> keyfunc = lambda k: k.upper() - >>> valuefunc = lambda v: v.lower() - >>> reducefunc = lambda g: ''.join(g) - >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc)) - [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')] - - Each optional argument defaults to an identity function if not specified. - - :func:`groupby_transform` is useful when grouping elements of an iterable - using a separate iterable as the key. To do this, :func:`zip` the iterables - and pass a *keyfunc* that extracts the first element and a *valuefunc* - that extracts the second element:: - - >>> from operator import itemgetter - >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3] - >>> values = 'abcdefghi' - >>> iterable = zip(keys, values) - >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1)) - >>> [(k, ''.join(g)) for k, g in grouper] - [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')] - - Note that the order of items in the iterable is significant. - Only adjacent items are grouped together, so if you don't want any - duplicate groups, you should sort the iterable by the key function. - - """ - ret = groupby(iterable, keyfunc) - if valuefunc: - ret = ((k, map(valuefunc, g)) for k, g in ret) - if reducefunc: - ret = ((k, reducefunc(g)) for k, g in ret) - - return ret - - -class numeric_range(abc.Sequence, abc.Hashable): - """An extension of the built-in ``range()`` function whose arguments can - be any orderable numeric type. - - With only *stop* specified, *start* defaults to ``0`` and *step* - defaults to ``1``. The output items will match the type of *stop*: - - >>> list(numeric_range(3.5)) - [0.0, 1.0, 2.0, 3.0] - - With only *start* and *stop* specified, *step* defaults to ``1``. The - output items will match the type of *start*: - - >>> from decimal import Decimal - >>> start = Decimal('2.1') - >>> stop = Decimal('5.1') - >>> list(numeric_range(start, stop)) - [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')] - - With *start*, *stop*, and *step* specified the output items will match - the type of ``start + step``: - - >>> from fractions import Fraction - >>> start = Fraction(1, 2) # Start at 1/2 - >>> stop = Fraction(5, 2) # End at 5/2 - >>> step = Fraction(1, 2) # Count by 1/2 - >>> list(numeric_range(start, stop, step)) - [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)] - - If *step* is zero, ``ValueError`` is raised. Negative steps are supported: - - >>> list(numeric_range(3, -1, -1.0)) - [3.0, 2.0, 1.0, 0.0] - - Be aware of the limitations of floating-point numbers; the representation - of the yielded numbers may be surprising. - - ``datetime.datetime`` objects can be used for *start* and *stop*, if *step* - is a ``datetime.timedelta`` object: - - >>> import datetime - >>> start = datetime.datetime(2019, 1, 1) - >>> stop = datetime.datetime(2019, 1, 3) - >>> step = datetime.timedelta(days=1) - >>> items = iter(numeric_range(start, stop, step)) - >>> next(items) - datetime.datetime(2019, 1, 1, 0, 0) - >>> next(items) - datetime.datetime(2019, 1, 2, 0, 0) - - """ - - _EMPTY_HASH = hash(range(0, 0)) - - def __init__(self, *args): - argc = len(args) - if argc == 1: - (self._stop,) = args - self._start = type(self._stop)(0) - self._step = type(self._stop - self._start)(1) - elif argc == 2: - self._start, self._stop = args - self._step = type(self._stop - self._start)(1) - elif argc == 3: - self._start, self._stop, self._step = args - elif argc == 0: - raise TypeError( - f'numeric_range expected at least 1 argument, got {argc}' - ) - else: - raise TypeError( - f'numeric_range expected at most 3 arguments, got {argc}' - ) - - self._zero = type(self._step)(0) - if self._step == self._zero: - raise ValueError('numeric_range() arg 3 must not be zero') - self._growing = self._step > self._zero - - def __bool__(self): - if self._growing: - return self._start < self._stop - else: - return self._start > self._stop - - def __contains__(self, elem): - if self._growing: - if self._start <= elem < self._stop: - return (elem - self._start) % self._step == self._zero - else: - if self._start >= elem > self._stop: - return (self._start - elem) % (-self._step) == self._zero - - return False - - def __eq__(self, other): - if isinstance(other, numeric_range): - empty_self = not bool(self) - empty_other = not bool(other) - if empty_self or empty_other: - return empty_self and empty_other # True if both empty - else: - return ( - self._start == other._start - and self._step == other._step - and self._get_by_index(-1) == other._get_by_index(-1) - ) - else: - return False - - def __getitem__(self, key): - if isinstance(key, int): - return self._get_by_index(key) - elif isinstance(key, slice): - step = self._step if key.step is None else key.step * self._step - - if key.start is None or key.start <= -self._len: - start = self._start - elif key.start >= self._len: - start = self._stop - else: # -self._len < key.start < self._len - start = self._get_by_index(key.start) - - if key.stop is None or key.stop >= self._len: - stop = self._stop - elif key.stop <= -self._len: - stop = self._start - else: # -self._len < key.stop < self._len - stop = self._get_by_index(key.stop) - - return numeric_range(start, stop, step) - else: - raise TypeError( - 'numeric range indices must be ' - f'integers or slices, not {type(key).__name__}' - ) - - def __hash__(self): - if self: - return hash((self._start, self._get_by_index(-1), self._step)) - else: - return self._EMPTY_HASH - - def __iter__(self): - values = (self._start + (n * self._step) for n in count()) - if self._growing: - return takewhile(partial(gt, self._stop), values) - else: - return takewhile(partial(lt, self._stop), values) - - def __len__(self): - return self._len - - @cached_property - def _len(self): - if self._growing: - start = self._start - stop = self._stop - step = self._step - else: - start = self._stop - stop = self._start - step = -self._step - distance = stop - start - if distance <= self._zero: - return 0 - else: # distance > 0 and step > 0: regular euclidean division - q, r = divmod(distance, step) - return int(q) + int(r != self._zero) - - def __reduce__(self): - return numeric_range, (self._start, self._stop, self._step) - - def __repr__(self): - if self._step == 1: - return f"numeric_range({self._start!r}, {self._stop!r})" - return ( - f"numeric_range({self._start!r}, {self._stop!r}, {self._step!r})" - ) - - def __reversed__(self): - return iter( - numeric_range( - self._get_by_index(-1), self._start - self._step, -self._step - ) - ) - - def count(self, value): - return int(value in self) - - def index(self, value): - if self._growing: - if self._start <= value < self._stop: - q, r = divmod(value - self._start, self._step) - if r == self._zero: - return int(q) - else: - if self._start >= value > self._stop: - q, r = divmod(self._start - value, -self._step) - if r == self._zero: - return int(q) - - raise ValueError(f"{value} is not in numeric range") - - def _get_by_index(self, i): - if i < 0: - i += self._len - if i < 0 or i >= self._len: - raise IndexError("numeric range object index out of range") - return self._start + i * self._step - - -def count_cycle(iterable, n=None): - """Cycle through the items from *iterable* up to *n* times, yielding - the number of completed cycles along with each item. If *n* is omitted the - process repeats indefinitely. - - >>> list(count_cycle('AB', 3)) - [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')] - - """ - seq = tuple(iterable) - if not seq: - return iter(()) - counter = count() if n is None else range(n) - return zip(repeat_each(counter, len(seq)), cycle(seq)) - - -def mark_ends(iterable): - """Yield 3-tuples of the form ``(is_first, is_last, item)``. - - >>> list(mark_ends('ABC')) - [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')] - - Use this when looping over an iterable to take special action on its first - and/or last items: - - >>> iterable = ['Header', 100, 200, 'Footer'] - >>> total = 0 - >>> for is_first, is_last, item in mark_ends(iterable): - ... if is_first: - ... continue # Skip the header - ... if is_last: - ... continue # Skip the footer - ... total += item - >>> print(total) - 300 - """ - it = iter(iterable) - for a in it: - first = True - for b in it: - yield first, False, a - a = b - first = False - yield first, True, a - - -def locate(iterable, pred=bool, window_size=None): - """Yield the index of each item in *iterable* for which *pred* returns - ``True``. - - *pred* defaults to :func:`bool`, which will select truthy items: - - >>> list(locate([0, 1, 1, 0, 1, 0, 0])) - [1, 2, 4] - - Set *pred* to a custom function to, e.g., find the indexes for a particular - item. - - >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b')) - [1, 3] - - If *window_size* is given, then the *pred* function will be called with - that many items. This enables searching for sub-sequences: - - >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] - >>> pred = lambda *args: args == (1, 2, 3) - >>> list(locate(iterable, pred=pred, window_size=3)) - [1, 5, 9] - - Use with :func:`seekable` to find indexes and then retrieve the associated - items: - - >>> from itertools import count - >>> from more_itertools import seekable - >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count()) - >>> it = seekable(source) - >>> pred = lambda x: x > 100 - >>> indexes = locate(it, pred=pred) - >>> i = next(indexes) - >>> it.seek(i) - >>> next(it) - 106 - - """ - if window_size is None: - return compress(count(), map(pred, iterable)) - - if window_size < 1: - raise ValueError('window size must be at least 1') - - it = windowed(iterable, window_size, fillvalue=_marker) - return compress(count(), starmap(pred, it)) - - -def longest_common_prefix(iterables): - """Yield elements of the longest common prefix among given *iterables*. - - >>> ''.join(longest_common_prefix(['abcd', 'abc', 'abf'])) - 'ab' - - """ - return (c[0] for c in takewhile(all_equal, zip(*iterables))) - - -def lstrip(iterable, pred): - """Yield the items from *iterable*, but strip any from the beginning - for which *pred* returns ``True``. - - For example, to remove a set of items from the start of an iterable: - - >>> iterable = (None, False, None, 1, 2, None, 3, False, None) - >>> pred = lambda x: x in {None, False, ''} - >>> list(lstrip(iterable, pred)) - [1, 2, None, 3, False, None] - - This function is analogous to to :func:`str.lstrip`, and is essentially - an wrapper for :func:`itertools.dropwhile`. - - """ - return dropwhile(pred, iterable) - - -def rstrip(iterable, pred): - """Yield the items from *iterable*, but strip any from the end - for which *pred* returns ``True``. - - For example, to remove a set of items from the end of an iterable: - - >>> iterable = (None, False, None, 1, 2, None, 3, False, None) - >>> pred = lambda x: x in {None, False, ''} - >>> list(rstrip(iterable, pred)) - [None, False, None, 1, 2, None, 3] - - This function is analogous to :func:`str.rstrip`. - - """ - cache = [] - cache_append = cache.append - cache_clear = cache.clear - for x in iterable: - if pred(x): - cache_append(x) - else: - yield from cache - cache_clear() - yield x - - -def strip(iterable, pred): - """Yield the items from *iterable*, but strip any from the - beginning and end for which *pred* returns ``True``. - - For example, to remove a set of items from both ends of an iterable: - - >>> iterable = (None, False, None, 1, 2, None, 3, False, None) - >>> pred = lambda x: x in {None, False, ''} - >>> list(strip(iterable, pred)) - [1, 2, None, 3] - - This function is analogous to :func:`str.strip`. - - """ - return rstrip(lstrip(iterable, pred), pred) - - -class islice_extended: - """An extension of :func:`itertools.islice` that supports negative values - for *stop*, *start*, and *step*. - - >>> iterator = iter('abcdefgh') - >>> list(islice_extended(iterator, -4, -1)) - ['e', 'f', 'g'] - - Slices with negative values require some caching of *iterable*, but this - function takes care to minimize the amount of memory required. - - For example, you can use a negative step with an infinite iterator: - - >>> from itertools import count - >>> list(islice_extended(count(), 110, 99, -2)) - [110, 108, 106, 104, 102, 100] - - You can also use slice notation directly: - - >>> iterator = map(str, count()) - >>> it = islice_extended(iterator)[10:20:2] - >>> list(it) - ['10', '12', '14', '16', '18'] - - """ - - def __init__(self, iterable, *args): - it = iter(iterable) - if args: - self._iterator = _islice_helper(it, slice(*args)) - else: - self._iterator = it - - def __iter__(self): - return self - - def __next__(self): - return next(self._iterator) - - def __getitem__(self, key): - if isinstance(key, slice): - return islice_extended(_islice_helper(self._iterator, key)) - - raise TypeError('islice_extended.__getitem__ argument must be a slice') - - -def _islice_helper(it, s): - start = s.start - stop = s.stop - if s.step == 0: - raise ValueError('step argument must be a non-zero integer or None.') - step = s.step or 1 - - if step > 0: - start = 0 if (start is None) else start - - if start < 0: - # Consume all but the last -start items - cache = deque(enumerate(it, 1), maxlen=-start) - len_iter = cache[-1][0] if cache else 0 - - # Adjust start to be positive - i = max(len_iter + start, 0) - - # Adjust stop to be positive - if stop is None: - j = len_iter - elif stop >= 0: - j = min(stop, len_iter) - else: - j = max(len_iter + stop, 0) - - # Slice the cache - n = j - i - if n <= 0: - return - - for index in range(n): - if index % step == 0: - # pop and yield the item. - # We don't want to use an intermediate variable - # it would extend the lifetime of the current item - yield cache.popleft()[1] - else: - # just pop and discard the item - cache.popleft() - elif (stop is not None) and (stop < 0): - # Advance to the start position - next(islice(it, start, start), None) - - # When stop is negative, we have to carry -stop items while - # iterating - cache = deque(islice(it, -stop), maxlen=-stop) - - for index, item in enumerate(it): - if index % step == 0: - # pop and yield the item. - # We don't want to use an intermediate variable - # it would extend the lifetime of the current item - yield cache.popleft() - else: - # just pop and discard the item - cache.popleft() - cache.append(item) - else: - # When both start and stop are positive we have the normal case - yield from islice(it, start, stop, step) - else: - start = -1 if (start is None) else start - - if (stop is not None) and (stop < 0): - # Consume all but the last items - n = -stop - 1 - cache = deque(enumerate(it, 1), maxlen=n) - len_iter = cache[-1][0] if cache else 0 - - # If start and stop are both negative they are comparable and - # we can just slice. Otherwise we can adjust start to be negative - # and then slice. - if start < 0: - i, j = start, stop - else: - i, j = min(start - len_iter, -1), None - - for index, item in list(cache)[i:j:step]: - yield item - else: - # Advance to the stop position - if stop is not None: - m = stop + 1 - next(islice(it, m, m), None) - - # stop is positive, so if start is negative they are not comparable - # and we need the rest of the items. - if start < 0: - i = start - n = None - # stop is None and start is positive, so we just need items up to - # the start index. - elif stop is None: - i = None - n = start + 1 - # Both stop and start are positive, so they are comparable. - else: - i = None - n = start - stop - if n <= 0: - return - - cache = list(islice(it, n)) - - yield from cache[i::step] - - -def always_reversible(iterable): - """An extension of :func:`reversed` that supports all iterables, not - just those which implement the ``Reversible`` or ``Sequence`` protocols. - - >>> print(*always_reversible(x for x in range(3))) - 2 1 0 - - If the iterable is already reversible, this function returns the - result of :func:`reversed()`. If the iterable is not reversible, - this function will cache the remaining items in the iterable and - yield them in reverse order, which may require significant storage. - """ - try: - return reversed(iterable) - except TypeError: - return reversed(list(iterable)) - - -def consecutive_groups(iterable, ordering=None): - """Yield groups of consecutive items using :func:`itertools.groupby`. - The *ordering* function determines whether two items are adjacent by - returning their position. - - By default, the ordering function is the identity function. This is - suitable for finding runs of numbers: - - >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40] - >>> for group in consecutive_groups(iterable): - ... print(list(group)) - [1] - [10, 11, 12] - [20] - [30, 31, 32, 33] - [40] - - To find runs of adjacent letters, apply :func:`ord` function - to convert letters to ordinals. - - >>> iterable = 'abcdfgilmnop' - >>> ordering = ord - >>> for group in consecutive_groups(iterable, ordering): - ... print(list(group)) - ['a', 'b', 'c', 'd'] - ['f', 'g'] - ['i'] - ['l', 'm', 'n', 'o', 'p'] - - Each group of consecutive items is an iterator that shares it source with - *iterable*. When an an output group is advanced, the previous group is - no longer available unless its elements are copied (e.g., into a ``list``). - - >>> iterable = [1, 2, 11, 12, 21, 22] - >>> saved_groups = [] - >>> for group in consecutive_groups(iterable): - ... saved_groups.append(list(group)) # Copy group elements - >>> saved_groups - [[1, 2], [11, 12], [21, 22]] - - """ - if ordering is None: - key = lambda x: x[0] - x[1] - else: - key = lambda x: x[0] - ordering(x[1]) - - for k, g in groupby(enumerate(iterable), key=key): - yield map(itemgetter(1), g) - - -def difference(iterable, func=sub, *, initial=None): - """This function is the inverse of :func:`itertools.accumulate`. By default - it will compute the first difference of *iterable* using - :func:`operator.sub`: - - >>> from itertools import accumulate - >>> iterable = accumulate([0, 1, 2, 3, 4]) # produces 0, 1, 3, 6, 10 - >>> list(difference(iterable)) - [0, 1, 2, 3, 4] - - *func* defaults to :func:`operator.sub`, but other functions can be - specified. They will be applied as follows:: - - A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ... - - For example, to do progressive division: - - >>> iterable = [1, 2, 6, 24, 120] - >>> func = lambda x, y: x // y - >>> list(difference(iterable, func)) - [1, 2, 3, 4, 5] - - If the *initial* keyword is set, the first element will be skipped when - computing successive differences. - - >>> it = [10, 11, 13, 16] # from accumulate([1, 2, 3], initial=10) - >>> list(difference(it, initial=10)) - [1, 2, 3] - - """ - a, b = tee(iterable) - try: - first = [next(b)] - except StopIteration: - return iter([]) - - if initial is not None: - first = [] - - return chain(first, map(func, b, a)) - - -class SequenceView(Sequence): - """Return a read-only view of the sequence object *target*. - - :class:`SequenceView` objects are analogous to Python's built-in - "dictionary view" types. They provide a dynamic view of a sequence's items, - meaning that when the sequence updates, so does the view. - - >>> seq = ['0', '1', '2'] - >>> view = SequenceView(seq) - >>> view - SequenceView(['0', '1', '2']) - >>> seq.append('3') - >>> view - SequenceView(['0', '1', '2', '3']) - - Sequence views support indexing, slicing, and length queries. They act - like the underlying sequence, except they don't allow assignment: - - >>> view[1] - '1' - >>> view[1:-1] - ['1', '2'] - >>> len(view) - 4 - - Sequence views are useful as an alternative to copying, as they don't - require (much) extra storage. - - """ - - def __init__(self, target): - if not isinstance(target, Sequence): - raise TypeError - self._target = target - - def __getitem__(self, index): - return self._target[index] - - def __len__(self): - return len(self._target) - - def __repr__(self): - return f'{self.__class__.__name__}({self._target!r})' - - -class seekable: - """Wrap an iterator to allow for seeking backward and forward. This - progressively caches the items in the source iterable so they can be - re-visited. - - Call :meth:`seek` with an index to seek to that position in the source - iterable. - - To "reset" an iterator, seek to ``0``: - - >>> from itertools import count - >>> it = seekable((str(n) for n in count())) - >>> next(it), next(it), next(it) - ('0', '1', '2') - >>> it.seek(0) - >>> next(it), next(it), next(it) - ('0', '1', '2') - - You can also seek forward: - - >>> it = seekable((str(n) for n in range(20))) - >>> it.seek(10) - >>> next(it) - '10' - >>> it.seek(20) # Seeking past the end of the source isn't a problem - >>> list(it) - [] - >>> it.seek(0) # Resetting works even after hitting the end - >>> next(it) - '0' - - Call :meth:`relative_seek` to seek relative to the source iterator's - current position. - - >>> it = seekable((str(n) for n in range(20))) - >>> next(it), next(it), next(it) - ('0', '1', '2') - >>> it.relative_seek(2) - >>> next(it) - '5' - >>> it.relative_seek(-3) # Source is at '6', we move back to '3' - >>> next(it) - '3' - >>> it.relative_seek(-3) # Source is at '4', we move back to '1' - >>> next(it) - '1' - - - Call :meth:`peek` to look ahead one item without advancing the iterator: - - >>> it = seekable('1234') - >>> it.peek() - '1' - >>> list(it) - ['1', '2', '3', '4'] - >>> it.peek(default='empty') - 'empty' - - Before the iterator is at its end, calling :func:`bool` on it will return - ``True``. After it will return ``False``: - - >>> it = seekable('5678') - >>> bool(it) - True - >>> list(it) - ['5', '6', '7', '8'] - >>> bool(it) - False - - You may view the contents of the cache with the :meth:`elements` method. - That returns a :class:`SequenceView`, a view that updates automatically: - - >>> it = seekable((str(n) for n in range(10))) - >>> next(it), next(it), next(it) - ('0', '1', '2') - >>> elements = it.elements() - >>> elements - SequenceView(['0', '1', '2']) - >>> next(it) - '3' - >>> elements - SequenceView(['0', '1', '2', '3']) - - By default, the cache grows as the source iterable progresses, so beware of - wrapping very large or infinite iterables. Supply *maxlen* to limit the - size of the cache (this of course limits how far back you can seek). - - >>> from itertools import count - >>> it = seekable((str(n) for n in count()), maxlen=2) - >>> next(it), next(it), next(it), next(it) - ('0', '1', '2', '3') - >>> list(it.elements()) - ['2', '3'] - >>> it.seek(0) - >>> next(it), next(it), next(it), next(it) - ('2', '3', '4', '5') - >>> next(it) - '6' - - """ - - def __init__(self, iterable, maxlen=None): - self._source = iter(iterable) - if maxlen is None: - self._cache = [] - else: - self._cache = deque([], maxlen) - self._index = None - - def __iter__(self): - return self - - def __next__(self): - if self._index is not None: - try: - item = self._cache[self._index] - except IndexError: - self._index = None - else: - self._index += 1 - return item - - item = next(self._source) - self._cache.append(item) - return item - - def __bool__(self): - try: - self.peek() - except StopIteration: - return False - return True - - def peek(self, default=_marker): - try: - peeked = next(self) - except StopIteration: - if default is _marker: - raise - return default - if self._index is None: - self._index = len(self._cache) - self._index -= 1 - return peeked - - def elements(self): - return SequenceView(self._cache) - - def seek(self, index): - self._index = index - remainder = index - len(self._cache) - if remainder > 0: - consume(self, remainder) - - def relative_seek(self, count): - if self._index is None: - self._index = len(self._cache) - - self.seek(max(self._index + count, 0)) - - -class run_length: - """ - :func:`run_length.encode` compresses an iterable with run-length encoding. - It yields groups of repeated items with the count of how many times they - were repeated: - - >>> uncompressed = 'abbcccdddd' - >>> list(run_length.encode(uncompressed)) - [('a', 1), ('b', 2), ('c', 3), ('d', 4)] - - :func:`run_length.decode` decompresses an iterable that was previously - compressed with run-length encoding. It yields the items of the - decompressed iterable: - - >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] - >>> list(run_length.decode(compressed)) - ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd'] - - """ - - @staticmethod - def encode(iterable): - return ((k, ilen(g)) for k, g in groupby(iterable)) - - @staticmethod - def decode(iterable): - return chain.from_iterable(starmap(repeat, iterable)) - - -def exactly_n(iterable, n, predicate=bool): - """Return ``True`` if exactly ``n`` items in the iterable are ``True`` - according to the *predicate* function. - - >>> exactly_n([True, True, False], 2) - True - >>> exactly_n([True, True, False], 1) - False - >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3) - True - - The iterable will be advanced until ``n + 1`` truthy items are encountered, - so avoid calling it on infinite iterables. - - """ - return ilen(islice(filter(predicate, iterable), n + 1)) == n - - -def circular_shifts(iterable, steps=1): - """Yield the circular shifts of *iterable*. - - >>> list(circular_shifts(range(4))) - [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)] - - Set *steps* to the number of places to rotate to the left - (or to the right if negative). Defaults to 1. - - >>> list(circular_shifts(range(4), 2)) - [(0, 1, 2, 3), (2, 3, 0, 1)] - - >>> list(circular_shifts(range(4), -1)) - [(0, 1, 2, 3), (3, 0, 1, 2), (2, 3, 0, 1), (1, 2, 3, 0)] - - """ - buffer = deque(iterable) - if steps == 0: - raise ValueError('Steps should be a non-zero integer') - - buffer.rotate(steps) - steps = -steps - n = len(buffer) - n //= math.gcd(n, steps) - - for _ in repeat(None, n): - buffer.rotate(steps) - yield tuple(buffer) - - -def make_decorator(wrapping_func, result_index=0): - """Return a decorator version of *wrapping_func*, which is a function that - modifies an iterable. *result_index* is the position in that function's - signature where the iterable goes. - - This lets you use itertools on the "production end," i.e. at function - definition. This can augment what the function returns without changing the - function's code. - - For example, to produce a decorator version of :func:`chunked`: - - >>> from more_itertools import chunked - >>> chunker = make_decorator(chunked, result_index=0) - >>> @chunker(3) - ... def iter_range(n): - ... return iter(range(n)) - ... - >>> list(iter_range(9)) - [[0, 1, 2], [3, 4, 5], [6, 7, 8]] - - To only allow truthy items to be returned: - - >>> truth_serum = make_decorator(filter, result_index=1) - >>> @truth_serum(bool) - ... def boolean_test(): - ... return [0, 1, '', ' ', False, True] - ... - >>> list(boolean_test()) - [1, ' ', True] - - The :func:`peekable` and :func:`seekable` wrappers make for practical - decorators: - - >>> from more_itertools import peekable - >>> peekable_function = make_decorator(peekable) - >>> @peekable_function() - ... def str_range(*args): - ... return (str(x) for x in range(*args)) - ... - >>> it = str_range(1, 20, 2) - >>> next(it), next(it), next(it) - ('1', '3', '5') - >>> it.peek() - '7' - >>> next(it) - '7' - - """ - - # See https://sites.google.com/site/bbayles/index/decorator_factory for - # notes on how this works. - def decorator(*wrapping_args, **wrapping_kwargs): - def outer_wrapper(f): - def inner_wrapper(*args, **kwargs): - result = f(*args, **kwargs) - wrapping_args_ = list(wrapping_args) - wrapping_args_.insert(result_index, result) - return wrapping_func(*wrapping_args_, **wrapping_kwargs) - - return inner_wrapper - - return outer_wrapper - - return decorator - - -def map_reduce(iterable, keyfunc, valuefunc=None, reducefunc=None): - """Return a dictionary that maps the items in *iterable* to categories - defined by *keyfunc*, transforms them with *valuefunc*, and - then summarizes them by category with *reducefunc*. - - *valuefunc* defaults to the identity function if it is unspecified. - If *reducefunc* is unspecified, no summarization takes place: - - >>> keyfunc = lambda x: x.upper() - >>> result = map_reduce('abbccc', keyfunc) - >>> sorted(result.items()) - [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])] - - Specifying *valuefunc* transforms the categorized items: - - >>> keyfunc = lambda x: x.upper() - >>> valuefunc = lambda x: 1 - >>> result = map_reduce('abbccc', keyfunc, valuefunc) - >>> sorted(result.items()) - [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])] - - Specifying *reducefunc* summarizes the categorized items: - - >>> keyfunc = lambda x: x.upper() - >>> valuefunc = lambda x: 1 - >>> reducefunc = sum - >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc) - >>> sorted(result.items()) - [('A', 1), ('B', 2), ('C', 3)] - - You may want to filter the input iterable before applying the map/reduce - procedure: - - >>> all_items = range(30) - >>> items = [x for x in all_items if 10 <= x <= 20] # Filter - >>> keyfunc = lambda x: x % 2 # Evens map to 0; odds to 1 - >>> categories = map_reduce(items, keyfunc=keyfunc) - >>> sorted(categories.items()) - [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])] - >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum) - >>> sorted(summaries.items()) - [(0, 90), (1, 75)] - - Note that all items in the iterable are gathered into a list before the - summarization step, which may require significant storage. - - The returned object is a :obj:`collections.defaultdict` with the - ``default_factory`` set to ``None``, such that it behaves like a normal - dictionary. - - """ - - ret = defaultdict(list) - - if valuefunc is None: - for item in iterable: - key = keyfunc(item) - ret[key].append(item) - - else: - for item in iterable: - key = keyfunc(item) - value = valuefunc(item) - ret[key].append(value) - - if reducefunc is not None: - for key, value_list in ret.items(): - ret[key] = reducefunc(value_list) - - ret.default_factory = None - return ret - - -def rlocate(iterable, pred=bool, window_size=None): - """Yield the index of each item in *iterable* for which *pred* returns - ``True``, starting from the right and moving left. - - *pred* defaults to :func:`bool`, which will select truthy items: - - >>> list(rlocate([0, 1, 1, 0, 1, 0, 0])) # Truthy at 1, 2, and 4 - [4, 2, 1] - - Set *pred* to a custom function to, e.g., find the indexes for a particular - item: - - >>> iterator = iter('abcb') - >>> pred = lambda x: x == 'b' - >>> list(rlocate(iterator, pred)) - [3, 1] - - If *window_size* is given, then the *pred* function will be called with - that many items. This enables searching for sub-sequences: - - >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] - >>> pred = lambda *args: args == (1, 2, 3) - >>> list(rlocate(iterable, pred=pred, window_size=3)) - [9, 5, 1] - - Beware, this function won't return anything for infinite iterables. - If *iterable* is reversible, ``rlocate`` will reverse it and search from - the right. Otherwise, it will search from the left and return the results - in reverse order. - - See :func:`locate` to for other example applications. - - """ - if window_size is None: - try: - len_iter = len(iterable) - return (len_iter - i - 1 for i in locate(reversed(iterable), pred)) - except TypeError: - pass - - return reversed(list(locate(iterable, pred, window_size))) - - -def replace(iterable, pred, substitutes, count=None, window_size=1): - """Yield the items from *iterable*, replacing the items for which *pred* - returns ``True`` with the items from the iterable *substitutes*. - - >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1] - >>> pred = lambda x: x == 0 - >>> substitutes = (2, 3) - >>> list(replace(iterable, pred, substitutes)) - [1, 1, 2, 3, 1, 1, 2, 3, 1, 1] - - If *count* is given, the number of replacements will be limited: - - >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0] - >>> pred = lambda x: x == 0 - >>> substitutes = [None] - >>> list(replace(iterable, pred, substitutes, count=2)) - [1, 1, None, 1, 1, None, 1, 1, 0] - - Use *window_size* to control the number of items passed as arguments to - *pred*. This allows for locating and replacing subsequences. - - >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5] - >>> window_size = 3 - >>> pred = lambda *args: args == (0, 1, 2) # 3 items passed to pred - >>> substitutes = [3, 4] # Splice in these items - >>> list(replace(iterable, pred, substitutes, window_size=window_size)) - [3, 4, 5, 3, 4, 5] - - """ - if window_size < 1: - raise ValueError('window_size must be at least 1') - - # Save the substitutes iterable, since it's used more than once - substitutes = tuple(substitutes) - - # Add padding such that the number of windows matches the length of the - # iterable - it = chain(iterable, repeat(_marker, window_size - 1)) - windows = windowed(it, window_size) - - n = 0 - for w in windows: - # If the current window matches our predicate (and we haven't hit - # our maximum number of replacements), splice in the substitutes - # and then consume the following windows that overlap with this one. - # For example, if the iterable is (0, 1, 2, 3, 4...) - # and the window size is 2, we have (0, 1), (1, 2), (2, 3)... - # If the predicate matches on (0, 1), we need to zap (0, 1) and (1, 2) - if pred(*w): - if (count is None) or (n < count): - n += 1 - yield from substitutes - consume(windows, window_size - 1) - continue - - # If there was no match (or we've reached the replacement limit), - # yield the first item from the window. - if w and (w[0] is not _marker): - yield w[0] - - -def partitions(iterable): - """Yield all possible order-preserving partitions of *iterable*. - - >>> iterable = 'abc' - >>> for part in partitions(iterable): - ... print([''.join(p) for p in part]) - ['abc'] - ['a', 'bc'] - ['ab', 'c'] - ['a', 'b', 'c'] - - This is unrelated to :func:`partition`. - - """ - sequence = list(iterable) - n = len(sequence) - for i in powerset(range(1, n)): - yield [sequence[i:j] for i, j in zip((0,) + i, i + (n,))] - - -def set_partitions(iterable, k=None, min_size=None, max_size=None): - """ - Yield the set partitions of *iterable* into *k* parts. Set partitions are - not order-preserving. - - >>> iterable = 'abc' - >>> for part in set_partitions(iterable, 2): - ... print([''.join(p) for p in part]) - ['a', 'bc'] - ['ab', 'c'] - ['b', 'ac'] - - - If *k* is not given, every set partition is generated. - - >>> iterable = 'abc' - >>> for part in set_partitions(iterable): - ... print([''.join(p) for p in part]) - ['abc'] - ['a', 'bc'] - ['ab', 'c'] - ['b', 'ac'] - ['a', 'b', 'c'] - - if *min_size* and/or *max_size* are given, the minimum and/or maximum size - per block in partition is set. - - >>> iterable = 'abc' - >>> for part in set_partitions(iterable, min_size=2): - ... print([''.join(p) for p in part]) - ['abc'] - >>> for part in set_partitions(iterable, max_size=2): - ... print([''.join(p) for p in part]) - ['a', 'bc'] - ['ab', 'c'] - ['b', 'ac'] - ['a', 'b', 'c'] - - """ - L = list(iterable) - n = len(L) - if k is not None: - if k < 1: - raise ValueError( - "Can't partition in a negative or zero number of groups" - ) - elif k > n: - return - - min_size = min_size if min_size is not None else 0 - max_size = max_size if max_size is not None else n - if min_size > max_size: - return - - def set_partitions_helper(L, k): - n = len(L) - if k == 1: - yield [L] - elif n == k: - yield [[s] for s in L] - else: - e, *M = L - for p in set_partitions_helper(M, k - 1): - yield [[e], *p] - for p in set_partitions_helper(M, k): - for i in range(len(p)): - yield p[:i] + [[e] + p[i]] + p[i + 1 :] - - if k is None: - for k in range(1, n + 1): - yield from filter( - lambda z: all(min_size <= len(bk) <= max_size for bk in z), - set_partitions_helper(L, k), - ) - else: - yield from filter( - lambda z: all(min_size <= len(bk) <= max_size for bk in z), - set_partitions_helper(L, k), - ) - - -class time_limited: - """ - Yield items from *iterable* until *limit_seconds* have passed. - If the time limit expires before all items have been yielded, the - ``timed_out`` parameter will be set to ``True``. - - >>> from time import sleep - >>> def generator(): - ... yield 1 - ... yield 2 - ... sleep(0.2) - ... yield 3 - >>> iterable = time_limited(0.1, generator()) - >>> list(iterable) - [1, 2] - >>> iterable.timed_out - True - - Note that the time is checked before each item is yielded, and iteration - stops if the time elapsed is greater than *limit_seconds*. If your time - limit is 1 second, but it takes 2 seconds to generate the first item from - the iterable, the function will run for 2 seconds and not yield anything. - As a special case, when *limit_seconds* is zero, the iterator never - returns anything. - - """ - - def __init__(self, limit_seconds, iterable): - if limit_seconds < 0: - raise ValueError('limit_seconds must be positive') - self.limit_seconds = limit_seconds - self._iterator = iter(iterable) - self._start_time = monotonic() - self.timed_out = False - - def __iter__(self): - return self - - def __next__(self): - if self.limit_seconds == 0: - self.timed_out = True - raise StopIteration - item = next(self._iterator) - if monotonic() - self._start_time > self.limit_seconds: - self.timed_out = True - raise StopIteration - - return item - - -def only(iterable, default=None, too_long=None): - """If *iterable* has only one item, return it. - If it has zero items, return *default*. - If it has more than one item, raise the exception given by *too_long*, - which is ``ValueError`` by default. - - >>> only([], default='missing') - 'missing' - >>> only([1]) - 1 - >>> only([1, 2]) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - ValueError: Expected exactly one item in iterable, but got 1, 2, - and perhaps more.' - >>> only([1, 2], too_long=TypeError) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - TypeError - - Note that :func:`only` attempts to advance *iterable* twice to ensure there - is only one item. See :func:`spy` or :func:`peekable` to check - iterable contents less destructively. - - """ - iterator = iter(iterable) - for first in iterator: - for second in iterator: - msg = ( - f'Expected exactly one item in iterable, but got {first!r}, ' - f'{second!r}, and perhaps more.' - ) - raise too_long or ValueError(msg) - return first - return default - - -def _ichunk(iterator, n): - cache = deque() - chunk = islice(iterator, n) - - def generator(): - with suppress(StopIteration): - while True: - if cache: - yield cache.popleft() - else: - yield next(chunk) - - def materialize_next(n=1): - # if n not specified materialize everything - if n is None: - cache.extend(chunk) - return len(cache) - - to_cache = n - len(cache) - - # materialize up to n - if to_cache > 0: - cache.extend(islice(chunk, to_cache)) - - # return number materialized up to n - return min(n, len(cache)) - - return (generator(), materialize_next) - - -def ichunked(iterable, n): - """Break *iterable* into sub-iterables with *n* elements each. - :func:`ichunked` is like :func:`chunked`, but it yields iterables - instead of lists. - - If the sub-iterables are read in order, the elements of *iterable* - won't be stored in memory. - If they are read out of order, :func:`itertools.tee` is used to cache - elements as necessary. - - >>> from itertools import count - >>> all_chunks = ichunked(count(), 4) - >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks) - >>> list(c_2) # c_1's elements have been cached; c_3's haven't been - [4, 5, 6, 7] - >>> list(c_1) - [0, 1, 2, 3] - >>> list(c_3) - [8, 9, 10, 11] - - """ - iterator = iter(iterable) - while True: - # Create new chunk - chunk, materialize_next = _ichunk(iterator, n) - - # Check to see whether we're at the end of the source iterable - if not materialize_next(): - return - - yield chunk - - # Fill previous chunk's cache - materialize_next(None) - - -def iequals(*iterables): - """Return ``True`` if all given *iterables* are equal to each other, - which means that they contain the same elements in the same order. - - The function is useful for comparing iterables of different data types - or iterables that do not support equality checks. - - >>> iequals("abc", ['a', 'b', 'c'], ('a', 'b', 'c'), iter("abc")) - True - - >>> iequals("abc", "acb") - False - - Not to be confused with :func:`all_equal`, which checks whether all - elements of iterable are equal to each other. - - """ - return all(map(all_equal, zip_longest(*iterables, fillvalue=object()))) - - -def distinct_combinations(iterable, r): - """Yield the distinct combinations of *r* items taken from *iterable*. - - >>> list(distinct_combinations([0, 0, 1], 2)) - [(0, 0), (0, 1)] - - Equivalent to ``set(combinations(iterable))``, except duplicates are not - generated and thrown away. For larger input sequences this is much more - efficient. - - """ - if r < 0: - raise ValueError('r must be non-negative') - elif r == 0: - yield () - return - pool = tuple(iterable) - generators = [unique_everseen(enumerate(pool), key=itemgetter(1))] - current_combo = [None] * r - level = 0 - while generators: - try: - cur_idx, p = next(generators[-1]) - except StopIteration: - generators.pop() - level -= 1 - continue - current_combo[level] = p - if level + 1 == r: - yield tuple(current_combo) - else: - generators.append( - unique_everseen( - enumerate(pool[cur_idx + 1 :], cur_idx + 1), - key=itemgetter(1), - ) - ) - level += 1 - - -def filter_except(validator, iterable, *exceptions): - """Yield the items from *iterable* for which the *validator* function does - not raise one of the specified *exceptions*. - - *validator* is called for each item in *iterable*. - It should be a function that accepts one argument and raises an exception - if that item is not valid. - - >>> iterable = ['1', '2', 'three', '4', None] - >>> list(filter_except(int, iterable, ValueError, TypeError)) - ['1', '2', '4'] - - If an exception other than one given by *exceptions* is raised by - *validator*, it is raised like normal. - """ - for item in iterable: - try: - validator(item) - except exceptions: - pass - else: - yield item - - -def map_except(function, iterable, *exceptions): - """Transform each item from *iterable* with *function* and yield the - result, unless *function* raises one of the specified *exceptions*. - - *function* is called to transform each item in *iterable*. - It should accept one argument. - - >>> iterable = ['1', '2', 'three', '4', None] - >>> list(map_except(int, iterable, ValueError, TypeError)) - [1, 2, 4] - - If an exception other than one given by *exceptions* is raised by - *function*, it is raised like normal. - """ - for item in iterable: - try: - yield function(item) - except exceptions: - pass - - -def map_if(iterable, pred, func, func_else=None): - """Evaluate each item from *iterable* using *pred*. If the result is - equivalent to ``True``, transform the item with *func* and yield it. - Otherwise, transform the item with *func_else* and yield it. - - *pred*, *func*, and *func_else* should each be functions that accept - one argument. By default, *func_else* is the identity function. - - >>> from math import sqrt - >>> iterable = list(range(-5, 5)) - >>> iterable - [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4] - >>> list(map_if(iterable, lambda x: x > 3, lambda x: 'toobig')) - [-5, -4, -3, -2, -1, 0, 1, 2, 3, 'toobig'] - >>> list(map_if(iterable, lambda x: x >= 0, - ... lambda x: f'{sqrt(x):.2f}', lambda x: None)) - [None, None, None, None, None, '0.00', '1.00', '1.41', '1.73', '2.00'] - """ - - if func_else is None: - for item in iterable: - yield func(item) if pred(item) else item - - else: - for item in iterable: - yield func(item) if pred(item) else func_else(item) - - -def _sample_unweighted(iterator, k, strict): - # Algorithm L in the 1994 paper by Kim-Hung Li: - # "Reservoir-Sampling Algorithms of Time Complexity O(n(1+log(N/n)))". - - reservoir = list(islice(iterator, k)) - if strict and len(reservoir) < k: - raise ValueError('Sample larger than population') - W = 1.0 - - with suppress(StopIteration): - while True: - W *= random() ** (1 / k) - skip = floor(log(random()) / log1p(-W)) - element = next(islice(iterator, skip, None)) - reservoir[randrange(k)] = element - - shuffle(reservoir) - return reservoir - - -def _sample_weighted(iterator, k, weights, strict): - # Implementation of "A-ExpJ" from the 2006 paper by Efraimidis et al. : - # "Weighted random sampling with a reservoir". - - # Log-transform for numerical stability for weights that are small/large - weight_keys = (log(random()) / weight for weight in weights) - - # Fill up the reservoir (collection of samples) with the first `k` - # weight-keys and elements, then heapify the list. - reservoir = take(k, zip(weight_keys, iterator)) - if strict and len(reservoir) < k: - raise ValueError('Sample larger than population') - - heapify(reservoir) - - # The number of jumps before changing the reservoir is a random variable - # with an exponential distribution. Sample it using random() and logs. - smallest_weight_key, _ = reservoir[0] - weights_to_skip = log(random()) / smallest_weight_key - - for weight, element in zip(weights, iterator): - if weight >= weights_to_skip: - # The notation here is consistent with the paper, but we store - # the weight-keys in log-space for better numerical stability. - smallest_weight_key, _ = reservoir[0] - t_w = exp(weight * smallest_weight_key) - r_2 = uniform(t_w, 1) # generate U(t_w, 1) - weight_key = log(r_2) / weight - heapreplace(reservoir, (weight_key, element)) - smallest_weight_key, _ = reservoir[0] - weights_to_skip = log(random()) / smallest_weight_key - else: - weights_to_skip -= weight - - ret = [element for weight_key, element in reservoir] - shuffle(ret) - return ret - - -def _sample_counted(population, k, counts, strict): - element = None - remaining = 0 - - def feed(i): - # Advance *i* steps ahead and consume an element - nonlocal element, remaining - - while i + 1 > remaining: - i = i - remaining - element = next(population) - remaining = next(counts) - remaining -= i + 1 - return element - - with suppress(StopIteration): - reservoir = [] - for _ in range(k): - reservoir.append(feed(0)) - - if strict and len(reservoir) < k: - raise ValueError('Sample larger than population') - - with suppress(StopIteration): - W = 1.0 - while True: - W *= random() ** (1 / k) - skip = floor(log(random()) / log1p(-W)) - element = feed(skip) - reservoir[randrange(k)] = element - - shuffle(reservoir) - return reservoir - - -def sample(iterable, k, weights=None, *, counts=None, strict=False): - """Return a *k*-length list of elements chosen (without replacement) - from the *iterable*. - - Similar to :func:`random.sample`, but works on inputs that aren't - indexable (such as sets and dictionaries) and on inputs where the - size isn't known in advance (such as generators). - - >>> iterable = range(100) - >>> sample(iterable, 5) # doctest: +SKIP - [81, 60, 96, 16, 4] - - For iterables with repeated elements, you may supply *counts* to - indicate the repeats. - - >>> iterable = ['a', 'b'] - >>> counts = [3, 4] # Equivalent to 'a', 'a', 'a', 'b', 'b', 'b', 'b' - >>> sample(iterable, k=3, counts=counts) # doctest: +SKIP - ['a', 'a', 'b'] - - An iterable with *weights* may be given: - - >>> iterable = range(100) - >>> weights = (i * i + 1 for i in range(100)) - >>> sampled = sample(iterable, 5, weights=weights) # doctest: +SKIP - [79, 67, 74, 66, 78] - - Weighted selections are made without replacement. - After an element is selected, it is removed from the pool and the - relative weights of the other elements increase (this - does not match the behavior of :func:`random.sample`'s *counts* - parameter). Note that *weights* may not be used with *counts*. - - If the length of *iterable* is less than *k*, - ``ValueError`` is raised if *strict* is ``True`` and - all elements are returned (in shuffled order) if *strict* is ``False``. - - By default, the `Algorithm L `__ reservoir sampling - technique is used. When *weights* are provided, - `Algorithm A-ExpJ `__ is used instead. - - Notes on reproducibility: - - * The algorithms rely on inexact floating-point functions provided - by the underlying math library (e.g. ``log``, ``log1p``, and ``pow``). - Those functions can `produce slightly different results - `_ on - different builds. Accordingly, selections can vary across builds - even for the same seed. - - * The algorithms loop over the input and make selections based on - ordinal position, so selections from unordered collections (such as - sets) won't reproduce across sessions on the same platform using the - same seed. For example, this won't reproduce:: - - >> seed(8675309) - >> sample(set('abcdefghijklmnopqrstuvwxyz'), 10) - ['c', 'p', 'e', 'w', 's', 'a', 'j', 'd', 'n', 't'] - - """ - iterator = iter(iterable) - - if k < 0: - raise ValueError('k must be non-negative') - - if k == 0: - return [] - - if weights is not None and counts is not None: - raise TypeError('weights and counts are mutually exclusive') - - elif weights is not None: - weights = iter(weights) - return _sample_weighted(iterator, k, weights, strict) - - elif counts is not None: - counts = iter(counts) - return _sample_counted(iterator, k, counts, strict) - - else: - return _sample_unweighted(iterator, k, strict) - - -def is_sorted(iterable, key=None, reverse=False, strict=False): - """Returns ``True`` if the items of iterable are in sorted order, and - ``False`` otherwise. *key* and *reverse* have the same meaning that they do - in the built-in :func:`sorted` function. - - >>> is_sorted(['1', '2', '3', '4', '5'], key=int) - True - >>> is_sorted([5, 4, 3, 1, 2], reverse=True) - False - - If *strict*, tests for strict sorting, that is, returns ``False`` if equal - elements are found: - - >>> is_sorted([1, 2, 2]) - True - >>> is_sorted([1, 2, 2], strict=True) - False - - The function returns ``False`` after encountering the first out-of-order - item, which means it may produce results that differ from the built-in - :func:`sorted` function for objects with unusual comparison dynamics - (like ``math.nan``). If there are no out-of-order items, the iterable is - exhausted. - """ - it = iterable if (key is None) else map(key, iterable) - a, b = tee(it) - next(b, None) - if reverse: - b, a = a, b - return all(map(lt, a, b)) if strict else not any(map(lt, b, a)) - - -class AbortThread(BaseException): - pass - - -class callback_iter: - """Convert a function that uses callbacks to an iterator. - - Let *func* be a function that takes a `callback` keyword argument. - For example: - - >>> def func(callback=None): - ... for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]: - ... if callback: - ... callback(i, c) - ... return 4 - - - Use ``with callback_iter(func)`` to get an iterator over the parameters - that are delivered to the callback. - - >>> with callback_iter(func) as it: - ... for args, kwargs in it: - ... print(args) - (1, 'a') - (2, 'b') - (3, 'c') - - The function will be called in a background thread. The ``done`` property - indicates whether it has completed execution. - - >>> it.done - True - - If it completes successfully, its return value will be available - in the ``result`` property. - - >>> it.result - 4 - - Notes: - - * If the function uses some keyword argument besides ``callback``, supply - *callback_kwd*. - * If it finished executing, but raised an exception, accessing the - ``result`` property will raise the same exception. - * If it hasn't finished executing, accessing the ``result`` - property from within the ``with`` block will raise ``RuntimeError``. - * If it hasn't finished executing, accessing the ``result`` property from - outside the ``with`` block will raise a - ``more_itertools.AbortThread`` exception. - * Provide *wait_seconds* to adjust how frequently the it is polled for - output. - - """ - - def __init__(self, func, callback_kwd='callback', wait_seconds=0.1): - self._func = func - self._callback_kwd = callback_kwd - self._aborted = False - self._future = None - self._wait_seconds = wait_seconds - # Lazily import concurrent.future - self._executor = __import__( - 'concurrent.futures' - ).futures.ThreadPoolExecutor(max_workers=1) - self._iterator = self._reader() - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self._aborted = True - self._executor.shutdown() - - def __iter__(self): - return self - - def __next__(self): - return next(self._iterator) - - @property - def done(self): - if self._future is None: - return False - return self._future.done() - - @property - def result(self): - if not self.done: - raise RuntimeError('Function has not yet completed') - - return self._future.result() - - def _reader(self): - q = Queue() - - def callback(*args, **kwargs): - if self._aborted: - raise AbortThread('canceled by user') - - q.put((args, kwargs)) - - self._future = self._executor.submit( - self._func, **{self._callback_kwd: callback} - ) - - while True: - try: - item = q.get(timeout=self._wait_seconds) - except Empty: - pass - else: - q.task_done() - yield item - - if self._future.done(): - break - - remaining = [] - while True: - try: - item = q.get_nowait() - except Empty: - break - else: - q.task_done() - remaining.append(item) - q.join() - yield from remaining - - -def windowed_complete(iterable, n): - """ - Yield ``(beginning, middle, end)`` tuples, where: - - * Each ``middle`` has *n* items from *iterable* - * Each ``beginning`` has the items before the ones in ``middle`` - * Each ``end`` has the items after the ones in ``middle`` - - >>> iterable = range(7) - >>> n = 3 - >>> for beginning, middle, end in windowed_complete(iterable, n): - ... print(beginning, middle, end) - () (0, 1, 2) (3, 4, 5, 6) - (0,) (1, 2, 3) (4, 5, 6) - (0, 1) (2, 3, 4) (5, 6) - (0, 1, 2) (3, 4, 5) (6,) - (0, 1, 2, 3) (4, 5, 6) () - - Note that *n* must be at least 0 and most equal to the length of - *iterable*. - - This function will exhaust the iterable and may require significant - storage. - """ - if n < 0: - raise ValueError('n must be >= 0') - - seq = tuple(iterable) - size = len(seq) - - if n > size: - raise ValueError('n must be <= len(seq)') - - for i in range(size - n + 1): - beginning = seq[:i] - middle = seq[i : i + n] - end = seq[i + n :] - yield beginning, middle, end - - -def all_unique(iterable, key=None): - """ - Returns ``True`` if all the elements of *iterable* are unique (no two - elements are equal). - - >>> all_unique('ABCB') - False - - If a *key* function is specified, it will be used to make comparisons. - - >>> all_unique('ABCb') - True - >>> all_unique('ABCb', str.lower) - False - - The function returns as soon as the first non-unique element is - encountered. Iterables with a mix of hashable and unhashable items can - be used, but the function will be slower for unhashable items. - """ - seenset = set() - seenset_add = seenset.add - seenlist = [] - seenlist_add = seenlist.append - for element in map(key, iterable) if key else iterable: - try: - if element in seenset: - return False - seenset_add(element) - except TypeError: - if element in seenlist: - return False - seenlist_add(element) - return True - - -def nth_product(index, *args): - """Equivalent to ``list(product(*args))[index]``. - - The products of *args* can be ordered lexicographically. - :func:`nth_product` computes the product at sort position *index* without - computing the previous products. - - >>> nth_product(8, range(2), range(2), range(2), range(2)) - (1, 0, 0, 0) - - ``IndexError`` will be raised if the given *index* is invalid. - """ - pools = list(map(tuple, reversed(args))) - ns = list(map(len, pools)) - - c = reduce(mul, ns) - - if index < 0: - index += c - - if not 0 <= index < c: - raise IndexError - - result = [] - for pool, n in zip(pools, ns): - result.append(pool[index % n]) - index //= n - - return tuple(reversed(result)) - - -def nth_permutation(iterable, r, index): - """Equivalent to ``list(permutations(iterable, r))[index]``` - - The subsequences of *iterable* that are of length *r* where order is - important can be ordered lexicographically. :func:`nth_permutation` - computes the subsequence at sort position *index* directly, without - computing the previous subsequences. - - >>> nth_permutation('ghijk', 2, 5) - ('h', 'i') - - ``ValueError`` will be raised If *r* is negative or greater than the length - of *iterable*. - ``IndexError`` will be raised if the given *index* is invalid. - """ - pool = list(iterable) - n = len(pool) - - if r is None or r == n: - r, c = n, factorial(n) - elif not 0 <= r < n: - raise ValueError - else: - c = perm(n, r) - assert c > 0 # factorial(n)>0, and r>> nth_combination_with_replacement(range(5), 3, 5) - (0, 1, 1) - - ``ValueError`` will be raised If *r* is negative or greater than the length - of *iterable*. - ``IndexError`` will be raised if the given *index* is invalid. - """ - pool = tuple(iterable) - n = len(pool) - if (r < 0) or (r > n): - raise ValueError - - c = comb(n + r - 1, r) - - if index < 0: - index += c - - if (index < 0) or (index >= c): - raise IndexError - - result = [] - i = 0 - while r: - r -= 1 - while n >= 0: - num_combs = comb(n + r - 1, r) - if index < num_combs: - break - n -= 1 - i += 1 - index -= num_combs - result.append(pool[i]) - - return tuple(result) - - -def value_chain(*args): - """Yield all arguments passed to the function in the same order in which - they were passed. If an argument itself is iterable then iterate over its - values. - - >>> list(value_chain(1, 2, 3, [4, 5, 6])) - [1, 2, 3, 4, 5, 6] - - Binary and text strings are not considered iterable and are emitted - as-is: - - >>> list(value_chain('12', '34', ['56', '78'])) - ['12', '34', '56', '78'] - - Pre- or postpend a single element to an iterable: - - >>> list(value_chain(1, [2, 3, 4, 5, 6])) - [1, 2, 3, 4, 5, 6] - >>> list(value_chain([1, 2, 3, 4, 5], 6)) - [1, 2, 3, 4, 5, 6] - - Multiple levels of nesting are not flattened. - - """ - for value in args: - if isinstance(value, (str, bytes)): - yield value - continue - try: - yield from value - except TypeError: - yield value - - -def product_index(element, *args): - """Equivalent to ``list(product(*args)).index(element)`` - - The products of *args* can be ordered lexicographically. - :func:`product_index` computes the first index of *element* without - computing the previous products. - - >>> product_index([8, 2], range(10), range(5)) - 42 - - ``ValueError`` will be raised if the given *element* isn't in the product - of *args*. - """ - index = 0 - - for x, pool in zip_longest(element, args, fillvalue=_marker): - if x is _marker or pool is _marker: - raise ValueError('element is not a product of args') - - pool = tuple(pool) - index = index * len(pool) + pool.index(x) - - return index - - -def combination_index(element, iterable): - """Equivalent to ``list(combinations(iterable, r)).index(element)`` - - The subsequences of *iterable* that are of length *r* can be ordered - lexicographically. :func:`combination_index` computes the index of the - first *element*, without computing the previous combinations. - - >>> combination_index('adf', 'abcdefg') - 10 - - ``ValueError`` will be raised if the given *element* isn't one of the - combinations of *iterable*. - """ - element = enumerate(element) - k, y = next(element, (None, None)) - if k is None: - return 0 - - indexes = [] - pool = enumerate(iterable) - for n, x in pool: - if x == y: - indexes.append(n) - tmp, y = next(element, (None, None)) - if tmp is None: - break - else: - k = tmp - else: - raise ValueError('element is not a combination of iterable') - - n, _ = last(pool, default=(n, None)) - - # Python versions below 3.8 don't have math.comb - index = 1 - for i, j in enumerate(reversed(indexes), start=1): - j = n - j - if i <= j: - index += comb(j, i) - - return comb(n + 1, k + 1) - index - - -def combination_with_replacement_index(element, iterable): - """Equivalent to - ``list(combinations_with_replacement(iterable, r)).index(element)`` - - The subsequences with repetition of *iterable* that are of length *r* can - be ordered lexicographically. :func:`combination_with_replacement_index` - computes the index of the first *element*, without computing the previous - combinations with replacement. - - >>> combination_with_replacement_index('adf', 'abcdefg') - 20 - - ``ValueError`` will be raised if the given *element* isn't one of the - combinations with replacement of *iterable*. - """ - element = tuple(element) - l = len(element) - element = enumerate(element) - - k, y = next(element, (None, None)) - if k is None: - return 0 - - indexes = [] - pool = tuple(iterable) - for n, x in enumerate(pool): - while x == y: - indexes.append(n) - tmp, y = next(element, (None, None)) - if tmp is None: - break - else: - k = tmp - if y is None: - break - else: - raise ValueError( - 'element is not a combination with replacement of iterable' - ) - - n = len(pool) - occupations = [0] * n - for p in indexes: - occupations[p] += 1 - - index = 0 - cumulative_sum = 0 - for k in range(1, n): - cumulative_sum += occupations[k - 1] - j = l + n - 1 - k - cumulative_sum - i = n - k - if i <= j: - index += comb(j, i) - - return index - - -def permutation_index(element, iterable): - """Equivalent to ``list(permutations(iterable, r)).index(element)``` - - The subsequences of *iterable* that are of length *r* where order is - important can be ordered lexicographically. :func:`permutation_index` - computes the index of the first *element* directly, without computing - the previous permutations. - - >>> permutation_index([1, 3, 2], range(5)) - 19 - - ``ValueError`` will be raised if the given *element* isn't one of the - permutations of *iterable*. - """ - index = 0 - pool = list(iterable) - for i, x in zip(range(len(pool), -1, -1), element): - r = pool.index(x) - index = index * i + r - del pool[r] - - return index - - -class countable: - """Wrap *iterable* and keep a count of how many items have been consumed. - - The ``items_seen`` attribute starts at ``0`` and increments as the iterable - is consumed: - - >>> iterable = map(str, range(10)) - >>> it = countable(iterable) - >>> it.items_seen - 0 - >>> next(it), next(it) - ('0', '1') - >>> list(it) - ['2', '3', '4', '5', '6', '7', '8', '9'] - >>> it.items_seen - 10 - """ - - def __init__(self, iterable): - self._iterator = iter(iterable) - self.items_seen = 0 - - def __iter__(self): - return self - - def __next__(self): - item = next(self._iterator) - self.items_seen += 1 - - return item - - -def chunked_even(iterable, n): - """Break *iterable* into lists of approximately length *n*. - Items are distributed such the lengths of the lists differ by at most - 1 item. - - >>> iterable = [1, 2, 3, 4, 5, 6, 7] - >>> n = 3 - >>> list(chunked_even(iterable, n)) # List lengths: 3, 2, 2 - [[1, 2, 3], [4, 5], [6, 7]] - >>> list(chunked(iterable, n)) # List lengths: 3, 3, 1 - [[1, 2, 3], [4, 5, 6], [7]] - - """ - iterator = iter(iterable) - - # Initialize a buffer to process the chunks while keeping - # some back to fill any underfilled chunks - min_buffer = (n - 1) * (n - 2) - buffer = list(islice(iterator, min_buffer)) - - # Append items until we have a completed chunk - for _ in islice(map(buffer.append, iterator), n, None, n): - yield buffer[:n] - del buffer[:n] - - # Check if any chunks need addition processing - if not buffer: - return - length = len(buffer) - - # Chunks are either size `full_size <= n` or `partial_size = full_size - 1` - q, r = divmod(length, n) - num_lists = q + (1 if r > 0 else 0) - q, r = divmod(length, num_lists) - full_size = q + (1 if r > 0 else 0) - partial_size = full_size - 1 - num_full = length - partial_size * num_lists - - # Yield chunks of full size - partial_start_idx = num_full * full_size - if full_size > 0: - for i in range(0, partial_start_idx, full_size): - yield buffer[i : i + full_size] - - # Yield chunks of partial size - if partial_size > 0: - for i in range(partial_start_idx, length, partial_size): - yield buffer[i : i + partial_size] - - -def zip_broadcast(*objects, scalar_types=(str, bytes), strict=False): - """A version of :func:`zip` that "broadcasts" any scalar - (i.e., non-iterable) items into output tuples. - - >>> iterable_1 = [1, 2, 3] - >>> iterable_2 = ['a', 'b', 'c'] - >>> scalar = '_' - >>> list(zip_broadcast(iterable_1, iterable_2, scalar)) - [(1, 'a', '_'), (2, 'b', '_'), (3, 'c', '_')] - - The *scalar_types* keyword argument determines what types are considered - scalar. It is set to ``(str, bytes)`` by default. Set it to ``None`` to - treat strings and byte strings as iterable: - - >>> list(zip_broadcast('abc', 0, 'xyz', scalar_types=None)) - [('a', 0, 'x'), ('b', 0, 'y'), ('c', 0, 'z')] - - If the *strict* keyword argument is ``True``, then - ``UnequalIterablesError`` will be raised if any of the iterables have - different lengths. - """ - - def is_scalar(obj): - if scalar_types and isinstance(obj, scalar_types): - return True - try: - iter(obj) - except TypeError: - return True - else: - return False - - size = len(objects) - if not size: - return - - new_item = [None] * size - iterables, iterable_positions = [], [] - for i, obj in enumerate(objects): - if is_scalar(obj): - new_item[i] = obj - else: - iterables.append(iter(obj)) - iterable_positions.append(i) - - if not iterables: - yield tuple(objects) - return - - zipper = _zip_equal if strict else zip - for item in zipper(*iterables): - for i, new_item[i] in zip(iterable_positions, item): - pass - yield tuple(new_item) - - -def unique_in_window(iterable, n, key=None): - """Yield the items from *iterable* that haven't been seen recently. - *n* is the size of the lookback window. - - >>> iterable = [0, 1, 0, 2, 3, 0] - >>> n = 3 - >>> list(unique_in_window(iterable, n)) - [0, 1, 2, 3, 0] - - The *key* function, if provided, will be used to determine uniqueness: - - >>> list(unique_in_window('abAcda', 3, key=lambda x: x.lower())) - ['a', 'b', 'c', 'd', 'a'] - - The items in *iterable* must be hashable. - - """ - if n <= 0: - raise ValueError('n must be greater than 0') - - window = deque(maxlen=n) - counts = defaultdict(int) - use_key = key is not None - - for item in iterable: - if len(window) == n: - to_discard = window[0] - if counts[to_discard] == 1: - del counts[to_discard] - else: - counts[to_discard] -= 1 - - k = key(item) if use_key else item - if k not in counts: - yield item - counts[k] += 1 - window.append(k) - - -def duplicates_everseen(iterable, key=None): - """Yield duplicate elements after their first appearance. - - >>> list(duplicates_everseen('mississippi')) - ['s', 'i', 's', 's', 'i', 'p', 'i'] - >>> list(duplicates_everseen('AaaBbbCccAaa', str.lower)) - ['a', 'a', 'b', 'b', 'c', 'c', 'A', 'a', 'a'] - - This function is analogous to :func:`unique_everseen` and is subject to - the same performance considerations. - - """ - seen_set = set() - seen_list = [] - use_key = key is not None - - for element in iterable: - k = key(element) if use_key else element - try: - if k not in seen_set: - seen_set.add(k) - else: - yield element - except TypeError: - if k not in seen_list: - seen_list.append(k) - else: - yield element - - -def duplicates_justseen(iterable, key=None): - """Yields serially-duplicate elements after their first appearance. - - >>> list(duplicates_justseen('mississippi')) - ['s', 's', 'p'] - >>> list(duplicates_justseen('AaaBbbCccAaa', str.lower)) - ['a', 'a', 'b', 'b', 'c', 'c', 'a', 'a'] - - This function is analogous to :func:`unique_justseen`. - - """ - return flatten(g for _, g in groupby(iterable, key) for _ in g) - - -def classify_unique(iterable, key=None): - """Classify each element in terms of its uniqueness. - - For each element in the input iterable, return a 3-tuple consisting of: - - 1. The element itself - 2. ``False`` if the element is equal to the one preceding it in the input, - ``True`` otherwise (i.e. the equivalent of :func:`unique_justseen`) - 3. ``False`` if this element has been seen anywhere in the input before, - ``True`` otherwise (i.e. the equivalent of :func:`unique_everseen`) - - >>> list(classify_unique('otto')) # doctest: +NORMALIZE_WHITESPACE - [('o', True, True), - ('t', True, True), - ('t', False, False), - ('o', True, False)] - - This function is analogous to :func:`unique_everseen` and is subject to - the same performance considerations. - - """ - seen_set = set() - seen_list = [] - use_key = key is not None - previous = None - - for i, element in enumerate(iterable): - k = key(element) if use_key else element - is_unique_justseen = not i or previous != k - previous = k - is_unique_everseen = False - try: - if k not in seen_set: - seen_set.add(k) - is_unique_everseen = True - except TypeError: - if k not in seen_list: - seen_list.append(k) - is_unique_everseen = True - yield element, is_unique_justseen, is_unique_everseen - - -def minmax(iterable_or_value, *others, key=None, default=_marker): - """Returns both the smallest and largest items from an iterable - or from two or more arguments. - - >>> minmax([3, 1, 5]) - (1, 5) - - >>> minmax(4, 2, 6) - (2, 6) - - If a *key* function is provided, it will be used to transform the input - items for comparison. - - >>> minmax([5, 30], key=str) # '30' sorts before '5' - (30, 5) - - If a *default* value is provided, it will be returned if there are no - input items. - - >>> minmax([], default=(0, 0)) - (0, 0) - - Otherwise ``ValueError`` is raised. - - This function makes a single pass over the input elements and takes care to - minimize the number of comparisons made during processing. - - Note that unlike the builtin ``max`` function, which always returns the first - item with the maximum value, this function may return another item when there are - ties. - - This function is based on the - `recipe `__ by - Raymond Hettinger. - """ - iterable = (iterable_or_value, *others) if others else iterable_or_value - - it = iter(iterable) - - try: - lo = hi = next(it) - except StopIteration as exc: - if default is _marker: - raise ValueError( - '`minmax()` argument is an empty iterable. ' - 'Provide a `default` value to suppress this error.' - ) from exc - return default - - # Different branches depending on the presence of key. This saves a lot - # of unimportant copies which would slow the "key=None" branch - # significantly down. - if key is None: - for x, y in zip_longest(it, it, fillvalue=lo): - if y < x: - x, y = y, x - if x < lo: - lo = x - if hi < y: - hi = y - - else: - lo_key = hi_key = key(lo) - - for x, y in zip_longest(it, it, fillvalue=lo): - x_key, y_key = key(x), key(y) - - if y_key < x_key: - x, y, x_key, y_key = y, x, y_key, x_key - if x_key < lo_key: - lo, lo_key = x, x_key - if hi_key < y_key: - hi, hi_key = y, y_key - - return lo, hi - - -def constrained_batches( - iterable, max_size, max_count=None, get_len=len, strict=True -): - """Yield batches of items from *iterable* with a combined size limited by - *max_size*. - - >>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1'] - >>> list(constrained_batches(iterable, 10)) - [(b'12345', b'123'), (b'12345678', b'1', b'1'), (b'12', b'1')] - - If a *max_count* is supplied, the number of items per batch is also - limited: - - >>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1'] - >>> list(constrained_batches(iterable, 10, max_count = 2)) - [(b'12345', b'123'), (b'12345678', b'1'), (b'1', b'12'), (b'1',)] - - If a *get_len* function is supplied, use that instead of :func:`len` to - determine item size. - - If *strict* is ``True``, raise ``ValueError`` if any single item is bigger - than *max_size*. Otherwise, allow single items to exceed *max_size*. - """ - if max_size <= 0: - raise ValueError('maximum size must be greater than zero') - - batch = [] - batch_size = 0 - batch_count = 0 - for item in iterable: - item_len = get_len(item) - if strict and item_len > max_size: - raise ValueError('item size exceeds maximum size') - - reached_count = batch_count == max_count - reached_size = item_len + batch_size > max_size - if batch_count and (reached_size or reached_count): - yield tuple(batch) - batch.clear() - batch_size = 0 - batch_count = 0 - - batch.append(item) - batch_size += item_len - batch_count += 1 - - if batch: - yield tuple(batch) - - -def gray_product(*iterables): - """Like :func:`itertools.product`, but return tuples in an order such - that only one element in the generated tuple changes from one iteration - to the next. - - >>> list(gray_product('AB','CD')) - [('A', 'C'), ('B', 'C'), ('B', 'D'), ('A', 'D')] - - This function consumes all of the input iterables before producing output. - If any of the input iterables have fewer than two items, ``ValueError`` - is raised. - - For information on the algorithm, see - `this section `__ - of Donald Knuth's *The Art of Computer Programming*. - """ - all_iterables = tuple(tuple(x) for x in iterables) - iterable_count = len(all_iterables) - for iterable in all_iterables: - if len(iterable) < 2: - raise ValueError("each iterable must have two or more items") - - # This is based on "Algorithm H" from section 7.2.1.1, page 20. - # a holds the indexes of the source iterables for the n-tuple to be yielded - # f is the array of "focus pointers" - # o is the array of "directions" - a = [0] * iterable_count - f = list(range(iterable_count + 1)) - o = [1] * iterable_count - while True: - yield tuple(all_iterables[i][a[i]] for i in range(iterable_count)) - j = f[0] - f[0] = 0 - if j == iterable_count: - break - a[j] = a[j] + o[j] - if a[j] == 0 or a[j] == len(all_iterables[j]) - 1: - o[j] = -o[j] - f[j] = f[j + 1] - f[j + 1] = j + 1 - - -def partial_product(*iterables): - """Yields tuples containing one item from each iterator, with subsequent - tuples changing a single item at a time by advancing each iterator until it - is exhausted. This sequence guarantees every value in each iterable is - output at least once without generating all possible combinations. - - This may be useful, for example, when testing an expensive function. - - >>> list(partial_product('AB', 'C', 'DEF')) - [('A', 'C', 'D'), ('B', 'C', 'D'), ('B', 'C', 'E'), ('B', 'C', 'F')] - """ - - iterators = list(map(iter, iterables)) - - try: - prod = [next(it) for it in iterators] - except StopIteration: - return - yield tuple(prod) - - for i, it in enumerate(iterators): - for prod[i] in it: - yield tuple(prod) - - -def takewhile_inclusive(predicate, iterable): - """A variant of :func:`takewhile` that yields one additional element. - - >>> list(takewhile_inclusive(lambda x: x < 5, [1, 4, 6, 4, 1])) - [1, 4, 6] - - :func:`takewhile` would return ``[1, 4]``. - """ - for x in iterable: - yield x - if not predicate(x): - break - - -def outer_product(func, xs, ys, *args, **kwargs): - """A generalized outer product that applies a binary function to all - pairs of items. Returns a 2D matrix with ``len(xs)`` rows and ``len(ys)`` - columns. - Also accepts ``*args`` and ``**kwargs`` that are passed to ``func``. - - Multiplication table: - - >>> list(outer_product(mul, range(1, 4), range(1, 6))) - [(1, 2, 3, 4, 5), (2, 4, 6, 8, 10), (3, 6, 9, 12, 15)] - - Cross tabulation: - - >>> xs = ['A', 'B', 'A', 'A', 'B', 'B', 'A', 'A', 'B', 'B'] - >>> ys = ['X', 'X', 'X', 'Y', 'Z', 'Z', 'Y', 'Y', 'Z', 'Z'] - >>> pair_counts = Counter(zip(xs, ys)) - >>> count_rows = lambda x, y: pair_counts[x, y] - >>> list(outer_product(count_rows, sorted(set(xs)), sorted(set(ys)))) - [(2, 3, 0), (1, 0, 4)] - - Usage with ``*args`` and ``**kwargs``: - - >>> animals = ['cat', 'wolf', 'mouse'] - >>> list(outer_product(min, animals, animals, key=len)) - [('cat', 'cat', 'cat'), ('cat', 'wolf', 'wolf'), ('cat', 'wolf', 'mouse')] - """ - ys = tuple(ys) - return batched( - starmap(lambda x, y: func(x, y, *args, **kwargs), product(xs, ys)), - n=len(ys), - ) - - -def iter_suppress(iterable, *exceptions): - """Yield each of the items from *iterable*. If the iteration raises one of - the specified *exceptions*, that exception will be suppressed and iteration - will stop. - - >>> from itertools import chain - >>> def breaks_at_five(x): - ... while True: - ... if x >= 5: - ... raise RuntimeError - ... yield x - ... x += 1 - >>> it_1 = iter_suppress(breaks_at_five(1), RuntimeError) - >>> it_2 = iter_suppress(breaks_at_five(2), RuntimeError) - >>> list(chain(it_1, it_2)) - [1, 2, 3, 4, 2, 3, 4] - """ - try: - yield from iterable - except exceptions: - return - - -def filter_map(func, iterable): - """Apply *func* to every element of *iterable*, yielding only those which - are not ``None``. - - >>> elems = ['1', 'a', '2', 'b', '3'] - >>> list(filter_map(lambda s: int(s) if s.isnumeric() else None, elems)) - [1, 2, 3] - """ - for x in iterable: - y = func(x) - if y is not None: - yield y - - -def powerset_of_sets(iterable): - """Yields all possible subsets of the iterable. - - >>> list(powerset_of_sets([1, 2, 3])) # doctest: +SKIP - [set(), {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}] - >>> list(powerset_of_sets([1, 1, 0])) # doctest: +SKIP - [set(), {1}, {0}, {0, 1}] - - :func:`powerset_of_sets` takes care to minimize the number - of hash operations performed. - """ - sets = tuple(dict.fromkeys(map(frozenset, zip(iterable)))) - return chain.from_iterable( - starmap(set().union, combinations(sets, r)) - for r in range(len(sets) + 1) - ) - - -def join_mappings(**field_to_map): - """ - Joins multiple mappings together using their common keys. - - >>> user_scores = {'elliot': 50, 'claris': 60} - >>> user_times = {'elliot': 30, 'claris': 40} - >>> join_mappings(score=user_scores, time=user_times) - {'elliot': {'score': 50, 'time': 30}, 'claris': {'score': 60, 'time': 40}} - """ - ret = defaultdict(dict) - - for field_name, mapping in field_to_map.items(): - for key, value in mapping.items(): - ret[key][field_name] = value - - return dict(ret) - - -def _complex_sumprod(v1, v2): - """High precision sumprod() for complex numbers. - Used by :func:`dft` and :func:`idft`. - """ - - real = attrgetter('real') - imag = attrgetter('imag') - r1 = chain(map(real, v1), map(neg, map(imag, v1))) - r2 = chain(map(real, v2), map(imag, v2)) - i1 = chain(map(real, v1), map(imag, v1)) - i2 = chain(map(imag, v2), map(real, v2)) - return complex(_fsumprod(r1, r2), _fsumprod(i1, i2)) - - -def dft(xarr): - """Discrete Fourier Transform. *xarr* is a sequence of complex numbers. - Yields the components of the corresponding transformed output vector. - - >>> import cmath - >>> xarr = [1, 2-1j, -1j, -1+2j] # time domain - >>> Xarr = [2, -2-2j, -2j, 4+4j] # frequency domain - >>> magnitudes, phases = zip(*map(cmath.polar, Xarr)) - >>> all(map(cmath.isclose, dft(xarr), Xarr)) - True - - Inputs are restricted to numeric types that can add and multiply - with a complex number. This includes int, float, complex, and - Fraction, but excludes Decimal. - - See :func:`idft` for the inverse Discrete Fourier Transform. - """ - N = len(xarr) - roots_of_unity = [e ** (n / N * tau * -1j) for n in range(N)] - for k in range(N): - coeffs = [roots_of_unity[k * n % N] for n in range(N)] - yield _complex_sumprod(xarr, coeffs) - - -def idft(Xarr): - """Inverse Discrete Fourier Transform. *Xarr* is a sequence of - complex numbers. Yields the components of the corresponding - inverse-transformed output vector. - - >>> import cmath - >>> xarr = [1, 2-1j, -1j, -1+2j] # time domain - >>> Xarr = [2, -2-2j, -2j, 4+4j] # frequency domain - >>> all(map(cmath.isclose, idft(Xarr), xarr)) - True - - Inputs are restricted to numeric types that can add and multiply - with a complex number. This includes int, float, complex, and - Fraction, but excludes Decimal. - - See :func:`dft` for the Discrete Fourier Transform. - """ - N = len(Xarr) - roots_of_unity = [e ** (n / N * tau * 1j) for n in range(N)] - for k in range(N): - coeffs = [roots_of_unity[k * n % N] for n in range(N)] - yield _complex_sumprod(Xarr, coeffs) / N - - -def doublestarmap(func, iterable): - """Apply *func* to every item of *iterable* by dictionary unpacking - the item into *func*. - - The difference between :func:`itertools.starmap` and :func:`doublestarmap` - parallels the distinction between ``func(*a)`` and ``func(**a)``. - - >>> iterable = [{'a': 1, 'b': 2}, {'a': 40, 'b': 60}] - >>> list(doublestarmap(lambda a, b: a + b, iterable)) - [3, 100] - - ``TypeError`` will be raised if *func*'s signature doesn't match the - mapping contained in *iterable* or if *iterable* does not contain mappings. - """ - for item in iterable: - yield func(**item) - - -def _nth_prime_bounds(n): - """Bounds for the nth prime (counting from 1): lb < p_n < ub.""" - # At and above 688,383, the lb/ub spread is under 0.003 * p_n. - - if n < 1: - raise ValueError - - if n < 6: - return (n, 2.25 * n) - - # https://en.wikipedia.org/wiki/Prime-counting_function#Inequalities - upper_bound = n * log(n * log(n)) - lower_bound = upper_bound - n - if n >= 688_383: - upper_bound -= n * (1.0 - (log(log(n)) - 2.0) / log(n)) - - return lower_bound, upper_bound - - -def nth_prime(n, *, approximate=False): - """Return the nth prime (counting from 0). - - >>> nth_prime(0) - 2 - >>> nth_prime(100) - 547 - - If *approximate* is set to True, will return a prime close - to the nth prime. The estimation is much faster than computing - an exact result. - - >>> nth_prime(200_000_000, approximate=True) # Exact result is 4222234763 - 4217820427 - - """ - lb, ub = _nth_prime_bounds(n + 1) - - if not approximate or n <= 1_000_000: - return nth(sieve(ceil(ub)), n) - - # Search from the midpoint and return the first odd prime - odd = floor((lb + ub) / 2) | 1 - return first_true(count(odd, step=2), pred=is_prime) - - -def argmin(iterable, *, key=None): - """ - Index of the first occurrence of a minimum value in an iterable. - - >>> argmin('efghabcdijkl') - 4 - >>> argmin([3, 2, 1, 0, 4, 2, 1, 0]) - 3 - - For example, look up a label corresponding to the position - of a value that minimizes a cost function:: - - >>> def cost(x): - ... "Days for a wound to heal given a subject's age." - ... return x**2 - 20*x + 150 - ... - >>> labels = ['homer', 'marge', 'bart', 'lisa', 'maggie'] - >>> ages = [ 35, 30, 10, 9, 1 ] - - # Fastest healing family member - >>> labels[argmin(ages, key=cost)] - 'bart' - - # Age with fastest healing - >>> min(ages, key=cost) - 10 - - """ - if key is not None: - iterable = map(key, iterable) - return min(enumerate(iterable), key=itemgetter(1))[0] - - -def argmax(iterable, *, key=None): - """ - Index of the first occurrence of a maximum value in an iterable. - - >>> argmax('abcdefghabcd') - 7 - >>> argmax([0, 1, 2, 3, 3, 2, 1, 0]) - 3 - - For example, identify the best machine learning model:: - - >>> models = ['svm', 'random forest', 'knn', 'naïve bayes'] - >>> accuracy = [ 68, 61, 84, 72 ] - - # Most accurate model - >>> models[argmax(accuracy)] - 'knn' - - # Best accuracy - >>> max(accuracy) - 84 - - """ - if key is not None: - iterable = map(key, iterable) - return max(enumerate(iterable), key=itemgetter(1))[0] - - -def extract(iterable, indices): - """Yield values at the specified indices. - - Example: - - >>> data = 'abcdefghijklmnopqrstuvwxyz' - >>> list(extract(data, [7, 4, 11, 11, 14])) - ['h', 'e', 'l', 'l', 'o'] - - The *iterable* is consumed lazily and can be infinite. - The *indices* are consumed immediately and must be finite. - - Raises ``IndexError`` if an index lies beyond the iterable. - Raises ``ValueError`` for negative indices. - """ - - iterator = iter(iterable) - index_and_position = sorted(zip(indices, count())) - - if index_and_position and index_and_position[0][0] < 0: - raise ValueError('Indices must be non-negative') - - buffer = {} - iterator_position = -1 - next_to_emit = 0 - - for index, order in index_and_position: - advance = index - iterator_position - if advance: - try: - value = next(islice(iterator, advance - 1, None)) - except StopIteration: - raise IndexError(index) - iterator_position = index - - buffer[order] = value - - while next_to_emit in buffer: - yield buffer.pop(next_to_emit) - next_to_emit += 1 diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools/more.pyi b/voxvera/vendor/setuptools/_vendor/more_itertools/more.pyi deleted file mode 100644 index b5e33f8..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools/more.pyi +++ /dev/null @@ -1,949 +0,0 @@ -"""Stubs for more_itertools.more""" - -from __future__ import annotations - -import sys -import types - -from collections.abc import ( - Container, - Hashable, - Iterable, - Iterator, - Mapping, - Reversible, - Sequence, - Sized, -) -from contextlib import AbstractContextManager -from typing import ( - Any, - Callable, - Generic, - TypeVar, - overload, - type_check_only, -) -from typing_extensions import Protocol - -__all__ = [ - 'AbortThread', - 'SequenceView', - 'UnequalIterablesError', - 'adjacent', - 'all_unique', - 'always_iterable', - 'always_reversible', - 'argmax', - 'argmin', - 'bucket', - 'callback_iter', - 'chunked', - 'chunked_even', - 'circular_shifts', - 'collapse', - 'combination_index', - 'combination_with_replacement_index', - 'consecutive_groups', - 'constrained_batches', - 'consumer', - 'count_cycle', - 'countable', - 'derangements', - 'dft', - 'difference', - 'distinct_combinations', - 'distinct_permutations', - 'distribute', - 'divide', - 'doublestarmap', - 'duplicates_everseen', - 'duplicates_justseen', - 'classify_unique', - 'exactly_n', - 'extract', - 'filter_except', - 'filter_map', - 'first', - 'gray_product', - 'groupby_transform', - 'ichunked', - 'iequals', - 'idft', - 'ilen', - 'interleave', - 'interleave_evenly', - 'interleave_longest', - 'interleave_randomly', - 'intersperse', - 'is_sorted', - 'islice_extended', - 'iterate', - 'iter_suppress', - 'join_mappings', - 'last', - 'locate', - 'longest_common_prefix', - 'lstrip', - 'make_decorator', - 'map_except', - 'map_if', - 'map_reduce', - 'mark_ends', - 'minmax', - 'nth_or_last', - 'nth_permutation', - 'nth_prime', - 'nth_product', - 'nth_combination_with_replacement', - 'numeric_range', - 'one', - 'only', - 'outer_product', - 'padded', - 'partial_product', - 'partitions', - 'peekable', - 'permutation_index', - 'powerset_of_sets', - 'product_index', - 'raise_', - 'repeat_each', - 'repeat_last', - 'replace', - 'rlocate', - 'rstrip', - 'run_length', - 'sample', - 'seekable', - 'set_partitions', - 'side_effect', - 'sliced', - 'sort_together', - 'split_after', - 'split_at', - 'split_before', - 'split_into', - 'split_when', - 'spy', - 'stagger', - 'strip', - 'strictly_n', - 'substrings', - 'substrings_indexes', - 'takewhile_inclusive', - 'time_limited', - 'unique_in_window', - 'unique_to_each', - 'unzip', - 'value_chain', - 'windowed', - 'windowed_complete', - 'with_iter', - 'zip_broadcast', - 'zip_equal', - 'zip_offset', -] - -# Type and type variable definitions -_T = TypeVar('_T') -_T1 = TypeVar('_T1') -_T2 = TypeVar('_T2') -_T3 = TypeVar('_T3') -_T4 = TypeVar('_T4') -_T5 = TypeVar('_T5') -_U = TypeVar('_U') -_V = TypeVar('_V') -_W = TypeVar('_W') -_T_co = TypeVar('_T_co', covariant=True) -_GenFn = TypeVar('_GenFn', bound=Callable[..., Iterator[Any]]) -_Raisable = BaseException | type[BaseException] - -# The type of isinstance's second argument (from typeshed builtins) -if sys.version_info >= (3, 10): - _ClassInfo = type | types.UnionType | tuple[_ClassInfo, ...] -else: - _ClassInfo = type | tuple[_ClassInfo, ...] - -@type_check_only -class _SizedIterable(Protocol[_T_co], Sized, Iterable[_T_co]): ... - -@type_check_only -class _SizedReversible(Protocol[_T_co], Sized, Reversible[_T_co]): ... - -@type_check_only -class _SupportsSlicing(Protocol[_T_co]): - def __getitem__(self, __k: slice) -> _T_co: ... - -def chunked( - iterable: Iterable[_T], n: int | None, strict: bool = ... -) -> Iterator[list[_T]]: ... -@overload -def first(iterable: Iterable[_T]) -> _T: ... -@overload -def first(iterable: Iterable[_T], default: _U) -> _T | _U: ... -@overload -def last(iterable: Iterable[_T]) -> _T: ... -@overload -def last(iterable: Iterable[_T], default: _U) -> _T | _U: ... -@overload -def nth_or_last(iterable: Iterable[_T], n: int) -> _T: ... -@overload -def nth_or_last(iterable: Iterable[_T], n: int, default: _U) -> _T | _U: ... - -class peekable(Generic[_T], Iterator[_T]): - def __init__(self, iterable: Iterable[_T]) -> None: ... - def __iter__(self) -> peekable[_T]: ... - def __bool__(self) -> bool: ... - @overload - def peek(self) -> _T: ... - @overload - def peek(self, default: _U) -> _T | _U: ... - def prepend(self, *items: _T) -> None: ... - def __next__(self) -> _T: ... - @overload - def __getitem__(self, index: int) -> _T: ... - @overload - def __getitem__(self, index: slice) -> list[_T]: ... - -def consumer(func: _GenFn) -> _GenFn: ... -def ilen(iterable: Iterable[_T]) -> int: ... -def iterate(func: Callable[[_T], _T], start: _T) -> Iterator[_T]: ... -def with_iter( - context_manager: AbstractContextManager[Iterable[_T]], -) -> Iterator[_T]: ... -def one( - iterable: Iterable[_T], - too_short: _Raisable | None = ..., - too_long: _Raisable | None = ..., -) -> _T: ... -def raise_(exception: _Raisable, *args: Any) -> None: ... -def strictly_n( - iterable: Iterable[_T], - n: int, - too_short: _GenFn | None = ..., - too_long: _GenFn | None = ..., -) -> list[_T]: ... -def distinct_permutations( - iterable: Iterable[_T], r: int | None = ... -) -> Iterator[tuple[_T, ...]]: ... -def derangements( - iterable: Iterable[_T], r: int | None = None -) -> Iterator[tuple[_T, ...]]: ... -def intersperse( - e: _U, iterable: Iterable[_T], n: int = ... -) -> Iterator[_T | _U]: ... -def unique_to_each(*iterables: Iterable[_T]) -> list[list[_T]]: ... -@overload -def windowed( - seq: Iterable[_T], n: int, *, step: int = ... -) -> Iterator[tuple[_T | None, ...]]: ... -@overload -def windowed( - seq: Iterable[_T], n: int, fillvalue: _U, step: int = ... -) -> Iterator[tuple[_T | _U, ...]]: ... -def substrings(iterable: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ... -def substrings_indexes( - seq: Sequence[_T], reverse: bool = ... -) -> Iterator[tuple[Sequence[_T], int, int]]: ... - -class bucket(Generic[_T, _U], Container[_U]): - def __init__( - self, - iterable: Iterable[_T], - key: Callable[[_T], _U], - validator: Callable[[_U], object] | None = ..., - ) -> None: ... - def __contains__(self, value: object) -> bool: ... - def __iter__(self) -> Iterator[_U]: ... - def __getitem__(self, value: object) -> Iterator[_T]: ... - -def spy( - iterable: Iterable[_T], n: int = ... -) -> tuple[list[_T], Iterator[_T]]: ... -def interleave(*iterables: Iterable[_T]) -> Iterator[_T]: ... -def interleave_longest(*iterables: Iterable[_T]) -> Iterator[_T]: ... -def interleave_evenly( - iterables: list[Iterable[_T]], lengths: list[int] | None = ... -) -> Iterator[_T]: ... -def interleave_randomly(*iterables: Iterable[_T]) -> Iterable[_T]: ... -def collapse( - iterable: Iterable[Any], - base_type: _ClassInfo | None = ..., - levels: int | None = ..., -) -> Iterator[Any]: ... -@overload -def side_effect( - func: Callable[[_T], object], - iterable: Iterable[_T], - chunk_size: None = ..., - before: Callable[[], object] | None = ..., - after: Callable[[], object] | None = ..., -) -> Iterator[_T]: ... -@overload -def side_effect( - func: Callable[[list[_T]], object], - iterable: Iterable[_T], - chunk_size: int, - before: Callable[[], object] | None = ..., - after: Callable[[], object] | None = ..., -) -> Iterator[_T]: ... -def sliced( - seq: _SupportsSlicing[_T], n: int, strict: bool = ... -) -> Iterator[_T]: ... -def split_at( - iterable: Iterable[_T], - pred: Callable[[_T], object], - maxsplit: int = ..., - keep_separator: bool = ..., -) -> Iterator[list[_T]]: ... -def split_before( - iterable: Iterable[_T], pred: Callable[[_T], object], maxsplit: int = ... -) -> Iterator[list[_T]]: ... -def split_after( - iterable: Iterable[_T], pred: Callable[[_T], object], maxsplit: int = ... -) -> Iterator[list[_T]]: ... -def split_when( - iterable: Iterable[_T], - pred: Callable[[_T, _T], object], - maxsplit: int = ..., -) -> Iterator[list[_T]]: ... -def split_into( - iterable: Iterable[_T], sizes: Iterable[int | None] -) -> Iterator[list[_T]]: ... -@overload -def padded( - iterable: Iterable[_T], - *, - n: int | None = ..., - next_multiple: bool = ..., -) -> Iterator[_T | None]: ... -@overload -def padded( - iterable: Iterable[_T], - fillvalue: _U, - n: int | None = ..., - next_multiple: bool = ..., -) -> Iterator[_T | _U]: ... -@overload -def repeat_last(iterable: Iterable[_T]) -> Iterator[_T]: ... -@overload -def repeat_last(iterable: Iterable[_T], default: _U) -> Iterator[_T | _U]: ... -def distribute(n: int, iterable: Iterable[_T]) -> list[Iterator[_T]]: ... -@overload -def stagger( - iterable: Iterable[_T], - offsets: _SizedIterable[int] = ..., - longest: bool = ..., -) -> Iterator[tuple[_T | None, ...]]: ... -@overload -def stagger( - iterable: Iterable[_T], - offsets: _SizedIterable[int] = ..., - longest: bool = ..., - fillvalue: _U = ..., -) -> Iterator[tuple[_T | _U, ...]]: ... - -class UnequalIterablesError(ValueError): - def __init__(self, details: tuple[int, int, int] | None = ...) -> None: ... - -# zip_equal -@overload -def zip_equal(__iter1: Iterable[_T1]) -> Iterator[tuple[_T1]]: ... -@overload -def zip_equal( - __iter1: Iterable[_T1], __iter2: Iterable[_T2] -) -> Iterator[tuple[_T1, _T2]]: ... -@overload -def zip_equal( - __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3] -) -> Iterator[tuple[_T1, _T2, _T3]]: ... -@overload -def zip_equal( - __iter1: Iterable[_T1], - __iter2: Iterable[_T2], - __iter3: Iterable[_T3], - __iter4: Iterable[_T4], -) -> Iterator[tuple[_T1, _T2, _T3, _T4]]: ... -@overload -def zip_equal( - __iter1: Iterable[_T1], - __iter2: Iterable[_T2], - __iter3: Iterable[_T3], - __iter4: Iterable[_T4], - __iter5: Iterable[_T5], -) -> Iterator[tuple[_T1, _T2, _T3, _T4, _T5]]: ... -@overload -def zip_equal( - __iter1: Iterable[Any], - __iter2: Iterable[Any], - __iter3: Iterable[Any], - __iter4: Iterable[Any], - __iter5: Iterable[Any], - __iter6: Iterable[Any], - *iterables: Iterable[Any], -) -> Iterator[tuple[Any, ...]]: ... - -# zip_offset -@overload -def zip_offset( - __iter1: Iterable[_T1], - *, - offsets: _SizedIterable[int], - longest: bool = ..., - fillvalue: None = None, -) -> Iterator[tuple[_T1 | None]]: ... -@overload -def zip_offset( - __iter1: Iterable[_T1], - __iter2: Iterable[_T2], - *, - offsets: _SizedIterable[int], - longest: bool = ..., - fillvalue: None = None, -) -> Iterator[tuple[_T1 | None, _T2 | None]]: ... -@overload -def zip_offset( - __iter1: Iterable[_T], - __iter2: Iterable[_T], - __iter3: Iterable[_T], - *iterables: Iterable[_T], - offsets: _SizedIterable[int], - longest: bool = ..., - fillvalue: None = None, -) -> Iterator[tuple[_T | None, ...]]: ... -@overload -def zip_offset( - __iter1: Iterable[_T1], - *, - offsets: _SizedIterable[int], - longest: bool = ..., - fillvalue: _U, -) -> Iterator[tuple[_T1 | _U]]: ... -@overload -def zip_offset( - __iter1: Iterable[_T1], - __iter2: Iterable[_T2], - *, - offsets: _SizedIterable[int], - longest: bool = ..., - fillvalue: _U, -) -> Iterator[tuple[_T1 | _U, _T2 | _U]]: ... -@overload -def zip_offset( - __iter1: Iterable[_T], - __iter2: Iterable[_T], - __iter3: Iterable[_T], - *iterables: Iterable[_T], - offsets: _SizedIterable[int], - longest: bool = ..., - fillvalue: _U, -) -> Iterator[tuple[_T | _U, ...]]: ... -def sort_together( - iterables: Iterable[Iterable[_T]], - key_list: Iterable[int] = ..., - key: Callable[..., Any] | None = ..., - reverse: bool = ..., - strict: bool = ..., -) -> list[tuple[_T, ...]]: ... -def unzip(iterable: Iterable[Sequence[_T]]) -> tuple[Iterator[_T], ...]: ... -def divide(n: int, iterable: Iterable[_T]) -> list[Iterator[_T]]: ... -def always_iterable( - obj: object, - base_type: _ClassInfo | None = ..., -) -> Iterator[Any]: ... -def adjacent( - predicate: Callable[[_T], bool], - iterable: Iterable[_T], - distance: int = ..., -) -> Iterator[tuple[bool, _T]]: ... -@overload -def groupby_transform( - iterable: Iterable[_T], - keyfunc: None = None, - valuefunc: None = None, - reducefunc: None = None, -) -> Iterator[tuple[_T, Iterator[_T]]]: ... -@overload -def groupby_transform( - iterable: Iterable[_T], - keyfunc: Callable[[_T], _U], - valuefunc: None, - reducefunc: None, -) -> Iterator[tuple[_U, Iterator[_T]]]: ... -@overload -def groupby_transform( - iterable: Iterable[_T], - keyfunc: None, - valuefunc: Callable[[_T], _V], - reducefunc: None, -) -> Iterator[tuple[_T, Iterator[_V]]]: ... -@overload -def groupby_transform( - iterable: Iterable[_T], - keyfunc: Callable[[_T], _U], - valuefunc: Callable[[_T], _V], - reducefunc: None, -) -> Iterator[tuple[_U, Iterator[_V]]]: ... -@overload -def groupby_transform( - iterable: Iterable[_T], - keyfunc: None, - valuefunc: None, - reducefunc: Callable[[Iterator[_T]], _W], -) -> Iterator[tuple[_T, _W]]: ... -@overload -def groupby_transform( - iterable: Iterable[_T], - keyfunc: Callable[[_T], _U], - valuefunc: None, - reducefunc: Callable[[Iterator[_T]], _W], -) -> Iterator[tuple[_U, _W]]: ... -@overload -def groupby_transform( - iterable: Iterable[_T], - keyfunc: None, - valuefunc: Callable[[_T], _V], - reducefunc: Callable[[Iterator[_V]], _W], -) -> Iterator[tuple[_T, _W]]: ... -@overload -def groupby_transform( - iterable: Iterable[_T], - keyfunc: Callable[[_T], _U], - valuefunc: Callable[[_T], _V], - reducefunc: Callable[[Iterator[_V]], _W], -) -> Iterator[tuple[_U, _W]]: ... - -class numeric_range(Generic[_T, _U], Sequence[_T], Hashable, Reversible[_T]): - @overload - def __init__(self, __stop: _T) -> None: ... - @overload - def __init__(self, __start: _T, __stop: _T) -> None: ... - @overload - def __init__(self, __start: _T, __stop: _T, __step: _U) -> None: ... - def __bool__(self) -> bool: ... - def __contains__(self, elem: object) -> bool: ... - def __eq__(self, other: object) -> bool: ... - @overload - def __getitem__(self, key: int) -> _T: ... - @overload - def __getitem__(self, key: slice) -> numeric_range[_T, _U]: ... - def __hash__(self) -> int: ... - def __iter__(self) -> Iterator[_T]: ... - def __len__(self) -> int: ... - def __reduce__( - self, - ) -> tuple[type[numeric_range[_T, _U]], tuple[_T, _T, _U]]: ... - def __repr__(self) -> str: ... - def __reversed__(self) -> Iterator[_T]: ... - def count(self, value: _T) -> int: ... - def index(self, value: _T) -> int: ... # type: ignore - -def count_cycle( - iterable: Iterable[_T], n: int | None = ... -) -> Iterable[tuple[int, _T]]: ... -def mark_ends( - iterable: Iterable[_T], -) -> Iterable[tuple[bool, bool, _T]]: ... -def locate( - iterable: Iterable[_T], - pred: Callable[..., Any] = ..., - window_size: int | None = ..., -) -> Iterator[int]: ... -def lstrip( - iterable: Iterable[_T], pred: Callable[[_T], object] -) -> Iterator[_T]: ... -def rstrip( - iterable: Iterable[_T], pred: Callable[[_T], object] -) -> Iterator[_T]: ... -def strip( - iterable: Iterable[_T], pred: Callable[[_T], object] -) -> Iterator[_T]: ... - -class islice_extended(Generic[_T], Iterator[_T]): - def __init__(self, iterable: Iterable[_T], *args: int | None) -> None: ... - def __iter__(self) -> islice_extended[_T]: ... - def __next__(self) -> _T: ... - def __getitem__(self, index: slice) -> islice_extended[_T]: ... - -def always_reversible(iterable: Iterable[_T]) -> Iterator[_T]: ... -def consecutive_groups( - iterable: Iterable[_T], ordering: None | Callable[[_T], int] = ... -) -> Iterator[Iterator[_T]]: ... -@overload -def difference( - iterable: Iterable[_T], - func: Callable[[_T, _T], _U] = ..., - *, - initial: None = ..., -) -> Iterator[_T | _U]: ... -@overload -def difference( - iterable: Iterable[_T], func: Callable[[_T, _T], _U] = ..., *, initial: _U -) -> Iterator[_U]: ... - -class SequenceView(Generic[_T], Sequence[_T]): - def __init__(self, target: Sequence[_T]) -> None: ... - @overload - def __getitem__(self, index: int) -> _T: ... - @overload - def __getitem__(self, index: slice) -> Sequence[_T]: ... - def __len__(self) -> int: ... - -class seekable(Generic[_T], Iterator[_T]): - def __init__( - self, iterable: Iterable[_T], maxlen: int | None = ... - ) -> None: ... - def __iter__(self) -> seekable[_T]: ... - def __next__(self) -> _T: ... - def __bool__(self) -> bool: ... - @overload - def peek(self) -> _T: ... - @overload - def peek(self, default: _U) -> _T | _U: ... - def elements(self) -> SequenceView[_T]: ... - def seek(self, index: int) -> None: ... - def relative_seek(self, count: int) -> None: ... - -class run_length: - @staticmethod - def encode(iterable: Iterable[_T]) -> Iterator[tuple[_T, int]]: ... - @staticmethod - def decode(iterable: Iterable[tuple[_T, int]]) -> Iterator[_T]: ... - -def exactly_n( - iterable: Iterable[_T], n: int, predicate: Callable[[_T], object] = ... -) -> bool: ... -def circular_shifts( - iterable: Iterable[_T], steps: int = 1 -) -> list[tuple[_T, ...]]: ... -def make_decorator( - wrapping_func: Callable[..., _U], result_index: int = ... -) -> Callable[..., Callable[[Callable[..., Any]], Callable[..., _U]]]: ... -@overload -def map_reduce( - iterable: Iterable[_T], - keyfunc: Callable[[_T], _U], - valuefunc: None = ..., - reducefunc: None = ..., -) -> dict[_U, list[_T]]: ... -@overload -def map_reduce( - iterable: Iterable[_T], - keyfunc: Callable[[_T], _U], - valuefunc: Callable[[_T], _V], - reducefunc: None = ..., -) -> dict[_U, list[_V]]: ... -@overload -def map_reduce( - iterable: Iterable[_T], - keyfunc: Callable[[_T], _U], - valuefunc: None = ..., - reducefunc: Callable[[list[_T]], _W] = ..., -) -> dict[_U, _W]: ... -@overload -def map_reduce( - iterable: Iterable[_T], - keyfunc: Callable[[_T], _U], - valuefunc: Callable[[_T], _V], - reducefunc: Callable[[list[_V]], _W], -) -> dict[_U, _W]: ... -def rlocate( - iterable: Iterable[_T], - pred: Callable[..., object] = ..., - window_size: int | None = ..., -) -> Iterator[int]: ... -def replace( - iterable: Iterable[_T], - pred: Callable[..., object], - substitutes: Iterable[_U], - count: int | None = ..., - window_size: int = ..., -) -> Iterator[_T | _U]: ... -def partitions(iterable: Iterable[_T]) -> Iterator[list[list[_T]]]: ... -def set_partitions( - iterable: Iterable[_T], - k: int | None = ..., - min_size: int | None = ..., - max_size: int | None = ..., -) -> Iterator[list[list[_T]]]: ... - -class time_limited(Generic[_T], Iterator[_T]): - def __init__( - self, limit_seconds: float, iterable: Iterable[_T] - ) -> None: ... - def __iter__(self) -> islice_extended[_T]: ... - def __next__(self) -> _T: ... - -@overload -def only( - iterable: Iterable[_T], *, too_long: _Raisable | None = ... -) -> _T | None: ... -@overload -def only( - iterable: Iterable[_T], default: _U, too_long: _Raisable | None = ... -) -> _T | _U: ... -def ichunked(iterable: Iterable[_T], n: int) -> Iterator[Iterator[_T]]: ... -def distinct_combinations( - iterable: Iterable[_T], r: int -) -> Iterator[tuple[_T, ...]]: ... -def filter_except( - validator: Callable[[Any], object], - iterable: Iterable[_T], - *exceptions: type[BaseException], -) -> Iterator[_T]: ... -def map_except( - function: Callable[[Any], _U], - iterable: Iterable[_T], - *exceptions: type[BaseException], -) -> Iterator[_U]: ... -def map_if( - iterable: Iterable[Any], - pred: Callable[[Any], bool], - func: Callable[[Any], Any], - func_else: Callable[[Any], Any] | None = ..., -) -> Iterator[Any]: ... -def _sample_unweighted( - iterator: Iterator[_T], k: int, strict: bool -) -> list[_T]: ... -def _sample_counted( - population: Iterator[_T], k: int, counts: Iterable[int], strict: bool -) -> list[_T]: ... -def _sample_weighted( - iterator: Iterator[_T], k: int, weights: Iterator[float], strict: bool -) -> list[_T]: ... -def sample( - iterable: Iterable[_T], - k: int, - weights: Iterable[float] | None = ..., - *, - counts: Iterable[int] | None = ..., - strict: bool = False, -) -> list[_T]: ... -def is_sorted( - iterable: Iterable[_T], - key: Callable[[_T], _U] | None = ..., - reverse: bool = False, - strict: bool = False, -) -> bool: ... - -class AbortThread(BaseException): - pass - -class callback_iter(Generic[_T], Iterator[_T]): - def __init__( - self, - func: Callable[..., Any], - callback_kwd: str = ..., - wait_seconds: float = ..., - ) -> None: ... - def __enter__(self) -> callback_iter[_T]: ... - def __exit__( - self, - exc_type: type[BaseException] | None, - exc_value: BaseException | None, - traceback: types.TracebackType | None, - ) -> bool | None: ... - def __iter__(self) -> callback_iter[_T]: ... - def __next__(self) -> _T: ... - def _reader(self) -> Iterator[_T]: ... - @property - def done(self) -> bool: ... - @property - def result(self) -> Any: ... - -def windowed_complete( - iterable: Iterable[_T], n: int -) -> Iterator[tuple[tuple[_T, ...], tuple[_T, ...], tuple[_T, ...]]]: ... -def all_unique( - iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... -) -> bool: ... -def nth_product(index: int, *args: Iterable[_T]) -> tuple[_T, ...]: ... -def nth_combination_with_replacement( - iterable: Iterable[_T], r: int, index: int -) -> tuple[_T, ...]: ... -def nth_permutation( - iterable: Iterable[_T], r: int, index: int -) -> tuple[_T, ...]: ... -def value_chain(*args: _T | Iterable[_T]) -> Iterable[_T]: ... -def product_index(element: Iterable[_T], *args: Iterable[_T]) -> int: ... -def combination_index( - element: Iterable[_T], iterable: Iterable[_T] -) -> int: ... -def combination_with_replacement_index( - element: Iterable[_T], iterable: Iterable[_T] -) -> int: ... -def permutation_index( - element: Iterable[_T], iterable: Iterable[_T] -) -> int: ... -def repeat_each(iterable: Iterable[_T], n: int = ...) -> Iterator[_T]: ... - -class countable(Generic[_T], Iterator[_T]): - def __init__(self, iterable: Iterable[_T]) -> None: ... - def __iter__(self) -> countable[_T]: ... - def __next__(self) -> _T: ... - items_seen: int - -def chunked_even(iterable: Iterable[_T], n: int) -> Iterator[list[_T]]: ... -@overload -def zip_broadcast( - __obj1: _T | Iterable[_T], - *, - scalar_types: _ClassInfo | None = ..., - strict: bool = ..., -) -> Iterable[tuple[_T, ...]]: ... -@overload -def zip_broadcast( - __obj1: _T | Iterable[_T], - __obj2: _T | Iterable[_T], - *, - scalar_types: _ClassInfo | None = ..., - strict: bool = ..., -) -> Iterable[tuple[_T, ...]]: ... -@overload -def zip_broadcast( - __obj1: _T | Iterable[_T], - __obj2: _T | Iterable[_T], - __obj3: _T | Iterable[_T], - *, - scalar_types: _ClassInfo | None = ..., - strict: bool = ..., -) -> Iterable[tuple[_T, ...]]: ... -@overload -def zip_broadcast( - __obj1: _T | Iterable[_T], - __obj2: _T | Iterable[_T], - __obj3: _T | Iterable[_T], - __obj4: _T | Iterable[_T], - *, - scalar_types: _ClassInfo | None = ..., - strict: bool = ..., -) -> Iterable[tuple[_T, ...]]: ... -@overload -def zip_broadcast( - __obj1: _T | Iterable[_T], - __obj2: _T | Iterable[_T], - __obj3: _T | Iterable[_T], - __obj4: _T | Iterable[_T], - __obj5: _T | Iterable[_T], - *, - scalar_types: _ClassInfo | None = ..., - strict: bool = ..., -) -> Iterable[tuple[_T, ...]]: ... -@overload -def zip_broadcast( - __obj1: _T | Iterable[_T], - __obj2: _T | Iterable[_T], - __obj3: _T | Iterable[_T], - __obj4: _T | Iterable[_T], - __obj5: _T | Iterable[_T], - __obj6: _T | Iterable[_T], - *objects: _T | Iterable[_T], - scalar_types: _ClassInfo | None = ..., - strict: bool = ..., -) -> Iterable[tuple[_T, ...]]: ... -def unique_in_window( - iterable: Iterable[_T], n: int, key: Callable[[_T], _U] | None = ... -) -> Iterator[_T]: ... -def duplicates_everseen( - iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... -) -> Iterator[_T]: ... -def duplicates_justseen( - iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... -) -> Iterator[_T]: ... -def classify_unique( - iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... -) -> Iterator[tuple[_T, bool, bool]]: ... - -class _SupportsLessThan(Protocol): - def __lt__(self, __other: Any) -> bool: ... - -_SupportsLessThanT = TypeVar("_SupportsLessThanT", bound=_SupportsLessThan) - -@overload -def minmax( - iterable_or_value: Iterable[_SupportsLessThanT], *, key: None = None -) -> tuple[_SupportsLessThanT, _SupportsLessThanT]: ... -@overload -def minmax( - iterable_or_value: Iterable[_T], *, key: Callable[[_T], _SupportsLessThan] -) -> tuple[_T, _T]: ... -@overload -def minmax( - iterable_or_value: Iterable[_SupportsLessThanT], - *, - key: None = None, - default: _U, -) -> _U | tuple[_SupportsLessThanT, _SupportsLessThanT]: ... -@overload -def minmax( - iterable_or_value: Iterable[_T], - *, - key: Callable[[_T], _SupportsLessThan], - default: _U, -) -> _U | tuple[_T, _T]: ... -@overload -def minmax( - iterable_or_value: _SupportsLessThanT, - __other: _SupportsLessThanT, - *others: _SupportsLessThanT, -) -> tuple[_SupportsLessThanT, _SupportsLessThanT]: ... -@overload -def minmax( - iterable_or_value: _T, - __other: _T, - *others: _T, - key: Callable[[_T], _SupportsLessThan], -) -> tuple[_T, _T]: ... -def longest_common_prefix( - iterables: Iterable[Iterable[_T]], -) -> Iterator[_T]: ... -def iequals(*iterables: Iterable[Any]) -> bool: ... -def constrained_batches( - iterable: Iterable[_T], - max_size: int, - max_count: int | None = ..., - get_len: Callable[[_T], object] = ..., - strict: bool = ..., -) -> Iterator[tuple[_T]]: ... -def gray_product(*iterables: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ... -def partial_product(*iterables: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ... -def takewhile_inclusive( - predicate: Callable[[_T], bool], iterable: Iterable[_T] -) -> Iterator[_T]: ... -def outer_product( - func: Callable[[_T, _U], _V], - xs: Iterable[_T], - ys: Iterable[_U], - *args: Any, - **kwargs: Any, -) -> Iterator[tuple[_V, ...]]: ... -def iter_suppress( - iterable: Iterable[_T], - *exceptions: type[BaseException], -) -> Iterator[_T]: ... -def filter_map( - func: Callable[[_T], _V | None], - iterable: Iterable[_T], -) -> Iterator[_V]: ... -def powerset_of_sets(iterable: Iterable[_T]) -> Iterator[set[_T]]: ... -def join_mappings( - **field_to_map: Mapping[_T, _V], -) -> dict[_T, dict[str, _V]]: ... -def doublestarmap( - func: Callable[..., _T], - iterable: Iterable[Mapping[str, Any]], -) -> Iterator[_T]: ... -def dft(xarr: Sequence[complex]) -> Iterator[complex]: ... -def idft(Xarr: Sequence[complex]) -> Iterator[complex]: ... -def _nth_prime_ub(n: int) -> float: ... -def nth_prime(n: int, *, approximate: bool = ...) -> int: ... -def argmin( - iterable: Iterable[_T], *, key: Callable[[_T], _U] | None = ... -) -> int: ... -def argmax( - iterable: Iterable[_T], *, key: Callable[[_T], _U] | None = ... -) -> int: ... -def extract( - iterable: Iterable[_T], indices: Iterable[int] -) -> Iterator[_T]: ... diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools/py.typed b/voxvera/vendor/setuptools/_vendor/more_itertools/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools/recipes.py b/voxvera/vendor/setuptools/_vendor/more_itertools/recipes.py deleted file mode 100644 index dacf614..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools/recipes.py +++ /dev/null @@ -1,1471 +0,0 @@ -"""Imported from the recipes section of the itertools documentation. - -All functions taken from the recipes section of the itertools library docs -[1]_. -Some backward-compatible usability improvements have been made. - -.. [1] http://docs.python.org/library/itertools.html#recipes - -""" - -import random - -from bisect import bisect_left, insort -from collections import deque -from contextlib import suppress -from functools import lru_cache, partial, reduce -from heapq import heappush, heappushpop -from itertools import ( - accumulate, - chain, - combinations, - compress, - count, - cycle, - groupby, - islice, - product, - repeat, - starmap, - takewhile, - tee, - zip_longest, -) -from math import prod, comb, isqrt, gcd -from operator import mul, not_, itemgetter, getitem, index -from random import randrange, sample, choice -from sys import hexversion - -__all__ = [ - 'all_equal', - 'batched', - 'before_and_after', - 'consume', - 'convolve', - 'dotproduct', - 'first_true', - 'factor', - 'flatten', - 'grouper', - 'is_prime', - 'iter_except', - 'iter_index', - 'loops', - 'matmul', - 'multinomial', - 'ncycles', - 'nth', - 'nth_combination', - 'padnone', - 'pad_none', - 'pairwise', - 'partition', - 'polynomial_eval', - 'polynomial_from_roots', - 'polynomial_derivative', - 'powerset', - 'prepend', - 'quantify', - 'reshape', - 'random_combination_with_replacement', - 'random_combination', - 'random_permutation', - 'random_product', - 'repeatfunc', - 'roundrobin', - 'running_median', - 'sieve', - 'sliding_window', - 'subslices', - 'sum_of_squares', - 'tabulate', - 'tail', - 'take', - 'totient', - 'transpose', - 'triplewise', - 'unique', - 'unique_everseen', - 'unique_justseen', -] - -_marker = object() - - -# zip with strict is available for Python 3.10+ -try: - zip(strict=True) -except TypeError: # pragma: no cover - _zip_strict = zip -else: # pragma: no cover - _zip_strict = partial(zip, strict=True) - - -# math.sumprod is available for Python 3.12+ -try: - from math import sumprod as _sumprod -except ImportError: # pragma: no cover - _sumprod = lambda x, y: dotproduct(x, y) - - -# heapq max-heap functions are available for Python 3.14+ -try: - from heapq import heappush_max, heappushpop_max -except ImportError: # pragma: no cover - _max_heap_available = False -else: # pragma: no cover - _max_heap_available = True - - -def take(n, iterable): - """Return first *n* items of the *iterable* as a list. - - >>> take(3, range(10)) - [0, 1, 2] - - If there are fewer than *n* items in the iterable, all of them are - returned. - - >>> take(10, range(3)) - [0, 1, 2] - - """ - return list(islice(iterable, n)) - - -def tabulate(function, start=0): - """Return an iterator over the results of ``func(start)``, - ``func(start + 1)``, ``func(start + 2)``... - - *func* should be a function that accepts one integer argument. - - If *start* is not specified it defaults to 0. It will be incremented each - time the iterator is advanced. - - >>> square = lambda x: x ** 2 - >>> iterator = tabulate(square, -3) - >>> take(4, iterator) - [9, 4, 1, 0] - - """ - return map(function, count(start)) - - -def tail(n, iterable): - """Return an iterator over the last *n* items of *iterable*. - - >>> t = tail(3, 'ABCDEFG') - >>> list(t) - ['E', 'F', 'G'] - - """ - try: - size = len(iterable) - except TypeError: - return iter(deque(iterable, maxlen=n)) - else: - return islice(iterable, max(0, size - n), None) - - -def consume(iterator, n=None): - """Advance *iterable* by *n* steps. If *n* is ``None``, consume it - entirely. - - Efficiently exhausts an iterator without returning values. Defaults to - consuming the whole iterator, but an optional second argument may be - provided to limit consumption. - - >>> i = (x for x in range(10)) - >>> next(i) - 0 - >>> consume(i, 3) - >>> next(i) - 4 - >>> consume(i) - >>> next(i) - Traceback (most recent call last): - File "", line 1, in - StopIteration - - If the iterator has fewer items remaining than the provided limit, the - whole iterator will be consumed. - - >>> i = (x for x in range(3)) - >>> consume(i, 5) - >>> next(i) - Traceback (most recent call last): - File "", line 1, in - StopIteration - - """ - # Use functions that consume iterators at C speed. - if n is None: - # feed the entire iterator into a zero-length deque - deque(iterator, maxlen=0) - else: - # advance to the empty slice starting at position n - next(islice(iterator, n, n), None) - - -def nth(iterable, n, default=None): - """Returns the nth item or a default value. - - >>> l = range(10) - >>> nth(l, 3) - 3 - >>> nth(l, 20, "zebra") - 'zebra' - - """ - return next(islice(iterable, n, None), default) - - -def all_equal(iterable, key=None): - """ - Returns ``True`` if all the elements are equal to each other. - - >>> all_equal('aaaa') - True - >>> all_equal('aaab') - False - - A function that accepts a single argument and returns a transformed version - of each input item can be specified with *key*: - - >>> all_equal('AaaA', key=str.casefold) - True - >>> all_equal([1, 2, 3], key=lambda x: x < 10) - True - - """ - iterator = groupby(iterable, key) - for first in iterator: - for second in iterator: - return False - return True - return True - - -def quantify(iterable, pred=bool): - """Return the how many times the predicate is true. - - >>> quantify([True, False, True]) - 2 - - """ - return sum(map(pred, iterable)) - - -def pad_none(iterable): - """Returns the sequence of elements and then returns ``None`` indefinitely. - - >>> take(5, pad_none(range(3))) - [0, 1, 2, None, None] - - Useful for emulating the behavior of the built-in :func:`map` function. - - See also :func:`padded`. - - """ - return chain(iterable, repeat(None)) - - -padnone = pad_none - - -def ncycles(iterable, n): - """Returns the sequence elements *n* times - - >>> list(ncycles(["a", "b"], 3)) - ['a', 'b', 'a', 'b', 'a', 'b'] - - """ - return chain.from_iterable(repeat(tuple(iterable), n)) - - -def dotproduct(vec1, vec2): - """Returns the dot product of the two iterables. - - >>> dotproduct([10, 15, 12], [0.65, 0.80, 1.25]) - 33.5 - >>> 10 * 0.65 + 15 * 0.80 + 12 * 1.25 - 33.5 - - In Python 3.12 and later, use ``math.sumprod()`` instead. - """ - return sum(map(mul, vec1, vec2)) - - -def flatten(listOfLists): - """Return an iterator flattening one level of nesting in a list of lists. - - >>> list(flatten([[0, 1], [2, 3]])) - [0, 1, 2, 3] - - See also :func:`collapse`, which can flatten multiple levels of nesting. - - """ - return chain.from_iterable(listOfLists) - - -def repeatfunc(func, times=None, *args): - """Call *func* with *args* repeatedly, returning an iterable over the - results. - - If *times* is specified, the iterable will terminate after that many - repetitions: - - >>> from operator import add - >>> times = 4 - >>> args = 3, 5 - >>> list(repeatfunc(add, times, *args)) - [8, 8, 8, 8] - - If *times* is ``None`` the iterable will not terminate: - - >>> from random import randrange - >>> times = None - >>> args = 1, 11 - >>> take(6, repeatfunc(randrange, times, *args)) # doctest:+SKIP - [2, 4, 8, 1, 8, 4] - - """ - if times is None: - return starmap(func, repeat(args)) - return starmap(func, repeat(args, times)) - - -def _pairwise(iterable): - """Returns an iterator of paired items, overlapping, from the original - - >>> take(4, pairwise(count())) - [(0, 1), (1, 2), (2, 3), (3, 4)] - - On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`. - - """ - a, b = tee(iterable) - next(b, None) - return zip(a, b) - - -try: - from itertools import pairwise as itertools_pairwise -except ImportError: # pragma: no cover - pairwise = _pairwise -else: # pragma: no cover - - def pairwise(iterable): - return itertools_pairwise(iterable) - - pairwise.__doc__ = _pairwise.__doc__ - - -class UnequalIterablesError(ValueError): - def __init__(self, details=None): - msg = 'Iterables have different lengths' - if details is not None: - msg += (': index 0 has length {}; index {} has length {}').format( - *details - ) - - super().__init__(msg) - - -def _zip_equal_generator(iterables): - for combo in zip_longest(*iterables, fillvalue=_marker): - for val in combo: - if val is _marker: - raise UnequalIterablesError() - yield combo - - -def _zip_equal(*iterables): - # Check whether the iterables are all the same size. - try: - first_size = len(iterables[0]) - for i, it in enumerate(iterables[1:], 1): - size = len(it) - if size != first_size: - raise UnequalIterablesError(details=(first_size, i, size)) - # All sizes are equal, we can use the built-in zip. - return zip(*iterables) - # If any one of the iterables didn't have a length, start reading - # them until one runs out. - except TypeError: - return _zip_equal_generator(iterables) - - -def grouper(iterable, n, incomplete='fill', fillvalue=None): - """Group elements from *iterable* into fixed-length groups of length *n*. - - >>> list(grouper('ABCDEF', 3)) - [('A', 'B', 'C'), ('D', 'E', 'F')] - - The keyword arguments *incomplete* and *fillvalue* control what happens for - iterables whose length is not a multiple of *n*. - - When *incomplete* is `'fill'`, the last group will contain instances of - *fillvalue*. - - >>> list(grouper('ABCDEFG', 3, incomplete='fill', fillvalue='x')) - [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')] - - When *incomplete* is `'ignore'`, the last group will not be emitted. - - >>> list(grouper('ABCDEFG', 3, incomplete='ignore', fillvalue='x')) - [('A', 'B', 'C'), ('D', 'E', 'F')] - - When *incomplete* is `'strict'`, a subclass of `ValueError` will be raised. - - >>> iterator = grouper('ABCDEFG', 3, incomplete='strict') - >>> list(iterator) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - UnequalIterablesError - - """ - iterators = [iter(iterable)] * n - if incomplete == 'fill': - return zip_longest(*iterators, fillvalue=fillvalue) - if incomplete == 'strict': - return _zip_equal(*iterators) - if incomplete == 'ignore': - return zip(*iterators) - else: - raise ValueError('Expected fill, strict, or ignore') - - -def roundrobin(*iterables): - """Visit input iterables in a cycle until each is exhausted. - - >>> list(roundrobin('ABC', 'D', 'EF')) - ['A', 'D', 'E', 'B', 'F', 'C'] - - This function produces the same output as :func:`interleave_longest`, but - may perform better for some inputs (in particular when the number of - iterables is small). - - """ - # Algorithm credited to George Sakkis - iterators = map(iter, iterables) - for num_active in range(len(iterables), 0, -1): - iterators = cycle(islice(iterators, num_active)) - yield from map(next, iterators) - - -def partition(pred, iterable): - """ - Returns a 2-tuple of iterables derived from the input iterable. - The first yields the items that have ``pred(item) == False``. - The second yields the items that have ``pred(item) == True``. - - >>> is_odd = lambda x: x % 2 != 0 - >>> iterable = range(10) - >>> even_items, odd_items = partition(is_odd, iterable) - >>> list(even_items), list(odd_items) - ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9]) - - If *pred* is None, :func:`bool` is used. - - >>> iterable = [0, 1, False, True, '', ' '] - >>> false_items, true_items = partition(None, iterable) - >>> list(false_items), list(true_items) - ([0, False, ''], [1, True, ' ']) - - """ - if pred is None: - pred = bool - - t1, t2, p = tee(iterable, 3) - p1, p2 = tee(map(pred, p)) - return (compress(t1, map(not_, p1)), compress(t2, p2)) - - -def powerset(iterable): - """Yields all possible subsets of the iterable. - - >>> list(powerset([1, 2, 3])) - [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] - - :func:`powerset` will operate on iterables that aren't :class:`set` - instances, so repeated elements in the input will produce repeated elements - in the output. - - >>> seq = [1, 1, 0] - >>> list(powerset(seq)) - [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)] - - For a variant that efficiently yields actual :class:`set` instances, see - :func:`powerset_of_sets`. - """ - s = list(iterable) - return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1)) - - -def unique_everseen(iterable, key=None): - """ - Yield unique elements, preserving order. - - >>> list(unique_everseen('AAAABBBCCDAABBB')) - ['A', 'B', 'C', 'D'] - >>> list(unique_everseen('ABBCcAD', str.lower)) - ['A', 'B', 'C', 'D'] - - Sequences with a mix of hashable and unhashable items can be used. - The function will be slower (i.e., `O(n^2)`) for unhashable items. - - Remember that ``list`` objects are unhashable - you can use the *key* - parameter to transform the list to a tuple (which is hashable) to - avoid a slowdown. - - >>> iterable = ([1, 2], [2, 3], [1, 2]) - >>> list(unique_everseen(iterable)) # Slow - [[1, 2], [2, 3]] - >>> list(unique_everseen(iterable, key=tuple)) # Faster - [[1, 2], [2, 3]] - - Similarly, you may want to convert unhashable ``set`` objects with - ``key=frozenset``. For ``dict`` objects, - ``key=lambda x: frozenset(x.items())`` can be used. - - """ - seenset = set() - seenset_add = seenset.add - seenlist = [] - seenlist_add = seenlist.append - use_key = key is not None - - for element in iterable: - k = key(element) if use_key else element - try: - if k not in seenset: - seenset_add(k) - yield element - except TypeError: - if k not in seenlist: - seenlist_add(k) - yield element - - -def unique_justseen(iterable, key=None): - """Yields elements in order, ignoring serial duplicates - - >>> list(unique_justseen('AAAABBBCCDAABBB')) - ['A', 'B', 'C', 'D', 'A', 'B'] - >>> list(unique_justseen('ABBCcAD', str.lower)) - ['A', 'B', 'C', 'A', 'D'] - - """ - if key is None: - return map(itemgetter(0), groupby(iterable)) - - return map(next, map(itemgetter(1), groupby(iterable, key))) - - -def unique(iterable, key=None, reverse=False): - """Yields unique elements in sorted order. - - >>> list(unique([[1, 2], [3, 4], [1, 2]])) - [[1, 2], [3, 4]] - - *key* and *reverse* are passed to :func:`sorted`. - - >>> list(unique('ABBcCAD', str.casefold)) - ['A', 'B', 'c', 'D'] - >>> list(unique('ABBcCAD', str.casefold, reverse=True)) - ['D', 'c', 'B', 'A'] - - The elements in *iterable* need not be hashable, but they must be - comparable for sorting to work. - """ - sequenced = sorted(iterable, key=key, reverse=reverse) - return unique_justseen(sequenced, key=key) - - -def iter_except(func, exception, first=None): - """Yields results from a function repeatedly until an exception is raised. - - Converts a call-until-exception interface to an iterator interface. - Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel - to end the loop. - - >>> l = [0, 1, 2] - >>> list(iter_except(l.pop, IndexError)) - [2, 1, 0] - - Multiple exceptions can be specified as a stopping condition: - - >>> l = [1, 2, 3, '...', 4, 5, 6] - >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) - [7, 6, 5] - >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) - [4, 3, 2] - >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) - [] - - """ - with suppress(exception): - if first is not None: - yield first() - while True: - yield func() - - -def first_true(iterable, default=None, pred=None): - """ - Returns the first true value in the iterable. - - If no true value is found, returns *default* - - If *pred* is not None, returns the first item for which - ``pred(item) == True`` . - - >>> first_true(range(10)) - 1 - >>> first_true(range(10), pred=lambda x: x > 5) - 6 - >>> first_true(range(10), default='missing', pred=lambda x: x > 9) - 'missing' - - """ - return next(filter(pred, iterable), default) - - -def random_product(*args, repeat=1): - """Draw an item at random from each of the input iterables. - - >>> random_product('abc', range(4), 'XYZ') # doctest:+SKIP - ('c', 3, 'Z') - - If *repeat* is provided as a keyword argument, that many items will be - drawn from each iterable. - - >>> random_product('abcd', range(4), repeat=2) # doctest:+SKIP - ('a', 2, 'd', 3) - - This equivalent to taking a random selection from - ``itertools.product(*args, repeat=repeat)``. - - """ - pools = [tuple(pool) for pool in args] * repeat - return tuple(choice(pool) for pool in pools) - - -def random_permutation(iterable, r=None): - """Return a random *r* length permutation of the elements in *iterable*. - - If *r* is not specified or is ``None``, then *r* defaults to the length of - *iterable*. - - >>> random_permutation(range(5)) # doctest:+SKIP - (3, 4, 0, 1, 2) - - This equivalent to taking a random selection from - ``itertools.permutations(iterable, r)``. - - """ - pool = tuple(iterable) - r = len(pool) if r is None else r - return tuple(sample(pool, r)) - - -def random_combination(iterable, r): - """Return a random *r* length subsequence of the elements in *iterable*. - - >>> random_combination(range(5), 3) # doctest:+SKIP - (2, 3, 4) - - This equivalent to taking a random selection from - ``itertools.combinations(iterable, r)``. - - """ - pool = tuple(iterable) - n = len(pool) - indices = sorted(sample(range(n), r)) - return tuple(pool[i] for i in indices) - - -def random_combination_with_replacement(iterable, r): - """Return a random *r* length subsequence of elements in *iterable*, - allowing individual elements to be repeated. - - >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP - (0, 0, 1, 2, 2) - - This equivalent to taking a random selection from - ``itertools.combinations_with_replacement(iterable, r)``. - - """ - pool = tuple(iterable) - n = len(pool) - indices = sorted(randrange(n) for i in range(r)) - return tuple(pool[i] for i in indices) - - -def nth_combination(iterable, r, index): - """Equivalent to ``list(combinations(iterable, r))[index]``. - - The subsequences of *iterable* that are of length *r* can be ordered - lexicographically. :func:`nth_combination` computes the subsequence at - sort position *index* directly, without computing the previous - subsequences. - - >>> nth_combination(range(5), 3, 5) - (0, 3, 4) - - ``ValueError`` will be raised If *r* is negative or greater than the length - of *iterable*. - ``IndexError`` will be raised if the given *index* is invalid. - """ - pool = tuple(iterable) - n = len(pool) - if (r < 0) or (r > n): - raise ValueError - - c = 1 - k = min(r, n - r) - for i in range(1, k + 1): - c = c * (n - k + i) // i - - if index < 0: - index += c - - if (index < 0) or (index >= c): - raise IndexError - - result = [] - while r: - c, n, r = c * r // n, n - 1, r - 1 - while index >= c: - index -= c - c, n = c * (n - r) // n, n - 1 - result.append(pool[-1 - n]) - - return tuple(result) - - -def prepend(value, iterator): - """Yield *value*, followed by the elements in *iterator*. - - >>> value = '0' - >>> iterator = ['1', '2', '3'] - >>> list(prepend(value, iterator)) - ['0', '1', '2', '3'] - - To prepend multiple values, see :func:`itertools.chain` - or :func:`value_chain`. - - """ - return chain([value], iterator) - - -def convolve(signal, kernel): - """Discrete linear convolution of two iterables. - Equivalent to polynomial multiplication. - - For example, multiplying ``(x² -x - 20)`` by ``(x - 3)`` - gives ``(x³ -4x² -17x + 60)``. - - >>> list(convolve([1, -1, -20], [1, -3])) - [1, -4, -17, 60] - - Examples of popular kinds of kernels: - - * The kernel ``[0.25, 0.25, 0.25, 0.25]`` computes a moving average. - For image data, this blurs the image and reduces noise. - * The kernel ``[1/2, 0, -1/2]`` estimates the first derivative of - a function evaluated at evenly spaced inputs. - * The kernel ``[1, -2, 1]`` estimates the second derivative of a - function evaluated at evenly spaced inputs. - - Convolutions are mathematically commutative; however, the inputs are - evaluated differently. The signal is consumed lazily and can be - infinite. The kernel is fully consumed before the calculations begin. - - Supports all numeric types: int, float, complex, Decimal, Fraction. - - References: - - * Article: https://betterexplained.com/articles/intuitive-convolution/ - * Video by 3Blue1Brown: https://www.youtube.com/watch?v=KuXjwB4LzSA - - """ - # This implementation comes from an older version of the itertools - # documentation. While the newer implementation is a bit clearer, - # this one was kept because the inlined window logic is faster - # and it avoids an unnecessary deque-to-tuple conversion. - kernel = tuple(kernel)[::-1] - n = len(kernel) - window = deque([0], maxlen=n) * n - for x in chain(signal, repeat(0, n - 1)): - window.append(x) - yield _sumprod(kernel, window) - - -def before_and_after(predicate, it): - """A variant of :func:`takewhile` that allows complete access to the - remainder of the iterator. - - >>> it = iter('ABCdEfGhI') - >>> all_upper, remainder = before_and_after(str.isupper, it) - >>> ''.join(all_upper) - 'ABC' - >>> ''.join(remainder) # takewhile() would lose the 'd' - 'dEfGhI' - - Note that the first iterator must be fully consumed before the second - iterator can generate valid results. - """ - trues, after = tee(it) - trues = compress(takewhile(predicate, trues), zip(after)) - return trues, after - - -def triplewise(iterable): - """Return overlapping triplets from *iterable*. - - >>> list(triplewise('ABCDE')) - [('A', 'B', 'C'), ('B', 'C', 'D'), ('C', 'D', 'E')] - - """ - # This deviates from the itertools documentation recipe - see - # https://github.com/more-itertools/more-itertools/issues/889 - t1, t2, t3 = tee(iterable, 3) - next(t3, None) - next(t3, None) - next(t2, None) - return zip(t1, t2, t3) - - -def _sliding_window_islice(iterable, n): - # Fast path for small, non-zero values of n. - iterators = tee(iterable, n) - for i, iterator in enumerate(iterators): - next(islice(iterator, i, i), None) - return zip(*iterators) - - -def _sliding_window_deque(iterable, n): - # Normal path for other values of n. - iterator = iter(iterable) - window = deque(islice(iterator, n - 1), maxlen=n) - for x in iterator: - window.append(x) - yield tuple(window) - - -def sliding_window(iterable, n): - """Return a sliding window of width *n* over *iterable*. - - >>> list(sliding_window(range(6), 4)) - [(0, 1, 2, 3), (1, 2, 3, 4), (2, 3, 4, 5)] - - If *iterable* has fewer than *n* items, then nothing is yielded: - - >>> list(sliding_window(range(3), 4)) - [] - - For a variant with more features, see :func:`windowed`. - """ - if n > 20: - return _sliding_window_deque(iterable, n) - elif n > 2: - return _sliding_window_islice(iterable, n) - elif n == 2: - return pairwise(iterable) - elif n == 1: - return zip(iterable) - else: - raise ValueError(f'n should be at least one, not {n}') - - -def subslices(iterable): - """Return all contiguous non-empty subslices of *iterable*. - - >>> list(subslices('ABC')) - [['A'], ['A', 'B'], ['A', 'B', 'C'], ['B'], ['B', 'C'], ['C']] - - This is similar to :func:`substrings`, but emits items in a different - order. - """ - seq = list(iterable) - slices = starmap(slice, combinations(range(len(seq) + 1), 2)) - return map(getitem, repeat(seq), slices) - - -def polynomial_from_roots(roots): - """Compute a polynomial's coefficients from its roots. - - >>> roots = [5, -4, 3] # (x - 5) * (x + 4) * (x - 3) - >>> polynomial_from_roots(roots) # x³ - 4 x² - 17 x + 60 - [1, -4, -17, 60] - - Note that polynomial coefficients are specified in descending power order. - - Supports all numeric types: int, float, complex, Decimal, Fraction. - """ - - # This recipe differs from the one in itertools docs in that it - # applies list() after each call to convolve(). This avoids - # hitting stack limits with nested generators. - - poly = [1] - for root in roots: - poly = list(convolve(poly, (1, -root))) - return poly - - -def iter_index(iterable, value, start=0, stop=None): - """Yield the index of each place in *iterable* that *value* occurs, - beginning with index *start* and ending before index *stop*. - - - >>> list(iter_index('AABCADEAF', 'A')) - [0, 1, 4, 7] - >>> list(iter_index('AABCADEAF', 'A', 1)) # start index is inclusive - [1, 4, 7] - >>> list(iter_index('AABCADEAF', 'A', 1, 7)) # stop index is not inclusive - [1, 4] - - The behavior for non-scalar *values* matches the built-in Python types. - - >>> list(iter_index('ABCDABCD', 'AB')) - [0, 4] - >>> list(iter_index([0, 1, 2, 3, 0, 1, 2, 3], [0, 1])) - [] - >>> list(iter_index([[0, 1], [2, 3], [0, 1], [2, 3]], [0, 1])) - [0, 2] - - See :func:`locate` for a more general means of finding the indexes - associated with particular values. - - """ - seq_index = getattr(iterable, 'index', None) - if seq_index is None: - # Slow path for general iterables - iterator = islice(iterable, start, stop) - for i, element in enumerate(iterator, start): - if element is value or element == value: - yield i - else: - # Fast path for sequences - stop = len(iterable) if stop is None else stop - i = start - 1 - with suppress(ValueError): - while True: - yield (i := seq_index(value, i + 1, stop)) - - -def sieve(n): - """Yield the primes less than n. - - >>> list(sieve(30)) - [2, 3, 5, 7, 11, 13, 17, 19, 23, 29] - - """ - # This implementation comes from an older version of the itertools - # documentation. The newer implementation is easier to read but is - # less lazy. - if n > 2: - yield 2 - start = 3 - data = bytearray((0, 1)) * (n // 2) - for p in iter_index(data, 1, start, stop=isqrt(n) + 1): - yield from iter_index(data, 1, start, p * p) - data[p * p : n : p + p] = bytes(len(range(p * p, n, p + p))) - start = p * p - yield from iter_index(data, 1, start) - - -def _batched(iterable, n, *, strict=False): # pragma: no cover - """Batch data into tuples of length *n*. If the number of items in - *iterable* is not divisible by *n*: - * The last batch will be shorter if *strict* is ``False``. - * :exc:`ValueError` will be raised if *strict* is ``True``. - - >>> list(batched('ABCDEFG', 3)) - [('A', 'B', 'C'), ('D', 'E', 'F'), ('G',)] - - On Python 3.13 and above, this is an alias for :func:`itertools.batched`. - """ - if n < 1: - raise ValueError('n must be at least one') - iterator = iter(iterable) - while batch := tuple(islice(iterator, n)): - if strict and len(batch) != n: - raise ValueError('batched(): incomplete batch') - yield batch - - -if hexversion >= 0x30D00A2: # pragma: no cover - from itertools import batched as itertools_batched - - def batched(iterable, n, *, strict=False): - return itertools_batched(iterable, n, strict=strict) - - batched.__doc__ = _batched.__doc__ -else: # pragma: no cover - batched = _batched - - -def transpose(it): - """Swap the rows and columns of the input matrix. - - >>> list(transpose([(1, 2, 3), (11, 22, 33)])) - [(1, 11), (2, 22), (3, 33)] - - The caller should ensure that the dimensions of the input are compatible. - If the input is empty, no output will be produced. - """ - return _zip_strict(*it) - - -def _is_scalar(value, stringlike=(str, bytes)): - "Scalars are bytes, strings, and non-iterables." - try: - iter(value) - except TypeError: - return True - return isinstance(value, stringlike) - - -def _flatten_tensor(tensor): - "Depth-first iterator over scalars in a tensor." - iterator = iter(tensor) - while True: - try: - value = next(iterator) - except StopIteration: - return iterator - iterator = chain((value,), iterator) - if _is_scalar(value): - return iterator - iterator = chain.from_iterable(iterator) - - -def reshape(matrix, shape): - """Change the shape of a *matrix*. - - If *shape* is an integer, the matrix must be two dimensional - and the shape is interpreted as the desired number of columns: - - >>> matrix = [(0, 1), (2, 3), (4, 5)] - >>> cols = 3 - >>> list(reshape(matrix, cols)) - [(0, 1, 2), (3, 4, 5)] - - If *shape* is a tuple (or other iterable), the input matrix can have - any number of dimensions. It will first be flattened and then rebuilt - to the desired shape which can also be multidimensional: - - >>> matrix = [(0, 1), (2, 3), (4, 5)] # Start with a 3 x 2 matrix - - >>> list(reshape(matrix, (2, 3))) # Make a 2 x 3 matrix - [(0, 1, 2), (3, 4, 5)] - - >>> list(reshape(matrix, (6,))) # Make a vector of length six - [0, 1, 2, 3, 4, 5] - - >>> list(reshape(matrix, (2, 1, 3, 1))) # Make 2 x 1 x 3 x 1 tensor - [(((0,), (1,), (2,)),), (((3,), (4,), (5,)),)] - - Each dimension is assumed to be uniform, either all arrays or all scalars. - Flattening stops when the first value in a dimension is a scalar. - Scalars are bytes, strings, and non-iterables. - The reshape iterator stops when the requested shape is complete - or when the input is exhausted, whichever comes first. - - """ - if isinstance(shape, int): - return batched(chain.from_iterable(matrix), shape) - first_dim, *dims = shape - scalar_stream = _flatten_tensor(matrix) - reshaped = reduce(batched, reversed(dims), scalar_stream) - return islice(reshaped, first_dim) - - -def matmul(m1, m2): - """Multiply two matrices. - - >>> list(matmul([(7, 5), (3, 5)], [(2, 5), (7, 9)])) - [(49, 80), (41, 60)] - - The caller should ensure that the dimensions of the input matrices are - compatible with each other. - - Supports all numeric types: int, float, complex, Decimal, Fraction. - """ - n = len(m2[0]) - return batched(starmap(_sumprod, product(m1, transpose(m2))), n) - - -def _factor_pollard(n): - # Return a factor of n using Pollard's rho algorithm. - # Efficient when n is odd and composite. - for b in range(1, n): - x = y = 2 - d = 1 - while d == 1: - x = (x * x + b) % n - y = (y * y + b) % n - y = (y * y + b) % n - d = gcd(x - y, n) - if d != n: - return d - raise ValueError('prime or under 5') # pragma: no cover - - -_primes_below_211 = tuple(sieve(211)) - - -def factor(n): - """Yield the prime factors of n. - - >>> list(factor(360)) - [2, 2, 2, 3, 3, 5] - - Finds small factors with trial division. Larger factors are - either verified as prime with ``is_prime`` or split into - smaller factors with Pollard's rho algorithm. - """ - - # Corner case reduction - if n < 2: - return - - # Trial division reduction - for prime in _primes_below_211: - while not n % prime: - yield prime - n //= prime - - # Pollard's rho reduction - primes = [] - todo = [n] if n > 1 else [] - for n in todo: - if n < 211**2 or is_prime(n): - primes.append(n) - else: - fact = _factor_pollard(n) - todo += (fact, n // fact) - yield from sorted(primes) - - -def polynomial_eval(coefficients, x): - """Evaluate a polynomial at a specific value. - - Computes with better numeric stability than Horner's method. - - Evaluate ``x^3 - 4 * x^2 - 17 * x + 60`` at ``x = 2.5``: - - >>> coefficients = [1, -4, -17, 60] - >>> x = 2.5 - >>> polynomial_eval(coefficients, x) - 8.125 - - Note that polynomial coefficients are specified in descending power order. - - Supports all numeric types: int, float, complex, Decimal, Fraction. - """ - n = len(coefficients) - if n == 0: - return type(x)(0) - powers = map(pow, repeat(x), reversed(range(n))) - return _sumprod(coefficients, powers) - - -def sum_of_squares(it): - """Return the sum of the squares of the input values. - - >>> sum_of_squares([10, 20, 30]) - 1400 - - Supports all numeric types: int, float, complex, Decimal, Fraction. - """ - return _sumprod(*tee(it)) - - -def polynomial_derivative(coefficients): - """Compute the first derivative of a polynomial. - - Evaluate the derivative of ``x³ - 4 x² - 17 x + 60``: - - >>> coefficients = [1, -4, -17, 60] - >>> derivative_coefficients = polynomial_derivative(coefficients) - >>> derivative_coefficients - [3, -8, -17] - - Note that polynomial coefficients are specified in descending power order. - - Supports all numeric types: int, float, complex, Decimal, Fraction. - """ - n = len(coefficients) - powers = reversed(range(1, n)) - return list(map(mul, coefficients, powers)) - - -def totient(n): - """Return the count of natural numbers up to *n* that are coprime with *n*. - - Euler's totient function φ(n) gives the number of totatives. - Totative are integers k in the range 1 ≤ k ≤ n such that gcd(n, k) = 1. - - >>> n = 9 - >>> totient(n) - 6 - - >>> totatives = [x for x in range(1, n) if gcd(n, x) == 1] - >>> totatives - [1, 2, 4, 5, 7, 8] - >>> len(totatives) - 6 - - Reference: https://en.wikipedia.org/wiki/Euler%27s_totient_function - - """ - for prime in set(factor(n)): - n -= n // prime - return n - - -# Miller–Rabin primality test: https://oeis.org/A014233 -_perfect_tests = [ - (2047, (2,)), - (9080191, (31, 73)), - (4759123141, (2, 7, 61)), - (1122004669633, (2, 13, 23, 1662803)), - (2152302898747, (2, 3, 5, 7, 11)), - (3474749660383, (2, 3, 5, 7, 11, 13)), - (18446744073709551616, (2, 325, 9375, 28178, 450775, 9780504, 1795265022)), - ( - 3317044064679887385961981, - (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41), - ), -] - - -@lru_cache -def _shift_to_odd(n): - 'Return s, d such that 2**s * d == n' - s = ((n - 1) ^ n).bit_length() - 1 - d = n >> s - assert (1 << s) * d == n and d & 1 and s >= 0 - return s, d - - -def _strong_probable_prime(n, base): - assert (n > 2) and (n & 1) and (2 <= base < n) - - s, d = _shift_to_odd(n - 1) - - x = pow(base, d, n) - if x == 1 or x == n - 1: - return True - - for _ in range(s - 1): - x = x * x % n - if x == n - 1: - return True - - return False - - -# Separate instance of Random() that doesn't share state -# with the default user instance of Random(). -_private_randrange = random.Random().randrange - - -def is_prime(n): - """Return ``True`` if *n* is prime and ``False`` otherwise. - - Basic examples: - - >>> is_prime(37) - True - >>> is_prime(3 * 13) - False - >>> is_prime(18_446_744_073_709_551_557) - True - - Find the next prime over one billion: - - >>> next(filter(is_prime, count(10**9))) - 1000000007 - - Generate random primes up to 200 bits and up to 60 decimal digits: - - >>> from random import seed, randrange, getrandbits - >>> seed(18675309) - - >>> next(filter(is_prime, map(getrandbits, repeat(200)))) - 893303929355758292373272075469392561129886005037663238028407 - - >>> next(filter(is_prime, map(randrange, repeat(10**60)))) - 269638077304026462407872868003560484232362454342414618963649 - - This function is exact for values of *n* below 10**24. For larger inputs, - the probabilistic Miller-Rabin primality test has a less than 1 in 2**128 - chance of a false positive. - """ - - if n < 17: - return n in {2, 3, 5, 7, 11, 13} - - if not (n & 1 and n % 3 and n % 5 and n % 7 and n % 11 and n % 13): - return False - - for limit, bases in _perfect_tests: - if n < limit: - break - else: - bases = (_private_randrange(2, n - 1) for i in range(64)) - - return all(_strong_probable_prime(n, base) for base in bases) - - -def loops(n): - """Returns an iterable with *n* elements for efficient looping. - Like ``range(n)`` but doesn't create integers. - - >>> i = 0 - >>> for _ in loops(5): - ... i += 1 - >>> i - 5 - - """ - return repeat(None, n) - - -def multinomial(*counts): - """Number of distinct arrangements of a multiset. - - The expression ``multinomial(3, 4, 2)`` has several equivalent - interpretations: - - * In the expansion of ``(a + b + c)⁹``, the coefficient of the - ``a³b⁴c²`` term is 1260. - - * There are 1260 distinct ways to arrange 9 balls consisting of 3 reds, 4 - greens, and 2 blues. - - * There are 1260 unique ways to place 9 distinct objects into three bins - with sizes 3, 4, and 2. - - The :func:`multinomial` function computes the length of - :func:`distinct_permutations`. For example, there are 83,160 distinct - anagrams of the word "abracadabra": - - >>> from more_itertools import distinct_permutations, ilen - >>> ilen(distinct_permutations('abracadabra')) - 83160 - - This can be computed directly from the letter counts, 5a 2b 2r 1c 1d: - - >>> from collections import Counter - >>> list(Counter('abracadabra').values()) - [5, 2, 2, 1, 1] - >>> multinomial(5, 2, 2, 1, 1) - 83160 - - A binomial coefficient is a special case of multinomial where there are - only two categories. For example, the number of ways to arrange 12 balls - with 5 reds and 7 blues is ``multinomial(5, 7)`` or ``math.comb(12, 5)``. - - Likewise, factorial is a special case of multinomial where - the multiplicities are all just 1 so that - ``multinomial(1, 1, 1, 1, 1, 1, 1) == math.factorial(7)``. - - Reference: https://en.wikipedia.org/wiki/Multinomial_theorem - - """ - return prod(map(comb, accumulate(counts), counts)) - - -def _running_median_minheap_and_maxheap(iterator): # pragma: no cover - "Non-windowed running_median() for Python 3.14+" - - read = iterator.__next__ - lo = [] # max-heap - hi = [] # min-heap (same size as or one smaller than lo) - - with suppress(StopIteration): - while True: - heappush_max(lo, heappushpop(hi, read())) - yield lo[0] - - heappush(hi, heappushpop_max(lo, read())) - yield (lo[0] + hi[0]) / 2 - - -def _running_median_minheap_only(iterator): # pragma: no cover - "Backport of non-windowed running_median() for Python 3.13 and prior." - - read = iterator.__next__ - lo = [] # max-heap (actually a minheap with negated values) - hi = [] # min-heap (same size as or one smaller than lo) - - with suppress(StopIteration): - while True: - heappush(lo, -heappushpop(hi, read())) - yield -lo[0] - - heappush(hi, -heappushpop(lo, -read())) - yield (hi[0] - lo[0]) / 2 - - -def _running_median_windowed(iterator, maxlen): - "Yield median of values in a sliding window." - - window = deque() - ordered = [] - - for x in iterator: - window.append(x) - insort(ordered, x) - - if len(ordered) > maxlen: - i = bisect_left(ordered, window.popleft()) - del ordered[i] - - n = len(ordered) - m = n // 2 - yield ordered[m] if n & 1 else (ordered[m - 1] + ordered[m]) / 2 - - -def running_median(iterable, *, maxlen=None): - """Cumulative median of values seen so far or values in a sliding window. - - Set *maxlen* to a positive integer to specify the maximum size - of the sliding window. The default of *None* is equivalent to - an unbounded window. - - For example: - - >>> list(running_median([5.0, 9.0, 4.0, 12.0, 8.0, 9.0])) - [5.0, 7.0, 5.0, 7.0, 8.0, 8.5] - >>> list(running_median([5.0, 9.0, 4.0, 12.0, 8.0, 9.0], maxlen=3)) - [5.0, 7.0, 5.0, 9.0, 8.0, 9.0] - - Supports numeric types such as int, float, Decimal, and Fraction, - but not complex numbers which are unorderable. - - On version Python 3.13 and prior, max-heaps are simulated with - negative values. The negation causes Decimal inputs to apply context - rounding, making the results slightly different than that obtained - by statistics.median(). - """ - - iterator = iter(iterable) - - if maxlen is not None: - maxlen = index(maxlen) - if maxlen <= 0: - raise ValueError('Window size should be positive') - return _running_median_windowed(iterator, maxlen) - - if not _max_heap_available: - return _running_median_minheap_only(iterator) # pragma: no cover - - return _running_median_minheap_and_maxheap(iterator) # pragma: no cover diff --git a/voxvera/vendor/setuptools/_vendor/more_itertools/recipes.pyi b/voxvera/vendor/setuptools/_vendor/more_itertools/recipes.pyi deleted file mode 100644 index de3d0a1..0000000 --- a/voxvera/vendor/setuptools/_vendor/more_itertools/recipes.pyi +++ /dev/null @@ -1,205 +0,0 @@ -"""Stubs for more_itertools.recipes""" - -from __future__ import annotations - -from collections.abc import Iterable, Iterator, Sequence -from decimal import Decimal -from fractions import Fraction -from typing import ( - Any, - Callable, - TypeVar, - overload, -) - -__all__ = [ - 'all_equal', - 'batched', - 'before_and_after', - 'consume', - 'convolve', - 'dotproduct', - 'first_true', - 'factor', - 'flatten', - 'grouper', - 'is_prime', - 'iter_except', - 'iter_index', - 'loops', - 'matmul', - 'multinomial', - 'ncycles', - 'nth', - 'nth_combination', - 'padnone', - 'pad_none', - 'pairwise', - 'partition', - 'polynomial_eval', - 'polynomial_from_roots', - 'polynomial_derivative', - 'powerset', - 'prepend', - 'quantify', - 'reshape', - 'random_combination_with_replacement', - 'random_combination', - 'random_permutation', - 'random_product', - 'repeatfunc', - 'roundrobin', - 'running_median', - 'sieve', - 'sliding_window', - 'subslices', - 'sum_of_squares', - 'tabulate', - 'tail', - 'take', - 'totient', - 'transpose', - 'triplewise', - 'unique', - 'unique_everseen', - 'unique_justseen', -] - -# Type and type variable definitions -_T = TypeVar('_T') -_T1 = TypeVar('_T1') -_T2 = TypeVar('_T2') -_U = TypeVar('_U') -_NumberT = TypeVar("_NumberT", float, Decimal, Fraction) - -def take(n: int, iterable: Iterable[_T]) -> list[_T]: ... -def tabulate( - function: Callable[[int], _T], start: int = ... -) -> Iterator[_T]: ... -def tail(n: int, iterable: Iterable[_T]) -> Iterator[_T]: ... -def consume(iterator: Iterable[_T], n: int | None = ...) -> None: ... -@overload -def nth(iterable: Iterable[_T], n: int) -> _T | None: ... -@overload -def nth(iterable: Iterable[_T], n: int, default: _U) -> _T | _U: ... -def all_equal( - iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... -) -> bool: ... -def quantify( - iterable: Iterable[_T], pred: Callable[[_T], bool] = ... -) -> int: ... -def pad_none(iterable: Iterable[_T]) -> Iterator[_T | None]: ... -def padnone(iterable: Iterable[_T]) -> Iterator[_T | None]: ... -def ncycles(iterable: Iterable[_T], n: int) -> Iterator[_T]: ... -def dotproduct(vec1: Iterable[_T1], vec2: Iterable[_T2]) -> Any: ... -def flatten(listOfLists: Iterable[Iterable[_T]]) -> Iterator[_T]: ... -def repeatfunc( - func: Callable[..., _U], times: int | None = ..., *args: Any -) -> Iterator[_U]: ... -def pairwise(iterable: Iterable[_T]) -> Iterator[tuple[_T, _T]]: ... -def grouper( - iterable: Iterable[_T], - n: int, - incomplete: str = ..., - fillvalue: _U = ..., -) -> Iterator[tuple[_T | _U, ...]]: ... -def roundrobin(*iterables: Iterable[_T]) -> Iterator[_T]: ... -def partition( - pred: Callable[[_T], object] | None, iterable: Iterable[_T] -) -> tuple[Iterator[_T], Iterator[_T]]: ... -def powerset(iterable: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ... -def unique_everseen( - iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... -) -> Iterator[_T]: ... -def unique_justseen( - iterable: Iterable[_T], key: Callable[[_T], object] | None = ... -) -> Iterator[_T]: ... -def unique( - iterable: Iterable[_T], - key: Callable[[_T], object] | None = ..., - reverse: bool = False, -) -> Iterator[_T]: ... -@overload -def iter_except( - func: Callable[[], _T], - exception: type[BaseException] | tuple[type[BaseException], ...], - first: None = ..., -) -> Iterator[_T]: ... -@overload -def iter_except( - func: Callable[[], _T], - exception: type[BaseException] | tuple[type[BaseException], ...], - first: Callable[[], _U], -) -> Iterator[_T | _U]: ... -@overload -def first_true( - iterable: Iterable[_T], *, pred: Callable[[_T], object] | None = ... -) -> _T | None: ... -@overload -def first_true( - iterable: Iterable[_T], - default: _U, - pred: Callable[[_T], object] | None = ..., -) -> _T | _U: ... -def random_product( - *args: Iterable[_T], repeat: int = ... -) -> tuple[_T, ...]: ... -def random_permutation( - iterable: Iterable[_T], r: int | None = ... -) -> tuple[_T, ...]: ... -def random_combination(iterable: Iterable[_T], r: int) -> tuple[_T, ...]: ... -def random_combination_with_replacement( - iterable: Iterable[_T], r: int -) -> tuple[_T, ...]: ... -def nth_combination( - iterable: Iterable[_T], r: int, index: int -) -> tuple[_T, ...]: ... -def prepend(value: _T, iterator: Iterable[_U]) -> Iterator[_T | _U]: ... -def convolve(signal: Iterable[_T], kernel: Iterable[_T]) -> Iterator[_T]: ... -def before_and_after( - predicate: Callable[[_T], bool], it: Iterable[_T] -) -> tuple[Iterator[_T], Iterator[_T]]: ... -def triplewise(iterable: Iterable[_T]) -> Iterator[tuple[_T, _T, _T]]: ... -def sliding_window( - iterable: Iterable[_T], n: int -) -> Iterator[tuple[_T, ...]]: ... -def subslices(iterable: Iterable[_T]) -> Iterator[list[_T]]: ... -def polynomial_from_roots(roots: Sequence[_T]) -> list[_T]: ... -def iter_index( - iterable: Iterable[_T], - value: Any, - start: int | None = ..., - stop: int | None = ..., -) -> Iterator[int]: ... -def sieve(n: int) -> Iterator[int]: ... -def _batched( - iterable: Iterable[_T], n: int, *, strict: bool = False -) -> Iterator[tuple[_T, ...]]: ... - -batched = _batched - -def transpose( - it: Iterable[Iterable[_T]], -) -> Iterator[tuple[_T, ...]]: ... -@overload -def reshape( - matrix: Iterable[Iterable[_T]], shape: int -) -> Iterator[tuple[_T, ...]]: ... -@overload -def reshape(matrix: Iterable[Any], shape: Iterable[int]) -> Iterator[Any]: ... -def matmul(m1: Sequence[_T], m2: Sequence[_T]) -> Iterator[tuple[_T]]: ... -def _factor_trial(n: int) -> Iterator[int]: ... -def _factor_pollard(n: int) -> int: ... -def factor(n: int) -> Iterator[int]: ... -def polynomial_eval(coefficients: Sequence[_T], x: _U) -> _U: ... -def sum_of_squares(it: Iterable[_T]) -> _T: ... -def polynomial_derivative(coefficients: Sequence[_T]) -> list[_T]: ... -def totient(n: int) -> int: ... -def _shift_to_odd(n: int) -> tuple[int, int]: ... -def _strong_probable_prime(n: int, base: int) -> bool: ... -def is_prime(n: int) -> bool: ... -def loops(n: int) -> Iterator[None]: ... -def multinomial(*counts: int) -> int: ... -def running_median( - iterable: Iterable[_NumberT], *, maxlen: int | None = ... -) -> Iterator[_NumberT]: ... diff --git a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/INSTALLER deleted file mode 100644 index 5c69047..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -uv \ No newline at end of file diff --git a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/METADATA deleted file mode 100644 index 3200e60..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/METADATA +++ /dev/null @@ -1,107 +0,0 @@ -Metadata-Version: 2.4 -Name: packaging -Version: 26.0 -Summary: Core utilities for Python packages -Author-email: Donald Stufft -Requires-Python: >=3.8 -Description-Content-Type: text/x-rst -License-Expression: Apache-2.0 OR BSD-2-Clause -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: 3.13 -Classifier: Programming Language :: Python :: 3.14 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Typing :: Typed -License-File: LICENSE -License-File: LICENSE.APACHE -License-File: LICENSE.BSD -Project-URL: Documentation, https://packaging.pypa.io/ -Project-URL: Source, https://github.com/pypa/packaging - -packaging -========= - -.. start-intro - -Reusable core utilities for various Python Packaging -`interoperability specifications `_. - -This library provides utilities that implement the interoperability -specifications which have clearly one correct behaviour (eg: :pep:`440`) -or benefit greatly from having a single shared implementation (eg: :pep:`425`). - -.. end-intro - -The ``packaging`` project includes the following: version handling, specifiers, -markers, requirements, tags, metadata, lockfiles, utilities. - -Documentation -------------- - -The `documentation`_ provides information and the API for the following: - -- Version Handling -- Specifiers -- Markers -- Requirements -- Tags -- Metadata -- Lockfiles -- Utilities - -Installation ------------- - -Use ``pip`` to install these utilities:: - - pip install packaging - -The ``packaging`` library uses calendar-based versioning (``YY.N``). - -Discussion ----------- - -If you run into bugs, you can file them in our `issue tracker`_. - -You can also join ``#pypa`` on Freenode to ask questions or get involved. - - -.. _`documentation`: https://packaging.pypa.io/ -.. _`issue tracker`: https://github.com/pypa/packaging/issues - - -Code of Conduct ---------------- - -Everyone interacting in the packaging project's codebases, issue trackers, chat -rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_. - -.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md - -Contributing ------------- - -The ``CONTRIBUTING.rst`` file outlines how to contribute to this project as -well as how to report a potential security issue. The documentation for this -project also covers information about `project development`_ and `security`_. - -.. _`project development`: https://packaging.pypa.io/en/latest/development/ -.. _`security`: https://packaging.pypa.io/en/latest/security/ - -Project History ---------------- - -Please review the ``CHANGELOG.rst`` file or the `Changelog documentation`_ for -recent changes and project history. - -.. _`Changelog documentation`: https://packaging.pypa.io/en/latest/changelog/ - diff --git a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/RECORD deleted file mode 100644 index 38cdeaf..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/RECORD +++ /dev/null @@ -1,26 +0,0 @@ -packaging-26.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2 -packaging-26.0.dist-info/METADATA,sha256=M2K7fWom2iliuo2qpHhc0LrKwhq6kIoRlcyPWVgKJlo,3309 -packaging-26.0.dist-info/RECORD,, -packaging-26.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -packaging-26.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 -packaging-26.0.dist-info/licenses/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197 -packaging-26.0.dist-info/licenses/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174 -packaging-26.0.dist-info/licenses/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344 -packaging/__init__.py,sha256=y4lVbpeBzCGk-IPDw5BGBZ_b0P3ukEEJZAbGYc6Ey8c,494 -packaging/_elffile.py,sha256=-sKkptYqzYw2-x3QByJa5mB4rfPWu1pxkZHRx1WAFCY,3211 -packaging/_manylinux.py,sha256=Hf6nB0cOrayEs96-p3oIXAgGnFquv20DO5l-o2_Xnv0,9559 -packaging/_musllinux.py,sha256=Z6swjH3MA7XS3qXnmMN7QPhqP3fnoYI0eQ18e9-HgAE,2707 -packaging/_parser.py,sha256=U_DajsEx2VoC_F46fSVV3hDKNCWoQYkPkasO3dld0ig,10518 -packaging/_structures.py,sha256=Hn49Ta8zV9Wo8GiCL8Nl2ARZY983Un3pruZGVNldPwE,1514 -packaging/_tokenizer.py,sha256=M8EwNIdXeL9NMFuFrQtiOKwjka_xFx8KjRQnfE8O_z8,5421 -packaging/licenses/__init__.py,sha256=TwXLHZCXwSgdFwRLPxW602T6mSieunSFHM6fp8pgW78,5819 -packaging/licenses/_spdx.py,sha256=WW7DXiyg68up_YND_wpRYlr1SHhiV4FfJLQffghhMxQ,51122 -packaging/markers.py,sha256=ZX-cLvW1S3cZcEc0fHI4z7zSx5U2T19yMpDP_mE-CYw,12771 -packaging/metadata.py,sha256=CWVZpN_HfoYMSSDuCP7igOvGgqA9AOmpW8f3qTisfnc,39360 -packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -packaging/pylock.py,sha256=-R1uNfJ4PaLto7Mg62YsGOHgvskuiIEqPwxOywl42Jk,22537 -packaging/requirements.py,sha256=PMCAWD8aNMnVD-6uZMedhBuAVX2573eZ4yPBLXmz04I,2870 -packaging/specifiers.py,sha256=EPNPimY_zFivthv1vdjZYz5IqkKGsnKR2yKh-EVyvZw,40797 -packaging/tags.py,sha256=cXLV1pJD3UtJlDg7Wz3zrfdQhRZqr8jumSAKKAAd2xE,22856 -packaging/utils.py,sha256=N4c6oZzFJy6klTZ3AnkNz7sSkJesuFWPp68LA3B5dAo,5040 -packaging/version.py,sha256=7XWlL2IDYLwDYC0ht6cFEhapLwLWbmyo4rb7sEFj0x8,23272 diff --git a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/WHEEL deleted file mode 100644 index d8b9936..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: flit 3.12.0 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE deleted file mode 100644 index 6f62d44..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE +++ /dev/null @@ -1,3 +0,0 @@ -This software is made available under the terms of *either* of the licenses -found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made -under the terms of *both* these licenses. diff --git a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE.APACHE b/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE.APACHE deleted file mode 100644 index f433b1a..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE.APACHE +++ /dev/null @@ -1,177 +0,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 diff --git a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE.BSD b/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE.BSD deleted file mode 100644 index 42ce7b7..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging-26.0.dist-info/licenses/LICENSE.BSD +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) Donald Stufft and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/voxvera/vendor/setuptools/_vendor/packaging/__init__.py b/voxvera/vendor/setuptools/_vendor/packaging/__init__.py deleted file mode 100644 index 21695a7..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -__title__ = "packaging" -__summary__ = "Core utilities for Python packages" -__uri__ = "https://github.com/pypa/packaging" - -__version__ = "26.0" - -__author__ = "Donald Stufft and individual contributors" -__email__ = "donald@stufft.io" - -__license__ = "BSD-2-Clause or Apache-2.0" -__copyright__ = f"2014 {__author__}" diff --git a/voxvera/vendor/setuptools/_vendor/packaging/_elffile.py b/voxvera/vendor/setuptools/_vendor/packaging/_elffile.py deleted file mode 100644 index 497b064..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/_elffile.py +++ /dev/null @@ -1,108 +0,0 @@ -""" -ELF file parser. - -This provides a class ``ELFFile`` that parses an ELF executable in a similar -interface to ``ZipFile``. Only the read interface is implemented. - -ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html -""" - -from __future__ import annotations - -import enum -import os -import struct -from typing import IO - - -class ELFInvalid(ValueError): - pass - - -class EIClass(enum.IntEnum): - C32 = 1 - C64 = 2 - - -class EIData(enum.IntEnum): - Lsb = 1 - Msb = 2 - - -class EMachine(enum.IntEnum): - I386 = 3 - S390 = 22 - Arm = 40 - X8664 = 62 - AArc64 = 183 - - -class ELFFile: - """ - Representation of an ELF executable. - """ - - def __init__(self, f: IO[bytes]) -> None: - self._f = f - - try: - ident = self._read("16B") - except struct.error as e: - raise ELFInvalid("unable to parse identification") from e - magic = bytes(ident[:4]) - if magic != b"\x7fELF": - raise ELFInvalid(f"invalid magic: {magic!r}") - - self.capacity = ident[4] # Format for program header (bitness). - self.encoding = ident[5] # Data structure encoding (endianness). - - try: - # e_fmt: Format for program header. - # p_fmt: Format for section header. - # p_idx: Indexes to find p_type, p_offset, and p_filesz. - e_fmt, self._p_fmt, self._p_idx = { - (1, 1): ("HHIIIIIHHH", ">IIIIIIII", (0, 1, 4)), # 32-bit MSB. - (2, 1): ("HHIQQQIHHH", ">IIQQQQQQ", (0, 2, 5)), # 64-bit MSB. - }[(self.capacity, self.encoding)] - except KeyError as e: - raise ELFInvalid( - f"unrecognized capacity ({self.capacity}) or encoding ({self.encoding})" - ) from e - - try: - ( - _, - self.machine, # Architecture type. - _, - _, - self._e_phoff, # Offset of program header. - _, - self.flags, # Processor-specific flags. - _, - self._e_phentsize, # Size of section. - self._e_phnum, # Number of sections. - ) = self._read(e_fmt) - except struct.error as e: - raise ELFInvalid("unable to parse machine and section information") from e - - def _read(self, fmt: str) -> tuple[int, ...]: - return struct.unpack(fmt, self._f.read(struct.calcsize(fmt))) - - @property - def interpreter(self) -> str | None: - """ - The path recorded in the ``PT_INTERP`` section header. - """ - for index in range(self._e_phnum): - self._f.seek(self._e_phoff + self._e_phentsize * index) - try: - data = self._read(self._p_fmt) - except struct.error: - continue - if data[self._p_idx[0]] != 3: # Not PT_INTERP. - continue - self._f.seek(data[self._p_idx[1]]) - return os.fsdecode(self._f.read(data[self._p_idx[2]])).strip("\0") - return None diff --git a/voxvera/vendor/setuptools/_vendor/packaging/_manylinux.py b/voxvera/vendor/setuptools/_vendor/packaging/_manylinux.py deleted file mode 100644 index 0e79e8a..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/_manylinux.py +++ /dev/null @@ -1,262 +0,0 @@ -from __future__ import annotations - -import collections -import contextlib -import functools -import os -import re -import sys -import warnings -from typing import Generator, Iterator, NamedTuple, Sequence - -from ._elffile import EIClass, EIData, ELFFile, EMachine - -EF_ARM_ABIMASK = 0xFF000000 -EF_ARM_ABI_VER5 = 0x05000000 -EF_ARM_ABI_FLOAT_HARD = 0x00000400 - -_ALLOWED_ARCHS = { - "x86_64", - "aarch64", - "ppc64", - "ppc64le", - "s390x", - "loongarch64", - "riscv64", -} - - -# `os.PathLike` not a generic type until Python 3.9, so sticking with `str` -# as the type for `path` until then. -@contextlib.contextmanager -def _parse_elf(path: str) -> Generator[ELFFile | None, None, None]: - try: - with open(path, "rb") as f: - yield ELFFile(f) - except (OSError, TypeError, ValueError): - yield None - - -def _is_linux_armhf(executable: str) -> bool: - # hard-float ABI can be detected from the ELF header of the running - # process - # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf - with _parse_elf(executable) as f: - return ( - f is not None - and f.capacity == EIClass.C32 - and f.encoding == EIData.Lsb - and f.machine == EMachine.Arm - and f.flags & EF_ARM_ABIMASK == EF_ARM_ABI_VER5 - and f.flags & EF_ARM_ABI_FLOAT_HARD == EF_ARM_ABI_FLOAT_HARD - ) - - -def _is_linux_i686(executable: str) -> bool: - with _parse_elf(executable) as f: - return ( - f is not None - and f.capacity == EIClass.C32 - and f.encoding == EIData.Lsb - and f.machine == EMachine.I386 - ) - - -def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool: - if "armv7l" in archs: - return _is_linux_armhf(executable) - if "i686" in archs: - return _is_linux_i686(executable) - return any(arch in _ALLOWED_ARCHS for arch in archs) - - -# If glibc ever changes its major version, we need to know what the last -# minor version was, so we can build the complete list of all versions. -# For now, guess what the highest minor version might be, assume it will -# be 50 for testing. Once this actually happens, update the dictionary -# with the actual value. -_LAST_GLIBC_MINOR: dict[int, int] = collections.defaultdict(lambda: 50) - - -class _GLibCVersion(NamedTuple): - major: int - minor: int - - -def _glibc_version_string_confstr() -> str | None: - """ - Primary implementation of glibc_version_string using os.confstr. - """ - # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely - # to be broken or missing. This strategy is used in the standard library - # platform module. - # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183 - try: - # Should be a string like "glibc 2.17". - version_string: str | None = os.confstr("CS_GNU_LIBC_VERSION") - assert version_string is not None - _, version = version_string.rsplit() - except (AssertionError, AttributeError, OSError, ValueError): - # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)... - return None - return version - - -def _glibc_version_string_ctypes() -> str | None: - """ - Fallback implementation of glibc_version_string using ctypes. - """ - try: - import ctypes # noqa: PLC0415 - except ImportError: - return None - - # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen - # manpage says, "If filename is NULL, then the returned handle is for the - # main program". This way we can let the linker do the work to figure out - # which libc our process is actually using. - # - # We must also handle the special case where the executable is not a - # dynamically linked executable. This can occur when using musl libc, - # for example. In this situation, dlopen() will error, leading to an - # OSError. Interestingly, at least in the case of musl, there is no - # errno set on the OSError. The single string argument used to construct - # OSError comes from libc itself and is therefore not portable to - # hard code here. In any case, failure to call dlopen() means we - # can proceed, so we bail on our attempt. - try: - process_namespace = ctypes.CDLL(None) - except OSError: - return None - - try: - gnu_get_libc_version = process_namespace.gnu_get_libc_version - except AttributeError: - # Symbol doesn't exist -> therefore, we are not linked to - # glibc. - return None - - # Call gnu_get_libc_version, which returns a string like "2.5" - gnu_get_libc_version.restype = ctypes.c_char_p - version_str: str = gnu_get_libc_version() - # py2 / py3 compatibility: - if not isinstance(version_str, str): - version_str = version_str.decode("ascii") - - return version_str - - -def _glibc_version_string() -> str | None: - """Returns glibc version string, or None if not using glibc.""" - return _glibc_version_string_confstr() or _glibc_version_string_ctypes() - - -def _parse_glibc_version(version_str: str) -> _GLibCVersion: - """Parse glibc version. - - We use a regexp instead of str.split because we want to discard any - random junk that might come after the minor version -- this might happen - in patched/forked versions of glibc (e.g. Linaro's version of glibc - uses version strings like "2.20-2014.11"). See gh-3588. - """ - m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) - if not m: - warnings.warn( - f"Expected glibc version with 2 components major.minor, got: {version_str}", - RuntimeWarning, - stacklevel=2, - ) - return _GLibCVersion(-1, -1) - return _GLibCVersion(int(m.group("major")), int(m.group("minor"))) - - -@functools.lru_cache -def _get_glibc_version() -> _GLibCVersion: - version_str = _glibc_version_string() - if version_str is None: - return _GLibCVersion(-1, -1) - return _parse_glibc_version(version_str) - - -# From PEP 513, PEP 600 -def _is_compatible(arch: str, version: _GLibCVersion) -> bool: - sys_glibc = _get_glibc_version() - if sys_glibc < version: - return False - # Check for presence of _manylinux module. - try: - import _manylinux # noqa: PLC0415 - except ImportError: - return True - if hasattr(_manylinux, "manylinux_compatible"): - result = _manylinux.manylinux_compatible(version[0], version[1], arch) - if result is not None: - return bool(result) - return True - if version == _GLibCVersion(2, 5) and hasattr(_manylinux, "manylinux1_compatible"): - return bool(_manylinux.manylinux1_compatible) - if version == _GLibCVersion(2, 12) and hasattr( - _manylinux, "manylinux2010_compatible" - ): - return bool(_manylinux.manylinux2010_compatible) - if version == _GLibCVersion(2, 17) and hasattr( - _manylinux, "manylinux2014_compatible" - ): - return bool(_manylinux.manylinux2014_compatible) - return True - - -_LEGACY_MANYLINUX_MAP: dict[_GLibCVersion, str] = { - # CentOS 7 w/ glibc 2.17 (PEP 599) - _GLibCVersion(2, 17): "manylinux2014", - # CentOS 6 w/ glibc 2.12 (PEP 571) - _GLibCVersion(2, 12): "manylinux2010", - # CentOS 5 w/ glibc 2.5 (PEP 513) - _GLibCVersion(2, 5): "manylinux1", -} - - -def platform_tags(archs: Sequence[str]) -> Iterator[str]: - """Generate manylinux tags compatible to the current platform. - - :param archs: Sequence of compatible architectures. - The first one shall be the closest to the actual architecture and be the part of - platform tag after the ``linux_`` prefix, e.g. ``x86_64``. - The ``linux_`` prefix is assumed as a prerequisite for the current platform to - be manylinux-compatible. - - :returns: An iterator of compatible manylinux tags. - """ - if not _have_compatible_abi(sys.executable, archs): - return - # Oldest glibc to be supported regardless of architecture is (2, 17). - too_old_glibc2 = _GLibCVersion(2, 16) - if set(archs) & {"x86_64", "i686"}: - # On x86/i686 also oldest glibc to be supported is (2, 5). - too_old_glibc2 = _GLibCVersion(2, 4) - current_glibc = _GLibCVersion(*_get_glibc_version()) - glibc_max_list = [current_glibc] - # We can assume compatibility across glibc major versions. - # https://sourceware.org/bugzilla/show_bug.cgi?id=24636 - # - # Build a list of maximum glibc versions so that we can - # output the canonical list of all glibc from current_glibc - # down to too_old_glibc2, including all intermediary versions. - for glibc_major in range(current_glibc.major - 1, 1, -1): - glibc_minor = _LAST_GLIBC_MINOR[glibc_major] - glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor)) - for arch in archs: - for glibc_max in glibc_max_list: - if glibc_max.major == too_old_glibc2.major: - min_minor = too_old_glibc2.minor - else: - # For other glibc major versions oldest supported is (x, 0). - min_minor = -1 - for glibc_minor in range(glibc_max.minor, min_minor, -1): - glibc_version = _GLibCVersion(glibc_max.major, glibc_minor) - if _is_compatible(arch, glibc_version): - yield "manylinux_{}_{}_{}".format(*glibc_version, arch) - - # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags. - if legacy_tag := _LEGACY_MANYLINUX_MAP.get(glibc_version): - yield f"{legacy_tag}_{arch}" diff --git a/voxvera/vendor/setuptools/_vendor/packaging/_musllinux.py b/voxvera/vendor/setuptools/_vendor/packaging/_musllinux.py deleted file mode 100644 index 4e8116a..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/_musllinux.py +++ /dev/null @@ -1,85 +0,0 @@ -"""PEP 656 support. - -This module implements logic to detect if the currently running Python is -linked against musl, and what musl version is used. -""" - -from __future__ import annotations - -import functools -import re -import subprocess -import sys -from typing import Iterator, NamedTuple, Sequence - -from ._elffile import ELFFile - - -class _MuslVersion(NamedTuple): - major: int - minor: int - - -def _parse_musl_version(output: str) -> _MuslVersion | None: - lines = [n for n in (n.strip() for n in output.splitlines()) if n] - if len(lines) < 2 or lines[0][:4] != "musl": - return None - m = re.match(r"Version (\d+)\.(\d+)", lines[1]) - if not m: - return None - return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2))) - - -@functools.lru_cache -def _get_musl_version(executable: str) -> _MuslVersion | None: - """Detect currently-running musl runtime version. - - This is done by checking the specified executable's dynamic linking - information, and invoking the loader to parse its output for a version - string. If the loader is musl, the output would be something like:: - - musl libc (x86_64) - Version 1.2.2 - Dynamic Program Loader - """ - try: - with open(executable, "rb") as f: - ld = ELFFile(f).interpreter - except (OSError, TypeError, ValueError): - return None - if ld is None or "musl" not in ld: - return None - proc = subprocess.run([ld], check=False, stderr=subprocess.PIPE, text=True) - return _parse_musl_version(proc.stderr) - - -def platform_tags(archs: Sequence[str]) -> Iterator[str]: - """Generate musllinux tags compatible to the current platform. - - :param archs: Sequence of compatible architectures. - The first one shall be the closest to the actual architecture and be the part of - platform tag after the ``linux_`` prefix, e.g. ``x86_64``. - The ``linux_`` prefix is assumed as a prerequisite for the current platform to - be musllinux-compatible. - - :returns: An iterator of compatible musllinux tags. - """ - sys_musl = _get_musl_version(sys.executable) - if sys_musl is None: # Python not dynamically linked against musl. - return - for arch in archs: - for minor in range(sys_musl.minor, -1, -1): - yield f"musllinux_{sys_musl.major}_{minor}_{arch}" - - -if __name__ == "__main__": # pragma: no cover - import sysconfig - - plat = sysconfig.get_platform() - assert plat.startswith("linux-"), "not linux" - - print("plat:", plat) - print("musl:", _get_musl_version(sys.executable)) - print("tags:", end=" ") - for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])): - print(t, end="\n ") diff --git a/voxvera/vendor/setuptools/_vendor/packaging/_parser.py b/voxvera/vendor/setuptools/_vendor/packaging/_parser.py deleted file mode 100644 index f6c1f5c..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/_parser.py +++ /dev/null @@ -1,365 +0,0 @@ -"""Handwritten parser of dependency specifiers. - -The docstring for each __parse_* function contains EBNF-inspired grammar representing -the implementation. -""" - -from __future__ import annotations - -import ast -from typing import List, Literal, NamedTuple, Sequence, Tuple, Union - -from ._tokenizer import DEFAULT_RULES, Tokenizer - - -class Node: - __slots__ = ("value",) - - def __init__(self, value: str) -> None: - self.value = value - - def __str__(self) -> str: - return self.value - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}({self.value!r})>" - - def serialize(self) -> str: - raise NotImplementedError - - -class Variable(Node): - __slots__ = () - - def serialize(self) -> str: - return str(self) - - -class Value(Node): - __slots__ = () - - def serialize(self) -> str: - return f'"{self}"' - - -class Op(Node): - __slots__ = () - - def serialize(self) -> str: - return str(self) - - -MarkerLogical = Literal["and", "or"] -MarkerVar = Union[Variable, Value] -MarkerItem = Tuple[MarkerVar, Op, MarkerVar] -MarkerAtom = Union[MarkerItem, Sequence["MarkerAtom"]] -MarkerList = List[Union["MarkerList", MarkerAtom, MarkerLogical]] - - -class ParsedRequirement(NamedTuple): - name: str - url: str - extras: list[str] - specifier: str - marker: MarkerList | None - - -# -------------------------------------------------------------------------------------- -# Recursive descent parser for dependency specifier -# -------------------------------------------------------------------------------------- -def parse_requirement(source: str) -> ParsedRequirement: - return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) - - -def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement: - """ - requirement = WS? IDENTIFIER WS? extras WS? requirement_details - """ - tokenizer.consume("WS") - - name_token = tokenizer.expect( - "IDENTIFIER", expected="package name at the start of dependency specifier" - ) - name = name_token.text - tokenizer.consume("WS") - - extras = _parse_extras(tokenizer) - tokenizer.consume("WS") - - url, specifier, marker = _parse_requirement_details(tokenizer) - tokenizer.expect("END", expected="end of dependency specifier") - - return ParsedRequirement(name, url, extras, specifier, marker) - - -def _parse_requirement_details( - tokenizer: Tokenizer, -) -> tuple[str, str, MarkerList | None]: - """ - requirement_details = AT URL (WS requirement_marker?)? - | specifier WS? (requirement_marker)? - """ - - specifier = "" - url = "" - marker = None - - if tokenizer.check("AT"): - tokenizer.read() - tokenizer.consume("WS") - - url_start = tokenizer.position - url = tokenizer.expect("URL", expected="URL after @").text - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - tokenizer.expect("WS", expected="whitespace after URL") - - # The input might end after whitespace. - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - marker = _parse_requirement_marker( - tokenizer, - span_start=url_start, - expected="semicolon (after URL and whitespace)", - ) - else: - specifier_start = tokenizer.position - specifier = _parse_specifier(tokenizer) - tokenizer.consume("WS") - - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - marker = _parse_requirement_marker( - tokenizer, - span_start=specifier_start, - expected=( - "comma (within version specifier), semicolon (after version specifier)" - if specifier - else "semicolon (after name with no version specifier)" - ), - ) - - return (url, specifier, marker) - - -def _parse_requirement_marker( - tokenizer: Tokenizer, *, span_start: int, expected: str -) -> MarkerList: - """ - requirement_marker = SEMICOLON marker WS? - """ - - if not tokenizer.check("SEMICOLON"): - tokenizer.raise_syntax_error( - f"Expected {expected} or end", - span_start=span_start, - span_end=None, - ) - tokenizer.read() - - marker = _parse_marker(tokenizer) - tokenizer.consume("WS") - - return marker - - -def _parse_extras(tokenizer: Tokenizer) -> list[str]: - """ - extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)? - """ - if not tokenizer.check("LEFT_BRACKET", peek=True): - return [] - - with tokenizer.enclosing_tokens( - "LEFT_BRACKET", - "RIGHT_BRACKET", - around="extras", - ): - tokenizer.consume("WS") - extras = _parse_extras_list(tokenizer) - tokenizer.consume("WS") - - return extras - - -def _parse_extras_list(tokenizer: Tokenizer) -> list[str]: - """ - extras_list = identifier (wsp* ',' wsp* identifier)* - """ - extras: list[str] = [] - - if not tokenizer.check("IDENTIFIER"): - return extras - - extras.append(tokenizer.read().text) - - while True: - tokenizer.consume("WS") - if tokenizer.check("IDENTIFIER", peek=True): - tokenizer.raise_syntax_error("Expected comma between extra names") - elif not tokenizer.check("COMMA"): - break - - tokenizer.read() - tokenizer.consume("WS") - - extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma") - extras.append(extra_token.text) - - return extras - - -def _parse_specifier(tokenizer: Tokenizer) -> str: - """ - specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS - | WS? version_many WS? - """ - with tokenizer.enclosing_tokens( - "LEFT_PARENTHESIS", - "RIGHT_PARENTHESIS", - around="version specifier", - ): - tokenizer.consume("WS") - parsed_specifiers = _parse_version_many(tokenizer) - tokenizer.consume("WS") - - return parsed_specifiers - - -def _parse_version_many(tokenizer: Tokenizer) -> str: - """ - version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)? - """ - parsed_specifiers = "" - while tokenizer.check("SPECIFIER"): - span_start = tokenizer.position - parsed_specifiers += tokenizer.read().text - if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True): - tokenizer.raise_syntax_error( - ".* suffix can only be used with `==` or `!=` operators", - span_start=span_start, - span_end=tokenizer.position + 1, - ) - if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True): - tokenizer.raise_syntax_error( - "Local version label can only be used with `==` or `!=` operators", - span_start=span_start, - span_end=tokenizer.position, - ) - tokenizer.consume("WS") - if not tokenizer.check("COMMA"): - break - parsed_specifiers += tokenizer.read().text - tokenizer.consume("WS") - - return parsed_specifiers - - -# -------------------------------------------------------------------------------------- -# Recursive descent parser for marker expression -# -------------------------------------------------------------------------------------- -def parse_marker(source: str) -> MarkerList: - return _parse_full_marker(Tokenizer(source, rules=DEFAULT_RULES)) - - -def _parse_full_marker(tokenizer: Tokenizer) -> MarkerList: - retval = _parse_marker(tokenizer) - tokenizer.expect("END", expected="end of marker expression") - return retval - - -def _parse_marker(tokenizer: Tokenizer) -> MarkerList: - """ - marker = marker_atom (BOOLOP marker_atom)+ - """ - expression = [_parse_marker_atom(tokenizer)] - while tokenizer.check("BOOLOP"): - token = tokenizer.read() - expr_right = _parse_marker_atom(tokenizer) - expression.extend((token.text, expr_right)) - return expression - - -def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom: - """ - marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS? - | WS? marker_item WS? - """ - - tokenizer.consume("WS") - if tokenizer.check("LEFT_PARENTHESIS", peek=True): - with tokenizer.enclosing_tokens( - "LEFT_PARENTHESIS", - "RIGHT_PARENTHESIS", - around="marker expression", - ): - tokenizer.consume("WS") - marker: MarkerAtom = _parse_marker(tokenizer) - tokenizer.consume("WS") - else: - marker = _parse_marker_item(tokenizer) - tokenizer.consume("WS") - return marker - - -def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem: - """ - marker_item = WS? marker_var WS? marker_op WS? marker_var WS? - """ - tokenizer.consume("WS") - marker_var_left = _parse_marker_var(tokenizer) - tokenizer.consume("WS") - marker_op = _parse_marker_op(tokenizer) - tokenizer.consume("WS") - marker_var_right = _parse_marker_var(tokenizer) - tokenizer.consume("WS") - return (marker_var_left, marker_op, marker_var_right) - - -def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar: # noqa: RET503 - """ - marker_var = VARIABLE | QUOTED_STRING - """ - if tokenizer.check("VARIABLE"): - return process_env_var(tokenizer.read().text.replace(".", "_")) - elif tokenizer.check("QUOTED_STRING"): - return process_python_str(tokenizer.read().text) - else: - tokenizer.raise_syntax_error( - message="Expected a marker variable or quoted string" - ) - - -def process_env_var(env_var: str) -> Variable: - if env_var in ("platform_python_implementation", "python_implementation"): - return Variable("platform_python_implementation") - else: - return Variable(env_var) - - -def process_python_str(python_str: str) -> Value: - value = ast.literal_eval(python_str) - return Value(str(value)) - - -def _parse_marker_op(tokenizer: Tokenizer) -> Op: - """ - marker_op = IN | NOT IN | OP - """ - if tokenizer.check("IN"): - tokenizer.read() - return Op("in") - elif tokenizer.check("NOT"): - tokenizer.read() - tokenizer.expect("WS", expected="whitespace after 'not'") - tokenizer.expect("IN", expected="'in' after 'not'") - return Op("not in") - elif tokenizer.check("OP"): - return Op(tokenizer.read().text) - else: - return tokenizer.raise_syntax_error( - "Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in" - ) diff --git a/voxvera/vendor/setuptools/_vendor/packaging/_structures.py b/voxvera/vendor/setuptools/_vendor/packaging/_structures.py deleted file mode 100644 index 225e2ee..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/_structures.py +++ /dev/null @@ -1,69 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -import typing - - -@typing.final -class InfinityType: - __slots__ = () - - def __repr__(self) -> str: - return "Infinity" - - def __hash__(self) -> int: - return hash(repr(self)) - - def __lt__(self, other: object) -> bool: - return False - - def __le__(self, other: object) -> bool: - return False - - def __eq__(self, other: object) -> bool: - return isinstance(other, self.__class__) - - def __gt__(self, other: object) -> bool: - return True - - def __ge__(self, other: object) -> bool: - return True - - def __neg__(self: object) -> "NegativeInfinityType": - return NegativeInfinity - - -Infinity = InfinityType() - - -@typing.final -class NegativeInfinityType: - __slots__ = () - - def __repr__(self) -> str: - return "-Infinity" - - def __hash__(self) -> int: - return hash(repr(self)) - - def __lt__(self, other: object) -> bool: - return True - - def __le__(self, other: object) -> bool: - return True - - def __eq__(self, other: object) -> bool: - return isinstance(other, self.__class__) - - def __gt__(self, other: object) -> bool: - return False - - def __ge__(self, other: object) -> bool: - return False - - def __neg__(self: object) -> InfinityType: - return Infinity - - -NegativeInfinity = NegativeInfinityType() diff --git a/voxvera/vendor/setuptools/_vendor/packaging/_tokenizer.py b/voxvera/vendor/setuptools/_vendor/packaging/_tokenizer.py deleted file mode 100644 index e6d20dd..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/_tokenizer.py +++ /dev/null @@ -1,193 +0,0 @@ -from __future__ import annotations - -import contextlib -import re -from dataclasses import dataclass -from typing import Generator, Mapping, NoReturn - -from .specifiers import Specifier - - -@dataclass -class Token: - name: str - text: str - position: int - - -class ParserSyntaxError(Exception): - """The provided source text could not be parsed correctly.""" - - def __init__( - self, - message: str, - *, - source: str, - span: tuple[int, int], - ) -> None: - self.span = span - self.message = message - self.source = source - - super().__init__() - - def __str__(self) -> str: - marker = " " * self.span[0] + "~" * (self.span[1] - self.span[0]) + "^" - return f"{self.message}\n {self.source}\n {marker}" - - -DEFAULT_RULES: dict[str, re.Pattern[str]] = { - "LEFT_PARENTHESIS": re.compile(r"\("), - "RIGHT_PARENTHESIS": re.compile(r"\)"), - "LEFT_BRACKET": re.compile(r"\["), - "RIGHT_BRACKET": re.compile(r"\]"), - "SEMICOLON": re.compile(r";"), - "COMMA": re.compile(r","), - "QUOTED_STRING": re.compile( - r""" - ( - ('[^']*') - | - ("[^"]*") - ) - """, - re.VERBOSE, - ), - "OP": re.compile(r"(===|==|~=|!=|<=|>=|<|>)"), - "BOOLOP": re.compile(r"\b(or|and)\b"), - "IN": re.compile(r"\bin\b"), - "NOT": re.compile(r"\bnot\b"), - "VARIABLE": re.compile( - r""" - \b( - python_version - |python_full_version - |os[._]name - |sys[._]platform - |platform_(release|system) - |platform[._](version|machine|python_implementation) - |python_implementation - |implementation_(name|version) - |extras? - |dependency_groups - )\b - """, - re.VERBOSE, - ), - "SPECIFIER": re.compile( - Specifier._operator_regex_str + Specifier._version_regex_str, - re.VERBOSE | re.IGNORECASE, - ), - "AT": re.compile(r"\@"), - "URL": re.compile(r"[^ \t]+"), - "IDENTIFIER": re.compile(r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b"), - "VERSION_PREFIX_TRAIL": re.compile(r"\.\*"), - "VERSION_LOCAL_LABEL_TRAIL": re.compile(r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*"), - "WS": re.compile(r"[ \t]+"), - "END": re.compile(r"$"), -} - - -class Tokenizer: - """Context-sensitive token parsing. - - Provides methods to examine the input stream to check whether the next token - matches. - """ - - def __init__( - self, - source: str, - *, - rules: Mapping[str, re.Pattern[str]], - ) -> None: - self.source = source - self.rules = rules - self.next_token: Token | None = None - self.position = 0 - - def consume(self, name: str) -> None: - """Move beyond provided token name, if at current position.""" - if self.check(name): - self.read() - - def check(self, name: str, *, peek: bool = False) -> bool: - """Check whether the next token has the provided name. - - By default, if the check succeeds, the token *must* be read before - another check. If `peek` is set to `True`, the token is not loaded and - would need to be checked again. - """ - assert self.next_token is None, ( - f"Cannot check for {name!r}, already have {self.next_token!r}" - ) - assert name in self.rules, f"Unknown token name: {name!r}" - - expression = self.rules[name] - - match = expression.match(self.source, self.position) - if match is None: - return False - if not peek: - self.next_token = Token(name, match[0], self.position) - return True - - def expect(self, name: str, *, expected: str) -> Token: - """Expect a certain token name next, failing with a syntax error otherwise. - - The token is *not* read. - """ - if not self.check(name): - raise self.raise_syntax_error(f"Expected {expected}") - return self.read() - - def read(self) -> Token: - """Consume the next token and return it.""" - token = self.next_token - assert token is not None - - self.position += len(token.text) - self.next_token = None - - return token - - def raise_syntax_error( - self, - message: str, - *, - span_start: int | None = None, - span_end: int | None = None, - ) -> NoReturn: - """Raise ParserSyntaxError at the given position.""" - span = ( - self.position if span_start is None else span_start, - self.position if span_end is None else span_end, - ) - raise ParserSyntaxError( - message, - source=self.source, - span=span, - ) - - @contextlib.contextmanager - def enclosing_tokens( - self, open_token: str, close_token: str, *, around: str - ) -> Generator[None, None, None]: - if self.check(open_token): - open_position = self.position - self.read() - else: - open_position = None - - yield - - if open_position is None: - return - - if not self.check(close_token): - self.raise_syntax_error( - f"Expected matching {close_token} for {open_token}, after {around}", - span_start=open_position, - ) - - self.read() diff --git a/voxvera/vendor/setuptools/_vendor/packaging/licenses/__init__.py b/voxvera/vendor/setuptools/_vendor/packaging/licenses/__init__.py deleted file mode 100644 index 335b275..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/licenses/__init__.py +++ /dev/null @@ -1,147 +0,0 @@ -####################################################################################### -# -# Adapted from: -# https://github.com/pypa/hatch/blob/5352e44/backend/src/hatchling/licenses/parse.py -# -# MIT License -# -# Copyright (c) 2017-present Ofek Lev -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of this -# software and associated documentation files (the "Software"), to deal in the Software -# without restriction, including without limitation the rights to use, copy, modify, -# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be included in all copies -# or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# -# With additional allowance of arbitrary `LicenseRef-` identifiers, not just -# `LicenseRef-Public-Domain` and `LicenseRef-Proprietary`. -# -####################################################################################### -from __future__ import annotations - -import re -from typing import NewType, cast - -from ._spdx import EXCEPTIONS, LICENSES - -__all__ = [ - "InvalidLicenseExpression", - "NormalizedLicenseExpression", - "canonicalize_license_expression", -] - -license_ref_allowed = re.compile("^[A-Za-z0-9.-]*$") - -NormalizedLicenseExpression = NewType("NormalizedLicenseExpression", str) - - -class InvalidLicenseExpression(ValueError): - """Raised when a license-expression string is invalid - - >>> canonicalize_license_expression("invalid") - Traceback (most recent call last): - ... - packaging.licenses.InvalidLicenseExpression: Invalid license expression: 'invalid' - """ - - -def canonicalize_license_expression( - raw_license_expression: str, -) -> NormalizedLicenseExpression: - if not raw_license_expression: - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) - - # Pad any parentheses so tokenization can be achieved by merely splitting on - # whitespace. - license_expression = raw_license_expression.replace("(", " ( ").replace(")", " ) ") - licenseref_prefix = "LicenseRef-" - license_refs = { - ref.lower(): "LicenseRef-" + ref[len(licenseref_prefix) :] - for ref in license_expression.split() - if ref.lower().startswith(licenseref_prefix.lower()) - } - - # Normalize to lower case so we can look up licenses/exceptions - # and so boolean operators are Python-compatible. - license_expression = license_expression.lower() - - tokens = license_expression.split() - - # Rather than implementing a parenthesis/boolean logic parser, create an - # expression that Python can parse. Everything that is not involved with the - # grammar itself is replaced with the placeholder `False` and the resultant - # expression should become a valid Python expression. - python_tokens = [] - for token in tokens: - if token not in {"or", "and", "with", "(", ")"}: - python_tokens.append("False") - elif token == "with": - python_tokens.append("or") - elif ( - token == "(" - and python_tokens - and python_tokens[-1] not in {"or", "and", "("} - ) or (token == ")" and python_tokens and python_tokens[-1] == "("): - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) - else: - python_tokens.append(token) - - python_expression = " ".join(python_tokens) - try: - compile(python_expression, "", "eval") - except SyntaxError: - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) from None - - # Take a final pass to check for unknown licenses/exceptions. - normalized_tokens = [] - for token in tokens: - if token in {"or", "and", "with", "(", ")"}: - normalized_tokens.append(token.upper()) - continue - - if normalized_tokens and normalized_tokens[-1] == "WITH": - if token not in EXCEPTIONS: - message = f"Unknown license exception: {token!r}" - raise InvalidLicenseExpression(message) - - normalized_tokens.append(EXCEPTIONS[token]["id"]) - else: - if token.endswith("+"): - final_token = token[:-1] - suffix = "+" - else: - final_token = token - suffix = "" - - if final_token.startswith("licenseref-"): - if not license_ref_allowed.match(final_token): - message = f"Invalid licenseref: {final_token!r}" - raise InvalidLicenseExpression(message) - normalized_tokens.append(license_refs[final_token] + suffix) - else: - if final_token not in LICENSES: - message = f"Unknown license: {final_token!r}" - raise InvalidLicenseExpression(message) - normalized_tokens.append(LICENSES[final_token]["id"] + suffix) - - normalized_expression = " ".join(normalized_tokens) - - return cast( - "NormalizedLicenseExpression", - normalized_expression.replace("( ", "(").replace(" )", ")"), - ) diff --git a/voxvera/vendor/setuptools/_vendor/packaging/licenses/_spdx.py b/voxvera/vendor/setuptools/_vendor/packaging/licenses/_spdx.py deleted file mode 100644 index a277af2..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/licenses/_spdx.py +++ /dev/null @@ -1,799 +0,0 @@ - -from __future__ import annotations - -from typing import TypedDict - -class SPDXLicense(TypedDict): - id: str - deprecated: bool - -class SPDXException(TypedDict): - id: str - deprecated: bool - - -VERSION = '3.27.0' - -LICENSES: dict[str, SPDXLicense] = { - '0bsd': {'id': '0BSD', 'deprecated': False}, - '3d-slicer-1.0': {'id': '3D-Slicer-1.0', 'deprecated': False}, - 'aal': {'id': 'AAL', 'deprecated': False}, - 'abstyles': {'id': 'Abstyles', 'deprecated': False}, - 'adacore-doc': {'id': 'AdaCore-doc', 'deprecated': False}, - 'adobe-2006': {'id': 'Adobe-2006', 'deprecated': False}, - 'adobe-display-postscript': {'id': 'Adobe-Display-PostScript', 'deprecated': False}, - 'adobe-glyph': {'id': 'Adobe-Glyph', 'deprecated': False}, - 'adobe-utopia': {'id': 'Adobe-Utopia', 'deprecated': False}, - 'adsl': {'id': 'ADSL', 'deprecated': False}, - 'afl-1.1': {'id': 'AFL-1.1', 'deprecated': False}, - 'afl-1.2': {'id': 'AFL-1.2', 'deprecated': False}, - 'afl-2.0': {'id': 'AFL-2.0', 'deprecated': False}, - 'afl-2.1': {'id': 'AFL-2.1', 'deprecated': False}, - 'afl-3.0': {'id': 'AFL-3.0', 'deprecated': False}, - 'afmparse': {'id': 'Afmparse', 'deprecated': False}, - 'agpl-1.0': {'id': 'AGPL-1.0', 'deprecated': True}, - 'agpl-1.0-only': {'id': 'AGPL-1.0-only', 'deprecated': False}, - 'agpl-1.0-or-later': {'id': 'AGPL-1.0-or-later', 'deprecated': False}, - 'agpl-3.0': {'id': 'AGPL-3.0', 'deprecated': True}, - 'agpl-3.0-only': {'id': 'AGPL-3.0-only', 'deprecated': False}, - 'agpl-3.0-or-later': {'id': 'AGPL-3.0-or-later', 'deprecated': False}, - 'aladdin': {'id': 'Aladdin', 'deprecated': False}, - 'amd-newlib': {'id': 'AMD-newlib', 'deprecated': False}, - 'amdplpa': {'id': 'AMDPLPA', 'deprecated': False}, - 'aml': {'id': 'AML', 'deprecated': False}, - 'aml-glslang': {'id': 'AML-glslang', 'deprecated': False}, - 'ampas': {'id': 'AMPAS', 'deprecated': False}, - 'antlr-pd': {'id': 'ANTLR-PD', 'deprecated': False}, - 'antlr-pd-fallback': {'id': 'ANTLR-PD-fallback', 'deprecated': False}, - 'any-osi': {'id': 'any-OSI', 'deprecated': False}, - 'any-osi-perl-modules': {'id': 'any-OSI-perl-modules', 'deprecated': False}, - 'apache-1.0': {'id': 'Apache-1.0', 'deprecated': False}, - 'apache-1.1': {'id': 'Apache-1.1', 'deprecated': False}, - 'apache-2.0': {'id': 'Apache-2.0', 'deprecated': False}, - 'apafml': {'id': 'APAFML', 'deprecated': False}, - 'apl-1.0': {'id': 'APL-1.0', 'deprecated': False}, - 'app-s2p': {'id': 'App-s2p', 'deprecated': False}, - 'apsl-1.0': {'id': 'APSL-1.0', 'deprecated': False}, - 'apsl-1.1': {'id': 'APSL-1.1', 'deprecated': False}, - 'apsl-1.2': {'id': 'APSL-1.2', 'deprecated': False}, - 'apsl-2.0': {'id': 'APSL-2.0', 'deprecated': False}, - 'arphic-1999': {'id': 'Arphic-1999', 'deprecated': False}, - 'artistic-1.0': {'id': 'Artistic-1.0', 'deprecated': False}, - 'artistic-1.0-cl8': {'id': 'Artistic-1.0-cl8', 'deprecated': False}, - 'artistic-1.0-perl': {'id': 'Artistic-1.0-Perl', 'deprecated': False}, - 'artistic-2.0': {'id': 'Artistic-2.0', 'deprecated': False}, - 'artistic-dist': {'id': 'Artistic-dist', 'deprecated': False}, - 'aspell-ru': {'id': 'Aspell-RU', 'deprecated': False}, - 'aswf-digital-assets-1.0': {'id': 'ASWF-Digital-Assets-1.0', 'deprecated': False}, - 'aswf-digital-assets-1.1': {'id': 'ASWF-Digital-Assets-1.1', 'deprecated': False}, - 'baekmuk': {'id': 'Baekmuk', 'deprecated': False}, - 'bahyph': {'id': 'Bahyph', 'deprecated': False}, - 'barr': {'id': 'Barr', 'deprecated': False}, - 'bcrypt-solar-designer': {'id': 'bcrypt-Solar-Designer', 'deprecated': False}, - 'beerware': {'id': 'Beerware', 'deprecated': False}, - 'bitstream-charter': {'id': 'Bitstream-Charter', 'deprecated': False}, - 'bitstream-vera': {'id': 'Bitstream-Vera', 'deprecated': False}, - 'bittorrent-1.0': {'id': 'BitTorrent-1.0', 'deprecated': False}, - 'bittorrent-1.1': {'id': 'BitTorrent-1.1', 'deprecated': False}, - 'blessing': {'id': 'blessing', 'deprecated': False}, - 'blueoak-1.0.0': {'id': 'BlueOak-1.0.0', 'deprecated': False}, - 'boehm-gc': {'id': 'Boehm-GC', 'deprecated': False}, - 'boehm-gc-without-fee': {'id': 'Boehm-GC-without-fee', 'deprecated': False}, - 'borceux': {'id': 'Borceux', 'deprecated': False}, - 'brian-gladman-2-clause': {'id': 'Brian-Gladman-2-Clause', 'deprecated': False}, - 'brian-gladman-3-clause': {'id': 'Brian-Gladman-3-Clause', 'deprecated': False}, - 'bsd-1-clause': {'id': 'BSD-1-Clause', 'deprecated': False}, - 'bsd-2-clause': {'id': 'BSD-2-Clause', 'deprecated': False}, - 'bsd-2-clause-darwin': {'id': 'BSD-2-Clause-Darwin', 'deprecated': False}, - 'bsd-2-clause-first-lines': {'id': 'BSD-2-Clause-first-lines', 'deprecated': False}, - 'bsd-2-clause-freebsd': {'id': 'BSD-2-Clause-FreeBSD', 'deprecated': True}, - 'bsd-2-clause-netbsd': {'id': 'BSD-2-Clause-NetBSD', 'deprecated': True}, - 'bsd-2-clause-patent': {'id': 'BSD-2-Clause-Patent', 'deprecated': False}, - 'bsd-2-clause-pkgconf-disclaimer': {'id': 'BSD-2-Clause-pkgconf-disclaimer', 'deprecated': False}, - 'bsd-2-clause-views': {'id': 'BSD-2-Clause-Views', 'deprecated': False}, - 'bsd-3-clause': {'id': 'BSD-3-Clause', 'deprecated': False}, - 'bsd-3-clause-acpica': {'id': 'BSD-3-Clause-acpica', 'deprecated': False}, - 'bsd-3-clause-attribution': {'id': 'BSD-3-Clause-Attribution', 'deprecated': False}, - 'bsd-3-clause-clear': {'id': 'BSD-3-Clause-Clear', 'deprecated': False}, - 'bsd-3-clause-flex': {'id': 'BSD-3-Clause-flex', 'deprecated': False}, - 'bsd-3-clause-hp': {'id': 'BSD-3-Clause-HP', 'deprecated': False}, - 'bsd-3-clause-lbnl': {'id': 'BSD-3-Clause-LBNL', 'deprecated': False}, - 'bsd-3-clause-modification': {'id': 'BSD-3-Clause-Modification', 'deprecated': False}, - 'bsd-3-clause-no-military-license': {'id': 'BSD-3-Clause-No-Military-License', 'deprecated': False}, - 'bsd-3-clause-no-nuclear-license': {'id': 'BSD-3-Clause-No-Nuclear-License', 'deprecated': False}, - 'bsd-3-clause-no-nuclear-license-2014': {'id': 'BSD-3-Clause-No-Nuclear-License-2014', 'deprecated': False}, - 'bsd-3-clause-no-nuclear-warranty': {'id': 'BSD-3-Clause-No-Nuclear-Warranty', 'deprecated': False}, - 'bsd-3-clause-open-mpi': {'id': 'BSD-3-Clause-Open-MPI', 'deprecated': False}, - 'bsd-3-clause-sun': {'id': 'BSD-3-Clause-Sun', 'deprecated': False}, - 'bsd-4-clause': {'id': 'BSD-4-Clause', 'deprecated': False}, - 'bsd-4-clause-shortened': {'id': 'BSD-4-Clause-Shortened', 'deprecated': False}, - 'bsd-4-clause-uc': {'id': 'BSD-4-Clause-UC', 'deprecated': False}, - 'bsd-4.3reno': {'id': 'BSD-4.3RENO', 'deprecated': False}, - 'bsd-4.3tahoe': {'id': 'BSD-4.3TAHOE', 'deprecated': False}, - 'bsd-advertising-acknowledgement': {'id': 'BSD-Advertising-Acknowledgement', 'deprecated': False}, - 'bsd-attribution-hpnd-disclaimer': {'id': 'BSD-Attribution-HPND-disclaimer', 'deprecated': False}, - 'bsd-inferno-nettverk': {'id': 'BSD-Inferno-Nettverk', 'deprecated': False}, - 'bsd-protection': {'id': 'BSD-Protection', 'deprecated': False}, - 'bsd-source-beginning-file': {'id': 'BSD-Source-beginning-file', 'deprecated': False}, - 'bsd-source-code': {'id': 'BSD-Source-Code', 'deprecated': False}, - 'bsd-systemics': {'id': 'BSD-Systemics', 'deprecated': False}, - 'bsd-systemics-w3works': {'id': 'BSD-Systemics-W3Works', 'deprecated': False}, - 'bsl-1.0': {'id': 'BSL-1.0', 'deprecated': False}, - 'busl-1.1': {'id': 'BUSL-1.1', 'deprecated': False}, - 'bzip2-1.0.5': {'id': 'bzip2-1.0.5', 'deprecated': True}, - 'bzip2-1.0.6': {'id': 'bzip2-1.0.6', 'deprecated': False}, - 'c-uda-1.0': {'id': 'C-UDA-1.0', 'deprecated': False}, - 'cal-1.0': {'id': 'CAL-1.0', 'deprecated': False}, - 'cal-1.0-combined-work-exception': {'id': 'CAL-1.0-Combined-Work-Exception', 'deprecated': False}, - 'caldera': {'id': 'Caldera', 'deprecated': False}, - 'caldera-no-preamble': {'id': 'Caldera-no-preamble', 'deprecated': False}, - 'catharon': {'id': 'Catharon', 'deprecated': False}, - 'catosl-1.1': {'id': 'CATOSL-1.1', 'deprecated': False}, - 'cc-by-1.0': {'id': 'CC-BY-1.0', 'deprecated': False}, - 'cc-by-2.0': {'id': 'CC-BY-2.0', 'deprecated': False}, - 'cc-by-2.5': {'id': 'CC-BY-2.5', 'deprecated': False}, - 'cc-by-2.5-au': {'id': 'CC-BY-2.5-AU', 'deprecated': False}, - 'cc-by-3.0': {'id': 'CC-BY-3.0', 'deprecated': False}, - 'cc-by-3.0-at': {'id': 'CC-BY-3.0-AT', 'deprecated': False}, - 'cc-by-3.0-au': {'id': 'CC-BY-3.0-AU', 'deprecated': False}, - 'cc-by-3.0-de': {'id': 'CC-BY-3.0-DE', 'deprecated': False}, - 'cc-by-3.0-igo': {'id': 'CC-BY-3.0-IGO', 'deprecated': False}, - 'cc-by-3.0-nl': {'id': 'CC-BY-3.0-NL', 'deprecated': False}, - 'cc-by-3.0-us': {'id': 'CC-BY-3.0-US', 'deprecated': False}, - 'cc-by-4.0': {'id': 'CC-BY-4.0', 'deprecated': False}, - 'cc-by-nc-1.0': {'id': 'CC-BY-NC-1.0', 'deprecated': False}, - 'cc-by-nc-2.0': {'id': 'CC-BY-NC-2.0', 'deprecated': False}, - 'cc-by-nc-2.5': {'id': 'CC-BY-NC-2.5', 'deprecated': False}, - 'cc-by-nc-3.0': {'id': 'CC-BY-NC-3.0', 'deprecated': False}, - 'cc-by-nc-3.0-de': {'id': 'CC-BY-NC-3.0-DE', 'deprecated': False}, - 'cc-by-nc-4.0': {'id': 'CC-BY-NC-4.0', 'deprecated': False}, - 'cc-by-nc-nd-1.0': {'id': 'CC-BY-NC-ND-1.0', 'deprecated': False}, - 'cc-by-nc-nd-2.0': {'id': 'CC-BY-NC-ND-2.0', 'deprecated': False}, - 'cc-by-nc-nd-2.5': {'id': 'CC-BY-NC-ND-2.5', 'deprecated': False}, - 'cc-by-nc-nd-3.0': {'id': 'CC-BY-NC-ND-3.0', 'deprecated': False}, - 'cc-by-nc-nd-3.0-de': {'id': 'CC-BY-NC-ND-3.0-DE', 'deprecated': False}, - 'cc-by-nc-nd-3.0-igo': {'id': 'CC-BY-NC-ND-3.0-IGO', 'deprecated': False}, - 'cc-by-nc-nd-4.0': {'id': 'CC-BY-NC-ND-4.0', 'deprecated': False}, - 'cc-by-nc-sa-1.0': {'id': 'CC-BY-NC-SA-1.0', 'deprecated': False}, - 'cc-by-nc-sa-2.0': {'id': 'CC-BY-NC-SA-2.0', 'deprecated': False}, - 'cc-by-nc-sa-2.0-de': {'id': 'CC-BY-NC-SA-2.0-DE', 'deprecated': False}, - 'cc-by-nc-sa-2.0-fr': {'id': 'CC-BY-NC-SA-2.0-FR', 'deprecated': False}, - 'cc-by-nc-sa-2.0-uk': {'id': 'CC-BY-NC-SA-2.0-UK', 'deprecated': False}, - 'cc-by-nc-sa-2.5': {'id': 'CC-BY-NC-SA-2.5', 'deprecated': False}, - 'cc-by-nc-sa-3.0': {'id': 'CC-BY-NC-SA-3.0', 'deprecated': False}, - 'cc-by-nc-sa-3.0-de': {'id': 'CC-BY-NC-SA-3.0-DE', 'deprecated': False}, - 'cc-by-nc-sa-3.0-igo': {'id': 'CC-BY-NC-SA-3.0-IGO', 'deprecated': False}, - 'cc-by-nc-sa-4.0': {'id': 'CC-BY-NC-SA-4.0', 'deprecated': False}, - 'cc-by-nd-1.0': {'id': 'CC-BY-ND-1.0', 'deprecated': False}, - 'cc-by-nd-2.0': {'id': 'CC-BY-ND-2.0', 'deprecated': False}, - 'cc-by-nd-2.5': {'id': 'CC-BY-ND-2.5', 'deprecated': False}, - 'cc-by-nd-3.0': {'id': 'CC-BY-ND-3.0', 'deprecated': False}, - 'cc-by-nd-3.0-de': {'id': 'CC-BY-ND-3.0-DE', 'deprecated': False}, - 'cc-by-nd-4.0': {'id': 'CC-BY-ND-4.0', 'deprecated': False}, - 'cc-by-sa-1.0': {'id': 'CC-BY-SA-1.0', 'deprecated': False}, - 'cc-by-sa-2.0': {'id': 'CC-BY-SA-2.0', 'deprecated': False}, - 'cc-by-sa-2.0-uk': {'id': 'CC-BY-SA-2.0-UK', 'deprecated': False}, - 'cc-by-sa-2.1-jp': {'id': 'CC-BY-SA-2.1-JP', 'deprecated': False}, - 'cc-by-sa-2.5': {'id': 'CC-BY-SA-2.5', 'deprecated': False}, - 'cc-by-sa-3.0': {'id': 'CC-BY-SA-3.0', 'deprecated': False}, - 'cc-by-sa-3.0-at': {'id': 'CC-BY-SA-3.0-AT', 'deprecated': False}, - 'cc-by-sa-3.0-de': {'id': 'CC-BY-SA-3.0-DE', 'deprecated': False}, - 'cc-by-sa-3.0-igo': {'id': 'CC-BY-SA-3.0-IGO', 'deprecated': False}, - 'cc-by-sa-4.0': {'id': 'CC-BY-SA-4.0', 'deprecated': False}, - 'cc-pddc': {'id': 'CC-PDDC', 'deprecated': False}, - 'cc-pdm-1.0': {'id': 'CC-PDM-1.0', 'deprecated': False}, - 'cc-sa-1.0': {'id': 'CC-SA-1.0', 'deprecated': False}, - 'cc0-1.0': {'id': 'CC0-1.0', 'deprecated': False}, - 'cddl-1.0': {'id': 'CDDL-1.0', 'deprecated': False}, - 'cddl-1.1': {'id': 'CDDL-1.1', 'deprecated': False}, - 'cdl-1.0': {'id': 'CDL-1.0', 'deprecated': False}, - 'cdla-permissive-1.0': {'id': 'CDLA-Permissive-1.0', 'deprecated': False}, - 'cdla-permissive-2.0': {'id': 'CDLA-Permissive-2.0', 'deprecated': False}, - 'cdla-sharing-1.0': {'id': 'CDLA-Sharing-1.0', 'deprecated': False}, - 'cecill-1.0': {'id': 'CECILL-1.0', 'deprecated': False}, - 'cecill-1.1': {'id': 'CECILL-1.1', 'deprecated': False}, - 'cecill-2.0': {'id': 'CECILL-2.0', 'deprecated': False}, - 'cecill-2.1': {'id': 'CECILL-2.1', 'deprecated': False}, - 'cecill-b': {'id': 'CECILL-B', 'deprecated': False}, - 'cecill-c': {'id': 'CECILL-C', 'deprecated': False}, - 'cern-ohl-1.1': {'id': 'CERN-OHL-1.1', 'deprecated': False}, - 'cern-ohl-1.2': {'id': 'CERN-OHL-1.2', 'deprecated': False}, - 'cern-ohl-p-2.0': {'id': 'CERN-OHL-P-2.0', 'deprecated': False}, - 'cern-ohl-s-2.0': {'id': 'CERN-OHL-S-2.0', 'deprecated': False}, - 'cern-ohl-w-2.0': {'id': 'CERN-OHL-W-2.0', 'deprecated': False}, - 'cfitsio': {'id': 'CFITSIO', 'deprecated': False}, - 'check-cvs': {'id': 'check-cvs', 'deprecated': False}, - 'checkmk': {'id': 'checkmk', 'deprecated': False}, - 'clartistic': {'id': 'ClArtistic', 'deprecated': False}, - 'clips': {'id': 'Clips', 'deprecated': False}, - 'cmu-mach': {'id': 'CMU-Mach', 'deprecated': False}, - 'cmu-mach-nodoc': {'id': 'CMU-Mach-nodoc', 'deprecated': False}, - 'cnri-jython': {'id': 'CNRI-Jython', 'deprecated': False}, - 'cnri-python': {'id': 'CNRI-Python', 'deprecated': False}, - 'cnri-python-gpl-compatible': {'id': 'CNRI-Python-GPL-Compatible', 'deprecated': False}, - 'coil-1.0': {'id': 'COIL-1.0', 'deprecated': False}, - 'community-spec-1.0': {'id': 'Community-Spec-1.0', 'deprecated': False}, - 'condor-1.1': {'id': 'Condor-1.1', 'deprecated': False}, - 'copyleft-next-0.3.0': {'id': 'copyleft-next-0.3.0', 'deprecated': False}, - 'copyleft-next-0.3.1': {'id': 'copyleft-next-0.3.1', 'deprecated': False}, - 'cornell-lossless-jpeg': {'id': 'Cornell-Lossless-JPEG', 'deprecated': False}, - 'cpal-1.0': {'id': 'CPAL-1.0', 'deprecated': False}, - 'cpl-1.0': {'id': 'CPL-1.0', 'deprecated': False}, - 'cpol-1.02': {'id': 'CPOL-1.02', 'deprecated': False}, - 'cronyx': {'id': 'Cronyx', 'deprecated': False}, - 'crossword': {'id': 'Crossword', 'deprecated': False}, - 'cryptoswift': {'id': 'CryptoSwift', 'deprecated': False}, - 'crystalstacker': {'id': 'CrystalStacker', 'deprecated': False}, - 'cua-opl-1.0': {'id': 'CUA-OPL-1.0', 'deprecated': False}, - 'cube': {'id': 'Cube', 'deprecated': False}, - 'curl': {'id': 'curl', 'deprecated': False}, - 'cve-tou': {'id': 'cve-tou', 'deprecated': False}, - 'd-fsl-1.0': {'id': 'D-FSL-1.0', 'deprecated': False}, - 'dec-3-clause': {'id': 'DEC-3-Clause', 'deprecated': False}, - 'diffmark': {'id': 'diffmark', 'deprecated': False}, - 'dl-de-by-2.0': {'id': 'DL-DE-BY-2.0', 'deprecated': False}, - 'dl-de-zero-2.0': {'id': 'DL-DE-ZERO-2.0', 'deprecated': False}, - 'doc': {'id': 'DOC', 'deprecated': False}, - 'docbook-dtd': {'id': 'DocBook-DTD', 'deprecated': False}, - 'docbook-schema': {'id': 'DocBook-Schema', 'deprecated': False}, - 'docbook-stylesheet': {'id': 'DocBook-Stylesheet', 'deprecated': False}, - 'docbook-xml': {'id': 'DocBook-XML', 'deprecated': False}, - 'dotseqn': {'id': 'Dotseqn', 'deprecated': False}, - 'drl-1.0': {'id': 'DRL-1.0', 'deprecated': False}, - 'drl-1.1': {'id': 'DRL-1.1', 'deprecated': False}, - 'dsdp': {'id': 'DSDP', 'deprecated': False}, - 'dtoa': {'id': 'dtoa', 'deprecated': False}, - 'dvipdfm': {'id': 'dvipdfm', 'deprecated': False}, - 'ecl-1.0': {'id': 'ECL-1.0', 'deprecated': False}, - 'ecl-2.0': {'id': 'ECL-2.0', 'deprecated': False}, - 'ecos-2.0': {'id': 'eCos-2.0', 'deprecated': True}, - 'efl-1.0': {'id': 'EFL-1.0', 'deprecated': False}, - 'efl-2.0': {'id': 'EFL-2.0', 'deprecated': False}, - 'egenix': {'id': 'eGenix', 'deprecated': False}, - 'elastic-2.0': {'id': 'Elastic-2.0', 'deprecated': False}, - 'entessa': {'id': 'Entessa', 'deprecated': False}, - 'epics': {'id': 'EPICS', 'deprecated': False}, - 'epl-1.0': {'id': 'EPL-1.0', 'deprecated': False}, - 'epl-2.0': {'id': 'EPL-2.0', 'deprecated': False}, - 'erlpl-1.1': {'id': 'ErlPL-1.1', 'deprecated': False}, - 'etalab-2.0': {'id': 'etalab-2.0', 'deprecated': False}, - 'eudatagrid': {'id': 'EUDatagrid', 'deprecated': False}, - 'eupl-1.0': {'id': 'EUPL-1.0', 'deprecated': False}, - 'eupl-1.1': {'id': 'EUPL-1.1', 'deprecated': False}, - 'eupl-1.2': {'id': 'EUPL-1.2', 'deprecated': False}, - 'eurosym': {'id': 'Eurosym', 'deprecated': False}, - 'fair': {'id': 'Fair', 'deprecated': False}, - 'fbm': {'id': 'FBM', 'deprecated': False}, - 'fdk-aac': {'id': 'FDK-AAC', 'deprecated': False}, - 'ferguson-twofish': {'id': 'Ferguson-Twofish', 'deprecated': False}, - 'frameworx-1.0': {'id': 'Frameworx-1.0', 'deprecated': False}, - 'freebsd-doc': {'id': 'FreeBSD-DOC', 'deprecated': False}, - 'freeimage': {'id': 'FreeImage', 'deprecated': False}, - 'fsfap': {'id': 'FSFAP', 'deprecated': False}, - 'fsfap-no-warranty-disclaimer': {'id': 'FSFAP-no-warranty-disclaimer', 'deprecated': False}, - 'fsful': {'id': 'FSFUL', 'deprecated': False}, - 'fsfullr': {'id': 'FSFULLR', 'deprecated': False}, - 'fsfullrsd': {'id': 'FSFULLRSD', 'deprecated': False}, - 'fsfullrwd': {'id': 'FSFULLRWD', 'deprecated': False}, - 'fsl-1.1-alv2': {'id': 'FSL-1.1-ALv2', 'deprecated': False}, - 'fsl-1.1-mit': {'id': 'FSL-1.1-MIT', 'deprecated': False}, - 'ftl': {'id': 'FTL', 'deprecated': False}, - 'furuseth': {'id': 'Furuseth', 'deprecated': False}, - 'fwlw': {'id': 'fwlw', 'deprecated': False}, - 'game-programming-gems': {'id': 'Game-Programming-Gems', 'deprecated': False}, - 'gcr-docs': {'id': 'GCR-docs', 'deprecated': False}, - 'gd': {'id': 'GD', 'deprecated': False}, - 'generic-xts': {'id': 'generic-xts', 'deprecated': False}, - 'gfdl-1.1': {'id': 'GFDL-1.1', 'deprecated': True}, - 'gfdl-1.1-invariants-only': {'id': 'GFDL-1.1-invariants-only', 'deprecated': False}, - 'gfdl-1.1-invariants-or-later': {'id': 'GFDL-1.1-invariants-or-later', 'deprecated': False}, - 'gfdl-1.1-no-invariants-only': {'id': 'GFDL-1.1-no-invariants-only', 'deprecated': False}, - 'gfdl-1.1-no-invariants-or-later': {'id': 'GFDL-1.1-no-invariants-or-later', 'deprecated': False}, - 'gfdl-1.1-only': {'id': 'GFDL-1.1-only', 'deprecated': False}, - 'gfdl-1.1-or-later': {'id': 'GFDL-1.1-or-later', 'deprecated': False}, - 'gfdl-1.2': {'id': 'GFDL-1.2', 'deprecated': True}, - 'gfdl-1.2-invariants-only': {'id': 'GFDL-1.2-invariants-only', 'deprecated': False}, - 'gfdl-1.2-invariants-or-later': {'id': 'GFDL-1.2-invariants-or-later', 'deprecated': False}, - 'gfdl-1.2-no-invariants-only': {'id': 'GFDL-1.2-no-invariants-only', 'deprecated': False}, - 'gfdl-1.2-no-invariants-or-later': {'id': 'GFDL-1.2-no-invariants-or-later', 'deprecated': False}, - 'gfdl-1.2-only': {'id': 'GFDL-1.2-only', 'deprecated': False}, - 'gfdl-1.2-or-later': {'id': 'GFDL-1.2-or-later', 'deprecated': False}, - 'gfdl-1.3': {'id': 'GFDL-1.3', 'deprecated': True}, - 'gfdl-1.3-invariants-only': {'id': 'GFDL-1.3-invariants-only', 'deprecated': False}, - 'gfdl-1.3-invariants-or-later': {'id': 'GFDL-1.3-invariants-or-later', 'deprecated': False}, - 'gfdl-1.3-no-invariants-only': {'id': 'GFDL-1.3-no-invariants-only', 'deprecated': False}, - 'gfdl-1.3-no-invariants-or-later': {'id': 'GFDL-1.3-no-invariants-or-later', 'deprecated': False}, - 'gfdl-1.3-only': {'id': 'GFDL-1.3-only', 'deprecated': False}, - 'gfdl-1.3-or-later': {'id': 'GFDL-1.3-or-later', 'deprecated': False}, - 'giftware': {'id': 'Giftware', 'deprecated': False}, - 'gl2ps': {'id': 'GL2PS', 'deprecated': False}, - 'glide': {'id': 'Glide', 'deprecated': False}, - 'glulxe': {'id': 'Glulxe', 'deprecated': False}, - 'glwtpl': {'id': 'GLWTPL', 'deprecated': False}, - 'gnuplot': {'id': 'gnuplot', 'deprecated': False}, - 'gpl-1.0': {'id': 'GPL-1.0', 'deprecated': True}, - 'gpl-1.0+': {'id': 'GPL-1.0+', 'deprecated': True}, - 'gpl-1.0-only': {'id': 'GPL-1.0-only', 'deprecated': False}, - 'gpl-1.0-or-later': {'id': 'GPL-1.0-or-later', 'deprecated': False}, - 'gpl-2.0': {'id': 'GPL-2.0', 'deprecated': True}, - 'gpl-2.0+': {'id': 'GPL-2.0+', 'deprecated': True}, - 'gpl-2.0-only': {'id': 'GPL-2.0-only', 'deprecated': False}, - 'gpl-2.0-or-later': {'id': 'GPL-2.0-or-later', 'deprecated': False}, - 'gpl-2.0-with-autoconf-exception': {'id': 'GPL-2.0-with-autoconf-exception', 'deprecated': True}, - 'gpl-2.0-with-bison-exception': {'id': 'GPL-2.0-with-bison-exception', 'deprecated': True}, - 'gpl-2.0-with-classpath-exception': {'id': 'GPL-2.0-with-classpath-exception', 'deprecated': True}, - 'gpl-2.0-with-font-exception': {'id': 'GPL-2.0-with-font-exception', 'deprecated': True}, - 'gpl-2.0-with-gcc-exception': {'id': 'GPL-2.0-with-GCC-exception', 'deprecated': True}, - 'gpl-3.0': {'id': 'GPL-3.0', 'deprecated': True}, - 'gpl-3.0+': {'id': 'GPL-3.0+', 'deprecated': True}, - 'gpl-3.0-only': {'id': 'GPL-3.0-only', 'deprecated': False}, - 'gpl-3.0-or-later': {'id': 'GPL-3.0-or-later', 'deprecated': False}, - 'gpl-3.0-with-autoconf-exception': {'id': 'GPL-3.0-with-autoconf-exception', 'deprecated': True}, - 'gpl-3.0-with-gcc-exception': {'id': 'GPL-3.0-with-GCC-exception', 'deprecated': True}, - 'graphics-gems': {'id': 'Graphics-Gems', 'deprecated': False}, - 'gsoap-1.3b': {'id': 'gSOAP-1.3b', 'deprecated': False}, - 'gtkbook': {'id': 'gtkbook', 'deprecated': False}, - 'gutmann': {'id': 'Gutmann', 'deprecated': False}, - 'haskellreport': {'id': 'HaskellReport', 'deprecated': False}, - 'hdf5': {'id': 'HDF5', 'deprecated': False}, - 'hdparm': {'id': 'hdparm', 'deprecated': False}, - 'hidapi': {'id': 'HIDAPI', 'deprecated': False}, - 'hippocratic-2.1': {'id': 'Hippocratic-2.1', 'deprecated': False}, - 'hp-1986': {'id': 'HP-1986', 'deprecated': False}, - 'hp-1989': {'id': 'HP-1989', 'deprecated': False}, - 'hpnd': {'id': 'HPND', 'deprecated': False}, - 'hpnd-dec': {'id': 'HPND-DEC', 'deprecated': False}, - 'hpnd-doc': {'id': 'HPND-doc', 'deprecated': False}, - 'hpnd-doc-sell': {'id': 'HPND-doc-sell', 'deprecated': False}, - 'hpnd-export-us': {'id': 'HPND-export-US', 'deprecated': False}, - 'hpnd-export-us-acknowledgement': {'id': 'HPND-export-US-acknowledgement', 'deprecated': False}, - 'hpnd-export-us-modify': {'id': 'HPND-export-US-modify', 'deprecated': False}, - 'hpnd-export2-us': {'id': 'HPND-export2-US', 'deprecated': False}, - 'hpnd-fenneberg-livingston': {'id': 'HPND-Fenneberg-Livingston', 'deprecated': False}, - 'hpnd-inria-imag': {'id': 'HPND-INRIA-IMAG', 'deprecated': False}, - 'hpnd-intel': {'id': 'HPND-Intel', 'deprecated': False}, - 'hpnd-kevlin-henney': {'id': 'HPND-Kevlin-Henney', 'deprecated': False}, - 'hpnd-markus-kuhn': {'id': 'HPND-Markus-Kuhn', 'deprecated': False}, - 'hpnd-merchantability-variant': {'id': 'HPND-merchantability-variant', 'deprecated': False}, - 'hpnd-mit-disclaimer': {'id': 'HPND-MIT-disclaimer', 'deprecated': False}, - 'hpnd-netrek': {'id': 'HPND-Netrek', 'deprecated': False}, - 'hpnd-pbmplus': {'id': 'HPND-Pbmplus', 'deprecated': False}, - 'hpnd-sell-mit-disclaimer-xserver': {'id': 'HPND-sell-MIT-disclaimer-xserver', 'deprecated': False}, - 'hpnd-sell-regexpr': {'id': 'HPND-sell-regexpr', 'deprecated': False}, - 'hpnd-sell-variant': {'id': 'HPND-sell-variant', 'deprecated': False}, - 'hpnd-sell-variant-mit-disclaimer': {'id': 'HPND-sell-variant-MIT-disclaimer', 'deprecated': False}, - 'hpnd-sell-variant-mit-disclaimer-rev': {'id': 'HPND-sell-variant-MIT-disclaimer-rev', 'deprecated': False}, - 'hpnd-uc': {'id': 'HPND-UC', 'deprecated': False}, - 'hpnd-uc-export-us': {'id': 'HPND-UC-export-US', 'deprecated': False}, - 'htmltidy': {'id': 'HTMLTIDY', 'deprecated': False}, - 'ibm-pibs': {'id': 'IBM-pibs', 'deprecated': False}, - 'icu': {'id': 'ICU', 'deprecated': False}, - 'iec-code-components-eula': {'id': 'IEC-Code-Components-EULA', 'deprecated': False}, - 'ijg': {'id': 'IJG', 'deprecated': False}, - 'ijg-short': {'id': 'IJG-short', 'deprecated': False}, - 'imagemagick': {'id': 'ImageMagick', 'deprecated': False}, - 'imatix': {'id': 'iMatix', 'deprecated': False}, - 'imlib2': {'id': 'Imlib2', 'deprecated': False}, - 'info-zip': {'id': 'Info-ZIP', 'deprecated': False}, - 'inner-net-2.0': {'id': 'Inner-Net-2.0', 'deprecated': False}, - 'innosetup': {'id': 'InnoSetup', 'deprecated': False}, - 'intel': {'id': 'Intel', 'deprecated': False}, - 'intel-acpi': {'id': 'Intel-ACPI', 'deprecated': False}, - 'interbase-1.0': {'id': 'Interbase-1.0', 'deprecated': False}, - 'ipa': {'id': 'IPA', 'deprecated': False}, - 'ipl-1.0': {'id': 'IPL-1.0', 'deprecated': False}, - 'isc': {'id': 'ISC', 'deprecated': False}, - 'isc-veillard': {'id': 'ISC-Veillard', 'deprecated': False}, - 'jam': {'id': 'Jam', 'deprecated': False}, - 'jasper-2.0': {'id': 'JasPer-2.0', 'deprecated': False}, - 'jove': {'id': 'jove', 'deprecated': False}, - 'jpl-image': {'id': 'JPL-image', 'deprecated': False}, - 'jpnic': {'id': 'JPNIC', 'deprecated': False}, - 'json': {'id': 'JSON', 'deprecated': False}, - 'kastrup': {'id': 'Kastrup', 'deprecated': False}, - 'kazlib': {'id': 'Kazlib', 'deprecated': False}, - 'knuth-ctan': {'id': 'Knuth-CTAN', 'deprecated': False}, - 'lal-1.2': {'id': 'LAL-1.2', 'deprecated': False}, - 'lal-1.3': {'id': 'LAL-1.3', 'deprecated': False}, - 'latex2e': {'id': 'Latex2e', 'deprecated': False}, - 'latex2e-translated-notice': {'id': 'Latex2e-translated-notice', 'deprecated': False}, - 'leptonica': {'id': 'Leptonica', 'deprecated': False}, - 'lgpl-2.0': {'id': 'LGPL-2.0', 'deprecated': True}, - 'lgpl-2.0+': {'id': 'LGPL-2.0+', 'deprecated': True}, - 'lgpl-2.0-only': {'id': 'LGPL-2.0-only', 'deprecated': False}, - 'lgpl-2.0-or-later': {'id': 'LGPL-2.0-or-later', 'deprecated': False}, - 'lgpl-2.1': {'id': 'LGPL-2.1', 'deprecated': True}, - 'lgpl-2.1+': {'id': 'LGPL-2.1+', 'deprecated': True}, - 'lgpl-2.1-only': {'id': 'LGPL-2.1-only', 'deprecated': False}, - 'lgpl-2.1-or-later': {'id': 'LGPL-2.1-or-later', 'deprecated': False}, - 'lgpl-3.0': {'id': 'LGPL-3.0', 'deprecated': True}, - 'lgpl-3.0+': {'id': 'LGPL-3.0+', 'deprecated': True}, - 'lgpl-3.0-only': {'id': 'LGPL-3.0-only', 'deprecated': False}, - 'lgpl-3.0-or-later': {'id': 'LGPL-3.0-or-later', 'deprecated': False}, - 'lgpllr': {'id': 'LGPLLR', 'deprecated': False}, - 'libpng': {'id': 'Libpng', 'deprecated': False}, - 'libpng-1.6.35': {'id': 'libpng-1.6.35', 'deprecated': False}, - 'libpng-2.0': {'id': 'libpng-2.0', 'deprecated': False}, - 'libselinux-1.0': {'id': 'libselinux-1.0', 'deprecated': False}, - 'libtiff': {'id': 'libtiff', 'deprecated': False}, - 'libutil-david-nugent': {'id': 'libutil-David-Nugent', 'deprecated': False}, - 'liliq-p-1.1': {'id': 'LiLiQ-P-1.1', 'deprecated': False}, - 'liliq-r-1.1': {'id': 'LiLiQ-R-1.1', 'deprecated': False}, - 'liliq-rplus-1.1': {'id': 'LiLiQ-Rplus-1.1', 'deprecated': False}, - 'linux-man-pages-1-para': {'id': 'Linux-man-pages-1-para', 'deprecated': False}, - 'linux-man-pages-copyleft': {'id': 'Linux-man-pages-copyleft', 'deprecated': False}, - 'linux-man-pages-copyleft-2-para': {'id': 'Linux-man-pages-copyleft-2-para', 'deprecated': False}, - 'linux-man-pages-copyleft-var': {'id': 'Linux-man-pages-copyleft-var', 'deprecated': False}, - 'linux-openib': {'id': 'Linux-OpenIB', 'deprecated': False}, - 'loop': {'id': 'LOOP', 'deprecated': False}, - 'lpd-document': {'id': 'LPD-document', 'deprecated': False}, - 'lpl-1.0': {'id': 'LPL-1.0', 'deprecated': False}, - 'lpl-1.02': {'id': 'LPL-1.02', 'deprecated': False}, - 'lppl-1.0': {'id': 'LPPL-1.0', 'deprecated': False}, - 'lppl-1.1': {'id': 'LPPL-1.1', 'deprecated': False}, - 'lppl-1.2': {'id': 'LPPL-1.2', 'deprecated': False}, - 'lppl-1.3a': {'id': 'LPPL-1.3a', 'deprecated': False}, - 'lppl-1.3c': {'id': 'LPPL-1.3c', 'deprecated': False}, - 'lsof': {'id': 'lsof', 'deprecated': False}, - 'lucida-bitmap-fonts': {'id': 'Lucida-Bitmap-Fonts', 'deprecated': False}, - 'lzma-sdk-9.11-to-9.20': {'id': 'LZMA-SDK-9.11-to-9.20', 'deprecated': False}, - 'lzma-sdk-9.22': {'id': 'LZMA-SDK-9.22', 'deprecated': False}, - 'mackerras-3-clause': {'id': 'Mackerras-3-Clause', 'deprecated': False}, - 'mackerras-3-clause-acknowledgment': {'id': 'Mackerras-3-Clause-acknowledgment', 'deprecated': False}, - 'magaz': {'id': 'magaz', 'deprecated': False}, - 'mailprio': {'id': 'mailprio', 'deprecated': False}, - 'makeindex': {'id': 'MakeIndex', 'deprecated': False}, - 'man2html': {'id': 'man2html', 'deprecated': False}, - 'martin-birgmeier': {'id': 'Martin-Birgmeier', 'deprecated': False}, - 'mcphee-slideshow': {'id': 'McPhee-slideshow', 'deprecated': False}, - 'metamail': {'id': 'metamail', 'deprecated': False}, - 'minpack': {'id': 'Minpack', 'deprecated': False}, - 'mips': {'id': 'MIPS', 'deprecated': False}, - 'miros': {'id': 'MirOS', 'deprecated': False}, - 'mit': {'id': 'MIT', 'deprecated': False}, - 'mit-0': {'id': 'MIT-0', 'deprecated': False}, - 'mit-advertising': {'id': 'MIT-advertising', 'deprecated': False}, - 'mit-click': {'id': 'MIT-Click', 'deprecated': False}, - 'mit-cmu': {'id': 'MIT-CMU', 'deprecated': False}, - 'mit-enna': {'id': 'MIT-enna', 'deprecated': False}, - 'mit-feh': {'id': 'MIT-feh', 'deprecated': False}, - 'mit-festival': {'id': 'MIT-Festival', 'deprecated': False}, - 'mit-khronos-old': {'id': 'MIT-Khronos-old', 'deprecated': False}, - 'mit-modern-variant': {'id': 'MIT-Modern-Variant', 'deprecated': False}, - 'mit-open-group': {'id': 'MIT-open-group', 'deprecated': False}, - 'mit-testregex': {'id': 'MIT-testregex', 'deprecated': False}, - 'mit-wu': {'id': 'MIT-Wu', 'deprecated': False}, - 'mitnfa': {'id': 'MITNFA', 'deprecated': False}, - 'mmixware': {'id': 'MMIXware', 'deprecated': False}, - 'motosoto': {'id': 'Motosoto', 'deprecated': False}, - 'mpeg-ssg': {'id': 'MPEG-SSG', 'deprecated': False}, - 'mpi-permissive': {'id': 'mpi-permissive', 'deprecated': False}, - 'mpich2': {'id': 'mpich2', 'deprecated': False}, - 'mpl-1.0': {'id': 'MPL-1.0', 'deprecated': False}, - 'mpl-1.1': {'id': 'MPL-1.1', 'deprecated': False}, - 'mpl-2.0': {'id': 'MPL-2.0', 'deprecated': False}, - 'mpl-2.0-no-copyleft-exception': {'id': 'MPL-2.0-no-copyleft-exception', 'deprecated': False}, - 'mplus': {'id': 'mplus', 'deprecated': False}, - 'ms-lpl': {'id': 'MS-LPL', 'deprecated': False}, - 'ms-pl': {'id': 'MS-PL', 'deprecated': False}, - 'ms-rl': {'id': 'MS-RL', 'deprecated': False}, - 'mtll': {'id': 'MTLL', 'deprecated': False}, - 'mulanpsl-1.0': {'id': 'MulanPSL-1.0', 'deprecated': False}, - 'mulanpsl-2.0': {'id': 'MulanPSL-2.0', 'deprecated': False}, - 'multics': {'id': 'Multics', 'deprecated': False}, - 'mup': {'id': 'Mup', 'deprecated': False}, - 'naist-2003': {'id': 'NAIST-2003', 'deprecated': False}, - 'nasa-1.3': {'id': 'NASA-1.3', 'deprecated': False}, - 'naumen': {'id': 'Naumen', 'deprecated': False}, - 'nbpl-1.0': {'id': 'NBPL-1.0', 'deprecated': False}, - 'ncbi-pd': {'id': 'NCBI-PD', 'deprecated': False}, - 'ncgl-uk-2.0': {'id': 'NCGL-UK-2.0', 'deprecated': False}, - 'ncl': {'id': 'NCL', 'deprecated': False}, - 'ncsa': {'id': 'NCSA', 'deprecated': False}, - 'net-snmp': {'id': 'Net-SNMP', 'deprecated': True}, - 'netcdf': {'id': 'NetCDF', 'deprecated': False}, - 'newsletr': {'id': 'Newsletr', 'deprecated': False}, - 'ngpl': {'id': 'NGPL', 'deprecated': False}, - 'ngrep': {'id': 'ngrep', 'deprecated': False}, - 'nicta-1.0': {'id': 'NICTA-1.0', 'deprecated': False}, - 'nist-pd': {'id': 'NIST-PD', 'deprecated': False}, - 'nist-pd-fallback': {'id': 'NIST-PD-fallback', 'deprecated': False}, - 'nist-software': {'id': 'NIST-Software', 'deprecated': False}, - 'nlod-1.0': {'id': 'NLOD-1.0', 'deprecated': False}, - 'nlod-2.0': {'id': 'NLOD-2.0', 'deprecated': False}, - 'nlpl': {'id': 'NLPL', 'deprecated': False}, - 'nokia': {'id': 'Nokia', 'deprecated': False}, - 'nosl': {'id': 'NOSL', 'deprecated': False}, - 'noweb': {'id': 'Noweb', 'deprecated': False}, - 'npl-1.0': {'id': 'NPL-1.0', 'deprecated': False}, - 'npl-1.1': {'id': 'NPL-1.1', 'deprecated': False}, - 'nposl-3.0': {'id': 'NPOSL-3.0', 'deprecated': False}, - 'nrl': {'id': 'NRL', 'deprecated': False}, - 'ntia-pd': {'id': 'NTIA-PD', 'deprecated': False}, - 'ntp': {'id': 'NTP', 'deprecated': False}, - 'ntp-0': {'id': 'NTP-0', 'deprecated': False}, - 'nunit': {'id': 'Nunit', 'deprecated': True}, - 'o-uda-1.0': {'id': 'O-UDA-1.0', 'deprecated': False}, - 'oar': {'id': 'OAR', 'deprecated': False}, - 'occt-pl': {'id': 'OCCT-PL', 'deprecated': False}, - 'oclc-2.0': {'id': 'OCLC-2.0', 'deprecated': False}, - 'odbl-1.0': {'id': 'ODbL-1.0', 'deprecated': False}, - 'odc-by-1.0': {'id': 'ODC-By-1.0', 'deprecated': False}, - 'offis': {'id': 'OFFIS', 'deprecated': False}, - 'ofl-1.0': {'id': 'OFL-1.0', 'deprecated': False}, - 'ofl-1.0-no-rfn': {'id': 'OFL-1.0-no-RFN', 'deprecated': False}, - 'ofl-1.0-rfn': {'id': 'OFL-1.0-RFN', 'deprecated': False}, - 'ofl-1.1': {'id': 'OFL-1.1', 'deprecated': False}, - 'ofl-1.1-no-rfn': {'id': 'OFL-1.1-no-RFN', 'deprecated': False}, - 'ofl-1.1-rfn': {'id': 'OFL-1.1-RFN', 'deprecated': False}, - 'ogc-1.0': {'id': 'OGC-1.0', 'deprecated': False}, - 'ogdl-taiwan-1.0': {'id': 'OGDL-Taiwan-1.0', 'deprecated': False}, - 'ogl-canada-2.0': {'id': 'OGL-Canada-2.0', 'deprecated': False}, - 'ogl-uk-1.0': {'id': 'OGL-UK-1.0', 'deprecated': False}, - 'ogl-uk-2.0': {'id': 'OGL-UK-2.0', 'deprecated': False}, - 'ogl-uk-3.0': {'id': 'OGL-UK-3.0', 'deprecated': False}, - 'ogtsl': {'id': 'OGTSL', 'deprecated': False}, - 'oldap-1.1': {'id': 'OLDAP-1.1', 'deprecated': False}, - 'oldap-1.2': {'id': 'OLDAP-1.2', 'deprecated': False}, - 'oldap-1.3': {'id': 'OLDAP-1.3', 'deprecated': False}, - 'oldap-1.4': {'id': 'OLDAP-1.4', 'deprecated': False}, - 'oldap-2.0': {'id': 'OLDAP-2.0', 'deprecated': False}, - 'oldap-2.0.1': {'id': 'OLDAP-2.0.1', 'deprecated': False}, - 'oldap-2.1': {'id': 'OLDAP-2.1', 'deprecated': False}, - 'oldap-2.2': {'id': 'OLDAP-2.2', 'deprecated': False}, - 'oldap-2.2.1': {'id': 'OLDAP-2.2.1', 'deprecated': False}, - 'oldap-2.2.2': {'id': 'OLDAP-2.2.2', 'deprecated': False}, - 'oldap-2.3': {'id': 'OLDAP-2.3', 'deprecated': False}, - 'oldap-2.4': {'id': 'OLDAP-2.4', 'deprecated': False}, - 'oldap-2.5': {'id': 'OLDAP-2.5', 'deprecated': False}, - 'oldap-2.6': {'id': 'OLDAP-2.6', 'deprecated': False}, - 'oldap-2.7': {'id': 'OLDAP-2.7', 'deprecated': False}, - 'oldap-2.8': {'id': 'OLDAP-2.8', 'deprecated': False}, - 'olfl-1.3': {'id': 'OLFL-1.3', 'deprecated': False}, - 'oml': {'id': 'OML', 'deprecated': False}, - 'openpbs-2.3': {'id': 'OpenPBS-2.3', 'deprecated': False}, - 'openssl': {'id': 'OpenSSL', 'deprecated': False}, - 'openssl-standalone': {'id': 'OpenSSL-standalone', 'deprecated': False}, - 'openvision': {'id': 'OpenVision', 'deprecated': False}, - 'opl-1.0': {'id': 'OPL-1.0', 'deprecated': False}, - 'opl-uk-3.0': {'id': 'OPL-UK-3.0', 'deprecated': False}, - 'opubl-1.0': {'id': 'OPUBL-1.0', 'deprecated': False}, - 'oset-pl-2.1': {'id': 'OSET-PL-2.1', 'deprecated': False}, - 'osl-1.0': {'id': 'OSL-1.0', 'deprecated': False}, - 'osl-1.1': {'id': 'OSL-1.1', 'deprecated': False}, - 'osl-2.0': {'id': 'OSL-2.0', 'deprecated': False}, - 'osl-2.1': {'id': 'OSL-2.1', 'deprecated': False}, - 'osl-3.0': {'id': 'OSL-3.0', 'deprecated': False}, - 'padl': {'id': 'PADL', 'deprecated': False}, - 'parity-6.0.0': {'id': 'Parity-6.0.0', 'deprecated': False}, - 'parity-7.0.0': {'id': 'Parity-7.0.0', 'deprecated': False}, - 'pddl-1.0': {'id': 'PDDL-1.0', 'deprecated': False}, - 'php-3.0': {'id': 'PHP-3.0', 'deprecated': False}, - 'php-3.01': {'id': 'PHP-3.01', 'deprecated': False}, - 'pixar': {'id': 'Pixar', 'deprecated': False}, - 'pkgconf': {'id': 'pkgconf', 'deprecated': False}, - 'plexus': {'id': 'Plexus', 'deprecated': False}, - 'pnmstitch': {'id': 'pnmstitch', 'deprecated': False}, - 'polyform-noncommercial-1.0.0': {'id': 'PolyForm-Noncommercial-1.0.0', 'deprecated': False}, - 'polyform-small-business-1.0.0': {'id': 'PolyForm-Small-Business-1.0.0', 'deprecated': False}, - 'postgresql': {'id': 'PostgreSQL', 'deprecated': False}, - 'ppl': {'id': 'PPL', 'deprecated': False}, - 'psf-2.0': {'id': 'PSF-2.0', 'deprecated': False}, - 'psfrag': {'id': 'psfrag', 'deprecated': False}, - 'psutils': {'id': 'psutils', 'deprecated': False}, - 'python-2.0': {'id': 'Python-2.0', 'deprecated': False}, - 'python-2.0.1': {'id': 'Python-2.0.1', 'deprecated': False}, - 'python-ldap': {'id': 'python-ldap', 'deprecated': False}, - 'qhull': {'id': 'Qhull', 'deprecated': False}, - 'qpl-1.0': {'id': 'QPL-1.0', 'deprecated': False}, - 'qpl-1.0-inria-2004': {'id': 'QPL-1.0-INRIA-2004', 'deprecated': False}, - 'radvd': {'id': 'radvd', 'deprecated': False}, - 'rdisc': {'id': 'Rdisc', 'deprecated': False}, - 'rhecos-1.1': {'id': 'RHeCos-1.1', 'deprecated': False}, - 'rpl-1.1': {'id': 'RPL-1.1', 'deprecated': False}, - 'rpl-1.5': {'id': 'RPL-1.5', 'deprecated': False}, - 'rpsl-1.0': {'id': 'RPSL-1.0', 'deprecated': False}, - 'rsa-md': {'id': 'RSA-MD', 'deprecated': False}, - 'rscpl': {'id': 'RSCPL', 'deprecated': False}, - 'ruby': {'id': 'Ruby', 'deprecated': False}, - 'ruby-pty': {'id': 'Ruby-pty', 'deprecated': False}, - 'sax-pd': {'id': 'SAX-PD', 'deprecated': False}, - 'sax-pd-2.0': {'id': 'SAX-PD-2.0', 'deprecated': False}, - 'saxpath': {'id': 'Saxpath', 'deprecated': False}, - 'scea': {'id': 'SCEA', 'deprecated': False}, - 'schemereport': {'id': 'SchemeReport', 'deprecated': False}, - 'sendmail': {'id': 'Sendmail', 'deprecated': False}, - 'sendmail-8.23': {'id': 'Sendmail-8.23', 'deprecated': False}, - 'sendmail-open-source-1.1': {'id': 'Sendmail-Open-Source-1.1', 'deprecated': False}, - 'sgi-b-1.0': {'id': 'SGI-B-1.0', 'deprecated': False}, - 'sgi-b-1.1': {'id': 'SGI-B-1.1', 'deprecated': False}, - 'sgi-b-2.0': {'id': 'SGI-B-2.0', 'deprecated': False}, - 'sgi-opengl': {'id': 'SGI-OpenGL', 'deprecated': False}, - 'sgp4': {'id': 'SGP4', 'deprecated': False}, - 'shl-0.5': {'id': 'SHL-0.5', 'deprecated': False}, - 'shl-0.51': {'id': 'SHL-0.51', 'deprecated': False}, - 'simpl-2.0': {'id': 'SimPL-2.0', 'deprecated': False}, - 'sissl': {'id': 'SISSL', 'deprecated': False}, - 'sissl-1.2': {'id': 'SISSL-1.2', 'deprecated': False}, - 'sl': {'id': 'SL', 'deprecated': False}, - 'sleepycat': {'id': 'Sleepycat', 'deprecated': False}, - 'smail-gpl': {'id': 'SMAIL-GPL', 'deprecated': False}, - 'smlnj': {'id': 'SMLNJ', 'deprecated': False}, - 'smppl': {'id': 'SMPPL', 'deprecated': False}, - 'snia': {'id': 'SNIA', 'deprecated': False}, - 'snprintf': {'id': 'snprintf', 'deprecated': False}, - 'sofa': {'id': 'SOFA', 'deprecated': False}, - 'softsurfer': {'id': 'softSurfer', 'deprecated': False}, - 'soundex': {'id': 'Soundex', 'deprecated': False}, - 'spencer-86': {'id': 'Spencer-86', 'deprecated': False}, - 'spencer-94': {'id': 'Spencer-94', 'deprecated': False}, - 'spencer-99': {'id': 'Spencer-99', 'deprecated': False}, - 'spl-1.0': {'id': 'SPL-1.0', 'deprecated': False}, - 'ssh-keyscan': {'id': 'ssh-keyscan', 'deprecated': False}, - 'ssh-openssh': {'id': 'SSH-OpenSSH', 'deprecated': False}, - 'ssh-short': {'id': 'SSH-short', 'deprecated': False}, - 'ssleay-standalone': {'id': 'SSLeay-standalone', 'deprecated': False}, - 'sspl-1.0': {'id': 'SSPL-1.0', 'deprecated': False}, - 'standardml-nj': {'id': 'StandardML-NJ', 'deprecated': True}, - 'sugarcrm-1.1.3': {'id': 'SugarCRM-1.1.3', 'deprecated': False}, - 'sul-1.0': {'id': 'SUL-1.0', 'deprecated': False}, - 'sun-ppp': {'id': 'Sun-PPP', 'deprecated': False}, - 'sun-ppp-2000': {'id': 'Sun-PPP-2000', 'deprecated': False}, - 'sunpro': {'id': 'SunPro', 'deprecated': False}, - 'swl': {'id': 'SWL', 'deprecated': False}, - 'swrule': {'id': 'swrule', 'deprecated': False}, - 'symlinks': {'id': 'Symlinks', 'deprecated': False}, - 'tapr-ohl-1.0': {'id': 'TAPR-OHL-1.0', 'deprecated': False}, - 'tcl': {'id': 'TCL', 'deprecated': False}, - 'tcp-wrappers': {'id': 'TCP-wrappers', 'deprecated': False}, - 'termreadkey': {'id': 'TermReadKey', 'deprecated': False}, - 'tgppl-1.0': {'id': 'TGPPL-1.0', 'deprecated': False}, - 'thirdeye': {'id': 'ThirdEye', 'deprecated': False}, - 'threeparttable': {'id': 'threeparttable', 'deprecated': False}, - 'tmate': {'id': 'TMate', 'deprecated': False}, - 'torque-1.1': {'id': 'TORQUE-1.1', 'deprecated': False}, - 'tosl': {'id': 'TOSL', 'deprecated': False}, - 'tpdl': {'id': 'TPDL', 'deprecated': False}, - 'tpl-1.0': {'id': 'TPL-1.0', 'deprecated': False}, - 'trustedqsl': {'id': 'TrustedQSL', 'deprecated': False}, - 'ttwl': {'id': 'TTWL', 'deprecated': False}, - 'ttyp0': {'id': 'TTYP0', 'deprecated': False}, - 'tu-berlin-1.0': {'id': 'TU-Berlin-1.0', 'deprecated': False}, - 'tu-berlin-2.0': {'id': 'TU-Berlin-2.0', 'deprecated': False}, - 'ubuntu-font-1.0': {'id': 'Ubuntu-font-1.0', 'deprecated': False}, - 'ucar': {'id': 'UCAR', 'deprecated': False}, - 'ucl-1.0': {'id': 'UCL-1.0', 'deprecated': False}, - 'ulem': {'id': 'ulem', 'deprecated': False}, - 'umich-merit': {'id': 'UMich-Merit', 'deprecated': False}, - 'unicode-3.0': {'id': 'Unicode-3.0', 'deprecated': False}, - 'unicode-dfs-2015': {'id': 'Unicode-DFS-2015', 'deprecated': False}, - 'unicode-dfs-2016': {'id': 'Unicode-DFS-2016', 'deprecated': False}, - 'unicode-tou': {'id': 'Unicode-TOU', 'deprecated': False}, - 'unixcrypt': {'id': 'UnixCrypt', 'deprecated': False}, - 'unlicense': {'id': 'Unlicense', 'deprecated': False}, - 'unlicense-libtelnet': {'id': 'Unlicense-libtelnet', 'deprecated': False}, - 'unlicense-libwhirlpool': {'id': 'Unlicense-libwhirlpool', 'deprecated': False}, - 'upl-1.0': {'id': 'UPL-1.0', 'deprecated': False}, - 'urt-rle': {'id': 'URT-RLE', 'deprecated': False}, - 'vim': {'id': 'Vim', 'deprecated': False}, - 'vostrom': {'id': 'VOSTROM', 'deprecated': False}, - 'vsl-1.0': {'id': 'VSL-1.0', 'deprecated': False}, - 'w3c': {'id': 'W3C', 'deprecated': False}, - 'w3c-19980720': {'id': 'W3C-19980720', 'deprecated': False}, - 'w3c-20150513': {'id': 'W3C-20150513', 'deprecated': False}, - 'w3m': {'id': 'w3m', 'deprecated': False}, - 'watcom-1.0': {'id': 'Watcom-1.0', 'deprecated': False}, - 'widget-workshop': {'id': 'Widget-Workshop', 'deprecated': False}, - 'wsuipa': {'id': 'Wsuipa', 'deprecated': False}, - 'wtfpl': {'id': 'WTFPL', 'deprecated': False}, - 'wwl': {'id': 'wwl', 'deprecated': False}, - 'wxwindows': {'id': 'wxWindows', 'deprecated': True}, - 'x11': {'id': 'X11', 'deprecated': False}, - 'x11-distribute-modifications-variant': {'id': 'X11-distribute-modifications-variant', 'deprecated': False}, - 'x11-swapped': {'id': 'X11-swapped', 'deprecated': False}, - 'xdebug-1.03': {'id': 'Xdebug-1.03', 'deprecated': False}, - 'xerox': {'id': 'Xerox', 'deprecated': False}, - 'xfig': {'id': 'Xfig', 'deprecated': False}, - 'xfree86-1.1': {'id': 'XFree86-1.1', 'deprecated': False}, - 'xinetd': {'id': 'xinetd', 'deprecated': False}, - 'xkeyboard-config-zinoviev': {'id': 'xkeyboard-config-Zinoviev', 'deprecated': False}, - 'xlock': {'id': 'xlock', 'deprecated': False}, - 'xnet': {'id': 'Xnet', 'deprecated': False}, - 'xpp': {'id': 'xpp', 'deprecated': False}, - 'xskat': {'id': 'XSkat', 'deprecated': False}, - 'xzoom': {'id': 'xzoom', 'deprecated': False}, - 'ypl-1.0': {'id': 'YPL-1.0', 'deprecated': False}, - 'ypl-1.1': {'id': 'YPL-1.1', 'deprecated': False}, - 'zed': {'id': 'Zed', 'deprecated': False}, - 'zeeff': {'id': 'Zeeff', 'deprecated': False}, - 'zend-2.0': {'id': 'Zend-2.0', 'deprecated': False}, - 'zimbra-1.3': {'id': 'Zimbra-1.3', 'deprecated': False}, - 'zimbra-1.4': {'id': 'Zimbra-1.4', 'deprecated': False}, - 'zlib': {'id': 'Zlib', 'deprecated': False}, - 'zlib-acknowledgement': {'id': 'zlib-acknowledgement', 'deprecated': False}, - 'zpl-1.1': {'id': 'ZPL-1.1', 'deprecated': False}, - 'zpl-2.0': {'id': 'ZPL-2.0', 'deprecated': False}, - 'zpl-2.1': {'id': 'ZPL-2.1', 'deprecated': False}, -} - -EXCEPTIONS: dict[str, SPDXException] = { - '389-exception': {'id': '389-exception', 'deprecated': False}, - 'asterisk-exception': {'id': 'Asterisk-exception', 'deprecated': False}, - 'asterisk-linking-protocols-exception': {'id': 'Asterisk-linking-protocols-exception', 'deprecated': False}, - 'autoconf-exception-2.0': {'id': 'Autoconf-exception-2.0', 'deprecated': False}, - 'autoconf-exception-3.0': {'id': 'Autoconf-exception-3.0', 'deprecated': False}, - 'autoconf-exception-generic': {'id': 'Autoconf-exception-generic', 'deprecated': False}, - 'autoconf-exception-generic-3.0': {'id': 'Autoconf-exception-generic-3.0', 'deprecated': False}, - 'autoconf-exception-macro': {'id': 'Autoconf-exception-macro', 'deprecated': False}, - 'bison-exception-1.24': {'id': 'Bison-exception-1.24', 'deprecated': False}, - 'bison-exception-2.2': {'id': 'Bison-exception-2.2', 'deprecated': False}, - 'bootloader-exception': {'id': 'Bootloader-exception', 'deprecated': False}, - 'cgal-linking-exception': {'id': 'CGAL-linking-exception', 'deprecated': False}, - 'classpath-exception-2.0': {'id': 'Classpath-exception-2.0', 'deprecated': False}, - 'clisp-exception-2.0': {'id': 'CLISP-exception-2.0', 'deprecated': False}, - 'cryptsetup-openssl-exception': {'id': 'cryptsetup-OpenSSL-exception', 'deprecated': False}, - 'digia-qt-lgpl-exception-1.1': {'id': 'Digia-Qt-LGPL-exception-1.1', 'deprecated': False}, - 'digirule-foss-exception': {'id': 'DigiRule-FOSS-exception', 'deprecated': False}, - 'ecos-exception-2.0': {'id': 'eCos-exception-2.0', 'deprecated': False}, - 'erlang-otp-linking-exception': {'id': 'erlang-otp-linking-exception', 'deprecated': False}, - 'fawkes-runtime-exception': {'id': 'Fawkes-Runtime-exception', 'deprecated': False}, - 'fltk-exception': {'id': 'FLTK-exception', 'deprecated': False}, - 'fmt-exception': {'id': 'fmt-exception', 'deprecated': False}, - 'font-exception-2.0': {'id': 'Font-exception-2.0', 'deprecated': False}, - 'freertos-exception-2.0': {'id': 'freertos-exception-2.0', 'deprecated': False}, - 'gcc-exception-2.0': {'id': 'GCC-exception-2.0', 'deprecated': False}, - 'gcc-exception-2.0-note': {'id': 'GCC-exception-2.0-note', 'deprecated': False}, - 'gcc-exception-3.1': {'id': 'GCC-exception-3.1', 'deprecated': False}, - 'gmsh-exception': {'id': 'Gmsh-exception', 'deprecated': False}, - 'gnat-exception': {'id': 'GNAT-exception', 'deprecated': False}, - 'gnome-examples-exception': {'id': 'GNOME-examples-exception', 'deprecated': False}, - 'gnu-compiler-exception': {'id': 'GNU-compiler-exception', 'deprecated': False}, - 'gnu-javamail-exception': {'id': 'gnu-javamail-exception', 'deprecated': False}, - 'gpl-3.0-389-ds-base-exception': {'id': 'GPL-3.0-389-ds-base-exception', 'deprecated': False}, - 'gpl-3.0-interface-exception': {'id': 'GPL-3.0-interface-exception', 'deprecated': False}, - 'gpl-3.0-linking-exception': {'id': 'GPL-3.0-linking-exception', 'deprecated': False}, - 'gpl-3.0-linking-source-exception': {'id': 'GPL-3.0-linking-source-exception', 'deprecated': False}, - 'gpl-cc-1.0': {'id': 'GPL-CC-1.0', 'deprecated': False}, - 'gstreamer-exception-2005': {'id': 'GStreamer-exception-2005', 'deprecated': False}, - 'gstreamer-exception-2008': {'id': 'GStreamer-exception-2008', 'deprecated': False}, - 'harbour-exception': {'id': 'harbour-exception', 'deprecated': False}, - 'i2p-gpl-java-exception': {'id': 'i2p-gpl-java-exception', 'deprecated': False}, - 'independent-modules-exception': {'id': 'Independent-modules-exception', 'deprecated': False}, - 'kicad-libraries-exception': {'id': 'KiCad-libraries-exception', 'deprecated': False}, - 'lgpl-3.0-linking-exception': {'id': 'LGPL-3.0-linking-exception', 'deprecated': False}, - 'libpri-openh323-exception': {'id': 'libpri-OpenH323-exception', 'deprecated': False}, - 'libtool-exception': {'id': 'Libtool-exception', 'deprecated': False}, - 'linux-syscall-note': {'id': 'Linux-syscall-note', 'deprecated': False}, - 'llgpl': {'id': 'LLGPL', 'deprecated': False}, - 'llvm-exception': {'id': 'LLVM-exception', 'deprecated': False}, - 'lzma-exception': {'id': 'LZMA-exception', 'deprecated': False}, - 'mif-exception': {'id': 'mif-exception', 'deprecated': False}, - 'mxml-exception': {'id': 'mxml-exception', 'deprecated': False}, - 'nokia-qt-exception-1.1': {'id': 'Nokia-Qt-exception-1.1', 'deprecated': True}, - 'ocaml-lgpl-linking-exception': {'id': 'OCaml-LGPL-linking-exception', 'deprecated': False}, - 'occt-exception-1.0': {'id': 'OCCT-exception-1.0', 'deprecated': False}, - 'openjdk-assembly-exception-1.0': {'id': 'OpenJDK-assembly-exception-1.0', 'deprecated': False}, - 'openvpn-openssl-exception': {'id': 'openvpn-openssl-exception', 'deprecated': False}, - 'pcre2-exception': {'id': 'PCRE2-exception', 'deprecated': False}, - 'polyparse-exception': {'id': 'polyparse-exception', 'deprecated': False}, - 'ps-or-pdf-font-exception-20170817': {'id': 'PS-or-PDF-font-exception-20170817', 'deprecated': False}, - 'qpl-1.0-inria-2004-exception': {'id': 'QPL-1.0-INRIA-2004-exception', 'deprecated': False}, - 'qt-gpl-exception-1.0': {'id': 'Qt-GPL-exception-1.0', 'deprecated': False}, - 'qt-lgpl-exception-1.1': {'id': 'Qt-LGPL-exception-1.1', 'deprecated': False}, - 'qwt-exception-1.0': {'id': 'Qwt-exception-1.0', 'deprecated': False}, - 'romic-exception': {'id': 'romic-exception', 'deprecated': False}, - 'rrdtool-floss-exception-2.0': {'id': 'RRDtool-FLOSS-exception-2.0', 'deprecated': False}, - 'sane-exception': {'id': 'SANE-exception', 'deprecated': False}, - 'shl-2.0': {'id': 'SHL-2.0', 'deprecated': False}, - 'shl-2.1': {'id': 'SHL-2.1', 'deprecated': False}, - 'stunnel-exception': {'id': 'stunnel-exception', 'deprecated': False}, - 'swi-exception': {'id': 'SWI-exception', 'deprecated': False}, - 'swift-exception': {'id': 'Swift-exception', 'deprecated': False}, - 'texinfo-exception': {'id': 'Texinfo-exception', 'deprecated': False}, - 'u-boot-exception-2.0': {'id': 'u-boot-exception-2.0', 'deprecated': False}, - 'ubdl-exception': {'id': 'UBDL-exception', 'deprecated': False}, - 'universal-foss-exception-1.0': {'id': 'Universal-FOSS-exception-1.0', 'deprecated': False}, - 'vsftpd-openssl-exception': {'id': 'vsftpd-openssl-exception', 'deprecated': False}, - 'wxwindows-exception-3.1': {'id': 'WxWindows-exception-3.1', 'deprecated': False}, - 'x11vnc-openssl-exception': {'id': 'x11vnc-openssl-exception', 'deprecated': False}, -} diff --git a/voxvera/vendor/setuptools/_vendor/packaging/markers.py b/voxvera/vendor/setuptools/_vendor/packaging/markers.py deleted file mode 100644 index ca3706f..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/markers.py +++ /dev/null @@ -1,388 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import operator -import os -import platform -import sys -from typing import AbstractSet, Callable, Literal, Mapping, TypedDict, Union, cast - -from ._parser import MarkerAtom, MarkerList, Op, Value, Variable -from ._parser import parse_marker as _parse_marker -from ._tokenizer import ParserSyntaxError -from .specifiers import InvalidSpecifier, Specifier -from .utils import canonicalize_name - -__all__ = [ - "Environment", - "EvaluateContext", - "InvalidMarker", - "Marker", - "UndefinedComparison", - "UndefinedEnvironmentName", - "default_environment", -] - -Operator = Callable[[str, Union[str, AbstractSet[str]]], bool] -EvaluateContext = Literal["metadata", "lock_file", "requirement"] -MARKERS_ALLOWING_SET = {"extras", "dependency_groups"} -MARKERS_REQUIRING_VERSION = { - "implementation_version", - "platform_release", - "python_full_version", - "python_version", -} - - -class InvalidMarker(ValueError): - """ - An invalid marker was found, users should refer to PEP 508. - """ - - -class UndefinedComparison(ValueError): - """ - An invalid operation was attempted on a value that doesn't support it. - """ - - -class UndefinedEnvironmentName(ValueError): - """ - A name was attempted to be used that does not exist inside of the - environment. - """ - - -class Environment(TypedDict): - implementation_name: str - """The implementation's identifier, e.g. ``'cpython'``.""" - - implementation_version: str - """ - The implementation's version, e.g. ``'3.13.0a2'`` for CPython 3.13.0a2, or - ``'7.3.13'`` for PyPy3.10 v7.3.13. - """ - - os_name: str - """ - The value of :py:data:`os.name`. The name of the operating system dependent module - imported, e.g. ``'posix'``. - """ - - platform_machine: str - """ - Returns the machine type, e.g. ``'i386'``. - - An empty string if the value cannot be determined. - """ - - platform_release: str - """ - The system's release, e.g. ``'2.2.0'`` or ``'NT'``. - - An empty string if the value cannot be determined. - """ - - platform_system: str - """ - The system/OS name, e.g. ``'Linux'``, ``'Windows'`` or ``'Java'``. - - An empty string if the value cannot be determined. - """ - - platform_version: str - """ - The system's release version, e.g. ``'#3 on degas'``. - - An empty string if the value cannot be determined. - """ - - python_full_version: str - """ - The Python version as string ``'major.minor.patchlevel'``. - - Note that unlike the Python :py:data:`sys.version`, this value will always include - the patchlevel (it defaults to 0). - """ - - platform_python_implementation: str - """ - A string identifying the Python implementation, e.g. ``'CPython'``. - """ - - python_version: str - """The Python version as string ``'major.minor'``.""" - - sys_platform: str - """ - This string contains a platform identifier that can be used to append - platform-specific components to :py:data:`sys.path`, for instance. - - For Unix systems, except on Linux and AIX, this is the lowercased OS name as - returned by ``uname -s`` with the first part of the version as returned by - ``uname -r`` appended, e.g. ``'sunos5'`` or ``'freebsd8'``, at the time when Python - was built. - """ - - -def _normalize_extras( - result: MarkerList | MarkerAtom | str, -) -> MarkerList | MarkerAtom | str: - if not isinstance(result, tuple): - return result - - lhs, op, rhs = result - if isinstance(lhs, Variable) and lhs.value == "extra": - normalized_extra = canonicalize_name(rhs.value) - rhs = Value(normalized_extra) - elif isinstance(rhs, Variable) and rhs.value == "extra": - normalized_extra = canonicalize_name(lhs.value) - lhs = Value(normalized_extra) - return lhs, op, rhs - - -def _normalize_extra_values(results: MarkerList) -> MarkerList: - """ - Normalize extra values. - """ - - return [_normalize_extras(r) for r in results] - - -def _format_marker( - marker: list[str] | MarkerAtom | str, first: bool | None = True -) -> str: - assert isinstance(marker, (list, tuple, str)) - - # Sometimes we have a structure like [[...]] which is a single item list - # where the single item is itself it's own list. In that case we want skip - # the rest of this function so that we don't get extraneous () on the - # outside. - if ( - isinstance(marker, list) - and len(marker) == 1 - and isinstance(marker[0], (list, tuple)) - ): - return _format_marker(marker[0]) - - if isinstance(marker, list): - inner = (_format_marker(m, first=False) for m in marker) - if first: - return " ".join(inner) - else: - return "(" + " ".join(inner) + ")" - elif isinstance(marker, tuple): - return " ".join([m.serialize() for m in marker]) - else: - return marker - - -_operators: dict[str, Operator] = { - "in": lambda lhs, rhs: lhs in rhs, - "not in": lambda lhs, rhs: lhs not in rhs, - "<": lambda _lhs, _rhs: False, - "<=": operator.eq, - "==": operator.eq, - "!=": operator.ne, - ">=": operator.eq, - ">": lambda _lhs, _rhs: False, -} - - -def _eval_op(lhs: str, op: Op, rhs: str | AbstractSet[str], *, key: str) -> bool: - op_str = op.serialize() - if key in MARKERS_REQUIRING_VERSION: - try: - spec = Specifier(f"{op_str}{rhs}") - except InvalidSpecifier: - pass - else: - return spec.contains(lhs, prereleases=True) - - oper: Operator | None = _operators.get(op_str) - if oper is None: - raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.") - - return oper(lhs, rhs) - - -def _normalize( - lhs: str, rhs: str | AbstractSet[str], key: str -) -> tuple[str, str | AbstractSet[str]]: - # PEP 685 - Comparison of extra names for optional distribution dependencies - # https://peps.python.org/pep-0685/ - # > When comparing extra names, tools MUST normalize the names being - # > compared using the semantics outlined in PEP 503 for names - if key == "extra": - assert isinstance(rhs, str), "extra value must be a string" - # Both sides are normalized at this point already - return (lhs, rhs) - if key in MARKERS_ALLOWING_SET: - if isinstance(rhs, str): # pragma: no cover - return (canonicalize_name(lhs), canonicalize_name(rhs)) - else: - return (canonicalize_name(lhs), {canonicalize_name(v) for v in rhs}) - - # other environment markers don't have such standards - return lhs, rhs - - -def _evaluate_markers( - markers: MarkerList, environment: dict[str, str | AbstractSet[str]] -) -> bool: - groups: list[list[bool]] = [[]] - - for marker in markers: - if isinstance(marker, list): - groups[-1].append(_evaluate_markers(marker, environment)) - elif isinstance(marker, tuple): - lhs, op, rhs = marker - - if isinstance(lhs, Variable): - environment_key = lhs.value - lhs_value = environment[environment_key] - rhs_value = rhs.value - else: - lhs_value = lhs.value - environment_key = rhs.value - rhs_value = environment[environment_key] - - assert isinstance(lhs_value, str), "lhs must be a string" - lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key) - groups[-1].append(_eval_op(lhs_value, op, rhs_value, key=environment_key)) - elif marker == "or": - groups.append([]) - elif marker == "and": - pass - else: # pragma: nocover - raise TypeError(f"Unexpected marker {marker!r}") - - return any(all(item) for item in groups) - - -def format_full_version(info: sys._version_info) -> str: - version = f"{info.major}.{info.minor}.{info.micro}" - kind = info.releaselevel - if kind != "final": - version += kind[0] + str(info.serial) - return version - - -def default_environment() -> Environment: - iver = format_full_version(sys.implementation.version) - implementation_name = sys.implementation.name - return { - "implementation_name": implementation_name, - "implementation_version": iver, - "os_name": os.name, - "platform_machine": platform.machine(), - "platform_release": platform.release(), - "platform_system": platform.system(), - "platform_version": platform.version(), - "python_full_version": platform.python_version(), - "platform_python_implementation": platform.python_implementation(), - "python_version": ".".join(platform.python_version_tuple()[:2]), - "sys_platform": sys.platform, - } - - -class Marker: - def __init__(self, marker: str) -> None: - # Note: We create a Marker object without calling this constructor in - # packaging.requirements.Requirement. If any additional logic is - # added here, make sure to mirror/adapt Requirement. - - # If this fails and throws an error, the repr still expects _markers to - # be defined. - self._markers: MarkerList = [] - - try: - self._markers = _normalize_extra_values(_parse_marker(marker)) - # The attribute `_markers` can be described in terms of a recursive type: - # MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]] - # - # For example, the following expression: - # python_version > "3.6" or (python_version == "3.6" and os_name == "unix") - # - # is parsed into: - # [ - # (, ')>, ), - # 'and', - # [ - # (, , ), - # 'or', - # (, , ) - # ] - # ] - except ParserSyntaxError as e: - raise InvalidMarker(str(e)) from e - - def __str__(self) -> str: - return _format_marker(self._markers) - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}('{self}')>" - - def __hash__(self) -> int: - return hash(str(self)) - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Marker): - return NotImplemented - - return str(self) == str(other) - - def evaluate( - self, - environment: Mapping[str, str | AbstractSet[str]] | None = None, - context: EvaluateContext = "metadata", - ) -> bool: - """Evaluate a marker. - - Return the boolean from evaluating the given marker against the - environment. environment is an optional argument to override all or - part of the determined environment. The *context* parameter specifies what - context the markers are being evaluated for, which influences what markers - are considered valid. Acceptable values are "metadata" (for core metadata; - default), "lock_file", and "requirement" (i.e. all other situations). - - The environment is determined from the current Python process. - """ - current_environment = cast( - "dict[str, str | AbstractSet[str]]", default_environment() - ) - if context == "lock_file": - current_environment.update( - extras=frozenset(), dependency_groups=frozenset() - ) - elif context == "metadata": - current_environment["extra"] = "" - - if environment is not None: - current_environment.update(environment) - if "extra" in current_environment: - # The API used to allow setting extra to None. We need to handle - # this case for backwards compatibility. Also skip running - # normalize name if extra is empty. - extra = cast("str | None", current_environment["extra"]) - current_environment["extra"] = canonicalize_name(extra) if extra else "" - - return _evaluate_markers( - self._markers, _repair_python_full_version(current_environment) - ) - - -def _repair_python_full_version( - env: dict[str, str | AbstractSet[str]], -) -> dict[str, str | AbstractSet[str]]: - """ - Work around platform.python_version() returning something that is not PEP 440 - compliant for non-tagged Python builds. - """ - python_full_version = cast("str", env["python_full_version"]) - if python_full_version.endswith("+"): - env["python_full_version"] = f"{python_full_version}local" - return env diff --git a/voxvera/vendor/setuptools/_vendor/packaging/metadata.py b/voxvera/vendor/setuptools/_vendor/packaging/metadata.py deleted file mode 100644 index 253f6b1..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/metadata.py +++ /dev/null @@ -1,978 +0,0 @@ -from __future__ import annotations - -import email.feedparser -import email.header -import email.message -import email.parser -import email.policy -import keyword -import pathlib -import sys -import typing -from typing import ( - Any, - Callable, - Generic, - Literal, - TypedDict, - cast, -) - -from . import licenses, requirements, specifiers, utils -from . import version as version_module - -if typing.TYPE_CHECKING: - from .licenses import NormalizedLicenseExpression - -T = typing.TypeVar("T") - - -if sys.version_info >= (3, 11): # pragma: no cover - ExceptionGroup = ExceptionGroup # noqa: F821 -else: # pragma: no cover - - class ExceptionGroup(Exception): - """A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11. - - If :external:exc:`ExceptionGroup` is already defined by Python itself, - that version is used instead. - """ - - message: str - exceptions: list[Exception] - - def __init__(self, message: str, exceptions: list[Exception]) -> None: - self.message = message - self.exceptions = exceptions - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.message!r}, {self.exceptions!r})" - - -class InvalidMetadata(ValueError): - """A metadata field contains invalid data.""" - - field: str - """The name of the field that contains invalid data.""" - - def __init__(self, field: str, message: str) -> None: - self.field = field - super().__init__(message) - - -# The RawMetadata class attempts to make as few assumptions about the underlying -# serialization formats as possible. The idea is that as long as a serialization -# formats offer some very basic primitives in *some* way then we can support -# serializing to and from that format. -class RawMetadata(TypedDict, total=False): - """A dictionary of raw core metadata. - - Each field in core metadata maps to a key of this dictionary (when data is - provided). The key is lower-case and underscores are used instead of dashes - compared to the equivalent core metadata field. Any core metadata field that - can be specified multiple times or can hold multiple values in a single - field have a key with a plural name. See :class:`Metadata` whose attributes - match the keys of this dictionary. - - Core metadata fields that can be specified multiple times are stored as a - list or dict depending on which is appropriate for the field. Any fields - which hold multiple values in a single field are stored as a list. - - """ - - # Metadata 1.0 - PEP 241 - metadata_version: str - name: str - version: str - platforms: list[str] - summary: str - description: str - keywords: list[str] - home_page: str - author: str - author_email: str - license: str - - # Metadata 1.1 - PEP 314 - supported_platforms: list[str] - download_url: str - classifiers: list[str] - requires: list[str] - provides: list[str] - obsoletes: list[str] - - # Metadata 1.2 - PEP 345 - maintainer: str - maintainer_email: str - requires_dist: list[str] - provides_dist: list[str] - obsoletes_dist: list[str] - requires_python: str - requires_external: list[str] - project_urls: dict[str, str] - - # Metadata 2.0 - # PEP 426 attempted to completely revamp the metadata format - # but got stuck without ever being able to build consensus on - # it and ultimately ended up withdrawn. - # - # However, a number of tools had started emitting METADATA with - # `2.0` Metadata-Version, so for historical reasons, this version - # was skipped. - - # Metadata 2.1 - PEP 566 - description_content_type: str - provides_extra: list[str] - - # Metadata 2.2 - PEP 643 - dynamic: list[str] - - # Metadata 2.3 - PEP 685 - # No new fields were added in PEP 685, just some edge case were - # tightened up to provide better interoperability. - - # Metadata 2.4 - PEP 639 - license_expression: str - license_files: list[str] - - # Metadata 2.5 - PEP 794 - import_names: list[str] - import_namespaces: list[str] - - -# 'keywords' is special as it's a string in the core metadata spec, but we -# represent it as a list. -_STRING_FIELDS = { - "author", - "author_email", - "description", - "description_content_type", - "download_url", - "home_page", - "license", - "license_expression", - "maintainer", - "maintainer_email", - "metadata_version", - "name", - "requires_python", - "summary", - "version", -} - -_LIST_FIELDS = { - "classifiers", - "dynamic", - "license_files", - "obsoletes", - "obsoletes_dist", - "platforms", - "provides", - "provides_dist", - "provides_extra", - "requires", - "requires_dist", - "requires_external", - "supported_platforms", - "import_names", - "import_namespaces", -} - -_DICT_FIELDS = { - "project_urls", -} - - -def _parse_keywords(data: str) -> list[str]: - """Split a string of comma-separated keywords into a list of keywords.""" - return [k.strip() for k in data.split(",")] - - -def _parse_project_urls(data: list[str]) -> dict[str, str]: - """Parse a list of label/URL string pairings separated by a comma.""" - urls = {} - for pair in data: - # Our logic is slightly tricky here as we want to try and do - # *something* reasonable with malformed data. - # - # The main thing that we have to worry about, is data that does - # not have a ',' at all to split the label from the Value. There - # isn't a singular right answer here, and we will fail validation - # later on (if the caller is validating) so it doesn't *really* - # matter, but since the missing value has to be an empty str - # and our return value is dict[str, str], if we let the key - # be the missing value, then they'd have multiple '' values that - # overwrite each other in a accumulating dict. - # - # The other potential issue is that it's possible to have the - # same label multiple times in the metadata, with no solid "right" - # answer with what to do in that case. As such, we'll do the only - # thing we can, which is treat the field as unparsable and add it - # to our list of unparsed fields. - # - # TODO: The spec doesn't say anything about if the keys should be - # considered case sensitive or not... logically they should - # be case-preserving and case-insensitive, but doing that - # would open up more cases where we might have duplicate - # entries. - label, _, url = (s.strip() for s in pair.partition(",")) - - if label in urls: - # The label already exists in our set of urls, so this field - # is unparsable, and we can just add the whole thing to our - # unparsable data and stop processing it. - raise KeyError("duplicate labels in project urls") - urls[label] = url - - return urls - - -def _get_payload(msg: email.message.Message, source: bytes | str) -> str: - """Get the body of the message.""" - # If our source is a str, then our caller has managed encodings for us, - # and we don't need to deal with it. - if isinstance(source, str): - payload = msg.get_payload() - assert isinstance(payload, str) - return payload - # If our source is a bytes, then we're managing the encoding and we need - # to deal with it. - else: - bpayload = msg.get_payload(decode=True) - assert isinstance(bpayload, bytes) - try: - return bpayload.decode("utf8", "strict") - except UnicodeDecodeError as exc: - raise ValueError("payload in an invalid encoding") from exc - - -# The various parse_FORMAT functions here are intended to be as lenient as -# possible in their parsing, while still returning a correctly typed -# RawMetadata. -# -# To aid in this, we also generally want to do as little touching of the -# data as possible, except where there are possibly some historic holdovers -# that make valid data awkward to work with. -# -# While this is a lower level, intermediate format than our ``Metadata`` -# class, some light touch ups can make a massive difference in usability. - -# Map METADATA fields to RawMetadata. -_EMAIL_TO_RAW_MAPPING = { - "author": "author", - "author-email": "author_email", - "classifier": "classifiers", - "description": "description", - "description-content-type": "description_content_type", - "download-url": "download_url", - "dynamic": "dynamic", - "home-page": "home_page", - "import-name": "import_names", - "import-namespace": "import_namespaces", - "keywords": "keywords", - "license": "license", - "license-expression": "license_expression", - "license-file": "license_files", - "maintainer": "maintainer", - "maintainer-email": "maintainer_email", - "metadata-version": "metadata_version", - "name": "name", - "obsoletes": "obsoletes", - "obsoletes-dist": "obsoletes_dist", - "platform": "platforms", - "project-url": "project_urls", - "provides": "provides", - "provides-dist": "provides_dist", - "provides-extra": "provides_extra", - "requires": "requires", - "requires-dist": "requires_dist", - "requires-external": "requires_external", - "requires-python": "requires_python", - "summary": "summary", - "supported-platform": "supported_platforms", - "version": "version", -} -_RAW_TO_EMAIL_MAPPING = {raw: email for email, raw in _EMAIL_TO_RAW_MAPPING.items()} - - -# This class is for writing RFC822 messages -class RFC822Policy(email.policy.EmailPolicy): - """ - This is :class:`email.policy.EmailPolicy`, but with a simple ``header_store_parse`` - implementation that handles multi-line values, and some nice defaults. - """ - - utf8 = True - mangle_from_ = False - max_line_length = 0 - - def header_store_parse(self, name: str, value: str) -> tuple[str, str]: - size = len(name) + 2 - value = value.replace("\n", "\n" + " " * size) - return (name, value) - - -# This class is for writing RFC822 messages -class RFC822Message(email.message.EmailMessage): - """ - This is :class:`email.message.EmailMessage` with two small changes: it defaults to - our `RFC822Policy`, and it correctly writes unicode when being called - with `bytes()`. - """ - - def __init__(self) -> None: - super().__init__(policy=RFC822Policy()) - - def as_bytes( - self, unixfrom: bool = False, policy: email.policy.Policy | None = None - ) -> bytes: - """ - Return the bytes representation of the message. - - This handles unicode encoding. - """ - return self.as_string(unixfrom, policy=policy).encode("utf-8") - - -def parse_email(data: bytes | str) -> tuple[RawMetadata, dict[str, list[str]]]: - """Parse a distribution's metadata stored as email headers (e.g. from ``METADATA``). - - This function returns a two-item tuple of dicts. The first dict is of - recognized fields from the core metadata specification. Fields that can be - parsed and translated into Python's built-in types are converted - appropriately. All other fields are left as-is. Fields that are allowed to - appear multiple times are stored as lists. - - The second dict contains all other fields from the metadata. This includes - any unrecognized fields. It also includes any fields which are expected to - be parsed into a built-in type but were not formatted appropriately. Finally, - any fields that are expected to appear only once but are repeated are - included in this dict. - - """ - raw: dict[str, str | list[str] | dict[str, str]] = {} - unparsed: dict[str, list[str]] = {} - - if isinstance(data, str): - parsed = email.parser.Parser(policy=email.policy.compat32).parsestr(data) - else: - parsed = email.parser.BytesParser(policy=email.policy.compat32).parsebytes(data) - - # We have to wrap parsed.keys() in a set, because in the case of multiple - # values for a key (a list), the key will appear multiple times in the - # list of keys, but we're avoiding that by using get_all(). - for name_with_case in frozenset(parsed.keys()): - # Header names in RFC are case insensitive, so we'll normalize to all - # lower case to make comparisons easier. - name = name_with_case.lower() - - # We use get_all() here, even for fields that aren't multiple use, - # because otherwise someone could have e.g. two Name fields, and we - # would just silently ignore it rather than doing something about it. - headers = parsed.get_all(name) or [] - - # The way the email module works when parsing bytes is that it - # unconditionally decodes the bytes as ascii using the surrogateescape - # handler. When you pull that data back out (such as with get_all() ), - # it looks to see if the str has any surrogate escapes, and if it does - # it wraps it in a Header object instead of returning the string. - # - # As such, we'll look for those Header objects, and fix up the encoding. - value = [] - # Flag if we have run into any issues processing the headers, thus - # signalling that the data belongs in 'unparsed'. - valid_encoding = True - for h in headers: - # It's unclear if this can return more types than just a Header or - # a str, so we'll just assert here to make sure. - assert isinstance(h, (email.header.Header, str)) - - # If it's a header object, we need to do our little dance to get - # the real data out of it. In cases where there is invalid data - # we're going to end up with mojibake, but there's no obvious, good - # way around that without reimplementing parts of the Header object - # ourselves. - # - # That should be fine since, if mojibacked happens, this key is - # going into the unparsed dict anyways. - if isinstance(h, email.header.Header): - # The Header object stores it's data as chunks, and each chunk - # can be independently encoded, so we'll need to check each - # of them. - chunks: list[tuple[bytes, str | None]] = [] - for binary, _encoding in email.header.decode_header(h): - try: - binary.decode("utf8", "strict") - except UnicodeDecodeError: - # Enable mojibake. - encoding = "latin1" - valid_encoding = False - else: - encoding = "utf8" - chunks.append((binary, encoding)) - - # Turn our chunks back into a Header object, then let that - # Header object do the right thing to turn them into a - # string for us. - value.append(str(email.header.make_header(chunks))) - # This is already a string, so just add it. - else: - value.append(h) - - # We've processed all of our values to get them into a list of str, - # but we may have mojibake data, in which case this is an unparsed - # field. - if not valid_encoding: - unparsed[name] = value - continue - - raw_name = _EMAIL_TO_RAW_MAPPING.get(name) - if raw_name is None: - # This is a bit of a weird situation, we've encountered a key that - # we don't know what it means, so we don't know whether it's meant - # to be a list or not. - # - # Since we can't really tell one way or another, we'll just leave it - # as a list, even though it may be a single item list, because that's - # what makes the most sense for email headers. - unparsed[name] = value - continue - - # If this is one of our string fields, then we'll check to see if our - # value is a list of a single item. If it is then we'll assume that - # it was emitted as a single string, and unwrap the str from inside - # the list. - # - # If it's any other kind of data, then we haven't the faintest clue - # what we should parse it as, and we have to just add it to our list - # of unparsed stuff. - if raw_name in _STRING_FIELDS and len(value) == 1: - raw[raw_name] = value[0] - # If this is import_names, we need to special case the empty field - # case, which converts to an empty list instead of None. We can't let - # the empty case slip through, as it will fail validation. - elif raw_name == "import_names" and value == [""]: - raw[raw_name] = [] - # If this is one of our list of string fields, then we can just assign - # the value, since email *only* has strings, and our get_all() call - # above ensures that this is a list. - elif raw_name in _LIST_FIELDS: - raw[raw_name] = value - # Special Case: Keywords - # The keywords field is implemented in the metadata spec as a str, - # but it conceptually is a list of strings, and is serialized using - # ", ".join(keywords), so we'll do some light data massaging to turn - # this into what it logically is. - elif raw_name == "keywords" and len(value) == 1: - raw[raw_name] = _parse_keywords(value[0]) - # Special Case: Project-URL - # The project urls is implemented in the metadata spec as a list of - # specially-formatted strings that represent a key and a value, which - # is fundamentally a mapping, however the email format doesn't support - # mappings in a sane way, so it was crammed into a list of strings - # instead. - # - # We will do a little light data massaging to turn this into a map as - # it logically should be. - elif raw_name == "project_urls": - try: - raw[raw_name] = _parse_project_urls(value) - except KeyError: - unparsed[name] = value - # Nothing that we've done has managed to parse this, so it'll just - # throw it in our unparsable data and move on. - else: - unparsed[name] = value - - # We need to support getting the Description from the message payload in - # addition to getting it from the the headers. This does mean, though, there - # is the possibility of it being set both ways, in which case we put both - # in 'unparsed' since we don't know which is right. - try: - payload = _get_payload(parsed, data) - except ValueError: - unparsed.setdefault("description", []).append( - parsed.get_payload(decode=isinstance(data, bytes)) # type: ignore[call-overload] - ) - else: - if payload: - # Check to see if we've already got a description, if so then both - # it, and this body move to unparsable. - if "description" in raw: - description_header = cast("str", raw.pop("description")) - unparsed.setdefault("description", []).extend( - [description_header, payload] - ) - elif "description" in unparsed: - unparsed["description"].append(payload) - else: - raw["description"] = payload - - # We need to cast our `raw` to a metadata, because a TypedDict only support - # literal key names, but we're computing our key names on purpose, but the - # way this function is implemented, our `TypedDict` can only have valid key - # names. - return cast("RawMetadata", raw), unparsed - - -_NOT_FOUND = object() - - -# Keep the two values in sync. -_VALID_METADATA_VERSIONS = ["1.0", "1.1", "1.2", "2.1", "2.2", "2.3", "2.4", "2.5"] -_MetadataVersion = Literal["1.0", "1.1", "1.2", "2.1", "2.2", "2.3", "2.4", "2.5"] - -_REQUIRED_ATTRS = frozenset(["metadata_version", "name", "version"]) - - -class _Validator(Generic[T]): - """Validate a metadata field. - - All _process_*() methods correspond to a core metadata field. The method is - called with the field's raw value. If the raw value is valid it is returned - in its "enriched" form (e.g. ``version.Version`` for the ``Version`` field). - If the raw value is invalid, :exc:`InvalidMetadata` is raised (with a cause - as appropriate). - """ - - name: str - raw_name: str - added: _MetadataVersion - - def __init__( - self, - *, - added: _MetadataVersion = "1.0", - ) -> None: - self.added = added - - def __set_name__(self, _owner: Metadata, name: str) -> None: - self.name = name - self.raw_name = _RAW_TO_EMAIL_MAPPING[name] - - def __get__(self, instance: Metadata, _owner: type[Metadata]) -> T: - # With Python 3.8, the caching can be replaced with functools.cached_property(). - # No need to check the cache as attribute lookup will resolve into the - # instance's __dict__ before __get__ is called. - cache = instance.__dict__ - value = instance._raw.get(self.name) - - # To make the _process_* methods easier, we'll check if the value is None - # and if this field is NOT a required attribute, and if both of those - # things are true, we'll skip the the converter. This will mean that the - # converters never have to deal with the None union. - if self.name in _REQUIRED_ATTRS or value is not None: - try: - converter: Callable[[Any], T] = getattr(self, f"_process_{self.name}") - except AttributeError: - pass - else: - value = converter(value) - - cache[self.name] = value - try: - del instance._raw[self.name] # type: ignore[misc] - except KeyError: - pass - - return cast("T", value) - - def _invalid_metadata( - self, msg: str, cause: Exception | None = None - ) -> InvalidMetadata: - exc = InvalidMetadata( - self.raw_name, msg.format_map({"field": repr(self.raw_name)}) - ) - exc.__cause__ = cause - return exc - - def _process_metadata_version(self, value: str) -> _MetadataVersion: - # Implicitly makes Metadata-Version required. - if value not in _VALID_METADATA_VERSIONS: - raise self._invalid_metadata(f"{value!r} is not a valid metadata version") - return cast("_MetadataVersion", value) - - def _process_name(self, value: str) -> str: - if not value: - raise self._invalid_metadata("{field} is a required field") - # Validate the name as a side-effect. - try: - utils.canonicalize_name(value, validate=True) - except utils.InvalidName as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) from exc - else: - return value - - def _process_version(self, value: str) -> version_module.Version: - if not value: - raise self._invalid_metadata("{field} is a required field") - try: - return version_module.parse(value) - except version_module.InvalidVersion as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) from exc - - def _process_summary(self, value: str) -> str: - """Check the field contains no newlines.""" - if "\n" in value: - raise self._invalid_metadata("{field} must be a single line") - return value - - def _process_description_content_type(self, value: str) -> str: - content_types = {"text/plain", "text/x-rst", "text/markdown"} - message = email.message.EmailMessage() - message["content-type"] = value - - content_type, parameters = ( - # Defaults to `text/plain` if parsing failed. - message.get_content_type().lower(), - message["content-type"].params, - ) - # Check if content-type is valid or defaulted to `text/plain` and thus was - # not parseable. - if content_type not in content_types or content_type not in value.lower(): - raise self._invalid_metadata( - f"{{field}} must be one of {list(content_types)}, not {value!r}" - ) - - charset = parameters.get("charset", "UTF-8") - if charset != "UTF-8": - raise self._invalid_metadata( - f"{{field}} can only specify the UTF-8 charset, not {list(charset)}" - ) - - markdown_variants = {"GFM", "CommonMark"} - variant = parameters.get("variant", "GFM") # Use an acceptable default. - if content_type == "text/markdown" and variant not in markdown_variants: - raise self._invalid_metadata( - f"valid Markdown variants for {{field}} are {list(markdown_variants)}, " - f"not {variant!r}", - ) - return value - - def _process_dynamic(self, value: list[str]) -> list[str]: - for dynamic_field in map(str.lower, value): - if dynamic_field in {"name", "version", "metadata-version"}: - raise self._invalid_metadata( - f"{dynamic_field!r} is not allowed as a dynamic field" - ) - elif dynamic_field not in _EMAIL_TO_RAW_MAPPING: - raise self._invalid_metadata( - f"{dynamic_field!r} is not a valid dynamic field" - ) - return list(map(str.lower, value)) - - def _process_provides_extra( - self, - value: list[str], - ) -> list[utils.NormalizedName]: - normalized_names = [] - try: - for name in value: - normalized_names.append(utils.canonicalize_name(name, validate=True)) - except utils.InvalidName as exc: - raise self._invalid_metadata( - f"{name!r} is invalid for {{field}}", cause=exc - ) from exc - else: - return normalized_names - - def _process_requires_python(self, value: str) -> specifiers.SpecifierSet: - try: - return specifiers.SpecifierSet(value) - except specifiers.InvalidSpecifier as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) from exc - - def _process_requires_dist( - self, - value: list[str], - ) -> list[requirements.Requirement]: - reqs = [] - try: - for req in value: - reqs.append(requirements.Requirement(req)) - except requirements.InvalidRequirement as exc: - raise self._invalid_metadata( - f"{req!r} is invalid for {{field}}", cause=exc - ) from exc - else: - return reqs - - def _process_license_expression(self, value: str) -> NormalizedLicenseExpression: - try: - return licenses.canonicalize_license_expression(value) - except ValueError as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) from exc - - def _process_license_files(self, value: list[str]) -> list[str]: - paths = [] - for path in value: - if ".." in path: - raise self._invalid_metadata( - f"{path!r} is invalid for {{field}}, " - "parent directory indicators are not allowed" - ) - if "*" in path: - raise self._invalid_metadata( - f"{path!r} is invalid for {{field}}, paths must be resolved" - ) - if ( - pathlib.PurePosixPath(path).is_absolute() - or pathlib.PureWindowsPath(path).is_absolute() - ): - raise self._invalid_metadata( - f"{path!r} is invalid for {{field}}, paths must be relative" - ) - if pathlib.PureWindowsPath(path).as_posix() != path: - raise self._invalid_metadata( - f"{path!r} is invalid for {{field}}, paths must use '/' delimiter" - ) - paths.append(path) - return paths - - def _process_import_names(self, value: list[str]) -> list[str]: - for import_name in value: - name, semicolon, private = import_name.partition(";") - name = name.rstrip() - for identifier in name.split("."): - if not identifier.isidentifier(): - raise self._invalid_metadata( - f"{name!r} is invalid for {{field}}; " - f"{identifier!r} is not a valid identifier" - ) - elif keyword.iskeyword(identifier): - raise self._invalid_metadata( - f"{name!r} is invalid for {{field}}; " - f"{identifier!r} is a keyword" - ) - if semicolon and private.lstrip() != "private": - raise self._invalid_metadata( - f"{import_name!r} is invalid for {{field}}; " - "the only valid option is 'private'" - ) - return value - - _process_import_namespaces = _process_import_names - - -class Metadata: - """Representation of distribution metadata. - - Compared to :class:`RawMetadata`, this class provides objects representing - metadata fields instead of only using built-in types. Any invalid metadata - will cause :exc:`InvalidMetadata` to be raised (with a - :py:attr:`~BaseException.__cause__` attribute as appropriate). - """ - - _raw: RawMetadata - - @classmethod - def from_raw(cls, data: RawMetadata, *, validate: bool = True) -> Metadata: - """Create an instance from :class:`RawMetadata`. - - If *validate* is true, all metadata will be validated. All exceptions - related to validation will be gathered and raised as an :class:`ExceptionGroup`. - """ - ins = cls() - ins._raw = data.copy() # Mutations occur due to caching enriched values. - - if validate: - exceptions: list[Exception] = [] - try: - metadata_version = ins.metadata_version - metadata_age = _VALID_METADATA_VERSIONS.index(metadata_version) - except InvalidMetadata as metadata_version_exc: - exceptions.append(metadata_version_exc) - metadata_version = None - - # Make sure to check for the fields that are present, the required - # fields (so their absence can be reported). - fields_to_check = frozenset(ins._raw) | _REQUIRED_ATTRS - # Remove fields that have already been checked. - fields_to_check -= {"metadata_version"} - - for key in fields_to_check: - try: - if metadata_version: - # Can't use getattr() as that triggers descriptor protocol which - # will fail due to no value for the instance argument. - try: - field_metadata_version = cls.__dict__[key].added - except KeyError: - exc = InvalidMetadata(key, f"unrecognized field: {key!r}") - exceptions.append(exc) - continue - field_age = _VALID_METADATA_VERSIONS.index( - field_metadata_version - ) - if field_age > metadata_age: - field = _RAW_TO_EMAIL_MAPPING[key] - exc = InvalidMetadata( - field, - f"{field} introduced in metadata version " - f"{field_metadata_version}, not {metadata_version}", - ) - exceptions.append(exc) - continue - getattr(ins, key) - except InvalidMetadata as exc: - exceptions.append(exc) - - if exceptions: - raise ExceptionGroup("invalid metadata", exceptions) - - return ins - - @classmethod - def from_email(cls, data: bytes | str, *, validate: bool = True) -> Metadata: - """Parse metadata from email headers. - - If *validate* is true, the metadata will be validated. All exceptions - related to validation will be gathered and raised as an :class:`ExceptionGroup`. - """ - raw, unparsed = parse_email(data) - - if validate: - exceptions: list[Exception] = [] - for unparsed_key in unparsed: - if unparsed_key in _EMAIL_TO_RAW_MAPPING: - message = f"{unparsed_key!r} has invalid data" - else: - message = f"unrecognized field: {unparsed_key!r}" - exceptions.append(InvalidMetadata(unparsed_key, message)) - - if exceptions: - raise ExceptionGroup("unparsed", exceptions) - - try: - return cls.from_raw(raw, validate=validate) - except ExceptionGroup as exc_group: - raise ExceptionGroup( - "invalid or unparsed metadata", exc_group.exceptions - ) from None - - metadata_version: _Validator[_MetadataVersion] = _Validator() - """:external:ref:`core-metadata-metadata-version` - (required; validated to be a valid metadata version)""" - # `name` is not normalized/typed to NormalizedName so as to provide access to - # the original/raw name. - name: _Validator[str] = _Validator() - """:external:ref:`core-metadata-name` - (required; validated using :func:`~packaging.utils.canonicalize_name` and its - *validate* parameter)""" - version: _Validator[version_module.Version] = _Validator() - """:external:ref:`core-metadata-version` (required)""" - dynamic: _Validator[list[str] | None] = _Validator( - added="2.2", - ) - """:external:ref:`core-metadata-dynamic` - (validated against core metadata field names and lowercased)""" - platforms: _Validator[list[str] | None] = _Validator() - """:external:ref:`core-metadata-platform`""" - supported_platforms: _Validator[list[str] | None] = _Validator(added="1.1") - """:external:ref:`core-metadata-supported-platform`""" - summary: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-summary` (validated to contain no newlines)""" - description: _Validator[str | None] = _Validator() # TODO 2.1: can be in body - """:external:ref:`core-metadata-description`""" - description_content_type: _Validator[str | None] = _Validator(added="2.1") - """:external:ref:`core-metadata-description-content-type` (validated)""" - keywords: _Validator[list[str] | None] = _Validator() - """:external:ref:`core-metadata-keywords`""" - home_page: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-home-page`""" - download_url: _Validator[str | None] = _Validator(added="1.1") - """:external:ref:`core-metadata-download-url`""" - author: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-author`""" - author_email: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-author-email`""" - maintainer: _Validator[str | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-maintainer`""" - maintainer_email: _Validator[str | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-maintainer-email`""" - license: _Validator[str | None] = _Validator() - """:external:ref:`core-metadata-license`""" - license_expression: _Validator[NormalizedLicenseExpression | None] = _Validator( - added="2.4" - ) - """:external:ref:`core-metadata-license-expression`""" - license_files: _Validator[list[str] | None] = _Validator(added="2.4") - """:external:ref:`core-metadata-license-file`""" - classifiers: _Validator[list[str] | None] = _Validator(added="1.1") - """:external:ref:`core-metadata-classifier`""" - requires_dist: _Validator[list[requirements.Requirement] | None] = _Validator( - added="1.2" - ) - """:external:ref:`core-metadata-requires-dist`""" - requires_python: _Validator[specifiers.SpecifierSet | None] = _Validator( - added="1.2" - ) - """:external:ref:`core-metadata-requires-python`""" - # Because `Requires-External` allows for non-PEP 440 version specifiers, we - # don't do any processing on the values. - requires_external: _Validator[list[str] | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-requires-external`""" - project_urls: _Validator[dict[str, str] | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-project-url`""" - # PEP 685 lets us raise an error if an extra doesn't pass `Name` validation - # regardless of metadata version. - provides_extra: _Validator[list[utils.NormalizedName] | None] = _Validator( - added="2.1", - ) - """:external:ref:`core-metadata-provides-extra`""" - provides_dist: _Validator[list[str] | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-provides-dist`""" - obsoletes_dist: _Validator[list[str] | None] = _Validator(added="1.2") - """:external:ref:`core-metadata-obsoletes-dist`""" - import_names: _Validator[list[str] | None] = _Validator(added="2.5") - """:external:ref:`core-metadata-import-name`""" - import_namespaces: _Validator[list[str] | None] = _Validator(added="2.5") - """:external:ref:`core-metadata-import-namespace`""" - requires: _Validator[list[str] | None] = _Validator(added="1.1") - """``Requires`` (deprecated)""" - provides: _Validator[list[str] | None] = _Validator(added="1.1") - """``Provides`` (deprecated)""" - obsoletes: _Validator[list[str] | None] = _Validator(added="1.1") - """``Obsoletes`` (deprecated)""" - - def as_rfc822(self) -> RFC822Message: - """ - Return an RFC822 message with the metadata. - """ - message = RFC822Message() - self._write_metadata(message) - return message - - def _write_metadata(self, message: RFC822Message) -> None: - """ - Return an RFC822 message with the metadata. - """ - for name, validator in self.__class__.__dict__.items(): - if isinstance(validator, _Validator) and name != "description": - value = getattr(self, name) - email_name = _RAW_TO_EMAIL_MAPPING[name] - if value is not None: - if email_name == "project-url": - for label, url in value.items(): - message[email_name] = f"{label}, {url}" - elif email_name == "keywords": - message[email_name] = ",".join(value) - elif email_name == "import-name" and value == []: - message[email_name] = "" - elif isinstance(value, list): - for item in value: - message[email_name] = str(item) - else: - message[email_name] = str(value) - - # The description is a special case because it is in the body of the message. - if self.description is not None: - message.set_payload(self.description) diff --git a/voxvera/vendor/setuptools/_vendor/packaging/py.typed b/voxvera/vendor/setuptools/_vendor/packaging/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/setuptools/_vendor/packaging/pylock.py b/voxvera/vendor/setuptools/_vendor/packaging/pylock.py deleted file mode 100644 index a564f15..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/pylock.py +++ /dev/null @@ -1,635 +0,0 @@ -from __future__ import annotations - -import dataclasses -import logging -import re -from collections.abc import Mapping, Sequence -from dataclasses import dataclass -from datetime import datetime -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Protocol, - TypeVar, -) - -from .markers import Marker -from .specifiers import SpecifierSet -from .utils import NormalizedName, is_normalized_name -from .version import Version - -if TYPE_CHECKING: # pragma: no cover - from pathlib import Path - - from typing_extensions import Self - -_logger = logging.getLogger(__name__) - -__all__ = [ - "Package", - "PackageArchive", - "PackageDirectory", - "PackageSdist", - "PackageVcs", - "PackageWheel", - "Pylock", - "PylockUnsupportedVersionError", - "PylockValidationError", - "is_valid_pylock_path", -] - -_T = TypeVar("_T") -_T2 = TypeVar("_T2") - - -class _FromMappingProtocol(Protocol): # pragma: no cover - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: ... - - -_FromMappingProtocolT = TypeVar("_FromMappingProtocolT", bound=_FromMappingProtocol) - - -_PYLOCK_FILE_NAME_RE = re.compile(r"^pylock\.([^.]+)\.toml$") - - -def is_valid_pylock_path(path: Path) -> bool: - """Check if the given path is a valid pylock file path.""" - return path.name == "pylock.toml" or bool(_PYLOCK_FILE_NAME_RE.match(path.name)) - - -def _toml_key(key: str) -> str: - return key.replace("_", "-") - - -def _toml_value(key: str, value: Any) -> Any: # noqa: ANN401 - if isinstance(value, (Version, Marker, SpecifierSet)): - return str(value) - if isinstance(value, Sequence) and key == "environments": - return [str(v) for v in value] - return value - - -def _toml_dict_factory(data: list[tuple[str, Any]]) -> dict[str, Any]: - return { - _toml_key(key): _toml_value(key, value) - for key, value in data - if value is not None - } - - -def _get(d: Mapping[str, Any], expected_type: type[_T], key: str) -> _T | None: - """Get a value from the dictionary and verify it's the expected type.""" - if (value := d.get(key)) is None: - return None - if not isinstance(value, expected_type): - raise PylockValidationError( - f"Unexpected type {type(value).__name__} " - f"(expected {expected_type.__name__})", - context=key, - ) - return value - - -def _get_required(d: Mapping[str, Any], expected_type: type[_T], key: str) -> _T: - """Get a required value from the dictionary and verify it's the expected type.""" - if (value := _get(d, expected_type, key)) is None: - raise _PylockRequiredKeyError(key) - return value - - -def _get_sequence( - d: Mapping[str, Any], expected_item_type: type[_T], key: str -) -> Sequence[_T] | None: - """Get a list value from the dictionary and verify it's the expected items type.""" - if (value := _get(d, Sequence, key)) is None: # type: ignore[type-abstract] - return None - if isinstance(value, (str, bytes)): - # special case: str and bytes are Sequences, but we want to reject it - raise PylockValidationError( - f"Unexpected type {type(value).__name__} (expected Sequence)", - context=key, - ) - for i, item in enumerate(value): - if not isinstance(item, expected_item_type): - raise PylockValidationError( - f"Unexpected type {type(item).__name__} " - f"(expected {expected_item_type.__name__})", - context=f"{key}[{i}]", - ) - return value - - -def _get_as( - d: Mapping[str, Any], - expected_type: type[_T], - target_type: Callable[[_T], _T2], - key: str, -) -> _T2 | None: - """Get a value from the dictionary, verify it's the expected type, - and convert to the target type. - - This assumes the target_type constructor accepts the value. - """ - if (value := _get(d, expected_type, key)) is None: - return None - try: - return target_type(value) - except Exception as e: - raise PylockValidationError(e, context=key) from e - - -def _get_required_as( - d: Mapping[str, Any], - expected_type: type[_T], - target_type: Callable[[_T], _T2], - key: str, -) -> _T2: - """Get a required value from the dict, verify it's the expected type, - and convert to the target type.""" - if (value := _get_as(d, expected_type, target_type, key)) is None: - raise _PylockRequiredKeyError(key) - return value - - -def _get_sequence_as( - d: Mapping[str, Any], - expected_item_type: type[_T], - target_item_type: Callable[[_T], _T2], - key: str, -) -> list[_T2] | None: - """Get list value from dictionary and verify expected items type.""" - if (value := _get_sequence(d, expected_item_type, key)) is None: - return None - result = [] - try: - for item in value: - typed_item = target_item_type(item) - result.append(typed_item) - except Exception as e: - raise PylockValidationError(e, context=f"{key}[{len(result)}]") from e - return result - - -def _get_object( - d: Mapping[str, Any], target_type: type[_FromMappingProtocolT], key: str -) -> _FromMappingProtocolT | None: - """Get a dictionary value from the dictionary and convert it to a dataclass.""" - if (value := _get(d, Mapping, key)) is None: # type: ignore[type-abstract] - return None - try: - return target_type._from_dict(value) - except Exception as e: - raise PylockValidationError(e, context=key) from e - - -def _get_sequence_of_objects( - d: Mapping[str, Any], target_item_type: type[_FromMappingProtocolT], key: str -) -> list[_FromMappingProtocolT] | None: - """Get a list value from the dictionary and convert its items to a dataclass.""" - if (value := _get_sequence(d, Mapping, key)) is None: # type: ignore[type-abstract] - return None - result: list[_FromMappingProtocolT] = [] - try: - for item in value: - typed_item = target_item_type._from_dict(item) - result.append(typed_item) - except Exception as e: - raise PylockValidationError(e, context=f"{key}[{len(result)}]") from e - return result - - -def _get_required_sequence_of_objects( - d: Mapping[str, Any], target_item_type: type[_FromMappingProtocolT], key: str -) -> Sequence[_FromMappingProtocolT]: - """Get a required list value from the dictionary and convert its items to a - dataclass.""" - if (result := _get_sequence_of_objects(d, target_item_type, key)) is None: - raise _PylockRequiredKeyError(key) - return result - - -def _validate_normalized_name(name: str) -> NormalizedName: - """Validate that a string is a NormalizedName.""" - if not is_normalized_name(name): - raise PylockValidationError(f"Name {name!r} is not normalized") - return NormalizedName(name) - - -def _validate_path_url(path: str | None, url: str | None) -> None: - if not path and not url: - raise PylockValidationError("path or url must be provided") - - -def _validate_hashes(hashes: Mapping[str, Any]) -> Mapping[str, Any]: - if not hashes: - raise PylockValidationError("At least one hash must be provided") - if not all(isinstance(hash_val, str) for hash_val in hashes.values()): - raise PylockValidationError("Hash values must be strings") - return hashes - - -class PylockValidationError(Exception): - """Raised when when input data is not spec-compliant.""" - - context: str | None = None - message: str - - def __init__( - self, - cause: str | Exception, - *, - context: str | None = None, - ) -> None: - if isinstance(cause, PylockValidationError): - if cause.context: - self.context = ( - f"{context}.{cause.context}" if context else cause.context - ) - else: - self.context = context - self.message = cause.message - else: - self.context = context - self.message = str(cause) - - def __str__(self) -> str: - if self.context: - return f"{self.message} in {self.context!r}" - return self.message - - -class _PylockRequiredKeyError(PylockValidationError): - def __init__(self, key: str) -> None: - super().__init__("Missing required value", context=key) - - -class PylockUnsupportedVersionError(PylockValidationError): - """Raised when encountering an unsupported `lock_version`.""" - - -@dataclass(frozen=True, init=False) -class PackageVcs: - type: str - url: str | None = None - path: str | None = None - requested_revision: str | None = None - commit_id: str # type: ignore[misc] - subdirectory: str | None = None - - def __init__( - self, - *, - type: str, - url: str | None = None, - path: str | None = None, - requested_revision: str | None = None, - commit_id: str, - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "type", type) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "requested_revision", requested_revision) - object.__setattr__(self, "commit_id", commit_id) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_vcs = cls( - type=_get_required(d, str, "type"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - requested_revision=_get(d, str, "requested-revision"), - commit_id=_get_required(d, str, "commit-id"), - subdirectory=_get(d, str, "subdirectory"), - ) - _validate_path_url(package_vcs.path, package_vcs.url) - return package_vcs - - -@dataclass(frozen=True, init=False) -class PackageDirectory: - path: str - editable: bool | None = None - subdirectory: str | None = None - - def __init__( - self, - *, - path: str, - editable: bool | None = None, - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "path", path) - object.__setattr__(self, "editable", editable) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - return cls( - path=_get_required(d, str, "path"), - editable=_get(d, bool, "editable"), - subdirectory=_get(d, str, "subdirectory"), - ) - - -@dataclass(frozen=True, init=False) -class PackageArchive: - url: str | None = None - path: str | None = None - size: int | None = None - upload_time: datetime | None = None - hashes: Mapping[str, str] # type: ignore[misc] - subdirectory: str | None = None - - def __init__( - self, - *, - url: str | None = None, - path: str | None = None, - size: int | None = None, - upload_time: datetime | None = None, - hashes: Mapping[str, str], - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "hashes", hashes) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_archive = cls( - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - upload_time=_get(d, datetime, "upload-time"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - subdirectory=_get(d, str, "subdirectory"), - ) - _validate_path_url(package_archive.path, package_archive.url) - return package_archive - - -@dataclass(frozen=True, init=False) -class PackageSdist: - name: str | None = None - upload_time: datetime | None = None - url: str | None = None - path: str | None = None - size: int | None = None - hashes: Mapping[str, str] # type: ignore[misc] - - def __init__( - self, - *, - name: str | None = None, - upload_time: datetime | None = None, - url: str | None = None, - path: str | None = None, - size: int | None = None, - hashes: Mapping[str, str], - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "hashes", hashes) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_sdist = cls( - name=_get(d, str, "name"), - upload_time=_get(d, datetime, "upload-time"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - ) - _validate_path_url(package_sdist.path, package_sdist.url) - return package_sdist - - -@dataclass(frozen=True, init=False) -class PackageWheel: - name: str | None = None - upload_time: datetime | None = None - url: str | None = None - path: str | None = None - size: int | None = None - hashes: Mapping[str, str] # type: ignore[misc] - - def __init__( - self, - *, - name: str | None = None, - upload_time: datetime | None = None, - url: str | None = None, - path: str | None = None, - size: int | None = None, - hashes: Mapping[str, str], - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "hashes", hashes) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_wheel = cls( - name=_get(d, str, "name"), - upload_time=_get(d, datetime, "upload-time"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - ) - _validate_path_url(package_wheel.path, package_wheel.url) - return package_wheel - - -@dataclass(frozen=True, init=False) -class Package: - name: NormalizedName - version: Version | None = None - marker: Marker | None = None - requires_python: SpecifierSet | None = None - dependencies: Sequence[Mapping[str, Any]] | None = None - vcs: PackageVcs | None = None - directory: PackageDirectory | None = None - archive: PackageArchive | None = None - index: str | None = None - sdist: PackageSdist | None = None - wheels: Sequence[PackageWheel] | None = None - attestation_identities: Sequence[Mapping[str, Any]] | None = None - tool: Mapping[str, Any] | None = None - - def __init__( - self, - *, - name: NormalizedName, - version: Version | None = None, - marker: Marker | None = None, - requires_python: SpecifierSet | None = None, - dependencies: Sequence[Mapping[str, Any]] | None = None, - vcs: PackageVcs | None = None, - directory: PackageDirectory | None = None, - archive: PackageArchive | None = None, - index: str | None = None, - sdist: PackageSdist | None = None, - wheels: Sequence[PackageWheel] | None = None, - attestation_identities: Sequence[Mapping[str, Any]] | None = None, - tool: Mapping[str, Any] | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "version", version) - object.__setattr__(self, "marker", marker) - object.__setattr__(self, "requires_python", requires_python) - object.__setattr__(self, "dependencies", dependencies) - object.__setattr__(self, "vcs", vcs) - object.__setattr__(self, "directory", directory) - object.__setattr__(self, "archive", archive) - object.__setattr__(self, "index", index) - object.__setattr__(self, "sdist", sdist) - object.__setattr__(self, "wheels", wheels) - object.__setattr__(self, "attestation_identities", attestation_identities) - object.__setattr__(self, "tool", tool) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package = cls( - name=_get_required_as(d, str, _validate_normalized_name, "name"), - version=_get_as(d, str, Version, "version"), - requires_python=_get_as(d, str, SpecifierSet, "requires-python"), - dependencies=_get_sequence(d, Mapping, "dependencies"), # type: ignore[type-abstract] - marker=_get_as(d, str, Marker, "marker"), - vcs=_get_object(d, PackageVcs, "vcs"), - directory=_get_object(d, PackageDirectory, "directory"), - archive=_get_object(d, PackageArchive, "archive"), - index=_get(d, str, "index"), - sdist=_get_object(d, PackageSdist, "sdist"), - wheels=_get_sequence_of_objects(d, PackageWheel, "wheels"), - attestation_identities=_get_sequence(d, Mapping, "attestation-identities"), # type: ignore[type-abstract] - tool=_get(d, Mapping, "tool"), # type: ignore[type-abstract] - ) - distributions = bool(package.sdist) + len(package.wheels or []) - direct_urls = ( - bool(package.vcs) + bool(package.directory) + bool(package.archive) - ) - if distributions > 0 and direct_urls > 0: - raise PylockValidationError( - "None of vcs, directory, archive must be set if sdist or wheels are set" - ) - if distributions == 0 and direct_urls != 1: - raise PylockValidationError( - "Exactly one of vcs, directory, archive must be set " - "if sdist and wheels are not set" - ) - try: - for i, attestation_identity in enumerate( # noqa: B007 - package.attestation_identities or [] - ): - _get_required(attestation_identity, str, "kind") - except Exception as e: - raise PylockValidationError( - e, context=f"attestation-identities[{i}]" - ) from e - return package - - @property - def is_direct(self) -> bool: - return not (self.sdist or self.wheels) - - -@dataclass(frozen=True, init=False) -class Pylock: - """A class representing a pylock file.""" - - lock_version: Version - environments: Sequence[Marker] | None = None - requires_python: SpecifierSet | None = None - extras: Sequence[NormalizedName] | None = None - dependency_groups: Sequence[str] | None = None - default_groups: Sequence[str] | None = None - created_by: str # type: ignore[misc] - packages: Sequence[Package] # type: ignore[misc] - tool: Mapping[str, Any] | None = None - - def __init__( - self, - *, - lock_version: Version, - environments: Sequence[Marker] | None = None, - requires_python: SpecifierSet | None = None, - extras: Sequence[NormalizedName] | None = None, - dependency_groups: Sequence[str] | None = None, - default_groups: Sequence[str] | None = None, - created_by: str, - packages: Sequence[Package], - tool: Mapping[str, Any] | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "lock_version", lock_version) - object.__setattr__(self, "environments", environments) - object.__setattr__(self, "requires_python", requires_python) - object.__setattr__(self, "extras", extras) - object.__setattr__(self, "dependency_groups", dependency_groups) - object.__setattr__(self, "default_groups", default_groups) - object.__setattr__(self, "created_by", created_by) - object.__setattr__(self, "packages", packages) - object.__setattr__(self, "tool", tool) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - pylock = cls( - lock_version=_get_required_as(d, str, Version, "lock-version"), - environments=_get_sequence_as(d, str, Marker, "environments"), - extras=_get_sequence_as(d, str, _validate_normalized_name, "extras"), - dependency_groups=_get_sequence(d, str, "dependency-groups"), - default_groups=_get_sequence(d, str, "default-groups"), - created_by=_get_required(d, str, "created-by"), - requires_python=_get_as(d, str, SpecifierSet, "requires-python"), - packages=_get_required_sequence_of_objects(d, Package, "packages"), - tool=_get(d, Mapping, "tool"), # type: ignore[type-abstract] - ) - if not Version("1") <= pylock.lock_version < Version("2"): - raise PylockUnsupportedVersionError( - f"pylock version {pylock.lock_version} is not supported" - ) - if pylock.lock_version > Version("1.0"): - _logger.warning( - "pylock minor version %s is not supported", pylock.lock_version - ) - return pylock - - @classmethod - def from_dict(cls, d: Mapping[str, Any], /) -> Self: - """Create and validate a Pylock instance from a TOML dictionary. - - Raises :class:`PylockValidationError` if the input data is not - spec-compliant. - """ - return cls._from_dict(d) - - def to_dict(self) -> Mapping[str, Any]: - """Convert the Pylock instance to a TOML dictionary.""" - return dataclasses.asdict(self, dict_factory=_toml_dict_factory) - - def validate(self) -> None: - """Validate the Pylock instance against the specification. - - Raises :class:`PylockValidationError` otherwise.""" - self.from_dict(self.to_dict()) diff --git a/voxvera/vendor/setuptools/_vendor/packaging/requirements.py b/voxvera/vendor/setuptools/_vendor/packaging/requirements.py deleted file mode 100644 index 3079be6..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/requirements.py +++ /dev/null @@ -1,86 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import annotations - -from typing import Iterator - -from ._parser import parse_requirement as _parse_requirement -from ._tokenizer import ParserSyntaxError -from .markers import Marker, _normalize_extra_values -from .specifiers import SpecifierSet -from .utils import canonicalize_name - - -class InvalidRequirement(ValueError): - """ - An invalid requirement was found, users should refer to PEP 508. - """ - - -class Requirement: - """Parse a requirement. - - Parse a given requirement string into its parts, such as name, specifier, - URL, and extras. Raises InvalidRequirement on a badly-formed requirement - string. - """ - - # TODO: Can we test whether something is contained within a requirement? - # If so how do we do that? Do we need to test against the _name_ of - # the thing as well as the version? What about the markers? - # TODO: Can we normalize the name and extra name? - - def __init__(self, requirement_string: str) -> None: - try: - parsed = _parse_requirement(requirement_string) - except ParserSyntaxError as e: - raise InvalidRequirement(str(e)) from e - - self.name: str = parsed.name - self.url: str | None = parsed.url or None - self.extras: set[str] = set(parsed.extras or []) - self.specifier: SpecifierSet = SpecifierSet(parsed.specifier) - self.marker: Marker | None = None - if parsed.marker is not None: - self.marker = Marker.__new__(Marker) - self.marker._markers = _normalize_extra_values(parsed.marker) - - def _iter_parts(self, name: str) -> Iterator[str]: - yield name - - if self.extras: - formatted_extras = ",".join(sorted(self.extras)) - yield f"[{formatted_extras}]" - - if self.specifier: - yield str(self.specifier) - - if self.url: - yield f" @ {self.url}" - if self.marker: - yield " " - - if self.marker: - yield f"; {self.marker}" - - def __str__(self) -> str: - return "".join(self._iter_parts(self.name)) - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}('{self}')>" - - def __hash__(self) -> int: - return hash(tuple(self._iter_parts(canonicalize_name(self.name)))) - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Requirement): - return NotImplemented - - return ( - canonicalize_name(self.name) == canonicalize_name(other.name) - and self.extras == other.extras - and self.specifier == other.specifier - and self.url == other.url - and self.marker == other.marker - ) diff --git a/voxvera/vendor/setuptools/_vendor/packaging/specifiers.py b/voxvera/vendor/setuptools/_vendor/packaging/specifiers.py deleted file mode 100644 index 5d26b0d..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/specifiers.py +++ /dev/null @@ -1,1068 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -""" -.. testsetup:: - - from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier - from packaging.version import Version -""" - -from __future__ import annotations - -import abc -import itertools -import re -from typing import Callable, Final, Iterable, Iterator, TypeVar, Union - -from .utils import canonicalize_version -from .version import InvalidVersion, Version - -UnparsedVersion = Union[Version, str] -UnparsedVersionVar = TypeVar("UnparsedVersionVar", bound=UnparsedVersion) -CallableOperator = Callable[[Version, str], bool] - - -def _coerce_version(version: UnparsedVersion) -> Version | None: - if not isinstance(version, Version): - try: - version = Version(version) - except InvalidVersion: - return None - return version - - -def _public_version(version: Version) -> Version: - return version.__replace__(local=None) - - -def _base_version(version: Version) -> Version: - return version.__replace__(pre=None, post=None, dev=None, local=None) - - -class InvalidSpecifier(ValueError): - """ - Raised when attempting to create a :class:`Specifier` with a specifier - string that is invalid. - - >>> Specifier("lolwat") - Traceback (most recent call last): - ... - packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat' - """ - - -class BaseSpecifier(metaclass=abc.ABCMeta): - __slots__ = () - __match_args__ = ("_str",) - - @property - def _str(self) -> str: - """Internal property for match_args""" - return str(self) - - @abc.abstractmethod - def __str__(self) -> str: - """ - Returns the str representation of this Specifier-like object. This - should be representative of the Specifier itself. - """ - - @abc.abstractmethod - def __hash__(self) -> int: - """ - Returns a hash value for this Specifier-like object. - """ - - @abc.abstractmethod - def __eq__(self, other: object) -> bool: - """ - Returns a boolean representing whether or not the two Specifier-like - objects are equal. - - :param other: The other object to check against. - """ - - @property - @abc.abstractmethod - def prereleases(self) -> bool | None: - """Whether or not pre-releases as a whole are allowed. - - This can be set to either ``True`` or ``False`` to explicitly enable or disable - prereleases or it can be set to ``None`` (the default) to use default semantics. - """ - - @prereleases.setter # noqa: B027 - def prereleases(self, value: bool) -> None: - """Setter for :attr:`prereleases`. - - :param value: The value to set. - """ - - @abc.abstractmethod - def contains(self, item: str, prereleases: bool | None = None) -> bool: - """ - Determines if the given item is contained within this specifier. - """ - - @abc.abstractmethod - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """ - Takes an iterable of items and filters them so that only items which - are contained within this specifier are allowed in it. - """ - - -class Specifier(BaseSpecifier): - """This class abstracts handling of version specifiers. - - .. tip:: - - It is generally not required to instantiate this manually. You should instead - prefer to work with :class:`SpecifierSet` instead, which can parse - comma-separated version specifiers (which is what package metadata contains). - """ - - __slots__ = ("_prereleases", "_spec", "_spec_version") - - _operator_regex_str = r""" - (?P(~=|==|!=|<=|>=|<|>|===)) - """ - _version_regex_str = r""" - (?P - (?: - # The identity operators allow for an escape hatch that will - # do an exact string match of the version you wish to install. - # This will not be parsed by PEP 440 and we cannot determine - # any semantic meaning from it. This operator is discouraged - # but included entirely as an escape hatch. - (?<====) # Only match for the identity operator - \s* - [^\s;)]* # The arbitrary version can be just about anything, - # we match everything except for whitespace, a - # semi-colon for marker support, and a closing paren - # since versions can be enclosed in them. - ) - | - (?: - # The (non)equality operators allow for wild card and local - # versions to be specified so we have to define these two - # operators separately to enable that. - (?<===|!=) # Only match for equals and not equals - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)* # release - - # You cannot use a wild card and a pre-release, post-release, a dev or - # local version together so group them with a | and make them optional. - (?: - \.\* # Wild card syntax of .* - | - (?: # pre release - [-_\.]? - (alpha|beta|preview|pre|a|b|c|rc) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local - )? - ) - | - (?: - # The compatible operator requires at least two digits in the - # release segment. - (?<=~=) # Only match for the compatible operator - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) - (?: # pre release - [-_\.]? - (alpha|beta|preview|pre|a|b|c|rc) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - ) - | - (?: - # All other operators only allow a sub set of what the - # (non)equality operators do. Specifically they do not allow - # local versions to be specified nor do they allow the prefix - # matching wild cards. - (?=": "greater_than_equal", - "<": "less_than", - ">": "greater_than", - "===": "arbitrary", - } - - def __init__(self, spec: str = "", prereleases: bool | None = None) -> None: - """Initialize a Specifier instance. - - :param spec: - The string representation of a specifier which will be parsed and - normalized before use. - :param prereleases: - This tells the specifier if it should accept prerelease versions if - applicable or not. The default of ``None`` will autodetect it from the - given specifiers. - :raises InvalidSpecifier: - If the given specifier is invalid (i.e. bad syntax). - """ - match = self._regex.fullmatch(spec) - if not match: - raise InvalidSpecifier(f"Invalid specifier: {spec!r}") - - self._spec: tuple[str, str] = ( - match.group("operator").strip(), - match.group("version").strip(), - ) - - # Store whether or not this Specifier should accept prereleases - self._prereleases = prereleases - - # Specifier version cache - self._spec_version: tuple[str, Version] | None = None - - def _get_spec_version(self, version: str) -> Version | None: - """One element cache, as only one spec Version is needed per Specifier.""" - if self._spec_version is not None and self._spec_version[0] == version: - return self._spec_version[1] - - version_specifier = _coerce_version(version) - if version_specifier is None: - return None - - self._spec_version = (version, version_specifier) - return version_specifier - - def _require_spec_version(self, version: str) -> Version: - """Get spec version, asserting it's valid (not for === operator). - - This method should only be called for operators where version - strings are guaranteed to be valid PEP 440 versions (not ===). - """ - spec_version = self._get_spec_version(version) - assert spec_version is not None - return spec_version - - @property - def prereleases(self) -> bool | None: - # If there is an explicit prereleases set for this, then we'll just - # blindly use that. - if self._prereleases is not None: - return self._prereleases - - # Only the "!=" operator does not imply prereleases when - # the version in the specifier is a prerelease. - operator, version_str = self._spec - if operator != "!=": - # The == specifier with trailing .* cannot include prereleases - # e.g. "==1.0a1.*" is not valid. - if operator == "==" and version_str.endswith(".*"): - return False - - # "===" can have arbitrary string versions, so we cannot parse - # those, we take prereleases as unknown (None) for those. - version = self._get_spec_version(version_str) - if version is None: - return None - - # For all other operators, use the check if spec Version - # object implies pre-releases. - if version.is_prerelease: - return True - - return False - - @prereleases.setter - def prereleases(self, value: bool | None) -> None: - self._prereleases = value - - @property - def operator(self) -> str: - """The operator of this specifier. - - >>> Specifier("==1.2.3").operator - '==' - """ - return self._spec[0] - - @property - def version(self) -> str: - """The version of this specifier. - - >>> Specifier("==1.2.3").version - '1.2.3' - """ - return self._spec[1] - - def __repr__(self) -> str: - """A representation of the Specifier that shows all internal state. - - >>> Specifier('>=1.0.0') - =1.0.0')> - >>> Specifier('>=1.0.0', prereleases=False) - =1.0.0', prereleases=False)> - >>> Specifier('>=1.0.0', prereleases=True) - =1.0.0', prereleases=True)> - """ - pre = ( - f", prereleases={self.prereleases!r}" - if self._prereleases is not None - else "" - ) - - return f"<{self.__class__.__name__}({str(self)!r}{pre})>" - - def __str__(self) -> str: - """A string representation of the Specifier that can be round-tripped. - - >>> str(Specifier('>=1.0.0')) - '>=1.0.0' - >>> str(Specifier('>=1.0.0', prereleases=False)) - '>=1.0.0' - """ - return "{}{}".format(*self._spec) - - @property - def _canonical_spec(self) -> tuple[str, str]: - operator, version = self._spec - if operator == "===" or version.endswith(".*"): - return operator, version - - spec_version = self._require_spec_version(version) - - canonical_version = canonicalize_version( - spec_version, strip_trailing_zero=(operator != "~=") - ) - - return operator, canonical_version - - def __hash__(self) -> int: - return hash(self._canonical_spec) - - def __eq__(self, other: object) -> bool: - """Whether or not the two Specifier-like objects are equal. - - :param other: The other object to check against. - - The value of :attr:`prereleases` is ignored. - - >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0") - True - >>> (Specifier("==1.2.3", prereleases=False) == - ... Specifier("==1.2.3", prereleases=True)) - True - >>> Specifier("==1.2.3") == "==1.2.3" - True - >>> Specifier("==1.2.3") == Specifier("==1.2.4") - False - >>> Specifier("==1.2.3") == Specifier("~=1.2.3") - False - """ - if isinstance(other, str): - try: - other = self.__class__(str(other)) - except InvalidSpecifier: - return NotImplemented - elif not isinstance(other, self.__class__): - return NotImplemented - - return self._canonical_spec == other._canonical_spec - - def _get_operator(self, op: str) -> CallableOperator: - operator_callable: CallableOperator = getattr( - self, f"_compare_{self._operators[op]}" - ) - return operator_callable - - def _compare_compatible(self, prospective: Version, spec: str) -> bool: - # Compatible releases have an equivalent combination of >= and ==. That - # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to - # implement this in terms of the other specifiers instead of - # implementing it ourselves. The only thing we need to do is construct - # the other specifiers. - - # We want everything but the last item in the version, but we want to - # ignore suffix segments. - prefix = _version_join( - list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1] - ) - - # Add the prefix notation to the end of our string - prefix += ".*" - - return self._get_operator(">=")(prospective, spec) and self._get_operator("==")( - prospective, prefix - ) - - def _compare_equal(self, prospective: Version, spec: str) -> bool: - # We need special logic to handle prefix matching - if spec.endswith(".*"): - # In the case of prefix matching we want to ignore local segment. - normalized_prospective = canonicalize_version( - _public_version(prospective), strip_trailing_zero=False - ) - # Get the normalized version string ignoring the trailing .* - normalized_spec = canonicalize_version(spec[:-2], strip_trailing_zero=False) - # Split the spec out by bangs and dots, and pretend that there is - # an implicit dot in between a release segment and a pre-release segment. - split_spec = _version_split(normalized_spec) - - # Split the prospective version out by bangs and dots, and pretend - # that there is an implicit dot in between a release segment and - # a pre-release segment. - split_prospective = _version_split(normalized_prospective) - - # 0-pad the prospective version before shortening it to get the correct - # shortened version. - padded_prospective, _ = _pad_version(split_prospective, split_spec) - - # Shorten the prospective version to be the same length as the spec - # so that we can determine if the specifier is a prefix of the - # prospective version or not. - shortened_prospective = padded_prospective[: len(split_spec)] - - return shortened_prospective == split_spec - else: - # Convert our spec string into a Version - spec_version = self._require_spec_version(spec) - - # If the specifier does not have a local segment, then we want to - # act as if the prospective version also does not have a local - # segment. - if not spec_version.local: - prospective = _public_version(prospective) - - return prospective == spec_version - - def _compare_not_equal(self, prospective: Version, spec: str) -> bool: - return not self._compare_equal(prospective, spec) - - def _compare_less_than_equal(self, prospective: Version, spec: str) -> bool: - # NB: Local version identifiers are NOT permitted in the version - # specifier, so local version labels can be universally removed from - # the prospective version. - return _public_version(prospective) <= self._require_spec_version(spec) - - def _compare_greater_than_equal(self, prospective: Version, spec: str) -> bool: - # NB: Local version identifiers are NOT permitted in the version - # specifier, so local version labels can be universally removed from - # the prospective version. - return _public_version(prospective) >= self._require_spec_version(spec) - - def _compare_less_than(self, prospective: Version, spec_str: str) -> bool: - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = self._require_spec_version(spec_str) - - # Check to see if the prospective version is less than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective < spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a pre-release version, that we do not accept pre-release - # versions for the version mentioned in the specifier (e.g. <3.1 should - # not match 3.1.dev0, but should match 3.0.dev0). - if ( - not spec.is_prerelease - and prospective.is_prerelease - and _base_version(prospective) == _base_version(spec) - ): - return False - - # If we've gotten to here, it means that prospective version is both - # less than the spec version *and* it's not a pre-release of the same - # version in the spec. - return True - - def _compare_greater_than(self, prospective: Version, spec_str: str) -> bool: - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = self._require_spec_version(spec_str) - - # Check to see if the prospective version is greater than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective > spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a post-release version, that we do not accept - # post-release versions for the version mentioned in the specifier - # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). - if ( - not spec.is_postrelease - and prospective.is_postrelease - and _base_version(prospective) == _base_version(spec) - ): - return False - - # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is technically greater than, to match. - if prospective.local is not None and _base_version( - prospective - ) == _base_version(spec): - return False - - # If we've gotten to here, it means that prospective version is both - # greater than the spec version *and* it's not a pre-release of the - # same version in the spec. - return True - - def _compare_arbitrary(self, prospective: Version | str, spec: str) -> bool: - return str(prospective).lower() == str(spec).lower() - - def __contains__(self, item: str | Version) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: The item to check for. - - This is used for the ``in`` operator and behaves the same as - :meth:`contains` with no ``prereleases`` argument passed. - - >>> "1.2.3" in Specifier(">=1.2.3") - True - >>> Version("1.2.3") in Specifier(">=1.2.3") - True - >>> "1.0.0" in Specifier(">=1.2.3") - False - >>> "1.3.0a1" in Specifier(">=1.2.3") - True - >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True) - True - """ - return self.contains(item) - - def contains(self, item: UnparsedVersion, prereleases: bool | None = None) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: - The item to check for, which can be a version string or a - :class:`Version` instance. - :param prereleases: - Whether or not to match prereleases with this Specifier. If set to - ``None`` (the default), it will follow the recommendation from - :pep:`440` and match prereleases, as there are no other versions. - - >>> Specifier(">=1.2.3").contains("1.2.3") - True - >>> Specifier(">=1.2.3").contains(Version("1.2.3")) - True - >>> Specifier(">=1.2.3").contains("1.0.0") - False - >>> Specifier(">=1.2.3").contains("1.3.0a1") - True - >>> Specifier(">=1.2.3", prereleases=False).contains("1.3.0a1") - False - >>> Specifier(">=1.2.3").contains("1.3.0a1") - True - """ - - return bool(list(self.filter([item], prereleases=prereleases))) - - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """Filter items in the given iterable, that match the specifier. - - :param iterable: - An iterable that can contain version strings and :class:`Version` instances. - The items in the iterable will be filtered according to the specifier. - :param prereleases: - Whether or not to allow prereleases in the returned iterator. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases if there are no other versions. - - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) - ['1.3'] - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")])) - ['1.2.3', '1.3', ] - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"])) - ['1.5a1'] - >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - """ - prereleases_versions = [] - found_non_prereleases = False - - # Determine if to include prereleases by default - include_prereleases = ( - prereleases if prereleases is not None else self.prereleases - ) - - # Get the matching operator - operator_callable = self._get_operator(self.operator) - - # Filter versions - for version in iterable: - parsed_version = _coerce_version(version) - if parsed_version is None: - # === operator can match arbitrary (non-version) strings - if self.operator == "===" and self._compare_arbitrary( - version, self.version - ): - yield version - elif operator_callable(parsed_version, self.version): - # If it's not a prerelease or prereleases are allowed, yield it directly - if not parsed_version.is_prerelease or include_prereleases: - found_non_prereleases = True - yield version - # Otherwise collect prereleases for potential later use - elif prereleases is None and self._prereleases is not False: - prereleases_versions.append(version) - - # If no non-prereleases were found and prereleases weren't - # explicitly forbidden, yield the collected prereleases - if ( - not found_non_prereleases - and prereleases is None - and self._prereleases is not False - ): - yield from prereleases_versions - - -_prefix_regex = re.compile(r"([0-9]+)((?:a|b|c|rc)[0-9]+)") - - -def _version_split(version: str) -> list[str]: - """Split version into components. - - The split components are intended for version comparison. The logic does - not attempt to retain the original version string, so joining the - components back with :func:`_version_join` may not produce the original - version string. - """ - result: list[str] = [] - - epoch, _, rest = version.rpartition("!") - result.append(epoch or "0") - - for item in rest.split("."): - match = _prefix_regex.fullmatch(item) - if match: - result.extend(match.groups()) - else: - result.append(item) - return result - - -def _version_join(components: list[str]) -> str: - """Join split version components into a version string. - - This function assumes the input came from :func:`_version_split`, where the - first component must be the epoch (either empty or numeric), and all other - components numeric. - """ - epoch, *rest = components - return f"{epoch}!{'.'.join(rest)}" - - -def _is_not_suffix(segment: str) -> bool: - return not any( - segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post") - ) - - -def _pad_version(left: list[str], right: list[str]) -> tuple[list[str], list[str]]: - left_split, right_split = [], [] - - # Get the release segment of our versions - left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) - right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) - - # Get the rest of our versions - left_split.append(left[len(left_split[0]) :]) - right_split.append(right[len(right_split[0]) :]) - - # Insert our padding - left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0]))) - right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0]))) - - return ( - list(itertools.chain.from_iterable(left_split)), - list(itertools.chain.from_iterable(right_split)), - ) - - -class SpecifierSet(BaseSpecifier): - """This class abstracts handling of a set of version specifiers. - - It can be passed a single specifier (``>=3.0``), a comma-separated list of - specifiers (``>=3.0,!=3.1``), or no specifier at all. - """ - - __slots__ = ("_prereleases", "_specs") - - def __init__( - self, - specifiers: str | Iterable[Specifier] = "", - prereleases: bool | None = None, - ) -> None: - """Initialize a SpecifierSet instance. - - :param specifiers: - The string representation of a specifier or a comma-separated list of - specifiers which will be parsed and normalized before use. - May also be an iterable of ``Specifier`` instances, which will be used - as is. - :param prereleases: - This tells the SpecifierSet if it should accept prerelease versions if - applicable or not. The default of ``None`` will autodetect it from the - given specifiers. - - :raises InvalidSpecifier: - If the given ``specifiers`` are not parseable than this exception will be - raised. - """ - - if isinstance(specifiers, str): - # Split on `,` to break each individual specifier into its own item, and - # strip each item to remove leading/trailing whitespace. - split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] - - # Make each individual specifier a Specifier and save in a frozen set - # for later. - self._specs = frozenset(map(Specifier, split_specifiers)) - else: - # Save the supplied specifiers in a frozen set. - self._specs = frozenset(specifiers) - - # Store our prereleases value so we can use it later to determine if - # we accept prereleases or not. - self._prereleases = prereleases - - @property - def prereleases(self) -> bool | None: - # If we have been given an explicit prerelease modifier, then we'll - # pass that through here. - if self._prereleases is not None: - return self._prereleases - - # If we don't have any specifiers, and we don't have a forced value, - # then we'll just return None since we don't know if this should have - # pre-releases or not. - if not self._specs: - return None - - # Otherwise we'll see if any of the given specifiers accept - # prereleases, if any of them do we'll return True, otherwise False. - if any(s.prereleases for s in self._specs): - return True - - return None - - @prereleases.setter - def prereleases(self, value: bool | None) -> None: - self._prereleases = value - - def __repr__(self) -> str: - """A representation of the specifier set that shows all internal state. - - Note that the ordering of the individual specifiers within the set may not - match the input string. - - >>> SpecifierSet('>=1.0.0,!=2.0.0') - =1.0.0')> - >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False) - =1.0.0', prereleases=False)> - >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True) - =1.0.0', prereleases=True)> - """ - pre = ( - f", prereleases={self.prereleases!r}" - if self._prereleases is not None - else "" - ) - - return f"" - - def __str__(self) -> str: - """A string representation of the specifier set that can be round-tripped. - - Note that the ordering of the individual specifiers within the set may not - match the input string. - - >>> str(SpecifierSet(">=1.0.0,!=1.0.1")) - '!=1.0.1,>=1.0.0' - >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False)) - '!=1.0.1,>=1.0.0' - """ - return ",".join(sorted(str(s) for s in self._specs)) - - def __hash__(self) -> int: - return hash(self._specs) - - def __and__(self, other: SpecifierSet | str) -> SpecifierSet: - """Return a SpecifierSet which is a combination of the two sets. - - :param other: The other object to combine with. - - >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1' - =1.0.0')> - >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1') - =1.0.0')> - """ - if isinstance(other, str): - other = SpecifierSet(other) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - specifier = SpecifierSet() - specifier._specs = frozenset(self._specs | other._specs) - - if self._prereleases is None and other._prereleases is not None: - specifier._prereleases = other._prereleases - elif ( - self._prereleases is not None and other._prereleases is None - ) or self._prereleases == other._prereleases: - specifier._prereleases = self._prereleases - else: - raise ValueError( - "Cannot combine SpecifierSets with True and False prerelease overrides." - ) - - return specifier - - def __eq__(self, other: object) -> bool: - """Whether or not the two SpecifierSet-like objects are equal. - - :param other: The other object to check against. - - The value of :attr:`prereleases` is ignored. - - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) == - ... SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)) - True - >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1" - True - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2") - False - """ - if isinstance(other, (str, Specifier)): - other = SpecifierSet(str(other)) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - return self._specs == other._specs - - def __len__(self) -> int: - """Returns the number of specifiers in this specifier set.""" - return len(self._specs) - - def __iter__(self) -> Iterator[Specifier]: - """ - Returns an iterator over all the underlying :class:`Specifier` instances - in this specifier set. - - >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str) - [, =1.0.0')>] - """ - return iter(self._specs) - - def __contains__(self, item: UnparsedVersion) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: The item to check for. - - This is used for the ``in`` operator and behaves the same as - :meth:`contains` with no ``prereleases`` argument passed. - - >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1") - False - >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True) - True - """ - return self.contains(item) - - def contains( - self, - item: UnparsedVersion, - prereleases: bool | None = None, - installed: bool | None = None, - ) -> bool: - """Return whether or not the item is contained in this SpecifierSet. - - :param item: - The item to check for, which can be a version string or a - :class:`Version` instance. - :param prereleases: - Whether or not to match prereleases with this SpecifierSet. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases, as there are no other versions. - :param installed: - Whether or not the item is installed. If set to ``True``, it will - accept prerelease versions even if the specifier does not allow them. - - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3") - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3")) - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1") - True - >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False).contains("1.3.0a1") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True) - True - """ - version = _coerce_version(item) - - if version is not None and installed and version.is_prerelease: - prereleases = True - - check_item = item if version is None else version - return bool(list(self.filter([check_item], prereleases=prereleases))) - - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """Filter items in the given iterable, that match the specifiers in this set. - - :param iterable: - An iterable that can contain version strings and :class:`Version` instances. - The items in the iterable will be filtered according to the specifier. - :param prereleases: - Whether or not to allow prereleases in the returned iterator. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases if there are no other versions. - - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) - ['1.3'] - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")])) - ['1.3', ] - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"])) - ['1.5a1'] - >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - - An "empty" SpecifierSet will filter items based on the presence of prerelease - versions in the set. - - >>> list(SpecifierSet("").filter(["1.3", "1.5a1"])) - ['1.3'] - >>> list(SpecifierSet("").filter(["1.5a1"])) - ['1.5a1'] - >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - """ - # Determine if we're forcing a prerelease or not, if we're not forcing - # one for this particular filter call, then we'll use whatever the - # SpecifierSet thinks for whether or not we should support prereleases. - if prereleases is None and self.prereleases is not None: - prereleases = self.prereleases - - # If we have any specifiers, then we want to wrap our iterable in the - # filter method for each one, this will act as a logical AND amongst - # each specifier. - if self._specs: - # When prereleases is None, we need to let all versions through - # the individual filters, then decide about prereleases at the end - # based on whether any non-prereleases matched ALL specs. - for spec in self._specs: - iterable = spec.filter( - iterable, prereleases=True if prereleases is None else prereleases - ) - - if prereleases is not None: - # If we have a forced prereleases value, - # we can immediately return the iterator. - return iter(iterable) - else: - # Handle empty SpecifierSet cases where prereleases is not None. - if prereleases is True: - return iter(iterable) - - if prereleases is False: - return ( - item - for item in iterable - if (version := _coerce_version(item)) is None - or not version.is_prerelease - ) - - # Finally if prereleases is None, apply PEP 440 logic: - # exclude prereleases unless there are no final releases that matched. - filtered_items: list[UnparsedVersionVar] = [] - found_prereleases: list[UnparsedVersionVar] = [] - found_final_release = False - - for item in iterable: - parsed_version = _coerce_version(item) - # Arbitrary strings are always included as it is not - # possible to determine if they are prereleases, - # and they have already passed all specifiers. - if parsed_version is None: - filtered_items.append(item) - found_prereleases.append(item) - elif parsed_version.is_prerelease: - found_prereleases.append(item) - else: - filtered_items.append(item) - found_final_release = True - - return iter(filtered_items if found_final_release else found_prereleases) diff --git a/voxvera/vendor/setuptools/_vendor/packaging/tags.py b/voxvera/vendor/setuptools/_vendor/packaging/tags.py deleted file mode 100644 index 5ef27c8..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/tags.py +++ /dev/null @@ -1,651 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import logging -import platform -import re -import struct -import subprocess -import sys -import sysconfig -from importlib.machinery import EXTENSION_SUFFIXES -from typing import ( - Any, - Iterable, - Iterator, - Sequence, - Tuple, - cast, -) - -from . import _manylinux, _musllinux - -logger = logging.getLogger(__name__) - -PythonVersion = Sequence[int] -AppleVersion = Tuple[int, int] - -INTERPRETER_SHORT_NAMES: dict[str, str] = { - "python": "py", # Generic. - "cpython": "cp", - "pypy": "pp", - "ironpython": "ip", - "jython": "jy", -} - - -_32_BIT_INTERPRETER = struct.calcsize("P") == 4 - - -class Tag: - """ - A representation of the tag triple for a wheel. - - Instances are considered immutable and thus are hashable. Equality checking - is also supported. - """ - - __slots__ = ["_abi", "_hash", "_interpreter", "_platform"] - - def __init__(self, interpreter: str, abi: str, platform: str) -> None: - self._interpreter = interpreter.lower() - self._abi = abi.lower() - self._platform = platform.lower() - # The __hash__ of every single element in a Set[Tag] will be evaluated each time - # that a set calls its `.disjoint()` method, which may be called hundreds of - # times when scanning a page of links for packages with tags matching that - # Set[Tag]. Pre-computing the value here produces significant speedups for - # downstream consumers. - self._hash = hash((self._interpreter, self._abi, self._platform)) - - @property - def interpreter(self) -> str: - return self._interpreter - - @property - def abi(self) -> str: - return self._abi - - @property - def platform(self) -> str: - return self._platform - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Tag): - return NotImplemented - - return ( - (self._hash == other._hash) # Short-circuit ASAP for perf reasons. - and (self._platform == other._platform) - and (self._abi == other._abi) - and (self._interpreter == other._interpreter) - ) - - def __hash__(self) -> int: - return self._hash - - def __str__(self) -> str: - return f"{self._interpreter}-{self._abi}-{self._platform}" - - def __repr__(self) -> str: - return f"<{self} @ {id(self)}>" - - def __setstate__(self, state: tuple[None, dict[str, Any]]) -> None: - # The cached _hash is wrong when unpickling. - _, slots = state - for k, v in slots.items(): - setattr(self, k, v) - self._hash = hash((self._interpreter, self._abi, self._platform)) - - -def parse_tag(tag: str) -> frozenset[Tag]: - """ - Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances. - - Returning a set is required due to the possibility that the tag is a - compressed tag set. - """ - tags = set() - interpreters, abis, platforms = tag.split("-") - for interpreter in interpreters.split("."): - for abi in abis.split("."): - for platform_ in platforms.split("."): - tags.add(Tag(interpreter, abi, platform_)) - return frozenset(tags) - - -def _get_config_var(name: str, warn: bool = False) -> int | str | None: - value: int | str | None = sysconfig.get_config_var(name) - if value is None and warn: - logger.debug( - "Config variable '%s' is unset, Python ABI tag may be incorrect", name - ) - return value - - -def _normalize_string(string: str) -> str: - return string.replace(".", "_").replace("-", "_").replace(" ", "_") - - -def _is_threaded_cpython(abis: list[str]) -> bool: - """ - Determine if the ABI corresponds to a threaded (`--disable-gil`) build. - - The threaded builds are indicated by a "t" in the abiflags. - """ - if len(abis) == 0: - return False - # expect e.g., cp313 - m = re.match(r"cp\d+(.*)", abis[0]) - if not m: - return False - abiflags = m.group(1) - return "t" in abiflags - - -def _abi3_applies(python_version: PythonVersion, threading: bool) -> bool: - """ - Determine if the Python version supports abi3. - - PEP 384 was first implemented in Python 3.2. The threaded (`--disable-gil`) - builds do not support abi3. - """ - return len(python_version) > 1 and tuple(python_version) >= (3, 2) and not threading - - -def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> list[str]: - py_version = tuple(py_version) # To allow for version comparison. - abis = [] - version = _version_nodot(py_version[:2]) - threading = debug = pymalloc = ucs4 = "" - with_debug = _get_config_var("Py_DEBUG", warn) - has_refcount = hasattr(sys, "gettotalrefcount") - # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled - # extension modules is the best option. - # https://github.com/pypa/pip/issues/3383#issuecomment-173267692 - has_ext = "_d.pyd" in EXTENSION_SUFFIXES - if with_debug or (with_debug is None and (has_refcount or has_ext)): - debug = "d" - if py_version >= (3, 13) and _get_config_var("Py_GIL_DISABLED", warn): - threading = "t" - if py_version < (3, 8): - with_pymalloc = _get_config_var("WITH_PYMALLOC", warn) - if with_pymalloc or with_pymalloc is None: - pymalloc = "m" - if py_version < (3, 3): - unicode_size = _get_config_var("Py_UNICODE_SIZE", warn) - if unicode_size == 4 or ( - unicode_size is None and sys.maxunicode == 0x10FFFF - ): - ucs4 = "u" - elif debug: - # Debug builds can also load "normal" extension modules. - # We can also assume no UCS-4 or pymalloc requirement. - abis.append(f"cp{version}{threading}") - abis.insert(0, f"cp{version}{threading}{debug}{pymalloc}{ucs4}") - return abis - - -def cpython_tags( - python_version: PythonVersion | None = None, - abis: Iterable[str] | None = None, - platforms: Iterable[str] | None = None, - *, - warn: bool = False, -) -> Iterator[Tag]: - """ - Yields the tags for a CPython interpreter. - - The tags consist of: - - cp-- - - cp-abi3- - - cp-none- - - cp-abi3- # Older Python versions down to 3.2. - - If python_version only specifies a major version then user-provided ABIs and - the 'none' ABItag will be used. - - If 'abi3' or 'none' are specified in 'abis' then they will be yielded at - their normal position and not at the beginning. - """ - if not python_version: - python_version = sys.version_info[:2] - - interpreter = f"cp{_version_nodot(python_version[:2])}" - - if abis is None: - abis = _cpython_abis(python_version, warn) if len(python_version) > 1 else [] - abis = list(abis) - # 'abi3' and 'none' are explicitly handled later. - for explicit_abi in ("abi3", "none"): - try: - abis.remove(explicit_abi) - except ValueError: # noqa: PERF203 - pass - - platforms = list(platforms or platform_tags()) - for abi in abis: - for platform_ in platforms: - yield Tag(interpreter, abi, platform_) - - threading = _is_threaded_cpython(abis) - use_abi3 = _abi3_applies(python_version, threading) - if use_abi3: - yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms) - yield from (Tag(interpreter, "none", platform_) for platform_ in platforms) - - if use_abi3: - for minor_version in range(python_version[1] - 1, 1, -1): - for platform_ in platforms: - version = _version_nodot((python_version[0], minor_version)) - interpreter = f"cp{version}" - yield Tag(interpreter, "abi3", platform_) - - -def _generic_abi() -> list[str]: - """ - Return the ABI tag based on EXT_SUFFIX. - """ - # The following are examples of `EXT_SUFFIX`. - # We want to keep the parts which are related to the ABI and remove the - # parts which are related to the platform: - # - linux: '.cpython-310-x86_64-linux-gnu.so' => cp310 - # - mac: '.cpython-310-darwin.so' => cp310 - # - win: '.cp310-win_amd64.pyd' => cp310 - # - win: '.pyd' => cp37 (uses _cpython_abis()) - # - pypy: '.pypy38-pp73-x86_64-linux-gnu.so' => pypy38_pp73 - # - graalpy: '.graalpy-38-native-x86_64-darwin.dylib' - # => graalpy_38_native - - ext_suffix = _get_config_var("EXT_SUFFIX", warn=True) - if not isinstance(ext_suffix, str) or ext_suffix[0] != ".": - raise SystemError("invalid sysconfig.get_config_var('EXT_SUFFIX')") - parts = ext_suffix.split(".") - if len(parts) < 3: - # CPython3.7 and earlier uses ".pyd" on Windows. - return _cpython_abis(sys.version_info[:2]) - soabi = parts[1] - if soabi.startswith("cpython"): - # non-windows - abi = "cp" + soabi.split("-")[1] - elif soabi.startswith("cp"): - # windows - abi = soabi.split("-")[0] - elif soabi.startswith("pypy"): - abi = "-".join(soabi.split("-")[:2]) - elif soabi.startswith("graalpy"): - abi = "-".join(soabi.split("-")[:3]) - elif soabi: - # pyston, ironpython, others? - abi = soabi - else: - return [] - return [_normalize_string(abi)] - - -def generic_tags( - interpreter: str | None = None, - abis: Iterable[str] | None = None, - platforms: Iterable[str] | None = None, - *, - warn: bool = False, -) -> Iterator[Tag]: - """ - Yields the tags for a generic interpreter. - - The tags consist of: - - -- - - The "none" ABI will be added if it was not explicitly provided. - """ - if not interpreter: - interp_name = interpreter_name() - interp_version = interpreter_version(warn=warn) - interpreter = f"{interp_name}{interp_version}" - abis = _generic_abi() if abis is None else list(abis) - platforms = list(platforms or platform_tags()) - if "none" not in abis: - abis.append("none") - for abi in abis: - for platform_ in platforms: - yield Tag(interpreter, abi, platform_) - - -def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]: - """ - Yields Python versions in descending order. - - After the latest version, the major-only version will be yielded, and then - all previous versions of that major version. - """ - if len(py_version) > 1: - yield f"py{_version_nodot(py_version[:2])}" - yield f"py{py_version[0]}" - if len(py_version) > 1: - for minor in range(py_version[1] - 1, -1, -1): - yield f"py{_version_nodot((py_version[0], minor))}" - - -def compatible_tags( - python_version: PythonVersion | None = None, - interpreter: str | None = None, - platforms: Iterable[str] | None = None, -) -> Iterator[Tag]: - """ - Yields the sequence of tags that are compatible with a specific version of Python. - - The tags consist of: - - py*-none- - - -none-any # ... if `interpreter` is provided. - - py*-none-any - """ - if not python_version: - python_version = sys.version_info[:2] - platforms = list(platforms or platform_tags()) - for version in _py_interpreter_range(python_version): - for platform_ in platforms: - yield Tag(version, "none", platform_) - if interpreter: - yield Tag(interpreter, "none", "any") - for version in _py_interpreter_range(python_version): - yield Tag(version, "none", "any") - - -def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str: - if not is_32bit: - return arch - - if arch.startswith("ppc"): - return "ppc" - - return "i386" - - -def _mac_binary_formats(version: AppleVersion, cpu_arch: str) -> list[str]: - formats = [cpu_arch] - if cpu_arch == "x86_64": - if version < (10, 4): - return [] - formats.extend(["intel", "fat64", "fat32"]) - - elif cpu_arch == "i386": - if version < (10, 4): - return [] - formats.extend(["intel", "fat32", "fat"]) - - elif cpu_arch == "ppc64": - # TODO: Need to care about 32-bit PPC for ppc64 through 10.2? - if version > (10, 5) or version < (10, 4): - return [] - formats.append("fat64") - - elif cpu_arch == "ppc": - if version > (10, 6): - return [] - formats.extend(["fat32", "fat"]) - - if cpu_arch in {"arm64", "x86_64"}: - formats.append("universal2") - - if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}: - formats.append("universal") - - return formats - - -def mac_platforms( - version: AppleVersion | None = None, arch: str | None = None -) -> Iterator[str]: - """ - Yields the platform tags for a macOS system. - - The `version` parameter is a two-item tuple specifying the macOS version to - generate platform tags for. The `arch` parameter is the CPU architecture to - generate platform tags for. Both parameters default to the appropriate value - for the current system. - """ - version_str, _, cpu_arch = platform.mac_ver() - if version is None: - version = cast("AppleVersion", tuple(map(int, version_str.split(".")[:2]))) - if version == (10, 16): - # When built against an older macOS SDK, Python will report macOS 10.16 - # instead of the real version. - version_str = subprocess.run( - [ - sys.executable, - "-sS", - "-c", - "import platform; print(platform.mac_ver()[0])", - ], - check=True, - env={"SYSTEM_VERSION_COMPAT": "0"}, - stdout=subprocess.PIPE, - text=True, - ).stdout - version = cast("AppleVersion", tuple(map(int, version_str.split(".")[:2]))) - - if arch is None: - arch = _mac_arch(cpu_arch) - - if (10, 0) <= version < (11, 0): - # Prior to Mac OS 11, each yearly release of Mac OS bumped the - # "minor" version number. The major version was always 10. - major_version = 10 - for minor_version in range(version[1], -1, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - if version >= (11, 0): - # Starting with Mac OS 11, each yearly release bumps the major version - # number. The minor versions are now the midyear updates. - minor_version = 0 - for major_version in range(version[0], 10, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - if version >= (11, 0): - # Mac OS 11 on x86_64 is compatible with binaries from previous releases. - # Arm64 support was introduced in 11.0, so no Arm binaries from previous - # releases exist. - # - # However, the "universal2" binary format can have a - # macOS version earlier than 11.0 when the x86_64 part of the binary supports - # that version of macOS. - major_version = 10 - if arch == "x86_64": - for minor_version in range(16, 3, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - else: - for minor_version in range(16, 3, -1): - compat_version = major_version, minor_version - binary_format = "universal2" - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - -def ios_platforms( - version: AppleVersion | None = None, multiarch: str | None = None -) -> Iterator[str]: - """ - Yields the platform tags for an iOS system. - - :param version: A two-item tuple specifying the iOS version to generate - platform tags for. Defaults to the current iOS version. - :param multiarch: The CPU architecture+ABI to generate platform tags for - - (the value used by `sys.implementation._multiarch` e.g., - `arm64_iphoneos` or `x84_64_iphonesimulator`). Defaults to the current - multiarch value. - """ - if version is None: - # if iOS is the current platform, ios_ver *must* be defined. However, - # it won't exist for CPython versions before 3.13, which causes a mypy - # error. - _, release, _, _ = platform.ios_ver() # type: ignore[attr-defined, unused-ignore] - version = cast("AppleVersion", tuple(map(int, release.split(".")[:2]))) - - if multiarch is None: - multiarch = sys.implementation._multiarch - multiarch = multiarch.replace("-", "_") - - ios_platform_template = "ios_{major}_{minor}_{multiarch}" - - # Consider any iOS major.minor version from the version requested, down to - # 12.0. 12.0 is the first iOS version that is known to have enough features - # to support CPython. Consider every possible minor release up to X.9. There - # highest the minor has ever gone is 8 (14.8 and 15.8) but having some extra - # candidates that won't ever match doesn't really hurt, and it saves us from - # having to keep an explicit list of known iOS versions in the code. Return - # the results descending order of version number. - - # If the requested major version is less than 12, there won't be any matches. - if version[0] < 12: - return - - # Consider the actual X.Y version that was requested. - yield ios_platform_template.format( - major=version[0], minor=version[1], multiarch=multiarch - ) - - # Consider every minor version from X.0 to the minor version prior to the - # version requested by the platform. - for minor in range(version[1] - 1, -1, -1): - yield ios_platform_template.format( - major=version[0], minor=minor, multiarch=multiarch - ) - - for major in range(version[0] - 1, 11, -1): - for minor in range(9, -1, -1): - yield ios_platform_template.format( - major=major, minor=minor, multiarch=multiarch - ) - - -def android_platforms( - api_level: int | None = None, abi: str | None = None -) -> Iterator[str]: - """ - Yields the :attr:`~Tag.platform` tags for Android. If this function is invoked on - non-Android platforms, the ``api_level`` and ``abi`` arguments are required. - - :param int api_level: The maximum `API level - `__ to return. Defaults - to the current system's version, as returned by ``platform.android_ver``. - :param str abi: The `Android ABI `__, - e.g. ``arm64_v8a``. Defaults to the current system's ABI , as returned by - ``sysconfig.get_platform``. Hyphens and periods will be replaced with - underscores. - """ - if platform.system() != "Android" and (api_level is None or abi is None): - raise TypeError( - "on non-Android platforms, the api_level and abi arguments are required" - ) - - if api_level is None: - # Python 3.13 was the first version to return platform.system() == "Android", - # and also the first version to define platform.android_ver(). - api_level = platform.android_ver().api_level # type: ignore[attr-defined] - - if abi is None: - abi = sysconfig.get_platform().split("-")[-1] - abi = _normalize_string(abi) - - # 16 is the minimum API level known to have enough features to support CPython - # without major patching. Yield every API level from the maximum down to the - # minimum, inclusive. - min_api_level = 16 - for ver in range(api_level, min_api_level - 1, -1): - yield f"android_{ver}_{abi}" - - -def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]: - linux = _normalize_string(sysconfig.get_platform()) - if not linux.startswith("linux_"): - # we should never be here, just yield the sysconfig one and return - yield linux - return - if is_32bit: - if linux == "linux_x86_64": - linux = "linux_i686" - elif linux == "linux_aarch64": - linux = "linux_armv8l" - _, arch = linux.split("_", 1) - archs = {"armv8l": ["armv8l", "armv7l"]}.get(arch, [arch]) - yield from _manylinux.platform_tags(archs) - yield from _musllinux.platform_tags(archs) - for arch in archs: - yield f"linux_{arch}" - - -def _generic_platforms() -> Iterator[str]: - yield _normalize_string(sysconfig.get_platform()) - - -def platform_tags() -> Iterator[str]: - """ - Provides the platform tags for this installation. - """ - if platform.system() == "Darwin": - return mac_platforms() - elif platform.system() == "iOS": - return ios_platforms() - elif platform.system() == "Android": - return android_platforms() - elif platform.system() == "Linux": - return _linux_platforms() - else: - return _generic_platforms() - - -def interpreter_name() -> str: - """ - Returns the name of the running interpreter. - - Some implementations have a reserved, two-letter abbreviation which will - be returned when appropriate. - """ - name = sys.implementation.name - return INTERPRETER_SHORT_NAMES.get(name) or name - - -def interpreter_version(*, warn: bool = False) -> str: - """ - Returns the version of the running interpreter. - """ - version = _get_config_var("py_version_nodot", warn=warn) - return str(version) if version else _version_nodot(sys.version_info[:2]) - - -def _version_nodot(version: PythonVersion) -> str: - return "".join(map(str, version)) - - -def sys_tags(*, warn: bool = False) -> Iterator[Tag]: - """ - Returns the sequence of tag triples for the running interpreter. - - The order of the sequence corresponds to priority order for the - interpreter, from most to least important. - """ - - interp_name = interpreter_name() - if interp_name == "cp": - yield from cpython_tags(warn=warn) - else: - yield from generic_tags() - - if interp_name == "pp": - interp = "pp3" - elif interp_name == "cp": - interp = "cp" + interpreter_version(warn=warn) - else: - interp = None - yield from compatible_tags(interpreter=interp) diff --git a/voxvera/vendor/setuptools/_vendor/packaging/utils.py b/voxvera/vendor/setuptools/_vendor/packaging/utils.py deleted file mode 100644 index c41c813..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/utils.py +++ /dev/null @@ -1,158 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import re -from typing import NewType, Tuple, Union, cast - -from .tags import Tag, parse_tag -from .version import InvalidVersion, Version, _TrimmedRelease - -BuildTag = Union[Tuple[()], Tuple[int, str]] -NormalizedName = NewType("NormalizedName", str) - - -class InvalidName(ValueError): - """ - An invalid distribution name; users should refer to the packaging user guide. - """ - - -class InvalidWheelFilename(ValueError): - """ - An invalid wheel filename was found, users should refer to PEP 427. - """ - - -class InvalidSdistFilename(ValueError): - """ - An invalid sdist filename was found, users should refer to the packaging user guide. - """ - - -# Core metadata spec for `Name` -_validate_regex = re.compile(r"[A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9]", re.IGNORECASE) -_normalized_regex = re.compile(r"[a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9]") -# PEP 427: The build number must start with a digit. -_build_tag_regex = re.compile(r"(\d+)(.*)") - - -def canonicalize_name(name: str, *, validate: bool = False) -> NormalizedName: - if validate and not _validate_regex.fullmatch(name): - raise InvalidName(f"name is invalid: {name!r}") - # Ensure all ``.`` and ``_`` are ``-`` - # Emulates ``re.sub(r"[-_.]+", "-", name).lower()`` from PEP 503 - # Much faster than re, and even faster than str.translate - value = name.lower().replace("_", "-").replace(".", "-") - # Condense repeats (faster than regex) - while "--" in value: - value = value.replace("--", "-") - return cast("NormalizedName", value) - - -def is_normalized_name(name: str) -> bool: - return _normalized_regex.fullmatch(name) is not None - - -def canonicalize_version( - version: Version | str, *, strip_trailing_zero: bool = True -) -> str: - """ - Return a canonical form of a version as a string. - - >>> canonicalize_version('1.0.1') - '1.0.1' - - Per PEP 625, versions may have multiple canonical forms, differing - only by trailing zeros. - - >>> canonicalize_version('1.0.0') - '1' - >>> canonicalize_version('1.0.0', strip_trailing_zero=False) - '1.0.0' - - Invalid versions are returned unaltered. - - >>> canonicalize_version('foo bar baz') - 'foo bar baz' - """ - if isinstance(version, str): - try: - version = Version(version) - except InvalidVersion: - return str(version) - return str(_TrimmedRelease(version) if strip_trailing_zero else version) - - -def parse_wheel_filename( - filename: str, -) -> tuple[NormalizedName, Version, BuildTag, frozenset[Tag]]: - if not filename.endswith(".whl"): - raise InvalidWheelFilename( - f"Invalid wheel filename (extension must be '.whl'): {filename!r}" - ) - - filename = filename[:-4] - dashes = filename.count("-") - if dashes not in (4, 5): - raise InvalidWheelFilename( - f"Invalid wheel filename (wrong number of parts): {filename!r}" - ) - - parts = filename.split("-", dashes - 2) - name_part = parts[0] - # See PEP 427 for the rules on escaping the project name. - if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None: - raise InvalidWheelFilename(f"Invalid project name: {filename!r}") - name = canonicalize_name(name_part) - - try: - version = Version(parts[1]) - except InvalidVersion as e: - raise InvalidWheelFilename( - f"Invalid wheel filename (invalid version): {filename!r}" - ) from e - - if dashes == 5: - build_part = parts[2] - build_match = _build_tag_regex.match(build_part) - if build_match is None: - raise InvalidWheelFilename( - f"Invalid build number: {build_part} in {filename!r}" - ) - build = cast("BuildTag", (int(build_match.group(1)), build_match.group(2))) - else: - build = () - tags = parse_tag(parts[-1]) - return (name, version, build, tags) - - -def parse_sdist_filename(filename: str) -> tuple[NormalizedName, Version]: - if filename.endswith(".tar.gz"): - file_stem = filename[: -len(".tar.gz")] - elif filename.endswith(".zip"): - file_stem = filename[: -len(".zip")] - else: - raise InvalidSdistFilename( - f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):" - f" {filename!r}" - ) - - # We are requiring a PEP 440 version, which cannot contain dashes, - # so we split on the last dash. - name_part, sep, version_part = file_stem.rpartition("-") - if not sep: - raise InvalidSdistFilename(f"Invalid sdist filename: {filename!r}") - - name = canonicalize_name(name_part) - - try: - version = Version(version_part) - except InvalidVersion as e: - raise InvalidSdistFilename( - f"Invalid sdist filename (invalid version): {filename!r}" - ) from e - - return (name, version) diff --git a/voxvera/vendor/setuptools/_vendor/packaging/version.py b/voxvera/vendor/setuptools/_vendor/packaging/version.py deleted file mode 100644 index 1206c46..0000000 --- a/voxvera/vendor/setuptools/_vendor/packaging/version.py +++ /dev/null @@ -1,792 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -""" -.. testsetup:: - - from packaging.version import parse, Version -""" - -from __future__ import annotations - -import re -import sys -import typing -from typing import ( - Any, - Callable, - Literal, - NamedTuple, - SupportsInt, - Tuple, - TypedDict, - Union, -) - -from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType - -if typing.TYPE_CHECKING: - from typing_extensions import Self, Unpack - -if sys.version_info >= (3, 13): # pragma: no cover - from warnings import deprecated as _deprecated -elif typing.TYPE_CHECKING: - from typing_extensions import deprecated as _deprecated -else: # pragma: no cover - import functools - import warnings - - def _deprecated(message: str) -> object: - def decorator(func: object) -> object: - @functools.wraps(func) - def wrapper(*args: object, **kwargs: object) -> object: - warnings.warn( - message, - category=DeprecationWarning, - stacklevel=2, - ) - return func(*args, **kwargs) - - return wrapper - - return decorator - - -_LETTER_NORMALIZATION = { - "alpha": "a", - "beta": "b", - "c": "rc", - "pre": "rc", - "preview": "rc", - "rev": "post", - "r": "post", -} - -__all__ = ["VERSION_PATTERN", "InvalidVersion", "Version", "parse"] - -LocalType = Tuple[Union[int, str], ...] - -CmpPrePostDevType = Union[InfinityType, NegativeInfinityType, Tuple[str, int]] -CmpLocalType = Union[ - NegativeInfinityType, - Tuple[Union[Tuple[int, str], Tuple[NegativeInfinityType, Union[int, str]]], ...], -] -CmpKey = Tuple[ - int, - Tuple[int, ...], - CmpPrePostDevType, - CmpPrePostDevType, - CmpPrePostDevType, - CmpLocalType, -] -VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool] - - -class _VersionReplace(TypedDict, total=False): - epoch: int | None - release: tuple[int, ...] | None - pre: tuple[Literal["a", "b", "rc"], int] | None - post: int | None - dev: int | None - local: str | None - - -def parse(version: str) -> Version: - """Parse the given version string. - - >>> parse('1.0.dev1') - - - :param version: The version string to parse. - :raises InvalidVersion: When the version string is not a valid version. - """ - return Version(version) - - -class InvalidVersion(ValueError): - """Raised when a version string is not a valid version. - - >>> Version("invalid") - Traceback (most recent call last): - ... - packaging.version.InvalidVersion: Invalid version: 'invalid' - """ - - -class _BaseVersion: - __slots__ = () - - # This can also be a normal member (see the packaging_legacy package); - # we are just requiring it to be readable. Actually defining a property - # has runtime effect on subclasses, so it's typing only. - if typing.TYPE_CHECKING: - - @property - def _key(self) -> tuple[Any, ...]: ... - - def __hash__(self) -> int: - return hash(self._key) - - # Please keep the duplicated `isinstance` check - # in the six comparisons hereunder - # unless you find a way to avoid adding overhead function calls. - def __lt__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key < other._key - - def __le__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key <= other._key - - def __eq__(self, other: object) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key == other._key - - def __ge__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key >= other._key - - def __gt__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key > other._key - - def __ne__(self, other: object) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key != other._key - - -# Deliberately not anchored to the start and end of the string, to make it -# easier for 3rd party code to reuse - -# Note that ++ doesn't behave identically on CPython and PyPy, so not using it here -_VERSION_PATTERN = r""" - v?+ # optional leading v - (?: - (?:(?P[0-9]+)!)?+ # epoch - (?P[0-9]+(?:\.[0-9]+)*+) # release segment - (?P
                                          # pre-release
-            [._-]?+
-            (?Palpha|a|beta|b|preview|pre|c|rc)
-            [._-]?+
-            (?P[0-9]+)?
-        )?+
-        (?P                                         # post release
-            (?:-(?P[0-9]+))
-            |
-            (?:
-                [._-]?
-                (?Ppost|rev|r)
-                [._-]?
-                (?P[0-9]+)?
-            )
-        )?+
-        (?P                                          # dev release
-            [._-]?+
-            (?Pdev)
-            [._-]?+
-            (?P[0-9]+)?
-        )?+
-    )
-    (?:\+
-        (?P                                        # local version
-            [a-z0-9]+
-            (?:[._-][a-z0-9]+)*+
-        )
-    )?+
-"""
-
-_VERSION_PATTERN_OLD = _VERSION_PATTERN.replace("*+", "*").replace("?+", "?")
-
-# Possessive qualifiers were added in Python 3.11.
-# CPython 3.11.0-3.11.4 had a bug: https://github.com/python/cpython/pull/107795
-# Older PyPy also had a bug.
-VERSION_PATTERN = (
-    _VERSION_PATTERN_OLD
-    if (sys.implementation.name == "cpython" and sys.version_info < (3, 11, 5))
-    or (sys.implementation.name == "pypy" and sys.version_info < (3, 11, 13))
-    or sys.version_info < (3, 11)
-    else _VERSION_PATTERN
-)
-"""
-A string containing the regular expression used to match a valid version.
-
-The pattern is not anchored at either end, and is intended for embedding in larger
-expressions (for example, matching a version number as part of a file name). The
-regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
-flags set.
-
-:meta hide-value:
-"""
-
-
-# Validation pattern for local version in replace()
-_LOCAL_PATTERN = re.compile(r"[a-z0-9]+(?:[._-][a-z0-9]+)*", re.IGNORECASE)
-
-
-def _validate_epoch(value: object, /) -> int:
-    epoch = value or 0
-    if isinstance(epoch, int) and epoch >= 0:
-        return epoch
-    msg = f"epoch must be non-negative integer, got {epoch}"
-    raise InvalidVersion(msg)
-
-
-def _validate_release(value: object, /) -> tuple[int, ...]:
-    release = (0,) if value is None else value
-    if (
-        isinstance(release, tuple)
-        and len(release) > 0
-        and all(isinstance(i, int) and i >= 0 for i in release)
-    ):
-        return release
-    msg = f"release must be a non-empty tuple of non-negative integers, got {release}"
-    raise InvalidVersion(msg)
-
-
-def _validate_pre(value: object, /) -> tuple[Literal["a", "b", "rc"], int] | None:
-    if value is None:
-        return value
-    if (
-        isinstance(value, tuple)
-        and len(value) == 2
-        and value[0] in ("a", "b", "rc")
-        and isinstance(value[1], int)
-        and value[1] >= 0
-    ):
-        return value
-    msg = f"pre must be a tuple of ('a'|'b'|'rc', non-negative int), got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_post(value: object, /) -> tuple[Literal["post"], int] | None:
-    if value is None:
-        return value
-    if isinstance(value, int) and value >= 0:
-        return ("post", value)
-    msg = f"post must be non-negative integer, got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_dev(value: object, /) -> tuple[Literal["dev"], int] | None:
-    if value is None:
-        return value
-    if isinstance(value, int) and value >= 0:
-        return ("dev", value)
-    msg = f"dev must be non-negative integer, got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_local(value: object, /) -> LocalType | None:
-    if value is None:
-        return value
-    if isinstance(value, str) and _LOCAL_PATTERN.fullmatch(value):
-        return _parse_local_version(value)
-    msg = f"local must be a valid version string, got {value!r}"
-    raise InvalidVersion(msg)
-
-
-# Backward compatibility for internals before 26.0. Do not use.
-class _Version(NamedTuple):
-    epoch: int
-    release: tuple[int, ...]
-    dev: tuple[str, int] | None
-    pre: tuple[str, int] | None
-    post: tuple[str, int] | None
-    local: LocalType | None
-
-
-class Version(_BaseVersion):
-    """This class abstracts handling of a project's versions.
-
-    A :class:`Version` instance is comparison aware and can be compared and
-    sorted using the standard Python interfaces.
-
-    >>> v1 = Version("1.0a5")
-    >>> v2 = Version("1.0")
-    >>> v1
-    
-    >>> v2
-    
-    >>> v1 < v2
-    True
-    >>> v1 == v2
-    False
-    >>> v1 > v2
-    False
-    >>> v1 >= v2
-    False
-    >>> v1 <= v2
-    True
-    """
-
-    __slots__ = ("_dev", "_epoch", "_key_cache", "_local", "_post", "_pre", "_release")
-    __match_args__ = ("_str",)
-
-    _regex = re.compile(r"\s*" + VERSION_PATTERN + r"\s*", re.VERBOSE | re.IGNORECASE)
-
-    _epoch: int
-    _release: tuple[int, ...]
-    _dev: tuple[str, int] | None
-    _pre: tuple[str, int] | None
-    _post: tuple[str, int] | None
-    _local: LocalType | None
-
-    _key_cache: CmpKey | None
-
-    def __init__(self, version: str) -> None:
-        """Initialize a Version object.
-
-        :param version:
-            The string representation of a version which will be parsed and normalized
-            before use.
-        :raises InvalidVersion:
-            If the ``version`` does not conform to PEP 440 in any way then this
-            exception will be raised.
-        """
-        # Validate the version and parse it into pieces
-        match = self._regex.fullmatch(version)
-        if not match:
-            raise InvalidVersion(f"Invalid version: {version!r}")
-        self._epoch = int(match.group("epoch")) if match.group("epoch") else 0
-        self._release = tuple(map(int, match.group("release").split(".")))
-        self._pre = _parse_letter_version(match.group("pre_l"), match.group("pre_n"))
-        self._post = _parse_letter_version(
-            match.group("post_l"), match.group("post_n1") or match.group("post_n2")
-        )
-        self._dev = _parse_letter_version(match.group("dev_l"), match.group("dev_n"))
-        self._local = _parse_local_version(match.group("local"))
-
-        # Key which will be used for sorting
-        self._key_cache = None
-
-    def __replace__(self, **kwargs: Unpack[_VersionReplace]) -> Self:
-        epoch = _validate_epoch(kwargs["epoch"]) if "epoch" in kwargs else self._epoch
-        release = (
-            _validate_release(kwargs["release"])
-            if "release" in kwargs
-            else self._release
-        )
-        pre = _validate_pre(kwargs["pre"]) if "pre" in kwargs else self._pre
-        post = _validate_post(kwargs["post"]) if "post" in kwargs else self._post
-        dev = _validate_dev(kwargs["dev"]) if "dev" in kwargs else self._dev
-        local = _validate_local(kwargs["local"]) if "local" in kwargs else self._local
-
-        if (
-            epoch == self._epoch
-            and release == self._release
-            and pre == self._pre
-            and post == self._post
-            and dev == self._dev
-            and local == self._local
-        ):
-            return self
-
-        new_version = self.__class__.__new__(self.__class__)
-        new_version._key_cache = None
-        new_version._epoch = epoch
-        new_version._release = release
-        new_version._pre = pre
-        new_version._post = post
-        new_version._dev = dev
-        new_version._local = local
-
-        return new_version
-
-    @property
-    def _key(self) -> CmpKey:
-        if self._key_cache is None:
-            self._key_cache = _cmpkey(
-                self._epoch,
-                self._release,
-                self._pre,
-                self._post,
-                self._dev,
-                self._local,
-            )
-        return self._key_cache
-
-    @property
-    @_deprecated("Version._version is private and will be removed soon")
-    def _version(self) -> _Version:
-        return _Version(
-            self._epoch, self._release, self._dev, self._pre, self._post, self._local
-        )
-
-    @_version.setter
-    @_deprecated("Version._version is private and will be removed soon")
-    def _version(self, value: _Version) -> None:
-        self._epoch = value.epoch
-        self._release = value.release
-        self._dev = value.dev
-        self._pre = value.pre
-        self._post = value.post
-        self._local = value.local
-        self._key_cache = None
-
-    def __repr__(self) -> str:
-        """A representation of the Version that shows all internal state.
-
-        >>> Version('1.0.0')
-        
-        """
-        return f""
-
-    def __str__(self) -> str:
-        """A string representation of the version that can be round-tripped.
-
-        >>> str(Version("1.0a5"))
-        '1.0a5'
-        """
-        # This is a hot function, so not calling self.base_version
-        version = ".".join(map(str, self.release))
-
-        # Epoch
-        if self.epoch:
-            version = f"{self.epoch}!{version}"
-
-        # Pre-release
-        if self.pre is not None:
-            version += "".join(map(str, self.pre))
-
-        # Post-release
-        if self.post is not None:
-            version += f".post{self.post}"
-
-        # Development release
-        if self.dev is not None:
-            version += f".dev{self.dev}"
-
-        # Local version segment
-        if self.local is not None:
-            version += f"+{self.local}"
-
-        return version
-
-    @property
-    def _str(self) -> str:
-        """Internal property for match_args"""
-        return str(self)
-
-    @property
-    def epoch(self) -> int:
-        """The epoch of the version.
-
-        >>> Version("2.0.0").epoch
-        0
-        >>> Version("1!2.0.0").epoch
-        1
-        """
-        return self._epoch
-
-    @property
-    def release(self) -> tuple[int, ...]:
-        """The components of the "release" segment of the version.
-
-        >>> Version("1.2.3").release
-        (1, 2, 3)
-        >>> Version("2.0.0").release
-        (2, 0, 0)
-        >>> Version("1!2.0.0.post0").release
-        (2, 0, 0)
-
-        Includes trailing zeroes but not the epoch or any pre-release / development /
-        post-release suffixes.
-        """
-        return self._release
-
-    @property
-    def pre(self) -> tuple[str, int] | None:
-        """The pre-release segment of the version.
-
-        >>> print(Version("1.2.3").pre)
-        None
-        >>> Version("1.2.3a1").pre
-        ('a', 1)
-        >>> Version("1.2.3b1").pre
-        ('b', 1)
-        >>> Version("1.2.3rc1").pre
-        ('rc', 1)
-        """
-        return self._pre
-
-    @property
-    def post(self) -> int | None:
-        """The post-release number of the version.
-
-        >>> print(Version("1.2.3").post)
-        None
-        >>> Version("1.2.3.post1").post
-        1
-        """
-        return self._post[1] if self._post else None
-
-    @property
-    def dev(self) -> int | None:
-        """The development number of the version.
-
-        >>> print(Version("1.2.3").dev)
-        None
-        >>> Version("1.2.3.dev1").dev
-        1
-        """
-        return self._dev[1] if self._dev else None
-
-    @property
-    def local(self) -> str | None:
-        """The local version segment of the version.
-
-        >>> print(Version("1.2.3").local)
-        None
-        >>> Version("1.2.3+abc").local
-        'abc'
-        """
-        if self._local:
-            return ".".join(str(x) for x in self._local)
-        else:
-            return None
-
-    @property
-    def public(self) -> str:
-        """The public portion of the version.
-
-        >>> Version("1.2.3").public
-        '1.2.3'
-        >>> Version("1.2.3+abc").public
-        '1.2.3'
-        >>> Version("1!1.2.3dev1+abc").public
-        '1!1.2.3.dev1'
-        """
-        return str(self).split("+", 1)[0]
-
-    @property
-    def base_version(self) -> str:
-        """The "base version" of the version.
-
-        >>> Version("1.2.3").base_version
-        '1.2.3'
-        >>> Version("1.2.3+abc").base_version
-        '1.2.3'
-        >>> Version("1!1.2.3dev1+abc").base_version
-        '1!1.2.3'
-
-        The "base version" is the public version of the project without any pre or post
-        release markers.
-        """
-        release_segment = ".".join(map(str, self.release))
-        return f"{self.epoch}!{release_segment}" if self.epoch else release_segment
-
-    @property
-    def is_prerelease(self) -> bool:
-        """Whether this version is a pre-release.
-
-        >>> Version("1.2.3").is_prerelease
-        False
-        >>> Version("1.2.3a1").is_prerelease
-        True
-        >>> Version("1.2.3b1").is_prerelease
-        True
-        >>> Version("1.2.3rc1").is_prerelease
-        True
-        >>> Version("1.2.3dev1").is_prerelease
-        True
-        """
-        return self.dev is not None or self.pre is not None
-
-    @property
-    def is_postrelease(self) -> bool:
-        """Whether this version is a post-release.
-
-        >>> Version("1.2.3").is_postrelease
-        False
-        >>> Version("1.2.3.post1").is_postrelease
-        True
-        """
-        return self.post is not None
-
-    @property
-    def is_devrelease(self) -> bool:
-        """Whether this version is a development release.
-
-        >>> Version("1.2.3").is_devrelease
-        False
-        >>> Version("1.2.3.dev1").is_devrelease
-        True
-        """
-        return self.dev is not None
-
-    @property
-    def major(self) -> int:
-        """The first item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").major
-        1
-        """
-        return self.release[0] if len(self.release) >= 1 else 0
-
-    @property
-    def minor(self) -> int:
-        """The second item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").minor
-        2
-        >>> Version("1").minor
-        0
-        """
-        return self.release[1] if len(self.release) >= 2 else 0
-
-    @property
-    def micro(self) -> int:
-        """The third item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").micro
-        3
-        >>> Version("1").micro
-        0
-        """
-        return self.release[2] if len(self.release) >= 3 else 0
-
-
-class _TrimmedRelease(Version):
-    __slots__ = ()
-
-    def __init__(self, version: str | Version) -> None:
-        if isinstance(version, Version):
-            self._epoch = version._epoch
-            self._release = version._release
-            self._dev = version._dev
-            self._pre = version._pre
-            self._post = version._post
-            self._local = version._local
-            self._key_cache = version._key_cache
-            return
-        super().__init__(version)  # pragma: no cover
-
-    @property
-    def release(self) -> tuple[int, ...]:
-        """
-        Release segment without any trailing zeros.
-
-        >>> _TrimmedRelease('1.0.0').release
-        (1,)
-        >>> _TrimmedRelease('0.0').release
-        (0,)
-        """
-        # This leaves one 0.
-        rel = super().release
-        len_release = len(rel)
-        i = len_release
-        while i > 1 and rel[i - 1] == 0:
-            i -= 1
-        return rel if i == len_release else rel[:i]
-
-
-def _parse_letter_version(
-    letter: str | None, number: str | bytes | SupportsInt | None
-) -> tuple[str, int] | None:
-    if letter:
-        # We normalize any letters to their lower case form
-        letter = letter.lower()
-
-        # We consider some words to be alternate spellings of other words and
-        # in those cases we want to normalize the spellings to our preferred
-        # spelling.
-        letter = _LETTER_NORMALIZATION.get(letter, letter)
-
-        # We consider there to be an implicit 0 in a pre-release if there is
-        # not a numeral associated with it.
-        return letter, int(number or 0)
-
-    if number:
-        # We assume if we are given a number, but we are not given a letter
-        # then this is using the implicit post release syntax (e.g. 1.0-1)
-        return "post", int(number)
-
-    return None
-
-
-_local_version_separators = re.compile(r"[\._-]")
-
-
-def _parse_local_version(local: str | None) -> LocalType | None:
-    """
-    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
-    """
-    if local is not None:
-        return tuple(
-            part.lower() if not part.isdigit() else int(part)
-            for part in _local_version_separators.split(local)
-        )
-    return None
-
-
-def _cmpkey(
-    epoch: int,
-    release: tuple[int, ...],
-    pre: tuple[str, int] | None,
-    post: tuple[str, int] | None,
-    dev: tuple[str, int] | None,
-    local: LocalType | None,
-) -> CmpKey:
-    # When we compare a release version, we want to compare it with all of the
-    # trailing zeros removed. We will use this for our sorting key.
-    len_release = len(release)
-    i = len_release
-    while i and release[i - 1] == 0:
-        i -= 1
-    _release = release if i == len_release else release[:i]
-
-    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
-    # We'll do this by abusing the pre segment, but we _only_ want to do this
-    # if there is not a pre or a post segment. If we have one of those then
-    # the normal sorting rules will handle this case correctly.
-    if pre is None and post is None and dev is not None:
-        _pre: CmpPrePostDevType = NegativeInfinity
-    # Versions without a pre-release (except as noted above) should sort after
-    # those with one.
-    elif pre is None:
-        _pre = Infinity
-    else:
-        _pre = pre
-
-    # Versions without a post segment should sort before those with one.
-    if post is None:
-        _post: CmpPrePostDevType = NegativeInfinity
-
-    else:
-        _post = post
-
-    # Versions without a development segment should sort after those with one.
-    if dev is None:
-        _dev: CmpPrePostDevType = Infinity
-
-    else:
-        _dev = dev
-
-    if local is None:
-        # Versions without a local segment should sort before those with one.
-        _local: CmpLocalType = NegativeInfinity
-    else:
-        # Versions with a local segment need that segment parsed to implement
-        # the sorting rules in PEP440.
-        # - Alpha numeric segments sort before numeric segments
-        # - Alpha numeric segments sort lexicographically
-        # - Numeric segments sort numerically
-        # - Shorter versions sort before longer versions when the prefixes
-        #   match exactly
-        _local = tuple(
-            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
-        )
-
-    return epoch, _release, _pre, _post, _dev, _local
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/INSTALLER
deleted file mode 100644
index 5c69047..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-uv
\ No newline at end of file
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/METADATA
deleted file mode 100644
index 6b0908f..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/METADATA
+++ /dev/null
@@ -1,350 +0,0 @@
-Metadata-Version: 2.4
-Name: platformdirs
-Version: 4.4.0
-Summary: A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`.
-Project-URL: Changelog, https://github.com/tox-dev/platformdirs/releases
-Project-URL: Documentation, https://platformdirs.readthedocs.io
-Project-URL: Homepage, https://github.com/tox-dev/platformdirs
-Project-URL: Source, https://github.com/tox-dev/platformdirs
-Project-URL: Tracker, https://github.com/tox-dev/platformdirs/issues
-Maintainer-email: Bernát Gábor , Julian Berman , Ofek Lev , Ronny Pfannschmidt 
-License-Expression: MIT
-License-File: LICENSE
-Keywords: appdirs,application,cache,directory,log,user
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.9
-Classifier: Programming Language :: Python :: 3.10
-Classifier: Programming Language :: Python :: 3.11
-Classifier: Programming Language :: Python :: 3.12
-Classifier: Programming Language :: Python :: 3.13
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Requires-Python: >=3.9
-Provides-Extra: docs
-Requires-Dist: furo>=2024.8.6; extra == 'docs'
-Requires-Dist: proselint>=0.14; extra == 'docs'
-Requires-Dist: sphinx-autodoc-typehints>=3; extra == 'docs'
-Requires-Dist: sphinx>=8.1.3; extra == 'docs'
-Provides-Extra: test
-Requires-Dist: appdirs==1.4.4; extra == 'test'
-Requires-Dist: covdefaults>=2.3; extra == 'test'
-Requires-Dist: pytest-cov>=6; extra == 'test'
-Requires-Dist: pytest-mock>=3.14; extra == 'test'
-Requires-Dist: pytest>=8.3.4; extra == 'test'
-Provides-Extra: type
-Requires-Dist: mypy>=1.14.1; extra == 'type'
-Description-Content-Type: text/x-rst
-
-The problem
-===========
-
-.. image:: https://badge.fury.io/py/platformdirs.svg
-   :target: https://badge.fury.io/py/platformdirs
-.. image:: https://img.shields.io/pypi/pyversions/platformdirs.svg
-   :target: https://pypi.python.org/pypi/platformdirs/
-.. image:: https://github.com/tox-dev/platformdirs/actions/workflows/check.yaml/badge.svg
-   :target: https://github.com/platformdirs/platformdirs/actions
-.. image:: https://static.pepy.tech/badge/platformdirs/month
-   :target: https://pepy.tech/project/platformdirs
-
-When writing desktop application, finding the right location to store user data
-and configuration varies per platform. Even for single-platform apps, there
-may by plenty of nuances in figuring out the right location.
-
-For example, if running on macOS, you should use::
-
-    ~/Library/Application Support/
-
-If on Windows (at least English Win) that should be::
-
-    C:\Documents and Settings\\Application Data\Local Settings\\
-
-or possibly::
-
-    C:\Documents and Settings\\Application Data\\
-
-for `roaming profiles `_ but that is another story.
-
-On Linux (and other Unices), according to the `XDG Basedir Spec`_, it should be::
-
-    ~/.local/share/
-
-.. _XDG Basedir Spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
-
-``platformdirs`` to the rescue
-==============================
-
-This kind of thing is what the ``platformdirs`` package is for.
-``platformdirs`` will help you choose an appropriate:
-
-- user data dir (``user_data_dir``)
-- user config dir (``user_config_dir``)
-- user cache dir (``user_cache_dir``)
-- site data dir (``site_data_dir``)
-- site config dir (``site_config_dir``)
-- user log dir (``user_log_dir``)
-- user documents dir (``user_documents_dir``)
-- user downloads dir (``user_downloads_dir``)
-- user pictures dir (``user_pictures_dir``)
-- user videos dir (``user_videos_dir``)
-- user music dir (``user_music_dir``)
-- user desktop dir (``user_desktop_dir``)
-- user runtime dir (``user_runtime_dir``)
-
-And also:
-
-- Is slightly opinionated on the directory names used. Look for "OPINION" in
-  documentation and code for when an opinion is being applied.
-
-Example output
-==============
-
-On macOS:
-
-.. code-block:: pycon
-
-    >>> from platformdirs import *
-    >>> appname = "SuperApp"
-    >>> appauthor = "Acme"
-    >>> user_data_dir(appname, appauthor)
-    '/Users/trentm/Library/Application Support/SuperApp'
-    >>> user_config_dir(appname, appauthor)
-    '/Users/trentm/Library/Application Support/SuperApp'
-    >>> user_cache_dir(appname, appauthor)
-    '/Users/trentm/Library/Caches/SuperApp'
-    >>> site_data_dir(appname, appauthor)
-    '/Library/Application Support/SuperApp'
-    >>> site_config_dir(appname, appauthor)
-    '/Library/Application Support/SuperApp'
-    >>> user_log_dir(appname, appauthor)
-    '/Users/trentm/Library/Logs/SuperApp'
-    >>> user_documents_dir()
-    '/Users/trentm/Documents'
-    >>> user_downloads_dir()
-    '/Users/trentm/Downloads'
-    >>> user_pictures_dir()
-    '/Users/trentm/Pictures'
-    >>> user_videos_dir()
-    '/Users/trentm/Movies'
-    >>> user_music_dir()
-    '/Users/trentm/Music'
-    >>> user_desktop_dir()
-    '/Users/trentm/Desktop'
-    >>> user_runtime_dir(appname, appauthor)
-    '/Users/trentm/Library/Caches/TemporaryItems/SuperApp'
-
-On Windows:
-
-.. code-block:: pycon
-
-    >>> from platformdirs import *
-    >>> appname = "SuperApp"
-    >>> appauthor = "Acme"
-    >>> user_data_dir(appname, appauthor)
-    'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp'
-    >>> user_data_dir(appname, appauthor, roaming=True)
-    'C:\\Users\\trentm\\AppData\\Roaming\\Acme\\SuperApp'
-    >>> user_config_dir(appname, appauthor)
-    'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp'
-    >>> user_cache_dir(appname, appauthor)
-    'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Cache'
-    >>> site_data_dir(appname, appauthor)
-    'C:\\ProgramData\\Acme\\SuperApp'
-    >>> site_config_dir(appname, appauthor)
-    'C:\\ProgramData\\Acme\\SuperApp'
-    >>> user_log_dir(appname, appauthor)
-    'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Logs'
-    >>> user_documents_dir()
-    'C:\\Users\\trentm\\Documents'
-    >>> user_downloads_dir()
-    'C:\\Users\\trentm\\Downloads'
-    >>> user_pictures_dir()
-    'C:\\Users\\trentm\\Pictures'
-    >>> user_videos_dir()
-    'C:\\Users\\trentm\\Videos'
-    >>> user_music_dir()
-    'C:\\Users\\trentm\\Music'
-    >>> user_desktop_dir()
-    'C:\\Users\\trentm\\Desktop'
-    >>> user_runtime_dir(appname, appauthor)
-    'C:\\Users\\trentm\\AppData\\Local\\Temp\\Acme\\SuperApp'
-
-On Linux:
-
-.. code-block:: pycon
-
-    >>> from platformdirs import *
-    >>> appname = "SuperApp"
-    >>> appauthor = "Acme"
-    >>> user_data_dir(appname, appauthor)
-    '/home/trentm/.local/share/SuperApp'
-    >>> user_config_dir(appname)
-    '/home/trentm/.config/SuperApp'
-    >>> user_cache_dir(appname, appauthor)
-    '/home/trentm/.cache/SuperApp'
-    >>> site_data_dir(appname, appauthor)
-    '/usr/local/share/SuperApp'
-    >>> site_data_dir(appname, appauthor, multipath=True)
-    '/usr/local/share/SuperApp:/usr/share/SuperApp'
-    >>> site_config_dir(appname)
-    '/etc/xdg/SuperApp'
-    >>> os.environ["XDG_CONFIG_DIRS"] = "/etc:/usr/local/etc"
-    >>> site_config_dir(appname, multipath=True)
-    '/etc/SuperApp:/usr/local/etc/SuperApp'
-    >>> user_log_dir(appname, appauthor)
-    '/home/trentm/.local/state/SuperApp/log'
-    >>> user_documents_dir()
-    '/home/trentm/Documents'
-    >>> user_downloads_dir()
-    '/home/trentm/Downloads'
-    >>> user_pictures_dir()
-    '/home/trentm/Pictures'
-    >>> user_videos_dir()
-    '/home/trentm/Videos'
-    >>> user_music_dir()
-    '/home/trentm/Music'
-    >>> user_desktop_dir()
-    '/home/trentm/Desktop'
-    >>> user_runtime_dir(appname, appauthor)
-    '/run/user/{os.getuid()}/SuperApp'
-
-On Android::
-
-    >>> from platformdirs import *
-    >>> appname = "SuperApp"
-    >>> appauthor = "Acme"
-    >>> user_data_dir(appname, appauthor)
-    '/data/data/com.myApp/files/SuperApp'
-    >>> user_config_dir(appname)
-    '/data/data/com.myApp/shared_prefs/SuperApp'
-    >>> user_cache_dir(appname, appauthor)
-    '/data/data/com.myApp/cache/SuperApp'
-    >>> site_data_dir(appname, appauthor)
-    '/data/data/com.myApp/files/SuperApp'
-    >>> site_config_dir(appname)
-    '/data/data/com.myApp/shared_prefs/SuperApp'
-    >>> user_log_dir(appname, appauthor)
-    '/data/data/com.myApp/cache/SuperApp/log'
-    >>> user_documents_dir()
-    '/storage/emulated/0/Documents'
-    >>> user_downloads_dir()
-    '/storage/emulated/0/Downloads'
-    >>> user_pictures_dir()
-    '/storage/emulated/0/Pictures'
-    >>> user_videos_dir()
-    '/storage/emulated/0/DCIM/Camera'
-    >>> user_music_dir()
-    '/storage/emulated/0/Music'
-    >>> user_desktop_dir()
-    '/storage/emulated/0/Desktop'
-    >>> user_runtime_dir(appname, appauthor)
-    '/data/data/com.myApp/cache/SuperApp/tmp'
-
-Note: Some android apps like Termux and Pydroid are used as shells. These
-apps are used by the end user to emulate Linux environment. Presence of
-``SHELL`` environment variable is used by Platformdirs to differentiate
-between general android apps and android apps used as shells. Shell android
-apps also support ``XDG_*`` environment variables.
-
-
-``PlatformDirs`` for convenience
-================================
-
-.. code-block:: pycon
-
-    >>> from platformdirs import PlatformDirs
-    >>> dirs = PlatformDirs("SuperApp", "Acme")
-    >>> dirs.user_data_dir
-    '/Users/trentm/Library/Application Support/SuperApp'
-    >>> dirs.user_config_dir
-    '/Users/trentm/Library/Application Support/SuperApp'
-    >>> dirs.user_cache_dir
-    '/Users/trentm/Library/Caches/SuperApp'
-    >>> dirs.site_data_dir
-    '/Library/Application Support/SuperApp'
-    >>> dirs.site_config_dir
-    '/Library/Application Support/SuperApp'
-    >>> dirs.user_cache_dir
-    '/Users/trentm/Library/Caches/SuperApp'
-    >>> dirs.user_log_dir
-    '/Users/trentm/Library/Logs/SuperApp'
-    >>> dirs.user_documents_dir
-    '/Users/trentm/Documents'
-    >>> dirs.user_downloads_dir
-    '/Users/trentm/Downloads'
-    >>> dirs.user_pictures_dir
-    '/Users/trentm/Pictures'
-    >>> dirs.user_videos_dir
-    '/Users/trentm/Movies'
-    >>> dirs.user_music_dir
-    '/Users/trentm/Music'
-    >>> dirs.user_desktop_dir
-    '/Users/trentm/Desktop'
-    >>> dirs.user_runtime_dir
-    '/Users/trentm/Library/Caches/TemporaryItems/SuperApp'
-
-Per-version isolation
-=====================
-
-If you have multiple versions of your app in use that you want to be
-able to run side-by-side, then you may want version-isolation for these
-dirs::
-
-    >>> from platformdirs import PlatformDirs
-    >>> dirs = PlatformDirs("SuperApp", "Acme", version="1.0")
-    >>> dirs.user_data_dir
-    '/Users/trentm/Library/Application Support/SuperApp/1.0'
-    >>> dirs.user_config_dir
-    '/Users/trentm/Library/Application Support/SuperApp/1.0'
-    >>> dirs.user_cache_dir
-    '/Users/trentm/Library/Caches/SuperApp/1.0'
-    >>> dirs.site_data_dir
-    '/Library/Application Support/SuperApp/1.0'
-    >>> dirs.site_config_dir
-    '/Library/Application Support/SuperApp/1.0'
-    >>> dirs.user_log_dir
-    '/Users/trentm/Library/Logs/SuperApp/1.0'
-    >>> dirs.user_documents_dir
-    '/Users/trentm/Documents'
-    >>> dirs.user_downloads_dir
-    '/Users/trentm/Downloads'
-    >>> dirs.user_pictures_dir
-    '/Users/trentm/Pictures'
-    >>> dirs.user_videos_dir
-    '/Users/trentm/Movies'
-    >>> dirs.user_music_dir
-    '/Users/trentm/Music'
-    >>> dirs.user_desktop_dir
-    '/Users/trentm/Desktop'
-    >>> dirs.user_runtime_dir
-    '/Users/trentm/Library/Caches/TemporaryItems/SuperApp/1.0'
-
-Be wary of using this for configuration files though; you'll need to handle
-migrating configuration files manually.
-
-Why this Fork?
-==============
-
-This repository is a friendly fork of the wonderful work started by
-`ActiveState `_ who created
-``appdirs``, this package's ancestor.
-
-Maintaining an open source project is no easy task, particularly
-from within an organization, and the Python community is indebted
-to ``appdirs`` (and to Trent Mick and Jeff Rouse in particular) for
-creating an incredibly useful simple module, as evidenced by the wide
-number of users it has attracted over the years.
-
-Nonetheless, given the number of long-standing open issues
-and pull requests, and no clear path towards `ensuring
-that maintenance of the package would continue or grow
-`_, this fork was
-created.
-
-Contributions are most welcome.
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/RECORD
deleted file mode 100644
index 09572f1..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/RECORD
+++ /dev/null
@@ -1,15 +0,0 @@
-platformdirs-4.4.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-platformdirs-4.4.0.dist-info/METADATA,sha256=u8UhbV9Md7-8VyJyZNUuZrzN5xzPeedeGmBG0CnTAiM,12831
-platformdirs-4.4.0.dist-info/RECORD,,
-platformdirs-4.4.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-platformdirs-4.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
-platformdirs-4.4.0.dist-info/licenses/LICENSE,sha256=KeD9YukphQ6G6yjD_czwzv30-pSHkBHP-z0NS-1tTbY,1089
-platformdirs/__init__.py,sha256=iORRy6_lZ9tXLvO0W6fJPn8QV7F532ivl-f2WGmabBc,22284
-platformdirs/__main__.py,sha256=HnsUQHpiBaiTxwcmwVw-nFaPdVNZtQIdi1eWDtI-MzI,1493
-platformdirs/android.py,sha256=r0DshVBf-RO1jXJGX8C4Til7F1XWt-bkdWMgmvEiaYg,9013
-platformdirs/api.py,sha256=wPHOlwOsfz2oqQZ6A2FcCu5kEAj-JondzoNOHYFQ0h8,9281
-platformdirs/macos.py,sha256=0XoOgin1NK7Qki7iskD-oS8xKxw6bXgoKEgdqpCRAFQ,6322
-platformdirs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-platformdirs/unix.py,sha256=WZmkUA--L3JNRGmz32s35YfoD3ica6xKIPdCV_HhLcs,10458
-platformdirs/version.py,sha256=i31fi3nNO19D2FdSx8aldD7IFLSqm2YrAo6SmkV0FLM,704
-platformdirs/windows.py,sha256=IFpiohUBwxPtCzlyKwNtxyW4Jk8haa6W8o59mfrDXVo,10125
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/REQUESTED
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/WHEEL
deleted file mode 100644
index 12228d4..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/WHEEL
+++ /dev/null
@@ -1,4 +0,0 @@
-Wheel-Version: 1.0
-Generator: hatchling 1.27.0
-Root-Is-Purelib: true
-Tag: py3-none-any
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/licenses/LICENSE
deleted file mode 100644
index f35fed9..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs-4.4.0.dist-info/licenses/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2010-202x The platformdirs developers
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/__init__.py b/voxvera/vendor/setuptools/_vendor/platformdirs/__init__.py
deleted file mode 100644
index 02daa59..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs/__init__.py
+++ /dev/null
@@ -1,631 +0,0 @@
-"""
-Utilities for determining application-specific dirs.
-
-See  for details and usage.
-
-"""
-
-from __future__ import annotations
-
-import os
-import sys
-from typing import TYPE_CHECKING
-
-from .api import PlatformDirsABC
-from .version import __version__
-from .version import __version_tuple__ as __version_info__
-
-if TYPE_CHECKING:
-    from pathlib import Path
-    from typing import Literal
-
-if sys.platform == "win32":
-    from platformdirs.windows import Windows as _Result
-elif sys.platform == "darwin":
-    from platformdirs.macos import MacOS as _Result
-else:
-    from platformdirs.unix import Unix as _Result
-
-
-def _set_platform_dir_class() -> type[PlatformDirsABC]:
-    if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system":
-        if os.getenv("SHELL") or os.getenv("PREFIX"):
-            return _Result
-
-        from platformdirs.android import _android_folder  # noqa: PLC0415
-
-        if _android_folder() is not None:
-            from platformdirs.android import Android  # noqa: PLC0415
-
-            return Android  # return to avoid redefinition of a result
-
-    return _Result
-
-
-if TYPE_CHECKING:
-    # Work around mypy issue: https://github.com/python/mypy/issues/10962
-    PlatformDirs = _Result
-else:
-    PlatformDirs = _set_platform_dir_class()  #: Currently active platform
-AppDirs = PlatformDirs  #: Backwards compatibility with appdirs
-
-
-def user_data_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    roaming: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param roaming: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: data directory tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        roaming=roaming,
-        ensure_exists=ensure_exists,
-    ).user_data_dir
-
-
-def site_data_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    multipath: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param multipath: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: data directory shared by users
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        multipath=multipath,
-        ensure_exists=ensure_exists,
-    ).site_data_dir
-
-
-def user_config_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    roaming: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param roaming: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: config directory tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        roaming=roaming,
-        ensure_exists=ensure_exists,
-    ).user_config_dir
-
-
-def site_config_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    multipath: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param multipath: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: config directory shared by the users
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        multipath=multipath,
-        ensure_exists=ensure_exists,
-    ).site_config_dir
-
-
-def user_cache_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: cache directory tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).user_cache_dir
-
-
-def site_cache_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `opinion `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: cache directory tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).site_cache_dir
-
-
-def user_state_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    roaming: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param roaming: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: state directory tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        roaming=roaming,
-        ensure_exists=ensure_exists,
-    ).user_state_dir
-
-
-def user_log_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: log directory tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).user_log_dir
-
-
-def user_documents_dir() -> str:
-    """:returns: documents directory tied to the user"""
-    return PlatformDirs().user_documents_dir
-
-
-def user_downloads_dir() -> str:
-    """:returns: downloads directory tied to the user"""
-    return PlatformDirs().user_downloads_dir
-
-
-def user_pictures_dir() -> str:
-    """:returns: pictures directory tied to the user"""
-    return PlatformDirs().user_pictures_dir
-
-
-def user_videos_dir() -> str:
-    """:returns: videos directory tied to the user"""
-    return PlatformDirs().user_videos_dir
-
-
-def user_music_dir() -> str:
-    """:returns: music directory tied to the user"""
-    return PlatformDirs().user_music_dir
-
-
-def user_desktop_dir() -> str:
-    """:returns: desktop directory tied to the user"""
-    return PlatformDirs().user_desktop_dir
-
-
-def user_runtime_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `opinion `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: runtime directory tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).user_runtime_dir
-
-
-def site_runtime_dir(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> str:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `opinion `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: runtime directory shared by users
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).site_runtime_dir
-
-
-def user_data_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    roaming: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param roaming: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: data path tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        roaming=roaming,
-        ensure_exists=ensure_exists,
-    ).user_data_path
-
-
-def site_data_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    multipath: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param multipath: See `multipath `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: data path shared by users
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        multipath=multipath,
-        ensure_exists=ensure_exists,
-    ).site_data_path
-
-
-def user_config_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    roaming: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param roaming: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: config path tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        roaming=roaming,
-        ensure_exists=ensure_exists,
-    ).user_config_path
-
-
-def site_config_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    multipath: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param multipath: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: config path shared by the users
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        multipath=multipath,
-        ensure_exists=ensure_exists,
-    ).site_config_path
-
-
-def site_cache_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `opinion `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: cache directory tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).site_cache_path
-
-
-def user_cache_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: cache path tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).user_cache_path
-
-
-def user_state_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    roaming: bool = False,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param roaming: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: state path tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        roaming=roaming,
-        ensure_exists=ensure_exists,
-    ).user_state_path
-
-
-def user_log_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `roaming `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: log path tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).user_log_path
-
-
-def user_documents_path() -> Path:
-    """:returns: documents a path tied to the user"""
-    return PlatformDirs().user_documents_path
-
-
-def user_downloads_path() -> Path:
-    """:returns: downloads path tied to the user"""
-    return PlatformDirs().user_downloads_path
-
-
-def user_pictures_path() -> Path:
-    """:returns: pictures path tied to the user"""
-    return PlatformDirs().user_pictures_path
-
-
-def user_videos_path() -> Path:
-    """:returns: videos path tied to the user"""
-    return PlatformDirs().user_videos_path
-
-
-def user_music_path() -> Path:
-    """:returns: music path tied to the user"""
-    return PlatformDirs().user_music_path
-
-
-def user_desktop_path() -> Path:
-    """:returns: desktop path tied to the user"""
-    return PlatformDirs().user_desktop_path
-
-
-def user_runtime_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `opinion `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: runtime path tied to the user
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).user_runtime_path
-
-
-def site_runtime_path(
-    appname: str | None = None,
-    appauthor: str | Literal[False] | None = None,
-    version: str | None = None,
-    opinion: bool = True,  # noqa: FBT001, FBT002
-    ensure_exists: bool = False,  # noqa: FBT001, FBT002
-) -> Path:
-    """
-    :param appname: See `appname `.
-    :param appauthor: See `appauthor `.
-    :param version: See `version `.
-    :param opinion: See `opinion `.
-    :param ensure_exists: See `ensure_exists `.
-    :returns: runtime path shared by users
-    """
-    return PlatformDirs(
-        appname=appname,
-        appauthor=appauthor,
-        version=version,
-        opinion=opinion,
-        ensure_exists=ensure_exists,
-    ).site_runtime_path
-
-
-__all__ = [
-    "AppDirs",
-    "PlatformDirs",
-    "PlatformDirsABC",
-    "__version__",
-    "__version_info__",
-    "site_cache_dir",
-    "site_cache_path",
-    "site_config_dir",
-    "site_config_path",
-    "site_data_dir",
-    "site_data_path",
-    "site_runtime_dir",
-    "site_runtime_path",
-    "user_cache_dir",
-    "user_cache_path",
-    "user_config_dir",
-    "user_config_path",
-    "user_data_dir",
-    "user_data_path",
-    "user_desktop_dir",
-    "user_desktop_path",
-    "user_documents_dir",
-    "user_documents_path",
-    "user_downloads_dir",
-    "user_downloads_path",
-    "user_log_dir",
-    "user_log_path",
-    "user_music_dir",
-    "user_music_path",
-    "user_pictures_dir",
-    "user_pictures_path",
-    "user_runtime_dir",
-    "user_runtime_path",
-    "user_state_dir",
-    "user_state_path",
-    "user_videos_dir",
-    "user_videos_path",
-]
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/__main__.py b/voxvera/vendor/setuptools/_vendor/platformdirs/__main__.py
deleted file mode 100644
index 922c521..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs/__main__.py
+++ /dev/null
@@ -1,55 +0,0 @@
-"""Main entry point."""
-
-from __future__ import annotations
-
-from platformdirs import PlatformDirs, __version__
-
-PROPS = (
-    "user_data_dir",
-    "user_config_dir",
-    "user_cache_dir",
-    "user_state_dir",
-    "user_log_dir",
-    "user_documents_dir",
-    "user_downloads_dir",
-    "user_pictures_dir",
-    "user_videos_dir",
-    "user_music_dir",
-    "user_runtime_dir",
-    "site_data_dir",
-    "site_config_dir",
-    "site_cache_dir",
-    "site_runtime_dir",
-)
-
-
-def main() -> None:
-    """Run the main entry point."""
-    app_name = "MyApp"
-    app_author = "MyCompany"
-
-    print(f"-- platformdirs {__version__} --")  # noqa: T201
-
-    print("-- app dirs (with optional 'version')")  # noqa: T201
-    dirs = PlatformDirs(app_name, app_author, version="1.0")
-    for prop in PROPS:
-        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201
-
-    print("\n-- app dirs (without optional 'version')")  # noqa: T201
-    dirs = PlatformDirs(app_name, app_author)
-    for prop in PROPS:
-        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201
-
-    print("\n-- app dirs (without optional 'appauthor')")  # noqa: T201
-    dirs = PlatformDirs(app_name)
-    for prop in PROPS:
-        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201
-
-    print("\n-- app dirs (with disabled 'appauthor')")  # noqa: T201
-    dirs = PlatformDirs(app_name, appauthor=False)
-    for prop in PROPS:
-        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201
-
-
-if __name__ == "__main__":
-    main()
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/android.py b/voxvera/vendor/setuptools/_vendor/platformdirs/android.py
deleted file mode 100644
index 92efc85..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs/android.py
+++ /dev/null
@@ -1,249 +0,0 @@
-"""Android."""
-
-from __future__ import annotations
-
-import os
-import re
-import sys
-from functools import lru_cache
-from typing import TYPE_CHECKING, cast
-
-from .api import PlatformDirsABC
-
-
-class Android(PlatformDirsABC):
-    """
-    Follows the guidance `from here `_.
-
-    Makes use of the `appname `, `version
-    `, `ensure_exists `.
-
-    """
-
-    @property
-    def user_data_dir(self) -> str:
-        """:return: data directory tied to the user, e.g. ``/data/user///files/``"""
-        return self._append_app_name_and_version(cast("str", _android_folder()), "files")
-
-    @property
-    def site_data_dir(self) -> str:
-        """:return: data directory shared by users, same as `user_data_dir`"""
-        return self.user_data_dir
-
-    @property
-    def user_config_dir(self) -> str:
-        """
-        :return: config directory tied to the user, e.g. \
-        ``/data/user///shared_prefs/``
-        """
-        return self._append_app_name_and_version(cast("str", _android_folder()), "shared_prefs")
-
-    @property
-    def site_config_dir(self) -> str:
-        """:return: config directory shared by the users, same as `user_config_dir`"""
-        return self.user_config_dir
-
-    @property
-    def user_cache_dir(self) -> str:
-        """:return: cache directory tied to the user, e.g.,``/data/user///cache/``"""
-        return self._append_app_name_and_version(cast("str", _android_folder()), "cache")
-
-    @property
-    def site_cache_dir(self) -> str:
-        """:return: cache directory shared by users, same as `user_cache_dir`"""
-        return self.user_cache_dir
-
-    @property
-    def user_state_dir(self) -> str:
-        """:return: state directory tied to the user, same as `user_data_dir`"""
-        return self.user_data_dir
-
-    @property
-    def user_log_dir(self) -> str:
-        """
-        :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
-          e.g. ``/data/user///cache//log``
-        """
-        path = self.user_cache_dir
-        if self.opinion:
-            path = os.path.join(path, "log")  # noqa: PTH118
-        return path
-
-    @property
-    def user_documents_dir(self) -> str:
-        """:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``"""
-        return _android_documents_folder()
-
-    @property
-    def user_downloads_dir(self) -> str:
-        """:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``"""
-        return _android_downloads_folder()
-
-    @property
-    def user_pictures_dir(self) -> str:
-        """:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``"""
-        return _android_pictures_folder()
-
-    @property
-    def user_videos_dir(self) -> str:
-        """:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``"""
-        return _android_videos_folder()
-
-    @property
-    def user_music_dir(self) -> str:
-        """:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``"""
-        return _android_music_folder()
-
-    @property
-    def user_desktop_dir(self) -> str:
-        """:return: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``"""
-        return "/storage/emulated/0/Desktop"
-
-    @property
-    def user_runtime_dir(self) -> str:
-        """
-        :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
-          e.g. ``/data/user///cache//tmp``
-        """
-        path = self.user_cache_dir
-        if self.opinion:
-            path = os.path.join(path, "tmp")  # noqa: PTH118
-        return path
-
-    @property
-    def site_runtime_dir(self) -> str:
-        """:return: runtime directory shared by users, same as `user_runtime_dir`"""
-        return self.user_runtime_dir
-
-
-@lru_cache(maxsize=1)
-def _android_folder() -> str | None:  # noqa: C901
-    """:return: base folder for the Android OS or None if it cannot be found"""
-    result: str | None = None
-    # type checker isn't happy with our "import android", just don't do this when type checking see
-    # https://stackoverflow.com/a/61394121
-    if not TYPE_CHECKING:
-        try:
-            # First try to get a path to android app using python4android (if available)...
-            from android import mActivity  # noqa: PLC0415
-
-            context = cast("android.content.Context", mActivity.getApplicationContext())  # noqa: F821
-            result = context.getFilesDir().getParentFile().getAbsolutePath()
-        except Exception:  # noqa: BLE001
-            result = None
-    if result is None:
-        try:
-            # ...and fall back to using plain pyjnius, if python4android isn't available or doesn't deliver any useful
-            # result...
-            from jnius import autoclass  # noqa: PLC0415
-
-            context = autoclass("android.content.Context")
-            result = context.getFilesDir().getParentFile().getAbsolutePath()
-        except Exception:  # noqa: BLE001
-            result = None
-    if result is None:
-        # and if that fails, too, find an android folder looking at path on the sys.path
-        # warning: only works for apps installed under /data, not adopted storage etc.
-        pattern = re.compile(r"/data/(data|user/\d+)/(.+)/files")
-        for path in sys.path:
-            if pattern.match(path):
-                result = path.split("/files")[0]
-                break
-        else:
-            result = None
-    if result is None:
-        # one last try: find an android folder looking at path on the sys.path taking adopted storage paths into
-        # account
-        pattern = re.compile(r"/mnt/expand/[a-fA-F0-9-]{36}/(data|user/\d+)/(.+)/files")
-        for path in sys.path:
-            if pattern.match(path):
-                result = path.split("/files")[0]
-                break
-        else:
-            result = None
-    return result
-
-
-@lru_cache(maxsize=1)
-def _android_documents_folder() -> str:
-    """:return: documents folder for the Android OS"""
-    # Get directories with pyjnius
-    try:
-        from jnius import autoclass  # noqa: PLC0415
-
-        context = autoclass("android.content.Context")
-        environment = autoclass("android.os.Environment")
-        documents_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DOCUMENTS).getAbsolutePath()
-    except Exception:  # noqa: BLE001
-        documents_dir = "/storage/emulated/0/Documents"
-
-    return documents_dir
-
-
-@lru_cache(maxsize=1)
-def _android_downloads_folder() -> str:
-    """:return: downloads folder for the Android OS"""
-    # Get directories with pyjnius
-    try:
-        from jnius import autoclass  # noqa: PLC0415
-
-        context = autoclass("android.content.Context")
-        environment = autoclass("android.os.Environment")
-        downloads_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DOWNLOADS).getAbsolutePath()
-    except Exception:  # noqa: BLE001
-        downloads_dir = "/storage/emulated/0/Downloads"
-
-    return downloads_dir
-
-
-@lru_cache(maxsize=1)
-def _android_pictures_folder() -> str:
-    """:return: pictures folder for the Android OS"""
-    # Get directories with pyjnius
-    try:
-        from jnius import autoclass  # noqa: PLC0415
-
-        context = autoclass("android.content.Context")
-        environment = autoclass("android.os.Environment")
-        pictures_dir: str = context.getExternalFilesDir(environment.DIRECTORY_PICTURES).getAbsolutePath()
-    except Exception:  # noqa: BLE001
-        pictures_dir = "/storage/emulated/0/Pictures"
-
-    return pictures_dir
-
-
-@lru_cache(maxsize=1)
-def _android_videos_folder() -> str:
-    """:return: videos folder for the Android OS"""
-    # Get directories with pyjnius
-    try:
-        from jnius import autoclass  # noqa: PLC0415
-
-        context = autoclass("android.content.Context")
-        environment = autoclass("android.os.Environment")
-        videos_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DCIM).getAbsolutePath()
-    except Exception:  # noqa: BLE001
-        videos_dir = "/storage/emulated/0/DCIM/Camera"
-
-    return videos_dir
-
-
-@lru_cache(maxsize=1)
-def _android_music_folder() -> str:
-    """:return: music folder for the Android OS"""
-    # Get directories with pyjnius
-    try:
-        from jnius import autoclass  # noqa: PLC0415
-
-        context = autoclass("android.content.Context")
-        environment = autoclass("android.os.Environment")
-        music_dir: str = context.getExternalFilesDir(environment.DIRECTORY_MUSIC).getAbsolutePath()
-    except Exception:  # noqa: BLE001
-        music_dir = "/storage/emulated/0/Music"
-
-    return music_dir
-
-
-__all__ = [
-    "Android",
-]
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/api.py b/voxvera/vendor/setuptools/_vendor/platformdirs/api.py
deleted file mode 100644
index 251600e..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs/api.py
+++ /dev/null
@@ -1,299 +0,0 @@
-"""Base API."""
-
-from __future__ import annotations
-
-import os
-from abc import ABC, abstractmethod
-from pathlib import Path
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
-    from collections.abc import Iterator
-    from typing import Literal
-
-
-class PlatformDirsABC(ABC):  # noqa: PLR0904
-    """Abstract base class for platform directories."""
-
-    def __init__(  # noqa: PLR0913, PLR0917
-        self,
-        appname: str | None = None,
-        appauthor: str | Literal[False] | None = None,
-        version: str | None = None,
-        roaming: bool = False,  # noqa: FBT001, FBT002
-        multipath: bool = False,  # noqa: FBT001, FBT002
-        opinion: bool = True,  # noqa: FBT001, FBT002
-        ensure_exists: bool = False,  # noqa: FBT001, FBT002
-    ) -> None:
-        """
-        Create a new platform directory.
-
-        :param appname: See `appname`.
-        :param appauthor: See `appauthor`.
-        :param version: See `version`.
-        :param roaming: See `roaming`.
-        :param multipath: See `multipath`.
-        :param opinion: See `opinion`.
-        :param ensure_exists: See `ensure_exists`.
-
-        """
-        self.appname = appname  #: The name of application.
-        self.appauthor = appauthor
-        """
-        The name of the app author or distributing body for this application.
-
-        Typically, it is the owning company name. Defaults to `appname`. You may pass ``False`` to disable it.
-
-        """
-        self.version = version
-        """
-        An optional version path element to append to the path.
-
-        You might want to use this if you want multiple versions of your app to be able to run independently. If used,
-        this would typically be ``.``.
-
-        """
-        self.roaming = roaming
-        """
-        Whether to use the roaming appdata directory on Windows.
-
-        That means that for users on a Windows network setup for roaming profiles, this user data will be synced on
-        login (see
-        `here `_).
-
-        """
-        self.multipath = multipath
-        """
-        An optional parameter which indicates that the entire list of data dirs should be returned.
-
-        By default, the first item would only be returned.
-
-        """
-        self.opinion = opinion  #: A flag to indicating to use opinionated values.
-        self.ensure_exists = ensure_exists
-        """
-        Optionally create the directory (and any missing parents) upon access if it does not exist.
-
-        By default, no directories are created.
-
-        """
-
-    def _append_app_name_and_version(self, *base: str) -> str:
-        params = list(base[1:])
-        if self.appname:
-            params.append(self.appname)
-            if self.version:
-                params.append(self.version)
-        path = os.path.join(base[0], *params)  # noqa: PTH118
-        self._optionally_create_directory(path)
-        return path
-
-    def _optionally_create_directory(self, path: str) -> None:
-        if self.ensure_exists:
-            Path(path).mkdir(parents=True, exist_ok=True)
-
-    def _first_item_as_path_if_multipath(self, directory: str) -> Path:
-        if self.multipath:
-            # If multipath is True, the first path is returned.
-            directory = directory.partition(os.pathsep)[0]
-        return Path(directory)
-
-    @property
-    @abstractmethod
-    def user_data_dir(self) -> str:
-        """:return: data directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def site_data_dir(self) -> str:
-        """:return: data directory shared by users"""
-
-    @property
-    @abstractmethod
-    def user_config_dir(self) -> str:
-        """:return: config directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def site_config_dir(self) -> str:
-        """:return: config directory shared by the users"""
-
-    @property
-    @abstractmethod
-    def user_cache_dir(self) -> str:
-        """:return: cache directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def site_cache_dir(self) -> str:
-        """:return: cache directory shared by users"""
-
-    @property
-    @abstractmethod
-    def user_state_dir(self) -> str:
-        """:return: state directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def user_log_dir(self) -> str:
-        """:return: log directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def user_documents_dir(self) -> str:
-        """:return: documents directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def user_downloads_dir(self) -> str:
-        """:return: downloads directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def user_pictures_dir(self) -> str:
-        """:return: pictures directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def user_videos_dir(self) -> str:
-        """:return: videos directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def user_music_dir(self) -> str:
-        """:return: music directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def user_desktop_dir(self) -> str:
-        """:return: desktop directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def user_runtime_dir(self) -> str:
-        """:return: runtime directory tied to the user"""
-
-    @property
-    @abstractmethod
-    def site_runtime_dir(self) -> str:
-        """:return: runtime directory shared by users"""
-
-    @property
-    def user_data_path(self) -> Path:
-        """:return: data path tied to the user"""
-        return Path(self.user_data_dir)
-
-    @property
-    def site_data_path(self) -> Path:
-        """:return: data path shared by users"""
-        return Path(self.site_data_dir)
-
-    @property
-    def user_config_path(self) -> Path:
-        """:return: config path tied to the user"""
-        return Path(self.user_config_dir)
-
-    @property
-    def site_config_path(self) -> Path:
-        """:return: config path shared by the users"""
-        return Path(self.site_config_dir)
-
-    @property
-    def user_cache_path(self) -> Path:
-        """:return: cache path tied to the user"""
-        return Path(self.user_cache_dir)
-
-    @property
-    def site_cache_path(self) -> Path:
-        """:return: cache path shared by users"""
-        return Path(self.site_cache_dir)
-
-    @property
-    def user_state_path(self) -> Path:
-        """:return: state path tied to the user"""
-        return Path(self.user_state_dir)
-
-    @property
-    def user_log_path(self) -> Path:
-        """:return: log path tied to the user"""
-        return Path(self.user_log_dir)
-
-    @property
-    def user_documents_path(self) -> Path:
-        """:return: documents a path tied to the user"""
-        return Path(self.user_documents_dir)
-
-    @property
-    def user_downloads_path(self) -> Path:
-        """:return: downloads path tied to the user"""
-        return Path(self.user_downloads_dir)
-
-    @property
-    def user_pictures_path(self) -> Path:
-        """:return: pictures path tied to the user"""
-        return Path(self.user_pictures_dir)
-
-    @property
-    def user_videos_path(self) -> Path:
-        """:return: videos path tied to the user"""
-        return Path(self.user_videos_dir)
-
-    @property
-    def user_music_path(self) -> Path:
-        """:return: music path tied to the user"""
-        return Path(self.user_music_dir)
-
-    @property
-    def user_desktop_path(self) -> Path:
-        """:return: desktop path tied to the user"""
-        return Path(self.user_desktop_dir)
-
-    @property
-    def user_runtime_path(self) -> Path:
-        """:return: runtime path tied to the user"""
-        return Path(self.user_runtime_dir)
-
-    @property
-    def site_runtime_path(self) -> Path:
-        """:return: runtime path shared by users"""
-        return Path(self.site_runtime_dir)
-
-    def iter_config_dirs(self) -> Iterator[str]:
-        """:yield: all user and site configuration directories."""
-        yield self.user_config_dir
-        yield self.site_config_dir
-
-    def iter_data_dirs(self) -> Iterator[str]:
-        """:yield: all user and site data directories."""
-        yield self.user_data_dir
-        yield self.site_data_dir
-
-    def iter_cache_dirs(self) -> Iterator[str]:
-        """:yield: all user and site cache directories."""
-        yield self.user_cache_dir
-        yield self.site_cache_dir
-
-    def iter_runtime_dirs(self) -> Iterator[str]:
-        """:yield: all user and site runtime directories."""
-        yield self.user_runtime_dir
-        yield self.site_runtime_dir
-
-    def iter_config_paths(self) -> Iterator[Path]:
-        """:yield: all user and site configuration paths."""
-        for path in self.iter_config_dirs():
-            yield Path(path)
-
-    def iter_data_paths(self) -> Iterator[Path]:
-        """:yield: all user and site data paths."""
-        for path in self.iter_data_dirs():
-            yield Path(path)
-
-    def iter_cache_paths(self) -> Iterator[Path]:
-        """:yield: all user and site cache paths."""
-        for path in self.iter_cache_dirs():
-            yield Path(path)
-
-    def iter_runtime_paths(self) -> Iterator[Path]:
-        """:yield: all user and site runtime paths."""
-        for path in self.iter_runtime_dirs():
-            yield Path(path)
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/macos.py b/voxvera/vendor/setuptools/_vendor/platformdirs/macos.py
deleted file mode 100644
index 30ab368..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs/macos.py
+++ /dev/null
@@ -1,146 +0,0 @@
-"""macOS."""
-
-from __future__ import annotations
-
-import os.path
-import sys
-from typing import TYPE_CHECKING
-
-from .api import PlatformDirsABC
-
-if TYPE_CHECKING:
-    from pathlib import Path
-
-
-class MacOS(PlatformDirsABC):
-    """
-    Platform directories for the macOS operating system.
-
-    Follows the guidance from
-    `Apple documentation `_.
-    Makes use of the `appname `,
-    `version `,
-    `ensure_exists `.
-
-    """
-
-    @property
-    def user_data_dir(self) -> str:
-        """:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``"""
-        return self._append_app_name_and_version(os.path.expanduser("~/Library/Application Support"))  # noqa: PTH111
-
-    @property
-    def site_data_dir(self) -> str:
-        """
-        :return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``.
-          If we're using a Python binary managed by `Homebrew `_, the directory
-          will be under the Homebrew prefix, e.g. ``$homebrew_prefix/share/$appname/$version``.
-          If `multipath ` is enabled, and we're in Homebrew,
-          the response is a multi-path string separated by ":", e.g.
-          ``$homebrew_prefix/share/$appname/$version:/Library/Application Support/$appname/$version``
-        """
-        is_homebrew = "/opt/python" in sys.prefix
-        homebrew_prefix = sys.prefix.split("/opt/python")[0] if is_homebrew else ""
-        path_list = [self._append_app_name_and_version(f"{homebrew_prefix}/share")] if is_homebrew else []
-        path_list.append(self._append_app_name_and_version("/Library/Application Support"))
-        if self.multipath:
-            return os.pathsep.join(path_list)
-        return path_list[0]
-
-    @property
-    def site_data_path(self) -> Path:
-        """:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``"""
-        return self._first_item_as_path_if_multipath(self.site_data_dir)
-
-    @property
-    def user_config_dir(self) -> str:
-        """:return: config directory tied to the user, same as `user_data_dir`"""
-        return self.user_data_dir
-
-    @property
-    def site_config_dir(self) -> str:
-        """:return: config directory shared by the users, same as `site_data_dir`"""
-        return self.site_data_dir
-
-    @property
-    def user_cache_dir(self) -> str:
-        """:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``"""
-        return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches"))  # noqa: PTH111
-
-    @property
-    def site_cache_dir(self) -> str:
-        """
-        :return: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``.
-          If we're using a Python binary managed by `Homebrew `_, the directory
-          will be under the Homebrew prefix, e.g. ``$homebrew_prefix/var/cache/$appname/$version``.
-          If `multipath ` is enabled, and we're in Homebrew,
-          the response is a multi-path string separated by ":", e.g.
-          ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version``
-        """
-        is_homebrew = "/opt/python" in sys.prefix
-        homebrew_prefix = sys.prefix.split("/opt/python")[0] if is_homebrew else ""
-        path_list = [self._append_app_name_and_version(f"{homebrew_prefix}/var/cache")] if is_homebrew else []
-        path_list.append(self._append_app_name_and_version("/Library/Caches"))
-        if self.multipath:
-            return os.pathsep.join(path_list)
-        return path_list[0]
-
-    @property
-    def site_cache_path(self) -> Path:
-        """:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``"""
-        return self._first_item_as_path_if_multipath(self.site_cache_dir)
-
-    @property
-    def user_state_dir(self) -> str:
-        """:return: state directory tied to the user, same as `user_data_dir`"""
-        return self.user_data_dir
-
-    @property
-    def user_log_dir(self) -> str:
-        """:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``"""
-        return self._append_app_name_and_version(os.path.expanduser("~/Library/Logs"))  # noqa: PTH111
-
-    @property
-    def user_documents_dir(self) -> str:
-        """:return: documents directory tied to the user, e.g. ``~/Documents``"""
-        return os.path.expanduser("~/Documents")  # noqa: PTH111
-
-    @property
-    def user_downloads_dir(self) -> str:
-        """:return: downloads directory tied to the user, e.g. ``~/Downloads``"""
-        return os.path.expanduser("~/Downloads")  # noqa: PTH111
-
-    @property
-    def user_pictures_dir(self) -> str:
-        """:return: pictures directory tied to the user, e.g. ``~/Pictures``"""
-        return os.path.expanduser("~/Pictures")  # noqa: PTH111
-
-    @property
-    def user_videos_dir(self) -> str:
-        """:return: videos directory tied to the user, e.g. ``~/Movies``"""
-        return os.path.expanduser("~/Movies")  # noqa: PTH111
-
-    @property
-    def user_music_dir(self) -> str:
-        """:return: music directory tied to the user, e.g. ``~/Music``"""
-        return os.path.expanduser("~/Music")  # noqa: PTH111
-
-    @property
-    def user_desktop_dir(self) -> str:
-        """:return: desktop directory tied to the user, e.g. ``~/Desktop``"""
-        return os.path.expanduser("~/Desktop")  # noqa: PTH111
-
-    @property
-    def user_runtime_dir(self) -> str:
-        """:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``"""
-        return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches/TemporaryItems"))  # noqa: PTH111
-
-    @property
-    def site_runtime_dir(self) -> str:
-        """:return: runtime directory shared by users, same as `user_runtime_dir`"""
-        return self.user_runtime_dir
-
-
-__all__ = [
-    "MacOS",
-]
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/py.typed b/voxvera/vendor/setuptools/_vendor/platformdirs/py.typed
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/unix.py b/voxvera/vendor/setuptools/_vendor/platformdirs/unix.py
deleted file mode 100644
index fc75d8d..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs/unix.py
+++ /dev/null
@@ -1,272 +0,0 @@
-"""Unix."""
-
-from __future__ import annotations
-
-import os
-import sys
-from configparser import ConfigParser
-from pathlib import Path
-from typing import TYPE_CHECKING, NoReturn
-
-from .api import PlatformDirsABC
-
-if TYPE_CHECKING:
-    from collections.abc import Iterator
-
-if sys.platform == "win32":
-
-    def getuid() -> NoReturn:
-        msg = "should only be used on Unix"
-        raise RuntimeError(msg)
-
-else:
-    from os import getuid
-
-
-class Unix(PlatformDirsABC):  # noqa: PLR0904
-    """
-    On Unix/Linux, we follow the `XDG Basedir Spec `_.
-
-    The spec allows overriding directories with environment variables. The examples shown are the default values,
-    alongside the name of the environment variable that overrides them. Makes use of the `appname
-    `, `version `, `multipath
-    `, `opinion `, `ensure_exists
-    `.
-
-    """
-
-    @property
-    def user_data_dir(self) -> str:
-        """
-        :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
-         ``$XDG_DATA_HOME/$appname/$version``
-        """
-        path = os.environ.get("XDG_DATA_HOME", "")
-        if not path.strip():
-            path = os.path.expanduser("~/.local/share")  # noqa: PTH111
-        return self._append_app_name_and_version(path)
-
-    @property
-    def _site_data_dirs(self) -> list[str]:
-        path = os.environ.get("XDG_DATA_DIRS", "")
-        if not path.strip():
-            path = f"/usr/local/share{os.pathsep}/usr/share"
-        return [self._append_app_name_and_version(p) for p in path.split(os.pathsep)]
-
-    @property
-    def site_data_dir(self) -> str:
-        """
-        :return: data directories shared by users (if `multipath ` is
-         enabled and ``XDG_DATA_DIRS`` is set and a multi path the response is also a multi path separated by the
-         OS path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
-        """
-        # XDG default for $XDG_DATA_DIRS; only first, if multipath is False
-        dirs = self._site_data_dirs
-        if not self.multipath:
-            return dirs[0]
-        return os.pathsep.join(dirs)
-
-    @property
-    def user_config_dir(self) -> str:
-        """
-        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
-         ``$XDG_CONFIG_HOME/$appname/$version``
-        """
-        path = os.environ.get("XDG_CONFIG_HOME", "")
-        if not path.strip():
-            path = os.path.expanduser("~/.config")  # noqa: PTH111
-        return self._append_app_name_and_version(path)
-
-    @property
-    def _site_config_dirs(self) -> list[str]:
-        path = os.environ.get("XDG_CONFIG_DIRS", "")
-        if not path.strip():
-            path = "/etc/xdg"
-        return [self._append_app_name_and_version(p) for p in path.split(os.pathsep)]
-
-    @property
-    def site_config_dir(self) -> str:
-        """
-        :return: config directories shared by users (if `multipath `
-         is enabled and ``XDG_CONFIG_DIRS`` is set and a multi path the response is also a multi path separated by
-         the OS path separator), e.g. ``/etc/xdg/$appname/$version``
-        """
-        # XDG default for $XDG_CONFIG_DIRS only first, if multipath is False
-        dirs = self._site_config_dirs
-        if not self.multipath:
-            return dirs[0]
-        return os.pathsep.join(dirs)
-
-    @property
-    def user_cache_dir(self) -> str:
-        """
-        :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
-         ``~/$XDG_CACHE_HOME/$appname/$version``
-        """
-        path = os.environ.get("XDG_CACHE_HOME", "")
-        if not path.strip():
-            path = os.path.expanduser("~/.cache")  # noqa: PTH111
-        return self._append_app_name_and_version(path)
-
-    @property
-    def site_cache_dir(self) -> str:
-        """:return: cache directory shared by users, e.g. ``/var/cache/$appname/$version``"""
-        return self._append_app_name_and_version("/var/cache")
-
-    @property
-    def user_state_dir(self) -> str:
-        """
-        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
-         ``$XDG_STATE_HOME/$appname/$version``
-        """
-        path = os.environ.get("XDG_STATE_HOME", "")
-        if not path.strip():
-            path = os.path.expanduser("~/.local/state")  # noqa: PTH111
-        return self._append_app_name_and_version(path)
-
-    @property
-    def user_log_dir(self) -> str:
-        """:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it"""
-        path = self.user_state_dir
-        if self.opinion:
-            path = os.path.join(path, "log")  # noqa: PTH118
-            self._optionally_create_directory(path)
-        return path
-
-    @property
-    def user_documents_dir(self) -> str:
-        """:return: documents directory tied to the user, e.g. ``~/Documents``"""
-        return _get_user_media_dir("XDG_DOCUMENTS_DIR", "~/Documents")
-
-    @property
-    def user_downloads_dir(self) -> str:
-        """:return: downloads directory tied to the user, e.g. ``~/Downloads``"""
-        return _get_user_media_dir("XDG_DOWNLOAD_DIR", "~/Downloads")
-
-    @property
-    def user_pictures_dir(self) -> str:
-        """:return: pictures directory tied to the user, e.g. ``~/Pictures``"""
-        return _get_user_media_dir("XDG_PICTURES_DIR", "~/Pictures")
-
-    @property
-    def user_videos_dir(self) -> str:
-        """:return: videos directory tied to the user, e.g. ``~/Videos``"""
-        return _get_user_media_dir("XDG_VIDEOS_DIR", "~/Videos")
-
-    @property
-    def user_music_dir(self) -> str:
-        """:return: music directory tied to the user, e.g. ``~/Music``"""
-        return _get_user_media_dir("XDG_MUSIC_DIR", "~/Music")
-
-    @property
-    def user_desktop_dir(self) -> str:
-        """:return: desktop directory tied to the user, e.g. ``~/Desktop``"""
-        return _get_user_media_dir("XDG_DESKTOP_DIR", "~/Desktop")
-
-    @property
-    def user_runtime_dir(self) -> str:
-        """
-        :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
-         ``$XDG_RUNTIME_DIR/$appname/$version``.
-
-         For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if
-         exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR``
-         is not set.
-        """
-        path = os.environ.get("XDG_RUNTIME_DIR", "")
-        if not path.strip():
-            if sys.platform.startswith(("freebsd", "openbsd", "netbsd")):
-                path = f"/var/run/user/{getuid()}"
-                if not Path(path).exists():
-                    path = f"/tmp/runtime-{getuid()}"  # noqa: S108
-            else:
-                path = f"/run/user/{getuid()}"
-        return self._append_app_name_and_version(path)
-
-    @property
-    def site_runtime_dir(self) -> str:
-        """
-        :return: runtime directory shared by users, e.g. ``/run/$appname/$version`` or \
-        ``$XDG_RUNTIME_DIR/$appname/$version``.
-
-        Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will
-        fall back to paths associated to the root user instead of a regular logged-in user if it's not set.
-
-        If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir`
-        instead.
-
-        For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/$appname/$version`` if ``$XDG_RUNTIME_DIR`` is not set.
-        """
-        path = os.environ.get("XDG_RUNTIME_DIR", "")
-        if not path.strip():
-            if sys.platform.startswith(("freebsd", "openbsd", "netbsd")):
-                path = "/var/run"
-            else:
-                path = "/run"
-        return self._append_app_name_and_version(path)
-
-    @property
-    def site_data_path(self) -> Path:
-        """:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``"""
-        return self._first_item_as_path_if_multipath(self.site_data_dir)
-
-    @property
-    def site_config_path(self) -> Path:
-        """:return: config path shared by the users, returns the first item, even if ``multipath`` is set to ``True``"""
-        return self._first_item_as_path_if_multipath(self.site_config_dir)
-
-    @property
-    def site_cache_path(self) -> Path:
-        """:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``"""
-        return self._first_item_as_path_if_multipath(self.site_cache_dir)
-
-    def iter_config_dirs(self) -> Iterator[str]:
-        """:yield: all user and site configuration directories."""
-        yield self.user_config_dir
-        yield from self._site_config_dirs
-
-    def iter_data_dirs(self) -> Iterator[str]:
-        """:yield: all user and site data directories."""
-        yield self.user_data_dir
-        yield from self._site_data_dirs
-
-
-def _get_user_media_dir(env_var: str, fallback_tilde_path: str) -> str:
-    media_dir = _get_user_dirs_folder(env_var)
-    if media_dir is None:
-        media_dir = os.environ.get(env_var, "").strip()
-        if not media_dir:
-            media_dir = os.path.expanduser(fallback_tilde_path)  # noqa: PTH111
-
-    return media_dir
-
-
-def _get_user_dirs_folder(key: str) -> str | None:
-    """
-    Return directory from user-dirs.dirs config file.
-
-    See https://freedesktop.org/wiki/Software/xdg-user-dirs/.
-
-    """
-    user_dirs_config_path = Path(Unix().user_config_dir) / "user-dirs.dirs"
-    if user_dirs_config_path.exists():
-        parser = ConfigParser()
-
-        with user_dirs_config_path.open() as stream:
-            # Add fake section header, so ConfigParser doesn't complain
-            parser.read_string(f"[top]\n{stream.read()}")
-
-        if key not in parser["top"]:
-            return None
-
-        path = parser["top"][key].strip('"')
-        # Handle relative home paths
-        return path.replace("$HOME", os.path.expanduser("~"))  # noqa: PTH111
-
-    return None
-
-
-__all__ = [
-    "Unix",
-]
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/version.py b/voxvera/vendor/setuptools/_vendor/platformdirs/version.py
deleted file mode 100644
index b945147..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs/version.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# file generated by setuptools-scm
-# don't change, don't track in version control
-
-__all__ = [
-    "__version__",
-    "__version_tuple__",
-    "version",
-    "version_tuple",
-    "__commit_id__",
-    "commit_id",
-]
-
-TYPE_CHECKING = False
-if TYPE_CHECKING:
-    from typing import Tuple
-    from typing import Union
-
-    VERSION_TUPLE = Tuple[Union[int, str], ...]
-    COMMIT_ID = Union[str, None]
-else:
-    VERSION_TUPLE = object
-    COMMIT_ID = object
-
-version: str
-__version__: str
-__version_tuple__: VERSION_TUPLE
-version_tuple: VERSION_TUPLE
-commit_id: COMMIT_ID
-__commit_id__: COMMIT_ID
-
-__version__ = version = '4.4.0'
-__version_tuple__ = version_tuple = (4, 4, 0)
-
-__commit_id__ = commit_id = None
diff --git a/voxvera/vendor/setuptools/_vendor/platformdirs/windows.py b/voxvera/vendor/setuptools/_vendor/platformdirs/windows.py
deleted file mode 100644
index d7bc960..0000000
--- a/voxvera/vendor/setuptools/_vendor/platformdirs/windows.py
+++ /dev/null
@@ -1,272 +0,0 @@
-"""Windows."""
-
-from __future__ import annotations
-
-import os
-import sys
-from functools import lru_cache
-from typing import TYPE_CHECKING
-
-from .api import PlatformDirsABC
-
-if TYPE_CHECKING:
-    from collections.abc import Callable
-
-
-class Windows(PlatformDirsABC):
-    """
-    `MSDN on where to store app data files `_.
-
-    Makes use of the `appname `, `appauthor
-    `, `version `, `roaming
-    `, `opinion `, `ensure_exists
-    `.
-
-    """
-
-    @property
-    def user_data_dir(self) -> str:
-        """
-        :return: data directory tied to the user, e.g.
-         ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname`` (not roaming) or
-         ``%USERPROFILE%\\AppData\\Roaming\\$appauthor\\$appname`` (roaming)
-        """
-        const = "CSIDL_APPDATA" if self.roaming else "CSIDL_LOCAL_APPDATA"
-        path = os.path.normpath(get_win_folder(const))
-        return self._append_parts(path)
-
-    def _append_parts(self, path: str, *, opinion_value: str | None = None) -> str:
-        params = []
-        if self.appname:
-            if self.appauthor is not False:
-                author = self.appauthor or self.appname
-                params.append(author)
-            params.append(self.appname)
-            if opinion_value is not None and self.opinion:
-                params.append(opinion_value)
-            if self.version:
-                params.append(self.version)
-        path = os.path.join(path, *params)  # noqa: PTH118
-        self._optionally_create_directory(path)
-        return path
-
-    @property
-    def site_data_dir(self) -> str:
-        """:return: data directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname``"""
-        path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
-        return self._append_parts(path)
-
-    @property
-    def user_config_dir(self) -> str:
-        """:return: config directory tied to the user, same as `user_data_dir`"""
-        return self.user_data_dir
-
-    @property
-    def site_config_dir(self) -> str:
-        """:return: config directory shared by the users, same as `site_data_dir`"""
-        return self.site_data_dir
-
-    @property
-    def user_cache_dir(self) -> str:
-        """
-        :return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
-         ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname\\Cache\\$version``
-        """
-        path = os.path.normpath(get_win_folder("CSIDL_LOCAL_APPDATA"))
-        return self._append_parts(path, opinion_value="Cache")
-
-    @property
-    def site_cache_dir(self) -> str:
-        """:return: cache directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname\\Cache\\$version``"""
-        path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
-        return self._append_parts(path, opinion_value="Cache")
-
-    @property
-    def user_state_dir(self) -> str:
-        """:return: state directory tied to the user, same as `user_data_dir`"""
-        return self.user_data_dir
-
-    @property
-    def user_log_dir(self) -> str:
-        """:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it"""
-        path = self.user_data_dir
-        if self.opinion:
-            path = os.path.join(path, "Logs")  # noqa: PTH118
-            self._optionally_create_directory(path)
-        return path
-
-    @property
-    def user_documents_dir(self) -> str:
-        """:return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``"""
-        return os.path.normpath(get_win_folder("CSIDL_PERSONAL"))
-
-    @property
-    def user_downloads_dir(self) -> str:
-        """:return: downloads directory tied to the user e.g. ``%USERPROFILE%\\Downloads``"""
-        return os.path.normpath(get_win_folder("CSIDL_DOWNLOADS"))
-
-    @property
-    def user_pictures_dir(self) -> str:
-        """:return: pictures directory tied to the user e.g. ``%USERPROFILE%\\Pictures``"""
-        return os.path.normpath(get_win_folder("CSIDL_MYPICTURES"))
-
-    @property
-    def user_videos_dir(self) -> str:
-        """:return: videos directory tied to the user e.g. ``%USERPROFILE%\\Videos``"""
-        return os.path.normpath(get_win_folder("CSIDL_MYVIDEO"))
-
-    @property
-    def user_music_dir(self) -> str:
-        """:return: music directory tied to the user e.g. ``%USERPROFILE%\\Music``"""
-        return os.path.normpath(get_win_folder("CSIDL_MYMUSIC"))
-
-    @property
-    def user_desktop_dir(self) -> str:
-        """:return: desktop directory tied to the user, e.g. ``%USERPROFILE%\\Desktop``"""
-        return os.path.normpath(get_win_folder("CSIDL_DESKTOPDIRECTORY"))
-
-    @property
-    def user_runtime_dir(self) -> str:
-        """
-        :return: runtime directory tied to the user, e.g.
-         ``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``
-        """
-        path = os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Temp"))  # noqa: PTH118
-        return self._append_parts(path)
-
-    @property
-    def site_runtime_dir(self) -> str:
-        """:return: runtime directory shared by users, same as `user_runtime_dir`"""
-        return self.user_runtime_dir
-
-
-def get_win_folder_from_env_vars(csidl_name: str) -> str:
-    """Get folder from environment variables."""
-    result = get_win_folder_if_csidl_name_not_env_var(csidl_name)
-    if result is not None:
-        return result
-
-    env_var_name = {
-        "CSIDL_APPDATA": "APPDATA",
-        "CSIDL_COMMON_APPDATA": "ALLUSERSPROFILE",
-        "CSIDL_LOCAL_APPDATA": "LOCALAPPDATA",
-    }.get(csidl_name)
-    if env_var_name is None:
-        msg = f"Unknown CSIDL name: {csidl_name}"
-        raise ValueError(msg)
-    result = os.environ.get(env_var_name)
-    if result is None:
-        msg = f"Unset environment variable: {env_var_name}"
-        raise ValueError(msg)
-    return result
-
-
-def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None:
-    """Get a folder for a CSIDL name that does not exist as an environment variable."""
-    if csidl_name == "CSIDL_PERSONAL":
-        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Documents")  # noqa: PTH118
-
-    if csidl_name == "CSIDL_DOWNLOADS":
-        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Downloads")  # noqa: PTH118
-
-    if csidl_name == "CSIDL_MYPICTURES":
-        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Pictures")  # noqa: PTH118
-
-    if csidl_name == "CSIDL_MYVIDEO":
-        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Videos")  # noqa: PTH118
-
-    if csidl_name == "CSIDL_MYMUSIC":
-        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Music")  # noqa: PTH118
-    return None
-
-
-def get_win_folder_from_registry(csidl_name: str) -> str:
-    """
-    Get folder from the registry.
-
-    This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
-    for all CSIDL_* names.
-
-    """
-    shell_folder_name = {
-        "CSIDL_APPDATA": "AppData",
-        "CSIDL_COMMON_APPDATA": "Common AppData",
-        "CSIDL_LOCAL_APPDATA": "Local AppData",
-        "CSIDL_PERSONAL": "Personal",
-        "CSIDL_DOWNLOADS": "{374DE290-123F-4565-9164-39C4925E467B}",
-        "CSIDL_MYPICTURES": "My Pictures",
-        "CSIDL_MYVIDEO": "My Video",
-        "CSIDL_MYMUSIC": "My Music",
-    }.get(csidl_name)
-    if shell_folder_name is None:
-        msg = f"Unknown CSIDL name: {csidl_name}"
-        raise ValueError(msg)
-    if sys.platform != "win32":  # only needed for mypy type checker to know that this code runs only on Windows
-        raise NotImplementedError
-    import winreg  # noqa: PLC0415
-
-    key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
-    directory, _ = winreg.QueryValueEx(key, shell_folder_name)
-    return str(directory)
-
-
-def get_win_folder_via_ctypes(csidl_name: str) -> str:
-    """Get folder with ctypes."""
-    # There is no 'CSIDL_DOWNLOADS'.
-    # Use 'CSIDL_PROFILE' (40) and append the default folder 'Downloads' instead.
-    # https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid
-
-    import ctypes  # noqa: PLC0415
-
-    csidl_const = {
-        "CSIDL_APPDATA": 26,
-        "CSIDL_COMMON_APPDATA": 35,
-        "CSIDL_LOCAL_APPDATA": 28,
-        "CSIDL_PERSONAL": 5,
-        "CSIDL_MYPICTURES": 39,
-        "CSIDL_MYVIDEO": 14,
-        "CSIDL_MYMUSIC": 13,
-        "CSIDL_DOWNLOADS": 40,
-        "CSIDL_DESKTOPDIRECTORY": 16,
-    }.get(csidl_name)
-    if csidl_const is None:
-        msg = f"Unknown CSIDL name: {csidl_name}"
-        raise ValueError(msg)
-
-    buf = ctypes.create_unicode_buffer(1024)
-    windll = getattr(ctypes, "windll")  # noqa: B009 # using getattr to avoid false positive with mypy type checker
-    windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)
-
-    # Downgrade to short path name if it has high-bit chars.
-    if any(ord(c) > 255 for c in buf):  # noqa: PLR2004
-        buf2 = ctypes.create_unicode_buffer(1024)
-        if windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):
-            buf = buf2
-
-    if csidl_name == "CSIDL_DOWNLOADS":
-        return os.path.join(buf.value, "Downloads")  # noqa: PTH118
-
-    return buf.value
-
-
-def _pick_get_win_folder() -> Callable[[str], str]:
-    try:
-        import ctypes  # noqa: PLC0415
-    except ImportError:
-        pass
-    else:
-        if hasattr(ctypes, "windll"):
-            return get_win_folder_via_ctypes
-    try:
-        import winreg  # noqa: PLC0415, F401
-    except ImportError:
-        return get_win_folder_from_env_vars
-    else:
-        return get_win_folder_from_registry
-
-
-get_win_folder = lru_cache(maxsize=None)(_pick_get_win_folder())
-
-__all__ = [
-    "Windows",
-]
diff --git a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/INSTALLER
deleted file mode 100644
index 5c69047..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-uv
\ No newline at end of file
diff --git a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/METADATA
deleted file mode 100644
index ffe8e40..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/METADATA
+++ /dev/null
@@ -1,270 +0,0 @@
-Metadata-Version: 2.4
-Name: tomli
-Version: 2.4.0
-Summary: A lil' TOML parser
-Keywords: toml
-Author-email: Taneli Hukkinen 
-Requires-Python: >=3.8
-Description-Content-Type: text/markdown
-License-Expression: MIT
-Classifier: Operating System :: MacOS
-Classifier: Operating System :: Microsoft :: Windows
-Classifier: Operating System :: POSIX :: Linux
-Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Typing :: Typed
-License-File: LICENSE
-Project-URL: Changelog, https://github.com/hukkin/tomli/blob/master/CHANGELOG.md
-Project-URL: Homepage, https://github.com/hukkin/tomli
-
-[![Build Status](https://github.com/hukkin/tomli/actions/workflows/tests.yaml/badge.svg?branch=master)](https://github.com/hukkin/tomli/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)
-[![codecov.io](https://codecov.io/gh/hukkin/tomli/branch/master/graph/badge.svg)](https://codecov.io/gh/hukkin/tomli)
-[![PyPI version](https://img.shields.io/pypi/v/tomli)](https://pypi.org/project/tomli)
-
-# Tomli
-
-> A lil' TOML parser
-
-**Table of Contents** *generated with [mdformat-toc](https://github.com/hukkin/mdformat-toc)*
-
-
-
-- [Intro](#intro)
-- [Installation](#installation)
-- [Usage](#usage)
-  - [Parse a TOML string](#parse-a-toml-string)
-  - [Parse a TOML file](#parse-a-toml-file)
-  - [Handle invalid TOML](#handle-invalid-toml)
-  - [Construct `decimal.Decimal`s from TOML floats](#construct-decimaldecimals-from-toml-floats)
-  - [Building a `tomli`/`tomllib` compatibility layer](#building-a-tomlitomllib-compatibility-layer)
-- [FAQ](#faq)
-  - [Why this parser?](#why-this-parser)
-  - [Is comment preserving round-trip parsing supported?](#is-comment-preserving-round-trip-parsing-supported)
-  - [Is there a `dumps`, `write` or `encode` function?](#is-there-a-dumps-write-or-encode-function)
-  - [How do TOML types map into Python types?](#how-do-toml-types-map-into-python-types)
-- [Performance](#performance)
-  - [Pure Python](#pure-python)
-  - [Mypyc generated wheel](#mypyc-generated-wheel)
-
-
-
-## Intro
-
-Tomli is a Python library for parsing [TOML](https://toml.io).
-Version 2.4.0 and later are compatible with [TOML v1.1.0](https://toml.io/en/v1.1.0).
-Older versions are [TOML v1.0.0](https://toml.io/en/v1.0.0) compatible.
-
-A version of Tomli, the `tomllib` module,
-was added to the standard library in Python 3.11
-via [PEP 680](https://www.python.org/dev/peps/pep-0680/).
-Tomli continues to provide a backport on PyPI for Python versions
-where the standard library module is not available
-and that have not yet reached their end-of-life.
-
-Tomli uses [mypyc](https://github.com/mypyc/mypyc)
-to generate binary wheels for most of the widely used platforms,
-so Python 3.11+ users may prefer it over `tomllib` for improved performance.
-Pure Python wheels are available on any platform and should perform the same as `tomllib`.
-
-## Installation
-
-```bash
-pip install tomli
-```
-
-## Usage
-
-### Parse a TOML string
-
-```python
-import tomli
-
-toml_str = """
-[[players]]
-name = "Lehtinen"
-number = 26
-
-[[players]]
-name = "Numminen"
-number = 27
-"""
-
-toml_dict = tomli.loads(toml_str)
-assert toml_dict == {
-    "players": [{"name": "Lehtinen", "number": 26}, {"name": "Numminen", "number": 27}]
-}
-```
-
-### Parse a TOML file
-
-```python
-import tomli
-
-with open("path_to_file/conf.toml", "rb") as f:
-    toml_dict = tomli.load(f)
-```
-
-The file must be opened in binary mode (with the `"rb"` flag).
-Binary mode will enforce decoding the file as UTF-8 with universal newlines disabled,
-both of which are required to correctly parse TOML.
-
-### Handle invalid TOML
-
-```python
-import tomli
-
-try:
-    toml_dict = tomli.loads("]] this is invalid TOML [[")
-except tomli.TOMLDecodeError:
-    print("Yep, definitely not valid.")
-```
-
-Note that error messages are considered informational only.
-They should not be assumed to stay constant across Tomli versions.
-
-### Construct `decimal.Decimal`s from TOML floats
-
-```python
-from decimal import Decimal
-import tomli
-
-toml_dict = tomli.loads("precision-matters = 0.982492", parse_float=Decimal)
-assert isinstance(toml_dict["precision-matters"], Decimal)
-assert toml_dict["precision-matters"] == Decimal("0.982492")
-```
-
-Note that `decimal.Decimal` can be replaced with another callable that converts a TOML float from string to a Python type.
-The `decimal.Decimal` is, however, a practical choice for use cases where float inaccuracies can not be tolerated.
-
-Illegal types are `dict` and `list`, and their subtypes.
-A `ValueError` will be raised if `parse_float` produces illegal types.
-
-### Building a `tomli`/`tomllib` compatibility layer
-
-Python versions 3.11+ ship with a version of Tomli:
-the `tomllib` standard library module.
-To build code that uses the standard library if available,
-but still works seamlessly with Python 3.6+,
-do the following.
-
-Instead of a hard Tomli dependency, use the following
-[dependency specifier](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)
-to only require Tomli when the standard library module is not available:
-
-```
-tomli >= 1.1.0 ; python_version < "3.11"
-```
-
-Then, in your code, import a TOML parser using the following fallback mechanism:
-
-```python
-import sys
-
-if sys.version_info >= (3, 11):
-    import tomllib
-else:
-    import tomli as tomllib
-
-tomllib.loads("['This parses fine with Python 3.6+']")
-```
-
-## FAQ
-
-### Why this parser?
-
-- it's lil'
-- pure Python with zero dependencies
-- the fastest pure Python parser [\*](#pure-python):
-  18x as fast as [tomlkit](https://pypi.org/project/tomlkit/),
-  2.1x as fast as [toml](https://pypi.org/project/toml/)
-- outputs [basic data types](#how-do-toml-types-map-into-python-types) only
-- 100% spec compliant: passes all tests in
-  [toml-lang/toml-test](https://github.com/toml-lang/toml-test)
-  test suite
-- thoroughly tested: 100% branch coverage
-
-### Is comment preserving round-trip parsing supported?
-
-No.
-
-The `tomli.loads` function returns a plain `dict` that is populated with builtin types and types from the standard library only.
-Preserving comments requires a custom type to be returned so will not be supported,
-at least not by the `tomli.loads` and `tomli.load` functions.
-
-Look into [TOML Kit](https://github.com/sdispater/tomlkit) if preservation of style is what you need.
-
-### Is there a `dumps`, `write` or `encode` function?
-
-[Tomli-W](https://github.com/hukkin/tomli-w) is the write-only counterpart of Tomli, providing `dump` and `dumps` functions.
-
-The core library does not include write capability, as most TOML use cases are read-only, and Tomli intends to be minimal.
-
-### How do TOML types map into Python types?
-
-| TOML type        | Python type         | Details                                                      |
-| ---------------- | ------------------- | ------------------------------------------------------------ |
-| Document Root    | `dict`              |                                                              |
-| Key              | `str`               |                                                              |
-| String           | `str`               |                                                              |
-| Integer          | `int`               |                                                              |
-| Float            | `float`             |                                                              |
-| Boolean          | `bool`              |                                                              |
-| Offset Date-Time | `datetime.datetime` | `tzinfo` attribute set to an instance of `datetime.timezone` |
-| Local Date-Time  | `datetime.datetime` | `tzinfo` attribute set to `None`                             |
-| Local Date       | `datetime.date`     |                                                              |
-| Local Time       | `datetime.time`     |                                                              |
-| Array            | `list`              |                                                              |
-| Table            | `dict`              |                                                              |
-| Inline Table     | `dict`              |                                                              |
-
-## Performance
-
-The `benchmark/` folder in this repository contains a performance benchmark for comparing the various Python TOML parsers.
-
-Below are the results for commit [0724e2a](https://github.com/hukkin/tomli/tree/0724e2ab1858da7f5e05a9bffdb24c33589d951c).
-
-### Pure Python
-
-```console
-foo@bar:~/dev/tomli$ python --version
-Python 3.12.7
-foo@bar:~/dev/tomli$ pip freeze
-attrs==21.4.0
-click==8.1.7
-pytomlpp==1.0.13
-qtoml==0.3.1
-rtoml==0.11.0
-toml==0.10.2
-tomli @ file:///home/foo/dev/tomli
-tomlkit==0.13.2
-foo@bar:~/dev/tomli$ python benchmark/run.py
-Parsing data.toml 5000 times:
-------------------------------------------------------
-    parser |  exec time | performance (more is better)
------------+------------+-----------------------------
-     rtoml |    0.647 s | baseline (100%)
-  pytomlpp |    0.891 s | 72.62%
-     tomli |     3.14 s | 20.56%
-      toml |     6.69 s | 9.67%
-     qtoml |     8.27 s | 7.82%
-   tomlkit |     56.1 s | 1.15%
-```
-
-### Mypyc generated wheel
-
-```console
-foo@bar:~/dev/tomli$ python benchmark/run.py
-Parsing data.toml 5000 times:
-------------------------------------------------------
-    parser |  exec time | performance (more is better)
------------+------------+-----------------------------
-     rtoml |    0.668 s | baseline (100%)
-  pytomlpp |    0.893 s | 74.81%
-     tomli |     1.96 s | 34.18%
-      toml |     6.64 s | 10.07%
-     qtoml |     8.26 s | 8.09%
-   tomlkit |     52.9 s | 1.26%
-```
-
diff --git a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/RECORD
deleted file mode 100644
index d2415a3..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/RECORD
+++ /dev/null
@@ -1,11 +0,0 @@
-tomli-2.4.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-tomli-2.4.0.dist-info/METADATA,sha256=9awKH4-6kItGRs1lUwnpGq2Wm2eHYWrFccpGKjgy_84,10567
-tomli-2.4.0.dist-info/RECORD,,
-tomli-2.4.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-tomli-2.4.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
-tomli-2.4.0.dist-info/licenses/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
-tomli/__init__.py,sha256=ahtDjGJA2M_wWVvGpzx4YJtWxrWBx6qE-GH5-UYoECA,314
-tomli/_parser.py,sha256=txeATLE3zHyZ-ushXtYfrZ3LoIs7JzQF2W2KL1gwJPg,25958
-tomli/_re.py,sha256=oSNZ_ilFI6chEuQ01YRSoUydBQr_okF_mSdHTkFmv90,3396
-tomli/_types.py,sha256=-GTG2VUqkpxwMqzmVO4F7ybKddIbAnuAHXfmWQcTi3Q,254
-tomli/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
diff --git a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/REQUESTED
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/WHEEL
deleted file mode 100644
index d8b9936..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/WHEEL
+++ /dev/null
@@ -1,4 +0,0 @@
-Wheel-Version: 1.0
-Generator: flit 3.12.0
-Root-Is-Purelib: true
-Tag: py3-none-any
diff --git a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/licenses/LICENSE
deleted file mode 100644
index e859590..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli-2.4.0.dist-info/licenses/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2021 Taneli Hukkinen
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/voxvera/vendor/setuptools/_vendor/tomli/__init__.py b/voxvera/vendor/setuptools/_vendor/tomli/__init__.py
deleted file mode 100644
index 55699b1..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
-# Licensed to PSF under a Contributor Agreement.
-
-__all__ = ("loads", "load", "TOMLDecodeError")
-__version__ = "2.4.0"  # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
-
-from ._parser import TOMLDecodeError, load, loads
diff --git a/voxvera/vendor/setuptools/_vendor/tomli/_parser.py b/voxvera/vendor/setuptools/_vendor/tomli/_parser.py
deleted file mode 100644
index 3038891..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli/_parser.py
+++ /dev/null
@@ -1,782 +0,0 @@
-# SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
-# Licensed to PSF under a Contributor Agreement.
-
-from __future__ import annotations
-
-import sys
-from types import MappingProxyType
-
-from ._re import (
-    RE_DATETIME,
-    RE_LOCALTIME,
-    RE_NUMBER,
-    match_to_datetime,
-    match_to_localtime,
-    match_to_number,
-)
-
-TYPE_CHECKING = False
-if TYPE_CHECKING:
-    from collections.abc import Iterable
-    from typing import IO, Any, Final
-
-    from ._types import Key, ParseFloat, Pos
-
-# Inline tables/arrays are implemented using recursion. Pathologically
-# nested documents cause pure Python to raise RecursionError (which is OK),
-# but mypyc binary wheels will crash unrecoverably (not OK). According to
-# mypyc docs this will be fixed in the future:
-# https://mypyc.readthedocs.io/en/latest/differences_from_python.html#stack-overflows
-# Before mypyc's fix is in, recursion needs to be limited by this library.
-# Choosing `sys.getrecursionlimit()` as maximum inline table/array nesting
-# level, as it allows more nesting than pure Python, but still seems a far
-# lower number than where mypyc binaries crash.
-MAX_INLINE_NESTING: Final = sys.getrecursionlimit()
-
-ASCII_CTRL: Final = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))
-
-# Neither of these sets include quotation mark or backslash. They are
-# currently handled as separate cases in the parser functions.
-ILLEGAL_BASIC_STR_CHARS: Final = ASCII_CTRL - frozenset("\t")
-ILLEGAL_MULTILINE_BASIC_STR_CHARS: Final = ASCII_CTRL - frozenset("\t\n")
-
-ILLEGAL_LITERAL_STR_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
-ILLEGAL_MULTILINE_LITERAL_STR_CHARS: Final = ILLEGAL_MULTILINE_BASIC_STR_CHARS
-
-ILLEGAL_COMMENT_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
-
-TOML_WS: Final = frozenset(" \t")
-TOML_WS_AND_NEWLINE: Final = TOML_WS | frozenset("\n")
-BARE_KEY_CHARS: Final = frozenset(
-    "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_"
-)
-KEY_INITIAL_CHARS: Final = BARE_KEY_CHARS | frozenset("\"'")
-HEXDIGIT_CHARS: Final = frozenset("abcdef" "ABCDEF" "0123456789")
-
-BASIC_STR_ESCAPE_REPLACEMENTS: Final = MappingProxyType(
-    {
-        "\\b": "\u0008",  # backspace
-        "\\t": "\u0009",  # tab
-        "\\n": "\u000a",  # linefeed
-        "\\f": "\u000c",  # form feed
-        "\\r": "\u000d",  # carriage return
-        "\\e": "\u001b",  # escape
-        '\\"': "\u0022",  # quote
-        "\\\\": "\u005c",  # backslash
-    }
-)
-
-
-class DEPRECATED_DEFAULT:
-    """Sentinel to be used as default arg during deprecation
-    period of TOMLDecodeError's free-form arguments."""
-
-
-class TOMLDecodeError(ValueError):
-    """An error raised if a document is not valid TOML.
-
-    Adds the following attributes to ValueError:
-    msg: The unformatted error message
-    doc: The TOML document being parsed
-    pos: The index of doc where parsing failed
-    lineno: The line corresponding to pos
-    colno: The column corresponding to pos
-    """
-
-    def __init__(
-        self,
-        msg: str | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
-        doc: str | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
-        pos: Pos | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
-        *args: Any,
-    ):
-        if (
-            args
-            or not isinstance(msg, str)
-            or not isinstance(doc, str)
-            or not isinstance(pos, int)
-        ):
-            import warnings
-
-            warnings.warn(
-                "Free-form arguments for TOMLDecodeError are deprecated. "
-                "Please set 'msg' (str), 'doc' (str) and 'pos' (int) arguments only.",
-                DeprecationWarning,
-                stacklevel=2,
-            )
-            if pos is not DEPRECATED_DEFAULT:
-                args = pos, *args
-            if doc is not DEPRECATED_DEFAULT:
-                args = doc, *args
-            if msg is not DEPRECATED_DEFAULT:
-                args = msg, *args
-            ValueError.__init__(self, *args)
-            return
-
-        lineno = doc.count("\n", 0, pos) + 1
-        if lineno == 1:
-            colno = pos + 1
-        else:
-            colno = pos - doc.rindex("\n", 0, pos)
-
-        if pos >= len(doc):
-            coord_repr = "end of document"
-        else:
-            coord_repr = f"line {lineno}, column {colno}"
-        errmsg = f"{msg} (at {coord_repr})"
-        ValueError.__init__(self, errmsg)
-
-        self.msg = msg
-        self.doc = doc
-        self.pos = pos
-        self.lineno = lineno
-        self.colno = colno
-
-
-def load(__fp: IO[bytes], *, parse_float: ParseFloat = float) -> dict[str, Any]:
-    """Parse TOML from a binary file object."""
-    b = __fp.read()
-    try:
-        s = b.decode()
-    except AttributeError:
-        raise TypeError(
-            "File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
-        ) from None
-    return loads(s, parse_float=parse_float)
-
-
-def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]:
-    """Parse TOML from a string."""
-
-    # The spec allows converting "\r\n" to "\n", even in string
-    # literals. Let's do so to simplify parsing.
-    try:
-        src = __s.replace("\r\n", "\n")
-    except (AttributeError, TypeError):
-        raise TypeError(
-            f"Expected str object, not '{type(__s).__qualname__}'"
-        ) from None
-    pos = 0
-    out = Output()
-    header: Key = ()
-    parse_float = make_safe_parse_float(parse_float)
-
-    # Parse one statement at a time
-    # (typically means one line in TOML source)
-    while True:
-        # 1. Skip line leading whitespace
-        pos = skip_chars(src, pos, TOML_WS)
-
-        # 2. Parse rules. Expect one of the following:
-        #    - end of file
-        #    - end of line
-        #    - comment
-        #    - key/value pair
-        #    - append dict to list (and move to its namespace)
-        #    - create dict (and move to its namespace)
-        # Skip trailing whitespace when applicable.
-        try:
-            char = src[pos]
-        except IndexError:
-            break
-        if char == "\n":
-            pos += 1
-            continue
-        if char in KEY_INITIAL_CHARS:
-            pos = key_value_rule(src, pos, out, header, parse_float)
-            pos = skip_chars(src, pos, TOML_WS)
-        elif char == "[":
-            try:
-                second_char: str | None = src[pos + 1]
-            except IndexError:
-                second_char = None
-            out.flags.finalize_pending()
-            if second_char == "[":
-                pos, header = create_list_rule(src, pos, out)
-            else:
-                pos, header = create_dict_rule(src, pos, out)
-            pos = skip_chars(src, pos, TOML_WS)
-        elif char != "#":
-            raise TOMLDecodeError("Invalid statement", src, pos)
-
-        # 3. Skip comment
-        pos = skip_comment(src, pos)
-
-        # 4. Expect end of line or end of file
-        try:
-            char = src[pos]
-        except IndexError:
-            break
-        if char != "\n":
-            raise TOMLDecodeError(
-                "Expected newline or end of document after a statement", src, pos
-            )
-        pos += 1
-
-    return out.data.dict
-
-
-class Flags:
-    """Flags that map to parsed keys/namespaces."""
-
-    # Marks an immutable namespace (inline array or inline table).
-    FROZEN: Final = 0
-    # Marks a nest that has been explicitly created and can no longer
-    # be opened using the "[table]" syntax.
-    EXPLICIT_NEST: Final = 1
-
-    def __init__(self) -> None:
-        self._flags: dict[str, dict[Any, Any]] = {}
-        self._pending_flags: set[tuple[Key, int]] = set()
-
-    def add_pending(self, key: Key, flag: int) -> None:
-        self._pending_flags.add((key, flag))
-
-    def finalize_pending(self) -> None:
-        for key, flag in self._pending_flags:
-            self.set(key, flag, recursive=False)
-        self._pending_flags.clear()
-
-    def unset_all(self, key: Key) -> None:
-        cont = self._flags
-        for k in key[:-1]:
-            if k not in cont:
-                return
-            cont = cont[k]["nested"]
-        cont.pop(key[-1], None)
-
-    def set(self, key: Key, flag: int, *, recursive: bool) -> None:  # noqa: A003
-        cont = self._flags
-        key_parent, key_stem = key[:-1], key[-1]
-        for k in key_parent:
-            if k not in cont:
-                cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
-            cont = cont[k]["nested"]
-        if key_stem not in cont:
-            cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
-        cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)
-
-    def is_(self, key: Key, flag: int) -> bool:
-        if not key:
-            return False  # document root has no flags
-        cont = self._flags
-        for k in key[:-1]:
-            if k not in cont:
-                return False
-            inner_cont = cont[k]
-            if flag in inner_cont["recursive_flags"]:
-                return True
-            cont = inner_cont["nested"]
-        key_stem = key[-1]
-        if key_stem in cont:
-            inner_cont = cont[key_stem]
-            return flag in inner_cont["flags"] or flag in inner_cont["recursive_flags"]
-        return False
-
-
-class NestedDict:
-    def __init__(self) -> None:
-        # The parsed content of the TOML document
-        self.dict: dict[str, Any] = {}
-
-    def get_or_create_nest(
-        self,
-        key: Key,
-        *,
-        access_lists: bool = True,
-    ) -> dict[str, Any]:
-        cont: Any = self.dict
-        for k in key:
-            if k not in cont:
-                cont[k] = {}
-            cont = cont[k]
-            if access_lists and isinstance(cont, list):
-                cont = cont[-1]
-            if not isinstance(cont, dict):
-                raise KeyError("There is no nest behind this key")
-        return cont  # type: ignore[no-any-return]
-
-    def append_nest_to_list(self, key: Key) -> None:
-        cont = self.get_or_create_nest(key[:-1])
-        last_key = key[-1]
-        if last_key in cont:
-            list_ = cont[last_key]
-            if not isinstance(list_, list):
-                raise KeyError("An object other than list found behind this key")
-            list_.append({})
-        else:
-            cont[last_key] = [{}]
-
-
-class Output:
-    def __init__(self) -> None:
-        self.data = NestedDict()
-        self.flags = Flags()
-
-
-def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
-    try:
-        while src[pos] in chars:
-            pos += 1
-    except IndexError:
-        pass
-    return pos
-
-
-def skip_until(
-    src: str,
-    pos: Pos,
-    expect: str,
-    *,
-    error_on: frozenset[str],
-    error_on_eof: bool,
-) -> Pos:
-    try:
-        new_pos = src.index(expect, pos)
-    except ValueError:
-        new_pos = len(src)
-        if error_on_eof:
-            raise TOMLDecodeError(f"Expected {expect!r}", src, new_pos) from None
-
-    if not error_on.isdisjoint(src[pos:new_pos]):
-        while src[pos] not in error_on:
-            pos += 1
-        raise TOMLDecodeError(f"Found invalid character {src[pos]!r}", src, pos)
-    return new_pos
-
-
-def skip_comment(src: str, pos: Pos) -> Pos:
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char == "#":
-        return skip_until(
-            src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
-        )
-    return pos
-
-
-def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
-    while True:
-        pos_before_skip = pos
-        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
-        pos = skip_comment(src, pos)
-        if pos == pos_before_skip:
-            return pos
-
-
-def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
-    pos += 1  # Skip "["
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, key = parse_key(src, pos)
-
-    if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
-        raise TOMLDecodeError(f"Cannot declare {key} twice", src, pos)
-    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
-    try:
-        out.data.get_or_create_nest(key)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-
-    if not src.startswith("]", pos):
-        raise TOMLDecodeError(
-            "Expected ']' at the end of a table declaration", src, pos
-        )
-    return pos + 1, key
-
-
-def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
-    pos += 2  # Skip "[["
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, key = parse_key(src, pos)
-
-    if out.flags.is_(key, Flags.FROZEN):
-        raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
-    # Free the namespace now that it points to another empty list item...
-    out.flags.unset_all(key)
-    # ...but this key precisely is still prohibited from table declaration
-    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
-    try:
-        out.data.append_nest_to_list(key)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-
-    if not src.startswith("]]", pos):
-        raise TOMLDecodeError(
-            "Expected ']]' at the end of an array declaration", src, pos
-        )
-    return pos + 2, key
-
-
-def key_value_rule(
-    src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
-) -> Pos:
-    pos, key, value = parse_key_value_pair(src, pos, parse_float, nest_lvl=0)
-    key_parent, key_stem = key[:-1], key[-1]
-    abs_key_parent = header + key_parent
-
-    relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
-    for cont_key in relative_path_cont_keys:
-        # Check that dotted key syntax does not redefine an existing table
-        if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
-            raise TOMLDecodeError(f"Cannot redefine namespace {cont_key}", src, pos)
-        # Containers in the relative path can't be opened with the table syntax or
-        # dotted key/value syntax in following table sections.
-        out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)
-
-    if out.flags.is_(abs_key_parent, Flags.FROZEN):
-        raise TOMLDecodeError(
-            f"Cannot mutate immutable namespace {abs_key_parent}", src, pos
-        )
-
-    try:
-        nest = out.data.get_or_create_nest(abs_key_parent)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-    if key_stem in nest:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos)
-    # Mark inline table and array namespaces recursively immutable
-    if isinstance(value, (dict, list)):
-        out.flags.set(header + key, Flags.FROZEN, recursive=True)
-    nest[key_stem] = value
-    return pos
-
-
-def parse_key_value_pair(
-    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
-) -> tuple[Pos, Key, Any]:
-    pos, key = parse_key(src, pos)
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char != "=":
-        raise TOMLDecodeError("Expected '=' after a key in a key/value pair", src, pos)
-    pos += 1
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, value = parse_value(src, pos, parse_float, nest_lvl)
-    return pos, key, value
-
-
-def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
-    pos, key_part = parse_key_part(src, pos)
-    key: Key = (key_part,)
-    pos = skip_chars(src, pos, TOML_WS)
-    while True:
-        try:
-            char: str | None = src[pos]
-        except IndexError:
-            char = None
-        if char != ".":
-            return pos, key
-        pos += 1
-        pos = skip_chars(src, pos, TOML_WS)
-        pos, key_part = parse_key_part(src, pos)
-        key += (key_part,)
-        pos = skip_chars(src, pos, TOML_WS)
-
-
-def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char in BARE_KEY_CHARS:
-        start_pos = pos
-        pos = skip_chars(src, pos, BARE_KEY_CHARS)
-        return pos, src[start_pos:pos]
-    if char == "'":
-        return parse_literal_str(src, pos)
-    if char == '"':
-        return parse_one_line_basic_str(src, pos)
-    raise TOMLDecodeError("Invalid initial character for a key part", src, pos)
-
-
-def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
-    pos += 1
-    return parse_basic_str(src, pos, multiline=False)
-
-
-def parse_array(
-    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
-) -> tuple[Pos, list[Any]]:
-    pos += 1
-    array: list[Any] = []
-
-    pos = skip_comments_and_array_ws(src, pos)
-    if src.startswith("]", pos):
-        return pos + 1, array
-    while True:
-        pos, val = parse_value(src, pos, parse_float, nest_lvl)
-        array.append(val)
-        pos = skip_comments_and_array_ws(src, pos)
-
-        c = src[pos : pos + 1]
-        if c == "]":
-            return pos + 1, array
-        if c != ",":
-            raise TOMLDecodeError("Unclosed array", src, pos)
-        pos += 1
-
-        pos = skip_comments_and_array_ws(src, pos)
-        if src.startswith("]", pos):
-            return pos + 1, array
-
-
-def parse_inline_table(
-    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
-) -> tuple[Pos, dict[str, Any]]:
-    pos += 1
-    nested_dict = NestedDict()
-    flags = Flags()
-
-    pos = skip_comments_and_array_ws(src, pos)
-    if src.startswith("}", pos):
-        return pos + 1, nested_dict.dict
-    while True:
-        pos, key, value = parse_key_value_pair(src, pos, parse_float, nest_lvl)
-        key_parent, key_stem = key[:-1], key[-1]
-        if flags.is_(key, Flags.FROZEN):
-            raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
-        try:
-            nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
-        except KeyError:
-            raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-        if key_stem in nest:
-            raise TOMLDecodeError(f"Duplicate inline table key {key_stem!r}", src, pos)
-        nest[key_stem] = value
-        pos = skip_comments_and_array_ws(src, pos)
-        c = src[pos : pos + 1]
-        if c == "}":
-            return pos + 1, nested_dict.dict
-        if c != ",":
-            raise TOMLDecodeError("Unclosed inline table", src, pos)
-        pos += 1
-        pos = skip_comments_and_array_ws(src, pos)
-        if src.startswith("}", pos):
-            return pos + 1, nested_dict.dict
-        if isinstance(value, (dict, list)):
-            flags.set(key, Flags.FROZEN, recursive=True)
-
-
-def parse_basic_str_escape(
-    src: str, pos: Pos, *, multiline: bool = False
-) -> tuple[Pos, str]:
-    escape_id = src[pos : pos + 2]
-    pos += 2
-    if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
-        # Skip whitespace until next non-whitespace character or end of
-        # the doc. Error if non-whitespace is found before newline.
-        if escape_id != "\\\n":
-            pos = skip_chars(src, pos, TOML_WS)
-            try:
-                char = src[pos]
-            except IndexError:
-                return pos, ""
-            if char != "\n":
-                raise TOMLDecodeError("Unescaped '\\' in a string", src, pos)
-            pos += 1
-        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
-        return pos, ""
-    if escape_id == "\\x":
-        return parse_hex_char(src, pos, 2)
-    if escape_id == "\\u":
-        return parse_hex_char(src, pos, 4)
-    if escape_id == "\\U":
-        return parse_hex_char(src, pos, 8)
-    try:
-        return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
-    except KeyError:
-        raise TOMLDecodeError("Unescaped '\\' in a string", src, pos) from None
-
-
-def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
-    return parse_basic_str_escape(src, pos, multiline=True)
-
-
-def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
-    hex_str = src[pos : pos + hex_len]
-    if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
-        raise TOMLDecodeError("Invalid hex value", src, pos)
-    pos += hex_len
-    hex_int = int(hex_str, 16)
-    if not is_unicode_scalar_value(hex_int):
-        raise TOMLDecodeError(
-            "Escaped character is not a Unicode scalar value", src, pos
-        )
-    return pos, chr(hex_int)
-
-
-def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
-    pos += 1  # Skip starting apostrophe
-    start_pos = pos
-    pos = skip_until(
-        src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
-    )
-    return pos + 1, src[start_pos:pos]  # Skip ending apostrophe
-
-
-def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
-    pos += 3
-    if src.startswith("\n", pos):
-        pos += 1
-
-    if literal:
-        delim = "'"
-        end_pos = skip_until(
-            src,
-            pos,
-            "'''",
-            error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
-            error_on_eof=True,
-        )
-        result = src[pos:end_pos]
-        pos = end_pos + 3
-    else:
-        delim = '"'
-        pos, result = parse_basic_str(src, pos, multiline=True)
-
-    # Add at maximum two extra apostrophes/quotes if the end sequence
-    # is 4 or 5 chars long instead of just 3.
-    if not src.startswith(delim, pos):
-        return pos, result
-    pos += 1
-    if not src.startswith(delim, pos):
-        return pos, result + delim
-    pos += 1
-    return pos, result + (delim * 2)
-
-
-def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
-    if multiline:
-        error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
-        parse_escapes = parse_basic_str_escape_multiline
-    else:
-        error_on = ILLEGAL_BASIC_STR_CHARS
-        parse_escapes = parse_basic_str_escape
-    result = ""
-    start_pos = pos
-    while True:
-        try:
-            char = src[pos]
-        except IndexError:
-            raise TOMLDecodeError("Unterminated string", src, pos) from None
-        if char == '"':
-            if not multiline:
-                return pos + 1, result + src[start_pos:pos]
-            if src.startswith('"""', pos):
-                return pos + 3, result + src[start_pos:pos]
-            pos += 1
-            continue
-        if char == "\\":
-            result += src[start_pos:pos]
-            pos, parsed_escape = parse_escapes(src, pos)
-            result += parsed_escape
-            start_pos = pos
-            continue
-        if char in error_on:
-            raise TOMLDecodeError(f"Illegal character {char!r}", src, pos)
-        pos += 1
-
-
-def parse_value(
-    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
-) -> tuple[Pos, Any]:
-    if nest_lvl > MAX_INLINE_NESTING:
-        # Pure Python should have raised RecursionError already.
-        # This ensures mypyc binaries eventually do the same.
-        raise RecursionError(  # pragma: no cover
-            "TOML inline arrays/tables are nested more than the allowed"
-            f" {MAX_INLINE_NESTING} levels"
-        )
-
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-
-    # IMPORTANT: order conditions based on speed of checking and likelihood
-
-    # Basic strings
-    if char == '"':
-        if src.startswith('"""', pos):
-            return parse_multiline_str(src, pos, literal=False)
-        return parse_one_line_basic_str(src, pos)
-
-    # Literal strings
-    if char == "'":
-        if src.startswith("'''", pos):
-            return parse_multiline_str(src, pos, literal=True)
-        return parse_literal_str(src, pos)
-
-    # Booleans
-    if char == "t":
-        if src.startswith("true", pos):
-            return pos + 4, True
-    if char == "f":
-        if src.startswith("false", pos):
-            return pos + 5, False
-
-    # Arrays
-    if char == "[":
-        return parse_array(src, pos, parse_float, nest_lvl + 1)
-
-    # Inline tables
-    if char == "{":
-        return parse_inline_table(src, pos, parse_float, nest_lvl + 1)
-
-    # Dates and times
-    datetime_match = RE_DATETIME.match(src, pos)
-    if datetime_match:
-        try:
-            datetime_obj = match_to_datetime(datetime_match)
-        except ValueError as e:
-            raise TOMLDecodeError("Invalid date or datetime", src, pos) from e
-        return datetime_match.end(), datetime_obj
-    localtime_match = RE_LOCALTIME.match(src, pos)
-    if localtime_match:
-        return localtime_match.end(), match_to_localtime(localtime_match)
-
-    # Integers and "normal" floats.
-    # The regex will greedily match any type starting with a decimal
-    # char, so needs to be located after handling of dates and times.
-    number_match = RE_NUMBER.match(src, pos)
-    if number_match:
-        return number_match.end(), match_to_number(number_match, parse_float)
-
-    # Special floats
-    first_three = src[pos : pos + 3]
-    if first_three in {"inf", "nan"}:
-        return pos + 3, parse_float(first_three)
-    first_four = src[pos : pos + 4]
-    if first_four in {"-inf", "+inf", "-nan", "+nan"}:
-        return pos + 4, parse_float(first_four)
-
-    raise TOMLDecodeError("Invalid value", src, pos)
-
-
-def is_unicode_scalar_value(codepoint: int) -> bool:
-    return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)
-
-
-def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
-    """A decorator to make `parse_float` safe.
-
-    `parse_float` must not return dicts or lists, because these types
-    would be mixed with parsed TOML tables and arrays, thus confusing
-    the parser. The returned decorated callable raises `ValueError`
-    instead of returning illegal types.
-    """
-    # The default `float` callable never returns illegal types. Optimize it.
-    if parse_float is float:
-        return float
-
-    def safe_parse_float(float_str: str) -> Any:
-        float_value = parse_float(float_str)
-        if isinstance(float_value, (dict, list)):
-            raise ValueError("parse_float must not return dicts or lists")
-        return float_value
-
-    return safe_parse_float
diff --git a/voxvera/vendor/setuptools/_vendor/tomli/_re.py b/voxvera/vendor/setuptools/_vendor/tomli/_re.py
deleted file mode 100644
index fc374ed..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli/_re.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
-# Licensed to PSF under a Contributor Agreement.
-
-from __future__ import annotations
-
-from datetime import date, datetime, time, timedelta, timezone, tzinfo
-from functools import lru_cache
-import re
-
-TYPE_CHECKING = False
-if TYPE_CHECKING:
-    from typing import Any, Final
-
-    from ._types import ParseFloat
-
-_TIME_RE_STR: Final = r"""
-([01][0-9]|2[0-3])             # hours
-:([0-5][0-9])                  # minutes
-(?:
-    :([0-5][0-9])              # optional seconds
-    (?:\.([0-9]{1,6})[0-9]*)?  # optional fractions of a second
-)?
-"""
-
-RE_NUMBER: Final = re.compile(
-    r"""
-0
-(?:
-    x[0-9A-Fa-f](?:_?[0-9A-Fa-f])*   # hex
-    |
-    b[01](?:_?[01])*                 # bin
-    |
-    o[0-7](?:_?[0-7])*               # oct
-)
-|
-[+-]?(?:0|[1-9](?:_?[0-9])*)         # dec, integer part
-(?P
-    (?:\.[0-9](?:_?[0-9])*)?         # optional fractional part
-    (?:[eE][+-]?[0-9](?:_?[0-9])*)?  # optional exponent part
-)
-""",
-    flags=re.VERBOSE,
-)
-RE_LOCALTIME: Final = re.compile(_TIME_RE_STR, flags=re.VERBOSE)
-RE_DATETIME: Final = re.compile(
-    rf"""
-([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])  # date, e.g. 1988-10-27
-(?:
-    [Tt ]
-    {_TIME_RE_STR}
-    (?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))?  # optional time offset
-)?
-""",
-    flags=re.VERBOSE,
-)
-
-
-def match_to_datetime(match: re.Match[str]) -> datetime | date:
-    """Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.
-
-    Raises ValueError if the match does not correspond to a valid date
-    or datetime.
-    """
-    (
-        year_str,
-        month_str,
-        day_str,
-        hour_str,
-        minute_str,
-        sec_str,
-        micros_str,
-        zulu_time,
-        offset_sign_str,
-        offset_hour_str,
-        offset_minute_str,
-    ) = match.groups()
-    year, month, day = int(year_str), int(month_str), int(day_str)
-    if hour_str is None:
-        return date(year, month, day)
-    hour, minute = int(hour_str), int(minute_str)
-    sec = int(sec_str) if sec_str else 0
-    micros = int(micros_str.ljust(6, "0")) if micros_str else 0
-    if offset_sign_str:
-        tz: tzinfo | None = cached_tz(
-            offset_hour_str, offset_minute_str, offset_sign_str
-        )
-    elif zulu_time:
-        tz = timezone.utc
-    else:  # local date-time
-        tz = None
-    return datetime(year, month, day, hour, minute, sec, micros, tzinfo=tz)
-
-
-# No need to limit cache size. This is only ever called on input
-# that matched RE_DATETIME, so there is an implicit bound of
-# 24 (hours) * 60 (minutes) * 2 (offset direction) = 2880.
-@lru_cache(maxsize=None)
-def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
-    sign = 1 if sign_str == "+" else -1
-    return timezone(
-        timedelta(
-            hours=sign * int(hour_str),
-            minutes=sign * int(minute_str),
-        )
-    )
-
-
-def match_to_localtime(match: re.Match[str]) -> time:
-    hour_str, minute_str, sec_str, micros_str = match.groups()
-    sec = int(sec_str) if sec_str else 0
-    micros = int(micros_str.ljust(6, "0")) if micros_str else 0
-    return time(int(hour_str), int(minute_str), sec, micros)
-
-
-def match_to_number(match: re.Match[str], parse_float: ParseFloat) -> Any:
-    if match.group("floatpart"):
-        return parse_float(match.group())
-    return int(match.group(), 0)
diff --git a/voxvera/vendor/setuptools/_vendor/tomli/_types.py b/voxvera/vendor/setuptools/_vendor/tomli/_types.py
deleted file mode 100644
index d949412..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli/_types.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
-# Licensed to PSF under a Contributor Agreement.
-
-from typing import Any, Callable, Tuple
-
-# Type annotations
-ParseFloat = Callable[[str], Any]
-Key = Tuple[str, ...]
-Pos = int
diff --git a/voxvera/vendor/setuptools/_vendor/tomli/py.typed b/voxvera/vendor/setuptools/_vendor/tomli/py.typed
deleted file mode 100644
index 7632ecf..0000000
--- a/voxvera/vendor/setuptools/_vendor/tomli/py.typed
+++ /dev/null
@@ -1 +0,0 @@
-# Marker file for PEP 561
diff --git a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/INSTALLER
deleted file mode 100644
index 5c69047..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-uv
\ No newline at end of file
diff --git a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/METADATA
deleted file mode 100644
index 77936a9..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/METADATA
+++ /dev/null
@@ -1,69 +0,0 @@
-Metadata-Version: 2.4
-Name: wheel
-Version: 0.46.3
-Summary: Command line tool for manipulating wheel files
-Keywords: wheel,packaging
-Author-email: Daniel Holth 
-Maintainer-email: Alex Grönholm 
-Requires-Python: >=3.9
-Description-Content-Type: text/x-rst
-License-Expression: MIT
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Topic :: System :: Archiving :: Packaging
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.9
-Classifier: Programming Language :: Python :: 3.10
-Classifier: Programming Language :: Python :: 3.11
-Classifier: Programming Language :: Python :: 3.12
-Classifier: Programming Language :: Python :: 3.13
-Classifier: Programming Language :: Python :: 3.14
-License-File: LICENSE.txt
-Requires-Dist: packaging >= 24.0
-Requires-Dist: pytest >= 6.0.0 ; extra == "test"
-Requires-Dist: setuptools >= 77 ; extra == "test"
-Project-URL: Changelog, https://wheel.readthedocs.io/en/stable/news.html
-Project-URL: Documentation, https://wheel.readthedocs.io/
-Project-URL: Issue Tracker, https://github.com/pypa/wheel/issues
-Project-URL: Source, https://github.com/pypa/wheel
-Provides-Extra: test
-
-wheel
-=====
-
-This is a command line tool for manipulating Python wheel files, as defined in
-`PEP 427`_. It contains the following functionality:
-
-* Convert ``.egg`` archives into ``.whl``
-* Unpack wheel archives
-* Repack wheel archives
-* Add or remove tags in existing wheel archives
-
-.. _PEP 427: https://www.python.org/dev/peps/pep-0427/
-
-Historical note
----------------
-
-This project used to contain the implementation of the setuptools_ ``bdist_wheel``
-command, but as of setuptools v70.1, it no longer needs ``wheel`` installed for that to
-work. Thus, you should install this **only** if you intend to use the ``wheel`` command
-line tool!
-
-.. _setuptools: https://pypi.org/project/setuptools/
-
-Documentation
--------------
-
-The documentation_ can be found on Read The Docs.
-
-.. _documentation: https://wheel.readthedocs.io/
-
-Code of Conduct
----------------
-
-Everyone interacting in the wheel project's codebases, issue trackers, chat
-rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
-
-.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
-
diff --git a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/RECORD
deleted file mode 100644
index 5890933..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/RECORD
+++ /dev/null
@@ -1,22 +0,0 @@
-bin/wheel,sha256=OLjFs9G7MQ-f_mhuW2aLGpngsyphW_v5FIoyN88Hfk0,339
-wheel-0.46.3.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-wheel-0.46.3.dist-info/METADATA,sha256=IpEKqXyonLzCCgGeJ_4xNgt5KaS9ZsoNMQ-ZpE9szTU,2410
-wheel-0.46.3.dist-info/RECORD,,
-wheel-0.46.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-wheel-0.46.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
-wheel-0.46.3.dist-info/entry_points.txt,sha256=JJdtSAGTvMLbIkTVZUAMvGKO39FtWfCVF8mp_NH6e4g,110
-wheel-0.46.3.dist-info/licenses/LICENSE.txt,sha256=MMI2GGeRCPPo6h0qZYx8pBe9_IkcmO8aifpP8MmChlQ,1107
-wheel/__init__.py,sha256=UweKvhe4SyP7zFyDoYo8BOuwTA6q3-_WpMmY2NNO54c,59
-wheel/__main__.py,sha256=_83wl9tyGU2cHiqfudpubGHdRL5uonPXnzeznznkxzs,512
-wheel/_bdist_wheel.py,sha256=bpmNa7_s-CYFkVgXf9ENAYTiJ01XBhRW4pxH1T8XYsI,21729
-wheel/_commands/__init__.py,sha256=fCRAQZNDyj2JLrufdgPsBlaRS_t_j_aBUMpXj09KZ4E,4432
-wheel/_commands/convert.py,sha256=0wSJMU0m-6LY16Om8Wmmloy-hJWFZeOmI8hT-2Z7Qms,12743
-wheel/_commands/pack.py,sha256=o3iwjfRHl7N9ul-M2kHbewLJZnqBLAWf0tzUCwoiTMw,3078
-wheel/_commands/tags.py,sha256=Rv2ySVb8-qX3osKp3uJgxcIMXkjt43XUD0-zvC6KvnY,4775
-wheel/_commands/unpack.py,sha256=AjDSS23XYyCSFfifnMutinrpPv-DK_2wbNHkKAUFwgM,1016
-wheel/_metadata.py,sha256=BP5jC9uC1hyicp7nL4FJ2LYixNFpEJIV_uMDY1KBZBg,6188
-wheel/_setuptools_logging.py,sha256=-5KC-lne0ilOUWIDfOkqapUWGMFZhuKYDIavIZiB5kM,781
-wheel/bdist_wheel.py,sha256=HrzYiSzMkh5ohAAhlQnYBS1p8qbr85X6F59xqxd9kBg,1102
-wheel/macosx_libfile.py,sha256=pL0wm88jRMl_4ASgGlNg_mz69Zmv5xm8JSkjLdwyvIQ,16712
-wheel/metadata.py,sha256=GknOO7JJiZMlcEe_fiD7nqnDTTLd0sX_-IgipM4L3-4,757
-wheel/wheelfile.py,sha256=m_g_7TNsEp-j-xnvSr5yDLEFb1nhyObueq9Q5_1_lBA,8720
diff --git a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/REQUESTED
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/WHEEL
deleted file mode 100644
index d8b9936..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/WHEEL
+++ /dev/null
@@ -1,4 +0,0 @@
-Wheel-Version: 1.0
-Generator: flit 3.12.0
-Root-Is-Purelib: true
-Tag: py3-none-any
diff --git a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/entry_points.txt b/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/entry_points.txt
deleted file mode 100644
index dcebd58..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/entry_points.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-[console_scripts]
-wheel=wheel._commands:main
-
-[distutils.commands]
-bdist_wheel=wheel.bdist_wheel:bdist_wheel
-
diff --git a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/licenses/LICENSE.txt b/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/licenses/LICENSE.txt
deleted file mode 100644
index a31470f..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel-0.46.3.dist-info/licenses/LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2012 Daniel Holth  and contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/__init__.py b/voxvera/vendor/setuptools/_vendor/wheel/__init__.py
deleted file mode 100644
index b5b076f..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from __future__ import annotations
-
-__version__ = "0.46.3"
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/__main__.py b/voxvera/vendor/setuptools/_vendor/wheel/__main__.py
deleted file mode 100644
index 3c7de5f..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/__main__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-Wheel command line tool (enables the ``python -m wheel`` syntax)
-"""
-
-from __future__ import annotations
-
-import sys
-from typing import NoReturn
-
-
-def main() -> NoReturn:  # needed for console script
-    if __package__ == "":
-        # To be able to run 'python wheel-0.9.whl/wheel':
-        import os.path
-
-        path = os.path.dirname(os.path.dirname(__file__))
-        sys.path[0:0] = [path]
-
-    from ._commands import main as cli_main
-
-    sys.exit(cli_main())
-
-
-if __name__ == "__main__":
-    main()
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/_bdist_wheel.py b/voxvera/vendor/setuptools/_vendor/wheel/_bdist_wheel.py
deleted file mode 100644
index 575fbfb..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/_bdist_wheel.py
+++ /dev/null
@@ -1,616 +0,0 @@
-"""
-Create a wheel (.whl) distribution.
-
-A wheel is a built archive format.
-"""
-
-from __future__ import annotations
-
-import logging
-import os
-import re
-import shutil
-import stat
-import struct
-import sys
-import sysconfig
-import warnings
-from collections.abc import Iterable, Sequence
-from email.generator import BytesGenerator, Generator
-from email.policy import EmailPolicy
-from glob import iglob
-from shutil import rmtree
-from typing import TYPE_CHECKING, Callable, Literal, cast
-from zipfile import ZIP_DEFLATED, ZIP_STORED
-
-import setuptools
-from packaging import tags
-from packaging import version as _packaging_version
-from setuptools import Command
-
-from . import __version__ as wheel_version
-from ._metadata import pkginfo_to_metadata
-from .wheelfile import WheelFile
-
-if TYPE_CHECKING:
-    import types
-
-# ensure Python logging is configured
-try:
-    __import__("setuptools.logging")
-except ImportError:
-    # setuptools < ??
-    from . import _setuptools_logging
-
-    _setuptools_logging.configure()
-
-log = logging.getLogger("wheel")
-
-
-def safe_name(name: str) -> str:
-    """Convert an arbitrary string to a standard distribution name
-    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
-    """
-    return re.sub("[^A-Za-z0-9.]+", "-", name)
-
-
-def safe_version(version: str) -> str:
-    """
-    Convert an arbitrary string to a standard version string
-    """
-    try:
-        # normalize the version
-        return str(_packaging_version.Version(version))
-    except _packaging_version.InvalidVersion:
-        version = version.replace(" ", ".")
-        return re.sub("[^A-Za-z0-9.]+", "-", version)
-
-
-setuptools_major_version = int(setuptools.__version__.split(".")[0])
-
-PY_LIMITED_API_PATTERN = r"cp3\d"
-
-
-def _is_32bit_interpreter() -> bool:
-    return struct.calcsize("P") == 4
-
-
-def python_tag() -> str:
-    return f"py{sys.version_info[0]}"
-
-
-def get_platform(archive_root: str | None) -> str:
-    """Return our platform name 'win32', 'linux_x86_64'"""
-    result = sysconfig.get_platform()
-    if result.startswith("macosx") and archive_root is not None:
-        from .macosx_libfile import calculate_macosx_platform_tag
-
-        result = calculate_macosx_platform_tag(archive_root, result)
-    elif _is_32bit_interpreter():
-        if result == "linux-x86_64":
-            # pip pull request #3497
-            result = "linux-i686"
-        elif result == "linux-aarch64":
-            # packaging pull request #234
-            # TODO armv8l, packaging pull request #690 => this did not land
-            # in pip/packaging yet
-            result = "linux-armv7l"
-
-    return result.replace("-", "_")
-
-
-def get_flag(
-    var: str, fallback: bool, expected: bool = True, warn: bool = True
-) -> bool:
-    """Use a fallback value for determining SOABI flags if the needed config
-    var is unset or unavailable."""
-    val = sysconfig.get_config_var(var)
-    if val is None:
-        if warn:
-            warnings.warn(
-                f"Config variable '{var}' is unset, Python ABI tag may be incorrect",
-                RuntimeWarning,
-                stacklevel=2,
-            )
-        return fallback
-    return val == expected
-
-
-def get_abi_tag() -> str | None:
-    """Return the ABI tag based on SOABI (if available) or emulate SOABI (PyPy2)."""
-    soabi: str = sysconfig.get_config_var("SOABI")
-    impl = tags.interpreter_name()
-    if not soabi and impl in ("cp", "pp") and hasattr(sys, "maxunicode"):
-        d = ""
-        m = ""
-        u = ""
-        if get_flag("Py_DEBUG", hasattr(sys, "gettotalrefcount"), warn=(impl == "cp")):
-            d = "d"
-
-        if get_flag(
-            "WITH_PYMALLOC",
-            impl == "cp",
-            warn=(impl == "cp" and sys.version_info < (3, 8)),
-        ) and sys.version_info < (3, 8):
-            m = "m"
-
-        abi = f"{impl}{tags.interpreter_version()}{d}{m}{u}"
-    elif soabi and impl == "cp" and soabi.startswith("cpython"):
-        # non-Windows
-        abi = "cp" + soabi.split("-")[1]
-    elif soabi and impl == "cp" and soabi.startswith("cp"):
-        # Windows
-        abi = soabi.split("-")[0]
-    elif soabi and impl == "pp":
-        # we want something like pypy36-pp73
-        abi = "-".join(soabi.split("-")[:2])
-        abi = abi.replace(".", "_").replace("-", "_")
-    elif soabi and impl == "graalpy":
-        abi = "-".join(soabi.split("-")[:3])
-        abi = abi.replace(".", "_").replace("-", "_")
-    elif soabi:
-        abi = soabi.replace(".", "_").replace("-", "_")
-    else:
-        abi = None
-
-    return abi
-
-
-def safer_name(name: str) -> str:
-    return safe_name(name).replace("-", "_")
-
-
-def safer_version(version: str) -> str:
-    return safe_version(version).replace("-", "_")
-
-
-def remove_readonly(
-    func: Callable[..., object],
-    path: str,
-    excinfo: tuple[type[Exception], Exception, types.TracebackType],
-) -> None:
-    remove_readonly_exc(func, path, excinfo[1])
-
-
-def remove_readonly_exc(func: Callable[..., object], path: str, exc: Exception) -> None:
-    os.chmod(path, stat.S_IWRITE)
-    func(path)
-
-
-class bdist_wheel(Command):
-    description = "create a wheel distribution"
-
-    supported_compressions = {
-        "stored": ZIP_STORED,
-        "deflated": ZIP_DEFLATED,
-    }
-
-    user_options = [
-        ("bdist-dir=", "b", "temporary directory for creating the distribution"),
-        (
-            "plat-name=",
-            "p",
-            "platform name to embed in generated filenames "
-            f"(default: {get_platform(None)})",
-        ),
-        (
-            "keep-temp",
-            "k",
-            "keep the pseudo-installation tree around after "
-            "creating the distribution archive",
-        ),
-        ("dist-dir=", "d", "directory to put final built distributions in"),
-        ("skip-build", None, "skip rebuilding everything (for testing/debugging)"),
-        (
-            "relative",
-            None,
-            "build the archive using relative paths (default: false)",
-        ),
-        (
-            "owner=",
-            "u",
-            "Owner name used when creating a tar file [default: current user]",
-        ),
-        (
-            "group=",
-            "g",
-            "Group name used when creating a tar file [default: current group]",
-        ),
-        ("universal", None, "make a universal wheel (default: false)"),
-        (
-            "compression=",
-            None,
-            "zipfile compression (one of: {}) (default: 'deflated')".format(
-                ", ".join(supported_compressions)
-            ),
-        ),
-        (
-            "python-tag=",
-            None,
-            f"Python implementation compatibility tag (default: '{python_tag()}')",
-        ),
-        (
-            "build-number=",
-            None,
-            "Build number for this particular version. "
-            "As specified in PEP-0427, this must start with a digit. "
-            "[default: None]",
-        ),
-        (
-            "py-limited-api=",
-            None,
-            "Python tag (cp32|cp33|cpNN) for abi3 wheel tag (default: false)",
-        ),
-    ]
-
-    boolean_options = ["keep-temp", "skip-build", "relative", "universal"]
-
-    def initialize_options(self):
-        self.bdist_dir: str = None
-        self.data_dir = None
-        self.plat_name: str | None = None
-        self.plat_tag = None
-        self.format = "zip"
-        self.keep_temp = False
-        self.dist_dir: str | None = None
-        self.egginfo_dir = None
-        self.root_is_pure: bool | None = None
-        self.skip_build = None
-        self.relative = False
-        self.owner = None
-        self.group = None
-        self.universal: bool = False
-        self.compression: str | int = "deflated"
-        self.python_tag: str = python_tag()
-        self.build_number: str | None = None
-        self.py_limited_api: str | Literal[False] = False
-        self.plat_name_supplied = False
-
-    def finalize_options(self):
-        if self.bdist_dir is None:
-            bdist_base = self.get_finalized_command("bdist").bdist_base
-            self.bdist_dir = os.path.join(bdist_base, "wheel")
-
-        egg_info = self.distribution.get_command_obj("egg_info")
-        egg_info.ensure_finalized()  # needed for correct `wheel_dist_name`
-
-        self.data_dir = self.wheel_dist_name + ".data"
-        self.plat_name_supplied = self.plat_name is not None
-
-        try:
-            self.compression = self.supported_compressions[self.compression]
-        except KeyError:
-            raise ValueError(f"Unsupported compression: {self.compression}") from None
-
-        need_options = ("dist_dir", "plat_name", "skip_build")
-
-        self.set_undefined_options("bdist", *zip(need_options, need_options))
-
-        self.root_is_pure = not (
-            self.distribution.has_ext_modules() or self.distribution.has_c_libraries()
-        )
-
-        if self.py_limited_api and not re.match(
-            PY_LIMITED_API_PATTERN, self.py_limited_api
-        ):
-            raise ValueError(f"py-limited-api must match '{PY_LIMITED_API_PATTERN}'")
-
-        # Support legacy [wheel] section for setting universal
-        wheel = self.distribution.get_option_dict("wheel")
-        if "universal" in wheel:
-            # please don't define this in your global configs
-            log.warning(
-                "The [wheel] section is deprecated. Use [bdist_wheel] instead.",
-            )
-            val = wheel["universal"][1].strip()
-            if val.lower() in ("1", "true", "yes"):
-                self.universal = True
-
-        if self.build_number is not None and not self.build_number[:1].isdigit():
-            raise ValueError("Build tag (build-number) must start with a digit.")
-
-    @property
-    def wheel_dist_name(self):
-        """Return distribution full name with - replaced with _"""
-        components = (
-            safer_name(self.distribution.get_name()),
-            safer_version(self.distribution.get_version()),
-        )
-        if self.build_number:
-            components += (self.build_number,)
-        return "-".join(components)
-
-    def get_tag(self) -> tuple[str, str, str]:
-        # bdist sets self.plat_name if unset, we should only use it for purepy
-        # wheels if the user supplied it.
-        if self.plat_name_supplied:
-            plat_name = cast(str, self.plat_name)
-        elif self.root_is_pure:
-            plat_name = "any"
-        else:
-            # macosx contains system version in platform name so need special handle
-            if self.plat_name and not self.plat_name.startswith("macosx"):
-                plat_name = self.plat_name
-            else:
-                # on macosx always limit the platform name to comply with any
-                # c-extension modules in bdist_dir, since the user can specify
-                # a higher MACOSX_DEPLOYMENT_TARGET via tools like CMake
-
-                # on other platforms, and on macosx if there are no c-extension
-                # modules, use the default platform name.
-                plat_name = get_platform(self.bdist_dir)
-
-            if _is_32bit_interpreter():
-                if plat_name in ("linux-x86_64", "linux_x86_64"):
-                    plat_name = "linux_i686"
-                if plat_name in ("linux-aarch64", "linux_aarch64"):
-                    # TODO armv8l, packaging pull request #690 => this did not land
-                    # in pip/packaging yet
-                    plat_name = "linux_armv7l"
-
-        plat_name = (
-            plat_name.lower().replace("-", "_").replace(".", "_").replace(" ", "_")
-        )
-
-        if self.root_is_pure:
-            if self.universal:
-                impl = "py2.py3"
-            else:
-                impl = self.python_tag
-            tag = (impl, "none", plat_name)
-        else:
-            impl_name = tags.interpreter_name()
-            impl_ver = tags.interpreter_version()
-            impl = impl_name + impl_ver
-            # We don't work on CPython 3.1, 3.0.
-            if self.py_limited_api and (impl_name + impl_ver).startswith("cp3"):
-                impl = self.py_limited_api
-                abi_tag = "abi3"
-            else:
-                abi_tag = str(get_abi_tag()).lower()
-            tag = (impl, abi_tag, plat_name)
-            # issue gh-374: allow overriding plat_name
-            supported_tags = [
-                (t.interpreter, t.abi, plat_name) for t in tags.sys_tags()
-            ]
-            assert tag in supported_tags, (
-                f"would build wheel with unsupported tag {tag}"
-            )
-        return tag
-
-    def run(self):
-        build_scripts = self.reinitialize_command("build_scripts")
-        build_scripts.executable = "python"
-        build_scripts.force = True
-
-        build_ext = self.reinitialize_command("build_ext")
-        build_ext.inplace = False
-
-        if not self.skip_build:
-            self.run_command("build")
-
-        install = self.reinitialize_command("install", reinit_subcommands=True)
-        install.root = self.bdist_dir
-        install.compile = False
-        install.skip_build = self.skip_build
-        install.warn_dir = False
-
-        # A wheel without setuptools scripts is more cross-platform.
-        # Use the (undocumented) `no_ep` option to setuptools'
-        # install_scripts command to avoid creating entry point scripts.
-        install_scripts = self.reinitialize_command("install_scripts")
-        install_scripts.no_ep = True
-
-        # Use a custom scheme for the archive, because we have to decide
-        # at installation time which scheme to use.
-        for key in ("headers", "scripts", "data", "purelib", "platlib"):
-            setattr(install, "install_" + key, os.path.join(self.data_dir, key))
-
-        basedir_observed = ""
-
-        if os.name == "nt":
-            # win32 barfs if any of these are ''; could be '.'?
-            # (distutils.command.install:change_roots bug)
-            basedir_observed = os.path.normpath(os.path.join(self.data_dir, ".."))
-            self.install_libbase = self.install_lib = basedir_observed
-
-        setattr(
-            install,
-            "install_purelib" if self.root_is_pure else "install_platlib",
-            basedir_observed,
-        )
-
-        log.info(f"installing to {self.bdist_dir}")
-
-        self.run_command("install")
-
-        impl_tag, abi_tag, plat_tag = self.get_tag()
-        archive_basename = f"{self.wheel_dist_name}-{impl_tag}-{abi_tag}-{plat_tag}"
-        if not self.relative:
-            archive_root = self.bdist_dir
-        else:
-            archive_root = os.path.join(
-                self.bdist_dir, self._ensure_relative(install.install_base)
-            )
-
-        self.set_undefined_options("install_egg_info", ("target", "egginfo_dir"))
-        distinfo_dirname = (
-            f"{safer_name(self.distribution.get_name())}-"
-            f"{safer_version(self.distribution.get_version())}.dist-info"
-        )
-        distinfo_dir = os.path.join(self.bdist_dir, distinfo_dirname)
-        self.egg2dist(self.egginfo_dir, distinfo_dir)
-
-        self.write_wheelfile(distinfo_dir)
-
-        # Make the archive
-        if not os.path.exists(self.dist_dir):
-            os.makedirs(self.dist_dir)
-
-        wheel_path = os.path.join(self.dist_dir, archive_basename + ".whl")
-        with WheelFile(wheel_path, "w", self.compression) as wf:
-            wf.write_files(archive_root)
-
-        # Add to 'Distribution.dist_files' so that the "upload" command works
-        getattr(self.distribution, "dist_files", []).append(
-            (
-                "bdist_wheel",
-                "{}.{}".format(*sys.version_info[:2]),  # like 3.7
-                wheel_path,
-            )
-        )
-
-        if not self.keep_temp:
-            log.info(f"removing {self.bdist_dir}")
-            if not self.dry_run:
-                if sys.version_info < (3, 12):
-                    rmtree(self.bdist_dir, onerror=remove_readonly)
-                else:
-                    rmtree(self.bdist_dir, onexc=remove_readonly_exc)
-
-    def write_wheelfile(
-        self, wheelfile_base: str, generator: str = f"bdist_wheel ({wheel_version})"
-    ):
-        from email.message import Message
-
-        msg = Message()
-        msg["Wheel-Version"] = "1.0"  # of the spec
-        msg["Generator"] = generator
-        msg["Root-Is-Purelib"] = str(self.root_is_pure).lower()
-        if self.build_number is not None:
-            msg["Build"] = self.build_number
-
-        # Doesn't work for bdist_wininst
-        impl_tag, abi_tag, plat_tag = self.get_tag()
-        for impl in impl_tag.split("."):
-            for abi in abi_tag.split("."):
-                for plat in plat_tag.split("."):
-                    msg["Tag"] = "-".join((impl, abi, plat))
-
-        wheelfile_path = os.path.join(wheelfile_base, "WHEEL")
-        log.info(f"creating {wheelfile_path}")
-        with open(wheelfile_path, "wb") as f:
-            BytesGenerator(f, maxheaderlen=0).flatten(msg)
-
-    def _ensure_relative(self, path: str) -> str:
-        # copied from dir_util, deleted
-        drive, path = os.path.splitdrive(path)
-        if path[0:1] == os.sep:
-            path = drive + path[1:]
-        return path
-
-    @property
-    def license_paths(self) -> Iterable[str]:
-        if setuptools_major_version >= 57:
-            # Setuptools has resolved any patterns to actual file names
-            return self.distribution.metadata.license_files or ()
-
-        files: set[str] = set()
-        metadata = self.distribution.get_option_dict("metadata")
-        if setuptools_major_version >= 42:
-            # Setuptools recognizes the license_files option but does not do globbing
-            patterns = cast(Sequence[str], self.distribution.metadata.license_files)
-        else:
-            # Prior to those, wheel is entirely responsible for handling license files
-            if "license_files" in metadata:
-                patterns = metadata["license_files"][1].split()
-            else:
-                patterns = ()
-
-        if "license_file" in metadata:
-            warnings.warn(
-                'The "license_file" option is deprecated. Use "license_files" instead.',
-                DeprecationWarning,
-                stacklevel=2,
-            )
-            files.add(metadata["license_file"][1])
-
-        if not files and not patterns and not isinstance(patterns, list):
-            patterns = ("LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*")
-
-        for pattern in patterns:
-            for path in iglob(pattern):
-                if path.endswith("~"):
-                    log.debug(
-                        f'ignoring license file "{path}" as it looks like a backup'
-                    )
-                    continue
-
-                if path not in files and os.path.isfile(path):
-                    log.info(
-                        f'adding license file "{path}" (matched pattern "{pattern}")'
-                    )
-                    files.add(path)
-
-        return files
-
-    def egg2dist(self, egginfo_path: str, distinfo_path: str):
-        """Convert an .egg-info directory into a .dist-info directory"""
-
-        def adios(p: str) -> None:
-            """Appropriately delete directory, file or link."""
-            if os.path.exists(p) and not os.path.islink(p) and os.path.isdir(p):
-                shutil.rmtree(p)
-            elif os.path.exists(p):
-                os.unlink(p)
-
-        adios(distinfo_path)
-
-        if not os.path.exists(egginfo_path):
-            # There is no egg-info. This is probably because the egg-info
-            # file/directory is not named matching the distribution name used
-            # to name the archive file. Check for this case and report
-            # accordingly.
-            import glob
-
-            pat = os.path.join(os.path.dirname(egginfo_path), "*.egg-info")
-            possible = glob.glob(pat)
-            err = f"Egg metadata expected at {egginfo_path} but not found"
-            if possible:
-                alt = os.path.basename(possible[0])
-                err += f" ({alt} found - possible misnamed archive file?)"
-
-            raise ValueError(err)
-
-        if os.path.isfile(egginfo_path):
-            # .egg-info is a single file
-            pkg_info = pkginfo_to_metadata(egginfo_path, egginfo_path)
-            os.mkdir(distinfo_path)
-        else:
-            # .egg-info is a directory
-            pkginfo_path = os.path.join(egginfo_path, "PKG-INFO")
-            pkg_info = pkginfo_to_metadata(egginfo_path, pkginfo_path)
-
-            # ignore common egg metadata that is useless to wheel
-            shutil.copytree(
-                egginfo_path,
-                distinfo_path,
-                ignore=lambda x, y: {
-                    "PKG-INFO",
-                    "requires.txt",
-                    "SOURCES.txt",
-                    "not-zip-safe",
-                },
-            )
-
-            # delete dependency_links if it is only whitespace
-            dependency_links_path = os.path.join(distinfo_path, "dependency_links.txt")
-            with open(dependency_links_path, encoding="utf-8") as dependency_links_file:
-                dependency_links = dependency_links_file.read().strip()
-            if not dependency_links:
-                adios(dependency_links_path)
-
-        pkg_info_path = os.path.join(distinfo_path, "METADATA")
-        serialization_policy = EmailPolicy(
-            utf8=True,
-            mangle_from_=False,
-            max_line_length=0,
-        )
-        with open(pkg_info_path, "w", encoding="utf-8") as out:
-            Generator(out, policy=serialization_policy).flatten(pkg_info)
-
-        for license_path in self.license_paths:
-            filename = os.path.basename(license_path)
-            shutil.copy(license_path, os.path.join(distinfo_path, filename))
-
-        adios(egginfo_path)
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/_commands/__init__.py b/voxvera/vendor/setuptools/_vendor/wheel/_commands/__init__.py
deleted file mode 100644
index 42f1d7e..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/_commands/__init__.py
+++ /dev/null
@@ -1,153 +0,0 @@
-"""
-Wheel command-line utility.
-"""
-
-from __future__ import annotations
-
-import argparse
-import os
-import sys
-from argparse import ArgumentTypeError
-
-from ..wheelfile import WheelError
-
-
-def unpack_f(args: argparse.Namespace) -> None:
-    from .unpack import unpack
-
-    unpack(args.wheelfile, args.dest)
-
-
-def pack_f(args: argparse.Namespace) -> None:
-    from .pack import pack
-
-    pack(args.directory, args.dest_dir, args.build_number)
-
-
-def convert_f(args: argparse.Namespace) -> None:
-    from .convert import convert
-
-    convert(args.files, args.dest_dir, args.verbose)
-
-
-def tags_f(args: argparse.Namespace) -> None:
-    from .tags import tags
-
-    names = (
-        tags(
-            wheel,
-            args.python_tag,
-            args.abi_tag,
-            args.platform_tag,
-            args.build,
-            args.remove,
-        )
-        for wheel in args.wheel
-    )
-
-    for name in names:
-        print(name)
-
-
-def version_f(args: argparse.Namespace) -> None:
-    from .. import __version__
-
-    print(f"wheel {__version__}")
-
-
-def parse_build_tag(build_tag: str) -> str:
-    if build_tag and not build_tag[0].isdigit():
-        raise ArgumentTypeError("build tag must begin with a digit")
-    elif "-" in build_tag:
-        raise ArgumentTypeError("invalid character ('-') in build tag")
-
-    return build_tag
-
-
-TAGS_HELP = """\
-Make a new wheel with given tags. Any tags unspecified will remain the same.
-Starting the tags with a "+" will append to the existing tags. Starting with a
-"-" will remove a tag (use --option=-TAG syntax). Multiple tags can be
-separated by ".". The original file will remain unless --remove is given.  The
-output filename(s) will be displayed on stdout for further processing.
-"""
-
-
-def parser() -> argparse.ArgumentParser:
-    p = argparse.ArgumentParser()
-    s = p.add_subparsers(help="commands")
-
-    unpack_parser = s.add_parser("unpack", help="Unpack wheel")
-    unpack_parser.add_argument(
-        "--dest", "-d", help="Destination directory", default="."
-    )
-    unpack_parser.add_argument("wheelfile", help="Wheel file")
-    unpack_parser.set_defaults(func=unpack_f)
-
-    repack_parser = s.add_parser("pack", help="Repack wheel")
-    repack_parser.add_argument("directory", help="Root directory of the unpacked wheel")
-    repack_parser.add_argument(
-        "--dest-dir",
-        "-d",
-        default=os.path.curdir,
-        help="Directory to store the wheel (default %(default)s)",
-    )
-    repack_parser.add_argument(
-        "--build-number", help="Build tag to use in the wheel name"
-    )
-    repack_parser.set_defaults(func=pack_f)
-
-    convert_parser = s.add_parser("convert", help="Convert egg or wininst to wheel")
-    convert_parser.add_argument("files", nargs="*", help="Files to convert")
-    convert_parser.add_argument(
-        "--dest-dir",
-        "-d",
-        default=os.path.curdir,
-        help="Directory to store wheels (default %(default)s)",
-    )
-    convert_parser.add_argument("--verbose", "-v", action="store_true")
-    convert_parser.set_defaults(func=convert_f)
-
-    tags_parser = s.add_parser(
-        "tags", help="Add or replace the tags on a wheel", description=TAGS_HELP
-    )
-    tags_parser.add_argument("wheel", nargs="*", help="Existing wheel(s) to retag")
-    tags_parser.add_argument(
-        "--remove",
-        action="store_true",
-        help="Remove the original files, keeping only the renamed ones",
-    )
-    tags_parser.add_argument(
-        "--python-tag", metavar="TAG", help="Specify an interpreter tag(s)"
-    )
-    tags_parser.add_argument("--abi-tag", metavar="TAG", help="Specify an ABI tag(s)")
-    tags_parser.add_argument(
-        "--platform-tag", metavar="TAG", help="Specify a platform tag(s)"
-    )
-    tags_parser.add_argument(
-        "--build", type=parse_build_tag, metavar="BUILD", help="Specify a build tag"
-    )
-    tags_parser.set_defaults(func=tags_f)
-
-    version_parser = s.add_parser("version", help="Print version and exit")
-    version_parser.set_defaults(func=version_f)
-
-    help_parser = s.add_parser("help", help="Show this help")
-    help_parser.set_defaults(func=lambda args: p.print_help())
-
-    return p
-
-
-def main() -> int:
-    p = parser()
-    args = p.parse_args()
-    if not hasattr(args, "func"):
-        p.print_help()
-    else:
-        try:
-            args.func(args)
-            return 0
-        except WheelError as e:
-            print(e, file=sys.stderr)
-
-    return 1
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/_commands/convert.py b/voxvera/vendor/setuptools/_vendor/wheel/_commands/convert.py
deleted file mode 100644
index cafd12c..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/_commands/convert.py
+++ /dev/null
@@ -1,337 +0,0 @@
-from __future__ import annotations
-
-import os.path
-import re
-from abc import ABCMeta, abstractmethod
-from collections import defaultdict
-from collections.abc import Iterator
-from email.message import Message
-from email.parser import Parser
-from email.policy import EmailPolicy
-from glob import iglob
-from pathlib import Path
-from textwrap import dedent
-from zipfile import ZipFile
-
-from packaging.tags import parse_tag
-
-from .. import __version__
-from .._metadata import generate_requirements
-from ..wheelfile import WheelFile
-
-egg_filename_re = re.compile(
-    r"""
-    (?P.+?)-(?P.+?)
-    (-(?Ppy\d\.\d+)
-     (-(?P.+?))?
-    )?.egg$""",
-    re.VERBOSE,
-)
-egg_info_re = re.compile(
-    r"""
-    ^(?P.+?)-(?P.+?)
-    (-(?Ppy\d\.\d+)
-    )?.egg-info/""",
-    re.VERBOSE,
-)
-wininst_re = re.compile(
-    r"\.(?Pwin32|win-amd64)(?:-(?Ppy\d\.\d))?\.exe$"
-)
-pyd_re = re.compile(r"\.(?P[a-z0-9]+)-(?Pwin32|win_amd64)\.pyd$")
-serialization_policy = EmailPolicy(
-    utf8=True,
-    mangle_from_=False,
-    max_line_length=0,
-)
-GENERATOR = f"wheel {__version__}"
-
-
-def convert_requires(requires: str, metadata: Message) -> None:
-    extra: str | None = None
-    requirements: dict[str | None, list[str]] = defaultdict(list)
-    for line in requires.splitlines():
-        line = line.strip()
-        if not line:
-            continue
-
-        if line.startswith("[") and line.endswith("]"):
-            extra = line[1:-1]
-            continue
-
-        requirements[extra].append(line)
-
-    for key, value in generate_requirements(requirements):
-        metadata.add_header(key, value)
-
-
-def convert_pkg_info(pkginfo: str, metadata: Message) -> None:
-    parsed_message = Parser().parsestr(pkginfo)
-    for key, value in parsed_message.items():
-        key_lower = key.lower()
-        if value == "UNKNOWN":
-            continue
-
-        if key_lower == "description":
-            description_lines = value.splitlines()
-            if description_lines:
-                value = "\n".join(
-                    (
-                        description_lines[0].lstrip(),
-                        dedent("\n".join(description_lines[1:])),
-                        "\n",
-                    )
-                )
-            else:
-                value = "\n"
-
-            metadata.set_payload(value)
-        elif key_lower == "home-page":
-            metadata.add_header("Project-URL", f"Homepage, {value}")
-        elif key_lower == "download-url":
-            metadata.add_header("Project-URL", f"Download, {value}")
-        else:
-            metadata.add_header(key, value)
-
-    metadata.replace_header("Metadata-Version", "2.4")
-
-
-def normalize(name: str) -> str:
-    return re.sub(r"[-_.]+", "-", name).lower().replace("-", "_")
-
-
-class ConvertSource(metaclass=ABCMeta):
-    name: str
-    version: str
-    pyver: str = "py2.py3"
-    abi: str = "none"
-    platform: str = "any"
-    metadata: Message
-
-    @property
-    def dist_info_dir(self) -> str:
-        return f"{self.name}-{self.version}.dist-info"
-
-    @abstractmethod
-    def generate_contents(self) -> Iterator[tuple[str, bytes]]:
-        pass
-
-
-class EggFileSource(ConvertSource):
-    def __init__(self, path: Path):
-        if not (match := egg_filename_re.match(path.name)):
-            raise ValueError(f"Invalid egg file name: {path.name}")
-
-        # Binary wheels are assumed to be for CPython
-        self.path = path
-        self.name = normalize(match.group("name"))
-        self.version = match.group("ver")
-        if pyver := match.group("pyver"):
-            self.pyver = pyver.replace(".", "")
-            if arch := match.group("arch"):
-                self.abi = self.pyver.replace("py", "cp")
-                self.platform = normalize(arch)
-
-        self.metadata = Message()
-
-    def generate_contents(self) -> Iterator[tuple[str, bytes]]:
-        with ZipFile(self.path, "r") as zip_file:
-            for filename in sorted(zip_file.namelist()):
-                # Skip pure directory entries
-                if filename.endswith("/"):
-                    continue
-
-                # Handle files in the egg-info directory specially, selectively moving
-                # them to the dist-info directory while converting as needed
-                if filename.startswith("EGG-INFO/"):
-                    if filename == "EGG-INFO/requires.txt":
-                        requires = zip_file.read(filename).decode("utf-8")
-                        convert_requires(requires, self.metadata)
-                    elif filename == "EGG-INFO/PKG-INFO":
-                        pkginfo = zip_file.read(filename).decode("utf-8")
-                        convert_pkg_info(pkginfo, self.metadata)
-                    elif filename == "EGG-INFO/entry_points.txt":
-                        yield (
-                            f"{self.dist_info_dir}/entry_points.txt",
-                            zip_file.read(filename),
-                        )
-
-                    continue
-
-                # For any other file, just pass it through
-                yield filename, zip_file.read(filename)
-
-
-class EggDirectorySource(EggFileSource):
-    def generate_contents(self) -> Iterator[tuple[str, bytes]]:
-        for dirpath, _, filenames in os.walk(self.path):
-            for filename in sorted(filenames):
-                path = Path(dirpath, filename)
-                if path.parent.name == "EGG-INFO":
-                    if path.name == "requires.txt":
-                        requires = path.read_text("utf-8")
-                        convert_requires(requires, self.metadata)
-                    elif path.name == "PKG-INFO":
-                        pkginfo = path.read_text("utf-8")
-                        convert_pkg_info(pkginfo, self.metadata)
-                        if name := self.metadata.get("Name"):
-                            self.name = normalize(name)
-
-                        if version := self.metadata.get("Version"):
-                            self.version = version
-                    elif path.name == "entry_points.txt":
-                        yield (
-                            f"{self.dist_info_dir}/entry_points.txt",
-                            path.read_bytes(),
-                        )
-
-                    continue
-
-                # For any other file, just pass it through
-                yield str(path.relative_to(self.path)), path.read_bytes()
-
-
-class WininstFileSource(ConvertSource):
-    """
-    Handles distributions created with ``bdist_wininst``.
-
-    The egginfo filename has the format::
-
-        name-ver(-pyver)(-arch).egg-info
-
-    The installer filename has the format::
-
-        name-ver.arch(-pyver).exe
-
-    Some things to note:
-
-    1. The installer filename is not definitive. An installer can be renamed
-       and work perfectly well as an installer. So more reliable data should
-       be used whenever possible.
-    2. The egg-info data should be preferred for the name and version, because
-       these come straight from the distutils metadata, and are mandatory.
-    3. The pyver from the egg-info data should be ignored, as it is
-       constructed from the version of Python used to build the installer,
-       which is irrelevant - the installer filename is correct here (even to
-       the point that when it's not there, any version is implied).
-    4. The architecture must be taken from the installer filename, as it is
-       not included in the egg-info data.
-    5. Architecture-neutral installers still have an architecture because the
-       installer format itself (being executable) is architecture-specific. We
-       should therefore ignore the architecture if the content is pure-python.
-    """
-
-    def __init__(self, path: Path):
-        self.path = path
-        self.metadata = Message()
-
-        # Determine the initial architecture and Python version from the file name
-        # (if possible)
-        if match := wininst_re.search(path.name):
-            self.platform = normalize(match.group("platform"))
-            if pyver := match.group("pyver"):
-                self.pyver = pyver.replace(".", "")
-
-        # Look for an .egg-info directory and any .pyd files for more precise info
-        egg_info_found = pyd_found = False
-        with ZipFile(self.path) as zip_file:
-            for filename in zip_file.namelist():
-                prefix, filename = filename.split("/", 1)
-                if not egg_info_found and (match := egg_info_re.match(filename)):
-                    egg_info_found = True
-                    self.name = normalize(match.group("name"))
-                    self.version = match.group("ver")
-                    if pyver := match.group("pyver"):
-                        self.pyver = pyver.replace(".", "")
-                elif not pyd_found and (match := pyd_re.search(filename)):
-                    pyd_found = True
-                    self.abi = match.group("abi")
-                    self.platform = match.group("platform")
-
-                if egg_info_found and pyd_found:
-                    break
-
-    def generate_contents(self) -> Iterator[tuple[str, bytes]]:
-        dist_info_dir = f"{self.name}-{self.version}.dist-info"
-        data_dir = f"{self.name}-{self.version}.data"
-        with ZipFile(self.path, "r") as zip_file:
-            for filename in sorted(zip_file.namelist()):
-                # Skip pure directory entries
-                if filename.endswith("/"):
-                    continue
-
-                # Handle files in the egg-info directory specially, selectively moving
-                # them to the dist-info directory while converting as needed
-                prefix, target_filename = filename.split("/", 1)
-                if egg_info_re.search(target_filename):
-                    basename = target_filename.rsplit("/", 1)[-1]
-                    if basename == "requires.txt":
-                        requires = zip_file.read(filename).decode("utf-8")
-                        convert_requires(requires, self.metadata)
-                    elif basename == "PKG-INFO":
-                        pkginfo = zip_file.read(filename).decode("utf-8")
-                        convert_pkg_info(pkginfo, self.metadata)
-                    elif basename == "entry_points.txt":
-                        yield (
-                            f"{dist_info_dir}/entry_points.txt",
-                            zip_file.read(filename),
-                        )
-
-                    continue
-                elif prefix == "SCRIPTS":
-                    target_filename = f"{data_dir}/scripts/{target_filename}"
-
-                # For any other file, just pass it through
-                yield target_filename, zip_file.read(filename)
-
-
-def convert(files: list[str], dest_dir: str, verbose: bool) -> None:
-    for pat in files:
-        for archive in iglob(pat):
-            path = Path(archive)
-            if path.suffix == ".egg":
-                if path.is_dir():
-                    source: ConvertSource = EggDirectorySource(path)
-                else:
-                    source = EggFileSource(path)
-            else:
-                source = WininstFileSource(path)
-
-            if verbose:
-                print(f"{archive}...", flush=True, end="")
-
-            dest_path = Path(dest_dir) / (
-                f"{source.name}-{source.version}-{source.pyver}-{source.abi}"
-                f"-{source.platform}.whl"
-            )
-            with WheelFile(dest_path, "w") as wheelfile:
-                for name_or_zinfo, contents in source.generate_contents():
-                    wheelfile.writestr(name_or_zinfo, contents)
-
-                # Write the METADATA file
-                wheelfile.writestr(
-                    f"{source.dist_info_dir}/METADATA",
-                    source.metadata.as_string(policy=serialization_policy).encode(
-                        "utf-8"
-                    ),
-                )
-
-                # Write the WHEEL file
-                wheel_message = Message()
-                wheel_message.add_header("Wheel-Version", "1.0")
-                wheel_message.add_header("Generator", GENERATOR)
-                wheel_message.add_header(
-                    "Root-Is-Purelib", str(source.platform == "any").lower()
-                )
-                tags = parse_tag(f"{source.pyver}-{source.abi}-{source.platform}")
-                for tag in sorted(tags, key=lambda tag: tag.interpreter):
-                    wheel_message.add_header("Tag", str(tag))
-
-                wheelfile.writestr(
-                    f"{source.dist_info_dir}/WHEEL",
-                    wheel_message.as_string(policy=serialization_policy).encode(
-                        "utf-8"
-                    ),
-                )
-
-            if verbose:
-                print("OK")
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/_commands/pack.py b/voxvera/vendor/setuptools/_vendor/wheel/_commands/pack.py
deleted file mode 100644
index 1321ce9..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/_commands/pack.py
+++ /dev/null
@@ -1,84 +0,0 @@
-from __future__ import annotations
-
-import email.policy
-import os.path
-import re
-from email.generator import BytesGenerator
-from email.parser import BytesParser
-
-from ..wheelfile import WheelError, WheelFile
-
-DIST_INFO_RE = re.compile(r"^(?P(?P.+?)-(?P\d.*?))\.dist-info$")
-
-
-def pack(directory: str, dest_dir: str, build_number: str | None) -> None:
-    """Repack a previously unpacked wheel directory into a new wheel file.
-
-    The .dist-info/WHEEL file must contain one or more tags so that the target
-    wheel file name can be determined.
-
-    :param directory: The unpacked wheel directory
-    :param dest_dir: Destination directory (defaults to the current directory)
-    """
-    # Find the .dist-info directory
-    dist_info_dirs = [
-        fn
-        for fn in os.listdir(directory)
-        if os.path.isdir(os.path.join(directory, fn)) and DIST_INFO_RE.match(fn)
-    ]
-    if len(dist_info_dirs) > 1:
-        raise WheelError(f"Multiple .dist-info directories found in {directory}")
-    elif not dist_info_dirs:
-        raise WheelError(f"No .dist-info directories found in {directory}")
-
-    # Determine the target wheel filename
-    dist_info_dir = dist_info_dirs[0]
-    name_version = DIST_INFO_RE.match(dist_info_dir).group("namever")
-
-    # Read the tags and the existing build number from .dist-info/WHEEL
-    wheel_file_path = os.path.join(directory, dist_info_dir, "WHEEL")
-    with open(wheel_file_path, "rb") as f:
-        info = BytesParser(policy=email.policy.compat32).parse(f)
-        tags: list[str] = info.get_all("Tag", [])
-        existing_build_number = info.get("Build")
-
-        if not tags:
-            raise WheelError(
-                f"No tags present in {dist_info_dir}/WHEEL; cannot determine target "
-                f"wheel filename"
-            )
-
-    # Set the wheel file name and add/replace/remove the Build tag in .dist-info/WHEEL
-    build_number = build_number if build_number is not None else existing_build_number
-    if build_number is not None:
-        del info["Build"]
-        if build_number:
-            info["Build"] = build_number
-            name_version += "-" + build_number
-
-        if build_number != existing_build_number:
-            with open(wheel_file_path, "wb") as f:
-                BytesGenerator(f, maxheaderlen=0).flatten(info)
-
-    # Reassemble the tags for the wheel file
-    tagline = compute_tagline(tags)
-
-    # Repack the wheel
-    wheel_path = os.path.join(dest_dir, f"{name_version}-{tagline}.whl")
-    with WheelFile(wheel_path, "w") as wf:
-        print(f"Repacking wheel as {wheel_path}...", end="", flush=True)
-        wf.write_files(directory)
-
-    print("OK")
-
-
-def compute_tagline(tags: list[str]) -> str:
-    """Compute a tagline from a list of tags.
-
-    :param tags: A list of tags
-    :return: A tagline
-    """
-    impls = sorted({tag.split("-")[0] for tag in tags})
-    abivers = sorted({tag.split("-")[1] for tag in tags})
-    platforms = sorted({tag.split("-")[2] for tag in tags})
-    return "-".join([".".join(impls), ".".join(abivers), ".".join(platforms)])
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/_commands/tags.py b/voxvera/vendor/setuptools/_vendor/wheel/_commands/tags.py
deleted file mode 100644
index cec896b..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/_commands/tags.py
+++ /dev/null
@@ -1,140 +0,0 @@
-from __future__ import annotations
-
-import email.policy
-import itertools
-import os
-from collections.abc import Iterable
-from email.parser import BytesParser
-
-from ..wheelfile import WheelFile
-
-
-def _compute_tags(original_tags: Iterable[str], new_tags: str | None) -> set[str]:
-    """Add or replace tags. Supports dot-separated tags"""
-    if new_tags is None:
-        return set(original_tags)
-
-    if new_tags.startswith("+"):
-        return {*original_tags, *new_tags[1:].split(".")}
-
-    if new_tags.startswith("-"):
-        return set(original_tags) - set(new_tags[1:].split("."))
-
-    return set(new_tags.split("."))
-
-
-def tags(
-    wheel: str,
-    python_tags: str | None = None,
-    abi_tags: str | None = None,
-    platform_tags: str | None = None,
-    build_tag: str | None = None,
-    remove: bool = False,
-) -> str:
-    """Change the tags on a wheel file.
-
-    The tags are left unchanged if they are not specified. To specify "none",
-    use ["none"]. To append to the previous tags, a tag should start with a
-    "+".  If a tag starts with "-", it will be removed from existing tags.
-    Processing is done left to right.
-
-    :param wheel: The paths to the wheels
-    :param python_tags: The Python tags to set
-    :param abi_tags: The ABI tags to set
-    :param platform_tags: The platform tags to set
-    :param build_tag: The build tag to set
-    :param remove: Remove the original wheel
-    """
-    with WheelFile(wheel, "r") as f:
-        assert f.filename, f"{f.filename} must be available"
-
-        wheel_info = f.read(f.dist_info_path + "/WHEEL")
-        info = BytesParser(policy=email.policy.compat32).parsebytes(wheel_info)
-
-        original_wheel_name = os.path.basename(f.filename)
-        namever = f.parsed_filename.group("namever")
-        build = f.parsed_filename.group("build")
-        original_python_tags = f.parsed_filename.group("pyver").split(".")
-        original_abi_tags = f.parsed_filename.group("abi").split(".")
-        original_plat_tags = f.parsed_filename.group("plat").split(".")
-
-    tags: list[str] = info.get_all("Tag", [])
-    existing_build_tag = info.get("Build")
-
-    impls = {tag.split("-")[0] for tag in tags}
-    abivers = {tag.split("-")[1] for tag in tags}
-    platforms = {tag.split("-")[2] for tag in tags}
-
-    if impls != set(original_python_tags):
-        msg = f"Wheel internal tags {impls!r} != filename tags {original_python_tags!r}"
-        raise AssertionError(msg)
-
-    if abivers != set(original_abi_tags):
-        msg = f"Wheel internal tags {abivers!r} != filename tags {original_abi_tags!r}"
-        raise AssertionError(msg)
-
-    if platforms != set(original_plat_tags):
-        msg = (
-            f"Wheel internal tags {platforms!r} != filename tags {original_plat_tags!r}"
-        )
-        raise AssertionError(msg)
-
-    if existing_build_tag != build:
-        msg = (
-            f"Incorrect filename '{build}' "
-            f"& *.dist-info/WHEEL '{existing_build_tag}' build numbers"
-        )
-        raise AssertionError(msg)
-
-    # Start changing as needed
-    if build_tag is not None:
-        build = build_tag
-
-    final_python_tags = sorted(_compute_tags(original_python_tags, python_tags))
-    final_abi_tags = sorted(_compute_tags(original_abi_tags, abi_tags))
-    final_plat_tags = sorted(_compute_tags(original_plat_tags, platform_tags))
-
-    final_tags = [
-        namever,
-        ".".join(final_python_tags),
-        ".".join(final_abi_tags),
-        ".".join(final_plat_tags),
-    ]
-    if build:
-        final_tags.insert(1, build)
-
-    final_wheel_name = "-".join(final_tags) + ".whl"
-
-    if original_wheel_name != final_wheel_name:
-        del info["Tag"], info["Build"]
-        for a, b, c in itertools.product(
-            final_python_tags, final_abi_tags, final_plat_tags
-        ):
-            info["Tag"] = f"{a}-{b}-{c}"
-        if build:
-            info["Build"] = build
-
-        original_wheel_path = os.path.join(
-            os.path.dirname(f.filename), original_wheel_name
-        )
-        final_wheel_path = os.path.join(os.path.dirname(f.filename), final_wheel_name)
-
-        with (
-            WheelFile(original_wheel_path, "r") as fin,
-            WheelFile(final_wheel_path, "w") as fout,
-        ):
-            fout.comment = fin.comment  # preserve the comment
-            for item in fin.infolist():
-                if item.is_dir():
-                    continue
-                if item.filename == f.dist_info_path + "/RECORD":
-                    continue
-                if item.filename == f.dist_info_path + "/WHEEL":
-                    fout.writestr(item, info.as_bytes())
-                else:
-                    fout.writestr(item, fin.read(item))
-
-        if remove:
-            os.remove(original_wheel_path)
-
-    return final_wheel_name
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/_commands/unpack.py b/voxvera/vendor/setuptools/_vendor/wheel/_commands/unpack.py
deleted file mode 100644
index 83dc742..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/_commands/unpack.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from __future__ import annotations
-
-from pathlib import Path
-
-from ..wheelfile import WheelFile
-
-
-def unpack(path: str, dest: str = ".") -> None:
-    """Unpack a wheel.
-
-    Wheel content will be unpacked to {dest}/{name}-{ver}, where {name}
-    is the package name and {ver} its version.
-
-    :param path: The path to the wheel.
-    :param dest: Destination directory (default to current directory).
-    """
-    with WheelFile(path) as wf:
-        namever = wf.parsed_filename.group("namever")
-        destination = Path(dest) / namever
-        print(f"Unpacking to: {destination}...", end="", flush=True)
-        for zinfo in wf.filelist:
-            target_path = Path(wf.extract(zinfo, destination))
-
-            # Set permissions to the same values as they were set in the archive
-            # We have to do this manually due to
-            # https://github.com/python/cpython/issues/59999
-            permissions = zinfo.external_attr >> 16 & 0o777
-            target_path.chmod(permissions)
-
-    print("OK")
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/_metadata.py b/voxvera/vendor/setuptools/_vendor/wheel/_metadata.py
deleted file mode 100644
index e17a7b9..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/_metadata.py
+++ /dev/null
@@ -1,184 +0,0 @@
-"""
-Tools for converting old- to new-style metadata.
-"""
-
-from __future__ import annotations
-
-import functools
-import itertools
-import os.path
-import re
-import textwrap
-from collections.abc import Generator, Iterable, Iterator
-from email.message import Message
-from email.parser import Parser
-from typing import Literal
-
-from packaging.requirements import Requirement
-
-
-def _nonblank(str: str) -> bool | Literal[""]:
-    return str and not str.startswith("#")
-
-
-@functools.singledispatch
-def yield_lines(iterable: Iterable[str]) -> Iterator[str]:
-    r"""
-    Yield valid lines of a string or iterable.
-    >>> list(yield_lines(''))
-    []
-    >>> list(yield_lines(['foo', 'bar']))
-    ['foo', 'bar']
-    >>> list(yield_lines('foo\nbar'))
-    ['foo', 'bar']
-    >>> list(yield_lines('\nfoo\n#bar\nbaz #comment'))
-    ['foo', 'baz #comment']
-    >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n']))
-    ['foo', 'bar', 'baz', 'bing']
-    """
-    return itertools.chain.from_iterable(map(yield_lines, iterable))
-
-
-@yield_lines.register(str)
-def _(text: str) -> Iterator[str]:
-    return filter(_nonblank, map(str.strip, text.splitlines()))
-
-
-def split_sections(
-    s: str | Iterator[str],
-) -> Generator[tuple[str | None, list[str]], None, None]:
-    """Split a string or iterable thereof into (section, content) pairs
-    Each ``section`` is a stripped version of the section header ("[section]")
-    and each ``content`` is a list of stripped lines excluding blank lines and
-    comment-only lines.  If there are any such lines before the first section
-    header, they're returned in a first ``section`` of ``None``.
-    """
-    section = None
-    content: list[str] = []
-    for line in yield_lines(s):
-        if line.startswith("["):
-            if line.endswith("]"):
-                if section or content:
-                    yield section, content
-                section = line[1:-1].strip()
-                content = []
-            else:
-                raise ValueError("Invalid section heading", line)
-        else:
-            content.append(line)
-
-    # wrap up last segment
-    yield section, content
-
-
-def safe_extra(extra: str) -> str:
-    """Convert an arbitrary string to a standard 'extra' name
-    Any runs of non-alphanumeric characters are replaced with a single '_',
-    and the result is always lowercased.
-    """
-    return re.sub("[^A-Za-z0-9.-]+", "_", extra).lower()
-
-
-def safe_name(name: str) -> str:
-    """Convert an arbitrary string to a standard distribution name
-    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
-    """
-    return re.sub("[^A-Za-z0-9.]+", "-", name)
-
-
-def requires_to_requires_dist(requirement: Requirement) -> str:
-    """Return the version specifier for a requirement in PEP 345/566 fashion."""
-    if requirement.url:
-        return " @ " + requirement.url
-
-    requires_dist: list[str] = []
-    for spec in requirement.specifier:
-        requires_dist.append(spec.operator + spec.version)
-
-    if requires_dist:
-        return " " + ",".join(sorted(requires_dist))
-    else:
-        return ""
-
-
-def convert_requirements(requirements: list[str]) -> Iterator[str]:
-    """Yield Requires-Dist: strings for parsed requirements strings."""
-    for req in requirements:
-        parsed_requirement = Requirement(req)
-        spec = requires_to_requires_dist(parsed_requirement)
-        extras = ",".join(sorted(safe_extra(e) for e in parsed_requirement.extras))
-        if extras:
-            extras = f"[{extras}]"
-
-        yield safe_name(parsed_requirement.name) + extras + spec
-
-
-def generate_requirements(
-    extras_require: dict[str | None, list[str]],
-) -> Iterator[tuple[str, str]]:
-    """
-    Convert requirements from a setup()-style dictionary to
-    ('Requires-Dist', 'requirement') and ('Provides-Extra', 'extra') tuples.
-
-    extras_require is a dictionary of {extra: [requirements]} as passed to setup(),
-    using the empty extra {'': [requirements]} to hold install_requires.
-    """
-    for extra, depends in extras_require.items():
-        condition = ""
-        extra = extra or ""
-        if ":" in extra:  # setuptools extra:condition syntax
-            extra, condition = extra.split(":", 1)
-
-        extra = safe_extra(extra)
-        if extra:
-            yield "Provides-Extra", extra
-            if condition:
-                condition = "(" + condition + ") and "
-            condition += f"extra == '{extra}'"
-
-        if condition:
-            condition = " ; " + condition
-
-        for new_req in convert_requirements(depends):
-            canonical_req = str(Requirement(new_req + condition))
-            yield "Requires-Dist", canonical_req
-
-
-def pkginfo_to_metadata(egg_info_path: str, pkginfo_path: str) -> Message:
-    """
-    Convert .egg-info directory with PKG-INFO to the Metadata 2.1 format
-    """
-    with open(pkginfo_path, encoding="utf-8") as headers:
-        pkg_info = Parser().parse(headers)
-
-    pkg_info.replace_header("Metadata-Version", "2.1")
-    # Those will be regenerated from `requires.txt`.
-    del pkg_info["Provides-Extra"]
-    del pkg_info["Requires-Dist"]
-    requires_path = os.path.join(egg_info_path, "requires.txt")
-    if os.path.exists(requires_path):
-        with open(requires_path, encoding="utf-8") as requires_file:
-            requires = requires_file.read()
-
-        parsed_requirements = sorted(split_sections(requires), key=lambda x: x[0] or "")
-        for extra, reqs in parsed_requirements:
-            for key, value in generate_requirements({extra: reqs}):
-                if (key, value) not in pkg_info.items():
-                    pkg_info[key] = value
-
-    description = pkg_info["Description"]
-    if description:
-        description_lines = pkg_info["Description"].splitlines()
-        dedented_description = "\n".join(
-            # if the first line of long_description is blank,
-            # the first line here will be indented.
-            (
-                description_lines[0].lstrip(),
-                textwrap.dedent("\n".join(description_lines[1:])),
-                "\n",
-            )
-        )
-        pkg_info.set_payload(dedented_description)
-        del pkg_info["Description"]
-
-    return pkg_info
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/_setuptools_logging.py b/voxvera/vendor/setuptools/_vendor/wheel/_setuptools_logging.py
deleted file mode 100644
index a1a2482..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/_setuptools_logging.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# copied from setuptools.logging, omitting monkeypatching
-from __future__ import annotations
-
-import logging
-import sys
-
-
-def _not_warning(record: logging.LogRecord) -> bool:
-    return record.levelno < logging.WARNING
-
-
-def configure() -> None:
-    """
-    Configure logging to emit warning and above to stderr
-    and everything else to stdout. This behavior is provided
-    for compatibility with distutils.log but may change in
-    the future.
-    """
-    err_handler = logging.StreamHandler()
-    err_handler.setLevel(logging.WARNING)
-    out_handler = logging.StreamHandler(sys.stdout)
-    out_handler.addFilter(_not_warning)
-    handlers = err_handler, out_handler
-    logging.basicConfig(
-        format="{message}", style="{", handlers=handlers, level=logging.DEBUG
-    )
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/bdist_wheel.py b/voxvera/vendor/setuptools/_vendor/wheel/bdist_wheel.py
deleted file mode 100644
index 24199c2..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/bdist_wheel.py
+++ /dev/null
@@ -1,26 +0,0 @@
-from typing import TYPE_CHECKING
-from warnings import warn
-
-warn(
-    "The 'wheel' package is no longer the canonical location of the 'bdist_wheel' "
-    "command, and will be removed in a future release. Please update to setuptools "
-    "v70.1 or later which contains an integrated version of this command.",
-    FutureWarning,
-    stacklevel=1,
-)
-
-if TYPE_CHECKING:
-    from ._bdist_wheel import bdist_wheel as bdist_wheel
-else:
-    try:
-        # Better integration/compatibility with setuptools:
-        # in the case new fixes or PEPs are implemented in setuptools
-        # there is no need to backport them to the deprecated code base.
-        # This is useful in the case of old packages in the ecosystem
-        # that are still used but have low maintenance.
-        from setuptools.command.bdist_wheel import bdist_wheel
-    except ImportError:
-        # Only used in the case of old setuptools versions.
-        # If the user wants to get the latest fixes/PEPs,
-        # they are encouraged to address the deprecation warning.
-        from ._bdist_wheel import bdist_wheel as bdist_wheel
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/macosx_libfile.py b/voxvera/vendor/setuptools/_vendor/wheel/macosx_libfile.py
deleted file mode 100644
index 06e51af..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/macosx_libfile.py
+++ /dev/null
@@ -1,486 +0,0 @@
-"""
-IMPORTANT: DO NOT IMPORT THIS MODULE DIRECTLY.
-THIS IS ONLY KEPT IN PLACE FOR BACKWARDS COMPATIBILITY WITH
-setuptools.command.bdist_wheel.
-
-This module contains function to analyse dynamic library
-headers to extract system information
-
-Currently only for MacOSX
-
-Library file on macosx system starts with Mach-O or Fat field.
-This can be distinguish by first 32 bites and it is called magic number.
-Proper value of magic number is with suffix _MAGIC. Suffix _CIGAM means
-reversed bytes order.
-Both fields can occur in two types: 32 and 64 bytes.
-
-FAT field inform that this library contains few version of library
-(typically for different types version). It contains
-information where Mach-O headers starts.
-
-Each section started with Mach-O header contains one library
-(So if file starts with this field it contains only one version).
-
-After filed Mach-O there are section fields.
-Each of them starts with two fields:
-cmd - magic number for this command
-cmdsize - total size occupied by this section information.
-
-In this case only sections LC_VERSION_MIN_MACOSX (for macosx 10.13 and earlier)
-and LC_BUILD_VERSION (for macosx 10.14 and newer) are interesting,
-because them contains information about minimal system version.
-
-Important remarks:
-- For fat files this implementation looks for maximum number version.
-  It not check if it is 32 or 64 and do not compare it with currently built package.
-  So it is possible to false report higher version that needed.
-- All structures signatures are taken form macosx header files.
-- I think that binary format will be more stable than `otool` output.
-  and if apple introduce some changes both implementation will need to be updated.
-- The system compile will set the deployment target no lower than
-  11.0 for arm64 builds. For "Universal 2" builds use the x86_64 deployment
-  target when the arm64 target is 11.0.
-"""
-
-from __future__ import annotations
-
-import ctypes
-import os
-import sys
-from io import BufferedIOBase
-from typing import TYPE_CHECKING
-
-if TYPE_CHECKING:
-    from typing import Union
-
-    StrPath = Union[str, os.PathLike[str]]
-
-"""here the needed const and struct from mach-o header files"""
-
-FAT_MAGIC = 0xCAFEBABE
-FAT_CIGAM = 0xBEBAFECA
-FAT_MAGIC_64 = 0xCAFEBABF
-FAT_CIGAM_64 = 0xBFBAFECA
-MH_MAGIC = 0xFEEDFACE
-MH_CIGAM = 0xCEFAEDFE
-MH_MAGIC_64 = 0xFEEDFACF
-MH_CIGAM_64 = 0xCFFAEDFE
-
-LC_VERSION_MIN_MACOSX = 0x24
-LC_BUILD_VERSION = 0x32
-
-CPU_TYPE_ARM64 = 0x0100000C
-
-mach_header_fields = [
-    ("magic", ctypes.c_uint32),
-    ("cputype", ctypes.c_int),
-    ("cpusubtype", ctypes.c_int),
-    ("filetype", ctypes.c_uint32),
-    ("ncmds", ctypes.c_uint32),
-    ("sizeofcmds", ctypes.c_uint32),
-    ("flags", ctypes.c_uint32),
-]
-"""
-struct mach_header {
-    uint32_t	magic;		/* mach magic number identifier */
-    cpu_type_t	cputype;	/* cpu specifier */
-    cpu_subtype_t	cpusubtype;	/* machine specifier */
-    uint32_t	filetype;	/* type of file */
-    uint32_t	ncmds;		/* number of load commands */
-    uint32_t	sizeofcmds;	/* the size of all the load commands */
-    uint32_t	flags;		/* flags */
-};
-typedef integer_t cpu_type_t;
-typedef integer_t cpu_subtype_t;
-"""
-
-mach_header_fields_64 = mach_header_fields + [("reserved", ctypes.c_uint32)]
-"""
-struct mach_header_64 {
-    uint32_t	magic;		/* mach magic number identifier */
-    cpu_type_t	cputype;	/* cpu specifier */
-    cpu_subtype_t	cpusubtype;	/* machine specifier */
-    uint32_t	filetype;	/* type of file */
-    uint32_t	ncmds;		/* number of load commands */
-    uint32_t	sizeofcmds;	/* the size of all the load commands */
-    uint32_t	flags;		/* flags */
-    uint32_t	reserved;	/* reserved */
-};
-"""
-
-fat_header_fields = [("magic", ctypes.c_uint32), ("nfat_arch", ctypes.c_uint32)]
-"""
-struct fat_header {
-    uint32_t	magic;		/* FAT_MAGIC or FAT_MAGIC_64 */
-    uint32_t	nfat_arch;	/* number of structs that follow */
-};
-"""
-
-fat_arch_fields = [
-    ("cputype", ctypes.c_int),
-    ("cpusubtype", ctypes.c_int),
-    ("offset", ctypes.c_uint32),
-    ("size", ctypes.c_uint32),
-    ("align", ctypes.c_uint32),
-]
-"""
-struct fat_arch {
-    cpu_type_t	cputype;	/* cpu specifier (int) */
-    cpu_subtype_t	cpusubtype;	/* machine specifier (int) */
-    uint32_t	offset;		/* file offset to this object file */
-    uint32_t	size;		/* size of this object file */
-    uint32_t	align;		/* alignment as a power of 2 */
-};
-"""
-
-fat_arch_64_fields = [
-    ("cputype", ctypes.c_int),
-    ("cpusubtype", ctypes.c_int),
-    ("offset", ctypes.c_uint64),
-    ("size", ctypes.c_uint64),
-    ("align", ctypes.c_uint32),
-    ("reserved", ctypes.c_uint32),
-]
-"""
-struct fat_arch_64 {
-    cpu_type_t	cputype;	/* cpu specifier (int) */
-    cpu_subtype_t	cpusubtype;	/* machine specifier (int) */
-    uint64_t	offset;		/* file offset to this object file */
-    uint64_t	size;		/* size of this object file */
-    uint32_t	align;		/* alignment as a power of 2 */
-    uint32_t	reserved;	/* reserved */
-};
-"""
-
-segment_base_fields = [("cmd", ctypes.c_uint32), ("cmdsize", ctypes.c_uint32)]
-"""base for reading segment info"""
-
-segment_command_fields = [
-    ("cmd", ctypes.c_uint32),
-    ("cmdsize", ctypes.c_uint32),
-    ("segname", ctypes.c_char * 16),
-    ("vmaddr", ctypes.c_uint32),
-    ("vmsize", ctypes.c_uint32),
-    ("fileoff", ctypes.c_uint32),
-    ("filesize", ctypes.c_uint32),
-    ("maxprot", ctypes.c_int),
-    ("initprot", ctypes.c_int),
-    ("nsects", ctypes.c_uint32),
-    ("flags", ctypes.c_uint32),
-]
-"""
-struct segment_command { /* for 32-bit architectures */
-    uint32_t	cmd;		/* LC_SEGMENT */
-    uint32_t	cmdsize;	/* includes sizeof section structs */
-    char		segname[16];	/* segment name */
-    uint32_t	vmaddr;		/* memory address of this segment */
-    uint32_t	vmsize;		/* memory size of this segment */
-    uint32_t	fileoff;	/* file offset of this segment */
-    uint32_t	filesize;	/* amount to map from the file */
-    vm_prot_t	maxprot;	/* maximum VM protection */
-    vm_prot_t	initprot;	/* initial VM protection */
-    uint32_t	nsects;		/* number of sections in segment */
-    uint32_t	flags;		/* flags */
-};
-typedef int vm_prot_t;
-"""
-
-segment_command_fields_64 = [
-    ("cmd", ctypes.c_uint32),
-    ("cmdsize", ctypes.c_uint32),
-    ("segname", ctypes.c_char * 16),
-    ("vmaddr", ctypes.c_uint64),
-    ("vmsize", ctypes.c_uint64),
-    ("fileoff", ctypes.c_uint64),
-    ("filesize", ctypes.c_uint64),
-    ("maxprot", ctypes.c_int),
-    ("initprot", ctypes.c_int),
-    ("nsects", ctypes.c_uint32),
-    ("flags", ctypes.c_uint32),
-]
-"""
-struct segment_command_64 { /* for 64-bit architectures */
-    uint32_t	cmd;		/* LC_SEGMENT_64 */
-    uint32_t	cmdsize;	/* includes sizeof section_64 structs */
-    char		segname[16];	/* segment name */
-    uint64_t	vmaddr;		/* memory address of this segment */
-    uint64_t	vmsize;		/* memory size of this segment */
-    uint64_t	fileoff;	/* file offset of this segment */
-    uint64_t	filesize;	/* amount to map from the file */
-    vm_prot_t	maxprot;	/* maximum VM protection */
-    vm_prot_t	initprot;	/* initial VM protection */
-    uint32_t	nsects;		/* number of sections in segment */
-    uint32_t	flags;		/* flags */
-};
-"""
-
-version_min_command_fields = segment_base_fields + [
-    ("version", ctypes.c_uint32),
-    ("sdk", ctypes.c_uint32),
-]
-"""
-struct version_min_command {
-    uint32_t	cmd;		/* LC_VERSION_MIN_MACOSX or
-                               LC_VERSION_MIN_IPHONEOS or
-                               LC_VERSION_MIN_WATCHOS or
-                               LC_VERSION_MIN_TVOS */
-    uint32_t	cmdsize;	/* sizeof(struct min_version_command) */
-    uint32_t	version;	/* X.Y.Z is encoded in nibbles xxxx.yy.zz */
-    uint32_t	sdk;		/* X.Y.Z is encoded in nibbles xxxx.yy.zz */
-};
-"""
-
-build_version_command_fields = segment_base_fields + [
-    ("platform", ctypes.c_uint32),
-    ("minos", ctypes.c_uint32),
-    ("sdk", ctypes.c_uint32),
-    ("ntools", ctypes.c_uint32),
-]
-"""
-struct build_version_command {
-    uint32_t	cmd;		/* LC_BUILD_VERSION */
-    uint32_t	cmdsize;	/* sizeof(struct build_version_command) plus */
-                                /* ntools * sizeof(struct build_tool_version) */
-    uint32_t	platform;	/* platform */
-    uint32_t	minos;		/* X.Y.Z is encoded in nibbles xxxx.yy.zz */
-    uint32_t	sdk;		/* X.Y.Z is encoded in nibbles xxxx.yy.zz */
-    uint32_t	ntools;		/* number of tool entries following this */
-};
-"""
-
-
-def swap32(x: int) -> int:
-    return (
-        ((x << 24) & 0xFF000000)
-        | ((x << 8) & 0x00FF0000)
-        | ((x >> 8) & 0x0000FF00)
-        | ((x >> 24) & 0x000000FF)
-    )
-
-
-def get_base_class_and_magic_number(
-    lib_file: BufferedIOBase,
-    seek: int | None = None,
-) -> tuple[type[ctypes.Structure], int]:
-    if seek is None:
-        seek = lib_file.tell()
-    else:
-        lib_file.seek(seek)
-    magic_number = ctypes.c_uint32.from_buffer_copy(
-        lib_file.read(ctypes.sizeof(ctypes.c_uint32))
-    ).value
-
-    # Handle wrong byte order
-    if magic_number in [FAT_CIGAM, FAT_CIGAM_64, MH_CIGAM, MH_CIGAM_64]:
-        if sys.byteorder == "little":
-            BaseClass = ctypes.BigEndianStructure
-        else:
-            BaseClass = ctypes.LittleEndianStructure
-
-        magic_number = swap32(magic_number)
-    else:
-        BaseClass = ctypes.Structure
-
-    lib_file.seek(seek)
-    return BaseClass, magic_number
-
-
-def read_data(struct_class: type[ctypes.Structure], lib_file: BufferedIOBase):
-    return struct_class.from_buffer_copy(lib_file.read(ctypes.sizeof(struct_class)))
-
-
-def extract_macosx_min_system_version(path_to_lib: str):
-    with open(path_to_lib, "rb") as lib_file:
-        BaseClass, magic_number = get_base_class_and_magic_number(lib_file, 0)
-        if magic_number not in [FAT_MAGIC, FAT_MAGIC_64, MH_MAGIC, MH_MAGIC_64]:
-            return
-
-        if magic_number in [FAT_MAGIC, FAT_CIGAM_64]:
-
-            class FatHeader(BaseClass):
-                _fields_ = fat_header_fields
-
-            fat_header = read_data(FatHeader, lib_file)
-            if magic_number == FAT_MAGIC:
-
-                class FatArch(BaseClass):
-                    _fields_ = fat_arch_fields
-
-            else:
-
-                class FatArch(BaseClass):
-                    _fields_ = fat_arch_64_fields
-
-            fat_arch_list = [
-                read_data(FatArch, lib_file) for _ in range(fat_header.nfat_arch)
-            ]
-
-            versions_list: list[tuple[int, int, int]] = []
-            for el in fat_arch_list:
-                try:
-                    version = read_mach_header(lib_file, el.offset)
-                    if version is not None:
-                        if el.cputype == CPU_TYPE_ARM64 and len(fat_arch_list) != 1:
-                            # Xcode will not set the deployment target below 11.0.0
-                            # for the arm64 architecture. Ignore the arm64 deployment
-                            # in fat binaries when the target is 11.0.0, that way
-                            # the other architectures can select a lower deployment
-                            # target.
-                            # This is safe because there is no arm64 variant for
-                            # macOS 10.15 or earlier.
-                            if version == (11, 0, 0):
-                                continue
-                        versions_list.append(version)
-                except ValueError:
-                    pass
-
-            if len(versions_list) > 0:
-                return max(versions_list)
-            else:
-                return None
-
-        else:
-            try:
-                return read_mach_header(lib_file, 0)
-            except ValueError:
-                """when some error during read library files"""
-                return None
-
-
-def read_mach_header(
-    lib_file: BufferedIOBase,
-    seek: int | None = None,
-) -> tuple[int, int, int] | None:
-    """
-    This function parses a Mach-O header and extracts
-    information about the minimal macOS version.
-
-    :param lib_file: reference to opened library file with pointer
-    """
-    base_class, magic_number = get_base_class_and_magic_number(lib_file, seek)
-    arch = "32" if magic_number == MH_MAGIC else "64"
-
-    class SegmentBase(base_class):
-        _fields_ = segment_base_fields
-
-    if arch == "32":
-
-        class MachHeader(base_class):
-            _fields_ = mach_header_fields
-
-    else:
-
-        class MachHeader(base_class):
-            _fields_ = mach_header_fields_64
-
-    mach_header = read_data(MachHeader, lib_file)
-    for _i in range(mach_header.ncmds):
-        pos = lib_file.tell()
-        segment_base = read_data(SegmentBase, lib_file)
-        lib_file.seek(pos)
-        if segment_base.cmd == LC_VERSION_MIN_MACOSX:
-
-            class VersionMinCommand(base_class):
-                _fields_ = version_min_command_fields
-
-            version_info = read_data(VersionMinCommand, lib_file)
-            return parse_version(version_info.version)
-        elif segment_base.cmd == LC_BUILD_VERSION:
-
-            class VersionBuild(base_class):
-                _fields_ = build_version_command_fields
-
-            version_info = read_data(VersionBuild, lib_file)
-            return parse_version(version_info.minos)
-        else:
-            lib_file.seek(pos + segment_base.cmdsize)
-            continue
-
-
-def parse_version(version: int) -> tuple[int, int, int]:
-    x = (version & 0xFFFF0000) >> 16
-    y = (version & 0x0000FF00) >> 8
-    z = version & 0x000000FF
-    return x, y, z
-
-
-def calculate_macosx_platform_tag(archive_root: StrPath, platform_tag: str) -> str:
-    """
-    Calculate proper macosx platform tag basing on files which are included to wheel
-
-    Example platform tag `macosx-10.14-x86_64`
-    """
-    prefix, base_version, suffix = platform_tag.split("-")
-    base_version = tuple(int(x) for x in base_version.split("."))
-    base_version = base_version[:2]
-    if base_version[0] > 10:
-        base_version = (base_version[0], 0)
-    assert len(base_version) == 2
-    if "MACOSX_DEPLOYMENT_TARGET" in os.environ:
-        deploy_target = tuple(
-            int(x) for x in os.environ["MACOSX_DEPLOYMENT_TARGET"].split(".")
-        )
-        deploy_target = deploy_target[:2]
-        if deploy_target[0] > 10:
-            deploy_target = (deploy_target[0], 0)
-        if deploy_target < base_version:
-            sys.stderr.write(
-                "[WARNING] MACOSX_DEPLOYMENT_TARGET is set to a lower value ({}) than "
-                "the version on which the Python interpreter was compiled ({}), and "
-                "will be ignored.\n".format(
-                    ".".join(str(x) for x in deploy_target),
-                    ".".join(str(x) for x in base_version),
-                )
-            )
-        else:
-            base_version = deploy_target
-
-    assert len(base_version) == 2
-    start_version = base_version
-    versions_dict: dict[str, tuple[int, int]] = {}
-    for dirpath, _dirnames, filenames in os.walk(archive_root):
-        for filename in filenames:
-            if filename.endswith(".dylib") or filename.endswith(".so"):
-                lib_path = os.path.join(dirpath, filename)
-                min_ver = extract_macosx_min_system_version(lib_path)
-                if min_ver is not None:
-                    min_ver = min_ver[0:2]
-                    if min_ver[0] > 10:
-                        min_ver = (min_ver[0], 0)
-                    versions_dict[lib_path] = min_ver
-
-    if len(versions_dict) > 0:
-        base_version = max(base_version, max(versions_dict.values()))
-
-    # macosx platform tag do not support minor bugfix release
-    fin_base_version = "_".join([str(x) for x in base_version])
-    if start_version < base_version:
-        problematic_files = [k for k, v in versions_dict.items() if v > start_version]
-        problematic_files = "\n".join(problematic_files)
-        if len(problematic_files) == 1:
-            files_form = "this file"
-        else:
-            files_form = "these files"
-        error_message = (
-            "[WARNING] This wheel needs a higher macOS version than {}  "
-            "To silence this warning, set MACOSX_DEPLOYMENT_TARGET to at least "
-            + fin_base_version
-            + " or recreate "
-            + files_form
-            + " with lower "
-            "MACOSX_DEPLOYMENT_TARGET:  \n" + problematic_files
-        )
-
-        if "MACOSX_DEPLOYMENT_TARGET" in os.environ:
-            error_message = error_message.format(
-                "is set in MACOSX_DEPLOYMENT_TARGET variable."
-            )
-        else:
-            error_message = error_message.format(
-                "the version your Python interpreter is compiled against."
-            )
-
-        sys.stderr.write(error_message)
-
-    platform_tag = prefix + "_" + fin_base_version + "_" + suffix
-    return platform_tag
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/metadata.py b/voxvera/vendor/setuptools/_vendor/wheel/metadata.py
deleted file mode 100644
index e27900a..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/metadata.py
+++ /dev/null
@@ -1,17 +0,0 @@
-from warnings import warn
-
-from ._metadata import convert_requirements as convert_requirements
-from ._metadata import generate_requirements as generate_requirements
-from ._metadata import pkginfo_to_metadata as pkginfo_to_metadata
-from ._metadata import requires_to_requires_dist as requires_to_requires_dist
-from ._metadata import safe_extra as safe_extra
-from ._metadata import safe_name as safe_name
-from ._metadata import split_sections as split_sections
-
-warn(
-    f"The {__name__!r} package has been made private and should no longer be imported. "
-    f"Please either copy the code or find an alternative library to import it from, as "
-    f"this warning will be removed in a future version of 'wheel'.",
-    DeprecationWarning,
-    stacklevel=2,
-)
diff --git a/voxvera/vendor/setuptools/_vendor/wheel/wheelfile.py b/voxvera/vendor/setuptools/_vendor/wheel/wheelfile.py
deleted file mode 100644
index 7b6fd71..0000000
--- a/voxvera/vendor/setuptools/_vendor/wheel/wheelfile.py
+++ /dev/null
@@ -1,241 +0,0 @@
-from __future__ import annotations
-
-__all__ = ["WHEEL_INFO_RE", "WheelFile", "WheelError"]
-
-import base64
-import csv
-import hashlib
-import logging
-import os.path
-import re
-import stat
-import time
-from io import StringIO, TextIOWrapper
-from typing import IO, TYPE_CHECKING, Literal
-from zipfile import ZIP_DEFLATED, ZipFile, ZipInfo
-
-if TYPE_CHECKING:
-    from _typeshed import SizedBuffer, StrPath
-
-
-# Non-greedy matching of an optional build number may be too clever (more
-# invalid wheel filenames will match). Separate regex for .dist-info?
-WHEEL_INFO_RE = re.compile(
-    r"""^(?P(?P[^\s-]+?)-(?P[^\s-]+?))(-(?P\d[^\s-]*))?
-     -(?P[^\s-]+?)-(?P[^\s-]+?)-(?P\S+)\.whl$""",
-    re.VERBOSE,
-)
-MINIMUM_TIMESTAMP = 315532800  # 1980-01-01 00:00:00 UTC
-
-log = logging.getLogger("wheel")
-
-
-class WheelError(Exception):
-    pass
-
-
-def urlsafe_b64encode(data: bytes) -> bytes:
-    """urlsafe_b64encode without padding"""
-    return base64.urlsafe_b64encode(data).rstrip(b"=")
-
-
-def urlsafe_b64decode(data: bytes) -> bytes:
-    """urlsafe_b64decode without padding"""
-    pad = b"=" * (4 - (len(data) & 3))
-    return base64.urlsafe_b64decode(data + pad)
-
-
-def get_zipinfo_datetime(
-    timestamp: float | None = None,
-) -> tuple[int, int, int, int, int]:
-    # Some applications need reproducible .whl files, but they can't do this without
-    # forcing the timestamp of the individual ZipInfo objects. See issue #143.
-    timestamp = int(os.environ.get("SOURCE_DATE_EPOCH", timestamp or time.time()))
-    timestamp = max(timestamp, MINIMUM_TIMESTAMP)
-    return time.gmtime(timestamp)[0:6]
-
-
-class WheelFile(ZipFile):
-    """A ZipFile derivative class that also reads SHA-256 hashes from
-    .dist-info/RECORD and checks any read files against those.
-    """
-
-    _default_algorithm = hashlib.sha256
-
-    def __init__(
-        self,
-        file: StrPath,
-        mode: Literal["r", "w", "x", "a"] = "r",
-        compression: int = ZIP_DEFLATED,
-    ):
-        basename = os.path.basename(file)
-        self.parsed_filename = WHEEL_INFO_RE.match(basename)
-        if not basename.endswith(".whl") or self.parsed_filename is None:
-            raise WheelError(f"Bad wheel filename {basename!r}")
-
-        ZipFile.__init__(self, file, mode, compression=compression, allowZip64=True)
-
-        self.dist_info_path = "{}.dist-info".format(
-            self.parsed_filename.group("namever")
-        )
-        self.record_path = self.dist_info_path + "/RECORD"
-        self._file_hashes: dict[str, tuple[None, None] | tuple[int, bytes]] = {}
-        self._file_sizes = {}
-        if mode == "r":
-            # Ignore RECORD and any embedded wheel signatures
-            self._file_hashes[self.record_path] = None, None
-            self._file_hashes[self.record_path + ".jws"] = None, None
-            self._file_hashes[self.record_path + ".p7s"] = None, None
-
-            # Fill in the expected hashes by reading them from RECORD
-            try:
-                record = self.open(self.record_path)
-            except KeyError:
-                raise WheelError(f"Missing {self.record_path} file") from None
-
-            with record:
-                for line in csv.reader(
-                    TextIOWrapper(record, newline="", encoding="utf-8")
-                ):
-                    path, hash_sum, size = line
-                    if not hash_sum:
-                        continue
-
-                    algorithm, hash_sum = hash_sum.split("=")
-                    try:
-                        hashlib.new(algorithm)
-                    except ValueError:
-                        raise WheelError(
-                            f"Unsupported hash algorithm: {algorithm}"
-                        ) from None
-
-                    if algorithm.lower() in {"md5", "sha1"}:
-                        raise WheelError(
-                            f"Weak hash algorithm ({algorithm}) is not permitted by "
-                            f"PEP 427"
-                        )
-
-                    self._file_hashes[path] = (
-                        algorithm,
-                        urlsafe_b64decode(hash_sum.encode("ascii")),
-                    )
-
-    def open(
-        self,
-        name_or_info: str | ZipInfo,
-        mode: Literal["r", "w"] = "r",
-        pwd: bytes | None = None,
-    ) -> IO[bytes]:
-        def _update_crc(newdata: bytes) -> None:
-            eof = ef._eof
-            update_crc_orig(newdata)
-            running_hash.update(newdata)
-            if eof and running_hash.digest() != expected_hash:
-                raise WheelError(f"Hash mismatch for file '{ef_name}'")
-
-        ef_name = (
-            name_or_info.filename if isinstance(name_or_info, ZipInfo) else name_or_info
-        )
-        if (
-            mode == "r"
-            and not ef_name.endswith("/")
-            and ef_name not in self._file_hashes
-        ):
-            raise WheelError(f"No hash found for file '{ef_name}'")
-
-        ef = ZipFile.open(self, name_or_info, mode, pwd)
-        if mode == "r" and not ef_name.endswith("/"):
-            algorithm, expected_hash = self._file_hashes[ef_name]
-            if expected_hash is not None:
-                # Monkey patch the _update_crc method to also check for the hash from
-                # RECORD
-                running_hash = hashlib.new(algorithm)
-                update_crc_orig, ef._update_crc = ef._update_crc, _update_crc
-
-        return ef
-
-    def write_files(self, base_dir: str) -> None:
-        log.info("creating %r and adding %r to it", self.filename, base_dir)
-        deferred: list[tuple[str, str]] = []
-        for root, dirnames, filenames in os.walk(base_dir):
-            # Sort the directory names so that `os.walk` will walk them in a
-            # defined order on the next iteration.
-            dirnames.sort()
-            for name in sorted(filenames):
-                path = os.path.normpath(os.path.join(root, name))
-                if os.path.isfile(path):
-                    arcname = os.path.relpath(path, base_dir).replace(os.path.sep, "/")
-                    if arcname == self.record_path:
-                        pass
-                    elif root.endswith(".dist-info"):
-                        deferred.append((path, arcname))
-                    else:
-                        self.write(path, arcname)
-
-        deferred.sort()
-        for path, arcname in deferred:
-            self.write(path, arcname)
-
-    def write(
-        self,
-        filename: str,
-        arcname: str | None = None,
-        compress_type: int | None = None,
-    ) -> None:
-        with open(filename, "rb") as f:
-            st = os.fstat(f.fileno())
-            data = f.read()
-
-        zinfo = ZipInfo(
-            arcname or filename, date_time=get_zipinfo_datetime(st.st_mtime)
-        )
-        zinfo.external_attr = (stat.S_IMODE(st.st_mode) | stat.S_IFMT(st.st_mode)) << 16
-        zinfo.compress_type = compress_type or self.compression
-        self.writestr(zinfo, data, compress_type)
-
-    def writestr(
-        self,
-        zinfo_or_arcname: str | ZipInfo,
-        data: SizedBuffer | str,
-        compress_type: int | None = None,
-    ) -> None:
-        if isinstance(zinfo_or_arcname, str):
-            zinfo_or_arcname = ZipInfo(
-                zinfo_or_arcname, date_time=get_zipinfo_datetime()
-            )
-            zinfo_or_arcname.compress_type = self.compression
-            zinfo_or_arcname.external_attr = (0o664 | stat.S_IFREG) << 16
-
-        if isinstance(data, str):
-            data = data.encode("utf-8")
-
-        ZipFile.writestr(self, zinfo_or_arcname, data, compress_type)
-        fname = (
-            zinfo_or_arcname.filename
-            if isinstance(zinfo_or_arcname, ZipInfo)
-            else zinfo_or_arcname
-        )
-        log.info("adding %r", fname)
-        if fname != self.record_path:
-            hash_ = self._default_algorithm(data)
-            self._file_hashes[fname] = (
-                hash_.name,
-                urlsafe_b64encode(hash_.digest()).decode("ascii"),
-            )
-            self._file_sizes[fname] = len(data)
-
-    def close(self) -> None:
-        # Write RECORD
-        if self.fp is not None and self.mode == "w" and self._file_hashes:
-            data = StringIO()
-            writer = csv.writer(data, delimiter=",", quotechar='"', lineterminator="\n")
-            writer.writerows(
-                (
-                    (fname, algorithm + "=" + hash_, self._file_sizes[fname])
-                    for fname, (algorithm, hash_) in self._file_hashes.items()
-                )
-            )
-            writer.writerow((format(self.record_path), "", ""))
-            self.writestr(self.record_path, data.getvalue())
-
-        ZipFile.close(self)
diff --git a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/INSTALLER b/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/INSTALLER
deleted file mode 100644
index 5c69047..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/INSTALLER
+++ /dev/null
@@ -1 +0,0 @@
-uv
\ No newline at end of file
diff --git a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/METADATA b/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/METADATA
deleted file mode 100644
index 6420117..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/METADATA
+++ /dev/null
@@ -1,106 +0,0 @@
-Metadata-Version: 2.4
-Name: zipp
-Version: 3.23.0
-Summary: Backport of pathlib-compatible object wrapper for zip files
-Author-email: "Jason R. Coombs" 
-License-Expression: MIT
-Project-URL: Source, https://github.com/jaraco/zipp
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3 :: Only
-Requires-Python: >=3.9
-Description-Content-Type: text/x-rst
-License-File: LICENSE
-Provides-Extra: test
-Requires-Dist: pytest!=8.1.*,>=6; extra == "test"
-Requires-Dist: jaraco.itertools; extra == "test"
-Requires-Dist: jaraco.functools; extra == "test"
-Requires-Dist: more_itertools; extra == "test"
-Requires-Dist: big-O; extra == "test"
-Requires-Dist: pytest-ignore-flaky; extra == "test"
-Requires-Dist: jaraco.test; extra == "test"
-Provides-Extra: doc
-Requires-Dist: sphinx>=3.5; extra == "doc"
-Requires-Dist: jaraco.packaging>=9.3; extra == "doc"
-Requires-Dist: rst.linker>=1.9; extra == "doc"
-Requires-Dist: furo; extra == "doc"
-Requires-Dist: sphinx-lint; extra == "doc"
-Requires-Dist: jaraco.tidelift>=1.4; extra == "doc"
-Provides-Extra: check
-Requires-Dist: pytest-checkdocs>=2.4; extra == "check"
-Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check"
-Provides-Extra: cover
-Requires-Dist: pytest-cov; extra == "cover"
-Provides-Extra: enabler
-Requires-Dist: pytest-enabler>=2.2; extra == "enabler"
-Provides-Extra: type
-Requires-Dist: pytest-mypy; extra == "type"
-Dynamic: license-file
-
-.. image:: https://img.shields.io/pypi/v/zipp.svg
-   :target: https://pypi.org/project/zipp
-
-.. image:: https://img.shields.io/pypi/pyversions/zipp.svg
-
-.. image:: https://github.com/jaraco/zipp/actions/workflows/main.yml/badge.svg
-   :target: https://github.com/jaraco/zipp/actions?query=workflow%3A%22tests%22
-   :alt: tests
-
-.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
-    :target: https://github.com/astral-sh/ruff
-    :alt: Ruff
-
-.. image:: https://readthedocs.org/projects/zipp/badge/?version=latest
-..    :target: https://zipp.readthedocs.io/en/latest/?badge=latest
-
-.. image:: https://img.shields.io/badge/skeleton-2025-informational
-   :target: https://blog.jaraco.com/skeleton
-
-.. image:: https://tidelift.com/badges/package/pypi/zipp
-   :target: https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=readme
-
-
-A pathlib-compatible Zipfile object wrapper. Official backport of the standard library
-`Path object `_.
-
-
-Compatibility
-=============
-
-New features are introduced in this third-party library and later merged
-into CPython. The following table indicates which versions of this library
-were contributed to different versions in the standard library:
-
-.. list-table::
-   :header-rows: 1
-
-   * - zipp
-     - stdlib
-   * - 3.18
-     - 3.13
-   * - 3.16
-     - 3.12
-   * - 3.5
-     - 3.11
-   * - 3.2
-     - 3.10
-   * - 3.3 ??
-     - 3.9
-   * - 1.0
-     - 3.8
-
-
-Usage
-=====
-
-Use ``zipp.Path`` in place of ``zipfile.Path`` on any Python.
-
-For Enterprise
-==============
-
-Available as part of the Tidelift Subscription.
-
-This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.
-
-`Learn more `_.
diff --git a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/RECORD b/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/RECORD
deleted file mode 100644
index 167e234..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/RECORD
+++ /dev/null
@@ -1,14 +0,0 @@
-zipp-3.23.0.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
-zipp-3.23.0.dist-info/METADATA,sha256=vdZ9TRbPC_O4k-fRjNPS13StuC837Zhbx3cMYHIms1s,3563
-zipp-3.23.0.dist-info/RECORD,,
-zipp-3.23.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-zipp-3.23.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
-zipp-3.23.0.dist-info/licenses/LICENSE,sha256=WlfLTbheKi3YjCkGKJCK3VfjRRRJ4KmnH9-zh3b9dZ0,1076
-zipp-3.23.0.dist-info/top_level.txt,sha256=iAbdoSHfaGqBfVb2XuR9JqSQHCoOsOtG6y9C_LSpqFw,5
-zipp/__init__.py,sha256=ieXh9GIMdABjKRX_JUJtP9k5wdBLK4Mt5X4nszSkmYE,11976
-zipp/_functools.py,sha256=f6Kt9LxZ4TE-cY1lJVdXSId3memSXmH9IdgMbU-_x2k,575
-zipp/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
-zipp/compat/overlay.py,sha256=oEIGAnbr8yGjuKTrVSO2ByewPui71uppbX18BLnYTKE,783
-zipp/compat/py310.py,sha256=S7i6N9mToEn3asNb2ILyjnzvITOXrATD_J4emjyBbDU,256
-zipp/compat/py313.py,sha256=RndvDNtuY7H2D9ecnnzcPBMZ8mZc42gmXD_IwQAXXAE,654
-zipp/glob.py,sha256=DLV9LBsDxA6YVW82e3-tkoNrus1h4R-j3BR6VqS0AzE,3382
diff --git a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/REQUESTED b/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/REQUESTED
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/WHEEL b/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/WHEEL
deleted file mode 100644
index e7fa31b..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/WHEEL
+++ /dev/null
@@ -1,5 +0,0 @@
-Wheel-Version: 1.0
-Generator: setuptools (80.9.0)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
diff --git a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/licenses/LICENSE b/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/licenses/LICENSE
deleted file mode 100644
index f60bd57..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/licenses/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-MIT License
-
-Copyright (c) 2025 
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
-associated documentation files (the "Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
-following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
-EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/top_level.txt b/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/top_level.txt
deleted file mode 100644
index e82f676..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp-3.23.0.dist-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-zipp
diff --git a/voxvera/vendor/setuptools/_vendor/zipp/__init__.py b/voxvera/vendor/setuptools/_vendor/zipp/__init__.py
deleted file mode 100644
index ed5b214..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp/__init__.py
+++ /dev/null
@@ -1,456 +0,0 @@
-"""
-A Path-like interface for zipfiles.
-
-This codebase is shared between zipfile.Path in the stdlib
-and zipp in PyPI. See
-https://github.com/python/importlib_metadata/wiki/Development-Methodology
-for more detail.
-"""
-
-import functools
-import io
-import itertools
-import pathlib
-import posixpath
-import re
-import stat
-import sys
-import zipfile
-
-from ._functools import save_method_args
-from .compat.py310 import text_encoding
-from .glob import Translator
-
-__all__ = ['Path']
-
-
-def _parents(path):
-    """
-    Given a path with elements separated by
-    posixpath.sep, generate all parents of that path.
-
-    >>> list(_parents('b/d'))
-    ['b']
-    >>> list(_parents('/b/d/'))
-    ['/b']
-    >>> list(_parents('b/d/f/'))
-    ['b/d', 'b']
-    >>> list(_parents('b'))
-    []
-    >>> list(_parents(''))
-    []
-    """
-    return itertools.islice(_ancestry(path), 1, None)
-
-
-def _ancestry(path):
-    """
-    Given a path with elements separated by
-    posixpath.sep, generate all elements of that path.
-
-    >>> list(_ancestry('b/d'))
-    ['b/d', 'b']
-    >>> list(_ancestry('/b/d/'))
-    ['/b/d', '/b']
-    >>> list(_ancestry('b/d/f/'))
-    ['b/d/f', 'b/d', 'b']
-    >>> list(_ancestry('b'))
-    ['b']
-    >>> list(_ancestry(''))
-    []
-
-    Multiple separators are treated like a single.
-
-    >>> list(_ancestry('//b//d///f//'))
-    ['//b//d///f', '//b//d', '//b']
-    """
-    path = path.rstrip(posixpath.sep)
-    while path.rstrip(posixpath.sep):
-        yield path
-        path, tail = posixpath.split(path)
-
-
-_dedupe = dict.fromkeys
-"""Deduplicate an iterable in original order"""
-
-
-def _difference(minuend, subtrahend):
-    """
-    Return items in minuend not in subtrahend, retaining order
-    with O(1) lookup.
-    """
-    return itertools.filterfalse(set(subtrahend).__contains__, minuend)
-
-
-class InitializedState:
-    """
-    Mix-in to save the initialization state for pickling.
-    """
-
-    @save_method_args
-    def __init__(self, *args, **kwargs):
-        super().__init__(*args, **kwargs)
-
-    def __getstate__(self):
-        return self._saved___init__.args, self._saved___init__.kwargs
-
-    def __setstate__(self, state):
-        args, kwargs = state
-        super().__init__(*args, **kwargs)
-
-
-class CompleteDirs(InitializedState, zipfile.ZipFile):
-    """
-    A ZipFile subclass that ensures that implied directories
-    are always included in the namelist.
-
-    >>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt']))
-    ['foo/', 'foo/bar/']
-    >>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt', 'foo/bar/']))
-    ['foo/']
-    """
-
-    @staticmethod
-    def _implied_dirs(names):
-        parents = itertools.chain.from_iterable(map(_parents, names))
-        as_dirs = (p + posixpath.sep for p in parents)
-        return _dedupe(_difference(as_dirs, names))
-
-    def namelist(self):
-        names = super().namelist()
-        return names + list(self._implied_dirs(names))
-
-    def _name_set(self):
-        return set(self.namelist())
-
-    def resolve_dir(self, name):
-        """
-        If the name represents a directory, return that name
-        as a directory (with the trailing slash).
-        """
-        names = self._name_set()
-        dirname = name + '/'
-        dir_match = name not in names and dirname in names
-        return dirname if dir_match else name
-
-    def getinfo(self, name):
-        """
-        Supplement getinfo for implied dirs.
-        """
-        try:
-            return super().getinfo(name)
-        except KeyError:
-            if not name.endswith('/') or name not in self._name_set():
-                raise
-            return zipfile.ZipInfo(filename=name)
-
-    @classmethod
-    def make(cls, source):
-        """
-        Given a source (filename or zipfile), return an
-        appropriate CompleteDirs subclass.
-        """
-        if isinstance(source, CompleteDirs):
-            return source
-
-        if not isinstance(source, zipfile.ZipFile):
-            return cls(source)
-
-        # Only allow for FastLookup when supplied zipfile is read-only
-        if 'r' not in source.mode:
-            cls = CompleteDirs
-
-        source.__class__ = cls
-        return source
-
-    @classmethod
-    def inject(cls, zf: zipfile.ZipFile) -> zipfile.ZipFile:
-        """
-        Given a writable zip file zf, inject directory entries for
-        any directories implied by the presence of children.
-        """
-        for name in cls._implied_dirs(zf.namelist()):
-            zf.writestr(name, b"")
-        return zf
-
-
-class FastLookup(CompleteDirs):
-    """
-    ZipFile subclass to ensure implicit
-    dirs exist and are resolved rapidly.
-    """
-
-    def namelist(self):
-        return self._namelist
-
-    @functools.cached_property
-    def _namelist(self):
-        return super().namelist()
-
-    def _name_set(self):
-        return self._name_set_prop
-
-    @functools.cached_property
-    def _name_set_prop(self):
-        return super()._name_set()
-
-
-def _extract_text_encoding(encoding=None, *args, **kwargs):
-    # compute stack level so that the caller of the caller sees any warning.
-    is_pypy = sys.implementation.name == 'pypy'
-    # PyPy no longer special cased after 7.3.19 (or maybe 7.3.18)
-    # See jaraco/zipp#143
-    is_old_pypi = is_pypy and sys.pypy_version_info < (7, 3, 19)
-    stack_level = 3 + is_old_pypi
-    return text_encoding(encoding, stack_level), args, kwargs
-
-
-class Path:
-    """
-    A :class:`importlib.resources.abc.Traversable` interface for zip files.
-
-    Implements many of the features users enjoy from
-    :class:`pathlib.Path`.
-
-    Consider a zip file with this structure::
-
-        .
-        ├── a.txt
-        └── b
-            ├── c.txt
-            └── d
-                └── e.txt
-
-    >>> data = io.BytesIO()
-    >>> zf = zipfile.ZipFile(data, 'w')
-    >>> zf.writestr('a.txt', 'content of a')
-    >>> zf.writestr('b/c.txt', 'content of c')
-    >>> zf.writestr('b/d/e.txt', 'content of e')
-    >>> zf.filename = 'mem/abcde.zip'
-
-    Path accepts the zipfile object itself or a filename
-
-    >>> path = Path(zf)
-
-    From there, several path operations are available.
-
-    Directory iteration (including the zip file itself):
-
-    >>> a, b = path.iterdir()
-    >>> a
-    Path('mem/abcde.zip', 'a.txt')
-    >>> b
-    Path('mem/abcde.zip', 'b/')
-
-    name property:
-
-    >>> b.name
-    'b'
-
-    join with divide operator:
-
-    >>> c = b / 'c.txt'
-    >>> c
-    Path('mem/abcde.zip', 'b/c.txt')
-    >>> c.name
-    'c.txt'
-
-    Read text:
-
-    >>> c.read_text(encoding='utf-8')
-    'content of c'
-
-    existence:
-
-    >>> c.exists()
-    True
-    >>> (b / 'missing.txt').exists()
-    False
-
-    Coercion to string:
-
-    >>> import os
-    >>> str(c).replace(os.sep, posixpath.sep)
-    'mem/abcde.zip/b/c.txt'
-
-    At the root, ``name``, ``filename``, and ``parent``
-    resolve to the zipfile.
-
-    >>> str(path)
-    'mem/abcde.zip/'
-    >>> path.name
-    'abcde.zip'
-    >>> path.filename == pathlib.Path('mem/abcde.zip')
-    True
-    >>> str(path.parent)
-    'mem'
-
-    If the zipfile has no filename, such attributes are not
-    valid and accessing them will raise an Exception.
-
-    >>> zf.filename = None
-    >>> path.name
-    Traceback (most recent call last):
-    ...
-    TypeError: ...
-
-    >>> path.filename
-    Traceback (most recent call last):
-    ...
-    TypeError: ...
-
-    >>> path.parent
-    Traceback (most recent call last):
-    ...
-    TypeError: ...
-
-    # workaround python/cpython#106763
-    >>> pass
-    """
-
-    __repr = "{self.__class__.__name__}({self.root.filename!r}, {self.at!r})"
-
-    def __init__(self, root, at=""):
-        """
-        Construct a Path from a ZipFile or filename.
-
-        Note: When the source is an existing ZipFile object,
-        its type (__class__) will be mutated to a
-        specialized type. If the caller wishes to retain the
-        original type, the caller should either create a
-        separate ZipFile object or pass a filename.
-        """
-        self.root = FastLookup.make(root)
-        self.at = at
-
-    def __eq__(self, other):
-        """
-        >>> Path(zipfile.ZipFile(io.BytesIO(), 'w')) == 'foo'
-        False
-        """
-        if self.__class__ is not other.__class__:
-            return NotImplemented
-        return (self.root, self.at) == (other.root, other.at)
-
-    def __hash__(self):
-        return hash((self.root, self.at))
-
-    def open(self, mode='r', *args, pwd=None, **kwargs):
-        """
-        Open this entry as text or binary following the semantics
-        of ``pathlib.Path.open()`` by passing arguments through
-        to io.TextIOWrapper().
-        """
-        if self.is_dir():
-            raise IsADirectoryError(self)
-        zip_mode = mode[0]
-        if zip_mode == 'r' and not self.exists():
-            raise FileNotFoundError(self)
-        stream = self.root.open(self.at, zip_mode, pwd=pwd)
-        if 'b' in mode:
-            if args or kwargs:
-                raise ValueError("encoding args invalid for binary operation")
-            return stream
-        # Text mode:
-        encoding, args, kwargs = _extract_text_encoding(*args, **kwargs)
-        return io.TextIOWrapper(stream, encoding, *args, **kwargs)
-
-    def _base(self):
-        return pathlib.PurePosixPath(self.at) if self.at else self.filename
-
-    @property
-    def name(self):
-        return self._base().name
-
-    @property
-    def suffix(self):
-        return self._base().suffix
-
-    @property
-    def suffixes(self):
-        return self._base().suffixes
-
-    @property
-    def stem(self):
-        return self._base().stem
-
-    @property
-    def filename(self):
-        return pathlib.Path(self.root.filename).joinpath(self.at)
-
-    def read_text(self, *args, **kwargs):
-        encoding, args, kwargs = _extract_text_encoding(*args, **kwargs)
-        with self.open('r', encoding, *args, **kwargs) as strm:
-            return strm.read()
-
-    def read_bytes(self):
-        with self.open('rb') as strm:
-            return strm.read()
-
-    def _is_child(self, path):
-        return posixpath.dirname(path.at.rstrip("/")) == self.at.rstrip("/")
-
-    def _next(self, at):
-        return self.__class__(self.root, at)
-
-    def is_dir(self):
-        return not self.at or self.at.endswith("/")
-
-    def is_file(self):
-        return self.exists() and not self.is_dir()
-
-    def exists(self):
-        return self.at in self.root._name_set()
-
-    def iterdir(self):
-        if not self.is_dir():
-            raise ValueError("Can't listdir a file")
-        subs = map(self._next, self.root.namelist())
-        return filter(self._is_child, subs)
-
-    def match(self, path_pattern):
-        return pathlib.PurePosixPath(self.at).match(path_pattern)
-
-    def is_symlink(self):
-        """
-        Return whether this path is a symlink.
-        """
-        info = self.root.getinfo(self.at)
-        mode = info.external_attr >> 16
-        return stat.S_ISLNK(mode)
-
-    def glob(self, pattern):
-        if not pattern:
-            raise ValueError(f"Unacceptable pattern: {pattern!r}")
-
-        prefix = re.escape(self.at)
-        tr = Translator(seps='/')
-        matches = re.compile(prefix + tr.translate(pattern)).fullmatch
-        return map(self._next, filter(matches, self.root.namelist()))
-
-    def rglob(self, pattern):
-        return self.glob(f'**/{pattern}')
-
-    def relative_to(self, other, *extra):
-        return posixpath.relpath(str(self), str(other.joinpath(*extra)))
-
-    def __str__(self):
-        return posixpath.join(self.root.filename, self.at)
-
-    def __repr__(self):
-        return self.__repr.format(self=self)
-
-    def joinpath(self, *other):
-        next = posixpath.join(self.at, *other)
-        return self._next(self.root.resolve_dir(next))
-
-    __truediv__ = joinpath
-
-    @property
-    def parent(self):
-        if not self.at:
-            return self.filename.parent
-        parent_at = posixpath.dirname(self.at.rstrip('/'))
-        if parent_at:
-            parent_at += '/'
-        return self._next(parent_at)
diff --git a/voxvera/vendor/setuptools/_vendor/zipp/_functools.py b/voxvera/vendor/setuptools/_vendor/zipp/_functools.py
deleted file mode 100644
index 7390be2..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp/_functools.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import collections
-import functools
-
-
-# from jaraco.functools 4.0.2
-def save_method_args(method):
-    """
-    Wrap a method such that when it is called, the args and kwargs are
-    saved on the method.
-    """
-    args_and_kwargs = collections.namedtuple('args_and_kwargs', 'args kwargs')  # noqa: PYI024
-
-    @functools.wraps(method)
-    def wrapper(self, /, *args, **kwargs):
-        attr_name = '_saved_' + method.__name__
-        attr = args_and_kwargs(args, kwargs)
-        setattr(self, attr_name, attr)
-        return method(self, *args, **kwargs)
-
-    return wrapper
diff --git a/voxvera/vendor/setuptools/_vendor/zipp/compat/__init__.py b/voxvera/vendor/setuptools/_vendor/zipp/compat/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/_vendor/zipp/compat/overlay.py b/voxvera/vendor/setuptools/_vendor/zipp/compat/overlay.py
deleted file mode 100644
index 5a97ee7..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp/compat/overlay.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Expose zipp.Path as .zipfile.Path.
-
-Includes everything else in ``zipfile`` to match future usage. Just
-use:
-
->>> from zipp.compat.overlay import zipfile
-
-in place of ``import zipfile``.
-
-Relative imports are supported too.
-
->>> from zipp.compat.overlay.zipfile import ZipInfo
-
-The ``zipfile`` object added to ``sys.modules`` needs to be
-hashable (#126).
-
->>> _ = hash(sys.modules['zipp.compat.overlay.zipfile'])
-"""
-
-import importlib
-import sys
-import types
-
-import zipp
-
-
-class HashableNamespace(types.SimpleNamespace):
-    def __hash__(self):
-        return hash(tuple(vars(self)))
-
-
-zipfile = HashableNamespace(**vars(importlib.import_module('zipfile')))
-zipfile.Path = zipp.Path
-zipfile._path = zipp
-
-sys.modules[__name__ + '.zipfile'] = zipfile  # type: ignore[assignment]
diff --git a/voxvera/vendor/setuptools/_vendor/zipp/compat/py310.py b/voxvera/vendor/setuptools/_vendor/zipp/compat/py310.py
deleted file mode 100644
index e1e7ec2..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp/compat/py310.py
+++ /dev/null
@@ -1,13 +0,0 @@
-import io
-import sys
-
-
-def _text_encoding(encoding, stacklevel=2, /):  # pragma: no cover
-    return encoding
-
-
-text_encoding = (
-    io.text_encoding  # type: ignore[unused-ignore, attr-defined]
-    if sys.version_info > (3, 10)
-    else _text_encoding
-)
diff --git a/voxvera/vendor/setuptools/_vendor/zipp/compat/py313.py b/voxvera/vendor/setuptools/_vendor/zipp/compat/py313.py
deleted file mode 100644
index ae45869..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp/compat/py313.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import functools
-import sys
-
-
-# from jaraco.functools 4.1
-def identity(x):
-    return x
-
-
-# from jaraco.functools 4.1
-def apply(transform):
-    def wrap(func):
-        return functools.wraps(func)(compose(transform, func))
-
-    return wrap
-
-
-# from jaraco.functools 4.1
-def compose(*funcs):
-    def compose_two(f1, f2):
-        return lambda *args, **kwargs: f1(f2(*args, **kwargs))
-
-    return functools.reduce(compose_two, funcs)
-
-
-def replace(pattern):
-    r"""
-    >>> replace(r'foo\z')
-    'foo\\Z'
-    """
-    return pattern[:-2] + pattern[-2:].replace(r'\z', r'\Z')
-
-
-legacy_end_marker = apply(replace) if sys.version_info < (3, 14) else identity
diff --git a/voxvera/vendor/setuptools/_vendor/zipp/glob.py b/voxvera/vendor/setuptools/_vendor/zipp/glob.py
deleted file mode 100644
index 1b4ffb3..0000000
--- a/voxvera/vendor/setuptools/_vendor/zipp/glob.py
+++ /dev/null
@@ -1,116 +0,0 @@
-import os
-import re
-
-from .compat.py313 import legacy_end_marker
-
-_default_seps = os.sep + str(os.altsep) * bool(os.altsep)
-
-
-class Translator:
-    """
-    >>> Translator('xyz')
-    Traceback (most recent call last):
-    ...
-    AssertionError: Invalid separators
-
-    >>> Translator('')
-    Traceback (most recent call last):
-    ...
-    AssertionError: Invalid separators
-    """
-
-    seps: str
-
-    def __init__(self, seps: str = _default_seps):
-        assert seps and set(seps) <= set(_default_seps), "Invalid separators"
-        self.seps = seps
-
-    def translate(self, pattern):
-        """
-        Given a glob pattern, produce a regex that matches it.
-        """
-        return self.extend(self.match_dirs(self.translate_core(pattern)))
-
-    @legacy_end_marker
-    def extend(self, pattern):
-        r"""
-        Extend regex for pattern-wide concerns.
-
-        Apply '(?s:)' to create a non-matching group that
-        matches newlines (valid on Unix).
-
-        Append '\z' to imply fullmatch even when match is used.
-        """
-        return rf'(?s:{pattern})\z'
-
-    def match_dirs(self, pattern):
-        """
-        Ensure that zipfile.Path directory names are matched.
-
-        zipfile.Path directory names always end in a slash.
-        """
-        return rf'{pattern}[/]?'
-
-    def translate_core(self, pattern):
-        r"""
-        Given a glob pattern, produce a regex that matches it.
-
-        >>> t = Translator()
-        >>> t.translate_core('*.txt').replace('\\\\', '')
-        '[^/]*\\.txt'
-        >>> t.translate_core('a?txt')
-        'a[^/]txt'
-        >>> t.translate_core('**/*').replace('\\\\', '')
-        '.*/[^/][^/]*'
-        """
-        self.restrict_rglob(pattern)
-        return ''.join(map(self.replace, separate(self.star_not_empty(pattern))))
-
-    def replace(self, match):
-        """
-        Perform the replacements for a match from :func:`separate`.
-        """
-        return match.group('set') or (
-            re.escape(match.group(0))
-            .replace('\\*\\*', r'.*')
-            .replace('\\*', rf'[^{re.escape(self.seps)}]*')
-            .replace('\\?', r'[^/]')
-        )
-
-    def restrict_rglob(self, pattern):
-        """
-        Raise ValueError if ** appears in anything but a full path segment.
-
-        >>> Translator().translate('**foo')
-        Traceback (most recent call last):
-        ...
-        ValueError: ** must appear alone in a path segment
-        """
-        seps_pattern = rf'[{re.escape(self.seps)}]+'
-        segments = re.split(seps_pattern, pattern)
-        if any('**' in segment and segment != '**' for segment in segments):
-            raise ValueError("** must appear alone in a path segment")
-
-    def star_not_empty(self, pattern):
-        """
-        Ensure that * will not match an empty segment.
-        """
-
-        def handle_segment(match):
-            segment = match.group(0)
-            return '?*' if segment == '*' else segment
-
-        not_seps_pattern = rf'[^{re.escape(self.seps)}]+'
-        return re.sub(not_seps_pattern, handle_segment, pattern)
-
-
-def separate(pattern):
-    """
-    Separate out character sets to avoid translating their contents.
-
-    >>> [m.group(0) for m in separate('*.txt')]
-    ['*.txt']
-    >>> [m.group(0) for m in separate('a[?]txt')]
-    ['a', '[?]', 'txt']
-    """
-    return re.finditer(r'([^\[]+)|(?P[\[].*?[\]])|([\[][^\]]*$)', pattern)
diff --git a/voxvera/vendor/setuptools/archive_util.py b/voxvera/vendor/setuptools/archive_util.py
deleted file mode 100644
index 1a02010..0000000
--- a/voxvera/vendor/setuptools/archive_util.py
+++ /dev/null
@@ -1,219 +0,0 @@
-"""Utilities for extracting common archive formats"""
-
-import contextlib
-import os
-import posixpath
-import shutil
-import tarfile
-import zipfile
-
-from ._path import ensure_directory
-
-from distutils.errors import DistutilsError
-
-__all__ = [
-    "unpack_archive",
-    "unpack_zipfile",
-    "unpack_tarfile",
-    "default_filter",
-    "UnrecognizedFormat",
-    "extraction_drivers",
-    "unpack_directory",
-]
-
-
-class UnrecognizedFormat(DistutilsError):
-    """Couldn't recognize the archive type"""
-
-
-def default_filter(src, dst):
-    """The default progress/filter callback; returns True for all files"""
-    return dst
-
-
-def unpack_archive(
-    filename, extract_dir, progress_filter=default_filter, drivers=None
-) -> None:
-    """Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``
-
-    `progress_filter` is a function taking two arguments: a source path
-    internal to the archive ('/'-separated), and a filesystem path where it
-    will be extracted.  The callback must return the desired extract path
-    (which may be the same as the one passed in), or else ``None`` to skip
-    that file or directory.  The callback can thus be used to report on the
-    progress of the extraction, as well as to filter the items extracted or
-    alter their extraction paths.
-
-    `drivers`, if supplied, must be a non-empty sequence of functions with the
-    same signature as this function (minus the `drivers` argument), that raise
-    ``UnrecognizedFormat`` if they do not support extracting the designated
-    archive type.  The `drivers` are tried in sequence until one is found that
-    does not raise an error, or until all are exhausted (in which case
-    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
-    drivers, the module's ``extraction_drivers`` constant will be used, which
-    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
-    order.
-    """
-    for driver in drivers or extraction_drivers:
-        try:
-            driver(filename, extract_dir, progress_filter)
-        except UnrecognizedFormat:
-            continue
-        else:
-            return
-    else:
-        raise UnrecognizedFormat(f"Not a recognized archive type: {filename}")
-
-
-def unpack_directory(filename, extract_dir, progress_filter=default_filter) -> None:
-    """ "Unpack" a directory, using the same interface as for archives
-
-    Raises ``UnrecognizedFormat`` if `filename` is not a directory
-    """
-    if not os.path.isdir(filename):
-        raise UnrecognizedFormat(f"{filename} is not a directory")
-
-    paths = {
-        filename: ('', extract_dir),
-    }
-    for base, dirs, files in os.walk(filename):
-        src, dst = paths[base]
-        for d in dirs:
-            paths[os.path.join(base, d)] = src + d + '/', os.path.join(dst, d)
-        for f in files:
-            target = os.path.join(dst, f)
-            target = progress_filter(src + f, target)
-            if not target:
-                # skip non-files
-                continue
-            ensure_directory(target)
-            f = os.path.join(base, f)
-            shutil.copyfile(f, target)
-            shutil.copystat(f, target)
-
-
-def unpack_zipfile(filename, extract_dir, progress_filter=default_filter) -> None:
-    """Unpack zip `filename` to `extract_dir`
-
-    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
-    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
-    of the `progress_filter` argument.
-    """
-
-    if not zipfile.is_zipfile(filename):
-        raise UnrecognizedFormat(f"{filename} is not a zip file")
-
-    with zipfile.ZipFile(filename) as z:
-        _unpack_zipfile_obj(z, extract_dir, progress_filter)
-
-
-def _unpack_zipfile_obj(zipfile_obj, extract_dir, progress_filter=default_filter):
-    """Internal/private API used by other parts of setuptools.
-    Similar to ``unpack_zipfile``, but receives an already opened :obj:`zipfile.ZipFile`
-    object instead of a filename.
-    """
-    for info in zipfile_obj.infolist():
-        name = info.filename
-
-        # don't extract absolute paths or ones with .. in them
-        if name.startswith('/') or '..' in name.split('/'):
-            continue
-
-        target = os.path.join(extract_dir, *name.split('/'))
-        target = progress_filter(name, target)
-        if not target:
-            continue
-        if name.endswith('/'):
-            # directory
-            ensure_directory(target)
-        else:
-            # file
-            ensure_directory(target)
-            data = zipfile_obj.read(info.filename)
-            with open(target, 'wb') as f:
-                f.write(data)
-        unix_attributes = info.external_attr >> 16
-        if unix_attributes:
-            os.chmod(target, unix_attributes)
-
-
-def _resolve_tar_file_or_dir(tar_obj, tar_member_obj):
-    """Resolve any links and extract link targets as normal files."""
-    while tar_member_obj is not None and (
-        tar_member_obj.islnk() or tar_member_obj.issym()
-    ):
-        linkpath = tar_member_obj.linkname
-        if tar_member_obj.issym():
-            base = posixpath.dirname(tar_member_obj.name)
-            linkpath = posixpath.join(base, linkpath)
-            linkpath = posixpath.normpath(linkpath)
-        tar_member_obj = tar_obj._getmember(linkpath)
-
-    is_file_or_dir = tar_member_obj is not None and (
-        tar_member_obj.isfile() or tar_member_obj.isdir()
-    )
-    if is_file_or_dir:
-        return tar_member_obj
-
-    raise LookupError('Got unknown file type')
-
-
-def _iter_open_tar(tar_obj, extract_dir, progress_filter):
-    """Emit member-destination pairs from a tar archive."""
-    # don't do any chowning!
-    tar_obj.chown = lambda *args: None
-
-    with contextlib.closing(tar_obj):
-        for member in tar_obj:
-            name = member.name
-            # don't extract absolute paths or ones with .. in them
-            if name.startswith('/') or '..' in name.split('/'):
-                continue
-
-            prelim_dst = os.path.join(extract_dir, *name.split('/'))
-
-            try:
-                member = _resolve_tar_file_or_dir(tar_obj, member)
-            except LookupError:
-                continue
-
-            final_dst = progress_filter(name, prelim_dst)
-            if not final_dst:
-                continue
-
-            if final_dst.endswith(os.sep):
-                final_dst = final_dst[:-1]
-
-            yield member, final_dst
-
-
-def unpack_tarfile(filename, extract_dir, progress_filter=default_filter) -> bool:
-    """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`
-
-    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
-    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
-    of the `progress_filter` argument.
-    """
-    try:
-        tarobj = tarfile.open(filename)
-    except tarfile.TarError as e:
-        raise UnrecognizedFormat(
-            f"{filename} is not a compressed or uncompressed tar file"
-        ) from e
-
-    for member, final_dst in _iter_open_tar(
-        tarobj,
-        extract_dir,
-        progress_filter,
-    ):
-        try:
-            # XXX Ugh
-            tarobj._extract_member(member, final_dst)
-        except tarfile.ExtractError:
-            # chown/chmod/mkfifo/mknode/makedev failed
-            pass
-
-    return True
-
-
-extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile
diff --git a/voxvera/vendor/setuptools/build_meta.py b/voxvera/vendor/setuptools/build_meta.py
deleted file mode 100644
index 1d93b61..0000000
--- a/voxvera/vendor/setuptools/build_meta.py
+++ /dev/null
@@ -1,556 +0,0 @@
-"""A PEP 517 interface to setuptools
-
-Previously, when a user or a command line tool (let's call it a "frontend")
-needed to make a request of setuptools to take a certain action, for
-example, generating a list of installation requirements, the frontend
-would call "setup.py egg_info" or "setup.py bdist_wheel" on the command line.
-
-PEP 517 defines a different method of interfacing with setuptools. Rather
-than calling "setup.py" directly, the frontend should:
-
-  1. Set the current directory to the directory with a setup.py file
-  2. Import this module into a safe python interpreter (one in which
-     setuptools can potentially set global variables or crash hard).
-  3. Call one of the functions defined in PEP 517.
-
-What each function does is defined in PEP 517. However, here is a "casual"
-definition of the functions (this definition should not be relied on for
-bug reports or API stability):
-
-  - `build_wheel`: build a wheel in the folder and return the basename
-  - `get_requires_for_build_wheel`: get the `setup_requires` to build
-  - `prepare_metadata_for_build_wheel`: get the `install_requires`
-  - `build_sdist`: build an sdist in the folder and return the basename
-  - `get_requires_for_build_sdist`: get the `setup_requires` to build
-
-Again, this is not a formal definition! Just a "taste" of the module.
-"""
-
-from __future__ import annotations
-
-import contextlib
-import io
-import os
-import shlex
-import shutil
-import sys
-import tempfile
-import tokenize
-import warnings
-from collections.abc import Iterable, Iterator, Mapping
-from pathlib import Path
-from typing import TYPE_CHECKING, NoReturn, Union
-
-import setuptools
-
-from . import errors
-from ._path import StrPath, same_path
-from ._reqs import parse_strings
-from .warnings import SetuptoolsDeprecationWarning
-
-import distutils
-from distutils.util import strtobool
-
-if TYPE_CHECKING:
-    from typing_extensions import TypeAlias
-
-__all__ = [
-    'get_requires_for_build_sdist',
-    'get_requires_for_build_wheel',
-    'prepare_metadata_for_build_wheel',
-    'build_wheel',
-    'build_sdist',
-    'get_requires_for_build_editable',
-    'prepare_metadata_for_build_editable',
-    'build_editable',
-    '__legacy__',
-    'SetupRequirementsError',
-]
-
-
-class SetupRequirementsError(BaseException):
-    def __init__(self, specifiers) -> None:
-        self.specifiers = specifiers
-
-
-class Distribution(setuptools.dist.Distribution):
-    def fetch_build_eggs(self, specifiers) -> NoReturn:
-        specifier_list = list(parse_strings(specifiers))
-
-        raise SetupRequirementsError(specifier_list)
-
-    @classmethod
-    @contextlib.contextmanager
-    def patch(cls) -> Iterator[None]:
-        """
-        Replace
-        distutils.dist.Distribution with this class
-        for the duration of this context.
-        """
-        orig = distutils.core.Distribution
-        distutils.core.Distribution = cls  # type: ignore[misc] # monkeypatching
-        try:
-            yield
-        finally:
-            distutils.core.Distribution = orig  # type: ignore[misc] # monkeypatching
-
-
-@contextlib.contextmanager
-def no_install_setup_requires():
-    """Temporarily disable installing setup_requires
-
-    Under PEP 517, the backend reports build dependencies to the frontend,
-    and the frontend is responsible for ensuring they're installed.
-    So setuptools (acting as a backend) should not try to install them.
-    """
-    orig = setuptools._install_setup_requires
-    setuptools._install_setup_requires = lambda attrs: None
-    try:
-        yield
-    finally:
-        setuptools._install_setup_requires = orig
-
-
-def _get_immediate_subdirectories(a_dir):
-    return [
-        name for name in os.listdir(a_dir) if os.path.isdir(os.path.join(a_dir, name))
-    ]
-
-
-def _file_with_extension(directory: StrPath, extension: str | tuple[str, ...]):
-    matching = (f for f in os.listdir(directory) if f.endswith(extension))
-    try:
-        (file,) = matching
-    except ValueError:
-        raise ValueError(
-            'No distribution was found. Ensure that `setup.py` '
-            'is not empty and that it calls `setup()`.'
-        ) from None
-    return file
-
-
-def _open_setup_script(setup_script):
-    if not os.path.exists(setup_script):
-        # Supply a default setup.py
-        return io.StringIO("from setuptools import setup; setup()")
-
-    return tokenize.open(setup_script)
-
-
-@contextlib.contextmanager
-def suppress_known_deprecation():
-    with warnings.catch_warnings():
-        warnings.filterwarnings('ignore', 'setup.py install is deprecated')
-        yield
-
-
-_ConfigSettings: TypeAlias = Union[Mapping[str, Union[str, list[str], None]], None]
-"""
-Currently the user can run::
-
-    pip install -e . --config-settings key=value
-    python -m build -C--key=value -C key=value
-
-- pip will pass both key and value as strings and overwriting repeated keys
-  (pypa/pip#11059).
-- build will accumulate values associated with repeated keys in a list.
-  It will also accept keys with no associated value.
-  This means that an option passed by build can be ``str | list[str] | None``.
-- PEP 517 specifies that ``config_settings`` is an optional dict.
-"""
-
-
-class _ConfigSettingsTranslator:
-    """Translate ``config_settings`` into distutils-style command arguments.
-    Only a limited number of options is currently supported.
-    """
-
-    # See pypa/setuptools#1928 pypa/setuptools#2491
-
-    def _get_config(self, key: str, config_settings: _ConfigSettings) -> list[str]:
-        """
-        Get the value of a specific key in ``config_settings`` as a list of strings.
-
-        >>> fn = _ConfigSettingsTranslator()._get_config
-        >>> fn("--global-option", None)
-        []
-        >>> fn("--global-option", {})
-        []
-        >>> fn("--global-option", {'--global-option': 'foo'})
-        ['foo']
-        >>> fn("--global-option", {'--global-option': ['foo']})
-        ['foo']
-        >>> fn("--global-option", {'--global-option': 'foo'})
-        ['foo']
-        >>> fn("--global-option", {'--global-option': 'foo bar'})
-        ['foo', 'bar']
-        """
-        cfg = config_settings or {}
-        opts = cfg.get(key) or []
-        return shlex.split(opts) if isinstance(opts, str) else opts
-
-    def _global_args(self, config_settings: _ConfigSettings) -> Iterator[str]:
-        """
-        Let the user specify ``verbose`` or ``quiet`` + escape hatch via
-        ``--global-option``.
-        Note: ``-v``, ``-vv``, ``-vvv`` have similar effects in setuptools,
-        so we just have to cover the basic scenario ``-v``.
-
-        >>> fn = _ConfigSettingsTranslator()._global_args
-        >>> list(fn(None))
-        []
-        >>> list(fn({"verbose": "False"}))
-        ['-q']
-        >>> list(fn({"verbose": "1"}))
-        ['-v']
-        >>> list(fn({"--verbose": None}))
-        ['-v']
-        >>> list(fn({"verbose": "true", "--global-option": "-q --no-user-cfg"}))
-        ['-v', '-q', '--no-user-cfg']
-        >>> list(fn({"--quiet": None}))
-        ['-q']
-        """
-        cfg = config_settings or {}
-        falsey = {"false", "no", "0", "off"}
-        if "verbose" in cfg or "--verbose" in cfg:
-            level = str(cfg.get("verbose") or cfg.get("--verbose") or "1")
-            yield ("-q" if level.lower() in falsey else "-v")
-        if "quiet" in cfg or "--quiet" in cfg:
-            level = str(cfg.get("quiet") or cfg.get("--quiet") or "1")
-            yield ("-v" if level.lower() in falsey else "-q")
-
-        yield from self._get_config("--global-option", config_settings)
-
-    def __dist_info_args(self, config_settings: _ConfigSettings) -> Iterator[str]:
-        """
-        The ``dist_info`` command accepts ``tag-date`` and ``tag-build``.
-
-        .. warning::
-           We cannot use this yet as it requires the ``sdist`` and ``bdist_wheel``
-           commands run in ``build_sdist`` and ``build_wheel`` to reuse the egg-info
-           directory created in ``prepare_metadata_for_build_wheel``.
-
-        >>> fn = _ConfigSettingsTranslator()._ConfigSettingsTranslator__dist_info_args
-        >>> list(fn(None))
-        []
-        >>> list(fn({"tag-date": "False"}))
-        ['--no-date']
-        >>> list(fn({"tag-date": None}))
-        ['--no-date']
-        >>> list(fn({"tag-date": "true", "tag-build": ".a"}))
-        ['--tag-date', '--tag-build', '.a']
-        """
-        cfg = config_settings or {}
-        if "tag-date" in cfg:
-            val = strtobool(str(cfg["tag-date"] or "false"))
-            yield ("--tag-date" if val else "--no-date")
-        if "tag-build" in cfg:
-            yield from ["--tag-build", str(cfg["tag-build"])]
-
-    def _editable_args(self, config_settings: _ConfigSettings) -> Iterator[str]:
-        """
-        The ``editable_wheel`` command accepts ``editable-mode=strict``.
-
-        >>> fn = _ConfigSettingsTranslator()._editable_args
-        >>> list(fn(None))
-        []
-        >>> list(fn({"editable-mode": "strict"}))
-        ['--mode', 'strict']
-        """
-        cfg = config_settings or {}
-        mode = cfg.get("editable-mode") or cfg.get("editable_mode")
-        if not mode:
-            return
-        yield from ["--mode", str(mode)]
-
-    def _arbitrary_args(self, config_settings: _ConfigSettings) -> Iterator[str]:
-        """
-        Users may expect to pass arbitrary lists of arguments to a command
-        via "--global-option" (example provided in PEP 517 of a "escape hatch").
-
-        >>> fn = _ConfigSettingsTranslator()._arbitrary_args
-        >>> list(fn(None))
-        []
-        >>> list(fn({}))
-        []
-        >>> list(fn({'--build-option': 'foo'}))
-        ['foo']
-        >>> list(fn({'--build-option': ['foo']}))
-        ['foo']
-        >>> list(fn({'--build-option': 'foo'}))
-        ['foo']
-        >>> list(fn({'--build-option': 'foo bar'}))
-        ['foo', 'bar']
-        >>> list(fn({'--global-option': 'foo'}))
-        []
-        """
-        yield from self._get_config("--build-option", config_settings)
-
-
-class _BuildMetaBackend(_ConfigSettingsTranslator):
-    def _get_build_requires(
-        self, config_settings: _ConfigSettings, requirements: list[str]
-    ):
-        sys.argv = [
-            *sys.argv[:1],
-            *self._global_args(config_settings),
-            "egg_info",
-        ]
-        try:
-            with Distribution.patch():
-                self.run_setup()
-        except SetupRequirementsError as e:
-            requirements += e.specifiers
-
-        return requirements
-
-    def run_setup(self, setup_script: str = 'setup.py') -> None:
-        # Note that we can reuse our build directory between calls
-        # Correctness comes first, then optimization later
-        __file__ = os.path.abspath(setup_script)
-        __name__ = '__main__'
-
-        with _open_setup_script(__file__) as f:
-            code = f.read().replace(r'\r\n', r'\n')
-
-        try:
-            exec(code, locals())
-        except SystemExit as e:
-            if e.code:
-                raise
-            # We ignore exit code indicating success
-            SetuptoolsDeprecationWarning.emit(
-                "Running `setup.py` directly as CLI tool is deprecated.",
-                "Please avoid using `sys.exit(0)` or similar statements "
-                "that don't fit in the paradigm of a configuration file.",
-                see_url="https://blog.ganssle.io/articles/2021/10/"
-                "setup-py-deprecated.html",
-            )
-
-    def get_requires_for_build_wheel(
-        self, config_settings: _ConfigSettings = None
-    ) -> list[str]:
-        return self._get_build_requires(config_settings, requirements=[])
-
-    def get_requires_for_build_sdist(
-        self, config_settings: _ConfigSettings = None
-    ) -> list[str]:
-        return self._get_build_requires(config_settings, requirements=[])
-
-    def _bubble_up_info_directory(
-        self, metadata_directory: StrPath, suffix: str
-    ) -> str:
-        """
-        PEP 517 requires that the .dist-info directory be placed in the
-        metadata_directory. To comply, we MUST copy the directory to the root.
-
-        Returns the basename of the info directory, e.g. `proj-0.0.0.dist-info`.
-        """
-        info_dir = self._find_info_directory(metadata_directory, suffix)
-        if not same_path(info_dir.parent, metadata_directory):
-            shutil.move(str(info_dir), metadata_directory)
-            # PEP 517 allow other files and dirs to exist in metadata_directory
-        return info_dir.name
-
-    def _find_info_directory(self, metadata_directory: StrPath, suffix: str) -> Path:
-        for parent, dirs, _ in os.walk(metadata_directory):
-            candidates = [f for f in dirs if f.endswith(suffix)]
-
-            if len(candidates) != 0 or len(dirs) != 1:
-                assert len(candidates) == 1, (
-                    f"Exactly one {suffix} should have been produced, but found {len(candidates)}: {candidates}"
-                )
-                return Path(parent, candidates[0])
-
-        msg = f"No {suffix} directory found in {metadata_directory}"
-        raise errors.InternalError(msg)
-
-    def prepare_metadata_for_build_wheel(
-        self, metadata_directory: StrPath, config_settings: _ConfigSettings = None
-    ) -> str:
-        sys.argv = [
-            *sys.argv[:1],
-            *self._global_args(config_settings),
-            "dist_info",
-            "--output-dir",
-            str(metadata_directory),
-            "--keep-egg-info",
-        ]
-        with no_install_setup_requires():
-            self.run_setup()
-
-        self._bubble_up_info_directory(metadata_directory, ".egg-info")
-        return self._bubble_up_info_directory(metadata_directory, ".dist-info")
-
-    def _build_with_temp_dir(
-        self,
-        setup_command: Iterable[str],
-        result_extension: str | tuple[str, ...],
-        result_directory: StrPath,
-        config_settings: _ConfigSettings,
-        arbitrary_args: Iterable[str] = (),
-    ):
-        result_directory = os.path.abspath(result_directory)
-
-        # Build in a temporary directory, then copy to the target.
-        os.makedirs(result_directory, exist_ok=True)
-
-        with tempfile.TemporaryDirectory(
-            prefix=".tmp-", dir=result_directory
-        ) as tmp_dist_dir:
-            sys.argv = [
-                *sys.argv[:1],
-                *self._global_args(config_settings),
-                *setup_command,
-                "--dist-dir",
-                tmp_dist_dir,
-                *arbitrary_args,
-            ]
-            with no_install_setup_requires():
-                self.run_setup()
-
-            result_basename = _file_with_extension(tmp_dist_dir, result_extension)
-            result_path = os.path.join(result_directory, result_basename)
-            if os.path.exists(result_path):
-                # os.rename will fail overwriting on non-Unix.
-                os.remove(result_path)
-            os.rename(os.path.join(tmp_dist_dir, result_basename), result_path)
-
-        return result_basename
-
-    def build_wheel(
-        self,
-        wheel_directory: StrPath,
-        config_settings: _ConfigSettings = None,
-        metadata_directory: StrPath | None = None,
-    ) -> str:
-        def _build(cmd: list[str]):
-            with suppress_known_deprecation():
-                return self._build_with_temp_dir(
-                    cmd,
-                    '.whl',
-                    wheel_directory,
-                    config_settings,
-                    self._arbitrary_args(config_settings),
-                )
-
-        if metadata_directory is None:
-            return _build(['bdist_wheel'])
-
-        try:
-            return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
-        except SystemExit as ex:  # pragma: nocover
-            # pypa/setuptools#4683
-            if "--dist-info-dir not recognized" not in str(ex):
-                raise
-            _IncompatibleBdistWheel.emit()
-            return _build(['bdist_wheel'])
-
-    def build_sdist(
-        self, sdist_directory: StrPath, config_settings: _ConfigSettings = None
-    ) -> str:
-        return self._build_with_temp_dir(
-            ['sdist', '--formats', 'gztar'], '.tar.gz', sdist_directory, config_settings
-        )
-
-    def _get_dist_info_dir(self, metadata_directory: StrPath | None) -> str | None:
-        if not metadata_directory:
-            return None
-        dist_info_candidates = list(Path(metadata_directory).glob("*.dist-info"))
-        assert len(dist_info_candidates) <= 1
-        return str(dist_info_candidates[0]) if dist_info_candidates else None
-
-    def build_editable(
-        self,
-        wheel_directory: StrPath,
-        config_settings: _ConfigSettings = None,
-        metadata_directory: StrPath | None = None,
-    ) -> str:
-        # XXX can or should we hide our editable_wheel command normally?
-        info_dir = self._get_dist_info_dir(metadata_directory)
-        opts = ["--dist-info-dir", info_dir] if info_dir else []
-        cmd = ["editable_wheel", *opts, *self._editable_args(config_settings)]
-        with suppress_known_deprecation():
-            return self._build_with_temp_dir(
-                cmd, ".whl", wheel_directory, config_settings
-            )
-
-    def get_requires_for_build_editable(
-        self, config_settings: _ConfigSettings = None
-    ) -> list[str]:
-        return self.get_requires_for_build_wheel(config_settings)
-
-    def prepare_metadata_for_build_editable(
-        self, metadata_directory: StrPath, config_settings: _ConfigSettings = None
-    ) -> str:
-        return self.prepare_metadata_for_build_wheel(
-            metadata_directory, config_settings
-        )
-
-
-class _BuildMetaLegacyBackend(_BuildMetaBackend):
-    """Compatibility backend for setuptools
-
-    This is a version of setuptools.build_meta that endeavors
-    to maintain backwards
-    compatibility with pre-PEP 517 modes of invocation. It
-    exists as a temporary
-    bridge between the old packaging mechanism and the new
-    packaging mechanism,
-    and will eventually be removed.
-    """
-
-    def run_setup(self, setup_script: str = 'setup.py') -> None:
-        # In order to maintain compatibility with scripts assuming that
-        # the setup.py script is in a directory on the PYTHONPATH, inject
-        # '' into sys.path. (pypa/setuptools#1642)
-        sys_path = list(sys.path)  # Save the original path
-
-        script_dir = os.path.dirname(os.path.abspath(setup_script))
-        if script_dir not in sys.path:
-            sys.path.insert(0, script_dir)
-
-        # Some setup.py scripts (e.g. in pygame and numpy) use sys.argv[0] to
-        # get the directory of the source code. They expect it to refer to the
-        # setup.py script.
-        sys_argv_0 = sys.argv[0]
-        sys.argv[0] = setup_script
-
-        try:
-            super().run_setup(setup_script=setup_script)
-        finally:
-            # While PEP 517 frontends should be calling each hook in a fresh
-            # subprocess according to the standard (and thus it should not be
-            # strictly necessary to restore the old sys.path), we'll restore
-            # the original path so that the path manipulation does not persist
-            # within the hook after run_setup is called.
-            sys.path[:] = sys_path
-            sys.argv[0] = sys_argv_0
-
-
-class _IncompatibleBdistWheel(SetuptoolsDeprecationWarning):
-    _SUMMARY = "wheel.bdist_wheel is deprecated, please import it from setuptools"
-    _DETAILS = """
-    Ensure that any custom bdist_wheel implementation is a subclass of
-    setuptools.command.bdist_wheel.bdist_wheel.
-    """
-    _DUE_DATE = (2025, 10, 15)
-    # Initially introduced in 2024/10/15, but maybe too disruptive to be enforced?
-    _SEE_URL = "https://github.com/pypa/wheel/pull/631"
-
-
-# The primary backend
-_BACKEND = _BuildMetaBackend()
-
-get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel
-get_requires_for_build_sdist = _BACKEND.get_requires_for_build_sdist
-prepare_metadata_for_build_wheel = _BACKEND.prepare_metadata_for_build_wheel
-build_wheel = _BACKEND.build_wheel
-build_sdist = _BACKEND.build_sdist
-get_requires_for_build_editable = _BACKEND.get_requires_for_build_editable
-prepare_metadata_for_build_editable = _BACKEND.prepare_metadata_for_build_editable
-build_editable = _BACKEND.build_editable
-
-
-# The legacy backend
-__legacy__ = _BuildMetaLegacyBackend()
diff --git a/voxvera/vendor/setuptools/cli-32.exe b/voxvera/vendor/setuptools/cli-32.exe
deleted file mode 100644
index 65c3cd9..0000000
Binary files a/voxvera/vendor/setuptools/cli-32.exe and /dev/null differ
diff --git a/voxvera/vendor/setuptools/cli-64.exe b/voxvera/vendor/setuptools/cli-64.exe
deleted file mode 100644
index 3ea50ee..0000000
Binary files a/voxvera/vendor/setuptools/cli-64.exe and /dev/null differ
diff --git a/voxvera/vendor/setuptools/cli-arm64.exe b/voxvera/vendor/setuptools/cli-arm64.exe
deleted file mode 100644
index da96455..0000000
Binary files a/voxvera/vendor/setuptools/cli-arm64.exe and /dev/null differ
diff --git a/voxvera/vendor/setuptools/cli.exe b/voxvera/vendor/setuptools/cli.exe
deleted file mode 100644
index 65c3cd9..0000000
Binary files a/voxvera/vendor/setuptools/cli.exe and /dev/null differ
diff --git a/voxvera/vendor/setuptools/command/__init__.py b/voxvera/vendor/setuptools/command/__init__.py
deleted file mode 100644
index 50e6c2f..0000000
--- a/voxvera/vendor/setuptools/command/__init__.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# mypy: disable_error_code=call-overload
-# pyright: reportCallIssue=false, reportArgumentType=false
-# Can't disable on the exact line because distutils doesn't exists on Python 3.12
-# and type-checkers aren't aware of distutils_hack,
-# causing distutils.command.bdist.bdist.format_commands to be Any.
-
-import sys
-
-from distutils.command.bdist import bdist
-
-if 'egg' not in bdist.format_commands:
-    try:
-        # format_commands is a dict in vendored distutils
-        # It used to be a list in older (stdlib) distutils
-        # We support both for backwards compatibility
-        bdist.format_commands['egg'] = ('bdist_egg', "Python .egg file")
-    except TypeError:
-        bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
-        bdist.format_commands.append('egg')
-
-del bdist, sys
diff --git a/voxvera/vendor/setuptools/command/_requirestxt.py b/voxvera/vendor/setuptools/command/_requirestxt.py
deleted file mode 100644
index 9029b12..0000000
--- a/voxvera/vendor/setuptools/command/_requirestxt.py
+++ /dev/null
@@ -1,131 +0,0 @@
-"""Helper code used to generate ``requires.txt`` files in the egg-info directory.
-
-The ``requires.txt`` file has an specific format:
-    - Environment markers need to be part of the section headers and
-      should not be part of the requirement spec itself.
-
-See https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html#requires-txt
-"""
-
-from __future__ import annotations
-
-import io
-from collections import defaultdict
-from collections.abc import Mapping
-from itertools import filterfalse
-from typing import TypeVar
-
-from jaraco.text import yield_lines
-from packaging.requirements import Requirement
-
-from .. import _reqs
-from .._reqs import _StrOrIter
-
-# dict can work as an ordered set
-_T = TypeVar("_T")
-_Ordered = dict[_T, None]
-
-
-def _prepare(
-    install_requires: _StrOrIter, extras_require: Mapping[str, _StrOrIter]
-) -> tuple[list[str], dict[str, list[str]]]:
-    """Given values for ``install_requires`` and ``extras_require``
-    create modified versions in a way that can be written in ``requires.txt``
-    """
-    extras = _convert_extras_requirements(extras_require)
-    return _move_install_requirements_markers(install_requires, extras)
-
-
-def _convert_extras_requirements(
-    extras_require: Mapping[str, _StrOrIter],
-) -> defaultdict[str, _Ordered[Requirement]]:
-    """
-    Convert requirements in `extras_require` of the form
-    `"extra": ["barbazquux; {marker}"]` to
-    `"extra:{marker}": ["barbazquux"]`.
-    """
-    output = defaultdict[str, _Ordered[Requirement]](dict)
-    for section, v in extras_require.items():
-        # Do not strip empty sections.
-        output[section]
-        for r in _reqs.parse(v):
-            output[section + _suffix_for(r)].setdefault(r)
-
-    return output
-
-
-def _move_install_requirements_markers(
-    install_requires: _StrOrIter, extras_require: Mapping[str, _Ordered[Requirement]]
-) -> tuple[list[str], dict[str, list[str]]]:
-    """
-    The ``requires.txt`` file has an specific format:
-        - Environment markers need to be part of the section headers and
-          should not be part of the requirement spec itself.
-
-    Move requirements in ``install_requires`` that are using environment
-    markers ``extras_require``.
-    """
-
-    # divide the install_requires into two sets, simple ones still
-    # handled by install_requires and more complex ones handled by extras_require.
-
-    inst_reqs = list(_reqs.parse(install_requires))
-    simple_reqs = filter(_no_marker, inst_reqs)
-    complex_reqs = filterfalse(_no_marker, inst_reqs)
-    simple_install_requires = list(map(str, simple_reqs))
-
-    for r in complex_reqs:
-        extras_require[':' + str(r.marker)].setdefault(r)
-
-    expanded_extras = dict(
-        # list(dict.fromkeys(...))  ensures a list of unique strings
-        (k, list(dict.fromkeys(str(r) for r in map(_clean_req, v))))
-        for k, v in extras_require.items()
-    )
-
-    return simple_install_requires, expanded_extras
-
-
-def _suffix_for(req):
-    """Return the 'extras_require' suffix for a given requirement."""
-    return ':' + str(req.marker) if req.marker else ''
-
-
-def _clean_req(req):
-    """Given a Requirement, remove environment markers and return it"""
-    r = Requirement(str(req))  # create a copy before modifying
-    r.marker = None
-    return r
-
-
-def _no_marker(req):
-    return not req.marker
-
-
-def _write_requirements(stream, reqs):
-    lines = yield_lines(reqs or ())
-
-    def append_cr(line):
-        return line + '\n'
-
-    lines = map(append_cr, lines)
-    stream.writelines(lines)
-
-
-def write_requirements(cmd, basename, filename):
-    dist = cmd.distribution
-    data = io.StringIO()
-    install_requires, extras_require = _prepare(
-        dist.install_requires or (), dist.extras_require or {}
-    )
-    _write_requirements(data, install_requires)
-    for extra in sorted(extras_require):
-        data.write('\n[{extra}]\n'.format(**vars()))
-        _write_requirements(data, extras_require[extra])
-    cmd.write_or_delete_file("requirements", filename, data.getvalue())
-
-
-def write_setup_requirements(cmd, basename, filename):
-    data = io.StringIO()
-    _write_requirements(data, cmd.distribution.setup_requires)
-    cmd.write_or_delete_file("setup-requirements", filename, data.getvalue())
diff --git a/voxvera/vendor/setuptools/command/alias.py b/voxvera/vendor/setuptools/command/alias.py
deleted file mode 100644
index 0ffa311..0000000
--- a/voxvera/vendor/setuptools/command/alias.py
+++ /dev/null
@@ -1,77 +0,0 @@
-from setuptools.command.setopt import config_file, edit_config, option_base
-
-from distutils.errors import DistutilsOptionError
-
-
-def shquote(arg):
-    """Quote an argument for later parsing by shlex.split()"""
-    for c in '"', "'", "\\", "#":
-        if c in arg:
-            return repr(arg)
-    if arg.split() != [arg]:
-        return repr(arg)
-    return arg
-
-
-class alias(option_base):
-    """Define a shortcut that invokes one or more commands"""
-
-    description = "define a shortcut to invoke one or more commands"
-    command_consumes_arguments = True
-
-    user_options = [
-        ('remove', 'r', 'remove (unset) the alias'),
-    ] + option_base.user_options
-
-    boolean_options = option_base.boolean_options + ['remove']
-
-    def initialize_options(self):
-        option_base.initialize_options(self)
-        self.args = None
-        self.remove = None
-
-    def finalize_options(self) -> None:
-        option_base.finalize_options(self)
-        if self.remove and len(self.args) != 1:
-            raise DistutilsOptionError(
-                "Must specify exactly one argument (the alias name) when using --remove"
-            )
-
-    def run(self) -> None:
-        aliases = self.distribution.get_option_dict('aliases')
-
-        if not self.args:
-            print("Command Aliases")
-            print("---------------")
-            for alias in aliases:
-                print("setup.py alias", format_alias(alias, aliases))
-            return
-
-        elif len(self.args) == 1:
-            (alias,) = self.args
-            if self.remove:
-                command = None
-            elif alias in aliases:
-                print("setup.py alias", format_alias(alias, aliases))
-                return
-            else:
-                print(f"No alias definition found for {alias!r}")
-                return
-        else:
-            alias = self.args[0]
-            command = ' '.join(map(shquote, self.args[1:]))
-
-        edit_config(self.filename, {'aliases': {alias: command}})
-
-
-def format_alias(name, aliases):
-    source, command = aliases[name]
-    if source == config_file('global'):
-        source = '--global-config '
-    elif source == config_file('user'):
-        source = '--user-config '
-    elif source == config_file('local'):
-        source = ''
-    else:
-        source = f'--filename={source!r}'
-    return source + name + ' ' + command
diff --git a/voxvera/vendor/setuptools/command/bdist_egg.py b/voxvera/vendor/setuptools/command/bdist_egg.py
deleted file mode 100644
index dbabecc..0000000
--- a/voxvera/vendor/setuptools/command/bdist_egg.py
+++ /dev/null
@@ -1,471 +0,0 @@
-"""setuptools.command.bdist_egg
-
-Build .egg distributions"""
-
-from __future__ import annotations
-
-import marshal
-import os
-import re
-import sys
-import textwrap
-from collections.abc import Iterator
-from sysconfig import get_path, get_platform, get_python_version
-from types import CodeType
-from typing import TYPE_CHECKING, AnyStr, Literal
-
-from setuptools import Command
-from setuptools.extension import Library
-
-from .._path import StrPath, StrPathT, ensure_directory
-
-from distutils import log
-from distutils.dir_util import mkpath, remove_tree
-
-if TYPE_CHECKING:
-    from _typeshed import GenericPath
-    from typing_extensions import TypeAlias
-
-# Same as zipfile._ZipFileMode from typeshed
-_ZipFileMode: TypeAlias = Literal["r", "w", "x", "a"]
-
-
-def _get_purelib():
-    return get_path("purelib")
-
-
-def strip_module(filename):
-    if '.' in filename:
-        filename = os.path.splitext(filename)[0]
-    filename = filename.removesuffix('module')
-    return filename
-
-
-def sorted_walk(
-    dir: GenericPath[AnyStr],
-) -> Iterator[tuple[AnyStr, list[AnyStr], list[AnyStr]]]:
-    """Do os.walk in a reproducible way,
-    independent of indeterministic filesystem readdir order
-    """
-    for base, dirs, files in os.walk(dir):
-        dirs.sort()
-        files.sort()
-        yield base, dirs, files
-
-
-def write_stub(resource, pyfile) -> None:
-    _stub_template = textwrap.dedent(
-        """
-        def __bootstrap__():
-            global __bootstrap__, __loader__, __file__
-            import sys, importlib.resources as irs, importlib.util
-            with irs.as_file(irs.files(__name__).joinpath(%r)) as __file__:
-                __loader__ = None; del __bootstrap__, __loader__
-                spec = importlib.util.spec_from_file_location(__name__,__file__)
-                mod = importlib.util.module_from_spec(spec)
-                spec.loader.exec_module(mod)
-        __bootstrap__()
-        """
-    ).lstrip()
-    with open(pyfile, 'w', encoding="utf-8") as f:
-        f.write(_stub_template % resource)
-
-
-class bdist_egg(Command):
-    description = 'create an "egg" distribution'
-
-    user_options = [
-        ('bdist-dir=', 'b', "temporary directory for creating the distribution"),
-        (
-            'plat-name=',
-            'p',
-            "platform name to embed in generated filenames "
-            "(by default uses `sysconfig.get_platform()`)",
-        ),
-        ('exclude-source-files', None, "remove all .py files from the generated egg"),
-        (
-            'keep-temp',
-            'k',
-            "keep the pseudo-installation tree around after "
-            "creating the distribution archive",
-        ),
-        ('dist-dir=', 'd', "directory to put final built distributions in"),
-        ('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
-    ]
-
-    boolean_options = ['keep-temp', 'skip-build', 'exclude-source-files']
-
-    def initialize_options(self):
-        self.bdist_dir = None
-        self.plat_name = None
-        self.keep_temp = False
-        self.dist_dir = None
-        self.skip_build = False
-        self.egg_output = None
-        self.exclude_source_files = None
-
-    def finalize_options(self) -> None:
-        ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info")
-        self.egg_info = ei_cmd.egg_info
-
-        if self.bdist_dir is None:
-            bdist_base = self.get_finalized_command('bdist').bdist_base
-            self.bdist_dir = os.path.join(bdist_base, 'egg')
-
-        if self.plat_name is None:
-            self.plat_name = get_platform()
-
-        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
-
-        if self.egg_output is None:
-            # Compute filename of the output egg
-            basename = ei_cmd._get_egg_basename(
-                py_version=get_python_version(),
-                platform=self.distribution.has_ext_modules() and self.plat_name,
-            )
-
-            self.egg_output = os.path.join(self.dist_dir, basename + '.egg')
-
-    def do_install_data(self) -> None:
-        # Hack for packages that install data to install's --install-lib
-        self.get_finalized_command('install').install_lib = self.bdist_dir
-
-        site_packages = os.path.normcase(os.path.realpath(_get_purelib()))
-        old, self.distribution.data_files = self.distribution.data_files, []
-
-        for item in old:
-            if isinstance(item, tuple) and len(item) == 2:
-                if os.path.isabs(item[0]):
-                    realpath = os.path.realpath(item[0])
-                    normalized = os.path.normcase(realpath)
-                    if normalized == site_packages or normalized.startswith(
-                        site_packages + os.sep
-                    ):
-                        item = realpath[len(site_packages) + 1 :], item[1]
-                        # XXX else: raise ???
-            self.distribution.data_files.append(item)
-
-        try:
-            log.info("installing package data to %s", self.bdist_dir)
-            self.call_command('install_data', force=False, root=None)
-        finally:
-            self.distribution.data_files = old
-
-    def get_outputs(self):
-        return [self.egg_output]
-
-    def call_command(self, cmdname, **kw):
-        """Invoke reinitialized command `cmdname` with keyword args"""
-        for dirname in INSTALL_DIRECTORY_ATTRS:
-            kw.setdefault(dirname, self.bdist_dir)
-        kw.setdefault('skip_build', self.skip_build)
-        cmd = self.reinitialize_command(cmdname, **kw)
-        self.run_command(cmdname)
-        return cmd
-
-    def run(self) -> None:  # noqa: C901  # is too complex (14)  # FIXME
-        # Generate metadata first
-        self.run_command("egg_info")
-        # We run install_lib before install_data, because some data hacks
-        # pull their data path from the install_lib command.
-        log.info("installing library code to %s", self.bdist_dir)
-        instcmd = self.get_finalized_command('install')
-        old_root = instcmd.root
-        instcmd.root = None
-        if self.distribution.has_c_libraries() and not self.skip_build:
-            self.run_command('build_clib')
-        cmd = self.call_command('install_lib', warn_dir=False)
-        instcmd.root = old_root
-
-        all_outputs, ext_outputs = self.get_ext_outputs()
-        self.stubs = []
-        to_compile = []
-        for p, ext_name in enumerate(ext_outputs):
-            filename, _ext = os.path.splitext(ext_name)
-            pyfile = os.path.join(self.bdist_dir, strip_module(filename) + '.py')
-            self.stubs.append(pyfile)
-            log.info("creating stub loader for %s", ext_name)
-            write_stub(os.path.basename(ext_name), pyfile)
-            to_compile.append(pyfile)
-            ext_outputs[p] = ext_name.replace(os.sep, '/')
-
-        if to_compile:
-            cmd.byte_compile(to_compile)
-        if self.distribution.data_files:
-            self.do_install_data()
-
-        # Make the EGG-INFO directory
-        archive_root = self.bdist_dir
-        egg_info = os.path.join(archive_root, 'EGG-INFO')
-        self.mkpath(egg_info)
-        if self.distribution.scripts:
-            script_dir = os.path.join(egg_info, 'scripts')
-            log.info("installing scripts to %s", script_dir)
-            self.call_command('install_scripts', install_dir=script_dir, no_ep=True)
-
-        self.copy_metadata_to(egg_info)
-        native_libs = os.path.join(egg_info, "native_libs.txt")
-        if all_outputs:
-            log.info("writing %s", native_libs)
-            ensure_directory(native_libs)
-            with open(native_libs, 'wt', encoding="utf-8") as libs_file:
-                libs_file.write('\n'.join(all_outputs))
-                libs_file.write('\n')
-        elif os.path.isfile(native_libs):
-            log.info("removing %s", native_libs)
-            os.unlink(native_libs)
-
-        write_safety_flag(os.path.join(archive_root, 'EGG-INFO'), self.zip_safe())
-
-        if os.path.exists(os.path.join(self.egg_info, 'depends.txt')):
-            log.warn(
-                "WARNING: 'depends.txt' will not be used by setuptools 0.6!\n"
-                "Use the install_requires/extras_require setup() args instead."
-            )
-
-        if self.exclude_source_files:
-            self.zap_pyfiles()
-
-        # Make the archive
-        make_zipfile(
-            self.egg_output,
-            archive_root,
-            verbose=self.verbose,
-            mode=self.gen_header(),
-        )
-        if not self.keep_temp:
-            remove_tree(self.bdist_dir)
-
-        # Add to 'Distribution.dist_files' so that the "upload" command works
-        getattr(self.distribution, 'dist_files', []).append((
-            'bdist_egg',
-            get_python_version(),
-            self.egg_output,
-        ))
-
-    def zap_pyfiles(self) -> None:
-        log.info("Removing .py files from temporary directory")
-        for base, dirs, files in walk_egg(self.bdist_dir):
-            for name in files:
-                path = os.path.join(base, name)
-
-                if name.endswith('.py'):
-                    log.debug("Deleting %s", path)
-                    os.unlink(path)
-
-                if base.endswith('__pycache__'):
-                    path_old = path
-
-                    pattern = r'(?P.+)\.(?P[^.]+)\.pyc'
-                    m = re.match(pattern, name)
-                    # We shouldn't find any non-pyc files in __pycache__
-                    assert m is not None
-                    path_new = os.path.join(base, os.pardir, m.group('name') + '.pyc')
-                    log.info(f"Renaming file from [{path_old}] to [{path_new}]")
-                    try:
-                        os.remove(path_new)
-                    except OSError:
-                        pass
-                    os.rename(path_old, path_new)
-
-    def zip_safe(self):
-        safe = getattr(self.distribution, 'zip_safe', None)
-        if safe is not None:
-            return safe
-        log.warn("zip_safe flag not set; analyzing archive contents...")
-        return analyze_egg(self.bdist_dir, self.stubs)
-
-    def gen_header(self) -> Literal["w"]:
-        return 'w'
-
-    def copy_metadata_to(self, target_dir) -> None:
-        "Copy metadata (egg info) to the target_dir"
-        # normalize the path (so that a forward-slash in egg_info will
-        # match using startswith below)
-        norm_egg_info = os.path.normpath(self.egg_info)
-        prefix = os.path.join(norm_egg_info, '')
-        for path in self.ei_cmd.filelist.files:
-            if path.startswith(prefix):
-                target = os.path.join(target_dir, path[len(prefix) :])
-                ensure_directory(target)
-                self.copy_file(path, target)
-
-    def get_ext_outputs(self):
-        """Get a list of relative paths to C extensions in the output distro"""
-
-        all_outputs = []
-        ext_outputs = []
-
-        paths = {self.bdist_dir: ''}
-        for base, dirs, files in sorted_walk(self.bdist_dir):
-            all_outputs.extend(
-                paths[base] + filename
-                for filename in files
-                if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS
-            )
-            for filename in dirs:
-                paths[os.path.join(base, filename)] = paths[base] + filename + '/'
-
-        if self.distribution.has_ext_modules():
-            build_cmd = self.get_finalized_command('build_ext')
-            for ext in build_cmd.extensions:
-                if isinstance(ext, Library):
-                    continue
-                fullname = build_cmd.get_ext_fullname(ext.name)
-                filename = build_cmd.get_ext_filename(fullname)
-                if not os.path.basename(filename).startswith('dl-'):
-                    if os.path.exists(os.path.join(self.bdist_dir, filename)):
-                        ext_outputs.append(filename)
-
-        return all_outputs, ext_outputs
-
-
-NATIVE_EXTENSIONS: dict[str, None] = dict.fromkeys('.dll .so .dylib .pyd'.split())
-
-
-def walk_egg(egg_dir: StrPath) -> Iterator[tuple[str, list[str], list[str]]]:
-    """Walk an unpacked egg's contents, skipping the metadata directory"""
-    walker = sorted_walk(egg_dir)
-    base, dirs, files = next(walker)
-    if 'EGG-INFO' in dirs:
-        dirs.remove('EGG-INFO')
-    yield base, dirs, files
-    yield from walker
-
-
-def analyze_egg(egg_dir, stubs):
-    # check for existing flag in EGG-INFO
-    for flag, fn in safety_flags.items():
-        if os.path.exists(os.path.join(egg_dir, 'EGG-INFO', fn)):
-            return flag
-    if not can_scan():
-        return False
-    safe = True
-    for base, dirs, files in walk_egg(egg_dir):
-        for name in files:
-            if name.endswith(('.py', '.pyw')):
-                continue
-            elif name.endswith(('.pyc', '.pyo')):
-                # always scan, even if we already know we're not safe
-                safe = scan_module(egg_dir, base, name, stubs) and safe
-    return safe
-
-
-def write_safety_flag(egg_dir, safe) -> None:
-    # Write or remove zip safety flag file(s)
-    for flag, fn in safety_flags.items():
-        fn = os.path.join(egg_dir, fn)
-        if os.path.exists(fn):
-            if safe is None or bool(safe) != flag:
-                os.unlink(fn)
-        elif safe is not None and bool(safe) == flag:
-            with open(fn, 'wt', encoding="utf-8") as f:
-                f.write('\n')
-
-
-safety_flags = {
-    True: 'zip-safe',
-    False: 'not-zip-safe',
-}
-
-
-def scan_module(egg_dir, base, name, stubs):
-    """Check whether module possibly uses unsafe-for-zipfile stuff"""
-
-    filename = os.path.join(base, name)
-    if filename[:-1] in stubs:
-        return True  # Extension module
-    pkg = base[len(egg_dir) + 1 :].replace(os.sep, '.')
-    module = pkg + (pkg and '.' or '') + os.path.splitext(name)[0]
-    skip = 16  # skip magic & reserved? & date & file size
-    f = open(filename, 'rb')
-    f.read(skip)
-    code = marshal.load(f)
-    f.close()
-    safe = True
-    symbols = dict.fromkeys(iter_symbols(code))
-    for bad in ['__file__', '__path__']:
-        if bad in symbols:
-            log.warn("%s: module references %s", module, bad)
-            safe = False
-    if 'inspect' in symbols:
-        for bad in [
-            'getsource',
-            'getabsfile',
-            'getfile',
-            'getsourcefile',
-            'getsourcelines',
-            'findsource',
-            'getcomments',
-            'getframeinfo',
-            'getinnerframes',
-            'getouterframes',
-            'stack',
-            'trace',
-        ]:
-            if bad in symbols:
-                log.warn("%s: module MAY be using inspect.%s", module, bad)
-                safe = False
-    return safe
-
-
-def iter_symbols(code: CodeType) -> Iterator[str]:
-    """Yield names and strings used by `code` and its nested code objects"""
-    yield from code.co_names
-    for const in code.co_consts:
-        if isinstance(const, str):
-            yield const
-        elif isinstance(const, CodeType):
-            yield from iter_symbols(const)
-
-
-def can_scan() -> bool:
-    if not sys.platform.startswith('java') and sys.platform != 'cli':
-        # CPython, PyPy, etc.
-        return True
-    log.warn("Unable to analyze compiled code on this platform.")
-    log.warn(
-        "Please ask the author to include a 'zip_safe'"
-        " setting (either True or False) in the package's setup.py"
-    )
-    return False
-
-
-# Attribute names of options for commands that might need to be convinced to
-# install to the egg build directory
-
-INSTALL_DIRECTORY_ATTRS = ['install_lib', 'install_dir', 'install_data', 'install_base']
-
-
-def make_zipfile(
-    zip_filename: StrPathT,
-    base_dir,
-    verbose: bool = False,
-    compress=True,
-    mode: _ZipFileMode = 'w',
-) -> StrPathT:
-    """Create a zip file from all the files under 'base_dir'.  The output
-    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
-    Python module (if available) or the InfoZIP "zip" utility (if installed
-    and found on the default search path).  If neither tool is available,
-    raises DistutilsExecError.  Returns the name of the output zip file.
-    """
-    import zipfile
-
-    mkpath(os.path.dirname(zip_filename))  # type: ignore[arg-type] # python/mypy#18075
-    log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir)
-
-    def visit(z, dirname, names):
-        for name in names:
-            path = os.path.normpath(os.path.join(dirname, name))
-            if os.path.isfile(path):
-                p = path[len(base_dir) + 1 :]
-                z.write(path, p)
-                log.debug("adding '%s'", p)
-
-    compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP_STORED
-    z = zipfile.ZipFile(zip_filename, mode, compression=compression)
-    for dirname, dirs, files in sorted_walk(base_dir):
-        visit(z, dirname, files)
-    z.close()
-    return zip_filename
diff --git a/voxvera/vendor/setuptools/command/bdist_rpm.py b/voxvera/vendor/setuptools/command/bdist_rpm.py
deleted file mode 100644
index 6dbb270..0000000
--- a/voxvera/vendor/setuptools/command/bdist_rpm.py
+++ /dev/null
@@ -1,42 +0,0 @@
-from ..dist import Distribution
-from ..warnings import SetuptoolsDeprecationWarning
-
-import distutils.command.bdist_rpm as orig
-
-
-class bdist_rpm(orig.bdist_rpm):
-    """
-    Override the default bdist_rpm behavior to do the following:
-
-    1. Run egg_info to ensure the name and version are properly calculated.
-    2. Always run 'install' using --single-version-externally-managed to
-       disable eggs in RPM distributions.
-    """
-
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-
-    def run(self) -> None:
-        SetuptoolsDeprecationWarning.emit(
-            "Deprecated command",
-            """
-            bdist_rpm is deprecated and will be removed in a future version.
-            Use bdist_wheel (wheel packages) instead.
-            """,
-            see_url="https://github.com/pypa/setuptools/issues/1988",
-            due_date=(2023, 10, 30),  # Deprecation introduced in 22 Oct 2021.
-        )
-
-        # ensure distro name is up-to-date
-        self.run_command('egg_info')
-
-        orig.bdist_rpm.run(self)
-
-    def _make_spec_file(self):
-        spec = orig.bdist_rpm._make_spec_file(self)
-        return [
-            line.replace(
-                "setup.py install ",
-                "setup.py install --single-version-externally-managed ",
-            ).replace("%setup", "%setup -n %{name}-%{unmangled_version}")
-            for line in spec
-        ]
diff --git a/voxvera/vendor/setuptools/command/bdist_wheel.py b/voxvera/vendor/setuptools/command/bdist_wheel.py
deleted file mode 100644
index 3bdfa0b..0000000
--- a/voxvera/vendor/setuptools/command/bdist_wheel.py
+++ /dev/null
@@ -1,603 +0,0 @@
-"""
-Create a wheel (.whl) distribution.
-
-A wheel is a built archive format.
-"""
-
-from __future__ import annotations
-
-import os
-import re
-import shutil
-import struct
-import sys
-import sysconfig
-import warnings
-from collections.abc import Iterable, Sequence
-from email.generator import BytesGenerator
-from glob import iglob
-from typing import Literal, cast
-from zipfile import ZIP_DEFLATED, ZIP_STORED
-
-from packaging import tags, version as _packaging_version
-from wheel.wheelfile import WheelFile
-
-from .. import Command, __version__, _shutil
-from .._core_metadata import _safe_license_file
-from .._normalization import safer_name
-from ..warnings import SetuptoolsDeprecationWarning
-from .egg_info import egg_info as egg_info_cls
-
-from distutils import log
-
-
-def safe_version(version: str) -> str:
-    """
-    Convert an arbitrary string to a standard version string
-    """
-    try:
-        # normalize the version
-        return str(_packaging_version.Version(version))
-    except _packaging_version.InvalidVersion:
-        version = version.replace(" ", ".")
-        return re.sub("[^A-Za-z0-9.]+", "-", version)
-
-
-setuptools_major_version = int(__version__.split(".")[0])
-
-PY_LIMITED_API_PATTERN = r"cp3\d"
-
-
-def _is_32bit_interpreter() -> bool:
-    return struct.calcsize("P") == 4
-
-
-def python_tag() -> str:
-    return f"py{sys.version_info.major}"
-
-
-def get_platform(archive_root: str | None) -> str:
-    """Return our platform name 'win32', 'linux_x86_64'"""
-    result = sysconfig.get_platform()
-    if result.startswith("macosx") and archive_root is not None:  # pragma: no cover
-        from wheel.macosx_libfile import calculate_macosx_platform_tag
-
-        result = calculate_macosx_platform_tag(archive_root, result)
-    elif _is_32bit_interpreter():
-        if result == "linux-x86_64":
-            # pip pull request #3497
-            result = "linux-i686"
-        elif result == "linux-aarch64":
-            # packaging pull request #234
-            # TODO armv8l, packaging pull request #690 => this did not land
-            # in pip/packaging yet
-            result = "linux-armv7l"
-
-    return result.replace("-", "_")
-
-
-def get_flag(
-    var: str, fallback: bool, expected: bool = True, warn: bool = True
-) -> bool:
-    """Use a fallback value for determining SOABI flags if the needed config
-    var is unset or unavailable."""
-    val = sysconfig.get_config_var(var)
-    if val is None:
-        if warn:
-            warnings.warn(
-                f"Config variable '{var}' is unset, Python ABI tag may be incorrect",
-                RuntimeWarning,
-                stacklevel=2,
-            )
-        return fallback
-    return val == expected
-
-
-def get_abi_tag() -> str | None:
-    """Return the ABI tag based on SOABI (if available) or emulate SOABI (PyPy2)."""
-    soabi: str = sysconfig.get_config_var("SOABI")
-    impl = tags.interpreter_name()
-    if not soabi and impl in ("cp", "pp") and hasattr(sys, "maxunicode"):
-        d = ""
-        u = ""
-        if get_flag("Py_DEBUG", hasattr(sys, "gettotalrefcount"), warn=(impl == "cp")):
-            d = "d"
-
-        abi = f"{impl}{tags.interpreter_version()}{d}{u}"
-    elif soabi and impl == "cp" and soabi.startswith("cpython"):
-        # non-Windows
-        abi = "cp" + soabi.split("-")[1]
-    elif soabi and impl == "cp" and soabi.startswith("cp"):
-        # Windows
-        abi = soabi.split("-")[0]
-        if hasattr(sys, "gettotalrefcount"):
-            # using debug build; append "d" flag
-            abi += "d"
-    elif soabi and impl == "pp":
-        # we want something like pypy36-pp73
-        abi = "-".join(soabi.split("-")[:2])
-        abi = abi.replace(".", "_").replace("-", "_")
-    elif soabi and impl == "graalpy":
-        abi = "-".join(soabi.split("-")[:3])
-        abi = abi.replace(".", "_").replace("-", "_")
-    elif soabi:
-        abi = soabi.replace(".", "_").replace("-", "_")
-    else:
-        abi = None
-
-    return abi
-
-
-def safer_version(version: str) -> str:
-    return safe_version(version).replace("-", "_")
-
-
-class bdist_wheel(Command):
-    description = "create a wheel distribution"
-
-    supported_compressions = {
-        "stored": ZIP_STORED,
-        "deflated": ZIP_DEFLATED,
-    }
-
-    user_options = [
-        ("bdist-dir=", "b", "temporary directory for creating the distribution"),
-        (
-            "plat-name=",
-            "p",
-            "platform name to embed in generated filenames "
-            f"[default: {get_platform(None)}]",
-        ),
-        (
-            "keep-temp",
-            "k",
-            "keep the pseudo-installation tree around after "
-            "creating the distribution archive",
-        ),
-        ("dist-dir=", "d", "directory to put final built distributions in"),
-        ("skip-build", None, "skip rebuilding everything (for testing/debugging)"),
-        (
-            "relative",
-            None,
-            "build the archive using relative paths [default: false]",
-        ),
-        (
-            "owner=",
-            "u",
-            "Owner name used when creating a tar file [default: current user]",
-        ),
-        (
-            "group=",
-            "g",
-            "Group name used when creating a tar file [default: current group]",
-        ),
-        ("universal", None, "*DEPRECATED* make a universal wheel [default: false]"),
-        (
-            "compression=",
-            None,
-            f"zipfile compression (one of: {', '.join(supported_compressions)}) [default: 'deflated']",
-        ),
-        (
-            "python-tag=",
-            None,
-            f"Python implementation compatibility tag [default: '{python_tag()}']",
-        ),
-        (
-            "build-number=",
-            None,
-            "Build number for this particular version. "
-            "As specified in PEP-0427, this must start with a digit. "
-            "[default: None]",
-        ),
-        (
-            "py-limited-api=",
-            None,
-            "Python tag (cp32|cp33|cpNN) for abi3 wheel tag [default: false]",
-        ),
-        (
-            "dist-info-dir=",
-            None,
-            "directory where a pre-generated dist-info can be found (e.g. as a "
-            "result of calling the PEP517 'prepare_metadata_for_build_wheel' "
-            "method)",
-        ),
-    ]
-
-    boolean_options = ["keep-temp", "skip-build", "relative", "universal"]
-
-    def initialize_options(self) -> None:
-        self.bdist_dir: str | None = None
-        self.data_dir = ""
-        self.plat_name: str | None = None
-        self.plat_tag: str | None = None
-        self.format = "zip"
-        self.keep_temp = False
-        self.dist_dir: str | None = None
-        self.dist_info_dir = None
-        self.egginfo_dir: str | None = None
-        self.root_is_pure: bool | None = None
-        self.skip_build = False
-        self.relative = False
-        self.owner = None
-        self.group = None
-        self.universal = False
-        self.compression: str | int = "deflated"
-        self.python_tag = python_tag()
-        self.build_number: str | None = None
-        self.py_limited_api: str | Literal[False] = False
-        self.plat_name_supplied = False
-
-    def finalize_options(self) -> None:
-        if not self.bdist_dir:
-            bdist_base = self.get_finalized_command("bdist").bdist_base
-            self.bdist_dir = os.path.join(bdist_base, "wheel")
-
-        if self.dist_info_dir is None:
-            egg_info = cast(egg_info_cls, self.distribution.get_command_obj("egg_info"))
-            egg_info.ensure_finalized()  # needed for correct `wheel_dist_name`
-
-        self.data_dir = self.wheel_dist_name + ".data"
-        self.plat_name_supplied = bool(self.plat_name)
-
-        need_options = ("dist_dir", "plat_name", "skip_build")
-
-        self.set_undefined_options("bdist", *zip(need_options, need_options))
-
-        self.root_is_pure = not (
-            self.distribution.has_ext_modules() or self.distribution.has_c_libraries()
-        )
-
-        self._validate_py_limited_api()
-
-        # Support legacy [wheel] section for setting universal
-        wheel = self.distribution.get_option_dict("wheel")
-        if "universal" in wheel:  # pragma: no cover
-            # please don't define this in your global configs
-            log.warn("The [wheel] section is deprecated. Use [bdist_wheel] instead.")
-            val = wheel["universal"][1].strip()
-            if val.lower() in ("1", "true", "yes"):
-                self.universal = True
-
-        if self.universal:
-            SetuptoolsDeprecationWarning.emit(
-                "bdist_wheel.universal is deprecated",
-                """
-                With Python 2.7 end-of-life, support for building universal wheels
-                (i.e., wheels that support both Python 2 and Python 3)
-                is being obviated.
-                Please discontinue using this option, or if you still need it,
-                file an issue with pypa/setuptools describing your use case.
-                """,
-                due_date=(2025, 8, 30),  # Introduced in 2024-08-30
-            )
-
-        if self.build_number is not None and not self.build_number[:1].isdigit():
-            raise ValueError("Build tag (build-number) must start with a digit.")
-
-    def _validate_py_limited_api(self) -> None:
-        if not self.py_limited_api:
-            return
-
-        if not re.match(PY_LIMITED_API_PATTERN, self.py_limited_api):
-            raise ValueError(f"py-limited-api must match '{PY_LIMITED_API_PATTERN}'")
-
-        if sysconfig.get_config_var("Py_GIL_DISABLED"):
-            raise ValueError(
-                f"`py_limited_api={self.py_limited_api!r}` not supported. "
-                "`Py_LIMITED_API` is currently incompatible with "
-                "`Py_GIL_DISABLED`. "
-                "See https://github.com/python/cpython/issues/111506."
-            )
-
-    @property
-    def wheel_dist_name(self) -> str:
-        """Return distribution full name with - replaced with _"""
-        components = [
-            safer_name(self.distribution.get_name()),
-            safer_version(self.distribution.get_version()),
-        ]
-        if self.build_number:
-            components.append(self.build_number)
-        return "-".join(components)
-
-    def get_tag(self) -> tuple[str, str, str]:
-        # bdist sets self.plat_name if unset, we should only use it for purepy
-        # wheels if the user supplied it.
-        if self.plat_name_supplied and self.plat_name:
-            plat_name = self.plat_name
-        elif self.root_is_pure:
-            plat_name = "any"
-        else:
-            # macosx contains system version in platform name so need special handle
-            if self.plat_name and not self.plat_name.startswith("macosx"):
-                plat_name = self.plat_name
-            else:
-                # on macosx always limit the platform name to comply with any
-                # c-extension modules in bdist_dir, since the user can specify
-                # a higher MACOSX_DEPLOYMENT_TARGET via tools like CMake
-
-                # on other platforms, and on macosx if there are no c-extension
-                # modules, use the default platform name.
-                plat_name = get_platform(self.bdist_dir)
-
-            if _is_32bit_interpreter():
-                if plat_name in ("linux-x86_64", "linux_x86_64"):
-                    plat_name = "linux_i686"
-                if plat_name in ("linux-aarch64", "linux_aarch64"):
-                    # TODO armv8l, packaging pull request #690 => this did not land
-                    # in pip/packaging yet
-                    plat_name = "linux_armv7l"
-
-        plat_name = (
-            plat_name.lower().replace("-", "_").replace(".", "_").replace(" ", "_")
-        )
-
-        if self.root_is_pure:
-            if self.universal:
-                impl = "py2.py3"
-            else:
-                impl = self.python_tag
-            tag = (impl, "none", plat_name)
-        else:
-            impl_name = tags.interpreter_name()
-            impl_ver = tags.interpreter_version()
-            impl = impl_name + impl_ver
-            # We don't work on CPython 3.1, 3.0.
-            if self.py_limited_api and (impl_name + impl_ver).startswith("cp3"):
-                impl = self.py_limited_api
-                abi_tag = "abi3"
-            else:
-                abi_tag = str(get_abi_tag()).lower()
-            tag = (impl, abi_tag, plat_name)
-            # issue gh-374: allow overriding plat_name
-            supported_tags = [
-                (t.interpreter, t.abi, plat_name) for t in tags.sys_tags()
-            ]
-            assert tag in supported_tags, (
-                f"would build wheel with unsupported tag {tag}"
-            )
-        return tag
-
-    def run(self):
-        build_scripts = self.reinitialize_command("build_scripts")
-        build_scripts.executable = "python"
-        build_scripts.force = True
-
-        build_ext = self.reinitialize_command("build_ext")
-        build_ext.inplace = False
-
-        if not self.skip_build:
-            self.run_command("build")
-
-        install = self.reinitialize_command("install", reinit_subcommands=True)
-        install.root = self.bdist_dir
-        install.compile = False
-        install.skip_build = self.skip_build
-        install.warn_dir = False
-
-        # A wheel without setuptools scripts is more cross-platform.
-        # Use the (undocumented) `no_ep` option to setuptools'
-        # install_scripts command to avoid creating entry point scripts.
-        install_scripts = self.reinitialize_command("install_scripts")
-        install_scripts.no_ep = True
-
-        # Use a custom scheme for the archive, because we have to decide
-        # at installation time which scheme to use.
-        for key in ("headers", "scripts", "data", "purelib", "platlib"):
-            setattr(install, "install_" + key, os.path.join(self.data_dir, key))
-
-        basedir_observed = ""
-
-        if os.name == "nt":
-            # win32 barfs if any of these are ''; could be '.'?
-            # (distutils.command.install:change_roots bug)
-            basedir_observed = os.path.normpath(os.path.join(self.data_dir, ".."))
-            self.install_libbase = self.install_lib = basedir_observed
-
-        setattr(
-            install,
-            "install_purelib" if self.root_is_pure else "install_platlib",
-            basedir_observed,
-        )
-
-        log.info(f"installing to {self.bdist_dir}")
-
-        self.run_command("install")
-
-        impl_tag, abi_tag, plat_tag = self.get_tag()
-        archive_basename = f"{self.wheel_dist_name}-{impl_tag}-{abi_tag}-{plat_tag}"
-        if not self.relative:
-            archive_root = self.bdist_dir
-        else:
-            archive_root = os.path.join(
-                self.bdist_dir, self._ensure_relative(install.install_base)
-            )
-
-        self.set_undefined_options("install_egg_info", ("target", "egginfo_dir"))
-        distinfo_dirname = (
-            f"{safer_name(self.distribution.get_name())}-"
-            f"{safer_version(self.distribution.get_version())}.dist-info"
-        )
-        distinfo_dir = os.path.join(self.bdist_dir, distinfo_dirname)
-        if self.dist_info_dir:
-            # Use the given dist-info directly.
-            log.debug(f"reusing {self.dist_info_dir}")
-            shutil.copytree(self.dist_info_dir, distinfo_dir)
-            # Egg info is still generated, so remove it now to avoid it getting
-            # copied into the wheel.
-            _shutil.rmtree(self.egginfo_dir)
-        else:
-            # Convert the generated egg-info into dist-info.
-            self.egg2dist(self.egginfo_dir, distinfo_dir)
-
-        self.write_wheelfile(distinfo_dir)
-
-        # Make the archive
-        if not os.path.exists(self.dist_dir):
-            os.makedirs(self.dist_dir)
-
-        wheel_path = os.path.join(self.dist_dir, archive_basename + ".whl")
-        with WheelFile(wheel_path, "w", self._zip_compression()) as wf:
-            wf.write_files(archive_root)
-
-        # Add to 'Distribution.dist_files' so that the "upload" command works
-        getattr(self.distribution, "dist_files", []).append((
-            "bdist_wheel",
-            f"{sys.version_info.major}.{sys.version_info.minor}",
-            wheel_path,
-        ))
-
-        if not self.keep_temp:
-            log.info(f"removing {self.bdist_dir}")
-            _shutil.rmtree(self.bdist_dir)
-
-    def write_wheelfile(
-        self, wheelfile_base: str, generator: str = f"setuptools ({__version__})"
-    ) -> None:
-        from email.message import Message
-
-        msg = Message()
-        msg["Wheel-Version"] = "1.0"  # of the spec
-        msg["Generator"] = generator
-        msg["Root-Is-Purelib"] = str(self.root_is_pure).lower()
-        if self.build_number is not None:
-            msg["Build"] = self.build_number
-
-        # Doesn't work for bdist_wininst
-        impl_tag, abi_tag, plat_tag = self.get_tag()
-        for impl in impl_tag.split("."):
-            for abi in abi_tag.split("."):
-                for plat in plat_tag.split("."):
-                    msg["Tag"] = "-".join((impl, abi, plat))
-
-        wheelfile_path = os.path.join(wheelfile_base, "WHEEL")
-        log.info(f"creating {wheelfile_path}")
-        with open(wheelfile_path, "wb") as f:
-            BytesGenerator(f, maxheaderlen=0).flatten(msg)
-
-    def _ensure_relative(self, path: str) -> str:
-        # copied from dir_util, deleted
-        drive, path = os.path.splitdrive(path)
-        if path[0:1] == os.sep:
-            path = drive + path[1:]
-        return path
-
-    @property
-    def license_paths(self) -> Iterable[str]:
-        if setuptools_major_version >= 57:
-            # Setuptools has resolved any patterns to actual file names
-            return self.distribution.metadata.license_files or ()
-
-        files = set[str]()
-        metadata = self.distribution.get_option_dict("metadata")
-        if setuptools_major_version >= 42:
-            # Setuptools recognizes the license_files option but does not do globbing
-            patterns = cast(Sequence[str], self.distribution.metadata.license_files)
-        else:
-            # Prior to those, wheel is entirely responsible for handling license files
-            if "license_files" in metadata:
-                patterns = metadata["license_files"][1].split()
-            else:
-                patterns = ()
-
-        if "license_file" in metadata:
-            warnings.warn(
-                'The "license_file" option is deprecated. Use "license_files" instead.',
-                DeprecationWarning,
-                stacklevel=2,
-            )
-            files.add(metadata["license_file"][1])
-
-        if not files and not patterns and not isinstance(patterns, list):
-            patterns = ("LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*")
-
-        for pattern in patterns:
-            for path in iglob(pattern):
-                if path.endswith("~"):
-                    log.debug(
-                        f'ignoring license file "{path}" as it looks like a backup'
-                    )
-                    continue
-
-                if path not in files and os.path.isfile(path):
-                    log.info(
-                        f'adding license file "{path}" (matched pattern "{pattern}")'
-                    )
-                    files.add(path)
-
-        return files
-
-    def egg2dist(self, egginfo_path: str, distinfo_path: str) -> None:
-        """Convert an .egg-info directory into a .dist-info directory"""
-
-        def adios(p: str) -> None:
-            """Appropriately delete directory, file or link."""
-            if os.path.exists(p) and not os.path.islink(p) and os.path.isdir(p):
-                _shutil.rmtree(p)
-            elif os.path.exists(p):
-                os.unlink(p)
-
-        adios(distinfo_path)
-
-        if not os.path.exists(egginfo_path):
-            # There is no egg-info. This is probably because the egg-info
-            # file/directory is not named matching the distribution name used
-            # to name the archive file. Check for this case and report
-            # accordingly.
-            import glob
-
-            pat = os.path.join(os.path.dirname(egginfo_path), "*.egg-info")
-            possible = glob.glob(pat)
-            err = f"Egg metadata expected at {egginfo_path} but not found"
-            if possible:
-                alt = os.path.basename(possible[0])
-                err += f" ({alt} found - possible misnamed archive file?)"
-
-            raise ValueError(err)
-
-        # .egg-info is a directory
-        pkginfo_path = os.path.join(egginfo_path, "PKG-INFO")
-
-        # ignore common egg metadata that is useless to wheel
-        shutil.copytree(
-            egginfo_path,
-            distinfo_path,
-            ignore=lambda x, y: {
-                "PKG-INFO",
-                "requires.txt",
-                "SOURCES.txt",
-                "not-zip-safe",
-            },
-        )
-
-        # delete dependency_links if it is only whitespace
-        dependency_links_path = os.path.join(distinfo_path, "dependency_links.txt")
-        with open(dependency_links_path, encoding="utf-8") as dependency_links_file:
-            dependency_links = dependency_links_file.read().strip()
-        if not dependency_links:
-            adios(dependency_links_path)
-
-        metadata_path = os.path.join(distinfo_path, "METADATA")
-        shutil.copy(pkginfo_path, metadata_path)
-
-        licenses_folder_path = os.path.join(distinfo_path, "licenses")
-        for license_path in self.license_paths:
-            safe_path = _safe_license_file(license_path)
-            dist_info_license_path = os.path.join(licenses_folder_path, safe_path)
-            os.makedirs(os.path.dirname(dist_info_license_path), exist_ok=True)
-            shutil.copy(license_path, dist_info_license_path)
-
-        adios(egginfo_path)
-
-    def _zip_compression(self) -> int:
-        if (
-            isinstance(self.compression, int)
-            and self.compression in self.supported_compressions.values()
-        ):
-            return self.compression
-
-        compression = self.supported_compressions.get(str(self.compression))
-        if compression is not None:
-            return compression
-
-        raise ValueError(f"Unsupported compression: {self.compression!r}")
diff --git a/voxvera/vendor/setuptools/command/build.py b/voxvera/vendor/setuptools/command/build.py
deleted file mode 100644
index 54cbb8d..0000000
--- a/voxvera/vendor/setuptools/command/build.py
+++ /dev/null
@@ -1,135 +0,0 @@
-from __future__ import annotations
-
-from typing import Protocol
-
-from ..dist import Distribution
-
-from distutils.command.build import build as _build
-
-_ORIGINAL_SUBCOMMANDS = {"build_py", "build_clib", "build_ext", "build_scripts"}
-
-
-class build(_build):
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-
-    # copy to avoid sharing the object with parent class
-    sub_commands = _build.sub_commands[:]
-
-
-class SubCommand(Protocol):
-    """In order to support editable installations (see :pep:`660`) all
-    build subcommands **SHOULD** implement this protocol. They also **MUST** inherit
-    from ``setuptools.Command``.
-
-    When creating an :pep:`editable wheel <660>`, ``setuptools`` will try to evaluate
-    custom ``build`` subcommands using the following procedure:
-
-    1. ``setuptools`` will set the ``editable_mode`` attribute to ``True``
-    2. ``setuptools`` will execute the ``run()`` command.
-
-       .. important::
-          Subcommands **SHOULD** take advantage of ``editable_mode=True`` to adequate
-          its behaviour or perform optimisations.
-
-          For example, if a subcommand doesn't need to generate an extra file and
-          all it does is to copy a source file into the build directory,
-          ``run()`` **SHOULD** simply "early return".
-
-          Similarly, if the subcommand creates files that would be placed alongside
-          Python files in the final distribution, during an editable install
-          the command **SHOULD** generate these files "in place" (i.e. write them to
-          the original source directory, instead of using the build directory).
-          Note that ``get_output_mapping()`` should reflect that and include mappings
-          for "in place" builds accordingly.
-
-    3. ``setuptools`` use any knowledge it can derive from the return values of
-       ``get_outputs()`` and ``get_output_mapping()`` to create an editable wheel.
-       When relevant ``setuptools`` **MAY** attempt to use file links based on the value
-       of ``get_output_mapping()``. Alternatively, ``setuptools`` **MAY** attempt to use
-       :doc:`import hooks ` to redirect any attempt to import
-       to the directory with the original source code and other files built in place.
-
-    Please note that custom sub-commands **SHOULD NOT** rely on ``run()`` being
-    executed (or not) to provide correct return values for ``get_outputs()``,
-    ``get_output_mapping()`` or ``get_source_files()``. The ``get_*`` methods should
-    work independently of ``run()``.
-    """
-
-    editable_mode: bool = False
-    """Boolean flag that will be set to ``True`` when setuptools is used for an
-    editable installation (see :pep:`660`).
-    Implementations **SHOULD** explicitly set the default value of this attribute to
-    ``False``.
-    When subcommands run, they can use this flag to perform optimizations or change
-    their behaviour accordingly.
-    """
-
-    build_lib: str
-    """String representing the directory where the build artifacts should be stored,
-    e.g. ``build/lib``.
-    For example, if a distribution wants to provide a Python module named ``pkg.mod``,
-    then a corresponding file should be written to ``{build_lib}/package/module.py``.
-    A way of thinking about this is that the files saved under ``build_lib``
-    would be eventually copied to one of the directories in :obj:`site.PREFIXES`
-    upon installation.
-
-    A command that produces platform-independent files (e.g. compiling text templates
-    into Python functions), **CAN** initialize ``build_lib`` by copying its value from
-    the ``build_py`` command. On the other hand, a command that produces
-    platform-specific files **CAN** initialize ``build_lib`` by copying its value from
-    the ``build_ext`` command. In general this is done inside the ``finalize_options``
-    method with the help of the ``set_undefined_options`` command::
-
-        def finalize_options(self):
-            self.set_undefined_options("build_py", ("build_lib", "build_lib"))
-            ...
-    """
-
-    def initialize_options(self) -> None:
-        """(Required by the original :class:`setuptools.Command` interface)"""
-        ...
-
-    def finalize_options(self) -> None:
-        """(Required by the original :class:`setuptools.Command` interface)"""
-        ...
-
-    def run(self) -> None:
-        """(Required by the original :class:`setuptools.Command` interface)"""
-        ...
-
-    def get_source_files(self) -> list[str]:
-        """
-        Return a list of all files that are used by the command to create the expected
-        outputs.
-        For example, if your build command transpiles Java files into Python, you should
-        list here all the Java files.
-        The primary purpose of this function is to help populating the ``sdist``
-        with all the files necessary to build the distribution.
-        All files should be strings relative to the project root directory.
-        """
-        ...
-
-    def get_outputs(self) -> list[str]:
-        """
-        Return a list of files intended for distribution as they would have been
-        produced by the build.
-        These files should be strings in the form of
-        ``"{build_lib}/destination/file/path"``.
-
-        .. note::
-           The return value of ``get_output()`` should include all files used as keys
-           in ``get_output_mapping()`` plus files that are generated during the build
-           and don't correspond to any source file already present in the project.
-        """
-        ...
-
-    def get_output_mapping(self) -> dict[str, str]:
-        """
-        Return a mapping between destination files as they would be produced by the
-        build (dict keys) into the respective existing (source) files (dict values).
-        Existing (source) files should be represented as strings relative to the project
-        root directory.
-        Destination files should be strings in the form of
-        ``"{build_lib}/destination/file/path"``.
-        """
-        ...
diff --git a/voxvera/vendor/setuptools/command/build_clib.py b/voxvera/vendor/setuptools/command/build_clib.py
deleted file mode 100644
index f376f4c..0000000
--- a/voxvera/vendor/setuptools/command/build_clib.py
+++ /dev/null
@@ -1,103 +0,0 @@
-from ..dist import Distribution
-from ..modified import newer_pairwise_group
-
-import distutils.command.build_clib as orig
-from distutils import log
-from distutils.errors import DistutilsSetupError
-
-
-class build_clib(orig.build_clib):
-    """
-    Override the default build_clib behaviour to do the following:
-
-    1. Implement a rudimentary timestamp-based dependency system
-       so 'compile()' doesn't run every time.
-    2. Add more keys to the 'build_info' dictionary:
-        * obj_deps - specify dependencies for each object compiled.
-                     this should be a dictionary mapping a key
-                     with the source filename to a list of
-                     dependencies. Use an empty string for global
-                     dependencies.
-        * cflags   - specify a list of additional flags to pass to
-                     the compiler.
-    """
-
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-
-    def build_libraries(self, libraries) -> None:
-        for lib_name, build_info in libraries:
-            sources = build_info.get('sources')
-            if sources is None or not isinstance(sources, (list, tuple)):
-                raise DistutilsSetupError(
-                    f"in 'libraries' option (library '{lib_name}'), "
-                    "'sources' must be present and must be "
-                    "a list of source filenames"
-                )
-            sources = sorted(list(sources))
-
-            log.info("building '%s' library", lib_name)
-
-            # Make sure everything is the correct type.
-            # obj_deps should be a dictionary of keys as sources
-            # and a list/tuple of files that are its dependencies.
-            obj_deps = build_info.get('obj_deps', dict())
-            if not isinstance(obj_deps, dict):
-                raise DistutilsSetupError(
-                    f"in 'libraries' option (library '{lib_name}'), "
-                    "'obj_deps' must be a dictionary of "
-                    "type 'source: list'"
-                )
-            dependencies = []
-
-            # Get the global dependencies that are specified by the '' key.
-            # These will go into every source's dependency list.
-            global_deps = obj_deps.get('', list())
-            if not isinstance(global_deps, (list, tuple)):
-                raise DistutilsSetupError(
-                    f"in 'libraries' option (library '{lib_name}'), "
-                    "'obj_deps' must be a dictionary of "
-                    "type 'source: list'"
-                )
-
-            # Build the list to be used by newer_pairwise_group
-            # each source will be auto-added to its dependencies.
-            for source in sources:
-                src_deps = [source]
-                src_deps.extend(global_deps)
-                extra_deps = obj_deps.get(source, list())
-                if not isinstance(extra_deps, (list, tuple)):
-                    raise DistutilsSetupError(
-                        f"in 'libraries' option (library '{lib_name}'), "
-                        "'obj_deps' must be a dictionary of "
-                        "type 'source: list'"
-                    )
-                src_deps.extend(extra_deps)
-                dependencies.append(src_deps)
-
-            expected_objects = self.compiler.object_filenames(
-                sources,
-                output_dir=self.build_temp,
-            )
-
-            if newer_pairwise_group(dependencies, expected_objects) != ([], []):
-                # First, compile the source code to object files in the library
-                # directory.  (This should probably change to putting object
-                # files in a temporary build directory.)
-                macros = build_info.get('macros')
-                include_dirs = build_info.get('include_dirs')
-                cflags = build_info.get('cflags')
-                self.compiler.compile(
-                    sources,
-                    output_dir=self.build_temp,
-                    macros=macros,
-                    include_dirs=include_dirs,
-                    extra_postargs=cflags,
-                    debug=self.debug,
-                )
-
-            # Now "link" the object files together into a static library.
-            # (On Unix at least, this isn't really linking -- it just
-            # builds an archive.  Whatever.)
-            self.compiler.create_static_lib(
-                expected_objects, lib_name, output_dir=self.build_clib, debug=self.debug
-            )
diff --git a/voxvera/vendor/setuptools/command/build_ext.py b/voxvera/vendor/setuptools/command/build_ext.py
deleted file mode 100644
index dbb956d..0000000
--- a/voxvera/vendor/setuptools/command/build_ext.py
+++ /dev/null
@@ -1,470 +0,0 @@
-from __future__ import annotations
-
-import itertools
-import operator
-import os
-import sys
-import textwrap
-from collections.abc import Iterator
-from importlib.machinery import EXTENSION_SUFFIXES
-from importlib.util import cache_from_source as _compiled_file_name
-from pathlib import Path
-from typing import TYPE_CHECKING
-
-from setuptools.dist import Distribution
-from setuptools.errors import BaseError
-from setuptools.extension import Extension, Library
-
-from distutils import log
-from distutils.ccompiler import new_compiler
-from distutils.sysconfig import customize_compiler, get_config_var
-
-if TYPE_CHECKING:
-    # Cython not installed on CI tests, causing _build_ext to be `Any`
-    from distutils.command.build_ext import build_ext as _build_ext
-else:
-    try:
-        # Attempt to use Cython for building extensions, if available
-        from Cython.Distutils.build_ext import build_ext as _build_ext
-
-        # Additionally, assert that the compiler module will load
-        # also. Ref #1229.
-        __import__('Cython.Compiler.Main')
-    except ImportError:
-        from distutils.command.build_ext import build_ext as _build_ext
-
-# make sure _config_vars is initialized
-get_config_var("LDSHARED")
-# Not publicly exposed in typeshed distutils stubs, but this is done on purpose
-# See https://github.com/pypa/setuptools/pull/4228#issuecomment-1959856400
-from distutils.sysconfig import _config_vars as _CONFIG_VARS  # noqa: E402
-
-
-def _customize_compiler_for_shlib(compiler):
-    if sys.platform == "darwin":
-        # building .dylib requires additional compiler flags on OSX; here we
-        # temporarily substitute the pyconfig.h variables so that distutils'
-        # 'customize_compiler' uses them before we build the shared libraries.
-        tmp = _CONFIG_VARS.copy()
-        try:
-            # XXX Help!  I don't have any idea whether these are right...
-            _CONFIG_VARS['LDSHARED'] = (
-                "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup"
-            )
-            _CONFIG_VARS['CCSHARED'] = " -dynamiclib"
-            _CONFIG_VARS['SO'] = ".dylib"
-            customize_compiler(compiler)
-        finally:
-            _CONFIG_VARS.clear()
-            _CONFIG_VARS.update(tmp)
-    else:
-        customize_compiler(compiler)
-
-
-have_rtld = False
-use_stubs = False
-libtype = 'shared'
-
-if sys.platform == "darwin":
-    use_stubs = True
-elif os.name != 'nt':
-    try:
-        import dl  # type: ignore[import-not-found] # https://github.com/python/mypy/issues/13002
-
-        use_stubs = have_rtld = hasattr(dl, 'RTLD_NOW')
-    except ImportError:
-        pass
-
-
-def get_abi3_suffix():
-    """Return the file extension for an abi3-compliant Extension()"""
-    for suffix in EXTENSION_SUFFIXES:
-        if '.abi3' in suffix:  # Unix
-            return suffix
-        elif suffix == '.pyd':  # Windows
-            return suffix
-    return None
-
-
-class build_ext(_build_ext):
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-    editable_mode = False
-    inplace = False
-
-    def run(self) -> None:
-        """Build extensions in build directory, then copy if --inplace"""
-        old_inplace, self.inplace = self.inplace, False
-        _build_ext.run(self)
-        self.inplace = old_inplace
-        if old_inplace:
-            self.copy_extensions_to_source()
-
-    def _get_inplace_equivalent(self, build_py, ext: Extension) -> tuple[str, str]:
-        fullname = self.get_ext_fullname(ext.name)
-        filename = self.get_ext_filename(fullname)
-        modpath = fullname.split('.')
-        package = '.'.join(modpath[:-1])
-        package_dir = build_py.get_package_dir(package)
-        inplace_file = os.path.join(package_dir, os.path.basename(filename))
-        regular_file = os.path.join(self.build_lib, filename)
-        return (inplace_file, regular_file)
-
-    def copy_extensions_to_source(self) -> None:
-        build_py = self.get_finalized_command('build_py')
-        for ext in self.extensions:
-            inplace_file, regular_file = self._get_inplace_equivalent(build_py, ext)
-
-            # Always copy, even if source is older than destination, to ensure
-            # that the right extensions for the current Python/platform are
-            # used.
-            if os.path.exists(regular_file) or not ext.optional:
-                self.copy_file(regular_file, inplace_file, level=self.verbose)
-
-            if ext._needs_stub:
-                inplace_stub = self._get_equivalent_stub(ext, inplace_file)
-                self._write_stub_file(inplace_stub, ext, compile=True)
-                # Always compile stub and remove the original (leave the cache behind)
-                # (this behaviour was observed in previous iterations of the code)
-
-    def _get_equivalent_stub(self, ext: Extension, output_file: str) -> str:
-        dir_ = os.path.dirname(output_file)
-        _, _, name = ext.name.rpartition(".")
-        return f"{os.path.join(dir_, name)}.py"
-
-    def _get_output_mapping(self) -> Iterator[tuple[str, str]]:
-        if not self.inplace:
-            return
-
-        build_py = self.get_finalized_command('build_py')
-        opt = self.get_finalized_command('install_lib').optimize or ""
-
-        for ext in self.extensions:
-            inplace_file, regular_file = self._get_inplace_equivalent(build_py, ext)
-            yield (regular_file, inplace_file)
-
-            if ext._needs_stub:
-                # This version of `build_ext` always builds artifacts in another dir,
-                # when "inplace=True" is given it just copies them back.
-                # This is done in the `copy_extensions_to_source` function, which
-                # always compile stub files via `_compile_and_remove_stub`.
-                # At the end of the process, a `.pyc` stub file is created without the
-                # corresponding `.py`.
-
-                inplace_stub = self._get_equivalent_stub(ext, inplace_file)
-                regular_stub = self._get_equivalent_stub(ext, regular_file)
-                inplace_cache = _compiled_file_name(inplace_stub, optimization=opt)
-                output_cache = _compiled_file_name(regular_stub, optimization=opt)
-                yield (output_cache, inplace_cache)
-
-    def get_ext_filename(self, fullname: str) -> str:
-        so_ext = os.getenv('SETUPTOOLS_EXT_SUFFIX')
-        if so_ext:
-            filename = os.path.join(*fullname.split('.')) + so_ext
-        else:
-            filename = _build_ext.get_ext_filename(self, fullname)
-            ext_suffix = get_config_var('EXT_SUFFIX')
-            if not isinstance(ext_suffix, str):
-                raise OSError(
-                    "Configuration variable EXT_SUFFIX not found for this platform "
-                    "and environment variable SETUPTOOLS_EXT_SUFFIX is missing"
-                )
-            so_ext = ext_suffix
-
-        if fullname in self.ext_map:
-            ext = self.ext_map[fullname]
-            abi3_suffix = get_abi3_suffix()
-            if ext.py_limited_api and abi3_suffix:  # Use abi3
-                filename = filename[: -len(so_ext)] + abi3_suffix
-            if isinstance(ext, Library):
-                fn, ext = os.path.splitext(filename)
-                return self.shlib_compiler.library_filename(fn, libtype)
-            elif use_stubs and ext._links_to_dynamic:
-                d, fn = os.path.split(filename)
-                return os.path.join(d, 'dl-' + fn)
-        return filename
-
-    def initialize_options(self):
-        _build_ext.initialize_options(self)
-        self.shlib_compiler = None
-        self.shlibs = []
-        self.ext_map = {}
-        self.editable_mode = False
-
-    def finalize_options(self) -> None:
-        _build_ext.finalize_options(self)
-        self.extensions = self.extensions or []
-        self.check_extensions_list(self.extensions)
-        self.shlibs = [ext for ext in self.extensions if isinstance(ext, Library)]
-        if self.shlibs:
-            self.setup_shlib_compiler()
-        for ext in self.extensions:
-            ext._full_name = self.get_ext_fullname(ext.name)
-        for ext in self.extensions:
-            fullname = ext._full_name
-            self.ext_map[fullname] = ext
-
-            # distutils 3.1 will also ask for module names
-            # XXX what to do with conflicts?
-            self.ext_map[fullname.split('.')[-1]] = ext
-
-            ltd = self.shlibs and self.links_to_dynamic(ext) or False
-            ns = ltd and use_stubs and not isinstance(ext, Library)
-            ext._links_to_dynamic = ltd
-            ext._needs_stub = ns
-            filename = ext._file_name = self.get_ext_filename(fullname)
-            libdir = os.path.dirname(os.path.join(self.build_lib, filename))
-            if ltd and libdir not in ext.library_dirs:
-                ext.library_dirs.append(libdir)
-            if ltd and use_stubs and os.curdir not in ext.runtime_library_dirs:
-                ext.runtime_library_dirs.append(os.curdir)
-
-        if self.editable_mode:
-            self.inplace = True
-
-    def setup_shlib_compiler(self) -> None:
-        compiler = self.shlib_compiler = new_compiler(
-            compiler=self.compiler, force=self.force
-        )
-        _customize_compiler_for_shlib(compiler)
-
-        if self.include_dirs is not None:
-            compiler.set_include_dirs(self.include_dirs)
-        if self.define is not None:
-            # 'define' option is a list of (name,value) tuples
-            for name, value in self.define:
-                compiler.define_macro(name, value)
-        if self.undef is not None:
-            for macro in self.undef:
-                compiler.undefine_macro(macro)
-        if self.libraries is not None:
-            compiler.set_libraries(self.libraries)
-        if self.library_dirs is not None:
-            compiler.set_library_dirs(self.library_dirs)
-        if self.rpath is not None:
-            compiler.set_runtime_library_dirs(self.rpath)
-        if self.link_objects is not None:
-            compiler.set_link_objects(self.link_objects)
-
-        # hack so distutils' build_extension() builds a library instead
-        compiler.link_shared_object = link_shared_object.__get__(compiler)  # type: ignore[method-assign]
-
-    def get_export_symbols(self, ext):
-        if isinstance(ext, Library):
-            return ext.export_symbols
-        return _build_ext.get_export_symbols(self, ext)
-
-    def build_extension(self, ext) -> None:
-        ext._convert_pyx_sources_to_lang()
-        _compiler = self.compiler
-        try:
-            if isinstance(ext, Library):
-                self.compiler = self.shlib_compiler
-            _build_ext.build_extension(self, ext)
-            if ext._needs_stub:
-                build_lib = self.get_finalized_command('build_py').build_lib
-                self.write_stub(build_lib, ext)
-        finally:
-            self.compiler = _compiler
-
-    def links_to_dynamic(self, ext):
-        """Return true if 'ext' links to a dynamic lib in the same package"""
-        # XXX this should check to ensure the lib is actually being built
-        # XXX as dynamic, and not just using a locally-found version or a
-        # XXX static-compiled version
-        libnames = dict.fromkeys([lib._full_name for lib in self.shlibs])
-        pkg = '.'.join(ext._full_name.split('.')[:-1] + [''])
-        return any(pkg + libname in libnames for libname in ext.libraries)
-
-    def get_source_files(self) -> list[str]:
-        return [*_build_ext.get_source_files(self), *self._get_internal_depends()]
-
-    def _get_internal_depends(self) -> Iterator[str]:
-        """Yield ``ext.depends`` that are contained by the project directory"""
-        project_root = Path(self.distribution.src_root or os.curdir).resolve()
-        depends = (dep for ext in self.extensions for dep in ext.depends)
-
-        def skip(orig_path: str, reason: str) -> None:
-            log.info(
-                "dependency %s won't be automatically "
-                "included in the manifest: the path %s",
-                orig_path,
-                reason,
-            )
-
-        for dep in depends:
-            path = Path(dep)
-
-            if path.is_absolute():
-                skip(dep, "must be relative")
-                continue
-
-            if ".." in path.parts:
-                skip(dep, "can't have `..` segments")
-                continue
-
-            try:
-                resolved = (project_root / path).resolve(strict=True)
-            except OSError:
-                skip(dep, "doesn't exist")
-                continue
-
-            try:
-                resolved.relative_to(project_root)
-            except ValueError:
-                skip(dep, "must be inside the project root")
-                continue
-
-            yield path.as_posix()
-
-    def get_outputs(self) -> list[str]:
-        if self.inplace:
-            return list(self.get_output_mapping().keys())
-        return sorted(_build_ext.get_outputs(self) + self.__get_stubs_outputs())
-
-    def get_output_mapping(self) -> dict[str, str]:
-        """See :class:`setuptools.commands.build.SubCommand`"""
-        mapping = self._get_output_mapping()
-        return dict(sorted(mapping, key=operator.itemgetter(0)))
-
-    def __get_stubs_outputs(self):
-        # assemble the base name for each extension that needs a stub
-        ns_ext_bases = (
-            os.path.join(self.build_lib, *ext._full_name.split('.'))
-            for ext in self.extensions
-            if ext._needs_stub
-        )
-        # pair each base with the extension
-        pairs = itertools.product(ns_ext_bases, self.__get_output_extensions())
-        return list(base + fnext for base, fnext in pairs)
-
-    def __get_output_extensions(self):
-        yield '.py'
-        yield '.pyc'
-        if self.get_finalized_command('build_py').optimize:
-            yield '.pyo'
-
-    def write_stub(self, output_dir, ext, compile=False) -> None:
-        stub_file = os.path.join(output_dir, *ext._full_name.split('.')) + '.py'
-        self._write_stub_file(stub_file, ext, compile)
-
-    def _write_stub_file(self, stub_file: str, ext: Extension, compile=False):
-        log.info("writing stub loader for %s to %s", ext._full_name, stub_file)
-        if compile and os.path.exists(stub_file):
-            raise BaseError(stub_file + " already exists! Please delete.")
-        with open(stub_file, 'w', encoding="utf-8") as f:
-            content = (
-                textwrap
-                .dedent(f"""
-                def __bootstrap__():
-                   global __bootstrap__, __file__, __loader__
-                   import sys, os, importlib.resources as irs, importlib.util
-                #rtld   import dl
-                   with irs.files(__name__).joinpath(
-                     {os.path.basename(ext._file_name)!r}) as __file__:
-                      del __bootstrap__
-                      if '__loader__' in globals():
-                          del __loader__
-                #rtld      old_flags = sys.getdlopenflags()
-                      old_dir = os.getcwd()
-                      try:
-                        os.chdir(os.path.dirname(__file__))
-                #rtld        sys.setdlopenflags(dl.RTLD_NOW)
-                        spec = importlib.util.spec_from_file_location(
-                                   __name__, __file__)
-                        mod = importlib.util.module_from_spec(spec)
-                        spec.loader.exec_module(mod)
-                      finally:
-                #rtld        sys.setdlopenflags(old_flags)
-                        os.chdir(old_dir)
-                __bootstrap__()
-                """)
-                .lstrip()
-                .replace('#rtld', '#rtld' * (not have_rtld))
-            )
-            f.write(content)
-        if compile:
-            self._compile_and_remove_stub(stub_file)
-
-    def _compile_and_remove_stub(self, stub_file: str):
-        from distutils.util import byte_compile
-
-        byte_compile([stub_file], optimize=0, force=True)
-        optimize = self.get_finalized_command('install_lib').optimize
-        if optimize > 0:
-            byte_compile(
-                [stub_file],
-                optimize=optimize,
-                force=True,
-            )
-        if os.path.exists(stub_file):
-            os.unlink(stub_file)
-
-
-if use_stubs or os.name == 'nt':
-    # Build shared libraries
-    #
-    def link_shared_object(
-        self,
-        objects,
-        output_libname,
-        output_dir=None,
-        libraries=None,
-        library_dirs=None,
-        runtime_library_dirs=None,
-        export_symbols=None,
-        debug: bool = False,
-        extra_preargs=None,
-        extra_postargs=None,
-        build_temp=None,
-        target_lang=None,
-    ) -> None:
-        self.link(
-            self.SHARED_LIBRARY,
-            objects,
-            output_libname,
-            output_dir,
-            libraries,
-            library_dirs,
-            runtime_library_dirs,
-            export_symbols,
-            debug,
-            extra_preargs,
-            extra_postargs,
-            build_temp,
-            target_lang,
-        )
-
-else:
-    # Build static libraries everywhere else
-    libtype = 'static'
-
-    def link_shared_object(
-        self,
-        objects,
-        output_libname,
-        output_dir=None,
-        libraries=None,
-        library_dirs=None,
-        runtime_library_dirs=None,
-        export_symbols=None,
-        debug: bool = False,
-        extra_preargs=None,
-        extra_postargs=None,
-        build_temp=None,
-        target_lang=None,
-    ) -> None:
-        # XXX we need to either disallow these attrs on Library instances,
-        # or warn/abort here if set, or something...
-        # libraries=None, library_dirs=None, runtime_library_dirs=None,
-        # export_symbols=None, extra_preargs=None, extra_postargs=None,
-        # build_temp=None
-
-        assert output_dir is None  # distutils build_ext doesn't pass this
-        output_dir, filename = os.path.split(output_libname)
-        basename, _ext = os.path.splitext(filename)
-        if self.library_filename("x").startswith('lib'):
-            # strip 'lib' prefix; this is kludgy if some platform uses
-            # a different prefix
-            basename = basename[3:]
-
-        self.create_static_lib(objects, basename, output_dir, debug, target_lang)
diff --git a/voxvera/vendor/setuptools/command/build_py.py b/voxvera/vendor/setuptools/command/build_py.py
deleted file mode 100644
index 3c7c2d1..0000000
--- a/voxvera/vendor/setuptools/command/build_py.py
+++ /dev/null
@@ -1,403 +0,0 @@
-from __future__ import annotations
-
-import fnmatch
-import itertools
-import operator
-import os
-import stat
-import textwrap
-from collections.abc import Iterable, Iterator
-from functools import partial
-from glob import glob
-from pathlib import Path
-from typing import Any
-
-from more_itertools import unique_everseen
-
-from .._path import StrPath, StrPathT
-from ..dist import Distribution
-from ..warnings import SetuptoolsDeprecationWarning
-
-import distutils.command.build_py as orig
-import distutils.errors
-from distutils.util import convert_path
-
-_IMPLICIT_DATA_FILES = ('*.pyi', 'py.typed')
-
-
-def make_writable(target) -> None:
-    os.chmod(target, os.stat(target).st_mode | stat.S_IWRITE)
-
-
-class build_py(orig.build_py):
-    """Enhanced 'build_py' command that includes data files with packages
-
-    The data files are specified via a 'package_data' argument to 'setup()'.
-    See 'setuptools.dist.Distribution' for more details.
-
-    Also, this version of the 'build_py' command allows you to specify both
-    'py_modules' and 'packages' in the same setup operation.
-    """
-
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-    editable_mode: bool = False
-    existing_egg_info_dir: StrPath | None = None  #: Private API, internal use only.
-
-    def finalize_options(self) -> None:
-        orig.build_py.finalize_options(self)
-        self.package_data = self.distribution.package_data
-        self.exclude_package_data = self.distribution.exclude_package_data or {}
-        if 'data_files' in self.__dict__:
-            del self.__dict__['data_files']
-
-    def copy_file(  # type: ignore[override] # No overload, no bytes support
-        self,
-        infile: StrPath,
-        outfile: StrPathT,
-        preserve_mode: bool = True,
-        preserve_times: bool = True,
-        link: str | None = None,
-        level: object = 1,
-    ) -> tuple[StrPathT | str, bool]:
-        # Overwrite base class to allow using links
-        if link:
-            infile = str(Path(infile).resolve())
-            outfile = str(Path(outfile).resolve())  # type: ignore[assignment] # Re-assigning a str when outfile is StrPath is ok
-        return super().copy_file(  # pyright: ignore[reportReturnType] # pypa/distutils#309
-            infile, outfile, preserve_mode, preserve_times, link, level
-        )
-
-    def run(self) -> None:
-        """Build modules, packages, and copy data files to build directory"""
-        if not (self.py_modules or self.packages) or self.editable_mode:
-            return
-
-        if self.py_modules:
-            self.build_modules()
-
-        if self.packages:
-            self.build_packages()
-            self.build_package_data()
-
-        # Only compile actual .py files, using our base class' idea of what our
-        # output files are.
-        self.byte_compile(orig.build_py.get_outputs(self, include_bytecode=False))
-
-    # Should return "list[tuple[str, str, str, list[str]]] | Any" but can't do without typed distutils on Python 3.12+
-    def __getattr__(self, attr: str) -> Any:
-        "lazily compute data files"
-        if attr == 'data_files':
-            self.data_files = self._get_data_files()
-            return self.data_files
-        return orig.build_py.__getattr__(self, attr)
-
-    def _get_data_files(self):
-        """Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
-        self.analyze_manifest()
-        return list(map(self._get_pkg_data_files, self.packages or ()))
-
-    def get_data_files_without_manifest(self) -> list[tuple[str, str, str, list[str]]]:
-        """
-        Generate list of ``(package,src_dir,build_dir,filenames)`` tuples,
-        but without triggering any attempt to analyze or build the manifest.
-        """
-        # Prevent eventual errors from unset `manifest_files`
-        # (that would otherwise be set by `analyze_manifest`)
-        self.__dict__.setdefault('manifest_files', {})
-        return list(map(self._get_pkg_data_files, self.packages or ()))
-
-    def _get_pkg_data_files(self, package: str) -> tuple[str, str, str, list[str]]:
-        # Locate package source directory
-        src_dir = self.get_package_dir(package)
-
-        # Compute package build directory
-        build_dir = os.path.join(*([self.build_lib] + package.split('.')))
-
-        # Strip directory from globbed filenames
-        filenames = [
-            os.path.relpath(file, src_dir)
-            for file in self.find_data_files(package, src_dir)
-        ]
-        return package, src_dir, build_dir, filenames
-
-    def find_data_files(self, package, src_dir):
-        """Return filenames for package's data files in 'src_dir'"""
-        patterns = self._get_platform_patterns(
-            self.package_data,
-            package,
-            src_dir,
-            extra_patterns=_IMPLICIT_DATA_FILES,
-        )
-        globs_expanded = map(partial(glob, recursive=True), patterns)
-        # flatten the expanded globs into an iterable of matches
-        globs_matches = itertools.chain.from_iterable(globs_expanded)
-        glob_files = filter(os.path.isfile, globs_matches)
-        files = itertools.chain(
-            self.manifest_files.get(package, []),
-            glob_files,
-        )
-        return self.exclude_data_files(package, src_dir, files)
-
-    def get_outputs(self, include_bytecode: bool = True) -> list[str]:  # type: ignore[override] # Using a real boolean instead of 0|1
-        """See :class:`setuptools.commands.build.SubCommand`"""
-        if self.editable_mode:
-            return list(self.get_output_mapping().keys())
-        return super().get_outputs(include_bytecode)
-
-    def get_output_mapping(self) -> dict[str, str]:
-        """See :class:`setuptools.commands.build.SubCommand`"""
-        mapping = itertools.chain(
-            self._get_package_data_output_mapping(),
-            self._get_module_mapping(),
-        )
-        return dict(sorted(mapping, key=operator.itemgetter(0)))
-
-    def _get_module_mapping(self) -> Iterator[tuple[str, str]]:
-        """Iterate over all modules producing (dest, src) pairs."""
-        for package, module, module_file in self.find_all_modules():
-            package = package.split('.')
-            filename = self.get_module_outfile(self.build_lib, package, module)
-            yield (filename, module_file)
-
-    def _get_package_data_output_mapping(self) -> Iterator[tuple[str, str]]:
-        """Iterate over package data producing (dest, src) pairs."""
-        for package, src_dir, build_dir, filenames in self.data_files:
-            for filename in filenames:
-                target = os.path.join(build_dir, filename)
-                srcfile = os.path.join(src_dir, filename)
-                yield (target, srcfile)
-
-    def build_package_data(self) -> None:
-        """Copy data files into build directory"""
-        for target, srcfile in self._get_package_data_output_mapping():
-            self.mkpath(os.path.dirname(target))
-            _outf, _copied = self.copy_file(srcfile, target)
-            make_writable(target)
-
-    def analyze_manifest(self) -> None:
-        self.manifest_files: dict[str, list[str]] = {}
-        if not self.distribution.include_package_data:
-            return
-        src_dirs: dict[str, str] = {}
-        for package in self.packages or ():
-            # Locate package source directory
-            src_dirs[assert_relative(self.get_package_dir(package))] = package
-
-        if (
-            self.existing_egg_info_dir
-            and Path(self.existing_egg_info_dir, "SOURCES.txt").exists()
-        ):
-            egg_info_dir = self.existing_egg_info_dir
-            manifest = Path(egg_info_dir, "SOURCES.txt")
-            files = manifest.read_text(encoding="utf-8").splitlines()
-        else:
-            self.run_command('egg_info')
-            ei_cmd = self.get_finalized_command('egg_info')
-            egg_info_dir = ei_cmd.egg_info
-            files = ei_cmd.filelist.files
-
-        check = _IncludePackageDataAbuse()
-        for path in self._filter_build_files(files, egg_info_dir):
-            d, f = os.path.split(assert_relative(path))
-            prev = None
-            oldf = f
-            while d and d != prev and d not in src_dirs:
-                prev = d
-                d, df = os.path.split(d)
-                f = os.path.join(df, f)
-            if d in src_dirs:
-                if f == oldf:
-                    if check.is_module(f):
-                        continue  # it's a module, not data
-                else:
-                    importable = check.importable_subpackage(src_dirs[d], f)
-                    if importable:
-                        check.warn(importable)
-                self.manifest_files.setdefault(src_dirs[d], []).append(path)
-
-    def _filter_build_files(
-        self, files: Iterable[str], egg_info: StrPath
-    ) -> Iterator[str]:
-        """
-        ``build_meta`` may try to create egg_info outside of the project directory,
-        and this can be problematic for certain plugins (reported in issue #3500).
-
-        Extensions might also include between their sources files created on the
-        ``build_lib`` and ``build_temp`` directories.
-
-        This function should filter this case of invalid files out.
-        """
-        build = self.get_finalized_command("build")
-        build_dirs = (egg_info, self.build_lib, build.build_temp, build.build_base)
-        norm_dirs = [os.path.normpath(p) for p in build_dirs if p]
-
-        for file in files:
-            norm_path = os.path.normpath(file)
-            if not os.path.isabs(file) or all(d not in norm_path for d in norm_dirs):
-                yield file
-
-    def get_data_files(self) -> None:
-        pass  # Lazily compute data files in _get_data_files() function.
-
-    def check_package(self, package, package_dir):
-        """Check namespace packages' __init__ for declare_namespace"""
-        try:
-            return self.packages_checked[package]
-        except KeyError:
-            pass
-
-        init_py = orig.build_py.check_package(self, package, package_dir)
-        self.packages_checked[package] = init_py
-
-        if not init_py or not self.distribution.namespace_packages:
-            return init_py
-
-        for pkg in self.distribution.namespace_packages:
-            if pkg == package or pkg.startswith(package + '.'):
-                break
-        else:
-            return init_py
-
-        with open(init_py, 'rb') as f:
-            contents = f.read()
-        if b'declare_namespace' not in contents:
-            raise distutils.errors.DistutilsError(
-                f"Namespace package problem: {package} is a namespace package, but "
-                "its\n__init__.py does not call declare_namespace()! Please "
-                'fix it.\n(See the setuptools manual under '
-                '"Namespace Packages" for details.)\n"'
-            )
-        return init_py
-
-    def initialize_options(self):
-        self.packages_checked = {}
-        orig.build_py.initialize_options(self)
-        self.editable_mode = False
-        self.existing_egg_info_dir = None
-
-    def get_package_dir(self, package: str) -> str:
-        res = orig.build_py.get_package_dir(self, package)
-        if self.distribution.src_root is not None:
-            return os.path.join(self.distribution.src_root, res)
-        return res
-
-    def exclude_data_files(self, package, src_dir, files):
-        """Filter filenames for package's data files in 'src_dir'"""
-        files = list(files)
-        patterns = self._get_platform_patterns(
-            self.exclude_package_data,
-            package,
-            src_dir,
-        )
-        match_groups = (fnmatch.filter(files, pattern) for pattern in patterns)
-        # flatten the groups of matches into an iterable of matches
-        matches = itertools.chain.from_iterable(match_groups)
-        bad = set(matches)
-        keepers = (fn for fn in files if fn not in bad)
-        # ditch dupes
-        return list(unique_everseen(keepers))
-
-    @staticmethod
-    def _get_platform_patterns(spec, package, src_dir, extra_patterns=()):
-        """
-        yield platform-specific path patterns (suitable for glob
-        or fn_match) from a glob-based spec (such as
-        self.package_data or self.exclude_package_data)
-        matching package in src_dir.
-        """
-        raw_patterns = itertools.chain(
-            extra_patterns,
-            spec.get('', []),
-            spec.get(package, []),
-        )
-        return (
-            # Each pattern has to be converted to a platform-specific path
-            os.path.join(src_dir, convert_path(pattern))
-            for pattern in raw_patterns
-        )
-
-
-def assert_relative(path):
-    if not os.path.isabs(path):
-        return path
-    from distutils.errors import DistutilsSetupError
-
-    msg = (
-        textwrap.dedent(
-            """
-        Error: setup script specifies an absolute path:
-
-            %s
-
-        setup() arguments must *always* be /-separated paths relative to the
-        setup.py directory, *never* absolute paths.
-        """
-        ).lstrip()
-        % path
-    )
-    raise DistutilsSetupError(msg)
-
-
-class _IncludePackageDataAbuse:
-    """Inform users that package or module is included as 'data file'"""
-
-    class _Warning(SetuptoolsDeprecationWarning):
-        _SUMMARY = """
-        Package {importable!r} is absent from the `packages` configuration.
-        """
-
-        _DETAILS = """
-        ############################
-        # Package would be ignored #
-        ############################
-        Python recognizes {importable!r} as an importable package[^1],
-        but it is absent from setuptools' `packages` configuration.
-
-        This leads to an ambiguous overall configuration. If you want to distribute this
-        package, please make sure that {importable!r} is explicitly added
-        to the `packages` configuration field.
-
-        Alternatively, you can also rely on setuptools' discovery methods
-        (for example by using `find_namespace_packages(...)`/`find_namespace:`
-        instead of `find_packages(...)`/`find:`).
-
-        You can read more about "package discovery" on setuptools documentation page:
-
-        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
-
-        If you don't want {importable!r} to be distributed and are
-        already explicitly excluding {importable!r} via
-        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
-        you can try to use `exclude_package_data`, or `include-package-data=False` in
-        combination with a more fine grained `package-data` configuration.
-
-        You can read more about "package data files" on setuptools documentation page:
-
-        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
-
-
-        [^1]: For Python, any directory (with suitable naming) can be imported,
-              even if it does not contain any `.py` files.
-              On the other hand, currently there is no concept of package data
-              directory, all directories are treated like packages.
-        """
-        # _DUE_DATE: still not defined as this is particularly controversial.
-        # Warning initially introduced in May 2022. See issue #3340 for discussion.
-
-    def __init__(self) -> None:
-        self._already_warned = set[str]()
-
-    def is_module(self, file):
-        return file.endswith(".py") and file[: -len(".py")].isidentifier()
-
-    def importable_subpackage(self, parent, file):
-        pkg = Path(file).parent
-        parts = list(itertools.takewhile(str.isidentifier, pkg.parts))
-        if parts:
-            return ".".join([parent, *parts])
-        return None
-
-    def warn(self, importable):
-        if importable not in self._already_warned:
-            self._Warning.emit(importable=importable)
-            self._already_warned.add(importable)
diff --git a/voxvera/vendor/setuptools/command/develop.py b/voxvera/vendor/setuptools/command/develop.py
deleted file mode 100644
index 2d46884..0000000
--- a/voxvera/vendor/setuptools/command/develop.py
+++ /dev/null
@@ -1,58 +0,0 @@
-import site
-import subprocess
-import sys
-from typing import cast
-
-from setuptools import Command
-from setuptools.warnings import SetuptoolsDeprecationWarning
-
-
-class develop(Command):
-    """Set up package for development"""
-
-    user_options = [
-        ("install-dir=", "d", "install package to DIR"),
-        ('no-deps', 'N', "don't install dependencies"),
-        ('user', None, f"install in user site-package '{site.USER_SITE}'"),
-        ('prefix=', None, "installation prefix"),
-        ("index-url=", "i", "base URL of Python Package Index"),
-    ]
-    boolean_options = [
-        'no-deps',
-        'user',
-    ]
-
-    install_dir = None
-    no_deps = False
-    user = False
-    prefix = None
-    index_url = None
-
-    def run(self) -> None:
-        # Casting because mypy doesn't understand bool mult conditionals
-        cmd = cast(
-            list[str],
-            [sys.executable, '-m', 'pip', 'install', '-e', '.', '--use-pep517']
-            + ['--target', self.install_dir] * bool(self.install_dir)
-            + ['--no-deps'] * self.no_deps
-            + ['--user'] * self.user
-            + ['--prefix', self.prefix] * bool(self.prefix)
-            + ['--index-url', self.index_url] * bool(self.index_url),
-        )
-        subprocess.check_call(cmd)
-
-    def initialize_options(self) -> None:
-        DevelopDeprecationWarning.emit()
-
-    def finalize_options(self) -> None:
-        pass
-
-
-class DevelopDeprecationWarning(SetuptoolsDeprecationWarning):
-    _SUMMARY = "develop command is deprecated."
-    _DETAILS = """
-    Please avoid running ``setup.py`` and ``develop``.
-    Instead, use standards-based tools like pip or uv.
-    """
-    _SEE_URL = "https://github.com/pypa/setuptools/issues/917"
-    _DUE_DATE = 2025, 10, 31
diff --git a/voxvera/vendor/setuptools/command/dist_info.py b/voxvera/vendor/setuptools/command/dist_info.py
deleted file mode 100644
index dca01ff..0000000
--- a/voxvera/vendor/setuptools/command/dist_info.py
+++ /dev/null
@@ -1,103 +0,0 @@
-"""
-Create a dist_info directory
-As defined in the wheel specification
-"""
-
-import os
-import shutil
-from contextlib import contextmanager
-from pathlib import Path
-from typing import cast
-
-from .. import _normalization
-from .._shutil import rmdir as _rm
-from .egg_info import egg_info as egg_info_cls
-
-from distutils import log
-from distutils.core import Command
-
-
-class dist_info(Command):
-    """
-    This command is private and reserved for internal use of setuptools,
-    users should rely on ``setuptools.build_meta`` APIs.
-    """
-
-    description = "DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"
-
-    user_options = [
-        (
-            'output-dir=',
-            'o',
-            "directory inside of which the .dist-info will be"
-            "created [default: top of the source tree]",
-        ),
-        ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"),
-        ('tag-build=', 'b', "Specify explicit tag to add to version number"),
-        ('no-date', 'D', "Don't include date stamp [default]"),
-        ('keep-egg-info', None, "*TRANSITIONAL* will be removed in the future"),
-    ]
-
-    boolean_options = ['tag-date', 'keep-egg-info']
-    negative_opt = {'no-date': 'tag-date'}
-
-    def initialize_options(self):
-        self.output_dir = None
-        self.name = None
-        self.dist_info_dir = None
-        self.tag_date = None
-        self.tag_build = None
-        self.keep_egg_info = False
-
-    def finalize_options(self) -> None:
-        dist = self.distribution
-        project_dir = dist.src_root or os.curdir
-        self.output_dir = Path(self.output_dir or project_dir)
-
-        egg_info = cast(egg_info_cls, self.reinitialize_command("egg_info"))
-        egg_info.egg_base = str(self.output_dir)
-
-        if self.tag_date:
-            egg_info.tag_date = self.tag_date
-        else:
-            self.tag_date = egg_info.tag_date
-
-        if self.tag_build:
-            egg_info.tag_build = self.tag_build
-        else:
-            self.tag_build = egg_info.tag_build
-
-        egg_info.finalize_options()
-        self.egg_info = egg_info
-
-        name = _normalization.safer_name(dist.get_name())
-        version = _normalization.safer_best_effort_version(dist.get_version())
-        self.name = f"{name}-{version}"
-        self.dist_info_dir = os.path.join(self.output_dir, f"{self.name}.dist-info")
-
-    @contextmanager
-    def _maybe_bkp_dir(self, dir_path: str, requires_bkp: bool):
-        if requires_bkp:
-            bkp_name = f"{dir_path}.__bkp__"
-            _rm(bkp_name, ignore_errors=True)
-            shutil.copytree(dir_path, bkp_name, dirs_exist_ok=True, symlinks=True)
-            try:
-                yield
-            finally:
-                _rm(dir_path, ignore_errors=True)
-                shutil.move(bkp_name, dir_path)
-        else:
-            yield
-
-    def run(self) -> None:
-        self.output_dir.mkdir(parents=True, exist_ok=True)
-        self.egg_info.run()
-        egg_info_dir = self.egg_info.egg_info
-        assert os.path.isdir(egg_info_dir), ".egg-info dir should have been created"
-
-        log.info(f"creating '{os.path.abspath(self.dist_info_dir)}'")
-        bdist_wheel = self.get_finalized_command('bdist_wheel')
-
-        # TODO: if bdist_wheel if merged into setuptools, just add "keep_egg_info" there
-        with self._maybe_bkp_dir(egg_info_dir, self.keep_egg_info):
-            bdist_wheel.egg2dist(egg_info_dir, self.dist_info_dir)
diff --git a/voxvera/vendor/setuptools/command/easy_install.py b/voxvera/vendor/setuptools/command/easy_install.py
deleted file mode 100644
index 8765793..0000000
--- a/voxvera/vendor/setuptools/command/easy_install.py
+++ /dev/null
@@ -1,30 +0,0 @@
-import os
-import sys
-import types
-
-from setuptools import Command
-
-from .. import _scripts, warnings
-
-
-class easy_install(Command):
-    """Stubbed command for temporary pbr compatibility."""
-
-
-def __getattr__(name):
-    attr = getattr(
-        types.SimpleNamespace(
-            ScriptWriter=_scripts.ScriptWriter,
-            sys_executable=os.environ.get(
-                "__PYVENV_LAUNCHER__", os.path.normpath(sys.executable)
-            ),
-        ),
-        name,
-    )
-    warnings.SetuptoolsDeprecationWarning.emit(
-        summary="easy_install module is deprecated",
-        details="Avoid accessing attributes of setuptools.command.easy_install.",
-        due_date=(2025, 10, 31),
-        see_url="https://github.com/pypa/setuptools/issues/4976",
-    )
-    return attr
diff --git a/voxvera/vendor/setuptools/command/editable_wheel.py b/voxvera/vendor/setuptools/command/editable_wheel.py
deleted file mode 100644
index 6f44f13..0000000
--- a/voxvera/vendor/setuptools/command/editable_wheel.py
+++ /dev/null
@@ -1,914 +0,0 @@
-"""
-Create a wheel that, when installed, will make the source package 'editable'
-(add it to the interpreter's path, including metadata) per PEP 660. Replaces
-'setup.py develop'.
-
-.. note::
-   One of the mechanisms briefly mentioned in PEP 660 to implement editable installs is
-   to create a separated directory inside ``build`` and use a .pth file to point to that
-   directory. In the context of this file such directory is referred as
-   *auxiliary build directory* or ``auxiliary_dir``.
-"""
-
-from __future__ import annotations
-
-import io
-import logging
-import operator
-import os
-import shutil
-import traceback
-from collections.abc import Iterable, Iterator, Mapping
-from contextlib import suppress
-from enum import Enum
-from inspect import cleandoc
-from itertools import chain, starmap
-from pathlib import Path
-from tempfile import TemporaryDirectory
-from types import TracebackType
-from typing import TYPE_CHECKING, Protocol, TypeVar, cast
-
-from .. import Command, _normalization, _path, _shutil, errors, namespaces
-from .._path import StrPath
-from ..compat import py310, py312
-from ..discovery import find_package_path
-from ..dist import Distribution
-from ..warnings import InformationOnly, SetuptoolsDeprecationWarning
-from .build import build as build_cls
-from .build_py import build_py as build_py_cls
-from .dist_info import dist_info as dist_info_cls
-from .egg_info import egg_info as egg_info_cls
-from .install import install as install_cls
-from .install_scripts import install_scripts as install_scripts_cls
-
-if TYPE_CHECKING:
-    from typing_extensions import Self
-
-    from .._vendor.wheel.wheelfile import WheelFile
-
-_P = TypeVar("_P", bound=StrPath)
-_logger = logging.getLogger(__name__)
-
-
-class _EditableMode(Enum):
-    """
-    Possible editable installation modes:
-    `lenient` (new files automatically added to the package - DEFAULT);
-    `strict` (requires a new installation when files are added/removed); or
-    `compat` (attempts to emulate `python setup.py develop` - DEPRECATED).
-    """
-
-    STRICT = "strict"
-    LENIENT = "lenient"
-    COMPAT = "compat"  # TODO: Remove `compat` after Dec/2022.
-
-    @classmethod
-    def convert(cls, mode: str | None) -> _EditableMode:
-        if not mode:
-            return _EditableMode.LENIENT  # default
-
-        _mode = mode.upper()
-        if _mode not in _EditableMode.__members__:
-            raise errors.OptionError(f"Invalid editable mode: {mode!r}. Try: 'strict'.")
-
-        if _mode == "COMPAT":
-            SetuptoolsDeprecationWarning.emit(
-                "Compat editable installs",
-                """
-                The 'compat' editable mode is transitional and will be removed
-                in future versions of `setuptools`.
-                Please adapt your code accordingly to use either the 'strict' or the
-                'lenient' modes.
-                """,
-                see_docs="userguide/development_mode.html",
-                # TODO: define due_date
-                # There is a series of shortcomings with the available editable install
-                # methods, and they are very controversial. This is something that still
-                # needs work.
-                # Moreover, `pip` is still hiding this warning, so users are not aware.
-            )
-
-        return _EditableMode[_mode]
-
-
-_STRICT_WARNING = """
-New or renamed files may not be automatically picked up without a new installation.
-"""
-
-_LENIENT_WARNING = """
-Options like `package-data`, `include/exclude-package-data` or
-`packages.find.exclude/include` may have no effect.
-"""
-
-
-class editable_wheel(Command):
-    """Build 'editable' wheel for development.
-    This command is private and reserved for internal use of setuptools,
-    users should rely on ``setuptools.build_meta`` APIs.
-    """
-
-    description = "DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"
-
-    user_options = [
-        ("dist-dir=", "d", "directory to put final built distributions in"),
-        ("dist-info-dir=", "I", "path to a pre-build .dist-info directory"),
-        ("mode=", None, cleandoc(_EditableMode.__doc__ or "")),
-    ]
-
-    def initialize_options(self):
-        self.dist_dir = None
-        self.dist_info_dir = None
-        self.project_dir = None
-        self.mode = None
-
-    def finalize_options(self) -> None:
-        dist = self.distribution
-        self.project_dir = dist.src_root or os.curdir
-        self.package_dir = dist.package_dir or {}
-        self.dist_dir = Path(self.dist_dir or os.path.join(self.project_dir, "dist"))
-
-    def run(self) -> None:
-        try:
-            self.dist_dir.mkdir(exist_ok=True)
-            self._ensure_dist_info()
-
-            # Add missing dist_info files
-            self.reinitialize_command("bdist_wheel")
-            bdist_wheel = self.get_finalized_command("bdist_wheel")
-            bdist_wheel.write_wheelfile(self.dist_info_dir)
-
-            self._create_wheel_file(bdist_wheel)
-        except Exception as ex:
-            project = self.distribution.name or self.distribution.get_name()
-            py310.add_note(
-                ex,
-                f"An error occurred when building editable wheel for {project}.\n"
-                "See debugging tips in: "
-                "https://setuptools.pypa.io/en/latest/userguide/development_mode.html#debugging-tips",
-            )
-            raise
-
-    def _ensure_dist_info(self):
-        if self.dist_info_dir is None:
-            dist_info = cast(dist_info_cls, self.reinitialize_command("dist_info"))
-            dist_info.output_dir = self.dist_dir
-            dist_info.ensure_finalized()
-            dist_info.run()
-            self.dist_info_dir = dist_info.dist_info_dir
-        else:
-            assert str(self.dist_info_dir).endswith(".dist-info")
-            assert Path(self.dist_info_dir, "METADATA").exists()
-
-    def _install_namespaces(self, installation_dir, pth_prefix):
-        # XXX: Only required to support the deprecated namespace practice
-        dist = self.distribution
-        if not dist.namespace_packages:
-            return
-
-        src_root = Path(self.project_dir, self.package_dir.get("", ".")).resolve()
-        installer = _NamespaceInstaller(dist, installation_dir, pth_prefix, src_root)
-        installer.install_namespaces()
-
-    def _find_egg_info_dir(self) -> str | None:
-        parent_dir = Path(self.dist_info_dir).parent if self.dist_info_dir else Path()
-        candidates = map(str, parent_dir.glob("*.egg-info"))
-        return next(candidates, None)
-
-    def _configure_build(
-        self, name: str, unpacked_wheel: StrPath, build_lib: StrPath, tmp_dir: StrPath
-    ):
-        """Configure commands to behave in the following ways:
-
-        - Build commands can write to ``build_lib`` if they really want to...
-          (but this folder is expected to be ignored and modules are expected to live
-          in the project directory...)
-        - Binary extensions should be built in-place (editable_mode = True)
-        - Data/header/script files are not part of the "editable" specification
-          so they are written directly to the unpacked_wheel directory.
-        """
-        # Non-editable files (data, headers, scripts) are written directly to the
-        # unpacked_wheel
-
-        dist = self.distribution
-        wheel = str(unpacked_wheel)
-        build_lib = str(build_lib)
-        data = str(Path(unpacked_wheel, f"{name}.data", "data"))
-        headers = str(Path(unpacked_wheel, f"{name}.data", "headers"))
-        scripts = str(Path(unpacked_wheel, f"{name}.data", "scripts"))
-
-        # egg-info may be generated again to create a manifest (used for package data)
-        egg_info = cast(
-            egg_info_cls, dist.reinitialize_command("egg_info", reinit_subcommands=True)
-        )
-        egg_info.egg_base = str(tmp_dir)
-        egg_info.ignore_egg_info_in_manifest = True
-
-        build = cast(
-            build_cls, dist.reinitialize_command("build", reinit_subcommands=True)
-        )
-        install = cast(
-            install_cls, dist.reinitialize_command("install", reinit_subcommands=True)
-        )
-
-        build.build_platlib = build.build_purelib = build.build_lib = build_lib
-        install.install_purelib = install.install_platlib = install.install_lib = wheel
-        install.install_scripts = build.build_scripts = scripts
-        install.install_headers = headers
-        install.install_data = data
-
-        # For portability, ensure scripts are built with #!python shebang
-        # pypa/setuptools#4863
-        build_scripts = dist.get_command_obj("build_scripts")
-        build_scripts.executable = 'python'
-
-        install_scripts = cast(
-            install_scripts_cls, dist.get_command_obj("install_scripts")
-        )
-        install_scripts.no_ep = True
-
-        build.build_temp = str(tmp_dir)
-
-        build_py = cast(build_py_cls, dist.get_command_obj("build_py"))
-        build_py.compile = False
-        build_py.existing_egg_info_dir = self._find_egg_info_dir()
-
-        self._set_editable_mode()
-
-        build.ensure_finalized()
-        install.ensure_finalized()
-
-    def _set_editable_mode(self):
-        """Set the ``editable_mode`` flag in the build sub-commands"""
-        dist = self.distribution
-        build = dist.get_command_obj("build")
-        for cmd_name in build.get_sub_commands():
-            cmd = dist.get_command_obj(cmd_name)
-            if hasattr(cmd, "editable_mode"):
-                cmd.editable_mode = True
-            elif hasattr(cmd, "inplace"):
-                cmd.inplace = True  # backward compatibility with distutils
-
-    def _collect_build_outputs(self) -> tuple[list[str], dict[str, str]]:
-        files: list[str] = []
-        mapping: dict[str, str] = {}
-        build = self.get_finalized_command("build")
-
-        for cmd_name in build.get_sub_commands():
-            cmd = self.get_finalized_command(cmd_name)
-            if hasattr(cmd, "get_outputs"):
-                files.extend(cmd.get_outputs() or [])
-            if hasattr(cmd, "get_output_mapping"):
-                mapping.update(cmd.get_output_mapping() or {})
-
-        return files, mapping
-
-    def _run_build_commands(
-        self,
-        dist_name: str,
-        unpacked_wheel: StrPath,
-        build_lib: StrPath,
-        tmp_dir: StrPath,
-    ) -> tuple[list[str], dict[str, str]]:
-        self._configure_build(dist_name, unpacked_wheel, build_lib, tmp_dir)
-        self._run_build_subcommands()
-        files, mapping = self._collect_build_outputs()
-        self._run_install("headers")
-        self._run_install("scripts")
-        self._run_install("data")
-        return files, mapping
-
-    def _run_build_subcommands(self) -> None:
-        """
-        Issue #3501 indicates that some plugins/customizations might rely on:
-
-        1. ``build_py`` not running
-        2. ``build_py`` always copying files to ``build_lib``
-
-        However both these assumptions may be false in editable_wheel.
-        This method implements a temporary workaround to support the ecosystem
-        while the implementations catch up.
-        """
-        # TODO: Once plugins/customizations had the chance to catch up, replace
-        #       `self._run_build_subcommands()` with `self.run_command("build")`.
-        #       Also remove _safely_run, TestCustomBuildPy. Suggested date: Aug/2023.
-        build = self.get_finalized_command("build")
-        for name in build.get_sub_commands():
-            cmd = self.get_finalized_command(name)
-            if name == "build_py" and type(cmd) is not build_py_cls:
-                self._safely_run(name)
-            else:
-                self.run_command(name)
-
-    def _safely_run(self, cmd_name: str):
-        try:
-            return self.run_command(cmd_name)
-        except Exception:
-            SetuptoolsDeprecationWarning.emit(
-                "Customization incompatible with editable install",
-                f"""
-                {traceback.format_exc()}
-
-                If you are seeing this warning it is very likely that a setuptools
-                plugin or customization overrides the `{cmd_name}` command, without
-                taking into consideration how editable installs run build steps
-                starting from setuptools v64.0.0.
-
-                Plugin authors and developers relying on custom build steps are
-                encouraged to update their `{cmd_name}` implementation considering the
-                information about editable installs in
-                https://setuptools.pypa.io/en/latest/userguide/extension.html.
-
-                For the time being `setuptools` will silence this error and ignore
-                the faulty command, but this behavior will change in future versions.
-                """,
-                # TODO: define due_date
-                # There is a series of shortcomings with the available editable install
-                # methods, and they are very controversial. This is something that still
-                # needs work.
-            )
-
-    def _create_wheel_file(self, bdist_wheel):
-        from wheel.wheelfile import WheelFile
-
-        dist_info = self.get_finalized_command("dist_info")
-        dist_name = dist_info.name
-        tag = "-".join(bdist_wheel.get_tag())
-        build_tag = "0.editable"  # According to PEP 427 needs to start with digit
-        archive_name = f"{dist_name}-{build_tag}-{tag}.whl"
-        wheel_path = Path(self.dist_dir, archive_name)
-        if wheel_path.exists():
-            wheel_path.unlink()
-
-        unpacked_wheel = TemporaryDirectory(suffix=archive_name)
-        build_lib = TemporaryDirectory(suffix=".build-lib")
-        build_tmp = TemporaryDirectory(suffix=".build-temp")
-
-        with unpacked_wheel as unpacked, build_lib as lib, build_tmp as tmp:
-            unpacked_dist_info = Path(unpacked, Path(self.dist_info_dir).name)
-            shutil.copytree(self.dist_info_dir, unpacked_dist_info)
-            self._install_namespaces(unpacked, dist_name)
-            files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
-            strategy = self._select_strategy(dist_name, tag, lib)
-            with strategy, WheelFile(wheel_path, "w") as wheel_obj:
-                strategy(wheel_obj, files, mapping)
-                wheel_obj.write_files(unpacked)
-
-        return wheel_path
-
-    def _run_install(self, category: str):
-        has_category = getattr(self.distribution, f"has_{category}", None)
-        if has_category and has_category():
-            _logger.info(f"Installing {category} as non editable")
-            self.run_command(f"install_{category}")
-
-    def _select_strategy(
-        self,
-        name: str,
-        tag: str,
-        build_lib: StrPath,
-    ) -> EditableStrategy:
-        """Decides which strategy to use to implement an editable installation."""
-        build_name = f"__editable__.{name}-{tag}"
-        project_dir = Path(self.project_dir)
-        mode = _EditableMode.convert(self.mode)
-
-        if mode is _EditableMode.STRICT:
-            auxiliary_dir = _empty_dir(Path(self.project_dir, "build", build_name))
-            return _LinkTree(self.distribution, name, auxiliary_dir, build_lib)
-
-        packages = _find_packages(self.distribution)
-        has_simple_layout = _simple_layout(packages, self.package_dir, project_dir)
-        is_compat_mode = mode is _EditableMode.COMPAT
-        if set(self.package_dir) == {""} and has_simple_layout or is_compat_mode:
-            # src-layout(ish) is relatively safe for a simple pth file
-            src_dir = self.package_dir.get("", ".")
-            return _StaticPth(self.distribution, name, [Path(project_dir, src_dir)])
-
-        # Use a MetaPathFinder to avoid adding accidental top-level packages/modules
-        return _TopLevelFinder(self.distribution, name)
-
-
-class EditableStrategy(Protocol):
-    def __call__(
-        self, wheel: WheelFile, files: list[str], mapping: Mapping[str, str]
-    ) -> object: ...
-    def __enter__(self) -> Self: ...
-    def __exit__(
-        self,
-        _exc_type: type[BaseException] | None,
-        _exc_value: BaseException | None,
-        _traceback: TracebackType | None,
-    ) -> object: ...
-
-
-class _StaticPth:
-    def __init__(self, dist: Distribution, name: str, path_entries: list[Path]) -> None:
-        self.dist = dist
-        self.name = name
-        self.path_entries = path_entries
-
-    def __call__(
-        self, wheel: WheelFile, files: list[str], mapping: Mapping[str, str]
-    ) -> None:
-        entries = "\n".join(str(p.resolve()) for p in self.path_entries)
-        contents = _encode_pth(f"{entries}\n")
-        wheel.writestr(f"__editable__.{self.name}.pth", contents)
-
-    def __enter__(self) -> Self:
-        msg = f"""
-        Editable install will be performed using .pth file to extend `sys.path` with:
-        {list(map(os.fspath, self.path_entries))!r}
-        """
-        _logger.warning(msg + _LENIENT_WARNING)
-        return self
-
-    def __exit__(
-        self,
-        _exc_type: object,
-        _exc_value: object,
-        _traceback: object,
-    ) -> None:
-        pass
-
-
-class _LinkTree(_StaticPth):
-    """
-    Creates a ``.pth`` file that points to a link tree in the ``auxiliary_dir``.
-
-    This strategy will only link files (not dirs), so it can be implemented in
-    any OS, even if that means using hardlinks instead of symlinks.
-
-    By collocating ``auxiliary_dir`` and the original source code, limitations
-    with hardlinks should be avoided.
-    """
-
-    def __init__(
-        self,
-        dist: Distribution,
-        name: str,
-        auxiliary_dir: StrPath,
-        build_lib: StrPath,
-    ) -> None:
-        self.auxiliary_dir = Path(auxiliary_dir)
-        self.build_lib = Path(build_lib).resolve()
-        self._file = dist.get_command_obj("build_py").copy_file
-        super().__init__(dist, name, [self.auxiliary_dir])
-
-    def __call__(
-        self, wheel: WheelFile, files: list[str], mapping: Mapping[str, str]
-    ) -> None:
-        self._create_links(files, mapping)
-        super().__call__(wheel, files, mapping)
-
-    def _normalize_output(self, file: str) -> str | None:
-        # Files relative to build_lib will be normalized to None
-        with suppress(ValueError):
-            path = Path(file).resolve().relative_to(self.build_lib)
-            return str(path).replace(os.sep, '/')
-        return None
-
-    def _create_file(self, relative_output: str, src_file: str, link=None):
-        dest = self.auxiliary_dir / relative_output
-        if not dest.parent.is_dir():
-            dest.parent.mkdir(parents=True)
-        self._file(src_file, dest, link=link)
-
-    def _create_links(self, outputs, output_mapping: Mapping[str, str]):
-        self.auxiliary_dir.mkdir(parents=True, exist_ok=True)
-        link_type = "sym" if _can_symlink_files(self.auxiliary_dir) else "hard"
-        normalised = ((self._normalize_output(k), v) for k, v in output_mapping.items())
-        # remove files that are not relative to build_lib
-        mappings = {k: v for k, v in normalised if k is not None}
-
-        for output in outputs:
-            relative = self._normalize_output(output)
-            if relative and relative not in mappings:
-                self._create_file(relative, output)
-
-        for relative, src in mappings.items():
-            self._create_file(relative, src, link=link_type)
-
-    def __enter__(self) -> Self:
-        msg = "Strict editable install will be performed using a link tree.\n"
-        _logger.warning(msg + _STRICT_WARNING)
-        return self
-
-    def __exit__(
-        self,
-        _exc_type: object,
-        _exc_value: object,
-        _traceback: object,
-    ) -> None:
-        msg = f"""\n
-        Strict editable installation performed using the auxiliary directory:
-            {self.auxiliary_dir}
-
-        Please be careful to not remove this directory, otherwise you might not be able
-        to import/use your package.
-        """
-        InformationOnly.emit("Editable installation.", msg)
-
-
-class _TopLevelFinder:
-    def __init__(self, dist: Distribution, name: str) -> None:
-        self.dist = dist
-        self.name = name
-
-    def template_vars(self) -> tuple[str, str, dict[str, str], dict[str, list[str]]]:
-        src_root = self.dist.src_root or os.curdir
-        top_level = chain(_find_packages(self.dist), _find_top_level_modules(self.dist))
-        package_dir = self.dist.package_dir or {}
-        roots = _find_package_roots(top_level, package_dir, src_root)
-
-        namespaces_ = dict(
-            chain(
-                _find_namespaces(self.dist.packages or [], roots),
-                ((ns, []) for ns in _find_virtual_namespaces(roots)),
-            )
-        )
-
-        legacy_namespaces = {
-            pkg: find_package_path(pkg, roots, self.dist.src_root or "")
-            for pkg in self.dist.namespace_packages or []
-        }
-
-        mapping = {**roots, **legacy_namespaces}
-        # ^-- We need to explicitly add the legacy_namespaces to the mapping to be
-        #     able to import their modules even if another package sharing the same
-        #     namespace is installed in a conventional (non-editable) way.
-
-        name = f"__editable__.{self.name}.finder"
-        finder = _normalization.safe_identifier(name)
-        return finder, name, mapping, namespaces_
-
-    def get_implementation(self) -> Iterator[tuple[str, bytes]]:
-        finder, name, mapping, namespaces_ = self.template_vars()
-
-        content = bytes(_finder_template(name, mapping, namespaces_), "utf-8")
-        yield (f"{finder}.py", content)
-
-        content = _encode_pth(f"import {finder}; {finder}.install()")
-        yield (f"__editable__.{self.name}.pth", content)
-
-    def __call__(
-        self, wheel: WheelFile, files: list[str], mapping: Mapping[str, str]
-    ) -> None:
-        for file, content in self.get_implementation():
-            wheel.writestr(file, content)
-
-    def __enter__(self) -> Self:
-        msg = "Editable install will be performed using a meta path finder.\n"
-        _logger.warning(msg + _LENIENT_WARNING)
-        return self
-
-    def __exit__(
-        self,
-        _exc_type: object,
-        _exc_value: object,
-        _traceback: object,
-    ) -> None:
-        msg = """\n
-        Please be careful with folders in your working directory with the same
-        name as your package as they may take precedence during imports.
-        """
-        InformationOnly.emit("Editable installation.", msg)
-
-
-def _encode_pth(content: str) -> bytes:
-    """
-    Prior to Python 3.13 (see https://github.com/python/cpython/issues/77102),
-    .pth files are always read with 'locale' encoding, the recommendation
-    from the cpython core developers is to write them as ``open(path, "w")``
-    and ignore warnings (see python/cpython#77102, pypa/setuptools#3937).
-    This function tries to simulate this behavior without having to create an
-    actual file, in a way that supports a range of active Python versions.
-    (There seems to be some variety in the way different version of Python handle
-    ``encoding=None``, not all of them use ``locale.getpreferredencoding(False)``
-    or ``locale.getencoding()``).
-    """
-    with io.BytesIO() as buffer:
-        wrapper = io.TextIOWrapper(buffer, encoding=py312.PTH_ENCODING)
-        # TODO: Python 3.13 replace the whole function with `bytes(content, "utf-8")`
-        wrapper.write(content)
-        wrapper.flush()
-        buffer.seek(0)
-        return buffer.read()
-
-
-def _can_symlink_files(base_dir: Path) -> bool:
-    with TemporaryDirectory(dir=str(base_dir.resolve())) as tmp:
-        path1, path2 = Path(tmp, "file1.txt"), Path(tmp, "file2.txt")
-        path1.write_text("file1", encoding="utf-8")
-        with suppress(AttributeError, NotImplementedError, OSError):
-            os.symlink(path1, path2)
-            if path2.is_symlink() and path2.read_text(encoding="utf-8") == "file1":
-                return True
-
-        try:
-            os.link(path1, path2)  # Ensure hard links can be created
-        except Exception as ex:
-            msg = (
-                "File system does not seem to support either symlinks or hard links. "
-                "Strict editable installs require one of them to be supported."
-            )
-            raise LinksNotSupported(msg) from ex
-        return False
-
-
-def _simple_layout(
-    packages: Iterable[str], package_dir: dict[str, str], project_dir: StrPath
-) -> bool:
-    """Return ``True`` if:
-    - all packages are contained by the same parent directory, **and**
-    - all packages become importable if the parent directory is added to ``sys.path``.
-
-    >>> _simple_layout(['a'], {"": "src"}, "/tmp/myproj")
-    True
-    >>> _simple_layout(['a', 'a.b'], {"": "src"}, "/tmp/myproj")
-    True
-    >>> _simple_layout(['a', 'a.b'], {}, "/tmp/myproj")
-    True
-    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"": "src"}, "/tmp/myproj")
-    True
-    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "a", "b": "b"}, ".")
-    True
-    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a", "b": "_b"}, ".")
-    False
-    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a"}, "/tmp/myproj")
-    False
-    >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a.a1.a2": "_a2"}, ".")
-    False
-    >>> _simple_layout(['a', 'a.b'], {"": "src", "a.b": "_ab"}, "/tmp/myproj")
-    False
-    >>> # Special cases, no packages yet:
-    >>> _simple_layout([], {"": "src"}, "/tmp/myproj")
-    True
-    >>> _simple_layout([], {"a": "_a", "": "src"}, "/tmp/myproj")
-    False
-    """
-    layout = {pkg: find_package_path(pkg, package_dir, project_dir) for pkg in packages}
-    if not layout:
-        return set(package_dir) in ({}, {""})
-    parent = os.path.commonpath(starmap(_parent_path, layout.items()))
-    return all(
-        _path.same_path(Path(parent, *key.split('.')), value)
-        for key, value in layout.items()
-    )
-
-
-def _parent_path(pkg, pkg_path):
-    """Infer the parent path containing a package, that if added to ``sys.path`` would
-    allow importing that package.
-    When ``pkg`` is directly mapped into a directory with a different name, return its
-    own path.
-    >>> _parent_path("a", "src/a")
-    'src'
-    >>> _parent_path("b", "src/c")
-    'src/c'
-    """
-    parent = pkg_path.removesuffix(pkg)
-    return parent.rstrip("/" + os.sep)
-
-
-def _find_packages(dist: Distribution) -> Iterator[str]:
-    yield from iter(dist.packages or [])
-
-    py_modules = dist.py_modules or []
-    nested_modules = [mod for mod in py_modules if "." in mod]
-    if dist.ext_package:
-        yield dist.ext_package
-    else:
-        ext_modules = dist.ext_modules or []
-        nested_modules += [x.name for x in ext_modules if "." in x.name]
-
-    for module in nested_modules:
-        package, _, _ = module.rpartition(".")
-        yield package
-
-
-def _find_top_level_modules(dist: Distribution) -> Iterator[str]:
-    py_modules = dist.py_modules or []
-    yield from (mod for mod in py_modules if "." not in mod)
-
-    if not dist.ext_package:
-        ext_modules = dist.ext_modules or []
-        yield from (x.name for x in ext_modules if "." not in x.name)
-
-
-def _find_package_roots(
-    packages: Iterable[str],
-    package_dir: Mapping[str, str],
-    src_root: StrPath,
-) -> dict[str, str]:
-    pkg_roots: dict[str, str] = {
-        pkg: _absolute_root(find_package_path(pkg, package_dir, src_root))
-        for pkg in sorted(packages)
-    }
-
-    return _remove_nested(pkg_roots)
-
-
-def _absolute_root(path: StrPath) -> str:
-    """Works for packages and top-level modules"""
-    path_ = Path(path)
-    parent = path_.parent
-
-    if path_.exists():
-        return str(path_.resolve())
-    else:
-        return str(parent.resolve() / path_.name)
-
-
-def _find_virtual_namespaces(pkg_roots: dict[str, str]) -> Iterator[str]:
-    """By carefully designing ``package_dir``, it is possible to implement the logical
-    structure of PEP 420 in a package without the corresponding directories.
-
-    Moreover a parent package can be purposefully/accidentally skipped in the discovery
-    phase (e.g. ``find_packages(include=["mypkg.*"])``, when ``mypkg.foo`` is included
-    by ``mypkg`` itself is not).
-    We consider this case to also be a virtual namespace (ignoring the original
-    directory) to emulate a non-editable installation.
-
-    This function will try to find these kinds of namespaces.
-    """
-    for pkg in pkg_roots:
-        if "." not in pkg:
-            continue
-        parts = pkg.split(".")
-        for i in range(len(parts) - 1, 0, -1):
-            partial_name = ".".join(parts[:i])
-            path = Path(find_package_path(partial_name, pkg_roots, ""))
-            if not path.exists() or partial_name not in pkg_roots:
-                # partial_name not in pkg_roots ==> purposefully/accidentally skipped
-                yield partial_name
-
-
-def _find_namespaces(
-    packages: list[str], pkg_roots: dict[str, str]
-) -> Iterator[tuple[str, list[str]]]:
-    for pkg in packages:
-        path = find_package_path(pkg, pkg_roots, "")
-        if Path(path).exists() and not Path(path, "__init__.py").exists():
-            yield (pkg, [path])
-
-
-def _remove_nested(pkg_roots: dict[str, str]) -> dict[str, str]:
-    output = dict(pkg_roots.copy())
-
-    for pkg, path in reversed(list(pkg_roots.items())):
-        if any(
-            pkg != other and _is_nested(pkg, path, other, other_path)
-            for other, other_path in pkg_roots.items()
-        ):
-            output.pop(pkg)
-
-    return output
-
-
-def _is_nested(pkg: str, pkg_path: str, parent: str, parent_path: str) -> bool:
-    """
-    Return ``True`` if ``pkg`` is nested inside ``parent`` both logically and in the
-    file system.
-    >>> _is_nested("a.b", "path/a/b", "a", "path/a")
-    True
-    >>> _is_nested("a.b", "path/a/b", "a", "otherpath/a")
-    False
-    >>> _is_nested("a.b", "path/a/b", "c", "path/c")
-    False
-    >>> _is_nested("a.a", "path/a/a", "a", "path/a")
-    True
-    >>> _is_nested("b.a", "path/b/a", "a", "path/a")
-    False
-    """
-    norm_pkg_path = _path.normpath(pkg_path)
-    rest = pkg.replace(parent, "", 1).strip(".").split(".")
-    return pkg.startswith(parent) and norm_pkg_path == _path.normpath(
-        Path(parent_path, *rest)
-    )
-
-
-def _empty_dir(dir_: _P) -> _P:
-    """Create a directory ensured to be empty. Existing files may be removed."""
-    _shutil.rmtree(dir_, ignore_errors=True)
-    os.makedirs(dir_)
-    return dir_
-
-
-class _NamespaceInstaller(namespaces.Installer):
-    def __init__(self, distribution, installation_dir, editable_name, src_root) -> None:
-        self.distribution = distribution
-        self.src_root = src_root
-        self.installation_dir = installation_dir
-        self.editable_name = editable_name
-        self.outputs: list[str] = []
-
-    def _get_nspkg_file(self):
-        """Installation target."""
-        return os.path.join(self.installation_dir, self.editable_name + self.nspkg_ext)
-
-    def _get_root(self):
-        """Where the modules/packages should be loaded from."""
-        return repr(str(self.src_root))
-
-
-_FINDER_TEMPLATE = """\
-from __future__ import annotations
-import sys
-from importlib.machinery import ModuleSpec, PathFinder
-from importlib.machinery import all_suffixes as module_suffixes
-from importlib.util import spec_from_file_location
-from itertools import chain
-from pathlib import Path
-
-MAPPING: dict[str, str] = {mapping!r}
-NAMESPACES: dict[str, list[str]] = {namespaces!r}
-PATH_PLACEHOLDER = {name!r} + ".__path_hook__"
-
-
-class _EditableFinder:  # MetaPathFinder
-    @classmethod
-    def find_spec(cls, fullname: str, path=None, target=None) -> ModuleSpec | None:  # type: ignore
-        # Top-level packages and modules (we know these exist in the FS)
-        if fullname in MAPPING:
-            pkg_path = MAPPING[fullname]
-            return cls._find_spec(fullname, Path(pkg_path))
-
-        # Handle immediate children modules (required for namespaces to work)
-        # To avoid problems with case sensitivity in the file system we delegate
-        # to the importlib.machinery implementation.
-        parent, _, child = fullname.rpartition(".")
-        if parent and parent in MAPPING:
-            return PathFinder.find_spec(fullname, path=[MAPPING[parent]])
-
-        # Other levels of nesting should be handled automatically by importlib
-        # using the parent path.
-        return None
-
-    @classmethod
-    def _find_spec(cls, fullname: str, candidate_path: Path) -> ModuleSpec | None:
-        init = candidate_path / "__init__.py"
-        candidates = (candidate_path.with_suffix(x) for x in module_suffixes())
-        for candidate in chain([init], candidates):
-            if candidate.exists():
-                return spec_from_file_location(fullname, candidate)
-        return None
-
-
-class _EditableNamespaceFinder:  # PathEntryFinder
-    @classmethod
-    def _path_hook(cls, path) -> type[_EditableNamespaceFinder]:
-        if path == PATH_PLACEHOLDER:
-            return cls
-        raise ImportError
-
-    @classmethod
-    def _paths(cls, fullname: str) -> list[str]:
-        paths = NAMESPACES[fullname]
-        if not paths and fullname in MAPPING:
-            paths = [MAPPING[fullname]]
-        # Always add placeholder, for 2 reasons:
-        # 1. __path__ cannot be empty for the spec to be considered namespace.
-        # 2. In the case of nested namespaces, we need to force
-        #    import machinery to query _EditableNamespaceFinder again.
-        return [*paths, PATH_PLACEHOLDER]
-
-    @classmethod
-    def find_spec(cls, fullname: str, target=None) -> ModuleSpec | None:  # type: ignore
-        if fullname in NAMESPACES:
-            spec = ModuleSpec(fullname, None, is_package=True)
-            spec.submodule_search_locations = cls._paths(fullname)
-            return spec
-        return None
-
-    @classmethod
-    def find_module(cls, _fullname) -> None:
-        return None
-
-
-def install():
-    if not any(finder == _EditableFinder for finder in sys.meta_path):
-        sys.meta_path.append(_EditableFinder)
-
-    if not NAMESPACES:
-        return
-
-    if not any(hook == _EditableNamespaceFinder._path_hook for hook in sys.path_hooks):
-        # PathEntryFinder is needed to create NamespaceSpec without private APIS
-        sys.path_hooks.append(_EditableNamespaceFinder._path_hook)
-    if PATH_PLACEHOLDER not in sys.path:
-        sys.path.append(PATH_PLACEHOLDER)  # Used just to trigger the path hook
-"""
-
-
-def _finder_template(
-    name: str, mapping: Mapping[str, str], namespaces: dict[str, list[str]]
-) -> str:
-    """Create a string containing the code for the``MetaPathFinder`` and
-    ``PathEntryFinder``.
-    """
-    mapping = dict(sorted(mapping.items(), key=operator.itemgetter(0)))
-    return _FINDER_TEMPLATE.format(name=name, mapping=mapping, namespaces=namespaces)
-
-
-class LinksNotSupported(errors.FileError):
-    """File system does not seem to support either symlinks or hard links."""
diff --git a/voxvera/vendor/setuptools/command/egg_info.py b/voxvera/vendor/setuptools/command/egg_info.py
deleted file mode 100644
index a5b5932..0000000
--- a/voxvera/vendor/setuptools/command/egg_info.py
+++ /dev/null
@@ -1,716 +0,0 @@
-"""setuptools.command.egg_info
-
-Create a distribution's .egg-info directory and contents"""
-
-from __future__ import annotations
-
-import functools
-import os
-import re
-import sys
-import time
-from collections.abc import Callable
-
-import packaging
-import packaging.requirements
-import packaging.version
-
-import setuptools.unicode_utils as unicode_utils
-from setuptools import Command
-from setuptools.command import bdist_egg
-from setuptools.command.sdist import sdist, walk_revctrl
-from setuptools.command.setopt import edit_config
-from setuptools.glob import glob
-
-from .. import _entry_points, _normalization
-from .._importlib import metadata
-from ..warnings import SetuptoolsDeprecationWarning
-from . import _requirestxt
-
-import distutils.errors
-import distutils.filelist
-from distutils import log
-from distutils.errors import DistutilsInternalError
-from distutils.filelist import FileList as _FileList
-from distutils.util import convert_path
-
-PY_MAJOR = f'{sys.version_info.major}.{sys.version_info.minor}'
-
-
-def translate_pattern(glob):  # noqa: C901  # is too complex (14)  # FIXME
-    """
-    Translate a file path glob like '*.txt' in to a regular expression.
-    This differs from fnmatch.translate which allows wildcards to match
-    directory separators. It also knows about '**/' which matches any number of
-    directories.
-    """
-    pat = ''
-
-    # This will split on '/' within [character classes]. This is deliberate.
-    chunks = glob.split(os.path.sep)
-
-    sep = re.escape(os.sep)
-    valid_char = f'[^{sep}]'
-
-    for c, chunk in enumerate(chunks):
-        last_chunk = c == len(chunks) - 1
-
-        # Chunks that are a literal ** are globstars. They match anything.
-        if chunk == '**':
-            if last_chunk:
-                # Match anything if this is the last component
-                pat += '.*'
-            else:
-                # Match '(name/)*'
-                pat += f'(?:{valid_char}+{sep})*'
-            continue  # Break here as the whole path component has been handled
-
-        # Find any special characters in the remainder
-        i = 0
-        chunk_len = len(chunk)
-        while i < chunk_len:
-            char = chunk[i]
-            if char == '*':
-                # Match any number of name characters
-                pat += valid_char + '*'
-            elif char == '?':
-                # Match a name character
-                pat += valid_char
-            elif char == '[':
-                # Character class
-                inner_i = i + 1
-                # Skip initial !/] chars
-                if inner_i < chunk_len and chunk[inner_i] == '!':
-                    inner_i = inner_i + 1
-                if inner_i < chunk_len and chunk[inner_i] == ']':
-                    inner_i = inner_i + 1
-
-                # Loop till the closing ] is found
-                while inner_i < chunk_len and chunk[inner_i] != ']':
-                    inner_i = inner_i + 1
-
-                if inner_i >= chunk_len:
-                    # Got to the end of the string without finding a closing ]
-                    # Do not treat this as a matching group, but as a literal [
-                    pat += re.escape(char)
-                else:
-                    # Grab the insides of the [brackets]
-                    inner = chunk[i + 1 : inner_i]
-                    char_class = ''
-
-                    # Class negation
-                    if inner[0] == '!':
-                        char_class = '^'
-                        inner = inner[1:]
-
-                    char_class += re.escape(inner)
-                    pat += f'[{char_class}]'
-
-                    # Skip to the end ]
-                    i = inner_i
-            else:
-                pat += re.escape(char)
-            i += 1
-
-        # Join each chunk with the dir separator
-        if not last_chunk:
-            pat += sep
-
-    pat += r'\Z'
-    return re.compile(pat, flags=re.MULTILINE | re.DOTALL)
-
-
-class InfoCommon:
-    tag_build = None
-    tag_date = None
-
-    @property
-    def name(self):
-        return _normalization.safe_name(self.distribution.get_name())
-
-    def tagged_version(self):
-        tagged = self._maybe_tag(self.distribution.get_version())
-        return _normalization.safe_version(tagged)
-
-    def _maybe_tag(self, version):
-        """
-        egg_info may be called more than once for a distribution,
-        in which case the version string already contains all tags.
-        """
-        return (
-            version
-            if self.vtags and self._already_tagged(version)
-            else version + self.vtags
-        )
-
-    def _already_tagged(self, version: str) -> bool:
-        # Depending on their format, tags may change with version normalization.
-        # So in addition the regular tags, we have to search for the normalized ones.
-        return version.endswith((self.vtags, self._safe_tags()))
-
-    def _safe_tags(self) -> str:
-        # To implement this we can rely on `safe_version` pretending to be version 0
-        # followed by tags. Then we simply discard the starting 0 (fake version number)
-        try:
-            return _normalization.safe_version(f"0{self.vtags}")[1:]
-        except packaging.version.InvalidVersion:
-            return _normalization.safe_name(self.vtags.replace(' ', '.'))
-
-    def tags(self) -> str:
-        version = ''
-        if self.tag_build:
-            version += self.tag_build
-        if self.tag_date:
-            version += time.strftime("%Y%m%d")
-        return version
-
-    vtags = property(tags)
-
-
-class egg_info(InfoCommon, Command):
-    description = "create a distribution's .egg-info directory"
-
-    user_options = [
-        (
-            'egg-base=',
-            'e',
-            "directory containing .egg-info directories"
-            " [default: top of the source tree]",
-        ),
-        ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"),
-        ('tag-build=', 'b', "Specify explicit tag to add to version number"),
-        ('no-date', 'D', "Don't include date stamp [default]"),
-    ]
-
-    boolean_options = ['tag-date']
-    negative_opt = {
-        'no-date': 'tag-date',
-    }
-
-    def initialize_options(self):
-        self.egg_base = None
-        self.egg_name = None
-        self.egg_info = None
-        self.egg_version = None
-        self.ignore_egg_info_in_manifest = False
-
-    ####################################
-    # allow the 'tag_svn_revision' to be detected and
-    # set, supporting sdists built on older Setuptools.
-    @property
-    def tag_svn_revision(self) -> int | None:
-        pass
-
-    @tag_svn_revision.setter
-    def tag_svn_revision(self, value) -> None:
-        pass
-
-    ####################################
-
-    def save_version_info(self, filename) -> None:
-        """
-        Materialize the value of date into the
-        build tag. Install build keys in a deterministic order
-        to avoid arbitrary reordering on subsequent builds.
-        """
-        # follow the order these keys would have been added
-        # when PYTHONHASHSEED=0
-        egg_info = dict(tag_build=self.tags(), tag_date=0)
-        edit_config(filename, dict(egg_info=egg_info))
-
-    def finalize_options(self) -> None:
-        # Note: we need to capture the current value returned
-        # by `self.tagged_version()`, so we can later update
-        # `self.distribution.metadata.version` without
-        # repercussions.
-        self.egg_name = self.name
-        self.egg_version = self.tagged_version()
-        parsed_version = packaging.version.Version(self.egg_version)
-
-        try:
-            is_version = isinstance(parsed_version, packaging.version.Version)
-            spec = "%s==%s" if is_version else "%s===%s"
-            packaging.requirements.Requirement(spec % (self.egg_name, self.egg_version))
-        except ValueError as e:
-            raise distutils.errors.DistutilsOptionError(
-                f"Invalid distribution name or version syntax: {self.egg_name}-{self.egg_version}"
-            ) from e
-
-        if self.egg_base is None:
-            dirs = self.distribution.package_dir
-            self.egg_base = (dirs or {}).get('', os.curdir)
-
-        self.ensure_dirname('egg_base')
-        self.egg_info = _normalization.filename_component(self.egg_name) + '.egg-info'
-        if self.egg_base != os.curdir:
-            self.egg_info = os.path.join(self.egg_base, self.egg_info)
-
-        # Set package version for the benefit of dumber commands
-        # (e.g. sdist, bdist_wininst, etc.)
-        #
-        self.distribution.metadata.version = self.egg_version
-
-    def _get_egg_basename(self, py_version=PY_MAJOR, platform=None):
-        """Compute filename of the output egg. Private API."""
-        return _egg_basename(self.egg_name, self.egg_version, py_version, platform)
-
-    def write_or_delete_file(self, what, filename, data, force: bool = False) -> None:
-        """Write `data` to `filename` or delete if empty
-
-        If `data` is non-empty, this routine is the same as ``write_file()``.
-        If `data` is empty but not ``None``, this is the same as calling
-        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
-        unless `filename` exists, in which case a warning is issued about the
-        orphaned file (if `force` is false), or deleted (if `force` is true).
-        """
-        if data:
-            self.write_file(what, filename, data)
-        elif os.path.exists(filename):
-            if data is None and not force:
-                log.warn("%s not set in setup(), but %s exists", what, filename)
-                return
-            else:
-                self.delete_file(filename)
-
-    def write_file(self, what, filename, data) -> None:
-        """Write `data` to `filename` (if not a dry run) after announcing it
-
-        `what` is used in a log message to identify what is being written
-        to the file.
-        """
-        log.info("writing %s to %s", what, filename)
-        data = data.encode("utf-8")
-        f = open(filename, 'wb')
-        f.write(data)
-        f.close()
-
-    def delete_file(self, filename) -> None:
-        """Delete `filename` (if not a dry run) after announcing it"""
-        log.info("deleting %s", filename)
-        os.unlink(filename)
-
-    def run(self) -> None:
-        # Pre-load to avoid iterating over entry-points while an empty .egg-info
-        # exists in sys.path. See pypa/pyproject-hooks#206
-        writers = list(metadata.entry_points(group='egg_info.writers'))
-
-        self.mkpath(self.egg_info)
-        try:
-            os.utime(self.egg_info, None)
-        except OSError as e:
-            msg = f"Cannot update time stamp of directory '{self.egg_info}'"
-            raise distutils.errors.DistutilsFileError(msg) from e
-        for ep in writers:
-            writer = ep.load()
-            writer(self, ep.name, os.path.join(self.egg_info, ep.name))
-
-        # Get rid of native_libs.txt if it was put there by older bdist_egg
-        nl = os.path.join(self.egg_info, "native_libs.txt")
-        if os.path.exists(nl):
-            self.delete_file(nl)
-
-        self.find_sources()
-
-    def find_sources(self) -> None:
-        """Generate SOURCES.txt manifest file"""
-        manifest_filename = os.path.join(self.egg_info, "SOURCES.txt")
-        mm = manifest_maker(self.distribution)
-        mm.ignore_egg_info_dir = self.ignore_egg_info_in_manifest
-        mm.manifest = manifest_filename
-        mm.run()
-        self.filelist = mm.filelist
-
-
-class FileList(_FileList):
-    # Implementations of the various MANIFEST.in commands
-
-    def __init__(
-        self, warn=None, debug_print=None, ignore_egg_info_dir: bool = False
-    ) -> None:
-        super().__init__(warn, debug_print)
-        self.ignore_egg_info_dir = ignore_egg_info_dir
-
-    def process_template_line(self, line) -> None:
-        # Parse the line: split it up, make sure the right number of words
-        # is there, and return the relevant words.  'action' is always
-        # defined: it's the first word of the line.  Which of the other
-        # three are defined depends on the action; it'll be either
-        # patterns, (dir and patterns), or (dir_pattern).
-        (action, patterns, dir, dir_pattern) = self._parse_template_line(line)
-
-        action_map: dict[str, Callable] = {
-            'include': self.include,
-            'exclude': self.exclude,
-            'global-include': self.global_include,
-            'global-exclude': self.global_exclude,
-            'recursive-include': functools.partial(
-                self.recursive_include,
-                dir,
-            ),
-            'recursive-exclude': functools.partial(
-                self.recursive_exclude,
-                dir,
-            ),
-            'graft': self.graft,
-            'prune': self.prune,
-        }
-        log_map = {
-            'include': "warning: no files found matching '%s'",
-            'exclude': ("warning: no previously-included files found matching '%s'"),
-            'global-include': (
-                "warning: no files found matching '%s' anywhere in distribution"
-            ),
-            'global-exclude': (
-                "warning: no previously-included files matching "
-                "'%s' found anywhere in distribution"
-            ),
-            'recursive-include': (
-                "warning: no files found matching '%s' under directory '%s'"
-            ),
-            'recursive-exclude': (
-                "warning: no previously-included files matching "
-                "'%s' found under directory '%s'"
-            ),
-            'graft': "warning: no directories found matching '%s'",
-            'prune': "no previously-included directories found matching '%s'",
-        }
-
-        try:
-            process_action = action_map[action]
-        except KeyError:
-            msg = f"Invalid MANIFEST.in: unknown action {action!r} in {line!r}"
-            raise DistutilsInternalError(msg) from None
-
-        # OK, now we know that the action is valid and we have the
-        # right number of words on the line for that action -- so we
-        # can proceed with minimal error-checking.
-
-        action_is_recursive = action.startswith('recursive-')
-        if action in {'graft', 'prune'}:
-            patterns = [dir_pattern]
-        extra_log_args = (dir,) if action_is_recursive else ()
-        log_tmpl = log_map[action]
-
-        self.debug_print(
-            ' '.join(
-                [action] + ([dir] if action_is_recursive else []) + patterns,
-            )
-        )
-        for pattern in patterns:
-            if not process_action(pattern):
-                log.warn(log_tmpl, pattern, *extra_log_args)
-
-    def _remove_files(self, predicate):
-        """
-        Remove all files from the file list that match the predicate.
-        Return True if any matching files were removed
-        """
-        found = False
-        for i in range(len(self.files) - 1, -1, -1):
-            if predicate(self.files[i]):
-                self.debug_print(" removing " + self.files[i])
-                del self.files[i]
-                found = True
-        return found
-
-    def include(self, pattern):
-        """Include files that match 'pattern'."""
-        found = [f for f in glob(pattern) if not os.path.isdir(f)]
-        self.extend(found)
-        return bool(found)
-
-    def exclude(self, pattern):
-        """Exclude files that match 'pattern'."""
-        match = translate_pattern(pattern)
-        return self._remove_files(match.match)
-
-    def recursive_include(self, dir, pattern):
-        """
-        Include all files anywhere in 'dir/' that match the pattern.
-        """
-        full_pattern = os.path.join(dir, '**', pattern)
-        found = [f for f in glob(full_pattern, recursive=True) if not os.path.isdir(f)]
-        self.extend(found)
-        return bool(found)
-
-    def recursive_exclude(self, dir, pattern):
-        """
-        Exclude any file anywhere in 'dir/' that match the pattern.
-        """
-        match = translate_pattern(os.path.join(dir, '**', pattern))
-        return self._remove_files(match.match)
-
-    def graft(self, dir):
-        """Include all files from 'dir/'."""
-        found = [
-            item
-            for match_dir in glob(dir)
-            for item in distutils.filelist.findall(match_dir)
-        ]
-        self.extend(found)
-        return bool(found)
-
-    def prune(self, dir):
-        """Filter out files from 'dir/'."""
-        match = translate_pattern(os.path.join(dir, '**'))
-        return self._remove_files(match.match)
-
-    def global_include(self, pattern):
-        """
-        Include all files anywhere in the current directory that match the
-        pattern. This is very inefficient on large file trees.
-        """
-        if self.allfiles is None:
-            self.findall()
-        match = translate_pattern(os.path.join('**', pattern))
-        found = [f for f in self.allfiles if match.match(f)]
-        self.extend(found)
-        return bool(found)
-
-    def global_exclude(self, pattern):
-        """
-        Exclude all files anywhere that match the pattern.
-        """
-        match = translate_pattern(os.path.join('**', pattern))
-        return self._remove_files(match.match)
-
-    def append(self, item) -> None:
-        item = item.removesuffix('\r')  # Fix older sdists built on Windows
-        path = convert_path(item)
-
-        if self._safe_path(path):
-            self.files.append(path)
-
-    def extend(self, paths) -> None:
-        self.files.extend(filter(self._safe_path, paths))
-
-    def _repair(self):
-        """
-        Replace self.files with only safe paths
-
-        Because some owners of FileList manipulate the underlying
-        ``files`` attribute directly, this method must be called to
-        repair those paths.
-        """
-        self.files = list(filter(self._safe_path, self.files))
-
-    def _safe_path(self, path):
-        enc_warn = "'%s' not %s encodable -- skipping"
-
-        # To avoid accidental trans-codings errors, first to unicode
-        u_path = unicode_utils.filesys_decode(path)
-        if u_path is None:
-            log.warn(f"'{path}' in unexpected encoding -- skipping")
-            return False
-
-        # Must ensure utf-8 encodability
-        utf8_path = unicode_utils.try_encode(u_path, "utf-8")
-        if utf8_path is None:
-            log.warn(enc_warn, path, 'utf-8')
-            return False
-
-        try:
-            # ignore egg-info paths
-            is_egg_info = ".egg-info" in u_path or b".egg-info" in utf8_path
-            if self.ignore_egg_info_dir and is_egg_info:
-                return False
-            # accept is either way checks out
-            if os.path.exists(u_path) or os.path.exists(utf8_path):
-                return True
-        # this will catch any encode errors decoding u_path
-        except UnicodeEncodeError:
-            log.warn(enc_warn, path, sys.getfilesystemencoding())
-
-
-class manifest_maker(sdist):
-    template = "MANIFEST.in"
-
-    def initialize_options(self) -> None:
-        self.use_defaults = True
-        self.prune = True
-        self.manifest_only = True
-        self.force_manifest = True
-        self.ignore_egg_info_dir = False
-
-    def finalize_options(self) -> None:
-        pass
-
-    def run(self) -> None:
-        self.filelist = FileList(ignore_egg_info_dir=self.ignore_egg_info_dir)
-        if not os.path.exists(self.manifest):
-            self.write_manifest()  # it must exist so it'll get in the list
-        self.add_defaults()
-        if os.path.exists(self.template):
-            self.read_template()
-        self.add_license_files()
-        self._add_referenced_files()
-        self.prune_file_list()
-        self.filelist.sort()
-        self.filelist.remove_duplicates()
-        self.write_manifest()
-
-    def _manifest_normalize(self, path):
-        path = unicode_utils.filesys_decode(path)
-        return path.replace(os.sep, '/')
-
-    def write_manifest(self) -> None:
-        """
-        Write the file list in 'self.filelist' to the manifest file
-        named by 'self.manifest'.
-        """
-        self.filelist._repair()
-
-        # Now _repairs should encodability, but not unicode
-        files = [self._manifest_normalize(f) for f in self.filelist.files]
-        msg = f"writing manifest file '{self.manifest}'"
-        self.execute(write_file, (self.manifest, files), msg)
-
-    def warn(self, msg) -> None:
-        if not self._should_suppress_warning(msg):
-            sdist.warn(self, msg)
-
-    @staticmethod
-    def _should_suppress_warning(msg):
-        """
-        suppress missing-file warnings from sdist
-        """
-        return re.match(r"standard file .*not found", msg)
-
-    def add_defaults(self) -> None:
-        sdist.add_defaults(self)
-        self.filelist.append(self.template)
-        self.filelist.append(self.manifest)
-        rcfiles = list(walk_revctrl())
-        if rcfiles:
-            self.filelist.extend(rcfiles)
-        elif os.path.exists(self.manifest):
-            self.read_manifest()
-
-        if os.path.exists("setup.py"):
-            # setup.py should be included by default, even if it's not
-            # the script called to create the sdist
-            self.filelist.append("setup.py")
-
-        ei_cmd = self.get_finalized_command('egg_info')
-        self.filelist.graft(ei_cmd.egg_info)
-
-    def add_license_files(self) -> None:
-        license_files = self.distribution.metadata.license_files or []
-        for lf in license_files:
-            log.info("adding license file '%s'", lf)
-        self.filelist.extend(license_files)
-
-    def _add_referenced_files(self):
-        """Add files referenced by the config (e.g. `file:` directive) to filelist"""
-        referenced = getattr(self.distribution, '_referenced_files', [])
-        # ^-- fallback if dist comes from distutils or is a custom class
-        for rf in referenced:
-            log.debug("adding file referenced by config '%s'", rf)
-        self.filelist.extend(referenced)
-
-    def _safe_data_files(self, build_py):
-        """
-        The parent class implementation of this method
-        (``sdist``) will try to include data files, which
-        might cause recursion problems when
-        ``include_package_data=True``.
-
-        Therefore, avoid triggering any attempt of
-        analyzing/building the manifest again.
-        """
-        if hasattr(build_py, 'get_data_files_without_manifest'):
-            return build_py.get_data_files_without_manifest()
-
-        SetuptoolsDeprecationWarning.emit(
-            "`build_py` command does not inherit from setuptools' `build_py`.",
-            """
-            Custom 'build_py' does not implement 'get_data_files_without_manifest'.
-            Please extend command classes from setuptools instead of distutils.
-            """,
-            see_url="https://peps.python.org/pep-0632/",
-            # due_date not defined yet, old projects might still do it?
-        )
-        return build_py.get_data_files()
-
-
-def write_file(filename, contents) -> None:
-    """Create a file with the specified name and write 'contents' (a
-    sequence of strings without line terminators) to it.
-    """
-    contents = "\n".join(contents)
-
-    # assuming the contents has been vetted for utf-8 encoding
-    contents = contents.encode("utf-8")
-
-    with open(filename, "wb") as f:  # always write POSIX-style manifest
-        f.write(contents)
-
-
-def write_pkg_info(cmd, basename, filename) -> None:
-    log.info("writing %s", filename)
-    metadata = cmd.distribution.metadata
-    metadata.version, oldver = cmd.egg_version, metadata.version
-    metadata.name, oldname = cmd.egg_name, metadata.name
-
-    try:
-        metadata.write_pkg_info(cmd.egg_info)
-    finally:
-        metadata.name, metadata.version = oldname, oldver
-
-    safe = getattr(cmd.distribution, 'zip_safe', None)
-
-    bdist_egg.write_safety_flag(cmd.egg_info, safe)
-
-
-def warn_depends_obsolete(cmd, basename, filename) -> None:
-    """
-    Unused: left to avoid errors when updating (from source) from <= 67.8.
-    Old installations have a .dist-info directory with the entry-point
-    ``depends.txt = setuptools.command.egg_info:warn_depends_obsolete``.
-    This may trigger errors when running the first egg_info in build_meta.
-    TODO: Remove this function in a version sufficiently > 68.
-    """
-
-
-# Export API used in entry_points
-write_requirements = _requirestxt.write_requirements
-write_setup_requirements = _requirestxt.write_setup_requirements
-
-
-def write_toplevel_names(cmd, basename, filename) -> None:
-    pkgs = dict.fromkeys([
-        k.split('.', 1)[0] for k in cmd.distribution.iter_distribution_names()
-    ])
-    cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs)) + '\n')
-
-
-def overwrite_arg(cmd, basename, filename) -> None:
-    write_arg(cmd, basename, filename, True)
-
-
-def write_arg(cmd, basename, filename, force: bool = False) -> None:
-    argname = os.path.splitext(basename)[0]
-    value = getattr(cmd.distribution, argname, None)
-    if value is not None:
-        value = '\n'.join(value) + '\n'
-    cmd.write_or_delete_file(argname, filename, value, force)
-
-
-def write_entries(cmd, basename, filename) -> None:
-    eps = _entry_points.load(cmd.distribution.entry_points)
-    defn = _entry_points.render(eps)
-    cmd.write_or_delete_file('entry points', filename, defn, True)
-
-
-def _egg_basename(egg_name, egg_version, py_version=None, platform=None):
-    """Compute filename of the output egg. Private API."""
-    name = _normalization.filename_component(egg_name)
-    version = _normalization.filename_component(egg_version)
-    egg = f"{name}-{version}-py{py_version or PY_MAJOR}"
-    if platform:
-        egg += f"-{platform}"
-    return egg
-
-
-class EggInfoDeprecationWarning(SetuptoolsDeprecationWarning):
-    """Deprecated behavior warning for EggInfo, bypassing suppression."""
diff --git a/voxvera/vendor/setuptools/command/install.py b/voxvera/vendor/setuptools/command/install.py
deleted file mode 100644
index 19ca601..0000000
--- a/voxvera/vendor/setuptools/command/install.py
+++ /dev/null
@@ -1,131 +0,0 @@
-from __future__ import annotations
-
-import inspect
-import platform
-from collections.abc import Callable
-from typing import TYPE_CHECKING, Any, ClassVar
-
-from ..dist import Distribution
-from ..warnings import SetuptoolsDeprecationWarning, SetuptoolsWarning
-
-import distutils.command.install as orig
-from distutils.errors import DistutilsArgError
-
-if TYPE_CHECKING:
-    # This is only used for a type-cast, don't import at runtime or it'll cause deprecation warnings
-    from .easy_install import easy_install as easy_install_cls
-else:
-    easy_install_cls = None
-
-
-def __getattr__(name: str):  # pragma: no cover
-    if name == "_install":
-        SetuptoolsDeprecationWarning.emit(
-            "`setuptools.command._install` was an internal implementation detail "
-            "that was left in for numpy<1.9 support.",
-            due_date=(2025, 5, 2),  # Originally added on 2024-11-01
-        )
-        return orig.install
-    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
-
-
-class install(orig.install):
-    """Use easy_install to install the package, w/dependencies"""
-
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-
-    user_options = orig.install.user_options + [
-        ('old-and-unmanageable', None, "Try not to use this!"),
-        (
-            'single-version-externally-managed',
-            None,
-            "used by system package builders to create 'flat' eggs",
-        ),
-    ]
-    boolean_options = orig.install.boolean_options + [
-        'old-and-unmanageable',
-        'single-version-externally-managed',
-    ]
-    # Type the same as distutils.command.install.install.sub_commands
-    # Must keep the second tuple item potentially None due to invariance
-    new_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] = [
-        ('install_egg_info', lambda self: True),
-        ('install_scripts', lambda self: True),
-    ]
-    _nc = dict(new_commands)
-
-    def initialize_options(self):
-        SetuptoolsDeprecationWarning.emit(
-            "setup.py install is deprecated.",
-            """
-            Please avoid running ``setup.py`` directly.
-            Instead, use pypa/build, pypa/installer or other
-            standards-based tools.
-            """,
-            see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
-            due_date=(2025, 10, 31),
-        )
-
-        super().initialize_options()
-        self.old_and_unmanageable = None
-        self.single_version_externally_managed = None
-
-    def finalize_options(self) -> None:
-        super().finalize_options()
-        if self.root:
-            self.single_version_externally_managed = True
-        elif self.single_version_externally_managed:
-            if not self.root and not self.record:
-                raise DistutilsArgError(
-                    "You must specify --record or --root when building system packages"
-                )
-
-    def handle_extra_path(self):
-        if self.root or self.single_version_externally_managed:
-            # explicit backward-compatibility mode, allow extra_path to work
-            return orig.install.handle_extra_path(self)
-
-        # Ignore extra_path when installing an egg (or being run by another
-        # command without --root or --single-version-externally-managed
-        self.path_file = None
-        self.extra_dirs = ''
-        return None
-
-    @staticmethod
-    def _called_from_setup(run_frame):
-        """
-        Attempt to detect whether run() was called from setup() or by another
-        command.  If called by setup(), the parent caller will be the
-        'run_command' method in 'distutils.dist', and *its* caller will be
-        the 'run_commands' method.  If called any other way, the
-        immediate caller *might* be 'run_command', but it won't have been
-        called by 'run_commands'. Return True in that case or if a call stack
-        is unavailable. Return False otherwise.
-        """
-        if run_frame is None:
-            msg = "Call stack not available. bdist_* commands may fail."
-            SetuptoolsWarning.emit(msg)
-            if platform.python_implementation() == 'IronPython':
-                msg = "For best results, pass -X:Frames to enable call stack."
-                SetuptoolsWarning.emit(msg)
-            return True
-
-        frames = inspect.getouterframes(run_frame)
-        for frame in frames[2:4]:
-            (caller,) = frame[:1]
-            info = inspect.getframeinfo(caller)
-            caller_module = caller.f_globals.get('__name__', '')
-
-            if caller_module == "setuptools.dist" and info.function == "run_command":
-                # Starting from v61.0.0 setuptools overwrites dist.run_command
-                continue
-
-            return caller_module == 'distutils.dist' and info.function == 'run_commands'
-
-        return False
-
-
-# XXX Python 3.1 doesn't see _nc if this is inside the class
-install.sub_commands = [
-    cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc
-] + install.new_commands
diff --git a/voxvera/vendor/setuptools/command/install_egg_info.py b/voxvera/vendor/setuptools/command/install_egg_info.py
deleted file mode 100644
index 46138d2..0000000
--- a/voxvera/vendor/setuptools/command/install_egg_info.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import os
-
-from setuptools import Command, namespaces
-from setuptools.archive_util import unpack_archive
-
-from .._path import ensure_directory
-
-from distutils import dir_util, log
-
-
-class install_egg_info(namespaces.Installer, Command):
-    """Install an .egg-info directory for the package"""
-
-    description = "Install an .egg-info directory for the package"
-
-    user_options = [
-        ('install-dir=', 'd', "directory to install to"),
-    ]
-
-    def initialize_options(self):
-        self.install_dir = None
-
-    def finalize_options(self) -> None:
-        self.set_undefined_options('install_lib', ('install_dir', 'install_dir'))
-        ei_cmd = self.get_finalized_command("egg_info")
-        basename = f"{ei_cmd._get_egg_basename()}.egg-info"
-        self.source = ei_cmd.egg_info
-        self.target = os.path.join(self.install_dir, basename)
-        self.outputs: list[str] = []
-
-    def run(self) -> None:
-        self.run_command('egg_info')
-        if os.path.isdir(self.target) and not os.path.islink(self.target):
-            dir_util.remove_tree(self.target)
-        elif os.path.exists(self.target):
-            self.execute(os.unlink, (self.target,), "Removing " + self.target)
-        ensure_directory(self.target)
-        self.execute(self.copytree, (), f"Copying {self.source} to {self.target}")
-        self.install_namespaces()
-
-    def get_outputs(self):
-        return self.outputs
-
-    def copytree(self) -> None:
-        # Copy the .egg-info tree to site-packages
-        def skimmer(src, dst):
-            # filter out source-control directories; note that 'src' is always
-            # a '/'-separated path, regardless of platform.  'dst' is a
-            # platform-specific path.
-            for skip in '.svn/', 'CVS/':
-                if src.startswith(skip) or '/' + skip in src:
-                    return None
-            self.outputs.append(dst)
-            log.debug("Copying %s to %s", src, dst)
-            return dst
-
-        unpack_archive(self.source, self.target, skimmer)
diff --git a/voxvera/vendor/setuptools/command/install_lib.py b/voxvera/vendor/setuptools/command/install_lib.py
deleted file mode 100644
index 8e1e072..0000000
--- a/voxvera/vendor/setuptools/command/install_lib.py
+++ /dev/null
@@ -1,137 +0,0 @@
-from __future__ import annotations
-
-import os
-import sys
-from itertools import product, starmap
-
-from .._path import StrPath
-from ..dist import Distribution
-
-import distutils.command.install_lib as orig
-
-
-class install_lib(orig.install_lib):
-    """Don't add compiled flags to filenames of non-Python files"""
-
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-
-    def run(self) -> None:
-        self.build()
-        outfiles = self.install()
-        if outfiles is not None:
-            # always compile, in case we have any extension stubs to deal with
-            self.byte_compile(outfiles)
-
-    def get_exclusions(self):
-        """
-        Return a collections.Sized collections.Container of paths to be
-        excluded for single_version_externally_managed installations.
-        """
-        all_packages = (
-            pkg
-            for ns_pkg in self._get_SVEM_NSPs()
-            for pkg in self._all_packages(ns_pkg)
-        )
-
-        excl_specs = product(all_packages, self._gen_exclusion_paths())
-        return set(starmap(self._exclude_pkg_path, excl_specs))
-
-    def _exclude_pkg_path(self, pkg, exclusion_path):
-        """
-        Given a package name and exclusion path within that package,
-        compute the full exclusion path.
-        """
-        parts = pkg.split('.') + [exclusion_path]
-        return os.path.join(self.install_dir, *parts)
-
-    @staticmethod
-    def _all_packages(pkg_name):
-        """
-        >>> list(install_lib._all_packages('foo.bar.baz'))
-        ['foo.bar.baz', 'foo.bar', 'foo']
-        """
-        while pkg_name:
-            yield pkg_name
-            pkg_name, _sep, _child = pkg_name.rpartition('.')
-
-    def _get_SVEM_NSPs(self):
-        """
-        Get namespace packages (list) but only for
-        single_version_externally_managed installations and empty otherwise.
-        """
-        # TODO: is it necessary to short-circuit here? i.e. what's the cost
-        # if get_finalized_command is called even when namespace_packages is
-        # False?
-        if not self.distribution.namespace_packages:
-            return []
-
-        install_cmd = self.get_finalized_command('install')
-        svem = install_cmd.single_version_externally_managed
-
-        return self.distribution.namespace_packages if svem else []
-
-    @staticmethod
-    def _gen_exclusion_paths():
-        """
-        Generate file paths to be excluded for namespace packages (bytecode
-        cache files).
-        """
-        # always exclude the package module itself
-        yield '__init__.py'
-
-        yield '__init__.pyc'
-        yield '__init__.pyo'
-
-        if not hasattr(sys, 'implementation'):
-            return
-
-        base = os.path.join('__pycache__', '__init__.' + sys.implementation.cache_tag)
-        yield base + '.pyc'
-        yield base + '.pyo'
-        yield base + '.opt-1.pyc'
-        yield base + '.opt-2.pyc'
-
-    def copy_tree(
-        self,
-        infile: StrPath,
-        outfile: str,
-        # override: Using actual booleans
-        preserve_mode: bool = True,  # type: ignore[override]
-        preserve_times: bool = True,  # type: ignore[override]
-        preserve_symlinks: bool = False,  # type: ignore[override]
-        level: object = 1,
-    ) -> list[str]:
-        assert preserve_mode
-        assert preserve_times
-        assert not preserve_symlinks
-        exclude = self.get_exclusions()
-
-        if not exclude:
-            return orig.install_lib.copy_tree(self, infile, outfile)
-
-        # Exclude namespace package __init__.py* files from the output
-
-        from setuptools.archive_util import unpack_directory
-
-        from distutils import log
-
-        outfiles: list[str] = []
-
-        def pf(src: str, dst: str):
-            if dst in exclude:
-                log.warn("Skipping installation of %s (namespace package)", dst)
-                return False
-
-            log.info("copying %s -> %s", src, os.path.dirname(dst))
-            outfiles.append(dst)
-            return dst
-
-        unpack_directory(infile, outfile, pf)
-        return outfiles
-
-    def get_outputs(self):
-        outputs = orig.install_lib.get_outputs(self)
-        exclude = self.get_exclusions()
-        if exclude:
-            return [f for f in outputs if f not in exclude]
-        return outputs
diff --git a/voxvera/vendor/setuptools/command/install_scripts.py b/voxvera/vendor/setuptools/command/install_scripts.py
deleted file mode 100644
index 5d7d386..0000000
--- a/voxvera/vendor/setuptools/command/install_scripts.py
+++ /dev/null
@@ -1,66 +0,0 @@
-from __future__ import annotations
-
-import os
-import sys
-
-from .._path import ensure_directory
-from ..dist import Distribution
-
-import distutils.command.install_scripts as orig
-from distutils import log
-
-
-class install_scripts(orig.install_scripts):
-    """Do normal script install, plus any egg_info wrapper scripts"""
-
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-
-    def initialize_options(self) -> None:
-        orig.install_scripts.initialize_options(self)
-        self.no_ep = False
-
-    def run(self) -> None:
-        self.run_command("egg_info")
-        if self.distribution.scripts:
-            orig.install_scripts.run(self)  # run first to set up self.outfiles
-        else:
-            self.outfiles: list[str] = []
-        if self.no_ep:
-            # don't install entry point scripts into .egg file!
-            return
-        self._install_ep_scripts()
-
-    def _install_ep_scripts(self):
-        # Delay import side-effects
-        from .. import _scripts
-        from .._importlib import metadata
-
-        ei_cmd = self.get_finalized_command("egg_info")
-        dist = metadata.Distribution.at(path=ei_cmd.egg_info)
-        bs_cmd = self.get_finalized_command('build_scripts')
-        exec_param = getattr(bs_cmd, 'executable', None)
-        writer = _scripts.ScriptWriter
-        if exec_param == sys.executable:
-            # In case the path to the Python executable contains a space, wrap
-            # it so it's not split up.
-            exec_param = [exec_param]
-        # resolve the writer to the environment
-        writer = writer.best()
-        cmd = writer.command_spec_class.best().from_param(exec_param)
-        for args in writer.get_args(dist, cmd.as_header()):
-            self.write_script(*args)
-
-    def write_script(self, script_name, contents, mode: str = "t", *ignored) -> None:
-        """Write an executable file to the scripts directory"""
-        from .._shutil import attempt_chmod_verbose as chmod, current_umask
-
-        log.info("Installing %s script to %s", script_name, self.install_dir)
-        target = os.path.join(self.install_dir, script_name)
-        self.outfiles.append(target)
-
-        encoding = None if "b" in mode else "utf-8"
-        mask = current_umask()
-        ensure_directory(target)
-        with open(target, "w" + mode, encoding=encoding) as f:
-            f.write(contents)
-        chmod(target, 0o777 - mask)
diff --git a/voxvera/vendor/setuptools/command/rotate.py b/voxvera/vendor/setuptools/command/rotate.py
deleted file mode 100644
index 9ff72f5..0000000
--- a/voxvera/vendor/setuptools/command/rotate.py
+++ /dev/null
@@ -1,64 +0,0 @@
-from __future__ import annotations
-
-import os
-from typing import ClassVar
-
-from .. import Command, _shutil
-
-from distutils import log
-from distutils.errors import DistutilsOptionError
-from distutils.util import convert_path
-
-
-class rotate(Command):
-    """Delete older distributions"""
-
-    description = "delete older distributions, keeping N newest files"
-    user_options = [
-        ('match=', 'm', "patterns to match (required)"),
-        ('dist-dir=', 'd', "directory where the distributions are"),
-        ('keep=', 'k', "number of matching distributions to keep"),
-    ]
-
-    boolean_options: ClassVar[list[str]] = []
-
-    def initialize_options(self):
-        self.match = None
-        self.dist_dir = None
-        self.keep = None
-
-    def finalize_options(self) -> None:
-        if self.match is None:
-            raise DistutilsOptionError(
-                "Must specify one or more (comma-separated) match patterns "
-                "(e.g. '.zip' or '.egg')"
-            )
-        if self.keep is None:
-            raise DistutilsOptionError("Must specify number of files to keep")
-        try:
-            self.keep = int(self.keep)
-        except ValueError as e:
-            raise DistutilsOptionError("--keep must be an integer") from e
-        if isinstance(self.match, str):
-            self.match = [convert_path(p.strip()) for p in self.match.split(',')]
-        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
-
-    def run(self) -> None:
-        self.run_command("egg_info")
-        from glob import glob
-
-        for pattern in self.match:
-            pattern = self.distribution.get_name() + '*' + pattern
-            files = glob(os.path.join(self.dist_dir, pattern))
-            files = [(os.path.getmtime(f), f) for f in files]
-            files.sort()
-            files.reverse()
-
-            log.info("%d file(s) matching %s", len(files), pattern)
-            files = files[self.keep :]
-            for t, f in files:
-                log.info("Deleting %s", f)
-                if os.path.isdir(f):
-                    _shutil.rmtree(f)
-                else:
-                    os.unlink(f)
diff --git a/voxvera/vendor/setuptools/command/saveopts.py b/voxvera/vendor/setuptools/command/saveopts.py
deleted file mode 100644
index 76c3cdb..0000000
--- a/voxvera/vendor/setuptools/command/saveopts.py
+++ /dev/null
@@ -1,21 +0,0 @@
-from setuptools.command.setopt import edit_config, option_base
-
-
-class saveopts(option_base):
-    """Save command-line options to a file"""
-
-    description = "save supplied options to setup.cfg or other config file"
-
-    def run(self) -> None:
-        dist = self.distribution
-        settings: dict[str, dict[str, str]] = {}
-
-        for cmd in dist.command_options:
-            if cmd == 'saveopts':
-                continue  # don't save our own options!
-
-            for opt, (src, val) in dist.get_option_dict(cmd).items():
-                if src == "command line":
-                    settings.setdefault(cmd, {})[opt] = val
-
-        edit_config(self.filename, settings)
diff --git a/voxvera/vendor/setuptools/command/sdist.py b/voxvera/vendor/setuptools/command/sdist.py
deleted file mode 100644
index 17279ac..0000000
--- a/voxvera/vendor/setuptools/command/sdist.py
+++ /dev/null
@@ -1,218 +0,0 @@
-from __future__ import annotations
-
-import contextlib
-import os
-import re
-from collections.abc import Iterator
-from itertools import chain
-from typing import ClassVar
-
-from .._importlib import metadata
-from ..dist import Distribution
-from .build import _ORIGINAL_SUBCOMMANDS
-
-import distutils.command.sdist as orig
-from distutils import log
-
-_default_revctrl = list
-
-
-def walk_revctrl(dirname='') -> Iterator:
-    """Find all files under revision control"""
-    for ep in metadata.entry_points(group='setuptools.file_finders'):
-        yield from ep.load()(dirname)
-
-
-class sdist(orig.sdist):
-    """Smart sdist that finds anything supported by revision control"""
-
-    user_options = [
-        ('formats=', None, "formats for source distribution (comma-separated list)"),
-        (
-            'keep-temp',
-            'k',
-            "keep the distribution tree around after creating archive file(s)",
-        ),
-        (
-            'dist-dir=',
-            'd',
-            "directory to put the source distribution archive(s) in [default: dist]",
-        ),
-        (
-            'owner=',
-            'u',
-            "Owner name used when creating a tar file [default: current user]",
-        ),
-        (
-            'group=',
-            'g',
-            "Group name used when creating a tar file [default: current group]",
-        ),
-    ]
-
-    distribution: Distribution  # override distutils.dist.Distribution with setuptools.dist.Distribution
-    negative_opt: ClassVar[dict[str, str]] = {}
-
-    README_EXTENSIONS = ['', '.rst', '.txt', '.md']
-    READMES = tuple(f'README{ext}' for ext in README_EXTENSIONS)
-
-    def run(self) -> None:
-        self.run_command('egg_info')
-        ei_cmd = self.get_finalized_command('egg_info')
-        self.filelist = ei_cmd.filelist
-        self.filelist.append(os.path.join(ei_cmd.egg_info, 'SOURCES.txt'))
-        self.check_readme()
-
-        # Run sub commands
-        for cmd_name in self.get_sub_commands():
-            self.run_command(cmd_name)
-
-        self.make_distribution()
-
-        dist_files = getattr(self.distribution, 'dist_files', [])
-        for file in self.archive_files:
-            data = ('sdist', '', file)
-            if data not in dist_files:
-                dist_files.append(data)
-
-    def initialize_options(self) -> None:
-        orig.sdist.initialize_options(self)
-
-    def make_distribution(self) -> None:
-        """
-        Workaround for #516
-        """
-        with self._remove_os_link():
-            orig.sdist.make_distribution(self)
-
-    @staticmethod
-    @contextlib.contextmanager
-    def _remove_os_link():
-        """
-        In a context, remove and restore os.link if it exists
-        """
-
-        class NoValue:
-            pass
-
-        orig_val = getattr(os, 'link', NoValue)
-        try:
-            del os.link
-        except Exception:
-            pass
-        try:
-            yield
-        finally:
-            if orig_val is not NoValue:
-                os.link = orig_val
-
-    def add_defaults(self) -> None:
-        super().add_defaults()
-        self._add_defaults_build_sub_commands()
-
-    def _add_defaults_optional(self):
-        super()._add_defaults_optional()
-        if os.path.isfile('pyproject.toml'):
-            self.filelist.append('pyproject.toml')
-
-    def _add_defaults_python(self):
-        """getting python files"""
-        if self.distribution.has_pure_modules():
-            build_py = self.get_finalized_command('build_py')
-            self.filelist.extend(build_py.get_source_files())
-            self._add_data_files(self._safe_data_files(build_py))
-
-    def _add_defaults_build_sub_commands(self):
-        build = self.get_finalized_command("build")
-        missing_cmds = set(build.get_sub_commands()) - _ORIGINAL_SUBCOMMANDS
-        # ^-- the original built-in sub-commands are already handled by default.
-        cmds = (self.get_finalized_command(c) for c in missing_cmds)
-        files = (c.get_source_files() for c in cmds if hasattr(c, "get_source_files"))
-        self.filelist.extend(chain.from_iterable(files))
-
-    def _safe_data_files(self, build_py):
-        """
-        Since the ``sdist`` class is also used to compute the MANIFEST
-        (via :obj:`setuptools.command.egg_info.manifest_maker`),
-        there might be recursion problems when trying to obtain the list of
-        data_files and ``include_package_data=True`` (which in turn depends on
-        the files included in the MANIFEST).
-
-        To avoid that, ``manifest_maker`` should be able to overwrite this
-        method and avoid recursive attempts to build/analyze the MANIFEST.
-        """
-        return build_py.data_files
-
-    def _add_data_files(self, data_files):
-        """
-        Add data files as found in build_py.data_files.
-        """
-        self.filelist.extend(
-            os.path.join(src_dir, name)
-            for _, src_dir, _, filenames in data_files
-            for name in filenames
-        )
-
-    def _add_defaults_data_files(self):
-        try:
-            super()._add_defaults_data_files()
-        except TypeError:
-            log.warn("data_files contains unexpected objects")
-
-    def prune_file_list(self) -> None:
-        super().prune_file_list()
-        # Prevent accidental inclusion of test-related cache dirs at the project root
-        sep = re.escape(os.sep)
-        self.filelist.exclude_pattern(r"^(\.tox|\.nox|\.venv)" + sep, is_regex=True)
-
-    def check_readme(self) -> None:
-        for f in self.READMES:
-            if os.path.exists(f):
-                return
-        else:
-            self.warn(
-                "standard file not found: should have one of " + ', '.join(self.READMES)
-            )
-
-    def make_release_tree(self, base_dir, files) -> None:
-        orig.sdist.make_release_tree(self, base_dir, files)
-
-        # Save any egg_info command line options used to create this sdist
-        dest = os.path.join(base_dir, 'setup.cfg')
-        if hasattr(os, 'link') and os.path.exists(dest):
-            # unlink and re-copy, since it might be hard-linked, and
-            # we don't want to change the source version
-            os.unlink(dest)
-            self.copy_file('setup.cfg', dest)
-
-        self.get_finalized_command('egg_info').save_version_info(dest)
-
-    def _manifest_is_not_generated(self):
-        # check for special comment used in 2.7.1 and higher
-        if not os.path.isfile(self.manifest):
-            return False
-
-        with open(self.manifest, 'rb') as fp:
-            first_line = fp.readline()
-        return first_line != b'# file GENERATED by distutils, do NOT edit\n'
-
-    def read_manifest(self) -> None:
-        """Read the manifest file (named by 'self.manifest') and use it to
-        fill in 'self.filelist', the list of files to include in the source
-        distribution.
-        """
-        log.info("reading manifest file '%s'", self.manifest)
-        manifest = open(self.manifest, 'rb')
-        for bytes_line in manifest:
-            # The manifest must contain UTF-8. See #303.
-            try:
-                line = bytes_line.decode('UTF-8')
-            except UnicodeDecodeError:
-                log.warn(f"{line!r} not UTF-8 decodable -- skipping")
-                continue
-            # ignore comments and blank lines
-            line = line.strip()
-            if line.startswith('#') or not line:
-                continue
-            self.filelist.append(line)
-        manifest.close()
diff --git a/voxvera/vendor/setuptools/command/setopt.py b/voxvera/vendor/setuptools/command/setopt.py
deleted file mode 100644
index 349041e..0000000
--- a/voxvera/vendor/setuptools/command/setopt.py
+++ /dev/null
@@ -1,139 +0,0 @@
-import configparser
-import os
-
-from .. import Command
-from ..unicode_utils import _cfg_read_utf8_with_fallback
-
-import distutils
-from distutils import log
-from distutils.errors import DistutilsOptionError
-from distutils.util import convert_path
-
-__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']
-
-
-def config_file(kind="local"):
-    """Get the filename of the distutils, local, global, or per-user config
-
-    `kind` must be one of "local", "global", or "user"
-    """
-    if kind == 'local':
-        return 'setup.cfg'
-    if kind == 'global':
-        return os.path.join(os.path.dirname(distutils.__file__), 'distutils.cfg')
-    if kind == 'user':
-        dot = os.name == 'posix' and '.' or ''
-        return os.path.expanduser(convert_path(f"~/{dot}pydistutils.cfg"))
-    raise ValueError("config_file() type must be 'local', 'global', or 'user'", kind)
-
-
-def edit_config(filename, settings) -> None:
-    """Edit a configuration file to include `settings`
-
-    `settings` is a dictionary of dictionaries or ``None`` values, keyed by
-    command/section name.  A ``None`` value means to delete the entire section,
-    while a dictionary lists settings to be changed or deleted in that section.
-    A setting of ``None`` means to delete that setting.
-    """
-    log.debug("Reading configuration from %s", filename)
-    opts = configparser.RawConfigParser()
-    opts.optionxform = lambda optionstr: optionstr  # type: ignore[method-assign] # overriding method
-    _cfg_read_utf8_with_fallback(opts, filename)
-
-    for section, options in settings.items():
-        if options is None:
-            log.info("Deleting section [%s] from %s", section, filename)
-            opts.remove_section(section)
-        else:
-            if not opts.has_section(section):
-                log.debug("Adding new section [%s] to %s", section, filename)
-                opts.add_section(section)
-            for option, value in options.items():
-                if value is None:
-                    log.debug("Deleting %s.%s from %s", section, option, filename)
-                    opts.remove_option(section, option)
-                    if not opts.options(section):
-                        log.info(
-                            "Deleting empty [%s] section from %s", section, filename
-                        )
-                        opts.remove_section(section)
-                else:
-                    log.debug(
-                        "Setting %s.%s to %r in %s", section, option, value, filename
-                    )
-                    opts.set(section, option, value)
-
-    log.info("Writing %s", filename)
-    with open(filename, 'w', encoding="utf-8") as f:
-        opts.write(f)
-
-
-class option_base(Command):
-    """Abstract base class for commands that mess with config files"""
-
-    user_options = [
-        ('global-config', 'g', "save options to the site-wide distutils.cfg file"),
-        ('user-config', 'u', "save options to the current user's pydistutils.cfg file"),
-        ('filename=', 'f', "configuration file to use (default=setup.cfg)"),
-    ]
-
-    boolean_options = [
-        'global-config',
-        'user-config',
-    ]
-
-    def initialize_options(self):
-        self.global_config = None
-        self.user_config = None
-        self.filename = None
-
-    def finalize_options(self) -> None:
-        filenames = []
-        if self.global_config:
-            filenames.append(config_file('global'))
-        if self.user_config:
-            filenames.append(config_file('user'))
-        if self.filename is not None:
-            filenames.append(self.filename)
-        if not filenames:
-            filenames.append(config_file('local'))
-        if len(filenames) > 1:
-            raise DistutilsOptionError(
-                "Must specify only one configuration file option", filenames
-            )
-        (self.filename,) = filenames
-
-
-class setopt(option_base):
-    """Save command-line options to a file"""
-
-    description = "set an option in setup.cfg or another config file"
-
-    user_options = [
-        ('command=', 'c', 'command to set an option for'),
-        ('option=', 'o', 'option to set'),
-        ('set-value=', 's', 'value of the option'),
-        ('remove', 'r', 'remove (unset) the value'),
-    ] + option_base.user_options
-
-    boolean_options = option_base.boolean_options + ['remove']
-
-    def initialize_options(self):
-        option_base.initialize_options(self)
-        self.command = None
-        self.option = None
-        self.set_value = None
-        self.remove = None
-
-    def finalize_options(self) -> None:
-        option_base.finalize_options(self)
-        if self.command is None or self.option is None:
-            raise DistutilsOptionError("Must specify --command *and* --option")
-        if self.set_value is None and not self.remove:
-            raise DistutilsOptionError("Must specify --set-value or --remove")
-
-    def run(self) -> None:
-        edit_config(
-            self.filename,
-            {self.command: {self.option.replace('-', '_'): self.set_value}},
-        )
diff --git a/voxvera/vendor/setuptools/command/test.py b/voxvera/vendor/setuptools/command/test.py
deleted file mode 100644
index 5d03c91..0000000
--- a/voxvera/vendor/setuptools/command/test.py
+++ /dev/null
@@ -1,47 +0,0 @@
-from __future__ import annotations
-
-from typing import NoReturn
-
-from setuptools import Command
-from setuptools.warnings import SetuptoolsDeprecationWarning
-
-
-# Would restrict to Literal["test"], but mypy doesn't support it: https://github.com/python/mypy/issues/8203
-def __getattr__(name: str) -> type[_test]:
-    if name == 'test':
-        SetuptoolsDeprecationWarning.emit(
-            "The test command is disabled and references to it are deprecated.",
-            "Please remove any references to `setuptools.command.test` in all "
-            "supported versions of the affected package.",
-            due_date=(2024, 11, 15),
-            stacklevel=2,
-        )
-        return _test
-    raise AttributeError(name)
-
-
-class _test(Command):
-    """
-    Stub to warn when test command is referenced or used.
-    """
-
-    description = "stub for old test command (do not use)"
-
-    user_options = [
-        ('test-module=', 'm', "Run 'test_suite' in specified module"),
-        (
-            'test-suite=',
-            's',
-            "Run single test, case or suite (e.g. 'module.test_suite')",
-        ),
-        ('test-runner=', 'r', "Test runner to use"),
-    ]
-
-    def initialize_options(self) -> None:
-        pass
-
-    def finalize_options(self) -> None:
-        pass
-
-    def run(self) -> NoReturn:
-        raise RuntimeError("Support for the test command was removed in Setuptools 72")
diff --git a/voxvera/vendor/setuptools/compat/__init__.py b/voxvera/vendor/setuptools/compat/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/compat/py310.py b/voxvera/vendor/setuptools/compat/py310.py
deleted file mode 100644
index 58a4d9f..0000000
--- a/voxvera/vendor/setuptools/compat/py310.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import sys
-
-__all__ = ['tomllib']
-
-
-if sys.version_info >= (3, 11):
-    import tomllib
-else:  # pragma: no cover
-    import tomli as tomllib
-
-
-if sys.version_info >= (3, 11):
-
-    def add_note(ex, note):
-        ex.add_note(note)
-
-else:  # pragma: no cover
-
-    def add_note(ex, note):
-        vars(ex).setdefault('__notes__', []).append(note)
diff --git a/voxvera/vendor/setuptools/compat/py311.py b/voxvera/vendor/setuptools/compat/py311.py
deleted file mode 100644
index 52b58af..0000000
--- a/voxvera/vendor/setuptools/compat/py311.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from __future__ import annotations
-
-import shutil
-import sys
-from typing import TYPE_CHECKING, Any, Callable
-
-if TYPE_CHECKING:
-    from _typeshed import ExcInfo, StrOrBytesPath
-    from typing_extensions import TypeAlias
-
-# Same as shutil._OnExcCallback from typeshed
-_OnExcCallback: TypeAlias = Callable[[Callable[..., Any], str, BaseException], object]
-
-
-def shutil_rmtree(
-    path: StrOrBytesPath,
-    ignore_errors: bool = False,
-    onexc: _OnExcCallback | None = None,
-) -> None:
-    if sys.version_info >= (3, 12):
-        return shutil.rmtree(path, ignore_errors, onexc=onexc)
-
-    def _handler(fn: Callable[..., Any], path: str, excinfo: ExcInfo) -> None:
-        if onexc:
-            onexc(fn, path, excinfo[1])
-
-    return shutil.rmtree(path, ignore_errors, onerror=_handler)
diff --git a/voxvera/vendor/setuptools/compat/py312.py b/voxvera/vendor/setuptools/compat/py312.py
deleted file mode 100644
index b20c5f6..0000000
--- a/voxvera/vendor/setuptools/compat/py312.py
+++ /dev/null
@@ -1,13 +0,0 @@
-from __future__ import annotations
-
-import sys
-
-if sys.version_info >= (3, 12, 4):
-    # Python 3.13 should support `.pth` files encoded in UTF-8
-    # See discussion in https://github.com/python/cpython/issues/77102
-    PTH_ENCODING: str | None = "utf-8"
-else:
-    from .py39 import LOCALE_ENCODING
-
-    # PTH_ENCODING = "locale"
-    PTH_ENCODING = LOCALE_ENCODING
diff --git a/voxvera/vendor/setuptools/compat/py39.py b/voxvera/vendor/setuptools/compat/py39.py
deleted file mode 100644
index 04a4abe..0000000
--- a/voxvera/vendor/setuptools/compat/py39.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import sys
-
-# Explicitly use the ``"locale"`` encoding in versions that support it,
-# otherwise just rely on the implicit handling of ``encoding=None``.
-# Since all platforms that support ``EncodingWarning`` also support
-# ``encoding="locale"``, this can be used to suppress the warning.
-# However, please try to use UTF-8 when possible
-# (.pth files are the notorious exception: python/cpython#77102, pypa/setuptools#3937).
-LOCALE_ENCODING = "locale" if sys.version_info >= (3, 10) else None
diff --git a/voxvera/vendor/setuptools/config/NOTICE b/voxvera/vendor/setuptools/config/NOTICE
deleted file mode 100644
index 0186451..0000000
--- a/voxvera/vendor/setuptools/config/NOTICE
+++ /dev/null
@@ -1,10 +0,0 @@
-The following files include code from opensource projects
-(either as direct copies or modified versions):
-
-- `setuptools.schema.json`, `distutils.schema.json`:
-    - project: `validate-pyproject` - licensed under MPL-2.0
-      (https://github.com/abravalheri/validate-pyproject):
-
-      This Source Code Form is subject to the terms of the Mozilla Public
-      License, v. 2.0. If a copy of the MPL was not distributed with this file,
-      You can obtain one at https://mozilla.org/MPL/2.0/.
diff --git a/voxvera/vendor/setuptools/config/__init__.py b/voxvera/vendor/setuptools/config/__init__.py
deleted file mode 100644
index fcc7d00..0000000
--- a/voxvera/vendor/setuptools/config/__init__.py
+++ /dev/null
@@ -1,43 +0,0 @@
-"""For backward compatibility, expose main functions from
-``setuptools.config.setupcfg``
-"""
-
-from functools import wraps
-from typing import Callable, TypeVar, cast
-
-from ..warnings import SetuptoolsDeprecationWarning
-from . import setupcfg
-
-Fn = TypeVar("Fn", bound=Callable)
-
-__all__ = ('parse_configuration', 'read_configuration')
-
-
-def _deprecation_notice(fn: Fn) -> Fn:
-    @wraps(fn)
-    def _wrapper(*args, **kwargs):
-        SetuptoolsDeprecationWarning.emit(
-            "Deprecated API usage.",
-            f"""
-            As setuptools moves its configuration towards `pyproject.toml`,
-            `{__name__}.{fn.__name__}` became deprecated.
-
-            For the time being, you can use the `{setupcfg.__name__}` module
-            to access a backward compatible API, but this module is provisional
-            and might be removed in the future.
-
-            To read project metadata, consider using
-            ``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
-            For simple scenarios, you can also try parsing the file directly
-            with the help of ``configparser``.
-            """,
-            # due_date not defined yet, because the community still heavily relies on it
-            # Warning introduced in 24 Mar 2022
-        )
-        return fn(*args, **kwargs)
-
-    return cast(Fn, _wrapper)
-
-
-read_configuration = _deprecation_notice(setupcfg.read_configuration)
-parse_configuration = _deprecation_notice(setupcfg.parse_configuration)
diff --git a/voxvera/vendor/setuptools/config/_apply_pyprojecttoml.py b/voxvera/vendor/setuptools/config/_apply_pyprojecttoml.py
deleted file mode 100644
index 4559193..0000000
--- a/voxvera/vendor/setuptools/config/_apply_pyprojecttoml.py
+++ /dev/null
@@ -1,534 +0,0 @@
-"""Translation layer between pyproject config and setuptools distribution and
-metadata objects.
-
-The distribution and metadata objects are modeled after (an old version of)
-core metadata, therefore configs in the format specified for ``pyproject.toml``
-need to be processed before being applied.
-
-**PRIVATE MODULE**: API reserved for setuptools internal usage only.
-"""
-
-from __future__ import annotations
-
-import logging
-import os
-from collections.abc import Mapping
-from email.headerregistry import Address
-from functools import partial, reduce
-from inspect import cleandoc
-from itertools import chain
-from types import MappingProxyType
-from typing import TYPE_CHECKING, Any, Callable, TypeVar, Union
-
-from .. import _static
-from .._path import StrPath
-from ..errors import InvalidConfigError, RemovedConfigError
-from ..extension import Extension
-from ..warnings import SetuptoolsDeprecationWarning, SetuptoolsWarning
-
-if TYPE_CHECKING:
-    from typing_extensions import TypeAlias
-
-    from setuptools._importlib import metadata
-    from setuptools.dist import Distribution
-
-    from distutils.dist import _OptionsList  # Comes from typeshed
-
-
-EMPTY: Mapping = MappingProxyType({})  # Immutable dict-like
-_ProjectReadmeValue: TypeAlias = Union[str, dict[str, str]]
-_Correspondence: TypeAlias = Callable[["Distribution", Any, Union[StrPath, None]], None]
-_T = TypeVar("_T")
-
-_logger = logging.getLogger(__name__)
-
-
-def apply(dist: Distribution, config: dict, filename: StrPath) -> Distribution:
-    """Apply configuration dict read with :func:`read_configuration`"""
-
-    if not config:
-        return dist  # short-circuit unrelated pyproject.toml file
-
-    root_dir = os.path.dirname(filename) or "."
-
-    _apply_project_table(dist, config, root_dir)
-    _apply_tool_table(dist, config, filename)
-
-    current_directory = os.getcwd()
-    os.chdir(root_dir)
-    try:
-        dist._finalize_requires()
-        dist._finalize_license_expression()
-        dist._finalize_license_files()
-    finally:
-        os.chdir(current_directory)
-
-    return dist
-
-
-def _apply_project_table(dist: Distribution, config: dict, root_dir: StrPath):
-    orig_config = config.get("project", {})
-    if not orig_config:
-        return  # short-circuit
-
-    project_table = {k: _static.attempt_conversion(v) for k, v in orig_config.items()}
-    _handle_missing_dynamic(dist, project_table)
-    _unify_entry_points(project_table)
-
-    for field, value in project_table.items():
-        norm_key = json_compatible_key(field)
-        corresp = PYPROJECT_CORRESPONDENCE.get(norm_key, norm_key)
-        if callable(corresp):
-            corresp(dist, value, root_dir)
-        else:
-            _set_config(dist, corresp, value)
-
-
-def _apply_tool_table(dist: Distribution, config: dict, filename: StrPath):
-    tool_table = config.get("tool", {}).get("setuptools", {})
-    if not tool_table:
-        return  # short-circuit
-
-    if "license-files" in tool_table:
-        if "license-files" in config.get("project", {}):
-            # https://github.com/pypa/setuptools/pull/4837#discussion_r2004983349
-            raise InvalidConfigError(
-                "'project.license-files' is defined already. "
-                "Remove 'tool.setuptools.license-files'."
-            )
-
-        pypa_guides = "guides/writing-pyproject-toml/#license-files"
-        SetuptoolsDeprecationWarning.emit(
-            "'tool.setuptools.license-files' is deprecated in favor of "
-            "'project.license-files' (available on setuptools>=77.0.0).",
-            see_url=f"https://packaging.python.org/en/latest/{pypa_guides}",
-            due_date=(2027, 2, 18),  # Warning introduced on 2025-02-18
-        )
-
-    for field, value in tool_table.items():
-        norm_key = json_compatible_key(field)
-
-        if norm_key in TOOL_TABLE_REMOVALS:
-            suggestion = cleandoc(TOOL_TABLE_REMOVALS[norm_key])
-            msg = f"""
-            The parameter `tool.setuptools.{field}` was long deprecated
-            and has been removed from `pyproject.toml`.
-            """
-            raise RemovedConfigError("\n".join([cleandoc(msg), suggestion]))
-
-        norm_key = TOOL_TABLE_RENAMES.get(norm_key, norm_key)
-        corresp = TOOL_TABLE_CORRESPONDENCE.get(norm_key, norm_key)
-        if callable(corresp):
-            corresp(dist, value)
-        else:
-            _set_config(dist, corresp, value)
-
-    _copy_command_options(config, dist, filename)
-
-
-def _handle_missing_dynamic(dist: Distribution, project_table: dict):
-    """Be temporarily forgiving with ``dynamic`` fields not listed in ``dynamic``"""
-    dynamic = set(project_table.get("dynamic", []))
-    for field, getter in _PREVIOUSLY_DEFINED.items():
-        if not (field in project_table or field in dynamic):
-            value = getter(dist)
-            if value:
-                _MissingDynamic.emit(field=field, value=value)
-                project_table[field] = _RESET_PREVIOUSLY_DEFINED.get(field)
-
-
-def json_compatible_key(key: str) -> str:
-    """As defined in :pep:`566#json-compatible-metadata`"""
-    return key.lower().replace("-", "_")
-
-
-def _set_config(dist: Distribution, field: str, value: Any):
-    val = _PREPROCESS.get(field, _noop)(dist, value)
-    setter = getattr(dist.metadata, f"set_{field}", None)
-    if setter:
-        setter(val)
-    elif hasattr(dist.metadata, field) or field in SETUPTOOLS_PATCHES:
-        setattr(dist.metadata, field, val)
-    else:
-        setattr(dist, field, val)
-
-
-_CONTENT_TYPES = {
-    ".md": "text/markdown",
-    ".rst": "text/x-rst",
-    ".txt": "text/plain",
-}
-
-
-def _guess_content_type(file: str) -> str | None:
-    _, ext = os.path.splitext(file.lower())
-    if not ext:
-        return None
-
-    if ext in _CONTENT_TYPES:
-        return _static.Str(_CONTENT_TYPES[ext])
-
-    valid = ", ".join(f"{k} ({v})" for k, v in _CONTENT_TYPES.items())
-    msg = f"only the following file extensions are recognized: {valid}."
-    raise ValueError(f"Undefined content type for {file}, {msg}")
-
-
-def _long_description(
-    dist: Distribution, val: _ProjectReadmeValue, root_dir: StrPath | None
-):
-    from setuptools.config import expand
-
-    file: str | tuple[()]
-    if isinstance(val, str):
-        file = val
-        text = expand.read_files(file, root_dir)
-        ctype = _guess_content_type(file)
-    else:
-        file = val.get("file") or ()
-        text = val.get("text") or expand.read_files(file, root_dir)
-        ctype = val["content-type"]
-
-    # XXX: Is it completely safe to assume static?
-    _set_config(dist, "long_description", _static.Str(text))
-
-    if ctype:
-        _set_config(dist, "long_description_content_type", _static.Str(ctype))
-
-    if file:
-        dist._referenced_files.add(file)
-
-
-def _license(dist: Distribution, val: str | dict, root_dir: StrPath | None):
-    from setuptools.config import expand
-
-    if isinstance(val, str):
-        if getattr(dist.metadata, "license", None):
-            SetuptoolsWarning.emit("`license` overwritten by `pyproject.toml`")
-            dist.metadata.license = None
-        _set_config(dist, "license_expression", _static.Str(val))
-    else:
-        pypa_guides = "guides/writing-pyproject-toml/#license"
-        SetuptoolsDeprecationWarning.emit(
-            "`project.license` as a TOML table is deprecated",
-            "Please use a simple string containing a SPDX expression for "
-            "`project.license`. You can also use `project.license-files`. "
-            "(Both options available on setuptools>=77.0.0).",
-            see_url=f"https://packaging.python.org/en/latest/{pypa_guides}",
-            due_date=(2027, 2, 18),  # Introduced on 2025-02-18
-        )
-        if "file" in val:
-            # XXX: Is it completely safe to assume static?
-            value = expand.read_files([val["file"]], root_dir)
-            _set_config(dist, "license", _static.Str(value))
-            dist._referenced_files.add(val["file"])
-        else:
-            _set_config(dist, "license", _static.Str(val["text"]))
-
-
-def _people(dist: Distribution, val: list[dict], _root_dir: StrPath | None, kind: str):
-    field = []
-    email_field = []
-    for person in val:
-        if "name" not in person:
-            email_field.append(person["email"])
-        elif "email" not in person:
-            field.append(person["name"])
-        else:
-            addr = Address(display_name=person["name"], addr_spec=person["email"])
-            email_field.append(str(addr))
-
-    if field:
-        _set_config(dist, kind, _static.Str(", ".join(field)))
-    if email_field:
-        _set_config(dist, f"{kind}_email", _static.Str(", ".join(email_field)))
-
-
-def _project_urls(dist: Distribution, val: dict, _root_dir: StrPath | None):
-    _set_config(dist, "project_urls", val)
-
-
-def _python_requires(dist: Distribution, val: str, _root_dir: StrPath | None):
-    _set_config(dist, "python_requires", _static.SpecifierSet(val))
-
-
-def _dependencies(dist: Distribution, val: list, _root_dir: StrPath | None):
-    if getattr(dist, "install_requires", []):
-        msg = "`install_requires` overwritten in `pyproject.toml` (dependencies)"
-        SetuptoolsWarning.emit(msg)
-    dist.install_requires = val
-
-
-def _optional_dependencies(dist: Distribution, val: dict, _root_dir: StrPath | None):
-    if getattr(dist, "extras_require", None):
-        msg = "`extras_require` overwritten in `pyproject.toml` (optional-dependencies)"
-        SetuptoolsWarning.emit(msg)
-    dist.extras_require = val
-
-
-def _ext_modules(dist: Distribution, val: list[dict]) -> list[Extension]:
-    existing = dist.ext_modules or []
-    args = ({k.replace("-", "_"): v for k, v in x.items()} for x in val)
-    new = (Extension(**_adjust_ext_attrs(kw)) for kw in args)
-    return [*existing, *new]
-
-
-def _adjust_ext_attrs(attrs: dict) -> dict:
-    # https://github.com/pypa/setuptools/issues/4810
-    # In TOML there is no differentiation between tuples and lists,
-    # and distutils requires tuples...
-    attrs["define_macros"] = list(map(tuple, attrs.get("define_macros") or []))
-    return attrs
-
-
-def _noop(_dist: Distribution, val: _T) -> _T:
-    return val
-
-
-def _identity(val: _T) -> _T:
-    return val
-
-
-def _unify_entry_points(project_table: dict):
-    project = project_table
-    given = project.pop("entry-points", project.pop("entry_points", {}))
-    entry_points = dict(given)  # Avoid problems with static
-    renaming = {"scripts": "console_scripts", "gui_scripts": "gui_scripts"}
-    for key, value in list(project.items()):  # eager to allow modifications
-        norm_key = json_compatible_key(key)
-        if norm_key in renaming:
-            # Don't skip even if value is empty (reason: reset missing `dynamic`)
-            entry_points[renaming[norm_key]] = project.pop(key)
-
-    if entry_points:
-        project["entry-points"] = {
-            name: [f"{k} = {v}" for k, v in group.items()]
-            for name, group in entry_points.items()
-            if group  # now we can skip empty groups
-        }
-        # Sometimes this will set `project["entry-points"] = {}`, and that is
-        # intentional (for resetting configurations that are missing `dynamic`).
-
-
-def _copy_command_options(pyproject: dict, dist: Distribution, filename: StrPath):
-    tool_table = pyproject.get("tool", {})
-    cmdclass = tool_table.get("setuptools", {}).get("cmdclass", {})
-    valid_options = _valid_command_options(cmdclass)
-
-    cmd_opts = dist.command_options
-    for cmd, config in pyproject.get("tool", {}).get("distutils", {}).items():
-        cmd = json_compatible_key(cmd)
-        valid = valid_options.get(cmd, set())
-        cmd_opts.setdefault(cmd, {})
-        for key, value in config.items():
-            key = json_compatible_key(key)
-            cmd_opts[cmd][key] = (str(filename), value)
-            if key not in valid:
-                # To avoid removing options that are specified dynamically we
-                # just log a warn...
-                _logger.warning(f"Command option {cmd}.{key} is not defined")
-
-
-def _valid_command_options(cmdclass: Mapping = EMPTY) -> dict[str, set[str]]:
-    from setuptools.dist import Distribution
-
-    from .._importlib import metadata
-
-    valid_options = {"global": _normalise_cmd_options(Distribution.global_options)}
-
-    unloaded_entry_points = metadata.entry_points(group='distutils.commands')
-    loaded_entry_points = (_load_ep(ep) for ep in unloaded_entry_points)
-    entry_points = (ep for ep in loaded_entry_points if ep)
-    for cmd, cmd_class in chain(entry_points, cmdclass.items()):
-        opts = valid_options.get(cmd, set())
-        opts = opts | _normalise_cmd_options(getattr(cmd_class, "user_options", []))
-        valid_options[cmd] = opts
-
-    return valid_options
-
-
-def _load_ep(ep: metadata.EntryPoint) -> tuple[str, type] | None:
-    if ep.value.startswith("wheel.bdist_wheel"):
-        # Ignore deprecated entrypoint from wheel and avoid warning pypa/wheel#631
-        # TODO: remove check when `bdist_wheel` has been fully removed from pypa/wheel
-        return None
-
-    # Ignore all the errors
-    try:
-        return (ep.name, ep.load())
-    except Exception as ex:
-        msg = f"{ex.__class__.__name__} while trying to load entry-point {ep.name}"
-        _logger.warning(f"{msg}: {ex}")
-        return None
-
-
-def _normalise_cmd_option_key(name: str) -> str:
-    return json_compatible_key(name).strip("_=")
-
-
-def _normalise_cmd_options(desc: _OptionsList) -> set[str]:
-    return {_normalise_cmd_option_key(fancy_option[0]) for fancy_option in desc}
-
-
-def _get_previous_entrypoints(dist: Distribution) -> dict[str, list]:
-    ignore = ("console_scripts", "gui_scripts")
-    value = getattr(dist, "entry_points", None) or {}
-    return {k: v for k, v in value.items() if k not in ignore}
-
-
-def _get_previous_scripts(dist: Distribution) -> list | None:
-    value = getattr(dist, "entry_points", None) or {}
-    return value.get("console_scripts")
-
-
-def _get_previous_gui_scripts(dist: Distribution) -> list | None:
-    value = getattr(dist, "entry_points", None) or {}
-    return value.get("gui_scripts")
-
-
-def _set_static_list_metadata(attr: str, dist: Distribution, val: list) -> None:
-    """Apply distutils metadata validation but preserve "static" behaviour"""
-    meta = dist.metadata
-    setter, getter = getattr(meta, f"set_{attr}"), getattr(meta, f"get_{attr}")
-    setter(val)
-    setattr(meta, attr, _static.List(getter()))
-
-
-def _attrgetter(attr):
-    """
-    Similar to ``operator.attrgetter`` but returns None if ``attr`` is not found
-    >>> from types import SimpleNamespace
-    >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13))
-    >>> _attrgetter("a")(obj)
-    42
-    >>> _attrgetter("b.c")(obj)
-    13
-    >>> _attrgetter("d")(obj) is None
-    True
-    """
-    return partial(reduce, lambda acc, x: getattr(acc, x, None), attr.split("."))
-
-
-def _some_attrgetter(*items):
-    """
-    Return the first "truth-y" attribute or None
-    >>> from types import SimpleNamespace
-    >>> obj = SimpleNamespace(a=42, b=SimpleNamespace(c=13))
-    >>> _some_attrgetter("d", "a", "b.c")(obj)
-    42
-    >>> _some_attrgetter("d", "e", "b.c", "a")(obj)
-    13
-    >>> _some_attrgetter("d", "e", "f")(obj) is None
-    True
-    """
-
-    def _acessor(obj):
-        values = (_attrgetter(i)(obj) for i in items)
-        return next((i for i in values if i is not None), None)
-
-    return _acessor
-
-
-PYPROJECT_CORRESPONDENCE: dict[str, _Correspondence] = {
-    "readme": _long_description,
-    "license": _license,
-    "authors": partial(_people, kind="author"),
-    "maintainers": partial(_people, kind="maintainer"),
-    "urls": _project_urls,
-    "dependencies": _dependencies,
-    "optional_dependencies": _optional_dependencies,
-    "requires_python": _python_requires,
-}
-
-TOOL_TABLE_RENAMES = {"script_files": "scripts"}
-TOOL_TABLE_REMOVALS = {
-    "namespace_packages": """
-        Please migrate to implicit native namespaces instead.
-        See https://packaging.python.org/en/latest/guides/packaging-namespace-packages/.
-        """,
-}
-TOOL_TABLE_CORRESPONDENCE = {
-    # Fields with corresponding core metadata need to be marked as static:
-    "obsoletes": partial(_set_static_list_metadata, "obsoletes"),
-    "provides": partial(_set_static_list_metadata, "provides"),
-    "platforms": partial(_set_static_list_metadata, "platforms"),
-}
-
-SETUPTOOLS_PATCHES = {
-    "long_description_content_type",
-    "project_urls",
-    "provides_extras",
-    "license_file",
-    "license_files",
-    "license_expression",
-}
-
-_PREPROCESS = {
-    "ext_modules": _ext_modules,
-}
-
-_PREVIOUSLY_DEFINED = {
-    "name": _attrgetter("metadata.name"),
-    "version": _attrgetter("metadata.version"),
-    "description": _attrgetter("metadata.description"),
-    "readme": _attrgetter("metadata.long_description"),
-    "requires-python": _some_attrgetter("python_requires", "metadata.python_requires"),
-    "license": _some_attrgetter("metadata.license_expression", "metadata.license"),
-    # XXX: `license-file` is currently not considered in the context of `dynamic`.
-    #      See TestPresetField.test_license_files_exempt_from_dynamic
-    "authors": _some_attrgetter("metadata.author", "metadata.author_email"),
-    "maintainers": _some_attrgetter("metadata.maintainer", "metadata.maintainer_email"),
-    "keywords": _attrgetter("metadata.keywords"),
-    "classifiers": _attrgetter("metadata.classifiers"),
-    "urls": _attrgetter("metadata.project_urls"),
-    "entry-points": _get_previous_entrypoints,
-    "scripts": _get_previous_scripts,
-    "gui-scripts": _get_previous_gui_scripts,
-    "dependencies": _attrgetter("install_requires"),
-    "optional-dependencies": _attrgetter("extras_require"),
-}
-
-
-_RESET_PREVIOUSLY_DEFINED: dict = {
-    # Fix improper setting: given in `setup.py`, but not listed in `dynamic`
-    # Use "immutable" data structures to avoid in-place modification.
-    # dict: pyproject name => value to which reset
-    "license": "",
-    # XXX: `license-file` is currently not considered in the context of `dynamic`.
-    #      See TestPresetField.test_license_files_exempt_from_dynamic
-    "authors": _static.EMPTY_LIST,
-    "maintainers": _static.EMPTY_LIST,
-    "keywords": _static.EMPTY_LIST,
-    "classifiers": _static.EMPTY_LIST,
-    "urls": _static.EMPTY_DICT,
-    "entry-points": _static.EMPTY_DICT,
-    "scripts": _static.EMPTY_DICT,
-    "gui-scripts": _static.EMPTY_DICT,
-    "dependencies": _static.EMPTY_LIST,
-    "optional-dependencies": _static.EMPTY_DICT,
-}
-
-
-class _MissingDynamic(SetuptoolsWarning):
-    _SUMMARY = "`{field}` defined outside of `pyproject.toml` is ignored."
-
-    _DETAILS = """
-    The following seems to be defined outside of `pyproject.toml`:
-
-    `{field} = {value!r}`
-
-    According to the spec (see the link below), however, setuptools CANNOT
-    consider this value unless `{field}` is listed as `dynamic`.
-
-    https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
-
-    To prevent this problem, you can list `{field}` under `dynamic` or alternatively
-    remove the `[project]` table from your file and rely entirely on other means of
-    configuration.
-    """
-    # TODO: Consider removing this check in the future?
-    #       There is a trade-off here between improving "debug-ability" and the cost
-    #       of running/testing/maintaining these unnecessary checks...
-
-    @classmethod
-    def details(cls, field: str, value: Any) -> str:
-        return cls._DETAILS.format(field=field, value=value)
diff --git a/voxvera/vendor/setuptools/config/_validate_pyproject/NOTICE b/voxvera/vendor/setuptools/config/_validate_pyproject/NOTICE
deleted file mode 100644
index 74e8821..0000000
--- a/voxvera/vendor/setuptools/config/_validate_pyproject/NOTICE
+++ /dev/null
@@ -1,438 +0,0 @@
-The code contained in this directory was automatically generated using the
-following command:
-
-    python -m validate_pyproject.pre_compile --output-dir=setuptools/config/_validate_pyproject --enable-plugins setuptools distutils --very-verbose -t distutils=setuptools/config/distutils.schema.json -t setuptools=setuptools/config/setuptools.schema.json
-
-Please avoid changing it manually.
-
-
-You can report issues or suggest changes directly to `validate-pyproject`
-(or to the relevant plugin repository)
-
-- https://github.com/abravalheri/validate-pyproject/issues
-
-
-***
-
-The following files include code from opensource projects
-(either as direct copies or modified versions):
-
-- `fastjsonschema_exceptions.py`:
-    - project: `fastjsonschema` - licensed under BSD-3-Clause
-      (https://github.com/horejsek/python-fastjsonschema)
-- `extra_validations.py` and `format.py`, `error_reporting.py`:
-    - project: `validate-pyproject` - licensed under MPL-2.0
-      (https://github.com/abravalheri/validate-pyproject)
-
-
-Additionally the following files are automatically generated by tools provided
-by the same projects:
-
-- `__init__.py`
-- `fastjsonschema_validations.py`
-
-The relevant copyright notes and licenses are included below.
-
-
-***
-
-`fastjsonschema`
-================
-
-Copyright (c) 2018, Michal Horejsek
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-  Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimer.
-
-  Redistributions in binary form must reproduce the above copyright notice, this
-  list of conditions and the following disclaimer in the documentation and/or
-  other materials provided with the distribution.
-
-  Neither the name of the {organization} nor the names of its
-  contributors may be used to endorse or promote products derived from
-  this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-
-***
-
-`validate-pyproject`
-====================
-
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. "Contributor"
-
-     means each individual or legal entity that creates, contributes to the
-     creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-
-     means the combination of the Contributions of others (if any) used by a
-     Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-
-     means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-
-     means Source Code Form to which the initial Contributor has attached the
-     notice in Exhibit A, the Executable Form of such Source Code Form, and
-     Modifications of such Source Code Form, in each case including portions
-     thereof.
-
-1.5. "Incompatible With Secondary Licenses"
-     means
-
-     a. that the initial Contributor has attached the notice described in
-        Exhibit B to the Covered Software; or
-
-     b. that the Covered Software was made available under the terms of
-        version 1.1 or earlier of the License, but not also under the terms of
-        a Secondary License.
-
-1.6. "Executable Form"
-
-     means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-
-     means a work that combines Covered Software with other material, in a
-     separate file or files, that is not Covered Software.
-
-1.8. "License"
-
-     means this document.
-
-1.9. "Licensable"
-
-     means having the right to grant, to the maximum extent possible, whether
-     at the time of the initial grant or subsequently, any and all of the
-     rights conveyed by this License.
-
-1.10. "Modifications"
-
-     means any of the following:
-
-     a. any file in Source Code Form that results from an addition to,
-        deletion from, or modification of the contents of Covered Software; or
-
-     b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. "Patent Claims" of a Contributor
-
-      means any patent claim(s), including without limitation, method,
-      process, and apparatus claims, in any patent Licensable by such
-      Contributor that would be infringed, but for the grant of the License,
-      by the making, using, selling, offering for sale, having made, import,
-      or transfer of either its Contributions or its Contributor Version.
-
-1.12. "Secondary License"
-
-      means either the GNU General Public License, Version 2.0, the GNU Lesser
-      General Public License, Version 2.1, the GNU Affero General Public
-      License, Version 3.0, or any later versions of those licenses.
-
-1.13. "Source Code Form"
-
-      means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-
-      means an individual or a legal entity exercising rights under this
-      License. For legal entities, "You" includes any entity that controls, is
-      controlled by, or is under common control with You. For purposes of this
-      definition, "control" means (a) the power, direct or indirect, to cause
-      the direction or management of such entity, whether by contract or
-      otherwise, or (b) ownership of more than fifty percent (50%) of the
-      outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
-     Each Contributor hereby grants You a world-wide, royalty-free,
-     non-exclusive license:
-
-     a. under intellectual property rights (other than patent or trademark)
-        Licensable by such Contributor to use, reproduce, make available,
-        modify, display, perform, distribute, and otherwise exploit its
-        Contributions, either on an unmodified basis, with Modifications, or
-        as part of a Larger Work; and
-
-     b. under Patent Claims of such Contributor to make, use, sell, offer for
-        sale, have made, import, and otherwise transfer either its
-        Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-     The licenses granted in Section 2.1 with respect to any Contribution
-     become effective for each Contribution on the date the Contributor first
-     distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-     The licenses granted in this Section 2 are the only rights granted under
-     this License. No additional rights or licenses will be implied from the
-     distribution or licensing of Covered Software under this License.
-     Notwithstanding Section 2.1(b) above, no patent license is granted by a
-     Contributor:
-
-     a. for any code that a Contributor has removed from Covered Software; or
-
-     b. for infringements caused by: (i) Your and any other third party's
-        modifications of Covered Software, or (ii) the combination of its
-        Contributions with other software (except as part of its Contributor
-        Version); or
-
-     c. under Patent Claims infringed by Covered Software in the absence of
-        its Contributions.
-
-     This License does not grant any rights in the trademarks, service marks,
-     or logos of any Contributor (except as may be necessary to comply with
-     the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-     No Contributor makes additional grants as a result of Your choice to
-     distribute the Covered Software under a subsequent version of this
-     License (see Section 10.2) or under the terms of a Secondary License (if
-     permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-     Each Contributor represents that the Contributor believes its
-     Contributions are its original creation(s) or it has sufficient rights to
-     grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-     This License is not intended to limit any rights You have under
-     applicable copyright doctrines of fair use, fair dealing, or other
-     equivalents.
-
-2.7. Conditions
-
-     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
-     Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
-     All distribution of Covered Software in Source Code Form, including any
-     Modifications that You create or to which You contribute, must be under
-     the terms of this License. You must inform recipients that the Source
-     Code Form of the Covered Software is governed by the terms of this
-     License, and how they can obtain a copy of this License. You may not
-     attempt to alter or restrict the recipients' rights in the Source Code
-     Form.
-
-3.2. Distribution of Executable Form
-
-     If You distribute Covered Software in Executable Form then:
-
-     a. such Covered Software must also be made available in Source Code Form,
-        as described in Section 3.1, and You must inform recipients of the
-        Executable Form how they can obtain a copy of such Source Code Form by
-        reasonable means in a timely manner, at a charge no more than the cost
-        of distribution to the recipient; and
-
-     b. You may distribute such Executable Form under the terms of this
-        License, or sublicense it under different terms, provided that the
-        license for the Executable Form does not attempt to limit or alter the
-        recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-     You may create and distribute a Larger Work under terms of Your choice,
-     provided that You also comply with the requirements of this License for
-     the Covered Software. If the Larger Work is a combination of Covered
-     Software with a work governed by one or more Secondary Licenses, and the
-     Covered Software is not Incompatible With Secondary Licenses, this
-     License permits You to additionally distribute such Covered Software
-     under the terms of such Secondary License(s), so that the recipient of
-     the Larger Work may, at their option, further distribute the Covered
-     Software under the terms of either this License or such Secondary
-     License(s).
-
-3.4. Notices
-
-     You may not remove or alter the substance of any license notices
-     (including copyright notices, patent notices, disclaimers of warranty, or
-     limitations of liability) contained within the Source Code Form of the
-     Covered Software, except that You may alter any license notices to the
-     extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-     You may choose to offer, and to charge a fee for, warranty, support,
-     indemnity or liability obligations to one or more recipients of Covered
-     Software. However, You may do so only on Your own behalf, and not on
-     behalf of any Contributor. You must make it absolutely clear that any
-     such warranty, support, indemnity, or liability obligation is offered by
-     You alone, and You hereby agree to indemnify every Contributor for any
-     liability incurred by such Contributor as a result of warranty, support,
-     indemnity or liability terms You offer. You may include additional
-     disclaimers of warranty and limitations of liability specific to any
-     jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
-   If it is impossible for You to comply with any of the terms of this License
-   with respect to some or all of the Covered Software due to statute,
-   judicial order, or regulation then You must: (a) comply with the terms of
-   this License to the maximum extent possible; and (b) describe the
-   limitations and the code they affect. Such description must be placed in a
-   text file included with all distributions of the Covered Software under
-   this License. Except to the extent prohibited by statute or regulation,
-   such description must be sufficiently detailed for a recipient of ordinary
-   skill to be able to understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
-     fail to comply with any of its terms. However, if You become compliant,
-     then the rights granted under this License from a particular Contributor
-     are reinstated (a) provisionally, unless and until such Contributor
-     explicitly and finally terminates Your grants, and (b) on an ongoing
-     basis, if such Contributor fails to notify You of the non-compliance by
-     some reasonable means prior to 60 days after You have come back into
-     compliance. Moreover, Your grants from a particular Contributor are
-     reinstated on an ongoing basis if such Contributor notifies You of the
-     non-compliance by some reasonable means, this is the first time You have
-     received notice of non-compliance with this License from such
-     Contributor, and You become compliant prior to 30 days after Your receipt
-     of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-     infringement claim (excluding declaratory judgment actions,
-     counter-claims, and cross-claims) alleging that a Contributor Version
-     directly or indirectly infringes any patent, then the rights granted to
-     You by any and all Contributors for the Covered Software under Section
-     2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
-     license agreements (excluding distributors and resellers) which have been
-     validly granted by You or Your distributors under this License prior to
-     termination shall survive termination.
-
-6. Disclaimer of Warranty
-
-   Covered Software is provided under this License on an "as is" basis,
-   without warranty of any kind, either expressed, implied, or statutory,
-   including, without limitation, warranties that the Covered Software is free
-   of defects, merchantable, fit for a particular purpose or non-infringing.
-   The entire risk as to the quality and performance of the Covered Software
-   is with You. Should any Covered Software prove defective in any respect,
-   You (not any Contributor) assume the cost of any necessary servicing,
-   repair, or correction. This disclaimer of warranty constitutes an essential
-   part of this License. No use of  any Covered Software is authorized under
-   this License except under this disclaimer.
-
-7. Limitation of Liability
-
-   Under no circumstances and under no legal theory, whether tort (including
-   negligence), contract, or otherwise, shall any Contributor, or anyone who
-   distributes Covered Software as permitted above, be liable to You for any
-   direct, indirect, special, incidental, or consequential damages of any
-   character including, without limitation, damages for lost profits, loss of
-   goodwill, work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses, even if such party shall have been
-   informed of the possibility of such damages. This limitation of liability
-   shall not apply to liability for death or personal injury resulting from
-   such party's negligence to the extent applicable law prohibits such
-   limitation. Some jurisdictions do not allow the exclusion or limitation of
-   incidental or consequential damages, so this exclusion and limitation may
-   not apply to You.
-
-8. Litigation
-
-   Any litigation relating to this License may be brought only in the courts
-   of a jurisdiction where the defendant maintains its principal place of
-   business and such litigation shall be governed by laws of that
-   jurisdiction, without reference to its conflict-of-law provisions. Nothing
-   in this Section shall prevent a party's ability to bring cross-claims or
-   counter-claims.
-
-9. Miscellaneous
-
-   This License represents the complete agreement concerning the subject
-   matter hereof. If any provision of this License is held to be
-   unenforceable, such provision shall be reformed only to the extent
-   necessary to make it enforceable. Any law or regulation which provides that
-   the language of a contract shall be construed against the drafter shall not
-   be used to construe this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
-      Mozilla Foundation is the license steward. Except as provided in Section
-      10.3, no one other than the license steward has the right to modify or
-      publish new versions of this License. Each version will be given a
-      distinguishing version number.
-
-10.2. Effect of New Versions
-
-      You may distribute the Covered Software under the terms of the version
-      of the License under which You originally received the Covered Software,
-      or under the terms of any subsequent version published by the license
-      steward.
-
-10.3. Modified Versions
-
-      If you create software not governed by this License, and you want to
-      create a new license for such software, you may create and use a
-      modified version of this License if you rename the license and remove
-      any references to the name of the license steward (except to note that
-      such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-      Licenses If You choose to distribute Source Code Form that is
-      Incompatible With Secondary Licenses under the terms of this version of
-      the License, the notice described in Exhibit B of this License must be
-      attached.
-
-Exhibit A - Source Code Form License Notice
-
-      This Source Code Form is subject to the
-      terms of the Mozilla Public License, v.
-      2.0. If a copy of the MPL was not
-      distributed with this file, You can
-      obtain one at
-      https://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file,
-then You may include the notice in a location (such as a LICENSE file in a
-relevant directory) where a recipient would be likely to look for such a
-notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
-
-      This Source Code Form is "Incompatible
-      With Secondary Licenses", as defined by
-      the Mozilla Public License, v. 2.0.
diff --git a/voxvera/vendor/setuptools/config/_validate_pyproject/__init__.py b/voxvera/vendor/setuptools/config/_validate_pyproject/__init__.py
deleted file mode 100644
index 4f612bd..0000000
--- a/voxvera/vendor/setuptools/config/_validate_pyproject/__init__.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from functools import reduce
-from typing import Any, Callable, Dict
-
-from . import formats
-from .error_reporting import detailed_errors, ValidationError
-from .extra_validations import EXTRA_VALIDATIONS
-from .fastjsonschema_exceptions import JsonSchemaException, JsonSchemaValueException
-from .fastjsonschema_validations import validate as _validate
-
-__all__ = [
-    "validate",
-    "FORMAT_FUNCTIONS",
-    "EXTRA_VALIDATIONS",
-    "ValidationError",
-    "JsonSchemaException",
-    "JsonSchemaValueException",
-]
-
-
-FORMAT_FUNCTIONS: Dict[str, Callable[[str], bool]] = {
-    fn.__name__.replace("_", "-"): fn
-    for fn in formats.__dict__.values()
-    if callable(fn) and not fn.__name__.startswith("_")
-}
-
-
-def validate(data: Any) -> bool:
-    """Validate the given ``data`` object using JSON Schema
-    This function raises ``ValidationError`` if ``data`` is invalid.
-    """
-    with detailed_errors():
-        _validate(data, custom_formats=FORMAT_FUNCTIONS)
-        reduce(lambda acc, fn: fn(acc), EXTRA_VALIDATIONS, data)
-    return True
diff --git a/voxvera/vendor/setuptools/config/_validate_pyproject/error_reporting.py b/voxvera/vendor/setuptools/config/_validate_pyproject/error_reporting.py
deleted file mode 100644
index 9ebe6a3..0000000
--- a/voxvera/vendor/setuptools/config/_validate_pyproject/error_reporting.py
+++ /dev/null
@@ -1,338 +0,0 @@
-from __future__ import annotations
-
-import io
-import json
-import logging
-import os
-import re
-import typing
-from contextlib import contextmanager
-from textwrap import indent, wrap
-from typing import Any, Generator, Iterator, Sequence
-
-from .fastjsonschema_exceptions import JsonSchemaValueException
-
-if typing.TYPE_CHECKING:
-    import sys
-
-    if sys.version_info < (3, 11):
-        from typing_extensions import Self
-    else:
-        from typing import Self
-
-_logger = logging.getLogger(__name__)
-
-_MESSAGE_REPLACEMENTS = {
-    "must be named by propertyName definition": "keys must be named by",
-    "one of contains definition": "at least one item that matches",
-    " same as const definition:": "",
-    "only specified items": "only items matching the definition",
-}
-
-_SKIP_DETAILS = (
-    "must not be empty",
-    "is always invalid",
-    "must not be there",
-)
-
-_NEED_DETAILS = {"anyOf", "oneOf", "allOf", "contains", "propertyNames", "not", "items"}
-
-_CAMEL_CASE_SPLITTER = re.compile(r"\W+|([A-Z][^A-Z\W]*)")
-_IDENTIFIER = re.compile(r"^[\w_]+$", re.IGNORECASE)
-
-_TOML_JARGON = {
-    "object": "table",
-    "property": "key",
-    "properties": "keys",
-    "property names": "keys",
-}
-
-_FORMATS_HELP = """
-For more details about `format` see
-https://validate-pyproject.readthedocs.io/en/latest/api/validate_pyproject.formats.html
-"""
-
-
-class ValidationError(JsonSchemaValueException):
-    """Report violations of a given JSON schema.
-
-    This class extends :exc:`~fastjsonschema.JsonSchemaValueException`
-    by adding the following properties:
-
-    - ``summary``: an improved version of the ``JsonSchemaValueException`` error message
-      with only the necessary information)
-
-    - ``details``: more contextual information about the error like the failing schema
-      itself and the value that violates the schema.
-
-    Depending on the level of the verbosity of the ``logging`` configuration
-    the exception message will be only ``summary`` (default) or a combination of
-    ``summary`` and ``details`` (when the logging level is set to :obj:`logging.DEBUG`).
-    """
-
-    summary = ""
-    details = ""
-    _original_message = ""
-
-    @classmethod
-    def _from_jsonschema(cls, ex: JsonSchemaValueException) -> Self:
-        formatter = _ErrorFormatting(ex)
-        obj = cls(str(formatter), ex.value, formatter.name, ex.definition, ex.rule)
-        debug_code = os.getenv("JSONSCHEMA_DEBUG_CODE_GENERATION", "false").lower()
-        if debug_code != "false":  # pragma: no cover
-            obj.__cause__, obj.__traceback__ = ex.__cause__, ex.__traceback__
-        obj._original_message = ex.message
-        obj.summary = formatter.summary
-        obj.details = formatter.details
-        return obj
-
-
-@contextmanager
-def detailed_errors() -> Generator[None, None, None]:
-    try:
-        yield
-    except JsonSchemaValueException as ex:
-        raise ValidationError._from_jsonschema(ex) from None
-
-
-class _ErrorFormatting:
-    def __init__(self, ex: JsonSchemaValueException):
-        self.ex = ex
-        self.name = f"`{self._simplify_name(ex.name)}`"
-        self._original_message: str = self.ex.message.replace(ex.name, self.name)
-        self._summary = ""
-        self._details = ""
-
-    def __str__(self) -> str:
-        if _logger.getEffectiveLevel() <= logging.DEBUG and self.details:
-            return f"{self.summary}\n\n{self.details}"
-
-        return self.summary
-
-    @property
-    def summary(self) -> str:
-        if not self._summary:
-            self._summary = self._expand_summary()
-
-        return self._summary
-
-    @property
-    def details(self) -> str:
-        if not self._details:
-            self._details = self._expand_details()
-
-        return self._details
-
-    @staticmethod
-    def _simplify_name(name: str) -> str:
-        x = len("data.")
-        return name[x:] if name.startswith("data.") else name
-
-    def _expand_summary(self) -> str:
-        msg = self._original_message
-
-        for bad, repl in _MESSAGE_REPLACEMENTS.items():
-            msg = msg.replace(bad, repl)
-
-        if any(substring in msg for substring in _SKIP_DETAILS):
-            return msg
-
-        schema = self.ex.rule_definition
-        if self.ex.rule in _NEED_DETAILS and schema:
-            summary = _SummaryWriter(_TOML_JARGON)
-            return f"{msg}:\n\n{indent(summary(schema), '    ')}"
-
-        return msg
-
-    def _expand_details(self) -> str:
-        optional = []
-        definition = self.ex.definition or {}
-        desc_lines = definition.pop("$$description", [])
-        desc = definition.pop("description", None) or " ".join(desc_lines)
-        if desc:
-            description = "\n".join(
-                wrap(
-                    desc,
-                    width=80,
-                    initial_indent="    ",
-                    subsequent_indent="    ",
-                    break_long_words=False,
-                )
-            )
-            optional.append(f"DESCRIPTION:\n{description}")
-        schema = json.dumps(definition, indent=4)
-        value = json.dumps(self.ex.value, indent=4)
-        defaults = [
-            f"GIVEN VALUE:\n{indent(value, '    ')}",
-            f"OFFENDING RULE: {self.ex.rule!r}",
-            f"DEFINITION:\n{indent(schema, '    ')}",
-        ]
-        msg = "\n\n".join(optional + defaults)
-        epilog = f"\n{_FORMATS_HELP}" if "format" in msg.lower() else ""
-        return msg + epilog
-
-
-class _SummaryWriter:
-    _IGNORE = frozenset(("description", "default", "title", "examples"))
-
-    def __init__(self, jargon: dict[str, str] | None = None):
-        self.jargon: dict[str, str] = jargon or {}
-        # Clarify confusing terms
-        self._terms = {
-            "anyOf": "at least one of the following",
-            "oneOf": "exactly one of the following",
-            "allOf": "all of the following",
-            "not": "(*NOT* the following)",
-            "prefixItems": f"{self._jargon('items')} (in order)",
-            "items": "items",
-            "contains": "contains at least one of",
-            "propertyNames": (
-                f"non-predefined acceptable {self._jargon('property names')}"
-            ),
-            "patternProperties": f"{self._jargon('properties')} named via pattern",
-            "const": "predefined value",
-            "enum": "one of",
-        }
-        # Attributes that indicate that the definition is easy and can be done
-        # inline (e.g. string and number)
-        self._guess_inline_defs = [
-            "enum",
-            "const",
-            "maxLength",
-            "minLength",
-            "pattern",
-            "format",
-            "minimum",
-            "maximum",
-            "exclusiveMinimum",
-            "exclusiveMaximum",
-            "multipleOf",
-        ]
-
-    def _jargon(self, term: str | list[str]) -> str | list[str]:
-        if isinstance(term, list):
-            return [self.jargon.get(t, t) for t in term]
-        return self.jargon.get(term, term)
-
-    def __call__(
-        self,
-        schema: dict | list[dict],
-        prefix: str = "",
-        *,
-        _path: Sequence[str] = (),
-    ) -> str:
-        if isinstance(schema, list):
-            return self._handle_list(schema, prefix, _path)
-
-        filtered = self._filter_unecessary(schema, _path)
-        simple = self._handle_simple_dict(filtered, _path)
-        if simple:
-            return f"{prefix}{simple}"
-
-        child_prefix = self._child_prefix(prefix, "  ")
-        item_prefix = self._child_prefix(prefix, "- ")
-        indent = len(prefix) * " "
-        with io.StringIO() as buffer:
-            for i, (key, value) in enumerate(filtered.items()):
-                child_path = [*_path, key]
-                line_prefix = prefix if i == 0 else indent
-                buffer.write(f"{line_prefix}{self._label(child_path)}:")
-                # ^  just the first item should receive the complete prefix
-                if isinstance(value, dict):
-                    filtered = self._filter_unecessary(value, child_path)
-                    simple = self._handle_simple_dict(filtered, child_path)
-                    buffer.write(
-                        f" {simple}"
-                        if simple
-                        else f"\n{self(value, child_prefix, _path=child_path)}"
-                    )
-                elif isinstance(value, list) and (
-                    key != "type" or self._is_property(child_path)
-                ):
-                    children = self._handle_list(value, item_prefix, child_path)
-                    sep = " " if children.startswith("[") else "\n"
-                    buffer.write(f"{sep}{children}")
-                else:
-                    buffer.write(f" {self._value(value, child_path)}\n")
-            return buffer.getvalue()
-
-    def _is_unecessary(self, path: Sequence[str]) -> bool:
-        if self._is_property(path) or not path:  # empty path => instruction @ root
-            return False
-        key = path[-1]
-        return any(key.startswith(k) for k in "$_") or key in self._IGNORE
-
-    def _filter_unecessary(
-        self, schema: dict[str, Any], path: Sequence[str]
-    ) -> dict[str, Any]:
-        return {
-            key: value
-            for key, value in schema.items()
-            if not self._is_unecessary([*path, key])
-        }
-
-    def _handle_simple_dict(self, value: dict, path: Sequence[str]) -> str | None:
-        inline = any(p in value for p in self._guess_inline_defs)
-        simple = not any(isinstance(v, (list, dict)) for v in value.values())
-        if inline or simple:
-            return f"{{{', '.join(self._inline_attrs(value, path))}}}\n"
-        return None
-
-    def _handle_list(
-        self, schemas: list, prefix: str = "", path: Sequence[str] = ()
-    ) -> str:
-        if self._is_unecessary(path):
-            return ""
-
-        repr_ = repr(schemas)
-        if all(not isinstance(e, (dict, list)) for e in schemas) and len(repr_) < 60:
-            return f"{repr_}\n"
-
-        item_prefix = self._child_prefix(prefix, "- ")
-        return "".join(
-            self(v, item_prefix, _path=[*path, f"[{i}]"]) for i, v in enumerate(schemas)
-        )
-
-    def _is_property(self, path: Sequence[str]) -> bool:
-        """Check if the given path can correspond to an arbitrarily named property"""
-        counter = 0
-        for key in path[-2::-1]:
-            if key not in {"properties", "patternProperties"}:
-                break
-            counter += 1
-
-        # If the counter if even, the path correspond to a JSON Schema keyword
-        # otherwise it can be any arbitrary string naming a property
-        return counter % 2 == 1
-
-    def _label(self, path: Sequence[str]) -> str:
-        *parents, key = path
-        if not self._is_property(path):
-            norm_key = _separate_terms(key)
-            return self._terms.get(key) or " ".join(self._jargon(norm_key))
-
-        if parents[-1] == "patternProperties":
-            return f"(regex {key!r})"
-        return repr(key)  # property name
-
-    def _value(self, value: Any, path: Sequence[str]) -> str:
-        if path[-1] == "type" and not self._is_property(path):
-            type_ = self._jargon(value)
-            return f"[{', '.join(type_)}]" if isinstance(type_, list) else type_
-        return repr(value)
-
-    def _inline_attrs(self, schema: dict, path: Sequence[str]) -> Iterator[str]:
-        for key, value in schema.items():
-            child_path = [*path, key]
-            yield f"{self._label(child_path)}: {self._value(value, child_path)}"
-
-    def _child_prefix(self, parent_prefix: str, child_prefix: str) -> str:
-        return len(parent_prefix) * " " + child_prefix
-
-
-def _separate_terms(word: str) -> list[str]:
-    """
-    >>> _separate_terms("FooBar-foo")
-    ['foo', 'bar', 'foo']
-    """
-    return [w.lower() for w in _CAMEL_CASE_SPLITTER.split(word) if w]
diff --git a/voxvera/vendor/setuptools/config/_validate_pyproject/extra_validations.py b/voxvera/vendor/setuptools/config/_validate_pyproject/extra_validations.py
deleted file mode 100644
index 72a7132..0000000
--- a/voxvera/vendor/setuptools/config/_validate_pyproject/extra_validations.py
+++ /dev/null
@@ -1,151 +0,0 @@
-"""The purpose of this module is implement PEP 621 validations that are
-difficult to express as a JSON Schema (or that are not supported by the current
-JSON Schema library).
-"""
-
-import collections
-import itertools
-from inspect import cleandoc
-from typing import Generator, Iterable, Mapping, TypeVar
-
-from .error_reporting import ValidationError
-
-T = TypeVar("T", bound=Mapping)
-
-
-class RedefiningStaticFieldAsDynamic(ValidationError):
-    _DESC = """According to PEP 621:
-
-    Build back-ends MUST raise an error if the metadata specifies a field
-    statically as well as being listed in dynamic.
-    """
-    __doc__ = _DESC
-    _URL = (
-        "https://packaging.python.org/en/latest/specifications/pyproject-toml/#dynamic"
-    )
-
-
-class IncludedDependencyGroupMustExist(ValidationError):
-    _DESC = """An included dependency group must exist and must not be cyclic.
-    """
-    __doc__ = _DESC
-    _URL = "https://peps.python.org/pep-0735/"
-
-
-class ImportNameCollision(ValidationError):
-    _DESC = """According to PEP 794:
-
-    All import-names and import-namespaces items must be unique.
-    """
-    __doc__ = _DESC
-    _URL = "https://peps.python.org/pep-0794/"
-
-
-class ImportNameMissing(ValidationError):
-    _DESC = """According to PEP 794:
-
-    An import name must have all parents listed.
-    """
-    __doc__ = _DESC
-    _URL = "https://peps.python.org/pep-0794/"
-
-
-def validate_project_dynamic(pyproject: T) -> T:
-    project_table = pyproject.get("project", {})
-    dynamic = project_table.get("dynamic", [])
-
-    for field in dynamic:
-        if field in project_table:
-            raise RedefiningStaticFieldAsDynamic(
-                message=f"You cannot provide a value for `project.{field}` and "
-                "list it under `project.dynamic` at the same time",
-                value={
-                    field: project_table[field],
-                    "...": " # ...",
-                    "dynamic": dynamic,
-                },
-                name=f"data.project.{field}",
-                definition={
-                    "description": cleandoc(RedefiningStaticFieldAsDynamic._DESC),
-                    "see": RedefiningStaticFieldAsDynamic._URL,
-                },
-                rule="PEP 621",
-            )
-
-    return pyproject
-
-
-def validate_include_depenency(pyproject: T) -> T:
-    dependency_groups = pyproject.get("dependency-groups", {})
-    for key, value in dependency_groups.items():
-        for each in value:
-            if (
-                isinstance(each, dict)
-                and (include_group := each.get("include-group"))
-                and include_group not in dependency_groups
-            ):
-                raise IncludedDependencyGroupMustExist(
-                    message=f"The included dependency group {include_group} doesn't exist",
-                    value=each,
-                    name=f"data.dependency_groups.{key}",
-                    definition={
-                        "description": cleandoc(IncludedDependencyGroupMustExist._DESC),
-                        "see": IncludedDependencyGroupMustExist._URL,
-                    },
-                    rule="PEP 735",
-                )
-    # TODO: check for `include-group` cycles (can be conditional to graphlib)
-    return pyproject
-
-
-def _remove_private(items: Iterable[str]) -> Generator[str, None, None]:
-    for item in items:
-        yield item.partition(";")[0].rstrip()
-
-
-def validate_import_name_issues(pyproject: T) -> T:
-    project = pyproject.get("project", {})
-    import_names = collections.Counter(_remove_private(project.get("import-names", [])))
-    import_namespaces = collections.Counter(
-        _remove_private(project.get("import-namespaces", []))
-    )
-
-    duplicated = [k for k, v in (import_names + import_namespaces).items() if v > 1]
-
-    if duplicated:
-        raise ImportNameCollision(
-            message="Duplicated names are not allowed in import-names/import-namespaces",
-            value=duplicated,
-            name="data.project.importnames(paces)",
-            definition={
-                "description": cleandoc(ImportNameCollision._DESC),
-                "see": ImportNameCollision._URL,
-            },
-            rule="PEP 794",
-        )
-
-    names = frozenset(import_names + import_namespaces)
-    for name in names:
-        for parent in itertools.accumulate(
-            name.split(".")[:-1], lambda a, b: f"{a}.{b}"
-        ):
-            if parent not in names:
-                raise ImportNameMissing(
-                    message="All parents of an import name must also be listed in import-namespace/import-names",
-                    value=name,
-                    name="data.project.importnames(paces)",
-                    definition={
-                        "description": cleandoc(ImportNameMissing._DESC),
-                        "see": ImportNameMissing._URL,
-                    },
-                    rule="PEP 794",
-                )
-
-    return pyproject
-
-
-EXTRA_VALIDATIONS = (
-    validate_project_dynamic,
-    validate_include_depenency,
-    validate_import_name_issues,
-)
diff --git a/voxvera/vendor/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py b/voxvera/vendor/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py
deleted file mode 100644
index d2dddd6..0000000
--- a/voxvera/vendor/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import re
-
-
-SPLIT_RE = re.compile(r'[\.\[\]]+')
-
-
-class JsonSchemaException(ValueError):
-    """
-    Base exception of ``fastjsonschema`` library.
-    """
-
-
-class JsonSchemaValueException(JsonSchemaException):
-    """
-    Exception raised by validation function. Available properties:
-
-     * ``message`` containing human-readable information what is wrong (e.g. ``data.property[index] must be smaller than or equal to 42``),
-     * invalid ``value`` (e.g. ``60``),
-     * ``name`` of a path in the data structure (e.g. ``data.property[index]``),
-     * ``path`` as an array in the data structure (e.g. ``['data', 'property', 'index']``),
-     * the whole ``definition`` which the ``value`` has to fulfil (e.g. ``{'type': 'number', 'maximum': 42}``),
-     * ``rule`` which the ``value`` is breaking (e.g. ``maximum``)
-     * and ``rule_definition`` (e.g. ``42``).
-
-    .. versionchanged:: 2.14.0
-        Added all extra properties.
-    """
-
-    def __init__(self, message, value=None, name=None, definition=None, rule=None):
-        super().__init__(message)
-        self.message = message
-        self.value = value
-        self.name = name
-        self.definition = definition
-        self.rule = rule
-
-    @property
-    def path(self):
-        return [item for item in SPLIT_RE.split(self.name) if item != '']
-
-    @property
-    def rule_definition(self):
-        if not self.rule or not self.definition:
-            return None
-        return self.definition.get(self.rule)
-
-
-class JsonSchemaDefinitionException(JsonSchemaException):
-    """
-    Exception raised by generator of validation function.
-    """
diff --git a/voxvera/vendor/setuptools/config/_validate_pyproject/fastjsonschema_validations.py b/voxvera/vendor/setuptools/config/_validate_pyproject/fastjsonschema_validations.py
deleted file mode 100644
index d8a03de..0000000
--- a/voxvera/vendor/setuptools/config/_validate_pyproject/fastjsonschema_validations.py
+++ /dev/null
@@ -1,1453 +0,0 @@
-# noqa
-# ruff: noqa
-# flake8: noqa
-# pylint: skip-file
-# mypy: ignore-errors
-# yapf: disable
-# pylama:skip=1
-
-
-# *** PLEASE DO NOT MODIFY DIRECTLY: Automatically generated code *** 
-
-
-VERSION = "2.21.2"
-from decimal import Decimal
-import re
-from .fastjsonschema_exceptions import JsonSchemaValueException
-
-
-REGEX_PATTERNS = {
-    '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': re.compile('^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])\\Z'),
-    '^.*$': re.compile('^.*$'),
-    '.+': re.compile('.+'),
-    '^.+$': re.compile('^.+$'),
-    'idn-email_re_pattern': re.compile('^[^@]+@[^@]+\\.[^@]+\\Z')
-}
-
-NoneType = type(None)
-
-def validate(data, custom_formats={}, name_prefix=None):
-    validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies(data, custom_formats, (name_prefix or "data") + "")
-    return data
-
-def validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-build-dependencies/', 'title': 'Data structure for ``pyproject.toml`` files', '$$description': ['File format containing build-time configurations for the Python ecosystem. ', ':pep:`517` initially defined a build-system independent format for source trees', 'which was complemented by :pep:`518` to provide a way of specifying dependencies ', 'for building Python projects.', 'Please notice the ``project`` table (as initially defined in  :pep:`621`) is not included', 'in this schema and should be considered separately.'], 'type': 'object', 'additionalProperties': False, 'properties': {'build-system': {'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'import-names': {'description': 'Lists import names which a project, when installed, would exclusively provide.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'import-namespaces': {'description': 'Lists import names that, when installed, would be provided by the project, but not exclusively.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, 'tool': {'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html', 'title': '``tool.distutils`` table', '$$description': ['**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``', 'subtables to configure arguments for ``distutils`` commands.', 'Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` commands via `distutils configuration files', '`_.', 'See also `the old Python docs _`.'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$ref': '#/definitions/package-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$ref': '#/definitions/package-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$ref': '#/definitions/ext-module'}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive-for-dependencies'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive-for-dependencies'}}}, 'readme': {'type': 'object', 'anyOf': [{'$ref': '#/definitions/file-directive'}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'$ref': '#/definitions/file-directive/properties/file'}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}, 'dependency-groups': {'type': 'object', 'description': 'Dependency groups following PEP 735', 'additionalProperties': False, 'patternProperties': {'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': {'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}}}}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'import-names': {'description': 'Lists import names which a project, when installed, would exclusively provide.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'import-namespaces': {'description': 'Lists import names that, when installed, would be provided by the project, but not exclusively.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data_keys = set(data.keys())
-        if "build-system" in data_keys:
-            data_keys.remove("build-system")
-            data__buildsystem = data["build-system"]
-            if not isinstance(data__buildsystem, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must be object", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='type')
-            data__buildsystem_is_dict = isinstance(data__buildsystem, dict)
-            if data__buildsystem_is_dict:
-                data__buildsystem__missing_keys = set(['requires']) - data__buildsystem.keys()
-                if data__buildsystem__missing_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must contain " + (str(sorted(data__buildsystem__missing_keys)) + " properties"), value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='required')
-                data__buildsystem_keys = set(data__buildsystem.keys())
-                if "requires" in data__buildsystem_keys:
-                    data__buildsystem_keys.remove("requires")
-                    data__buildsystem__requires = data__buildsystem["requires"]
-                    if not isinstance(data__buildsystem__requires, (list, tuple)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.requires must be array", value=data__buildsystem__requires, name="" + (name_prefix or "data") + ".build-system.requires", definition={'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, rule='type')
-                    data__buildsystem__requires_is_list = isinstance(data__buildsystem__requires, (list, tuple))
-                    if data__buildsystem__requires_is_list:
-                        data__buildsystem__requires_len = len(data__buildsystem__requires)
-                        for data__buildsystem__requires_x, data__buildsystem__requires_item in enumerate(data__buildsystem__requires):
-                            if not isinstance(data__buildsystem__requires_item, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.requires[{data__buildsystem__requires_x}]".format(**locals()) + " must be string", value=data__buildsystem__requires_item, name="" + (name_prefix or "data") + ".build-system.requires[{data__buildsystem__requires_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                if "build-backend" in data__buildsystem_keys:
-                    data__buildsystem_keys.remove("build-backend")
-                    data__buildsystem__buildbackend = data__buildsystem["build-backend"]
-                    if not isinstance(data__buildsystem__buildbackend, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.build-backend must be string", value=data__buildsystem__buildbackend, name="" + (name_prefix or "data") + ".build-system.build-backend", definition={'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, rule='type')
-                    if isinstance(data__buildsystem__buildbackend, str):
-                        if not custom_formats["pep517-backend-reference"](data__buildsystem__buildbackend):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.build-backend must be pep517-backend-reference", value=data__buildsystem__buildbackend, name="" + (name_prefix or "data") + ".build-system.build-backend", definition={'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, rule='format')
-                if "backend-path" in data__buildsystem_keys:
-                    data__buildsystem_keys.remove("backend-path")
-                    data__buildsystem__backendpath = data__buildsystem["backend-path"]
-                    if not isinstance(data__buildsystem__backendpath, (list, tuple)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.backend-path must be array", value=data__buildsystem__backendpath, name="" + (name_prefix or "data") + ".build-system.backend-path", definition={'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}, rule='type')
-                    data__buildsystem__backendpath_is_list = isinstance(data__buildsystem__backendpath, (list, tuple))
-                    if data__buildsystem__backendpath_is_list:
-                        data__buildsystem__backendpath_len = len(data__buildsystem__backendpath)
-                        for data__buildsystem__backendpath_x, data__buildsystem__backendpath_item in enumerate(data__buildsystem__backendpath):
-                            if not isinstance(data__buildsystem__backendpath_item, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.backend-path[{data__buildsystem__backendpath_x}]".format(**locals()) + " must be string", value=data__buildsystem__backendpath_item, name="" + (name_prefix or "data") + ".build-system.backend-path[{data__buildsystem__backendpath_x}]".format(**locals()) + "", definition={'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}, rule='type')
-                if data__buildsystem_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must not contain "+str(data__buildsystem_keys)+" properties", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='additionalProperties')
-        if "project" in data_keys:
-            data_keys.remove("project")
-            data__project = data["project"]
-            validate_https___packaging_python_org_en_latest_specifications_pyproject_toml(data__project, custom_formats, (name_prefix or "data") + ".project")
-        if "tool" in data_keys:
-            data_keys.remove("tool")
-            data__tool = data["tool"]
-            if not isinstance(data__tool, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".tool must be object", value=data__tool, name="" + (name_prefix or "data") + ".tool", definition={'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html', 'title': '``tool.distutils`` table', '$$description': ['**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``', 'subtables to configure arguments for ``distutils`` commands.', 'Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` commands via `distutils configuration files', '`_.', 'See also `the old Python docs _`.'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$ref': '#/definitions/package-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$ref': '#/definitions/package-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$ref': '#/definitions/ext-module'}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive-for-dependencies'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive-for-dependencies'}}}, 'readme': {'type': 'object', 'anyOf': [{'$ref': '#/definitions/file-directive'}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'$ref': '#/definitions/file-directive/properties/file'}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}, rule='type')
-            data__tool_is_dict = isinstance(data__tool, dict)
-            if data__tool_is_dict:
-                data__tool_keys = set(data__tool.keys())
-                if "distutils" in data__tool_keys:
-                    data__tool_keys.remove("distutils")
-                    data__tool__distutils = data__tool["distutils"]
-                    validate_https___setuptools_pypa_io_en_latest_deprecated_distutils_configfile_html(data__tool__distutils, custom_formats, (name_prefix or "data") + ".tool.distutils")
-                if "setuptools" in data__tool_keys:
-                    data__tool_keys.remove("setuptools")
-                    data__tool__setuptools = data__tool["setuptools"]
-                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html(data__tool__setuptools, custom_formats, (name_prefix or "data") + ".tool.setuptools")
-        if "dependency-groups" in data_keys:
-            data_keys.remove("dependency-groups")
-            data__dependencygroups = data["dependency-groups"]
-            if not isinstance(data__dependencygroups, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups must be object", value=data__dependencygroups, name="" + (name_prefix or "data") + ".dependency-groups", definition={'type': 'object', 'description': 'Dependency groups following PEP 735', 'additionalProperties': False, 'patternProperties': {'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': {'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}}}, rule='type')
-            data__dependencygroups_is_dict = isinstance(data__dependencygroups, dict)
-            if data__dependencygroups_is_dict:
-                data__dependencygroups_keys = set(data__dependencygroups.keys())
-                for data__dependencygroups_key, data__dependencygroups_val in data__dependencygroups.items():
-                    if REGEX_PATTERNS['^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'].search(data__dependencygroups_key):
-                        if data__dependencygroups_key in data__dependencygroups_keys:
-                            data__dependencygroups_keys.remove(data__dependencygroups_key)
-                        if not isinstance(data__dependencygroups_val, (list, tuple)):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}".format(**locals()) + " must be array", value=data__dependencygroups_val, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}, rule='type')
-                        data__dependencygroups_val_is_list = isinstance(data__dependencygroups_val, (list, tuple))
-                        if data__dependencygroups_val_is_list:
-                            data__dependencygroups_val_len = len(data__dependencygroups_val)
-                            for data__dependencygroups_val_x, data__dependencygroups_val_item in enumerate(data__dependencygroups_val):
-                                data__dependencygroups_val_item_one_of_count1 = 0
-                                if data__dependencygroups_val_item_one_of_count1 < 2:
-                                    try:
-                                        if not isinstance(data__dependencygroups_val_item, (str)):
-                                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must be string", value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, rule='type')
-                                        if isinstance(data__dependencygroups_val_item, str):
-                                            if not custom_formats["pep508"](data__dependencygroups_val_item):
-                                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must be pep508", value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, rule='format')
-                                        data__dependencygroups_val_item_one_of_count1 += 1
-                                    except JsonSchemaValueException: pass
-                                if data__dependencygroups_val_item_one_of_count1 < 2:
-                                    try:
-                                        if not isinstance(data__dependencygroups_val_item, (dict)):
-                                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must be object", value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}, rule='type')
-                                        data__dependencygroups_val_item_is_dict = isinstance(data__dependencygroups_val_item, dict)
-                                        if data__dependencygroups_val_item_is_dict:
-                                            data__dependencygroups_val_item_keys = set(data__dependencygroups_val_item.keys())
-                                            if "include-group" in data__dependencygroups_val_item_keys:
-                                                data__dependencygroups_val_item_keys.remove("include-group")
-                                                data__dependencygroups_val_item__includegroup = data__dependencygroups_val_item["include-group"]
-                                                if not isinstance(data__dependencygroups_val_item__includegroup, (str)):
-                                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}].include-group".format(**locals()) + " must be string", value=data__dependencygroups_val_item__includegroup, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}].include-group".format(**locals()) + "", definition={'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}, rule='type')
-                                                if isinstance(data__dependencygroups_val_item__includegroup, str):
-                                                    if not REGEX_PATTERNS['^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'].search(data__dependencygroups_val_item__includegroup):
-                                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}].include-group".format(**locals()) + " must match pattern ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$", value=data__dependencygroups_val_item__includegroup, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}].include-group".format(**locals()) + "", definition={'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}, rule='pattern')
-                                            if data__dependencygroups_val_item_keys:
-                                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must not contain "+str(data__dependencygroups_val_item_keys)+" properties", value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}, rule='additionalProperties')
-                                        data__dependencygroups_val_item_one_of_count1 += 1
-                                    except JsonSchemaValueException: pass
-                                if data__dependencygroups_val_item_one_of_count1 != 1:
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must be valid exactly by one definition" + (" (" + str(data__dependencygroups_val_item_one_of_count1) + " matches found)"), value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}, rule='oneOf')
-                if data__dependencygroups_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups must not contain "+str(data__dependencygroups_keys)+" properties", value=data__dependencygroups, name="" + (name_prefix or "data") + ".dependency-groups", definition={'type': 'object', 'description': 'Dependency groups following PEP 735', 'additionalProperties': False, 'patternProperties': {'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': {'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}}}, rule='additionalProperties')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-build-dependencies/', 'title': 'Data structure for ``pyproject.toml`` files', '$$description': ['File format containing build-time configurations for the Python ecosystem. ', ':pep:`517` initially defined a build-system independent format for source trees', 'which was complemented by :pep:`518` to provide a way of specifying dependencies ', 'for building Python projects.', 'Please notice the ``project`` table (as initially defined in  :pep:`621`) is not included', 'in this schema and should be considered separately.'], 'type': 'object', 'additionalProperties': False, 'properties': {'build-system': {'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'import-names': {'description': 'Lists import names which a project, when installed, would exclusively provide.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'import-namespaces': {'description': 'Lists import names that, when installed, would be provided by the project, but not exclusively.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, 'tool': {'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html', 'title': '``tool.distutils`` table', '$$description': ['**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``', 'subtables to configure arguments for ``distutils`` commands.', 'Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` commands via `distutils configuration files', '`_.', 'See also `the old Python docs _`.'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$ref': '#/definitions/package-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$ref': '#/definitions/package-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$ref': '#/definitions/ext-module'}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive-for-dependencies'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive-for-dependencies'}}}, 'readme': {'type': 'object', 'anyOf': [{'$ref': '#/definitions/file-directive'}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'$ref': '#/definitions/file-directive/properties/file'}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}, 'dependency-groups': {'type': 'object', 'description': 'Dependency groups following PEP 735', 'additionalProperties': False, 'patternProperties': {'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': {'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}}}}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'import-names': {'description': 'Lists import names which a project, when installed, would exclusively provide.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'import-namespaces': {'description': 'Lists import names that, when installed, would be provided by the project, but not exclusively.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='additionalProperties')
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, 'readme': {'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data_keys = set(data.keys())
-        if "platforms" in data_keys:
-            data_keys.remove("platforms")
-            data__platforms = data["platforms"]
-            if not isinstance(data__platforms, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".platforms must be array", value=data__platforms, name="" + (name_prefix or "data") + ".platforms", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__platforms_is_list = isinstance(data__platforms, (list, tuple))
-            if data__platforms_is_list:
-                data__platforms_len = len(data__platforms)
-                for data__platforms_x, data__platforms_item in enumerate(data__platforms):
-                    if not isinstance(data__platforms_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".platforms[{data__platforms_x}]".format(**locals()) + " must be string", value=data__platforms_item, name="" + (name_prefix or "data") + ".platforms[{data__platforms_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "provides" in data_keys:
-            data_keys.remove("provides")
-            data__provides = data["provides"]
-            if not isinstance(data__provides, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides must be array", value=data__provides, name="" + (name_prefix or "data") + ".provides", definition={'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, rule='type')
-            data__provides_is_list = isinstance(data__provides, (list, tuple))
-            if data__provides_is_list:
-                data__provides_len = len(data__provides)
-                for data__provides_x, data__provides_item in enumerate(data__provides):
-                    if not isinstance(data__provides_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + " must be string", value=data__provides_item, name="" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type')
-                    if isinstance(data__provides_item, str):
-                        if not custom_formats["pep508-identifier"](data__provides_item):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + " must be pep508-identifier", value=data__provides_item, name="" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format')
-        if "obsoletes" in data_keys:
-            data_keys.remove("obsoletes")
-            data__obsoletes = data["obsoletes"]
-            if not isinstance(data__obsoletes, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes must be array", value=data__obsoletes, name="" + (name_prefix or "data") + ".obsoletes", definition={'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, rule='type')
-            data__obsoletes_is_list = isinstance(data__obsoletes, (list, tuple))
-            if data__obsoletes_is_list:
-                data__obsoletes_len = len(data__obsoletes)
-                for data__obsoletes_x, data__obsoletes_item in enumerate(data__obsoletes):
-                    if not isinstance(data__obsoletes_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + " must be string", value=data__obsoletes_item, name="" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type')
-                    if isinstance(data__obsoletes_item, str):
-                        if not custom_formats["pep508-identifier"](data__obsoletes_item):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + " must be pep508-identifier", value=data__obsoletes_item, name="" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format')
-        if "zip-safe" in data_keys:
-            data_keys.remove("zip-safe")
-            data__zipsafe = data["zip-safe"]
-            if not isinstance(data__zipsafe, (bool)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".zip-safe must be boolean", value=data__zipsafe, name="" + (name_prefix or "data") + ".zip-safe", definition={'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, rule='type')
-        if "script-files" in data_keys:
-            data_keys.remove("script-files")
-            data__scriptfiles = data["script-files"]
-            if not isinstance(data__scriptfiles, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".script-files must be array", value=data__scriptfiles, name="" + (name_prefix or "data") + ".script-files", definition={'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, rule='type')
-            data__scriptfiles_is_list = isinstance(data__scriptfiles, (list, tuple))
-            if data__scriptfiles_is_list:
-                data__scriptfiles_len = len(data__scriptfiles)
-                for data__scriptfiles_x, data__scriptfiles_item in enumerate(data__scriptfiles):
-                    if not isinstance(data__scriptfiles_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".script-files[{data__scriptfiles_x}]".format(**locals()) + " must be string", value=data__scriptfiles_item, name="" + (name_prefix or "data") + ".script-files[{data__scriptfiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "eager-resources" in data_keys:
-            data_keys.remove("eager-resources")
-            data__eagerresources = data["eager-resources"]
-            if not isinstance(data__eagerresources, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".eager-resources must be array", value=data__eagerresources, name="" + (name_prefix or "data") + ".eager-resources", definition={'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__eagerresources_is_list = isinstance(data__eagerresources, (list, tuple))
-            if data__eagerresources_is_list:
-                data__eagerresources_len = len(data__eagerresources)
-                for data__eagerresources_x, data__eagerresources_item in enumerate(data__eagerresources):
-                    if not isinstance(data__eagerresources_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".eager-resources[{data__eagerresources_x}]".format(**locals()) + " must be string", value=data__eagerresources_item, name="" + (name_prefix or "data") + ".eager-resources[{data__eagerresources_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "packages" in data_keys:
-            data_keys.remove("packages")
-            data__packages = data["packages"]
-            data__packages_one_of_count2 = 0
-            if data__packages_one_of_count2 < 2:
-                try:
-                    if not isinstance(data__packages, (list, tuple)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages must be array", value=data__packages, name="" + (name_prefix or "data") + ".packages", definition={'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}}, rule='type')
-                    data__packages_is_list = isinstance(data__packages, (list, tuple))
-                    if data__packages_is_list:
-                        data__packages_len = len(data__packages)
-                        for data__packages_x, data__packages_item in enumerate(data__packages):
-                            validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_package_name(data__packages_item, custom_formats, (name_prefix or "data") + ".packages[{data__packages_x}]".format(**locals()))
-                    data__packages_one_of_count2 += 1
-                except JsonSchemaValueException: pass
-            if data__packages_one_of_count2 < 2:
-                try:
-                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_find_directive(data__packages, custom_formats, (name_prefix or "data") + ".packages")
-                    data__packages_one_of_count2 += 1
-                except JsonSchemaValueException: pass
-            if data__packages_one_of_count2 != 1:
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages must be valid exactly by one definition" + (" (" + str(data__packages_one_of_count2) + " matches found)"), value=data__packages, name="" + (name_prefix or "data") + ".packages", definition={'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, rule='oneOf')
-        if "package-dir" in data_keys:
-            data_keys.remove("package-dir")
-            data__packagedir = data["package-dir"]
-            if not isinstance(data__packagedir, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be object", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='type')
-            data__packagedir_is_dict = isinstance(data__packagedir, dict)
-            if data__packagedir_is_dict:
-                data__packagedir_keys = set(data__packagedir.keys())
-                for data__packagedir_key, data__packagedir_val in data__packagedir.items():
-                    if REGEX_PATTERNS['^.*$'].search(data__packagedir_key):
-                        if data__packagedir_key in data__packagedir_keys:
-                            data__packagedir_keys.remove(data__packagedir_key)
-                        if not isinstance(data__packagedir_val, (str)):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir.{data__packagedir_key}".format(**locals()) + " must be string", value=data__packagedir_val, name="" + (name_prefix or "data") + ".package-dir.{data__packagedir_key}".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                if data__packagedir_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must not contain "+str(data__packagedir_keys)+" properties", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='additionalProperties')
-                data__packagedir_len = len(data__packagedir)
-                if data__packagedir_len != 0:
-                    data__packagedir_property_names = True
-                    for data__packagedir_key in data__packagedir:
-                        try:
-                            data__packagedir_key_any_of_count3 = 0
-                            if not data__packagedir_key_any_of_count3:
-                                try:
-                                    if data__packagedir_key != "":
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be same as const definition: ", value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'const': ''}, rule='const')
-                                    data__packagedir_key_any_of_count3 += 1
-                                except JsonSchemaValueException: pass
-                            if not data__packagedir_key_any_of_count3:
-                                try:
-                                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_package_name(data__packagedir_key, custom_formats, (name_prefix or "data") + ".package-dir")
-                                    data__packagedir_key_any_of_count3 += 1
-                                except JsonSchemaValueException: pass
-                            if not data__packagedir_key_any_of_count3:
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir cannot be validated by any definition", value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, rule='anyOf')
-                        except JsonSchemaValueException:
-                            data__packagedir_property_names = False
-                    if not data__packagedir_property_names:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be named by propertyName definition", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='propertyNames')
-        if "package-data" in data_keys:
-            data_keys.remove("package-data")
-            data__packagedata = data["package-data"]
-            if not isinstance(data__packagedata, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be object", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type')
-            data__packagedata_is_dict = isinstance(data__packagedata, dict)
-            if data__packagedata_is_dict:
-                data__packagedata_keys = set(data__packagedata.keys())
-                for data__packagedata_key, data__packagedata_val in data__packagedata.items():
-                    if REGEX_PATTERNS['^.*$'].search(data__packagedata_key):
-                        if data__packagedata_key in data__packagedata_keys:
-                            data__packagedata_keys.remove(data__packagedata_key)
-                        if not isinstance(data__packagedata_val, (list, tuple)):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data.{data__packagedata_key}".format(**locals()) + " must be array", value=data__packagedata_val, name="" + (name_prefix or "data") + ".package-data.{data__packagedata_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-                        data__packagedata_val_is_list = isinstance(data__packagedata_val, (list, tuple))
-                        if data__packagedata_val_is_list:
-                            data__packagedata_val_len = len(data__packagedata_val)
-                            for data__packagedata_val_x, data__packagedata_val_item in enumerate(data__packagedata_val):
-                                if not isinstance(data__packagedata_val_item, (str)):
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data.{data__packagedata_key}[{data__packagedata_val_x}]".format(**locals()) + " must be string", value=data__packagedata_val_item, name="" + (name_prefix or "data") + ".package-data.{data__packagedata_key}[{data__packagedata_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                if data__packagedata_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must not contain "+str(data__packagedata_keys)+" properties", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='additionalProperties')
-                data__packagedata_len = len(data__packagedata)
-                if data__packagedata_len != 0:
-                    data__packagedata_property_names = True
-                    for data__packagedata_key in data__packagedata:
-                        try:
-                            data__packagedata_key_any_of_count4 = 0
-                            if not data__packagedata_key_any_of_count4:
-                                try:
-                                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_package_name(data__packagedata_key, custom_formats, (name_prefix or "data") + ".package-data")
-                                    data__packagedata_key_any_of_count4 += 1
-                                except JsonSchemaValueException: pass
-                            if not data__packagedata_key_any_of_count4:
-                                try:
-                                    if data__packagedata_key != "*":
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be same as const definition: *", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'const': '*'}, rule='const')
-                                    data__packagedata_key_any_of_count4 += 1
-                                except JsonSchemaValueException: pass
-                            if not data__packagedata_key_any_of_count4:
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data cannot be validated by any definition", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, rule='anyOf')
-                        except JsonSchemaValueException:
-                            data__packagedata_property_names = False
-                    if not data__packagedata_property_names:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be named by propertyName definition", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='propertyNames')
-        if "include-package-data" in data_keys:
-            data_keys.remove("include-package-data")
-            data__includepackagedata = data["include-package-data"]
-            if not isinstance(data__includepackagedata, (bool)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".include-package-data must be boolean", value=data__includepackagedata, name="" + (name_prefix or "data") + ".include-package-data", definition={'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, rule='type')
-        if "exclude-package-data" in data_keys:
-            data_keys.remove("exclude-package-data")
-            data__excludepackagedata = data["exclude-package-data"]
-            if not isinstance(data__excludepackagedata, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be object", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type')
-            data__excludepackagedata_is_dict = isinstance(data__excludepackagedata, dict)
-            if data__excludepackagedata_is_dict:
-                data__excludepackagedata_keys = set(data__excludepackagedata.keys())
-                for data__excludepackagedata_key, data__excludepackagedata_val in data__excludepackagedata.items():
-                    if REGEX_PATTERNS['^.*$'].search(data__excludepackagedata_key):
-                        if data__excludepackagedata_key in data__excludepackagedata_keys:
-                            data__excludepackagedata_keys.remove(data__excludepackagedata_key)
-                        if not isinstance(data__excludepackagedata_val, (list, tuple)):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}".format(**locals()) + " must be array", value=data__excludepackagedata_val, name="" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-                        data__excludepackagedata_val_is_list = isinstance(data__excludepackagedata_val, (list, tuple))
-                        if data__excludepackagedata_val_is_list:
-                            data__excludepackagedata_val_len = len(data__excludepackagedata_val)
-                            for data__excludepackagedata_val_x, data__excludepackagedata_val_item in enumerate(data__excludepackagedata_val):
-                                if not isinstance(data__excludepackagedata_val_item, (str)):
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]".format(**locals()) + " must be string", value=data__excludepackagedata_val_item, name="" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                if data__excludepackagedata_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must not contain "+str(data__excludepackagedata_keys)+" properties", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='additionalProperties')
-                data__excludepackagedata_len = len(data__excludepackagedata)
-                if data__excludepackagedata_len != 0:
-                    data__excludepackagedata_property_names = True
-                    for data__excludepackagedata_key in data__excludepackagedata:
-                        try:
-                            data__excludepackagedata_key_any_of_count5 = 0
-                            if not data__excludepackagedata_key_any_of_count5:
-                                try:
-                                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_package_name(data__excludepackagedata_key, custom_formats, (name_prefix or "data") + ".exclude-package-data")
-                                    data__excludepackagedata_key_any_of_count5 += 1
-                                except JsonSchemaValueException: pass
-                            if not data__excludepackagedata_key_any_of_count5:
-                                try:
-                                    if data__excludepackagedata_key != "*":
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be same as const definition: *", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'const': '*'}, rule='const')
-                                    data__excludepackagedata_key_any_of_count5 += 1
-                                except JsonSchemaValueException: pass
-                            if not data__excludepackagedata_key_any_of_count5:
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data cannot be validated by any definition", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, rule='anyOf')
-                        except JsonSchemaValueException:
-                            data__excludepackagedata_property_names = False
-                    if not data__excludepackagedata_property_names:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be named by propertyName definition", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='propertyNames')
-        if "namespace-packages" in data_keys:
-            data_keys.remove("namespace-packages")
-            data__namespacepackages = data["namespace-packages"]
-            if not isinstance(data__namespacepackages, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages must be array", value=data__namespacepackages, name="" + (name_prefix or "data") + ".namespace-packages", definition={'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, rule='type')
-            data__namespacepackages_is_list = isinstance(data__namespacepackages, (list, tuple))
-            if data__namespacepackages_is_list:
-                data__namespacepackages_len = len(data__namespacepackages)
-                for data__namespacepackages_x, data__namespacepackages_item in enumerate(data__namespacepackages):
-                    if not isinstance(data__namespacepackages_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + " must be string", value=data__namespacepackages_item, name="" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='type')
-                    if isinstance(data__namespacepackages_item, str):
-                        if not custom_formats["python-module-name-relaxed"](data__namespacepackages_item):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + " must be python-module-name-relaxed", value=data__namespacepackages_item, name="" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='format')
-        if "py-modules" in data_keys:
-            data_keys.remove("py-modules")
-            data__pymodules = data["py-modules"]
-            if not isinstance(data__pymodules, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules must be array", value=data__pymodules, name="" + (name_prefix or "data") + ".py-modules", definition={'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, rule='type')
-            data__pymodules_is_list = isinstance(data__pymodules, (list, tuple))
-            if data__pymodules_is_list:
-                data__pymodules_len = len(data__pymodules)
-                for data__pymodules_x, data__pymodules_item in enumerate(data__pymodules):
-                    if not isinstance(data__pymodules_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + " must be string", value=data__pymodules_item, name="" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='type')
-                    if isinstance(data__pymodules_item, str):
-                        if not custom_formats["python-module-name-relaxed"](data__pymodules_item):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + " must be python-module-name-relaxed", value=data__pymodules_item, name="" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='format')
-        if "ext-modules" in data_keys:
-            data_keys.remove("ext-modules")
-            data__extmodules = data["ext-modules"]
-            if not isinstance(data__extmodules, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".ext-modules must be array", value=data__extmodules, name="" + (name_prefix or "data") + ".ext-modules", definition={'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}}, rule='type')
-            data__extmodules_is_list = isinstance(data__extmodules, (list, tuple))
-            if data__extmodules_is_list:
-                data__extmodules_len = len(data__extmodules)
-                for data__extmodules_x, data__extmodules_item in enumerate(data__extmodules):
-                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_ext_module(data__extmodules_item, custom_formats, (name_prefix or "data") + ".ext-modules[{data__extmodules_x}]".format(**locals()))
-        if "data-files" in data_keys:
-            data_keys.remove("data-files")
-            data__datafiles = data["data-files"]
-            if not isinstance(data__datafiles, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files must be object", value=data__datafiles, name="" + (name_prefix or "data") + ".data-files", definition={'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type')
-            data__datafiles_is_dict = isinstance(data__datafiles, dict)
-            if data__datafiles_is_dict:
-                data__datafiles_keys = set(data__datafiles.keys())
-                for data__datafiles_key, data__datafiles_val in data__datafiles.items():
-                    if REGEX_PATTERNS['^.*$'].search(data__datafiles_key):
-                        if data__datafiles_key in data__datafiles_keys:
-                            data__datafiles_keys.remove(data__datafiles_key)
-                        if not isinstance(data__datafiles_val, (list, tuple)):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files.{data__datafiles_key}".format(**locals()) + " must be array", value=data__datafiles_val, name="" + (name_prefix or "data") + ".data-files.{data__datafiles_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-                        data__datafiles_val_is_list = isinstance(data__datafiles_val, (list, tuple))
-                        if data__datafiles_val_is_list:
-                            data__datafiles_val_len = len(data__datafiles_val)
-                            for data__datafiles_val_x, data__datafiles_val_item in enumerate(data__datafiles_val):
-                                if not isinstance(data__datafiles_val_item, (str)):
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files.{data__datafiles_key}[{data__datafiles_val_x}]".format(**locals()) + " must be string", value=data__datafiles_val_item, name="" + (name_prefix or "data") + ".data-files.{data__datafiles_key}[{data__datafiles_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "cmdclass" in data_keys:
-            data_keys.remove("cmdclass")
-            data__cmdclass = data["cmdclass"]
-            if not isinstance(data__cmdclass, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass must be object", value=data__cmdclass, name="" + (name_prefix or "data") + ".cmdclass", definition={'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, rule='type')
-            data__cmdclass_is_dict = isinstance(data__cmdclass, dict)
-            if data__cmdclass_is_dict:
-                data__cmdclass_keys = set(data__cmdclass.keys())
-                for data__cmdclass_key, data__cmdclass_val in data__cmdclass.items():
-                    if REGEX_PATTERNS['^.*$'].search(data__cmdclass_key):
-                        if data__cmdclass_key in data__cmdclass_keys:
-                            data__cmdclass_keys.remove(data__cmdclass_key)
-                        if not isinstance(data__cmdclass_val, (str)):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + " must be string", value=data__cmdclass_val, name="" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='type')
-                        if isinstance(data__cmdclass_val, str):
-                            if not custom_formats["python-qualified-identifier"](data__cmdclass_val):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + " must be python-qualified-identifier", value=data__cmdclass_val, name="" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='format')
-        if "license-files" in data_keys:
-            data_keys.remove("license-files")
-            data__licensefiles = data["license-files"]
-            if not isinstance(data__licensefiles, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files must be array", value=data__licensefiles, name="" + (name_prefix or "data") + ".license-files", definition={'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, rule='type')
-            data__licensefiles_is_list = isinstance(data__licensefiles, (list, tuple))
-            if data__licensefiles_is_list:
-                data__licensefiles_len = len(data__licensefiles)
-                for data__licensefiles_x, data__licensefiles_item in enumerate(data__licensefiles):
-                    if not isinstance(data__licensefiles_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + " must be string", value=data__licensefiles_item, name="" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "dynamic" in data_keys:
-            data_keys.remove("dynamic")
-            data__dynamic = data["dynamic"]
-            if not isinstance(data__dynamic, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be object", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, 'readme': {'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}}}, rule='type')
-            data__dynamic_is_dict = isinstance(data__dynamic, dict)
-            if data__dynamic_is_dict:
-                data__dynamic_keys = set(data__dynamic.keys())
-                if "version" in data__dynamic_keys:
-                    data__dynamic_keys.remove("version")
-                    data__dynamic__version = data__dynamic["version"]
-                    data__dynamic__version_one_of_count6 = 0
-                    if data__dynamic__version_one_of_count6 < 2:
-                        try:
-                            validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_attr_directive(data__dynamic__version, custom_formats, (name_prefix or "data") + ".dynamic.version")
-                            data__dynamic__version_one_of_count6 += 1
-                        except JsonSchemaValueException: pass
-                    if data__dynamic__version_one_of_count6 < 2:
-                        try:
-                            validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__version, custom_formats, (name_prefix or "data") + ".dynamic.version")
-                            data__dynamic__version_one_of_count6 += 1
-                        except JsonSchemaValueException: pass
-                    if data__dynamic__version_one_of_count6 != 1:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.version must be valid exactly by one definition" + (" (" + str(data__dynamic__version_one_of_count6) + " matches found)"), value=data__dynamic__version, name="" + (name_prefix or "data") + ".dynamic.version", definition={'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, rule='oneOf')
-                if "classifiers" in data__dynamic_keys:
-                    data__dynamic_keys.remove("classifiers")
-                    data__dynamic__classifiers = data__dynamic["classifiers"]
-                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__classifiers, custom_formats, (name_prefix or "data") + ".dynamic.classifiers")
-                if "description" in data__dynamic_keys:
-                    data__dynamic_keys.remove("description")
-                    data__dynamic__description = data__dynamic["description"]
-                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__description, custom_formats, (name_prefix or "data") + ".dynamic.description")
-                if "entry-points" in data__dynamic_keys:
-                    data__dynamic_keys.remove("entry-points")
-                    data__dynamic__entrypoints = data__dynamic["entry-points"]
-                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__entrypoints, custom_formats, (name_prefix or "data") + ".dynamic.entry-points")
-                if "dependencies" in data__dynamic_keys:
-                    data__dynamic_keys.remove("dependencies")
-                    data__dynamic__dependencies = data__dynamic["dependencies"]
-                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_for_dependencies(data__dynamic__dependencies, custom_formats, (name_prefix or "data") + ".dynamic.dependencies")
-                if "optional-dependencies" in data__dynamic_keys:
-                    data__dynamic_keys.remove("optional-dependencies")
-                    data__dynamic__optionaldependencies = data__dynamic["optional-dependencies"]
-                    if not isinstance(data__dynamic__optionaldependencies, (dict)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be object", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, rule='type')
-                    data__dynamic__optionaldependencies_is_dict = isinstance(data__dynamic__optionaldependencies, dict)
-                    if data__dynamic__optionaldependencies_is_dict:
-                        data__dynamic__optionaldependencies_keys = set(data__dynamic__optionaldependencies.keys())
-                        for data__dynamic__optionaldependencies_key, data__dynamic__optionaldependencies_val in data__dynamic__optionaldependencies.items():
-                            if REGEX_PATTERNS['.+'].search(data__dynamic__optionaldependencies_key):
-                                if data__dynamic__optionaldependencies_key in data__dynamic__optionaldependencies_keys:
-                                    data__dynamic__optionaldependencies_keys.remove(data__dynamic__optionaldependencies_key)
-                                validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_for_dependencies(data__dynamic__optionaldependencies_val, custom_formats, (name_prefix or "data") + ".dynamic.optional-dependencies.{data__dynamic__optionaldependencies_key}".format(**locals()))
-                        if data__dynamic__optionaldependencies_keys:
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must not contain "+str(data__dynamic__optionaldependencies_keys)+" properties", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, rule='additionalProperties')
-                        data__dynamic__optionaldependencies_len = len(data__dynamic__optionaldependencies)
-                        if data__dynamic__optionaldependencies_len != 0:
-                            data__dynamic__optionaldependencies_property_names = True
-                            for data__dynamic__optionaldependencies_key in data__dynamic__optionaldependencies:
-                                try:
-                                    if not isinstance(data__dynamic__optionaldependencies_key, (str)):
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be string", value=data__dynamic__optionaldependencies_key, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type')
-                                    if isinstance(data__dynamic__optionaldependencies_key, str):
-                                        if not custom_formats["pep508-identifier"](data__dynamic__optionaldependencies_key):
-                                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be pep508-identifier", value=data__dynamic__optionaldependencies_key, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format')
-                                except JsonSchemaValueException:
-                                    data__dynamic__optionaldependencies_property_names = False
-                            if not data__dynamic__optionaldependencies_property_names:
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be named by propertyName definition", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, rule='propertyNames')
-                if "readme" in data__dynamic_keys:
-                    data__dynamic_keys.remove("readme")
-                    data__dynamic__readme = data__dynamic["readme"]
-                    if not isinstance(data__dynamic__readme, (dict)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must be object", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}, rule='type')
-                    data__dynamic__readme_any_of_count7 = 0
-                    if not data__dynamic__readme_any_of_count7:
-                        try:
-                            validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__readme, custom_formats, (name_prefix or "data") + ".dynamic.readme")
-                            data__dynamic__readme_any_of_count7 += 1
-                        except JsonSchemaValueException: pass
-                    if not data__dynamic__readme_any_of_count7:
-                        try:
-                            if not isinstance(data__dynamic__readme, (dict)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must be object", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}, rule='type')
-                            data__dynamic__readme_is_dict = isinstance(data__dynamic__readme, dict)
-                            if data__dynamic__readme_is_dict:
-                                data__dynamic__readme_keys = set(data__dynamic__readme.keys())
-                                if "content-type" in data__dynamic__readme_keys:
-                                    data__dynamic__readme_keys.remove("content-type")
-                                    data__dynamic__readme__contenttype = data__dynamic__readme["content-type"]
-                                    if not isinstance(data__dynamic__readme__contenttype, (str)):
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme.content-type must be string", value=data__dynamic__readme__contenttype, name="" + (name_prefix or "data") + ".dynamic.readme.content-type", definition={'type': 'string'}, rule='type')
-                                if "file" in data__dynamic__readme_keys:
-                                    data__dynamic__readme_keys.remove("file")
-                                    data__dynamic__readme__file = data__dynamic__readme["file"]
-                                    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_properties_file(data__dynamic__readme__file, custom_formats, (name_prefix or "data") + ".dynamic.readme.file")
-                                if data__dynamic__readme_keys:
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must not contain "+str(data__dynamic__readme_keys)+" properties", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}, rule='additionalProperties')
-                            data__dynamic__readme_any_of_count7 += 1
-                        except JsonSchemaValueException: pass
-                    if not data__dynamic__readme_any_of_count7:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme cannot be validated by any definition", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}, rule='anyOf')
-                    data__dynamic__readme_is_dict = isinstance(data__dynamic__readme, dict)
-                    if data__dynamic__readme_is_dict:
-                        data__dynamic__readme__missing_keys = set(['file']) - data__dynamic__readme.keys()
-                        if data__dynamic__readme__missing_keys:
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must contain " + (str(sorted(data__dynamic__readme__missing_keys)) + " properties"), value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}, rule='required')
-                if data__dynamic_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must not contain "+str(data__dynamic_keys)+" properties", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, 'readme': {'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}}}, rule='additionalProperties')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', '    cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, 'readme': {'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}, rule='additionalProperties')
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_properties_file(data, custom_formats={}, name_prefix=None):
-    data_one_of_count8 = 0
-    if data_one_of_count8 < 2:
-        try:
-            if not isinstance(data, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string'}, rule='type')
-            data_one_of_count8 += 1
-        except JsonSchemaValueException: pass
-    if data_one_of_count8 < 2:
-        try:
-            if not isinstance(data, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + " must be array", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data_is_list = isinstance(data, (list, tuple))
-            if data_is_list:
-                data_len = len(data)
-                for data_x, data_item in enumerate(data):
-                    if not isinstance(data_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + "[{data_x}]".format(**locals()) + " must be string", value=data_item, name="" + (name_prefix or "data") + "[{data_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-            data_one_of_count8 += 1
-        except JsonSchemaValueException: pass
-    if data_one_of_count8 != 1:
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be valid exactly by one definition" + (" (" + str(data_one_of_count8) + " matches found)"), value=data, name="" + (name_prefix or "data") + "", definition={'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, rule='oneOf')
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_for_dependencies(data, custom_formats={}, name_prefix=None):
-    validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data, custom_formats, (name_prefix or "data") + "")
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data__missing_keys = set(['file']) - data.keys()
-        if data__missing_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='required')
-        data_keys = set(data.keys())
-        if "file" in data_keys:
-            data_keys.remove("file")
-            data__file = data["file"]
-            data__file_one_of_count9 = 0
-            if data__file_one_of_count9 < 2:
-                try:
-                    if not isinstance(data__file, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be string", value=data__file, name="" + (name_prefix or "data") + ".file", definition={'type': 'string'}, rule='type')
-                    data__file_one_of_count9 += 1
-                except JsonSchemaValueException: pass
-            if data__file_one_of_count9 < 2:
-                try:
-                    if not isinstance(data__file, (list, tuple)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be array", value=data__file, name="" + (name_prefix or "data") + ".file", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-                    data__file_is_list = isinstance(data__file, (list, tuple))
-                    if data__file_is_list:
-                        data__file_len = len(data__file)
-                        for data__file_x, data__file_item in enumerate(data__file):
-                            if not isinstance(data__file_item, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".file[{data__file_x}]".format(**locals()) + " must be string", value=data__file_item, name="" + (name_prefix or "data") + ".file[{data__file_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                    data__file_one_of_count9 += 1
-                except JsonSchemaValueException: pass
-            if data__file_one_of_count9 != 1:
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be valid exactly by one definition" + (" (" + str(data__file_one_of_count9) + " matches found)"), value=data__file, name="" + (name_prefix or "data") + ".file", definition={'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, rule='oneOf')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='additionalProperties')
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_attr_directive(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data__missing_keys = set(['attr']) - data.keys()
-        if data__missing_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, rule='required')
-        data_keys = set(data.keys())
-        if "attr" in data_keys:
-            data_keys.remove("attr")
-            data__attr = data["attr"]
-            if not isinstance(data__attr, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".attr must be string", value=data__attr, name="" + (name_prefix or "data") + ".attr", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='type')
-            if isinstance(data__attr, str):
-                if not custom_formats["python-qualified-identifier"](data__attr):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".attr must be python-qualified-identifier", value=data__attr, name="" + (name_prefix or "data") + ".attr", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='format')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, rule='additionalProperties')
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_ext_module(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data__missing_keys = set(['name', 'sources']) - data.keys()
-        if data__missing_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, rule='required')
-        data_keys = set(data.keys())
-        if "name" in data_keys:
-            data_keys.remove("name")
-            data__name = data["name"]
-            if not isinstance(data__name, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='type')
-            if isinstance(data__name, str):
-                if not custom_formats["python-module-name-relaxed"](data__name):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be python-module-name-relaxed", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='format')
-        if "sources" in data_keys:
-            data_keys.remove("sources")
-            data__sources = data["sources"]
-            if not isinstance(data__sources, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".sources must be array", value=data__sources, name="" + (name_prefix or "data") + ".sources", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__sources_is_list = isinstance(data__sources, (list, tuple))
-            if data__sources_is_list:
-                data__sources_len = len(data__sources)
-                for data__sources_x, data__sources_item in enumerate(data__sources):
-                    if not isinstance(data__sources_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".sources[{data__sources_x}]".format(**locals()) + " must be string", value=data__sources_item, name="" + (name_prefix or "data") + ".sources[{data__sources_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "include-dirs" in data_keys:
-            data_keys.remove("include-dirs")
-            data__includedirs = data["include-dirs"]
-            if not isinstance(data__includedirs, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".include-dirs must be array", value=data__includedirs, name="" + (name_prefix or "data") + ".include-dirs", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__includedirs_is_list = isinstance(data__includedirs, (list, tuple))
-            if data__includedirs_is_list:
-                data__includedirs_len = len(data__includedirs)
-                for data__includedirs_x, data__includedirs_item in enumerate(data__includedirs):
-                    if not isinstance(data__includedirs_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".include-dirs[{data__includedirs_x}]".format(**locals()) + " must be string", value=data__includedirs_item, name="" + (name_prefix or "data") + ".include-dirs[{data__includedirs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "define-macros" in data_keys:
-            data_keys.remove("define-macros")
-            data__definemacros = data["define-macros"]
-            if not isinstance(data__definemacros, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros must be array", value=data__definemacros, name="" + (name_prefix or "data") + ".define-macros", definition={'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, rule='type')
-            data__definemacros_is_list = isinstance(data__definemacros, (list, tuple))
-            if data__definemacros_is_list:
-                data__definemacros_len = len(data__definemacros)
-                for data__definemacros_x, data__definemacros_item in enumerate(data__definemacros):
-                    if not isinstance(data__definemacros_item, (list, tuple)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}]".format(**locals()) + " must be array", value=data__definemacros_item, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}]".format(**locals()) + "", definition={'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}, rule='type')
-                    data__definemacros_item_is_list = isinstance(data__definemacros_item, (list, tuple))
-                    if data__definemacros_item_is_list:
-                        data__definemacros_item_len = len(data__definemacros_item)
-                        if data__definemacros_item_len > 0:
-                            data__definemacros_item__0 = data__definemacros_item[0]
-                            if not isinstance(data__definemacros_item__0, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][0]".format(**locals()) + " must be string", value=data__definemacros_item__0, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][0]".format(**locals()) + "", definition={'description': 'macro name', 'type': 'string'}, rule='type')
-                        if data__definemacros_item_len > 1:
-                            data__definemacros_item__1 = data__definemacros_item[1]
-                            data__definemacros_item__1_one_of_count10 = 0
-                            if data__definemacros_item__1_one_of_count10 < 2:
-                                try:
-                                    if not isinstance(data__definemacros_item__1, (str)):
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + " must be string", value=data__definemacros_item__1, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                                    data__definemacros_item__1_one_of_count10 += 1
-                                except JsonSchemaValueException: pass
-                            if data__definemacros_item__1_one_of_count10 < 2:
-                                try:
-                                    if not isinstance(data__definemacros_item__1, (NoneType)):
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + " must be null", value=data__definemacros_item__1, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + "", definition={'type': 'null'}, rule='type')
-                                    data__definemacros_item__1_one_of_count10 += 1
-                                except JsonSchemaValueException: pass
-                            if data__definemacros_item__1_one_of_count10 != 1:
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + " must be valid exactly by one definition" + (" (" + str(data__definemacros_item__1_one_of_count10) + " matches found)"), value=data__definemacros_item__1, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + "", definition={'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}, rule='oneOf')
-                        if data__definemacros_item_len > 2:
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}]".format(**locals()) + " must contain only specified items", value=data__definemacros_item, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}]".format(**locals()) + "", definition={'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}, rule='items')
-        if "undef-macros" in data_keys:
-            data_keys.remove("undef-macros")
-            data__undefmacros = data["undef-macros"]
-            if not isinstance(data__undefmacros, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".undef-macros must be array", value=data__undefmacros, name="" + (name_prefix or "data") + ".undef-macros", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__undefmacros_is_list = isinstance(data__undefmacros, (list, tuple))
-            if data__undefmacros_is_list:
-                data__undefmacros_len = len(data__undefmacros)
-                for data__undefmacros_x, data__undefmacros_item in enumerate(data__undefmacros):
-                    if not isinstance(data__undefmacros_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".undef-macros[{data__undefmacros_x}]".format(**locals()) + " must be string", value=data__undefmacros_item, name="" + (name_prefix or "data") + ".undef-macros[{data__undefmacros_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "library-dirs" in data_keys:
-            data_keys.remove("library-dirs")
-            data__librarydirs = data["library-dirs"]
-            if not isinstance(data__librarydirs, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".library-dirs must be array", value=data__librarydirs, name="" + (name_prefix or "data") + ".library-dirs", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__librarydirs_is_list = isinstance(data__librarydirs, (list, tuple))
-            if data__librarydirs_is_list:
-                data__librarydirs_len = len(data__librarydirs)
-                for data__librarydirs_x, data__librarydirs_item in enumerate(data__librarydirs):
-                    if not isinstance(data__librarydirs_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".library-dirs[{data__librarydirs_x}]".format(**locals()) + " must be string", value=data__librarydirs_item, name="" + (name_prefix or "data") + ".library-dirs[{data__librarydirs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "libraries" in data_keys:
-            data_keys.remove("libraries")
-            data__libraries = data["libraries"]
-            if not isinstance(data__libraries, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".libraries must be array", value=data__libraries, name="" + (name_prefix or "data") + ".libraries", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__libraries_is_list = isinstance(data__libraries, (list, tuple))
-            if data__libraries_is_list:
-                data__libraries_len = len(data__libraries)
-                for data__libraries_x, data__libraries_item in enumerate(data__libraries):
-                    if not isinstance(data__libraries_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".libraries[{data__libraries_x}]".format(**locals()) + " must be string", value=data__libraries_item, name="" + (name_prefix or "data") + ".libraries[{data__libraries_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "runtime-library-dirs" in data_keys:
-            data_keys.remove("runtime-library-dirs")
-            data__runtimelibrarydirs = data["runtime-library-dirs"]
-            if not isinstance(data__runtimelibrarydirs, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".runtime-library-dirs must be array", value=data__runtimelibrarydirs, name="" + (name_prefix or "data") + ".runtime-library-dirs", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__runtimelibrarydirs_is_list = isinstance(data__runtimelibrarydirs, (list, tuple))
-            if data__runtimelibrarydirs_is_list:
-                data__runtimelibrarydirs_len = len(data__runtimelibrarydirs)
-                for data__runtimelibrarydirs_x, data__runtimelibrarydirs_item in enumerate(data__runtimelibrarydirs):
-                    if not isinstance(data__runtimelibrarydirs_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".runtime-library-dirs[{data__runtimelibrarydirs_x}]".format(**locals()) + " must be string", value=data__runtimelibrarydirs_item, name="" + (name_prefix or "data") + ".runtime-library-dirs[{data__runtimelibrarydirs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "extra-objects" in data_keys:
-            data_keys.remove("extra-objects")
-            data__extraobjects = data["extra-objects"]
-            if not isinstance(data__extraobjects, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-objects must be array", value=data__extraobjects, name="" + (name_prefix or "data") + ".extra-objects", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__extraobjects_is_list = isinstance(data__extraobjects, (list, tuple))
-            if data__extraobjects_is_list:
-                data__extraobjects_len = len(data__extraobjects)
-                for data__extraobjects_x, data__extraobjects_item in enumerate(data__extraobjects):
-                    if not isinstance(data__extraobjects_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-objects[{data__extraobjects_x}]".format(**locals()) + " must be string", value=data__extraobjects_item, name="" + (name_prefix or "data") + ".extra-objects[{data__extraobjects_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "extra-compile-args" in data_keys:
-            data_keys.remove("extra-compile-args")
-            data__extracompileargs = data["extra-compile-args"]
-            if not isinstance(data__extracompileargs, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-compile-args must be array", value=data__extracompileargs, name="" + (name_prefix or "data") + ".extra-compile-args", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__extracompileargs_is_list = isinstance(data__extracompileargs, (list, tuple))
-            if data__extracompileargs_is_list:
-                data__extracompileargs_len = len(data__extracompileargs)
-                for data__extracompileargs_x, data__extracompileargs_item in enumerate(data__extracompileargs):
-                    if not isinstance(data__extracompileargs_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-compile-args[{data__extracompileargs_x}]".format(**locals()) + " must be string", value=data__extracompileargs_item, name="" + (name_prefix or "data") + ".extra-compile-args[{data__extracompileargs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "extra-link-args" in data_keys:
-            data_keys.remove("extra-link-args")
-            data__extralinkargs = data["extra-link-args"]
-            if not isinstance(data__extralinkargs, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-link-args must be array", value=data__extralinkargs, name="" + (name_prefix or "data") + ".extra-link-args", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__extralinkargs_is_list = isinstance(data__extralinkargs, (list, tuple))
-            if data__extralinkargs_is_list:
-                data__extralinkargs_len = len(data__extralinkargs)
-                for data__extralinkargs_x, data__extralinkargs_item in enumerate(data__extralinkargs):
-                    if not isinstance(data__extralinkargs_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-link-args[{data__extralinkargs_x}]".format(**locals()) + " must be string", value=data__extralinkargs_item, name="" + (name_prefix or "data") + ".extra-link-args[{data__extralinkargs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "export-symbols" in data_keys:
-            data_keys.remove("export-symbols")
-            data__exportsymbols = data["export-symbols"]
-            if not isinstance(data__exportsymbols, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".export-symbols must be array", value=data__exportsymbols, name="" + (name_prefix or "data") + ".export-symbols", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__exportsymbols_is_list = isinstance(data__exportsymbols, (list, tuple))
-            if data__exportsymbols_is_list:
-                data__exportsymbols_len = len(data__exportsymbols)
-                for data__exportsymbols_x, data__exportsymbols_item in enumerate(data__exportsymbols):
-                    if not isinstance(data__exportsymbols_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".export-symbols[{data__exportsymbols_x}]".format(**locals()) + " must be string", value=data__exportsymbols_item, name="" + (name_prefix or "data") + ".export-symbols[{data__exportsymbols_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "swig-opts" in data_keys:
-            data_keys.remove("swig-opts")
-            data__swigopts = data["swig-opts"]
-            if not isinstance(data__swigopts, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".swig-opts must be array", value=data__swigopts, name="" + (name_prefix or "data") + ".swig-opts", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__swigopts_is_list = isinstance(data__swigopts, (list, tuple))
-            if data__swigopts_is_list:
-                data__swigopts_len = len(data__swigopts)
-                for data__swigopts_x, data__swigopts_item in enumerate(data__swigopts):
-                    if not isinstance(data__swigopts_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".swig-opts[{data__swigopts_x}]".format(**locals()) + " must be string", value=data__swigopts_item, name="" + (name_prefix or "data") + ".swig-opts[{data__swigopts_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "depends" in data_keys:
-            data_keys.remove("depends")
-            data__depends = data["depends"]
-            if not isinstance(data__depends, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".depends must be array", value=data__depends, name="" + (name_prefix or "data") + ".depends", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__depends_is_list = isinstance(data__depends, (list, tuple))
-            if data__depends_is_list:
-                data__depends_len = len(data__depends)
-                for data__depends_x, data__depends_item in enumerate(data__depends):
-                    if not isinstance(data__depends_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".depends[{data__depends_x}]".format(**locals()) + " must be string", value=data__depends_item, name="" + (name_prefix or "data") + ".depends[{data__depends_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "language" in data_keys:
-            data_keys.remove("language")
-            data__language = data["language"]
-            if not isinstance(data__language, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".language must be string", value=data__language, name="" + (name_prefix or "data") + ".language", definition={'type': 'string'}, rule='type')
-        if "optional" in data_keys:
-            data_keys.remove("optional")
-            data__optional = data["optional"]
-            if not isinstance(data__optional, (bool)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional must be boolean", value=data__optional, name="" + (name_prefix or "data") + ".optional", definition={'type': 'boolean'}, rule='type')
-        if "py-limited-api" in data_keys:
-            data_keys.remove("py-limited-api")
-            data__pylimitedapi = data["py-limited-api"]
-            if not isinstance(data__pylimitedapi, (bool)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-limited-api must be boolean", value=data__pylimitedapi, name="" + (name_prefix or "data") + ".py-limited-api", definition={'type': 'boolean'}, rule='type')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, rule='additionalProperties')
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_find_directive(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data_keys = set(data.keys())
-        if "find" in data_keys:
-            data_keys.remove("find")
-            data__find = data["find"]
-            if not isinstance(data__find, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".find must be object", value=data__find, name="" + (name_prefix or "data") + ".find", definition={'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}, rule='type')
-            data__find_is_dict = isinstance(data__find, dict)
-            if data__find_is_dict:
-                data__find_keys = set(data__find.keys())
-                if "where" in data__find_keys:
-                    data__find_keys.remove("where")
-                    data__find__where = data__find["where"]
-                    if not isinstance(data__find__where, (list, tuple)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.where must be array", value=data__find__where, name="" + (name_prefix or "data") + ".find.where", definition={'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, rule='type')
-                    data__find__where_is_list = isinstance(data__find__where, (list, tuple))
-                    if data__find__where_is_list:
-                        data__find__where_len = len(data__find__where)
-                        for data__find__where_x, data__find__where_item in enumerate(data__find__where):
-                            if not isinstance(data__find__where_item, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.where[{data__find__where_x}]".format(**locals()) + " must be string", value=data__find__where_item, name="" + (name_prefix or "data") + ".find.where[{data__find__where_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                if "exclude" in data__find_keys:
-                    data__find_keys.remove("exclude")
-                    data__find__exclude = data__find["exclude"]
-                    if not isinstance(data__find__exclude, (list, tuple)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.exclude must be array", value=data__find__exclude, name="" + (name_prefix or "data") + ".find.exclude", definition={'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, rule='type')
-                    data__find__exclude_is_list = isinstance(data__find__exclude, (list, tuple))
-                    if data__find__exclude_is_list:
-                        data__find__exclude_len = len(data__find__exclude)
-                        for data__find__exclude_x, data__find__exclude_item in enumerate(data__find__exclude):
-                            if not isinstance(data__find__exclude_item, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.exclude[{data__find__exclude_x}]".format(**locals()) + " must be string", value=data__find__exclude_item, name="" + (name_prefix or "data") + ".find.exclude[{data__find__exclude_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                if "include" in data__find_keys:
-                    data__find_keys.remove("include")
-                    data__find__include = data__find["include"]
-                    if not isinstance(data__find__include, (list, tuple)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.include must be array", value=data__find__include, name="" + (name_prefix or "data") + ".find.include", definition={'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, rule='type')
-                    data__find__include_is_list = isinstance(data__find__include, (list, tuple))
-                    if data__find__include_is_list:
-                        data__find__include_len = len(data__find__include)
-                        for data__find__include_x, data__find__include_item in enumerate(data__find__include):
-                            if not isinstance(data__find__include_item, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.include[{data__find__include_x}]".format(**locals()) + " must be string", value=data__find__include_item, name="" + (name_prefix or "data") + ".find.include[{data__find__include_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-                if "namespaces" in data__find_keys:
-                    data__find_keys.remove("namespaces")
-                    data__find__namespaces = data__find["namespaces"]
-                    if not isinstance(data__find__namespaces, (bool)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.namespaces must be boolean", value=data__find__namespaces, name="" + (name_prefix or "data") + ".find.namespaces", definition={'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}, rule='type')
-                if data__find_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".find must not contain "+str(data__find_keys)+" properties", value=data__find, name="" + (name_prefix or "data") + ".find", definition={'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}, rule='additionalProperties')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}, rule='additionalProperties')
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_package_name(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (str)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, rule='type')
-    data_any_of_count11 = 0
-    if not data_any_of_count11:
-        try:
-            if not isinstance(data, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='type')
-            if isinstance(data, str):
-                if not custom_formats["python-module-name-relaxed"](data):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + " must be python-module-name-relaxed", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='format')
-            data_any_of_count11 += 1
-        except JsonSchemaValueException: pass
-    if not data_any_of_count11:
-        try:
-            if not isinstance(data, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string', 'format': 'pep561-stub-name'}, rule='type')
-            if isinstance(data, str):
-                if not custom_formats["pep561-stub-name"](data):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + " must be pep561-stub-name", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string', 'format': 'pep561-stub-name'}, rule='format')
-            data_any_of_count11 += 1
-        except JsonSchemaValueException: pass
-    if not data_any_of_count11:
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " cannot be validated by any definition", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, rule='anyOf')
-    return data
-
-def validate_https___setuptools_pypa_io_en_latest_deprecated_distutils_configfile_html(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html', 'title': '``tool.distutils`` table', '$$description': ['**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``', 'subtables to configure arguments for ``distutils`` commands.', 'Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` commands via `distutils configuration files', '`_.', 'See also `the old Python docs _`.'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data_keys = set(data.keys())
-        if "global" in data_keys:
-            data_keys.remove("global")
-            data__global = data["global"]
-            if not isinstance(data__global, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".global must be object", value=data__global, name="" + (name_prefix or "data") + ".global", definition={'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}, rule='type')
-        for data_key, data_val in data.items():
-            if REGEX_PATTERNS['.+'].search(data_key):
-                if data_key in data_keys:
-                    data_keys.remove(data_key)
-                if not isinstance(data_val, (dict)):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be object", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'object'}, rule='type')
-    return data
-
-def validate_https___packaging_python_org_en_latest_specifications_pyproject_toml(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'import-names': {'description': 'Lists import names which a project, when installed, would exclusively provide.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'import-namespaces': {'description': 'Lists import names that, when installed, would be provided by the project, but not exclusively.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='type')
-    try:
-        try:
-            data_is_dict = isinstance(data, dict)
-            if data_is_dict:
-                data__missing_keys = set(['dynamic']) - data.keys()
-                if data__missing_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, rule='required')
-                data_keys = set(data.keys())
-                if "dynamic" in data_keys:
-                    data_keys.remove("dynamic")
-                    data__dynamic = data["dynamic"]
-                    data__dynamic_is_list = isinstance(data__dynamic, (list, tuple))
-                    if data__dynamic_is_list:
-                        data__dynamic_contains = False
-                        for data__dynamic_key in data__dynamic:
-                            try:
-                                if data__dynamic_key != "version":
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be same as const definition: version", value=data__dynamic_key, name="" + (name_prefix or "data") + ".dynamic", definition={'const': 'version'}, rule='const')
-                                data__dynamic_contains = True
-                                break
-                            except JsonSchemaValueException: pass
-                        if not data__dynamic_contains:
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must contain one of contains definition", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}, rule='contains')
-        except JsonSchemaValueException: pass
-        else:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must NOT match a disallowed definition", value=data, name="" + (name_prefix or "data") + "", definition={'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, rule='not')
-    except JsonSchemaValueException:
-        pass
-    else:
-        data_is_dict = isinstance(data, dict)
-        if data_is_dict:
-            data__missing_keys = set(['version']) - data.keys()
-            if data__missing_keys:
-                raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, rule='required')
-    try:
-        data_is_dict = isinstance(data, dict)
-        if data_is_dict:
-            data__missing_keys = set(['license-files']) - data.keys()
-            if data__missing_keys:
-                raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'required': ['license-files']}, rule='required')
-    except JsonSchemaValueException:
-        pass
-    else:
-        data_is_dict = isinstance(data, dict)
-        if data_is_dict:
-            data_keys = set(data.keys())
-            if "license" in data_keys:
-                data_keys.remove("license")
-                data__license = data["license"]
-                if not isinstance(data__license, (str)):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be string", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'string'}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data__missing_keys = set(['name']) - data.keys()
-        if data__missing_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'import-names': {'description': 'Lists import names which a project, when installed, would exclusively provide.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'import-namespaces': {'description': 'Lists import names that, when installed, would be provided by the project, but not exclusively.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='required')
-        data_keys = set(data.keys())
-        if "name" in data_keys:
-            data_keys.remove("name")
-            data__name = data["name"]
-            if not isinstance(data__name, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, rule='type')
-            if isinstance(data__name, str):
-                if not custom_formats["pep508-identifier"](data__name):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be pep508-identifier", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, rule='format')
-        if "version" in data_keys:
-            data_keys.remove("version")
-            data__version = data["version"]
-            if not isinstance(data__version, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".version must be string", value=data__version, name="" + (name_prefix or "data") + ".version", definition={'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, rule='type')
-            if isinstance(data__version, str):
-                if not custom_formats["pep440"](data__version):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".version must be pep440", value=data__version, name="" + (name_prefix or "data") + ".version", definition={'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, rule='format')
-        if "description" in data_keys:
-            data_keys.remove("description")
-            data__description = data["description"]
-            if not isinstance(data__description, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".description must be string", value=data__description, name="" + (name_prefix or "data") + ".description", definition={'type': 'string', '$$description': ['The `summary description of the project', '`_']}, rule='type')
-        if "readme" in data_keys:
-            data_keys.remove("readme")
-            data__readme = data["readme"]
-            data__readme_one_of_count12 = 0
-            if data__readme_one_of_count12 < 2:
-                try:
-                    if not isinstance(data__readme, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be string", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, rule='type')
-                    data__readme_one_of_count12 += 1
-                except JsonSchemaValueException: pass
-            if data__readme_one_of_count12 < 2:
-                try:
-                    if not isinstance(data__readme, (dict)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be object", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}, rule='type')
-                    data__readme_any_of_count13 = 0
-                    if not data__readme_any_of_count13:
-                        try:
-                            data__readme_is_dict = isinstance(data__readme, dict)
-                            if data__readme_is_dict:
-                                data__readme__missing_keys = set(['file']) - data__readme.keys()
-                                if data__readme__missing_keys:
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain " + (str(sorted(data__readme__missing_keys)) + " properties"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, rule='required')
-                                data__readme_keys = set(data__readme.keys())
-                                if "file" in data__readme_keys:
-                                    data__readme_keys.remove("file")
-                                    data__readme__file = data__readme["file"]
-                                    if not isinstance(data__readme__file, (str)):
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.file must be string", value=data__readme__file, name="" + (name_prefix or "data") + ".readme.file", definition={'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}, rule='type')
-                            data__readme_any_of_count13 += 1
-                        except JsonSchemaValueException: pass
-                    if not data__readme_any_of_count13:
-                        try:
-                            data__readme_is_dict = isinstance(data__readme, dict)
-                            if data__readme_is_dict:
-                                data__readme__missing_keys = set(['text']) - data__readme.keys()
-                                if data__readme__missing_keys:
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain " + (str(sorted(data__readme__missing_keys)) + " properties"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}, rule='required')
-                                data__readme_keys = set(data__readme.keys())
-                                if "text" in data__readme_keys:
-                                    data__readme_keys.remove("text")
-                                    data__readme__text = data__readme["text"]
-                                    if not isinstance(data__readme__text, (str)):
-                                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.text must be string", value=data__readme__text, name="" + (name_prefix or "data") + ".readme.text", definition={'type': 'string', 'description': 'Full text describing the project.'}, rule='type')
-                            data__readme_any_of_count13 += 1
-                        except JsonSchemaValueException: pass
-                    if not data__readme_any_of_count13:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme cannot be validated by any definition", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, rule='anyOf')
-                    data__readme_is_dict = isinstance(data__readme, dict)
-                    if data__readme_is_dict:
-                        data__readme__missing_keys = set(['content-type']) - data__readme.keys()
-                        if data__readme__missing_keys:
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain " + (str(sorted(data__readme__missing_keys)) + " properties"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}, rule='required')
-                        data__readme_keys = set(data__readme.keys())
-                        if "content-type" in data__readme_keys:
-                            data__readme_keys.remove("content-type")
-                            data__readme__contenttype = data__readme["content-type"]
-                            if not isinstance(data__readme__contenttype, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.content-type must be string", value=data__readme__contenttype, name="" + (name_prefix or "data") + ".readme.content-type", definition={'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}, rule='type')
-                    data__readme_one_of_count12 += 1
-                except JsonSchemaValueException: pass
-            if data__readme_one_of_count12 != 1:
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be valid exactly by one definition" + (" (" + str(data__readme_one_of_count12) + " matches found)"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, rule='oneOf')
-        if "requires-python" in data_keys:
-            data_keys.remove("requires-python")
-            data__requirespython = data["requires-python"]
-            if not isinstance(data__requirespython, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".requires-python must be string", value=data__requirespython, name="" + (name_prefix or "data") + ".requires-python", definition={'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, rule='type')
-            if isinstance(data__requirespython, str):
-                if not custom_formats["pep508-versionspec"](data__requirespython):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".requires-python must be pep508-versionspec", value=data__requirespython, name="" + (name_prefix or "data") + ".requires-python", definition={'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, rule='format')
-        if "license" in data_keys:
-            data_keys.remove("license")
-            data__license = data["license"]
-            data__license_one_of_count14 = 0
-            if data__license_one_of_count14 < 2:
-                try:
-                    if not isinstance(data__license, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be string", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, rule='type')
-                    if isinstance(data__license, str):
-                        if not custom_formats["SPDX"](data__license):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be SPDX", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, rule='format')
-                    data__license_one_of_count14 += 1
-                except JsonSchemaValueException: pass
-            if data__license_one_of_count14 < 2:
-                try:
-                    if not isinstance(data__license, (dict)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be object", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, rule='type')
-                    data__license_is_dict = isinstance(data__license, dict)
-                    if data__license_is_dict:
-                        data__license__missing_keys = set(['file']) - data__license.keys()
-                        if data__license__missing_keys:
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must contain " + (str(sorted(data__license__missing_keys)) + " properties"), value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, rule='required')
-                        data__license_keys = set(data__license.keys())
-                        if "file" in data__license_keys:
-                            data__license_keys.remove("file")
-                            data__license__file = data__license["file"]
-                            if not isinstance(data__license__file, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license.file must be string", value=data__license__file, name="" + (name_prefix or "data") + ".license.file", definition={'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}, rule='type')
-                    data__license_one_of_count14 += 1
-                except JsonSchemaValueException: pass
-            if data__license_one_of_count14 < 2:
-                try:
-                    if not isinstance(data__license, (dict)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be object", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}, rule='type')
-                    data__license_is_dict = isinstance(data__license, dict)
-                    if data__license_is_dict:
-                        data__license__missing_keys = set(['text']) - data__license.keys()
-                        if data__license__missing_keys:
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must contain " + (str(sorted(data__license__missing_keys)) + " properties"), value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}, rule='required')
-                        data__license_keys = set(data__license.keys())
-                        if "text" in data__license_keys:
-                            data__license_keys.remove("text")
-                            data__license__text = data__license["text"]
-                            if not isinstance(data__license__text, (str)):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license.text must be string", value=data__license__text, name="" + (name_prefix or "data") + ".license.text", definition={'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}, rule='type')
-                    data__license_one_of_count14 += 1
-                except JsonSchemaValueException: pass
-            if data__license_one_of_count14 != 1:
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be valid exactly by one definition" + (" (" + str(data__license_one_of_count14) + " matches found)"), value=data__license, name="" + (name_prefix or "data") + ".license", definition={'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, rule='oneOf')
-        if "license-files" in data_keys:
-            data_keys.remove("license-files")
-            data__licensefiles = data["license-files"]
-            if not isinstance(data__licensefiles, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files must be array", value=data__licensefiles, name="" + (name_prefix or "data") + ".license-files", definition={'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, rule='type')
-            data__licensefiles_is_list = isinstance(data__licensefiles, (list, tuple))
-            if data__licensefiles_is_list:
-                data__licensefiles_len = len(data__licensefiles)
-                for data__licensefiles_x, data__licensefiles_item in enumerate(data__licensefiles):
-                    if not isinstance(data__licensefiles_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + " must be string", value=data__licensefiles_item, name="" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "authors" in data_keys:
-            data_keys.remove("authors")
-            data__authors = data["authors"]
-            if not isinstance(data__authors, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".authors must be array", value=data__authors, name="" + (name_prefix or "data") + ".authors", definition={'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, rule='type')
-            data__authors_is_list = isinstance(data__authors, (list, tuple))
-            if data__authors_is_list:
-                data__authors_len = len(data__authors)
-                for data__authors_x, data__authors_item in enumerate(data__authors):
-                    validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_author(data__authors_item, custom_formats, (name_prefix or "data") + ".authors[{data__authors_x}]".format(**locals()))
-        if "maintainers" in data_keys:
-            data_keys.remove("maintainers")
-            data__maintainers = data["maintainers"]
-            if not isinstance(data__maintainers, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".maintainers must be array", value=data__maintainers, name="" + (name_prefix or "data") + ".maintainers", definition={'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, rule='type')
-            data__maintainers_is_list = isinstance(data__maintainers, (list, tuple))
-            if data__maintainers_is_list:
-                data__maintainers_len = len(data__maintainers)
-                for data__maintainers_x, data__maintainers_item in enumerate(data__maintainers):
-                    validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_author(data__maintainers_item, custom_formats, (name_prefix or "data") + ".maintainers[{data__maintainers_x}]".format(**locals()))
-        if "keywords" in data_keys:
-            data_keys.remove("keywords")
-            data__keywords = data["keywords"]
-            if not isinstance(data__keywords, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".keywords must be array", value=data__keywords, name="" + (name_prefix or "data") + ".keywords", definition={'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, rule='type')
-            data__keywords_is_list = isinstance(data__keywords, (list, tuple))
-            if data__keywords_is_list:
-                data__keywords_len = len(data__keywords)
-                for data__keywords_x, data__keywords_item in enumerate(data__keywords):
-                    if not isinstance(data__keywords_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".keywords[{data__keywords_x}]".format(**locals()) + " must be string", value=data__keywords_item, name="" + (name_prefix or "data") + ".keywords[{data__keywords_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type')
-        if "classifiers" in data_keys:
-            data_keys.remove("classifiers")
-            data__classifiers = data["classifiers"]
-            if not isinstance(data__classifiers, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers must be array", value=data__classifiers, name="" + (name_prefix or "data") + ".classifiers", definition={'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, rule='type')
-            data__classifiers_is_list = isinstance(data__classifiers, (list, tuple))
-            if data__classifiers_is_list:
-                data__classifiers_len = len(data__classifiers)
-                for data__classifiers_x, data__classifiers_item in enumerate(data__classifiers):
-                    if not isinstance(data__classifiers_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + " must be string", value=data__classifiers_item, name="" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, rule='type')
-                    if isinstance(data__classifiers_item, str):
-                        if not custom_formats["trove-classifier"](data__classifiers_item):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + " must be trove-classifier", value=data__classifiers_item, name="" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, rule='format')
-        if "urls" in data_keys:
-            data_keys.remove("urls")
-            data__urls = data["urls"]
-            if not isinstance(data__urls, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls must be object", value=data__urls, name="" + (name_prefix or "data") + ".urls", definition={'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, rule='type')
-            data__urls_is_dict = isinstance(data__urls, dict)
-            if data__urls_is_dict:
-                data__urls_keys = set(data__urls.keys())
-                for data__urls_key, data__urls_val in data__urls.items():
-                    if REGEX_PATTERNS['^.+$'].search(data__urls_key):
-                        if data__urls_key in data__urls_keys:
-                            data__urls_keys.remove(data__urls_key)
-                        if not isinstance(data__urls_val, (str)):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + " must be string", value=data__urls_val, name="" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'url'}, rule='type')
-                        if isinstance(data__urls_val, str):
-                            if not custom_formats["url"](data__urls_val):
-                                raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + " must be url", value=data__urls_val, name="" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'url'}, rule='format')
-                if data__urls_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls must not contain "+str(data__urls_keys)+" properties", value=data__urls, name="" + (name_prefix or "data") + ".urls", definition={'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, rule='additionalProperties')
-        if "scripts" in data_keys:
-            data_keys.remove("scripts")
-            data__scripts = data["scripts"]
-            validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_entry_point_group(data__scripts, custom_formats, (name_prefix or "data") + ".scripts")
-        if "gui-scripts" in data_keys:
-            data_keys.remove("gui-scripts")
-            data__guiscripts = data["gui-scripts"]
-            validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_entry_point_group(data__guiscripts, custom_formats, (name_prefix or "data") + ".gui-scripts")
-        if "entry-points" in data_keys:
-            data_keys.remove("entry-points")
-            data__entrypoints = data["entry-points"]
-            data__entrypoints_is_dict = isinstance(data__entrypoints, dict)
-            if data__entrypoints_is_dict:
-                data__entrypoints_keys = set(data__entrypoints.keys())
-                for data__entrypoints_key, data__entrypoints_val in data__entrypoints.items():
-                    if REGEX_PATTERNS['^.+$'].search(data__entrypoints_key):
-                        if data__entrypoints_key in data__entrypoints_keys:
-                            data__entrypoints_keys.remove(data__entrypoints_key)
-                        validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_entry_point_group(data__entrypoints_val, custom_formats, (name_prefix or "data") + ".entry-points.{data__entrypoints_key}".format(**locals()))
-                if data__entrypoints_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must not contain "+str(data__entrypoints_keys)+" properties", value=data__entrypoints, name="" + (name_prefix or "data") + ".entry-points", definition={'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, rule='additionalProperties')
-                data__entrypoints_len = len(data__entrypoints)
-                if data__entrypoints_len != 0:
-                    data__entrypoints_property_names = True
-                    for data__entrypoints_key in data__entrypoints:
-                        try:
-                            if isinstance(data__entrypoints_key, str):
-                                if not custom_formats["python-entrypoint-group"](data__entrypoints_key):
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must be python-entrypoint-group", value=data__entrypoints_key, name="" + (name_prefix or "data") + ".entry-points", definition={'format': 'python-entrypoint-group'}, rule='format')
-                        except JsonSchemaValueException:
-                            data__entrypoints_property_names = False
-                    if not data__entrypoints_property_names:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must be named by propertyName definition", value=data__entrypoints, name="" + (name_prefix or "data") + ".entry-points", definition={'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, rule='propertyNames')
-        if "dependencies" in data_keys:
-            data_keys.remove("dependencies")
-            data__dependencies = data["dependencies"]
-            if not isinstance(data__dependencies, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependencies must be array", value=data__dependencies, name="" + (name_prefix or "data") + ".dependencies", definition={'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, rule='type')
-            data__dependencies_is_list = isinstance(data__dependencies, (list, tuple))
-            if data__dependencies_is_list:
-                data__dependencies_len = len(data__dependencies)
-                for data__dependencies_x, data__dependencies_item in enumerate(data__dependencies):
-                    validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_dependency(data__dependencies_item, custom_formats, (name_prefix or "data") + ".dependencies[{data__dependencies_x}]".format(**locals()))
-        if "optional-dependencies" in data_keys:
-            data_keys.remove("optional-dependencies")
-            data__optionaldependencies = data["optional-dependencies"]
-            if not isinstance(data__optionaldependencies, (dict)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be object", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='type')
-            data__optionaldependencies_is_dict = isinstance(data__optionaldependencies, dict)
-            if data__optionaldependencies_is_dict:
-                data__optionaldependencies_keys = set(data__optionaldependencies.keys())
-                for data__optionaldependencies_key, data__optionaldependencies_val in data__optionaldependencies.items():
-                    if REGEX_PATTERNS['^.+$'].search(data__optionaldependencies_key):
-                        if data__optionaldependencies_key in data__optionaldependencies_keys:
-                            data__optionaldependencies_keys.remove(data__optionaldependencies_key)
-                        if not isinstance(data__optionaldependencies_val, (list, tuple)):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}".format(**locals()) + " must be array", value=data__optionaldependencies_val, name="" + (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, rule='type')
-                        data__optionaldependencies_val_is_list = isinstance(data__optionaldependencies_val, (list, tuple))
-                        if data__optionaldependencies_val_is_list:
-                            data__optionaldependencies_val_len = len(data__optionaldependencies_val)
-                            for data__optionaldependencies_val_x, data__optionaldependencies_val_item in enumerate(data__optionaldependencies_val):
-                                validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_dependency(data__optionaldependencies_val_item, custom_formats, (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}[{data__optionaldependencies_val_x}]".format(**locals()))
-                if data__optionaldependencies_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must not contain "+str(data__optionaldependencies_keys)+" properties", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='additionalProperties')
-                data__optionaldependencies_len = len(data__optionaldependencies)
-                if data__optionaldependencies_len != 0:
-                    data__optionaldependencies_property_names = True
-                    for data__optionaldependencies_key in data__optionaldependencies:
-                        try:
-                            if isinstance(data__optionaldependencies_key, str):
-                                if not custom_formats["pep508-identifier"](data__optionaldependencies_key):
-                                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be pep508-identifier", value=data__optionaldependencies_key, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'format': 'pep508-identifier'}, rule='format')
-                        except JsonSchemaValueException:
-                            data__optionaldependencies_property_names = False
-                    if not data__optionaldependencies_property_names:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be named by propertyName definition", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='propertyNames')
-        if "import-names" in data_keys:
-            data_keys.remove("import-names")
-            data__importnames = data["import-names"]
-            if not isinstance(data__importnames, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".import-names must be array", value=data__importnames, name="" + (name_prefix or "data") + ".import-names", definition={'description': 'Lists import names which a project, when installed, would exclusively provide.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, rule='type')
-            data__importnames_is_list = isinstance(data__importnames, (list, tuple))
-            if data__importnames_is_list:
-                data__importnames_len = len(data__importnames)
-                for data__importnames_x, data__importnames_item in enumerate(data__importnames):
-                    if not isinstance(data__importnames_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".import-names[{data__importnames_x}]".format(**locals()) + " must be string", value=data__importnames_item, name="" + (name_prefix or "data") + ".import-names[{data__importnames_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'import-name'}, rule='type')
-                    if isinstance(data__importnames_item, str):
-                        if not custom_formats["import-name"](data__importnames_item):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".import-names[{data__importnames_x}]".format(**locals()) + " must be import-name", value=data__importnames_item, name="" + (name_prefix or "data") + ".import-names[{data__importnames_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'import-name'}, rule='format')
-        if "import-namespaces" in data_keys:
-            data_keys.remove("import-namespaces")
-            data__importnamespaces = data["import-namespaces"]
-            if not isinstance(data__importnamespaces, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".import-namespaces must be array", value=data__importnamespaces, name="" + (name_prefix or "data") + ".import-namespaces", definition={'description': 'Lists import names that, when installed, would be provided by the project, but not exclusively.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, rule='type')
-            data__importnamespaces_is_list = isinstance(data__importnamespaces, (list, tuple))
-            if data__importnamespaces_is_list:
-                data__importnamespaces_len = len(data__importnamespaces)
-                for data__importnamespaces_x, data__importnamespaces_item in enumerate(data__importnamespaces):
-                    if not isinstance(data__importnamespaces_item, (str)):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".import-namespaces[{data__importnamespaces_x}]".format(**locals()) + " must be string", value=data__importnamespaces_item, name="" + (name_prefix or "data") + ".import-namespaces[{data__importnamespaces_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'import-name'}, rule='type')
-                    if isinstance(data__importnamespaces_item, str):
-                        if not custom_formats["import-name"](data__importnamespaces_item):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + ".import-namespaces[{data__importnamespaces_x}]".format(**locals()) + " must be import-name", value=data__importnamespaces_item, name="" + (name_prefix or "data") + ".import-namespaces[{data__importnamespaces_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'import-name'}, rule='format')
-        if "dynamic" in data_keys:
-            data_keys.remove("dynamic")
-            data__dynamic = data["dynamic"]
-            if not isinstance(data__dynamic, (list, tuple)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be array", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}}, rule='type')
-            data__dynamic_is_list = isinstance(data__dynamic, (list, tuple))
-            if data__dynamic_is_list:
-                data__dynamic_len = len(data__dynamic)
-                for data__dynamic_x, data__dynamic_item in enumerate(data__dynamic):
-                    if data__dynamic_item not in ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']:
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic[{data__dynamic_x}]".format(**locals()) + " must be one of ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']", value=data__dynamic_item, name="" + (name_prefix or "data") + ".dynamic[{data__dynamic_x}]".format(**locals()) + "", definition={'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}, rule='enum')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'import-names': {'description': 'Lists import names which a project, when installed, would exclusively provide.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'import-namespaces': {'description': 'Lists import names that, when installed, would be provided by the project, but not exclusively.', 'type': 'array', 'items': {'type': 'string', 'format': 'import-name'}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies', 'import-names', 'import-namespaces']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', '    If the core metadata specification lists a field as "Required", then', '    the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', '    The required fields are: Metadata-Version, Name, Version.', '    All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='additionalProperties')
-    return data
-
-def validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_dependency(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (str)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}, rule='type')
-    if isinstance(data, str):
-        if not custom_formats["pep508"](data):
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must be pep508", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}, rule='format')
-    return data
-
-def validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_entry_point_group(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='type')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data_keys = set(data.keys())
-        for data_key, data_val in data.items():
-            if REGEX_PATTERNS['^.+$'].search(data_key):
-                if data_key in data_keys:
-                    data_keys.remove(data_key)
-                if not isinstance(data_val, (str)):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be string", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}, rule='type')
-                if isinstance(data_val, str):
-                    if not custom_formats["python-entrypoint-reference"](data_val):
-                        raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be python-entrypoint-reference", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}, rule='format')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='additionalProperties')
-        data_len = len(data)
-        if data_len != 0:
-            data_property_names = True
-            for data_key in data:
-                try:
-                    if isinstance(data_key, str):
-                        if not custom_formats["python-entrypoint-name"](data_key):
-                            raise JsonSchemaValueException("" + (name_prefix or "data") + " must be python-entrypoint-name", value=data_key, name="" + (name_prefix or "data") + "", definition={'format': 'python-entrypoint-name'}, rule='format')
-                except JsonSchemaValueException:
-                    data_property_names = False
-            if not data_property_names:
-                raise JsonSchemaValueException("" + (name_prefix or "data") + " must be named by propertyName definition", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='propertyNames')
-    return data
-
-def validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_author(data, custom_formats={}, name_prefix=None):
-    if not isinstance(data, (dict)):
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, rule='type')
-    data_any_of_count15 = 0
-    if not data_any_of_count15:
-        try:
-            data_is_dict = isinstance(data, dict)
-            if data_is_dict:
-                data__missing_keys = set(['name']) - data.keys()
-                if data__missing_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'required': ['name']}, rule='required')
-            data_any_of_count15 += 1
-        except JsonSchemaValueException: pass
-    if not data_any_of_count15:
-        try:
-            data_is_dict = isinstance(data, dict)
-            if data_is_dict:
-                data__missing_keys = set(['email']) - data.keys()
-                if data__missing_keys:
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'required': ['email']}, rule='required')
-            data_any_of_count15 += 1
-        except JsonSchemaValueException: pass
-    if not data_any_of_count15:
-        raise JsonSchemaValueException("" + (name_prefix or "data") + " cannot be validated by any definition", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, rule='anyOf')
-    data_is_dict = isinstance(data, dict)
-    if data_is_dict:
-        data_keys = set(data.keys())
-        if "name" in data_keys:
-            data_keys.remove("name")
-            data__name = data["name"]
-            if not isinstance(data__name, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, rule='type')
-        if "email" in data_keys:
-            data_keys.remove("email")
-            data__email = data["email"]
-            if not isinstance(data__email, (str)):
-                raise JsonSchemaValueException("" + (name_prefix or "data") + ".email must be string", value=data__email, name="" + (name_prefix or "data") + ".email", definition={'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}, rule='type')
-            if isinstance(data__email, str):
-                if not REGEX_PATTERNS["idn-email_re_pattern"].match(data__email):
-                    raise JsonSchemaValueException("" + (name_prefix or "data") + ".email must be idn-email", value=data__email, name="" + (name_prefix or "data") + ".email", definition={'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}, rule='format')
-        if data_keys:
-            raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}, 'anyOf': [{'required': ['name']}, {'required': ['email']}]}, rule='additionalProperties')
-    return data
diff --git a/voxvera/vendor/setuptools/config/_validate_pyproject/formats.py b/voxvera/vendor/setuptools/config/_validate_pyproject/formats.py
deleted file mode 100644
index fe958cc..0000000
--- a/voxvera/vendor/setuptools/config/_validate_pyproject/formats.py
+++ /dev/null
@@ -1,464 +0,0 @@
-"""
-The functions in this module are used to validate schemas with the
-`format JSON Schema keyword
-`_.
-
-The correspondence is given by replacing the ``_`` character in the name of the
-function with a ``-`` to obtain the format name and vice versa.
-"""
-
-from __future__ import annotations
-
-import keyword
-import logging
-import os
-import re
-import string
-import typing
-from itertools import chain as _chain
-
-if typing.TYPE_CHECKING:
-    import builtins
-
-    from typing_extensions import Literal
-
-_logger = logging.getLogger(__name__)
-
-# -------------------------------------------------------------------------------------
-# PEP 440
-
-VERSION_PATTERN = r"""
-    v?
-    (?:
-        (?:(?P[0-9]+)!)?                           # epoch
-        (?P[0-9]+(?:\.[0-9]+)*)                  # release segment
-        (?P
                                          # pre-release
-            [-_\.]?
-            (?Palpha|a|beta|b|preview|pre|c|rc)
-            [-_\.]?
-            (?P[0-9]+)?
-        )?
-        (?P                                         # post release
-            (?:-(?P[0-9]+))
-            |
-            (?:
-                [-_\.]?
-                (?Ppost|rev|r)
-                [-_\.]?
-                (?P[0-9]+)?
-            )
-        )?
-        (?P                                          # dev release
-            [-_\.]?
-            (?Pdev)
-            [-_\.]?
-            (?P[0-9]+)?
-        )?
-    )
-    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
-"""
-
-VERSION_REGEX = re.compile(
-    r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE
-)
-
-
-def pep440(version: str) -> bool:
-    """See :ref:`PyPA's version specification `
-    (initially introduced in :pep:`440`).
-    """
-    return VERSION_REGEX.match(version) is not None
-
-
-# -------------------------------------------------------------------------------------
-# PEP 508
-
-PEP508_IDENTIFIER_PATTERN = r"([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])"
-PEP508_IDENTIFIER_REGEX = re.compile(f"^{PEP508_IDENTIFIER_PATTERN}$", re.IGNORECASE)
-
-
-def pep508_identifier(name: str) -> bool:
-    """See :ref:`PyPA's name specification `
-    (initially introduced in :pep:`508#names`).
-    """
-    return PEP508_IDENTIFIER_REGEX.match(name) is not None
-
-
-try:
-    try:
-        from packaging import requirements as _req
-    except ImportError:  # pragma: no cover
-        # let's try setuptools vendored version
-        from setuptools._vendor.packaging import (  # type: ignore[no-redef]
-            requirements as _req,
-        )
-
-    def pep508(value: str) -> bool:
-        """See :ref:`PyPA's dependency specifiers `
-        (initially introduced in :pep:`508`).
-        """
-        try:
-            _req.Requirement(value)
-        except _req.InvalidRequirement:
-            return False
-        return True
-
-except ImportError:  # pragma: no cover
-    _logger.warning(
-        "Could not find an installation of `packaging`. Requirements, dependencies and "
-        "versions might not be validated. "
-        "To enforce validation, please install `packaging`."
-    )
-
-    def pep508(value: str) -> bool:  # noqa: ARG001
-        return True
-
-
-def pep508_versionspec(value: str) -> bool:
-    """Expression that can be used to specify/lock versions (including ranges)
-    See ``versionspec`` in :ref:`PyPA's dependency specifiers
-    ` (initially introduced in :pep:`508`).
-    """
-    if any(c in value for c in (";", "]", "@")):
-        # In PEP 508:
-        # conditional markers, extras and URL specs are not included in the
-        # versionspec
-        return False
-    # Let's pretend we have a dependency called `requirement` with the given
-    # version spec, then we can reuse the pep508 function for validation:
-    return pep508(f"requirement{value}")
-
-
-# -------------------------------------------------------------------------------------
-# PEP 517
-
-
-def pep517_backend_reference(value: str) -> bool:
-    """See PyPA's specification for defining build-backend references
-    introduced in :pep:`517#source-trees`.
-
-    This is similar to an entry-point reference (e.g., ``package.module:object``).
-    """
-    module, _, obj = value.partition(":")
-    identifiers = (i.strip() for i in _chain(module.split("."), obj.split(".")))
-    return all(python_identifier(i) for i in identifiers if i)
-
-
-# -------------------------------------------------------------------------------------
-# Classifiers - PEP 301
-
-
-def _download_classifiers() -> str:
-    import ssl
-    from email.message import Message
-    from urllib.request import urlopen
-
-    url = "https://pypi.org/pypi?:action=list_classifiers"
-    context = ssl.create_default_context()
-    with urlopen(url, context=context) as response:  # noqa: S310 (audit URLs)
-        headers = Message()
-        headers["content_type"] = response.getheader("content-type", "text/plain")
-        return response.read().decode(headers.get_param("charset", "utf-8"))  # type: ignore[no-any-return]
-
-
-class _TroveClassifier:
-    """The ``trove_classifiers`` package is the official way of validating classifiers,
-    however this package might not be always available.
-    As a workaround we can still download a list from PyPI.
-    We also don't want to be over strict about it, so simply skipping silently is an
-    option (classifiers will be validated anyway during the upload to PyPI).
-    """
-
-    downloaded: None | Literal[False] | set[str]
-    """
-    None => not cached yet
-    False => unavailable
-    set => cached values
-    """
-
-    def __init__(self) -> None:
-        self.downloaded = None
-        self._skip_download = False
-        self.__name__ = "trove_classifier"  # Emulate a public function
-
-    def _disable_download(self) -> None:
-        # This is a private API. Only setuptools has the consent of using it.
-        self._skip_download = True
-
-    def __call__(self, value: str) -> bool:
-        if self.downloaded is False or self._skip_download is True:
-            return True
-
-        if os.getenv("NO_NETWORK") or os.getenv("VALIDATE_PYPROJECT_NO_NETWORK"):
-            self.downloaded = False
-            msg = (
-                "Install ``trove-classifiers`` to ensure proper validation. "
-                "Skipping download of classifiers list from PyPI (NO_NETWORK)."
-            )
-            _logger.debug(msg)
-            return True
-
-        if self.downloaded is None:
-            msg = (
-                "Install ``trove-classifiers`` to ensure proper validation. "
-                "Meanwhile a list of classifiers will be downloaded from PyPI."
-            )
-            _logger.debug(msg)
-            try:
-                self.downloaded = set(_download_classifiers().splitlines())
-            except Exception:  # noqa: BLE001
-                self.downloaded = False
-                _logger.debug("Problem with download, skipping validation")
-                return True
-
-        return value in self.downloaded or value.lower().startswith("private ::")
-
-
-try:
-    from trove_classifiers import classifiers as _trove_classifiers
-
-    def trove_classifier(value: str) -> bool:
-        """See https://pypi.org/classifiers/"""
-        return value in _trove_classifiers or value.lower().startswith("private ::")
-
-except ImportError:  # pragma: no cover
-    trove_classifier = _TroveClassifier()
-
-
-# -------------------------------------------------------------------------------------
-# Stub packages - PEP 561
-
-
-def pep561_stub_name(value: str) -> bool:
-    """Name of a directory containing type stubs.
-    It must follow the name scheme ``-stubs`` as defined in
-    :pep:`561#stub-only-packages`.
-    """
-    top, *children = value.split(".")
-    if not top.endswith("-stubs"):
-        return False
-    return python_module_name(".".join([top[: -len("-stubs")], *children]))
-
-
-# -------------------------------------------------------------------------------------
-# Non-PEP related
-
-
-def url(value: str) -> bool:
-    """Valid URL (validation uses :obj:`urllib.parse`).
-    For maximum compatibility please make sure to include a ``scheme`` prefix
-    in your URL (e.g. ``http://``).
-    """
-    from urllib.parse import urlparse
-
-    try:
-        parts = urlparse(value)
-        if not parts.scheme:
-            _logger.warning(
-                "For maximum compatibility please make sure to include a "
-                "`scheme` prefix in your URL (e.g. 'http://'). "
-                f"Given value: {value}"
-            )
-            if not (value.startswith(("/", "\\")) or "@" in value):
-                parts = urlparse(f"http://{value}")
-
-        return bool(parts.scheme and parts.netloc)
-    except Exception:  # noqa: BLE001
-        return False
-
-
-# https://packaging.python.org/specifications/entry-points/
-ENTRYPOINT_PATTERN = r"[^\[\s=]([^=]*[^\s=])?"
-ENTRYPOINT_REGEX = re.compile(f"^{ENTRYPOINT_PATTERN}$", re.IGNORECASE)
-RECOMMEDED_ENTRYPOINT_PATTERN = r"[\w.-]+"
-RECOMMEDED_ENTRYPOINT_REGEX = re.compile(
-    f"^{RECOMMEDED_ENTRYPOINT_PATTERN}$", re.IGNORECASE
-)
-ENTRYPOINT_GROUP_PATTERN = r"\w+(\.\w+)*"
-ENTRYPOINT_GROUP_REGEX = re.compile(f"^{ENTRYPOINT_GROUP_PATTERN}$", re.IGNORECASE)
-
-
-def python_identifier(value: str) -> bool:
-    """Can be used as identifier in Python.
-    (Validation uses :obj:`str.isidentifier`).
-    """
-    return value.isidentifier()
-
-
-def python_qualified_identifier(value: str) -> bool:
-    """
-    Python "dotted identifier", i.e. a sequence of :obj:`python_identifier`
-    concatenated with ``"."`` (e.g.: ``package.module.submodule``).
-    """
-    if value.startswith(".") or value.endswith("."):
-        return False
-    return all(python_identifier(m) for m in value.split("."))
-
-
-def python_module_name(value: str) -> bool:
-    """Module name that can be used in an ``import``-statement in Python.
-    See :obj:`python_qualified_identifier`.
-    """
-    return python_qualified_identifier(value)
-
-
-def python_module_name_relaxed(value: str) -> bool:
-    """Similar to :obj:`python_module_name`, but relaxed to also accept
-    dash characters (``-``) and cover special cases like ``pip-run``.
-
-    It is recommended, however, that beginners avoid dash characters,
-    as they require advanced knowledge about Python internals.
-
-    The following are disallowed:
-
-    * names starting/ending in dashes,
-    * names ending in ``-stubs`` (potentially collide with :obj:`pep561_stub_name`).
-    """
-    if value.startswith("-") or value.endswith("-"):
-        return False
-    if value.endswith("-stubs"):
-        return False  # Avoid collision with PEP 561
-    return python_module_name(value.replace("-", "_"))
-
-
-def python_entrypoint_group(value: str) -> bool:
-    """See ``Data model > group`` in the :ref:`PyPA's entry-points specification
-    `.
-    """
-    return ENTRYPOINT_GROUP_REGEX.match(value) is not None
-
-
-def python_entrypoint_name(value: str) -> bool:
-    """See ``Data model > name`` in the :ref:`PyPA's entry-points specification
-    `.
-    """
-    if not ENTRYPOINT_REGEX.match(value):
-        return False
-    if not RECOMMEDED_ENTRYPOINT_REGEX.match(value):
-        msg = f"Entry point `{value}` does not follow recommended pattern: "
-        msg += RECOMMEDED_ENTRYPOINT_PATTERN
-        _logger.warning(msg)
-    return True
-
-
-def python_entrypoint_reference(value: str) -> bool:
-    """Reference to a Python object using in the format::
-
-        importable.module:object.attr
-
-    See ``Data model >object reference`` in the :ref:`PyPA's entry-points specification
-    `.
-    """
-    module, _, rest = value.partition(":")
-    if "[" in rest:
-        obj, _, extras_ = rest.partition("[")
-        if extras_.strip()[-1] != "]":
-            return False
-        extras = (x.strip() for x in extras_.strip(string.whitespace + "[]").split(","))
-        if not all(pep508_identifier(e) for e in extras):
-            return False
-        _logger.warning(f"`{value}` - using extras for entry points is not recommended")
-    else:
-        obj = rest
-
-    module_parts = module.split(".")
-    identifiers = _chain(module_parts, obj.split(".")) if rest else iter(module_parts)
-    return all(python_identifier(i.strip()) for i in identifiers)
-
-
-def uint8(value: builtins.int) -> bool:
-    r"""Unsigned 8-bit integer (:math:`0 \leq x < 2^8`)"""
-    return 0 <= value < 2**8
-
-
-def uint16(value: builtins.int) -> bool:
-    r"""Unsigned 16-bit integer (:math:`0 \leq x < 2^{16}`)"""
-    return 0 <= value < 2**16
-
-
-def uint32(value: builtins.int) -> bool:
-    r"""Unsigned 32-bit integer (:math:`0 \leq x < 2^{32}`)"""
-    return 0 <= value < 2**32
-
-
-def uint64(value: builtins.int) -> bool:
-    r"""Unsigned 64-bit integer (:math:`0 \leq x < 2^{64}`)"""
-    return 0 <= value < 2**64
-
-
-def uint(value: builtins.int) -> bool:
-    r"""Signed 64-bit integer (:math:`0 \leq x < 2^{64}`)"""
-    return 0 <= value < 2**64
-
-
-def int8(value: builtins.int) -> bool:
-    r"""Signed 8-bit integer (:math:`-2^{7} \leq x < 2^{7}`)"""
-    return -(2**7) <= value < 2**7
-
-
-def int16(value: builtins.int) -> bool:
-    r"""Signed 16-bit integer (:math:`-2^{15} \leq x < 2^{15}`)"""
-    return -(2**15) <= value < 2**15
-
-
-def int32(value: builtins.int) -> bool:
-    r"""Signed 32-bit integer (:math:`-2^{31} \leq x < 2^{31}`)"""
-    return -(2**31) <= value < 2**31
-
-
-def int64(value: builtins.int) -> bool:
-    r"""Signed 64-bit integer (:math:`-2^{63} \leq x < 2^{63}`)"""
-    return -(2**63) <= value < 2**63
-
-
-def int(value: builtins.int) -> bool:
-    r"""Signed 64-bit integer (:math:`-2^{63} \leq x < 2^{63}`)"""
-    return -(2**63) <= value < 2**63
-
-
-try:
-    from packaging import licenses as _licenses
-
-    def SPDX(value: str) -> bool:
-        """See :ref:`PyPA's License-Expression specification
-        ` (added in :pep:`639`).
-        """
-        try:
-            _licenses.canonicalize_license_expression(value)
-        except _licenses.InvalidLicenseExpression:
-            return False
-        return True
-
-except ImportError:  # pragma: no cover
-    _logger.warning(
-        "Could not find an up-to-date installation of `packaging`. "
-        "License expressions might not be validated. "
-        "To enforce validation, please install `packaging>=24.2`."
-    )
-
-    def SPDX(value: str) -> bool:  # noqa: ARG001
-        return True
-
-
-VALID_IMPORT_NAME = re.compile(
-    r"""
-    ^                                  # start of string
-        [A-Za-z_][A-Za-z_0-9]+         # a valid Python identifier
-        (?:\.[A-Za-z_][A-Za-z_0-9]*)*  # optionally followed by .identifier's
-    (?:\s*;\s*private)?                # optionally followed by ; private
-    $                                  # end of string
-    """,
-    re.VERBOSE,
-)
-
-
-def import_name(value: str) -> bool:
-    """This is a valid import name. It has to be series of python identifiers
-    (not keywords), separated by dots, optionally followed by a semicolon and
-    the keyword "private".
-    """
-    if VALID_IMPORT_NAME.match(value) is None:
-        return False
-
-    idents, _, _ = value.partition(";")
-    return all(not keyword.iskeyword(ident) for ident in idents.rstrip().split("."))
diff --git a/voxvera/vendor/setuptools/config/distutils.schema.json b/voxvera/vendor/setuptools/config/distutils.schema.json
deleted file mode 100644
index 93cd2e8..0000000
--- a/voxvera/vendor/setuptools/config/distutils.schema.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-07/schema#",
-
-  "$id": "https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html",
-  "title": "``tool.distutils`` table",
-  "$$description": [
-    "**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``",
-    "subtables to configure arguments for ``distutils`` commands.",
-    "Originally, ``distutils`` allowed developers to configure arguments for",
-    "``setup.py`` commands via `distutils configuration files",
-    "`_.",
-    "See also `the old Python docs _`."
-  ],
-
-  "type": "object",
-  "properties": {
-    "global": {
-      "type": "object",
-      "description": "Global options applied to all ``distutils`` commands"
-    }
-  },
-  "patternProperties": {
-    ".+": {"type": "object"}
-  },
-  "$comment": "TODO: Is there a practical way of making this schema more specific?"
-}
diff --git a/voxvera/vendor/setuptools/config/expand.py b/voxvera/vendor/setuptools/config/expand.py
deleted file mode 100644
index d9a2ded..0000000
--- a/voxvera/vendor/setuptools/config/expand.py
+++ /dev/null
@@ -1,452 +0,0 @@
-"""Utility functions to expand configuration directives or special values
-(such glob patterns).
-
-We can split the process of interpreting configuration files into 2 steps:
-
-1. The parsing the file contents from strings to value objects
-   that can be understand by Python (for example a string with a comma
-   separated list of keywords into an actual Python list of strings).
-
-2. The expansion (or post-processing) of these values according to the
-   semantics ``setuptools`` assign to them (for example a configuration field
-   with the ``file:`` directive should be expanded from a list of file paths to
-   a single string with the contents of those files concatenated)
-
-This module focus on the second step, and therefore allow sharing the expansion
-functions among several configuration file formats.
-
-**PRIVATE MODULE**: API reserved for setuptools internal usage only.
-"""
-
-from __future__ import annotations
-
-import ast
-import importlib
-import os
-import pathlib
-import sys
-from collections.abc import Iterable, Iterator, Mapping
-from configparser import ConfigParser
-from glob import iglob
-from importlib.machinery import ModuleSpec, all_suffixes
-from itertools import chain
-from pathlib import Path
-from types import ModuleType, TracebackType
-from typing import TYPE_CHECKING, Any, Callable, TypeVar
-
-from .. import _static
-from .._path import StrPath, same_path as _same_path
-from ..discovery import find_package_path
-from ..warnings import SetuptoolsWarning
-
-from distutils.errors import DistutilsOptionError
-
-if TYPE_CHECKING:
-    from typing_extensions import Self
-
-    from setuptools.dist import Distribution
-
-_K = TypeVar("_K")
-_V_co = TypeVar("_V_co", covariant=True)
-
-
-class StaticModule:
-    """Proxy to a module object that avoids executing arbitrary code."""
-
-    def __init__(self, name: str, spec: ModuleSpec) -> None:
-        module = ast.parse(pathlib.Path(spec.origin).read_bytes())  # type: ignore[arg-type] # Let it raise an error on None
-        vars(self).update(locals())
-        del self.self
-
-    def _find_assignments(self) -> Iterator[tuple[ast.AST, ast.AST]]:
-        for statement in self.module.body:
-            if isinstance(statement, ast.Assign):
-                yield from ((target, statement.value) for target in statement.targets)
-            elif isinstance(statement, ast.AnnAssign) and statement.value:
-                yield (statement.target, statement.value)
-
-    def __getattr__(self, attr: str) -> Any:
-        """Attempt to load an attribute "statically", via :func:`ast.literal_eval`."""
-        try:
-            return next(
-                ast.literal_eval(value)
-                for target, value in self._find_assignments()
-                if isinstance(target, ast.Name) and target.id == attr
-            )
-        except Exception as e:
-            raise AttributeError(f"{self.name} has no attribute {attr}") from e
-
-
-def glob_relative(
-    patterns: Iterable[str], root_dir: StrPath | None = None
-) -> list[str]:
-    """Expand the list of glob patterns, but preserving relative paths.
-
-    :param list[str] patterns: List of glob patterns
-    :param str root_dir: Path to which globs should be relative
-                         (current directory by default)
-    :rtype: list
-    """
-    glob_characters = {'*', '?', '[', ']', '{', '}'}
-    expanded_values = []
-    root_dir = root_dir or os.getcwd()
-    for value in patterns:
-        # Has globby characters?
-        if any(char in value for char in glob_characters):
-            # then expand the glob pattern while keeping paths *relative*:
-            glob_path = os.path.abspath(os.path.join(root_dir, value))
-            expanded_values.extend(
-                sorted(
-                    os.path.relpath(path, root_dir).replace(os.sep, "/")
-                    for path in iglob(glob_path, recursive=True)
-                )
-            )
-
-        else:
-            # take the value as-is
-            path = os.path.relpath(value, root_dir).replace(os.sep, "/")
-            expanded_values.append(path)
-
-    return expanded_values
-
-
-def read_files(
-    filepaths: StrPath | Iterable[StrPath], root_dir: StrPath | None = None
-) -> str:
-    """Return the content of the files concatenated using ``\n`` as str
-
-    This function is sandboxed and won't reach anything outside ``root_dir``
-
-    (By default ``root_dir`` is the current directory).
-    """
-    from more_itertools import always_iterable
-
-    root_dir = os.path.abspath(root_dir or os.getcwd())
-    _filepaths = (os.path.join(root_dir, path) for path in always_iterable(filepaths))
-    return '\n'.join(
-        _read_file(path)
-        for path in _filter_existing_files(_filepaths)
-        if _assert_local(path, root_dir)
-    )
-
-
-def _filter_existing_files(filepaths: Iterable[StrPath]) -> Iterator[StrPath]:
-    for path in filepaths:
-        if os.path.isfile(path):
-            yield path
-        else:
-            SetuptoolsWarning.emit(f"File {path!r} cannot be found")
-
-
-def _read_file(filepath: bytes | StrPath) -> str:
-    with open(filepath, encoding='utf-8') as f:
-        return f.read()
-
-
-def _assert_local(filepath: StrPath, root_dir: str):
-    if Path(os.path.abspath(root_dir)) not in Path(os.path.abspath(filepath)).parents:
-        msg = f"Cannot access {filepath!r} (or anything outside {root_dir!r})"
-        raise DistutilsOptionError(msg)
-
-    return True
-
-
-def read_attr(
-    attr_desc: str,
-    package_dir: Mapping[str, str] | None = None,
-    root_dir: StrPath | None = None,
-) -> Any:
-    """Reads the value of an attribute from a module.
-
-    This function will try to read the attributed statically first
-    (via :func:`ast.literal_eval`), and only evaluate the module if it fails.
-
-    Examples:
-        read_attr("package.attr")
-        read_attr("package.module.attr")
-
-    :param str attr_desc: Dot-separated string describing how to reach the
-        attribute (see examples above)
-    :param dict[str, str] package_dir: Mapping of package names to their
-        location in disk (represented by paths relative to ``root_dir``).
-    :param str root_dir: Path to directory containing all the packages in
-        ``package_dir`` (current directory by default).
-    :rtype: str
-    """
-    root_dir = root_dir or os.getcwd()
-    attrs_path = attr_desc.strip().split('.')
-    attr_name = attrs_path.pop()
-    module_name = '.'.join(attrs_path)
-    module_name = module_name or '__init__'
-    path = _find_module(module_name, package_dir, root_dir)
-    spec = _find_spec(module_name, path)
-
-    try:
-        value = getattr(StaticModule(module_name, spec), attr_name)
-        # XXX: Is marking as static contents coming from modules too optimistic?
-        return _static.attempt_conversion(value)
-    except Exception:
-        # fallback to evaluate module
-        module = _load_spec(spec, module_name)
-        return getattr(module, attr_name)
-
-
-def _find_spec(module_name: str, module_path: StrPath | None) -> ModuleSpec:
-    spec = importlib.util.spec_from_file_location(module_name, module_path)
-    spec = spec or importlib.util.find_spec(module_name)
-
-    if spec is None:
-        raise ModuleNotFoundError(module_name)
-
-    return spec
-
-
-def _load_spec(spec: ModuleSpec, module_name: str) -> ModuleType:
-    name = getattr(spec, "__name__", module_name)
-    if name in sys.modules:
-        return sys.modules[name]
-    module = importlib.util.module_from_spec(spec)
-    sys.modules[name] = module  # cache (it also ensures `==` works on loaded items)
-    assert spec.loader is not None
-    spec.loader.exec_module(module)
-    return module
-
-
-def _find_module(
-    module_name: str, package_dir: Mapping[str, str] | None, root_dir: StrPath
-) -> str | None:
-    """Find the path to the module named ``module_name``,
-    considering the ``package_dir`` in the build configuration and ``root_dir``.
-
-    >>> tmp = getfixture('tmpdir')
-    >>> _ = tmp.ensure("a/b/c.py")
-    >>> _ = tmp.ensure("a/b/d/__init__.py")
-    >>> r = lambda x: x.replace(str(tmp), "tmp").replace(os.sep, "/")
-    >>> r(_find_module("a.b.c", None, tmp))
-    'tmp/a/b/c.py'
-    >>> r(_find_module("f.g.h", {"": "1", "f": "2", "f.g": "3", "f.g.h": "a/b/d"}, tmp))
-    'tmp/a/b/d/__init__.py'
-    """
-    path_start = find_package_path(module_name, package_dir or {}, root_dir)
-    candidates = chain.from_iterable(
-        (f"{path_start}{ext}", os.path.join(path_start, f"__init__{ext}"))
-        for ext in all_suffixes()
-    )
-    return next((x for x in candidates if os.path.isfile(x)), None)
-
-
-def resolve_class(
-    qualified_class_name: str,
-    package_dir: Mapping[str, str] | None = None,
-    root_dir: StrPath | None = None,
-) -> Callable:
-    """Given a qualified class name, return the associated class object"""
-    root_dir = root_dir or os.getcwd()
-    idx = qualified_class_name.rfind('.')
-    class_name = qualified_class_name[idx + 1 :]
-    pkg_name = qualified_class_name[:idx]
-
-    path = _find_module(pkg_name, package_dir, root_dir)
-    module = _load_spec(_find_spec(pkg_name, path), pkg_name)
-    return getattr(module, class_name)
-
-
-def cmdclass(
-    values: dict[str, str],
-    package_dir: Mapping[str, str] | None = None,
-    root_dir: StrPath | None = None,
-) -> dict[str, Callable]:
-    """Given a dictionary mapping command names to strings for qualified class
-    names, apply :func:`resolve_class` to the dict values.
-    """
-    return {k: resolve_class(v, package_dir, root_dir) for k, v in values.items()}
-
-
-def find_packages(
-    *,
-    namespaces=True,
-    fill_package_dir: dict[str, str] | None = None,
-    root_dir: StrPath | None = None,
-    **kwargs,
-) -> list[str]:
-    """Works similarly to :func:`setuptools.find_packages`, but with all
-    arguments given as keyword arguments. Moreover, ``where`` can be given
-    as a list (the results will be simply concatenated).
-
-    When the additional keyword argument ``namespaces`` is ``True``, it will
-    behave like :func:`setuptools.find_namespace_packages`` (i.e. include
-    implicit namespaces as per :pep:`420`).
-
-    The ``where`` argument will be considered relative to ``root_dir`` (or the current
-    working directory when ``root_dir`` is not given).
-
-    If the ``fill_package_dir`` argument is passed, this function will consider it as a
-    similar data structure to the ``package_dir`` configuration parameter add fill-in
-    any missing package location.
-
-    :rtype: list
-    """
-    from more_itertools import always_iterable, unique_everseen
-
-    from setuptools.discovery import construct_package_dir
-
-    # check "not namespaces" first due to python/mypy#6232
-    if not namespaces:
-        from setuptools.discovery import PackageFinder
-    else:
-        from setuptools.discovery import PEP420PackageFinder as PackageFinder
-
-    root_dir = root_dir or os.curdir
-    where = kwargs.pop('where', ['.'])
-    packages: list[str] = []
-    fill_package_dir = {} if fill_package_dir is None else fill_package_dir
-    search = list(unique_everseen(always_iterable(where)))
-
-    if len(search) == 1 and all(not _same_path(search[0], x) for x in (".", root_dir)):
-        fill_package_dir.setdefault("", search[0])
-
-    for path in search:
-        package_path = _nest_path(root_dir, path)
-        pkgs = PackageFinder.find(package_path, **kwargs)
-        packages.extend(pkgs)
-        if pkgs and not (
-            fill_package_dir.get("") == path or os.path.samefile(package_path, root_dir)
-        ):
-            fill_package_dir.update(construct_package_dir(pkgs, path))
-
-    return packages
-
-
-def _nest_path(parent: StrPath, path: StrPath) -> str:
-    path = parent if path in {".", ""} else os.path.join(parent, path)
-    return os.path.normpath(path)
-
-
-def version(value: Callable | Iterable[str | int] | str) -> str:
-    """When getting the version directly from an attribute,
-    it should be normalised to string.
-    """
-    _value = value() if callable(value) else value
-
-    if isinstance(_value, str):
-        return _value
-    if hasattr(_value, '__iter__'):
-        return '.'.join(map(str, _value))
-    return f'{_value}'
-
-
-def canonic_package_data(package_data: dict) -> dict:
-    if "*" in package_data:
-        package_data[""] = package_data.pop("*")
-    return package_data
-
-
-def canonic_data_files(
-    data_files: list | dict, root_dir: StrPath | None = None
-) -> list[tuple[str, list[str]]]:
-    """For compatibility with ``setup.py``, ``data_files`` should be a list
-    of pairs instead of a dict.
-
-    This function also expands glob patterns.
-    """
-    if isinstance(data_files, list):
-        return data_files
-
-    return [
-        (dest, glob_relative(patterns, root_dir))
-        for dest, patterns in data_files.items()
-    ]
-
-
-def entry_points(
-    text: str, text_source: str = "entry-points"
-) -> dict[str, dict[str, str]]:
-    """Given the contents of entry-points file,
-    process it into a 2-level dictionary (``dict[str, dict[str, str]]``).
-    The first level keys are entry-point groups, the second level keys are
-    entry-point names, and the second level values are references to objects
-    (that correspond to the entry-point value).
-    """
-    # Using undocumented behaviour, see python/typeshed#12700
-    parser = ConfigParser(default_section=None, delimiters=("=",))  # type: ignore[call-overload]
-    parser.optionxform = str  # case sensitive
-    parser.read_string(text, text_source)
-    groups = {k: dict(v.items()) for k, v in parser.items()}
-    groups.pop(parser.default_section, None)
-    return groups
-
-
-class EnsurePackagesDiscovered:
-    """Some expand functions require all the packages to already be discovered before
-    they run, e.g. :func:`read_attr`, :func:`resolve_class`, :func:`cmdclass`.
-
-    Therefore in some cases we will need to run autodiscovery during the evaluation of
-    the configuration. However, it is better to postpone calling package discovery as
-    much as possible, because some parameters can influence it (e.g. ``package_dir``),
-    and those might not have been processed yet.
-    """
-
-    def __init__(self, distribution: Distribution) -> None:
-        self._dist = distribution
-        self._called = False
-
-    def __call__(self) -> None:
-        """Trigger the automatic package discovery, if it is still necessary."""
-        if not self._called:
-            self._called = True
-            self._dist.set_defaults(name=False)  # Skip name, we can still be parsing
-
-    def __enter__(self) -> Self:
-        return self
-
-    def __exit__(
-        self,
-        exc_type: type[BaseException] | None,
-        exc_value: BaseException | None,
-        traceback: TracebackType | None,
-    ) -> None:
-        if self._called:
-            self._dist.set_defaults.analyse_name()  # Now we can set a default name
-
-    def _get_package_dir(self) -> Mapping[str, str]:
-        self()
-        pkg_dir = self._dist.package_dir
-        return {} if pkg_dir is None else pkg_dir
-
-    @property
-    def package_dir(self) -> Mapping[str, str]:
-        """Proxy to ``package_dir`` that may trigger auto-discovery when used."""
-        return LazyMappingProxy(self._get_package_dir)
-
-
-class LazyMappingProxy(Mapping[_K, _V_co]):
-    """Mapping proxy that delays resolving the target object, until really needed.
-
-    >>> def obtain_mapping():
-    ...     print("Running expensive function!")
-    ...     return {"key": "value", "other key": "other value"}
-    >>> mapping = LazyMappingProxy(obtain_mapping)
-    >>> mapping["key"]
-    Running expensive function!
-    'value'
-    >>> mapping["other key"]
-    'other value'
-    """
-
-    def __init__(self, obtain_mapping_value: Callable[[], Mapping[_K, _V_co]]) -> None:
-        self._obtain = obtain_mapping_value
-        self._value: Mapping[_K, _V_co] | None = None
-
-    def _target(self) -> Mapping[_K, _V_co]:
-        if self._value is None:
-            self._value = self._obtain()
-        return self._value
-
-    def __getitem__(self, key: _K) -> _V_co:
-        return self._target()[key]
-
-    def __len__(self) -> int:
-        return len(self._target())
-
-    def __iter__(self) -> Iterator[_K]:
-        return iter(self._target())
diff --git a/voxvera/vendor/setuptools/config/pyprojecttoml.py b/voxvera/vendor/setuptools/config/pyprojecttoml.py
deleted file mode 100644
index 3dfc46d..0000000
--- a/voxvera/vendor/setuptools/config/pyprojecttoml.py
+++ /dev/null
@@ -1,477 +0,0 @@
-"""
-Load setuptools configuration from ``pyproject.toml`` files.
-
-**PRIVATE MODULE**: API reserved for setuptools internal usage only.
-
-To read project metadata, consider using
-``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
-For simple scenarios, you can also try parsing the file directly
-with the help of ``tomllib`` or ``tomli``.
-"""
-
-from __future__ import annotations
-
-import logging
-import os
-from collections.abc import Mapping
-from contextlib import contextmanager
-from functools import partial
-from types import TracebackType
-from typing import TYPE_CHECKING, Any, Callable
-
-from .._path import StrPath
-from ..errors import FileError, InvalidConfigError
-from ..warnings import SetuptoolsWarning
-from . import expand as _expand
-from ._apply_pyprojecttoml import _PREVIOUSLY_DEFINED, _MissingDynamic, apply as _apply
-
-if TYPE_CHECKING:
-    from typing_extensions import Self
-
-    from setuptools.dist import Distribution
-
-_logger = logging.getLogger(__name__)
-
-
-def load_file(filepath: StrPath) -> dict:
-    from ..compat.py310 import tomllib
-
-    with open(filepath, "rb") as file:
-        return tomllib.load(file)
-
-
-def validate(config: dict, filepath: StrPath) -> bool:
-    from . import _validate_pyproject as validator
-
-    trove_classifier = validator.FORMAT_FUNCTIONS.get("trove-classifier")
-    if hasattr(trove_classifier, "_disable_download"):
-        # Improve reproducibility by default. See abravalheri/validate-pyproject#31
-        trove_classifier._disable_download()  # type: ignore[union-attr]
-
-    try:
-        return validator.validate(config)
-    except validator.ValidationError as ex:
-        summary = f"configuration error: {ex.summary}"
-        if ex.name.strip("`") != "project":
-            # Probably it is just a field missing/misnamed, not worthy the verbosity...
-            _logger.debug(summary)
-            _logger.debug(ex.details)
-
-        error = f"invalid pyproject.toml config: {ex.name}."
-        raise ValueError(f"{error}\n{summary}") from None
-
-
-def apply_configuration(
-    dist: Distribution,
-    filepath: StrPath,
-    ignore_option_errors: bool = False,
-) -> Distribution:
-    """Apply the configuration from a ``pyproject.toml`` file into an existing
-    distribution object.
-    """
-    config = read_configuration(filepath, True, ignore_option_errors, dist)
-    return _apply(dist, config, filepath)
-
-
-def read_configuration(
-    filepath: StrPath,
-    expand: bool = True,
-    ignore_option_errors: bool = False,
-    dist: Distribution | None = None,
-) -> dict[str, Any]:
-    """Read given configuration file and returns options from it as a dict.
-
-    :param str|unicode filepath: Path to configuration file in the ``pyproject.toml``
-        format.
-
-    :param bool expand: Whether to expand directives and other computed values
-        (i.e. post-process the given configuration)
-
-    :param bool ignore_option_errors: Whether to silently ignore
-        options, values of which could not be resolved (e.g. due to exceptions
-        in directives such as file:, attr:, etc.).
-        If False exceptions are propagated as expected.
-
-    :param Distribution|None: Distribution object to which the configuration refers.
-        If not given a dummy object will be created and discarded after the
-        configuration is read. This is used for auto-discovery of packages and in the
-        case a dynamic configuration (e.g. ``attr`` or ``cmdclass``) is expanded.
-        When ``expand=False`` this object is simply ignored.
-
-    :rtype: dict
-    """
-    filepath = os.path.abspath(filepath)
-
-    if not os.path.isfile(filepath):
-        raise FileError(f"Configuration file {filepath!r} does not exist.")
-
-    asdict = load_file(filepath) or {}
-    project_table = asdict.get("project", {})
-    tool_table = asdict.get("tool", {})
-    setuptools_table = tool_table.get("setuptools", {})
-    if not asdict or not (project_table or setuptools_table):
-        return {}  # User is not using pyproject to configure setuptools
-
-    if "setuptools" in asdict.get("tools", {}):
-        # let the user know they probably have a typo in their metadata
-        _ToolsTypoInMetadata.emit()
-
-    if "distutils" in tool_table:
-        _ExperimentalConfiguration.emit(subject="[tool.distutils]")
-
-    # There is an overall sense in the community that making include_package_data=True
-    # the default would be an improvement.
-    # `ini2toml` backfills include_package_data=False when nothing is explicitly given,
-    # therefore setting a default here is backwards compatible.
-    if dist and dist.include_package_data is not None:
-        setuptools_table.setdefault("include-package-data", dist.include_package_data)
-    else:
-        setuptools_table.setdefault("include-package-data", True)
-    # Persist changes:
-    asdict["tool"] = tool_table
-    tool_table["setuptools"] = setuptools_table
-
-    if "ext-modules" in setuptools_table:
-        _ExperimentalConfiguration.emit(subject="[tool.setuptools.ext-modules]")
-
-    fields = ("import-names", "import-namespaces")
-    places = (project_table, project_table.get("dynamic", []))
-    if any(field in place for field in fields for place in places):
-        raise NotImplementedError(
-            "Setuptools does not support `import-names` and `import-namespaces`"
-            " in `pyproject.toml` yet. If your are interested in this feature, "
-            " please consider submitting a contribution via pull requests."
-        )
-
-    with _ignore_errors(ignore_option_errors):
-        # Don't complain about unrelated errors (e.g. tools not using the "tool" table)
-        subset = {"project": project_table, "tool": {"setuptools": setuptools_table}}
-        validate(subset, filepath)
-
-    if expand:
-        root_dir = os.path.dirname(filepath)
-        return expand_configuration(asdict, root_dir, ignore_option_errors, dist)
-
-    return asdict
-
-
-def expand_configuration(
-    config: dict,
-    root_dir: StrPath | None = None,
-    ignore_option_errors: bool = False,
-    dist: Distribution | None = None,
-) -> dict:
-    """Given a configuration with unresolved fields (e.g. dynamic, cmdclass, ...)
-    find their final values.
-
-    :param dict config: Dict containing the configuration for the distribution
-    :param str root_dir: Top-level directory for the distribution/project
-        (the same directory where ``pyproject.toml`` is place)
-    :param bool ignore_option_errors: see :func:`read_configuration`
-    :param Distribution|None: Distribution object to which the configuration refers.
-        If not given a dummy object will be created and discarded after the
-        configuration is read. Used in the case a dynamic configuration
-        (e.g. ``attr`` or ``cmdclass``).
-
-    :rtype: dict
-    """
-    return _ConfigExpander(config, root_dir, ignore_option_errors, dist).expand()
-
-
-class _ConfigExpander:
-    def __init__(
-        self,
-        config: dict,
-        root_dir: StrPath | None = None,
-        ignore_option_errors: bool = False,
-        dist: Distribution | None = None,
-    ) -> None:
-        self.config = config
-        self.root_dir = root_dir or os.getcwd()
-        self.project_cfg = config.get("project", {})
-        self.dynamic = self.project_cfg.get("dynamic", [])
-        self.setuptools_cfg = config.get("tool", {}).get("setuptools", {})
-        self.dynamic_cfg = self.setuptools_cfg.get("dynamic", {})
-        self.ignore_option_errors = ignore_option_errors
-        self._dist = dist
-        self._referenced_files = set[str]()
-
-    def _ensure_dist(self) -> Distribution:
-        from setuptools.dist import Distribution
-
-        attrs = {"src_root": self.root_dir, "name": self.project_cfg.get("name", None)}
-        return self._dist or Distribution(attrs)
-
-    def _process_field(self, container: dict, field: str, fn: Callable):
-        if field in container:
-            with _ignore_errors(self.ignore_option_errors):
-                container[field] = fn(container[field])
-
-    def _canonic_package_data(self, field="package-data"):
-        package_data = self.setuptools_cfg.get(field, {})
-        return _expand.canonic_package_data(package_data)
-
-    def expand(self):
-        self._expand_packages()
-        self._canonic_package_data()
-        self._canonic_package_data("exclude-package-data")
-
-        # A distribution object is required for discovering the correct package_dir
-        dist = self._ensure_dist()
-        ctx = _EnsurePackagesDiscovered(dist, self.project_cfg, self.setuptools_cfg)
-        with ctx as ensure_discovered:
-            package_dir = ensure_discovered.package_dir
-            self._expand_data_files()
-            self._expand_cmdclass(package_dir)
-            self._expand_all_dynamic(dist, package_dir)
-
-        dist._referenced_files.update(self._referenced_files)
-        return self.config
-
-    def _expand_packages(self):
-        packages = self.setuptools_cfg.get("packages")
-        if packages is None or isinstance(packages, (list, tuple)):
-            return
-
-        find = packages.get("find")
-        if isinstance(find, dict):
-            find["root_dir"] = self.root_dir
-            find["fill_package_dir"] = self.setuptools_cfg.setdefault("package-dir", {})
-            with _ignore_errors(self.ignore_option_errors):
-                self.setuptools_cfg["packages"] = _expand.find_packages(**find)
-
-    def _expand_data_files(self):
-        data_files = partial(_expand.canonic_data_files, root_dir=self.root_dir)
-        self._process_field(self.setuptools_cfg, "data-files", data_files)
-
-    def _expand_cmdclass(self, package_dir: Mapping[str, str]):
-        root_dir = self.root_dir
-        cmdclass = partial(_expand.cmdclass, package_dir=package_dir, root_dir=root_dir)
-        self._process_field(self.setuptools_cfg, "cmdclass", cmdclass)
-
-    def _expand_all_dynamic(self, dist: Distribution, package_dir: Mapping[str, str]):
-        special = (  # need special handling
-            "version",
-            "readme",
-            "entry-points",
-            "scripts",
-            "gui-scripts",
-            "classifiers",
-            "dependencies",
-            "optional-dependencies",
-        )
-        # `_obtain` functions are assumed to raise appropriate exceptions/warnings.
-        obtained_dynamic = {
-            field: self._obtain(dist, field, package_dir)
-            for field in self.dynamic
-            if field not in special
-        }
-        obtained_dynamic.update(
-            self._obtain_entry_points(dist, package_dir) or {},
-            version=self._obtain_version(dist, package_dir),
-            readme=self._obtain_readme(dist),
-            classifiers=self._obtain_classifiers(dist),
-            dependencies=self._obtain_dependencies(dist),
-            optional_dependencies=self._obtain_optional_dependencies(dist),
-        )
-        # `None` indicates there is nothing in `tool.setuptools.dynamic` but the value
-        # might have already been set by setup.py/extensions, so avoid overwriting.
-        updates = {k: v for k, v in obtained_dynamic.items() if v is not None}
-        self.project_cfg.update(updates)
-
-    def _ensure_previously_set(self, dist: Distribution, field: str):
-        previous = _PREVIOUSLY_DEFINED[field](dist)
-        if previous is None and not self.ignore_option_errors:
-            msg = (
-                f"No configuration found for dynamic {field!r}.\n"
-                "Some dynamic fields need to be specified via `tool.setuptools.dynamic`"
-                "\nothers must be specified via the equivalent attribute in `setup.py`."
-            )
-            raise InvalidConfigError(msg)
-
-    def _expand_directive(
-        self, specifier: str, directive, package_dir: Mapping[str, str]
-    ):
-        from more_itertools import always_iterable
-
-        with _ignore_errors(self.ignore_option_errors):
-            root_dir = self.root_dir
-            if "file" in directive:
-                self._referenced_files.update(always_iterable(directive["file"]))
-                return _expand.read_files(directive["file"], root_dir)
-            if "attr" in directive:
-                return _expand.read_attr(directive["attr"], package_dir, root_dir)
-            raise ValueError(f"invalid `{specifier}`: {directive!r}")
-        return None
-
-    def _obtain(self, dist: Distribution, field: str, package_dir: Mapping[str, str]):
-        if field in self.dynamic_cfg:
-            return self._expand_directive(
-                f"tool.setuptools.dynamic.{field}",
-                self.dynamic_cfg[field],
-                package_dir,
-            )
-        self._ensure_previously_set(dist, field)
-        return None
-
-    def _obtain_version(self, dist: Distribution, package_dir: Mapping[str, str]):
-        # Since plugins can set version, let's silently skip if it cannot be obtained
-        if "version" in self.dynamic and "version" in self.dynamic_cfg:
-            return _expand.version(
-                # We already do an early check for the presence of "version"
-                self._obtain(dist, "version", package_dir)  # pyright: ignore[reportArgumentType]
-            )
-        return None
-
-    def _obtain_readme(self, dist: Distribution) -> dict[str, str] | None:
-        if "readme" not in self.dynamic:
-            return None
-
-        dynamic_cfg = self.dynamic_cfg
-        if "readme" in dynamic_cfg:
-            return {
-                # We already do an early check for the presence of "readme"
-                "text": self._obtain(dist, "readme", {}),
-                "content-type": dynamic_cfg["readme"].get("content-type", "text/x-rst"),
-            }  # pyright: ignore[reportReturnType]
-
-        self._ensure_previously_set(dist, "readme")
-        return None
-
-    def _obtain_entry_points(
-        self, dist: Distribution, package_dir: Mapping[str, str]
-    ) -> dict[str, dict[str, Any]] | None:
-        fields = ("entry-points", "scripts", "gui-scripts")
-        if not any(field in self.dynamic for field in fields):
-            return None
-
-        text = self._obtain(dist, "entry-points", package_dir)
-        if text is None:
-            return None
-
-        groups = _expand.entry_points(text)
-        # Any is str | dict[str, str], but causes variance issues
-        expanded: dict[str, dict[str, Any]] = {"entry-points": groups}
-
-        def _set_scripts(field: str, group: str):
-            if group in groups:
-                value = groups.pop(group)
-                if field not in self.dynamic:
-                    raise InvalidConfigError(_MissingDynamic.details(field, value))
-                expanded[field] = value
-
-        _set_scripts("scripts", "console_scripts")
-        _set_scripts("gui-scripts", "gui_scripts")
-
-        return expanded
-
-    def _obtain_classifiers(self, dist: Distribution):
-        if "classifiers" in self.dynamic:
-            value = self._obtain(dist, "classifiers", {})
-            if value:
-                return value.splitlines()
-        return None
-
-    def _obtain_dependencies(self, dist: Distribution):
-        if "dependencies" in self.dynamic:
-            value = self._obtain(dist, "dependencies", {})
-            if value:
-                return _parse_requirements_list(value)
-        return None
-
-    def _obtain_optional_dependencies(self, dist: Distribution):
-        if "optional-dependencies" not in self.dynamic:
-            return None
-        if "optional-dependencies" in self.dynamic_cfg:
-            optional_dependencies_map = self.dynamic_cfg["optional-dependencies"]
-            assert isinstance(optional_dependencies_map, dict)
-            return {
-                group: _parse_requirements_list(
-                    self._expand_directive(
-                        f"tool.setuptools.dynamic.optional-dependencies.{group}",
-                        directive,
-                        {},
-                    )
-                )
-                for group, directive in optional_dependencies_map.items()
-            }
-        self._ensure_previously_set(dist, "optional-dependencies")
-        return None
-
-
-def _parse_requirements_list(value):
-    return [
-        line
-        for line in value.splitlines()
-        if line.strip() and not line.strip().startswith("#")
-    ]
-
-
-@contextmanager
-def _ignore_errors(ignore_option_errors: bool):
-    if not ignore_option_errors:
-        yield
-        return
-
-    try:
-        yield
-    except Exception as ex:
-        _logger.debug(f"ignored error: {ex.__class__.__name__} - {ex}")
-
-
-class _EnsurePackagesDiscovered(_expand.EnsurePackagesDiscovered):
-    def __init__(
-        self, distribution: Distribution, project_cfg: dict, setuptools_cfg: dict
-    ) -> None:
-        super().__init__(distribution)
-        self._project_cfg = project_cfg
-        self._setuptools_cfg = setuptools_cfg
-
-    def __enter__(self) -> Self:
-        """When entering the context, the values of ``packages``, ``py_modules`` and
-        ``package_dir`` that are missing in ``dist`` are copied from ``setuptools_cfg``.
-        """
-        dist, cfg = self._dist, self._setuptools_cfg
-        package_dir: dict[str, str] = cfg.setdefault("package-dir", {})
-        package_dir.update(dist.package_dir or {})
-        dist.package_dir = package_dir  # needs to be the same object
-
-        dist.set_defaults._ignore_ext_modules()  # pyproject.toml-specific behaviour
-
-        # Set `name`, `py_modules` and `packages` in dist to short-circuit
-        # auto-discovery, but avoid overwriting empty lists purposefully set by users.
-        if dist.metadata.name is None:
-            dist.metadata.name = self._project_cfg.get("name")
-        if dist.py_modules is None:
-            dist.py_modules = cfg.get("py-modules")
-        if dist.packages is None:
-            dist.packages = cfg.get("packages")
-
-        return super().__enter__()
-
-    def __exit__(
-        self,
-        exc_type: type[BaseException] | None,
-        exc_value: BaseException | None,
-        traceback: TracebackType | None,
-    ) -> None:
-        """When exiting the context, if values of ``packages``, ``py_modules`` and
-        ``package_dir`` are missing in ``setuptools_cfg``, copy from ``dist``.
-        """
-        # If anything was discovered set them back, so they count in the final config.
-        self._setuptools_cfg.setdefault("packages", self._dist.packages)
-        self._setuptools_cfg.setdefault("py-modules", self._dist.py_modules)
-        return super().__exit__(exc_type, exc_value, traceback)
-
-
-class _ExperimentalConfiguration(SetuptoolsWarning):
-    _SUMMARY = (
-        "`{subject}` in `pyproject.toml` is still *experimental* "
-        "and likely to change in future releases."
-    )
-
-
-class _ToolsTypoInMetadata(SetuptoolsWarning):
-    _SUMMARY = (
-        "Ignoring [tools.setuptools] in pyproject.toml, did you mean [tool.setuptools]?"
-    )
diff --git a/voxvera/vendor/setuptools/config/setupcfg.py b/voxvera/vendor/setuptools/config/setupcfg.py
deleted file mode 100644
index 121a0fe..0000000
--- a/voxvera/vendor/setuptools/config/setupcfg.py
+++ /dev/null
@@ -1,782 +0,0 @@
-"""
-Load setuptools configuration from ``setup.cfg`` files.
-
-**API will be made private in the future**
-
-To read project metadata, consider using
-``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
-For simple scenarios, you can also try parsing the file directly
-with the help of ``configparser``.
-"""
-
-from __future__ import annotations
-
-import contextlib
-import functools
-import os
-from abc import abstractmethod
-from collections import defaultdict
-from collections.abc import Iterable, Iterator
-from functools import partial, wraps
-from typing import TYPE_CHECKING, Any, Callable, ClassVar, Generic, TypeVar, cast
-
-from packaging.markers import default_environment as marker_env
-from packaging.requirements import InvalidRequirement, Requirement
-from packaging.version import InvalidVersion, Version
-
-from .. import _static
-from .._path import StrPath
-from ..errors import FileError, OptionError
-from ..warnings import SetuptoolsDeprecationWarning
-from . import expand
-
-if TYPE_CHECKING:
-    from typing_extensions import TypeAlias
-
-    from setuptools.dist import Distribution
-
-    from distutils.dist import DistributionMetadata
-
-SingleCommandOptions: TypeAlias = dict[str, tuple[str, Any]]
-"""Dict that associate the name of the options of a particular command to a
-tuple. The first element of the tuple indicates the origin of the option value
-(e.g. the name of the configuration file where it was read from),
-while the second element of the tuple is the option value itself
-"""
-AllCommandOptions: TypeAlias = dict[str, SingleCommandOptions]
-"""cmd name => its options"""
-Target = TypeVar("Target", "Distribution", "DistributionMetadata")
-
-
-def read_configuration(
-    filepath: StrPath, find_others: bool = False, ignore_option_errors: bool = False
-) -> dict:
-    """Read given configuration file and returns options from it as a dict.
-
-    :param str|unicode filepath: Path to configuration file
-        to get options from.
-
-    :param bool find_others: Whether to search for other configuration files
-        which could be on in various places.
-
-    :param bool ignore_option_errors: Whether to silently ignore
-        options, values of which could not be resolved (e.g. due to exceptions
-        in directives such as file:, attr:, etc.).
-        If False exceptions are propagated as expected.
-
-    :rtype: dict
-    """
-    from setuptools.dist import Distribution
-
-    dist = Distribution()
-    filenames = dist.find_config_files() if find_others else []
-    handlers = _apply(dist, filepath, filenames, ignore_option_errors)
-    return configuration_to_dict(handlers)
-
-
-def apply_configuration(dist: Distribution, filepath: StrPath) -> Distribution:
-    """Apply the configuration from a ``setup.cfg`` file into an existing
-    distribution object.
-    """
-    _apply(dist, filepath)
-    dist._finalize_requires()
-    return dist
-
-
-def _apply(
-    dist: Distribution,
-    filepath: StrPath,
-    other_files: Iterable[StrPath] = (),
-    ignore_option_errors: bool = False,
-) -> tuple[ConfigMetadataHandler, ConfigOptionsHandler]:
-    """Read configuration from ``filepath`` and applies to the ``dist`` object."""
-    from setuptools.dist import _Distribution
-
-    filepath = os.path.abspath(filepath)
-
-    if not os.path.isfile(filepath):
-        raise FileError(f'Configuration file {filepath} does not exist.')
-
-    current_directory = os.getcwd()
-    os.chdir(os.path.dirname(filepath))
-    filenames = [*other_files, filepath]
-
-    try:
-        # TODO: Temporary cast until mypy 1.12 is released with upstream fixes from typeshed
-        _Distribution.parse_config_files(dist, filenames=cast(list[str], filenames))
-        handlers = parse_configuration(
-            dist, dist.command_options, ignore_option_errors=ignore_option_errors
-        )
-        dist._finalize_license_files()
-    finally:
-        os.chdir(current_directory)
-
-    return handlers
-
-
-def _get_option(target_obj: Distribution | DistributionMetadata, key: str):
-    """
-    Given a target object and option key, get that option from
-    the target object, either through a get_{key} method or
-    from an attribute directly.
-    """
-    getter_name = f'get_{key}'
-    by_attribute = functools.partial(getattr, target_obj, key)
-    getter = getattr(target_obj, getter_name, by_attribute)
-    return getter()
-
-
-def configuration_to_dict(
-    handlers: Iterable[
-        ConfigHandler[Distribution] | ConfigHandler[DistributionMetadata]
-    ],
-) -> dict:
-    """Returns configuration data gathered by given handlers as a dict.
-
-    :param Iterable[ConfigHandler] handlers: Handlers list,
-        usually from parse_configuration()
-
-    :rtype: dict
-    """
-    config_dict: dict = defaultdict(dict)
-
-    for handler in handlers:
-        for option in handler.set_options:
-            value = _get_option(handler.target_obj, option)
-            config_dict[handler.section_prefix][option] = value
-
-    return config_dict
-
-
-def parse_configuration(
-    distribution: Distribution,
-    command_options: AllCommandOptions,
-    ignore_option_errors: bool = False,
-) -> tuple[ConfigMetadataHandler, ConfigOptionsHandler]:
-    """Performs additional parsing of configuration options
-    for a distribution.
-
-    Returns a list of used option handlers.
-
-    :param Distribution distribution:
-    :param dict command_options:
-    :param bool ignore_option_errors: Whether to silently ignore
-        options, values of which could not be resolved (e.g. due to exceptions
-        in directives such as file:, attr:, etc.).
-        If False exceptions are propagated as expected.
-    :rtype: list
-    """
-    with expand.EnsurePackagesDiscovered(distribution) as ensure_discovered:
-        options = ConfigOptionsHandler(
-            distribution,
-            command_options,
-            ignore_option_errors,
-            ensure_discovered,
-        )
-
-        options.parse()
-        if not distribution.package_dir:
-            distribution.package_dir = options.package_dir  # Filled by `find_packages`
-
-        meta = ConfigMetadataHandler(
-            distribution.metadata,
-            command_options,
-            ignore_option_errors,
-            ensure_discovered,
-            distribution.package_dir,
-            distribution.src_root,
-        )
-        meta.parse()
-        distribution._referenced_files.update(
-            options._referenced_files, meta._referenced_files
-        )
-
-    return meta, options
-
-
-def _warn_accidental_env_marker_misconfig(label: str, orig_value: str, parsed: list):
-    """Because users sometimes misinterpret this configuration:
-
-    [options.extras_require]
-    foo = bar;python_version<"4"
-
-    It looks like one requirement with an environment marker
-    but because there is no newline, it's parsed as two requirements
-    with a semicolon as separator.
-
-    Therefore, if:
-        * input string does not contain a newline AND
-        * parsed result contains two requirements AND
-        * parsing of the two parts from the result (";")
-        leads in a valid Requirement with a valid marker
-    a UserWarning is shown to inform the user about the possible problem.
-    """
-    if "\n" in orig_value or len(parsed) != 2:
-        return
-
-    markers = marker_env().keys()
-
-    try:
-        req = Requirement(parsed[1])
-        if req.name in markers:
-            _AmbiguousMarker.emit(field=label, req=parsed[1])
-    except InvalidRequirement as ex:
-        if any(parsed[1].startswith(marker) for marker in markers):
-            msg = _AmbiguousMarker.message(field=label, req=parsed[1])
-            raise InvalidRequirement(msg) from ex
-
-
-class ConfigHandler(Generic[Target]):
-    """Handles metadata supplied in configuration files."""
-
-    section_prefix: str
-    """Prefix for config sections handled by this handler.
-    Must be provided by class heirs.
-
-    """
-
-    aliases: ClassVar[dict[str, str]] = {}
-    """Options aliases.
-    For compatibility with various packages. E.g.: d2to1 and pbr.
-    Note: `-` in keys is replaced with `_` by config parser.
-
-    """
-
-    def __init__(
-        self,
-        target_obj: Target,
-        options: AllCommandOptions,
-        ignore_option_errors,
-        ensure_discovered: expand.EnsurePackagesDiscovered,
-    ) -> None:
-        self.ignore_option_errors = ignore_option_errors
-        self.target_obj: Target = target_obj
-        self.sections = dict(self._section_options(options))
-        self.set_options: list[str] = []
-        self.ensure_discovered = ensure_discovered
-        self._referenced_files = set[str]()
-        """After parsing configurations, this property will enumerate
-        all files referenced by the "file:" directive. Private API for setuptools only.
-        """
-
-    @classmethod
-    def _section_options(
-        cls, options: AllCommandOptions
-    ) -> Iterator[tuple[str, SingleCommandOptions]]:
-        for full_name, value in options.items():
-            pre, _sep, name = full_name.partition(cls.section_prefix)
-            if pre:
-                continue
-            yield name.lstrip('.'), value
-
-    @property
-    @abstractmethod
-    def parsers(self) -> dict[str, Callable]:
-        """Metadata item name to parser function mapping."""
-        raise NotImplementedError(
-            f'{self.__class__.__name__} must provide .parsers property'
-        )
-
-    def __setitem__(self, option_name, value) -> None:
-        target_obj = self.target_obj
-
-        # Translate alias into real name.
-        option_name = self.aliases.get(option_name, option_name)
-
-        try:
-            current_value = getattr(target_obj, option_name)
-        except AttributeError as e:
-            raise KeyError(option_name) from e
-
-        if current_value:
-            # Already inhabited. Skipping.
-            return
-
-        try:
-            parsed = self.parsers.get(option_name, lambda x: x)(value)
-        except (Exception,) * self.ignore_option_errors:
-            return
-
-        simple_setter = functools.partial(target_obj.__setattr__, option_name)
-        setter = getattr(target_obj, f"set_{option_name}", simple_setter)
-        setter(parsed)
-
-        self.set_options.append(option_name)
-
-    @classmethod
-    def _parse_list(cls, value, separator=','):
-        """Represents value as a list.
-
-        Value is split either by separator (defaults to comma) or by lines.
-
-        :param value:
-        :param separator: List items separator character.
-        :rtype: list
-        """
-        if isinstance(value, list):  # _get_parser_compound case
-            return value
-
-        if '\n' in value:
-            value = value.splitlines()
-        else:
-            value = value.split(separator)
-
-        return [chunk.strip() for chunk in value if chunk.strip()]
-
-    @classmethod
-    def _parse_dict(cls, value):
-        """Represents value as a dict.
-
-        :param value:
-        :rtype: dict
-        """
-        separator = '='
-        result = {}
-        for line in cls._parse_list(value):
-            key, sep, val = line.partition(separator)
-            if sep != separator:
-                raise OptionError(f"Unable to parse option value to dict: {value}")
-            result[key.strip()] = val.strip()
-
-        return result
-
-    @classmethod
-    def _parse_bool(cls, value):
-        """Represents value as boolean.
-
-        :param value:
-        :rtype: bool
-        """
-        value = value.lower()
-        return value in ('1', 'true', 'yes')
-
-    @classmethod
-    def _exclude_files_parser(cls, key):
-        """Returns a parser function to make sure field inputs
-        are not files.
-
-        Parses a value after getting the key so error messages are
-        more informative.
-
-        :param key:
-        :rtype: callable
-        """
-
-        def parser(value):
-            exclude_directive = 'file:'
-            if value.startswith(exclude_directive):
-                raise ValueError(
-                    f'Only strings are accepted for the {key} field, '
-                    'files are not accepted'
-                )
-            return _static.Str(value)
-
-        return parser
-
-    def _parse_file(self, value, root_dir: StrPath | None):
-        """Represents value as a string, allowing including text
-        from nearest files using `file:` directive.
-
-        Directive is sandboxed and won't reach anything outside
-        directory with setup.py.
-
-        Examples:
-            file: README.rst, CHANGELOG.md, src/file.txt
-
-        :param str value:
-        :rtype: str
-        """
-        include_directive = 'file:'
-
-        if not isinstance(value, str):
-            return value
-
-        if not value.startswith(include_directive):
-            return _static.Str(value)
-
-        spec = value[len(include_directive) :]
-        filepaths = [path.strip() for path in spec.split(',')]
-        self._referenced_files.update(filepaths)
-        # XXX: Is marking as static contents coming from files too optimistic?
-        return _static.Str(expand.read_files(filepaths, root_dir))
-
-    def _parse_attr(self, value, package_dir, root_dir: StrPath):
-        """Represents value as a module attribute.
-
-        Examples:
-            attr: package.attr
-            attr: package.module.attr
-
-        :param str value:
-        :rtype: str
-        """
-        attr_directive = 'attr:'
-        if not value.startswith(attr_directive):
-            return _static.Str(value)
-
-        attr_desc = value.replace(attr_directive, '')
-
-        # Make sure package_dir is populated correctly, so `attr:` directives can work
-        package_dir.update(self.ensure_discovered.package_dir)
-        return expand.read_attr(attr_desc, package_dir, root_dir)
-
-    @classmethod
-    def _get_parser_compound(cls, *parse_methods):
-        """Returns parser function to represents value as a list.
-
-        Parses a value applying given methods one after another.
-
-        :param parse_methods:
-        :rtype: callable
-        """
-
-        def parse(value):
-            parsed = value
-
-            for method in parse_methods:
-                parsed = method(parsed)
-
-            return parsed
-
-        return parse
-
-    @classmethod
-    def _parse_section_to_dict_with_key(cls, section_options, values_parser):
-        """Parses section options into a dictionary.
-
-        Applies a given parser to each option in a section.
-
-        :param dict section_options:
-        :param callable values_parser: function with 2 args corresponding to key, value
-        :rtype: dict
-        """
-        value = {}
-        for key, (_, val) in section_options.items():
-            value[key] = values_parser(key, val)
-        return value
-
-    @classmethod
-    def _parse_section_to_dict(cls, section_options, values_parser=None):
-        """Parses section options into a dictionary.
-
-        Optionally applies a given parser to each value.
-
-        :param dict section_options:
-        :param callable values_parser: function with 1 arg corresponding to option value
-        :rtype: dict
-        """
-        parser = (lambda _, v: values_parser(v)) if values_parser else (lambda _, v: v)
-        return cls._parse_section_to_dict_with_key(section_options, parser)
-
-    def parse_section(self, section_options) -> None:
-        """Parses configuration file section.
-
-        :param dict section_options:
-        """
-        for name, (_, value) in section_options.items():
-            with contextlib.suppress(KeyError):
-                # Keep silent for a new option may appear anytime.
-                self[name] = value
-
-    def parse(self) -> None:
-        """Parses configuration file items from one
-        or more related sections.
-
-        """
-        for section_name, section_options in self.sections.items():
-            method_postfix = ''
-            if section_name:  # [section.option] variant
-                method_postfix = f"_{section_name}"
-
-            section_parser_method: Callable | None = getattr(
-                self,
-                # Dots in section names are translated into dunderscores.
-                f'parse_section{method_postfix}'.replace('.', '__'),
-                None,
-            )
-
-            if section_parser_method is None:
-                raise OptionError(
-                    "Unsupported distribution option section: "
-                    f"[{self.section_prefix}.{section_name}]"
-                )
-
-            section_parser_method(section_options)
-
-    def _deprecated_config_handler(self, func, msg, **kw):
-        """this function will wrap around parameters that are deprecated
-
-        :param msg: deprecation message
-        :param func: function to be wrapped around
-        """
-
-        @wraps(func)
-        def config_handler(*args, **kwargs):
-            kw.setdefault("stacklevel", 2)
-            _DeprecatedConfig.emit("Deprecated config in `setup.cfg`", msg, **kw)
-            return func(*args, **kwargs)
-
-        return config_handler
-
-
-class ConfigMetadataHandler(ConfigHandler["DistributionMetadata"]):
-    section_prefix = 'metadata'
-
-    aliases = {
-        'home_page': 'url',
-        'summary': 'description',
-        'classifier': 'classifiers',
-        'platform': 'platforms',
-    }
-
-    strict_mode = False
-    """We need to keep it loose, to be partially compatible with
-    `pbr` and `d2to1` packages which also uses `metadata` section.
-
-    """
-
-    def __init__(
-        self,
-        target_obj: DistributionMetadata,
-        options: AllCommandOptions,
-        ignore_option_errors: bool,
-        ensure_discovered: expand.EnsurePackagesDiscovered,
-        package_dir: dict | None = None,
-        root_dir: StrPath | None = os.curdir,
-    ) -> None:
-        super().__init__(target_obj, options, ignore_option_errors, ensure_discovered)
-        self.package_dir = package_dir
-        self.root_dir = root_dir
-
-    @property
-    def parsers(self) -> dict[str, Callable]:
-        """Metadata item name to parser function mapping."""
-        parse_list_static = self._get_parser_compound(self._parse_list, _static.List)
-        parse_dict_static = self._get_parser_compound(self._parse_dict, _static.Dict)
-        parse_file = partial(self._parse_file, root_dir=self.root_dir)
-        exclude_files_parser = self._exclude_files_parser
-
-        return {
-            'author': _static.Str,
-            'author_email': _static.Str,
-            'maintainer': _static.Str,
-            'maintainer_email': _static.Str,
-            'platforms': parse_list_static,
-            'keywords': parse_list_static,
-            'provides': parse_list_static,
-            'obsoletes': parse_list_static,
-            'classifiers': self._get_parser_compound(parse_file, parse_list_static),
-            'license': exclude_files_parser('license'),
-            'license_files': parse_list_static,
-            'description': parse_file,
-            'long_description': parse_file,
-            'long_description_content_type': _static.Str,
-            'version': self._parse_version,  # Cannot be marked as dynamic
-            'url': _static.Str,
-            'project_urls': parse_dict_static,
-        }
-
-    def _parse_version(self, value):
-        """Parses `version` option value.
-
-        :param value:
-        :rtype: str
-
-        """
-        version = self._parse_file(value, self.root_dir)
-
-        if version != value:
-            version = version.strip()
-            # Be strict about versions loaded from file because it's easy to
-            # accidentally include newlines and other unintended content
-            try:
-                Version(version)
-            except InvalidVersion as e:
-                raise OptionError(
-                    f'Version loaded from {value} does not '
-                    f'comply with PEP 440: {version}'
-                ) from e
-
-            return version
-
-        return expand.version(self._parse_attr(value, self.package_dir, self.root_dir))
-
-
-class ConfigOptionsHandler(ConfigHandler["Distribution"]):
-    section_prefix = 'options'
-
-    def __init__(
-        self,
-        target_obj: Distribution,
-        options: AllCommandOptions,
-        ignore_option_errors: bool,
-        ensure_discovered: expand.EnsurePackagesDiscovered,
-    ) -> None:
-        super().__init__(target_obj, options, ignore_option_errors, ensure_discovered)
-        self.root_dir = target_obj.src_root
-        self.package_dir: dict[str, str] = {}  # To be filled by `find_packages`
-
-    @classmethod
-    def _parse_list_semicolon(cls, value):
-        return cls._parse_list(value, separator=';')
-
-    def _parse_file_in_root(self, value):
-        return self._parse_file(value, root_dir=self.root_dir)
-
-    def _parse_requirements_list(self, label: str, value: str):
-        # Parse a requirements list, either by reading in a `file:`, or a list.
-        parsed = self._parse_list_semicolon(self._parse_file_in_root(value))
-        _warn_accidental_env_marker_misconfig(label, value, parsed)
-        # Filter it to only include lines that are not comments. `parse_list`
-        # will have stripped each line and filtered out empties.
-        return _static.List(line for line in parsed if not line.startswith("#"))
-        # ^-- Use `_static.List` to mark a non-`Dynamic` Core Metadata
-
-    @property
-    def parsers(self) -> dict[str, Callable]:
-        """Metadata item name to parser function mapping."""
-        parse_list = self._parse_list
-        parse_bool = self._parse_bool
-        parse_cmdclass = self._parse_cmdclass
-
-        return {
-            'zip_safe': parse_bool,
-            'include_package_data': parse_bool,
-            'package_dir': self._parse_dict,
-            'scripts': parse_list,
-            'eager_resources': parse_list,
-            'dependency_links': parse_list,
-            'namespace_packages': self._deprecated_config_handler(
-                parse_list,
-                "The namespace_packages parameter is deprecated, "
-                "consider using implicit namespaces instead (PEP 420).",
-                # TODO: define due date, see setuptools.dist:check_nsp.
-            ),
-            'install_requires': partial(  # Core Metadata
-                self._parse_requirements_list, "install_requires"
-            ),
-            'setup_requires': self._parse_list_semicolon,
-            'packages': self._parse_packages,
-            'entry_points': self._parse_file_in_root,
-            'py_modules': parse_list,
-            'python_requires': _static.SpecifierSet,  # Core Metadata
-            'cmdclass': parse_cmdclass,
-        }
-
-    def _parse_cmdclass(self, value):
-        package_dir = self.ensure_discovered.package_dir
-        return expand.cmdclass(self._parse_dict(value), package_dir, self.root_dir)
-
-    def _parse_packages(self, value):
-        """Parses `packages` option value.
-
-        :param value:
-        :rtype: list
-        """
-        find_directives = ['find:', 'find_namespace:']
-        trimmed_value = value.strip()
-
-        if trimmed_value not in find_directives:
-            return self._parse_list(value)
-
-        # Read function arguments from a dedicated section.
-        find_kwargs = self.parse_section_packages__find(
-            self.sections.get('packages.find', {})
-        )
-
-        find_kwargs.update(
-            namespaces=(trimmed_value == find_directives[1]),
-            root_dir=self.root_dir,
-            fill_package_dir=self.package_dir,
-        )
-
-        return expand.find_packages(**find_kwargs)
-
-    def parse_section_packages__find(self, section_options):
-        """Parses `packages.find` configuration file section.
-
-        To be used in conjunction with _parse_packages().
-
-        :param dict section_options:
-        """
-        section_data = self._parse_section_to_dict(section_options, self._parse_list)
-
-        valid_keys = ['where', 'include', 'exclude']
-        find_kwargs = {k: v for k, v in section_data.items() if k in valid_keys and v}
-
-        where = find_kwargs.get('where')
-        if where is not None:
-            find_kwargs['where'] = where[0]  # cast list to single val
-
-        return find_kwargs
-
-    def parse_section_entry_points(self, section_options) -> None:
-        """Parses `entry_points` configuration file section.
-
-        :param dict section_options:
-        """
-        parsed = self._parse_section_to_dict(section_options, self._parse_list)
-        self['entry_points'] = parsed
-
-    def _parse_package_data(self, section_options):
-        package_data = self._parse_section_to_dict(section_options, self._parse_list)
-        return expand.canonic_package_data(package_data)
-
-    def parse_section_package_data(self, section_options) -> None:
-        """Parses `package_data` configuration file section.
-
-        :param dict section_options:
-        """
-        self['package_data'] = self._parse_package_data(section_options)
-
-    def parse_section_exclude_package_data(self, section_options) -> None:
-        """Parses `exclude_package_data` configuration file section.
-
-        :param dict section_options:
-        """
-        self['exclude_package_data'] = self._parse_package_data(section_options)
-
-    def parse_section_extras_require(self, section_options) -> None:  # Core Metadata
-        """Parses `extras_require` configuration file section.
-
-        :param dict section_options:
-        """
-        parsed = self._parse_section_to_dict_with_key(
-            section_options,
-            lambda k, v: self._parse_requirements_list(f"extras_require[{k}]", v),
-        )
-
-        self['extras_require'] = _static.Dict(parsed)
-        # ^-- Use `_static.Dict` to mark a non-`Dynamic` Core Metadata
-
-    def parse_section_data_files(self, section_options) -> None:
-        """Parses `data_files` configuration file section.
-
-        :param dict section_options:
-        """
-        parsed = self._parse_section_to_dict(section_options, self._parse_list)
-        self['data_files'] = expand.canonic_data_files(parsed, self.root_dir)
-
-
-class _AmbiguousMarker(SetuptoolsDeprecationWarning):
-    _SUMMARY = "Ambiguous requirement marker."
-    _DETAILS = """
-    One of the parsed requirements in `{field}` looks like a valid environment marker:
-
-        {req!r}
-
-    Please make sure that the configuration file is correct.
-    You can use dangling lines to avoid this problem.
-    """
-    _SEE_DOCS = "userguide/declarative_config.html#opt-2"
-    # TODO: should we include due_date here? Initially introduced in 6 Aug 2022.
-    # Does this make sense with latest version of packaging?
-
-    @classmethod
-    def message(cls, **kw):
-        docs = f"https://setuptools.pypa.io/en/latest/{cls._SEE_DOCS}"
-        return cls._format(cls._SUMMARY, cls._DETAILS, see_url=docs, format_args=kw)
-
-
-class _DeprecatedConfig(SetuptoolsDeprecationWarning):
-    _SEE_DOCS = "userguide/declarative_config.html"
diff --git a/voxvera/vendor/setuptools/config/setuptools.schema.json b/voxvera/vendor/setuptools/config/setuptools.schema.json
deleted file mode 100644
index 6146abd..0000000
--- a/voxvera/vendor/setuptools/config/setuptools.schema.json
+++ /dev/null
@@ -1,433 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-07/schema#",
-
-  "$id": "https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html",
-  "title": "``tool.setuptools`` table",
-  "$$description": [
-    "``setuptools``-specific configurations that can be set by users that require",
-    "customization.",
-    "These configurations are completely optional and probably can be skipped when",
-    "creating simple packages. They are equivalent to some of the `Keywords",
-    "`_",
-    "used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.",
-    "It considers only ``setuptools`` `parameters",
-    "`_",
-    "that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``",
-    "and ``setup_requires`` (incompatible with modern workflows/standards)."
-  ],
-
-  "type": "object",
-  "additionalProperties": false,
-  "properties": {
-    "platforms": {
-      "type": "array",
-      "items": {"type": "string"}
-    },
-    "provides": {
-      "$$description": [
-        "Package and virtual package names contained within this package",
-        "**(not supported by pip)**"
-      ],
-      "type": "array",
-      "items": {"type": "string", "format": "pep508-identifier"}
-    },
-    "obsoletes": {
-      "$$description": [
-        "Packages which this package renders obsolete",
-        "**(not supported by pip)**"
-      ],
-      "type": "array",
-      "items": {"type": "string", "format": "pep508-identifier"}
-    },
-    "zip-safe": {
-      "$$description": [
-        "Whether the project can be safely installed and run from a zip file.",
-        "**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and",
-        "``setup.py install`` in the context of ``eggs`` (**DEPRECATED**)."
-      ],
-      "type": "boolean"
-    },
-    "script-files": {
-      "$$description": [
-        "Legacy way of defining scripts (entry-points are preferred).",
-        "Equivalent to the ``script`` keyword in ``setup.py``",
-        "(it was renamed to avoid confusion with entry-point based ``project.scripts``",
-        "defined in :pep:`621`).",
-        "**DISCOURAGED**: generic script wrappers are tricky and may not work properly.",
-        "Whenever possible, please use ``project.scripts`` instead."
-      ],
-      "type": "array",
-      "items": {"type": "string"},
-      "$comment": "TODO: is this field deprecated/should be removed?"
-    },
-    "eager-resources": {
-      "$$description": [
-        "Resources that should be extracted together, if any of them is needed,",
-        "or if any C extensions included in the project are imported.",
-        "**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and",
-        "``setup.py install`` in the context of ``eggs`` (**DEPRECATED**)."
-      ],
-      "type": "array",
-      "items": {"type": "string"}
-    },
-    "packages": {
-      "$$description": [
-        "Packages that should be included in the distribution.",
-        "It can be given either as a list of package identifiers",
-        "or as a ``dict``-like structure with a single key ``find``",
-        "which corresponds to a dynamic call to",
-        "``setuptools.config.expand.find_packages`` function.",
-        "The ``find`` key is associated with a nested ``dict``-like structure that can",
-        "contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,",
-        "mimicking the keyword arguments of the associated function."
-      ],
-      "oneOf": [
-        {
-          "title": "Array of Python package identifiers",
-          "type": "array",
-          "items": {"$ref": "#/definitions/package-name"}
-        },
-        {"$ref": "#/definitions/find-directive"}
-      ]
-    },
-    "package-dir": {
-      "$$description": [
-        ":class:`dict`-like structure mapping from package names to directories where their",
-        "code can be found.",
-        "The empty string (as key) means that all packages are contained inside",
-        "the given directory will be included in the distribution."
-      ],
-      "type": "object",
-      "additionalProperties": false,
-      "propertyNames": {
-        "anyOf": [{"const": ""}, {"$ref": "#/definitions/package-name"}]
-      },
-      "patternProperties": {
-        "^.*$": {"type": "string" }
-      }
-    },
-    "package-data": {
-      "$$description": [
-        "Mapping from package names to lists of glob patterns.",
-        "Usually this option is not needed when using ``include-package-data = true``",
-        "For more information on how to include data files, check ``setuptools`` `docs",
-        "`_."
-      ],
-      "type": "object",
-      "additionalProperties": false,
-      "propertyNames": {
-        "anyOf": [{"$ref": "#/definitions/package-name"}, {"const": "*"}]
-      },
-      "patternProperties": {
-        "^.*$": {"type": "array", "items": {"type": "string"}}
-      }
-    },
-    "include-package-data": {
-      "$$description": [
-        "Automatically include any data files inside the package directories",
-        "that are specified by ``MANIFEST.in``",
-        "For more information on how to include data files, check ``setuptools`` `docs",
-        "`_."
-      ],
-      "type": "boolean"
-    },
-    "exclude-package-data": {
-      "$$description": [
-        "Mapping from package names to lists of glob patterns that should be excluded",
-        "For more information on how to include data files, check ``setuptools`` `docs",
-        "`_."
-      ],
-      "type": "object",
-      "additionalProperties": false,
-      "propertyNames": {
-        "anyOf": [{"$ref": "#/definitions/package-name"}, {"const": "*"}]
-      },
-      "patternProperties": {
-          "^.*$": {"type": "array", "items": {"type": "string"}}
-      }
-    },
-    "namespace-packages": {
-      "type": "array",
-      "items": {"type": "string", "format": "python-module-name-relaxed"},
-      "$comment": "https://setuptools.pypa.io/en/latest/userguide/package_discovery.html",
-      "description": "**DEPRECATED**: use implicit namespaces instead (:pep:`420`)."
-    },
-    "py-modules": {
-      "description": "Modules that setuptools will manipulate",
-      "type": "array",
-      "items": {"type": "string", "format": "python-module-name-relaxed"},
-      "$comment": "TODO: clarify the relationship with ``packages``"
-    },
-    "ext-modules": {
-      "description": "Extension modules to be compiled by setuptools",
-      "type": "array",
-      "items": {"$ref": "#/definitions/ext-module"}
-    },
-    "data-files": {
-      "$$description": [
-        "``dict``-like structure where each key represents a directory and",
-        "the value is a list of glob patterns that should be installed in them.",
-        "**DISCOURAGED**: please notice this might not work as expected with wheels.",
-        "Whenever possible, consider using data files inside the package directories",
-        "(or create a new namespace package that only contains data files).",
-        "See `data files support",
-        "`_."
-      ],
-      "type": "object",
-      "patternProperties": {
-          "^.*$": {"type": "array", "items": {"type": "string"}}
-      }
-    },
-    "cmdclass": {
-      "$$description": [
-        "Mapping of distutils-style command names to ``setuptools.Command`` subclasses",
-        "which in turn should be represented by strings with a qualified class name",
-        "(i.e., \"dotted\" form with module), e.g.::\n\n",
-        "    cmdclass = {mycmd = \"pkg.subpkg.module.CommandClass\"}\n\n",
-        "The command class should be a directly defined at the top-level of the",
-        "containing module (no class nesting)."
-      ],
-      "type": "object",
-      "patternProperties": {
-          "^.*$": {"type": "string", "format": "python-qualified-identifier"}
-      }
-    },
-    "license-files": {
-      "type": "array",
-      "items": {"type": "string"},
-      "$$description": [
-        "**PROVISIONAL**: list of glob patterns for all license files being distributed.",
-        "(likely to become standard with :pep:`639`).",
-        "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"
-      ],
-      "$comment": "TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?"
-    },
-    "dynamic": {
-      "type": "object",
-      "description": "Instructions for loading :pep:`621`-related metadata dynamically",
-      "additionalProperties": false,
-      "properties": {
-        "version": {
-          "$$description": [
-            "A version dynamically loaded via either the ``attr:`` or ``file:``",
-            "directives. Please make sure the given file or attribute respects :pep:`440`.",
-            "Also ensure to set ``project.dynamic`` accordingly."
-          ],
-          "oneOf": [
-            {"$ref": "#/definitions/attr-directive"},
-            {"$ref": "#/definitions/file-directive"}
-          ]
-        },
-        "classifiers": {"$ref": "#/definitions/file-directive"},
-        "description": {"$ref": "#/definitions/file-directive"},
-        "entry-points": {"$ref": "#/definitions/file-directive"},
-        "dependencies": {"$ref": "#/definitions/file-directive-for-dependencies"},
-        "optional-dependencies": {
-          "type": "object",
-          "propertyNames": {"type": "string", "format": "pep508-identifier"},
-          "additionalProperties": false,
-          "patternProperties": {
-            ".+": {"$ref": "#/definitions/file-directive-for-dependencies"}
-          }
-        },
-        "readme": {
-          "type": "object",
-          "anyOf": [
-            {"$ref": "#/definitions/file-directive"},
-            {
-              "type": "object",
-              "properties": {
-                "content-type": {"type": "string"},
-                "file": { "$ref": "#/definitions/file-directive/properties/file" }
-              },
-              "additionalProperties": false}
-          ],
-          "required": ["file"]
-        }
-      }
-    }
-  },
-
-  "definitions": {
-    "package-name": {
-      "$id": "#/definitions/package-name",
-      "title": "Valid package name",
-      "description": "Valid package name (importable or :pep:`561`).",
-      "type": "string",
-      "anyOf": [
-        {"type": "string", "format": "python-module-name-relaxed"},
-        {"type": "string", "format": "pep561-stub-name"}
-      ]
-    },
-    "ext-module": {
-      "$id": "#/definitions/ext-module",
-      "title": "Extension module",
-      "description": "Parameters to construct a :class:`setuptools.Extension` object",
-      "type": "object",
-      "required": ["name", "sources"],
-      "additionalProperties": false,
-      "properties": {
-        "name": {
-          "type": "string",
-          "format": "python-module-name-relaxed"
-        },
-        "sources": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "include-dirs":{
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "define-macros": {
-          "type": "array",
-          "items": {
-            "type": "array",
-            "items": [
-              {"description": "macro name", "type": "string"},
-              {"description": "macro value", "oneOf": [{"type": "string"}, {"type": "null"}]}
-            ],
-            "additionalItems": false
-          }
-        },
-        "undef-macros": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "library-dirs": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "libraries": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "runtime-library-dirs": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "extra-objects": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "extra-compile-args": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "extra-link-args": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "export-symbols": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "swig-opts": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "depends": {
-          "type": "array",
-          "items": {"type": "string"}
-        },
-        "language": {"type": "string"},
-        "optional": {"type": "boolean"},
-        "py-limited-api": {"type": "boolean"}
-      }
-    },
-    "file-directive": {
-      "$id": "#/definitions/file-directive",
-      "title": "'file:' directive",
-      "description":
-        "Value is read from a file (or list of files and then concatenated)",
-      "type": "object",
-      "additionalProperties": false,
-      "properties": {
-        "file": {
-          "oneOf": [
-            {"type": "string"},
-            {"type": "array", "items": {"type": "string"}}
-          ]
-        }
-      },
-      "required": ["file"]
-    },
-    "file-directive-for-dependencies": {
-      "title": "'file:' directive for dependencies",
-      "allOf": [
-        {
-          "$$description": [
-            "**BETA**: subset of the ``requirements.txt`` format",
-            "without ``pip`` flags and options",
-            "(one :pep:`508`-compliant string per line,",
-            "lines that are blank or start with ``#`` are excluded).",
-            "See `dynamic metadata",
-            "`_."
-          ]
-        },
-        {"$ref": "#/definitions/file-directive"}
-      ]
-    },
-    "attr-directive": {
-      "title": "'attr:' directive",
-      "$id": "#/definitions/attr-directive",
-      "$$description": [
-        "Value is read from a module attribute. Supports callables and iterables;",
-        "unsupported types are cast via ``str()``"
-      ],
-      "type": "object",
-      "additionalProperties": false,
-      "properties": {
-        "attr": {"type": "string", "format": "python-qualified-identifier"}
-      },
-      "required": ["attr"]
-    },
-    "find-directive": {
-      "$id": "#/definitions/find-directive",
-      "title": "'find:' directive",
-      "type": "object",
-      "additionalProperties": false,
-      "properties": {
-        "find": {
-          "type": "object",
-          "$$description": [
-            "Dynamic `package discovery",
-            "`_."
-          ],
-          "additionalProperties": false,
-          "properties": {
-            "where": {
-              "description":
-                "Directories to be searched for packages (Unix-style relative path)",
-              "type": "array",
-              "items": {"type": "string"}
-            },
-            "exclude": {
-              "type": "array",
-              "$$description": [
-                "Exclude packages that match the values listed in this field.",
-                "Can container shell-style wildcards (e.g. ``'pkg.*'``)"
-              ],
-              "items": {"type": "string"}
-            },
-            "include": {
-              "type": "array",
-              "$$description": [
-                "Restrict the found packages to just the ones listed in this field.",
-                "Can container shell-style wildcards (e.g. ``'pkg.*'``)"
-              ],
-              "items": {"type": "string"}
-            },
-            "namespaces": {
-              "type": "boolean",
-              "$$description": [
-                "When ``True``, directories without a ``__init__.py`` file will also",
-                "be scanned for :pep:`420`-style implicit namespaces"
-              ]
-            }
-          }
-        }
-      }
-    }
-  }
-}
diff --git a/voxvera/vendor/setuptools/depends.py b/voxvera/vendor/setuptools/depends.py
deleted file mode 100644
index e5223b7..0000000
--- a/voxvera/vendor/setuptools/depends.py
+++ /dev/null
@@ -1,185 +0,0 @@
-from __future__ import annotations
-
-import contextlib
-import dis
-import marshal
-import sys
-from types import CodeType
-from typing import Any, Literal, TypeVar
-
-from packaging.version import Version
-
-from . import _imp
-from ._imp import PY_COMPILED, PY_FROZEN, PY_SOURCE, find_module
-
-_T = TypeVar("_T")
-
-__all__ = ['Require', 'find_module']
-
-
-class Require:
-    """A prerequisite to building or installing a distribution"""
-
-    def __init__(
-        self,
-        name,
-        requested_version,
-        module,
-        homepage: str = '',
-        attribute=None,
-        format=None,
-    ) -> None:
-        if format is None and requested_version is not None:
-            format = Version
-
-        if format is not None:
-            requested_version = format(requested_version)
-            if attribute is None:
-                attribute = '__version__'
-
-        self.__dict__.update(locals())
-        del self.self
-
-    def full_name(self):
-        """Return full package/distribution name, w/version"""
-        if self.requested_version is not None:
-            return f'{self.name}-{self.requested_version}'
-        return self.name
-
-    def version_ok(self, version):
-        """Is 'version' sufficiently up-to-date?"""
-        return (
-            self.attribute is None
-            or self.format is None
-            or str(version) != "unknown"
-            and self.format(version) >= self.requested_version
-        )
-
-    def get_version(
-        self, paths=None, default: _T | Literal["unknown"] = "unknown"
-    ) -> _T | Literal["unknown"] | None | Any:
-        """Get version number of installed module, 'None', or 'default'
-
-        Search 'paths' for module.  If not found, return 'None'.  If found,
-        return the extracted version attribute, or 'default' if no version
-        attribute was specified, or the value cannot be determined without
-        importing the module.  The version is formatted according to the
-        requirement's version format (if any), unless it is 'None' or the
-        supplied 'default'.
-        """
-
-        if self.attribute is None:
-            try:
-                f, _p, _i = find_module(self.module, paths)
-            except ImportError:
-                return None
-            if f:
-                f.close()
-            return default
-
-        v = get_module_constant(self.module, self.attribute, default, paths)
-
-        if v is not None and v is not default and self.format is not None:
-            return self.format(v)
-
-        return v
-
-    def is_present(self, paths=None):
-        """Return true if dependency is present on 'paths'"""
-        return self.get_version(paths) is not None
-
-    def is_current(self, paths=None):
-        """Return true if dependency is present and up-to-date on 'paths'"""
-        version = self.get_version(paths)
-        if version is None:
-            return False
-        return self.version_ok(str(version))
-
-
-def maybe_close(f):
-    @contextlib.contextmanager
-    def empty():
-        yield
-        return
-
-    if not f:
-        return empty()
-
-    return contextlib.closing(f)
-
-
-# Some objects are not available on some platforms.
-# XXX it'd be better to test assertions about bytecode instead.
-if not sys.platform.startswith('java') and sys.platform != 'cli':
-
-    def get_module_constant(
-        module, symbol, default: _T | int = -1, paths=None
-    ) -> _T | int | None | Any:
-        """Find 'module' by searching 'paths', and extract 'symbol'
-
-        Return 'None' if 'module' does not exist on 'paths', or it does not define
-        'symbol'.  If the module defines 'symbol' as a constant, return the
-        constant.  Otherwise, return 'default'."""
-
-        try:
-            f, path, (_suffix, _mode, kind) = info = find_module(module, paths)
-        except ImportError:
-            # Module doesn't exist
-            return None
-
-        with maybe_close(f):
-            if kind == PY_COMPILED:
-                f.read(8)  # skip magic & date
-                code = marshal.load(f)
-            elif kind == PY_FROZEN:
-                code = _imp.get_frozen_object(module, paths)
-            elif kind == PY_SOURCE:
-                code = compile(f.read(), path, 'exec')
-            else:
-                # Not something we can parse; we'll have to import it.  :(
-                imported = _imp.get_module(module, paths, info)
-                return getattr(imported, symbol, None)
-
-        return extract_constant(code, symbol, default)
-
-    def extract_constant(
-        code: CodeType, symbol: str, default: _T | int = -1
-    ) -> _T | int | None | Any:
-        """Extract the constant value of 'symbol' from 'code'
-
-        If the name 'symbol' is bound to a constant value by the Python code
-        object 'code', return that value.  If 'symbol' is bound to an expression,
-        return 'default'.  Otherwise, return 'None'.
-
-        Return value is based on the first assignment to 'symbol'.  'symbol' must
-        be a global, or at least a non-"fast" local in the code block.  That is,
-        only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
-        must be present in 'code.co_names'.
-        """
-        if symbol not in code.co_names:
-            # name's not there, can't possibly be an assignment
-            return None
-
-        name_idx = list(code.co_names).index(symbol)
-
-        STORE_NAME = dis.opmap['STORE_NAME']
-        STORE_GLOBAL = dis.opmap['STORE_GLOBAL']
-        LOAD_CONST = dis.opmap['LOAD_CONST']
-
-        const = default
-
-        for byte_code in dis.Bytecode(code):
-            op = byte_code.opcode
-            arg = byte_code.arg
-
-            if op == LOAD_CONST:
-                assert arg is not None
-                const = code.co_consts[arg]
-            elif arg == name_idx and (op == STORE_NAME or op == STORE_GLOBAL):
-                return const
-            else:
-                const = default
-
-        return None
-
-    __all__ += ['get_module_constant', 'extract_constant']
diff --git a/voxvera/vendor/setuptools/discovery.py b/voxvera/vendor/setuptools/discovery.py
deleted file mode 100644
index 296d319..0000000
--- a/voxvera/vendor/setuptools/discovery.py
+++ /dev/null
@@ -1,614 +0,0 @@
-"""Automatic discovery of Python modules and packages (for inclusion in the
-distribution) and other config values.
-
-For the purposes of this module, the following nomenclature is used:
-
-- "src-layout": a directory representing a Python project that contains a "src"
-  folder. Everything under the "src" folder is meant to be included in the
-  distribution when packaging the project. Example::
-
-    .
-    ├── tox.ini
-    ├── pyproject.toml
-    └── src/
-        └── mypkg/
-            ├── __init__.py
-            ├── mymodule.py
-            └── my_data_file.txt
-
-- "flat-layout": a Python project that does not use "src-layout" but instead
-  have a directory under the project root for each package::
-
-    .
-    ├── tox.ini
-    ├── pyproject.toml
-    └── mypkg/
-        ├── __init__.py
-        ├── mymodule.py
-        └── my_data_file.txt
-
-- "single-module": a project that contains a single Python script direct under
-  the project root (no directory used)::
-
-    .
-    ├── tox.ini
-    ├── pyproject.toml
-    └── mymodule.py
-
-"""
-
-from __future__ import annotations
-
-import itertools
-import os
-from collections.abc import Iterable, Iterator, Mapping
-from fnmatch import fnmatchcase
-from glob import glob
-from pathlib import Path
-from typing import TYPE_CHECKING, ClassVar
-
-import _distutils_hack.override  # noqa: F401
-
-from ._path import StrPath
-
-from distutils import log
-from distutils.util import convert_path
-
-if TYPE_CHECKING:
-    from setuptools import Distribution
-
-chain_iter = itertools.chain.from_iterable
-
-
-def _valid_name(path: StrPath) -> bool:
-    # Ignore invalid names that cannot be imported directly
-    return os.path.basename(path).isidentifier()
-
-
-class _Filter:
-    """
-    Given a list of patterns, create a callable that will be true only if
-    the input matches at least one of the patterns.
-    """
-
-    def __init__(self, *patterns: str) -> None:
-        self._patterns = dict.fromkeys(patterns)
-
-    def __call__(self, item: str) -> bool:
-        return any(fnmatchcase(item, pat) for pat in self._patterns)
-
-    def __contains__(self, item: str) -> bool:
-        return item in self._patterns
-
-
-class _Finder:
-    """Base class that exposes functionality for module/package finders"""
-
-    ALWAYS_EXCLUDE: ClassVar[tuple[str, ...]] = ()
-    DEFAULT_EXCLUDE: ClassVar[tuple[str, ...]] = ()
-
-    @classmethod
-    def find(
-        cls,
-        where: StrPath = '.',
-        exclude: Iterable[str] = (),
-        include: Iterable[str] = ('*',),
-    ) -> list[str]:
-        """Return a list of all Python items (packages or modules, depending on
-        the finder implementation) found within directory ``where``.
-
-        ``where`` is the root directory which will be searched.
-        It should be supplied as a "cross-platform" (i.e. URL-style) path;
-        it will be converted to the appropriate local path syntax.
-
-        ``exclude`` is a sequence of names to exclude; ``*`` can be used
-        as a wildcard in the names.
-        When finding packages, ``foo.*`` will exclude all subpackages of ``foo``
-        (but not ``foo`` itself).
-
-        ``include`` is a sequence of names to include.
-        If it's specified, only the named items will be included.
-        If it's not specified, all found items will be included.
-        ``include`` can contain shell style wildcard patterns just like
-        ``exclude``.
-        """
-
-        exclude = exclude or cls.DEFAULT_EXCLUDE
-        return list(
-            cls._find_iter(
-                convert_path(str(where)),
-                _Filter(*cls.ALWAYS_EXCLUDE, *exclude),
-                _Filter(*include),
-            )
-        )
-
-    @classmethod
-    def _find_iter(
-        cls, where: StrPath, exclude: _Filter, include: _Filter
-    ) -> Iterator[str]:
-        raise NotImplementedError
-
-
-class PackageFinder(_Finder):
-    """
-    Generate a list of all Python packages found within a directory
-    """
-
-    ALWAYS_EXCLUDE = ("ez_setup", "*__pycache__")
-
-    @classmethod
-    def _find_iter(
-        cls, where: StrPath, exclude: _Filter, include: _Filter
-    ) -> Iterator[str]:
-        """
-        All the packages found in 'where' that pass the 'include' filter, but
-        not the 'exclude' filter.
-        """
-        for root, dirs, files in os.walk(str(where), followlinks=True):
-            # Copy dirs to iterate over it, then empty dirs.
-            all_dirs = dirs[:]
-            dirs[:] = []
-
-            for dir in all_dirs:
-                full_path = os.path.join(root, dir)
-                rel_path = os.path.relpath(full_path, where)
-                package = rel_path.replace(os.path.sep, '.')
-
-                # Skip directory trees that are not valid packages
-                if '.' in dir or not cls._looks_like_package(full_path, package):
-                    continue
-
-                # Should this package be included?
-                if include(package) and not exclude(package):
-                    yield package
-
-                # Early pruning if there is nothing else to be scanned
-                if f"{package}*" in exclude or f"{package}.*" in exclude:
-                    continue
-
-                # Keep searching subdirectories, as there may be more packages
-                # down there, even if the parent was excluded.
-                dirs.append(dir)
-
-    @staticmethod
-    def _looks_like_package(path: StrPath, _package_name: str) -> bool:
-        """Does a directory look like a package?"""
-        return os.path.isfile(os.path.join(path, '__init__.py'))
-
-
-class PEP420PackageFinder(PackageFinder):
-    @staticmethod
-    def _looks_like_package(_path: StrPath, _package_name: str) -> bool:
-        return True
-
-
-class ModuleFinder(_Finder):
-    """Find isolated Python modules.
-    This function will **not** recurse subdirectories.
-    """
-
-    @classmethod
-    def _find_iter(
-        cls, where: StrPath, exclude: _Filter, include: _Filter
-    ) -> Iterator[str]:
-        for file in glob(os.path.join(where, "*.py")):
-            module, _ext = os.path.splitext(os.path.basename(file))
-
-            if not cls._looks_like_module(module):
-                continue
-
-            if include(module) and not exclude(module):
-                yield module
-
-    _looks_like_module = staticmethod(_valid_name)
-
-
-# We have to be extra careful in the case of flat layout to not include files
-# and directories not meant for distribution (e.g. tool-related)
-
-
-class FlatLayoutPackageFinder(PEP420PackageFinder):
-    _EXCLUDE = (
-        "ci",
-        "bin",
-        "debian",
-        "doc",
-        "docs",
-        "documentation",
-        "manpages",
-        "news",
-        "newsfragments",
-        "changelog",
-        "test",
-        "tests",
-        "unit_test",
-        "unit_tests",
-        "example",
-        "examples",
-        "scripts",
-        "tools",
-        "util",
-        "utils",
-        "python",
-        "build",
-        "dist",
-        "venv",
-        "env",
-        "requirements",
-        # ---- Task runners / Build tools ----
-        "tasks",  # invoke
-        "fabfile",  # fabric
-        "site_scons",  # SCons
-        # ---- Other tools ----
-        "benchmark",
-        "benchmarks",
-        "exercise",
-        "exercises",
-        "htmlcov",  # Coverage.py
-        # ---- Hidden directories/Private packages ----
-        "[._]*",
-    )
-
-    DEFAULT_EXCLUDE = tuple(chain_iter((p, f"{p}.*") for p in _EXCLUDE))
-    """Reserved package names"""
-
-    @staticmethod
-    def _looks_like_package(_path: StrPath, package_name: str) -> bool:
-        names = package_name.split('.')
-        # Consider PEP 561
-        root_pkg_is_valid = names[0].isidentifier() or names[0].endswith("-stubs")
-        return root_pkg_is_valid and all(name.isidentifier() for name in names[1:])
-
-
-class FlatLayoutModuleFinder(ModuleFinder):
-    DEFAULT_EXCLUDE = (
-        "setup",
-        "conftest",
-        "test",
-        "tests",
-        "example",
-        "examples",
-        "build",
-        # ---- Task runners ----
-        "toxfile",
-        "noxfile",
-        "pavement",
-        "dodo",
-        "tasks",
-        "fabfile",
-        # ---- Other tools ----
-        "[Ss][Cc]onstruct",  # SCons
-        "conanfile",  # Connan: C/C++ build tool
-        "manage",  # Django
-        "benchmark",
-        "benchmarks",
-        "exercise",
-        "exercises",
-        # ---- Hidden files/Private modules ----
-        "[._]*",
-    )
-    """Reserved top-level module names"""
-
-
-def _find_packages_within(root_pkg: str, pkg_dir: StrPath) -> list[str]:
-    nested = PEP420PackageFinder.find(pkg_dir)
-    return [root_pkg] + [".".join((root_pkg, n)) for n in nested]
-
-
-class ConfigDiscovery:
-    """Fill-in metadata and options that can be automatically derived
-    (from other metadata/options, the file system or conventions)
-    """
-
-    def __init__(self, distribution: Distribution) -> None:
-        self.dist = distribution
-        self._called = False
-        self._disabled = False
-        self._skip_ext_modules = False
-
-    def _disable(self):
-        """Internal API to disable automatic discovery"""
-        self._disabled = True
-
-    def _ignore_ext_modules(self):
-        """Internal API to disregard ext_modules.
-
-        Normally auto-discovery would not be triggered if ``ext_modules`` are set
-        (this is done for backward compatibility with existing packages relying on
-        ``setup.py`` or ``setup.cfg``). However, ``setuptools`` can call this function
-        to ignore given ``ext_modules`` and proceed with the auto-discovery if
-        ``packages`` and ``py_modules`` are not given (e.g. when using pyproject.toml
-        metadata).
-        """
-        self._skip_ext_modules = True
-
-    @property
-    def _root_dir(self) -> StrPath:
-        # The best is to wait until `src_root` is set in dist, before using _root_dir.
-        return self.dist.src_root or os.curdir
-
-    @property
-    def _package_dir(self) -> dict[str, str]:
-        if self.dist.package_dir is None:
-            return {}
-        return self.dist.package_dir
-
-    def __call__(
-        self, force: bool = False, name: bool = True, ignore_ext_modules: bool = False
-    ) -> None:
-        """Automatically discover missing configuration fields
-        and modifies the given ``distribution`` object in-place.
-
-        Note that by default this will only have an effect the first time the
-        ``ConfigDiscovery`` object is called.
-
-        To repeatedly invoke automatic discovery (e.g. when the project
-        directory changes), please use ``force=True`` (or create a new
-        ``ConfigDiscovery`` instance).
-        """
-        if force is False and (self._called or self._disabled):
-            # Avoid overhead of multiple calls
-            return
-
-        self._analyse_package_layout(ignore_ext_modules)
-        if name:
-            self.analyse_name()  # depends on ``packages`` and ``py_modules``
-
-        self._called = True
-
-    def _explicitly_specified(self, ignore_ext_modules: bool) -> bool:
-        """``True`` if the user has specified some form of package/module listing"""
-        ignore_ext_modules = ignore_ext_modules or self._skip_ext_modules
-        ext_modules = not (self.dist.ext_modules is None or ignore_ext_modules)
-        return (
-            self.dist.packages is not None
-            or self.dist.py_modules is not None
-            or ext_modules
-            or hasattr(self.dist, "configuration")
-            and self.dist.configuration
-            # ^ Some projects use numpy.distutils.misc_util.Configuration
-        )
-
-    def _analyse_package_layout(self, ignore_ext_modules: bool) -> bool:
-        if self._explicitly_specified(ignore_ext_modules):
-            # For backward compatibility, just try to find modules/packages
-            # when nothing is given
-            return True
-
-        log.debug(
-            "No `packages` or `py_modules` configuration, performing "
-            "automatic discovery."
-        )
-
-        return (
-            self._analyse_explicit_layout()
-            or self._analyse_src_layout()
-            # flat-layout is the trickiest for discovery so it should be last
-            or self._analyse_flat_layout()
-        )
-
-    def _analyse_explicit_layout(self) -> bool:
-        """The user can explicitly give a package layout via ``package_dir``"""
-        package_dir = self._package_dir.copy()  # don't modify directly
-        package_dir.pop("", None)  # This falls under the "src-layout" umbrella
-        root_dir = self._root_dir
-
-        if not package_dir:
-            return False
-
-        log.debug(f"`explicit-layout` detected -- analysing {package_dir}")
-        pkgs = chain_iter(
-            _find_packages_within(pkg, os.path.join(root_dir, parent_dir))
-            for pkg, parent_dir in package_dir.items()
-        )
-        self.dist.packages = list(pkgs)
-        log.debug(f"discovered packages -- {self.dist.packages}")
-        return True
-
-    def _analyse_src_layout(self) -> bool:
-        """Try to find all packages or modules under the ``src`` directory
-        (or anything pointed by ``package_dir[""]``).
-
-        The "src-layout" is relatively safe for automatic discovery.
-        We assume that everything within is meant to be included in the
-        distribution.
-
-        If ``package_dir[""]`` is not given, but the ``src`` directory exists,
-        this function will set ``package_dir[""] = "src"``.
-        """
-        package_dir = self._package_dir
-        src_dir = os.path.join(self._root_dir, package_dir.get("", "src"))
-        if not os.path.isdir(src_dir):
-            return False
-
-        log.debug(f"`src-layout` detected -- analysing {src_dir}")
-        package_dir.setdefault("", os.path.basename(src_dir))
-        self.dist.package_dir = package_dir  # persist eventual modifications
-        self.dist.packages = PEP420PackageFinder.find(src_dir)
-        self.dist.py_modules = ModuleFinder.find(src_dir)
-        log.debug(f"discovered packages -- {self.dist.packages}")
-        log.debug(f"discovered py_modules -- {self.dist.py_modules}")
-        return True
-
-    def _analyse_flat_layout(self) -> bool:
-        """Try to find all packages and modules under the project root.
-
-        Since the ``flat-layout`` is more dangerous in terms of accidentally including
-        extra files/directories, this function is more conservative and will raise an
-        error if multiple packages or modules are found.
-
-        This assumes that multi-package dists are uncommon and refuse to support that
-        use case in order to be able to prevent unintended errors.
-        """
-        log.debug(f"`flat-layout` detected -- analysing {self._root_dir}")
-        return self._analyse_flat_packages() or self._analyse_flat_modules()
-
-    def _analyse_flat_packages(self) -> bool:
-        self.dist.packages = FlatLayoutPackageFinder.find(self._root_dir)
-        top_level = remove_nested_packages(remove_stubs(self.dist.packages))
-        log.debug(f"discovered packages -- {self.dist.packages}")
-        self._ensure_no_accidental_inclusion(top_level, "packages")
-        return bool(top_level)
-
-    def _analyse_flat_modules(self) -> bool:
-        self.dist.py_modules = FlatLayoutModuleFinder.find(self._root_dir)
-        log.debug(f"discovered py_modules -- {self.dist.py_modules}")
-        self._ensure_no_accidental_inclusion(self.dist.py_modules, "modules")
-        return bool(self.dist.py_modules)
-
-    def _ensure_no_accidental_inclusion(self, detected: list[str], kind: str):
-        if len(detected) > 1:
-            from inspect import cleandoc
-
-            from setuptools.errors import PackageDiscoveryError
-
-            msg = f"""Multiple top-level {kind} discovered in a flat-layout: {detected}.
-
-            To avoid accidental inclusion of unwanted files or directories,
-            setuptools will not proceed with this build.
-
-            If you are trying to create a single distribution with multiple {kind}
-            on purpose, you should not rely on automatic discovery.
-            Instead, consider the following options:
-
-            1. set up custom discovery (`find` directive with `include` or `exclude`)
-            2. use a `src-layout`
-            3. explicitly set `py_modules` or `packages` with a list of names
-
-            To find more information, look for "package discovery" on setuptools docs.
-            """
-            raise PackageDiscoveryError(cleandoc(msg))
-
-    def analyse_name(self) -> None:
-        """The packages/modules are the essential contribution of the author.
-        Therefore the name of the distribution can be derived from them.
-        """
-        if self.dist.metadata.name or self.dist.name:
-            # get_name() is not reliable (can return "UNKNOWN")
-            return
-
-        log.debug("No `name` configuration, performing automatic discovery")
-
-        name = (
-            self._find_name_single_package_or_module()
-            or self._find_name_from_packages()
-        )
-        if name:
-            self.dist.metadata.name = name
-
-    def _find_name_single_package_or_module(self) -> str | None:
-        """Exactly one module or package"""
-        for field in ('packages', 'py_modules'):
-            items = getattr(self.dist, field, None) or []
-            if items and len(items) == 1:
-                log.debug(f"Single module/package detected, name: {items[0]}")
-                return items[0]
-
-        return None
-
-    def _find_name_from_packages(self) -> str | None:
-        """Try to find the root package that is not a PEP 420 namespace"""
-        if not self.dist.packages:
-            return None
-
-        packages = remove_stubs(sorted(self.dist.packages, key=len))
-        package_dir = self.dist.package_dir or {}
-
-        parent_pkg = find_parent_package(packages, package_dir, self._root_dir)
-        if parent_pkg:
-            log.debug(f"Common parent package detected, name: {parent_pkg}")
-            return parent_pkg
-
-        log.warn("No parent package detected, impossible to derive `name`")
-        return None
-
-
-def remove_nested_packages(packages: list[str]) -> list[str]:
-    """Remove nested packages from a list of packages.
-
-    >>> remove_nested_packages(["a", "a.b1", "a.b2", "a.b1.c1"])
-    ['a']
-    >>> remove_nested_packages(["a", "b", "c.d", "c.d.e.f", "g.h", "a.a1"])
-    ['a', 'b', 'c.d', 'g.h']
-    """
-    pkgs = sorted(packages, key=len)
-    top_level = pkgs[:]
-    size = len(pkgs)
-    for i, name in enumerate(reversed(pkgs)):
-        if any(name.startswith(f"{other}.") for other in top_level):
-            top_level.pop(size - i - 1)
-
-    return top_level
-
-
-def remove_stubs(packages: list[str]) -> list[str]:
-    """Remove type stubs (:pep:`561`) from a list of packages.
-
-    >>> remove_stubs(["a", "a.b", "a-stubs", "a-stubs.b.c", "b", "c-stubs"])
-    ['a', 'a.b', 'b']
-    """
-    return [pkg for pkg in packages if not pkg.split(".")[0].endswith("-stubs")]
-
-
-def find_parent_package(
-    packages: list[str], package_dir: Mapping[str, str], root_dir: StrPath
-) -> str | None:
-    """Find the parent package that is not a namespace."""
-    packages = sorted(packages, key=len)
-    common_ancestors = []
-    for i, name in enumerate(packages):
-        if not all(n.startswith(f"{name}.") for n in packages[i + 1 :]):
-            # Since packages are sorted by length, this condition is able
-            # to find a list of all common ancestors.
-            # When there is divergence (e.g. multiple root packages)
-            # the list will be empty
-            break
-        common_ancestors.append(name)
-
-    for name in common_ancestors:
-        pkg_path = find_package_path(name, package_dir, root_dir)
-        init = os.path.join(pkg_path, "__init__.py")
-        if os.path.isfile(init):
-            return name
-
-    return None
-
-
-def find_package_path(
-    name: str, package_dir: Mapping[str, str], root_dir: StrPath
-) -> str:
-    """Given a package name, return the path where it should be found on
-    disk, considering the ``package_dir`` option.
-
-    >>> path = find_package_path("my.pkg", {"": "root/is/nested"}, ".")
-    >>> path.replace(os.sep, "/")
-    './root/is/nested/my/pkg'
-
-    >>> path = find_package_path("my.pkg", {"my": "root/is/nested"}, ".")
-    >>> path.replace(os.sep, "/")
-    './root/is/nested/pkg'
-
-    >>> path = find_package_path("my.pkg", {"my.pkg": "root/is/nested"}, ".")
-    >>> path.replace(os.sep, "/")
-    './root/is/nested'
-
-    >>> path = find_package_path("other.pkg", {"my.pkg": "root/is/nested"}, ".")
-    >>> path.replace(os.sep, "/")
-    './other/pkg'
-    """
-    parts = name.split(".")
-    for i in range(len(parts), 0, -1):
-        # Look backwards, the most specific package_dir first
-        partial_name = ".".join(parts[:i])
-        if partial_name in package_dir:
-            parent = package_dir[partial_name]
-            return os.path.join(root_dir, parent, *parts[i:])
-
-    parent = package_dir.get("") or ""
-    return os.path.join(root_dir, *parent.split("/"), *parts)
-
-
-def construct_package_dir(packages: list[str], package_path: StrPath) -> dict[str, str]:
-    parent_pkgs = remove_nested_packages(packages)
-    prefix = Path(package_path).parts
-    return {pkg: "/".join([*prefix, *pkg.split(".")]) for pkg in parent_pkgs}
diff --git a/voxvera/vendor/setuptools/dist.py b/voxvera/vendor/setuptools/dist.py
deleted file mode 100644
index a224b3e..0000000
--- a/voxvera/vendor/setuptools/dist.py
+++ /dev/null
@@ -1,1124 +0,0 @@
-from __future__ import annotations
-
-import functools
-import io
-import itertools
-import numbers
-import os
-import re
-import sys
-from collections.abc import Iterable, Iterator, MutableMapping, Sequence
-from glob import glob
-from pathlib import Path
-from typing import TYPE_CHECKING, Any, Union
-
-from more_itertools import partition, unique_everseen
-from packaging.markers import InvalidMarker, Marker
-from packaging.specifiers import InvalidSpecifier, SpecifierSet
-from packaging.version import Version
-
-from . import (
-    _entry_points,
-    _reqs,
-    _static,
-    command as _,  # noqa: F401 # imported for side-effects
-)
-from ._importlib import metadata
-from ._normalization import _canonicalize_license_expression
-from ._path import StrPath
-from ._reqs import _StrOrIter
-from .config import pyprojecttoml, setupcfg
-from .discovery import ConfigDiscovery
-from .errors import InvalidConfigError
-from .monkey import get_unpatched
-from .warnings import InformationOnly, SetuptoolsDeprecationWarning
-
-import distutils.cmd
-import distutils.command
-import distutils.core
-import distutils.dist
-import distutils.log
-from distutils.debug import DEBUG
-from distutils.errors import DistutilsOptionError, DistutilsSetupError
-from distutils.fancy_getopt import translate_longopt
-from distutils.util import strtobool
-
-if TYPE_CHECKING:
-    from typing_extensions import TypeAlias
-
-
-__all__ = ['Distribution']
-
-_sequence = tuple, list
-"""
-:meta private:
-
-Supported iterable types that are known to be:
-- ordered (which `set` isn't)
-- not match a str (which `Sequence[str]` does)
-- not imply a nested type (like `dict`)
-for use with `isinstance`.
-"""
-_Sequence: TypeAlias = Union[tuple[str, ...], list[str]]
-# This is how stringifying _Sequence would look in Python 3.10
-_sequence_type_repr = "tuple[str, ...] | list[str]"
-_OrderedStrSequence: TypeAlias = Union[str, dict[str, Any], Sequence[str]]
-"""
-:meta private:
-Avoid single-use iterable. Disallow sets.
-A poor approximation of an OrderedSequence (dict doesn't match a Sequence).
-"""
-
-
-def __getattr__(name: str) -> Any:  # pragma: no cover
-    if name == "sequence":
-        SetuptoolsDeprecationWarning.emit(
-            "`setuptools.dist.sequence` is an internal implementation detail.",
-            "Please define your own `sequence = tuple, list` instead.",
-            due_date=(2025, 8, 28),  # Originally added on 2024-08-27
-        )
-        return _sequence
-    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
-
-
-def check_importable(dist, attr, value):
-    try:
-        ep = metadata.EntryPoint(value=value, name=None, group=None)
-        assert not ep.extras
-    except (TypeError, ValueError, AttributeError, AssertionError) as e:
-        raise DistutilsSetupError(
-            f"{attr!r} must be importable 'module:attrs' string (got {value!r})"
-        ) from e
-
-
-def assert_string_list(dist, attr: str, value: _Sequence) -> None:
-    """Verify that value is a string list"""
-    try:
-        # verify that value is a list or tuple to exclude unordered
-        # or single-use iterables
-        assert isinstance(value, _sequence)
-        # verify that elements of value are strings
-        assert ''.join(value) != value
-    except (TypeError, ValueError, AttributeError, AssertionError) as e:
-        raise DistutilsSetupError(
-            f"{attr!r} must be of type <{_sequence_type_repr}> (got {value!r})"
-        ) from e
-
-
-def check_nsp(dist, attr, value):
-    """Verify that namespace packages are valid"""
-    ns_packages = value
-    assert_string_list(dist, attr, ns_packages)
-    for nsp in ns_packages:
-        if not dist.has_contents_for(nsp):
-            raise DistutilsSetupError(
-                f"Distribution contains no modules or packages for namespace package {nsp!r}"
-            )
-        parent, _sep, _child = nsp.rpartition('.')
-        if parent and parent not in ns_packages:
-            distutils.log.warn(
-                "WARNING: %r is declared as a package namespace, but %r"
-                " is not: please correct this in setup.py",
-                nsp,
-                parent,
-            )
-        SetuptoolsDeprecationWarning.emit(
-            "The namespace_packages parameter is deprecated.",
-            "Please replace its usage with implicit namespaces (PEP 420).",
-            see_docs="references/keywords.html#keyword-namespace-packages",
-            # TODO: define due_date, it may break old packages that are no longer
-            # maintained (e.g. sphinxcontrib extensions) when installed from source.
-            # Warning officially introduced in May 2022, however the deprecation
-            # was mentioned much earlier in the docs (May 2020, see #2149).
-        )
-
-
-def check_extras(dist, attr, value):
-    """Verify that extras_require mapping is valid"""
-    try:
-        list(itertools.starmap(_check_extra, value.items()))
-    except (TypeError, ValueError, AttributeError) as e:
-        raise DistutilsSetupError(
-            "'extras_require' must be a dictionary whose values are "
-            "strings or lists of strings containing valid project/version "
-            "requirement specifiers."
-        ) from e
-
-
-def _check_extra(extra, reqs):
-    _name, _sep, marker = extra.partition(':')
-    try:
-        _check_marker(marker)
-    except InvalidMarker:
-        msg = f"Invalid environment marker: {marker} ({extra!r})"
-        raise DistutilsSetupError(msg) from None
-    list(_reqs.parse(reqs))
-
-
-def _check_marker(marker):
-    if not marker:
-        return
-    m = Marker(marker)
-    m.evaluate()
-
-
-def assert_bool(dist, attr, value):
-    """Verify that value is True, False, 0, or 1"""
-    if bool(value) != value:
-        raise DistutilsSetupError(f"{attr!r} must be a boolean value (got {value!r})")
-
-
-def invalid_unless_false(dist, attr, value):
-    if not value:
-        DistDeprecationWarning.emit(f"{attr} is ignored.")
-        # TODO: should there be a `due_date` here?
-        return
-    raise DistutilsSetupError(f"{attr} is invalid.")
-
-
-def check_requirements(dist, attr: str, value: _OrderedStrSequence) -> None:
-    """Verify that install_requires is a valid requirements list"""
-    try:
-        list(_reqs.parse(value))
-        if isinstance(value, set):
-            raise TypeError("Unordered types are not allowed")
-    except (TypeError, ValueError) as error:
-        msg = (
-            f"{attr!r} must be a string or iterable of strings "
-            f"containing valid project/version requirement specifiers; {error}"
-        )
-        raise DistutilsSetupError(msg) from error
-
-
-def check_specifier(dist, attr, value):
-    """Verify that value is a valid version specifier"""
-    try:
-        SpecifierSet(value)
-    except (InvalidSpecifier, AttributeError) as error:
-        msg = f"{attr!r} must be a string containing valid version specifiers; {error}"
-        raise DistutilsSetupError(msg) from error
-
-
-def check_entry_points(dist, attr, value):
-    """Verify that entry_points map is parseable"""
-    try:
-        _entry_points.load(value)
-    except Exception as e:
-        raise DistutilsSetupError(e) from e
-
-
-def check_package_data(dist, attr, value):
-    """Verify that value is a dictionary of package names to glob lists"""
-    if not isinstance(value, dict):
-        raise DistutilsSetupError(
-            f"{attr!r} must be a dictionary mapping package names to lists of "
-            "string wildcard patterns"
-        )
-    for k, v in value.items():
-        if not isinstance(k, str):
-            raise DistutilsSetupError(
-                f"keys of {attr!r} dict must be strings (got {k!r})"
-            )
-        assert_string_list(dist, f'values of {attr!r} dict', v)
-
-
-def check_packages(dist, attr, value):
-    for pkgname in value:
-        if not re.match(r'\w+(\.\w+)*', pkgname):
-            distutils.log.warn(
-                "WARNING: %r not a valid package name; please use only "
-                ".-separated package names in setup.py",
-                pkgname,
-            )
-
-
-if TYPE_CHECKING:
-    # Work around a mypy issue where type[T] can't be used as a base: https://github.com/python/mypy/issues/10962
-    from distutils.core import Distribution as _Distribution
-else:
-    _Distribution = get_unpatched(distutils.core.Distribution)
-
-
-class Distribution(_Distribution):
-    """Distribution with support for tests and package data
-
-    This is an enhanced version of 'distutils.dist.Distribution' that
-    effectively adds the following new optional keyword arguments to 'setup()':
-
-     'install_requires' -- a string or sequence of strings specifying project
-        versions that the distribution requires when installed, in the format
-        used by 'pkg_resources.require()'.  They will be installed
-        automatically when the package is installed.  If you wish to use
-        packages that are not available in PyPI, or want to give your users an
-        alternate download location, you can add a 'find_links' option to the
-        '[easy_install]' section of your project's 'setup.cfg' file, and then
-        setuptools will scan the listed web pages for links that satisfy the
-        requirements.
-
-     'extras_require' -- a dictionary mapping names of optional "extras" to the
-        additional requirement(s) that using those extras incurs. For example,
-        this::
-
-            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])
-
-        indicates that the distribution can optionally provide an extra
-        capability called "reST", but it can only be used if docutils and
-        reSTedit are installed.  If the user installs your package using
-        EasyInstall and requests one of your extras, the corresponding
-        additional requirements will be installed if needed.
-
-     'package_data' -- a dictionary mapping package names to lists of filenames
-        or globs to use to find data files contained in the named packages.
-        If the dictionary has filenames or globs listed under '""' (the empty
-        string), those names will be searched for in every package, in addition
-        to any names for the specific package.  Data files found using these
-        names/globs will be installed along with the package, in the same
-        location as the package.  Note that globs are allowed to reference
-        the contents of non-package subdirectories, as long as you use '/' as
-        a path separator.  (Globs are automatically converted to
-        platform-specific paths at runtime.)
-
-    In addition to these new keywords, this class also has several new methods
-    for manipulating the distribution's contents.  For example, the 'include()'
-    and 'exclude()' methods can be thought of as in-place add and subtract
-    commands that add or remove packages, modules, extensions, and so on from
-    the distribution.
-    """
-
-    _DISTUTILS_UNSUPPORTED_METADATA = {
-        'long_description_content_type': lambda: None,
-        'project_urls': dict,
-        'provides_extras': dict,  # behaves like an ordered set
-        'license_expression': lambda: None,
-        'license_file': lambda: None,
-        'license_files': lambda: None,
-        'install_requires': list,
-        'extras_require': dict,
-    }
-
-    # Used by build_py, editable_wheel and install_lib commands for legacy namespaces
-    namespace_packages: list[str]  #: :meta private: DEPRECATED
-
-    # Any: Dynamic assignment results in Incompatible types in assignment
-    def __init__(self, attrs: MutableMapping[str, Any] | None = None) -> None:
-        have_package_data = hasattr(self, "package_data")
-        if not have_package_data:
-            self.package_data: dict[str, list[str]] = {}
-        attrs = attrs or {}
-        self.dist_files: list[tuple[str, str, str]] = []
-        self.include_package_data: bool | None = None
-        self.exclude_package_data: dict[str, list[str]] | None = None
-        # Filter-out setuptools' specific options.
-        self.src_root: str | None = attrs.pop("src_root", None)
-        self.dependency_links: list[str] = attrs.pop('dependency_links', [])
-        self.setup_requires: list[str] = attrs.pop('setup_requires', [])
-        for ep in metadata.entry_points(group='distutils.setup_keywords'):
-            vars(self).setdefault(ep.name, None)
-
-        metadata_only = set(self._DISTUTILS_UNSUPPORTED_METADATA)
-        metadata_only -= {"install_requires", "extras_require"}
-        dist_attrs = {k: v for k, v in attrs.items() if k not in metadata_only}
-        _Distribution.__init__(self, dist_attrs)
-
-        # Private API (setuptools-use only, not restricted to Distribution)
-        # Stores files that are referenced by the configuration and need to be in the
-        # sdist (e.g. `version = file: VERSION.txt`)
-        self._referenced_files = set[str]()
-
-        self.set_defaults = ConfigDiscovery(self)
-
-        self._set_metadata_defaults(attrs)
-
-        self.metadata.version = self._normalize_version(self.metadata.version)
-        self._finalize_requires()
-
-    def _validate_metadata(self):
-        required = {"name"}
-        provided = {
-            key
-            for key in vars(self.metadata)
-            if getattr(self.metadata, key, None) is not None
-        }
-        missing = required - provided
-
-        if missing:
-            msg = f"Required package metadata is missing: {missing}"
-            raise DistutilsSetupError(msg)
-
-    def _set_metadata_defaults(self, attrs):
-        """
-        Fill-in missing metadata fields not supported by distutils.
-        Some fields may have been set by other tools (e.g. pbr).
-        Those fields (vars(self.metadata)) take precedence to
-        supplied attrs.
-        """
-        for option, default in self._DISTUTILS_UNSUPPORTED_METADATA.items():
-            vars(self.metadata).setdefault(option, attrs.get(option, default()))
-
-    @staticmethod
-    def _normalize_version(version):
-        from . import sic
-
-        if isinstance(version, numbers.Number):
-            # Some people apparently take "version number" too literally :)
-            version = str(version)
-        elif isinstance(version, sic) or version is None:
-            return version
-
-        normalized = str(Version(version))
-        if version != normalized:
-            InformationOnly.emit(f"Normalizing '{version}' to '{normalized}'")
-            return normalized
-        return version
-
-    def _finalize_requires(self):
-        """
-        Set `metadata.python_requires` and fix environment markers
-        in `install_requires` and `extras_require`.
-        """
-        if getattr(self, 'python_requires', None):
-            self.metadata.python_requires = self.python_requires
-
-        self._normalize_requires()
-        self.metadata.install_requires = self.install_requires
-        self.metadata.extras_require = self.extras_require
-
-        if self.extras_require:
-            for extra in self.extras_require.keys():
-                # Setuptools allows a weird ": syntax for extras
-                extra = extra.split(':')[0]
-                if extra:
-                    self.metadata.provides_extras.setdefault(extra)
-
-    def _normalize_requires(self):
-        """Make sure requirement-related attributes exist and are normalized"""
-        install_requires = getattr(self, "install_requires", None) or []
-        extras_require = getattr(self, "extras_require", None) or {}
-
-        # Preserve the "static"-ness of values parsed from config files
-        list_ = _static.List if _static.is_static(install_requires) else list
-        self.install_requires = list_(map(str, _reqs.parse(install_requires)))
-
-        dict_ = _static.Dict if _static.is_static(extras_require) else dict
-        self.extras_require = dict_(
-            (k, list(map(str, _reqs.parse(v or [])))) for k, v in extras_require.items()
-        )
-
-    def _finalize_license_expression(self) -> None:
-        """
-        Normalize license and license_expression.
-        >>> dist = Distribution({"license_expression": _static.Str("mit aNd  gpl-3.0-OR-later")})
-        >>> _static.is_static(dist.metadata.license_expression)
-        True
-        >>> dist._finalize_license_expression()
-        >>> _static.is_static(dist.metadata.license_expression)  # preserve "static-ness"
-        True
-        >>> print(dist.metadata.license_expression)
-        MIT AND GPL-3.0-or-later
-        """
-        classifiers = self.metadata.get_classifiers()
-        license_classifiers = [cl for cl in classifiers if cl.startswith("License :: ")]
-
-        license_expr = self.metadata.license_expression
-        if license_expr:
-            str_ = _static.Str if _static.is_static(license_expr) else str
-            normalized = str_(_canonicalize_license_expression(license_expr))
-            if license_expr != normalized:
-                InformationOnly.emit(f"Normalizing '{license_expr}' to '{normalized}'")
-                self.metadata.license_expression = normalized
-            if license_classifiers:
-                raise InvalidConfigError(
-                    "License classifiers have been superseded by license expressions "
-                    "(see https://peps.python.org/pep-0639/). Please remove:\n\n"
-                    + "\n".join(license_classifiers),
-                )
-        elif license_classifiers:
-            pypa_guides = "guides/writing-pyproject-toml/#license"
-            SetuptoolsDeprecationWarning.emit(
-                "License classifiers are deprecated.",
-                "Please consider removing the following classifiers in favor of a "
-                "SPDX license expression:\n\n" + "\n".join(license_classifiers),
-                see_url=f"https://packaging.python.org/en/latest/{pypa_guides}",
-                # Warning introduced on 2025-02-17
-                # TODO: Should we add a due date? It may affect old/unmaintained
-                #       packages in the ecosystem and cause problems...
-            )
-
-    def _finalize_license_files(self) -> None:
-        """Compute names of all license files which should be included."""
-        license_files: list[str] | None = self.metadata.license_files
-        patterns = license_files or []
-
-        license_file: str | None = self.metadata.license_file
-        if license_file and license_file not in patterns:
-            patterns.append(license_file)
-
-        if license_files is None and license_file is None:
-            # Default patterns match the ones wheel uses
-            # See https://wheel.readthedocs.io/en/stable/user_guide.html
-            # -> 'Including license files in the generated wheel file'
-            patterns = ['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']
-            files = self._expand_patterns(patterns, enforce_match=False)
-        else:  # Patterns explicitly given by the user
-            files = self._expand_patterns(patterns, enforce_match=True)
-
-        self.metadata.license_files = list(unique_everseen(files))
-
-    @classmethod
-    def _expand_patterns(
-        cls, patterns: list[str], enforce_match: bool = True
-    ) -> Iterator[str]:
-        """
-        >>> getfixture('sample_project_cwd')
-        >>> list(Distribution._expand_patterns(['LICENSE.txt']))
-        ['LICENSE.txt']
-        >>> list(Distribution._expand_patterns(['pyproject.toml', 'LIC*']))
-        ['pyproject.toml', 'LICENSE.txt']
-        >>> list(Distribution._expand_patterns(['src/**/*.dat']))
-        ['src/sample/package_data.dat']
-        """
-        return (
-            path.replace(os.sep, "/")
-            for pattern in patterns
-            for path in sorted(cls._find_pattern(pattern, enforce_match))
-            if not path.endswith('~') and os.path.isfile(path)
-        )
-
-    @staticmethod
-    def _find_pattern(pattern: str, enforce_match: bool = True) -> list[str]:
-        r"""
-        >>> getfixture('sample_project_cwd')
-        >>> Distribution._find_pattern("LICENSE.txt")
-        ['LICENSE.txt']
-        >>> Distribution._find_pattern("/LICENSE.MIT")
-        Traceback (most recent call last):
-        ...
-        setuptools.errors.InvalidConfigError: Pattern '/LICENSE.MIT' should be relative...
-        >>> Distribution._find_pattern("../LICENSE.MIT")
-        Traceback (most recent call last):
-        ...
-        setuptools.warnings.SetuptoolsDeprecationWarning: ...Pattern '../LICENSE.MIT' cannot contain '..'...
-        >>> Distribution._find_pattern("LICEN{CSE*")
-        Traceback (most recent call last):
-        ...
-        setuptools.warnings.SetuptoolsDeprecationWarning: ...Pattern 'LICEN{CSE*' contains invalid characters...
-        """
-        pypa_guides = "specifications/glob-patterns/"
-        if ".." in pattern:
-            SetuptoolsDeprecationWarning.emit(
-                f"Pattern {pattern!r} cannot contain '..'",
-                """
-                Please ensure the files specified are contained by the root
-                of the Python package (normally marked by `pyproject.toml`).
-                """,
-                see_url=f"https://packaging.python.org/en/latest/{pypa_guides}",
-                due_date=(2027, 2, 18),  # Introduced in 2025-03-20
-                # Replace with InvalidConfigError after deprecation
-            )
-        if pattern.startswith((os.sep, "/")) or ":\\" in pattern:
-            raise InvalidConfigError(
-                f"Pattern {pattern!r} should be relative and must not start with '/'"
-            )
-        if re.match(r'^[\w\-\.\/\*\?\[\]]+$', pattern) is None:
-            SetuptoolsDeprecationWarning.emit(
-                "Please provide a valid glob pattern.",
-                "Pattern {pattern!r} contains invalid characters.",
-                pattern=pattern,
-                see_url=f"https://packaging.python.org/en/latest/{pypa_guides}",
-                due_date=(2027, 2, 18),  # Introduced in 2025-02-20
-            )
-
-        found = glob(pattern, recursive=True)
-
-        if enforce_match and not found:
-            SetuptoolsDeprecationWarning.emit(
-                "Cannot find any files for the given pattern.",
-                "Pattern {pattern!r} did not match any files.",
-                pattern=pattern,
-                due_date=(2027, 2, 18),  # Introduced in 2025-02-20
-                # PEP 639 requires us to error, but as a transition period
-                # we will only issue a warning to give people time to prepare.
-                # After the transition, this should raise an InvalidConfigError.
-            )
-        return found
-
-    # FIXME: 'Distribution._parse_config_files' is too complex (14)
-    def _parse_config_files(self, filenames=None):  # noqa: C901
-        """
-        Adapted from distutils.dist.Distribution.parse_config_files,
-        this method provides the same functionality in subtly-improved
-        ways.
-        """
-        from configparser import ConfigParser
-
-        # Ignore install directory options if we have a venv
-        ignore_options = (
-            []
-            if sys.prefix == sys.base_prefix
-            else [
-                'install-base',
-                'install-platbase',
-                'install-lib',
-                'install-platlib',
-                'install-purelib',
-                'install-headers',
-                'install-scripts',
-                'install-data',
-                'prefix',
-                'exec-prefix',
-                'home',
-                'user',
-                'root',
-            ]
-        )
-
-        ignore_options = frozenset(ignore_options)
-
-        if filenames is None:
-            filenames = self.find_config_files()
-
-        if DEBUG:
-            self.announce("Distribution.parse_config_files():")
-
-        parser = ConfigParser()
-        parser.optionxform = str
-        for filename in filenames:
-            with open(filename, encoding='utf-8') as reader:
-                if DEBUG:
-                    self.announce("  reading {filename}".format(**locals()))
-                parser.read_file(reader)
-            for section in parser.sections():
-                options = parser.options(section)
-                opt_dict = self.get_option_dict(section)
-
-                for opt in options:
-                    if opt == '__name__' or opt in ignore_options:
-                        continue
-
-                    val = parser.get(section, opt)
-                    opt = self._enforce_underscore(opt, section)
-                    opt = self._enforce_option_lowercase(opt, section)
-                    opt_dict[opt] = (filename, val)
-
-            # Make the ConfigParser forget everything (so we retain
-            # the original filenames that options come from)
-            parser.__init__()
-
-        if 'global' not in self.command_options:
-            return
-
-        # If there was a "global" section in the config file, use it
-        # to set Distribution options.
-
-        for opt, (src, val) in self.command_options['global'].items():
-            alias = self.negative_opt.get(opt)
-            if alias:
-                val = not strtobool(val)
-            elif opt == 'verbose':
-                val = strtobool(val)
-
-            try:
-                setattr(self, alias or opt, val)
-            except ValueError as e:
-                raise DistutilsOptionError(e) from e
-
-    def _enforce_underscore(self, opt: str, section: str) -> str:
-        if "-" not in opt or self._skip_setupcfg_normalization(section):
-            return opt
-
-        underscore_opt = opt.replace('-', '_')
-        affected = f"(Affected: {self.metadata.name})." if self.metadata.name else ""
-        SetuptoolsDeprecationWarning.emit(
-            f"Invalid dash-separated key {opt!r} in {section!r} (setup.cfg), "
-            f"please use the underscore name {underscore_opt!r} instead.",
-            f"""
-            Usage of dash-separated {opt!r} will not be supported in future
-            versions. Please use the underscore name {underscore_opt!r} instead.
-            {affected}
-
-            Available configuration options are listed in:
-            https://setuptools.pypa.io/en/latest/userguide/declarative_config.html
-            """,
-            see_url="https://github.com/pypa/setuptools/discussions/5011",
-            due_date=(2026, 3, 3),
-            # Warning initially introduced in 3 Mar 2021
-        )
-        return underscore_opt
-
-    def _enforce_option_lowercase(self, opt: str, section: str) -> str:
-        if opt.islower() or self._skip_setupcfg_normalization(section):
-            return opt
-
-        lowercase_opt = opt.lower()
-        affected = f"(Affected: {self.metadata.name})." if self.metadata.name else ""
-        SetuptoolsDeprecationWarning.emit(
-            f"Invalid uppercase key {opt!r} in {section!r} (setup.cfg), "
-            f"please use lowercase {lowercase_opt!r} instead.",
-            f"""
-            Usage of uppercase key {opt!r} in {section!r} will not be supported in
-            future versions. Please use lowercase {lowercase_opt!r} instead.
-            {affected}
-
-            Available configuration options are listed in:
-            https://setuptools.pypa.io/en/latest/userguide/declarative_config.html
-            """,
-            see_url="https://github.com/pypa/setuptools/discussions/5011",
-            due_date=(2026, 3, 3),
-            # Warning initially introduced in 6 Mar 2021
-        )
-        return lowercase_opt
-
-    def _skip_setupcfg_normalization(self, section: str) -> bool:
-        skip = (
-            'options.extras_require',
-            'options.data_files',
-            'options.entry_points',
-            'options.package_data',
-            'options.exclude_package_data',
-        )
-        return section in skip or not self._is_setuptools_section(section)
-
-    def _is_setuptools_section(self, section: str) -> bool:
-        return (
-            section == "metadata"
-            or section.startswith("options")
-            or section in _setuptools_commands()
-        )
-
-    # FIXME: 'Distribution._set_command_options' is too complex (14)
-    def _set_command_options(self, command_obj, option_dict=None):  # noqa: C901
-        """
-        Set the options for 'command_obj' from 'option_dict'.  Basically
-        this means copying elements of a dictionary ('option_dict') to
-        attributes of an instance ('command').
-
-        'command_obj' must be a Command instance.  If 'option_dict' is not
-        supplied, uses the standard option dictionary for this command
-        (from 'self.command_options').
-
-        (Adopted from distutils.dist.Distribution._set_command_options)
-        """
-        command_name = command_obj.get_command_name()
-        if option_dict is None:
-            option_dict = self.get_option_dict(command_name)
-
-        if DEBUG:
-            self.announce(f"  setting options for '{command_name}' command:")
-        for option, (source, value) in option_dict.items():
-            if DEBUG:
-                self.announce(f"    {option} = {value} (from {source})")
-            try:
-                bool_opts = [translate_longopt(o) for o in command_obj.boolean_options]
-            except AttributeError:
-                bool_opts = []
-            try:
-                neg_opt = command_obj.negative_opt
-            except AttributeError:
-                neg_opt = {}
-
-            try:
-                is_string = isinstance(value, str)
-                if option in neg_opt and is_string:
-                    setattr(command_obj, neg_opt[option], not strtobool(value))
-                elif option in bool_opts and is_string:
-                    setattr(command_obj, option, strtobool(value))
-                elif hasattr(command_obj, option):
-                    setattr(command_obj, option, value)
-                else:
-                    raise DistutilsOptionError(
-                        f"error in {source}: command '{command_name}' has no such option '{option}'"
-                    )
-            except ValueError as e:
-                raise DistutilsOptionError(e) from e
-
-    def _get_project_config_files(self, filenames: Iterable[StrPath] | None):
-        """Add default file and split between INI and TOML"""
-        tomlfiles = []
-        standard_project_metadata = Path(self.src_root or os.curdir, "pyproject.toml")
-        if filenames is not None:
-            parts = partition(lambda f: Path(f).suffix == ".toml", filenames)
-            filenames = list(parts[0])  # 1st element => predicate is False
-            tomlfiles = list(parts[1])  # 2nd element => predicate is True
-        elif standard_project_metadata.exists():
-            tomlfiles = [standard_project_metadata]
-        return filenames, tomlfiles
-
-    def parse_config_files(
-        self,
-        filenames: Iterable[StrPath] | None = None,
-        ignore_option_errors: bool = False,
-    ) -> None:
-        """Parses configuration files from various levels
-        and loads configuration.
-        """
-        inifiles, tomlfiles = self._get_project_config_files(filenames)
-
-        self._parse_config_files(filenames=inifiles)
-
-        setupcfg.parse_configuration(
-            self, self.command_options, ignore_option_errors=ignore_option_errors
-        )
-        for filename in tomlfiles:
-            pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
-
-        self._finalize_requires()
-        self._finalize_license_expression()
-        self._finalize_license_files()
-
-    def fetch_build_eggs(self, requires: _StrOrIter) -> list[metadata.Distribution]:
-        """Resolve pre-setup requirements"""
-        from .installer import _fetch_build_eggs
-
-        return _fetch_build_eggs(self, requires)
-
-    def finalize_options(self) -> None:
-        """
-        Allow plugins to apply arbitrary operations to the
-        distribution. Each hook may optionally define a 'order'
-        to influence the order of execution. Smaller numbers
-        go first and the default is 0.
-        """
-        group = 'setuptools.finalize_distribution_options'
-
-        def by_order(hook):
-            return getattr(hook, 'order', 0)
-
-        defined = metadata.entry_points(group=group)
-        filtered = itertools.filterfalse(self._removed, defined)
-        loaded = map(lambda e: e.load(), filtered)
-        for ep in sorted(loaded, key=by_order):
-            ep(self)
-
-    @staticmethod
-    def _removed(ep):
-        """
-        When removing an entry point, if metadata is loaded
-        from an older version of Setuptools, that removed
-        entry point will attempt to be loaded and will fail.
-        See #2765 for more details.
-        """
-        removed = {
-            # removed 2021-09-05
-            '2to3_doctests',
-        }
-        return ep.name in removed
-
-    def _finalize_setup_keywords(self):
-        for ep in metadata.entry_points(group='distutils.setup_keywords'):
-            value = getattr(self, ep.name, None)
-            if value is not None:
-                ep.load()(self, ep.name, value)
-
-    def get_egg_cache_dir(self) -> str:
-        from . import windows_support
-
-        egg_cache_dir = os.path.join(os.curdir, '.eggs')
-        if not os.path.exists(egg_cache_dir):
-            os.mkdir(egg_cache_dir)
-            windows_support.hide_file(egg_cache_dir)
-            readme_txt_filename = os.path.join(egg_cache_dir, 'README.txt')
-            with open(readme_txt_filename, 'w', encoding="utf-8") as f:
-                f.write(
-                    'This directory contains eggs that were downloaded '
-                    'by setuptools to build, test, and run plug-ins.\n\n'
-                )
-                f.write(
-                    'This directory caches those eggs to prevent '
-                    'repeated downloads.\n\n'
-                )
-                f.write('However, it is safe to delete this directory.\n\n')
-
-        return egg_cache_dir
-
-    def fetch_build_egg(self, req):
-        """Fetch an egg needed for building"""
-        from .installer import fetch_build_egg
-
-        return fetch_build_egg(self, req)
-
-    def get_command_class(self, command: str) -> type[distutils.cmd.Command]:  # type: ignore[override] # Not doing complex overrides yet
-        """Pluggable version of get_command_class()"""
-        if command in self.cmdclass:
-            return self.cmdclass[command]
-
-        # Special case bdist_wheel so it's never loaded from "wheel"
-        if command == 'bdist_wheel':
-            from .command.bdist_wheel import bdist_wheel
-
-            return bdist_wheel
-
-        eps = metadata.entry_points(group='distutils.commands', name=command)
-        for ep in eps:
-            self.cmdclass[command] = cmdclass = ep.load()
-            return cmdclass
-        else:
-            return _Distribution.get_command_class(self, command)
-
-    def print_commands(self):
-        for ep in metadata.entry_points(group='distutils.commands'):
-            if ep.name not in self.cmdclass:
-                cmdclass = ep.load()
-                self.cmdclass[ep.name] = cmdclass
-        return _Distribution.print_commands(self)
-
-    def get_command_list(self):
-        for ep in metadata.entry_points(group='distutils.commands'):
-            if ep.name not in self.cmdclass:
-                cmdclass = ep.load()
-                self.cmdclass[ep.name] = cmdclass
-        return _Distribution.get_command_list(self)
-
-    def include(self, **attrs) -> None:
-        """Add items to distribution that are named in keyword arguments
-
-        For example, 'dist.include(py_modules=["x"])' would add 'x' to
-        the distribution's 'py_modules' attribute, if it was not already
-        there.
-
-        Currently, this method only supports inclusion for attributes that are
-        lists or tuples.  If you need to add support for adding to other
-        attributes in this or a subclass, you can add an '_include_X' method,
-        where 'X' is the name of the attribute.  The method will be called with
-        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
-        will try to call 'dist._include_foo({"bar":"baz"})', which can then
-        handle whatever special inclusion logic is needed.
-        """
-        for k, v in attrs.items():
-            include = getattr(self, '_include_' + k, None)
-            if include:
-                include(v)
-            else:
-                self._include_misc(k, v)
-
-    def exclude_package(self, package: str) -> None:
-        """Remove packages, modules, and extensions in named package"""
-
-        pfx = package + '.'
-        if self.packages:
-            self.packages = [
-                p for p in self.packages if p != package and not p.startswith(pfx)
-            ]
-
-        if self.py_modules:
-            self.py_modules = [
-                p for p in self.py_modules if p != package and not p.startswith(pfx)
-            ]
-
-        if self.ext_modules:
-            self.ext_modules = [
-                p
-                for p in self.ext_modules
-                if p.name != package and not p.name.startswith(pfx)
-            ]
-
-    def has_contents_for(self, package: str) -> bool:
-        """Return true if 'exclude_package(package)' would do something"""
-
-        pfx = package + '.'
-
-        for p in self.iter_distribution_names():
-            if p == package or p.startswith(pfx):
-                return True
-
-        return False
-
-    def _exclude_misc(self, name: str, value: _Sequence) -> None:
-        """Handle 'exclude()' for list/tuple attrs without a special handler"""
-        if not isinstance(value, _sequence):
-            raise DistutilsSetupError(
-                f"{name}: setting must be of type <{_sequence_type_repr}> (got {value!r})"
-            )
-        try:
-            old = getattr(self, name)
-        except AttributeError as e:
-            raise DistutilsSetupError(f"{name}: No such distribution setting") from e
-        if old is not None and not isinstance(old, _sequence):
-            raise DistutilsSetupError(
-                name + ": this setting cannot be changed via include/exclude"
-            )
-        elif old:
-            setattr(self, name, [item for item in old if item not in value])
-
-    def _include_misc(self, name: str, value: _Sequence) -> None:
-        """Handle 'include()' for list/tuple attrs without a special handler"""
-
-        if not isinstance(value, _sequence):
-            raise DistutilsSetupError(
-                f"{name}: setting must be of type <{_sequence_type_repr}> (got {value!r})"
-            )
-        try:
-            old = getattr(self, name)
-        except AttributeError as e:
-            raise DistutilsSetupError(f"{name}: No such distribution setting") from e
-        if old is None:
-            setattr(self, name, value)
-        elif not isinstance(old, _sequence):
-            raise DistutilsSetupError(
-                name + ": this setting cannot be changed via include/exclude"
-            )
-        else:
-            new = [item for item in value if item not in old]
-            setattr(self, name, list(old) + new)
-
-    def exclude(self, **attrs) -> None:
-        """Remove items from distribution that are named in keyword arguments
-
-        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
-        the distribution's 'py_modules' attribute.  Excluding packages uses
-        the 'exclude_package()' method, so all of the package's contained
-        packages, modules, and extensions are also excluded.
-
-        Currently, this method only supports exclusion from attributes that are
-        lists or tuples.  If you need to add support for excluding from other
-        attributes in this or a subclass, you can add an '_exclude_X' method,
-        where 'X' is the name of the attribute.  The method will be called with
-        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
-        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
-        handle whatever special exclusion logic is needed.
-        """
-        for k, v in attrs.items():
-            exclude = getattr(self, '_exclude_' + k, None)
-            if exclude:
-                exclude(v)
-            else:
-                self._exclude_misc(k, v)
-
-    def _exclude_packages(self, packages: _Sequence) -> None:
-        if not isinstance(packages, _sequence):
-            raise DistutilsSetupError(
-                f"packages: setting must be of type <{_sequence_type_repr}> (got {packages!r})"
-            )
-        list(map(self.exclude_package, packages))
-
-    def _parse_command_opts(self, parser, args):
-        # Remove --with-X/--without-X options when processing command args
-        self.global_options = self.__class__.global_options
-        self.negative_opt = self.__class__.negative_opt
-
-        # First, expand any aliases
-        command = args[0]
-        aliases = self.get_option_dict('aliases')
-        while command in aliases:
-            _src, alias = aliases[command]
-            del aliases[command]  # ensure each alias can expand only once!
-            import shlex
-
-            args[:1] = shlex.split(alias, True)
-            command = args[0]
-
-        nargs = _Distribution._parse_command_opts(self, parser, args)
-
-        # Handle commands that want to consume all remaining arguments
-        cmd_class = self.get_command_class(command)
-        if getattr(cmd_class, 'command_consumes_arguments', None):
-            self.get_option_dict(command)['args'] = ("command line", nargs)
-            if nargs is not None:
-                return []
-
-        return nargs
-
-    def get_cmdline_options(self) -> dict[str, dict[str, str | None]]:
-        """Return a '{cmd: {opt:val}}' map of all command-line options
-
-        Option names are all long, but do not include the leading '--', and
-        contain dashes rather than underscores.  If the option doesn't take
-        an argument (e.g. '--quiet'), the 'val' is 'None'.
-
-        Note that options provided by config files are intentionally excluded.
-        """
-
-        d: dict[str, dict[str, str | None]] = {}
-
-        for cmd, opts in self.command_options.items():
-            val: str | None
-            for opt, (src, val) in opts.items():
-                if src != "command line":
-                    continue
-
-                opt = opt.replace('_', '-')
-
-                if val == 0:
-                    cmdobj = self.get_command_obj(cmd)
-                    neg_opt = self.negative_opt.copy()
-                    neg_opt.update(getattr(cmdobj, 'negative_opt', {}))
-                    for neg, pos in neg_opt.items():
-                        if pos == opt:
-                            opt = neg
-                            val = None
-                            break
-                    else:
-                        raise AssertionError("Shouldn't be able to get here")
-
-                elif val == 1:
-                    val = None
-
-                d.setdefault(cmd, {})[opt] = val
-
-        return d
-
-    def iter_distribution_names(self) -> Iterator[str]:
-        """Yield all packages, modules, and extension names in distribution"""
-
-        yield from self.packages or ()
-
-        yield from self.py_modules or ()
-
-        for ext in self.ext_modules or ():
-            if isinstance(ext, tuple):
-                name, _buildinfo = ext
-            else:
-                name = ext.name
-            name = name.removesuffix('module')
-            yield name
-
-    def handle_display_options(self, option_order):
-        """If there were any non-global "display-only" options
-        (--help-commands or the metadata display options) on the command
-        line, display the requested info and return true; else return
-        false.
-        """
-        import sys
-
-        if self.help_commands:
-            return _Distribution.handle_display_options(self, option_order)
-
-        # Stdout may be StringIO (e.g. in tests)
-        if not isinstance(sys.stdout, io.TextIOWrapper):
-            return _Distribution.handle_display_options(self, option_order)
-
-        # Don't wrap stdout if utf-8 is already the encoding. Provides
-        #  workaround for #334.
-        if sys.stdout.encoding.lower() in ('utf-8', 'utf8'):
-            return _Distribution.handle_display_options(self, option_order)
-
-        # Print metadata in UTF-8 no matter the platform
-        encoding = sys.stdout.encoding
-        sys.stdout.reconfigure(encoding='utf-8')
-        try:
-            return _Distribution.handle_display_options(self, option_order)
-        finally:
-            sys.stdout.reconfigure(encoding=encoding)
-
-    def run_command(self, command) -> None:
-        self.set_defaults()
-        # Postpone defaults until all explicit configuration is considered
-        # (setup() args, config files, command line and plugins)
-
-        super().run_command(command)
-
-
-@functools.cache
-def _setuptools_commands() -> set[str]:
-    try:
-        # Use older API for importlib.metadata compatibility
-        entry_points = metadata.distribution('setuptools').entry_points
-        eps: Iterable[str] = (ep.name for ep in entry_points)
-    except metadata.PackageNotFoundError:
-        # during bootstrapping, distribution doesn't exist
-        eps = []
-    return {*distutils.command.__all__, *eps}
-
-
-class DistDeprecationWarning(SetuptoolsDeprecationWarning):
-    """Class for warning about deprecations in dist in
-    setuptools. Not ignored by default, unlike DeprecationWarning."""
diff --git a/voxvera/vendor/setuptools/errors.py b/voxvera/vendor/setuptools/errors.py
deleted file mode 100644
index 990ecbf..0000000
--- a/voxvera/vendor/setuptools/errors.py
+++ /dev/null
@@ -1,67 +0,0 @@
-"""setuptools.errors
-
-Provides exceptions used by setuptools modules.
-"""
-
-from __future__ import annotations
-
-from distutils import errors as _distutils_errors
-
-# Re-export errors from distutils to facilitate the migration to PEP632
-
-ByteCompileError = _distutils_errors.DistutilsByteCompileError
-CCompilerError = _distutils_errors.CCompilerError
-ClassError = _distutils_errors.DistutilsClassError
-CompileError = _distutils_errors.CompileError
-ExecError = _distutils_errors.DistutilsExecError
-FileError = _distutils_errors.DistutilsFileError
-InternalError = _distutils_errors.DistutilsInternalError
-LibError = _distutils_errors.LibError
-LinkError = _distutils_errors.LinkError
-ModuleError = _distutils_errors.DistutilsModuleError
-OptionError = _distutils_errors.DistutilsOptionError
-PlatformError = _distutils_errors.DistutilsPlatformError
-PreprocessError = _distutils_errors.PreprocessError
-SetupError = _distutils_errors.DistutilsSetupError
-TemplateError = _distutils_errors.DistutilsTemplateError
-UnknownFileError = _distutils_errors.UnknownFileError
-
-# The root error class in the hierarchy
-BaseError = _distutils_errors.DistutilsError
-
-
-class InvalidConfigError(OptionError):  # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
-    """Error used for invalid configurations."""
-
-
-class RemovedConfigError(OptionError):  # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
-    """Error used for configurations that were deprecated and removed."""
-
-
-class RemovedCommandError(BaseError, RuntimeError):  # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
-    """Error used for commands that have been removed in setuptools.
-
-    Since ``setuptools`` is built on ``distutils``, simply removing a command
-    from ``setuptools`` will make the behavior fall back to ``distutils``; this
-    error is raised if a command exists in ``distutils`` but has been actively
-    removed in ``setuptools``.
-    """
-
-
-class PackageDiscoveryError(BaseError, RuntimeError):  # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
-    """Impossible to perform automatic discovery of packages and/or modules.
-
-    The current project layout or given discovery options can lead to problems when
-    scanning the project directory.
-
-    Setuptools might also refuse to complete auto-discovery if an error prone condition
-    is detected (e.g. when a project is organised as a flat-layout but contains
-    multiple directories that can be taken as top-level packages inside a single
-    distribution [*]_). In these situations the users are encouraged to be explicit
-    about which packages to include or to make the discovery parameters more specific.
-
-    .. [*] Since multi-package distributions are uncommon it is very likely that the
-       developers did not intend for all the directories to be packaged, and are just
-       leaving auxiliary code in the repository top-level, such as maintenance-related
-       scripts.
-    """
diff --git a/voxvera/vendor/setuptools/extension.py b/voxvera/vendor/setuptools/extension.py
deleted file mode 100644
index 3e63cbe..0000000
--- a/voxvera/vendor/setuptools/extension.py
+++ /dev/null
@@ -1,179 +0,0 @@
-from __future__ import annotations
-
-import functools
-import re
-from collections.abc import Iterable
-from typing import TYPE_CHECKING
-
-from setuptools._path import StrPath
-
-from .monkey import get_unpatched
-
-import distutils.core
-import distutils.errors
-import distutils.extension
-
-
-def _have_cython() -> bool:
-    """
-    Return True if Cython can be imported.
-    """
-    cython_impl = 'Cython.Distutils.build_ext'
-    try:
-        # from (cython_impl) import build_ext
-        __import__(cython_impl, fromlist=['build_ext']).build_ext
-    except Exception:
-        return False
-    return True
-
-
-# for compatibility
-have_pyrex = _have_cython
-if TYPE_CHECKING:
-    # Work around a mypy issue where type[T] can't be used as a base: https://github.com/python/mypy/issues/10962
-    from distutils.core import Extension as _Extension
-else:
-    _Extension = get_unpatched(distutils.core.Extension)
-
-
-class Extension(_Extension):
-    """
-    Describes a single extension module.
-
-    This means that all source files will be compiled into a single binary file
-    ``.`` (with ```` derived from ``name`` and
-    ```` defined by one of the values in
-    ``importlib.machinery.EXTENSION_SUFFIXES``).
-
-    In the case ``.pyx`` files are passed as ``sources and`` ``Cython`` is **not**
-    installed in the build environment, ``setuptools`` may also try to look for the
-    equivalent ``.cpp`` or ``.c`` files.
-
-    :arg str name:
-      the full name of the extension, including any packages -- ie.
-      *not* a filename or pathname, but Python dotted name
-
-    :arg Iterable[str | os.PathLike[str]] sources:
-      iterable of source filenames, (except strings, which could be misinterpreted
-      as a single filename), relative to the distribution root
-      (where the setup script lives), in Unix form (slash-separated)
-      for portability.  Source files may be C, C++, SWIG (.i),
-      platform-specific resource files, or whatever else is recognized
-      by the "build_ext" command as source for a Python extension.
-
-    :keyword list[str] include_dirs:
-      list of directories to search for C/C++ header files (in Unix
-      form for portability)
-
-    :keyword list[tuple[str, str|None]] define_macros:
-      list of macros to define; each macro is defined using a 2-tuple:
-      the first item corresponding to the name of the macro and the second
-      item either a string with its value or None to
-      define it without a particular value (equivalent of "#define
-      FOO" in source or -DFOO on Unix C compiler command line)
-
-    :keyword list[str] undef_macros:
-      list of macros to undefine explicitly
-
-    :keyword list[str] library_dirs:
-      list of directories to search for C/C++ libraries at link time
-
-    :keyword list[str] libraries:
-      list of library names (not filenames or paths) to link against
-
-    :keyword list[str] runtime_library_dirs:
-      list of directories to search for C/C++ libraries at run time
-      (for shared extensions, this is when the extension is loaded).
-      Setting this will cause an exception during build on Windows
-      platforms.
-
-    :keyword list[str] extra_objects:
-      list of extra files to link with (eg. object files not implied
-      by 'sources', static library that must be explicitly specified,
-      binary resource files, etc.)
-
-    :keyword list[str] extra_compile_args:
-      any extra platform- and compiler-specific information to use
-      when compiling the source files in 'sources'.  For platforms and
-      compilers where "command line" makes sense, this is typically a
-      list of command-line arguments, but for other platforms it could
-      be anything.
-
-    :keyword list[str] extra_link_args:
-      any extra platform- and compiler-specific information to use
-      when linking object files together to create the extension (or
-      to create a new static Python interpreter).  Similar
-      interpretation as for 'extra_compile_args'.
-
-    :keyword list[str] export_symbols:
-      list of symbols to be exported from a shared extension.  Not
-      used on all platforms, and not generally necessary for Python
-      extensions, which typically export exactly one symbol: "init" +
-      extension_name.
-
-    :keyword list[str] swig_opts:
-      any extra options to pass to SWIG if a source file has the .i
-      extension.
-
-    :keyword list[str] depends:
-      list of files that the extension depends on
-
-    :keyword str language:
-      extension language (i.e. "c", "c++", "objc"). Will be detected
-      from the source extensions if not provided.
-
-    :keyword bool optional:
-      specifies that a build failure in the extension should not abort the
-      build process, but simply not install the failing extension.
-
-    :keyword bool py_limited_api:
-      opt-in flag for the usage of :doc:`Python's limited API `.
-
-    :raises setuptools.errors.PlatformError: if ``runtime_library_dirs`` is
-      specified on Windows. (since v63)
-    """
-
-    # These 4 are set and used in setuptools/command/build_ext.py
-    # The lack of a default value and risk of `AttributeError` is purposeful
-    # to avoid people forgetting to call finalize_options if they modify the extension list.
-    # See example/rationale in https://github.com/pypa/setuptools/issues/4529.
-    _full_name: str  #: Private API, internal use only.
-    _links_to_dynamic: bool  #: Private API, internal use only.
-    _needs_stub: bool  #: Private API, internal use only.
-    _file_name: str  #: Private API, internal use only.
-
-    def __init__(
-        self,
-        name: str,
-        sources: Iterable[StrPath],
-        *args,
-        py_limited_api: bool = False,
-        **kw,
-    ) -> None:
-        # The *args is needed for compatibility as calls may use positional
-        # arguments. py_limited_api may be set only via keyword.
-        self.py_limited_api = py_limited_api
-        super().__init__(
-            name,
-            sources,  # type: ignore[arg-type] # Vendored version of setuptools supports PathLike
-            *args,
-            **kw,
-        )
-
-    def _convert_pyx_sources_to_lang(self):
-        """
-        Replace sources with .pyx extensions to sources with the target
-        language extension. This mechanism allows language authors to supply
-        pre-converted sources but to prefer the .pyx sources.
-        """
-        if _have_cython():
-            # the build has Cython, so allow it to compile the .pyx files
-            return
-        lang = self.language or ''
-        target_ext = '.cpp' if lang.lower() == 'c++' else '.c'
-        sub = functools.partial(re.sub, '.pyx$', target_ext)
-        self.sources = list(map(sub, self.sources))
-
-
-class Library(Extension):
-    """Just like a regular Extension, but built as a library instead"""
diff --git a/voxvera/vendor/setuptools/glob.py b/voxvera/vendor/setuptools/glob.py
deleted file mode 100644
index 1dfff2c..0000000
--- a/voxvera/vendor/setuptools/glob.py
+++ /dev/null
@@ -1,185 +0,0 @@
-"""
-Filename globbing utility. Mostly a copy of `glob` from Python 3.5.
-
-Changes include:
- * `yield from` and PEP3102 `*` removed.
- * Hidden files are not ignored.
-"""
-
-from __future__ import annotations
-
-import fnmatch
-import os
-import re
-from collections.abc import Iterable, Iterator
-from typing import TYPE_CHECKING, AnyStr, overload
-
-if TYPE_CHECKING:
-    from _typeshed import BytesPath, StrOrBytesPath, StrPath
-
-__all__ = ["glob", "iglob", "escape"]
-
-
-def glob(pathname: AnyStr, recursive: bool = False) -> list[AnyStr]:
-    """Return a list of paths matching a pathname pattern.
-
-    The pattern may contain simple shell-style wildcards a la
-    fnmatch. However, unlike fnmatch, filenames starting with a
-    dot are special cases that are not matched by '*' and '?'
-    patterns.
-
-    If recursive is true, the pattern '**' will match any files and
-    zero or more directories and subdirectories.
-    """
-    return list(iglob(pathname, recursive=recursive))
-
-
-def iglob(pathname: AnyStr, recursive: bool = False) -> Iterator[AnyStr]:
-    """Return an iterator which yields the paths matching a pathname pattern.
-
-    The pattern may contain simple shell-style wildcards a la
-    fnmatch. However, unlike fnmatch, filenames starting with a
-    dot are special cases that are not matched by '*' and '?'
-    patterns.
-
-    If recursive is true, the pattern '**' will match any files and
-    zero or more directories and subdirectories.
-    """
-    it = _iglob(pathname, recursive)
-    if recursive and _isrecursive(pathname):
-        s = next(it)  # skip empty string
-        assert not s
-    return it
-
-
-def _iglob(pathname: AnyStr, recursive: bool) -> Iterator[AnyStr]:
-    dirname, basename = os.path.split(pathname)
-    glob_in_dir = glob2 if recursive and _isrecursive(basename) else glob1
-
-    if not has_magic(pathname):
-        if basename:
-            if os.path.lexists(pathname):
-                yield pathname
-        else:
-            # Patterns ending with a slash should match only directories
-            if os.path.isdir(dirname):
-                yield pathname
-        return
-
-    if not dirname:
-        yield from glob_in_dir(dirname, basename)
-        return
-    # `os.path.split()` returns the argument itself as a dirname if it is a
-    # drive or UNC path.  Prevent an infinite recursion if a drive or UNC path
-    # contains magic characters (i.e. r'\\?\C:').
-    if dirname != pathname and has_magic(dirname):
-        dirs: Iterable[AnyStr] = _iglob(dirname, recursive)
-    else:
-        dirs = [dirname]
-    if not has_magic(basename):
-        glob_in_dir = glob0
-    for dirname in dirs:
-        for name in glob_in_dir(dirname, basename):
-            yield os.path.join(dirname, name)
-
-
-# These 2 helper functions non-recursively glob inside a literal directory.
-# They return a list of basenames. `glob1` accepts a pattern while `glob0`
-# takes a literal basename (so it only has to check for its existence).
-
-
-@overload
-def glob1(dirname: StrPath, pattern: str) -> list[str]: ...
-@overload
-def glob1(dirname: BytesPath, pattern: bytes) -> list[bytes]: ...
-def glob1(dirname: StrOrBytesPath, pattern: str | bytes) -> list[str] | list[bytes]:
-    if not dirname:
-        if isinstance(pattern, bytes):
-            dirname = os.curdir.encode('ASCII')
-        else:
-            dirname = os.curdir
-    try:
-        names = os.listdir(dirname)
-    except OSError:
-        return []
-    # mypy false-positives: str or bytes type possibility is always kept in sync
-    return fnmatch.filter(names, pattern)  # type: ignore[type-var, return-value]
-
-
-def glob0(dirname, basename):
-    if not basename:
-        # `os.path.split()` returns an empty basename for paths ending with a
-        # directory separator.  'q*x/' should match only directories.
-        if os.path.isdir(dirname):
-            return [basename]
-    else:
-        if os.path.lexists(os.path.join(dirname, basename)):
-            return [basename]
-    return []
-
-
-# This helper function recursively yields relative pathnames inside a literal
-# directory.
-
-
-@overload
-def glob2(dirname: StrPath, pattern: str) -> Iterator[str]: ...
-@overload
-def glob2(dirname: BytesPath, pattern: bytes) -> Iterator[bytes]: ...
-def glob2(dirname: StrOrBytesPath, pattern: str | bytes) -> Iterator[str | bytes]:
-    assert _isrecursive(pattern)
-    yield pattern[:0]
-    yield from _rlistdir(dirname)
-
-
-# Recursively yields relative pathnames inside a literal directory.
-@overload
-def _rlistdir(dirname: StrPath) -> Iterator[str]: ...
-@overload
-def _rlistdir(dirname: BytesPath) -> Iterator[bytes]: ...
-def _rlistdir(dirname: StrOrBytesPath) -> Iterator[str | bytes]:
-    if not dirname:
-        if isinstance(dirname, bytes):
-            dirname = os.curdir.encode('ASCII')
-        else:
-            dirname = os.curdir
-    try:
-        names = os.listdir(dirname)
-    except OSError:
-        return
-    for x in names:
-        yield x
-        # mypy false-positives: str or bytes type possibility is always kept in sync
-        path = os.path.join(dirname, x) if dirname else x  # type: ignore[arg-type]
-        for y in _rlistdir(path):
-            yield os.path.join(x, y)  # type: ignore[arg-type]
-
-
-magic_check = re.compile('([*?[])')
-magic_check_bytes = re.compile(b'([*?[])')
-
-
-def has_magic(s: str | bytes) -> bool:
-    if isinstance(s, bytes):
-        return magic_check_bytes.search(s) is not None
-    else:
-        return magic_check.search(s) is not None
-
-
-def _isrecursive(pattern: str | bytes) -> bool:
-    if isinstance(pattern, bytes):
-        return pattern == b'**'
-    else:
-        return pattern == '**'
-
-
-def escape(pathname):
-    """Escape all special characters."""
-    # Escaping is done by wrapping any of "*?[" between square brackets.
-    # Metacharacters do not work in the drive part and shouldn't be escaped.
-    drive, pathname = os.path.splitdrive(pathname)
-    if isinstance(pathname, bytes):
-        pathname = magic_check_bytes.sub(rb'[\1]', pathname)
-    else:
-        pathname = magic_check.sub(r'[\1]', pathname)
-    return drive + pathname
diff --git a/voxvera/vendor/setuptools/gui-32.exe b/voxvera/vendor/setuptools/gui-32.exe
deleted file mode 100644
index 1eb430c..0000000
Binary files a/voxvera/vendor/setuptools/gui-32.exe and /dev/null differ
diff --git a/voxvera/vendor/setuptools/gui-64.exe b/voxvera/vendor/setuptools/gui-64.exe
deleted file mode 100644
index 031cb77..0000000
Binary files a/voxvera/vendor/setuptools/gui-64.exe and /dev/null differ
diff --git a/voxvera/vendor/setuptools/gui-arm64.exe b/voxvera/vendor/setuptools/gui-arm64.exe
deleted file mode 100644
index 1e00ffa..0000000
Binary files a/voxvera/vendor/setuptools/gui-arm64.exe and /dev/null differ
diff --git a/voxvera/vendor/setuptools/gui.exe b/voxvera/vendor/setuptools/gui.exe
deleted file mode 100644
index 1eb430c..0000000
Binary files a/voxvera/vendor/setuptools/gui.exe and /dev/null differ
diff --git a/voxvera/vendor/setuptools/installer.py b/voxvera/vendor/setuptools/installer.py
deleted file mode 100644
index 36a8b09..0000000
--- a/voxvera/vendor/setuptools/installer.py
+++ /dev/null
@@ -1,155 +0,0 @@
-from __future__ import annotations
-
-import glob
-import itertools
-import os
-import subprocess
-import sys
-import tempfile
-
-import packaging.requirements
-import packaging.utils
-
-from . import _reqs
-from ._importlib import metadata
-from .warnings import SetuptoolsDeprecationWarning
-from .wheel import Wheel
-
-from distutils import log
-from distutils.errors import DistutilsError
-
-
-def _fixup_find_links(find_links):
-    """Ensure find-links option end-up being a list of strings."""
-    if isinstance(find_links, str):
-        return find_links.split()
-    assert isinstance(find_links, (tuple, list))
-    return find_links
-
-
-def fetch_build_egg(dist, req) -> metadata.Distribution | metadata.PathDistribution:
-    """Fetch an egg needed for building.
-
-    Use pip/wheel to fetch/build a wheel."""
-    _DeprecatedInstaller.emit()
-    _warn_wheel_not_available(dist)
-    return _fetch_build_egg_no_warn(dist, req)
-
-
-def _present(req):
-    return any(_dist_matches_req(dist, req) for dist in metadata.distributions())
-
-
-def _fetch_build_eggs(dist, requires: _reqs._StrOrIter) -> list[metadata.Distribution]:
-    _DeprecatedInstaller.emit(stacklevel=3)
-    _warn_wheel_not_available(dist)
-
-    parsed_reqs = _reqs.parse(requires)
-
-    missing_reqs = itertools.filterfalse(_present, parsed_reqs)
-
-    needed_reqs = (
-        req for req in missing_reqs if not req.marker or req.marker.evaluate()
-    )
-    resolved_dists = [_fetch_build_egg_no_warn(dist, req) for req in needed_reqs]
-    for dist in resolved_dists:
-        # dist.locate_file('') is the directory containing EGG-INFO, where the importabl
-        # contents can be found.
-        sys.path.insert(0, str(dist.locate_file('')))
-    return resolved_dists
-
-
-def _dist_matches_req(egg_dist, req):
-    return (
-        packaging.utils.canonicalize_name(egg_dist.name)
-        == packaging.utils.canonicalize_name(req.name)
-        and egg_dist.version in req.specifier
-    )
-
-
-def _fetch_build_egg_no_warn(dist, req):  # noqa: C901  # is too complex (16)  # FIXME
-    # Ignore environment markers; if supplied, it is required.
-    req = strip_marker(req)
-    # Take easy_install options into account, but do not override relevant
-    # pip environment variables (like PIP_INDEX_URL or PIP_QUIET); they'll
-    # take precedence.
-    opts = dist.get_option_dict('easy_install')
-    if 'allow_hosts' in opts:
-        raise DistutilsError(
-            'the `allow-hosts` option is not supported '
-            'when using pip to install requirements.'
-        )
-    quiet = 'PIP_QUIET' not in os.environ and 'PIP_VERBOSE' not in os.environ
-    if 'PIP_INDEX_URL' in os.environ:
-        index_url = None
-    elif 'index_url' in opts:
-        index_url = opts['index_url'][1]
-    else:
-        index_url = None
-    find_links = (
-        _fixup_find_links(opts['find_links'][1])[:] if 'find_links' in opts else []
-    )
-    if dist.dependency_links:
-        find_links.extend(dist.dependency_links)
-    eggs_dir = os.path.realpath(dist.get_egg_cache_dir())
-    cached_dists = metadata.Distribution.discover(path=glob.glob(f'{eggs_dir}/*.egg'))
-    for egg_dist in cached_dists:
-        if _dist_matches_req(egg_dist, req):
-            return egg_dist
-    with tempfile.TemporaryDirectory() as tmpdir:
-        cmd = [
-            sys.executable,
-            '-m',
-            'pip',
-            '--disable-pip-version-check',
-            'wheel',
-            '--no-deps',
-            '-w',
-            tmpdir,
-        ]
-        if quiet:
-            cmd.append('--quiet')
-        if index_url is not None:
-            cmd.extend(('--index-url', index_url))
-        for link in find_links or []:
-            cmd.extend(('--find-links', link))
-        # If requirement is a PEP 508 direct URL, directly pass
-        # the URL to pip, as `req @ url` does not work on the
-        # command line.
-        cmd.append(req.url or str(req))
-        try:
-            subprocess.check_call(cmd)
-        except subprocess.CalledProcessError as e:
-            raise DistutilsError(str(e)) from e
-        wheel = Wheel(glob.glob(os.path.join(tmpdir, '*.whl'))[0])
-        dist_location = os.path.join(eggs_dir, wheel.egg_name())
-        wheel.install_as_egg(dist_location)
-        return metadata.Distribution.at(dist_location + '/EGG-INFO')
-
-
-def strip_marker(req) -> packaging.requirements.Requirement:
-    """
-    Return a new requirement without the environment marker to avoid
-    calling pip with something like `babel; extra == "i18n"`, which
-    would always be ignored.
-    """
-    # create a copy to avoid mutating the input
-    req = packaging.requirements.Requirement(str(req))
-    req.marker = None
-    return req
-
-
-def _warn_wheel_not_available(dist):
-    try:
-        metadata.distribution('wheel')
-    except metadata.PackageNotFoundError:
-        dist.announce('WARNING: The wheel package is not available.', log.WARN)
-
-
-class _DeprecatedInstaller(SetuptoolsDeprecationWarning):
-    _SUMMARY = "setuptools.installer and fetch_build_eggs are deprecated."
-    _DETAILS = """
-    Requirements should be satisfied by a PEP 517 installer.
-    If you are using pip, you can try `pip install --use-pep517`.
-    """
-    _DUE_DATE = 2025, 10, 31
diff --git a/voxvera/vendor/setuptools/launch.py b/voxvera/vendor/setuptools/launch.py
deleted file mode 100644
index 0d16264..0000000
--- a/voxvera/vendor/setuptools/launch.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Launch the Python script on the command line after
-setuptools is bootstrapped via import.
-"""
-
-# Note that setuptools gets imported implicitly by the
-# invocation of this script using python -m setuptools.launch
-
-import sys
-import tokenize
-
-
-def run() -> None:
-    """
-    Run the script in sys.argv[1] as if it had
-    been invoked naturally.
-    """
-    __builtins__
-    script_name = sys.argv[1]
-    namespace = dict(
-        __file__=script_name,
-        __name__='__main__',
-        __doc__=None,
-    )
-    sys.argv[:] = sys.argv[1:]
-
-    open_ = getattr(tokenize, 'open', open)
-    with open_(script_name) as fid:
-        script = fid.read()
-    norm_script = script.replace('\\r\\n', '\\n')
-    code = compile(norm_script, script_name, 'exec')
-    exec(code, namespace)
-
-
-if __name__ == '__main__':
-    run()
diff --git a/voxvera/vendor/setuptools/launcher manifest.xml b/voxvera/vendor/setuptools/launcher manifest.xml
deleted file mode 100644
index 5972a96..0000000
--- a/voxvera/vendor/setuptools/launcher manifest.xml	
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-    
-    
-    
-        
-            
-                
-            
-        
-    
-
diff --git a/voxvera/vendor/setuptools/logging.py b/voxvera/vendor/setuptools/logging.py
deleted file mode 100644
index 532da89..0000000
--- a/voxvera/vendor/setuptools/logging.py
+++ /dev/null
@@ -1,40 +0,0 @@
-import inspect
-import logging
-import sys
-
-from . import monkey
-
-import distutils.log
-
-
-def _not_warning(record):
-    return record.levelno < logging.WARNING
-
-
-def configure() -> None:
-    """
-    Configure logging to emit warning and above to stderr
-    and everything else to stdout. This behavior is provided
-    for compatibility with distutils.log but may change in
-    the future.
-    """
-    err_handler = logging.StreamHandler()
-    err_handler.setLevel(logging.WARNING)
-    out_handler = logging.StreamHandler(sys.stdout)
-    out_handler.addFilter(_not_warning)
-    handlers = err_handler, out_handler
-    logging.basicConfig(
-        format="{message}", style='{', handlers=handlers, level=logging.DEBUG
-    )
-    if inspect.ismodule(distutils.dist.log):
-        monkey.patch_func(set_threshold, distutils.log, 'set_threshold')
-        # For some reason `distutils.log` module is getting cached in `distutils.dist`
-        # and then loaded again when patched,
-        # implying: id(distutils.log) != id(distutils.dist.log).
-        # Make sure the same module object is used everywhere:
-        distutils.dist.log = distutils.log
-
-
-def set_threshold(level: int) -> int:
-    logging.root.setLevel(level * 10)
-    return set_threshold.unpatched(level)
diff --git a/voxvera/vendor/setuptools/modified.py b/voxvera/vendor/setuptools/modified.py
deleted file mode 100644
index 6ba02fa..0000000
--- a/voxvera/vendor/setuptools/modified.py
+++ /dev/null
@@ -1,18 +0,0 @@
-try:
-    # Ensure a DistutilsError raised by these methods is the same as distutils.errors.DistutilsError
-    from distutils._modified import (
-        newer,
-        newer_group,
-        newer_pairwise,
-        newer_pairwise_group,
-    )
-except ImportError:
-    # fallback for SETUPTOOLS_USE_DISTUTILS=stdlib, because _modified never existed in stdlib
-    from ._distutils._modified import (
-        newer,
-        newer_group,
-        newer_pairwise,
-        newer_pairwise_group,
-    )
-
-__all__ = ['newer', 'newer_pairwise', 'newer_group', 'newer_pairwise_group']
diff --git a/voxvera/vendor/setuptools/monkey.py b/voxvera/vendor/setuptools/monkey.py
deleted file mode 100644
index 24bb818..0000000
--- a/voxvera/vendor/setuptools/monkey.py
+++ /dev/null
@@ -1,126 +0,0 @@
-"""
-Monkey patching of distutils.
-"""
-
-from __future__ import annotations
-
-import inspect
-import platform
-import sys
-import types
-from typing import TypeVar, cast, overload
-
-import distutils.filelist
-
-_T = TypeVar("_T")
-_UnpatchT = TypeVar("_UnpatchT", type, types.FunctionType)
-
-
-__all__: list[str] = []
-"""
-Everything is private. Contact the project team
-if you think you need this functionality.
-"""
-
-
-def _get_mro(cls):
-    """
-    Returns the bases classes for cls sorted by the MRO.
-
-    Works around an issue on Jython where inspect.getmro will not return all
-    base classes if multiple classes share the same name. Instead, this
-    function will return a tuple containing the class itself, and the contents
-    of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024.
-    """
-    if platform.python_implementation() == "Jython":
-        return (cls,) + cls.__bases__
-    return inspect.getmro(cls)
-
-
-@overload
-def get_unpatched(item: _UnpatchT) -> _UnpatchT: ...
-@overload
-def get_unpatched(item: object) -> None: ...
-def get_unpatched(
-    item: type | types.FunctionType | object,
-) -> type | types.FunctionType | None:
-    if isinstance(item, type):
-        return get_unpatched_class(item)
-    if isinstance(item, types.FunctionType):
-        return get_unpatched_function(item)
-    return None
-
-
-def get_unpatched_class(cls: type[_T]) -> type[_T]:
-    """Protect against re-patching the distutils if reloaded
-
-    Also ensures that no other distutils extension monkeypatched the distutils
-    first.
-    """
-    external_bases = (
-        cast(type[_T], cls)
-        for cls in _get_mro(cls)
-        if not cls.__module__.startswith('setuptools')
-    )
-    base = next(external_bases)
-    if not base.__module__.startswith('distutils'):
-        msg = f"distutils has already been patched by {cls!r}"
-        raise AssertionError(msg)
-    return base
-
-
-def patch_all() -> None:
-    import setuptools
-
-    # we can't patch distutils.cmd, alas
-    distutils.core.Command = setuptools.Command  # type: ignore[misc,assignment] # monkeypatching
-
-    _patch_distribution_metadata()
-
-    # Install Distribution throughout the distutils
-    for module in distutils.dist, distutils.core, distutils.cmd:
-        module.Distribution = setuptools.dist.Distribution
-
-    # Install the patched Extension
-    distutils.core.Extension = setuptools.extension.Extension  # type: ignore[misc,assignment] # monkeypatching
-    distutils.extension.Extension = setuptools.extension.Extension  # type: ignore[misc,assignment] # monkeypatching
-    if 'distutils.command.build_ext' in sys.modules:
-        sys.modules[
-            'distutils.command.build_ext'
-        ].Extension = setuptools.extension.Extension
-
-
-def _patch_distribution_metadata():
-    from . import _core_metadata
-
-    """Patch write_pkg_file and read_pkg_file for higher metadata standards"""
-    for attr in (
-        'write_pkg_info',
-        'write_pkg_file',
-        'read_pkg_file',
-        'get_metadata_version',
-        'get_fullname',
-    ):
-        new_val = getattr(_core_metadata, attr)
-        setattr(distutils.dist.DistributionMetadata, attr, new_val)
-
-
-def patch_func(replacement, target_mod, func_name) -> None:
-    """
-    Patch func_name in target_mod with replacement
-
-    Important - original must be resolved by name to avoid
-    patching an already patched function.
-    """
-    original = getattr(target_mod, func_name)
-
-    # set the 'unpatched' attribute on the replacement to
-    # point to the original.
-    vars(replacement).setdefault('unpatched', original)
-
-    # replace the function in the original module
-    setattr(target_mod, func_name, replacement)
-
-
-def get_unpatched_function(candidate):
-    return candidate.unpatched
diff --git a/voxvera/vendor/setuptools/msvc.py b/voxvera/vendor/setuptools/msvc.py
deleted file mode 100644
index f506c82..0000000
--- a/voxvera/vendor/setuptools/msvc.py
+++ /dev/null
@@ -1,1557 +0,0 @@
-"""
-Environment info about Microsoft Compilers.
-
->>> getfixture('windows_only')
->>> ei = EnvironmentInfo('amd64')
-"""
-
-from __future__ import annotations
-
-import contextlib
-import itertools
-import json
-import os
-import os.path
-import platform
-from typing import TYPE_CHECKING, TypedDict, overload
-
-from more_itertools import unique_everseen
-
-from ._path import StrPath
-from .compat import py310
-
-import distutils.errors
-
-if TYPE_CHECKING:
-    from typing_extensions import LiteralString, NotRequired
-
-# https://github.com/python/mypy/issues/8166
-if not TYPE_CHECKING and platform.system() == 'Windows':
-    import winreg
-    from os import environ
-else:
-    # Mock winreg and environ so the module can be imported on this platform.
-
-    class winreg:
-        HKEY_USERS = None
-        HKEY_CURRENT_USER = None
-        HKEY_LOCAL_MACHINE = None
-        HKEY_CLASSES_ROOT = None
-
-    environ: dict[str, str] = dict()
-
-
-class PlatformInfo:
-    """
-    Current and Target Architectures information.
-
-    Parameters
-    ----------
-    arch: str
-        Target architecture.
-    """
-
-    current_cpu = environ.get('processor_architecture', '').lower()
-
-    def __init__(self, arch: str) -> None:
-        self.arch = arch.lower().replace('x64', 'amd64')
-
-    @property
-    def target_cpu(self) -> str:
-        """
-        Return Target CPU architecture.
-
-        Return
-        ------
-        str
-            Target CPU
-        """
-        return self.arch[self.arch.find('_') + 1 :]
-
-    def target_is_x86(self) -> bool:
-        """
-        Return True if target CPU is x86 32 bits..
-
-        Return
-        ------
-        bool
-            CPU is x86 32 bits
-        """
-        return self.target_cpu == 'x86'
-
-    def current_is_x86(self) -> bool:
-        """
-        Return True if current CPU is x86 32 bits..
-
-        Return
-        ------
-        bool
-            CPU is x86 32 bits
-        """
-        return self.current_cpu == 'x86'
-
-    def current_dir(self, hidex86=False, x64=False) -> str:
-        """
-        Current platform specific subfolder.
-
-        Parameters
-        ----------
-        hidex86: bool
-            return '' and not '\x86' if architecture is x86.
-        x64: bool
-            return '\x64' and not '\amd64' if architecture is amd64.
-
-        Return
-        ------
-        str
-            subfolder: '\target', or '' (see hidex86 parameter)
-        """
-        return (
-            ''
-            if (self.current_cpu == 'x86' and hidex86)
-            else r'\x64'
-            if (self.current_cpu == 'amd64' and x64)
-            else rf'\{self.current_cpu}'
-        )
-
-    def target_dir(self, hidex86=False, x64=False) -> str:
-        r"""
-        Target platform specific subfolder.
-
-        Parameters
-        ----------
-        hidex86: bool
-            return '' and not '\x86' if architecture is x86.
-        x64: bool
-            return '\x64' and not '\amd64' if architecture is amd64.
-
-        Return
-        ------
-        str
-            subfolder: '\current', or '' (see hidex86 parameter)
-        """
-        return (
-            ''
-            if (self.target_cpu == 'x86' and hidex86)
-            else r'\x64'
-            if (self.target_cpu == 'amd64' and x64)
-            else rf'\{self.target_cpu}'
-        )
-
-    def cross_dir(self, forcex86=False) -> str:
-        r"""
-        Cross platform specific subfolder.
-
-        Parameters
-        ----------
-        forcex86: bool
-            Use 'x86' as current architecture even if current architecture is
-            not x86.
-
-        Return
-        ------
-        str
-            subfolder: '' if target architecture is current architecture,
-            '\current_target' if not.
-        """
-        current = 'x86' if forcex86 else self.current_cpu
-        return (
-            ''
-            if self.target_cpu == current
-            else self.target_dir().replace('\\', f'\\{current}_')
-        )
-
-
-class RegistryInfo:
-    """
-    Microsoft Visual Studio related registry information.
-
-    Parameters
-    ----------
-    platform_info: PlatformInfo
-        "PlatformInfo" instance.
-    """
-
-    HKEYS = (
-        winreg.HKEY_USERS,
-        winreg.HKEY_CURRENT_USER,
-        winreg.HKEY_LOCAL_MACHINE,
-        winreg.HKEY_CLASSES_ROOT,
-    )
-
-    def __init__(self, platform_info: PlatformInfo) -> None:
-        self.pi = platform_info
-
-    @property
-    def visualstudio(self) -> LiteralString:
-        """
-        Microsoft Visual Studio root registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return 'VisualStudio'
-
-    @property
-    def sxs(self) -> LiteralString:
-        """
-        Microsoft Visual Studio SxS registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return os.path.join(self.visualstudio, 'SxS')
-
-    @property
-    def vc(self) -> LiteralString:
-        """
-        Microsoft Visual C++ VC7 registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return os.path.join(self.sxs, 'VC7')
-
-    @property
-    def vs(self) -> LiteralString:
-        """
-        Microsoft Visual Studio VS7 registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return os.path.join(self.sxs, 'VS7')
-
-    @property
-    def vc_for_python(self) -> LiteralString:
-        """
-        Microsoft Visual C++ for Python registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return r'DevDiv\VCForPython'
-
-    @property
-    def microsoft_sdk(self) -> LiteralString:
-        """
-        Microsoft SDK registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return 'Microsoft SDKs'
-
-    @property
-    def windows_sdk(self) -> LiteralString:
-        """
-        Microsoft Windows/Platform SDK registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return os.path.join(self.microsoft_sdk, 'Windows')
-
-    @property
-    def netfx_sdk(self) -> LiteralString:
-        """
-        Microsoft .NET Framework SDK registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return os.path.join(self.microsoft_sdk, 'NETFXSDK')
-
-    @property
-    def windows_kits_roots(self) -> LiteralString:
-        """
-        Microsoft Windows Kits Roots registry key.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        return r'Windows Kits\Installed Roots'
-
-    @overload
-    def microsoft(self, key: LiteralString, x86: bool = False) -> LiteralString: ...
-    @overload
-    def microsoft(self, key: str, x86: bool = False) -> str: ...  # type: ignore[misc]
-    def microsoft(self, key: str, x86: bool = False) -> str:
-        """
-        Return key in Microsoft software registry.
-
-        Parameters
-        ----------
-        key: str
-            Registry key path where look.
-        x86: bool
-            Force x86 software registry.
-
-        Return
-        ------
-        str
-            Registry key
-        """
-        node64 = '' if self.pi.current_is_x86() or x86 else 'Wow6432Node'
-        return os.path.join('Software', node64, 'Microsoft', key)
-
-    def lookup(self, key: str, name: str) -> str | None:
-        """
-        Look for values in registry in Microsoft software registry.
-
-        Parameters
-        ----------
-        key: str
-            Registry key path where look.
-        name: str
-            Value name to find.
-
-        Return
-        ------
-        str | None
-            value
-        """
-        key_read = winreg.KEY_READ
-        openkey = winreg.OpenKey
-        closekey = winreg.CloseKey
-        ms = self.microsoft
-        for hkey in self.HKEYS:
-            bkey = None
-            try:
-                bkey = openkey(hkey, ms(key), 0, key_read)
-            except OSError:
-                if not self.pi.current_is_x86():
-                    try:
-                        bkey = openkey(hkey, ms(key, True), 0, key_read)
-                    except OSError:
-                        continue
-                else:
-                    continue
-            try:
-                return winreg.QueryValueEx(bkey, name)[0]
-            except OSError:
-                pass
-            finally:
-                if bkey:
-                    closekey(bkey)
-        return None
-
-
-class SystemInfo:
-    """
-    Microsoft Windows and Visual Studio related system information.
-
-    Parameters
-    ----------
-    registry_info: RegistryInfo
-        "RegistryInfo" instance.
-    vc_ver: float
-        Required Microsoft Visual C++ version.
-    """
-
-    # Variables and properties in this class use originals CamelCase variables
-    # names from Microsoft source files for more easy comparison.
-    WinDir = environ.get('WinDir', '')
-    ProgramFiles = environ.get('ProgramFiles', '')
-    ProgramFilesx86 = environ.get('ProgramFiles(x86)', ProgramFiles)
-
-    def __init__(
-        self, registry_info: RegistryInfo, vc_ver: float | None = None
-    ) -> None:
-        self.ri = registry_info
-        self.pi = self.ri.pi
-
-        self.known_vs_paths = self.find_programdata_vs_vers()
-
-        # Except for VS15+, VC version is aligned with VS version
-        self.vs_ver = self.vc_ver = vc_ver or self._find_latest_available_vs_ver()
-
-    def _find_latest_available_vs_ver(self):
-        """
-        Find the latest VC version
-
-        Return
-        ------
-        float
-            version
-        """
-        reg_vc_vers = self.find_reg_vs_vers()
-
-        if not (reg_vc_vers or self.known_vs_paths):
-            raise distutils.errors.DistutilsPlatformError(
-                'No Microsoft Visual C++ version found'
-            )
-
-        vc_vers = set(reg_vc_vers)
-        vc_vers.update(self.known_vs_paths)
-        return max(vc_vers)
-
-    def find_reg_vs_vers(self) -> list[float]:
-        """
-        Find Microsoft Visual Studio versions available in registry.
-
-        Return
-        ------
-        list of float
-            Versions
-        """
-        ms = self.ri.microsoft
-        vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs)
-        vs_vers = []
-        for hkey, key in itertools.product(self.ri.HKEYS, vckeys):
-            try:
-                bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ)
-            except OSError:
-                continue
-            with bkey:
-                subkeys, values, _ = winreg.QueryInfoKey(bkey)
-                for i in range(values):
-                    with contextlib.suppress(ValueError):
-                        ver = float(winreg.EnumValue(bkey, i)[0])
-                        if ver not in vs_vers:
-                            vs_vers.append(ver)
-                for i in range(subkeys):
-                    with contextlib.suppress(ValueError):
-                        ver = float(winreg.EnumKey(bkey, i))
-                        if ver not in vs_vers:
-                            vs_vers.append(ver)
-        return sorted(vs_vers)
-
-    def find_programdata_vs_vers(self) -> dict[float, str]:
-        r"""
-        Find Visual studio 2017+ versions from information in
-        "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances".
-
-        Return
-        ------
-        dict
-            float version as key, path as value.
-        """
-        vs_versions: dict[float, str] = {}
-        instances_dir = r'C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances'
-
-        try:
-            hashed_names = os.listdir(instances_dir)
-
-        except OSError:
-            # Directory not exists with all Visual Studio versions
-            return vs_versions
-
-        for name in hashed_names:
-            try:
-                # Get VS installation path from "state.json" file
-                state_path = os.path.join(instances_dir, name, 'state.json')
-                with open(state_path, 'rt', encoding='utf-8') as state_file:
-                    state = json.load(state_file)
-                vs_path = state['installationPath']
-
-                # Raises OSError if this VS installation does not contain VC
-                os.listdir(os.path.join(vs_path, r'VC\Tools\MSVC'))
-
-                # Store version and path
-                vs_versions[self._as_float_version(state['installationVersion'])] = (
-                    vs_path
-                )
-
-            except (OSError, KeyError):
-                # Skip if "state.json" file is missing or bad format
-                continue
-
-        return vs_versions
-
-    @staticmethod
-    def _as_float_version(version):
-        """
-        Return a string version as a simplified float version (major.minor)
-
-        Parameters
-        ----------
-        version: str
-            Version.
-
-        Return
-        ------
-        float
-            version
-        """
-        return float('.'.join(version.split('.')[:2]))
-
-    @property
-    def VSInstallDir(self) -> str:
-        """
-        Microsoft Visual Studio directory.
-
-        Return
-        ------
-        str
-            path
-        """
-        # Default path
-        default = os.path.join(
-            self.ProgramFilesx86, f'Microsoft Visual Studio {self.vs_ver:0.1f}'
-        )
-
-        # Try to get path from registry, if fail use default path
-        return self.ri.lookup(self.ri.vs, f'{self.vs_ver:0.1f}') or default
-
-    @property
-    def VCInstallDir(self) -> str:
-        """
-        Microsoft Visual C++ directory.
-
-        Return
-        ------
-        str
-            path
-        """
-        path = self._guess_vc() or self._guess_vc_legacy()
-
-        if not os.path.isdir(path):
-            msg = 'Microsoft Visual C++ directory not found'
-            raise distutils.errors.DistutilsPlatformError(msg)
-
-        return path
-
-    def _guess_vc(self):
-        """
-        Locate Visual C++ for VS2017+.
-
-        Return
-        ------
-        str
-            path
-        """
-        if self.vs_ver <= 14.0:
-            return ''
-
-        try:
-            # First search in known VS paths
-            vs_dir = self.known_vs_paths[self.vs_ver]
-        except KeyError:
-            # Else, search with path from registry
-            vs_dir = self.VSInstallDir
-
-        guess_vc = os.path.join(vs_dir, r'VC\Tools\MSVC')
-
-        # Subdir with VC exact version as name
-        try:
-            # Update the VC version with real one instead of VS version
-            vc_ver = os.listdir(guess_vc)[-1]
-            self.vc_ver = self._as_float_version(vc_ver)
-            return os.path.join(guess_vc, vc_ver)
-        except (OSError, IndexError):
-            return ''
-
-    def _guess_vc_legacy(self):
-        """
-        Locate Visual C++ for versions prior to 2017.
-
-        Return
-        ------
-        str
-            path
-        """
-        default = os.path.join(
-            self.ProgramFilesx86,
-            rf'Microsoft Visual Studio {self.vs_ver:0.1f}\VC',
-        )
-
-        # Try to get "VC++ for Python" path from registry as default path
-        reg_path = os.path.join(self.ri.vc_for_python, f'{self.vs_ver:0.1f}')
-        python_vc = self.ri.lookup(reg_path, 'installdir')
-        default_vc = os.path.join(python_vc, 'VC') if python_vc else default
-
-        # Try to get path from registry, if fail use default path
-        return self.ri.lookup(self.ri.vc, f'{self.vs_ver:0.1f}') or default_vc
-
-    @property
-    def WindowsSdkVersion(self) -> tuple[LiteralString, ...]:
-        """
-        Microsoft Windows SDK versions for specified MSVC++ version.
-
-        Return
-        ------
-        tuple of str
-            versions
-        """
-        if self.vs_ver <= 9.0:
-            return '7.0', '6.1', '6.0a'
-        elif self.vs_ver == 10.0:
-            return '7.1', '7.0a'
-        elif self.vs_ver == 11.0:
-            return '8.0', '8.0a'
-        elif self.vs_ver == 12.0:
-            return '8.1', '8.1a'
-        elif self.vs_ver >= 14.0:
-            return '10.0', '8.1'
-        return ()
-
-    @property
-    def WindowsSdkLastVersion(self) -> str:
-        """
-        Microsoft Windows SDK last version.
-
-        Return
-        ------
-        str
-            version
-        """
-        return self._use_last_dir_name(os.path.join(self.WindowsSdkDir, 'lib'))
-
-    @property
-    def WindowsSdkDir(self) -> str:  # noqa: C901  # is too complex (12)  # FIXME
-        """
-        Microsoft Windows SDK directory.
-
-        Return
-        ------
-        str
-            path
-        """
-        sdkdir: str | None = ''
-        for ver in self.WindowsSdkVersion:
-            # Try to get it from registry
-            loc = os.path.join(self.ri.windows_sdk, f'v{ver}')
-            sdkdir = self.ri.lookup(loc, 'installationfolder')
-            if sdkdir:
-                break
-        if not sdkdir or not os.path.isdir(sdkdir):
-            # Try to get "VC++ for Python" version from registry
-            path = os.path.join(self.ri.vc_for_python, f'{self.vc_ver:0.1f}')
-            install_base = self.ri.lookup(path, 'installdir')
-            if install_base:
-                sdkdir = os.path.join(install_base, 'WinSDK')
-        if not sdkdir or not os.path.isdir(sdkdir):
-            # If fail, use default new path
-            for ver in self.WindowsSdkVersion:
-                intver = ver[: ver.rfind('.')]
-                path = rf'Microsoft SDKs\Windows Kits\{intver}'
-                d = os.path.join(self.ProgramFiles, path)
-                if os.path.isdir(d):
-                    sdkdir = d
-        if not sdkdir or not os.path.isdir(sdkdir):
-            # If fail, use default old path
-            for ver in self.WindowsSdkVersion:
-                path = rf'Microsoft SDKs\Windows\v{ver}'
-                d = os.path.join(self.ProgramFiles, path)
-                if os.path.isdir(d):
-                    sdkdir = d
-        if not sdkdir:
-            # If fail, use Platform SDK
-            sdkdir = os.path.join(self.VCInstallDir, 'PlatformSDK')
-        return sdkdir
-
-    @property
-    def WindowsSDKExecutablePath(self) -> str | None:
-        """
-        Microsoft Windows SDK executable directory.
-
-        Return
-        ------
-        str | None
-            path
-        """
-        # Find WinSDK NetFx Tools registry dir name
-        if self.vs_ver <= 11.0:
-            netfxver = 35
-            arch = ''
-        else:
-            netfxver = 40
-            hidex86 = True if self.vs_ver <= 12.0 else False
-            arch = self.pi.current_dir(x64=True, hidex86=hidex86).replace('\\', '-')
-        fx = f'WinSDK-NetFx{netfxver}Tools{arch}'
-
-        # list all possibles registry paths
-        regpaths = []
-        if self.vs_ver >= 14.0:
-            for ver in self.NetFxSdkVersion:
-                regpaths += [os.path.join(self.ri.netfx_sdk, ver, fx)]
-
-        for ver in self.WindowsSdkVersion:
-            regpaths += [os.path.join(self.ri.windows_sdk, f'v{ver}A', fx)]
-
-        # Return installation folder from the more recent path
-        for path in regpaths:
-            execpath = self.ri.lookup(path, 'installationfolder')
-            if execpath:
-                return execpath
-
-        return None
-
-    @property
-    def FSharpInstallDir(self) -> str:
-        """
-        Microsoft Visual F# directory.
-
-        Return
-        ------
-        str
-            path
-        """
-        path = os.path.join(self.ri.visualstudio, rf'{self.vs_ver:0.1f}\Setup\F#')
-        return self.ri.lookup(path, 'productdir') or ''
-
-    @property
-    def UniversalCRTSdkDir(self) -> str | None:
-        """
-        Microsoft Universal CRT SDK directory.
-
-        Return
-        ------
-        str | None
-            path
-        """
-        # Set Kit Roots versions for specified MSVC++ version
-        vers = ('10', '81') if self.vs_ver >= 14.0 else ()
-
-        # Find path of the more recent Kit
-        for ver in vers:
-            sdkdir = self.ri.lookup(self.ri.windows_kits_roots, f'kitsroot{ver}')
-            if sdkdir:
-                return sdkdir
-
-        return None
-
-    @property
-    def UniversalCRTSdkLastVersion(self) -> str:
-        """
-        Microsoft Universal C Runtime SDK last version.
-
-        Return
-        ------
-        str
-            version
-        """
-        try:
-            return self._use_last_dir_name(os.path.join(self.UniversalCRTSdkDir, 'lib'))  # type: ignore[arg-type] # Expected TypeError
-        except TypeError as ex:
-            py310.add_note(ex, "Cannot find UniversalCRTSdkDir")
-            raise
-
-    @property
-    def NetFxSdkVersion(self) -> tuple[LiteralString, ...]:
-        """
-        Microsoft .NET Framework SDK versions.
-
-        Return
-        ------
-        tuple of str
-            versions
-        """
-        # Set FxSdk versions for specified VS version
-        return (
-            ('4.7.2', '4.7.1', '4.7', '4.6.2', '4.6.1', '4.6', '4.5.2', '4.5.1', '4.5')
-            if self.vs_ver >= 14.0
-            else ()
-        )
-
-    @property
-    def NetFxSdkDir(self) -> str | None:
-        """
-        Microsoft .NET Framework SDK directory.
-
-        Return
-        ------
-        str | None
-            path
-        """
-        sdkdir: str | None = ''
-        for ver in self.NetFxSdkVersion:
-            loc = os.path.join(self.ri.netfx_sdk, ver)
-            sdkdir = self.ri.lookup(loc, 'kitsinstallationfolder')
-            if sdkdir:
-                break
-        return sdkdir
-
-    @property
-    def FrameworkDir32(self) -> str:
-        """
-        Microsoft .NET Framework 32bit directory.
-
-        Return
-        ------
-        str
-            path
-        """
-        # Default path
-        guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework')
-
-        # Try to get path from registry, if fail use default path
-        return self.ri.lookup(self.ri.vc, 'frameworkdir32') or guess_fw
-
-    @property
-    def FrameworkDir64(self) -> str:
-        """
-        Microsoft .NET Framework 64bit directory.
-
-        Return
-        ------
-        str
-            path
-        """
-        # Default path
-        guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework64')
-
-        # Try to get path from registry, if fail use default path
-        return self.ri.lookup(self.ri.vc, 'frameworkdir64') or guess_fw
-
-    @property
-    def FrameworkVersion32(self) -> tuple[str, ...]:
-        """
-        Microsoft .NET Framework 32bit versions.
-
-        Return
-        ------
-        tuple of str
-            versions
-        """
-        return self._find_dot_net_versions(32)
-
-    @property
-    def FrameworkVersion64(self) -> tuple[str, ...]:
-        """
-        Microsoft .NET Framework 64bit versions.
-
-        Return
-        ------
-        tuple of str
-            versions
-        """
-        return self._find_dot_net_versions(64)
-
-    def _find_dot_net_versions(self, bits) -> tuple[str, ...]:
-        """
-        Find Microsoft .NET Framework versions.
-
-        Parameters
-        ----------
-        bits: int
-            Platform number of bits: 32 or 64.
-
-        Return
-        ------
-        tuple of str
-            versions
-        """
-        # Find actual .NET version in registry
-        reg_ver = self.ri.lookup(self.ri.vc, f'frameworkver{bits}')
-        dot_net_dir = getattr(self, f'FrameworkDir{bits}')
-        ver = reg_ver or self._use_last_dir_name(dot_net_dir, 'v') or ''
-
-        # Set .NET versions for specified MSVC++ version
-        if self.vs_ver >= 12.0:
-            return ver, 'v4.0'
-        elif self.vs_ver >= 10.0:
-            return 'v4.0.30319' if ver.lower()[:2] != 'v4' else ver, 'v3.5'
-        elif self.vs_ver == 9.0:
-            return 'v3.5', 'v2.0.50727'
-        elif self.vs_ver == 8.0:
-            return 'v3.0', 'v2.0.50727'
-        return ()
-
-    @staticmethod
-    def _use_last_dir_name(path: StrPath, prefix: str = '') -> str:
-        """
-        Return name of the last dir in path or '' if no dir found.
-
-        Parameters
-        ----------
-        path: StrPath
-            Use dirs in this path
-        prefix: str
-            Use only dirs starting by this prefix
-
-        Return
-        ------
-        str
-            name
-        """
-        matching_dirs = (
-            dir_name
-            for dir_name in reversed(os.listdir(path))
-            if os.path.isdir(os.path.join(path, dir_name))
-            and dir_name.startswith(prefix)
-        )
-        return next(matching_dirs, '')
-
-
-class _EnvironmentDict(TypedDict):
-    include: str
-    lib: str
-    libpath: str
-    path: str
-    py_vcruntime_redist: NotRequired[str | None]
-
-
-class EnvironmentInfo:
-    """
-    Return environment variables for specified Microsoft Visual C++ version
-    and platform : Lib, Include, Path and libpath.
-
-    This function is compatible with Microsoft Visual C++ 9.0 to 14.X.
-
-    Script created by analysing Microsoft environment configuration files like
-    "vcvars[...].bat", "SetEnv.Cmd", "vcbuildtools.bat", ...
-
-    Parameters
-    ----------
-    arch: str
-        Target architecture.
-    vc_ver: float
-        Required Microsoft Visual C++ version. If not set, autodetect the last
-        version.
-    vc_min_ver: float
-        Minimum Microsoft Visual C++ version.
-    """
-
-    # Variables and properties in this class use originals CamelCase variables
-    # names from Microsoft source files for more easy comparison.
-
-    def __init__(self, arch, vc_ver=None, vc_min_ver=0) -> None:
-        self.pi = PlatformInfo(arch)
-        self.ri = RegistryInfo(self.pi)
-        self.si = SystemInfo(self.ri, vc_ver)
-
-        if self.vc_ver < vc_min_ver:
-            err = 'No suitable Microsoft Visual C++ version found'
-            raise distutils.errors.DistutilsPlatformError(err)
-
-    @property
-    def vs_ver(self):
-        """
-        Microsoft Visual Studio.
-
-        Return
-        ------
-        float
-            version
-        """
-        return self.si.vs_ver
-
-    @property
-    def vc_ver(self):
-        """
-        Microsoft Visual C++ version.
-
-        Return
-        ------
-        float
-            version
-        """
-        return self.si.vc_ver
-
-    @property
-    def VSTools(self):
-        """
-        Microsoft Visual Studio Tools.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        paths = [r'Common7\IDE', r'Common7\Tools']
-
-        if self.vs_ver >= 14.0:
-            arch_subdir = self.pi.current_dir(hidex86=True, x64=True)
-            paths += [r'Common7\IDE\CommonExtensions\Microsoft\TestWindow']
-            paths += [r'Team Tools\Performance Tools']
-            paths += [rf'Team Tools\Performance Tools{arch_subdir}']
-
-        return [os.path.join(self.si.VSInstallDir, path) for path in paths]
-
-    @property
-    def VCIncludes(self):
-        """
-        Microsoft Visual C++ & Microsoft Foundation Class Includes.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        return [
-            os.path.join(self.si.VCInstallDir, 'Include'),
-            os.path.join(self.si.VCInstallDir, r'ATLMFC\Include'),
-        ]
-
-    @property
-    def VCLibraries(self):
-        """
-        Microsoft Visual C++ & Microsoft Foundation Class Libraries.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver >= 15.0:
-            arch_subdir = self.pi.target_dir(x64=True)
-        else:
-            arch_subdir = self.pi.target_dir(hidex86=True)
-        paths = [f'Lib{arch_subdir}', rf'ATLMFC\Lib{arch_subdir}']
-
-        if self.vs_ver >= 14.0:
-            paths += [rf'Lib\store{arch_subdir}']
-
-        return [os.path.join(self.si.VCInstallDir, path) for path in paths]
-
-    @property
-    def VCStoreRefs(self):
-        """
-        Microsoft Visual C++ store references Libraries.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver < 14.0:
-            return []
-        return [os.path.join(self.si.VCInstallDir, r'Lib\store\references')]
-
-    @property
-    def VCTools(self):
-        """
-        Microsoft Visual C++ Tools.
-
-        Return
-        ------
-        list of str
-            paths
-
-        When host CPU is ARM, the tools should be found for ARM.
-
-        >>> getfixture('windows_only')
-        >>> mp = getfixture('monkeypatch')
-        >>> mp.setattr(PlatformInfo, 'current_cpu', 'arm64')
-        >>> ei = EnvironmentInfo(arch='irrelevant')
-        >>> paths = ei.VCTools
-        >>> any('HostARM64' in path for path in paths)
-        True
-        """
-        si = self.si
-        tools = [os.path.join(si.VCInstallDir, 'VCPackages')]
-
-        forcex86 = True if self.vs_ver <= 10.0 else False
-        arch_subdir = self.pi.cross_dir(forcex86)
-        if arch_subdir:
-            tools += [os.path.join(si.VCInstallDir, f'Bin{arch_subdir}')]
-
-        if self.vs_ver == 14.0:
-            path = f'Bin{self.pi.current_dir(hidex86=True)}'
-            tools += [os.path.join(si.VCInstallDir, path)]
-
-        elif self.vs_ver >= 15.0:
-            host_id = self.pi.current_cpu.replace('amd64', 'x64').upper()
-            host_dir = os.path.join('bin', f'Host{host_id}%s')
-            tools += [
-                os.path.join(si.VCInstallDir, host_dir % self.pi.target_dir(x64=True))
-            ]
-
-            if self.pi.current_cpu != self.pi.target_cpu:
-                tools += [
-                    os.path.join(
-                        si.VCInstallDir, host_dir % self.pi.current_dir(x64=True)
-                    )
-                ]
-
-        else:
-            tools += [os.path.join(si.VCInstallDir, 'Bin')]
-
-        return tools
-
-    @property
-    def OSLibraries(self):
-        """
-        Microsoft Windows SDK Libraries.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver <= 10.0:
-            arch_subdir = self.pi.target_dir(hidex86=True, x64=True)
-            return [os.path.join(self.si.WindowsSdkDir, f'Lib{arch_subdir}')]
-
-        else:
-            arch_subdir = self.pi.target_dir(x64=True)
-            lib = os.path.join(self.si.WindowsSdkDir, 'lib')
-            libver = self._sdk_subdir
-            return [os.path.join(lib, f'{libver}um{arch_subdir}')]
-
-    @property
-    def OSIncludes(self):
-        """
-        Microsoft Windows SDK Include.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        include = os.path.join(self.si.WindowsSdkDir, 'include')
-
-        if self.vs_ver <= 10.0:
-            return [include, os.path.join(include, 'gl')]
-
-        else:
-            if self.vs_ver >= 14.0:
-                sdkver = self._sdk_subdir
-            else:
-                sdkver = ''
-            return [
-                os.path.join(include, f'{sdkver}shared'),
-                os.path.join(include, f'{sdkver}um'),
-                os.path.join(include, f'{sdkver}winrt'),
-            ]
-
-    @property
-    def OSLibpath(self):
-        """
-        Microsoft Windows SDK Libraries Paths.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        ref = os.path.join(self.si.WindowsSdkDir, 'References')
-        libpath = []
-
-        if self.vs_ver <= 9.0:
-            libpath += self.OSLibraries
-
-        if self.vs_ver >= 11.0:
-            libpath += [os.path.join(ref, r'CommonConfiguration\Neutral')]
-
-        if self.vs_ver >= 14.0:
-            libpath += [
-                ref,
-                os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'),
-                os.path.join(ref, 'Windows.Foundation.UniversalApiContract', '1.0.0.0'),
-                os.path.join(ref, 'Windows.Foundation.FoundationContract', '1.0.0.0'),
-                os.path.join(
-                    ref, 'Windows.Networking.Connectivity.WwanContract', '1.0.0.0'
-                ),
-                os.path.join(
-                    self.si.WindowsSdkDir,
-                    'ExtensionSDKs',
-                    'Microsoft.VCLibs',
-                    f'{self.vs_ver:0.1f}',
-                    'References',
-                    'CommonConfiguration',
-                    'neutral',
-                ),
-            ]
-        return libpath
-
-    @property
-    def SdkTools(self):
-        """
-        Microsoft Windows SDK Tools.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        return list(self._sdk_tools())
-
-    def _sdk_tools(self):
-        """
-        Microsoft Windows SDK Tools paths generator.
-
-        Return
-        ------
-        generator of str
-            paths
-        """
-        if self.vs_ver < 15.0:
-            bin_dir = 'Bin' if self.vs_ver <= 11.0 else r'Bin\x86'
-            yield os.path.join(self.si.WindowsSdkDir, bin_dir)
-
-        if not self.pi.current_is_x86():
-            arch_subdir = self.pi.current_dir(x64=True)
-            path = f'Bin{arch_subdir}'
-            yield os.path.join(self.si.WindowsSdkDir, path)
-
-        if self.vs_ver in (10.0, 11.0):
-            if self.pi.target_is_x86():
-                arch_subdir = ''
-            else:
-                arch_subdir = self.pi.current_dir(hidex86=True, x64=True)
-            path = rf'Bin\NETFX 4.0 Tools{arch_subdir}'
-            yield os.path.join(self.si.WindowsSdkDir, path)
-
-        elif self.vs_ver >= 15.0:
-            path = os.path.join(self.si.WindowsSdkDir, 'Bin')
-            arch_subdir = self.pi.current_dir(x64=True)
-            sdkver = self.si.WindowsSdkLastVersion
-            yield os.path.join(path, f'{sdkver}{arch_subdir}')
-
-        if self.si.WindowsSDKExecutablePath:
-            yield self.si.WindowsSDKExecutablePath
-
-    @property
-    def _sdk_subdir(self) -> str:
-        """
-        Microsoft Windows SDK version subdir.
-
-        Return
-        ------
-        str
-            subdir
-        """
-        ucrtver = self.si.WindowsSdkLastVersion
-        return (f'{ucrtver}\\') if ucrtver else ''
-
-    @property
-    def SdkSetup(self):
-        """
-        Microsoft Windows SDK Setup.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver > 9.0:
-            return []
-
-        return [os.path.join(self.si.WindowsSdkDir, 'Setup')]
-
-    @property
-    def FxTools(self):
-        """
-        Microsoft .NET Framework Tools.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        pi = self.pi
-        si = self.si
-
-        if self.vs_ver <= 10.0:
-            include32 = True
-            include64 = not pi.target_is_x86() and not pi.current_is_x86()
-        else:
-            include32 = pi.target_is_x86() or pi.current_is_x86()
-            include64 = pi.current_cpu == 'amd64' or pi.target_cpu == 'amd64'
-
-        tools = []
-        if include32:
-            tools += [
-                os.path.join(si.FrameworkDir32, ver) for ver in si.FrameworkVersion32
-            ]
-        if include64:
-            tools += [
-                os.path.join(si.FrameworkDir64, ver) for ver in si.FrameworkVersion64
-            ]
-        return tools
-
-    @property
-    def NetFxSDKLibraries(self):
-        """
-        Microsoft .Net Framework SDK Libraries.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver < 14.0 or not self.si.NetFxSdkDir:
-            return []
-
-        arch_subdir = self.pi.target_dir(x64=True)
-        return [os.path.join(self.si.NetFxSdkDir, rf'lib\um{arch_subdir}')]
-
-    @property
-    def NetFxSDKIncludes(self):
-        """
-        Microsoft .Net Framework SDK Includes.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver < 14.0 or not self.si.NetFxSdkDir:
-            return []
-
-        return [os.path.join(self.si.NetFxSdkDir, r'include\um')]
-
-    @property
-    def VsTDb(self):
-        """
-        Microsoft Visual Studio Team System Database.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        return [os.path.join(self.si.VSInstallDir, r'VSTSDB\Deploy')]
-
-    @property
-    def MSBuild(self):
-        """
-        Microsoft Build Engine.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver < 12.0:
-            return []
-        elif self.vs_ver < 15.0:
-            base_path = self.si.ProgramFilesx86
-            arch_subdir = self.pi.current_dir(hidex86=True)
-        else:
-            base_path = self.si.VSInstallDir
-            arch_subdir = ''
-
-        path = rf'MSBuild\{self.vs_ver:0.1f}\bin{arch_subdir}'
-        build = [os.path.join(base_path, path)]
-
-        if self.vs_ver >= 15.0:
-            # Add Roslyn C# & Visual Basic Compiler
-            build += [os.path.join(base_path, path, 'Roslyn')]
-
-        return build
-
-    @property
-    def HTMLHelpWorkshop(self):
-        """
-        Microsoft HTML Help Workshop.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver < 11.0:
-            return []
-
-        return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop')]
-
-    @property
-    def UCRTLibraries(self) -> list[str]:
-        """
-        Microsoft Universal C Runtime SDK Libraries.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver < 14.0:
-            return []
-
-        arch_subdir = self.pi.target_dir(x64=True)
-        try:
-            lib = os.path.join(self.si.UniversalCRTSdkDir, 'lib')  # type: ignore[arg-type] # Expected TypeError
-        except TypeError as ex:
-            py310.add_note(ex, "Cannot find UniversalCRTSdkDir")
-            raise
-        ucrtver = self._ucrt_subdir
-        return [os.path.join(lib, f'{ucrtver}ucrt{arch_subdir}')]
-
-    @property
-    def UCRTIncludes(self) -> list[str]:
-        """
-        Microsoft Universal C Runtime SDK Include.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if self.vs_ver < 14.0:
-            return []
-
-        try:
-            include = os.path.join(self.si.UniversalCRTSdkDir, 'include')  # type: ignore[arg-type] # Expected TypeError
-        except TypeError as ex:
-            py310.add_note(ex, "Cannot find UniversalCRTSdkDir")
-            raise
-        return [os.path.join(include, f'{self._ucrt_subdir}ucrt')]
-
-    @property
-    def _ucrt_subdir(self) -> str:
-        """
-        Microsoft Universal C Runtime SDK version subdir.
-
-        Return
-        ------
-        str
-            subdir
-        """
-        ucrtver = self.si.UniversalCRTSdkLastVersion
-        return (f'{ucrtver}\\') if ucrtver else ''
-
-    @property
-    def FSharp(self):
-        """
-        Microsoft Visual F#.
-
-        Return
-        ------
-        list of str
-            paths
-        """
-        if 11.0 > self.vs_ver > 12.0:
-            return []
-
-        return [self.si.FSharpInstallDir]
-
-    @property
-    def VCRuntimeRedist(self) -> str | None:
-        """
-        Microsoft Visual C++ runtime redistributable dll.
-
-        Returns the first suitable path found or None.
-        """
-        vcruntime = f'vcruntime{self.vc_ver}0.dll'
-        arch_subdir = self.pi.target_dir(x64=True).strip('\\')
-
-        # Installation prefixes candidates
-        prefixes = []
-        tools_path = self.si.VCInstallDir
-        redist_path = os.path.dirname(tools_path.replace(r'\Tools', r'\Redist'))
-        if os.path.isdir(redist_path):
-            # Redist version may not be exactly the same as tools
-            redist_path = os.path.join(redist_path, os.listdir(redist_path)[-1])
-            prefixes += [redist_path, os.path.join(redist_path, 'onecore')]
-
-        prefixes += [os.path.join(tools_path, 'redist')]  # VS14 legacy path
-
-        # CRT directory
-        crt_dirs = (
-            f'Microsoft.VC{self.vc_ver * 10}.CRT',
-            # Sometime store in directory with VS version instead of VC
-            f'Microsoft.VC{int(self.vs_ver) * 10}.CRT',
-        )
-
-        # vcruntime path
-        candidate_paths = (
-            os.path.join(prefix, arch_subdir, crt_dir, vcruntime)
-            for (prefix, crt_dir) in itertools.product(prefixes, crt_dirs)
-        )
-        return next(filter(os.path.isfile, candidate_paths), None)  # type: ignore[arg-type] #python/mypy#12682
-
-    def return_env(self, exists: bool = True) -> _EnvironmentDict:
-        """
-        Return environment dict.
-
-        Parameters
-        ----------
-        exists: bool
-            It True, only return existing paths.
-
-        Return
-        ------
-        dict
-            environment
-        """
-        env = _EnvironmentDict(
-            include=self._build_paths(
-                'include',
-                [
-                    self.VCIncludes,
-                    self.OSIncludes,
-                    self.UCRTIncludes,
-                    self.NetFxSDKIncludes,
-                ],
-                exists,
-            ),
-            lib=self._build_paths(
-                'lib',
-                [
-                    self.VCLibraries,
-                    self.OSLibraries,
-                    self.FxTools,
-                    self.UCRTLibraries,
-                    self.NetFxSDKLibraries,
-                ],
-                exists,
-            ),
-            libpath=self._build_paths(
-                'libpath',
-                [self.VCLibraries, self.FxTools, self.VCStoreRefs, self.OSLibpath],
-                exists,
-            ),
-            path=self._build_paths(
-                'path',
-                [
-                    self.VCTools,
-                    self.VSTools,
-                    self.VsTDb,
-                    self.SdkTools,
-                    self.SdkSetup,
-                    self.FxTools,
-                    self.MSBuild,
-                    self.HTMLHelpWorkshop,
-                    self.FSharp,
-                ],
-                exists,
-            ),
-        )
-        if self.vs_ver >= 14 and self.VCRuntimeRedist:
-            env['py_vcruntime_redist'] = self.VCRuntimeRedist
-        return env
-
-    def _build_paths(self, name, spec_path_lists, exists):
-        """
-        Given an environment variable name and specified paths,
-        return a pathsep-separated string of paths containing
-        unique, extant, directories from those paths and from
-        the environment variable. Raise an error if no paths
-        are resolved.
-
-        Parameters
-        ----------
-        name: str
-            Environment variable name
-        spec_path_lists: list of str
-            Paths
-        exists: bool
-            It True, only return existing paths.
-
-        Return
-        ------
-        str
-            Pathsep-separated paths
-        """
-        # flatten spec_path_lists
-        spec_paths = itertools.chain.from_iterable(spec_path_lists)
-        env_paths = environ.get(name, '').split(os.pathsep)
-        paths = itertools.chain(spec_paths, env_paths)
-        extant_paths = list(filter(os.path.isdir, paths)) if exists else paths
-        if not extant_paths:
-            msg = f"{name.upper()} environment variable is empty"
-            raise distutils.errors.DistutilsPlatformError(msg)
-        unique_paths = unique_everseen(extant_paths)
-        return os.pathsep.join(unique_paths)
diff --git a/voxvera/vendor/setuptools/namespaces.py b/voxvera/vendor/setuptools/namespaces.py
deleted file mode 100644
index 7760f07..0000000
--- a/voxvera/vendor/setuptools/namespaces.py
+++ /dev/null
@@ -1,101 +0,0 @@
-import itertools
-import os
-
-from .compat import py312
-
-from distutils import log
-
-flatten = itertools.chain.from_iterable
-
-
-class Installer:
-    nspkg_ext = '-nspkg.pth'
-
-    def install_namespaces(self) -> None:
-        nsp = self._get_all_ns_packages()
-        if not nsp:
-            return
-        filename = self._get_nspkg_file()
-        self.outputs.append(filename)
-        log.info("Installing %s", filename)
-        lines = map(self._gen_nspkg_line, nsp)
-
-        with open(filename, 'wt', encoding=py312.PTH_ENCODING) as f:
-            # Python<3.13 requires encoding="locale" instead of "utf-8"
-            # See: python/cpython#77102
-            f.writelines(lines)
-
-    def uninstall_namespaces(self) -> None:
-        filename = self._get_nspkg_file()
-        if not os.path.exists(filename):
-            return
-        log.info("Removing %s", filename)
-        os.remove(filename)
-
-    def _get_nspkg_file(self):
-        filename, _ = os.path.splitext(self._get_target())
-        return filename + self.nspkg_ext
-
-    def _get_target(self):
-        return self.target
-
-    _nspkg_tmpl = (
-        "import sys, types, os",
-        "p = os.path.join(%(root)s, *%(pth)r)",
-        "importlib = __import__('importlib.util')",
-        "__import__('importlib.machinery')",
-        (
-            "m = "
-            "sys.modules.setdefault(%(pkg)r, "
-            "importlib.util.module_from_spec("
-            "importlib.machinery.PathFinder.find_spec(%(pkg)r, "
-            "[os.path.dirname(p)])))"
-        ),
-        ("m = m or sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))"),
-        "mp = (m or []) and m.__dict__.setdefault('__path__',[])",
-        "(p not in mp) and mp.append(p)",
-    )
-    "lines for the namespace installer"
-
-    _nspkg_tmpl_multi = ('m and setattr(sys.modules[%(parent)r], %(child)r, m)',)
-    "additional line(s) when a parent package is indicated"
-
-    def _get_root(self):
-        return "sys._getframe(1).f_locals['sitedir']"
-
-    def _gen_nspkg_line(self, pkg):
-        pth = tuple(pkg.split('.'))
-        root = self._get_root()
-        tmpl_lines = self._nspkg_tmpl
-        parent, sep, child = pkg.rpartition('.')
-        if parent:
-            tmpl_lines += self._nspkg_tmpl_multi
-        return ';'.join(tmpl_lines) % locals() + '\n'
-
-    def _get_all_ns_packages(self):
-        """Return sorted list of all package namespaces"""
-        pkgs = self.distribution.namespace_packages or []
-        return sorted(set(flatten(map(self._pkg_names, pkgs))))
-
-    @staticmethod
-    def _pkg_names(pkg):
-        """
-        Given a namespace package, yield the components of that
-        package.
-
-        >>> names = Installer._pkg_names('a.b.c')
-        >>> set(names) == set(['a', 'a.b', 'a.b.c'])
-        True
-        """
-        parts = pkg.split('.')
-        while parts:
-            yield '.'.join(parts)
-            parts.pop()
-
-
-class DevelopInstaller(Installer):
-    def _get_root(self):
-        return repr(str(self.egg_path))
-
-    def _get_target(self):
-        return self.egg_link
diff --git a/voxvera/vendor/setuptools/script (dev).tmpl b/voxvera/vendor/setuptools/script (dev).tmpl
deleted file mode 100644
index 39a24b0..0000000
--- a/voxvera/vendor/setuptools/script (dev).tmpl	
+++ /dev/null
@@ -1,6 +0,0 @@
-# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
-__requires__ = %(spec)r
-__import__('pkg_resources').require(%(spec)r)
-__file__ = %(dev_path)r
-with open(__file__) as f:
-    exec(compile(f.read(), __file__, 'exec'))
diff --git a/voxvera/vendor/setuptools/script.tmpl b/voxvera/vendor/setuptools/script.tmpl
deleted file mode 100644
index ff5efbc..0000000
--- a/voxvera/vendor/setuptools/script.tmpl
+++ /dev/null
@@ -1,3 +0,0 @@
-# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r
-__requires__ = %(spec)r
-__import__('pkg_resources').run_script(%(spec)r, %(script_name)r)
diff --git a/voxvera/vendor/setuptools/tests/__init__.py b/voxvera/vendor/setuptools/tests/__init__.py
deleted file mode 100644
index eb70bfb..0000000
--- a/voxvera/vendor/setuptools/tests/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-import locale
-import sys
-
-import pytest
-
-__all__ = ['fail_on_ascii']
-
-if sys.version_info >= (3, 11):
-    locale_encoding = locale.getencoding()
-else:
-    locale_encoding = locale.getpreferredencoding(False)
-is_ascii = locale_encoding == 'ANSI_X3.4-1968'
-fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale")
diff --git a/voxvera/vendor/setuptools/tests/compat/__init__.py b/voxvera/vendor/setuptools/tests/compat/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/tests/compat/py39.py b/voxvera/vendor/setuptools/tests/compat/py39.py
deleted file mode 100644
index 1fdb9da..0000000
--- a/voxvera/vendor/setuptools/tests/compat/py39.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from jaraco.test.cpython import from_test_support, try_import
-
-os_helper = try_import('os_helper') or from_test_support('can_symlink')
diff --git a/voxvera/vendor/setuptools/tests/config/__init__.py b/voxvera/vendor/setuptools/tests/config/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/voxvera/vendor/setuptools/tests/config/downloads/__init__.py b/voxvera/vendor/setuptools/tests/config/downloads/__init__.py
deleted file mode 100644
index 00a1642..0000000
--- a/voxvera/vendor/setuptools/tests/config/downloads/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-from __future__ import annotations
-
-import re
-import time
-from pathlib import Path
-from urllib.error import HTTPError
-from urllib.request import urlopen
-
-__all__ = ["DOWNLOAD_DIR", "retrieve_file", "output_file", "urls_from_file"]
-
-
-NAME_REMOVE = ("http://", "https://", "github.com/", "/raw/")
-DOWNLOAD_DIR = Path(__file__).parent
-
-
-# ----------------------------------------------------------------------
-# Please update ./preload.py accordingly when modifying this file
-# ----------------------------------------------------------------------
-
-
-def output_file(url: str, download_dir: Path = DOWNLOAD_DIR) -> Path:
-    file_name = url.strip()
-    for part in NAME_REMOVE:
-        file_name = file_name.replace(part, '').strip().strip('/:').strip()
-    return Path(download_dir, re.sub(r"[^\-_\.\w\d]+", "_", file_name))
-
-
-def retrieve_file(url: str, download_dir: Path = DOWNLOAD_DIR, wait: float = 5) -> Path:
-    path = output_file(url, download_dir)
-    if path.exists():
-        print(f"Skipping {url} (already exists: {path})")
-    else:
-        download_dir.mkdir(exist_ok=True, parents=True)
-        print(f"Downloading {url} to {path}")
-        try:
-            download(url, path)
-        except HTTPError:
-            time.sleep(wait)  # wait a few seconds and try again.
-            download(url, path)
-    return path
-
-
-def urls_from_file(list_file: Path) -> list[str]:
-    """``list_file`` should be a text file where each line corresponds to a URL to
-    download.
-    """
-    print(f"file: {list_file}")
-    content = list_file.read_text(encoding="utf-8")
-    return [url for url in content.splitlines() if not url.startswith("#")]
-
-
-def download(url: str, dest: Path):
-    with urlopen(url) as f:
-        data = f.read()
-
-    with open(dest, "wb") as f:
-        f.write(data)
-
-    assert Path(dest).exists()
diff --git a/voxvera/vendor/setuptools/tests/config/downloads/preload.py b/voxvera/vendor/setuptools/tests/config/downloads/preload.py
deleted file mode 100644
index 8eeb5dd..0000000
--- a/voxvera/vendor/setuptools/tests/config/downloads/preload.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""This file can be used to preload files needed for testing.
-
-For example you can use::
-
-    cd setuptools/tests/config
-    python -m downloads.preload setupcfg_examples.txt
-
-to make sure the `setup.cfg` examples are downloaded before starting the tests.
-"""
-
-import sys
-from pathlib import Path
-
-from . import retrieve_file, urls_from_file
-
-if __name__ == "__main__":
-    urls = urls_from_file(Path(sys.argv[1]))
-    list(map(retrieve_file, urls))
diff --git a/voxvera/vendor/setuptools/tests/config/setupcfg_examples.txt b/voxvera/vendor/setuptools/tests/config/setupcfg_examples.txt
deleted file mode 100644
index 6aab887..0000000
--- a/voxvera/vendor/setuptools/tests/config/setupcfg_examples.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-# ====================================================================
-# Some popular packages that use setup.cfg (and others not so popular)
-# Reference: https://hugovk.github.io/top-pypi-packages/
-# ====================================================================
-https://github.com/pypa/setuptools/raw/52c990172fec37766b3566679724aa8bf70ae06d/setup.cfg
-https://github.com/pypa/wheel/raw/0acd203cd896afec7f715aa2ff5980a403459a3b/setup.cfg
-https://github.com/python/importlib_metadata/raw/2f05392ca980952a6960d82b2f2d2ea10aa53239/setup.cfg
-https://github.com/jaraco/skeleton/raw/d9008b5c510cd6969127a6a2ab6f832edddef296/setup.cfg
-https://github.com/jaraco/zipp/raw/700d3a96390e970b6b962823bfea78b4f7e1c537/setup.cfg
-https://github.com/pallets/jinja/raw/7d72eb7fefb7dce065193967f31f805180508448/setup.cfg
-https://github.com/tkem/cachetools/raw/2fd87a94b8d3861d80e9e4236cd480bfdd21c90d/setup.cfg
-https://github.com/aio-libs/aiohttp/raw/5e0e6b7080f2408d5f1dd544c0e1cf88378b7b10/setup.cfg
-https://github.com/pallets/flask/raw/9486b6cf57bd6a8a261f67091aca8ca78eeec1e3/setup.cfg
-https://github.com/pallets/click/raw/6411f425fae545f42795665af4162006b36c5e4a/setup.cfg
-https://github.com/sqlalchemy/sqlalchemy/raw/533f5718904b620be8d63f2474229945d6f8ba5d/setup.cfg
-https://github.com/pytest-dev/pluggy/raw/461ef63291d13589c4e21aa182cd1529257e9a0a/setup.cfg
-https://github.com/pytest-dev/pytest/raw/c7be96dae487edbd2f55b561b31b68afac1dabe6/setup.cfg
-https://github.com/platformdirs/platformdirs/raw/7b7852128dd6f07511b618d6edea35046bd0c6ff/setup.cfg
-https://github.com/pandas-dev/pandas/raw/bc17343f934a33dc231c8c74be95d8365537c376/setup.cfg
-https://github.com/django/django/raw/4e249d11a6e56ca8feb4b055b681cec457ef3a3d/setup.cfg
-https://github.com/pyscaffold/pyscaffold/raw/de7aa5dc059fbd04307419c667cc4961bc9df4b8/setup.cfg
-https://github.com/pypa/virtualenv/raw/f92eda6e3da26a4d28c2663ffb85c4960bdb990c/setup.cfg
diff --git a/voxvera/vendor/setuptools/tests/config/test_apply_pyprojecttoml.py b/voxvera/vendor/setuptools/tests/config/test_apply_pyprojecttoml.py
deleted file mode 100644
index b6b21a3..0000000
--- a/voxvera/vendor/setuptools/tests/config/test_apply_pyprojecttoml.py
+++ /dev/null
@@ -1,794 +0,0 @@
-"""Make sure that applying the configuration from pyproject.toml is equivalent to
-applying a similar configuration from setup.cfg
-
-To run these tests offline, please have a look on ``./downloads/preload.py``
-"""
-
-from __future__ import annotations
-
-import io
-import re
-import tarfile
-from inspect import cleandoc
-from pathlib import Path
-from unittest.mock import Mock
-
-import pytest
-from ini2toml.api import LiteTranslator
-from packaging.metadata import Metadata
-
-import setuptools  # noqa: F401 # ensure monkey patch to metadata
-from setuptools._static import is_static
-from setuptools.command.egg_info import write_requirements
-from setuptools.config import expand, pyprojecttoml, setupcfg
-from setuptools.config._apply_pyprojecttoml import _MissingDynamic, _some_attrgetter
-from setuptools.dist import Distribution
-from setuptools.errors import InvalidConfigError, RemovedConfigError
-from setuptools.warnings import InformationOnly, SetuptoolsDeprecationWarning
-
-from .downloads import retrieve_file, urls_from_file
-
-HERE = Path(__file__).parent
-EXAMPLES_FILE = "setupcfg_examples.txt"
-
-
-def makedist(path, **attrs):
-    return Distribution({"src_root": path, **attrs})
-
-
-def _mock_expand_patterns(patterns, *_, **__):
-    """
-    Allow comparing the given patterns for 2 dist objects.
-    We need to strip special chars to avoid errors when validating.
-    """
-    return [
-        re.sub("[^a-z0-9]+", "", p, flags=re.IGNORECASE) or "empty" for p in patterns
-    ]
-
-
-@pytest.mark.parametrize("url", urls_from_file(HERE / EXAMPLES_FILE))
-@pytest.mark.filterwarnings("ignore")
-@pytest.mark.uses_network
-def test_apply_pyproject_equivalent_to_setupcfg(url, monkeypatch, tmp_path):
-    monkeypatch.setattr(expand, "read_attr", Mock(return_value="0.0.1"))
-    monkeypatch.setattr(
-        Distribution, "_expand_patterns", Mock(side_effect=_mock_expand_patterns)
-    )
-    setupcfg_example = retrieve_file(url)
-    pyproject_example = Path(tmp_path, "pyproject.toml")
-    setupcfg_text = setupcfg_example.read_text(encoding="utf-8")
-    toml_config = LiteTranslator().translate(setupcfg_text, "setup.cfg")
-    pyproject_example.write_text(toml_config, encoding="utf-8")
-
-    dist_toml = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject_example)
-    dist_cfg = setupcfg.apply_configuration(makedist(tmp_path), setupcfg_example)
-
-    pkg_info_toml = core_metadata(dist_toml)
-    pkg_info_cfg = core_metadata(dist_cfg)
-    assert pkg_info_toml == pkg_info_cfg
-
-    if any(getattr(d, "license_files", None) for d in (dist_toml, dist_cfg)):
-        assert set(dist_toml.license_files) == set(dist_cfg.license_files)
-
-    if any(getattr(d, "entry_points", None) for d in (dist_toml, dist_cfg)):
-        print(dist_cfg.entry_points)
-        ep_toml = {
-            (k, *sorted(i.replace(" ", "") for i in v))
-            for k, v in dist_toml.entry_points.items()
-        }
-        ep_cfg = {
-            (k, *sorted(i.replace(" ", "") for i in v))
-            for k, v in dist_cfg.entry_points.items()
-        }
-        assert ep_toml == ep_cfg
-
-    if any(getattr(d, "package_data", None) for d in (dist_toml, dist_cfg)):
-        pkg_data_toml = {(k, *sorted(v)) for k, v in dist_toml.package_data.items()}
-        pkg_data_cfg = {(k, *sorted(v)) for k, v in dist_cfg.package_data.items()}
-        assert pkg_data_toml == pkg_data_cfg
-
-    if any(getattr(d, "data_files", None) for d in (dist_toml, dist_cfg)):
-        data_files_toml = {(k, *sorted(v)) for k, v in dist_toml.data_files}
-        data_files_cfg = {(k, *sorted(v)) for k, v in dist_cfg.data_files}
-        assert data_files_toml == data_files_cfg
-
-    assert set(dist_toml.install_requires) == set(dist_cfg.install_requires)
-    if any(getattr(d, "extras_require", None) for d in (dist_toml, dist_cfg)):
-        extra_req_toml = {(k, *sorted(v)) for k, v in dist_toml.extras_require.items()}
-        extra_req_cfg = {(k, *sorted(v)) for k, v in dist_cfg.extras_require.items()}
-        assert extra_req_toml == extra_req_cfg
-
-
-PEP621_EXAMPLE = """\
-[project]
-name = "spam"
-version = "2020.0.0"
-description = "Lovely Spam! Wonderful Spam!"
-readme = "README.rst"
-requires-python = ">=3.8"
-license-files = ["LICENSE.txt"]  # Updated to be PEP 639 compliant
-keywords = ["egg", "bacon", "sausage", "tomatoes", "Lobster Thermidor"]
-authors = [
-  {email = "hi@pradyunsg.me"},
-  {name = "Tzu-Ping Chung"}
-]
-maintainers = [
-  {name = "Brett Cannon", email = "brett@python.org"},
-  {name = "John X. Ãørçeč", email = "john@utf8.org"},
-  {name = "Γαμα קּ 東", email = "gama@utf8.org"},
-]
-classifiers = [
-  "Development Status :: 4 - Beta",
-  "Programming Language :: Python"
-]
-
-dependencies = [
-  "httpx",
-  "gidgethub[httpx]>4.0.0",
-  "django>2.1; os_name != 'nt'",
-  "django>2.0; os_name == 'nt'"
-]
-
-[project.optional-dependencies]
-test = [
-  "pytest < 5.0.0",
-  "pytest-cov[all]"
-]
-
-[project.urls]
-homepage = "http://example.com"
-documentation = "http://readthedocs.org"
-repository = "http://github.com"
-changelog = "http://github.com/me/spam/blob/master/CHANGELOG.md"
-
-[project.scripts]
-spam-cli = "spam:main_cli"
-
-[project.gui-scripts]
-spam-gui = "spam:main_gui"
-
-[project.entry-points."spam.magical"]
-tomatoes = "spam:main_tomatoes"
-"""
-
-PEP621_INTERNATIONAL_EMAIL_EXAMPLE = """\
-[project]
-name = "spam"
-version = "2020.0.0"
-authors = [
-  {email = "hi@pradyunsg.me"},
-  {name = "Tzu-Ping Chung"}
-]
-maintainers = [
-  {name = "अंकित अहलावत", email = "ankit@example.com"},
-]
-"""
-
-PEP621_EXAMPLE_SCRIPT = """
-def main_cli(): pass
-def main_gui(): pass
-def main_tomatoes(): pass
-"""
-
-PEP639_LICENSE_TEXT = """\
-[project]
-name = "spam"
-version = "2020.0.0"
-authors = [
-  {email = "hi@pradyunsg.me"},
-  {name = "Tzu-Ping Chung"}
-]
-license = {text = "MIT"}
-"""
-
-PEP639_LICENSE_EXPRESSION = """\
-[project]
-name = "spam"
-version = "2020.0.0"
-authors = [
-  {email = "hi@pradyunsg.me"},
-  {name = "Tzu-Ping Chung"}
-]
-license = "mit or apache-2.0"  # should be normalized in metadata
-classifiers = [
-    "Development Status :: 5 - Production/Stable",
-    "Programming Language :: Python",
-]
-"""
-
-
-def _pep621_example_project(
-    tmp_path,
-    readme="README.rst",
-    pyproject_text=PEP621_EXAMPLE,
-):
-    pyproject = tmp_path / "pyproject.toml"
-    text = pyproject_text
-    replacements = {'readme = "README.rst"': f'readme = "{readme}"'}
-    for orig, subst in replacements.items():
-        text = text.replace(orig, subst)
-    pyproject.write_text(text, encoding="utf-8")
-
-    (tmp_path / readme).write_text("hello world", encoding="utf-8")
-    (tmp_path / "LICENSE.txt").write_text("--- LICENSE stub ---", encoding="utf-8")
-    (tmp_path / "spam.py").write_text(PEP621_EXAMPLE_SCRIPT, encoding="utf-8")
-    return pyproject
-
-
-def test_pep621_example(tmp_path):
-    """Make sure the example in PEP 621 works"""
-    pyproject = _pep621_example_project(tmp_path)
-    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-    assert set(dist.metadata.license_files) == {"LICENSE.txt"}
-
-
-@pytest.mark.parametrize(
-    ("readme", "ctype"),
-    [
-        ("Readme.txt", "text/plain"),
-        ("readme.md", "text/markdown"),
-        ("text.rst", "text/x-rst"),
-    ],
-)
-def test_readme_content_type(tmp_path, readme, ctype):
-    pyproject = _pep621_example_project(tmp_path, readme)
-    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-    assert dist.metadata.long_description_content_type == ctype
-
-
-def test_undefined_content_type(tmp_path):
-    pyproject = _pep621_example_project(tmp_path, "README.tex")
-    with pytest.raises(ValueError, match="Undefined content type for README.tex"):
-        pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-
-def test_no_explicit_content_type_for_missing_extension(tmp_path):
-    pyproject = _pep621_example_project(tmp_path, "README")
-    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-    assert dist.metadata.long_description_content_type is None
-
-
-@pytest.mark.parametrize(
-    ("pyproject_text", "expected_maintainers_meta_value"),
-    (
-        pytest.param(
-            PEP621_EXAMPLE,
-            (
-                'Brett Cannon , "John X. Ãørçeč" , '
-                'Γαμα קּ 東 '
-            ),
-            id='non-international-emails',
-        ),
-        pytest.param(
-            PEP621_INTERNATIONAL_EMAIL_EXAMPLE,
-            'Ankit Ahlawat <अंकित@उदाहरण.भारत>',
-            marks=pytest.mark.xfail(
-                reason="CPython's `email.headerregistry.Address` only supports "
-                'RFC 5322, as of Oct 20, 2025 and latest Python 3.13.0',
-                strict=True,
-            ),
-            id='international-email',
-        ),
-    ),
-)
-def test_utf8_maintainer_in_metadata(  # issue-3663
-    expected_maintainers_meta_value,
-    pyproject_text,
-    tmp_path,
-):
-    pyproject = _pep621_example_project(
-        tmp_path,
-        "README",
-        pyproject_text=pyproject_text,
-    )
-    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-    assert dist.metadata.maintainer_email == expected_maintainers_meta_value
-    pkg_file = tmp_path / "PKG-FILE"
-    with open(pkg_file, "w", encoding="utf-8") as fh:
-        dist.metadata.write_pkg_file(fh)
-    content = pkg_file.read_text(encoding="utf-8")
-    assert f"Maintainer-email: {expected_maintainers_meta_value}" in content
-
-
-@pytest.mark.parametrize(
-    (
-        'pyproject_text',
-        'license',
-        'license_expression',
-        'content_str',
-        'not_content_str',
-    ),
-    (
-        pytest.param(
-            PEP639_LICENSE_TEXT,
-            'MIT',
-            None,
-            'License: MIT',
-            'License-Expression: ',
-            id='license-text',
-            marks=[
-                pytest.mark.filterwarnings(
-                    "ignore:.project.license. as a TOML table is deprecated",
-                )
-            ],
-        ),
-        pytest.param(
-            PEP639_LICENSE_EXPRESSION,
-            None,
-            'MIT OR Apache-2.0',
-            'License-Expression: MIT OR Apache-2.0',
-            'License: ',
-            id='license-expression',
-        ),
-    ),
-)
-def test_license_in_metadata(
-    license,
-    license_expression,
-    content_str,
-    not_content_str,
-    pyproject_text,
-    tmp_path,
-):
-    pyproject = _pep621_example_project(
-        tmp_path,
-        "README",
-        pyproject_text=pyproject_text,
-    )
-    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-    assert dist.metadata.license == license
-    assert dist.metadata.license_expression == license_expression
-    pkg_file = tmp_path / "PKG-FILE"
-    with open(pkg_file, "w", encoding="utf-8") as fh:
-        dist.metadata.write_pkg_file(fh)
-    content = pkg_file.read_text(encoding="utf-8")
-    assert "Metadata-Version: 2.4" in content
-    assert content_str in content
-    assert not_content_str not in content
-
-
-def test_license_classifier_with_license_expression(tmp_path):
-    text = PEP639_LICENSE_EXPRESSION.rsplit("\n", 2)[0]
-    pyproject = _pep621_example_project(
-        tmp_path,
-        "README",
-        f"{text}\n    \"License :: OSI Approved :: MIT License\"\n]",
-    )
-    msg = "License classifiers have been superseded by license expressions"
-    with pytest.raises(InvalidConfigError, match=msg) as exc:
-        pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-    assert "License :: OSI Approved :: MIT License" in str(exc.value)
-
-
-def test_license_classifier_without_license_expression(tmp_path):
-    text = """\
-    [project]
-    name = "spam"
-    version = "2020.0.0"
-    license = {text = "mit or apache-2.0"}
-    classifiers = ["License :: OSI Approved :: MIT License"]
-    """
-    pyproject = _pep621_example_project(tmp_path, "README", text)
-
-    msg1 = "License classifiers are deprecated(?:.|\n)*MIT License"
-    msg2 = ".project.license. as a TOML table is deprecated"
-    with (
-        pytest.warns(SetuptoolsDeprecationWarning, match=msg1),
-        pytest.warns(SetuptoolsDeprecationWarning, match=msg2),
-    ):
-        dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-    # Check license classifier is still included
-    assert dist.metadata.get_classifiers() == ["License :: OSI Approved :: MIT License"]
-
-
-class TestLicenseFiles:
-    def base_pyproject(
-        self,
-        tmp_path,
-        additional_text="",
-        license_toml='license = {file = "LICENSE.txt"}\n',
-    ):
-        text = PEP639_LICENSE_EXPRESSION
-
-        # Sanity-check
-        assert 'license = "mit or apache-2.0"' in text
-        assert 'license-files' not in text
-        assert "[tool.setuptools]" not in text
-
-        text = re.sub(
-            r"(license = .*)\n",
-            license_toml,
-            text,
-            count=1,
-        )
-        assert license_toml in text  # sanity check
-        text = f"{text}\n{additional_text}\n"
-        pyproject = _pep621_example_project(tmp_path, "README", pyproject_text=text)
-        return pyproject
-
-    def base_pyproject_license_pep639(self, tmp_path, additional_text=""):
-        return self.base_pyproject(
-            tmp_path,
-            additional_text=additional_text,
-            license_toml='license = "licenseref-Proprietary"'
-            '\nlicense-files = ["_FILE*"]\n',
-        )
-
-    def test_both_license_and_license_files_defined(self, tmp_path):
-        setuptools_config = '[tool.setuptools]\nlicense-files = ["_FILE*"]'
-        pyproject = self.base_pyproject(tmp_path, setuptools_config)
-
-        (tmp_path / "_FILE.txt").touch()
-        (tmp_path / "_FILE.rst").touch()
-
-        # Would normally match the `license_files` patterns, but we want to exclude it
-        # by being explicit. On the other hand, contents should be added to `license`
-        license = tmp_path / "LICENSE.txt"
-        license.write_text("LicenseRef-Proprietary\n", encoding="utf-8")
-
-        msg1 = "'tool.setuptools.license-files' is deprecated in favor of 'project.license-files'"
-        msg2 = ".project.license. as a TOML table is deprecated"
-        with (
-            pytest.warns(SetuptoolsDeprecationWarning, match=msg1),
-            pytest.warns(SetuptoolsDeprecationWarning, match=msg2),
-        ):
-            dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-        assert set(dist.metadata.license_files) == {"_FILE.rst", "_FILE.txt"}
-        assert dist.metadata.license == "LicenseRef-Proprietary\n"
-
-    def test_both_license_and_license_files_defined_pep639(self, tmp_path):
-        # Set license and license-files
-        pyproject = self.base_pyproject_license_pep639(tmp_path)
-
-        (tmp_path / "_FILE.txt").touch()
-        (tmp_path / "_FILE.rst").touch()
-
-        msg = "Normalizing.*LicenseRef"
-        with pytest.warns(InformationOnly, match=msg):
-            dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-        assert set(dist.metadata.license_files) == {"_FILE.rst", "_FILE.txt"}
-        assert dist.metadata.license is None
-        assert dist.metadata.license_expression == "LicenseRef-Proprietary"
-
-    def test_license_files_defined_twice(self, tmp_path):
-        # Set project.license-files and tools.setuptools.license-files
-        setuptools_config = '[tool.setuptools]\nlicense-files = ["_FILE*"]'
-        pyproject = self.base_pyproject_license_pep639(tmp_path, setuptools_config)
-
-        msg = "'project.license-files' is defined already. Remove 'tool.setuptools.license-files'"
-        with pytest.raises(InvalidConfigError, match=msg):
-            pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-    def test_default_patterns(self, tmp_path):
-        setuptools_config = '[tool.setuptools]\nzip-safe = false'
-        # ^ used just to trigger section validation
-        pyproject = self.base_pyproject(tmp_path, setuptools_config, license_toml="")
-
-        license_files = "LICENCE-a.html COPYING-abc.txt AUTHORS-xyz NOTICE,def".split()
-
-        for fname in license_files:
-            (tmp_path / fname).write_text(f"{fname}\n", encoding="utf-8")
-
-        dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-        assert (tmp_path / "LICENSE.txt").exists()  # from base example
-        assert set(dist.metadata.license_files) == {*license_files, "LICENSE.txt"}
-
-    def test_missing_patterns(self, tmp_path):
-        pyproject = self.base_pyproject_license_pep639(tmp_path)
-        assert list(tmp_path.glob("_FILE*")) == []  # sanity check
-
-        msg1 = "Cannot find any files for the given pattern.*"
-        msg2 = "Normalizing 'licenseref-Proprietary' to 'LicenseRef-Proprietary'"
-        with (
-            pytest.warns(SetuptoolsDeprecationWarning, match=msg1),
-            pytest.warns(InformationOnly, match=msg2),
-        ):
-            pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-    def test_deprecated_file_expands_to_text(self, tmp_path):
-        """Make sure the old example with ``license = {text = ...}`` works"""
-
-        assert 'license-files = ["LICENSE.txt"]' in PEP621_EXAMPLE  # sanity check
-        text = PEP621_EXAMPLE.replace(
-            'license-files = ["LICENSE.txt"]',
-            'license = {file = "LICENSE.txt"}',
-        )
-        pyproject = _pep621_example_project(tmp_path, pyproject_text=text)
-
-        msg = ".project.license. as a TOML table is deprecated"
-        with pytest.warns(SetuptoolsDeprecationWarning, match=msg):
-            dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-        assert dist.metadata.license == "--- LICENSE stub ---"
-        assert set(dist.metadata.license_files) == {"LICENSE.txt"}  # auto-filled
-
-
-class TestPyModules:
-    # https://github.com/pypa/setuptools/issues/4316
-
-    def dist(self, name):
-        toml_config = f"""
-        [project]
-        name = "test"
-        version = "42.0"
-        [tool.setuptools]
-        py-modules = [{name!r}]
-        """
-        pyproject = Path("pyproject.toml")
-        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
-        return pyprojecttoml.apply_configuration(Distribution({}), pyproject)
-
-    @pytest.mark.parametrize("module", ["pip-run", "abc-d.λ-xyz-e"])
-    def test_valid_module_name(self, tmp_path, monkeypatch, module):
-        monkeypatch.chdir(tmp_path)
-        assert module in self.dist(module).py_modules
-
-    @pytest.mark.parametrize("module", ["pip run", "-pip-run", "pip-run-stubs"])
-    def test_invalid_module_name(self, tmp_path, monkeypatch, module):
-        monkeypatch.chdir(tmp_path)
-        with pytest.raises(ValueError, match="py-modules"):
-            self.dist(module).py_modules
-
-
-class TestExtModules:
-    def make_dist(self, toml_config):
-        pyproject = Path("pyproject.toml")
-        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
-        with pytest.warns(pyprojecttoml._ExperimentalConfiguration):
-            return pyprojecttoml.apply_configuration(Distribution({}), pyproject)
-
-    def test_pyproject_sets_attribute(self, tmp_path, monkeypatch):
-        monkeypatch.chdir(tmp_path)
-        toml_config = """
-        [project]
-        name = "test"
-        version = "42.0"
-        [tool.setuptools]
-        ext-modules = [
-          {name = "my.ext", sources = ["hello.c", "world.c"]}
-        ]
-        """
-        dist = self.make_dist(toml_config)
-        assert len(dist.ext_modules) == 1
-        assert dist.ext_modules[0].name == "my.ext"
-        assert set(dist.ext_modules[0].sources) == {"hello.c", "world.c"}
-
-    def test_pyproject_define_macros_as_tuples(self, tmp_path, monkeypatch):
-        # https://github.com/pypa/setuptools/issues/4810
-        monkeypatch.chdir(tmp_path)
-        toml_config = """
-        [project]
-        name = "test"
-        version = "42.0"
-        [[tool.setuptools.ext-modules]]
-        name = "my.ext"
-        sources = ["hello.c", "world.c"]
-        define-macros = [["FIRST_SINGLE"], ["SECOND_TWO", "1"]]
-        """
-        dist = self.make_dist(toml_config)
-        assert isinstance(dist.ext_modules[0].define_macros[0], tuple)
-        assert dist.ext_modules[0].define_macros[0] == ("FIRST_SINGLE",)
-        assert dist.ext_modules[0].define_macros[1] == ("SECOND_TWO", "1")
-
-
-class TestDeprecatedFields:
-    def test_namespace_packages(self, tmp_path):
-        pyproject = tmp_path / "pyproject.toml"
-        config = """
-        [project]
-        name = "myproj"
-        version = "42"
-        [tool.setuptools]
-        namespace-packages = ["myproj.pkg"]
-        """
-        pyproject.write_text(cleandoc(config), encoding="utf-8")
-        with pytest.raises(RemovedConfigError, match="namespace-packages"):
-            pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
-
-
-class TestPresetField:
-    def pyproject(self, tmp_path, dynamic, extra_content=""):
-        content = f"[project]\nname = 'proj'\ndynamic = {dynamic!r}\n"
-        if "version" not in dynamic:
-            content += "version = '42'\n"
-        file = tmp_path / "pyproject.toml"
-        file.write_text(content + extra_content, encoding="utf-8")
-        return file
-
-    @pytest.mark.parametrize(
-        ("attr", "field", "value"),
-        [
-            ("license_expression", "license", "MIT"),
-            pytest.param(
-                *("license", "license", "Not SPDX"),
-                marks=[pytest.mark.filterwarnings("ignore:.*license. overwritten")],
-            ),
-            ("classifiers", "classifiers", ["Private :: Classifier"]),
-            ("entry_points", "scripts", {"console_scripts": ["foobar=foobar:main"]}),
-            ("entry_points", "gui-scripts", {"gui_scripts": ["bazquux=bazquux:main"]}),
-            pytest.param(
-                *("install_requires", "dependencies", ["six"]),
-                marks=[
-                    pytest.mark.filterwarnings("ignore:.*install_requires. overwritten")
-                ],
-            ),
-        ],
-    )
-    def test_not_listed_in_dynamic(self, tmp_path, attr, field, value):
-        """Setuptools cannot set a field if not listed in ``dynamic``"""
-        pyproject = self.pyproject(tmp_path, [])
-        dist = makedist(tmp_path, **{attr: value})
-        msg = re.compile(f"defined outside of `pyproject.toml`:.*{field}", re.DOTALL)
-        with pytest.warns(_MissingDynamic, match=msg):
-            dist = pyprojecttoml.apply_configuration(dist, pyproject)
-
-        dist_value = _some_attrgetter(f"metadata.{attr}", attr)(dist)
-        assert not dist_value
-
-    @pytest.mark.parametrize(
-        ("attr", "field", "value"),
-        [
-            ("license_expression", "license", "MIT"),
-            ("install_requires", "dependencies", []),
-            ("extras_require", "optional-dependencies", {}),
-            ("install_requires", "dependencies", ["six"]),
-            ("classifiers", "classifiers", ["Private :: Classifier"]),
-        ],
-    )
-    def test_listed_in_dynamic(self, tmp_path, attr, field, value):
-        pyproject = self.pyproject(tmp_path, [field])
-        dist = makedist(tmp_path, **{attr: value})
-        dist = pyprojecttoml.apply_configuration(dist, pyproject)
-        dist_value = _some_attrgetter(f"metadata.{attr}", attr)(dist)
-        assert dist_value == value
-
-    def test_license_files_exempt_from_dynamic(self, monkeypatch, tmp_path):
-        """
-        license-file is currently not considered in the context of dynamic.
-        As per 2025-02-19, https://packaging.python.org/en/latest/specifications/pyproject-toml/#license-files
-        allows setuptools to fill-in `license-files` the way it sees fit:
-
-        > If the license-files key is not defined, tools can decide how to handle license files.
-        > For example they can choose not to include any files or use their own
-        > logic to discover the appropriate files in the distribution.
-
-        Using license_files from setup.py to fill-in the value is in accordance
-        with this rule.
-        """
-        monkeypatch.chdir(tmp_path)
-        pyproject = self.pyproject(tmp_path, [])
-        dist = makedist(tmp_path, license_files=["LIC*"])
-        (tmp_path / "LIC1").write_text("42", encoding="utf-8")
-        dist = pyprojecttoml.apply_configuration(dist, pyproject)
-        assert dist.metadata.license_files == ["LIC1"]
-
-    def test_warning_overwritten_dependencies(self, tmp_path):
-        src = "[project]\nname='pkg'\nversion='0.1'\ndependencies=['click']\n"
-        pyproject = tmp_path / "pyproject.toml"
-        pyproject.write_text(src, encoding="utf-8")
-        dist = makedist(tmp_path, install_requires=["wheel"])
-        with pytest.warns(match="`install_requires` overwritten"):
-            dist = pyprojecttoml.apply_configuration(dist, pyproject)
-        assert "wheel" not in dist.install_requires
-
-    def test_optional_dependencies_dont_remove_env_markers(self, tmp_path):
-        """
-        Internally setuptools converts dependencies with markers to "extras".
-        If ``install_requires`` is given by ``setup.py``, we have to ensure that
-        applying ``optional-dependencies`` does not overwrite the mandatory
-        dependencies with markers (see #3204).
-        """
-        # If setuptools replace its internal mechanism that uses `requires.txt`
-        # this test has to be rewritten to adapt accordingly
-        extra = "\n[project.optional-dependencies]\nfoo = ['bar>1']\n"
-        pyproject = self.pyproject(tmp_path, ["dependencies"], extra)
-        install_req = ['importlib-resources (>=3.0.0) ; python_version < "3.7"']
-        dist = makedist(tmp_path, install_requires=install_req)
-        dist = pyprojecttoml.apply_configuration(dist, pyproject)
-        assert "foo" in dist.extras_require
-        egg_info = dist.get_command_obj("egg_info")
-        write_requirements(egg_info, tmp_path, tmp_path / "requires.txt")
-        reqs = (tmp_path / "requires.txt").read_text(encoding="utf-8")
-        assert "importlib-resources" in reqs
-        assert "bar" in reqs
-        assert ':python_version < "3.7"' in reqs
-
-    @pytest.mark.parametrize(
-        ("field", "group"),
-        [("scripts", "console_scripts"), ("gui-scripts", "gui_scripts")],
-    )
-    @pytest.mark.filterwarnings("error")
-    def test_scripts_dont_require_dynamic_entry_points(self, tmp_path, field, group):
-        # Issue 3862
-        pyproject = self.pyproject(tmp_path, [field])
-        dist = makedist(tmp_path, entry_points={group: ["foobar=foobar:main"]})
-        dist = pyprojecttoml.apply_configuration(dist, pyproject)
-        assert group in dist.entry_points
-
-
-class TestMeta:
-    def test_example_file_in_sdist(self, setuptools_sdist):
-        """Meta test to ensure tests can run from sdist"""
-        with tarfile.open(setuptools_sdist) as tar:
-            assert any(name.endswith(EXAMPLES_FILE) for name in tar.getnames())
-
-
-class TestInteropCommandLineParsing:
-    def test_version(self, tmp_path, monkeypatch, capsys):
-        # See pypa/setuptools#4047
-        # This test can be removed once the CLI interface of setup.py is removed
-        monkeypatch.chdir(tmp_path)
-        toml_config = """
-        [project]
-        name = "test"
-        version = "42.0"
-        """
-        pyproject = Path(tmp_path, "pyproject.toml")
-        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
-        opts = {"script_args": ["--version"]}
-        dist = pyprojecttoml.apply_configuration(Distribution(opts), pyproject)
-        dist.parse_command_line()  # <-- there should be no exception here.
-        captured = capsys.readouterr()
-        assert "42.0" in captured.out
-
-
-class TestStaticConfig:
-    def test_mark_static_fields(self, tmp_path, monkeypatch):
-        monkeypatch.chdir(tmp_path)
-        toml_config = """
-        [project]
-        name = "test"
-        version = "42.0"
-        dependencies = ["hello"]
-        keywords = ["world"]
-        classifiers = ["private :: hello world"]
-        [tool.setuptools]
-        obsoletes = ["abcd"]
-        provides = ["abcd"]
-        platforms = ["abcd"]
-        """
-        pyproject = Path(tmp_path, "pyproject.toml")
-        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
-        dist = pyprojecttoml.apply_configuration(Distribution({}), pyproject)
-        assert is_static(dist.install_requires)
-        assert is_static(dist.metadata.keywords)
-        assert is_static(dist.metadata.classifiers)
-        assert is_static(dist.metadata.obsoletes)
-        assert is_static(dist.metadata.provides)
-        assert is_static(dist.metadata.platforms)
-
-
-# --- Auxiliary Functions ---
-
-
-def core_metadata(dist) -> str:
-    with io.StringIO() as buffer:
-        dist.metadata.write_pkg_file(buffer)
-        pkg_file_txt = buffer.getvalue()
-
-    # Make sure core metadata is valid
-    Metadata.from_email(pkg_file_txt, validate=True)  # can raise exceptions
-
-    skip_prefixes: tuple[str, ...] = ()
-    skip_lines = set()
-    # ---- DIFF NORMALISATION ----
-    # PEP 621 is very particular about author/maintainer metadata conversion, so skip
-    skip_prefixes += ("Author:", "Author-email:", "Maintainer:", "Maintainer-email:")
-    # May be redundant with Home-page
-    skip_prefixes += ("Project-URL: Homepage,", "Home-page:")
-    # May be missing in original (relying on default) but backfilled in the TOML
-    skip_prefixes += ("Description-Content-Type:",)
-    # Remove empty lines
-    skip_lines.add("")
-
-    result = []
-    for line in pkg_file_txt.splitlines():
-        if line.startswith(skip_prefixes) or line in skip_lines:
-            continue
-        result.append(line + "\n")
-
-    return "".join(result)
diff --git a/voxvera/vendor/setuptools/tests/config/test_expand.py b/voxvera/vendor/setuptools/tests/config/test_expand.py
deleted file mode 100644
index c5710ec..0000000
--- a/voxvera/vendor/setuptools/tests/config/test_expand.py
+++ /dev/null
@@ -1,247 +0,0 @@
-import os
-import sys
-from pathlib import Path
-
-import pytest
-
-from setuptools._static import is_static
-from setuptools.config import expand
-from setuptools.discovery import find_package_path
-
-from distutils.errors import DistutilsOptionError
-
-
-def write_files(files, root_dir):
-    for file, content in files.items():
-        path = root_dir / file
-        path.parent.mkdir(exist_ok=True, parents=True)
-        path.write_text(content, encoding="utf-8")
-
-
-def test_glob_relative(tmp_path, monkeypatch):
-    files = {
-        "dir1/dir2/dir3/file1.txt",
-        "dir1/dir2/file2.txt",
-        "dir1/file3.txt",
-        "a.ini",
-        "b.ini",
-        "dir1/c.ini",
-        "dir1/dir2/a.ini",
-    }
-
-    write_files({k: "" for k in files}, tmp_path)
-    patterns = ["**/*.txt", "[ab].*", "**/[ac].ini"]
-    monkeypatch.chdir(tmp_path)
-    assert set(expand.glob_relative(patterns)) == files
-    # Make sure the same APIs work outside cwd
-    assert set(expand.glob_relative(patterns, tmp_path)) == files
-
-
-def test_read_files(tmp_path, monkeypatch):
-    dir_ = tmp_path / "dir_"
-    (tmp_path / "_dir").mkdir(exist_ok=True)
-    (tmp_path / "a.txt").touch()
-    files = {"a.txt": "a", "dir1/b.txt": "b", "dir1/dir2/c.txt": "c"}
-    write_files(files, dir_)
-
-    secrets = Path(str(dir_) + "secrets")
-    secrets.mkdir(exist_ok=True)
-    write_files({"secrets.txt": "secret keys"}, secrets)
-
-    with monkeypatch.context() as m:
-        m.chdir(dir_)
-        assert expand.read_files(list(files)) == "a\nb\nc"
-
-        cannot_access_msg = r"Cannot access '.*\.\..a\.txt'"
-        with pytest.raises(DistutilsOptionError, match=cannot_access_msg):
-            expand.read_files(["../a.txt"])
-
-        cannot_access_secrets_msg = r"Cannot access '.*secrets\.txt'"
-        with pytest.raises(DistutilsOptionError, match=cannot_access_secrets_msg):
-            expand.read_files(["../dir_secrets/secrets.txt"])
-
-    # Make sure the same APIs work outside cwd
-    assert expand.read_files(list(files), dir_) == "a\nb\nc"
-    with pytest.raises(DistutilsOptionError, match=cannot_access_msg):
-        expand.read_files(["../a.txt"], dir_)
-
-
-class TestReadAttr:
-    @pytest.mark.parametrize(
-        "example",
-        [
-            # No cookie means UTF-8:
-            b"__version__ = '\xc3\xa9'\nraise SystemExit(1)\n",
-            # If a cookie is present, honor it:
-            b"# -*- coding: utf-8 -*-\n__version__ = '\xc3\xa9'\nraise SystemExit(1)\n",
-            b"# -*- coding: latin1 -*-\n__version__ = '\xe9'\nraise SystemExit(1)\n",
-        ],
-    )
-    def test_read_attr_encoding_cookie(self, example, tmp_path):
-        (tmp_path / "mod.py").write_bytes(example)
-        assert expand.read_attr('mod.__version__', root_dir=tmp_path) == 'é'
-
-    def test_read_attr(self, tmp_path, monkeypatch):
-        files = {
-            "pkg/__init__.py": "",
-            "pkg/sub/__init__.py": "VERSION = '0.1.1'",
-            "pkg/sub/mod.py": (
-                "VALUES = {'a': 0, 'b': {42}, 'c': (0, 1, 1)}\nraise SystemExit(1)"
-            ),
-        }
-        write_files(files, tmp_path)
-
-        with monkeypatch.context() as m:
-            m.chdir(tmp_path)
-            # Make sure it can read the attr statically without evaluating the module
-            version = expand.read_attr('pkg.sub.VERSION')
-            values = expand.read_attr('lib.mod.VALUES', {'lib': 'pkg/sub'})
-
-        assert version == '0.1.1'
-        assert is_static(values)
-
-        assert values['a'] == 0
-        assert values['b'] == {42}
-        assert is_static(values)
-
-        # Make sure the same APIs work outside cwd
-        assert expand.read_attr('pkg.sub.VERSION', root_dir=tmp_path) == '0.1.1'
-        values = expand.read_attr('lib.mod.VALUES', {'lib': 'pkg/sub'}, tmp_path)
-        assert values['c'] == (0, 1, 1)
-
-    @pytest.mark.parametrize(
-        "example",
-        [
-            "VERSION: str\nVERSION = '0.1.1'\nraise SystemExit(1)\n",
-            "VERSION: str = '0.1.1'\nraise SystemExit(1)\n",
-        ],
-    )
-    def test_read_annotated_attr(self, tmp_path, example):
-        files = {
-            "pkg/__init__.py": "",
-            "pkg/sub/__init__.py": example,
-        }
-        write_files(files, tmp_path)
-        # Make sure this attribute can be read statically
-        version = expand.read_attr('pkg.sub.VERSION', root_dir=tmp_path)
-        assert version == '0.1.1'
-        assert is_static(version)
-
-    @pytest.mark.parametrize(
-        "example",
-        [
-            "VERSION = (lambda: '0.1.1')()\n",
-            "def fn(): return '0.1.1'\nVERSION = fn()\n",
-            "VERSION: str = (lambda: '0.1.1')()\n",
-        ],
-    )
-    def test_read_dynamic_attr(self, tmp_path, monkeypatch, example):
-        files = {
-            "pkg/__init__.py": "",
-            "pkg/sub/__init__.py": example,
-        }
-        write_files(files, tmp_path)
-        monkeypatch.chdir(tmp_path)
-        version = expand.read_attr('pkg.sub.VERSION')
-        assert version == '0.1.1'
-        assert not is_static(version)
-
-    def test_import_order(self, tmp_path):
-        """
-        Sometimes the import machinery will import the parent package of a nested
-        module, which triggers side-effects and might create problems (see issue #3176)
-
-        ``read_attr`` should bypass these limitations by resolving modules statically
-        (via ast.literal_eval).
-        """
-        files = {
-            "src/pkg/__init__.py": "from .main import func\nfrom .about import version",
-            "src/pkg/main.py": "import super_complicated_dep\ndef func(): return 42",
-            "src/pkg/about.py": "version = '42'",
-        }
-        write_files(files, tmp_path)
-        attr_desc = "pkg.about.version"
-        package_dir = {"": "src"}
-        # `import super_complicated_dep` should not run, otherwise the build fails
-        assert expand.read_attr(attr_desc, package_dir, tmp_path) == "42"
-
-
-@pytest.mark.parametrize(
-    ("package_dir", "file", "module", "return_value"),
-    [
-        ({"": "src"}, "src/pkg/main.py", "pkg.main", 42),
-        ({"pkg": "lib"}, "lib/main.py", "pkg.main", 13),
-        ({}, "single_module.py", "single_module", 70),
-        ({}, "flat_layout/pkg.py", "flat_layout.pkg", 836),
-    ],
-)
-def test_resolve_class(monkeypatch, tmp_path, package_dir, file, module, return_value):
-    monkeypatch.setattr(sys, "modules", {})  # reproducibility
-    files = {file: f"class Custom:\n    def testing(self): return {return_value}"}
-    write_files(files, tmp_path)
-    cls = expand.resolve_class(f"{module}.Custom", package_dir, tmp_path)
-    assert cls().testing() == return_value
-
-
-@pytest.mark.parametrize(
-    ("args", "pkgs"),
-    [
-        ({"where": ["."], "namespaces": False}, {"pkg", "other"}),
-        ({"where": [".", "dir1"], "namespaces": False}, {"pkg", "other", "dir2"}),
-        ({"namespaces": True}, {"pkg", "other", "dir1", "dir1.dir2"}),
-        ({}, {"pkg", "other", "dir1", "dir1.dir2"}),  # default value for `namespaces`
-    ],
-)
-def test_find_packages(tmp_path, args, pkgs):
-    files = {
-        "pkg/__init__.py",
-        "other/__init__.py",
-        "dir1/dir2/__init__.py",
-    }
-    write_files({k: "" for k in files}, tmp_path)
-
-    package_dir = {}
-    kwargs = {"root_dir": tmp_path, "fill_package_dir": package_dir, **args}
-    where = kwargs.get("where", ["."])
-    assert set(expand.find_packages(**kwargs)) == pkgs
-    for pkg in pkgs:
-        pkg_path = find_package_path(pkg, package_dir, tmp_path)
-        assert os.path.exists(pkg_path)
-
-    # Make sure the same APIs work outside cwd
-    where = [
-        str((tmp_path / p).resolve()).replace(os.sep, "/")  # ensure posix-style paths
-        for p in args.pop("where", ["."])
-    ]
-
-    assert set(expand.find_packages(where=where, **args)) == pkgs
-
-
-@pytest.mark.parametrize(
-    ("files", "where", "expected_package_dir"),
-    [
-        (["pkg1/__init__.py", "pkg1/other.py"], ["."], {}),
-        (["pkg1/__init__.py", "pkg2/__init__.py"], ["."], {}),
-        (["src/pkg1/__init__.py", "src/pkg1/other.py"], ["src"], {"": "src"}),
-        (["src/pkg1/__init__.py", "src/pkg2/__init__.py"], ["src"], {"": "src"}),
-        (
-            ["src1/pkg1/__init__.py", "src2/pkg2/__init__.py"],
-            ["src1", "src2"],
-            {"pkg1": "src1/pkg1", "pkg2": "src2/pkg2"},
-        ),
-        (
-            ["src/pkg1/__init__.py", "pkg2/__init__.py"],
-            ["src", "."],
-            {"pkg1": "src/pkg1"},
-        ),
-    ],
-)
-def test_fill_package_dir(tmp_path, files, where, expected_package_dir):
-    write_files({k: "" for k in files}, tmp_path)
-    pkg_dir = {}
-    kwargs = {"root_dir": tmp_path, "fill_package_dir": pkg_dir, "namespaces": False}
-    pkgs = expand.find_packages(where=where, **kwargs)
-    assert set(pkg_dir.items()) == set(expected_package_dir.items())
-    for pkg in pkgs:
-        pkg_path = find_package_path(pkg, pkg_dir, tmp_path)
-        assert os.path.exists(pkg_path)
diff --git a/voxvera/vendor/setuptools/tests/config/test_pyprojecttoml.py b/voxvera/vendor/setuptools/tests/config/test_pyprojecttoml.py
deleted file mode 100644
index e031ea8..0000000
--- a/voxvera/vendor/setuptools/tests/config/test_pyprojecttoml.py
+++ /dev/null
@@ -1,421 +0,0 @@
-import re
-from configparser import ConfigParser
-from inspect import cleandoc
-
-import jaraco.path
-import pytest
-import tomli_w
-from path import Path
-
-import setuptools  # noqa: F401 # force distutils.core to be patched
-from setuptools.config.pyprojecttoml import (
-    _ToolsTypoInMetadata,
-    apply_configuration,
-    expand_configuration,
-    read_configuration,
-    validate,
-)
-from setuptools.dist import Distribution
-from setuptools.errors import OptionError
-
-import distutils.core
-
-EXAMPLE = """
-[project]
-name = "myproj"
-keywords = ["some", "key", "words"]
-dynamic = ["version", "readme"]
-requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
-dependencies = [
-    'importlib-metadata>=0.12;python_version<"3.8"',
-    'importlib-resources>=1.0;python_version<"3.7"',
-    'pathlib2>=2.3.3,<3;python_version < "3.4" and sys.platform != "win32"',
-]
-
-[project.optional-dependencies]
-docs = [
-    "sphinx>=3",
-    "sphinx-argparse>=0.2.5",
-    "sphinx-rtd-theme>=0.4.3",
-]
-testing = [
-    "pytest>=1",
-    "coverage>=3,<5",
-]
-
-[project.scripts]
-exec = "pkg.__main__:exec"
-
-[build-system]
-requires = ["setuptools", "wheel"]
-build-backend = "setuptools.build_meta"
-
-[tool.setuptools]
-package-dir = {"" = "src"}
-zip-safe = true
-platforms = ["any"]
-
-[tool.setuptools.packages.find]
-where = ["src"]
-
-[tool.setuptools.cmdclass]
-sdist = "pkg.mod.CustomSdist"
-
-[tool.setuptools.dynamic.version]
-attr = "pkg.__version__.VERSION"
-
-[tool.setuptools.dynamic.readme]
-file = ["README.md"]
-content-type = "text/markdown"
-
-[tool.setuptools.package-data]
-"*" = ["*.txt"]
-
-[tool.setuptools.data-files]
-"data" = ["_files/*.txt"]
-
-[tool.distutils.sdist]
-formats = "gztar"
-
-[tool.distutils.bdist_wheel]
-universal = true
-"""
-
-
-def create_example(path, pkg_root):
-    files = {
-        "pyproject.toml": EXAMPLE,
-        "README.md": "hello world",
-        "_files": {
-            "file.txt": "",
-        },
-    }
-    packages = {
-        "pkg": {
-            "__init__.py": "",
-            "mod.py": "class CustomSdist: pass",
-            "__version__.py": "VERSION = (3, 10)",
-            "__main__.py": "def exec(): print('hello')",
-        },
-    }
-
-    assert pkg_root  # Meta-test: cannot be empty string.
-
-    if pkg_root == ".":
-        files = {**files, **packages}
-        # skip other files: flat-layout will raise error for multi-package dist
-    else:
-        # Use this opportunity to ensure namespaces are discovered
-        files[pkg_root] = {**packages, "other": {"nested": {"__init__.py": ""}}}
-
-    jaraco.path.build(files, prefix=path)
-
-
-def verify_example(config, path, pkg_root):
-    pyproject = path / "pyproject.toml"
-    pyproject.write_text(tomli_w.dumps(config), encoding="utf-8")
-    expanded = expand_configuration(config, path)
-    expanded_project = expanded["project"]
-    assert read_configuration(pyproject, expand=True) == expanded
-    assert expanded_project["version"] == "3.10"
-    assert expanded_project["readme"]["text"] == "hello world"
-    assert "packages" in expanded["tool"]["setuptools"]
-    if pkg_root == ".":
-        # Auto-discovery will raise error for multi-package dist
-        assert set(expanded["tool"]["setuptools"]["packages"]) == {"pkg"}
-    else:
-        assert set(expanded["tool"]["setuptools"]["packages"]) == {
-            "pkg",
-            "other",
-            "other.nested",
-        }
-    assert expanded["tool"]["setuptools"]["include-package-data"] is True
-    assert "" in expanded["tool"]["setuptools"]["package-data"]
-    assert "*" not in expanded["tool"]["setuptools"]["package-data"]
-    assert expanded["tool"]["setuptools"]["data-files"] == [
-        ("data", ["_files/file.txt"])
-    ]
-
-
-def test_read_configuration(tmp_path):
-    create_example(tmp_path, "src")
-    pyproject = tmp_path / "pyproject.toml"
-
-    config = read_configuration(pyproject, expand=False)
-    assert config["project"].get("version") is None
-    assert config["project"].get("readme") is None
-
-    verify_example(config, tmp_path, "src")
-
-
-@pytest.mark.parametrize(
-    ("pkg_root", "opts"),
-    [
-        (".", {}),
-        ("src", {}),
-        ("lib", {"packages": {"find": {"where": ["lib"]}}}),
-    ],
-)
-def test_discovered_package_dir_with_attr_directive_in_config(tmp_path, pkg_root, opts):
-    create_example(tmp_path, pkg_root)
-
-    pyproject = tmp_path / "pyproject.toml"
-
-    config = read_configuration(pyproject, expand=False)
-    assert config["project"].get("version") is None
-    assert config["project"].get("readme") is None
-    config["tool"]["setuptools"].pop("packages", None)
-    config["tool"]["setuptools"].pop("package-dir", None)
-
-    config["tool"]["setuptools"].update(opts)
-    verify_example(config, tmp_path, pkg_root)
-
-
-ENTRY_POINTS = {
-    "console_scripts": {"a": "mod.a:func"},
-    "gui_scripts": {"b": "mod.b:func"},
-    "other": {"c": "mod.c:func [extra]"},
-}
-
-
-class TestEntryPoints:
-    def write_entry_points(self, tmp_path):
-        entry_points = ConfigParser()
-        entry_points.read_dict(ENTRY_POINTS)
-        with open(tmp_path / "entry-points.txt", "w", encoding="utf-8") as f:
-            entry_points.write(f)
-
-    def pyproject(self, dynamic=None):
-        project = {"dynamic": dynamic or ["scripts", "gui-scripts", "entry-points"]}
-        tool = {"dynamic": {"entry-points": {"file": "entry-points.txt"}}}
-        return {"project": project, "tool": {"setuptools": tool}}
-
-    def test_all_listed_in_dynamic(self, tmp_path):
-        self.write_entry_points(tmp_path)
-        expanded = expand_configuration(self.pyproject(), tmp_path)
-        expanded_project = expanded["project"]
-        assert len(expanded_project["scripts"]) == 1
-        assert expanded_project["scripts"]["a"] == "mod.a:func"
-        assert len(expanded_project["gui-scripts"]) == 1
-        assert expanded_project["gui-scripts"]["b"] == "mod.b:func"
-        assert len(expanded_project["entry-points"]) == 1
-        assert expanded_project["entry-points"]["other"]["c"] == "mod.c:func [extra]"
-
-    @pytest.mark.parametrize("missing_dynamic", ("scripts", "gui-scripts"))
-    def test_scripts_not_listed_in_dynamic(self, tmp_path, missing_dynamic):
-        self.write_entry_points(tmp_path)
-        dynamic = {"scripts", "gui-scripts", "entry-points"} - {missing_dynamic}
-
-        msg = f"defined outside of `pyproject.toml`:.*{missing_dynamic}"
-        with pytest.raises(OptionError, match=re.compile(msg, re.DOTALL)):
-            expand_configuration(self.pyproject(dynamic), tmp_path)
-
-
-class TestClassifiers:
-    def test_dynamic(self, tmp_path):
-        # Let's create a project example that has dynamic classifiers
-        # coming from a txt file.
-        create_example(tmp_path, "src")
-        classifiers = cleandoc(
-            """
-            Framework :: Flask
-            Programming Language :: Haskell
-            """
-        )
-        (tmp_path / "classifiers.txt").write_text(classifiers, encoding="utf-8")
-
-        pyproject = tmp_path / "pyproject.toml"
-        config = read_configuration(pyproject, expand=False)
-        dynamic = config["project"]["dynamic"]
-        config["project"]["dynamic"] = list({*dynamic, "classifiers"})
-        dynamic_config = config["tool"]["setuptools"]["dynamic"]
-        dynamic_config["classifiers"] = {"file": "classifiers.txt"}
-
-        # When the configuration is expanded,
-        # each line of the file should be an different classifier.
-        validate(config, pyproject)
-        expanded = expand_configuration(config, tmp_path)
-
-        assert set(expanded["project"]["classifiers"]) == {
-            "Framework :: Flask",
-            "Programming Language :: Haskell",
-        }
-
-    def test_dynamic_without_config(self, tmp_path):
-        config = """
-        [project]
-        name = "myproj"
-        version = '42'
-        dynamic = ["classifiers"]
-        """
-
-        pyproject = tmp_path / "pyproject.toml"
-        pyproject.write_text(cleandoc(config), encoding="utf-8")
-        with pytest.raises(OptionError, match="No configuration .* .classifiers."):
-            read_configuration(pyproject)
-
-    def test_dynamic_readme_from_setup_script_args(self, tmp_path):
-        config = """
-        [project]
-        name = "myproj"
-        version = '42'
-        dynamic = ["readme"]
-        """
-        pyproject = tmp_path / "pyproject.toml"
-        pyproject.write_text(cleandoc(config), encoding="utf-8")
-        dist = Distribution(attrs={"long_description": "42"})
-        # No error should occur because of missing `readme`
-        dist = apply_configuration(dist, pyproject)
-        assert dist.metadata.long_description == "42"
-
-    def test_dynamic_without_file(self, tmp_path):
-        config = """
-        [project]
-        name = "myproj"
-        version = '42'
-        dynamic = ["classifiers"]
-
-        [tool.setuptools.dynamic]
-        classifiers = {file = ["classifiers.txt"]}
-        """
-
-        pyproject = tmp_path / "pyproject.toml"
-        pyproject.write_text(cleandoc(config), encoding="utf-8")
-        with pytest.warns(UserWarning, match="File .*classifiers.txt. cannot be found"):
-            expanded = read_configuration(pyproject)
-        assert "classifiers" not in expanded["project"]
-
-
-class TestImportNames:
-    EXAMPLES = [
-        'import-names = ["hello", "world"]',
-        'import-namespaces = ["hello", "world"]',
-        'dynamic = ["import-names"]',
-        'dynamic = ["import-namespaces"]',
-    ]
-
-    @pytest.mark.parametrize("example", EXAMPLES)
-    def test_not_implemented(self, monkeypatch, tmp_path, example):
-        monkeypatch.chdir(tmp_path)
-        pyproject = Path("pyproject.toml")
-        toml_config = f"""
-        [project]
-        name = 'proj'
-        version = '42'
-        {example}
-        """
-        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
-        with pytest.raises(NotImplementedError, match='import-names'):
-            apply_configuration(Distribution({}), pyproject)
-
-
-@pytest.mark.parametrize(
-    "example",
-    (
-        """
-        [project]
-        name = "myproj"
-        version = "1.2"
-
-        [my-tool.that-disrespect.pep518]
-        value = 42
-        """,
-    ),
-)
-def test_ignore_unrelated_config(tmp_path, example):
-    pyproject = tmp_path / "pyproject.toml"
-    pyproject.write_text(cleandoc(example), encoding="utf-8")
-
-    # Make sure no error is raised due to 3rd party configs in pyproject.toml
-    assert read_configuration(pyproject) is not None
-
-
-@pytest.mark.parametrize(
-    ("example", "error_msg"),
-    [
-        (
-            """
-            [project]
-            name = "myproj"
-            version = "1.2"
-            requires = ['pywin32; platform_system=="Windows"' ]
-            """,
-            "configuration error: .project. must not contain ..requires.. properties",
-        ),
-    ],
-)
-def test_invalid_example(tmp_path, example, error_msg):
-    pyproject = tmp_path / "pyproject.toml"
-    pyproject.write_text(cleandoc(example), encoding="utf-8")
-
-    pattern = re.compile(
-        f"invalid pyproject.toml.*{error_msg}.*", re.MULTILINE | re.DOTALL
-    )
-    with pytest.raises(ValueError, match=pattern):
-        read_configuration(pyproject)
-
-
-@pytest.mark.parametrize("config", ("", "[tool.something]\nvalue = 42"))
-def test_empty(tmp_path, config):
-    pyproject = tmp_path / "pyproject.toml"
-    pyproject.write_text(config, encoding="utf-8")
-
-    # Make sure no error is raised
-    assert read_configuration(pyproject) == {}
-
-
-@pytest.mark.parametrize("config", ("[project]\nname = 'myproj'\nversion='42'\n",))
-def test_include_package_data_by_default(tmp_path, config):
-    """Builds with ``pyproject.toml`` should consider ``include-package-data=True`` as
-    default.
-    """
-    pyproject = tmp_path / "pyproject.toml"
-    pyproject.write_text(config, encoding="utf-8")
-
-    config = read_configuration(pyproject)
-    assert config["tool"]["setuptools"]["include-package-data"] is True
-
-
-def test_include_package_data_in_setuppy(tmp_path):
-    """Builds with ``pyproject.toml`` should consider ``include_package_data`` set in
-    ``setup.py``.
-
-    See https://github.com/pypa/setuptools/issues/3197#issuecomment-1079023889
-    """
-    files = {
-        "pyproject.toml": "[project]\nname = 'myproj'\nversion='42'\n",
-        "setup.py": "__import__('setuptools').setup(include_package_data=False)",
-    }
-    jaraco.path.build(files, prefix=tmp_path)
-
-    with Path(tmp_path):
-        dist = distutils.core.run_setup("setup.py", {}, stop_after="config")
-
-    assert dist.get_name() == "myproj"
-    assert dist.get_version() == "42"
-    assert dist.include_package_data is False
-
-
-def test_warn_tools_typo(tmp_path):
-    """Test that the common ``tools.setuptools`` typo in ``pyproject.toml`` issues a warning
-
-    See https://github.com/pypa/setuptools/issues/4150
-    """
-    config = """
-    [build-system]
-    requires = ["setuptools"]
-    build-backend = "setuptools.build_meta"
-
-    [project]
-    name = "myproj"
-    version = '42'
-
-    [tools.setuptools]
-    packages = ["package"]
-    """
-
-    pyproject = tmp_path / "pyproject.toml"
-    pyproject.write_text(cleandoc(config), encoding="utf-8")
-
-    with pytest.warns(_ToolsTypoInMetadata):
-        read_configuration(pyproject)
diff --git a/voxvera/vendor/setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py b/voxvera/vendor/setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py
deleted file mode 100644
index 9fc8050..0000000
--- a/voxvera/vendor/setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py
+++ /dev/null
@@ -1,111 +0,0 @@
-from inspect import cleandoc
-
-import pytest
-from jaraco import path
-
-from setuptools.config.pyprojecttoml import apply_configuration
-from setuptools.dist import Distribution
-from setuptools.warnings import SetuptoolsWarning
-
-
-def test_dynamic_dependencies(tmp_path):
-    files = {
-        "requirements.txt": "six\n  # comment\n",
-        "pyproject.toml": cleandoc(
-            """
-            [project]
-            name = "myproj"
-            version = "1.0"
-            dynamic = ["dependencies"]
-
-            [build-system]
-            requires = ["setuptools", "wheel"]
-            build-backend = "setuptools.build_meta"
-
-            [tool.setuptools.dynamic.dependencies]
-            file = ["requirements.txt"]
-            """
-        ),
-    }
-    path.build(files, prefix=tmp_path)
-    dist = Distribution()
-    dist = apply_configuration(dist, tmp_path / "pyproject.toml")
-    assert dist.install_requires == ["six"]
-
-
-def test_dynamic_optional_dependencies(tmp_path):
-    files = {
-        "requirements-docs.txt": "sphinx\n  # comment\n",
-        "pyproject.toml": cleandoc(
-            """
-            [project]
-            name = "myproj"
-            version = "1.0"
-            dynamic = ["optional-dependencies"]
-
-            [tool.setuptools.dynamic.optional-dependencies.docs]
-            file = ["requirements-docs.txt"]
-
-            [build-system]
-            requires = ["setuptools", "wheel"]
-            build-backend = "setuptools.build_meta"
-            """
-        ),
-    }
-    path.build(files, prefix=tmp_path)
-    dist = Distribution()
-    dist = apply_configuration(dist, tmp_path / "pyproject.toml")
-    assert dist.extras_require == {"docs": ["sphinx"]}
-
-
-def test_mixed_dynamic_optional_dependencies(tmp_path):
-    """
-    Test that if PEP 621 was loosened to allow mixing of dynamic and static
-    configurations in the case of fields containing sub-fields (groups),
-    things would work out.
-    """
-    files = {
-        "requirements-images.txt": "pillow~=42.0\n  # comment\n",
-        "pyproject.toml": cleandoc(
-            """
-            [project]
-            name = "myproj"
-            version = "1.0"
-            dynamic = ["optional-dependencies"]
-
-            [project.optional-dependencies]
-            docs = ["sphinx"]
-
-            [tool.setuptools.dynamic.optional-dependencies.images]
-            file = ["requirements-images.txt"]
-            """
-        ),
-    }
-
-    path.build(files, prefix=tmp_path)
-    pyproject = tmp_path / "pyproject.toml"
-    with pytest.raises(ValueError, match="project.optional-dependencies"):
-        apply_configuration(Distribution(), pyproject)
-
-
-def test_mixed_extras_require_optional_dependencies(tmp_path):
-    files = {
-        "pyproject.toml": cleandoc(
-            """
-            [project]
-            name = "myproj"
-            version = "1.0"
-            optional-dependencies.docs = ["sphinx"]
-            """
-        ),
-    }
-
-    path.build(files, prefix=tmp_path)
-    pyproject = tmp_path / "pyproject.toml"
-
-    dist = Distribution({"extras_require": {"hello": ["world"]}})
-
-    with pytest.warns(SetuptoolsWarning, match=".extras_require. overwritten"):
-        dist = apply_configuration(dist, pyproject)
-
-    assert dist.extras_require == {"docs": ["sphinx"]}
diff --git a/voxvera/vendor/setuptools/tests/config/test_setupcfg.py b/voxvera/vendor/setuptools/tests/config/test_setupcfg.py
deleted file mode 100644
index 495337a..0000000
--- a/voxvera/vendor/setuptools/tests/config/test_setupcfg.py
+++ /dev/null
@@ -1,987 +0,0 @@
-import configparser
-import contextlib
-import inspect
-import re
-import sys
-from pathlib import Path
-from unittest.mock import Mock, patch
-
-import pytest
-from packaging.requirements import InvalidRequirement
-
-from setuptools.config.setupcfg import ConfigHandler, Target, read_configuration
-from setuptools.dist import Distribution, _Distribution
-from setuptools.warnings import SetuptoolsDeprecationWarning
-
-from ..textwrap import DALS
-
-from distutils.errors import DistutilsFileError, DistutilsOptionError
-
-IS_PYPY = '__pypy__' in sys.builtin_module_names
-
-
-class ErrConfigHandler(ConfigHandler[Target]):
-    """Erroneous handler. Fails to implement required methods."""
-
-    section_prefix = "**err**"
-
-
-def make_package_dir(name, base_dir, ns=False):
-    dir_package = base_dir
-    for dir_name in name.split('/'):
-        dir_package = dir_package.mkdir(dir_name)
-    init_file = None
-    if not ns:
-        init_file = dir_package.join('__init__.py')
-        init_file.write('')
-    return dir_package, init_file
-
-
-def fake_env(
-    tmpdir, setup_cfg, setup_py=None, encoding='ascii', package_path='fake_package'
-):
-    if setup_py is None:
-        setup_py = 'from setuptools import setup\nsetup()\n'
-
-    tmpdir.join('setup.py').write(setup_py)
-    config = tmpdir.join('setup.cfg')
-    config.write(setup_cfg.encode(encoding), mode='wb')
-
-    package_dir, init_file = make_package_dir(package_path, tmpdir)
-
-    init_file.write(
-        'VERSION = (1, 2, 3)\n'
-        '\n'
-        'VERSION_MAJOR = 1'
-        '\n'
-        'def get_version():\n'
-        '    return [3, 4, 5, "dev"]\n'
-        '\n'
-    )
-
-    return package_dir, config
-
-
-@contextlib.contextmanager
-def get_dist(tmpdir, kwargs_initial=None, parse=True):
-    kwargs_initial = kwargs_initial or {}
-
-    with tmpdir.as_cwd():
-        dist = Distribution(kwargs_initial)
-        dist.script_name = 'setup.py'
-        parse and dist.parse_config_files()
-
-        yield dist
-
-
-def test_parsers_implemented():
-    with pytest.raises(NotImplementedError):
-        handler = ErrConfigHandler(None, {}, False, Mock())
-        handler.parsers
-
-
-class TestConfigurationReader:
-    def test_basic(self, tmpdir):
-        _, config = fake_env(
-            tmpdir,
-            '[metadata]\n'
-            'version = 10.1.1\n'
-            'keywords = one, two\n'
-            '\n'
-            '[options]\n'
-            'scripts = bin/a.py, bin/b.py\n',
-        )
-        config_dict = read_configuration(str(config))
-        assert config_dict['metadata']['version'] == '10.1.1'
-        assert config_dict['metadata']['keywords'] == ['one', 'two']
-        assert config_dict['options']['scripts'] == ['bin/a.py', 'bin/b.py']
-
-    def test_no_config(self, tmpdir):
-        with pytest.raises(DistutilsFileError):
-            read_configuration(str(tmpdir.join('setup.cfg')))
-
-    def test_ignore_errors(self, tmpdir):
-        _, config = fake_env(
-            tmpdir,
-            '[metadata]\nversion = attr: none.VERSION\nkeywords = one, two\n',
-        )
-        with pytest.raises(ImportError):
-            read_configuration(str(config))
-
-        config_dict = read_configuration(str(config), ignore_option_errors=True)
-
-        assert config_dict['metadata']['keywords'] == ['one', 'two']
-        assert 'version' not in config_dict['metadata']
-
-        config.remove()
-
-
-class TestMetadata:
-    def test_basic(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[metadata]\n'
-            'version = 10.1.1\n'
-            'description = Some description\n'
-            'long_description_content_type = text/something\n'
-            'long_description = file: README\n'
-            'name = fake_name\n'
-            'keywords = one, two\n'
-            'provides = package, package.sub\n'
-            'license = otherlic\n'
-            'download_url = http://test.test.com/test/\n'
-            'maintainer_email = test@test.com\n',
-        )
-
-        tmpdir.join('README').write('readme contents\nline2')
-
-        meta_initial = {
-            # This will be used so `otherlic` won't replace it.
-            'license': 'BSD 3-Clause License',
-        }
-
-        with get_dist(tmpdir, meta_initial) as dist:
-            metadata = dist.metadata
-
-            assert metadata.version == '10.1.1'
-            assert metadata.description == 'Some description'
-            assert metadata.long_description_content_type == 'text/something'
-            assert metadata.long_description == 'readme contents\nline2'
-            assert metadata.provides == ['package', 'package.sub']
-            assert metadata.license == 'BSD 3-Clause License'
-            assert metadata.name == 'fake_name'
-            assert metadata.keywords == ['one', 'two']
-            assert metadata.download_url == 'http://test.test.com/test/'
-            assert metadata.maintainer_email == 'test@test.com'
-
-    def test_license_cfg(self, tmpdir):
-        fake_env(
-            tmpdir,
-            DALS(
-                """
-            [metadata]
-            name=foo
-            version=0.0.1
-            license=Apache 2.0
-            """
-            ),
-        )
-
-        with get_dist(tmpdir) as dist:
-            metadata = dist.metadata
-
-            assert metadata.name == "foo"
-            assert metadata.version == "0.0.1"
-            assert metadata.license == "Apache 2.0"
-
-    def test_file_mixed(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[metadata]\nlong_description = file: README.rst, CHANGES.rst\n\n',
-        )
-
-        tmpdir.join('README.rst').write('readme contents\nline2')
-        tmpdir.join('CHANGES.rst').write('changelog contents\nand stuff')
-
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.long_description == (
-                'readme contents\nline2\nchangelog contents\nand stuff'
-            )
-
-    def test_file_sandboxed(self, tmpdir):
-        tmpdir.ensure("README")
-        project = tmpdir.join('depth1', 'depth2')
-        project.ensure(dir=True)
-        fake_env(project, '[metadata]\nlong_description = file: ../../README\n')
-
-        with get_dist(project, parse=False) as dist:
-            with pytest.raises(DistutilsOptionError):
-                dist.parse_config_files()  # file: out of sandbox
-
-    def test_aliases(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[metadata]\n'
-            'author_email = test@test.com\n'
-            'home_page = http://test.test.com/test/\n'
-            'summary = Short summary\n'
-            'platform = a, b\n'
-            'classifier =\n'
-            '  Framework :: Django\n'
-            '  Programming Language :: Python :: 3.5\n',
-        )
-
-        with get_dist(tmpdir) as dist:
-            metadata = dist.metadata
-            assert metadata.author_email == 'test@test.com'
-            assert metadata.url == 'http://test.test.com/test/'
-            assert metadata.description == 'Short summary'
-            assert metadata.platforms == ['a', 'b']
-            assert metadata.classifiers == [
-                'Framework :: Django',
-                'Programming Language :: Python :: 3.5',
-            ]
-
-    def test_multiline(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[metadata]\n'
-            'name = fake_name\n'
-            'keywords =\n'
-            '  one\n'
-            '  two\n'
-            'classifiers =\n'
-            '  Framework :: Django\n'
-            '  Programming Language :: Python :: 3.5\n',
-        )
-        with get_dist(tmpdir) as dist:
-            metadata = dist.metadata
-            assert metadata.keywords == ['one', 'two']
-            assert metadata.classifiers == [
-                'Framework :: Django',
-                'Programming Language :: Python :: 3.5',
-            ]
-
-    def test_dict(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[metadata]\n'
-            'project_urls =\n'
-            '  Link One = https://example.com/one/\n'
-            '  Link Two = https://example.com/two/\n',
-        )
-        with get_dist(tmpdir) as dist:
-            metadata = dist.metadata
-            assert metadata.project_urls == {
-                'Link One': 'https://example.com/one/',
-                'Link Two': 'https://example.com/two/',
-            }
-
-    def test_version(self, tmpdir):
-        package_dir, config = fake_env(
-            tmpdir, '[metadata]\nversion = attr: fake_package.VERSION\n'
-        )
-
-        sub_a = package_dir.mkdir('subpkg_a')
-        sub_a.join('__init__.py').write('')
-        sub_a.join('mod.py').write('VERSION = (2016, 11, 26)')
-
-        sub_b = package_dir.mkdir('subpkg_b')
-        sub_b.join('__init__.py').write('')
-        sub_b.join('mod.py').write(
-            'import third_party_module\nVERSION = (2016, 11, 26)'
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '1.2.3'
-
-        config.write('[metadata]\nversion = attr: fake_package.get_version\n')
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '3.4.5.dev'
-
-        config.write('[metadata]\nversion = attr: fake_package.VERSION_MAJOR\n')
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '1'
-
-        config.write('[metadata]\nversion = attr: fake_package.subpkg_a.mod.VERSION\n')
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '2016.11.26'
-
-        config.write('[metadata]\nversion = attr: fake_package.subpkg_b.mod.VERSION\n')
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '2016.11.26'
-
-    def test_version_file(self, tmpdir):
-        fake_env(tmpdir, '[metadata]\nversion = file: fake_package/version.txt\n')
-        tmpdir.join('fake_package', 'version.txt').write('1.2.3\n')
-
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '1.2.3'
-
-        tmpdir.join('fake_package', 'version.txt').write('1.2.3\n4.5.6\n')
-        with pytest.raises(DistutilsOptionError):
-            with get_dist(tmpdir) as dist:
-                dist.metadata.version
-
-    def test_version_with_package_dir_simple(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[metadata]\n'
-            'version = attr: fake_package_simple.VERSION\n'
-            '[options]\n'
-            'package_dir =\n'
-            '    = src\n',
-            package_path='src/fake_package_simple',
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '1.2.3'
-
-    def test_version_with_package_dir_rename(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[metadata]\n'
-            'version = attr: fake_package_rename.VERSION\n'
-            '[options]\n'
-            'package_dir =\n'
-            '    fake_package_rename = fake_dir\n',
-            package_path='fake_dir',
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '1.2.3'
-
-    def test_version_with_package_dir_complex(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[metadata]\n'
-            'version = attr: fake_package_complex.VERSION\n'
-            '[options]\n'
-            'package_dir =\n'
-            '    fake_package_complex = src/fake_dir\n',
-            package_path='src/fake_dir',
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.version == '1.2.3'
-
-    def test_unknown_meta_item(self, tmpdir):
-        fake_env(tmpdir, '[metadata]\nname = fake_name\nunknown = some\n')
-        with get_dist(tmpdir, parse=False) as dist:
-            dist.parse_config_files()  # Skip unknown.
-
-    def test_usupported_section(self, tmpdir):
-        fake_env(tmpdir, '[metadata.some]\nkey = val\n')
-        with get_dist(tmpdir, parse=False) as dist:
-            with pytest.raises(DistutilsOptionError):
-                dist.parse_config_files()
-
-    def test_classifiers(self, tmpdir):
-        expected = set([
-            'Framework :: Django',
-            'Programming Language :: Python :: 3',
-            'Programming Language :: Python :: 3.5',
-        ])
-
-        # From file.
-        _, config = fake_env(tmpdir, '[metadata]\nclassifiers = file: classifiers\n')
-
-        tmpdir.join('classifiers').write(
-            'Framework :: Django\n'
-            'Programming Language :: Python :: 3\n'
-            'Programming Language :: Python :: 3.5\n'
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert set(dist.metadata.classifiers) == expected
-
-        # From list notation
-        config.write(
-            '[metadata]\n'
-            'classifiers =\n'
-            '    Framework :: Django\n'
-            '    Programming Language :: Python :: 3\n'
-            '    Programming Language :: Python :: 3.5\n'
-        )
-        with get_dist(tmpdir) as dist:
-            assert set(dist.metadata.classifiers) == expected
-
-    def test_interpolation(self, tmpdir):
-        fake_env(tmpdir, '[metadata]\ndescription = %(message)s\n')
-        with pytest.raises(configparser.InterpolationMissingOptionError):
-            with get_dist(tmpdir):
-                pass
-
-    def test_non_ascii_1(self, tmpdir):
-        fake_env(tmpdir, '[metadata]\ndescription = éàïôñ\n', encoding='utf-8')
-        with get_dist(tmpdir):
-            pass
-
-    def test_non_ascii_3(self, tmpdir):
-        fake_env(tmpdir, '\n# -*- coding: invalid\n')
-        with get_dist(tmpdir):
-            pass
-
-    def test_non_ascii_4(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '# -*- coding: utf-8\n[metadata]\ndescription = éàïôñ\n',
-            encoding='utf-8',
-        )
-        with get_dist(tmpdir) as dist:
-            assert dist.metadata.description == 'éàïôñ'
-
-    def test_not_utf8(self, tmpdir):
-        """
-        Config files encoded not in UTF-8 will fail
-        """
-        fake_env(
-            tmpdir,
-            '# vim: set fileencoding=iso-8859-15 :\n[metadata]\ndescription = éàïôñ\n',
-            encoding='iso-8859-15',
-        )
-        with pytest.raises(UnicodeDecodeError):
-            with get_dist(tmpdir):
-                pass
-
-    @pytest.mark.parametrize(
-        ("error_msg", "config", "invalid"),
-        [
-            (
-                "Invalid dash-separated key 'author-email' in 'metadata' (setup.cfg)",
-                DALS(
-                    """
-                    [metadata]
-                    author-email = test@test.com
-                    maintainer_email = foo@foo.com
-                    """
-                ),
-                {"author-email": "test@test.com"},
-            ),
-            (
-                "Invalid uppercase key 'Name' in 'metadata' (setup.cfg)",
-                DALS(
-                    """
-                    [metadata]
-                    Name = foo
-                    description = Some description
-                    """
-                ),
-                {"Name": "foo"},
-            ),
-        ],
-    )
-    def test_invalid_options_previously_deprecated(
-        self, tmpdir, error_msg, config, invalid
-    ):
-        # This test and related methods can be removed when no longer needed.
-        # Deprecation postponed due to push-back from the community in
-        # https://github.com/pypa/setuptools/issues/4910
-        fake_env(tmpdir, config)
-        with pytest.warns(SetuptoolsDeprecationWarning, match=re.escape(error_msg)):
-            dist = get_dist(tmpdir).__enter__()
-
-        tmpdir.join('setup.cfg').remove()
-
-        for field, value in invalid.items():
-            attr = field.replace("-", "_").lower()
-            assert getattr(dist.metadata, attr) == value
-
-
-class TestOptions:
-    def test_basic(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[options]\n'
-            'zip_safe = True\n'
-            'include_package_data = yes\n'
-            'package_dir = b=c, =src\n'
-            'packages = pack_a, pack_b.subpack\n'
-            'namespace_packages = pack1, pack2\n'
-            'scripts = bin/one.py, bin/two.py\n'
-            'eager_resources = bin/one.py, bin/two.py\n'
-            'install_requires = docutils>=0.3; pack ==1.1, ==1.3; hey\n'
-            'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there\n'
-            'dependency_links = http://some.com/here/1, '
-            'http://some.com/there/2\n'
-            'python_requires = >=1.0, !=2.8\n'
-            'py_modules = module1, module2\n',
-        )
-        deprec = pytest.warns(SetuptoolsDeprecationWarning, match="namespace_packages")
-        with deprec, get_dist(tmpdir) as dist:
-            assert dist.zip_safe
-            assert dist.include_package_data
-            assert dist.package_dir == {'': 'src', 'b': 'c'}
-            assert dist.packages == ['pack_a', 'pack_b.subpack']
-            assert dist.namespace_packages == ['pack1', 'pack2']
-            assert dist.scripts == ['bin/one.py', 'bin/two.py']
-            assert dist.dependency_links == ([
-                'http://some.com/here/1',
-                'http://some.com/there/2',
-            ])
-            assert dist.install_requires == ([
-                'docutils>=0.3',
-                'pack==1.1,==1.3',
-                'hey',
-            ])
-            assert dist.setup_requires == ([
-                'docutils>=0.3',
-                'spack ==1.1, ==1.3',
-                'there',
-            ])
-            assert dist.python_requires == '>=1.0, !=2.8'
-            assert dist.py_modules == ['module1', 'module2']
-
-    def test_multiline(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[options]\n'
-            'package_dir = \n'
-            '  b=c\n'
-            '  =src\n'
-            'packages = \n'
-            '  pack_a\n'
-            '  pack_b.subpack\n'
-            'namespace_packages = \n'
-            '  pack1\n'
-            '  pack2\n'
-            'scripts = \n'
-            '  bin/one.py\n'
-            '  bin/two.py\n'
-            'eager_resources = \n'
-            '  bin/one.py\n'
-            '  bin/two.py\n'
-            'install_requires = \n'
-            '  docutils>=0.3\n'
-            '  pack ==1.1, ==1.3\n'
-            '  hey\n'
-            'setup_requires = \n'
-            '  docutils>=0.3\n'
-            '  spack ==1.1, ==1.3\n'
-            '  there\n'
-            'dependency_links = \n'
-            '  http://some.com/here/1\n'
-            '  http://some.com/there/2\n',
-        )
-        deprec = pytest.warns(SetuptoolsDeprecationWarning, match="namespace_packages")
-        with deprec, get_dist(tmpdir) as dist:
-            assert dist.package_dir == {'': 'src', 'b': 'c'}
-            assert dist.packages == ['pack_a', 'pack_b.subpack']
-            assert dist.namespace_packages == ['pack1', 'pack2']
-            assert dist.scripts == ['bin/one.py', 'bin/two.py']
-            assert dist.dependency_links == ([
-                'http://some.com/here/1',
-                'http://some.com/there/2',
-            ])
-            assert dist.install_requires == ([
-                'docutils>=0.3',
-                'pack==1.1,==1.3',
-                'hey',
-            ])
-            assert dist.setup_requires == ([
-                'docutils>=0.3',
-                'spack ==1.1, ==1.3',
-                'there',
-            ])
-
-    def test_package_dir_fail(self, tmpdir):
-        fake_env(tmpdir, '[options]\npackage_dir = a b\n')
-        with get_dist(tmpdir, parse=False) as dist:
-            with pytest.raises(DistutilsOptionError):
-                dist.parse_config_files()
-
-    def test_package_data(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[options.package_data]\n'
-            '* = *.txt, *.rst\n'
-            'hello = *.msg\n'
-            '\n'
-            '[options.exclude_package_data]\n'
-            '* = fake1.txt, fake2.txt\n'
-            'hello = *.dat\n',
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert dist.package_data == {
-                '': ['*.txt', '*.rst'],
-                'hello': ['*.msg'],
-            }
-            assert dist.exclude_package_data == {
-                '': ['fake1.txt', 'fake2.txt'],
-                'hello': ['*.dat'],
-            }
-
-    def test_packages(self, tmpdir):
-        fake_env(tmpdir, '[options]\npackages = find:\n')
-
-        with get_dist(tmpdir) as dist:
-            assert dist.packages == ['fake_package']
-
-    def test_find_directive(self, tmpdir):
-        dir_package, config = fake_env(tmpdir, '[options]\npackages = find:\n')
-
-        make_package_dir('sub_one', dir_package)
-        make_package_dir('sub_two', dir_package)
-
-        with get_dist(tmpdir) as dist:
-            assert set(dist.packages) == set([
-                'fake_package',
-                'fake_package.sub_two',
-                'fake_package.sub_one',
-            ])
-
-        config.write(
-            '[options]\n'
-            'packages = find:\n'
-            '\n'
-            '[options.packages.find]\n'
-            'where = .\n'
-            'include =\n'
-            '    fake_package.sub_one\n'
-            '    two\n'
-        )
-        with get_dist(tmpdir) as dist:
-            assert dist.packages == ['fake_package.sub_one']
-
-        config.write(
-            '[options]\n'
-            'packages = find:\n'
-            '\n'
-            '[options.packages.find]\n'
-            'exclude =\n'
-            '    fake_package.sub_one\n'
-        )
-        with get_dist(tmpdir) as dist:
-            assert set(dist.packages) == set(['fake_package', 'fake_package.sub_two'])
-
-    def test_find_namespace_directive(self, tmpdir):
-        dir_package, config = fake_env(
-            tmpdir, '[options]\npackages = find_namespace:\n'
-        )
-
-        make_package_dir('sub_one', dir_package)
-        make_package_dir('sub_two', dir_package, ns=True)
-
-        with get_dist(tmpdir) as dist:
-            assert set(dist.packages) == {
-                'fake_package',
-                'fake_package.sub_two',
-                'fake_package.sub_one',
-            }
-
-        config.write(
-            '[options]\n'
-            'packages = find_namespace:\n'
-            '\n'
-            '[options.packages.find]\n'
-            'where = .\n'
-            'include =\n'
-            '    fake_package.sub_one\n'
-            '    two\n'
-        )
-        with get_dist(tmpdir) as dist:
-            assert dist.packages == ['fake_package.sub_one']
-
-        config.write(
-            '[options]\n'
-            'packages = find_namespace:\n'
-            '\n'
-            '[options.packages.find]\n'
-            'exclude =\n'
-            '    fake_package.sub_one\n'
-        )
-        with get_dist(tmpdir) as dist:
-            assert set(dist.packages) == {'fake_package', 'fake_package.sub_two'}
-
-    def test_extras_require(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[options.extras_require]\n'
-            'pdf = ReportLab>=1.2; RXP\n'
-            'rest = \n'
-            '  docutils>=0.3\n'
-            '  pack ==1.1, ==1.3\n',
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert dist.extras_require == {
-                'pdf': ['ReportLab>=1.2', 'RXP'],
-                'rest': ['docutils>=0.3', 'pack==1.1,==1.3'],
-            }
-            assert set(dist.metadata.provides_extras) == {'pdf', 'rest'}
-
-    @pytest.mark.parametrize(
-        "config",
-        [
-            "[options.extras_require]\nfoo = bar;python_version<'3'",
-            "[options.extras_require]\nfoo = bar;os_name=='linux'",
-            "[options.extras_require]\nfoo = bar;python_version<'3'\n",
-            "[options.extras_require]\nfoo = bar;os_name=='linux'\n",
-            "[options]\ninstall_requires = bar;python_version<'3'",
-            "[options]\ninstall_requires = bar;os_name=='linux'",
-            "[options]\ninstall_requires = bar;python_version<'3'\n",
-            "[options]\ninstall_requires = bar;os_name=='linux'\n",
-        ],
-    )
-    @pytest.mark.xfail(IS_PYPY, reason="Exceptions missing on PyPy")
-    # TODO: investigate PyPy problem
-    def test_raises_accidental_env_marker_misconfig(self, config, tmpdir):
-        fake_env(tmpdir, config)
-        match = (
-            r"One of the parsed requirements in `(install_requires|extras_require.+)` "
-            "looks like a valid environment marker.*"
-        )
-        with pytest.raises(InvalidRequirement, match=match):
-            with get_dist(tmpdir) as _:
-                pass
-
-    @pytest.mark.parametrize(
-        "config",
-        [
-            "[options.extras_require]\nfoo = bar;python_version<3",
-            "[options.extras_require]\nfoo = bar;python_version<3\n",
-            "[options]\ninstall_requires = bar;python_version<3",
-            "[options]\ninstall_requires = bar;python_version<3\n",
-        ],
-    )
-    @pytest.mark.xfail(IS_PYPY, reason="Warnings missing on PyPy (minor issue)")
-    # TODO: investigate PyPy problem
-    def test_warn_accidental_env_marker_misconfig(self, config, tmpdir):
-        fake_env(tmpdir, config)
-        match = (
-            r"One of the parsed requirements in `(install_requires|extras_require.+)` "
-            "looks like a valid environment marker.*"
-        )
-        with pytest.warns(SetuptoolsDeprecationWarning, match=match):
-            with get_dist(tmpdir) as _:
-                pass
-
-    @pytest.mark.parametrize(
-        "config",
-        [
-            "[options.extras_require]\nfoo =\n    bar;python_version<'3'",
-            "[options.extras_require]\nfoo = bar;baz\nboo = xxx;yyy",
-            "[options.extras_require]\nfoo =\n    bar;python_version<'3'\n",
-            "[options.extras_require]\nfoo = bar;baz\nboo = xxx;yyy\n",
-            "[options.extras_require]\nfoo =\n    bar\n    python_version<3\n",
-            "[options]\ninstall_requires =\n    bar;python_version<'3'",
-            "[options]\ninstall_requires = bar;baz\nboo = xxx;yyy",
-            "[options]\ninstall_requires =\n    bar;python_version<'3'\n",
-            "[options]\ninstall_requires = bar;baz\nboo = xxx;yyy\n",
-            "[options]\ninstall_requires =\n    bar\n    python_version<3\n",
-        ],
-    )
-    @pytest.mark.filterwarnings("error::setuptools.SetuptoolsDeprecationWarning")
-    def test_nowarn_accidental_env_marker_misconfig(self, config, tmpdir, recwarn):
-        fake_env(tmpdir, config)
-        num_warnings = len(recwarn)
-        with get_dist(tmpdir) as _:
-            pass
-        # The examples are valid, no warnings shown
-        assert len(recwarn) == num_warnings
-
-    def test_dash_preserved_extras_require(self, tmpdir):
-        fake_env(tmpdir, '[options.extras_require]\nfoo-a = foo\nfoo_b = test\n')
-
-        with get_dist(tmpdir) as dist:
-            assert dist.extras_require == {'foo-a': ['foo'], 'foo_b': ['test']}
-
-    def test_entry_points(self, tmpdir):
-        _, config = fake_env(
-            tmpdir,
-            '[options.entry_points]\n'
-            'group1 = point1 = pack.module:func, '
-            '.point2 = pack.module2:func_rest [rest]\n'
-            'group2 = point3 = pack.module:func2\n',
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert dist.entry_points == {
-                'group1': [
-                    'point1 = pack.module:func',
-                    '.point2 = pack.module2:func_rest [rest]',
-                ],
-                'group2': ['point3 = pack.module:func2'],
-            }
-
-        expected = (
-            '[blogtool.parsers]\n'
-            '.rst = some.nested.module:SomeClass.some_classmethod[reST]\n'
-        )
-
-        tmpdir.join('entry_points').write(expected)
-
-        # From file.
-        config.write('[options]\nentry_points = file: entry_points\n')
-
-        with get_dist(tmpdir) as dist:
-            assert dist.entry_points == expected
-
-    def test_case_sensitive_entry_points(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[options.entry_points]\n'
-            'GROUP1 = point1 = pack.module:func, '
-            '.point2 = pack.module2:func_rest [rest]\n'
-            'group2 = point3 = pack.module:func2\n',
-        )
-
-        with get_dist(tmpdir) as dist:
-            assert dist.entry_points == {
-                'GROUP1': [
-                    'point1 = pack.module:func',
-                    '.point2 = pack.module2:func_rest [rest]',
-                ],
-                'group2': ['point3 = pack.module:func2'],
-            }
-
-    def test_data_files(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[options.data_files]\n'
-            'cfg =\n'
-            '      a/b.conf\n'
-            '      c/d.conf\n'
-            'data = e/f.dat, g/h.dat\n',
-        )
-
-        with get_dist(tmpdir) as dist:
-            expected = [
-                ('cfg', ['a/b.conf', 'c/d.conf']),
-                ('data', ['e/f.dat', 'g/h.dat']),
-            ]
-            assert sorted(dist.data_files) == sorted(expected)
-
-    def test_data_files_globby(self, tmpdir):
-        fake_env(
-            tmpdir,
-            '[options.data_files]\n'
-            'cfg =\n'
-            '      a/b.conf\n'
-            '      c/d.conf\n'
-            'data = *.dat\n'
-            'icons = \n'
-            '      *.ico\n'
-            'audio = \n'
-            '      *.wav\n'
-            '      sounds.db\n',
-        )
-
-        # Create dummy files for glob()'s sake:
-        tmpdir.join('a.dat').write('')
-        tmpdir.join('b.dat').write('')
-        tmpdir.join('c.dat').write('')
-        tmpdir.join('a.ico').write('')
-        tmpdir.join('b.ico').write('')
-        tmpdir.join('c.ico').write('')
-        tmpdir.join('beep.wav').write('')
-        tmpdir.join('boop.wav').write('')
-        tmpdir.join('sounds.db').write('')
-
-        with get_dist(tmpdir) as dist:
-            expected = [
-                ('cfg', ['a/b.conf', 'c/d.conf']),
-                ('data', ['a.dat', 'b.dat', 'c.dat']),
-                ('icons', ['a.ico', 'b.ico', 'c.ico']),
-                ('audio', ['beep.wav', 'boop.wav', 'sounds.db']),
-            ]
-            assert sorted(dist.data_files) == sorted(expected)
-
-    def test_python_requires_simple(self, tmpdir):
-        fake_env(
-            tmpdir,
-            DALS(
-                """
-            [options]
-            python_requires=>=2.7
-            """
-            ),
-        )
-        with get_dist(tmpdir) as dist:
-            dist.parse_config_files()
-
-    def test_python_requires_compound(self, tmpdir):
-        fake_env(
-            tmpdir,
-            DALS(
-                """
-            [options]
-            python_requires=>=2.7,!=3.0.*
-            """
-            ),
-        )
-        with get_dist(tmpdir) as dist:
-            dist.parse_config_files()
-
-    def test_python_requires_invalid(self, tmpdir):
-        fake_env(
-            tmpdir,
-            DALS(
-                """
-            [options]
-            python_requires=invalid
-            """
-            ),
-        )
-        with pytest.raises(Exception):
-            with get_dist(tmpdir) as dist:
-                dist.parse_config_files()
-
-    def test_cmdclass(self, tmpdir):
-        module_path = Path(tmpdir, "src/custom_build.py")  # auto discovery for src
-        module_path.parent.mkdir(parents=True, exist_ok=True)
-        module_path.write_text(
-            "from distutils.core import Command\nclass CustomCmd(Command): pass\n",
-            encoding="utf-8",
-        )
-
-        setup_cfg = """
-            [options]
-            cmdclass =
-                customcmd = custom_build.CustomCmd
-        """
-        fake_env(tmpdir, inspect.cleandoc(setup_cfg))
-
-        with get_dist(tmpdir) as dist:
-            cmdclass = dist.cmdclass['customcmd']
-            assert cmdclass.__name__ == "CustomCmd"
-            assert cmdclass.__module__ == "custom_build"
-            assert module_path.samefile(inspect.getfile(cmdclass))
-
-    def test_requirements_file(self, tmpdir):
-        fake_env(
-            tmpdir,
-            DALS(
-                """
-            [options]
-            install_requires = file:requirements.txt
-            [options.extras_require]
-            colors = file:requirements-extra.txt
-            """
-            ),
-        )
-
-        tmpdir.join('requirements.txt').write('\ndocutils>=0.3\n\n')
-        tmpdir.join('requirements-extra.txt').write('colorama')
-
-        with get_dist(tmpdir) as dist:
-            assert dist.install_requires == ['docutils>=0.3']
-            assert dist.extras_require == {'colors': ['colorama']}
-
-
-saved_dist_init = _Distribution.__init__
-
-
-class TestExternalSetters:
-    # During creation of the setuptools Distribution() object, we call
-    # the init of the parent distutils Distribution object via
-    # _Distribution.__init__ ().
-    #
-    # It's possible distutils calls out to various keyword
-    # implementations (i.e. distutils.setup_keywords entry points)
-    # that may set a range of variables.
-    #
-    # This wraps distutil's Distribution.__init__ and simulates
-    # pbr or something else setting these values.
-    def _fake_distribution_init(self, dist, attrs):
-        saved_dist_init(dist, attrs)
-        # see self._DISTUTILS_UNSUPPORTED_METADATA
-        dist.metadata.long_description_content_type = 'text/something'
-        # Test overwrite setup() args
-        dist.metadata.project_urls = {
-            'Link One': 'https://example.com/one/',
-            'Link Two': 'https://example.com/two/',
-        }
-
-    @patch.object(_Distribution, '__init__', autospec=True)
-    def test_external_setters(self, mock_parent_init, tmpdir):
-        mock_parent_init.side_effect = self._fake_distribution_init
-
-        dist = Distribution(attrs={'project_urls': {'will_be': 'ignored'}})
-
-        assert dist.metadata.long_description_content_type == 'text/something'
-        assert dist.metadata.project_urls == {
-            'Link One': 'https://example.com/one/',
-            'Link Two': 'https://example.com/two/',
-        }
diff --git a/voxvera/vendor/setuptools/tests/contexts.py b/voxvera/vendor/setuptools/tests/contexts.py
deleted file mode 100644
index 3c931bb..0000000
--- a/voxvera/vendor/setuptools/tests/contexts.py
+++ /dev/null
@@ -1,131 +0,0 @@
-import contextlib
-import io
-import os
-import shutil
-import site
-import sys
-import tempfile
-
-from filelock import FileLock
-
-
-@contextlib.contextmanager
-def tempdir(cd=lambda dir: None, **kwargs):
-    temp_dir = tempfile.mkdtemp(**kwargs)
-    orig_dir = os.getcwd()
-    try:
-        cd(temp_dir)
-        yield temp_dir
-    finally:
-        cd(orig_dir)
-        shutil.rmtree(temp_dir)
-
-
-@contextlib.contextmanager
-def environment(**replacements):
-    """
-    In a context, patch the environment with replacements. Pass None values
-    to clear the values.
-    """
-    saved = dict((key, os.environ[key]) for key in replacements if key in os.environ)
-
-    # remove values that are null
-    remove = (key for (key, value) in replacements.items() if value is None)
-    for key in list(remove):
-        os.environ.pop(key, None)
-        replacements.pop(key)
-
-    os.environ.update(replacements)
-
-    try:
-        yield saved
-    finally:
-        for key in replacements:
-            os.environ.pop(key, None)
-        os.environ.update(saved)
-
-
-@contextlib.contextmanager
-def quiet():
-    """
-    Redirect stdout/stderr to StringIO objects to prevent console output from
-    distutils commands.
-    """
-
-    old_stdout = sys.stdout
-    old_stderr = sys.stderr
-    new_stdout = sys.stdout = io.StringIO()
-    new_stderr = sys.stderr = io.StringIO()
-    try:
-        yield new_stdout, new_stderr
-    finally:
-        new_stdout.seek(0)
-        new_stderr.seek(0)
-        sys.stdout = old_stdout
-        sys.stderr = old_stderr
-
-
-@contextlib.contextmanager
-def save_user_site_setting():
-    saved = site.ENABLE_USER_SITE
-    try:
-        yield saved
-    finally:
-        site.ENABLE_USER_SITE = saved
-
-
-@contextlib.contextmanager
-def suppress_exceptions(*excs):
-    try:
-        yield
-    except excs:
-        pass
-
-
-def multiproc(request):
-    """
-    Return True if running under xdist and multiple
-    workers are used.
-    """
-    try:
-        worker_id = request.getfixturevalue('worker_id')
-    except Exception:
-        return False
-    return worker_id != 'master'
-
-
-@contextlib.contextmanager
-def session_locked_tmp_dir(request, tmp_path_factory, name):
-    """Uses a file lock to guarantee only one worker can access a temp dir"""
-    # get the temp directory shared by all workers
-    base = tmp_path_factory.getbasetemp()
-    shared_dir = base.parent if multiproc(request) else base
-
-    locked_dir = shared_dir / name
-    with FileLock(locked_dir.with_suffix(".lock")):
-        # ^-- prevent multiple workers to access the directory at once
-        locked_dir.mkdir(exist_ok=True, parents=True)
-        yield locked_dir
-
-
-@contextlib.contextmanager
-def save_paths():
-    """Make sure ``sys.path``, ``sys.meta_path`` and ``sys.path_hooks`` are preserved"""
-    prev = sys.path[:], sys.meta_path[:], sys.path_hooks[:]
-
-    try:
-        yield
-    finally:
-        sys.path, sys.meta_path, sys.path_hooks = prev
-
-
-@contextlib.contextmanager
-def save_sys_modules():
-    """Make sure initial ``sys.modules`` is preserved"""
-    prev_modules = sys.modules
-
-    try:
-        sys.modules = sys.modules.copy()
-        yield
-    finally:
-        sys.modules = prev_modules
diff --git a/voxvera/vendor/setuptools/tests/environment.py b/voxvera/vendor/setuptools/tests/environment.py
deleted file mode 100644
index ed5499e..0000000
--- a/voxvera/vendor/setuptools/tests/environment.py
+++ /dev/null
@@ -1,95 +0,0 @@
-import os
-import subprocess
-import sys
-import unicodedata
-from subprocess import PIPE as _PIPE, Popen as _Popen
-
-import jaraco.envs
-
-
-class VirtualEnv(jaraco.envs.VirtualEnv):
-    name = '.env'
-    # Some version of PyPy will import distutils on startup, implicitly
-    # importing setuptools, and thus leading to BackendInvalid errors
-    # when upgrading Setuptools. Bypass this behavior by avoiding the
-    # early availability and need to upgrade.
-    create_opts = ['--no-setuptools']
-
-    def run(self, cmd, *args, **kwargs):
-        cmd = [self.exe(cmd[0])] + cmd[1:]
-        kwargs = {"cwd": self.root, "encoding": "utf-8", **kwargs}  # Allow overriding
-        # In some environments (eg. downstream distro packaging), where:
-        # - tox isn't used to run tests and
-        # - PYTHONPATH is set to point to a specific setuptools codebase and
-        # - no custom env is explicitly set by a test
-        # PYTHONPATH will leak into the spawned processes.
-        # In that case tests look for module in the wrong place (on PYTHONPATH).
-        # Unless the test sets its own special env, pass a copy of the existing
-        # environment with removed PYTHONPATH to the subprocesses.
-        if "env" not in kwargs:
-            env = dict(os.environ)
-            if "PYTHONPATH" in env:
-                del env["PYTHONPATH"]
-            kwargs["env"] = env
-        return subprocess.check_output(cmd, *args, **kwargs)
-
-
-def _which_dirs(cmd):
-    result = set()
-    for path in os.environ.get('PATH', '').split(os.pathsep):
-        filename = os.path.join(path, cmd)
-        if os.access(filename, os.X_OK):
-            result.add(path)
-    return result
-
-
-def run_setup_py(cmd, pypath=None, path=None, data_stream=0, env=None):
-    """
-    Execution command for tests, separate from those used by the
-    code directly to prevent accidental behavior issues
-    """
-    if env is None:
-        env = dict()
-        for envname in os.environ:
-            env[envname] = os.environ[envname]
-
-    # override the python path if needed
-    if pypath is not None:
-        env["PYTHONPATH"] = pypath
-
-    # override the execution path if needed
-    if path is not None:
-        env["PATH"] = path
-    if not env.get("PATH", ""):
-        env["PATH"] = _which_dirs("tar").union(_which_dirs("gzip"))
-        env["PATH"] = os.pathsep.join(env["PATH"])
-
-    cmd = [sys.executable, "setup.py"] + list(cmd)
-
-    # https://bugs.python.org/issue8557
-    shell = sys.platform == 'win32'
-
-    try:
-        proc = _Popen(
-            cmd,
-            stdout=_PIPE,
-            stderr=_PIPE,
-            shell=shell,
-            env=env,
-            encoding="utf-8",
-        )
-
-        if isinstance(data_stream, tuple):
-            data_stream = slice(*data_stream)
-        data = proc.communicate()[data_stream]
-    except OSError:
-        return 1, ''
-
-    # decode the console string if needed
-    if hasattr(data, "decode"):
-        # use the default encoding
-        data = data.decode()
-        data = unicodedata.normalize('NFC', data)
-
-    # communicate calls wait()
-    return proc.returncode, data
diff --git a/voxvera/vendor/setuptools/tests/fixtures.py b/voxvera/vendor/setuptools/tests/fixtures.py
deleted file mode 100644
index 20b31d4..0000000
--- a/voxvera/vendor/setuptools/tests/fixtures.py
+++ /dev/null
@@ -1,406 +0,0 @@
-import contextlib
-import io
-import os
-import subprocess
-import sys
-import tarfile
-import time
-from pathlib import Path
-
-import jaraco.path
-import path
-import pytest
-
-from setuptools._normalization import safer_name
-
-from . import contexts, environment
-from .textwrap import DALS
-
-
-@pytest.fixture
-def user_override(monkeypatch):
-    """
-    Override site.USER_BASE and site.USER_SITE with temporary directories in
-    a context.
-    """
-    with contexts.tempdir() as user_base:
-        monkeypatch.setattr('site.USER_BASE', user_base)
-        with contexts.tempdir() as user_site:
-            monkeypatch.setattr('site.USER_SITE', user_site)
-            with contexts.save_user_site_setting():
-                yield
-
-
-@pytest.fixture
-def tmpdir_cwd(tmpdir):
-    with tmpdir.as_cwd() as orig:
-        yield orig
-
-
-@pytest.fixture(autouse=True, scope="session")
-def workaround_xdist_376(request):
-    """
-    Workaround pytest-dev/pytest-xdist#376
-
-    ``pytest-xdist`` tends to inject '' into ``sys.path``,
-    which may break certain isolation expectations.
-    Remove the entry so the import
-    machinery behaves the same irrespective of xdist.
-    """
-    if not request.config.pluginmanager.has_plugin('xdist'):
-        return
-
-    with contextlib.suppress(ValueError):
-        sys.path.remove('')
-
-
-@pytest.fixture
-def sample_project(tmp_path):
-    """
-    Clone the 'sampleproject' and return a path to it.
-    """
-    cmd = ['git', 'clone', 'https://github.com/pypa/sampleproject']
-    try:
-        subprocess.check_call(cmd, cwd=str(tmp_path))
-    except Exception:
-        pytest.skip("Unable to clone sampleproject")
-    return tmp_path / 'sampleproject'
-
-
-@pytest.fixture
-def sample_project_cwd(sample_project):
-    with path.Path(sample_project):
-        yield
-
-
-# sdist and wheel artifacts should be stable across a round of tests
-# so we can build them once per session and use the files as "readonly"
-
-# In the case of setuptools, building the wheel without sdist may cause
-# it to contain the `build` directory, and therefore create situations with
-# `setuptools/build/lib/build/lib/...`. To avoid that, build both artifacts at once.
-
-
-def _build_distributions(tmp_path_factory, request):
-    with contexts.session_locked_tmp_dir(
-        request, tmp_path_factory, "dist_build"
-    ) as tmp:  # pragma: no cover
-        sdist = next(tmp.glob("*.tar.gz"), None)
-        wheel = next(tmp.glob("*.whl"), None)
-        if sdist and wheel:
-            return (sdist, wheel)
-
-        # Sanity check: should not create recursive setuptools/build/lib/build/lib/...
-        assert not Path(request.config.rootdir, "build/lib/build").exists()
-
-        subprocess.check_output([
-            sys.executable,
-            "-m",
-            "build",
-            "--outdir",
-            str(tmp),
-            str(request.config.rootdir),
-        ])
-
-        # Sanity check: should not create recursive setuptools/build/lib/build/lib/...
-        assert not Path(request.config.rootdir, "build/lib/build").exists()
-
-        return next(tmp.glob("*.tar.gz")), next(tmp.glob("*.whl"))
-
-
-@pytest.fixture(scope="session")
-def setuptools_sdist(tmp_path_factory, request):
-    prebuilt = os.getenv("PRE_BUILT_SETUPTOOLS_SDIST")
-    if prebuilt and os.path.exists(prebuilt):  # pragma: no cover
-        return Path(prebuilt).resolve()
-
-    sdist, _ = _build_distributions(tmp_path_factory, request)
-    return sdist
-
-
-@pytest.fixture(scope="session")
-def setuptools_wheel(tmp_path_factory, request):
-    prebuilt = os.getenv("PRE_BUILT_SETUPTOOLS_WHEEL")
-    if prebuilt and os.path.exists(prebuilt):  # pragma: no cover
-        return Path(prebuilt).resolve()
-
-    _, wheel = _build_distributions(tmp_path_factory, request)
-    return wheel
-
-
-@pytest.fixture
-def venv(tmp_path, setuptools_wheel):
-    """Virtual env with the version of setuptools under test installed"""
-    env = environment.VirtualEnv()
-    env.root = path.Path(tmp_path / 'venv')
-    env.create_opts = ['--no-setuptools', '--wheel=bundle']
-    # TODO: Use `--no-wheel` when setuptools implements its own bdist_wheel
-    env.req = str(setuptools_wheel)
-    # In some environments (eg. downstream distro packaging),
-    # where tox isn't used to run tests and PYTHONPATH is set to point to
-    # a specific setuptools codebase, PYTHONPATH will leak into the spawned
-    # processes.
-    # env.create() should install the just created setuptools
-    # wheel, but it doesn't if it finds another existing matching setuptools
-    # installation present on PYTHONPATH:
-    # `setuptools is already installed with the same version as the provided
-    # wheel. Use --force-reinstall to force an installation of the wheel.`
-    # This prevents leaking PYTHONPATH to the created environment.
-    with contexts.environment(PYTHONPATH=None):
-        return env.create()
-
-
-@pytest.fixture
-def venv_without_setuptools(tmp_path):
-    """Virtual env without any version of setuptools installed"""
-    env = environment.VirtualEnv()
-    env.root = path.Path(tmp_path / 'venv_without_setuptools')
-    env.create_opts = ['--no-setuptools', '--no-wheel']
-    env.ensure_env()
-    return env
-
-
-@pytest.fixture
-def bare_venv(tmp_path):
-    """Virtual env without any common packages installed"""
-    env = environment.VirtualEnv()
-    env.root = path.Path(tmp_path / 'bare_venv')
-    env.create_opts = ['--no-setuptools', '--no-pip', '--no-wheel', '--no-seed']
-    env.ensure_env()
-    return env
-
-
-def make_sdist(dist_path, files):
-    """
-    Create a simple sdist tarball at dist_path, containing the files
-    listed in ``files`` as ``(filename, content)`` tuples.
-    """
-
-    # Distributions with only one file don't play well with pip.
-    assert len(files) > 1
-    with tarfile.open(dist_path, 'w:gz') as dist:
-        for filename, content in files:
-            file_bytes = io.BytesIO(content.encode('utf-8'))
-            file_info = tarfile.TarInfo(name=filename)
-            file_info.size = len(file_bytes.getvalue())
-            file_info.mtime = int(time.time())
-            dist.addfile(file_info, fileobj=file_bytes)
-
-
-def make_trivial_sdist(dist_path, distname, version, setuptools_wheel=None):
-    """
-    Create a simple sdist tarball at dist_path, containing just a simple
-    setup.py.
-
-    If ``setuptools_wheel`` is passed, a ``pyproject.toml`` file will also
-    be generated and the passed value will be used as location for
-    setuptools (as build dependency).
-    """
-    files = [
-        (
-            'setup.py',
-            DALS(
-                f"""\
-                 import setuptools
-                 setuptools.setup(
-                     name={distname!r},
-                     version={version!r}
-                 )
-                 """
-            ),
-        ),
-        ('setup.cfg', ''),
-    ]
-
-    if setuptools_wheel:
-        files.append((
-            "pyproject.toml",
-            DALS(
-                f"""\
-                [build-system]
-                requires = ["setuptools @ {setuptools_wheel.as_uri()}"]
-                build-backend = "setuptools.build_meta"
-                """
-            ),
-        ))
-
-    make_sdist(dist_path, files)
-
-
-def make_nspkg_sdist(dist_path, distname, version):
-    """
-    Make an sdist tarball with distname and version which also contains one
-    package with the same name as distname.  The top-level package is
-    designated a namespace package).
-    """
-    # Assert that the distname contains at least one period
-    assert '.' in distname
-
-    parts = distname.split('.')
-    nspackage = parts[0]
-
-    packages = ['.'.join(parts[:idx]) for idx in range(1, len(parts) + 1)]
-
-    setup_py = DALS(
-        f"""\
-        import setuptools
-        setuptools.setup(
-            name={distname!r},
-            version={version!r},
-            packages={packages!r},
-            namespace_packages=[{nspackage!r}]
-        )
-    """
-    )
-
-    init = "__import__('pkg_resources').declare_namespace(__name__)"
-
-    files = [('setup.py', setup_py), (os.path.join(nspackage, '__init__.py'), init)]
-    for package in packages[1:]:
-        filename = os.path.join(*(package.split('.') + ['__init__.py']))
-        files.append((filename, ''))
-
-    make_sdist(dist_path, files)
-
-
-def make_python_requires_sdist(dist_path, distname, version, python_requires):
-    make_sdist(
-        dist_path,
-        [
-            (
-                'setup.py',
-                DALS(
-                    """\
-                import setuptools
-                setuptools.setup(
-                  name={name!r},
-                  version={version!r},
-                  python_requires={python_requires!r},
-                )
-                """
-                ).format(
-                    name=distname, version=version, python_requires=python_requires
-                ),
-            ),
-            ('setup.cfg', ''),
-        ],
-    )
-
-
-def create_setup_requires_package(
-    path,
-    distname='foobar',
-    version='0.1',
-    make_package=make_trivial_sdist,
-    setup_py_template=None,
-    setup_attrs=None,
-    use_setup_cfg=(),
-):
-    """Creates a source tree under path for a trivial test package that has a
-    single requirement in setup_requires--a tarball for that requirement is
-    also created and added to the dependency_links argument.
-
-    ``distname`` and ``version`` refer to the name/version of the package that
-    the test package requires via ``setup_requires``.  The name of the test
-    package itself is just 'test_pkg'.
-    """
-
-    normalized_distname = safer_name(distname)
-    test_setup_attrs = {
-        'name': 'test_pkg',
-        'version': '0.0',
-        'setup_requires': [f'{normalized_distname}=={version}'],
-        'dependency_links': [os.path.abspath(path)],
-    }
-    if setup_attrs:
-        test_setup_attrs.update(setup_attrs)
-
-    test_pkg = os.path.join(path, 'test_pkg')
-    os.mkdir(test_pkg)
-
-    # setup.cfg
-    if use_setup_cfg:
-        options = []
-        metadata = []
-        for name in use_setup_cfg:
-            value = test_setup_attrs.pop(name)
-            if name in 'name version'.split():
-                section = metadata
-            else:
-                section = options
-            if isinstance(value, (tuple, list)):
-                value = ';'.join(value)
-            section.append(f'{name}: {value}')
-        test_setup_cfg_contents = DALS(
-            """
-            [metadata]
-            {metadata}
-            [options]
-            {options}
-            """
-        ).format(
-            options='\n'.join(options),
-            metadata='\n'.join(metadata),
-        )
-    else:
-        test_setup_cfg_contents = ''
-    with open(os.path.join(test_pkg, 'setup.cfg'), 'w', encoding="utf-8") as f:
-        f.write(test_setup_cfg_contents)
-
-    # setup.py
-    if setup_py_template is None:
-        setup_py_template = DALS(
-            """\
-            import setuptools
-            setuptools.setup(**%r)
-        """
-        )
-    with open(os.path.join(test_pkg, 'setup.py'), 'w', encoding="utf-8") as f:
-        f.write(setup_py_template % test_setup_attrs)
-
-    foobar_path = os.path.join(path, f'{normalized_distname}-{version}.tar.gz')
-    make_package(foobar_path, distname, version)
-
-    return test_pkg
-
-
-@pytest.fixture
-def pbr_package(tmp_path, monkeypatch, venv):
-    files = {
-        "pyproject.toml": DALS(
-            """
-            [build-system]
-            requires = ["setuptools"]
-            build-backend = "setuptools.build_meta"
-            """
-        ),
-        "setup.py": DALS(
-            """
-            __import__('setuptools').setup(
-                pbr=True,
-                setup_requires=["pbr"],
-            )
-            """
-        ),
-        "setup.cfg": DALS(
-            """
-            [metadata]
-            name = mypkg
-
-            [files]
-            packages =
-                mypkg
-            """
-        ),
-        "mypkg": {
-            "__init__.py": "",
-            "hello.py": "print('Hello world!')",
-        },
-        "other": {"test.txt": "Another file in here."},
-    }
-    venv.run(["python", "-m", "pip", "install", "pbr"])
-    prefix = tmp_path / 'mypkg'
-    prefix.mkdir()
-    jaraco.path.build(files, prefix=prefix)
-    monkeypatch.setenv('PBR_VERSION', "0.42")
-    return prefix
diff --git a/voxvera/vendor/setuptools/tests/indexes/test_links_priority/external.html b/voxvera/vendor/setuptools/tests/indexes/test_links_priority/external.html
deleted file mode 100644
index 92e4702..0000000
--- a/voxvera/vendor/setuptools/tests/indexes/test_links_priority/external.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-bad old link
-
diff --git a/voxvera/vendor/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html b/voxvera/vendor/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html
deleted file mode 100644
index fefb028..0000000
--- a/voxvera/vendor/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-foobar-0.1.tar.gz
-external homepage
- diff --git a/voxvera/vendor/setuptools/tests/integration/__init__.py b/voxvera/vendor/setuptools/tests/integration/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/setuptools/tests/integration/helpers.py b/voxvera/vendor/setuptools/tests/integration/helpers.py deleted file mode 100644 index 16b1302..0000000 --- a/voxvera/vendor/setuptools/tests/integration/helpers.py +++ /dev/null @@ -1,80 +0,0 @@ -"""Reusable functions and classes for different types of integration tests. - -For example ``Archive`` can be used to check the contents of distribution built -with setuptools, and ``run`` will always try to be as verbose as possible to -facilitate debugging. -""" - -from __future__ import annotations - -import os -import subprocess -import tarfile -from collections.abc import Iterator -from pathlib import Path -from zipfile import ZipFile, ZipInfo - - -def run(cmd, env=None): - r = subprocess.run( - cmd, - capture_output=True, - text=True, - encoding="utf-8", - env={**os.environ, **(env or {})}, - # ^-- allow overwriting instead of discarding the current env - ) - - out = r.stdout + "\n" + r.stderr - # pytest omits stdout/err by default, if the test fails they help debugging - print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") - print(f"Command: {cmd}\nreturn code: {r.returncode}\n\n{out}") - - if r.returncode == 0: - return out - raise subprocess.CalledProcessError(r.returncode, cmd, r.stdout, r.stderr) - - -class Archive: - """Compatibility layer for ZipFile/Info and TarFile/Info""" - - def __init__(self, filename) -> None: - self._filename = filename - if filename.endswith("tar.gz"): - self._obj: tarfile.TarFile | ZipFile = tarfile.open(filename, "r:gz") - elif filename.endswith("zip"): - self._obj = ZipFile(filename) - else: - raise ValueError(f"{filename} doesn't seem to be a zip or tar.gz") - - def __iter__(self) -> Iterator[ZipInfo] | Iterator[tarfile.TarInfo]: - if hasattr(self._obj, "infolist"): - return iter(self._obj.infolist()) - return iter(self._obj) - - def get_name(self, zip_or_tar_info): - if hasattr(zip_or_tar_info, "filename"): - return zip_or_tar_info.filename - return zip_or_tar_info.name - - def get_content(self, zip_or_tar_info): - if hasattr(self._obj, "extractfile"): - content = self._obj.extractfile(zip_or_tar_info) - if content is None: - msg = f"Invalid {zip_or_tar_info.name} in {self._filename}" - raise ValueError(msg) - return str(content.read(), "utf-8") - return str(self._obj.read(zip_or_tar_info), "utf-8") - - -def get_sdist_members(sdist_path): - with tarfile.open(sdist_path, "r:gz") as tar: - files = [Path(f) for f in tar.getnames()] - # remove root folder - relative_files = ("/".join(f.parts[1:]) for f in files) - return {f for f in relative_files if f} - - -def get_wheel_members(wheel_path): - with ZipFile(wheel_path) as zipfile: - return set(zipfile.namelist()) diff --git a/voxvera/vendor/setuptools/tests/integration/test_pbr.py b/voxvera/vendor/setuptools/tests/integration/test_pbr.py deleted file mode 100644 index f89e5b8..0000000 --- a/voxvera/vendor/setuptools/tests/integration/test_pbr.py +++ /dev/null @@ -1,20 +0,0 @@ -import subprocess - -import pytest - - -@pytest.mark.uses_network -def test_pbr_integration(pbr_package, venv): - """Ensure pbr packages install.""" - cmd = [ - 'python', - '-m', - 'pip', - '-v', - 'install', - '--no-build-isolation', - pbr_package, - ] - venv.run(cmd, stderr=subprocess.STDOUT) - out = venv.run(["python", "-c", "import mypkg.hello"]) - assert "Hello world!" in out diff --git a/voxvera/vendor/setuptools/tests/integration/test_pip_install_sdist.py b/voxvera/vendor/setuptools/tests/integration/test_pip_install_sdist.py deleted file mode 100644 index 4e84f21..0000000 --- a/voxvera/vendor/setuptools/tests/integration/test_pip_install_sdist.py +++ /dev/null @@ -1,223 +0,0 @@ -# https://github.com/python/mypy/issues/16936 -# mypy: disable-error-code="has-type" -"""Integration tests for setuptools that focus on building packages via pip. - -The idea behind these tests is not to exhaustively check all the possible -combinations of packages, operating systems, supporting libraries, etc, but -rather check a limited number of popular packages and how they interact with -the exposed public API. This way if any change in API is introduced, we hope to -identify backward compatibility problems before publishing a release. - -The number of tested packages is purposefully kept small, to minimise duration -and the associated maintenance cost (changes in the way these packages define -their build process may require changes in the tests). -""" - -import json -import os -import shutil -import sys -from enum import Enum -from glob import glob -from hashlib import md5 -from urllib.request import urlopen - -import pytest -from packaging.requirements import Requirement - -from .helpers import Archive, run - -pytestmark = pytest.mark.integration - - -(LATEST,) = Enum("v", "LATEST") # type: ignore[misc] # https://github.com/python/mypy/issues/16936 -"""Default version to be checked""" -# There are positive and negative aspects of checking the latest version of the -# packages. -# The main positive aspect is that the latest version might have already -# removed the use of APIs deprecated in previous releases of setuptools. - - -# Packages to be tested: -# (Please notice the test environment cannot support EVERY library required for -# compiling binary extensions. In Ubuntu/Debian nomenclature, we only assume -# that `build-essential`, `gfortran` and `libopenblas-dev` are installed, -# due to their relevance to the numerical/scientific programming ecosystem) -EXAMPLES = [ - ("pip", LATEST), # just in case... - ("pytest", LATEST), # uses setuptools_scm - ("mypy", LATEST), # custom build_py + ext_modules - # --- Popular packages: https://hugovk.github.io/top-pypi-packages/ --- - ("botocore", LATEST), - ("kiwisolver", LATEST), # build_ext - ("brotli", LATEST), # not in the list but used by urllib3 - ("pyyaml", LATEST), # cython + custom build_ext + custom distclass - ("charset-normalizer", LATEST), # uses mypyc, used by aiohttp - ("protobuf", LATEST), - # ("requests", LATEST), # XXX: https://github.com/psf/requests/pull/6920 - ("celery", LATEST), - # When adding packages to this list, make sure they expose a `__version__` - # attribute, or modify the tests below -] - - -# Some packages have "optional" dependencies that modify their build behaviour -# and are not listed in pyproject.toml, others still use `setup_requires` -EXTRA_BUILD_DEPS = { - "pyyaml": ("Cython<3.0",), # constraint to avoid errors - "charset-normalizer": ("mypy>=1.4.1",), # no pyproject.toml available -} - -EXTRA_ENV_VARS = { - "pyyaml": {"PYYAML_FORCE_CYTHON": "1"}, - "charset-normalizer": {"CHARSET_NORMALIZER_USE_MYPYC": "1"}, -} - -IMPORT_NAME = { - "pyyaml": "yaml", - "protobuf": "google.protobuf", -} - - -VIRTUALENV = (sys.executable, "-m", "virtualenv") - - -# By default, pip will try to build packages in isolation (PEP 517), which -# means it will download the previous stable version of setuptools. -# `pip` flags can avoid that (the version of setuptools under test -# should be the one to be used) -INSTALL_OPTIONS = ( - "--ignore-installed", - "--no-build-isolation", - # Omit "--no-binary :all:" the sdist is supplied directly. - # Allows dependencies as wheels. -) -# The downside of `--no-build-isolation` is that pip will not download build -# dependencies. The test script will have to also handle that. - - -@pytest.fixture -def venv_python(tmp_path): - run([*VIRTUALENV, str(tmp_path / ".venv")]) - possible_path = (str(p.parent) for p in tmp_path.glob(".venv/*/python*")) - return shutil.which("python", path=os.pathsep.join(possible_path)) - - -@pytest.fixture(autouse=True) -def _prepare(tmp_path, venv_python, monkeypatch): - download_path = os.getenv("DOWNLOAD_PATH", str(tmp_path)) - os.makedirs(download_path, exist_ok=True) - - # Environment vars used for building some of the packages - monkeypatch.setenv("USE_MYPYC", "1") - - yield - - # Let's provide the maximum amount of information possible in the case - # it is necessary to debug the tests directly from the CI logs. - print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") - print("Temporary directory:") - map(print, tmp_path.glob("*")) - print("Virtual environment:") - run([venv_python, "-m", "pip", "freeze"]) - - -@pytest.mark.parametrize(("package", "version"), EXAMPLES) -@pytest.mark.uses_network -def test_install_sdist(package, version, tmp_path, venv_python, setuptools_wheel): - venv_pip = (venv_python, "-m", "pip") - sdist = retrieve_sdist(package, version, tmp_path) - deps = build_deps(package, sdist) - if deps: - print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") - print("Dependencies:", deps) - run([*venv_pip, "install", *deps]) - - # Use a virtualenv to simulate PEP 517 isolation - # but install fresh setuptools wheel to ensure the version under development - env = EXTRA_ENV_VARS.get(package, {}) - run([*venv_pip, "install", "--force-reinstall", setuptools_wheel]) - run([*venv_pip, "install", *INSTALL_OPTIONS, sdist], env) - - # Execute a simple script to make sure the package was installed correctly - pkg = IMPORT_NAME.get(package, package).replace("-", "_") - script = f"import {pkg}; print(getattr({pkg}, '__version__', 0))" - run([venv_python, "-c", script]) - - -# ---- Helper Functions ---- - - -def retrieve_sdist(package, version, tmp_path): - """Either use cached sdist file or download it from PyPI""" - # `pip download` cannot be used due to - # https://github.com/pypa/pip/issues/1884 - # https://discuss.python.org/t/pep-625-file-name-of-a-source-distribution/4686 - # We have to find the correct distribution file and download it - download_path = os.getenv("DOWNLOAD_PATH", str(tmp_path)) - dist = retrieve_pypi_sdist_metadata(package, version) - - # Remove old files to prevent cache to grow indefinitely - for file in glob(os.path.join(download_path, f"{package}*")): - if dist["filename"] != file: - os.unlink(file) - - dist_file = os.path.join(download_path, dist["filename"]) - if not os.path.exists(dist_file): - download(dist["url"], dist_file, dist["md5_digest"]) - return dist_file - - -def retrieve_pypi_sdist_metadata(package, version): - # https://warehouse.pypa.io/api-reference/json.html - id_ = package if version is LATEST else f"{package}/{version}" - with urlopen(f"https://pypi.org/pypi/{id_}/json") as f: - metadata = json.load(f) - - if metadata["info"]["yanked"]: - raise ValueError(f"Release for {package} {version} was yanked") - - version = metadata["info"]["version"] - release = metadata["releases"][version] if version is LATEST else metadata["urls"] - (sdist,) = filter(lambda d: d["packagetype"] == "sdist", release) - return sdist - - -def download(url, dest, md5_digest): - with urlopen(url) as f: - data = f.read() - - assert md5(data).hexdigest() == md5_digest - - with open(dest, "wb") as f: - f.write(data) - - assert os.path.exists(dest) - - -def build_deps(package, sdist_file): - """Find out what are the build dependencies for a package. - - "Manually" install them, since pip will not install build - deps with `--no-build-isolation`. - """ - # delay importing, since pytest discovery phase may hit this file from a - # testenv without tomli - from setuptools.compat.py310 import tomllib - - archive = Archive(sdist_file) - info = tomllib.loads(_read_pyproject(archive)) - deps = info.get("build-system", {}).get("requires", []) - deps += EXTRA_BUILD_DEPS.get(package, []) - # Remove setuptools from requirements (and deduplicate) - requirements = {Requirement(d).name: d for d in deps} - return [v for k, v in requirements.items() if k != "setuptools"] - - -def _read_pyproject(archive): - contents = ( - archive.get_content(member) - for member in archive - if os.path.basename(archive.get_name(member)) == "pyproject.toml" - ) - return next(contents, "") diff --git a/voxvera/vendor/setuptools/tests/mod_with_constant.py b/voxvera/vendor/setuptools/tests/mod_with_constant.py deleted file mode 100644 index ef755dd..0000000 --- a/voxvera/vendor/setuptools/tests/mod_with_constant.py +++ /dev/null @@ -1 +0,0 @@ -value = 'three, sir!' diff --git a/voxvera/vendor/setuptools/tests/namespaces.py b/voxvera/vendor/setuptools/tests/namespaces.py deleted file mode 100644 index 248db98..0000000 --- a/voxvera/vendor/setuptools/tests/namespaces.py +++ /dev/null @@ -1,90 +0,0 @@ -import ast -import json -import textwrap -from pathlib import Path - - -def iter_namespace_pkgs(namespace): - parts = namespace.split(".") - for i in range(len(parts)): - yield ".".join(parts[: i + 1]) - - -def build_namespace_package(tmpdir, name, version="1.0", impl="pkg_resources"): - src_dir = tmpdir / name - src_dir.mkdir() - setup_py = src_dir / 'setup.py' - namespace, _, rest = name.rpartition('.') - namespaces = list(iter_namespace_pkgs(namespace)) - setup_args = { - "name": name, - "version": version, - "packages": namespaces, - } - - if impl == "pkg_resources": - tmpl = '__import__("pkg_resources").declare_namespace(__name__)' - setup_args["namespace_packages"] = namespaces - elif impl == "pkgutil": - tmpl = '__path__ = __import__("pkgutil").extend_path(__path__, __name__)' - else: - raise ValueError(f"Cannot recognise {impl=} when creating namespaces") - - args = json.dumps(setup_args, indent=4) - assert ast.literal_eval(args) # ensure it is valid Python - - script = textwrap.dedent( - """\ - import setuptools - args = {args} - setuptools.setup(**args) - """ - ).format(args=args) - setup_py.write_text(script, encoding='utf-8') - - ns_pkg_dir = Path(src_dir, namespace.replace(".", "/")) - ns_pkg_dir.mkdir(parents=True) - - for ns in namespaces: - pkg_init = src_dir / ns.replace(".", "/") / '__init__.py' - pkg_init.write_text(tmpl, encoding='utf-8') - - pkg_mod = ns_pkg_dir / (rest + '.py') - some_functionality = 'name = {rest!r}'.format(**locals()) - pkg_mod.write_text(some_functionality, encoding='utf-8') - return src_dir - - -def build_pep420_namespace_package(tmpdir, name): - src_dir = tmpdir / name - src_dir.mkdir() - pyproject = src_dir / "pyproject.toml" - namespace, _, rest = name.rpartition(".") - script = f"""\ - [build-system] - requires = ["setuptools"] - build-backend = "setuptools.build_meta" - - [project] - name = "{name}" - version = "3.14159" - """ - pyproject.write_text(textwrap.dedent(script), encoding='utf-8') - ns_pkg_dir = Path(src_dir, namespace.replace(".", "/")) - ns_pkg_dir.mkdir(parents=True) - pkg_mod = ns_pkg_dir / (rest + ".py") - some_functionality = f"name = {rest!r}" - pkg_mod.write_text(some_functionality, encoding='utf-8') - return src_dir - - -def make_site_dir(target): - """ - Add a sitecustomize.py module in target to cause - target to be added to site dirs such that .pth files - are processed there. - """ - sc = target / 'sitecustomize.py' - target_str = str(target) - tmpl = '__import__("site").addsitedir({target_str!r})' - sc.write_text(tmpl.format(**locals()), encoding='utf-8') diff --git a/voxvera/vendor/setuptools/tests/script-with-bom.py b/voxvera/vendor/setuptools/tests/script-with-bom.py deleted file mode 100644 index c074d26..0000000 --- a/voxvera/vendor/setuptools/tests/script-with-bom.py +++ /dev/null @@ -1 +0,0 @@ -result = 'passed' diff --git a/voxvera/vendor/setuptools/tests/test_archive_util.py b/voxvera/vendor/setuptools/tests/test_archive_util.py deleted file mode 100644 index e3efc62..0000000 --- a/voxvera/vendor/setuptools/tests/test_archive_util.py +++ /dev/null @@ -1,36 +0,0 @@ -import io -import tarfile - -import pytest - -from setuptools import archive_util - - -@pytest.fixture -def tarfile_with_unicode(tmpdir): - """ - Create a tarfile containing only a file whose name is - a zero byte file called testimäge.png. - """ - tarobj = io.BytesIO() - - with tarfile.open(fileobj=tarobj, mode="w:gz") as tgz: - data = b"" - - filename = "testimäge.png" - - t = tarfile.TarInfo(filename) - t.size = len(data) - - tgz.addfile(t, io.BytesIO(data)) - - target = tmpdir / 'unicode-pkg-1.0.tar.gz' - with open(str(target), mode='wb') as tf: - tf.write(tarobj.getvalue()) - return str(target) - - -@pytest.mark.xfail(reason="#710 and #712") -def test_unicode_files(tarfile_with_unicode, tmpdir): - target = tmpdir / 'out' - archive_util.unpack_archive(tarfile_with_unicode, str(target)) diff --git a/voxvera/vendor/setuptools/tests/test_bdist_deprecations.py b/voxvera/vendor/setuptools/tests/test_bdist_deprecations.py deleted file mode 100644 index d9d67b0..0000000 --- a/voxvera/vendor/setuptools/tests/test_bdist_deprecations.py +++ /dev/null @@ -1,28 +0,0 @@ -"""develop tests""" - -import sys -from unittest import mock - -import pytest - -from setuptools import SetuptoolsDeprecationWarning -from setuptools.dist import Distribution - - -@pytest.mark.skipif(sys.platform == 'win32', reason='non-Windows only') -@pytest.mark.xfail(reason="bdist_rpm is long deprecated, should we remove it? #1988") -@mock.patch('distutils.command.bdist_rpm.bdist_rpm') -def test_bdist_rpm_warning(distutils_cmd, tmpdir_cwd): - dist = Distribution( - dict( - script_name='setup.py', - script_args=['bdist_rpm'], - name='foo', - py_modules=['hi'], - ) - ) - dist.parse_command_line() - with pytest.warns(SetuptoolsDeprecationWarning): - dist.run_commands() - - distutils_cmd.run.assert_called_once() diff --git a/voxvera/vendor/setuptools/tests/test_bdist_egg.py b/voxvera/vendor/setuptools/tests/test_bdist_egg.py deleted file mode 100644 index 036167d..0000000 --- a/voxvera/vendor/setuptools/tests/test_bdist_egg.py +++ /dev/null @@ -1,73 +0,0 @@ -"""develop tests""" - -import os -import re -import zipfile - -import pytest - -from setuptools.dist import Distribution - -from . import contexts - -SETUP_PY = """\ -from setuptools import setup - -setup(py_modules=['hi']) -""" - - -@pytest.fixture -def setup_context(tmpdir): - with (tmpdir / 'setup.py').open('w') as f: - f.write(SETUP_PY) - with (tmpdir / 'hi.py').open('w') as f: - f.write('1\n') - with tmpdir.as_cwd(): - yield tmpdir - - -class Test: - @pytest.mark.usefixtures("user_override") - @pytest.mark.usefixtures("setup_context") - def test_bdist_egg(self): - dist = Distribution( - dict( - script_name='setup.py', - script_args=['bdist_egg'], - name='foo', - py_modules=['hi'], - ) - ) - os.makedirs(os.path.join('build', 'src')) - with contexts.quiet(): - dist.parse_command_line() - dist.run_commands() - - # let's see if we got our egg link at the right place - [content] = os.listdir('dist') - assert re.match(r'foo-0.0.0-py[23].\d+.egg$', content) - - @pytest.mark.xfail( - os.environ.get('PYTHONDONTWRITEBYTECODE', False), - reason="Byte code disabled", - ) - @pytest.mark.usefixtures("user_override") - @pytest.mark.usefixtures("setup_context") - def test_exclude_source_files(self): - dist = Distribution( - dict( - script_name='setup.py', - script_args=['bdist_egg', '--exclude-source-files'], - py_modules=['hi'], - ) - ) - with contexts.quiet(): - dist.parse_command_line() - dist.run_commands() - [dist_name] = os.listdir('dist') - dist_filename = os.path.join('dist', dist_name) - zip = zipfile.ZipFile(dist_filename) - names = list(zi.filename for zi in zip.filelist) - assert 'hi.pyc' in names - assert 'hi.py' not in names diff --git a/voxvera/vendor/setuptools/tests/test_bdist_wheel.py b/voxvera/vendor/setuptools/tests/test_bdist_wheel.py deleted file mode 100644 index 68cc0c4..0000000 --- a/voxvera/vendor/setuptools/tests/test_bdist_wheel.py +++ /dev/null @@ -1,708 +0,0 @@ -from __future__ import annotations - -import builtins -import importlib -import os.path -import platform -import shutil -import stat -import struct -import sys -import sysconfig -from contextlib import suppress -from inspect import cleandoc -from zipfile import ZipFile - -import jaraco.path -import pytest -from packaging import tags - -import setuptools -from setuptools.command.bdist_wheel import bdist_wheel, get_abi_tag -from setuptools.dist import Distribution -from setuptools.warnings import SetuptoolsDeprecationWarning - -from distutils.core import run_setup - -DEFAULT_FILES = { - "dummy_dist-1.0.dist-info/top_level.txt", - "dummy_dist-1.0.dist-info/METADATA", - "dummy_dist-1.0.dist-info/WHEEL", - "dummy_dist-1.0.dist-info/RECORD", -} -DEFAULT_LICENSE_FILES = { - "LICENSE", - "LICENSE.txt", - "LICENCE", - "LICENCE.txt", - "COPYING", - "COPYING.md", - "NOTICE", - "NOTICE.rst", - "AUTHORS", - "AUTHORS.txt", -} -OTHER_IGNORED_FILES = { - "LICENSE~", - "AUTHORS~", -} -SETUPPY_EXAMPLE = """\ -from setuptools import setup - -setup( - name='dummy_dist', - version='1.0', -) -""" - - -EXAMPLES = { - "dummy-dist": { - "setup.py": SETUPPY_EXAMPLE, - "licenses_dir": {"DUMMYFILE": ""}, - **dict.fromkeys(DEFAULT_LICENSE_FILES | OTHER_IGNORED_FILES, ""), - }, - "simple-dist": { - "setup.py": cleandoc( - """ - from setuptools import setup - - setup( - name="simple.dist", - version="0.1", - description="A testing distribution \N{SNOWMAN}", - extras_require={"voting": ["beaglevote"]}, - ) - """ - ), - "simpledist": "", - }, - "complex-dist": { - "setup.py": cleandoc( - """ - from setuptools import setup - - setup( - name="complex-dist", - version="0.1", - description="Another testing distribution \N{SNOWMAN}", - long_description="Another testing distribution \N{SNOWMAN}", - author="Illustrious Author", - author_email="illustrious@example.org", - url="http://example.org/exemplary", - packages=["complexdist"], - setup_requires=["setuptools"], - install_requires=["quux", "splort"], - extras_require={"simple": ["simple.dist"]}, - entry_points={ - "console_scripts": [ - "complex-dist=complexdist:main", - "complex-dist2=complexdist:main", - ], - }, - ) - """ - ), - "complexdist": {"__init__.py": "def main(): return"}, - }, - "headers-dist": { - "setup.py": cleandoc( - """ - from setuptools import setup - - setup( - name="headers.dist", - version="0.1", - description="A distribution with headers", - headers=["header.h"], - ) - """ - ), - "headersdist.py": "", - "header.h": "", - }, - "commasinfilenames-dist": { - "setup.py": cleandoc( - """ - from setuptools import setup - - setup( - name="testrepo", - version="0.1", - packages=["mypackage"], - description="A test package with commas in file names", - include_package_data=True, - package_data={"mypackage.data": ["*"]}, - ) - """ - ), - "mypackage": { - "__init__.py": "", - "data": {"__init__.py": "", "1,2,3.txt": ""}, - }, - "testrepo-0.1.0": { - "mypackage": {"__init__.py": ""}, - }, - }, - "unicode-dist": { - "setup.py": cleandoc( - """ - from setuptools import setup - - setup( - name="unicode.dist", - version="0.1", - description="A testing distribution \N{SNOWMAN}", - packages=["unicodedist"], - zip_safe=True, - ) - """ - ), - "unicodedist": {"__init__.py": "", "åäö_日本語.py": ""}, - }, - "utf8-metadata-dist": { - "setup.cfg": cleandoc( - """ - [metadata] - name = utf8-metadata-dist - version = 42 - author_email = "John X. Ãørçeč" , Γαμα קּ 東 - long_description = file: README.rst - """ - ), - "README.rst": "UTF-8 描述 説明", - }, - "licenses-dist": { - "setup.cfg": cleandoc( - """ - [metadata] - name = licenses-dist - version = 1.0 - license_files = **/LICENSE - """ - ), - "LICENSE": "", - "src": { - "vendor": {"LICENSE": ""}, - }, - }, -} - - -if sys.platform != "win32": - # ABI3 extensions don't really work on Windows - EXAMPLES["abi3extension-dist"] = { - "setup.py": cleandoc( - """ - from setuptools import Extension, setup - - setup( - name="extension.dist", - version="0.1", - description="A testing distribution \N{SNOWMAN}", - ext_modules=[ - Extension( - name="extension", sources=["extension.c"], py_limited_api=True - ) - ], - ) - """ - ), - "setup.cfg": "[bdist_wheel]\npy_limited_api=cp32", - "extension.c": "#define Py_LIMITED_API 0x03020000\n#include ", - } - - -def bdist_wheel_cmd(**kwargs): - """Run command in the same process so that it is easier to collect coverage""" - dist_obj = ( - run_setup("setup.py", stop_after="init") - if os.path.exists("setup.py") - else Distribution({"script_name": "%%build_meta%%"}) - ) - dist_obj.parse_config_files() - cmd = bdist_wheel(dist_obj) - for attr, value in kwargs.items(): - setattr(cmd, attr, value) - cmd.finalize_options() - return cmd - - -def mkexample(tmp_path_factory, name): - basedir = tmp_path_factory.mktemp(name) - jaraco.path.build(EXAMPLES[name], prefix=str(basedir)) - return basedir - - -@pytest.fixture(scope="session") -def wheel_paths(tmp_path_factory): - build_base = tmp_path_factory.mktemp("build") - dist_dir = tmp_path_factory.mktemp("dist") - for name in EXAMPLES: - example_dir = mkexample(tmp_path_factory, name) - build_dir = build_base / name - with jaraco.path.DirectoryStack().context(example_dir): - bdist_wheel_cmd(bdist_dir=str(build_dir), dist_dir=str(dist_dir)).run() - - return sorted(str(fname) for fname in dist_dir.glob("*.whl")) - - -@pytest.fixture -def dummy_dist(tmp_path_factory): - return mkexample(tmp_path_factory, "dummy-dist") - - -@pytest.fixture -def licenses_dist(tmp_path_factory): - return mkexample(tmp_path_factory, "licenses-dist") - - -def test_no_scripts(wheel_paths): - """Make sure entry point scripts are not generated.""" - path = next(path for path in wheel_paths if "complex_dist" in path) - for entry in ZipFile(path).infolist(): - assert ".data/scripts/" not in entry.filename - - -def test_unicode_record(wheel_paths): - path = next(path for path in wheel_paths if "unicode_dist" in path) - with ZipFile(path) as zf: - record = zf.read("unicode_dist-0.1.dist-info/RECORD") - - assert "åäö_日本語.py".encode() in record - - -UTF8_PKG_INFO = """\ -Metadata-Version: 2.1 -Name: helloworld -Version: 42 -Author-email: "John X. Ãørçeč" , Γαμα קּ 東 - - -UTF-8 描述 説明 -""" - - -def test_preserve_unicode_metadata(monkeypatch, tmp_path): - monkeypatch.chdir(tmp_path) - egginfo = tmp_path / "dummy_dist.egg-info" - distinfo = tmp_path / "dummy_dist.dist-info" - - egginfo.mkdir() - (egginfo / "PKG-INFO").write_text(UTF8_PKG_INFO, encoding="utf-8") - (egginfo / "dependency_links.txt").touch() - - class simpler_bdist_wheel(bdist_wheel): - """Avoid messing with setuptools/distutils internals""" - - def __init__(self) -> None: - pass - - @property - def license_paths(self): - return [] - - cmd_obj = simpler_bdist_wheel() - cmd_obj.egg2dist(egginfo, distinfo) - - metadata = (distinfo / "METADATA").read_text(encoding="utf-8") - assert 'Author-email: "John X. Ãørçeč"' in metadata - assert "Γαμα קּ 東 " in metadata - assert "UTF-8 描述 説明" in metadata - - -def test_licenses_default(dummy_dist, monkeypatch, tmp_path): - monkeypatch.chdir(dummy_dist) - bdist_wheel_cmd(bdist_dir=str(tmp_path)).run() - with ZipFile("dist/dummy_dist-1.0-py3-none-any.whl") as wf: - license_files = { - "dummy_dist-1.0.dist-info/licenses/" + fname - for fname in DEFAULT_LICENSE_FILES - } - assert set(wf.namelist()) == DEFAULT_FILES | license_files - - -def test_licenses_deprecated(dummy_dist, monkeypatch, tmp_path): - dummy_dist.joinpath("setup.cfg").write_text( - "[metadata]\nlicense_file=licenses_dir/DUMMYFILE", encoding="utf-8" - ) - monkeypatch.chdir(dummy_dist) - - bdist_wheel_cmd(bdist_dir=str(tmp_path)).run() - - with ZipFile("dist/dummy_dist-1.0-py3-none-any.whl") as wf: - license_files = {"dummy_dist-1.0.dist-info/licenses/licenses_dir/DUMMYFILE"} - assert set(wf.namelist()) == DEFAULT_FILES | license_files - - -@pytest.mark.parametrize( - ("config_file", "config"), - [ - ("setup.cfg", "[metadata]\nlicense_files=licenses_dir/*\n LICENSE"), - ("setup.cfg", "[metadata]\nlicense_files=licenses_dir/*, LICENSE"), - ( - "setup.py", - SETUPPY_EXAMPLE.replace( - ")", " license_files=['licenses_dir/DUMMYFILE', 'LICENSE'])" - ), - ), - ], -) -def test_licenses_override(dummy_dist, monkeypatch, tmp_path, config_file, config): - dummy_dist.joinpath(config_file).write_text(config, encoding="utf-8") - monkeypatch.chdir(dummy_dist) - bdist_wheel_cmd(bdist_dir=str(tmp_path)).run() - with ZipFile("dist/dummy_dist-1.0-py3-none-any.whl") as wf: - license_files = { - "dummy_dist-1.0.dist-info/licenses/" + fname - for fname in {"licenses_dir/DUMMYFILE", "LICENSE"} - } - assert set(wf.namelist()) == DEFAULT_FILES | license_files - metadata = wf.read("dummy_dist-1.0.dist-info/METADATA").decode("utf8") - assert "License-File: licenses_dir/DUMMYFILE" in metadata - assert "License-File: LICENSE" in metadata - - -def test_licenses_preserve_folder_structure(licenses_dist, monkeypatch, tmp_path): - monkeypatch.chdir(licenses_dist) - bdist_wheel_cmd(bdist_dir=str(tmp_path)).run() - print(os.listdir("dist")) - with ZipFile("dist/licenses_dist-1.0-py3-none-any.whl") as wf: - default_files = {name.replace("dummy_", "licenses_") for name in DEFAULT_FILES} - license_files = { - "licenses_dist-1.0.dist-info/licenses/LICENSE", - "licenses_dist-1.0.dist-info/licenses/src/vendor/LICENSE", - } - assert set(wf.namelist()) == default_files | license_files - metadata = wf.read("licenses_dist-1.0.dist-info/METADATA").decode("utf8") - assert "License-File: src/vendor/LICENSE" in metadata - assert "License-File: LICENSE" in metadata - - -def test_licenses_disabled(dummy_dist, monkeypatch, tmp_path): - dummy_dist.joinpath("setup.cfg").write_text( - "[metadata]\nlicense_files=\n", encoding="utf-8" - ) - monkeypatch.chdir(dummy_dist) - bdist_wheel_cmd(bdist_dir=str(tmp_path)).run() - with ZipFile("dist/dummy_dist-1.0-py3-none-any.whl") as wf: - assert set(wf.namelist()) == DEFAULT_FILES - - -def test_build_number(dummy_dist, monkeypatch, tmp_path): - monkeypatch.chdir(dummy_dist) - bdist_wheel_cmd(bdist_dir=str(tmp_path), build_number="2").run() - with ZipFile("dist/dummy_dist-1.0-2-py3-none-any.whl") as wf: - filenames = set(wf.namelist()) - assert "dummy_dist-1.0.dist-info/RECORD" in filenames - assert "dummy_dist-1.0.dist-info/METADATA" in filenames - - -def test_universal_deprecated(dummy_dist, monkeypatch, tmp_path): - monkeypatch.chdir(dummy_dist) - with pytest.warns(SetuptoolsDeprecationWarning, match=".*universal is deprecated"): - bdist_wheel_cmd(bdist_dir=str(tmp_path), universal=True).run() - - # For now we still respect the option - assert os.path.exists("dist/dummy_dist-1.0-py2.py3-none-any.whl") - - -EXTENSION_EXAMPLE = """\ -#include - -static PyMethodDef methods[] = { - { NULL, NULL, 0, NULL } -}; - -static struct PyModuleDef module_def = { - PyModuleDef_HEAD_INIT, - "extension", - "Dummy extension module", - -1, - methods -}; - -PyMODINIT_FUNC PyInit_extension(void) { - return PyModule_Create(&module_def); -} -""" -EXTENSION_SETUPPY = """\ -from __future__ import annotations - -from setuptools import Extension, setup - -setup( - name="extension.dist", - version="0.1", - description="A testing distribution \N{SNOWMAN}", - ext_modules=[Extension(name="extension", sources=["extension.c"])], -) -""" - - -@pytest.mark.filterwarnings( - "once:Config variable '.*' is unset.*, Python ABI tag may be incorrect" -) -def test_limited_abi(monkeypatch, tmp_path, tmp_path_factory): - """Test that building a binary wheel with the limited ABI works.""" - source_dir = tmp_path_factory.mktemp("extension_dist") - (source_dir / "setup.py").write_text(EXTENSION_SETUPPY, encoding="utf-8") - (source_dir / "extension.c").write_text(EXTENSION_EXAMPLE, encoding="utf-8") - build_dir = tmp_path.joinpath("build") - dist_dir = tmp_path.joinpath("dist") - monkeypatch.chdir(source_dir) - bdist_wheel_cmd(bdist_dir=str(build_dir), dist_dir=str(dist_dir)).run() - - -def test_build_from_readonly_tree(dummy_dist, monkeypatch, tmp_path): - basedir = str(tmp_path.joinpath("dummy")) - shutil.copytree(str(dummy_dist), basedir) - monkeypatch.chdir(basedir) - - # Make the tree read-only - for root, _dirs, files in os.walk(basedir): - for fname in files: - os.chmod(os.path.join(root, fname), stat.S_IREAD) - - bdist_wheel_cmd().run() - - -@pytest.mark.parametrize( - ("option", "compress_type"), - list(bdist_wheel.supported_compressions.items()), - ids=list(bdist_wheel.supported_compressions), -) -def test_compression(dummy_dist, monkeypatch, tmp_path, option, compress_type): - monkeypatch.chdir(dummy_dist) - bdist_wheel_cmd(bdist_dir=str(tmp_path), compression=option).run() - with ZipFile("dist/dummy_dist-1.0-py3-none-any.whl") as wf: - filenames = set(wf.namelist()) - assert "dummy_dist-1.0.dist-info/RECORD" in filenames - assert "dummy_dist-1.0.dist-info/METADATA" in filenames - for zinfo in wf.filelist: - assert zinfo.compress_type == compress_type - - -def test_wheelfile_line_endings(wheel_paths): - for path in wheel_paths: - with ZipFile(path) as wf: - wheelfile = next(fn for fn in wf.filelist if fn.filename.endswith("WHEEL")) - wheelfile_contents = wf.read(wheelfile) - assert b"\r" not in wheelfile_contents - - -def test_unix_epoch_timestamps(dummy_dist, monkeypatch, tmp_path): - monkeypatch.setenv("SOURCE_DATE_EPOCH", "0") - monkeypatch.chdir(dummy_dist) - bdist_wheel_cmd(bdist_dir=str(tmp_path), build_number="2a").run() - with ZipFile("dist/dummy_dist-1.0-2a-py3-none-any.whl") as wf: - for zinfo in wf.filelist: - assert zinfo.date_time >= (1980, 1, 1, 0, 0, 0) # min epoch is used - - -def test_get_abi_tag_windows(monkeypatch): - monkeypatch.setattr(tags, "interpreter_name", lambda: "cp") - monkeypatch.setattr(sysconfig, "get_config_var", lambda x: "cp313-win_amd64") - assert get_abi_tag() == "cp313" - monkeypatch.setattr(sys, "gettotalrefcount", lambda: 1, False) - assert get_abi_tag() == "cp313d" - monkeypatch.setattr(sysconfig, "get_config_var", lambda x: "cp313t-win_amd64") - assert get_abi_tag() == "cp313td" - monkeypatch.delattr(sys, "gettotalrefcount") - assert get_abi_tag() == "cp313t" - - -def test_get_abi_tag_pypy_old(monkeypatch): - monkeypatch.setattr(tags, "interpreter_name", lambda: "pp") - monkeypatch.setattr(sysconfig, "get_config_var", lambda x: "pypy36-pp73") - assert get_abi_tag() == "pypy36_pp73" - - -def test_get_abi_tag_pypy_new(monkeypatch): - monkeypatch.setattr(sysconfig, "get_config_var", lambda x: "pypy37-pp73-darwin") - monkeypatch.setattr(tags, "interpreter_name", lambda: "pp") - assert get_abi_tag() == "pypy37_pp73" - - -def test_get_abi_tag_graalpy(monkeypatch): - monkeypatch.setattr( - sysconfig, "get_config_var", lambda x: "graalpy231-310-native-x86_64-linux" - ) - monkeypatch.setattr(tags, "interpreter_name", lambda: "graalpy") - assert get_abi_tag() == "graalpy231_310_native" - - -def test_get_abi_tag_fallback(monkeypatch): - monkeypatch.setattr(sysconfig, "get_config_var", lambda x: "unknown-python-310") - monkeypatch.setattr(tags, "interpreter_name", lambda: "unknown-python") - assert get_abi_tag() == "unknown_python_310" - - -def test_platform_with_space(dummy_dist, monkeypatch): - """Ensure building on platforms with a space in the name succeed.""" - monkeypatch.chdir(dummy_dist) - bdist_wheel_cmd(plat_name="isilon onefs").run() - - -def test_data_dir_with_tag_build(monkeypatch, tmp_path): - """ - Setuptools allow authors to set PEP 440's local version segments - using ``egg_info.tag_build``. This should be reflected not only in the - ``.whl`` file name, but also in the ``.dist-info`` and ``.data`` dirs. - See pypa/setuptools#3997. - """ - monkeypatch.chdir(tmp_path) - files = { - "setup.py": """ - from setuptools import setup - setup(headers=["hello.h"]) - """, - "setup.cfg": """ - [metadata] - name = test - version = 1.0 - - [options.data_files] - hello/world = file.txt - - [egg_info] - tag_build = +what - tag_date = 0 - """, - "file.txt": "", - "hello.h": "", - } - for file, content in files.items(): - with open(file, "w", encoding="utf-8") as fh: - fh.write(cleandoc(content)) - - bdist_wheel_cmd().run() - - # Ensure .whl, .dist-info and .data contain the local segment - wheel_path = "dist/test-1.0+what-py3-none-any.whl" - assert os.path.exists(wheel_path) - entries = set(ZipFile(wheel_path).namelist()) - for expected in ( - "test-1.0+what.data/headers/hello.h", - "test-1.0+what.data/data/hello/world/file.txt", - "test-1.0+what.dist-info/METADATA", - "test-1.0+what.dist-info/WHEEL", - ): - assert expected in entries - - for not_expected in ( - "test.data/headers/hello.h", - "test-1.0.data/data/hello/world/file.txt", - "test.dist-info/METADATA", - "test-1.0.dist-info/WHEEL", - ): - assert not_expected not in entries - - -@pytest.mark.parametrize( - ("reported", "expected"), - [("linux-x86_64", "linux_i686"), ("linux-aarch64", "linux_armv7l")], -) -@pytest.mark.skipif( - platform.system() != "Linux", reason="Only makes sense to test on Linux" -) -def test_platform_linux32(reported, expected, monkeypatch): - monkeypatch.setattr(struct, "calcsize", lambda x: 4) - dist = setuptools.Distribution() - cmd = bdist_wheel(dist) - cmd.plat_name = reported - cmd.root_is_pure = False - _, _, actual = cmd.get_tag() - assert actual == expected - - -def test_no_ctypes(monkeypatch) -> None: - def _fake_import(name: str, *args, **kwargs): - if name == "ctypes": - raise ModuleNotFoundError(f"No module named {name}") - - return importlib.__import__(name, *args, **kwargs) - - with suppress(KeyError): - monkeypatch.delitem(sys.modules, "wheel.macosx_libfile") - - # Install an importer shim that refuses to load ctypes - monkeypatch.setattr(builtins, "__import__", _fake_import) - with pytest.raises(ModuleNotFoundError, match="No module named ctypes"): - import wheel.macosx_libfile # noqa: F401 - - # Unload and reimport the bdist_wheel command module to make sure it won't try to - # import ctypes - monkeypatch.delitem(sys.modules, "setuptools.command.bdist_wheel") - - import setuptools.command.bdist_wheel # noqa: F401 - - -def test_dist_info_provided(dummy_dist, monkeypatch, tmp_path): - monkeypatch.chdir(dummy_dist) - distinfo = tmp_path / "dummy_dist.dist-info" - - distinfo.mkdir() - (distinfo / "METADATA").write_text("name: helloworld", encoding="utf-8") - - # We don't control the metadata. According to PEP-517, "The hook MAY also - # create other files inside this directory, and a build frontend MUST - # preserve". - (distinfo / "FOO").write_text("bar", encoding="utf-8") - - bdist_wheel_cmd(bdist_dir=str(tmp_path), dist_info_dir=str(distinfo)).run() - expected = { - "dummy_dist-1.0.dist-info/FOO", - "dummy_dist-1.0.dist-info/RECORD", - } - with ZipFile("dist/dummy_dist-1.0-py3-none-any.whl") as wf: - files_found = set(wf.namelist()) - # Check that all expected files are there. - assert expected - files_found == set() - # Make sure there is no accidental egg-info bleeding into the wheel. - assert not [path for path in files_found if 'egg-info' in str(path)] - - -def test_allow_grace_period_parent_directory_license(monkeypatch, tmp_path): - # Motivation: https://github.com/pypa/setuptools/issues/4892 - # TODO: Remove this test after deprecation period is over - files = { - "LICENSE.txt": "parent license", # <---- the license files are outside - "NOTICE.txt": "parent notice", - "python": { - "pyproject.toml": cleandoc( - """ - [project] - name = "test-proj" - dynamic = ["version"] # <---- testing dynamic will not break - [tool.setuptools.dynamic] - version.file = "VERSION" - """ - ), - "setup.cfg": cleandoc( - """ - [metadata] - license_files = - ../LICENSE.txt - ../NOTICE.txt - """ - ), - "VERSION": "42", - }, - } - jaraco.path.build(files, prefix=str(tmp_path)) - monkeypatch.chdir(tmp_path / "python") - msg = "Pattern '../.*.txt' cannot contain '..'" - with pytest.warns(SetuptoolsDeprecationWarning, match=msg): - bdist_wheel_cmd().run() - with ZipFile("dist/test_proj-42-py3-none-any.whl") as wf: - files_found = set(wf.namelist()) - expected_files = { - "test_proj-42.dist-info/licenses/LICENSE.txt", - "test_proj-42.dist-info/licenses/NOTICE.txt", - } - assert expected_files <= files_found - - metadata = wf.read("test_proj-42.dist-info/METADATA").decode("utf8") - assert "License-File: LICENSE.txt" in metadata - assert "License-File: NOTICE.txt" in metadata diff --git a/voxvera/vendor/setuptools/tests/test_build.py b/voxvera/vendor/setuptools/tests/test_build.py deleted file mode 100644 index f0f1d9d..0000000 --- a/voxvera/vendor/setuptools/tests/test_build.py +++ /dev/null @@ -1,33 +0,0 @@ -from setuptools import Command -from setuptools.command.build import build -from setuptools.dist import Distribution - - -def test_distribution_gives_setuptools_build_obj(tmpdir_cwd): - """ - Check that the setuptools Distribution uses the - setuptools specific build object. - """ - - dist = Distribution( - dict( - script_name='setup.py', - script_args=['build'], - packages=[], - package_data={'': ['path/*']}, - ) - ) - assert isinstance(dist.get_command_obj("build"), build) - - -class Subcommand(Command): - """Dummy command to be used in tests""" - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - raise NotImplementedError("just to check if the command runs") diff --git a/voxvera/vendor/setuptools/tests/test_build_clib.py b/voxvera/vendor/setuptools/tests/test_build_clib.py deleted file mode 100644 index b5315df..0000000 --- a/voxvera/vendor/setuptools/tests/test_build_clib.py +++ /dev/null @@ -1,84 +0,0 @@ -import random -from unittest import mock - -import pytest - -from setuptools.command.build_clib import build_clib -from setuptools.dist import Distribution - -from distutils.errors import DistutilsSetupError - - -class TestBuildCLib: - @mock.patch('setuptools.command.build_clib.newer_pairwise_group') - def test_build_libraries(self, mock_newer): - dist = Distribution() - cmd = build_clib(dist) - - # this will be a long section, just making sure all - # exceptions are properly raised - libs = [('example', {'sources': 'broken.c'})] - with pytest.raises(DistutilsSetupError): - cmd.build_libraries(libs) - - obj_deps = 'some_string' - libs = [('example', {'sources': ['source.c'], 'obj_deps': obj_deps})] - with pytest.raises(DistutilsSetupError): - cmd.build_libraries(libs) - - obj_deps = {'': ''} - libs = [('example', {'sources': ['source.c'], 'obj_deps': obj_deps})] - with pytest.raises(DistutilsSetupError): - cmd.build_libraries(libs) - - obj_deps = {'source.c': ''} - libs = [('example', {'sources': ['source.c'], 'obj_deps': obj_deps})] - with pytest.raises(DistutilsSetupError): - cmd.build_libraries(libs) - - # with that out of the way, let's see if the crude dependency - # system works - cmd.compiler = mock.MagicMock(spec=cmd.compiler) - mock_newer.return_value = ([], []) - - obj_deps = {'': ('global.h',), 'example.c': ('example.h',)} - libs = [('example', {'sources': ['example.c'], 'obj_deps': obj_deps})] - - cmd.build_libraries(libs) - assert [['example.c', 'global.h', 'example.h']] in mock_newer.call_args[0] - assert not cmd.compiler.compile.called - assert cmd.compiler.create_static_lib.call_count == 1 - - # reset the call numbers so we can test again - cmd.compiler.reset_mock() - - mock_newer.return_value = '' # anything as long as it's not ([],[]) - cmd.build_libraries(libs) - assert cmd.compiler.compile.call_count == 1 - assert cmd.compiler.create_static_lib.call_count == 1 - - @mock.patch('setuptools.command.build_clib.newer_pairwise_group') - def test_build_libraries_reproducible(self, mock_newer): - dist = Distribution() - cmd = build_clib(dist) - - # with that out of the way, let's see if the crude dependency - # system works - cmd.compiler = mock.MagicMock(spec=cmd.compiler) - mock_newer.return_value = ([], []) - - original_sources = ['a-example.c', 'example.c'] - sources = original_sources - - obj_deps = {'': ('global.h',), 'example.c': ('example.h',)} - libs = [('example', {'sources': sources, 'obj_deps': obj_deps})] - - cmd.build_libraries(libs) - computed_call_args = mock_newer.call_args[0] - - while sources == original_sources: - sources = random.sample(original_sources, len(original_sources)) - libs = [('example', {'sources': sources, 'obj_deps': obj_deps})] - - cmd.build_libraries(libs) - assert computed_call_args == mock_newer.call_args[0] diff --git a/voxvera/vendor/setuptools/tests/test_build_ext.py b/voxvera/vendor/setuptools/tests/test_build_ext.py deleted file mode 100644 index c7b60ac..0000000 --- a/voxvera/vendor/setuptools/tests/test_build_ext.py +++ /dev/null @@ -1,293 +0,0 @@ -from __future__ import annotations - -import os -import sys -from importlib.util import cache_from_source as _compiled_file_name - -import pytest -from jaraco import path - -from setuptools.command.build_ext import build_ext, get_abi3_suffix -from setuptools.dist import Distribution -from setuptools.errors import CompileError -from setuptools.extension import Extension - -from . import environment -from .textwrap import DALS - -import distutils.command.build_ext as orig -from distutils.sysconfig import get_config_var - -IS_PYPY = '__pypy__' in sys.builtin_module_names - - -class TestBuildExt: - def test_get_ext_filename(self): - """ - Setuptools needs to give back the same - result as distutils, even if the fullname - is not in ext_map. - """ - dist = Distribution() - cmd = build_ext(dist) - cmd.ext_map['foo/bar'] = '' - res = cmd.get_ext_filename('foo') - wanted = orig.build_ext.get_ext_filename(cmd, 'foo') - assert res == wanted - - def test_abi3_filename(self): - """ - Filename needs to be loadable by several versions - of Python 3 if 'is_abi3' is truthy on Extension() - """ - print(get_abi3_suffix()) - - extension = Extension('spam.eggs', ['eggs.c'], py_limited_api=True) - dist = Distribution(dict(ext_modules=[extension])) - cmd = build_ext(dist) - cmd.finalize_options() - assert 'spam.eggs' in cmd.ext_map - res = cmd.get_ext_filename('spam.eggs') - - if not get_abi3_suffix(): - assert res.endswith(get_config_var('EXT_SUFFIX')) - elif sys.platform == 'win32': - assert res.endswith('eggs.pyd') - else: - assert 'abi3' in res - - def test_ext_suffix_override(self): - """ - SETUPTOOLS_EXT_SUFFIX variable always overrides - default extension options. - """ - dist = Distribution() - cmd = build_ext(dist) - cmd.ext_map['for_abi3'] = ext = Extension( - 'for_abi3', - ['s.c'], - # Override shouldn't affect abi3 modules - py_limited_api=True, - ) - # Mock value needed to pass tests - ext._links_to_dynamic = False - - if not IS_PYPY: - expect = cmd.get_ext_filename('for_abi3') - else: - # PyPy builds do not use ABI3 tag, so they will - # also get the overridden suffix. - expect = 'for_abi3.test-suffix' - - try: - os.environ['SETUPTOOLS_EXT_SUFFIX'] = '.test-suffix' - res = cmd.get_ext_filename('normal') - assert 'normal.test-suffix' == res - res = cmd.get_ext_filename('for_abi3') - assert expect == res - finally: - del os.environ['SETUPTOOLS_EXT_SUFFIX'] - - def dist_with_example(self): - files = { - "src": {"mypkg": {"subpkg": {"ext2.c": ""}}}, - "c-extensions": {"ext1": {"main.c": ""}}, - } - - ext1 = Extension("mypkg.ext1", ["c-extensions/ext1/main.c"]) - ext2 = Extension("mypkg.subpkg.ext2", ["src/mypkg/subpkg/ext2.c"]) - ext3 = Extension("ext3", ["c-extension/ext3.c"]) - - path.build(files) - return Distribution({ - "script_name": "%test%", - "ext_modules": [ext1, ext2, ext3], - "package_dir": {"": "src"}, - }) - - def test_get_outputs(self, tmpdir_cwd, monkeypatch): - monkeypatch.setenv('SETUPTOOLS_EXT_SUFFIX', '.mp3') # make test OS-independent - monkeypatch.setattr('setuptools.command.build_ext.use_stubs', False) - dist = self.dist_with_example() - - # Regular build: get_outputs not empty, but get_output_mappings is empty - build_ext = dist.get_command_obj("build_ext") - build_ext.editable_mode = False - build_ext.ensure_finalized() - build_lib = build_ext.build_lib.replace(os.sep, "/") - outputs = [x.replace(os.sep, "/") for x in build_ext.get_outputs()] - assert outputs == [ - f"{build_lib}/ext3.mp3", - f"{build_lib}/mypkg/ext1.mp3", - f"{build_lib}/mypkg/subpkg/ext2.mp3", - ] - assert build_ext.get_output_mapping() == {} - - # Editable build: get_output_mappings should contain everything in get_outputs - dist.reinitialize_command("build_ext") - build_ext.editable_mode = True - build_ext.ensure_finalized() - mapping = { - k.replace(os.sep, "/"): v.replace(os.sep, "/") - for k, v in build_ext.get_output_mapping().items() - } - assert mapping == { - f"{build_lib}/ext3.mp3": "src/ext3.mp3", - f"{build_lib}/mypkg/ext1.mp3": "src/mypkg/ext1.mp3", - f"{build_lib}/mypkg/subpkg/ext2.mp3": "src/mypkg/subpkg/ext2.mp3", - } - - def test_get_output_mapping_with_stub(self, tmpdir_cwd, monkeypatch): - monkeypatch.setenv('SETUPTOOLS_EXT_SUFFIX', '.mp3') # make test OS-independent - monkeypatch.setattr('setuptools.command.build_ext.use_stubs', True) - dist = self.dist_with_example() - - # Editable build should create compiled stubs (.pyc files only, no .py) - build_ext = dist.get_command_obj("build_ext") - build_ext.editable_mode = True - build_ext.ensure_finalized() - for ext in build_ext.extensions: - monkeypatch.setattr(ext, "_needs_stub", True) - - build_lib = build_ext.build_lib.replace(os.sep, "/") - mapping = { - k.replace(os.sep, "/"): v.replace(os.sep, "/") - for k, v in build_ext.get_output_mapping().items() - } - - def C(file): - """Make it possible to do comparisons and tests in a OS-independent way""" - return _compiled_file_name(file).replace(os.sep, "/") - - assert mapping == { - C(f"{build_lib}/ext3.py"): C("src/ext3.py"), - f"{build_lib}/ext3.mp3": "src/ext3.mp3", - C(f"{build_lib}/mypkg/ext1.py"): C("src/mypkg/ext1.py"), - f"{build_lib}/mypkg/ext1.mp3": "src/mypkg/ext1.mp3", - C(f"{build_lib}/mypkg/subpkg/ext2.py"): C("src/mypkg/subpkg/ext2.py"), - f"{build_lib}/mypkg/subpkg/ext2.mp3": "src/mypkg/subpkg/ext2.mp3", - } - - # Ensure only the compiled stubs are present not the raw .py stub - assert f"{build_lib}/mypkg/ext1.py" not in mapping - assert f"{build_lib}/mypkg/subpkg/ext2.py" not in mapping - - # Visualize what the cached stub files look like - example_stub = C(f"{build_lib}/mypkg/ext1.py") - assert example_stub in mapping - assert example_stub.startswith(f"{build_lib}/mypkg/__pycache__/ext1") - assert example_stub.endswith(".pyc") - - -class TestBuildExtInplace: - def get_build_ext_cmd(self, optional: bool, **opts) -> build_ext: - files: dict[str, str | dict[str, dict[str, str]]] = { - "eggs.c": "#include missingheader.h\n", - ".build": {"lib": {}, "tmp": {}}, - } - path.build(files) - extension = Extension('spam.eggs', ['eggs.c'], optional=optional) - dist = Distribution(dict(ext_modules=[extension])) - dist.script_name = 'setup.py' - cmd = build_ext(dist) - vars(cmd).update(build_lib=".build/lib", build_temp=".build/tmp", **opts) - cmd.ensure_finalized() - return cmd - - def get_log_messages(self, caplog, capsys): - """ - Historically, distutils "logged" by printing to sys.std*. - Later versions adopted the logging framework. Grab - messages regardless of how they were captured. - """ - std = capsys.readouterr() - return std.out.splitlines() + std.err.splitlines() + caplog.messages - - def test_optional(self, tmpdir_cwd, caplog, capsys): - """ - If optional extensions fail to build, setuptools should show the error - in the logs but not fail to build - """ - cmd = self.get_build_ext_cmd(optional=True, inplace=True) - cmd.run() - assert any( - 'build_ext: building extension "spam.eggs" failed' - for msg in self.get_log_messages(caplog, capsys) - ) - # No compile error exception should be raised - - def test_non_optional(self, tmpdir_cwd): - # Non-optional extensions should raise an exception - cmd = self.get_build_ext_cmd(optional=False, inplace=True) - with pytest.raises(CompileError): - cmd.run() - - -def test_build_ext_config_handling(tmpdir_cwd): - files = { - 'setup.py': DALS( - """ - from setuptools import Extension, setup - setup( - name='foo', - version='0.0.0', - ext_modules=[Extension('foo', ['foo.c'])], - ) - """ - ), - 'foo.c': DALS( - """ - #include "Python.h" - - #if PY_MAJOR_VERSION >= 3 - - static struct PyModuleDef moduledef = { - PyModuleDef_HEAD_INIT, - "foo", - NULL, - 0, - NULL, - NULL, - NULL, - NULL, - NULL - }; - - #define INITERROR return NULL - - PyMODINIT_FUNC PyInit_foo(void) - - #else - - #define INITERROR return - - void initfoo(void) - - #endif - { - #if PY_MAJOR_VERSION >= 3 - PyObject *module = PyModule_Create(&moduledef); - #else - PyObject *module = Py_InitModule("extension", NULL); - #endif - if (module == NULL) - INITERROR; - #if PY_MAJOR_VERSION >= 3 - return module; - #endif - } - """ - ), - 'setup.cfg': DALS( - """ - [build] - build_base = foo_build - """ - ), - } - path.build(files) - code, (stdout, stderr) = environment.run_setup_py( - cmd=['build'], - data_stream=(0, 2), - ) - assert code == 0, f'\nSTDOUT:\n{stdout}\nSTDERR:\n{stderr}' diff --git a/voxvera/vendor/setuptools/tests/test_build_meta.py b/voxvera/vendor/setuptools/tests/test_build_meta.py deleted file mode 100644 index 2cd0a0a..0000000 --- a/voxvera/vendor/setuptools/tests/test_build_meta.py +++ /dev/null @@ -1,959 +0,0 @@ -import contextlib -import importlib -import os -import re -import shutil -import signal -import sys -import tarfile -import warnings -from concurrent import futures -from pathlib import Path -from typing import Any, Callable -from zipfile import ZipFile - -import pytest -from jaraco import path -from packaging.requirements import Requirement - -from setuptools.warnings import SetuptoolsDeprecationWarning - -from .textwrap import DALS - -SETUP_SCRIPT_STUB = "__import__('setuptools').setup()" - - -TIMEOUT = int(os.getenv("TIMEOUT_BACKEND_TEST", "180")) # in seconds -IS_PYPY = '__pypy__' in sys.builtin_module_names - - -pytestmark = pytest.mark.skipif( - sys.platform == "win32" and IS_PYPY, - reason="The combination of PyPy + Windows + pytest-xdist + ProcessPoolExecutor " - "is flaky and problematic", -) - - -class BuildBackendBase: - def __init__(self, cwd='.', env=None, backend_name='setuptools.build_meta') -> None: - self.cwd = cwd - self.env = env or {} - self.backend_name = backend_name - - -class BuildBackend(BuildBackendBase): - """PEP 517 Build Backend""" - - def __init__(self, *args, **kwargs) -> None: - super().__init__(*args, **kwargs) - self.pool = futures.ProcessPoolExecutor(max_workers=1) - - def __getattr__(self, name: str) -> Callable[..., Any]: - """Handles arbitrary function invocations on the build backend.""" - - def method(*args, **kw): - root = os.path.abspath(self.cwd) - caller = BuildBackendCaller(root, self.env, self.backend_name) - pid = None - try: - pid = self.pool.submit(os.getpid).result(TIMEOUT) - return self.pool.submit(caller, name, *args, **kw).result(TIMEOUT) - except futures.TimeoutError: - self.pool.shutdown(wait=False) # doesn't stop already running processes - self._kill(pid) - pytest.xfail(f"Backend did not respond before timeout ({TIMEOUT} s)") - except (futures.process.BrokenProcessPool, MemoryError, OSError): - if IS_PYPY: - pytest.xfail("PyPy frequently fails tests with ProcessPoolExector") - raise - - return method - - def _kill(self, pid): - if pid is None: - return - with contextlib.suppress(ProcessLookupError, OSError): - os.kill(pid, signal.SIGTERM if os.name == "nt" else signal.SIGKILL) - - -class BuildBackendCaller(BuildBackendBase): - def __init__(self, *args, **kwargs) -> None: - super().__init__(*args, **kwargs) - - (self.backend_name, _, self.backend_obj) = self.backend_name.partition(':') - - def __call__(self, name, *args, **kw) -> Any: - """Handles arbitrary function invocations on the build backend.""" - os.chdir(self.cwd) - os.environ.update(self.env) - mod = importlib.import_module(self.backend_name) - - if self.backend_obj: - backend = getattr(mod, self.backend_obj) - else: - backend = mod - - return getattr(backend, name)(*args, **kw) - - -defns = [ - { # simple setup.py script - 'setup.py': DALS( - """ - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'], - setup_requires=['six'], - ) - """ - ), - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - }, - { # setup.py that relies on __name__ - 'setup.py': DALS( - """ - assert __name__ == '__main__' - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'], - setup_requires=['six'], - ) - """ - ), - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - }, - { # setup.py script that runs arbitrary code - 'setup.py': DALS( - """ - variable = True - def function(): - return variable - assert variable - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'], - setup_requires=['six'], - ) - """ - ), - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - }, - { # setup.py script that constructs temp files to be included in the distribution - 'setup.py': DALS( - """ - # Some packages construct files on the fly, include them in the package, - # and immediately remove them after `setup()` (e.g. pybind11==2.9.1). - # Therefore, we cannot use `distutils.core.run_setup(..., stop_after=...)` - # to obtain a distribution object first, and then run the distutils - # commands later, because these files will be removed in the meantime. - - with open('world.py', 'w', encoding="utf-8") as f: - f.write('x = 42') - - try: - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['world'], - setup_requires=['six'], - ) - finally: - # Some packages will clean temporary files - __import__('os').unlink('world.py') - """ - ), - }, - { # setup.cfg only - 'setup.cfg': DALS( - """ - [metadata] - name = foo - version = 0.0.0 - - [options] - py_modules=hello - setup_requires=six - """ - ), - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - }, - { # setup.cfg and setup.py - 'setup.cfg': DALS( - """ - [metadata] - name = foo - version = 0.0.0 - - [options] - py_modules=hello - setup_requires=six - """ - ), - 'setup.py': "__import__('setuptools').setup()", - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - }, -] - - -class TestBuildMetaBackend: - backend_name = 'setuptools.build_meta' - - def get_build_backend(self): - return BuildBackend(backend_name=self.backend_name) - - @pytest.fixture(params=defns) - def build_backend(self, tmpdir, request): - path.build(request.param, prefix=str(tmpdir)) - with tmpdir.as_cwd(): - yield self.get_build_backend() - - def test_get_requires_for_build_wheel(self, build_backend): - actual = build_backend.get_requires_for_build_wheel() - expected = ['six'] - assert sorted(actual) == sorted(expected) - - def test_get_requires_for_build_sdist(self, build_backend): - actual = build_backend.get_requires_for_build_sdist() - expected = ['six'] - assert sorted(actual) == sorted(expected) - - def test_build_wheel(self, build_backend): - dist_dir = os.path.abspath('pip-wheel') - os.makedirs(dist_dir) - wheel_name = build_backend.build_wheel(dist_dir) - - wheel_file = os.path.join(dist_dir, wheel_name) - assert os.path.isfile(wheel_file) - - # Temporary files should be removed - assert not os.path.isfile('world.py') - - with ZipFile(wheel_file) as zipfile: - wheel_contents = set(zipfile.namelist()) - - # Each one of the examples have a single module - # that should be included in the distribution - python_scripts = (f for f in wheel_contents if f.endswith('.py')) - modules = [f for f in python_scripts if not f.endswith('setup.py')] - assert len(modules) == 1 - - @pytest.mark.parametrize('build_type', ('wheel', 'sdist')) - def test_build_with_existing_file_present(self, build_type, tmpdir_cwd): - # Building a sdist/wheel should still succeed if there's - # already a sdist/wheel in the destination directory. - files = { - 'setup.py': "from setuptools import setup\nsetup()", - 'VERSION': "0.0.1", - 'setup.cfg': DALS( - """ - [metadata] - name = foo - version = file: VERSION - """ - ), - 'pyproject.toml': DALS( - """ - [build-system] - requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta" - """ - ), - } - - path.build(files) - - dist_dir = os.path.abspath('preexisting-' + build_type) - - build_backend = self.get_build_backend() - build_method = getattr(build_backend, 'build_' + build_type) - - # Build a first sdist/wheel. - # Note: this also check the destination directory is - # successfully created if it does not exist already. - first_result = build_method(dist_dir) - - # Change version. - with open("VERSION", "wt", encoding="utf-8") as version_file: - version_file.write("0.0.2") - - # Build a *second* sdist/wheel. - second_result = build_method(dist_dir) - - assert os.path.isfile(os.path.join(dist_dir, first_result)) - assert first_result != second_result - - # And if rebuilding the exact same sdist/wheel? - open(os.path.join(dist_dir, second_result), 'wb').close() - third_result = build_method(dist_dir) - assert third_result == second_result - assert os.path.getsize(os.path.join(dist_dir, third_result)) > 0 - - @pytest.mark.parametrize("setup_script", [None, SETUP_SCRIPT_STUB]) - def test_build_with_pyproject_config(self, tmpdir, setup_script): - files = { - 'pyproject.toml': DALS( - """ - [build-system] - requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta" - - [project] - name = "foo" - license = {text = "MIT"} - description = "This is a Python package" - dynamic = ["version", "readme"] - classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers" - ] - urls = {Homepage = "http://github.com"} - dependencies = [ - "appdirs", - ] - - [project.optional-dependencies] - all = [ - "tomli>=1", - "pyscaffold>=4,<5", - 'importlib; python_version == "2.6"', - ] - - [project.scripts] - foo = "foo.cli:main" - - [tool.setuptools] - zip-safe = false - package-dir = {"" = "src"} - packages = {find = {where = ["src"]}} - license-files = ["LICENSE*"] - - [tool.setuptools.dynamic] - version = {attr = "foo.__version__"} - readme = {file = "README.rst"} - - [tool.distutils.sdist] - formats = "gztar" - """ - ), - "MANIFEST.in": DALS( - """ - global-include *.py *.txt - global-exclude *.py[cod] - """ - ), - "README.rst": "This is a ``README``", - "LICENSE.txt": "---- placeholder MIT license ----", - "src": { - "foo": { - "__init__.py": "__version__ = '0.1'", - "__init__.pyi": "__version__: str", - "cli.py": "def main(): print('hello world')", - "data.txt": "def main(): print('hello world')", - "py.typed": "", - } - }, - } - if setup_script: - files["setup.py"] = setup_script - - build_backend = self.get_build_backend() - with tmpdir.as_cwd(): - path.build(files) - msgs = [ - "'tool.setuptools.license-files' is deprecated in favor of 'project.license-files'", - "`project.license` as a TOML table is deprecated", - ] - with warnings.catch_warnings(): - for msg in msgs: - warnings.filterwarnings("ignore", msg, SetuptoolsDeprecationWarning) - sdist_path = build_backend.build_sdist("temp") - wheel_file = build_backend.build_wheel("temp") - - with tarfile.open(os.path.join(tmpdir, "temp", sdist_path)) as tar: - sdist_contents = set(tar.getnames()) - - with ZipFile(os.path.join(tmpdir, "temp", wheel_file)) as zipfile: - wheel_contents = set(zipfile.namelist()) - metadata = str(zipfile.read("foo-0.1.dist-info/METADATA"), "utf-8") - license = str( - zipfile.read("foo-0.1.dist-info/licenses/LICENSE.txt"), "utf-8" - ) - epoints = str(zipfile.read("foo-0.1.dist-info/entry_points.txt"), "utf-8") - - assert sdist_contents - {"foo-0.1/setup.py"} == { - 'foo-0.1', - 'foo-0.1/LICENSE.txt', - 'foo-0.1/MANIFEST.in', - 'foo-0.1/PKG-INFO', - 'foo-0.1/README.rst', - 'foo-0.1/pyproject.toml', - 'foo-0.1/setup.cfg', - 'foo-0.1/src', - 'foo-0.1/src/foo', - 'foo-0.1/src/foo/__init__.py', - 'foo-0.1/src/foo/__init__.pyi', - 'foo-0.1/src/foo/cli.py', - 'foo-0.1/src/foo/data.txt', - 'foo-0.1/src/foo/py.typed', - 'foo-0.1/src/foo.egg-info', - 'foo-0.1/src/foo.egg-info/PKG-INFO', - 'foo-0.1/src/foo.egg-info/SOURCES.txt', - 'foo-0.1/src/foo.egg-info/dependency_links.txt', - 'foo-0.1/src/foo.egg-info/entry_points.txt', - 'foo-0.1/src/foo.egg-info/requires.txt', - 'foo-0.1/src/foo.egg-info/top_level.txt', - 'foo-0.1/src/foo.egg-info/not-zip-safe', - } - assert wheel_contents == { - "foo/__init__.py", - "foo/__init__.pyi", # include type information by default - "foo/cli.py", - "foo/data.txt", # include_package_data defaults to True - "foo/py.typed", # include type information by default - "foo-0.1.dist-info/licenses/LICENSE.txt", - "foo-0.1.dist-info/METADATA", - "foo-0.1.dist-info/WHEEL", - "foo-0.1.dist-info/entry_points.txt", - "foo-0.1.dist-info/top_level.txt", - "foo-0.1.dist-info/RECORD", - } - assert license == "---- placeholder MIT license ----" - - for line in ( - "Summary: This is a Python package", - "License: MIT", - "License-File: LICENSE.txt", - "Classifier: Intended Audience :: Developers", - "Requires-Dist: appdirs", - "Requires-Dist: " + str(Requirement('tomli>=1 ; extra == "all"')), - "Requires-Dist: " - + str(Requirement('importlib; python_version=="2.6" and extra =="all"')), - ): - assert line in metadata, (line, metadata) - - assert metadata.strip().endswith("This is a ``README``") - assert epoints.strip() == "[console_scripts]\nfoo = foo.cli:main" - - def test_static_metadata_in_pyproject_config(self, tmpdir): - # Make sure static metadata in pyproject.toml is not overwritten by setup.py - # as required by PEP 621 - files = { - 'pyproject.toml': DALS( - """ - [build-system] - requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta" - - [project] - name = "foo" - description = "This is a Python package" - version = "42" - dependencies = ["six"] - """ - ), - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - 'setup.py': DALS( - """ - __import__('setuptools').setup( - name='bar', - version='13', - ) - """ - ), - } - build_backend = self.get_build_backend() - with tmpdir.as_cwd(): - path.build(files) - sdist_path = build_backend.build_sdist("temp") - wheel_file = build_backend.build_wheel("temp") - - assert (tmpdir / "temp/foo-42.tar.gz").exists() - assert (tmpdir / "temp/foo-42-py3-none-any.whl").exists() - assert not (tmpdir / "temp/bar-13.tar.gz").exists() - assert not (tmpdir / "temp/bar-42.tar.gz").exists() - assert not (tmpdir / "temp/foo-13.tar.gz").exists() - assert not (tmpdir / "temp/bar-13-py3-none-any.whl").exists() - assert not (tmpdir / "temp/bar-42-py3-none-any.whl").exists() - assert not (tmpdir / "temp/foo-13-py3-none-any.whl").exists() - - with tarfile.open(os.path.join(tmpdir, "temp", sdist_path)) as tar: - pkg_info = str(tar.extractfile('foo-42/PKG-INFO').read(), "utf-8") - members = tar.getnames() - assert "bar-13/PKG-INFO" not in members - - with ZipFile(os.path.join(tmpdir, "temp", wheel_file)) as zipfile: - metadata = str(zipfile.read("foo-42.dist-info/METADATA"), "utf-8") - members = zipfile.namelist() - assert "bar-13.dist-info/METADATA" not in members - - for file in pkg_info, metadata: - for line in ("Name: foo", "Version: 42"): - assert line in file - for line in ("Name: bar", "Version: 13"): - assert line not in file - - def test_build_sdist(self, build_backend): - dist_dir = os.path.abspath('pip-sdist') - os.makedirs(dist_dir) - sdist_name = build_backend.build_sdist(dist_dir) - - assert os.path.isfile(os.path.join(dist_dir, sdist_name)) - - def test_prepare_metadata_for_build_wheel(self, build_backend): - dist_dir = os.path.abspath('pip-dist-info') - os.makedirs(dist_dir) - - dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) - - assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) - - def test_prepare_metadata_inplace(self, build_backend): - """ - Some users might pass metadata_directory pre-populated with `.tox` or `.venv`. - See issue #3523. - """ - for pre_existing in [ - ".tox/python/lib/python3.10/site-packages/attrs-22.1.0.dist-info", - ".tox/python/lib/python3.10/site-packages/autocommand-2.2.1.dist-info", - ".nox/python/lib/python3.10/site-packages/build-0.8.0.dist-info", - ".venv/python3.10/site-packages/click-8.1.3.dist-info", - "venv/python3.10/site-packages/distlib-0.3.5.dist-info", - "env/python3.10/site-packages/docutils-0.19.dist-info", - ]: - os.makedirs(pre_existing, exist_ok=True) - dist_info = build_backend.prepare_metadata_for_build_wheel(".") - assert os.path.isfile(os.path.join(dist_info, 'METADATA')) - - def test_build_sdist_explicit_dist(self, build_backend): - # explicitly specifying the dist folder should work - # the folder sdist_directory and the ``--dist-dir`` can be the same - dist_dir = os.path.abspath('dist') - sdist_name = build_backend.build_sdist(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, sdist_name)) - - def test_build_sdist_version_change(self, build_backend): - sdist_into_directory = os.path.abspath("out_sdist") - os.makedirs(sdist_into_directory) - - sdist_name = build_backend.build_sdist(sdist_into_directory) - assert os.path.isfile(os.path.join(sdist_into_directory, sdist_name)) - - # if the setup.py changes subsequent call of the build meta - # should still succeed, given the - # sdist_directory the frontend specifies is empty - setup_loc = os.path.abspath("setup.py") - if not os.path.exists(setup_loc): - setup_loc = os.path.abspath("setup.cfg") - - with open(setup_loc, 'rt', encoding="utf-8") as file_handler: - content = file_handler.read() - with open(setup_loc, 'wt', encoding="utf-8") as file_handler: - file_handler.write(content.replace("version='0.0.0'", "version='0.0.1'")) - - shutil.rmtree(sdist_into_directory) - os.makedirs(sdist_into_directory) - - sdist_name = build_backend.build_sdist("out_sdist") - assert os.path.isfile(os.path.join(os.path.abspath("out_sdist"), sdist_name)) - - def test_build_sdist_pyproject_toml_exists(self, tmpdir_cwd): - files = { - 'setup.py': DALS( - """ - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'] - )""" - ), - 'hello.py': '', - 'pyproject.toml': DALS( - """ - [build-system] - requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta" - """ - ), - } - path.build(files) - build_backend = self.get_build_backend() - targz_path = build_backend.build_sdist("temp") - with tarfile.open(os.path.join("temp", targz_path)) as tar: - assert any('pyproject.toml' in name for name in tar.getnames()) - - def test_build_sdist_setup_py_exists(self, tmpdir_cwd): - # If build_sdist is called from a script other than setup.py, - # ensure setup.py is included - path.build(defns[0]) - - build_backend = self.get_build_backend() - targz_path = build_backend.build_sdist("temp") - with tarfile.open(os.path.join("temp", targz_path)) as tar: - assert any('setup.py' in name for name in tar.getnames()) - - def test_build_sdist_setup_py_manifest_excluded(self, tmpdir_cwd): - # Ensure that MANIFEST.in can exclude setup.py - files = { - 'setup.py': DALS( - """ - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'] - )""" - ), - 'hello.py': '', - 'MANIFEST.in': DALS( - """ - exclude setup.py - """ - ), - } - - path.build(files) - - build_backend = self.get_build_backend() - targz_path = build_backend.build_sdist("temp") - with tarfile.open(os.path.join("temp", targz_path)) as tar: - assert not any('setup.py' in name for name in tar.getnames()) - - def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): - files = { - 'setup.py': DALS( - """ - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'] - )""" - ), - 'hello.py': '', - 'setup.cfg': DALS( - """ - [sdist] - formats=zip - """ - ), - } - - path.build(files) - - build_backend = self.get_build_backend() - build_backend.build_sdist("temp") - - _relative_path_import_files = { - 'setup.py': DALS( - """ - __import__('setuptools').setup( - name='foo', - version=__import__('hello').__version__, - py_modules=['hello'] - )""" - ), - 'hello.py': '__version__ = "0.0.0"', - 'setup.cfg': DALS( - """ - [sdist] - formats=zip - """ - ), - } - - def test_build_sdist_relative_path_import(self, tmpdir_cwd): - path.build(self._relative_path_import_files) - build_backend = self.get_build_backend() - with pytest.raises(ImportError, match="^No module named 'hello'$"): - build_backend.build_sdist("temp") - - _simple_pyproject_example = { - "pyproject.toml": DALS( - """ - [project] - name = "proj" - version = "42" - """ - ), - "src": {"proj": {"__init__.py": ""}}, - } - - def _assert_link_tree(self, parent_dir): - """All files in the directory should be either links or hard links""" - files = list(Path(parent_dir).glob("**/*")) - assert files # Should not be empty - for file in files: - assert file.is_symlink() or os.stat(file).st_nlink > 0 - - def test_editable_without_config_settings(self, tmpdir_cwd): - """ - Sanity check to ensure tests with --mode=strict are different from the ones - without --mode. - - --mode=strict should create a local directory with a package tree. - The directory should not get created otherwise. - """ - path.build(self._simple_pyproject_example) - build_backend = self.get_build_backend() - assert not Path("build").exists() - build_backend.build_editable("temp") - assert not Path("build").exists() - - def test_build_wheel_inplace(self, tmpdir_cwd): - config_settings = {"--build-option": ["build_ext", "--inplace"]} - path.build(self._simple_pyproject_example) - build_backend = self.get_build_backend() - assert not Path("build").exists() - Path("build").mkdir() - build_backend.prepare_metadata_for_build_wheel("build", config_settings) - build_backend.build_wheel("build", config_settings) - assert Path("build/proj-42-py3-none-any.whl").exists() - - @pytest.mark.parametrize("config_settings", [{"editable-mode": "strict"}]) - def test_editable_with_config_settings(self, tmpdir_cwd, config_settings): - path.build({**self._simple_pyproject_example, '_meta': {}}) - assert not Path("build").exists() - build_backend = self.get_build_backend() - build_backend.prepare_metadata_for_build_editable("_meta", config_settings) - build_backend.build_editable("temp", config_settings, "_meta") - self._assert_link_tree(next(Path("build").glob("__editable__.*"))) - - @pytest.mark.parametrize( - ("setup_literal", "requirements"), - [ - ("'foo'", ['foo']), - ("['foo']", ['foo']), - (r"'foo\n'", ['foo']), - (r"'foo\n\n'", ['foo']), - ("['foo', 'bar']", ['foo', 'bar']), - (r"'# Has a comment line\nfoo'", ['foo']), - (r"'foo # Has an inline comment'", ['foo']), - (r"'foo \\\n >=3.0'", ['foo>=3.0']), - (r"'foo\nbar'", ['foo', 'bar']), - (r"'foo\nbar\n'", ['foo', 'bar']), - (r"['foo\n', 'bar\n']", ['foo', 'bar']), - ], - ) - @pytest.mark.parametrize('use_wheel', [True, False]) - def test_setup_requires(self, setup_literal, requirements, use_wheel, tmpdir_cwd): - files = { - 'setup.py': DALS( - """ - from setuptools import setup - - setup( - name="qux", - version="0.0.0", - py_modules=["hello"], - setup_requires={setup_literal}, - ) - """ - ).format(setup_literal=setup_literal), - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - } - - path.build(files) - - build_backend = self.get_build_backend() - - if use_wheel: - get_requires = build_backend.get_requires_for_build_wheel - else: - get_requires = build_backend.get_requires_for_build_sdist - - # Ensure that the build requirements are properly parsed - expected = sorted(requirements) - actual = get_requires() - - assert expected == sorted(actual) - - def test_setup_requires_with_auto_discovery(self, tmpdir_cwd): - # Make sure patches introduced to retrieve setup_requires don't accidentally - # activate auto-discovery and cause problems due to the incomplete set of - # attributes passed to MinimalDistribution - files = { - 'pyproject.toml': DALS( - """ - [project] - name = "proj" - version = "42" - """ - ), - "setup.py": DALS( - """ - __import__('setuptools').setup( - setup_requires=["foo"], - py_modules = ["hello", "world"] - ) - """ - ), - 'hello.py': "'hello'", - 'world.py': "'world'", - } - path.build(files) - build_backend = self.get_build_backend() - setup_requires = build_backend.get_requires_for_build_wheel() - assert setup_requires == ["foo"] - - def test_dont_install_setup_requires(self, tmpdir_cwd): - files = { - 'setup.py': DALS( - """ - from setuptools import setup - - setup( - name="qux", - version="0.0.0", - py_modules=["hello"], - setup_requires=["does-not-exist >99"], - ) - """ - ), - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - } - - path.build(files) - - build_backend = self.get_build_backend() - - dist_dir = os.path.abspath('pip-dist-info') - os.makedirs(dist_dir) - - # does-not-exist can't be satisfied, so if it attempts to install - # setup_requires, it will fail. - build_backend.prepare_metadata_for_build_wheel(dist_dir) - - _sys_argv_0_passthrough = { - 'setup.py': DALS( - """ - import os - import sys - - __import__('setuptools').setup( - name='foo', - version='0.0.0', - ) - - sys_argv = os.path.abspath(sys.argv[0]) - file_path = os.path.abspath('setup.py') - assert sys_argv == file_path - """ - ) - } - - def test_sys_argv_passthrough(self, tmpdir_cwd): - path.build(self._sys_argv_0_passthrough) - build_backend = self.get_build_backend() - with pytest.raises(AssertionError): - build_backend.build_sdist("temp") - - _setup_py_file_abspath = { - 'setup.py': DALS( - """ - import os - assert os.path.isabs(__file__) - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'], - setup_requires=['six'], - ) - """ - ) - } - - def test_setup_py_file_abspath(self, tmpdir_cwd): - path.build(self._setup_py_file_abspath) - build_backend = self.get_build_backend() - build_backend.build_sdist("temp") - - @pytest.mark.parametrize('build_hook', ('build_sdist', 'build_wheel')) - def test_build_with_empty_setuppy(self, build_backend, build_hook): - files = {'setup.py': ''} - path.build(files) - - msg = re.escape('No distribution was found.') - with pytest.raises(ValueError, match=msg): - getattr(build_backend, build_hook)("temp") - - -class TestBuildMetaLegacyBackend(TestBuildMetaBackend): - backend_name = 'setuptools.build_meta:__legacy__' - - # build_meta_legacy-specific tests - def test_build_sdist_relative_path_import(self, tmpdir_cwd): - # This must fail in build_meta, but must pass in build_meta_legacy - path.build(self._relative_path_import_files) - - build_backend = self.get_build_backend() - build_backend.build_sdist("temp") - - def test_sys_argv_passthrough(self, tmpdir_cwd): - path.build(self._sys_argv_0_passthrough) - - build_backend = self.get_build_backend() - build_backend.build_sdist("temp") - - -@pytest.mark.filterwarnings("ignore::setuptools.SetuptoolsDeprecationWarning") -def test_sys_exit_0_in_setuppy(monkeypatch, tmp_path): - """Setuptools should be resilient to setup.py with ``sys.exit(0)`` (#3973).""" - monkeypatch.chdir(tmp_path) - setuppy = """ - import sys, setuptools - setuptools.setup(name='foo', version='0.0.0') - sys.exit(0) - """ - (tmp_path / "setup.py").write_text(DALS(setuppy), encoding="utf-8") - backend = BuildBackend(backend_name="setuptools.build_meta") - assert backend.get_requires_for_build_wheel() == [] - - -def test_system_exit_in_setuppy(monkeypatch, tmp_path): - monkeypatch.chdir(tmp_path) - setuppy = "import sys; sys.exit('some error')" - (tmp_path / "setup.py").write_text(setuppy, encoding="utf-8") - with pytest.raises(SystemExit, match="some error"): - backend = BuildBackend(backend_name="setuptools.build_meta") - backend.get_requires_for_build_wheel() diff --git a/voxvera/vendor/setuptools/tests/test_build_py.py b/voxvera/vendor/setuptools/tests/test_build_py.py deleted file mode 100644 index 78848f7..0000000 --- a/voxvera/vendor/setuptools/tests/test_build_py.py +++ /dev/null @@ -1,480 +0,0 @@ -import os -import shutil -import stat -import warnings -from pathlib import Path -from unittest.mock import Mock - -import jaraco.path -import pytest - -from setuptools import SetuptoolsDeprecationWarning -from setuptools.dist import Distribution - -from .textwrap import DALS - - -def test_directories_in_package_data_glob(tmpdir_cwd): - """ - Directories matching the glob in package_data should - not be included in the package data. - - Regression test for #261. - """ - dist = Distribution( - dict( - script_name='setup.py', - script_args=['build_py'], - packages=[''], - package_data={'': ['path/*']}, - ) - ) - os.makedirs('path/subpath') - dist.parse_command_line() - dist.run_commands() - - -def test_recursive_in_package_data_glob(tmpdir_cwd): - """ - Files matching recursive globs (**) in package_data should - be included in the package data. - - #1806 - """ - dist = Distribution( - dict( - script_name='setup.py', - script_args=['build_py'], - packages=[''], - package_data={'': ['path/**/data']}, - ) - ) - os.makedirs('path/subpath/subsubpath') - open('path/subpath/subsubpath/data', 'wb').close() - - dist.parse_command_line() - dist.run_commands() - - assert stat.S_ISREG(os.stat('build/lib/path/subpath/subsubpath/data').st_mode), ( - "File is not included" - ) - - -def test_read_only(tmpdir_cwd): - """ - Ensure read-only flag is not preserved in copy - for package modules and package data, as that - causes problems with deleting read-only files on - Windows. - - #1451 - """ - dist = Distribution( - dict( - script_name='setup.py', - script_args=['build_py'], - packages=['pkg'], - package_data={'pkg': ['data.dat']}, - ) - ) - os.makedirs('pkg') - open('pkg/__init__.py', 'wb').close() - open('pkg/data.dat', 'wb').close() - os.chmod('pkg/__init__.py', stat.S_IREAD) - os.chmod('pkg/data.dat', stat.S_IREAD) - dist.parse_command_line() - dist.run_commands() - shutil.rmtree('build') - - -@pytest.mark.xfail( - 'platform.system() == "Windows"', - reason="On Windows, files do not have executable bits", - raises=AssertionError, - strict=True, -) -def test_executable_data(tmpdir_cwd): - """ - Ensure executable bit is preserved in copy for - package data, as users rely on it for scripts. - - #2041 - """ - dist = Distribution( - dict( - script_name='setup.py', - script_args=['build_py'], - packages=['pkg'], - package_data={'pkg': ['run-me']}, - ) - ) - os.makedirs('pkg') - open('pkg/__init__.py', 'wb').close() - open('pkg/run-me', 'wb').close() - os.chmod('pkg/run-me', 0o700) - - dist.parse_command_line() - dist.run_commands() - - assert os.stat('build/lib/pkg/run-me').st_mode & stat.S_IEXEC, ( - "Script is not executable" - ) - - -EXAMPLE_WITH_MANIFEST = { - "setup.cfg": DALS( - """ - [metadata] - name = mypkg - version = 42 - - [options] - include_package_data = True - packages = find: - - [options.packages.find] - exclude = *.tests* - """ - ), - "mypkg": { - "__init__.py": "", - "resource_file.txt": "", - "tests": { - "__init__.py": "", - "test_mypkg.py": "", - "test_file.txt": "", - }, - }, - "MANIFEST.in": DALS( - """ - global-include *.py *.txt - global-exclude *.py[cod] - prune dist - prune build - prune *.egg-info - """ - ), -} - - -def test_excluded_subpackages(tmpdir_cwd): - jaraco.path.build(EXAMPLE_WITH_MANIFEST) - dist = Distribution({"script_name": "%PEP 517%"}) - dist.parse_config_files() - - build_py = dist.get_command_obj("build_py") - - msg = r"Python recognizes 'mypkg\.tests' as an importable package" - with pytest.warns(SetuptoolsDeprecationWarning, match=msg): # noqa: PT031 - # TODO: To fix #3260 we need some transition period to deprecate the - # existing behavior of `include_package_data`. After the transition, we - # should remove the warning and fix the behavior. - - if os.getenv("SETUPTOOLS_USE_DISTUTILS") == "stdlib": - # pytest.warns reset the warning filter temporarily - # https://github.com/pytest-dev/pytest/issues/4011#issuecomment-423494810 - warnings.filterwarnings( - "ignore", - "'encoding' argument not specified", - module="distutils.text_file", - # This warning is already fixed in pypa/distutils but not in stdlib - ) - - build_py.finalize_options() - build_py.run() - - build_dir = Path(dist.get_command_obj("build_py").build_lib) - assert (build_dir / "mypkg/__init__.py").exists() - assert (build_dir / "mypkg/resource_file.txt").exists() - - # Setuptools is configured to ignore `mypkg.tests`, therefore the following - # files/dirs should not be included in the distribution. - for f in [ - "mypkg/tests/__init__.py", - "mypkg/tests/test_mypkg.py", - "mypkg/tests/test_file.txt", - "mypkg/tests", - ]: - with pytest.raises(AssertionError): - # TODO: Enforce the following assertion once #3260 is fixed - # (remove context manager and the following xfail). - assert not (build_dir / f).exists() - - pytest.xfail("#3260") - - -@pytest.mark.filterwarnings("ignore::setuptools.SetuptoolsDeprecationWarning") -def test_existing_egg_info(tmpdir_cwd, monkeypatch): - """When provided with the ``existing_egg_info_dir`` attribute, build_py should not - attempt to run egg_info again. - """ - # == Pre-condition == - # Generate an egg-info dir - jaraco.path.build(EXAMPLE_WITH_MANIFEST) - dist = Distribution({"script_name": "%PEP 517%"}) - dist.parse_config_files() - assert dist.include_package_data - - egg_info = dist.get_command_obj("egg_info") - dist.run_command("egg_info") - egg_info_dir = next(Path(egg_info.egg_base).glob("*.egg-info")) - assert egg_info_dir.is_dir() - - # == Setup == - build_py = dist.get_command_obj("build_py") - build_py.finalize_options() - egg_info = dist.get_command_obj("egg_info") - egg_info_run = Mock(side_effect=egg_info.run) - monkeypatch.setattr(egg_info, "run", egg_info_run) - - # == Remove caches == - # egg_info is called when build_py looks for data_files, which gets cached. - # We need to ensure it is not cached yet, otherwise it may impact on the tests - build_py.__dict__.pop('data_files', None) - dist.reinitialize_command(egg_info) - - # == Sanity check == - # Ensure that if existing_egg_info is not given, build_py attempts to run egg_info - build_py.existing_egg_info_dir = None - build_py.run() - egg_info_run.assert_called() - - # == Remove caches == - egg_info_run.reset_mock() - build_py.__dict__.pop('data_files', None) - dist.reinitialize_command(egg_info) - - # == Actual test == - # Ensure that if existing_egg_info_dir is given, egg_info doesn't run - build_py.existing_egg_info_dir = egg_info_dir - build_py.run() - egg_info_run.assert_not_called() - assert build_py.data_files - - # Make sure the list of outputs is actually OK - outputs = map(lambda x: x.replace(os.sep, "/"), build_py.get_outputs()) - assert outputs - example = str(Path(build_py.build_lib, "mypkg/__init__.py")).replace(os.sep, "/") - assert example in outputs - - -EXAMPLE_ARBITRARY_MAPPING = { - "pyproject.toml": DALS( - """ - [project] - name = "mypkg" - version = "42" - - [tool.setuptools] - packages = ["mypkg", "mypkg.sub1", "mypkg.sub2", "mypkg.sub2.nested"] - - [tool.setuptools.package-dir] - "" = "src" - "mypkg.sub2" = "src/mypkg/_sub2" - "mypkg.sub2.nested" = "other" - """ - ), - "src": { - "mypkg": { - "__init__.py": "", - "resource_file.txt": "", - "sub1": { - "__init__.py": "", - "mod1.py": "", - }, - "_sub2": { - "mod2.py": "", - }, - }, - }, - "other": { - "__init__.py": "", - "mod3.py": "", - }, - "MANIFEST.in": DALS( - """ - global-include *.py *.txt - global-exclude *.py[cod] - """ - ), -} - - -def test_get_outputs(tmpdir_cwd): - jaraco.path.build(EXAMPLE_ARBITRARY_MAPPING) - dist = Distribution({"script_name": "%test%"}) - dist.parse_config_files() - - build_py = dist.get_command_obj("build_py") - build_py.editable_mode = True - build_py.ensure_finalized() - build_lib = build_py.build_lib.replace(os.sep, "/") - outputs = {x.replace(os.sep, "/") for x in build_py.get_outputs()} - assert outputs == { - f"{build_lib}/mypkg/__init__.py", - f"{build_lib}/mypkg/resource_file.txt", - f"{build_lib}/mypkg/sub1/__init__.py", - f"{build_lib}/mypkg/sub1/mod1.py", - f"{build_lib}/mypkg/sub2/mod2.py", - f"{build_lib}/mypkg/sub2/nested/__init__.py", - f"{build_lib}/mypkg/sub2/nested/mod3.py", - } - mapping = { - k.replace(os.sep, "/"): v.replace(os.sep, "/") - for k, v in build_py.get_output_mapping().items() - } - assert mapping == { - f"{build_lib}/mypkg/__init__.py": "src/mypkg/__init__.py", - f"{build_lib}/mypkg/resource_file.txt": "src/mypkg/resource_file.txt", - f"{build_lib}/mypkg/sub1/__init__.py": "src/mypkg/sub1/__init__.py", - f"{build_lib}/mypkg/sub1/mod1.py": "src/mypkg/sub1/mod1.py", - f"{build_lib}/mypkg/sub2/mod2.py": "src/mypkg/_sub2/mod2.py", - f"{build_lib}/mypkg/sub2/nested/__init__.py": "other/__init__.py", - f"{build_lib}/mypkg/sub2/nested/mod3.py": "other/mod3.py", - } - - -class TestTypeInfoFiles: - PYPROJECTS = { - "default_pyproject": DALS( - """ - [project] - name = "foo" - version = "1" - """ - ), - "dont_include_package_data": DALS( - """ - [project] - name = "foo" - version = "1" - - [tool.setuptools] - include-package-data = false - """ - ), - "exclude_type_info": DALS( - """ - [project] - name = "foo" - version = "1" - - [tool.setuptools] - include-package-data = false - - [tool.setuptools.exclude-package-data] - "*" = ["py.typed", "*.pyi"] - """ - ), - } - - EXAMPLES = { - "simple_namespace": { - "directory_structure": { - "foo": { - "bar.pyi": "", - "py.typed": "", - "__init__.py": "", - } - }, - "expected_type_files": {"foo/bar.pyi", "foo/py.typed"}, - }, - "nested_inside_namespace": { - "directory_structure": { - "foo": { - "bar": { - "py.typed": "", - "mod.pyi": "", - } - } - }, - "expected_type_files": {"foo/bar/mod.pyi", "foo/bar/py.typed"}, - }, - "namespace_nested_inside_regular": { - "directory_structure": { - "foo": { - "namespace": { - "foo.pyi": "", - }, - "__init__.pyi": "", - "py.typed": "", - } - }, - "expected_type_files": { - "foo/namespace/foo.pyi", - "foo/__init__.pyi", - "foo/py.typed", - }, - }, - } - - @pytest.mark.parametrize( - "pyproject", - [ - "default_pyproject", - pytest.param( - "dont_include_package_data", - marks=pytest.mark.xfail(reason="pypa/setuptools#4350"), - ), - ], - ) - @pytest.mark.parametrize("example", EXAMPLES.keys()) - def test_type_files_included_by_default(self, tmpdir_cwd, pyproject, example): - structure = { - **self.EXAMPLES[example]["directory_structure"], - "pyproject.toml": self.PYPROJECTS[pyproject], - } - expected_type_files = self.EXAMPLES[example]["expected_type_files"] - jaraco.path.build(structure) - - build_py = get_finalized_build_py() - outputs = get_outputs(build_py) - assert expected_type_files <= outputs - - @pytest.mark.parametrize("pyproject", ["exclude_type_info"]) - @pytest.mark.parametrize("example", EXAMPLES.keys()) - def test_type_files_can_be_excluded(self, tmpdir_cwd, pyproject, example): - structure = { - **self.EXAMPLES[example]["directory_structure"], - "pyproject.toml": self.PYPROJECTS[pyproject], - } - expected_type_files = self.EXAMPLES[example]["expected_type_files"] - jaraco.path.build(structure) - - build_py = get_finalized_build_py() - outputs = get_outputs(build_py) - assert expected_type_files.isdisjoint(outputs) - - def test_stub_only_package(self, tmpdir_cwd): - structure = { - "pyproject.toml": DALS( - """ - [project] - name = "foo-stubs" - version = "1" - """ - ), - "foo-stubs": {"__init__.pyi": "", "bar.pyi": ""}, - } - expected_type_files = {"foo-stubs/__init__.pyi", "foo-stubs/bar.pyi"} - jaraco.path.build(structure) - - build_py = get_finalized_build_py() - outputs = get_outputs(build_py) - assert expected_type_files <= outputs - - -def get_finalized_build_py(script_name="%build_py-test%"): - dist = Distribution({"script_name": script_name}) - dist.parse_config_files() - build_py = dist.get_command_obj("build_py") - build_py.finalize_options() - return build_py - - -def get_outputs(build_py): - build_dir = Path(build_py.build_lib) - return { - os.path.relpath(x, build_dir).replace(os.sep, "/") - for x in build_py.get_outputs() - } diff --git a/voxvera/vendor/setuptools/tests/test_config_discovery.py b/voxvera/vendor/setuptools/tests/test_config_discovery.py deleted file mode 100644 index b5df820..0000000 --- a/voxvera/vendor/setuptools/tests/test_config_discovery.py +++ /dev/null @@ -1,647 +0,0 @@ -import os -import sys -from configparser import ConfigParser -from itertools import product -from typing import cast - -import jaraco.path -import pytest -from path import Path - -import setuptools # noqa: F401 # force distutils.core to be patched -from setuptools.command.sdist import sdist -from setuptools.discovery import find_package_path, find_parent_package -from setuptools.dist import Distribution -from setuptools.errors import PackageDiscoveryError - -from .contexts import quiet -from .integration.helpers import get_sdist_members, get_wheel_members, run -from .textwrap import DALS - -import distutils.core - - -class TestFindParentPackage: - def test_single_package(self, tmp_path): - # find_parent_package should find a non-namespace parent package - (tmp_path / "src/namespace/pkg/nested").mkdir(exist_ok=True, parents=True) - (tmp_path / "src/namespace/pkg/nested/__init__.py").touch() - (tmp_path / "src/namespace/pkg/__init__.py").touch() - packages = ["namespace", "namespace.pkg", "namespace.pkg.nested"] - assert find_parent_package(packages, {"": "src"}, tmp_path) == "namespace.pkg" - - def test_multiple_toplevel(self, tmp_path): - # find_parent_package should return null if the given list of packages does not - # have a single parent package - multiple = ["pkg", "pkg1", "pkg2"] - for name in multiple: - (tmp_path / f"src/{name}").mkdir(exist_ok=True, parents=True) - (tmp_path / f"src/{name}/__init__.py").touch() - assert find_parent_package(multiple, {"": "src"}, tmp_path) is None - - -class TestDiscoverPackagesAndPyModules: - """Make sure discovered values for ``packages`` and ``py_modules`` work - similarly to explicit configuration for the simple scenarios. - """ - - OPTIONS = { - # Different options according to the circumstance being tested - "explicit-src": {"package_dir": {"": "src"}, "packages": ["pkg"]}, - "variation-lib": { - "package_dir": {"": "lib"}, # variation of the source-layout - }, - "explicit-flat": {"packages": ["pkg"]}, - "explicit-single_module": {"py_modules": ["pkg"]}, - "explicit-namespace": {"packages": ["ns", "ns.pkg"]}, - "automatic-src": {}, - "automatic-flat": {}, - "automatic-single_module": {}, - "automatic-namespace": {}, - } - FILES = { - "src": ["src/pkg/__init__.py", "src/pkg/main.py"], - "lib": ["lib/pkg/__init__.py", "lib/pkg/main.py"], - "flat": ["pkg/__init__.py", "pkg/main.py"], - "single_module": ["pkg.py"], - "namespace": ["ns/pkg/__init__.py"], - } - - def _get_info(self, circumstance): - _, _, layout = circumstance.partition("-") - files = self.FILES[layout] - options = self.OPTIONS[circumstance] - return files, options - - @pytest.mark.parametrize("circumstance", OPTIONS.keys()) - def test_sdist_filelist(self, tmp_path, circumstance): - files, options = self._get_info(circumstance) - _populate_project_dir(tmp_path, files, options) - - _, cmd = _run_sdist_programatically(tmp_path, options) - - manifest = [f.replace(os.sep, "/") for f in cmd.filelist.files] - for file in files: - assert any(f.endswith(file) for f in manifest) - - @pytest.mark.parametrize("circumstance", OPTIONS.keys()) - def test_project(self, tmp_path, circumstance): - files, options = self._get_info(circumstance) - _populate_project_dir(tmp_path, files, options) - - # Simulate a pre-existing `build` directory - (tmp_path / "build").mkdir() - (tmp_path / "build/lib").mkdir() - (tmp_path / "build/bdist.linux-x86_64").mkdir() - (tmp_path / "build/bdist.linux-x86_64/file.py").touch() - (tmp_path / "build/lib/__init__.py").touch() - (tmp_path / "build/lib/file.py").touch() - (tmp_path / "dist").mkdir() - (tmp_path / "dist/file.py").touch() - - _run_build(tmp_path) - - sdist_files = get_sdist_members(next(tmp_path.glob("dist/*.tar.gz"))) - print("~~~~~ sdist_members ~~~~~") - print('\n'.join(sdist_files)) - assert sdist_files >= set(files) - - wheel_files = get_wheel_members(next(tmp_path.glob("dist/*.whl"))) - print("~~~~~ wheel_members ~~~~~") - print('\n'.join(wheel_files)) - orig_files = {f.replace("src/", "").replace("lib/", "") for f in files} - assert wheel_files >= orig_files - - # Make sure build files are not included by mistake - for file in wheel_files: - assert "build" not in files - assert "dist" not in files - - PURPOSEFULLY_EMPY = { - "setup.cfg": DALS( - """ - [metadata] - name = myproj - version = 0.0.0 - - [options] - {param} = - """ - ), - "setup.py": DALS( - """ - __import__('setuptools').setup( - name="myproj", - version="0.0.0", - {param}=[] - ) - """ - ), - "pyproject.toml": DALS( - """ - [build-system] - requires = [] - build-backend = 'setuptools.build_meta' - - [project] - name = "myproj" - version = "0.0.0" - - [tool.setuptools] - {param} = [] - """ - ), - "template-pyproject.toml": DALS( - """ - [build-system] - requires = [] - build-backend = 'setuptools.build_meta' - """ - ), - } - - @pytest.mark.parametrize( - ("config_file", "param", "circumstance"), - product( - ["setup.cfg", "setup.py", "pyproject.toml"], - ["packages", "py_modules"], - FILES.keys(), - ), - ) - def test_purposefully_empty(self, tmp_path, config_file, param, circumstance): - files = self.FILES[circumstance] + ["mod.py", "other.py", "src/pkg/__init__.py"] - _populate_project_dir(tmp_path, files, {}) - - if config_file == "pyproject.toml": - template_param = param.replace("_", "-") - else: - # Make sure build works with or without setup.cfg - pyproject = self.PURPOSEFULLY_EMPY["template-pyproject.toml"] - (tmp_path / "pyproject.toml").write_text(pyproject, encoding="utf-8") - template_param = param - - config = self.PURPOSEFULLY_EMPY[config_file].format(param=template_param) - (tmp_path / config_file).write_text(config, encoding="utf-8") - - dist = _get_dist(tmp_path, {}) - # When either parameter package or py_modules is an empty list, - # then there should be no discovery - assert getattr(dist, param) == [] - other = {"py_modules": "packages", "packages": "py_modules"}[param] - assert getattr(dist, other) is None - - @pytest.mark.parametrize( - ("extra_files", "pkgs"), - [ - (["venv/bin/simulate_venv"], {"pkg"}), - (["pkg-stubs/__init__.pyi"], {"pkg", "pkg-stubs"}), - (["other-stubs/__init__.pyi"], {"pkg", "other-stubs"}), - ( - # Type stubs can also be namespaced - ["namespace-stubs/pkg/__init__.pyi"], - {"pkg", "namespace-stubs", "namespace-stubs.pkg"}, - ), - ( - # Just the top-level package can have `-stubs`, ignore nested ones - ["namespace-stubs/pkg-stubs/__init__.pyi"], - {"pkg", "namespace-stubs"}, - ), - (["_hidden/file.py"], {"pkg"}), - (["news/finalize.py"], {"pkg"}), - ], - ) - def test_flat_layout_with_extra_files(self, tmp_path, extra_files, pkgs): - files = self.FILES["flat"] + extra_files - _populate_project_dir(tmp_path, files, {}) - dist = _get_dist(tmp_path, {}) - assert set(dist.packages) == pkgs - - @pytest.mark.parametrize( - "extra_files", - [ - ["other/__init__.py"], - ["other/finalize.py"], - ], - ) - def test_flat_layout_with_dangerous_extra_files(self, tmp_path, extra_files): - files = self.FILES["flat"] + extra_files - _populate_project_dir(tmp_path, files, {}) - with pytest.raises(PackageDiscoveryError, match="multiple (packages|modules)"): - _get_dist(tmp_path, {}) - - def test_flat_layout_with_single_module(self, tmp_path): - files = self.FILES["single_module"] + ["invalid-module-name.py"] - _populate_project_dir(tmp_path, files, {}) - dist = _get_dist(tmp_path, {}) - assert set(dist.py_modules) == {"pkg"} - - def test_flat_layout_with_multiple_modules(self, tmp_path): - files = self.FILES["single_module"] + ["valid_module_name.py"] - _populate_project_dir(tmp_path, files, {}) - with pytest.raises(PackageDiscoveryError, match="multiple (packages|modules)"): - _get_dist(tmp_path, {}) - - def test_py_modules_when_wheel_dir_is_cwd(self, tmp_path): - """Regression for issue 3692""" - from setuptools import build_meta - - pyproject = '[project]\nname = "test"\nversion = "1"' - (tmp_path / "pyproject.toml").write_text(DALS(pyproject), encoding="utf-8") - (tmp_path / "foo.py").touch() - with jaraco.path.DirectoryStack().context(tmp_path): - build_meta.build_wheel(".") - # Ensure py_modules are found - wheel_files = get_wheel_members(next(tmp_path.glob("*.whl"))) - assert "foo.py" in wheel_files - - -class TestNoConfig: - DEFAULT_VERSION = "0.0.0" # Default version given by setuptools - - EXAMPLES = { - "pkg1": ["src/pkg1.py"], - "pkg2": ["src/pkg2/__init__.py"], - "pkg3": ["src/pkg3/__init__.py", "src/pkg3-stubs/__init__.py"], - "pkg4": ["pkg4/__init__.py", "pkg4-stubs/__init__.py"], - "ns.nested.pkg1": ["src/ns/nested/pkg1/__init__.py"], - "ns.nested.pkg2": ["ns/nested/pkg2/__init__.py"], - } - - @pytest.mark.parametrize("example", EXAMPLES.keys()) - def test_discover_name(self, tmp_path, example): - _populate_project_dir(tmp_path, self.EXAMPLES[example], {}) - dist = _get_dist(tmp_path, {}) - assert dist.get_name() == example - - def test_build_with_discovered_name(self, tmp_path): - files = ["src/ns/nested/pkg/__init__.py"] - _populate_project_dir(tmp_path, files, {}) - _run_build(tmp_path, "--sdist") - # Expected distribution file - dist_file = tmp_path / f"dist/ns_nested_pkg-{self.DEFAULT_VERSION}.tar.gz" - assert dist_file.is_file() - - -class TestWithAttrDirective: - @pytest.mark.parametrize( - ("folder", "opts"), - [ - ("src", {}), - ("lib", {"packages": "find:", "packages.find": {"where": "lib"}}), - ], - ) - def test_setupcfg_metadata(self, tmp_path, folder, opts): - files = [f"{folder}/pkg/__init__.py", "setup.cfg"] - _populate_project_dir(tmp_path, files, opts) - - config = (tmp_path / "setup.cfg").read_text(encoding="utf-8") - overwrite = { - folder: {"pkg": {"__init__.py": "version = 42"}}, - "setup.cfg": "[metadata]\nversion = attr: pkg.version\n" + config, - } - jaraco.path.build(overwrite, prefix=tmp_path) - - dist = _get_dist(tmp_path, {}) - assert dist.get_name() == "pkg" - assert dist.get_version() == "42" - assert dist.package_dir - package_path = find_package_path("pkg", dist.package_dir, tmp_path) - assert os.path.exists(package_path) - assert folder in Path(package_path).parts() - - _run_build(tmp_path, "--sdist") - dist_file = tmp_path / "dist/pkg-42.tar.gz" - assert dist_file.is_file() - - def test_pyproject_metadata(self, tmp_path): - _populate_project_dir(tmp_path, ["src/pkg/__init__.py"], {}) - - overwrite = { - "src": {"pkg": {"__init__.py": "version = 42"}}, - "pyproject.toml": ( - "[project]\nname = 'pkg'\ndynamic = ['version']\n" - "[tool.setuptools.dynamic]\nversion = {attr = 'pkg.version'}\n" - ), - } - jaraco.path.build(overwrite, prefix=tmp_path) - - dist = _get_dist(tmp_path, {}) - assert dist.get_version() == "42" - assert dist.package_dir == {"": "src"} - - -class TestWithCExtension: - def _simulate_package_with_extension(self, tmp_path): - # This example is based on: https://github.com/nucleic/kiwi/tree/1.4.0 - files = [ - "benchmarks/file.py", - "docs/Makefile", - "docs/requirements.txt", - "docs/source/conf.py", - "proj/header.h", - "proj/file.py", - "py/proj.cpp", - "py/other.cpp", - "py/file.py", - "py/py.typed", - "py/tests/test_proj.py", - "README.rst", - ] - _populate_project_dir(tmp_path, files, {}) - - setup_script = """ - from setuptools import Extension, setup - - ext_modules = [ - Extension( - "proj", - ["py/proj.cpp", "py/other.cpp"], - include_dirs=["."], - language="c++", - ), - ] - setup(ext_modules=ext_modules) - """ - (tmp_path / "setup.py").write_text(DALS(setup_script), encoding="utf-8") - - def test_skip_discovery_with_setupcfg_metadata(self, tmp_path): - """Ensure that auto-discovery is not triggered when the project is based on - C-extensions only, for backward compatibility. - """ - self._simulate_package_with_extension(tmp_path) - - pyproject = """ - [build-system] - requires = [] - build-backend = 'setuptools.build_meta' - """ - (tmp_path / "pyproject.toml").write_text(DALS(pyproject), encoding="utf-8") - - setupcfg = """ - [metadata] - name = proj - version = 42 - """ - (tmp_path / "setup.cfg").write_text(DALS(setupcfg), encoding="utf-8") - - dist = _get_dist(tmp_path, {}) - assert dist.get_name() == "proj" - assert dist.get_version() == "42" - assert dist.py_modules is None - assert dist.packages is None - assert len(dist.ext_modules) == 1 - assert dist.ext_modules[0].name == "proj" - - def test_dont_skip_discovery_with_pyproject_metadata(self, tmp_path): - """When opting-in to pyproject.toml metadata, auto-discovery will be active if - the package lists C-extensions, but does not configure py-modules or packages. - - This way we ensure users with complex package layouts that would lead to the - discovery of multiple top-level modules/packages see errors and are forced to - explicitly set ``packages`` or ``py-modules``. - """ - self._simulate_package_with_extension(tmp_path) - - pyproject = """ - [project] - name = 'proj' - version = '42' - """ - (tmp_path / "pyproject.toml").write_text(DALS(pyproject), encoding="utf-8") - with pytest.raises(PackageDiscoveryError, match="multiple (packages|modules)"): - _get_dist(tmp_path, {}) - - -class TestWithPackageData: - def _simulate_package_with_data_files(self, tmp_path, src_root): - files = [ - f"{src_root}/proj/__init__.py", - f"{src_root}/proj/file1.txt", - f"{src_root}/proj/nested/file2.txt", - ] - _populate_project_dir(tmp_path, files, {}) - - manifest = """ - global-include *.py *.txt - """ - (tmp_path / "MANIFEST.in").write_text(DALS(manifest), encoding="utf-8") - - EXAMPLE_SETUPCFG = """ - [metadata] - name = proj - version = 42 - - [options] - include_package_data = True - """ - EXAMPLE_PYPROJECT = """ - [project] - name = "proj" - version = "42" - """ - - PYPROJECT_PACKAGE_DIR = """ - [tool.setuptools] - package-dir = {"" = "src"} - """ - - @pytest.mark.parametrize( - ("src_root", "files"), - [ - (".", {"setup.cfg": DALS(EXAMPLE_SETUPCFG)}), - (".", {"pyproject.toml": DALS(EXAMPLE_PYPROJECT)}), - ("src", {"setup.cfg": DALS(EXAMPLE_SETUPCFG)}), - ("src", {"pyproject.toml": DALS(EXAMPLE_PYPROJECT)}), - ( - "src", - { - "setup.cfg": DALS(EXAMPLE_SETUPCFG) - + DALS( - """ - packages = find: - package_dir = - =src - - [options.packages.find] - where = src - """ - ) - }, - ), - ( - "src", - { - "pyproject.toml": DALS(EXAMPLE_PYPROJECT) - + DALS( - """ - [tool.setuptools] - package-dir = {"" = "src"} - """ - ) - }, - ), - ], - ) - def test_include_package_data(self, tmp_path, src_root, files): - """ - Make sure auto-discovery does not affect package include_package_data. - See issue #3196. - """ - jaraco.path.build(files, prefix=str(tmp_path)) - self._simulate_package_with_data_files(tmp_path, src_root) - - expected = { - os.path.normpath(f"{src_root}/proj/file1.txt").replace(os.sep, "/"), - os.path.normpath(f"{src_root}/proj/nested/file2.txt").replace(os.sep, "/"), - } - - _run_build(tmp_path) - - sdist_files = get_sdist_members(next(tmp_path.glob("dist/*.tar.gz"))) - print("~~~~~ sdist_members ~~~~~") - print('\n'.join(sdist_files)) - assert sdist_files >= expected - - wheel_files = get_wheel_members(next(tmp_path.glob("dist/*.whl"))) - print("~~~~~ wheel_members ~~~~~") - print('\n'.join(wheel_files)) - orig_files = {f.replace("src/", "").replace("lib/", "") for f in expected} - assert wheel_files >= orig_files - - -def test_compatible_with_numpy_configuration(tmp_path): - files = [ - "dir1/__init__.py", - "dir2/__init__.py", - "file.py", - ] - _populate_project_dir(tmp_path, files, {}) - dist = Distribution({}) - dist.configuration = object() - dist.set_defaults() - assert dist.py_modules is None - assert dist.packages is None - - -def test_name_discovery_doesnt_break_cli(tmpdir_cwd): - jaraco.path.build({"pkg.py": ""}) - dist = Distribution({}) - dist.script_args = ["--name"] - dist.set_defaults() - dist.parse_command_line() # <-- no exception should be raised here. - assert dist.get_name() == "pkg" - - -def test_preserve_explicit_name_with_dynamic_version(tmpdir_cwd, monkeypatch): - """According to #3545 it seems that ``name`` discovery is running, - even when the project already explicitly sets it. - This seems to be related to parsing of dynamic versions (via ``attr`` directive), - which requires the auto-discovery of ``package_dir``. - """ - files = { - "src": { - "pkg": {"__init__.py": "__version__ = 42\n"}, - }, - "pyproject.toml": DALS( - """ - [project] - name = "myproj" # purposefully different from package name - dynamic = ["version"] - [tool.setuptools.dynamic] - version = {"attr" = "pkg.__version__"} - """ - ), - } - jaraco.path.build(files) - dist = Distribution({}) - orig_analyse_name = dist.set_defaults.analyse_name - - def spy_analyse_name(): - # We can check if name discovery was triggered by ensuring the original - # name remains instead of the package name. - orig_analyse_name() - assert dist.get_name() == "myproj" - - monkeypatch.setattr(dist.set_defaults, "analyse_name", spy_analyse_name) - dist.parse_config_files() - assert dist.get_version() == "42" - assert set(dist.packages) == {"pkg"} - - -def _populate_project_dir(root, files, options): - # NOTE: Currently pypa/build will refuse to build the project if no - # `pyproject.toml` or `setup.py` is found. So it is impossible to do - # completely "config-less" projects. - basic = { - "setup.py": "import setuptools\nsetuptools.setup()", - "README.md": "# Example Package", - "LICENSE": "Copyright (c) 2018", - } - jaraco.path.build(basic, prefix=root) - _write_setupcfg(root, options) - paths = (root / f for f in files) - for path in paths: - path.parent.mkdir(exist_ok=True, parents=True) - path.touch() - - -def _write_setupcfg(root, options): - if not options: - print("~~~~~ **NO** setup.cfg ~~~~~") - return - setupcfg = ConfigParser() - setupcfg.add_section("options") - for key, value in options.items(): - if key == "packages.find": - setupcfg.add_section(f"options.{key}") - setupcfg[f"options.{key}"].update(value) - elif isinstance(value, list): - setupcfg["options"][key] = ", ".join(value) - elif isinstance(value, dict): - str_value = "\n".join(f"\t{k} = {v}" for k, v in value.items()) - setupcfg["options"][key] = "\n" + str_value - else: - setupcfg["options"][key] = str(value) - with open(root / "setup.cfg", "w", encoding="utf-8") as f: - setupcfg.write(f) - print("~~~~~ setup.cfg ~~~~~") - print((root / "setup.cfg").read_text(encoding="utf-8")) - - -def _run_build(path, *flags): - cmd = [sys.executable, "-m", "build", "--no-isolation", *flags, str(path)] - return run(cmd, env={'DISTUTILS_DEBUG': ''}) - - -def _get_dist(dist_path, attrs): - root = "/".join(os.path.split(dist_path)) # POSIX-style - - script = dist_path / 'setup.py' - if script.exists(): - with Path(dist_path): - dist = cast( - Distribution, - distutils.core.run_setup("setup.py", {}, stop_after="init"), - ) - else: - dist = Distribution(attrs) - - dist.src_root = root - dist.script_name = "setup.py" - with Path(dist_path): - dist.parse_config_files() - - dist.set_defaults() - return dist - - -def _run_sdist_programatically(dist_path, attrs): - dist = _get_dist(dist_path, attrs) - cmd = sdist(dist) - cmd.ensure_finalized() - assert cmd.distribution.packages or cmd.distribution.py_modules - - with quiet(), Path(dist_path): - cmd.run() - - return dist, cmd diff --git a/voxvera/vendor/setuptools/tests/test_core_metadata.py b/voxvera/vendor/setuptools/tests/test_core_metadata.py deleted file mode 100644 index 5ec6df3..0000000 --- a/voxvera/vendor/setuptools/tests/test_core_metadata.py +++ /dev/null @@ -1,550 +0,0 @@ -from __future__ import annotations - -import functools -import io -from email import message_from_string -from email.generator import Generator -from email.message import EmailMessage -from email.parser import Parser -from email.policy import EmailPolicy -from inspect import cleandoc -from pathlib import Path -from unittest.mock import Mock - -import jaraco.path -import pytest -from packaging.metadata import Metadata - -from setuptools import sic -from setuptools._core_metadata import rfc822_escape, rfc822_unescape -from setuptools.config import expand, setupcfg -from setuptools.dist import Distribution - -from .config.downloads import retrieve_file, urls_from_file - -EXAMPLE_BASE_INFO = dict( - name="package", - version="0.0.1", - author="Foo Bar", - author_email="foo@bar.net", - long_description="Long\ndescription", - description="Short description", - keywords=["one", "two"], -) - - -@pytest.mark.parametrize( - ("content", "result"), - ( - pytest.param( - "Just a single line", - None, - id="single_line", - ), - pytest.param( - "Multiline\nText\nwithout\nextra indents\n", - None, - id="multiline", - ), - pytest.param( - "Multiline\n With\n\nadditional\n indentation", - None, - id="multiline_with_indentation", - ), - pytest.param( - " Leading whitespace", - "Leading whitespace", - id="remove_leading_whitespace", - ), - pytest.param( - " Leading whitespace\nIn\n Multiline comment", - "Leading whitespace\nIn\n Multiline comment", - id="remove_leading_whitespace_multiline", - ), - ), -) -def test_rfc822_unescape(content, result): - assert (result or content) == rfc822_unescape(rfc822_escape(content)) - - -def __read_test_cases(): - base = EXAMPLE_BASE_INFO - - params = functools.partial(dict, base) - - return [ - ('Metadata version 1.0', params()), - ( - 'Metadata Version 1.0: Short long description', - params( - long_description='Short long description', - ), - ), - ( - 'Metadata version 1.1: Classifiers', - params( - classifiers=[ - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', - ], - ), - ), - ( - 'Metadata version 1.1: Download URL', - params( - download_url='https://example.com', - ), - ), - ( - 'Metadata Version 1.2: Requires-Python', - params( - python_requires='>=3.7', - ), - ), - pytest.param( - 'Metadata Version 1.2: Project-Url', - params(project_urls=dict(Foo='https://example.bar')), - marks=pytest.mark.xfail( - reason="Issue #1578: project_urls not read", - ), - ), - ( - 'Metadata Version 2.1: Long Description Content Type', - params( - long_description_content_type='text/x-rst; charset=UTF-8', - ), - ), - ( - 'License', - params( - license='MIT', - ), - ), - ( - 'License multiline', - params( - license='This is a long license \nover multiple lines', - ), - ), - pytest.param( - 'Metadata Version 2.1: Provides Extra', - params(provides_extras=['foo', 'bar']), - marks=pytest.mark.xfail(reason="provides_extras not read"), - ), - ( - 'Missing author', - dict( - name='foo', - version='1.0.0', - author_email='snorri@sturluson.name', - ), - ), - ( - 'Missing author e-mail', - dict( - name='foo', - version='1.0.0', - author='Snorri Sturluson', - ), - ), - ( - 'Missing author and e-mail', - dict( - name='foo', - version='1.0.0', - ), - ), - ( - 'Bypass normalized version', - dict( - name='foo', - version=sic('1.0.0a'), - ), - ), - ] - - -@pytest.mark.parametrize(("name", "attrs"), __read_test_cases()) -def test_read_metadata(name, attrs): - dist = Distribution(attrs) - metadata_out = dist.metadata - dist_class = metadata_out.__class__ - - # Write to PKG_INFO and then load into a new metadata object - PKG_INFO = io.StringIO() - - metadata_out.write_pkg_file(PKG_INFO) - PKG_INFO.seek(0) - pkg_info = PKG_INFO.read() - assert _valid_metadata(pkg_info) - - PKG_INFO.seek(0) - metadata_in = dist_class() - metadata_in.read_pkg_file(PKG_INFO) - - tested_attrs = [ - ('name', dist_class.get_name), - ('version', dist_class.get_version), - ('author', dist_class.get_contact), - ('author_email', dist_class.get_contact_email), - ('metadata_version', dist_class.get_metadata_version), - ('provides', dist_class.get_provides), - ('description', dist_class.get_description), - ('long_description', dist_class.get_long_description), - ('download_url', dist_class.get_download_url), - ('keywords', dist_class.get_keywords), - ('platforms', dist_class.get_platforms), - ('obsoletes', dist_class.get_obsoletes), - ('requires', dist_class.get_requires), - ('classifiers', dist_class.get_classifiers), - ('project_urls', lambda s: getattr(s, 'project_urls', {})), - ('provides_extras', lambda s: getattr(s, 'provides_extras', {})), - ] - - for attr, getter in tested_attrs: - assert getter(metadata_in) == getter(metadata_out) - - -def __maintainer_test_cases(): - attrs = {"name": "package", "version": "1.0", "description": "xxx"} - - def merge_dicts(d1, d2): - d1 = d1.copy() - d1.update(d2) - - return d1 - - return [ - ('No author, no maintainer', attrs.copy()), - ( - 'Author (no e-mail), no maintainer', - merge_dicts(attrs, {'author': 'Author Name'}), - ), - ( - 'Author (e-mail), no maintainer', - merge_dicts( - attrs, {'author': 'Author Name', 'author_email': 'author@name.com'} - ), - ), - ( - 'No author, maintainer (no e-mail)', - merge_dicts(attrs, {'maintainer': 'Maintainer Name'}), - ), - ( - 'No author, maintainer (e-mail)', - merge_dicts( - attrs, - { - 'maintainer': 'Maintainer Name', - 'maintainer_email': 'maintainer@name.com', - }, - ), - ), - ( - 'Author (no e-mail), Maintainer (no-email)', - merge_dicts( - attrs, {'author': 'Author Name', 'maintainer': 'Maintainer Name'} - ), - ), - ( - 'Author (e-mail), Maintainer (e-mail)', - merge_dicts( - attrs, - { - 'author': 'Author Name', - 'author_email': 'author@name.com', - 'maintainer': 'Maintainer Name', - 'maintainer_email': 'maintainer@name.com', - }, - ), - ), - ( - 'No author (e-mail), no maintainer (e-mail)', - merge_dicts( - attrs, - { - 'author_email': 'author@name.com', - 'maintainer_email': 'maintainer@name.com', - }, - ), - ), - ('Author unicode', merge_dicts(attrs, {'author': '鉄沢寛'})), - ('Maintainer unicode', merge_dicts(attrs, {'maintainer': 'Jan Łukasiewicz'})), - ] - - -@pytest.mark.parametrize(("name", "attrs"), __maintainer_test_cases()) -def test_maintainer_author(name, attrs, tmpdir): - tested_keys = { - 'author': 'Author', - 'author_email': 'Author-email', - 'maintainer': 'Maintainer', - 'maintainer_email': 'Maintainer-email', - } - - # Generate a PKG-INFO file - dist = Distribution(attrs) - fn = tmpdir.mkdir('pkg_info') - fn_s = str(fn) - - dist.metadata.write_pkg_info(fn_s) - - with open(str(fn.join('PKG-INFO')), 'r', encoding='utf-8') as f: - pkg_info = f.read() - - assert _valid_metadata(pkg_info) - - # Drop blank lines and strip lines from default description - raw_pkg_lines = pkg_info.splitlines() - pkg_lines = list(filter(None, raw_pkg_lines[:-2])) - - pkg_lines_set = set(pkg_lines) - - # Duplicate lines should not be generated - assert len(pkg_lines) == len(pkg_lines_set) - - for fkey, dkey in tested_keys.items(): - val = attrs.get(dkey, None) - if val is None: - for line in pkg_lines: - assert not line.startswith(fkey + ':') - else: - line = f'{fkey}: {val}' - assert line in pkg_lines_set - - -class TestParityWithMetadataFromPyPaWheel: - def base_example(self): - attrs = dict( - **EXAMPLE_BASE_INFO, - # Example with complex requirement definition - python_requires=">=3.8", - install_requires=""" - packaging==23.2 - more-itertools==8.8.0; extra == "other" - jaraco.text==3.7.0 - importlib-resources==5.10.2; python_version<"3.8" - importlib-metadata==6.0.0 ; python_version<"3.8" - colorama>=0.4.4; sys_platform == "win32" - """, - extras_require={ - "testing": """ - pytest >= 6 - pytest-checkdocs >= 2.4 - tomli ; \\ - # Using stdlib when possible - python_version < "3.11" - ini2toml[lite]>=0.9 - """, - "other": [], - }, - ) - # Generate a PKG-INFO file using setuptools - return Distribution(attrs) - - def test_requires_dist(self, tmp_path): - dist = self.base_example() - pkg_info = _get_pkginfo(dist) - assert _valid_metadata(pkg_info) - - # Ensure Requires-Dist is present - expected = [ - 'Metadata-Version:', - 'Requires-Python: >=3.8', - 'Provides-Extra: other', - 'Provides-Extra: testing', - 'Requires-Dist: tomli; python_version < "3.11" and extra == "testing"', - 'Requires-Dist: more-itertools==8.8.0; extra == "other"', - 'Requires-Dist: ini2toml[lite]>=0.9; extra == "testing"', - ] - for line in expected: - assert line in pkg_info - - HERE = Path(__file__).parent - EXAMPLES_FILE = HERE / "config/setupcfg_examples.txt" - - @pytest.fixture(params=[None, *urls_from_file(EXAMPLES_FILE)]) - def dist(self, request, monkeypatch, tmp_path): - """Example of distribution with arbitrary configuration""" - monkeypatch.chdir(tmp_path) - monkeypatch.setattr(expand, "read_attr", Mock(return_value="0.42")) - monkeypatch.setattr(expand, "read_files", Mock(return_value="hello world")) - monkeypatch.setattr( - Distribution, "_finalize_license_files", Mock(return_value=None) - ) - if request.param is None: - yield self.base_example() - else: - # Real-world usage - config = retrieve_file(request.param) - yield setupcfg.apply_configuration(Distribution({}), config) - - @pytest.mark.uses_network - def test_pkg_info_roundtrip(self, tmp_path, dist): - """Ensure PKG-INFO round trips according to pypa/wheel's methodology""" - # Generate an simplified "egg-info" with PKG-INFO - pkg_info = _get_pkginfo(dist) - - # Emulate the way old versions of wheel.bdist_wheel used to parse and regenerate - # the message, then ensures the metadata generated by setuptools is compatible. - with io.StringIO(pkg_info) as buffer: - msg = Parser(EmailMessage).parse(buffer) - - serialization_policy = EmailPolicy( - utf8=True, - mangle_from_=False, - max_line_length=0, - ) - with io.BytesIO() as buffer: - out = io.TextIOWrapper(buffer, encoding="utf-8") - Generator(out, policy=serialization_policy).flatten(msg) - out.flush() - regenerated = buffer.getvalue() - - raw_metadata = bytes(pkg_info, "utf-8") - # Normalise newlines to avoid test errors on Windows: - raw_metadata = b"\n".join(raw_metadata.splitlines()) - regenerated = b"\n".join(regenerated.splitlines()) - assert regenerated == raw_metadata - - -class TestPEP643: - STATIC_CONFIG = { - "setup.cfg": cleandoc( - """ - [metadata] - name = package - version = 0.0.1 - author = Foo Bar - author_email = foo@bar.net - long_description = Long - description - description = Short description - keywords = one, two - platforms = abcd - [options] - install_requires = requests - """ - ), - "pyproject.toml": cleandoc( - """ - [project] - name = "package" - version = "0.0.1" - authors = [ - {name = "Foo Bar", email = "foo@bar.net"} - ] - description = "Short description" - readme = {text = "Long\\ndescription", content-type = "text/plain"} - keywords = ["one", "two"] - dependencies = ["requests"] - license = "AGPL-3.0-or-later" - [tool.setuptools] - provides = ["abcd"] - obsoletes = ["abcd"] - """ - ), - } - - @pytest.mark.parametrize("file", STATIC_CONFIG.keys()) - def test_static_config_has_no_dynamic(self, file, tmpdir_cwd): - Path(file).write_text(self.STATIC_CONFIG[file], encoding="utf-8") - metadata = _get_metadata() - assert metadata.get_all("Dynamic") is None - assert metadata.get_all("dynamic") is None - - @pytest.mark.parametrize("file", STATIC_CONFIG.keys()) - @pytest.mark.parametrize( - "fields", - [ - # Single dynamic field - {"requires-python": ("python_requires", ">=3.12")}, - {"author-email": ("author_email", "snoopy@peanuts.com")}, - {"keywords": ("keywords", ["hello", "world"])}, - {"platform": ("platforms", ["abcd"])}, - # Multiple dynamic fields - { - "summary": ("description", "hello world"), - "description": ("long_description", "bla bla bla bla"), - "requires-dist": ("install_requires", ["hello-world"]), - }, - ], - ) - def test_modified_fields_marked_as_dynamic(self, file, fields, tmpdir_cwd): - # We start with a static config - Path(file).write_text(self.STATIC_CONFIG[file], encoding="utf-8") - dist = _makedist() - - # ... but then we simulate the effects of a plugin modifying the distribution - for attr, value in fields.values(): - # `dist` and `dist.metadata` are complicated... - # Some attributes work when set on `dist`, others on `dist.metadata`... - # Here we set in both just in case (this also avoids calling `_finalize_*`) - setattr(dist, attr, value) - setattr(dist.metadata, attr, value) - - # Then we should be able to list the modified fields as Dynamic - metadata = _get_metadata(dist) - assert set(metadata.get_all("Dynamic")) == set(fields) - - @pytest.mark.parametrize( - "extra_toml", - [ - "# Let setuptools autofill license-files", - "license-files = ['LICENSE*', 'AUTHORS*', 'NOTICE']", - ], - ) - def test_license_files_dynamic(self, extra_toml, tmpdir_cwd): - # For simplicity (and for the time being) setuptools is not making - # any special handling to guarantee `License-File` is considered static. - # Instead we rely in the fact that, although suboptimal, it is OK to have - # it as dynamics, as per: - # https://github.com/pypa/setuptools/issues/4629#issuecomment-2331233677 - files = { - "pyproject.toml": self.STATIC_CONFIG["pyproject.toml"].replace( - 'license = "AGPL-3.0-or-later"', - f"dynamic = ['license']\n{extra_toml}", - ), - "LICENSE.md": "--- mock license ---", - "NOTICE": "--- mock notice ---", - "AUTHORS.txt": "--- me ---", - } - # Sanity checks: - assert extra_toml in files["pyproject.toml"] - assert 'license = "AGPL-3.0-or-later"' not in extra_toml - - jaraco.path.build(files) - dist = _makedist(license_expression="AGPL-3.0-or-later") - metadata = _get_metadata(dist) - assert set(metadata.get_all("Dynamic")) == { - 'license-file', - 'license-expression', - } - assert metadata.get("License-Expression") == "AGPL-3.0-or-later" - assert set(metadata.get_all("License-File")) == { - "NOTICE", - "AUTHORS.txt", - "LICENSE.md", - } - - -def _makedist(**attrs): - dist = Distribution(attrs) - dist.parse_config_files() - return dist - - -def _get_pkginfo(dist: Distribution): - with io.StringIO() as fp: - dist.metadata.write_pkg_file(fp) - return fp.getvalue() - - -def _get_metadata(dist: Distribution | None = None): - return message_from_string(_get_pkginfo(dist or _makedist())) - - -def _valid_metadata(text: str) -> bool: - metadata = Metadata.from_email(text, validate=True) # can raise exceptions - return metadata is not None diff --git a/voxvera/vendor/setuptools/tests/test_depends.py b/voxvera/vendor/setuptools/tests/test_depends.py deleted file mode 100644 index 1714c04..0000000 --- a/voxvera/vendor/setuptools/tests/test_depends.py +++ /dev/null @@ -1,15 +0,0 @@ -import sys - -from setuptools import depends - - -class TestGetModuleConstant: - def test_basic(self): - """ - Invoke get_module_constant on a module in - the test package. - """ - mod_name = 'setuptools.tests.mod_with_constant' - val = depends.get_module_constant(mod_name, 'value') - assert val == 'three, sir!' - assert 'setuptools.tests.mod_with_constant' not in sys.modules diff --git a/voxvera/vendor/setuptools/tests/test_develop.py b/voxvera/vendor/setuptools/tests/test_develop.py deleted file mode 100644 index c2a3be2..0000000 --- a/voxvera/vendor/setuptools/tests/test_develop.py +++ /dev/null @@ -1,113 +0,0 @@ -"""develop tests""" - -import os -import platform -import subprocess -import sys - -import pytest - -from setuptools._path import paths_on_pythonpath - -from . import contexts, namespaces - -SETUP_PY = """\ -from setuptools import setup - -setup(name='foo', - packages=['foo'], -) -""" - -INIT_PY = """print "foo" -""" - - -@pytest.fixture -def temp_user(monkeypatch): - with contexts.tempdir() as user_base: - with contexts.tempdir() as user_site: - monkeypatch.setattr('site.USER_BASE', user_base) - monkeypatch.setattr('site.USER_SITE', user_site) - yield - - -@pytest.fixture -def test_env(tmpdir, temp_user): - target = tmpdir - foo = target.mkdir('foo') - setup = target / 'setup.py' - if setup.isfile(): - raise ValueError(dir(target)) - with setup.open('w') as f: - f.write(SETUP_PY) - init = foo / '__init__.py' - with init.open('w') as f: - f.write(INIT_PY) - with target.as_cwd(): - yield target - - -class TestNamespaces: - @staticmethod - def install_develop(src_dir, target): - develop_cmd = [ - sys.executable, - 'setup.py', - 'develop', - '--install-dir', - str(target), - ] - with src_dir.as_cwd(): - with paths_on_pythonpath([str(target)]): - subprocess.check_call(develop_cmd) - - @pytest.mark.xfail(reason="pkg_resources has been removed") - @pytest.mark.skipif( - bool(os.environ.get("APPVEYOR")), - reason="https://github.com/pypa/setuptools/issues/851", - ) - @pytest.mark.skipif( - platform.python_implementation() == 'PyPy', - reason="https://github.com/pypa/setuptools/issues/1202", - ) - @pytest.mark.uses_network - def test_namespace_package_importable(self, tmpdir): - """ - Installing two packages sharing the same namespace, one installed - naturally using pip or `--single-version-externally-managed` - and the other installed using `develop` should leave the namespace - in tact and both packages reachable by import. - """ - pkg_A = namespaces.build_namespace_package(tmpdir, 'myns.pkgA') - pkg_B = namespaces.build_namespace_package(tmpdir, 'myns.pkgB') - target = tmpdir / 'packages' - # use pip to install to the target directory - install_cmd = [ - sys.executable, - '-m', - 'pip', - 'install', - str(pkg_A), - '-t', - str(target), - ] - subprocess.check_call(install_cmd) - self.install_develop(pkg_B, target) - namespaces.make_site_dir(target) - try_import = [ - sys.executable, - '-c', - 'import myns.pkgA; import myns.pkgB', - ] - with paths_on_pythonpath([str(target)]): - subprocess.check_call(try_import) - - # additionally ensure that pkg_resources import works - pkg_resources_imp = [ - sys.executable, - '-c', - 'import pkg_resources', - ] - with paths_on_pythonpath([str(target)]): - subprocess.check_call(pkg_resources_imp) diff --git a/voxvera/vendor/setuptools/tests/test_dist.py b/voxvera/vendor/setuptools/tests/test_dist.py deleted file mode 100644 index 9685dcd..0000000 --- a/voxvera/vendor/setuptools/tests/test_dist.py +++ /dev/null @@ -1,280 +0,0 @@ -import os -import re -import urllib.parse -import urllib.request - -import pytest - -from setuptools import Distribution -from setuptools.dist import check_package_data, check_specifier - -from .fixtures import make_trivial_sdist -from .test_find_packages import ensure_files -from .textwrap import DALS - -from distutils.errors import DistutilsSetupError - - -def test_dist_fetch_build_egg(tmpdir, setuptools_wheel): - """ - Check multiple calls to `Distribution.fetch_build_egg` work as expected. - """ - index = tmpdir.mkdir('index') - index_url = urllib.parse.urljoin('file://', urllib.request.pathname2url(str(index))) - - def sdist_with_index(distname, version): - dist_dir = index.mkdir(distname) - dist_sdist = f'{distname}-{version}.tar.gz' - make_trivial_sdist( - str(dist_dir.join(dist_sdist)), distname, version, setuptools_wheel - ) - with dist_dir.join('index.html').open('w') as fp: - fp.write( - DALS( - """ - - {dist_sdist}
- - """ - ).format(dist_sdist=dist_sdist) - ) - - sdist_with_index('barbazquux', '3.2.0') - sdist_with_index('barbazquux-runner', '2.11.1') - with tmpdir.join('setup.cfg').open('w') as fp: - fp.write( - DALS( - """ - [easy_install] - index_url = {index_url} - """ - ).format(index_url=index_url) - ) - reqs = """ - barbazquux-runner - barbazquux - """.split() - with tmpdir.as_cwd(): - dist = Distribution() - dist.parse_config_files() - resolved_dists = [dist.fetch_build_egg(r) for r in reqs] - assert [dist.name for dist in resolved_dists if dist] == reqs - - -EXAMPLE_BASE_INFO = dict( - name="package", - version="0.0.1", - author="Foo Bar", - author_email="foo@bar.net", - long_description="Long\ndescription", - description="Short description", - keywords=["one", "two"], -) - - -def test_provides_extras_deterministic_order(): - attrs = dict(extras_require=dict(a=['foo'], b=['bar'])) - dist = Distribution(attrs) - assert list(dist.metadata.provides_extras) == ['a', 'b'] - attrs['extras_require'] = dict(reversed(attrs['extras_require'].items())) - dist = Distribution(attrs) - assert list(dist.metadata.provides_extras) == ['b', 'a'] - - -CHECK_PACKAGE_DATA_TESTS = ( - # Valid. - ( - { - '': ['*.txt', '*.rst'], - 'hello': ['*.msg'], - }, - None, - ), - # Not a dictionary. - ( - ( - ('', ['*.txt', '*.rst']), - ('hello', ['*.msg']), - ), - ( - "'package_data' must be a dictionary mapping package" - " names to lists of string wildcard patterns" - ), - ), - # Invalid key type. - ( - { - 400: ['*.txt', '*.rst'], - }, - ("keys of 'package_data' dict must be strings (got 400)"), - ), - # Invalid value type. - ( - { - 'hello': '*.msg', - }, - ( - "\"values of 'package_data' dict\" must be of type " - " (got '*.msg')" - ), - ), - # Invalid value type (generators are single use) - ( - { - 'hello': (x for x in "generator"), - }, - ( - "\"values of 'package_data' dict\" must be of type " - " (got =3.0, !=3.1'} - dist = Distribution(attrs) - check_specifier(dist, attrs, attrs['python_requires']) - - attrs = {'name': 'foo', 'python_requires': ['>=3.0', '!=3.1']} - dist = Distribution(attrs) - check_specifier(dist, attrs, attrs['python_requires']) - - # invalid specifier value - attrs = {'name': 'foo', 'python_requires': '>=invalid-version'} - with pytest.raises(DistutilsSetupError): - dist = Distribution(attrs) - - -def test_metadata_name(): - with pytest.raises(DistutilsSetupError, match='missing.*name'): - Distribution()._validate_metadata() - - -@pytest.mark.parametrize( - ('dist_name', 'py_module'), - [ - ("my.pkg", "my_pkg"), - ("my-pkg", "my_pkg"), - ("my_pkg", "my_pkg"), - ("pkg", "pkg"), - ], -) -def test_dist_default_py_modules(tmp_path, dist_name, py_module): - (tmp_path / f"{py_module}.py").touch() - - (tmp_path / "setup.py").touch() - (tmp_path / "noxfile.py").touch() - # ^-- make sure common tool files are ignored - - attrs = {**EXAMPLE_BASE_INFO, "name": dist_name, "src_root": str(tmp_path)} - # Find `py_modules` corresponding to dist_name if not given - dist = Distribution(attrs) - dist.set_defaults() - assert dist.py_modules == [py_module] - # When `py_modules` is given, don't do anything - dist = Distribution({**attrs, "py_modules": ["explicity_py_module"]}) - dist.set_defaults() - assert dist.py_modules == ["explicity_py_module"] - # When `packages` is given, don't do anything - dist = Distribution({**attrs, "packages": ["explicity_package"]}) - dist.set_defaults() - assert not dist.py_modules - - -@pytest.mark.parametrize( - ('dist_name', 'package_dir', 'package_files', 'packages'), - [ - ("my.pkg", None, ["my_pkg/__init__.py", "my_pkg/mod.py"], ["my_pkg"]), - ("my-pkg", None, ["my_pkg/__init__.py", "my_pkg/mod.py"], ["my_pkg"]), - ("my_pkg", None, ["my_pkg/__init__.py", "my_pkg/mod.py"], ["my_pkg"]), - ("my.pkg", None, ["my/pkg/__init__.py"], ["my", "my.pkg"]), - ( - "my_pkg", - None, - ["src/my_pkg/__init__.py", "src/my_pkg2/__init__.py"], - ["my_pkg", "my_pkg2"], - ), - ( - "my_pkg", - {"pkg": "lib", "pkg2": "lib2"}, - ["lib/__init__.py", "lib/nested/__init__.pyt", "lib2/__init__.py"], - ["pkg", "pkg.nested", "pkg2"], - ), - ], -) -def test_dist_default_packages( - tmp_path, dist_name, package_dir, package_files, packages -): - ensure_files(tmp_path, package_files) - - (tmp_path / "setup.py").touch() - (tmp_path / "noxfile.py").touch() - # ^-- should not be included by default - - attrs = { - **EXAMPLE_BASE_INFO, - "name": dist_name, - "src_root": str(tmp_path), - "package_dir": package_dir, - } - # Find `packages` either corresponding to dist_name or inside src - dist = Distribution(attrs) - dist.set_defaults() - assert not dist.py_modules - assert not dist.py_modules - assert set(dist.packages) == set(packages) - # When `py_modules` is given, don't do anything - dist = Distribution({**attrs, "py_modules": ["explicit_py_module"]}) - dist.set_defaults() - assert not dist.packages - assert set(dist.py_modules) == {"explicit_py_module"} - # When `packages` is given, don't do anything - dist = Distribution({**attrs, "packages": ["explicit_package"]}) - dist.set_defaults() - assert not dist.py_modules - assert set(dist.packages) == {"explicit_package"} - - -@pytest.mark.parametrize( - ('dist_name', 'package_dir', 'package_files'), - [ - ("my.pkg.nested", None, ["my/pkg/nested/__init__.py"]), - ("my.pkg", None, ["my/pkg/__init__.py", "my/pkg/file.py"]), - ("my_pkg", None, ["my_pkg.py"]), - ("my_pkg", None, ["my_pkg/__init__.py", "my_pkg/nested/__init__.py"]), - ("my_pkg", None, ["src/my_pkg/__init__.py", "src/my_pkg/nested/__init__.py"]), - ( - "my_pkg", - {"my_pkg": "lib", "my_pkg.lib2": "lib2"}, - ["lib/__init__.py", "lib/nested/__init__.pyt", "lib2/__init__.py"], - ), - # Should not try to guess a name from multiple py_modules/packages - ("UNKNOWN", None, ["src/mod1.py", "src/mod2.py"]), - ("UNKNOWN", None, ["src/pkg1/__ini__.py", "src/pkg2/__init__.py"]), - ], -) -def test_dist_default_name(tmp_path, dist_name, package_dir, package_files): - """Make sure dist.name is discovered from packages/py_modules""" - ensure_files(tmp_path, package_files) - attrs = { - **EXAMPLE_BASE_INFO, - "src_root": "/".join(os.path.split(tmp_path)), # POSIX-style - "package_dir": package_dir, - } - del attrs["name"] - - dist = Distribution(attrs) - dist.set_defaults() - assert dist.py_modules or dist.packages - assert dist.get_name() == dist_name diff --git a/voxvera/vendor/setuptools/tests/test_dist_info.py b/voxvera/vendor/setuptools/tests/test_dist_info.py deleted file mode 100644 index f65d0af..0000000 --- a/voxvera/vendor/setuptools/tests/test_dist_info.py +++ /dev/null @@ -1,147 +0,0 @@ -"""Test .dist-info style distributions.""" - -import pathlib -import re -import shutil -import subprocess -import sys -from functools import partial - -import pytest - -from setuptools.archive_util import unpack_archive - -from .textwrap import DALS - -read = partial(pathlib.Path.read_text, encoding="utf-8") - - -class TestDistInfo: - def test_invalid_version(self, tmp_path): - """ - Supplying an invalid version crashes dist_info. - """ - config = "[metadata]\nname=proj\nversion=42\n[egg_info]\ntag_build=invalid!!!\n" - (tmp_path / "setup.cfg").write_text(config, encoding="utf-8") - msg = re.compile("invalid version", re.MULTILINE | re.IGNORECASE) - proc = run_command_inner("dist_info", cwd=tmp_path, check=False) - assert proc.returncode - assert msg.search(proc.stdout) - assert not list(tmp_path.glob("*.dist-info")) - - def test_tag_arguments(self, tmp_path): - config = """ - [metadata] - name=proj - version=42 - [egg_info] - tag_date=1 - tag_build=.post - """ - (tmp_path / "setup.cfg").write_text(config, encoding="utf-8") - - print(run_command("dist_info", "--no-date", cwd=tmp_path)) - dist_info = next(tmp_path.glob("*.dist-info")) - assert dist_info.name.startswith("proj-42") - shutil.rmtree(dist_info) - - print(run_command("dist_info", "--tag-build", ".a", cwd=tmp_path)) - dist_info = next(tmp_path.glob("*.dist-info")) - assert dist_info.name.startswith("proj-42a") - - @pytest.mark.parametrize("keep_egg_info", (False, True)) - def test_output_dir(self, tmp_path, keep_egg_info): - config = "[metadata]\nname=proj\nversion=42\n" - (tmp_path / "setup.cfg").write_text(config, encoding="utf-8") - out = tmp_path / "__out" - out.mkdir() - opts = ["--keep-egg-info"] if keep_egg_info else [] - run_command("dist_info", "--output-dir", out, *opts, cwd=tmp_path) - assert len(list(out.glob("*.dist-info"))) == 1 - assert len(list(tmp_path.glob("*.dist-info"))) == 0 - expected_egg_info = int(keep_egg_info) - assert len(list(out.glob("*.egg-info"))) == expected_egg_info - assert len(list(tmp_path.glob("*.egg-info"))) == 0 - assert len(list(out.glob("*.__bkp__"))) == 0 - assert len(list(tmp_path.glob("*.__bkp__"))) == 0 - - -class TestWheelCompatibility: - """Make sure the .dist-info directory produced with the ``dist_info`` command - is the same as the one produced by ``bdist_wheel``. - """ - - SETUPCFG = DALS( - """ - [metadata] - name = {name} - version = {version} - - [options] - install_requires = - foo>=12; sys_platform != "linux" - - [options.extras_require] - test = pytest - - [options.entry_points] - console_scripts = - executable-name = my_package.module:function - discover = - myproj = my_package.other_module:function - """ - ) - - EGG_INFO_OPTS = [ - # Related: #3088 #2872 - ("", ""), - (".post", "[egg_info]\ntag_build = post\n"), - (".post", "[egg_info]\ntag_build = .post\n"), - (".post", "[egg_info]\ntag_build = post\ntag_date = 1\n"), - (".dev", "[egg_info]\ntag_build = .dev\n"), - (".dev", "[egg_info]\ntag_build = .dev\ntag_date = 1\n"), - ("a1", "[egg_info]\ntag_build = .a1\n"), - ("+local", "[egg_info]\ntag_build = +local\n"), - ] - - @pytest.mark.parametrize("name", "my-proj my_proj my.proj My.Proj".split()) - @pytest.mark.parametrize("version", ["0.42.13"]) - @pytest.mark.parametrize(("suffix", "cfg"), EGG_INFO_OPTS) - def test_dist_info_is_the_same_as_in_wheel( - self, name, version, tmp_path, suffix, cfg - ): - config = self.SETUPCFG.format(name=name, version=version) + cfg - - for i in "dir_wheel", "dir_dist": - (tmp_path / i).mkdir() - (tmp_path / i / "setup.cfg").write_text(config, encoding="utf-8") - - run_command("bdist_wheel", cwd=tmp_path / "dir_wheel") - wheel = next(tmp_path.glob("dir_wheel/dist/*.whl")) - unpack_archive(wheel, tmp_path / "unpack") - wheel_dist_info = next(tmp_path.glob("unpack/*.dist-info")) - - run_command("dist_info", cwd=tmp_path / "dir_dist") - dist_info = next(tmp_path.glob("dir_dist/*.dist-info")) - - assert dist_info.name == wheel_dist_info.name - assert dist_info.name.startswith(f"my_proj-{version}{suffix}") - for file in "METADATA", "entry_points.txt": - assert read(dist_info / file) == read(wheel_dist_info / file) - - -def run_command_inner(*cmd, **kwargs): - opts = { - "stderr": subprocess.STDOUT, - "stdout": subprocess.PIPE, - "text": True, - "encoding": "utf-8", - "check": True, - **kwargs, - } - cmd = [sys.executable, "-c", "__import__('setuptools').setup()", *map(str, cmd)] - return subprocess.run(cmd, **opts) - - -def run_command(*args, **kwargs): - return run_command_inner(*args, **kwargs).stdout diff --git a/voxvera/vendor/setuptools/tests/test_distutils_adoption.py b/voxvera/vendor/setuptools/tests/test_distutils_adoption.py deleted file mode 100644 index f99a588..0000000 --- a/voxvera/vendor/setuptools/tests/test_distutils_adoption.py +++ /dev/null @@ -1,198 +0,0 @@ -import os -import platform -import sys -import textwrap - -import pytest - -IS_PYPY = '__pypy__' in sys.builtin_module_names - -_TEXT_KWARGS = {"text": True, "encoding": "utf-8"} # For subprocess.run - - -def win_sr(env): - """ - On Windows, SYSTEMROOT must be present to avoid - - > Fatal Python error: _Py_HashRandomization_Init: failed to - > get random numbers to initialize Python - """ - if env and platform.system() == 'Windows': - env['SYSTEMROOT'] = os.environ['SYSTEMROOT'] - return env - - -def find_distutils(venv, imports='distutils', env=None, **kwargs): - py_cmd = 'import {imports}; print(distutils.__file__)'.format(**locals()) - cmd = ['python', '-c', py_cmd] - return venv.run(cmd, env=win_sr(env), **_TEXT_KWARGS, **kwargs) - - -def count_meta_path(venv, env=None): - py_cmd = textwrap.dedent( - """ - import sys - is_distutils = lambda finder: finder.__class__.__name__ == "DistutilsMetaFinder" - print(len(list(filter(is_distutils, sys.meta_path)))) - """ - ) - cmd = ['python', '-c', py_cmd] - return int(venv.run(cmd, env=win_sr(env), **_TEXT_KWARGS)) - - -skip_without_stdlib_distutils = pytest.mark.skipif( - sys.version_info >= (3, 12), - reason='stdlib distutils is removed from Python 3.12+', -) - - -@skip_without_stdlib_distutils -def test_distutils_stdlib(venv): - """ - Ensure stdlib distutils is used when appropriate. - """ - env = dict(SETUPTOOLS_USE_DISTUTILS='stdlib') - assert venv.name not in find_distutils(venv, env=env).split(os.sep) - assert count_meta_path(venv, env=env) == 0 - - -def test_distutils_local_with_setuptools(venv): - """ - Ensure local distutils is used when appropriate. - """ - env = dict(SETUPTOOLS_USE_DISTUTILS='local') - loc = find_distutils(venv, imports='setuptools, distutils', env=env) - assert venv.name in loc.split(os.sep) - assert count_meta_path(venv, env=env) <= 1 - - -@pytest.mark.xfail('IS_PYPY', reason='pypy imports distutils on startup') -def test_distutils_local(venv): - """ - Even without importing, the setuptools-local copy of distutils is - preferred. - """ - env = dict(SETUPTOOLS_USE_DISTUTILS='local') - assert venv.name in find_distutils(venv, env=env).split(os.sep) - assert count_meta_path(venv, env=env) <= 1 - - -def test_pip_import(venv): - """ - Ensure pip can be imported. - Regression test for #3002. - """ - cmd = ['python', '-c', 'import pip'] - venv.run(cmd, **_TEXT_KWARGS) - - -def test_distutils_has_origin(): - """ - Distutils module spec should have an origin. #2990. - """ - assert __import__('distutils').__spec__.origin - - -ENSURE_IMPORTS_ARE_NOT_DUPLICATED = r""" -# Depending on the importlib machinery and _distutils_hack, some imports are -# duplicated resulting in different module objects being loaded, which prevents -# patches as shown in #3042. -# This script provides a way of verifying if this duplication is happening. - -from distutils import cmd -import distutils.command.sdist as sdist - -# import last to prevent caching -from distutils import {imported_module} - -for mod in (cmd, sdist): - assert mod.{imported_module} == {imported_module}, ( - f"\n{{mod.dir_util}}\n!=\n{{{imported_module}}}" - ) - -print("success") -""" - - -@pytest.mark.usefixtures("tmpdir_cwd") -@pytest.mark.parametrize( - ('distutils_version', 'imported_module'), - [ - pytest.param("stdlib", "dir_util", marks=skip_without_stdlib_distutils), - pytest.param("stdlib", "file_util", marks=skip_without_stdlib_distutils), - pytest.param("stdlib", "archive_util", marks=skip_without_stdlib_distutils), - ("local", "dir_util"), - ("local", "file_util"), - ("local", "archive_util"), - ], -) -def test_modules_are_not_duplicated_on_import(distutils_version, imported_module, venv): - env = dict(SETUPTOOLS_USE_DISTUTILS=distutils_version) - script = ENSURE_IMPORTS_ARE_NOT_DUPLICATED.format(imported_module=imported_module) - cmd = ['python', '-c', script] - output = venv.run(cmd, env=win_sr(env), **_TEXT_KWARGS).strip() - assert output == "success" - - -ENSURE_LOG_IMPORT_IS_NOT_DUPLICATED = r""" -import types -import distutils.dist as dist -from distutils import log -if isinstance(dist.log, types.ModuleType): - assert dist.log == log, f"\n{dist.log}\n!=\n{log}" -print("success") -""" - - -@pytest.mark.usefixtures("tmpdir_cwd") -@pytest.mark.parametrize( - "distutils_version", - [ - "local", - pytest.param("stdlib", marks=skip_without_stdlib_distutils), - ], -) -def test_log_module_is_not_duplicated_on_import(distutils_version, venv): - env = dict(SETUPTOOLS_USE_DISTUTILS=distutils_version) - cmd = ['python', '-c', ENSURE_LOG_IMPORT_IS_NOT_DUPLICATED] - output = venv.run(cmd, env=win_sr(env), **_TEXT_KWARGS).strip() - assert output == "success" - - -ENSURE_CONSISTENT_ERROR_FROM_MODIFIED_PY = r""" -from setuptools.modified import newer -from {imported_module}.errors import DistutilsError - -# Can't use pytest.raises in this context -try: - newer("", "") -except DistutilsError: - print("success") -else: - raise AssertionError("Expected to raise") -""" - - -@pytest.mark.usefixtures("tmpdir_cwd") -@pytest.mark.parametrize( - ('distutils_version', 'imported_module'), - [ - ("local", "distutils"), - # Unfortunately we still get ._distutils.errors.DistutilsError with SETUPTOOLS_USE_DISTUTILS=stdlib - # But that's a deprecated use-case we don't mind not fully supporting in newer code - pytest.param( - "stdlib", "setuptools._distutils", marks=skip_without_stdlib_distutils - ), - ], -) -def test_consistent_error_from_modified_py(distutils_version, imported_module, venv): - env = dict(SETUPTOOLS_USE_DISTUTILS=distutils_version) - cmd = [ - 'python', - '-c', - ENSURE_CONSISTENT_ERROR_FROM_MODIFIED_PY.format( - imported_module=imported_module - ), - ] - output = venv.run(cmd, env=win_sr(env), **_TEXT_KWARGS).strip() - assert output == "success" diff --git a/voxvera/vendor/setuptools/tests/test_editable_install.py b/voxvera/vendor/setuptools/tests/test_editable_install.py deleted file mode 100644 index cf2dbe9..0000000 --- a/voxvera/vendor/setuptools/tests/test_editable_install.py +++ /dev/null @@ -1,1261 +0,0 @@ -from __future__ import annotations - -import os -import platform -import stat -import subprocess -import sys -from copy import deepcopy -from importlib import import_module -from importlib.machinery import EXTENSION_SUFFIXES -from pathlib import Path -from textwrap import dedent -from typing import Any -from unittest.mock import Mock -from uuid import uuid4 - -import jaraco.envs -import jaraco.path -import pytest -from path import Path as _Path - -from setuptools._importlib import resources as importlib_resources -from setuptools.command.editable_wheel import ( - _encode_pth, - _find_namespaces, - _find_package_roots, - _find_virtual_namespaces, - _finder_template, - _LinkTree, - _TopLevelFinder, - editable_wheel, -) -from setuptools.dist import Distribution -from setuptools.extension import Extension -from setuptools.warnings import SetuptoolsDeprecationWarning - -from . import contexts, namespaces - -from distutils.core import run_setup - - -@pytest.fixture(params=["strict", "lenient"]) -def editable_opts(request): - if request.param == "strict": - return ["--config-settings", "editable-mode=strict"] - return [] - - -EXAMPLE = { - 'pyproject.toml': dedent( - """\ - [build-system] - requires = ["setuptools"] - build-backend = "setuptools.build_meta" - - [project] - name = "mypkg" - version = "3.14159" - license = {text = "MIT"} - description = "This is a Python package" - dynamic = ["readme"] - classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers" - ] - urls = {Homepage = "https://github.com"} - - [tool.setuptools] - package-dir = {"" = "src"} - packages = {find = {where = ["src"]}} - license-files = ["LICENSE*"] - - [tool.setuptools.dynamic] - readme = {file = "README.rst"} - - [tool.distutils.egg_info] - tag-build = ".post0" - """ - ), - "MANIFEST.in": dedent( - """\ - global-include *.py *.txt - global-exclude *.py[cod] - prune dist - prune build - """ - ).strip(), - "README.rst": "This is a ``README``", - "LICENSE.txt": "---- placeholder MIT license ----", - "src": { - "mypkg": { - "__init__.py": dedent( - """\ - import sys - from importlib.metadata import PackageNotFoundError, version - - try: - __version__ = version(__name__) - except PackageNotFoundError: - __version__ = "unknown" - """ - ), - "__main__.py": dedent( - """\ - from importlib.resources import read_text - from . import __version__, __name__ as parent - from .mod import x - - data = read_text(parent, "data.txt") - print(__version__, data, x) - """ - ), - "mod.py": "x = ''", - "data.txt": "Hello World", - } - }, -} - - -SETUP_SCRIPT_STUB = "__import__('setuptools').setup()" - - -@pytest.mark.xfail(sys.platform == "darwin", reason="pypa/setuptools#4328") -@pytest.mark.parametrize( - "files", - [ - {**EXAMPLE, "setup.py": SETUP_SCRIPT_STUB}, - EXAMPLE, # No setup.py script - ], -) -def test_editable_with_pyproject(tmp_path, venv, files, editable_opts): - project = tmp_path / "mypkg" - project.mkdir() - jaraco.path.build(files, prefix=project) - - cmd = [ - "python", - "-m", - "pip", - "install", - "--no-build-isolation", # required to force current version of setuptools - "-e", - str(project), - *editable_opts, - ] - print(venv.run(cmd)) - - cmd = ["python", "-m", "mypkg"] - assert venv.run(cmd).strip() == "3.14159.post0 Hello World" - - (project / "src/mypkg/data.txt").write_text("foobar", encoding="utf-8") - (project / "src/mypkg/mod.py").write_text("x = 42", encoding="utf-8") - assert venv.run(cmd).strip() == "3.14159.post0 foobar 42" - - -def test_editable_with_flat_layout(tmp_path, venv, editable_opts): - files = { - "mypkg": { - "pyproject.toml": dedent( - """\ - [build-system] - requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta" - - [project] - name = "mypkg" - version = "3.14159" - - [tool.setuptools] - packages = ["pkg"] - py-modules = ["mod"] - """ - ), - "pkg": {"__init__.py": "a = 4"}, - "mod.py": "b = 2", - }, - } - jaraco.path.build(files, prefix=tmp_path) - project = tmp_path / "mypkg" - - cmd = [ - "python", - "-m", - "pip", - "install", - "--no-build-isolation", # required to force current version of setuptools - "-e", - str(project), - *editable_opts, - ] - print(venv.run(cmd)) - cmd = ["python", "-c", "import pkg, mod; print(pkg.a, mod.b)"] - assert venv.run(cmd).strip() == "4 2" - - -def test_editable_with_single_module(tmp_path, venv, editable_opts): - files = { - "mypkg": { - "pyproject.toml": dedent( - """\ - [build-system] - requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta" - - [project] - name = "mod" - version = "3.14159" - - [tool.setuptools] - py-modules = ["mod"] - """ - ), - "mod.py": "b = 2", - }, - } - jaraco.path.build(files, prefix=tmp_path) - project = tmp_path / "mypkg" - - cmd = [ - "python", - "-m", - "pip", - "install", - "--no-build-isolation", # required to force current version of setuptools - "-e", - str(project), - *editable_opts, - ] - print(venv.run(cmd)) - cmd = ["python", "-c", "import mod; print(mod.b)"] - assert venv.run(cmd).strip() == "2" - - -class TestLegacyNamespaces: - # legacy => pkg_resources.declare_namespace(...) + setup(namespace_packages=...) - - def test_nspkg_file_is_unique(self, tmp_path, monkeypatch): - deprecation = pytest.warns( - SetuptoolsDeprecationWarning, match=".*namespace_packages parameter.*" - ) - installation_dir = tmp_path / ".installation_dir" - installation_dir.mkdir() - examples = ( - "myns.pkgA", - "myns.pkgB", - "myns.n.pkgA", - "myns.n.pkgB", - ) - - for name in examples: - pkg = namespaces.build_namespace_package(tmp_path, name, version="42") - with deprecation, monkeypatch.context() as ctx: - ctx.chdir(pkg) - dist = run_setup("setup.py", stop_after="config") - cmd = editable_wheel(dist) - cmd.finalize_options() - editable_name = cmd.get_finalized_command("dist_info").name - cmd._install_namespaces(installation_dir, editable_name) - - files = list(installation_dir.glob("*-nspkg.pth")) - assert len(files) == len(examples) - - @pytest.mark.parametrize( - "impl", - ( - "pkg_resources", - # "pkgutil", => does not work - ), - ) - @pytest.mark.parametrize("ns", ("myns.n",)) - def test_namespace_package_importable( - self, venv, tmp_path, ns, impl, editable_opts - ): - """ - Installing two packages sharing the same namespace, one installed - naturally using pip or `--single-version-externally-managed` - and the other installed in editable mode should leave the namespace - intact and both packages reachable by import. - (Ported from test_develop). - """ - build_system = """\ - [build-system] - requires = ["setuptools"] - build-backend = "setuptools.build_meta" - """ - pkg_A = namespaces.build_namespace_package(tmp_path, f"{ns}.pkgA", impl=impl) - pkg_B = namespaces.build_namespace_package(tmp_path, f"{ns}.pkgB", impl=impl) - (pkg_A / "pyproject.toml").write_text(build_system, encoding="utf-8") - (pkg_B / "pyproject.toml").write_text(build_system, encoding="utf-8") - # use pip to install to the target directory - opts = editable_opts[:] - opts.append("--no-build-isolation") # force current version of setuptools - venv.run(["python", "-m", "pip", "install", str(pkg_A), *opts]) - venv.run(["python", "-m", "pip", "install", "-e", str(pkg_B), *opts]) - venv.run(["python", "-c", f"import {ns}.pkgA; import {ns}.pkgB"]) - - -class TestPep420Namespaces: - def test_namespace_package_importable(self, venv, tmp_path, editable_opts): - """ - Installing two packages sharing the same namespace, one installed - normally using pip and the other installed in editable mode - should allow importing both packages. - """ - pkg_A = namespaces.build_pep420_namespace_package(tmp_path, 'myns.n.pkgA') - pkg_B = namespaces.build_pep420_namespace_package(tmp_path, 'myns.n.pkgB') - # use pip to install to the target directory - opts = editable_opts[:] - opts.append("--no-build-isolation") # force current version of setuptools - venv.run(["python", "-m", "pip", "install", str(pkg_A), *opts]) - venv.run(["python", "-m", "pip", "install", "-e", str(pkg_B), *opts]) - venv.run(["python", "-c", "import myns.n.pkgA; import myns.n.pkgB"]) - - def test_namespace_created_via_package_dir(self, venv, tmp_path, editable_opts): - """Currently users can create a namespace by tweaking `package_dir`""" - files = { - "pkgA": { - "pyproject.toml": dedent( - """\ - [build-system] - requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta" - - [project] - name = "pkgA" - version = "3.14159" - - [tool.setuptools] - package-dir = {"myns.n.pkgA" = "src"} - """ - ), - "src": {"__init__.py": "a = 1"}, - }, - } - jaraco.path.build(files, prefix=tmp_path) - pkg_A = tmp_path / "pkgA" - pkg_B = namespaces.build_pep420_namespace_package(tmp_path, 'myns.n.pkgB') - pkg_C = namespaces.build_pep420_namespace_package(tmp_path, 'myns.n.pkgC') - - # use pip to install to the target directory - opts = editable_opts[:] - opts.append("--no-build-isolation") # force current version of setuptools - venv.run(["python", "-m", "pip", "install", str(pkg_A), *opts]) - venv.run(["python", "-m", "pip", "install", "-e", str(pkg_B), *opts]) - venv.run(["python", "-m", "pip", "install", "-e", str(pkg_C), *opts]) - venv.run(["python", "-c", "from myns.n import pkgA, pkgB, pkgC"]) - - def test_namespace_accidental_config_in_lenient_mode(self, venv, tmp_path): - """Sometimes users might specify an ``include`` pattern that ignores parent - packages. In a normal installation this would ignore all modules inside the - parent packages, and make them namespaces (reported in issue #3504), - so the editable mode should preserve this behaviour. - """ - files = { - "pkgA": { - "pyproject.toml": dedent( - """\ - [build-system] - requires = ["setuptools", "wheel"] - build-backend = "setuptools.build_meta" - - [project] - name = "pkgA" - version = "3.14159" - - [tool.setuptools] - packages.find.include = ["mypkg.*"] - """ - ), - "mypkg": { - "__init__.py": "", - "other.py": "b = 1", - "n": { - "__init__.py": "", - "pkgA.py": "a = 1", - }, - }, - "MANIFEST.in": EXAMPLE["MANIFEST.in"], - }, - } - jaraco.path.build(files, prefix=tmp_path) - pkg_A = tmp_path / "pkgA" - - # use pip to install to the target directory - opts = ["--no-build-isolation"] # force current version of setuptools - venv.run(["python", "-m", "pip", "-v", "install", "-e", str(pkg_A), *opts]) - out = venv.run(["python", "-c", "from mypkg.n import pkgA; print(pkgA.a)"]) - assert out.strip() == "1" - cmd = """\ - try: - import mypkg.other - except ImportError: - print("mypkg.other not defined") - """ - out = venv.run(["python", "-c", dedent(cmd)]) - assert "mypkg.other not defined" in out - - -def test_editable_with_prefix(tmp_path, sample_project, editable_opts): - """ - Editable install to a prefix should be discoverable. - """ - prefix = tmp_path / 'prefix' - - # figure out where pip will likely install the package - site_packages_all = [ - prefix / Path(path).relative_to(sys.prefix) - for path in sys.path - if 'site-packages' in path and path.startswith(sys.prefix) - ] - - for sp in site_packages_all: - sp.mkdir(parents=True) - - # install workaround - _addsitedirs(site_packages_all) - - env = dict(os.environ, PYTHONPATH=os.pathsep.join(map(str, site_packages_all))) - cmd = [ - sys.executable, - '-m', - 'pip', - 'install', - '--editable', - str(sample_project), - '--prefix', - str(prefix), - '--no-build-isolation', - *editable_opts, - ] - subprocess.check_call(cmd, env=env) - - # now run 'sample' with the prefix on the PYTHONPATH - bin = 'Scripts' if platform.system() == 'Windows' else 'bin' - exe = prefix / bin / 'sample' - subprocess.check_call([exe], env=env) - - -class TestFinderTemplate: - """This test focus in getting a particular implementation detail right. - If at some point in time the implementation is changed for something different, - this test can be modified or even excluded. - """ - - def install_finder(self, finder): - loc = {} - exec(finder, loc, loc) - loc["install"]() - - def test_packages(self, tmp_path): - files = { - "src1": { - "pkg1": { - "__init__.py": "", - "subpkg": {"mod1.py": "a = 42"}, - }, - }, - "src2": {"mod2.py": "a = 43"}, - } - jaraco.path.build(files, prefix=tmp_path) - - mapping = { - "pkg1": str(tmp_path / "src1/pkg1"), - "mod2": str(tmp_path / "src2/mod2"), - } - template = _finder_template(str(uuid4()), mapping, {}) - - with contexts.save_paths(), contexts.save_sys_modules(): - for mod in ("pkg1", "pkg1.subpkg", "pkg1.subpkg.mod1", "mod2"): - sys.modules.pop(mod, None) - - self.install_finder(template) - mod1 = import_module("pkg1.subpkg.mod1") - mod2 = import_module("mod2") - subpkg = import_module("pkg1.subpkg") - - assert mod1.a == 42 - assert mod2.a == 43 - expected = str((tmp_path / "src1/pkg1/subpkg").resolve()) - assert_path(subpkg, expected) - - def test_namespace(self, tmp_path): - files = {"pkg": {"__init__.py": "a = 13", "text.txt": "abc"}} - jaraco.path.build(files, prefix=tmp_path) - - mapping = {"ns.othername": str(tmp_path / "pkg")} - namespaces = {"ns": []} - - template = _finder_template(str(uuid4()), mapping, namespaces) - with contexts.save_paths(), contexts.save_sys_modules(): - for mod in ("ns", "ns.othername"): - sys.modules.pop(mod, None) - - self.install_finder(template) - pkg = import_module("ns.othername") - text = importlib_resources.files(pkg) / "text.txt" - - expected = str((tmp_path / "pkg").resolve()) - assert_path(pkg, expected) - assert pkg.a == 13 - - # Make sure resources can also be found - assert text.read_text(encoding="utf-8") == "abc" - - def test_combine_namespaces(self, tmp_path): - files = { - "src1": {"ns": {"pkg1": {"__init__.py": "a = 13"}}}, - "src2": {"ns": {"mod2.py": "b = 37"}}, - } - jaraco.path.build(files, prefix=tmp_path) - - mapping = { - "ns.pkgA": str(tmp_path / "src1/ns/pkg1"), - "ns": str(tmp_path / "src2/ns"), - } - namespaces_ = {"ns": [str(tmp_path / "src1"), str(tmp_path / "src2")]} - template = _finder_template(str(uuid4()), mapping, namespaces_) - - with contexts.save_paths(), contexts.save_sys_modules(): - for mod in ("ns", "ns.pkgA", "ns.mod2"): - sys.modules.pop(mod, None) - - self.install_finder(template) - pkgA = import_module("ns.pkgA") - mod2 = import_module("ns.mod2") - - expected = str((tmp_path / "src1/ns/pkg1").resolve()) - assert_path(pkgA, expected) - assert pkgA.a == 13 - assert mod2.b == 37 - - def test_combine_namespaces_nested(self, tmp_path): - """ - Users may attempt to combine namespace packages in a nested way via - ``package_dir`` as shown in pypa/setuptools#4248. - """ - - files = { - "src": {"my_package": {"my_module.py": "a = 13"}}, - "src2": {"my_package2": {"my_module2.py": "b = 37"}}, - } - - stack = jaraco.path.DirectoryStack() - with stack.context(tmp_path): - jaraco.path.build(files) - attrs = { - "script_name": "%PEP 517%", - "package_dir": { - "different_name": "src/my_package", - "different_name.subpkg": "src2/my_package2", - }, - "packages": ["different_name", "different_name.subpkg"], - } - dist = Distribution(attrs) - finder = _TopLevelFinder(dist, str(uuid4())) - code = next(v for k, v in finder.get_implementation() if k.endswith(".py")) - - with contexts.save_paths(), contexts.save_sys_modules(): - for mod in attrs["packages"]: - sys.modules.pop(mod, None) - - self.install_finder(code) - mod1 = import_module("different_name.my_module") - mod2 = import_module("different_name.subpkg.my_module2") - - expected = str((tmp_path / "src/my_package/my_module.py").resolve()) - assert str(Path(mod1.__file__).resolve()) == expected - - expected = str((tmp_path / "src2/my_package2/my_module2.py").resolve()) - assert str(Path(mod2.__file__).resolve()) == expected - - assert mod1.a == 13 - assert mod2.b == 37 - - def test_dynamic_path_computation(self, tmp_path): - # Follows the example in PEP 420 - files = { - "project1": {"parent": {"child": {"one.py": "x = 1"}}}, - "project2": {"parent": {"child": {"two.py": "x = 2"}}}, - "project3": {"parent": {"child": {"three.py": "x = 3"}}}, - } - jaraco.path.build(files, prefix=tmp_path) - mapping = {} - namespaces_ = {"parent": [str(tmp_path / "project1/parent")]} - template = _finder_template(str(uuid4()), mapping, namespaces_) - - mods = (f"parent.child.{name}" for name in ("one", "two", "three")) - with contexts.save_paths(), contexts.save_sys_modules(): - for mod in ("parent", "parent.child", "parent.child", *mods): - sys.modules.pop(mod, None) - - self.install_finder(template) - - one = import_module("parent.child.one") - assert one.x == 1 - - with pytest.raises(ImportError): - import_module("parent.child.two") - - sys.path.append(str(tmp_path / "project2")) - two = import_module("parent.child.two") - assert two.x == 2 - - with pytest.raises(ImportError): - import_module("parent.child.three") - - sys.path.append(str(tmp_path / "project3")) - three = import_module("parent.child.three") - assert three.x == 3 - - def test_no_recursion(self, tmp_path): - # See issue #3550 - files = { - "pkg": { - "__init__.py": "from . import pkg", - }, - } - jaraco.path.build(files, prefix=tmp_path) - - mapping = { - "pkg": str(tmp_path / "pkg"), - } - template = _finder_template(str(uuid4()), mapping, {}) - - with contexts.save_paths(), contexts.save_sys_modules(): - sys.modules.pop("pkg", None) - - self.install_finder(template) - with pytest.raises(ImportError, match="pkg"): - import_module("pkg") - - def test_similar_name(self, tmp_path): - files = { - "foo": { - "__init__.py": "", - "bar": { - "__init__.py": "", - }, - }, - } - jaraco.path.build(files, prefix=tmp_path) - - mapping = { - "foo": str(tmp_path / "foo"), - } - template = _finder_template(str(uuid4()), mapping, {}) - - with contexts.save_paths(), contexts.save_sys_modules(): - sys.modules.pop("foo", None) - sys.modules.pop("foo.bar", None) - - self.install_finder(template) - with pytest.raises(ImportError, match="foobar"): - import_module("foobar") - - def test_case_sensitivity(self, tmp_path): - files = { - "foo": { - "__init__.py": "", - "lowercase.py": "x = 1", - "bar": { - "__init__.py": "", - "lowercase.py": "x = 2", - }, - }, - } - jaraco.path.build(files, prefix=tmp_path) - mapping = { - "foo": str(tmp_path / "foo"), - } - template = _finder_template(str(uuid4()), mapping, {}) - with contexts.save_paths(), contexts.save_sys_modules(): - sys.modules.pop("foo", None) - - self.install_finder(template) - with pytest.raises(ImportError, match="'FOO'"): - import_module("FOO") - - with pytest.raises(ImportError, match="'foo\\.LOWERCASE'"): - import_module("foo.LOWERCASE") - - with pytest.raises(ImportError, match="'foo\\.bar\\.Lowercase'"): - import_module("foo.bar.Lowercase") - - with pytest.raises(ImportError, match="'foo\\.BAR'"): - import_module("foo.BAR.lowercase") - - with pytest.raises(ImportError, match="'FOO'"): - import_module("FOO.bar.lowercase") - - mod = import_module("foo.lowercase") - assert mod.x == 1 - - mod = import_module("foo.bar.lowercase") - assert mod.x == 2 - - def test_namespace_case_sensitivity(self, tmp_path): - files = { - "pkg": { - "__init__.py": "a = 13", - "foo": { - "__init__.py": "b = 37", - "bar.py": "c = 42", - }, - }, - } - jaraco.path.build(files, prefix=tmp_path) - - mapping = {"ns.othername": str(tmp_path / "pkg")} - namespaces = {"ns": []} - - template = _finder_template(str(uuid4()), mapping, namespaces) - with contexts.save_paths(), contexts.save_sys_modules(): - for mod in ("ns", "ns.othername"): - sys.modules.pop(mod, None) - - self.install_finder(template) - pkg = import_module("ns.othername") - expected = str((tmp_path / "pkg").resolve()) - assert_path(pkg, expected) - assert pkg.a == 13 - - foo = import_module("ns.othername.foo") - assert foo.b == 37 - - bar = import_module("ns.othername.foo.bar") - assert bar.c == 42 - - with pytest.raises(ImportError, match="'NS'"): - import_module("NS.othername.foo") - - with pytest.raises(ImportError, match="'ns\\.othername\\.FOO\\'"): - import_module("ns.othername.FOO") - - with pytest.raises(ImportError, match="'ns\\.othername\\.foo\\.BAR\\'"): - import_module("ns.othername.foo.BAR") - - def test_intermediate_packages(self, tmp_path): - """ - The finder should not import ``fullname`` if the intermediate segments - don't exist (see pypa/setuptools#4019). - """ - files = { - "src": { - "mypkg": { - "__init__.py": "", - "config.py": "a = 13", - "helloworld.py": "b = 13", - "components": { - "config.py": "a = 37", - }, - }, - } - } - jaraco.path.build(files, prefix=tmp_path) - - mapping = {"mypkg": str(tmp_path / "src/mypkg")} - template = _finder_template(str(uuid4()), mapping, {}) - - with contexts.save_paths(), contexts.save_sys_modules(): - for mod in ( - "mypkg", - "mypkg.config", - "mypkg.helloworld", - "mypkg.components", - "mypkg.components.config", - "mypkg.components.helloworld", - ): - sys.modules.pop(mod, None) - - self.install_finder(template) - - config = import_module("mypkg.components.config") - assert config.a == 37 - - helloworld = import_module("mypkg.helloworld") - assert helloworld.b == 13 - - with pytest.raises(ImportError): - import_module("mypkg.components.helloworld") - - -def test_pkg_roots(tmp_path): - """This test focus in getting a particular implementation detail right. - If at some point in time the implementation is changed for something different, - this test can be modified or even excluded. - """ - files = { - "a": {"b": {"__init__.py": "ab = 1"}, "__init__.py": "a = 1"}, - "d": {"__init__.py": "d = 1", "e": {"__init__.py": "de = 1"}}, - "f": {"g": {"h": {"__init__.py": "fgh = 1"}}}, - "other": {"__init__.py": "abc = 1"}, - "another": {"__init__.py": "abcxyz = 1"}, - "yet_another": {"__init__.py": "mnopq = 1"}, - } - jaraco.path.build(files, prefix=tmp_path) - package_dir = { - "a.b.c": "other", - "a.b.c.x.y.z": "another", - "m.n.o.p.q": "yet_another", - } - packages = [ - "a", - "a.b", - "a.b.c", - "a.b.c.x.y", - "a.b.c.x.y.z", - "d", - "d.e", - "f", - "f.g", - "f.g.h", - "m.n.o.p.q", - ] - roots = _find_package_roots(packages, package_dir, tmp_path) - assert roots == { - "a": str(tmp_path / "a"), - "a.b.c": str(tmp_path / "other"), - "a.b.c.x.y.z": str(tmp_path / "another"), - "d": str(tmp_path / "d"), - "f": str(tmp_path / "f"), - "m.n.o.p.q": str(tmp_path / "yet_another"), - } - - ns = set(dict(_find_namespaces(packages, roots))) - assert ns == {"f", "f.g"} - - ns = set(_find_virtual_namespaces(roots)) - assert ns == {"a.b", "a.b.c.x", "a.b.c.x.y", "m", "m.n", "m.n.o", "m.n.o.p"} - - -class TestOverallBehaviour: - PYPROJECT = """\ - [build-system] - requires = ["setuptools"] - build-backend = "setuptools.build_meta" - - [project] - name = "mypkg" - version = "3.14159" - """ - - # Any: Would need a TypedDict. Keep it simple for tests - FLAT_LAYOUT: dict[str, Any] = { - "pyproject.toml": dedent(PYPROJECT), - "MANIFEST.in": EXAMPLE["MANIFEST.in"], - "otherfile.py": "", - "mypkg": { - "__init__.py": "", - "mod1.py": "var = 42", - "subpackage": { - "__init__.py": "", - "mod2.py": "var = 13", - "resource_file.txt": "resource 39", - }, - }, - } - - EXAMPLES = { - "flat-layout": FLAT_LAYOUT, - "src-layout": { - "pyproject.toml": dedent(PYPROJECT), - "MANIFEST.in": EXAMPLE["MANIFEST.in"], - "otherfile.py": "", - "src": {"mypkg": FLAT_LAYOUT["mypkg"]}, - }, - "custom-layout": { - "pyproject.toml": dedent(PYPROJECT) - + dedent( - """\ - [tool.setuptools] - packages = ["mypkg", "mypkg.subpackage"] - - [tool.setuptools.package-dir] - "mypkg.subpackage" = "other" - """ - ), - "MANIFEST.in": EXAMPLE["MANIFEST.in"], - "otherfile.py": "", - "mypkg": { - "__init__.py": "", - "mod1.py": FLAT_LAYOUT["mypkg"]["mod1.py"], - }, - "other": FLAT_LAYOUT["mypkg"]["subpackage"], - }, - "namespace": { - "pyproject.toml": dedent(PYPROJECT), - "MANIFEST.in": EXAMPLE["MANIFEST.in"], - "otherfile.py": "", - "src": { - "mypkg": { - "mod1.py": FLAT_LAYOUT["mypkg"]["mod1.py"], - "subpackage": FLAT_LAYOUT["mypkg"]["subpackage"], - }, - }, - }, - } - - @pytest.mark.xfail(sys.platform == "darwin", reason="pypa/setuptools#4328") - @pytest.mark.parametrize("layout", EXAMPLES.keys()) - def test_editable_install(self, tmp_path, venv, layout, editable_opts): - project, _ = install_project( - "mypkg", venv, tmp_path, self.EXAMPLES[layout], *editable_opts - ) - - # Ensure stray files are not importable - cmd_import_error = """\ - try: - import otherfile - except ImportError as ex: - print(ex) - """ - out = venv.run(["python", "-c", dedent(cmd_import_error)]) - assert "No module named 'otherfile'" in out - - # Ensure the modules are importable - cmd_get_vars = """\ - import mypkg, mypkg.mod1, mypkg.subpackage.mod2 - print(mypkg.mod1.var, mypkg.subpackage.mod2.var) - """ - out = venv.run(["python", "-c", dedent(cmd_get_vars)]) - assert "42 13" in out - - # Ensure resources are reachable - cmd_get_resource = """\ - import mypkg.subpackage - from setuptools._importlib import resources as importlib_resources - text = importlib_resources.files(mypkg.subpackage) / "resource_file.txt" - print(text.read_text(encoding="utf-8")) - """ - out = venv.run(["python", "-c", dedent(cmd_get_resource)]) - assert "resource 39" in out - - # Ensure files are editable - mod1 = next(project.glob("**/mod1.py")) - mod2 = next(project.glob("**/mod2.py")) - resource_file = next(project.glob("**/resource_file.txt")) - - mod1.write_text("var = 17", encoding="utf-8") - mod2.write_text("var = 781", encoding="utf-8") - resource_file.write_text("resource 374", encoding="utf-8") - - out = venv.run(["python", "-c", dedent(cmd_get_vars)]) - assert "42 13" not in out - assert "17 781" in out - - out = venv.run(["python", "-c", dedent(cmd_get_resource)]) - assert "resource 39" not in out - assert "resource 374" in out - - -class TestLinkTree: - FILES = deepcopy(TestOverallBehaviour.EXAMPLES["src-layout"]) - FILES["pyproject.toml"] += dedent( - """\ - [tool.setuptools] - # Temporary workaround: both `include-package-data` and `package-data` configs - # can be removed after #3260 is fixed. - include-package-data = false - package-data = {"*" = ["*.txt"]} - - [tool.setuptools.packages.find] - where = ["src"] - exclude = ["*.subpackage*"] - """ - ) - FILES["src"]["mypkg"]["resource.not_in_manifest"] = "abc" - - def test_generated_tree(self, tmp_path): - jaraco.path.build(self.FILES, prefix=tmp_path) - - with _Path(tmp_path): - name = "mypkg-3.14159" - dist = Distribution({"script_name": "%PEP 517%"}) - dist.parse_config_files() - - wheel = Mock() - aux = tmp_path / ".aux" - build = tmp_path / ".build" - aux.mkdir() - build.mkdir() - - build_py = dist.get_command_obj("build_py") - build_py.editable_mode = True - build_py.build_lib = str(build) - build_py.ensure_finalized() - outputs = build_py.get_outputs() - output_mapping = build_py.get_output_mapping() - - make_tree = _LinkTree(dist, name, aux, build) - make_tree(wheel, outputs, output_mapping) - - mod1 = next(aux.glob("**/mod1.py")) - expected = tmp_path / "src/mypkg/mod1.py" - assert_link_to(mod1, expected) - - assert next(aux.glob("**/subpackage"), None) is None - assert next(aux.glob("**/mod2.py"), None) is None - assert next(aux.glob("**/resource_file.txt"), None) is None - - assert next(aux.glob("**/resource.not_in_manifest"), None) is None - - def test_strict_install(self, tmp_path, venv): - opts = ["--config-settings", "editable-mode=strict"] - install_project("mypkg", venv, tmp_path, self.FILES, *opts) - - out = venv.run(["python", "-c", "import mypkg.mod1; print(mypkg.mod1.var)"]) - assert "42" in out - - # Ensure packages excluded from distribution are not importable - cmd_import_error = """\ - try: - from mypkg import subpackage - except ImportError as ex: - print(ex) - """ - out = venv.run(["python", "-c", dedent(cmd_import_error)]) - assert "cannot import name 'subpackage'" in out - - # Ensure resource files excluded from distribution are not reachable - cmd_get_resource = """\ - import mypkg - from setuptools._importlib import resources as importlib_resources - try: - text = importlib_resources.files(mypkg) / "resource.not_in_manifest" - print(text.read_text(encoding="utf-8")) - except FileNotFoundError as ex: - print(ex) - """ - out = venv.run(["python", "-c", dedent(cmd_get_resource)]) - assert "No such file or directory" in out - assert "resource.not_in_manifest" in out - - -@pytest.mark.filterwarnings("ignore:.*compat.*:setuptools.SetuptoolsDeprecationWarning") -def test_compat_install(tmp_path, venv): - # TODO: Remove `compat` after Dec/2022. - opts = ["--config-settings", "editable-mode=compat"] - files = TestOverallBehaviour.EXAMPLES["custom-layout"] - install_project("mypkg", venv, tmp_path, files, *opts) - - out = venv.run(["python", "-c", "import mypkg.mod1; print(mypkg.mod1.var)"]) - assert "42" in out - - expected_path = comparable_path(str(tmp_path)) - - # Compatible behaviour will make spurious modules and excluded - # files importable directly from the original path - for cmd in ( - "import otherfile; print(otherfile)", - "import other; print(other)", - "import mypkg; print(mypkg)", - ): - out = comparable_path(venv.run(["python", "-c", cmd])) - assert expected_path in out - - # Compatible behaviour will not consider custom mappings - cmd = """\ - try: - from mypkg import subpackage; - except ImportError as ex: - print(ex) - """ - out = venv.run(["python", "-c", dedent(cmd)]) - assert "cannot import name 'subpackage'" in out - - -@pytest.mark.uses_network -def test_pbr_integration(pbr_package, venv, editable_opts): - """Ensure editable installs work with pbr, issue #3500""" - cmd = [ - 'python', - '-m', - 'pip', - '-v', - 'install', - '--editable', - pbr_package, - *editable_opts, - ] - venv.run(cmd, stderr=subprocess.STDOUT) - out = venv.run(["python", "-c", "import mypkg.hello"]) - assert "Hello world!" in out - - -class TestCustomBuildPy: - """ - Issue #3501 indicates that some plugins/customizations might rely on: - - 1. ``build_py`` not running - 2. ``build_py`` always copying files to ``build_lib`` - - During the transition period setuptools should prevent potential errors from - happening due to those assumptions. - """ - - # TODO: Remove tests after _run_build_steps is removed. - - FILES = { - **TestOverallBehaviour.EXAMPLES["flat-layout"], - "setup.py": dedent( - """\ - import pathlib - from setuptools import setup - from setuptools.command.build_py import build_py as orig - - class my_build_py(orig): - def run(self): - super().run() - raise ValueError("TEST_RAISE") - - setup(cmdclass={"build_py": my_build_py}) - """ - ), - } - - def test_safeguarded_from_errors(self, tmp_path, venv): - """Ensure that errors in custom build_py are reported as warnings""" - # Warnings should show up - _, out = install_project("mypkg", venv, tmp_path, self.FILES) - assert "SetuptoolsDeprecationWarning" in out - assert "ValueError: TEST_RAISE" in out - # but installation should be successful - out = venv.run(["python", "-c", "import mypkg.mod1; print(mypkg.mod1.var)"]) - assert "42" in out - - -class TestCustomBuildWheel: - def install_custom_build_wheel(self, dist): - bdist_wheel_cls = dist.get_command_class("bdist_wheel") - - class MyBdistWheel(bdist_wheel_cls): - def get_tag(self): - # In issue #3513, we can see that some extensions may try to access - # the `plat_name` property in bdist_wheel - if self.plat_name.startswith("macosx-"): - _ = "macOS platform" - return super().get_tag() - - dist.cmdclass["bdist_wheel"] = MyBdistWheel - - def test_access_plat_name(self, tmpdir_cwd): - # Even when a custom bdist_wheel tries to access plat_name the build should - # be successful - jaraco.path.build({"module.py": "x = 42"}) - dist = Distribution() - dist.script_name = "setup.py" - dist.set_defaults() - self.install_custom_build_wheel(dist) - cmd = editable_wheel(dist) - cmd.ensure_finalized() - cmd.run() - wheel_file = str(next(Path().glob('dist/*.whl'))) - assert "editable" in wheel_file - - -class TestCustomBuildExt: - def install_custom_build_ext_distutils(self, dist): - from distutils.command.build_ext import build_ext as build_ext_cls - - class MyBuildExt(build_ext_cls): - pass - - dist.cmdclass["build_ext"] = MyBuildExt - - @pytest.mark.skipif( - sys.platform != "linux", reason="compilers may fail without correct setup" - ) - def test_distutils_leave_inplace_files(self, tmpdir_cwd): - jaraco.path.build({"module.c": ""}) - attrs = { - "ext_modules": [Extension("module", ["module.c"])], - } - dist = Distribution(attrs) - dist.script_name = "setup.py" - dist.set_defaults() - self.install_custom_build_ext_distutils(dist) - cmd = editable_wheel(dist) - cmd.ensure_finalized() - cmd.run() - wheel_file = str(next(Path().glob('dist/*.whl'))) - assert "editable" in wheel_file - files = [p for p in Path().glob("module.*") if p.suffix != ".c"] - assert len(files) == 1 - name = files[0].name - assert any(name.endswith(ext) for ext in EXTENSION_SUFFIXES) - - -def test_debugging_tips(tmpdir_cwd, monkeypatch): - """Make sure to display useful debugging tips to the user.""" - jaraco.path.build({"module.py": "x = 42"}) - dist = Distribution() - dist.script_name = "setup.py" - dist.set_defaults() - cmd = editable_wheel(dist) - cmd.ensure_finalized() - - SimulatedErr = type("SimulatedErr", (Exception,), {}) - simulated_failure = Mock(side_effect=SimulatedErr()) - monkeypatch.setattr(cmd, "get_finalized_command", simulated_failure) - - with pytest.raises(SimulatedErr) as ctx: - cmd.run() - assert any('debugging-tips' in note for note in ctx.value.__notes__) - - -@pytest.mark.filterwarnings("error") -def test_encode_pth(): - """Ensure _encode_pth function does not produce encoding warnings""" - content = _encode_pth("tkmilan_ç_utf8") # no warnings (would be turned into errors) - assert isinstance(content, bytes) - - -def install_project(name, venv, tmp_path, files, *opts): - project = tmp_path / name - project.mkdir() - jaraco.path.build(files, prefix=project) - opts = [*opts, "--no-build-isolation"] # force current version of setuptools - out = venv.run( - ["python", "-m", "pip", "-v", "install", "-e", str(project), *opts], - stderr=subprocess.STDOUT, - ) - return project, out - - -def _addsitedirs(new_dirs): - """To use this function, it is necessary to insert new_dir in front of sys.path. - The Python process will try to import a ``sitecustomize`` module on startup. - If we manipulate sys.path/PYTHONPATH, we can force it to run our code, - which invokes ``addsitedir`` and ensure ``.pth`` files are loaded. - """ - content = '\n'.join( - ("import site",) - + tuple(f"site.addsitedir({os.fspath(new_dir)!r})" for new_dir in new_dirs) - ) - (new_dirs[0] / "sitecustomize.py").write_text(content, encoding="utf-8") - - -# ---- Assertion Helpers ---- - - -def assert_path(pkg, expected): - # __path__ is not guaranteed to exist, so we have to account for that - if pkg.__path__: - path = next(iter(pkg.__path__), None) - if path: - assert str(Path(path).resolve()) == expected - - -def assert_link_to(file: Path, other: Path) -> None: - if file.is_symlink(): - assert str(file.resolve()) == str(other.resolve()) - else: - file_stat = file.stat() - other_stat = other.stat() - assert file_stat[stat.ST_INO] == other_stat[stat.ST_INO] - assert file_stat[stat.ST_DEV] == other_stat[stat.ST_DEV] - - -def comparable_path(str_with_path: str) -> str: - return str_with_path.lower().replace(os.sep, "/").replace("//", "/") diff --git a/voxvera/vendor/setuptools/tests/test_egg_info.py b/voxvera/vendor/setuptools/tests/test_egg_info.py deleted file mode 100644 index 3653be0..0000000 --- a/voxvera/vendor/setuptools/tests/test_egg_info.py +++ /dev/null @@ -1,1306 +0,0 @@ -from __future__ import annotations - -import ast -import glob -import os -import re -import stat -import sys -import time -from pathlib import Path -from unittest import mock - -import pytest -from jaraco import path - -from setuptools import errors -from setuptools.command.egg_info import egg_info, manifest_maker, write_entries -from setuptools.dist import Distribution - -from . import contexts, environment -from .textwrap import DALS - - -class Environment(str): - pass - - -@pytest.fixture -def env(): - with contexts.tempdir(prefix='setuptools-test.') as env_dir: - env = Environment(env_dir) - os.chmod(env_dir, stat.S_IRWXU) - subs = 'home', 'lib', 'scripts', 'data', 'egg-base' - env.paths = dict((dirname, os.path.join(env_dir, dirname)) for dirname in subs) - list(map(os.mkdir, env.paths.values())) - path.build({ - env.paths['home']: { - '.pydistutils.cfg': DALS( - """ - [egg_info] - egg-base = {egg-base} - """.format(**env.paths) - ) - } - }) - yield env - - -class TestEggInfo: - setup_script = DALS( - """ - from setuptools import setup - - setup( - name='foo', - py_modules=['hello'], - entry_points={'console_scripts': ['hi = hello.run']}, - zip_safe=False, - ) - """ - ) - - def _create_project(self): - path.build({ - 'setup.py': self.setup_script, - 'hello.py': DALS( - """ - def run(): - print('hello') - """ - ), - }) - - @staticmethod - def _extract_mv_version(pkg_info_lines: list[str]) -> tuple[int, int]: - version_str = pkg_info_lines[0].split(' ')[1] - major, minor = map(int, version_str.split('.')[:2]) - return major, minor - - def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): - """ - When the egg_info section is empty or not present, running - save_version_info should add the settings to the setup.cfg - in a deterministic order. - """ - setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') - dist = Distribution() - ei = egg_info(dist) - ei.initialize_options() - ei.save_version_info(setup_cfg) - - with open(setup_cfg, 'r', encoding="utf-8") as f: - content = f.read() - - assert '[egg_info]' in content - assert 'tag_build =' in content - assert 'tag_date = 0' in content - - expected_order = ( - 'tag_build', - 'tag_date', - ) - - self._validate_content_order(content, expected_order) - - @staticmethod - def _validate_content_order(content, expected): - """ - Assert that the strings in expected appear in content - in order. - """ - pattern = '.*'.join(expected) - flags = re.MULTILINE | re.DOTALL - assert re.search(pattern, content, flags) - - def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): - """ - When running save_version_info on an existing setup.cfg - with the 'default' values present from a previous run, - the file should remain unchanged. - """ - setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') - path.build({ - setup_cfg: DALS( - """ - [egg_info] - tag_build = - tag_date = 0 - """ - ), - }) - dist = Distribution() - ei = egg_info(dist) - ei.initialize_options() - ei.save_version_info(setup_cfg) - - with open(setup_cfg, 'r', encoding="utf-8") as f: - content = f.read() - - assert '[egg_info]' in content - assert 'tag_build =' in content - assert 'tag_date = 0' in content - - expected_order = ( - 'tag_build', - 'tag_date', - ) - - self._validate_content_order(content, expected_order) - - def test_expected_files_produced(self, tmpdir_cwd, env): - self._create_project() - - self._run_egg_info_command(tmpdir_cwd, env) - actual = os.listdir('foo.egg-info') - - expected = [ - 'PKG-INFO', - 'SOURCES.txt', - 'dependency_links.txt', - 'entry_points.txt', - 'not-zip-safe', - 'top_level.txt', - ] - assert sorted(actual) == expected - - def test_handling_utime_error(self, tmpdir_cwd, env): - dist = Distribution() - ei = egg_info(dist) - utime_patch = mock.patch('os.utime', side_effect=OSError("TEST")) - mkpath_patch = mock.patch( - 'setuptools.command.egg_info.egg_info.mkpath', return_val=None - ) - - with utime_patch, mkpath_patch: - import distutils.errors - - msg = r"Cannot update time stamp of directory 'None'" - with pytest.raises(distutils.errors.DistutilsFileError, match=msg): - ei.run() - - def test_license_is_a_string(self, tmpdir_cwd, env): - setup_config = DALS( - """ - [metadata] - name=foo - version=0.0.1 - license=file:MIT - """ - ) - - setup_script = DALS( - """ - from setuptools import setup - - setup() - """ - ) - - path.build({ - 'setup.py': setup_script, - 'setup.cfg': setup_config, - }) - - # This command should fail with a ValueError, but because it's - # currently configured to use a subprocess, the actual traceback - # object is lost and we need to parse it from stderr - with pytest.raises(AssertionError) as exc: - self._run_egg_info_command(tmpdir_cwd, env) - - # The only argument to the assertion error should be a traceback - # containing a ValueError - assert 'ValueError' in exc.value.args[0] - - def test_rebuilt(self, tmpdir_cwd, env): - """Ensure timestamps are updated when the command is re-run.""" - self._create_project() - - self._run_egg_info_command(tmpdir_cwd, env) - timestamp_a = os.path.getmtime('foo.egg-info') - - # arbitrary sleep just to handle *really* fast systems - time.sleep(0.001) - - self._run_egg_info_command(tmpdir_cwd, env) - timestamp_b = os.path.getmtime('foo.egg-info') - - assert timestamp_a != timestamp_b - - def test_manifest_template_is_read(self, tmpdir_cwd, env): - self._create_project() - path.build({ - 'MANIFEST.in': DALS( - """ - recursive-include docs *.rst - """ - ), - 'docs': { - 'usage.rst': "Run 'hi'", - }, - }) - self._run_egg_info_command(tmpdir_cwd, env) - egg_info_dir = os.path.join('.', 'foo.egg-info') - sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') - with open(sources_txt, encoding="utf-8") as f: - assert 'docs/usage.rst' in f.read().split('\n') - - def _setup_script_with_requires(self, requires, use_setup_cfg=False): - setup_script = DALS( - """ - from setuptools import setup - - setup(name='foo', zip_safe=False, %s) - """ - ) % ('' if use_setup_cfg else requires) - setup_config = requires if use_setup_cfg else '' - path.build({ - 'setup.py': setup_script, - 'setup.cfg': setup_config, - }) - - mismatch_marker = f"python_version<'{sys.version_info[0]}'" - # Alternate equivalent syntax. - mismatch_marker_alternate = f'python_version < "{sys.version_info[0]}"' - invalid_marker = "<=>++" - - class RequiresTestHelper: - @staticmethod - def parametrize(*test_list, **format_dict): - idlist = [] - argvalues = [] - for test in test_list: - test_params = test.lstrip().split('\n\n', 3) - name_kwargs = test_params.pop(0).split('\n') - if len(name_kwargs) > 1: - val = name_kwargs[1].strip() - install_cmd_kwargs = ast.literal_eval(val) - else: - install_cmd_kwargs = {} - name = name_kwargs[0].strip() - setup_py_requires, setup_cfg_requires, expected_requires = [ - DALS(a).format(**format_dict) for a in test_params - ] - for id_, requires, use_cfg in ( - (name, setup_py_requires, False), - (name + '_in_setup_cfg', setup_cfg_requires, True), - ): - idlist.append(id_) - marks = () - if requires.startswith('@xfail\n'): - requires = requires[7:] - marks = pytest.mark.xfail - argvalues.append( - pytest.param( - requires, - use_cfg, - expected_requires, - install_cmd_kwargs, - marks=marks, - ) - ) - return pytest.mark.parametrize( - ( - "requires", - "use_setup_cfg", - "expected_requires", - "install_cmd_kwargs", - ), - argvalues, - ids=idlist, - ) - - @RequiresTestHelper.parametrize( - # Format of a test: - # - # id - # install_cmd_kwargs [optional] - # - # requires block (when used in setup.py) - # - # requires block (when used in setup.cfg) - # - # expected contents of requires.txt - """ - install_requires_deterministic - - install_requires=["wheel>=0.5", "pytest"] - - [options] - install_requires = - wheel>=0.5 - pytest - - wheel>=0.5 - pytest - """, - """ - install_requires_ordered - - install_requires=["pytest>=3.0.2,!=10.9999"] - - [options] - install_requires = - pytest>=3.0.2,!=10.9999 - - pytest!=10.9999,>=3.0.2 - """, - """ - install_requires_with_marker - - install_requires=["barbazquux;{mismatch_marker}"], - - [options] - install_requires = - barbazquux; {mismatch_marker} - - [:{mismatch_marker_alternate}] - barbazquux - """, - """ - install_requires_with_extra - {'cmd': ['egg_info']} - - install_requires=["barbazquux [test]"], - - [options] - install_requires = - barbazquux [test] - - barbazquux[test] - """, - """ - install_requires_with_extra_and_marker - - install_requires=["barbazquux [test]; {mismatch_marker}"], - - [options] - install_requires = - barbazquux [test]; {mismatch_marker} - - [:{mismatch_marker_alternate}] - barbazquux[test] - """, - """ - setup_requires_with_markers - - setup_requires=["barbazquux;{mismatch_marker}"], - - [options] - setup_requires = - barbazquux; {mismatch_marker} - - """, - """ - extras_require_with_extra - {'cmd': ['egg_info']} - - extras_require={{"extra": ["barbazquux [test]"]}}, - - [options.extras_require] - extra = barbazquux [test] - - [extra] - barbazquux[test] - """, - """ - extras_require_with_extra_and_marker_in_req - - extras_require={{"extra": ["barbazquux [test]; {mismatch_marker}"]}}, - - [options.extras_require] - extra = - barbazquux [test]; {mismatch_marker} - - [extra] - - [extra:{mismatch_marker_alternate}] - barbazquux[test] - """, - # FIXME: ConfigParser does not allow : in key names! - """ - extras_require_with_marker - - extras_require={{":{mismatch_marker}": ["barbazquux"]}}, - - @xfail - [options.extras_require] - :{mismatch_marker} = barbazquux - - [:{mismatch_marker}] - barbazquux - """, - """ - extras_require_with_marker_in_req - - extras_require={{"extra": ["barbazquux; {mismatch_marker}"]}}, - - [options.extras_require] - extra = - barbazquux; {mismatch_marker} - - [extra] - - [extra:{mismatch_marker_alternate}] - barbazquux - """, - """ - extras_require_with_empty_section - - extras_require={{"empty": []}}, - - [options.extras_require] - empty = - - [empty] - """, - # Format arguments. - invalid_marker=invalid_marker, - mismatch_marker=mismatch_marker, - mismatch_marker_alternate=mismatch_marker_alternate, - ) - def test_requires( - self, - tmpdir_cwd, - env, - requires, - use_setup_cfg, - expected_requires, - install_cmd_kwargs, - ): - self._setup_script_with_requires(requires, use_setup_cfg) - self._run_egg_info_command(tmpdir_cwd, env, **install_cmd_kwargs) - egg_info_dir = os.path.join('.', 'foo.egg-info') - requires_txt = os.path.join(egg_info_dir, 'requires.txt') - if os.path.exists(requires_txt): - with open(requires_txt, encoding="utf-8") as fp: - install_requires = fp.read() - else: - install_requires = '' - assert install_requires.lstrip() == expected_requires - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - - def test_install_requires_unordered_disallowed(self, tmpdir_cwd, env): - """ - Packages that pass unordered install_requires sequences - should be rejected as they produce non-deterministic - builds. See #458. - """ - req = 'install_requires={"fake-factory==0.5.2", "pytz"}' - self._setup_script_with_requires(req) - with pytest.raises(AssertionError): - self._run_egg_info_command(tmpdir_cwd, env) - - def test_extras_require_with_invalid_marker(self, tmpdir_cwd, env): - tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' - req = tmpl.format(marker=self.invalid_marker) - self._setup_script_with_requires(req) - with pytest.raises(AssertionError): - self._run_egg_info_command(tmpdir_cwd, env) - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - - def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): - tmpl = 'extras_require={{"extra": ["barbazquux; {marker}"]}},' - req = tmpl.format(marker=self.invalid_marker) - self._setup_script_with_requires(req) - with pytest.raises(AssertionError): - self._run_egg_info_command(tmpdir_cwd, env) - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - - def test_provides_extra(self, tmpdir_cwd, env): - self._setup_script_with_requires('extras_require={"foobar": ["barbazquux"]},') - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - assert 'Provides-Extra: foobar' in pkg_info_lines - assert 'Metadata-Version: 2.4' in pkg_info_lines - - def test_doesnt_provides_extra(self, tmpdir_cwd, env): - self._setup_script_with_requires( - """install_requires=["spam ; python_version<'3.6'"]""" - ) - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_text = fp.read() - assert 'Provides-Extra:' not in pkg_info_text - - @pytest.mark.parametrize( - ('files', 'license_in_sources'), - [ - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE - """ - ), - 'LICENSE': "Test license", - }, - True, - ), # with license - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = INVALID_LICENSE - """ - ), - 'LICENSE': "Test license", - }, - False, - ), # with an invalid license - ( - { - 'setup.cfg': DALS( - """ - """ - ), - 'LICENSE': "Test license", - }, - True, - ), # no license_file attribute, LICENSE auto-included - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE - """ - ), - 'MANIFEST.in': "exclude LICENSE", - 'LICENSE': "Test license", - }, - True, - ), # manifest is overwritten by license_file - pytest.param( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICEN[CS]E* - """ - ), - 'LICENSE': "Test license", - }, - True, - id="glob_pattern", - ), - ], - ) - def test_setup_cfg_license_file(self, tmpdir_cwd, env, files, license_in_sources): - self._create_project() - path.build(files) - - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - - sources_text = Path(egg_info_dir, "SOURCES.txt").read_text(encoding="utf-8") - - if license_in_sources: - assert 'LICENSE' in sources_text - else: - assert 'LICENSE' not in sources_text - # for invalid license test - assert 'INVALID_LICENSE' not in sources_text - - @pytest.mark.parametrize( - ('files', 'incl_licenses', 'excl_licenses'), - [ - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = - LICENSE-ABC - LICENSE-XYZ - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-XYZ': "XYZ license", - }, - ['LICENSE-ABC', 'LICENSE-XYZ'], - [], - ), # with licenses - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = LICENSE-ABC, LICENSE-XYZ - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-XYZ': "XYZ license", - }, - ['LICENSE-ABC', 'LICENSE-XYZ'], - [], - ), # with commas - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = - LICENSE-ABC - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-XYZ': "XYZ license", - }, - ['LICENSE-ABC'], - ['LICENSE-XYZ'], - ), # with one license - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-XYZ': "XYZ license", - }, - [], - ['LICENSE-ABC', 'LICENSE-XYZ'], - ), # empty - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = LICENSE-XYZ - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-XYZ': "XYZ license", - }, - ['LICENSE-XYZ'], - ['LICENSE-ABC'], - ), # on same line - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = - LICENSE-ABC - INVALID_LICENSE - """ - ), - 'LICENSE-ABC': "Test license", - }, - ['LICENSE-ABC'], - ['INVALID_LICENSE'], - ), # with an invalid license - ( - { - 'setup.cfg': DALS( - """ - """ - ), - 'LICENSE': "Test license", - }, - ['LICENSE'], - [], - ), # no license_files attribute, LICENSE auto-included - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = LICENSE - """ - ), - 'MANIFEST.in': "exclude LICENSE", - 'LICENSE': "Test license", - }, - ['LICENSE'], - [], - ), # manifest is overwritten by license_files - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = - LICENSE-ABC - LICENSE-XYZ - """ - ), - 'MANIFEST.in': "exclude LICENSE-XYZ", - 'LICENSE-ABC': "ABC license", - 'LICENSE-XYZ': "XYZ license", - # manifest is overwritten by license_files - }, - ['LICENSE-ABC', 'LICENSE-XYZ'], - [], - ), - pytest.param( - { - 'setup.cfg': "", - 'LICENSE-ABC': "ABC license", - 'COPYING-ABC': "ABC copying", - 'NOTICE-ABC': "ABC notice", - 'AUTHORS-ABC': "ABC authors", - 'LICENCE-XYZ': "XYZ license", - 'LICENSE': "License", - 'INVALID-LICENSE': "Invalid license", - }, - [ - 'LICENSE-ABC', - 'COPYING-ABC', - 'NOTICE-ABC', - 'AUTHORS-ABC', - 'LICENCE-XYZ', - 'LICENSE', - ], - ['INVALID-LICENSE'], - # ('LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*') - id="default_glob_patterns", - ), - pytest.param( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = - LICENSE* - """ - ), - 'LICENSE-ABC': "ABC license", - 'NOTICE-XYZ': "XYZ notice", - }, - ['LICENSE-ABC'], - ['NOTICE-XYZ'], - id="no_default_glob_patterns", - ), - pytest.param( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = - LICENSE-ABC - LICENSE* - """ - ), - 'LICENSE-ABC': "ABC license", - }, - ['LICENSE-ABC'], - [], - id="files_only_added_once", - ), - pytest.param( - { - 'setup.cfg': DALS( - """ - [metadata] - license_files = **/LICENSE - """ - ), - 'LICENSE': "ABC license", - 'LICENSE-OTHER': "Don't include", - 'vendor': {'LICENSE': "Vendor license"}, - }, - ['LICENSE', 'vendor/LICENSE'], - ['LICENSE-OTHER'], - id="recursive_glob", - ), - ], - ) - def test_setup_cfg_license_files( - self, tmpdir_cwd, env, files, incl_licenses, excl_licenses - ): - self._create_project() - path.build(files) - - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - - sources_text = Path(egg_info_dir, "SOURCES.txt").read_text(encoding="utf-8") - sources_lines = [line.strip() for line in sources_text.splitlines()] - - for lf in incl_licenses: - assert sources_lines.count(lf) == 1 - - for lf in excl_licenses: - assert sources_lines.count(lf) == 0 - - @pytest.mark.parametrize( - ('files', 'incl_licenses', 'excl_licenses'), - [ - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = - license_files = - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-XYZ': "XYZ license", - }, - [], - ['LICENSE-ABC', 'LICENSE-XYZ'], - ), # both empty - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = - LICENSE-ABC - LICENSE-XYZ - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-XYZ': "XYZ license", - # license_file is still singular - }, - [], - ['LICENSE-ABC', 'LICENSE-XYZ'], - ), - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE-ABC - license_files = - LICENSE-XYZ - LICENSE-PQR - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-PQR': "PQR license", - 'LICENSE-XYZ': "XYZ license", - }, - ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], - [], - ), # combined - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE-ABC - license_files = - LICENSE-ABC - LICENSE-XYZ - LICENSE-PQR - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-PQR': "PQR license", - 'LICENSE-XYZ': "XYZ license", - # duplicate license - }, - ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], - [], - ), - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE-ABC - license_files = - LICENSE-XYZ - """ - ), - 'LICENSE-ABC': "ABC license", - 'LICENSE-PQR': "PQR license", - 'LICENSE-XYZ': "XYZ license", - # combined subset - }, - ['LICENSE-ABC', 'LICENSE-XYZ'], - ['LICENSE-PQR'], - ), - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE-ABC - license_files = - LICENSE-XYZ - LICENSE-PQR - """ - ), - 'LICENSE-PQR': "Test license", - # with invalid licenses - }, - ['LICENSE-PQR'], - ['LICENSE-ABC', 'LICENSE-XYZ'], - ), - ( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE-ABC - license_files = - LICENSE-PQR - LICENSE-XYZ - """ - ), - 'MANIFEST.in': "exclude LICENSE-ABC\nexclude LICENSE-PQR", - 'LICENSE-ABC': "ABC license", - 'LICENSE-PQR': "PQR license", - 'LICENSE-XYZ': "XYZ license", - # manifest is overwritten - }, - ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], - [], - ), - pytest.param( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE* - """ - ), - 'LICENSE-ABC': "ABC license", - 'NOTICE-XYZ': "XYZ notice", - }, - ['LICENSE-ABC'], - ['NOTICE-XYZ'], - id="no_default_glob_patterns", - ), - pytest.param( - { - 'setup.cfg': DALS( - """ - [metadata] - license_file = LICENSE* - license_files = - NOTICE* - """ - ), - 'LICENSE-ABC': "ABC license", - 'NOTICE-ABC': "ABC notice", - 'AUTHORS-ABC': "ABC authors", - }, - ['LICENSE-ABC', 'NOTICE-ABC'], - ['AUTHORS-ABC'], - id="combined_glob_patterrns", - ), - ], - ) - def test_setup_cfg_license_file_license_files( - self, tmpdir_cwd, env, files, incl_licenses, excl_licenses - ): - self._create_project() - path.build(files) - - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - - sources_text = Path(egg_info_dir, "SOURCES.txt").read_text(encoding="utf-8") - sources_lines = [line.strip() for line in sources_text.splitlines()] - - for lf in incl_licenses: - assert sources_lines.count(lf) == 1 - - for lf in excl_licenses: - assert sources_lines.count(lf) == 0 - - def test_license_file_attr_pkg_info(self, tmpdir_cwd, env): - """All matched license files should have a corresponding License-File.""" - self._create_project() - path.build({ - "setup.cfg": DALS( - """ - [metadata] - license_files = - NOTICE* - LICENSE* - **/LICENSE - """ - ), - "LICENSE-ABC": "ABC license", - "LICENSE-XYZ": "XYZ license", - "NOTICE": "included", - "IGNORE": "not include", - "vendor": {'LICENSE': "Vendor license"}, - }) - - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - license_file_lines = [ - line for line in pkg_info_lines if line.startswith('License-File:') - ] - - # Only 'NOTICE', LICENSE-ABC', and 'LICENSE-XYZ' should have been matched - # Also assert that order from license_files is keeped - assert len(license_file_lines) == 4 - assert "License-File: NOTICE" == license_file_lines[0] - assert "License-File: LICENSE-ABC" in license_file_lines[1:] - assert "License-File: LICENSE-XYZ" in license_file_lines[1:] - assert "License-File: vendor/LICENSE" in license_file_lines[3] - - def test_metadata_version(self, tmpdir_cwd, env): - """Make sure latest metadata version is used by default.""" - self._setup_script_with_requires("") - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - # Update metadata version if changed - assert self._extract_mv_version(pkg_info_lines) == (2, 4) - - def test_long_description_content_type(self, tmpdir_cwd, env): - # Test that specifying a `long_description_content_type` keyword arg to - # the `setup` function results in writing a `Description-Content-Type` - # line to the `PKG-INFO` file in the `.egg-info` - # directory. - # `Description-Content-Type` is described at - # https://github.com/pypa/python-packaging-user-guide/pull/258 - - self._setup_script_with_requires( - """long_description_content_type='text/markdown',""" - ) - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - expected_line = 'Description-Content-Type: text/markdown' - assert expected_line in pkg_info_lines - assert 'Metadata-Version: 2.4' in pkg_info_lines - - def test_long_description(self, tmpdir_cwd, env): - # Test that specifying `long_description` and `long_description_content_type` - # keyword args to the `setup` function results in writing - # the description in the message payload of the `PKG-INFO` file - # in the `.egg-info` directory. - self._setup_script_with_requires( - "long_description='This is a long description\\nover multiple lines'," - "long_description_content_type='text/markdown'," - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - assert 'Metadata-Version: 2.4' in pkg_info_lines - assert '' == pkg_info_lines[-1] # last line should be empty - long_desc_lines = pkg_info_lines[pkg_info_lines.index('') :] - assert 'This is a long description' in long_desc_lines - assert 'over multiple lines' in long_desc_lines - - def test_project_urls(self, tmpdir_cwd, env): - # Test that specifying a `project_urls` dict to the `setup` - # function results in writing multiple `Project-URL` lines to - # the `PKG-INFO` file in the `.egg-info` - # directory. - # `Project-URL` is described at https://packaging.python.org - # /specifications/core-metadata/#project-url-multiple-use - - self._setup_script_with_requires( - """project_urls={ - 'Link One': 'https://example.com/one/', - 'Link Two': 'https://example.com/two/', - },""" - ) - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - expected_line = 'Project-URL: Link One, https://example.com/one/' - assert expected_line in pkg_info_lines - expected_line = 'Project-URL: Link Two, https://example.com/two/' - assert expected_line in pkg_info_lines - assert self._extract_mv_version(pkg_info_lines) >= (1, 2) - - def test_license(self, tmpdir_cwd, env): - """Test single line license.""" - self._setup_script_with_requires("license='MIT',") - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - assert 'License: MIT' in pkg_info_lines - - def test_license_escape(self, tmpdir_cwd, env): - """Test license is escaped correctly if longer than one line.""" - self._setup_script_with_requires( - "license='This is a long license text \\nover multiple lines'," - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - - assert 'License: This is a long license text ' in pkg_info_lines - assert ' over multiple lines' in pkg_info_lines - assert 'text \n over multiple' in '\n'.join(pkg_info_lines) - - def test_python_requires_egg_info(self, tmpdir_cwd, env): - self._setup_script_with_requires("""python_requires='>=2.7.12',""") - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - assert 'Requires-Python: >=2.7.12' in pkg_info_lines - assert self._extract_mv_version(pkg_info_lines) >= (1, 2) - - def test_manifest_maker_warning_suppression(self): - fixtures = [ - "standard file not found: should have one of foo.py, bar.py", - "standard file 'setup.py' not found", - ] - - for msg in fixtures: - assert manifest_maker._should_suppress_warning(msg) - - def test_egg_info_includes_setup_py(self, tmpdir_cwd): - self._create_project() - dist = Distribution({"name": "foo", "version": "0.0.1"}) - dist.script_name = "non_setup.py" - egg_info_instance = egg_info(dist) - egg_info_instance.finalize_options() - egg_info_instance.run() - - assert 'setup.py' in egg_info_instance.filelist.files - - with open(egg_info_instance.egg_info + "/SOURCES.txt", encoding="utf-8") as f: - sources = f.read().split('\n') - assert 'setup.py' in sources - - def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - if cmd is None: - cmd = [ - 'egg_info', - ] - code, data = environment.run_setup_py( - cmd=cmd, - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - assert not code, data - - if output: - assert output in data - - def test_egg_info_tag_only_once(self, tmpdir_cwd, env): - self._create_project() - path.build({ - 'setup.cfg': DALS( - """ - [egg_info] - tag_build = dev - tag_date = 0 - tag_svn_revision = 0 - """ - ), - }) - self._run_egg_info_command(tmpdir_cwd, env) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO'), encoding="utf-8") as fp: - pkg_info_lines = fp.read().split('\n') - assert 'Version: 0.0.0.dev0' in pkg_info_lines - - -class TestWriteEntries: - def test_invalid_entry_point(self, tmpdir_cwd, env): - dist = Distribution({"name": "foo", "version": "0.0.1"}) - dist.entry_points = {"foo": "foo = invalid-identifier:foo"} - cmd = dist.get_command_obj("egg_info") - expected_msg = r"(Invalid object reference|Problems to parse)" - with pytest.raises((errors.OptionError, ValueError), match=expected_msg) as ex: - write_entries(cmd, "entry_points", "entry_points.txt") - assert "ensure entry-point follows the spec" in ex.value.args[0] - assert "invalid-identifier" in str(ex.value) - - def test_valid_entry_point(self, tmpdir_cwd, env): - dist = Distribution({"name": "foo", "version": "0.0.1"}) - dist.entry_points = { - "abc": "foo = bar:baz", - "def": ["faa = bor:boz"], - } - cmd = dist.get_command_obj("egg_info") - write_entries(cmd, "entry_points", "entry_points.txt") - content = Path("entry_points.txt").read_text(encoding="utf-8") - assert "[abc]\nfoo = bar:baz\n" in content - assert "[def]\nfaa = bor:boz\n" in content diff --git a/voxvera/vendor/setuptools/tests/test_extern.py b/voxvera/vendor/setuptools/tests/test_extern.py deleted file mode 100644 index d7eb3c6..0000000 --- a/voxvera/vendor/setuptools/tests/test_extern.py +++ /dev/null @@ -1,15 +0,0 @@ -import importlib -import pickle - -import packaging - -from setuptools import Distribution - - -def test_reimport_extern(): - packaging2 = importlib.import_module(packaging.__name__) - assert packaging is packaging2 - - -def test_distribution_picklable(): - pickle.loads(pickle.dumps(Distribution())) diff --git a/voxvera/vendor/setuptools/tests/test_find_packages.py b/voxvera/vendor/setuptools/tests/test_find_packages.py deleted file mode 100644 index 9fd9f8f..0000000 --- a/voxvera/vendor/setuptools/tests/test_find_packages.py +++ /dev/null @@ -1,218 +0,0 @@ -"""Tests for automatic package discovery""" - -import os -import shutil -import tempfile - -import pytest - -from setuptools import find_namespace_packages, find_packages -from setuptools.discovery import FlatLayoutPackageFinder - -from .compat.py39 import os_helper - - -class TestFindPackages: - def setup_method(self, method): - self.dist_dir = tempfile.mkdtemp() - self._make_pkg_structure() - - def teardown_method(self, method): - shutil.rmtree(self.dist_dir) - - def _make_pkg_structure(self): - """Make basic package structure. - - dist/ - docs/ - conf.py - pkg/ - __pycache__/ - nspkg/ - mod.py - subpkg/ - assets/ - asset - __init__.py - setup.py - - """ - self.docs_dir = self._mkdir('docs', self.dist_dir) - self._touch('conf.py', self.docs_dir) - self.pkg_dir = self._mkdir('pkg', self.dist_dir) - self._mkdir('__pycache__', self.pkg_dir) - self.ns_pkg_dir = self._mkdir('nspkg', self.pkg_dir) - self._touch('mod.py', self.ns_pkg_dir) - self.sub_pkg_dir = self._mkdir('subpkg', self.pkg_dir) - self.asset_dir = self._mkdir('assets', self.sub_pkg_dir) - self._touch('asset', self.asset_dir) - self._touch('__init__.py', self.sub_pkg_dir) - self._touch('setup.py', self.dist_dir) - - def _mkdir(self, path, parent_dir=None): - if parent_dir: - path = os.path.join(parent_dir, path) - os.mkdir(path) - return path - - def _touch(self, path, dir_=None): - if dir_: - path = os.path.join(dir_, path) - open(path, 'wb').close() - return path - - def test_regular_package(self): - self._touch('__init__.py', self.pkg_dir) - packages = find_packages(self.dist_dir) - assert packages == ['pkg', 'pkg.subpkg'] - - def test_exclude(self): - self._touch('__init__.py', self.pkg_dir) - packages = find_packages(self.dist_dir, exclude=('pkg.*',)) - assert packages == ['pkg'] - - def test_exclude_recursive(self): - """ - Excluding a parent package should not exclude child packages as well. - """ - self._touch('__init__.py', self.pkg_dir) - self._touch('__init__.py', self.sub_pkg_dir) - packages = find_packages(self.dist_dir, exclude=('pkg',)) - assert packages == ['pkg.subpkg'] - - def test_include_excludes_other(self): - """ - If include is specified, other packages should be excluded. - """ - self._touch('__init__.py', self.pkg_dir) - alt_dir = self._mkdir('other_pkg', self.dist_dir) - self._touch('__init__.py', alt_dir) - packages = find_packages(self.dist_dir, include=['other_pkg']) - assert packages == ['other_pkg'] - - def test_dir_with_dot_is_skipped(self): - shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) - data_dir = self._mkdir('some.data', self.pkg_dir) - self._touch('__init__.py', data_dir) - self._touch('file.dat', data_dir) - packages = find_packages(self.dist_dir) - assert 'pkg.some.data' not in packages - - def test_dir_with_packages_in_subdir_is_excluded(self): - """ - Ensure that a package in a non-package such as build/pkg/__init__.py - is excluded. - """ - build_dir = self._mkdir('build', self.dist_dir) - build_pkg_dir = self._mkdir('pkg', build_dir) - self._touch('__init__.py', build_pkg_dir) - packages = find_packages(self.dist_dir) - assert 'build.pkg' not in packages - - @pytest.mark.skipif(not os_helper.can_symlink(), reason='Symlink support required') - def test_symlinked_packages_are_included(self): - """ - A symbolically-linked directory should be treated like any other - directory when matched as a package. - - Create a link from lpkg -> pkg. - """ - self._touch('__init__.py', self.pkg_dir) - linked_pkg = os.path.join(self.dist_dir, 'lpkg') - os.symlink('pkg', linked_pkg) - assert os.path.isdir(linked_pkg) - packages = find_packages(self.dist_dir) - assert 'lpkg' in packages - - def _assert_packages(self, actual, expected): - assert set(actual) == set(expected) - - def test_pep420_ns_package(self): - packages = find_namespace_packages( - self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets'] - ) - self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - - def test_pep420_ns_package_no_includes(self): - packages = find_namespace_packages(self.dist_dir, exclude=['pkg.subpkg.assets']) - self._assert_packages(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) - - def test_pep420_ns_package_no_includes_or_excludes(self): - packages = find_namespace_packages(self.dist_dir) - expected = ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] - self._assert_packages(packages, expected) - - def test_regular_package_with_nested_pep420_ns_packages(self): - self._touch('__init__.py', self.pkg_dir) - packages = find_namespace_packages( - self.dist_dir, exclude=['docs', 'pkg.subpkg.assets'] - ) - self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - - def test_pep420_ns_package_no_non_package_dirs(self): - shutil.rmtree(self.docs_dir) - shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) - packages = find_namespace_packages(self.dist_dir) - self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - - -class TestFlatLayoutPackageFinder: - EXAMPLES = { - "hidden-folders": ( - [".pkg/__init__.py", "pkg/__init__.py", "pkg/nested/file.txt"], - ["pkg", "pkg.nested"], - ), - "private-packages": ( - ["_pkg/__init__.py", "pkg/_private/__init__.py"], - ["pkg", "pkg._private"], - ), - "invalid-name": ( - ["invalid-pkg/__init__.py", "other.pkg/__init__.py", "yet,another/file.py"], - [], - ), - "docs": (["pkg/__init__.py", "docs/conf.py", "docs/readme.rst"], ["pkg"]), - "tests": ( - ["pkg/__init__.py", "tests/test_pkg.py", "tests/__init__.py"], - ["pkg"], - ), - "examples": ( - [ - "pkg/__init__.py", - "examples/__init__.py", - "examples/file.py", - "example/other_file.py", - # Sub-packages should always be fine - "pkg/example/__init__.py", - "pkg/examples/__init__.py", - ], - ["pkg", "pkg.examples", "pkg.example"], - ), - "tool-specific": ( - [ - "htmlcov/index.html", - "pkg/__init__.py", - "tasks/__init__.py", - "tasks/subpackage/__init__.py", - "fabfile/__init__.py", - "fabfile/subpackage/__init__.py", - # Sub-packages should always be fine - "pkg/tasks/__init__.py", - "pkg/fabfile/__init__.py", - ], - ["pkg", "pkg.tasks", "pkg.fabfile"], - ), - } - - @pytest.mark.parametrize("example", EXAMPLES.keys()) - def test_unwanted_directories_not_included(self, tmp_path, example): - files, expected_packages = self.EXAMPLES[example] - ensure_files(tmp_path, files) - found_packages = FlatLayoutPackageFinder.find(str(tmp_path)) - assert set(found_packages) == set(expected_packages) - - -def ensure_files(root_path, files): - for file in files: - path = root_path / file - path.parent.mkdir(parents=True, exist_ok=True) - path.touch() diff --git a/voxvera/vendor/setuptools/tests/test_find_py_modules.py b/voxvera/vendor/setuptools/tests/test_find_py_modules.py deleted file mode 100644 index 8034b54..0000000 --- a/voxvera/vendor/setuptools/tests/test_find_py_modules.py +++ /dev/null @@ -1,73 +0,0 @@ -"""Tests for automatic discovery of modules""" - -import os - -import pytest - -from setuptools.discovery import FlatLayoutModuleFinder, ModuleFinder - -from .compat.py39 import os_helper -from .test_find_packages import ensure_files - - -class TestModuleFinder: - def find(self, path, *args, **kwargs): - return set(ModuleFinder.find(str(path), *args, **kwargs)) - - EXAMPLES = { - # circumstance: (files, kwargs, expected_modules) - "simple_folder": ( - ["file.py", "other.py"], - {}, # kwargs - ["file", "other"], - ), - "exclude": ( - ["file.py", "other.py"], - {"exclude": ["f*"]}, - ["other"], - ), - "include": ( - ["file.py", "fole.py", "other.py"], - {"include": ["f*"], "exclude": ["fo*"]}, - ["file"], - ), - "invalid-name": (["my-file.py", "other.file.py"], {}, []), - } - - @pytest.mark.parametrize("example", EXAMPLES.keys()) - def test_finder(self, tmp_path, example): - files, kwargs, expected_modules = self.EXAMPLES[example] - ensure_files(tmp_path, files) - assert self.find(tmp_path, **kwargs) == set(expected_modules) - - @pytest.mark.skipif(not os_helper.can_symlink(), reason='Symlink support required') - def test_symlinked_packages_are_included(self, tmp_path): - src = "_myfiles/file.py" - ensure_files(tmp_path, [src]) - os.symlink(tmp_path / src, tmp_path / "link.py") - assert self.find(tmp_path) == {"link"} - - -class TestFlatLayoutModuleFinder: - def find(self, path, *args, **kwargs): - return set(FlatLayoutModuleFinder.find(str(path))) - - EXAMPLES = { - # circumstance: (files, expected_modules) - "hidden-files": ([".module.py"], []), - "private-modules": (["_module.py"], []), - "common-names": ( - ["setup.py", "conftest.py", "test.py", "tests.py", "example.py", "mod.py"], - ["mod"], - ), - "tool-specific": ( - ["tasks.py", "fabfile.py", "noxfile.py", "dodo.py", "manage.py", "mod.py"], - ["mod"], - ), - } - - @pytest.mark.parametrize("example", EXAMPLES.keys()) - def test_unwanted_files_not_included(self, tmp_path, example): - files, expected_modules = self.EXAMPLES[example] - ensure_files(tmp_path, files) - assert self.find(tmp_path) == set(expected_modules) diff --git a/voxvera/vendor/setuptools/tests/test_glob.py b/voxvera/vendor/setuptools/tests/test_glob.py deleted file mode 100644 index 8d225a4..0000000 --- a/voxvera/vendor/setuptools/tests/test_glob.py +++ /dev/null @@ -1,45 +0,0 @@ -import pytest -from jaraco import path - -from setuptools.glob import glob - - -@pytest.mark.parametrize( - ('tree', 'pattern', 'matches'), - ( - ('', b'', []), - ('', '', []), - ( - """ - appveyor.yml - CHANGES.rst - LICENSE - MANIFEST.in - pyproject.toml - README.rst - setup.cfg - setup.py - """, - '*.rst', - ('CHANGES.rst', 'README.rst'), - ), - ( - """ - appveyor.yml - CHANGES.rst - LICENSE - MANIFEST.in - pyproject.toml - README.rst - setup.cfg - setup.py - """, - b'*.rst', - (b'CHANGES.rst', b'README.rst'), - ), - ), -) -def test_glob(monkeypatch, tmpdir, tree, pattern, matches): - monkeypatch.chdir(tmpdir) - path.build({name: '' for name in tree.split()}) - assert list(sorted(glob(pattern))) == list(sorted(matches)) diff --git a/voxvera/vendor/setuptools/tests/test_install_scripts.py b/voxvera/vendor/setuptools/tests/test_install_scripts.py deleted file mode 100644 index e62a6b7..0000000 --- a/voxvera/vendor/setuptools/tests/test_install_scripts.py +++ /dev/null @@ -1,89 +0,0 @@ -"""install_scripts tests""" - -import sys - -import pytest - -from setuptools.command.install_scripts import install_scripts -from setuptools.dist import Distribution - -from . import contexts - - -class TestInstallScripts: - settings = dict( - name='foo', - entry_points={'console_scripts': ['foo=foo:foo']}, - version='0.0', - ) - unix_exe = '/usr/dummy-test-path/local/bin/python' - unix_spaces_exe = '/usr/bin/env dummy-test-python' - win32_exe = 'C:\\Dummy Test Path\\Program Files\\Python 3.6\\python.exe' - - def _run_install_scripts(self, install_dir, executable=None): - dist = Distribution(self.settings) - dist.script_name = 'setup.py' - cmd = install_scripts(dist) - cmd.install_dir = install_dir - if executable is not None: - bs = cmd.get_finalized_command('build_scripts') - bs.executable = executable - cmd.ensure_finalized() - with contexts.quiet(): - cmd.run() - - @pytest.mark.skipif(sys.platform == 'win32', reason='non-Windows only') - def test_sys_executable_escaping_unix(self, tmpdir, monkeypatch): - """ - Ensure that shebang is not quoted on Unix when getting the Python exe - from sys.executable. - """ - expected = f'#!{self.unix_exe}\n' - monkeypatch.setattr('sys.executable', self.unix_exe) - with tmpdir.as_cwd(): - self._run_install_scripts(str(tmpdir)) - with open(str(tmpdir.join('foo')), 'r', encoding="utf-8") as f: - actual = f.readline() - assert actual == expected - - @pytest.mark.skipif(sys.platform != 'win32', reason='Windows only') - def test_sys_executable_escaping_win32(self, tmpdir, monkeypatch): - """ - Ensure that shebang is quoted on Windows when getting the Python exe - from sys.executable and it contains a space. - """ - expected = f'#!"{self.win32_exe}"\n' - monkeypatch.setattr('sys.executable', self.win32_exe) - with tmpdir.as_cwd(): - self._run_install_scripts(str(tmpdir)) - with open(str(tmpdir.join('foo-script.py')), 'r', encoding="utf-8") as f: - actual = f.readline() - assert actual == expected - - @pytest.mark.skipif(sys.platform == 'win32', reason='non-Windows only') - def test_executable_with_spaces_escaping_unix(self, tmpdir): - """ - Ensure that shebang on Unix is not quoted, even when - a value with spaces - is specified using --executable. - """ - expected = f'#!{self.unix_spaces_exe}\n' - with tmpdir.as_cwd(): - self._run_install_scripts(str(tmpdir), self.unix_spaces_exe) - with open(str(tmpdir.join('foo')), 'r', encoding="utf-8") as f: - actual = f.readline() - assert actual == expected - - @pytest.mark.skipif(sys.platform != 'win32', reason='Windows only') - def test_executable_arg_escaping_win32(self, tmpdir): - """ - Ensure that shebang on Windows is quoted when - getting a path with spaces - from --executable, that is itself properly quoted. - """ - expected = f'#!"{self.win32_exe}"\n' - with tmpdir.as_cwd(): - self._run_install_scripts(str(tmpdir), '"' + self.win32_exe + '"') - with open(str(tmpdir.join('foo-script.py')), 'r', encoding="utf-8") as f: - actual = f.readline() - assert actual == expected diff --git a/voxvera/vendor/setuptools/tests/test_logging.py b/voxvera/vendor/setuptools/tests/test_logging.py deleted file mode 100644 index 5d487bd..0000000 --- a/voxvera/vendor/setuptools/tests/test_logging.py +++ /dev/null @@ -1,76 +0,0 @@ -import functools -import inspect -import logging -import sys - -import pytest - -IS_PYPY = '__pypy__' in sys.builtin_module_names - - -setup_py = """\ -from setuptools import setup - -setup( - name="test_logging", - version="0.0" -) -""" - - -@pytest.mark.parametrize( - ('flags', 'expected_level'), [([], "INFO"), (["--verbose"], "DEBUG")] -) -def test_verbosity_level(tmp_path, monkeypatch, flags, expected_level): - """Make sure the correct verbosity level is set (issue #3038)""" - import setuptools # noqa: F401 # import setuptools to monkeypatch distutils - - import distutils # <- load distutils after all the patches take place - - logger = logging.Logger(__name__) - monkeypatch.setattr(logging, "root", logger) - unset_log_level = logger.getEffectiveLevel() - assert logging.getLevelName(unset_log_level) == "NOTSET" - - setup_script = tmp_path / "setup.py" - setup_script.write_text(setup_py, encoding="utf-8") - dist = distutils.core.run_setup(setup_script, stop_after="init") - dist.script_args = flags + ["sdist"] - dist.parse_command_line() # <- where the log level is set - log_level = logger.getEffectiveLevel() - log_level_name = logging.getLevelName(log_level) - assert log_level_name == expected_level - - -def flaky_on_pypy(func): - @functools.wraps(func) - def _func(): - try: - func() - except AssertionError: # pragma: no cover - if IS_PYPY: - msg = "Flaky monkeypatch on PyPy (#4124)" - pytest.xfail(f"{msg}. Original discussion in #3707, #3709.") - raise - - return _func - - -@flaky_on_pypy -def test_patching_does_not_cause_problems(): - # Ensure `dist.log` is only patched if necessary - - import _distutils_hack - - import setuptools.logging - - from distutils import dist - - setuptools.logging.configure() - - if _distutils_hack.enabled(): - # Modern logging infra, no problematic patching. - assert dist.__file__ is None or "setuptools" in dist.__file__ - assert isinstance(dist.log, logging.Logger) - else: - assert inspect.ismodule(dist.log) diff --git a/voxvera/vendor/setuptools/tests/test_manifest.py b/voxvera/vendor/setuptools/tests/test_manifest.py deleted file mode 100644 index 903a528..0000000 --- a/voxvera/vendor/setuptools/tests/test_manifest.py +++ /dev/null @@ -1,622 +0,0 @@ -"""sdist tests""" - -from __future__ import annotations - -import contextlib -import io -import itertools -import logging -import os -import shutil -import sys -import tempfile - -import pytest - -from setuptools.command.egg_info import FileList, egg_info, translate_pattern -from setuptools.dist import Distribution -from setuptools.tests.textwrap import DALS - -from distutils import log -from distutils.errors import DistutilsTemplateError - -IS_PYPY = '__pypy__' in sys.builtin_module_names - - -def make_local_path(s): - """Converts '/' in a string to os.sep""" - return s.replace('/', os.sep) - - -SETUP_ATTRS = { - 'name': 'app', - 'version': '0.0', - 'packages': ['app'], -} - -SETUP_PY = f"""\ -from setuptools import setup - -setup(**{SETUP_ATTRS!r}) -""" - - -@contextlib.contextmanager -def quiet(): - old_stdout, old_stderr = sys.stdout, sys.stderr - sys.stdout, sys.stderr = io.StringIO(), io.StringIO() - try: - yield - finally: - sys.stdout, sys.stderr = old_stdout, old_stderr - - -def touch(filename): - open(filename, 'wb').close() - - -# The set of files always in the manifest, including all files in the -# .egg-info directory -default_files = frozenset( - map( - make_local_path, - [ - 'README.rst', - 'MANIFEST.in', - 'setup.py', - 'app.egg-info/PKG-INFO', - 'app.egg-info/SOURCES.txt', - 'app.egg-info/dependency_links.txt', - 'app.egg-info/top_level.txt', - 'app/__init__.py', - ], - ) -) - - -translate_specs: list[tuple[str, list[str], list[str]]] = [ - ('foo', ['foo'], ['bar', 'foobar']), - ('foo/bar', ['foo/bar'], ['foo/bar/baz', './foo/bar', 'foo']), - # Glob matching - ('*.txt', ['foo.txt', 'bar.txt'], ['foo/foo.txt']), - ('dir/*.txt', ['dir/foo.txt', 'dir/bar.txt', 'dir/.txt'], ['notdir/foo.txt']), - ('*/*.py', ['bin/start.py'], []), - ('docs/page-?.txt', ['docs/page-9.txt'], ['docs/page-10.txt']), - # Globstars change what they mean depending upon where they are - ( - 'foo/**/bar', - ['foo/bing/bar', 'foo/bing/bang/bar', 'foo/bar'], - ['foo/abar'], - ), - ( - 'foo/**', - ['foo/bar/bing.py', 'foo/x'], - ['/foo/x'], - ), - ( - '**', - ['x', 'abc/xyz', '@nything'], - [], - ), - # Character classes - ( - 'pre[one]post', - ['preopost', 'prenpost', 'preepost'], - ['prepost', 'preonepost'], - ), - ( - 'hello[!one]world', - ['helloxworld', 'helloyworld'], - ['hellooworld', 'helloworld', 'hellooneworld'], - ), - ( - '[]one].txt', - ['o.txt', '].txt', 'e.txt'], - ['one].txt'], - ), - ( - 'foo[!]one]bar', - ['fooybar'], - ['foo]bar', 'fooobar', 'fooebar'], - ), -] -""" -A spec of inputs for 'translate_pattern' and matches and mismatches -for that input. -""" - -match_params = itertools.chain.from_iterable( - zip(itertools.repeat(pattern), matches) - for pattern, matches, mismatches in translate_specs -) - - -@pytest.fixture(params=match_params) -def pattern_match(request): - return map(make_local_path, request.param) - - -mismatch_params = itertools.chain.from_iterable( - zip(itertools.repeat(pattern), mismatches) - for pattern, matches, mismatches in translate_specs -) - - -@pytest.fixture(params=mismatch_params) -def pattern_mismatch(request): - return map(make_local_path, request.param) - - -def test_translated_pattern_match(pattern_match): - pattern, target = pattern_match - assert translate_pattern(pattern).match(target) - - -def test_translated_pattern_mismatch(pattern_mismatch): - pattern, target = pattern_mismatch - assert not translate_pattern(pattern).match(target) - - -class TempDirTestCase: - def setup_method(self, method): - self.temp_dir = tempfile.mkdtemp() - self.old_cwd = os.getcwd() - os.chdir(self.temp_dir) - - def teardown_method(self, method): - os.chdir(self.old_cwd) - shutil.rmtree(self.temp_dir) - - -class TestManifestTest(TempDirTestCase): - def setup_method(self, method): - super().setup_method(method) - - f = open(os.path.join(self.temp_dir, 'setup.py'), 'w', encoding="utf-8") - f.write(SETUP_PY) - f.close() - """ - Create a file tree like: - - LICENSE - - README.rst - - testing.rst - - .hidden.rst - - app/ - - __init__.py - - a.txt - - b.txt - - c.rst - - static/ - - app.js - - app.js.map - - app.css - - app.css.map - """ - - for fname in ['README.rst', '.hidden.rst', 'testing.rst', 'LICENSE']: - touch(os.path.join(self.temp_dir, fname)) - - # Set up the rest of the test package - test_pkg = os.path.join(self.temp_dir, 'app') - os.mkdir(test_pkg) - for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst']: - touch(os.path.join(test_pkg, fname)) - - # Some compiled front-end assets to include - static = os.path.join(test_pkg, 'static') - os.mkdir(static) - for fname in ['app.js', 'app.js.map', 'app.css', 'app.css.map']: - touch(os.path.join(static, fname)) - - def make_manifest(self, contents): - """Write a MANIFEST.in.""" - manifest = os.path.join(self.temp_dir, 'MANIFEST.in') - with open(manifest, 'w', encoding="utf-8") as f: - f.write(DALS(contents)) - - def get_files(self): - """Run egg_info and get all the files to include, as a set""" - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = egg_info(dist) - cmd.ensure_finalized() - - cmd.run() - - return set(cmd.filelist.files) - - def test_no_manifest(self): - """Check a missing MANIFEST.in includes only the standard files.""" - assert (default_files - set(['MANIFEST.in'])) == self.get_files() - - def test_empty_files(self): - """Check an empty MANIFEST.in includes only the standard files.""" - self.make_manifest("") - assert default_files == self.get_files() - - def test_include(self): - """Include extra rst files in the project root.""" - self.make_manifest("include *.rst") - files = default_files | set(['testing.rst', '.hidden.rst']) - assert files == self.get_files() - - def test_exclude(self): - """Include everything in app/ except the text files""" - ml = make_local_path - self.make_manifest( - """ - include app/* - exclude app/*.txt - """ - ) - files = default_files | set([ml('app/c.rst')]) - assert files == self.get_files() - - def test_include_multiple(self): - """Include with multiple patterns.""" - ml = make_local_path - self.make_manifest("include app/*.txt app/static/*") - files = default_files | set([ - ml('app/a.txt'), - ml('app/b.txt'), - ml('app/static/app.js'), - ml('app/static/app.js.map'), - ml('app/static/app.css'), - ml('app/static/app.css.map'), - ]) - assert files == self.get_files() - - def test_graft(self): - """Include the whole app/static/ directory.""" - ml = make_local_path - self.make_manifest("graft app/static") - files = default_files | set([ - ml('app/static/app.js'), - ml('app/static/app.js.map'), - ml('app/static/app.css'), - ml('app/static/app.css.map'), - ]) - assert files == self.get_files() - - def test_graft_glob_syntax(self): - """Include the whole app/static/ directory.""" - ml = make_local_path - self.make_manifest("graft */static") - files = default_files | set([ - ml('app/static/app.js'), - ml('app/static/app.js.map'), - ml('app/static/app.css'), - ml('app/static/app.css.map'), - ]) - assert files == self.get_files() - - def test_graft_global_exclude(self): - """Exclude all *.map files in the project.""" - ml = make_local_path - self.make_manifest( - """ - graft app/static - global-exclude *.map - """ - ) - files = default_files | set([ml('app/static/app.js'), ml('app/static/app.css')]) - assert files == self.get_files() - - def test_global_include(self): - """Include all *.rst, *.js, and *.css files in the whole tree.""" - ml = make_local_path - self.make_manifest( - """ - global-include *.rst *.js *.css - """ - ) - files = default_files | set([ - '.hidden.rst', - 'testing.rst', - ml('app/c.rst'), - ml('app/static/app.js'), - ml('app/static/app.css'), - ]) - assert files == self.get_files() - - def test_graft_prune(self): - """Include all files in app/, except for the whole app/static/ dir.""" - ml = make_local_path - self.make_manifest( - """ - graft app - prune app/static - """ - ) - files = default_files | set([ml('app/a.txt'), ml('app/b.txt'), ml('app/c.rst')]) - assert files == self.get_files() - - -class TestFileListTest(TempDirTestCase): - """ - A copy of the relevant bits of distutils/tests/test_filelist.py, - to ensure setuptools' version of FileList keeps parity with distutils. - """ - - @pytest.fixture(autouse=os.getenv("SETUPTOOLS_USE_DISTUTILS") == "stdlib") - def _compat_record_logs(self, monkeypatch, caplog): - """Account for stdlib compatibility""" - - def _log(_logger, level, msg, args): - exc = sys.exc_info() - rec = logging.LogRecord("distutils", level, "", 0, msg, args, exc) - caplog.records.append(rec) - - monkeypatch.setattr(log.Log, "_log", _log) - - def get_records(self, caplog, *levels): - return [r for r in caplog.records if r.levelno in levels] - - def assertNoWarnings(self, caplog): - assert self.get_records(caplog, log.WARN) == [] - caplog.clear() - - def assertWarnings(self, caplog): - if IS_PYPY and not caplog.records: - pytest.xfail("caplog checks may not work well in PyPy") - else: - assert len(self.get_records(caplog, log.WARN)) > 0 - caplog.clear() - - def make_files(self, files): - for file in files: - file = os.path.join(self.temp_dir, file) - dirname, _basename = os.path.split(file) - os.makedirs(dirname, exist_ok=True) - touch(file) - - def test_process_template_line(self): - # testing all MANIFEST.in template patterns - file_list = FileList() - ml = make_local_path - - # simulated file list - self.make_files([ - 'foo.tmp', - 'ok', - 'xo', - 'four.txt', - 'buildout.cfg', - # filelist does not filter out VCS directories, - # it's sdist that does - ml('.hg/last-message.txt'), - ml('global/one.txt'), - ml('global/two.txt'), - ml('global/files.x'), - ml('global/here.tmp'), - ml('f/o/f.oo'), - ml('dir/graft-one'), - ml('dir/dir2/graft2'), - ml('dir3/ok'), - ml('dir3/sub/ok.txt'), - ]) - - MANIFEST_IN = DALS( - """\ - include ok - include xo - exclude xo - include foo.tmp - include buildout.cfg - global-include *.x - global-include *.txt - global-exclude *.tmp - recursive-include f *.oo - recursive-exclude global *.x - graft dir - prune dir3 - """ - ) - - for line in MANIFEST_IN.split('\n'): - if not line: - continue - file_list.process_template_line(line) - - wanted = [ - 'buildout.cfg', - 'four.txt', - 'ok', - ml('.hg/last-message.txt'), - ml('dir/graft-one'), - ml('dir/dir2/graft2'), - ml('f/o/f.oo'), - ml('global/one.txt'), - ml('global/two.txt'), - ] - - file_list.sort() - assert file_list.files == wanted - - def test_exclude_pattern(self): - # return False if no match - file_list = FileList() - assert not file_list.exclude_pattern('*.py') - - # return True if files match - file_list = FileList() - file_list.files = ['a.py', 'b.py'] - assert file_list.exclude_pattern('*.py') - - # test excludes - file_list = FileList() - file_list.files = ['a.py', 'a.txt'] - file_list.exclude_pattern('*.py') - file_list.sort() - assert file_list.files == ['a.txt'] - - def test_include_pattern(self): - # return False if no match - file_list = FileList() - self.make_files([]) - assert not file_list.include_pattern('*.py') - - # return True if files match - file_list = FileList() - self.make_files(['a.py', 'b.txt']) - assert file_list.include_pattern('*.py') - - # test * matches all files - file_list = FileList() - self.make_files(['a.py', 'b.txt']) - file_list.include_pattern('*') - file_list.sort() - assert file_list.files == ['a.py', 'b.txt'] - - def test_process_template_line_invalid(self): - # invalid lines - file_list = FileList() - for action in ( - 'include', - 'exclude', - 'global-include', - 'global-exclude', - 'recursive-include', - 'recursive-exclude', - 'graft', - 'prune', - 'blarg', - ): - with pytest.raises(DistutilsTemplateError): - file_list.process_template_line(action) - - def test_include(self, caplog): - caplog.set_level(logging.DEBUG) - ml = make_local_path - # include - file_list = FileList() - self.make_files(['a.py', 'b.txt', ml('d/c.py')]) - - file_list.process_template_line('include *.py') - file_list.sort() - assert file_list.files == ['a.py'] - self.assertNoWarnings(caplog) - - file_list.process_template_line('include *.rb') - file_list.sort() - assert file_list.files == ['a.py'] - self.assertWarnings(caplog) - - def test_exclude(self, caplog): - caplog.set_level(logging.DEBUG) - ml = make_local_path - # exclude - file_list = FileList() - file_list.files = ['a.py', 'b.txt', ml('d/c.py')] - - file_list.process_template_line('exclude *.py') - file_list.sort() - assert file_list.files == ['b.txt', ml('d/c.py')] - self.assertNoWarnings(caplog) - - file_list.process_template_line('exclude *.rb') - file_list.sort() - assert file_list.files == ['b.txt', ml('d/c.py')] - self.assertWarnings(caplog) - - def test_global_include(self, caplog): - caplog.set_level(logging.DEBUG) - ml = make_local_path - # global-include - file_list = FileList() - self.make_files(['a.py', 'b.txt', ml('d/c.py')]) - - file_list.process_template_line('global-include *.py') - file_list.sort() - assert file_list.files == ['a.py', ml('d/c.py')] - self.assertNoWarnings(caplog) - - file_list.process_template_line('global-include *.rb') - file_list.sort() - assert file_list.files == ['a.py', ml('d/c.py')] - self.assertWarnings(caplog) - - def test_global_exclude(self, caplog): - caplog.set_level(logging.DEBUG) - ml = make_local_path - # global-exclude - file_list = FileList() - file_list.files = ['a.py', 'b.txt', ml('d/c.py')] - - file_list.process_template_line('global-exclude *.py') - file_list.sort() - assert file_list.files == ['b.txt'] - self.assertNoWarnings(caplog) - - file_list.process_template_line('global-exclude *.rb') - file_list.sort() - assert file_list.files == ['b.txt'] - self.assertWarnings(caplog) - - def test_recursive_include(self, caplog): - caplog.set_level(logging.DEBUG) - ml = make_local_path - # recursive-include - file_list = FileList() - self.make_files(['a.py', ml('d/b.py'), ml('d/c.txt'), ml('d/d/e.py')]) - - file_list.process_template_line('recursive-include d *.py') - file_list.sort() - assert file_list.files == [ml('d/b.py'), ml('d/d/e.py')] - self.assertNoWarnings(caplog) - - file_list.process_template_line('recursive-include e *.py') - file_list.sort() - assert file_list.files == [ml('d/b.py'), ml('d/d/e.py')] - self.assertWarnings(caplog) - - def test_recursive_exclude(self, caplog): - caplog.set_level(logging.DEBUG) - ml = make_local_path - # recursive-exclude - file_list = FileList() - file_list.files = ['a.py', ml('d/b.py'), ml('d/c.txt'), ml('d/d/e.py')] - - file_list.process_template_line('recursive-exclude d *.py') - file_list.sort() - assert file_list.files == ['a.py', ml('d/c.txt')] - self.assertNoWarnings(caplog) - - file_list.process_template_line('recursive-exclude e *.py') - file_list.sort() - assert file_list.files == ['a.py', ml('d/c.txt')] - self.assertWarnings(caplog) - - def test_graft(self, caplog): - caplog.set_level(logging.DEBUG) - ml = make_local_path - # graft - file_list = FileList() - self.make_files(['a.py', ml('d/b.py'), ml('d/d/e.py'), ml('f/f.py')]) - - file_list.process_template_line('graft d') - file_list.sort() - assert file_list.files == [ml('d/b.py'), ml('d/d/e.py')] - self.assertNoWarnings(caplog) - - file_list.process_template_line('graft e') - file_list.sort() - assert file_list.files == [ml('d/b.py'), ml('d/d/e.py')] - self.assertWarnings(caplog) - - def test_prune(self, caplog): - caplog.set_level(logging.DEBUG) - ml = make_local_path - # prune - file_list = FileList() - file_list.files = ['a.py', ml('d/b.py'), ml('d/d/e.py'), ml('f/f.py')] - - file_list.process_template_line('prune d') - file_list.sort() - assert file_list.files == ['a.py', ml('f/f.py')] - self.assertNoWarnings(caplog) - - file_list.process_template_line('prune e') - file_list.sort() - assert file_list.files == ['a.py', ml('f/f.py')] - self.assertWarnings(caplog) diff --git a/voxvera/vendor/setuptools/tests/test_namespaces.py b/voxvera/vendor/setuptools/tests/test_namespaces.py deleted file mode 100644 index ef4a6f6..0000000 --- a/voxvera/vendor/setuptools/tests/test_namespaces.py +++ /dev/null @@ -1,79 +0,0 @@ -import subprocess -import sys - -from setuptools._path import paths_on_pythonpath - -from . import namespaces - - -class TestNamespaces: - def test_mixed_site_and_non_site(self, tmpdir): - """ - Installing two packages sharing the same namespace, one installed - to a site dir and the other installed just to a path on PYTHONPATH - should leave the namespace in tact and both packages reachable by - import. - """ - pkg_A = namespaces.build_namespace_package(tmpdir, 'myns.pkgA') - pkg_B = namespaces.build_namespace_package(tmpdir, 'myns.pkgB') - site_packages = tmpdir / 'site-packages' - path_packages = tmpdir / 'path-packages' - targets = site_packages, path_packages - # use pip to install to the target directory - install_cmd = [ - sys.executable, - '-m', - 'pip.__main__', - 'install', - str(pkg_A), - '-t', - str(site_packages), - ] - subprocess.check_call(install_cmd) - namespaces.make_site_dir(site_packages) - install_cmd = [ - sys.executable, - '-m', - 'pip.__main__', - 'install', - str(pkg_B), - '-t', - str(path_packages), - ] - subprocess.check_call(install_cmd) - try_import = [ - sys.executable, - '-c', - 'import myns.pkgA; import myns.pkgB', - ] - with paths_on_pythonpath(map(str, targets)): - subprocess.check_call(try_import) - - def test_namespace_package_installed_and_cwd(self, tmpdir): - """ - Installing a namespace packages but also having it in the current - working directory, only one version should take precedence. - """ - pkg_A = namespaces.build_namespace_package(tmpdir, 'myns.pkgA') - target = tmpdir / 'packages' - # use pip to install to the target directory - install_cmd = [ - sys.executable, - '-m', - 'pip.__main__', - 'install', - str(pkg_A), - '-t', - str(target), - ] - subprocess.check_call(install_cmd) - namespaces.make_site_dir(target) - - # ensure that package imports - pkg_resources_imp = [ - sys.executable, - '-c', - 'import myns.pkgA', - ] - with paths_on_pythonpath([str(target)]): - subprocess.check_call(pkg_resources_imp, cwd=str(pkg_A)) diff --git a/voxvera/vendor/setuptools/tests/test_scripts.py b/voxvera/vendor/setuptools/tests/test_scripts.py deleted file mode 100644 index 8641f7b..0000000 --- a/voxvera/vendor/setuptools/tests/test_scripts.py +++ /dev/null @@ -1,12 +0,0 @@ -from setuptools import _scripts - - -class TestWindowsScriptWriter: - def test_header(self): - hdr = _scripts.WindowsScriptWriter.get_header('') - assert hdr.startswith('#!') - assert hdr.endswith('\n') - hdr = hdr.lstrip('#!') - hdr = hdr.rstrip('\n') - # header should not start with an escaped quote - assert not hdr.startswith('\\"') diff --git a/voxvera/vendor/setuptools/tests/test_sdist.py b/voxvera/vendor/setuptools/tests/test_sdist.py deleted file mode 100644 index 5b435fe..0000000 --- a/voxvera/vendor/setuptools/tests/test_sdist.py +++ /dev/null @@ -1,980 +0,0 @@ -"""sdist tests""" - -import contextlib -import io -import logging -import os -import pathlib -import sys -import tarfile -import tempfile -import unicodedata -from inspect import cleandoc -from pathlib import Path -from unittest import mock - -import jaraco.path -import pytest - -from setuptools import Command, SetuptoolsDeprecationWarning -from setuptools._importlib import metadata -from setuptools.command.egg_info import manifest_maker -from setuptools.command.sdist import sdist -from setuptools.dist import Distribution -from setuptools.extension import Extension -from setuptools.tests import fail_on_ascii - -from .text import Filenames - -import distutils -from distutils.core import run_setup - -SETUP_ATTRS = { - 'name': 'sdist_test', - 'version': '0.0', - 'packages': ['sdist_test'], - 'package_data': {'sdist_test': ['*.txt']}, - 'data_files': [("data", [os.path.join("d", "e.dat")])], -} - -SETUP_PY = f"""\ -from setuptools import setup - -setup(**{SETUP_ATTRS!r}) -""" - -EXTENSION = Extension( - name="sdist_test.f", - sources=[os.path.join("sdist_test", "f.c")], - depends=[os.path.join("sdist_test", "f.h")], -) -EXTENSION_SOURCES = EXTENSION.sources + EXTENSION.depends - - -@contextlib.contextmanager -def quiet(): - old_stdout, old_stderr = sys.stdout, sys.stderr - sys.stdout, sys.stderr = io.StringIO(), io.StringIO() - try: - yield - finally: - sys.stdout, sys.stderr = old_stdout, old_stderr - - -# Convert to POSIX path -def posix(path): - if not isinstance(path, str): - return path.replace(os.sep.encode('ascii'), b'/') - else: - return path.replace(os.sep, '/') - - -# HFS Plus uses decomposed UTF-8 -def decompose(path): - if isinstance(path, str): - return unicodedata.normalize('NFD', path) - try: - path = path.decode('utf-8') - path = unicodedata.normalize('NFD', path) - path = path.encode('utf-8') - except UnicodeError: - pass # Not UTF-8 - return path - - -def read_all_bytes(filename): - with open(filename, 'rb') as fp: - return fp.read() - - -def latin1_fail(): - try: - desc, filename = tempfile.mkstemp(suffix=Filenames.latin_1) - os.close(desc) - os.remove(filename) - except Exception: - return True - - -fail_on_latin1_encoded_filenames = pytest.mark.xfail( - latin1_fail(), - reason="System does not support latin-1 filenames", -) - - -skip_under_xdist = pytest.mark.skipif( - "os.environ.get('PYTEST_XDIST_WORKER')", - reason="pytest-dev/pytest-xdist#843", -) -skip_under_stdlib_distutils = pytest.mark.skipif( - not distutils.__package__.startswith('setuptools'), - reason="the test is not supported with stdlib distutils", -) - - -def touch(path): - open(path, 'wb').close() - return path - - -def symlink_or_skip_test(src, dst): - try: - os.symlink(src, dst) - except (OSError, NotImplementedError): - pytest.skip("symlink not supported in OS") - return None - return dst - - -class TestSdistTest: - @pytest.fixture(autouse=True) - def source_dir(self, tmpdir): - tmpdir = tmpdir / "project_root" - tmpdir.mkdir() - - (tmpdir / 'setup.py').write_text(SETUP_PY, encoding='utf-8') - - # Set up the rest of the test package - test_pkg = tmpdir / 'sdist_test' - test_pkg.mkdir() - data_folder = tmpdir / 'd' - data_folder.mkdir() - # *.rst was not included in package_data, so c.rst should not be - # automatically added to the manifest when not under version control - for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst']: - touch(test_pkg / fname) - touch(data_folder / 'e.dat') - # C sources are not included by default, but they will be, - # if an extension module uses them as sources or depends - for fname in EXTENSION_SOURCES: - touch(tmpdir / fname) - - with tmpdir.as_cwd(): - yield tmpdir - - def assert_package_data_in_manifest(self, cmd): - manifest = cmd.filelist.files - assert os.path.join('sdist_test', 'a.txt') in manifest - assert os.path.join('sdist_test', 'b.txt') in manifest - assert os.path.join('sdist_test', 'c.rst') not in manifest - assert os.path.join('d', 'e.dat') in manifest - - def setup_with_extension(self): - setup_attrs = {**SETUP_ATTRS, 'ext_modules': [EXTENSION]} - - dist = Distribution(setup_attrs) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - with quiet(): - cmd.run() - - return cmd - - def test_package_data_in_sdist(self): - """Regression test for pull request #4: ensures that files listed in - package_data are included in the manifest even if they're not added to - version control. - """ - - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - with quiet(): - cmd.run() - - self.assert_package_data_in_manifest(cmd) - - def test_package_data_and_include_package_data_in_sdist(self): - """ - Ensure package_data and include_package_data work - together. - """ - setup_attrs = {**SETUP_ATTRS, 'include_package_data': True} - assert setup_attrs['package_data'] - - dist = Distribution(setup_attrs) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - with quiet(): - cmd.run() - - self.assert_package_data_in_manifest(cmd) - - def test_extension_sources_in_sdist(self): - """ - Ensure that the files listed in Extension.sources and Extension.depends - are automatically included in the manifest. - """ - cmd = self.setup_with_extension() - self.assert_package_data_in_manifest(cmd) - manifest = cmd.filelist.files - for path in EXTENSION_SOURCES: - assert path in manifest - - def test_missing_extension_sources(self): - """ - Similar to test_extension_sources_in_sdist but the referenced files don't exist. - Missing files should not be included in distribution (with no error raised). - """ - for path in EXTENSION_SOURCES: - os.remove(path) - - cmd = self.setup_with_extension() - self.assert_package_data_in_manifest(cmd) - manifest = cmd.filelist.files - for path in EXTENSION_SOURCES: - assert path not in manifest - - def test_symlinked_extension_sources(self): - """ - Similar to test_extension_sources_in_sdist but the referenced files are - instead symbolic links to project-local files. Referenced file paths - should be included. Symlink targets themselves should NOT be included. - """ - symlinked = [] - for path in EXTENSION_SOURCES: - base, ext = os.path.splitext(path) - target = base + "_target." + ext - - os.rename(path, target) - symlink_or_skip_test(os.path.basename(target), path) - symlinked.append(target) - - cmd = self.setup_with_extension() - self.assert_package_data_in_manifest(cmd) - manifest = cmd.filelist.files - for path in EXTENSION_SOURCES: - assert path in manifest - for path in symlinked: - assert path not in manifest - - _INVALID_PATHS = { - "must be relative": lambda: os.path.abspath(os.path.join("sdist_test", "f.h")), - "can't have `..` segments": lambda: os.path.join( - "sdist_test", "..", "sdist_test", "f.h" - ), - "doesn't exist": lambda: os.path.join( - "sdist_test", "this_file_does_not_exist.h" - ), - "must be inside the project root": lambda: symlink_or_skip_test( - touch(os.path.join("..", "outside_of_project_root.h")), - "symlink.h", - ), - } - - @skip_under_stdlib_distutils - @pytest.mark.parametrize("reason", _INVALID_PATHS.keys()) - def test_invalid_extension_depends(self, reason, caplog): - """ - Due to backwards compatibility reasons, `Extension.depends` should accept - invalid/weird paths, but then ignore them when building a sdist. - - This test verifies that the source distribution is still built - successfully with such paths, but that instead of adding these paths to - the manifest, we emit an informational message, notifying the user that - the invalid path won't be automatically included. - """ - invalid_path = self._INVALID_PATHS[reason]() - extension = Extension( - name="sdist_test.f", - sources=[], - depends=[invalid_path], - ) - setup_attrs = {**SETUP_ATTRS, 'ext_modules': [extension]} - - dist = Distribution(setup_attrs) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - with quiet(), caplog.at_level(logging.INFO): - cmd.run() - - self.assert_package_data_in_manifest(cmd) - manifest = cmd.filelist.files - assert invalid_path not in manifest - - expected_message = [ - message - for (logger, level, message) in caplog.record_tuples - if ( - logger == "root" # - and level == logging.INFO # - and invalid_path in message # - ) - ] - assert len(expected_message) == 1 - (expected_message,) = expected_message - assert reason in expected_message - - def test_custom_build_py(self): - """ - Ensure projects defining custom build_py don't break - when creating sdists (issue #2849) - """ - from distutils.command.build_py import build_py as OrigBuildPy - - using_custom_command_guard = mock.Mock() - - class CustomBuildPy(OrigBuildPy): - """ - Some projects have custom commands inheriting from `distutils` - """ - - def get_data_files(self): - using_custom_command_guard() - return super().get_data_files() - - setup_attrs = {**SETUP_ATTRS, 'include_package_data': True} - assert setup_attrs['package_data'] - - dist = Distribution(setup_attrs) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - # Make sure we use the custom command - cmd.cmdclass = {'build_py': CustomBuildPy} - cmd.distribution.cmdclass = {'build_py': CustomBuildPy} - assert cmd.distribution.get_command_class('build_py') == CustomBuildPy - - msg = "setuptools instead of distutils" - with quiet(), pytest.warns(SetuptoolsDeprecationWarning, match=msg): - cmd.run() - - using_custom_command_guard.assert_called() - self.assert_package_data_in_manifest(cmd) - - def test_setup_py_exists(self): - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'foo.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - with quiet(): - cmd.run() - - manifest = cmd.filelist.files - assert 'setup.py' in manifest - - def test_setup_py_missing(self): - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'foo.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - if os.path.exists("setup.py"): - os.remove("setup.py") - with quiet(): - cmd.run() - - manifest = cmd.filelist.files - assert 'setup.py' not in manifest - - def test_setup_py_excluded(self): - with open("MANIFEST.in", "w", encoding="utf-8") as manifest_file: - manifest_file.write("exclude setup.py") - - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'foo.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - with quiet(): - cmd.run() - - manifest = cmd.filelist.files - assert 'setup.py' not in manifest - - def test_defaults_case_sensitivity(self, source_dir): - """ - Make sure default files (README.*, etc.) are added in a case-sensitive - way to avoid problems with packages built on Windows. - """ - - touch(source_dir / 'readme.rst') - touch(source_dir / 'SETUP.cfg') - - dist = Distribution(SETUP_ATTRS) - # the extension deliberately capitalized for this test - # to make sure the actual filename (not capitalized) gets added - # to the manifest - dist.script_name = 'setup.PY' - cmd = sdist(dist) - cmd.ensure_finalized() - - with quiet(): - cmd.run() - - # lowercase all names so we can test in a - # case-insensitive way to make sure the files - # are not included. - manifest = map(lambda x: x.lower(), cmd.filelist.files) - assert 'readme.rst' not in manifest, manifest - assert 'setup.py' not in manifest, manifest - assert 'setup.cfg' not in manifest, manifest - - def test_exclude_dev_only_cache_folders(self, source_dir): - included = { - # Emulate problem in https://github.com/pypa/setuptools/issues/4601 - "MANIFEST.in": ( - "global-include LICEN[CS]E* COPYING* NOTICE* AUTHORS*\n" - "global-include *.txt\n" - ), - # For the sake of being conservative and limiting unforeseen side-effects - # we just exclude dev-only cache folders at the root of the repository: - "test/.venv/lib/python3.9/site-packages/bar-2.dist-info/AUTHORS.rst": "", - "src/.nox/py/lib/python3.12/site-packages/bar-2.dist-info/COPYING.txt": "", - "doc/.tox/default/lib/python3.11/site-packages/foo-4.dist-info/LICENSE": "", - # Let's test against false positives with similarly named files: - ".venv-requirements.txt": "", - ".tox-coveragerc.txt": "", - ".noxy/coveragerc.txt": "", - } - - excluded = { - # .tox/.nox/.venv are well-know folders present at the root of Python repos - # and therefore should be excluded - ".tox/release/lib/python3.11/site-packages/foo-4.dist-info/LICENSE": "", - ".nox/py/lib/python3.12/site-packages/bar-2.dist-info/COPYING.txt": "", - ".venv/lib/python3.9/site-packages/bar-2.dist-info/AUTHORS.rst": "", - } - - for file, content in {**excluded, **included}.items(): - Path(source_dir, file).parent.mkdir(parents=True, exist_ok=True) - Path(source_dir, file).write_text(content, encoding="utf-8") - - cmd = self.setup_with_extension() - self.assert_package_data_in_manifest(cmd) - manifest = {f.replace(os.sep, '/') for f in cmd.filelist.files} - for path in excluded: - assert os.path.exists(path) - assert path not in manifest, (path, manifest) - for path in included: - assert os.path.exists(path) - assert path in manifest, (path, manifest) - - @fail_on_ascii - def test_manifest_is_written_with_utf8_encoding(self): - # Test for #303. - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - mm = manifest_maker(dist) - mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - os.mkdir('sdist_test.egg-info') - - # UTF-8 filename - filename = os.path.join('sdist_test', 'smörbröd.py') - - # Must create the file or it will get stripped. - touch(filename) - - # Add UTF-8 filename and write manifest - with quiet(): - mm.run() - mm.filelist.append(filename) - mm.write_manifest() - - contents = read_all_bytes(mm.manifest) - - # The manifest should be UTF-8 encoded - u_contents = contents.decode('UTF-8') - - # The manifest should contain the UTF-8 filename - assert posix(filename) in u_contents - - @fail_on_ascii - def test_write_manifest_allows_utf8_filenames(self): - # Test for #303. - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - mm = manifest_maker(dist) - mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - os.mkdir('sdist_test.egg-info') - - filename = os.path.join(b'sdist_test', Filenames.utf_8) - - # Must touch the file or risk removal - touch(filename) - - # Add filename and write manifest - with quiet(): - mm.run() - u_filename = filename.decode('utf-8') - mm.filelist.files.append(u_filename) - # Re-write manifest - mm.write_manifest() - - contents = read_all_bytes(mm.manifest) - - # The manifest should be UTF-8 encoded - contents.decode('UTF-8') - - # The manifest should contain the UTF-8 filename - assert posix(filename) in contents - - # The filelist should have been updated as well - assert u_filename in mm.filelist.files - - @skip_under_xdist - def test_write_manifest_skips_non_utf8_filenames(self): - """ - Files that cannot be encoded to UTF-8 (specifically, those that - weren't originally successfully decoded and have surrogate - escapes) should be omitted from the manifest. - See https://bitbucket.org/tarek/distribute/issue/303 for history. - """ - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - mm = manifest_maker(dist) - mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - os.mkdir('sdist_test.egg-info') - - # Latin-1 filename - filename = os.path.join(b'sdist_test', Filenames.latin_1) - - # Add filename with surrogates and write manifest - with quiet(): - mm.run() - u_filename = filename.decode('utf-8', 'surrogateescape') - mm.filelist.append(u_filename) - # Re-write manifest - mm.write_manifest() - - contents = read_all_bytes(mm.manifest) - - # The manifest should be UTF-8 encoded - contents.decode('UTF-8') - - # The Latin-1 filename should have been skipped - assert posix(filename) not in contents - - # The filelist should have been updated as well - assert u_filename not in mm.filelist.files - - @fail_on_ascii - def test_manifest_is_read_with_utf8_encoding(self): - # Test for #303. - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - # Create manifest - with quiet(): - cmd.run() - - # Add UTF-8 filename to manifest - filename = os.path.join(b'sdist_test', Filenames.utf_8) - cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - manifest = open(cmd.manifest, 'ab') - manifest.write(b'\n' + filename) - manifest.close() - - # The file must exist to be included in the filelist - touch(filename) - - # Re-read manifest - cmd.filelist.files = [] - with quiet(): - cmd.read_manifest() - - # The filelist should contain the UTF-8 filename - filename = filename.decode('utf-8') - assert filename in cmd.filelist.files - - @fail_on_latin1_encoded_filenames - def test_read_manifest_skips_non_utf8_filenames(self): - # Test for #303. - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - # Create manifest - with quiet(): - cmd.run() - - # Add Latin-1 filename to manifest - filename = os.path.join(b'sdist_test', Filenames.latin_1) - cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - manifest = open(cmd.manifest, 'ab') - manifest.write(b'\n' + filename) - manifest.close() - - # The file must exist to be included in the filelist - touch(filename) - - # Re-read manifest - cmd.filelist.files = [] - with quiet(): - cmd.read_manifest() - - # The Latin-1 filename should have been skipped - filename = filename.decode('latin-1') - assert filename not in cmd.filelist.files - - @fail_on_ascii - @fail_on_latin1_encoded_filenames - def test_sdist_with_utf8_encoded_filename(self): - # Test for #303. - dist = Distribution(self.make_strings(SETUP_ATTRS)) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - filename = os.path.join(b'sdist_test', Filenames.utf_8) - touch(filename) - - with quiet(): - cmd.run() - - if sys.platform == 'darwin': - filename = decompose(filename) - - fs_enc = sys.getfilesystemencoding() - - if sys.platform == 'win32': - if fs_enc == 'cp1252': - # Python mangles the UTF-8 filename - filename = filename.decode('cp1252') - assert filename in cmd.filelist.files - else: - filename = filename.decode('mbcs') - assert filename in cmd.filelist.files - else: - filename = filename.decode('utf-8') - assert filename in cmd.filelist.files - - @classmethod - def make_strings(cls, item): - if isinstance(item, dict): - return {key: cls.make_strings(value) for key, value in item.items()} - if isinstance(item, list): - return list(map(cls.make_strings, item)) - return str(item) - - @fail_on_latin1_encoded_filenames - @skip_under_xdist - def test_sdist_with_latin1_encoded_filename(self): - # Test for #303. - dist = Distribution(self.make_strings(SETUP_ATTRS)) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - # Latin-1 filename - filename = os.path.join(b'sdist_test', Filenames.latin_1) - touch(filename) - assert os.path.isfile(filename) - - with quiet(): - cmd.run() - - # not all windows systems have a default FS encoding of cp1252 - if sys.platform == 'win32': - # Latin-1 is similar to Windows-1252 however - # on mbcs filesys it is not in latin-1 encoding - fs_enc = sys.getfilesystemencoding() - if fs_enc != 'mbcs': - fs_enc = 'latin-1' - filename = filename.decode(fs_enc) - - assert filename in cmd.filelist.files - else: - # The Latin-1 filename should have been skipped - filename = filename.decode('latin-1') - assert filename not in cmd.filelist.files - - _EXAMPLE_DIRECTIVES = { - "setup.cfg - long_description and version": """ - [metadata] - name = testing - version = file: src/VERSION.txt - license_files = DOWHATYOUWANT - long_description = file: README.rst, USAGE.rst - """, - "pyproject.toml - static readme/license files and dynamic version": """ - [project] - name = "testing" - readme = "USAGE.rst" - license-files = ["DOWHATYOUWANT"] - dynamic = ["version"] - [tool.setuptools.dynamic] - version = {file = ["src/VERSION.txt"]} - """, - "pyproject.toml - directive with str instead of list": """ - [project] - name = "testing" - readme = "USAGE.rst" - license-files = ["DOWHATYOUWANT"] - dynamic = ["version"] - [tool.setuptools.dynamic] - version = {file = "src/VERSION.txt"} - """, - "pyproject.toml - deprecated license table with file entry": """ - [project] - name = "testing" - readme = "USAGE.rst" - license = {file = "DOWHATYOUWANT"} - dynamic = ["version"] - [tool.setuptools.dynamic] - version = {file = "src/VERSION.txt"} - """, - } - - @pytest.mark.parametrize("config", _EXAMPLE_DIRECTIVES.keys()) - @pytest.mark.filterwarnings( - "ignore:.project.license. as a TOML table is deprecated" - ) - def test_add_files_referenced_by_config_directives(self, source_dir, config): - config_file, _, _ = config.partition(" - ") - config_text = self._EXAMPLE_DIRECTIVES[config] - (source_dir / 'src').mkdir() - (source_dir / 'src/VERSION.txt').write_text("0.42", encoding="utf-8") - (source_dir / 'README.rst').write_text("hello world!", encoding="utf-8") - (source_dir / 'USAGE.rst').write_text("hello world!", encoding="utf-8") - (source_dir / 'DOWHATYOUWANT').write_text("hello world!", encoding="utf-8") - (source_dir / config_file).write_text(config_text, encoding="utf-8") - - dist = Distribution({"packages": []}) - dist.script_name = 'setup.py' - dist.parse_config_files() - - cmd = sdist(dist) - cmd.ensure_finalized() - with quiet(): - cmd.run() - - assert ( - 'src/VERSION.txt' in cmd.filelist.files - or 'src\\VERSION.txt' in cmd.filelist.files - ) - assert 'USAGE.rst' in cmd.filelist.files - assert 'DOWHATYOUWANT' in cmd.filelist.files - assert '/' not in cmd.filelist.files - assert '\\' not in cmd.filelist.files - - def test_pyproject_toml_in_sdist(self, source_dir): - """ - Check if pyproject.toml is included in source distribution if present - """ - touch(source_dir / 'pyproject.toml') - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - with quiet(): - cmd.run() - manifest = cmd.filelist.files - assert 'pyproject.toml' in manifest - - def test_pyproject_toml_excluded(self, source_dir): - """ - Check that pyproject.toml can excluded even if present - """ - touch(source_dir / 'pyproject.toml') - with open('MANIFEST.in', 'w', encoding="utf-8") as mts: - print('exclude pyproject.toml', file=mts) - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - with quiet(): - cmd.run() - manifest = cmd.filelist.files - assert 'pyproject.toml' not in manifest - - def test_build_subcommand_source_files(self, source_dir): - touch(source_dir / '.myfile~') - - # Sanity check: without custom commands file list should not be affected - dist = Distribution({**SETUP_ATTRS, "script_name": "setup.py"}) - cmd = sdist(dist) - cmd.ensure_finalized() - with quiet(): - cmd.run() - manifest = cmd.filelist.files - assert '.myfile~' not in manifest - - # Test: custom command should be able to augment file list - dist = Distribution({**SETUP_ATTRS, "script_name": "setup.py"}) - build = dist.get_command_obj("build") - build.sub_commands = [*build.sub_commands, ("build_custom", None)] - - class build_custom(Command): - def initialize_options(self): ... - - def finalize_options(self): ... - - def run(self): ... - - def get_source_files(self): - return ['.myfile~'] - - dist.cmdclass.update(build_custom=build_custom) - - cmd = sdist(dist) - cmd.use_defaults = True - cmd.ensure_finalized() - with quiet(): - cmd.run() - manifest = cmd.filelist.files - assert '.myfile~' in manifest - - @pytest.mark.skipif("os.environ.get('SETUPTOOLS_USE_DISTUTILS') == 'stdlib'") - def test_build_base_pathlib(self, source_dir): - """ - Ensure if build_base is a pathlib.Path, the build still succeeds. - """ - dist = Distribution({ - **SETUP_ATTRS, - "script_name": "setup.py", - "options": {"build": {"build_base": pathlib.Path('build')}}, - }) - cmd = sdist(dist) - cmd.ensure_finalized() - with quiet(): - cmd.run() - - -def test_default_revctrl(): - """ - When _default_revctrl was removed from the `setuptools.command.sdist` - module in 10.0, it broke some systems which keep an old install of - setuptools (Distribute) around. Those old versions require that the - setuptools package continue to implement that interface, so this - function provides that interface, stubbed. See #320 for details. - - This interface must be maintained until Ubuntu 12.04 is no longer - supported (by Setuptools). - """ - (ep,) = metadata.EntryPoints._from_text( - """ - [setuptools.file_finders] - svn_cvs = setuptools.command.sdist:_default_revctrl - """ - ) - res = ep.load() - assert hasattr(res, '__iter__') - - -class TestRegressions: - """ - Can be removed/changed if the project decides to change how it handles symlinks - or external files. - """ - - @staticmethod - def files_for_symlink_in_extension_depends(tmp_path, dep_path): - return { - "external": { - "dir": {"file.h": ""}, - }, - "project": { - "setup.py": cleandoc( - f""" - from setuptools import Extension, setup - setup( - name="myproj", - version="42", - ext_modules=[ - Extension( - "hello", sources=["hello.pyx"], - depends=[{dep_path!r}] - ) - ], - ) - """ - ), - "hello.pyx": "", - "MANIFEST.in": "global-include *.h", - }, - } - - @pytest.mark.parametrize( - "dep_path", ("myheaders/dir/file.h", "myheaders/dir/../dir/file.h") - ) - def test_symlink_in_extension_depends(self, monkeypatch, tmp_path, dep_path): - # Given a project with a symlinked dir and a "depends" targeting that dir - files = self.files_for_symlink_in_extension_depends(tmp_path, dep_path) - jaraco.path.build(files, prefix=str(tmp_path)) - symlink_or_skip_test(tmp_path / "external", tmp_path / "project/myheaders") - - # When `sdist` runs, there should be no error - members = run_sdist(monkeypatch, tmp_path / "project") - # and the sdist should contain the symlinked files - for expected in ( - "myproj-42/hello.pyx", - "myproj-42/myheaders/dir/file.h", - ): - assert expected in members - - @staticmethod - def files_for_external_path_in_extension_depends(tmp_path, dep_path): - head, _, tail = dep_path.partition("$tmp_path$/") - dep_path = tmp_path / tail if tail else head - - return { - "external": { - "dir": {"file.h": ""}, - }, - "project": { - "setup.py": cleandoc( - f""" - from setuptools import Extension, setup - setup( - name="myproj", - version="42", - ext_modules=[ - Extension( - "hello", sources=["hello.pyx"], - depends=[{str(dep_path)!r}] - ) - ], - ) - """ - ), - "hello.pyx": "", - "MANIFEST.in": "global-include *.h", - }, - } - - @pytest.mark.parametrize( - "dep_path", ("$tmp_path$/external/dir/file.h", "../external/dir/file.h") - ) - def test_external_path_in_extension_depends(self, monkeypatch, tmp_path, dep_path): - # Given a project with a "depends" targeting an external dir - files = self.files_for_external_path_in_extension_depends(tmp_path, dep_path) - jaraco.path.build(files, prefix=str(tmp_path)) - # When `sdist` runs, there should be no error - members = run_sdist(monkeypatch, tmp_path / "project") - # and the sdist should not contain the external file - for name in members: - assert "file.h" not in name - - -def run_sdist(monkeypatch, project): - """Given a project directory, run the sdist and return its contents""" - monkeypatch.chdir(project) - with quiet(): - run_setup("setup.py", ["sdist"]) - - archive = next((project / "dist").glob("*.tar.gz")) - with tarfile.open(str(archive)) as tar: - return set(tar.getnames()) - - -def test_sanity_check_setuptools_own_sdist(setuptools_sdist): - with tarfile.open(setuptools_sdist) as tar: - files = tar.getnames() - - # setuptools sdist should not include the .tox folder - tox_files = [name for name in files if ".tox" in name] - assert len(tox_files) == 0, f"not empty {tox_files}" diff --git a/voxvera/vendor/setuptools/tests/test_setopt.py b/voxvera/vendor/setuptools/tests/test_setopt.py deleted file mode 100644 index ccf2561..0000000 --- a/voxvera/vendor/setuptools/tests/test_setopt.py +++ /dev/null @@ -1,40 +0,0 @@ -import configparser - -from setuptools.command import setopt - - -class TestEdit: - @staticmethod - def parse_config(filename): - parser = configparser.ConfigParser() - with open(filename, encoding='utf-8') as reader: - parser.read_file(reader) - return parser - - @staticmethod - def write_text(file, content): - with open(file, 'wb') as strm: - strm.write(content.encode('utf-8')) - - def test_utf8_encoding_retained(self, tmpdir): - """ - When editing a file, non-ASCII characters encoded in - UTF-8 should be retained. - """ - config = tmpdir.join('setup.cfg') - self.write_text(str(config), '[names]\njaraco=джарако') - setopt.edit_config(str(config), dict(names=dict(other='yes'))) - parser = self.parse_config(str(config)) - assert parser.get('names', 'jaraco') == 'джарако' - assert parser.get('names', 'other') == 'yes' - - def test_case_retained(self, tmpdir): - """ - When editing a file, case of keys should be retained. - """ - config = tmpdir.join('setup.cfg') - self.write_text(str(config), '[names]\nFoO=bAr') - setopt.edit_config(str(config), dict(names=dict(oTher='yes'))) - actual = config.read_text(encoding='ascii') - assert 'FoO' in actual - assert 'oTher' in actual diff --git a/voxvera/vendor/setuptools/tests/test_setuptools.py b/voxvera/vendor/setuptools/tests/test_setuptools.py deleted file mode 100644 index c57908b..0000000 --- a/voxvera/vendor/setuptools/tests/test_setuptools.py +++ /dev/null @@ -1,294 +0,0 @@ -"""Tests for the 'setuptools' package""" - -import os -import re -import sys -from zipfile import ZipFile - -import pytest -from packaging.version import Version - -import setuptools -import setuptools.depends as dep -import setuptools.dist -from setuptools.depends import Require - -import distutils.cmd -import distutils.core -from distutils.core import Extension -from distutils.errors import DistutilsSetupError - - -@pytest.fixture(autouse=True) -def isolated_dir(tmpdir_cwd): - return - - -def makeSetup(**args): - """Return distribution from 'setup(**args)', without executing commands""" - - distutils.core._setup_stop_after = "commandline" - - # Don't let system command line leak into tests! - args.setdefault('script_args', ['install']) - - try: - return setuptools.setup(**args) - finally: - distutils.core._setup_stop_after = None - - -needs_bytecode = pytest.mark.skipif( - not hasattr(dep, 'get_module_constant'), - reason="bytecode support not available", -) - - -class TestDepends: - def testExtractConst(self): - if not hasattr(dep, 'extract_constant'): - # skip on non-bytecode platforms - return - - def f1(): - global x, y, z - x = "test" - y = z # pyright: ignore[reportUnboundVariable] # Explicitly testing for this runtime issue - - fc = f1.__code__ - - # unrecognized name - assert dep.extract_constant(fc, 'q', -1) is None - - # constant assigned - assert dep.extract_constant(fc, 'x', -1) == "test" - - # expression assigned - assert dep.extract_constant(fc, 'y', -1) == -1 - - # recognized name, not assigned - assert dep.extract_constant(fc, 'z', -1) is None - - def testFindModule(self): - with pytest.raises(ImportError): - dep.find_module('no-such.-thing') - with pytest.raises(ImportError): - dep.find_module('setuptools.non-existent') - f, _p, _i = dep.find_module('setuptools.tests') - f.close() - - @pytest.fixture - def sample_module(self, monkeypatch, tmp_path): - monkeypatch.syspath_prepend(str(tmp_path)) - module = "mod_with_version" - version = "2.0.9" - file = tmp_path / f"{module}.py" - file.write_text(f"__version__ = {version!r}", encoding="utf-8") - return (module, version) - - @needs_bytecode - def testModuleExtract(self, sample_module): - (module, version) = sample_module - assert dep.get_module_constant(module, '__version__') == version - assert dep.get_module_constant('sys', 'version') == sys.version - assert dep.get_module_constant(__name__, '__doc__') == __doc__ - - @needs_bytecode - def testRequire(self, sample_module): - (module, version) = sample_module - req = Require('GivenName', '1.0.3', module) - - assert req.name == 'GivenName' - assert req.module == module - assert req.requested_version == Version('1.0.3') - assert req.attribute == '__version__' - assert req.full_name() == 'GivenName-1.0.3' - - assert str(req.get_version()) == version - assert req.version_ok('1.0.9') - assert not req.version_ok('0.9.1') - assert not req.version_ok('unknown') - - assert req.is_present() - assert req.is_current() - - req = Require('Do-what-I-mean', '1.0', 'd-w-i-m') - assert not req.is_present() - assert not req.is_current() - - @needs_bytecode - def test_require_present(self): - # In #1896, this test was failing for months with the only - # complaint coming from test runners (not end users). - # TODO: Evaluate if this code is needed at all. - req = Require('Tests', None, 'tests', homepage="http://example.com") - assert req.format is None - assert req.attribute is None - assert req.requested_version is None - assert req.full_name() == 'Tests' - assert req.homepage == 'http://example.com' - - from setuptools.tests import __path__ - - paths = [os.path.dirname(p) for p in __path__] - assert req.is_present(paths) - assert req.is_current(paths) - - -class TestDistro: - def setup_method(self, method): - self.e1 = Extension('bar.ext', ['bar.c']) - self.e2 = Extension('c.y', ['y.c']) - - self.dist = makeSetup( - packages=['a', 'a.b', 'a.b.c', 'b', 'c'], - py_modules=['b.d', 'x'], - ext_modules=(self.e1, self.e2), - package_dir={}, - ) - - def testDistroType(self): - assert isinstance(self.dist, setuptools.dist.Distribution) - - def testExcludePackage(self): - self.dist.exclude_package('a') - assert self.dist.packages == ['b', 'c'] - - self.dist.exclude_package('b') - assert self.dist.packages == ['c'] - assert self.dist.py_modules == ['x'] - assert self.dist.ext_modules == [self.e1, self.e2] - - self.dist.exclude_package('c') - assert self.dist.packages == [] - assert self.dist.py_modules == ['x'] - assert self.dist.ext_modules == [self.e1] - - # test removals from unspecified options - makeSetup().exclude_package('x') - - def testIncludeExclude(self): - # remove an extension - self.dist.exclude(ext_modules=[self.e1]) - assert self.dist.ext_modules == [self.e2] - - # add it back in - self.dist.include(ext_modules=[self.e1]) - assert self.dist.ext_modules == [self.e2, self.e1] - - # should not add duplicate - self.dist.include(ext_modules=[self.e1]) - assert self.dist.ext_modules == [self.e2, self.e1] - - def testExcludePackages(self): - self.dist.exclude(packages=['c', 'b', 'a']) - assert self.dist.packages == [] - assert self.dist.py_modules == ['x'] - assert self.dist.ext_modules == [self.e1] - - def testEmpty(self): - dist = makeSetup() - dist.include(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) - dist = makeSetup() - dist.exclude(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) - - def testContents(self): - assert self.dist.has_contents_for('a') - self.dist.exclude_package('a') - assert not self.dist.has_contents_for('a') - - assert self.dist.has_contents_for('b') - self.dist.exclude_package('b') - assert not self.dist.has_contents_for('b') - - assert self.dist.has_contents_for('c') - self.dist.exclude_package('c') - assert not self.dist.has_contents_for('c') - - def testInvalidIncludeExclude(self): - with pytest.raises(DistutilsSetupError): - self.dist.include(nonexistent_option='x') - with pytest.raises(DistutilsSetupError): - self.dist.exclude(nonexistent_option='x') - with pytest.raises(DistutilsSetupError): - self.dist.include(packages={'x': 'y'}) - with pytest.raises(DistutilsSetupError): - self.dist.exclude(packages={'x': 'y'}) - with pytest.raises(DistutilsSetupError): - self.dist.include(ext_modules={'x': 'y'}) - with pytest.raises(DistutilsSetupError): - self.dist.exclude(ext_modules={'x': 'y'}) - - with pytest.raises(DistutilsSetupError): - self.dist.include(package_dir=['q']) - with pytest.raises(DistutilsSetupError): - self.dist.exclude(package_dir=['q']) - - -@pytest.fixture -def example_source(tmpdir): - tmpdir.mkdir('foo') - (tmpdir / 'foo/bar.py').write('') - (tmpdir / 'readme.txt').write('') - return tmpdir - - -def test_findall(example_source): - found = list(setuptools.findall(str(example_source))) - expected = ['readme.txt', 'foo/bar.py'] - expected = [example_source.join(fn) for fn in expected] - assert found == expected - - -def test_findall_curdir(example_source): - with example_source.as_cwd(): - found = list(setuptools.findall()) - expected = ['readme.txt', os.path.join('foo', 'bar.py')] - assert found == expected - - -@pytest.fixture -def can_symlink(tmpdir): - """ - Skip if cannot create a symbolic link - """ - link_fn = 'link' - target_fn = 'target' - try: - os.symlink(target_fn, link_fn) - except (OSError, NotImplementedError, AttributeError): - pytest.skip("Cannot create symbolic links") - os.remove(link_fn) - - -@pytest.mark.usefixtures("can_symlink") -def test_findall_missing_symlink(tmpdir): - with tmpdir.as_cwd(): - os.symlink('foo', 'bar') - found = list(setuptools.findall()) - assert found == [] - - -@pytest.mark.xfail(reason="unable to exclude tests; #4475 #3260") -def test_its_own_wheel_does_not_contain_tests(setuptools_wheel): - with ZipFile(setuptools_wheel) as zipfile: - contents = [f.replace(os.sep, '/') for f in zipfile.namelist()] - - for member in contents: - assert '/tests/' not in member - - -def test_wheel_includes_cli_scripts(setuptools_wheel): - with ZipFile(setuptools_wheel) as zipfile: - contents = [f.replace(os.sep, '/') for f in zipfile.namelist()] - - assert any('cli-64.exe' in member for member in contents) - - -def test_wheel_includes_vendored_metadata(setuptools_wheel): - with ZipFile(setuptools_wheel) as zipfile: - contents = [f.replace(os.sep, '/') for f in zipfile.namelist()] - - assert any( - re.search(r'_vendor/.*\.dist-info/METADATA', member) for member in contents - ) diff --git a/voxvera/vendor/setuptools/tests/test_shutil_wrapper.py b/voxvera/vendor/setuptools/tests/test_shutil_wrapper.py deleted file mode 100644 index 74ff7e9..0000000 --- a/voxvera/vendor/setuptools/tests/test_shutil_wrapper.py +++ /dev/null @@ -1,23 +0,0 @@ -import stat -import sys -from unittest.mock import Mock - -from setuptools import _shutil - - -def test_rmtree_readonly(monkeypatch, tmp_path): - """Verify onerr works as expected""" - - tmp_dir = tmp_path / "with_readonly" - tmp_dir.mkdir() - some_file = tmp_dir.joinpath("file.txt") - some_file.touch() - some_file.chmod(stat.S_IREAD) - - expected_count = 1 if sys.platform.startswith("win") else 0 - chmod_fn = Mock(wraps=_shutil.attempt_chmod_verbose) - monkeypatch.setattr(_shutil, "attempt_chmod_verbose", chmod_fn) - - _shutil.rmtree(tmp_dir) - assert chmod_fn.call_count == expected_count - assert not tmp_dir.is_dir() diff --git a/voxvera/vendor/setuptools/tests/test_unicode_utils.py b/voxvera/vendor/setuptools/tests/test_unicode_utils.py deleted file mode 100644 index a24a9bd..0000000 --- a/voxvera/vendor/setuptools/tests/test_unicode_utils.py +++ /dev/null @@ -1,10 +0,0 @@ -from setuptools import unicode_utils - - -def test_filesys_decode_fs_encoding_is_None(monkeypatch): - """ - Test filesys_decode does not raise TypeError when - getfilesystemencoding returns None. - """ - monkeypatch.setattr('sys.getfilesystemencoding', lambda: None) - unicode_utils.filesys_decode(b'test') diff --git a/voxvera/vendor/setuptools/tests/test_virtualenv.py b/voxvera/vendor/setuptools/tests/test_virtualenv.py deleted file mode 100644 index b02949b..0000000 --- a/voxvera/vendor/setuptools/tests/test_virtualenv.py +++ /dev/null @@ -1,113 +0,0 @@ -import os -import subprocess -import sys -from urllib.error import URLError -from urllib.request import urlopen - -import pytest - - -@pytest.fixture(autouse=True) -def pytest_virtualenv_works(venv): - """ - pytest_virtualenv may not work. if it doesn't, skip these - tests. See #1284. - """ - venv_prefix = venv.run(["python", "-c", "import sys; print(sys.prefix)"]).strip() - if venv_prefix == sys.prefix: - pytest.skip("virtualenv is broken (see pypa/setuptools#1284)") - - -def test_clean_env_install(venv_without_setuptools, setuptools_wheel): - """ - Check setuptools can be installed in a clean environment. - """ - cmd = ["python", "-m", "pip", "install", str(setuptools_wheel)] - venv_without_setuptools.run(cmd) - - -def access_pypi(): - # Detect if tests are being run without connectivity - if not os.environ.get('NETWORK_REQUIRED', False): # pragma: nocover - try: - urlopen('https://pypi.org', timeout=1) - except URLError: - # No network, disable most of these tests - return False - - return True - - -@pytest.mark.skipif( - 'platform.python_implementation() == "PyPy"', - reason="https://github.com/pypa/setuptools/pull/2865#issuecomment-965834995", -) -@pytest.mark.skipif(not access_pypi(), reason="no network") -# ^-- Even when it is not necessary to install a different version of `pip` -# the build process will still try to download `wheel`, see #3147 and #2986. -@pytest.mark.parametrize( - 'pip_version', - [ - None, - pytest.param( - 'pip<20.1', - marks=pytest.mark.xfail( - 'sys.version_info >= (3, 12)', - reason="pip 23.1.2 required for Python 3.12 and later", - ), - ), - pytest.param( - 'pip<21', - marks=pytest.mark.xfail( - 'sys.version_info >= (3, 12)', - reason="pip 23.1.2 required for Python 3.12 and later", - ), - ), - pytest.param( - 'pip<22', - marks=pytest.mark.xfail( - 'sys.version_info >= (3, 12)', - reason="pip 23.1.2 required for Python 3.12 and later", - ), - ), - pytest.param( - 'pip<23', - marks=pytest.mark.xfail( - 'sys.version_info >= (3, 12)', - reason="pip 23.1.2 required for Python 3.12 and later", - ), - ), - pytest.param( - 'https://github.com/pypa/pip/archive/main.zip', - marks=pytest.mark.xfail(reason='#2975'), - ), - ], -) -def test_pip_upgrade_from_source( - pip_version, venv_without_setuptools, setuptools_wheel, setuptools_sdist -): - """ - Check pip can upgrade setuptools from source. - """ - # Install pip/wheel, in a venv without setuptools (as it - # should not be needed for bootstrapping from source) - venv = venv_without_setuptools - venv.run(["pip", "install", "-U", "wheel"]) - if pip_version is not None: - venv.run(["python", "-m", "pip", "install", "-U", pip_version, "--retries=1"]) - with pytest.raises(subprocess.CalledProcessError): - # Meta-test to make sure setuptools is not installed - venv.run(["python", "-c", "import setuptools"]) - - # Then install from wheel. - venv.run(["pip", "install", str(setuptools_wheel)]) - # And finally try to upgrade from source. - venv.run(["pip", "install", "--no-cache-dir", "--upgrade", str(setuptools_sdist)]) - - -def test_no_missing_dependencies(bare_venv, request): - """ - Quick and dirty test to ensure all external dependencies are vendored. - """ - setuptools_dir = request.config.rootdir - bare_venv.run(['python', 'setup.py', '--help'], cwd=setuptools_dir) diff --git a/voxvera/vendor/setuptools/tests/test_warnings.py b/voxvera/vendor/setuptools/tests/test_warnings.py deleted file mode 100644 index 41193d4..0000000 --- a/voxvera/vendor/setuptools/tests/test_warnings.py +++ /dev/null @@ -1,106 +0,0 @@ -from inspect import cleandoc - -import pytest - -from setuptools.warnings import SetuptoolsDeprecationWarning, SetuptoolsWarning - -_EXAMPLES = { - "default": dict( - args=("Hello {x}", "\n\t{target} {v:.1f}"), - kwargs={"x": 5, "v": 3, "target": "World"}, - expected=""" - Hello 5 - !! - - ******************************************************************************** - World 3.0 - ******************************************************************************** - - !! - """, - ), - "futue_due_date": dict( - args=("Summary", "Lorem ipsum"), - kwargs={"due_date": (9999, 11, 22)}, - expected=""" - Summary - !! - - ******************************************************************************** - Lorem ipsum - - By 9999-Nov-22, you need to update your project and remove deprecated calls - or your builds will no longer be supported. - ******************************************************************************** - - !! - """, - ), - "past_due_date_with_docs": dict( - args=("Summary", "Lorem ipsum"), - kwargs={"due_date": (2000, 11, 22), "see_docs": "some_page.html"}, - expected=""" - Summary - !! - - ******************************************************************************** - Lorem ipsum - - This deprecation is overdue, please update your project and remove deprecated - calls to avoid build errors in the future. - - See https://setuptools.pypa.io/en/latest/some_page.html for details. - ******************************************************************************** - - !! - """, - ), -} - - -@pytest.mark.parametrize("example_name", _EXAMPLES.keys()) -def test_formatting(monkeypatch, example_name): - """ - It should automatically handle indentation, interpolation and things like due date. - """ - args = _EXAMPLES[example_name]["args"] - kwargs = _EXAMPLES[example_name]["kwargs"] - expected = _EXAMPLES[example_name]["expected"] - - monkeypatch.setenv("SETUPTOOLS_ENFORCE_DEPRECATION", "false") - with pytest.warns(SetuptoolsWarning) as warn_info: - SetuptoolsWarning.emit(*args, **kwargs) - assert _get_message(warn_info) == cleandoc(expected) - - -def test_due_date_enforcement(monkeypatch): - class _MyDeprecation(SetuptoolsDeprecationWarning): - _SUMMARY = "Summary" - _DETAILS = "Lorem ipsum" - _DUE_DATE = (2000, 11, 22) - _SEE_DOCS = "some_page.html" - - monkeypatch.setenv("SETUPTOOLS_ENFORCE_DEPRECATION", "true") - with pytest.raises(SetuptoolsDeprecationWarning) as exc_info: - _MyDeprecation.emit() - - expected = """ - Summary - !! - - ******************************************************************************** - Lorem ipsum - - This deprecation is overdue, please update your project and remove deprecated - calls to avoid build errors in the future. - - See https://setuptools.pypa.io/en/latest/some_page.html for details. - ******************************************************************************** - - !! - """ - assert str(exc_info.value) == cleandoc(expected) - - -def _get_message(warn_info): - return next(warn.message.args[0] for warn in warn_info) diff --git a/voxvera/vendor/setuptools/tests/test_wheel.py b/voxvera/vendor/setuptools/tests/test_wheel.py deleted file mode 100644 index c3b215a..0000000 --- a/voxvera/vendor/setuptools/tests/test_wheel.py +++ /dev/null @@ -1,690 +0,0 @@ -"""wheel tests""" - -from __future__ import annotations - -import contextlib -import glob -import inspect -import os -import pathlib -import stat -import subprocess -import sys -import sysconfig -import zipfile -from typing import Any - -import pytest -from jaraco import path -from packaging.tags import parse_tag - -from setuptools._importlib import metadata -from setuptools.wheel import Wheel - -from .contexts import tempdir -from .textwrap import DALS - -from distutils.sysconfig import get_config_var -from distutils.util import get_platform - -WHEEL_INFO_TESTS = ( - ('invalid.whl', ValueError), - ( - 'simplewheel-2.0-1-py2.py3-none-any.whl', - { - 'project_name': 'simplewheel', - 'version': '2.0', - 'build': '1', - 'py_version': 'py2.py3', - 'abi': 'none', - 'platform': 'any', - }, - ), - ( - 'simple.dist-0.1-py2.py3-none-any.whl', - { - 'project_name': 'simple.dist', - 'version': '0.1', - 'build': None, - 'py_version': 'py2.py3', - 'abi': 'none', - 'platform': 'any', - }, - ), - ( - 'example_pkg_a-1-py3-none-any.whl', - { - 'project_name': 'example_pkg_a', - 'version': '1', - 'build': None, - 'py_version': 'py3', - 'abi': 'none', - 'platform': 'any', - }, - ), - ( - 'PyQt5-5.9-5.9.1-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl', - { - 'project_name': 'PyQt5', - 'version': '5.9', - 'build': '5.9.1', - 'py_version': 'cp35.cp36.cp37', - 'abi': 'abi3', - 'platform': 'manylinux1_x86_64', - }, - ), -) - - -@pytest.mark.parametrize( - ('filename', 'info'), WHEEL_INFO_TESTS, ids=[t[0] for t in WHEEL_INFO_TESTS] -) -def test_wheel_info(filename, info): - if inspect.isclass(info): - with pytest.raises(info): - Wheel(filename) - return - w = Wheel(filename) - assert {k: getattr(w, k) for k in info.keys()} == info - - -@contextlib.contextmanager -def build_wheel(extra_file_defs=None, **kwargs): - file_defs = { - 'setup.py': ( - DALS( - """ - # -*- coding: utf-8 -*- - from setuptools import setup - import setuptools - setup(**%r) - """ - ) - % kwargs - ).encode('utf-8'), - } - if extra_file_defs: - file_defs.update(extra_file_defs) - with tempdir() as source_dir: - path.build(file_defs, source_dir) - subprocess.check_call( - (sys.executable, 'setup.py', '-q', 'bdist_wheel'), cwd=source_dir - ) - yield glob.glob(os.path.join(source_dir, 'dist', '*.whl'))[0] - - -def tree_set(root): - return { - os.path.join(os.path.relpath(dirpath, root), filename) - for dirpath, dirnames, filenames in os.walk(root) - for filename in filenames - } - - -def flatten_tree(tree): - """Flatten nested dicts and lists into a full list of paths""" - output = set() - for node, contents in tree.items(): - if isinstance(contents, dict): - contents = flatten_tree(contents) - - for elem in contents: - if isinstance(elem, dict): - output |= {os.path.join(node, val) for val in flatten_tree(elem)} - else: - output.add(os.path.join(node, elem)) - return output - - -def format_install_tree(tree): - return { - x.format( - py_version=sysconfig.get_python_version(), - platform=get_platform(), - shlib_ext=get_config_var('EXT_SUFFIX') or get_config_var('SO'), - ) - for x in tree - } - - -def _check_wheel_install( - filename, install_dir, install_tree_includes, project_name, version, requires_txt -): - w = Wheel(filename) - egg_path = os.path.join(install_dir, w.egg_name()) - w.install_as_egg(egg_path) - if install_tree_includes is not None: - install_tree = format_install_tree(install_tree_includes) - exp = tree_set(install_dir) - assert install_tree.issubset(exp), install_tree - exp - - (dist,) = metadata.Distribution.discover(path=[egg_path]) - - # pyright is nitpicky; fine to assume dist.metadata.__getitem__ will fail or return None - # (https://github.com/pypa/setuptools/pull/5006#issuecomment-2894774288) - assert dist.metadata['Name'] == project_name # pyright: ignore # noqa: PGH003 - assert dist.metadata['Version'] == version # pyright: ignore # noqa: PGH003 - assert dist.read_text('requires.txt') == requires_txt - - -class Record: - def __init__(self, id, **kwargs) -> None: - self._id = id - self._fields = kwargs - - def __repr__(self) -> str: - return f'{self._id}(**{self._fields!r})' - - -# Using Any to avoid possible type union issues later in test -# making a TypedDict is not worth in a test and anonymous/inline TypedDict are experimental -# https://github.com/python/mypy/issues/9884 -WHEEL_INSTALL_TESTS: tuple[dict[str, Any], ...] = ( - dict( - id='basic', - file_defs={'foo': {'__init__.py': ''}}, - setup_kwargs=dict( - packages=['foo'], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': { - 'EGG-INFO': ['PKG-INFO', 'RECORD', 'WHEEL', 'top_level.txt'], - 'foo': ['__init__.py'], - } - }), - ), - dict( - id='utf-8', - setup_kwargs=dict( - description='Description accentuée', - ), - ), - dict( - id='data', - file_defs={ - 'data.txt': DALS( - """ - Some data... - """ - ), - }, - setup_kwargs=dict( - data_files=[('data_dir', ['data.txt'])], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': { - 'EGG-INFO': ['PKG-INFO', 'RECORD', 'WHEEL', 'top_level.txt'], - 'data_dir': ['data.txt'], - } - }), - ), - dict( - id='extension', - file_defs={ - 'extension.c': DALS( - """ - #include "Python.h" - - #if PY_MAJOR_VERSION >= 3 - - static struct PyModuleDef moduledef = { - PyModuleDef_HEAD_INIT, - "extension", - NULL, - 0, - NULL, - NULL, - NULL, - NULL, - NULL - }; - - #define INITERROR return NULL - - PyMODINIT_FUNC PyInit_extension(void) - - #else - - #define INITERROR return - - void initextension(void) - - #endif - { - #if PY_MAJOR_VERSION >= 3 - PyObject *module = PyModule_Create(&moduledef); - #else - PyObject *module = Py_InitModule("extension", NULL); - #endif - if (module == NULL) - INITERROR; - #if PY_MAJOR_VERSION >= 3 - return module; - #endif - } - """ - ), - }, - setup_kwargs=dict( - ext_modules=[ - Record( - 'setuptools.Extension', name='extension', sources=['extension.c'] - ) - ], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}-{platform}.egg': [ - 'extension{shlib_ext}', - { - 'EGG-INFO': [ - 'PKG-INFO', - 'RECORD', - 'WHEEL', - 'top_level.txt', - ] - }, - ] - }), - ), - dict( - id='header', - file_defs={ - 'header.h': DALS( - """ - """ - ), - }, - setup_kwargs=dict( - headers=['header.h'], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': [ - 'header.h', - { - 'EGG-INFO': [ - 'PKG-INFO', - 'RECORD', - 'WHEEL', - 'top_level.txt', - ] - }, - ] - }), - ), - dict( - id='script', - file_defs={ - 'script.py': DALS( - """ - #/usr/bin/python - print('hello world!') - """ - ), - 'script.sh': DALS( - """ - #/bin/sh - echo 'hello world!' - """ - ), - }, - setup_kwargs=dict( - scripts=['script.py', 'script.sh'], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': { - 'EGG-INFO': [ - 'PKG-INFO', - 'RECORD', - 'WHEEL', - 'top_level.txt', - {'scripts': ['script.py', 'script.sh']}, - ] - } - }), - ), - dict( - id='requires1', - install_requires='foobar==2.0', - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': { - 'EGG-INFO': [ - 'PKG-INFO', - 'RECORD', - 'WHEEL', - 'requires.txt', - 'top_level.txt', - ] - } - }), - requires_txt=DALS( - """ - foobar==2.0 - """ - ), - ), - dict( - id='requires2', - install_requires=f""" - bar - foo<=2.0; {sys.platform!r} in sys_platform - """, - requires_txt=DALS( - """ - bar - foo<=2.0 - """ - ), - ), - dict( - id='requires3', - install_requires=f""" - bar; {sys.platform!r} != sys_platform - """, - ), - dict( - id='requires4', - install_requires=""" - foo - """, - extras_require={ - 'extra': 'foobar>3', - }, - requires_txt=DALS( - """ - foo - - [extra] - foobar>3 - """ - ), - ), - dict( - id='requires5', - extras_require={ - 'extra': f'foobar; {sys.platform!r} != sys_platform', - }, - requires_txt='\n' - + DALS( - """ - [extra] - """ - ), - ), - dict( - id='requires_ensure_order', - install_requires=""" - foo - bar - baz - qux - """, - extras_require={ - 'extra': """ - foobar>3 - barbaz>4 - bazqux>5 - quxzap>6 - """, - }, - requires_txt=DALS( - """ - foo - bar - baz - qux - - [extra] - foobar>3 - barbaz>4 - bazqux>5 - quxzap>6 - """ - ), - ), - dict( - id='namespace_package', - file_defs={ - 'foo': { - 'bar': {'__init__.py': ''}, - }, - }, - setup_kwargs=dict( - namespace_packages=['foo'], - packages=['foo.bar'], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': [ - 'foo-1.0-py{py_version}-nspkg.pth', - { - 'EGG-INFO': [ - 'PKG-INFO', - 'RECORD', - 'WHEEL', - 'namespace_packages.txt', - 'top_level.txt', - ] - }, - { - 'foo': [ - '__init__.py', - {'bar': ['__init__.py']}, - ] - }, - ] - }), - ), - dict( - id='empty_namespace_package', - file_defs={ - 'foobar': { - '__init__.py': ( - "__import__('pkg_resources').declare_namespace(__name__)" - ) - }, - }, - setup_kwargs=dict( - namespace_packages=['foobar'], - packages=['foobar'], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': [ - 'foo-1.0-py{py_version}-nspkg.pth', - { - 'EGG-INFO': [ - 'PKG-INFO', - 'RECORD', - 'WHEEL', - 'namespace_packages.txt', - 'top_level.txt', - ] - }, - { - 'foobar': [ - '__init__.py', - ] - }, - ] - }), - ), - dict( - id='data_in_package', - file_defs={ - 'foo': { - '__init__.py': '', - 'data_dir': { - 'data.txt': DALS( - """ - Some data... - """ - ), - }, - } - }, - setup_kwargs=dict( - packages=['foo'], - data_files=[('foo/data_dir', ['foo/data_dir/data.txt'])], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': { - 'EGG-INFO': [ - 'PKG-INFO', - 'RECORD', - 'WHEEL', - 'top_level.txt', - ], - 'foo': [ - '__init__.py', - { - 'data_dir': [ - 'data.txt', - ] - }, - ], - } - }), - ), -) - - -@pytest.mark.parametrize( - 'params', - WHEEL_INSTALL_TESTS, - ids=[params['id'] for params in WHEEL_INSTALL_TESTS], -) -def test_wheel_install(params): - project_name = params.get('name', 'foo') - version = params.get('version', '1.0') - install_requires = params.get('install_requires', []) - extras_require = params.get('extras_require', {}) - requires_txt = params.get('requires_txt', None) - install_tree = params.get('install_tree') - file_defs = params.get('file_defs', {}) - setup_kwargs = params.get('setup_kwargs', {}) - with ( - build_wheel( - name=project_name, - version=version, - install_requires=install_requires, - extras_require=extras_require, - extra_file_defs=file_defs, - **setup_kwargs, - ) as filename, - tempdir() as install_dir, - ): - _check_wheel_install( - filename, install_dir, install_tree, project_name, version, requires_txt - ) - - -def test_wheel_no_dist_dir(): - project_name = 'nodistinfo' - version = '1.0' - wheel_name = f'{project_name}-{version}-py2.py3-none-any.whl' - with tempdir() as source_dir: - wheel_path = os.path.join(source_dir, wheel_name) - # create an empty zip file - zipfile.ZipFile(wheel_path, 'w').close() - with tempdir() as install_dir: - with pytest.raises(ValueError): - _check_wheel_install( - wheel_path, install_dir, None, project_name, version, None - ) - - -def test_wheel_is_compatible(monkeypatch): - def sys_tags(): - return { - (t.interpreter, t.abi, t.platform) - for t in parse_tag('cp36-cp36m-manylinux1_x86_64') - } - - monkeypatch.setattr('setuptools.wheel._get_supported_tags', sys_tags) - assert Wheel('onnxruntime-0.1.2-cp36-cp36m-manylinux1_x86_64.whl').is_compatible() - - -def test_wheel_mode(): - @contextlib.contextmanager - def build_wheel(extra_file_defs=None, **kwargs): - file_defs = { - 'setup.py': ( - DALS( - """ - # -*- coding: utf-8 -*- - from setuptools import setup - import setuptools - setup(**%r) - """ - ) - % kwargs - ).encode('utf-8'), - } - if extra_file_defs: - file_defs.update(extra_file_defs) - with tempdir() as source_dir: - path.build(file_defs, source_dir) - runsh = pathlib.Path(source_dir) / "script.sh" - os.chmod(runsh, 0o777) - subprocess.check_call( - (sys.executable, 'setup.py', '-q', 'bdist_wheel'), cwd=source_dir - ) - yield glob.glob(os.path.join(source_dir, 'dist', '*.whl'))[0] - - params = dict( - id='script', - file_defs={ - 'script.py': DALS( - """ - #/usr/bin/python - print('hello world!') - """ - ), - 'script.sh': DALS( - """ - #/bin/sh - echo 'hello world!' - """ - ), - }, - setup_kwargs=dict( - scripts=['script.py', 'script.sh'], - ), - install_tree=flatten_tree({ - 'foo-1.0-py{py_version}.egg': { - 'EGG-INFO': [ - 'PKG-INFO', - 'RECORD', - 'WHEEL', - 'top_level.txt', - {'scripts': ['script.py', 'script.sh']}, - ] - } - }), - ) - - project_name = params.get('name', 'foo') - version = params.get('version', '1.0') - install_tree = params.get('install_tree') - file_defs = params.get('file_defs', {}) - setup_kwargs = params.get('setup_kwargs', {}) - - with ( - build_wheel( - name=project_name, - version=version, - install_requires=[], - extras_require={}, - extra_file_defs=file_defs, - **setup_kwargs, - ) as filename, - tempdir() as install_dir, - ): - _check_wheel_install( - filename, install_dir, install_tree, project_name, version, None - ) - w = Wheel(filename) - base = pathlib.Path(install_dir) / w.egg_name() - script_sh = base / "EGG-INFO" / "scripts" / "script.sh" - assert script_sh.exists() - if sys.platform != 'win32': - # Editable file mode has no effect on Windows - assert oct(stat.S_IMODE(script_sh.stat().st_mode)) == "0o777" diff --git a/voxvera/vendor/setuptools/tests/test_windows_wrappers.py b/voxvera/vendor/setuptools/tests/test_windows_wrappers.py deleted file mode 100644 index 4f990eb..0000000 --- a/voxvera/vendor/setuptools/tests/test_windows_wrappers.py +++ /dev/null @@ -1,258 +0,0 @@ -""" -Python Script Wrapper for Windows -================================= - -setuptools includes wrappers for Python scripts that allows them to be -executed like regular windows programs. There are 2 wrappers, one -for command-line programs, cli.exe, and one for graphical programs, -gui.exe. These programs are almost identical, function pretty much -the same way, and are generated from the same source file. The -wrapper programs are used by copying them to the directory containing -the script they are to wrap and with the same name as the script they -are to wrap. -""" - -import pathlib -import platform -import subprocess -import sys -import textwrap - -import pytest - -from setuptools._importlib import resources - -pytestmark = pytest.mark.skipif(sys.platform != 'win32', reason="Windows only") - - -class WrapperTester: - @classmethod - def prep_script(cls, template): - python_exe = subprocess.list2cmdline([sys.executable]) - return template % locals() - - @classmethod - def create_script(cls, tmpdir): - """ - Create a simple script, foo-script.py - - Note that the script starts with a Unix-style '#!' line saying which - Python executable to run. The wrapper will use this line to find the - correct Python executable. - """ - - script = cls.prep_script(cls.script_tmpl) - - with (tmpdir / cls.script_name).open('w') as f: - f.write(script) - - # also copy cli.exe to the sample directory - with (tmpdir / cls.wrapper_name).open('wb') as f: - w = resources.files('setuptools').joinpath(cls.wrapper_source).read_bytes() - f.write(w) - - -def win_launcher_exe(prefix): - """A simple routine to select launcher script based on platform.""" - assert prefix in ('cli', 'gui') - if platform.machine() == "ARM64": - return f"{prefix}-arm64.exe" - else: - return f"{prefix}-32.exe" - - -class TestCLI(WrapperTester): - script_name = 'foo-script.py' - wrapper_name = 'foo.exe' - wrapper_source = win_launcher_exe('cli') - - script_tmpl = textwrap.dedent( - """ - #!%(python_exe)s - import sys - input = repr(sys.stdin.read()) - print(sys.argv[0][-14:]) - print(sys.argv[1:]) - print(input) - if __debug__: - print('non-optimized') - """ - ).lstrip() - - def test_basic(self, tmpdir): - """ - When the copy of cli.exe, foo.exe in this example, runs, it examines - the path name it was run with and computes a Python script path name - by removing the '.exe' suffix and adding the '-script.py' suffix. (For - GUI programs, the suffix '-script.pyw' is added.) This is why we - named out script the way we did. Now we can run out script by running - the wrapper: - - This example was a little pathological in that it exercised windows - (MS C runtime) quoting rules: - - - Strings containing spaces are surrounded by double quotes. - - - Double quotes in strings need to be escaped by preceding them with - back slashes. - - - One or more backslashes preceding double quotes need to be escaped - by preceding each of them with back slashes. - """ - self.create_script(tmpdir) - cmd = [ - str(tmpdir / 'foo.exe'), - 'arg1', - 'arg 2', - 'arg "2\\"', - 'arg 4\\', - 'arg5 a\\\\b', - ] - proc = subprocess.Popen( - cmd, - stdout=subprocess.PIPE, - stdin=subprocess.PIPE, - text=True, - encoding="utf-8", - ) - stdout, _stderr = proc.communicate('hello\nworld\n') - actual = stdout.replace('\r\n', '\n') - expected = textwrap.dedent( - r""" - \foo-script.py - ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] - 'hello\nworld\n' - non-optimized - """ - ).lstrip() - assert actual == expected - - def test_symlink(self, tmpdir): - """ - Ensure that symlink for the foo.exe is working correctly. - """ - script_dir = tmpdir / "script_dir" - script_dir.mkdir() - self.create_script(script_dir) - symlink = pathlib.Path(tmpdir / "foo.exe") - symlink.symlink_to(script_dir / "foo.exe") - - cmd = [ - str(tmpdir / 'foo.exe'), - 'arg1', - 'arg 2', - 'arg "2\\"', - 'arg 4\\', - 'arg5 a\\\\b', - ] - proc = subprocess.Popen( - cmd, - stdout=subprocess.PIPE, - stdin=subprocess.PIPE, - text=True, - encoding="utf-8", - ) - stdout, _stderr = proc.communicate('hello\nworld\n') - actual = stdout.replace('\r\n', '\n') - expected = textwrap.dedent( - r""" - \foo-script.py - ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] - 'hello\nworld\n' - non-optimized - """ - ).lstrip() - assert actual == expected - - def test_with_options(self, tmpdir): - """ - Specifying Python Command-line Options - -------------------------------------- - - You can specify a single argument on the '#!' line. This can be used - to specify Python options like -O, to run in optimized mode or -i - to start the interactive interpreter. You can combine multiple - options as usual. For example, to run in optimized mode and - enter the interpreter after running the script, you could use -Oi: - """ - self.create_script(tmpdir) - tmpl = textwrap.dedent( - """ - #!%(python_exe)s -Oi - import sys - input = repr(sys.stdin.read()) - print(sys.argv[0][-14:]) - print(sys.argv[1:]) - print(input) - if __debug__: - print('non-optimized') - sys.ps1 = '---' - """ - ).lstrip() - with (tmpdir / 'foo-script.py').open('w') as f: - f.write(self.prep_script(tmpl)) - cmd = [str(tmpdir / 'foo.exe')] - proc = subprocess.Popen( - cmd, - stdout=subprocess.PIPE, - stdin=subprocess.PIPE, - stderr=subprocess.STDOUT, - text=True, - encoding="utf-8", - ) - stdout, _stderr = proc.communicate() - actual = stdout.replace('\r\n', '\n') - expected = textwrap.dedent( - r""" - \foo-script.py - [] - '' - --- - """ - ).lstrip() - assert actual == expected - - -class TestGUI(WrapperTester): - """ - Testing the GUI Version - ----------------------- - """ - - script_name = 'bar-script.pyw' - wrapper_source = win_launcher_exe('gui') - wrapper_name = 'bar.exe' - - script_tmpl = textwrap.dedent( - """ - #!%(python_exe)s - import sys - f = open(sys.argv[1], 'wb') - bytes_written = f.write(repr(sys.argv[2]).encode('utf-8')) - f.close() - """ - ).strip() - - def test_basic(self, tmpdir): - """Test the GUI version with the simple script, bar-script.py""" - self.create_script(tmpdir) - - cmd = [ - str(tmpdir / 'bar.exe'), - str(tmpdir / 'test_output.txt'), - 'Test Argument', - ] - proc = subprocess.Popen( - cmd, - stdout=subprocess.PIPE, - stdin=subprocess.PIPE, - stderr=subprocess.STDOUT, - text=True, - encoding="utf-8", - ) - stdout, stderr = proc.communicate() - assert not stdout - assert not stderr - with (tmpdir / 'test_output.txt').open('rb') as f_out: - actual = f_out.read().decode('ascii') - assert actual == repr('Test Argument') diff --git a/voxvera/vendor/setuptools/tests/text.py b/voxvera/vendor/setuptools/tests/text.py deleted file mode 100644 index e05cc63..0000000 --- a/voxvera/vendor/setuptools/tests/text.py +++ /dev/null @@ -1,4 +0,0 @@ -class Filenames: - unicode = 'smörbröd.py' - latin_1 = unicode.encode('latin-1') - utf_8 = unicode.encode('utf-8') diff --git a/voxvera/vendor/setuptools/tests/textwrap.py b/voxvera/vendor/setuptools/tests/textwrap.py deleted file mode 100644 index 5e39618..0000000 --- a/voxvera/vendor/setuptools/tests/textwrap.py +++ /dev/null @@ -1,6 +0,0 @@ -import textwrap - - -def DALS(s): - "dedent and left-strip" - return textwrap.dedent(s).lstrip() diff --git a/voxvera/vendor/setuptools/unicode_utils.py b/voxvera/vendor/setuptools/unicode_utils.py deleted file mode 100644 index f502f5b..0000000 --- a/voxvera/vendor/setuptools/unicode_utils.py +++ /dev/null @@ -1,102 +0,0 @@ -import sys -import unicodedata -from configparser import RawConfigParser - -from .compat import py39 -from .warnings import SetuptoolsDeprecationWarning - - -# HFS Plus uses decomposed UTF-8 -def decompose(path): - if isinstance(path, str): - return unicodedata.normalize('NFD', path) - try: - path = path.decode('utf-8') - path = unicodedata.normalize('NFD', path) - path = path.encode('utf-8') - except UnicodeError: - pass # Not UTF-8 - return path - - -def filesys_decode(path): - """ - Ensure that the given path is decoded, - ``None`` when no expected encoding works - """ - - if isinstance(path, str): - return path - - fs_enc = sys.getfilesystemencoding() or 'utf-8' - candidates = fs_enc, 'utf-8' - - for enc in candidates: - try: - return path.decode(enc) - except UnicodeDecodeError: - continue - - return None - - -def try_encode(string, enc): - "turn unicode encoding into a functional routine" - try: - return string.encode(enc) - except UnicodeEncodeError: - return None - - -def _read_utf8_with_fallback(file: str, fallback_encoding=py39.LOCALE_ENCODING) -> str: - """ - First try to read the file with UTF-8, if there is an error fallback to a - different encoding ("locale" by default). Returns the content of the file. - Also useful when reading files that might have been produced by an older version of - setuptools. - """ - try: - with open(file, "r", encoding="utf-8") as f: - return f.read() - except UnicodeDecodeError: # pragma: no cover - _Utf8EncodingNeeded.emit(file=file, fallback_encoding=fallback_encoding) - with open(file, "r", encoding=fallback_encoding) as f: - return f.read() - - -def _cfg_read_utf8_with_fallback( - cfg: RawConfigParser, file: str, fallback_encoding=py39.LOCALE_ENCODING -) -> None: - """Same idea as :func:`_read_utf8_with_fallback`, but for the - :meth:`RawConfigParser.read` method. - - This method may call ``cfg.clear()``. - """ - try: - cfg.read(file, encoding="utf-8") - except UnicodeDecodeError: # pragma: no cover - _Utf8EncodingNeeded.emit(file=file, fallback_encoding=fallback_encoding) - cfg.clear() - cfg.read(file, encoding=fallback_encoding) - - -class _Utf8EncodingNeeded(SetuptoolsDeprecationWarning): - _SUMMARY = """ - `encoding="utf-8"` fails with {file!r}, trying `encoding={fallback_encoding!r}`. - """ - - _DETAILS = """ - Fallback behavior for UTF-8 is considered **deprecated** and future versions of - `setuptools` may not implement it. - - Please encode {file!r} with "utf-8" to ensure future builds will succeed. - - If this file was produced by `setuptools` itself, cleaning up the cached files - and re-building/re-installing the package with a newer version of `setuptools` - (e.g. by updating `build-system.requires` in its `pyproject.toml`) - might solve the problem. - """ - # TODO: Add a deadline? - # Will we be able to remove this? - # The question comes to mind mainly because of sdists that have been produced - # by old versions of setuptools and published to PyPI... diff --git a/voxvera/vendor/setuptools/version.py b/voxvera/vendor/setuptools/version.py deleted file mode 100644 index ec253c4..0000000 --- a/voxvera/vendor/setuptools/version.py +++ /dev/null @@ -1,6 +0,0 @@ -from ._importlib import metadata - -try: - __version__ = metadata.version('setuptools') or '0.dev0+unknown' -except Exception: - __version__ = '0.dev0+unknown' diff --git a/voxvera/vendor/setuptools/warnings.py b/voxvera/vendor/setuptools/warnings.py deleted file mode 100644 index 9646778..0000000 --- a/voxvera/vendor/setuptools/warnings.py +++ /dev/null @@ -1,110 +0,0 @@ -"""Provide basic warnings used by setuptools modules. - -Using custom classes (other than ``UserWarning``) allow users to set -``PYTHONWARNINGS`` filters to run tests and prepare for upcoming changes in -setuptools. -""" - -from __future__ import annotations - -import os -import warnings -from datetime import date -from inspect import cleandoc -from textwrap import indent -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from typing_extensions import TypeAlias - -_DueDate: TypeAlias = tuple[int, int, int] # time tuple -_INDENT = 8 * " " -_TEMPLATE = f"""{80 * '*'}\n{{details}}\n{80 * '*'}""" - - -class SetuptoolsWarning(UserWarning): - """Base class in ``setuptools`` warning hierarchy.""" - - @classmethod - def emit( - cls, - summary: str | None = None, - details: str | None = None, - due_date: _DueDate | None = None, - see_docs: str | None = None, - see_url: str | None = None, - stacklevel: int = 2, - **kwargs, - ) -> None: - """Private: reserved for ``setuptools`` internal use only""" - # Default values: - summary_ = summary or getattr(cls, "_SUMMARY", None) or "" - details_ = details or getattr(cls, "_DETAILS", None) or "" - due_date = due_date or getattr(cls, "_DUE_DATE", None) - docs_ref = see_docs or getattr(cls, "_SEE_DOCS", None) - docs_url = docs_ref and f"https://setuptools.pypa.io/en/latest/{docs_ref}" - see_url = see_url or getattr(cls, "_SEE_URL", None) - due = date(*due_date) if due_date else None - - text = cls._format(summary_, details_, due, see_url or docs_url, kwargs) - if due and due < date.today() and _should_enforce(): - raise cls(text) - warnings.warn(text, cls, stacklevel=stacklevel + 1) - - @classmethod - def _format( - cls, - summary: str, - details: str, - due_date: date | None = None, - see_url: str | None = None, - format_args: dict | None = None, - ) -> str: - """Private: reserved for ``setuptools`` internal use only""" - today = date.today() - summary = cleandoc(summary).format_map(format_args or {}) - possible_parts = [ - cleandoc(details).format_map(format_args or {}), - ( - f"\nBy {due_date:%Y-%b-%d}, you need to update your project and remove " - "deprecated calls\nor your builds will no longer be supported." - if due_date and due_date > today - else None - ), - ( - "\nThis deprecation is overdue, please update your project and remove " - "deprecated\ncalls to avoid build errors in the future." - if due_date and due_date < today - else None - ), - (f"\nSee {see_url} for details." if see_url else None), - ] - parts = [x for x in possible_parts if x] - if parts: - body = indent(_TEMPLATE.format(details="\n".join(parts)), _INDENT) - return "\n".join([summary, "!!\n", body, "\n!!"]) - return summary - - -class InformationOnly(SetuptoolsWarning): - """Currently there is no clear way of displaying messages to the users - that use the setuptools backend directly via ``pip``. - The only thing that might work is a warning, although it is not the - most appropriate tool for the job... - - See pypa/packaging-problems#558. - """ - - -class SetuptoolsDeprecationWarning(SetuptoolsWarning): - """ - Base class for warning deprecations in ``setuptools`` - - This class is not derived from ``DeprecationWarning``, and as such is - visible by default. - """ - - -def _should_enforce(): - enforce = os.getenv("SETUPTOOLS_ENFORCE_DEPRECATION", "false").lower() - return enforce in ("true", "on", "ok", "1") diff --git a/voxvera/vendor/setuptools/wheel.py b/voxvera/vendor/setuptools/wheel.py deleted file mode 100644 index 9366303..0000000 --- a/voxvera/vendor/setuptools/wheel.py +++ /dev/null @@ -1,262 +0,0 @@ -"""Wheels support.""" - -import contextlib -import email -import functools -import itertools -import os -import posixpath -import re -import zipfile -from collections.abc import Iterator - -from packaging.requirements import Requirement -from packaging.tags import sys_tags -from packaging.utils import canonicalize_name -from packaging.version import Version as parse_version - -import setuptools -from setuptools.archive_util import _unpack_zipfile_obj -from setuptools.command.egg_info import _egg_basename, write_requirements - -from ._discovery import extras_from_deps -from ._importlib import metadata -from .unicode_utils import _read_utf8_with_fallback - -from distutils.util import get_platform - -WHEEL_NAME = re.compile( - r"""^(?P.+?)-(?P\d.*?) - ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) - )\.whl$""", - re.VERBOSE, -).match - -NAMESPACE_PACKAGE_INIT = "__import__('pkg_resources').declare_namespace(__name__)\n" - - -@functools.cache -def _get_supported_tags(): - # We calculate the supported tags only once, otherwise calling - # this method on thousands of wheels takes seconds instead of - # milliseconds. - return {(t.interpreter, t.abi, t.platform) for t in sys_tags()} - - -def unpack(src_dir, dst_dir) -> None: - """Move everything under `src_dir` to `dst_dir`, and delete the former.""" - for dirpath, dirnames, filenames in os.walk(src_dir): - subdir = os.path.relpath(dirpath, src_dir) - for f in filenames: - src = os.path.join(dirpath, f) - dst = os.path.join(dst_dir, subdir, f) - os.renames(src, dst) - for n, d in reversed(list(enumerate(dirnames))): - src = os.path.join(dirpath, d) - dst = os.path.join(dst_dir, subdir, d) - if not os.path.exists(dst): - # Directory does not exist in destination, - # rename it and prune it from os.walk list. - os.renames(src, dst) - del dirnames[n] - # Cleanup. - for dirpath, dirnames, filenames in os.walk(src_dir, topdown=True): - assert not filenames - os.rmdir(dirpath) - - -@contextlib.contextmanager -def disable_info_traces() -> Iterator[None]: - """ - Temporarily disable info traces. - """ - from distutils import log - - saved = log.set_threshold(log.WARN) - try: - yield - finally: - log.set_threshold(saved) - - -class Wheel: - def __init__(self, filename) -> None: - match = WHEEL_NAME(os.path.basename(filename)) - if match is None: - raise ValueError(f'invalid wheel name: {filename!r}') - self.filename = filename - for k, v in match.groupdict().items(): - setattr(self, k, v) - - def tags(self): - """List tags (py_version, abi, platform) supported by this wheel.""" - return itertools.product( - self.py_version.split('.'), - self.abi.split('.'), - self.platform.split('.'), - ) - - def is_compatible(self): - """Is the wheel compatible with the current platform?""" - return next((True for t in self.tags() if t in _get_supported_tags()), False) - - def egg_name(self): - return ( - _egg_basename( - self.project_name, - self.version, - platform=(None if self.platform == 'any' else get_platform()), - ) - + ".egg" - ) - - def get_dist_info(self, zf): - # find the correct name of the .dist-info dir in the wheel file - for member in zf.namelist(): - dirname = posixpath.dirname(member) - if dirname.endswith('.dist-info') and canonicalize_name(dirname).startswith( - canonicalize_name(self.project_name) - ): - return dirname - raise ValueError("unsupported wheel format. .dist-info not found") - - def install_as_egg(self, destination_eggdir) -> None: - """Install wheel as an egg directory.""" - with zipfile.ZipFile(self.filename) as zf: - self._install_as_egg(destination_eggdir, zf) - - def _install_as_egg(self, destination_eggdir, zf): - dist_basename = f'{self.project_name}-{self.version}' - dist_info = self.get_dist_info(zf) - dist_data = f'{dist_basename}.data' - egg_info = os.path.join(destination_eggdir, 'EGG-INFO') - - self._convert_metadata(zf, destination_eggdir, dist_info, egg_info) - self._move_data_entries(destination_eggdir, dist_data) - self._fix_namespace_packages(egg_info, destination_eggdir) - - @staticmethod - def _convert_metadata(zf, destination_eggdir, dist_info, egg_info): - def get_metadata(name): - with zf.open(posixpath.join(dist_info, name)) as fp: - value = fp.read().decode('utf-8') - return email.parser.Parser().parsestr(value) - - wheel_metadata = get_metadata('WHEEL') - # Check wheel format version is supported. - wheel_version = parse_version(wheel_metadata.get('Wheel-Version')) - wheel_v1 = parse_version('1.0') <= wheel_version < parse_version('2.0dev0') - if not wheel_v1: - raise ValueError(f'unsupported wheel format version: {wheel_version}') - # Extract to target directory. - _unpack_zipfile_obj(zf, destination_eggdir) - dist_info = os.path.join(destination_eggdir, dist_info) - install_requires, extras_require = Wheel._convert_requires( - destination_eggdir, dist_info - ) - os.rename(dist_info, egg_info) - os.rename( - os.path.join(egg_info, 'METADATA'), - os.path.join(egg_info, 'PKG-INFO'), - ) - setup_dist = setuptools.Distribution( - attrs=dict( - install_requires=install_requires, - extras_require=extras_require, - ), - ) - with disable_info_traces(): - write_requirements( - setup_dist.get_command_obj('egg_info'), - None, - os.path.join(egg_info, 'requires.txt'), - ) - - @staticmethod - def _convert_requires(destination_eggdir, dist_info): - md = metadata.Distribution.at(dist_info).metadata - deps = md.get_all('Requires-Dist') or [] - reqs = list(map(Requirement, deps)) - - extras = extras_from_deps(deps) - - # Note: Evaluate and strip markers now, - # as it's difficult to convert back from the syntax: - # foobar; "linux" in sys_platform and extra == 'test' - def raw_req(req): - req = Requirement(str(req)) - req.marker = None - return str(req) - - def eval(req, **env): - return not req.marker or req.marker.evaluate(env) - - def for_extra(req): - try: - markers = req.marker._markers - except AttributeError: - markers = () - return set( - marker[2].value - for marker in markers - if isinstance(marker, tuple) and marker[0].value == 'extra' - ) - - install_requires = list( - map(raw_req, filter(eval, itertools.filterfalse(for_extra, reqs))) - ) - extras_require = { - extra: list( - map( - raw_req, - (req for req in reqs if for_extra(req) and eval(req, extra=extra)), - ) - ) - for extra in extras - } - return install_requires, extras_require - - @staticmethod - def _move_data_entries(destination_eggdir, dist_data): - """Move data entries to their correct location.""" - dist_data = os.path.join(destination_eggdir, dist_data) - dist_data_scripts = os.path.join(dist_data, 'scripts') - if os.path.exists(dist_data_scripts): - egg_info_scripts = os.path.join(destination_eggdir, 'EGG-INFO', 'scripts') - os.mkdir(egg_info_scripts) - for entry in os.listdir(dist_data_scripts): - # Remove bytecode, as it's not properly handled - # during easy_install scripts install phase. - if entry.endswith('.pyc'): - os.unlink(os.path.join(dist_data_scripts, entry)) - else: - os.rename( - os.path.join(dist_data_scripts, entry), - os.path.join(egg_info_scripts, entry), - ) - os.rmdir(dist_data_scripts) - for subdir in filter( - os.path.exists, - ( - os.path.join(dist_data, d) - for d in ('data', 'headers', 'purelib', 'platlib') - ), - ): - unpack(subdir, destination_eggdir) - if os.path.exists(dist_data): - os.rmdir(dist_data) - - @staticmethod - def _fix_namespace_packages(egg_info, destination_eggdir): - namespace_packages = os.path.join(egg_info, 'namespace_packages.txt') - if os.path.exists(namespace_packages): - namespace_packages = _read_utf8_with_fallback(namespace_packages).split() - - for mod in namespace_packages: - mod_dir = os.path.join(destination_eggdir, *mod.split('.')) - mod_init = os.path.join(mod_dir, '__init__.py') - if not os.path.exists(mod_dir): - os.mkdir(mod_dir) - if not os.path.exists(mod_init): - with open(mod_init, 'w', encoding="utf-8") as fp: - fp.write(NAMESPACE_PACKAGE_INIT) diff --git a/voxvera/vendor/setuptools/windows_support.py b/voxvera/vendor/setuptools/windows_support.py deleted file mode 100644 index 7a2b53a..0000000 --- a/voxvera/vendor/setuptools/windows_support.py +++ /dev/null @@ -1,30 +0,0 @@ -import platform - - -def windows_only(func): - if platform.system() != 'Windows': - return lambda *args, **kwargs: None - return func - - -@windows_only -def hide_file(path: str) -> None: - """ - Set the hidden attribute on a file or directory. - - From https://stackoverflow.com/questions/19622133/ - - `path` must be text. - """ - import ctypes - import ctypes.wintypes - - SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW - SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD - SetFileAttributes.restype = ctypes.wintypes.BOOL - - FILE_ATTRIBUTE_HIDDEN = 0x02 - - ret = SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN) - if not ret: - raise ctypes.WinError() diff --git a/voxvera/vendor/wcwidth-0.6.0.dist-info/INSTALLER b/voxvera/vendor/wcwidth-0.6.0.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/voxvera/vendor/wcwidth-0.6.0.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/voxvera/vendor/wcwidth-0.6.0.dist-info/METADATA b/voxvera/vendor/wcwidth-0.6.0.dist-info/METADATA deleted file mode 100644 index f6f0235..0000000 --- a/voxvera/vendor/wcwidth-0.6.0.dist-info/METADATA +++ /dev/null @@ -1,776 +0,0 @@ -Metadata-Version: 2.4 -Name: wcwidth -Version: 0.6.0 -Summary: Measures the displayed width of unicode strings in a terminal -Project-URL: Homepage, https://github.com/jquast/wcwidth -Author-email: Jeff Quast -License-Expression: MIT -License-File: LICENSE -Keywords: cjk,combining,console,eastasian,emoji,emulator,terminal,unicode,wcswidth,wcwidth,xterm -Classifier: Development Status :: 5 - Production/Stable -Classifier: Environment :: Console -Classifier: Intended Audience :: Developers -Classifier: Natural Language :: English -Classifier: Operating System :: POSIX -Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: 3.13 -Classifier: Programming Language :: Python :: 3.14 -Classifier: Topic :: Software Development :: Internationalization -Classifier: Topic :: Software Development :: Libraries -Classifier: Topic :: Software Development :: Localization -Classifier: Topic :: Terminals -Classifier: Typing :: Typed -Requires-Python: >=3.8 -Description-Content-Type: text/x-rst - -|pypi_downloads| |codecov| |license| - -============ -Introduction -============ - -This library is mainly for CLI/TUI programs that carefully produce output for Terminals. - -Installation ------------- - -The stable version of this package is maintained on pypi, install or upgrade, using pip:: - - pip install --upgrade wcwidth - -Problem -------- - -All Python string-formatting functions, `textwrap.wrap()`_, `str.ljust()`_, `str.rjust()`_, and -`str.center()`_ **incorrectly** measure the displayed width of a string as equal to the number of -their codepoints. - -Some examples of **incorrect results**: - -.. code-block:: python - - >>> # result consumes 16 total cells, 11 expected, - >>> 'コンニチハ'.rjust(11, 'X') - 'XXXXXXコンニチハ' - - >>> # result consumes 5 total cells, 6 expected, - >>> 'café'.center(6, 'X') - 'caféX' - -Solution --------- - -The lowest-level functions in this library are the POSIX.1-2001 and POSIX.1-2008 `wcwidth(3)`_ and -`wcswidth(3)`_, which this library precisely copies by interface as `wcwidth()`_ and `wcswidth()`_. -These functions return -1 when C0 and C1 control codes are present. - -An easy-to-use `width()`_ function is provided as a wrapper of `wcswidth()`_ that is also capable of -measuring most terminal control codes and sequences, like colors, bold, tabstops, and horizontal -cursor movement. - -Text-justification is solved by the grapheme and sequence-aware functions `ljust()`_, -`rjust()`_, `center()`_, and `wrap()`_, serving as drop-in replacements to python standard functions -of the same names. - -The iterator functions `iter_graphemes()`_ and `iter_sequences()`_ allow for careful navigation of -grapheme and terminal control sequence boundaries. `iter_graphemes_reverse()`_, and -`grapheme_boundary_before()`_ are useful for editing and searching of complex unicode. The -`clip()`_ function extracts substrings by display column positions, and `strip_sequences()`_ removes -terminal escape sequences from text altogether. - -Discrepancies -------------- - -You may find that support *varies* for complex unicode sequences or codepoints. - -A companion utility, `jquast/ucs-detect`_ was authored to gather and publish the results of Wide -character, language/grapheme clustering and complex script support, emojis and zero-width joiner, -variations, and regional indicator (flags) as a `General Tabulated Summary`_ by terminal emulator -software and version. - -======== -Overview -======== - -wcwidth() ---------- - -Use function ``wcwidth()`` to determine the length of a *single unicode -codepoint*. - -A brief overview, through examples, for all of the public API functions. - -Full API Documentation at https://wcwidth.readthedocs.io/en/latest/api.html - -wcwidth() ---------- - -Measures width of a single codepoint, - -.. code-block:: python - - >>> # '♀' narrow emoji - >>> wcwidth.wcwidth('\u2640') - 1 - -Use function `wcwidth()`_ to determine the length of a *single unicode character*. - -See specification_ of character measurements. Note that ``-1`` is returned for control codes. - -wcswidth() ----------- - -Measures width of a string, returns -1 for control codes. - -.. code-block:: python - - >>> # '♀️' emoji w/vs-16 - >>> wcwidth.wcswidth('\u2640\ufe0f') - 2 - -Use function `wcswidth()`_ to determine the length of many, a *string of unicode characters*. - -See specification_ of character measurements. Note that ``-1`` is returned if control codes occurs -anywhere in the string. - -width() -------- - -Use function `width()`_ to measure a string with improved handling of ``control_codes``. - -.. code-block:: python - - >>> # same support as wcswidth(), eg. regional indicator flag: - >>> wcwidth.width('\U0001F1FF\U0001F1FC') - 2 - >>> # but also supports SGR colored text, 'WARN', followed by SGR reset - >>> wcwidth.width('\x1b[38;2;255;150;100mWARN\x1b[0m') - 4 - >>> # tabs, - >>> wcwidth.width('\t', tabsize=4) - 4 - >>> # or, tab and all other control characters can be ignored - >>> wcwidth.width('\t', control_codes='ignore') - 0 - >>> # "vertical" control characters are ignored - >>> wcwidth.width('\n') - 0 - >>> # as well as sequences with "indeterminate" effects like Home + Clear - >>> wcwidth.width('\x1b[H\x1b[2J') - 0 - >>> # or, raise ValueError for "indeterminate" effects using control_codes='strict' - >>> wcwidth.width('\n', control_codes='strict') - Traceback (most recent call last): - ... - ValueError: Vertical movement character 0xa at position 0 - -Use ``control_codes='ignore'`` when the input is known not to contain any control characters or -terminal sequences for slightly improved performance. Note that TAB (``'\t'``) is a control -character and is also ignored, you may want to use `str.expandtabs()`_, first. - -iter_sequences() ----------------- - -Iterates through text, segmented by terminal sequence, - -.. code-block:: python - - >>> list(wcwidth.iter_sequences('hello')) - [('hello', False)] - >>> list(wcwidth.iter_sequences('\x1b[31mred\x1b[0m')) - [('\x1b[31m', True), ('red', False), ('\x1b[0m', True)] - -Use `iter_sequences()`_ to split text into segments of plain text and escape sequences. Each tuple -contains the segment string and a boolean indicating whether it is an escape sequence (``True``) or -text (``False``). - -iter_graphemes() ----------------- - -Use `iter_graphemes()`_ to iterate over *grapheme clusters* of a string. - -.. code-block:: python - - >>> from wcwidth import iter_graphemes - >>> # ok + Regional Indicator 'Z', 'W' (Zimbabwe) - >>> list(wcwidth.iter_graphemes('ok\U0001F1FF\U0001F1FC')) - ['o', 'k', '🇿🇼'] - - >>> # cafe + combining acute accent - >>> list(wcwidth.iter_graphemes('cafe\u0301')) - ['c', 'a', 'f', 'é'] - - >>> # ok + Emoji Man + ZWJ + Woman + ZWJ + Girl - >>> list(wcwidth.iter_graphemes('ok\U0001F468\u200D\U0001F469\u200D\U0001F467')) - ['o', 'k', '👨\u200d👩\u200d👧'] - -A grapheme cluster is what a user perceives as a single character, even if it is composed of -multiple Unicode codepoints. This function implements `Unicode Standard Annex #29`_ grapheme cluster -boundary rules. - -ljust() -------- - -Use `ljust()`_ as replacement of `str.ljust()`_: - -.. code-block:: python - - >>> 'コンニチハ'.ljust(11, '*') # don't do this - 'コンニチハ******' - >>> wcwidth.ljust('コンニチハ', 11, '*') # do this! - 'コンニチハ*' - -rjust() -------- - -Use `rjust()`_ as replacement of `str.rjust()`_: - -.. code-block:: python - - >>> 'コンニチハ'.rjust(11, '*') # don't do this - '******コンニチハ' - >>> wcwidth.rjust('コンニチハ', 11, '*') # do this! - '*コンニチハ' - -center() --------- - -Use `center()`_ as replacement of `str.center()`_: - -.. code-block:: python - - >>> 'cafe\u0301'.center(6, '*') # don't do this - 'café*' - >>> wcwidth.center('cafe\u0301', 6, '*') - '*café*' # do this! - -wrap() ------- - -Use function `wrap()`_ to wrap text containing terminal sequences, Unicode grapheme -clusters, and wide characters to a given display width. - -.. code-block:: python - - >>> from wcwidth import wrap - >>> # Basic wrapping - >>> wrap('hello world', 5) - ['hello', 'world'] - - >>> # Wrapping CJK text (each character is 2 cells wide) - >>> wrap('コンニチハ', 4) - ['コン', 'ニチ', 'ハ'] - - >>> # Text with ANSI color sequences - SGR codes are propagated by default - >>> # Each line ends with reset, next line starts with restored style - >>> wrap('\x1b[1;31mhello world\x1b[0m', 5) - ['\x1b[1;31mhello\x1b[0m', '\x1b[1;31mworld\x1b[0m'] - -clip() ------- - -Use `clip()`_ to extract a substring by column positions, preserving terminal sequences. - -.. code-block:: python - - >>> from wcwidth import clip - >>> # Wide characters split to Narrow boundaries using fillchar=' ' - >>> clip('中文字', 0, 3) - '中 ' - >>> clip('中文字', 1, 5, fillchar='.') - '.文.' - - >>> # SGR codes are propagated by default - result begins with active style - >>> # and ends with reset if styles are active - >>> clip('\x1b[1;31mHello world\x1b[0m', 6, 11) - '\x1b[1;31mworld\x1b[0m' - - >>> # Disable SGR propagation to preserve original sequences as-is - >>> clip('\x1b[31m中文\x1b[0m', 0, 3, propagate_sgr=False) - '\x1b[31m中 \x1b[0m' - -strip_sequences() ------------------ - -Use `strip_sequences()`_ to remove all terminal escape sequences from text. - -.. code-block:: python - - >>> from wcwidth import strip_sequences - >>> strip_sequences('\x1b[31mred\x1b[0m') - 'red' - -.. _ambiguous_width: - -ambiguous_width ---------------- - -Some Unicode characters have "East Asian Ambiguous" (A) width. These characters display as 1 cell by -default, matching Western terminal contexts, but many CJK (Chinese, Japanese, Korean) environments -may have a preference for 2 cells. This is often found as boolean option, "Ambiguous width as wide" -in Terminal Emulator software preferences. - -By default, wcwidth treats ambiguous characters as narrow (width 1). For CJK environments where your -terminal is configured to display ambiguous characters as double-width, pass ``ambiguous_width=2``: - -.. code-block:: python - - >>> # CIRCLED DIGIT ONE - ambiguous width - >>> wcwidth.width('\u2460') - 1 - >>> wcwidth.width('\u2460', ambiguous_width=2) - 2 - -The ``ambiguous_width`` parameter is available on all width-measuring functions: `wcwidth()`_, -`wcswidth()`_, `width()`_, `ljust()`_, `rjust()`_, `center()`_, `wrap()`_, and `clip()`_. - -**Terminal Detection** - -The most reliable method to detect whether a terminal profile is set for "Ambiguous width as wide" -mode is to display an ambiguous character surrounded by a pair of Cursor Position Report (CPR) -queries with a terminal in cooked or raw mode, and to parse the responses for their ``(y, x)`` -locations and measure the difference ``x``. - -This code should also be careful check whether it is attached to a terminal and be careful of -possible timeout, slow network, or non-response when working with "dumb terminals" like a CI build. - -`jquast/blessed`_ library provides such a helping `Terminal.detect_ambiguous_width()`_ method: - -.. code-block:: python - - >>> import blessed, functools - >>> # Detect terminal ambiguous width as wide (2) or narrow (1) - >>> ambiguous_width = blessed.Terminal().detect_ambiguous_width() - >>> # Define a new 'width' function with this argument - >>> awidth = functools.partial(wcwidth.width, ambiguous_width=ambiguous_width) - >>> # result depends on attached terminal mode - >>> awidth('\u2460') - 1 - -========== -Developing -========== - -Install wcwidth in editable mode:: - - pip install -e . - -Execute all code generation, autoformatters, linters and unit tests using tox:: - - tox - -Or execute individual tasks, see ``tox -lv`` for all available targets:: - - tox -e pylint,py36,py314 - -To run tests with detailed coverage reporting showing missing lines:: - - tox -epy314 -- --cov-report=term-missing - -Updating Unicode Version ------------------------- - -Regenerate python code tables from latest Unicode Specification data files:: - - tox -e update - -The script is located at ``bin/update-tables.py``, requires Python 3.9 or -later. It is recommended but not necessary to run this script with the newest -Python, because the newest Python has the latest ``unicodedata`` for generating -comments. - -Building Documentation ----------------------- - -This project is using `sphinx`_ 4.5 to build documentation:: - - tox -e sphinx - -The output will be in ``docs/_build/html/``. - -Updating Requirements ---------------------- - -This project is using `pip-tools`_ to manage requirements. - -To upgrade requirements for updating unicode version, run:: - - tox -e update_requirements_update - -To upgrade requirements for testing, run:: - - tox -e update_requirements38,update_requirements39 - -To upgrade requirements for building documentation, run:: - - tox -e update_requirements_docs - -Utilities ---------- - -Supplementary tools for browsing and testing terminals for wide unicode -characters are found in the `bin/`_ of this project's source code. Just ensure -to first ``pip install -r requirements-develop.txt`` from this projects main -folder. For example, an interactive browser for testing:: - - python ./bin/wcwidth-browser.py - -==== -Uses -==== - -This library is used in: - -- `jquast/blessed`_: a thin, practical wrapper around terminal capabilities in - Python. - -- `prompt-toolkit/python-prompt-toolkit`_: a Library for building powerful - interactive command lines in Python. - -- `dbcli/pgcli`_: Postgres CLI with autocompletion and syntax highlighting. - -- `thomasballinger/curtsies`_: a Curses-like terminal wrapper with a display - based on compositing 2d arrays of text. - -- `selectel/pyte`_: Simple VTXXX-compatible linux terminal emulator. - -- `astanin/python-tabulate`_: Pretty-print tabular data in Python, a library - and a command-line utility. - -- `rspeer/python-ftfy`_: Fixes mojibake and other glitches in Unicode - text. - -- `nbedos/termtosvg`_: Terminal recorder that renders sessions as SVG - animations. - -- `peterbrittain/asciimatics`_: Package to help people create full-screen text - UIs. - -- `python-cmd2/cmd2`_: A tool for building interactive command line apps - -- `stratis-storage/stratis-cli`_: CLI for the Stratis project - -- `ihabunek/toot`_: A Mastodon CLI/TUI client - -- `saulpw/visidata`_: Terminal spreadsheet multitool for discovering and - arranging data - -- `jquast/ucs-detect`_: Utility for unicode support detection. - -=============== -Other Languages -=============== - -There are similar implementations of the `wcwidth()`_ and `wcswidth()`_ functions in other -languages. - -- `timoxley/wcwidth`_: JavaScript -- `janlelis/unicode-display_width`_: Ruby -- `alecrabbit/php-wcwidth`_: PHP -- `Text::CharWidth`_: Perl -- `bluebear94/Terminal-WCWidth`_: Perl 6 -- `mattn/go-runewidth`_: Go -- `grepsuzette/wcwidth`_: Haxe -- `aperezdc/lua-wcwidth`_: Lua -- `joachimschmidt557/zig-wcwidth`_: Zig -- `fumiyas/wcwidth-cjk`_: `LD_PRELOAD` override -- `joshuarubin/wcwidth9`_: Unicode version 9 in C -- `spectreconsole/wcwidth`_: C# - -======= -History -======= - -0.6.0 *2026-02-06* - * **New** Parameters ``expand_tabs``, ``replace_whitespace``, ``fix_sentence_endings``, - ``drop_whitespace``, ``max_lines``, and ``placeholder`` for `wrap()`_, completing stdlib - `textwrap.wrap()`_ compatibility. - -0.5.3 *2026-01-30* - * **Bugfix** Brahmic using Virama conjunct formation. `Issue #155`_, `PR #204`_. - -0.5.2 *2026-01-29* - * **Bugfix** Measurement of category ``Mc`` (`Spacing Combining Mark`_), approx. 443, has a more - nuanced specification_, and may be categorized as either zero or wide. `PR #200`_. - * **Bugfix** Measurement of "standalone" modifiers and regional indicators, `PR #202`_. - * **Updated** Data files used in some automatic tests are no longer distributed. `PR #199`_ - -0.5.1 *2026-01-27* - * **Updated** generated zero and wide code tables to length of 1 to complete the previously - announced removal of historical wide and zero tables. `PR #196`_. - -0.5.0 *2026-01-26* - * **Drop Support** of many historical versions of wide and zero unicode tables. Only the latest - Unicode version (17.0.0) is now shipped. The related ``unicode_version='auto'`` keyword of the - `wcwidth()`_ family of functions are ignored. `list_versions()`_ always returns a tuple of only - a single element of the only unicode version supported. `PR #195`_. - * **Performance** improvement of most common call without version or ambiguous_width specified by - 20%. `PR #195`_. - * **New** Function `propagate_sgr()`_ for applying SGR state propagation to a list of lines. - `PR #194`_. - * **Improved** `wrap()`_ and `clip()`_ with ``propagate_sgr=True``. `PR #194`_. - * **Bugfix** `clip()`_ zero-width characters at clipping boundaries. `PR #194`_. - * **Bugfix** OSC Hyperlinks when broken mid-text by `wrap()`_. `PR #193`_. - -0.4.0 *2026-01-25* - * **New** Functions `iter_graphemes_reverse()`_, `grapheme_boundary_before()`_. `PR #192`_. - * **Bugfix** OSC Hyperlinks should not be broken by `wrap()`_. `PR #191`_. - -0.3.5 *2026-01-24* - * **Bugfix** packaging of 0.3.4 contains a failing test. - -0.3.4 *2026-01-24* - * **Bugfix** `center()`_ should match the eccentric `parity padding`_. - of `str.center()`_. `PR #188`_. - -0.3.3 *2026-01-24* - * **Performance** improvement in `width()`_. `PR #185`_. - * **Bugfix** missing ``py.typed``, ``Typing :: Typed``. `PR #184`_. - -0.3.2 *2026-01-23* - * **Updated** type hinting for full ``mympy --strict`` compliance. `PR #183`_. - -0.3.1 *2026-01-22* - * **Performance** improvement up to 30% in `width()_`. `PR #181`_. - -0.3.0 *2026-01-21* - * **Drop Support** for Python 3.6 and 3.7. `PR #156`_. - * **New** Function `iter_graphemes()`_. `PR #165`_. - * **New** Functions `width()`_ and `iter_sequences()`_. `PR #166`_. - * **New** Functions `ljust()`_, `rjust()`_, `center()`_. `PR #168`_. - * **New** Function `wrap()`_. `PR #169`_. - * **Performance** improvement in `wcswidth()`_. `PR #171`_. - * **New** argument ``ambiguous_width`` to all functions. `PR #172`_. - * **New** Functions `clip()`_ and `strip_sequences()`_. `PR #173`_. - * **Bugfix** Characters with ``Default_Ignorable_Code_Point`` property now - return width 0. `PR #174`_. - * **Bugfix** Characters with ``Prepended_Concatenation_Mark`` property now - return width 1. `PR #175`_. - -0.2.14 *2025-09-22* - * **Drop Support** for Python 2.7 and 3.5. `PR #117`_. - * **Update** tables to include Unicode Specifications 16.0.0 and 17.0.0. - `PR #146`_. - * **Bugfix** U+00AD SOFT HYPHEN should measure as 1, versions 0.2.9 through - 0.2.13 measured as 0. `PR #149`_. - -0.2.13 *2024-01-06* - * **Bugfix** zero-width support for Hangul Jamo (Korean) - -0.2.12 *2023-11-21* - * **Bugfix** Re-release to remove `.pyi` files misplaced in wheel `Issue #101`_. - -0.2.11 *2023-11-20* - * **Updated** Include tests files in the source distribution (`PR #98`_, `PR #100`_). - -0.2.10 *2023-11-13* - * **Bugfix** accounting of some kinds of emoji sequences using U+FE0F - Variation Selector 16 (`PR #97`_). - * **Updated** specification_. - -0.2.9 *2023-10-30* - * **Bugfix** zero-width characters used in Emoji ZWJ sequences, Balinese, - Jamo, Devanagari, Tamil, Kannada and others (`PR #91`_). - * **Updated** to include specification_ of character measurements. - -0.2.8 *2023-09-30* - * Include requirements files in the source distribution (`PR #82`_). - -0.2.7 *2023-09-28* - * **Updated** tables to include Unicode Specification 15.1.0. - * Include ``bin``, ``docs``, and ``tox.ini`` in the source distribution - -0.2.6 *2023-01-14* - * **Updated** tables to include Unicode Specification 14.0.0 and 15.0.0. - * **Changed** developer tools to use pip-compile, and to use jinja2 templates - for code generation in `bin/update-tables.py` to prepare for possible - compiler optimization release. - -0.2.1 .. 0.2.5 *2020-06-23* - * **Repository** changes to update tests and packaging issues, and - begin tagging repository with matching release versions. - -0.2.0 *2020-06-01* - * **Enhancement**: Unicode version may be selected by exporting the - Environment variable ``UNICODE_VERSION``, such as ``13.0``, or ``6.3.0``. - See the `jquast/ucs-detect`_ CLI utility for automatic detection. - * **Enhancement**: - API Documentation is published to readthedocs.io. - * **Updated** tables for *all* Unicode Specifications with files - published in a programmatically consumable format, versions 4.1.0 - through 13.0 - -0.1.9 *2020-03-22* - * **Performance** optimization by `Avram Lubkin`_, `PR #35`_. - * **Updated** tables to Unicode Specification 13.0.0. - -0.1.8 *2020-01-01* - * **Updated** tables to Unicode Specification 12.0.0. (`PR #30`_). - -0.1.7 *2016-07-01* - * **Updated** tables to Unicode Specification 9.0.0. (`PR #18`_). - -0.1.6 *2016-01-08 Production/Stable* - * ``LICENSE`` file now included with distribution. - -0.1.5 *2015-09-13 Alpha* - * **Bugfix**: - Resolution of "combining_ character width" issue, most especially - those that previously returned -1 now often (correctly) return 0. - resolved by `Philip Craig`_ via `PR #11`_. - * **Deprecated**: - The module path ``wcwidth.table_comb`` is no longer available, - it has been superseded by module path ``wcwidth.table_zero``. - -0.1.4 *2014-11-20 Pre-Alpha* - * **Feature**: ``wcswidth()`` now determines printable length - for (most) combining_ characters. The developer's tool - `bin/wcwidth-browser.py`_ is improved to display combining_ - characters when provided the ``--combining`` option - (`Thomas Ballinger`_ and `Leta Montopoli`_ `PR #5`_). - * **Feature**: added static analysis (prospector_) to testing - framework. - -0.1.3 *2014-10-29 Pre-Alpha* - * **Bugfix**: 2nd parameter of wcswidth was not honored. - (`Thomas Ballinger`_, `PR #4`_). - -0.1.2 *2014-10-28 Pre-Alpha* - * **Updated** tables to Unicode Specification 7.0.0. - (`Thomas Ballinger`_, `PR #3`_). - -0.1.1 *2014-05-14 Pre-Alpha* - * Initial release to pypi, Based on Unicode Specification 6.3.0 - -This code was originally derived directly from C code of the same name, -whose latest version is available at -https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c:: - - * Markus Kuhn -- 2007-05-26 (Unicode 5.0) - * - * Permission to use, copy, modify, and distribute this software - * for any purpose and without fee is hereby granted. The author - * disclaims all warranties with regard to this software. - -.. _`Spacing Combining Mark`: https://www.unicode.org/versions/latest/ch04.pdf#G134153 -.. _`specification`: https://wcwidth.readthedocs.io/en/latest/specs.html -.. _`tox`: https://tox.wiki/en/latest/ -.. _`prospector`: https://github.com/landscapeio/prospector -.. _`combining`: https://en.wikipedia.org/wiki/Combining_character -.. _`bin/`: https://github.com/jquast/wcwidth/tree/master/bin -.. _`bin/wcwidth-browser.py`: https://github.com/jquast/wcwidth/blob/master/bin/wcwidth-browser.py -.. _`Thomas Ballinger`: https://github.com/thomasballinger -.. _`Leta Montopoli`: https://github.com/lmontopo -.. _`Philip Craig`: https://github.com/philipc -.. _`PR #3`: https://github.com/jquast/wcwidth/pull/3 -.. _`PR #4`: https://github.com/jquast/wcwidth/pull/4 -.. _`PR #5`: https://github.com/jquast/wcwidth/pull/5 -.. _`PR #11`: https://github.com/jquast/wcwidth/pull/11 -.. _`PR #18`: https://github.com/jquast/wcwidth/pull/18 -.. _`PR #30`: https://github.com/jquast/wcwidth/pull/30 -.. _`PR #35`: https://github.com/jquast/wcwidth/pull/35 -.. _`PR #82`: https://github.com/jquast/wcwidth/pull/82 -.. _`PR #91`: https://github.com/jquast/wcwidth/pull/91 -.. _`PR #97`: https://github.com/jquast/wcwidth/pull/97 -.. _`PR #98`: https://github.com/jquast/wcwidth/pull/98 -.. _`PR #100`: https://github.com/jquast/wcwidth/pull/100 -.. _`PR #117`: https://github.com/jquast/wcwidth/pull/117 -.. _`PR #146`: https://github.com/jquast/wcwidth/pull/146 -.. _`PR #149`: https://github.com/jquast/wcwidth/pull/149 -.. _`PR #156`: https://github.com/jquast/wcwidth/pull/156 -.. _`PR #165`: https://github.com/jquast/wcwidth/pull/165 -.. _`PR #166`: https://github.com/jquast/wcwidth/pull/166 -.. _`PR #168`: https://github.com/jquast/wcwidth/pull/168 -.. _`PR #169`: https://github.com/jquast/wcwidth/pull/169 -.. _`PR #171`: https://github.com/jquast/wcwidth/pull/171 -.. _`PR #172`: https://github.com/jquast/wcwidth/pull/172 -.. _`PR #173`: https://github.com/jquast/wcwidth/pull/173 -.. _`PR #174`: https://github.com/jquast/wcwidth/pull/174 -.. _`PR #175`: https://github.com/jquast/wcwidth/pull/175 -.. _`PR #181`: https://github.com/jquast/wcwidth/pull/181 -.. _`PR #183`: https://github.com/jquast/wcwidth/pull/183 -.. _`PR #184`: https://github.com/jquast/wcwidth/pull/184 -.. _`PR #185`: https://github.com/jquast/wcwidth/pull/185 -.. _`PR #188`: https://github.com/jquast/wcwidth/pull/188 -.. _`PR #191`: https://github.com/jquast/wcwidth/pull/191 -.. _`PR #192`: https://github.com/jquast/wcwidth/pull/192 -.. _`PR #193`: https://github.com/jquast/wcwidth/pull/193 -.. _`PR #194`: https://github.com/jquast/wcwidth/pull/194 -.. _`PR #195`: https://github.com/jquast/wcwidth/pull/195 -.. _`PR #196`: https://github.com/jquast/wcwidth/pull/196 -.. _`PR #199`: https://github.com/jquast/wcwidth/pull/199 -.. _`PR #200`: https://github.com/jquast/wcwidth/pull/200 -.. _`PR #202`: https://github.com/jquast/wcwidth/pull/202 -.. _`PR #204`: https://github.com/jquast/wcwidth/pull/204 -.. _`Issue #101`: https://github.com/jquast/wcwidth/issues/101 -.. _`Issue #155`: https://github.com/jquast/wcwidth/issues/155 -.. _`Issue #190`: https://github.com/jquast/wcwidth/issues/190 -.. _`jquast/blessed`: https://github.com/jquast/blessed -.. _`selectel/pyte`: https://github.com/selectel/pyte -.. _`thomasballinger/curtsies`: https://github.com/thomasballinger/curtsies -.. _`dbcli/pgcli`: https://github.com/dbcli/pgcli -.. _`prompt-toolkit/python-prompt-toolkit`: https://github.com/prompt-toolkit/python-prompt-toolkit -.. _`timoxley/wcwidth`: https://github.com/timoxley/wcwidth -.. _`wcwidth(3)`: https://man7.org/linux/man-pages/man3/wcwidth.3.html -.. _`wcswidth(3)`: https://man7.org/linux/man-pages/man3/wcswidth.3.html -.. _`astanin/python-tabulate`: https://github.com/astanin/python-tabulate -.. _`janlelis/unicode-display_width`: https://github.com/janlelis/unicode-display_width -.. _`rspeer/python-ftfy`: https://github.com/rspeer/python-ftfy -.. _`alecrabbit/php-wcwidth`: https://github.com/alecrabbit/php-wcwidth -.. _`Text::CharWidth`: https://metacpan.org/pod/Text::CharWidth -.. _`bluebear94/Terminal-WCWidth`: https://github.com/bluebear94/Terminal-WCWidth -.. _`mattn/go-runewidth`: https://github.com/mattn/go-runewidth -.. _`grepsuzette/wcwidth`: https://github.com/grepsuzette/wcwidth -.. _`jquast/ucs-detect`: https://github.com/jquast/ucs-detect -.. _`Avram Lubkin`: https://github.com/avylove -.. _`nbedos/termtosvg`: https://github.com/nbedos/termtosvg -.. _`peterbrittain/asciimatics`: https://github.com/peterbrittain/asciimatics -.. _`aperezdc/lua-wcwidth`: https://github.com/aperezdc/lua-wcwidth -.. _`joachimschmidt557/zig-wcwidth`: https://github.com/joachimschmidt557/zig-wcwidth -.. _`fumiyas/wcwidth-cjk`: https://github.com/fumiyas/wcwidth-cjk -.. _`joshuarubin/wcwidth9`: https://github.com/joshuarubin/wcwidth9 -.. _`spectreconsole/wcwidth`: https://github.com/spectreconsole/wcwidth -.. _`python-cmd2/cmd2`: https://github.com/python-cmd2/cmd2 -.. _`stratis-storage/stratis-cli`: https://github.com/stratis-storage/stratis-cli -.. _`ihabunek/toot`: https://github.com/ihabunek/toot -.. _`saulpw/visidata`: https://github.com/saulpw/visidata -.. _`pip-tools`: https://pip-tools.readthedocs.io/ -.. _`sphinx`: https://www.sphinx-doc.org/ -.. _`textwrap.wrap()`: https://docs.python.org/3/library/textwrap.html#textwrap.wrap -.. _`str.ljust()`: https://docs.python.org/3/library/stdtypes.html#str.ljust -.. _`str.rjust()`: https://docs.python.org/3/library/stdtypes.html#str.rjust -.. _`str.center()`: https://docs.python.org/3/library/stdtypes.html#str.center -.. _`str.expandtabs()`: https://docs.python.org/3/library/stdtypes.html#str.expandtabs -.. _`General Tabulated Summary`: https://ucs-detect.readthedocs.io/results.html#tabulated-results -.. _`wcwidth()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.wcwidth -.. _`wcswidth()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.wcswidth -.. _`width()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.width -.. _`iter_graphemes()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.iter_graphemes -.. _`iter_graphemes_reverse()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.iter_graphemes_reverse -.. _`grapheme_boundary_before()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.grapheme_boundary_before -.. _`ljust()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.ljust -.. _`rjust()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.rjust -.. _`center()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.center -.. _`wrap()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.wrap -.. _`clip()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.clip -.. _`strip_sequences()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.strip_sequences -.. _`propagate_sgr()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.propagate_sgr -.. _`iter_sequences()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.iter_sequences -.. _`list_versions()`: https://wcwidth.readthedocs.io/en/latest/api.html#wcwidth.list_versions -.. _`Unicode Standard Annex #29`: https://www.unicode.org/reports/tr29/ -.. _`Terminal.detect_ambiguous_width()`: https://blessed.readthedocs.io/en/latest/api/terminal.html#blessed.terminal.Terminal.detect_ambiguous_width -.. _`parity padding`: https://jazcap53.github.io/pythons-eccentric-strcenter.html -.. |pypi_downloads| image:: https://img.shields.io/pypi/dm/wcwidth.svg?logo=pypi - :alt: Downloads - :target: https://pypi.org/project/wcwidth/ -.. |codecov| image:: https://codecov.io/gh/jquast/wcwidth/branch/master/graph/badge.svg - :alt: codecov.io Code Coverage - :target: https://app.codecov.io/gh/jquast/wcwidth/ -.. |license| image:: https://img.shields.io/pypi/l/wcwidth.svg - :target: https://pypi.org/project/wcwidth/ - :alt: MIT License diff --git a/voxvera/vendor/wcwidth-0.6.0.dist-info/RECORD b/voxvera/vendor/wcwidth-0.6.0.dist-info/RECORD deleted file mode 100644 index 1b70f99..0000000 --- a/voxvera/vendor/wcwidth-0.6.0.dist-info/RECORD +++ /dev/null @@ -1,21 +0,0 @@ -wcwidth-0.6.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -wcwidth-0.6.0.dist-info/METADATA,sha256=3_N4a4-6lVqDxdMDTOApuKrCDjOJ2ttiNNJUhQDVHnI,30525 -wcwidth-0.6.0.dist-info/RECORD,, -wcwidth-0.6.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87 -wcwidth-0.6.0.dist-info/licenses/LICENSE,sha256=cLmKlaIUTrcK-AF_qMbZXOJH5AhnQ26LxknhN_4T0ho,1322 -wcwidth/__init__.py,sha256=UXJ2nUqbNHUpZvcW_pMfl7qQJr52Kww52u8LKFbJqF4,1793 -wcwidth/bisearch.py,sha256=oF4Wn7JPkkUQlFXMGMcBPDL8VCkAirjXUsGj95BTh7o,812 -wcwidth/control_codes.py,sha256=NGkPsXNA_MSNH_G1xQjvDgX4mSj-kp1TLfLP-GIUz08,1579 -wcwidth/escape_sequences.py,sha256=OmHUFj3f7UcywR0iQMmaD6x9nQXhQhY4bBDkjXdrjJQ,3097 -wcwidth/grapheme.py,sha256=O-0Fn1vZcQ77vrKBusRTCdWWnybmL2RH1QHXqfsb5O4,13382 -wcwidth/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -wcwidth/sgr_state.py,sha256=4hUWKl2znPJ13uA1OipcmmQjOO7LBR-W-6y4hPBROAs,12429 -wcwidth/table_ambiguous.py,sha256=6zyqWUQqAswfpF3JesLjrHNeQhI30pfP66GfHm-jmD8,11900 -wcwidth/table_grapheme.py,sha256=yTwC8Yr1_H0GNIhTQMaO4jl-4cc4qHPIyIkoNxh3aGk,142899 -wcwidth/table_mc.py,sha256=KCR35VpvTQ_lv6XtuhukBhdnH18-TurFUrbABDwLzYA,13993 -wcwidth/table_vs16.py,sha256=TWc_Hgen926MO-EW_nFdyAsOrXVmP09N0msHdTXibX8,6890 -wcwidth/table_wide.py,sha256=9JNk7kRfG5awpY7wLIztZddHHA9JGc6TAuxHdBZ-Zrk,8974 -wcwidth/table_zero.py,sha256=096xl4g7GJUVFHfUO0gzJxNzTtBRMgin6-Jf--2fCzM,25642 -wcwidth/textwrap.py,sha256=n1_Bgs3f7t1SMnM1GE2w40jlN01fiDJZlLQvpMZK21A,28997 -wcwidth/unicode_versions.py,sha256=U5NM8ficYOVH_I1nL6Ap0reWhozB5rLIMZ7y8XU8uFU,541 -wcwidth/wcwidth.py,sha256=o5cH_RmQQwLBexguI62HPHrT6yYtxOk5P3--jXDlelI,41127 diff --git a/voxvera/vendor/wcwidth-0.6.0.dist-info/WHEEL b/voxvera/vendor/wcwidth-0.6.0.dist-info/WHEEL deleted file mode 100644 index ae8ec1b..0000000 --- a/voxvera/vendor/wcwidth-0.6.0.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: hatchling 1.28.0 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/voxvera/vendor/wcwidth-0.6.0.dist-info/licenses/LICENSE b/voxvera/vendor/wcwidth-0.6.0.dist-info/licenses/LICENSE deleted file mode 100644 index a44c075..0000000 --- a/voxvera/vendor/wcwidth-0.6.0.dist-info/licenses/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jeff Quast - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -Markus Kuhn -- 2007-05-26 (Unicode 5.0) - -Permission to use, copy, modify, and distribute this software -for any purpose and without fee is hereby granted. The author -disclaims all warranties with regard to this software. diff --git a/voxvera/vendor/wcwidth/__init__.py b/voxvera/vendor/wcwidth/__init__.py deleted file mode 100644 index 400c8a6..0000000 --- a/voxvera/vendor/wcwidth/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ -""" -Wcwidth module. - -https://github.com/jquast/wcwidth -""" -# re-export all functions & definitions, even private ones, from top-level -# module path, to allow for 'from wcwidth import _private_func'. Of course, -# user beware that any _private functions or variables not exported by __all__ -# may disappear or change signature at any future version. - -# local -from .wcwidth import ZERO_WIDTH # noqa -from .wcwidth import (WIDE_EASTASIAN, - AMBIGUOUS_EASTASIAN, - VS16_NARROW_TO_WIDE, - clip, - ljust, - rjust, - width, - center, - wcwidth, - wcswidth, - list_versions, - iter_sequences, - strip_sequences, - _wcmatch_version, - _wcversion_value) -from .bisearch import bisearch as _bisearch -from .grapheme import grapheme_boundary_before # noqa -from .grapheme import iter_graphemes, iter_graphemes_reverse -from .textwrap import SequenceTextWrapper, wrap -from .sgr_state import propagate_sgr - -# The __all__ attribute defines the items exported from statement, -# 'from wcwidth import *', but also to say, "This is the public API". -__all__ = ('wcwidth', 'wcswidth', 'width', 'iter_sequences', 'iter_graphemes', - 'iter_graphemes_reverse', 'grapheme_boundary_before', - 'ljust', 'rjust', 'center', 'wrap', 'clip', 'strip_sequences', - 'list_versions', 'propagate_sgr') - -# Using 'hatchling', it does not seem to provide the pyproject.toml nicety, "dynamic = ['version']" -# like flit_core, maybe there is some better way but for now we have to duplicate it in both places -__version__ = '0.6.0' diff --git a/voxvera/vendor/wcwidth/bisearch.py b/voxvera/vendor/wcwidth/bisearch.py deleted file mode 100644 index becfe86..0000000 --- a/voxvera/vendor/wcwidth/bisearch.py +++ /dev/null @@ -1,29 +0,0 @@ -"""Binary search function for Unicode interval tables.""" -from __future__ import annotations - - -def bisearch(ucs: int, table: tuple[tuple[int, int], ...]) -> int: - """ - Binary search in interval table. - - :param ucs: Ordinal value of unicode character. - :param table: Tuple of starting and ending ranges of ordinal values, - in form of ``((start, end), ...)``. - :returns: 1 if ordinal value ucs is found within lookup table, else 0. - """ - lbound = 0 - ubound = len(table) - 1 - - if ucs < table[0][0] or ucs > table[ubound][1]: - return 0 - - while ubound >= lbound: - mid = (lbound + ubound) // 2 - if ucs > table[mid][1]: - lbound = mid + 1 - elif ucs < table[mid][0]: - ubound = mid - 1 - else: - return 1 - - return 0 diff --git a/voxvera/vendor/wcwidth/control_codes.py b/voxvera/vendor/wcwidth/control_codes.py deleted file mode 100644 index 3a6fff7..0000000 --- a/voxvera/vendor/wcwidth/control_codes.py +++ /dev/null @@ -1,46 +0,0 @@ -""" -Control character sets for terminal handling. - -This module provides the control character sets used by the width() function to handle terminal -control characters. -""" - -# Illegal C0/C1 control characters. -# These raise ValueError in 'strict' mode. -ILLEGAL_CTRL = frozenset( - chr(c) for c in ( - list(range(0x01, 0x07)) + # SOH, STX, ETX (^C), EOT (^D), ENQ, ACK - list(range(0x10, 0x1b)) + # DLE through SUB (^Z) - list(range(0x1c, 0x20)) + # FS, GS, RS, US - [0x7f] + # DEL - list(range(0x80, 0xa0)) # C1 control characters - ) -) - -# Vertical movement control characters. -# These raise ValueError in 'strict' mode (indeterminate horizontal position). -VERTICAL_CTRL = frozenset({ - '\x0a', # LF (line feed) - '\x0b', # VT (vertical tab) - '\x0c', # FF (form feed) -}) - -# Horizontal movement control characters. -# These affect cursor position and are tracked in 'strict' and 'parse' modes. -HORIZONTAL_CTRL = frozenset({ - '\x08', # BS (backspace) - cursor left 1 - '\x09', # HT (horizontal tab) - advance to next tab stop - '\x0d', # CR (carriage return) - cursor to column 0 -}) - -# Terminal-valid zero-width control characters. -# These are allowed in all modes (zero-width, no movement). -ZERO_WIDTH_CTRL = frozenset({ - '\x00', # NUL - '\x07', # BEL (bell) - '\x0e', # SO (shift out) - '\x0f', # SI (shift in) -}) - -# All control characters that need special handling (not regular printable). -ALL_CTRL = ILLEGAL_CTRL | VERTICAL_CTRL | HORIZONTAL_CTRL | ZERO_WIDTH_CTRL | {'\x1b'} diff --git a/voxvera/vendor/wcwidth/escape_sequences.py b/voxvera/vendor/wcwidth/escape_sequences.py deleted file mode 100644 index d4ac6cc..0000000 --- a/voxvera/vendor/wcwidth/escape_sequences.py +++ /dev/null @@ -1,69 +0,0 @@ -r""" -Terminal escape sequence patterns. - -This module provides regex patterns for matching terminal escape sequences. All patterns match -sequences that begin with ESC (``\x1b``). Before calling re.match with these patterns, callers -should first check that the character at the current position is ESC for optimal performance. -""" -# std imports -import re - -# Zero-width escape sequences (SGR, OSC, CSI, etc.). This table, like INDETERMINATE_EFFECT_SEQUENCE, -# originated from the 'blessed' library. -ZERO_WIDTH_PATTERN = re.compile( - # CSI sequences - r'\x1b\[[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e]|' - # OSC sequences - r'\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|' - # APC sequences - r'\x1b_[^\x1b\x07]*(?:\x07|\x1b\\)|' - # DCS sequences - r'\x1bP[^\x1b\x07]*(?:\x07|\x1b\\)|' - # PM sequences - r'\x1b\^[^\x1b\x07]*(?:\x07|\x1b\\)|' - # Character set designation - r'\x1b[()].|' - # Fe sequences - r'\x1b[\x40-\x5f]|' - # Fp sequences - r'\x1b[78=>g]' -) - -# Cursor right movement: CSI [n] C, parameter may be parsed by width() -CURSOR_RIGHT_SEQUENCE = re.compile(r'\x1b\[(\d*)C') - -# Cursor left movement: CSI [n] D, parameter may be parsed by width() -CURSOR_LEFT_SEQUENCE = re.compile(r'\x1b\[(\d*)D') - -# Indeterminate effect sequences - raise ValueError in 'strict' mode. The effects of these sequences -# are likely to be undesirable, moving the cursor vertically or to any unknown position, and -# otherwise not managed by the 'width' method of this library. -# -# This table was created initially with code generation by extraction of termcap library with -# techniques used at 'blessed' library runtime for 'xterm', 'alacritty', 'kitty', ghostty', -# 'screen', 'tmux', and others. Then, these common capabilities were merged into the list below. -INDETERMINATE_EFFECT_SEQUENCE = re.compile( - '|'.join(f'(?:{_pattern})' for _pattern in ( - r'\x1b\[\d+;\d+r', # change_scroll_region - r'\x1b\[\d*K', # erase_in_line (clr_eol, clr_bol) - r'\x1b\[\d*J', # erase_in_display (clr_eos, erase_display) - r'\x1b\[\d*G', # column_address - r'\x1b\[\d+;\d+H', # cursor_address - r'\x1b\[\d*H', # cursor_home - r'\x1b\[\d*A', # cursor_up - r'\x1b\[\d*B', # cursor_down - r'\x1b\[\d*P', # delete_character - r'\x1b\[\d*M', # delete_line - r'\x1b\[\d*L', # insert_line - r'\x1b\[\d*@', # insert_character - r'\x1b\[\d+X', # erase_chars - r'\x1b\[\d*S', # scroll_up (parm_index) - r'\x1b\[\d*T', # scroll_down (parm_rindex) - r'\x1b\[\d*d', # row_address - r'\x1b\[\?1049[hl]', # alternate screen buffer - r'\x1b\[\?47[hl]', # alternate screen (legacy) - r'\x1b8', # restore_cursor - r'\x1bD', # scroll_forward (index) - r'\x1bM', # scroll_reverse (reverse index) - )) -) diff --git a/voxvera/vendor/wcwidth/grapheme.py b/voxvera/vendor/wcwidth/grapheme.py deleted file mode 100644 index 7befc92..0000000 --- a/voxvera/vendor/wcwidth/grapheme.py +++ /dev/null @@ -1,428 +0,0 @@ -""" -Grapheme cluster segmentation following Unicode Standard Annex #29. - -This module provides pure-Python implementation of the grapheme cluster boundary algorithm as -defined in UAX #29: Unicode Text Segmentation. - -https://www.unicode.org/reports/tr29/ -""" - -from __future__ import annotations - -# std imports -from enum import IntEnum -from functools import lru_cache - -from typing import TYPE_CHECKING, NamedTuple - -# local -from .bisearch import bisearch as _bisearch -from .table_grapheme import (GRAPHEME_L, - GRAPHEME_T, - GRAPHEME_V, - GRAPHEME_LV, - INCB_EXTEND, - INCB_LINKER, - GRAPHEME_LVT, - INCB_CONSONANT, - GRAPHEME_EXTEND, - GRAPHEME_CONTROL, - GRAPHEME_PREPEND, - GRAPHEME_SPACINGMARK, - EXTENDED_PICTOGRAPHIC, - GRAPHEME_REGIONAL_INDICATOR) - -if TYPE_CHECKING: # pragma: no cover - # std imports - from collections.abc import Iterator - -# Maximum backward scan distance when finding grapheme cluster boundaries. -# Covers all known Unicode grapheme clusters with margin; longer sequences are pathological. -MAX_GRAPHEME_SCAN = 32 - - -class GCB(IntEnum): - """Grapheme Cluster Break property values.""" - - OTHER = 0 - CR = 1 - LF = 2 - CONTROL = 3 - EXTEND = 4 - ZWJ = 5 - REGIONAL_INDICATOR = 6 - PREPEND = 7 - SPACING_MARK = 8 - L = 9 - V = 10 - T = 11 - LV = 12 - LVT = 13 - - -# All lru_cache sizes in this file use maxsize=1024, chosen by benchmarking UDHR data (500+ -# languages) and considering typical process-long sessions: western scripts need ~64 unique -# codepoints, but CJK could reach ~2000 -- but likely not. -@lru_cache(maxsize=1024) -def _grapheme_cluster_break(ucs: int) -> GCB: - # pylint: disable=too-many-branches,too-complex - """Return the Grapheme_Cluster_Break property for a codepoint.""" - # Single codepoint matches - if ucs == 0x000d: - return GCB.CR - if ucs == 0x000a: - return GCB.LF - if ucs == 0x200d: - return GCB.ZWJ - # Matching by codepoint ranges, requiring binary search - if _bisearch(ucs, GRAPHEME_CONTROL): - return GCB.CONTROL - if _bisearch(ucs, GRAPHEME_EXTEND): - return GCB.EXTEND - if _bisearch(ucs, GRAPHEME_REGIONAL_INDICATOR): - return GCB.REGIONAL_INDICATOR - if _bisearch(ucs, GRAPHEME_PREPEND): - return GCB.PREPEND - if _bisearch(ucs, GRAPHEME_SPACINGMARK): - return GCB.SPACING_MARK - if _bisearch(ucs, GRAPHEME_L): - return GCB.L - if _bisearch(ucs, GRAPHEME_V): - return GCB.V - if _bisearch(ucs, GRAPHEME_T): - return GCB.T - if _bisearch(ucs, GRAPHEME_LV): - return GCB.LV - if _bisearch(ucs, GRAPHEME_LVT): - return GCB.LVT - return GCB.OTHER - - -@lru_cache(maxsize=1024) -def _is_extended_pictographic(ucs: int) -> bool: - """Check if codepoint has Extended_Pictographic property.""" - return bool(_bisearch(ucs, EXTENDED_PICTOGRAPHIC)) - - -@lru_cache(maxsize=1024) -def _is_incb_linker(ucs: int) -> bool: - """Check if codepoint has InCB=Linker property.""" - return bool(_bisearch(ucs, INCB_LINKER)) - - -@lru_cache(maxsize=1024) -def _is_incb_consonant(ucs: int) -> bool: - """Check if codepoint has InCB=Consonant property.""" - return bool(_bisearch(ucs, INCB_CONSONANT)) - - -@lru_cache(maxsize=1024) -def _is_incb_extend(ucs: int) -> bool: - """Check if codepoint has InCB=Extend property.""" - return bool(_bisearch(ucs, INCB_EXTEND)) - - -class BreakResult(NamedTuple): - """Result of grapheme cluster break decision.""" - - should_break: bool - ri_count: int - - -@lru_cache(maxsize=1024) -def _simple_break_check(prev_gcb: GCB, curr_gcb: GCB) -> BreakResult | None: - """ - Check simple GCB-pair-based break rules (cacheable). - - Returns BreakResult for rules that can be determined from GCB properties alone, or None if - complex lookback rules (GB9c, GB11) need to be checked. - """ - # GB3: CR x LF - if prev_gcb == GCB.CR and curr_gcb == GCB.LF: - return BreakResult(should_break=False, ri_count=0) - - # GB4: (Control|CR|LF) ÷ - if prev_gcb in (GCB.CONTROL, GCB.CR, GCB.LF): - return BreakResult(should_break=True, ri_count=0) - - # GB5: ÷ (Control|CR|LF) - if curr_gcb in (GCB.CONTROL, GCB.CR, GCB.LF): - return BreakResult(should_break=True, ri_count=0) - - # GB6: L x (L|V|LV|LVT) - if prev_gcb == GCB.L and curr_gcb in (GCB.L, GCB.V, GCB.LV, GCB.LVT): - return BreakResult(should_break=False, ri_count=0) - - # GB7: (LV|V) x (V|T) - if prev_gcb in (GCB.LV, GCB.V) and curr_gcb in (GCB.V, GCB.T): - return BreakResult(should_break=False, ri_count=0) - - # GB8: (LVT|T) x T - if prev_gcb in (GCB.LVT, GCB.T) and curr_gcb == GCB.T: - return BreakResult(should_break=False, ri_count=0) - - # GB9: x (Extend|ZWJ) - but ZWJ needs GB11 check, so only handle Extend here - if curr_gcb == GCB.EXTEND: - return BreakResult(should_break=False, ri_count=0) - - # GB9a: x SpacingMark - if curr_gcb == GCB.SPACING_MARK: - return BreakResult(should_break=False, ri_count=0) - - # GB9b: Prepend x - if prev_gcb == GCB.PREPEND: - return BreakResult(should_break=False, ri_count=0) - - # GB9c and GB11 need lookback - return None to signal complex check needed - # GB12/13 (RI pairs) need ri_count state - also handled in main function - return None - - -def _should_break( - prev_gcb: GCB, - curr_gcb: GCB, - text: str, - curr_idx: int, - ri_count: int, -) -> BreakResult: - # pylint: disable=too-many-branches,too-complex - """ - Determine if there should be a grapheme cluster break between prev and curr. - - Implements UAX #29 grapheme cluster boundary rules. - """ - # Try cached simple rules first - result = _simple_break_check(prev_gcb, curr_gcb) - if result is not None: - return result - - # GB9: x ZWJ (not cached because GB11 needs lookback when prev is ZWJ) - if curr_gcb == GCB.ZWJ: - return BreakResult(should_break=False, ri_count=0) - - # GB9c: Indic conjunct cluster - # \p{InCB=Consonant} [\p{InCB=Extend}\p{InCB=Linker}]* \p{InCB=Linker} - # [\p{InCB=Extend}\p{InCB=Linker}]* x \p{InCB=Consonant} - curr_ucs = ord(text[curr_idx]) - if _is_incb_consonant(curr_ucs): - has_linker = False - i = curr_idx - 1 - while i >= 0: - prev_ucs = ord(text[i]) - if _is_incb_linker(prev_ucs): - has_linker = True - i -= 1 - elif _is_incb_extend(prev_ucs): - i -= 1 - elif _is_incb_consonant(prev_ucs): - if has_linker: - return BreakResult(should_break=False, ri_count=0) - break - else: - break - - # GB11: ExtPict Extend* ZWJ x ExtPict - if prev_gcb == GCB.ZWJ and _is_extended_pictographic(curr_ucs): - i = curr_idx - 2 # Skip the ZWJ at curr_idx - 1 - while i >= 0: - prev_ucs = ord(text[i]) - prev_prop = _grapheme_cluster_break(prev_ucs) - if prev_prop == GCB.EXTEND: - i -= 1 - elif _is_extended_pictographic(prev_ucs): - return BreakResult(should_break=False, ri_count=0) - else: - break - - # GB12/GB13: RI x RI (pair matching) - if prev_gcb == GCB.REGIONAL_INDICATOR and curr_gcb == GCB.REGIONAL_INDICATOR: - if ri_count % 2 == 1: - return BreakResult(should_break=False, ri_count=ri_count + 1) - return BreakResult(should_break=True, ri_count=1) - - # GB999: Any ÷ Any - ri_count = 1 if curr_gcb == GCB.REGIONAL_INDICATOR else 0 - return BreakResult(should_break=True, ri_count=ri_count) - - -def iter_graphemes( - unistr: str, - start: int = 0, - end: int | None = None, -) -> Iterator[str]: - r""" - Iterate over grapheme clusters in a Unicode string. - - Grapheme clusters are "user-perceived characters" - what a user would - consider a single character, which may consist of multiple Unicode - codepoints (e.g., a base character with combining marks, emoji sequences). - - :param unistr: The Unicode string to segment. - :param start: Starting index (default 0). - :param end: Ending index (default len(unistr)). - :yields: Grapheme cluster substrings. - - Example:: - - >>> list(iter_graphemes('cafe\u0301')) - ['c', 'a', 'f', 'e\u0301'] - >>> list(iter_graphemes('\U0001F468\u200D\U0001F469\u200D\U0001F467')) - ['o', 'k', '\U0001F468\u200D\U0001F469\u200D\U0001F467'] - >>> list(iter_graphemes('\U0001F1FA\U0001F1F8')) - ['o', 'k', '\U0001F1FA\U0001F1F8'] - - .. versionadded:: 0.3.0 - """ - if not unistr: - return - - length = len(unistr) - - if end is None: - end = length - - if start >= end or start >= length: - return - - end = min(end, length) - - # Track state for grapheme cluster boundaries - cluster_start = start - ri_count = 0 - - # Get GCB for first character - prev_gcb = _grapheme_cluster_break(ord(unistr[start])) - - # Handle Regional Indicator count initialization - if prev_gcb == GCB.REGIONAL_INDICATOR: - ri_count = 1 - - for idx in range(start + 1, end): - curr_gcb = _grapheme_cluster_break(ord(unistr[idx])) - - result = _should_break(prev_gcb, curr_gcb, unistr, idx, ri_count) - ri_count = result.ri_count - - if result.should_break: - yield unistr[cluster_start:idx] - cluster_start = idx - - prev_gcb = curr_gcb - - # Yield the final cluster - yield unistr[cluster_start:end] - - -def _find_cluster_start(text: str, pos: int) -> int: - """ - Find the start of the grapheme cluster containing the character before pos. - - Scans backwards from pos to find a safe starting point, then iterates forward using standard - break rules to find the actual cluster boundary. - - :param text: The Unicode string. - :param pos: Position to search before (exclusive). - :returns: Start position of the grapheme cluster. - """ - target_cp = ord(text[pos - 1]) - - # GB3: CR x LF - LF after CR is part of same cluster - if target_cp == 0x0A and pos >= 2 and text[pos - 2] == '\r': - return pos - 2 - - # Fast path: ASCII (except LF) starts its own cluster - if target_cp < 0x80: - # GB9b: Check for preceding PREPEND (rare: Arabic/Brahmic) - if pos >= 2 and target_cp >= 0x20: - prev_cp = ord(text[pos - 2]) - if prev_cp >= 0x80 and _grapheme_cluster_break(prev_cp) == GCB.PREPEND: - return _find_cluster_start(text, pos - 1) - return pos - 1 - - # Scan backward to find a safe starting point - safe_start = pos - 1 - while safe_start > 0 and (pos - safe_start) < MAX_GRAPHEME_SCAN: - cp = ord(text[safe_start]) - if 0x20 <= cp < 0x80: # ASCII always starts a cluster - break - if _grapheme_cluster_break(cp) == GCB.CONTROL: # GB4 - break - safe_start -= 1 - - # Verify forward to find the actual cluster boundary - cluster_start = safe_start - left_gcb = _grapheme_cluster_break(ord(text[safe_start])) - ri_count = 1 if left_gcb == GCB.REGIONAL_INDICATOR else 0 - - for i in range(safe_start + 1, pos): - right_gcb = _grapheme_cluster_break(ord(text[i])) - result = _should_break(left_gcb, right_gcb, text, i, ri_count) - ri_count = result.ri_count - if result.should_break: - cluster_start = i - left_gcb = right_gcb - - return cluster_start - - -def grapheme_boundary_before(unistr: str, pos: int) -> int: - r""" - Find the grapheme cluster boundary immediately before a position. - - :param unistr: The Unicode string to search. - :param pos: Position in the string (0 < pos <= len(unistr)). - :returns: Start index of the grapheme cluster containing the character at pos-1. - - Example:: - - >>> grapheme_boundary_before('Hello \U0001F44B\U0001F3FB', 8) - 6 - >>> grapheme_boundary_before('a\r\nb', 3) - 1 - - .. versionadded:: 0.3.6 - """ - if pos <= 0: - return 0 - return _find_cluster_start(unistr, min(pos, len(unistr))) - - -def iter_graphemes_reverse( - unistr: str, - start: int = 0, - end: int | None = None, -) -> Iterator[str]: - r""" - Iterate over grapheme clusters in reverse order (last to first). - - :param unistr: The Unicode string to segment. - :param start: Starting index (default 0). - :param end: Ending index (default len(unistr)). - :yields: Grapheme cluster substrings in reverse order. - - Example:: - - >>> list(iter_graphemes_reverse('cafe\u0301')) - ['e\u0301', 'f', 'a', 'c'] - - .. versionadded:: 0.3.6 - """ - if not unistr: - return - - length = len(unistr) - - end = length if end is None else min(end, length) - start = max(start, 0) - - if start >= end or start >= length: - return - - pos = end - while pos > start: - cluster_start = _find_cluster_start(unistr, pos) - # Don't yield partial graphemes that extend before start - if cluster_start < start: - break - yield unistr[cluster_start:pos] - pos = cluster_start diff --git a/voxvera/vendor/wcwidth/py.typed b/voxvera/vendor/wcwidth/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/voxvera/vendor/wcwidth/sgr_state.py b/voxvera/vendor/wcwidth/sgr_state.py deleted file mode 100644 index b0c8648..0000000 --- a/voxvera/vendor/wcwidth/sgr_state.py +++ /dev/null @@ -1,338 +0,0 @@ -""" -SGR (Select Graphic Rendition) state tracking for terminal escape sequences. - -This module provides functions for tracking and propagating terminal styling (bold, italic, colors, -etc.) via public API propagate_sgr(), and its dependent functions, cut() and wrap(). It only has -attributes necessary to perform its functions, eg 'RED' and 'BLUE' attributes are not defined. -""" -from __future__ import annotations - -# std imports -import re -from enum import IntEnum - -from typing import TYPE_CHECKING, Iterator, NamedTuple - -if TYPE_CHECKING: # pragma: no cover - from typing import Sequence - - -class _SGR(IntEnum): - """ - SGR (Select Graphic Rendition) parameter codes. - - References: - - https://invisible-island.net/xterm/ctlseqs/ctlseqs.html - - https://github.com/tehmaze/ansi/tree/master/ansi/colour - """ - - RESET = 0 - BOLD = 1 - DIM = 2 - ITALIC = 3 - UNDERLINE = 4 - BLINK = 5 - RAPID_BLINK = 6 - INVERSE = 7 - HIDDEN = 8 - STRIKETHROUGH = 9 - DOUBLE_UNDERLINE = 21 - BOLD_DIM_OFF = 22 - ITALIC_OFF = 23 - UNDERLINE_OFF = 24 - BLINK_OFF = 25 - INVERSE_OFF = 27 - HIDDEN_OFF = 28 - STRIKETHROUGH_OFF = 29 - FG_BLACK = 30 - FG_WHITE = 37 - FG_EXTENDED = 38 - FG_DEFAULT = 39 - BG_BLACK = 40 - BG_WHITE = 47 - BG_EXTENDED = 48 - BG_DEFAULT = 49 - FG_BRIGHT_BLACK = 90 - FG_BRIGHT_WHITE = 97 - BG_BRIGHT_BLACK = 100 - BG_BRIGHT_WHITE = 107 - - -# SGR sequence pattern: CSI followed by params (digits, semicolons, colons) ending with 'm' -# Colons are used in ITU T.416 (ISO 8613-6) extended color format: 38:2::R:G:B -# This colon format is less common than semicolon (38;2;R;G;B) but supported by kitty, -# iTerm2, and newer VTE-based terminals. -_SGR_PATTERN = re.compile(r'\x1b\[([\d;:]*)m') - -# Fast path: quick check if any SGR sequence exists -_SGR_QUICK_CHECK = re.compile(r'\x1b\[[\d;:]*m') - -# Reset sequence -_SGR_RESET = '\x1b[0m' - - -class _SGRState(NamedTuple): - """ - Track active SGR terminal attributes by category (immutable). - - :param bold: Bold attribute (SGR 1). - :param dim: Dim/faint attribute (SGR 2). - :param italic: Italic attribute (SGR 3). - :param underline: Underline attribute (SGR 4). - :param blink: Slow blink attribute (SGR 5). - :param rapid_blink: Rapid blink attribute (SGR 6). - :param inverse: Inverse/reverse attribute (SGR 7). - :param hidden: Hidden/invisible attribute (SGR 8). - :param strikethrough: Strikethrough attribute (SGR 9). - :param double_underline: Double underline attribute (SGR 21). - :param foreground: Foreground color as tuple of SGR params, or None for default. - :param background: Background color as tuple of SGR params, or None for default. - """ - - bold: bool = False - dim: bool = False - italic: bool = False - underline: bool = False - blink: bool = False - rapid_blink: bool = False - inverse: bool = False - hidden: bool = False - strikethrough: bool = False - double_underline: bool = False - foreground: tuple[int, ...] | None = None - background: tuple[int, ...] | None = None - - -# Default state with no attributes set -_SGR_STATE_DEFAULT = _SGRState() - - -def _sgr_state_is_active(state: _SGRState) -> bool: - """ - Return True if any attributes are set. - - :param state: The SGR state to check. - :returns: True if any attribute differs from default. - """ - return (state.bold or state.dim or state.italic or state.underline - or state.blink or state.rapid_blink or state.inverse or state.hidden - or state.strikethrough or state.double_underline - or state.foreground is not None or state.background is not None) - - -def _sgr_state_to_sequence(state: _SGRState) -> str: - """ - Generate minimal SGR sequence to restore this state from reset. - - :param state: The SGR state to convert. - :returns: SGR escape sequence string, or empty string if no attributes set. - """ - if not _sgr_state_is_active(state): - return '' - - # Map boolean attributes to their SGR codes - bool_attrs = [ - (state.bold, '1'), (state.dim, '2'), (state.italic, '3'), - (state.underline, '4'), (state.blink, '5'), (state.rapid_blink, '6'), - (state.inverse, '7'), (state.hidden, '8'), (state.strikethrough, '9'), - (state.double_underline, '21'), - ] - params = [code for active, code in bool_attrs if active] - - # Add color params (already formatted as tuples) - if state.foreground is not None: - params.append(';'.join(str(p) for p in state.foreground)) - if state.background is not None: - params.append(';'.join(str(p) for p in state.background)) - - return f'\x1b[{";".join(params)}m' - - -def _parse_sgr_params(sequence: str) -> list[int | tuple[int, ...]]: - r""" - Parse SGR sequence and return list of parameter values. - - Handles compound sequences like ``\x1b[1;31;4m`` -> [1, 31, 4]. - Empty params (e.g., ``\x1b[m``) are treated as [0] (reset). - Colon-separated extended colors like ``\x1b[38:2::255:0:0m`` are returned - as tuples: [(38, 2, 255, 0, 0)]. - - :param sequence: SGR escape sequence string. - :returns: List of integer parameters or tuples for colon-separated colors. - """ - match = _SGR_PATTERN.match(sequence) - if not match: - return [] - params_str = match.group(1) - if not params_str: - return [0] # \x1b[m is equivalent to \x1b[0m - result: list[int | tuple[int, ...]] = [] - for param in params_str.split(';'): - if ':' in param: - # Colon-separated extended color (ITU T.416 format) - # e.g., "38:2::255:0:0" or "38:2:1:255:0:0" (with colorspace) - parts = [int(p) if p else 0 for p in param.split(':')] - result.append(tuple(parts)) - else: - result.append(int(param) if param else 0) - return result - - -def _parse_extended_color( - params: Iterator[int | tuple[int, ...]], base: int -) -> tuple[int, ...] | None: - """ - Parse extended color (256-color or RGB) from parameter iterator. - - :param params: Iterator of remaining SGR parameters (semicolon-separated format). - :param base: Base code (38 for foreground, 48 for background). - :returns: Color tuple like (38, 5, N) or (38, 2, R, G, B), or None if malformed. - """ - try: - mode = next(params) - if isinstance(mode, tuple): - return None # Unexpected tuple, colon format handled separately - if mode == 5: # 256-color - n = next(params) - if isinstance(n, tuple): - return None - return (int(base), 5, n) - if mode == 2: # RGB - r, g, b = next(params), next(params), next(params) - if isinstance(r, tuple) or isinstance(g, tuple) or isinstance(b, tuple): - return None - return (int(base), 2, r, g, b) - except StopIteration: - pass - return None - - -def _sgr_state_update(state: _SGRState, sequence: str) -> _SGRState: - # pylint: disable=too-many-branches,too-complex,too-many-statements - # NOTE: When minimum Python version is 3.10+, this can be simplified using match/case. - """ - Parse SGR sequence and return new state with updates applied. - - :param state: Current SGR state. - :param sequence: SGR escape sequence string. - :returns: New SGRState with updates applied. - """ - params_list = _parse_sgr_params(sequence) - params = iter(params_list) - for p in params: - # Handle colon-separated extended colors (ITU T.416 format) - if isinstance(p, tuple): - if len(p) >= 2 and p[0] == _SGR.FG_EXTENDED: - # Foreground: (38, 2, [colorspace,] R, G, B) or (38, 5, N) - state = state._replace(foreground=p) - elif len(p) >= 2 and p[0] == _SGR.BG_EXTENDED: - # Background: (48, 2, [colorspace,] R, G, B) or (48, 5, N) - state = state._replace(background=p) - continue - if p == _SGR.RESET: - state = _SGR_STATE_DEFAULT - # Attribute ON codes - elif p == _SGR.BOLD: - state = state._replace(bold=True) - elif p == _SGR.DIM: - state = state._replace(dim=True) - elif p == _SGR.ITALIC: - state = state._replace(italic=True) - elif p == _SGR.UNDERLINE: - state = state._replace(underline=True) - elif p == _SGR.BLINK: - state = state._replace(blink=True) - elif p == _SGR.RAPID_BLINK: - state = state._replace(rapid_blink=True) - elif p == _SGR.INVERSE: - state = state._replace(inverse=True) - elif p == _SGR.HIDDEN: - state = state._replace(hidden=True) - elif p == _SGR.STRIKETHROUGH: - state = state._replace(strikethrough=True) - elif p == _SGR.DOUBLE_UNDERLINE: - state = state._replace(double_underline=True) - # Attribute OFF codes - elif p == _SGR.BOLD_DIM_OFF: - state = state._replace(bold=False, dim=False) - elif p == _SGR.ITALIC_OFF: - state = state._replace(italic=False) - elif p == _SGR.UNDERLINE_OFF: - state = state._replace(underline=False, double_underline=False) - elif p == _SGR.BLINK_OFF: - state = state._replace(blink=False, rapid_blink=False) - elif p == _SGR.INVERSE_OFF: - state = state._replace(inverse=False) - elif p == _SGR.HIDDEN_OFF: - state = state._replace(hidden=False) - elif p == _SGR.STRIKETHROUGH_OFF: - state = state._replace(strikethrough=False) - # Basic colors (30-37, 40-47 standard; 90-97, 100-107 bright) - elif (_SGR.FG_BLACK <= p <= _SGR.FG_WHITE - or _SGR.FG_BRIGHT_BLACK <= p <= _SGR.FG_BRIGHT_WHITE): - state = state._replace(foreground=(p,)) - elif (_SGR.BG_BLACK <= p <= _SGR.BG_WHITE - or _SGR.BG_BRIGHT_BLACK <= p <= _SGR.BG_BRIGHT_WHITE): - state = state._replace(background=(p,)) - elif p == _SGR.FG_DEFAULT: - state = state._replace(foreground=None) - elif p == _SGR.BG_DEFAULT: - state = state._replace(background=None) - # Extended colors (semicolon-separated format) - elif p == _SGR.FG_EXTENDED: - if color := _parse_extended_color(params, _SGR.FG_EXTENDED): - state = state._replace(foreground=color) - elif p == _SGR.BG_EXTENDED: - if color := _parse_extended_color(params, _SGR.BG_EXTENDED): - state = state._replace(background=color) - return state - - -def propagate_sgr(lines: Sequence[str]) -> list[str]: - r""" - Propagate SGR codes across wrapped lines. - - When text with SGR styling is wrapped across multiple lines, each line - needs to be self-contained for proper display. This function: - - - Ends each line with ``\x1b[0m`` if styles are active (prevents bleeding) - - Starts each subsequent line with the active style restored - - :param lines: List of text lines, possibly containing SGR sequences. - :returns: List of lines with SGR codes propagated. - - Example:: - - >>> propagate_sgr(['\x1b[31mhello', 'world\x1b[0m']) - ['\x1b[31mhello\x1b[0m', '\x1b[31mworld\x1b[0m'] - - This is useful in cases of making special editors and viewers, and is used for the - default modes (propagate_sgr=True) of :func:`wcwidth.width` and :func:`wcwidth.clip`. - - When wrapping and clipping text containing SGR sequences, maybe a previous line enabled the BLUE - color--if we are viewing *only* the line following, we would want the carry over the BLUE color, - and all lines with sequences should end with terminating reset (``\x1b[0m``). - """ - # Fast path: check if any line contains SGR sequences - if not any(_SGR_QUICK_CHECK.search(line) for line in lines) or not lines: - return list(lines) - - result: list[str] = [] - state = _SGR_STATE_DEFAULT - - for line in lines: - # Prefix with restoration sequence if state is active - prefix = _sgr_state_to_sequence(state) - - # Update state by processing all SGR sequences in this line - for match in _SGR_PATTERN.finditer(line): - state = _sgr_state_update(state, match.group()) - - # Build output line - output_line = prefix + line if prefix else line - if _sgr_state_is_active(state): - output_line = output_line + _SGR_RESET - - result.append(output_line) - - return result diff --git a/voxvera/vendor/wcwidth/table_ambiguous.py b/voxvera/vendor/wcwidth/table_ambiguous.py deleted file mode 100644 index e3dc0b1..0000000 --- a/voxvera/vendor/wcwidth/table_ambiguous.py +++ /dev/null @@ -1,189 +0,0 @@ -""" -Exports AMBIGUOUS_EASTASIAN table keyed by supporting unicode version level. - -This code generated by wcwidth/bin/update-tables.py on 2026-01-18 23:27:15 UTC. -""" -# pylint: disable=duplicate-code -AMBIGUOUS_EASTASIAN = { - '17.0.0': ( - # Source: EastAsianWidth-17.0.0.txt - # Date: 2025-07-24, 00:12:54 GMT - # - (0x000a1, 0x000a1,), # Inverted Exclamation Mark - (0x000a4, 0x000a4,), # Currency Sign - (0x000a7, 0x000a8,), # Section Sign ..Diaeresis - (0x000aa, 0x000aa,), # Feminine Ordinal Indicator - (0x000ad, 0x000ae,), # Soft Hyphen ..Registered Sign - (0x000b0, 0x000b4,), # Degree Sign ..Acute Accent - (0x000b6, 0x000ba,), # Pilcrow Sign ..Masculine Ordinal Indica - (0x000bc, 0x000bf,), # Vulgar Fraction One Quar..Inverted Question Mark - (0x000c6, 0x000c6,), # Latin Capital Letter Ae - (0x000d0, 0x000d0,), # Latin Capital Letter Eth - (0x000d7, 0x000d8,), # Multiplication Sign ..Latin Capital Letter O W - (0x000de, 0x000e1,), # Latin Capital Letter Tho..Latin Small Letter A Wit - (0x000e6, 0x000e6,), # Latin Small Letter Ae - (0x000e8, 0x000ea,), # Latin Small Letter E Wit..Latin Small Letter E Wit - (0x000ec, 0x000ed,), # Latin Small Letter I Wit..Latin Small Letter I Wit - (0x000f0, 0x000f0,), # Latin Small Letter Eth - (0x000f2, 0x000f3,), # Latin Small Letter O Wit..Latin Small Letter O Wit - (0x000f7, 0x000fa,), # Division Sign ..Latin Small Letter U Wit - (0x000fc, 0x000fc,), # Latin Small Letter U With Diaeresis - (0x000fe, 0x000fe,), # Latin Small Letter Thorn - (0x00101, 0x00101,), # Latin Small Letter A With Macron - (0x00111, 0x00111,), # Latin Small Letter D With Stroke - (0x00113, 0x00113,), # Latin Small Letter E With Macron - (0x0011b, 0x0011b,), # Latin Small Letter E With Caron - (0x00126, 0x00127,), # Latin Capital Letter H W..Latin Small Letter H Wit - (0x0012b, 0x0012b,), # Latin Small Letter I With Macron - (0x00131, 0x00133,), # Latin Small Letter Dotle..Latin Small Ligature Ij - (0x00138, 0x00138,), # Latin Small Letter Kra - (0x0013f, 0x00142,), # Latin Capital Letter L W..Latin Small Letter L Wit - (0x00144, 0x00144,), # Latin Small Letter N With Acute - (0x00148, 0x0014b,), # Latin Small Letter N Wit..Latin Small Letter Eng - (0x0014d, 0x0014d,), # Latin Small Letter O With Macron - (0x00152, 0x00153,), # Latin Capital Ligature O..Latin Small Ligature Oe - (0x00166, 0x00167,), # Latin Capital Letter T W..Latin Small Letter T Wit - (0x0016b, 0x0016b,), # Latin Small Letter U With Macron - (0x001ce, 0x001ce,), # Latin Small Letter A With Caron - (0x001d0, 0x001d0,), # Latin Small Letter I With Caron - (0x001d2, 0x001d2,), # Latin Small Letter O With Caron - (0x001d4, 0x001d4,), # Latin Small Letter U With Caron - (0x001d6, 0x001d6,), # Latin Small Letter U With Diaeresis And Macron - (0x001d8, 0x001d8,), # Latin Small Letter U With Diaeresis And Acute - (0x001da, 0x001da,), # Latin Small Letter U With Diaeresis And Caron - (0x001dc, 0x001dc,), # Latin Small Letter U With Diaeresis And Grave - (0x00251, 0x00251,), # Latin Small Letter Alpha - (0x00261, 0x00261,), # Latin Small Letter Script G - (0x002c4, 0x002c4,), # Modifier Letter Up Arrowhead - (0x002c7, 0x002c7,), # Caron - (0x002c9, 0x002cb,), # Modifier Letter Macron ..Modifier Letter Grave Ac - (0x002cd, 0x002cd,), # Modifier Letter Low Macron - (0x002d0, 0x002d0,), # Modifier Letter Triangular Colon - (0x002d8, 0x002db,), # Breve ..Ogonek - (0x002dd, 0x002dd,), # Double Acute Accent - (0x002df, 0x002df,), # Modifier Letter Cross Accent - (0x00391, 0x003a1,), # Greek Capital Letter Alp..Greek Capital Letter Rho - (0x003a3, 0x003a9,), # Greek Capital Letter Sig..Greek Capital Letter Ome - (0x003b1, 0x003c1,), # Greek Small Letter Alpha..Greek Small Letter Rho - (0x003c3, 0x003c9,), # Greek Small Letter Sigma..Greek Small Letter Omega - (0x00401, 0x00401,), # Cyrillic Capital Letter Io - (0x00410, 0x0044f,), # Cyrillic Capital Letter ..Cyrillic Small Letter Ya - (0x00451, 0x00451,), # Cyrillic Small Letter Io - (0x02010, 0x02010,), # Hyphen - (0x02013, 0x02016,), # En Dash ..Double Vertical Line - (0x02018, 0x02019,), # Left Single Quotation Ma..Right Single Quotation M - (0x0201c, 0x0201d,), # Left Double Quotation Ma..Right Double Quotation M - (0x02020, 0x02022,), # Dagger ..Bullet - (0x02024, 0x02027,), # One Dot Leader ..Hyphenation Point - (0x02030, 0x02030,), # Per Mille Sign - (0x02032, 0x02033,), # Prime ..Double Prime - (0x02035, 0x02035,), # Reversed Prime - (0x0203b, 0x0203b,), # Reference Mark - (0x0203e, 0x0203e,), # Overline - (0x02074, 0x02074,), # Superscript Four - (0x0207f, 0x0207f,), # Superscript Latin Small Letter N - (0x02081, 0x02084,), # Subscript One ..Subscript Four - (0x020ac, 0x020ac,), # Euro Sign - (0x02103, 0x02103,), # Degree Celsius - (0x02105, 0x02105,), # Care Of - (0x02109, 0x02109,), # Degree Fahrenheit - (0x02113, 0x02113,), # Script Small L - (0x02116, 0x02116,), # Numero Sign - (0x02121, 0x02122,), # Telephone Sign ..Trade Mark Sign - (0x02126, 0x02126,), # Ohm Sign - (0x0212b, 0x0212b,), # Angstrom Sign - (0x02153, 0x02154,), # Vulgar Fraction One Thir..Vulgar Fraction Two Thir - (0x0215b, 0x0215e,), # Vulgar Fraction One Eigh..Vulgar Fraction Seven Ei - (0x02160, 0x0216b,), # Roman Numeral One ..Roman Numeral Twelve - (0x02170, 0x02179,), # Small Roman Numeral One ..Small Roman Numeral Ten - (0x02189, 0x02189,), # Vulgar Fraction Zero Thirds - (0x02190, 0x02199,), # Leftwards Arrow ..South West Arrow - (0x021b8, 0x021b9,), # North West Arrow To Long..Leftwards Arrow To Bar O - (0x021d2, 0x021d2,), # Rightwards Double Arrow - (0x021d4, 0x021d4,), # Left Right Double Arrow - (0x021e7, 0x021e7,), # Upwards White Arrow - (0x02200, 0x02200,), # For All - (0x02202, 0x02203,), # Partial Differential ..There Exists - (0x02207, 0x02208,), # Nabla ..Element Of - (0x0220b, 0x0220b,), # Contains As Member - (0x0220f, 0x0220f,), # N-ary Product - (0x02211, 0x02211,), # N-ary Summation - (0x02215, 0x02215,), # Division Slash - (0x0221a, 0x0221a,), # Square Root - (0x0221d, 0x02220,), # Proportional To ..Angle - (0x02223, 0x02223,), # Divides - (0x02225, 0x02225,), # Parallel To - (0x02227, 0x0222c,), # Logical And ..Double Integral - (0x0222e, 0x0222e,), # Contour Integral - (0x02234, 0x02237,), # Therefore ..Proportion - (0x0223c, 0x0223d,), # Tilde Operator ..Reversed Tilde - (0x02248, 0x02248,), # Almost Equal To - (0x0224c, 0x0224c,), # All Equal To - (0x02252, 0x02252,), # Approximately Equal To Or The Image Of - (0x02260, 0x02261,), # Not Equal To ..Identical To - (0x02264, 0x02267,), # Less-than Or Equal To ..Greater-than Over Equal - (0x0226a, 0x0226b,), # Much Less-than ..Much Greater-than - (0x0226e, 0x0226f,), # Not Less-than ..Not Greater-than - (0x02282, 0x02283,), # Subset Of ..Superset Of - (0x02286, 0x02287,), # Subset Of Or Equal To ..Superset Of Or Equal To - (0x02295, 0x02295,), # Circled Plus - (0x02299, 0x02299,), # Circled Dot Operator - (0x022a5, 0x022a5,), # Up Tack - (0x022bf, 0x022bf,), # Right Triangle - (0x02312, 0x02312,), # Arc - (0x02460, 0x024e9,), # Circled Digit One ..Circled Latin Small Lett - (0x024eb, 0x0254b,), # Negative Circled Number ..Box Drawings Heavy Verti - (0x02550, 0x02573,), # Box Drawings Double Hori..Box Drawings Light Diago - (0x02580, 0x0258f,), # Upper Half Block ..Left One Eighth Block - (0x02592, 0x02595,), # Medium Shade ..Right One Eighth Block - (0x025a0, 0x025a1,), # Black Square ..White Square - (0x025a3, 0x025a9,), # White Square Containing ..Square With Diagonal Cro - (0x025b2, 0x025b3,), # Black Up-pointing Triang..White Up-pointing Triang - (0x025b6, 0x025b7,), # Black Right-pointing Tri..White Right-pointing Tri - (0x025bc, 0x025bd,), # Black Down-pointing Tria..White Down-pointing Tria - (0x025c0, 0x025c1,), # Black Left-pointing Tria..White Left-pointing Tria - (0x025c6, 0x025c8,), # Black Diamond ..White Diamond Containing - (0x025cb, 0x025cb,), # White Circle - (0x025ce, 0x025d1,), # Bullseye ..Circle With Right Half B - (0x025e2, 0x025e5,), # Black Lower Right Triang..Black Upper Right Triang - (0x025ef, 0x025ef,), # Large Circle - (0x02605, 0x02606,), # Black Star ..White Star - (0x02609, 0x02609,), # Sun - (0x0260e, 0x0260f,), # Black Telephone ..White Telephone - (0x0261c, 0x0261c,), # White Left Pointing Index - (0x0261e, 0x0261e,), # White Right Pointing Index - (0x02640, 0x02640,), # Female Sign - (0x02642, 0x02642,), # Male Sign - (0x02660, 0x02661,), # Black Spade Suit ..White Heart Suit - (0x02663, 0x02665,), # Black Club Suit ..Black Heart Suit - (0x02667, 0x0266a,), # White Club Suit ..Eighth Note - (0x0266c, 0x0266d,), # Beamed Sixteenth Notes ..Music Flat Sign - (0x0266f, 0x0266f,), # Music Sharp Sign - (0x0269e, 0x0269f,), # Three Lines Converging R..Three Lines Converging L - (0x026bf, 0x026bf,), # Squared Key - (0x026c6, 0x026cd,), # Rain ..Disabled Car - (0x026cf, 0x026d3,), # Pick ..Chains - (0x026d5, 0x026e1,), # Alternate One-way Left W..Restricted Left Entry-2 - (0x026e3, 0x026e3,), # Heavy Circle With Stroke And Two Dots Above - (0x026e8, 0x026e9,), # Black Cross On Shield ..Shinto Shrine - (0x026eb, 0x026f1,), # Castle ..Umbrella On Ground - (0x026f4, 0x026f4,), # Ferry - (0x026f6, 0x026f9,), # Square Four Corners ..Person With Ball - (0x026fb, 0x026fc,), # Japanese Bank Symbol ..Headstone Graveyard Symb - (0x026fe, 0x026ff,), # Cup On Black Square ..White Flag With Horizont - (0x0273d, 0x0273d,), # Heavy Teardrop-spoked Asterisk - (0x02776, 0x0277f,), # Dingbat Negative Circled..Dingbat Negative Circled - (0x02b56, 0x02b59,), # Heavy Oval With Oval Ins..Heavy Circled Saltire - (0x03248, 0x0324f,), # Circled Number Ten On Bl..Circled Number Eighty On - (0x0e000, 0x0f8ff,), # (nil) - (0x0fffd, 0x0fffd,), # Replacement Character - (0x1f100, 0x1f10a,), # Digit Zero Full Stop ..Digit Nine Comma - (0x1f110, 0x1f12d,), # Parenthesized Latin Capi..Circled Cd - (0x1f130, 0x1f169,), # Squared Latin Capital Le..Negative Circled Latin C - (0x1f170, 0x1f18d,), # Negative Squared Latin C..Negative Squared Sa - (0x1f18f, 0x1f190,), # Negative Squared Wc ..Square Dj - (0x1f19b, 0x1f1ac,), # Squared Three D ..Squared Vod - (0xf0000, 0xffffd,), # (nil) - (0x100000, 0x10fffd,), # (nil) - ), -} diff --git a/voxvera/vendor/wcwidth/table_grapheme.py b/voxvera/vendor/wcwidth/table_grapheme.py deleted file mode 100644 index 42fd19e..0000000 --- a/voxvera/vendor/wcwidth/table_grapheme.py +++ /dev/null @@ -1,2294 +0,0 @@ -""" -Exports grapheme cluster break property tables for Unicode version 17.0.0. - -This module provides lookup tables for Unicode grapheme cluster break properties as defined in UAX -#29: Unicode Text Segmentation. - -This code generated by wcwidth/bin/update-tables.py on 2026-01-29 23:33:42 UTC. -""" -# pylint: disable=duplicate-code - -GRAPHEME_CR = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x0000d, 0x0000d,), # (nil) -) - -GRAPHEME_LF = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x0000a, 0x0000a,), # (nil) -) - -GRAPHEME_CONTROL = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x00000, 0x00009,), # (nil) - (0x0000b, 0x0000c,), # (nil) - (0x0000e, 0x0001f,), # (nil) - (0x0007f, 0x0009f,), # (nil) - (0x000ad, 0x000ad,), # Soft Hyphen - (0x0061c, 0x0061c,), # Arabic Letter Mark - (0x0180e, 0x0180e,), # Mongolian Vowel Separator - (0x0200b, 0x0200b,), # Zero Width Space - (0x0200e, 0x0200f,), # Left-to-right Mark ..Right-to-left Mark - (0x02028, 0x0202e,), # Line Separator ..Right-to-left Override - (0x02060, 0x0206f,), # Word Joiner ..Nominal Digit Shapes - (0x0feff, 0x0feff,), # Zero Width No-break Space - (0x0fff0, 0x0fffb,), # (nil) ..Interlinear Annotation T - (0x13430, 0x1343f,), # Egyptian Hieroglyph Vert..Egyptian Hieroglyph End - (0x1bca0, 0x1bca3,), # Shorthand Format Letter ..Shorthand Format Up Step - (0x1d173, 0x1d17a,), # Musical Symbol Begin Bea..Musical Symbol End Phras - (0xe0000, 0xe001f,), # (nil) - (0xe0080, 0xe00ff,), # (nil) - (0xe01f0, 0xe0fff,), # (nil) -) - -GRAPHEME_EXTEND = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x00300, 0x0036f,), # Combining Grave Accent ..Combining Latin Small Le - (0x00483, 0x00489,), # Combining Cyrillic Titlo..Combining Cyrillic Milli - (0x00591, 0x005bd,), # Hebrew Accent Etnahta ..Hebrew Point Meteg - (0x005bf, 0x005bf,), # Hebrew Point Rafe - (0x005c1, 0x005c2,), # Hebrew Point Shin Dot ..Hebrew Point Sin Dot - (0x005c4, 0x005c5,), # Hebrew Mark Upper Dot ..Hebrew Mark Lower Dot - (0x005c7, 0x005c7,), # Hebrew Point Qamats Qatan - (0x00610, 0x0061a,), # Arabic Sign Sallallahou ..Arabic Small Kasra - (0x0064b, 0x0065f,), # Arabic Fathatan ..Arabic Wavy Hamza Below - (0x00670, 0x00670,), # Arabic Letter Superscript Alef - (0x006d6, 0x006dc,), # Arabic Small High Ligatu..Arabic Small High Seen - (0x006df, 0x006e4,), # Arabic Small High Rounde..Arabic Small High Madda - (0x006e7, 0x006e8,), # Arabic Small High Yeh ..Arabic Small High Noon - (0x006ea, 0x006ed,), # Arabic Empty Centre Low ..Arabic Small Low Meem - (0x00711, 0x00711,), # Syriac Letter Superscript Alaph - (0x00730, 0x0074a,), # Syriac Pthaha Above ..Syriac Barrekh - (0x007a6, 0x007b0,), # Thaana Abafili ..Thaana Sukun - (0x007eb, 0x007f3,), # Nko Combining Short High..Nko Combining Double Dot - (0x007fd, 0x007fd,), # Nko Dantayalan - (0x00816, 0x00819,), # Samaritan Mark In ..Samaritan Mark Dagesh - (0x0081b, 0x00823,), # Samaritan Mark Epentheti..Samaritan Vowel Sign A - (0x00825, 0x00827,), # Samaritan Vowel Sign Sho..Samaritan Vowel Sign U - (0x00829, 0x0082d,), # Samaritan Vowel Sign Lon..Samaritan Mark Nequdaa - (0x00859, 0x0085b,), # Mandaic Affrication Mark..Mandaic Gemination Mark - (0x00897, 0x0089f,), # Arabic Pepet ..Arabic Half Madda Over M - (0x008ca, 0x008e1,), # Arabic Small High Farsi ..Arabic Small High Sign S - (0x008e3, 0x00902,), # Arabic Turned Damma Belo..Devanagari Sign Anusvara - (0x0093a, 0x0093a,), # Devanagari Vowel Sign Oe - (0x0093c, 0x0093c,), # Devanagari Sign Nukta - (0x00941, 0x00948,), # Devanagari Vowel Sign U ..Devanagari Vowel Sign Ai - (0x0094d, 0x0094d,), # Devanagari Sign Virama - (0x00951, 0x00957,), # Devanagari Stress Sign U..Devanagari Vowel Sign Uu - (0x00962, 0x00963,), # Devanagari Vowel Sign Vo..Devanagari Vowel Sign Vo - (0x00981, 0x00981,), # Bengali Sign Candrabindu - (0x009bc, 0x009bc,), # Bengali Sign Nukta - (0x009be, 0x009be,), # Bengali Vowel Sign Aa - (0x009c1, 0x009c4,), # Bengali Vowel Sign U ..Bengali Vowel Sign Vocal - (0x009cd, 0x009cd,), # Bengali Sign Virama - (0x009d7, 0x009d7,), # Bengali Au Length Mark - (0x009e2, 0x009e3,), # Bengali Vowel Sign Vocal..Bengali Vowel Sign Vocal - (0x009fe, 0x009fe,), # Bengali Sandhi Mark - (0x00a01, 0x00a02,), # Gurmukhi Sign Adak Bindi..Gurmukhi Sign Bindi - (0x00a3c, 0x00a3c,), # Gurmukhi Sign Nukta - (0x00a41, 0x00a42,), # Gurmukhi Vowel Sign U ..Gurmukhi Vowel Sign Uu - (0x00a47, 0x00a48,), # Gurmukhi Vowel Sign Ee ..Gurmukhi Vowel Sign Ai - (0x00a4b, 0x00a4d,), # Gurmukhi Vowel Sign Oo ..Gurmukhi Sign Virama - (0x00a51, 0x00a51,), # Gurmukhi Sign Udaat - (0x00a70, 0x00a71,), # Gurmukhi Tippi ..Gurmukhi Addak - (0x00a75, 0x00a75,), # Gurmukhi Sign Yakash - (0x00a81, 0x00a82,), # Gujarati Sign Candrabind..Gujarati Sign Anusvara - (0x00abc, 0x00abc,), # Gujarati Sign Nukta - (0x00ac1, 0x00ac5,), # Gujarati Vowel Sign U ..Gujarati Vowel Sign Cand - (0x00ac7, 0x00ac8,), # Gujarati Vowel Sign E ..Gujarati Vowel Sign Ai - (0x00acd, 0x00acd,), # Gujarati Sign Virama - (0x00ae2, 0x00ae3,), # Gujarati Vowel Sign Voca..Gujarati Vowel Sign Voca - (0x00afa, 0x00aff,), # Gujarati Sign Sukun ..Gujarati Sign Two-circle - (0x00b01, 0x00b01,), # Oriya Sign Candrabindu - (0x00b3c, 0x00b3c,), # Oriya Sign Nukta - (0x00b3e, 0x00b3f,), # Oriya Vowel Sign Aa ..Oriya Vowel Sign I - (0x00b41, 0x00b44,), # Oriya Vowel Sign U ..Oriya Vowel Sign Vocalic - (0x00b4d, 0x00b4d,), # Oriya Sign Virama - (0x00b55, 0x00b57,), # Oriya Sign Overline ..Oriya Au Length Mark - (0x00b62, 0x00b63,), # Oriya Vowel Sign Vocalic..Oriya Vowel Sign Vocalic - (0x00b82, 0x00b82,), # Tamil Sign Anusvara - (0x00bbe, 0x00bbe,), # Tamil Vowel Sign Aa - (0x00bc0, 0x00bc0,), # Tamil Vowel Sign Ii - (0x00bcd, 0x00bcd,), # Tamil Sign Virama - (0x00bd7, 0x00bd7,), # Tamil Au Length Mark - (0x00c00, 0x00c00,), # Telugu Sign Combining Candrabindu Above - (0x00c04, 0x00c04,), # Telugu Sign Combining Anusvara Above - (0x00c3c, 0x00c3c,), # Telugu Sign Nukta - (0x00c3e, 0x00c40,), # Telugu Vowel Sign Aa ..Telugu Vowel Sign Ii - (0x00c46, 0x00c48,), # Telugu Vowel Sign E ..Telugu Vowel Sign Ai - (0x00c4a, 0x00c4d,), # Telugu Vowel Sign O ..Telugu Sign Virama - (0x00c55, 0x00c56,), # Telugu Length Mark ..Telugu Ai Length Mark - (0x00c62, 0x00c63,), # Telugu Vowel Sign Vocali..Telugu Vowel Sign Vocali - (0x00c81, 0x00c81,), # Kannada Sign Candrabindu - (0x00cbc, 0x00cbc,), # Kannada Sign Nukta - (0x00cbf, 0x00cc0,), # Kannada Vowel Sign I ..Kannada Vowel Sign Ii - (0x00cc2, 0x00cc2,), # Kannada Vowel Sign Uu - (0x00cc6, 0x00cc8,), # Kannada Vowel Sign E ..Kannada Vowel Sign Ai - (0x00cca, 0x00ccd,), # Kannada Vowel Sign O ..Kannada Sign Virama - (0x00cd5, 0x00cd6,), # Kannada Length Mark ..Kannada Ai Length Mark - (0x00ce2, 0x00ce3,), # Kannada Vowel Sign Vocal..Kannada Vowel Sign Vocal - (0x00d00, 0x00d01,), # Malayalam Sign Combining..Malayalam Sign Candrabin - (0x00d3b, 0x00d3c,), # Malayalam Sign Vertical ..Malayalam Sign Circular - (0x00d3e, 0x00d3e,), # Malayalam Vowel Sign Aa - (0x00d41, 0x00d44,), # Malayalam Vowel Sign U ..Malayalam Vowel Sign Voc - (0x00d4d, 0x00d4d,), # Malayalam Sign Virama - (0x00d57, 0x00d57,), # Malayalam Au Length Mark - (0x00d62, 0x00d63,), # Malayalam Vowel Sign Voc..Malayalam Vowel Sign Voc - (0x00d81, 0x00d81,), # Sinhala Sign Candrabindu - (0x00dca, 0x00dca,), # Sinhala Sign Al-lakuna - (0x00dcf, 0x00dcf,), # Sinhala Vowel Sign Aela-pilla - (0x00dd2, 0x00dd4,), # Sinhala Vowel Sign Ketti..Sinhala Vowel Sign Ketti - (0x00dd6, 0x00dd6,), # Sinhala Vowel Sign Diga Paa-pilla - (0x00ddf, 0x00ddf,), # Sinhala Vowel Sign Gayanukitta - (0x00e31, 0x00e31,), # Thai Character Mai Han-akat - (0x00e34, 0x00e3a,), # Thai Character Sara I ..Thai Character Phinthu - (0x00e47, 0x00e4e,), # Thai Character Maitaikhu..Thai Character Yamakkan - (0x00eb1, 0x00eb1,), # Lao Vowel Sign Mai Kan - (0x00eb4, 0x00ebc,), # Lao Vowel Sign I ..Lao Semivowel Sign Lo - (0x00ec8, 0x00ece,), # Lao Tone Mai Ek ..Lao Yamakkan - (0x00f18, 0x00f19,), # Tibetan Astrological Sig..Tibetan Astrological Sig - (0x00f35, 0x00f35,), # Tibetan Mark Ngas Bzung Nyi Zla - (0x00f37, 0x00f37,), # Tibetan Mark Ngas Bzung Sgor Rtags - (0x00f39, 0x00f39,), # Tibetan Mark Tsa -phru - (0x00f71, 0x00f7e,), # Tibetan Vowel Sign Aa ..Tibetan Sign Rjes Su Nga - (0x00f80, 0x00f84,), # Tibetan Vowel Sign Rever..Tibetan Mark Halanta - (0x00f86, 0x00f87,), # Tibetan Sign Lci Rtags ..Tibetan Sign Yang Rtags - (0x00f8d, 0x00f97,), # Tibetan Subjoined Sign L..Tibetan Subjoined Letter - (0x00f99, 0x00fbc,), # Tibetan Subjoined Letter..Tibetan Subjoined Letter - (0x00fc6, 0x00fc6,), # Tibetan Symbol Padma Gdan - (0x0102d, 0x01030,), # Myanmar Vowel Sign I ..Myanmar Vowel Sign Uu - (0x01032, 0x01037,), # Myanmar Vowel Sign Ai ..Myanmar Sign Dot Below - (0x01039, 0x0103a,), # Myanmar Sign Virama ..Myanmar Sign Asat - (0x0103d, 0x0103e,), # Myanmar Consonant Sign M..Myanmar Consonant Sign M - (0x01058, 0x01059,), # Myanmar Vowel Sign Vocal..Myanmar Vowel Sign Vocal - (0x0105e, 0x01060,), # Myanmar Consonant Sign M..Myanmar Consonant Sign M - (0x01071, 0x01074,), # Myanmar Vowel Sign Geba ..Myanmar Vowel Sign Kayah - (0x01082, 0x01082,), # Myanmar Consonant Sign Shan Medial Wa - (0x01085, 0x01086,), # Myanmar Vowel Sign Shan ..Myanmar Vowel Sign Shan - (0x0108d, 0x0108d,), # Myanmar Sign Shan Council Emphatic Tone - (0x0109d, 0x0109d,), # Myanmar Vowel Sign Aiton Ai - (0x0135d, 0x0135f,), # Ethiopic Combining Gemin..Ethiopic Combining Gemin - (0x01712, 0x01715,), # Tagalog Vowel Sign I ..Tagalog Sign Pamudpod - (0x01732, 0x01734,), # Hanunoo Vowel Sign I ..Hanunoo Sign Pamudpod - (0x01752, 0x01753,), # Buhid Vowel Sign I ..Buhid Vowel Sign U - (0x01772, 0x01773,), # Tagbanwa Vowel Sign I ..Tagbanwa Vowel Sign U - (0x017b4, 0x017b5,), # Khmer Vowel Inherent Aq ..Khmer Vowel Inherent Aa - (0x017b7, 0x017bd,), # Khmer Vowel Sign I ..Khmer Vowel Sign Ua - (0x017c6, 0x017c6,), # Khmer Sign Nikahit - (0x017c9, 0x017d3,), # Khmer Sign Muusikatoan ..Khmer Sign Bathamasat - (0x017dd, 0x017dd,), # Khmer Sign Atthacan - (0x0180b, 0x0180d,), # Mongolian Free Variation..Mongolian Free Variation - (0x0180f, 0x0180f,), # Mongolian Free Variation Selector Four - (0x01885, 0x01886,), # Mongolian Letter Ali Gal..Mongolian Letter Ali Gal - (0x018a9, 0x018a9,), # Mongolian Letter Ali Gali Dagalga - (0x01920, 0x01922,), # Limbu Vowel Sign A ..Limbu Vowel Sign U - (0x01927, 0x01928,), # Limbu Vowel Sign E ..Limbu Vowel Sign O - (0x01932, 0x01932,), # Limbu Small Letter Anusvara - (0x01939, 0x0193b,), # Limbu Sign Mukphreng ..Limbu Sign Sa-i - (0x01a17, 0x01a18,), # Buginese Vowel Sign I ..Buginese Vowel Sign U - (0x01a1b, 0x01a1b,), # Buginese Vowel Sign Ae - (0x01a56, 0x01a56,), # Tai Tham Consonant Sign Medial La - (0x01a58, 0x01a5e,), # Tai Tham Sign Mai Kang L..Tai Tham Consonant Sign - (0x01a60, 0x01a60,), # Tai Tham Sign Sakot - (0x01a62, 0x01a62,), # Tai Tham Vowel Sign Mai Sat - (0x01a65, 0x01a6c,), # Tai Tham Vowel Sign I ..Tai Tham Vowel Sign Oa B - (0x01a73, 0x01a7c,), # Tai Tham Vowel Sign Oa A..Tai Tham Sign Khuen-lue - (0x01a7f, 0x01a7f,), # Tai Tham Combining Cryptogrammic Dot - (0x01ab0, 0x01add,), # Combining Doubled Circum..Combining Dot-and-ring B - (0x01ae0, 0x01aeb,), # Combining Left Tack Abov..Combining Double Rightwa - (0x01b00, 0x01b03,), # Balinese Sign Ulu Ricem ..Balinese Sign Surang - (0x01b34, 0x01b3d,), # Balinese Sign Rerekan ..Balinese Vowel Sign La L - (0x01b42, 0x01b44,), # Balinese Vowel Sign Pepe..Balinese Adeg Adeg - (0x01b6b, 0x01b73,), # Balinese Musical Symbol ..Balinese Musical Symbol - (0x01b80, 0x01b81,), # Sundanese Sign Panyecek ..Sundanese Sign Panglayar - (0x01ba2, 0x01ba5,), # Sundanese Consonant Sign..Sundanese Vowel Sign Pan - (0x01ba8, 0x01bad,), # Sundanese Vowel Sign Pam..Sundanese Consonant Sign - (0x01be6, 0x01be6,), # Batak Sign Tompi - (0x01be8, 0x01be9,), # Batak Vowel Sign Pakpak ..Batak Vowel Sign Ee - (0x01bed, 0x01bed,), # Batak Vowel Sign Karo O - (0x01bef, 0x01bf3,), # Batak Vowel Sign U For S..Batak Panongonan - (0x01c2c, 0x01c33,), # Lepcha Vowel Sign E ..Lepcha Consonant Sign T - (0x01c36, 0x01c37,), # Lepcha Sign Ran ..Lepcha Sign Nukta - (0x01cd0, 0x01cd2,), # Vedic Tone Karshana ..Vedic Tone Prenkha - (0x01cd4, 0x01ce0,), # Vedic Sign Yajurvedic Mi..Vedic Tone Rigvedic Kash - (0x01ce2, 0x01ce8,), # Vedic Sign Visarga Svari..Vedic Sign Visarga Anuda - (0x01ced, 0x01ced,), # Vedic Sign Tiryak - (0x01cf4, 0x01cf4,), # Vedic Tone Candra Above - (0x01cf8, 0x01cf9,), # Vedic Tone Ring Above ..Vedic Tone Double Ring A - (0x01dc0, 0x01dff,), # Combining Dotted Grave A..Combining Right Arrowhea - (0x0200c, 0x0200c,), # Zero Width Non-joiner - (0x020d0, 0x020f0,), # Combining Left Harpoon A..Combining Asterisk Above - (0x02cef, 0x02cf1,), # Coptic Combining Ni Abov..Coptic Combining Spiritu - (0x02d7f, 0x02d7f,), # Tifinagh Consonant Joiner - (0x02de0, 0x02dff,), # Combining Cyrillic Lette..Combining Cyrillic Lette - (0x0302a, 0x0302f,), # Ideographic Level Tone M..Hangul Double Dot Tone M - (0x03099, 0x0309a,), # Combining Katakana-hirag..Combining Katakana-hirag - (0x0a66f, 0x0a672,), # Combining Cyrillic Vzmet..Combining Cyrillic Thous - (0x0a674, 0x0a67d,), # Combining Cyrillic Lette..Combining Cyrillic Payer - (0x0a69e, 0x0a69f,), # Combining Cyrillic Lette..Combining Cyrillic Lette - (0x0a6f0, 0x0a6f1,), # Bamum Combining Mark Koq..Bamum Combining Mark Tuk - (0x0a802, 0x0a802,), # Syloti Nagri Sign Dvisvara - (0x0a806, 0x0a806,), # Syloti Nagri Sign Hasanta - (0x0a80b, 0x0a80b,), # Syloti Nagri Sign Anusvara - (0x0a825, 0x0a826,), # Syloti Nagri Vowel Sign ..Syloti Nagri Vowel Sign - (0x0a82c, 0x0a82c,), # Syloti Nagri Sign Alternate Hasanta - (0x0a8c4, 0x0a8c5,), # Saurashtra Sign Virama ..Saurashtra Sign Candrabi - (0x0a8e0, 0x0a8f1,), # Combining Devanagari Dig..Combining Devanagari Sig - (0x0a8ff, 0x0a8ff,), # Devanagari Vowel Sign Ay - (0x0a926, 0x0a92d,), # Kayah Li Vowel Ue ..Kayah Li Tone Calya Plop - (0x0a947, 0x0a951,), # Rejang Vowel Sign I ..Rejang Consonant Sign R - (0x0a953, 0x0a953,), # Rejang Virama - (0x0a980, 0x0a982,), # Javanese Sign Panyangga ..Javanese Sign Layar - (0x0a9b3, 0x0a9b3,), # Javanese Sign Cecak Telu - (0x0a9b6, 0x0a9b9,), # Javanese Vowel Sign Wulu..Javanese Vowel Sign Suku - (0x0a9bc, 0x0a9bd,), # Javanese Vowel Sign Pepe..Javanese Consonant Sign - (0x0a9c0, 0x0a9c0,), # Javanese Pangkon - (0x0a9e5, 0x0a9e5,), # Myanmar Sign Shan Saw - (0x0aa29, 0x0aa2e,), # Cham Vowel Sign Aa ..Cham Vowel Sign Oe - (0x0aa31, 0x0aa32,), # Cham Vowel Sign Au ..Cham Vowel Sign Ue - (0x0aa35, 0x0aa36,), # Cham Consonant Sign La ..Cham Consonant Sign Wa - (0x0aa43, 0x0aa43,), # Cham Consonant Sign Final Ng - (0x0aa4c, 0x0aa4c,), # Cham Consonant Sign Final M - (0x0aa7c, 0x0aa7c,), # Myanmar Sign Tai Laing Tone-2 - (0x0aab0, 0x0aab0,), # Tai Viet Mai Kang - (0x0aab2, 0x0aab4,), # Tai Viet Vowel I ..Tai Viet Vowel U - (0x0aab7, 0x0aab8,), # Tai Viet Mai Khit ..Tai Viet Vowel Ia - (0x0aabe, 0x0aabf,), # Tai Viet Vowel Am ..Tai Viet Tone Mai Ek - (0x0aac1, 0x0aac1,), # Tai Viet Tone Mai Tho - (0x0aaec, 0x0aaed,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0aaf6, 0x0aaf6,), # Meetei Mayek Virama - (0x0abe5, 0x0abe5,), # Meetei Mayek Vowel Sign Anap - (0x0abe8, 0x0abe8,), # Meetei Mayek Vowel Sign Unap - (0x0abed, 0x0abed,), # Meetei Mayek Apun Iyek - (0x0fb1e, 0x0fb1e,), # Hebrew Point Judeo-spanish Varika - (0x0fe00, 0x0fe0f,), # Variation Selector-1 ..Variation Selector-16 - (0x0fe20, 0x0fe2f,), # Combining Ligature Left ..Combining Cyrillic Titlo - (0x0ff9e, 0x0ff9f,), # Halfwidth Katakana Voice..Halfwidth Katakana Semi- - (0x101fd, 0x101fd,), # Phaistos Disc Sign Combining Oblique Stroke - (0x102e0, 0x102e0,), # Coptic Epact Thousands Mark - (0x10376, 0x1037a,), # Combining Old Permic Let..Combining Old Permic Let - (0x10a01, 0x10a03,), # Kharoshthi Vowel Sign I ..Kharoshthi Vowel Sign Vo - (0x10a05, 0x10a06,), # Kharoshthi Vowel Sign E ..Kharoshthi Vowel Sign O - (0x10a0c, 0x10a0f,), # Kharoshthi Vowel Length ..Kharoshthi Sign Visarga - (0x10a38, 0x10a3a,), # Kharoshthi Sign Bar Abov..Kharoshthi Sign Dot Belo - (0x10a3f, 0x10a3f,), # Kharoshthi Virama - (0x10ae5, 0x10ae6,), # Manichaean Abbreviation ..Manichaean Abbreviation - (0x10d24, 0x10d27,), # Hanifi Rohingya Sign Har..Hanifi Rohingya Sign Tas - (0x10d69, 0x10d6d,), # Garay Vowel Sign E ..Garay Consonant Nasaliza - (0x10eab, 0x10eac,), # Yezidi Combining Hamza M..Yezidi Combining Madda M - (0x10efa, 0x10eff,), # Arabic Double Vertical B..Arabic Small Low Word Ma - (0x10f46, 0x10f50,), # Sogdian Combining Dot Be..Sogdian Combining Stroke - (0x10f82, 0x10f85,), # Old Uyghur Combining Dot..Old Uyghur Combining Two - (0x11001, 0x11001,), # Brahmi Sign Anusvara - (0x11038, 0x11046,), # Brahmi Vowel Sign Aa ..Brahmi Virama - (0x11070, 0x11070,), # Brahmi Sign Old Tamil Virama - (0x11073, 0x11074,), # Brahmi Vowel Sign Old Ta..Brahmi Vowel Sign Old Ta - (0x1107f, 0x11081,), # Brahmi Number Joiner ..Kaithi Sign Anusvara - (0x110b3, 0x110b6,), # Kaithi Vowel Sign U ..Kaithi Vowel Sign Ai - (0x110b9, 0x110ba,), # Kaithi Sign Virama ..Kaithi Sign Nukta - (0x110c2, 0x110c2,), # Kaithi Vowel Sign Vocalic R - (0x11100, 0x11102,), # Chakma Sign Candrabindu ..Chakma Sign Visarga - (0x11127, 0x1112b,), # Chakma Vowel Sign A ..Chakma Vowel Sign Uu - (0x1112d, 0x11134,), # Chakma Vowel Sign Ai ..Chakma Maayyaa - (0x11173, 0x11173,), # Mahajani Sign Nukta - (0x11180, 0x11181,), # Sharada Sign Candrabindu..Sharada Sign Anusvara - (0x111b6, 0x111be,), # Sharada Vowel Sign U ..Sharada Vowel Sign O - (0x111c0, 0x111c0,), # Sharada Sign Virama - (0x111c9, 0x111cc,), # Sharada Sandhi Mark ..Sharada Extra Short Vowe - (0x111cf, 0x111cf,), # Sharada Sign Inverted Candrabindu - (0x1122f, 0x11231,), # Khojki Vowel Sign U ..Khojki Vowel Sign Ai - (0x11234, 0x11237,), # Khojki Sign Anusvara ..Khojki Sign Shadda - (0x1123e, 0x1123e,), # Khojki Sign Sukun - (0x11241, 0x11241,), # Khojki Vowel Sign Vocalic R - (0x112df, 0x112df,), # Khudawadi Sign Anusvara - (0x112e3, 0x112ea,), # Khudawadi Vowel Sign U ..Khudawadi Sign Virama - (0x11300, 0x11301,), # Grantha Sign Combining A..Grantha Sign Candrabindu - (0x1133b, 0x1133c,), # Combining Bindu Below ..Grantha Sign Nukta - (0x1133e, 0x1133e,), # Grantha Vowel Sign Aa - (0x11340, 0x11340,), # Grantha Vowel Sign Ii - (0x1134d, 0x1134d,), # Grantha Sign Virama - (0x11357, 0x11357,), # Grantha Au Length Mark - (0x11366, 0x1136c,), # Combining Grantha Digit ..Combining Grantha Digit - (0x11370, 0x11374,), # Combining Grantha Letter..Combining Grantha Letter - (0x113b8, 0x113b8,), # Tulu-tigalari Vowel Sign Aa - (0x113bb, 0x113c0,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Vowel Sign - (0x113c2, 0x113c2,), # Tulu-tigalari Vowel Sign Ee - (0x113c5, 0x113c5,), # Tulu-tigalari Vowel Sign Ai - (0x113c7, 0x113c9,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Au Length - (0x113ce, 0x113d0,), # Tulu-tigalari Sign Viram..Tulu-tigalari Conjoiner - (0x113d2, 0x113d2,), # Tulu-tigalari Gemination Mark - (0x113e1, 0x113e2,), # Tulu-tigalari Vedic Tone..Tulu-tigalari Vedic Tone - (0x11438, 0x1143f,), # Newa Vowel Sign U ..Newa Vowel Sign Ai - (0x11442, 0x11444,), # Newa Sign Virama ..Newa Sign Anusvara - (0x11446, 0x11446,), # Newa Sign Nukta - (0x1145e, 0x1145e,), # Newa Sandhi Mark - (0x114b0, 0x114b0,), # Tirhuta Vowel Sign Aa - (0x114b3, 0x114b8,), # Tirhuta Vowel Sign U ..Tirhuta Vowel Sign Vocal - (0x114ba, 0x114ba,), # Tirhuta Vowel Sign Short E - (0x114bd, 0x114bd,), # Tirhuta Vowel Sign Short O - (0x114bf, 0x114c0,), # Tirhuta Sign Candrabindu..Tirhuta Sign Anusvara - (0x114c2, 0x114c3,), # Tirhuta Sign Virama ..Tirhuta Sign Nukta - (0x115af, 0x115af,), # Siddham Vowel Sign Aa - (0x115b2, 0x115b5,), # Siddham Vowel Sign U ..Siddham Vowel Sign Vocal - (0x115bc, 0x115bd,), # Siddham Sign Candrabindu..Siddham Sign Anusvara - (0x115bf, 0x115c0,), # Siddham Sign Virama ..Siddham Sign Nukta - (0x115dc, 0x115dd,), # Siddham Vowel Sign Alter..Siddham Vowel Sign Alter - (0x11633, 0x1163a,), # Modi Vowel Sign U ..Modi Vowel Sign Ai - (0x1163d, 0x1163d,), # Modi Sign Anusvara - (0x1163f, 0x11640,), # Modi Sign Virama ..Modi Sign Ardhacandra - (0x116ab, 0x116ab,), # Takri Sign Anusvara - (0x116ad, 0x116ad,), # Takri Vowel Sign Aa - (0x116b0, 0x116b7,), # Takri Vowel Sign U ..Takri Sign Nukta - (0x1171d, 0x1171d,), # Ahom Consonant Sign Medial La - (0x1171f, 0x1171f,), # Ahom Consonant Sign Medial Ligating Ra - (0x11722, 0x11725,), # Ahom Vowel Sign I ..Ahom Vowel Sign Uu - (0x11727, 0x1172b,), # Ahom Vowel Sign Aw ..Ahom Sign Killer - (0x1182f, 0x11837,), # Dogra Vowel Sign U ..Dogra Sign Anusvara - (0x11839, 0x1183a,), # Dogra Sign Virama ..Dogra Sign Nukta - (0x11930, 0x11930,), # Dives Akuru Vowel Sign Aa - (0x1193b, 0x1193e,), # Dives Akuru Sign Anusvar..Dives Akuru Virama - (0x11943, 0x11943,), # Dives Akuru Sign Nukta - (0x119d4, 0x119d7,), # Nandinagari Vowel Sign U..Nandinagari Vowel Sign V - (0x119da, 0x119db,), # Nandinagari Vowel Sign E..Nandinagari Vowel Sign A - (0x119e0, 0x119e0,), # Nandinagari Sign Virama - (0x11a01, 0x11a0a,), # Zanabazar Square Vowel S..Zanabazar Square Vowel L - (0x11a33, 0x11a38,), # Zanabazar Square Final C..Zanabazar Square Sign An - (0x11a3b, 0x11a3e,), # Zanabazar Square Cluster..Zanabazar Square Cluster - (0x11a47, 0x11a47,), # Zanabazar Square Subjoiner - (0x11a51, 0x11a56,), # Soyombo Vowel Sign I ..Soyombo Vowel Sign Oe - (0x11a59, 0x11a5b,), # Soyombo Vowel Sign Vocal..Soyombo Vowel Length Mar - (0x11a8a, 0x11a96,), # Soyombo Final Consonant ..Soyombo Sign Anusvara - (0x11a98, 0x11a99,), # Soyombo Gemination Mark ..Soyombo Subjoiner - (0x11b60, 0x11b60,), # Sharada Vowel Sign Oe - (0x11b62, 0x11b64,), # Sharada Vowel Sign Ue ..Sharada Vowel Sign Short - (0x11b66, 0x11b66,), # Sharada Vowel Sign Candra E - (0x11c30, 0x11c36,), # Bhaiksuki Vowel Sign I ..Bhaiksuki Vowel Sign Voc - (0x11c38, 0x11c3d,), # Bhaiksuki Vowel Sign E ..Bhaiksuki Sign Anusvara - (0x11c3f, 0x11c3f,), # Bhaiksuki Sign Virama - (0x11c92, 0x11ca7,), # Marchen Subjoined Letter..Marchen Subjoined Letter - (0x11caa, 0x11cb0,), # Marchen Subjoined Letter..Marchen Vowel Sign Aa - (0x11cb2, 0x11cb3,), # Marchen Vowel Sign U ..Marchen Vowel Sign E - (0x11cb5, 0x11cb6,), # Marchen Sign Anusvara ..Marchen Sign Candrabindu - (0x11d31, 0x11d36,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign - (0x11d3a, 0x11d3a,), # Masaram Gondi Vowel Sign E - (0x11d3c, 0x11d3d,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign - (0x11d3f, 0x11d45,), # Masaram Gondi Vowel Sign..Masaram Gondi Virama - (0x11d47, 0x11d47,), # Masaram Gondi Ra-kara - (0x11d90, 0x11d91,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign - (0x11d95, 0x11d95,), # Gunjala Gondi Sign Anusvara - (0x11d97, 0x11d97,), # Gunjala Gondi Virama - (0x11ef3, 0x11ef4,), # Makasar Vowel Sign I ..Makasar Vowel Sign U - (0x11f00, 0x11f01,), # Kawi Sign Candrabindu ..Kawi Sign Anusvara - (0x11f36, 0x11f3a,), # Kawi Vowel Sign I ..Kawi Vowel Sign Vocalic - (0x11f40, 0x11f42,), # Kawi Vowel Sign Eu ..Kawi Conjoiner - (0x11f5a, 0x11f5a,), # Kawi Sign Nukta - (0x13440, 0x13440,), # Egyptian Hieroglyph Mirror Horizontally - (0x13447, 0x13455,), # Egyptian Hieroglyph Modi..Egyptian Hieroglyph Modi - (0x1611e, 0x16129,), # Gurung Khema Vowel Sign ..Gurung Khema Vowel Lengt - (0x1612d, 0x1612f,), # Gurung Khema Sign Anusva..Gurung Khema Sign Tholho - (0x16af0, 0x16af4,), # Bassa Vah Combining High..Bassa Vah Combining High - (0x16b30, 0x16b36,), # Pahawh Hmong Mark Cim Tu..Pahawh Hmong Mark Cim Ta - (0x16f4f, 0x16f4f,), # Miao Sign Consonant Modifier Bar - (0x16f8f, 0x16f92,), # Miao Tone Right ..Miao Tone Below - (0x16fe4, 0x16fe4,), # Khitan Small Script Filler - (0x16ff0, 0x16ff1,), # Vietnamese Alternate Rea..Vietnamese Alternate Rea - (0x1bc9d, 0x1bc9e,), # Duployan Thick Letter Se..Duployan Double Mark - (0x1cf00, 0x1cf2d,), # Znamenny Combining Mark ..Znamenny Combining Mark - (0x1cf30, 0x1cf46,), # Znamenny Combining Tonal..Znamenny Priznak Modifie - (0x1d165, 0x1d169,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d16d, 0x1d172,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d17b, 0x1d182,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d185, 0x1d18b,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d1aa, 0x1d1ad,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d242, 0x1d244,), # Combining Greek Musical ..Combining Greek Musical - (0x1da00, 0x1da36,), # Signwriting Head Rim ..Signwriting Air Sucking - (0x1da3b, 0x1da6c,), # Signwriting Mouth Closed..Signwriting Excitement - (0x1da75, 0x1da75,), # Signwriting Upper Body Tilting From Hip Joints - (0x1da84, 0x1da84,), # Signwriting Location Head Neck - (0x1da9b, 0x1da9f,), # Signwriting Fill Modifie..Signwriting Fill Modifie - (0x1daa1, 0x1daaf,), # Signwriting Rotation Mod..Signwriting Rotation Mod - (0x1e000, 0x1e006,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e008, 0x1e018,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e01b, 0x1e021,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e023, 0x1e024,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e026, 0x1e02a,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e08f, 0x1e08f,), # Combining Cyrillic Small Letter Byelorussian-ukr - (0x1e130, 0x1e136,), # Nyiakeng Puachue Hmong T..Nyiakeng Puachue Hmong T - (0x1e2ae, 0x1e2ae,), # Toto Sign Rising Tone - (0x1e2ec, 0x1e2ef,), # Wancho Tone Tup ..Wancho Tone Koini - (0x1e4ec, 0x1e4ef,), # Nag Mundari Sign Muhor ..Nag Mundari Sign Sutuh - (0x1e5ee, 0x1e5ef,), # Ol Onal Sign Mu ..Ol Onal Sign Ikir - (0x1e6e3, 0x1e6e3,), # Tai Yo Sign Ue - (0x1e6e6, 0x1e6e6,), # Tai Yo Sign Au - (0x1e6ee, 0x1e6ef,), # Tai Yo Sign Ay ..Tai Yo Sign Ang - (0x1e6f5, 0x1e6f5,), # Tai Yo Sign Om - (0x1e8d0, 0x1e8d6,), # Mende Kikakui Combining ..Mende Kikakui Combining - (0x1e944, 0x1e94a,), # Adlam Alif Lengthener ..Adlam Nukta - (0x1f3fb, 0x1f3ff,), # Emoji Modifier Fitzpatri..Emoji Modifier Fitzpatri - (0xe0020, 0xe007f,), # Tag Space ..Cancel Tag - (0xe0100, 0xe01ef,), # Variation Selector-17 ..Variation Selector-256 -) - -GRAPHEME_ZWJ = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x0200d, 0x0200d,), # Zero Width Joiner -) - -GRAPHEME_REGIONAL_INDICATOR = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x1f1e6, 0x1f1ff,), # Regional Indicator Symbo..Regional Indicator Symbo -) - -GRAPHEME_PREPEND = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x00600, 0x00605,), # Arabic Number Sign ..Arabic Number Mark Above - (0x006dd, 0x006dd,), # Arabic End Of Ayah - (0x0070f, 0x0070f,), # Syriac Abbreviation Mark - (0x00890, 0x00891,), # Arabic Pound Mark Above ..Arabic Piastre Mark Abov - (0x008e2, 0x008e2,), # Arabic Disputed End Of Ayah - (0x00d4e, 0x00d4e,), # Malayalam Letter Dot Reph - (0x110bd, 0x110bd,), # Kaithi Number Sign - (0x110cd, 0x110cd,), # Kaithi Number Sign Above - (0x111c2, 0x111c3,), # Sharada Sign Jihvamuliya..Sharada Sign Upadhmaniya - (0x113d1, 0x113d1,), # Tulu-tigalari Repha - (0x1193f, 0x1193f,), # Dives Akuru Prefixed Nasal Sign - (0x11941, 0x11941,), # Dives Akuru Initial Ra - (0x11a84, 0x11a89,), # Soyombo Sign Jihvamuliya..Soyombo Cluster-initial - (0x11d46, 0x11d46,), # Masaram Gondi Repha - (0x11f02, 0x11f02,), # Kawi Sign Repha -) - -GRAPHEME_SPACINGMARK = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x00903, 0x00903,), # Devanagari Sign Visarga - (0x0093b, 0x0093b,), # Devanagari Vowel Sign Ooe - (0x0093e, 0x00940,), # Devanagari Vowel Sign Aa..Devanagari Vowel Sign Ii - (0x00949, 0x0094c,), # Devanagari Vowel Sign Ca..Devanagari Vowel Sign Au - (0x0094e, 0x0094f,), # Devanagari Vowel Sign Pr..Devanagari Vowel Sign Aw - (0x00982, 0x00983,), # Bengali Sign Anusvara ..Bengali Sign Visarga - (0x009bf, 0x009c0,), # Bengali Vowel Sign I ..Bengali Vowel Sign Ii - (0x009c7, 0x009c8,), # Bengali Vowel Sign E ..Bengali Vowel Sign Ai - (0x009cb, 0x009cc,), # Bengali Vowel Sign O ..Bengali Vowel Sign Au - (0x00a03, 0x00a03,), # Gurmukhi Sign Visarga - (0x00a3e, 0x00a40,), # Gurmukhi Vowel Sign Aa ..Gurmukhi Vowel Sign Ii - (0x00a83, 0x00a83,), # Gujarati Sign Visarga - (0x00abe, 0x00ac0,), # Gujarati Vowel Sign Aa ..Gujarati Vowel Sign Ii - (0x00ac9, 0x00ac9,), # Gujarati Vowel Sign Candra O - (0x00acb, 0x00acc,), # Gujarati Vowel Sign O ..Gujarati Vowel Sign Au - (0x00b02, 0x00b03,), # Oriya Sign Anusvara ..Oriya Sign Visarga - (0x00b40, 0x00b40,), # Oriya Vowel Sign Ii - (0x00b47, 0x00b48,), # Oriya Vowel Sign E ..Oriya Vowel Sign Ai - (0x00b4b, 0x00b4c,), # Oriya Vowel Sign O ..Oriya Vowel Sign Au - (0x00bbf, 0x00bbf,), # Tamil Vowel Sign I - (0x00bc1, 0x00bc2,), # Tamil Vowel Sign U ..Tamil Vowel Sign Uu - (0x00bc6, 0x00bc8,), # Tamil Vowel Sign E ..Tamil Vowel Sign Ai - (0x00bca, 0x00bcc,), # Tamil Vowel Sign O ..Tamil Vowel Sign Au - (0x00c01, 0x00c03,), # Telugu Sign Candrabindu ..Telugu Sign Visarga - (0x00c41, 0x00c44,), # Telugu Vowel Sign U ..Telugu Vowel Sign Vocali - (0x00c82, 0x00c83,), # Kannada Sign Anusvara ..Kannada Sign Visarga - (0x00cbe, 0x00cbe,), # Kannada Vowel Sign Aa - (0x00cc1, 0x00cc1,), # Kannada Vowel Sign U - (0x00cc3, 0x00cc4,), # Kannada Vowel Sign Vocal..Kannada Vowel Sign Vocal - (0x00cf3, 0x00cf3,), # Kannada Sign Combining Anusvara Above Right - (0x00d02, 0x00d03,), # Malayalam Sign Anusvara ..Malayalam Sign Visarga - (0x00d3f, 0x00d40,), # Malayalam Vowel Sign I ..Malayalam Vowel Sign Ii - (0x00d46, 0x00d48,), # Malayalam Vowel Sign E ..Malayalam Vowel Sign Ai - (0x00d4a, 0x00d4c,), # Malayalam Vowel Sign O ..Malayalam Vowel Sign Au - (0x00d82, 0x00d83,), # Sinhala Sign Anusvaraya ..Sinhala Sign Visargaya - (0x00dd0, 0x00dd1,), # Sinhala Vowel Sign Ketti..Sinhala Vowel Sign Diga - (0x00dd8, 0x00dde,), # Sinhala Vowel Sign Gaett..Sinhala Vowel Sign Kombu - (0x00df2, 0x00df3,), # Sinhala Vowel Sign Diga ..Sinhala Vowel Sign Diga - (0x00e33, 0x00e33,), # Thai Character Sara Am - (0x00eb3, 0x00eb3,), # Lao Vowel Sign Am - (0x00f3e, 0x00f3f,), # Tibetan Sign Yar Tshes ..Tibetan Sign Mar Tshes - (0x00f7f, 0x00f7f,), # Tibetan Sign Rnam Bcad - (0x01031, 0x01031,), # Myanmar Vowel Sign E - (0x0103b, 0x0103c,), # Myanmar Consonant Sign M..Myanmar Consonant Sign M - (0x01056, 0x01057,), # Myanmar Vowel Sign Vocal..Myanmar Vowel Sign Vocal - (0x01084, 0x01084,), # Myanmar Vowel Sign Shan E - (0x017b6, 0x017b6,), # Khmer Vowel Sign Aa - (0x017be, 0x017c5,), # Khmer Vowel Sign Oe ..Khmer Vowel Sign Au - (0x017c7, 0x017c8,), # Khmer Sign Reahmuk ..Khmer Sign Yuukaleapintu - (0x01923, 0x01926,), # Limbu Vowel Sign Ee ..Limbu Vowel Sign Au - (0x01929, 0x0192b,), # Limbu Subjoined Letter Y..Limbu Subjoined Letter W - (0x01930, 0x01931,), # Limbu Small Letter Ka ..Limbu Small Letter Nga - (0x01933, 0x01938,), # Limbu Small Letter Ta ..Limbu Small Letter La - (0x01a19, 0x01a1a,), # Buginese Vowel Sign E ..Buginese Vowel Sign O - (0x01a55, 0x01a55,), # Tai Tham Consonant Sign Medial Ra - (0x01a57, 0x01a57,), # Tai Tham Consonant Sign La Tang Lai - (0x01a6d, 0x01a72,), # Tai Tham Vowel Sign Oy ..Tai Tham Vowel Sign Tham - (0x01b04, 0x01b04,), # Balinese Sign Bisah - (0x01b3e, 0x01b41,), # Balinese Vowel Sign Tali..Balinese Vowel Sign Tali - (0x01b82, 0x01b82,), # Sundanese Sign Pangwisad - (0x01ba1, 0x01ba1,), # Sundanese Consonant Sign Pamingkal - (0x01ba6, 0x01ba7,), # Sundanese Vowel Sign Pan..Sundanese Vowel Sign Pan - (0x01be7, 0x01be7,), # Batak Vowel Sign E - (0x01bea, 0x01bec,), # Batak Vowel Sign I ..Batak Vowel Sign O - (0x01bee, 0x01bee,), # Batak Vowel Sign U - (0x01c24, 0x01c2b,), # Lepcha Subjoined Letter ..Lepcha Vowel Sign Uu - (0x01c34, 0x01c35,), # Lepcha Consonant Sign Ny..Lepcha Consonant Sign Ka - (0x01ce1, 0x01ce1,), # Vedic Tone Atharvavedic Independent Svarita - (0x01cf7, 0x01cf7,), # Vedic Sign Atikrama - (0x0a823, 0x0a824,), # Syloti Nagri Vowel Sign ..Syloti Nagri Vowel Sign - (0x0a827, 0x0a827,), # Syloti Nagri Vowel Sign Oo - (0x0a880, 0x0a881,), # Saurashtra Sign Anusvara..Saurashtra Sign Visarga - (0x0a8b4, 0x0a8c3,), # Saurashtra Consonant Sig..Saurashtra Vowel Sign Au - (0x0a952, 0x0a952,), # Rejang Consonant Sign H - (0x0a983, 0x0a983,), # Javanese Sign Wignyan - (0x0a9b4, 0x0a9b5,), # Javanese Vowel Sign Taru..Javanese Vowel Sign Tolo - (0x0a9ba, 0x0a9bb,), # Javanese Vowel Sign Tali..Javanese Vowel Sign Dirg - (0x0a9be, 0x0a9bf,), # Javanese Consonant Sign ..Javanese Consonant Sign - (0x0aa2f, 0x0aa30,), # Cham Vowel Sign O ..Cham Vowel Sign Ai - (0x0aa33, 0x0aa34,), # Cham Consonant Sign Ya ..Cham Consonant Sign Ra - (0x0aa4d, 0x0aa4d,), # Cham Consonant Sign Final H - (0x0aaeb, 0x0aaeb,), # Meetei Mayek Vowel Sign Ii - (0x0aaee, 0x0aaef,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0aaf5, 0x0aaf5,), # Meetei Mayek Vowel Sign Visarga - (0x0abe3, 0x0abe4,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0abe6, 0x0abe7,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0abe9, 0x0abea,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0abec, 0x0abec,), # Meetei Mayek Lum Iyek - (0x11000, 0x11000,), # Brahmi Sign Candrabindu - (0x11002, 0x11002,), # Brahmi Sign Visarga - (0x11082, 0x11082,), # Kaithi Sign Visarga - (0x110b0, 0x110b2,), # Kaithi Vowel Sign Aa ..Kaithi Vowel Sign Ii - (0x110b7, 0x110b8,), # Kaithi Vowel Sign O ..Kaithi Vowel Sign Au - (0x1112c, 0x1112c,), # Chakma Vowel Sign E - (0x11145, 0x11146,), # Chakma Vowel Sign Aa ..Chakma Vowel Sign Ei - (0x11182, 0x11182,), # Sharada Sign Visarga - (0x111b3, 0x111b5,), # Sharada Vowel Sign Aa ..Sharada Vowel Sign Ii - (0x111bf, 0x111bf,), # Sharada Vowel Sign Au - (0x111ce, 0x111ce,), # Sharada Vowel Sign Prishthamatra E - (0x1122c, 0x1122e,), # Khojki Vowel Sign Aa ..Khojki Vowel Sign Ii - (0x11232, 0x11233,), # Khojki Vowel Sign O ..Khojki Vowel Sign Au - (0x112e0, 0x112e2,), # Khudawadi Vowel Sign Aa ..Khudawadi Vowel Sign Ii - (0x11302, 0x11303,), # Grantha Sign Anusvara ..Grantha Sign Visarga - (0x1133f, 0x1133f,), # Grantha Vowel Sign I - (0x11341, 0x11344,), # Grantha Vowel Sign U ..Grantha Vowel Sign Vocal - (0x11347, 0x11348,), # Grantha Vowel Sign Ee ..Grantha Vowel Sign Ai - (0x1134b, 0x1134c,), # Grantha Vowel Sign Oo ..Grantha Vowel Sign Au - (0x11362, 0x11363,), # Grantha Vowel Sign Vocal..Grantha Vowel Sign Vocal - (0x113b9, 0x113ba,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Vowel Sign - (0x113ca, 0x113ca,), # Tulu-tigalari Sign Candra Anunasika - (0x113cc, 0x113cd,), # Tulu-tigalari Sign Anusv..Tulu-tigalari Sign Visar - (0x11435, 0x11437,), # Newa Vowel Sign Aa ..Newa Vowel Sign Ii - (0x11440, 0x11441,), # Newa Vowel Sign O ..Newa Vowel Sign Au - (0x11445, 0x11445,), # Newa Sign Visarga - (0x114b1, 0x114b2,), # Tirhuta Vowel Sign I ..Tirhuta Vowel Sign Ii - (0x114b9, 0x114b9,), # Tirhuta Vowel Sign E - (0x114bb, 0x114bc,), # Tirhuta Vowel Sign Ai ..Tirhuta Vowel Sign O - (0x114be, 0x114be,), # Tirhuta Vowel Sign Au - (0x114c1, 0x114c1,), # Tirhuta Sign Visarga - (0x115b0, 0x115b1,), # Siddham Vowel Sign I ..Siddham Vowel Sign Ii - (0x115b8, 0x115bb,), # Siddham Vowel Sign E ..Siddham Vowel Sign Au - (0x115be, 0x115be,), # Siddham Sign Visarga - (0x11630, 0x11632,), # Modi Vowel Sign Aa ..Modi Vowel Sign Ii - (0x1163b, 0x1163c,), # Modi Vowel Sign O ..Modi Vowel Sign Au - (0x1163e, 0x1163e,), # Modi Sign Visarga - (0x116ac, 0x116ac,), # Takri Sign Visarga - (0x116ae, 0x116af,), # Takri Vowel Sign I ..Takri Vowel Sign Ii - (0x1171e, 0x1171e,), # Ahom Consonant Sign Medial Ra - (0x11726, 0x11726,), # Ahom Vowel Sign E - (0x1182c, 0x1182e,), # Dogra Vowel Sign Aa ..Dogra Vowel Sign Ii - (0x11838, 0x11838,), # Dogra Sign Visarga - (0x11931, 0x11935,), # Dives Akuru Vowel Sign I..Dives Akuru Vowel Sign E - (0x11937, 0x11938,), # Dives Akuru Vowel Sign A..Dives Akuru Vowel Sign O - (0x11940, 0x11940,), # Dives Akuru Medial Ya - (0x11942, 0x11942,), # Dives Akuru Medial Ra - (0x119d1, 0x119d3,), # Nandinagari Vowel Sign A..Nandinagari Vowel Sign I - (0x119dc, 0x119df,), # Nandinagari Vowel Sign O..Nandinagari Sign Visarga - (0x119e4, 0x119e4,), # Nandinagari Vowel Sign Prishthamatra E - (0x11a39, 0x11a39,), # Zanabazar Square Sign Visarga - (0x11a57, 0x11a58,), # Soyombo Vowel Sign Ai ..Soyombo Vowel Sign Au - (0x11a97, 0x11a97,), # Soyombo Sign Visarga - (0x11b61, 0x11b61,), # Sharada Vowel Sign Ooe - (0x11b65, 0x11b65,), # Sharada Vowel Sign Short O - (0x11b67, 0x11b67,), # Sharada Vowel Sign Candra O - (0x11c2f, 0x11c2f,), # Bhaiksuki Vowel Sign Aa - (0x11c3e, 0x11c3e,), # Bhaiksuki Sign Visarga - (0x11ca9, 0x11ca9,), # Marchen Subjoined Letter Ya - (0x11cb1, 0x11cb1,), # Marchen Vowel Sign I - (0x11cb4, 0x11cb4,), # Marchen Vowel Sign O - (0x11d8a, 0x11d8e,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign - (0x11d93, 0x11d94,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign - (0x11d96, 0x11d96,), # Gunjala Gondi Sign Visarga - (0x11ef5, 0x11ef6,), # Makasar Vowel Sign E ..Makasar Vowel Sign O - (0x11f03, 0x11f03,), # Kawi Sign Visarga - (0x11f34, 0x11f35,), # Kawi Vowel Sign Aa ..Kawi Vowel Sign Alternat - (0x11f3e, 0x11f3f,), # Kawi Vowel Sign E ..Kawi Vowel Sign Ai - (0x1612a, 0x1612c,), # Gurung Khema Consonant S..Gurung Khema Consonant S - (0x16f51, 0x16f87,), # Miao Sign Aspiration ..Miao Vowel Sign Ui -) - -GRAPHEME_L = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x01100, 0x0115f,), # Hangul Choseong Kiyeok ..Hangul Choseong Filler - (0x0a960, 0x0a97c,), # Hangul Choseong Tikeut-m..Hangul Choseong Ssangyeo -) - -GRAPHEME_V = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x01160, 0x011a7,), # Hangul Jungseong Filler ..Hangul Jungseong O-yae - (0x0d7b0, 0x0d7c6,), # Hangul Jungseong O-yeo ..Hangul Jungseong Araea-e - (0x16d63, 0x16d63,), # Kirat Rai Vowel Sign Aa - (0x16d67, 0x16d6a,), # Kirat Rai Vowel Sign E ..Kirat Rai Vowel Sign Au -) - -GRAPHEME_T = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x011a8, 0x011ff,), # Hangul Jongseong Kiyeok ..Hangul Jongseong Ssangni - (0x0d7cb, 0x0d7fb,), # Hangul Jongseong Nieun-r..Hangul Jongseong Phieuph -) - -GRAPHEME_LV = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x0ac00, 0x0ac00,), # Hangul Syllable Ga - (0x0ac1c, 0x0ac1c,), # Hangul Syllable Gae - (0x0ac38, 0x0ac38,), # Hangul Syllable Gya - (0x0ac54, 0x0ac54,), # Hangul Syllable Gyae - (0x0ac70, 0x0ac70,), # Hangul Syllable Geo - (0x0ac8c, 0x0ac8c,), # Hangul Syllable Ge - (0x0aca8, 0x0aca8,), # Hangul Syllable Gyeo - (0x0acc4, 0x0acc4,), # Hangul Syllable Gye - (0x0ace0, 0x0ace0,), # Hangul Syllable Go - (0x0acfc, 0x0acfc,), # Hangul Syllable Gwa - (0x0ad18, 0x0ad18,), # Hangul Syllable Gwae - (0x0ad34, 0x0ad34,), # Hangul Syllable Goe - (0x0ad50, 0x0ad50,), # Hangul Syllable Gyo - (0x0ad6c, 0x0ad6c,), # Hangul Syllable Gu - (0x0ad88, 0x0ad88,), # Hangul Syllable Gweo - (0x0ada4, 0x0ada4,), # Hangul Syllable Gwe - (0x0adc0, 0x0adc0,), # Hangul Syllable Gwi - (0x0addc, 0x0addc,), # Hangul Syllable Gyu - (0x0adf8, 0x0adf8,), # Hangul Syllable Geu - (0x0ae14, 0x0ae14,), # Hangul Syllable Gyi - (0x0ae30, 0x0ae30,), # Hangul Syllable Gi - (0x0ae4c, 0x0ae4c,), # Hangul Syllable Gga - (0x0ae68, 0x0ae68,), # Hangul Syllable Ggae - (0x0ae84, 0x0ae84,), # Hangul Syllable Ggya - (0x0aea0, 0x0aea0,), # Hangul Syllable Ggyae - (0x0aebc, 0x0aebc,), # Hangul Syllable Ggeo - (0x0aed8, 0x0aed8,), # Hangul Syllable Gge - (0x0aef4, 0x0aef4,), # Hangul Syllable Ggyeo - (0x0af10, 0x0af10,), # Hangul Syllable Ggye - (0x0af2c, 0x0af2c,), # Hangul Syllable Ggo - (0x0af48, 0x0af48,), # Hangul Syllable Ggwa - (0x0af64, 0x0af64,), # Hangul Syllable Ggwae - (0x0af80, 0x0af80,), # Hangul Syllable Ggoe - (0x0af9c, 0x0af9c,), # Hangul Syllable Ggyo - (0x0afb8, 0x0afb8,), # Hangul Syllable Ggu - (0x0afd4, 0x0afd4,), # Hangul Syllable Ggweo - (0x0aff0, 0x0aff0,), # Hangul Syllable Ggwe - (0x0b00c, 0x0b00c,), # Hangul Syllable Ggwi - (0x0b028, 0x0b028,), # Hangul Syllable Ggyu - (0x0b044, 0x0b044,), # Hangul Syllable Ggeu - (0x0b060, 0x0b060,), # Hangul Syllable Ggyi - (0x0b07c, 0x0b07c,), # Hangul Syllable Ggi - (0x0b098, 0x0b098,), # Hangul Syllable Na - (0x0b0b4, 0x0b0b4,), # Hangul Syllable Nae - (0x0b0d0, 0x0b0d0,), # Hangul Syllable Nya - (0x0b0ec, 0x0b0ec,), # Hangul Syllable Nyae - (0x0b108, 0x0b108,), # Hangul Syllable Neo - (0x0b124, 0x0b124,), # Hangul Syllable Ne - (0x0b140, 0x0b140,), # Hangul Syllable Nyeo - (0x0b15c, 0x0b15c,), # Hangul Syllable Nye - (0x0b178, 0x0b178,), # Hangul Syllable No - (0x0b194, 0x0b194,), # Hangul Syllable Nwa - (0x0b1b0, 0x0b1b0,), # Hangul Syllable Nwae - (0x0b1cc, 0x0b1cc,), # Hangul Syllable Noe - (0x0b1e8, 0x0b1e8,), # Hangul Syllable Nyo - (0x0b204, 0x0b204,), # Hangul Syllable Nu - (0x0b220, 0x0b220,), # Hangul Syllable Nweo - (0x0b23c, 0x0b23c,), # Hangul Syllable Nwe - (0x0b258, 0x0b258,), # Hangul Syllable Nwi - (0x0b274, 0x0b274,), # Hangul Syllable Nyu - (0x0b290, 0x0b290,), # Hangul Syllable Neu - (0x0b2ac, 0x0b2ac,), # Hangul Syllable Nyi - (0x0b2c8, 0x0b2c8,), # Hangul Syllable Ni - (0x0b2e4, 0x0b2e4,), # Hangul Syllable Da - (0x0b300, 0x0b300,), # Hangul Syllable Dae - (0x0b31c, 0x0b31c,), # Hangul Syllable Dya - (0x0b338, 0x0b338,), # Hangul Syllable Dyae - (0x0b354, 0x0b354,), # Hangul Syllable Deo - (0x0b370, 0x0b370,), # Hangul Syllable De - (0x0b38c, 0x0b38c,), # Hangul Syllable Dyeo - (0x0b3a8, 0x0b3a8,), # Hangul Syllable Dye - (0x0b3c4, 0x0b3c4,), # Hangul Syllable Do - (0x0b3e0, 0x0b3e0,), # Hangul Syllable Dwa - (0x0b3fc, 0x0b3fc,), # Hangul Syllable Dwae - (0x0b418, 0x0b418,), # Hangul Syllable Doe - (0x0b434, 0x0b434,), # Hangul Syllable Dyo - (0x0b450, 0x0b450,), # Hangul Syllable Du - (0x0b46c, 0x0b46c,), # Hangul Syllable Dweo - (0x0b488, 0x0b488,), # Hangul Syllable Dwe - (0x0b4a4, 0x0b4a4,), # Hangul Syllable Dwi - (0x0b4c0, 0x0b4c0,), # Hangul Syllable Dyu - (0x0b4dc, 0x0b4dc,), # Hangul Syllable Deu - (0x0b4f8, 0x0b4f8,), # Hangul Syllable Dyi - (0x0b514, 0x0b514,), # Hangul Syllable Di - (0x0b530, 0x0b530,), # Hangul Syllable Dda - (0x0b54c, 0x0b54c,), # Hangul Syllable Ddae - (0x0b568, 0x0b568,), # Hangul Syllable Ddya - (0x0b584, 0x0b584,), # Hangul Syllable Ddyae - (0x0b5a0, 0x0b5a0,), # Hangul Syllable Ddeo - (0x0b5bc, 0x0b5bc,), # Hangul Syllable Dde - (0x0b5d8, 0x0b5d8,), # Hangul Syllable Ddyeo - (0x0b5f4, 0x0b5f4,), # Hangul Syllable Ddye - (0x0b610, 0x0b610,), # Hangul Syllable Ddo - (0x0b62c, 0x0b62c,), # Hangul Syllable Ddwa - (0x0b648, 0x0b648,), # Hangul Syllable Ddwae - (0x0b664, 0x0b664,), # Hangul Syllable Ddoe - (0x0b680, 0x0b680,), # Hangul Syllable Ddyo - (0x0b69c, 0x0b69c,), # Hangul Syllable Ddu - (0x0b6b8, 0x0b6b8,), # Hangul Syllable Ddweo - (0x0b6d4, 0x0b6d4,), # Hangul Syllable Ddwe - (0x0b6f0, 0x0b6f0,), # Hangul Syllable Ddwi - (0x0b70c, 0x0b70c,), # Hangul Syllable Ddyu - (0x0b728, 0x0b728,), # Hangul Syllable Ddeu - (0x0b744, 0x0b744,), # Hangul Syllable Ddyi - (0x0b760, 0x0b760,), # Hangul Syllable Ddi - (0x0b77c, 0x0b77c,), # Hangul Syllable Ra - (0x0b798, 0x0b798,), # Hangul Syllable Rae - (0x0b7b4, 0x0b7b4,), # Hangul Syllable Rya - (0x0b7d0, 0x0b7d0,), # Hangul Syllable Ryae - (0x0b7ec, 0x0b7ec,), # Hangul Syllable Reo - (0x0b808, 0x0b808,), # Hangul Syllable Re - (0x0b824, 0x0b824,), # Hangul Syllable Ryeo - (0x0b840, 0x0b840,), # Hangul Syllable Rye - (0x0b85c, 0x0b85c,), # Hangul Syllable Ro - (0x0b878, 0x0b878,), # Hangul Syllable Rwa - (0x0b894, 0x0b894,), # Hangul Syllable Rwae - (0x0b8b0, 0x0b8b0,), # Hangul Syllable Roe - (0x0b8cc, 0x0b8cc,), # Hangul Syllable Ryo - (0x0b8e8, 0x0b8e8,), # Hangul Syllable Ru - (0x0b904, 0x0b904,), # Hangul Syllable Rweo - (0x0b920, 0x0b920,), # Hangul Syllable Rwe - (0x0b93c, 0x0b93c,), # Hangul Syllable Rwi - (0x0b958, 0x0b958,), # Hangul Syllable Ryu - (0x0b974, 0x0b974,), # Hangul Syllable Reu - (0x0b990, 0x0b990,), # Hangul Syllable Ryi - (0x0b9ac, 0x0b9ac,), # Hangul Syllable Ri - (0x0b9c8, 0x0b9c8,), # Hangul Syllable Ma - (0x0b9e4, 0x0b9e4,), # Hangul Syllable Mae - (0x0ba00, 0x0ba00,), # Hangul Syllable Mya - (0x0ba1c, 0x0ba1c,), # Hangul Syllable Myae - (0x0ba38, 0x0ba38,), # Hangul Syllable Meo - (0x0ba54, 0x0ba54,), # Hangul Syllable Me - (0x0ba70, 0x0ba70,), # Hangul Syllable Myeo - (0x0ba8c, 0x0ba8c,), # Hangul Syllable Mye - (0x0baa8, 0x0baa8,), # Hangul Syllable Mo - (0x0bac4, 0x0bac4,), # Hangul Syllable Mwa - (0x0bae0, 0x0bae0,), # Hangul Syllable Mwae - (0x0bafc, 0x0bafc,), # Hangul Syllable Moe - (0x0bb18, 0x0bb18,), # Hangul Syllable Myo - (0x0bb34, 0x0bb34,), # Hangul Syllable Mu - (0x0bb50, 0x0bb50,), # Hangul Syllable Mweo - (0x0bb6c, 0x0bb6c,), # Hangul Syllable Mwe - (0x0bb88, 0x0bb88,), # Hangul Syllable Mwi - (0x0bba4, 0x0bba4,), # Hangul Syllable Myu - (0x0bbc0, 0x0bbc0,), # Hangul Syllable Meu - (0x0bbdc, 0x0bbdc,), # Hangul Syllable Myi - (0x0bbf8, 0x0bbf8,), # Hangul Syllable Mi - (0x0bc14, 0x0bc14,), # Hangul Syllable Ba - (0x0bc30, 0x0bc30,), # Hangul Syllable Bae - (0x0bc4c, 0x0bc4c,), # Hangul Syllable Bya - (0x0bc68, 0x0bc68,), # Hangul Syllable Byae - (0x0bc84, 0x0bc84,), # Hangul Syllable Beo - (0x0bca0, 0x0bca0,), # Hangul Syllable Be - (0x0bcbc, 0x0bcbc,), # Hangul Syllable Byeo - (0x0bcd8, 0x0bcd8,), # Hangul Syllable Bye - (0x0bcf4, 0x0bcf4,), # Hangul Syllable Bo - (0x0bd10, 0x0bd10,), # Hangul Syllable Bwa - (0x0bd2c, 0x0bd2c,), # Hangul Syllable Bwae - (0x0bd48, 0x0bd48,), # Hangul Syllable Boe - (0x0bd64, 0x0bd64,), # Hangul Syllable Byo - (0x0bd80, 0x0bd80,), # Hangul Syllable Bu - (0x0bd9c, 0x0bd9c,), # Hangul Syllable Bweo - (0x0bdb8, 0x0bdb8,), # Hangul Syllable Bwe - (0x0bdd4, 0x0bdd4,), # Hangul Syllable Bwi - (0x0bdf0, 0x0bdf0,), # Hangul Syllable Byu - (0x0be0c, 0x0be0c,), # Hangul Syllable Beu - (0x0be28, 0x0be28,), # Hangul Syllable Byi - (0x0be44, 0x0be44,), # Hangul Syllable Bi - (0x0be60, 0x0be60,), # Hangul Syllable Bba - (0x0be7c, 0x0be7c,), # Hangul Syllable Bbae - (0x0be98, 0x0be98,), # Hangul Syllable Bbya - (0x0beb4, 0x0beb4,), # Hangul Syllable Bbyae - (0x0bed0, 0x0bed0,), # Hangul Syllable Bbeo - (0x0beec, 0x0beec,), # Hangul Syllable Bbe - (0x0bf08, 0x0bf08,), # Hangul Syllable Bbyeo - (0x0bf24, 0x0bf24,), # Hangul Syllable Bbye - (0x0bf40, 0x0bf40,), # Hangul Syllable Bbo - (0x0bf5c, 0x0bf5c,), # Hangul Syllable Bbwa - (0x0bf78, 0x0bf78,), # Hangul Syllable Bbwae - (0x0bf94, 0x0bf94,), # Hangul Syllable Bboe - (0x0bfb0, 0x0bfb0,), # Hangul Syllable Bbyo - (0x0bfcc, 0x0bfcc,), # Hangul Syllable Bbu - (0x0bfe8, 0x0bfe8,), # Hangul Syllable Bbweo - (0x0c004, 0x0c004,), # Hangul Syllable Bbwe - (0x0c020, 0x0c020,), # Hangul Syllable Bbwi - (0x0c03c, 0x0c03c,), # Hangul Syllable Bbyu - (0x0c058, 0x0c058,), # Hangul Syllable Bbeu - (0x0c074, 0x0c074,), # Hangul Syllable Bbyi - (0x0c090, 0x0c090,), # Hangul Syllable Bbi - (0x0c0ac, 0x0c0ac,), # Hangul Syllable Sa - (0x0c0c8, 0x0c0c8,), # Hangul Syllable Sae - (0x0c0e4, 0x0c0e4,), # Hangul Syllable Sya - (0x0c100, 0x0c100,), # Hangul Syllable Syae - (0x0c11c, 0x0c11c,), # Hangul Syllable Seo - (0x0c138, 0x0c138,), # Hangul Syllable Se - (0x0c154, 0x0c154,), # Hangul Syllable Syeo - (0x0c170, 0x0c170,), # Hangul Syllable Sye - (0x0c18c, 0x0c18c,), # Hangul Syllable So - (0x0c1a8, 0x0c1a8,), # Hangul Syllable Swa - (0x0c1c4, 0x0c1c4,), # Hangul Syllable Swae - (0x0c1e0, 0x0c1e0,), # Hangul Syllable Soe - (0x0c1fc, 0x0c1fc,), # Hangul Syllable Syo - (0x0c218, 0x0c218,), # Hangul Syllable Su - (0x0c234, 0x0c234,), # Hangul Syllable Sweo - (0x0c250, 0x0c250,), # Hangul Syllable Swe - (0x0c26c, 0x0c26c,), # Hangul Syllable Swi - (0x0c288, 0x0c288,), # Hangul Syllable Syu - (0x0c2a4, 0x0c2a4,), # Hangul Syllable Seu - (0x0c2c0, 0x0c2c0,), # Hangul Syllable Syi - (0x0c2dc, 0x0c2dc,), # Hangul Syllable Si - (0x0c2f8, 0x0c2f8,), # Hangul Syllable Ssa - (0x0c314, 0x0c314,), # Hangul Syllable Ssae - (0x0c330, 0x0c330,), # Hangul Syllable Ssya - (0x0c34c, 0x0c34c,), # Hangul Syllable Ssyae - (0x0c368, 0x0c368,), # Hangul Syllable Sseo - (0x0c384, 0x0c384,), # Hangul Syllable Sse - (0x0c3a0, 0x0c3a0,), # Hangul Syllable Ssyeo - (0x0c3bc, 0x0c3bc,), # Hangul Syllable Ssye - (0x0c3d8, 0x0c3d8,), # Hangul Syllable Sso - (0x0c3f4, 0x0c3f4,), # Hangul Syllable Sswa - (0x0c410, 0x0c410,), # Hangul Syllable Sswae - (0x0c42c, 0x0c42c,), # Hangul Syllable Ssoe - (0x0c448, 0x0c448,), # Hangul Syllable Ssyo - (0x0c464, 0x0c464,), # Hangul Syllable Ssu - (0x0c480, 0x0c480,), # Hangul Syllable Ssweo - (0x0c49c, 0x0c49c,), # Hangul Syllable Sswe - (0x0c4b8, 0x0c4b8,), # Hangul Syllable Sswi - (0x0c4d4, 0x0c4d4,), # Hangul Syllable Ssyu - (0x0c4f0, 0x0c4f0,), # Hangul Syllable Sseu - (0x0c50c, 0x0c50c,), # Hangul Syllable Ssyi - (0x0c528, 0x0c528,), # Hangul Syllable Ssi - (0x0c544, 0x0c544,), # Hangul Syllable A - (0x0c560, 0x0c560,), # Hangul Syllable Ae - (0x0c57c, 0x0c57c,), # Hangul Syllable Ya - (0x0c598, 0x0c598,), # Hangul Syllable Yae - (0x0c5b4, 0x0c5b4,), # Hangul Syllable Eo - (0x0c5d0, 0x0c5d0,), # Hangul Syllable E - (0x0c5ec, 0x0c5ec,), # Hangul Syllable Yeo - (0x0c608, 0x0c608,), # Hangul Syllable Ye - (0x0c624, 0x0c624,), # Hangul Syllable O - (0x0c640, 0x0c640,), # Hangul Syllable Wa - (0x0c65c, 0x0c65c,), # Hangul Syllable Wae - (0x0c678, 0x0c678,), # Hangul Syllable Oe - (0x0c694, 0x0c694,), # Hangul Syllable Yo - (0x0c6b0, 0x0c6b0,), # Hangul Syllable U - (0x0c6cc, 0x0c6cc,), # Hangul Syllable Weo - (0x0c6e8, 0x0c6e8,), # Hangul Syllable We - (0x0c704, 0x0c704,), # Hangul Syllable Wi - (0x0c720, 0x0c720,), # Hangul Syllable Yu - (0x0c73c, 0x0c73c,), # Hangul Syllable Eu - (0x0c758, 0x0c758,), # Hangul Syllable Yi - (0x0c774, 0x0c774,), # Hangul Syllable I - (0x0c790, 0x0c790,), # Hangul Syllable Ja - (0x0c7ac, 0x0c7ac,), # Hangul Syllable Jae - (0x0c7c8, 0x0c7c8,), # Hangul Syllable Jya - (0x0c7e4, 0x0c7e4,), # Hangul Syllable Jyae - (0x0c800, 0x0c800,), # Hangul Syllable Jeo - (0x0c81c, 0x0c81c,), # Hangul Syllable Je - (0x0c838, 0x0c838,), # Hangul Syllable Jyeo - (0x0c854, 0x0c854,), # Hangul Syllable Jye - (0x0c870, 0x0c870,), # Hangul Syllable Jo - (0x0c88c, 0x0c88c,), # Hangul Syllable Jwa - (0x0c8a8, 0x0c8a8,), # Hangul Syllable Jwae - (0x0c8c4, 0x0c8c4,), # Hangul Syllable Joe - (0x0c8e0, 0x0c8e0,), # Hangul Syllable Jyo - (0x0c8fc, 0x0c8fc,), # Hangul Syllable Ju - (0x0c918, 0x0c918,), # Hangul Syllable Jweo - (0x0c934, 0x0c934,), # Hangul Syllable Jwe - (0x0c950, 0x0c950,), # Hangul Syllable Jwi - (0x0c96c, 0x0c96c,), # Hangul Syllable Jyu - (0x0c988, 0x0c988,), # Hangul Syllable Jeu - (0x0c9a4, 0x0c9a4,), # Hangul Syllable Jyi - (0x0c9c0, 0x0c9c0,), # Hangul Syllable Ji - (0x0c9dc, 0x0c9dc,), # Hangul Syllable Jja - (0x0c9f8, 0x0c9f8,), # Hangul Syllable Jjae - (0x0ca14, 0x0ca14,), # Hangul Syllable Jjya - (0x0ca30, 0x0ca30,), # Hangul Syllable Jjyae - (0x0ca4c, 0x0ca4c,), # Hangul Syllable Jjeo - (0x0ca68, 0x0ca68,), # Hangul Syllable Jje - (0x0ca84, 0x0ca84,), # Hangul Syllable Jjyeo - (0x0caa0, 0x0caa0,), # Hangul Syllable Jjye - (0x0cabc, 0x0cabc,), # Hangul Syllable Jjo - (0x0cad8, 0x0cad8,), # Hangul Syllable Jjwa - (0x0caf4, 0x0caf4,), # Hangul Syllable Jjwae - (0x0cb10, 0x0cb10,), # Hangul Syllable Jjoe - (0x0cb2c, 0x0cb2c,), # Hangul Syllable Jjyo - (0x0cb48, 0x0cb48,), # Hangul Syllable Jju - (0x0cb64, 0x0cb64,), # Hangul Syllable Jjweo - (0x0cb80, 0x0cb80,), # Hangul Syllable Jjwe - (0x0cb9c, 0x0cb9c,), # Hangul Syllable Jjwi - (0x0cbb8, 0x0cbb8,), # Hangul Syllable Jjyu - (0x0cbd4, 0x0cbd4,), # Hangul Syllable Jjeu - (0x0cbf0, 0x0cbf0,), # Hangul Syllable Jjyi - (0x0cc0c, 0x0cc0c,), # Hangul Syllable Jji - (0x0cc28, 0x0cc28,), # Hangul Syllable Ca - (0x0cc44, 0x0cc44,), # Hangul Syllable Cae - (0x0cc60, 0x0cc60,), # Hangul Syllable Cya - (0x0cc7c, 0x0cc7c,), # Hangul Syllable Cyae - (0x0cc98, 0x0cc98,), # Hangul Syllable Ceo - (0x0ccb4, 0x0ccb4,), # Hangul Syllable Ce - (0x0ccd0, 0x0ccd0,), # Hangul Syllable Cyeo - (0x0ccec, 0x0ccec,), # Hangul Syllable Cye - (0x0cd08, 0x0cd08,), # Hangul Syllable Co - (0x0cd24, 0x0cd24,), # Hangul Syllable Cwa - (0x0cd40, 0x0cd40,), # Hangul Syllable Cwae - (0x0cd5c, 0x0cd5c,), # Hangul Syllable Coe - (0x0cd78, 0x0cd78,), # Hangul Syllable Cyo - (0x0cd94, 0x0cd94,), # Hangul Syllable Cu - (0x0cdb0, 0x0cdb0,), # Hangul Syllable Cweo - (0x0cdcc, 0x0cdcc,), # Hangul Syllable Cwe - (0x0cde8, 0x0cde8,), # Hangul Syllable Cwi - (0x0ce04, 0x0ce04,), # Hangul Syllable Cyu - (0x0ce20, 0x0ce20,), # Hangul Syllable Ceu - (0x0ce3c, 0x0ce3c,), # Hangul Syllable Cyi - (0x0ce58, 0x0ce58,), # Hangul Syllable Ci - (0x0ce74, 0x0ce74,), # Hangul Syllable Ka - (0x0ce90, 0x0ce90,), # Hangul Syllable Kae - (0x0ceac, 0x0ceac,), # Hangul Syllable Kya - (0x0cec8, 0x0cec8,), # Hangul Syllable Kyae - (0x0cee4, 0x0cee4,), # Hangul Syllable Keo - (0x0cf00, 0x0cf00,), # Hangul Syllable Ke - (0x0cf1c, 0x0cf1c,), # Hangul Syllable Kyeo - (0x0cf38, 0x0cf38,), # Hangul Syllable Kye - (0x0cf54, 0x0cf54,), # Hangul Syllable Ko - (0x0cf70, 0x0cf70,), # Hangul Syllable Kwa - (0x0cf8c, 0x0cf8c,), # Hangul Syllable Kwae - (0x0cfa8, 0x0cfa8,), # Hangul Syllable Koe - (0x0cfc4, 0x0cfc4,), # Hangul Syllable Kyo - (0x0cfe0, 0x0cfe0,), # Hangul Syllable Ku - (0x0cffc, 0x0cffc,), # Hangul Syllable Kweo - (0x0d018, 0x0d018,), # Hangul Syllable Kwe - (0x0d034, 0x0d034,), # Hangul Syllable Kwi - (0x0d050, 0x0d050,), # Hangul Syllable Kyu - (0x0d06c, 0x0d06c,), # Hangul Syllable Keu - (0x0d088, 0x0d088,), # Hangul Syllable Kyi - (0x0d0a4, 0x0d0a4,), # Hangul Syllable Ki - (0x0d0c0, 0x0d0c0,), # Hangul Syllable Ta - (0x0d0dc, 0x0d0dc,), # Hangul Syllable Tae - (0x0d0f8, 0x0d0f8,), # Hangul Syllable Tya - (0x0d114, 0x0d114,), # Hangul Syllable Tyae - (0x0d130, 0x0d130,), # Hangul Syllable Teo - (0x0d14c, 0x0d14c,), # Hangul Syllable Te - (0x0d168, 0x0d168,), # Hangul Syllable Tyeo - (0x0d184, 0x0d184,), # Hangul Syllable Tye - (0x0d1a0, 0x0d1a0,), # Hangul Syllable To - (0x0d1bc, 0x0d1bc,), # Hangul Syllable Twa - (0x0d1d8, 0x0d1d8,), # Hangul Syllable Twae - (0x0d1f4, 0x0d1f4,), # Hangul Syllable Toe - (0x0d210, 0x0d210,), # Hangul Syllable Tyo - (0x0d22c, 0x0d22c,), # Hangul Syllable Tu - (0x0d248, 0x0d248,), # Hangul Syllable Tweo - (0x0d264, 0x0d264,), # Hangul Syllable Twe - (0x0d280, 0x0d280,), # Hangul Syllable Twi - (0x0d29c, 0x0d29c,), # Hangul Syllable Tyu - (0x0d2b8, 0x0d2b8,), # Hangul Syllable Teu - (0x0d2d4, 0x0d2d4,), # Hangul Syllable Tyi - (0x0d2f0, 0x0d2f0,), # Hangul Syllable Ti - (0x0d30c, 0x0d30c,), # Hangul Syllable Pa - (0x0d328, 0x0d328,), # Hangul Syllable Pae - (0x0d344, 0x0d344,), # Hangul Syllable Pya - (0x0d360, 0x0d360,), # Hangul Syllable Pyae - (0x0d37c, 0x0d37c,), # Hangul Syllable Peo - (0x0d398, 0x0d398,), # Hangul Syllable Pe - (0x0d3b4, 0x0d3b4,), # Hangul Syllable Pyeo - (0x0d3d0, 0x0d3d0,), # Hangul Syllable Pye - (0x0d3ec, 0x0d3ec,), # Hangul Syllable Po - (0x0d408, 0x0d408,), # Hangul Syllable Pwa - (0x0d424, 0x0d424,), # Hangul Syllable Pwae - (0x0d440, 0x0d440,), # Hangul Syllable Poe - (0x0d45c, 0x0d45c,), # Hangul Syllable Pyo - (0x0d478, 0x0d478,), # Hangul Syllable Pu - (0x0d494, 0x0d494,), # Hangul Syllable Pweo - (0x0d4b0, 0x0d4b0,), # Hangul Syllable Pwe - (0x0d4cc, 0x0d4cc,), # Hangul Syllable Pwi - (0x0d4e8, 0x0d4e8,), # Hangul Syllable Pyu - (0x0d504, 0x0d504,), # Hangul Syllable Peu - (0x0d520, 0x0d520,), # Hangul Syllable Pyi - (0x0d53c, 0x0d53c,), # Hangul Syllable Pi - (0x0d558, 0x0d558,), # Hangul Syllable Ha - (0x0d574, 0x0d574,), # Hangul Syllable Hae - (0x0d590, 0x0d590,), # Hangul Syllable Hya - (0x0d5ac, 0x0d5ac,), # Hangul Syllable Hyae - (0x0d5c8, 0x0d5c8,), # Hangul Syllable Heo - (0x0d5e4, 0x0d5e4,), # Hangul Syllable He - (0x0d600, 0x0d600,), # Hangul Syllable Hyeo - (0x0d61c, 0x0d61c,), # Hangul Syllable Hye - (0x0d638, 0x0d638,), # Hangul Syllable Ho - (0x0d654, 0x0d654,), # Hangul Syllable Hwa - (0x0d670, 0x0d670,), # Hangul Syllable Hwae - (0x0d68c, 0x0d68c,), # Hangul Syllable Hoe - (0x0d6a8, 0x0d6a8,), # Hangul Syllable Hyo - (0x0d6c4, 0x0d6c4,), # Hangul Syllable Hu - (0x0d6e0, 0x0d6e0,), # Hangul Syllable Hweo - (0x0d6fc, 0x0d6fc,), # Hangul Syllable Hwe - (0x0d718, 0x0d718,), # Hangul Syllable Hwi - (0x0d734, 0x0d734,), # Hangul Syllable Hyu - (0x0d750, 0x0d750,), # Hangul Syllable Heu - (0x0d76c, 0x0d76c,), # Hangul Syllable Hyi - (0x0d788, 0x0d788,), # Hangul Syllable Hi -) - -GRAPHEME_LVT = ( - # Source: GraphemeBreakProperty-17.0.0.txt - # Date: 2025-06-30, 06:20:23 GMT - # - (0x0ac01, 0x0ac1b,), # Hangul Syllable Gag ..Hangul Syllable Gah - (0x0ac1d, 0x0ac37,), # Hangul Syllable Gaeg ..Hangul Syllable Gaeh - (0x0ac39, 0x0ac53,), # Hangul Syllable Gyag ..Hangul Syllable Gyah - (0x0ac55, 0x0ac6f,), # Hangul Syllable Gyaeg ..Hangul Syllable Gyaeh - (0x0ac71, 0x0ac8b,), # Hangul Syllable Geog ..Hangul Syllable Geoh - (0x0ac8d, 0x0aca7,), # Hangul Syllable Geg ..Hangul Syllable Geh - (0x0aca9, 0x0acc3,), # Hangul Syllable Gyeog ..Hangul Syllable Gyeoh - (0x0acc5, 0x0acdf,), # Hangul Syllable Gyeg ..Hangul Syllable Gyeh - (0x0ace1, 0x0acfb,), # Hangul Syllable Gog ..Hangul Syllable Goh - (0x0acfd, 0x0ad17,), # Hangul Syllable Gwag ..Hangul Syllable Gwah - (0x0ad19, 0x0ad33,), # Hangul Syllable Gwaeg ..Hangul Syllable Gwaeh - (0x0ad35, 0x0ad4f,), # Hangul Syllable Goeg ..Hangul Syllable Goeh - (0x0ad51, 0x0ad6b,), # Hangul Syllable Gyog ..Hangul Syllable Gyoh - (0x0ad6d, 0x0ad87,), # Hangul Syllable Gug ..Hangul Syllable Guh - (0x0ad89, 0x0ada3,), # Hangul Syllable Gweog ..Hangul Syllable Gweoh - (0x0ada5, 0x0adbf,), # Hangul Syllable Gweg ..Hangul Syllable Gweh - (0x0adc1, 0x0addb,), # Hangul Syllable Gwig ..Hangul Syllable Gwih - (0x0addd, 0x0adf7,), # Hangul Syllable Gyug ..Hangul Syllable Gyuh - (0x0adf9, 0x0ae13,), # Hangul Syllable Geug ..Hangul Syllable Geuh - (0x0ae15, 0x0ae2f,), # Hangul Syllable Gyig ..Hangul Syllable Gyih - (0x0ae31, 0x0ae4b,), # Hangul Syllable Gig ..Hangul Syllable Gih - (0x0ae4d, 0x0ae67,), # Hangul Syllable Ggag ..Hangul Syllable Ggah - (0x0ae69, 0x0ae83,), # Hangul Syllable Ggaeg ..Hangul Syllable Ggaeh - (0x0ae85, 0x0ae9f,), # Hangul Syllable Ggyag ..Hangul Syllable Ggyah - (0x0aea1, 0x0aebb,), # Hangul Syllable Ggyaeg ..Hangul Syllable Ggyaeh - (0x0aebd, 0x0aed7,), # Hangul Syllable Ggeog ..Hangul Syllable Ggeoh - (0x0aed9, 0x0aef3,), # Hangul Syllable Ggeg ..Hangul Syllable Ggeh - (0x0aef5, 0x0af0f,), # Hangul Syllable Ggyeog ..Hangul Syllable Ggyeoh - (0x0af11, 0x0af2b,), # Hangul Syllable Ggyeg ..Hangul Syllable Ggyeh - (0x0af2d, 0x0af47,), # Hangul Syllable Ggog ..Hangul Syllable Ggoh - (0x0af49, 0x0af63,), # Hangul Syllable Ggwag ..Hangul Syllable Ggwah - (0x0af65, 0x0af7f,), # Hangul Syllable Ggwaeg ..Hangul Syllable Ggwaeh - (0x0af81, 0x0af9b,), # Hangul Syllable Ggoeg ..Hangul Syllable Ggoeh - (0x0af9d, 0x0afb7,), # Hangul Syllable Ggyog ..Hangul Syllable Ggyoh - (0x0afb9, 0x0afd3,), # Hangul Syllable Ggug ..Hangul Syllable Gguh - (0x0afd5, 0x0afef,), # Hangul Syllable Ggweog ..Hangul Syllable Ggweoh - (0x0aff1, 0x0b00b,), # Hangul Syllable Ggweg ..Hangul Syllable Ggweh - (0x0b00d, 0x0b027,), # Hangul Syllable Ggwig ..Hangul Syllable Ggwih - (0x0b029, 0x0b043,), # Hangul Syllable Ggyug ..Hangul Syllable Ggyuh - (0x0b045, 0x0b05f,), # Hangul Syllable Ggeug ..Hangul Syllable Ggeuh - (0x0b061, 0x0b07b,), # Hangul Syllable Ggyig ..Hangul Syllable Ggyih - (0x0b07d, 0x0b097,), # Hangul Syllable Ggig ..Hangul Syllable Ggih - (0x0b099, 0x0b0b3,), # Hangul Syllable Nag ..Hangul Syllable Nah - (0x0b0b5, 0x0b0cf,), # Hangul Syllable Naeg ..Hangul Syllable Naeh - (0x0b0d1, 0x0b0eb,), # Hangul Syllable Nyag ..Hangul Syllable Nyah - (0x0b0ed, 0x0b107,), # Hangul Syllable Nyaeg ..Hangul Syllable Nyaeh - (0x0b109, 0x0b123,), # Hangul Syllable Neog ..Hangul Syllable Neoh - (0x0b125, 0x0b13f,), # Hangul Syllable Neg ..Hangul Syllable Neh - (0x0b141, 0x0b15b,), # Hangul Syllable Nyeog ..Hangul Syllable Nyeoh - (0x0b15d, 0x0b177,), # Hangul Syllable Nyeg ..Hangul Syllable Nyeh - (0x0b179, 0x0b193,), # Hangul Syllable Nog ..Hangul Syllable Noh - (0x0b195, 0x0b1af,), # Hangul Syllable Nwag ..Hangul Syllable Nwah - (0x0b1b1, 0x0b1cb,), # Hangul Syllable Nwaeg ..Hangul Syllable Nwaeh - (0x0b1cd, 0x0b1e7,), # Hangul Syllable Noeg ..Hangul Syllable Noeh - (0x0b1e9, 0x0b203,), # Hangul Syllable Nyog ..Hangul Syllable Nyoh - (0x0b205, 0x0b21f,), # Hangul Syllable Nug ..Hangul Syllable Nuh - (0x0b221, 0x0b23b,), # Hangul Syllable Nweog ..Hangul Syllable Nweoh - (0x0b23d, 0x0b257,), # Hangul Syllable Nweg ..Hangul Syllable Nweh - (0x0b259, 0x0b273,), # Hangul Syllable Nwig ..Hangul Syllable Nwih - (0x0b275, 0x0b28f,), # Hangul Syllable Nyug ..Hangul Syllable Nyuh - (0x0b291, 0x0b2ab,), # Hangul Syllable Neug ..Hangul Syllable Neuh - (0x0b2ad, 0x0b2c7,), # Hangul Syllable Nyig ..Hangul Syllable Nyih - (0x0b2c9, 0x0b2e3,), # Hangul Syllable Nig ..Hangul Syllable Nih - (0x0b2e5, 0x0b2ff,), # Hangul Syllable Dag ..Hangul Syllable Dah - (0x0b301, 0x0b31b,), # Hangul Syllable Daeg ..Hangul Syllable Daeh - (0x0b31d, 0x0b337,), # Hangul Syllable Dyag ..Hangul Syllable Dyah - (0x0b339, 0x0b353,), # Hangul Syllable Dyaeg ..Hangul Syllable Dyaeh - (0x0b355, 0x0b36f,), # Hangul Syllable Deog ..Hangul Syllable Deoh - (0x0b371, 0x0b38b,), # Hangul Syllable Deg ..Hangul Syllable Deh - (0x0b38d, 0x0b3a7,), # Hangul Syllable Dyeog ..Hangul Syllable Dyeoh - (0x0b3a9, 0x0b3c3,), # Hangul Syllable Dyeg ..Hangul Syllable Dyeh - (0x0b3c5, 0x0b3df,), # Hangul Syllable Dog ..Hangul Syllable Doh - (0x0b3e1, 0x0b3fb,), # Hangul Syllable Dwag ..Hangul Syllable Dwah - (0x0b3fd, 0x0b417,), # Hangul Syllable Dwaeg ..Hangul Syllable Dwaeh - (0x0b419, 0x0b433,), # Hangul Syllable Doeg ..Hangul Syllable Doeh - (0x0b435, 0x0b44f,), # Hangul Syllable Dyog ..Hangul Syllable Dyoh - (0x0b451, 0x0b46b,), # Hangul Syllable Dug ..Hangul Syllable Duh - (0x0b46d, 0x0b487,), # Hangul Syllable Dweog ..Hangul Syllable Dweoh - (0x0b489, 0x0b4a3,), # Hangul Syllable Dweg ..Hangul Syllable Dweh - (0x0b4a5, 0x0b4bf,), # Hangul Syllable Dwig ..Hangul Syllable Dwih - (0x0b4c1, 0x0b4db,), # Hangul Syllable Dyug ..Hangul Syllable Dyuh - (0x0b4dd, 0x0b4f7,), # Hangul Syllable Deug ..Hangul Syllable Deuh - (0x0b4f9, 0x0b513,), # Hangul Syllable Dyig ..Hangul Syllable Dyih - (0x0b515, 0x0b52f,), # Hangul Syllable Dig ..Hangul Syllable Dih - (0x0b531, 0x0b54b,), # Hangul Syllable Ddag ..Hangul Syllable Ddah - (0x0b54d, 0x0b567,), # Hangul Syllable Ddaeg ..Hangul Syllable Ddaeh - (0x0b569, 0x0b583,), # Hangul Syllable Ddyag ..Hangul Syllable Ddyah - (0x0b585, 0x0b59f,), # Hangul Syllable Ddyaeg ..Hangul Syllable Ddyaeh - (0x0b5a1, 0x0b5bb,), # Hangul Syllable Ddeog ..Hangul Syllable Ddeoh - (0x0b5bd, 0x0b5d7,), # Hangul Syllable Ddeg ..Hangul Syllable Ddeh - (0x0b5d9, 0x0b5f3,), # Hangul Syllable Ddyeog ..Hangul Syllable Ddyeoh - (0x0b5f5, 0x0b60f,), # Hangul Syllable Ddyeg ..Hangul Syllable Ddyeh - (0x0b611, 0x0b62b,), # Hangul Syllable Ddog ..Hangul Syllable Ddoh - (0x0b62d, 0x0b647,), # Hangul Syllable Ddwag ..Hangul Syllable Ddwah - (0x0b649, 0x0b663,), # Hangul Syllable Ddwaeg ..Hangul Syllable Ddwaeh - (0x0b665, 0x0b67f,), # Hangul Syllable Ddoeg ..Hangul Syllable Ddoeh - (0x0b681, 0x0b69b,), # Hangul Syllable Ddyog ..Hangul Syllable Ddyoh - (0x0b69d, 0x0b6b7,), # Hangul Syllable Ddug ..Hangul Syllable Dduh - (0x0b6b9, 0x0b6d3,), # Hangul Syllable Ddweog ..Hangul Syllable Ddweoh - (0x0b6d5, 0x0b6ef,), # Hangul Syllable Ddweg ..Hangul Syllable Ddweh - (0x0b6f1, 0x0b70b,), # Hangul Syllable Ddwig ..Hangul Syllable Ddwih - (0x0b70d, 0x0b727,), # Hangul Syllable Ddyug ..Hangul Syllable Ddyuh - (0x0b729, 0x0b743,), # Hangul Syllable Ddeug ..Hangul Syllable Ddeuh - (0x0b745, 0x0b75f,), # Hangul Syllable Ddyig ..Hangul Syllable Ddyih - (0x0b761, 0x0b77b,), # Hangul Syllable Ddig ..Hangul Syllable Ddih - (0x0b77d, 0x0b797,), # Hangul Syllable Rag ..Hangul Syllable Rah - (0x0b799, 0x0b7b3,), # Hangul Syllable Raeg ..Hangul Syllable Raeh - (0x0b7b5, 0x0b7cf,), # Hangul Syllable Ryag ..Hangul Syllable Ryah - (0x0b7d1, 0x0b7eb,), # Hangul Syllable Ryaeg ..Hangul Syllable Ryaeh - (0x0b7ed, 0x0b807,), # Hangul Syllable Reog ..Hangul Syllable Reoh - (0x0b809, 0x0b823,), # Hangul Syllable Reg ..Hangul Syllable Reh - (0x0b825, 0x0b83f,), # Hangul Syllable Ryeog ..Hangul Syllable Ryeoh - (0x0b841, 0x0b85b,), # Hangul Syllable Ryeg ..Hangul Syllable Ryeh - (0x0b85d, 0x0b877,), # Hangul Syllable Rog ..Hangul Syllable Roh - (0x0b879, 0x0b893,), # Hangul Syllable Rwag ..Hangul Syllable Rwah - (0x0b895, 0x0b8af,), # Hangul Syllable Rwaeg ..Hangul Syllable Rwaeh - (0x0b8b1, 0x0b8cb,), # Hangul Syllable Roeg ..Hangul Syllable Roeh - (0x0b8cd, 0x0b8e7,), # Hangul Syllable Ryog ..Hangul Syllable Ryoh - (0x0b8e9, 0x0b903,), # Hangul Syllable Rug ..Hangul Syllable Ruh - (0x0b905, 0x0b91f,), # Hangul Syllable Rweog ..Hangul Syllable Rweoh - (0x0b921, 0x0b93b,), # Hangul Syllable Rweg ..Hangul Syllable Rweh - (0x0b93d, 0x0b957,), # Hangul Syllable Rwig ..Hangul Syllable Rwih - (0x0b959, 0x0b973,), # Hangul Syllable Ryug ..Hangul Syllable Ryuh - (0x0b975, 0x0b98f,), # Hangul Syllable Reug ..Hangul Syllable Reuh - (0x0b991, 0x0b9ab,), # Hangul Syllable Ryig ..Hangul Syllable Ryih - (0x0b9ad, 0x0b9c7,), # Hangul Syllable Rig ..Hangul Syllable Rih - (0x0b9c9, 0x0b9e3,), # Hangul Syllable Mag ..Hangul Syllable Mah - (0x0b9e5, 0x0b9ff,), # Hangul Syllable Maeg ..Hangul Syllable Maeh - (0x0ba01, 0x0ba1b,), # Hangul Syllable Myag ..Hangul Syllable Myah - (0x0ba1d, 0x0ba37,), # Hangul Syllable Myaeg ..Hangul Syllable Myaeh - (0x0ba39, 0x0ba53,), # Hangul Syllable Meog ..Hangul Syllable Meoh - (0x0ba55, 0x0ba6f,), # Hangul Syllable Meg ..Hangul Syllable Meh - (0x0ba71, 0x0ba8b,), # Hangul Syllable Myeog ..Hangul Syllable Myeoh - (0x0ba8d, 0x0baa7,), # Hangul Syllable Myeg ..Hangul Syllable Myeh - (0x0baa9, 0x0bac3,), # Hangul Syllable Mog ..Hangul Syllable Moh - (0x0bac5, 0x0badf,), # Hangul Syllable Mwag ..Hangul Syllable Mwah - (0x0bae1, 0x0bafb,), # Hangul Syllable Mwaeg ..Hangul Syllable Mwaeh - (0x0bafd, 0x0bb17,), # Hangul Syllable Moeg ..Hangul Syllable Moeh - (0x0bb19, 0x0bb33,), # Hangul Syllable Myog ..Hangul Syllable Myoh - (0x0bb35, 0x0bb4f,), # Hangul Syllable Mug ..Hangul Syllable Muh - (0x0bb51, 0x0bb6b,), # Hangul Syllable Mweog ..Hangul Syllable Mweoh - (0x0bb6d, 0x0bb87,), # Hangul Syllable Mweg ..Hangul Syllable Mweh - (0x0bb89, 0x0bba3,), # Hangul Syllable Mwig ..Hangul Syllable Mwih - (0x0bba5, 0x0bbbf,), # Hangul Syllable Myug ..Hangul Syllable Myuh - (0x0bbc1, 0x0bbdb,), # Hangul Syllable Meug ..Hangul Syllable Meuh - (0x0bbdd, 0x0bbf7,), # Hangul Syllable Myig ..Hangul Syllable Myih - (0x0bbf9, 0x0bc13,), # Hangul Syllable Mig ..Hangul Syllable Mih - (0x0bc15, 0x0bc2f,), # Hangul Syllable Bag ..Hangul Syllable Bah - (0x0bc31, 0x0bc4b,), # Hangul Syllable Baeg ..Hangul Syllable Baeh - (0x0bc4d, 0x0bc67,), # Hangul Syllable Byag ..Hangul Syllable Byah - (0x0bc69, 0x0bc83,), # Hangul Syllable Byaeg ..Hangul Syllable Byaeh - (0x0bc85, 0x0bc9f,), # Hangul Syllable Beog ..Hangul Syllable Beoh - (0x0bca1, 0x0bcbb,), # Hangul Syllable Beg ..Hangul Syllable Beh - (0x0bcbd, 0x0bcd7,), # Hangul Syllable Byeog ..Hangul Syllable Byeoh - (0x0bcd9, 0x0bcf3,), # Hangul Syllable Byeg ..Hangul Syllable Byeh - (0x0bcf5, 0x0bd0f,), # Hangul Syllable Bog ..Hangul Syllable Boh - (0x0bd11, 0x0bd2b,), # Hangul Syllable Bwag ..Hangul Syllable Bwah - (0x0bd2d, 0x0bd47,), # Hangul Syllable Bwaeg ..Hangul Syllable Bwaeh - (0x0bd49, 0x0bd63,), # Hangul Syllable Boeg ..Hangul Syllable Boeh - (0x0bd65, 0x0bd7f,), # Hangul Syllable Byog ..Hangul Syllable Byoh - (0x0bd81, 0x0bd9b,), # Hangul Syllable Bug ..Hangul Syllable Buh - (0x0bd9d, 0x0bdb7,), # Hangul Syllable Bweog ..Hangul Syllable Bweoh - (0x0bdb9, 0x0bdd3,), # Hangul Syllable Bweg ..Hangul Syllable Bweh - (0x0bdd5, 0x0bdef,), # Hangul Syllable Bwig ..Hangul Syllable Bwih - (0x0bdf1, 0x0be0b,), # Hangul Syllable Byug ..Hangul Syllable Byuh - (0x0be0d, 0x0be27,), # Hangul Syllable Beug ..Hangul Syllable Beuh - (0x0be29, 0x0be43,), # Hangul Syllable Byig ..Hangul Syllable Byih - (0x0be45, 0x0be5f,), # Hangul Syllable Big ..Hangul Syllable Bih - (0x0be61, 0x0be7b,), # Hangul Syllable Bbag ..Hangul Syllable Bbah - (0x0be7d, 0x0be97,), # Hangul Syllable Bbaeg ..Hangul Syllable Bbaeh - (0x0be99, 0x0beb3,), # Hangul Syllable Bbyag ..Hangul Syllable Bbyah - (0x0beb5, 0x0becf,), # Hangul Syllable Bbyaeg ..Hangul Syllable Bbyaeh - (0x0bed1, 0x0beeb,), # Hangul Syllable Bbeog ..Hangul Syllable Bbeoh - (0x0beed, 0x0bf07,), # Hangul Syllable Bbeg ..Hangul Syllable Bbeh - (0x0bf09, 0x0bf23,), # Hangul Syllable Bbyeog ..Hangul Syllable Bbyeoh - (0x0bf25, 0x0bf3f,), # Hangul Syllable Bbyeg ..Hangul Syllable Bbyeh - (0x0bf41, 0x0bf5b,), # Hangul Syllable Bbog ..Hangul Syllable Bboh - (0x0bf5d, 0x0bf77,), # Hangul Syllable Bbwag ..Hangul Syllable Bbwah - (0x0bf79, 0x0bf93,), # Hangul Syllable Bbwaeg ..Hangul Syllable Bbwaeh - (0x0bf95, 0x0bfaf,), # Hangul Syllable Bboeg ..Hangul Syllable Bboeh - (0x0bfb1, 0x0bfcb,), # Hangul Syllable Bbyog ..Hangul Syllable Bbyoh - (0x0bfcd, 0x0bfe7,), # Hangul Syllable Bbug ..Hangul Syllable Bbuh - (0x0bfe9, 0x0c003,), # Hangul Syllable Bbweog ..Hangul Syllable Bbweoh - (0x0c005, 0x0c01f,), # Hangul Syllable Bbweg ..Hangul Syllable Bbweh - (0x0c021, 0x0c03b,), # Hangul Syllable Bbwig ..Hangul Syllable Bbwih - (0x0c03d, 0x0c057,), # Hangul Syllable Bbyug ..Hangul Syllable Bbyuh - (0x0c059, 0x0c073,), # Hangul Syllable Bbeug ..Hangul Syllable Bbeuh - (0x0c075, 0x0c08f,), # Hangul Syllable Bbyig ..Hangul Syllable Bbyih - (0x0c091, 0x0c0ab,), # Hangul Syllable Bbig ..Hangul Syllable Bbih - (0x0c0ad, 0x0c0c7,), # Hangul Syllable Sag ..Hangul Syllable Sah - (0x0c0c9, 0x0c0e3,), # Hangul Syllable Saeg ..Hangul Syllable Saeh - (0x0c0e5, 0x0c0ff,), # Hangul Syllable Syag ..Hangul Syllable Syah - (0x0c101, 0x0c11b,), # Hangul Syllable Syaeg ..Hangul Syllable Syaeh - (0x0c11d, 0x0c137,), # Hangul Syllable Seog ..Hangul Syllable Seoh - (0x0c139, 0x0c153,), # Hangul Syllable Seg ..Hangul Syllable Seh - (0x0c155, 0x0c16f,), # Hangul Syllable Syeog ..Hangul Syllable Syeoh - (0x0c171, 0x0c18b,), # Hangul Syllable Syeg ..Hangul Syllable Syeh - (0x0c18d, 0x0c1a7,), # Hangul Syllable Sog ..Hangul Syllable Soh - (0x0c1a9, 0x0c1c3,), # Hangul Syllable Swag ..Hangul Syllable Swah - (0x0c1c5, 0x0c1df,), # Hangul Syllable Swaeg ..Hangul Syllable Swaeh - (0x0c1e1, 0x0c1fb,), # Hangul Syllable Soeg ..Hangul Syllable Soeh - (0x0c1fd, 0x0c217,), # Hangul Syllable Syog ..Hangul Syllable Syoh - (0x0c219, 0x0c233,), # Hangul Syllable Sug ..Hangul Syllable Suh - (0x0c235, 0x0c24f,), # Hangul Syllable Sweog ..Hangul Syllable Sweoh - (0x0c251, 0x0c26b,), # Hangul Syllable Sweg ..Hangul Syllable Sweh - (0x0c26d, 0x0c287,), # Hangul Syllable Swig ..Hangul Syllable Swih - (0x0c289, 0x0c2a3,), # Hangul Syllable Syug ..Hangul Syllable Syuh - (0x0c2a5, 0x0c2bf,), # Hangul Syllable Seug ..Hangul Syllable Seuh - (0x0c2c1, 0x0c2db,), # Hangul Syllable Syig ..Hangul Syllable Syih - (0x0c2dd, 0x0c2f7,), # Hangul Syllable Sig ..Hangul Syllable Sih - (0x0c2f9, 0x0c313,), # Hangul Syllable Ssag ..Hangul Syllable Ssah - (0x0c315, 0x0c32f,), # Hangul Syllable Ssaeg ..Hangul Syllable Ssaeh - (0x0c331, 0x0c34b,), # Hangul Syllable Ssyag ..Hangul Syllable Ssyah - (0x0c34d, 0x0c367,), # Hangul Syllable Ssyaeg ..Hangul Syllable Ssyaeh - (0x0c369, 0x0c383,), # Hangul Syllable Sseog ..Hangul Syllable Sseoh - (0x0c385, 0x0c39f,), # Hangul Syllable Sseg ..Hangul Syllable Sseh - (0x0c3a1, 0x0c3bb,), # Hangul Syllable Ssyeog ..Hangul Syllable Ssyeoh - (0x0c3bd, 0x0c3d7,), # Hangul Syllable Ssyeg ..Hangul Syllable Ssyeh - (0x0c3d9, 0x0c3f3,), # Hangul Syllable Ssog ..Hangul Syllable Ssoh - (0x0c3f5, 0x0c40f,), # Hangul Syllable Sswag ..Hangul Syllable Sswah - (0x0c411, 0x0c42b,), # Hangul Syllable Sswaeg ..Hangul Syllable Sswaeh - (0x0c42d, 0x0c447,), # Hangul Syllable Ssoeg ..Hangul Syllable Ssoeh - (0x0c449, 0x0c463,), # Hangul Syllable Ssyog ..Hangul Syllable Ssyoh - (0x0c465, 0x0c47f,), # Hangul Syllable Ssug ..Hangul Syllable Ssuh - (0x0c481, 0x0c49b,), # Hangul Syllable Ssweog ..Hangul Syllable Ssweoh - (0x0c49d, 0x0c4b7,), # Hangul Syllable Ssweg ..Hangul Syllable Ssweh - (0x0c4b9, 0x0c4d3,), # Hangul Syllable Sswig ..Hangul Syllable Sswih - (0x0c4d5, 0x0c4ef,), # Hangul Syllable Ssyug ..Hangul Syllable Ssyuh - (0x0c4f1, 0x0c50b,), # Hangul Syllable Sseug ..Hangul Syllable Sseuh - (0x0c50d, 0x0c527,), # Hangul Syllable Ssyig ..Hangul Syllable Ssyih - (0x0c529, 0x0c543,), # Hangul Syllable Ssig ..Hangul Syllable Ssih - (0x0c545, 0x0c55f,), # Hangul Syllable Ag ..Hangul Syllable Ah - (0x0c561, 0x0c57b,), # Hangul Syllable Aeg ..Hangul Syllable Aeh - (0x0c57d, 0x0c597,), # Hangul Syllable Yag ..Hangul Syllable Yah - (0x0c599, 0x0c5b3,), # Hangul Syllable Yaeg ..Hangul Syllable Yaeh - (0x0c5b5, 0x0c5cf,), # Hangul Syllable Eog ..Hangul Syllable Eoh - (0x0c5d1, 0x0c5eb,), # Hangul Syllable Eg ..Hangul Syllable Eh - (0x0c5ed, 0x0c607,), # Hangul Syllable Yeog ..Hangul Syllable Yeoh - (0x0c609, 0x0c623,), # Hangul Syllable Yeg ..Hangul Syllable Yeh - (0x0c625, 0x0c63f,), # Hangul Syllable Og ..Hangul Syllable Oh - (0x0c641, 0x0c65b,), # Hangul Syllable Wag ..Hangul Syllable Wah - (0x0c65d, 0x0c677,), # Hangul Syllable Waeg ..Hangul Syllable Waeh - (0x0c679, 0x0c693,), # Hangul Syllable Oeg ..Hangul Syllable Oeh - (0x0c695, 0x0c6af,), # Hangul Syllable Yog ..Hangul Syllable Yoh - (0x0c6b1, 0x0c6cb,), # Hangul Syllable Ug ..Hangul Syllable Uh - (0x0c6cd, 0x0c6e7,), # Hangul Syllable Weog ..Hangul Syllable Weoh - (0x0c6e9, 0x0c703,), # Hangul Syllable Weg ..Hangul Syllable Weh - (0x0c705, 0x0c71f,), # Hangul Syllable Wig ..Hangul Syllable Wih - (0x0c721, 0x0c73b,), # Hangul Syllable Yug ..Hangul Syllable Yuh - (0x0c73d, 0x0c757,), # Hangul Syllable Eug ..Hangul Syllable Euh - (0x0c759, 0x0c773,), # Hangul Syllable Yig ..Hangul Syllable Yih - (0x0c775, 0x0c78f,), # Hangul Syllable Ig ..Hangul Syllable Ih - (0x0c791, 0x0c7ab,), # Hangul Syllable Jag ..Hangul Syllable Jah - (0x0c7ad, 0x0c7c7,), # Hangul Syllable Jaeg ..Hangul Syllable Jaeh - (0x0c7c9, 0x0c7e3,), # Hangul Syllable Jyag ..Hangul Syllable Jyah - (0x0c7e5, 0x0c7ff,), # Hangul Syllable Jyaeg ..Hangul Syllable Jyaeh - (0x0c801, 0x0c81b,), # Hangul Syllable Jeog ..Hangul Syllable Jeoh - (0x0c81d, 0x0c837,), # Hangul Syllable Jeg ..Hangul Syllable Jeh - (0x0c839, 0x0c853,), # Hangul Syllable Jyeog ..Hangul Syllable Jyeoh - (0x0c855, 0x0c86f,), # Hangul Syllable Jyeg ..Hangul Syllable Jyeh - (0x0c871, 0x0c88b,), # Hangul Syllable Jog ..Hangul Syllable Joh - (0x0c88d, 0x0c8a7,), # Hangul Syllable Jwag ..Hangul Syllable Jwah - (0x0c8a9, 0x0c8c3,), # Hangul Syllable Jwaeg ..Hangul Syllable Jwaeh - (0x0c8c5, 0x0c8df,), # Hangul Syllable Joeg ..Hangul Syllable Joeh - (0x0c8e1, 0x0c8fb,), # Hangul Syllable Jyog ..Hangul Syllable Jyoh - (0x0c8fd, 0x0c917,), # Hangul Syllable Jug ..Hangul Syllable Juh - (0x0c919, 0x0c933,), # Hangul Syllable Jweog ..Hangul Syllable Jweoh - (0x0c935, 0x0c94f,), # Hangul Syllable Jweg ..Hangul Syllable Jweh - (0x0c951, 0x0c96b,), # Hangul Syllable Jwig ..Hangul Syllable Jwih - (0x0c96d, 0x0c987,), # Hangul Syllable Jyug ..Hangul Syllable Jyuh - (0x0c989, 0x0c9a3,), # Hangul Syllable Jeug ..Hangul Syllable Jeuh - (0x0c9a5, 0x0c9bf,), # Hangul Syllable Jyig ..Hangul Syllable Jyih - (0x0c9c1, 0x0c9db,), # Hangul Syllable Jig ..Hangul Syllable Jih - (0x0c9dd, 0x0c9f7,), # Hangul Syllable Jjag ..Hangul Syllable Jjah - (0x0c9f9, 0x0ca13,), # Hangul Syllable Jjaeg ..Hangul Syllable Jjaeh - (0x0ca15, 0x0ca2f,), # Hangul Syllable Jjyag ..Hangul Syllable Jjyah - (0x0ca31, 0x0ca4b,), # Hangul Syllable Jjyaeg ..Hangul Syllable Jjyaeh - (0x0ca4d, 0x0ca67,), # Hangul Syllable Jjeog ..Hangul Syllable Jjeoh - (0x0ca69, 0x0ca83,), # Hangul Syllable Jjeg ..Hangul Syllable Jjeh - (0x0ca85, 0x0ca9f,), # Hangul Syllable Jjyeog ..Hangul Syllable Jjyeoh - (0x0caa1, 0x0cabb,), # Hangul Syllable Jjyeg ..Hangul Syllable Jjyeh - (0x0cabd, 0x0cad7,), # Hangul Syllable Jjog ..Hangul Syllable Jjoh - (0x0cad9, 0x0caf3,), # Hangul Syllable Jjwag ..Hangul Syllable Jjwah - (0x0caf5, 0x0cb0f,), # Hangul Syllable Jjwaeg ..Hangul Syllable Jjwaeh - (0x0cb11, 0x0cb2b,), # Hangul Syllable Jjoeg ..Hangul Syllable Jjoeh - (0x0cb2d, 0x0cb47,), # Hangul Syllable Jjyog ..Hangul Syllable Jjyoh - (0x0cb49, 0x0cb63,), # Hangul Syllable Jjug ..Hangul Syllable Jjuh - (0x0cb65, 0x0cb7f,), # Hangul Syllable Jjweog ..Hangul Syllable Jjweoh - (0x0cb81, 0x0cb9b,), # Hangul Syllable Jjweg ..Hangul Syllable Jjweh - (0x0cb9d, 0x0cbb7,), # Hangul Syllable Jjwig ..Hangul Syllable Jjwih - (0x0cbb9, 0x0cbd3,), # Hangul Syllable Jjyug ..Hangul Syllable Jjyuh - (0x0cbd5, 0x0cbef,), # Hangul Syllable Jjeug ..Hangul Syllable Jjeuh - (0x0cbf1, 0x0cc0b,), # Hangul Syllable Jjyig ..Hangul Syllable Jjyih - (0x0cc0d, 0x0cc27,), # Hangul Syllable Jjig ..Hangul Syllable Jjih - (0x0cc29, 0x0cc43,), # Hangul Syllable Cag ..Hangul Syllable Cah - (0x0cc45, 0x0cc5f,), # Hangul Syllable Caeg ..Hangul Syllable Caeh - (0x0cc61, 0x0cc7b,), # Hangul Syllable Cyag ..Hangul Syllable Cyah - (0x0cc7d, 0x0cc97,), # Hangul Syllable Cyaeg ..Hangul Syllable Cyaeh - (0x0cc99, 0x0ccb3,), # Hangul Syllable Ceog ..Hangul Syllable Ceoh - (0x0ccb5, 0x0cccf,), # Hangul Syllable Ceg ..Hangul Syllable Ceh - (0x0ccd1, 0x0cceb,), # Hangul Syllable Cyeog ..Hangul Syllable Cyeoh - (0x0cced, 0x0cd07,), # Hangul Syllable Cyeg ..Hangul Syllable Cyeh - (0x0cd09, 0x0cd23,), # Hangul Syllable Cog ..Hangul Syllable Coh - (0x0cd25, 0x0cd3f,), # Hangul Syllable Cwag ..Hangul Syllable Cwah - (0x0cd41, 0x0cd5b,), # Hangul Syllable Cwaeg ..Hangul Syllable Cwaeh - (0x0cd5d, 0x0cd77,), # Hangul Syllable Coeg ..Hangul Syllable Coeh - (0x0cd79, 0x0cd93,), # Hangul Syllable Cyog ..Hangul Syllable Cyoh - (0x0cd95, 0x0cdaf,), # Hangul Syllable Cug ..Hangul Syllable Cuh - (0x0cdb1, 0x0cdcb,), # Hangul Syllable Cweog ..Hangul Syllable Cweoh - (0x0cdcd, 0x0cde7,), # Hangul Syllable Cweg ..Hangul Syllable Cweh - (0x0cde9, 0x0ce03,), # Hangul Syllable Cwig ..Hangul Syllable Cwih - (0x0ce05, 0x0ce1f,), # Hangul Syllable Cyug ..Hangul Syllable Cyuh - (0x0ce21, 0x0ce3b,), # Hangul Syllable Ceug ..Hangul Syllable Ceuh - (0x0ce3d, 0x0ce57,), # Hangul Syllable Cyig ..Hangul Syllable Cyih - (0x0ce59, 0x0ce73,), # Hangul Syllable Cig ..Hangul Syllable Cih - (0x0ce75, 0x0ce8f,), # Hangul Syllable Kag ..Hangul Syllable Kah - (0x0ce91, 0x0ceab,), # Hangul Syllable Kaeg ..Hangul Syllable Kaeh - (0x0cead, 0x0cec7,), # Hangul Syllable Kyag ..Hangul Syllable Kyah - (0x0cec9, 0x0cee3,), # Hangul Syllable Kyaeg ..Hangul Syllable Kyaeh - (0x0cee5, 0x0ceff,), # Hangul Syllable Keog ..Hangul Syllable Keoh - (0x0cf01, 0x0cf1b,), # Hangul Syllable Keg ..Hangul Syllable Keh - (0x0cf1d, 0x0cf37,), # Hangul Syllable Kyeog ..Hangul Syllable Kyeoh - (0x0cf39, 0x0cf53,), # Hangul Syllable Kyeg ..Hangul Syllable Kyeh - (0x0cf55, 0x0cf6f,), # Hangul Syllable Kog ..Hangul Syllable Koh - (0x0cf71, 0x0cf8b,), # Hangul Syllable Kwag ..Hangul Syllable Kwah - (0x0cf8d, 0x0cfa7,), # Hangul Syllable Kwaeg ..Hangul Syllable Kwaeh - (0x0cfa9, 0x0cfc3,), # Hangul Syllable Koeg ..Hangul Syllable Koeh - (0x0cfc5, 0x0cfdf,), # Hangul Syllable Kyog ..Hangul Syllable Kyoh - (0x0cfe1, 0x0cffb,), # Hangul Syllable Kug ..Hangul Syllable Kuh - (0x0cffd, 0x0d017,), # Hangul Syllable Kweog ..Hangul Syllable Kweoh - (0x0d019, 0x0d033,), # Hangul Syllable Kweg ..Hangul Syllable Kweh - (0x0d035, 0x0d04f,), # Hangul Syllable Kwig ..Hangul Syllable Kwih - (0x0d051, 0x0d06b,), # Hangul Syllable Kyug ..Hangul Syllable Kyuh - (0x0d06d, 0x0d087,), # Hangul Syllable Keug ..Hangul Syllable Keuh - (0x0d089, 0x0d0a3,), # Hangul Syllable Kyig ..Hangul Syllable Kyih - (0x0d0a5, 0x0d0bf,), # Hangul Syllable Kig ..Hangul Syllable Kih - (0x0d0c1, 0x0d0db,), # Hangul Syllable Tag ..Hangul Syllable Tah - (0x0d0dd, 0x0d0f7,), # Hangul Syllable Taeg ..Hangul Syllable Taeh - (0x0d0f9, 0x0d113,), # Hangul Syllable Tyag ..Hangul Syllable Tyah - (0x0d115, 0x0d12f,), # Hangul Syllable Tyaeg ..Hangul Syllable Tyaeh - (0x0d131, 0x0d14b,), # Hangul Syllable Teog ..Hangul Syllable Teoh - (0x0d14d, 0x0d167,), # Hangul Syllable Teg ..Hangul Syllable Teh - (0x0d169, 0x0d183,), # Hangul Syllable Tyeog ..Hangul Syllable Tyeoh - (0x0d185, 0x0d19f,), # Hangul Syllable Tyeg ..Hangul Syllable Tyeh - (0x0d1a1, 0x0d1bb,), # Hangul Syllable Tog ..Hangul Syllable Toh - (0x0d1bd, 0x0d1d7,), # Hangul Syllable Twag ..Hangul Syllable Twah - (0x0d1d9, 0x0d1f3,), # Hangul Syllable Twaeg ..Hangul Syllable Twaeh - (0x0d1f5, 0x0d20f,), # Hangul Syllable Toeg ..Hangul Syllable Toeh - (0x0d211, 0x0d22b,), # Hangul Syllable Tyog ..Hangul Syllable Tyoh - (0x0d22d, 0x0d247,), # Hangul Syllable Tug ..Hangul Syllable Tuh - (0x0d249, 0x0d263,), # Hangul Syllable Tweog ..Hangul Syllable Tweoh - (0x0d265, 0x0d27f,), # Hangul Syllable Tweg ..Hangul Syllable Tweh - (0x0d281, 0x0d29b,), # Hangul Syllable Twig ..Hangul Syllable Twih - (0x0d29d, 0x0d2b7,), # Hangul Syllable Tyug ..Hangul Syllable Tyuh - (0x0d2b9, 0x0d2d3,), # Hangul Syllable Teug ..Hangul Syllable Teuh - (0x0d2d5, 0x0d2ef,), # Hangul Syllable Tyig ..Hangul Syllable Tyih - (0x0d2f1, 0x0d30b,), # Hangul Syllable Tig ..Hangul Syllable Tih - (0x0d30d, 0x0d327,), # Hangul Syllable Pag ..Hangul Syllable Pah - (0x0d329, 0x0d343,), # Hangul Syllable Paeg ..Hangul Syllable Paeh - (0x0d345, 0x0d35f,), # Hangul Syllable Pyag ..Hangul Syllable Pyah - (0x0d361, 0x0d37b,), # Hangul Syllable Pyaeg ..Hangul Syllable Pyaeh - (0x0d37d, 0x0d397,), # Hangul Syllable Peog ..Hangul Syllable Peoh - (0x0d399, 0x0d3b3,), # Hangul Syllable Peg ..Hangul Syllable Peh - (0x0d3b5, 0x0d3cf,), # Hangul Syllable Pyeog ..Hangul Syllable Pyeoh - (0x0d3d1, 0x0d3eb,), # Hangul Syllable Pyeg ..Hangul Syllable Pyeh - (0x0d3ed, 0x0d407,), # Hangul Syllable Pog ..Hangul Syllable Poh - (0x0d409, 0x0d423,), # Hangul Syllable Pwag ..Hangul Syllable Pwah - (0x0d425, 0x0d43f,), # Hangul Syllable Pwaeg ..Hangul Syllable Pwaeh - (0x0d441, 0x0d45b,), # Hangul Syllable Poeg ..Hangul Syllable Poeh - (0x0d45d, 0x0d477,), # Hangul Syllable Pyog ..Hangul Syllable Pyoh - (0x0d479, 0x0d493,), # Hangul Syllable Pug ..Hangul Syllable Puh - (0x0d495, 0x0d4af,), # Hangul Syllable Pweog ..Hangul Syllable Pweoh - (0x0d4b1, 0x0d4cb,), # Hangul Syllable Pweg ..Hangul Syllable Pweh - (0x0d4cd, 0x0d4e7,), # Hangul Syllable Pwig ..Hangul Syllable Pwih - (0x0d4e9, 0x0d503,), # Hangul Syllable Pyug ..Hangul Syllable Pyuh - (0x0d505, 0x0d51f,), # Hangul Syllable Peug ..Hangul Syllable Peuh - (0x0d521, 0x0d53b,), # Hangul Syllable Pyig ..Hangul Syllable Pyih - (0x0d53d, 0x0d557,), # Hangul Syllable Pig ..Hangul Syllable Pih - (0x0d559, 0x0d573,), # Hangul Syllable Hag ..Hangul Syllable Hah - (0x0d575, 0x0d58f,), # Hangul Syllable Haeg ..Hangul Syllable Haeh - (0x0d591, 0x0d5ab,), # Hangul Syllable Hyag ..Hangul Syllable Hyah - (0x0d5ad, 0x0d5c7,), # Hangul Syllable Hyaeg ..Hangul Syllable Hyaeh - (0x0d5c9, 0x0d5e3,), # Hangul Syllable Heog ..Hangul Syllable Heoh - (0x0d5e5, 0x0d5ff,), # Hangul Syllable Heg ..Hangul Syllable Heh - (0x0d601, 0x0d61b,), # Hangul Syllable Hyeog ..Hangul Syllable Hyeoh - (0x0d61d, 0x0d637,), # Hangul Syllable Hyeg ..Hangul Syllable Hyeh - (0x0d639, 0x0d653,), # Hangul Syllable Hog ..Hangul Syllable Hoh - (0x0d655, 0x0d66f,), # Hangul Syllable Hwag ..Hangul Syllable Hwah - (0x0d671, 0x0d68b,), # Hangul Syllable Hwaeg ..Hangul Syllable Hwaeh - (0x0d68d, 0x0d6a7,), # Hangul Syllable Hoeg ..Hangul Syllable Hoeh - (0x0d6a9, 0x0d6c3,), # Hangul Syllable Hyog ..Hangul Syllable Hyoh - (0x0d6c5, 0x0d6df,), # Hangul Syllable Hug ..Hangul Syllable Huh - (0x0d6e1, 0x0d6fb,), # Hangul Syllable Hweog ..Hangul Syllable Hweoh - (0x0d6fd, 0x0d717,), # Hangul Syllable Hweg ..Hangul Syllable Hweh - (0x0d719, 0x0d733,), # Hangul Syllable Hwig ..Hangul Syllable Hwih - (0x0d735, 0x0d74f,), # Hangul Syllable Hyug ..Hangul Syllable Hyuh - (0x0d751, 0x0d76b,), # Hangul Syllable Heug ..Hangul Syllable Heuh - (0x0d76d, 0x0d787,), # Hangul Syllable Hyig ..Hangul Syllable Hyih - (0x0d789, 0x0d7a3,), # Hangul Syllable Hig ..Hangul Syllable Hih -) - -EXTENDED_PICTOGRAPHIC = ( - # Source: emoji-data.txt - # Date: 2025-07-25, 17:54:31 GMT - # - (0x000a9, 0x000a9,), # Copyright Sign - (0x000ae, 0x000ae,), # Registered Sign - (0x0203c, 0x0203c,), # Double Exclamation Mark - (0x02049, 0x02049,), # Exclamation Question Mark - (0x02122, 0x02122,), # Trade Mark Sign - (0x02139, 0x02139,), # Information Source - (0x02194, 0x02199,), # Left Right Arrow ..South West Arrow - (0x021a9, 0x021aa,), # Leftwards Arrow With Hoo..Rightwards Arrow With Ho - (0x0231a, 0x0231b,), # Watch ..Hourglass - (0x02328, 0x02328,), # Keyboard - (0x023cf, 0x023cf,), # Eject Symbol - (0x023e9, 0x023f3,), # Black Right-pointing Dou..Hourglass With Flowing S - (0x023f8, 0x023fa,), # Double Vertical Bar ..Black Circle For Record - (0x024c2, 0x024c2,), # Circled Latin Capital Letter M - (0x025aa, 0x025ab,), # Black Small Square ..White Small Square - (0x025b6, 0x025b6,), # Black Right-pointing Triangle - (0x025c0, 0x025c0,), # Black Left-pointing Triangle - (0x025fb, 0x025fe,), # White Medium Square ..Black Medium Small Squar - (0x02600, 0x02604,), # Black Sun With Rays ..Comet - (0x0260e, 0x0260e,), # Black Telephone - (0x02611, 0x02611,), # Ballot Box With Check - (0x02614, 0x02615,), # Umbrella With Rain Drops..Hot Beverage - (0x02618, 0x02618,), # Shamrock - (0x0261d, 0x0261d,), # White Up Pointing Index - (0x02620, 0x02620,), # Skull And Crossbones - (0x02622, 0x02623,), # Radioactive Sign ..Biohazard Sign - (0x02626, 0x02626,), # Orthodox Cross - (0x0262a, 0x0262a,), # Star And Crescent - (0x0262e, 0x0262f,), # Peace Symbol ..Yin Yang - (0x02638, 0x0263a,), # Wheel Of Dharma ..White Smiling Face - (0x02640, 0x02640,), # Female Sign - (0x02642, 0x02642,), # Male Sign - (0x02648, 0x02653,), # Aries ..Pisces - (0x0265f, 0x02660,), # Black Chess Pawn ..Black Spade Suit - (0x02663, 0x02663,), # Black Club Suit - (0x02665, 0x02666,), # Black Heart Suit ..Black Diamond Suit - (0x02668, 0x02668,), # Hot Springs - (0x0267b, 0x0267b,), # Black Universal Recycling Symbol - (0x0267e, 0x0267f,), # Permanent Paper Sign ..Wheelchair Symbol - (0x02692, 0x02697,), # Hammer And Pick ..Alembic - (0x02699, 0x02699,), # Gear - (0x0269b, 0x0269c,), # Atom Symbol ..Fleur-de-lis - (0x026a0, 0x026a1,), # Warning Sign ..High Voltage Sign - (0x026a7, 0x026a7,), # Male With Stroke And Male And Female Sign - (0x026aa, 0x026ab,), # Medium White Circle ..Medium Black Circle - (0x026b0, 0x026b1,), # Coffin ..Funeral Urn - (0x026bd, 0x026be,), # Soccer Ball ..Baseball - (0x026c4, 0x026c5,), # Snowman Without Snow ..Sun Behind Cloud - (0x026c8, 0x026c8,), # Thunder Cloud And Rain - (0x026ce, 0x026cf,), # Ophiuchus ..Pick - (0x026d1, 0x026d1,), # Helmet With White Cross - (0x026d3, 0x026d4,), # Chains ..No Entry - (0x026e9, 0x026ea,), # Shinto Shrine ..Church - (0x026f0, 0x026f5,), # Mountain ..Sailboat - (0x026f7, 0x026fa,), # Skier ..Tent - (0x026fd, 0x026fd,), # Fuel Pump - (0x02702, 0x02702,), # Black Scissors - (0x02705, 0x02705,), # White Heavy Check Mark - (0x02708, 0x0270d,), # Airplane ..Writing Hand - (0x0270f, 0x0270f,), # Pencil - (0x02712, 0x02712,), # Black Nib - (0x02714, 0x02714,), # Heavy Check Mark - (0x02716, 0x02716,), # Heavy Multiplication X - (0x0271d, 0x0271d,), # Latin Cross - (0x02721, 0x02721,), # Star Of David - (0x02728, 0x02728,), # Sparkles - (0x02733, 0x02734,), # Eight Spoked Asterisk ..Eight Pointed Black Star - (0x02744, 0x02744,), # Snowflake - (0x02747, 0x02747,), # Sparkle - (0x0274c, 0x0274c,), # Cross Mark - (0x0274e, 0x0274e,), # Negative Squared Cross Mark - (0x02753, 0x02755,), # Black Question Mark Orna..White Exclamation Mark O - (0x02757, 0x02757,), # Heavy Exclamation Mark Symbol - (0x02763, 0x02764,), # Heavy Heart Exclamation ..Heavy Black Heart - (0x02795, 0x02797,), # Heavy Plus Sign ..Heavy Division Sign - (0x027a1, 0x027a1,), # Black Rightwards Arrow - (0x027b0, 0x027b0,), # Curly Loop - (0x027bf, 0x027bf,), # Double Curly Loop - (0x02934, 0x02935,), # Arrow Pointing Rightward..Arrow Pointing Rightward - (0x02b05, 0x02b07,), # Leftwards Black Arrow ..Downwards Black Arrow - (0x02b1b, 0x02b1c,), # Black Large Square ..White Large Square - (0x02b50, 0x02b50,), # White Medium Star - (0x02b55, 0x02b55,), # Heavy Large Circle - (0x03030, 0x03030,), # Wavy Dash - (0x0303d, 0x0303d,), # Part Alternation Mark - (0x03297, 0x03297,), # Circled Ideograph Congratulation - (0x03299, 0x03299,), # Circled Ideograph Secret - (0x1f004, 0x1f004,), # Mahjong Tile Red Dragon - (0x1f02c, 0x1f02f,), # (nil) - (0x1f094, 0x1f09f,), # (nil) - (0x1f0af, 0x1f0b0,), # (nil) - (0x1f0c0, 0x1f0c0,), # (nil) - (0x1f0cf, 0x1f0d0,), # Playing Card Black Joker..(nil) - (0x1f0f6, 0x1f0ff,), # (nil) - (0x1f170, 0x1f171,), # Negative Squared Latin C..Negative Squared Latin C - (0x1f17e, 0x1f17f,), # Negative Squared Latin C..Negative Squared Latin C - (0x1f18e, 0x1f18e,), # Negative Squared Ab - (0x1f191, 0x1f19a,), # Squared Cl ..Squared Vs - (0x1f1ae, 0x1f1e5,), # (nil) - (0x1f201, 0x1f20f,), # Squared Katakana Koko ..(nil) - (0x1f21a, 0x1f21a,), # Squared Cjk Unified Ideograph-7121 - (0x1f22f, 0x1f22f,), # Squared Cjk Unified Ideograph-6307 - (0x1f232, 0x1f23a,), # Squared Cjk Unified Ideo..Squared Cjk Unified Ideo - (0x1f23c, 0x1f23f,), # (nil) - (0x1f249, 0x1f25f,), # (nil) - (0x1f266, 0x1f321,), # (nil) ..Thermometer - (0x1f324, 0x1f393,), # White Sun With Small Clo..Graduation Cap - (0x1f396, 0x1f397,), # Military Medal ..Reminder Ribbon - (0x1f399, 0x1f39b,), # Studio Microphone ..Control Knobs - (0x1f39e, 0x1f3f0,), # Film Frames ..European Castle - (0x1f3f3, 0x1f3f5,), # Waving White Flag ..Rosette - (0x1f3f7, 0x1f3fa,), # Label ..Amphora - (0x1f400, 0x1f4fd,), # Rat ..Film Projector - (0x1f4ff, 0x1f53d,), # Prayer Beads ..Down-pointing Small Red - (0x1f549, 0x1f54e,), # Om Symbol ..Menorah With Nine Branch - (0x1f550, 0x1f567,), # Clock Face One Oclock ..Clock Face Twelve-thirty - (0x1f56f, 0x1f570,), # Candle ..Mantelpiece Clock - (0x1f573, 0x1f57a,), # Hole ..Man Dancing - (0x1f587, 0x1f587,), # Linked Paperclips - (0x1f58a, 0x1f58d,), # Lower Left Ballpoint Pen..Lower Left Crayon - (0x1f590, 0x1f590,), # Raised Hand With Fingers Splayed - (0x1f595, 0x1f596,), # Reversed Hand With Middl..Raised Hand With Part Be - (0x1f5a4, 0x1f5a5,), # Black Heart ..Desktop Computer - (0x1f5a8, 0x1f5a8,), # Printer - (0x1f5b1, 0x1f5b2,), # Three Button Mouse ..Trackball - (0x1f5bc, 0x1f5bc,), # Frame With Picture - (0x1f5c2, 0x1f5c4,), # Card Index Dividers ..File Cabinet - (0x1f5d1, 0x1f5d3,), # Wastebasket ..Spiral Calendar Pad - (0x1f5dc, 0x1f5de,), # Compression ..Rolled-up Newspaper - (0x1f5e1, 0x1f5e1,), # Dagger Knife - (0x1f5e3, 0x1f5e3,), # Speaking Head In Silhouette - (0x1f5e8, 0x1f5e8,), # Left Speech Bubble - (0x1f5ef, 0x1f5ef,), # Right Anger Bubble - (0x1f5f3, 0x1f5f3,), # Ballot Box With Ballot - (0x1f5fa, 0x1f64f,), # World Map ..Person With Folded Hands - (0x1f680, 0x1f6c5,), # Rocket ..Left Luggage - (0x1f6cb, 0x1f6d2,), # Couch And Lamp ..Shopping Trolley - (0x1f6d5, 0x1f6e5,), # Hindu Temple ..Motor Boat - (0x1f6e9, 0x1f6e9,), # Small Airplane - (0x1f6eb, 0x1f6f0,), # Airplane Departure ..Satellite - (0x1f6f3, 0x1f6ff,), # Passenger Ship ..(nil) - (0x1f7da, 0x1f7ff,), # (nil) - (0x1f80c, 0x1f80f,), # (nil) - (0x1f848, 0x1f84f,), # (nil) - (0x1f85a, 0x1f85f,), # (nil) - (0x1f888, 0x1f88f,), # (nil) - (0x1f8ae, 0x1f8af,), # (nil) - (0x1f8bc, 0x1f8bf,), # (nil) - (0x1f8c2, 0x1f8cf,), # (nil) - (0x1f8d9, 0x1f8ff,), # (nil) - (0x1f90c, 0x1f93a,), # Pinched Fingers ..Fencer - (0x1f93c, 0x1f945,), # Wrestlers ..Goal Net - (0x1f947, 0x1f9ff,), # First Place Medal ..Nazar Amulet - (0x1fa58, 0x1fa5f,), # (nil) - (0x1fa6e, 0x1faff,), # (nil) - (0x1fc00, 0x1fffd,), # (nil) -) - -INCB_LINKER = ( - # Source: DerivedCoreProperties - # Date: see file - # - (0x0094d, 0x0094d,), # Devanagari Sign Virama - (0x009cd, 0x009cd,), # Bengali Sign Virama - (0x00acd, 0x00acd,), # Gujarati Sign Virama - (0x00b4d, 0x00b4d,), # Oriya Sign Virama - (0x00c4d, 0x00c4d,), # Telugu Sign Virama - (0x00d4d, 0x00d4d,), # Malayalam Sign Virama - (0x01039, 0x01039,), # Myanmar Sign Virama - (0x017d2, 0x017d2,), # Khmer Sign Coeng - (0x01a60, 0x01a60,), # Tai Tham Sign Sakot - (0x01b44, 0x01b44,), # Balinese Adeg Adeg - (0x01bab, 0x01bab,), # Sundanese Sign Virama - (0x0a9c0, 0x0a9c0,), # Javanese Pangkon - (0x0aaf6, 0x0aaf6,), # Meetei Mayek Virama - (0x10a3f, 0x10a3f,), # Kharoshthi Virama - (0x11133, 0x11133,), # Chakma Virama - (0x113d0, 0x113d0,), # Tulu-tigalari Conjoiner - (0x1193e, 0x1193e,), # Dives Akuru Virama - (0x11a47, 0x11a47,), # Zanabazar Square Subjoiner - (0x11a99, 0x11a99,), # Soyombo Subjoiner - (0x11f42, 0x11f42,), # Kawi Conjoiner -) - -INCB_CONSONANT = ( - # Source: DerivedCoreProperties - # Date: see file - # - (0x00915, 0x00939,), # Devanagari Letter Ka ..Devanagari Letter Ha - (0x00958, 0x0095f,), # Devanagari Letter Qa ..Devanagari Letter Yya - (0x00978, 0x0097f,), # Devanagari Letter Marwar..Devanagari Letter Bba - (0x00995, 0x009a8,), # Bengali Letter Ka ..Bengali Letter Na - (0x009aa, 0x009b0,), # Bengali Letter Pa ..Bengali Letter Ra - (0x009b2, 0x009b2,), # Bengali Letter La - (0x009b6, 0x009b9,), # Bengali Letter Sha ..Bengali Letter Ha - (0x009dc, 0x009dd,), # Bengali Letter Rra ..Bengali Letter Rha - (0x009df, 0x009df,), # Bengali Letter Yya - (0x009f0, 0x009f1,), # Bengali Letter Ra With M..Bengali Letter Ra With L - (0x00a95, 0x00aa8,), # Gujarati Letter Ka ..Gujarati Letter Na - (0x00aaa, 0x00ab0,), # Gujarati Letter Pa ..Gujarati Letter Ra - (0x00ab2, 0x00ab3,), # Gujarati Letter La ..Gujarati Letter Lla - (0x00ab5, 0x00ab9,), # Gujarati Letter Va ..Gujarati Letter Ha - (0x00af9, 0x00af9,), # Gujarati Letter Zha - (0x00b15, 0x00b28,), # Oriya Letter Ka ..Oriya Letter Na - (0x00b2a, 0x00b30,), # Oriya Letter Pa ..Oriya Letter Ra - (0x00b32, 0x00b33,), # Oriya Letter La ..Oriya Letter Lla - (0x00b35, 0x00b39,), # Oriya Letter Va ..Oriya Letter Ha - (0x00b5c, 0x00b5d,), # Oriya Letter Rra ..Oriya Letter Rha - (0x00b5f, 0x00b5f,), # Oriya Letter Yya - (0x00b71, 0x00b71,), # Oriya Letter Wa - (0x00c15, 0x00c28,), # Telugu Letter Ka ..Telugu Letter Na - (0x00c2a, 0x00c39,), # Telugu Letter Pa ..Telugu Letter Ha - (0x00c58, 0x00c5a,), # Telugu Letter Tsa ..Telugu Letter Rrra - (0x00d15, 0x00d3a,), # Malayalam Letter Ka ..Malayalam Letter Ttta - (0x01000, 0x0102a,), # Myanmar Letter Ka ..Myanmar Letter Au - (0x0103f, 0x0103f,), # Myanmar Letter Great Sa - (0x01050, 0x01055,), # Myanmar Letter Sha ..Myanmar Letter Vocalic L - (0x0105a, 0x0105d,), # Myanmar Letter Mon Nga ..Myanmar Letter Mon Bbe - (0x01061, 0x01061,), # Myanmar Letter Sgaw Karen Sha - (0x01065, 0x01066,), # Myanmar Letter Western P..Myanmar Letter Western P - (0x0106e, 0x01070,), # Myanmar Letter Eastern P..Myanmar Letter Eastern P - (0x01075, 0x01081,), # Myanmar Letter Shan Ka ..Myanmar Letter Shan Ha - (0x0108e, 0x0108e,), # Myanmar Letter Rumai Palaung Fa - (0x01780, 0x017b3,), # Khmer Letter Ka ..Khmer Independent Vowel - (0x01a20, 0x01a54,), # Tai Tham Letter High Ka ..Tai Tham Letter Great Sa - (0x01b0b, 0x01b0c,), # Balinese Letter Ra Repa ..Balinese Letter Ra Repa - (0x01b13, 0x01b33,), # Balinese Letter Ka ..Balinese Letter Ha - (0x01b45, 0x01b4c,), # Balinese Letter Kaf Sasa..Balinese Letter Archaic - (0x01b83, 0x01ba0,), # Sundanese Letter A ..Sundanese Letter Ha - (0x01bae, 0x01baf,), # Sundanese Letter Kha ..Sundanese Letter Sya - (0x01bbb, 0x01bbd,), # Sundanese Letter Reu ..Sundanese Letter Bha - (0x0a989, 0x0a98b,), # Javanese Letter Pa Cerek..Javanese Letter Nga Lele - (0x0a98f, 0x0a9b2,), # Javanese Letter Ka ..Javanese Letter Ha - (0x0a9e0, 0x0a9e4,), # Myanmar Letter Shan Gha ..Myanmar Letter Shan Bha - (0x0a9e7, 0x0a9ef,), # Myanmar Letter Tai Laing..Myanmar Letter Tai Laing - (0x0a9fa, 0x0a9fe,), # Myanmar Letter Tai Laing..Myanmar Letter Tai Laing - (0x0aa60, 0x0aa6f,), # Myanmar Letter Khamti Ga..Myanmar Letter Khamti Fa - (0x0aa71, 0x0aa73,), # Myanmar Letter Khamti Xa..Myanmar Letter Khamti Ra - (0x0aa7a, 0x0aa7a,), # Myanmar Letter Aiton Ra - (0x0aa7e, 0x0aa7f,), # Myanmar Letter Shwe Pala..Myanmar Letter Shwe Pala - (0x0aae0, 0x0aaea,), # Meetei Mayek Letter E ..Meetei Mayek Letter Ssa - (0x0abc0, 0x0abda,), # Meetei Mayek Letter Kok ..Meetei Mayek Letter Bham - (0x10a00, 0x10a00,), # Kharoshthi Letter A - (0x10a10, 0x10a13,), # Kharoshthi Letter Ka ..Kharoshthi Letter Gha - (0x10a15, 0x10a17,), # Kharoshthi Letter Ca ..Kharoshthi Letter Ja - (0x10a19, 0x10a35,), # Kharoshthi Letter Nya ..Kharoshthi Letter Vha - (0x11103, 0x11126,), # Chakma Letter Aa ..Chakma Letter Haa - (0x11144, 0x11144,), # Chakma Letter Lhaa - (0x11147, 0x11147,), # Chakma Letter Vaa - (0x11380, 0x11389,), # Tulu-tigalari Letter A ..Tulu-tigalari Letter Voc - (0x1138b, 0x1138b,), # Tulu-tigalari Letter Ee - (0x1138e, 0x1138e,), # Tulu-tigalari Letter Ai - (0x11390, 0x113b5,), # Tulu-tigalari Letter Oo ..Tulu-tigalari Letter Lll - (0x11900, 0x11906,), # Dives Akuru Letter A ..Dives Akuru Letter E - (0x11909, 0x11909,), # Dives Akuru Letter O - (0x1190c, 0x11913,), # Dives Akuru Letter Ka ..Dives Akuru Letter Ja - (0x11915, 0x11916,), # Dives Akuru Letter Nya ..Dives Akuru Letter Tta - (0x11918, 0x1192f,), # Dives Akuru Letter Dda ..Dives Akuru Letter Za - (0x11a00, 0x11a00,), # Zanabazar Square Letter A - (0x11a0b, 0x11a32,), # Zanabazar Square Letter ..Zanabazar Square Letter - (0x11a50, 0x11a50,), # Soyombo Letter A - (0x11a5c, 0x11a83,), # Soyombo Letter Ka ..Soyombo Letter Kssa - (0x11f04, 0x11f10,), # Kawi Letter A ..Kawi Letter O - (0x11f12, 0x11f33,), # Kawi Letter Ka ..Kawi Letter Jnya -) - -INCB_EXTEND = ( - # Source: DerivedCoreProperties - # Date: see file - # - (0x00300, 0x0036f,), # Combining Grave Accent ..Combining Latin Small Le - (0x00483, 0x00489,), # Combining Cyrillic Titlo..Combining Cyrillic Milli - (0x00591, 0x005bd,), # Hebrew Accent Etnahta ..Hebrew Point Meteg - (0x005bf, 0x005bf,), # Hebrew Point Rafe - (0x005c1, 0x005c2,), # Hebrew Point Shin Dot ..Hebrew Point Sin Dot - (0x005c4, 0x005c5,), # Hebrew Mark Upper Dot ..Hebrew Mark Lower Dot - (0x005c7, 0x005c7,), # Hebrew Point Qamats Qatan - (0x00610, 0x0061a,), # Arabic Sign Sallallahou ..Arabic Small Kasra - (0x0064b, 0x0065f,), # Arabic Fathatan ..Arabic Wavy Hamza Below - (0x00670, 0x00670,), # Arabic Letter Superscript Alef - (0x006d6, 0x006dc,), # Arabic Small High Ligatu..Arabic Small High Seen - (0x006df, 0x006e4,), # Arabic Small High Rounde..Arabic Small High Madda - (0x006e7, 0x006e8,), # Arabic Small High Yeh ..Arabic Small High Noon - (0x006ea, 0x006ed,), # Arabic Empty Centre Low ..Arabic Small Low Meem - (0x00711, 0x00711,), # Syriac Letter Superscript Alaph - (0x00730, 0x0074a,), # Syriac Pthaha Above ..Syriac Barrekh - (0x007a6, 0x007b0,), # Thaana Abafili ..Thaana Sukun - (0x007eb, 0x007f3,), # Nko Combining Short High..Nko Combining Double Dot - (0x007fd, 0x007fd,), # Nko Dantayalan - (0x00816, 0x00819,), # Samaritan Mark In ..Samaritan Mark Dagesh - (0x0081b, 0x00823,), # Samaritan Mark Epentheti..Samaritan Vowel Sign A - (0x00825, 0x00827,), # Samaritan Vowel Sign Sho..Samaritan Vowel Sign U - (0x00829, 0x0082d,), # Samaritan Vowel Sign Lon..Samaritan Mark Nequdaa - (0x00859, 0x0085b,), # Mandaic Affrication Mark..Mandaic Gemination Mark - (0x00897, 0x0089f,), # Arabic Pepet ..Arabic Half Madda Over M - (0x008ca, 0x008e1,), # Arabic Small High Farsi ..Arabic Small High Sign S - (0x008e3, 0x00902,), # Arabic Turned Damma Belo..Devanagari Sign Anusvara - (0x0093a, 0x0093a,), # Devanagari Vowel Sign Oe - (0x0093c, 0x0093c,), # Devanagari Sign Nukta - (0x00941, 0x00948,), # Devanagari Vowel Sign U ..Devanagari Vowel Sign Ai - (0x00951, 0x00957,), # Devanagari Stress Sign U..Devanagari Vowel Sign Uu - (0x00962, 0x00963,), # Devanagari Vowel Sign Vo..Devanagari Vowel Sign Vo - (0x00981, 0x00981,), # Bengali Sign Candrabindu - (0x009bc, 0x009bc,), # Bengali Sign Nukta - (0x009be, 0x009be,), # Bengali Vowel Sign Aa - (0x009c1, 0x009c4,), # Bengali Vowel Sign U ..Bengali Vowel Sign Vocal - (0x009d7, 0x009d7,), # Bengali Au Length Mark - (0x009e2, 0x009e3,), # Bengali Vowel Sign Vocal..Bengali Vowel Sign Vocal - (0x009fe, 0x009fe,), # Bengali Sandhi Mark - (0x00a01, 0x00a02,), # Gurmukhi Sign Adak Bindi..Gurmukhi Sign Bindi - (0x00a3c, 0x00a3c,), # Gurmukhi Sign Nukta - (0x00a41, 0x00a42,), # Gurmukhi Vowel Sign U ..Gurmukhi Vowel Sign Uu - (0x00a47, 0x00a48,), # Gurmukhi Vowel Sign Ee ..Gurmukhi Vowel Sign Ai - (0x00a4b, 0x00a4d,), # Gurmukhi Vowel Sign Oo ..Gurmukhi Sign Virama - (0x00a51, 0x00a51,), # Gurmukhi Sign Udaat - (0x00a70, 0x00a71,), # Gurmukhi Tippi ..Gurmukhi Addak - (0x00a75, 0x00a75,), # Gurmukhi Sign Yakash - (0x00a81, 0x00a82,), # Gujarati Sign Candrabind..Gujarati Sign Anusvara - (0x00abc, 0x00abc,), # Gujarati Sign Nukta - (0x00ac1, 0x00ac5,), # Gujarati Vowel Sign U ..Gujarati Vowel Sign Cand - (0x00ac7, 0x00ac8,), # Gujarati Vowel Sign E ..Gujarati Vowel Sign Ai - (0x00ae2, 0x00ae3,), # Gujarati Vowel Sign Voca..Gujarati Vowel Sign Voca - (0x00afa, 0x00aff,), # Gujarati Sign Sukun ..Gujarati Sign Two-circle - (0x00b01, 0x00b01,), # Oriya Sign Candrabindu - (0x00b3c, 0x00b3c,), # Oriya Sign Nukta - (0x00b3e, 0x00b3f,), # Oriya Vowel Sign Aa ..Oriya Vowel Sign I - (0x00b41, 0x00b44,), # Oriya Vowel Sign U ..Oriya Vowel Sign Vocalic - (0x00b55, 0x00b57,), # Oriya Sign Overline ..Oriya Au Length Mark - (0x00b62, 0x00b63,), # Oriya Vowel Sign Vocalic..Oriya Vowel Sign Vocalic - (0x00b82, 0x00b82,), # Tamil Sign Anusvara - (0x00bbe, 0x00bbe,), # Tamil Vowel Sign Aa - (0x00bc0, 0x00bc0,), # Tamil Vowel Sign Ii - (0x00bcd, 0x00bcd,), # Tamil Sign Virama - (0x00bd7, 0x00bd7,), # Tamil Au Length Mark - (0x00c00, 0x00c00,), # Telugu Sign Combining Candrabindu Above - (0x00c04, 0x00c04,), # Telugu Sign Combining Anusvara Above - (0x00c3c, 0x00c3c,), # Telugu Sign Nukta - (0x00c3e, 0x00c40,), # Telugu Vowel Sign Aa ..Telugu Vowel Sign Ii - (0x00c46, 0x00c48,), # Telugu Vowel Sign E ..Telugu Vowel Sign Ai - (0x00c4a, 0x00c4c,), # Telugu Vowel Sign O ..Telugu Vowel Sign Au - (0x00c55, 0x00c56,), # Telugu Length Mark ..Telugu Ai Length Mark - (0x00c62, 0x00c63,), # Telugu Vowel Sign Vocali..Telugu Vowel Sign Vocali - (0x00c81, 0x00c81,), # Kannada Sign Candrabindu - (0x00cbc, 0x00cbc,), # Kannada Sign Nukta - (0x00cbf, 0x00cc0,), # Kannada Vowel Sign I ..Kannada Vowel Sign Ii - (0x00cc2, 0x00cc2,), # Kannada Vowel Sign Uu - (0x00cc6, 0x00cc8,), # Kannada Vowel Sign E ..Kannada Vowel Sign Ai - (0x00cca, 0x00ccd,), # Kannada Vowel Sign O ..Kannada Sign Virama - (0x00cd5, 0x00cd6,), # Kannada Length Mark ..Kannada Ai Length Mark - (0x00ce2, 0x00ce3,), # Kannada Vowel Sign Vocal..Kannada Vowel Sign Vocal - (0x00d00, 0x00d01,), # Malayalam Sign Combining..Malayalam Sign Candrabin - (0x00d3b, 0x00d3c,), # Malayalam Sign Vertical ..Malayalam Sign Circular - (0x00d3e, 0x00d3e,), # Malayalam Vowel Sign Aa - (0x00d41, 0x00d44,), # Malayalam Vowel Sign U ..Malayalam Vowel Sign Voc - (0x00d57, 0x00d57,), # Malayalam Au Length Mark - (0x00d62, 0x00d63,), # Malayalam Vowel Sign Voc..Malayalam Vowel Sign Voc - (0x00d81, 0x00d81,), # Sinhala Sign Candrabindu - (0x00dca, 0x00dca,), # Sinhala Sign Al-lakuna - (0x00dcf, 0x00dcf,), # Sinhala Vowel Sign Aela-pilla - (0x00dd2, 0x00dd4,), # Sinhala Vowel Sign Ketti..Sinhala Vowel Sign Ketti - (0x00dd6, 0x00dd6,), # Sinhala Vowel Sign Diga Paa-pilla - (0x00ddf, 0x00ddf,), # Sinhala Vowel Sign Gayanukitta - (0x00e31, 0x00e31,), # Thai Character Mai Han-akat - (0x00e34, 0x00e3a,), # Thai Character Sara I ..Thai Character Phinthu - (0x00e47, 0x00e4e,), # Thai Character Maitaikhu..Thai Character Yamakkan - (0x00eb1, 0x00eb1,), # Lao Vowel Sign Mai Kan - (0x00eb4, 0x00ebc,), # Lao Vowel Sign I ..Lao Semivowel Sign Lo - (0x00ec8, 0x00ece,), # Lao Tone Mai Ek ..Lao Yamakkan - (0x00f18, 0x00f19,), # Tibetan Astrological Sig..Tibetan Astrological Sig - (0x00f35, 0x00f35,), # Tibetan Mark Ngas Bzung Nyi Zla - (0x00f37, 0x00f37,), # Tibetan Mark Ngas Bzung Sgor Rtags - (0x00f39, 0x00f39,), # Tibetan Mark Tsa -phru - (0x00f71, 0x00f7e,), # Tibetan Vowel Sign Aa ..Tibetan Sign Rjes Su Nga - (0x00f80, 0x00f84,), # Tibetan Vowel Sign Rever..Tibetan Mark Halanta - (0x00f86, 0x00f87,), # Tibetan Sign Lci Rtags ..Tibetan Sign Yang Rtags - (0x00f8d, 0x00f97,), # Tibetan Subjoined Sign L..Tibetan Subjoined Letter - (0x00f99, 0x00fbc,), # Tibetan Subjoined Letter..Tibetan Subjoined Letter - (0x00fc6, 0x00fc6,), # Tibetan Symbol Padma Gdan - (0x0102d, 0x01030,), # Myanmar Vowel Sign I ..Myanmar Vowel Sign Uu - (0x01032, 0x01037,), # Myanmar Vowel Sign Ai ..Myanmar Sign Dot Below - (0x0103a, 0x0103a,), # Myanmar Sign Asat - (0x0103d, 0x0103e,), # Myanmar Consonant Sign M..Myanmar Consonant Sign M - (0x01058, 0x01059,), # Myanmar Vowel Sign Vocal..Myanmar Vowel Sign Vocal - (0x0105e, 0x01060,), # Myanmar Consonant Sign M..Myanmar Consonant Sign M - (0x01071, 0x01074,), # Myanmar Vowel Sign Geba ..Myanmar Vowel Sign Kayah - (0x01082, 0x01082,), # Myanmar Consonant Sign Shan Medial Wa - (0x01085, 0x01086,), # Myanmar Vowel Sign Shan ..Myanmar Vowel Sign Shan - (0x0108d, 0x0108d,), # Myanmar Sign Shan Council Emphatic Tone - (0x0109d, 0x0109d,), # Myanmar Vowel Sign Aiton Ai - (0x0135d, 0x0135f,), # Ethiopic Combining Gemin..Ethiopic Combining Gemin - (0x01712, 0x01715,), # Tagalog Vowel Sign I ..Tagalog Sign Pamudpod - (0x01732, 0x01734,), # Hanunoo Vowel Sign I ..Hanunoo Sign Pamudpod - (0x01752, 0x01753,), # Buhid Vowel Sign I ..Buhid Vowel Sign U - (0x01772, 0x01773,), # Tagbanwa Vowel Sign I ..Tagbanwa Vowel Sign U - (0x017b4, 0x017b5,), # Khmer Vowel Inherent Aq ..Khmer Vowel Inherent Aa - (0x017b7, 0x017bd,), # Khmer Vowel Sign I ..Khmer Vowel Sign Ua - (0x017c6, 0x017c6,), # Khmer Sign Nikahit - (0x017c9, 0x017d1,), # Khmer Sign Muusikatoan ..Khmer Sign Viriam - (0x017d3, 0x017d3,), # Khmer Sign Bathamasat - (0x017dd, 0x017dd,), # Khmer Sign Atthacan - (0x0180b, 0x0180d,), # Mongolian Free Variation..Mongolian Free Variation - (0x0180f, 0x0180f,), # Mongolian Free Variation Selector Four - (0x01885, 0x01886,), # Mongolian Letter Ali Gal..Mongolian Letter Ali Gal - (0x018a9, 0x018a9,), # Mongolian Letter Ali Gali Dagalga - (0x01920, 0x01922,), # Limbu Vowel Sign A ..Limbu Vowel Sign U - (0x01927, 0x01928,), # Limbu Vowel Sign E ..Limbu Vowel Sign O - (0x01932, 0x01932,), # Limbu Small Letter Anusvara - (0x01939, 0x0193b,), # Limbu Sign Mukphreng ..Limbu Sign Sa-i - (0x01a17, 0x01a18,), # Buginese Vowel Sign I ..Buginese Vowel Sign U - (0x01a1b, 0x01a1b,), # Buginese Vowel Sign Ae - (0x01a56, 0x01a56,), # Tai Tham Consonant Sign Medial La - (0x01a58, 0x01a5e,), # Tai Tham Sign Mai Kang L..Tai Tham Consonant Sign - (0x01a62, 0x01a62,), # Tai Tham Vowel Sign Mai Sat - (0x01a65, 0x01a6c,), # Tai Tham Vowel Sign I ..Tai Tham Vowel Sign Oa B - (0x01a73, 0x01a7c,), # Tai Tham Vowel Sign Oa A..Tai Tham Sign Khuen-lue - (0x01a7f, 0x01a7f,), # Tai Tham Combining Cryptogrammic Dot - (0x01ab0, 0x01add,), # Combining Doubled Circum..Combining Dot-and-ring B - (0x01ae0, 0x01aeb,), # Combining Left Tack Abov..Combining Double Rightwa - (0x01b00, 0x01b03,), # Balinese Sign Ulu Ricem ..Balinese Sign Surang - (0x01b34, 0x01b3d,), # Balinese Sign Rerekan ..Balinese Vowel Sign La L - (0x01b42, 0x01b43,), # Balinese Vowel Sign Pepe..Balinese Vowel Sign Pepe - (0x01b6b, 0x01b73,), # Balinese Musical Symbol ..Balinese Musical Symbol - (0x01b80, 0x01b81,), # Sundanese Sign Panyecek ..Sundanese Sign Panglayar - (0x01ba2, 0x01ba5,), # Sundanese Consonant Sign..Sundanese Vowel Sign Pan - (0x01ba8, 0x01baa,), # Sundanese Vowel Sign Pam..Sundanese Sign Pamaaeh - (0x01bac, 0x01bad,), # Sundanese Consonant Sign..Sundanese Consonant Sign - (0x01be6, 0x01be6,), # Batak Sign Tompi - (0x01be8, 0x01be9,), # Batak Vowel Sign Pakpak ..Batak Vowel Sign Ee - (0x01bed, 0x01bed,), # Batak Vowel Sign Karo O - (0x01bef, 0x01bf3,), # Batak Vowel Sign U For S..Batak Panongonan - (0x01c2c, 0x01c33,), # Lepcha Vowel Sign E ..Lepcha Consonant Sign T - (0x01c36, 0x01c37,), # Lepcha Sign Ran ..Lepcha Sign Nukta - (0x01cd0, 0x01cd2,), # Vedic Tone Karshana ..Vedic Tone Prenkha - (0x01cd4, 0x01ce0,), # Vedic Sign Yajurvedic Mi..Vedic Tone Rigvedic Kash - (0x01ce2, 0x01ce8,), # Vedic Sign Visarga Svari..Vedic Sign Visarga Anuda - (0x01ced, 0x01ced,), # Vedic Sign Tiryak - (0x01cf4, 0x01cf4,), # Vedic Tone Candra Above - (0x01cf8, 0x01cf9,), # Vedic Tone Ring Above ..Vedic Tone Double Ring A - (0x01dc0, 0x01dff,), # Combining Dotted Grave A..Combining Right Arrowhea - (0x0200d, 0x0200d,), # Zero Width Joiner - (0x020d0, 0x020f0,), # Combining Left Harpoon A..Combining Asterisk Above - (0x02cef, 0x02cf1,), # Coptic Combining Ni Abov..Coptic Combining Spiritu - (0x02d7f, 0x02d7f,), # Tifinagh Consonant Joiner - (0x02de0, 0x02dff,), # Combining Cyrillic Lette..Combining Cyrillic Lette - (0x0302a, 0x0302f,), # Ideographic Level Tone M..Hangul Double Dot Tone M - (0x03099, 0x0309a,), # Combining Katakana-hirag..Combining Katakana-hirag - (0x0a66f, 0x0a672,), # Combining Cyrillic Vzmet..Combining Cyrillic Thous - (0x0a674, 0x0a67d,), # Combining Cyrillic Lette..Combining Cyrillic Payer - (0x0a69e, 0x0a69f,), # Combining Cyrillic Lette..Combining Cyrillic Lette - (0x0a6f0, 0x0a6f1,), # Bamum Combining Mark Koq..Bamum Combining Mark Tuk - (0x0a802, 0x0a802,), # Syloti Nagri Sign Dvisvara - (0x0a806, 0x0a806,), # Syloti Nagri Sign Hasanta - (0x0a80b, 0x0a80b,), # Syloti Nagri Sign Anusvara - (0x0a825, 0x0a826,), # Syloti Nagri Vowel Sign ..Syloti Nagri Vowel Sign - (0x0a82c, 0x0a82c,), # Syloti Nagri Sign Alternate Hasanta - (0x0a8c4, 0x0a8c5,), # Saurashtra Sign Virama ..Saurashtra Sign Candrabi - (0x0a8e0, 0x0a8f1,), # Combining Devanagari Dig..Combining Devanagari Sig - (0x0a8ff, 0x0a8ff,), # Devanagari Vowel Sign Ay - (0x0a926, 0x0a92d,), # Kayah Li Vowel Ue ..Kayah Li Tone Calya Plop - (0x0a947, 0x0a951,), # Rejang Vowel Sign I ..Rejang Consonant Sign R - (0x0a953, 0x0a953,), # Rejang Virama - (0x0a980, 0x0a982,), # Javanese Sign Panyangga ..Javanese Sign Layar - (0x0a9b3, 0x0a9b3,), # Javanese Sign Cecak Telu - (0x0a9b6, 0x0a9b9,), # Javanese Vowel Sign Wulu..Javanese Vowel Sign Suku - (0x0a9bc, 0x0a9bd,), # Javanese Vowel Sign Pepe..Javanese Consonant Sign - (0x0a9e5, 0x0a9e5,), # Myanmar Sign Shan Saw - (0x0aa29, 0x0aa2e,), # Cham Vowel Sign Aa ..Cham Vowel Sign Oe - (0x0aa31, 0x0aa32,), # Cham Vowel Sign Au ..Cham Vowel Sign Ue - (0x0aa35, 0x0aa36,), # Cham Consonant Sign La ..Cham Consonant Sign Wa - (0x0aa43, 0x0aa43,), # Cham Consonant Sign Final Ng - (0x0aa4c, 0x0aa4c,), # Cham Consonant Sign Final M - (0x0aa7c, 0x0aa7c,), # Myanmar Sign Tai Laing Tone-2 - (0x0aab0, 0x0aab0,), # Tai Viet Mai Kang - (0x0aab2, 0x0aab4,), # Tai Viet Vowel I ..Tai Viet Vowel U - (0x0aab7, 0x0aab8,), # Tai Viet Mai Khit ..Tai Viet Vowel Ia - (0x0aabe, 0x0aabf,), # Tai Viet Vowel Am ..Tai Viet Tone Mai Ek - (0x0aac1, 0x0aac1,), # Tai Viet Tone Mai Tho - (0x0aaec, 0x0aaed,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0abe5, 0x0abe5,), # Meetei Mayek Vowel Sign Anap - (0x0abe8, 0x0abe8,), # Meetei Mayek Vowel Sign Unap - (0x0abed, 0x0abed,), # Meetei Mayek Apun Iyek - (0x0fb1e, 0x0fb1e,), # Hebrew Point Judeo-spanish Varika - (0x0fe00, 0x0fe0f,), # Variation Selector-1 ..Variation Selector-16 - (0x0fe20, 0x0fe2f,), # Combining Ligature Left ..Combining Cyrillic Titlo - (0x0ff9e, 0x0ff9f,), # Halfwidth Katakana Voice..Halfwidth Katakana Semi- - (0x101fd, 0x101fd,), # Phaistos Disc Sign Combining Oblique Stroke - (0x102e0, 0x102e0,), # Coptic Epact Thousands Mark - (0x10376, 0x1037a,), # Combining Old Permic Let..Combining Old Permic Let - (0x10a01, 0x10a03,), # Kharoshthi Vowel Sign I ..Kharoshthi Vowel Sign Vo - (0x10a05, 0x10a06,), # Kharoshthi Vowel Sign E ..Kharoshthi Vowel Sign O - (0x10a0c, 0x10a0f,), # Kharoshthi Vowel Length ..Kharoshthi Sign Visarga - (0x10a38, 0x10a3a,), # Kharoshthi Sign Bar Abov..Kharoshthi Sign Dot Belo - (0x10ae5, 0x10ae6,), # Manichaean Abbreviation ..Manichaean Abbreviation - (0x10d24, 0x10d27,), # Hanifi Rohingya Sign Har..Hanifi Rohingya Sign Tas - (0x10d69, 0x10d6d,), # Garay Vowel Sign E ..Garay Consonant Nasaliza - (0x10eab, 0x10eac,), # Yezidi Combining Hamza M..Yezidi Combining Madda M - (0x10efa, 0x10eff,), # Arabic Double Vertical B..Arabic Small Low Word Ma - (0x10f46, 0x10f50,), # Sogdian Combining Dot Be..Sogdian Combining Stroke - (0x10f82, 0x10f85,), # Old Uyghur Combining Dot..Old Uyghur Combining Two - (0x11001, 0x11001,), # Brahmi Sign Anusvara - (0x11038, 0x11046,), # Brahmi Vowel Sign Aa ..Brahmi Virama - (0x11070, 0x11070,), # Brahmi Sign Old Tamil Virama - (0x11073, 0x11074,), # Brahmi Vowel Sign Old Ta..Brahmi Vowel Sign Old Ta - (0x1107f, 0x11081,), # Brahmi Number Joiner ..Kaithi Sign Anusvara - (0x110b3, 0x110b6,), # Kaithi Vowel Sign U ..Kaithi Vowel Sign Ai - (0x110b9, 0x110ba,), # Kaithi Sign Virama ..Kaithi Sign Nukta - (0x110c2, 0x110c2,), # Kaithi Vowel Sign Vocalic R - (0x11100, 0x11102,), # Chakma Sign Candrabindu ..Chakma Sign Visarga - (0x11127, 0x1112b,), # Chakma Vowel Sign A ..Chakma Vowel Sign Uu - (0x1112d, 0x11132,), # Chakma Vowel Sign Ai ..Chakma Au Mark - (0x11134, 0x11134,), # Chakma Maayyaa - (0x11173, 0x11173,), # Mahajani Sign Nukta - (0x11180, 0x11181,), # Sharada Sign Candrabindu..Sharada Sign Anusvara - (0x111b6, 0x111be,), # Sharada Vowel Sign U ..Sharada Vowel Sign O - (0x111c0, 0x111c0,), # Sharada Sign Virama - (0x111c9, 0x111cc,), # Sharada Sandhi Mark ..Sharada Extra Short Vowe - (0x111cf, 0x111cf,), # Sharada Sign Inverted Candrabindu - (0x1122f, 0x11231,), # Khojki Vowel Sign U ..Khojki Vowel Sign Ai - (0x11234, 0x11237,), # Khojki Sign Anusvara ..Khojki Sign Shadda - (0x1123e, 0x1123e,), # Khojki Sign Sukun - (0x11241, 0x11241,), # Khojki Vowel Sign Vocalic R - (0x112df, 0x112df,), # Khudawadi Sign Anusvara - (0x112e3, 0x112ea,), # Khudawadi Vowel Sign U ..Khudawadi Sign Virama - (0x11300, 0x11301,), # Grantha Sign Combining A..Grantha Sign Candrabindu - (0x1133b, 0x1133c,), # Combining Bindu Below ..Grantha Sign Nukta - (0x1133e, 0x1133e,), # Grantha Vowel Sign Aa - (0x11340, 0x11340,), # Grantha Vowel Sign Ii - (0x1134d, 0x1134d,), # Grantha Sign Virama - (0x11357, 0x11357,), # Grantha Au Length Mark - (0x11366, 0x1136c,), # Combining Grantha Digit ..Combining Grantha Digit - (0x11370, 0x11374,), # Combining Grantha Letter..Combining Grantha Letter - (0x113b8, 0x113b8,), # Tulu-tigalari Vowel Sign Aa - (0x113bb, 0x113c0,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Vowel Sign - (0x113c2, 0x113c2,), # Tulu-tigalari Vowel Sign Ee - (0x113c5, 0x113c5,), # Tulu-tigalari Vowel Sign Ai - (0x113c7, 0x113c9,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Au Length - (0x113ce, 0x113cf,), # Tulu-tigalari Sign Viram..Tulu-tigalari Sign Loope - (0x113d2, 0x113d2,), # Tulu-tigalari Gemination Mark - (0x113e1, 0x113e2,), # Tulu-tigalari Vedic Tone..Tulu-tigalari Vedic Tone - (0x11438, 0x1143f,), # Newa Vowel Sign U ..Newa Vowel Sign Ai - (0x11442, 0x11444,), # Newa Sign Virama ..Newa Sign Anusvara - (0x11446, 0x11446,), # Newa Sign Nukta - (0x1145e, 0x1145e,), # Newa Sandhi Mark - (0x114b0, 0x114b0,), # Tirhuta Vowel Sign Aa - (0x114b3, 0x114b8,), # Tirhuta Vowel Sign U ..Tirhuta Vowel Sign Vocal - (0x114ba, 0x114ba,), # Tirhuta Vowel Sign Short E - (0x114bd, 0x114bd,), # Tirhuta Vowel Sign Short O - (0x114bf, 0x114c0,), # Tirhuta Sign Candrabindu..Tirhuta Sign Anusvara - (0x114c2, 0x114c3,), # Tirhuta Sign Virama ..Tirhuta Sign Nukta - (0x115af, 0x115af,), # Siddham Vowel Sign Aa - (0x115b2, 0x115b5,), # Siddham Vowel Sign U ..Siddham Vowel Sign Vocal - (0x115bc, 0x115bd,), # Siddham Sign Candrabindu..Siddham Sign Anusvara - (0x115bf, 0x115c0,), # Siddham Sign Virama ..Siddham Sign Nukta - (0x115dc, 0x115dd,), # Siddham Vowel Sign Alter..Siddham Vowel Sign Alter - (0x11633, 0x1163a,), # Modi Vowel Sign U ..Modi Vowel Sign Ai - (0x1163d, 0x1163d,), # Modi Sign Anusvara - (0x1163f, 0x11640,), # Modi Sign Virama ..Modi Sign Ardhacandra - (0x116ab, 0x116ab,), # Takri Sign Anusvara - (0x116ad, 0x116ad,), # Takri Vowel Sign Aa - (0x116b0, 0x116b7,), # Takri Vowel Sign U ..Takri Sign Nukta - (0x1171d, 0x1171d,), # Ahom Consonant Sign Medial La - (0x1171f, 0x1171f,), # Ahom Consonant Sign Medial Ligating Ra - (0x11722, 0x11725,), # Ahom Vowel Sign I ..Ahom Vowel Sign Uu - (0x11727, 0x1172b,), # Ahom Vowel Sign Aw ..Ahom Sign Killer - (0x1182f, 0x11837,), # Dogra Vowel Sign U ..Dogra Sign Anusvara - (0x11839, 0x1183a,), # Dogra Sign Virama ..Dogra Sign Nukta - (0x11930, 0x11930,), # Dives Akuru Vowel Sign Aa - (0x1193b, 0x1193d,), # Dives Akuru Sign Anusvar..Dives Akuru Sign Halanta - (0x11943, 0x11943,), # Dives Akuru Sign Nukta - (0x119d4, 0x119d7,), # Nandinagari Vowel Sign U..Nandinagari Vowel Sign V - (0x119da, 0x119db,), # Nandinagari Vowel Sign E..Nandinagari Vowel Sign A - (0x119e0, 0x119e0,), # Nandinagari Sign Virama - (0x11a01, 0x11a0a,), # Zanabazar Square Vowel S..Zanabazar Square Vowel L - (0x11a33, 0x11a38,), # Zanabazar Square Final C..Zanabazar Square Sign An - (0x11a3b, 0x11a3e,), # Zanabazar Square Cluster..Zanabazar Square Cluster - (0x11a51, 0x11a56,), # Soyombo Vowel Sign I ..Soyombo Vowel Sign Oe - (0x11a59, 0x11a5b,), # Soyombo Vowel Sign Vocal..Soyombo Vowel Length Mar - (0x11a8a, 0x11a96,), # Soyombo Final Consonant ..Soyombo Sign Anusvara - (0x11a98, 0x11a98,), # Soyombo Gemination Mark - (0x11b60, 0x11b60,), # Sharada Vowel Sign Oe - (0x11b62, 0x11b64,), # Sharada Vowel Sign Ue ..Sharada Vowel Sign Short - (0x11b66, 0x11b66,), # Sharada Vowel Sign Candra E - (0x11c30, 0x11c36,), # Bhaiksuki Vowel Sign I ..Bhaiksuki Vowel Sign Voc - (0x11c38, 0x11c3d,), # Bhaiksuki Vowel Sign E ..Bhaiksuki Sign Anusvara - (0x11c3f, 0x11c3f,), # Bhaiksuki Sign Virama - (0x11c92, 0x11ca7,), # Marchen Subjoined Letter..Marchen Subjoined Letter - (0x11caa, 0x11cb0,), # Marchen Subjoined Letter..Marchen Vowel Sign Aa - (0x11cb2, 0x11cb3,), # Marchen Vowel Sign U ..Marchen Vowel Sign E - (0x11cb5, 0x11cb6,), # Marchen Sign Anusvara ..Marchen Sign Candrabindu - (0x11d31, 0x11d36,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign - (0x11d3a, 0x11d3a,), # Masaram Gondi Vowel Sign E - (0x11d3c, 0x11d3d,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign - (0x11d3f, 0x11d45,), # Masaram Gondi Vowel Sign..Masaram Gondi Virama - (0x11d47, 0x11d47,), # Masaram Gondi Ra-kara - (0x11d90, 0x11d91,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign - (0x11d95, 0x11d95,), # Gunjala Gondi Sign Anusvara - (0x11d97, 0x11d97,), # Gunjala Gondi Virama - (0x11ef3, 0x11ef4,), # Makasar Vowel Sign I ..Makasar Vowel Sign U - (0x11f00, 0x11f01,), # Kawi Sign Candrabindu ..Kawi Sign Anusvara - (0x11f36, 0x11f3a,), # Kawi Vowel Sign I ..Kawi Vowel Sign Vocalic - (0x11f40, 0x11f41,), # Kawi Vowel Sign Eu ..Kawi Sign Killer - (0x11f5a, 0x11f5a,), # Kawi Sign Nukta - (0x13440, 0x13440,), # Egyptian Hieroglyph Mirror Horizontally - (0x13447, 0x13455,), # Egyptian Hieroglyph Modi..Egyptian Hieroglyph Modi - (0x1611e, 0x16129,), # Gurung Khema Vowel Sign ..Gurung Khema Vowel Lengt - (0x1612d, 0x1612f,), # Gurung Khema Sign Anusva..Gurung Khema Sign Tholho - (0x16af0, 0x16af4,), # Bassa Vah Combining High..Bassa Vah Combining High - (0x16b30, 0x16b36,), # Pahawh Hmong Mark Cim Tu..Pahawh Hmong Mark Cim Ta - (0x16f4f, 0x16f4f,), # Miao Sign Consonant Modifier Bar - (0x16f8f, 0x16f92,), # Miao Tone Right ..Miao Tone Below - (0x16fe4, 0x16fe4,), # Khitan Small Script Filler - (0x16ff0, 0x16ff1,), # Vietnamese Alternate Rea..Vietnamese Alternate Rea - (0x1bc9d, 0x1bc9e,), # Duployan Thick Letter Se..Duployan Double Mark - (0x1cf00, 0x1cf2d,), # Znamenny Combining Mark ..Znamenny Combining Mark - (0x1cf30, 0x1cf46,), # Znamenny Combining Tonal..Znamenny Priznak Modifie - (0x1d165, 0x1d169,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d16d, 0x1d172,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d17b, 0x1d182,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d185, 0x1d18b,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d1aa, 0x1d1ad,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d242, 0x1d244,), # Combining Greek Musical ..Combining Greek Musical - (0x1da00, 0x1da36,), # Signwriting Head Rim ..Signwriting Air Sucking - (0x1da3b, 0x1da6c,), # Signwriting Mouth Closed..Signwriting Excitement - (0x1da75, 0x1da75,), # Signwriting Upper Body Tilting From Hip Joints - (0x1da84, 0x1da84,), # Signwriting Location Head Neck - (0x1da9b, 0x1da9f,), # Signwriting Fill Modifie..Signwriting Fill Modifie - (0x1daa1, 0x1daaf,), # Signwriting Rotation Mod..Signwriting Rotation Mod - (0x1e000, 0x1e006,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e008, 0x1e018,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e01b, 0x1e021,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e023, 0x1e024,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e026, 0x1e02a,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e08f, 0x1e08f,), # Combining Cyrillic Small Letter Byelorussian-ukr - (0x1e130, 0x1e136,), # Nyiakeng Puachue Hmong T..Nyiakeng Puachue Hmong T - (0x1e2ae, 0x1e2ae,), # Toto Sign Rising Tone - (0x1e2ec, 0x1e2ef,), # Wancho Tone Tup ..Wancho Tone Koini - (0x1e4ec, 0x1e4ef,), # Nag Mundari Sign Muhor ..Nag Mundari Sign Sutuh - (0x1e5ee, 0x1e5ef,), # Ol Onal Sign Mu ..Ol Onal Sign Ikir - (0x1e6e3, 0x1e6e3,), # Tai Yo Sign Ue - (0x1e6e6, 0x1e6e6,), # Tai Yo Sign Au - (0x1e6ee, 0x1e6ef,), # Tai Yo Sign Ay ..Tai Yo Sign Ang - (0x1e6f5, 0x1e6f5,), # Tai Yo Sign Om - (0x1e8d0, 0x1e8d6,), # Mende Kikakui Combining ..Mende Kikakui Combining - (0x1e944, 0x1e94a,), # Adlam Alif Lengthener ..Adlam Nukta - (0x1f3fb, 0x1f3ff,), # Emoji Modifier Fitzpatri..Emoji Modifier Fitzpatri - (0xe0020, 0xe007f,), # Tag Space ..Cancel Tag - (0xe0100, 0xe01ef,), # Variation Selector-17 ..Variation Selector-256 -) - -ISC_CONSONANT = ( - # Source: IndicSyllabicCategory - # Date: see file - # - (0x00915, 0x00939,), # Devanagari Letter Ka ..Devanagari Letter Ha - (0x00958, 0x0095f,), # Devanagari Letter Qa ..Devanagari Letter Yya - (0x00978, 0x0097f,), # Devanagari Letter Marwar..Devanagari Letter Bba - (0x00995, 0x009a8,), # Bengali Letter Ka ..Bengali Letter Na - (0x009aa, 0x009b0,), # Bengali Letter Pa ..Bengali Letter Ra - (0x009b2, 0x009b2,), # Bengali Letter La - (0x009b6, 0x009b9,), # Bengali Letter Sha ..Bengali Letter Ha - (0x009dc, 0x009dd,), # Bengali Letter Rra ..Bengali Letter Rha - (0x009df, 0x009df,), # Bengali Letter Yya - (0x009f0, 0x009f1,), # Bengali Letter Ra With M..Bengali Letter Ra With L - (0x00a15, 0x00a28,), # Gurmukhi Letter Ka ..Gurmukhi Letter Na - (0x00a2a, 0x00a30,), # Gurmukhi Letter Pa ..Gurmukhi Letter Ra - (0x00a32, 0x00a33,), # Gurmukhi Letter La ..Gurmukhi Letter Lla - (0x00a35, 0x00a36,), # Gurmukhi Letter Va ..Gurmukhi Letter Sha - (0x00a38, 0x00a39,), # Gurmukhi Letter Sa ..Gurmukhi Letter Ha - (0x00a59, 0x00a5c,), # Gurmukhi Letter Khha ..Gurmukhi Letter Rra - (0x00a5e, 0x00a5e,), # Gurmukhi Letter Fa - (0x00a95, 0x00aa8,), # Gujarati Letter Ka ..Gujarati Letter Na - (0x00aaa, 0x00ab0,), # Gujarati Letter Pa ..Gujarati Letter Ra - (0x00ab2, 0x00ab3,), # Gujarati Letter La ..Gujarati Letter Lla - (0x00ab5, 0x00ab9,), # Gujarati Letter Va ..Gujarati Letter Ha - (0x00af9, 0x00af9,), # Gujarati Letter Zha - (0x00b15, 0x00b28,), # Oriya Letter Ka ..Oriya Letter Na - (0x00b2a, 0x00b30,), # Oriya Letter Pa ..Oriya Letter Ra - (0x00b32, 0x00b33,), # Oriya Letter La ..Oriya Letter Lla - (0x00b35, 0x00b39,), # Oriya Letter Va ..Oriya Letter Ha - (0x00b5c, 0x00b5d,), # Oriya Letter Rra ..Oriya Letter Rha - (0x00b5f, 0x00b5f,), # Oriya Letter Yya - (0x00b71, 0x00b71,), # Oriya Letter Wa - (0x00b95, 0x00b95,), # Tamil Letter Ka - (0x00b99, 0x00b9a,), # Tamil Letter Nga ..Tamil Letter Ca - (0x00b9c, 0x00b9c,), # Tamil Letter Ja - (0x00b9e, 0x00b9f,), # Tamil Letter Nya ..Tamil Letter Tta - (0x00ba3, 0x00ba4,), # Tamil Letter Nna ..Tamil Letter Ta - (0x00ba8, 0x00baa,), # Tamil Letter Na ..Tamil Letter Pa - (0x00bae, 0x00bb9,), # Tamil Letter Ma ..Tamil Letter Ha - (0x00c15, 0x00c28,), # Telugu Letter Ka ..Telugu Letter Na - (0x00c2a, 0x00c39,), # Telugu Letter Pa ..Telugu Letter Ha - (0x00c58, 0x00c5a,), # Telugu Letter Tsa ..Telugu Letter Rrra - (0x00c95, 0x00ca8,), # Kannada Letter Ka ..Kannada Letter Na - (0x00caa, 0x00cb3,), # Kannada Letter Pa ..Kannada Letter Lla - (0x00cb5, 0x00cb9,), # Kannada Letter Va ..Kannada Letter Ha - (0x00cde, 0x00cde,), # Kannada Letter Fa - (0x00d15, 0x00d3a,), # Malayalam Letter Ka ..Malayalam Letter Ttta - (0x00d9a, 0x00db1,), # Sinhala Letter Alpapraan..Sinhala Letter Dantaja N - (0x00db3, 0x00dbb,), # Sinhala Letter Sanyaka D..Sinhala Letter Rayanna - (0x00dbd, 0x00dbd,), # Sinhala Letter Dantaja Layanna - (0x00dc0, 0x00dc6,), # Sinhala Letter Vayanna ..Sinhala Letter Fayanna - (0x00e01, 0x00e2e,), # Thai Character Ko Kai ..Thai Character Ho Nokhuk - (0x00e81, 0x00e82,), # Lao Letter Ko ..Lao Letter Kho Sung - (0x00e84, 0x00e84,), # Lao Letter Kho Tam - (0x00e86, 0x00e8a,), # Lao Letter Pali Gha ..Lao Letter So Tam - (0x00e8c, 0x00ea3,), # Lao Letter Pali Jha ..Lao Letter Lo Ling - (0x00ea5, 0x00ea5,), # Lao Letter Lo Loot - (0x00ea7, 0x00eae,), # Lao Letter Wo ..Lao Letter Ho Tam - (0x00edc, 0x00edf,), # Lao Ho No ..Lao Letter Khmu Nyo - (0x00f40, 0x00f47,), # Tibetan Letter Ka ..Tibetan Letter Ja - (0x00f49, 0x00f6c,), # Tibetan Letter Nya ..Tibetan Letter Rra - (0x01000, 0x01020,), # Myanmar Letter Ka ..Myanmar Letter Lla - (0x0103f, 0x0103f,), # Myanmar Letter Great Sa - (0x01050, 0x01051,), # Myanmar Letter Sha ..Myanmar Letter Ssa - (0x0105a, 0x0105d,), # Myanmar Letter Mon Nga ..Myanmar Letter Mon Bbe - (0x01061, 0x01061,), # Myanmar Letter Sgaw Karen Sha - (0x01065, 0x01066,), # Myanmar Letter Western P..Myanmar Letter Western P - (0x0106e, 0x01070,), # Myanmar Letter Eastern P..Myanmar Letter Eastern P - (0x01075, 0x01081,), # Myanmar Letter Shan Ka ..Myanmar Letter Shan Ha - (0x0108e, 0x0108e,), # Myanmar Letter Rumai Palaung Fa - (0x01703, 0x01711,), # Tagalog Letter Ka ..Tagalog Letter Ha - (0x0171f, 0x0171f,), # Tagalog Letter Archaic Ra - (0x01723, 0x01731,), # Hanunoo Letter Ka ..Hanunoo Letter Ha - (0x01743, 0x01751,), # Buhid Letter Ka ..Buhid Letter Ha - (0x01763, 0x0176c,), # Tagbanwa Letter Ka ..Tagbanwa Letter Ya - (0x0176e, 0x01770,), # Tagbanwa Letter La ..Tagbanwa Letter Sa - (0x01780, 0x017a2,), # Khmer Letter Ka ..Khmer Letter Qa - (0x01900, 0x0191e,), # Limbu Vowel-carrier Lett..Limbu Letter Tra - (0x01950, 0x01962,), # Tai Le Letter Ka ..Tai Le Letter Na - (0x01980, 0x019ab,), # New Tai Lue Letter High ..New Tai Lue Letter Low S - (0x01a00, 0x01a16,), # Buginese Letter Ka ..Buginese Letter Ha - (0x01a20, 0x01a4c,), # Tai Tham Letter High Ka ..Tai Tham Letter Low Ha - (0x01a53, 0x01a54,), # Tai Tham Letter Lae ..Tai Tham Letter Great Sa - (0x01b13, 0x01b33,), # Balinese Letter Ka ..Balinese Letter Ha - (0x01b45, 0x01b4c,), # Balinese Letter Kaf Sasa..Balinese Letter Archaic - (0x01b8a, 0x01ba0,), # Sundanese Letter Ka ..Sundanese Letter Ha - (0x01bae, 0x01baf,), # Sundanese Letter Kha ..Sundanese Letter Sya - (0x01bbb, 0x01bbd,), # Sundanese Letter Reu ..Sundanese Letter Bha - (0x01bc0, 0x01be3,), # Batak Letter A ..Batak Letter Mba - (0x01c00, 0x01c23,), # Lepcha Letter Ka ..Lepcha Letter A - (0x01c4d, 0x01c4f,), # Lepcha Letter Tta ..Lepcha Letter Dda - (0x0a807, 0x0a80a,), # Syloti Nagri Letter Ko ..Syloti Nagri Letter Gho - (0x0a80c, 0x0a822,), # Syloti Nagri Letter Co ..Syloti Nagri Letter Ho - (0x0a840, 0x0a85d,), # Phags-pa Letter Ka ..Phags-pa Letter A - (0x0a862, 0x0a865,), # Phags-pa Letter Qa ..Phags-pa Letter Gga - (0x0a869, 0x0a870,), # Phags-pa Letter Tta ..Phags-pa Letter Aspirate - (0x0a872, 0x0a872,), # Phags-pa Superfixed Letter Ra - (0x0a892, 0x0a8b3,), # Saurashtra Letter Ka ..Saurashtra Letter Lla - (0x0a90a, 0x0a921,), # Kayah Li Letter Ka ..Kayah Li Letter Ca - (0x0a930, 0x0a946,), # Rejang Letter Ka ..Rejang Letter A - (0x0a989, 0x0a98b,), # Javanese Letter Pa Cerek..Javanese Letter Nga Lele - (0x0a98f, 0x0a9b2,), # Javanese Letter Ka ..Javanese Letter Ha - (0x0a9e0, 0x0a9e4,), # Myanmar Letter Shan Gha ..Myanmar Letter Shan Bha - (0x0a9e7, 0x0a9ef,), # Myanmar Letter Tai Laing..Myanmar Letter Tai Laing - (0x0a9fa, 0x0a9fe,), # Myanmar Letter Tai Laing..Myanmar Letter Tai Laing - (0x0aa06, 0x0aa28,), # Cham Letter Ka ..Cham Letter Ha - (0x0aa60, 0x0aa6f,), # Myanmar Letter Khamti Ga..Myanmar Letter Khamti Fa - (0x0aa71, 0x0aa73,), # Myanmar Letter Khamti Xa..Myanmar Letter Khamti Ra - (0x0aa7a, 0x0aa7a,), # Myanmar Letter Aiton Ra - (0x0aa7e, 0x0aaaf,), # Myanmar Letter Shwe Pala..Tai Viet Letter High O - (0x0aae2, 0x0aaea,), # Meetei Mayek Letter Cha ..Meetei Mayek Letter Ssa - (0x0abc0, 0x0abcd,), # Meetei Mayek Letter Kok ..Meetei Mayek Letter Huk - (0x0abd0, 0x0abd0,), # Meetei Mayek Letter Pham - (0x0abd2, 0x0abda,), # Meetei Mayek Letter Gok ..Meetei Mayek Letter Bham - (0x10a00, 0x10a00,), # Kharoshthi Letter A - (0x10a10, 0x10a13,), # Kharoshthi Letter Ka ..Kharoshthi Letter Gha - (0x10a15, 0x10a17,), # Kharoshthi Letter Ca ..Kharoshthi Letter Ja - (0x10a19, 0x10a35,), # Kharoshthi Letter Nya ..Kharoshthi Letter Vha - (0x11013, 0x11037,), # Brahmi Letter Ka ..Brahmi Letter Old Tamil - (0x11075, 0x11075,), # Brahmi Letter Old Tamil Lla - (0x1108d, 0x110af,), # Kaithi Letter Ka ..Kaithi Letter Ha - (0x11107, 0x11126,), # Chakma Letter Kaa ..Chakma Letter Haa - (0x11144, 0x11144,), # Chakma Letter Lhaa - (0x11147, 0x11147,), # Chakma Letter Vaa - (0x11155, 0x11172,), # Mahajani Letter Ka ..Mahajani Letter Rra - (0x11191, 0x111b2,), # Sharada Letter Ka ..Sharada Letter Ha - (0x11208, 0x11211,), # Khojki Letter Ka ..Khojki Letter Jja - (0x11213, 0x1122b,), # Khojki Letter Nya ..Khojki Letter Lla - (0x1123f, 0x1123f,), # Khojki Letter Qa - (0x11284, 0x11286,), # Multani Letter Ka ..Multani Letter Ga - (0x11288, 0x11288,), # Multani Letter Gha - (0x1128a, 0x1128d,), # Multani Letter Ca ..Multani Letter Jja - (0x1128f, 0x1129d,), # Multani Letter Nya ..Multani Letter Ba - (0x1129f, 0x112a8,), # Multani Letter Bha ..Multani Letter Rha - (0x112ba, 0x112de,), # Khudawadi Letter Ka ..Khudawadi Letter Ha - (0x11315, 0x11328,), # Grantha Letter Ka ..Grantha Letter Na - (0x1132a, 0x11330,), # Grantha Letter Pa ..Grantha Letter Ra - (0x11332, 0x11333,), # Grantha Letter La ..Grantha Letter Lla - (0x11335, 0x11339,), # Grantha Letter Va ..Grantha Letter Ha - (0x11392, 0x113b5,), # Tulu-tigalari Letter Ka ..Tulu-tigalari Letter Lll - (0x1140e, 0x11434,), # Newa Letter Ka ..Newa Letter Ha - (0x1148f, 0x114af,), # Tirhuta Letter Ka ..Tirhuta Letter Ha - (0x1158e, 0x115ae,), # Siddham Letter Ka ..Siddham Letter Ha - (0x1160e, 0x1162f,), # Modi Letter Ka ..Modi Letter Lla - (0x1168a, 0x116aa,), # Takri Letter Ka ..Takri Letter Rra - (0x116b8, 0x116b8,), # Takri Letter Archaic Kha - (0x11700, 0x1171a,), # Ahom Letter Ka ..Ahom Letter Alternate Ba - (0x11740, 0x11746,), # Ahom Letter Ca ..Ahom Letter Lla - (0x1180a, 0x1182b,), # Dogra Letter Ka ..Dogra Letter Rra - (0x1190c, 0x11913,), # Dives Akuru Letter Ka ..Dives Akuru Letter Ja - (0x11915, 0x11916,), # Dives Akuru Letter Nya ..Dives Akuru Letter Tta - (0x11918, 0x1192f,), # Dives Akuru Letter Dda ..Dives Akuru Letter Za - (0x119ae, 0x119d0,), # Nandinagari Letter Ka ..Nandinagari Letter Rra - (0x11a00, 0x11a00,), # Zanabazar Square Letter A - (0x11a0b, 0x11a32,), # Zanabazar Square Letter ..Zanabazar Square Letter - (0x11a50, 0x11a50,), # Soyombo Letter A - (0x11a5c, 0x11a83,), # Soyombo Letter Ka ..Soyombo Letter Kssa - (0x11c0e, 0x11c2e,), # Bhaiksuki Letter Ka ..Bhaiksuki Letter Ha - (0x11c72, 0x11c8f,), # Marchen Letter Ka ..Marchen Letter A - (0x11d0c, 0x11d30,), # Masaram Gondi Letter Ka ..Masaram Gondi Letter Tra - (0x11d6c, 0x11d89,), # Gunjala Gondi Letter Ya ..Gunjala Gondi Letter Sa - (0x11ee0, 0x11ef1,), # Makasar Letter Ka ..Makasar Letter A - (0x11f12, 0x11f33,), # Kawi Letter Ka ..Kawi Letter Jnya - (0x16101, 0x1611d,), # Gurung Khema Letter Ka ..Gurung Khema Letter Sa - (0x16d43, 0x16d62,), # Kirat Rai Letter A ..Kirat Rai Letter Ha -) diff --git a/voxvera/vendor/wcwidth/table_mc.py b/voxvera/vendor/wcwidth/table_mc.py deleted file mode 100644 index 7c2e691..0000000 --- a/voxvera/vendor/wcwidth/table_mc.py +++ /dev/null @@ -1,206 +0,0 @@ -""" -Exports CATEGORY_MC table keyed by supporting unicode version level. - -This code generated by wcwidth/bin/update-tables.py on 2026-01-29 00:47:54 UTC. -""" -# pylint: disable=duplicate-code -CATEGORY_MC = { - '17.0.0': ( - # Source: DerivedGeneralCategory-17.0.0.txt - # Date: 2025-07-24, 00:12:50 GMT - # - (0x00903, 0x00903,), # Devanagari Sign Visarga - (0x0093b, 0x0093b,), # Devanagari Vowel Sign Ooe - (0x0093e, 0x00940,), # Devanagari Vowel Sign Aa..Devanagari Vowel Sign Ii - (0x00949, 0x0094c,), # Devanagari Vowel Sign Ca..Devanagari Vowel Sign Au - (0x0094e, 0x0094f,), # Devanagari Vowel Sign Pr..Devanagari Vowel Sign Aw - (0x00982, 0x00983,), # Bengali Sign Anusvara ..Bengali Sign Visarga - (0x009be, 0x009c0,), # Bengali Vowel Sign Aa ..Bengali Vowel Sign Ii - (0x009c7, 0x009c8,), # Bengali Vowel Sign E ..Bengali Vowel Sign Ai - (0x009cb, 0x009cc,), # Bengali Vowel Sign O ..Bengali Vowel Sign Au - (0x009d7, 0x009d7,), # Bengali Au Length Mark - (0x00a03, 0x00a03,), # Gurmukhi Sign Visarga - (0x00a3e, 0x00a40,), # Gurmukhi Vowel Sign Aa ..Gurmukhi Vowel Sign Ii - (0x00a83, 0x00a83,), # Gujarati Sign Visarga - (0x00abe, 0x00ac0,), # Gujarati Vowel Sign Aa ..Gujarati Vowel Sign Ii - (0x00ac9, 0x00ac9,), # Gujarati Vowel Sign Candra O - (0x00acb, 0x00acc,), # Gujarati Vowel Sign O ..Gujarati Vowel Sign Au - (0x00b02, 0x00b03,), # Oriya Sign Anusvara ..Oriya Sign Visarga - (0x00b3e, 0x00b3e,), # Oriya Vowel Sign Aa - (0x00b40, 0x00b40,), # Oriya Vowel Sign Ii - (0x00b47, 0x00b48,), # Oriya Vowel Sign E ..Oriya Vowel Sign Ai - (0x00b4b, 0x00b4c,), # Oriya Vowel Sign O ..Oriya Vowel Sign Au - (0x00b57, 0x00b57,), # Oriya Au Length Mark - (0x00bbe, 0x00bbf,), # Tamil Vowel Sign Aa ..Tamil Vowel Sign I - (0x00bc1, 0x00bc2,), # Tamil Vowel Sign U ..Tamil Vowel Sign Uu - (0x00bc6, 0x00bc8,), # Tamil Vowel Sign E ..Tamil Vowel Sign Ai - (0x00bca, 0x00bcc,), # Tamil Vowel Sign O ..Tamil Vowel Sign Au - (0x00bd7, 0x00bd7,), # Tamil Au Length Mark - (0x00c01, 0x00c03,), # Telugu Sign Candrabindu ..Telugu Sign Visarga - (0x00c41, 0x00c44,), # Telugu Vowel Sign U ..Telugu Vowel Sign Vocali - (0x00c82, 0x00c83,), # Kannada Sign Anusvara ..Kannada Sign Visarga - (0x00cbe, 0x00cbe,), # Kannada Vowel Sign Aa - (0x00cc0, 0x00cc4,), # Kannada Vowel Sign Ii ..Kannada Vowel Sign Vocal - (0x00cc7, 0x00cc8,), # Kannada Vowel Sign Ee ..Kannada Vowel Sign Ai - (0x00cca, 0x00ccb,), # Kannada Vowel Sign O ..Kannada Vowel Sign Oo - (0x00cd5, 0x00cd6,), # Kannada Length Mark ..Kannada Ai Length Mark - (0x00cf3, 0x00cf3,), # Kannada Sign Combining Anusvara Above Right - (0x00d02, 0x00d03,), # Malayalam Sign Anusvara ..Malayalam Sign Visarga - (0x00d3e, 0x00d40,), # Malayalam Vowel Sign Aa ..Malayalam Vowel Sign Ii - (0x00d46, 0x00d48,), # Malayalam Vowel Sign E ..Malayalam Vowel Sign Ai - (0x00d4a, 0x00d4c,), # Malayalam Vowel Sign O ..Malayalam Vowel Sign Au - (0x00d57, 0x00d57,), # Malayalam Au Length Mark - (0x00d82, 0x00d83,), # Sinhala Sign Anusvaraya ..Sinhala Sign Visargaya - (0x00dcf, 0x00dd1,), # Sinhala Vowel Sign Aela-..Sinhala Vowel Sign Diga - (0x00dd8, 0x00ddf,), # Sinhala Vowel Sign Gaett..Sinhala Vowel Sign Gayan - (0x00df2, 0x00df3,), # Sinhala Vowel Sign Diga ..Sinhala Vowel Sign Diga - (0x00f3e, 0x00f3f,), # Tibetan Sign Yar Tshes ..Tibetan Sign Mar Tshes - (0x00f7f, 0x00f7f,), # Tibetan Sign Rnam Bcad - (0x0102b, 0x0102c,), # Myanmar Vowel Sign Tall ..Myanmar Vowel Sign Aa - (0x01031, 0x01031,), # Myanmar Vowel Sign E - (0x01038, 0x01038,), # Myanmar Sign Visarga - (0x0103b, 0x0103c,), # Myanmar Consonant Sign M..Myanmar Consonant Sign M - (0x01056, 0x01057,), # Myanmar Vowel Sign Vocal..Myanmar Vowel Sign Vocal - (0x01062, 0x01064,), # Myanmar Vowel Sign Sgaw ..Myanmar Tone Mark Sgaw K - (0x01067, 0x0106d,), # Myanmar Vowel Sign Weste..Myanmar Sign Western Pwo - (0x01083, 0x01084,), # Myanmar Vowel Sign Shan ..Myanmar Vowel Sign Shan - (0x01087, 0x0108c,), # Myanmar Sign Shan Tone-2..Myanmar Sign Shan Counci - (0x0108f, 0x0108f,), # Myanmar Sign Rumai Palaung Tone-5 - (0x0109a, 0x0109c,), # Myanmar Sign Khamti Tone..Myanmar Vowel Sign Aiton - (0x01715, 0x01715,), # Tagalog Sign Pamudpod - (0x01734, 0x01734,), # Hanunoo Sign Pamudpod - (0x017b6, 0x017b6,), # Khmer Vowel Sign Aa - (0x017be, 0x017c5,), # Khmer Vowel Sign Oe ..Khmer Vowel Sign Au - (0x017c7, 0x017c8,), # Khmer Sign Reahmuk ..Khmer Sign Yuukaleapintu - (0x01923, 0x01926,), # Limbu Vowel Sign Ee ..Limbu Vowel Sign Au - (0x01929, 0x0192b,), # Limbu Subjoined Letter Y..Limbu Subjoined Letter W - (0x01930, 0x01931,), # Limbu Small Letter Ka ..Limbu Small Letter Nga - (0x01933, 0x01938,), # Limbu Small Letter Ta ..Limbu Small Letter La - (0x01a19, 0x01a1a,), # Buginese Vowel Sign E ..Buginese Vowel Sign O - (0x01a55, 0x01a55,), # Tai Tham Consonant Sign Medial Ra - (0x01a57, 0x01a57,), # Tai Tham Consonant Sign La Tang Lai - (0x01a61, 0x01a61,), # Tai Tham Vowel Sign A - (0x01a63, 0x01a64,), # Tai Tham Vowel Sign Aa ..Tai Tham Vowel Sign Tall - (0x01a6d, 0x01a72,), # Tai Tham Vowel Sign Oy ..Tai Tham Vowel Sign Tham - (0x01b04, 0x01b04,), # Balinese Sign Bisah - (0x01b35, 0x01b35,), # Balinese Vowel Sign Tedung - (0x01b3b, 0x01b3b,), # Balinese Vowel Sign Ra Repa Tedung - (0x01b3d, 0x01b41,), # Balinese Vowel Sign La L..Balinese Vowel Sign Tali - (0x01b43, 0x01b44,), # Balinese Vowel Sign Pepe..Balinese Adeg Adeg - (0x01b82, 0x01b82,), # Sundanese Sign Pangwisad - (0x01ba1, 0x01ba1,), # Sundanese Consonant Sign Pamingkal - (0x01ba6, 0x01ba7,), # Sundanese Vowel Sign Pan..Sundanese Vowel Sign Pan - (0x01baa, 0x01baa,), # Sundanese Sign Pamaaeh - (0x01be7, 0x01be7,), # Batak Vowel Sign E - (0x01bea, 0x01bec,), # Batak Vowel Sign I ..Batak Vowel Sign O - (0x01bee, 0x01bee,), # Batak Vowel Sign U - (0x01bf2, 0x01bf3,), # Batak Pangolat ..Batak Panongonan - (0x01c24, 0x01c2b,), # Lepcha Subjoined Letter ..Lepcha Vowel Sign Uu - (0x01c34, 0x01c35,), # Lepcha Consonant Sign Ny..Lepcha Consonant Sign Ka - (0x01ce1, 0x01ce1,), # Vedic Tone Atharvavedic Independent Svarita - (0x01cf7, 0x01cf7,), # Vedic Sign Atikrama - (0x0302e, 0x0302f,), # Hangul Single Dot Tone M..Hangul Double Dot Tone M - (0x0a823, 0x0a824,), # Syloti Nagri Vowel Sign ..Syloti Nagri Vowel Sign - (0x0a827, 0x0a827,), # Syloti Nagri Vowel Sign Oo - (0x0a880, 0x0a881,), # Saurashtra Sign Anusvara..Saurashtra Sign Visarga - (0x0a8b4, 0x0a8c3,), # Saurashtra Consonant Sig..Saurashtra Vowel Sign Au - (0x0a952, 0x0a953,), # Rejang Consonant Sign H ..Rejang Virama - (0x0a983, 0x0a983,), # Javanese Sign Wignyan - (0x0a9b4, 0x0a9b5,), # Javanese Vowel Sign Taru..Javanese Vowel Sign Tolo - (0x0a9ba, 0x0a9bb,), # Javanese Vowel Sign Tali..Javanese Vowel Sign Dirg - (0x0a9be, 0x0a9c0,), # Javanese Consonant Sign ..Javanese Pangkon - (0x0aa2f, 0x0aa30,), # Cham Vowel Sign O ..Cham Vowel Sign Ai - (0x0aa33, 0x0aa34,), # Cham Consonant Sign Ya ..Cham Consonant Sign Ra - (0x0aa4d, 0x0aa4d,), # Cham Consonant Sign Final H - (0x0aa7b, 0x0aa7b,), # Myanmar Sign Pao Karen Tone - (0x0aa7d, 0x0aa7d,), # Myanmar Sign Tai Laing Tone-5 - (0x0aaeb, 0x0aaeb,), # Meetei Mayek Vowel Sign Ii - (0x0aaee, 0x0aaef,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0aaf5, 0x0aaf5,), # Meetei Mayek Vowel Sign Visarga - (0x0abe3, 0x0abe4,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0abe6, 0x0abe7,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0abe9, 0x0abea,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0abec, 0x0abec,), # Meetei Mayek Lum Iyek - (0x11000, 0x11000,), # Brahmi Sign Candrabindu - (0x11002, 0x11002,), # Brahmi Sign Visarga - (0x11082, 0x11082,), # Kaithi Sign Visarga - (0x110b0, 0x110b2,), # Kaithi Vowel Sign Aa ..Kaithi Vowel Sign Ii - (0x110b7, 0x110b8,), # Kaithi Vowel Sign O ..Kaithi Vowel Sign Au - (0x1112c, 0x1112c,), # Chakma Vowel Sign E - (0x11145, 0x11146,), # Chakma Vowel Sign Aa ..Chakma Vowel Sign Ei - (0x11182, 0x11182,), # Sharada Sign Visarga - (0x111b3, 0x111b5,), # Sharada Vowel Sign Aa ..Sharada Vowel Sign Ii - (0x111bf, 0x111c0,), # Sharada Vowel Sign Au ..Sharada Sign Virama - (0x111ce, 0x111ce,), # Sharada Vowel Sign Prishthamatra E - (0x1122c, 0x1122e,), # Khojki Vowel Sign Aa ..Khojki Vowel Sign Ii - (0x11232, 0x11233,), # Khojki Vowel Sign O ..Khojki Vowel Sign Au - (0x11235, 0x11235,), # Khojki Sign Virama - (0x112e0, 0x112e2,), # Khudawadi Vowel Sign Aa ..Khudawadi Vowel Sign Ii - (0x11302, 0x11303,), # Grantha Sign Anusvara ..Grantha Sign Visarga - (0x1133e, 0x1133f,), # Grantha Vowel Sign Aa ..Grantha Vowel Sign I - (0x11341, 0x11344,), # Grantha Vowel Sign U ..Grantha Vowel Sign Vocal - (0x11347, 0x11348,), # Grantha Vowel Sign Ee ..Grantha Vowel Sign Ai - (0x1134b, 0x1134d,), # Grantha Vowel Sign Oo ..Grantha Sign Virama - (0x11357, 0x11357,), # Grantha Au Length Mark - (0x11362, 0x11363,), # Grantha Vowel Sign Vocal..Grantha Vowel Sign Vocal - (0x113b8, 0x113ba,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Vowel Sign - (0x113c2, 0x113c2,), # Tulu-tigalari Vowel Sign Ee - (0x113c5, 0x113c5,), # Tulu-tigalari Vowel Sign Ai - (0x113c7, 0x113ca,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Sign Candr - (0x113cc, 0x113cd,), # Tulu-tigalari Sign Anusv..Tulu-tigalari Sign Visar - (0x113cf, 0x113cf,), # Tulu-tigalari Sign Looped Virama - (0x11435, 0x11437,), # Newa Vowel Sign Aa ..Newa Vowel Sign Ii - (0x11440, 0x11441,), # Newa Vowel Sign O ..Newa Vowel Sign Au - (0x11445, 0x11445,), # Newa Sign Visarga - (0x114b0, 0x114b2,), # Tirhuta Vowel Sign Aa ..Tirhuta Vowel Sign Ii - (0x114b9, 0x114b9,), # Tirhuta Vowel Sign E - (0x114bb, 0x114be,), # Tirhuta Vowel Sign Ai ..Tirhuta Vowel Sign Au - (0x114c1, 0x114c1,), # Tirhuta Sign Visarga - (0x115af, 0x115b1,), # Siddham Vowel Sign Aa ..Siddham Vowel Sign Ii - (0x115b8, 0x115bb,), # Siddham Vowel Sign E ..Siddham Vowel Sign Au - (0x115be, 0x115be,), # Siddham Sign Visarga - (0x11630, 0x11632,), # Modi Vowel Sign Aa ..Modi Vowel Sign Ii - (0x1163b, 0x1163c,), # Modi Vowel Sign O ..Modi Vowel Sign Au - (0x1163e, 0x1163e,), # Modi Sign Visarga - (0x116ac, 0x116ac,), # Takri Sign Visarga - (0x116ae, 0x116af,), # Takri Vowel Sign I ..Takri Vowel Sign Ii - (0x116b6, 0x116b6,), # Takri Sign Virama - (0x1171e, 0x1171e,), # Ahom Consonant Sign Medial Ra - (0x11720, 0x11721,), # Ahom Vowel Sign A ..Ahom Vowel Sign Aa - (0x11726, 0x11726,), # Ahom Vowel Sign E - (0x1182c, 0x1182e,), # Dogra Vowel Sign Aa ..Dogra Vowel Sign Ii - (0x11838, 0x11838,), # Dogra Sign Visarga - (0x11930, 0x11935,), # Dives Akuru Vowel Sign A..Dives Akuru Vowel Sign E - (0x11937, 0x11938,), # Dives Akuru Vowel Sign A..Dives Akuru Vowel Sign O - (0x1193d, 0x1193d,), # Dives Akuru Sign Halanta - (0x11940, 0x11940,), # Dives Akuru Medial Ya - (0x11942, 0x11942,), # Dives Akuru Medial Ra - (0x119d1, 0x119d3,), # Nandinagari Vowel Sign A..Nandinagari Vowel Sign I - (0x119dc, 0x119df,), # Nandinagari Vowel Sign O..Nandinagari Sign Visarga - (0x119e4, 0x119e4,), # Nandinagari Vowel Sign Prishthamatra E - (0x11a39, 0x11a39,), # Zanabazar Square Sign Visarga - (0x11a57, 0x11a58,), # Soyombo Vowel Sign Ai ..Soyombo Vowel Sign Au - (0x11a97, 0x11a97,), # Soyombo Sign Visarga - (0x11b61, 0x11b61,), # Sharada Vowel Sign Ooe - (0x11b65, 0x11b65,), # Sharada Vowel Sign Short O - (0x11b67, 0x11b67,), # Sharada Vowel Sign Candra O - (0x11c2f, 0x11c2f,), # Bhaiksuki Vowel Sign Aa - (0x11c3e, 0x11c3e,), # Bhaiksuki Sign Visarga - (0x11ca9, 0x11ca9,), # Marchen Subjoined Letter Ya - (0x11cb1, 0x11cb1,), # Marchen Vowel Sign I - (0x11cb4, 0x11cb4,), # Marchen Vowel Sign O - (0x11d8a, 0x11d8e,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign - (0x11d93, 0x11d94,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign - (0x11d96, 0x11d96,), # Gunjala Gondi Sign Visarga - (0x11ef5, 0x11ef6,), # Makasar Vowel Sign E ..Makasar Vowel Sign O - (0x11f03, 0x11f03,), # Kawi Sign Visarga - (0x11f34, 0x11f35,), # Kawi Vowel Sign Aa ..Kawi Vowel Sign Alternat - (0x11f3e, 0x11f3f,), # Kawi Vowel Sign E ..Kawi Vowel Sign Ai - (0x11f41, 0x11f41,), # Kawi Sign Killer - (0x1612a, 0x1612c,), # Gurung Khema Consonant S..Gurung Khema Consonant S - (0x16f51, 0x16f87,), # Miao Sign Aspiration ..Miao Vowel Sign Ui - (0x16ff0, 0x16ff1,), # Vietnamese Alternate Rea..Vietnamese Alternate Rea - (0x1d165, 0x1d166,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d16d, 0x1d172,), # Musical Symbol Combining..Musical Symbol Combining - ), -} diff --git a/voxvera/vendor/wcwidth/table_vs16.py b/voxvera/vendor/wcwidth/table_vs16.py deleted file mode 100644 index 70e4a73..0000000 --- a/voxvera/vendor/wcwidth/table_vs16.py +++ /dev/null @@ -1,126 +0,0 @@ -""" -Exports VS16_NARROW_TO_WIDE table keyed by supporting unicode version level. - -This code generated by wcwidth/bin/update-tables.py on 2025-09-15 16:57:50 UTC. -""" -# pylint: disable=duplicate-code -VS16_NARROW_TO_WIDE = { - '9.0.0': ( - # Source: 9.0.0 - # Date: 2025-01-30, 21:48:29 GMT - # - (0x00023, 0x00023,), # Number Sign - (0x0002a, 0x0002a,), # Asterisk - (0x00030, 0x00039,), # Digit Zero ..Digit Nine - (0x000a9, 0x000a9,), # Copyright Sign - (0x000ae, 0x000ae,), # Registered Sign - (0x0203c, 0x0203c,), # Double Exclamation Mark - (0x02049, 0x02049,), # Exclamation Question Mark - (0x02122, 0x02122,), # Trade Mark Sign - (0x02139, 0x02139,), # Information Source - (0x02194, 0x02199,), # Left Right Arrow ..South West Arrow - (0x021a9, 0x021aa,), # Leftwards Arrow With Hoo..Rightwards Arrow With Ho - (0x02328, 0x02328,), # Keyboard - (0x023cf, 0x023cf,), # Eject Symbol - (0x023ed, 0x023ef,), # Black Right-pointing Dou..Black Right-pointing Tri - (0x023f1, 0x023f2,), # Stopwatch ..Timer Clock - (0x023f8, 0x023fa,), # Double Vertical Bar ..Black Circle For Record - (0x024c2, 0x024c2,), # Circled Latin Capital Letter M - (0x025aa, 0x025ab,), # Black Small Square ..White Small Square - (0x025b6, 0x025b6,), # Black Right-pointing Triangle - (0x025c0, 0x025c0,), # Black Left-pointing Triangle - (0x025fb, 0x025fc,), # White Medium Square ..Black Medium Square - (0x02600, 0x02604,), # Black Sun With Rays ..Comet - (0x0260e, 0x0260e,), # Black Telephone - (0x02611, 0x02611,), # Ballot Box With Check - (0x02618, 0x02618,), # Shamrock - (0x0261d, 0x0261d,), # White Up Pointing Index - (0x02620, 0x02620,), # Skull And Crossbones - (0x02622, 0x02623,), # Radioactive Sign ..Biohazard Sign - (0x02626, 0x02626,), # Orthodox Cross - (0x0262a, 0x0262a,), # Star And Crescent - (0x0262e, 0x0262f,), # Peace Symbol ..Yin Yang - (0x02638, 0x0263a,), # Wheel Of Dharma ..White Smiling Face - (0x02640, 0x02640,), # Female Sign - (0x02642, 0x02642,), # Male Sign - (0x0265f, 0x02660,), # Black Chess Pawn ..Black Spade Suit - (0x02663, 0x02663,), # Black Club Suit - (0x02665, 0x02666,), # Black Heart Suit ..Black Diamond Suit - (0x02668, 0x02668,), # Hot Springs - (0x0267b, 0x0267b,), # Black Universal Recycling Symbol - (0x0267e, 0x0267e,), # Permanent Paper Sign - (0x02692, 0x02692,), # Hammer And Pick - (0x02694, 0x02697,), # Crossed Swords ..Alembic - (0x02699, 0x02699,), # Gear - (0x0269b, 0x0269c,), # Atom Symbol ..Fleur-de-lis - (0x026a0, 0x026a0,), # Warning Sign - (0x026a7, 0x026a7,), # Male With Stroke And Male And Female Sign - (0x026b0, 0x026b1,), # Coffin ..Funeral Urn - (0x026c8, 0x026c8,), # Thunder Cloud And Rain - (0x026cf, 0x026cf,), # Pick - (0x026d1, 0x026d1,), # Helmet With White Cross - (0x026d3, 0x026d3,), # Chains - (0x026e9, 0x026e9,), # Shinto Shrine - (0x026f0, 0x026f1,), # Mountain ..Umbrella On Ground - (0x026f4, 0x026f4,), # Ferry - (0x026f7, 0x026f9,), # Skier ..Person With Ball - (0x02702, 0x02702,), # Black Scissors - (0x02708, 0x02709,), # Airplane ..Envelope - (0x0270c, 0x0270d,), # Victory Hand ..Writing Hand - (0x0270f, 0x0270f,), # Pencil - (0x02712, 0x02712,), # Black Nib - (0x02714, 0x02714,), # Heavy Check Mark - (0x02716, 0x02716,), # Heavy Multiplication X - (0x0271d, 0x0271d,), # Latin Cross - (0x02721, 0x02721,), # Star Of David - (0x02733, 0x02734,), # Eight Spoked Asterisk ..Eight Pointed Black Star - (0x02744, 0x02744,), # Snowflake - (0x02747, 0x02747,), # Sparkle - (0x02763, 0x02764,), # Heavy Heart Exclamation ..Heavy Black Heart - (0x027a1, 0x027a1,), # Black Rightwards Arrow - (0x02934, 0x02935,), # Arrow Pointing Rightward..Arrow Pointing Rightward - (0x02b05, 0x02b07,), # Leftwards Black Arrow ..Downwards Black Arrow - (0x1f170, 0x1f171,), # Negative Squared Latin C..Negative Squared Latin C - (0x1f17e, 0x1f17f,), # Negative Squared Latin C..Negative Squared Latin C - (0x1f321, 0x1f321,), # Thermometer - (0x1f324, 0x1f32c,), # White Sun With Small Clo..Wind Blowing Face - (0x1f336, 0x1f336,), # Hot Pepper - (0x1f37d, 0x1f37d,), # Fork And Knife With Plate - (0x1f396, 0x1f397,), # Military Medal ..Reminder Ribbon - (0x1f399, 0x1f39b,), # Studio Microphone ..Control Knobs - (0x1f39e, 0x1f39f,), # Film Frames ..Admission Tickets - (0x1f3cb, 0x1f3ce,), # Weight Lifter ..Racing Car - (0x1f3d4, 0x1f3df,), # Snow Capped Mountain ..Stadium - (0x1f3f3, 0x1f3f3,), # Waving White Flag - (0x1f3f5, 0x1f3f5,), # Rosette - (0x1f3f7, 0x1f3f7,), # Label - (0x1f43f, 0x1f43f,), # Chipmunk - (0x1f441, 0x1f441,), # Eye - (0x1f4fd, 0x1f4fd,), # Film Projector - (0x1f549, 0x1f54a,), # Om Symbol ..Dove Of Peace - (0x1f56f, 0x1f570,), # Candle ..Mantelpiece Clock - (0x1f573, 0x1f579,), # Hole ..Joystick - (0x1f587, 0x1f587,), # Linked Paperclips - (0x1f58a, 0x1f58d,), # Lower Left Ballpoint Pen..Lower Left Crayon - (0x1f590, 0x1f590,), # Raised Hand With Fingers Splayed - (0x1f5a5, 0x1f5a5,), # Desktop Computer - (0x1f5a8, 0x1f5a8,), # Printer - (0x1f5b1, 0x1f5b2,), # Three Button Mouse ..Trackball - (0x1f5bc, 0x1f5bc,), # Frame With Picture - (0x1f5c2, 0x1f5c4,), # Card Index Dividers ..File Cabinet - (0x1f5d1, 0x1f5d3,), # Wastebasket ..Spiral Calendar Pad - (0x1f5dc, 0x1f5de,), # Compression ..Rolled-up Newspaper - (0x1f5e1, 0x1f5e1,), # Dagger Knife - (0x1f5e3, 0x1f5e3,), # Speaking Head In Silhouette - (0x1f5e8, 0x1f5e8,), # Left Speech Bubble - (0x1f5ef, 0x1f5ef,), # Right Anger Bubble - (0x1f5f3, 0x1f5f3,), # Ballot Box With Ballot - (0x1f5fa, 0x1f5fa,), # World Map - (0x1f6cb, 0x1f6cb,), # Couch And Lamp - (0x1f6cd, 0x1f6cf,), # Shopping Bags ..Bed - (0x1f6e0, 0x1f6e5,), # Hammer And Wrench ..Motor Boat - (0x1f6e9, 0x1f6e9,), # Small Airplane - (0x1f6f0, 0x1f6f0,), # Satellite - (0x1f6f3, 0x1f6f3,), # Passenger Ship - ), -} diff --git a/voxvera/vendor/wcwidth/table_wide.py b/voxvera/vendor/wcwidth/table_wide.py deleted file mode 100644 index ed6f48a..0000000 --- a/voxvera/vendor/wcwidth/table_wide.py +++ /dev/null @@ -1,138 +0,0 @@ -""" -Exports WIDE_EASTASIAN table keyed by supporting unicode version level. - -This code generated by wcwidth/bin/update-tables.py on 2026-01-30 00:58:17 UTC. -""" -# pylint: disable=duplicate-code -WIDE_EASTASIAN = { - '17.0.0': ( - # Source: EastAsianWidth-17.0.0.txt - # Date: 2025-07-24, 00:12:54 GMT - # - (0x01100, 0x0115f,), # Hangul Choseong Kiyeok ..Hangul Choseong Filler - (0x0231a, 0x0231b,), # Watch ..Hourglass - (0x02329, 0x0232a,), # Left-pointing Angle Brac..Right-pointing Angle Bra - (0x023e9, 0x023ec,), # Black Right-pointing Dou..Black Down-pointing Doub - (0x023f0, 0x023f0,), # Alarm Clock - (0x023f3, 0x023f3,), # Hourglass With Flowing Sand - (0x025fd, 0x025fe,), # White Medium Small Squar..Black Medium Small Squar - (0x02614, 0x02615,), # Umbrella With Rain Drops..Hot Beverage - (0x02630, 0x02637,), # Trigram For Heaven ..Trigram For Earth - (0x02648, 0x02653,), # Aries ..Pisces - (0x0267f, 0x0267f,), # Wheelchair Symbol - (0x0268a, 0x0268f,), # Monogram For Yang ..Digram For Greater Yin - (0x02693, 0x02693,), # Anchor - (0x026a1, 0x026a1,), # High Voltage Sign - (0x026aa, 0x026ab,), # Medium White Circle ..Medium Black Circle - (0x026bd, 0x026be,), # Soccer Ball ..Baseball - (0x026c4, 0x026c5,), # Snowman Without Snow ..Sun Behind Cloud - (0x026ce, 0x026ce,), # Ophiuchus - (0x026d4, 0x026d4,), # No Entry - (0x026ea, 0x026ea,), # Church - (0x026f2, 0x026f3,), # Fountain ..Flag In Hole - (0x026f5, 0x026f5,), # Sailboat - (0x026fa, 0x026fa,), # Tent - (0x026fd, 0x026fd,), # Fuel Pump - (0x02705, 0x02705,), # White Heavy Check Mark - (0x0270a, 0x0270b,), # Raised Fist ..Raised Hand - (0x02728, 0x02728,), # Sparkles - (0x0274c, 0x0274c,), # Cross Mark - (0x0274e, 0x0274e,), # Negative Squared Cross Mark - (0x02753, 0x02755,), # Black Question Mark Orna..White Exclamation Mark O - (0x02757, 0x02757,), # Heavy Exclamation Mark Symbol - (0x02795, 0x02797,), # Heavy Plus Sign ..Heavy Division Sign - (0x027b0, 0x027b0,), # Curly Loop - (0x027bf, 0x027bf,), # Double Curly Loop - (0x02b1b, 0x02b1c,), # Black Large Square ..White Large Square - (0x02b50, 0x02b50,), # White Medium Star - (0x02b55, 0x02b55,), # Heavy Large Circle - (0x02e80, 0x02e99,), # Cjk Radical Repeat ..Cjk Radical Rap - (0x02e9b, 0x02ef3,), # Cjk Radical Choke ..Cjk Radical C-simplified - (0x02f00, 0x02fd5,), # Kangxi Radical One ..Kangxi Radical Flute - (0x02ff0, 0x03029,), # Ideographic Description ..Hangzhou Numeral Nine - (0x03030, 0x0303e,), # Wavy Dash ..Ideographic Variation In - (0x03041, 0x03096,), # Hiragana Letter Small A ..Hiragana Letter Small Ke - (0x0309b, 0x030ff,), # Katakana-hiragana Voiced..Katakana Digraph Koto - (0x03105, 0x0312f,), # Bopomofo Letter B ..Bopomofo Letter Nn - (0x03131, 0x03163,), # Hangul Letter Kiyeok ..Hangul Letter I - (0x03165, 0x0318e,), # Hangul Letter Ssangnieun..Hangul Letter Araeae - (0x03190, 0x031e5,), # Ideographic Annotation L..Cjk Stroke Szp - (0x031ef, 0x0321e,), # Ideographic Description ..Parenthesized Korean Cha - (0x03220, 0x03247,), # Parenthesized Ideograph ..Circled Ideograph Koto - (0x03250, 0x0a48c,), # Partnership Sign ..Yi Syllable Yyr - (0x0a490, 0x0a4c6,), # Yi Radical Qot ..Yi Radical Ke - (0x0a960, 0x0a97c,), # Hangul Choseong Tikeut-m..Hangul Choseong Ssangyeo - (0x0ac00, 0x0d7a3,), # Hangul Syllable Ga ..Hangul Syllable Hih - (0x0f900, 0x0faff,), # Cjk Compatibility Ideogr..(nil) - (0x0fe10, 0x0fe19,), # Presentation Form For Ve..Presentation Form For Ve - (0x0fe30, 0x0fe52,), # Presentation Form For Ve..Small Full Stop - (0x0fe54, 0x0fe66,), # Small Semicolon ..Small Equals Sign - (0x0fe68, 0x0fe6b,), # Small Reverse Solidus ..Small Commercial At - (0x0ff01, 0x0ff60,), # Fullwidth Exclamation Ma..Fullwidth Right White Pa - (0x0ffe0, 0x0ffe6,), # Fullwidth Cent Sign ..Fullwidth Won Sign - (0x16fe0, 0x16fe3,), # Tangut Iteration Mark ..Old Chinese Iteration Ma - (0x16ff2, 0x16ff6,), # Chinese Small Simplified..Yangqin Sign Slow Two Be - (0x17000, 0x18cd5,), # (nil) ..Khitan Small Script Char - (0x18cff, 0x18d1e,), # Khitan Small Script Char..(nil) - (0x18d80, 0x18df2,), # Tangut Component-769 ..Tangut Component-883 - (0x1aff0, 0x1aff3,), # Katakana Letter Minnan T..Katakana Letter Minnan T - (0x1aff5, 0x1affb,), # Katakana Letter Minnan T..Katakana Letter Minnan N - (0x1affd, 0x1affe,), # Katakana Letter Minnan N..Katakana Letter Minnan N - (0x1b000, 0x1b122,), # Katakana Letter Archaic ..Katakana Letter Archaic - (0x1b132, 0x1b132,), # Hiragana Letter Small Ko - (0x1b150, 0x1b152,), # Hiragana Letter Small Wi..Hiragana Letter Small Wo - (0x1b155, 0x1b155,), # Katakana Letter Small Ko - (0x1b164, 0x1b167,), # Katakana Letter Small Wi..Katakana Letter Small N - (0x1b170, 0x1b2fb,), # Nushu Character-1b170 ..Nushu Character-1b2fb - (0x1d300, 0x1d356,), # Monogram For Earth ..Tetragram For Fostering - (0x1d360, 0x1d376,), # Counting Rod Unit Digit ..Ideographic Tally Mark F - (0x1f004, 0x1f004,), # Mahjong Tile Red Dragon - (0x1f0cf, 0x1f0cf,), # Playing Card Black Joker - (0x1f18e, 0x1f18e,), # Negative Squared Ab - (0x1f191, 0x1f19a,), # Squared Cl ..Squared Vs - (0x1f1e6, 0x1f202,), # Regional Indicator Symbo..Squared Katakana Sa - (0x1f210, 0x1f23b,), # Squared Cjk Unified Ideo..Squared Cjk Unified Ideo - (0x1f240, 0x1f248,), # Tortoise Shell Bracketed..Tortoise Shell Bracketed - (0x1f250, 0x1f251,), # Circled Ideograph Advant..Circled Ideograph Accept - (0x1f260, 0x1f265,), # Rounded Symbol For Fu ..Rounded Symbol For Cai - (0x1f300, 0x1f320,), # Cyclone ..Shooting Star - (0x1f32d, 0x1f335,), # Hot Dog ..Cactus - (0x1f337, 0x1f37c,), # Tulip ..Baby Bottle - (0x1f37e, 0x1f393,), # Bottle With Popping Cork..Graduation Cap - (0x1f3a0, 0x1f3ca,), # Carousel Horse ..Swimmer - (0x1f3cf, 0x1f3d3,), # Cricket Bat And Ball ..Table Tennis Paddle And - (0x1f3e0, 0x1f3f0,), # House Building ..European Castle - (0x1f3f4, 0x1f3f4,), # Waving Black Flag - (0x1f3f8, 0x1f43e,), # Badminton Racquet And Sh..Paw Prints - (0x1f440, 0x1f440,), # Eyes - (0x1f442, 0x1f4fc,), # Ear ..Videocassette - (0x1f4ff, 0x1f53d,), # Prayer Beads ..Down-pointing Small Red - (0x1f54b, 0x1f54e,), # Kaaba ..Menorah With Nine Branch - (0x1f550, 0x1f567,), # Clock Face One Oclock ..Clock Face Twelve-thirty - (0x1f57a, 0x1f57a,), # Man Dancing - (0x1f595, 0x1f596,), # Reversed Hand With Middl..Raised Hand With Part Be - (0x1f5a4, 0x1f5a4,), # Black Heart - (0x1f5fb, 0x1f64f,), # Mount Fuji ..Person With Folded Hands - (0x1f680, 0x1f6c5,), # Rocket ..Left Luggage - (0x1f6cc, 0x1f6cc,), # Sleeping Accommodation - (0x1f6d0, 0x1f6d2,), # Place Of Worship ..Shopping Trolley - (0x1f6d5, 0x1f6d8,), # Hindu Temple ..Landslide - (0x1f6dc, 0x1f6df,), # Wireless ..Ring Buoy - (0x1f6eb, 0x1f6ec,), # Airplane Departure ..Airplane Arriving - (0x1f6f4, 0x1f6fc,), # Scooter ..Roller Skate - (0x1f7e0, 0x1f7eb,), # Large Orange Circle ..Large Brown Square - (0x1f7f0, 0x1f7f0,), # Heavy Equals Sign - (0x1f90c, 0x1f93a,), # Pinched Fingers ..Fencer - (0x1f93c, 0x1f945,), # Wrestlers ..Goal Net - (0x1f947, 0x1f9ff,), # First Place Medal ..Nazar Amulet - (0x1fa70, 0x1fa7c,), # Ballet Shoes ..Crutch - (0x1fa80, 0x1fa8a,), # Yo-yo ..Trombone - (0x1fa8e, 0x1fac6,), # Treasure Chest ..Fingerprint - (0x1fac8, 0x1fac8,), # Hairy Creature - (0x1facd, 0x1fadc,), # Orca ..Root Vegetable - (0x1fadf, 0x1faea,), # Splatter ..Distorted Face - (0x1faef, 0x1faf8,), # Fight Cloud ..Rightwards Pushing Hand - (0x20000, 0x2fffd,), # Cjk Unified Ideograph-20..(nil) - (0x30000, 0x3fffd,), # Cjk Unified Ideograph-30..(nil) - ), -} diff --git a/voxvera/vendor/wcwidth/table_zero.py b/voxvera/vendor/wcwidth/table_zero.py deleted file mode 100644 index c440bfc..0000000 --- a/voxvera/vendor/wcwidth/table_zero.py +++ /dev/null @@ -1,350 +0,0 @@ -""" -Exports ZERO_WIDTH table keyed by supporting unicode version level. - -This code generated by wcwidth/bin/update-tables.py on 2026-01-30 00:48:24 UTC. -""" -# pylint: disable=duplicate-code -ZERO_WIDTH = { - '17.0.0': ( - # Source: DerivedGeneralCategory-17.0.0.txt - # Date: 2025-07-24, 00:12:50 GMT - # - (0x00000, 0x00000,), # (nil) - (0x00300, 0x0036f,), # Combining Grave Accent ..Combining Latin Small Le - (0x00483, 0x00489,), # Combining Cyrillic Titlo..Combining Cyrillic Milli - (0x00591, 0x005bd,), # Hebrew Accent Etnahta ..Hebrew Point Meteg - (0x005bf, 0x005bf,), # Hebrew Point Rafe - (0x005c1, 0x005c2,), # Hebrew Point Shin Dot ..Hebrew Point Sin Dot - (0x005c4, 0x005c5,), # Hebrew Mark Upper Dot ..Hebrew Mark Lower Dot - (0x005c7, 0x005c7,), # Hebrew Point Qamats Qatan - (0x00610, 0x0061a,), # Arabic Sign Sallallahou ..Arabic Small Kasra - (0x0061c, 0x0061c,), # Arabic Letter Mark - (0x0064b, 0x0065f,), # Arabic Fathatan ..Arabic Wavy Hamza Below - (0x00670, 0x00670,), # Arabic Letter Superscript Alef - (0x006d6, 0x006dc,), # Arabic Small High Ligatu..Arabic Small High Seen - (0x006df, 0x006e4,), # Arabic Small High Rounde..Arabic Small High Madda - (0x006e7, 0x006e8,), # Arabic Small High Yeh ..Arabic Small High Noon - (0x006ea, 0x006ed,), # Arabic Empty Centre Low ..Arabic Small Low Meem - (0x00711, 0x00711,), # Syriac Letter Superscript Alaph - (0x00730, 0x0074a,), # Syriac Pthaha Above ..Syriac Barrekh - (0x007a6, 0x007b0,), # Thaana Abafili ..Thaana Sukun - (0x007eb, 0x007f3,), # Nko Combining Short High..Nko Combining Double Dot - (0x007fd, 0x007fd,), # Nko Dantayalan - (0x00816, 0x00819,), # Samaritan Mark In ..Samaritan Mark Dagesh - (0x0081b, 0x00823,), # Samaritan Mark Epentheti..Samaritan Vowel Sign A - (0x00825, 0x00827,), # Samaritan Vowel Sign Sho..Samaritan Vowel Sign U - (0x00829, 0x0082d,), # Samaritan Vowel Sign Lon..Samaritan Mark Nequdaa - (0x00859, 0x0085b,), # Mandaic Affrication Mark..Mandaic Gemination Mark - (0x00897, 0x0089f,), # Arabic Pepet ..Arabic Half Madda Over M - (0x008ca, 0x008e1,), # Arabic Small High Farsi ..Arabic Small High Sign S - (0x008e3, 0x00903,), # Arabic Turned Damma Belo..Devanagari Sign Visarga - (0x0093a, 0x0093c,), # Devanagari Vowel Sign Oe..Devanagari Sign Nukta - (0x0093e, 0x0094f,), # Devanagari Vowel Sign Aa..Devanagari Vowel Sign Aw - (0x00951, 0x00957,), # Devanagari Stress Sign U..Devanagari Vowel Sign Uu - (0x00962, 0x00963,), # Devanagari Vowel Sign Vo..Devanagari Vowel Sign Vo - (0x00981, 0x00983,), # Bengali Sign Candrabindu..Bengali Sign Visarga - (0x009bc, 0x009bc,), # Bengali Sign Nukta - (0x009be, 0x009c4,), # Bengali Vowel Sign Aa ..Bengali Vowel Sign Vocal - (0x009c7, 0x009c8,), # Bengali Vowel Sign E ..Bengali Vowel Sign Ai - (0x009cb, 0x009cd,), # Bengali Vowel Sign O ..Bengali Sign Virama - (0x009d7, 0x009d7,), # Bengali Au Length Mark - (0x009e2, 0x009e3,), # Bengali Vowel Sign Vocal..Bengali Vowel Sign Vocal - (0x009fe, 0x009fe,), # Bengali Sandhi Mark - (0x00a01, 0x00a03,), # Gurmukhi Sign Adak Bindi..Gurmukhi Sign Visarga - (0x00a3c, 0x00a3c,), # Gurmukhi Sign Nukta - (0x00a3e, 0x00a42,), # Gurmukhi Vowel Sign Aa ..Gurmukhi Vowel Sign Uu - (0x00a47, 0x00a48,), # Gurmukhi Vowel Sign Ee ..Gurmukhi Vowel Sign Ai - (0x00a4b, 0x00a4d,), # Gurmukhi Vowel Sign Oo ..Gurmukhi Sign Virama - (0x00a51, 0x00a51,), # Gurmukhi Sign Udaat - (0x00a70, 0x00a71,), # Gurmukhi Tippi ..Gurmukhi Addak - (0x00a75, 0x00a75,), # Gurmukhi Sign Yakash - (0x00a81, 0x00a83,), # Gujarati Sign Candrabind..Gujarati Sign Visarga - (0x00abc, 0x00abc,), # Gujarati Sign Nukta - (0x00abe, 0x00ac5,), # Gujarati Vowel Sign Aa ..Gujarati Vowel Sign Cand - (0x00ac7, 0x00ac9,), # Gujarati Vowel Sign E ..Gujarati Vowel Sign Cand - (0x00acb, 0x00acd,), # Gujarati Vowel Sign O ..Gujarati Sign Virama - (0x00ae2, 0x00ae3,), # Gujarati Vowel Sign Voca..Gujarati Vowel Sign Voca - (0x00afa, 0x00aff,), # Gujarati Sign Sukun ..Gujarati Sign Two-circle - (0x00b01, 0x00b03,), # Oriya Sign Candrabindu ..Oriya Sign Visarga - (0x00b3c, 0x00b3c,), # Oriya Sign Nukta - (0x00b3e, 0x00b44,), # Oriya Vowel Sign Aa ..Oriya Vowel Sign Vocalic - (0x00b47, 0x00b48,), # Oriya Vowel Sign E ..Oriya Vowel Sign Ai - (0x00b4b, 0x00b4d,), # Oriya Vowel Sign O ..Oriya Sign Virama - (0x00b55, 0x00b57,), # Oriya Sign Overline ..Oriya Au Length Mark - (0x00b62, 0x00b63,), # Oriya Vowel Sign Vocalic..Oriya Vowel Sign Vocalic - (0x00b82, 0x00b82,), # Tamil Sign Anusvara - (0x00bbe, 0x00bc2,), # Tamil Vowel Sign Aa ..Tamil Vowel Sign Uu - (0x00bc6, 0x00bc8,), # Tamil Vowel Sign E ..Tamil Vowel Sign Ai - (0x00bca, 0x00bcd,), # Tamil Vowel Sign O ..Tamil Sign Virama - (0x00bd7, 0x00bd7,), # Tamil Au Length Mark - (0x00c00, 0x00c04,), # Telugu Sign Combining Ca..Telugu Sign Combining An - (0x00c3c, 0x00c3c,), # Telugu Sign Nukta - (0x00c3e, 0x00c44,), # Telugu Vowel Sign Aa ..Telugu Vowel Sign Vocali - (0x00c46, 0x00c48,), # Telugu Vowel Sign E ..Telugu Vowel Sign Ai - (0x00c4a, 0x00c4d,), # Telugu Vowel Sign O ..Telugu Sign Virama - (0x00c55, 0x00c56,), # Telugu Length Mark ..Telugu Ai Length Mark - (0x00c62, 0x00c63,), # Telugu Vowel Sign Vocali..Telugu Vowel Sign Vocali - (0x00c81, 0x00c83,), # Kannada Sign Candrabindu..Kannada Sign Visarga - (0x00cbc, 0x00cbc,), # Kannada Sign Nukta - (0x00cbe, 0x00cc4,), # Kannada Vowel Sign Aa ..Kannada Vowel Sign Vocal - (0x00cc6, 0x00cc8,), # Kannada Vowel Sign E ..Kannada Vowel Sign Ai - (0x00cca, 0x00ccd,), # Kannada Vowel Sign O ..Kannada Sign Virama - (0x00cd5, 0x00cd6,), # Kannada Length Mark ..Kannada Ai Length Mark - (0x00ce2, 0x00ce3,), # Kannada Vowel Sign Vocal..Kannada Vowel Sign Vocal - (0x00cf3, 0x00cf3,), # Kannada Sign Combining Anusvara Above Right - (0x00d00, 0x00d03,), # Malayalam Sign Combining..Malayalam Sign Visarga - (0x00d3b, 0x00d3c,), # Malayalam Sign Vertical ..Malayalam Sign Circular - (0x00d3e, 0x00d44,), # Malayalam Vowel Sign Aa ..Malayalam Vowel Sign Voc - (0x00d46, 0x00d48,), # Malayalam Vowel Sign E ..Malayalam Vowel Sign Ai - (0x00d4a, 0x00d4d,), # Malayalam Vowel Sign O ..Malayalam Sign Virama - (0x00d57, 0x00d57,), # Malayalam Au Length Mark - (0x00d62, 0x00d63,), # Malayalam Vowel Sign Voc..Malayalam Vowel Sign Voc - (0x00d81, 0x00d83,), # Sinhala Sign Candrabindu..Sinhala Sign Visargaya - (0x00dca, 0x00dca,), # Sinhala Sign Al-lakuna - (0x00dcf, 0x00dd4,), # Sinhala Vowel Sign Aela-..Sinhala Vowel Sign Ketti - (0x00dd6, 0x00dd6,), # Sinhala Vowel Sign Diga Paa-pilla - (0x00dd8, 0x00ddf,), # Sinhala Vowel Sign Gaett..Sinhala Vowel Sign Gayan - (0x00df2, 0x00df3,), # Sinhala Vowel Sign Diga ..Sinhala Vowel Sign Diga - (0x00e31, 0x00e31,), # Thai Character Mai Han-akat - (0x00e34, 0x00e3a,), # Thai Character Sara I ..Thai Character Phinthu - (0x00e47, 0x00e4e,), # Thai Character Maitaikhu..Thai Character Yamakkan - (0x00eb1, 0x00eb1,), # Lao Vowel Sign Mai Kan - (0x00eb4, 0x00ebc,), # Lao Vowel Sign I ..Lao Semivowel Sign Lo - (0x00ec8, 0x00ece,), # Lao Tone Mai Ek ..Lao Yamakkan - (0x00f18, 0x00f19,), # Tibetan Astrological Sig..Tibetan Astrological Sig - (0x00f35, 0x00f35,), # Tibetan Mark Ngas Bzung Nyi Zla - (0x00f37, 0x00f37,), # Tibetan Mark Ngas Bzung Sgor Rtags - (0x00f39, 0x00f39,), # Tibetan Mark Tsa -phru - (0x00f3e, 0x00f3f,), # Tibetan Sign Yar Tshes ..Tibetan Sign Mar Tshes - (0x00f71, 0x00f84,), # Tibetan Vowel Sign Aa ..Tibetan Mark Halanta - (0x00f86, 0x00f87,), # Tibetan Sign Lci Rtags ..Tibetan Sign Yang Rtags - (0x00f8d, 0x00f97,), # Tibetan Subjoined Sign L..Tibetan Subjoined Letter - (0x00f99, 0x00fbc,), # Tibetan Subjoined Letter..Tibetan Subjoined Letter - (0x00fc6, 0x00fc6,), # Tibetan Symbol Padma Gdan - (0x0102b, 0x0103e,), # Myanmar Vowel Sign Tall ..Myanmar Consonant Sign M - (0x01056, 0x01059,), # Myanmar Vowel Sign Vocal..Myanmar Vowel Sign Vocal - (0x0105e, 0x01060,), # Myanmar Consonant Sign M..Myanmar Consonant Sign M - (0x01062, 0x01064,), # Myanmar Vowel Sign Sgaw ..Myanmar Tone Mark Sgaw K - (0x01067, 0x0106d,), # Myanmar Vowel Sign Weste..Myanmar Sign Western Pwo - (0x01071, 0x01074,), # Myanmar Vowel Sign Geba ..Myanmar Vowel Sign Kayah - (0x01082, 0x0108d,), # Myanmar Consonant Sign S..Myanmar Sign Shan Counci - (0x0108f, 0x0108f,), # Myanmar Sign Rumai Palaung Tone-5 - (0x0109a, 0x0109d,), # Myanmar Sign Khamti Tone..Myanmar Vowel Sign Aiton - (0x01160, 0x011ff,), # Hangul Jungseong Filler ..Hangul Jongseong Ssangni - (0x0135d, 0x0135f,), # Ethiopic Combining Gemin..Ethiopic Combining Gemin - (0x01712, 0x01715,), # Tagalog Vowel Sign I ..Tagalog Sign Pamudpod - (0x01732, 0x01734,), # Hanunoo Vowel Sign I ..Hanunoo Sign Pamudpod - (0x01752, 0x01753,), # Buhid Vowel Sign I ..Buhid Vowel Sign U - (0x01772, 0x01773,), # Tagbanwa Vowel Sign I ..Tagbanwa Vowel Sign U - (0x017b4, 0x017d3,), # Khmer Vowel Inherent Aq ..Khmer Sign Bathamasat - (0x017dd, 0x017dd,), # Khmer Sign Atthacan - (0x0180b, 0x0180f,), # Mongolian Free Variation..Mongolian Free Variation - (0x01885, 0x01886,), # Mongolian Letter Ali Gal..Mongolian Letter Ali Gal - (0x018a9, 0x018a9,), # Mongolian Letter Ali Gali Dagalga - (0x01920, 0x0192b,), # Limbu Vowel Sign A ..Limbu Subjoined Letter W - (0x01930, 0x0193b,), # Limbu Small Letter Ka ..Limbu Sign Sa-i - (0x01a17, 0x01a1b,), # Buginese Vowel Sign I ..Buginese Vowel Sign Ae - (0x01a55, 0x01a5e,), # Tai Tham Consonant Sign ..Tai Tham Consonant Sign - (0x01a60, 0x01a7c,), # Tai Tham Sign Sakot ..Tai Tham Sign Khuen-lue - (0x01a7f, 0x01a7f,), # Tai Tham Combining Cryptogrammic Dot - (0x01ab0, 0x01add,), # Combining Doubled Circum..Combining Dot-and-ring B - (0x01ae0, 0x01aeb,), # Combining Left Tack Abov..Combining Double Rightwa - (0x01b00, 0x01b04,), # Balinese Sign Ulu Ricem ..Balinese Sign Bisah - (0x01b34, 0x01b44,), # Balinese Sign Rerekan ..Balinese Adeg Adeg - (0x01b6b, 0x01b73,), # Balinese Musical Symbol ..Balinese Musical Symbol - (0x01b80, 0x01b82,), # Sundanese Sign Panyecek ..Sundanese Sign Pangwisad - (0x01ba1, 0x01bad,), # Sundanese Consonant Sign..Sundanese Consonant Sign - (0x01be6, 0x01bf3,), # Batak Sign Tompi ..Batak Panongonan - (0x01c24, 0x01c37,), # Lepcha Subjoined Letter ..Lepcha Sign Nukta - (0x01cd0, 0x01cd2,), # Vedic Tone Karshana ..Vedic Tone Prenkha - (0x01cd4, 0x01ce8,), # Vedic Sign Yajurvedic Mi..Vedic Sign Visarga Anuda - (0x01ced, 0x01ced,), # Vedic Sign Tiryak - (0x01cf4, 0x01cf4,), # Vedic Tone Candra Above - (0x01cf7, 0x01cf9,), # Vedic Sign Atikrama ..Vedic Tone Double Ring A - (0x01dc0, 0x01dff,), # Combining Dotted Grave A..Combining Right Arrowhea - (0x0200b, 0x0200f,), # Zero Width Space ..Right-to-left Mark - (0x02028, 0x0202e,), # Line Separator ..Right-to-left Override - (0x02060, 0x0206f,), # Word Joiner ..Nominal Digit Shapes - (0x020d0, 0x020f0,), # Combining Left Harpoon A..Combining Asterisk Above - (0x02cef, 0x02cf1,), # Coptic Combining Ni Abov..Coptic Combining Spiritu - (0x02d7f, 0x02d7f,), # Tifinagh Consonant Joiner - (0x02de0, 0x02dff,), # Combining Cyrillic Lette..Combining Cyrillic Lette - (0x0302a, 0x0302f,), # Ideographic Level Tone M..Hangul Double Dot Tone M - (0x03099, 0x0309a,), # Combining Katakana-hirag..Combining Katakana-hirag - (0x03164, 0x03164,), # Hangul Filler - (0x0a66f, 0x0a672,), # Combining Cyrillic Vzmet..Combining Cyrillic Thous - (0x0a674, 0x0a67d,), # Combining Cyrillic Lette..Combining Cyrillic Payer - (0x0a69e, 0x0a69f,), # Combining Cyrillic Lette..Combining Cyrillic Lette - (0x0a6f0, 0x0a6f1,), # Bamum Combining Mark Koq..Bamum Combining Mark Tuk - (0x0a802, 0x0a802,), # Syloti Nagri Sign Dvisvara - (0x0a806, 0x0a806,), # Syloti Nagri Sign Hasanta - (0x0a80b, 0x0a80b,), # Syloti Nagri Sign Anusvara - (0x0a823, 0x0a827,), # Syloti Nagri Vowel Sign ..Syloti Nagri Vowel Sign - (0x0a82c, 0x0a82c,), # Syloti Nagri Sign Alternate Hasanta - (0x0a880, 0x0a881,), # Saurashtra Sign Anusvara..Saurashtra Sign Visarga - (0x0a8b4, 0x0a8c5,), # Saurashtra Consonant Sig..Saurashtra Sign Candrabi - (0x0a8e0, 0x0a8f1,), # Combining Devanagari Dig..Combining Devanagari Sig - (0x0a8ff, 0x0a8ff,), # Devanagari Vowel Sign Ay - (0x0a926, 0x0a92d,), # Kayah Li Vowel Ue ..Kayah Li Tone Calya Plop - (0x0a947, 0x0a953,), # Rejang Vowel Sign I ..Rejang Virama - (0x0a980, 0x0a983,), # Javanese Sign Panyangga ..Javanese Sign Wignyan - (0x0a9b3, 0x0a9c0,), # Javanese Sign Cecak Telu..Javanese Pangkon - (0x0a9e5, 0x0a9e5,), # Myanmar Sign Shan Saw - (0x0aa29, 0x0aa36,), # Cham Vowel Sign Aa ..Cham Consonant Sign Wa - (0x0aa43, 0x0aa43,), # Cham Consonant Sign Final Ng - (0x0aa4c, 0x0aa4d,), # Cham Consonant Sign Fina..Cham Consonant Sign Fina - (0x0aa7b, 0x0aa7d,), # Myanmar Sign Pao Karen T..Myanmar Sign Tai Laing T - (0x0aab0, 0x0aab0,), # Tai Viet Mai Kang - (0x0aab2, 0x0aab4,), # Tai Viet Vowel I ..Tai Viet Vowel U - (0x0aab7, 0x0aab8,), # Tai Viet Mai Khit ..Tai Viet Vowel Ia - (0x0aabe, 0x0aabf,), # Tai Viet Vowel Am ..Tai Viet Tone Mai Ek - (0x0aac1, 0x0aac1,), # Tai Viet Tone Mai Tho - (0x0aaeb, 0x0aaef,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0aaf5, 0x0aaf6,), # Meetei Mayek Vowel Sign ..Meetei Mayek Virama - (0x0abe3, 0x0abea,), # Meetei Mayek Vowel Sign ..Meetei Mayek Vowel Sign - (0x0abec, 0x0abed,), # Meetei Mayek Lum Iyek ..Meetei Mayek Apun Iyek - (0x0d7b0, 0x0d7ff,), # Hangul Jungseong O-yeo ..(nil) - (0x0fb1e, 0x0fb1e,), # Hebrew Point Judeo-spanish Varika - (0x0fe00, 0x0fe0f,), # Variation Selector-1 ..Variation Selector-16 - (0x0fe20, 0x0fe2f,), # Combining Ligature Left ..Combining Cyrillic Titlo - (0x0feff, 0x0feff,), # Zero Width No-break Space - (0x0ffa0, 0x0ffa0,), # Halfwidth Hangul Filler - (0x0fff0, 0x0fffb,), # (nil) ..Interlinear Annotation T - (0x101fd, 0x101fd,), # Phaistos Disc Sign Combining Oblique Stroke - (0x102e0, 0x102e0,), # Coptic Epact Thousands Mark - (0x10376, 0x1037a,), # Combining Old Permic Let..Combining Old Permic Let - (0x10a01, 0x10a03,), # Kharoshthi Vowel Sign I ..Kharoshthi Vowel Sign Vo - (0x10a05, 0x10a06,), # Kharoshthi Vowel Sign E ..Kharoshthi Vowel Sign O - (0x10a0c, 0x10a0f,), # Kharoshthi Vowel Length ..Kharoshthi Sign Visarga - (0x10a38, 0x10a3a,), # Kharoshthi Sign Bar Abov..Kharoshthi Sign Dot Belo - (0x10a3f, 0x10a3f,), # Kharoshthi Virama - (0x10ae5, 0x10ae6,), # Manichaean Abbreviation ..Manichaean Abbreviation - (0x10d24, 0x10d27,), # Hanifi Rohingya Sign Har..Hanifi Rohingya Sign Tas - (0x10d69, 0x10d6d,), # Garay Vowel Sign E ..Garay Consonant Nasaliza - (0x10eab, 0x10eac,), # Yezidi Combining Hamza M..Yezidi Combining Madda M - (0x10efa, 0x10eff,), # Arabic Double Vertical B..Arabic Small Low Word Ma - (0x10f46, 0x10f50,), # Sogdian Combining Dot Be..Sogdian Combining Stroke - (0x10f82, 0x10f85,), # Old Uyghur Combining Dot..Old Uyghur Combining Two - (0x11000, 0x11002,), # Brahmi Sign Candrabindu ..Brahmi Sign Visarga - (0x11038, 0x11046,), # Brahmi Vowel Sign Aa ..Brahmi Virama - (0x11070, 0x11070,), # Brahmi Sign Old Tamil Virama - (0x11073, 0x11074,), # Brahmi Vowel Sign Old Ta..Brahmi Vowel Sign Old Ta - (0x1107f, 0x11082,), # Brahmi Number Joiner ..Kaithi Sign Visarga - (0x110b0, 0x110ba,), # Kaithi Vowel Sign Aa ..Kaithi Sign Nukta - (0x110c2, 0x110c2,), # Kaithi Vowel Sign Vocalic R - (0x11100, 0x11102,), # Chakma Sign Candrabindu ..Chakma Sign Visarga - (0x11127, 0x11134,), # Chakma Vowel Sign A ..Chakma Maayyaa - (0x11145, 0x11146,), # Chakma Vowel Sign Aa ..Chakma Vowel Sign Ei - (0x11173, 0x11173,), # Mahajani Sign Nukta - (0x11180, 0x11182,), # Sharada Sign Candrabindu..Sharada Sign Visarga - (0x111b3, 0x111c0,), # Sharada Vowel Sign Aa ..Sharada Sign Virama - (0x111c9, 0x111cc,), # Sharada Sandhi Mark ..Sharada Extra Short Vowe - (0x111ce, 0x111cf,), # Sharada Vowel Sign Prish..Sharada Sign Inverted Ca - (0x1122c, 0x11237,), # Khojki Vowel Sign Aa ..Khojki Sign Shadda - (0x1123e, 0x1123e,), # Khojki Sign Sukun - (0x11241, 0x11241,), # Khojki Vowel Sign Vocalic R - (0x112df, 0x112ea,), # Khudawadi Sign Anusvara ..Khudawadi Sign Virama - (0x11300, 0x11303,), # Grantha Sign Combining A..Grantha Sign Visarga - (0x1133b, 0x1133c,), # Combining Bindu Below ..Grantha Sign Nukta - (0x1133e, 0x11344,), # Grantha Vowel Sign Aa ..Grantha Vowel Sign Vocal - (0x11347, 0x11348,), # Grantha Vowel Sign Ee ..Grantha Vowel Sign Ai - (0x1134b, 0x1134d,), # Grantha Vowel Sign Oo ..Grantha Sign Virama - (0x11357, 0x11357,), # Grantha Au Length Mark - (0x11362, 0x11363,), # Grantha Vowel Sign Vocal..Grantha Vowel Sign Vocal - (0x11366, 0x1136c,), # Combining Grantha Digit ..Combining Grantha Digit - (0x11370, 0x11374,), # Combining Grantha Letter..Combining Grantha Letter - (0x113b8, 0x113c0,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Vowel Sign - (0x113c2, 0x113c2,), # Tulu-tigalari Vowel Sign Ee - (0x113c5, 0x113c5,), # Tulu-tigalari Vowel Sign Ai - (0x113c7, 0x113ca,), # Tulu-tigalari Vowel Sign..Tulu-tigalari Sign Candr - (0x113cc, 0x113d0,), # Tulu-tigalari Sign Anusv..Tulu-tigalari Conjoiner - (0x113d2, 0x113d2,), # Tulu-tigalari Gemination Mark - (0x113e1, 0x113e2,), # Tulu-tigalari Vedic Tone..Tulu-tigalari Vedic Tone - (0x11435, 0x11446,), # Newa Vowel Sign Aa ..Newa Sign Nukta - (0x1145e, 0x1145e,), # Newa Sandhi Mark - (0x114b0, 0x114c3,), # Tirhuta Vowel Sign Aa ..Tirhuta Sign Nukta - (0x115af, 0x115b5,), # Siddham Vowel Sign Aa ..Siddham Vowel Sign Vocal - (0x115b8, 0x115c0,), # Siddham Vowel Sign E ..Siddham Sign Nukta - (0x115dc, 0x115dd,), # Siddham Vowel Sign Alter..Siddham Vowel Sign Alter - (0x11630, 0x11640,), # Modi Vowel Sign Aa ..Modi Sign Ardhacandra - (0x116ab, 0x116b7,), # Takri Sign Anusvara ..Takri Sign Nukta - (0x1171d, 0x1172b,), # Ahom Consonant Sign Medi..Ahom Sign Killer - (0x1182c, 0x1183a,), # Dogra Vowel Sign Aa ..Dogra Sign Nukta - (0x11930, 0x11935,), # Dives Akuru Vowel Sign A..Dives Akuru Vowel Sign E - (0x11937, 0x11938,), # Dives Akuru Vowel Sign A..Dives Akuru Vowel Sign O - (0x1193b, 0x1193e,), # Dives Akuru Sign Anusvar..Dives Akuru Virama - (0x11940, 0x11940,), # Dives Akuru Medial Ya - (0x11942, 0x11943,), # Dives Akuru Medial Ra ..Dives Akuru Sign Nukta - (0x119d1, 0x119d7,), # Nandinagari Vowel Sign A..Nandinagari Vowel Sign V - (0x119da, 0x119e0,), # Nandinagari Vowel Sign E..Nandinagari Sign Virama - (0x119e4, 0x119e4,), # Nandinagari Vowel Sign Prishthamatra E - (0x11a01, 0x11a0a,), # Zanabazar Square Vowel S..Zanabazar Square Vowel L - (0x11a33, 0x11a39,), # Zanabazar Square Final C..Zanabazar Square Sign Vi - (0x11a3b, 0x11a3e,), # Zanabazar Square Cluster..Zanabazar Square Cluster - (0x11a47, 0x11a47,), # Zanabazar Square Subjoiner - (0x11a51, 0x11a5b,), # Soyombo Vowel Sign I ..Soyombo Vowel Length Mar - (0x11a8a, 0x11a99,), # Soyombo Final Consonant ..Soyombo Subjoiner - (0x11b60, 0x11b67,), # Sharada Vowel Sign Oe ..Sharada Vowel Sign Candr - (0x11c2f, 0x11c36,), # Bhaiksuki Vowel Sign Aa ..Bhaiksuki Vowel Sign Voc - (0x11c38, 0x11c3f,), # Bhaiksuki Vowel Sign E ..Bhaiksuki Sign Virama - (0x11c92, 0x11ca7,), # Marchen Subjoined Letter..Marchen Subjoined Letter - (0x11ca9, 0x11cb6,), # Marchen Subjoined Letter..Marchen Sign Candrabindu - (0x11d31, 0x11d36,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign - (0x11d3a, 0x11d3a,), # Masaram Gondi Vowel Sign E - (0x11d3c, 0x11d3d,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign - (0x11d3f, 0x11d45,), # Masaram Gondi Vowel Sign..Masaram Gondi Virama - (0x11d47, 0x11d47,), # Masaram Gondi Ra-kara - (0x11d8a, 0x11d8e,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign - (0x11d90, 0x11d91,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign - (0x11d93, 0x11d97,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Virama - (0x11ef3, 0x11ef6,), # Makasar Vowel Sign I ..Makasar Vowel Sign O - (0x11f00, 0x11f01,), # Kawi Sign Candrabindu ..Kawi Sign Anusvara - (0x11f03, 0x11f03,), # Kawi Sign Visarga - (0x11f34, 0x11f3a,), # Kawi Vowel Sign Aa ..Kawi Vowel Sign Vocalic - (0x11f3e, 0x11f42,), # Kawi Vowel Sign E ..Kawi Conjoiner - (0x11f5a, 0x11f5a,), # Kawi Sign Nukta - (0x13430, 0x13440,), # Egyptian Hieroglyph Vert..Egyptian Hieroglyph Mirr - (0x13447, 0x13455,), # Egyptian Hieroglyph Modi..Egyptian Hieroglyph Modi - (0x1611e, 0x1612f,), # Gurung Khema Vowel Sign ..Gurung Khema Sign Tholho - (0x16af0, 0x16af4,), # Bassa Vah Combining High..Bassa Vah Combining High - (0x16b30, 0x16b36,), # Pahawh Hmong Mark Cim Tu..Pahawh Hmong Mark Cim Ta - (0x16f4f, 0x16f4f,), # Miao Sign Consonant Modifier Bar - (0x16f51, 0x16f87,), # Miao Sign Aspiration ..Miao Vowel Sign Ui - (0x16f8f, 0x16f92,), # Miao Tone Right ..Miao Tone Below - (0x16fe4, 0x16fe4,), # Khitan Small Script Filler - (0x16ff0, 0x16ff1,), # Vietnamese Alternate Rea..Vietnamese Alternate Rea - (0x1bc9d, 0x1bc9e,), # Duployan Thick Letter Se..Duployan Double Mark - (0x1bca0, 0x1bca3,), # Shorthand Format Letter ..Shorthand Format Up Step - (0x1cf00, 0x1cf2d,), # Znamenny Combining Mark ..Znamenny Combining Mark - (0x1cf30, 0x1cf46,), # Znamenny Combining Tonal..Znamenny Priznak Modifie - (0x1d165, 0x1d169,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d16d, 0x1d182,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d185, 0x1d18b,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d1aa, 0x1d1ad,), # Musical Symbol Combining..Musical Symbol Combining - (0x1d242, 0x1d244,), # Combining Greek Musical ..Combining Greek Musical - (0x1da00, 0x1da36,), # Signwriting Head Rim ..Signwriting Air Sucking - (0x1da3b, 0x1da6c,), # Signwriting Mouth Closed..Signwriting Excitement - (0x1da75, 0x1da75,), # Signwriting Upper Body Tilting From Hip Joints - (0x1da84, 0x1da84,), # Signwriting Location Head Neck - (0x1da9b, 0x1da9f,), # Signwriting Fill Modifie..Signwriting Fill Modifie - (0x1daa1, 0x1daaf,), # Signwriting Rotation Mod..Signwriting Rotation Mod - (0x1e000, 0x1e006,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e008, 0x1e018,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e01b, 0x1e021,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e023, 0x1e024,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e026, 0x1e02a,), # Combining Glagolitic Let..Combining Glagolitic Let - (0x1e08f, 0x1e08f,), # Combining Cyrillic Small Letter Byelorussian-ukr - (0x1e130, 0x1e136,), # Nyiakeng Puachue Hmong T..Nyiakeng Puachue Hmong T - (0x1e2ae, 0x1e2ae,), # Toto Sign Rising Tone - (0x1e2ec, 0x1e2ef,), # Wancho Tone Tup ..Wancho Tone Koini - (0x1e4ec, 0x1e4ef,), # Nag Mundari Sign Muhor ..Nag Mundari Sign Sutuh - (0x1e5ee, 0x1e5ef,), # Ol Onal Sign Mu ..Ol Onal Sign Ikir - (0x1e6e3, 0x1e6e3,), # Tai Yo Sign Ue - (0x1e6e6, 0x1e6e6,), # Tai Yo Sign Au - (0x1e6ee, 0x1e6ef,), # Tai Yo Sign Ay ..Tai Yo Sign Ang - (0x1e6f5, 0x1e6f5,), # Tai Yo Sign Om - (0x1e8d0, 0x1e8d6,), # Mende Kikakui Combining ..Mende Kikakui Combining - (0x1e944, 0x1e94a,), # Adlam Alif Lengthener ..Adlam Nukta - (0xe0000, 0xe0fff,), # (nil) - ), -} diff --git a/voxvera/vendor/wcwidth/textwrap.py b/voxvera/vendor/wcwidth/textwrap.py deleted file mode 100644 index 4582cd5..0000000 --- a/voxvera/vendor/wcwidth/textwrap.py +++ /dev/null @@ -1,656 +0,0 @@ -""" -Sequence-aware text wrapping functions. - -This module provides functions for wrapping text that may contain terminal escape sequences, with -proper handling of Unicode grapheme clusters and character display widths. -""" -from __future__ import annotations - -# std imports -import re -import secrets -import textwrap - -from typing import TYPE_CHECKING, NamedTuple - -# local -from .wcwidth import width as _width -from .wcwidth import iter_sequences -from .grapheme import iter_graphemes -from .sgr_state import propagate_sgr as _propagate_sgr -from .escape_sequences import ZERO_WIDTH_PATTERN - -if TYPE_CHECKING: # pragma: no cover - from typing import Any, Literal - - -class _HyperlinkState(NamedTuple): - """State for tracking an open OSC 8 hyperlink across line breaks.""" - - url: str # hyperlink target URL - params: str # id=xxx and other key=value pairs separated by : - terminator: str # BEL (\x07) or ST (\x1b\\) - - -# Hyperlink parsing: captures (params, url, terminator) -_HYPERLINK_OPEN_RE = re.compile(r'\x1b]8;([^;]*);([^\x07\x1b]*)(\x07|\x1b\\)') - - -def _parse_hyperlink_open(seq: str) -> _HyperlinkState | None: - """Parse OSC 8 open sequence, return state or None.""" - if (m := _HYPERLINK_OPEN_RE.match(seq)): - return _HyperlinkState(url=m.group(2), params=m.group(1), terminator=m.group(3)) - return None - - -def _make_hyperlink_open(url: str, params: str, terminator: str) -> str: - """Generate OSC 8 open sequence.""" - return f'\x1b]8;{params};{url}{terminator}' - - -def _make_hyperlink_close(terminator: str) -> str: - """Generate OSC 8 close sequence.""" - return f'\x1b]8;;{terminator}' - - -class SequenceTextWrapper(textwrap.TextWrapper): - """ - Sequence-aware text wrapper extending :class:`textwrap.TextWrapper`. - - This wrapper properly handles terminal escape sequences and Unicode grapheme clusters when - calculating text width for wrapping. - - This implementation is based on the SequenceTextWrapper from the 'blessed' library, with - contributions from Avram Lubkin and grayjk. - - The key difference from the blessed implementation is the addition of grapheme cluster support - via :func:`~.iter_graphemes`, providing width calculation for ZWJ emoji sequences, VS-16 emojis - and variations, regional indicator flags, and combining characters. - - OSC 8 hyperlinks are handled specially: when a hyperlink must span multiple lines, each line - receives complete open/close sequences with a shared ``id`` parameter, ensuring terminals - treat the fragments as a single hyperlink for hover underlining. If the original hyperlink - already has an ``id`` parameter, it is preserved; otherwise, one is generated. - """ - - def __init__(self, width: int = 70, *, - control_codes: Literal['parse', 'strict', 'ignore'] = 'parse', - tabsize: int = 8, - ambiguous_width: int = 1, - **kwargs: Any) -> None: - """ - Initialize the wrapper. - - :param width: Maximum line width in display cells. - :param control_codes: How to handle control sequences (see :func:`~.width`). - :param tabsize: Tab stop width for tab expansion. - :param ambiguous_width: Width to use for East Asian Ambiguous (A) characters. - :param kwargs: Additional arguments passed to :class:`textwrap.TextWrapper`. - """ - super().__init__(width=width, **kwargs) - self.control_codes = control_codes - self.tabsize = tabsize - self.ambiguous_width = ambiguous_width - - @staticmethod - def _next_hyperlink_id() -> str: - """Generate unique hyperlink id as 8-character hex string.""" - return secrets.token_hex(4) - - def _width(self, text: str) -> int: - """Measure text width accounting for sequences.""" - return _width(text, control_codes=self.control_codes, tabsize=self.tabsize, - ambiguous_width=self.ambiguous_width) - - def _strip_sequences(self, text: str) -> str: - """Strip all terminal sequences from text.""" - result = [] - for segment, is_seq in iter_sequences(text): - if not is_seq: - result.append(segment) - return ''.join(result) - - def _extract_sequences(self, text: str) -> str: - """Extract only terminal sequences from text.""" - result = [] - for segment, is_seq in iter_sequences(text): - if is_seq: - result.append(segment) - return ''.join(result) - - def _split(self, text: str) -> list[str]: # pylint: disable=too-many-locals - r""" - Sequence-aware variant of :meth:`textwrap.TextWrapper._split`. - - This method ensures that terminal escape sequences don't interfere with the text splitting - logic, particularly for hyphen-based word breaking. It builds a position mapping from - stripped text to original text, calls the parent's _split on stripped text, then maps chunks - back. - - OSC hyperlink sequences are treated as word boundaries:: - - >>> wrap('foo \x1b]8;;https://example.com\x07link\x1b]8;;\x07 bar', 6) - ['foo', '\x1b]8;;https://example.com\x07link\x1b]8;;\x07', 'bar'] - - Both BEL (``\x07``) and ST (``\x1b\\``) terminators are supported. - """ - # pylint: disable=too-many-locals,too-many-branches - # Build a mapping from stripped text positions to original text positions. - # - # Track where each character ENDS so that sequences between characters - # attach to the following text (not preceding text). This ensures sequences - # aren't lost when whitespace is dropped. - # - # char_end[i] = position in original text right after the i-th stripped char - char_end: list[int] = [] - stripped_text = '' - original_pos = 0 - prev_was_hyperlink_close = False - - for segment, is_seq in iter_sequences(text): - if not is_seq: - # Conditionally insert space after hyperlink close to force word boundary - if prev_was_hyperlink_close and segment and not segment[0].isspace(): - stripped_text += ' ' - char_end.append(original_pos) - for char in segment: - original_pos += 1 - char_end.append(original_pos) - stripped_text += char - prev_was_hyperlink_close = False - else: - is_hyperlink_close = segment.startswith(('\x1b]8;;\x1b\\', '\x1b]8;;\x07')) - - # Conditionally insert space before OSC sequences to artificially create word - # boundary, but *not* before hyperlink close sequences, to ensure hyperlink is - # terminated on the same line. - if (segment.startswith('\x1b]') and stripped_text and not - stripped_text[-1].isspace()): - if not is_hyperlink_close: - stripped_text += ' ' - char_end.append(original_pos) - - # Escape sequences advance position but don't add to stripped text - original_pos += len(segment) - prev_was_hyperlink_close = is_hyperlink_close - - # Add sentinel for final position - char_end.append(original_pos) - - # Use parent's _split on the stripped text - # pylint: disable-next=protected-access - stripped_chunks = textwrap.TextWrapper._split(self, stripped_text) - - # Handle text that contains only sequences (no visible characters). - # Return the sequences as a single chunk to preserve them. - if not stripped_chunks and text: - return [text] - - # Map the chunks back to the original text with sequences - result: list[str] = [] - stripped_pos = 0 - num_chunks = len(stripped_chunks) - - for idx, chunk in enumerate(stripped_chunks): - chunk_len = len(chunk) - - # Start is where previous character ended (or 0 for first chunk) - start_orig = 0 if stripped_pos == 0 else char_end[stripped_pos - 1] - - # End is where next character starts. For last chunk, use sentinel - # to include any trailing sequences. - if idx == num_chunks - 1: - end_orig = char_end[-1] # sentinel includes trailing sequences - else: - end_orig = char_end[stripped_pos + chunk_len - 1] - - # Extract the corresponding portion from the original text - # Skip empty chunks (from virtual spaces inserted at OSC boundaries) - if start_orig != end_orig: - result.append(text[start_orig:end_orig]) - stripped_pos += chunk_len - - return result - - def _wrap_chunks(self, chunks: list[str]) -> list[str]: # pylint: disable=too-many-branches - """ - Wrap chunks into lines using sequence-aware width. - - Override TextWrapper._wrap_chunks to use _width instead of len. Follows stdlib's algorithm: - greedily fill lines, handle long words. Also handle OSC hyperlink processing. When - hyperlinks span multiple lines, each line gets complete open/close sequences with matching - id parameters for hover underlining continuity per OSC 8 spec. - """ - # pylint: disable=too-many-branches,too-many-statements,too-complex,too-many-locals - # pylint: disable=too-many-nested-blocks - # the hyperlink code in particular really pushes the complexity rating of this method. - # preferring to keep it "all in one method" because of so much local state and manipulation. - if not chunks: - return [] - - if self.max_lines is not None: - if self.max_lines > 1: - indent = self.subsequent_indent - else: - indent = self.initial_indent - if (self._width(indent) - + self._width(self.placeholder.lstrip()) - > self.width): - raise ValueError("placeholder too large for max width") - - lines: list[str] = [] - is_first_line = True - - hyperlink_state: _HyperlinkState | None = None - # Track the id we're using for the current hyperlink continuation - current_hyperlink_id: str | None = None - - # Arrange in reverse order so items can be efficiently popped - chunks = list(reversed(chunks)) - - while chunks: - current_line: list[str] = [] - current_width = 0 - - # Get the indent and available width for current line - indent = self.initial_indent if is_first_line else self.subsequent_indent - line_width = self.width - self._width(indent) - - # If continuing a hyperlink from previous line, prepend open sequence - if hyperlink_state is not None: - open_seq = _make_hyperlink_open( - hyperlink_state.url, hyperlink_state.params, hyperlink_state.terminator) - chunks[-1] = open_seq + chunks[-1] - - # Drop leading whitespace (except at very start) - # When dropping, transfer any sequences to the next chunk. - # Only drop if there's actual whitespace text, not if it's only sequences. - stripped = self._strip_sequences(chunks[-1]) - if self.drop_whitespace and lines and stripped and not stripped.strip(): - sequences = self._extract_sequences(chunks[-1]) - del chunks[-1] - if sequences and chunks: - chunks[-1] = sequences + chunks[-1] - - # Greedily add chunks that fit - while chunks: - chunk = chunks[-1] - chunk_width = self._width(chunk) - - if current_width + chunk_width <= line_width: - current_line.append(chunks.pop()) - current_width += chunk_width - else: - break - - # Handle chunk that's too long for any line - if chunks and self._width(chunks[-1]) > line_width: - self._handle_long_word( - chunks, current_line, current_width, line_width - ) - current_width = self._width(''.join(current_line)) - # Remove any empty chunks left by _handle_long_word - while chunks and not chunks[-1]: - del chunks[-1] - - # Drop trailing whitespace - # When dropping, transfer any sequences to the previous chunk. - # Only drop if there's actual whitespace text, not if it's only sequences. - stripped_last = self._strip_sequences(current_line[-1]) if current_line else '' - if (self.drop_whitespace and current_line and - stripped_last and not stripped_last.strip()): - sequences = self._extract_sequences(current_line[-1]) - current_width -= self._width(current_line[-1]) - del current_line[-1] - if sequences and current_line: - current_line[-1] = current_line[-1] + sequences - - if current_line: - # Check whether this is a normal append or max_lines - # truncation. Matches stdlib textwrap precedence: - # normal if max_lines not set, not yet reached, or no - # remaining visible content that would need truncation. - no_more_content = ( - not chunks or - self.drop_whitespace and - len(chunks) == 1 and - not self._strip_sequences(chunks[0]).strip() - ) - if (self.max_lines is None or - len(lines) + 1 < self.max_lines or - no_more_content - and current_width <= line_width): - line_content = ''.join(current_line) - - # Track hyperlink state through this line's content - new_state = self._track_hyperlink_state(line_content, hyperlink_state) - - # If we end inside a hyperlink, append close sequence - if new_state is not None: - # Ensure we have an id for continuation - if current_hyperlink_id is None: - if 'id=' in new_state.params: - current_hyperlink_id = new_state.params - elif new_state.params: - # Prepend id to existing params (per OSC 8 spec, params can have - # multiple key=value pairs separated by :) - current_hyperlink_id = ( - f'id={self._next_hyperlink_id()}:{new_state.params}') - else: - current_hyperlink_id = f'id={self._next_hyperlink_id()}' - line_content += _make_hyperlink_close(new_state.terminator) - - # Also need to inject the id into the opening - # sequence if it didn't have one - if 'id=' not in new_state.params: - # Find and replace the original open sequence with one that has id - old_open = _make_hyperlink_open( - new_state.url, new_state.params, new_state.terminator) - new_open = _make_hyperlink_open( - new_state.url, current_hyperlink_id, new_state.terminator) - line_content = line_content.replace(old_open, new_open, 1) - - # Update state for next line, using computed id - hyperlink_state = _HyperlinkState( - new_state.url, current_hyperlink_id, new_state.terminator) - else: - hyperlink_state = None - current_hyperlink_id = None # Reset id when hyperlink closes - - # Strip trailing whitespace when drop_whitespace is enabled - # (matches CPython #140627 fix behavior) - if self.drop_whitespace: - line_content = line_content.rstrip() - lines.append(indent + line_content) - is_first_line = False - else: - # max_lines reached with remaining content — - # pop chunks until placeholder fits, then break. - placeholder_w = self._width(self.placeholder) - while current_line: - last_text = self._strip_sequences(current_line[-1]) - if (last_text.strip() - and current_width + placeholder_w <= line_width): - line_content = ''.join(current_line) - new_state = self._track_hyperlink_state( - line_content, hyperlink_state) - if new_state is not None: - line_content += _make_hyperlink_close( - new_state.terminator) - lines.append(indent + line_content + self.placeholder) - break - current_width -= self._width(current_line[-1]) - del current_line[-1] - else: - if lines: - prev_line = self._rstrip_visible(lines[-1]) - if (self._width(prev_line) + placeholder_w - <= self.width): - lines[-1] = prev_line + self.placeholder - break - lines.append(indent + self.placeholder.lstrip()) - break - - return lines - - def _track_hyperlink_state( - self, text: str, - state: _HyperlinkState | None) -> _HyperlinkState | None: - """ - Track hyperlink state through text. - - :param text: Text to scan for hyperlink sequences. - :param state: Current state or None if outside hyperlink. - :returns: Updated state after processing text. - """ - for segment, is_seq in iter_sequences(text): - if is_seq: - parsed_link = _parse_hyperlink_open(segment) - if parsed_link is not None and parsed_link.url: # has URL = open - state = parsed_link - elif segment.startswith(('\x1b]8;;\x1b\\', '\x1b]8;;\x07')): # close - state = None - return state - - def _handle_long_word(self, reversed_chunks: list[str], - cur_line: list[str], cur_len: int, - width: int) -> None: - """ - Sequence-aware :meth:`textwrap.TextWrapper._handle_long_word`. - - This method ensures that word boundaries are not broken mid-sequence, and respects grapheme - cluster boundaries when breaking long words. - """ - if width < 1: - space_left = 1 - else: - space_left = width - cur_len - - chunk = reversed_chunks[-1] - - if self.break_long_words: - break_at_hyphen = False - hyphen_end = 0 - - # Handle break_on_hyphens: find last hyphen within space_left - if self.break_on_hyphens: - # Strip sequences to find hyphen in logical text - stripped = self._strip_sequences(chunk) - if len(stripped) > space_left: - # Find last hyphen in the portion that fits - hyphen_pos = stripped.rfind('-', 0, space_left) - if hyphen_pos > 0 and any(c != '-' for c in stripped[:hyphen_pos]): - # Map back to original position including sequences - hyphen_end = self._map_stripped_pos_to_original(chunk, hyphen_pos + 1) - break_at_hyphen = True - - # Break at grapheme boundaries to avoid splitting multi-codepoint characters - if break_at_hyphen: - actual_end = hyphen_end - else: - actual_end = self._find_break_position(chunk, space_left) - # If no progress possible (e.g., wide char exceeds line width), - # force at least one grapheme to avoid infinite loop. - # Only force when cur_line is empty; if line has content, - # appending nothing is safe and the line will be committed. - if actual_end == 0 and not cur_line: - actual_end = self._find_first_grapheme_end(chunk) - cur_line.append(chunk[:actual_end]) - reversed_chunks[-1] = chunk[actual_end:] - - elif not cur_line: - cur_line.append(reversed_chunks.pop()) - - def _map_stripped_pos_to_original(self, text: str, stripped_pos: int) -> int: - """Map a position in stripped text back to original text position.""" - stripped_idx = 0 - original_idx = 0 - - for segment, is_seq in iter_sequences(text): - if is_seq: - original_idx += len(segment) - elif stripped_idx + len(segment) > stripped_pos: - # Position is within this segment - return original_idx + (stripped_pos - stripped_idx) - else: - stripped_idx += len(segment) - original_idx += len(segment) - - # Caller guarantees stripped_pos < total stripped chars, so we always - # return from within the loop. This line satisfies the type checker. - return original_idx # pragma: no cover - - def _find_break_position(self, text: str, max_width: int) -> int: - """Find string index in text that fits within max_width cells.""" - idx = 0 - width_so_far = 0 - - while idx < len(text): - char = text[idx] - - # Skip escape sequences (they don't add width) - if char == '\x1b': - match = ZERO_WIDTH_PATTERN.match(text, idx) - if match: - idx = match.end() - continue - - # Get grapheme (use start= to avoid slice allocation) - grapheme = next(iter_graphemes(text, start=idx)) - - grapheme_width = self._width(grapheme) - if width_so_far + grapheme_width > max_width: - return idx # Found break point - - width_so_far += grapheme_width - idx += len(grapheme) - - # Caller guarantees chunk_width > max_width, so a grapheme always - # exceeds and we return from within the loop. Type checker requires this. - return idx # pragma: no cover - - def _find_first_grapheme_end(self, text: str) -> int: - """Find the end position of the first grapheme.""" - return len(next(iter_graphemes(text))) - - def _rstrip_visible(self, text: str) -> str: - """Strip trailing visible whitespace, preserving trailing sequences.""" - segments = list(iter_sequences(text)) - last_vis = -1 - for i, (segment, is_seq) in enumerate(segments): - if not is_seq and segment.rstrip(): - last_vis = i - if last_vis == -1: - return '' - result = [] - for i, (segment, is_seq) in enumerate(segments): - if i < last_vis: - result.append(segment) - elif i == last_vis: - result.append(segment.rstrip()) - elif is_seq: - result.append(segment) - return ''.join(result) - - -def wrap(text: str, width: int = 70, *, - control_codes: Literal['parse', 'strict', 'ignore'] = 'parse', - tabsize: int = 8, - expand_tabs: bool = True, - replace_whitespace: bool = True, - ambiguous_width: int = 1, - initial_indent: str = '', - subsequent_indent: str = '', - fix_sentence_endings: bool = False, - break_long_words: bool = True, - break_on_hyphens: bool = True, - drop_whitespace: bool = True, - max_lines: int | None = None, - placeholder: str = ' [...]', - propagate_sgr: bool = True) -> list[str]: - r""" - Wrap text to fit within given width, returning a list of wrapped lines. - - Like :func:`textwrap.wrap`, but measures width in display cells rather than - characters, correctly handling wide characters, combining marks, and terminal - escape sequences. - - :param text: Text to wrap, may contain terminal sequences. - :param width: Maximum line width in display cells. - :param control_codes: How to handle terminal sequences (see :func:`~.width`). - :param tabsize: Tab stop width for tab expansion. - :param expand_tabs: If True (default), tab characters are expanded - to spaces using ``tabsize``. - :param replace_whitespace: If True (default), each whitespace character - is replaced with a single space after tab expansion. When False, - control whitespace like ``\n`` has zero display width (unlike - :func:`textwrap.wrap` which counts ``len()``), so wrap points - may differ from stdlib for non-space whitespace characters. - :param ambiguous_width: Width to use for East Asian Ambiguous (A) - characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts. - :param initial_indent: String prepended to first line. - :param subsequent_indent: String prepended to subsequent lines. - :param fix_sentence_endings: If True, ensure sentences are always - separated by exactly two spaces. - :param break_long_words: If True, break words longer than width. - :param break_on_hyphens: If True, allow breaking at hyphens. - :param drop_whitespace: If True (default), whitespace at the beginning - and end of each line (after wrapping but before indenting) is dropped. - Set to False to preserve whitespace. - :param max_lines: If set, output contains at most this many lines, with - ``placeholder`` appended to the last line if the text was truncated. - :param placeholder: String appended to the last line when text is - truncated by ``max_lines``. Default is ``' [...]'``. - :param propagate_sgr: If True (default), SGR (terminal styling) sequences - are propagated across wrapped lines. Each line ends with a reset - sequence and the next line begins with the active style restored. - :returns: List of wrapped lines without trailing newlines. - - SGR (terminal styling) sequences are propagated across wrapped lines - by default. Each line ends with a reset sequence and the next line - begins with the active style restored:: - - >>> wrap('\x1b[1;34mHello world\x1b[0m', width=6) - ['\x1b[1;34mHello\x1b[0m', '\x1b[1;34mworld\x1b[0m'] - - Set ``propagate_sgr=False`` to disable this behavior. - - Like :func:`textwrap.wrap`, newlines in the input text are treated as - whitespace and collapsed. To preserve paragraph breaks, wrap each - paragraph separately:: - - >>> text = 'First line.\nSecond line.' - >>> wrap(text, 40) # newline collapsed to space - ['First line. Second line.'] - >>> [line for para in text.split('\n') - ... for line in (wrap(para, 40) if para else [''])] - ['First line.', 'Second line.'] - - .. seealso:: - - :func:`textwrap.wrap`, :class:`textwrap.TextWrapper` - Standard library text wrapping (character-based). - - :class:`.SequenceTextWrapper` - Class interface for advanced wrapping options. - - .. versionadded:: 0.3.0 - - .. versionchanged:: 0.5.0 - Added ``propagate_sgr`` parameter (default True). - - .. versionchanged:: 0.6.0 - Added ``expand_tabs``, ``replace_whitespace``, ``fix_sentence_endings``, - ``drop_whitespace``, ``max_lines``, and ``placeholder`` parameters. - - Example:: - - >>> from wcwidth import wrap - >>> wrap('hello world', 5) - ['hello', 'world'] - >>> wrap('中文字符', 4) # CJK characters (2 cells each) - ['中文', '字符'] - """ - # pylint: disable=too-many-arguments,too-many-locals - wrapper = SequenceTextWrapper( - width=width, - control_codes=control_codes, - tabsize=tabsize, - expand_tabs=expand_tabs, - replace_whitespace=replace_whitespace, - ambiguous_width=ambiguous_width, - initial_indent=initial_indent, - subsequent_indent=subsequent_indent, - fix_sentence_endings=fix_sentence_endings, - break_long_words=break_long_words, - break_on_hyphens=break_on_hyphens, - drop_whitespace=drop_whitespace, - max_lines=max_lines, - placeholder=placeholder, - ) - lines = wrapper.wrap(text) - - if propagate_sgr: - lines = _propagate_sgr(lines) - - return lines diff --git a/voxvera/vendor/wcwidth/unicode_versions.py b/voxvera/vendor/wcwidth/unicode_versions.py deleted file mode 100644 index e848411..0000000 --- a/voxvera/vendor/wcwidth/unicode_versions.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Exports function list_versions() for unicode version level support. - -This code generated by wcwidth/bin/update-tables.py on 2026-01-27 00:41:01 UTC. -""" - -from __future__ import annotations - - -def list_versions() -> tuple[str, ...]: - """ - Return Unicode version levels supported by this module release. - - .. versionchanged:: 0.5.0 - Now returns a single-element tuple containing only the latest version. - - :returns: Supported Unicode version numbers in ascending sorted order. - """ - return ( - "17.0.0", - ) diff --git a/voxvera/vendor/wcwidth/wcwidth.py b/voxvera/vendor/wcwidth/wcwidth.py deleted file mode 100644 index 98e7a63..0000000 --- a/voxvera/vendor/wcwidth/wcwidth.py +++ /dev/null @@ -1,1030 +0,0 @@ -""" -This is a python implementation of wcwidth() and wcswidth(). - -https://github.com/jquast/wcwidth - -from Markus Kuhn's C code, retrieved from: - - http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c - -This is an implementation of wcwidth() and wcswidth() (defined in -IEEE Std 1002.1-2001) for Unicode. - -http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html -http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html - -In fixed-width output devices, Latin characters all occupy a single -"cell" position of equal width, whereas ideographic CJK characters -occupy two such cells. Interoperability between terminal-line -applications and (teletype-style) character terminals using the -UTF-8 encoding requires agreement on which character should advance -the cursor by how many cell positions. No established formal -standards exist at present on which Unicode character shall occupy -how many cell positions on character terminals. These routines are -a first attempt of defining such behavior based on simple rules -applied to data provided by the Unicode Consortium. - -For some graphical characters, the Unicode standard explicitly -defines a character-cell width via the definition of the East Asian -FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes. -In all these cases, there is no ambiguity about which width a -terminal shall use. For characters in the East Asian Ambiguous (A) -class, the width choice depends purely on a preference of backward -compatibility with either historic CJK or Western practice. -Choosing single-width for these characters is easy to justify as -the appropriate long-term solution, as the CJK practice of -displaying these characters as double-width comes from historic -implementation simplicity (8-bit encoded characters were displayed -single-width and 16-bit ones double-width, even for Greek, -Cyrillic, etc.) and not any typographic considerations. - -Much less clear is the choice of width for the Not East Asian -(Neutral) class. Existing practice does not dictate a width for any -of these characters. It would nevertheless make sense -typographically to allocate two character cells to characters such -as for instance EM SPACE or VOLUME INTEGRAL, which cannot be -represented adequately with a single-width glyph. The following -routines at present merely assign a single-cell width to all -neutral characters, in the interest of simplicity. This is not -entirely satisfactory and should be reconsidered before -establishing a formal standard in this area. At the moment, the -decision which Not East Asian (Neutral) characters should be -represented by double-width glyphs cannot yet be answered by -applying a simple rule from the Unicode database content. Setting -up a proper standard for the behavior of UTF-8 character terminals -will require a careful analysis not only of each Unicode character, -but also of each presentation form, something the author of these -routines has avoided to do so far. - -http://www.unicode.org/unicode/reports/tr11/ - -Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c -""" - -from __future__ import annotations - -# std imports -from functools import lru_cache - -from typing import TYPE_CHECKING - -# local -from .bisearch import bisearch as _bisearch -from .grapheme import iter_graphemes -from .table_mc import CATEGORY_MC -from .sgr_state import (_SGR_PATTERN, - _SGR_STATE_DEFAULT, - _sgr_state_update, - _sgr_state_is_active, - _sgr_state_to_sequence) -from .table_vs16 import VS16_NARROW_TO_WIDE -from .table_wide import WIDE_EASTASIAN -from .table_zero import ZERO_WIDTH -from .control_codes import ILLEGAL_CTRL, VERTICAL_CTRL, HORIZONTAL_CTRL, ZERO_WIDTH_CTRL -from .table_grapheme import ISC_CONSONANT, EXTENDED_PICTOGRAPHIC, GRAPHEME_REGIONAL_INDICATOR -from .table_ambiguous import AMBIGUOUS_EASTASIAN -from .escape_sequences import (ZERO_WIDTH_PATTERN, - CURSOR_LEFT_SEQUENCE, - CURSOR_RIGHT_SEQUENCE, - INDETERMINATE_EFFECT_SEQUENCE) -from .unicode_versions import list_versions - -if TYPE_CHECKING: # pragma: no cover - # std imports - from collections.abc import Iterator - - from typing import Literal - -# Pre-compute table references for the latest (and only) Unicode version. -_LATEST_VERSION = list_versions()[-1] -_ZERO_WIDTH_TABLE = ZERO_WIDTH[_LATEST_VERSION] -_WIDE_EASTASIAN_TABLE = WIDE_EASTASIAN[_LATEST_VERSION] -_AMBIGUOUS_TABLE = AMBIGUOUS_EASTASIAN[next(iter(AMBIGUOUS_EASTASIAN))] -_CATEGORY_MC_TABLE = CATEGORY_MC[_LATEST_VERSION] -_REGIONAL_INDICATOR_SET = frozenset( - range(GRAPHEME_REGIONAL_INDICATOR[0][0], GRAPHEME_REGIONAL_INDICATOR[0][1] + 1) -) -_EMOJI_ZWJ_SET = frozenset( - cp for lo, hi in EXTENDED_PICTOGRAPHIC for cp in range(lo, hi + 1) -) | _REGIONAL_INDICATOR_SET -_FITZPATRICK_RANGE = (0x1F3FB, 0x1F3FF) -# Indic_Syllabic_Category=Virama codepoints, from IndicSyllabicCategory.txt. -# These are structurally tied to their scripts and not expected to change. -# https://www.unicode.org/Public/UCD/latest/ucd/IndicSyllabicCategory.txt -_ISC_VIRAMA_SET = frozenset(( - 0x094D, # DEVANAGARI SIGN VIRAMA - 0x09CD, # BENGALI SIGN VIRAMA - 0x0A4D, # GURMUKHI SIGN VIRAMA - 0x0ACD, # GUJARATI SIGN VIRAMA - 0x0B4D, # ORIYA SIGN VIRAMA - 0x0BCD, # TAMIL SIGN VIRAMA - 0x0C4D, # TELUGU SIGN VIRAMA - 0x0CCD, # KANNADA SIGN VIRAMA - 0x0D4D, # MALAYALAM SIGN VIRAMA - 0x0DCA, # SINHALA SIGN AL-LAKUNA - 0x1B44, # BALINESE ADEG ADEG - 0xA806, # SYLOTI NAGRI SIGN HASANTA - 0xA8C4, # SAURASHTRA SIGN VIRAMA - 0xA9C0, # JAVANESE PANGKON - 0x11046, # BRAHMI VIRAMA - 0x110B9, # KAITHI SIGN VIRAMA - 0x111C0, # SHARADA SIGN VIRAMA - 0x11235, # KHOJKI SIGN VIRAMA - 0x1134D, # GRANTHA SIGN VIRAMA - 0x11442, # NEWA SIGN VIRAMA - 0x114C2, # TIRHUTA SIGN VIRAMA - 0x115BF, # SIDDHAM SIGN VIRAMA - 0x1163F, # MODI SIGN VIRAMA - 0x116B6, # TAKRI SIGN VIRAMA - 0x11839, # DOGRA SIGN VIRAMA - 0x119E0, # NANDINAGARI SIGN VIRAMA - 0x11C3F, # BHAIKSUKI SIGN VIRAMA -)) -_ISC_CONSONANT_TABLE = ISC_CONSONANT - -# In 'parse' mode, strings longer than this are checked for cursor-movement -# controls (BS, TAB, CR, cursor sequences); when absent, mode downgrades to -# 'ignore' to skip character-by-character parsing. The detection scan cost is -# negligible for long strings but wasted on short ones like labels or headings. -_WIDTH_FAST_PATH_MIN_LEN = 20 - -# Translation table to strip C0/C1 control characters for fast 'ignore' mode. -_CONTROL_CHAR_TABLE = str.maketrans('', '', ( - ''.join(chr(c) for c in range(0x00, 0x20)) + # C0: NUL through US (including tab) - '\x7f' + # DEL - ''.join(chr(c) for c in range(0x80, 0xa0)) # C1: U+0080-U+009F -)) - -# Unlike wcwidth.__all__, wcwidth.wcwidth.__all__ is NOT for the purpose of defining a public API, -# or what we prefer to be imported with statement, "from wcwidth.wcwidth import *". Explicitly -# re-export imports here for no other reason than to satisfy the type checkers (mypy). Yak shavings. -__all__ = ( - 'ZERO_WIDTH', - 'WIDE_EASTASIAN', - 'AMBIGUOUS_EASTASIAN', - 'VS16_NARROW_TO_WIDE', - 'list_versions', - 'wcwidth', - 'wcswidth', - 'width', - 'iter_sequences', - 'ljust', - 'rjust', - 'center', - 'clip', - 'strip_sequences', - '_wcmatch_version', - '_wcversion_value', -) - - -# maxsize=1024: western scripts need ~64 unique codepoints per session, but -# CJK sessions may use ~2000 of ~3500 common hanzi/kanji. 1024 accommodates -# heavy CJK use. Performance floor at 32; bisearch is ~100ns per miss. - -@lru_cache(maxsize=1024) -def wcwidth(wc: str, unicode_version: str = 'auto', ambiguous_width: int = 1) -> int: # pylint: disable=unused-argument - r""" - Given one Unicode codepoint, return its printable length on a terminal. - - :param wc: A single Unicode character. - :param unicode_version: Ignored. Retained for backwards compatibility. - - .. deprecated:: 0.3.0 - Only the latest Unicode version is now shipped. - - :param ambiguous_width: Width to use for East Asian Ambiguous (A) - characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts - where ambiguous characters display as double-width. See - :ref:`ambiguous_width` for details. - :returns: The width, in cells, necessary to display the character of - Unicode string character, ``wc``. Returns 0 if the ``wc`` argument has - no printable effect on a terminal (such as NUL '\0'), -1 if ``wc`` is - not printable, or has an indeterminate effect on the terminal, such as - a control character. Otherwise, the number of column positions the - character occupies on a graphic terminal (1 or 2) is returned. - - See :ref:`Specification` for details of cell measurement. - """ - ucs = ord(wc) if wc else 0 - - # small optimization: early return of 1 for printable ASCII, this provides - # approximately 40% performance improvement for mostly-ascii documents, with - # less than 1% impact to others. - if 32 <= ucs < 0x7f: - return 1 - - # C0/C1 control characters are -1 for compatibility with POSIX-like calls - if ucs and ucs < 32 or 0x07F <= ucs < 0x0A0: - return -1 - - # Zero width - if _bisearch(ucs, _ZERO_WIDTH_TABLE): - return 0 - - # Wide (F/W categories) - if _bisearch(ucs, _WIDE_EASTASIAN_TABLE): - return 2 - - # Ambiguous width (A category) - only when ambiguous_width=2 - if ambiguous_width == 2 and _bisearch(ucs, _AMBIGUOUS_TABLE): - return 2 - - return 1 - - -def wcswidth( - pwcs: str, - n: int | None = None, - unicode_version: str = 'auto', - ambiguous_width: int = 1, -) -> int: - """ - Given a unicode string, return its printable length on a terminal. - - :param pwcs: Measure width of given unicode string. - :param n: When ``n`` is None (default), return the length of the entire - string, otherwise only the first ``n`` characters are measured. - - Better to use string slicing capability, ``wcswidth(pwcs[:n])``, instead, - for performance. This argument is a holdover from the POSIX function for - matching signatures. Be careful that ``n`` is at grapheme boundaries. - - :param unicode_version: Ignored. Retained for backwards compatibility. - - .. deprecated:: 0.3.0 - Only the latest Unicode version is now shipped. - - :param ambiguous_width: Width to use for East Asian Ambiguous (A) - characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts. - :returns: The width, in cells, needed to display the first ``n`` characters - of the unicode string ``pwcs``. Returns ``-1`` for C0 and C1 control - characters! - - See :ref:`Specification` for details of cell measurement. - """ - # pylint: disable=unused-argument,too-many-locals,too-many-statements - # pylint: disable=too-complex,too-many-branches - # This function intentionally kept long without delegating functions to reduce function calls in - # "hot path", the overhead per-character adds up. - - # Fast path: pure ASCII printable strings are always width == length - if n is None and pwcs.isascii() and pwcs.isprintable(): - return len(pwcs) - - # Select wcwidth call pattern for best lru_cache performance: - # - ambiguous_width=1 (default): single-arg calls share cache with direct wcwidth() calls - # - ambiguous_width=2: full positional args needed (results differ, separate cache is correct) - _wcwidth = wcwidth if ambiguous_width == 1 else lambda c: wcwidth(c, 'auto', ambiguous_width) - - end = len(pwcs) if n is None else n - total_width = 0 - idx = 0 - last_measured_idx = -2 # Track index of last measured char for VS16 - last_measured_ucs = -1 # Codepoint of last measured char (for deferred emoji check) - last_was_virama = False # Virama conjunct formation state - conjunct_pending = False # Deferred +1 for bare conjuncts (no trailing Mc) - while idx < end: - char = pwcs[idx] - ucs = ord(char) - if ucs == 0x200D: - if last_was_virama: - # ZWJ after virama requests explicit half-form rendering but - # does not change cell count — consume ZWJ only, let the next - # consonant be handled by the virama conjunct rule. - idx += 1 - elif idx + 1 < end: - # Emoji ZWJ: skip next character unconditionally. - idx += 2 - last_was_virama = False - else: - idx += 1 - last_was_virama = False - continue - if ucs == 0xFE0F and last_measured_idx >= 0: - # VS16 following a measured character: add 1 if that character is - # known to be converted from narrow to wide by VS16. - total_width += _bisearch(ord(pwcs[last_measured_idx]), - VS16_NARROW_TO_WIDE["9.0.0"]) - last_measured_idx = -2 # Prevent double application - # VS16 preserves emoji context: last_measured_ucs stays as the base - idx += 1 - continue - # Regional Indicator & Fitzpatrick: both above BMP (U+1F1E6+) - if ucs > 0xFFFF: - if ucs in _REGIONAL_INDICATOR_SET: - # Lazy RI pairing: count preceding consecutive RIs only when the last one is - # received, because RI's are received so rarely its better than per-loop tracking of - # 'last char was an RI'. - ri_before = 0 - j = idx - 1 - while j >= 0 and ord(pwcs[j]) in _REGIONAL_INDICATOR_SET: - ri_before += 1 - j -= 1 - if ri_before % 2 == 1: - # Second RI in pair: contributes 0 (pair = one 2-cell flag) using an even-or-odd - # check to determine, 'CAUS' would be two flags, but 'CAU' would be 1 flag - # and wide 'U'. - idx += 1 - last_measured_ucs = ucs - continue - # First or unpaired RI: measured normally (width 2 from table) - # Fitzpatrick modifier: zero-width when following emoji base - elif (_FITZPATRICK_RANGE[0] <= ucs <= _FITZPATRICK_RANGE[1] - and last_measured_ucs in _EMOJI_ZWJ_SET): - idx += 1 - continue - # Virama conjunct formation: consonant following virama contributes 0 width. - # See https://www.unicode.org/reports/tr44/#Indic_Syllabic_Category - if last_was_virama and _bisearch(ucs, _ISC_CONSONANT_TABLE): - last_measured_idx = idx - last_measured_ucs = ucs - last_was_virama = False - conjunct_pending = True - idx += 1 - continue - wcw = _wcwidth(char) - if wcw < 0: - # early return -1 on C0 and C1 control characters - return wcw - if wcw > 0: - if conjunct_pending: - total_width += 1 - conjunct_pending = False - last_measured_idx = idx - last_measured_ucs = ucs - last_was_virama = False - elif last_measured_idx >= 0 and _bisearch(ucs, _CATEGORY_MC_TABLE): - # Spacing Combining Mark (Mc) following a base character adds 1 - wcw = 1 - last_measured_idx = -2 - last_was_virama = False - conjunct_pending = False - else: - last_was_virama = ucs in _ISC_VIRAMA_SET - total_width += wcw - idx += 1 - if conjunct_pending: - total_width += 1 - return total_width - - -# NOTE: _wcversion_value and _wcmatch_version are no longer used internally -# by wcwidth since version 0.5.0 (only the latest Unicode version is shipped). -# -# They are retained for API compatibility with external tools like ucs-detect -# that may use these private functions. - - -@lru_cache(maxsize=128) -def _wcversion_value(ver_string: str) -> tuple[int, ...]: # pragma: no cover - """ - Integer-mapped value of given dotted version string. - - .. deprecated:: 0.3.0 - - This function is no longer used internally by wcwidth but is retained - for API compatibility with external tools. - - :param ver_string: Unicode version string, of form ``n.n.n``. - :returns: tuple of digit tuples, ``tuple(int, [...])``. - """ - retval = tuple(map(int, (ver_string.split('.')))) - return retval - - -@lru_cache(maxsize=8) -def _wcmatch_version(given_version: str) -> str: # pylint: disable=unused-argument - """ - Return the supported Unicode version level. - - .. deprecated:: 0.3.0 - This function now always returns the latest version. - - This function is no longer used internally by wcwidth but is retained - for API compatibility with external tools. - - :param given_version: Ignored. Any value is accepted for compatibility. - :returns: The latest unicode version string. - """ - return _LATEST_VERSION - - -def iter_sequences(text: str) -> Iterator[tuple[str, bool]]: - r""" - Iterate through text, yielding segments with sequence identification. - - This generator yields tuples of ``(segment, is_sequence)`` for each part - of the input text, where ``is_sequence`` is ``True`` if the segment is - a recognized terminal escape sequence. - - :param text: String to iterate through. - :returns: Iterator of (segment, is_sequence) tuples. - - .. versionadded:: 0.3.0 - - Example:: - - >>> list(iter_sequences('hello')) - [('hello', False)] - >>> list(iter_sequences('\x1b[31mred')) - [('\x1b[31m', True), ('red', False)] - >>> list(iter_sequences('\x1b[1m\x1b[31m')) - [('\x1b[1m', True), ('\x1b[31m', True)] - """ - idx = 0 - text_len = len(text) - segment_start = 0 - - while idx < text_len: - char = text[idx] - - if char == '\x1b': - # Yield any accumulated non-sequence text - if idx > segment_start: - yield (text[segment_start:idx], False) - - # Try to match an escape sequence - match = ZERO_WIDTH_PATTERN.match(text, idx) - if match: - yield (match.group(), True) - idx = match.end() - else: - # Lone ESC or unrecognized - yield as sequence anyway - yield (char, True) - idx += 1 - segment_start = idx - else: - idx += 1 - - # Yield any remaining text - if segment_start < text_len: - yield (text[segment_start:], False) - - -def _width_ignored_codes(text: str, ambiguous_width: int = 1) -> int: - """ - Fast path for width() with control_codes='ignore'. - - Strips escape sequences and control characters, then measures remaining text. - """ - return wcswidth( - strip_sequences(text).translate(_CONTROL_CHAR_TABLE), - ambiguous_width=ambiguous_width - ) - - -def width( - text: str, - *, - control_codes: Literal['parse', 'strict', 'ignore'] = 'parse', - tabsize: int = 8, - ambiguous_width: int = 1, -) -> int: - r""" - Return printable width of text containing many kinds of control codes and sequences. - - Unlike :func:`wcswidth`, this function handles most control characters and many popular terminal - output sequences. Never returns -1. - - :param text: String to measure. - :param control_codes: How to handle control characters and sequences: - - - ``'parse'`` (default): Track horizontal cursor movement from BS ``\b``, CR ``\r``, TAB - ``\t``, and cursor left and right movement sequences. Vertical movement (LF, VT, FF) and - indeterminate sequences are zero-width. Never raises. - - ``'strict'``: Like parse, but raises :exc:`ValueError` on control characters with - indeterminate results of the screen or cursor, like clear or vertical movement. Generally, - these should be handled with a virtual terminal emulator (like 'pyte'). - - ``'ignore'``: All C0 and C1 control characters and escape sequences are measured as - width 0. This is the fastest measurement for text already filtered or known not to contain - any kinds of control codes or sequences. TAB ``\t`` is zero-width; for tab expansion, - pre-process: ``text.replace('\t', ' ' * 8)``. - - :param tabsize: Tab stop width for ``'parse'`` and ``'strict'`` modes. Default is 8. - Must be positive. Has no effect when ``control_codes='ignore'``. - :param ambiguous_width: Width to use for East Asian Ambiguous (A) - characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts. - :returns: Maximum cursor position reached, "extent", accounting for cursor movement sequences - present in ``text`` according to given parameters. This represents the rightmost column the - cursor reaches. Always a non-negative integer. - - :raises ValueError: If ``control_codes='strict'`` and control characters with indeterminate - effects, such as vertical movement or clear sequences are encountered, or on unexpected - C0 or C1 control code. Also raised when ``control_codes`` is not one of the valid values. - - .. versionadded:: 0.3.0 - - Examples:: - - >>> width('hello') - 5 - >>> width('コンニチハ') - 10 - >>> width('\x1b[31mred\x1b[0m') - 3 - >>> width('\x1b[31mred\x1b[0m', control_codes='ignore') # same result (ignored) - 3 - >>> width('123\b4') # backspace overwrites previous cell (outputs '124') - 3 - >>> width('abc\t') # tab caused cursor to move to column 8 - 8 - >>> width('1\x1b[10C') # '1' + cursor right 10, cursor ends on column 11 - 11 - >>> width('1\x1b[10C', control_codes='ignore') # faster but wrong in this case - 1 - """ - # pylint: disable=too-complex,too-many-branches,too-many-statements,too-many-locals - # This could be broken into sub-functions (#1, #3, and 6 especially), but for reduced overhead - # considering this function is a likely "hot path", they are inlined, breaking many of our - # complexity rules. - - # Fast path for ASCII printable (no tabs, escapes, or control chars) - if text.isascii() and text.isprintable(): - return len(text) - - # Fast parse: if no horizontal cursor movements are possible, switch to 'ignore' mode. - # Only check for longer strings - the detection overhead hurts short string performance. - if control_codes == 'parse' and len(text) > _WIDTH_FAST_PATH_MIN_LEN: - # Check for cursor-affecting control characters - if '\b' not in text and '\t' not in text and '\r' not in text: - # Check for escape sequences - if none, or only non-cursor-movement sequences - if '\x1b' not in text or ( - not CURSOR_RIGHT_SEQUENCE.search(text) and - not CURSOR_LEFT_SEQUENCE.search(text) - ): - control_codes = 'ignore' - - # Fast path for ignore mode -- this is useful if you know the text is already "clean" - if control_codes == 'ignore': - return _width_ignored_codes(text, ambiguous_width) - - strict = control_codes == 'strict' - # Track absolute positions: tab stops need modulo on absolute column, CR resets to 0. - # Initialize max_extent to 0 so backward movement (CR, BS) won't yield negative width. - current_col = 0 - max_extent = 0 - idx = 0 - last_measured_idx = -2 # Track index of last measured char for VS16; -2 can never match idx-1 - last_measured_ucs = -1 # Codepoint of last measured char (for deferred emoji check) - last_was_virama = False # Virama conjunct formation state - conjunct_pending = False # Deferred +1 for bare conjuncts (no trailing Mc) - text_len = len(text) - - # Select wcwidth call pattern for best lru_cache performance: - # - ambiguous_width=1 (default): single-arg calls share cache with direct wcwidth() calls - # - ambiguous_width=2: full positional args needed (results differ, separate cache is correct) - _wcwidth = wcwidth if ambiguous_width == 1 else lambda c: wcwidth(c, 'auto', ambiguous_width) - - while idx < text_len: - char = text[idx] - - # 1. Handle ESC sequences - if char == '\x1b': - match = ZERO_WIDTH_PATTERN.match(text, idx) - if match: - seq = match.group() - if strict and INDETERMINATE_EFFECT_SEQUENCE.match(seq): - raise ValueError(f"Indeterminate cursor sequence at position {idx}") - # Apply cursor movement - right = CURSOR_RIGHT_SEQUENCE.match(seq) - if right: - current_col += int(right.group(1) or 1) - else: - left = CURSOR_LEFT_SEQUENCE.match(seq) - if left: - current_col = max(0, current_col - int(left.group(1) or 1)) - idx = match.end() - else: - idx += 1 - max_extent = max(max_extent, current_col) - continue - - # 2. Handle illegal and vertical control characters (zero width, error in strict) - if char in ILLEGAL_CTRL: - if strict: - raise ValueError(f"Illegal control character {ord(char):#x} at position {idx}") - idx += 1 - continue - - if char in VERTICAL_CTRL: - if strict: - raise ValueError(f"Vertical movement character {ord(char):#x} at position {idx}") - idx += 1 - continue - - # 3. Handle horizontal movement characters - if char in HORIZONTAL_CTRL: - if char == '\x09' and tabsize > 0: # Tab - current_col += tabsize - (current_col % tabsize) - elif char == '\x08': # Backspace - if current_col > 0: - current_col -= 1 - elif char == '\x0d': # Carriage return - current_col = 0 - max_extent = max(max_extent, current_col) - idx += 1 - continue - - # 4. Handle ZWJ - if char == '\u200D': - if last_was_virama: - # ZWJ after virama requests explicit half-form rendering but - # does not change cell count — consume ZWJ only, let the next - # consonant be handled by the virama conjunct rule. - idx += 1 - elif idx + 1 < text_len: - # Emoji ZWJ: skip next character unconditionally. - idx += 2 - last_was_virama = False - else: - idx += 1 - last_was_virama = False - continue - - # 5. Handle other zero-width characters (control chars) - if char in ZERO_WIDTH_CTRL: - idx += 1 - continue - - ucs = ord(char) - - # 6. Handle VS16: converts preceding narrow character to wide - if ucs == 0xFE0F: - if last_measured_idx == idx - 1: - if _bisearch(ord(text[last_measured_idx]), VS16_NARROW_TO_WIDE["9.0.0"]): - current_col += 1 - max_extent = max(max_extent, current_col) - # VS16 preserves emoji context: last_measured_ucs stays as the base - idx += 1 - continue - - # 6b. Regional Indicator & Fitzpatrick: both above BMP (U+1F1E6+) - if ucs > 0xFFFF: - if ucs in _REGIONAL_INDICATOR_SET: - # Lazy RI pairing: count preceding consecutive RIs - ri_before = 0 - j = idx - 1 - while j >= 0 and ord(text[j]) in _REGIONAL_INDICATOR_SET: - ri_before += 1 - j -= 1 - if ri_before % 2 == 1: - last_measured_ucs = ucs - idx += 1 - continue - # 6c. Fitzpatrick modifier: zero-width when following emoji base - elif (_FITZPATRICK_RANGE[0] <= ucs <= _FITZPATRICK_RANGE[1] - and last_measured_ucs in _EMOJI_ZWJ_SET): - idx += 1 - continue - - # 7. Virama conjunct formation: consonant following virama contributes 0 width. - # See https://www.unicode.org/reports/tr44/#Indic_Syllabic_Category - if last_was_virama and _bisearch(ucs, _ISC_CONSONANT_TABLE): - last_measured_idx = idx - last_measured_ucs = ucs - last_was_virama = False - conjunct_pending = True - idx += 1 - continue - - # 8. Normal characters: measure with wcwidth - w = _wcwidth(char) - if w > 0: - if conjunct_pending: - current_col += 1 - conjunct_pending = False - current_col += w - max_extent = max(max_extent, current_col) - last_measured_idx = idx - last_measured_ucs = ucs - last_was_virama = False - elif last_measured_idx >= 0 and _bisearch(ucs, _CATEGORY_MC_TABLE): - # Spacing Combining Mark (Mc) following a base character adds 1 - current_col += 1 - max_extent = max(max_extent, current_col) - last_measured_idx = -2 - last_was_virama = False - conjunct_pending = False - else: - last_was_virama = ucs in _ISC_VIRAMA_SET - idx += 1 - - if conjunct_pending: - current_col += 1 - max_extent = max(max_extent, current_col) - return max_extent - - -def ljust( - text: str, - dest_width: int, - fillchar: str = ' ', - *, - control_codes: Literal['parse', 'strict', 'ignore'] = 'parse', - ambiguous_width: int = 1, -) -> str: - r""" - Return text left-justified in a string of given display width. - - :param text: String to justify, may contain terminal sequences. - :param dest_width: Total display width of result in terminal cells. - :param fillchar: Single character for padding (default space). Must have - display width of 1 (not wide, not zero-width, not combining). Unicode - characters like ``'·'`` are acceptable. The width is not validated. - :param control_codes: How to handle control sequences when measuring. - Passed to :func:`width` for measurement. - :param ambiguous_width: Width to use for East Asian Ambiguous (A) - characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts. - :returns: Text padded on the right to reach ``dest_width``. - - .. versionadded:: 0.3.0 - - Example:: - - >>> wcwidth.ljust('hi', 5) - 'hi ' - >>> wcwidth.ljust('\x1b[31mhi\x1b[0m', 5) - '\x1b[31mhi\x1b[0m ' - >>> wcwidth.ljust('\U0001F468\u200D\U0001F469\u200D\U0001F467', 6) - '👨‍👩‍👧 ' - """ - if text.isascii() and text.isprintable(): - text_width = len(text) - else: - text_width = width(text, control_codes=control_codes, ambiguous_width=ambiguous_width) - padding_cells = max(0, dest_width - text_width) - return text + fillchar * padding_cells - - -def rjust( - text: str, - dest_width: int, - fillchar: str = ' ', - *, - control_codes: Literal['parse', 'strict', 'ignore'] = 'parse', - ambiguous_width: int = 1, -) -> str: - r""" - Return text right-justified in a string of given display width. - - :param text: String to justify, may contain terminal sequences. - :param dest_width: Total display width of result in terminal cells. - :param fillchar: Single character for padding (default space). Must have - display width of 1 (not wide, not zero-width, not combining). Unicode - characters like ``'·'`` are acceptable. The width is not validated. - :param control_codes: How to handle control sequences when measuring. - Passed to :func:`width` for measurement. - :param ambiguous_width: Width to use for East Asian Ambiguous (A) - characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts. - :returns: Text padded on the left to reach ``dest_width``. - - .. versionadded:: 0.3.0 - - Example:: - - >>> wcwidth.rjust('hi', 5) - ' hi' - >>> wcwidth.rjust('\x1b[31mhi\x1b[0m', 5) - ' \x1b[31mhi\x1b[0m' - >>> wcwidth.rjust('\U0001F468\u200D\U0001F469\u200D\U0001F467', 6) - ' 👨‍👩‍👧' - """ - if text.isascii() and text.isprintable(): - text_width = len(text) - else: - text_width = width(text, control_codes=control_codes, ambiguous_width=ambiguous_width) - padding_cells = max(0, dest_width - text_width) - return fillchar * padding_cells + text - - -def center( - text: str, - dest_width: int, - fillchar: str = ' ', - *, - control_codes: Literal['parse', 'strict', 'ignore'] = 'parse', - ambiguous_width: int = 1, -) -> str: - r""" - Return text centered in a string of given display width. - - :param text: String to center, may contain terminal sequences. - :param dest_width: Total display width of result in terminal cells. - :param fillchar: Single character for padding (default space). Must have - display width of 1 (not wide, not zero-width, not combining). Unicode - characters like ``'·'`` are acceptable. The width is not validated. - :param control_codes: How to handle control sequences when measuring. - Passed to :func:`width` for measurement. - :param ambiguous_width: Width to use for East Asian Ambiguous (A) - characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts. - :returns: Text padded on both sides to reach ``dest_width``. - - For odd-width padding, the extra cell goes on the right (matching - Python's :meth:`str.center` behavior). - - .. versionadded:: 0.3.0 - - Example:: - - >>> wcwidth.center('hi', 6) - ' hi ' - >>> wcwidth.center('\x1b[31mhi\x1b[0m', 6) - ' \x1b[31mhi\x1b[0m ' - >>> wcwidth.center('\U0001F468\u200D\U0001F469\u200D\U0001F467', 6) - ' 👨‍👩‍👧 ' - """ - if text.isascii() and text.isprintable(): - text_width = len(text) - else: - text_width = width(text, control_codes=control_codes, ambiguous_width=ambiguous_width) - total_padding = max(0, dest_width - text_width) - # matching https://jazcap53.github.io/pythons-eccentric-strcenter.html - left_pad = total_padding // 2 + (total_padding & dest_width & 1) - right_pad = total_padding - left_pad - return fillchar * left_pad + text + fillchar * right_pad - - -def strip_sequences(text: str) -> str: - r""" - Return text with all terminal escape sequences removed. - - Unknown or incomplete ESC sequences are preserved. - - :param text: String that may contain terminal escape sequences. - :returns: The input text with all escape sequences stripped. - - .. versionadded:: 0.3.0 - - Example:: - - >>> strip_sequences('\x1b[31mred\x1b[0m') - 'red' - >>> strip_sequences('hello') - 'hello' - >>> strip_sequences('\x1b[1m\x1b[31mbold red\x1b[0m text') - 'bold red text' - """ - return ZERO_WIDTH_PATTERN.sub('', text) - - -def clip( - text: str, - start: int, - end: int, - *, - fillchar: str = ' ', - tabsize: int = 8, - ambiguous_width: int = 1, - propagate_sgr: bool = True, -) -> str: - r""" - Clip text to display columns ``(start, end)`` while preserving all terminal sequences. - - This function extracts a substring based on visible column positions rather than - character indices. Terminal escape sequences are preserved in the output since - they have zero display width. If a wide character (width 2) would be split at - either boundary, it is replaced with ``fillchar``. - - TAB characters (``\t``) are expanded to spaces up to the next tab stop, - controlled by the ``tabsize`` parameter. - - Other cursor movement characters (backspace, carriage return) and cursor - movement sequences are passed through unchanged as zero-width. - - :param text: String to clip, may contain terminal escape sequences. - :param start: Absolute starting column (inclusive, 0-indexed). - :param end: Absolute ending column (exclusive). - :param fillchar: Character to use when a wide character must be split at - a boundary (default space). Must have display width of 1. - :param tabsize: Tab stop width (default 8). Set to 0 to pass tabs through - as zero-width (preserved in output but don't advance column position). - :param ambiguous_width: Width to use for East Asian Ambiguous (A) - characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts. - :param propagate_sgr: If True (default), SGR (terminal styling) sequences - are propagated. The result begins with any active style at the start - position and ends with a reset sequence if styles are active. - :returns: Substring of ``text`` spanning display columns ``(start, end)``, - with all terminal sequences preserved and wide characters at boundaries - replaced with ``fillchar``. - - SGR (terminal styling) sequences are propagated by default. The result - begins with any active style and ends with a reset:: - - >>> clip('\x1b[1;34mHello world\x1b[0m', 6, 11) - '\x1b[1;34mworld\x1b[0m' - - Set ``propagate_sgr=False`` to disable this behavior. - - .. versionadded:: 0.3.0 - - .. versionchanged:: 0.5.0 - Added ``propagate_sgr`` parameter (default True). - - Example:: - - >>> clip('hello world', 0, 5) - 'hello' - >>> clip('中文字', 0, 3) # Wide char split at column 3 - '中 ' - >>> clip('a\tb', 0, 10) # Tab expanded to spaces - 'a b' - """ - # pylint: disable=too-complex,too-many-locals,too-many-branches,too-many-statements,too-many-nested-blocks - # Again, for 'hot path', we avoid additional delegate functions and accept the cost - # of complexity for improved python performance. - start = max(start, 0) - if end <= start: - return '' - - # Fast path: printable ASCII only (no tabs, escape sequences, or wide or zero-width chars) - if text.isascii() and text.isprintable(): - return text[start:end] - - # Fast path: no escape sequences means no SGR tracking needed - if propagate_sgr and '\x1b' not in text: - propagate_sgr = False - - # SGR tracking state (only when propagate_sgr=True) - sgr_at_clip_start = None # state when first visible char emitted (None = not yet) - if propagate_sgr: - sgr = _SGR_STATE_DEFAULT # current SGR state, updated by all sequences - - output: list[str] = [] - col = 0 - idx = 0 - - while idx < len(text): - char = text[idx] - - # Early exit: past visible region, SGR captured, no escape ahead - if col >= end and sgr_at_clip_start is not None and char != '\x1b': - break - - # Handle escape sequences - if char == '\x1b' and (match := ZERO_WIDTH_PATTERN.match(text, idx)): - seq = match.group() - if propagate_sgr and _SGR_PATTERN.match(seq): - # Update SGR state; will be applied as prefix when visible content starts - sgr = _sgr_state_update(sgr, seq) - else: - # Non-SGR sequences always preserved - output.append(seq) - idx = match.end() - continue - - # Handle bare ESC (not a valid sequence) - if char == '\x1b': - output.append(char) - idx += 1 - continue - - # TAB expansion - if char == '\t': - if tabsize > 0: - next_tab = col + (tabsize - (col % tabsize)) - while col < next_tab: - if start <= col < end: - output.append(' ') - if propagate_sgr and sgr_at_clip_start is None: - sgr_at_clip_start = sgr - col += 1 - else: - output.append(char) - idx += 1 - continue - - # Grapheme clustering for everything else - grapheme = next(iter_graphemes(text, start=idx)) - w = width(grapheme, ambiguous_width=ambiguous_width) - - if w == 0: - if start <= col < end: - output.append(grapheme) - elif col >= start and col + w <= end: - # Fully visible - output.append(grapheme) - if propagate_sgr and sgr_at_clip_start is None: - sgr_at_clip_start = sgr - col += w - elif col < end and col + w > start: - # Partially visible (wide char at boundary) - output.append(fillchar * (min(end, col + w) - max(start, col))) - if propagate_sgr and sgr_at_clip_start is None: - sgr_at_clip_start = sgr - col += w - else: - col += w - - idx += len(grapheme) - - result = ''.join(output) - - # Apply SGR prefix/suffix - if sgr_at_clip_start is not None: - if prefix := _sgr_state_to_sequence(sgr_at_clip_start): - result = prefix + result - if _sgr_state_is_active(sgr_at_clip_start): - result += '\x1b[0m' - - return result

' : '\U0001d4ab', - '\\' : '\U0001d4ac', - '\\' : '\U0000211b', - '\\' : '\U0001d4ae', - '\\' : '\U0001d4af', - '\\' : '\U0001d4b0', - '\\' : '\U0001d4b1', - '\\' : '\U0001d4b2', - '\\' : '\U0001d4b3', - '\\' : '\U0001d4b4', - '\\' : '\U0001d4b5', - '\\' : '\U0001d5ba', - '\\' : '\U0001d5bb', - '\\' : '\U0001d5bc', - '\\' : '\U0001d5bd', - '\\' : '\U0001d5be', - '\\' : '\U0001d5bf', - '\\' : '\U0001d5c0', - '\\' : '\U0001d5c1', - '\\' : '\U0001d5c2', - '\\' : '\U0001d5c3', - '\\' : '\U0001d5c4', - '\\' : '\U0001d5c5', - '\\' : '\U0001d5c6', - '\\' : '\U0001d5c7', - '\\' : '\U0001d5c8', - '\\